# at.markpub.facets.baseBlocks

> Published by [markpub.at](https://lexicon.garden/identity/did:plc:kfxbexqtvw76572grhv2f3on)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:kfxbexqtvw76572grhv2f3on/at.markpub.facets.baseBlocks)
- [Documentation](https://lexicon.garden/lexicon/did:plc:kfxbexqtvw76572grhv2f3on/at.markpub.facets.baseBlocks/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:kfxbexqtvw76572grhv2f3on/at.markpub.facets.baseBlocks/examples)

## Definitions

### `at.markpub.facets.baseBlocks#raw`

**Type**: `object`

Place raw text at the provided byte index. This is a powerful escape hatch for anything that can't be achieved with the other facet features, but use it with caution as it can easily break things if used incorrectly. Do not expect systems to render it.

| Property | Type | Required | Description |
|----------|------|----------|-------------|

### `at.markpub.facets.baseBlocks`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `index` | `ref` → `#byteSlice` | Yes |  |
| `features` | `array` | Yes |  |

### `at.markpub.facets.baseBlocks#byteSlice`

**Type**: `object`

Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. Byte slices can overlap.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `byteEnd` | `integer` | Yes |  |
| `byteStart` | `integer` | Yes |  |

### `at.markpub.facets.baseBlocks#horizontalRule`

**Type**: `object`

Place an `&lt;hr&gt;` element at the provided byte index.

| Property | Type | Required | Description |
|----------|------|----------|-------------|

### `at.markpub.facets.baseBlocks#yamlFrontMatter`

**Type**: `object`

Identify a block of front matter at the top of the Markdown block. It is expected that this has a byteStart and byteEnd.

| Property | Type | Required | Description |
|----------|------|----------|-------------|

## Raw Schema

```json
{
  "id": "at.markpub.facets.baseBlocks",
  "defs": {
    "raw": {
      "type": "object",
      "properties": {},
      "description": "Place raw text at the provided byte index. This is a powerful escape hatch for anything that can't be achieved with the other facet features, but use it with caution as it can easily break things if used incorrectly. Do not expect systems to render it."
    },
    "main": {
      "type": "object",
      "required": [
        "index",
        "features"
      ],
      "properties": {
        "index": {
          "ref": "#byteSlice",
          "type": "ref"
        },
        "features": {
          "type": "array",
          "items": {
            "refs": [
              "#horizontalRule",
              "#yamlFrontMatter",
              "#raw"
            ],
            "type": "union"
          }
        }
      }
    },
    "byteSlice": {
      "type": "object",
      "required": [
        "byteStart",
        "byteEnd"
      ],
      "properties": {
        "byteEnd": {
          "type": "integer",
          "minimum": 0
        },
        "byteStart": {
          "type": "integer",
          "minimum": 0
        }
      },
      "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. Byte slices can overlap."
    },
    "horizontalRule": {
      "type": "object",
      "properties": {},
      "description": "Place an `&lt;hr&gt;` element at the provided byte index."
    },
    "yamlFrontMatter": {
      "type": "object",
      "properties": {},
      "description": "Identify a block of front matter at the top of the Markdown block. It is expected that this has a byteStart and byteEnd."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
