@xlsx-editor.dev/core 0.0.0-placeholder.0 → 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.
Files changed (55) hide show
  1. package/LICENSE +217 -0
  2. package/README.md +254 -2
  3. package/THIRD_PARTY_NOTICES.md +78 -0
  4. package/dist/automation.d.ts +299 -0
  5. package/dist/automation.js +42 -0
  6. package/dist/builtins-nmHrq2Et.d.ts +37 -0
  7. package/dist/cascade.d.ts +196 -0
  8. package/dist/cascade.js +60 -0
  9. package/dist/cell-format-DW8yF-c-.d.ts +226 -0
  10. package/dist/chunk-2DLJYRJC.js +3171 -0
  11. package/dist/chunk-2ZU4337U.js +204 -0
  12. package/dist/chunk-44L37ENZ.js +8219 -0
  13. package/dist/chunk-77N55BLP.js +911 -0
  14. package/dist/chunk-7PV5HQPE.js +84 -0
  15. package/dist/chunk-E4VJJ556.js +756 -0
  16. package/dist/chunk-KG4IL4JI.js +436 -0
  17. package/dist/chunk-PLDK4XO6.js +9125 -0
  18. package/dist/chunk-PRHLYXHL.js +1699 -0
  19. package/dist/chunk-TE4FXG5T.js +3156 -0
  20. package/dist/contracts.d.ts +32 -0
  21. package/dist/contracts.js +0 -0
  22. package/dist/dist-C7NLNUMD.js +2850 -0
  23. package/dist/editor.d.ts +3167 -0
  24. package/dist/editor.js +309 -0
  25. package/dist/harfbuzz-measurer-CkKfsEyu.d.ts +128 -0
  26. package/dist/harfbuzz.wasm +0 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.js +309 -0
  29. package/dist/layout.d.ts +111 -0
  30. package/dist/layout.js +104 -0
  31. package/dist/merge-commands-DthcNpfw.d.ts +53 -0
  32. package/dist/node-module-shim-LQXGL47O.js +18 -0
  33. package/dist/ops-CfUCjyph.d.ts +629 -0
  34. package/dist/output.d.ts +177 -0
  35. package/dist/output.js +29 -0
  36. package/dist/sheet-index-P5vevMWX.d.ts +52 -0
  37. package/dist/sheet-layout-D9M_4EBn.d.ts +494 -0
  38. package/dist/sheet-protection-D8goxm58.d.ts +209 -0
  39. package/dist/store.d.ts +615 -0
  40. package/dist/store.js +272 -0
  41. package/dist/theme-BprDji6x.d.ts +16 -0
  42. package/dist/units-D6CD_A5I.d.ts +13 -0
  43. package/dist/workbook-index-DsbeR8Kb.d.ts +294 -0
  44. package/licenses/Emscripten-LICENSE.txt +102 -0
  45. package/licenses/HarfBuzz-COPYING.txt +42 -0
  46. package/licenses/HarfBuzz-USE-MIT.txt +21 -0
  47. package/licenses/HarfBuzz-source-notices.txt +4508 -0
  48. package/licenses/README.md +19 -0
  49. package/licenses/Unicode-LICENSE.txt +39 -0
  50. package/licenses/compiler-rt-LICENSE.txt +311 -0
  51. package/licenses/harfbuzz-manifest.json +84 -0
  52. package/licenses/musl-COPYRIGHT.txt +193 -0
  53. package/package.json +79 -6
  54. package/src/styles/editor.css +1933 -0
  55. package/src/styles/editor.css.d.ts +2 -0
