You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the control-surface convention for registry items:
- registry-item.json schema: optional controls field — name, type
(toggle/variant/scalar), values/fields, min/max, default, drives; variant
requires values, toggle forbids them, scalar requires both bounds.
- generate-catalog-pages.ts: renders the declaration as a Controls table on
the item's generated catalog page; the section is generator-owned
(GENERATED_HEADINGS) so it regenerates and disappears with the manifest.
- CONTROL_TYPES constant + updated enum drift-guard test in @hyperframes/core.
- hyperframes-registry skill docs: the Control surface build rule (budget,
three control types, mapping laws, reserved controls, CONFIG comment
grammar), a Clarify-step question, Quality Gate checkboxes + reviewer audit
procedure, controls declaration in the templates and manifest-fields docs,
and the component examples rewritten to the CONFIG-reading-helper pattern
(raw tween args never migrate into host code).
The field is optional today and required at the Quality Gate for new items;
existing items are unaffected (regenerating the catalog with no declarations
is a byte-identical no-op).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: packages/core/schemas/registry-item.json
+70Lines changed: 70 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,76 @@
125
125
"poster": { "type": "string" }
126
126
}
127
127
},
128
+
"controls": {
129
+
"type": "array",
130
+
"minItems": 1,
131
+
"description": "The item's declared control surface — the single authoring source for control documentation. Each entry mirrors one control in the item's top-of-script CONFIG object and is rendered as a controls table on the item's generated catalog page.",
132
+
"items": {
133
+
"type": "object",
134
+
"required": ["name", "type", "drives"],
135
+
"additionalProperties": false,
136
+
"properties": {
137
+
"name": {
138
+
"type": "string",
139
+
"pattern": "^[a-zA-Z][a-zA-Z0-9]*$",
140
+
"description": "Control name as it appears in CONFIG. Intent-named (e.g. \"energy\", \"layout\"), never implementation-named (e.g. \"staggerMs\")."
141
+
},
142
+
"type": {
143
+
"type": "string",
144
+
"enum": ["toggle", "variant", "scalar"],
145
+
"description": "toggle = boolean between two authored states; variant = enum over N authored poses; scalar = bounded number interpolating authored anchor states through a mapping."
146
+
},
147
+
"values": {
148
+
"type": "array",
149
+
"minItems": 2,
150
+
"items": { "type": "string", "minLength": 1 },
151
+
"description": "variant only: the authored poses. Toggles omit this (always true | false)."
152
+
},
153
+
"fields": {
154
+
"type": "array",
155
+
"minItems": 2,
156
+
"items": { "type": "string", "minLength": 1 },
157
+
"description": "Maps one declared control to N CONFIG keys (e.g. a paired animationIn/animationOut toggle counting as one control). default is then keyed per field."
"description": "The shipped state: variant = one of values; toggle = boolean (or a per-field object when fields is set); scalar = a number within min..max."
169
+
},
170
+
"drives": {
171
+
"type": "string",
172
+
"minLength": 1,
173
+
"description": "What the control drives — the designed state group or mapping behind it."
0 commit comments