@aestheticfunction/dspack-emit 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,3 +47,410 @@ export const SHADCN_V2_SURFACES = {
47
47
  ],
48
48
  },
49
49
  };
50
+ /**
51
+ * T1 resolutions for the production v3 contract — the transparent-identity
52
+ * spellings proven by src/t1.test.ts against the named production failure
53
+ * (`card > form > form-field > form-item > form-label + input`). Consumed by
54
+ * the eval fixture builder as committed mapping evidence; the fixture's other
55
+ * unresolved decisions stay deliberately open.
56
+ */
57
+ export const SHADCN_V3_T1_SURFACES = {
58
+ form: {
59
+ transparent: true,
60
+ subs: {
61
+ "form-field": "transparent",
62
+ "form-control": "transparent",
63
+ "form-item": { transparent: { donate: [{ from: "sub(form-label).text", to: "prop:label" }] } },
64
+ "form-description": { asText: "caption" },
65
+ "form-message": { drop: "validation state is runtime data the declarative surface does not carry" },
66
+ },
67
+ },
68
+ };
69
+ /**
70
+ * T2 resolutions for the production v3 contract — item-mode collection
71
+ * spellings proven by src/t2.test.ts. `radio-group` collects what each item
72
+ * itself carries ({value: self.id}); its htmlFor-joined sibling labels are
73
+ * the measured T3 frontier, dropped with record until declared joins land.
74
+ * `select` is the pure homogeneous shape ({label: self.text}).
75
+ *
76
+ * Each entry carries the full receiving plan (structural options schema) —
77
+ * unlike T1's transparent plans, a collecting plan IS a catalog component.
78
+ */
79
+ export const SHADCN_V3_T3_PLANS = {
80
+ tabs: {
81
+ a2ui: "Tabs",
82
+ dspackId: "tabs",
83
+ commons: ["ComponentCommon"],
84
+ structural: {
85
+ sections: {
86
+ schema: {
87
+ type: "array",
88
+ items: {
89
+ type: "object",
90
+ properties: { title: { type: "string" }, value: { type: "string" }, child: { $ref: "#/$defs/ComponentId" } },
91
+ required: ["title", "child"],
92
+ additionalProperties: false,
93
+ },
94
+ },
95
+ description: "The tab sections: a title and the panel it reveals.",
96
+ synthNote: "A2UI models paired trigger/panel families as one array of {title, child} records (T3 declared join; the worked example keys on ids).",
97
+ },
98
+ },
99
+ propMap: { defaultValue: { a2ui: "defaultValue", kind: "string" } },
100
+ required: ["sections"],
101
+ surface: {
102
+ collects: [
103
+ {
104
+ of: ["tabs-trigger"],
105
+ into: "prop:sections",
106
+ item: { title: "self.text", value: "self.id" },
107
+ join: { with: ["tabs-content"], on: { left: "self.id", right: "self.id" }, fields: { child: "children" } },
108
+ },
109
+ ],
110
+ },
111
+ },
112
+ };
113
+ export const SHADCN_V3_T2_PLANS = {
114
+ "radio-group": {
115
+ a2ui: "RadioGroup",
116
+ dspackId: "radio-group",
117
+ commons: ["ComponentCommon"],
118
+ structural: {
119
+ label: {
120
+ schema: { type: "string" },
121
+ description: "The group-level label naming the choice being made.",
122
+ synthNote: "Sourced by T1 form-label donation when the group sits inside a form field; a group without one relies on context.",
123
+ },
124
+ options: {
125
+ schema: { type: "array", items: { type: "object", properties: { value: { type: "string" }, label: { type: "string" } }, required: ["value"], additionalProperties: false } },
126
+ description: "The selectable options, one record per item.",
127
+ synthNote: "A2UI models repeated options as data on the group; dspack models them as repeated sub-components (T2 item-mode collection).",
128
+ },
129
+ },
130
+ propMap: {
131
+ name: { a2ui: "name", kind: "string" },
132
+ defaultValue: { a2ui: "defaultValue", kind: "string" },
133
+ },
134
+ required: ["options"],
135
+ // T3: the htmlFor->id join carries each item's sibling label into its
136
+ // record. Value still sources from self.id — a documented limitation:
137
+ // ids are DOM identity, not semantic values ("reimbursement-payroll" vs
138
+ // defaultValue "payroll"); the real shadcn API declares value on the
139
+ // item, and the contract gap is filed upstream.
140
+ surface: {
141
+ collects: [
142
+ {
143
+ of: ["radio-group-item"],
144
+ into: "prop:options",
145
+ item: { value: "self.id" },
146
+ join: { with: ["label"], on: { left: "self.id", right: "self.props.htmlFor" }, fields: { label: "self.text" } },
147
+ },
148
+ ],
149
+ },
150
+ },
151
+ select: {
152
+ a2ui: "Select",
153
+ dspackId: "select",
154
+ commons: ["ComponentCommon"],
155
+ structural: {
156
+ options: {
157
+ schema: { type: "array", items: { type: "object", properties: { label: { type: "string" } }, required: ["label"], additionalProperties: false } },
158
+ description: "The selectable options.",
159
+ synthNote: "A2UI models repeated options as data on the control (T2 item-mode collection).",
160
+ },
161
+ },
162
+ propMap: { defaultValue: { a2ui: "defaultValue", kind: "string" } },
163
+ required: ["options"],
164
+ surface: {
165
+ collects: [{ of: ["select-item"], into: "prop:options", item: { label: "self.text" } }],
166
+ subs: {
167
+ "select-trigger": { drop: "the trigger renders from the bound value, not authored content" },
168
+ "select-value": { drop: "the visible value is runtime state derived from the selection" },
169
+ "select-label": { drop: "group headings are not carried by the flat options shape" },
170
+ "select-separator": { drop: "visual grouping chrome with no data meaning" },
171
+ },
172
+ },
173
+ },
174
+ };
175
+ /**
176
+ * A0 authoring resolutions (the zero-new-capability milestone): production
177
+ * profile judgment for the families the shipped Identity/Routing/Repetition
178
+ * model already supports, proven by src/a0.test.ts. Six compound plans plus
179
+ * label-slot additions on the five controls that appear as a field's single
180
+ * control (the T1 donation destination). No new primitive anywhere.
181
+ *
182
+ * Grounded in measured usage across the 14 worked examples (contract 3.2.0):
183
+ * alert-title 5/5 + alert-description 5/5 carry the content; avatar-fallback
184
+ * carries text while avatar-image is an EMPTY node (the contract declares no
185
+ * src/alt — the dspack#39 class, recorded on the drop); scroll-area's two
186
+ * subs are scrollbar chrome; the field family follows the corrected
187
+ * declaration (dspack#40) with field as its own donating boundary.
188
+ */
189
+ export const SHADCN_V3_A0_PLANS = {
190
+ alert: {
191
+ a2ui: "Alert",
192
+ dspackId: "alert",
193
+ commons: ["ComponentCommon"],
194
+ structural: {
195
+ title: {
196
+ schema: { type: "string" },
197
+ description: "The one-line heading naming what happened.",
198
+ synthNote: "Lifted from the alert-title sub (5/5 worked examples carry it there).",
199
+ },
200
+ description: {
201
+ schema: { type: "string" },
202
+ description: "Supporting detail under the title.",
203
+ synthNote: "Lifted from the alert-description sub.",
204
+ },
205
+ },
206
+ propMap: {
207
+ variant: { a2ui: "variant", kind: "enum", targetEnum: ["default", "destructive"], default: "default" },
208
+ },
209
+ required: ["title"],
210
+ surface: {
211
+ routes: [
212
+ { from: ["sub(alert-title).text"], to: "prop:title" },
213
+ { from: ["sub(alert-description).text"], to: "prop:description" },
214
+ ],
215
+ subs: {
216
+ "alert-action": {
217
+ drop: "an action slot holds component children (a button), and routing a sub's children to a slot is T4's mechanism — dropped WITH RECORD until T4, not approximated (one production instance: ex.import-run-status)",
218
+ },
219
+ },
220
+ },
221
+ },
222
+ avatar: {
223
+ a2ui: "Avatar",
224
+ dspackId: "avatar",
225
+ commons: ["ComponentCommon"],
226
+ structural: {
227
+ fallback: {
228
+ schema: { type: "string" },
229
+ description: "Initials shown while no image is available.",
230
+ synthNote: "Lifted from the avatar-fallback sub's text.",
231
+ },
232
+ },
233
+ propMap: { size: { a2ui: "size", kind: "enum", targetEnum: ["sm", "default", "lg"], default: "default" } },
234
+ required: ["fallback"],
235
+ surface: {
236
+ routes: [{ from: ["sub(avatar-fallback).text"], to: "prop:fallback" }],
237
+ subs: {
238
+ "avatar-image": {
239
+ drop: "the contract declares no src/alt on avatar-image — an empty node carries nothing to project (contract-gap class, cf. dspack#39)",
240
+ },
241
+ "avatar-badge": { drop: "no worked example exercises it; no measured shape to project — revisit with usage evidence" },
242
+ "avatar-group": { drop: "no worked example exercises it; a grouped-avatars shape is repetition to be measured, not guessed" },
243
+ "avatar-group-count": { drop: "no worked example exercises it; belongs to the unmeasured avatar-group shape" },
244
+ },
245
+ },
246
+ },
247
+ "scroll-area": {
248
+ a2ui: "ScrollArea",
249
+ dspackId: "scroll-area",
250
+ commons: ["ComponentCommon"],
251
+ structural: {},
252
+ required: [],
253
+ surface: {
254
+ transparent: true,
255
+ subs: {
256
+ "scroll-area-scrollbar": { drop: "scrollbar chrome: presentation of the scroll container, not content" },
257
+ "scroll-area-thumb": { drop: "the scrollbar's drag indicator: chrome, not content" },
258
+ },
259
+ },
260
+ },
261
+ field: {
262
+ a2ui: "Field",
263
+ dspackId: "field",
264
+ commons: ["ComponentCommon"],
265
+ structural: {},
266
+ required: [],
267
+ surface: {
268
+ transparent: { donate: [{ from: "sub(field-label).text", to: "prop:label" }] },
269
+ subs: {
270
+ "field-content": "transparent",
271
+ "field-title": { asText: "h4" },
272
+ "field-description": { asText: "caption" },
273
+ "field-error": { drop: "validation state is runtime data the declarative surface does not carry (mirrors form-message)" },
274
+ },
275
+ },
276
+ },
277
+ "field-set": {
278
+ a2ui: "FieldSet",
279
+ dspackId: "field-set",
280
+ commons: ["ComponentCommon"],
281
+ structural: {},
282
+ required: [],
283
+ surface: {
284
+ transparent: true,
285
+ subs: { "field-legend": { asText: "h4" } },
286
+ },
287
+ },
288
+ "field-group": {
289
+ a2ui: "FieldGroup",
290
+ dspackId: "field-group",
291
+ commons: ["ComponentCommon"],
292
+ structural: {},
293
+ required: [],
294
+ surface: {
295
+ transparent: true,
296
+ subs: {
297
+ "field-separator": { drop: "a visual section boundary; its optional inline text is presentation of the divider, and no worked example carries one" },
298
+ },
299
+ },
300
+ },
301
+ };
302
+ /**
303
+ * A0 label additions: the five controls that appear as a field's (or
304
+ * form-item's) single control across the worked examples — input already
305
+ * declares `label`; these gain the same structural slot so the T1 donation
306
+ * has a declared destination. Merged onto the scaffolded plans (select's T2
307
+ * plan) by the fixture builder; nothing else on those plans changes.
308
+ */
309
+ export const SHADCN_V3_A0_LABEL_ADDITIONS = {
310
+ switch: {
311
+ description: "The label naming what the switch turns on or off.",
312
+ synthNote: "Sourced by the T1 field-label/form-label donation; 4/4 worked-example switches sit inside a field.",
313
+ },
314
+ checkbox: {
315
+ description: "The label naming what checking the box asserts.",
316
+ synthNote: "Sourced by the T1 form-label donation (ex.expense-report-form's billable field).",
317
+ },
318
+ textarea: {
319
+ description: "The label naming the long-text entry.",
320
+ synthNote: "Sourced by the T1 field-label/form-label donation, exactly as on input.",
321
+ },
322
+ progress: {
323
+ description: "The label naming what is progressing.",
324
+ synthNote: "Sourced by the T1 field-label donation; 2/2 worked-example progress bars sit inside a field.",
325
+ },
326
+ select: {
327
+ description: "The label naming the choice being made.",
328
+ synthNote: "Sourced by the T1 field-label/form-label donation when the select is a field's control (ex.invite-teammates-dialog).",
329
+ },
330
+ };
331
+ /**
332
+ * T4 resolutions: multi-slot compounds, proven by src/t4.test.ts. The new
333
+ * primitive is ONE closed spelling — `sub(x).children -> slot:name` — the
334
+ * region's ordered children emitted as instances, the slot carrying the
335
+ * reference (multi wraps in Column, exactly like T3's joined-children).
336
+ *
337
+ * Measured shapes (contract 3.2.0 worked examples):
338
+ * - dialog/sheet: trigger and close labels are TEXT lifts (the alert-dialog
339
+ * idiom); title/description lift; header dissolves; content minus the
340
+ * claimed regions is the body slot; footer minus close is the footer slot.
341
+ * - popover: same family; its measured body is EMPTY after the header
342
+ * dissolves — the slot stays absent and gate A3 arbitrates. The unused
343
+ * popover-anchor drops pending usage evidence.
344
+ * - dropdown-menu is DATA-shaped, not slot-shaped: its items are a T2
345
+ * item-mode collect and its labels are scalar text routes — resolved with
346
+ * ZERO new primitive. The historic taxonomy called it T4; measurement
347
+ * says otherwise, and the plan follows the measurement.
348
+ */
349
+ export const SHADCN_V3_T4_PLANS = {
350
+ dialog: {
351
+ a2ui: "Dialog",
352
+ dspackId: "dialog",
353
+ commons: ["ComponentCommon"],
354
+ structural: {
355
+ title: { schema: { type: "string" }, description: "The dialog's title (aria-labelledby).", synthNote: "Lifted from dialog-title." },
356
+ description: { schema: { type: "string" }, description: "Supporting context under the title.", synthNote: "Lifted from dialog-description." },
357
+ triggerLabel: { schema: { type: "string" }, description: "Label of the control that opens the dialog.", synthNote: "Lifted from the trigger's button label (the alert-dialog idiom)." },
358
+ closeLabel: { schema: { type: "string" }, description: "Label of the explicit close control.", synthNote: "Lifted from dialog-close." },
359
+ child: { schema: { $ref: "#/$defs/ComponentId" }, description: "The dialog body: content minus the claimed regions, Column-wrapped when several.", synthNote: "T4 slot route from dialog-content's children." },
360
+ footer: { schema: { $ref: "#/$defs/ComponentId" }, description: "The action row minus the close control.", synthNote: "T4 slot route from dialog-footer's children." },
361
+ },
362
+ required: ["title"],
363
+ surface: {
364
+ routes: [
365
+ { from: ["sub(dialog-title).text"], to: "prop:title" },
366
+ { from: ["sub(dialog-description).text"], to: "prop:description" },
367
+ { from: ["sub(dialog-trigger).label", "sub(dialog-trigger).firstText"], to: "prop:triggerLabel" },
368
+ { from: ["sub(dialog-close).text"], to: "prop:closeLabel" },
369
+ { from: ["sub(dialog-content).children"], to: "slot:child" },
370
+ { from: ["sub(dialog-footer).children"], to: "slot:footer" },
371
+ ],
372
+ subs: { "dialog-header": "transparent" },
373
+ },
374
+ },
375
+ sheet: {
376
+ a2ui: "Sheet",
377
+ dspackId: "sheet",
378
+ commons: ["ComponentCommon"],
379
+ structural: {
380
+ title: { schema: { type: "string" }, description: "The panel's title.", synthNote: "Lifted from sheet-title." },
381
+ description: { schema: { type: "string" }, description: "Supporting copy beneath the title.", synthNote: "Lifted from sheet-description." },
382
+ triggerLabel: { schema: { type: "string" }, description: "Label of the control that opens the sheet.", synthNote: "Lifted from the trigger's button label." },
383
+ closeLabel: { schema: { type: "string" }, description: "Label of the explicit close control.", synthNote: "Lifted from sheet-close." },
384
+ child: { schema: { $ref: "#/$defs/ComponentId" }, description: "The panel body: content minus the claimed regions, Column-wrapped when several.", synthNote: "T4 slot route from sheet-content's children." },
385
+ footer: { schema: { $ref: "#/$defs/ComponentId" }, description: "The action row minus the close control.", synthNote: "T4 slot route from sheet-footer's children." },
386
+ },
387
+ required: ["title"],
388
+ surface: {
389
+ routes: [
390
+ { from: ["sub(sheet-title).text"], to: "prop:title" },
391
+ { from: ["sub(sheet-description).text"], to: "prop:description" },
392
+ { from: ["sub(sheet-trigger).label", "sub(sheet-trigger).firstText"], to: "prop:triggerLabel" },
393
+ { from: ["sub(sheet-close).text"], to: "prop:closeLabel" },
394
+ { from: ["sub(sheet-content).children"], to: "slot:child" },
395
+ { from: ["sub(sheet-footer).children"], to: "slot:footer" },
396
+ ],
397
+ subs: { "sheet-header": "transparent" },
398
+ },
399
+ },
400
+ popover: {
401
+ a2ui: "Popover",
402
+ dspackId: "popover",
403
+ commons: ["ComponentCommon"],
404
+ structural: {
405
+ title: { schema: { type: "string" }, description: "The panel's visible title.", synthNote: "Lifted from popover-title." },
406
+ description: { schema: { type: "string" }, description: "Supporting copy beneath the title.", synthNote: "Lifted from popover-description." },
407
+ triggerLabel: { schema: { type: "string" }, description: "Label of the control that toggles the popover.", synthNote: "Lifted from the trigger's button label." },
408
+ child: { schema: { $ref: "#/$defs/ComponentId" }, description: "The panel body beyond title and description; absent when the measured body is empty.", synthNote: "T4 slot route from popover-content's children; the worked example's body is empty after the header dissolves." },
409
+ },
410
+ required: ["triggerLabel"],
411
+ surface: {
412
+ routes: [
413
+ { from: ["sub(popover-title).text"], to: "prop:title" },
414
+ { from: ["sub(popover-description).text"], to: "prop:description" },
415
+ { from: ["sub(popover-trigger).label", "sub(popover-trigger).firstText"], to: "prop:triggerLabel" },
416
+ { from: ["sub(popover-content).children"], to: "slot:child" },
417
+ ],
418
+ subs: {
419
+ "popover-header": "transparent",
420
+ "popover-anchor": { drop: "no worked example exercises it; an alternative positioning reference is presentation until measured" },
421
+ },
422
+ },
423
+ },
424
+ "dropdown-menu": {
425
+ a2ui: "DropdownMenu",
426
+ dspackId: "dropdown-menu",
427
+ commons: ["ComponentCommon"],
428
+ structural: {
429
+ triggerLabel: { schema: { type: "string" }, description: "Label of the element that opens the menu.", synthNote: "Lifted from the trigger's button label." },
430
+ menuLabel: { schema: { type: "string" }, description: "The non-interactive heading above the items.", synthNote: "Lifted from dropdown-menu-label." },
431
+ items: {
432
+ schema: { type: "array", items: { type: "object", properties: { label: { type: "string" } }, required: ["label"], additionalProperties: false } },
433
+ description: "The actionable menu items, in order.",
434
+ synthNote: "T2 item-mode collect — the menu is DATA, not slots; measurement overruled the historic T4 classification.",
435
+ },
436
+ },
437
+ required: ["items"],
438
+ surface: {
439
+ routes: [
440
+ { from: ["sub(dropdown-menu-trigger).label", "sub(dropdown-menu-trigger).firstText"], to: "prop:triggerLabel" },
441
+ { from: ["sub(dropdown-menu-label).text"], to: "prop:menuLabel" },
442
+ ],
443
+ collects: [{ of: ["dropdown-menu-item"], into: "prop:items", item: { label: "self.text" } }],
444
+ subs: {
445
+ "dropdown-menu-separator": { drop: "a visual divider between item groups; grouping is not carried by the flat items shape" },
446
+ "dropdown-menu-group": { drop: "grouping chrome; no worked example gives it meaning beyond adjacency" },
447
+ "dropdown-menu-checkbox-item": { drop: "no worked example exercises it; a toggleable item is a different record shape to measure, not guess" },
448
+ "dropdown-menu-radio-group": { drop: "no worked example exercises it" },
449
+ "dropdown-menu-radio-item": { drop: "no worked example exercises it" },
450
+ "dropdown-menu-sub": { drop: "nested menus are unmeasured; representing them is a decision for evidence, not defaults" },
451
+ "dropdown-menu-sub-trigger": { drop: "belongs to the unmeasured nested-menu shape" },
452
+ "dropdown-menu-sub-content": { drop: "belongs to the unmeasured nested-menu shape" },
453
+ },
454
+ },
455
+ },
456
+ };
@@ -1,5 +1,5 @@
1
1
  import { surfaceModelOf } from "./desugar.js";
