Schemas / Story (semantic copy)

rig.story.table

v0.31.0 · draft 6 fields 2 required

Fields

FieldTypeMeaning
columnCount int required Number of columns
headerRowCount int optional Optional. Header rows at the top; absent = 0
footerRowCount int optional Optional. Footer rows at the bottom; absent = 0
columnWidths array<float> optional Optional. Fractional column weights (unitless, normalised by the host); absent / empty = equal columns
style entity optional Optional. rig.layout.table_style dressing this table; absent = the document's default table style
cells array<object> required Occupied cells

Semantic table in a rig.story.flow. Format when present.

Column count, header/footer row counts, cells with spans. No table/cell visual styles - fills, inks, and type live on rig.layout.table_style. Header rows are row < headerRowCount; footer rows are the last footerRowCount rows.

Body row count is derived from the cells (max row + 1 minus header and footer). Do not store a parallel bodyRowCount.

Cell

Do not also list cell blocks on the parent flow. Empty blocks is an empty cell.

JSON Schema

Resolves at https://rig.works/schemas/rig.story.table.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.story.table.schema.json",
  "title": "rig.story.table",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "columnCount": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "headerRowCount": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "footerRowCount": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "columnWidths": {
      "type": "array",
      "items": {
        "$ref": "./_defs.schema.json#/$defs/float"
      }
    },
    "style": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "cells": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "column",
          "row"
        ],
        "properties": {
          "column": {
            "$ref": "./_defs.schema.json#/$defs/int"
          },
          "row": {
            "$ref": "./_defs.schema.json#/$defs/int"
          },
          "columnSpan": {
            "$ref": "./_defs.schema.json#/$defs/int"
          },
          "rowSpan": {
            "$ref": "./_defs.schema.json#/$defs/int"
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "./_defs.schema.json#/$defs/entity"
            }
          }
        }
      }
    }
  },
  "required": [
    "columnCount",
    "cells"
  ]
}

Seen in

story-flow.json