@box-kite/react 2.2.14 → 2.2.16

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.
Files changed (136) hide show
  1. package/.claude/rules/box-kite-rules.md +1 -1
  2. package/.claude/skills/box-kite/SKILL.md +1 -1
  3. package/.claude/skills/box-kite/references/styling.md +1 -1
  4. package/.cursor/rules/box-kite.mdc +1 -1
  5. package/AGENTS.md +1 -1
  6. package/BOX_AI_CONTEXT.md +16 -0
  7. package/BOX_KITE_AI_CONTEXT.md +16 -0
  8. package/behavior.cjs +1 -1
  9. package/behavior.mjs +16 -16
  10. package/catalog.cjs +1 -1
  11. package/catalog.mjs +1 -1
  12. package/client.cjs +1 -1
  13. package/client.mjs +10 -10
  14. package/components/accordion.cjs +1 -1
  15. package/components/accordion.mjs +95 -91
  16. package/components/calendar.cjs +1 -1
  17. package/components/calendar.mjs +212 -210
  18. package/components/chart.cjs +1 -1
  19. package/components/chart.d.ts +8 -3
  20. package/components/chart.mjs +70 -65
  21. package/components/combobox.cjs +1 -1
  22. package/components/combobox.mjs +187 -186
  23. package/components/dashboard.cjs +1 -1
  24. package/components/dashboard.d.ts +1 -44
  25. package/components/dashboard.mjs +202 -201
  26. package/components/dataGrid/components/dataGridListLayout.d.ts +1 -1
  27. package/components/dataGrid/contracts/dataGridContract.d.ts +1 -1
  28. package/components/dataGrid/models/gridModel.d.ts +1 -1
  29. package/components/dataGrid.cjs +2 -2
  30. package/components/dataGrid.mjs +10 -10
  31. package/components/dateField.cjs +1 -1
  32. package/components/dateField.mjs +96 -96
  33. package/components/datePicker.cjs +1 -1
  34. package/components/datePicker.mjs +177 -179
  35. package/components/dialog.cjs +1 -1
  36. package/components/dialog.d.ts +2 -64
  37. package/components/dialog.mjs +130 -126
  38. package/components/form.cjs +1 -1
  39. package/components/form.d.ts +4 -3
  40. package/components/form.mjs +25 -22
  41. package/components/menu.cjs +1 -1
  42. package/components/menu.d.ts +2 -73
  43. package/components/menu.mjs +222 -218
  44. package/components/overlay.cjs +1 -1
  45. package/components/overlay.mjs +43 -43
  46. package/components/popover.cjs +1 -1
  47. package/components/popover.d.ts +1 -41
  48. package/components/popover.mjs +55 -51
  49. package/components/radioGroup.cjs +1 -1
  50. package/components/radioGroup.mjs +59 -55
  51. package/components/slider.cjs +1 -1
  52. package/components/slider.d.ts +1 -55
  53. package/components/slider.mjs +92 -90
  54. package/components/sortableList.cjs +1 -1
  55. package/components/sortableList.mjs +149 -148
  56. package/components/swipeItem.cjs +1 -1
  57. package/components/swipeItem.mjs +100 -100
  58. package/components/tabs.cjs +1 -1
  59. package/components/tabs.mjs +135 -132
  60. package/components/toaster.cjs +1 -1
  61. package/components/toaster.d.ts +1 -37
  62. package/components/toaster.mjs +130 -128
  63. package/components/tooltip.cjs +1 -1
  64. package/components/tooltip.d.ts +1 -34
  65. package/components/tooltip.mjs +73 -69
  66. package/components/virtualList.cjs +1 -1
  67. package/components/virtualList.mjs +88 -87
  68. package/interactionListening.cjs +1 -1
  69. package/interactionListening.mjs +3 -3
  70. package/layer.cjs +1 -1
  71. package/layer.mjs +1 -1
  72. package/package.json +31 -30
  73. package/placement.cjs +1 -1
  74. package/placement.mjs +1 -1
  75. package/platform.cjs +1 -1
  76. package/platform.mjs +17 -14
  77. package/react/componentsContext.d.ts +1 -1
  78. package/react-shared.cjs +1 -1
  79. package/react-shared.mjs +1 -1
  80. package/scrolling.cjs +1 -1
  81. package/scrolling.mjs +1 -1
  82. package/utils/chart/chartUtils.d.ts +3 -2
  83. package/utils/dashboard/dashboardUtils.d.ts +1 -1
  84. package/utils/dom/domUtils.d.ts +6 -0
  85. package/create/src/agents.d.ts +0 -22
  86. package/create/src/agents.test.d.ts +0 -1
  87. package/create/src/index.d.ts +0 -1
  88. package/create/src/options.d.ts +0 -31
  89. package/create/src/options.test.d.ts +0 -1
  90. package/create/src/packageManager.d.ts +0 -5
  91. package/create/src/project.d.ts +0 -27
  92. package/create/src/project.test.d.ts +0 -1
  93. package/create/templates/ts/designs/azure.d.ts +0 -5
  94. package/create/templates/ts/designs/ember.d.ts +0 -5
  95. package/create/templates/ts/designs/mono.d.ts +0 -5
  96. package/create/templates/ts/src/App.d.ts +0 -2
  97. package/create/templates/ts/src/design.d.ts +0 -5
  98. package/create/templates/ts/src/main.d.ts +0 -0
  99. package/mcp/src/data.d.ts +0 -90
  100. package/mcp/src/data.test.d.ts +0 -1
  101. package/mcp/src/engine.d.ts +0 -23
  102. package/mcp/src/index.d.ts +0 -1
  103. package/mcp/src/search.d.ts +0 -26
  104. package/mcp/src/search.test.d.ts +0 -1
  105. package/mcp/src/server.d.ts +0 -18
  106. package/mcp/src/server.test.d.ts +0 -1
  107. package/mcp/src/styles.d.ts +0 -27
  108. package/mcp/src/styles.test.d.ts +0 -1
  109. package/mcp/src/tools.d.ts +0 -18
  110. package/mcp/src/vocabulary.d.ts +0 -41
  111. package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +0 -24
  112. package/registry/blocks/dashboard-shell/dashboard-stats.d.ts +0 -13
  113. package/registry/blocks/data-grid/invoice-rows.d.ts +0 -15
  114. package/registry/blocks/data-grid/invoices-grid.d.ts +0 -1
  115. package/registry/blocks/settings-form/settings-form.d.ts +0 -17
  116. package/registry/designs/store/address-form.d.ts +0 -11
  117. package/registry/designs/store/cart-items.d.ts +0 -10
  118. package/registry/designs/store/cart-page.d.ts +0 -4
  119. package/registry/designs/store/checkout-page.d.ts +0 -7
  120. package/registry/designs/store/credit-card-form.d.ts +0 -10
  121. package/registry/designs/store/form-field.d.ts +0 -19
  122. package/registry/designs/store/order-summary.d.ts +0 -18
  123. package/registry/designs/store/product-art.d.ts +0 -26
  124. package/registry/designs/store/product-card.d.ts +0 -11
  125. package/registry/designs/store/product-gallery.d.ts +0 -11
  126. package/registry/designs/store/product-grid.d.ts +0 -10
  127. package/registry/designs/store/product-page.d.ts +0 -5
  128. package/registry/designs/store/quantity-stepper.d.ts +0 -13
  129. package/registry/designs/store/shipping-method.d.ts +0 -14
  130. package/registry/designs/store/store-data.d.ts +0 -53
  131. package/registry/designs/store/store-design.d.ts +0 -63
  132. package/registry/designs/store/store-shell.d.ts +0 -12
  133. package/registry/designs/store/storefront-page.d.ts +0 -4
  134. package/registry/designs/store/variant-picker.d.ts +0 -15
  135. package/supabase/functions/collect/index.d.ts +0 -30
  136. 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.14",
