@vielzeug/codex 26.11.3 → 26.11.5

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.
package/data/catalog.json CHANGED
@@ -35,7 +35,7 @@
35
35
  "rune"
36
36
  ],
37
37
  "slug": "archive",
38
- "version": "26.11.2"
38
+ "version": "26.11.4"
39
39
  },
40
40
  {
41
41
  "availableDocPages": [
@@ -108,7 +108,7 @@
108
108
  "coins"
109
109
  ],
110
110
  "slug": "arsenal",
111
- "version": "26.11.2"
111
+ "version": "26.11.4"
112
112
  },
113
113
  {
114
114
  "availableDocPages": [
@@ -160,7 +160,7 @@
160
160
  "refine"
161
161
  ],
162
162
  "slug": "assay",
163
- "version": "26.11.2"
163
+ "version": "26.11.4"
164
164
  },
165
165
  {
166
166
  "availableDocPages": [
@@ -199,7 +199,7 @@
199
199
  "vault"
200
200
  ],
201
201
  "slug": "beacon",
202
- "version": "26.11.2"
202
+ "version": "26.11.4"
203
203
  },
204
204
  {
205
205
  "availableDocPages": [
@@ -241,7 +241,7 @@
241
241
  "ward"
242
242
  ],
243
243
  "slug": "clockwork",
244
- "version": "26.11.2"
244
+ "version": "26.11.4"
245
245
  },
246
246
  {
247
247
  "availableDocPages": [
@@ -274,7 +274,7 @@
274
274
  "refine"
275
275
  ],
276
276
  "slug": "codex",
277
- "version": "26.11.2"
277
+ "version": "26.11.4"
278
278
  },
279
279
  {
280
280
  "availableDocPages": [
@@ -344,7 +344,7 @@
344
344
  "spell"
345
345
  ],
346
346
  "slug": "coins",
347
- "version": "26.11.2"
347
+ "version": "26.11.4"
348
348
  },
349
349
  {
350
350
  "availableDocPages": [
@@ -385,7 +385,7 @@
385
385
  "rune"
386
386
  ],
387
387
  "slug": "conduit",
388
- "version": "26.11.2"
388
+ "version": "26.11.4"
389
389
  },
390
390
  {
391
391
  "availableDocPages": [
@@ -427,7 +427,7 @@
427
427
  "postmaster"
428
428
  ],
429
429
  "slug": "courier",
430
- "version": "26.11.2"
430
+ "version": "26.11.4"
431
431
  },
432
432
  {
433
433
  "availableDocPages": [
@@ -473,7 +473,7 @@
473
473
  "refine"
474
474
  ],
475
475
  "slug": "dnd",
476
- "version": "26.11.2"
476
+ "version": "26.11.4"
477
477
  },
478
478
  {
479
479
  "availableDocPages": [
@@ -515,7 +515,7 @@
515
515
  "herald"
516
516
  ],
517
517
  "slug": "familiar",
518
- "version": "26.11.2"
518
+ "version": "26.11.4"
519
519
  },
520
520
  {
521
521
  "availableDocPages": [
@@ -582,7 +582,7 @@
582
582
  "courier"
583
583
  ],
584
584
  "slug": "flux",
585
- "version": "26.11.2"
585
+ "version": "26.11.4"
586
586
  },
587
587
  {
588
588
  "availableDocPages": [
@@ -622,7 +622,7 @@
622
622
  "ore"
623
623
  ],
624
624
  "slug": "focus",
625
- "version": "26.11.2"
625
+ "version": "26.11.4"
626
626
  },
627
627
  {
628
628
  "availableDocPages": [
@@ -663,7 +663,7 @@
663
663
  "assay"
664
664
  ],
665
665
  "slug": "forge",
666
- "version": "26.11.2"
666
+ "version": "26.11.4"
667
667
  },
668
668
  {
669
669
  "availableDocPages": [
@@ -701,7 +701,7 @@
701
701
  "keymap"
702
702
  ],
703
703
  "slug": "gesture",
704
- "version": "26.11.2"
704
+ "version": "26.11.4"
705
705
  },
706
706
  {
707
707
  "availableDocPages": [
@@ -745,7 +745,7 @@
745
745
  "familiar"
746
746
  ],
747
747
  "slug": "herald",
748
- "version": "26.11.2"
748
+ "version": "26.11.4"
749
749
  },
750
750
  {
751
751
  "availableDocPages": [
@@ -788,7 +788,7 @@
788
788
  "tempo"
789
789
  ],
790
790
  "slug": "illusionist",
791
- "version": "26.11.2"
791
+ "version": "26.11.4"
792
792
  },
793
793
  {
794
794
  "availableDocPages": [
@@ -833,7 +833,7 @@
833
833
  "ore"
834
834
  ],
835
835
  "slug": "keymap",
836
- "version": "26.11.2"
836
+ "version": "26.11.4"
837
837
  },
838
838
  {
839
839
  "availableDocPages": [
@@ -880,7 +880,7 @@
880
880
  "vault"
881
881
  ],
882
882
  "slug": "ledger",
883
- "version": "26.11.2"
883
+ "version": "26.11.4"
884
884
  },
885
885
  {
886
886
  "availableDocPages": [
@@ -926,7 +926,7 @@
926
926
  "courier"
927
927
  ],
928
928
  "slug": "lingua",
929
- "version": "26.11.2"
929
+ "version": "26.11.4"
930
930
  },
931
931
  {
932
932
  "availableDocPages": [
@@ -964,7 +964,7 @@
964
964
  "herald"
965
965
  ],
966
966
  "slug": "mesh",
967
- "version": "26.11.2"
967
+ "version": "26.11.4"
968
968
  },
969
969
  {
970
970
  "availableDocPages": [
@@ -1001,7 +1001,7 @@
1001
1001
  "ore"
1002
1002
  ],
1003
1003
  "slug": "necromancer",
1004
- "version": "26.11.2"
1004
+ "version": "26.11.4"
1005
1005
  },
