pptx-svelte-viewer 2.8.0 → 2.9.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 (112) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/AiChatPanel-CWB7jYUa.js +1108 -0
  3. package/dist/{export-BbJv-tva.js → export-CAW_l1TQ.js} +44625 -39074
  4. package/dist/i18n.js +1 -1
  5. package/dist/index.d.ts +21 -0
  6. package/dist/index.js +20 -20
  7. package/dist/pptx-svelte-viewer.css +1 -1
  8. package/dist/{translator-DL83W_OP.js → translator-0iRuc5gX.js} +240 -19
  9. package/dist/viewer/ai/ai-chat-persistence.svelte.d.ts +23 -0
  10. package/dist/viewer/ai/ai-chat-persistence.svelte.d.ts.map +1 -0
  11. package/dist/viewer/components/inspector/theme-editor-state.svelte.d.ts +47 -0
  12. package/dist/viewer/components/inspector/theme-editor-state.svelte.d.ts.map +1 -0
  13. package/dist/viewer/components/props-chrome.d.ts +104 -0
  14. package/dist/viewer/components/props-chrome.d.ts.map +1 -0
  15. package/dist/viewer/components/props-editing.d.ts +86 -0
  16. package/dist/viewer/components/props-editing.d.ts.map +1 -0
  17. package/dist/viewer/components/props-elements.d.ts +65 -0
  18. package/dist/viewer/components/props-elements.d.ts.map +1 -0
  19. package/dist/viewer/components/props-stage.d.ts +84 -0
  20. package/dist/viewer/components/props-stage.d.ts.map +1 -0
  21. package/dist/viewer/components/props.d.ts +10 -283
  22. package/dist/viewer/components/props.d.ts.map +1 -1
  23. package/dist/viewer/components/ribbon/insert/equation-latex-preview.d.ts +23 -0
  24. package/dist/viewer/components/ribbon/insert/equation-latex-preview.d.ts.map +1 -0
  25. package/dist/viewer/components/ribbon/ribbon-types.d.ts +2 -0
  26. package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -1
  27. package/dist/viewer/components/viewer-body-commits.d.ts +18 -0
  28. package/dist/viewer/components/viewer-body-commits.d.ts.map +1 -0
  29. package/dist/viewer/components/viewer-body-props.d.ts +125 -0
  30. package/dist/viewer/components/viewer-body-props.d.ts.map +1 -0
  31. package/dist/viewer/editor/context-menu-dispatch.d.ts +45 -0
  32. package/dist/viewer/editor/context-menu-dispatch.d.ts.map +1 -0
  33. package/dist/viewer/editor/deck-api.d.ts +31 -0
  34. package/dist/viewer/editor/deck-api.d.ts.map +1 -0
  35. package/dist/viewer/editor/editor-controller-deps.d.ts +21 -1
  36. package/dist/viewer/editor/editor-controller-deps.d.ts.map +1 -1
  37. package/dist/viewer/editor/editor-controller-wiring.d.ts +35 -0
  38. package/dist/viewer/editor/editor-controller-wiring.d.ts.map +1 -0
  39. package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -1
  40. package/dist/viewer/editor/editor-document-lifecycle.d.ts +68 -0
  41. package/dist/viewer/editor/editor-document-lifecycle.d.ts.map +1 -0
  42. package/dist/viewer/editor/editor-document-state.d.ts +3 -1
  43. package/dist/viewer/editor/editor-document-state.d.ts.map +1 -1
  44. package/dist/viewer/editor/editor-freeform.d.ts +4 -0
  45. package/dist/viewer/editor/editor-freeform.d.ts.map +1 -0
  46. package/dist/viewer/editor/editor-history-state.svelte.d.ts +31 -0
  47. package/dist/viewer/editor/editor-history-state.svelte.d.ts.map +1 -0
  48. package/dist/viewer/editor/editor-ink-controller.svelte.d.ts +10 -6
  49. package/dist/viewer/editor/editor-ink-controller.svelte.d.ts.map +1 -1
  50. package/dist/viewer/editor/editor-keyboard.d.ts +18 -11
  51. package/dist/viewer/editor/editor-keyboard.d.ts.map +1 -1
  52. package/dist/viewer/editor/editor-selection.svelte.d.ts +10 -10
  53. package/dist/viewer/editor/editor-selection.svelte.d.ts.map +1 -1
  54. package/dist/viewer/editor/editor-state.svelte.d.ts +26 -19
  55. package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
  56. package/dist/viewer/editor/editor-text-body-mutations.d.ts +17 -0
  57. package/dist/viewer/editor/editor-text-body-mutations.d.ts.map +1 -0
  58. package/dist/viewer/editor/element-hit.d.ts +8 -26
  59. package/dist/viewer/editor/element-hit.d.ts.map +1 -1
  60. package/dist/viewer/editor/index.d.ts +2 -0
  61. package/dist/viewer/editor/index.d.ts.map +1 -1
  62. package/dist/viewer/export/export-wiring.svelte.d.ts +8 -1
  63. package/dist/viewer/export/export-wiring.svelte.d.ts.map +1 -1
  64. package/dist/viewer/export/rasterize-slide.d.ts +8 -1
  65. package/dist/viewer/export/rasterize-slide.d.ts.map +1 -1
  66. package/dist/viewer/index.d.ts +897 -342
  67. package/dist/viewer/index.js +20 -398
  68. package/dist/viewer/presentation/animation-media-commands.d.ts +4 -0
  69. package/dist/viewer/presentation/animation-media-commands.d.ts.map +1 -0
  70. package/dist/viewer/presentation/animation-playback-helpers.d.ts.map +1 -1
  71. package/dist/viewer/state/create-viewer-state-ai.svelte.d.ts +42 -0
  72. package/dist/viewer/state/create-viewer-state-ai.svelte.d.ts.map +1 -0
  73. package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts +13 -0
  74. package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -1
  75. package/dist/viewer/state/create-viewer-state-derived.svelte.d.ts +38 -0
  76. package/dist/viewer/state/create-viewer-state-derived.svelte.d.ts.map +1 -0
  77. package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts +21 -13
  78. package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts.map +1 -1
  79. package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts +6 -1
  80. package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts.map +1 -1
  81. package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts +3 -1
  82. package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts.map +1 -1
  83. package/dist/viewer/state/create-viewer-state-presenter.svelte.d.ts +31 -0
  84. package/dist/viewer/state/create-viewer-state-presenter.svelte.d.ts.map +1 -0
  85. package/dist/viewer/state/create-viewer-state-types.d.ts +43 -6
  86. package/dist/viewer/state/create-viewer-state-types.d.ts.map +1 -1
  87. package/dist/viewer/state/create-viewer-state.svelte.d.ts +17 -16
  88. package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -1
  89. package/dist/viewer/state/field-context.d.ts +38 -0
  90. package/dist/viewer/state/field-context.d.ts.map +1 -0
  91. package/dist/viewer/state/index.d.ts +4 -0
  92. package/dist/viewer/state/index.d.ts.map +1 -1
  93. package/dist/viewer/state/navigation.d.ts +9 -7
  94. package/dist/viewer/state/navigation.d.ts.map +1 -1
  95. package/dist/viewer/state/open-file.d.ts +15 -0
  96. package/dist/viewer/state/open-file.d.ts.map +1 -0
  97. package/dist/viewer/state/presentation-loader.svelte.d.ts +3 -1
  98. package/dist/viewer/state/presentation-loader.svelte.d.ts.map +1 -1
  99. package/dist/viewer/state/quick-access-commands.d.ts +19 -0
  100. package/dist/viewer/state/quick-access-commands.d.ts.map +1 -0
  101. package/dist/viewer/state/slide-elements.d.ts +51 -0
  102. package/dist/viewer/state/slide-elements.d.ts.map +1 -0
  103. package/dist/viewer/state/theme-locale.svelte.d.ts +68 -0
  104. package/dist/viewer/state/theme-locale.svelte.d.ts.map +1 -0
  105. package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -1
  106. package/dist/viewer/state/viewer-state-options.d.ts +31 -0
  107. package/dist/viewer/state/viewer-state-options.d.ts.map +1 -0
  108. package/dist/viewer/style/element-style.d.ts.map +1 -1
  109. package/dist/viewer/style/text-style.d.ts +15 -0
  110. package/dist/viewer/style/text-style.d.ts.map +1 -1
  111. package/package.json +1 -1
  112. package/dist/AiChatPanel-De82mmHA.js +0 -1082
