@sheetxl/grid-react 0.8.0-beta.2 → 0.8.0-beta.20

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 (68) hide show
  1. package/LICENSE.md +8 -7
  2. package/README.md +21 -8
  3. package/browser/esm/index.mjs +3617 -3107
  4. package/licenses/dependencies.txt +0 -208
  5. package/node/esm/index.mjs +3955 -2532
  6. package/package.json +9 -13
  7. package/types/src/cell/CellRenderer.d.ts +32 -0
  8. package/types/src/cell/GridlineLayer.d.ts +39 -1
  9. package/types/src/editor/DefaultEditable.d.ts +16 -6
  10. package/types/src/editor/EditSession.d.ts +28 -5
  11. package/types/src/editor/EditorDiv.d.ts +3 -2
  12. package/types/src/editor/EditorInput.d.ts +5 -2
  13. package/types/src/editor/EditorLayer.d.ts +9 -4
  14. package/types/src/editor/EditorStartLayer.d.ts +33 -0
  15. package/types/src/editor/index.d.ts +1 -0
  16. package/types/src/editor/useEditorKeymap.d.ts +7 -2
  17. package/types/src/grid/Grid.d.ts +1 -1
  18. package/types/src/grid/IGrid.d.ts +4 -4
  19. package/types/src/header/GridFreezeAnchor.d.ts +29 -0
  20. package/types/src/header/HeaderDividerAnchor.d.ts +36 -1
  21. package/types/src/header/HeaderFreezeAnchor.d.ts +37 -0
  22. package/types/src/header/_freezeSnap.d.ts +28 -0
  23. package/types/src/header/_useFreezeGrip.d.ts +28 -0
  24. package/types/src/header/index.d.ts +2 -0
  25. package/types/src/header/useHeaderSelectionPointer.d.ts +4 -4
  26. package/types/src/layer/GestureTip.d.ts +77 -0
  27. package/types/src/layer/GridFloatPanel.d.ts +3 -2
  28. package/types/src/layer/Layer.d.ts +6 -0
  29. package/types/src/layer/RangeFloatLayer.d.ts +145 -53
  30. package/types/src/layer/RangePrompt.d.ts +8 -8
  31. package/types/src/layer/RangeTooltip.d.ts +128 -0
  32. package/types/src/layer/RangeTooltipLayer.d.ts +53 -0
  33. package/types/src/layer/StickyAnchor.d.ts +15 -5
  34. package/types/src/layer/StickyPortal.d.ts +73 -0
  35. package/types/src/layer/TooltipProvider.d.ts +104 -0
  36. package/types/src/layer/_Utils.d.ts +9 -3
  37. package/types/src/layer/index.d.ts +6 -4
  38. package/types/src/layer/useGridAnchor.d.ts +45 -4
  39. package/types/src/layer/useHoverIntent.d.ts +35 -8
  40. package/types/src/list/CheckboxList.d.ts +18 -2
  41. package/types/src/list/ListSearch.d.ts +24 -3
  42. package/types/src/list/PickList.d.ts +6 -1
  43. package/types/src/range/DragHandle.d.ts +13 -6
  44. package/types/src/range/Draggable.d.ts +29 -3
  45. package/types/src/range/FillHandle.d.ts +11 -2
  46. package/types/src/range/RangeGlide.d.ts +160 -0
  47. package/types/src/range/RangeRect.d.ts +7 -0
  48. package/types/src/range/RangeResizer.d.ts +7 -1
  49. package/types/src/range/index.d.ts +2 -0
  50. package/types/src/range/useRangeGlide.d.ts +11 -0
  51. package/types/src/selection/RangesPickerLayer.d.ts +4 -1
  52. package/types/src/selection/SelectionLayer.d.ts +71 -15
  53. package/types/src/selection/SelectionStyle.d.ts +4 -1
  54. package/types/src/selection/SelectionTouchGrips.d.ts +6 -4
  55. package/types/src/selection/_SelectionUtils.d.ts +6 -0
  56. package/types/src/selection/useDragCells.d.ts +29 -9
  57. package/types/src/surface/GridPane.d.ts +2 -0
  58. package/types/src/surface/IGridPane.d.ts +15 -2
  59. package/types/src/surface/SurfaceStateProvider.d.ts +1 -1
  60. package/types/src/surface/getPrimaryPane.d.ts +13 -0
  61. package/types/src/surface/index.d.ts +1 -0
  62. package/types/src/surface/useSurfaceState.d.ts +29 -0
  63. package/types/src/svg/RectangleSVG.d.ts +21 -4
  64. package/types/src/theme/GridTheme.d.ts +1 -1
  65. package/browser/cjs/index.cjs +0 -3
  66. package/types/src/layer/HoverTipLayer.d.ts +0 -47
  67. package/types/src/layer/StickyFloat.d.ts +0 -68
  68. package/types/src/layer/useRangeHover.d.ts +0 -36
package/LICENSE.md CHANGED
@@ -1,11 +1,12 @@
1
- # Repository Licensing
1
+ # License
2
2
 
3
- SheetXL contains a mix of open-source and commercially licensed packages. Each package is individually licensed and contains its own license file.
3
+ Copyright (c) 2026-present SheetXL Inc. & Michael T. Ford. All rights reserved.
4
4
 
5
- For the specific terms and conditions applicable to a package, please see the `LICENSE.md` file located in that package's root directory.
5
+ This package is commercial software, licensed under the SheetXL End-User License Agreement:
6
+ https://www.sheetxl.com/eula
6
7
 