1006
1006
  {
1007
1007
  "availableDocPages": [
@@ -1041,7 +1041,7 @@
1041
1041
  "prism"
1042
1042
  ],
1043
1043
  "slug": "orbit",
1044
- "version": "26.11.2"
1044
+ "version": "26.11.4"
1045
1045
  },
1046
1046
  {
1047
1047
  "availableDocPages": [
@@ -1106,7 +1106,7 @@
1106
1106
  "orbit"
1107
1107
  ],
1108
1108
  "slug": "ore",
1109
- "version": "26.11.2"
1109
+ "version": "26.11.4"
1110
1110
  },
1111
1111
  {
1112
1112
  "availableDocPages": [
@@ -1150,7 +1150,7 @@
1150
1150
  "ripple"
1151
1151
  ],
1152
1152
  "slug": "postmaster",
1153
- "version": "26.11.2"
1153
+ "version": "26.11.4"
1154
1154
  },
1155
1155
  {
1156
1156
  "availableDocPages": [
@@ -1191,7 +1191,7 @@
1191
1191
  "orbit"
1192
1192
  ],
1193
1193
  "slug": "prism",
1194
- "version": "26.11.2"
1194
+ "version": "26.11.4"
1195
1195
  },
1196
1196
  {
1197
1197
  "availableDocPages": [
@@ -1255,7 +1255,7 @@
1255
1255
  "clockwork"
1256
1256
  ],
1257
1257
  "slug": "pulse",
1258
- "version": "26.11.2"
1258
+ "version": "26.11.4"
1259
1259
  },
1260
1260
  {
1261
1261
  "availableDocPages": [
@@ -1270,7 +1270,6 @@
1270
1270
  "ore-accordion",
1271
1271
  "ore-accordion-item",
1272
1272
  "ore-alert",
1273
- "ore-async",
1274
1273
  "ore-avatar",
1275
1274
  "ore-avatar-group",
1276
1275
  "ore-badge",
@@ -1288,6 +1287,7 @@
1288
1287
  "ore-checkbox-group",
1289
1288
  "ore-chip",
1290
1289
  "ore-code-window",
1290
+ "ore-color-picker",
1291
1291
  "ore-column",
1292
1292
  "ore-combobox",
1293
1293
  "ore-combobox-option",
@@ -1326,6 +1326,7 @@
1326
1326
  "ore-password-strength",
1327
1327
  "ore-popover",
1328
1328
  "ore-progress",
1329
+ "ore-pull-to-refresh",
1329
1330
  "ore-qr-code",
1330
1331
  "ore-qr-scanner",
1331
1332
  "ore-query-bar",
@@ -1342,6 +1343,7 @@
1342
1343
  "ore-speech-player",
1343
1344
  "ore-speed-reading",
1344
1345
  "ore-spotlight",
1346
+ "ore-state",
1345
1347
  "ore-stats",
1346
1348
  "ore-step",
1347
1349
  "ore-stepper",
@@ -1378,7 +1380,7 @@
1378
1380
  "keymap"
1379
1381
  ],
1380
1382
  "slug": "refine",
1381
- "version": "26.11.2"
1383
+ "version": "26.11.4"
1382
1384
  },
1383
1385
  {
1384
1386
  "availableDocPages": [
@@ -1423,7 +1425,7 @@
1423
1425
  "ledger"
1424
1426
  ],
1425
1427
  "slug": "ripple",
1426
- "version": "26.11.2"
1428
+ "version": "26.11.4"
1427
1429
  },
1428
1430
  {
1429
1431
  "availableDocPages": [
@@ -1477,7 +1479,7 @@
1477
1479
  "familiar"
1478
1480
  ],
1479
1481
  "slug": "rune",
1480
- "version": "26.11.2"
1482
+ "version": "26.11.4"
1481
1483
  },
1482
1484
  {
1483
1485
  "availableDocPages": [
@@ -1518,7 +1520,7 @@
1518
1520
  "refine"
1519
1521
  ],
1520
1522
  "slug": "sandbox",
1521
- "version": "26.11.2"
1523
+ "version": "26.11.4"
1522
1524
  },
1523
1525
  {
1524
1526
  "availableDocPages": [
@@ -1569,7 +1571,7 @@
1569
1571
  "ripple"
1570
1572
  ],
1571
1573
  "slug": "scout",
1572
- "version": "26.11.2"
1574
+ "version": "26.11.4"
1573
1575
  },
1574
1576
  {
1575
1577
  "availableDocPages": [
@@ -1622,7 +1624,7 @@
1622
1624
  "refine"
1623
1625
  ],
1624
1626
  "slug": "scroll",
1625
- "version": "26.11.2"
1627
+ "version": "26.11.4"
1626
1628
  },
1627
1629
  {
1628
1630
  "availableDocPages": [
@@ -1669,7 +1671,7 @@
1669
1671
  "gesture"
1670
1672
  ],
1671
1673
  "slug": "sentinel",
1672
- "version": "26.11.2"
1674
+ "version": "26.11.4"
1673
1675
  },
1674
1676
  {
1675
1677
  "availableDocPages": [
@@ -1709,7 +1711,7 @@
1709
1711
  "refine"
1710
1712
  ],
1711
1713
  "slug": "sigil",
1712
- "version": "26.11.2"
1714
+ "version": "26.11.4"
1713
1715
  },
1714
1716
  {
1715
1717
  "availableDocPages": [
@@ -1754,7 +1756,7 @@
1754
1756
  "wayfinder"
1755
1757
  ],
1756
1758
  "slug": "sourcerer",
1757
- "version": "26.11.2"
1759
+ "version": "26.11.4"
1758
1760
  },
1759
1761
  {
1760
1762
  "availableDocPages": [
@@ -1813,7 +1815,7 @@
1813
1815
  "vault"
1814
1816
  ],
1815
1817
  "slug": "spell",
1816
- "version": "26.11.2"
1818
+ "version": "26.11.4"
1817
1819
  },
