ooxml-ui 1.18.2 → 1.19.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 (75) hide show
  1. package/README.md +54 -0
  2. package/dist/building-block-styles.d.ts +5 -0
  3. package/dist/building-block-styles.d.ts.map +1 -0
  4. package/dist/chunk-6Y7KR2I3.js +299 -0
  5. package/dist/{chunk-EVL7GFC7.js → chunk-KH2ZG3N6.js} +2 -2
  6. package/dist/{chunk-MSXUCINT.js → chunk-QEIGB73C.js} +1 -1
  7. package/dist/docx/building-blocks.d.ts +31 -0
  8. package/dist/docx/component.d.ts +1 -1
  9. package/dist/docx/editor-core.d.ts +3 -0
  10. package/dist/docx/element-api.d.ts +8 -0
  11. package/dist/docx/index.d.ts +1 -0
  12. package/dist/docx/styles/index.d.ts +0 -4
  13. package/dist/docx.js +154 -38
  14. package/dist/index.js +3 -3
  15. package/dist/pptx/chunk-NDAE3JFO.cjs +1014 -0
  16. package/dist/pptx/{chunk-AUCJIB3M.mjs → chunk-NLUVYOKN.mjs} +113 -381
  17. package/dist/pptx/{chunk-S2Y3VUNC.cjs → chunk-OQQQ2GBW.cjs} +134 -402
  18. package/dist/pptx/chunk-UTFFX4M7.mjs +989 -0
  19. package/dist/pptx/dom/index.cjs +205 -205
  20. package/dist/pptx/dom/index.mjs +3 -3
  21. package/dist/pptx/index.cjs +2888 -2880
  22. package/dist/pptx/index.mjs +2 -2
  23. package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
  24. package/dist/pptx/theme/index.cjs +24 -16
  25. package/dist/pptx/theme/index.d.ts +1 -0
  26. package/dist/pptx/theme/index.d.ts.map +1 -1
  27. package/dist/pptx/theme/index.mjs +1 -1
  28. package/dist/pptx/theme/office-css.d.ts +6 -0
  29. package/dist/pptx/theme/office-css.d.ts.map +1 -0
  30. package/dist/pptx/web-components/chart-format-pane-styles.d.ts +1 -1
  31. package/dist/pptx/web-components/chart-format-pane-styles.d.ts.map +1 -1
  32. package/dist/pptx/web-components/control-styles.d.ts.map +1 -1
  33. package/dist/pptx/web-components/index.d.ts.map +1 -1
  34. package/dist/pptx/web-components/mobile-bar-styles.d.ts +2 -2
  35. package/dist/pptx/web-components/mobile-bar-styles.d.ts.map +1 -1
  36. package/dist/pptx/web-components/mobile-insert-styles.d.ts +1 -1
  37. package/dist/pptx/web-components/mobile-insert-styles.d.ts.map +1 -1
  38. package/dist/pptx/web-components/notes-toolbar-styles.d.ts +1 -1
  39. package/dist/pptx/web-components/notes-toolbar-styles.d.ts.map +1 -1
  40. package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
  41. package/dist/pptx/web-components/subtitle-settings-styles.d.ts +1 -1
  42. package/dist/pptx/web-components/subtitle-settings-styles.d.ts.map +1 -1
  43. package/dist/pptx/web-components/theme-editor-styles.d.ts +1 -1
  44. package/dist/pptx/web-components/theme-editor-styles.d.ts.map +1 -1
  45. package/dist/teams.js +2 -2
  46. package/dist/theme-bridge.d.ts +28 -0
  47. package/dist/theme-bridge.d.ts.map +1 -0
  48. package/dist/theme.d.ts +10 -3
  49. package/dist/theme.d.ts.map +1 -0
  50. package/dist/theme.js +1 -1
  51. package/dist/visio/building-blocks.d.ts +37 -0
  52. package/dist/visio/controller.d.ts +6 -0
  53. package/dist/visio/index.d.ts +1 -0
  54. package/dist/visio/styles/theme.d.ts +1 -1
  55. package/dist/visio/styles.d.ts +1 -1
  56. package/dist/visio/viewer-element.d.ts +2 -0
  57. package/dist/visio.js +7446 -7321
  58. package/dist/xlsx/building-blocks.d.ts +55 -0
  59. package/dist/xlsx/component.d.ts +3 -1
  60. package/dist/xlsx/dialogs/styles.d.ts +1 -1
  61. package/dist/xlsx/editor-core.d.ts +1 -0
  62. package/dist/xlsx/element-api.d.ts +6 -0
  63. package/dist/xlsx/formula-bar/styles.d.ts +1 -1
  64. package/dist/xlsx/grid/page-break-layer.d.ts +1 -1
  65. package/dist/xlsx/grid/styles.d.ts +1 -1
  66. package/dist/xlsx/index.d.ts +1 -0
  67. package/dist/xlsx/page-views/page-layout-css.d.ts +1 -1
  68. package/dist/xlsx/sheet-tabs/styles.d.ts +1 -1
  69. package/dist/xlsx/surface-shell.d.ts +3 -0
  70. package/dist/xlsx/theme/styles.d.ts +1 -4
  71. package/dist/xlsx.js +412 -268
  72. package/package.json +4 -4
  73. package/dist/chunk-7E3HU7RL.js +0 -123
  74. package/dist/pptx/chunk-BDXQX6RA.cjs +0 -373
  75. package/dist/pptx/chunk-ZAOD6O2D.mjs +0 -357