7
- Generally, packages intended for public distribution (such as CLIs, adapters, and vanilla wrappers) are licensed under the MIT license. All other core packages are proprietary and require a commercial license for use.
8
+ A free Community License covers evaluation, learning and non-commercial use. Commercial use
9
+ requires a paid license — see https://www.sheetxl.com/pricing.
8
10
 
9
- For more details on commercial licensing, please visit our website:
10
-
11
- https://www.sheetxl.com/docs/guides/licensing-pricing
11
+ Third-party components bundled in this package remain under their own licenses, listed in
12
+ `licenses/dependencies.txt`.
package/README.md CHANGED
@@ -33,8 +33,10 @@ That's it — a virtualized grid that efficiently handles trillions of cells.
33
33
 
34
34
  `renderCells` receives a `CellRendererProps`: `{ cell, range, bounds, value, style, pane }` (plus a
35
35
  `key`). `style` is already positioned/sized for the cell — spread it onto your element. By default a
36
- rendered cell is `pointer-events: none` so clicks fall through to the grid; override per cell to make
37
- it interactive.
36
+ rendered cell is `pointer-events: none` so clicks fall through to the grid. To make part of a cell
37
+ interactive — a checkbox, a button, a slider — spread `CELL_INTERACTIVE_PROPS` onto that element and
38
+ add its handlers as on any element: a plain press on it selects the cell, starts no drag-select, and
39
+ then reaches the element's own `onPointerDown`; a drag captures the pointer on the element itself.
38
40
 
39
41
  ## Why another grid?
40
42
 
@@ -304,8 +306,16 @@ const pane = useGridPane();
304
306
  The **Stage is the grid's surface** — focus rests on it, and that's what cell navigation uses.
305
307
  Programmatically, `gridRef.current.focus()` (or `pane.focus()`) focuses the surface. A `VirtualDiv`
306
308
  that should take keyboard focus opts in with `tabIndex` — regular div focus semantics: when it's
307
- focused it receives keys first (and may `stopPropagation` to keep them from the grid); when the
308
- surface is focused, keys reach the grid and it navigates as usual.
309
+ focused, keys target it and reach its handlers at its layer's turn (after the taps above it, per
310
+ law 3), and it may `stopPropagation` to keep them from the layers below; when the surface is
311
+ focused, keys reach the grid and it navigates as usual.
312
+
313
+ A behavior that belongs to the **grid in ready mode** — opening the cell editor on a typed key or a
314
+ double-click — is the floor's, not the top's: put it on its own Layer at the *bottom* of the stack
315
+ (it then hears only what no widget above consumed) and, for keys, act only when the surface itself
316
+ is the event target. A layer that sits high to *paint* (the editor box) must not carry that
317
+ behavior, because its tap would hear every widget's keys first. `EditorStartLayer` + `EditorLayer`
318
+ are this split.
309
319
 
310
320
  Keys are positionless, so their walk skips hit-testing: **every** layer is offered the key, top of
311
321
  z first, then the command system terminates the bubble. There is **no** "is the target an input?"
@@ -353,7 +363,7 @@ with gridlines and the selection rectangle at any device-pixel ratio:
353
363
  Composition: a **view-sized, pointer-transparent `VirtualDiv`** hosting a `RectangleSVG` drawn at
354
364
  the range's true coordinates (clamped to the view). The box is view-sized on purpose — a range-sized
355
365
  box would be enormous for whole-column ranges, and an SVG whose box moves can't animate its stroke
356
- (`animatedTransition` glides the path inside a stable coordinate space instead). `RectangleSVG` /
366
+ (a `glide` — see `RangeGlide` — moves the path inside a stable coordinate space instead). `RectangleSVG` /
357
367
  `LineSVG` are available for composing your own shapes the same way.
358
368
 
359
369
  ### Anchored floats
@@ -364,8 +374,9 @@ anchor resolver + Floating UI), not from them:
364
374
 
365
375
  - **`StickyAnchor`** — resolves a grid anchor (range / cell / edge / point) to a live position;
366
376
  children render inline (clipping with the pane) or self-position via render-prop.
367
- - **`StickyFloat`** — the portal flavor: floats content beside the anchor with flip/shift/clamp.
368
- - **`HoverTipLayer`** — hover-intent tips: a `Layer` tap probing the hovered cell + a `StickyFloat`.
377
+ - **`StickyPortal`** — the portal flavor: floats content beside the anchor with flip/shift/clamp.
378
+ - **`RangeTooltipLayer`** — the tooltip kind: a `Layer` tap probing the hovered cell + a `StickyPortal` in the
379
+ group's bubble; `TooltipProvider` sets the timing, the bubble and the single-open group.
369
380
  - **`RangePrompt`** — a persistent prompt pinned to a range, with an out-of-view "go to" affordance.
370
381
 
371
382
  Naming convention: a component ending in `-Layer` roots a `Layer` (drop it in as a grid child);
@@ -390,7 +401,9 @@ Complete, drop-in layers (each roots its own `Layer` — stack them like any oth
390
401
  directly on a `GridSurface` when you own the stack.
391
402
  - **`SelectionLayer`** — pointer + keyboard selection over an `ISelection` model, with move grip and
392
403
  fill handle slots.
393
- - **`EditorLayer`** — an always-mounted inline cell editor (swappable input).
404
+ - **`EditorStartLayer`** — the ready-mode edit starters (typed key / F2 / double-click); mount it
405
+ first (the floor).
406
+ - **`EditorLayer`** — an always-mounted inline cell editor (swappable input); mount it last (the top).
394
407
  - **`RangesPickerLayer`** — multi-rectangle range picking (formula references, chart ranges).
395
408
  - **`List`** — a virtualized list built from the same engine (a one-column grid + selection).
396
409