@box-kite/react 2.2.0 → 2.2.1

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.
@@ -35,7 +35,7 @@ These hold state, measure the DOM or portal into it. A Server Component may impo
35
35
  | `@box-kite/react/components/checkbox` | `Checkbox` (default) | |
36
36
  | `@box-kite/react/components/combobox` | `Combobox` (default), `ComboboxUtils` | |
37
37
  | `@box-kite/react/components/dashboard` | `DashboardGrid` (default), `DashboardUtils`, `Widget` | |
38
- | `@box-kite/react/components/dataGrid` | `dataGrid` (default) | |
38
+ | `@box-kite/react/components/dataGrid` | `dataGrid` (default), `DATA_GRID_LOCALE_TEXT` | |
39
39
  | `@box-kite/react/components/dialog` | `Dialog` (default), `AlertDialog` | |
40
40
  | `@box-kite/react/components/dropdown` | `Dropdown` (default) | **deprecated** |
41
41
  | `@box-kite/react/components/form` | `Form` (default) | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box-kite/react",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "pages/**"
@@ -116,7 +116,7 @@
116
116
  "./diagnostics-*"
117
117
  ],
118
118
  "gzip": true,
119
- "limit": "36.28 KB"
119
+ "limit": "36.74 KB"
120
120
  },
121
121
  {
122
122
  "name": "Box in a Server Component (react-server entry)",
@@ -127,7 +127,7 @@
127
127
  "./diagnostics-*"
128
128
  ],
129
129
  "gzip": true,
130
- "limit": "34.69 KB"
130
+ "limit": "35.16 KB"
131
131
  },
132
132
  {
133
133
  "name": "Behavior primitives (a11y entry)",
@@ -160,7 +160,7 @@
160
160
  "./diagnostics-*"
161
161
  ],
162
162
  "gzip": true,
163
- "limit": "54.73 KB"
163
+ "limit": "55.18 KB"
164
164
  },
165
165
  {
166
166
  "name": "Spec renderer (spec entry)",
@@ -188,7 +188,7 @@
188
188
  "name": "Core engine (@box-kite/core, no React)",
189
189
  "path": "dist-core/core.mjs",
190
190
  "gzip": true,
191
- "limit": "35.73 KB",
191
+ "limit": "36.20 KB",
192
192
  "ignore": [
193
193
  "./diagnostics-*"
194
194
  ]
@@ -202,7 +202,7 @@
202
202
  "./diagnostics-*"
203
203
  ],
204
204
  "gzip": true,
205
- "limit": "38.35 KB"
205
+ "limit": "38.83 KB"
206
206
  },
207
207
  {
208
208
  "name": "Popover",
@@ -213,7 +213,7 @@
213
213
  "./diagnostics-*"
214
214
  ],
215
215
  "gzip": true,
216
- "limit": "39.88 KB"
216
+ "limit": "40.35 KB"
217
217
  },
218
218
  {
219
219
  "name": "Menu",
@@ -224,7 +224,7 @@
224
224
  "./diagnostics-*"
225
225
  ],
226
226
  "gzip": true,
227
- "limit": "42.15 KB"
227
+ "limit": "42.63 KB"
228
228
  },
229
229
  {
230
230
  "name": "Accordion",
@@ -235,7 +235,7 @@
235
235
  "./diagnostics-*"
236
236
  ],
237
237
  "gzip": true,
238
- "limit": "37.60 KB"
238
+ "limit": "38.07 KB"
239
239
  },
240
240
  {
241
241
  "name": "Agent",
@@ -246,7 +246,7 @@
246
246
  "./diagnostics-*"
247
247
  ],
248
248
  "gzip": true,
249
- "limit": "38.34 KB"
249
+ "limit": "38.80 KB"
250
250
  },
251
251
  {
252
252
  "name": "Markdown",
@@ -257,7 +257,7 @@
257
257
  "./diagnostics-*"
258
258
  ],
259
259
  "gzip": true,
260
- "limit": "36.84 KB"
260
+ "limit": "37.30 KB"
261
261
  },
262
262
  {
263
263
  "name": "Skeleton",
@@ -268,7 +268,7 @@
268
268
  "./diagnostics-*"
269
269
  ],
270
270
  "gzip": true,
271
- "limit": "36.17 KB"
271
+ "limit": "36.64 KB"
272
272
  },
273
273
  {
274
274
  "name": "Tabs",
@@ -279,7 +279,7 @@
279
279
  "./diagnostics-*"
280
280
  ],
281
281
  "gzip": true,
282
- "limit": "38.80 KB"
282
+ "limit": "39.26 KB"
283
283
  },
284
284
  {
285
285
  "name": "Slider",
@@ -290,7 +290,7 @@
290
290
  "./diagnostics-*"
291
291
  ],
292
292
  "gzip": true,
293
- "limit": "37.95 KB"
293
+ "limit": "38.42 KB"
294
294
  },
295
295
  {
296
296
  "name": "Progress",
@@ -301,7 +301,7 @@
301
301
  "./diagnostics-*"
302
302
  ],
303
303
  "gzip": true,
304
- "limit": "36.15 KB"
304
+ "limit": "36.62 KB"
305
305
  },
306
306
  {
307
307
  "name": "Toaster",
@@ -312,7 +312,7 @@
312
312
  "./diagnostics-*"
313
313
  ],
314
314
  "gzip": true,
315
- "limit": "39.62 KB"
315
+ "limit": "40.08 KB"
316
316
  },
317
317
  {
318
318
  "name": "Combobox",
@@ -323,7 +323,7 @@
323
323
  "./diagnostics-*"
324
324
  ],
325
325
  "gzip": true,
326
- "limit": "45.41 KB"
326
+ "limit": "45.88 KB"
327
327
  },
328
328
  {
329
329
  "name": "Dashboard",
@@ -334,7 +334,7 @@
334
334
  "./diagnostics-*"
335
335
  ],
336
336
  "gzip": true,
337
- "limit": "41.80 KB"
337
+ "limit": "42.27 KB"
338
338
  },
339
339
  {
340
340
  "name": "DataGrid",
@@ -345,7 +345,7 @@
345
345
  "./diagnostics-*"
346
346
  ],
347
347
  "gzip": true,
348
- "limit": "83.18 KB"
348
+ "limit": "87.02 KB"
349
349
  },
350
350
  {
351
351
  "name": "DataGrid export, the chunk fetched on the first press",
@@ -367,7 +367,7 @@
367
367
  "./diagnostics-*"
368
368
  ],
369
369
  "gzip": true,
370
- "limit": "114.74 KB"
370
+ "limit": "118.64 KB"
371
371
  }
372
372
  ],
373
373
  "repository": {
@@ -387,7 +387,13 @@
387
387
  "react-server-components",
388
388
  "rsc",
389
389
  "accessibility",
390
- "typescript"
390
+ "typescript",
391
+ "components",
392
+ "ui-components",
393
+ "ai",
394
+ "mcp",
395
+ "agents",
396
+ "generative-ui"
391
397
  ],
392
398
  "author": "Maxim Procopenco",
393
399
  "license": "MIT",
@@ -401,7 +407,7 @@
401
407
  "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
402
408
  },
403
409
  "dependencies": {
404
- "@box-kite/core": "2.2.0",
410
+ "@box-kite/core": "2.2.1",
405
411
  "csstype": "^3.2.3",
406
412
  "use-sync-external-store": "^1.6.0"
407
413
  },
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Which cell holds the grid's tab stop, as a store each cell subscribes to by its own coordinates. Handed
3
+ * down as a value, a move changed it for every cell on screen; subscribed to, it re-renders the two cells
4
+ * whose answer changed.
5
+ */
6
+ export default class ActiveCellStore {
7
+ private row;
8
+ private column;
9
+ private readonly listeners;
10
+ constructor(row: number, column: number);
11
+ subscribe: (listener: () => void) => (() => void);
12
+ isActive(row: number, column: number): boolean;
13
+ set(row: number, column: number): void;
14
+ }
@@ -0,0 +1,19 @@
1
+ import { FilterValue, NumberFilterValue } from '../../components/dataGrid/contracts/dataGridContract';
2
+ /** What a number filter's inputs hold while they are being typed into: text, since `1.` is on its way to a number. */
3
+ export interface NumberFilterDraft {
4
+ operator: NumberFilterValue['operator'];
5
+ value: string;
6
+ valueTo: string;
7
+ }
8
+ /**
9
+ * Whether a filter input's draft already says what the grid holds. When it does not, the grid's value
10
+ * came from somewhere else — "Clear filters", a controlled prop — and the input has to take it.
11
+ */
12
+ declare namespace FilterDraftUtils {
13
+ /** A text filter stores what was typed, and a blank one is no filter at all. */
14
+ function textMatches(draft: string, filter: FilterValue | undefined): boolean;
15
+ function numberDraft(filter: FilterValue | undefined): NumberFilterDraft;
16
+ /** Read the way the model parses, so `1.` matches a stored `1` and a half-typed number is never rewritten. */
17
+ function numberMatches(draft: NumberFilterDraft, filter: FilterValue | undefined): boolean;
18
+ }
19
+ export default FilterDraftUtils;
@@ -0,0 +1,50 @@
1
+ /** Where the travelling header hover sits: each edge's distance from the same edge of the header, in px. */
2
+ export interface HeaderHoverBounds {
3
+ left: number;
4
+ right: number;
5
+ top: number;
6
+ bottom: number;
7
+ }
8
+ /** The travelling hover's whole state. Physical edges, because a measured pixel has no reading order. */
9
+ export interface HeaderHoverState {
10
+ bounds?: HeaderHoverBounds;
11
+ visible: boolean;
12
+ /** Shown this update from nothing, so it appears where it is rather than travelling from where it last was. */
13
+ entering: boolean;
14
+ /** Which way it last travelled: the leading edge is the fast one, which is what makes it stretch and settle. */
15
+ backward: boolean;
16
+ /** Hidden by the resizer between two cells rather than by leaving: the next cell is travelled to, not entered. */
17
+ paused: boolean;
18
+ }
19
+ /**
20
+ * What a header cell does with the pointer: which press sorts, and the model behind `def.headerHover:
21
+ * 'sliding'` — one pill that flows from the cell it was on to the one under the pointer.
22
+ */
23
+ declare namespace HeaderCellUtils {
24
+ /** A sortable header cell: the only kind a press does anything on, and so the only kind that hovers. */
25
+ const CELL_SELECTOR = "[role=\"columnheader\"][aria-sort]";
26
+ /**
27
+ * Whether a press sorts: anywhere in the cell but a control inside it. Judged on where the press *began*,
28
+ * since a resize drag released over the cell fires its click on the cell itself.
29
+ */
30
+ function isSortPress(cell: Element, pressedOn: EventTarget | null): boolean;
31
+ const INITIAL: HeaderHoverState;
32
+ /** Whether the pointer is over a resizer, where a press resizes, so no cell hovers. */
33
+ function isOnResizer(target: EventTarget | null): boolean;
34
+ /** The hoverable cell an event landed in, if it belongs to this header. Over the resizer there is none. */
35
+ function cellAt(header: Element, target: EventTarget | null): HTMLElement | undefined;
36
+ /**
37
+ * The cell's box against the header's own, which is the hover's containing block — less the resizer's line
38
+ * where it stands inside the cell, so the pill keeps the same distance from it as the neighbour's does.
39
+ */
40
+ function bounds(header: Element, cell: Element): HeaderHoverBounds;
41
+ function sameBounds(a: HeaderHoverBounds | undefined, b: HeaderHoverBounds | undefined): boolean;
42
+ /** The next state for a pointer over `next` — a cell's bounds, or `undefined` for anywhere that does not hover. */
43
+ function hover(state: HeaderHoverState, next: HeaderHoverBounds | undefined): HeaderHoverState;
44
+ /**
45
+ * Over the resizer: hidden, but still on its way between two cells. The handle sits on the boundary every
46
+ * move from cell to cell crosses, so treating it as a leave would turn each move into an entrance.
47
+ */
48
+ function pause(state: HeaderHoverState): HeaderHoverState;
49
+ }
50
+ export default HeaderCellUtils;