@sheetpane/grid 0.3.0 → 0.4.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.
- package/README.md +294 -13
- package/custom-elements.json +292 -27
- package/dist/check.d.ts +75 -0
- package/dist/check.d.ts.map +1 -0
- package/dist/check.js +151 -0
- package/dist/check.js.map +1 -0
- package/dist/errors/element.d.ts +90 -12
- package/dist/errors/element.d.ts.map +1 -1
- package/dist/errors/element.js +572 -50
- package/dist/errors/element.js.map +1 -1
- package/dist/excel/element.d.ts +168 -15
- package/dist/excel/element.d.ts.map +1 -1
- package/dist/excel/element.js +752 -90
- package/dist/excel/element.js.map +1 -1
- package/dist/excel/link.d.ts +40 -0
- package/dist/excel/link.d.ts.map +1 -0
- package/dist/excel/link.js +90 -0
- package/dist/excel/link.js.map +1 -0
- package/dist/excel/styles.d.ts.map +1 -1
- package/dist/excel/styles.js +37 -5
- package/dist/excel/styles.js.map +1 -1
- package/dist/frameworks/elements.d.ts +57 -17
- package/dist/frameworks/jsx.d.ts +15 -9
- package/dist/frameworks/solid.d.ts +51 -11
- package/dist/frameworks/svelte.d.ts +28 -16
- package/dist/frameworks/vue.d.ts +15 -9
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +3042 -246
- package/dist/llms.txt +92 -86
- package/dist/pane/protection.d.ts +61 -0
- package/dist/pane/protection.d.ts.map +1 -0
- package/dist/pane/protection.js +89 -0
- package/dist/pane/protection.js.map +1 -0
- package/dist/pane/rules.d.ts +1 -1
- package/dist/pane/rules.d.ts.map +1 -1
- package/dist/pane/store.d.ts +336 -15
- package/dist/pane/store.d.ts.map +1 -1
- package/dist/pane/store.js +891 -44
- package/dist/pane/store.js.map +1 -1
- package/dist/pane/structure.d.ts +58 -0
- package/dist/pane/structure.d.ts.map +1 -0
- package/dist/pane/structure.js +238 -0
- package/dist/pane/structure.js.map +1 -0
- package/dist/pane/types.d.ts +195 -6
- package/dist/pane/types.d.ts.map +1 -1
- package/dist/pane/types.js +57 -0
- package/dist/pane/types.js.map +1 -1
- package/dist/plugins/types.d.ts +34 -6
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/plugins/types.js.map +1 -1
- package/dist/shared/detail.d.ts +24 -0
- package/dist/shared/detail.d.ts.map +1 -0
- package/dist/shared/detail.js +75 -0
- package/dist/shared/detail.js.map +1 -0
- package/dist/shared/dom.d.ts +3 -0
- package/dist/shared/dom.d.ts.map +1 -1
- package/dist/shared/dom.js +3 -0
- package/dist/shared/dom.js.map +1 -1
- package/dist/static.d.ts +81 -0
- package/dist/static.d.ts.map +1 -0
- package/dist/static.js +352 -0
- package/dist/static.js.map +1 -0
- package/dist/style.css +3 -3
- package/dist/tokens.d.ts +1 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +2 -2
- package/dist/tokens.js.map +1 -1
- package/dist/vscode.css-custom-data.json +11 -1
- package/dist/vscode.html-custom-data.json +89 -2
- package/dist/web-types.json +204 -21
- package/package.json +12 -4
|
@@ -6,7 +6,7 @@ import type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneError
|
|
|
6
6
|
export type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
|
|
7
7
|
|
|
8
8
|
/** `<sheetpane-excel>` in Solid JSX: attributes (also as `attr:…`), properties (also as `prop:…`) and `on:sheetpane-…` listeners. Solid sets a custom element's props as properties, so write an attribute with no property (`pane`, `header-row`) as `attr:…`. */
|
|
9
|
-
export type SheetpaneExcelSolidProps = SheetpaneExcelAttributes & SheetpaneExcelProperties & {
|
|
9
|
+
export type SheetpaneExcelSolidProps = Omit<SheetpaneExcelAttributes, 'ref'> & Omit<SheetpaneExcelProperties, 'ref'> & {
|
|
10
10
|
/** The pane id shared with other elements; none gives the element its own store. */
|
|
11
11
|
'attr:pane'?: string | undefined;
|
|
12
12
|
/** A URL (read with a GET; nothing is sent), a data URL or base64. */
|
|
@@ -31,14 +31,28 @@ export type SheetpaneExcelSolidProps = SheetpaneExcelAttributes & SheetpaneExcel
|
|
|
31
31
|
'attr:rules-src'?: string | undefined;
|
|
32
32
|
/** `on` (the default) or `off`: no Flag issue anywhere. */
|
|
33
33
|
'attr:flagging'?: 'on' | 'off' | undefined;
|
|
34
|
+
/** The cell or range selected once a file is read, scrolled into view: `B4`, `Data!B4`, `'Q3 data'!B4:D8`; setting it later selects it then. One that names no cell is warned (SP-3019) and the sheet opens at A1. React, Vue and Solid keep `ref` for their own refs — set it with `setAttribute`. */
|
|
35
|
+
'attr:ref'?: string | undefined;
|
|
36
|
+
/** `none` (the default) or `hash`: the selection is kept in the URL fragment as `#sheetpane=<pane>:<Sheet>!<ref>`, read when a file is read and on back and forward, and *Copy link* joins the cell menu. The rest of the fragment is the host's and is kept as it was. */
|
|
37
|
+
'attr:link'?: 'none' | 'hash' | undefined;
|
|
38
|
+
/** `summary` (the default), `marks` or `off`: how `pass` and `skipped` results show, pane-wide (W-50). */
|
|
39
|
+
'attr:results'?: 'summary' | 'marks' | 'off' | undefined;
|
|
40
|
+
/** Space-separated review layers to show (W-51); none shows every layer. Shared by the pane's elements. */
|
|
41
|
+
'attr:layers'?: string | undefined;
|
|
42
|
+
/** `honour` (the default) or `ignore`: whether a protected sheet's locked cells refuse edits and a protected structure keeps its sheets, pane-wide (W-62). `ignore` is the host's decision; the file is unchanged. */
|
|
43
|
+
'attr:protection'?: 'honour' | 'ignore' | undefined;
|
|
34
44
|
/** The pane's store; assigning one replaces the `pane` lookup and applies this element's `mode` to it. */
|
|
35
45
|
'prop:workbook'?: SheetpaneExcel['workbook'] | undefined;
|
|
36
46
|
/** A copy of the pane's errors; assigning restores a saved review, like `setErrors()`. */
|
|
37
47
|
'prop:errors'?: SheetpaneExcel['errors'] | undefined;
|
|
38
48
|
/** The types offered in the Flag issue form; an empty list falls back to `DEFAULT_ERROR_TYPES`. */
|
|
39
49
|
'prop:errorTypes'?: SheetpaneExcel['errorTypes'] | undefined;
|
|
50
|
+
/** The host's extra detail for an error (W-68): called with a copy of the error when its card opens in the sheet, and drawn after the message in a `part="detail"` region. A string is text, never HTML; a Node is the host's own. Called again only when the error changes (its `meta` included) or this is replaced; a throw is logged as SP-3017. Set it on each element that should show it — `<sheetpane-errors>` has its own. */
|
|
51
|
+
'prop:renderDetail'?: SheetpaneExcel['renderDetail'] | undefined;
|
|
40
52
|
/** Loads a file, like `load()`; `null` does nothing. */
|
|
41
53
|
'prop:file'?: SheetpaneExcel['file'] | undefined;
|
|
54
|
+
/** The review layers shown (W-51) — the pane's, shared with `<sheetpane-errors>`: every layer until the `layers` attribute or the switch names some. Setting it sets the attribute; `null` or `[]` shows every layer. */
|
|
55
|
+
'prop:layers'?: SheetpaneExcel['layers'] | undefined;
|
|
42
56
|
/** The pane's mode, `view` or `edit`; setting it sets the `mode` attribute. */
|
|
43
57
|
'prop:mode'?: SheetpaneExcel['mode'] | undefined;
|
|
44
58
|
/** `light` (the default), `dark`, or `auto` (follows `prefers-color-scheme`) — colour only; the file's own colours never change (W-29). */
|
|
@@ -47,6 +61,10 @@ export type SheetpaneExcelSolidProps = SheetpaneExcelAttributes & SheetpaneExcel
|
|
|
47
61
|
'prop:rules'?: SheetpaneExcel['rules'] | undefined;
|
|
48
62
|
/** `flagging="off"`: no Flag issue anywhere, no composer, no callout card — the errors panel is the one place errors are read. */
|
|
49
63
|
'prop:flagging'?: SheetpaneExcel['flagging'] | undefined;
|
|
64
|
+
/** The pane's results level (W-50): `summary` (the default), `marks` or `off`; setting it sets the `results` attribute. */
|
|
65
|
+
'prop:results'?: SheetpaneExcel['results'] | undefined;
|
|
66
|
+
/** The pane's protection mode (W-62): `honour` (the default) keeps the file's protection; `ignore` is the host's decision. Setting it sets the `protection` attribute. */
|
|
67
|
+
'prop:protection'?: SheetpaneExcel['protection'] | undefined;
|
|
50
68
|
/** Rules by column title, as plain JSON (`required`, `type`, `min`, `max`, `minLength`, `maxLength`, `pattern`, `oneOf`, `unique`, `message`, `severity`, `onInvalid`). */
|
|
51
69
|
'prop:columns'?: SheetpaneExcel['columns'] | undefined;
|
|
52
70
|
/** `validate(ctx, signal)`, sync or async: `null`, or `{ severity, message, expected? }`. */
|
|
@@ -57,33 +75,41 @@ export type SheetpaneExcelSolidProps = SheetpaneExcelAttributes & SheetpaneExcel
|
|
|
57
75
|
'prop:sizes'?: SheetpaneExcel['sizes'] | undefined;
|
|
58
76
|
/** The `src` attribute; `null`, `undefined` or `''` removes it. */
|
|
59
77
|
'prop:src'?: SheetpaneExcel['src'] | undefined;
|
|
60
|
-
/** `
|
|
78
|
+
/** The `ref` attribute: the cell or range selected once a file is read (W-66); `null`, `undefined` or `''` removes it. */
|
|
79
|
+
'prop:ref'?: SheetpaneExcel['ref'] | undefined;
|
|
80
|
+
/** `none` (the default) or `hash`: the selection kept in the URL fragment, and *Copy link* in the cell menu (W-66). */
|
|
81
|
+
'prop:link'?: SheetpaneExcel['link'] | undefined;
|
|
82
|
+
/** `{ status: 'ready', name, kind, sheets, readMs, sha256 }` when a file is read (`sha256`: the file's SHA-256, W-65), or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
|
|
61
83
|
'on:sheetpane-load'?: ((event: SheetpaneExcelEventMap['sheetpane-load']) => void) | undefined;
|
|
62
|
-
/** `{ sheet, ref, kind, was, now }` for each change, undo and redo included
|
|
84
|
+
/** `{ sheet, ref, kind, was, now, op?, at?, count? }` for each change, undo and redo included; rows or columns inserted or deleted (W-52) are one event, `kind: 'structure'`, with `op`, `at` (0-based) and `count`. */
|
|
63
85
|
'on:sheetpane-change'?: ((event: SheetpaneExcelEventMap['sheetpane-change']) => void) | undefined;
|
|
64
|
-
/** `{ errors, plugins }` when the pane's errors change. */
|
|
86
|
+
/** `{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed. */
|
|
65
87
|
'on:sheetpane-errors'?: ((event: SheetpaneExcelEventMap['sheetpane-errors']) => void) | undefined;
|
|
88
|
+
/** `{ visible, layers }` when the visible review layers change (W-51). */
|
|
89
|
+
'on:sheetpane-layers'?: ((event: SheetpaneExcelEventMap['sheetpane-layers']) => void) | undefined;
|
|
66
90
|
/** `{ 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. */
|
|
67
91
|
'on:sheetpane-select'?: ((event: SheetpaneExcelEventMap['sheetpane-select']) => void) | undefined;
|
|
68
92
|
/** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
|
|
69
93
|
'on:sheetpane-visibility'?: ((event: SheetpaneExcelEventMap['sheetpane-visibility']) => void) | undefined;
|
|
70
94
|
/** `{ 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). */
|
|
71
95
|
'on:sheetpane-resize'?: ((event: SheetpaneExcelEventMap['sheetpane-resize']) => void) | undefined;
|
|
96
|
+
/** `{ sheet, ref, column }` when a mouse or pen pointer moves onto another cell (a merge's top-left), at most once per frame, or `null` when it leaves the cells; never for a finger (W-56). */
|
|
97
|
+
'on:sheetpane-hover'?: ((event: SheetpaneExcelEventMap['sheetpane-hover']) => void) | undefined;
|
|
72
98
|
/** `{ sheet }` when the selection moves to another sheet. */
|
|
73
99
|
'on:sheetpane-sheet'?: ((event: SheetpaneExcelEventMap['sheetpane-sheet']) => void) | undefined;
|
|
74
100
|
/** `{ mode }` when the pane switches between View and Edit. */
|
|
75
101
|
'on:sheetpane-mode'?: ((event: SheetpaneExcelEventMap['sheetpane-mode']) => void) | undefined;
|
|
76
102
|
/** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
|
|
77
103
|
'on:sheetpane-history'?: ((event: SheetpaneExcelEventMap['sheetpane-history']) => void) | undefined;
|
|
78
|
-
/** `{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only. */
|
|
104
|
+
/** `{ sheet, ref, column, value, richText?: true }` before a cell edit starts (`richText: true` on a rich-text cell, whose edit saves plain text — W-53); cancellable — the cell stays read-only. */
|
|
79
105
|
'on:sheetpane-editstart'?: ((event: SheetpaneExcelEventMap['sheetpane-editstart']) => void) | undefined;
|
|
80
106
|
/** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
|
|
81
107
|
'on:sheetpane-input'?: ((event: SheetpaneExcelEventMap['sheetpane-input']) => void) | undefined;
|
|
82
108
|
/** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
|
|
83
109
|
'on:sheetpane-beforechange'?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange']) => void) | undefined;
|
|
84
|
-
/** `{ sheet, ref }` when Esc restores a draft,
|
|
110
|
+
/** `{ sheet, ref }` when Esc restores a draft, `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it, or `{ sheet, ref, reason: 'locked', code: 'SP-3026', message }` when the cell is locked on a protected sheet (W-62). */
|
|
85
111
|
'on:sheetpane-editcancel'?: ((event: SheetpaneExcelEventMap['sheetpane-editcancel']) => void) | undefined;
|
|
86
|
-
/** `{ blob, kind, name, guarded, format, converted, original? }` on `export()` and Download; cancellable — the Download control then saves nothing. */
|
|
112
|
+
/** `{ blob, kind, name, guarded, format, converted, sha256, original? }` on `export()` and Download (`sha256`: the blob's SHA-256, W-65); cancellable — the Download control then saves nothing. */
|
|
87
113
|
'on:sheetpane-export'?: ((event: SheetpaneExcelEventMap['sheetpane-export']) => void) | undefined;
|
|
88
114
|
/** `{}` when the pop-up closes. */
|
|
89
115
|
'on:sheetpane-close'?: ((event: SheetpaneExcelEventMap['sheetpane-close']) => void) | undefined;
|
|
@@ -93,14 +119,18 @@ export type SheetpaneExcelSolidProps = SheetpaneExcelAttributes & SheetpaneExcel
|
|
|
93
119
|
export type SheetpaneErrorsSolidProps = SheetpaneErrorsAttributes & SheetpaneErrorsProperties & {
|
|
94
120
|
/** The pane id shared with the sheet; none gives the element its own store. */
|
|
95
121
|
'attr:pane'?: string | undefined;
|
|
96
|
-
/** Hides the form, Resolve, Delete, Undo and Redo (a sign-off screen). */
|
|
122
|
+
/** Hides the form, Resolve, Accept…, Delete, Undo and Redo (a sign-off screen). */
|
|
97
123
|
'attr:readonly'?: boolean | undefined;
|
|
98
|
-
/** Written into the errors this element's user adds. */
|
|
124
|
+
/** Written into the errors this element's user adds, and as who accepted one (W-69). */
|
|
99
125
|
'attr:author'?: string | undefined;
|
|
100
126
|
/** Space-separated registered plugin ids; fixed per pane. */
|
|
101
127
|
'attr:plugins'?: string | undefined;
|
|
102
128
|
/** `light` (the default), `dark` or `auto`. */
|
|
103
129
|
'attr:theme'?: 'light' | 'dark' | 'auto' | undefined;
|
|
130
|
+
/** `summary` (the default), `marks` or `off`: how `pass` and `skipped` results show, pane-wide (W-50). */
|
|
131
|
+
'attr:results'?: 'summary' | 'marks' | 'off' | undefined;
|
|
132
|
+
/** Space-separated review layers to show (W-51); none shows every layer. Shared by the pane's elements; with two or more layers the header shows a switch. */
|
|
133
|
+
'attr:layers'?: string | undefined;
|
|
104
134
|
/** The pane's store; assigning one replaces the `pane` lookup. */
|
|
105
135
|
'prop:workbook'?: SheetpaneErrors['workbook'] | undefined;
|
|
106
136
|
/** A copy of the pane's errors; assigning restores a saved review, like `setErrors()`. */
|
|
@@ -111,15 +141,25 @@ export type SheetpaneErrorsSolidProps = SheetpaneErrorsAttributes & SheetpaneErr
|
|
|
111
141
|
'prop:readOnly'?: SheetpaneErrors['readOnly'] | undefined;
|
|
112
142
|
/** `light` (the default), `dark` or `auto` — the same tokens as the sheet (W-29). */
|
|
113
143
|
'prop:theme'?: SheetpaneErrors['theme'] | undefined;
|
|
114
|
-
/**
|
|
144
|
+
/** The host's extra detail for an error (W-68): called with a copy of the error when its row is opened, and drawn after the message in a `part="detail"` region. A string is text, never HTML; a Node is the host's own. Called again only when the error changes (its `meta` included) or this is replaced; a throw is logged as SP-3017. Set it on each element that should show it — the sheet's error card has its own. */
|
|
145
|
+
'prop:renderDetail'?: SheetpaneErrors['renderDetail'] | undefined;
|
|
146
|
+
/** The pane's results level (W-50): `summary` (the default), `marks` or `off`; setting it sets the `results` attribute. */
|
|
147
|
+
'prop:results'?: SheetpaneErrors['results'] | undefined;
|
|
148
|
+
/** The review layers shown (W-51) — the pane's, shared with `<sheetpane-excel>`: every layer until the `layers` attribute or the switch names some. Setting it sets the attribute; `null` or `[]` shows every layer. */
|
|
149
|
+
'prop:layers'?: SheetpaneErrors['layers'] | undefined;
|
|
150
|
+
/** What the switch and the rows call each layer (W-51), e.g. `{ pdf: 'PDF check' }`; a layer not named here shows its name (`review` as *Review*). */
|
|
151
|
+
'prop:layerNames'?: SheetpaneErrors['layerNames'] | undefined;
|
|
152
|
+
/** `{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed. */
|
|
115
153
|
'on:sheetpane-errors'?: ((event: SheetpaneErrorsEventMap['sheetpane-errors']) => void) | undefined;
|
|
154
|
+
/** `{ visible, layers }` when the visible review layers change — the switch or the `layers` attribute (W-51). */
|
|
155
|
+
'on:sheetpane-layers'?: ((event: SheetpaneErrorsEventMap['sheetpane-layers']) => void) | undefined;
|
|
116
156
|
/** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
|
|
117
157
|
'on:sheetpane-change'?: ((event: SheetpaneErrorsEventMap['sheetpane-change']) => void) | undefined;
|
|
118
158
|
/** `{ sheet, ref }` when picking a row selects its cell. */
|
|
119
159
|
'on:sheetpane-select'?: ((event: SheetpaneErrorsEventMap['sheetpane-select']) => void) | undefined;
|
|
120
160
|
/** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
|
|
121
161
|
'on:sheetpane-history'?: ((event: SheetpaneErrorsEventMap['sheetpane-history']) => void) | undefined;
|
|
122
|
-
/** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up. */
|
|
162
|
+
/** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up — for a whole-sheet error too (its tab is opened); never for a workbook-level one (W-55); for a result group's Show ▸, its first entry (W-50). */
|
|
123
163
|
'on:sheetpane-reveal'?: ((event: SheetpaneErrorsEventMap['sheetpane-reveal']) => void) | undefined;
|
|
124
164
|
};
|
|
125
165
|
|
|
@@ -8,63 +8,71 @@ export type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneError
|
|
|
8
8
|
|
|
9
9
|
/** `<sheetpane-excel>` in Svelte: attributes, properties, `on:sheetpane-…` (Svelte 4) and `onsheetpane-…` (Svelte 5) listeners. */
|
|
10
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? }`. */
|
|
11
|
+
/** `{ status: 'ready', name, kind, sheets, readMs, sha256 }` when a file is read (`sha256`: the file's SHA-256, W-65), or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
|
|
12
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
|
|
13
|
+
/** `{ sheet, ref, kind, was, now, op?, at?, count? }` for each change, undo and redo included; rows or columns inserted or deleted (W-52) are one event, `kind: 'structure'`, with `op`, `at` (0-based) and `count`. */
|
|
14
14
|
'on:sheetpane-change'?: ((event: SheetpaneExcelEventMap['sheetpane-change'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
15
|
-
/** `{ errors, plugins }` when the pane's errors change. */
|
|
15
|
+
/** `{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed. */
|
|
16
16
|
'on:sheetpane-errors'?: ((event: SheetpaneExcelEventMap['sheetpane-errors'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
17
|
+
/** `{ visible, layers }` when the visible review layers change (W-51). */
|
|
18
|
+
'on:sheetpane-layers'?: ((event: SheetpaneExcelEventMap['sheetpane-layers'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
17
19
|
/** `{ 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
20
|
'on:sheetpane-select'?: ((event: SheetpaneExcelEventMap['sheetpane-select'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
19
21
|
/** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
|
|
20
22
|
'on:sheetpane-visibility'?: ((event: SheetpaneExcelEventMap['sheetpane-visibility'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
21
23
|
/** `{ 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
24
|
'on:sheetpane-resize'?: ((event: SheetpaneExcelEventMap['sheetpane-resize'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
25
|
+
/** `{ sheet, ref, column }` when a mouse or pen pointer moves onto another cell (a merge's top-left), at most once per frame, or `null` when it leaves the cells; never for a finger (W-56). */
|
|
26
|
+
'on:sheetpane-hover'?: ((event: SheetpaneExcelEventMap['sheetpane-hover'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
23
27
|
/** `{ sheet }` when the selection moves to another sheet. */
|
|
24
28
|
'on:sheetpane-sheet'?: ((event: SheetpaneExcelEventMap['sheetpane-sheet'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
25
29
|
/** `{ mode }` when the pane switches between View and Edit. */
|
|
26
30
|
'on:sheetpane-mode'?: ((event: SheetpaneExcelEventMap['sheetpane-mode'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
27
31
|
/** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
|
|
28
32
|
'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. */
|
|
33
|
+
/** `{ sheet, ref, column, value, richText?: true }` before a cell edit starts (`richText: true` on a rich-text cell, whose edit saves plain text — W-53); cancellable — the cell stays read-only. */
|
|
30
34
|
'on:sheetpane-editstart'?: ((event: SheetpaneExcelEventMap['sheetpane-editstart'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
31
35
|
/** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
|
|
32
36
|
'on:sheetpane-input'?: ((event: SheetpaneExcelEventMap['sheetpane-input'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
33
37
|
/** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
|
|
34
38
|
'on:sheetpane-beforechange'?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
35
|
-
/** `{ sheet, ref }` when Esc restores a draft,
|
|
39
|
+
/** `{ sheet, ref }` when Esc restores a draft, `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it, or `{ sheet, ref, reason: 'locked', code: 'SP-3026', message }` when the cell is locked on a protected sheet (W-62). */
|
|
36
40
|
'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. */
|
|
41
|
+
/** `{ blob, kind, name, guarded, format, converted, sha256, original? }` on `export()` and Download (`sha256`: the blob's SHA-256, W-65); cancellable — the Download control then saves nothing. */
|
|
38
42
|
'on:sheetpane-export'?: ((event: SheetpaneExcelEventMap['sheetpane-export'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
39
43
|
/** `{}` when the pop-up closes. */
|
|
40
44
|
'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? }`. */
|
|
45
|
+
/** `{ status: 'ready', name, kind, sheets, readMs, sha256 }` when a file is read (`sha256`: the file's SHA-256, W-65), or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
|
|
42
46
|
'onsheetpane-load'?: ((event: SheetpaneExcelEventMap['sheetpane-load'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
43
|
-
/** `{ sheet, ref, kind, was, now }` for each change, undo and redo included
|
|
47
|
+
/** `{ sheet, ref, kind, was, now, op?, at?, count? }` for each change, undo and redo included; rows or columns inserted or deleted (W-52) are one event, `kind: 'structure'`, with `op`, `at` (0-based) and `count`. */
|
|
44
48
|
'onsheetpane-change'?: ((event: SheetpaneExcelEventMap['sheetpane-change'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
45
|
-
/** `{ errors, plugins }` when the pane's errors change. */
|
|
49
|
+
/** `{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed. */
|
|
46
50
|
'onsheetpane-errors'?: ((event: SheetpaneExcelEventMap['sheetpane-errors'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
51
|
+
/** `{ visible, layers }` when the visible review layers change (W-51). */
|
|
52
|
+
'onsheetpane-layers'?: ((event: SheetpaneExcelEventMap['sheetpane-layers'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
47
53
|
/** `{ 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
54
|
'onsheetpane-select'?: ((event: SheetpaneExcelEventMap['sheetpane-select'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
49
55
|
/** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
|
|
50
56
|
'onsheetpane-visibility'?: ((event: SheetpaneExcelEventMap['sheetpane-visibility'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
51
57
|
/** `{ 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
58
|
'onsheetpane-resize'?: ((event: SheetpaneExcelEventMap['sheetpane-resize'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
59
|
+
/** `{ sheet, ref, column }` when a mouse or pen pointer moves onto another cell (a merge's top-left), at most once per frame, or `null` when it leaves the cells; never for a finger (W-56). */
|
|
60
|
+
'onsheetpane-hover'?: ((event: SheetpaneExcelEventMap['sheetpane-hover'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
53
61
|
/** `{ sheet }` when the selection moves to another sheet. */
|
|
54
62
|
'onsheetpane-sheet'?: ((event: SheetpaneExcelEventMap['sheetpane-sheet'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
55
63
|
/** `{ mode }` when the pane switches between View and Edit. */
|
|
56
64
|
'onsheetpane-mode'?: ((event: SheetpaneExcelEventMap['sheetpane-mode'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
57
65
|
/** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
|
|
58
66
|
'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. */
|
|
67
|
+
/** `{ sheet, ref, column, value, richText?: true }` before a cell edit starts (`richText: true` on a rich-text cell, whose edit saves plain text — W-53); cancellable — the cell stays read-only. */
|
|
60
68
|
'onsheetpane-editstart'?: ((event: SheetpaneExcelEventMap['sheetpane-editstart'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
61
69
|
/** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
|
|
62
70
|
'onsheetpane-input'?: ((event: SheetpaneExcelEventMap['sheetpane-input'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
63
71
|
/** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
|
|
64
72
|
'onsheetpane-beforechange'?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
65
|
-
/** `{ sheet, ref }` when Esc restores a draft,
|
|
73
|
+
/** `{ sheet, ref }` when Esc restores a draft, `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it, or `{ sheet, ref, reason: 'locked', code: 'SP-3026', message }` when the cell is locked on a protected sheet (W-62). */
|
|
66
74
|
'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. */
|
|
75
|
+
/** `{ blob, kind, name, guarded, format, converted, sha256, original? }` on `export()` and Download (`sha256`: the blob's SHA-256, W-65); cancellable — the Download control then saves nothing. */
|
|
68
76
|
'onsheetpane-export'?: ((event: SheetpaneExcelEventMap['sheetpane-export'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
69
77
|
/** `{}` when the pop-up closes. */
|
|
70
78
|
'onsheetpane-close'?: ((event: SheetpaneExcelEventMap['sheetpane-close'] & { currentTarget: EventTarget & SheetpaneExcel }) => void) | undefined;
|
|
@@ -72,25 +80,29 @@ export type SheetpaneExcelSvelteProps = SheetpaneExcelAttributes & SheetpaneExce
|
|
|
72
80
|
|
|
73
81
|
/** `<sheetpane-errors>` in Svelte: attributes, properties, `on:sheetpane-…` (Svelte 4) and `onsheetpane-…` (Svelte 5) listeners. */
|
|
74
82
|
export type SheetpaneErrorsSvelteProps = SheetpaneErrorsAttributes & SheetpaneErrorsProperties & {
|
|
75
|
-
/** `{ errors, plugins }` when the pane's errors change — the envelope to save a review. */
|
|
83
|
+
/** `{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed. */
|
|
76
84
|
'on:sheetpane-errors'?: ((event: SheetpaneErrorsEventMap['sheetpane-errors'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
85
|
+
/** `{ visible, layers }` when the visible review layers change — the switch or the `layers` attribute (W-51). */
|
|
86
|
+
'on:sheetpane-layers'?: ((event: SheetpaneErrorsEventMap['sheetpane-layers'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
77
87
|
/** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
|
|
78
88
|
'on:sheetpane-change'?: ((event: SheetpaneErrorsEventMap['sheetpane-change'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
79
89
|
/** `{ sheet, ref }` when picking a row selects its cell. */
|
|
80
90
|
'on:sheetpane-select'?: ((event: SheetpaneErrorsEventMap['sheetpane-select'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
81
91
|
/** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
|
|
82
92
|
'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. */
|
|
93
|
+
/** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up — for a whole-sheet error too (its tab is opened); never for a workbook-level one (W-55); for a result group's Show ▸, its first entry (W-50). */
|
|
84
94
|
'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. */
|
|
95
|
+
/** `{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed. */
|
|
86
96
|
'onsheetpane-errors'?: ((event: SheetpaneErrorsEventMap['sheetpane-errors'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
97
|
+
/** `{ visible, layers }` when the visible review layers change — the switch or the `layers` attribute (W-51). */
|
|
98
|
+
'onsheetpane-layers'?: ((event: SheetpaneErrorsEventMap['sheetpane-layers'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
87
99
|
/** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
|
|
88
100
|
'onsheetpane-change'?: ((event: SheetpaneErrorsEventMap['sheetpane-change'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
89
101
|
/** `{ sheet, ref }` when picking a row selects its cell. */
|
|
90
102
|
'onsheetpane-select'?: ((event: SheetpaneErrorsEventMap['sheetpane-select'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
91
103
|
/** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
|
|
92
104
|
'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. */
|
|
105
|
+
/** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up — for a whole-sheet error too (its tab is opened); never for a workbook-level one (W-55); for a result group's Show ▸, its first entry (W-50). */
|
|
94
106
|
'onsheetpane-reveal'?: ((event: SheetpaneErrorsEventMap['sheetpane-reveal'] & { currentTarget: EventTarget & SheetpaneErrors }) => void) | undefined;
|
|
95
107
|
};
|
|
96
108
|
|
package/dist/frameworks/vue.d.ts
CHANGED
|
@@ -8,34 +8,38 @@ import type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneError
|
|
|
8
8
|
export type { SheetpaneErrorsAttributes, SheetpaneErrorsEventMap, SheetpaneErrorsProperties, SheetpaneExcelAttributes, SheetpaneExcelEventMap, SheetpaneExcelProperties } from './elements.js';
|
|
9
9
|
|
|
10
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? }`. */
|
|
11
|
+
export type SheetpaneExcelVueProps = Omit<SheetpaneExcelAttributes, 'ref'> & Omit<SheetpaneExcelProperties, 'ref'> & {
|
|
12
|
+
/** `{ status: 'ready', name, kind, sheets, readMs, sha256 }` when a file is read (`sha256`: the file's SHA-256, W-65), or the refusal `{ status: 'error', code, spCode, message, name, detail? }`. */
|
|
13
13
|
onSheetpaneLoad?: ((event: SheetpaneExcelEventMap['sheetpane-load']) => void) | undefined;
|
|
14
|
-
/** `{ sheet, ref, kind, was, now }` for each change, undo and redo included
|
|
14
|
+
/** `{ sheet, ref, kind, was, now, op?, at?, count? }` for each change, undo and redo included; rows or columns inserted or deleted (W-52) are one event, `kind: 'structure'`, with `op`, `at` (0-based) and `count`. */
|
|
15
15
|
onSheetpaneChange?: ((event: SheetpaneExcelEventMap['sheetpane-change']) => void) | undefined;
|
|
16
|
-
/** `{ errors, plugins }` when the pane's errors change. */
|
|
16
|
+
/** `{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed. */
|
|
17
17
|
onSheetpaneErrors?: ((event: SheetpaneExcelEventMap['sheetpane-errors']) => void) | undefined;
|
|
18
|
+
/** `{ visible, layers }` when the visible review layers change (W-51). */
|
|
19
|
+
onSheetpaneLayers?: ((event: SheetpaneExcelEventMap['sheetpane-layers']) => void) | undefined;
|
|
18
20
|
/** `{ 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
21
|
onSheetpaneSelect?: ((event: SheetpaneExcelEventMap['sheetpane-select']) => void) | undefined;
|
|
20
22
|
/** `{ sheet, axis, indexes, hidden, via }` when rows, columns or a sheet are hidden, unhidden or shown for viewing (`via: 'reveal'`) (W-49). */
|
|
21
23
|
onSheetpaneVisibility?: ((event: SheetpaneExcelEventMap['sheetpane-visibility']) => void) | undefined;
|
|
22
24
|
/** `{ 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
25
|
onSheetpaneResize?: ((event: SheetpaneExcelEventMap['sheetpane-resize']) => void) | undefined;
|
|
26
|
+
/** `{ sheet, ref, column }` when a mouse or pen pointer moves onto another cell (a merge's top-left), at most once per frame, or `null` when it leaves the cells; never for a finger (W-56). */
|
|
27
|
+
onSheetpaneHover?: ((event: SheetpaneExcelEventMap['sheetpane-hover']) => void) | undefined;
|
|
24
28
|
/** `{ sheet }` when the selection moves to another sheet. */
|
|
25
29
|
onSheetpaneSheet?: ((event: SheetpaneExcelEventMap['sheetpane-sheet']) => void) | undefined;
|
|
26
30
|
/** `{ mode }` when the pane switches between View and Edit. */
|
|
27
31
|
onSheetpaneMode?: ((event: SheetpaneExcelEventMap['sheetpane-mode']) => void) | undefined;
|
|
28
32
|
/** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
|
|
29
33
|
onSheetpaneHistory?: ((event: SheetpaneExcelEventMap['sheetpane-history']) => void) | undefined;
|
|
30
|
-
/** `{ sheet, ref, column, value }` before a cell edit starts; cancellable — the cell stays read-only. */
|
|
34
|
+
/** `{ sheet, ref, column, value, richText?: true }` before a cell edit starts (`richText: true` on a rich-text cell, whose edit saves plain text — W-53); cancellable — the cell stays read-only. */
|
|
31
35
|
onSheetpaneEditstart?: ((event: SheetpaneExcelEventMap['sheetpane-editstart']) => void) | undefined;
|
|
32
36
|
/** `{ sheet, ref, column, draft, was }` as the cell-bar draft is typed. */
|
|
33
37
|
onSheetpaneInput?: ((event: SheetpaneExcelEventMap['sheetpane-input']) => void) | undefined;
|
|
34
38
|
/** `{ sheet, ref, column, was, now }` before a value is stored; cancellable — the value is refused. */
|
|
35
39
|
onSheetpaneBeforechange?: ((event: SheetpaneExcelEventMap['sheetpane-beforechange']) => void) | undefined;
|
|
36
|
-
/** `{ sheet, ref }` when Esc restores a draft,
|
|
40
|
+
/** `{ sheet, ref }` when Esc restores a draft, `{ sheet, ref, reason: 'blocked', code: 'SP-6003', message }` when a `block` rule refuses it, or `{ sheet, ref, reason: 'locked', code: 'SP-3026', message }` when the cell is locked on a protected sheet (W-62). */
|
|
37
41
|
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. */
|
|
42
|
+
/** `{ blob, kind, name, guarded, format, converted, sha256, original? }` on `export()` and Download (`sha256`: the blob's SHA-256, W-65); cancellable — the Download control then saves nothing. */
|
|
39
43
|
onSheetpaneExport?: ((event: SheetpaneExcelEventMap['sheetpane-export']) => void) | undefined;
|
|
40
44
|
/** `{}` when the pop-up closes. */
|
|
41
45
|
onSheetpaneClose?: ((event: SheetpaneExcelEventMap['sheetpane-close']) => void) | undefined;
|
|
@@ -43,15 +47,17 @@ export type SheetpaneExcelVueProps = SheetpaneExcelAttributes & SheetpaneExcelPr
|
|
|
43
47
|
|
|
44
48
|
/** `<sheetpane-errors>` in a Vue 3 template: attributes, properties and `@sheetpane-…` listeners (`onSheetpane…` props). */
|
|
45
49
|
export type SheetpaneErrorsVueProps = SheetpaneErrorsAttributes & SheetpaneErrorsProperties & {
|
|
46
|
-
/** `{ errors, plugins }` when the pane's errors change — the envelope to save a review. */
|
|
50
|
+
/** `{ v, errors, plugins, layers, changed }` when the pane's errors change — the envelope to save a review (`v: 2`, W-51); `changed` names the layers whose errors changed. */
|
|
47
51
|
onSheetpaneErrors?: ((event: SheetpaneErrorsEventMap['sheetpane-errors']) => void) | undefined;
|
|
52
|
+
/** `{ visible, layers }` when the visible review layers change — the switch or the `layers` attribute (W-51). */
|
|
53
|
+
onSheetpaneLayers?: ((event: SheetpaneErrorsEventMap['sheetpane-layers']) => void) | undefined;
|
|
48
54
|
/** `{ sheet, ref, kind, was, now }` when a cell changes from here ("Also change the cell", undo, redo). */
|
|
49
55
|
onSheetpaneChange?: ((event: SheetpaneErrorsEventMap['sheetpane-change']) => void) | undefined;
|
|
50
56
|
/** `{ sheet, ref }` when picking a row selects its cell. */
|
|
51
57
|
onSheetpaneSelect?: ((event: SheetpaneErrorsEventMap['sheetpane-select']) => void) | undefined;
|
|
52
58
|
/** `{ reason, canUndo, canRedo }` on undo, redo, or the stack cleared by `setErrors()`. */
|
|
53
59
|
onSheetpaneHistory?: ((event: SheetpaneErrorsEventMap['sheetpane-history']) => void) | undefined;
|
|
54
|
-
/** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up. */
|
|
60
|
+
/** `{ error }` on Show in sheet, so the host can switch tab or open the pop-up — for a whole-sheet error too (its tab is opened); never for a workbook-level one (W-55); for a result group's Show ▸, its first entry (W-50). */
|
|
55
61
|
onSheetpaneReveal?: ((event: SheetpaneErrorsEventMap['sheetpane-reveal']) => void) | undefined;
|
|
56
62
|
};
|
|
57
63
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2,16 +2,21 @@ import { SheetpaneExcel } from './excel/element.js';
|
|
|
2
2
|
import { SheetpaneErrors } from './errors/element.js';
|
|
3
3
|
export { SheetpaneExcel } from './excel/element.js';
|
|
4
4
|
export { SheetpaneErrors } from './errors/element.js';
|
|
5
|
-
export {
|
|
5
|
+
export type { HighlightOptions, HighlightRange, HighlightTone } from './excel/element.js';
|
|
6
|
+
export { WorkbookStore, createWorkbook, parseInput, formulaRefs, key as cellKey, splitKey, kindRef, baseRef, editRef, SLOTTED_KINDS, HISTORY_CAP, type StoreOptions, type StoreEvent, type Origin, type ResultCounts } from './pane/store.js';
|
|
6
7
|
export { acquirePane, releasePane, paneStore } from './pane/registry.js';
|
|
8
|
+
export { LOCKED_MESSAGE, PROTECTION_MODES, STRUCTURE_LOCKED_MESSAGE, formulaHiddenIn, lockedIn, protectionModeOf, sheetProtectionIn, structureLockedIn, structureProtectionIn } from './pane/protection.js';
|
|
7
9
|
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';
|
|
10
|
+
export { BUILTIN_TYPE_NAMES, DEFAULT_ERROR_TYPES, ERROR_META_MAX, SEVERITY, SEVERITY_ORDER, RESULTS_LEVELS, DEFAULT_LAYER, errorScope, isResult, isLayerName, layerOf, resultsLevelOf, machineAuthored } from './pane/types.js';
|
|
9
11
|
export { shiftFormula } from '@sheetpane/export';
|
|
12
|
+
export { resolveStructuredRef, type StructuredRef, type TableShape } from '@sheetpane/export';
|
|
13
|
+
export { restructureFormula, shiftRefText, shiftSqref, shiftIndex, inverseOp, type StructureOp, type StructureOpName } from '@sheetpane/export';
|
|
14
|
+
export type { StructureRefusal } from './pane/structure.js';
|
|
10
15
|
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';
|
|
16
|
+
export type { SheetpaneError, Severity, ProblemSeverity, ResultSeverity, ResultsLevel, Mode, ChangeKind, ChangeEntry, Edit, EditEffects, DerivedCell, Selection, Composing, LoadState, Source, Snapshot, ErrorType, ErrorScope, ErrorMeta, ErrorStatus, RenderDetail, ErrorsEnvelope, ProtectionMode } from './pane/types.js';
|
|
12
17
|
export { registerPlugin, registeredPluginIds, pluginsFromIds, checkPlugins, mergeDecorations, controlsFor, type PluginFactory } from './plugins/host.js';
|
|
13
18
|
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';
|
|
19
|
+
export type { Plugin, HookName, SlotName, ControlDescriptor, CellContext, PluginContext, DeriveInput, DerivedChange, ErrorDraft, OverlayItem, Geometry, StyleSubset, StyleProp, RunStyle } from './plugins/types.js';
|
|
15
20
|
export { sheetGeometry, charsToPx, ROW_H, HEAD_H, ROWHEAD_W } from './excel/geometry.js';
|
|
16
21
|
export { DARK_TOKENS, TOKENS, TOKENS_CSS, type Theme, type TokenName } from './tokens.js';
|
|
17
22
|
declare global {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.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AAW,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9T,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACzJ,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChF,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACrN,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
CHANGED
|
@@ -8,12 +8,18 @@ import { define } from './shared/dom.js';
|
|
|
8
8
|
// tooling at the declarations and their TSDoc (W-36)
|
|
9
9
|
export { SheetpaneExcel } from './excel/element.js';
|
|
10
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';
|
|
11
|
+
export { WorkbookStore, createWorkbook, parseInput, formulaRefs, key as cellKey, splitKey, kindRef, baseRef, editRef, SLOTTED_KINDS, HISTORY_CAP } from './pane/store.js';
|
|
12
12
|
export { acquirePane, releasePane, paneStore } from './pane/registry.js';
|
|
13
|
+
// W-62: what the file's protection locks, asked from a snapshot (a plugin control's `disabled`) or the store
|
|
14
|
+
export { LOCKED_MESSAGE, PROTECTION_MODES, STRUCTURE_LOCKED_MESSAGE, formulaHiddenIn, lockedIn, protectionModeOf, sheetProtectionIn, structureLockedIn, structureProtectionIn } from './pane/protection.js';
|
|
13
15
|
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';
|
|
16
|
+
export { BUILTIN_TYPE_NAMES, DEFAULT_ERROR_TYPES, ERROR_META_MAX, SEVERITY, SEVERITY_ORDER, RESULTS_LEVELS, DEFAULT_LAYER, errorScope, isResult, isLayerName, layerOf, resultsLevelOf, machineAuthored } from './pane/types.js';
|
|
15
17
|
// for plugins whose rules are written against a range's top-left (validation, condfmt): the one implementation
|
|
16
18
|
export { shiftFormula } from '@sheetpane/export';
|
|
19
|
+
// W-61: a table's structured reference (`Units[Name]`) as cells — for plugins that read list sources.
|
|
20
|
+
export { resolveStructuredRef } from '@sheetpane/export';
|
|
21
|
+
// inserting and deleting rows and columns (W-52): the shift every plugin's own references follow
|
|
22
|
+
export { restructureFormula, shiftRefText, shiftSqref, shiftIndex, inverseOp } from '@sheetpane/export';
|
|
17
23
|
// Stable error codes (W-40), re-exported for plugins that do not depend on @sheetpane/export.
|
|
18
24
|
export { CODES, ERRORS_DOC_URL, codeUrl, spMessage, spError, codeOf, detailOf } from '@sheetpane/export';
|
|
19
25
|
export { registerPlugin, registeredPluginIds, pluginsFromIds, checkPlugins, mergeDecorations, controlsFor } from './plugins/host.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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;
|
|
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;AAEtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,IAAI,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAsE,MAAM,iBAAiB,CAAC;AAC9O,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzE,6GAA6G;AAC7G,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,eAAe,EAAE,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EA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