@@ -0,0 +1,1933 @@
1
+ /**
2
+ * XLSX Editor styles: the single source of truth for chrome CSS and tokens.
3
+ *
4
+ * The token block (shadcn HSL set and `--doc-*` chrome palette, light and dark) is taken through
5
+ * pptx-editor/packages/core/src/styles/editor.css at 1943d2c9 (EigenPal), which copies it from
6
+ * docx-editor/packages/core/src/styles/editor.css with the same NAMES, so one theme override
7
+ * styles every product. Difference: the slide show, slide edge, smart guide, and format painter
8
+ * tokens are left out. Component rules below use tokens only, with no raw hex or rgba. The
9
+ * workbook canvas is never themed: it keeps the workbook's own colors in dark mode too.
10
+ */
11
+
12
+ .xlsx-editor {
13
+ /* ----------------------------------------------------------------------
14
+ * shadcn tokens (HSL triples), with the same names and values as DOCX
15
+ * Editor so one theme override styles both products. XLSX Editor has no
16
+ * Tailwind: the chrome rules below are plain CSS
17
+ * that read these through `hsl(var(--name))`. Do not change the values.
18
+ * -------------------------------------------------------------------- */
19
+ --background: 0 0% 100%;
20
+ --foreground: 222.2 84% 4.9%;
21
+ --card: 0 0% 100%;
22
+ --card-foreground: 222.2 84% 4.9%;
23
+ --popover: 0 0% 100%;
24
+ --popover-foreground: 222.2 84% 4.9%;
25
+ --primary: 221.2 83.2% 53.3%;
26
+ --primary-foreground: 210 40% 98%;
27
+ --secondary: 210 40% 96.1%;
28
+ --secondary-foreground: 222.2 47.4% 11.2%;
29
+ --muted: 210 40% 96.1%;
30
+ --muted-foreground: 215.4 16.3% 46.9%;
31
+ --accent: 210 40% 96.1%;
32
+ --accent-foreground: 222.2 47.4% 11.2%;
33
+ --destructive: 0 84.2% 60.2%;
34
+ --destructive-foreground: 210 40% 98%;
35
+ --border: 214.3 31.8% 91.4%;
36
+ --input: 214.3 31.8% 91.4%;
37
+ --ring: 221.2 83.2% 53.3%;
38
+ --radius: 0.5rem;
39
+
40
+ /* ======================================================================
41
+ * Document-editor chrome palette — the single source of truth for UI
42
+ * colors. Components reference these via var(--doc-*); component styles
43
+ * carry no raw hex/rgba. Override the whole set under .xlsx-editor.dark to
44
+ * theme the UI. The workbook canvas is painted from the workbook and is
45
+ * intentionally NOT themed here: it keeps the workbook's own colors in both
46
+ * themes. One token is this editor's own, not in the set it shares with the
47
+ * other editors: --doc-canvas-bg, the canvas color of a cell preview.
48
+ * ==================================================================== */
49
+
50
+ /* Surfaces */
51
+ --doc-surface: #ffffff; /* panels, menus, dropdowns, cards */
52
+ --doc-popover-bg: var(--doc-surface); /* floating previews and contextual menus */
53
+ --doc-card: #f8fbff; /* collapsed comment / suggestion cards (near-white) */
54
+ --doc-bg: #f8f9fa; /* app background behind the page */
55
+ --doc-bg-subtle: #f5f5f5; /* subtle section backgrounds */
56
+ --doc-bg-hover: #f1f3f4; /* hover states */
57
+ --doc-bg-input: #f8f9fa; /* input backgrounds */
58
+
59
+ /* Primary action color (Google blue) */
60
+ --doc-primary: #1a73e8;
61
+ --doc-primary-hover: #1557b0;
62
+ --doc-primary-light: #e8f0fe; /* selected/active backgrounds */
63
+
64
+ /* Accent (indigo — agent / assistant UI) */
65
+ --doc-accent: #6366f1;
66
+ --doc-accent-bg: #eef2ff;
67
+
68
+ /* Foreground for text/icons sitting on a colored fill (primary/accent/
69
+ * dark buttons, badges, tooltips). Inverts in dark mode so contrast holds. */
70
+ --doc-on-primary: #ffffff;
71
+
72
+ /* Active toolbar toggle (bold, italic, bullets, ...): dark slab in light mode,
73
+ * accent tint in dark mode (where a dark slab would flip light). */
74
+ --doc-toggle-active-bg: hsl(var(--foreground));
75
+ --doc-toggle-active-fg: #ffffff;
76
+
77
+ /* Tooltips and the size box error: a dark label in light mode, a muted one in dark mode. */
78
+ --doc-tooltip-bg: hsl(var(--foreground));
79
+ --doc-tooltip-text: var(--doc-on-primary);
80
+
81
+ /* Review tokens (comment bands, the open review card). Kept with DOCX Editor's names and
82
+ values so one theme override styles both products; XLSX Editor does not paint review
83
+ marks yet. */
84
+ --doc-review-card-active-bg: color-mix(in srgb, #e8f0fe 45%, #fff);
85
+ --doc-comment-bg: rgba(255, 212, 0, 0.12);
86
+ --doc-comment-border: rgba(245, 174, 0, 0.45);
87
+ --doc-comment-active-bg: rgba(255, 212, 0, 0.35);
88
+ --doc-comment-active-border: rgba(245, 174, 0, 0.9);
89
+ --doc-comment-resolved-active-bg: rgba(255, 212, 0, 0.18);
90
+ --doc-comment-resolved-active-border: rgba(245, 174, 0, 0.6);
91
+
92
+ /* Text */
93
+ --doc-text: #202124; /* primary text */
94
+ --doc-popover-fg: var(--doc-text); /* text inside floating previews and menus */
95
+ --doc-text-muted: #5f6368; /* secondary text */
96
+ --doc-text-subtle: #9aa0a6; /* tertiary/disabled text */
97
+ --doc-text-placeholder: #999; /* placeholder text */
98
+
99
+ /* Borders */
100
+ --doc-border: #e0e0e0; /* standard borders */
101
+ --doc-border-light: #dadce0; /* lighter borders */
102
+ --doc-border-dark: #d0d0d0; /* darker borders (tables) */
103
+ --doc-border-input: #ccc; /* input borders */
104
+
105
+ /* Status */
106
+ --doc-error: #c5221f; /* error states */
107
+ --doc-error-bg: #fce8e6; /* error backgrounds */
108
+ --doc-danger: var(--doc-error); /* invalid and refused controls */
109
+ --doc-destructive: var(--doc-error); /* destructive menu/context rows */
110
+ --doc-destructive-hover-bg: var(--doc-error-bg);
111
+ --doc-success: #34a853; /* success states */
112
+ --doc-success-bg: #e8f5e9; /* success backgrounds */
113
+ --doc-warning: #f9a825; /* warning states (icon/accent/border) */
114
+ --doc-warning-bg: #fff8e1; /* warning backgrounds */
115
+ --doc-warning-text: #856404; /* readable warning text on warning-bg */
116
+
117
+ /* Link */
118
+ --doc-link: #0563c1; /* hyperlinks */
119
+
120
+ /* Revision, field, and review-author tokens. Kept with DOCX Editor's names and values for
121
+ token parity; XLSX Editor does not track changes yet, so nothing here reads them. */
122
+ --doc-revision-insertion: #2e7d32;
123
+ --doc-revision-deletion: #c62828;
124
+ --doc-revision-insertion-decoration-style: solid;
125
+ --doc-revision-insertion-decoration-thickness: 0.06em;
126
+ --doc-revision-insertion-underline-offset: 0.15em;
127
+ --doc-revision-insertion-active-bg: rgba(46, 125, 50, 0.24);
128
+ --doc-revision-insertion-active-border: var(--doc-revision-insertion);
129
+ --doc-revision-deletion-active-bg: rgba(198, 40, 40, 0.24);
130
+ --doc-revision-deletion-active-border: var(--doc-revision-deletion);
131
+ --doc-revision-other-active-bg: color-mix(
132
+ in srgb,
133
+ var(--doc-text-muted, #8a8f98) 14%,
134
+ transparent
135
+ );
136
+ --doc-revision-insertion-wash: rgba(46, 125, 50, 0.05);
137
+ --doc-revision-deletion-wash: rgba(198, 40, 40, 0.05);
138
+ --doc-field-shading: rgba(0, 0, 0, 0.09);
139
+ --doc-revision-format: #6b7f8c;
140
+ --doc-revision-format-wash: rgba(107, 127, 140, 0.1);
141
+ --doc-review-author-0: #c0392b;
142
+ --doc-review-author-1: #1f6fb2;
143
+ --doc-review-author-2: #7d3c98;
144
+ --doc-review-author-3: #117a65;
145
+ --doc-review-author-4: #9a6206;
146
+ --doc-review-author-5: #c2185b;
147
+ --doc-review-author-6: #2e4053;
148
+ --doc-review-author-7: #2e7d32;
149
+ --doc-review-change-bar: #a4a4a4;
150
+ --doc-review-change-bar-width: 1px;
151
+ --doc-review-change-bar-simple: #ea3425;
152
+ --doc-review-change-bar-simple-width: 2px;
153
+
154
+ /* Selected table cells: drawn, because a native selection cannot express a rectangle
155
+ * of cells. Kept close to the browser's own selection tint. */
156
+ --doc-cell-selection: rgba(26, 115, 232, 0.22);
157
+
158
+ /* Shadows & overlays */
159
+ --doc-shadow: rgba(0, 0, 0, 0.15);
160
+ --doc-shadow-strong: rgba(0, 0, 0, 0.3);
161
+ --doc-shadow-subtle: rgba(0, 0, 0, 0.06);
162
+ --doc-overlay: rgba(0, 0, 0, 0.5); /* modal backdrops */
163
+ /* Dimmed furniture opacity. Kept for token parity with DOCX Editor. */
164
+ --doc-hf-dim-opacity: 0.45;
165
+
166
+ /* Card elevation (Google-grey, compound): the rail, the toolbar, the panel, and menus. */
167
+ --doc-card-shadow: 0 1px 3px rgba(60, 64, 67, 0.2), 0 2px 6px rgba(60, 64, 67, 0.08);
168
+ --doc-card-shadow-strong: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
169
+ /* A larger popover elevation. Kept with DOCX Editor's value for token parity. */
170
+ --doc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
171
+
172
+ /* Focus ring & text selection (derived from primary) */
173
+ /* Shared with DOCX Editor. Its contrast against the chrome is below 3:1; a change is a
174
+ family-wide item for all three editors, so this file keeps the shared value. */
175
+ --doc-focus-ring: rgba(26, 115, 232, 0.4);
176
+ --doc-selection: rgba(26, 115, 232, 0.3);
177
+
178
+ /* ----------------------------------------------------------------------
179
+ * Chrome layering.
180
+ *
181
+ * Two bands, and the order between them is the whole point: something the
182
+ * user just OPENED must paint over furniture that was already there. Before
183
+ * these tokens the popups sat at 30 and the gutter at 40, so the File menu
184
+ * opened underneath the navigation toggle.
185
+ *
186
+ * --doc-z-chrome ambient furniture that is always on screen: the
187
+ * navigation gutter, table chrome, the outline toggle.
188
+ * --doc-z-overlay anything transient the user summoned: menus, popovers,
189
+ * color pickers, the toolbar overflow panel.
190
+ * --doc-z-context the context menu, which is raised over a selection
191
+ * that may already have an overlay open, so it outranks
192
+ * every other overlay.
193
+ * --doc-z-tooltip the chrome tooltip, over every other layer, so the
194
+ * reason of a disabled row in an open menu is readable.
195
+ *
196
+ * Add a new floating surface by picking the band, never a fresh number.
197
+ * -------------------------------------------------------------------- */
198
+ --doc-z-chrome: 40;
199
+ --doc-z-overlay: 50;
200
+ --doc-z-context: 55;
201
+ --doc-z-tooltip: 60;
202
+ /* Page and caret tokens. Kept with DOCX Editor's names for token parity. The workbook canvas
203
+ is not themed, so these are literals, and the dark block below changes them only for
204
+ chrome that reads them. */
205
+ --doc-page-bg: #ffffff;
206
+ --doc-page-bg-rendered: #ffffff;
207
+ --doc-page-text: #000000;
208
+ /* A cell as the canvas paints it, for chrome that shows a cell's value (the number format
209
+ preview). The dark block leaves it alone, as the canvas is not themed. DOCX Editor has no
210
+ such token: its pages use `--doc-page-bg-rendered`, which the dark block changes. */
211
+ --doc-canvas-bg: #ffffff;
212
+ --doc-caret: #202124;
213
+ --doc-caret-contrast: #ffffff;
214
+ /* Marks drawn over the grid contrast with the grid, not with the chrome. */
215
+ --doc-selection-halo: #ffffff;
216
+
217
+ /* Document scroll container scrollbar */
218
+ --doc-scrollbar-size: 14px;
219
+ --doc-scrollbar-thumb: color-mix(in srgb, var(--doc-text-muted) 45%, transparent);
220
+ --doc-scrollbar-thumb-hover: color-mix(in srgb, var(--doc-text-muted) 65%, transparent);
221
+ --doc-scrollbar-track: transparent;
222
+ }
223
+
224
+ .xlsx-editor.dark,
225
+ .xlsx-editor.dark .xlsx-editor {
226
+ /* Native parts (scrollbars, the cell editor) follow the dark chrome. */
227
+ color-scheme: dark;
228
+ /* The dark chrome palette, the same values as DOCX Editor's dark theme. The shadcn
229
+ * tokens (HSL triples) mirror the --doc-* chrome values below. */
230
+ --background: 0 0% 12%; /* #1f1f1f ribbon/surface */
231
+ --foreground: 0 0% 91%; /* #e8e8e8 */
232
+ --card: 0 0% 18%; /* #2d2d2d */
233
+ --card-foreground: 0 0% 91%;
234
+ --popover: 0 0% 18%; /* #2d2d2d */
235
+ --popover-foreground: 0 0% 91%;
236
+ --primary: 212 100% 65%; /* #4e9dff accent */
237
+ --primary-foreground: 0 0% 12%;
238
+ --secondary: 0 0% 20%; /* #333333 */
239
+ --secondary-foreground: 0 0% 91%;
240
+ --muted: 0 0% 20%; /* #333333 */
241
+ --muted-foreground: 0 0% 63%; /* #a0a0a0 */
242
+ --accent: 0 0% 23%; /* #3a3a3a */
243
+ --accent-foreground: 212 100% 65%;
244
+ --destructive: 0 72% 60%; /* #e05656 */
245
+ --destructive-foreground: 0 0% 98%;
246
+ --border: 0 0% 24%; /* #3c3c3c */
247
+ --input: 0 0% 24%;
248
+ --ring: 212 100% 60%;
249
+
250
+ /* chrome palette (dark) */
251
+ --doc-surface: #1f1f1f; /* ribbon / toolbar / title bar */
252
+ --doc-card: #2d2d2d; /* collapsed comment / suggestion cards */
253
+ --doc-bg: #262626; /* workspace behind the page */
254
+ --doc-bg-subtle: #2d2d2d; /* dropdowns, dialogs, panels */
255
+ --doc-bg-hover: #3a3a3a; /* hover states */
256
+ --doc-bg-input: #333333; /* input fields */
257
+ --doc-primary: #4e9dff; /* accent blue */
258
+ --doc-primary-hover: #6cb0ff;
259
+ --doc-primary-light: rgba(78, 157, 255, 0.18); /* selected/active bg */
260
+ --doc-accent: #4e9dff;
261
+ --doc-accent-bg: #1f3047;
262
+ --doc-on-primary: #1f1f1f; /* text/icon on a filled primary surface */
263
+ --doc-toggle-active-bg: var(--doc-primary-light);
264
+ --doc-toggle-active-fg: var(--doc-primary);
265
+ --doc-tooltip-bg: hsl(var(--muted));
266
+ --doc-tooltip-text: hsl(var(--foreground));
267
+ /* Mixed from the OPAQUE accent, not from the translucent `--doc-primary-light` above. */
268
+ --doc-review-card-active-bg: color-mix(in srgb, #4e9dff 12%, var(--doc-surface, #1b1d22));
269
+ --doc-comment-bg: rgba(253, 214, 99, 0.16);
270
+ --doc-comment-border: rgba(253, 214, 99, 0.5);
271
+ --doc-comment-active-bg: rgba(253, 214, 99, 0.32);
272
+ --doc-comment-active-border: rgba(253, 214, 99, 0.95);
273
+ /* Review tokens for dark mode, kept for token parity with DOCX Editor. */
274
+ --doc-revision-format: #9fb3bf;
275
+ --doc-review-change-bar: #9e9e9e;
276
+ --doc-review-change-bar-simple: #f0524a;
277
+ --doc-text: #e8e8e8; /* primary text */
278
+ --doc-text-muted: #a0a0a0; /* secondary text */
279
+ --doc-text-subtle: #6e6e6e; /* tertiary/disabled text */
280
+ --doc-text-placeholder: #6e6e6e;
281
+ --doc-border: #3c3c3c; /* standard borders */
282
+ --doc-border-light: #353535; /* lighter borders */
283
+ --doc-border-dark: #555555; /* darker borders (tables) */
284
+ --doc-border-input: #4a4a4a; /* input borders */
285
+ --doc-error: #f28b82;
286
+ --doc-error-bg: #3c1f1d;
287
+ --doc-success: #81c995;
288
+ --doc-success-bg: #1f2e22;
289
+ --doc-warning: #fdd663;
290
+ --doc-warning-bg: #332a1a;
291
+ --doc-warning-text: #fdd663;
292
+ --doc-link: #6eb9ff;
293
+ --doc-shadow: rgba(0, 0, 0, 0.4);
294
+ --doc-shadow-strong: rgba(0, 0, 0, 0.6);
295
+ --doc-shadow-subtle: rgba(0, 0, 0, 0.2);
296
+ --doc-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
297
+ --doc-card-shadow-strong: 0 1px 3px rgba(0, 0, 0, 0.5), 0 4px 8px 3px rgba(0, 0, 0, 0.3);
298
+ --doc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
299
+ --doc-overlay: rgba(0, 0, 0, 0.7);
300
+ --doc-hf-dim-opacity: 0.4;
301
+ --doc-focus-ring: rgba(78, 157, 255, 0.45);
302
+ --doc-selection: rgba(78, 157, 255, 0.32);
303
+
304
+ /* Page and caret tokens for dark mode, kept for token parity with DOCX Editor. The
305
+ workbook canvas itself is not themed: it keeps the workbook's own colors. */
306
+ --doc-page-bg: #cccccc;
307
+ --doc-page-bg-rendered: #333333;
308
+ --doc-caret: #e8e8e8;
309
+ --doc-caret-contrast: #202124;
310
+ }
311
+
312
+ /* ============================================================================
313
+ * EDITOR ROOT
314
+ * ============================================================================ */
315
+
316
+ /* Chrome type and shape tokens, after DOCX Editor's `--doc-font-ui` and radius tokens. Each rule
317
+ * reads `var(--token, <its own value>)`, so a host sets only the tokens it wants. The fallback
318
+ * values are those of pptx-editor/packages/core/src/styles/editor.css at d4502552 (EigenPal): the
319
+ * `.pptx-editor` font stack, 7px for a control, 6px for a menu row (`.pptx-menu__item`), 12px
320
+ * for a panel, and 999px for a pill. */
321
+ .xlsx-editor {
322
+ display: flex;
323
+ flex-direction: column;
324
+ min-height: 0;
325
+ overflow: hidden;
326
+ color: var(--doc-text);
327
+ background: var(--doc-bg);
328
+ font-family: var(
329
+ --doc-font-ui,
330
+ -apple-system,
331
+ BlinkMacSystemFont,
332
+ 'Segoe UI',
333
+ Roboto,
334
+ 'Helvetica Neue',
335
+ Arial,
336
+ sans-serif
337
+ );
338
+ font-size: 13px;
339
+ font-style: normal;
340
+ font-weight: 400;
341
+ line-height: normal;
342
+ letter-spacing: normal;
343
+ text-transform: none;
344
+ text-align: start;
345
+ white-space: normal;
346
+ /* The other inherited text styles, so the host page's do not reach the chrome. After
347
+ pptx-editor/packages/core/src/styles/editor.css at 3bf89a88 (EigenPal). */
348
+ text-indent: 0;
349
+ word-spacing: normal;
350
+ tab-size: 8;
351
+ font-feature-settings: normal;
352
+ font-variation-settings: normal;
353
+ -webkit-font-smoothing: antialiased;
354
+ }
355
+ /* The editor's own box, which `XlsxEditor.Viewport` marks with `xlsx-editor-viewport`. Its width
356
+ never follows its content, so a host that sizes the editor by content (an inline block, a
357
+ centered flex column, an absolute box with no width) cannot feed the grid's width back into
358
+ the editor and grow it without limit. The status strip reads this width, not the window's (a
359
+ narrow host on a wide page). The containment is on this class, not on `.xlsx-editor`, so a
360
+ host popup that carries the scope class (`useScopeClassName`) keeps its content width. */
361
+ .xlsx-editor-viewport {
362
+ container: xlsx-editor / inline-size;
363
+ }
364
+ .xlsx-editor *,
365
+ .xlsx-editor ::before,
366
+ .xlsx-editor ::after {
367
+ box-sizing: border-box;
368
+ }
369
+ /* The browser defaults the chrome relies on, set again inside the editor's own parts, so a host
370
+ reset (`* { margin: 0 }`, `button { font: inherit }`, `svg { display: block }`) cannot change
371
+ them. A part is an element with an `xlsx-` class other than the `.xlsx-editor` scope itself,
372
+ so host content beside the chrome keeps the host's styles. The values are the browser
373
+ defaults, except that controls take the chrome font. `:where()` keeps each rule at the
374
+ specificity of one class, so the component rules below win. After
375
+ pptx-editor/packages/core/src/styles/editor.css at 3bf89a88 (EigenPal). Difference: only the
376
+ elements that the chrome renders, with the option of a list box added. The paragraphs,
377
+ headings, and lists of the chrome set their own margins, so they need no defaults. */
378
+ .xlsx-editor
379
+ :where(
380
+ :is([class^='xlsx-'], [class*=' xlsx-']):not([class^='xlsx-editor'])
381
+ :is(svg, canvas):not([hidden])
382
+ ) {
383
+ display: inline;
384
+ vertical-align: baseline;
385
+ }
386
+ .xlsx-editor
387
+ :where(
388
+ :is([class^='xlsx-'], [class*=' xlsx-']):not([class^='xlsx-editor'])
389
+ :is(button, input, select, textarea)
390
+ ) {
391
+ font: inherit;
392
+ }
393
+ .xlsx-editor :where(:is([class^='xlsx-'], [class*=' xlsx-']):not([class^='xlsx-editor']) button) {
394
+ padding-block: 1px;
395
+ padding-inline: 6px;
396
+ color: ButtonText;
397
+ }
398
+ .xlsx-editor
399
+ :where(
400
+ :is([class^='xlsx-'], [class*=' xlsx-']):not([class^='xlsx-editor'])
401
+ :is(input, select, textarea)
402
+ ) {
403
+ color: FieldText;
404
+ }
405
+ .xlsx-editor :where(:is([class^='xlsx-'], [class*=' xlsx-']):not([class^='xlsx-editor']) option) {
406
+ padding-block: 0 1px;
407
+ padding-inline: 2px;
408
+ }
409
+
410
+ /* ============================================================================
411
+ * GRID SURFACE (core `editor/grid-surface.ts`)
412
+ * The painted window is not themed: `.xlsx-grid` keeps the workbook's colors.
413
+ * ============================================================================ */
414
+ .xlsx-canvas {
415
+ display: flex;
416
+ flex: 1 1 0;
417
+ min-height: 0;
418
+ min-width: 0;
419
+ }
420
+ .xlsx-surface {
421
+ position: relative;
422
+ flex: 1 1 0;
423
+ min-height: 0;
424
+ min-width: 0;
425
+ display: flex;
426
+ background: var(--doc-page-bg);
427
+ }
428
+ .xlsx-scroller {
429
+ position: relative;
430
+ flex: 1 1 auto;
431
+ min-height: 0;
432
+ min-width: 0;
433
+ overflow: auto;
434
+ outline: none;
435
+ scrollbar-color: var(--doc-scrollbar-thumb) var(--doc-scrollbar-track);
436
+ }
437
+ /* The grid's focus ring: an overlay above the opaque sticky stage and the cell editor, so it
438
+ shows wherever the stage paints. It shows while the grid or its cell editor has the focus. */
439
+ .xlsx-surface::after {
440
+ content: '';
441
+ position: absolute;
442
+ inset: 0;
443
+ z-index: 4;
444
+ pointer-events: none;
445
+ }
446
+ .xlsx-surface:focus-within::after {
447
+ box-shadow: inset 0 0 0 2px var(--doc-focus-ring);
448
+ }
449
+ /* Without the focus, the active cell keeps a muted border, so the focused grid stands out. */
450
+ .xlsx-surface:not(:focus-within) .xlsx-active-cell {
451
+ border-color: var(--doc-text-muted);
452
+ }
453
+ .xlsx-extent {
454
+ position: relative;
455
+ }
456
+ .xlsx-stage {
457
+ position: sticky;
458
+ top: 0;
459
+ left: 0;
460
+ overflow: hidden;
461
+ /* A touch pans the sheet; a tap selects on release (`grid-pointer.ts`). A two-finger pinch
462
+ does not zoom the grid: the zoom control does (`wheel-zoom.ts`). */
463
+ touch-action: pan-x pan-y;
464
+ user-select: none;
465
+ -webkit-user-select: none;
466
+ }
467
+ .xlsx-grid {
468
+ position: absolute;
469
+ overflow: hidden;
470
+ }
471
+ .xlsx-grid > canvas {
472
+ display: block;
473
+ }
474
+ .xlsx-a11y-rows {
475
+ position: absolute;
476
+ width: 1px;
477
+ height: 1px;
478
+ overflow: hidden;
479
+ clip-path: inset(50%);
480
+ white-space: nowrap;
481
+ }
482
+ .xlsx-overlay {
483
+ position: absolute;
484
+ pointer-events: none;
485
+ overflow: hidden;
486
+ }
487
+ .xlsx-selection-range {
488
+ position: absolute;
489
+ background: var(--doc-cell-selection);
490
+ outline: 1px solid var(--doc-primary);
491
+ outline-offset: -1px;
492
+ }
493
+ .xlsx-active-cell {
494
+ position: absolute;
495
+ border: 2px solid var(--doc-primary);
496
+ box-shadow: inset 0 0 0 1px var(--doc-selection-halo);
497
+ }
498
+ /* The source range of a pending copy or cut: a static dashed line over a solid strip, so it
499
+ shows on any cell fill, and its meaning needs no color and no motion. */
500
+ .xlsx-pending-edge {
501
+ position: absolute;
502
+ box-sizing: border-box;
503
+ background: var(--doc-surface);
504
+ border: 0 dashed var(--doc-text);
505
+ }
506
+ .xlsx-pending-edge:where([data-side='top'], [data-side='bottom']) {
507
+ border-top-width: 2px;
508
+ }
509
+ .xlsx-pending-edge:where([data-side='left'], [data-side='right']) {
510
+ border-left-width: 2px;
511
+ }
512
+ @media (forced-colors: active) {
513
+ .xlsx-pending-edge {
514
+ forced-color-adjust: none;
515
+ background: Canvas;
516
+ border-color: CanvasText;
517
+ }
518
+ }
519
+ @media print {
520
+ .xlsx-pending-edge {
521
+ display: none;
522
+ }
523
+ }
524
+ /* The cell editor: a text input over the active cell, above the selection outline. */
525
+ .xlsx-cell-editor {
526
+ position: absolute;
527
+ z-index: 3;
528
+ box-sizing: border-box;
529
+ margin: 0;
530
+ padding: 1px 3px;
531
+ border: 2px solid var(--doc-primary);
532
+ outline: none;
533
+ resize: none;
534
+ overflow: hidden;
535
+ field-sizing: content;
536
+ max-width: 100%;
537
+ background: var(--doc-surface);
538
+ color: var(--doc-text);
539
+ font-family: inherit;
540
+ line-height: 1.2;
541
+ white-space: pre;
542
+ }
543
+ .xlsx-cell-editor[hidden] {
544
+ display: none;
545
+ }
546
+ /* The edited cell is out of the window: the editor keeps the focus and the text, unseen. */
547
+ .xlsx-cell-editor[data-offscreen] {
548
+ opacity: 0;
549
+ pointer-events: none;
550
+ }
551
+ .xlsx-heads,
552
+ .xlsx-corner {
553
+ position: absolute;
554
+ overflow: hidden;
555
+ background: var(--doc-bg-subtle);
556
+ color: var(--doc-text-muted);
557
+ }
558
+ .xlsx-corner {
559
+ border-right: 1px solid var(--doc-border-dark);
560
+ border-bottom: 1px solid var(--doc-border-dark);
561
+ }
562
+ .xlsx-head {
563
+ position: absolute;
564
+ display: flex;
565
+ align-items: center;
566
+ justify-content: center;
567
+ border-right: 1px solid var(--doc-border);
568
+ border-bottom: 1px solid var(--doc-border);
569
+ white-space: nowrap;
570
+ overflow: hidden;
571
+ }
572
+ .xlsx-head-selected {
573
+ background: var(--doc-primary-light);
574
+ color: var(--doc-primary);
575
+ font-weight: 600;
576
+ }
577
+ /* A heading edge under the pointer, and the guide line of a resize drag (grid-resize.ts). */
578
+ .xlsx-stage[data-resize='columns'] {
579
+ cursor: col-resize;
580
+ }
581
+ .xlsx-stage[data-resize='rows'] {
582
+ cursor: row-resize;
583
+ }
584
+ .xlsx-resize-guide {
585
+ position: absolute;
586
+ z-index: 4;
587
+ pointer-events: none;
588
+ background: var(--doc-primary);
589
+ }
590
+ .xlsx-live {
591
+ position: absolute;
592
+ width: 1px;
593
+ height: 1px;
594
+ overflow: hidden;
595
+ clip-path: inset(50%);
596
+ white-space: nowrap;
597
+ }
598
+ /* The cue of the armed exit from the grid (`grid-exit.ts`): a pill over the foot of the grid,
599
+ after DOCX Editor's header and footer edit hint. It never takes the pointer. It takes the
600
+ tooltip colors, which stay opaque in both themes, because the workbook under it is not
601
+ themed. */
602
+ .xlsx-exit-cue {
603
+ position: absolute;
604
+ z-index: 5;
605
+ bottom: 24px;
606
+ inset-inline: 0;
607
+ width: max-content;
608
+ max-width: calc(100% - 32px);
609
+ margin-inline: auto;
610
+ padding: 2px 10px;
611
+ border-radius: var(--doc-radius-pill, 999px);
612
+ background: var(--doc-tooltip-bg);
613
+ color: var(--doc-tooltip-text);
614
+ font-family: var(
615
+ --doc-font-ui,
616
+ -apple-system,
617
+ BlinkMacSystemFont,
618
+ 'Segoe UI',
619
+ Roboto,
620
+ 'Helvetica Neue',
621
+ Arial,
622
+ sans-serif
623
+ );
624
+ font-size: 12px;
625
+ line-height: 1.6;
626
+ text-align: center;
627
+ pointer-events: none;
628
+ user-select: none;
629
+ -webkit-user-select: none;
630
+ opacity: 0;
631
+ visibility: hidden;
632
+ transition:
633
+ opacity 0.1s ease,
634
+ visibility 0.1s;
635
+ }
636
+ .xlsx-exit-cue[data-shown] {
637
+ opacity: 1;
638
+ visibility: visible;
639
+ }
640
+ @media (prefers-reduced-motion: reduce) {
641
+ .xlsx-exit-cue {
642
+ transition: none;
643
+ }
644
+ }
645
+
646
+ /* ============================================================================
647
+ * VIEWER CHROME (adapters: formula bar, sheet tabs, zoom, status)
648
+ * ============================================================================ */
649
+ .xlsx-formula-bar {
650
+ display: flex;
651
+ align-items: center;
652
+ gap: 8px;
653
+ padding: 4px 8px;
654
+ background: var(--doc-surface);
655
+ border-bottom: 1px solid var(--doc-border);
656
+ }
657
+ .xlsx-name-box,
658
+ .xlsx-cell-content-box {
659
+ box-sizing: border-box;
660
+ height: 26px;
661
+ border: 1px solid var(--doc-border-input);
662
+ border-radius: var(--doc-radius-control, 7px);
663
+ background: var(--doc-bg-input);
664
+ color: var(--doc-text);
665
+ }
666
+ .xlsx-name-box,
667
+ .xlsx-cell-content {
668
+ margin: 0;
669
+ padding: 0 8px;
670
+ font: inherit;
671
+ /* One line fills the box, so a scrolled field never shows a part of another line. */
672
+ line-height: 24px;
673
+ }
674
+ .xlsx-name-box {
675
+ flex: 0 0 auto;
676
+ width: 104px;
677
+ font-variant-numeric: tabular-nums;
678
+ }
679
+ /* The box draws the border of the content field, so the line count sits beside the text
680
+ * area and never over its text. A press anywhere in the box puts the caret in the field, so
681
+ * the box shows the text cursor. */
682
+ .xlsx-cell-content-box {
683
+ display: flex;
684
+ align-items: center;
685
+ flex: 1 1 auto;
686
+ min-width: 0;
687
+ cursor: text;
688
+ }
689
+ /* A one-row text area: it keeps the line breaks of a cell's text, and shows one row of it. */
690
+ .xlsx-cell-content {
691
+ box-sizing: border-box;
692
+ flex: 1 1 auto;
693
+ min-width: 0;
694
+ height: 24px;
695
+ border: 0;
696
+ background: transparent;
697
+ color: inherit;
698
+ outline: none;
699
+ resize: none;
700
+ overflow: hidden;
701
+ white-space: pre;
702
+ }
703
+ .xlsx-name-box:focus-visible,
704
+ .xlsx-cell-content-box:has(.xlsx-cell-content:focus-visible) {
705
+ outline: 2px solid var(--doc-focus-ring);
706
+ outline-offset: -1px;
707
+ border-color: var(--doc-primary);
708
+ }
709
+ .xlsx-name-box[aria-invalid='true'],
710
+ .xlsx-cell-content-box:has(.xlsx-cell-content[aria-invalid='true']) {
711
+ border-color: var(--doc-error);
712
+ outline-color: var(--doc-error);
713
+ }
714
+ .xlsx-cell-content-box:has(.xlsx-cell-content[readonly]) {
715
+ background: var(--doc-bg-subtle);
716
+ color: var(--doc-text-muted);
717
+ cursor: default;
718
+ }
719
+ .xlsx-cell-content[readonly] {
720
+ cursor: default;
721
+ }
722
+ /* The line count of a text with more than one line: the field shows one line at a time. */
723
+ .xlsx-cell-content-lines {
724
+ flex: 0 0 auto;
725
+ padding: 0 8px 0 4px;
726
+ color: var(--doc-text-muted);
727
+ font-size: 12px;
728
+ white-space: nowrap;
729
+ pointer-events: none;
730
+ }
731
+ /* The note of a shortened text gives way in a narrow bar: it ends in an ellipsis, its title
732
+ holds the complete note, and the field keeps room for a few characters. */
733
+ .xlsx-cell-content-note {
734
+ flex: 0 1 auto;
735
+ min-width: 0;
736
+ overflow: hidden;
737
+ text-overflow: ellipsis;
738
+ }
739
+ .xlsx-cell-content-box:has(.xlsx-cell-content-note) .xlsx-cell-content {
740
+ min-width: 64px;
741
+ }
742
+ .xlsx-footer {
743
+ display: flex;
744
+ align-items: center;
745
+ gap: 8px;
746
+ min-height: 34px;
747
+ padding: 0 8px;
748
+ background: var(--doc-surface);
749
+ border-top: 1px solid var(--doc-border);
750
+ }
751
+ .xlsx-sheet-bar {
752
+ position: relative;
753
+ display: flex;
754
+ align-items: center;
755
+ flex: 1 1 auto;
756
+ min-width: 0;
757
+ gap: 2px;
758
+ }
759
+ .xlsx-sheet-tabs {
760
+ display: flex;
761
+ flex: 0 1 auto;
762
+ min-width: 0;
763
+ gap: 2px;
764
+ overflow-x: auto;
765
+ scrollbar-width: thin;
766
+ }
767
+ .xlsx-sheet-tab {
768
+ flex: 0 0 auto;
769
+ max-width: 200px;
770
+ padding: 6px 12px;
771
+ border: 0;
772
+ border-radius: var(--doc-radius-control, 7px);
773
+ background: transparent;
774
+ color: var(--doc-text-muted);
775
+ font: inherit;
776
+ white-space: nowrap;
777
+ overflow: hidden;
778
+ text-overflow: ellipsis;
779
+ cursor: pointer;
780
+ }
781
+ .xlsx-sheet-tab:hover {
782
+ background: var(--doc-bg-hover);
783
+ color: var(--doc-text);
784
+ }
785
+ .xlsx-sheet-tab[aria-selected='true'] {
786
+ background: var(--doc-primary-light);
787
+ color: var(--doc-primary);
788
+ font-weight: 600;
789
+ }
790
+ .xlsx-sheet-add {
791
+ display: inline-flex;
792
+ align-items: center;
793
+ justify-content: center;
794
+ flex: 0 0 auto;
795
+ width: 28px;
796
+ height: 28px;
797
+ padding: 0;
798
+ border: 0;
799
+ border-radius: var(--doc-radius-pill, 999px);
800
+ background: transparent;
801
+ color: var(--doc-text-muted);
802
+ cursor: pointer;
803
+ }
804
+ .xlsx-sheet-add:hover {
805
+ background: var(--doc-bg-hover);
806
+ color: var(--doc-text);
807
+ }
808
+ .xlsx-sheet-add svg {
809
+ width: 18px;
810
+ height: 18px;
811
+ fill: currentColor;
812
+ }
813
+ .xlsx-sheet-tab-renaming {
814
+ visibility: hidden;
815
+ }
816
+ .xlsx-sheet-rename {
817
+ position: absolute;
818
+ top: 50%;
819
+ z-index: 1;
820
+ box-sizing: border-box;
821
+ transform: translateY(-50%);
822
+ padding: 5px 11px;
823
+ border: 1px solid var(--doc-primary);
824
+ border-radius: var(--doc-radius-control, 7px);
825
+ background: var(--doc-surface);
826
+ color: var(--doc-text);
827
+ font: inherit;
828
+ }
829
+ .xlsx-sheet-menu {
830
+ position: absolute;
831
+ bottom: calc(100% + 4px);
832
+ z-index: var(--doc-z-overlay);
833
+ display: flex;
834
+ flex-direction: column;
835
+ min-width: 160px;
836
+ padding: 4px;
837
+ background: var(--doc-popover-bg);
838
+ color: var(--doc-popover-fg);
839
+ border: 1px solid var(--doc-border);
840
+ border-radius: var(--doc-radius-panel, 12px);
841
+ box-shadow: var(--doc-card-shadow-strong);
842
+ }
843
+ .xlsx-sheet-menu-item {
844
+ min-height: 32px;
845
+ padding: 4px 8px;
846
+ border: 0;
847
+ border-radius: var(--doc-radius-control, 6px);
848
+ background: transparent;
849
+ color: inherit;
850
+ font: inherit;
851
+ text-align: left;
852
+ cursor: pointer;
853
+ }
854
+ .xlsx-sheet-menu-item:hover:not([aria-disabled]),
855
+ .xlsx-sheet-menu-item:focus-visible {
856
+ background: var(--doc-bg-hover);
857
+ }
858
+ .xlsx-sheet-menu-item[aria-disabled] {
859
+ color: var(--doc-text-subtle);
860
+ cursor: default;
861
+ }
862
+ .xlsx-sheet-rename:focus-visible,
863
+ .xlsx-sheet-add:focus-visible,
864
+ .xlsx-sheet-menu-item:focus-visible,
865
+ .xlsx-sheet-tab:focus-visible,
866
+ .xlsx-zoom button:focus-visible {
867
+ outline: 2px solid var(--doc-focus-ring);
868
+ outline-offset: 1px;
869
+ }
870
+ .xlsx-zoom {
871
+ display: flex;
872
+ align-items: center;
873
+ gap: 2px;
874
+ flex: 0 0 auto;
875
+ }
876
+ .xlsx-zoom button {
877
+ display: inline-flex;
878
+ align-items: center;
879
+ justify-content: center;
880
+ width: 28px;
881
+ height: 28px;
882
+ padding: 0;
883
+ border: 0;
884
+ border-radius: var(--doc-radius-pill, 999px);
885
+ background: transparent;
886
+ color: var(--doc-text-muted);
887
+ cursor: pointer;
888
+ }
889
+ .xlsx-zoom button:hover:not([aria-disabled='true']) {
890
+ background: var(--doc-bg-hover);
891
+ color: var(--doc-text);
892
+ }
893
+ .xlsx-zoom button[aria-disabled='true'] {
894
+ color: var(--doc-text-subtle);
895
+ cursor: default;
896
+ }
897
+ .xlsx-zoom svg {
898
+ width: 18px;
899
+ height: 18px;
900
+ fill: currentColor;
901
+ }
902
+ .xlsx-zoom-level {
903
+ min-width: 48px;
904
+ text-align: center;
905
+ font-variant-numeric: tabular-nums;
906
+ color: var(--doc-text);
907
+ }
908
+ /* The status strip: one line above the grid, present while a workbook is ready and empty when
909
+ there is no message, so nothing covers the grid. A refusal shows in full on its own row, in
910
+ every layout, and the strip grows while it shows; the catalog keeps each refusal text short,
911
+ and a name in it is cut to 64 characters. The notices go on the next row. */
912
+ .xlsx-status-strip {
913
+ display: flex;
914
+ flex-wrap: wrap;
915
+ flex: none;
916
+ min-height: 28px;
917
+ overflow: hidden;
918
+ background: var(--doc-bg);
919
+ border-bottom: 1px solid var(--doc-border);
920
+ box-sizing: border-box;
921
+ }
922
+ .xlsx-refusal,
923
+ .xlsx-notice {
924
+ position: relative;
925
+ min-width: 0;
926
+ padding: 0 12px;
927
+ line-height: 27px;
928
+ white-space: nowrap;
929
+ overflow: hidden;
930
+ text-overflow: ellipsis;
931
+ }
932
+ .xlsx-refusal {
933
+ flex: 1 1 100%;
934
+ padding: 5px 12px;
935
+ line-height: 18px;
936
+ white-space: normal;
937
+ overflow-wrap: anywhere;
938
+ background: var(--doc-error-bg);
939
+ color: var(--doc-error);
940
+ }
941
+ .xlsx-notice {
942
+ flex: 1 1 auto;
943
+ background: var(--doc-warning-bg);
944
+ color: var(--doc-warning-text);
945
+ }
946
+ /* A notice that shows alone shows its full text, and wraps when the strip is too narrow for it,
947
+ as at phone width. A notice beside another message shows its short text on one line. */
948
+ .xlsx-notice:not([data-short]) {
949
+ padding: 5px 12px;
950
+ line-height: 18px;
951
+ white-space: normal;
952
+ }
953
+ .xlsx-refusal ~ .xlsx-notice:not(:empty) {
954
+ border-top: 1px solid var(--doc-border);
955
+ }
956
+ /* A notice shows its full text, or, with `data-short`, its brief text. The full text stays in
957
+ the live node, visually hidden inside the notice, so the announced text does not change. */
958
+ .xlsx-notice-brief {
959
+ display: none;
960
+ }
961
+ .xlsx-notice[data-short] .xlsx-notice-brief {
962
+ display: inline;
963
+ }
964
+ .xlsx-notice[data-short] .xlsx-notice-full {
965
+ position: absolute;
966
+ width: 1px;
967
+ height: 1px;
968
+ overflow: hidden;
969
+ clip-path: inset(50%);
970
+ white-space: nowrap;
971
+ }
972
+ /* Each shown notice after another shown notice, also with an empty notice between them. */
973
+ .xlsx-notice:not(:empty) ~ .xlsx-notice:not(:empty) {
974
+ flex: 0 0 auto;
975
+ border-left: 1px solid var(--doc-border);
976
+ }
977
+ /* The stale notice is a status node that stays mounted; empty, it takes no room. */
978
+ .xlsx-notice:empty {
979
+ flex: 0 0 0;
980
+ padding: 0;
981
+ border: 0;
982
+ background: none;
983
+ }
984
+ /* In a narrow editor, such as at phone width, each notice under a refusal takes its own row. */
985
+ @container xlsx-editor (max-width: 599px) {
986
+ .xlsx-refusal ~ .xlsx-notice:not(:empty) {
987
+ flex: 1 1 100%;
988
+ border-left: 0;
989
+ }
990
+ /* A later notice, also with no refusal: its own row, with a line above it. */
991
+ .xlsx-notice:not(:empty) ~ .xlsx-notice:not(:empty) {
992
+ flex: 1 1 100%;
993
+ border-left: 0;
994
+ border-top: 1px solid var(--doc-border);
995
+ }
996
+ }
997
+ .xlsx-message {
998
+ margin: auto;
999
+ padding: 24px;
1000
+ max-width: 480px;
1001
+ text-align: center;
1002
+ color: var(--doc-text-muted);
1003
+ }
1004
+ .xlsx-message [role='alert'],
1005
+ .xlsx-message-refusal {
1006
+ color: var(--doc-error);
1007
+ }
1008
+ .xlsx-message-refusal {
1009
+ margin-top: 8px;
1010
+ }
1011
+ .xlsx-canvas-idle {
1012
+ display: none;
1013
+ }
1014
+
1015
+ /* ============================================================================
1016
+ * TOOLBAR (adapters: the chrome registry of core `editor/chrome-controls.ts`)
1017
+ * One row that measures itself; the groups that do not fit move into the
1018
+ * "More" panel as full-width rows. Swatch colors come from core constants or
1019
+ * a checked six-digit hex as inline style; every other color is a token.
1020
+ * The separators, the control states, the picker fields, the caret, and the list rows take the
1021
+ * values of pptx-editor/packages/core/src/styles/editor.css at d4502552 (EigenPal): the
1022
+ * `.pptx-toolbar__sep`, `.pptx-toolbar__button`, `.pptx-toolbar__field`,
1023
+ * `.pptx-toolbar__caret`, `.pptx-menu__item`, and toolbar menu `.pptx-menu__check` rules.
1024
+ * Differences:
1025
+ * - The group draws the separator (`::before`), so the markup has no separator element.
1026
+ * - A button and a color trigger are at least 30px wide with 4px of side padding (PPTX Editor:
1027
+ * 30px and no padding), so a control with a caret grows, as `.pptx-toolbar__button--wide`.
1028
+ * - A disabled field fades as a button does (0.35, not 0.45).
1029
+ * - A host's own button in the bar keeps its own look when it is disabled: the rules name the
1030
+ * toolbar's own controls, as PPTX Editor's do. Forced colors give it `GrayText`.
1031
+ * - A selected list option has a check mark and no fill, so the fill marks only the hovered or
1032
+ * focused option. Forced colors keep the `Highlight` fill on it.
1033
+ * - The press scale is on buttons and color triggers only, as in PPTX Editor, and it stops under
1034
+ * reduced motion, as PPTX Editor's other buttons (`.pptx-button`) do.
1035
+ * - The font family and number format fields are 152px wide (PPTX Editor: 140px), so their
1036
+ * text keeps the 116px of room that it had before the 8px padding and the 14px caret. The
1037
+ * fields and the list rows set 13px text, as `.pptx-toolbar__field` and `.pptx-menu__item`
1038
+ * do (`font: inherit; font-size: 13px;`), so a host font size does not change them, and a
1039
+ * name such as Times New Roman (about 112px at 13px in the family font stack) fits.
1040
+ * - The font size field is a 72px list, not a stepper, so a size of 5 characters, such as
1041
+ * 10.25, fits beside its caret, as before. A longer size ends in an ellipsis.
1042
+ * - The list is at most 360px tall, so the 11 number formats show with no scroll.
1043
+ * - The controls of a group keep a 2px gap (PPTX Editor: 1px).
1044
+ * - List rows have a 20px line, so the 11 number formats fit in the list height with any UI
1045
+ * font.
1046
+ * - The "More" button comes before the block of a host's loose children, not after it, and no
1047
+ * line comes before the button. The bar charges the button a fixed 40px, which leaves no room
1048
+ * for a line.
1049
+ * The rows of a group menu and of the "More" panel (`.xlsx-toolbar-row`) take the 6px row
1050
+ * radius and keep their own padding (`4px 8px`, PPTX Editor: `6px 10px`) and gap (8px, PPTX
1051
+ * Editor: 10px). The 8px side padding lines the rows up with the panel headings and the
1052
+ * labelled field rows, and the reason line under a disabled row's label starts 26px in, the
1053
+ * 18px icon column and the 8px gap.
1054
+ * ============================================================================ */
1055
+ .xlsx-toolbar {
1056
+ display: flex;
1057
+ flex-wrap: wrap;
1058
+ align-items: center;
1059
+ gap: 2px;
1060
+ min-height: 40px;
1061
+ padding: 4px 8px;
1062
+ background: var(--doc-surface);
1063
+ border-bottom: 1px solid var(--doc-border);
1064
+ }
1065
+ .xlsx-toolbar[data-overflow] {
1066
+ flex-wrap: nowrap;
1067
+ }
1068
+ .xlsx-toolbar-group {
1069
+ display: flex;
1070
+ flex: 0 0 auto;
1071
+ align-items: center;
1072
+ gap: 2px;
1073
+ }
1074
+ /* A short line between two groups, centered on the controls. The block of a host's loose
1075
+ * children (`data-toolbar-fixed`) takes its line whenever it is not first, also after the
1076
+ * "More" button: the bar measures that block, so its width must not change with the button.
1077
+ * `:where` keeps the weight of the rule at one class, so a `::before` rule of a host group class
1078
+ * that comes after this stylesheet replaces the line. */
1079
+ .xlsx-toolbar-group:where(
1080
+ .xlsx-toolbar-group + .xlsx-toolbar-group:not([data-toolbar-fixed]),
1081
+ .xlsx-toolbar > [data-toolbar-fixed]:not(:first-child)
1082
+ )::before {
1083
+ content: '';
1084
+ flex: 0 0 auto;
1085
+ width: 1px;
1086
+ height: 18px;
1087
+ margin: 0 5px;
1088
+ background: var(--doc-border);
1089
+ }
1090
+ .xlsx-toolbar-button,
1091
+ .xlsx-toolbar-select,
1092
+ .xlsx-toolbar-color {
1093
+ display: inline-flex;
1094
+ align-items: center;
1095
+ justify-content: center;
1096
+ gap: 2px;
1097
+ height: 30px;
1098
+ min-width: 30px;
1099
+ padding: 0 4px;
1100
+ border: 0;
1101
+ border-radius: var(--doc-radius-control, 7px);
1102
+ background: transparent;
1103
+ color: var(--doc-text-muted);
1104
+ font: inherit;
1105
+ cursor: pointer;
1106
+ transition:
1107
+ background-color 0.15s ease,
1108
+ color 0.15s ease,
1109
+ transform 0.16s cubic-bezier(0.23, 1, 0.32, 1);
1110
+ }
1111
+ .xlsx-toolbar svg {
1112
+ width: 18px;
1113
+ height: 18px;
1114
+ flex: 0 0 auto;
1115
+ fill: currentColor;
1116
+ }
1117
+ .xlsx-toolbar button:hover:not(:disabled):not([aria-disabled='true']) {
1118
+ background: var(--doc-bg-hover);
1119
+ }
1120
+ /* A bar control's glyph is muted at rest and takes the text color on hover. A panel row keeps
1121
+ * its own color, so the active row stays marked. `:where` keeps this rule below a pressed
1122
+ * toggle's hover rule. */
1123
+ .xlsx-toolbar
1124
+ :where(.xlsx-toolbar-button, .xlsx-toolbar-select, .xlsx-toolbar-color):hover:not(:disabled):not(
1125
+ [aria-disabled='true']
1126
+ ) {
1127
+ color: var(--doc-text);
1128
+ }
1129
+ .xlsx-toolbar
1130
+ :is(.xlsx-toolbar-button, .xlsx-toolbar-color):active:not(:disabled):not([aria-disabled='true']) {
1131
+ transform: scale(0.94);
1132
+ }
1133
+ @media (prefers-reduced-motion: reduce) {
1134
+ .xlsx-toolbar :is(.xlsx-toolbar-button, .xlsx-toolbar-select, .xlsx-toolbar-color) {
1135
+ transition: none;
1136
+ }
1137
+ .xlsx-toolbar
1138
+ :is(.xlsx-toolbar-button, .xlsx-toolbar-color):active:not(:disabled):not(
1139
+ [aria-disabled='true']
1140
+ ) {
1141
+ transform: none;
1142
+ }
1143
+ }
1144
+ .xlsx-toolbar button:focus-visible,
1145
+ .xlsx-toolbar [role='option']:focus-visible {
1146
+ outline: 2px solid var(--doc-focus-ring);
1147
+ outline-offset: 1px;
1148
+ }
1149
+ .xlsx-toolbar button:disabled,
1150
+ .xlsx-toolbar button[aria-disabled='true'] {
1151
+ cursor: default;
1152
+ }
1153
+ /* Disabled controls, after the `.pptx-toolbar__button:disabled` and `.pptx-toolbar__field:disabled`
1154
+ * rules of pptx-editor/packages/core/src/styles/editor.css at d4502552 (EigenPal): one flat
1155
+ * selector for each control, which the forced-colors block repeats with the same weight. A
1156
+ * disabled button, field, or color trigger, in the bar or in a panel row, fades as a whole, with
1157
+ * its field border, and keeps its own text color under the fade. A menu row takes the subtle text
1158
+ * color and no fade (below), so the reason under its label stays readable. */
1159
+ .xlsx-toolbar-button:is(:disabled, [aria-disabled='true']),
1160
+ .xlsx-toolbar-select:is(:disabled, [aria-disabled='true']),
1161
+ .xlsx-toolbar-color:is(:disabled, [aria-disabled='true']) {
1162
+ opacity: 0.35;
1163
+ }
1164
+ /* A disabled control stays focusable. The fade must not fade its focus ring, after
1165
+ * `.pptx-editor [aria-disabled='true']:focus-visible` at the same commit. */
1166
+ .xlsx-toolbar [aria-disabled='true']:focus-visible {
1167
+ opacity: 1;
1168
+ color: var(--doc-text-subtle);
1169
+ }
1170
+ .xlsx-toolbar-button[data-active],
1171
+ .xlsx-toolbar
1172
+ button.xlsx-toolbar-button[data-active]:hover:not(:disabled):not([aria-disabled='true']) {
1173
+ background: var(--doc-toggle-active-bg);
1174
+ color: var(--doc-toggle-active-fg);
1175
+ }
1176
+ .xlsx-toolbar-select {
1177
+ justify-content: space-between;
1178
+ gap: 4px;
1179
+ padding: 0 8px;
1180
+ border: 1px solid var(--doc-border);
1181
+ background: var(--doc-surface);
1182
+ color: var(--doc-text);
1183
+ /* 13px whatever the host font size, as `.pptx-toolbar__field` in PPTX Editor. */
1184
+ font-size: 13px;
1185
+ }
1186
+ .xlsx-toolbar-select[aria-expanded='true'] {
1187
+ background: var(--doc-bg-hover);
1188
+ }
1189
+ .xlsx-toolbar-select-wide {
1190
+ width: 152px;
1191
+ }
1192
+ .xlsx-toolbar-select-narrow {
1193
+ width: 72px;
1194
+ }
1195
+ .xlsx-toolbar-select-text {
1196
+ overflow: hidden;
1197
+ white-space: nowrap;
1198
+ text-overflow: ellipsis;
1199
+ }
1200
+ /* The caret of a field or a menu button: a 14px icon at 60% of the text color. */
1201
+ .xlsx-toolbar svg.xlsx-toolbar-caret {
1202
+ width: 14px;
1203
+ height: 14px;
1204
+ opacity: 0.6;
1205
+ }
1206
+ .xlsx-toolbar-dropdown,
1207
+ .xlsx-toolbar-more {
1208
+ position: relative;
1209
+ display: inline-flex;
1210
+ align-items: center;
1211
+ }
1212
+ .xlsx-toolbar-color-icon {
1213
+ display: inline-flex;
1214
+ flex-direction: column;
1215
+ align-items: center;
1216
+ }
1217
+ .xlsx-toolbar-color-bar {
1218
+ width: 16px;
1219
+ height: 3px;
1220
+ margin-top: -2px;
1221
+ border: 1px solid var(--doc-border-dark);
1222
+ }
1223
+ .xlsx-toolbar-color-bar[data-none] {
1224
+ background: transparent;
1225
+ }
1226
+ .xlsx-toolbar-popup,
1227
+ .xlsx-toolbar-panel {
1228
+ position: absolute;
1229
+ top: calc(100% + 4px);
1230
+ left: 0;
1231
+ z-index: var(--doc-z-overlay);
1232
+ margin: 0;
1233
+ padding: 4px;
1234
+ list-style: none;
1235
+ background: var(--doc-popover-bg);
1236
+ color: var(--doc-popover-fg);
1237
+ border: 1px solid var(--doc-border);
1238
+ border-radius: var(--doc-radius-panel, 12px);
1239
+ box-shadow: var(--doc-card-shadow-strong);
1240
+ }
1241
+ .xlsx-toolbar-list-popup {
1242
+ min-width: 100%;
1243
+ }
1244
+ .xlsx-toolbar-list {
1245
+ margin: 0;
1246
+ padding: 0;
1247
+ list-style: none;
1248
+ /* Room for the 11 number formats at 32px a row, with no scroll. */
1249
+ max-height: 360px;
1250
+ overflow-y: auto;
1251
+ }
1252
+ .xlsx-toolbar-entry {
1253
+ box-sizing: border-box;
1254
+ width: 100%;
1255
+ min-width: 64px;
1256
+ height: 28px;
1257
+ margin-bottom: 4px;
1258
+ padding: 0 8px;
1259
+ border: 1px solid var(--doc-border-input);
1260
+ border-radius: var(--doc-radius-control, 7px);
1261
+ background: var(--doc-bg-input);
1262
+ color: var(--doc-text);
1263
+ font: inherit;
1264
+ }
1265
+ .xlsx-toolbar-entry:focus-visible {
1266
+ outline: 2px solid var(--doc-focus-ring);
1267
+ outline-offset: 1px;
1268
+ }
1269
+ .xlsx-toolbar-entry[aria-invalid='true'] {
1270
+ border-color: var(--doc-error);
1271
+ }
1272
+ .xlsx-toolbar-entry-error {
1273
+ max-width: 160px;
1274
+ margin-bottom: 4px;
1275
+ color: var(--doc-error);
1276
+ font-size: 12px;
1277
+ line-height: 16px;
1278
+ }
1279
+ .xlsx-toolbar-list [role='option'] {
1280
+ display: flex;
1281
+ align-items: center;
1282
+ gap: 10px;
1283
+ min-height: 32px;
1284
+ box-sizing: border-box;
1285
+ padding: 6px 10px;
1286
+ /* 13px whatever the host font size, as `.pptx-menu__item` in PPTX Editor. */
1287
+ font-size: 13px;
1288
+ /* A fixed line, so the 11 number formats fit in the list height with any UI font. */
1289
+ line-height: 20px;
1290
+ border-radius: var(--doc-radius-control, 6px);
1291
+ white-space: nowrap;
1292
+ cursor: pointer;
1293
+ }
1294
+ .xlsx-toolbar-list [role='option']:hover,
1295
+ .xlsx-toolbar-list [role='option']:focus {
1296
+ background: var(--doc-bg-hover);
1297
+ outline: none;
1298
+ }
1299
+ /* The selected option: a check mark at the end of the row, so it differs from the hovered or
1300
+ * focused option, which the fill marks. */
1301
+ .xlsx-toolbar svg.xlsx-toolbar-check {
1302
+ flex: none;
1303
+ margin-inline-start: auto;
1304
+ color: var(--doc-text-muted);
1305
+ }
1306
+ /* The current family of a stepped code: a mark at the start, not the check mark. */
1307
+ .xlsx-toolbar-list [role='option'][aria-current='true'] {
1308
+ box-shadow: inset 3px 0 0 var(--doc-primary);
1309
+ color: var(--doc-primary);
1310
+ }
1311
+ /* Each swatch is a 24px target (WCAG 2.5.8), after PPTX Editor's color menus. */
1312
+ .xlsx-toolbar-palette {
1313
+ display: grid;
1314
+ grid-template-columns: repeat(7, 24px);
1315
+ gap: 4px;
1316
+ }
1317
+ .xlsx-toolbar-swatch {
1318
+ width: 24px;
1319
+ height: 24px;
1320
+ padding: 0;
1321
+ border: 1px solid var(--doc-border-dark);
1322
+ /* A fixed corner, as on `.pptx-swatch`: a host control radius would round a small swatch. */
1323
+ border-radius: 4px;
1324
+ cursor: pointer;
1325
+ }
1326
+ .xlsx-toolbar-swatch[aria-selected='true'],
1327
+ .xlsx-toolbar-no-fill[aria-selected='true'] {
1328
+ outline: 2px solid var(--doc-primary);
1329
+ outline-offset: 1px;
1330
+ }
1331
+ .xlsx-toolbar-no-fill {
1332
+ grid-column: 1 / -1;
1333
+ height: 26px;
1334
+ border: 1px solid var(--doc-border-input);
1335
+ border-radius: var(--doc-radius-control, 7px);
1336
+ background: transparent;
1337
+ color: var(--doc-text);
1338
+ font: inherit;
1339
+ cursor: pointer;
1340
+ }
1341
+ .xlsx-toolbar-menu {
1342
+ min-width: 220px;
1343
+ }
1344
+ .xlsx-toolbar-row {
1345
+ display: flex;
1346
+ flex-wrap: wrap;
1347
+ align-items: center;
1348
+ gap: 8px;
1349
+ width: 100%;
1350
+ min-height: 32px;
1351
+ padding: 4px 8px;
1352
+ border: 0;
1353
+ border-radius: var(--doc-radius-control, 6px);
1354
+ background: transparent;
1355
+ color: var(--doc-text);
1356
+ font: inherit;
1357
+ text-align: start;
1358
+ cursor: pointer;
1359
+ }
1360
+ .xlsx-toolbar-row:not(:has(svg))::before {
1361
+ content: '';
1362
+ width: 18px;
1363
+ }
1364
+ .xlsx-toolbar-row[data-active] {
1365
+ background: var(--doc-primary-light);
1366
+ color: var(--doc-primary);
1367
+ }
1368
+ /* A disabled row of a group menu or of the "More" panel, after the refused toolbar menu row
1369
+ * (`.pptx-menu__item[aria-disabled='true']`) at d4502552: the subtle text color and no fade.
1370
+ * It comes after the active row, so a disabled row never shows as active. */
1371
+ .xlsx-toolbar-row:is(:disabled, [aria-disabled='true']) {
1372
+ color: var(--doc-text-subtle);
1373
+ }
1374
+ .xlsx-toolbar-reason {
1375
+ flex: 1 0 100%;
1376
+ padding-left: 26px;
1377
+ color: var(--doc-text-muted);
1378
+ font-size: 12px;
1379
+ }
1380
+ .xlsx-toolbar-more {
1381
+ margin-left: auto;
1382
+ }
1383
+ .xlsx-toolbar-panel {
1384
+ left: auto;
1385
+ right: 0;
1386
+ width: 280px;
1387
+ max-width: calc(100vw - 16px);
1388
+ max-height: 70vh;
1389
+ overflow-y: auto;
1390
+ }
1391
+ .xlsx-toolbar-section + .xlsx-toolbar-section {
1392
+ margin-top: 4px;
1393
+ padding-top: 4px;
1394
+ border-top: 1px solid var(--doc-border);
1395
+ }
1396
+ .xlsx-toolbar-heading {
1397
+ display: block;
1398
+ padding: 4px 8px;
1399
+ color: var(--doc-text-muted);
1400
+ font-size: 12px;
1401
+ font-weight: 600;
1402
+ }
1403
+ .xlsx-toolbar-labelled {
1404
+ display: flex;
1405
+ justify-content: space-between;
1406
+ gap: 8px;
1407
+ width: 100%;
1408
+ padding: 2px 8px;
1409
+ }
1410
+ .xlsx-toolbar-row-label {
1411
+ color: var(--doc-text);
1412
+ }
1413
+ .xlsx-toolbar-popup[data-align='end'] {
1414
+ left: auto;
1415
+ right: 0;
1416
+ }
1417
+ .xlsx-toolbar-popup[data-side='top'] {
1418
+ top: auto;
1419
+ bottom: calc(100% + 4px);
1420
+ }
1421
+ /* A popup inside the overflow panel renders in flow, so the panel's scroll box never clips
1422
+ * it: it takes a row of its own under its trigger. */
1423
+ .xlsx-toolbar-labelled {
1424
+ flex-wrap: wrap;
1425
+ }
1426
+ /* In a panel row, a wide field takes the room beside its label, up to its own width, so the
1427
+ * row does not wrap. Its text ends in an ellipsis when the room is short. */
1428
+ .xlsx-toolbar-labelled > .xlsx-toolbar-select-wide {
1429
+ flex: 1 1 0;
1430
+ min-width: 30px;
1431
+ max-width: 152px;
1432
+ }
1433
+ .xlsx-toolbar-popup[data-inline] {
1434
+ position: static;
1435
+ flex: 1 0 100%;
1436
+ box-shadow: none;
1437
+ }
1438
+ /* A popup in the overflow panel, or a popup capped to its room, scrolls inside itself. */
1439
+ .xlsx-toolbar-popup[data-inline],
1440
+ .xlsx-toolbar-popup[data-capped] {
1441
+ overflow-y: auto;
1442
+ overscroll-behavior: contain;
1443
+ }
1444
+ /* A capped popup is the one scroller: the list inside it does not scroll again. */
1445
+ .xlsx-toolbar-popup[data-capped] .xlsx-toolbar-list {
1446
+ max-height: none;
1447
+ overflow-y: visible;
1448
+ }
1449
+
1450
+ /* The last item of the number format list: it opens the number format dialog. */
1451
+ .xlsx-toolbar-list-more {
1452
+ display: flex;
1453
+ align-items: center;
1454
+ box-sizing: border-box;
1455
+ width: 100%;
1456
+ min-height: 32px;
1457
+ margin-top: 4px;
1458
+ padding: 6px 10px;
1459
+ border: 0;
1460
+ border-top: 1px solid var(--doc-border);
1461
+ border-radius: 0 0 var(--doc-radius-control, 6px) var(--doc-radius-control, 6px);
1462
+ background: transparent;
1463
+ color: inherit;
1464
+ font: inherit;
1465
+ font-size: 13px;
1466
+ text-align: start;
1467
+ white-space: nowrap;
1468
+ cursor: pointer;
1469
+ }
1470
+ .xlsx-toolbar-list-more:hover,
1471
+ .xlsx-toolbar-list-more:focus {
1472
+ background: var(--doc-bg-hover);
1473
+ outline: none;
1474
+ }
1475
+ .xlsx-toolbar-list-more[aria-disabled='true'] {
1476
+ color: var(--doc-text-subtle);
1477
+ cursor: default;
1478
+ }
1479
+
1480
+ /* Editor dialogs, after docx-editor/packages/core/src/styles/editor.css at 03735f11 (the
1481
+ `.docx-dialog` rules): a native modal `dialog` panel with bordered inputs, a filled primary
1482
+ button, and an outlined secondary one. Every rule is anchored to `.xlsx-editor` with exactly
1483
+ two-class specificity, and state pseudo-classes sit inside `:where()`, so a host reset (one
1484
+ that sets `border-width: 0` on `*`) does not strip the controls, and a host override with
1485
+ two classes loaded after this sheet wins. Differences: the class prefix is `xlsx-dialog`;
1486
+ only the parts of the number format dialog are here; the panel is at most 440px wide, not
1487
+ 480px, for its one code field; `height: fit-content` keeps a host's `dialog` height reset
1488
+ from stretching it; and a closed panel (`:not([open])`) is hidden, for a frame that a test
1489
+ environment opens with the `open` attribute. */
1490
+ .xlsx-editor .xlsx-dialog,
1491
+ .xlsx-editor.xlsx-dialog {
1492
+ position: fixed;
1493
+ inset: 0;
1494
+ margin: auto;
1495
+ box-sizing: border-box;
1496
+ width: calc(100vw - 40px);
1497
+ max-width: 440px;
1498
+ height: fit-content;
1499
+ max-height: 90dvh;
1500
+ padding: 0;
1501
+ overflow: hidden;
1502
+ color: var(--doc-text);
1503
+ background: var(--doc-surface);
1504
+ border: 1px solid var(--doc-border);
1505
+ border-radius: var(--doc-dialog-radius, 8px);
1506
+ box-shadow:
1507
+ 0 12px 32px var(--doc-shadow),
1508
+ 0 2px 6px var(--doc-shadow-subtle);
1509
+ font: var(--doc-dialog-font-size, 13px) / 1.5
1510
+ var(--doc-dialog-font-family, var(--doc-font-ui, system-ui, sans-serif));
1511
+ }
1512
+ .xlsx-editor .xlsx-dialog:where(:not([open])),
1513
+ .xlsx-editor.xlsx-dialog:where(:not([open])) {
1514
+ display: none;
1515
+ }
1516
+ .xlsx-editor .xlsx-dialog[open],
1517
+ .xlsx-editor.xlsx-dialog[open] {
1518
+ display: flex;
1519
+ flex-direction: column;
1520
+ }
1521
+ .xlsx-editor .xlsx-dialog::backdrop,
1522
+ .xlsx-editor.xlsx-dialog::backdrop {
1523
+ background: var(--doc-overlay);
1524
+ }
1525
+ .xlsx-editor .xlsx-dialog__header {
1526
+ flex-shrink: 0;
1527
+ padding-block: 20px 4px;
1528
+ padding-inline: var(--doc-dialog-padding, 24px);
1529
+ }
1530
+ .xlsx-editor .xlsx-dialog__title {
1531
+ margin: 0;
1532
+ font-size: 1.385em;
1533
+ font-weight: 600;
1534
+ line-height: 1.3;
1535
+ color: var(--doc-text);
1536
+ }
1537
+ .xlsx-editor .xlsx-dialog__body {
1538
+ display: flex;
1539
+ flex-direction: column;
1540
+ gap: 6px;
1541
+ min-height: 0;
1542
+ padding-block: 12px 8px;
1543
+ padding-inline: var(--doc-dialog-padding, 24px);
1544
+ overflow-y: auto;
1545
+ }
1546
+ /* On a short viewport the body scrolls; its parts keep their size. */
1547
+ .xlsx-editor .xlsx-dialog__body > * {
1548
+ flex-shrink: 0;
1549
+ }
1550
+ .xlsx-editor .xlsx-dialog__label {
1551
+ margin-top: 6px;
1552
+ font-weight: 500;
1553
+ color: var(--doc-text);
1554
+ }
1555
+ .xlsx-editor .xlsx-dialog__hint {
1556
+ margin: 0;
1557
+ font-size: 0.92em;
1558
+ line-height: 1.4;
1559
+ color: var(--doc-text-muted);
1560
+ }
1561
+ .xlsx-editor .xlsx-dialog__input,
1562
+ .xlsx-editor .xlsx-dialog__list {
1563
+ box-sizing: border-box;
1564
+ width: 100%;
1565
+ min-width: 0;
1566
+ margin: 0;
1567
+ font: inherit;
1568
+ font-family: ui-monospace, monospace;
1569
+ color: var(--doc-text);
1570
+ background: var(--doc-surface);
1571
+ border: 1px solid var(--doc-border-input);
1572
+ border-radius: var(--doc-dialog-control-radius, 4px);
1573
+ outline: none;
1574
+ }
1575
+ .xlsx-editor .xlsx-dialog__input {
1576
+ height: 32px;
1577
+ padding: 0 8px;
1578
+ line-height: 30px;
1579
+ }
1580
+ .xlsx-editor .xlsx-dialog__list {
1581
+ padding: 2px;
1582
+ }
1583
+ .xlsx-editor .xlsx-dialog__input:where(:hover),
1584
+ .xlsx-editor .xlsx-dialog__list:where(:hover) {
1585
+ border-color: var(--doc-border-dark);
1586
+ }
1587
+ .xlsx-editor .xlsx-dialog__input:where(:focus, :focus-visible),
1588
+ .xlsx-editor .xlsx-dialog__list:where(:focus, :focus-visible) {
1589
+ border-color: var(--doc-primary);
1590
+ box-shadow: 0 0 0 1px var(--doc-primary);
1591
+ /* Forced-colors mode drops the box shadow and draws this outline in its focus color. */
1592
+ outline: 2px solid transparent;
1593
+ }
1594
+ .xlsx-editor .xlsx-dialog__input:where([aria-invalid='true']) {
1595
+ border-color: var(--doc-danger);
1596
+ }
1597
+ .xlsx-editor .xlsx-dialog__input:where([aria-invalid='true']:focus) {
1598
+ box-shadow: 0 0 0 1px var(--doc-danger);
1599
+ }
1600
+ @media (forced-colors: active) {
1601
+ /* The state does not depend on color: an invalid field has a thicker border. */
1602
+ .xlsx-editor .xlsx-dialog__input:where([aria-invalid='true']) {
1603
+ border-width: 2px;
1604
+ }
1605
+ }
1606
+ .xlsx-editor .xlsx-dialog__preview {
1607
+ display: flex;
1608
+ align-items: center;
1609
+ gap: 8px;
1610
+ min-height: 32px;
1611
+ margin-top: 6px;
1612
+ padding: 6px 8px;
1613
+ box-sizing: border-box;
1614
+ background: var(--doc-bg-subtle);
1615
+ border-radius: var(--doc-dialog-control-radius, 4px);
1616
+ }
1617
+ .xlsx-editor .xlsx-dialog__preview:where([hidden]) {
1618
+ display: none;
1619
+ }
1620
+ .xlsx-editor .xlsx-dialog__preview-label {
1621
+ flex: 0 1 auto;
1622
+ color: var(--doc-text-muted);
1623
+ }
1624
+ /* The value as the canvas paints the cell: its own colors, which the theme does not change. */
1625
+ .xlsx-editor .xlsx-dialog__preview-value {
1626
+ flex: 1 1 auto;
1627
+ min-width: 0;
1628
+ padding: 2px 6px;
1629
+ overflow: hidden;
1630
+ text-overflow: ellipsis;
1631
+ white-space: pre;
1632
+ /* One line also when the code shows no text, so the box looks like an empty cell. */
1633
+ min-height: calc(1lh + 6px);
1634
+ box-sizing: border-box;
1635
+ color: var(--doc-page-text);
1636
+ background: var(--doc-canvas-bg);
1637
+ border: 1px solid var(--doc-border);
1638
+ }
1639
+ .xlsx-editor .xlsx-dialog__preview-value:where([data-problem]) {
1640
+ white-space: normal;
1641
+ color: var(--doc-danger);
1642
+ background: transparent;
1643
+ /* No border, not a transparent one: forced colors would draw it as a value box. The padding
1644
+ grows by the border width, so the size stays. */
1645
+ border-style: none;
1646
+ padding: 3px 7px;
1647
+ }
1648
+ .xlsx-editor .xlsx-dialog__footer {
1649
+ display: flex;
1650
+ flex-shrink: 0;
1651
+ flex-wrap: wrap;
1652
+ align-items: center;
1653
+ justify-content: flex-end;
1654
+ gap: 8px;
1655
+ padding-block: 12px 20px;
1656
+ padding-inline: var(--doc-dialog-padding, 24px);
1657
+ }
1658
+ .xlsx-editor .xlsx-dialog__error {
1659
+ margin: 0;
1660
+ font-size: 0.92em;
1661
+ line-height: 1.4;
1662
+ color: var(--doc-danger);
1663
+ }
1664
+ .xlsx-editor .xlsx-dialog__error:where(:empty) {
1665
+ display: none;
1666
+ }
1667
+ .xlsx-editor .xlsx-dialog__button {
1668
+ display: inline-flex;
1669
+ align-items: center;
1670
+ justify-content: center;
1671
+ box-sizing: border-box;
1672
+ height: 32px;
1673
+ min-width: 72px;
1674
+ margin: 0;
1675
+ padding: 0 16px;
1676
+ font: inherit;
1677
+ font-weight: 500;
1678
+ line-height: 1;
1679
+ white-space: nowrap;
1680
+ color: var(--doc-text);
1681
+ background: var(--doc-surface);
1682
+ border: 1px solid var(--doc-border-input);
1683
+ border-radius: var(--doc-dialog-control-radius, 4px);
1684
+ cursor: pointer;
1685
+ appearance: none;
1686
+ }
1687
+ .xlsx-editor .xlsx-dialog__button:where(:hover) {
1688
+ background: var(--doc-bg-hover);
1689
+ border-color: var(--doc-border-dark);
1690
+ }
1691
+ .xlsx-editor .xlsx-dialog__button:where(:focus-visible) {
1692
+ /* The primary color, not the translucent focus ring: 3:1 on the dialog surface. */
1693
+ outline: 2px solid var(--doc-primary);
1694
+ outline-offset: 1px;
1695
+ }
1696
+ .xlsx-editor .xlsx-dialog__button--primary {
1697
+ color: var(--doc-on-primary);
1698
+ background: var(--doc-primary);
1699
+ border-color: var(--doc-primary);
1700
+ }
1701
+ .xlsx-editor .xlsx-dialog__button--primary:where(:hover) {
1702
+ background: var(--doc-primary-hover);
1703
+ border-color: var(--doc-primary-hover);
1704
+ }
1705
+ @media (forced-colors: active) {
1706
+ /* After the button rules, so it wins: the default action keeps a thicker border. */
1707
+ .xlsx-editor .xlsx-dialog__button--primary {
1708
+ border-width: 2px;
1709
+ }
1710
+ /* The error text does not depend on color: it is bold. */
1711
+ .xlsx-editor .xlsx-dialog__error {
1712
+ font-weight: 600;
1713
+ }
1714
+ }
1715
+
1716
+ /* ============================================================================
1717
+ * FORCED COLORS (high contrast themes), after
1718
+ * pptx-editor/packages/core/src/styles/editor.css at d4502552 (EigenPal).
1719
+ * The browser replaces the chrome colors with the user's system colors and removes box
1720
+ * shadows. These rules draw each state with system colors: pressed, selected, and highlighted
1721
+ * controls in `Highlight`, focus rings in `Highlight`, disabled controls in `GrayText`, and the
1722
+ * grid's focus ring and selection, which a shadow or a tint drew, as outlines. A disabled
1723
+ * button, field, or color trigger keeps its 0.35 fade over `GrayText`, as in PPTX Editor; a
1724
+ * focused one does not fade. Color swatches
1725
+ * keep their colors. The workbook canvas is not chrome: it keeps the colors of the file, so the
1726
+ * marks over it are two-tone, as the pending copy edge is.
1727
+ * Differences from PPTX Editor: a focused list option or swatch gets a `CanvasText` ring, so it
1728
+ * differs from the selected one, which `Highlight` marks; a focused menu row gets a ring inside
1729
+ * its fill, so it differs from a hovered row; the selected swatch also gets a mark inside its
1730
+ * edge; the grid marks are two-tone; a disabled toggle has no pressed edge, because the
1731
+ * engine never reports a disabled toggle as pressed; the line between two toolbar groups
1732
+ * takes `CanvasText`, because forced colors draw a background in `Canvas`; and the focused
1733
+ * disabled rule covers the toolbar only (PPTX Editor: the whole editor), because the sheet tabs
1734
+ * and the sheet menu do not fade a disabled control.
1735
+ * ============================================================================ */
1736
+
1737
+ @media (forced-colors: active) {
1738
+ .xlsx-editor :focus-visible,
1739
+ .xlsx-toolbar button:focus-visible,
1740
+ .xlsx-toolbar [role='option']:focus-visible {
1741
+ outline-color: Highlight;
1742
+ }
1743
+ /* Forced colors draw a background in `Canvas`, so the group separator takes the text color. */
1744
+ .xlsx-toolbar-group:where(
1745
+ .xlsx-toolbar-group + .xlsx-toolbar-group:not([data-toolbar-fixed]),
1746
+ .xlsx-toolbar > [data-toolbar-fixed]:not(:first-child)
1747
+ )::before {
1748
+ background: CanvasText;
1749
+ }
1750
+ .xlsx-cell-content-box:has(.xlsx-cell-content:focus-visible) {
1751
+ outline-color: Highlight;
1752
+ }
1753
+
1754
+ /* The grid: a focus ring in place of the inset shadow. The selection and the active cell draw
1755
+ * a system-colored line with a `Canvas` line inside it, so they show on any cell fill: the
1756
+ * canvas paints the file's colors, also white cells in a dark theme. */
1757
+ .xlsx-surface:focus-within::after {
1758
+ box-shadow: none;
1759
+ outline: 2px solid Highlight;
1760
+ outline-offset: -2px;
1761
+ }
1762
+ .xlsx-selection-range,
1763
+ .xlsx-active-cell {
1764
+ forced-color-adjust: none;
1765
+ }
1766
+ .xlsx-selection-range {
1767
+ outline: 2px solid Highlight;
1768
+ outline-offset: -1px;
1769
+ box-shadow: inset 0 0 0 2px Canvas;
1770
+ }
1771
+ .xlsx-active-cell {
1772
+ border-color: Highlight;
1773
+ box-shadow: inset 0 0 0 1px Canvas;
1774
+ }
1775
+ .xlsx-surface:not(:focus-within) .xlsx-active-cell {
1776
+ border-color: CanvasText;
1777
+ }
1778
+ .xlsx-cell-editor {
1779
+ border-color: Highlight;
1780
+ }
1781
+
1782
+ /* Pressed toggles, the selected sheet tab, the selected list option, and the hovered or
1783
+ * focused menu row. The browser draws no text backplate here (`forced-color-adjust: none`),
1784
+ * so the text and icons take `HighlightText` on `Highlight`, and every part inside takes the
1785
+ * same text color. A disabled control never takes `Highlight`: `GrayText` on `Highlight` can
1786
+ * be unreadable. */
1787
+ .xlsx-toolbar-button:is([aria-pressed='true'], [data-active]):not([aria-disabled='true']),
1788
+ .xlsx-toolbar-row:is([aria-pressed='true'], [data-active]):not([aria-disabled='true']),
1789
+ .xlsx-sheet-tab[aria-selected='true'],
1790
+ .xlsx-toolbar-list [role='option'][aria-selected='true'],
1791
+ .xlsx-toolbar .xlsx-toolbar-no-fill[aria-selected='true'],
1792
+ .xlsx-toolbar-row[role='menuitem']:is(:hover, :focus-visible):not([aria-disabled='true']),
1793
+ .xlsx-sheet-menu-item:is(:hover, :focus-visible):not([aria-disabled]) {
1794
+ forced-color-adjust: none;
1795
+ background: Highlight;
1796
+ color: HighlightText;
1797
+ }
1798
+ /* The hover rules of the toolbar buttons outrank the state rules, so a hovered control in a
1799
+ * highlighted state repeats the state color here, with a higher specificity. */
1800
+ .xlsx-toolbar
1801
+ button:is(:hover, :focus-visible):not(:disabled):not([aria-disabled='true']):is(
1802
+ .xlsx-toolbar-row[role='menuitem'],
1803
+ .xlsx-toolbar-no-fill[aria-selected='true'],
1804
+ .xlsx-toolbar-button[aria-pressed='true'],
1805
+ .xlsx-toolbar-button[data-active],
1806
+ .xlsx-toolbar-row[aria-pressed='true'],
1807
+ .xlsx-toolbar-row[data-active]
1808
+ ) {
1809
+ forced-color-adjust: none;
1810
+ background: Highlight;
1811
+ color: HighlightText;
1812
+ }
1813
+ .xlsx-toolbar-button:is([aria-pressed='true'], [data-active]):not([aria-disabled='true']) *,
1814
+ .xlsx-toolbar-row:is([aria-pressed='true'], [data-active]):not([aria-disabled='true']) *,
1815
+ .xlsx-sheet-tab[aria-selected='true'] *,
1816
+ .xlsx-toolbar-list [role='option'][aria-selected='true'] *,
1817
+ .xlsx-toolbar-row[role='menuitem']:is(:hover, :focus-visible):not([aria-disabled='true']) * {
1818
+ color: inherit;
1819
+ fill: currentColor;
1820
+ }
1821
+ /* A focused menu row: a ring inside its fill, so it differs from a hovered row. */
1822
+ .xlsx-toolbar-row[role='menuitem']:focus-visible:not([aria-disabled='true']),
1823
+ .xlsx-sheet-menu-item:focus-visible:not([aria-disabled]) {
1824
+ outline: 2px solid HighlightText;
1825
+ outline-offset: -4px;
1826
+ }
1827
+ /* The hovered or focused list option, and the list-more item under it: a ring inside it, so
1828
+ * it differs from the selected option, which the fill marks. */
1829
+ .xlsx-toolbar-list [role='option']:is(:hover, :focus),
1830
+ .xlsx-toolbar-list-more:is(:hover, :focus):not([aria-disabled='true']) {
1831
+ outline: 2px solid CanvasText;
1832
+ outline-offset: -2px;
1833
+ }
1834
+ .xlsx-toolbar-list [role='option'][aria-selected='true']:is(:hover, :focus) {
1835
+ outline-color: HighlightText;
1836
+ }
1837
+ /* The current family of a stepped code: an edge at the start, in place of the shadow. The
1838
+ * padding gives up the width of the edge, so the text does not move. */
1839
+ .xlsx-toolbar-list [role='option'][aria-current='true'] {
1840
+ border-inline-start: 3px solid Highlight;
1841
+ padding-inline-start: 7px;
1842
+ }
1843
+ /* The focus ring covers 2px of the edge, so the edge grows by 2px under it. */
1844
+ .xlsx-toolbar-list [role='option'][aria-current='true']:is(:hover, :focus) {
1845
+ border-inline-start-width: 5px;
1846
+ padding-inline-start: 5px;
1847
+ }
1848
+ .xlsx-toolbar [aria-expanded='true'] {
1849
+ outline: 1px solid Highlight;
1850
+ }
1851
+ /* The tab strip scrolls, so it clips a ring outside a tab: the ring of a tab with its menu
1852
+ * open and the focus ring go inside, and on the selected tab they take the text color of its
1853
+ * fill. */
1854
+ .xlsx-sheet-tab[aria-expanded='true'] {
1855
+ outline: 1px solid Highlight;
1856
+ outline-offset: -2px;
1857
+ }
1858
+ .xlsx-sheet-tab[aria-selected='true'][aria-expanded='true'] {
1859
+ outline-color: HighlightText;
1860
+ }
1861
+ .xlsx-sheet-tab:focus-visible {
1862
+ outline-offset: -4px;
1863
+ }
1864
+ .xlsx-sheet-tab[aria-selected='true']:focus-visible {
1865
+ outline-color: HighlightText;
1866
+ }
1867
+
1868
+ /* Disabled controls: the system's disabled text color, including focused controls. Each
1869
+ * selector repeats a disabled rule of the normal styles with the same weight, so this later
1870
+ * rule wins. A faded control keeps its fade (0.35), as in PPTX Editor. */
1871
+ .xlsx-toolbar [aria-disabled='true']:focus-visible,
1872
+ .xlsx-toolbar button:is(:disabled, [aria-disabled='true']),
1873
+ .xlsx-toolbar-button:is(:disabled, [aria-disabled='true']),
1874
+ .xlsx-toolbar-select:is(:disabled, [aria-disabled='true']),
1875
+ .xlsx-toolbar-color:is(:disabled, [aria-disabled='true']),
1876
+ .xlsx-toolbar-row:is(:disabled, [aria-disabled='true']),
1877
+ .xlsx-toolbar-list-more[aria-disabled='true'],
1878
+ .xlsx-sheet-menu-item[aria-disabled],
1879
+ .xlsx-sheet-tab[aria-disabled='true'],
1880
+ .xlsx-sheet-add[aria-disabled='true'],
1881
+ .xlsx-zoom button[aria-disabled='true'] {
1882
+ color: GrayText;
1883
+ }
1884
+ .xlsx-toolbar-list-more[aria-disabled='true']:focus {
1885
+ outline: 2px solid GrayText;
1886
+ outline-offset: -2px;
1887
+ }
1888
+
1889
+ /* The exit cue: an edge, where its fill outlined it. */
1890
+ .xlsx-exit-cue {
1891
+ border: 1px solid CanvasText;
1892
+ }
1893
+
1894
+ /* Color swatches show the color they stand for, inside a system-colored edge. The selected
1895
+ * swatch gets a `Highlight` outline and a `Highlight` line inside its edge, with a `Canvas`
1896
+ * line between them and the color; the selected No fill gets the fill of a selected option.
1897
+ * Focus is a `CanvasText` ring in place of the outline, so it differs from the selected mark,
1898
+ * and the line inside keeps the selected mark while the swatch has focus. */
1899
+ .xlsx-toolbar-swatch,
1900
+ .xlsx-toolbar-color-bar {
1901
+ forced-color-adjust: none;
1902
+ border-color: CanvasText;
1903
+ }
1904
+ .xlsx-toolbar .xlsx-toolbar-swatch[aria-selected='true'] {
1905
+ outline: 3px solid Highlight;
1906
+ box-shadow:
1907
+ inset 0 0 0 2px Canvas,
1908
+ inset 0 0 0 4px Highlight;
1909
+ }
1910
+ .xlsx-toolbar .xlsx-toolbar-no-fill {
1911
+ border-color: CanvasText;
1912
+ }
1913
+ .xlsx-toolbar .xlsx-toolbar-no-fill[aria-selected='true'] {
1914
+ outline: none;
1915
+ border-color: CanvasText;
1916
+ }
1917
+ .xlsx-toolbar :is(.xlsx-toolbar-swatch, .xlsx-toolbar-no-fill):focus-visible {
1918
+ outline: 2px solid CanvasText;
1919
+ outline-offset: 1px;
1920
+ }
1921
+
1922
+ /* The selected row and column headings, and the guide line of a resize drag. */
1923
+ .xlsx-head-selected {
1924
+ forced-color-adjust: none;
1925
+ background: Highlight;
1926
+ color: HighlightText;
1927
+ border-color: CanvasText;
1928
+ }
1929
+ .xlsx-resize-guide {
1930
+ forced-color-adjust: none;
1931
+ background: Highlight;
1932
+ }
1933
+ }