@box-kite/react 2.2.6 → 2.2.8

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 (122) hide show
  1. package/.claude/rules/box-kite-rules.md +2 -0
  2. package/.claude/skills/box-kite/SKILL.md +2 -0
  3. package/.claude/skills/box-kite/references/extending.md +10 -0
  4. package/.claude/skills/box-kite/references/styling.md +3 -2
  5. package/.cursor/rules/box-kite.mdc +2 -0
  6. package/AGENTS.md +2 -0
  7. package/BOX_AI_CONTEXT.md +128 -2
  8. package/BOX_KITE_AI_CONTEXT.md +128 -2
  9. package/analytics.cjs +1 -0
  10. package/analytics.d.ts +10 -0
  11. package/analytics.mjs +121 -0
  12. package/behavior.cjs +1 -1
  13. package/behavior.mjs +42 -38
  14. package/box.cjs +1 -1
  15. package/box.d.ts +14 -0
  16. package/box.mjs +17 -16
  17. package/catalog.cjs +1 -1
  18. package/catalog.mjs +8 -0
  19. package/client.cjs +1 -1
  20. package/client.mjs +144 -113
  21. package/components/accordion.cjs +1 -1
  22. package/components/accordion.mjs +19 -10
  23. package/components/agent.cjs +1 -1
  24. package/components/agent.mjs +21 -8
  25. package/components/calendar.cjs +1 -1
  26. package/components/calendar.d.ts +3 -1
  27. package/components/calendar.mjs +154 -142
  28. package/components/combobox.cjs +1 -1
  29. package/components/combobox.mjs +184 -174
  30. package/components/dashboard.cjs +1 -1
  31. package/components/dashboard.mjs +183 -170
  32. package/components/dataGrid/models/columnModel.d.ts +1 -0
  33. package/components/dataGrid/models/gridModel.d.ts +18 -0
  34. package/components/dataGrid/models/headerCellModel.d.ts +1 -0
  35. package/components/dataGrid/models/rangeModel.d.ts +3 -0
  36. package/components/dataGrid.cjs +3 -3
  37. package/components/dataGrid.mjs +1015 -923
  38. package/components/dateField.cjs +1 -1
  39. package/components/dateField.mjs +165 -159
  40. package/components/datePicker.cjs +1 -1
  41. package/components/datePicker.mjs +198 -183
  42. package/components/dialog.cjs +1 -1
  43. package/components/dialog.mjs +38 -33
  44. package/components/dropdown.cjs +1 -1
  45. package/components/dropdown.mjs +107 -93
  46. package/components/form.cjs +1 -1
  47. package/components/form.mjs +22 -18
  48. package/components/menu.cjs +1 -1
  49. package/components/menu.d.ts +2 -0
  50. package/components/menu.mjs +196 -175
  51. package/components/overlay.cjs +1 -1
  52. package/components/overlay.mjs +7 -7
  53. package/components/popover.cjs +1 -1
  54. package/components/popover.mjs +4 -0
  55. package/components/radioGroup.cjs +1 -1
  56. package/components/radioGroup.mjs +10 -5
  57. package/components/semantics.d.ts +29 -29
  58. package/components/slider.cjs +1 -1
  59. package/components/slider.mjs +84 -83
  60. package/components/sortableList.cjs +1 -1
  61. package/components/sortableList.mjs +158 -150
  62. package/components/swipeItem.cjs +1 -1
  63. package/components/swipeItem.mjs +92 -84
  64. package/components/tabs.cjs +1 -1
  65. package/components/tabs.mjs +10 -5
  66. package/components/timeZoneSelect.cjs +1 -1
  67. package/components/timeZoneSelect.mjs +40 -35
  68. package/components/toaster.cjs +1 -1
  69. package/components/toaster.mjs +151 -113
  70. package/create/src/index.d.ts +1 -0
  71. package/create/src/options.d.ts +27 -0
  72. package/create/src/options.test.d.ts +1 -0
  73. package/create/src/packageManager.d.ts +5 -0
  74. package/create/src/project.d.ts +25 -0
  75. package/create/src/project.test.d.ts +1 -0
  76. package/create/templates/ts/designs/azure.d.ts +5 -0
  77. package/create/templates/ts/designs/ember.d.ts +5 -0
  78. package/create/templates/ts/designs/mono.d.ts +5 -0
  79. package/create/templates/ts/src/App.d.ts +2 -0
  80. package/create/templates/ts/src/design.d.ts +5 -0
  81. package/create/templates/ts/src/main.d.ts +0 -0
  82. package/dataGridDateParts.cjs +1 -1
  83. package/dataGridDateParts.mjs +56 -55
  84. package/dataGridList.cjs +1 -1
  85. package/dataGridList.mjs +437 -436
  86. package/docs/props.md +19 -19
  87. package/effects.cjs +1 -1
  88. package/effects.mjs +1 -1
  89. package/interactionListening.cjs +1 -0
  90. package/interactionListening.mjs +117 -0
  91. package/interactions.cjs +1 -0
  92. package/interactions.mjs +25 -0
  93. package/layer.cjs +1 -1
  94. package/layer.mjs +68 -66
  95. package/package.json +139 -70
  96. package/placement.cjs +1 -1
  97. package/placement.mjs +10 -10
  98. package/platform.cjs +1 -1
  99. package/platform.mjs +44 -25
  100. package/react/interactions/interactions.d.ts +30 -0
  101. package/react/popover/usePopoverLayer.d.ts +3 -0
  102. package/react/theme/theme.d.ts +9 -0
  103. package/react/theme/themeContext.d.ts +2 -0
  104. package/react/useStyles.d.ts +8 -1
  105. package/react-shared.cjs +1 -1
  106. package/react-shared.mjs +49 -48
  107. package/reporting.cjs +1 -0
  108. package/reporting.mjs +51 -0
  109. package/rsc.cjs +1 -1
  110. package/rsc.d.ts +3 -0
  111. package/rsc.mjs +1 -1
  112. package/scrolling.cjs +1 -1
  113. package/scrolling.mjs +1 -1
  114. package/supabase/functions/collect/index.d.ts +30 -0
  115. package/supabase/functions/collect/index.test.d.ts +1 -0
  116. package/utils/analytics/analytics.d.ts +72 -0
  117. package/utils/analytics/analyticsIdentity.d.ts +13 -0
  118. package/utils/interactions/componentAttribute.d.ts +6 -0
  119. package/utils/interactions/interactionChannel.d.ts +35 -0
  120. package/utils/interactions/interactionJson.d.ts +6 -0
  121. package/utils/interactions/interactionListening.d.ts +6 -0
  122. package/utils/interactions/interactionTypes.d.ts +224 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box-kite/react",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "pages/**"
@@ -44,6 +44,11 @@
44
44
  "import": "./interop.mjs",
45
45
  "require": "./interop.cjs"
46
46
  },
47
+ "./analytics": {
48
+ "types": "./analytics.d.ts",
49
+ "import": "./analytics.mjs",
50
+ "require": "./analytics.cjs"
51
+ },
47
52
  "./date": {
48
53
  "types": "./date.d.ts",
49
54
  "import": "./date.mjs",
@@ -81,6 +86,7 @@
81
86
  "build": "npm run build:core && vite build",
82
87
  "build:core": "vite build --config vite.core.config.ts && node scripts/postbuild-core.mjs",
83
88
  "build:mcp": "vite build --config vite.mcp.config.ts && node scripts/postbuild-mcp.mjs",
89
+ "build:create": "vite build --config vite.create.config.ts && node scripts/postbuild-create.mjs",
84
90
  "postbuild": "node scripts/postbuild.mjs",
85
91
  "build:dev": "npm run build:core && vite build --mode dev",
86
92
  "compile": "tsc --noEmit --skipLibCheck",
@@ -98,10 +104,12 @@
98
104
  "docs:components": "node scripts/check-components-api.mjs --fix",
99
105
  "check:catalog": "node scripts/check-catalog-api.mjs",
100
106
  "docs:catalog": "node scripts/check-catalog-api.mjs --fix",
107
+ "check:create": "node scripts/check-create-templates.mjs",
108
+ "docs:create": "node scripts/check-create-templates.mjs --fix",
101
109
  "check:conventions": "node scripts/check-component-conventions.mjs",
102
110
  "check:agents": "node scripts/check-agent-files.mjs",
103
111
  "docs:agents": "node scripts/check-agent-files.mjs --fix",
104
- "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",
112
+ "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",
105
113
  "bench": "node bench/run.mjs",
106
114
  "compare": "node dev/compare/report.mjs",
107
115
  "compare:tailwind": "node dev/compare/report.mjs tailwind",
@@ -119,10 +127,11 @@
119
127
  "react",
120
128
  "react-dom",
121
129
  "./diagnostics-*",
122
- "./themeReveal-*"
130
+ "./themeReveal-*",
131
+ "./interactionListening.mjs"
123
132
  ],
124
133
  "gzip": true,
125
- "limit": "39.45 KB"
134
+ "limit": "40.90 kB"
126
135
  },
127
136
  {
128
137
  "name": "Box in a Server Component (react-server entry)",
@@ -131,10 +140,11 @@
131
140
  "react",
132
141
  "react-dom",
133
142
  "./diagnostics-*",
134
- "./themeReveal-*"
143
+ "./themeReveal-*",
144
+ "./interactionListening.mjs"
135
145
  ],
136
146
  "gzip": true,
137
- "limit": "37.47 KB"
147
+ "limit": "38.30 kB"
138
148
  },
139
149
  {
140
150
  "name": "Behavior primitives (a11y entry)",
@@ -143,10 +153,11 @@
143
153
  "react",
144
154
  "react-dom",
145
155
  "./diagnostics-*",
146
- "./themeReveal-*"
156
+ "./themeReveal-*",
157
+ "./interactionListening.mjs"
147
158
  ],
148
159
  "gzip": true,
149
- "limit": "3.2 KB"
160
+ "limit": "3.26 kB"
150
161
  },
151
162
  {
152
163
  "name": "Anchor positioning (anchor entry)",
@@ -155,10 +166,11 @@
155
166
  "react",
156
167
  "react-dom",
157
168
  "./diagnostics-*",
158
- "./themeReveal-*"
169
+ "./themeReveal-*",
170
+ "./interactionListening.mjs"
159
171
  ],
160
172
  "gzip": true,
161
- "limit": "2.25 KB"
173
+ "limit": "2.27 kB"
162
174
  },
163
175
  {
164
176
  "name": "Component catalog (catalog entry)",
@@ -167,10 +179,11 @@
167
179
  "react",
168
180
  "react-dom",
169
181
  "./diagnostics-*",
170
- "./themeReveal-*"
182
+ "./themeReveal-*",
183
+ "./interactionListening.mjs"
171
184
  ],
172
185
  "gzip": true,
173
- "limit": "61.11 KB"
186
+ "limit": "61.84 kB"
174
187
  },
175
188
  {
176
189
  "name": "Spec renderer (spec entry)",
@@ -179,10 +192,11 @@
179
192
  "react",
180
193
  "react-dom",
181
194
  "./diagnostics-*",
182
- "./themeReveal-*"
195
+ "./themeReveal-*",
196
+ "./interactionListening.mjs"
183
197
  ],
184
198
  "gzip": true,
185
- "limit": "4.7 KB"
199
+ "limit": "4.72 kB"
186
200
  },
187
201
  {
188
202
  "name": "Ecosystem interop (interop entry)",
@@ -191,11 +205,25 @@
191
205
  "react",
192
206
  "react-dom",
193
207
  "./diagnostics-*",
194
- "./themeReveal-*"
208
+ "./themeReveal-*",
209
+ "./interactionListening.mjs"
195
210
  ],
196
211
  "gzip": true,
197
212
  "limit": "4 KB"
198
213
  },
214
+ {
215
+ "name": "Analytics (analytics entry, no React)",
216
+ "path": "dist/analytics.mjs",
217
+ "ignore": [
218
+ "react",
219
+ "react-dom",
220
+ "./diagnostics-*",
221
+ "./themeReveal-*",
222
+ "./interactionListening.mjs"
223
+ ],
224
+ "gzip": true,
225
+ "limit": "1.94 kB"
226
+ },
199
227
  {
200
228
  "name": "Dates, times and zones (date entry, no React)",
201
229
  "path": "dist/date.mjs",
@@ -203,7 +231,8 @@
203
231
  "react",
204
232
  "react-dom",
205
233
  "./diagnostics-*",
206
- "./themeReveal-*"
234
+ "./themeReveal-*",
235
+ "./interactionListening.mjs"
207
236
  ],
208
237
  "gzip": true,
209
238
  "limit": "7.59 KB"
@@ -212,10 +241,11 @@
212
241
  "name": "Core engine (@box-kite/core, no React)",
213
242
  "path": "dist-core/core.mjs",
214
243
  "gzip": true,
215
- "limit": "38.68 KB",
244
+ "limit": "39.43 kB",
216
245
  "ignore": [
217
246
  "./diagnostics-*",
218
- "./themeReveal-*"
247
+ "./themeReveal-*",
248
+ "./interactionListening.mjs"
219
249
  ]
220
250
  },
221
251
  {
@@ -225,10 +255,11 @@
225
255
  "react",
226
256
  "react-dom",
227
257
  "./diagnostics-*",
228
- "./themeReveal-*"
258
+ "./themeReveal-*",
259
+ "./interactionListening.mjs"
229
260
  ],
230
261
  "gzip": true,
231
- "limit": "41.54 KB"
262
+ "limit": "43.16 kB"
232
263
  },
233
264
  {
234
265
  "name": "Popover",
@@ -237,10 +268,11 @@
237
268
  "react",
238
269
  "react-dom",
239
270
  "./diagnostics-*",
240
- "./themeReveal-*"
271
+ "./themeReveal-*",
272
+ "./interactionListening.mjs"
241
273
  ],
242
274
  "gzip": true,
243
- "limit": "43.07 KB"
275
+ "limit": "44.70 kB"
244
276
  },
245
277
  {
246
278
  "name": "Menu",
@@ -249,10 +281,11 @@
249
281
  "react",
250
282
  "react-dom",
251
283
  "./diagnostics-*",
252
- "./themeReveal-*"
284
+ "./themeReveal-*",
285
+ "./interactionListening.mjs"
253
286
  ],
254
287
  "gzip": true,
255
- "limit": "45.31 KB"
288
+ "limit": "47.07 kB"
256
289
  },
257
290
  {
258
291
  "name": "Accordion",
@@ -261,10 +294,11 @@
261
294
  "react",
262
295
  "react-dom",
263
296
  "./diagnostics-*",
264
- "./themeReveal-*"
297
+ "./themeReveal-*",
298
+ "./interactionListening.mjs"
265
299
  ],
266
300
  "gzip": true,
267
- "limit": "40.78 KB"
301
+ "limit": "42.42 kB"
268
302
  },
269
303
  {
270
304
  "name": "Agent",
@@ -273,10 +307,11 @@
273
307
  "react",
274
308
  "react-dom",
275
309
  "./diagnostics-*",
276
- "./themeReveal-*"
310
+ "./themeReveal-*",
311
+ "./interactionListening.mjs"
277
312
  ],
278
313
  "gzip": true,
279
- "limit": "41.56 KB"
314
+ "limit": "43.19 kB"
280
315
  },
281
316
  {
282
317
  "name": "Markdown",
@@ -285,10 +320,11 @@
285
320
  "react",
286
321
  "react-dom",
287
322
  "./diagnostics-*",
288
- "./themeReveal-*"
323
+ "./themeReveal-*",
324
+ "./interactionListening.mjs"
289
325
  ],
290
326
  "gzip": true,
291
- "limit": "40.04 KB"
327
+ "limit": "41.47 kB"
292
328
  },
293
329
  {
294
330
  "name": "List",
@@ -297,10 +333,11 @@
297
333
  "react",
298
334
  "react-dom",
299
335
  "./diagnostics-*",
300
- "./themeReveal-*"
336
+ "./themeReveal-*",
337
+ "./interactionListening.mjs"
301
338
  ],
302
339
  "gzip": true,
303
- "limit": "41.36 KB"
340
+ "limit": "42.84 kB"
304
341
  },
305
342
  {
306
343
  "name": "SwipeItem",
@@ -309,10 +346,11 @@
309
346
  "react",
310
347
  "react-dom",
311
348
  "./diagnostics-*",
312
- "./themeReveal-*"
349
+ "./themeReveal-*",
350
+ "./interactionListening.mjs"
313
351
  ],
314
352
  "gzip": true,
315
- "limit": "44.44 KB"
353
+ "limit": "46.12 kB"
316
354
  },
317
355
  {
318
356
  "name": "SortableList",
@@ -321,10 +359,11 @@
321
359
  "react",
322
360
  "react-dom",
323
361
  "./diagnostics-*",
324
- "./themeReveal-*"
362
+ "./themeReveal-*",
363
+ "./interactionListening.mjs"
325
364
  ],
326
365
  "gzip": true,
327
- "limit": "44.72 KB"
366
+ "limit": "46.44 kB"
328
367
  },
329
368
  {
330
369
  "name": "VirtualList",
@@ -333,10 +372,11 @@
333
372
  "react",
334
373
  "react-dom",
335
374
  "./diagnostics-*",
336
- "./themeReveal-*"
375
+ "./themeReveal-*",
376
+ "./interactionListening.mjs"
337
377
  ],
338
378
  "gzip": true,
339
- "limit": "43.53 KB"
379
+ "limit": "45.00 kB"
340
380
  },
341
381
  {
342
382
  "name": "Skeleton",
@@ -345,10 +385,11 @@
345
385
  "react",
346
386
  "react-dom",
347
387
  "./diagnostics-*",
348
- "./themeReveal-*"
388
+ "./themeReveal-*",
389
+ "./interactionListening.mjs"
349
390
  ],
350
391
  "gzip": true,
351
- "limit": "39.39 KB"
392
+ "limit": "40.82 kB"
352
393
  },
353
394
  {
354
395
  "name": "Tabs",
@@ -357,10 +398,11 @@
357
398
  "react",
358
399
  "react-dom",
359
400
  "./diagnostics-*",
360
- "./themeReveal-*"
401
+ "./themeReveal-*",
402
+ "./interactionListening.mjs"
361
403
  ],
362
404
  "gzip": true,
363
- "limit": "41.99 KB"
405
+ "limit": "43.61 kB"
364
406
  },
365
407
  {
366
408
  "name": "Slider",
@@ -369,10 +411,11 @@
369
411
  "react",
370
412
  "react-dom",
371
413
  "./diagnostics-*",
372
- "./themeReveal-*"
414
+ "./themeReveal-*",
415
+ "./interactionListening.mjs"
373
416
  ],
374
417
  "gzip": true,
375
- "limit": "41.16 KB"
418
+ "limit": "42.75 kB"
376
419
  },
377
420
  {
378
421
  "name": "Progress",
@@ -381,10 +424,11 @@
381
424
  "react",
382
425
  "react-dom",
383
426
  "./diagnostics-*",
384
- "./themeReveal-*"
427
+ "./themeReveal-*",
428
+ "./interactionListening.mjs"
385
429
  ],
386
430
  "gzip": true,
387
- "limit": "39.34 KB"
431
+ "limit": "40.77 kB"
388
432
  },
389
433
  {
390
434
  "name": "Toaster",
@@ -393,10 +437,11 @@
393
437
  "react",
394
438
  "react-dom",
395
439
  "./diagnostics-*",
396
- "./themeReveal-*"
440
+ "./themeReveal-*",
441
+ "./interactionListening.mjs"
397
442
  ],
398
443
  "gzip": true,
399
- "limit": "42.77 KB"
444
+ "limit": "44.41 kB"
400
445
  },
401
446
  {
402
447
  "name": "DateField",
@@ -405,10 +450,11 @@
405
450
  "react",
406
451
  "react-dom",
407
452
  "./diagnostics-*",
408
- "./themeReveal-*"
453
+ "./themeReveal-*",
454
+ "./interactionListening.mjs"
409
455
  ],
410
456
  "gzip": true,
411
- "limit": "47.97 KB"
457
+ "limit": "49.64 kB"
412
458
  },
413
459
  {
414
460
  "name": "Calendar",
@@ -417,10 +463,11 @@
417
463
  "react",
418
464
  "react-dom",
419
465
  "./diagnostics-*",
420
- "./themeReveal-*"
466
+ "./themeReveal-*",
467
+ "./interactionListening.mjs"
421
468
  ],
422
469
  "gzip": true,
423
- "limit": "47.39 KB"
470
+ "limit": "49.09 kB"
424
471
  },
425
472
  {
426
473
  "name": "DatePicker",
@@ -429,10 +476,11 @@
429
476
  "react",
430
477
  "react-dom",
431
478
  "./diagnostics-*",
432
- "./themeReveal-*"
479
+ "./themeReveal-*",
480
+ "./interactionListening.mjs"
433
481
  ],
434
482
  "gzip": true,
435
- "limit": "60.07 KB"
483
+ "limit": "61.85 kB"
436
484
  },
437
485
  {
438
486
  "name": "DateTime",
@@ -441,10 +489,11 @@
441
489
  "react",
442
490
  "react-dom",
443
491
  "./diagnostics-*",
444
- "./themeReveal-*"
492
+ "./themeReveal-*",
493
+ "./interactionListening.mjs"
445
494
  ],
446
495
  "gzip": true,
447
- "limit": "42.9 KB"
496
+ "limit": "44.35 kB"
448
497
  },
449
498
  {
450
499
  "name": "TimeZoneSelect",
@@ -453,10 +502,11 @@
453
502
  "react",
454
503
  "react-dom",
455
504
  "./diagnostics-*",
456
- "./themeReveal-*"
505
+ "./themeReveal-*",
506
+ "./interactionListening.mjs"
457
507
  ],
458
508
  "gzip": true,
459
- "limit": "50.51 KB"
509
+ "limit": "52.22 kB"
460
510
  },
461
511
  {
462
512
  "name": "Combobox",
@@ -465,10 +515,11 @@
465
515
  "react",
466
516
  "react-dom",
467
517
  "./diagnostics-*",
468
- "./themeReveal-*"
518
+ "./themeReveal-*",
519
+ "./interactionListening.mjs"
469
520
  ],
470
521
  "gzip": true,
471
- "limit": "48.58 KB"
522
+ "limit": "50.20 kB"
472
523
  },
473
524
  {
474
525
  "name": "Dashboard",
@@ -477,10 +528,11 @@
477
528
  "react",
478
529
  "react-dom",
479
530
  "./diagnostics-*",
480
- "./themeReveal-*"
531
+ "./themeReveal-*",
532
+ "./interactionListening.mjs"
481
533
  ],
482
534
  "gzip": true,
483
- "limit": "45.01 KB"
535
+ "limit": "46.74 kB"
484
536
  },
485
537
  {
486
538
  "name": "DataGrid",
@@ -490,11 +542,22 @@
490
542
  "react-dom",
491
543
  "./diagnostics-*",
492
544
  "./themeReveal-*",
545
+ "./interactionListening.mjs",
493
546
  "../dataGridList.mjs",
494
547
  "../dataGridDateParts.mjs"
495
548
  ],
496
549
  "gzip": true,
497
- "limit": "94.65 KB"
550
+ "limit": "97.40 kB"
551
+ },
552
+ {
553
+ "name": "Interaction delivery, the chunk the first Box.onInteraction fetches",
554
+ "path": "dist/interactionListening.mjs",
555
+ "ignore": [
556
+ "react",
557
+ "react-dom"
558
+ ],
559
+ "gzip": true,
560
+ "limit": "1.44 kB"
498
561
  },
499
562
  {
500
563
  "name": "DataGrid export, the chunk fetched on the first press",
@@ -503,10 +566,11 @@
503
566
  "react",
504
567
  "react-dom",
505
568
  "./diagnostics-*",
506
- "./themeReveal-*"
569
+ "./themeReveal-*",
570
+ "./interactionListening.mjs"
507
571
  ],
508
572
  "gzip": true,
509
- "limit": "3.8 KB"
573
+ "limit": "3.86 kB"
510
574
  },
511
575
  {
512
576
  "name": "DataGrid list layout, the chunk a narrow grid fetches on top of the grid",
@@ -516,11 +580,12 @@
516
580
  "react-dom",
517
581
  "./diagnostics-*",
518
582
  "./themeReveal-*",
583
+ "./interactionListening.mjs",
519
584
  "./box.mjs",
520
585
  "./components/*"
521
586
  ],
522
587
  "gzip": true,
523
- "limit": "7.83 KB"
588
+ "limit": "7.89 kB"
524
589
  },
525
590
  {
526
591
  "name": "DataGrid dates, the chunk a grid with a date column fetches on top of the grid",
@@ -530,11 +595,12 @@
530
595
  "react-dom",
531
596
  "./diagnostics-*",
532
597
  "./themeReveal-*",
598
+ "./interactionListening.mjs",
533
599
  "./box.mjs",
534
600
  "./components/*"
535
601
  ],
536
602
  "gzip": true,
537
- "limit": "7.49 KB"
603
+ "limit": "7.56 kB"
538
604
  },
539
605
  {
540
606
  "name": "Full library (Box + ssg + every component)",
@@ -543,10 +609,11 @@
543
609
  "react",
544
610
  "react-dom",
545
611
  "./diagnostics-*",
546
- "./themeReveal-*"
612
+ "./themeReveal-*",
613
+ "./interactionListening.mjs"
547
614
  ],
548
615
  "gzip": true,
549
- "limit": "162.25 KB"
616
+ "limit": "165.71 kB"
550
617
  }
551
618
  ],
552
619
  "repository": {
@@ -586,13 +653,14 @@
586
653
  "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
587
654
  },
588
655
  "dependencies": {
589
- "@box-kite/core": "2.2.6",
656
+ "@box-kite/core": "2.2.8",
590
657
  "csstype": "^3.2.3",
591
658
  "use-sync-external-store": "^1.6.0"
592
659
  },
593
660
  "devDependencies": {
594
661
  "@arethetypeswrong/cli": "^0.18.5",
595
662
  "@assistant-ui/core": "^0.3.20",
663
+ "@clack/prompts": "^1.8.1",
596
664
  "@copilotkit/a2ui-renderer": "^1.73.0",
597
665
  "@emotion/react": "^11.14.0",
598
666
  "@emotion/styled": "^11.14.1",
@@ -623,6 +691,7 @@
623
691
  "ag-grid-community": "^36.2.0",
624
692
  "ag-grid-react": "^36.2.0",
625
693
  "axe-core": "^4.13.0",
694
+ "create-vite": "^9.3.0",
626
695
  "eslint": "^10.8.0",
627
696
  "eslint-config-prettier": "^10.1.8",
628
697
  "eslint-plugin-import-x": "^4.17.1",
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.l(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.l(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.d(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.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}});
package/placement.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { d as e, l as t } from "./platform.mjs";
1
+ import { d as e, p 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";
@@ -82,9 +82,9 @@ function S(o = {}) {
82
82
  n(() => {
83
83
  v() || O(!1);
84
84
  }, []), n(() => {
85
- let e = t(C);
86
- if (e) return e.style.setProperty("anchor-name", E), () => {
87
- e.style.removeProperty("anchor-name");
85
+ let t = e(C);
86
+ if (t) return t.style.setProperty("anchor-name", E), () => {
87
+ t.style.removeProperty("anchor-name");
88
88
  };
89
89
  }, [C, E]), n(() => {
90
90
  !D || !w || !j || I(l(getComputedStyle(j).getPropertyValue("position-area")));
@@ -96,16 +96,16 @@ function S(o = {}) {
96
96
  d,
97
97
  p
98
98
  ]), n(() => {
99
- let n = t(C) ?? k;
99
+ let n = e(C) ?? k;
100
100
  if (D || !n || !j) return;
101
101
  let r = () => {
102
- let t = b(n), r = b(j), i = {
102
+ let e = b(n), r = b(j), i = {
103
103
  top: 0,
104
104
  left: 0,
105
105
  width: window.innerWidth,
106
106
  height: window.innerHeight
107
- }, a = g ? Math.max(r.width, t.width) : r.width, o = {
108
- ...m(t, {
107
+ }, a = g ? Math.max(r.width, e.width) : r.width, o = {
108
+ ...m(e, {
109
109
  ...r,
110
110
  width: a
111
111
  }, i, {
@@ -113,9 +113,9 @@ function S(o = {}) {
113
113
  align: d,
114
114
  offset: f / h * y(),
115
115
  flip: p,
116
- rtl: e(n)
116
+ rtl: t(n)
117
117
  }),
118
- anchorWidth: t.width
118
+ anchorWidth: e.width
119
119
  };
120
120
  P((e) => x(e, o) ? e : o);
121
121
  };
package/platform.cjs CHANGED
@@ -1 +1 @@
1
- function e(e){return e?`current`in e?e.current:e:null}function t(t){let n=e(t);return n instanceof HTMLElement?n:null}function n(t,n){let r=typeof t.composedPath==`function`?t.composedPath():[];return n.some(n=>{let i=e(n);return i?r.includes(i)||t.target instanceof Node&&i.contains(t.target):!1})}function r(t){let n=e(t),r=n?.ownerDocument?.defaultView;return!!n&&!!r&&r.getComputedStyle(n).direction===`rtl`}function i(t){let n=e(t)?.ownerDocument?.defaultView?.getSelection();n&&!n.isCollapsed&&n.removeAllRanges()}function a(){return typeof window<`u`&&window.document!==void 0}function o(){return typeof document<`u`}function s(){return o()?document:null}function c(){return s()?.documentElement??null}function l(){return typeof HTMLElement<`u`&&typeof HTMLElement.prototype.showPopover==`function`}function u(){return typeof HTMLDialogElement<`u`&&`closedBy`in HTMLDialogElement.prototype}function d(e){return typeof window>`u`||typeof window.matchMedia!=`function`?null:window.matchMedia(e)}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return n}});
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}});