@@ -1,6 +1,6 @@
1
1
  import { EditorController } from '../editor/editor-controller.svelte';
2
2
  import { EditorState } from '../editor/editor-state.svelte';
3
- import { PresentationController } from '../presentation';
3
+ import { PresentationController, PresenterSession } from '../presentation';
4
4
  import { PresentationLoader } from './presentation-loader.svelte';
5
5
  import { ViewerParityUiState } from './viewer-parity-ui.svelte';
6
6
  import { ViewerState } from './viewer-state.svelte';
@@ -11,6 +11,8 @@ export interface PresentationClusterDeps {
11
11
  loader: PresentationLoader;
12
12
  parityUi: ViewerParityUiState;
13
13
  controller: EditorController;
14
+ /** The audience-display link, driven by the B/W blackout and Ctrl+M ink keys. */
15
+ presenterSession: PresenterSession;
14
16
  getEditingActive(): boolean;
15
17
  getStageHolderEl(): HTMLDivElement | undefined;
16
18
  getRootEl(): HTMLDivElement | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"create-viewer-state-presentation.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-presentation.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAA0B,MAAM,iBAAiB,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,gBAAgB,IAAI,OAAO,CAAC;IAC5B,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAAC;IAC/C,SAAS,IAAI,cAAc,GAAG,SAAS,CAAC;CACxC;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC5D,YAAY,EAAE,sBAAsB,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,GAAG,mBAAmB,CAqDzF"}
1
+ {"version":3,"file":"create-viewer-state-presentation.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-presentation.svelte.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAA0B,MAAM,iBAAiB,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,iFAAiF;IACjF,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,gBAAgB,IAAI,OAAO,CAAC;IAC5B,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAAC;IAC/C,SAAS,IAAI,cAAc,GAAG,SAAS,CAAC;CACxC;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC5D,YAAY,EAAE,sBAAsB,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,GAAG,mBAAmB,CA8EzF"}
@@ -0,0 +1,31 @@
1
+ import { PresenterSession } from '../presentation';
2
+ import { CreateViewerStateOptions } from './create-viewer-state-types';
3
+ import { ViewerState } from './viewer-state.svelte';
4
+ export interface PresenterClusterDeps {
5
+ viewer: ViewerState;
6
+ options: CreateViewerStateOptions;
7
+ /**
8
+ * Raise the end-of-slide-show screen. A forward reference into the
9
+ * presentation cluster, which is built later (it needs the session for its
10
+ * blackout / ink-markup keys); only ever called from a live session event.
11
+ */
12
+ showEndOfShow(): void;
13
+ }
14
+ export interface PresenterCluster {
15
+ presenterSession: PresenterSession;
16
+ /** Whether the presenter view (notes + next-slide preview) is up. */
17
+ presenterMode: boolean;
18
+ /** `Date.now()` of the last {@link enterPresenterView}; the elapsed-time display. */
19
+ readonly presenterStartedAt: number;
20
+ enterPresenterView(): void;
21
+ }
22
+ /**
23
+ * The presenter/audience-display link: the cross-window `PresenterSession`,
24
+ * its connect/dispose lifecycle, the slide-index mirror, and the presenter
25
+ * view's own open flag. Split out of `createViewerState` to keep that file
26
+ * under the repo's file-size budget. Named `use*`, not `build*`: it registers
27
+ * `onMount` / `onDestroy` hooks and an `$effect`, so it must be called during
28
+ * component initialization.
29
+ */
30
+ export declare function usePresenterCluster(deps: PresenterClusterDeps): PresenterCluster;
31
+ //# sourceMappingURL=create-viewer-state-presenter.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-viewer-state-presenter.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-presenter.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,wBAAwB,CAAC;IAClC;;;;OAIG;IACH,aAAa,IAAI,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAChC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,qEAAqE;IACrE,aAAa,EAAE,OAAO,CAAC;IACvB,qFAAqF;IACrF,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,kBAAkB,IAAI,IAAI,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,GAAG,gBAAgB,CA6ChF"}
@@ -1,8 +1,10 @@
1
1
  import { PptxSaveFormat, TextSegment } from 'pptx-viewer-core';
