@vielzeug/codex 26.11.3 → 26.11.4
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 +44 -44
- package/data/llms-full.txt +78 -1
- package/data/llms.txt +1 -1
- package/data/manifest.json +1 -1
- package/data/packages/refine.json +2 -2
- package/data/refine.json +390 -148
- package/data/search.json +2 -2
- package/package.json +2 -2
package/data/catalog.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"rune"
|
|
36
36
|
],
|
|
37
37
|
"slug": "archive",
|
|
38
|
-
"version": "26.11.
|
|
38
|
+
"version": "26.11.3"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"availableDocPages": [
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"coins"
|
|
109
109
|
],
|
|
110
110
|
"slug": "arsenal",
|
|
111
|
-
"version": "26.11.
|
|
111
|
+
"version": "26.11.3"
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"availableDocPages": [
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"refine"
|
|
161
161
|
],
|
|
162
162
|
"slug": "assay",
|
|
163
|
-
"version": "26.11.
|
|
163
|
+
"version": "26.11.3"
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
"availableDocPages": [
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"vault"
|
|
200
200
|
],
|
|
201
201
|
"slug": "beacon",
|
|
202
|
-
"version": "26.11.
|
|
202
|
+
"version": "26.11.3"
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
"availableDocPages": [
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
"ward"
|
|
242
242
|
],
|
|
243
243
|
"slug": "clockwork",
|
|
244
|
-
"version": "26.11.
|
|
244
|
+
"version": "26.11.3"
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
"availableDocPages": [
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
"refine"
|
|
275
275
|
],
|
|
276
276
|
"slug": "codex",
|
|
277
|
-
"version": "26.11.
|
|
277
|
+
"version": "26.11.3"
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
"availableDocPages": [
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
"spell"
|
|
345
345
|
],
|
|
346
346
|
"slug": "coins",
|
|
347
|
-
"version": "26.11.
|
|
347
|
+
"version": "26.11.3"
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
350
|
"availableDocPages": [
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
"rune"
|
|
386
386
|
],
|
|
387
387
|
"slug": "conduit",
|
|
388
|
-
"version": "26.11.
|
|
388
|
+
"version": "26.11.3"
|
|
389
389
|
},
|
|
390
390
|
{
|
|
391
391
|
"availableDocPages": [
|
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
"postmaster"
|
|
428
428
|
],
|
|
429
429
|
"slug": "courier",
|
|
430
|
-
"version": "26.11.
|
|
430
|
+
"version": "26.11.3"
|
|
431
431
|
},
|
|
432
432
|
{
|
|
433
433
|
"availableDocPages": [
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
"refine"
|
|
474
474
|
],
|
|
475
475
|
"slug": "dnd",
|
|
476
|
-
"version": "26.11.
|
|
476
|
+
"version": "26.11.3"
|
|
477
477
|
},
|
|
478
478
|
{
|
|
479
479
|
"availableDocPages": [
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
"herald"
|
|
516
516
|
],
|
|
517
517
|
"slug": "familiar",
|
|
518
|
-
"version": "26.11.
|
|
518
|
+
"version": "26.11.3"
|
|
519
519
|
},
|
|
520
520
|
{
|
|
521
521
|
"availableDocPages": [
|
|
@@ -582,7 +582,7 @@
|
|
|
582
582
|
"courier"
|
|
583
583
|
],
|
|
584
584
|
"slug": "flux",
|
|
585
|
-
"version": "26.11.
|
|
585
|
+
"version": "26.11.3"
|
|
586
586
|
},
|
|
587
587
|
{
|
|
588
588
|
"availableDocPages": [
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
"ore"
|
|
623
623
|
],
|
|
624
624
|
"slug": "focus",
|
|
625
|
-
"version": "26.11.
|
|
625
|
+
"version": "26.11.3"
|
|
626
626
|
},
|
|
627
627
|
{
|
|
628
628
|
"availableDocPages": [
|
|
@@ -663,7 +663,7 @@
|
|
|
663
663
|
"assay"
|
|
664
664
|
],
|
|
665
665
|
"slug": "forge",
|
|
666
|
-
"version": "26.11.
|
|
666
|
+
"version": "26.11.3"
|
|
667
667
|
},
|
|
668
668
|
{
|
|
669
669
|
"availableDocPages": [
|
|
@@ -701,7 +701,7 @@
|
|
|
701
701
|
"keymap"
|
|
702
702
|
],
|
|
703
703
|
"slug": "gesture",
|
|
704
|
-
"version": "26.11.
|
|
704
|
+
"version": "26.11.3"
|
|
705
705
|
},
|
|
706
706
|
{
|
|
707
707
|
"availableDocPages": [
|
|
@@ -745,7 +745,7 @@
|
|
|
745
745
|
"familiar"
|
|
746
746
|
],
|
|
747
747
|
"slug": "herald",
|
|
748
|
-
"version": "26.11.
|
|
748
|
+
"version": "26.11.3"
|
|
749
749
|
},
|
|
750
750
|
{
|
|
751
751
|
"availableDocPages": [
|
|
@@ -788,7 +788,7 @@
|
|
|
788
788
|
"tempo"
|
|
789
789
|
],
|
|
790
790
|
"slug": "illusionist",
|
|
791
|
-
"version": "26.11.
|
|
791
|
+
"version": "26.11.3"
|
|
792
792
|
},
|
|
793
793
|
{
|
|
794
794
|
"availableDocPages": [
|
|
@@ -833,7 +833,7 @@
|
|
|
833
833
|
"ore"
|
|
834
834
|
],
|
|
835
835
|
"slug": "keymap",
|
|
836
|
-
"version": "26.11.
|
|
836
|
+
"version": "26.11.3"
|
|
837
837
|
},
|
|
838
838
|
{
|
|
839
839
|
"availableDocPages": [
|
|
@@ -880,7 +880,7 @@
|
|
|
880
880
|
"vault"
|
|
881
881
|
],
|
|
882
882
|
"slug": "ledger",
|
|
883
|
-
"version": "26.11.
|
|
883
|
+
"version": "26.11.3"
|
|
884
884
|
},
|
|
885
885
|
{
|
|
886
886
|
"availableDocPages": [
|
|
@@ -926,7 +926,7 @@
|
|
|
926
926
|
"courier"
|
|
927
927
|
],
|
|
928
928
|
"slug": "lingua",
|
|
929
|
-
"version": "26.11.
|
|
929
|
+
"version": "26.11.3"
|
|
930
930
|
},
|
|
931
931
|
{
|
|
932
932
|
"availableDocPages": [
|
|
@@ -964,7 +964,7 @@
|
|
|
964
964
|
"herald"
|
|
965
965
|
],
|
|
966
966
|
"slug": "mesh",
|
|
967
|
-
"version": "26.11.
|
|
967
|
+
"version": "26.11.3"
|
|
968
968
|
},
|
|
969
969
|
{
|
|
970
970
|
"availableDocPages": [
|
|
@@ -1001,7 +1001,7 @@
|
|
|
1001
1001
|
"ore"
|
|
1002
1002
|
],
|
|
1003
1003
|
"slug": "necromancer",
|
|
1004
|
-
"version": "26.11.
|
|
1004
|
+
"version": "26.11.3"
|
|
1005
1005
|
},
|
|
1006
1006
|
{
|
|
1007
1007
|
"availableDocPages": [
|
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
"prism"
|
|
1042
1042
|
],
|
|
1043
1043
|
"slug": "orbit",
|
|
1044
|
-
"version": "26.11.
|
|
1044
|
+
"version": "26.11.3"
|
|
1045
1045
|
},
|
|
1046
1046
|
{
|
|
1047
1047
|
"availableDocPages": [
|
|
@@ -1106,7 +1106,7 @@
|
|
|
1106
1106
|
"orbit"
|
|
1107
1107
|
],
|
|
1108
1108
|
"slug": "ore",
|
|
1109
|
-
"version": "26.11.
|
|
1109
|
+
"version": "26.11.3"
|
|
1110
1110
|
},
|
|
1111
1111
|
{
|
|
1112
1112
|
"availableDocPages": [
|
|
@@ -1150,7 +1150,7 @@
|
|
|
1150
1150
|
"ripple"
|
|
1151
1151
|
],
|
|
1152
1152
|
"slug": "postmaster",
|
|
1153
|
-
"version": "26.11.
|
|
1153
|
+
"version": "26.11.3"
|
|
1154
1154
|
},
|
|
1155
1155
|
{
|
|
1156
1156
|
"availableDocPages": [
|
|
@@ -1191,7 +1191,7 @@
|
|
|
1191
1191
|
"orbit"
|
|
1192
1192
|
],
|
|
1193
1193
|
"slug": "prism",
|
|
1194
|
-
"version": "26.11.
|
|
1194
|
+
"version": "26.11.3"
|
|
1195
1195
|
},
|
|
1196
1196
|
{
|
|
1197
1197
|
"availableDocPages": [
|
|
@@ -1255,7 +1255,7 @@
|
|
|
1255
1255
|
"clockwork"
|
|
1256
1256
|
],
|
|
1257
1257
|
"slug": "pulse",
|
|
1258
|
-
"version": "26.11.
|
|
1258
|
+
"version": "26.11.3"
|
|
1259
1259
|
},
|
|
1260
1260
|
{
|
|
1261
1261
|
"availableDocPages": [
|
|
@@ -1378,7 +1378,7 @@
|
|
|
1378
1378
|
"keymap"
|
|
1379
1379
|
],
|
|
1380
1380
|
"slug": "refine",
|
|
1381
|
-
"version": "26.11.
|
|
1381
|
+
"version": "26.11.3"
|
|
1382
1382
|
},
|
|
1383
1383
|
{
|
|
1384
1384
|
"availableDocPages": [
|
|
@@ -1423,7 +1423,7 @@
|
|
|
1423
1423
|
"ledger"
|
|
1424
1424
|
],
|
|
1425
1425
|
"slug": "ripple",
|
|
1426
|
-
"version": "26.11.
|
|
1426
|
+
"version": "26.11.3"
|
|
1427
1427
|
},
|
|
1428
1428
|
{
|
|
1429
1429
|
"availableDocPages": [
|
|
@@ -1477,7 +1477,7 @@
|
|
|
1477
1477
|
"familiar"
|
|
1478
1478
|
],
|
|
1479
1479
|
"slug": "rune",
|
|
1480
|
-
"version": "26.11.
|
|
1480
|
+
"version": "26.11.3"
|
|
1481
1481
|
},
|
|
1482
1482
|
{
|
|
1483
1483
|
"availableDocPages": [
|
|
@@ -1518,7 +1518,7 @@
|
|
|
1518
1518
|
"refine"
|
|
1519
1519
|
],
|
|
1520
1520
|
"slug": "sandbox",
|
|
1521
|
-
"version": "26.11.
|
|
1521
|
+
"version": "26.11.3"
|
|
1522
1522
|
},
|
|
1523
1523
|
{
|
|
1524
1524
|
"availableDocPages": [
|
|
@@ -1569,7 +1569,7 @@
|
|
|
1569
1569
|
"ripple"
|
|
1570
1570
|
],
|
|
1571
1571
|
"slug": "scout",
|
|
1572
|
-
"version": "26.11.
|
|
1572
|
+
"version": "26.11.3"
|
|
1573
1573
|
},
|
|
1574
1574
|
{
|
|
1575
1575
|
"availableDocPages": [
|
|
@@ -1622,7 +1622,7 @@
|
|
|
1622
1622
|
"refine"
|
|
1623
1623
|
],
|
|
1624
1624
|
"slug": "scroll",
|
|
1625
|
-
"version": "26.11.
|
|
1625
|
+
"version": "26.11.3"
|
|
1626
1626
|
},
|
|
1627
1627
|
{
|
|
1628
1628
|
"availableDocPages": [
|
|
@@ -1669,7 +1669,7 @@
|
|
|
1669
1669
|
"gesture"
|
|
1670
1670
|
],
|
|
1671
1671
|
"slug": "sentinel",
|
|
1672
|
-
"version": "26.11.
|
|
1672
|
+
"version": "26.11.3"
|
|
1673
1673
|
},
|
|
1674
1674
|
{
|
|
1675
1675
|
"availableDocPages": [
|
|
@@ -1709,7 +1709,7 @@
|
|
|
1709
1709
|
"refine"
|
|
1710
1710
|
],
|
|
1711
1711
|
"slug": "sigil",
|
|
1712
|
-
"version": "26.11.
|
|
1712
|
+
"version": "26.11.3"
|
|
1713
1713
|
},
|
|
1714
1714
|
{
|
|
1715
1715
|
"availableDocPages": [
|
|
@@ -1754,7 +1754,7 @@
|
|
|
1754
1754
|
"wayfinder"
|
|
1755
1755
|
],
|
|
1756
1756
|
"slug": "sourcerer",
|
|
1757
|
-
"version": "26.11.
|
|
1757
|
+
"version": "26.11.3"
|
|
1758
1758
|
},
|
|
1759
1759
|
{
|
|
1760
1760
|
"availableDocPages": [
|
|
@@ -1813,7 +1813,7 @@
|
|
|
1813
1813
|
"vault"
|
|
1814
1814
|
],
|
|
1815
1815
|
"slug": "spell",
|
|
1816
|
-
"version": "26.11.
|
|
1816
|
+
"version": "26.11.3"
|
|
1817
1817
|
},
|
|
1818
1818
|
{
|
|
1819
1819
|
"availableDocPages": [
|
|
@@ -1854,7 +1854,7 @@
|
|
|
1854
1854
|
"ripple"
|
|
1855
1855
|
],
|
|
1856
1856
|
"slug": "tandem",
|
|
1857
|
-
"version": "26.11.
|
|
1857
|
+
"version": "26.11.3"
|
|
1858
1858
|
},
|
|
1859
1859
|
{
|
|
1860
1860
|
"availableDocPages": [
|
|
@@ -1898,7 +1898,7 @@
|
|
|
1898
1898
|
"herald"
|
|
1899
1899
|
],
|
|
1900
1900
|
"slug": "tavern",
|
|
1901
|
-
"version": "26.11.
|
|
1901
|
+
"version": "26.11.3"
|
|
1902
1902
|
},
|
|
1903
1903
|
{
|
|
1904
1904
|
"availableDocPages": [
|
|
@@ -1966,7 +1966,7 @@
|
|
|
1966
1966
|
"vault"
|
|
1967
1967
|
],
|
|
1968
1968
|
"slug": "tempo",
|
|
1969
|
-
"version": "26.11.
|
|
1969
|
+
"version": "26.11.3"
|
|
1970
1970
|
},
|
|
1971
1971
|
{
|
|
1972
1972
|
"availableDocPages": [
|
|
@@ -2017,7 +2017,7 @@
|
|
|
2017
2017
|
"ripple"
|
|
2018
2018
|
],
|
|
2019
2019
|
"slug": "vault",
|
|
2020
|
-
"version": "26.11.
|
|
2020
|
+
"version": "26.11.3"
|
|
2021
2021
|
},
|
|
2022
2022
|
{
|
|
2023
2023
|
"availableDocPages": [
|
|
@@ -2063,7 +2063,7 @@
|
|
|
2063
2063
|
"refine"
|
|
2064
2064
|
],
|
|
2065
2065
|
"slug": "ward",
|
|
2066
|
-
"version": "26.11.
|
|
2066
|
+
"version": "26.11.3"
|
|
2067
2067
|
},
|
|
2068
2068
|
{
|
|
2069
2069
|
"availableDocPages": [
|
|
@@ -2117,8 +2117,8 @@
|
|
|
2117
2117
|
"herald"
|
|
2118
2118
|
],
|
|
2119
2119
|
"slug": "wayfinder",
|
|
2120
|
-
"version": "26.11.
|
|
2120
|
+
"version": "26.11.3"
|
|
2121
2121
|
}
|
|
2122
2122
|
],
|
|
2123
|
-
"version": "26.11.
|
|
2123
|
+
"version": "26.11.3"
|
|
2124
2124
|
}
|
package/data/llms-full.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vielzeug: Full Documentation
|
|
2
2
|
|
|
3
|
-
> Complete documentation for 43 packages. Version: 26.11.
|
|
3
|
+
> Complete documentation for 43 packages. Version: 26.11.3
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -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 |
|
|
@@ -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
package/data/manifest.json
CHANGED