@sheetpane/grid 0.0.0-stage → 0.3.0

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 (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +429 -2
  3. package/custom-elements.json +1246 -0
  4. package/dist/errors/element.d.ts +108 -0
  5. package/dist/errors/element.d.ts.map +1 -0
  6. package/dist/errors/element.js +456 -0
  7. package/dist/errors/element.js.map +1 -0
  8. package/dist/excel/element.d.ts +434 -0
  9. package/dist/excel/element.d.ts.map +1 -0
  10. package/dist/excel/element.js +3382 -0
  11. package/dist/excel/element.js.map +1 -0
  12. package/dist/excel/geometry.d.ts +81 -0
  13. package/dist/excel/geometry.d.ts.map +1 -0
  14. package/dist/excel/geometry.js +137 -0
  15. package/dist/excel/geometry.js.map +1 -0
  16. package/dist/excel/selection.d.ts +103 -0
  17. package/dist/excel/selection.d.ts.map +1 -0
  18. package/dist/excel/selection.js +189 -0
  19. package/dist/excel/selection.js.map +1 -0
  20. package/dist/excel/styles.d.ts +3 -0
  21. package/dist/excel/styles.d.ts.map +1 -0
  22. package/dist/excel/styles.js +206 -0
  23. package/dist/excel/styles.js.map +1 -0
  24. package/dist/frameworks/elements.d.ts +136 -0
  25. package/dist/frameworks/jsx.d.ts +64 -0
  26. package/dist/frameworks/jsx.js +2 -0
  27. package/dist/frameworks/solid.d.ts +133 -0
  28. package/dist/frameworks/solid.js +2 -0
  29. package/dist/frameworks/svelte.d.ts +102 -0
  30. package/dist/frameworks/svelte.js +2 -0
  31. package/dist/frameworks/vue.d.ts +69 -0
  32. package/dist/frameworks/vue.js +2 -0
  33. package/dist/index.d.ts +23 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +25 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/llms-full.txt +7986 -0
  38. package/dist/llms.txt +108 -0
  39. package/dist/pane/registry.d.ts +33 -0
  40. package/dist/pane/registry.d.ts.map +1 -0
  41. package/dist/pane/registry.js +73 -0
  42. package/dist/pane/registry.js.map +1 -0
  43. package/dist/pane/rules.d.ts +231 -0
  44. package/dist/pane/rules.d.ts.map +1 -0
  45. package/dist/pane/rules.js +792 -0
  46. package/dist/pane/rules.js.map +1 -0
  47. package/dist/pane/store.d.ts +385 -0
  48. package/dist/pane/store.d.ts.map +1 -0
  49. package/dist/pane/store.js +1028 -0
  50. package/dist/pane/store.js.map +1 -0
  51. package/dist/pane/types.d.ts +130 -0
  52. package/dist/pane/types.d.ts.map +1 -0
  53. package/dist/pane/types.js +22 -0
  54. package/dist/pane/types.js.map +1 -0
  55. package/dist/plugins/host.d.ts +56 -0
  56. package/dist/plugins/host.d.ts.map +1 -0
  57. package/dist/plugins/host.js +124 -0
  58. package/dist/plugins/host.js.map +1 -0
  59. package/dist/plugins/types.d.ts +159 -0
  60. package/dist/plugins/types.d.ts.map +1 -0
  61. package/dist/plugins/types.js +12 -0
  62. package/dist/plugins/types.js.map +1 -0
  63. package/dist/rules.schema.json +52 -0
  64. package/dist/shared/dom.d.ts +23 -0
  65. package/dist/shared/dom.d.ts.map +1 -0
  66. package/dist/shared/dom.js +32 -0
  67. package/dist/shared/dom.js.map +1 -0
  68. package/dist/skills-bin.d.ts +3 -0
  69. package/dist/skills-bin.d.ts.map +1 -0
  70. package/dist/skills-bin.js +9 -0
  71. package/dist/skills-bin.js.map +1 -0
  72. package/dist/style.css +3 -0
  73. package/dist/tokens.d.ts +49 -0
  74. package/dist/tokens.d.ts.map +1 -0
  75. package/dist/tokens.js +43 -0
  76. package/dist/tokens.js.map +1 -0
  77. package/dist/vscode.css-custom-data.json +365 -0
  78. package/dist/vscode.html-custom-data.json +218 -0
  79. package/dist/web-types.json +914 -0
  80. package/package.json +70 -3
@@ -0,0 +1,102 @@
1
+ // Generated by scripts/build-manifest.mjs from custom-elements.json (W-37) — do not edit; run the grid build.
2
+ // Svelte 4 and 5: `import type {} from '@sheetpane/grid/svelte';` once, e.g. in src/app.d.ts.
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { SheetpaneErrors, SheetpaneExcel } from '../index.js';
5
+ import type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
6
+
7
+ export type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
8
+
9
+ /** `<sheetpane-excel>` in Svelte: attributes, properties, `on:sheetpane-…` (Svelte 4) and `onsheetpane-…` (Svelte 5) listeners. */
10
+ export type SheetpaneExcelSvelteProps = SheetpaneExcelAttributes & SheetpaneExcelProperties & {
11
+ /** `{ status: 'ready', name, kind, sheets, readMs }` when a file is read, or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
12
+ 'on:sheetpane-load'?: ((event: SheetpaneExcelEventMap['sheetpane-load'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
13
+ /** `{ sheet, ref, kind, was, now }` for each change, undo and redo included. */
14
+ 'on:sheetpane-change'?: ((event: SheetpaneExcelEventMap['sheetpane-change'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
15
+ /** `{ errors, plugins }` when the pane's errors change. */
16
+ 'on:sheetpane-errors'?: ((event: SheetpaneExcelEventMap['sheetpane-errors'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
17
+ /** `{ sheet, ref, range, column, value }` when the selection settles — `range` (`B3:D8`) when more than one cell is selected; a drag fires once, on release. */
18
+ 'on:sheetpane-select'?: ((event: SheetpaneExcelEventMap['sheetpane-select'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
19
+ /** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
20
+ 'on:sheetpane-visibility'?: ((event: SheetpaneExcelEventMap['sheetpane-visibility'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
21
+ /** `{ sheet, axis, indexes, px, via }` when a column width or row height is set by a drag, a fit, the header menu or a reset — on release, never during a drag (W-47). */
22
+ 'on:sheetpane-resize'?: ((event: SheetpaneExcelEventMap['sheetpane-resize'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
23
+ /** `{ sheet }` when the selection moves to another sheet. */
24
+ 'on:sheetpane-sheet'?: ((event: SheetpaneExcelEventMap['sheetpane-sheet'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
25
+ /** `{ mode }` when the pane switches between View and Edit. */
26
+ 'on:sheetpane-mode'?: ((event: SheetpaneExcelEventMap['sheetpane-mode'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
27
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
28
+ 'on:sheetpane-history'?: ((event: SheetpaneExcelEventMap['sheetpane-history'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
29
+ /** `{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only. */
30
+ 'on:sheetpane-editstart'?: ((event: SheetpaneExcelEventMap['sheetpane-editstart'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
31
+ /** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
32
+ 'on:sheetpane-input'?: ((event: SheetpaneExcelEventMap['sheetpane-input'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
33
+ /** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
34
+ 'on:sheetpane-beforechange'?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
35
+ /** `{ sheet, ref }` when Esc restores a draft, or `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it. */
36
+ 'on:sheetpane-editcancel'?: ((event: SheetpaneExcelEventMap['sheetpane-editcancel'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
37
+ /** `{ blob, kind, name, guarded, format, converted, original? }` on `export()` and Download; cancellable — the Download control then saves nothing. */
38
+ 'on:sheetpane-export'?: ((event: SheetpaneExcelEventMap['sheetpane-export'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
39
+ /** `{}` when the pop-up closes. */
40
+ 'on:sheetpane-close'?: ((event: SheetpaneExcelEventMap['sheetpane-close'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
41
+ /** `{ status: 'ready', name, kind, sheets, readMs }` when a file is read, or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
42
+ 'onsheetpane-load'?: ((event: SheetpaneExcelEventMap['sheetpane-load'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
43
+ /** `{ sheet, ref, kind, was, now }` for each change, undo and redo included. */
44
+ 'onsheetpane-change'?: ((event: SheetpaneExcelEventMap['sheetpane-change'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
45
+ /** `{ errors, plugins }` when the pane's errors change. */
46
+ 'onsheetpane-errors'?: ((event: SheetpaneExcelEventMap['sheetpane-errors'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
47
+ /** `{ sheet, ref, range, column, value }` when the selection settles — `range` (`B3:D8`) when more than one cell is selected; a drag fires once, on release. */
48
+ 'onsheetpane-select'?: ((event: SheetpaneExcelEventMap['sheetpane-select'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
49
+ /** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
50
+ 'onsheetpane-visibility'?: ((event: SheetpaneExcelEventMap['sheetpane-visibility'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
51
+ /** `{ sheet, axis, indexes, px, via }` when a column width or row height is set by a drag, a fit, the header menu or a reset — on release, never during a drag (W-47). */
52
+ 'onsheetpane-resize'?: ((event: SheetpaneExcelEventMap['sheetpane-resize'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
53
+ /** `{ sheet }` when the selection moves to another sheet. */
54
+ 'onsheetpane-sheet'?: ((event: SheetpaneExcelEventMap['sheetpane-sheet'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
55
+ /** `{ mode }` when the pane switches between View and Edit. */
56
+ 'onsheetpane-mode'?: ((event: SheetpaneExcelEventMap['sheetpane-mode'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
57
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
58
+ 'onsheetpane-history'?: ((event: SheetpaneExcelEventMap['sheetpane-history'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
59
+ /** `{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only. */
60
+ 'onsheetpane-editstart'?: ((event: SheetpaneExcelEventMap['sheetpane-editstart'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
61
+ /** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
62
+ 'onsheetpane-input'?: ((event: SheetpaneExcelEventMap['sheetpane-input'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
63
+ /** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
64
+ 'onsheetpane-beforechange'?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
65
+ /** `{ sheet, ref }` when Esc restores a draft, or `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it. */
66
+ 'onsheetpane-editcancel'?: ((event: SheetpaneExcelEventMap['sheetpane-editcancel'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
67
+ /** `{ blob, kind, name, guarded, format, converted, original? }` on `export()` and Download; cancellable — the Download control then saves nothing. */
68
+ 'onsheetpane-export'?: ((event: SheetpaneExcelEventMap['sheetpane-export'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
69
+ /** `{}` when the pop-up closes. */
70
+ 'onsheetpane-close'?: ((event: SheetpaneExcelEventMap['sheetpane-close'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
71
+ };
72
+
73
+ /** `<sheetpane-errors>` in Svelte: attributes, properties, `on:sheetpane-…` (Svelte 4) and `onsheetpane-…` (Svelte 5) listeners. */
74
+ export type SheetpaneErrorsSvelteProps = SheetpaneErrorsAttributes & SheetpaneErrorsProperties & {
75
+ /** `{ errors, plugins }` when the pane's errors change — the envelope to save a review. */
76
+ 'on:sheetpane-errors'?: ((event: SheetpaneErrorsEventMap['sheetpane-errors'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
77
+ /** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
78
+ 'on:sheetpane-change'?: ((event: SheetpaneErrorsEventMap['sheetpane-change'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
79
+ /** `{ sheet, ref }` when picking a row selects its cell. */
80
+ 'on:sheetpane-select'?: ((event: SheetpaneErrorsEventMap['sheetpane-select'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
81
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
82
+ 'on:sheetpane-history'?: ((event: SheetpaneErrorsEventMap['sheetpane-history'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
83
+ /** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up. */
84
+ 'on:sheetpane-reveal'?: ((event: SheetpaneErrorsEventMap['sheetpane-reveal'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
85
+ /** `{ errors, plugins }` when the pane's errors change — the envelope to save a review. */
86
+ 'onsheetpane-errors'?: ((event: SheetpaneErrorsEventMap['sheetpane-errors'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
87
+ /** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
88
+ 'onsheetpane-change'?: ((event: SheetpaneErrorsEventMap['sheetpane-change'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
89
+ /** `{ sheet, ref }` when picking a row selects its cell. */
90
+ 'onsheetpane-select'?: ((event: SheetpaneErrorsEventMap['sheetpane-select'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
91
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
92
+ 'onsheetpane-history'?: ((event: SheetpaneErrorsEventMap['sheetpane-history'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
93
+ /** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up. */
94
+ 'onsheetpane-reveal'?: ((event: SheetpaneErrorsEventMap['sheetpane-reveal'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
95
+ };
96
+
97
+ declare module 'svelte/elements' {
98
+ interface SvelteHTMLElements {
99
+ 'sheetpane-excel': HTMLAttributes<SheetpaneExcel> & SheetpaneExcelSvelteProps;
100
+ 'sheetpane-errors': HTMLAttributes<SheetpaneErrors> & SheetpaneErrorsSvelteProps;
101
+ }
102
+ }
@@ -0,0 +1,2 @@
1
+ // Types only: see the .d.ts beside this file (W-37).
2
+ export {};
@@ -0,0 +1,69 @@
1
+ // Generated by scripts/build-manifest.mjs from custom-elements.json (W-37) — do not edit; run the grid build.
2
+ // Vue 3: `import type {} from '@sheetpane/grid/vue';` once, and tell the compiler the tags are custom elements
3
+ // (`compilerOptions.isCustomElement: (tag) => tag.startsWith('sheetpane-')`).
4
+ import type { HTMLAttributes } from 'vue';
5
+ import type { SheetpaneErrors, SheetpaneExcel } from '../index.js';
6
+ import type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
7
+
8
+ export type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
9
+
10
+ /** `<sheetpane-excel>` in a Vue 3 template: attributes, properties and `@sheetpane-…` listeners (`onSheetpane…` props). */
11
+ export type SheetpaneExcelVueProps = SheetpaneExcelAttributes & SheetpaneExcelProperties & {
12
+ /** `{ status: 'ready', name, kind, sheets, readMs }` when a file is read, or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
13
+ onSheetpaneLoad?: ((event: SheetpaneExcelEventMap['sheetpane-load']) => void) | undefined;
14
+ /** `{ sheet, ref, kind, was, now }` for each change, undo and redo included. */
15
+ onSheetpaneChange?: ((event: SheetpaneExcelEventMap['sheetpane-change']) => void) | undefined;
16
+ /** `{ errors, plugins }` when the pane's errors change. */
17
+ onSheetpaneErrors?: ((event: SheetpaneExcelEventMap['sheetpane-errors']) => void) | undefined;
18
+ /** `{ sheet, ref, range, column, value }` when the selection settles — `range` (`B3:D8`) when more than one cell is selected; a drag fires once, on release. */
19
+ onSheetpaneSelect?: ((event: SheetpaneExcelEventMap['sheetpane-select']) => void) | undefined;
20
+ /** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
21
+ onSheetpaneVisibility?: ((event: SheetpaneExcelEventMap['sheetpane-visibility']) => void) | undefined;
22
+ /** `{ sheet, axis, indexes, px, via }` when a column width or row height is set by a drag, a fit, the header menu or a reset — on release, never during a drag (W-47). */
23
+ onSheetpaneResize?: ((event: SheetpaneExcelEventMap['sheetpane-resize']) => void) | undefined;
24
+ /** `{ sheet }` when the selection moves to another sheet. */
25
+ onSheetpaneSheet?: ((event: SheetpaneExcelEventMap['sheetpane-sheet']) => void) | undefined;
26
+ /** `{ mode }` when the pane switches between View and Edit. */
27
+ onSheetpaneMode?: ((event: SheetpaneExcelEventMap['sheetpane-mode']) => void) | undefined;
28
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
29
+ onSheetpaneHistory?: ((event: SheetpaneExcelEventMap['sheetpane-history']) => void) | undefined;
30
+ /** `{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only. */
31
+ onSheetpaneEditstart?: ((event: SheetpaneExcelEventMap['sheetpane-editstart']) => void) | undefined;
32
+ /** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
33
+ onSheetpaneInput?: ((event: SheetpaneExcelEventMap['sheetpane-input']) => void) | undefined;
34
+ /** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
35
+ onSheetpaneBeforechange?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange']) => void) | undefined;
36
+ /** `{ sheet, ref }` when Esc restores a draft, or `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it. */
37
+ onSheetpaneEditcancel?: ((event: SheetpaneExcelEventMap['sheetpane-editcancel']) => void) | undefined;
38
+ /** `{ blob, kind, name, guarded, format, converted, original? }` on `export()` and Download; cancellable — the Download control then saves nothing. */
39
+ onSheetpaneExport?: ((event: SheetpaneExcelEventMap['sheetpane-export']) => void) | undefined;
40
+ /** `{}` when the pop-up closes. */
41
+ onSheetpaneClose?: ((event: SheetpaneExcelEventMap['sheetpane-close']) => void) | undefined;
42
+ };
43
+
44
+ /** `<sheetpane-errors>` in a Vue 3 template: attributes, properties and `@sheetpane-…` listeners (`onSheetpane…` props). */
45
+ export type SheetpaneErrorsVueProps = SheetpaneErrorsAttributes & SheetpaneErrorsProperties & {
46
+ /** `{ errors, plugins }` when the pane's errors change — the envelope to save a review. */
47
+ onSheetpaneErrors?: ((event: SheetpaneErrorsEventMap['sheetpane-errors']) => void) | undefined;
48
+ /** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
49
+ onSheetpaneChange?: ((event: SheetpaneErrorsEventMap['sheetpane-change']) => void) | undefined;
50
+ /** `{ sheet, ref }` when picking a row selects its cell. */
51
+ onSheetpaneSelect?: ((event: SheetpaneErrorsEventMap['sheetpane-select']) => void) | undefined;
52
+ /** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
53
+ onSheetpaneHistory?: ((event: SheetpaneErrorsEventMap['sheetpane-history']) => void) | undefined;
54
+ /** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up. */
55
+ onSheetpaneReveal?: ((event: SheetpaneErrorsEventMap['sheetpane-reveal']) => void) | undefined;
56
+ };
57
+
58
+ /** A custom element as Vue's language tools read it: the element, with `$props` for template checking (the Vue docs' pattern). */
59
+ export type VueCustomElement<E extends HTMLElement, P> = new () => E & {
60
+ /** @deprecated For template prop types only; not a property of the element. */
61
+ $props: HTMLAttributes & P;
62
+ };
63
+
64
+ declare module 'vue' {
65
+ interface GlobalComponents {
66
+ 'sheetpane-excel': VueCustomElement<SheetpaneExcel, SheetpaneExcelVueProps>;
67
+ 'sheetpane-errors': VueCustomElement<SheetpaneErrors, SheetpaneErrorsVueProps>;
68
+ }
69
+ }
@@ -0,0 +1,2 @@
1
+ // Types only: see the .d.ts beside this file (W-37).
2
+ export {};
@@ -0,0 +1,23 @@
1
+ import { SheetpaneExcel } from './excel/element.js';
2
+ import { SheetpaneErrors } from './errors/element.js';
3
+ export { SheetpaneExcel } from './excel/element.js';
4
+ export { SheetpaneErrors } from './errors/element.js';
5
+ export { WorkbookStore, createWorkbook, parseInput, formulaRefs, key as cellKey, splitKey, kindRef, baseRef, SLOTTED_KINDS, HISTORY_CAP, type StoreOptions, type StoreEvent, type Origin } from './pane/store.js';
6
+ export { acquirePane, releasePane, paneStore } from './pane/registry.js';
7
+ export { checkDocument, describeRule, RULE_TYPE, CELL_RULE_TYPE, type RulesDocument, type DocProblem, type ColumnRule, type ColumnRules, type ColumnRulesConfig, type OnInvalid, type RuleContext, type RuleOutcome, type RulePhase, type RuleResult, type ValidateFn } from './pane/rules.js';
8
+ export { BUILTIN_TYPE_NAMES, DEFAULT_ERROR_TYPES, SEVERITY, machineAuthored } from './pane/types.js';
9
+ export { shiftFormula } from '@sheetpane/export';
10
+ export { CODES, ERRORS_DOC_URL, codeUrl, spMessage, spError, codeOf, detailOf, type CodeInfo, type SpCode, type SpCoded, type SpError } from '@sheetpane/export';
11
+ export type { SheetpaneError, Severity, Mode, ChangeKind, ChangeEntry, DerivedCell, Selection, Composing, LoadState, Source, Snapshot, ErrorType } from './pane/types.js';
12
+ export { registerPlugin, registeredPluginIds, pluginsFromIds, checkPlugins, mergeDecorations, controlsFor, type PluginFactory } from './plugins/host.js';
13
+ export { HOOKS, SLOTS, SINGLE_PROVIDER, STYLE_PROPS } from './plugins/types.js';
14
+ export type { Plugin, HookName, SlotName, ControlDescriptor, CellContext, PluginContext, DeriveInput, DerivedChange, ErrorDraft, OverlayItem, Geometry, StyleSubset, StyleProp } from './plugins/types.js';
15
+ export { sheetGeometry, charsToPx, ROW_H, HEAD_H, ROWHEAD_W } from './excel/geometry.js';
16
+ export { DARK_TOKENS, TOKENS, TOKENS_CSS, type Theme, type TokenName } from './tokens.js';
17
+ declare global {
18
+ interface HTMLElementTagNameMap {
19
+ 'sheetpane-excel': SheetpaneExcel;
20
+ 'sheetpane-errors': SheetpaneErrors;
21
+ }
22
+ }
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,IAAI,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,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AE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC3M,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAK1F,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAAG,iBAAiB,EAAE,cAAc,CAAC;QAAC,kBAAkB,EAAE,eAAe,CAAA;KAAE;CAC3G"}
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ // @sheetpane/grid — the web components <sheetpane-excel> and <sheetpane-errors>
2
+ // and the in-memory workbook they share. Importing this module registers the
3
+ // elements where `customElements` exists (SR-LAW-4, SR-LAW-8).
4
+ import { SheetpaneExcel } from './excel/element.js';
5
+ import { SheetpaneErrors } from './errors/element.js';
6
+ import { define } from './shared/dom.js';
7
+ // re-exported from their modules (not `export { X }` of the import) so the published .d.ts points
8
+ // tooling at the declarations and their TSDoc (W-36)
9
+ export { SheetpaneExcel } from './excel/element.js';
10
+ export { SheetpaneErrors } from './errors/element.js';
11
+ export { WorkbookStore, createWorkbook, parseInput, formulaRefs, key as cellKey, splitKey, kindRef, baseRef, SLOTTED_KINDS, HISTORY_CAP } from './pane/store.js';
12
+ export { acquirePane, releasePane, paneStore } from './pane/registry.js';
13
+ export { checkDocument, describeRule, RULE_TYPE, CELL_RULE_TYPE } from './pane/rules.js';
14
+ export { BUILTIN_TYPE_NAMES, DEFAULT_ERROR_TYPES, SEVERITY, machineAuthored } from './pane/types.js';
15
+ // for plugins whose rules are written against a range's top-left (validation, condfmt): the one implementation
16
+ export { shiftFormula } from '@sheetpane/export';
17
+ // Stable error codes (W-40), re-exported for plugins that do not depend on @sheetpane/export.
18
+ export { CODES, ERRORS_DOC_URL, codeUrl, spMessage, spError, codeOf, detailOf } from '@sheetpane/export';
19
+ export { registerPlugin, registeredPluginIds, pluginsFromIds, checkPlugins, mergeDecorations, controlsFor } from './plugins/host.js';
20
+ export { HOOKS, SLOTS, SINGLE_PROVIDER, STYLE_PROPS } from './plugins/types.js';
21
+ export { sheetGeometry, charsToPx, ROW_H, HEAD_H, ROWHEAD_W } from './excel/geometry.js';
22
+ export { DARK_TOKENS, TOKENS, TOKENS_CSS } from './tokens.js';
23
+ define('sheetpane-excel', SheetpaneExcel);
24
+ define('sheetpane-errors', SheetpaneErrors);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,6EAA6E;AAC7E,+DAA+D;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,kGAAkG;AAClG,qDAAqD;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,IAAI,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAmD,MAAM,iBAAiB,CAAC;AAClN,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAwM,MAAM,iBAAiB,CAAC;AAC/R,OAAO,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