2
- import { CanvasSize, CollaborationConfig, MobileSheetKey, ViewerMode } from 'pptx-viewer-shared';
2
+ import { CanvasSize, CollaborationConfig, FieldSubstitutionContext, MobileSheetKey, ViewerMode } from 'pptx-viewer-shared';
3
3
  import { Translator } from '../../i18n/translator';
4
4
  import { CollaborationController, CollaborationDialogsState } from '../collab';
5
5
  import { ShareDefaultsInput } from '../collab/collaboration-dialogs.svelte';
6
+ import { StageContextMenu } from '../components/props';
7
+ import { DeckApi } from '../editor/deck-api';
6
8
  import { EditingApi } from '../editor/editing-api';
7
9
  import { EditorController } from '../editor/editor-controller.svelte';
8
10
  import { FindReplaceState } from '../editor/editor-find-replace.svelte';
@@ -14,7 +16,9 @@ import { PresentationController, PresenterSession } from '../presentation';
14
16
  import { ViewerLoadDetail } from '../types';
15
17
  import { AutosaveController } from './autosave.svelte';
16
18
  import { ChromeUiState } from './chrome-ui.svelte';
19
+ import { AiCluster } from './create-viewer-state-ai.svelte';
17
20
  import { PresentationLoader } from './presentation-loader.svelte';
21
+ import { ViewerOptionsState } from './viewer-options.svelte';
18
22
  import { ViewerParityUiState } from './viewer-parity-ui.svelte';
19
23
  import { ViewerState } from './viewer-state.svelte';
20
24
  export type { CanvasSize };