1818
1820
  {
1819
1821
  "availableDocPages": [
@@ -1854,7 +1856,7 @@
1854
1856
  "ripple"
1855
1857
  ],
1856
1858
  "slug": "tandem",
1857
- "version": "26.11.2"
1859
+ "version": "26.11.4"
1858
1860
  },
1859
1861
  {
1860
1862
  "availableDocPages": [
@@ -1898,7 +1900,7 @@
1898
1900
  "herald"
1899
1901
  ],
1900
1902
  "slug": "tavern",
1901
- "version": "26.11.2"
1903
+ "version": "26.11.4"
1902
1904
  },
1903
1905
  {
1904
1906
  "availableDocPages": [
@@ -1966,7 +1968,7 @@
1966
1968
  "vault"
1967
1969
  ],
1968
1970
  "slug": "tempo",
1969
- "version": "26.11.2"
1971
+ "version": "26.11.4"
1970
1972
  },
1971
1973
  {
1972
1974
  "availableDocPages": [
@@ -2017,7 +2019,7 @@
2017
2019
  "ripple"
2018
2020
  ],
2019
2021
  "slug": "vault",
2020
- "version": "26.11.2"
2022
+ "version": "26.11.4"
2021
2023
  },
2022
2024
  {
2023
2025
  "availableDocPages": [
@@ -2063,7 +2065,7 @@
2063
2065
  "refine"
2064
2066
  ],
2065
2067
  "slug": "ward",
2066
- "version": "26.11.2"
2068
+ "version": "26.11.4"
2067
2069
  },
2068
2070
  {
2069
2071
  "availableDocPages": [
@@ -2117,8 +2119,8 @@
2117
2119
  "herald"
2118
2120
  ],
2119
2121
  "slug": "wayfinder",
2120
- "version": "26.11.2"
2122
+ "version": "26.11.4"
2121
2123
  }
2122
2124
  ],
2123
- "version": "26.11.2"
2125
+ "version": "26.11.4"
2124
2126
  }
@@ -1,6 +1,6 @@
1
1
  # Vielzeug: Full Documentation
2
2
 
3
- > Complete documentation for 43 packages. Version: 26.11.2
3
+ > Complete documentation for 43 packages. Version: 26.11.4
4
4
 
5
5
  ---
6
6
 
@@ -21787,9 +21787,9 @@ Each entry below is a component with its own documentation page and registration
21787
21787
 
21788
21788
  **Content:** `ore-accordion`, `ore-avatar`, `ore-card`, `ore-carousel`, `ore-chat-message`, `ore-chat-panel`, `ore-code-window`, `ore-copy-command`, `ore-icon`, `ore-keyboard-key`, `ore-list`, `ore-marquee`, `ore-qr-code`, `ore-rank-list`, `ore-speech-player`, `ore-speed-reading`, `ore-stats`, `ore-table`, `ore-text`
21789
21789
 
21790
- **Feedback:** `ore-alert`, `ore-async`, `ore-badge`, `ore-chip`, `ore-cookie-banner`, `ore-password-strength`, `ore-progress`, `ore-skeleton`, `ore-toast`, `ore-typing-indicator`
21790
+ **Feedback:** `ore-alert`, `ore-badge`, `ore-chip`, `ore-cookie-banner`, `ore-password-strength`, `ore-progress`, `ore-pull-to-refresh`, `ore-skeleton`, `ore-state`, `ore-toast`, `ore-typing-indicator`
21791
21791
 
21792
- **Inputs:** `ore-button`, `ore-calendar`, `ore-checkbox`, `ore-combobox`, `ore-counter`, `ore-datagrid`, `ore-date-picker`, `ore-file-input`, `ore-input`, `ore-message-composer`, `ore-number-input`, `ore-otp-input`, `ore-qr-scanner`, `ore-query-bar`, `ore-radio`, `ore-rating`, `ore-select`, `ore-slider`, `ore-switch`, `ore-textarea`, `ore-time-picker`
21792
+ **Inputs:** `ore-button`, `ore-calendar`, `ore-checkbox`, `ore-color-picker`, `ore-combobox`, `ore-counter`, `ore-datagrid`, `ore-date-picker`, `ore-file-input`, `ore-input`, `ore-message-composer`, `ore-number-input`, `ore-otp-input`, `ore-qr-scanner`, `ore-query-bar`, `ore-radio`, `ore-rating`, `ore-select`, `ore-slider`, `ore-switch`, `ore-textarea`, `ore-time-picker`
21793
21793
 
21794
21794
  **Layout:** `ore-box`, `ore-dock`, `ore-grid`, `ore-navbar`, `ore-separator`, `ore-sidebar`
21795
21795
 
@@ -21852,6 +21852,8 @@ Classification guides discovery and bundle selection. It is not a reason to remo
21852
21852
  | `@vielzeug/refine/frameworks/react` | Register typed React JSX elements | Types only | Does not provide runtime wrappers |
21853
21853
  | `@vielzeug/refine/frameworks/vue` | Register typed Vue global components | Types only | Does not install a Vue plugin |
21854
21854
  | `@vielzeug/refine/theme` | `createThemeController()`: light/dark/system document theme | Sync | Does not persist the preference or set an accent color |
21855
+ | `@vielzeug/refine/blueprint` | `parseUiBlueprint()`: validate a model-authored UI document against a fixed registry | Sync | Pure contract only: it registers no components and renders nothing |
21856
+ | `@vielzeug/refine/blueprint/render` | `renderUiBlueprint()`: render a validated document with registered components | Sync | Registers its thirteen components on import; rejects before touching the container |
21855
21857
  | `eventFieldValue()` / `eventFieldChecked()` | Read a form control's value/checked from `event.currentTarget` | Sync | Exported from the package root; guards non-field targets |
21856
21858
  | `animateReflow()` | Token-driven FLIP reflow for keyed lists | Async (next frame) | Exported from the package root; elements need stable keys or it correctly does nothing |
