pptx-react-viewer 1.20.0 → 1.22.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 (102) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +14 -13
  3. package/dist/{Model3DScene-BLUWY36S.js → Model3DScene-3YB3JAJS.js} +2 -2
  4. package/dist/{Model3DScene-BLUWY36S.js.br → Model3DScene-3YB3JAJS.js.br} +0 -0
  5. package/dist/Model3DScene-3YB3JAJS.js.gz +0 -0
  6. package/dist/{Model3DScene-RYHVTFOT.mjs → Model3DScene-NLUSXHD6.mjs} +1 -1
  7. package/dist/Model3DScene-NLUSXHD6.mjs.br +0 -0
  8. package/dist/Model3DScene-NLUSXHD6.mjs.gz +0 -0
  9. package/dist/{PowerPointViewer-C4d7SKZf.d.ts → PowerPointViewer-WGVR_u4z.d.ts} +2 -2
  10. package/dist/PowerPointViewer-WGVR_u4z.d.ts.map +1 -0
  11. package/dist/{SurfaceChart3DScene-BW2YTOPQ.js → SurfaceChart3DScene-PUQ5DCO5.js} +2 -2
  12. package/dist/{SurfaceChart3DScene-BW2YTOPQ.js.br → SurfaceChart3DScene-PUQ5DCO5.js.br} +0 -0
  13. package/dist/SurfaceChart3DScene-PUQ5DCO5.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-U6QOMUJF.mjs → SurfaceChart3DScene-YBMJQGH3.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-U6QOMUJF.mjs.br → SurfaceChart3DScene-YBMJQGH3.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-YBMJQGH3.mjs.gz +0 -0
  17. package/dist/{chunk-GG2KBJSN.mjs → chunk-5SBQZEKD.mjs} +187 -1
  18. package/dist/chunk-5SBQZEKD.mjs.br +0 -0
  19. package/dist/chunk-5SBQZEKD.mjs.gz +0 -0
  20. package/dist/{chunk-TUVSZMLW.mjs → chunk-7P7QQGTI.mjs} +487 -184
  21. package/dist/chunk-7P7QQGTI.mjs.br +0 -0
  22. package/dist/chunk-7P7QQGTI.mjs.gz +0 -0
  23. package/dist/{chunk-KRK367H5.js → chunk-A6IFTYB5.js} +1166 -863
  24. package/dist/chunk-A6IFTYB5.js.br +0 -0
  25. package/dist/chunk-A6IFTYB5.js.gz +0 -0
  26. package/dist/{chunk-UDJHJM5B.mjs → chunk-DZUI64SO.mjs} +13 -4
  27. package/dist/chunk-DZUI64SO.mjs.br +0 -0
  28. package/dist/chunk-DZUI64SO.mjs.gz +0 -0
  29. package/dist/{chunk-4LPWBQTH.mjs → chunk-E3KJKCSV.mjs} +7 -1
  30. package/dist/chunk-E3KJKCSV.mjs.br +0 -0
  31. package/dist/{chunk-4LPWBQTH.mjs.gz → chunk-E3KJKCSV.mjs.gz} +0 -0
  32. package/dist/{chunk-LXUMBK2O.js → chunk-QVQTDWB7.js} +409 -398
  33. package/dist/chunk-QVQTDWB7.js.br +0 -0
  34. package/dist/chunk-QVQTDWB7.js.gz +0 -0
  35. package/dist/{chunk-BXACB3BG.js → chunk-VSNXVKJI.js} +201 -0
  36. package/dist/chunk-VSNXVKJI.js.br +0 -0
  37. package/dist/chunk-VSNXVKJI.js.gz +0 -0
  38. package/dist/{chunk-4SRCC7NB.js → chunk-ZISXRMDJ.js} +7 -0
  39. package/dist/chunk-ZISXRMDJ.js.br +0 -0
  40. package/dist/{chunk-4SRCC7NB.js.gz → chunk-ZISXRMDJ.js.gz} +0 -0
  41. package/dist/hooks-unstable.d.ts +51 -2
  42. package/dist/hooks-unstable.d.ts.map +1 -1
  43. package/dist/hooks-unstable.js +82 -74
  44. package/dist/hooks-unstable.js.br +0 -0
  45. package/dist/hooks-unstable.js.gz +0 -0
  46. package/dist/hooks-unstable.mjs +3 -3
  47. package/dist/hooks-unstable.mjs.br +0 -0
  48. package/dist/hooks-unstable.mjs.gz +0 -0
  49. package/dist/i18n.d.ts +18 -2
  50. package/dist/i18n.js +7 -3
  51. package/dist/i18n.js.br +0 -0
  52. package/dist/i18n.js.gz +0 -0
  53. package/dist/i18n.mjs +1 -1
  54. package/dist/i18n.mjs.br +0 -0
  55. package/dist/i18n.mjs.gz +0 -0
  56. package/dist/index-SUL_8gq8.d.ts +43 -0
  57. package/dist/index-SUL_8gq8.d.ts.map +1 -0
  58. package/dist/{index-DmHVR48M.d.ts → index-ntF3kHHU.d.ts} +2 -2
  59. package/dist/{index-DmHVR48M.d.ts.map → index-ntF3kHHU.d.ts.map} +1 -1
  60. package/dist/index.d.ts +196 -2
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +70 -18
  63. package/dist/index.js.br +0 -0
  64. package/dist/index.js.gz +0 -0
  65. package/dist/index.mjs +4 -4
  66. package/dist/index.mjs.br +0 -0
  67. package/dist/index.mjs.gz +0 -0
  68. package/dist/pptx-viewer.css +1 -1
  69. package/dist/pptx-viewer.css.br +0 -0
  70. package/dist/pptx-viewer.css.gz +0 -0
  71. package/dist/{types-BK7Nt13M.d.ts → types-Cdh0XYcS.d.ts} +66 -3
  72. package/dist/types-Cdh0XYcS.d.ts.map +1 -0
  73. package/dist/viewer/index.d.ts +122 -0
  74. package/dist/viewer/index.js +20 -20
  75. package/dist/viewer/index.js.br +0 -0
  76. package/dist/viewer/index.js.gz +0 -0
  77. package/dist/viewer/index.mjs +4 -4
  78. package/dist/viewer/index.mjs.br +0 -0
  79. package/dist/viewer/index.mjs.gz +0 -0
  80. package/package.json +1 -1
  81. package/dist/Model3DScene-BLUWY36S.js.gz +0 -0
  82. package/dist/Model3DScene-RYHVTFOT.mjs.br +0 -0
  83. package/dist/Model3DScene-RYHVTFOT.mjs.gz +0 -0
  84. package/dist/PowerPointViewer-C4d7SKZf.d.ts.map +0 -1
  85. package/dist/SurfaceChart3DScene-BW2YTOPQ.js.gz +0 -0
  86. package/dist/SurfaceChart3DScene-U6QOMUJF.mjs.gz +0 -0
  87. package/dist/chunk-4LPWBQTH.mjs.br +0 -0
  88. package/dist/chunk-4SRCC7NB.js.br +0 -0
  89. package/dist/chunk-BXACB3BG.js.br +0 -0
  90. package/dist/chunk-BXACB3BG.js.gz +0 -0
  91. package/dist/chunk-GG2KBJSN.mjs.br +0 -0
  92. package/dist/chunk-GG2KBJSN.mjs.gz +0 -0
  93. package/dist/chunk-KRK367H5.js.br +0 -0
  94. package/dist/chunk-KRK367H5.js.gz +0 -0
  95. package/dist/chunk-LXUMBK2O.js.br +0 -0
  96. package/dist/chunk-LXUMBK2O.js.gz +0 -0
  97. package/dist/chunk-TUVSZMLW.mjs.br +0 -0
  98. package/dist/chunk-TUVSZMLW.mjs.gz +0 -0
  99. package/dist/chunk-UDJHJM5B.mjs.br +0 -0
  100. package/dist/chunk-UDJHJM5B.mjs.gz +0 -0
  101. package/dist/i18n.d.ts.map +0 -1
  102. package/dist/types-BK7Nt13M.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to this project are documented here.
