The schema defines a deterministic, declarative UI architecture language.
It must:
- Describe full applications (not just pages)
- Support templates, pages, reusable components
- Support optional datasets
- Support overlays
- Support state + interactions
- Be export-safe
- Be machine-readable (usable by external tools and automation)
- Be fully Git-diffable
- Never rely on implicit behavior
It is not a runtime. It is not a visual format. It is a structured UI specification.
Every project consists of:
manifest.yaml
.wfrc.yaml
sitemap.yaml
templates.yaml
components.yaml
/pages/*.yaml
/data/*.yaml # optional; only needed when pages reference datasets
Additional reusable component documents may live anywhere under the project
root. Free filesystem structure is allowed. These extra files must still be
valid documentType: components documents and are pulled in explicitly via
top-level imports maps on templates.yaml, components.yaml, or page
documents. Folder names have no semantic meaning.
Each file has:
documentType
specVersion
id
No file may omit specVersion.
CLI must refuse to operate if manifest.schemaVersion > cli.supportedVersion.
Defines global app-level structure.
Contains:
- id (the sitemap document ID)
- defaultTemplate — fallback template for pages that don't specify one
- contexts — named responsive breakpoints (each with minWidth/maxWidth)
- appState — global state defaults (persists across routes)
- routes — array of (id → path → page → template) mappings
Must not contain:
- page content
- layout trees
Defines reusable structural shells.
templates.yaml may declare top-level imports to bring in reusable component
documents from arbitrary relative paths:
imports:
nav: ./shared/navigation.yamlEach template contains:
- id
- layout (stack/row/grid/etc.)
- regions
Regions must declare:
- id
- kind: persistent | slot
- optional
sticky: top | bottom— makes the region sticky during scroll (only valid on top-level regions) - optional component/use
- optional pane (resizable/collapsible metadata)
- optional size (width/height for sidebar regions etc.)
- layout
Persistent regions may contain injectable nodes:
regions:
- id: header_bar
kind: persistent
children:
- id: logo
component: image
- id: page_actions
injectable: true # pages can inject content here
- id: user_menu
component: avatar_dropdownAn injectable is a named placeholder inside a persistent region. Pages cannot override the persistent region itself, but they can supply content for any injectable node within it.
Rules:
- Pages fill slot regions via
slots. - Pages fill injectable nodes via
injectables. - Persistent regions are otherwise read-only at page level.
- Templates may define overlays (e.g. navigation dropdowns, notification panels).
- Imported components are referenced by alias-qualified
usevalues (for exampleuse: nav.primary_menu). - When template imports and page imports are merged for a rendered page, alias-qualified component IDs must remain unique.
Defines reusable composite components.
Any file may be a reusable component source as long as it is a valid
documentType: components document. The root components.yaml remains the
default project registry, but additional component documents can be split into
any folder structure and imported explicitly by relative path.
Example:
imports:
common: ./shared/common_components.yaml
components:
primary_menu:
root:
id: primary_menu
component: section
children:
- id: projects_link
use: common.menu_link
props:
label: "{{props.activeItem}}"Each component:
- id
- root (node tree)
- optional propDefaults
- optional propHints
Rules:
- root must contain a valid node
- all nodes inside must have unique IDs within component scope
- components may not reference pageState directly
- components may reference props and state
- component documents may declare top-level
imports usesupports alias-qualified component references such asnav.primary_menu{{props.key}}is resolved during component expansion, including nested imported components- a root prop written as its own token (
title: "{{props.title}}") takes the instance's value, orpropDefaultswhen the instance gives none
A component can take content from its instances through named slots. A slot placeholder marks where the content goes:
components:
panel:
propDefaults: { title: Details }
root:
id: panel
component: card
props: { title: "{{props.title}}" }
children:
- { id: body, slot: default }
- id: footer
slot: footer
children: # fallback
- { id: close, component: button, props: { label: Close } }- id: billing_panel
use: panel
props: { title: Billing }
children: # fills `default`
- { id: plan_name, component: heading, props: { text: Pro plan } }
slots:
footer:
- { id: upgrade, component: button, props: { label: Upgrade, variant: primary } }A placeholder has id, slot (the slot name) and optional children (its
fallback), and no other keys. It may appear anywhere below a component's root:
in children, in another placeholder's fallback, or in a fill the component
writes for its own nested instance. It may not be the root, and may not appear
in pages, templates or overlays (SLOT_OUTSIDE_COMPONENT). Slot names are
unique within a component (DUPLICATE_COMPONENT_SLOT).
Fill rules:
- Instance
childrenfilldefault.slots.<name>fills the others. Giving bothchildrenandslots.defaultis an error. - An omitted fill uses the placeholder's fallback.
- An explicit
[]leaves the slot empty on purpose: no fallback, no diagnostic. - A slot with neither content nor fallback reports
EMPTY_COMPONENT_SLOT(info). - A component with no placeholders keeps the plain override path: instance
childrenreplace the root's children.
Scope by author. Every node is prepared by whoever wrote it:
- A component's own tree (its root, internal nodes, fallbacks and the fills it
writes for its nested instances) gets its
{{props}}, its import aliases, and ids and submitformIds namespaced under the instance (billing_panel__close). - Fill content is prepared by the caller. Page fills keep their page ids and get no substitution. Fills that component A writes for its nested B use A's props and A's namespace, so two instances of A never collide.
- Fills are spliced in place of the placeholder untouched, and nested
use:expands after splicing. A component can forward its own placeholder as fill content to a nested instance, so page content passes through two layers. - A caller-authored instance of the same component inside a fill is finite nesting. Only definition cycles (A's own tree reaching A) are errors.
- Ids must be unique in the final resolved tree.
wf component show <id> prints a component's props, slots and fallbacks.
The engine ships screen patterns under the std. prefix (std.login,
std.data_page, ...; the list and their props are in stdlib.md).
A page, template, overlay or component uses one like any component, with no
components document at all:
- id: customers
use: std.data_page
props: { title: Customers }
slots:
filters: []Lookup rule, the same in the CLI, the API and the browser bundle:
- A component id resolves to the project's own definition first. That includes
components imported under an alias named
std: nothing is reserved. - Only when the project has no definition with that id does a built-in
std.<name>answer. Other ids never fall back. - Built-ins are looked up on demand and never join the project's registry, so
wf component list,wf statsandUNUSED_COMPONENTsee only the project's own components. - A document that imports components under the alias
stdreportsSTD_ALIAS_SHADOWED(info), naming the built-ins its components hide. Ids the alias does not define still resolve to the built-ins.
Built-in patterns use only primitives and slots, never another component.
They are read-only: wf component copy std.<name> copies one into the project
to edit (brief, "Components").
Defines a single page.
Page documents may declare top-level imports for component libraries used only
by that page:
imports:
nav: ../shared/navigation.yamlMust contain:
-
page.id
-
page.template
-
page.viewport (REQUIRED)
-
wireframeStyle (REQUIRED)
- border.style is mandatory
-
renderMode (optional) — shorthand alias for
rendering.mode -
rendering (optional) — render mode configuration:
mode: line | card— selects rendering mode (default:line)density: comfortable | compact— spacing density (default:comfortable)- See rendering-modes.md for full specification
-
pageState (optional) — page-scoped state, resets on navigation
-
dataSources (optional) — dataset bindings for this page
-
actions (optional) — named action definitions (e.g. form submissions, API calls). Keyed by action ID, referenced via
actionIdin interactions. -
overlays (optional) — overlay definitions (menus, modals, drawers, tooltips, etc.)
-
slots (required) — content for template slot regions
-
injectables (optional) — content for template injectable nodes
dataSources:
- id: products_source
dataset: productsLinks a page to a dataset defined in optional /data. Nodes can bind to the
dataset via binding.source: {{item.field}}. A missing /data folder is valid
when no page references datasets; a referenced dataset ID must still exist.
actions:
submit_form:
description: "Submit the settings form"
delete_item:
description: "Delete the selected item"Named action definitions referenced by interaction.actionId. The schema
treats actions as opaque objects — their internal structure is application-defined.
The validator checks that any actionId referenced in an interaction exists
in the page's actions map.
Defines the target device and orientation for this page.
viewport:
device: mobile | tablet | web
orientation: portrait | landscape # required for mobile and tablet, ignored for webRules:
deviceis REQUIREDorientationis REQUIRED when device ismobileortabletorientationis ignored when device isweb- A single page targets one viewport — create separate pages for different viewports
- Viewport determines which device frame is applicable for screenshots
Slots must match template slot IDs.
Injectables must match template injectable node IDs:
injectables:
- injectableId: page_actions
content:
- id: save_btn
component: button
props: { label: "Save" }
- id: publish_btn
component: button
props: { label: "Publish" }Page cannot override template persistent regions, but can supply content for injectable nodes within them.
Defines project-level metadata.
Must contain:
manifest:
projectId: wireframe_builder
name: Wireframe Builder
schemaVersion: "1.1"
createdWithCLI: "wf 0.3.0"
defaultWireframeStyle:
border:
style: solid
width: thin
corner:
style: rounded
radius: 8Rules:
schemaVersionis REQUIREDprojectIdmust match Id formatdefaultWireframeStyleprovides inheritable defaults for pagesdefaultGridColumnsis optional. Set, it gives a grid withoutcolumnsthat many equal columns, except that an authoredminItemWidthand adaptive reflow take priority and lay out tiles. It is also the column count for a grid withoutcolumnswhose children are placed withgridItem. Unset (new projects), an unplaced grid withoutcolumnslays out tiles that fill the row, and a placed one uses 12 columns (rendering-data.md § Grid columns)- Used by
wf infoand futurewf migrate
Optional CLI configuration per project.
cli:
strictValidation: true
failOnWarnings: false
export:
includeAssets: true
compressLevel: 9Not part of the schema contract. Not included in export.
Defines a dataset of mock data items used to populate wireframe UI.
The data/ directory is optional for projects without dataset bindings.
Must contain:
documentType: dataset
specVersion: "1.1"
id: users
dataset:
id: users
primaryKey: user_id
items:
- user_id: u001
name: "Jane Smith"
email: "jane@example.com"
role: admin
- user_id: u002
name: "Bob Jones"
email: "bob@example.com"
role: editorOptional:
dataset:
fields: # informational — see below
- user_id
- name
- email
- roleDeclares the expected field names for items. Used for:
- CLI validation (
wf data validate) - Autocomplete hints when adding items
- Documentation of the dataset shape
Fields are informational — items may contain additional fields not listed.
Array of objects. Each item is a plain key-value object. Items are passed and stored as whole objects — no field-by-field construction.
Rules:
- primaryKey field must exist in every item
- No duplicate primaryKey values
- No index-based addressing — items are referenced by primaryKey value
- Items are plain objects (strings, numbers, booleans, arrays, nested objects)
# Navigation menu items
dataset:
id: nav_items
primaryKey: nav_id
items:
- nav_id: dashboard
label: "Dashboard"
icon: dashboard
route: dashboard
- nav_id: products
label: "Products"
icon: box
route: products_list
# User list
dataset:
id: users
primaryKey: user_id
items:
- user_id: u001
name: "Jane Smith"
avatar: "assets/avatar_jane.png"
role: admin
# Table data
dataset:
id: orders
primaryKey: order_id
items:
- order_id: ord_001
customer: "Acme Corp"
total: 1250.00
status: shippedEvery node in any tree must contain:
id
component OR use OR injectable: true
A node with injectable: true is a placeholder — it has no component
of its own. Pages supply its content via the injectables section.
The fourth kind of entry in a node array is a slot placeholder
(SlotPlaceholder): id, slot and optional fallback children, nothing
else. Any object with a slot key is read as one. The schema accepts it
wherever a node can appear; validation allows it only inside a component
definition, below the root (§3.3, Slots).
Optional:
role— semantic role (e.g. "main", "aside", "nav")layout— child layout definition (stack, row, grid, absolute, overlay)size— explicit dimensions (width, height, minWidth, maxWidth, minHeight, maxHeight)scroll— boolean; opt into native overflow scrolling, bounded by existing size dimensions, without a resize handlegridItem— grid positioning (span, offset, row, column)visibility— conditional visibility via a Conditionwhen— draw the node only when the value has content. In a component, write a prop token (when: "{{props.tagline}}"). A caller who passes a blank string, an empty list,nullorfalsegets no node. It is evaluated after props, slots and repeat rows resolve, and never reaches the outputaccessibility— label, role, description for accessibility annotationsbinding— data source binding (source expression, itemVar for collections)interaction— array of Interaction objects (navigation, overlays, state changes, etc.)selection— selection state tracking (scope, stateKey)stateBindings— map of property names to state expressionssurface— explicitly mark a node as framed (true) or content-only (false)elevation— card-mode elevation token (0-3), ignored in line modechildren— child nodes; on ause:node they fill thedefaultslotslots— on ause:node only: a map from slot name to the nodes that fill it (SLOTS_WITHOUT_USEotherwise)repeat—{ cell, items }: one row ofcellper keyed item, after the node'schildren, as if each were written by hand. Row<id>__<item id>is{ component: cell }for an element cell (a name or alias, which wins) or{ use: cell }for a component cell, with the item's other keys as its props.itemsholds 0–200 maps, each with a uniqueid. Only a concrete element node that lays out its children hosts rows (schema-systems.md §14.1)pane— resizable/collapsible panel metadatawireframeStyle— per-node style overrideinjectable— marks node as an injection point (template persistent regions only)
IDs must be unique within resolved tree.
The element set lives in engine/schema/primitive-registry/, which is the
single source for the names, their props, their aliases and whether they draw a
box. engine/schema/schema.json is generated from it by
node scripts/sync-schema-primitives.js, and cli/test/schema-registry-drift.test.js
fails if the two disagree. The table below is generated the same way.
Unknown primitive props are lint warnings rather than schema errors, so custom
component parameters can keep flowing through props. List props marked
(items) share one item shape, and form controls share the field props: see
schema-systems.md §15.4–15.5.
Box column: always draws a frame at any depth; never is a layout group or a control with its own chrome; edge only draws one divider edge; rules decide means the frame rules in section 4.2 settle it.
containers
| Element | Box | Props |
|---|---|---|
section |
rules decide | title, description |
card |
always | title, description, actions, media, footer |
stack |
never | gap, padding, align |
row |
never | gap, padding, align, justify, wrap, nowrap |
grid |
never | columns, gap, minItemWidth (no columns: tiles that fill the row) |
split |
never | gap, orientation: row|stack |
form |
never | title, submit, columns |
carousel |
rules decide | dots, arrows, items |
text
| Element | Box | Props |
|---|---|---|
heading |
never | text, label, level |
paragraph |
never | text, label, lines |
text |
never | text, label, variant: body|meta|label|caption|mono |
code |
always | text, language, inline |
badge |
never | text, variant: neutral|outline|dot|pill, tone: neutral|info|success|warning|danger, icon |
avatar |
never | name, src, size: xs|sm|md|lg|xl, shape: circle|square, group, overflow |
icon |
never | name, style: solid|regular|brands, size |
image |
never | src, alt, kind: image|video|map|embed|logo, ratio, width, height |
rating |
never | value, max, count |
stat |
rules decide | label, value, delta, trend: up|down|flat, icon, sparkline |
progress |
never | value, kind: bar|circle|spinner, label, indeterminate |
skeleton |
never | lines, avatar, width |
divider |
edge only | label, orientation: horizontal|vertical |
spacer |
never | size |
empty_state |
rules decide | title, text, icon, action, variant: empty|error|404|offline |
A newline in prose is a line break: heading, paragraph and text text, the title and description of card, section and form, and alert and empty_state text. Write it with a | block or \n; folded > text has no newlines. List rows, labels and tabs stay on one line (rendering-text.md).
controls
"+ field" is the shared field contract: label, help, error, required, disabled and readonly (schema-systems.md §15.5). Rendering: rendering-controls.md.
| Element | Box | Props |
|---|---|---|
button |
never | label, icon, iconStyle: solid|regular|brands, iconSize, iconPosition: start|end|center, route, variant: primary|secondary|ghost|danger|link, size: sm|md|lg, iconOnly, loading, disabled, fab, pressed |
toolbar |
never | items (items), size: sm|md|lg, orientation: row|stack, labels |
segmented |
never | options (items), value, size: sm|md|lg, + field |
input |
never | placeholder, inputType: text|password|email|number|search|tel|url|date|time|datetime|color|range|otp|stepper, value (two numbers on range), min, max, step, prefix, suffix, icon, iconStyle, iconPosition, variant: default|plain, length, + field |
textarea |
never | placeholder, rows, maxLength, + field |
select |
never | placeholder, options (items), value (a list with multiple), searchable, multiple, + field |
checkbox |
never | checked, indeterminate, description (help is its alias), + field |
radio |
never | checked, description (help is its alias), + field |
toggle |
never | checked, description (help is its alias), + field |
choice_group |
never | kind: checkbox|radio, options (items), value (a list for checkbox), inline, + field |
tags_input |
never | tags, placeholder, + field |
upload |
always | label (action copy), fieldLabel, hint, files, variant: dropzone|button, + field |
picker |
always | options (items), value, columns, + field |
editor |
always | toolbar, rows, + field |
navigation
| Element | Box | Props |
|---|---|---|
tab_bar |
edge only | tabs, variant: underline|pill|enclosed |
bottom_tab_bar |
edge only | tabs |
breadcrumb |
never | items, separator |
pagination |
never | page, pages, variant: numbers|simple|dots |
stepper |
never | steps, current, orientation: row|stack |
nav |
edge at top level (variant sidebar, rail, top); otherwise never | variant: rail |
menu |
box at top level | items |
menubar |
edge at top level | items, open |
command |
rules decide | placeholder, query, items, empty, footer |
app_bar |
edge only | title, subtitle, leading, actions |
action_sheet |
never | items, title, cancel |
page_header |
never | title, subtitle, breadcrumb, actions, tabs |
app_bar.props.leading is an icon name, or the id of one of the bar's own children. A named child is drawn before the title in place of a glyph, with its interaction, and the bar's other children stay after its actions. A child's id wins over an icon of the same name. The reference follows the child when ids are rewritten inside a reusable component or a bound list.
data
| Element | Box | Props |
|---|---|---|
table |
rules decide | columns, rows, caption, selectable, state: default|loading|empty, emptyText, dense, pagination |
list |
rules decide | items, kind: plain|avatar|action|file|chat|timeline|settings, divided, selectable, refreshable |
chart |
rules decide | chartType: bar|vertical|horizontal|line|area|pie|donut|gauge|sparkline|heatmap|gantt, title, label, data, ticks, series, legend, axes, height |
calendar |
always | view: month|week|day|picker, date, events |
kanban |
never | columns |
tree |
rules decide | items, expanded |
accordion |
rules decide | items |
feedback
| Element | Box | Props |
|---|---|---|
alert |
always | text, title, variant: info|success|warning|error|neutral, icon, dismissible, inline, actions |
A handful of names resolve silently to the element on the right, so an agent
that guesses a common synonym is not punished for it: chip, tag, pill →
badge; media → image; kpi, metric → stat; spinner, loader →
progress; combobox, autocomplete → select; switch → toggle;
tabs → tab_bar; wizard → stepper; sidenav → nav;
date_picker → calendar; board → kanban; banner, callout → alert.
engine/renderer/frame-rules.js exports one pure function, decideFrame(node, ctx),
returning { frame, rule, reason }. The renderer and lint both call it, so they
cannot disagree. Only surface draws a container frame, and only surface
increases nesting depth.
| Frame | Meaning |
|---|---|
surface |
a framed container: card, panel, modal, region |
group |
a layout wrapper: spacing and alignment only, never a border |
control |
element-owned chrome (inputs, buttons) that nesting never changes |
content |
bare content: text, icons, images |
edge |
a single divider edge: tab bars, app bars, rules |
Precedence, first match wins:
surface: true/surface: falseon the node.- A border in the node's
wireframeStyle. - The element's own class from the registry (
always,never,edge only,edge at top level,box at top level). The last two draw their chrome only at surface depth 0 and outside a sidebar panel; anywhere else they draw none. - Overlay chrome owns the frame, so overlay content does not double-box.
- Template regions: a slot never frames, except that a
role: sidebarslot draws a sidebar panel (edge). Arole: mainregion never frames, and any other persistent region does. - A node with a
paneis a panel, so it frames. - A parent that separates its children draws the strokes, so the children do not.
- A child of a grid is a tile, so it frames.
- Inside a frame nothing frames itself again — use
cardto be explicit. - At the top of a page a
sectionframes, unless it is an untitled row (which reads as a toolbar) or carriesrole: toolbar.
Every node carries its decision as data-wf-frame. With rendering.explain: true
it also carries data-wf-why="<rule>:<reason>", and wf why <nodeId> --page <pageId>
prints the rule, the resolved sizing tokens and the one edit that would flip it.
A node or template region with a known role gets its structural size from
engine/renderer/sizing-tokens.js rather than from hand-written pixels. Roles:
header, app_bar, sidebar, nav, main, aside, footer, toolbar,
tabbar, form, dialog, sheet, drawer, content.
There are exactly three ways to override a proportion:
manifest.sizing— a flat map of token name to pixels, project wide.sizeon the node or region — local, and it wins over the token.rendering.density: compact— scales spacing only, never structural widths.
A role: sidebar region is 256px on web, 220 on tablet and 280 on mobile, with
a 200px minimum and flex: 0 0 auto so it cannot collapse to its content.
viewport.platform is web, ios or android, defaulting to ios for
device: mobile and tablet. It changes chrome only — control heights, corner
radii, title alignment, status bar, home indicator — never which elements exist
or what they mean. iOS centres an app bar title and uses a chevron back; Android
left-aligns it and gets a 56px circular FAB.
This document covers the core structure (sections 1-4). See companion files for the full specification:
| File | Contents |
|---|---|
| schema-systems.md | Layout, state, interactions, overlays, panes, wireframe style, data binding, primitives, validation, export (sections 5-20) |
| schema-canonical.yaml | Full canonical YAML definition of the schema |
| schema.json | Formal JSON Schema for validation |
Buttons and inputs accept Font Awesome Free names in props.icon and solid/regular/brands in props.iconStyle. props.iconPosition is start (default), end or center. Center on a button is an icon-only action; its label remains its accessible name. On an input, center shows the icon/placeholder group centred while empty and unfocused; focus or a value moves the icon to start. An explicit icon replaces type-inferred decorations. Do not combine it with prefix/suffix on the same side. wireframeStyle.corner.style accepts sharp, rounded and pill. Pill caps are half the shorter painted dimension and override radius. Nodes accept sticky: top|bottom|none. Put a top bar before the content in its containing scrolling region. Image placeholders omit src and use alt as an always-visible, wrapping description over the existing cross.
Input variant: plain removes its inner frame for composition inside a single framed toolbar or composer; default retains the field frame.
Buttons accept props.route as a route-ID shorthand when there are no explicit interactions. Explicit interactions take precedence. App-bar children are normal interactive controls placed on its trailing side; decorative actions remain supported.
An optional manifest.designSystem stores activeSkin and a skins map. Each named skin has name, optional defaults and roles; appearance values contain optional colors, border and corner. Colours are restricted to #RRGGBB (transparent is also allowed for background). They are not fields of ordinary wireframeStyle objects. Standard role keys derive from the primitive registry and existing variant enums; there is no custom role or new node field.
Saving named skins requires manifest specVersion: "1.2" and manifest.schemaVersion: "1.2". Other document types and new ordinary projects remain 1.1. The .wf container stays wf/1. The reserved skin wireframe selects the legacy appearance. See the complete contract.
Company logos are optional on each named skin: logos maps only logo_1, logo_2 and logo_3 to {name, src}. Names are nonempty and at most 80 characters. Sources are static PNG data URLs, at most 256 KiB decoded and 1024 pixels per side. An image uses props: {kind: logo, slot: logo_1, width: 160, height: 64}. Width and height size the container in points (positive, at most 4096); the logo preserves its aspect ratio inside it. Without a width the container is 160 points wide for a skin's logo, and a missing slot's placeholder fits its name on one line, at least 160 points and at most min(100%, 24rem); past that it wraps and grows taller than height. Switching skin resolves the same slot from that skin. Missing slots keep a labelled placeholder and, when width is set, the same box. Asset bytes belong in the skin, never in node props or model context.
Navigation supports optional nav.props.variant: rail|sidebar (omitted preserves legacy output). Rail uses sidebar.collapsedWidth, keeps labels and routes, and honours size.width. Nav/app_bar roles can paint an explicitly authored background; inherited page background does not fill them.
A table column with kind: link accepts a cell {text: "Device A", route: device_a}.
Use it in either keyed rows or positional arrays. The route is an existing sitemap route id;
the renderer uses the route table and emits the normal navigation attributes. A nonempty
string text becomes the accessible link name. Scalar cells keep their existing inert
appearance. Unknown routes, malformed cells and unsafe route-table URLs remain inert
text. This adds no row-click or pagination behavior; table pagination remains illustrative.
Link cells do not accept raw HTML or href values. Relative internal paths and fragments
are supported; schemes, protocol-relative URLs, backslashes and whitespace are rejected.
Optional page.inset is a finite number from 0 to 4096 CSS pixels (rendered to six decimal places). It controls only outer page padding in every mode/platform; 0 is full bleed. Omit it to preserve card/web 16px and existing line/native defaults. Template/body padding and gap remain independent; each page opts in.