21857
21859
  | `setMotionMode()` / `getMotionMode()` | Read/write the `data-motion` attribute on `` | Sync | Exported from the package root; an unknown mode throws `RangeError` |
@@ -21864,6 +21866,8 @@ Classification guides discovery and bundle selection. It is not a reason to remo
21864
21866
  | `@vielzeug/refine` | Export `registerIcons`, icon definition types, `RefineError`, `animateReflow`, the motion-mode functions, and the field readers without registering components |
21865
21867
  | `@vielzeug/refine/` | Register one component and export its tag constant, props, events, and related types |
21866
21868
  | `@vielzeug/refine/theme` | `createThemeController()` and its theme types |
21869
+ | `@vielzeug/refine/blueprint` | On-demand UI document contract: `parseUiBlueprint()`, the node types, bounds, `UI_BLUEPRINT_REGISTRY`, and `UI_BLUEPRINT_JSON_SCHEMA` |
21870
+ | `@vielzeug/refine/blueprint/render` | `renderUiBlueprint()` and the thirteen component tags it registers |
21867
21871
  | `@vielzeug/refine/tokens.css` | Required global design contract |
21868
21872
  | `@vielzeug/refine/fouc.css` | Optional pre-upgrade visibility rule |
21869
21873
  | `@vielzeug/refine/styles/*` | Focused theme, animation, layer, and preflight stylesheets |
@@ -21931,8 +21935,8 @@ import type { OreButtonProps } from '@vielzeug/refine/button';
21931
21935
  | Area | Components |
21932
21936
  | --- | --- |
21933
21937
  | Content | `accordion`, `avatar`, `card`, `carousel`, `chat-message`, `chat-panel`, `code-window`, `copy-command`, `icon`, `keyboard-key`, `list`, `marquee`, `qr-code`, `rank-list`, `speech-player`, `speed-reading`, `stats`, `table`, `text` |
21934
- | Feedback | `alert`, `async`, `badge`, `chip`, `cookie-banner`, `password-strength`, `progress`, `skeleton`, `toast`, `typing-indicator` |
21935
- | Inputs | `button`, `calendar`, `checkbox`, `combobox`, `counter`, `datagrid`, `date-picker`, `file-input`, `input`, `message-composer`, `number-input`, `otp-input`, `qr-scanner`, `query-bar`, `radio`, `rating`, `select`, `slider`, `switch`, `textarea`, `time-picker` |
21938
+ | Feedback | `alert`, `badge`, `chip`, `cookie-banner`, `password-strength`, `progress`, `pull-to-refresh`, `skeleton`, `state`, `toast`, `typing-indicator` |
21939
+ | Inputs | `button`, `calendar`, `checkbox`, `color-picker`, `combobox`, `counter`, `datagrid`, `date-picker`, `file-input`, `input`, `message-composer`, `number-input`, `otp-input`, `qr-scanner`, `query-bar`, `radio`, `rating`, `select`, `slider`, `switch`, `textarea`, `time-picker` |
21936
21940
  | Layout | `box`, `dock`, `grid`, `navbar`, `separator`, `sidebar` |
21937
21941
  | Navigation | `breadcrumb`, `navigation-menu`, `pagination`, `stepper`, `tabs` |
21938
21942
  | Overlay | `command-palette`, `dialog`, `drawer`, `menu`, `popover`, `spotlight`, `tooltip`, `tour` |
@@ -22035,6 +22039,68 @@ setMotionMode('reduced'); // returns the applied mode
22035
22039
 
