# org.cairnsproto.draft.mark

> Typed pointers into a source. Marks point at the original source, never a rendering, and never contain the answer. Marks nest through refinedBy. Ranges include start and exclude end.

- Kind: defs
- Authority: draft.cairnsproto.org
- Lexicon: 1
- Published by [cairnsproto.org](https://lexicon.garden/identity/did:plc:np7ezqujtsry4bkogisaabul), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.mark)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.mark/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.mark/analytics)

## #archiveMember (`org.cairnsproto.draft.mark#archiveMember`)

Type: object

### Properties

- `path` (string, required)
  - Constraints: maxLength: 4096
- `refinedBy` (ref)
  - Reference: `#refinement`

## #box (`org.cairnsproto.draft.mark#box`)

Type: object

### Properties

- `x0` (integer, required)
- `x1` (integer, required)
- `y0` (integer, required)
- `y1` (integer, required)

## #cssSelector (`org.cairnsproto.draft.mark#cssSelector`)

Type: object

### Properties

- `refinedBy` (ref)
  - Reference: `#refinement`
- `value` (string, required)
  - Constraints: maxLength: 2000

## #gitPath (`org.cairnsproto.draft.mark#gitPath`)

Type: object

### Properties

- `commit` (string, required): Full commit hash.
  - Constraints: minLength: 40, maxLength: 64
- `path` (string, required)
  - Constraints: maxLength: 4096
- `refinedBy` (ref)
  - Reference: `#refinement`

## #imageRegion (`org.cairnsproto.draft.mark#imageRegion`)

Type: object

### Properties

- `bbox` (ref, required): In pixels, origin at the top left.
  - Reference: `#box`
- `frame` (integer)
  - Constraints: minimum: 0
- `refinedBy` (ref)
  - Reference: `#refinement`

## #intRange (`org.cairnsproto.draft.mark#intRange`)

Type: object

### Properties

- `end` (integer, required)
  - Constraints: minimum: 0
- `start` (integer, required)
  - Constraints: minimum: 0

## #jsonPointer (`org.cairnsproto.draft.mark#jsonPointer`)

Type: object

### Properties

- `pointer` (string, required): RFC 6901 pointer.
  - Constraints: maxLength: 4096
- `refinedBy` (ref)
  - Reference: `#refinement`

## #mediaTime (`org.cairnsproto.draft.mark#mediaTime`)

Type: object

### Properties

- `endMs` (integer, required)
  - Constraints: minimum: 0
- `refinedBy` (ref)
  - Reference: `#refinement`
- `startMs` (integer, required)
  - Constraints: minimum: 0

## #pdfRegion (`org.cairnsproto.draft.mark#pdfRegion`)

Type: object

### Properties

- `bbox` (ref): In hundredths of a PDF point, origin at the page's lower left.
  - Reference: `#box`
- `page` (integer, required): 1-based page number.
  - Constraints: minimum: 1
- `refinedBy` (ref)
  - Reference: `#refinement`

## #refinement (`org.cairnsproto.draft.mark#refinement`)

Type: object

A finer mark inside the enclosing one, such as a page inside an archive member.

### Properties

- `mark` (union, required)
  - One of: `#pdfRegion`, `#imageRegion`, `#sheetRange`, `#tableRange`, `#textQuote`, `#cssSelector`, `#textPosition`, `#gitPath`, `#jsonPointer`, `#archiveMember`, `#mediaTime`, `#spaceRange`

## #sheetRange (`org.cairnsproto.draft.mark#sheetRange`)

Type: object

### Properties

- `range` (string, required): A1 notation, such as B2:F40.
  - Constraints: maxLength: 64
- `refinedBy` (ref)
  - Reference: `#refinement`
- `sheet` (string, required)
  - Constraints: maxLength: 256

## #spaceRange (`org.cairnsproto.draft.mark#spaceRange`)

Type: object

A region of a search space. Bounds are decimal integer strings so they are not limited to 64 bits.

### Properties

- `coordinates` (array)
  - Constraints: maxLength: 64
  - `items` (string)
    - Constraints: maxLength: 1024
- `end` (string)
  - Constraints: maxLength: 1024
- `space` (ref, required): Hash of the search-space definition source.
  - Reference: `org.cairnsproto.draft.defs#hash`
- `start` (string)
  - Constraints: maxLength: 1024

## #tableRange (`org.cairnsproto.draft.mark#tableRange`)

Type: object

### Properties

- `columns` (array)
  - Constraints: maxLength: 1024
  - `items` (string)
    - Constraints: maxLength: 256
- `headerRows` (integer, required)
  - Constraints: minimum: 0
- `refinedBy` (ref)
  - Reference: `#refinement`
- `rows` (ref, required): 0-based data rows, after the header rows.
  - Reference: `#intRange`

## #textPosition (`org.cairnsproto.draft.mark#textPosition`)

Type: object

Set lines, chars, or both.

### Properties

- `chars` (ref): 0-based Unicode scalar offsets.
  - Reference: `#intRange`
- `lines` (ref): 1-based line numbers.
  - Reference: `#intRange`
- `refinedBy` (ref)
  - Reference: `#refinement`

## #textQuote (`org.cairnsproto.draft.mark#textQuote`)

Type: object

### Properties

- `exact` (string, required)
  - Constraints: maxLength: 10000
- `prefix` (string)
  - Constraints: maxLength: 1000
- `refinedBy` (ref)
  - Reference: `#refinement`
- `suffix` (string)
  - Constraints: maxLength: 1000

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "archiveMember": {
      "properties": {
        "path": {
          "maxLength": 4096,
          "type": "string"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        }
      },
      "required": [
        "path"
      ],
      "type": "object"
    },
    "box": {
      "properties": {
        "x0": {
          "type": "integer"
        },
        "x1": {
          "type": "integer"
        },
        "y0": {
          "type": "integer"
        },
        "y1": {
          "type": "integer"
        }
      },
      "required": [
        "x0",
        "y0",
        "x1",
        "y1"
      ],
      "type": "object"
    },
    "cssSelector": {
      "properties": {
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        },
        "value": {
          "maxLength": 2000,
          "type": "string"
        }
      },
      "required": [
        "value"
      ],
      "type": "object"
    },
    "gitPath": {
      "properties": {
        "commit": {
          "description": "Full commit hash.",
          "maxLength": 64,
          "minLength": 40,
          "type": "string"
        },
        "path": {
          "maxLength": 4096,
          "type": "string"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        }
      },
      "required": [
        "commit",
        "path"
      ],
      "type": "object"
    },
    "imageRegion": {
      "properties": {
        "bbox": {
          "description": "In pixels, origin at the top left.",
          "ref": "#box",
          "type": "ref"
        },
        "frame": {
          "minimum": 0,
          "type": "integer"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        }
      },
      "required": [
        "bbox"
      ],
      "type": "object"
    },
    "intRange": {
      "properties": {
        "end": {
          "minimum": 0,
          "type": "integer"
        },
        "start": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    },
    "jsonPointer": {
      "properties": {
        "pointer": {
          "description": "RFC 6901 pointer.",
          "maxLength": 4096,
          "type": "string"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        }
      },
      "required": [
        "pointer"
      ],
      "type": "object"
    },
    "mediaTime": {
      "properties": {
        "endMs": {
          "minimum": 0,
          "type": "integer"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        },
        "startMs": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "startMs",
        "endMs"
      ],
      "type": "object"
    },
    "pdfRegion": {
      "properties": {
        "bbox": {
          "description": "In hundredths of a PDF point, origin at the page's lower left.",
          "ref": "#box",
          "type": "ref"
        },
        "page": {
          "description": "1-based page number.",
          "minimum": 1,
          "type": "integer"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        }
      },
      "required": [
        "page"
      ],
      "type": "object"
    },
    "refinement": {
      "description": "A finer mark inside the enclosing one, such as a page inside an archive member.",
      "properties": {
        "mark": {
          "refs": [
            "#pdfRegion",
            "#imageRegion",
            "#sheetRange",
            "#tableRange",
            "#textQuote",
            "#cssSelector",
            "#textPosition",
            "#gitPath",
            "#jsonPointer",
            "#archiveMember",
            "#mediaTime",
            "#spaceRange"
          ],
          "type": "union"
        }
      },
      "required": [
        "mark"
      ],
      "type": "object"
    },
    "sheetRange": {
      "properties": {
        "range": {
          "description": "A1 notation, such as B2:F40.",
          "maxLength": 64,
          "type": "string"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        },
        "sheet": {
          "maxLength": 256,
          "type": "string"
        }
      },
      "required": [
        "sheet",
        "range"
      ],
      "type": "object"
    },
    "spaceRange": {
      "description": "A region of a search space. Bounds are decimal integer strings so they are not limited to 64 bits.",
      "properties": {
        "coordinates": {
          "items": {
            "maxLength": 1024,
            "type": "string"
          },
          "maxLength": 64,
          "type": "array"
        },
        "end": {
          "maxLength": 1024,
          "type": "string"
        },
        "space": {
          "description": "Hash of the search-space definition source.",
          "ref": "org.cairnsproto.draft.defs#hash",
          "type": "ref"
        },
        "start": {
          "maxLength": 1024,
          "type": "string"
        }
      },
      "required": [
        "space"
      ],
      "type": "object"
    },
    "tableRange": {
      "properties": {
        "columns": {
          "items": {
            "maxLength": 256,
            "type": "string"
          },
          "maxLength": 1024,
          "type": "array"
        },
        "headerRows": {
          "minimum": 0,
          "type": "integer"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        },
        "rows": {
          "description": "0-based data rows, after the header rows.",
          "ref": "#intRange",
          "type": "ref"
        }
      },
      "required": [
        "headerRows",
        "rows"
      ],
      "type": "object"
    },
    "textPosition": {
      "description": "Set lines, chars, or both.",
      "properties": {
        "chars": {
          "description": "0-based Unicode scalar offsets.",
          "ref": "#intRange",
          "type": "ref"
        },
        "lines": {
          "description": "1-based line numbers.",
          "ref": "#intRange",
          "type": "ref"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        }
      },
      "type": "object"
    },
    "textQuote": {
      "properties": {
        "exact": {
          "maxLength": 10000,
          "type": "string"
        },
        "prefix": {
          "maxLength": 1000,
          "type": "string"
        },
        "refinedBy": {
          "ref": "#refinement",
          "type": "ref"
        },
        "suffix": {
          "maxLength": 1000,
          "type": "string"
        }
      },
      "required": [
        "exact"
      ],
      "type": "object"
    }
  },
  "description": "Typed pointers into a source. Marks point at the original source, never a rendering, and never contain the answer. Marks nest through refinedBy. Ranges include start and exclude end.",
  "id": "org.cairnsproto.draft.mark",
  "lexicon": 1
}
```
