Schemas / Layout
rig.layout.page
v0.31.0 · draft 7 fields 2 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
index |
int | optional | Optional. Position in the page sequence, ascending; absent = 0. Ties break by document order |
width |
float | required | Page width in unit |
height |
float | required | Page height in unit |
unit |
string | optional | Optional. Overrides the document defaultUnit for this page ("mm", "px", "in") |
margins |
faceInsets | optional | number[1..6] |
bleed |
faceInsets | optional | number[1..6] |
slug |
faceInsets | optional | number[1..6] |
A page or artboard - a bounded region content is composed against. Format when present.
A text frame on the page is rig.layout.frame, not this schema.
width and height describe the trim size (XY). Bleed and slug extend outward from it; margins inset inward. The three fields address the same local AABB cuboid as rig.spatial.anchor: the anchor picks which cell is local (0,0,0); inset channels are face offsets on that cuboid and do not remap when the origin cell moves (no axis invert).
Face channels (Host Space: +X right, +Y up, +Z up)
| Index | Channel | Face | Margin (inward) | Bleed / slug (outward) |
|---|---|---|---|---|
| 0 | top | max Y | −Y | +Y |
| 1 | right | max X | −X | +X |
| 2 | bottom | min Y | +Y | −Y |
| 3 | left | min X | +X | −X |
| 4 | floor | min Z | +Z | −Z |
| 5 | ceiling | max Z | −Z | +Z |
Each channel is an inset/extent from that face, not a span between faces. Z always has both sides when present: length 5 sets floor = ceiling; length 6 sets them independently. Lengths 1-4 leave Z unset (planar hosts).
Shorthand (CSS-like, then Z)
| Wire | Expands to |
|---|---|
10 or [10] |
T=R=B=L=10; Z unset |
[12, 8] |
T=B=12, L=R=8; Z unset |
[12, 8, 4] |
T=12, L=R=8, B=4; Z unset |
[T, R, B, L] |
four XY faces (legacy) |
[T, R, B, L, z] |
XY + both Z faces = z |
[T, R, B, L, floor, ceiling] |
all six faces |
Catalog channel names for Z are floor / ceiling (face labels on the volume; not a civic address field). Emit the shortest equivalent form.
Name the page by composing rig.meta.named. Content belongs to a page via rig.spatial.relationship, the same as any other parent. Which point of the page is local (0,0) - and where a page transform attaches - is rig.spatial.anchor, not a field here. Absent anchor means top-left of the trim (pages have no authored origin of their own).
Which page is currently open in an editor is host state, not a field here.
JSON Schema
Resolves at https://rig.works/schemas/rig.layout.page.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.layout.page.schema.json",
"title": "rig.layout.page",
"type": "object",
"additionalProperties": false,
"properties": {
"index": {
"$ref": "./_defs.schema.json#/$defs/int"
},
"width": {
"$ref": "./_defs.schema.json#/$defs/float"
},
"height": {
"$ref": "./_defs.schema.json#/$defs/float"
},
"unit": {
"$ref": "./_defs.schema.json#/$defs/string"
},
"margins": {
"$ref": "./_defs.schema.json#/$defs/faceInsets"
},
"bleed": {
"$ref": "./_defs.schema.json#/$defs/faceInsets"
},
"slug": {
"$ref": "./_defs.schema.json#/$defs/faceInsets"
}
},
"required": [
"width",
"height"
]
}