@box-kite/react 2.2.15 → 2.2.17
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/.claude/rules/box-kite-rules.md +1 -1
- package/.claude/skills/box-kite/SKILL.md +1 -1
- package/.claude/skills/box-kite/references/styling.md +1 -1
- package/.cursor/rules/box-kite.mdc +1 -1
- package/AGENTS.md +1 -1
- package/BOX_AI_CONTEXT.md +16 -0
- package/BOX_KITE_AI_CONTEXT.md +16 -0
- package/behavior.cjs +1 -1
- package/behavior.mjs +16 -16
- package/catalog.cjs +1 -1
- package/catalog.mjs +1 -1
- package/client.cjs +1 -1
- package/client.mjs +10 -10
- package/components/accordion.cjs +1 -1
- package/components/accordion.mjs +95 -91
- package/components/calendar.cjs +1 -1
- package/components/calendar.mjs +212 -210
- package/components/chart.cjs +1 -1
- package/components/chart.d.ts +8 -3
- package/components/chart.mjs +70 -65
- package/components/combobox.cjs +1 -1
- package/components/combobox.mjs +187 -186
- package/components/dashboard.cjs +1 -1
- package/components/dashboard.d.ts +1 -44
- package/components/dashboard.mjs +202 -201
- package/components/dataGrid/components/dataGridListLayout.d.ts +1 -1
- package/components/dataGrid/contracts/dataGridContract.d.ts +1 -1
- package/components/dataGrid/models/gridModel.d.ts +1 -1
- package/components/dataGrid.cjs +2 -2
- package/components/dataGrid.mjs +10 -10
- package/components/dateField.cjs +1 -1
- package/components/dateField.mjs +96 -96
- package/components/datePicker.cjs +1 -1
- package/components/datePicker.mjs +286 -285
- package/components/dialog.cjs +1 -1
- package/components/dialog.d.ts +2 -64
- package/components/dialog.mjs +131 -126
- package/components/form.cjs +1 -1
- package/components/form.d.ts +4 -3
- package/components/form.mjs +25 -22
- package/components/menu.cjs +1 -1
- package/components/menu.d.ts +2 -73
- package/components/menu.mjs +220 -215
- package/components/overlay.cjs +1 -1
- package/components/overlay.mjs +44 -43
- package/components/popover.cjs +1 -1
- package/components/popover.d.ts +1 -41
- package/components/popover.mjs +56 -51
- package/components/presence.cjs +1 -1
- package/components/presence.mjs +1 -1
- package/components/radioGroup.cjs +1 -1
- package/components/radioGroup.mjs +59 -55
- package/components/semantics.d.ts +29 -29
- package/components/slider.cjs +1 -1
- package/components/slider.d.ts +1 -55
- package/components/slider.mjs +92 -90
- package/components/sortableList.cjs +1 -1
- package/components/sortableList.mjs +149 -148
- package/components/swipeItem.cjs +1 -1
- package/components/swipeItem.mjs +100 -100
- package/components/tabs.cjs +1 -1
- package/components/tabs.mjs +135 -132
- package/components/toaster.cjs +1 -1
- package/components/toaster.d.ts +1 -37
- package/components/toaster.mjs +130 -128
- package/components/tooltip.cjs +1 -1
- package/components/tooltip.d.ts +1 -34
- package/components/tooltip.mjs +73 -69
- package/components/virtualList.cjs +1 -1
- package/components/virtualList.mjs +88 -87
- package/docs/props.md +2 -2
- package/interactionListening.cjs +1 -1
- package/interactionListening.mjs +3 -3
- package/layer.cjs +1 -1
- package/layer.mjs +1 -1
- package/motion.cjs +1 -1
- package/motion.mjs +30 -20
- package/package.json +41 -40
- package/placement.cjs +1 -1
- package/placement.mjs +1 -1
- package/platform.cjs +1 -1
- package/platform.mjs +17 -14
- package/react/animation/useHeldContent.d.ts +6 -0
- package/react/animation/usePresence.d.ts +4 -0
- package/react/componentsContext.d.ts +1 -1
- package/react-shared.cjs +1 -1
- package/react-shared.mjs +1 -1
- package/scrolling.cjs +1 -1
- package/scrolling.mjs +1 -1
- package/utils/chart/chartUtils.d.ts +3 -2
- package/utils/dashboard/dashboardUtils.d.ts +1 -1
- package/utils/dom/domUtils.d.ts +6 -0
- package/create/src/agents.d.ts +0 -22
- package/create/src/agents.test.d.ts +0 -1
- package/create/src/index.d.ts +0 -1
- package/create/src/options.d.ts +0 -31
- package/create/src/options.test.d.ts +0 -1
- package/create/src/packageManager.d.ts +0 -5
- package/create/src/project.d.ts +0 -27
- package/create/src/project.test.d.ts +0 -1
- package/create/templates/ts/designs/azure.d.ts +0 -5
- package/create/templates/ts/designs/ember.d.ts +0 -5
- package/create/templates/ts/designs/mono.d.ts +0 -5
- package/create/templates/ts/src/App.d.ts +0 -2
- package/create/templates/ts/src/design.d.ts +0 -5
- package/create/templates/ts/src/main.d.ts +0 -0
- package/mcp/src/data.d.ts +0 -90
- package/mcp/src/data.test.d.ts +0 -1
- package/mcp/src/engine.d.ts +0 -23
- package/mcp/src/index.d.ts +0 -1
- package/mcp/src/search.d.ts +0 -38
- package/mcp/src/search.test.d.ts +0 -1
- package/mcp/src/server.d.ts +0 -18
- package/mcp/src/server.test.d.ts +0 -1
- package/mcp/src/styles.d.ts +0 -27
- package/mcp/src/styles.test.d.ts +0 -1
- package/mcp/src/tools.d.ts +0 -18
- package/mcp/src/vocabulary.d.ts +0 -41
- package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +0 -24
- package/registry/blocks/dashboard-shell/dashboard-stats.d.ts +0 -13
- package/registry/blocks/data-grid/invoice-rows.d.ts +0 -15
- package/registry/blocks/data-grid/invoices-grid.d.ts +0 -1
- package/registry/blocks/settings-form/settings-form.d.ts +0 -17
- package/registry/designs/store/address-form.d.ts +0 -11
- package/registry/designs/store/cart-items.d.ts +0 -10
- package/registry/designs/store/cart-page.d.ts +0 -4
- package/registry/designs/store/checkout-page.d.ts +0 -7
- package/registry/designs/store/credit-card-form.d.ts +0 -10
- package/registry/designs/store/form-field.d.ts +0 -19
- package/registry/designs/store/order-summary.d.ts +0 -18
- package/registry/designs/store/product-art.d.ts +0 -26
- package/registry/designs/store/product-card.d.ts +0 -11
- package/registry/designs/store/product-gallery.d.ts +0 -11
- package/registry/designs/store/product-grid.d.ts +0 -10
- package/registry/designs/store/product-page.d.ts +0 -5
- package/registry/designs/store/quantity-stepper.d.ts +0 -13
- package/registry/designs/store/shipping-method.d.ts +0 -14
- package/registry/designs/store/store-data.d.ts +0 -53
- package/registry/designs/store/store-design.d.ts +0 -63
- package/registry/designs/store/store-shell.d.ts +0 -12
- package/registry/designs/store/storefront-page.d.ts +0 -4
- package/registry/designs/store/variant-picker.d.ts +0 -15
- package/supabase/functions/collect/index.d.ts +0 -30
- package/supabase/functions/collect/index.test.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box-kite/react",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"pages/**"
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
"check:conventions": "node scripts/check-component-conventions.mjs",
|
|
110
110
|
"check:agents": "node scripts/check-agent-files.mjs",
|
|
111
111
|
"docs:agents": "node scripts/check-agent-files.mjs --fix",
|
|
112
|
+
"check:types": "node scripts/check-published-types.mjs",
|
|
112
113
|
"check:package": "publint dist && attw --pack dist --ignore-rules false-esm cjs-resolves-to-esm internal-resolution-error && publint dist-core && attw --pack dist-core --ignore-rules false-esm cjs-resolves-to-esm internal-resolution-error && publint dist-mcp && publint dist-create",
|
|
113
114
|
"bench": "node bench/run.mjs",
|
|
114
115
|
"compare": "node dev/compare/report.mjs",
|
|
@@ -131,7 +132,7 @@
|
|
|
131
132
|
"./interactionListening.mjs"
|
|
132
133
|
],
|
|
133
134
|
"gzip": true,
|
|
134
|
-
"limit": "
|
|
135
|
+
"limit": "43.33 kB"
|
|
135
136
|
},
|
|
136
137
|
{
|
|
137
138
|
"name": "Box in a Server Component (react-server entry)",
|
|
@@ -144,7 +145,7 @@
|
|
|
144
145
|
"./interactionListening.mjs"
|
|
145
146
|
],
|
|
146
147
|
"gzip": true,
|
|
147
|
-
"limit": "
|
|
148
|
+
"limit": "40.72 kB"
|
|
148
149
|
},
|
|
149
150
|
{
|
|
150
151
|
"name": "Behavior primitives (a11y entry)",
|
|
@@ -157,7 +158,7 @@
|
|
|
157
158
|
"./interactionListening.mjs"
|
|
158
159
|
],
|
|
159
160
|
"gzip": true,
|
|
160
|
-
"limit": "
|
|
161
|
+
"limit": "5.26 kB"
|
|
161
162
|
},
|
|
162
163
|
{
|
|
163
164
|
"name": "Anchor positioning (anchor entry)",
|
|
@@ -170,7 +171,7 @@
|
|
|
170
171
|
"./interactionListening.mjs"
|
|
171
172
|
],
|
|
172
173
|
"gzip": true,
|
|
173
|
-
"limit": "
|
|
174
|
+
"limit": "4.27 kB"
|
|
174
175
|
},
|
|
175
176
|
{
|
|
176
177
|
"name": "Component catalog (catalog entry)",
|
|
@@ -183,7 +184,7 @@
|
|
|
183
184
|
"./interactionListening.mjs"
|
|
184
185
|
],
|
|
185
186
|
"gzip": true,
|
|
186
|
-
"limit": "
|
|
187
|
+
"limit": "64.50 kB"
|
|
187
188
|
},
|
|
188
189
|
{
|
|
189
190
|
"name": "Spec renderer (spec entry)",
|
|
@@ -196,7 +197,7 @@
|
|
|
196
197
|
"./interactionListening.mjs"
|
|
197
198
|
],
|
|
198
199
|
"gzip": true,
|
|
199
|
-
"limit": "
|
|
200
|
+
"limit": "6.75 kB"
|
|
200
201
|
},
|
|
201
202
|
{
|
|
202
203
|
"name": "Ecosystem interop (interop entry)",
|
|
@@ -209,7 +210,7 @@
|
|
|
209
210
|
"./interactionListening.mjs"
|
|
210
211
|
],
|
|
211
212
|
"gzip": true,
|
|
212
|
-
"limit": "
|
|
213
|
+
"limit": "6.00 kB"
|
|
213
214
|
},
|
|
214
215
|
{
|
|
215
216
|
"name": "Analytics (analytics entry, no React)",
|
|
@@ -222,7 +223,7 @@
|
|
|
222
223
|
"./interactionListening.mjs"
|
|
223
224
|
],
|
|
224
225
|
"gzip": true,
|
|
225
|
-
"limit": "
|
|
226
|
+
"limit": "3.94 kB"
|
|
226
227
|
},
|
|
227
228
|
{
|
|
228
229
|
"name": "Dates, times and zones (date entry, no React)",
|
|
@@ -235,13 +236,13 @@
|
|
|
235
236
|
"./interactionListening.mjs"
|
|
236
237
|
],
|
|
237
238
|
"gzip": true,
|
|
238
|
-
"limit": "
|
|
239
|
+
"limit": "9.59 kB"
|
|
239
240
|
},
|
|
240
241
|
{
|
|
241
242
|
"name": "Core engine (@box-kite/core, no React)",
|
|
242
243
|
"path": "dist-core/core.mjs",
|
|
243
244
|
"gzip": true,
|
|
244
|
-
"limit": "
|
|
245
|
+
"limit": "41.95 kB",
|
|
245
246
|
"ignore": [
|
|
246
247
|
"./diagnostics-*",
|
|
247
248
|
"./themeReveal-*",
|
|
@@ -259,7 +260,7 @@
|
|
|
259
260
|
"./interactionListening.mjs"
|
|
260
261
|
],
|
|
261
262
|
"gzip": true,
|
|
262
|
-
"limit": "
|
|
263
|
+
"limit": "46.14 kB"
|
|
263
264
|
},
|
|
264
265
|
{
|
|
265
266
|
"name": "Popover",
|
|
@@ -272,7 +273,7 @@
|
|
|
272
273
|
"./interactionListening.mjs"
|
|
273
274
|
],
|
|
274
275
|
"gzip": true,
|
|
275
|
-
"limit": "
|
|
276
|
+
"limit": "47.67 kB"
|
|
276
277
|
},
|
|
277
278
|
{
|
|
278
279
|
"name": "Menu",
|
|
@@ -285,7 +286,7 @@
|
|
|
285
286
|
"./interactionListening.mjs"
|
|
286
287
|
],
|
|
287
288
|
"gzip": true,
|
|
288
|
-
"limit": "
|
|
289
|
+
"limit": "49.98 kB"
|
|
289
290
|
},
|
|
290
291
|
{
|
|
291
292
|
"name": "Accordion",
|
|
@@ -298,7 +299,7 @@
|
|
|
298
299
|
"./interactionListening.mjs"
|
|
299
300
|
],
|
|
300
301
|
"gzip": true,
|
|
301
|
-
"limit": "
|
|
302
|
+
"limit": "44.92 kB"
|
|
302
303
|
},
|
|
303
304
|
{
|
|
304
305
|
"name": "Agent",
|
|
@@ -311,7 +312,7 @@
|
|
|
311
312
|
"./interactionListening.mjs"
|
|
312
313
|
],
|
|
313
314
|
"gzip": true,
|
|
314
|
-
"limit": "
|
|
315
|
+
"limit": "45.62 kB"
|
|
315
316
|
},
|
|
316
317
|
{
|
|
317
318
|
"name": "Markdown",
|
|
@@ -324,7 +325,7 @@
|
|
|
324
325
|
"./interactionListening.mjs"
|
|
325
326
|
],
|
|
326
327
|
"gzip": true,
|
|
327
|
-
"limit": "
|
|
328
|
+
"limit": "43.93 kB"
|
|
328
329
|
},
|
|
329
330
|
{
|
|
330
331
|
"name": "List",
|
|
@@ -337,7 +338,7 @@
|
|
|
337
338
|
"./interactionListening.mjs"
|
|
338
339
|
],
|
|
339
340
|
"gzip": true,
|
|
340
|
-
"limit": "
|
|
341
|
+
"limit": "45.25 kB"
|
|
341
342
|
},
|
|
342
343
|
{
|
|
343
344
|
"name": "SwipeItem",
|
|
@@ -350,7 +351,7 @@
|
|
|
350
351
|
"./interactionListening.mjs"
|
|
351
352
|
],
|
|
352
353
|
"gzip": true,
|
|
353
|
-
"limit": "
|
|
354
|
+
"limit": "48.54 kB"
|
|
354
355
|
},
|
|
355
356
|
{
|
|
356
357
|
"name": "SortableList",
|
|
@@ -363,7 +364,7 @@
|
|
|
363
364
|
"./interactionListening.mjs"
|
|
364
365
|
],
|
|
365
366
|
"gzip": true,
|
|
366
|
-
"limit": "
|
|
367
|
+
"limit": "48.86 kB"
|
|
367
368
|
},
|
|
368
369
|
{
|
|
369
370
|
"name": "VirtualList",
|
|
@@ -376,7 +377,7 @@
|
|
|
376
377
|
"./interactionListening.mjs"
|
|
377
378
|
],
|
|
378
379
|
"gzip": true,
|
|
379
|
-
"limit": "
|
|
380
|
+
"limit": "47.49 kB"
|
|
380
381
|
},
|
|
381
382
|
{
|
|
382
383
|
"name": "Skeleton",
|
|
@@ -389,7 +390,7 @@
|
|
|
389
390
|
"./interactionListening.mjs"
|
|
390
391
|
],
|
|
391
392
|
"gzip": true,
|
|
392
|
-
"limit": "
|
|
393
|
+
"limit": "43.24 kB"
|
|
393
394
|
},
|
|
394
395
|
{
|
|
395
396
|
"name": "Tabs",
|
|
@@ -402,7 +403,7 @@
|
|
|
402
403
|
"./interactionListening.mjs"
|
|
403
404
|
],
|
|
404
405
|
"gzip": true,
|
|
405
|
-
"limit": "
|
|
406
|
+
"limit": "46.11 kB"
|
|
406
407
|
},
|
|
407
408
|
{
|
|
408
409
|
"name": "Slider",
|
|
@@ -415,7 +416,7 @@
|
|
|
415
416
|
"./interactionListening.mjs"
|
|
416
417
|
],
|
|
417
418
|
"gzip": true,
|
|
418
|
-
"limit": "
|
|
419
|
+
"limit": "45.24 kB"
|
|
419
420
|
},
|
|
420
421
|
{
|
|
421
422
|
"name": "Progress",
|
|
@@ -428,7 +429,7 @@
|
|
|
428
429
|
"./interactionListening.mjs"
|
|
429
430
|
],
|
|
430
431
|
"gzip": true,
|
|
431
|
-
"limit": "
|
|
432
|
+
"limit": "43.20 kB"
|
|
432
433
|
},
|
|
433
434
|
{
|
|
434
435
|
"name": "Toaster",
|
|
@@ -441,7 +442,7 @@
|
|
|
441
442
|
"./interactionListening.mjs"
|
|
442
443
|
],
|
|
443
444
|
"gzip": true,
|
|
444
|
-
"limit": "
|
|
445
|
+
"limit": "46.91 kB"
|
|
445
446
|
},
|
|
446
447
|
{
|
|
447
448
|
"name": "DateField",
|
|
@@ -454,7 +455,7 @@
|
|
|
454
455
|
"./interactionListening.mjs"
|
|
455
456
|
],
|
|
456
457
|
"gzip": true,
|
|
457
|
-
"limit": "
|
|
458
|
+
"limit": "52.11 kB"
|
|
458
459
|
},
|
|
459
460
|
{
|
|
460
461
|
"name": "Calendar",
|
|
@@ -467,7 +468,7 @@
|
|
|
467
468
|
"./interactionListening.mjs"
|
|
468
469
|
],
|
|
469
470
|
"gzip": true,
|
|
470
|
-
"limit": "
|
|
471
|
+
"limit": "51.53 kB"
|
|
471
472
|
},
|
|
472
473
|
{
|
|
473
474
|
"name": "DatePicker",
|
|
@@ -480,7 +481,7 @@
|
|
|
480
481
|
"./interactionListening.mjs"
|
|
481
482
|
],
|
|
482
483
|
"gzip": true,
|
|
483
|
-
"limit": "
|
|
484
|
+
"limit": "65.70 kB"
|
|
484
485
|
},
|
|
485
486
|
{
|
|
486
487
|
"name": "DateTime",
|
|
@@ -493,7 +494,7 @@
|
|
|
493
494
|
"./interactionListening.mjs"
|
|
494
495
|
],
|
|
495
496
|
"gzip": true,
|
|
496
|
-
"limit": "
|
|
497
|
+
"limit": "46.78 kB"
|
|
497
498
|
},
|
|
498
499
|
{
|
|
499
500
|
"name": "TimeZoneSelect",
|
|
@@ -506,7 +507,7 @@
|
|
|
506
507
|
"./interactionListening.mjs"
|
|
507
508
|
],
|
|
508
509
|
"gzip": true,
|
|
509
|
-
"limit": "
|
|
510
|
+
"limit": "54.68 kB"
|
|
510
511
|
},
|
|
511
512
|
{
|
|
512
513
|
"name": "Combobox",
|
|
@@ -519,7 +520,7 @@
|
|
|
519
520
|
"./interactionListening.mjs"
|
|
520
521
|
],
|
|
521
522
|
"gzip": true,
|
|
522
|
-
"limit": "
|
|
523
|
+
"limit": "52.66 kB"
|
|
523
524
|
},
|
|
524
525
|
{
|
|
525
526
|
"name": "Dashboard",
|
|
@@ -532,7 +533,7 @@
|
|
|
532
533
|
"./interactionListening.mjs"
|
|
533
534
|
],
|
|
534
535
|
"gzip": true,
|
|
535
|
-
"limit": "
|
|
536
|
+
"limit": "49.20 kB"
|
|
536
537
|
},
|
|
537
538
|
{
|
|
538
539
|
"name": "DataGrid",
|
|
@@ -547,7 +548,7 @@
|
|
|
547
548
|
"../dataGridDateParts.mjs"
|
|
548
549
|
],
|
|
549
550
|
"gzip": true,
|
|
550
|
-
"limit": "
|
|
551
|
+
"limit": "99.89 kB"
|
|
551
552
|
},
|
|
552
553
|
{
|
|
553
554
|
"name": "Interaction delivery, the chunk the first Box.onInteraction fetches",
|
|
@@ -557,7 +558,7 @@
|
|
|
557
558
|
"react-dom"
|
|
558
559
|
],
|
|
559
560
|
"gzip": true,
|
|
560
|
-
"limit": "
|
|
561
|
+
"limit": "3.44 kB"
|
|
561
562
|
},
|
|
562
563
|
{
|
|
563
564
|
"name": "DataGrid export, the chunk fetched on the first press",
|
|
@@ -570,7 +571,7 @@
|
|
|
570
571
|
"./interactionListening.mjs"
|
|
571
572
|
],
|
|
572
573
|
"gzip": true,
|
|
573
|
-
"limit": "
|
|
574
|
+
"limit": "5.86 kB"
|
|
574
575
|
},
|
|
575
576
|
{
|
|
576
577
|
"name": "DataGrid list layout, the chunk a narrow grid fetches on top of the grid",
|
|
@@ -585,7 +586,7 @@
|
|
|
585
586
|
"./components/*"
|
|
586
587
|
],
|
|
587
588
|
"gzip": true,
|
|
588
|
-
"limit": "
|
|
589
|
+
"limit": "9.89 kB"
|
|
589
590
|
},
|
|
590
591
|
{
|
|
591
592
|
"name": "DataGrid dates, the chunk a grid with a date column fetches on top of the grid",
|
|
@@ -600,7 +601,7 @@
|
|
|
600
601
|
"./components/*"
|
|
601
602
|
],
|
|
602
603
|
"gzip": true,
|
|
603
|
-
"limit": "
|
|
604
|
+
"limit": "9.56 kB"
|
|
604
605
|
},
|
|
605
606
|
{
|
|
606
607
|
"name": "Full library (Box + ssg + every component)",
|
|
@@ -613,7 +614,7 @@
|
|
|
613
614
|
"./interactionListening.mjs"
|
|
614
615
|
],
|
|
615
616
|
"gzip": true,
|
|
616
|
-
"limit": "
|
|
617
|
+
"limit": "169.84 kB"
|
|
617
618
|
}
|
|
618
619
|
],
|
|
619
620
|
"repository": {
|
|
@@ -653,7 +654,7 @@
|
|
|
653
654
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
654
655
|
},
|
|
655
656
|
"dependencies": {
|
|
656
|
-
"@box-kite/core": "2.2.
|
|
657
|
+
"@box-kite/core": "2.2.17",
|
|
657
658
|
"csstype": "^3.2.3",
|
|
658
659
|
"use-sync-external-store": "^1.6.0"
|
|
659
660
|
},
|
package/placement.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./platform.cjs"),t=require("./effects.cjs"),n=require("./identity.cjs");let r=require("react");var i={top:`bottom`,bottom:`top`,start:`end`,end:`start`};function a(e){return e===`top`||e===`bottom`}function o(e,t){let n=a(e),r=n?e===`top`?`block-start`:`block-end`:e===`start`?`inline-start`:`inline-end`,i=t===`center`?`span-all`:`span-${n?`inline`:`block`}-${t===`start`?`end`:`start`}`;return n?`${r} ${i}`:`${i} ${r}`}function s(e){let[t,n]=e.trim().split(` `);return n===void 0?t===`block-start`?`top`:t===`block-end`?`bottom`:t===`inline-start`?`start`:t===`inline-end`?`end`:null:t===`start`?`top`:t===`end`?`bottom`:n===`start`?`start`:n===`end`?`end`:null}function c(e){return a(e)?`flip-block, flip-inline, flip-block flip-inline`:`flip-inline, flip-block, flip-inline flip-block`}function l(e,t,n,r){let i=u(t,r);return i===`top`?e.top-n.top:i===`bottom`?n.top+n.height-(e.top+e.height):i===`left`?e.left-n.left:n.left+n.width-(e.left+e.width)}function u(e,t){return e===`top`||e===`bottom`?e:e===`start`===t?`right`:`left`}function d(e,t,n,r){return Math.max(n,Math.min(e,n+r-t))}function f(e,t,n,r){let{align:o,offset:s,flip:c,rtl:f}=r,p=(a(r.side)?t.height:t.width)+s,m=c&&l(e,r.side,n,f)<p&&l(e,i[r.side],n,f)>=p?i[r.side]:r.side,h=u(m,f),g={top:e.top-t.height-s,bottom:e.top+e.height+s,left:e.left-t.width-s,right:e.left+e.width+s}[h],_=a(m),v=_?e.left:e.top,y=_?e.width:e.height,b=_?t.width:t.height,x=o===`center`?v+y/2-b/2:o===`start`===(_&&f)?v+y-b:v,S=_?d(x,t.width,n.left,n.width):d(x,t.height,n.top,n.height);return _?{top:g,left:S,side:m}:{top:S,left:g,side:m}}var p=4,m=16,h={top:`mb`,bottom:`mt`,start:`me`,end:`ms`};function g(){return typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`anchor-name: --a`)}function _(){let e=typeof document>`u`?null:document.documentElement,t=e?parseFloat(getComputedStyle(e).fontSize):NaN;return Number.isFinite(t)&&t>0?t:m}function v(e){let{top:t,left:n,width:r,height:i}=e.getBoundingClientRect();return{top:t,left:n,width:r,height:i}}function y(e,t){return e!==null&&e.top===t.top&&e.left===t.left&&e.side===t.side&&e.anchorWidth===t.anchorWidth}function b(i={}){let{side:a=`bottom`,align:l=`center`,offset:u=0,flip:d=!0,matchWidth:m=!1,name:b,anchor:x,trackSide:S=!1}=i,C=n.t(`anchor`),w=`--${(b??C).replace(/^--/,``)}`,[T,E]=(0,r.useState)(!0),[D,O]=(0,r.useState)(null),[k,A]=(0,r.useState)(null),[j,M]=(0,r.useState)(null),[N,P]=(0,r.useState)(null);t.n(()=>{g()||E(!1)},[]),t.n(()=>{let t=e.
|
|
1
|
+
const e=require("./platform.cjs"),t=require("./effects.cjs"),n=require("./identity.cjs");let r=require("react");var i={top:`bottom`,bottom:`top`,start:`end`,end:`start`};function a(e){return e===`top`||e===`bottom`}function o(e,t){let n=a(e),r=n?e===`top`?`block-start`:`block-end`:e===`start`?`inline-start`:`inline-end`,i=t===`center`?`span-all`:`span-${n?`inline`:`block`}-${t===`start`?`end`:`start`}`;return n?`${r} ${i}`:`${i} ${r}`}function s(e){let[t,n]=e.trim().split(` `);return n===void 0?t===`block-start`?`top`:t===`block-end`?`bottom`:t===`inline-start`?`start`:t===`inline-end`?`end`:null:t===`start`?`top`:t===`end`?`bottom`:n===`start`?`start`:n===`end`?`end`:null}function c(e){return a(e)?`flip-block, flip-inline, flip-block flip-inline`:`flip-inline, flip-block, flip-inline flip-block`}function l(e,t,n,r){let i=u(t,r);return i===`top`?e.top-n.top:i===`bottom`?n.top+n.height-(e.top+e.height):i===`left`?e.left-n.left:n.left+n.width-(e.left+e.width)}function u(e,t){return e===`top`||e===`bottom`?e:e===`start`===t?`right`:`left`}function d(e,t,n,r){return Math.max(n,Math.min(e,n+r-t))}function f(e,t,n,r){let{align:o,offset:s,flip:c,rtl:f}=r,p=(a(r.side)?t.height:t.width)+s,m=c&&l(e,r.side,n,f)<p&&l(e,i[r.side],n,f)>=p?i[r.side]:r.side,h=u(m,f),g={top:e.top-t.height-s,bottom:e.top+e.height+s,left:e.left-t.width-s,right:e.left+e.width+s}[h],_=a(m),v=_?e.left:e.top,y=_?e.width:e.height,b=_?t.width:t.height,x=o===`center`?v+y/2-b/2:o===`start`===(_&&f)?v+y-b:v,S=_?d(x,t.width,n.left,n.width):d(x,t.height,n.top,n.height);return _?{top:g,left:S,side:m}:{top:S,left:g,side:m}}var p=4,m=16,h={top:`mb`,bottom:`mt`,start:`me`,end:`ms`};function g(){return typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`anchor-name: --a`)}function _(){let e=typeof document>`u`?null:document.documentElement,t=e?parseFloat(getComputedStyle(e).fontSize):NaN;return Number.isFinite(t)&&t>0?t:m}function v(e){let{top:t,left:n,width:r,height:i}=e.getBoundingClientRect();return{top:t,left:n,width:r,height:i}}function y(e,t){return e!==null&&e.top===t.top&&e.left===t.left&&e.side===t.side&&e.anchorWidth===t.anchorWidth}function b(i={}){let{side:a=`bottom`,align:l=`center`,offset:u=0,flip:d=!0,matchWidth:m=!1,name:b,anchor:x,trackSide:S=!1}=i,C=n.t(`anchor`),w=`--${(b??C).replace(/^--/,``)}`,[T,E]=(0,r.useState)(!0),[D,O]=(0,r.useState)(null),[k,A]=(0,r.useState)(null),[j,M]=(0,r.useState)(null),[N,P]=(0,r.useState)(null);t.n(()=>{g()||E(!1)},[]),t.n(()=>{let t=e.f(x);if(t)return t.style.setProperty(`anchor-name`,w),()=>{t.style.removeProperty(`anchor-name`)}},[x,w]),t.n(()=>{!T||!S||!k||P(s(getComputedStyle(k).getPropertyValue(`position-area`)))},[T,S,k,a,l,d]),t.n(()=>{let t=e.f(x)??D;if(T||!t||!k)return;let n=()=>{let n=v(t),r=v(k),i={top:0,left:0,width:window.innerWidth,height:window.innerHeight},o=m?Math.max(r.width,n.width):r.width,s={...f(n,{...r,width:o},i,{side:a,align:l,offset:u/p*_(),flip:d,rtl:e.m(t)}),anchorWidth:n.width};M(e=>y(e,s)?e:s)};n();let r=new AbortController;return document.addEventListener(`scroll`,n,{signal:r.signal,capture:!0,passive:!0}),window.addEventListener(`resize`,n,{signal:r.signal,passive:!0}),()=>r.abort()},[T,x,D,k,a,l,u,d,m]);let F=(0,r.useCallback)(e=>O(e),[]),I=(0,r.useCallback)(e=>A(e),[]),L={ref:T?void 0:F,style:{anchorName:w}};return T?{css:T,side:N??a,anchorProps:L,layerProps:{...S?{ref:I}:{},position:`fixed`,positionArea:o(a,l),...d?{positionTryFallbacks:c(a)}:{},...m?{minWidth:`anchor-size(width)`}:{},...u?{[h[a]]:u}:{},style:{positionAnchor:w}}}:{css:T,side:j?.side??a,anchorProps:L,layerProps:{ref:I,position:`fixed`,style:j?{top:`${j.top}px`,left:`${j.left}px`,...m?{minWidth:`${j.anchorWidth}px`}:{}}:{top:0,left:0,visibility:`hidden`}}}}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return b}});
|
package/placement.mjs
CHANGED
package/platform.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=globalThis[Symbol.for(`box-kite.componentAttribute`)]??={on:!1,warnings:!0},t=()=>e.on,n=()=>e.warnings;function r(t){e.on=t}function i(t){e.warnings=t}function a(e){return e?`current`in e?e.current:e:null}function o(e){let t=a(e);return t instanceof HTMLElement?t:null}function
|
|
1
|
+
var e=globalThis[Symbol.for(`box-kite.componentAttribute`)]??={on:!1,warnings:!0},t=()=>e.on,n=()=>e.warnings;function r(t){e.on=t}function i(t){e.warnings=t}function a(e){return e?`current`in e?e.current:e:null}function o(e,t){typeof e==`function`?e(t):e&&(e.current=t)}function s(e){let t=a(e);return t instanceof HTMLElement?t:null}function c(e,t){let n=typeof e.composedPath==`function`?e.composedPath():[];return t.some(t=>{let r=a(t);return r?n.includes(r)||e.target instanceof Node&&r.contains(e.target):!1})}function l(e){let t=a(e),n=t?.ownerDocument?.defaultView;return!!t&&!!n&&n.getComputedStyle(t).direction===`rtl`}function u(e){let t=a(e)?.ownerDocument?.defaultView?.getSelection();t&&!t.isCollapsed&&t.removeAllRanges()}function d(){return typeof window<`u`&&window.document!==void 0}function f(){try{return process.env.NODE_ENV!==`production`}catch{return!1}}function p(){return typeof document<`u`}function m(){return p()?document:null}function h(){return m()?.documentElement??null}function g(){return typeof HTMLElement<`u`&&typeof HTMLElement.prototype.showPopover==`function`}function _(){return typeof HTMLDialogElement<`u`&&`closedBy`in HTMLDialogElement.prototype}function v(e){return typeof window>`u`||typeof window.matchMedia!=`function`?null:window.matchMedia(e)}Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return n}});
|
package/platform.mjs
CHANGED
|
@@ -14,54 +14,57 @@ function i(t) {
|
|
|
14
14
|
function a(e) {
|
|
15
15
|
return e ? "current" in e ? e.current : e : null;
|
|
16
16
|
}
|
|
17
|
-
function o(e) {
|
|
17
|
+
function o(e, t) {
|
|
18
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
19
|
+
}
|
|
20
|
+
function s(e) {
|
|
18
21
|
let t = a(e);
|
|
19
22
|
return t instanceof HTMLElement ? t : null;
|
|
20
23
|
}
|
|
21
|
-
function
|
|
24
|
+
function c(e, t) {
|
|
22
25
|
let n = typeof e.composedPath == "function" ? e.composedPath() : [];
|
|
23
26
|
return t.some((t) => {
|
|
24
27
|
let r = a(t);
|
|
25
28
|
return r ? n.includes(r) || e.target instanceof Node && r.contains(e.target) : !1;
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
|
-
function
|
|
31
|
+
function l(e) {
|
|
29
32
|
let t = a(e), n = t?.ownerDocument?.defaultView;
|
|
30
33
|
return !!t && !!n && n.getComputedStyle(t).direction === "rtl";
|
|
31
34
|
}
|
|
32
|
-
function
|
|
35
|
+
function u(e) {
|
|
33
36
|
let t = a(e)?.ownerDocument?.defaultView?.getSelection();
|
|
34
37
|
t && !t.isCollapsed && t.removeAllRanges();
|
|
35
38
|
}
|
|
36
39
|
//#endregion
|
|
37
40
|
//#region src/utils/environment/environmentUtils.ts
|
|
38
|
-
function
|
|
41
|
+
function d() {
|
|
39
42
|
return typeof window < "u" && window.document !== void 0;
|
|
40
43
|
}
|
|
41
|
-
function
|
|
44
|
+
function f() {
|
|
42
45
|
try {
|
|
43
46
|
return process.env.NODE_ENV !== "production";
|
|
44
47
|
} catch {
|
|
45
48
|
return !1;
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
|
-
function f() {
|
|
49
|
-
return typeof document < "u";
|
|
50
|
-
}
|
|
51
51
|
function p() {
|
|
52
|
-
return
|
|
52
|
+
return typeof document < "u";
|
|
53
53
|
}
|
|
54
54
|
function m() {
|
|
55
|
-
return p()
|
|
55
|
+
return p() ? document : null;
|
|
56
56
|
}
|
|
57
57
|
function h() {
|
|
58
|
-
return
|
|
58
|
+
return m()?.documentElement ?? null;
|
|
59
59
|
}
|
|
60
60
|
function g() {
|
|
61
|
+
return typeof HTMLElement < "u" && typeof HTMLElement.prototype.showPopover == "function";
|
|
62
|
+
}
|
|
63
|
+
function _() {
|
|
61
64
|
return typeof HTMLDialogElement < "u" && "closedBy" in HTMLDialogElement.prototype;
|
|
62
65
|
}
|
|
63
|
-
function
|
|
66
|
+
function v(e) {
|
|
64
67
|
return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia(e);
|
|
65
68
|
}
|
|
66
69
|
//#endregion
|
|
67
|
-
export {
|
|
70
|
+
export { r as _, f as a, g as c, a as d, s as f, i as g, t as h, d as i, o as l, l as m, h as n, v as o, c as p, p as r, _ as s, m as t, u, n as v };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A layer that is always rendered (a `<dialog>`, a popover) keeps the content it last showed open until its
|
|
3
|
+
* own exit transition has run. Without it `{open && <Form />}` empties the panel in the closing commit, and
|
|
4
|
+
* the exit animates a blank box (bug #314).
|
|
5
|
+
*/
|
|
6
|
+
export default function useHeldContent<T>(content: T, open: boolean, element: HTMLElement | null): T;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RefCallback } from 'react';
|
|
2
2
|
/** The Radix / Base UI attribute value, so a `[data-state]` selector written for either works here too. */
|
|
3
3
|
export type PresenceState = 'open' | 'closed';
|
|
4
|
+
/** Where the subtree is in its own lifetime. `leaving` is the whole of the exit; `closed` is gone. */
|
|
5
|
+
export type ExitPhase = 'open' | 'leaving' | 'closed';
|
|
4
6
|
export interface PresenceOptions {
|
|
5
7
|
/** Whether the subtree should be there. The exit starts the moment this goes false. */
|
|
6
8
|
present: boolean;
|
|
@@ -30,3 +32,5 @@ export interface Presence {
|
|
|
30
32
|
* the real CSS: a zero duration (nothing declared, or `prefers-reduced-motion`) unmounts in the same commit.
|
|
31
33
|
*/
|
|
32
34
|
export default function usePresence(options: PresenceOptions): Presence;
|
|
35
|
+
/** The phase machine behind `usePresence`, for any element whose exit is its own CSS. `readNode` is called as the exit starts. */
|
|
36
|
+
export declare function useExitPhase(present: boolean, readNode: () => HTMLElement | null): ExitPhase;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ComponentsRegistry } from '@box-kite/core';
|
|
3
|
-
declare const ComponentsContext: React.Context<ComponentsRegistry
|
|
3
|
+
declare const ComponentsContext: React.Context<ComponentsRegistry | undefined>;
|
|
4
4
|
export default ComponentsContext;
|
package/react-shared.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime.cjs"),t=require("./platform.cjs");let n=require("react");n=e.t(n,1);let r=require("@box-kite/core");function i({classNames:e,styleElements:t},n){return{className:(0,r.classNames)(e,n).join(` `),styles:t}}var a=parseInt(n.default.version,10)>=19;function o(e,t){let r=a?({ref:t,...n})=>e(n,t??null):(0,n.forwardRef)(e),i=(0,n.memo)(r);return r.displayName=t,i.displayName=t,i}var s={selected:`aria-selected`},c;(function(e){function t(e,t,n){e!==void 0&&e!=null&&(n[s[t]??t]=Array.isArray(e)?e[0]:e)}e.assignBooleanProp=t})(c||={});var l=c;function u(e,n){let i=e,{props:a,className:o,disabled:s,required:c,checked:u,selected:d}=i,f={...a,className:(0,r.classNames)(n,o).join(` `)};return typeof i.component==`string`&&t.
|
|
1
|
+
const e=require("./rolldown-runtime.cjs"),t=require("./platform.cjs");let n=require("react");n=e.t(n,1);let r=require("@box-kite/core");function i({classNames:e,styleElements:t},n){return{className:(0,r.classNames)(e,n).join(` `),styles:t}}var a=parseInt(n.default.version,10)>=19;function o(e,t){let r=a?({ref:t,...n})=>e(n,t??null):(0,n.forwardRef)(e),i=(0,n.memo)(r);return r.displayName=t,i.displayName=t,i}var s={selected:`aria-selected`},c;(function(e){function t(e,t,n){e!==void 0&&e!=null&&(n[s[t]??t]=Array.isArray(e)?e[0]:e)}e.assignBooleanProp=t})(c||={});var l=c;function u(e,n){let i=e,{props:a,className:o,disabled:s,required:c,checked:u,selected:d}=i,f={...a,className:(0,r.classNames)(n,o).join(` `)};return typeof i.component==`string`&&t.h()&&(f[`data-bk`]??=i.component),l.assignBooleanProp(s,`disabled`,f),l.assignBooleanProp(c,`required`,f),l.assignBooleanProp(u,`checked`,f),l.assignBooleanProp(d,`selected`,f),`style`in i&&(f.style=i.style),`id`in i&&(f.id=i.id),f}var d=parseInt(n.default.version,10)>=19,f=!1,p=new WeakMap,m=new WeakMap;function h(e){let t=p.get(e);if(!t){let{href:r,css:i,precedence:a}=e;t=n.default.createElement(`style`,{key:r,href:r,precedence:a,dangerouslySetInnerHTML:{__html:i}}),p.set(e,t)}return t}function g(e){if(!e?.length)return;!d&&!f&&(f=!0,console.warn(`[box-kite] Box.configure({ sink: 'element' }) needs React 19 to hoist and dedupe its <style> elements; React ${n.default.version} will render them inline. Use the default sink instead.`));let t=m.get(e);return t||(t=e.map(h),m.set(e,t)),t}function _(e,t,n){let{classNames:i,signature:a,styleElements:o}=(0,r.getDefaultEngine)().resolveClassNames(e,t,n);return{classNames:i,signature:a,styleElements:g(o)}}var v=`__boxAttributesInProps`;function y(e){return e[v]=!0,e}function b(e){return typeof e==`function`||typeof e==`object`&&e?e[v]===!0:!1}var x=[`role`,`aria-label`,`aria-labelledby`,`aria-hidden`];function S(e,t){if(e!==void 0)return{role:`img`,"aria-label":e};if(!(t&&x.some(e=>e in t)))return{"aria-hidden":!0}}var C;(function(e){function t(e){return e.charAt(0).toUpperCase()+e.slice(1)}e.capitalize=t})(C||={});var w=C,T;(function(e){function t(e,t,n){let r={...e},i=r.props||{};return t.forEach(e=>{e in r&&(i[e]=r[e],delete r[e])}),n&&Object.entries(n).forEach(([e,t])=>{i[e]=t}),r.props=i,r}e.buildProps=t;function n(e){return!!e&&typeof e==`object`}e.isObject=n;function r(e,t){return e in t}e.isKeyOf=r})(T||={});var E=T,D=[`sky-500`,`emerald-500`,`amber-500`,`violet-500`,`rose-500`,`cyan-500`],O=[`sky-400`,`emerald-400`,`amber-400`,`violet-400`,`rose-400`,`cyan-400`];function k(e){return e.reduce((e,t,n)=>(e[`chart-${n+1}`]=t,e),{})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return g}});
|
package/react-shared.mjs
CHANGED
package/scrolling.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./platform.cjs");function t(e,t,n=e.length){let r=0,i=n-1;if(i<=0)return 0;for(;r<i;){let n=r+i+1>>>1;e[n]<=t?r=n:i=n-1}return r}function n(t){let n=e.
|
|
1
|
+
const e=require("./platform.cjs");function t(e,t,n=e.length){let r=0,i=n-1;if(i<=0)return 0;for(;r<i;){let n=r+i+1>>>1;e[n]<=t?r=n:i=n-1}return r}function n(t){let n=e.d(t),r=n?.ownerDocument?.defaultView;if(!n||!r)return null;let i=n.ownerDocument.scrollingElement??n.ownerDocument.documentElement;for(let e=n.parentElement;e&&e!==i&&e!==n.ownerDocument.body;e=e.parentElement)if(/auto|scroll|overlay/.test(r.getComputedStyle(e).overflowY)&&e.scrollHeight>e.clientHeight)return e;return null}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
package/scrolling.mjs
CHANGED
|
@@ -85,8 +85,9 @@ declare namespace ChartUtils {
|
|
|
85
85
|
/**
|
|
86
86
|
* The variables a chart's series read, named as the ecosystem names them: `{ 'color-revenue':
|
|
87
87
|
* 'var(--chart-1)' }`. A list takes the palette in order, which is the whole case for the container — a
|
|
88
|
-
* chart naming no colour has its dark mode decided by the page. A record names its own paint per series
|
|
88
|
+
* chart naming no colour has its dark mode decided by the page. A record names its own paint per series,
|
|
89
|
+
* and one `isPaint` refuses is left out: declared as text, it would paint the series transparent (bug #308).
|
|
89
90
|
*/
|
|
90
|
-
function seriesVariables(series: readonly string[] | Readonly<Record<string, string>>, slots?: number): Record<string, string>;
|
|
91
|
+
function seriesVariables(series: readonly string[] | Readonly<Record<string, string>>, slots?: number, isPaint?: (paint: string, name: string) => boolean): Record<string, string>;
|
|
91
92
|
}
|
|
92
93
|
export default ChartUtils;
|
|
@@ -92,6 +92,6 @@ declare namespace DashboardUtils {
|
|
|
92
92
|
issues: DashboardIssue[];
|
|
93
93
|
};
|
|
94
94
|
/** The layout as JSON Schema: what a model generates a dashboard under, and what `<SpecRenderer>` validates. */
|
|
95
|
-
const SCHEMA: import("
|
|
95
|
+
const SCHEMA: import("@box-kite/core").CatalogSchema;
|
|
96
96
|
}
|
|
97
97
|
export default DashboardUtils;
|
package/utils/dom/domUtils.d.ts
CHANGED
|
@@ -9,6 +9,12 @@ export type ElementLike = {
|
|
|
9
9
|
} | Element | null | undefined;
|
|
10
10
|
/** The element behind a ref or an element, whichever the caller happens to be holding. */
|
|
11
11
|
export declare function elementOf(value: ElementLike): Element | null;
|
|
12
|
+
/** React's `Ref<T>`, structurally: a callback or an object, either of which a caller may hand a component. */
|
|
13
|
+
export type RefLike<T> = ((element: T | null) => unknown) | {
|
|
14
|
+
current: T | null;
|
|
15
|
+
} | null | undefined;
|
|
16
|
+
/** Hand an element to a ref of either kind — the half of a merged ref that is the caller's. */
|
|
17
|
+
export declare function assignRef<T>(ref: RefLike<T>, element: T | null): void;
|
|
12
18
|
/** The same, narrowed to an `HTMLElement` — for callers that need `focus()` or `style`. */
|
|
13
19
|
export declare function htmlElementOf(value: ElementLike): HTMLElement | null;
|
|
14
20
|
/**
|
package/create/src/agents.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The block a project's `AGENTS.md` carries: the four facts a model gets wrong from memory, then where the
|
|
3
|
-
* whole rules are. It points into `node_modules` rather than copying them, so an upgrade brings the rules with it.
|
|
4
|
-
*/
|
|
5
|
-
export declare function agentsBlock(facts: readonly string[]): string;
|
|
6
|
-
/** An `AGENTS.md` with the block in it: the one already there replaced, or the block added at the end. */
|
|
7
|
-
export declare function withAgentsBlock(existing: string | undefined, block: string): string;
|
|
8
|
-
/** A `CLAUDE.md` that imports `AGENTS.md`, which is how Claude Code reads it; unchanged when it already does. */
|
|
9
|
-
export declare function withClaudeImport(existing: string | undefined): string;
|
|
10
|
-
/** An MCP config with the server in it, or `null` when the file is not JSON we can safely rewrite (VS Code allows comments). */
|
|
11
|
-
export declare function withMcpServer(existing: string | undefined, key: string, entry: object): string | null;
|
|
12
|
-
export interface AgentFilesResult {
|
|
13
|
-
/** The files written or changed; a file already right is left out. */
|
|
14
|
-
written: string[];
|
|
15
|
-
/** Files that needed the server and could not be rewritten, for the reader to edit by hand. */
|
|
16
|
-
skipped: string[];
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Writes the agent files into a project. `editors: 'all'` writes every tool's MCP config (a new app, where no
|
|
20
|
-
* editor folder exists yet); `'present'` writes only those whose editor folder is there (an existing project).
|
|
21
|
-
*/
|
|
22
|
-
export declare function writeAgentFiles(directory: string, facts: readonly string[], editors: 'all' | 'present'): AgentFilesResult;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/create/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/create/src/options.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/** The create-vite templates a design can be added to: React, in TypeScript or JavaScript. */
|
|
2
|
-
export declare const TEMPLATES: readonly ["react-ts", "react-compiler-ts", "react", "react-compiler"];
|
|
3
|
-
export type Template = (typeof TEMPLATES)[number];
|
|
4
|
-
export declare const DESIGNS: readonly ["classic", "ember", "azure", "mono"];
|
|
5
|
-
export type Design = (typeof DESIGNS)[number];
|
|
6
|
-
export interface CreateOptions {
|
|
7
|
-
directory?: string;
|
|
8
|
-
template?: Template;
|
|
9
|
-
design?: Design;
|
|
10
|
-
/** `false` writes the files and leaves the install to the reader. */
|
|
11
|
-
install: boolean;
|
|
12
|
-
/** Unset means "ask when there is a terminal to ask in", which is create-vite's own rule. */
|
|
13
|
-
interactive?: boolean;
|
|
14
|
-
overwrite: boolean;
|
|
15
|
-
/** Passed through to create-vite, which swaps Oxlint for ESLint. */
|
|
16
|
-
eslint?: boolean;
|
|
17
|
-
/** `false` leaves out AGENTS.md, CLAUDE.md and the MCP configs. */
|
|
18
|
-
agents: boolean;
|
|
19
|
-
/** Writes only the agent files, into a project that already exists. */
|
|
20
|
-
agentsOnly: boolean;
|
|
21
|
-
help: boolean;
|
|
22
|
-
version: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare const isTemplate: (value: string) => value is Template;
|
|
25
|
-
export declare const isDesign: (value: string) => value is Design;
|
|
26
|
-
export declare const isTypeScript: (template: Template) => boolean;
|
|
27
|
-
/** argv after the command name, as options plus whatever was wrong with it: one message per mistake. */
|
|
28
|
-
export declare function parseOptions(argv: readonly string[]): {
|
|
29
|
-
options: CreateOptions;
|
|
30
|
-
errors: string[];
|
|
31
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
|
|
2
|
-
/** The manager that ran `create`, read off the user agent every one of them sets (`pnpm/9.12.0 npm/? node/v22…`). */
|
|
3
|
-
export declare function detectPackageManager(userAgent: string | undefined): PackageManager;
|
|
4
|
-
/** How the reader starts the dev server with it: `npm run dev`, `pnpm dev`. */
|
|
5
|
-
export declare const runCommand: (manager: PackageManager, script: string) => string;
|