Schemas / Layout

rig.layout.frame

v0.31.0 · draft 7 fields 2 required

Fields

FieldTypeMeaning
width float required Box width in the parent page unit (or document.defaultUnit)
height float required Box height
insets faceInsets optional number[1..6]
columnCount int optional Optional. Text columns; absent = 1
columnGutter float optional Optional. Space between columns; absent = 0
firstBaseline enumascent · cap-height · leading · x-height · em-box · fixed optional Optional. How the first line sits: ascent, cap-height, leading, x-height, em-box, fixed. Absent = ascent
firstBaselineMin float optional Optional. Minimum first-baseline offset from the inset top. When firstBaseline is fixed, this is the offset

Text frame - a box a rig.story.flow flows through. Format when present.

Bounds, columns, insets, and first baseline. Thread several frames with rig.layout.frame_chain. Parent the frame to a rig.layout.page (or master) with rig.spatial.relationship. Pose is rig.spatial.transform - do not put x / y here.

This is not rig.geometry.rectangle (a drawable). Graphic frames, object styles, text wrap, and anchored objects stay out - idml.md.

Equal columns from columnCount + columnGutter. Per-column widths stay out.

Which point of the box is local (0,0) is rig.spatial.anchor. Absent anchor means top-left of the box.

Name the frame by composing rig.meta.named. Overflow text is fulfillment state - do not store it here.

JSON Schema

Resolves at https://rig.works/schemas/rig.layout.frame.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.layout.frame.schema.json",
  "title": "rig.layout.frame",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "width": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "height": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "insets": {
      "$ref": "./_defs.schema.json#/$defs/faceInsets"
    },
    "columnCount": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "columnGutter": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "firstBaseline": {
      "type": "string",
      "enum": [
        "ascent",
        "cap-height",
        "leading",
        "x-height",
        "em-box",
        "fixed"
      ]
    },
    "firstBaselineMin": {
      "$ref": "./_defs.schema.json#/$defs/float"
    }
  },
  "required": [
    "width",
    "height"
  ]
}

Seen in

story-frames.json