@texuli/spec 0.6.0 → 0.8.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.
@@ -34,10 +34,15 @@ export interface BlueprintProvenanceEntry {
34
34
  kind: 'apply' | 'undo' | 'redo';
35
35
  ops: readonly BlueprintEditOp[];
36
36
  }
37
- /** One edit op. The fields each op kind takes are checked by the edit parser. */
37
+ /**
38
+ * One edit op. The fields each op kind takes are checked by the edit parser. From spec 0.7.0,
39
+ * patchDocument applies a bounded RFC 6902 patch to the doc of a document node it addresses by path
40
+ * or by key.
41
+ */
38
42
  export interface BlueprintEditOp {
39
- op: 'insert' | 'remove' | 'move' | 'setProp' | 'unsetProp' | 'replace' | 'replaceAll';
43
+ op: 'insert' | 'remove' | 'move' | 'setProp' | 'unsetProp' | 'replace' | 'replaceAll' | 'patchDocument';
40
44
  path?: BlueprintNodePath;
45
+ key?: BlueprintNodeKey;
41
46
  parent?: BlueprintNodePath;
42
47
  index?: number;
43
48
  name?: string;
@@ -45,13 +50,15 @@ export interface BlueprintEditOp {
45
50
  value?: unknown;
46
51
  node?: BlueprintNode;
47
52
  tree?: BlueprintNode;
53
+ patch?: BlueprintDocumentPatch;
48
54
  }
49
55
  export type BlueprintNodePath = readonly number[];
50
56
  /**
51
- * One catalog node: id, props, children (each with an optional named slot), when, bind, on and
52
- * motion.
57
+ * One catalog node: an optional key (spec 0.7.0), id, props, children (each with an optional named
58
+ * slot), when, bind, on and motion.
53
59
  */
54
60
  export interface BlueprintNode {
61
+ key?: BlueprintNodeKey;
55
62
  /** A catalog component id. */
56
63
  id: string;
57
64
  /** Props checked against the component's catalog entry. */
@@ -104,6 +111,175 @@ export interface BlueprintNumberFormula {
104
111
  ifTrue?: BlueprintNumberFormula;
105
112
  ifFalse?: BlueprintNumberFormula;
106
113
  }
114
+ /**
115
+ * The closed expression AST of @texuli/core/expression (spec 0.8.0, ADR-015): the numberFormula and
116
+ * condition shapes extended with strings, booleans, null, field references and calls to a closed
117
+ * function table (len, lower, upper, trim, contains, startsWith, endsWith, isEmpty, coalesce,
118
+ * includes, count, sum, abs, floor, ceil, number, today, date, isDate, daysBetween, addDays, year,
119
+ * month, day). Structural shape only: which members each op needs, the function table and arity, at
120
+ * most 1,000 nodes and depth 32 are checked by the runtime parser; ref and range are reserved for
121
+ * dialects (sheets) and refused in forms. Never code, never a regular expression.
122
+ */
123
+ export interface BlueprintExpression {
124
+ op: 'num' | 'str' | 'bool' | 'null' | 'var' | 'field' | 'ref' | 'range' | 'add' | 'sub' | 'mul' | 'div' | 'mod' | 'pow' | 'neg' | 'lt' | 'lte' | 'gt' | 'gte' | 'eq' | 'neq' | 'and' | 'or' | 'not' | 'if' | 'min' | 'max' | 'concat' | 'round' | 'clamp' | 'call';
125
+ /**
126
+ * A literal for num (number), str (string, at most 32,768 characters) and bool; an expression for
127
+ * neg, not, round and clamp.
128
+ */
129
+ value?: unknown;
130
+ /** The field (or var) a reference reads. */
131
+ name?: string;
132
+ /** A dialect reference (sheets); refused in forms. */
133
+ ref?: string;
134
+ from?: string;
135
+ to?: string;
136
+ left?: BlueprintExpression;
137
+ right?: BlueprintExpression;
138
+ base?: BlueprintExpression;
139
+ exponent?: BlueprintExpression;
140
+ /** Operands of and, or, min, max, concat and call (at most 64). */
141
+ args?: readonly BlueprintExpression[];
142
+ digits?: number;
143
+ min?: BlueprintExpression;
144
+ max?: BlueprintExpression;
145
+ test?: BlueprintExpression;
146
+ ifTrue?: BlueprintExpression;
147
+ ifFalse?: BlueprintExpression;
148
+ /** A function of the closed table. */
149
+ fn?: string;
150
+ }
151
+ /** One choice of a select, radio or multiselect field. */
152
+ export interface BlueprintFormOption {
153
+ value: string;
154
+ label: string;
155
+ description?: string;
156
+ }
157
+ /**
158
+ * Conditions on a field as expressions over earlier fields: shown while show holds, required while
159
+ * require holds, editable while enable holds. Hidden and disabled fields are not validated or
160
+ * submitted; only true holds (unknown does not).
161
+ */
162
+ export interface BlueprintFormWhen {
163
+ show?: BlueprintExpression;
164
+ require?: BlueprintExpression;
165
+ enable?: BlueprintExpression;
166
+ }
167
+ /** When a step or section shows: an expression over earlier fields. */
168
+ export interface BlueprintFormVisibility {
169
+ show?: BlueprintExpression;
170
+ }
171
+ /** A help link under a field; href passes the URL policy at the host's tier. */
172
+ export interface BlueprintFormLink {
173
+ label: string;
174
+ href: string;
175
+ }
176
+ /** Plain-text messages that replace the defaults per rule ({label}, {min}, {max} are filled in). */
177
+ export interface BlueprintFormMessages {
178
+ required?: string;
179
+ minLength?: string;
180
+ maxLength?: string;
181
+ min?: string;
182
+ max?: string;
183
+ step?: string;
184
+ format?: string;
185
+ minItems?: string;
186
+ maxItems?: string;
187
+ option?: string;
188
+ fileType?: string;
189
+ fileSize?: string;
190
+ }
191
+ /**
192
+ * One field of a closed type. Which members apply to which type, value types, option membership,
193
+ * ranges and the conditions' field references are checked by @texuli/forms/model
194
+ * (validateFormSchema). Formats are names; a pattern is never accepted.
195
+ */
196
+ export interface BlueprintFormField {
197
+ /** The key in the submitted values, unique in the form. */
198
+ name: string;
199
+ type: 'text' | 'textarea' | 'number' | 'email' | 'url' | 'date' | 'time' | 'select' | 'multiselect' | 'checkbox' | 'radio' | 'switch' | 'slider' | 'file' | 'tags';
200
+ label: string;
201
+ description?: string;
202
+ placeholder?: string;
203
+ /**
204
+ * A value of the field's type (a string, number, boolean, YYYY-MM-DD, HH:MM or a list of option
205
+ * values). Not for file fields.
206
+ */
207
+ default?: unknown;
208
+ options?: readonly BlueprintFormOption[];
209
+ required?: boolean;
210
+ when?: BlueprintFormWhen;
211
+ minLength?: number;
212
+ maxLength?: number;
213
+ /** A number for number and slider; YYYY-MM-DD for date; HH:MM for time. */
214
+ min?: unknown;
215
+ /** A number for number and slider; YYYY-MM-DD for date; HH:MM for time. */
216
+ max?: unknown;
217
+ /** Above 0, for number and slider. */
218
+ step?: number;
219
+ minItems?: number;
220
+ maxItems?: number;
221
+ /** A named format, checked by owned linear-time code. */
222
+ format?: 'email' | 'url' | 'phone' | 'postal-code' | 'postal-code-us' | 'postal-code-ca' | 'postal-code-uk' | 'postal-code-de' | 'postal-code-fr' | 'postal-code-es' | 'postal-code-mx' | 'postal-code-br' | 'postal-code-co' | 'postal-code-in' | 'postal-code-jp' | 'postal-code-au' | 'digits' | 'alphanumeric' | 'slug' | 'iso-date' | 'time' | 'hex-color';
223
+ /**
224
+ * The name of a validator the host registered (sync or async); an unregistered name fails closed.
225
+ */
226
+ validator?: string;
227
+ messages?: BlueprintFormMessages;
228
+ rows?: number;
229
+ /** File types: MIME types (image/png, image/*) or extensions (.pdf). */
230
+ accept?: readonly string[];
231
+ /** Largest accepted file in bytes; the host uploads files. */
232
+ maxSize?: number;
233
+ /** An autocomplete token; payment, credential and one-time-code tokens are absent. */
234
+ autocomplete?: 'off' | 'name' | 'given-name' | 'family-name' | 'nickname' | 'email' | 'tel' | 'organization' | 'organization-title' | 'street-address' | 'address-level1' | 'address-level2' | 'postal-code' | 'country-name' | 'language' | 'url' | 'bday';
235
+ link?: BlueprintFormLink;
236
+ }
237
+ /** A group of fields (a fieldset when titled). */
238
+ export interface BlueprintFormSection {
239
+ id: string;
240
+ title?: string;
241
+ description?: string;
242
+ when?: BlueprintFormVisibility;
243
+ fields: readonly BlueprintFormField[];
244
+ }
245
+ /**
246
+ * One step of a multi-step form: exactly one of fields or sections; validated before the next step
247
+ * opens.
248
+ */
249
+ export interface BlueprintFormStep {
250
+ id: string;
251
+ title: string;
252
+ description?: string;
253
+ when?: BlueprintFormVisibility;
254
+ fields?: readonly BlueprintFormField[];
255
+ sections?: readonly BlueprintFormSection[];
256
+ }
257
+ /**
258
+ * A cross-field rule: fails when test is false (unknown passes); the message attaches to field, or
259
+ * to the form.
260
+ */
261
+ export interface BlueprintFormRule {
262
+ id: string;
263
+ test: BlueprintExpression;
264
+ message: string;
265
+ field?: string;
266
+ }
267
+ /**
268
+ * A form as data (spec 0.8.0, ADR-015), the schema prop of a schema-form node: a title and exactly
269
+ * one of fields (one page), sections or steps (a multi-step flow), plus cross-field rules. At most
270
+ * 200 fields, 50 sections, 20 steps and 50 rules. Checked again by @texuli/forms/model at the
271
+ * host's tier (validateDraft): closed members per type, unique names, options, ranges, named
272
+ * formats, link URLs, and conditions that read earlier fields only.
273
+ */
274
+ export interface BlueprintFormSchema {
275
+ title: string;
276
+ description?: string;
277
+ submitLabel?: string;
278
+ fields?: readonly BlueprintFormField[];
279
+ sections?: readonly BlueprintFormSection[];
280
+ steps?: readonly BlueprintFormStep[];
281
+ rules?: readonly BlueprintFormRule[];
282
+ }
107
283
  /** A local state variable name. */
108
284
  export type BlueprintStateName = string;
109
285
  /** A host data source name, such as tickets.open. */
@@ -114,6 +290,11 @@ export type BlueprintFlowName = string;
114
290
  export type BlueprintIntentName = string;
115
291
  /** The id of one item in a list variable. */
116
292
  export type BlueprintItemKey = string;
293
+ /**
294
+ * A node's stable instance id (spec 0.7.0, ADR-012 and ADR-014): unique in its tree. Streaming,
295
+ * live updates and edit ops address a node by its key, else by its path.
296
+ */
297
+ export type BlueprintNodeKey = string;
117
298
  /** A reorder group name. */
118
299
  export type BlueprintGroupName = string;
119
300
  /**
@@ -224,12 +405,165 @@ export interface BlueprintNodeMotion {
224
405
  export interface BlueprintEnvelopeMotion {
225
406
  level: BlueprintMotionLevel;
226
407
  }
408
+ /**
409
+ * A Texuli document (spec 0.7.0, ADR-011): the format, version, metadata, page settings, block list
410
+ * and annotations of @texuli/document. This contract checks the envelope of the document only; the
411
+ * closed block vocabulary, text safety, the URL policy and the caps are checked by
412
+ * @texuli/document/schema (schemas/document.schema.json) inside the runtime validator,
413
+ * @texuli/catalog's validateDraft, at the host's tier.
414
+ */
415
+ export interface BlueprintDocument {
416
+ format: 'texuli-document';
417
+ formatVersion: 1;
418
+ /** Title (required), description, locale, direction, authors, tags and dates. */
419
+ meta: Readonly<Record<string, unknown>>;
420
+ /** Page size, orientation, margins, header and footer for paged output. */
421
+ page?: Readonly<Record<string, unknown>>;
422
+ /**
423
+ * The block list: paragraph, heading, code, list, quote, divider, media, callout, toggle,
424
+ * columns, page-link, block (a @texuli/blocks block) and embed (a one-node catalog component, a
425
+ * deck, a sheet or a canvas).
426
+ */
427
+ blocks: readonly Readonly<Record<string, unknown>>[];
428
+ /** Comment threads, suggestions and named versions, kept apart from content. */
429
+ annotations?: Readonly<Record<string, unknown>>;
430
+ }
431
+ /**
432
+ * One RFC 6902 operation on a document. Paths are RFC 6901 pointers into the document;
433
+ * @texuli/document/ops refuses prototype paths and malformed escapes, applies the patch all or none
434
+ * and validates the result.
435
+ */
436
+ export interface BlueprintDocumentPatchOperation {
437
+ op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
438
+ path: string;
439
+ from?: string;
440
+ /** Any plain JSON value (add, replace and test). */
441
+ value?: unknown;
442
+ }
443
+ /** A bounded RFC 6902 patch (ADR-011): at most 1,000 operations; test operations are encouraged. */
444
+ export type BlueprintDocumentPatch = readonly BlueprintDocumentPatchOperation[];
445
+ /**
446
+ * A Texuli canvas (spec 0.8.0, ADR-012): the format, version, metadata, grid, shapes and connectors
447
+ * of @texuli/canvas. This contract checks the envelope of the canvas only; the closed shape
448
+ * vocabulary and palette, text safety, the URL policy and the caps are checked by
449
+ * @texuli/canvas/model (schemas/canvas.schema.json) inside the runtime validator, @texuli/catalog's
450
+ * validateDraft, at the host's tier (the host supplies checkCanvas).
451
+ */
452
+ export interface BlueprintCanvas {
453
+ format: 'texuli-canvas';
454
+ formatVersion: 1;
455
+ /** Title, locale and description. */
456
+ meta?: Readonly<Record<string, unknown>>;
457
+ /** The snap grid in world units. */
458
+ grid?: number;
459
+ /**
460
+ * The shapes, bottom to top: rect, ellipse, diamond, line, arrow, path, text, sticky, image (a
461
+ * host ref and alt text), frame and group (which hold shapes).
462
+ */
463
+ shapes: readonly Readonly<Record<string, unknown>>[];
464
+ /**
465
+ * Connectors between shapes or points, routed straight, elbow or curved, with optional caps and a
466
+ * label.
467
+ */
468
+ connectors: readonly Readonly<Record<string, unknown>>[];
469
+ }
470
+ /**
471
+ * A Texuli sheet, the sheet prop of a spreadsheet node (spec 0.8.0, ADR-012 and ADR-015): the
472
+ * format, version, metadata and tabs of @texuli/sheets. This contract checks the envelope of the
473
+ * sheet only (format, version, members, at most 16 tabs, each with an id, a name, a row and column
474
+ * count within the caps, and cells keyed by A1 address); the cell inputs, the formula grammar and
475
+ * its closed function set, text safety and the cell cap are checked by @texuli/sheets/model
476
+ * (validateSheet) inside the runtime validator, @texuli/catalog's validateDraft (the host supplies
477
+ * checkSheet).
478
+ */
479
+ export interface BlueprintSheet {
480
+ format: 'texuli-sheet';
481
+ formatVersion: 1;
482
+ /** The title. */
483
+ meta?: Readonly<Record<string, unknown>>;
484
+ /**
485
+ * The tabs, in order: { id, name, rows (1 to 10,000), columns (1 to 256), cells } where cells
486
+ * maps A1 addresses to a number, a boolean, text or formula text that starts with =.
487
+ */
488
+ sheets: readonly BlueprintSheetTab[];
489
+ }
490
+ /**
491
+ * One tab of a sheet: a stable id, the name formulas use, the row and column counts, and the cell
492
+ * inputs by A1 address.
493
+ */
494
+ export interface BlueprintSheetTab {
495
+ id: string;
496
+ name: string;
497
+ rows: number;
498
+ columns: number;
499
+ cells?: Readonly<Record<string, unknown>>;
500
+ }
501
+ /**
502
+ * A data source the host registered (spec 0.8.0, ADR-015): an opaque name, never a URL. Checked
503
+ * against the host's registry; with no registry a binding is refused.
504
+ */
505
+ export type BlueprintSourceName = string;
506
+ /** A field the source declares. */
507
+ export type BlueprintSourceFieldName = string;
508
+ /**
509
+ * The @texuli/data grid filter model: a condition ({type: condition, field, operator, value}) or an
510
+ * and/or group ({type: group, op, children}). At most 6 levels and 64 nodes. Which members each
511
+ * type takes, the operators each field allows and the value types are checked by the validator
512
+ * against the source's declaration.
513
+ */
514
+ export interface BlueprintSourceFilter {
515
+ type: 'condition' | 'group';
516
+ field?: BlueprintSourceFieldName;
517
+ operator?: 'eq' | 'neq' | 'contains' | 'in' | 'between' | 'before' | 'after' | 'isEmpty' | 'isNotEmpty';
518
+ /**
519
+ * A string, number, boolean or null; a list of them for in (at most 100) and between (exactly 2).
520
+ * Data, never code.
521
+ */
522
+ value?: unknown;
523
+ op?: 'and' | 'or';
524
+ children?: readonly BlueprintSourceFilter[];
525
+ }
526
+ /** One sort key on a sortable field. */
527
+ export interface BlueprintSourceSort {
528
+ field: BlueprintSourceFieldName;
529
+ direction?: 'asc' | 'desc';
530
+ }
531
+ /**
532
+ * The closed query a data-source binding sends (ADR-015): projection, a filter, sort keys, search
533
+ * text and a page size. The host adapter receives it validated and decides how to run it; Texuli
534
+ * never builds URLs, SQL or code from it.
535
+ */
536
+ export interface BlueprintSourceQuery {
537
+ fields?: readonly BlueprintSourceFieldName[];
538
+ filter?: BlueprintSourceFilter;
539
+ sort?: readonly BlueprintSourceSort[];
540
+ search?: string;
541
+ pageSize?: number;
542
+ }
543
+ /**
544
+ * Reads a whole sourceable prop from a host data source (spec 0.8.0, ADR-015): {"$source": name,
545
+ * "query": {...}, "map": {itemField: sourceField}}. The player loads the rows through the host's
546
+ * registry; map renames source fields to the component's item fields (at most 16 entries).
547
+ */
548
+ export interface BlueprintSourceBinding {
549
+ $source: BlueprintSourceName;
550
+ query?: BlueprintSourceQuery;
551
+ map?: Readonly<Record<string, BlueprintSourceFieldName>>;
552
+ }
227
553
  /**
228
554
  * Envelope version 1 around one catalog tree (ADR-004, audit G13). Mirrors what
229
555
  * @texuli/catalog/envelope reads; a declared status, activation or tier is display data, never
230
556
  * authority. Spec 0.4.0 (ADR-008 + PLAN_008 deck encoding) adds an optional spec version, local
231
557
  * state and a flow; spec 0.6.0 (ADR-012, ADR-013) adds the closed motion vocabulary: a node motion
232
- * and the envelope motion level. Planned minor additions: the native profile and several roots.
558
+ * and the envelope motion level; spec 0.7.0 (ADR-011, ADR-012, ADR-014) adds an optional node key
559
+ * (a stable instance id, unique in the tree), the document shape a `document` node carries and the
560
+ * patchDocument edit op with its bounded RFC 6902 patch. Spec 0.8.0 (ADR-012, ADR-015) adds
561
+ * data-source bindings: a sourceable prop may read rows from a source the host registered
562
+ * ({"$source": name, "query": {...}}), with a closed query, and forms as data: the closed form
563
+ * schema a `schema-form` node carries ($defs.formSchema) with conditions and cross-field rules in
564
+ * the closed expression AST of @texuli/core/expression ($defs.expression). Spec 0.8.0 (ADR-012)
565
+ * adds the canvas shape a `canvas` node carries ($defs.canvas). Planned minor additions: the native
566
+ * profile and several roots.
233
567
  */
234
568
  export interface BlueprintEnvelope {
235
569
  format: 'texuli-blueprint';
@@ -253,7 +587,7 @@ export interface BlueprintEnvelope {
253
587
  /**
254
588
  * The spec version the envelope was written for. Omitted means 0.2.0; migrateBlueprint stamps it.
255
589
  */
256
- spec?: '0.3.0' | '0.4.0' | '0.5.0' | '0.6.0';
590
+ spec?: '0.3.0' | '0.4.0' | '0.5.0' | '0.6.0' | '0.7.0' | '0.8.0';
257
591
  /**
258
592
  * Local state declarations (ADR-008), at most 64. Names, counts and per-type rules are checked by
259
593
  * the validator.
@@ -1,3 +1,3 @@
1
1
  // Generated by @texuli/spec from schemas/blueprint.schema.json. Do not edit: run the spec generator.
2
- // Spec 0.6.0, digest 37141b85b9ab9f02af849a62a9c97ba729d6c5c2705130290bcdf45b308ea4cc
2
+ // Spec 0.8.0, digest f6b6388280d247eb9c3106a925111f35b90d1ec3b59c23652542f06a9f103daf
3
3
  export {};
@@ -14,6 +14,11 @@ export interface SpecComponent {
14
14
  events?: readonly SpecEventName[];
15
15
  /** Props a node may two-way bind (node bind). */
16
16
  bindable?: readonly string[];
17
+ /**
18
+ * Props a node may read from a host data source (spec 0.8.0, ADR-015): {"$source": name, "query":
19
+ * {...}}. Each names an array prop whose items are rows.
20
+ */
21
+ sourceable?: readonly string[];
17
22
  deprecated?: SpecDeprecation;
18
23
  }
19
24
  export interface SpecProp {
@@ -1,3 +1,3 @@
1
1
  // Generated by @texuli/spec from schemas/catalog.schema.json. Do not edit: run the spec generator.
2
- // Spec 0.6.0, digest 37141b85b9ab9f02af849a62a9c97ba729d6c5c2705130290bcdf45b308ea4cc
2
+ // Spec 0.8.0, digest f6b6388280d247eb9c3106a925111f35b90d1ec3b59c23652542f06a9f103daf
3
3
  export {};
@@ -4,7 +4,7 @@ export interface SpecDiagnostic {
4
4
  message: string;
5
5
  id?: string;
6
6
  }
7
- export type SpecDiagnosticCode = 'schema' | 'unknown-id' | 'unknown-prop' | 'prop-type' | 'enum-value' | 'missing-required' | 'extension-prop' | 'catalog-mismatch' | 'unsupported-profile' | 'unknown-slot' | 'state' | 'unknown-state' | 'binding' | 'action' | 'unknown-event' | 'workflow';
7
+ export type SpecDiagnosticCode = 'schema' | 'unknown-id' | 'unknown-prop' | 'prop-type' | 'enum-value' | 'missing-required' | 'extension-prop' | 'catalog-mismatch' | 'unsupported-profile' | 'unknown-slot' | 'state' | 'unknown-state' | 'binding' | 'action' | 'unknown-event' | 'workflow' | 'duplicate-key' | 'source' | 'unknown-source';
8
8
  export interface SpecWarning {
9
9
  code: SpecWarningCode;
10
10
  path: string;
@@ -1,3 +1,3 @@
1
1
  // Generated by @texuli/spec from schemas/diagnostics.schema.json. Do not edit: run the spec generator.
2
- // Spec 0.6.0, digest 37141b85b9ab9f02af849a62a9c97ba729d6c5c2705130290bcdf45b308ea4cc
2
+ // Spec 0.8.0, digest f6b6388280d247eb9c3106a925111f35b90d1ec3b59c23652542f06a9f103daf
3
3
  export {};
@@ -1,3 +1,3 @@
1
1
  // Generated by @texuli/spec from schemas/manifest.schema.json. Do not edit: run the spec generator.
2
- // Spec 0.6.0, digest 37141b85b9ab9f02af849a62a9c97ba729d6c5c2705130290bcdf45b308ea4cc
2
+ // Spec 0.8.0, digest f6b6388280d247eb9c3106a925111f35b90d1ec3b59c23652542f06a9f103daf
3
3
  export {};
@@ -1,7 +1,7 @@
1
1
  /** The built catalog this vocabulary was projected from. */
2
- export declare const SPEC_CATALOG_HASH = "4ac7ecedd1c59d1999a9f7eea2f523c7653fececb97258a478f09253f6b6057f";
2
+ export declare const SPEC_CATALOG_HASH = "598075e391ed95dcba46e120d2fbb706e8ff67d0d5bdeb3c0741f334f439b264";
3
3
  /** Every closed component id, sorted. */
4
- export declare const SPEC_COMPONENT_IDS: readonly ["action-form", "alert", "alert-dialog", "analytics-grid", "app-nav", "badge", "banner", "blocks-code", "blocks-data", "blocks-diagram", "blocks-embed", "blocks-interactive", "blocks-map", "blocks-media", "blocks-structure", "blocks-text", "breadcrumb", "button", "button-group", "callout", "card", "charts-area", "charts-bar", "charts-bubble", "charts-bullet", "charts-canvas-renderer", "charts-cartesian", "charts-combo", "charts-donut", "charts-funnel", "charts-gauge", "charts-geo-map", "charts-geo-point-map", "charts-heatmap", "charts-line", "charts-network", "charts-pie", "charts-progress-ring", "charts-sankey", "charts-scatter", "charts-sparkline", "charts-stacked-bar", "charts-sunburst", "charts-treemap", "chat-message", "chat-thread", "checkbox", "chip", "code", "combobox", "command-palette", "content-layout", "context-menu", "context-menu-trigger", "control-choice", "control-filter", "control-slider", "control-toggle", "data-board", "data-calendar", "data-cohort-table", "data-files", "data-filter-builder", "data-grid", "data-map", "data-notification-inbox", "data-timeline", "data-tree-view", "deck-slide", "description", "detail-panel", "dialog", "drawer", "dropdown-menu", "dropdown-menu-content", "dropdown-menu-item", "dropdown-menu-trigger", "empty-state", "error-state", "field", "field-error", "flow-action", "flow-view", "form", "form-field", "form-submit", "host-region", "hover-card", "hover-card-content", "icon-button", "inline-text", "input", "input-group", "kbd", "kpi", "label", "layout-auth-split", "layout-blog", "layout-card", "layout-chrome", "layout-dashboard-grid", "layout-deck", "layout-doc", "layout-docs", "layout-drawer", "layout-dual-sidebar", "layout-editorial", "layout-grid", "layout-host", "layout-landing", "layout-marketing", "layout-page", "layout-pricing", "layout-row", "layout-settings", "layout-sidebar", "layout-split", "layout-stack", "layout-tile", "layout-top-nav", "layout-wizard", "media-composition-canvas", "media-composition-svg", "media-image", "menubar", "menubar-trigger", "multi-select", "nav-icon", "navigation-menu", "pagination", "popover", "popover-content", "radio", "radio-group", "responsive-modal", "screen-outlet", "select", "select-content", "select-group", "select-item", "select-label", "select-portal", "select-separator", "select-trigger", "select-value", "select-viewport", "sheet", "sidebar", "sortable-list", "split-view", "stat", "stepper", "switch", "table", "tag", "text-counter", "textarea", "time-field", "timeline", "toaster", "tooltip", "workflow-graph"];
4
+ export declare const SPEC_COMPONENT_IDS: readonly ["action-form", "alert", "alert-dialog", "analytics-grid", "app-nav", "badge", "banner", "blocks-code", "blocks-data", "blocks-diagram", "blocks-embed", "blocks-interactive", "blocks-map", "blocks-media", "blocks-structure", "blocks-text", "breadcrumb", "button", "button-group", "callout", "canvas", "card", "charts-area", "charts-bar", "charts-bubble", "charts-bullet", "charts-canvas-renderer", "charts-cartesian", "charts-combo", "charts-donut", "charts-funnel", "charts-gauge", "charts-geo-map", "charts-geo-point-map", "charts-heatmap", "charts-line", "charts-network", "charts-pie", "charts-progress-ring", "charts-sankey", "charts-scatter", "charts-sparkline", "charts-stacked-bar", "charts-sunburst", "charts-treemap", "chat-message", "chat-thread", "checkbox", "chip", "code", "combobox", "command-palette", "content-layout", "context-menu", "context-menu-trigger", "control-choice", "control-filter", "control-slider", "control-toggle", "data-board", "data-calendar", "data-cohort-table", "data-dashboard", "data-dashboard-widget", "data-files", "data-filter-builder", "data-grid", "data-map", "data-notification-inbox", "data-timeline", "data-tree-view", "deck-slide", "description", "detail-panel", "dialog", "document", "drawer", "dropdown-menu", "dropdown-menu-content", "dropdown-menu-item", "dropdown-menu-trigger", "empty-state", "error-state", "field", "field-error", "flow-action", "flow-view", "form", "form-field", "form-submit", "host-region", "hover-card", "hover-card-content", "icon-button", "inline-text", "input", "input-group", "kbd", "kpi", "label", "layout-auth-split", "layout-blog", "layout-card", "layout-chrome", "layout-dashboard-grid", "layout-deck", "layout-doc", "layout-docs", "layout-drawer", "layout-dual-sidebar", "layout-editorial", "layout-grid", "layout-host", "layout-landing", "layout-marketing", "layout-page", "layout-pricing", "layout-row", "layout-settings", "layout-sidebar", "layout-split", "layout-stack", "layout-tile", "layout-top-nav", "layout-wizard", "media-composition-canvas", "media-composition-svg", "media-image", "menubar", "menubar-trigger", "multi-select", "nav-icon", "navigation-menu", "pagination", "popover", "popover-content", "radio", "radio-group", "responsive-modal", "schema-form", "screen-outlet", "select", "select-content", "select-group", "select-item", "select-label", "select-portal", "select-separator", "select-trigger", "select-value", "select-viewport", "sheet", "sidebar", "sortable-list", "split-view", "spreadsheet", "stat", "stepper", "switch", "table", "tag", "text-counter", "textarea", "time-field", "timeline", "toaster", "tooltip", "workflow-graph"];
5
5
  export type SpecComponentId = (typeof SPEC_COMPONENT_IDS)[number];
6
6
  /** The props a blueprint may set on each component (platform extensions left out). */
7
7
  export interface SpecComponentProps {
@@ -139,6 +139,10 @@ export interface SpecComponentProps {
139
139
  title?: string;
140
140
  tone?: 'info' | 'success' | 'warning' | 'error' | 'brand' | 'neutral';
141
141
  };
142
+ canvas: {
143
+ canvas: Readonly<Record<string, unknown>>;
144
+ label?: string;
145
+ };
142
146
  card: {
143
147
  href?: string;
144
148
  hrefTrust?: 'developer' | 'untrusted';
@@ -493,6 +497,20 @@ export interface SpecComponentProps {
493
497
  rows: readonly unknown[];
494
498
  valueKind?: 'rate' | 'count';
495
499
  };
500
+ 'data-dashboard': {
501
+ columns?: number;
502
+ compaction?: 'vertical' | 'none';
503
+ density?: 'compact' | 'default' | 'comfortable';
504
+ editable?: boolean;
505
+ gap?: 'none' | 'small' | 'medium' | 'large';
506
+ label: string;
507
+ layout?: readonly unknown[];
508
+ };
509
+ 'data-dashboard-widget': {
510
+ place?: Readonly<Record<string, unknown>>;
511
+ title: string;
512
+ widgetId: string;
513
+ };
496
514
  'data-files': {
497
515
  density?: 'comfortable' | 'compact';
498
516
  entries: readonly unknown[];
@@ -567,6 +585,11 @@ export interface SpecComponentProps {
567
585
  size?: 'sm' | 'md' | 'lg' | 'xl';
568
586
  title: string;
569
587
  };
588
+ document: {
589
+ doc: Readonly<Record<string, unknown>>;
590
+ label?: string;
591
+ outline?: boolean;
592
+ };
570
593
  drawer: {
571
594
  closeOnEscape?: boolean;
572
595
  dismissOutside?: boolean;
@@ -980,6 +1003,11 @@ export interface SpecComponentProps {
980
1003
  side?: 'top' | 'right' | 'bottom' | 'left' | 'start' | 'end' | 'center';
981
1004
  size?: 'sm' | 'md' | 'lg' | 'xl';
982
1005
  };
1006
+ 'schema-form': {
1007
+ action: string;
1008
+ label?: string;
1009
+ schema: Readonly<Record<string, unknown>>;
1010
+ };
983
1011
  'screen-outlet': Record<string, never>;
984
1012
  select: {
985
1013
  defaultValue?: string;
@@ -1047,6 +1075,10 @@ export interface SpecComponentProps {
1047
1075
  detailLabel?: string;
1048
1076
  listLabel?: string;
1049
1077
  };
1078
+ spreadsheet: {
1079
+ label?: string;
1080
+ sheet: Readonly<Record<string, unknown>>;
1081
+ };
1050
1082
  stat: {
1051
1083
  delta?: string;
1052
1084
  hint?: string;
@@ -1,7 +1,7 @@
1
1
  // Generated by @texuli/spec from catalog/components.json. Do not edit: run the spec generator.
2
- // Spec 0.6.0, digest 37141b85b9ab9f02af849a62a9c97ba729d6c5c2705130290bcdf45b308ea4cc
2
+ // Spec 0.8.0, digest f6b6388280d247eb9c3106a925111f35b90d1ec3b59c23652542f06a9f103daf
3
3
  /** The built catalog this vocabulary was projected from. */
4
- export const SPEC_CATALOG_HASH = '4ac7ecedd1c59d1999a9f7eea2f523c7653fececb97258a478f09253f6b6057f';
4
+ export const SPEC_CATALOG_HASH = '598075e391ed95dcba46e120d2fbb706e8ff67d0d5bdeb3c0741f334f439b264';
5
5
  /** Every closed component id, sorted. */
6
6
  export const SPEC_COMPONENT_IDS = [
7
7
  'action-form',
@@ -24,6 +24,7 @@ export const SPEC_COMPONENT_IDS = [
24
24
  'button',
25
25
  'button-group',
26
26
  'callout',
27
+ 'canvas',
27
28
  'card',
28
29
  'charts-area',
29
30
  'charts-bar',
@@ -65,6 +66,8 @@ export const SPEC_COMPONENT_IDS = [
65
66
  'data-board',
66
67
  'data-calendar',
67
68
  'data-cohort-table',
69
+ 'data-dashboard',
70
+ 'data-dashboard-widget',
68
71
  'data-files',
69
72
  'data-filter-builder',
70
73
  'data-grid',
@@ -76,6 +79,7 @@ export const SPEC_COMPONENT_IDS = [
76
79
  'description',
77
80
  'detail-panel',
78
81
  'dialog',
82
+ 'document',
79
83
  'drawer',
80
84
  'dropdown-menu',
81
85
  'dropdown-menu-content',
@@ -139,6 +143,7 @@ export const SPEC_COMPONENT_IDS = [
139
143
  'radio',
140
144
  'radio-group',
141
145
  'responsive-modal',
146
+ 'schema-form',
142
147
  'screen-outlet',
143
148
  'select',
144
149
  'select-content',
@@ -154,6 +159,7 @@ export const SPEC_COMPONENT_IDS = [
154
159
  'sidebar',
155
160
  'sortable-list',
156
161
  'split-view',
162
+ 'spreadsheet',
157
163
  'stat',
158
164
  'stepper',
159
165
  'switch',
@@ -1,3 +1,3 @@
1
1
  // Generated by @texuli/spec from schemas/workflow.schema.json. Do not edit: run the spec generator.
2
- // Spec 0.6.0, digest 37141b85b9ab9f02af849a62a9c97ba729d6c5c2705130290bcdf45b308ea4cc
2
+ // Spec 0.8.0, digest f6b6388280d247eb9c3106a925111f35b90d1ec3b59c23652542f06a9f103daf
3
3
  export {};
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export { CAPABILITIES, type Capability, type SpecPropKind, WEB_ONLY_KINDS, WEB_O
20
20
  export { ACTION_FIELDS, contractRoot, DATA_BINDING_KEY, SPEC_ACTION_OPS, SPEC_EVENT_NAMES, SPEC_LIMITS, SPEC_PATTERNS, SPEC_PROP_REFS, SPEC_STATE_TYPES, type SpecActionOp, type SpecStateType, STATE_BINDING_KEY, STATE_FIELDS, toDialectSchema, } from './contract.js';
21
21
  export { checkSchemaDocument, DIALECT_KEYWORDS, DIALECT_TYPES, DIALECT_URI, type DialectHooks, type DialectType, type Schema, type SchemaIssue, validateInstance, } from './dialect.js';
22
22
  export type { SpecMigration, SpecMigrationResult } from './migrations/types.js';
23
+ export { checkSourceBinding, isSourceBinding, isSpecSourceDate, SOURCE_BINDING_FIELDS, SOURCE_BINDING_KEY, type SourceBindingContext, type SourceBindingIssue, SPEC_SOURCE_FIELD_TYPES, SPEC_SOURCE_FILTER_OPERATORS, SPEC_SOURCE_LIMITS, SPEC_SOURCE_OPERATIONS, SPEC_SOURCE_PATTERNS, type SpecSourceDescriptor, type SpecSourceField, type SpecSourceFieldType, type SpecSourceFilterOperator, type SpecSourceOperation, } from './source.js';
23
24
  export { checkStateSurface, LIST_TEXT_PATTERN, SPEC_CONTROL_STATE_TYPES, SURFACE_PLAYER_CODES, type SurfaceCode, type SurfaceInputs, type SurfaceIssue, surfaceInputs, } from './surface.js';
24
25
  export { type SpecDocuments, type SpecFlowInfo, type SpecStateVariable, type TreeOptions, validateBlueprint, validateTree, type WorkflowGraphValidator, } from './validate.js';
25
26
  export { SPEC_VERSION } from './version.js';
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ export { canonicalJson, sha256 } from "./canonical.js";
14
14
  export { CAPABILITIES, WEB_ONLY_KINDS, WEB_ONLY_PROP_NAMES, } from "./catalog.js";
15
15
  export { ACTION_FIELDS, contractRoot, DATA_BINDING_KEY, SPEC_ACTION_OPS, SPEC_EVENT_NAMES, SPEC_LIMITS, SPEC_PATTERNS, SPEC_PROP_REFS, SPEC_STATE_TYPES, STATE_BINDING_KEY, STATE_FIELDS, toDialectSchema, } from "./contract.js";
16
16
  export { checkSchemaDocument, DIALECT_KEYWORDS, DIALECT_TYPES, DIALECT_URI, validateInstance, } from "./dialect.js";
17
+ export { checkSourceBinding, isSourceBinding, isSpecSourceDate, SOURCE_BINDING_FIELDS, SOURCE_BINDING_KEY, SPEC_SOURCE_FIELD_TYPES, SPEC_SOURCE_FILTER_OPERATORS, SPEC_SOURCE_LIMITS, SPEC_SOURCE_OPERATIONS, SPEC_SOURCE_PATTERNS, } from "./source.js";
17
18
  export { checkStateSurface, LIST_TEXT_PATTERN, SPEC_CONTROL_STATE_TYPES, SURFACE_PLAYER_CODES, surfaceInputs, } from "./surface.js";
18
19
  export { validateBlueprint, validateTree, } from "./validate.js";
19
20
  export { SPEC_VERSION } from "./version.js";
@@ -0,0 +1,10 @@
1
+ import type { SpecMigration } from './types.js';
2
+ /**
3
+ * 0.6.0 → 0.7.0 is additive (PLAN_010 T-doc-agents, ADR-011, ADR-012 and
4
+ * ADR-014): nodes gain an optional `key` (a stable instance id, unique in
5
+ * the tree), the catalog gains the `document` id whose `doc` prop carries a
6
+ * Texuli document, and edit ops gain `patchDocument` (a bounded RFC 6902
7
+ * patch) and key addressing. Every 0.6.0 envelope is a valid 0.7.0
8
+ * envelope, so the step only stamps `spec`.
9
+ */
10
+ export declare const migration060to070: SpecMigration;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 0.6.0 → 0.7.0 is additive (PLAN_010 T-doc-agents, ADR-011, ADR-012 and
3
+ * ADR-014): nodes gain an optional `key` (a stable instance id, unique in
4
+ * the tree), the catalog gains the `document` id whose `doc` prop carries a
5
+ * Texuli document, and edit ops gain `patchDocument` (a bounded RFC 6902
6
+ * patch) and key addressing. Every 0.6.0 envelope is a valid 0.7.0
7
+ * envelope, so the step only stamps `spec`.
8
+ */
9
+ export const migration060to070 = Object.freeze({
10
+ from: '0.6.0',
11
+ to: '0.7.0',
12
+ migrate: (envelope) => ({ ...envelope, spec: '0.7.0' }),
13
+ });
@@ -0,0 +1,8 @@
1
+ import type { SpecMigration } from './types.js';
2
+ /**
3
+ * 0.7.0 → 0.8.0 is additive (PLAN_010 wave 4–6, ADR-012 and ADR-015): it
4
+ * adds vocabulary (data-source bindings and the other 0.8.0 additions) and
5
+ * removes nothing. Every 0.7.0 envelope is a valid 0.8.0 envelope, so the
6
+ * step only stamps `spec`.
7
+ */
8
+ export declare const migration070to080: SpecMigration;