{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://remora.anovelproject.com/schema/manifest.v1.schema.json",
  "title": "Remora manifest (specVersion 1.0)",
  "description": "A Remora template manifest, as defined in SPEC.md section 4. This schema is strict: a manifest declaring specVersion 1.0 may only use fields defined for 1.0, so that misspelt field names are caught. The contents of `state` are free-form.",
  "type": "object",
  "required": ["specVersion", "id", "name", "version", "components", "scenarios", "defaultScenario"],
  "properties": {
    "$schema": {
      "description": "Optional pointer to this schema, for editor support. Ignored by servers and viewers.",
      "type": "string"
    },
    "specVersion": {
      "description": "Version of the Remora specification this manifest follows.",
      "const": "1.0"
    },
    "id": { "$ref": "#/$defs/appId" },
    "name": {
      "description": "Short name shown in viewer listings.",
      "type": "string",
      "minLength": 1
    },
    "version": {
      "description": "The author's own version of the template. Informational.",
      "type": "string",
      "minLength": 1
    },
    "description": { "type": "string" },
    "icon": {
      "description": "Square PNG or JPEG, at least 256 px.",
      "$ref": "#/$defs/assetPath"
    },
    "fonts": {
      "description": "Font name to asset path. Names are usable as `font` in text styles.",
      "type": "object",
      "propertyNames": { "$ref": "#/$defs/name" },
      "additionalProperties": { "$ref": "#/$defs/assetPath" }
    },
    "state": {
      "description": "Initial state document. Free-form.",
      "type": "object"
    },
    "components": {
      "description": "Component ID to component definition.",
      "type": "object",
      "propertyNames": { "$ref": "#/$defs/name" },
      "additionalProperties": { "$ref": "#/$defs/component" }
    },
    "scenarios": {
      "description": "Scenario name to scenario.",
      "type": "object",
      "minProperties": 1,
      "propertyNames": { "$ref": "#/$defs/name" },
      "additionalProperties": { "$ref": "#/$defs/scenario" }
    },
    "defaultScenario": { "$ref": "#/$defs/name" },
    "scenario": {
      "description": "A binding whose value names the active scenario.",
      "$ref": "#/$defs/stringBinding"
    }
  },
  "additionalProperties": false,

  "$defs": {
    "name": {
      "description": "A template-scoped name: component ID, scenario, action, area or font name.",
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
    },
    "appId": {
      "description": "Reverse-DNS style application ID, lowercase.",
      "type": "string",
      "maxLength": 128,
      "pattern": "^[a-z0-9]+([.-][a-z0-9]+)+$"
    },
    "statePath": {
      "description": "Dot-separated path into the state document.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+)*$"
    },
    "itemPath": {
      "description": "Inside a list: `$index`, `$item`, or a path into the row's element.",
      "type": "string",
      "pattern": "^\\$(index|item(\\.[A-Za-z0-9_-]+)*)$"
    },
    "itemOrStatePath": {
      "anyOf": [{ "$ref": "#/$defs/statePath" }, { "$ref": "#/$defs/itemPath" }]
    },
    "colour": {
      "description": "#RRGGBB or #RRGGBBAA.",
      "type": "string",
      "pattern": "^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"
    },
    "length": {
      "description": "A length in layout units (1 unit = 1% of the shorter side).",
      "type": "number",
      "minimum": 0
    },
    "weight": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "assetPath": {
      "description": "Path relative to the package root: forward slashes, no empty or `..` segment.",
      "type": "string",
      "pattern": "^[^/\\\\]+(/[^/\\\\]+)*$",
      "not": { "pattern": "(^|/)\\.\\.(/|$)" }
    },
    "imageRef": {
      "description": "A package asset path, or a runtime asset reference of the form `runtime:<path>`.",
      "$ref": "#/$defs/assetPath"
    },
    "scalar": {
      "type": ["string", "number", "boolean"]
    },

    "stringBinding": {
      "type": "object",
      "required": ["bind"],
      "properties": {
        "bind": { "$ref": "#/$defs/statePath" },
        "default": { "type": "string" }
      },
      "additionalProperties": false
    },
    "textBinding": {
      "description": "A value binding and/or a format string producing text.",
      "type": "object",
      "properties": {
        "bind": { "$ref": "#/$defs/statePath" },
        "format": { "type": "string" },
        "default": { "$ref": "#/$defs/scalar" }
      },
      "additionalProperties": false,
      "anyOf": [{ "required": ["bind"] }, { "required": ["format"] }]
    },
    "numberBinding": {
      "type": "object",
      "required": ["bind"],
      "properties": {
        "bind": { "$ref": "#/$defs/statePath" },
        "default": { "type": "number" }
      },
      "additionalProperties": false
    },
    "imageBinding": {
      "type": "object",
      "required": ["bind"],
      "properties": {
        "bind": { "$ref": "#/$defs/statePath" },
        "default": { "$ref": "#/$defs/imageRef" }
      },
      "additionalProperties": false
    },
    "itemsBinding": {
      "type": "object",
      "required": ["bind"],
      "properties": {
        "bind": { "$ref": "#/$defs/statePath" }
      },
      "additionalProperties": false
    },
    "condition": {
      "description": "A binding that yields true or false: truthiness of the bound value, or one comparison against a literal.",
      "type": "object",
      "required": ["bind"],
      "properties": {
        "bind": { "$ref": "#/$defs/statePath" },
        "not": { "type": "boolean" },
        "eq": { "$ref": "#/$defs/scalar" },
        "ne": { "$ref": "#/$defs/scalar" },
        "gt": { "type": "number" },
        "gte": { "type": "number" },
        "lt": { "type": "number" },
        "lte": { "type": "number" }
      },
      "additionalProperties": false,
      "oneOf": [
        {
          "title": "no comparison operator",
          "not": {
            "anyOf": [
              { "required": ["eq"] }, { "required": ["ne"] },
              { "required": ["gt"] }, { "required": ["gte"] },
              { "required": ["lt"] }, { "required": ["lte"] }
            ]
          }
        },
        { "required": ["eq"] },
        { "required": ["ne"] },
        { "required": ["gt"] },
        { "required": ["gte"] },
        { "required": ["lt"] },
        { "required": ["lte"] }
      ]
    },

    "bindableText": {
      "anyOf": [{ "type": "string" }, { "$ref": "#/$defs/textBinding" }]
    },
    "bindableNumber": {
      "anyOf": [{ "type": "number" }, { "$ref": "#/$defs/numberBinding" }]
    },
    "bindableBoolean": {
      "anyOf": [{ "type": "boolean" }, { "$ref": "#/$defs/condition" }]
    },
    "bindableImage": {
      "anyOf": [{ "$ref": "#/$defs/imageRef" }, { "$ref": "#/$defs/imageBinding" }]
    },
    "bindableItems": {
      "anyOf": [
        { "type": "array", "items": { "type": "object" } },
        { "$ref": "#/$defs/itemsBinding" }
      ]
    },

    "itemText": {
      "description": "A list row slot producing text. Paths may start with `$item.`.",
      "anyOf": [
        { "type": "string" },
        {
          "type": "object",
          "properties": {
            "bind": { "$ref": "#/$defs/itemOrStatePath" },
            "format": { "type": "string" },
            "default": { "$ref": "#/$defs/scalar" }
          },
          "additionalProperties": false,
          "anyOf": [{ "required": ["bind"] }, { "required": ["format"] }]
        }
      ]
    },
    "itemImage": {
      "anyOf": [
        { "$ref": "#/$defs/imageRef" },
        {
          "type": "object",
          "required": ["bind"],
          "properties": {
            "bind": { "$ref": "#/$defs/itemOrStatePath" },
            "default": { "$ref": "#/$defs/imageRef" }
          },
          "additionalProperties": false
        }
      ]
    },
    "itemValue": {
      "description": "The value sent when a list row is tapped.",
      "type": "object",
      "required": ["bind"],
      "properties": {
        "bind": { "$ref": "#/$defs/itemOrStatePath" }
      },
      "additionalProperties": false
    },

    "feedback": {
      "description": "Local feedback played by the viewer when the user touches the component.",
      "type": "object",
      "properties": {
        "animation": { "enum": ["scaleDown", "scaleUp", "pulse", "glow", "fade", "shake", "bounce"] },
        "sound": { "$ref": "#/$defs/assetPath" },
        "haptic": { "enum": ["light", "medium", "heavy"] }
      },
      "additionalProperties": false
    },

    "colourPart": {
      "type": "object",
      "properties": { "color": { "$ref": "#/$defs/colour" } },
      "additionalProperties": false
    },
    "colourImagePart": {
      "type": "object",
      "properties": {
        "color": { "$ref": "#/$defs/colour" },
        "image": { "$ref": "#/$defs/assetPath" }
      },
      "additionalProperties": false
    },
    "direction": { "enum": ["right", "left", "up", "down"] },
    "fit": { "enum": ["contain", "cover", "fill"] },

    "boxStyleParts": {
      "$comment": "Mixed into every style object. Not closed on its own.",
      "type": "object",
      "properties": {
        "background": {
          "type": "object",
          "properties": {
            "color": { "$ref": "#/$defs/colour" },
            "image": { "$ref": "#/$defs/assetPath" },
            "fit": { "$ref": "#/$defs/fit" }
          },
          "additionalProperties": false
        },
        "border": {
          "type": "object",
          "properties": {
            "color": { "$ref": "#/$defs/colour" },
            "width": { "$ref": "#/$defs/length" },
            "radius": { "anyOf": [{ "$ref": "#/$defs/length" }, { "const": "round" }] }
          },
          "additionalProperties": false
        },
        "padding": { "$ref": "#/$defs/length" },
        "opacity": { "type": "number", "minimum": 0, "maximum": 1 }
      }
    },
    "textStyleParts": {
      "$comment": "Mixed into text styles. Not closed on its own.",
      "type": "object",
      "properties": {
        "color": { "$ref": "#/$defs/colour" },
        "size": { "$ref": "#/$defs/length" },
        "font": { "$ref": "#/$defs/name" },
        "weight": { "enum": ["normal", "bold"] },
        "align": { "enum": ["start", "center", "end"] }
      }
    },
    "boxStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }],
      "unevaluatedProperties": false
    },
    "textStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/textStyleParts" }],
      "unevaluatedProperties": false
    },

    "textComponentStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }, { "$ref": "#/$defs/textStyleParts" }],
      "unevaluatedProperties": false
    },
    "imageComponentStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }],
      "properties": {
        "fit": { "$ref": "#/$defs/fit" }
      },
      "unevaluatedProperties": false
    },
    "dialComponentStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }],
      "properties": {
        "track": { "$ref": "#/$defs/colourPart" },
        "fill": { "$ref": "#/$defs/colourPart" },
        "needle": { "$ref": "#/$defs/colourPart" },
        "showValue": { "type": "boolean" },
        "valueText": { "$ref": "#/$defs/textStyle" },
        "labelText": { "$ref": "#/$defs/textStyle" }
      },
      "unevaluatedProperties": false
    },
    "barComponentStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }],
      "properties": {
        "direction": { "$ref": "#/$defs/direction" },
        "track": { "$ref": "#/$defs/colourImagePart" },
        "fill": { "$ref": "#/$defs/colourImagePart" },
        "showValue": { "type": "boolean" },
        "valueText": { "$ref": "#/$defs/textStyle" },
        "labelText": { "$ref": "#/$defs/textStyle" }
      },
      "unevaluatedProperties": false
    },
    "listComponentStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }],
      "properties": {
        "rowHeight": { "$ref": "#/$defs/length" },
        "divider": { "$ref": "#/$defs/colourPart" },
        "titleText": { "$ref": "#/$defs/textStyle" },
        "subtitleText": { "$ref": "#/$defs/textStyle" },
        "trailingText": { "$ref": "#/$defs/textStyle" }
      },
      "unevaluatedProperties": false
    },
    "buttonComponentStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }],
      "properties": {
        "labelText": { "$ref": "#/$defs/textStyle" }
      },
      "unevaluatedProperties": false
    },
    "toggleComponentStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }],
      "properties": {
        "track": {
          "type": "object",
          "properties": {
            "color": { "$ref": "#/$defs/colour" },
            "onColor": { "$ref": "#/$defs/colour" }
          },
          "additionalProperties": false
        },
        "thumb": { "$ref": "#/$defs/colourPart" },
        "labelText": { "$ref": "#/$defs/textStyle" }
      },
      "unevaluatedProperties": false
    },
    "sliderComponentStyle": {
      "type": "object",
      "allOf": [{ "$ref": "#/$defs/boxStyleParts" }],
      "properties": {
        "direction": { "$ref": "#/$defs/direction" },
        "track": { "$ref": "#/$defs/colourPart" },
        "fill": { "$ref": "#/$defs/colourPart" },
        "thumb": { "$ref": "#/$defs/colourPart" },
        "labelText": { "$ref": "#/$defs/textStyle" }
      },
      "unevaluatedProperties": false
    },

    "component": {
      "type": "object",
      "required": ["type"],
      "properties": {
        "type": { "enum": ["text", "image", "dial", "bar", "list", "button", "toggle", "slider"] }
      },
      "allOf": [
        { "if": { "properties": { "type": { "const": "text" } }, "required": ["type"] }, "then": { "$ref": "#/$defs/textComponent" } },
        { "if": { "properties": { "type": { "const": "image" } }, "required": ["type"] }, "then": { "$ref": "#/$defs/imageComponent" } },
        { "if": { "properties": { "type": { "const": "dial" } }, "required": ["type"] }, "then": { "$ref": "#/$defs/dialComponent" } },
        { "if": { "properties": { "type": { "const": "bar" } }, "required": ["type"] }, "then": { "$ref": "#/$defs/barComponent" } },
        { "if": { "properties": { "type": { "const": "list" } }, "required": ["type"] }, "then": { "$ref": "#/$defs/listComponent" } },
        { "if": { "properties": { "type": { "const": "button" } }, "required": ["type"] }, "then": { "$ref": "#/$defs/buttonComponent" } },
        { "if": { "properties": { "type": { "const": "toggle" } }, "required": ["type"] }, "then": { "$ref": "#/$defs/toggleComponent" } },
        { "if": { "properties": { "type": { "const": "slider" } }, "required": ["type"] }, "then": { "$ref": "#/$defs/sliderComponent" } }
      ]
    },

    "textComponent": {
      "type": "object",
      "properties": {
        "type": true,
        "visible": { "$ref": "#/$defs/bindableBoolean" },
        "text": { "$ref": "#/$defs/bindableText" },
        "style": { "$ref": "#/$defs/textComponentStyle" },
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["when", "style"],
            "properties": {
              "when": { "$ref": "#/$defs/condition" },
              "style": { "$ref": "#/$defs/textComponentStyle" }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "imageComponent": {
      "type": "object",
      "properties": {
        "type": true,
        "visible": { "$ref": "#/$defs/bindableBoolean" },
        "src": { "$ref": "#/$defs/bindableImage" },
        "style": { "$ref": "#/$defs/imageComponentStyle" },
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["when", "style"],
            "properties": {
              "when": { "$ref": "#/$defs/condition" },
              "style": { "$ref": "#/$defs/imageComponentStyle" }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "dialComponent": {
      "type": "object",
      "properties": {
        "type": true,
        "visible": { "$ref": "#/$defs/bindableBoolean" },
        "value": { "$ref": "#/$defs/bindableNumber" },
        "min": { "$ref": "#/$defs/bindableNumber" },
        "max": { "$ref": "#/$defs/bindableNumber" },
        "label": { "$ref": "#/$defs/bindableText" },
        "style": { "$ref": "#/$defs/dialComponentStyle" },
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["when", "style"],
            "properties": {
              "when": { "$ref": "#/$defs/condition" },
              "style": { "$ref": "#/$defs/dialComponentStyle" }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "barComponent": {
      "type": "object",
      "properties": {
        "type": true,
        "visible": { "$ref": "#/$defs/bindableBoolean" },
        "value": { "$ref": "#/$defs/bindableNumber" },
        "min": { "$ref": "#/$defs/bindableNumber" },
        "max": { "$ref": "#/$defs/bindableNumber" },
        "label": { "$ref": "#/$defs/bindableText" },
        "style": { "$ref": "#/$defs/barComponentStyle" },
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["when", "style"],
            "properties": {
              "when": { "$ref": "#/$defs/condition" },
              "style": { "$ref": "#/$defs/barComponentStyle" }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "listComponent": {
      "type": "object",
      "properties": {
        "type": true,
        "visible": { "$ref": "#/$defs/bindableBoolean" },
        "items": { "$ref": "#/$defs/bindableItems" },
        "item": {
          "type": "object",
          "properties": {
            "image": { "$ref": "#/$defs/itemImage" },
            "title": { "$ref": "#/$defs/itemText" },
            "subtitle": { "$ref": "#/$defs/itemText" },
            "trailing": { "$ref": "#/$defs/itemText" }
          },
          "additionalProperties": false
        },
        "action": { "$ref": "#/$defs/name" },
        "actionValue": { "$ref": "#/$defs/itemValue" },
        "enabled": { "$ref": "#/$defs/bindableBoolean" },
        "feedback": { "$ref": "#/$defs/feedback" },
        "style": { "$ref": "#/$defs/listComponentStyle" },
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["when", "style"],
            "properties": {
              "when": { "$ref": "#/$defs/condition" },
              "style": { "$ref": "#/$defs/listComponentStyle" }
            },
            "additionalProperties": false
          }
        }
      },
      "dependentRequired": {
        "actionValue": ["action"],
        "feedback": ["action"]
      },
      "additionalProperties": false
    },
    "buttonComponent": {
      "type": "object",
      "properties": {
        "type": true,
        "visible": { "$ref": "#/$defs/bindableBoolean" },
        "label": { "$ref": "#/$defs/bindableText" },
        "icon": { "$ref": "#/$defs/bindableImage" },
        "action": { "$ref": "#/$defs/name" },
        "actionValue": {
          "description": "A literal sent as the action's value."
        },
        "enabled": { "$ref": "#/$defs/bindableBoolean" },
        "feedback": { "$ref": "#/$defs/feedback" },
        "style": { "$ref": "#/$defs/buttonComponentStyle" },
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["when", "style"],
            "properties": {
              "when": { "$ref": "#/$defs/condition" },
              "style": { "$ref": "#/$defs/buttonComponentStyle" }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "toggleComponent": {
      "type": "object",
      "properties": {
        "type": true,
        "visible": { "$ref": "#/$defs/bindableBoolean" },
        "value": { "$ref": "#/$defs/bindableBoolean" },
        "label": { "$ref": "#/$defs/bindableText" },
        "action": { "$ref": "#/$defs/name" },
        "enabled": { "$ref": "#/$defs/bindableBoolean" },
        "feedback": { "$ref": "#/$defs/feedback" },
        "style": { "$ref": "#/$defs/toggleComponentStyle" },
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["when", "style"],
            "properties": {
              "when": { "$ref": "#/$defs/condition" },
              "style": { "$ref": "#/$defs/toggleComponentStyle" }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "sliderComponent": {
      "type": "object",
      "properties": {
        "type": true,
        "visible": { "$ref": "#/$defs/bindableBoolean" },
        "value": { "$ref": "#/$defs/bindableNumber" },
        "min": { "$ref": "#/$defs/bindableNumber" },
        "max": { "$ref": "#/$defs/bindableNumber" },
        "step": { "type": "number", "exclusiveMinimum": 0 },
        "label": { "$ref": "#/$defs/bindableText" },
        "action": { "$ref": "#/$defs/name" },
        "enabled": { "$ref": "#/$defs/bindableBoolean" },
        "feedback": { "$ref": "#/$defs/feedback" },
        "style": { "$ref": "#/$defs/sliderComponentStyle" },
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["when", "style"],
            "properties": {
              "when": { "$ref": "#/$defs/condition" },
              "style": { "$ref": "#/$defs/sliderComponentStyle" }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },

    "scenario": {
      "description": "A named arrangement of components, with a layout for one or both orientations.",
      "type": "object",
      "minProperties": 1,
      "properties": {
        "landscape": { "$ref": "#/$defs/layout" },
        "portrait": { "$ref": "#/$defs/layout" }
      },
      "additionalProperties": false
    },
    "layout": {
      "description": "Either a single `root` node, or a `grid` with one node per named area.",
      "type": "object",
      "properties": {
        "root": { "$ref": "#/$defs/node" },
        "grid": { "$ref": "#/$defs/grid" },
        "areas": {
          "type": "object",
          "propertyNames": { "$ref": "#/$defs/name" },
          "additionalProperties": { "$ref": "#/$defs/node" }
        },
        "style": { "$ref": "#/$defs/boxStyle" }
      },
      "additionalProperties": false,
      "oneOf": [
        {
          "title": "single-node layout",
          "required": ["root"],
          "not": { "anyOf": [{ "required": ["grid"] }, { "required": ["areas"] }] }
        },
        {
          "title": "grid layout",
          "required": ["grid", "areas"],
          "not": { "required": ["root"] }
        }
      ]
    },
    "grid": {
      "type": "object",
      "required": ["columns", "rows", "map"],
      "properties": {
        "columns": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/weight" } },
        "rows": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/weight" } },
        "map": {
          "description": "One area name per cell, or `.` for an empty cell.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "array",
            "minItems": 1,
            "items": { "anyOf": [{ "$ref": "#/$defs/name" }, { "const": "." }] }
          }
        },
        "gap": { "$ref": "#/$defs/length" }
      },
      "additionalProperties": false
    },
    "node": {
      "description": "A component ID, a component placement, or a container.",
      "oneOf": [
        { "$ref": "#/$defs/name" },
        { "$ref": "#/$defs/placement" },
        { "$ref": "#/$defs/container" }
      ]
    },
    "placement": {
      "type": "object",
      "required": ["component"],
      "properties": {
        "component": { "$ref": "#/$defs/name" },
        "weight": { "$ref": "#/$defs/weight" }
      },
      "additionalProperties": false
    },
    "container": {
      "type": "object",
      "required": ["type", "children"],
      "properties": {
        "type": { "enum": ["row", "column", "stack"] },
        "children": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/node" } },
        "gap": { "$ref": "#/$defs/length" },
        "weight": { "$ref": "#/$defs/weight" },
        "style": { "$ref": "#/$defs/boxStyle" }
      },
      "additionalProperties": false
    }
  }
}