3
+ "version": "2.2.16",
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": "41.06 kB"
135
+ "limit": "41.15 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": "38.45 kB"
148
+ "limit": "38.55 kB"
148
149
  },
149
150
  {
150
151
  "name": "Behavior primitives (a11y entry)",
@@ -183,7 +184,7 @@
183
184
  "./interactionListening.mjs"
184
185
  ],
185
186
  "gzip": true,
186
- "limit": "62.14 kB"
187
+ "limit": "62.32 kB"
187
188
  },
188
189
  {
189
190
  "name": "Spec renderer (spec entry)",
@@ -241,7 +242,7 @@
241
242
  "name": "Core engine (@box-kite/core, no React)",
242
243
  "path": "dist-core/core.mjs",
243
244
  "gzip": true,
244
- "limit": "39.66 kB",
245
+ "limit": "39.77 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": "43.30 kB"
263
+ "limit": "43.47 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": "44.85 kB"
276
+ "limit": "45.00 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": "47.23 kB"
289
+ "limit": "47.35 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": "42.57 kB"
302
+ "limit": "42.75 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": "43.36 kB"
315
+ "limit": "43.45 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": "41.63 kB"
328
+ "limit": "41.75 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": "42.98 kB"
341
+ "limit": "43.09 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": "46.26 kB"
354
+ "limit": "46.38 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": "46.59 kB"
367
+ "limit": "46.72 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": "45.16 kB"
380
+ "limit": "45.28 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": "40.97 kB"
393
+ "limit": "41.07 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": "43.78 kB"
406
+ "limit": "43.95 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": "42.91 kB"
419
+ "limit": "43.09 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": "40.93 kB"
432
+ "limit": "41.03 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": "44.57 kB"
445
+ "limit": "44.72 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": "49.81 kB"
458
+ "limit": "49.93 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": "49.25 kB"
471
+ "limit": "49.39 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": "62.99 kB"
484
+ "limit": "63.06 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": "44.49 kB"
497
+ "limit": "44.61 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": "52.35 kB"
510
+ "limit": "52.48 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": "50.35 kB"
523
+ "limit": "50.46 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": "46.89 kB"
536
+ "limit": "47.03 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": "97.54 kB"
551
+ "limit": "97.66 kB"
551
552
  },