@@ -38,8 +42,16 @@ export interface CreateViewerStateOptions {
38
42
  /** Already locale-bound translator; propagated to descendants via context. */
39
43
  t: Translator;
40
44
  getSmartArt3D: () => boolean;
41
- /** Whether in-place editing is enabled (host `editable` prop, post-effect value). */
45
+ /**
46
+ * The host `editable` prop. The factory mirrors it into its own
47
+ * {@link ViewerStateBag.editable} flag, which the AI seam, `setMode()` and
48
+ * Trust Center's Protected View can then flip without the host round-trip.
49
+ */
42
50
  getEditable: () => boolean;
51
+ /** Display file name, used by the AI seam as a friendly deck title. */
52
+ getFileName?: () => string | undefined;
53
+ /** Whether the host enabled the AI assistant (the `ai` prop). */
54
+ getAiEnabled?: () => boolean;
43
55
  onload?: (detail: ViewerLoadDetail) => void;
44
56
  onerror?: (message: string) => void;
45
57
  onslidechange?: (index: number) => void;
@@ -56,6 +68,12 @@ export interface CreateViewerStateOptions {
56
68
  onautosavetoggle?: (enabled: boolean) => void;
57
69
  onstartcollaboration?: (config: CollaborationConfig) => void;
58
70
  onstopcollaboration?: () => void;
71
+ /**
72
+ * Host override for File > Open > "Browse this device". Without it
73
+ * {@link ViewerStateBag.openFile} falls back to the built-in native picker
74
+ * and loads the chosen deck in place, so the control is never inert.
75
+ */
76
+ onopenfile?: () => void;
59
77
  /** DOM-bound getters, supplied by the component that owns the markup. */
60
78
  getStageHolderEl: () => HTMLDivElement | undefined;
61
79
  getRootEl: () => HTMLDivElement | undefined;
@@ -85,11 +103,17 @@ export interface ViewerStateBag {
85
103
  readonly presenterSession: PresenterSession;
86
104
  readonly exportWiring: ExportWiring;
87
105
  readonly exportUi: ExportUiState;
106
+ /** The full PowerPoint File > Options model (persisted), provided via context. */
107
+ readonly optionsState: ViewerOptionsState;
108
+ /** AI assistant bridge + on-canvas focus controller + panel open flag. */
109
+ readonly ai: AiCluster;
88
110
  readonly t: Translator;
89
111
  /** Imperative undo/redo/save/download API, matching `PowerPointViewerApi`'s editing subset. */
90
112
  readonly editingApi: EditingApi;
91
113
  /** Imperative PNG/PDF/GIF/video/print API, matching `PowerPointViewerApi`'s export subset. */
92
114
  readonly exportingApi: ExportingApi;
115
+ /** Imperative navigation/zoom/mode/slide/element API (the rest of `PowerPointViewerApi`). */
116
+ readonly deck: DeckApi;
93
117
  /** Effective scale (fit-to-viewport x user zoom), matching the main canvas. */
94
118
  readonly scale: number;
95
119
  /** User-facing zoom percent (rounded, never below 1). */
@@ -104,16 +128,19 @@ export interface ViewerStateBag {
104
128
  readonly viewerMode: ViewerMode;
105
129
  /** True while the autosave debounce/write cycle is armed. */
106
130
  readonly autosaveActive: boolean;
131
+ /**
132
+ * The live editable flag: seeded from the host `editable` prop, then
133
+ * writable so an AI edit, `deck.setMode()` or Trust Center's Protected View
134
+ * can flip it without waiting on the host.
135
+ */
136
+ editable: boolean;
107
137
  /** Read-only: mutate via {@link setAutosaveEnabled}, which also fires `onautosavetoggle`. */
108
138
  readonly autosaveEnabled: boolean;
109
139
  setAutosaveEnabled(enabled: boolean): void;
110
140
  presenterMode: boolean;
111
141
  /** `Date.now()` timestamp of the last `enterPresenterView()` call; the presenter view's elapsed-time display. */
112
142
  readonly presenterStartedAt: number;
113
- stageContextMenu: {
114
- x: number;
115
- y: number;
116
- } | null;
143
+ stageContextMenu: StageContextMenu | null;
117
144
  readonly activeMobileSheet: MobileSheetKey;
118
145
  setActiveMobileSheet(next: MobileSheetKey): void;
119
146
  readonly notesExpanded: boolean;
@@ -121,6 +148,16 @@ export interface ViewerStateBag {
121
148
  readonly signatureWarningOpen: boolean;
122
149
  enterPresenterView(): void;
123
150
  closeSignatureWarning(): void;
151
+ /** File > Open > "Browse this device" (host override, else the native picker). */
152
+ openFile(): void;
153
+ /** Run a Quick Access Toolbar command by catalog id (unknown ids no-op). */
154
+ runQuickAccessCommand(id: string): void;
155
+ /**
156
+ * Deck-level OOXML field-substitution context (date/time, header/footer,
157
+ * document properties, plus the active slide's number and title), also
158
+ * published to descendants via `provideFieldContext`.
159
+ */
160
+ fieldContext(): FieldSubstitutionContext;
124
161
  onNotesToggle(): void;
125
162
  onNotesCommit(notes: string, segments?: TextSegment[]): void;
126
163
  onFullscreenToggle(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"create-viewer-state-types.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-types.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,kFAAkF;IAClF,QAAQ,IAAI,IAAI,CAAC;IACjB,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC;;;;OAIG;IACH,YAAY,IAAI,wBAAwB,CAAC;IACzC,aAAa,IAAI,IAAI,CAAC;IACtB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAC7D,kBAAkB,IAAI,IAAI,CAAC;IAC3B,kBAAkB,IAAI,IAAI,CAAC;IAC3B,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,iFAAiF;IACjF,OAAO,IAAI,IAAI,CAAC;CAChB"}
@@ -1,28 +1,29 @@
1
1
  import { CreateViewerStateOptions, ViewerStateBag } from './create-viewer-state-types';
2
2
  /**
3
3
  * Builds every reactive controller the ribbon, toolbar, and slide canvas
4
- * need: the runes port of `PowerPointViewer.svelte`'s own construction block
5
- * (originally inlined at the top of its `<script>`), extracted so a host can
6
- * compose its own viewer shell out of `Ribbon` / `ViewerToolbar` / the state
7
- * classes without pulling in the whole `PowerPointViewer` component.
4
+ * need. This is `PowerPointViewer.svelte`'s entire construction block,
5
+ * extracted so that SFC stays thin composition and so a host can build its
6
+ * own viewer shell out of `Ribbon` / `ViewerToolbar` / the state classes
7
+ * without pulling in the whole `PowerPointViewer` component.
8
8
  *
9
9
  * MUST be called synchronously from a `.svelte` component's own script body
10
10
  * (top level, not inside a callback or after an `await`): it registers
11
11
  * `onMount` / `onDestroy` hooks and Svelte context (`setContext`) via
12
12
  * `provideTranslator` / `provideSmartArt3D` / `provideRenderContext` /
13
- * `provideZoomNavigation` (inside the editor-ui cluster) / `provideInspectorDeck`,
14
- * all of which require an active component-initialisation context. Svelte's
15
- * lifecycle context stays active for the whole synchronous execution of a
16
- * component's script, not just its top-level statements, so calling this
17
- * from a component's script works exactly like inlining the same code would.
13
+ * `provideInspectorDeck` / `provideFieldContext` (plus more inside the
14
+ * clusters), all of which require an active component-initialisation
15
+ * context. Svelte's lifecycle context stays active for the whole synchronous
16
+ * execution of a component's script, not just its top-level statements, so
17
+ * calling this from a component's script works exactly like inlining the
18
+ * same code would.
18
19
  *
19
- * Construction is split across a few `create-viewer-state-*.svelte.ts`
20
- * helpers purely to stay under the repo's file-size budget; the ORDER those
21
- * helpers are invoked in below mirrors the original inline code (later
22
- * clusters close over earlier ones), with one deliberate reordering: the
23
- * collaboration cluster is now built right after `editor` (it doesn't need
24
- * the editing-chrome cluster), which lets `controller` close over the real
25
- * `collab.setCursor` instead of a forward reference.
20
+ * Construction is split across the `create-viewer-state-*.svelte.ts` helpers
21
+ * purely to stay under the repo's file-size budget; the ORDER they are
22
+ * invoked in below mirrors the original inline code (later clusters close
23
+ * over earlier ones), with one deliberate reordering: the collaboration
24
+ * cluster is built right after `editor` (it doesn't need the editing-chrome
25
+ * cluster), which lets `controller` close over the real `collab.setCursor`
26
+ * instead of a forward reference.
26
27
  *
27
28
  * Call the returned `destroy()` from the host component's own `onDestroy`.
28
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"create-viewer-state.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state.svelte.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAQ5F;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,cAAc,CAmOnF"}
1
+ {"version":3,"file":"create-viewer-state.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state.svelte.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAU5F;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,cAAc,CAmPnF"}
@@ -0,0 +1,38 @@
1
+ import { FieldSubstitutionContext } from 'pptx-viewer-shared';
2
+ /**
3
+ * Svelte context wiring for the OOXML field-substitution context (slide number,
4
+ * date/time, header/footer, slide title, custom document properties) used by the
5
+ * text renderers, mirroring Vue's `FieldContextKey` provide/inject and Angular's
6
+ * `FieldContextService`.
7
+ *
8
+ * Two layers share one key, so a consumer only ever reads the nearest value:
9
+ * `PowerPointViewer` provides the deck-level context at the root, and each
10
+ * `SlideStage` re-provides it re-pointed at the slide it actually paints (a
11
+ * thumbnail must show its own number, not the active slide's).
12
+ *
13
+ * The provided value is a GETTER, not a plain context object, because Svelte
14
+ * context is captured once at component initialisation: closing over the live
15
+ * runes state is what keeps a consumer's `$derived` re-running when the deck
16
+ * settings or the current slide change.
17
+ */
18
+ /** Getter over the current field-substitution context (`undefined` = no substitution). */
19
+ export type FieldContextGetter = () => FieldSubstitutionContext | undefined;
20
+ /**
21
+ * Exported (not just module-private) so tests can seed it directly via
22
+ * `mount(Component, { context: new Map([[FieldContextKey, () => ctx]]) })`
23
+ * without needing a full `PowerPointViewer` host tree.
24
+ */
25
+ export declare const FieldContextKey: unique symbol;
26
+ /** Provide the field-context getter to the component subtree (root and each stage). */
27
+ export declare function provideFieldContext(getFieldContext: FieldContextGetter): void;
28
+ /**
29
+ * The field-context GETTER for this subtree, or `undefined` when nothing
30
+ * provides one (standalone renderer, export, unit test), in which case field
31
+ * runs keep their authored placeholder text.
32
+ *
33
+ * `getContext` only resolves during component initialisation, so this must be
34
+ * called at init and the returned getter invoked inside a `$derived` to keep the
35
+ * read reactive.
36
+ */
37
+ export declare function getFieldContextGetter(): FieldContextGetter | undefined;
38
+ //# sourceMappingURL=field-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-context.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/field-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAGnE;;;;;;;;;;;;;;;GAeG;AAEH,0FAA0F;AAC1F,MAAM,MAAM,kBAAkB,GAAG,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,eAAe,eAAsC,CAAC;AAEnE,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,kBAAkB,GAAG,IAAI,CAE7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,GAAG,SAAS,CAEtE"}
@@ -8,6 +8,10 @@ export type { InspectorTabId } from './chrome-ui.svelte';
8
8
  export { PresentationLoader } from './presentation-loader.svelte';
9
9
  export { ViewerState } from './viewer-state.svelte';
10
10
  export { provideSmartArt3D, useSmartArt3D } from './smart-art-3d-context';
11
+ export { getFieldContextGetter, provideFieldContext } from './field-context';
12
+ export type { FieldContextGetter } from './field-context';
13
+ export { getSlideElementsGetter, provideSlideElements } from './slide-elements';
14
+ export type { SlideElementsGetter } from './slide-elements';
11
15
  export { createViewerState } from './create-viewer-state.svelte';
12
16
  export type { CreateViewerStateOptions, ViewerStateBag } from './create-viewer-state-types';
13
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,QAAQ,EACR,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,GACd,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACN,eAAe,EACf,cAAc,EACd,kBAA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,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAChF,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,YAAY,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC"}
@@ -11,13 +11,15 @@ export type NavigationAction = 'next' | 'prev' | 'first' | 'last';
11
11
  * conventions used by the other bindings (arrows, paging keys, space, Home/End).
12
12
  */
13
13
  export declare function resolveNavigationKey(key: string): NavigationAction | undefined;
14
- /** Zoom bounds and multiplicative step shared by toolbar and shortcuts. */
15
- export declare const ZOOM_MIN_PERCENT = 25;
16
- export declare const ZOOM_MAX_PERCENT = 400;
17
- /** Next zoom level up from `current` percent, clamped. */
18
- export declare function zoomInPercent(current: number): number;
19
- /** Next zoom level down from `current` percent, clamped. */
20
- export declare function zoomOutPercent(current: number): number;
14
+ /**
15
+ * Zoom bounds and step, re-exported from `pptx-viewer-shared`.
16
+ *
17
+ * These used to be a local 1.25x multiplicative step, so one press of the same
18
+ * button zoomed 25% here and 10% in React/Vue/Angular. The arithmetic now lives
19
+ * in one place for all five bindings; these names stay because they are part of
20
+ * this package's public API.
21
+ */
22
+ export { ZOOM_MAX_PERCENT, ZOOM_MIN_PERCENT, zoomInPercent, zoomOutPercent, } from 'pptx-viewer-shared';
21
23
  /**
22
24
  * Fit-to-viewport scale for a canvas inside a viewport, with breathing room.
23
25
  * Returns a strictly positive scale (falls back to 1 while unmeasured).
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/navigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpE;AAED,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAElE;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAmB9E;AAED,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAGpC,0DAA0D;AAC1D,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,4DAA4D;AAC5D,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACvB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,SAAK,GACV,MAAM,CASR"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/navigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpE;AAED,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAElE;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAmB9E;AAED;;;;;;;GAOG;AACH,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,GACd,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,wBAAgB,QAAQ,CACvB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,SAAK,GACV,MAAM,CASR"}
@@ -0,0 +1,15 @@
1
+ import { PresentationLoader } from './presentation-loader.svelte';
2
+ /**
3
+ * Build the File > Open > "Browse this device" handler.
4
+ *
5
+ * The host can override it (the `onopenfile` prop); otherwise this falls back
6
+ * to the built-in native picker and loads the chosen deck in place. Without the
7
+ * fallback the control is inert in every host that does not pass `onopenfile`,
8
+ * which is what made it look dead in the demo; React, Vue, Angular and Vanilla
9
+ * all fall back this way.
10
+ *
11
+ * `getOverride` is read lazily so a host that supplies the callback later (or
12
+ * conditionally) still wins.
13
+ */
14
+ export declare function createOpenFile(loader: PresentationLoader, getOverride: () => (() => void) | undefined): () => void;
15
+ //# sourceMappingURL=open-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-file.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/open-file.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,kBAAkB,EAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,GACzC,MAAM,IAAI,CAcZ"}
@@ -1,4 +1,4 @@
1
- import { ParsedTableStyleMap, PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxEmbeddedFont, PptxHandoutMaster, PptxHeaderFooter, PptxNotesMaster, PptxPresentationProperties, PptxCustomShow, PptxSection, PptxSlide, PptxSlideMaster, PptxThemeColorScheme, PptxTheme, PptxThemeOption, PptxHandler } from 'pptx-viewer-core';
1
+ import { ParsedTableStyleMap, PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxEmbeddedFont, PptxHandoutMaster, PptxHeaderFooter, PptxNotesMaster, PptxPresentationProperties, PptxCustomShow, PptxSection, PptxSlide, PptxSlideMaster, PptxTagCollection, PptxThemeColorScheme, PptxTheme, PptxThemeOption, PptxHandler } from 'pptx-viewer-core';
2
2
  import { CanvasSize } from 'pptx-viewer-shared';
3
3
  /**
4
4
  * Reactive load pipeline for the Svelte viewer: the runes port of the Vue
@@ -24,6 +24,8 @@ export declare class PresentationLoader {
24
24
  coreProperties: PptxCoreProperties | undefined;
25
25
  appProperties: PptxAppProperties | undefined;
26
26
  customProperties: PptxCustomProperty[];
27
+ /** Parsed `ppt/tags/*.xml` collections, editable in the inspector's Tags section. */
28
+ tagCollections: PptxTagCollection[];
27
29
  embeddedFonts: PptxEmbeddedFont[];
28
30
  hasDigitalSignatures: boolean;
29
31
  digitalSignatureCount: number;
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-loader.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/presentation-loader.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAsB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD;;;;;;;;GAQG;AACH,qBAAa,kBAAkB;;IAC9B,8DAA8D;IAC9D,MAAM,cAA+B;IACrC,wEAAwE;IACxE,YAAY,oBAAqC;IACjD,WAAW,8BAAsD;IACjE,aAAa,gCAAwD;IACrE,QAAQ,gBAAiC;IACzC,YAAY,mBAAoC;IAChD,sBAAsB,6BAA8C;IACpE,WAAW,mBAAoC;IAC/C,cAAc,iCAAyD;IACvE,aAAa,gCAAwD;IACrE,gBAAgB,uBAAwC;IACxD,aAAa,qBAAsC;IACnD,oBAAoB,UAAiB;IACrC,qBAAqB,SAAa;IAClC,mBAAmB,UAAiB;IACpC,yDAAyD;IACzD,SAAS,UAAiB;IAC1B,eAAe,yBAAiD;IAChE,4EAA4E;IAC5E,YAAY,oBAAqC;IACjD,mCAAmC;IACnC,UAAU,aAGP;IACH,qEAAqE;IACrE,aAAa,sBAA8C;IAC3D,4EAA4E;IAC5E,WAAW,mCAA2D;IACtE,iBAAiB,wBAAgD;IACjE,qEAAqE;IACrE,aAAa,kCAA0D;IACvE,sCAAsC;IACtC,OAAO,UAAiB;IACxB,wDAAwD;IACxD,KAAK,gBAA+B;IACpC,wEAAwE;IACxE,WAAW,UAAiB;IAC5B,4DAA4D;IAC5D,OAAO,qBAAwC;IAC/C,wEAAwE;IACxE,SAAS,SAAa;IAKtB,yDAAyD;IACnD,IAAI,CAAC,GAAG,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAqFxD,qEAAqE;IACrE,OAAO,IAAI,IAAI;CAQf"}
1
+ {"version":3,"file":"presentation-loader.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/presentation-loader.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAsB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD;;;;;;;;GAQG;AACH,qBAAa,kBAAkB;;IAC9B,8DAA8D;IAC9D,MAAM,cAA+B;IACrC,wEAAwE;IACxE,YAAY,oBAAqC;IACjD,WAAW,8BAAsD;IACjE,aAAa,gCAAwD;IACrE,QAAQ,gBAAiC;IACzC,YAAY,mBAAoC;IAChD,sBAAsB,6BAA8C;IACpE,WAAW,mBAAoC;IAC/C,cAAc,iCAAyD;IACvE,aAAa,gCAAwD;IACrE,gBAAgB,uBAAwC;IACxD,qFAAqF;IACrF,cAAc,sBAAuC;IACrD,aAAa,qBAAsC;IACnD,oBAAoB,UAAiB;IACrC,qBAAqB,SAAa;IAClC,mBAAmB,UAAiB;IACpC,yDAAyD;IACzD,SAAS,UAAiB;IAC1B,eAAe,yBAAiD;IAChE,4EAA4E;IAC5E,YAAY,oBAAqC;IACjD,mCAAmC;IACnC,UAAU,aAGP;IACH,qEAAqE;IACrE,aAAa,sBAA8C;IAC3D,4EAA4E;IAC5E,WAAW,mCAA2D;IACtE,iBAAiB,wBAAgD;IACjE,qEAAqE;IACrE,aAAa,kCAA0D;IACvE,sCAAsC;IACtC,OAAO,UAAiB;IACxB,wDAAwD;IACxD,KAAK,gBAA+B;IACpC,wEAAwE;IACxE,WAAW,UAAiB;IAC5B,4DAA4D;IAC5D,OAAO,qBAAwC;IAC/C,wEAAwE;IACxE,SAAS,SAAa;IAKtB,yDAAyD;IACnD,IAAI,CAAC,GAAG,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAsFxD,qEAAqE;IACrE,OAAO,IAAI,IAAI;CAQf"}
@@ -0,0 +1,19 @@
1
+ import { DeckApi } from '../editor/deck-api';
2
+ import { ExportingApi } from '../export/exporting-api';
3
+ import { ViewerParityUiState } from './viewer-parity-ui.svelte';
4
+ /** Everything the Quick Access Toolbar's configurable commands act on. */
5
+ export interface QuickAccessCommandDeps {
6
+ deck: DeckApi;
7
+ exportingApi: ExportingApi;
8
+ parityUi: ViewerParityUiState;
9
+ }
10
+ /**
11
+ * Run a Quick Access Toolbar command by catalog id. Save/Undo/Redo keep their
12
+ * dedicated title-bar buttons (they carry the undo state), so only the
13
+ * options-configured remainder arrives here; an unknown id is a no-op.
14
+ *
15
+ * Extracted from `PowerPointViewer.svelte` to keep that file under the repo's
16
+ * file-size budget.
17
+ */
18
+ export declare function runQuickAccessCommand(id: string, deps: QuickAccessCommandDeps): void;
19
+ //# sourceMappingURL=quick-access-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-access-commands.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/quick-access-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAiBpF"}
@@ -0,0 +1,51 @@
1
+ import { PptxElement } from 'pptx-viewer-core';
2
+ /**
3
+ * Svelte context wiring for the element list of the slide currently being
4
+ * painted, mirroring Vue's `SlideElementsKey` provide/inject, Angular's
5
+ * `slideElements` input and the `slide` already on Vanilla's render context.
6
+ *
7
+ * Why a context rather than a prop: the only consumer is the text renderer, and
8
+ * what it needs is its SIBLINGS, not its own data. Threading a whole slide's
9
+ * element array down `SlideStage` -> `ElementRenderer` (and through the group
10
+ * renderer's recursion) to serve one feature would put an array-typed prop on
11
+ * every element in the deck; context reaches the same consumers without touching
12
+ * the render path, exactly as the field context next door does.
13
+ *
14
+ * The consumer is `a:linkedTxbx` overflow: a text box in a linked chain renders
15
+ * only the slice of the chain's text that the preceding boxes could not hold,
16
+ * which is computable only from the other boxes in the chain. Without this,
17
+ * every box in a chain painted the chain's FULL text.
18
+ *
19
+ * The provided value is a GETTER, not a plain array, because Svelte context is
20
+ * captured once at component initialisation: closing over the live runes state
21
+ * is what keeps a consumer's `$derived` re-running when the stage changes slide
22
+ * or an element is edited.
23
+ */
24
+ /** Getter over the current slide's element list (`undefined` = no chain resolution). */
25
+ export type SlideElementsGetter = () => readonly PptxElement[] | undefined;
26
+ /**
27
+ * Exported (not just module-private) so tests can seed it directly via
28
+ * `mount(Component, { context: new Map([[SlideElementsKey, () => els]]) })`
29
+ * without needing a full `SlideStage` host tree.
30
+ */
31
+ export declare const SlideElementsKey: unique symbol;
32
+ /**
33
+ * Publish the element list of the slide this subtree paints.
34
+ *
35
+ * Provided per stage rather than once at the viewer root because a thumbnail,
36
+ * presenter preview or export stage paints a slide other than the active one,
37
+ * and resolving a chain against the wrong slide's elements would distribute the
38
+ * wrong text (or find no chain at all).
39
+ */
40
+ export declare function provideSlideElements(getSlideElements: SlideElementsGetter): void;
41
+ /**
42
+ * The slide-elements GETTER for this subtree, or `undefined` when nothing
43
+ * provides one (standalone renderer, export, unit test), in which case a linked
44
+ * text box falls back to its own authored segments.
45
+ *
46
+ * `getContext` only resolves during component initialisation, so this must be
47
+ * called at init and the returned getter invoked inside a `$derived` to keep the
48
+ * read reactive.
49
+ */
50
+ export declare function getSlideElementsGetter(): SlideElementsGetter | undefined;
51
+ //# sourceMappingURL=slide-elements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slide-elements.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/slide-elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAAG,MAAM,SAAS,WAAW,EAAE,GAAG,SAAS,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,eAAuC,CAAC;AAErE;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,gBAAgB,EAAE,mBAAmB,GAAG,IAAI,CAEhF;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,mBAAmB,GAAG,SAAS,CAExE"}
@@ -0,0 +1,68 @@
1
+ import { ThemeCatalogEntry, ViewerTheme } from 'pptx-viewer-shared';
2
+ /** Host props the chrome's theme/locale selection reads (all read reactively). */
3
+ export interface ThemeLocaleStateDeps {
4
+ /** Initial File > Options > Appearance key (host `defaultThemeKey` prop). */
5
+ getDefaultThemeKey(): string | undefined;
6
+ /** Host-supplied theme catalog, or the shared `THEME_CATALOG`. */
7
+ getAvailableThemes(): readonly ThemeCatalogEntry[] | undefined;
8
+ /** Host `theme` prop: still wins whenever the resolved key is `'default'`. */
9
+ getThemeProp(): ViewerTheme | undefined;
10
+ /**
11
+ * Host `onThemeChange`; when present the host owns persistence. Read through
12
+ * a getter, not captured, so a host that supplies (or drops) the callback on
13
+ * a later render is honoured.
14
+ */
15
+ getOnThemeChange(): ((themeKey: string) => void) | undefined;
16
+ /** Initial language (host `defaultLocale` prop). */
17
+ getDefaultLocale(): string | undefined;
18
+ /** Host `locale` prop, used until the user picks a language via Options. */
19
+ getLocaleProp(): string;
20
+ /** Host `onLocaleChange`; when present the host owns persistence. */
21
+ getOnLocaleChange(): ((localeCode: string) => void) | undefined;
22
+ }
23
+ /**
24
+ * Theme + locale selection for the viewer chrome (File > Options
25
+ * Appearance/Language, plus the Design tab's swatch gallery).
26
+ *
27
+ * `themeKey` is the single source of truth for the chrome's theme; both entry
28
+ * points funnel through {@link setThemeKey} so they stay in sync. Values are
29
+ * persisted to the shared `pptx-viewer-prefs` localStorage key unless the host
30
+ * wires `onThemeChange` / `onLocaleChange`, in which case persistence is the
31
+ * host's responsibility.
32
+ *
33
+ * Extracted from `PowerPointViewer.svelte` to keep that file within the repo's
34
+ * file-size budget. MUST be constructed during component initialization: the
35
+ * initial reads are `untrack`ed exactly as the inline version was, so a later
36
+ * prop change never clobbers a user selection.
37
+ */
38
+ export declare class ThemeLocaleState {
39
+ #private;
40
+ themeKey: string;
41
+ /**
42
+ * Unlike `theme`, there is no "host forces this locale no matter what" case
43
+ * in this binding, so once the user picks a language via Options the
44
+ * override always wins over the `locale` prop for the rest of the session
45
+ * (the opposite precedence direction from `theme`, where the host prop still
46
+ * wins over a `'default'` override).
47
+ */
48
+ localeOverride: string | undefined;
49
+ constructor(deps: ThemeLocaleStateDeps);
50
+ get catalog(): readonly ThemeCatalogEntry[];
51
+ /**
52
+ * The theme actually applied to the chrome. The host `theme` prop still wins
53
+ * whenever the resolved key is `'default'` (that catalog entry maps to
54
+ * `undefined`), preserving the prop-over-preference precedence.
55
+ */
56
+ get effectiveTheme(): ViewerTheme | undefined;
57
+ get effectiveLocale(): string;
58
+ setThemeKey(key: string): void;
59
+ /**
60
+ * The Design tab's theme-preset gallery predates the Options catalog and
61
+ * passes a `ViewerTheme` value directly (its own small `THEME_SWATCHES`
62
+ * idiom); resolve it back to a catalog key so both entry points update the
63
+ * same `themeKey` and stay in sync with each other.
64
+ */
65
+ setTheme(next: ViewerTheme | undefined): void;
66
+ setLocale(code: string): void;
67
+ }
68
+ //# sourceMappingURL=theme-locale.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-locale.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/theme-locale.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGzE,kFAAkF;AAClF,MAAM,WAAW,oBAAoB;IACpC,6EAA6E;IAC7E,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAAC;IACzC,kEAAkE;IAClE,kBAAkB,IAAI,SAAS,iBAAiB,EAAE,GAAG,SAAS,CAAC;IAC/D,8EAA8E;IAC9E,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,iBAAiB;IACjC,SAAS,IAAI,UAAU,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACzD,WAAW,IAAI,OAAO,CAAC;IACvB,eAAe,IAAI,MAAM,CAAC;IAC1B,aAAa,IAAI,UAAU,CAAC;IAC5B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,IAAI,CAAC,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC9D,UAAU,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACtD,gBAAgB,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1D;;;;;;OAMG;IACH,gBAAgB,CAAC,IAAI,IAAI,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAqF9D"}
@@ -0,0 +1,31 @@
1
+ import { Translator } from '../../i18n/translator';
2
+ import { PowerPointViewerProps } from '../types';
3
+ import { CreateViewerStateOptions } from './create-viewer-state-types';
4
+ /**
5
+ * The values only the component that renders the markup can supply: its
6
+ * `bind:this` targets, the measured viewport, the master-view scale a child
7
+ * reports back, and the already locale-bound translator.
8
+ */
9
+ export interface ViewerDomAccessors {
10
+ t: Translator;
11
+ getStageHolderEl(): HTMLDivElement | undefined;
12
+ getRootEl(): HTMLDivElement | undefined;
13
+ getViewportWidth(): number;
14
+ getViewportHeight(): number;
15
+ getMasterScale(): number;
16
+ }
17
+ /**
18
+ * Map `PowerPointViewer`'s host props onto {@link CreateViewerStateOptions}.
19
+ *
20
+ * EVERY field is a getter or a closure over `getProps()`, never a snapshot:
21
+ * `$props()` values are only reactive when read inside a function, so building
22
+ * this object with plain `onload,` shorthand would freeze the viewer to the
23
+ * host's first render and silently ignore every later callback or config
24
+ * change. Splitting the mapping out here keeps that rule in one place (and the
25
+ * root SFC within the repo's file-size budget).
26
+ *
27
+ * The prop defaults applied below are the same ones the component's own
28
+ * `$props()` destructuring used to declare.
29
+ */
30
+ export declare function toViewerStateOptions(getProps: () => PowerPointViewerProps, dom: ViewerDomAccessors): CreateViewerStateOptions;
31
+ //# sourceMappingURL=viewer-state-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewer-state-options.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/viewer-state-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,CAAC,EAAE,UAAU,CAAC;IACd,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAAC;IAC/C,SAAS,IAAI,cAAc,GAAG,SAAS,CAAC;IACxC,gBAAgB,IAAI,MAAM,CAAC;IAC3B,iBAAiB,IAAI,MAAM,CAAC;IAC5B,cAAc,IAAI,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CACnC,QAAQ,EAAE,MAAM,qBAAqB,EACrC,GAAG,EAAE,kBAAkB,GACrB,wBAAwB,CAqE1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"element-style.d.ts","sourceRoot":"","sources":["../../../src/viewer/style/element-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAetD;;;;;GAKG;AAEH,kFAAkF;AAClF,wBAAgB,iBA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,cAAc,CAAC,EAAE,OAAO,GACtB,WAAW,CAQb;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAC1B,EAAE,EAAE,WAAW,EACf,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,MAAM,GAAG,SAAS,CAEpB"}