@vielzeug/codex 26.11.4 → 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 +47 -45
- package/data/llms-full.txt +5 -5
- package/data/llms.txt +1 -1
- package/data/manifest.json +1 -1
- package/data/packages/assay.json +2 -1
- package/data/packages/necromancer.json +5 -1
- package/data/packages/refine.json +2 -2
- package/data/refine.json +752 -312
- package/data/search.json +5 -5
- 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.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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
2122
|
+
"version": "26.11.4"
|
|
2121
2123
|
}
|
|
2122
2124
|
],
|
|
2123
|
-
"version": "26.11.
|
|
2125
|
+
"version": "26.11.4"
|
|
2124
2126
|
}
|
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.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-
|
|
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
|
|
|
@@ -21935,8 +21935,8 @@ import type { OreButtonProps } from '@vielzeug/refine/button';
|
|
|
21935
21935
|
| Area | Components |
|
|
21936
21936
|
| --- | --- |
|
|
21937
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` |
|
|
21938
|
-
| Feedback | `alert`, `
|
|
21939
|
-
| 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` |
|
|
21940
21940
|
| Layout | `box`, `dock`, `grid`, `navbar`, `separator`, `sidebar` |
|
|
21941
21941
|
| Navigation | `breadcrumb`, `navigation-menu`, `pagination`, `stepper`, `tabs` |
|
|
21942
21942
|
| Overlay | `command-palette`, `dialog`, `drawer`, `menu`, `popover`, `spotlight`, `tooltip`, `tour` |
|
package/data/llms.txt
CHANGED
package/data/manifest.json
CHANGED
package/data/packages/assay.json
CHANGED
|
@@ -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';",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"apiSource": "export { animate } from './animate';\nexport { animateEach } from './animate-each';\nexport { NecromancerConfigError, NecromancerError, NecromancerUnsupportedError } from './errors';\nexport { captureLayout } from './layout';\nexport { shouldReduceMotion } from './motion';\nexport type {\n AnimateEachOptions,\n AnimateOptions,\n AnimationGroup,\n AnimationHandle,\n AnimationResult,\n KeyframeFactory,\n Keyframes,\n LayoutAnimationOptions,\n LayoutCaptureOptions,\n LayoutTransition,\n MotionMode,\n} from './types';\n",
|
|
2
|
+
"apiSource": "export { animate } from './animate';\nexport { animateEach } from './animate-each';\nexport { NecromancerConfigError, NecromancerError, NecromancerUnsupportedError } from './errors';\nexport { captureLayout } from './layout';\nexport { shouldReduceMotion } from './motion';\nexport { type SpringHandle, type SpringOptions, type SpringUpdate, spring } from './spring';\nexport type {\n AnimateEachOptions,\n AnimateOptions,\n AnimationGroup,\n AnimationHandle,\n AnimationResult,\n KeyframeFactory,\n Keyframes,\n LayoutAnimationOptions,\n LayoutCaptureOptions,\n LayoutTransition,\n MotionMode,\n} from './types';\n",
|
|
3
3
|
"docs": {
|
|
4
4
|
"index": "---\ntitle: 'Necromancer: Lifecycle-owned DOM animations'\ndescription: Lifecycle-owned Web Animations API primitives for native playback, groups, and additive FLIP transitions.\npackage: necromancer\ncategory: ui\nkeywords: [animation, web-animations-api, waapi, flip, stagger, reduced-motion]\nrelated: [orbit, ore]\nexports: [animate, animateEach, captureLayout]\nenvironments: [browser]\n---\n\n<!-- markdownlint-disable MD025 MD033 MD060 -->\n\n<PackageHero package=\"necromancer\" />\n\n## Why Necromancer?\n\nNative Web Animations API calls do not provide lifecycle ownership, reduced-motion policy, grouped playback, or layout transitions. Necromancer retains native keyframes and timing semantics while making ownership explicit for a component or DOM feature.\n\n```ts\n// Before\nconst animation = element.animate(keyframes, { duration: 180 });\nanimation.addEventListener('cancel', removeListeners);\n\n// After\nconst animation = animate(element, keyframes, { duration: 180 });\nanimation.dispose();\n```\n\n| Feature | Native WAAPI | Necromancer | Motion One |\n| --- | --- | --- | --- |\n| Bundle size | 0 B | <PackageInfo package=\"necromancer\" type=\"size\" /> | ~18 kB |\n| Root dependencies | <ore-icon name=\"check\" size=\"16\"></ore-icon> | <ore-icon name=\"check\" size=\"16\"></ore-icon> | <ore-icon name=\"x\" size=\"16\"></ore-icon> |\n| Lifecycle handle | Manual | `dispose()` | Library-specific controls |\n| Reduced motion | Manual | `motion: 'system'` default | Configuration required |\n| Layout transitions | Manual FLIP math | `captureLayout().animate()` | Separate API |\n\n<div class=\"decision-callout\">\n\n**Use Necromancer when** you need native browser animations with explicit cancellation, reduced-motion behavior, staggered groups, or positional FLIP transitions.\n\n**Consider CSS transitions when** a static style change needs no playback control, cleanup, or layout measurement.\n\n</div>\n\n## Installation\n\n::: code-group\n\n```sh [pnpm]\npnpm add @vielzeug/necromancer\n```\n\n```sh [npm]\nnpm install @vielzeug/necromancer\n```\n\n```sh [yarn]\nyarn add @vielzeug/necromancer\n```\n\n:::\n\n## Quick Start\n\nStart the animation after its DOM element mounts and release it when its UI owner is removed.\n\n```ts\nimport { animate } from '@vielzeug/necromancer';\n\nconst notice = document.createElement('p');\nnotice.textContent = 'Saved';\ndocument.body.append(notice);\n\nconst animation = animate(\n notice,\n [{ opacity: 0, transform: 'translateY(8px)' }, { opacity: 1, transform: 'translateY(0)' }],\n { duration: 180, easing: 'ease-out' },\n);\n\nawait animation.result;\nanimation.dispose();\n```\n\n## Features\n\n<div class=\"features-grid\">\n\n- `animate()`: Native element animation with lifecycle ownership and direct native access\n- `animateEach()`: Group ownership with stable keyframe factories and `stagger`\n- `captureLayout()`: One-shot FLIP transition with additive `translate` (position) and `scale` (size)\n- `motion`: `'system'` reduced-motion support with the same keyframes on instant timing\n- Native timing: Omitted timing fields retain Web Animations API behavior\n- `signal`: Abort a handle from its parent lifecycle\n- `dispose()`: Idempotent cleanup with `[Symbol.dispose]()`\n\n</div>\n\n## Deliberate Scope\n\nNecromancer owns explicit WAAPI keyframes. It does not generate CSS keyframes, observe CSS transitions, watch mutations, simulate springs, interpolate SVG paths, or run a JavaScript tween loop. Use CSS for declarative style changes and choose a dedicated tool when those capabilities are required.\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- [Orbit](/orbit/): Position floating UI before animating its appearance.\n- [Ore](/ore/): Own Necromancer handles in a custom element's mount and disposal lifecycle.\n</div>\n\n<!-- markdownlint-enable MD025 MD033 MD060 -->\n",
|
|
5
5
|
"api": "---\ntitle: 'Necromancer: API Reference'\ndescription: API reference for @vielzeug/necromancer animation ownership, groups, reduced motion, and FLIP transitions.\n---\n\n[[toc]]\n\n## API Overview\n\n| Symbol | Purpose | Execution mode | Common gotcha |\n| --- | --- | --- | --- |\n| `animate()` | Animate one element | Sync | Omitted timing fields use native WAAPI behavior |\n| `animateEach()` | Animate a unique element group | Sync | Non-zero `stagger` needs numeric `delay` |\n| `captureLayout()` | Capture positions and create a one-shot FLIP transition | Sync | Capture before changing layout |\n| `shouldReduceMotion()` | Report whether a motion mode reduces visible movement | Sync | `'system'` reads `prefers-reduced-motion`; false without `matchMedia` |\n| `NecromancerError` | Base package error | Sync | Use `instanceof NecromancerError` to narrow unknown errors |\n\n## Package Entry Point\n\n| Import | Purpose |\n| --- | --- |\n| `@vielzeug/necromancer` | Animation functions, types, and errors |\n| `@vielzeug/necromancer/testing` | jsdom test fakes for `Element.animate()` and `getBoundingClientRect()` |\n\n## Animation Functions\n\n### `animate()`\n\n```ts\nfunction animate(element: Element, keyframes: Keyframes, options?: AnimateOptions): AnimationHandle;\n```\n\nStarts a lifecycle-owned native Web Animation. Native timing options, including an omitted or zero `duration`, are preserved.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `element` | `Element` | Element animated through its native `animate()` method. |\n| `keyframes` | `Keyframes` | Native keyframe array or property-indexed keyframes. |\n| `options` | `AnimateOptions` | Native timing plus motion and cancellation ownership. |\n\n**Returns:** An `AnimationHandle` with native playback access and explicit disposal.\n\n**Example:**\n\n```ts\nimport { animate } from '@vielzeug/necromancer';\n\nconst handle = animate(element, [{ opacity: 0 }, { opacity: 1 }], { duration: 180 });\nhandle.animation.pause();\nconst result = await handle.result;\nhandle.dispose();\n```\n\n---\n\n### `animateEach()`\n\n```ts\nfunction animateEach<ElementType extends Element>(\n elements: Iterable<ElementType>,\n keyframes: Keyframes | KeyframeFactory<ElementType>,\n options?: AnimateEachOptions,\n): AnimationGroup;\n```\n\nStarts animations for unique elements in first-seen order. Necromancer resolves every keyframe factory before starting the first native animation.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `elements` | `Iterable<ElementType>` | Elements animated once in first-seen order. |\n| `keyframes` | `Keyframes \\| KeyframeFactory<ElementType>` | Shared keyframes or a subtype-preserving factory. |\n| `options` | `AnimateEachOptions` | Animation options plus a stagger interval. |\n\n**Returns:** An `AnimationGroup` containing child handles and ordered results.\n\n**Example:**\n\n```ts\nimport { animateEach } from '@vielzeug/necromancer';\n\nconst group = animateEach(document.querySelectorAll<HTMLElement>('.item'), [{ opacity: 0 }, { opacity: 1 }], {\n duration: 180,\n stagger: 30,\n});\nawait group.results;\n```\n\n### `shouldReduceMotion()`\n\n```ts\nfunction shouldReduceMotion(mode: MotionMode): boolean;\n```\n\nReports whether the requested motion preference reduces visible movement: the same check `animate()` applies internally, exposed so hand-rolled effects (scroll behavior, tweens) stay consistent with it. `'full'` is always `false`, `'reduced'` is always `true`, and `'system'` reads the `prefers-reduced-motion` media query (`false` where `matchMedia` is unavailable).\n\n```ts\nimport { shouldReduceMotion } from '@vielzeug/necromancer';\n\nelement.scrollIntoView({ behavior: shouldReduceMotion('system') ? 'auto' : 'smooth' });\n```\n\n## Layout Functions\n\n### `captureLayout()`\n\n```ts\nfunction captureLayout<ElementType extends Element>(\n elements: Iterable<ElementType>,\n options?: LayoutCaptureOptions<ElementType>,\n): LayoutTransition<ElementType>;\n```\n\nCaptures unique elements' positions and sizes and returns a one-shot transition. Rotation and other transforms are not captured or compensated.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `elements` | `Iterable<ElementType>` | Elements measured before a layout change. |\n| `options` | `LayoutCaptureOptions<ElementType>` | Optional stable key mapping for replacement nodes. |\n\n**Returns:** A `LayoutTransition<ElementType>` that measures committed layout once and creates an `AnimationGroup`.\n\n**Example:**\n\n```ts\nimport { captureLayout } from '@vielzeug/necromancer';\n\nconst transition = captureLayout(beforeItems, {\n getKey: (element) => element.getAttribute('data-id')!,\n});\n\nrenderReorderedItems();\n\nconst group = transition.animate({\n duration: 220,\n easing: 'ease-out',\n elements: afterItems,\n});\n```\n\nCalling `animate()` twice on the same transition throws `NecromancerConfigError`.\n\n## Types\n\n### `MotionMode`\n\n```ts\ntype MotionMode = 'full' | 'reduced' | 'system';\n```\n\n`'system'` is the default. Reduced motion preserves the supplied keyframes while normalizing delay, duration, and end delay to `0`, and iterations to `1`.\n\n### `AnimationResult`\n\n```ts\ntype AnimationResult =\n | { readonly status: 'finished' }\n | { readonly reason?: unknown; readonly status: 'cancelled' };\n```\n\nA reduced animation finishes: reduction is decided at call time and `shouldReduceMotion()` answers it, so the result reports only what the caller could not know. `cancelled` carries the reason the animation was cancelled: the value passed to `dispose()`, the abort reason of the owning `signal`, or the native rejection reason when something outside Necromancer cancelled the animation. A bare `dispose()` carries no reason. The independent `disposed` property becomes `true` only when the lifecycle owner is explicitly disposed.\n\n### `AnimateOptions`\n\n```ts\ntype AnimateOptions = KeyframeAnimationOptions & {\n readonly motion?: MotionMode;\n readonly signal?: AbortSignal;\n};\n```\n\nNative timing fields pass through unchanged unless reduced motion normalizes timing. `signal` disposes the returned handle when aborted.\n\n### `AnimateEachOptions`\n\n```ts\ntype AnimateEachOptions = AnimateOptions & {\n readonly stagger?: number;\n};\n```\n\n`stagger` is a finite, non-negative millisecond offset.\n\n### `LayoutCaptureOptions`\n\n```ts\ninterface LayoutCaptureOptions<ElementType extends Element = Element> {\n readonly getKey?: (element: ElementType) => string;\n}\n```\n\n`getKey` maps a captured element and its committed replacement to the same stable, non-empty string. Duplicate or empty keys throw `NecromancerConfigError`.\n\n### `LayoutAnimationOptions`\n\n```ts\ntype LayoutAnimationOptions<ElementType extends Element = Element> = AnimateEachOptions & {\n readonly elements?: Iterable<ElementType>;\n};\n```\n\n`elements` is the collection in its committed layout. Omit it to animate the same captured elements. With `getKey`, replacement elements animate from the positions of their captured predecessors. Unmatched, removed, and newly entered elements are ignored.\n\n### `Keyframes` and `KeyframeFactory`\n\n```ts\ntype Keyframes = readonly Keyframe[] | PropertyIndexedKeyframes;\ntype KeyframeFactory<ElementType extends Element = Element> = (\n element: ElementType,\n index: number,\n total: number,\n) => Keyframes;\n```\n\nAccepts a `readonly` array so a reusable `as const` keyframe list can be passed without a cast.\n\n### `AnimationHandle`\n\n```ts\ninterface AnimationHandle {\n readonly animation: Animation;\n readonly result: Promise<AnimationResult>;\n readonly disposed: boolean;\n dispose(reason?: unknown): void;\n [Symbol.dispose](): void;\n}\n```\n\n| Member | Description |\n| --- | --- |\n| `animation` | Owned native animation used for playback control. |\n| `result` | Resolves with the first terminal outcome. |\n| `disposed` | Reports explicit owner disposal. |\n| `dispose(reason?)` | Cancels the animation and releases its abort listener. |\n| `[Symbol.dispose]()` | Delegates to `dispose()`. |\n\n### `AnimationGroup`\n\n```ts\ninterface AnimationGroup {\n readonly handles: readonly AnimationHandle[];\n readonly results: Promise<readonly AnimationResult[]>;\n readonly disposed: boolean;\n dispose(reason?: unknown): void;\n [Symbol.dispose](): void;\n}\n```\n\n| Member | Description |\n| --- | --- |\n| `handles` | Child handles in input order. |\n| `results` | Resolves with every child outcome in handle order. |\n| `disposed` | Reports explicit group disposal. |\n| `dispose(reason?)` | Disposes every child. |\n| `[Symbol.dispose]()` | Delegates to `dispose()`. |\n\n### `LayoutTransition`\n\n```ts\ninterface LayoutTransition<ElementType extends Element = Element> {\n animate(options?: LayoutAnimationOptions<ElementType>): AnimationGroup;\n}\n```\n\n| Method | Description |\n| --- | --- |\n| `animate(options?)` | Measures committed elements and creates the one allowed layout animation group. |\n\n## Errors\n\n| Error | Trigger |\n| --- | --- |\n| `NecromancerError` | Base class for package errors |\n| `NecromancerConfigError` | Invalid stagger, incompatible delay, or reused layout transition |\n| `NecromancerUnsupportedError` | `Element.animate()` is unavailable |\n\n## Testing (`@vielzeug/necromancer/testing`)\n\njsdom (and most non-browser DOM environments) do not implement `Element.animate()`. Import these from the `/testing` sub-path, not the root entry point.\n\n### `AnimationCall`\n\n```ts\ntype AnimationCall = {\n readonly animation: FakeAnimation;\n readonly keyframes: Keyframe[] | PropertyIndexedKeyframes;\n readonly options?: KeyframeAnimationOptions;\n};\n```\n\nOne recorded invocation of `Element.prototype.animate` from `installFakeAnimations()`.\n\n### `installFakeAnimations()`\n\n```ts\nfunction installFakeAnimations(): {\n readonly calls: readonly AnimationCall[];\n restore(): void;\n [Symbol.dispose](): void;\n};\n```\n\nReplaces `Element.prototype.animate` with a deterministic lifecycle fake for the duration of a test. `calls` records every invocation in order. Call `restore()` or use an explicit resource-management `using` declaration to put the original implementation back. The fake does not implement native playback controls such as `pause()` or `reverse()`.\n\n```ts\nimport { installFakeAnimations } from '@vielzeug/necromancer/testing';\n\nusing animations = installFakeAnimations();\nconst handle = animate(element, [{ opacity: 0 }, { opacity: 1 }]);\n\nanimations.calls[0]?.animation.finish();\nawait handle.result; // { status: 'finished' }\n```\n\n### `FakeAnimation`\n\n```ts\nclass FakeAnimation {\n cancelCallCount: number;\n finishCallCount: number;\n finished: Promise<void>;\n cancel(): void;\n finish(): void;\n}\n```\n\nA minimal `Animation` stand-in. `cancel()` rejects `finished` with an `AbortError`; `finish()` resolves it. `cancelCallCount`/`finishCallCount` track how many times each was called, in place of a test-runner-specific spy.\n\n### `createRect()`\n\n```ts\nfunction createRect(x: number, y: number, width?: number, height?: number): DOMRect;\n```\n\nBuilds a `DOMRect` for mocking `Element.getBoundingClientRect()` in `captureLayout()` tests. `width`/`height` default to `20`.\n",
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
"NecromancerUnsupportedError": "export { NecromancerConfigError, NecromancerError, NecromancerUnsupportedError } from './errors';",
|
|
37
37
|
"captureLayout": "export { captureLayout } from './layout';",
|
|
38
38
|
"shouldReduceMotion": "export { shouldReduceMotion } from './motion';",
|
|
39
|
+
"SpringHandle": "export { type SpringHandle, type SpringOptions, type SpringUpdate, spring } from './spring';",
|
|
40
|
+
"SpringOptions": "export { type SpringHandle, type SpringOptions, type SpringUpdate, spring } from './spring';",
|
|
41
|
+
"SpringUpdate": "export { type SpringHandle, type SpringOptions, type SpringUpdate, spring } from './spring';",
|
|
42
|
+
"spring": "export { type SpringHandle, type SpringOptions, type SpringUpdate, spring } from './spring';",
|
|
39
43
|
"AnimateEachOptions": "export type {\n AnimateEachOptions,\n AnimateOptions,\n AnimationGroup,\n AnimationHandle,\n AnimationResult,\n KeyframeFactory,\n Keyframes,\n LayoutAnimationOptions,\n LayoutCaptureOptions,\n LayoutTransition,\n MotionMode,\n} from './types';",
|
|
40
44
|
"AnimateOptions": "export type {\n AnimateEachOptions,\n AnimateOptions,\n AnimationGroup,\n AnimationHandle,\n AnimationResult,\n KeyframeFactory,\n Keyframes,\n LayoutAnimationOptions,\n LayoutCaptureOptions,\n LayoutTransition,\n MotionMode,\n} from './types';",
|
|
41
45
|
"AnimationGroup": "export type {\n AnimateEachOptions,\n AnimateOptions,\n AnimationGroup,\n AnimationHandle,\n AnimationResult,\n KeyframeFactory,\n Keyframes,\n LayoutAnimationOptions,\n LayoutCaptureOptions,\n LayoutTransition,\n MotionMode,\n} from './types';",
|