552
553
  {
553
554
  "name": "Interaction delivery, the chunk the first Box.onInteraction fetches",
@@ -613,7 +614,7 @@
613
614
  "./interactionListening.mjs"
614
615
  ],
615
616
  "gzip": true,
616
- "limit": "166.88 kB"
617
+ "limit": "167.55 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.14",
657
+ "@box-kite/core": "2.2.16",
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.d(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.d(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.p(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}});
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
@@ -1,4 +1,4 @@
1
- import { d as e, p as t } from "./platform.mjs";
1
+ import { f as e, m as t } from "./platform.mjs";
2
2
  import { n } from "./effects.mjs";
3
3
  import { t as r } from "./identity.mjs";
4
4
  import { useCallback as i, useState as a } from "react";
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 s(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 c(e){let t=a(e),n=t?.ownerDocument?.defaultView;return!!t&&!!n&&n.getComputedStyle(t).direction===`rtl`}function l(e){let t=a(e)?.ownerDocument?.defaultView?.getSelection();t&&!t.isCollapsed&&t.removeAllRanges()}function u(){return typeof window<`u`&&window.document!==void 0}function d(){try{return process.env.NODE_ENV!==`production`}catch{return!1}}function f(){return typeof document<`u`}function p(){return f()?document:null}function m(){return p()?.documentElement??null}function h(){return typeof HTMLElement<`u`&&typeof HTMLElement.prototype.showPopover==`function`}function g(){return typeof HTMLDialogElement<`u`&&`closedBy`in HTMLDialogElement.prototype}function _(e){return typeof window>`u`||typeof window.matchMedia!=`function`?null:window.matchMedia(e)}Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return a}});
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 s(e, t) {
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 c(e) {
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 l(e) {
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 u() {
41
+ function d() {
39
42
  return typeof window < "u" && window.document !== void 0;
40
43
  }
41
- function d() {
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 f() ? document : null;
52
+ return typeof document < "u";
53
53
  }
54
54
  function m() {
55
- return p()?.documentElement ?? null;
55
+ return p() ? document : null;
56
56
  }
57
57
  function h() {
58
- return typeof HTMLElement < "u" && typeof HTMLElement.prototype.showPopover == "function";
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 _(e) {
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 { n as _, d as a, h as c, o as d, s as f, r as g, i as h, u as i, l, t as m, m as n, _ as o, c as p, f as r, g as s, p as t, a as u };
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 };
@@ -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<import('../core/extends/boxComponents').Components> | undefined>;
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.m()&&(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}});
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
@@ -1,4 +1,4 @@
1
- import { m as e } from "./platform.mjs";
1
+ import { h as e } from "./platform.mjs";
2
2
  import t, { forwardRef as n, memo as r } from "react";
3
3
  import { classNames as i, getDefaultEngine as a } from "@box-kite/core";
4
4
  //#region src/react/boxClassNames.ts
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.u(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}});
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
@@ -1,4 +1,4 @@
1
- import { u as e } from "./platform.mjs";
1
+ import { d as e } from "./platform.mjs";
2
2
  //#region src/utils/virtual/rowSearch.ts
3
3
  function t(e, t, n = e.length) {
4
4
  let r = 0, i = n - 1;
@@ -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("../../core").CatalogSchema;
95
+ const SCHEMA: import("@box-kite/core").CatalogSchema;
96
96
  }
97
97
  export default DashboardUtils;
@@ -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
  /**
@@ -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 {};
@@ -1 +0,0 @@
1
- export {};
@@ -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;
@@ -1,27 +0,0 @@
1
- import { Design, Template } from './options';
2
- /** The files of one language: the app's own `src/` files, and the design file per design. */
3
- export interface TemplateSet {
4
- files: Record<string, string>;
5
- designs: Record<Design, string>;
6
- }
7
- export interface Templates {
8
- ts: TemplateSet;
9
- js: TemplateSet;
10
- fonts: Record<Design, string[]>;
11
- /** The four facts `AGENTS.md`'s lead block states, for the project's own `AGENTS.md`. */
12
- facts: string[];
13
- }
14
- export interface ApplyOptions {
15
- template: Template;
16
- design: Design;
17
- /** The range written for `@box-kite/react`, e.g. `^2.2.7`. */
18
- boxKiteRange: string;
19
- /** The range written for each font package. */
20
- fontRange: string;
21
- }
22
- /**
23
- * Turns a project create-vite has just written into a Box Kite one: the dependencies in `package.json`,
24
- * the design as `src/design.tsx`, a `main` that wraps the app in it, and a sample page. Writes files only;
25
- * the install is the caller's.
26
- */
27
- export declare function applyBoxKite(directory: string, templates: Templates, options: ApplyOptions): string[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- /** Light or dark follows the system until the reader picks one, and the pick is kept under `storageKey`. */
3
- export default function Design({ children }: {
4
- children: ReactNode;
5
- }): import("react").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- /** Light or dark follows the system until the reader picks one, and the pick is kept under `storageKey`. */
3
- export default function Design({ children }: {
4
- children: ReactNode;
5
- }): import("react").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- /** Light or dark follows the system until the reader picks one, and the pick is kept under `storageKey`. */
3
- export default function Design({ children }: {
4
- children: ReactNode;
5
- }): import("react").JSX.Element;
@@ -1,2 +0,0 @@
1
- /** A page of the components a design reaches, to see the one you pasted in light and dark. */
2
- export default function App(): import("react").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- /** Light or dark follows the system until the reader picks one, and the pick is kept under `storageKey`. */
3
- export default function Design({ children }: {
4
- children: ReactNode;
5
- }): import("react").JSX.Element;
File without changes