22036
22040
  Read/write the `data-motion` attribute on `` (`'full' | 'reduced' | 'system'`; `'system'` removes the attribute). An unknown mode throws `RangeError`. The attribute drives the token layer: see [Animation & Motion → Motion Mode](./animation#motion-mode).
22037
22041
 
22042
+ ## On-Demand UI Documents
22043
+
22044
+ `@vielzeug/refine/blueprint` is the trusted boundary for UI that a model writes. A harness asks a model to describe a small UI in JSON, and this contract decides whether that JSON may be rendered. It is data only: no code, no HTML, no callbacks, no styles, no URLs. See [On-Demand UI Documents](./on-demand-ui) for the full guide.
22045
+
22046
+ ```ts
22047
+ import { parseUiBlueprint, safeParseUiBlueprint } from '@vielzeug/refine/blueprint';
22048
+
22049
+ const result = safeParseUiBlueprint(JSON.parse(modelOutput)); // model output stays `unknown`
22050
+ if (!result.success) showError(result.issues); // safe to display: field paths, no secrets
22051
+ else renderValidated(result.document);
22052
+ ```
22053
+
22054
+ | Export | Purpose |
22055
+ | --- | --- |
22056
+ | `UI_BLUEPRINT_VERSION` | The only document version accepted (`1`) |
22057
+ | `parseUiBlueprint(value)` | Validate `unknown`. Returns the document unchanged, or throws `UiBlueprintError`. Nothing is repaired or partially accepted |
22058
+ | `safeParseUiBlueprint(value)` | Non-throwing form: `{ success: true, document }` or `{ success: false, issues }` |
22059
+ | `UiBlueprintError` | `RefineError` subclass carrying `issues: readonly string[]`, each a field path such as `root.children[0].size` |
22060
+ | `UI_BLUEPRINT_COMPONENTS` | The thirteen accepted component names: `text`, `box`, `card`, `button`, `badge`, `separator`, `slider`, `switch`, `checkbox`, `number-input`, `alert`, `progress`, `icon` |
22061
+ | `UI_BLUEPRINT_REGISTRY` | The same registry as data: element tag, child policy, attribute names, slot-text fields, and accepted values per component |
22062
+ | `UI_BLUEPRINT_JSON_SCHEMA` | JSON Schema (draft 2020-12) for the contract, for harnesses with structured output |
22063
+ | `BlueprintDocument`, `BlueprintNode`, and the node interfaces | TypeScript types for the document shape. Every node accepts an optional bounded `id` through `BlueprintNodeMeta` |
22064
+ | `MAX_BLUEPRINT_NODES`, `MAX_BLUEPRINT_DEPTH`, `MAX_BLUEPRINT_CHILDREN`, `MAX_BLUEPRINT_TEXT_LENGTH`, `MAX_BLUEPRINT_LABEL_LENGTH`, `MAX_BLUEPRINT_NUMBER`, `MAX_BLUEPRINT_ID_LENGTH` | Document bounds, not user-configurable |
22065
+
22066
+ `@vielzeug/refine/blueprint` imports nothing but `RefineError`: it is pure, DOM-free, and safe to run in a model harness, a worker, or CI. It registers no components.
22067
+
22068
+ `UI_BLUEPRINT_JSON_SCHEMA` constrains generation but cannot express the tree-wide node and depth bounds, so runtime validation stays mandatory. Treat the schema as a generation aid, never as the trust boundary.
22069
+
22070
+ ### `renderUiBlueprint(container, value, options?)`
22071
+
22072
+ ```ts
22073
+ import { renderUiBlueprint } from '@vielzeug/refine/blueprint/render';
22074
+
22075
+ try {
22076
+ const { element, nodes } = renderUiBlueprint(host, JSON.parse(modelOutput), { label: 'Generated summary' });
22077
+ nodes.get('rate')?.addEventListener('change', () => recalculate());
22078
+ } catch (error) {
22079
+ // The container is untouched: the previous preview is still on screen.
22080
+ }
22081
+ ```
22082
+
22083
+ Validate `value`, then render it into `container` using only registry components. Importing the entry registers those thirteen components, so no separate component imports are needed.
22084
+
22085
+ | Parameter | Type | Description |
22086
+ | --- | --- | --- |
22087
+ | `container` | `HTMLElement` | Element that receives the rendered tree |
22088
+ | `value` | `unknown` | Untrusted model output. Validated before anything is rendered |
22089
+ | `options.label` | `string?` | Accessible name for a `role="group"` wrapper. Host-owned: a document cannot set it |
22090
+ | `options.replace` | `boolean?` | Clear the container first. Default `true`; `false` appends |
22091
+
22092
+ **Returns** a `UiBlueprintRenderResult`: `{ element, nodes }`, the rendered root and a `ReadonlyMap` keyed by each node's optional `id` so the host can wire behaviour to addressable controls. `id` is host-facing metadata: the renderer never writes it to the DOM. Validation runs first, so a rejected document throws `UiBlueprintError` before the container is read or written: an invalid response can never partially render or erase a valid preview. Text becomes a text node, never markup.
22093
+
22094
+ ### `createUiBlueprintElement(node, owner?, nodes?)`
22095
+
22096
+ ```ts
22097
+ import { createUiBlueprintElement } from '@vielzeug/refine/blueprint/render';
22098
+
22099
+ const element = createUiBlueprintElement(document.root, 'root', nodeMap);
22100
+ ```
22101
+
22102
+ Build one element for an already-validated node. Pass a `Map` as `nodes` to collect every id-tagged element it creates, including nested ones; `owner` labels the node's position in rejection messages. This is the component registry: adding a component means adding a rule in the contract and a case here, and nothing else. It throws `TypeError` for an unregistered node type, so a hand-built node cannot bypass validation either. Embedders that place nodes themselves use this; `renderUiBlueprint()` is the normal entry point.
22103
+
22038
22104
  ## Types
22039
22105
 
22040
22106
  Component props follow the `OreProps` naming pattern. Event maps follow `OreEvents`. Import both from the component subpath that owns them.
@@ -22055,6 +22121,16 @@ class RefineError extends Error {
22055
22121
 
22056
22122
  Base class for public Refine errors. It preserves `cause` through `ErrorOptions`.
22057
22123
 
22124
+ ### `UiBlueprintError`
22125
+
22126
+ ```ts
22127
+ class UiBlueprintError extends RefineError {
22128
+ readonly issues: readonly string[];
22129
+ }
22130
+ ```
22131
+
22132
+ Thrown by `parseUiBlueprint()` and `renderUiBlueprint()` for a rejected on-demand UI document. Every rejection is collected first, so `issues` lists all of them at once, each as a field path plus a plain reason (`root.children[0].size: expected one of sm, md, lg, received string.`). The messages name fields and allowed values, report a wrong-typed value only as its *type*, and echo an accepted-type value only as a truncated snippet, so they are safe to display to a user. See [On-Demand UI Documents](./on-demand-ui).
22133
+
22058
22134
  ### Usage Guide
22059
22135
 
22060
22136
  ## Basic Usage
@@ -22299,6 +22375,7 @@ Use Necromancer directly when you need animation handles, groups, or explicit ke
22299
22375
  - **Dispose** application-owned Ripple effects and service handles.
22300
22376
  - **Guard** DOM-dependent component registration during SSR.
22301
22377
  - **Working with AI agents?** Install the `vielzeug` skill (`npx -y @vielzeug/codex skills install`) so agents reach for Refine components and tokens instead of custom widgets: see the [Codex usage guide](../codex/usage.md#agent-skill).
22378
+ - **Rendering model-authored UI?** Validate it through the [on-demand UI document contract](./on-demand-ui) instead of trusting model output; never build DOM from unvalidated JSON.
22302
22379
 
22303
22380
  ---
22304
22381
 
package/data/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vielzeug
2
2
 
3
- > 43 focused TypeScript packages. Version: 26.11.2
3
+ > 43 focused TypeScript packages. Version: 26.11.4
4
4
 
5
5
  Install any package independently: `pnpm add @vielzeug/<name>`
6
6
 
@@ -4,5 +4,5 @@
4
4
  "refine": "refine.json",
5
5
  "schemaVersion": 1,
6
6
  "search": "search.json",
7
- "version": "26.11.2"
7
+ "version": "26.11.4"
8
8
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "apiSource": "export { walkFlatTree } from './dom';\nexport { AssayError, AssayQueryError, AssayTimeoutError } from './errors';\nexport {\n dispatch,\n fireBlur,\n fireChange,\n fireClick,\n fireCustom,\n fireFocus,\n fireInput,\n fireKeyDown,\n fireKeyUp,\n fireSubmit,\n} from './events';\nexport { installFormInternalsPolyfill } from './form-internals';\nexport { getSlotted, type QueryScope, queryAllInShadow, queryInShadow, queryPart, within } from './query';\nexport {\n type DelayOptions,\n delay,\n type EventuallyOptions,\n eventually,\n type WaitOptions,\n waitForEvent,\n waitUntil,\n} from './wait';\n",
2
+ "apiSource": "export { walkFlatTree } from './dom';\nexport { AssayError, AssayQueryError, AssayTimeoutError } from './errors';\nexport {\n dispatch,\n fireBlur,\n fireChange,\n fireClick,\n fireCustom,\n fireFocus,\n fireInput,\n fireKeyDown,\n fireKeyUp,\n fireSubmit,\n} from './events';\nexport { installFormInternalsPolyfill } from './form-internals';\nexport { installPopoverPolyfill } from './popover';\nexport { getSlotted, type QueryScope, queryAllInShadow, queryInShadow, queryPart, within } from './query';\nexport {\n type DelayOptions,\n delay,\n type EventuallyOptions,\n eventually,\n type WaitOptions,\n waitForEvent,\n waitUntil,\n} from './wait';\n",
3
3
  "docs": {
4
4
  "index": "---\ntitle: 'Assay: Framework-agnostic DOM testing primitives'\ndescription: Scoped DOM queries, exact event dispatch, and cancellable async waiting for browser tests.\npackage: assay\ncategory: testing\nkeywords: [testing, dom, events, queries, custom-elements]\nrelated: [ore, refine]\nexports:\n [\n within,\n queryInShadow,\n queryAllInShadow,\n queryPart,\n getSlotted,\n dispatch,\n fireBlur,\n fireChange,\n fireClick,\n fireCustom,\n fireFocus,\n fireInput,\n fireKeyDown,\n fireKeyUp,\n fireSubmit,\n waitUntil,\n eventually,\n waitForEvent,\n delay,\n walkFlatTree,\n installFormInternalsPolyfill,\n AssayError,\n AssayQueryError,\n AssayTimeoutError,\n ]\nenvironments: [browser]\n---\n\n<!-- markdownlint-disable MD025 MD033 MD060 -->\n\n<PackageHero package=\"assay\" />\n\n## Why Assay?\n\nAssay provides focused DOM test primitives that work with vanilla elements, custom elements, and framework-rendered output. It scopes queries, dispatches exact browser event classes, and waits on explicit conditions without imposing a renderer or browser automation stack.\n\n```ts\n// Before\nbutton.dispatchEvent(new MouseEvent('click', { bubbles: true }));\nawait new Promise((resolve) => setTimeout(resolve, 100));\n\n// After\nfireClick(view.get('button.submit'));\nawait waitUntil(() => view.queryByText('Saved') !== null);\n```\n\n| Feature | Assay | Testing Library DOM | Browser automation |\n| ------------------- | -------------------------------------------- | ---------------------------------------- | ---------------------------------------- |\n| Bundle size | <PackageInfo package=\"assay\" type=\"size\" /> | Larger query layer | Browser runtime required |\n| Zero dependencies | <ore-icon name=\"check\" size=\"16\"></ore-icon> | <ore-icon name=\"x\" size=\"16\"></ore-icon> | <ore-icon name=\"x\" size=\"16\"></ore-icon> |\n| Scoped DOM queries | `within()` and shadow helpers | Renderer-oriented queries | Manual selectors |\n| Deterministic waits | `waitUntil()` and `waitForEvent()` | Framework-dependent | Full browser timing |\n\n<div class=\"decision-callout\">\n\n**Use Assay when** a DOM unit test needs readable queries, dispatched events, or a bounded async wait without adopting a rendering framework.\n\n**Consider browser integration tests when** correctness depends on browser default actions, focus behavior, pointer capture, layout, or accessibility-tree behavior.\n\n</div>\n\n## Installation\n\n::: code-group\n\n```sh [pnpm]\npnpm add -D @vielzeug/assay\n```\n\n```sh [npm]\nnpm install -D @vielzeug/assay\n```\n\n```sh [yarn]\nyarn add -D @vielzeug/assay\n```\n\n:::\n\n## Quick Start\n\nScope a test fixture, dispatch an event, and wait for resulting DOM state.\n\n```ts\nimport { fireClick, waitUntil, within } from '@vielzeug/assay';\n\nconst panel = document.createElement('section');\npanel.innerHTML = '<button>Save</button><output></output>';\npanel.querySelector('button')!.addEventListener('click', () => {\n panel.querySelector('output')!.textContent = 'Saved';\n});\n\nconst view = within(panel);\nfireClick(view.get('button'));\nawait waitUntil(() => view.queryByText('Saved') !== null);\n```\n\n## Features\n\n<div class=\"features-grid\">\n\n- `within(root)` scopes nullable and required DOM queries.\n- `queryInShadow`, `queryPart`, and `getSlotted` cross custom-element boundaries explicitly.\n- `fireClick`, `fireInput`, `fireKeyDown`, and peers dispatch exact synchronous events.\n- `waitUntil`, `eventually`, and `waitForEvent` provide bounded, abortable async waiting.\n- `delay` models explicit cancellable timer scheduling.\n- `walkFlatTree` traverses the flat tree across slot boundaries jsdom's light-DOM queries miss.\n- `installFormInternalsPolyfill` gives jsdom the `ElementInternals` form-association API.\n- `AssayError`, `AssayQueryError`, and `AssayTimeoutError` provide typed failures.\n\n</div>\n\n## Documentation\n\n<div class=\"doc-links\">\n\n- [Usage Guide](./usage.md)\n- [API Reference](./api.md)\n- [Examples](./examples.md)\n- [Migration Guide](./migration.md)\n\n</div>\n\n## See Also\n\n<div class=\"see-also\">\n\n- [Ore](/ore/): component authoring and test fixtures that pair with Assay DOM helpers.\n- [Refine](/refine/): accessible components with component-specific test assertions.\n\n</div>\n\n<!-- markdownlint-enable MD025 MD033 MD060 -->\n",
5
5
  "api": "---\ntitle: 'Assay: API Reference'\ndescription: API reference for @vielzeug/assay queries, event dispatch, async waiting, and test-environment helpers.\n---\n\n[[toc]]\n\n## API Overview\n\n| Symbol | Purpose | Execution mode | Common gotcha |\n| -------------------------------------------- | ------------------------------------------- | -------------- | ------------------------------------------------ |\n| `within` | Creates scoped query API | Sync | Required `get*` methods throw `AssayQueryError` |\n| `queryInShadow` / `queryPart` / `getSlotted` | Crosses custom-element boundaries | Sync | Open shadow roots are required |\n\n| `fire*` / `dispatch` | Dispatches platform event instances | Sync | Does not reproduce browser default behavior |\n| `waitUntil` / `eventually` / `waitForEvent` | Waits for conditions, assertions, or events | Async | Use a signal or timeout for bounded waits |\n| `delay` | Schedules a cancellable timer | Async | Pass a signal to cancel a pending wait |\n| `walkFlatTree` | Walks the flat tree across slot boundaries | Sync | jsdom-only need: browsers already use the flat tree |\n| `installFormInternalsPolyfill` | Polyfills `ElementInternals` form association for jsdom | Sync | Global patches: only install in suites that need them |\n\n## Package Entry Point\n\n| Import | Purpose |\n| ----------------- | ---------------------------------------------------- |\n| `@vielzeug/assay` | DOM queries, events, wait helpers, test-environment helpers, errors, and types |\n\n## Queries\n\n### `within(root)`\n\nCreates a `QueryScope` for an `Element`, `ShadowRoot`, `Document`, or `DocumentFragment`.\n\n| Method | Returns | Use |\n| --------------------------------- | ----------------- | -------------------------------------------- |\n| `get(selector)` | `Element` | Required CSS match; throws `AssayQueryError` |\n| `query(selector)` | `Element \\| null` | Optional CSS match |\n| `queryAll(selector)` | `Element[]` | All CSS matches |\n| `getByText(text, selector?)` | `Element` | Required exact trimmed-text match |\n| `queryByText(text, selector?)` | `Element \\| null` | Optional exact trimmed-text match |\n| `queryAllByText(text, selector?)` | `Element[]` | All exact trimmed-text matches |\n| `getByTestId(id)` | `Element` | Required `data-testid` match |\n| `queryByTestId(id)` | `Element \\| null` | Optional `data-testid` match |\n| `queryAllByTestId(id)` | `Element[]` | All `data-testid` matches |\n\nText selectors default to `'*'`. Required-query failures include the lookup and a bounded view of the scoped DOM.\n\n### Shadow and slot helpers\n\n| Function | Returns | Description |\n| ---------------------------------- | ----------------- | ---------------------------------------------------- |\n| `queryInShadow(host, selector)` | `Element \\| null` | First match in an open shadow root |\n| `queryAllInShadow(host, selector)` | `Element[]` | All matches in an open shadow root |\n| `queryPart(host, part)` | `Element \\| null` | First shadow element whose `part` token matches |\n| `getSlotted(host, slotName?)` | `Element[]` | Direct light-DOM children in a named or default slot |\n\nThese helpers return `null` or `[]` when there is no shadow root. Dynamic test IDs, parts, and slot names are matched\nas attribute values rather than interpolated into CSS selectors.\n\n## Event dispatch\n\nAll event helpers synchronously return `dispatchEvent()`'s boolean result.\n\n```ts\nimport {\n dispatch,\n fireBlur,\n fireChange,\n fireClick,\n fireCustom,\n fireFocus,\n fireInput,\n fireKeyDown,\n fireKeyUp,\n fireSubmit,\n} from '@vielzeug/assay';\n\nfireClick(button, { clientX: 20 });\nfireInput(input);\nfireKeyDown(input, { key: 'Enter' });\nfireCustom(element, 'item-added', { detail: { id: '42' } });\ndispatch(element, new Event('ready'));\n```\n\n| Function | Event class | Defaults |\n| --------------------------- | --------------- | ------------------------------------------------------ |\n| `fireBlur` / `fireFocus` | `FocusEvent` | Platform defaults (`bubbles: false`) |\n| `fireChange` | `Event` | `bubbles: true` |\n| `fireInput` | `InputEvent` | `bubbles: true` |\n| `fireClick` | `MouseEvent` | `bubbles: true`, `cancelable: true` |\n| `fireKeyDown` / `fireKeyUp` | `KeyboardEvent` | `bubbles: true`, `cancelable: true` |\n| `fireSubmit` | `SubmitEvent` | `bubbles: true`, `cancelable: true` |\n| `fireCustom` | `CustomEvent` | `bubbles: true`, `cancelable: true`, `composed: false` |\n\n`fireCustom(target, type, init?)` dispatches a `CustomEvent` with the given type. Assay intentionally does not\nprovide browser-default or fallback pointer/touch simulation.\n\n## Async waiting\n\n```ts\nawait waitUntil(() => ready, { interval: 20, signal, timeout: 1000 });\nawait eventually(() => expect(spy).toHaveBeenCalled(), { signal, timeout: 1000 });\nawait waitForEvent(target, 'ready', { signal, timeout: 1000 });\nawait delay(100, { signal });\n```\n\n| Function | Success condition | Options |\n| -------------------------------------- | ------------------------ | ------------------------------------------ |\n| `waitUntil(predicate, options?)` | Predicate returns `true` | `timeout`, `interval`, `signal` |\n| `eventually(assertion, options?)` | Assertion stops throwing | `timeout`, `interval`, `signal`, `message` |\n| `waitForEvent(target, type, options?)` | Target emits `type` | `timeout`, `signal` |\n| `delay(ms?, options?)` | Timer elapses | `signal` |\n\n\n`waitUntil()`, `eventually()`, and `waitForEvent()` reject with `AssayTimeoutError` when their shared deadline expires. `waitUntil()` and `eventually()` remain bounded while an asynchronous callback is pending. Abort rejects with the signal reason and removes Assay-owned timers and listeners. Callback work itself must cooperate with application cancellation.\n\n`timeout` and delay milliseconds must be finite, non-negative, and no greater than 2,147,483,647 ms; `interval` must be finite, positive, and within the same timer limit. Invalid durations throw `RangeError`. `eventually()` also accepts `message` for diagnostic timeout context.\n\n## Test-environment helpers\n\n### `walkFlatTree(root, visit)`\n\n```ts\nfunction walkFlatTree(root: Element, visit: (element: HTMLElement) => void): void;\n```\n\nWalks the flat tree below `root`, calling `visit` for each assigned or ordinary descendant (not for `root` itself).\nAt each `<slot>` it expands `assignedElements()` instead of descending into its (always empty, in jsdom) literal\nchildren. jsdom only\nimplements the light DOM tree, so `querySelectorAll()` never crosses a slot into its assigned elements; real\nbrowsers use the flat tree for that. This helper closes the gap for tests that must find form-associated (or\notherwise slotted) elements through shadow boundaries.\n\n```ts\nconst named: HTMLElement[] = [];\n\nwalkFlatTree(form, (el) => {\n if (el.hasAttribute('name')) named.push(el);\n});\n```\n\n### `installFormInternalsPolyfill()`\n\n```ts\nfunction installFormInternalsPolyfill(): () => void;\n```\n\njsdom implements none of the `ElementInternals` form-association API: not `setFormValue`, not `setValidity`, not\nthe `checkValidity`/`reportValidity`/`validity`/`validationMessage` mixin real browsers put on every\n`formAssociated: true` element, not even `FormData` collecting a form-associated element's set value, or\n`<form>.reset()` invoking `formResetCallback()`. Every one of those gaps is exercised by `useField()` from\n`@vielzeug/ore`, so any package testing a form-associated component needs all of them.\n\nCall it from a test setup when the suite tests form-associated components; it returns an `uninstall()` that\nrestores every patched global. The patches are global monkey-patches and skip APIs already implemented by the\nenvironment, so suites without form-associated components shouldn't install them. If `ElementInternals` is absent,\nthe installer is a no-op. A downstream package should\nrely on this instead of hand-rolling its own copy.\n\n```ts\n// vitest.setup.ts\nimport { installFormInternalsPolyfill } from '@vielzeug/assay';\nimport { install } from '@vielzeug/ore/testing';\nimport { afterAll, afterEach } from 'vitest';\n\ninstall(afterEach);\nafterAll(installFormInternalsPolyfill());\n```\n\n## Types\n\n```ts\nexport interface QueryScope {\n get<E extends Element = Element>(selector: string): E;\n getByTestId<E extends Element = Element>(testId: string): E;\n getByText<E extends Element = Element>(text: string, selector?: string): E;\n query<E extends Element = Element>(selector: string): E | null;\n queryAll<E extends Element = Element>(selector: string): E[];\n queryAllByTestId<E extends Element = Element>(testId: string): E[];\n queryAllByText<E extends Element = Element>(text: string, selector?: string): E[];\n queryByTestId<E extends Element = Element>(testId: string): E | null;\n queryByText<E extends Element = Element>(text: string, selector?: string): E | null;\n}\n```\n\nScoped query helpers returned by `within(root)`.\n\n```ts\nexport interface WaitOptions {\n /** Polling interval in ms (default: 50). */\n interval?: number;\n /** Cancel the pending wait. */\n signal?: AbortSignal;\n /** Maximum wait time in ms (default: 1000). */\n timeout?: number;\n}\n\nexport interface EventuallyOptions extends WaitOptions {\n /** Context included in the timeout error. */\n message?: string;\n}\n\nexport interface DelayOptions {\n /** Cancel the pending delay. */\n signal?: AbortSignal;\n}\n```\n\n`WaitOptions` configures `waitUntil()`. `EventuallyOptions` configures `eventually()`. `DelayOptions` configures `delay()`.\n\n## Errors\n\n| Error | Meaning |\n| ------------------- | -------------------------------------- |\n| `AssayError` | Base class for Assay-originated errors |\n| `AssayQueryError` | A required `get*` query had no match |\n| `AssayTimeoutError` | A wait operation reached its timeout |\n\nUse `instanceof AssayError` to narrow any value to the Assay error hierarchy.\n",
@@ -23,6 +23,7 @@
23
23
  "fireKeyUp": "export {\n dispatch,\n fireBlur,\n fireChange,\n fireClick,\n fireCustom,\n fireFocus,\n fireInput,\n fireKeyDown,\n fireKeyUp,\n fireSubmit,\n} from './events';",
24
24
  "fireSubmit": "export {\n dispatch,\n fireBlur,\n fireChange,\n fireClick,\n fireCustom,\n fireFocus,\n fireInput,\n fireKeyDown,\n fireKeyUp,\n fireSubmit,\n} from './events';",
25
25
  "installFormInternalsPolyfill": "export { installFormInternalsPolyfill } from './form-internals';",
26
+ "installPopoverPolyfill": "export { installPopoverPolyfill } from './popover';",
26
27
  "getSlotted": "export { getSlotted, type QueryScope, queryAllInShadow, queryInShadow, queryPart, within } from './query';",
27
28
  "QueryScope": "export { getSlotted, type QueryScope, queryAllInShadow, queryInShadow, queryPart, within } from './query';",
28
29
  "queryAllInShadow": "export { getSlotted, type QueryScope, queryAllInShadow, queryInShadow, queryPart, within } from './query';",