4
4
  This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
5
5
  by [git-cliff](https://git-cliff.org); do not edit it by hand.
6
6
 
7
+ ## [1.21.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.21.0) - 2026-07-17
8
+
9
+ ### Features
10
+
11
+ - **react:** Add hiddenActions prop to hide individual toolbar/ribbon actions (by @ChristopherVR) ([3eaabcd](https://github.com/ChristopherVR/pptx-viewer/commit/3eaabcd208793c5a53f2c45b1b9fd948830e75ea))
12
+
13
+ ### Other
14
+
15
+ - Integrate release version bumps (by @ChristopherVR) ([4b3893f](https://github.com/ChristopherVR/pptx-viewer/commit/4b3893f4158803cc5533beb266ffdc8c776177cb))
16
+
17
+ ## [1.20.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.20.0) - 2026-07-17
18
+
7
19
  ## [1.19.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.19.1) - 2026-07-17
8
20
 
9
21
  ### Dependencies
package/README.md CHANGED
@@ -93,19 +93,20 @@ const bytes = await viewerRef.current?.getContent(); // Uint8Array of a valid .p
93
93
 
94
94
  ### `PowerPointViewer` props
95
95
 
96
- | Prop | Type | Default | Description |
97
- | --------------------- | ----------------------------------- | -------- | ----------------------------------------------------------------- |
98
- | `content` | `ArrayBuffer \| Uint8Array \| null` | required | Raw .pptx file bytes |
99
- | `filePath` | `string` | n/a | Optional file path (for display and autosave) |
100
- | `canEdit` | `boolean` | `false` | Enable editing mode |
101
- | `onContentChange` | `(dirty: boolean) => void` | n/a | Called when content changes |
102
- | `onDirtyChange` | `(isDirty: boolean) => void` | n/a | Called when dirty state changes |
103
- | `onActiveSlideChange` | `(index: number) => void` | n/a | Called when the active slide changes |
104
- | `onModeChange` | `(mode: ViewerMode) => void` | n/a | Called when the viewer mode changes |
105
- | `onZoomChange` | `(zoom: number) => void` | n/a | Called when the zoom level changes |
106
- | `onSelectionChange` | `(ids: string[]) => void` | n/a | Called when element selection changes |
107
- | `onSlideCountChange` | `(count: number) => void` | n/a | Called when the total slide count changes |
108
- | `theme` | `ViewerTheme` | n/a | Theme configuration for customising colours, radius, and CSS vars |
96
+ | Prop | Type | Default | Description |
97
+ | --------------------- | ----------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
98
+ | `content` | `ArrayBuffer \| Uint8Array \| null` | required | Raw .pptx file bytes |
99
+ | `filePath` | `string` | n/a | Optional file path (for display and autosave) |
100
+ | `canEdit` | `boolean` | `false` | Enable editing mode |
101
+ | `onContentChange` | `(dirty: boolean) => void` | n/a | Called when content changes |
102
+ | `onDirtyChange` | `(isDirty: boolean) => void` | n/a | Called when dirty state changes |
103
+ | `onActiveSlideChange` | `(index: number) => void` | n/a | Called when the active slide changes |
104
+ | `onModeChange` | `(mode: ViewerMode) => void` | n/a | Called when the viewer mode changes |
105
+ | `onZoomChange` | `(zoom: number) => void` | n/a | Called when the zoom level changes |
106
+ | `onSelectionChange` | `(ids: string[]) => void` | n/a | Called when element selection changes |
107
+ | `onSlideCountChange` | `(count: number) => void` | n/a | Called when the total slide count changes |
108
+ | `theme` | `ViewerTheme` | n/a | Theme configuration for customising colours, radius, and CSS vars |
109
+ | `hiddenActions` | `ToolbarActionId[]` | n/a | Hide individual toolbar buttons and/or ribbon tabs (e.g. `['share', 'broadcast']`) instead of the whole toolbar; omitted hides nothing |
109
110
 
110
111
  ### `PowerPointViewerHandle` (via `ref`)
111
112
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkBXACB3BG_js = require('./chunk-BXACB3BG.js');
3
+ var chunkVSNXVKJI_js = require('./chunk-VSNXVKJI.js');
4
4
  require('./chunk-AD3EAEY6.js');
5
5
  require('./chunk-QGM4M3NI.js');
6
6
  var react = require('react');
@@ -15,7 +15,7 @@ function Model3DScene({ modelUrl, interactive, width, height }) {
15
15
  return;
16
16
  }
17
17
  let disposed = false;
18
- void chunkBXACB3BG_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
18
+ void chunkVSNXVKJI_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
19
19
  if (disposed) {
20
20
  handle.dispose();
21
21
  } else {
Binary file
@@ -1,4 +1,4 @@
1
- import { mountModel3D } from './chunk-GG2KBJSN.mjs';
1
+ import { mountModel3D } from './chunk-5SBQZEKD.mjs';
2
2
  import './chunk-3ZGCM6RC.mjs';
3
3
  import './chunk-6DZX6EAA.mjs';
4
4
  import { useRef, useEffect } from 'react';
@@ -1,4 +1,4 @@
1
- import { f as PowerPointViewerHandle, p as PowerPointViewerProps } from "./types-BK7Nt13M.js";
1
+ import { f as PowerPointViewerHandle, p as PowerPointViewerProps } from "./types-Cdh0XYcS.js";
2
2
  import { PptxAnimationPreset, PptxNativeAnimation } from "pptx-viewer-core";
3
3
  import "pptx-viewer-shared";
4
4
  import React from "react";
@@ -18,4 +18,4 @@ declare function getAnimationInitialStyle(preset: PptxAnimationPreset | undefine
18
18
  declare const PowerPointViewer: import("react").ForwardRefExoticComponent<PowerPointViewerProps & import("react").RefAttributes<PowerPointViewerHandle>>;
19
19
  //#endregion
20
20
  export { getAnimationInitialStyle as n, PowerPointViewer as t };
21
- //# sourceMappingURL=PowerPointViewer-C4d7SKZf.d.ts.map
21
+ //# sourceMappingURL=PowerPointViewer-WGVR_u4z.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PowerPointViewer-WGVR_u4z.d.ts","names":[],"sources":["../src/viewer/utils/animation-effects.ts","../src/viewer/PowerPointViewer.tsx"],"mappings":";;;;;iBAmBgB,yBACf,QAAQ,iCACR,kBAAkB,sBAChB,MAAM;;;;;;;;;;;;cC4EI,kCAAgB,0BAAA,wCAAA,cAAA"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkBXACB3BG_js = require('./chunk-BXACB3BG.js');
3
+ var chunkVSNXVKJI_js = require('./chunk-VSNXVKJI.js');
4
4
  require('./chunk-AD3EAEY6.js');
5
5
  require('./chunk-QGM4M3NI.js');
6
6
  var react = require('react');
@@ -26,7 +26,7 @@ function SurfaceChart3DScene({
26
26
  return;
27
27
  }
28
28
  let disposed = false;
29
- void chunkBXACB3BG_js.mountSurfaceChart3D(container, {
29
+ void chunkVSNXVKJI_js.mountSurfaceChart3D(container, {
30
30
  cols,
31
31
  rows,
32
32
  heightMap,
@@ -1,4 +1,4 @@
1
- import { mountSurfaceChart3D } from './chunk-GG2KBJSN.mjs';
1
+ import { mountSurfaceChart3D } from './chunk-5SBQZEKD.mjs';
2
2
  import './chunk-3ZGCM6RC.mjs';
3
3
  import './chunk-6DZX6EAA.mjs';
4
4
  import { useRef, useEffect } from 'react';
@@ -42,6 +42,45 @@ var defaultThemeColors = {
42
42
  // indigo-500
43
43
  };
44
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
+ };
45
84
  var COLOR_KEY_TO_CSS = {
46
85
  background: "background",
47
86
  foreground: "foreground",
@@ -158,6 +197,23 @@ var vermilionDarkTheme = {
158
197
  colors: vermilionDarkColors,
159
198
  radius: vermilionRadius
160
199
  };
200
+ var THEME_CATALOG = [
201
+ { key: "default", labelKey: "pptx.settings.theme.default", theme: void 0 },
202
+ { key: "light", labelKey: "pptx.settings.theme.light", theme: lightTheme },
203
+ {
204
+ key: "vermilionLight",
205
+ labelKey: "pptx.settings.theme.vermilionLight",
206
+ theme: vermilionLightTheme
207
+ },
208
+ {
209
+ key: "vermilionDark",
210
+ labelKey: "pptx.settings.theme.vermilionDark",
211
+ theme: vermilionDarkTheme
212
+ }
213
+ ];
214
+ function resolveThemeCatalogEntry(key, catalog = THEME_CATALOG) {
215
+ return catalog.find((entry) => entry.key === key)?.theme;
216
+ }
161
217
  function collectMediaElements(elements, collector) {
162
218
  for (const element of elements) {
163
219
  if (element.type === "media") {
@@ -20076,6 +20132,30 @@ async function listAutosaveSnapshots() {
20076
20132
  }
20077
20133
  });
20078
20134
  }
20135
+ async function deleteAutosaveSnapshot(filePath) {
20136
+ const db = await openAutosaveDb();
20137
+ return new Promise((resolve) => {
20138
+ try {
20139
+ const tx = db.transaction(AUTOSAVE_STORE_NAME, "readwrite");
20140
+ const store = tx.objectStore(AUTOSAVE_STORE_NAME);
20141
+ store.delete(filePath);
20142
+ tx.oncomplete = () => {
20143
+ db.close();
20144
+ resolve(true);
20145
+ };
20146
+ tx.onerror = () => {
20147
+ db.close();
20148
+ resolve(false);
20149
+ };
20150
+ } catch {
20151
+ try {
20152
+ db.close();
20153
+ } catch {
20154
+ }
20155
+ resolve(false);
20156
+ }
20157
+ });
20158
+ }
20079
20159
  async function saveAutosaveSnapshot(filePath, data) {
20080
20160
  try {
20081
20161
  return await putAutosaveRecord(filePath, data);
@@ -20296,6 +20376,15 @@ async function scanAvailableFontFamilies(families, source = browserFontSource())
20296
20376
  return /* @__PURE__ */ new Set();
20297
20377
  }
20298
20378
  }
20379
+ var VIEWER_PREFERENCE_TOGGLES = [
20380
+ { key: "autoSave", labelKey: "pptx.settings.autoSave" },
20381
+ { key: "spellCheck", labelKey: "pptx.settings.spellCheck" },
20382
+ { key: "showGrid", labelKey: "pptx.settings.showGrid" },
20383
+ { key: "showRulers", labelKey: "pptx.settings.showRulers" },
20384
+ { key: "snapToGrid", labelKey: "pptx.settings.snapToGrid" },
20385
+ { key: "reducedMotion", labelKey: "pptx.settings.reducedMotion" }
20386
+ ];
20387
+ var SETTING_TOGGLES = VIEWER_PREFERENCE_TOGGLES;
20299
20388
  function shouldLoopContinuously(input) {
20300
20389
  return Boolean(input.loopContinuously) || input.showType === "kiosk";
20301
20390
  }
@@ -20318,6 +20407,103 @@ function applyRehearsalTimings(slides, timings) {
20318
20407
  function computeEntranceAnimationDelay(delayMs, animationIndex) {
20319
20408
  return Math.max(0, delayMs || 0) + animationIndex * 60;
20320
20409
  }
20410
+ var VIEWER_PREFS_STORAGE_KEY = "pptx-viewer-prefs";
20411
+ function hasLocalStorage() {
20412
+ return typeof localStorage !== "undefined";
20413
+ }
20414
+ function readStoredViewerPrefs() {
20415
+ if (!hasLocalStorage()) {
20416
+ return {};
20417
+ }
20418
+ try {
20419
+ const raw = localStorage.getItem(VIEWER_PREFS_STORAGE_KEY);
20420
+ if (!raw) {
20421
+ return {};
20422
+ }
20423
+ const parsed = JSON.parse(raw);
20424
+ return parsed && typeof parsed === "object" ? parsed : {};
20425
+ } catch {
20426
+ return {};
20427
+ }
20428
+ }
20429
+ function writeStoredViewerPrefs(patch) {
20430
+ if (!hasLocalStorage()) {
20431
+ return;
20432
+ }
20433
+ try {
20434
+ const next = { ...readStoredViewerPrefs(), ...patch };
20435
+ localStorage.setItem(VIEWER_PREFS_STORAGE_KEY, JSON.stringify(next));
20436
+ } catch {
20437
+ }
20438
+ }
20439
+ function clearStoredViewerPrefs() {
20440
+ if (!hasLocalStorage()) {
20441
+ return;
20442
+ }
20443
+ try {
20444
+ localStorage.removeItem(VIEWER_PREFS_STORAGE_KEY);
20445
+ } catch {
20446
+ }
20447
+ }
20448
+ var DEFAULT_VIEWER_PROFILE = {
20449
+ displayName: "",
20450
+ avatarColor: "#6366f1"
20451
+ };
20452
+ var AVATAR_COLOR_SWATCHES = [
20453
+ "#6366f1",
20454
+ // indigo
20455
+ "#c2431f",
20456
+ // vermilion
20457
+ "#0891b2",
20458
+ // cyan
20459
+ "#16a34a",
20460
+ // green
20461
+ "#ca8a04",
20462
+ // amber
20463
+ "#db2777",
20464
+ // pink
20465
+ "#64748b"
20466
+ // slate
20467
+ ];
20468
+ function resolveProfileInitial(profile) {
20469
+ if (profile.initial) {
20470
+ return profile.initial.slice(0, 1).toUpperCase();
20471
+ }
20472
+ const trimmed = profile.displayName.trim();
20473
+ return trimmed ? trimmed.slice(0, 1).toUpperCase() : "?";
20474
+ }
20475
+ async function getLocalStorageUsageSummary() {
20476
+ const snapshots = await listAutosaveSnapshots();
20477
+ return {
20478
+ presentationCount: snapshots.length,
20479
+ totalBytes: snapshots.reduce((sum, snapshot) => sum + snapshot.size, 0)
20480
+ };
20481
+ }
20482
+ async function clearAllLocalViewerData() {
20483
+ const snapshots = await listAutosaveSnapshots();
20484
+ await Promise.all(snapshots.map((snapshot) => deleteAutosaveSnapshot(snapshot.key)));
20485
+ clearStoredViewerPrefs();
20486
+ }
20487
+ function saveViewerProfile(profile) {
20488
+ writeStoredViewerPrefs({ profile });
20489
+ }
20490
+ var TOOLBAR_TABS = [
20491
+ { id: "file", labelKey: "pptx.ribbon.tab.file" },
20492
+ { id: "home", labelKey: "pptx.ribbon.tab.home" },
20493
+ { id: "insert", labelKey: "pptx.ribbon.tab.insert" },
20494
+ { id: "draw", labelKey: "pptx.ribbon.tab.draw" },
20495
+ { id: "design", labelKey: "pptx.ribbon.tab.design" },
20496
+ { id: "transitions", labelKey: "pptx.ribbon.tab.transitions" },
20497
+ { id: "animations", labelKey: "pptx.ribbon.tab.animations" },
20498
+ { id: "slideShow", labelKey: "pptx.ribbon.tab.slideShow" },
20499
+ { id: "record", labelKey: "pptx.ribbon.tab.record" },
20500
+ { id: "review", labelKey: "pptx.ribbon.tab.review" },
20501
+ { id: "view", labelKey: "pptx.ribbon.tab.view" },
20502
+ { id: "help", labelKey: "pptx.ribbon.tab.help" }
20503
+ ];
20504
+ function isActionHidden(id, hiddenActions) {
20505
+ return hiddenActions !== void 0 && hiddenActions.includes(id);
20506
+ }
20321
20507
  var FALLBACK_DOWNLOAD_NAME = "presentation.pptx";
20322
20508
  var REVOKE_DELAY_MS = 200;
20323
20509
  var OPEN_REVOKE_DELAY_MS = 6e4;
@@ -21946,4 +22132,4 @@ function segmentFrameCount(durationMs, fps) {
21946
22132
  return Math.max(1, Math.ceil(durationMs / (1e3 / fps)));
21947
22133
  }
21948
22134
 
21949
- export { ACTION_BUTTON_PRESETS, ARTISTIC_EFFECTS, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BROADCAST_THROTTLE_MS, CATEGORIES, CONNECTION_TIMEOUT_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_INSERT_CHART_TYPE, DEFAULT_ROW_HEIGHT, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, FILL_MODE_OPTIONS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LOCAL_SYNC_ORIGIN, MOBILE_BREAKPOINT, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, PATTERN_OPTIONS, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESETS, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SLIDE_TRANSITION_KEYFRAMES, SLIDE_VIRTUALIZATION_THRESHOLD, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, THEME_COLOR_LABELS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TimelineEngine, WEBM_MIME_CANDIDATES, activateModalFocus, addSection, alignElements, appendPresentationInkPoint, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyColorChange, applyDuotone, applyFormatToElement, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildChartViewModel, buildCollaborationShareUrl, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDuotoneCacheKey, buildElementClipboardPayload, buildGlowBoxShadow, buildHandoutsHtml, buildInitialGuides, buildInnerShadowCssFromShapeStyle, buildJoinCollaborationConfig, buildMultiLayerShadowCss, buildNotesHtml, buildNotesPdfBytes, buildOutlineHtml, buildPatternFillCss, buildPresentationAudienceUrl, buildPreviewAnimation, buildPrintDocument, buildPrintHtmlDocument, buildReflectionCss, buildShadowCssFromShapeStyle, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildSummaryZoomView, buildTextBody3DSceneStyle, buildTextFillCss, buildTextReflectionCss, buildTextRunFilterChain, buildTextShadowCss, buildThemeColorGrid, buildUserFontFaceStyles, canvasToJpegData, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampUnitInterval, clearPresentationDeck, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, comparePresentation, computeAllNotesPages, computeAutoFitTextStyle, computeColumnBoundaries, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, countTextSegments, createBackstagePresentation, createBlankSlide, createDefaultChartElement, createInitialPresentationSnapshot, createPresentationSessionId, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, defaultCssVars, defaultRadius, defaultThemeColors, deleteSection, deleteTableColumn, deleteTableRow, derivePresenceList, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, encodeGif, erasePresentationInkAt, expandTextBuildAnimations, extractPathPoints, filterCommands, findChartPartTarget, findSmartArtNodeText, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getChartStylePalette, getCommentMarkerPosition, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineOffsets, getCompoundLineWidths, getConnectionSites, getContentPartReplayStyles, getCssBorderDashStyle, getDisplayUnitLabel, getDuotoneCachedResult, getEffectDagFilter, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageSvgFilters, getInkReplayStyles, getInlineEditorSelection, getKinsokuLineBreakStyles, getNotesPrintableArea, getOleBadgeLabel, getOleTypeColor, getOleTypeLabel, getPatternSvg, getPendingSelectionRestore, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx, getSecondaryValueAxis, getShapeAdjustmentHandleDescriptor, getSlideBackgroundStyle, getSlideTransitionAnimations, getSvgStrokeDasharray, getTextAlphaOpacity, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, insertTableColumn, insertTableRow, isBrowserOpenableMime, isCellInRect, isEditableTextElement, isExportAbortError, isFirstSlide, isKeyboardOpen, isLastSlide, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationSessionMessage, isTemplateElement, isTemplateElementId, isUrlSafe, listBackstageRecentFiles, loadPresentationDeck, makeCloneId, makeSlideId, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mobileElapsedSince, mobileSlideCounter, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, normalizeColorsForCapture, normalizeHexColor, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlDashToCssBorderStyle, openPptxFile, openUrlInNewTab, paletteColor, parseDrawingColor, parseDrawingColorOpacity, parsePpactionUrl, pickSupportedMimeType, placeAudienceWindow, preprocessCssForCapture, presentationInkPath, presenterElapsed, pressuresToWidths, readBackstageRecentFile, readSlidesFromYDoc, readViewportMetrics, rebuildDrawingShapesIfCleared, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, remapTextToSegments, renameSection, rerouteConnectorsForMovedElements, resetPresenterTimer, resolveAudienceScreenPlacement, resolveCssTextAlign, resolveDrawingShapeNodeId, resolveFontForScript, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveLineHeight, resolveOleType, resolveParagraphAlign, resolveParagraphRtl, resolvePictureBullet, resolveRegionCode, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveUnderlineDecorationStyle, restoreSegmentSelection, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeMathMl, saveAutosaveSnapshot, scanAvailableFontFamilies, segmentByScript, segmentFrameCount, sendBackward, sendToBack, sequentialColorScale, seriesColor, setCachedResult, setDuotoneCachedResult, setPendingSelectionRestore, shadeColor2, shouldCommitSmartArtNodeText, shouldLoopContinuously, shouldUseSvgWarp, slideProgressPercent, slideStatusLabel, snapBoxToGrid, splitCell, splitSeriesByAxis, stepPresenterZoom, storePresentationDeck, substituteFieldText, svgLineCap, swapPresentationWindows, themeToCssVars, tintColor2, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, togglePresenterTimer, transformTextCase, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, withChartPointValue, withChartTitle };
22135
+ export { ACTION_BUTTON_PRESETS, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BROADCAST_THROTTLE_MS, CATEGORIES, CONNECTION_TIMEOUT_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_INSERT_CHART_TYPE, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, FILL_MODE_OPTIONS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LOCAL_SYNC_ORIGIN, MOBILE_BREAKPOINT, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, PATTERN_OPTIONS, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESETS, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SETTING_TOGGLES, SHAPE_PRESET_DEFS, SLIDE_TRANSITION_KEYFRAMES, SLIDE_VIRTUALIZATION_THRESHOLD, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, THEME_CATALOG, THEME_COLOR_LABELS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TimelineEngine, VIEWER_PREFS_STORAGE_KEY, WEBM_MIME_CANDIDATES, activateModalFocus, addSection, alignElements, appendPresentationInkPoint, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyColorChange, applyDuotone, applyFormatToElement, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildChartViewModel, buildCollaborationShareUrl, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDuotoneCacheKey, buildElementClipboardPayload, buildGlowBoxShadow, buildHandoutsHtml, buildInitialGuides, buildInnerShadowCssFromShapeStyle, buildJoinCollaborationConfig, buildMultiLayerShadowCss, buildNotesHtml, buildNotesPdfBytes, buildOutlineHtml, buildPatternFillCss, buildPresentationAudienceUrl, buildPreviewAnimation, buildPrintDocument, buildPrintHtmlDocument, buildReflectionCss, buildShadowCssFromShapeStyle, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildSummaryZoomView, buildTextBody3DSceneStyle, buildTextFillCss, buildTextReflectionCss, buildTextRunFilterChain, buildTextShadowCss, buildThemeColorGrid, buildUserFontFaceStyles, canvasToJpegData, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampUnitInterval, clearAllLocalViewerData, clearPresentationDeck, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, comparePresentation, computeAllNotesPages, computeAutoFitTextStyle, computeColumnBoundaries, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, countTextSegments, createBackstagePresentation, createBlankSlide, createDefaultChartElement, createInitialPresentationSnapshot, createPresentationSessionId, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, defaultCssVars, defaultRadius, defaultThemeColors, deleteSection, deleteTableColumn, deleteTableRow, derivePresenceList, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, encodeGif, erasePresentationInkAt, expandTextBuildAnimations, extractPathPoints, filterCommands, findChartPartTarget, findSmartArtNodeText, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getChartStylePalette, getCommentMarkerPosition, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineOffsets, getCompoundLineWidths, getConnectionSites, getContentPartReplayStyles, getCssBorderDashStyle, getDisplayUnitLabel, getDuotoneCachedResult, getEffectDagFilter, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageSvgFilters, getInkReplayStyles, getInlineEditorSelection, getKinsokuLineBreakStyles, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleTypeColor, getOleTypeLabel, getPatternSvg, getPendingSelectionRestore, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx, getSecondaryValueAxis, getShapeAdjustmentHandleDescriptor, getSlideBackgroundStyle, getSlideTransitionAnimations, getSvgStrokeDasharray, getTextAlphaOpacity, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, insertTableColumn, insertTableRow, isActionHidden, isBrowserOpenableMime, isCellInRect, isEditableTextElement, isExportAbortError, isFirstSlide, isKeyboardOpen, isLastSlide, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationSessionMessage, isTemplateElement, isTemplateElementId, isUrlSafe, listBackstageRecentFiles, loadPresentationDeck, makeCloneId, makeSlideId, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mobileElapsedSince, mobileSlideCounter, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, normalizeColorsForCapture, normalizeHexColor, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlDashToCssBorderStyle, openPptxFile, openUrlInNewTab, paletteColor, parseDrawingColor, parseDrawingColorOpacity, parsePpactionUrl, pickSupportedMimeType, placeAudienceWindow, preprocessCssForCapture, presentationInkPath, presenterElapsed, pressuresToWidths, readBackstageRecentFile, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, rebuildDrawingShapesIfCleared, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, remapTextToSegments, renameSection, rerouteConnectorsForMovedElements, resetPresenterTimer, resolveAudienceScreenPlacement, resolveCssTextAlign, resolveDrawingShapeNodeId, resolveFontForScript, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveLineHeight, resolveOleType, resolveParagraphAlign, resolveParagraphRtl, resolvePictureBullet, resolveProfileInitial, resolveRegionCode, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveUnderlineDecorationStyle, restoreSegmentSelection, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeMathMl, saveAutosaveSnapshot, saveViewerProfile, scanAvailableFontFamilies, segmentByScript, segmentFrameCount, sendBackward, sendToBack, sequentialColorScale, seriesColor, setCachedResult, setDuotoneCachedResult, setPendingSelectionRestore, shadeColor2, shouldCommitSmartArtNodeText, shouldLoopContinuously, shouldUseSvgWarp, slideProgressPercent, slideStatusLabel, snapBoxToGrid, splitCell, splitSeriesByAxis, stepPresenterZoom, storePresentationDeck, substituteFieldText, svgLineCap, swapPresentationWindows, themeToCssVars, tintColor2, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, togglePresenterTimer, transformTextCase, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, withChartPointValue, withChartTitle, writeStoredViewerPrefs };
Binary file
Binary file