@xlsx-editor.dev/vue 0.0.0-stage → 0.1.0-beta.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.
@@ -0,0 +1,1007 @@
1
+ /**
2
+ * `@xlsx-editor.dev/vue`: the Vue 3 adapter for XLSX Editor, the twin of
3
+ * `@xlsx-editor.dev/react`.
4
+ *
5
+ * Provider-first, after PPTX Editor's and DOCX Editor's Vue adapters: `XlsxEditorRoot` owns the
6
+ * editor instance, `XlsxEditorViewport` scopes the styles, and `XlsxEditorContent` attaches the
7
+ * grid surface. Every piece of chrome reads the editor through composables;
8
+ * `XlsxEditorToolbar` renders the chrome registry. `XlsxEditor` composes them all.
9
+ * `scripts/parity/parity.contract.json` lists which React members Vue pairs.
10
+ *
11
+ * @packageDocumentation
12
+ * @public
13
+ */
14
+ import * as _xlsx_editor_dev_i18n from '@xlsx-editor.dev/i18n';
15
+ import { Translations, TFunction } from '@xlsx-editor.dev/i18n';
16
+ export { Translations } from '@xlsx-editor.dev/i18n';
17
+ import * as vue from 'vue';
18
+ import { PropType, StyleValue, ExtractPublicPropTypes, VNode, AllowedComponentProps, ComputedRef, ShallowRef, InjectionKey, MaybeRefOrGetter } from 'vue';
19
+ import { FontSource, NumberLocale, EditorMode, ColorMode, XlsxEditorInstance, EditorSnapshot, EditorFailure, SavedWorkbook, ChromeSlotId, ChromeGroupId, ResolvedColorMode, EditorEvents } from '@xlsx-editor.dev/core/editor';
20
+ export { ActiveCellFormat, CLIPBOARD_TYPE, CUSTOM_NUMBER_FORMAT_PREFIX, CellEditMode, ChromeDisabledReason, ChromeGroup, ChromeGroupId, ChromeHint, ChromeSlotId, ClipboardContent, ColorMode, CopyResult, DecimalSteps, DocumentChange, EditMove, EditRefusal, EditRefusalCode, EditResult, EditTextOptions, EditorEvents, EditorFailure, EditorMode, EditorSheet, EditorSnapshot, FieldKeys, FontSource, GridPoint, GridRange, GridSelection, MAX_COLUMN_WIDTH, MAX_CONTENT_FIELD_CHARS, MAX_GO_TO_LENGTH, MAX_LISTED_NUMBER_FORMATS, MAX_RESIZE_NEW_ROWS, MAX_ROW_HEIGHT, MergeCommand, MergeCommandState, MergeOptions, NUMBER_FORMAT_CODE_PROBLEM_KEYS, NUMBER_FORMAT_SAMPLE, NumberFormatChoice, NumberFormatChoiceValue, NumberFormatCodeProblem, NumberFormatDialogApplyStep, NumberFormatDialogStart, NumberFormatListEntry, NumberFormatListView, NumberFormatPreview, NumberLocale, PartPastLimit, PasteData, ResolvedColorMode, SavedWorkbook, SheetCommand, SheetCommandInput, SheetCommandState, SheetProtection, ToolbarCommandState, ToolbarHintKey, WorkbookKind, WorkbookProtection, XlsxEditorInstance, composesKey, contentFieldText, editMoveOf, fieldHistoryKey, mergeCommandState, numberFormatChoiceCode, numberFormatChoices, numberFormatCodeProblem, numberFormatDialogApplyStep, numberFormatDialogCurrent, numberFormatDialogStart, numberFormatListView, numberFormatValue, previewNumberFormat, refusalText, refusesEditText, refusesReference, sheetCommandState, trapTabWithin, workbookNumberFormatCodes } from '@xlsx-editor.dev/core/editor';
21
+ import * as vue_jsx_runtime from 'vue/jsx-runtime';
22
+
23
+ /** The faces that measure and paint text: bytes, or a function that loads them once. @public */
24
+ type XlsxEditorFonts = readonly FontSource[] | (() => Promise<readonly FontSource[]>);
25
+ declare const xlsxEditorRootProps: {
26
+ /**
27
+ * The bytes of a workbook or a template package. A new array or buffer opens the new
28
+ * workbook; a change to `undefined` closes the open workbook (`close`).
29
+ */
30
+ readonly document: {
31
+ readonly type: PropType<Uint8Array | ArrayBuffer>;
32
+ readonly default: undefined;
33
+ };
34
+ /**
35
+ * The faces that measure and paint text. Omitted, the packaged substitute faces load. A new
36
+ * value replaces the faces in place (`setFonts`); a list is compared by its faces.
37
+ */
38
+ readonly fonts: {
39
+ readonly type: PropType<XlsxEditorFonts>;
40
+ readonly default: undefined;
41
+ };
42
+ /**
43
+ * The number locale of the shown values: separators and built-in format codes. A value that
44
+ * differs (`sameNumberLocale`) applies in place (`setNumberLocale`).
45
+ */
46
+ readonly numberLocale: {
47
+ readonly type: PropType<NumberLocale>;
48
+ readonly default: undefined;
49
+ };
50
+ /** `'edit'` (default) or `'view'`. A change applies without a reload. */
51
+ readonly mode: {
52
+ readonly type: PropType<EditorMode>;
53
+ readonly default: undefined;
54
+ };
55
+ /** UI strings; English when omitted. A `null` entry falls back to English. */
56
+ readonly locale: {
57
+ readonly type: PropType<Translations>;
58
+ readonly default: undefined;
59
+ };
60
+ /** The chrome color theme: `'light'` (default), `'dark'`, or `'system'`. */
61
+ readonly colorMode: {
62
+ readonly type: PropType<ColorMode>;
63
+ readonly default: undefined;
64
+ };
65
+ };
66
+ /** Props of `XlsxEditorRoot`, the twin of React's `XlsxEditorRootProps`. @public */
67
+ type XlsxEditorRootProps = ExtractPublicPropTypes<typeof xlsxEditorRootProps>;
68
+ /**
69
+ * The imperative handle of `XlsxEditor` and `XlsxEditorRoot`, the twin of React's
70
+ * `XlsxEditorRef`: a template ref on either component reads these members (`expose`). Every
71
+ * member is safe to call before the editor mounts. The editing commands are on the instance
72
+ * that `getEditor` returns.
73
+ *
74
+ * @public
75
+ */
76
+ interface XlsxEditorRef {
77
+ /**
78
+ * Open the bytes of a workbook or a template package. Resolves with the snapshot after the
79
+ * open, or `null` before mount. An open cell edit is dropped without a commit, as
80
+ * `XlsxEditorInstance.load` does.
81
+ */
82
+ load(bytes: Uint8Array | ArrayBuffer): Promise<EditorSnapshot | null>;
83
+ /**
84
+ * The workbook as bytes of the opened package's kind (`snapshot().workbookKind`: a workbook or a
85
+ * template), with every edit, or `null` when none is open. An open cell edit is committed first;
86
+ * when the editor cannot store it, `save` returns `null` and shows the reason.
87
+ */
88
+ save(): Uint8Array<ArrayBuffer> | null;
89
+ /**
90
+ * `save` in short tasks, so the page stays responsive while a large workbook saves. An edit
91
+ * made while the save runs belongs to the next save. Resolves to `null` when it is refused.
92
+ */
93
+ saveInTasks(): Promise<SavedWorkbook | null>;
94
+ /** The editor instance, with every editing command, or `null` before it mounts. */
95
+ getEditor(): XlsxEditorInstance | null;
96
+ /** Give the keyboard to the grid. */
97
+ focus(): void;
98
+ /** The editor's state now. Before it mounts, an empty snapshot with the `mode` prop. */
99
+ snapshot(): EditorSnapshot;
100
+ }
101
+ /**
102
+ * Owns the editor instance, as React's `XlsxEditor.Root`. Only a new `document` reloads the
103
+ * workbook; the other props apply in place. Emits `ready` once per editor, `change` after every
104
+ * change of the editor state, and `fontError` for each font failure. @public
105
+ */
106
+ declare const XlsxEditorRoot: vue.DefineComponent<vue.ExtractPropTypes<{
107
+ /**
108
+ * The bytes of a workbook or a template package. A new array or buffer opens the new
109
+ * workbook; a change to `undefined` closes the open workbook (`close`).
110
+ */
111
+ readonly document: {
112
+ readonly type: PropType<Uint8Array | ArrayBuffer>;
113
+ readonly default: undefined;
114
+ };
115
+ /**
116
+ * The faces that measure and paint text. Omitted, the packaged substitute faces load. A new
117
+ * value replaces the faces in place (`setFonts`); a list is compared by its faces.
118
+ */
119
+ readonly fonts: {
120
+ readonly type: PropType<XlsxEditorFonts>;
121
+ readonly default: undefined;
122
+ };
123
+ /**
124
+ * The number locale of the shown values: separators and built-in format codes. A value that
125
+ * differs (`sameNumberLocale`) applies in place (`setNumberLocale`).
126
+ */
127
+ readonly numberLocale: {
128
+ readonly type: PropType<NumberLocale>;
129
+ readonly default: undefined;
130
+ };
131
+ /** `'edit'` (default) or `'view'`. A change applies without a reload. */
132
+ readonly mode: {
133
+ readonly type: PropType<EditorMode>;
134
+ readonly default: undefined;
135
+ };
136
+ /** UI strings; English when omitted. A `null` entry falls back to English. */
137
+ readonly locale: {
138
+ readonly type: PropType<Translations>;
139
+ readonly default: undefined;
140
+ };
141
+ /** The chrome color theme: `'light'` (default), `'dark'`, or `'system'`. */
142
+ readonly colorMode: {
143
+ readonly type: PropType<ColorMode>;
144
+ readonly default: undefined;
145
+ };
146
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
147
+ [key: string]: any;
148
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
149
+ /** Once per editor, after the first open of `document` settles. */
150
+ ready: (_editor: XlsxEditorInstance) => boolean;
151
+ /**
152
+ * After every change of the editor state, with the new snapshot: a content change and a view
153
+ * change alike. The `change` event of `useEditorEvent` fires for content changes only.
154
+ */
155
+ change: (_snapshot: EditorSnapshot) => boolean;
156
+ /** When the fonts that measure and paint text do not load. */
157
+ fontError: (_failure: EditorFailure) => boolean;
158
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
159
+ /**
160
+ * The bytes of a workbook or a template package. A new array or buffer opens the new
161
+ * workbook; a change to `undefined` closes the open workbook (`close`).
162
+ */
163
+ readonly document: {
164
+ readonly type: PropType<Uint8Array | ArrayBuffer>;
165
+ readonly default: undefined;
166
+ };
167
+ /**
168
+ * The faces that measure and paint text. Omitted, the packaged substitute faces load. A new
169
+ * value replaces the faces in place (`setFonts`); a list is compared by its faces.
170
+ */
171
+ readonly fonts: {
172
+ readonly type: PropType<XlsxEditorFonts>;
173
+ readonly default: undefined;
174
+ };
175
+ /**
176
+ * The number locale of the shown values: separators and built-in format codes. A value that
177
+ * differs (`sameNumberLocale`) applies in place (`setNumberLocale`).
178
+ */
179
+ readonly numberLocale: {
180
+ readonly type: PropType<NumberLocale>;
181
+ readonly default: undefined;
182
+ };
183
+ /** `'edit'` (default) or `'view'`. A change applies without a reload. */
184
+ readonly mode: {
185
+ readonly type: PropType<EditorMode>;
186
+ readonly default: undefined;
187
+ };
188
+ /** UI strings; English when omitted. A `null` entry falls back to English. */
189
+ readonly locale: {
190
+ readonly type: PropType<Translations>;
191
+ readonly default: undefined;
192
+ };
193
+ /** The chrome color theme: `'light'` (default), `'dark'`, or `'system'`. */
194
+ readonly colorMode: {
195
+ readonly type: PropType<ColorMode>;
196
+ readonly default: undefined;
197
+ };
198
+ }>> & Readonly<{
199
+ onChange?: ((_snapshot: EditorSnapshot) => any) | undefined;
200
+ onFontError?: ((_failure: EditorFailure) => any) | undefined;
201
+ onReady?: ((_editor: XlsxEditorInstance) => any) | undefined;
202
+ }>, {
203
+ readonly document: ArrayBuffer | Uint8Array<ArrayBufferLike>;
204
+ readonly fonts: XlsxEditorFonts;
205
+ readonly numberLocale: NumberLocale;
206
+ readonly mode: EditorMode;
207
+ readonly locale: _xlsx_editor_dev_i18n.PartialLocaleStrings;
208
+ readonly colorMode: ColorMode;
209
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
210
+ declare const xlsxEditorViewportProps: {
211
+ /**
212
+ * Appended after the `xlsx-editor` and `xlsx-editor-viewport` classes. A host `class` also
213
+ * works.
214
+ */
215
+ readonly className: {
216
+ readonly type: StringConstructor;
217
+ readonly default: undefined;
218
+ };
219
+ /**
220
+ * The name of the editor's landmark region. Default: "Workbook editor". `false` renders no
221
+ * region, for a host whose own landmarks are inside.
222
+ */
223
+ readonly label: {
224
+ readonly type: PropType<string | false>;
225
+ readonly default: undefined;
226
+ };
227
+ /** Inline style, for example the editor's height. A host `style` also works. */
228
+ readonly style: {
229
+ readonly type: PropType<StyleValue>;
230
+ readonly default: undefined;
231
+ };
232
+ };
233
+ /** The props of `XlsxEditorViewport`, the twin of React's `XlsxEditorViewportProps`. @public */
234
+ type XlsxEditorViewportProps = ExtractPublicPropTypes<typeof xlsxEditorViewportProps>;
235
+ /**
236
+ * The editor's styling scope and landmark region: carries the `.xlsx-editor` class, and `dark`
237
+ * with it when the root's `colorMode` resolves to dark. It also carries `xlsx-editor-viewport`,
238
+ * which keeps its width from following its content. F6 and Shift+F6 inside it move the
239
+ * keyboard among the toolbar, the formula bar, the grid, and the footer. @public
240
+ */
241
+ declare const XlsxEditorViewport: vue.DefineComponent<vue.ExtractPropTypes<{
242
+ /**
243
+ * Appended after the `xlsx-editor` and `xlsx-editor-viewport` classes. A host `class` also
244
+ * works.
245
+ */
246
+ readonly className: {
247
+ readonly type: StringConstructor;
248
+ readonly default: undefined;
249
+ };
250
+ /**
251
+ * The name of the editor's landmark region. Default: "Workbook editor". `false` renders no
252
+ * region, for a host whose own landmarks are inside.
253
+ */
254
+ readonly label: {
255
+ readonly type: PropType<string | false>;
256
+ readonly default: undefined;
257
+ };
258
+ /** Inline style, for example the editor's height. A host `style` also works. */
259
+ readonly style: {
260
+ readonly type: PropType<StyleValue>;
261
+ readonly default: undefined;
262
+ };
263
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
264
+ [key: string]: any;
265
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
266
+ /**
267
+ * Appended after the `xlsx-editor` and `xlsx-editor-viewport` classes. A host `class` also
268
+ * works.
269
+ */
270
+ readonly className: {
271
+ readonly type: StringConstructor;
272
+ readonly default: undefined;
273
+ };
274
+ /**
275
+ * The name of the editor's landmark region. Default: "Workbook editor". `false` renders no
276
+ * region, for a host whose own landmarks are inside.
277
+ */
278
+ readonly label: {
279
+ readonly type: PropType<string | false>;
280
+ readonly default: undefined;
281
+ };
282
+ /** Inline style, for example the editor's height. A host `style` also works. */
283
+ readonly style: {
284
+ readonly type: PropType<StyleValue>;
285
+ readonly default: undefined;
286
+ };
287
+ }>> & Readonly<{}>, {
288
+ readonly className: string;
289
+ readonly label: string | false;
290
+ readonly style: StyleValue;
291
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
292
+ declare const xlsxEditorContentProps: {
293
+ /** Appended after the `xlsx-canvas` class. A host `class` also works. */
294
+ readonly className: {
295
+ readonly type: StringConstructor;
296
+ readonly default: undefined;
297
+ };
298
+ };
299
+ /** The props of `XlsxEditorContent`, the twin of React's `XlsxEditorContentProps`. @public */
300
+ type XlsxEditorContentProps = ExtractPublicPropTypes<typeof xlsxEditorContentProps>;
301
+ /** The grid: attaches the editor's surface to its element. @public */
302
+ declare const XlsxEditorContent: vue.DefineComponent<vue.ExtractPropTypes<{
303
+ /** Appended after the `xlsx-canvas` class. A host `class` also works. */
304
+ readonly className: {
305
+ readonly type: StringConstructor;
306
+ readonly default: undefined;
307
+ };
308
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
309
+ [key: string]: any;
310
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
311
+ /** Appended after the `xlsx-canvas` class. A host `class` also works. */
312
+ readonly className: {
313
+ readonly type: StringConstructor;
314
+ readonly default: undefined;
315
+ };
316
+ }>> & Readonly<{}>, {
317
+ readonly className: string;
318
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
319
+
320
+ declare const xlsxEditorProps: {
321
+ /** The bytes of a workbook or a template package, as on `XlsxEditorRoot`. */
322
+ readonly document: {
323
+ readonly type: PropType<Uint8Array | ArrayBuffer>;
324
+ readonly default: undefined;
325
+ };
326
+ /** The faces that measure and paint text, as on `XlsxEditorRoot`. */
327
+ readonly fonts: {
328
+ readonly type: PropType<XlsxEditorFonts>;
329
+ readonly default: undefined;
330
+ };
331
+ /** The number locale of the shown values, as on `XlsxEditorRoot`. */
332
+ readonly numberLocale: {
333
+ readonly type: PropType<NumberLocale>;
334
+ readonly default: undefined;
335
+ };
336
+ /** `'edit'` (default) or `'view'`, as on `XlsxEditorRoot`. */
337
+ readonly mode: {
338
+ readonly type: PropType<EditorMode>;
339
+ readonly default: undefined;
340
+ };
341
+ /** UI strings, as on `XlsxEditorRoot`. English when omitted. */
342
+ readonly locale: {
343
+ readonly type: PropType<Translations>;
344
+ readonly default: undefined;
345
+ };
346
+ /** The chrome color theme, as on `XlsxEditorRoot`. */
347
+ readonly colorMode: {
348
+ readonly type: PropType<ColorMode>;
349
+ readonly default: undefined;
350
+ };
351
+ /**
352
+ * Whether your page opens another workbook now, while the editor still shows the old one. While
353
+ * it is true, the save control is disabled and Control or Command and S starts no save. See the
354
+ * `opening` prop of `XlsxEditorToolbar`.
355
+ */
356
+ readonly opening: {
357
+ readonly type: BooleanConstructor;
358
+ readonly default: undefined;
359
+ };
360
+ };
361
+ /**
362
+ * Props of the `XlsxEditor` component, the twin of React's `XlsxEditorProps`. Derived from the
363
+ * component's runtime props, so the two cannot drift. The host's `class` and `style` land on the
364
+ * viewport. @public
365
+ */
366
+ type XlsxEditorProps = ExtractPublicPropTypes<typeof xlsxEditorProps>;
367
+ /**
368
+ * A workbook editor with its chrome, the twin of React's `XlsxEditor`. A template ref reads an
369
+ * `XlsxEditorRef`. Emits `ready`, `change`, and `fontError` as `XlsxEditorRoot` does; `save`
370
+ * with the bytes when the toolbar's save control or Control or Command and S is pressed; and
371
+ * `saveStart` with the promise of the result when such a press starts a delivery to `save`.
372
+ * Without a `save` listener, the save control is disabled with the engine's reason. @public
373
+ */
374
+ declare const XlsxEditor$1: vue.DefineComponent<vue.ExtractPropTypes<{
375
+ /** The bytes of a workbook or a template package, as on `XlsxEditorRoot`. */
376
+ readonly document: {
377
+ readonly type: PropType<Uint8Array | ArrayBuffer>;
378
+ readonly default: undefined;
379
+ };
380
+ /** The faces that measure and paint text, as on `XlsxEditorRoot`. */
381
+ readonly fonts: {
382
+ readonly type: PropType<XlsxEditorFonts>;
383
+ readonly default: undefined;
384
+ };
385
+ /** The number locale of the shown values, as on `XlsxEditorRoot`. */
386
+ readonly numberLocale: {
387
+ readonly type: PropType<NumberLocale>;
388
+ readonly default: undefined;
389
+ };
390
+ /** `'edit'` (default) or `'view'`, as on `XlsxEditorRoot`. */
391
+ readonly mode: {
392
+ readonly type: PropType<EditorMode>;
393
+ readonly default: undefined;
394
+ };
395
+ /** UI strings, as on `XlsxEditorRoot`. English when omitted. */
396
+ readonly locale: {
397
+ readonly type: PropType<Translations>;
398
+ readonly default: undefined;
399
+ };
400
+ /** The chrome color theme, as on `XlsxEditorRoot`. */
401
+ readonly colorMode: {
402
+ readonly type: PropType<ColorMode>;
403
+ readonly default: undefined;
404
+ };
405
+ /**
406
+ * Whether your page opens another workbook now, while the editor still shows the old one. While
407
+ * it is true, the save control is disabled and Control or Command and S starts no save. See the
408
+ * `opening` prop of `XlsxEditorToolbar`.
409
+ */
410
+ readonly opening: {
411
+ readonly type: BooleanConstructor;
412
+ readonly default: undefined;
413
+ };
414
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
415
+ [key: string]: any;
416
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
417
+ ready: (_editor: XlsxEditorInstance) => true;
418
+ change: (_snapshot: EditorSnapshot) => true;
419
+ fontError: (_failure: EditorFailure) => true;
420
+ save: (_bytes: Uint8Array<ArrayBuffer>, _saved: SavedWorkbook) => true;
421
+ saveStart: (_saving: Promise<SavedWorkbook | null>) => true;
422
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
423
+ /** The bytes of a workbook or a template package, as on `XlsxEditorRoot`. */
424
+ readonly document: {
425
+ readonly type: PropType<Uint8Array | ArrayBuffer>;
426
+ readonly default: undefined;
427
+ };
428
+ /** The faces that measure and paint text, as on `XlsxEditorRoot`. */
429
+ readonly fonts: {
430
+ readonly type: PropType<XlsxEditorFonts>;
431
+ readonly default: undefined;
432
+ };
433
+ /** The number locale of the shown values, as on `XlsxEditorRoot`. */
434
+ readonly numberLocale: {
435
+ readonly type: PropType<NumberLocale>;
436
+ readonly default: undefined;
437
+ };
438
+ /** `'edit'` (default) or `'view'`, as on `XlsxEditorRoot`. */
439
+ readonly mode: {
440
+ readonly type: PropType<EditorMode>;
441
+ readonly default: undefined;
442
+ };
443
+ /** UI strings, as on `XlsxEditorRoot`. English when omitted. */
444
+ readonly locale: {
445
+ readonly type: PropType<Translations>;
446
+ readonly default: undefined;
447
+ };
448
+ /** The chrome color theme, as on `XlsxEditorRoot`. */
449
+ readonly colorMode: {
450
+ readonly type: PropType<ColorMode>;
451
+ readonly default: undefined;
452
+ };
453
+ /**
454
+ * Whether your page opens another workbook now, while the editor still shows the old one. While
455
+ * it is true, the save control is disabled and Control or Command and S starts no save. See the
456
+ * `opening` prop of `XlsxEditorToolbar`.
457
+ */
458
+ readonly opening: {
459
+ readonly type: BooleanConstructor;
460
+ readonly default: undefined;
461
+ };
462
+ }>> & Readonly<{
463
+ onChange?: ((_snapshot: EditorSnapshot) => any) | undefined;
464
+ onFontError?: ((_failure: EditorFailure) => any) | undefined;
465
+ onReady?: ((_editor: XlsxEditorInstance) => any) | undefined;
466
+ onSave?: ((_bytes: Uint8Array<ArrayBuffer>, _saved: SavedWorkbook) => any) | undefined;
467
+ onSaveStart?: ((_saving: Promise<SavedWorkbook | null>) => any) | undefined;
468
+ }>, {
469
+ readonly document: ArrayBuffer | Uint8Array<ArrayBufferLike>;
470
+ readonly fonts: XlsxEditorFonts;
471
+ readonly numberLocale: NumberLocale;
472
+ readonly mode: EditorMode;
473
+ readonly locale: _xlsx_editor_dev_i18n.PartialLocaleStrings;
474
+ readonly colorMode: ColorMode;
475
+ readonly opening: boolean;
476
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
477
+
478
+ /** @jsxImportSource vue */
479
+ /** Zoom out, the zoom level (press to reset to 100%), and zoom in. @public */
480
+ declare const ZoomControl: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
481
+ /**
482
+ * The state of the editor when it shows no grid, the reason the last edit was refused, the
483
+ * stale-results notice, and the notice for conditional formatting that the grid can leave out
484
+ * (`conditionalHidden`). The engine's live region announces the refusal, so the refusal here
485
+ * has no live role: it is shown, not announced twice. @public
486
+ */
487
+ declare const StatusMessage: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
488
+
489
+ /** @jsxImportSource vue */
490
+ /**
491
+ * The active cell's reference and content, both editable. The content is formula text, or the
492
+ * value in a form that reads back, such as `2026-11-12` for a date. @public
493
+ */
494
+ declare const FormulaBar: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
495
+
496
+ /** @jsxImportSource vue */
497
+ /** One tab for each visible worksheet, in workbook order, with the sheet actions. @public */
498
+ declare const SheetTabs: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
499
+
500
+ declare const xlsxEditorToolbarSlotProps: {
501
+ /** The built-in slot that the part names, such as `'font.bold'`. */
502
+ readonly slotId: {
503
+ readonly type: PropType<ChromeSlotId>;
504
+ readonly required: true;
505
+ };
506
+ /**
507
+ * Removes the slot where it stands, as the toolbar's `hidden` list does. A group whose slots
508
+ * are all hidden is left out.
509
+ */
510
+ readonly hidden: {
511
+ readonly type: BooleanConstructor;
512
+ readonly default: undefined;
513
+ };
514
+ };
515
+ /** Props of `XlsxEditorToolbar.Slot`, the twin of React's `XlsxEditorToolbarSlotProps`. @public */
516
+ type XlsxEditorToolbarSlotProps = ExtractPublicPropTypes<typeof xlsxEditorToolbarSlotProps>;
517
+ /**
518
+ * One slot of the toolbar. Under the preset toolbar, the part replaces its slot where it stands
519
+ * with its default slot, or removes it with `hidden`. Anywhere else, such as in a host group or
520
+ * under `:preset="false"`, it renders its default slot, or the built-in control of its slot.
521
+ * The toolbar reads a part only in its default slot or in a Fragment there, not in a component
522
+ * of your own.
523
+ *
524
+ * @example
525
+ * ```ts
526
+ * h(XlsxEditorToolbar, null, () => [
527
+ * h(XlsxEditorToolbar.Slot, { slotId: 'file.save' }, () => [h(MySaveButton)]),
528
+ * h(XlsxEditorToolbar.Slot, { slotId: 'font.underline', hidden: true }),
529
+ * ]);
530
+ * ```
531
+ *
532
+ * @public
533
+ */
534
+ declare const XlsxEditorToolbarSlot: vue.DefineComponent<vue.ExtractPropTypes<{
535
+ /** The built-in slot that the part names, such as `'font.bold'`. */
536
+ readonly slotId: {
537
+ readonly type: PropType<ChromeSlotId>;
538
+ readonly required: true;
539
+ };
540
+ /**
541
+ * Removes the slot where it stands, as the toolbar's `hidden` list does. A group whose slots
542
+ * are all hidden is left out.
543
+ */
544
+ readonly hidden: {
545
+ readonly type: BooleanConstructor;
546
+ readonly default: undefined;
547
+ };
548
+ }>, () => VNode<vue.RendererNode, vue.RendererElement, {
549
+ [key: string]: any;
550
+ }>[] | vue_jsx_runtime.JSX.Element | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
551
+ /** The built-in slot that the part names, such as `'font.bold'`. */
552
+ readonly slotId: {
553
+ readonly type: PropType<ChromeSlotId>;
554
+ readonly required: true;
555
+ };
556
+ /**
557
+ * Removes the slot where it stands, as the toolbar's `hidden` list does. A group whose slots
558
+ * are all hidden is left out.
559
+ */
560
+ readonly hidden: {
561
+ readonly type: BooleanConstructor;
562
+ readonly default: undefined;
563
+ };
564
+ }>> & Readonly<{}>, {
565
+ readonly hidden: boolean;
566
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
567
+ declare const xlsxEditorToolbarGroupProps: {
568
+ /**
569
+ * The group id. A built-in id, such as `'font'` or `'file'`, adds the default slot to that
570
+ * group, after its own controls. Any other id makes a host group, which the bar measures and
571
+ * moves into the "More" panel as it moves its own groups.
572
+ */
573
+ readonly id: {
574
+ readonly type: PropType<ChromeGroupId | (string & {})>;
575
+ readonly required: true;
576
+ };
577
+ /**
578
+ * The heading of a host group in the "More" panel, and its accessible name. It wins over
579
+ * `labelKey`. Without either, the heading is the `id`. A built-in group keeps its own label.
580
+ */
581
+ readonly label: {
582
+ readonly type: StringConstructor;
583
+ readonly default: undefined;
584
+ };
585
+ /** A catalog key for the heading of a host group, translated with the toolbar's locale. */
586
+ readonly labelKey: {
587
+ readonly type: StringConstructor;
588
+ readonly default: undefined;
589
+ };
590
+ /**
591
+ * The group that a host group follows in the bar. Without it, a host group follows every
592
+ * built-in group, in order of appearance. A built-in group keeps its place.
593
+ */
594
+ readonly after: {
595
+ readonly type: PropType<ChromeGroupId | (string & {})>;
596
+ readonly default: undefined;
597
+ };
598
+ /** Removes the group, built-in or host, from the bar and from the "More" panel. */
599
+ readonly hidden: {
600
+ readonly type: BooleanConstructor;
601
+ readonly default: undefined;
602
+ };
603
+ /** Appended after the `xlsx-toolbar-group` class. A host `class` also works. */
604
+ readonly className: {
605
+ readonly type: StringConstructor;
606
+ readonly default: undefined;
607
+ };
608
+ };
609
+ /** Props of `XlsxEditorToolbar.Group`, the twin of React's `XlsxEditorToolbarGroupProps`. @public */
610
+ type XlsxEditorToolbarGroupProps = ExtractPublicPropTypes<typeof xlsxEditorToolbarGroupProps>;
611
+ /**
612
+ * A group of the toolbar. Under the preset toolbar, a host group is measured with the built-in
613
+ * groups, moves into the "More" panel when it does not fit, and shows there as a section with
614
+ * its heading. A built-in id adds the default slot to that group, or removes the group with
615
+ * `hidden`. Under `:preset="false"`, the part renders its default slot as one group. The
616
+ * toolbar reads a part only in its default slot or in a Fragment there, not in a component of
617
+ * your own.
618
+ *
619
+ * @example
620
+ * ```ts
621
+ * h(XlsxEditorToolbar, null, () => [
622
+ * h(XlsxEditorToolbar.Group, { id: 'share', label: 'Share', after: 'file' }, () => [
623
+ * h(ShareButton),
624
+ * ]),
625
+ * h(XlsxEditorToolbar.Group, { id: 'borders', hidden: true }),
626
+ * ]);
627
+ * ```
628
+ *
629
+ * @public
630
+ */
631
+ declare const XlsxEditorToolbarGroup: vue.DefineComponent<vue.ExtractPropTypes<{
632
+ /**
633
+ * The group id. A built-in id, such as `'font'` or `'file'`, adds the default slot to that
634
+ * group, after its own controls. Any other id makes a host group, which the bar measures and
635
+ * moves into the "More" panel as it moves its own groups.
636
+ */
637
+ readonly id: {
638
+ readonly type: PropType<ChromeGroupId | (string & {})>;
639
+ readonly required: true;
640
+ };
641
+ /**
642
+ * The heading of a host group in the "More" panel, and its accessible name. It wins over
643
+ * `labelKey`. Without either, the heading is the `id`. A built-in group keeps its own label.
644
+ */
645
+ readonly label: {
646
+ readonly type: StringConstructor;
647
+ readonly default: undefined;
648
+ };
649
+ /** A catalog key for the heading of a host group, translated with the toolbar's locale. */
650
+ readonly labelKey: {
651
+ readonly type: StringConstructor;
652
+ readonly default: undefined;
653
+ };
654
+ /**
655
+ * The group that a host group follows in the bar. Without it, a host group follows every
656
+ * built-in group, in order of appearance. A built-in group keeps its place.
657
+ */
658
+ readonly after: {
659
+ readonly type: PropType<ChromeGroupId | (string & {})>;
660
+ readonly default: undefined;
661
+ };
662
+ /** Removes the group, built-in or host, from the bar and from the "More" panel. */
663
+ readonly hidden: {
664
+ readonly type: BooleanConstructor;
665
+ readonly default: undefined;
666
+ };
667
+ /** Appended after the `xlsx-toolbar-group` class. A host `class` also works. */
668
+ readonly className: {
669
+ readonly type: StringConstructor;
670
+ readonly default: undefined;
671
+ };
672
+ }>, () => vue_jsx_runtime.JSX.Element | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
673
+ /**
674
+ * The group id. A built-in id, such as `'font'` or `'file'`, adds the default slot to that
675
+ * group, after its own controls. Any other id makes a host group, which the bar measures and
676
+ * moves into the "More" panel as it moves its own groups.
677
+ */
678
+ readonly id: {
679
+ readonly type: PropType<ChromeGroupId | (string & {})>;
680
+ readonly required: true;
681
+ };
682
+ /**
683
+ * The heading of a host group in the "More" panel, and its accessible name. It wins over
684
+ * `labelKey`. Without either, the heading is the `id`. A built-in group keeps its own label.
685
+ */
686
+ readonly label: {
687
+ readonly type: StringConstructor;
688
+ readonly default: undefined;
689
+ };
690
+ /** A catalog key for the heading of a host group, translated with the toolbar's locale. */
691
+ readonly labelKey: {
692
+ readonly type: StringConstructor;
693
+ readonly default: undefined;
694
+ };
695
+ /**
696
+ * The group that a host group follows in the bar. Without it, a host group follows every
697
+ * built-in group, in order of appearance. A built-in group keeps its place.
698
+ */
699
+ readonly after: {
700
+ readonly type: PropType<ChromeGroupId | (string & {})>;
701
+ readonly default: undefined;
702
+ };
703
+ /** Removes the group, built-in or host, from the bar and from the "More" panel. */
704
+ readonly hidden: {
705
+ readonly type: BooleanConstructor;
706
+ readonly default: undefined;
707
+ };
708
+ /** Appended after the `xlsx-toolbar-group` class. A host `class` also works. */
709
+ readonly className: {
710
+ readonly type: StringConstructor;
711
+ readonly default: undefined;
712
+ };
713
+ }>> & Readonly<{}>, {
714
+ readonly label: string;
715
+ readonly labelKey: string;
716
+ readonly after: "alignment" | "borders" | "cells" | "clear" | "file" | "fill" | "font" | "history" | "number" | (string & {});
717
+ readonly hidden: boolean;
718
+ readonly className: string;
719
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
720
+
721
+ /** @jsxImportSource vue */
722
+
723
+ declare const xlsxEditorToolbarProps: {
724
+ /**
725
+ * Receives the workbook as bytes of the opened package's kind (`snapshot().workbookKind`: a
726
+ * workbook or a template) when the save control is pressed, or when the user presses Control
727
+ * or Command and S in the editor, also with the save control hidden. Without it, the save
728
+ * control is disabled with the engine's reason, and the browser keeps the shortcut. A refused
729
+ * save calls nothing: the snapshot holds the refusal with `command: 'save'`. The bytes arrive
730
+ * after the press, because a save runs in short tasks. `saved.stillOpen` is false when
731
+ * another open, `close()`, or `destroy()` ended the workbook during the save, and
732
+ * `saved.revision` is the revision of the bytes. A `@save` listener sets it too.
733
+ */
734
+ readonly onSave: {
735
+ readonly type: PropType<(bytes: Uint8Array<ArrayBuffer>, saved: SavedWorkbook) => void>;
736
+ readonly default: undefined;
737
+ };
738
+ /**
739
+ * Called once when a press of the save control, or of Control or Command and S in the editor,
740
+ * starts a delivery to `onSave`. It gets the promise of the result, so you can show that the
741
+ * save runs. A press that joins the running save of an earlier press and a refused save do
742
+ * not call it. A press that joins a save from `saveInTasks` calls it, because that save has no
743
+ * delivery yet. The promise resolves to `null` when the save is refused later. A
744
+ * `@save-start` listener sets it too.
745
+ */
746
+ readonly onSaveStart: {
747
+ readonly type: PropType<(saving: Promise<SavedWorkbook | null>) => void>;
748
+ readonly default: undefined;
749
+ };
750
+ /**
751
+ * Whether your page opens another workbook now, while the editor still shows the old one: for
752
+ * example during a download or a file read before `load`. While it is true, the save control
753
+ * is disabled with the reason that a workbook is loading, and Control or Command and S in the
754
+ * editor starts no save work. After such a press, and only then, the snapshot holds the
755
+ * refusal `loading`, with `command: 'save'`. When it changes to false, the toolbar forgets
756
+ * that refusal and keeps any other refusal. The default is `false`.
757
+ */
758
+ readonly opening: {
759
+ readonly type: BooleanConstructor;
760
+ readonly default: undefined;
761
+ };
762
+ /**
763
+ * `false` wraps the controls onto more rows instead of moving the groups that do not fit
764
+ * into the "More" panel. It has no effect with `:preset="false"`, which always wraps.
765
+ */
766
+ readonly overflow: {
767
+ readonly type: BooleanConstructor;
768
+ readonly default: true;
769
+ };
770
+ /**
771
+ * `false` renders only the default slot, in its order, with no measure and no "More" panel.
772
+ * An `XlsxEditorToolbar.Slot` there renders the built-in control of its slot, or its default
773
+ * slot. The default is `true`: the groups of `CHROME_GROUPS`, changed by the default slot,
774
+ * where `XlsxEditorToolbar.Slot` replaces or hides one slot where it stands and
775
+ * `XlsxEditorToolbar.Group` adds a host group or changes a built-in group. Other content
776
+ * shows in one block after the groups, which never moves into the "More" panel.
777
+ */
778
+ readonly preset: {
779
+ readonly type: BooleanConstructor;
780
+ readonly default: true;
781
+ };
782
+ /** Appended after the `xlsx-toolbar` class. A host `class` also works. */
783
+ readonly className: {
784
+ readonly type: StringConstructor;
785
+ readonly default: undefined;
786
+ };
787
+ /**
788
+ * Slot ids to leave out, such as `['file.save']`. A group whose slots are all hidden is left
789
+ * out with its separator. The order of the list does not matter.
790
+ */
791
+ readonly hidden: {
792
+ readonly type: PropType<readonly ChromeSlotId[]>;
793
+ readonly default: undefined;
794
+ };
795
+ };
796
+ /** Props of `XlsxEditorToolbar`, the twin of React's `XlsxEditorToolbarProps`. @public */
797
+ type XlsxEditorToolbarProps = ExtractPublicPropTypes<typeof xlsxEditorToolbarProps>;
798
+ /**
799
+ * The toolbar and its parts, the twin of React's `XlsxEditorToolbarNamespace`, as DOCX Editor's
800
+ * Vue adapter declares `DocxEditorToolbarNamespace`. @public
801
+ */
802
+ interface XlsxEditorToolbarNamespace {
803
+ /** The toolbar. A host `class` and `style` land on the bar, as on a component. */
804
+ (props: XlsxEditorToolbarProps & AllowedComponentProps): VNode;
805
+ /** Replaces or hides one slot where it stands, or renders its built-in control. */
806
+ readonly Slot: typeof XlsxEditorToolbarSlot;
807
+ /** A host group that the bar measures and collapses, or a change of a built-in group. */
808
+ readonly Group: typeof XlsxEditorToolbarGroup;
809
+ }
810
+ /**
811
+ * The editing toolbar: every group of the chrome registry in bar order. Place it inside
812
+ * `XlsxEditorViewport`, which carries the styling scope. Its parts change the bar, in its
813
+ * default slot: `XlsxEditorToolbar.Slot` and `XlsxEditorToolbar.Group`.
814
+ *
815
+ * @example
816
+ * ```ts
817
+ * h(XlsxEditorToolbar, { preset: false }, () => [
818
+ * h(XlsxEditorToolbar.Group, { id: 'text', label: 'Text' }, () => [
819
+ * h(XlsxEditorToolbar.Slot, { slotId: 'font.bold' }),
820
+ * h(XlsxEditorToolbar.Slot, { slotId: 'font.italic' }),
821
+ * ]),
822
+ * ]);
823
+ * ```
824
+ *
825
+ * @public
826
+ */
827
+ declare const XlsxEditorToolbar: XlsxEditorToolbarNamespace;
828
+
829
+ /** What `useEditorColorMode` returns. @public */
830
+ interface UseEditorColorModeReturn {
831
+ /** The resolved theme: `'dark'` or `'light'`. Updates when `colorMode` or the OS setting changes. */
832
+ readonly colorMode: ComputedRef<ResolvedColorMode>;
833
+ }
834
+ /**
835
+ * The theme the enclosing `XlsxEditorRoot` resolved from its `colorMode`, as React's
836
+ * `useEditorColorMode` and DOCX Editor's. Outside a root, or without `colorMode`, it is
837
+ * `'light'`. Call it in `setup`. @public
838
+ */
839
+ declare function useEditorColorMode(): UseEditorColorModeReturn;
840
+ /** What {@link useScopeClassName} returns. @public */
841
+ type UseScopeClassNameReturn = ComputedRef<'' | 'xlsx-editor ' | 'xlsx-editor dark '>;
842
+ /**
843
+ * The scope classes a part you build yourself adds to its own root element, so the editor's
844
+ * `--doc-*` tokens and chrome styles apply to it, as React's `useScopeClassName`. Inside
845
+ * `XlsxEditorViewport` it is `''`. Outside it, it is `'xlsx-editor '`, or `'xlsx-editor dark '`
846
+ * when the root's `colorMode` resolved dark, and `'xlsx-editor '` outside a root. It is a ref,
847
+ * so it follows a change of `colorMode` and a `'system'` color mode. The value ends with a
848
+ * space, so it concatenates cleanly. Call it in `setup`. @public
849
+ */
850
+ declare function useScopeClassName(): UseScopeClassNameReturn;
851
+
852
+ /** The editor published by `XlsxEditorRoot`, the twin of React's `XlsxEditorContext`. @public */
853
+ declare const xlsxEditorKey: InjectionKey<ShallowRef<XlsxEditorInstance | null>>;
854
+ /** The translator published by `XlsxEditorRoot`, the twin of React's `TranslationContext`. @public */
855
+ declare const xlsxTranslationKey: InjectionKey<ShallowRef<TFunction>>;
856
+ /** A translator over a locale catalog: missing or `null` entries fall back to English. @public */
857
+ declare function translatorFor(locale: Translations | undefined): TFunction;
858
+ /** What `useXlsxEditor` returns: the editor, or null before it mounts. @public */
859
+ type UseXlsxEditorReturn = Readonly<ShallowRef<XlsxEditorInstance | null>>;
860
+ /** The editor, or null before it mounts. @public */
861
+ declare function useXlsxEditor(): UseXlsxEditorReturn;
862
+ /** What `useTranslation` returns. @public */
863
+ interface UseTranslationReturn {
864
+ /** Translate a key. A render that calls it renders again when the root's `locale` changes. */
865
+ readonly t: TFunction;
866
+ }
867
+ /** The translator of the enclosing root. @public */
868
+ declare function useTranslation(): UseTranslationReturn;
869
+ /** What `useViewModeWaits` returns. @public */
870
+ type UseViewModeWaitsReturn = Readonly<ShallowRef<boolean>>;
871
+ /**
872
+ * Whether a change of the root's `mode` prop to view mode waits for the open cell edit, as
873
+ * `XlsxEditorStatusMessage` shows it. For a layout that shows the wait in its own chrome.
874
+ *
875
+ * @public
876
+ */
877
+ declare function useViewModeWaits(): UseViewModeWaitsReturn;
878
+ /** What `useEditorState` returns: the selected slice, updated when it changes. @public */
879
+ type UseEditorStateReturn<T> = Readonly<ShallowRef<T>>;
880
+ /**
881
+ * A slice of the editor's state, the twin of React's `useEditorState`. The ref changes only
882
+ * when `selector`'s result changes by `isEqual` (default `Object.is`). Before the editor mounts,
883
+ * the selector reads an empty snapshot with the root's `mode`, never `null`. `deps` names a
884
+ * source whose change reads the slice again, such as a slot that the selector reads.
885
+ *
886
+ * @public
887
+ */
888
+ declare function useEditorState<T>(selector: (snapshot: EditorSnapshot) => T, isEqual?: (a: T, b: T) => boolean, deps?: () => unknown): UseEditorStateReturn<T>;
889
+ /** What `useEditorSnapshot` returns. @public */
890
+ type UseEditorSnapshotReturn = Readonly<ShallowRef<EditorSnapshot>>;
891
+ /**
892
+ * The editor's whole state, read again after each change. Before it mounts, an empty snapshot
893
+ * with the root's `mode`.
894
+ *
895
+ * @public
896
+ */
897
+ declare function useEditorSnapshot(): UseEditorSnapshotReturn;
898
+
899
+ /**
900
+ * The live state of one chrome slot, and its action: the twin of React's
901
+ * `EditorCommandState`, with refs.
902
+ *
903
+ * @public
904
+ */
905
+ interface UseEditorCommandReturn {
906
+ /**
907
+ * Run the slot's command. Pass the picked value of a value slot, such as `'Arial'` for
908
+ * `font.family` or `'FF0000'` for `font.color`.
909
+ *
910
+ * @returns `true` when the editor ran the command; `false` when it refused it, or before
911
+ * the editor mounts.
912
+ */
913
+ readonly execute: (value?: string) => boolean;
914
+ /** Whether the command is applied at the active cell, such as bold on a bold cell. */
915
+ readonly isActive: ComputedRef<boolean>;
916
+ /** Whether the editor runs the command now. */
917
+ readonly isEnabled: ComputedRef<boolean>;
918
+ /** The engine's reason when the command is disabled, translated. Null when it is enabled. */
919
+ readonly disabledReason: ComputedRef<string | null>;
920
+ /**
921
+ * The engine's hint for an enabled command, translated, or null. The text of
922
+ * `hint.conditionalFormat` means that a true conditional formatting rule shows another state
923
+ * of this control at the active cell; the command still reads and sets the cell format.
924
+ */
925
+ readonly hint: ComputedRef<string | null>;
926
+ /**
927
+ * What a value slot shows: the font name, the size in points, the color as `RRGGBB` (or
928
+ * `none` for no fill), the number format choice, or the format code of the active cell for
929
+ * `number.custom`. Null for a slot that has no value.
930
+ */
931
+ readonly value: ComputedRef<string | null>;
932
+ }
933
+ /**
934
+ * Bind a chrome slot, such as `font.bold` or `history.undo`, to the editor. The refs change
935
+ * only when the slot's own state changes. The slot may be a ref or a getter: the state follows
936
+ * it.
937
+ *
938
+ * `file.save` hands the bytes to the `onSave` of the enclosing toolbar. Outside a toolbar it is
939
+ * disabled: call `save()` on the editor ref instead.
940
+ *
941
+ * @public
942
+ */
943
+ declare function useEditorCommand(slot: MaybeRefOrGetter<ChromeSlotId>): UseEditorCommandReturn;
944
+
945
+ /** What {@link useEditorEvent} returns: nothing; the subscription ends with the scope. @public */
946
+ type UseEditorEventReturn = void;
947
+ /**
948
+ * Subscribe to an editor event (`'change'`, `'selectionChange'`, `'rejection'`,
949
+ * `'openFailure'`) for the lifetime of the component, the twin of React's `useEditorEvent`.
950
+ * Call it in `setup`. It does nothing until `XlsxEditorRoot` creates the editor, and subscribes
951
+ * again when the instance changes.
952
+ *
953
+ * `'change'` fires only when the workbook content changes. The root's `change` emit fires after
954
+ * every state change, also a selection or a zoom change.
955
+ *
956
+ * @example
957
+ * ```ts
958
+ * const { t } = useTranslation();
959
+ * useEditorEvent('rejection', (refusal, snapshot) =>
960
+ * toast(refusalText(refusal, t, snapshot.numberLocale))
961
+ * );
962
+ * ```
963
+ *
964
+ * @public
965
+ */
966
+ declare function useEditorEvent<E extends keyof EditorEvents>(event: E, handler: EditorEvents[E]): UseEditorEventReturn;
967
+
968
+ /**
969
+ * `@xlsx-editor.dev/vue`: the Vue 3 adapter for XLSX Editor, the twin of
970
+ * `@xlsx-editor.dev/react`.
971
+ *
972
+ * Provider-first, after PPTX Editor's and DOCX Editor's Vue adapters: `XlsxEditorRoot` owns the
973
+ * editor instance, `XlsxEditorViewport` scopes the styles, and `XlsxEditorContent` attaches the
974
+ * grid surface. Every piece of chrome reads the editor through composables;
975
+ * `XlsxEditorToolbar` renders the chrome registry. `XlsxEditor` composes them all.
976
+ * `scripts/parity/parity.contract.json` lists which React members Vue pairs.
977
+ *
978
+ * @packageDocumentation
979
+ * @public
980
+ */
981
+
982
+ /**
983
+ * The type of `XlsxEditor`: the composed editor, and its parts as statics for a custom layout.
984
+ * It is written out, as React's `XlsxEditorNamespace` is, so the declarations name each part
985
+ * and do not expand the component instance type.
986
+ *
987
+ * @public
988
+ */
989
+ type XlsxEditorNamespace = typeof XlsxEditor$1 & {
990
+ readonly Root: typeof XlsxEditorRoot;
991
+ readonly Viewport: typeof XlsxEditorViewport;
992
+ readonly Content: typeof XlsxEditorContent;
993
+ readonly Toolbar: typeof XlsxEditorToolbar;
994
+ readonly FormulaBar: typeof FormulaBar;
995
+ readonly SheetTabs: typeof SheetTabs;
996
+ readonly ZoomControl: typeof ZoomControl;
997
+ readonly StatusMessage: typeof StatusMessage;
998
+ };
999
+ /**
1000
+ * The composed editor, with its parts for a custom layout, the twin of React's `XlsxEditor`.
1001
+ * Type a template ref as `XlsxEditorRef`, for example `useTemplateRef<XlsxEditorRef>('editor')`.
1002
+ * Each part is also exported by its own name. @public
1003
+ */
1004
+ declare const XlsxEditor: XlsxEditorNamespace;
1005
+
1006
+ export { FormulaBar, SheetTabs, StatusMessage, XlsxEditor, XlsxEditorContent, XlsxEditorRoot, XlsxEditorToolbar, XlsxEditorToolbarGroup, XlsxEditorToolbarSlot, XlsxEditorViewport, ZoomControl, translatorFor, useEditorColorMode, useEditorCommand, useEditorEvent, useEditorSnapshot, useEditorState, useScopeClassName, useTranslation, useViewModeWaits, useXlsxEditor, xlsxEditorKey, xlsxTranslationKey };
1007
+ export type { UseEditorColorModeReturn, UseEditorCommandReturn, UseEditorEventReturn, UseEditorSnapshotReturn, UseEditorStateReturn, UseScopeClassNameReturn, UseTranslationReturn, UseViewModeWaitsReturn, UseXlsxEditorReturn, XlsxEditorContentProps, XlsxEditorFonts, XlsxEditorNamespace, XlsxEditorProps, XlsxEditorRef, XlsxEditorRootProps, XlsxEditorToolbarGroupProps, XlsxEditorToolbarNamespace, XlsxEditorToolbarProps, XlsxEditorToolbarSlotProps, XlsxEditorViewportProps };