2
- import { referencedSubs, unclassifiedSubs } from "./model.js";
2
+ import { describeDestination, referencedSubs, unclassifiedSubs } from "./model.js";
3
3
  export class ProfileContractError extends Error {
4
4
  issues;
5
5
  constructor(issues) {
@@ -57,11 +57,16 @@ export function validateProfileAgainstContract(profile, doc) {
57
57
  const declaredSubs = (component.composition?.subComponents ?? []).map((s) => s.id);
58
58
  const declaredProps = new Set(Object.keys(component.props ?? {}));
59
59
  const model = surfaceModelOf(plan);
60
+ // A referenced name resolves against the compound's declared subs OR the
61
+ // contract's top-level components — a T3 join may pair a sub-family with
62
+ // a component family (the production radio-group joins its items to
63
+ // sibling `label` COMPONENTS via htmlFor), and surfaces carry both kinds
64
+ // of node identically.
60
65
  for (const sub of namedSubs(model)) {
61
- if (!declaredSubs.includes(sub)) {
66
+ if (!declaredSubs.includes(sub) && !(sub in components)) {
62
67
  issues.push({
63
68
  path: at,
64
- message: `'${sub}' is not a declared sub-component of '${plan.dspackId}' in this contract (declared: ${declaredSubs.length ? declaredSubs.join(", ") : "none"})`,
69
+ message: `'${sub}' is neither a declared sub-component of '${plan.dspackId}' nor a component of this contract (declared subs: ${declaredSubs.length ? declaredSubs.join(", ") : "none"})`,
65
70
  });
66
71
  }
67
72
  }
@@ -95,6 +100,37 @@ export function validateProfileAgainstContract(profile, doc) {
95
100
  }
96
101
  }
97
102
  }
103
+ // T1 donations: every donated destination must be declared by at least one
104
+ // mapped, NON-transparent plan — otherwise no surface could ever satisfy
105
+ // the exactly-one-eligible-control rule and every use would refuse at emit.
106
+ // Checked profile-wide (the eligible control is chosen per surface).
107
+ const receiverProps = new Set();
108
+ for (const plan of [...profile.components, ...profile.synthesized]) {
109
+ const m = surfaceModelOf(plan);
110
+ if (m.transparent)
111
+ continue;
112
+ for (const k of Object.keys(plan.structural ?? {}))
113
+ receiverProps.add(k);
114
+ for (const p of Object.values(plan.propMap ?? {}))
115
+ receiverProps.add(p.a2ui);
116
+ }
117
+ for (const [collection, plans] of collections) {
118
+ for (const [i, plan] of plans.entries()) {
119
+ const m = surfaceModelOf(plan);
120
+ const donations = [
121
+ ...m.transparentDonate.map((d) => ({ d, at: `/${collection}/${i}/surface/transparent/donate` })),
122
+ ...Object.values(m.subIdentity).flatMap((id) => id.kind === "transparent" && id.donate ? id.donate.map((d) => ({ d, at: `/${collection}/${i}/surface/subs` })) : []),
123
+ ];
124
+ for (const { d, at } of donations) {
125
+ if (!receiverProps.has(d.to.name)) {
126
+ issues.push({
127
+ path: at,
128
+ message: `donation writes ${describeDestination(d.to)}, but no mapped non-transparent plan declares '${d.to.name}' — no surface could ever satisfy it`,
129
+ });
130
+ }
131
+ }
132
+ }
133
+ }
98
134
  if (issues.length > 0)
99
135
  throw new ProfileContractError(issues);
100
136
  }
package/dist/types.d.ts CHANGED
@@ -99,7 +99,11 @@ export interface SurfaceFidelityEntry {
99
99
  /** The profile rule that caused it (route/collect origin, propMap key, or synthesis). */
100
100
  origin: string;
101
101
  /** What happened to the content. */
102
- kind: "projected" | "moved" | "lifted" | "flattened" | "synthesized" | "wrapped" | "dropped" | "deduplicated";
102
+ kind: "projected" | "moved" | "lifted" | "flattened" | "synthesized" | "wrapped" | "dropped" | "deduplicated"
103
+ /** T1: a value harvested in a dissolving boundary, written onto its single eligible control. */
104
+ | "donated"
105
+ /** T3: a counterpart's data merged into a collected record via a declared key join. */
106
+ | "joined";
103
107
  class: FidelityClass;
104
108
  note?: string;
105
109
  }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://rdombrowski.dev/meta/a2ui-catalog.v0_9_1.json",
4
+ "title": "A2UI catalog shape (v0.9.1)",
5
+ "description": "Structural invariants an A2UI v0.9.1 catalog must satisfy, derived from the checked-in basic catalog fixture. The version-distinguishing requirement is $defs.theme (with primaryColor).",
6
+ "type": "object",
7
+ "required": ["$schema", "$id", "catalogId", "title", "description", "components", "$defs"],
8
+ "properties": {
9
+ "catalogId": { "type": "string", "format": "uri" },
10
+ "$id": { "type": "string", "format": "uri" },
11
+ "components": {
12
+ "type": "object",
13
+ "minProperties": 1,
14
+ "additionalProperties": {
15
+ "type": "object",
16
+ "required": ["allOf", "unevaluatedProperties"],
17
+ "properties": {
18
+ "allOf": { "type": "array", "minItems": 1 },
19
+ "unevaluatedProperties": { "const": false }
20
+ }
21
+ }
22
+ },
23
+ "$defs": {
24
+ "type": "object",
25
+ "required": ["anyComponent", "theme"],
26
+ "not": { "required": ["surfaceProperties"] },
27
+ "properties": {
28
+ "anyComponent": { "type": "object", "required": ["oneOf"] },
29
+ "theme": {
30
+ "type": "object",
31
+ "required": ["properties"],
32
+ "properties": {
33
+ "properties": { "type": "object", "required": ["primaryColor"] }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://rdombrowski.dev/meta/a2ui-catalog.v1_0.json",
4
+ "title": "A2UI catalog shape (v1.0)",
5
+ "description": "Structural invariants an A2UI v1.0 catalog must satisfy, derived from the checked-in basic catalog fixture. The version-distinguishing requirement is $defs.surfaceProperties (and the absence of $defs.theme).",
6
+ "type": "object",
7
+ "required": ["$schema", "$id", "catalogId", "title", "description", "components", "$defs"],
8
+ "properties": {
9
+ "catalogId": { "type": "string", "format": "uri" },
10
+ "$id": { "type": "string", "format": "uri" },
11
+ "instructions": { "type": "string" },
12
+ "components": {
13
+ "type": "object",
14
+ "minProperties": 1,
15
+ "additionalProperties": {
16
+ "type": "object",
17
+ "required": ["allOf", "unevaluatedProperties"],
18
+ "properties": {
19
+ "allOf": { "type": "array", "minItems": 1 },
20
+ "unevaluatedProperties": { "const": false }
21
+ }
22
+ }
23
+ },
24
+ "$defs": {
25
+ "type": "object",
26
+ "required": ["anyComponent", "surfaceProperties"],
27
+ "not": { "required": ["theme"] },
28
+ "properties": {
29
+ "anyComponent": { "type": "object", "required": ["oneOf"] },
30
+ "surfaceProperties": { "type": "object", "required": ["properties"] }
31
+ }
32
+ }
33
+ }
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aestheticfunction/dspack-emit",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "description": "dspack emitters: compile a dspack design-system contract and dspack surfaces into protocol targets \u2014 an A2UI catalog + surface messages (gates A1-A3) and json-render catalog/registry modules + specs (gates J1-J3).",
6
6
  "license": "Apache-2.0",