@@ -1,357 +0,0 @@
1
- import { THEME_PRESETS, themeColorSchemesEqual } from 'ooxml-core/pptx';
2
-
3
- // src/pptx/theme/defaults.ts
4
- var defaultThemeColors = {
5
- background: "#030712",
6
- // gray-950
7
- foreground: "#f3f4f6",
8
- // gray-100
9
- card: "#111827",
10
- // gray-900
11
- cardForeground: "#f3f4f6",
12
- // gray-100
13
- popover: "#111827",
14
- // gray-900
15
- popoverForeground: "#f3f4f6",
16
- // gray-100
17
- primary: "#6366f1",
18
- // indigo-500
19
- primaryForeground: "#ffffff",
20
- // white
21
- secondary: "#1f2937",
22
- // gray-800
23
- secondaryForeground: "#f3f4f6",
24
- // gray-100
25
- muted: "#1f2937",
26
- // gray-800
27
- mutedForeground: "#9ca3af",
28
- // gray-400
29
- accent: "#1f2937",
30
- // gray-800
31
- accentForeground: "#f3f4f6",
32
- // gray-100
33
- destructive: "#ef4444",
34
- // red-500
35
- destructiveForeground: "#ffffff",
36
- // white
37
- border: "#374151",
38
- // gray-700
39
- input: "#374151",
40
- // gray-700
41
- ring: "#6366f1"
42
- // indigo-500
43
- };
44
- var defaultRadius = "0.5rem";
45
- var lightThemeColors = {
46
- background: "#f8fafc",
47
- // slate-50
48
- foreground: "#0f172a",
49
- // slate-900
50
- card: "#ffffff",
51
- cardForeground: "#0f172a",
52
- // slate-900
53
- popover: "#ffffff",
54
- popoverForeground: "#0f172a",
55
- // slate-900
56
- primary: "#4f46e5",
57
- // indigo-600
58
- primaryForeground: "#ffffff",
59
- secondary: "#f1f5f9",
60
- // slate-100
61
- secondaryForeground: "#0f172a",
62
- // slate-900
63
- muted: "#f1f5f9",
64
- // slate-100
65
- mutedForeground: "#64748b",
66
- // slate-500
67
- accent: "#f1f5f9",
68
- // slate-100
69
- accentForeground: "#0f172a",
70
- // slate-900
71
- destructive: "#dc2626",
72
- // red-600
73
- destructiveForeground: "#ffffff",
74
- border: "#e2e8f0",
75
- // slate-200
76
- input: "#e2e8f0",
77
- // slate-200
78
- ring: "#4f46e5"
79
- // indigo-600
80
- };
81
- var lightTheme = {
82
- colors: lightThemeColors
83
- };
84
-
85
- // src/pptx/theme/css-vars.ts
86
- var COLOR_KEY_TO_CSS = {
87
- background: "background",
88
- foreground: "foreground",
89
- card: "card",
90
- cardForeground: "card-foreground",
91
- popover: "popover",
92
- popoverForeground: "popover-foreground",
93
- primary: "primary",
94
- primaryForeground: "primary-foreground",
95
- secondary: "secondary",
96
- secondaryForeground: "secondary-foreground",
97
- muted: "muted",
98
- mutedForeground: "muted-foreground",
99
- accent: "accent",
100
- accentForeground: "accent-foreground",
101
- destructive: "destructive",
102
- destructiveForeground: "destructive-foreground",
103
- border: "border",
104
- input: "input",
105
- ring: "ring"
106
- };
107
- var DERIVED_COLOR_TOKENS = [
108
- { source: "primary", cssSuffix: "inspector-active" },
109
- { source: "border", cssSuffix: "inspector-border" }
110
- ];
111
- function themeToCssVars(theme, omitDefaults = false) {
112
- const vars = {};
113
- if (!theme) {
114
- return vars;
115
- }
116
- const colors = theme.colors;
117
- if (colors) {
118
- for (const [key, cssSuffix] of Object.entries(COLOR_KEY_TO_CSS)) {
119
- const value = colors[key];
120
- if (value === void 0) {
121
- continue;
122
- }
123
- if (omitDefaults && value === defaultThemeColors[key]) {
124
- continue;
125
- }
126
- vars[`--pptx-${cssSuffix}`] = value;
127
- vars[`--color-${cssSuffix}`] = value;
128
- }
129
- for (const { source, cssSuffix } of DERIVED_COLOR_TOKENS) {
130
- const value = colors[source];
131
- if (value === void 0) {
132
- continue;
133
- }
134
- if (omitDefaults && value === defaultThemeColors[source]) {
135
- continue;
136
- }
137
- vars[`--pptx-${cssSuffix}`] = value;
138
- }
139
- }
140
- if (theme.radius !== void 0) {
141
- if (!omitDefaults || theme.radius !== defaultRadius) {
142
- vars["--pptx-radius"] = theme.radius;
143
- const r = theme.radius;
144
- vars["--radius-sm"] = `calc(${r} - 4px)`;
145
- vars["--radius-md"] = `calc(${r} - 2px)`;
146
- vars["--radius-lg"] = r;
147
- vars["--radius-xl"] = `calc(${r} + 4px)`;
148
- }
149
- }
150
- if (theme.cssVars) {
151
- for (const [key, value] of Object.entries(theme.cssVars)) {
152
- vars[key] = value;
153
- }
154
- }
155
- return vars;
156
- }
157
- function defaultCssVars() {
158
- const vars = {};
159
- for (const [key, cssSuffix] of Object.entries(COLOR_KEY_TO_CSS)) {
160
- vars[`--pptx-${cssSuffix}`] = defaultThemeColors[key];
161
- }
162
- for (const { source, cssSuffix } of DERIVED_COLOR_TOKENS) {
163
- vars[`--pptx-${cssSuffix}`] = defaultThemeColors[source];
164
- }
165
- vars["--pptx-radius"] = defaultRadius;
166
- return vars;
167
- }
168
-
169
- // src/pptx/theme/presets.ts
170
- var vermilionLightColors = {
171
- background: "#fbfaf7",
172
- foreground: "#1a1d21",
173
- card: "#ffffff",
174
- cardForeground: "#1a1d21",
175
- popover: "#ffffff",
176
- popoverForeground: "#1a1d21",
177
- primary: "#c2431f",
178
- primaryForeground: "#ffffff",
179
- secondary: "#f2efe8",
180
- secondaryForeground: "#1a1d21",
181
- muted: "#f2efe8",
182
- mutedForeground: "#5a626e",
183
- accent: "rgba(194, 67, 31, 0.08)",
184
- accentForeground: "#1a1d21",
185
- destructive: "#dc2626",
186
- destructiveForeground: "#ffffff",
187
- border: "#e6e2d9",
188
- input: "#e6e2d9",
189
- ring: "#c2431f"
190
- };
191
- var vermilionDarkColors = {
192
- background: "#0f1113",
193
- foreground: "#f0efec",
194
- card: "#171a1e",
195
- cardForeground: "#f0efec",
196
- popover: "#171a1e",
197
- popoverForeground: "#f0efec",
198
- primary: "#e86a40",
199
- primaryForeground: "#ffffff",
200
- secondary: "#1f242b",
201
- secondaryForeground: "#f0efec",
202
- muted: "#1f242b",
203
- mutedForeground: "#9aa1ab",
204
- accent: "rgba(232, 106, 64, 0.1)",
205
- accentForeground: "#f0efec",
206
- destructive: "#ef4444",
207
- destructiveForeground: "#ffffff",
208
- border: "#272c33",
209
- input: "#272c33",
210
- ring: "#e86a40"
211
- };
212
- var vermilionRadius = "0.375rem";
213
- var vermilionLightTheme = {
214
- colors: vermilionLightColors,
215
- radius: vermilionRadius
216
- };
217
- var vermilionDarkTheme = {
218
- colors: vermilionDarkColors,
219
- radius: vermilionRadius
220
- };
221
-
222
- // src/pptx/theme/theme-catalog.ts
223
- var THEME_CATALOG = [
224
- { key: "default", labelKey: "pptx.settings.theme.default", theme: void 0 },
225
- { key: "light", labelKey: "pptx.settings.theme.light", theme: lightTheme },
226
- {
227
- key: "vermilionLight",
228
- labelKey: "pptx.settings.theme.vermilionLight",
229
- theme: vermilionLightTheme
230
- },
231
- {
232
- key: "vermilionDark",
233
- labelKey: "pptx.settings.theme.vermilionDark",
234
- theme: vermilionDarkTheme
235
- }
236
- ];
237
- function resolveThemeCatalogEntry(key, catalog = THEME_CATALOG) {
238
- return catalog.find((entry) => entry.key === key)?.theme;
239
- }
240
- function corePreset(id) {
241
- const preset = THEME_PRESETS.find((p) => p.id === id);
242
- if (!preset) {
243
- throw new Error(`theme-gallery-presets: core THEME_PRESETS is missing "${id}"`);
244
- }
245
- return preset;
246
- }
247
- var WISP_PRESET = {
248
- id: "wisp",
249
- name: "Wisp",
250
- colorScheme: {
251
- dk1: "#000000",
252
- lt1: "#FFFFFF",
253
- dk2: "#46393B",
254
- lt2: "#E8DCD8",
255
- accent1: "#A53010",
256
- accent2: "#DE7E18",
257
- accent3: "#9F8351",
258
- accent4: "#728653",
259
- accent5: "#92AA4C",
260
- accent6: "#6AAC91",
261
- hlink: "#FB4F14",
262
- folHlink: "#E25839"
263
- },
264
- fontScheme: {
265
- majorFont: { latin: "Century Gothic" },
266
- minorFont: { latin: "Century Gothic" }
267
- }
268
- };
269
- var BERLIN_PRESET = {
270
- id: "berlin",
271
- name: "Berlin",
272
- colorScheme: {
273
- dk1: "#000000",
274
- lt1: "#FFFFFF",
275
- dk2: "#3E5C61",
276
- lt2: "#D5E0D0",
277
- accent1: "#F09415",
278
- accent2: "#C1B56B",
279
- accent3: "#89C2A3",
280
- accent4: "#729BBE",
281
- accent5: "#9A90C2",
282
- accent6: "#BE8DBE",
283
- hlink: "#25A0DA",
284
- folHlink: "#FF7F00"
285
- },
286
- fontScheme: {
287
- majorFont: { latin: "Trebuchet MS" },
288
- minorFont: { latin: "Trebuchet MS" }
289
- }
290
- };
291
- var SLICE_PRESET = {
292
- id: "slice",
293
- name: "Slice",
294
- colorScheme: {
295
- dk1: "#000000",
296
- lt1: "#FFFFFF",
297
- dk2: "#2E3B4C",
298
- lt2: "#C7CDD3",
299
- accent1: "#E2751D",
300
- accent2: "#C53B23",
301
- accent3: "#A13D69",
302
- accent4: "#58599E",
303
- accent5: "#36749D",
304
- accent6: "#4EA39A",
305
- hlink: "#FD6B32",
306
- folHlink: "#D14D0F"
307
- },
308
- fontScheme: {
309
- majorFont: { latin: "Century Gothic" },
310
- minorFont: { latin: "Century Gothic" }
311
- }
312
- };
313
- var DIVIDEND_PRESET = {
314
- id: "dividend",
315
- name: "Dividend",
316
- colorScheme: {
317
- dk1: "#000000",
318
- lt1: "#FFFFFF",
319
- dk2: "#3D3D3D",
320
- lt2: "#E1E1E1",
321
- accent1: "#4D1434",
322
- accent2: "#903163",
323
- accent3: "#B2324B",
324
- accent4: "#D34817",
325
- accent5: "#E8971C",
326
- accent6: "#FDCB00",
327
- hlink: "#A03068",
328
- folHlink: "#C34882"
329
- },
330
- fontScheme: {
331
- majorFont: { latin: "Gill Sans MT" },
332
- minorFont: { latin: "Gill Sans MT" }
333
- }
334
- };
335
- var GALLERY_THEME_PRESETS = [
336
- corePreset("office"),
337
- corePreset("facet"),
338
- corePreset("integral"),
339
- corePreset("ion"),
340
- corePreset("retrospect"),
341
- corePreset("organic"),
342
- WISP_PRESET,
343
- BERLIN_PRESET,
344
- SLICE_PRESET,
345
- DIVIDEND_PRESET
346
- ];
347
- function activeGalleryThemePreset(theme) {
348
- if (!theme) {
349
- return void 0;
350
- }
351
- const colorScheme = theme.colorScheme;
352
- return colorScheme && GALLERY_THEME_PRESETS.find(
353
- (preset) => themeColorSchemesEqual(colorScheme, preset.colorScheme)
354
- ) || GALLERY_THEME_PRESETS.find((preset) => preset.name === theme.name);
355
- }
356
-
357
- export { GALLERY_THEME_PRESETS, THEME_CATALOG, activeGalleryThemePreset, defaultCssVars, defaultRadius, defaultThemeColors, lightTheme, lightThemeColors, resolveThemeCatalogEntry, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius };