pptx-vanilla-viewer 3.26.0 → 3.29.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.
package/dist/index.d.ts CHANGED
@@ -1,58 +1,9 @@
1
- import { $ as InlineTextSelection, $n as ViewerThemeColors, $r as PptxTagCollection, $t as StrokeToInkElementOpts, An as forgetSessionDeck, Ar as PptxCommentMention, B as ExternalCollaborationAwareness, Bn as parsePresentationSessionId, Br as PptxHeaderFooter, Bt as RunProgramNotice, C as CompatibilityWarningToast, Cn as ViewportFitPadding, Cr as PptxAnimationTimelineAnchor, Ct as PresentationSnapshot, D as CropElementUpdate, Dn as canInteractWithElement, Dr as PptxChartData, Dt as ReadOnlyRecommendation, E as ContextMenuCustomization, En as buildInlineTextCommitPatch, Er as PptxAppProperties, Et as RIBBON_TAB_IDS, F as EditorKeyActionName, Fn as isLegacyBinaryPresentation, Fr as PptxData, Ft as RibbonGalleryApplyResult, G as GradientState, Gr as PptxNotesMaster, Gt as SessionDeck, H as ExternalCollaborationSnapshot, Hn as rememberSessionDeck, Hr as PptxLayoutPreview, I as ElementAnimationState, In as isSupportedPresentationFile, Ir as PptxElement, It as RibbonGalleryContext, J as HostElementMenuContext, Jr as PptxSlide, Jt as ShortcutChord, K as Guide, Kr as PptxPresentationProperties, Kt as ShapePresetType, L as ElementClipboardPayload, Ln as loadPresentationDeck, Lr as PptxElementAnimation, Lt as RibbonGroupId, Mr as PptxCoreProperties, Mt as RibbonContextualTabId, N as EDITOR_SHORTCUT_ACTION_IDS, Nn as getSessionTabId, Nr as PptxCustomProperty, Nt as RibbonControlId, O as CropSession, On as createImageElementFromFile, Or as PptxComment, Ot as RemoteCursor, P as ELEMENT_CONTEXT_MENU_COMMAND_IDS, Pr as PptxCustomShow, Pt as RibbonCustomization, Q as InlineTextEditSnapshot, Qn as ViewerTheme, Qr as PptxTableData, R as ElementUpdate, Rn as loadSessionDeck, Rr as PptxEmbeddedFont, Rt as RibbonTransitionDraft, S as CollaborationTransport, Sn as ViewportFitOptions, Sr as PptxAnimationSequence, St as PresentationPointerTool, T as ContextMenuCommandId, Tn as ZoomNavigationTarget, Tr as PptxAnimationTrigger, U as FieldSubstitutionContext, Ur as PptxModernCommentAuthor, Ut as SanitizedPresence, V as ExternalCollaborationSession, Vn as presentationBaseName, Vr as PptxImageEffects, W as FreeformToolKind, Wr as PptxModifyVerifier, Wt as SavedPresentationFormat, Xn as savedPresentationFileName, Xr as PptxSlideTransition, Xt as SlideSizeRescaleMode, Y as HostMenuCommand, Yn as restoreSessionDeck, Yr as PptxSlideMaster, Yt as SlideSizeEmu, Z as InlineListReadResult, Zn as ThemeCatalogEntry, Zr as PptxTableCellStyle, Zt as SlideTemplateId, _ as CollabLoadOrigin, _i as PptxThemeColorRef, _n as ViewerMode, _r as ParsedTableStyleMap, _t as PPTX_OPEN_ACCEPT, a as AutosaveRecord, ai as PptxTransitionType, an as ToolbarTabId, ar as vermilionLightTheme, at as ModifyPasswordCheckResult, b as CollaborationRole, bn as ViewerPanelId, br as PptxAnimationPreset, bt as PowerPointViewerAPI, c as BackstageCardId, ci as TablePptxElement, cn as VIEWER_FEATURE_IDS, cr as PptxHandler, ct as OPTIONS_SETTING_IDS, d as CANVAS_CONTEXT_MENU_COMMAND_IDS, di as SmartArtColorScheme, dn as ViewerCustomizationApi, dr as SvgExportOptions, dt as OptionsSectionId, ei as PptxTextStyleLevels, en as TOOLBAR_BUTTON_IDS, er as defaultCssVars, et as InsertChartKind, fi as SmartArtLayout, fn as ViewerCustomizationController, fr as ElementAction, ft as OptionsSettingId, g as ChartPartRef, gi as XmlObject, gn as ViewerFontSource, gr as OlePptxElement, h as ChangeCaseMode, hi as TextStyle, hn as ViewerFeatureId, hr as OleObjectType, i as AnimationGroup, ii as PptxThemeOption, in as ToolbarButtonId, ir as vermilionDarkTheme, it as MobileSheetKey, jr as PptxCompatibilityWarning, k as CssStyleMap, kn as describeCollaborationShellState, kr as PptxCommentAuthor, kt as ResolvedCustomization, l as BackstageCustomization, li as PptxSmartArtData, ln as VIEWER_PANEL_IDS, lr as PptxHandlerSaveOptions, lt as OptionsCustomization, m as CanvasSize, mi as TextSegment, mn as ViewerExportFormatId, mr as MediaPptxElement, ni as PptxThemeColorScheme, nn as TextAdvancedChanges, nr as defaultThemeColors, nt as MasterViewCrudAction, o as BACKSTAGE_CARD_IDS, oi as PptxViewProperties, on as VIEWER_DIALOG_IDS, or as AccessibilityIssue, ot as OPTIONS_PAGE_IDS, p as CanvasContextMenuCommandId, pi as SmartArtLayoutType, pn as ViewerDialogId, pr as MasterViewTab, pt as OptionsSettingValues, q as HostCanvasMenuContext, qr as PptxSection, qt as ShareDefaults, r as AccountAuthConfig, ri as PptxThemeFontScheme, rn as ToolbarActionId, rr as themeToCssVars, rt as MasterViewCrudActionId, s as BACKSTAGE_PAGE_IDS, si as ShapeStyle, sn as VIEWER_EXPORT_FORMAT_IDS, sr as MergeShapeOperation, st as OPTIONS_SECTION_IDS, ti as PptxTheme, tr as defaultRadius, tt as KeyboardCustomization, u as BackstagePage, ui as PptxSmartArtNodeStyle, un as ViewerCustomization, ur as PptxSaveFormat, ut as OptionsPageId, v as CollaborationConfig, vn as ViewerOptionPrimitive, vr as PptxAfterAnimationAction, vt as PRESENTATION_OPEN_EXTENSIONS, w as ConnectionStatus, wr as PptxAnimationTimingCurve, wt as PrintSettings, x as CollaborationShellState, xn as ViewerQuickAccessOptions, xr as PptxAnimationRepeatMode, xt as PresentationBlackout, y as CollaborationLivePatcher, yn as ViewerOptionsStore, yr as PptxAnimationDirection, yt as PasteSpecialFormat, z as ElementUpdateOptions, zn as overlayInlineTextSnapshot, zr as PptxHandoutMaster, zt as RulerUnit } from "./transition-overlay-C_wuJuse.js";
2
- import { ChatTransport, LanguageModel, ToolSet, UIMessage } from "ai";
3
- import "pptx-viewer-mcp";
1
+ import { a as __reExport, i as __exportAll, r as index_d_exports$2 } from "./transition-overlay-xJ7M4VZA.js";
2
+ import { AccountAuthConfig, AccountAuthConfig as AccountAuthConfig$1, AlignEdge, AnimationGroup, AutosaveActivation, AutosaveRecord, AutosaveRecord as AutosaveRecord$1, AutosaveRecoveryOffer, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, BackstageCardId, BackstageCustomization, BackstagePage, CANVAS_CONTEXT_MENU_COMMAND_IDS, CanvasContextMenuCommandId, CanvasSize, ChangeCaseMode, ChartPartRef, CollabLoadOrigin, CollabLoadOrigin as CollabLoadOrigin$1, CollaborationConfig, CollaborationConfig as CollaborationConfig$1, CollaborationLivePatcher, CollaborationLivePatcher as CollaborationLivePatcher$1, CollaborationRole, CollaborationShellState, CollaborationShellState as CollaborationShellState$1, CollaborationTransport, CompatibilityWarningToast, ConnectionStatus, ConnectionStatus as ConnectionStatus$1, ContextMenuCommandId, ContextMenuCustomization, ContextMenuTableContext, CropElementUpdate, CropSession, DeckSaveIntent, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, EditorKeyActionName, ElementAnimationState, ElementClipboardPayload, ElementUpdate, ElementUpdate as ElementUpdate$1, ElementUpdateOptions, ElementUpdateOptions as ElementUpdateOptions$1, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, FreeformToolKind, GradientState, Guide, HostCanvasMenuContext, HostElementMenuContext, HostMenuCommand, InlineListReadResult, InlineListReadResult as InlineListReadResult$1, InlineTextEditSnapshot, InlineTextEditSnapshot as InlineTextEditSnapshot$1, InlineTextSelection, InlineTextSelection as InlineTextSelection$1, InsertChartKind, KeyboardCustomization, MasterViewCrudAction, MasterViewCrudActionId, MobileSheetKey, ModifyPasswordCheckResult, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, OptionsCustomization, OptionsPageId, OptionsPageId as OptionsPageId$1, OptionsSectionId, OptionsSectionId as OptionsSectionId$1, OptionsSettingId, OptionsSettingId as OptionsSettingId$1, OptionsSettingValues, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PasteSpecialFormat, PowerPointViewerAPI, PresentationBlackout, PresentationPointerTool, PresentationSnapshot, PrintSettings, RIBBON_TAB_IDS, RasterizeElementResult, RasterizeElementTilesResult, ReadOnlyRecommendation, RemoteCursor, RemoteCursor as RemoteCursor$1, ResolvedCustomization, ResolvedCustomization as ResolvedCustomization$1, RibbonContextualTabId, RibbonControlId, RibbonCustomization, RibbonGalleryApplyResult, RibbonGalleryContext, RibbonGroupId, RibbonTransitionDraft, RulerUnit, RunProgramNotice, SanitizedPresence, SanitizedPresence as SanitizedPresence$1, SavedPresentationFormat, SessionDeck, ShapePresetType, ShareDefaults, ShortcutChord, ShortcutChord as ShortcutChord$1, SlideSizeEmu, SlideSizeRescaleMode, SlideTemplateId, StrokeToInkElementOpts, TOOLBAR_BUTTON_IDS, TextAdvancedChanges, ThemeCatalogEntry, ThemeColorPickerCommit, ToolbarActionId, ToolbarActionId as ToolbarActionId$1, ToolbarButtonId, ToolbarTabId, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, ViewerCustomization, ViewerCustomization as ViewerCustomization$1, ViewerCustomizationApi, ViewerCustomizationApi as ViewerCustomizationApi$1, ViewerCustomizationController, ViewerDialogId, ViewerDialogId as ViewerDialogId$1, ViewerExportFormatId, ViewerFeatureId, ViewerFeatureId as ViewerFeatureId$1, ViewerFontSource, ViewerMode, ViewerOptionPrimitive, ViewerOptionsStore, ViewerPanelId, ViewerPanelId as ViewerPanelId$1, ViewerQuickAccessOptions, ViewerTheme, ViewerTheme as ViewerTheme$1, ViewerThemeColors, ViewportFitOptions, ViewportFitOptions as ViewportFitOptions$1, ViewportFitPadding, ZoomNavigationTarget, buildInlineTextCommitPatch, canInteractWithElement, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, forgetSessionDeck, getSessionTabId, isLegacyBinaryPresentation, isSupportedPresentationFile, loadPresentationDeck, loadSessionDeck, overlayInlineTextSnapshot, parsePresentationSessionId, presentationBaseName, rememberSessionDeck, restoreSessionDeck, savedPresentationFileName, themeToCssVars, vermilionDarkTheme, vermilionLightTheme } from "ooxml-ui/pptx";
3
+ import { LocaleCatalogEntry, TranslationKey, TranslationMessages, Translator, createTranslator, keyToLabel, translationsEn } from "ooxml-ui/pptx/i18n";
4
+ import { LoadPresentationOptions, LoadedPresentation, loadPresentation, revokeBlobUrls } from "ooxml-ui/pptx/dom";
5
+ import { PptxAiBridge, PptxAiConfig, PptxAiConfig as PptxAiConfig$1, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiWritePolicy } from "ooxml-ui/pptx/ai";
4
6
  import { Options } from "html2canvas-pro";
5
- //#region ../../../../src/core/dist/geometry/align-distribute.d.ts
6
- /**
7
- * Pure geometry helpers for the align / distribute editor operations.
8
- *
9
- * These functions operate over a list of slide elements (anything carrying the
10
- * `{ id, x, y, width, height }` bounding-box fields of {@link PptxElement}) and
11
- * return a `Map` keyed by element `id` describing the *new* position(s) for the
12
- * elements that need to move. Elements that already sit on the target edge (or
13
- * the two outer-most elements during distribution) are still included with
14
- * their unchanged coordinate so callers can apply the whole map uniformly; the
15
- * map only ever contains the axis that the operation touches.
16
- *
17
- * The reference box the selection is aligned against is either the union of
18
- * the selected boxes (PowerPoint's "Align Selected Objects") or the slide
19
- * itself ("Align to Slide"). PowerPoint defaults to the slide whenever a
20
- * single object is selected, which is why a one-element selection is not a
21
- * no-op once a `slideSize` is supplied: Align Center on a lone title is one
22
- * of the commonest arrange gestures there is.
23
- *
24
- * The helpers are deliberately framework-agnostic: no DOM, no Vue reactivity,
25
- * no side effects. The host wires them into the editor by feeding the current
26
- * selection in and applying the returned `Map` via its element-transform
27
- * operation (one batched history entry per call).
28
- */
29
- /** Edge / centre that {@link alignElements} can snap a selection to. */
30
- type AlignEdge = 'left' | 'centerH' | 'right' | 'top' | 'middle' | 'bottom';
31
- //#endregion
32
- //#region src/viewer/i18n/translator.d.ts
33
- /**
34
- * Minimal i18n for the vanilla binding.
35
- *
36
- * The other bindings delegate to their framework's i18n runtime (react-i18next,
37
- * vue-i18n, ngx-translate) fed by the shared `pptx.*` dictionary. The vanilla
38
- * binding has no framework, so this module provides the one missing piece: a
39
- * `t(key, params)` lookup with `{{param}}` interpolation over the same shared
40
- * English dictionary, plus per-locale overrides supplied by the host.
41
- *
42
- * Resolution order: host dictionary for the active locale, then the built-in
43
- * English dictionary, then a humanised fallback derived from the key (shared
44
- * `keyToLabel`), so a missing key never renders as a raw `pptx.*` string.
45
- */
46
- /** Translate a dotted `pptx.*` key with optional `{{param}}` interpolation. */
47
- type Translator = (key: string, params?: Record<string, string | number>) => string;
48
- /** Locale to flat `key: message` dictionary map supplied by the host. */
49
- type TranslationMessages = Record<string, Record<string, string>>;
50
- /**
51
- * Build a {@link Translator} for a locale. `messages[locale]` (when provided)
52
- * wins over the built-in English dictionary; English is always the fallback.
53
- */
54
- export declare function createTranslator(locale?: string, messages?: TranslationMessages): Translator;
55
- //#endregion
56
7
  //#region src/viewer/state/store.d.ts
57
8
  /**
58
9
  * A tiny framework-free reactive store: `get` / `set(patch)` / `subscribe`.
@@ -73,347 +24,7 @@ interface Store<T extends object> {
73
24
  subscribe(listener: StoreListener<T>): () => void;
74
25
  }
75
26
  export declare function createStore<T extends object>(initial: T): Store<T>;
76
- //#endregion
77
- //#region src/viewer/render/types.d.ts
78
- /** Discriminant values of the {@link PptxElement} union (`'text'`, `'chart'`, ...). */
79
- type PptxElementType = PptxElement['type'];
80
- /**
81
- * A selected chart sub-part, scoped to the chart element that owns it. The
82
- * vanilla counterpart of React's `ChartPartSelectionContext` / Vue's
83
- * `ChartPartSelection` / Angular's `ChartPartSelectionService`: the bridge
84
- * between an on-canvas mark click (`chart-editable.ts`) and the chart
85
- * inspector (`chart-data-grid.ts` / `chart-point-index.ts`), threaded through
86
- * the store rather than component context since vanilla has no such
87
- * injection mechanism.
88
- */
89
- interface ChartPartSelection {
90
- elementId: string;
91
- part: ChartPartRef;
92
- }
93
- /**
94
- * Everything an element renderer may need, passed to every renderer call.
95
- *
96
- * The context is immutable per slide render. Renderers must create DOM through
97
- * `context.document` (never the global `document`) so slides can render into
98
- * detached documents (tests, export pipelines).
99
- */
100
- interface ElementRenderContext {
101
- /** Document used for all DOM creation. */
102
- readonly document: Document;
103
- /** The slide being rendered. */
104
- readonly slide: PptxSlide;
105
- /** Full deck, used by Zoom elements to resolve their target preview. */
106
- readonly slides?: readonly PptxSlide[];
107
- /** Zero-based active slide index for Zoom return navigation. */
108
- readonly currentSlideIndex?: number;
109
- /** Presentation-only Zoom tile activation callback. */
110
- readonly onZoomClick?: (target: ZoomNavigationTarget, returnSlideIndex: number) => void;
111
- /** Full slide canvas size in CSS px (elements are positioned in this space). */
112
- readonly canvasSize: CanvasSize;
113
- /**
114
- * The scale the stage is rendered at (1 = 100%). The stage applies it via a
115
- * CSS transform, so renderers should lay out in unscaled canvas px; `scale`
116
- * is informational (e.g. for raster density decisions).
117
- */
118
- readonly scale: number;
119
- /** Archive-path to displayable URL map for media + poster frames. */
120
- readonly mediaDataUrls: ReadonlyMap<string, string>;
121
- /** Presentation theme colour scheme used by theme-aware render helpers. */
122
- readonly colorScheme?: PptxThemeColorScheme;
123
- /**
124
- * Presentation theme font scheme, so table styles resolve their
125
- * `a:fontRef@idx` (`minor`/`major`) to a concrete font family.
126
- */
127
- readonly fontScheme?: PptxThemeFontScheme;
128
- /** Parsed `ppt/tableStyles.xml` definitions used by table band/header styling. */
129
- readonly tableStyleMap?: ParsedTableStyleMap;
130
- readonly fieldContext?: FieldSubstitutionContext;
131
- /** Shared-dictionary translator (`pptx.*` keys). */
132
- readonly t: Translator;
133
- /**
134
- * Opt-in flag: render `smartArt` elements as an extruded Three.js scene
135
- * instead of flat SVG (see `PptxViewerOptions.smartArt3D`). Defaults to
136
- * `false` when the option is unset.
137
- */
138
- readonly smartArt3D: boolean;
139
- /**
140
- * Opt-in flag: render `surface`/`surface3D` charts as an interactive,
141
- * Three.js mesh instead of the static SVG isometric
142
- * projection (see `PptxViewerOptions.surfaceChart3D`). Defaults to `false`
143
- * when the option is unset.
144
- */
145
- readonly surfaceChart3D: boolean;
146
- /**
147
- * Opt-in flag: render `bar3D` charts as an interactive Three.js box-mesh scene instead of the flat SVG oblique-projection
148
- * illusion (see `PptxViewerOptions.barChart3D`). Defaults to `false` when
149
- * the option is unset.
150
- */
151
- readonly barChart3D: boolean;
152
- /**
153
- * Opt-in flag: render `line3D` charts as an interactive Three.js tube-path scene instead of the flat SVG oblique-projection
154
- * illusion (see `PptxViewerOptions.lineChart3D`). Defaults to `false` when
155
- * the option is unset.
156
- */
157
- readonly lineChart3D: boolean;
158
- /**
159
- * Opt-in flag: render `area3D` charts as an interactive Three.js tube-path + ribbon-fill scene instead of the flat SVG
160
- * oblique-projection illusion (see `PptxViewerOptions.areaChart3D`).
161
- * Defaults to `false` when the option is unset.
162
- */
163
- readonly areaChart3D: boolean;
164
- /**
165
- * Opt-in flag: render `pie3D` charts as an interactive Three.js wedge-mesh scene instead of the flat SVG oblique-projection
166
- * illusion (see `PptxViewerOptions.pieChart3D`). Defaults to `false` when
167
- * the option is unset.
168
- */
169
- readonly pieChart3D: boolean;
170
- /**
171
- * True only for the live presentation stage (real Fullscreen API active):
172
- * media renderers use this to autoplay once mounted, matching PowerPoint's
173
- * slideshow behaviour. `false` for the editor canvas and thumbnail rail.
174
- */
175
- readonly presenting: boolean;
176
- /**
177
- * True only for the surface the user is authoring on. `false` for every
178
- * still of a slide (thumbnail rail, presenter console panes, export raster)
179
- * AND for the live show stage, which is driven, not edited.
180
- *
181
- * Media reads it: a stage that is neither interactive nor presenting is a
182
- * still, and a still never carries the browser's native transport (see the
183
- * shared `mediaTransportVisible`). Optional so the many hand-built contexts
184
- * in tests keep compiling; the stage always sets it.
185
- */
186
- readonly interactive?: boolean;
187
- readonly onSmartArtNodeTextChange?: (element: PptxElement, nodeId: string, text: string) => void;
188
- readonly onSmartArtNodeFillChange?: (element: PptxElement, nodeId: string, fill: string) => void;
189
- /**
190
- * Commit a table's whole column-width array after a column-boundary drag.
191
- * Called once on pointer release (the drag itself only translates the
192
- * boundary handle), so one drag is one undo step. Absent on every
193
- * non-authoring surface, matching `onSmartArtNodeTextChange`.
194
- */
195
- readonly onTableResizeColumns?: (element: PptxElement, widths: number[]) => void;
196
- /** Commit one row's new pixel height after a row-boundary drag. */
197
- readonly onTableResizeRow?: (element: PptxElement, rowIndex: number, height: number) => void;
198
- /**
199
- * Commit a chart data point dragged on the canvas, with the whole updated
200
- * `chartData`. Called ONCE on pointer release (the drag itself is a local
201
- * preview), so one drag is one undo step. Absent on every non-authoring
202
- * surface, which is what keeps thumbnails and the show stage inert.
203
- */
204
- readonly onChartPointChange?: (element: PptxElement, chartData: PptxChartData) => void;
205
- /**
206
- * The current on-canvas chart part selection (shared with the inspector via
207
- * the store), or `null`/absent when nothing is selected. Read by
208
- * `chart-editable.ts` to seed its highlight on (re)mount, so the ring stays
209
- * on the clicked mark across a stage rebuild triggered by an unrelated edit.
210
- */
211
- readonly chartPartSelection?: ChartPartSelection | null;
212
- /**
213
- * A chart part (bar / dot / slice / series line) was pressed on the canvas.
214
- * Surfaces the selection to the chart inspector (ring-highlight + scroll in
215
- * `chart-data-grid.ts`, point sync in `chart-point-index.ts`). Absent on
216
- * every non-authoring surface, matching `onChartPointChange`.
217
- */
218
- readonly onChartPartSelect?: (element: PptxElement, part: ChartPartRef) => void;
219
- /**
220
- * Ids of the currently selected elements (the store's `selectedElementIds`).
221
- * A chart renderer arms its on-canvas mark hit-testing
222
- * (`chart-editable.ts`'s `CHART_INTERACTIVE_CLASS`) only while ITS OWN id is
223
- * in this set: an unselected chart must let a mark click bubble up and
224
- * select the chart like any other element, exactly as a bare click on any
225
- * other element type does. Absent on every non-authoring surface, matching
226
- * `onChartPointChange`.
227
- */
228
- readonly selectedElementIds?: ReadonlySet<string>;
229
- /**
230
- * Per-element native-animation playback state, keyed by element id, present
231
- * only during a running presentation. Chart / SmartArt renderers read their
232
- * element's {@link ElementAnimationState.build} to reveal a staged build
233
- * (`p:bldChart` / `p:bldDgm`); shape renderers read `animatesFill` /
234
- * `animatesStroke` to relinquish static paint during a `p:animClr` animation.
235
- * A stable map instance, mutated in place by the playback controller so a
236
- * targeted single-element re-render always reads current state.
237
- */
238
- readonly presentationStates?: ReadonlyMap<string, ElementAnimationState>;
239
- /** The registry in effect, for renderers that need to inspect it. */
240
- readonly registry: ElementRendererRegistry;
241
- /**
242
- * Render a child element through the registry (used by the group renderer
243
- * for recursion; custom renderers may nest elements the same way).
244
- */
245
- renderElement(element: PptxElement, zIndex: number): HTMLElement | SVGElement | null;
246
- }
247
- /**
248
- * Renders one slide element to a DOM node (or `null` to render nothing).
249
- *
250
- * Contract:
251
- * - Position absolutely within the stage: apply the shared
252
- * `getContainerStyle(element, zIndex)` map (or equivalent) to the returned
253
- * root node.
254
- * - Set `dataset.elementId = element.id` on the root node.
255
- * - Create all DOM via `context.document`.
256
- * - Never mutate `element` or anything on the context.
257
- */
258
- type ElementRenderer = (element: PptxElement, zIndex: number, context: ElementRenderContext) => HTMLElement | SVGElement | null;
259
- /**
260
- * Registry dispatching elements to renderers by their `type` discriminant.
261
- *
262
- * Additional element types are supported by registering a renderer for the
263
- * type; unregistered types fall through to the fallback renderer (a typed
264
- * placeholder box by default). See `render/elements/README.md` for the
265
- * step-by-step contract.
266
- */
267
- interface ElementRendererRegistry {
268
- /** Register (or replace) the renderer for an element type. */
269
- register(type: PptxElementType, renderer: ElementRenderer): void;
270
- /** Remove the renderer for an element type (falls back afterwards). */
271
- unregister(type: PptxElementType): void;
272
- /** The renderer registered for a type, or `undefined`. */
273
- get(type: PptxElementType): ElementRenderer | undefined;
274
- /** True when a dedicated (non-fallback) renderer is registered. */
275
- has(type: PptxElementType): boolean;
276
- /** Replace the fallback renderer used for unregistered types. */
277
- setFallback(renderer: ElementRenderer): void;
278
- /** The renderer to use for a type: registered renderer or fallback. */
279
- resolve(type: PptxElementType): ElementRenderer;
280
- /** All types with a dedicated renderer (sorted, for tests/debugging). */
281
- registeredTypes(): PptxElementType[];
282
- }
283
- //#endregion
284
- //#region src/viewer/render/registry.d.ts
285
- /**
286
- * Create an empty {@link ElementRendererRegistry}.
287
- *
288
- * The default fallback renders nothing; `createDefaultRegistry()` (in
289
- * `./elements`) installs the built-in renderers plus the typed placeholder
290
- * fallback.
291
- */
292
- export declare function createElementRendererRegistry(): ElementRendererRegistry;
293
- //#endregion
294
- //#region src/viewer/render/dom.d.ts
295
- /**
296
- * Apply a shared `CssStyleMap` to an element. The shared builders emit a mix
297
- * of camelCase (`backgroundColor`) and kebab-case (`background-color`) keys;
298
- * both are normalised to `style.setProperty` calls.
299
- */
300
- export declare function applyStyleMap(el: HTMLElement | SVGElement, style: CssStyleMap): void;
301
- /** Create an element with an optional class and style map. */
302
- export declare function createEl<K extends keyof HTMLElementTagNameMap>(doc: Document, tag: K, className?: string, style?: CssStyleMap): HTMLElementTagNameMap[K];
303
- /** Create a namespaced SVG element with optional attributes. */
304
- export declare function createSvgEl<K extends keyof SVGElementTagNameMap>(doc: Document, tag: K, attrs?: Record<string, string | number | undefined>): SVGElementTagNameMap[K];
305
- //#endregion
306
- //#region src/viewer/render/slide-stage.d.ts
307
- interface SlideStageOptions {
308
- document: Document;
309
- slide: PptxSlide;
310
- canvasSize: CanvasSize;
311
- mediaDataUrls: ReadonlyMap<string, string>;
312
- /** Optional presentation theme colour scheme for element renderers. */
313
- colorScheme?: PptxThemeColorScheme;
314
- /** Optional presentation theme font scheme for table-style font resolution. */
315
- fontScheme?: PptxThemeFontScheme;
316
- /** Optional parsed table-style definitions for theme-aware table rendering. */
317
- tableStyleMap?: ParsedTableStyleMap;
318
- fieldContext?: FieldSubstitutionContext;
319
- registry: ElementRendererRegistry;
320
- t: Translator;
321
- /** Scale applied via CSS transform (default 1). */
322
- scale?: number;
323
- /**
324
- * Grid dot/line spacing in CSS px for the View > Grid overlay (`.pptxv-showGrid`),
325
- * derived by the caller from the deck's authored `viewProperties.gridSpacing`
326
- * via `computeGridSpacingPx`. Defaults to 10px (this binding's existing grid
327
- * step) when omitted.
328
- */
329
- gridSpacingPx?: number;
330
- /** Opt-in WebGL SmartArt renderer flag; see `PptxViewerOptions.smartArt3D`. */
331
- smartArt3D?: boolean;
332
- /**
333
- * Opt-in interactive WebGL surface-chart renderer flag; see
334
- * `PptxViewerOptions.surfaceChart3D`.
335
- */
336
- surfaceChart3D?: boolean;
337
- /**
338
- * Opt-in interactive WebGL bar3D-chart renderer flag; see
339
- * `PptxViewerOptions.barChart3D`.
340
- */
341
- barChart3D?: boolean;
342
- /**
343
- * Opt-in interactive WebGL line3D-chart renderer flag; see
344
- * `PptxViewerOptions.lineChart3D`.
345
- */
346
- lineChart3D?: boolean;
347
- /**
348
- * Opt-in interactive WebGL area3D-chart renderer flag; see
349
- * `PptxViewerOptions.areaChart3D`.
350
- */
351
- areaChart3D?: boolean;
352
- /**
353
- * Opt-in interactive WebGL pie3D-chart renderer flag; see
354
- * `PptxViewerOptions.pieChart3D`.
355
- */
356
- pieChart3D?: boolean;
357
- /** True only for the live presentation stage; see `ElementRenderContext.presenting`. */
358
- presenting?: boolean;
359
- /** Full deck and active index used by presentation Zoom elements. */
360
- slides?: readonly PptxSlide[];
361
- currentSlideIndex?: number;
362
- onZoomClick?: (target: ZoomNavigationTarget, returnSlideIndex: number) => void;
363
- onSmartArtNodeTextChange?: (element: PptxElement, nodeId: string, text: string) => void;
364
- onSmartArtNodeFillChange?: (element: PptxElement, nodeId: string, fill: string) => void;
365
- /** See `ElementRenderContext.onChartPointChange`. */
366
- readonly onChartPointChange?: (element: PptxElement, chartData: PptxChartData) => void;
367
- /** See `ElementRenderContext.onTableResizeColumns`. */
368
- readonly onTableResizeColumns?: (element: PptxElement, widths: number[]) => void;
369
- /** See `ElementRenderContext.onTableResizeRow`. */
370
- readonly onTableResizeRow?: (element: PptxElement, rowIndex: number, height: number) => void;
371
- /** See `ElementRenderContext.chartPartSelection`. */
372
- readonly chartPartSelection?: ChartPartSelection | null;
373
- /** See `ElementRenderContext.onChartPartSelect`. */
374
- readonly onChartPartSelect?: (element: PptxElement, part: ChartPartRef) => void;
375
- /** See `ElementRenderContext.selectedElementIds`. */
376
- readonly selectedElementIds?: ReadonlySet<string>;
377
- /**
378
- * True only for the main (interactive) canvas, never the thumbnail rail.
379
- * Marks every rendered element (recursively, including group children) with
380
- * `data-pptx-element="true"` and the stage itself with
381
- * `role="region" aria-roledescription="slide"` - the framework-neutral e2e
382
- * test hooks the React/Vue/Angular bindings also emit. Defaults to `false`.
383
- */
384
- interactive?: boolean;
385
- /** Whether inherited layout/master nodes participate in editing. */
386
- templateEditing?: boolean;
387
- /** Per-element native-animation playback state (presentation mode only). */
388
- presentationStates?: ReadonlyMap<string, ElementAnimationState>;
389
- /**
390
- * Invoked with the built render context once the stage is assembled. Lets the
391
- * presentation playback re-render single elements (staged chart / SmartArt
392
- * build, `p:animClr` fill / stroke) in place without rebuilding the stage.
393
- */
394
- captureContext?: (context: ElementRenderContext) => void;
395
- }
396
- /**
397
- * Render one slide as a fixed-size stage: the resolved slide background plus
398
- * every element dispatched through the registry, scaled with a CSS transform
399
- * (`transform-origin: top left`), exactly like the other bindings' stages.
400
- *
401
- * The returned node is `canvasSize * scale` ON SCREEN but laid out at the
402
- * unscaled canvas size, so the caller should wrap it in a box sized to
403
- * `canvasSize * scale` (the viewer's stage host and thumbnails both do).
404
- */
405
- export declare function renderSlideStage(options: SlideStageOptions): HTMLElement;
406
- //#endregion
407
- //#region src/viewer/render/elements/index.d.ts
408
- /**
409
- * The registry the viewer uses by default.
410
- *
411
- * Dedicated renderers: `text`, `shape`, `image`, `picture`, `group`,
412
- * `connector`, `table`, `chart`, `smartArt`, `media`, `ink`, `ole`,
413
- * `contentPart`, `zoom`, and `model3d`. Only unknown extension elements fall
414
- * through to the typed placeholder fallback.
415
- */
416
- export declare function createDefaultRegistry(): ElementRendererRegistry;
27
+ import * as import_ooxml_ui_pptx_dom from "ooxml-ui/pptx/dom";
417
28
  //#endregion
418
29
  //#region src/viewer/state/viewer-state.d.ts
419
30
  /** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
@@ -435,10 +46,10 @@ type DrawTool = 'select' | 'pen' | 'highlighter' | 'eraser' | 'freeform';
435
46
  */
436
47
  interface ViewerState {
437
48
  /** Parsed slides (image/media URLs already patched in by the load pipeline). */
438
- slides: PptxSlide[];
49
+ slides: index_d_exports$2.PptxSlide[];
439
50
  /** Presentation sections used to group slides in the thumbnail rail. */
440
- sections: PptxSection[];
441
- presentationProperties: PptxPresentationProperties;
51
+ sections: index_d_exports$2.PptxSection[];
52
+ presentationProperties: index_d_exports$2.PptxPresentationProperties;
442
53
  /**
443
54
  * View properties (`ppt/viewProps.xml`, `p:viewPr`): grid spacing, snap /
444
55
  * guide toggles, last view, splitter state, etc. `gridSpacing` lives here,
@@ -446,16 +57,16 @@ interface ViewerState {
446
57
  * `p:viewPr`, and a real PowerPoint file never populates it under
447
58
  * `p:presentationPr`.
448
59
  */
449
- viewProperties: PptxViewProperties | undefined;
450
- headerFooter: PptxHeaderFooter;
451
- coreProperties?: PptxCoreProperties;
452
- appProperties?: PptxAppProperties;
453
- customProperties: PptxCustomProperty[];
454
- customShows: PptxCustomShow[];
60
+ viewProperties: index_d_exports$2.PptxViewProperties | undefined;
61
+ headerFooter: index_d_exports$2.PptxHeaderFooter;
62
+ coreProperties?: index_d_exports$2.PptxCoreProperties;
63
+ appProperties?: index_d_exports$2.PptxAppProperties;
64
+ customProperties: index_d_exports$2.PptxCustomProperty[];
65
+ customShows: index_d_exports$2.PptxCustomShow[];
455
66
  /** Office 2021 (p188) comment authors, for the `@`-mention typeahead. */
456
- modernCommentAuthors: PptxModernCommentAuthor[];
67
+ modernCommentAuthors: index_d_exports$2.PptxModernCommentAuthor[];
457
68
  /** Legacy `ppt/commentAuthors.xml` authors, mapped into the typeahead too. */
458
- commentAuthors: PptxCommentAuthor[];
69
+ commentAuthors: index_d_exports$2.PptxCommentAuthor[];
459
70
  /**
460
71
  * The custom show a started slide show is restricted to, or null for the
461
72
  * whole deck. Custom shows were definable here but nothing could select one,
@@ -464,7 +75,7 @@ interface ViewerState {
464
75
  * Angular each hold the same id).
465
76
  */
466
77
  activeCustomShowId: string | null;
467
- embeddedFonts: PptxEmbeddedFont[];
78
+ embeddedFonts: index_d_exports$2.PptxEmbeddedFont[];
468
79
  /**
469
80
  * Bumped whenever a catalogue webfont's glyph-outline bytes are newly
470
81
  * registered into `glyph-outline-cache.ts`'s `GlyphOutlineFontCache` (see
@@ -499,20 +110,20 @@ interface ViewerState {
499
110
  */
500
111
  presentationPassword: string | null;
501
112
  /** Inherited layout/master elements, separated so interaction can be gated. */
502
- templateElementsBySlideId: Record<string, PptxElement[]>;
113
+ templateElementsBySlideId: Record<string, index_d_exports$2.PptxElement[]>;
503
114
  /** Parsed slide masters and layouts used by the dedicated master canvas. */
504
- slideMasters: PptxSlideMaster[];
115
+ slideMasters: index_d_exports$2.PptxSlideMaster[];
505
116
  /** Theme parts discovered in the package (inspector THEME card). */
506
- themeOptions: PptxThemeOption[];
117
+ themeOptions: index_d_exports$2.PptxThemeOption[];
507
118
  /** Parsed notes master and its portrait page size. */
508
- notesMaster?: PptxNotesMaster;
119
+ notesMaster?: index_d_exports$2.PptxNotesMaster;
509
120
  notesCanvasSize?: CanvasSize;
510
121
  /** Parsed handout master. */
511
- handoutMaster?: PptxHandoutMaster;
122
+ handoutMaster?: index_d_exports$2.PptxHandoutMaster;
512
123
  /** Whether the loaded package contains a VBA project. */
513
124
  hasMacros: boolean;
514
125
  /** Active master-workspace tab. */
515
- masterViewTab: MasterViewTab;
126
+ masterViewTab: index_d_exports$2.MasterViewTab;
516
127
  /** Preview layout used by the handout master workspace. */
517
128
  handoutSlidesPerPage: number;
518
129
  /** Active master/layout canvas, or null for normal slide view. */
@@ -536,9 +147,9 @@ interface ViewerState {
536
147
  /** Archive-path to displayable URL map for media + poster frames. */
537
148
  mediaDataUrls: Map<string, string>;
538
149
  /** Presentation theme colours used by scheme-based rendering. */
539
- colorScheme?: PptxThemeColorScheme;
150
+ colorScheme?: index_d_exports$2.PptxThemeColorScheme;
540
151
  /** Presentation theme fonts used by table-style font resolution. */
541
- fontScheme?: PptxThemeFontScheme;
152
+ fontScheme?: index_d_exports$2.PptxThemeFontScheme;
542
153
  /** The loaded theme's name (inspector THEME EDITOR card). */
543
154
  themeName?: string;
544
155
  /**
@@ -550,9 +161,9 @@ interface ViewerState {
550
161
  */
551
162
  customFontFamilies: string[];
552
163
  /** Tag collections parsed from `ppt/tags/*.xml` (inspector TAGS card). */
553
- tagCollections: PptxTagCollection[];
164
+ tagCollections: index_d_exports$2.PptxTagCollection[];
554
165
  /** Parsed presentation table styles keyed by style id. */
555
- tableStyleMap?: ParsedTableStyleMap;
166
+ tableStyleMap?: index_d_exports$2.ParsedTableStyleMap;
556
167
  /** `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` default style GUID. */
557
168
  tableStylesDefaultId?: string;
558
169
  /**
@@ -607,13 +218,13 @@ interface ViewerState {
607
218
  column: number;
608
219
  }>;
609
220
  /** Active rich-text range captured from the inline editor. */
610
- selectedTextRange: InlineTextSelection | null;
221
+ selectedTextRange: InlineTextSelection$1 | null;
611
222
  /**
612
223
  * On-canvas chart part selection (a clicked bar/dot/slice/series line),
613
224
  * surfaced to the chart inspector's data grid + point-index picker. Cleared
614
225
  * whenever the general element selection changes (see `selectionState`).
615
226
  */
616
- chartPartSelection: ChartPartSelection | null;
227
+ chartPartSelection: index_d_exports$1.ChartPartSelection | null;
617
228
  /** Source element id while the one-shot Format Painter is armed. */
618
229
  formatPainterSourceId: string | null;
619
230
  /** When true, selection and element mutations target inherited template elements. */
@@ -633,9 +244,9 @@ interface ViewerState {
633
244
  /** True when the right-hand property inspector panel is shown (editing chrome). */
634
245
  inspectorOpen: boolean;
635
246
  /** Remote collaborators currently in the session (empty when not collaborating). */
636
- remotePresences: SanitizedPresence[];
247
+ remotePresences: SanitizedPresence$1[];
637
248
  /** Remote cursors visible on the current slide, projected from `remotePresences`. */
638
- cursors: RemoteCursor[];
249
+ cursors: RemoteCursor$1[];
639
250
  /** Client id of the peer the local user is following, or null when free. */
640
251
  followedClientId: number | null;
641
252
  /** In-memory clipboard payload from the last copy/cut, or null. */
@@ -643,7 +254,7 @@ interface ViewerState {
643
254
  /** The Paste Options toolbar's target: the elements a normal paste just inserted. */
644
255
  pasteOptionsToolbar: {
645
256
  id: string;
646
- sourceClone: PptxElement;
257
+ sourceClone: index_d_exports$2.PptxElement;
647
258
  }[] | null;
648
259
  /** Active Draw ribbon tool; `'select'` disables the ink-drawing gesture controller. */
649
260
  drawTool: DrawTool;
@@ -695,7 +306,7 @@ interface ViewerState {
695
306
  * {@link readOnlyRecommendation} so `submitReadOnlyPassword` can check a
696
307
  * candidate password against it (`checkModifyPassword`, `pptx-viewer-shared`).
697
308
  */
698
- modifyVerifier?: PptxModifyVerifier;
309
+ modifyVerifier?: index_d_exports$2.PptxModifyVerifier;
699
310
  /**
700
311
  * Whether the read-only recommendation banner's inline password prompt is
701
312
  * open (replaces "Edit anyway"/"Dismiss" while true). Only reachable when
@@ -725,6 +336,8 @@ interface ViewerState {
725
336
  runProgramNotices: RunProgramNotice[];
726
337
  }
727
338
  export declare function createInitialViewerState(): ViewerState;
339
+ /** Clamp a slide index into the valid range for the given slide count. */
340
+ declare function clampSlideIndex(index: number, slideCount: number): number;
728
341
  //#endregion
729
342
  //#region src/viewer/editor/editor-animation-actions.d.ts
730
343
  /**
@@ -744,20 +357,20 @@ export declare function createInitialViewerState(): ViewerState;
744
357
  interface AnimationTimingPatch {
745
358
  durationMs?: number;
746
359
  delayMs?: number;
747
- trigger?: PptxAnimationTrigger;
748
- direction?: PptxAnimationDirection;
749
- sequence?: PptxAnimationSequence;
750
- timingCurve?: PptxAnimationTimingCurve;
360
+ trigger?: index_d_exports$2.PptxAnimationTrigger;
361
+ direction?: index_d_exports$2.PptxAnimationDirection;
362
+ sequence?: index_d_exports$2.PptxAnimationSequence;
363
+ timingCurve?: index_d_exports$2.PptxAnimationTimingCurve;
751
364
  repeatCount?: number;
752
- repeatMode?: PptxAnimationRepeatMode | 'none';
365
+ repeatMode?: index_d_exports$2.PptxAnimationRepeatMode | 'none';
753
366
  triggerShapeId?: string;
754
367
  /** A bookmark picker option value (see `setTriggerBookmark`). */
755
368
  triggerBookmark?: string;
756
- afterAnimation?: PptxAfterAnimationAction;
369
+ afterAnimation?: index_d_exports$2.PptxAfterAnimationAction;
757
370
  afterAnimationColor?: string;
758
371
  }
759
372
  interface AnimationActions {
760
- addAnimation(group: AnimationGroup, preset: PptxAnimationPreset): void;
373
+ addAnimation(group: AnimationGroup, preset: index_d_exports$2.PptxAnimationPreset): void;
761
374
  removeAnimation(): void;
762
375
  /**
763
376
  * Set (or clear with `'none'`) a single effect bucket on the selected
@@ -765,7 +378,7 @@ interface AnimationActions {
765
378
  * first effect and dropped once all three buckets are empty (shared
766
379
  * `setAnimationEntrance`/`setAnimationExit`/`setAnimationEmphasis`).
767
380
  */
768
- setAnimationEffect(group: AnimationGroup, preset: PptxAnimationPreset | 'none'): void;
381
+ setAnimationEffect(group: AnimationGroup, preset: index_d_exports$2.PptxAnimationPreset | 'none'): void;
769
382
  /**
770
383
  * Apply a catalogue motion path to the selected element by preset id.
771
384
  *
@@ -848,20 +461,20 @@ interface ClipboardActions {
848
461
  * the caller (it needs a DOM rasterize step this module does not perform)
849
462
  * via `replaceElement`.
850
463
  */
851
- reformatPasted(elementId: string, sourceClone: PptxElement, format: PasteSpecialFormat): void;
464
+ reformatPasted(elementId: string, sourceClone: index_d_exports$2.PptxElement, format: PasteSpecialFormat): void;
852
465
  /** Replace one element by id, e.g. after rasterizing it to a picture. */
853
- replaceElement(elementId: string, next: PptxElement): void;
466
+ replaceElement(elementId: string, next: index_d_exports$2.PptxElement): void;
854
467
  }
855
468
  //#endregion
856
469
  //#region src/viewer/editor/editor-comment-actions.d.ts
857
470
  interface CommentActions {
858
- addComment(text: string, elementId?: string, mentions?: PptxCommentMention[]): string | null;
471
+ addComment(text: string, elementId?: string, mentions?: index_d_exports$2.PptxCommentMention[]): string | null;
859
472
  /**
860
473
  * Append a reply under a top-level comment (React's `handleSubmitReply`
861
474
  * nested-`replies` model: the reply carries `threadId` = parent id and
862
475
  * inherits the parent's `elementId` anchor).
863
476
  */
864
- addCommentReply(parentId: string, text: string, mentions?: PptxCommentMention[]): string | null;
477
+ addCommentReply(parentId: string, text: string, mentions?: index_d_exports$2.PptxCommentMention[]): string | null;
865
478
  /** Update a comment's text in place; recurses into `replies` so nested rows are editable too. */
866
479
  editComment(id: string, text: string): void;
867
480
  deleteComment(id: string): void;
@@ -905,19 +518,19 @@ interface CropActions {
905
518
  */
906
519
  interface DeckActions {
907
520
  /** Merge a patch into the presentation-level show/print settings. */
908
- updatePresentationSettings(patch: Partial<PptxPresentationProperties>): void;
521
+ updatePresentationSettings(patch: Partial<index_d_exports$2.PptxPresentationProperties>): void;
909
522
  /** Apply a packaged theme part by archive path (React's `handleApplyTheme`). */
910
523
  applyThemeByPath(themePath: string, allMasters: boolean): void;
911
524
  /** Re-theme the deck from the inspector's THEME EDITOR card. */
912
525
  applyThemeEdit(payload: {
913
- colorScheme: PptxThemeColorScheme;
914
- fontScheme: PptxThemeFontScheme;
526
+ colorScheme: index_d_exports$2.PptxThemeColorScheme;
527
+ fontScheme: index_d_exports$2.PptxThemeFontScheme;
915
528
  name: string;
916
529
  }): void | Promise<void>;
917
530
  /** Replace the deck's `ppt/tags/*.xml` collections (inspector TAGS card). */
918
- updateTagCollections(next: PptxTagCollection[]): void;
531
+ updateTagCollections(next: index_d_exports$2.PptxTagCollection[]): void;
919
532
  /** Patch the active slide (inspector THEME OVERRIDE card). */
920
- updateActiveSlide(patch: Partial<PptxSlide>): void;
533
+ updateActiveSlide(patch: Partial<index_d_exports$2.PptxSlide>): void;
921
534
  /**
922
535
  * Set a layout/master's background colour (inspector SLIDE BACKGROUND
923
536
  * card's template rows, shown while `editTemplateMode` is on). Master
@@ -947,7 +560,7 @@ interface DeckActions {
947
560
  */
948
561
  applySlideSizeRescale(size: SlideSizeEmu, mode: SlideSizeRescaleMode): void;
949
562
  /** Commit a full replacement style map (section edit, create, or delete already applied). */
950
- updateTableStyleMap(nextMap: ParsedTableStyleMap): void;
563
+ updateTableStyleMap(nextMap: index_d_exports$2.ParsedTableStyleMap): void;
951
564
  /** Record a styleId for save-time removal from `ppt/tableStyles.xml`. */
952
565
  deleteTableStyle(styleId: string): void;
953
566
  }
@@ -1029,11 +642,11 @@ type TableStructureAction = 'insertRowAbove' | 'insertRowBelow' | 'deleteRow' |
1029
642
  interface InspectorActions {
1030
643
  /** Flip the selected element's lock (writes noMove/noResize; see elementLockTogglePatch). */
1031
644
  toggleElementLock(): void;
1032
- setTextVerticalAlign(vAlign: NonNullable<TextStyle['vAlign']>): void;
1033
- setTextWrap(wrap: NonNullable<TextStyle['textWrap']>): void;
1034
- setAutoFitMode(mode: NonNullable<TextStyle['autoFitMode']>): void;
645
+ setTextVerticalAlign(vAlign: NonNullable<index_d_exports$2.TextStyle['vAlign']>): void;
646
+ setTextWrap(wrap: NonNullable<index_d_exports$2.TextStyle['textWrap']>): void;
647
+ setAutoFitMode(mode: NonNullable<index_d_exports$2.TextStyle['autoFitMode']>): void;
1035
648
  setTextAdvanced(patch: TextAdvancedChanges): void;
1036
- setTextStyle(patch: Partial<TextStyle>, selection?: InlineTextSelection | null): void;
649
+ setTextStyle(patch: Partial<index_d_exports$2.TextStyle>, selection?: InlineTextSelection$1 | null): void;
1037
650
  setFillOpacity(opacity: number): void;
1038
651
  setStrokeOpacity(opacity: number): void;
1039
652
  setGradientFill(state: GradientState): void;
@@ -1044,8 +657,8 @@ interface InspectorActions {
1044
657
  setImageContrast(value: number): void;
1045
658
  setImageSaturation(value: number): void;
1046
659
  setImageCrop(edge: 'left' | 'top' | 'right' | 'bottom', value: number): void;
1047
- setImageEffects(patch: Partial<PptxImageEffects>): void;
1048
- setElementAction(trigger: 'click' | 'hover', action: ElementAction): void;
660
+ setImageEffects(patch: Partial<index_d_exports$2.PptxImageEffects>): void;
661
+ setElementAction(trigger: 'click' | 'hover', action: index_d_exports$2.ElementAction): void;
1049
662
  /** Set the selection's accessibility description (inspector Alt Text field). */
1050
663
  setAltText(text: string): void;
1051
664
  /** Set the selection's accessibility title (inspector Title field). */
@@ -1053,28 +666,28 @@ interface InspectorActions {
1053
666
  /** Set the selected OLE element's Object Name (`p:oleObj/@name`). */
1054
667
  setOleName(name: string): void;
1055
668
  /** Patch an in-place OLE content edit (see `InspectorHandlers.setOleContent`). */
1056
- setOleContent(patch: Partial<OlePptxElement>): void;
1057
- setChartData(data: PptxChartData): void;
1058
- setMediaProperties(patch: Partial<MediaPptxElement>): void;
669
+ setOleContent(patch: Partial<index_d_exports$2.OlePptxElement>): void;
670
+ setChartData(data: index_d_exports$2.PptxChartData): void;
671
+ setMediaProperties(patch: Partial<index_d_exports$2.MediaPptxElement>): void;
1059
672
  setTableHeaderRow(enabled: boolean): void;
1060
673
  setTableBandedRows(enabled: boolean): void;
1061
674
  setTableCellPadding(padding: number): void;
1062
- setTableOptions(patch: Partial<PptxTableData>, cellStyle?: Partial<PptxTableCellStyle>): void;
675
+ setTableOptions(patch: Partial<index_d_exports$2.PptxTableData>, cellStyle?: Partial<index_d_exports$2.PptxTableCellStyle>): void;
1063
676
  /** Replace the selection's whole table data (inspector data grid). */
1064
- setTableData(data: PptxTableData, rawXml?: XmlObject): void;
1065
- setTableCellStyle(row: number, column: number, patch: Partial<PptxTableCellStyle>): void;
1066
- setTableCellStyles(cells: TableCellPosition[], patch: Partial<PptxTableCellStyle>): void;
677
+ setTableData(data: index_d_exports$2.PptxTableData, rawXml?: index_d_exports$2.XmlObject): void;
678
+ setTableCellStyle(row: number, column: number, patch: Partial<index_d_exports$2.PptxTableCellStyle>): void;
679
+ setTableCellStyles(cells: TableCellPosition[], patch: Partial<index_d_exports$2.PptxTableCellStyle>): void;
1067
680
  mutateTableStructure(cell: TableCellPosition, action: TableStructureAction): void;
1068
681
  setTableColumnWidth(column: number, percent: number): void;
1069
682
  setTableRowHeight(row: number, height: number): void;
1070
683
  mergeTableCells(cells: TableCellPosition[]): void;
1071
684
  splitTableCell(cell: TableCellPosition): void;
1072
685
  setSmartArtNodeText(nodeId: string, text: string): void;
1073
- setSmartArtNodeStyle(nodeId: string, patch: Partial<PptxSmartArtNodeStyle>): void;
686
+ setSmartArtNodeStyle(nodeId: string, patch: Partial<index_d_exports$2.PptxSmartArtNodeStyle>): void;
1074
687
  mutateSmartArtNode(nodeId: string, action: 'add' | 'addChild' | 'remove' | 'promote' | 'demote'): void;
1075
- replaceSmartArtData(data: PptxSmartArtData): void;
1076
- setSmartArtLayout(layout: SmartArtLayoutType): void;
1077
- setSmartArtColorScheme(scheme: SmartArtColorScheme): void;
688
+ replaceSmartArtData(data: index_d_exports$2.PptxSmartArtData): void;
689
+ setSmartArtLayout(layout: index_d_exports$2.SmartArtLayoutType): void;
690
+ setSmartArtColorScheme(scheme: index_d_exports$2.SmartArtColorScheme): void;
1078
691
  }
1079
692
  //#endregion
1080
693
  //#region src/viewer/editor/editor-master-view-crud-actions.d.ts
@@ -1093,7 +706,7 @@ interface MasterViewCrudActions {
1093
706
  //#region src/viewer/editor/editor-merge-actions.d.ts
1094
707
  /** Shape Format > Merge Shapes (Union / Combine / Fragment / Intersect / Subtract). */
1095
708
  interface MergeActions {
1096
- mergeShapes(operation: MergeShapeOperation): void;
709
+ mergeShapes(operation: index_d_exports$2.MergeShapeOperation): void;
1097
710
  }
1098
711
  //#endregion
1099
712
  //#region src/viewer/editor/editor-section-actions.d.ts
@@ -1156,20 +769,20 @@ interface TextActions {
1156
769
  stepFontSize(direction: 'increase' | 'decrease'): void;
1157
770
  setFontSize(size: number): void;
1158
771
  setFontFamily(family: string): void;
1159
- setTextColor(color: string, ref?: PptxThemeColorRef): void;
772
+ setTextColor(color: string, ref?: index_d_exports$2.PptxThemeColorRef): void;
1160
773
  setHighlightColor(color: string): void;
1161
774
  setCharacterSpacing(value: number): void;
1162
775
  changeCase(mode: ChangeCaseMode): void;
1163
776
  clearFormatting(): void;
1164
777
  /** Set (not toggle) character/paragraph style fields on the selection, e.g. the title-bar search. */
1165
- patchSelectedTextStyle(patch: Partial<TextStyle>): void;
778
+ patchSelectedTextStyle(patch: Partial<index_d_exports$2.TextStyle>): void;
1166
779
  toggleBulletList(): void;
1167
780
  toggleNumberedList(): void;
1168
781
  increaseIndent(): void;
1169
782
  decreaseIndent(): void;
1170
- setTextAlign(align: TextStyle['align']): void;
783
+ setTextAlign(align: index_d_exports$2.TextStyle['align']): void;
1171
784
  setLineSpacing(value: number): void;
1172
- setTextDirection(direction: TextStyle['textDirection']): void;
785
+ setTextDirection(direction: index_d_exports$2.TextStyle['textDirection']): void;
1173
786
  setColumnCount(count: number): void;
1174
787
  }
1175
788
  //#endregion
@@ -1199,7 +812,7 @@ interface TransitionAdvance {
1199
812
  afterMs?: number;
1200
813
  }
1201
814
  interface TransitionActions {
1202
- applyTransition(type: PptxTransitionType, durationMs: number, applyToAll: boolean, advance?: TransitionAdvance): void;
815
+ applyTransition(type: index_d_exports$2.PptxTransitionType, durationMs: number, applyToAll: boolean, advance?: TransitionAdvance): void;
1203
816
  /**
1204
817
  * Commit the Transitions tab's whole draft, so EVERY control on that tab
1205
818
  * (preset, duration, advance-on-click, advance-after) takes effect the
@@ -1216,7 +829,7 @@ interface TransitionActions {
1216
829
  * the Sound picker: a freshly-picked file's `soundData` has no equivalent
1217
830
  * in {@link RibbonTransitionDraft}).
1218
831
  */
1219
- applyTransitionChange(changes: Partial<PptxSlideTransition>): void;
832
+ applyTransitionChange(changes: Partial<index_d_exports$2.PptxSlideTransition>): void;
1220
833
  }
1221
834
  //#endregion
1222
835
  //#region src/viewer/editor/editor-edit-ops.d.ts
@@ -1244,10 +857,10 @@ interface EditActions extends TextActions, ArrangeActions, ClipboardActions, Sli
1244
857
  masterView: MasterViewCrudActions;
1245
858
  comments: CommentActions;
1246
859
  toggleFormatPainter(): void;
1247
- setShapeFill(color: string, ref?: PptxThemeColorRef): void;
1248
- setShapeStroke(color: string, ref?: PptxThemeColorRef): void;
860
+ setShapeFill(color: string, ref?: index_d_exports$2.PptxThemeColorRef): void;
861
+ setShapeStroke(color: string, ref?: index_d_exports$2.PptxThemeColorRef): void;
1249
862
  setShapeStrokeWidth(width: number): void;
1250
- setShapeStyle(patch: Partial<ShapeStyle>): void;
863
+ setShapeStyle(patch: Partial<index_d_exports$2.ShapeStyle>): void;
1251
864
  setShapeType(shapeType: string): void;
1252
865
  /** B6: fold a colour into the deck's "Recent colours" MRU list; see `InspectorHandlers.pushRecentColor`. */
1253
866
  pushRecentColor(hex: string): void;
@@ -1257,10 +870,10 @@ interface EditActions extends TextActions, ArrangeActions, ClipboardActions, Sli
1257
870
  insertImage(): Promise<void>;
1258
871
  insertMedia(): Promise<void>;
1259
872
  /** Existing history-tracked insertion transaction for a prepared element. */
1260
- insertElement(element: PptxElement): void;
873
+ insertElement(element: index_d_exports$2.PptxElement): void;
1261
874
  /** Insert a default chart for the given dropdown entry (defaults to Column). */
1262
875
  insertChart(chartKind?: InsertChartKind): void;
1263
- insertSmartArt(layout: SmartArtLayout, defaultItems: string[]): void;
876
+ insertSmartArt(layout: index_d_exports$2.SmartArtLayout, defaultItems: string[]): void;
1264
877
  insertEquation(omml: Record<string, unknown>): void;
1265
878
  updateEquation(id: string, omml: Record<string, unknown>): void;
1266
879
  insertActionButton(shapeType: string): void;
@@ -1305,11 +918,212 @@ interface FindReplaceActions {
1305
918
  //#region src/viewer/ui/accessibility-panel.d.ts
1306
919
  interface AccessibilityPanel {
1307
920
  el: HTMLElement;
1308
- open(issues: readonly AccessibilityIssue[]): void;
921
+ open(issues: readonly index_d_exports$2.AccessibilityIssue[]): void;
1309
922
  close(): void;
1310
923
  }
924
+ /**
925
+ * A keyboard-accessible, live accessibility checker result panel. It is kept
926
+ * separate from the element inspector so it remains useful in read-only mode,
927
+ * while the View ribbon is its discoverable entry point.
928
+ */
929
+ declare function createAccessibilityPanel(doc: Document, t: Translator, onSelectSlide: (index: number) => void): AccessibilityPanel;
1311
930
  //#endregion
1312
931
  //#region src/viewer/ui/inspector/types.d.ts
932
+ /**
933
+ * The inspector edit actions: universal geometry + flat fill/stroke, plus the
934
+ * element-type-aware sections (text anchor/wrap/autofit, gradient fill +
935
+ * opacity, image adjustments/crop, table-level flags + padding).
936
+ */
937
+ interface InspectorHandlers {
938
+ /** Select an element from the Elements (layer-order) tab. */
939
+ selectElement(id: string): void;
940
+ /** Open the full Document Properties dialog from the Properties tab. */
941
+ openDocumentProperties(): void;
942
+ /**
943
+ * File > Options > Advanced > "Properties follow chart data point for
944
+ * current workbook", read fresh on every chart category removal.
945
+ */
946
+ getChartFollowDataPoint(): boolean;
947
+ /** Merge a patch into the presentation show/print settings (PRESENTATION card). */
948
+ updatePresentationSettings(patch: Partial<index_d_exports$2.PptxPresentationProperties>): void;
949
+ /** Apply a packaged theme part by archive path (THEME card). */
950
+ applyThemeByPath(themePath: string, allMasters: boolean): void;
951
+ /** Re-theme the deck from the THEME EDITOR card's staged colours/fonts/name. */
952
+ applyThemeEdit(payload: {
953
+ colorScheme: index_d_exports$2.PptxThemeColorScheme;
954
+ fontScheme: index_d_exports$2.PptxThemeFontScheme;
955
+ name: string;
956
+ }): void | Promise<void>;
957
+ /** Replace the deck's `ppt/tags/*.xml` collections (TAGS card). */
958
+ updateTagCollections(next: index_d_exports$2.PptxTagCollection[]): void;
959
+ /**
960
+ * The deck's parsed `ppt/tableStyles.xml` map, for the table properties
961
+ * panel's "Edit style...". `undefined` means the host has not wired the
962
+ * table-style-editor feature through; the button then simply does not render.
963
+ */
964
+ getTableStyleMap(): index_d_exports$2.ParsedTableStyleMap | undefined;
965
+ /** The current theme colour map (scheme key -> hex), for resolving scheme-based table style colours. */
966
+ getThemeColorMap(): Record<string, string> | undefined;
967
+ /** Commit a full replacement style map (section edit, create, or delete already applied). */
968
+ updateTableStyleMap(nextMap: index_d_exports$2.ParsedTableStyleMap): void;
969
+ /** Record a styleId for save-time removal from `ppt/tableStyles.xml`. */
970
+ deleteTableStyle(styleId: string): void;
971
+ /** Patch the active slide (THEME OVERRIDE card). */
972
+ updateActiveSlide(patch: Partial<index_d_exports$2.PptxSlide>): void;
973
+ /**
974
+ * Set a layout/master's background colour (SLIDE BACKGROUND card's
975
+ * template rows, shown while `editTemplateMode` is on). Master Views
976
+ * covers the same ground but requires leaving the slide.
977
+ */
978
+ setTemplateBackground(path: string, backgroundColor: string): void;
979
+ /** Read a layout/master's current background colour. */
980
+ getTemplateBackgroundColor(path: string): string | undefined;
981
+ /** Resize the slide canvas (the SLIDE SIZE card's raw W/H inputs). */
982
+ updateCanvasSize(size: {
983
+ width: number;
984
+ height: number;
985
+ }): void;
986
+ /**
987
+ * Adopt an EMU slide size (SLIDE SIZE preset dropdown / orientation toggle).
988
+ * Writes both the EMU state and the pixel canvas.
989
+ */
990
+ updateSlideSize(size: SlideSizeEmu): void;
991
+ /**
992
+ * Adopt an EMU slide size AND rescale every slide's content for it in one
993
+ * undoable step (the "Scale content for the new slide size?" prompt shown
994
+ * when the deck has content and the new size differs from the current one).
995
+ */
996
+ applySlideSizeRescale(size: SlideSizeEmu, mode: SlideSizeRescaleMode): void;
997
+ /** Add a comment on the current slide (Comments tab). */
998
+ addComment(text: string, mentions?: index_d_exports$2.PptxCommentMention[]): void;
999
+ /** Append a reply under a top-level comment (Comments tab reply form). */
1000
+ addCommentReply(parentId: string, text: string, mentions?: index_d_exports$2.PptxCommentMention[]): void;
1001
+ /** Replace a comment's (or reply's) text (Comments tab edit-in-place). */
1002
+ editComment(id: string, text: string): void;
1003
+ deleteComment(id: string): void;
1004
+ toggleCommentResolved(id: string): void;
1005
+ /** Set/clear one effect bucket on the selected element (docked Animation panel). */
1006
+ setAnimationEffect(group: AnimationGroup, preset: index_d_exports$2.PptxAnimationPreset | 'none'): void;
1007
+ /** Apply/clear a catalogue motion path by preset id (`'none'` clears it). */
1008
+ applyMotionPath(presetId: string): void;
1009
+ /** Patch timing/effect options on one element's animation entry. */
1010
+ setAnimationTiming(elementId: string, patch: AnimationTimingPatch): void;
1011
+ /** Stage a picked effect sound file, or clear it entirely (`undefined`). */
1012
+ setAnimationSound(elementId: string, pick: {
1013
+ dataUrl: string;
1014
+ fileName?: string;
1015
+ } | undefined): void;
1016
+ /** Stage one of PowerPoint's 19 built-in stock sounds by catalogue id. */
1017
+ setAnimationStockSound(elementId: string, catalogueId: string): void;
1018
+ /** Move an element's animation one step in the slide play order. */
1019
+ reorderAnimation(elementId: string, direction: 'up' | 'down'): void;
1020
+ setGeometry(patch: GeometryPatch): void;
1021
+ /** Flip the selected element's lock (see elementLockTogglePatch). */
1022
+ toggleElementLock(): void;
1023
+ /**
1024
+ * Set the shape fill colour. Pass `ref` for a theme-swatch pick (wins on
1025
+ * save, so the fill follows a later theme change); omit it to clear a
1026
+ * previously-stored ref for a plain/custom/recent pick.
1027
+ */
1028
+ setShapeFill(color: string, ref?: index_d_exports$2.PptxThemeColorRef): void;
1029
+ /** Same `ref` contract as {@link setShapeFill}, for the stroke colour. */
1030
+ setShapeStroke(color: string, ref?: index_d_exports$2.PptxThemeColorRef): void;
1031
+ setShapeStrokeWidth(width: number): void;
1032
+ setShapeStyle(patch: Partial<index_d_exports$2.ShapeStyle>): void;
1033
+ setShapeType(shapeType: string): void;
1034
+ /**
1035
+ * B6: fold a colour into the deck's "Recent colours" (`p:clrMru`) MRU list,
1036
+ * without touching the selected element. Every inspector colour input that
1037
+ * has no dedicated recent-colours row of its own (chart/table/image/
1038
+ * SmartArt/text-effects colours, gradient stops, pattern fill) calls this
1039
+ * on COMMIT (native `change`, never the continuous `input` event a drag
1040
+ * through the OS picker fires) so the deck's MRU list still grows even
1041
+ * though there is nowhere on screen to show it going in.
1042
+ */
1043
+ pushRecentColor(hex: string): void;
1044
+ setTextVerticalAlign(vAlign: InspectorState['vAlign']): void;
1045
+ setTextWrap(wrap: InspectorState['textWrap']): void;
1046
+ setAutoFitMode(mode: InspectorState['autoFitMode']): void;
1047
+ setTextAdvanced(patch: TextAdvancedChanges): void;
1048
+ setTextStyle(patch: Partial<index_d_exports$2.TextStyle>, selection?: InlineTextSelection$1 | null): void;
1049
+ setFillOpacity(opacity: number): void;
1050
+ setStrokeOpacity(opacity: number): void;
1051
+ setGradientFill(state: GradientState): void;
1052
+ addGradientStop(color: string, position: number): void;
1053
+ removeGradientStop(index: number): void;
1054
+ updateGradientStop(index: number, changes: Partial<GradientState['stops'][number]>): void;
1055
+ setImageBrightness(value: number): void;
1056
+ setImageContrast(value: number): void;
1057
+ setImageSaturation(value: number): void;
1058
+ setImageCrop(edge: 'left' | 'top' | 'right' | 'bottom', value: number): void;
1059
+ setImageEffects(patch: Partial<index_d_exports$2.PptxImageEffects>): void;
1060
+ replaceImage(): void;
1061
+ resetImage(): void;
1062
+ resetCrop(): void;
1063
+ setElementAction(trigger: 'click' | 'hover', action: index_d_exports$2.ElementAction): void;
1064
+ /** Set the selected element's accessibility description (Alt Text field). */
1065
+ setAltText(text: string): void;
1066
+ /**
1067
+ * Set the selected element's accessibility title (`p:cNvPr/@title`).
1068
+ * Applies to a plain shape/text box/connector and every graphic-frame
1069
+ * kind (table/chart/smartArt/ole/media), not a picture (which has no
1070
+ * title field). See {@link PptxNonVisualDescription}.
1071
+ */
1072
+ setTitle(text: string): void;
1073
+ /**
1074
+ * Set the selected OLE element's Object Name (`p:oleObj/@name`, ECMA-376
1075
+ * SS13.3.4). A browser cannot run the native application an embedded OLE
1076
+ * object belongs to, so the object stays read-only; this name already
1077
+ * parses, saves, and syncs via collaboration and only lacked an editing
1078
+ * surface.
1079
+ */
1080
+ setOleName(name: string): void;
1081
+ /**
1082
+ * Patch an in-place OLE content edit (spreadsheet cell / document
1083
+ * paragraph / nested-deck slide title / Replace File) onto the selected
1084
+ * element. Callers pass `buildOleContentUpdatePatch`'s output, which
1085
+ * already scopes the patch to the fields a content edit can touch.
1086
+ */
1087
+ setOleContent(patch: Partial<index_d_exports$2.OlePptxElement>): void;
1088
+ setChartData(data: index_d_exports$2.PptxChartData): void;
1089
+ setMediaProperties(patch: Partial<index_d_exports$2.MediaPptxElement>): void;
1090
+ setTableHeaderRow(enabled: boolean): void;
1091
+ setTableBandedRows(enabled: boolean): void;
1092
+ setTableCellPadding(padding: number): void;
1093
+ setTableOptions(patch: Partial<index_d_exports$2.PptxTableData>, cellStyle?: Partial<index_d_exports$2.PptxTableCellStyle>): void;
1094
+ /**
1095
+ * Replace the selected table's whole `tableData` (inspector data grid).
1096
+ *
1097
+ * `setTableOptions` cannot serve here: it re-applies the element's existing
1098
+ * rows after the patch, so a row/cell change made through it is discarded.
1099
+ */
1100
+ /**
1101
+ * Replace the selected table's whole `tableData`, plus the graphic-frame
1102
+ * `rawXml` the renderer and save writer actually read for a table parsed from
1103
+ * a real deck (a `tableData`-only patch is invisible on such tables).
1104
+ */
1105
+ setTableData(data: index_d_exports$2.PptxTableData, rawXml?: index_d_exports$2.XmlObject): void;
1106
+ setTableCellStyle(row: number, column: number, patch: Partial<index_d_exports$2.PptxTableCellStyle>): void;
1107
+ setTableCellStyles(cells: TableCellPosition[], patch: Partial<index_d_exports$2.PptxTableCellStyle>): void;
1108
+ mutateTableStructure(cell: TableCellPosition, action: TableStructureAction): void;
1109
+ setTableColumnWidth(column: number, percent: number): void;
1110
+ setTableRowHeight(row: number, height: number): void;
1111
+ mergeTableCells(cells: TableCellPosition[]): void;
1112
+ splitTableCell(cell: TableCellPosition): void;
1113
+ setSmartArtNodeText(nodeId: string, text: string): void;
1114
+ setSmartArtNodeStyle(nodeId: string, patch: Partial<index_d_exports$2.PptxSmartArtNodeStyle>): void;
1115
+ mutateSmartArtNode(nodeId: string, action: 'add' | 'addChild' | 'remove' | 'promote' | 'demote'): void;
1116
+ /**
1117
+ * Commit a whole replacement `smartArtData`, reflowed and history-integrated
1118
+ * like every other SmartArt mutation. Used by the text pane's Tab / Enter /
1119
+ * Backspace keyboard handling, which computes the next data (and, for
1120
+ * add/remove, the node to focus next) via the shared `smartart-node-pane-
1121
+ * handlers` builders before committing.
1122
+ */
1123
+ replaceSmartArtData(data: index_d_exports$2.PptxSmartArtData): void;
1124
+ setSmartArtLayout(layout: index_d_exports$2.SmartArtLayoutType): void;
1125
+ setSmartArtColorScheme(scheme: index_d_exports$2.SmartArtColorScheme): void;
1126
+ }
1313
1127
  /** Selection-derived state the inspector reflects, computed by `buildInspectorState`. */
1314
1128
  interface InspectorState {
1315
1129
  hasSelection: boolean;
@@ -1327,12 +1141,12 @@ interface InspectorState {
1327
1141
  isMedia: boolean;
1328
1142
  isTable: boolean;
1329
1143
  isSmartArt: boolean;
1330
- smartArtData: PptxSmartArtData | undefined;
1144
+ smartArtData: index_d_exports$2.PptxSmartArtData | undefined;
1331
1145
  isGroup: boolean;
1332
1146
  /** Number of children on a selected group, or undefined when not (yet) known. */
1333
1147
  groupChildCount: number | undefined;
1334
1148
  isOle: boolean;
1335
- oleObjectType: OleObjectType | undefined;
1149
+ oleObjectType: index_d_exports$2.OleObjectType | undefined;
1336
1150
  oleFileName: string | undefined;
1337
1151
  oleIsLinked: boolean;
1338
1152
  /** The OLE object's author-assigned name (`p:oleObj/@name`), if any. */
@@ -1342,7 +1156,7 @@ interface InspectorState {
1342
1156
  * needs `oleEmbeddedData`/`oleFileExtension`/`oleShowAsIcon` etc., not just
1343
1157
  * the flattened fields above). `undefined` when the selection isn't OLE.
1344
1158
  */
1345
- oleElement: OlePptxElement | undefined;
1159
+ oleElement: index_d_exports$2.OlePptxElement | undefined;
1346
1160
  x: number;
1347
1161
  y: number;
1348
1162
  width: number;
@@ -1350,12 +1164,12 @@ interface InspectorState {
1350
1164
  rotation: number;
1351
1165
  fillColor: string | undefined;
1352
1166
  /** Theme ref for `fillColor`, if any (highlights the matching theme swatch). */
1353
- fillColorRef: PptxThemeColorRef | undefined;
1167
+ fillColorRef: index_d_exports$2.PptxThemeColorRef | undefined;
1354
1168
  strokeColor: string | undefined;
1355
1169
  /** Theme ref for `strokeColor`, if any (highlights the matching theme swatch). */
1356
- strokeColorRef: PptxThemeColorRef | undefined;
1170
+ strokeColorRef: index_d_exports$2.PptxThemeColorRef | undefined;
1357
1171
  strokeWidth: number;
1358
- shapeStyle: ShapeStyle | undefined;
1172
+ shapeStyle: index_d_exports$2.ShapeStyle | undefined;
1359
1173
  shapeType: string | undefined;
1360
1174
  isConnector: boolean;
1361
1175
  fillOpacity: number;
@@ -1374,8 +1188,8 @@ interface InspectorState {
1374
1188
  paragraphMarginLeft: number;
1375
1189
  textDirection: 'horizontal' | 'vertical' | 'vertical270' | 'eaVert' | 'wordArtVert' | 'wordArtVertRtl' | 'mongolianVert';
1376
1190
  textRtl: boolean;
1377
- textStyle: TextStyle | undefined;
1378
- selectedTextRange: InlineTextSelection | null;
1191
+ textStyle: index_d_exports$2.TextStyle | undefined;
1192
+ selectedTextRange: InlineTextSelection$1 | null;
1379
1193
  imageBrightness: number;
1380
1194
  imageContrast: number;
1381
1195
  imageSaturation: number;
@@ -1388,8 +1202,8 @@ interface InspectorState {
1388
1202
  color: string;
1389
1203
  opacity: number;
1390
1204
  };
1391
- actionClick?: ElementAction;
1392
- actionHover?: ElementAction;
1205
+ actionClick?: index_d_exports$2.ElementAction;
1206
+ actionHover?: index_d_exports$2.ElementAction;
1393
1207
  /** The selected element's alt text (accessibility description), if any. */
1394
1208
  altText: string;
1395
1209
  /** The selected element's accessibility title (`p:cNvPr/@title`), if any. */
@@ -1402,7 +1216,7 @@ interface InspectorState {
1402
1216
  * See shared's `shouldShowAccessibilitySection`.
1403
1217
  */
1404
1218
  showAccessibilitySection: boolean;
1405
- chartData?: PptxChartData;
1219
+ chartData?: index_d_exports$2.PptxChartData;
1406
1220
  /**
1407
1221
  * The on-canvas chart part selection, scoped to the selected chart element:
1408
1222
  * a `pointIndex` ring-highlights one value cell in the data grid and syncs
@@ -1414,7 +1228,7 @@ interface InspectorState {
1414
1228
  seriesIndex: number;
1415
1229
  pointIndex?: number;
1416
1230
  } | null;
1417
- media?: MediaPptxElement;
1231
+ media?: index_d_exports$2.MediaPptxElement;
1418
1232
  mediaPreviewUrl?: string;
1419
1233
  mediaPosterUrl?: string;
1420
1234
  cropLeft: number;
@@ -1440,11 +1254,11 @@ interface InspectorState {
1440
1254
  row: number;
1441
1255
  column: number;
1442
1256
  }>;
1443
- tableCellStyle: PptxTableCellStyle | undefined;
1257
+ tableCellStyle: index_d_exports$2.PptxTableCellStyle | undefined;
1444
1258
  tableColumnWidths: number[];
1445
1259
  tableRowHeights: number[];
1446
1260
  /** The selected table element itself, feeding the inspector data grid. */
1447
- tableElement?: TablePptxElement;
1261
+ tableElement?: index_d_exports$2.TablePptxElement;
1448
1262
  /**
1449
1263
  * B6: the deck's `p:clrMru`, most-recent-first, feeding the "Recent
1450
1264
  * colours" row under the fill/stroke/text colour pickers.
@@ -1476,36 +1290,36 @@ interface InspectorDeckState {
1476
1290
  * offers Maximize/Ensure Fit when there is content to rescale.
1477
1291
  */
1478
1292
  hasDeckElements: boolean;
1479
- elements: readonly PptxElement[];
1293
+ elements: readonly index_d_exports$2.PptxElement[];
1480
1294
  selectedIds: readonly string[];
1481
1295
  /** Primary selected element id (docked Animation panel target), if any. */
1482
1296
  selectedElementId?: string;
1483
- comments: readonly PptxComment[];
1297
+ comments: readonly index_d_exports$2.PptxComment[];
1484
1298
  /** Authors offered by the Comments tab's `@`-mention typeahead. */
1485
- commentMentionAuthors: readonly PptxModernCommentAuthor[];
1299
+ commentMentionAuthors: readonly index_d_exports$2.PptxModernCommentAuthor[];
1486
1300
  /** Named custom shows, for the Action Settings panel's `customShow` picker. */
1487
- customShows: readonly PptxCustomShow[];
1301
+ customShows: readonly index_d_exports$2.PptxCustomShow[];
1488
1302
  docTitle: string | undefined;
1489
1303
  docAuthor: string | undefined;
1490
1304
  editable: boolean;
1491
1305
  /** Presentation show/print settings (PRESENTATION card controls). */
1492
- presentationProperties: PptxPresentationProperties;
1306
+ presentationProperties: index_d_exports$2.PptxPresentationProperties;
1493
1307
  /** Theme parts discovered in the package (THEME card dropdown). */
1494
- themeOptions: readonly PptxThemeOption[];
1308
+ themeOptions: readonly index_d_exports$2.PptxThemeOption[];
1495
1309
  /** The visible slide (THEME OVERRIDE card), or undefined on an empty deck. */
1496
- activeSlide: PptxSlide | undefined;
1310
+ activeSlide: index_d_exports$2.PptxSlide | undefined;
1497
1311
  /** Whether inherited layout/master elements are unlocked for editing. */
1498
1312
  editTemplateMode: boolean;
1499
1313
  /** Slide masters, resolving the active slide's layout/master (SLIDE BACKGROUND card's template rows). */
1500
- slideMasters: readonly PptxSlideMaster[];
1314
+ slideMasters: readonly index_d_exports$2.PptxSlideMaster[];
1501
1315
  /** Presentation theme colours used to preview override target slots. */
1502
- colorScheme: PptxThemeColorScheme | undefined;
1316
+ colorScheme: index_d_exports$2.PptxThemeColorScheme | undefined;
1503
1317
  /** Presentation theme fonts, seeding the THEME EDITOR card's font pair. */
1504
- fontScheme: PptxThemeFontScheme | undefined;
1318
+ fontScheme: index_d_exports$2.PptxThemeFontScheme | undefined;
1505
1319
  /** The loaded theme's name (THEME EDITOR card), when the package has one. */
1506
1320
  themeName: string | undefined;
1507
1321
  /** Tag collections parsed from `ppt/tags/*.xml` (TAGS card). */
1508
- tagCollections: readonly PptxTagCollection[];
1322
+ tagCollections: readonly index_d_exports$2.PptxTagCollection[];
1509
1323
  /** Notes page size in px (NOTES & HANDOUT card), when the package has one. */
1510
1324
  notesCanvasSize: {
1511
1325
  width: number;
@@ -1524,10 +1338,22 @@ interface Inspector {
1524
1338
  setEditable(editable: boolean): void;
1525
1339
  }
1526
1340
  //#endregion
1341
+ //#region src/viewer/ui/inspector/inspector.d.ts
1342
+ /**
1343
+ * The property inspector: a right-hand panel with React's three-tab strip
1344
+ * (Elements | Properties | Comments). The Properties tab shows the
1345
+ * element-type-aware sections when something is selected and a deck-level
1346
+ * panel (presentation / slide size / document) otherwise; Elements lists the
1347
+ * slide's layer order; Comments carries the slide's review comments. Vanilla
1348
+ * counterpart of React's `InspectorPane`, scoped to the highest-traffic
1349
+ * panels. All labels from the shared `pptx.*` dictionary.
1350
+ */
1351
+ declare function createInspector(doc: Document, t: Translator, handlers: InspectorHandlers): Inspector;
1352
+ //#endregion
1527
1353
  //#region src/viewer/ui/master-view-sidebar.d.ts
1528
1354
  interface MasterViewSidebarOptions {
1529
- tab: MasterViewTab;
1530
- masters: readonly PptxSlideMaster[];
1355
+ tab: index_d_exports$2.MasterViewTab;
1356
+ masters: readonly index_d_exports$2.PptxSlideMaster[];
1531
1357
  active: {
1532
1358
  masterIndex: number;
1533
1359
  layoutIndex: number | null;
@@ -1551,9 +1377,9 @@ interface MasterViewSidebarOptions {
1551
1377
  /** B4: the sidebar's CRUD command list for the current target (`[]` when there is none). */
1552
1378
  crudActions: readonly MasterViewCrudAction[];
1553
1379
  onCrudAction(id: MasterViewCrudActionId): void;
1554
- renderStage(slide: PptxSlide, scale: number): HTMLElement;
1380
+ renderStage(slide: index_d_exports$2.PptxSlide, scale: number): HTMLElement;
1555
1381
  onSelect(masterIndex: number, layoutIndex: number | null): void;
1556
- onTabChange(tab: MasterViewTab): void;
1382
+ onTabChange(tab: index_d_exports$2.MasterViewTab): void;
1557
1383
  onCollapse(): void;
1558
1384
  onHandoutSlidesPerPageChange(count: number): void;
1559
1385
  onMasterBackgroundColorChange(color: string): void;
@@ -1563,6 +1389,7 @@ interface MasterViewSidebar {
1563
1389
  render(options: MasterViewSidebarOptions): void;
1564
1390
  setVisible(visible: boolean): void;
1565
1391
  }
1392
+ declare function createMasterViewSidebar(doc: Document, t: Translator): MasterViewSidebar;
1566
1393
  //#endregion
1567
1394
  //#region src/viewer/ui/ribbon/ribbon-types.d.ts
1568
1395
  /** Ribbon tab identifiers this wave implements (see `ribbon-tabs.ts` for the full future roster). */
@@ -1581,7 +1408,7 @@ interface RibbonNavHandlers {
1581
1408
  openAccessibility(): void;
1582
1409
  openSettings(tab?: 'general' | 'shortcuts'): void;
1583
1410
  /** The host's resolved UI customisation (omitted: nothing customised). */
1584
- getCustomization?(): ResolvedCustomization;
1411
+ getCustomization?(): ResolvedCustomization$1;
1585
1412
  openHeaderFooter(): void;
1586
1413
  openCompare(): void;
1587
1414
  openSelectionPane(): void;
@@ -1620,7 +1447,7 @@ interface RibbonFileHandlers {
1620
1447
  createPresentation(templateId: string): void;
1621
1448
  openSettings(): void;
1622
1449
  /** The host's resolved UI customisation (omitted: nothing customised). */
1623
- getCustomization?(): ResolvedCustomization;
1450
+ getCustomization?(): ResolvedCustomization$1;
1624
1451
  openShare(): void;
1625
1452
  openDocumentProperties(): void;
1626
1453
  openFontEmbedding(): void;
@@ -1666,14 +1493,14 @@ interface RibbonSlideShowHandlers {
1666
1493
  * The deck's show settings, for the Options cluster's checkbox state (shared
1667
1494
  * `readSlideShowOption` turns them into ticks).
1668
1495
  */
1669
- showOptions(): PptxPresentationProperties;
1496
+ showOptions(): index_d_exports$2.PptxPresentationProperties;
1670
1497
  /**
1671
1498
  * Commit an Options-cluster change onto the deck's show settings. Routes to
1672
1499
  * the same history-integrated `updatePresentationProperties` path the Set Up
1673
1500
  * Show dialog uses, so unticking Use Timings really does stop the show
1674
1501
  * auto-advancing.
1675
1502
  */
1676
- updateShowOptions(patch: Partial<PptxPresentationProperties>): void;
1503
+ updateShowOptions(patch: Partial<index_d_exports$2.PptxPresentationProperties>): void;
1677
1504
  }
1678
1505
  /**
1679
1506
  * Transitions tab handlers, expressed in the shared `ribbon-transitions`
@@ -1691,13 +1518,13 @@ interface RibbonTransitionHandlers {
1691
1518
  /** Commit the tab's whole draft, onto the active slide or every slide. */
1692
1519
  applyDraft(draft: RibbonTransitionDraft, applyToAll: boolean): void;
1693
1520
  /** The ACTIVE slide's raw transition, for fields the draft does not carry (the Sound picker). */
1694
- readTransition(): PptxSlideTransition | undefined;
1521
+ readTransition(): index_d_exports$2.PptxSlideTransition | undefined;
1695
1522
  /**
1696
1523
  * Merge a raw partial change onto the active slide's transition. Used by
1697
1524
  * the Sound picker: a freshly-picked file's `soundData` has no equivalent
1698
1525
  * in {@link RibbonTransitionDraft}.
1699
1526
  */
1700
- applyChange(changes: Partial<PptxSlideTransition>): void;
1527
+ applyChange(changes: Partial<index_d_exports$2.PptxSlideTransition>): void;
1701
1528
  }
1702
1529
  /**
1703
1530
  * Design tab handlers. Both theme commands act on the PRESENTATION theme, as
@@ -1710,8 +1537,8 @@ interface RibbonTransitionHandlers {
1710
1537
  interface RibbonDesignHandlers {
1711
1538
  applyPresentationTheme(presetId: string): void;
1712
1539
  applyThemeEdit(payload: {
1713
- colorScheme: PptxThemeColorScheme;
1714
- fontScheme: PptxThemeFontScheme;
1540
+ colorScheme: index_d_exports$2.PptxThemeColorScheme;
1541
+ fontScheme: index_d_exports$2.PptxThemeFontScheme;
1715
1542
  name: string;
1716
1543
  }): void | Promise<void>;
1717
1544
  }
@@ -1800,13 +1627,13 @@ interface RibbonSelectionState {
1800
1627
  selectionGroupable?: boolean;
1801
1628
  formatPainterActive?: boolean;
1802
1629
  selectedElementId?: string;
1803
- animations?: readonly PptxElementAnimation[];
1630
+ animations?: readonly index_d_exports$2.PptxElementAnimation[];
1804
1631
  /** Read-only anchors for the active slide's deck-native effect groups. */
1805
- animationTimelineAnchors?: readonly PptxAnimationTimelineAnchor[];
1632
+ animationTimelineAnchors?: readonly index_d_exports$2.PptxAnimationTimelineAnchor[];
1806
1633
  /** Available slide layouts for the Slides group's New Slide / Layout menus. */
1807
1634
  layouts?: readonly LayoutOption[];
1808
1635
  /** Artwork for the layout gallery thumbnails, keyed by layout path. */
1809
- layoutPreviews?: ReadonlyMap<string, PptxLayoutPreview>;
1636
+ layoutPreviews?: ReadonlyMap<string, index_d_exports$2.PptxLayoutPreview>;
1810
1637
  /** `layoutPath` of the active slide, marking the current gallery tile. */
1811
1638
  currentLayoutPath?: string;
1812
1639
  /** Theme major/minor latin faces, leading the font dropdown. */
@@ -1834,10 +1661,10 @@ interface RibbonSelectionState {
1834
1661
  //#endregion
1835
1662
  //#region src/viewer/ui/mobile-action-sheets.d.ts
1836
1663
  /** Paint one slide at `scale`, the same callback the desktop rail is given. */
1837
- type MobileThumbnailRenderer = (slide: PptxSlide, scale: number) => HTMLElement;
1664
+ type MobileThumbnailRenderer = (slide: index_d_exports$2.PptxSlide, scale: number) => HTMLElement;
1838
1665
  interface MobileActionSheets {
1839
1666
  el: HTMLElement;
1840
- update(current: number, slides: readonly PptxSlide[], comments: readonly PptxComment[]): void;
1667
+ update(current: number, slides: readonly index_d_exports$2.PptxSlide[], comments: readonly index_d_exports$2.PptxComment[]): void;
1841
1668
  /**
1842
1669
  * Hand the Slides sheet the deck renderer, so it can show the slides
1843
1670
  * themselves rather than a list of their titles (which is all it had, and
@@ -1849,8 +1676,16 @@ interface MobileActionSheets {
1849
1676
  setEditable(editable: boolean): void;
1850
1677
  setNotesExpanded(expanded: boolean): void;
1851
1678
  }
1679
+ declare function createMobileActionSheets(doc: Document, t: Translator, handlers: RibbonHandlers, onSelectSlide: (index: number) => void, inspector: HTMLElement | null, hiddenActions?: readonly ToolbarActionId$1[]): MobileActionSheets;
1852
1680
  //#endregion
1853
1681
  //#region src/viewer/ui/mobile-toolbar.d.ts
1682
+ interface MobileToolbarHandlers {
1683
+ openMenu(): void;
1684
+ undo(): void;
1685
+ redo(): void;
1686
+ save(): void;
1687
+ present(): void;
1688
+ }
1854
1689
  interface MobileToolbar {
1855
1690
  el: HTMLElement;
1856
1691
  collaborationHost: HTMLElement;
@@ -1864,14 +1699,24 @@ interface MobileToolbar {
1864
1699
  aiHost: HTMLElement;
1865
1700
  setEditState(state: RibbonEditState): void;
1866
1701
  }
1702
+ /**
1703
+ * Compact phone toolbar matching React's menu/edit/save/present action row. A
1704
+ * thin adapter over the shared `pptx-ui-mobile-toolbar`, which owns the markup
1705
+ * and gating. Applies the same `hiddenActions` rules as the desktop chrome:
1706
+ * undo/redo hide independently, and present shares the `'fullscreen'` action
1707
+ * with the status bar / View tab's slide-show toggle. The AI toggle and the
1708
+ * collaboration pill are host-mounted into the element's `ai` and
1709
+ * `collaboration` slots; Share is the collaboration pill, so it is not drawn.
1710
+ */
1711
+ declare function createMobileToolbar(doc: Document, t: Translator, handlers: MobileToolbarHandlers, hiddenActions?: readonly ToolbarActionId$1[]): MobileToolbar;
1867
1712
  //#endregion
1868
1713
  //#region src/viewer/ui/notes-panel.d.ts
1869
1714
  /** State the panel needs to reflect: the slide to read notes from, and whether edits are allowed. */
1870
1715
  interface NotesPanelUpdate {
1871
- slide: PptxSlide | undefined;
1716
+ slide: index_d_exports$2.PptxSlide | undefined;
1872
1717
  editable: boolean;
1873
1718
  /** Notes-master per-level text defaults (font size, indent, etc.) to fall back to when a segment omits them. */
1874
- notesStyle?: PptxTextStyleLevels;
1719
+ notesStyle?: index_d_exports$2.PptxTextStyleLevels;
1875
1720
  }
1876
1721
  interface NotesPanel {
1877
1722
  el: HTMLElement;
@@ -1884,8 +1729,48 @@ interface NotesPanel {
1884
1729
  /** Expand or collapse the notes body (header stays visible either way). */
1885
1730
  setExpanded(expanded: boolean): void;
1886
1731
  }
1732
+ /**
1733
+ * The speaker-notes panel: a collapsible strip docked below the
1734
+ * slide stage. Vanilla counterpart of the Vue binding's `NotesPanel.vue`
1735
+ * plain `<textarea>` surface only; there is no rich contentEditable chrome
1736
+ * here (that is out of scope for this binding).
1737
+ *
1738
+ * The textarea is uncontrolled: its `value` is set imperatively and only
1739
+ * re-seeded on a genuine slide swap (keyed by slide id), matching the
1740
+ * mobile-safe rationale documented on the Vue editor. Edits commit on
1741
+ * `change` / `blur`, never per keystroke.
1742
+ */
1743
+ declare function createNotesPanel(doc: Document, t: Translator, onToggle: () => void, onCommit: (notes: string, notesSegments?: index_d_exports$2.TextSegment[]) => void): NotesPanel;
1887
1744
  //#endregion
1888
1745
  //#region src/viewer/ui/presentation-toolbar.d.ts
1746
+ /**
1747
+ * The floating slide-show toolbar, matching React's `PresentationToolbar`.
1748
+ *
1749
+ * Vanilla previously shipped ONLY `presentation-touch-controls.ts`, whose CSS
1750
+ * hides it outside a coarse pointer, so a desktop presenter saw no show chrome
1751
+ * at all: no counter, no navigation, and no way out short of Escape. This is the
1752
+ * desktop bar, a thin adapter over the shared `pptx-ui-present-toolbar`, which
1753
+ * renders the shared `present-chrome` inventory (control ids, order, names,
1754
+ * colour palettes and the elapsed readout) so it cannot drift from the other four
1755
+ * bindings.
1756
+ *
1757
+ * This module owns behaviour only: the auto-hide wrapper, the start time and the
1758
+ * state reflection. The element tree lives in the shared package.
1759
+ */
1760
+ interface PresentationToolbarHandlers {
1761
+ previous(): void;
1762
+ next(): void;
1763
+ /** Select an annotation tool; the caller decides whether re-selecting clears it. */
1764
+ setTool(tool: PresentationPointerTool): void;
1765
+ /** Set the active pointer colour (picking a swatch also selects its tool). */
1766
+ setColor(color: string): void;
1767
+ /** One-click blackboard: arm/disarm the black screen and the pen together. */
1768
+ toggleBlackboard(): void;
1769
+ clearAnnotations(): void;
1770
+ /** Open/close the presenter console + audience display. */
1771
+ togglePresenterView(): void;
1772
+ end(): void;
1773
+ }
1889
1774
  /** Everything the bar reflects; pushed in as partial patches from two sources. */
1890
1775
  interface PresentationToolbarState {
1891
1776
  /** Zero-based active slide. */
@@ -1910,12 +1795,29 @@ interface PresentationToolbar {
1910
1795
  toggleVisible(): void;
1911
1796
  dispose(): void;
1912
1797
  }
1798
+ /**
1799
+ * Build the show toolbar. `container` is the surface the bottom trigger zone is
1800
+ * measured against (the `.pptxv` root, which is also the fullscreen element).
1801
+ */
1802
+ declare function createPresentationToolbar(doc: Document, t: Translator, container: HTMLElement, handlers: PresentationToolbarHandlers): PresentationToolbar;
1913
1803
  //#endregion
1914
1804
  //#region src/viewer/ui/presentation-touch-controls.d.ts
1805
+ interface PresentationTouchControlHandlers {
1806
+ previous(): void;
1807
+ next(): void;
1808
+ exit(): void;
1809
+ }
1915
1810
  interface PresentationTouchControls {
1916
1811
  el: HTMLElement;
1917
1812
  update(current: number, total: number): void;
1918
1813
  }
1814
+ /**
1815
+ * Build persistent, safe-area-aware controls for coarse-pointer slide shows.
1816
+ * The prev/next pair is gated as a unit on the `'navigation'` action (the exit
1817
+ * affordance always stays, since removing it would trap a touch user in
1818
+ * presentation mode).
1819
+ */
1820
+ declare function createPresentationTouchControls(doc: Document, t: Translator, handlers: PresentationTouchControlHandlers, hiddenActions?: readonly ToolbarActionId$1[]): PresentationTouchControls;
1919
1821
  //#endregion
1920
1822
  //#region src/viewer/ui/read-only-banner.d.ts
1921
1823
  /** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
@@ -1945,7 +1847,7 @@ interface Ribbon {
1945
1847
  setEditable(editable: boolean): void;
1946
1848
  setSpellCheck?(enabled: boolean): void;
1947
1849
  /** Reflect the current selection across the Home tab's Font/Paragraph/Arrange groups. */
1948
- updateSelection(selectedElement: PptxElement | undefined, extra: RibbonSelectionState): void;
1850
+ updateSelection(selectedElement: index_d_exports$2.PptxElement | undefined, extra: RibbonSelectionState): void;
1949
1851
  /** Reflect the current Draw tab tool/colour/width (store-driven). */
1950
1852
  setDrawState(state: RibbonDrawState): void;
1951
1853
  setTemplateEditing(active: boolean): void;
@@ -1992,7 +1894,7 @@ interface Ribbon {
1992
1894
  * never called, and a hidden button/cluster inside a tab is never built by
1993
1895
  * that tab's own module (see `ribbon-types.ts` handlers vs. this file).
1994
1896
  */
1995
- export declare function createRibbon(doc: Document, t: Translator, handlers: RibbonHandlers, hiddenActions?: readonly ToolbarActionId[], accountAuth?: AccountAuthConfig): Ribbon;
1897
+ export declare function createRibbon(doc: Document, t: Translator, handlers: RibbonHandlers, hiddenActions?: readonly ToolbarActionId$1[], accountAuth?: AccountAuthConfig$1): Ribbon;
1996
1898
  //#endregion
1997
1899
  //#region src/viewer/ui/shortcut-panel.d.ts
1998
1900
  interface ShortcutPanel {
@@ -2002,6 +1904,18 @@ interface ShortcutPanel {
2002
1904
  close(): void;
2003
1905
  isOpen(): boolean;
2004
1906
  }
1907
+ /**
1908
+ * The keyboard-shortcut cheat sheet.
1909
+ *
1910
+ * Every other binding shipped one; the vanilla binding was the only viewer with
1911
+ * no way to discover its own keymap. Rows come from the shared
1912
+ * {@link VIEWER_SHORTCUT_REFERENCE}, so the list cannot claim a binding the
1913
+ * shared keymap does not actually resolve.
1914
+ *
1915
+ * It carries `data-pptx-shortcuts-panel`, the neutral hook the cross-binding
1916
+ * e2e suite locates it by.
1917
+ */
1918
+ declare function createShortcutPanel(doc: Document, t: Translator): ShortcutPanel;
2005
1919
  //#endregion
2006
1920
  //#region src/viewer/ui/status-bar.d.ts
2007
1921
  /** Autosave lifecycle states pushed into the save-state text. */
@@ -2043,9 +1957,9 @@ interface EditorController {
2043
1957
  duplicateSelected(): string | null;
2044
1958
  getSelectedElementId(): string | null;
2045
1959
  selectElements(ids: string[]): void;
2046
- applyElementPatch(id: string, patch: Partial<PptxElement>): void;
2047
- commitSlides(slides: PptxSlide[], currentSlide?: number): void;
2048
- commitElementUpdates(slides: PptxSlide[], label?: string): void;
1960
+ applyElementPatch(id: string, patch: Partial<index_d_exports$2.PptxElement>): void;
1961
+ commitSlides(slides: index_d_exports$2.PptxSlide[], currentSlide?: number): void;
1962
+ commitElementUpdates(slides: index_d_exports$2.PptxSlide[], label?: string): void;
2049
1963
  /** Switch the Draw ribbon tab's active tool (also clears selection when leaving `'select'`). */
2050
1964
  setDrawTool(tool: DrawTool): void;
2051
1965
  /** Set the pen/highlighter stroke colour used by the next committed stroke. */
@@ -2060,16 +1974,16 @@ interface EditorController {
2060
1974
  getEditActions(): EditActions;
2061
1975
  /** The Find & Replace actions for the ribbon's docked panel. */
2062
1976
  getFindReplaceActions(): FindReplaceActions;
2063
- commitNotes(notes: string, notesSegments?: TextSegment[]): void;
1977
+ commitNotes(notes: string, notesSegments?: index_d_exports$2.TextSegment[]): void;
2064
1978
  setHandoutSlidesPerPage(count: number): void;
2065
- updateDocumentProperties(core: PptxCoreProperties, app: PptxAppProperties, custom: PptxCustomProperty[]): void;
2066
- updatePresentationProperties(value: PptxPresentationProperties): void;
1979
+ updateDocumentProperties(core: index_d_exports$2.PptxCoreProperties, app: index_d_exports$2.PptxAppProperties, custom: index_d_exports$2.PptxCustomProperty[]): void;
1980
+ updatePresentationProperties(value: index_d_exports$2.PptxPresentationProperties): void;
2067
1981
  /** Replace the whole section list as one undoable step (AI deck seam). */
2068
- updateSections(value: PptxSection[]): void;
2069
- updateHeaderFooter(value: PptxHeaderFooter): void;
2070
- updateCustomShows(value: PptxCustomShow[]): void;
2071
- save(format?: PptxSaveFormat): Promise<Uint8Array>;
2072
- downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
1982
+ updateSections(value: index_d_exports$2.PptxSection[]): void;
1983
+ updateHeaderFooter(value: index_d_exports$2.PptxHeaderFooter): void;
1984
+ updateCustomShows(value: index_d_exports$2.PptxCustomShow[]): void;
1985
+ save(format?: index_d_exports$2.PptxSaveFormat): Promise<Uint8Array>;
1986
+ downloadAs(format: index_d_exports$2.PptxSaveFormat, fileName?: string): Promise<void>;
2073
1987
  downloadPptx(fileName?: string): Promise<void>;
2074
1988
  destroy(): void;
2075
1989
  }
@@ -2099,13 +2013,13 @@ interface OverlayBox {
2099
2013
  interface InlineEditorSession {
2100
2014
  el: HTMLElement;
2101
2015
  /** Recognize a merged model revision before the ordinary model replacement guard. */
2102
- checkModel?: (model: PptxElement | undefined) => boolean;
2016
+ checkModel?: (model: index_d_exports$2.PptxElement | undefined) => boolean;
2103
2017
  /** Canonical accepted state only, for retirement before a host permission veto. */
2104
- readAccepted?: () => InlineTextEditSnapshot | undefined;
2105
- activateList(element: PptxElement): boolean | undefined;
2106
- readSnapshot(): InlineTextEditSnapshot | undefined;
2107
- readList(): InlineListReadResult | undefined;
2108
- formatSnapshot(snapshot: InlineTextEditSnapshot): boolean;
2018
+ readAccepted?: () => InlineTextEditSnapshot$1 | undefined;
2019
+ activateList(element: index_d_exports$2.PptxElement): boolean | undefined;
2020
+ readSnapshot(): InlineTextEditSnapshot$1 | undefined;
2021
+ readList(): InlineListReadResult$1 | undefined;
2022
+ formatSnapshot(snapshot: InlineTextEditSnapshot$1): boolean;
2109
2023
  /** Commit the current text (fires `onCommit` when changed) and close. */
2110
2024
  commit(): void;
2111
2025
  /** Close without committing. */
@@ -2118,21 +2032,21 @@ interface OpenInlineEditorOptions {
2118
2032
  /** Element geometry in element px, plus the stage scale for placement. */
2119
2033
  box: OverlayBox;
2120
2034
  scale: number;
2121
- element: PptxElement;
2035
+ element: index_d_exports$2.PptxElement;
2122
2036
  spellCheck?: boolean;
2123
2037
  /** Use the existing connected slide channel, never create another session. */
2124
2038
  collaboration?: {
2125
- patcher: CollaborationLivePatcher;
2039
+ patcher: CollaborationLivePatcher$1;
2126
2040
  slideId?: string;
2127
2041
  };
2128
2042
  /** Called with the edited text on commit (only when it changed). */
2129
- onCommit(text: string, snapshot?: InlineTextEditSnapshot): void;
2043
+ onCommit(text: string, snapshot?: InlineTextEditSnapshot$1): void;
2130
2044
  /**
2131
2045
  * Called with the edited text on EVERY keystroke. Used for the collaboration
2132
2046
  * live preview only: it must not touch editor state or history.
2133
2047
  */
2134
- onInput?(text: string, snapshot?: InlineTextEditSnapshot): void;
2135
- onSelectionChange?(selection: InlineTextSelection | null): void;
2048
+ onInput?(text: string, snapshot?: InlineTextEditSnapshot$1): void;
2049
+ onSelectionChange?(selection: InlineTextSelection$1 | null): void;
2136
2050
  /** Called after the surface closes (commit or cancel). */
2137
2051
  onClose(): void;
2138
2052
  /**
@@ -2158,7 +2072,7 @@ interface OpenInlineEditorOptions {
2158
2072
  * the literal "[Equation]" placeholder and committing would permanently drop
2159
2073
  * the OMML (`textSegments[].equationXml`). Mirrors the Vue/React/Angular guard.
2160
2074
  */
2161
- export declare function canInlineEditElement(element: PptxElement | undefined): boolean;
2075
+ export declare function canInlineEditElement(element: index_d_exports$2.PptxElement | undefined): boolean;
2162
2076
  /**
2163
2077
  * Open the contenteditable editing surface over an element. Commits on blur
2164
2078
  * and on Escape; all keystrokes stay local (never trigger viewer shortcuts).
@@ -2176,25 +2090,85 @@ interface ThumbnailSectionActions {
2176
2090
  }
2177
2091
  //#endregion
2178
2092
  //#region src/viewer/ui/thumbnails.d.ts
2093
+ /** The item-2 multi-select/context-menu deps; all optional so existing callers keep working. */
2094
+ interface ThumbnailRailMenuDeps {
2095
+ store: Store<ViewerState>;
2096
+ getEditActions(): EditActions;
2097
+ addSlideAfter(index: number): void;
2098
+ duplicateSlides(indexes: number[]): void;
2099
+ deleteSlides(indexes: number[]): void;
2100
+ toggleHideSlides(indexes: number[]): void;
2101
+ }
2179
2102
  interface ThumbnailRail {
2180
2103
  el: HTMLElement;
2181
2104
  /** Rebuild the rail for a new slide list (uses `renderStage` per slide). */
2182
- render(slides: PptxSlide[], canvasSize: CanvasSize, renderStage: (slide: PptxSlide, scale: number) => HTMLElement, sections?: readonly PptxSection[], sectionActions?: ThumbnailSectionActions): void;
2105
+ render(slides: index_d_exports$2.PptxSlide[], canvasSize: CanvasSize, renderStage: (slide: index_d_exports$2.PptxSlide, scale: number) => HTMLElement, sections?: readonly index_d_exports$2.PptxSection[], sectionActions?: ThumbnailSectionActions): void;
2183
2106
  /** Highlight the active slide and scroll it into view. */
2184
2107
  setActive(index: number): void;
2185
2108
  /** Show or hide the rail. */
2186
2109
  setVisible(visible: boolean): void;
2187
2110
  /** Show or hide the pinned Add Slide footer (editing enabled only). */
2188
2111
  setAddSlideVisible(visible: boolean): void;
2189
- renderMasters(masters: readonly PptxSlideMaster[], canvasSize: CanvasSize, renderStage: (slide: PptxSlide, scale: number) => HTMLElement, onSelect: (masterIndex: number, layoutIndex: number | null) => void, active: {
2112
+ renderMasters(masters: readonly index_d_exports$2.PptxSlideMaster[], canvasSize: CanvasSize, renderStage: (slide: index_d_exports$2.PptxSlide, scale: number) => HTMLElement, onSelect: (masterIndex: number, layoutIndex: number | null) => void, active: {
2190
2113
  masterIndex: number;
2191
2114
  layoutIndex: number | null;
2192
2115
  }): void;
2193
2116
  }
2117
+ /**
2118
+ * The thumbnail sidebar: a scaled-down live render of every slide; clicking a
2119
+ * thumbnail navigates to it. Rebuilt only when the slide list changes.
2120
+ */
2121
+ declare function createThumbnailRail(doc: Document, t: Translator, onSelect: (index: number) => void, onAddSlide?: () => void, menuDeps?: ThumbnailRailMenuDeps): ThumbnailRail;
2194
2122
  //#endregion
2195
2123
  //#region src/viewer/ui/title-bar.d.ts
2196
2124
  /** Autosave lifecycle states the title-bar status text reflects. */
2197
2125
  type TitleBarAutosaveKind = 'idle' | 'saving' | 'saved' | 'error';
2126
+ /** Live Quick Access Toolbar config (File > Options > Quick Access Toolbar). */
2127
+ interface TitleBarQuickAccessState {
2128
+ visible: boolean;
2129
+ showCommandLabels: boolean;
2130
+ commandIds: readonly string[];
2131
+ }
2132
+ interface TitleBarQuickAccess {
2133
+ getState(): TitleBarQuickAccessState;
2134
+ /** Run a non-core command id (`presentFromStart`, `print`, `zoomIn`, ...). */
2135
+ run(id: string): void;
2136
+ /** ScreenTip text for a command label; undefined suppresses the tooltip. */
2137
+ screenTip(label: string): string | undefined;
2138
+ }
2139
+ interface TitleBarDeps {
2140
+ /** Display name of the open document (host-supplied). */
2141
+ fileName?: string;
2142
+ /** Whether the AutoSave switch starts on. */
2143
+ autosaveEnabled: boolean;
2144
+ /**
2145
+ * Whether the switch can change anything (default `true`). The host's
2146
+ * `autosave: false` is a policy the user cannot override, and a switch that
2147
+ * silently does nothing is worse than a visibly disabled one, so it renders
2148
+ * inert instead of pretending to work. See
2149
+ * `pptx-viewer-shared/render/autosave-policy`.
2150
+ */
2151
+ autosaveToggleAvailable?: boolean;
2152
+ /** Flip autosave; returns the new enabled state the switch reflects. */
2153
+ onToggleAutosave(): boolean;
2154
+ save(): void;
2155
+ undo(): void;
2156
+ redo(): void;
2157
+ /** Run a shared command-search id (`COMMAND_SEARCH_ENTRIES`), see `title-bar-commands.ts`. */
2158
+ runCommand(id: string): void;
2159
+ /** The search box's "Find in Slides" row: toggle the Find & Replace panel. */
2160
+ findInSlides(): void;
2161
+ /** Individually hidden toolbar buttons (gates undo/redo independently). */
2162
+ hiddenActions?: readonly ToolbarActionId$1[];
2163
+ /** Options-driven Quick Access strip; omitted = the classic Save/Undo/Redo. */
2164
+ quickAccess?: TitleBarQuickAccess;
2165
+ /**
2166
+ * Fires whenever the below-the-ribbon strip's emptiness is recomputed, so the
2167
+ * detached dock (see `ViewerChrome.setQuickAccessPosition`) can hide instead
2168
+ * of showing an empty bar.
2169
+ */
2170
+ onQuickAccessVisibilityChange?(hidden: boolean): void;
2171
+ }
2198
2172
  interface TitleBar {
2199
2173
  /** The shared `pptx-ui-title-bar` host; host-owned parts are slotted into it. */
2200
2174
  el: HTMLElement;
@@ -2221,6 +2195,68 @@ interface TitleBar {
2221
2195
  }
2222
2196
  //#endregion
2223
2197
  //#region src/viewer/ui/chrome.d.ts
2198
+ interface ChromeOptions {
2199
+ showToolbar: boolean;
2200
+ showThumbnails: boolean;
2201
+ /** Show the ribbon's editing surface (tab bar + Home/Insert/View content); default true. */
2202
+ showFormatToolbar: boolean;
2203
+ /** Build the property inspector panel (default true; shown only when editable). */
2204
+ showInspector: boolean;
2205
+ /** Host customisation region gates (default true): see `customization-lifecycle`. */
2206
+ showTitleBar?: boolean;
2207
+ showStatusBar?: boolean;
2208
+ showNotes?: boolean;
2209
+ /** Whether editing is initially enabled (gates ribbon tab content/inspector visibility). */
2210
+ editable: boolean;
2211
+ /**
2212
+ * Individually hidden toolbar buttons/ribbon tabs (default: nothing
2213
+ * hidden). Threaded down to every chrome surface that renders a hideable
2214
+ * action so DOM nodes for hidden actions are never constructed.
2215
+ */
2216
+ hiddenActions?: readonly ToolbarActionId$1[];
2217
+ /** Every ribbon handler (nav/primary/file/insert/edit/findReplace). */
2218
+ ribbonHandlers: RibbonHandlers;
2219
+ /**
2220
+ * The slides pane thumbnail context menu's multi-select bulk operations
2221
+ * (New Slide/Duplicate/Delete/Layout/Hide/Add Section). Omit to fall back
2222
+ * to the rail's single-slide "+ Add Slide" behaviour only, with no
2223
+ * right-click menu or Ctrl/Shift multi-select.
2224
+ */
2225
+ thumbnailMenu?: ThumbnailRailMenuDeps;
2226
+ /** Inspector actions (geometry + shape fill/stroke). */
2227
+ inspectorHandlers: InspectorHandlers;
2228
+ /**
2229
+ * Slide-show toolbar actions (annotation tools, presenter view, end show).
2230
+ * Navigation and exit reuse `ribbonHandlers.nav`; only the annotation and
2231
+ * presenter-console actions have no ribbon equivalent, so they arrive here.
2232
+ */
2233
+ presentationToolbarHandlers: Pick<PresentationToolbarHandlers, 'setTool' | 'setColor' | 'toggleBlackboard' | 'clearAnnotations' | 'togglePresenterView'>;
2234
+ /** PowerPoint-style top chrome, built when the toolbar is visible. */
2235
+ titleBar: TitleBarDeps;
2236
+ /** Optional File > Account sign-in hook point; disabled/absent by default. */
2237
+ accountAuth?: AccountAuthConfig$1;
2238
+ onSelectSlide(index: number): void;
2239
+ /** Header click on the notes panel; shares the ribbon Notes button's handler. */
2240
+ onToggleNotes(): void;
2241
+ /** Fired when the notes textarea commits (change/blur) in editable mode. */
2242
+ onCommitNotes(notes: string, notesSegments?: index_d_exports$2.TextSegment[]): void;
2243
+ /** "Enable Editing" click on the Protected View banner. */
2244
+ onEnableEditing(): void;
2245
+ /** "Edit anyway" click on the read-only recommendation banner. */
2246
+ onEditAnywayFromReadOnly(): void;
2247
+ /** Close click on the read-only recommendation banner. */
2248
+ onDismissReadOnlyBanner(): void;
2249
+ /** The read-only recommendation banner's password form submit. */
2250
+ onSubmitReadOnlyPassword(password: string): void;
2251
+ /** The read-only recommendation banner's password form "Cancel". */
2252
+ onCancelReadOnlyPasswordPrompt(): void;
2253
+ /** One compatibility toast's own dismiss button. */
2254
+ onDismissCompatToast(id: string): void;
2255
+ /** The compatibility toast stack's "Dismiss all" button. */
2256
+ onDismissAllCompatToasts(): void;
2257
+ /** One run-program notice's own dismiss button. */
2258
+ onDismissRunProgramNotice(id: string): void;
2259
+ }
2224
2260
  /** The viewer's static DOM skeleton plus the mutable overlay controls. */
2225
2261
  interface ViewerChrome {
2226
2262
  /** `.pptxv` root (focusable; keyboard navigation attaches here). */
@@ -2281,6 +2317,427 @@ interface ViewerChrome {
2281
2317
  /** Replace the running-show "Run program" notice stack. */
2282
2318
  setRunProgramNotices(notices: readonly RunProgramNotice[]): void;
2283
2319
  }
2320
+ /**
2321
+ * Build the viewer chrome: ribbon (optional), thumbnail rail (optional),
2322
+ * viewport + stage host, and the loading/error/empty overlays. Pure DOM
2323
+ * assembly; all behaviour is wired by the caller through the handlers.
2324
+ */
2325
+ declare function buildViewerChrome(doc: Document, t: Translator, options: ChromeOptions): ViewerChrome;
2326
+ //#endregion
2327
+ //#region src/viewer/ui/icon-paths.d.ts
2328
+ declare const ICON_PATHS: {
2329
+ readonly 'chevron-left': readonly ['M15 18l-6-6 6-6'];
2330
+ readonly 'chevron-right': readonly ['M9 18l6-6-6-6'];
2331
+ readonly 'chevron-down': readonly ['M6 9l6 6 6-6'];
2332
+ readonly 'chevron-up': readonly ['M18 15l-6-6-6 6'];
2333
+ readonly 'zoom-in': readonly ['M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14z', 'M21 21l-4.35-4.35', 'M11 8v6', 'M8 11h6'];
2334
+ readonly 'zoom-out': readonly ['M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14z', 'M21 21l-4.35-4.35', 'M8 11h6'];
2335
+ readonly fit: readonly ['M8 3H5a2 2 0 0 0-2 2v3', 'M16 3h3a2 2 0 0 1 2 2v3', 'M8 21H5a2 2 0 0 1-2-2v-3', 'M16 21h3a2 2 0 0 0 2-2v-3'];
2336
+ readonly play: readonly ['M6 4l14 8-14 8V4z'];
2337
+ readonly sidebar: readonly ['M4 4h16v16H4z', 'M9 4v16'];
2338
+ readonly undo: readonly ['M3 7v6h6', 'M21 17a9 9 0 0 0-15-6.7L3 13'];
2339
+ readonly redo: readonly ['M21 7v6h-6', 'M3 17a9 9 0 0 1 15-6.7L21 13'];
2340
+ readonly save: readonly ['M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z', 'M17 21v-8H7v8', 'M7 3v5h8'];
2341
+ readonly notes: readonly ['M5 4h14v16H5z', 'M8 9h8', 'M8 13h8', 'M8 17h4'];
2342
+ readonly plus: readonly ['M12 5v14', 'M5 12h14'];
2343
+ readonly minus: readonly ['M5 12h14'];
2344
+ readonly shapes: readonly ['M4 4h9v9H4z', 'M17.5 14a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z'];
2345
+ readonly 'bring-front': readonly ['M9 3h12v12H9z', 'M3 9h6v12h12v-6', 'M3 9h6V3'];
2346
+ readonly 'send-back': readonly ['M3 9h12v12H3z', 'M9 3h12v12h-6', 'M15 15h6V9'];
2347
+ readonly 'bring-forward': readonly ['M8 8h13v13H8z', 'M3 3h10v5', 'M3 3v10h5'];
2348
+ readonly 'send-backward': readonly ['M3 3h13v13H3z', 'M16 16h5V8', 'M16 21h5v-5'];
2349
+ readonly share: readonly ['M15 5a3 3 0 1 0 6 0 3 3 0 1 0 -6 0', 'M3 12a3 3 0 1 0 6 0 3 3 0 1 0 -6 0', 'M15 19a3 3 0 1 0 6 0 3 3 0 1 0 -6 0', 'M8.6 13.5l6.8 3.9', 'M15.4 6.6l-6.8 3.9'];
2350
+ readonly broadcast: readonly ['M10 12a2 2 0 1 0 4 0 2 2 0 1 0 -4 0', 'M7.8 7.8a6 6 0 0 0 0 8.4', 'M16.2 7.8a6 6 0 0 1 0 8.4', 'M4.9 4.9a10 10 0 0 0 0 14.2', 'M19.1 4.9a10 10 0 0 1 0 14.2'];
2351
+ readonly cut: readonly ['M6 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z', 'M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z', 'M20 4L8.5 15.5', 'M14.5 9.5L20 15', 'M8.5 8.5L12 12'];
2352
+ readonly copy: readonly ['M9 9h11v11H9z', 'M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1'];
2353
+ readonly paste: readonly ['M9 3h6v3H9z', 'M6 5h2v2h8V5h2a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1z'];
2354
+ readonly duplicate: readonly ['M8 8h11v11H8z', 'M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1'];
2355
+ readonly trash: readonly ['M4 6h16', 'M9 6V4h6v2', 'M6 6l1 14h10l1-14', 'M10 11v5', 'M14 11v5'];
2356
+ readonly bold: readonly ['M6 4h6a3.5 3.5 0 0 1 0 7H6z', 'M6 11h7a3.5 3.5 0 0 1 0 7H6z'];
2357
+ readonly italic: readonly ['M11 4h6', 'M7 20h6', 'M15 4L9 20'];
2358
+ readonly underline: readonly ['M6 4v6a6 6 0 0 0 12 0V4', 'M5 21h14'];
2359
+ readonly strikethrough: readonly ['M6 12h12', 'M8 6.5a4 3 0 0 1 4-2.5c2 0 4 1 4 2.5', 'M8 17.5a4 3 0 0 0 4 2.5c2 0 4-1 4-2.5'];
2360
+ readonly 'text-shadow': readonly ['M6 17V7h5a3.5 3.5 0 0 1 0 7H6', 'M9.5 10h5a3.5 3.5 0 0 1 0 7H9.5', 'M9.5 17V10'];
2361
+ readonly 'a-up': readonly ['M5 18l4-11 4 11', 'M6.5 14h5', 'M17 10l3-3 3 3'];
2362
+ readonly 'a-down': readonly ['M5 18l4-11 4 11', 'M6.5 14h5', 'M17 7l3 3 3-3'];
2363
+ readonly 'clear-format': readonly ['M4 7V4h11l-1.5 3', 'M14 7l6 13', 'M9.5 10.5L18 19', 'M4 20h7'];
2364
+ readonly 'text-direction': readonly [];
2365
+ readonly palette: readonly [];
2366
+ readonly 'change-case': readonly ['M4 16l3-9 3 9', 'M5 13h4', 'M14 8v8', 'M14 10a3 3 0 1 1 0 6', 'M14 10a3 3 0 1 0 0 6'];
2367
+ readonly 'char-spacing': readonly ['M6 6h2v12H6z', 'M16 6h2v12h-2z', 'M2 20h2M2 20v-2M2 20v2', 'M22 20h-2M22 20v-2M22 20v2'];
2368
+ readonly 'font-color': readonly ['M6 20h12', 'M9.5 4h5L18 16H6L9.5 4z'];
2369
+ readonly highlight: readonly ['M11 15l-4 4H3v-4l4-4', 'M14.5 4.5l5 5L9 20l-5-1 1-5z'];
2370
+ readonly 'bullet-list': readonly ['M9 6h11', 'M9 12h11', 'M9 18h11', 'M4 6h.01', 'M4 12h.01', 'M4 18h.01'];
2371
+ readonly 'numbered-list': readonly ['M10 6h11', 'M10 12h11', 'M10 18h11', 'M4 6h1v3', 'M4 13a1 1 0 0 1 1-1h1v2l-2 2h2', 'M4 17h2v3H4'];
2372
+ readonly 'indent-increase': readonly ['M3 5h18', 'M3 19h18', 'M3 12h9', 'M14 9l4 3-4 3'];
2373
+ readonly 'indent-decrease': readonly ['M3 5h18', 'M3 19h18', 'M3 12h9', 'M18 9l-4 3 4 3'];
2374
+ readonly 'align-left': readonly ['M4 6h16', 'M4 12h10', 'M4 18h14'];
2375
+ readonly 'align-center': readonly ['M4 6h16', 'M7 12h10', 'M6 18h12'];
2376
+ readonly 'align-right': readonly ['M4 6h16', 'M10 12h10', 'M6 18h14'];
2377
+ readonly 'align-justify': readonly ['M4 6h16', 'M4 12h16', 'M4 18h16'];
2378
+ readonly 'align-top': readonly ['M4 4h16', 'M9 9h6v11H9z'];
2379
+ readonly 'align-middle': readonly ['M4 12h16', 'M9 6.5h6v11H9z'];
2380
+ readonly 'align-bottom': readonly ['M4 20h16', 'M9 4h6v11H9z'];
2381
+ readonly 'distribute-h': readonly ['M3 4v16', 'M21 4v16', 'M8 9h3v6H8z', 'M13 9h3v6h-3z'];
2382
+ readonly 'distribute-v': readonly ['M4 3h16', 'M4 21h16', 'M9 8v3h6V8z', 'M9 13v3h6v-3z'];
2383
+ readonly 'flip-h': readonly ['M12 3v18', 'M17 8l3 4-3 4', 'M7 8l-3 4 3 4'];
2384
+ readonly 'flip-v': readonly ['M3 12h18', 'M8 17l4 3 4-3', 'M8 7l4-3 4 3'];
2385
+ readonly group: readonly ['M4 4h10v10H4z', 'M10 10h10v10H10z'];
2386
+ readonly ungroup: readonly ['M4 4h7v7H4z', 'M13 13h7v7h-7z'];
2387
+ readonly 'line-spacing': readonly ['M5 5h14', 'M5 12h14', 'M5 19h14', 'M2 8l0 -5 M2 3l1.5 1.5 M2 3l-1.5 1.5', 'M2 16l0 5 M2 21l1.5 -1.5 M2 21l-1.5 -1.5'];
2388
+ readonly search: readonly ['M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14z', 'M21 21l-4.35-4.35'];
2389
+ readonly replace: readonly ['M4 7h11l-3-3', 'M4 7l3 3', 'M20 17H9l3-3', 'M20 17l-3 3'];
2390
+ readonly 'new-slide': readonly ['M4 4h16v16H4z', 'M12 8v8', 'M8 12h8'];
2391
+ readonly layout: readonly ['M4 3h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z', 'M15 3h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z', 'M15 14h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1Z', 'M4 14h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1Z'];
2392
+ readonly 'slide-templates': readonly ['M4 3h16a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z', 'M4 14h7a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1Z', 'M17 14h3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1Z'];
2393
+ readonly table: readonly ['M3 4h18v16H3z', 'M3 10h18', 'M3 16h18', 'M9 4v16', 'M15 4v16'];
2394
+ readonly image: readonly ['M3 4h18v16H3z', 'M8 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4z', 'M4 18l5-5 4 4 3-3 4 4'];
2395
+ readonly video: readonly ['M3 5h13v14H3z', 'M16 10l5-3v10l-5-3z'];
2396
+ readonly 'text-box': readonly ['M4 4h16v16H4z', 'M9 9h6', 'M12 9v7'];
2397
+ readonly chart: readonly ['M3 3v18h18', 'M7 11h3v6H7z', 'M12 7h3v10h-3z', 'M17 13h3v4h-3z'];
2398
+ readonly file: readonly ['M6 2h9l5 5v15H6z', 'M15 2v5h5'];
2399
+ readonly download: readonly ['M12 3v12', 'M7 10l5 5 5-5', 'M5 21h14'];
2400
+ readonly package: readonly ['M21 8l-9 5-9-5', 'M3 8l9-5 9 5v8l-9 5-9-5z', 'M12 13v8'];
2401
+ readonly printer: readonly ['M6 9V3h12v6', 'M6 18H4a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-2', 'M6 14h12v7H6z'];
2402
+ readonly square: readonly ['M4 4h16v16H4z'];
2403
+ readonly circle: readonly ['M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z'];
2404
+ readonly triangle: readonly ['M12 3l9 18H3z'];
2405
+ readonly diamond: readonly ['M12 2l10 10-10 10L2 12z'];
2406
+ readonly database: readonly ['M12 5c4.4 0 8-1.1 8-2.5S16.4 0 12 0 4 1.1 4 2.5 7.6 5 12 5z', 'M4 2.5v14c0 1.4 3.6 2.5 8 2.5s8-1.1 8-2.5v-14', 'M4 9c0 1.4 3.6 2.5 8 2.5s8-1.1 8-2.5'];
2407
+ readonly 'move-right': readonly ['M5 12h14', 'M13 6l6 6-6 6'];
2408
+ readonly equation: readonly ['M4 17h6', 'M7 14v6', 'M14 7l4.5 10', 'M15.5 14h5'];
2409
+ readonly 'smart-art': readonly ['M3 3h8v8H3z', 'M13 13h8v8h-8z', 'M11 7h2', 'M17 11v2'];
2410
+ readonly 'action-button': readonly ['M3 3h18v18H3z', 'M13 7l4 5-4 5'];
2411
+ readonly field: readonly ['M4 7h16', 'M4 12h10', 'M4 17h12', 'M19 12a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'];
2412
+ readonly cursor: readonly ['M4 4l7.07 17 2.51-7.39L21 11.07 4 4z'];
2413
+ readonly pen: readonly ['M12 20h9', 'M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z'];
2414
+ readonly highlighter: readonly ['M9 11l-6 6v3h3l9.5-9.5', 'M14.5 4l5.5 5.5-2.5 2.5-5.5-5.5z'];
2415
+ readonly eraser: readonly ['M7 21l-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21', 'M22 21H7', 'M5 11l9 9'];
2416
+ readonly menu: readonly ['M4 6h16', 'M4 12h16', 'M4 18h16'];
2417
+ readonly layers: readonly ['M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z', 'M22 17.65l-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65', 'M22 12.65l-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65'];
2418
+ readonly sliders: readonly ['M20 7h-9', 'M14 17H5', 'M17 14a3 3 0 1 0 0 6 3 3 0 0 0 0-6z', 'M7 4a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'];
2419
+ readonly 'panel-left': readonly ['M4 4h16v16H4z', 'M9 4v16'];
2420
+ readonly 'panel-right': readonly ['M4 4h16v16H4z', 'M15 4v16'];
2421
+ readonly 'sticky-note': readonly ['M5 4h14v10l-6 6H5z', 'M13 20v-6h6'];
2422
+ readonly monitor: readonly ['M3 5h18v12H3z', 'M8 21h8', 'M12 17v4'];
2423
+ readonly presentation: readonly ['M3 4h18', 'M5 4h14v11H5z', 'M12 15v3', 'M9 21l3-3 3 3'];
2424
+ readonly columns: readonly ['M4 4h16v16H4z', 'M12 4v16'];
2425
+ readonly comment: readonly ['M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'];
2426
+ readonly settings: readonly ['M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z', 'M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'];
2427
+ readonly 'folder-plus': readonly ['M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z', 'M12 10v6', 'M9 13h6'];
2428
+ readonly ellipsis: readonly ['M5 12h.01', 'M12 12h.01', 'M19 12h.01'];
2429
+ readonly sparkles: readonly ['M12 3l1.9 4.6L18.5 9.5l-4.6 1.9L12 16l-1.9-4.6L5.5 9.5l4.6-1.9L12 3z', 'M19 15l.9 2.1L22 18l-2.1.9L19 21l-.9-2.1L16 18l2.1-.9L19 15z'];
2430
+ readonly send: readonly ['M22 2L11 13', 'M22 2l-7 20-4-9-9-4 20-7z'];
2431
+ readonly eye: readonly ['M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z', 'M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'];
2432
+ readonly 'eye-off': readonly ['M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94', 'M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19', 'M14.12 14.12a3 3 0 1 1-4.24-4.24', 'M1 1l22 22'];
2433
+ readonly wrench: readonly ['M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94z'];
2434
+ readonly check: readonly ['M20 6L9 17l-5-5'];
2435
+ readonly alert: readonly ['M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z', 'M12 9v4', 'M12 17h.01'];
2436
+ readonly close: readonly ['M18 6L6 18', 'M6 6l12 12'];
2437
+ readonly crosshair: readonly ['M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z', 'M12 2v4', 'M12 18v4', 'M2 12h4', 'M18 12h4'];
2438
+ readonly history: readonly ['M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8', 'M3 3v5h5', 'M12 7v5l4 2'];
2439
+ readonly timer: readonly ['M10 2h4', 'M12 14l3-3', 'M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16z'];
2440
+ readonly link: readonly ['M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71', 'M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'];
2441
+ readonly 'git-merge': readonly ['M3 6a3 3 0 1 0 6 0 3 3 0 1 0 -6 0', 'M15 18a3 3 0 1 0 6 0 3 3 0 1 0 -6 0', 'M6 9v6', 'M6 15a6 6 0 0 0 6 6h3'];
2442
+ readonly pin: readonly ['M12 17v5', 'M9 10.5V4h-1a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2h-1v6.5l2 2.5H7z'];
2443
+ readonly 'pin-off': readonly ['M12 17v5', 'M9 10.5V4h-1a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2h-1v6.5l2 2.5H7z', 'M3 3l18 18'];
2444
+ readonly bug: readonly ['M12 8a4 4 0 0 0-4 4v3a4 4 0 0 0 8 0v-3a4 4 0 0 0-4-4z', 'M9 6l1.5 1.5', 'M15 6l-1.5 1.5', 'M6 12H4', 'M20 12h-2', 'M6 16H4', 'M20 16h-2', 'M12 20v-8'];
2445
+ readonly 'circle-pause': readonly ['M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z', 'M10 9v6', 'M14 9v6'];
2446
+ readonly 'circle-play': readonly ['M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z', 'M10 8l6 4-6 4z'];
2447
+ readonly 'rotate-ccw': readonly ['M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8', 'M3 3v5h5'];
2448
+ readonly 'grid-2x2': readonly ['M3 3h18v18H3z', 'M12 3v18', 'M3 12h18'];
2449
+ readonly scan: readonly ['M3 8V5a2 2 0 0 1 2-2h3', 'M16 3h3a2 2 0 0 1 2 2v3', 'M21 16v3a2 2 0 0 1-2 2h-3', 'M8 21H5a2 2 0 0 1-2-2v-3'];
2450
+ readonly 'mouse-pointer-2': readonly ['M4 3l7 17 2.5-6.5L20 11z'];
2451
+ readonly captions: readonly ['M3 5h18v14H3z', 'M7 12h3', 'M14 12h3'];
2452
+ readonly 'monitor-off': readonly ['M3 5h13', 'M21 5v9', 'M3 5v9h11', 'M8 21h8', 'M12 17v4', 'M3 3l18 18'];
2453
+ readonly 'arrow-left-right': readonly ['M8 3L4 7l4 4', 'M4 7h16', 'M16 13l4 4-4 4', 'M20 17H4'];
2454
+ readonly lock: readonly ['M3 11h18v11H3z', 'M7 11V7a5 5 0 0 1 10 0v4'];
2455
+ readonly 'lock-open': readonly ['M3 11h18v11H3z', 'M7 11V7a5 5 0 0 1 9.9-1'];
2456
+ readonly paintbrush: readonly ['m14.622 17.897-10.68-2.913', 'M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z', 'M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15'];
2457
+ readonly filter: readonly ['M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z'];
2458
+ readonly 'merge-shapes': readonly ['M3 3h12v12H3z', 'M9 9h12v12H9z'];
2459
+ readonly crop: readonly ['M6 2v14a2 2 0 0 0 2 2h14', 'M18 22V8a2 2 0 0 0-2-2H2'];
2460
+ };
2461
+ type IconName = keyof typeof ICON_PATHS;
2462
+ //#endregion
2463
+ //#region src/viewer/ui/icons.d.ts
2464
+ /** Build a 16x16 stroked icon `<svg>` for the given name. */
2465
+ declare function createIcon(doc: Document, name: IconName): SVGSVGElement;
2466
+ //#endregion
2467
+ //#region src/viewer/ui/controls.d.ts
2468
+ /**
2469
+ * Small reusable DOM control builders for the editing chrome (format toolbar +
2470
+ * inspector). Each returns the element plus an imperative handle so the editor
2471
+ * can enable/disable and reflect the selected element's values without a
2472
+ * framework. Pure DOM assembly; all behaviour is the caller's `on*` handlers.
2473
+ */
2474
+ interface ButtonOptions {
2475
+ label: string;
2476
+ icon?: IconName;
2477
+ /** Short text glyph when no icon (e.g. "B" for bold). */
2478
+ text?: string;
2479
+ /**
2480
+ * Visible text label rendered next to the icon; turns the fixed-size icon
2481
+ * button into a React-style labelled pill (`.pptxv-btn-pill`).
2482
+ */
2483
+ textLabel?: string;
2484
+ /** Extra class on the button (e.g. for a bold/italic glyph style). */
2485
+ className?: string;
2486
+ onClick(): void;
2487
+ }
2488
+ interface ButtonHandle {
2489
+ btn: HTMLButtonElement;
2490
+ setActive(active: boolean): void;
2491
+ setDisabled(disabled: boolean): void;
2492
+ }
2493
+ /** Build an icon/glyph button labelled (title + aria-label) via `label`. */
2494
+ declare function makeButton(doc: Document, options: ButtonOptions): ButtonHandle;
2495
+ interface ColorControlOptions {
2496
+ label: string;
2497
+ /** Fired on every colour change (native `<input type=color>` input event). */
2498
+ onInput(hex: string): void;
2499
+ /**
2500
+ * B6: fired once the picker COMMITS (native `change`), separate from the
2501
+ * continuous `onInput` a drag through the OS colour picker fires. Wired by
2502
+ * callers to `InspectorHandlers.pushRecentColor` so the "Recent colours"
2503
+ * MRU list grows once per pick rather than on every drag tick.
2504
+ */
2505
+ onCommit?(hex: string): void;
2506
+ }
2507
+ interface ColorControlHandle {
2508
+ el: HTMLElement;
2509
+ setValue(hex: string | undefined): void;
2510
+ setDisabled(disabled: boolean): void;
2511
+ }
2512
+ /**
2513
+ * A labelled colour swatch backed by a native `<input type="color">`. The
2514
+ * visible swatch shows the current colour; clicking it opens the OS picker.
2515
+ */
2516
+ declare function makeColorControl(doc: Document, options: ColorControlOptions, fallback?: string): ColorControlHandle;
2517
+ interface NumberFieldOptions {
2518
+ label: string;
2519
+ min?: number;
2520
+ max?: number;
2521
+ step?: number;
2522
+ /** Fired on commit (Enter / change / blur) with the parsed number. */
2523
+ onCommit(value: number): void;
2524
+ }
2525
+ interface NumberFieldHandle {
2526
+ el: HTMLElement;
2527
+ input: HTMLInputElement;
2528
+ setValue(value: number): void;
2529
+ setDisabled(disabled: boolean): void;
2530
+ }
2531
+ /**
2532
+ * A compact labelled numeric field. Commits on change/blur/Enter (never per
2533
+ * keystroke), so typing "-12" isn't committed digit-by-digit. The label text is
2534
+ * shown before the input (e.g. "X", "W").
2535
+ */
2536
+ declare function makeNumberField(doc: Document, options: NumberFieldOptions): NumberFieldHandle;
2537
+ //#endregion
2538
+ //#region src/viewer/ui/dropdown.d.ts
2539
+ /** One selectable entry in a {@link makeDropdown} menu. */
2540
+ interface DropdownItem<T> {
2541
+ label: string;
2542
+ value: T;
2543
+ /** Optional inline style applied to the item's label (e.g. `fontFamily`). */
2544
+ style?: Partial<CSSStyleDeclaration>;
2545
+ /**
2546
+ * Renders a non-selectable heading above this item, starting a group.
2547
+ *
2548
+ * Used by the Home tab's font dropdown, which PowerPoint splits into theme
2549
+ * fonts / embedded / added-this-session / all.
2550
+ */
2551
+ groupLabel?: string;
2552
+ /** Trailing hint shown after the label (e.g. the theme role "Headings"). */
2553
+ hint?: string;
2554
+ }
2555
+ interface DropdownOptions<T> {
2556
+ /** Accessible label / title for the trigger button. */
2557
+ triggerLabel: string;
2558
+ /** Visible text on the trigger button (kept in sync via `setTriggerText`). */
2559
+ triggerText: string;
2560
+ items: ReadonlyArray<DropdownItem<T>>;
2561
+ onSelect(value: T): void;
2562
+ /** Trailing chevron icon; defaults to `'chevron-down'`. */
2563
+ icon?: IconName;
2564
+ /**
2565
+ * Use a trigger the host already renders (a shared Home button): no trigger
2566
+ * is built, `el` holds only the menu and is appended inside `anchor`'s
2567
+ * wrapper, and the menu opens through `toggle()`.
2568
+ */
2569
+ external?: {
2570
+ anchor(): HTMLElement | undefined;
2571
+ onOpenChange?(open: boolean): void;
2572
+ };
2573
+ }
2574
+ interface DropdownHandle<T> {
2575
+ el: HTMLElement;
2576
+ /** Open or close the menu (the only way to open an external-trigger menu). */
2577
+ toggle(): void;
2578
+ setDisabled(disabled: boolean): void;
2579
+ setTriggerText(text: string): void;
2580
+ /** Replace the whole item list (the font dropdown regroups per deck). */
2581
+ setItems(items: ReadonlyArray<DropdownItem<T>>): void;
2582
+ /** Highlight the item matching `value` (adds `is-selected`); pass `undefined` to clear. */
2583
+ setSelected(value: T | undefined): void;
2584
+ close(): void;
2585
+ }
2586
+ /**
2587
+ * A small popover dropdown: a pill trigger button that opens a scrollable list
2588
+ * of items on click, closing on selection or an outside pointerdown. Shared by
2589
+ * every ribbon group that needs a labelled choice list (font family/size, line
2590
+ * spacing, character spacing, change case, ...).
2591
+ */
2592
+ declare function makeDropdown<T>(doc: Document, options: DropdownOptions<T>): DropdownHandle<T>;
2593
+ //#endregion
2594
+ //#region src/viewer/ui/element-context-menu-commands.d.ts
2595
+ /** The AI hooks the two AI entries need (structurally the `AiFocusController`). */
2596
+ interface ContextMenuAiHooks {
2597
+ askAboutSelection(): void;
2598
+ fixElement(element: index_d_exports$2.PptxElement | null, slideIndex: number): void;
2599
+ }
2600
+ /** The table cell the menu was opened on, plus what the shared builder asks about it. */
2601
+ interface ContextMenuTableTarget {
2602
+ cell: TableCellPosition;
2603
+ context: ContextMenuTableContext;
2604
+ }
2605
+ interface ContextMenuCommandDeps {
2606
+ doc: Document;
2607
+ store: Store<ViewerState>;
2608
+ getEditActions(): EditActions;
2609
+ /** Slide review comments (React's context-menu "Add Comment" opens the same surface). */
2610
+ openComments(): void;
2611
+ /** Hyperlink dialog for the selected element. */
2612
+ openHyperlink(): void;
2613
+ /** AI focus controller when the host configured `ai`, otherwise null. */
2614
+ getAi(): ContextMenuAiHooks | null;
2615
+ /** Enter Edit Points on a shape (omitted: the entry does nothing). */
2616
+ startEditPoints?(elementId: string): boolean;
2617
+ }
2618
+ /** The `{row, column}` a right-click landed on, when it landed inside a table cell. */
2619
+ declare function readTableCellTarget(target: EventTarget | null): TableCellPosition | null;
2620
+ /**
2621
+ * The table context for the right-clicked element, or null when this is not a
2622
+ * table cell. The cell under the cursor wins over the stored selection so the
2623
+ * commands act on what the user actually aimed at.
2624
+ */
2625
+ declare function resolveTableTarget(state: ViewerState, element: index_d_exports$2.PptxElement | null, target: EventTarget | null): ContextMenuTableTarget | null;
2626
+ /** Run `id` against the live editor actions. Table commands no-op without a cell. */
2627
+ declare function runContextMenuCommand(id: ContextMenuCommandId, deps: ContextMenuCommandDeps, table: ContextMenuTableTarget | null): void;
2628
+ //#endregion
2629
+ //#region src/viewer/ui/element-context-menu.d.ts
2630
+ interface ElementContextMenuDeps extends ContextMenuCommandDeps {
2631
+ doc: Document;
2632
+ /**
2633
+ * Live translator getter, not a value: `setLocale` swaps the viewer's
2634
+ * translator, and a captured copy would keep labelling the menu in the old
2635
+ * language for the rest of the session.
2636
+ */
2637
+ getTranslator(): Translator;
2638
+ /** The scrollable viewport that contains the stage. */
2639
+ viewport: HTMLElement;
2640
+ /** The live `.pptxv-stage` node, or null (rebuilt on every render). */
2641
+ getStageRoot(): HTMLElement | null;
2642
+ /** Make `id` the selection before a command acts on it. */
2643
+ selectElement(id: string): void;
2644
+ /** The host's resolved UI customisation, read at open time (omitted: none). */
2645
+ getCustomization?(): ResolvedCustomization$1;
2646
+ }
2647
+ interface ElementContextMenu {
2648
+ destroy(): void;
2649
+ }
2650
+ /** Attach the element context menu to the editing canvas. */
2651
+ declare function mountElementContextMenu(deps: ElementContextMenuDeps): ElementContextMenu;
2652
+ //#endregion
2653
+ //#region src/viewer/ui/presentation-context-menu.d.ts
2654
+ interface PresentationContextMenuDeps {
2655
+ doc: Document;
2656
+ store: Store<ViewerState>;
2657
+ /** The element the menu is mounted under (the `.pptxv` root). */
2658
+ root: HTMLElement;
2659
+ getTranslator(): Translator;
2660
+ /** File > Options > Advanced > "Show menu on right mouse click". */
2661
+ shouldShow(): boolean;
2662
+ next(): void;
2663
+ prev(): void;
2664
+ exitPresentation(): void;
2665
+ showAllSlides(): void;
2666
+ togglePresenterView(): void;
2667
+ setPointerTool(tool: 'none' | 'pen' | 'highlighter' | 'laser'): void;
2668
+ eraseAnnotations(): void;
2669
+ toggleBlank(value: 'black' | 'white'): void;
2670
+ }
2671
+ interface PresentationContextMenu {
2672
+ destroy(): void;
2673
+ }
2674
+ /** Attach the slide-show right-click menu to the presentation root. */
2675
+ declare function mountPresentationContextMenu(deps: PresentationContextMenuDeps): PresentationContextMenu;
2676
+ //#endregion
2677
+ //#region src/viewer/ui/keyboard.d.ts
2678
+ interface KeyboardHandlers {
2679
+ next(): void;
2680
+ prev(): void;
2681
+ first(): void;
2682
+ last(): void;
2683
+ /** Invoked on Escape (used to exit presentation mode). */
2684
+ escape(): void;
2685
+ /** True while a slide show is running; gates the show-only shortcuts. */
2686
+ isPresenting?(): boolean;
2687
+ /** Jump to a zero-based slide index (typed slide number during a show). */
2688
+ goToSlide?(index: number): void;
2689
+ /** Number of slides, so a typed slide number can be range-checked. */
2690
+ getSlideCount?(): number;
2691
+ /** Select a pointer tool (Ctrl+L / Ctrl+P / Ctrl+A / Ctrl+E). */
2692
+ setPointerTool?(tool: PresentationPointerTool): void;
2693
+ /** Erase the show's ink annotations (E). */
2694
+ eraseAnnotations?(): void;
2695
+ /** Show or hide ink markup (Ctrl+M). */
2696
+ toggleInkMarkup?(): void;
2697
+ /** Blank the screen black or white (B / W, or `.` / `,`). */
2698
+ toggleBlank?(value: 'black' | 'white'): void;
2699
+ /** Show or hide live captions (PowerPoint's bare `J`). */
2700
+ toggleSubtitles?(): void;
2701
+ /** Show or hide the running show's own chrome (Ctrl+H). */
2702
+ toggleChrome?(): void;
2703
+ /** Raise PowerPoint's "See All Slides" navigator (Ctrl+S). */
2704
+ showAllSlides?(): void;
2705
+ /** Bare F5: the exact entry point the ribbon's "From Beginning" button calls. */
2706
+ startFromBeginning?(): void;
2707
+ /** Shift+F5: the exact entry point the ribbon's "From Current Slide" button calls. */
2708
+ startFromCurrent?(): void;
2709
+ /** False when the host switched the slide show off: F5 / Shift+F5 then fall through. */
2710
+ isSlideShowStartEnabled?(): boolean;
2711
+ }
2712
+ /**
2713
+ * Attach slideshow keyboard navigation to the viewer root.
2714
+ *
2715
+ * While a show is running the full PowerPoint shortcut set applies, resolved by
2716
+ * the shared slide-show map. Outside a show only the arrows, Page keys, Home,
2717
+ * End and Escape navigate: PowerPoint's bare-letter commands (N, P, B, W, E)
2718
+ * belong to the show, and binding them in the editor would hijack typing.
2719
+ *
2720
+ * Returns a detach function. Keys originating from form fields are ignored.
2721
+ */
2722
+ declare function attachKeyboardNavigation(root: HTMLElement, handlers: KeyboardHandlers): () => void;
2723
+ //#endregion
2724
+ //#region src/viewer/ui/touch-gestures.d.ts
2725
+ interface TouchGestureHandlers {
2726
+ /** Read the current effective scale, including fit-to-viewport resolution. */
2727
+ getScale(): number;
2728
+ /** Persist a concrete scale after a two-finger pinch. */
2729
+ onPinchZoom(scale: number): void;
2730
+ /** Whether a one-finger swipe may change slides at this moment. */
2731
+ isSwipeEnabled(): boolean;
2732
+ onNext(): void;
2733
+ onPrevious(): void;
2734
+ }
2735
+ /**
2736
+ * Attach React-parity touch gestures to the stable viewport node. Pinching is
2737
+ * available in every mode; slide swipes deliberately stay disabled while
2738
+ * editing so they cannot steal element move/resize gestures.
2739
+ */
2740
+ declare function attachTouchGestures(target: HTMLElement, handlers: TouchGestureHandlers): () => void;
2284
2741
  //#endregion
2285
2742
  //#region src/viewer/ui/presentation.d.ts
2286
2743
  interface PresentationController {
@@ -2293,6 +2750,200 @@ interface PresentationController {
2293
2750
  /** Remove listeners. */
2294
2751
  dispose(): void;
2295
2752
  }
2753
+ /**
2754
+ * Presentation mode over the real Fullscreen API. `onChange` fires for every
2755
+ * transition, including user-initiated exits (Esc, browser chrome), driven by
2756
+ * the `fullscreenchange` event rather than the promise result.
2757
+ *
2758
+ * In environments without the Fullscreen API (older browsers, tests) it
2759
+ * degrades to a plain state toggle so the viewer still hides its chrome.
2760
+ */
2761
+ declare function createPresentationController(target: HTMLElement, onChange: (presenting: boolean) => void): PresentationController;
2762
+ //#endregion
2763
+ //#region src/viewer/ui/ribbon/find-replace-panel.d.ts
2764
+ interface FindReplacePanel {
2765
+ el: HTMLElement;
2766
+ toggle(): void;
2767
+ setOpen(open: boolean): void;
2768
+ isOpen(): boolean;
2769
+ setEditable(editable: boolean): void;
2770
+ }
2771
+ /**
2772
+ * A simple docked Find & Replace panel (query + replacement + match-case
2773
+ * toggle + Find/Replace/Replace All), backed by the shared `find-replace.ts`
2774
+ * helpers via {@link FindReplaceActions}. No in-canvas match highlighting or
2775
+ * next/previous cursor (see that module's docs); status text reports the
2776
+ * match count / replacement count instead.
2777
+ */
2778
+ declare function createFindReplacePanel(doc: Document, t: Translator, actions: FindReplaceActions): FindReplacePanel;
2779
+ //#endregion
2780
+ //#region src/viewer/ui/ribbon/ribbon-tab-bar.d.ts
2781
+ interface RibbonTabBar {
2782
+ el: HTMLElement;
2783
+ setActive(tab: RibbonTabId | RibbonContextualTabId): void;
2784
+ /**
2785
+ * Show the selection's contextual tabs (Shape Format, Picture Format, ...)
2786
+ * after the fixed tabs, PowerPoint-style.
2787
+ */
2788
+ setContextualTabs(tabs: readonly RibbonContextualTabId[]): void;
2789
+ /** Hide/show tab buttons per Options > Customize Ribbon (File always shown). */
2790
+ setHiddenTabs(hidden: ReadonlySet<string>): void;
2791
+ /** Set each tab's `title` from a ScreenTip resolver (Options > General). */
2792
+ applyScreenTips(resolve: (label: string) => string | undefined): void;
2793
+ }
2794
+ /** Right-side quick actions on the tab row (React's `TabRowActions`). */
2795
+ interface RibbonTabBarActions {
2796
+ /** The red-dot Record button (starts rehearsal/recording). */
2797
+ startRecording(): void;
2798
+ }
2799
+ /**
2800
+ * The ribbon's tab strip (File/Home/Insert/.../View), à la React's ribbon tab
2801
+ * row. Tabs in `hiddenActions` are never constructed, matching how the ribbon
2802
+ * itself skips building content for a hidden tab. The right side carries the
2803
+ * Record button plus a `.pptxv-tabrow-actions` host the collaboration UI
2804
+ * mounts its Share trigger into (see `collab/collab-ui.ts`).
2805
+ */
2806
+ declare function createRibbonTabBar(doc: Document, t: Translator, onSelect: (tab: RibbonTabId | RibbonContextualTabId) => void, hiddenActions?: readonly ToolbarActionId$1[], actions?: RibbonTabBarActions): RibbonTabBar;
2807
+ //#endregion
2808
+ //#region src/viewer/ui/ribbon/ribbon-tabs.d.ts
2809
+ /**
2810
+ * The ribbon tab registry: id + i18n label key, in display order.
2811
+ *
2812
+ * Mirrors React's `TOOLBAR_SECTIONS` (see `packages/react/src/viewer/constants/toolbar.ts`)
2813
+ * tab order/labels, but this wave only implements content for `file` / `home`
2814
+ * / `insert` / `draw` / `design` / `transitions` / `animations` / `view`. The
2815
+ * remaining entries are commented out rather than omitted so a later wave
2816
+ * adds one registry line + one tab-content module per tab, matching this
2817
+ * file's shape.
2818
+ *
2819
+ * Ids here are the ribbon-tab subset of the shared `ToolbarTabId` (see
2820
+ * `pptx-viewer-shared`'s `toolbar-actions.ts`); `createRibbon` filters this
2821
+ * list through `filterVisibleTabs` so a host's `hiddenActions` option skips
2822
+ * building a hidden tab's content entirely, rather than hiding it after the
2823
+ * fact.
2824
+ */
2825
+ interface RibbonTabDef {
2826
+ id: RibbonTabId;
2827
+ labelKey: string;
2828
+ }
2829
+ declare const RIBBON_TABS: readonly RibbonTabDef[];
2830
+ /** The default active tab on mount. */
2831
+ declare const DEFAULT_RIBBON_TAB: RibbonTabId;
2832
+ /** True when `id` is a known ribbon tab (guards persisted/host-supplied tab ids). */
2833
+ declare function isRibbonTab(id: string): id is RibbonTabId;
2834
+ //#endregion
2835
+ //#region src/viewer/ui/swatch-picker.d.ts
2836
+ /**
2837
+ * Office "Standard Colors" swatch set, shared by both the font-colour and
2838
+ * highlight-colour pickers (`pptx-viewer-shared`'s canonical catalogue, so
2839
+ * this binding cannot drift from the others' standard-colour row).
2840
+ */
2841
+ declare const OFFICE_STANDARD_SWATCHES: readonly string[];
2842
+ interface SwatchPickerOptions {
2843
+ /** Accessible label / title for the trigger button. */
2844
+ label: string;
2845
+ /** Icon shown in the trigger (a small colour bar under it reflects the value). */
2846
+ icon: IconName;
2847
+ swatches: readonly string[];
2848
+ /** Fallback colour when no value is set yet. */
2849
+ fallback: string;
2850
+ onSelect(hex: string): void;
2851
+ /**
2852
+ * Fired ONLY by a theme-swatch click, carrying both the hex and the ref.
2853
+ * Provide alongside `themeColorMap` to show the deck's real "Theme Colors"
2854
+ * grid above the standard swatches (font colour only: highlight colour has
2855
+ * no theme-ref concept on the model).
2856
+ */
2857
+ onSelectTheme?(commit: ThemeColorPickerCommit): void;
2858
+ /** As `DropdownOptions.external`: the trigger is a shared Home button. */
2859
+ external?: {
2860
+ anchor(): HTMLElement | undefined;
2861
+ onOpenChange?(open: boolean): void;
2862
+ };
2863
+ }
2864
+ interface SwatchPickerHandle {
2865
+ el: HTMLElement;
2866
+ /** Open or close the menu (the only way to open an external-trigger picker). */
2867
+ toggle(): void;
2868
+ setValue(hex: string | undefined): void;
2869
+ setDisabled(disabled: boolean): void;
2870
+ /** B6: refresh the "Recent colours" row (most-recent-first); hidden when empty. */
2871
+ setRecentColors(colors: readonly string[]): void;
2872
+ /** Set the deck's theme colour map; the theme-swatch grid hides itself when `undefined`. */
2873
+ setThemeColorMap(themeColorMap: Record<string, string> | undefined): void;
2874
+ /** Highlight the swatch matching the element's current theme ref, if any. */
2875
+ setSelectedRef(ref: index_d_exports$2.PptxThemeColorRef | undefined): void;
2876
+ }
2877
+ /**
2878
+ * A reusable swatch-grid colour picker: a small pill trigger (icon + a
2879
+ * colour-bar swab of the current value) that opens a grid of preset swatches
2880
+ * plus a "Custom colour..." row backed by a native `<input type="color">`.
2881
+ * Used by the ribbon's font-colour and highlight-colour controls (upgrading
2882
+ * them from the bare native colour input the format toolbar used).
2883
+ */
2884
+ declare function makeSwatchPicker(doc: Document, t: Translator, options: SwatchPickerOptions): SwatchPickerHandle;
2885
+ //#endregion
2886
+ //#region src/viewer/ui/ruler-strips.d.ts
2887
+ /**
2888
+ * The View > Rulers strips: a horizontal ruler along the top of the slide, a
2889
+ * vertical one down the left, and the corner square where they meet.
2890
+ *
2891
+ * Drawn as SIBLINGS of the scaled stage (inside `.pptxv-stage-wrap`, in the
2892
+ * gutter the `pptxv-showRulers` rule opens up around it) rather than inside it,
2893
+ * because the stage carries a CSS `transform: scale()`: a ruler inside it would
2894
+ * have its tick strokes and labels scaled by the zoom instead of tracking it.
2895
+ * The strips therefore receive the scale and lay their ticks out in
2896
+ * already-scaled screen px.
2897
+ *
2898
+ * Tick geometry comes from the shared `generateTicks` and a drag off a strip is
2899
+ * resolved by the shared `rulerDragToGuidePosition`, so this binding agrees
2900
+ * with React, Vue, Angular and Svelte on unit, subdivision density, label
2901
+ * thinning and the guide-drop rules. Vanilla previously faked the whole feature
2902
+ * with a flat 18px border on the stage wrap: no ticks, no labels, no guides.
2903
+ */
2904
+ /** Selected element extent (unscaled slide px) shaded on both strips. */
2905
+ interface RulerSelection {
2906
+ x: number;
2907
+ y: number;
2908
+ width: number;
2909
+ height: number;
2910
+ }
2911
+ interface RulerStripsState {
2912
+ /** View > Rulers, minus presentation mode (rulers are an editing aid). */
2913
+ visible: boolean;
2914
+ canvasSize: CanvasSize;
2915
+ /** Effective stage scale (fit * zoom). */
2916
+ scale: number;
2917
+ unit: RulerUnit;
2918
+ selection: RulerSelection | null;
2919
+ /** Offer the drag-out-a-guide gesture (editable canvases only). */
2920
+ draggable: boolean;
2921
+ }
2922
+ interface RulerStrips {
2923
+ /**
2924
+ * Attach the strips to the stage wrap. Re-callable: the wrap's children are
2925
+ * replaced on every stage render, so the strips must be re-appended after it.
2926
+ */
2927
+ mount(stageWrap: HTMLElement): void;
2928
+ /** Repaint from the current state (hides the strips when not visible). */
2929
+ update(state: RulerStripsState): void;
2930
+ destroy(): void;
2931
+ }
2932
+ declare function createRulerStrips(doc: Document, onCreateGuide: (axis: 'h' | 'v', position: number) => void): RulerStrips;
2933
+ //#endregion
2934
+ //#region src/viewer/ui/protected-view-banner.d.ts
2935
+ /**
2936
+ * PowerPoint's Protected View bar: a persistent strip below the Ribbon while
2937
+ * Trust Center > "Open documents in Protected View" is holding a freshly
2938
+ * opened deck read-only, with the one real "Enable Editing" affordance that
2939
+ * lifts it for the rest of the session. See `shouldOpenInProtectedView` and
2940
+ * `ViewerState.protectedView`.
2941
+ */
2942
+ interface ProtectedViewBanner {
2943
+ el: HTMLElement;
2944
+ setActive(active: boolean): void;
2945
+ }
2946
+ declare function createProtectedViewBanner(doc: Document, t: Translator, onEnableEditing: () => void): ProtectedViewBanner;
2296
2947
  //#endregion
2297
2948
  //#region src/viewer/animation/presentation-playback.d.ts
2298
2949
  /** Everything the controller needs after a stage (re)render. */
@@ -2303,7 +2954,7 @@ interface SyncStageParams {
2303
2954
  /** The freshly rendered, fully-visible main stage node. */
2304
2955
  stage: HTMLElement;
2305
2956
  /** The slide the stage renders, or `undefined` when empty. */
2306
- slide: PptxSlide | undefined;
2957
+ slide: index_d_exports$2.PptxSlide | undefined;
2307
2958
  /** Zero-based index of the rendered slide. */
2308
2959
  slideIndex: number;
2309
2960
  /** True only when the live (fullscreen) presentation stage is active. */
@@ -2379,7 +3030,7 @@ interface PresentationPlayback {
2379
3030
  * override for the upcoming `syncStage` call, then returns the slide
2380
3031
  * index the caller should navigate to.
2381
3032
  */
2382
- navigateToZoomTarget(target: ZoomNavigationTarget, returnSlideIndex: number, slides: readonly PptxSlide[]): number;
3033
+ navigateToZoomTarget(target: ZoomNavigationTarget, returnSlideIndex: number, slides: readonly index_d_exports$2.PptxSlide[]): number;
2383
3034
  /**
2384
3035
  * Consulted by a forward advance BEFORE it computes the natural next
2385
3036
  * slide: once the show reaches the end of a pending zoom excursion's
@@ -2400,6 +3051,101 @@ interface PresentationPlayback {
2400
3051
  }
2401
3052
  //#endregion
2402
3053
  //#region src/viewer/render-controller.d.ts
3054
+ interface RenderControllerDeps {
3055
+ doc: Document;
3056
+ store: Store<ViewerState>;
3057
+ registry: index_d_exports$1.ElementRendererRegistry;
3058
+ /**
3059
+ * Getters, not plain booleans, so chrome/translator swaps (setLocale) and
3060
+ * the six 3D flags below are picked up live.
3061
+ */
3062
+ getChrome(): ViewerChrome;
3063
+ getTranslator(): Translator;
3064
+ getFitOptions?(): ViewportFitOptions$1;
3065
+ /**
3066
+ * Opt-in WebGL SmartArt renderer flag; see `PptxViewerOptions.smartArt3D`.
3067
+ * Already ANDed with Options > Advanced > "Disable 3D rendering" by the
3068
+ * caller (see `resolve3DRenderingFlags`), so this getter alone decides
3069
+ * whether the WebGL scene renders.
3070
+ */
3071
+ getSmartArt3D(): boolean;
3072
+ /**
3073
+ * Opt-in interactive WebGL surface-chart renderer flag; see
3074
+ * `PptxViewerOptions.surfaceChart3D`. Same "already ANDed" note as
3075
+ * `getSmartArt3D`.
3076
+ */
3077
+ getSurfaceChart3D(): boolean;
3078
+ /**
3079
+ * Opt-in interactive WebGL bar3D-chart renderer flag; see
3080
+ * `PptxViewerOptions.barChart3D`. Same "already ANDed" note as
3081
+ * `getSmartArt3D`.
3082
+ */
3083
+ getBarChart3D(): boolean;
3084
+ /**
3085
+ * Opt-in interactive WebGL line3D-chart renderer flag; see
3086
+ * `PptxViewerOptions.lineChart3D`. Same "already ANDed" note as
3087
+ * `getSmartArt3D`.
3088
+ */
3089
+ getLineChart3D(): boolean;
3090
+ /**
3091
+ * Opt-in interactive WebGL area3D-chart renderer flag; see
3092
+ * `PptxViewerOptions.areaChart3D`. Same "already ANDed" note as
3093
+ * `getSmartArt3D`.
3094
+ */
3095
+ getAreaChart3D(): boolean;
3096
+ /**
3097
+ * Opt-in interactive WebGL pie3D-chart renderer flag; see
3098
+ * `PptxViewerOptions.pieChart3D`. Same "already ANDed" note as
3099
+ * `getSmartArt3D`.
3100
+ */
3101
+ getPieChart3D(): boolean;
3102
+ /**
3103
+ * `viewerOptions.advanced.pixelateMosaicAnimation`. `true` plays the
3104
+ * blocky mosaic reveal for `p:animEffect/@filter="pixelate"`; `false`
3105
+ * (the default, matching PowerPoint's own behaviour) snaps the element
3106
+ * to its end state. See `resolveFilterEffect`'s doc in
3107
+ * `pptx-viewer-shared`'s `animation-filter-effects.ts`.
3108
+ */
3109
+ getPixelateMosaicAnimation(): boolean;
3110
+ /** History-integrated handout master layout mutation. */
3111
+ onHandoutSlidesPerPageChange(count: number): void;
3112
+ onMasterBackgroundColorChange(color: string): void;
3113
+ /** Run a Slide Master view sidebar CRUD command (B4). */
3114
+ onMasterCrudAction(id: MasterViewCrudActionId): void;
3115
+ onSectionToggle(sectionId: string): void;
3116
+ onSectionRename(sectionId: string, name: string): void;
3117
+ onSectionDelete(sectionId: string): void;
3118
+ onSectionMove(sectionId: string, direction: 'up' | 'down'): void;
3119
+ onSectionAddAfter(slideIndex: number): void;
3120
+ /** Navigate from a presentation Zoom tile. */
3121
+ onZoomClick(target: ZoomNavigationTarget, returnSlideIndex: number): void;
3122
+ /** A canvas comment marker dot was clicked; bring the comments UI on screen. */
3123
+ onCommentMarkerClick?(commentId: string): void;
3124
+ onSmartArtNodeTextChange?(element: index_d_exports$2.PptxElement, nodeId: string, text: string): void;
3125
+ onSmartArtNodeFillChange?(element: index_d_exports$2.PptxElement, nodeId: string, fill: string): void;
3126
+ /**
3127
+ * Commit a chart data point dragged on the canvas. Gated on `interactive`
3128
+ * below with the SmartArt hooks, so thumbnails, the presenter console and
3129
+ * export rasters never arm the chart marks.
3130
+ */
3131
+ onChartPointChange?(element: index_d_exports$2.PptxElement, chartData: index_d_exports$2.PptxChartData): void;
3132
+ /**
3133
+ * A table column/row boundary was dragged on the canvas. Gated on
3134
+ * `interactive` with the other on-canvas edit hooks.
3135
+ */
3136
+ onTableResizeColumns?(element: index_d_exports$2.PptxElement, widths: number[]): void;
3137
+ onTableResizeRow?(element: index_d_exports$2.PptxElement, rowIndex: number, height: number): void;
3138
+ /**
3139
+ * A chart part was pressed on the canvas. Gated on `interactive` with the
3140
+ * other chart/SmartArt hooks. See `ElementRenderContext.onChartPartSelect`.
3141
+ */
3142
+ onChartPartSelect?(element: index_d_exports$2.PptxElement, part: ChartPartRef): void;
3143
+ /**
3144
+ * Invoked after every stage render (the stage host is rebuilt with
3145
+ * `replaceChildren`); the editor re-mounts its overlay layer here.
3146
+ */
3147
+ onStageRendered?(): void;
3148
+ }
2403
3149
  interface RenderController {
2404
3150
  /** Re-render everything (used after a chrome rebuild). */
2405
3151
  renderAll(): void;
@@ -2412,7 +3158,7 @@ interface RenderController {
2412
3158
  * surfaces outside the main canvas such as Reading View. Same path the
2413
3159
  * thumbnail rail draws through, so no surface grows its own element renderer.
2414
3160
  */
2415
- renderSlideNode(slide: PptxSlide, scale: number): HTMLElement;
3161
+ renderSlideNode(slide: index_d_exports$2.PptxSlide, scale: number): HTMLElement;
2416
3162
  /** Resolve the requested zoom into a concrete scale factor. */
2417
3163
  effectiveScale(): number;
2418
3164
  /**
@@ -2431,265 +3177,12 @@ interface RenderController {
2431
3177
  */
2432
3178
  readonly presentationPlayback: PresentationPlayback;
2433
3179
  }
2434
- //#endregion
2435
- //#region ../shared/dist/ai/index.d.ts
2436
- //#endregion
2437
- //#region src/ai/change-animator.d.ts
2438
- /** Host-tunable options for how AI edits are animated on the canvas. */
2439
- interface AiChangeAnimationConfig {
2440
- /** Master switch. Default true. */
2441
- enabled?: boolean;
2442
- /** How long the motion + glow plays, in ms. Default 900. */
2443
- durationMs?: number;
2444
- /** Draw the pulsing glow highlight on changed elements. Default true. */
2445
- glow?: boolean;
2446
- /** Glide old->new bounds and cross-fade colours. Default true. */
2447
- tween?: boolean;
2448
- /** Accent colour (any CSS colour) for the glow/ghosts. Default a blue. */
2449
- color?: string;
2450
- }
2451
- //#endregion
2452
- //#region src/ai/config.d.ts
2453
- /** The UI message shape exchanged with the assistant. Alias of the SDK type. */
2454
- type PptxAiUIMessage = UIMessage;
2455
- /**
2456
- * Canonical name of every tool the assistant can call. Document tools mirror the
2457
- * `pptx-viewer-mcp` server exactly (they ARE the same functions, run against the
2458
- * live deck); the viewer-only tools (navigation, deck outline, element/notes
2459
- * readers, table merge) have no MCP counterpart.
2460
- */
2461
- type PptxAiToolName = 'get_deck_overview' | 'get_slide' | 'get_element' | 'get_speaker_notes' | 'find_text' | 'get_theme' | 'go_to_slide' | 'select_elements' | 'merge_tables' | 'get_metadata' | 'get_layouts' | 'find_placeholders' | 'get_presentation_properties' | 'run_accessibility_check' | 'convert_to_markdown' | 'export_to_json' | 'add_element' | 'update_element' | 'delete_elements' | 'arrange_elements' | 'clone_element' | 'set_element_animation' | 'group_elements' | 'ungroup_elements' | 'batch_update_elements' | 'update_element_style' | 'replace_geometry' | 'set_element_lock' | 'manage_hyperlinks' | 'replace_text' | 'manage_comments' | 'update_table_cells' | 'manage_table_structure' | 'create_chart' | 'update_chart' | 'add_chart_series' | 'remove_chart_series' | 'update_chart_series_data' | 'manage_smart_art' | 'apply_template' | 'add_slide' | 'duplicate_slide' | 'delete_slides' | 'reorder_slides' | 'update_slide_properties' | 'set_slide_transition' | 'apply_theme_preset' | 'update_theme_colors' | 'update_theme_fonts' | 'set_canvas_size' | 'update_metadata' | 'manage_sections' | 'update_presentation_properties' | 'import_from_json' | 'apply_layout';
2462
- type Resolvable<T> = T | (() => T | Promise<T>);
2463
- /** How the assistant reaches a language model. */
2464
- type PptxAiConnection =
2465
- /**
2466
- * Post messages to a host backend route (recommended for production so the
2467
- * provider API key stays server-side). Maps to `DefaultChatTransport`.
2468
- */
2469
- {
2470
- kind: 'endpoint';
2471
- api: string;
2472
- headers?: Resolvable<Record<string, string>>;
2473
- body?: Resolvable<Record<string, unknown>>;
2474
- credentials?: RequestCredentials;
2475
- fetch?: typeof globalThis.fetch;
2476
- } |
2477
- /**
2478
- * Run a language model in-process in the browser (bring-your-own key /
2479
- * local model). Maps to a `ToolLoopAgent` behind a `DirectChatTransport`.
2480
- */
2481
- {
2482
- kind: 'model';
2483
- model: LanguageModel;
2484
- system?: string;
2485
- maxSteps?: number;
2486
- } |
2487
- /** Provide a fully-constructed transport (advanced / testing escape hatch). */
2488
- {
2489
- kind: 'transport';
2490
- transport: ChatTransport<PptxAiUIMessage>;
2491
- };
2492
- /** How writes proposed by the assistant reach the document. */
2493
- type PptxAiWritePolicy = 'stage' | 'approve' | 'auto';
2494
- /** Which deck context is fed to the model with each turn. */
2495
- type PptxAiContextStrategy = 'outline' | 'current-slide' | 'none';
2496
- /** Optional per-session history persistence hooks. */
2497
- interface PptxAiHistoryHooks {
2498
- load?(id: string): Promise<PptxAiUIMessage[]>;
2499
- save?(id: string, messages: PptxAiUIMessage[]): Promise<void>;
2500
- }
2501
- /** Complete host configuration for an AI chat session. */
2502
- interface PptxAiConfig {
2503
- connection: PptxAiConnection;
2504
- /** Extra host instructions appended to the base system prompt. */
2505
- systemPromptExtras?: string;
2506
- tools?: {
2507
- /** Allowlist. When set, only these tools are exposed. */
2508
- enabled?: PptxAiToolName[];
2509
- /** Denylist, applied after `enabled`. */
2510
- disabled?: PptxAiToolName[];
2511
- /** Additional host-defined tools merged into the tool set. */
2512
- extra?: ToolSet;
2513
- };
2514
- /** Default `'stage'`. */
2515
- writePolicy?: PptxAiWritePolicy;
2516
- /** Default `'outline'`. */
2517
- contextStrategy?: PptxAiContextStrategy;
2518
- history?: PptxAiHistoryHooks;
2519
- /**
2520
- * How AI edits are animated on the canvas so the user can watch them land
2521
- * (glide old->new, fade/scale in-out, glow-pulse). Omit for the defaults;
2522
- * set `{ enabled: false }` to turn it off.
2523
- */
2524
- changeAnimation?: AiChangeAnimationConfig;
2525
- onError?(error: Error): void;
2526
- }
2527
- //#endregion
2528
- //#region src/ai/bridge.d.ts
2529
- /** Lightweight, model-friendly summary of the whole deck. */
2530
- interface PptxAiDeckMeta {
2531
- /** Total number of slides. */
2532
- slideCount: number;
2533
- /** Zero-based index of the currently active slide. */
2534
- activeSlideIndex: number;
2535
- /** Deck title, when known (first slide title / core properties). */
2536
- title?: string;
2537
- /** Slide canvas width in CSS pixels. */
2538
- width: number;
2539
- /** Slide canvas height in CSS pixels. */
2540
- height: number;
2541
- }
2542
- /** Severity hint for {@link PptxAiBridge.notify}. */
2543
- type PptxAiNotifyLevel = 'info' | 'success' | 'warning' | 'error';
2544
3180
  /**
2545
- * A target the user has scoped the assistant to: either a whole slide or a
2546
- * single element on a slide. Returned by {@link PptxAiBridge.getFocusedTargets}
2547
- * so the context builder can tell the model exactly what to focus on.
3181
+ * The DOM render orchestration for {@link PptxViewer}: turns store state into
3182
+ * stage / thumbnail / toolbar updates. Split from the class to keep both
3183
+ * halves small; it owns no state of its own.
2548
3184
  */
2549
- type PptxAiFocusedTarget = {
2550
- kind: 'slide';
2551
- slideIndex: number;
2552
- } | {
2553
- kind: 'element';
2554
- slideIndex: number;
2555
- elementId: string;
2556
- };
2557
- /**
2558
- * A pure updater over the deck's slides. It receives a deep clone of the
2559
- * current slides (mutation-safe) and returns the next slides array. The bridge
2560
- * commits the returned array as ONE history entry.
2561
- */
2562
- type PptxAiSlidesUpdater = (slides: PptxSlide[]) => PptxSlide[];
2563
- /**
2564
- * A pure updater over the whole parsed deck ({@link PptxData}). Mirrors the
2565
- * `pptx-viewer-mcp` tool model (data in, mutated data out) so presentation-level
2566
- * MCP tools (metadata, sections, canvas size, presentation properties, layouts)
2567
- * can be committed as ONE undoable history entry through {@link
2568
- * PptxAiBridge.applyDeckData}. Optional: bindings that only track slide/theme
2569
- * state can omit it, in which case those presentation-level tools report that
2570
- * they are unavailable in this viewer while every slide/theme tool still works.
2571
- */
2572
- type PptxAiDataUpdater = (data: PptxData) => PptxData;
2573
- /** Field-level updates for a single element, mirroring the MCP update vocab. */
2574
- interface PptxAiElementUpdate {
2575
- x?: number;
2576
- y?: number;
2577
- width?: number;
2578
- height?: number;
2579
- rotation?: number;
2580
- opacity?: number;
2581
- hidden?: boolean;
2582
- flipHorizontal?: boolean;
2583
- flipVertical?: boolean;
2584
- text?: string;
2585
- fontSize?: number;
2586
- fontFamily?: string;
2587
- fontColor?: string;
2588
- bold?: boolean;
2589
- italic?: boolean;
2590
- underline?: boolean;
2591
- align?: 'left' | 'center' | 'right' | 'justify';
2592
- fillColor?: string;
2593
- strokeColor?: string;
2594
- strokeWidth?: number;
2595
- }
2596
- /**
2597
- * Implemented by each binding to expose its live editor to the AI core.
2598
- *
2599
- * Read methods must be cheap and synchronous. Write methods must route through
2600
- * the binding's editor-history layer so AI edits are undoable like manual ones.
2601
- */
2602
- interface PptxAiBridge {
2603
- /** Return a summary of the whole deck. */
2604
- getDeckMeta(): PptxAiDeckMeta;
2605
- /** Return the deck's slides. Callers must not mutate the returned array. */
2606
- getSlides(): PptxSlide[];
2607
- /** Return the zero-based index of the active slide. */
2608
- getActiveSlideIndex(): number;
2609
- /** Return the resolved presentation theme, when available. */
2610
- getTheme(): PptxTheme | undefined;
2611
- /** Return the underlying core handler, when the binding exposes one. */
2612
- getHandler(): PptxHandler | undefined;
2613
- /** Navigate the viewer to a slide by zero-based index. */
2614
- goToSlide(index: number): void;
2615
- /** Select the given elements on a slide (empty array clears selection). */
2616
- selectElements(slideIndex: number, elementIds: string[]): void;
2617
- /**
2618
- * Apply a slides updater as a single, atomic, undoable history entry. The
2619
- * binding is responsible for cloning current slides before calling
2620
- * `updater` and for installing the result.
2621
- */
2622
- applySlidesUpdate(updater: PptxAiSlidesUpdater, label: string): void;
2623
- /** Apply field updates to one element as a single history entry. */
2624
- updateElement(slideIndex: number, elementId: string, updates: PptxAiElementUpdate): void;
2625
- /** Apply partial theme updates as a single history entry. */
2626
- applyTheme(updates: Partial<PptxTheme>): void;
2627
- /**
2628
- * Return the full parsed {@link PptxData} for the open deck, with the live
2629
- * (edited) slides and theme overlaid. Enables `pptx-viewer-mcp` tools that
2630
- * read presentation-level state (metadata, sections, layouts, presentation
2631
- * properties). Optional: when absent, the AI core synthesises a minimal
2632
- * PptxData from slides + dimensions, which is enough for every slide/theme
2633
- * tool but not for presentation-level reads.
2634
- */
2635
- getDeckData?(): PptxData | undefined;
2636
- /**
2637
- * Commit a whole-deck {@link PptxData} mutation as one undoable history entry.
2638
- * Used to apply presentation-level MCP tool results (metadata, sections,
2639
- * canvas size, presentation properties, layouts). Optional: when absent,
2640
- * those tools report they are not supported in this viewer; slide/theme tools
2641
- * are unaffected (they route through {@link PptxAiBridge.applySlidesUpdate}
2642
- * and {@link PptxAiBridge.applyTheme}).
2643
- */
2644
- applyDeckData?(updater: PptxAiDataUpdater, label: string): void;
2645
- /**
2646
- * Return the slides / elements the user has scoped the assistant to, if any.
2647
- * When present and non-empty, the context builder tells the model to focus on
2648
- * exactly these targets. Optional so existing bridges satisfy the contract
2649
- * without change; a bridge that does not implement it behaves as before (no
2650
- * focus scoping).
2651
- */
2652
- getFocusedTargets?(): PptxAiFocusedTarget[];
2653
- /** Surface a transient message in the host UI (toast / status line). */
2654
- notify?(message: string, level?: PptxAiNotifyLevel): void;
2655
- }
2656
- //#endregion
2657
- //#region ../shared/dist/i18n/index.d.ts
2658
- //#region src/i18n/translations-en.d.ts
2659
- /**
2660
- * The canonical English UI-string dictionary for pptx-viewer. None of the
2661
- * React/Vue/Angular binding packages ship translations themselves - each
2662
- * only calls its framework's translation function (react-i18next's `t()`,
2663
- * vue-i18n's `t()`, ngx-translate's `TranslateService`/`translate` pipe)
2664
- * against dotted `pptx.*` keys. The host app supplies the dictionary; this
2665
- * module is that dictionary for the demos, shared so all three stay in sync
2666
- * instead of drifting into three separate copies.
2667
- */
2668
- export declare const translationsEn: Record<string, string>;
2669
- /**
2670
- * Every key in the English dictionary. A new locale dictionary typed as
2671
- * `Record<TranslationKey, string>` gets a compile error for any key it's
2672
- * missing or misspells, so translation contributions stay complete without a
2673
- * separate parity test.
2674
- */
2675
- type TranslationKey = keyof typeof translationsEn;
2676
- /**
2677
- * Convert a dotted translation key to a human-readable label when no
2678
- * explicit dictionary entry exists yet. Takes the last segment and converts
2679
- * camelCase to Title Case, e.g. "pptx.slideSorter.zoomIn" -> "Zoom In".
2680
- */
2681
- export declare function keyToLabel(key: string): string;
2682
- //#endregion
2683
- //#region src/i18n/locale-catalog.d.ts
2684
- /** One selectable entry in the viewer chrome's built-in language picker (File > Options > Language). */
2685
- interface LocaleCatalogEntry {
2686
- /** BCP-47-ish locale code, e.g. `'en'`, `'fr'`. Matches `pptx-viewer-locales`' exports. */
2687
- code: string;
2688
- /** English display name, used before a translation dictionary for the target locale is loaded. */
2689
- label: string;
2690
- /** The locale's own name for itself, e.g. `'Français'` for `fr`. */
2691
- nativeLabel: string;
2692
- }
3185
+ declare function createRenderController(deps: RenderControllerDeps): RenderController;
2693
3186
  //#endregion
2694
3187
  //#region src/viewer/autosave/autosave-controller.d.ts
2695
3188
  /**
@@ -2726,10 +3219,119 @@ interface LocaleCatalogEntry {
2726
3219
  * the viewer's own prompt ({@link AutosaveControllerDeps.onRecoveryOffer}).
2727
3220
  */
2728
3221
  type AutosaveStatus = 'idle' | 'saving' | 'saved' | 'error';
3222
+ interface AutosaveControllerDeps {
3223
+ store: Store<ViewerState>;
3224
+ /** Live core handler used to serialize the current slides to `.pptx` bytes. */
3225
+ getHandler: () => index_d_exports$2.PptxHandler | null;
3226
+ /** IndexedDB key for the recovery snapshot (usually the open file's name). */
3227
+ filePath: string;
3228
+ /** Public document name rendered in the recovery message. */
3229
+ fileName?: string;
3230
+ /**
3231
+ * The resolved cadence in ms, read EVERY time the timer is armed so a
3232
+ * File > Options > Save change applies without rebuilding the viewer.
3233
+ */
3234
+ getIntervalMs: () => number;
3235
+ /**
3236
+ * The Protect-Presentation state, forwarded to the shared save decision.
3237
+ * Deliberately inert here: a recovery snapshot is written in the clear
3238
+ * whatever it says. It is threaded through so this path runs the same one
3239
+ * decision function as every real save instead of side-stepping it.
3240
+ */
3241
+ getSaveIntent?: () => DeckSaveIntent;
3242
+ /** Surface status transitions (toolbar indicator + optional host callback). */
3243
+ onStatus?: (status: AutosaveStatus) => void;
3244
+ /** The raw record, for the host's `onAutosaveRecovery` hook. */
3245
+ onRecovery?: (record: AutosaveRecord$1) => void;
3246
+ /** The shared prompt descriptor + record, for the viewer's own dialog. */
3247
+ onRecoveryOffer?: (offer: AutosaveRecoveryOffer) => void;
3248
+ /** The live shared activation verdict; omitted means "always active". */
3249
+ getActivation?: () => AutosaveActivation;
3250
+ /**
3251
+ * Whether a snapshot may be OFFERED back. This is the host ceiling alone
3252
+ * (`autosave !== false`): a user who merely switched the toggle off should
3253
+ * still be asked about work a crash left behind.
3254
+ */
3255
+ isRecoveryAllowed?: () => boolean;
3256
+ }
3257
+ interface AutosaveController {
3258
+ /** Force an immediate snapshot, bypassing the debounce window. */
3259
+ saveNow(): Promise<void>;
3260
+ /** Current status. */
3261
+ getStatus(): AutosaveStatus;
3262
+ /** Re-read the activation verdict (the toggle or edit-ability changed). */
3263
+ refresh(): void;
3264
+ /** Whether new edits currently schedule recovery snapshots. */
3265
+ isEnabled(): boolean;
3266
+ /** Tear down the timer + store subscription. */
3267
+ destroy(): void;
3268
+ }
3269
+ declare function createAutosaveController(deps: AutosaveControllerDeps): AutosaveController;
2729
3270
  //#endregion
2730
3271
  //#region src/viewer/export/export-types.d.ts
3272
+ /**
3273
+ * Types shared by the per-format export runners (`export-gif.ts`,
3274
+ * `export-video.ts`, `export-print.ts`) and the controller that wraps them
3275
+ * (`export-controller.ts`). Kept in their own module so the runners never
3276
+ * import from the controller (no cycles).
3277
+ */
3278
+ /**
3279
+ * Rasterise the slide at `index` to an `HTMLCanvasElement`. Injected so the
3280
+ * export modules stay DOM-capture-free and unit-testable. `scaleMultiplier`
3281
+ * (default 1) is an extra factor the print path applies when Options >
3282
+ * Advanced > "High quality" is on.
3283
+ */
3284
+ type RasterizeSlide = (index: number, scaleMultiplier?: number) => Promise<HTMLCanvasElement>;
3285
+ /**
3286
+ * Same capture as {@link RasterizeSlide}, but returns the full
3287
+ * `RasterizeElementResult` (tiled `png-bytes` included) instead of a plain
3288
+ * canvas. Used by the PNG-export and "copy slide as image" paths so a
3289
+ * request whose full resolution exceeds the browser's canvas cap is tiled
3290
+ * and stitched into pre-encoded PNG bytes instead of a canvas
3291
+ * `toBlob`/`toDataURL` call.
3292
+ */
3293
+ type RasterizeSlideToRaster = (index: number, scaleMultiplier?: number) => Promise<RasterizeElementResult>;
3294
+ /**
3295
+ * Same capture, but returns the raw per-tile canvases (no PNG stitching).
3296
+ * Used by PDF export so a page whose resolution exceeds the browser canvas
3297
+ * cap is composed of several small tile images instead of one oversized or
3298
+ * stitched canvas.
3299
+ */
3300
+ type RasterizeSlideToTiles = (index: number, scaleMultiplier?: number) => Promise<RasterizeElementTilesResult>;
2731
3301
  /** Per-slide progress callback: `(currentSlideIndex, totalSlides)`. */
2732
3302
  type ExportProgress = (current: number, total: number) => void;
3303
+ /** Dependencies every per-format export runner receives from the controller. */
3304
+ interface ExportCaptureDeps {
3305
+ store: Store<ViewerState>;
3306
+ rasterizeSlide: RasterizeSlide;
3307
+ /**
3308
+ * PNG-export / "copy slide as image" only; see {@link RasterizeSlideToRaster}.
3309
+ * Optional: existing test fixtures that only exercise PDF/GIF/video/print
3310
+ * (none of which touch this path) do not need to supply it.
3311
+ * `exportSlidePng`/`copySlideAsImage` fall back to wrapping
3312
+ * `rasterizeSlide`'s plain canvas when this is omitted.
3313
+ */
3314
+ rasterizeSlideToRaster?: RasterizeSlideToRaster;
3315
+ /**
3316
+ * PDF export only; see {@link RasterizeSlideToTiles}. Optional for the
3317
+ * same reason `rasterizeSlideToRaster` is: `exportPdf` falls back to
3318
+ * `rasterizeSlide`'s single canvas per page when this is omitted.
3319
+ */
3320
+ rasterizeSlideToTiles?: RasterizeSlideToTiles;
3321
+ /** Resolved base file name (no extension) for downloads. */
3322
+ baseName: string;
3323
+ /**
3324
+ * Live translator (host-supplied), for the print path's own UI text.
3325
+ * Optional: only the print path actually needs it, and falls back to a
3326
+ * default English `createTranslator()` when omitted (e.g. a GIF/video
3327
+ * test fixture that never touches print).
3328
+ */
3329
+ getTranslator?(): Translator;
3330
+ /** Options > Advanced > "Print hidden slides". Defaults to `false` (excluded), matching PowerPoint. */
3331
+ getIncludeHiddenSlides?(): boolean;
3332
+ /** Options > Advanced > "High quality" raster scale for the print fallback path. */
3333
+ getPrintHighQuality?(): boolean;
3334
+ }
2733
3335
  //#endregion
2734
3336
  //#region src/viewer/export/export-gif.d.ts
2735
3337
  /**
@@ -2766,6 +3368,12 @@ interface ExportGifOptions {
2766
3368
  /** Abort the export early; the capture loop checks this between slides. */
2767
3369
  signal?: AbortSignal;
2768
3370
  }
3371
+ /**
3372
+ * Capture every slide, encode the frames as an animated GIF, and trigger a
3373
+ * `<baseName>.gif` download. No-op when the deck is empty. Throws the shared
3374
+ * `AbortError` when `signal` aborts between slide captures.
3375
+ */
3376
+ declare function runGifExport(deps: ExportCaptureDeps, options?: ExportGifOptions): Promise<void>;
2769
3377
  //#endregion
2770
3378
  //#region src/viewer/export/export-print.d.ts
2771
3379
  /**
@@ -2803,6 +3411,13 @@ interface PrintOptions extends Partial<PrintSettings> {
2803
3411
  */
2804
3412
  openPrintWindow?: OpenPrintWindow;
2805
3413
  }
3414
+ /**
3415
+ * Assemble the printable HTML document for the (validated) settings and open
3416
+ * it in a print window. Resolves `true` when the window opened, `false` when
3417
+ * it was blocked or nothing matched the slide range. Throws the shared
3418
+ * `AbortError` when `signal` aborts between slide captures.
3419
+ */
3420
+ declare function runPrint(deps: ExportCaptureDeps, options?: PrintOptions): Promise<boolean>;
2806
3421
  //#endregion
2807
3422
  //#region src/viewer/export/export-video.d.ts
2808
3423
  /**
@@ -2831,6 +3446,17 @@ interface ExportVideoOptions {
2831
3446
  /** Abort the export early; checked between slides and between frames. */
2832
3447
  signal?: AbortSignal;
2833
3448
  }
3449
+ /** Deps for {@link runVideoExport}; adds a sleep seam for fast unit tests. */
3450
+ interface ExportVideoDeps extends ExportCaptureDeps {
3451
+ /** Overridable frame-hold sleep (test seam). Defaults to `setTimeout`. */
3452
+ waitMs?: (ms: number) => Promise<void>;
3453
+ }
3454
+ /**
3455
+ * Capture every slide, record them into a WebM video, and trigger a
3456
+ * `<baseName>.webm` download. No-op when the deck is empty. Throws the shared
3457
+ * `AbortError` when `signal` aborts during capture or recording.
3458
+ */
3459
+ declare function runVideoExport(deps: ExportVideoDeps, options?: ExportVideoOptions): Promise<void>;
2834
3460
  //#endregion
2835
3461
  //#region src/viewer/export/export-controller.d.ts
2836
3462
  /** Options for the multi-slide PDF export (progress + cooperative cancel). */
@@ -2840,12 +3466,222 @@ interface ExportPdfOptions {
2840
3466
  /** Abort the export early; the loop checks this between slides. */
2841
3467
  signal?: AbortSignal;
2842
3468
  }
3469
+ interface ExportControllerDeps {
3470
+ store: Store<ViewerState>;
3471
+ rasterizeSlide: RasterizeSlide;
3472
+ /** PNG-export / "copy slide as image" only; see {@link RasterizeSlideToRaster}. */
3473
+ rasterizeSlideToRaster?: RasterizeSlideToRaster;
3474
+ /** PDF export only; see {@link RasterizeSlideToTiles}. */
3475
+ rasterizeSlideToTiles?: RasterizeSlideToTiles;
3476
+ /** Base file name (without extension) for downloads. Defaults to `presentation`. */
3477
+ fileName?: string;
3478
+ /** Live translator (host-supplied), for the print path's own UI text. */
3479
+ getTranslator?: ExportCaptureDeps['getTranslator'];
3480
+ /** Options > Advanced > "Print hidden slides". */
3481
+ getIncludeHiddenSlides?: ExportCaptureDeps['getIncludeHiddenSlides'];
3482
+ /** Options > Advanced > "High quality" raster scale for the print fallback path. */
3483
+ getPrintHighQuality?: ExportCaptureDeps['getPrintHighQuality'];
3484
+ }
3485
+ interface ExportController {
3486
+ /** Export a single slide as a PNG download. Defaults to the current slide. */
3487
+ exportSlidePng(index?: number): Promise<void>;
3488
+ /** Copy a slide to the system clipboard as a PNG image. */
3489
+ copySlideAsImage(index?: number): Promise<void>;
3490
+ /** Export every slide as a multi-page PDF download (one slide per page). */
3491
+ exportPdf(options?: ExportPdfOptions): Promise<void>;
3492
+ /** Export every slide as an animated GIF download (one frame per slide). */
3493
+ exportGif(options?: ExportGifOptions): Promise<void>;
3494
+ /** Export every slide as a WebM video download (MediaRecorder). */
3495
+ exportVideo(options?: ExportVideoOptions): Promise<void>;
3496
+ /** Assemble the printable document and open it in a print window. */
3497
+ print(options?: PrintOptions): Promise<boolean>;
3498
+ /** Serialize the deck to `pptx-viewer-json` and download it. */
3499
+ exportJson(): void;
3500
+ }
3501
+ /**
3502
+ * Export controller: render slides to PNG / PDF / GIF / WebM video, plus the
3503
+ * print flow. Vanilla port of Vue's `useExport` composable extended with the
3504
+ * GIF/video/print surface from React's `useExportHandlers` (the per-format
3505
+ * capture drivers live in `export-gif.ts` / `export-video.ts` /
3506
+ * `export-print.ts`; all pure planning/encoding/assembly is shared). A plain
3507
+ * closure with an internal `exporting` guard replaces the reactive flag, since
3508
+ * nothing in the vanilla binding currently needs to reactively observe
3509
+ * export-in-progress state.
3510
+ *
3511
+ * Rasterisation is delegated to the injected `rasterizeSlide` (the host owns
3512
+ * the DOM + `html2canvas-pro`, see `rasterize-slide.ts`). `jspdf` is loaded
3513
+ * lazily so it stays out of the main bundle.
3514
+ */
3515
+ declare function createExportController(deps: ExportControllerDeps): ExportController;
3516
+ //#endregion
3517
+ //#region src/viewer/export/export-progress-modal.d.ts
3518
+ /**
3519
+ * ExportProgressModal: a centered, non-dismissable overlay shown while a
3520
+ * multi-slide export (PDF / GIF / WebM) runs. Vanilla port of the shared
3521
+ * ExportProgressModal pattern (React/Vue/Angular/Svelte): same layout and
3522
+ * `--pptx-*` theme tokens, hand-built DOM instead of a template.
3523
+ *
3524
+ * It deliberately does NOT close on backdrop click or Escape: an export in
3525
+ * flight should only end by completing, erroring, or the user pressing
3526
+ * Cancel. `onCancel` aborts cooperatively (the export loops check the
3527
+ * signal between slides).
3528
+ */
3529
+ interface ExportProgressModal {
3530
+ /** Show the modal with a fresh title, zeroed bar, and initial status. */
3531
+ open(title: string, status: string): void;
3532
+ /** Update the bar (0-100, clamped) and the status line under it. */
3533
+ update(progress: number, status: string): void;
3534
+ /** Hide and remove the modal from the document. */
3535
+ close(): void;
3536
+ }
3537
+ interface ExportProgressModalDeps {
3538
+ doc: Document;
3539
+ getTranslator(): Translator;
3540
+ /** The Cancel control was pressed (abort the in-flight export). */
3541
+ onCancel(): void;
3542
+ }
3543
+ /** Build a (closed) progress modal; `open` mounts it onto `doc.body`. */
3544
+ declare function createExportProgressModal(deps: ExportProgressModalDeps): ExportProgressModal;
3545
+ //#endregion
3546
+ //#region src/viewer/export/export-progress-ui.d.ts
3547
+ /**
3548
+ * Wires the multi-slide exports (PDF / GIF / WebM) to the progress modal:
3549
+ * a `begin -> run -> end` envelope owning the modal state and the
3550
+ * `AbortController` the export loops check between slides. Vanilla port of
3551
+ * Svelte's `ExportUiState` / Vue's `useExportProgress`; all percentage maths
3552
+ * and status labels come from `pptx-viewer-shared` (`export-progress.ts`) so
3553
+ * every binding shows identical progress.
3554
+ *
3555
+ * A caller-supplied `onProgress`/`signal` (the public `PptxViewerInstance`
3556
+ * export API accepts them) still works: caller callbacks are invoked alongside
3557
+ * the modal's, and an aborted caller signal aborts the envelope's controller.
3558
+ */
3559
+ interface ExportProgressUiDeps {
3560
+ modal: ExportProgressModal;
3561
+ controller: ExportController;
3562
+ getTranslator(): Translator;
3563
+ }
3564
+ interface ExportProgressUi {
3565
+ runPdf(options?: ExportPdfOptions): Promise<void>;
3566
+ runGif(options?: ExportGifOptions): Promise<void>;
3567
+ runVideo(options?: ExportVideoOptions): Promise<void>;
3568
+ /** Abort the in-flight export (the modal's Cancel control routes here). */
3569
+ cancel(): void;
3570
+ }
3571
+ declare function createExportProgressUi(deps: ExportProgressUiDeps): ExportProgressUi;
2843
3572
  //#endregion
2844
3573
  //#region src/viewer/export/export-svg.d.ts
2845
3574
  /** Export one parsed slide as resolution-independent SVG markup. */
2846
- export declare function exportSlideToSvg(slide: PptxSlide, width: number, height: number, options?: SvgExportOptions): string;
3575
+ export declare function exportSlideToSvg(slide: index_d_exports$2.PptxSlide, width: number, height: number, options?: index_d_exports$2.SvgExportOptions): string;
2847
3576
  /** Export the selected slides in a parsed presentation as SVG markup. */
2848
- export declare function exportAllSlidesToSvg(data: PptxData, options?: SvgExportOptions): string[];
3577
+ export declare function exportAllSlidesToSvg(data: index_d_exports$2.PptxData, options?: index_d_exports$2.SvgExportOptions): string[];
3578
+ //#endregion
3579
+ //#region src/viewer/export/rasterize-slide.d.ts
3580
+ interface RasterizeSlideDeps {
3581
+ doc: Document;
3582
+ /** Host the off-screen capture stage is appended to; removed on `destroy()`. */
3583
+ container: HTMLElement;
3584
+ store: Store<ViewerState>;
3585
+ registry: index_d_exports$1.ElementRendererRegistry;
3586
+ getTranslator(): Translator;
3587
+ /**
3588
+ * Opt-in WebGL SmartArt renderer flag; see `PptxViewerOptions.smartArt3D`.
3589
+ * A getter, not a plain boolean, read fresh on every `rasterizeSlide()`
3590
+ * call so a mid-session Options > Advanced > "Disable 3D rendering" toggle
3591
+ * (already ANDed in by the caller, see `resolve3DRenderingFlags`) reaches
3592
+ * the very next export/print without reconstructing this controller.
3593
+ */
3594
+ getSmartArt3D(): boolean;
3595
+ /**
3596
+ * Opt-in interactive WebGL surface-chart renderer flag; see
3597
+ * `PptxViewerOptions.surfaceChart3D`. Same "read fresh" note as
3598
+ * `getSmartArt3D`.
3599
+ */
3600
+ getSurfaceChart3D(): boolean;
3601
+ /**
3602
+ * Opt-in interactive WebGL bar3D-chart renderer flag; see
3603
+ * `PptxViewerOptions.barChart3D`. Same "read fresh" note as `getSmartArt3D`.
3604
+ */
3605
+ getBarChart3D(): boolean;
3606
+ /**
3607
+ * Opt-in interactive WebGL line3D-chart renderer flag; see
3608
+ * `PptxViewerOptions.lineChart3D`. Same "read fresh" note as
3609
+ * `getSmartArt3D`.
3610
+ */
3611
+ getLineChart3D(): boolean;
3612
+ /**
3613
+ * Opt-in interactive WebGL area3D-chart renderer flag; see
3614
+ * `PptxViewerOptions.areaChart3D`. Same "read fresh" note as
3615
+ * `getSmartArt3D`.
3616
+ */
3617
+ getAreaChart3D(): boolean;
3618
+ /**
3619
+ * Opt-in interactive WebGL pie3D-chart renderer flag; see
3620
+ * `PptxViewerOptions.pieChart3D`. Same "read fresh" note as `getSmartArt3D`.
3621
+ */
3622
+ getPieChart3D(): boolean;
3623
+ /**
3624
+ * Options > Advanced > "Default resolution" / "Do not compress images"
3625
+ * raster-scale multiplier (see `resolveImageResolutionScale` in
3626
+ * `pptx-viewer-shared`), applied on top of the baseline capture scale so
3627
+ * the option has real effect without changing the default (highFidelity)
3628
+ * export quality.
3629
+ */
3630
+ getImageResolutionScale(): number;
3631
+ /**
3632
+ * Overridable frame-wait before capture (test seam: the real
3633
+ * `requestAnimationFrame` double-wait is not worth driving through fake
3634
+ * timers). Defaults to {@link nextFrame}.
3635
+ */
3636
+ waitForFrame?: () => Promise<void>;
3637
+ }
3638
+ interface RasterizeSlideController {
3639
+ /**
3640
+ * Render slide `index` off-screen at scale 1 and capture it to a single
3641
+ * full-resolution canvas via the shared `rasterizeElementTiledToCanvas`
3642
+ * (foreignObject -> vector-SVG -> html2canvas-pro fallback chain), tiling
3643
+ * and stitching transparently (never reducing scale) if the requested
3644
+ * resolution would exceed the browser's canvas cap. `scaleMultiplier`
3645
+ * (default 1) is an extra factor on top of the baseline 2x * Options >
3646
+ * Advanced > Image Size/Quality scale; the Print dialog's notes/handouts
3647
+ * raster path passes a higher value when Options > Advanced > "High
3648
+ * quality" is on, without changing plain PNG/PDF export.
3649
+ */
3650
+ rasterizeSlide(index: number, scaleMultiplier?: number): Promise<HTMLCanvasElement>;
3651
+ /**
3652
+ * Same capture as {@link rasterizeSlide}, but returns the full
3653
+ * `RasterizeElementResult` instead of unwrapping to a plain canvas. Used
3654
+ * by the PNG-export and "copy slide as image" paths so a request whose
3655
+ * full resolution exceeds the browser's canvas cap is tiled and stitched
3656
+ * as pre-encoded PNG bytes (`kind: 'png-bytes'`) instead of a canvas
3657
+ * `toBlob`/`toDataURL` call, since no single canvas could hold the full
3658
+ * image.
3659
+ */
3660
+ rasterizeSlideToRaster(index: number, scaleMultiplier?: number): Promise<RasterizeElementResult>;
3661
+ /**
3662
+ * Same capture, but returns the raw per-tile canvases (no PNG stitching).
3663
+ * Used by PDF export so a page whose resolution exceeds the browser
3664
+ * canvas cap is composed of several small tile images instead of one
3665
+ * oversized or stitched canvas.
3666
+ */
3667
+ rasterizeSlideToTiles(index: number, scaleMultiplier?: number): Promise<RasterizeElementTilesResult>;
3668
+ /** Remove the off-screen capture stage from the DOM. */
3669
+ destroy(): void;
3670
+ }
3671
+ /**
3672
+ * Build the off-screen capture stage used by PNG/PDF export: a hidden host
3673
+ * (fixed off-canvas, `aria-hidden`) that renders one slide at a time at scale
3674
+ * 1 via the shared `renderSlideStage`, then rasterises it through the shared
3675
+ * `rasterizeElement` / `rasterizeElementTiles` /
3676
+ * `rasterizeElementTiledToCanvas` entry points; `renderToCanvas`
3677
+ * (html2canvas-pro) is only ever the last-resort `html2canvasFallback` driver
3678
+ * handed to them. Vanilla port of Vue's `useExportWiring.rasterizeSlide`
3679
+ * (`packages/vue/src/viewer/composables/useExportWiring.ts`): Vue re-renders
3680
+ * an off-screen `<SlideStage>` behind a template ref; the vanilla binding
3681
+ * owns the DOM directly, so this builds and re-populates one host element for
3682
+ * the life of the controller instead.
3683
+ */
3684
+ declare function createRasterizeSlide(deps: RasterizeSlideDeps): RasterizeSlideController;
2849
3685
  //#endregion
2850
3686
  //#region src/viewer/export/render-to-canvas.d.ts
2851
3687
  /**
@@ -2867,100 +3703,8 @@ export declare function renderToCanvas(element: HTMLElement, options?: Partial<O
2867
3703
  * a URL string to fetch.
2868
3704
  */
2869
3705
  type PptxViewerSource = ArrayBuffer | Uint8Array | Blob | string;
2870
- //#endregion
2871
- //#region src/viewer/load/load-presentation.d.ts
2872
- /**
2873
- * The vanilla load pipeline: parse a `.pptx` buffer with `pptx-viewer-core`'s
2874
- * `PptxHandler` and resolve all media / picture URLs, exactly like the Vue
2875
- * binding's `useLoadContent` (minus the framework reactivity). Chart data
2876
- * enrichment happens inside `PptxHandler.load` (core's slide loader calls
2877
- * `enrichChartData` for every chart), so loaded chart elements arrive
2878
- * render-ready here too.
2879
- */
2880
- interface LoadedPresentation {
2881
- /** The live handler (owns the archive; caller must `dispose()` it). */
2882
- handler: PptxHandler;
2883
- /** Parsed slides with image/media URLs patched in. */
2884
- slides: PptxSlide[];
2885
- /** Parsed presentation sections. */
2886
- sections: PptxSection[];
2887
- presentationProperties: PptxPresentationProperties;
2888
- /**
2889
- * View properties (`ppt/viewProps.xml`, `p:viewPr`): grid spacing, snap /
2890
- * guide toggles, last view, splitter state, etc. `gridSpacing` lives here,
2891
- * NOT on `presentationProperties` -- `p:gridSpacing` is a child of
2892
- * `p:viewPr`, and a real PowerPoint file never populates it under
2893
- * `p:presentationPr`.
2894
- */
2895
- viewProperties?: PptxViewProperties;
2896
- headerFooter: PptxHeaderFooter;
2897
- coreProperties?: PptxCoreProperties;
2898
- appProperties?: PptxAppProperties;
2899
- customProperties: PptxCustomProperty[];
2900
- customShows: PptxCustomShow[];
2901
- /** Office 2021 (p188) comment authors, for the `@`-mention typeahead. */
2902
- modernCommentAuthors: PptxModernCommentAuthor[];
2903
- /** Legacy `ppt/commentAuthors.xml` authors, mapped into the typeahead too. */
2904
- commentAuthors: PptxCommentAuthor[];
2905
- embeddedFonts: PptxEmbeddedFont[];
2906
- hasDigitalSignatures: boolean;
2907
- digitalSignatureCount: number;
2908
- isPasswordProtected: boolean;
2909
- /** Slide canvas size in CSS px. */
2910
- canvasSize: CanvasSize;
2911
- /**
2912
- * `p:sldSz` verbatim, in EMU. Kept even when it matches no preset so a save
2913
- * re-emits the authored dimensions rather than a lossy pixel round-trip.
2914
- */
2915
- slideSize?: SlideSizeEmu;
2916
- /** Archive-path to displayable URL map for media + poster frames. */
2917
- mediaDataUrls: Map<string, string>;
2918
- /** Presentation theme colours used by scheme-based rendering. */
2919
- colorScheme?: PptxThemeColorScheme;
2920
- /** Presentation theme fonts used by table-style font resolution. */
2921
- fontScheme?: PptxThemeFontScheme;
2922
- /** The theme part's name, seeding the inspector's THEME EDITOR card. */
2923
- themeName?: string;
2924
- /** Tag collections from `ppt/tags/*.xml` (inspector TAGS card). */
2925
- tagCollections: PptxTagCollection[];
2926
- /** Parsed presentation table styles keyed by style id. */
2927
- tableStyleMap?: ParsedTableStyleMap;
2928
- /** `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` default style GUID. */
2929
- tableStylesDefaultId?: string;
2930
- slideMasters: PptxSlideMaster[];
2931
- /** Theme parts discovered in the package (inspector THEME card). */
2932
- themeOptions: PptxThemeOption[];
2933
- notesMaster?: PptxNotesMaster;
2934
- handoutMaster?: PptxHandoutMaster;
2935
- hasMacros: boolean;
2936
- notesCanvasSize?: CanvasSize;
2937
- /** Blob URLs created during the load; revoke them when replacing/destroying. */
2938
- blobUrls: string[];
2939
- /**
2940
- * Write-protection verifier from `p:modifyVerifier` (`presentation.xml`).
2941
- * Feeds `readOnlyRecommendation`: its presence means editing requires a
2942
- * password this viewer never asks for.
2943
- */
2944
- modifyVerifier?: PptxModifyVerifier;
2945
- /**
2946
- * Deck-level compatibility warnings (`data.warnings`, distinct from each
2947
- * slide's own `warnings`): unmodelled markup, lossy save fallbacks, etc.
2948
- * reported by core's `PptxCompatibilityService`. Feeds
2949
- * `compatibilityWarningToasts` alongside every slide's `warnings`.
2950
- */
2951
- warnings: PptxCompatibilityWarning[];
2952
- }
2953
- interface LoadPresentationOptions {
2954
- /**
2955
- * Trust Center > "Allow external content" (default false, matching core's
2956
- * own SSRF/privacy-safe default). When false, `PptxHandler.getImageData`
2957
- * silently drops `http(s)://` image references instead of fetching them.
2958
- */
2959
- allowExternalImages?: boolean;
2960
- }
2961
- export declare function loadPresentation(buffer: ArrayBuffer, options?: LoadPresentationOptions): Promise<LoadedPresentation>;
2962
- /** Revoke every `blob:` URL in the list (safe for data: URLs, which are skipped). */
2963
- export declare function revokeBlobUrls(urls: Iterable<string>): void;
3706
+ /** Normalise any accepted source into an `ArrayBuffer` of `.pptx` bytes. */
3707
+ declare function resolveSourceToBuffer(source: PptxViewerSource): Promise<ArrayBuffer>;
2964
3708
  //#endregion
2965
3709
  //#region src/viewer/types.d.ts
2966
3710
  /** Callbacks mirroring the Vue component's emits. */
@@ -2995,7 +3739,7 @@ interface PptxViewerCallbacks {
2995
3739
  /** Fired on every collaboration connection-status transition. */
2996
3740
  onCollaborationStatus?: (status: ConnectionStatus) => void;
2997
3741
  }
2998
- interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3742
+ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions$1 {
2999
3743
  /**
3000
3744
  * The presentation to open: raw `.pptx` bytes (ArrayBuffer / Uint8Array),
3001
3745
  * a Blob/File, or a URL string to fetch. Omit to start empty and call
@@ -3005,7 +3749,7 @@ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3005
3749
  /** Licensed font sources supplied by the host application. */
3006
3750
  fonts?: ViewerFontSource[];
3007
3751
  /** Viewer chrome theme (shared `ViewerTheme`: colors, radius, CSS vars). */
3008
- theme?: ViewerTheme;
3752
+ theme?: ViewerTheme$1;
3009
3753
  /** Display name shown in the PowerPoint-style title bar. */
3010
3754
  fileName?: string;
3011
3755
  /** UI locale (default `'en'`). Dictionaries come from `messages`. */
@@ -3045,7 +3789,7 @@ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3045
3789
  * Disabled by default: the Account page's sign-in section renders nothing
3046
3790
  * unless `enabled: true` is passed.
3047
3791
  */
3048
- accountAuth?: AccountAuthConfig;
3792
+ accountAuth?: AccountAuthConfig$1;
3049
3793
  /** Zero-based slide to show after load (default 0). */
3050
3794
  initialSlide?: number;
3051
3795
  /**
@@ -3083,20 +3827,20 @@ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3083
3827
  * the same feature. Unlike {@link showToolbar}, this hides individual
3084
3828
  * pieces rather than the whole chrome.
3085
3829
  */
3086
- hiddenActions?: ToolbarActionId[];
3830
+ hiddenActions?: ToolbarActionId$1[];
3087
3831
  /**
3088
3832
  * Framework-neutral UI customisation. See docs/guide/customization.md.
3089
3833
  * Seeds the instance's customisation; the `ViewerCustomizationApi` methods
3090
3834
  * on the returned instance (`hideRibbonTab`, `setCustomization`, ...)
3091
3835
  * change it live. {@link hiddenActions} still applies and is unioned with it.
3092
3836
  */
3093
- customization?: ViewerCustomization;
3837
+ customization?: ViewerCustomization$1;
3094
3838
  /**
3095
3839
  * Custom element-renderer registry. Defaults to `createDefaultRegistry()`;
3096
3840
  * pass your own (or mutate the default via `getRegistry()`) to add or
3097
3841
  * override element renderers.
3098
3842
  */
3099
- registry?: ElementRendererRegistry;
3843
+ registry?: index_d_exports$1.ElementRendererRegistry;
3100
3844
  /**
3101
3845
  * Unit system for the View > Rulers tick labels (default `'inches'`, as
3102
3846
  * PowerPoint does). Mirrors React's `rulerUnit` prop; the tick generator is
@@ -3241,10 +3985,10 @@ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3241
3985
  * the model connection (a backend `endpoint`, an in-browser `model`, or a
3242
3986
  * custom `transport`); see {@link PptxAiConfig}.
3243
3987
  */
3244
- ai?: PptxAiConfig;
3988
+ ai?: PptxAiConfig$1;
3245
3989
  }
3246
3990
  /** The viewer handle returned by `createPptxViewer`. */
3247
- interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi {
3991
+ interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi$1 {
3248
3992
  /** Load a presentation from bytes or a Blob/File (replaces the current one). */
3249
3993
  loadFile(file: Blob | ArrayBuffer | Uint8Array): Promise<void>;
3250
3994
  /** Fetch and load a presentation from a URL. */
@@ -3267,7 +4011,7 @@ interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi
3267
4011
  zoomOut(): void;
3268
4012
  zoomToFit(): void;
3269
4013
  /** Apply a new viewer theme (pass `undefined` to reset to defaults). */
3270
- setTheme(theme: ViewerTheme | undefined): void;
4014
+ setTheme(theme: ViewerTheme$1 | undefined): void;
3271
4015
  /** Switch the UI locale (rebuilds the chrome labels). */
3272
4016
  setLocale(locale: string): void;
3273
4017
  /** Enter presentation mode (real Fullscreen API). */
@@ -3285,9 +4029,9 @@ interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi
3285
4029
  canUndo(): boolean;
3286
4030
  canRedo(): boolean;
3287
4031
  /** Serialise the (edited) presentation to `.pptx` bytes and clear dirty. */
3288
- save(format?: PptxSaveFormat): Promise<Uint8Array>;
4032
+ save(format?: index_d_exports$2.PptxSaveFormat): Promise<Uint8Array>;
3289
4033
  /** Save and download a presentation in a supported OpenXML format. */
3290
- downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
4034
+ downloadAs(format: index_d_exports$2.PptxSaveFormat, fileName?: string): Promise<void>;
3291
4035
  /** `save()` + trigger a browser download (default `presentation.pptx`). */
3292
4036
  downloadPptx(fileName?: string): Promise<void>;
3293
4037
  /** Delete the selected element (no-op without a selection). */
@@ -3334,13 +4078,13 @@ interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi
3334
4078
  */
3335
4079
  exportJson(): void;
3336
4080
  /** The element-renderer registry in effect (extension point). */
3337
- getRegistry(): ElementRendererRegistry;
4081
+ getRegistry(): index_d_exports$1.ElementRendererRegistry;
3338
4082
  /**
3339
4083
  * Escape hatch: the live `pptx-viewer-core` handler for the loaded file
3340
4084
  * (or `null`). Enables advanced operations (save, markdown conversion,
3341
4085
  * archive access) without extra APIs here.
3342
4086
  */
3343
- getHandler(): PptxHandler | null;
4087
+ getHandler(): index_d_exports$2.PptxHandler | null;
3344
4088
  /**
3345
4089
  * Start (or restart) a real-time collaboration session. Resolves once the
3346
4090
  * transport is created; connection status arrives via
@@ -3386,11 +4130,11 @@ interface ChromeHost {
3386
4130
  /** The host options with the UI customisation folded into the chrome flags. */
3387
4131
  getChromeOptions(): PptxViewerOptions;
3388
4132
  /** The live resolved UI customisation. */
3389
- getResolvedCustomization(): ResolvedCustomization;
4133
+ getResolvedCustomization(): ResolvedCustomization$1;
3390
4134
  /** The viewer's live theme (kept in sync by `setTheme`); read on mount/remount instead of the static `options.theme`. */
3391
- currentTheme: ViewerTheme | undefined;
4135
+ currentTheme: ViewerTheme$1 | undefined;
3392
4136
  editor: {
3393
- commitNotes(notes: string, notesSegments?: TextSegment[]): void;
4137
+ commitNotes(notes: string, notesSegments?: index_d_exports$2.TextSegment[]): void;
3394
4138
  getEditActions(): EditActions;
3395
4139
  getFindReplaceActions(): FindReplaceActions;
3396
4140
  setDrawTool(tool: DrawTool): void;
@@ -3437,7 +4181,7 @@ interface ChromeHost {
3437
4181
  /** Whether the host permits that switch to change anything. */
3438
4182
  isAutosaveToggleAvailable(): boolean;
3439
4183
  downloadPptx(): Promise<void>;
3440
- downloadAs(format: PptxSaveFormat): Promise<void>;
4184
+ downloadAs(format: index_d_exports$2.PptxSaveFormat): Promise<void>;
3441
4185
  toggleNotes(): void;
3442
4186
  goToSlide(index: number): void;
3443
4187
  /** Home: the show's first slide (skips a hidden slide 1 while presenting). */
@@ -3514,7 +4258,7 @@ interface ChromeHost {
3514
4258
  * The deck's parsed `ppt/tableStyles.xml` map, for the table properties
3515
4259
  * panel's "Edit style...".
3516
4260
  */
3517
- getTableStyleMap(): ParsedTableStyleMap | undefined;
4261
+ getTableStyleMap(): index_d_exports$2.ParsedTableStyleMap | undefined;
3518
4262
  /** The current theme colour map (scheme key -> hex), for resolving scheme-based table style colours. */
3519
4263
  getThemeColorMap(): Record<string, string> | undefined;
3520
4264
  toggleTemplateEditing(): void;
@@ -3531,7 +4275,7 @@ interface ChromeHost {
3531
4275
  openFile(): void;
3532
4276
  openRecentFile(key: string): void;
3533
4277
  createPresentation(templateId: string): void;
3534
- setTheme(theme: ViewerTheme | undefined): void;
4278
+ setTheme(theme: ViewerTheme$1 | undefined): void;
3535
4279
  applyPresentationTheme(presetId: string): void;
3536
4280
  }
3537
4281
  //#endregion
@@ -3539,7 +4283,7 @@ interface ChromeHost {
3539
4283
  interface ViewerCustomizationLifecycle {
3540
4284
  readonly controller: ViewerCustomizationController;
3541
4285
  /** The current resolved customisation (read lazily by every render site). */
3542
- getResolved(): ResolvedCustomization;
4286
+ getResolved(): ResolvedCustomization$1;
3543
4287
  /**
3544
4288
  * The host options with the customisation folded into the flags the chrome
3545
4289
  * builders already read: `hiddenActions` (legacy list unioned with the
@@ -3548,7 +4292,7 @@ interface ViewerCustomizationLifecycle {
3548
4292
  getChromeOptions(): PptxViewerOptions;
3549
4293
  /** The host configured `ai` AND the customisation keeps the AI feature. */
3550
4294
  isAiEnabled(): boolean;
3551
- isDialogAvailable(dialog: ViewerDialogId): boolean;
4295
+ isDialogAvailable(dialog: ViewerDialogId$1): boolean;
3552
4296
  /**
3553
4297
  * Start applying the customisation: push the constraints into the options
3554
4298
  * store now and on every change, and call `onChange` after each change so
@@ -3559,6 +4303,44 @@ interface ViewerCustomizationLifecycle {
3559
4303
  }
3560
4304
  //#endregion
3561
4305
  //#region src/viewer/export-lifecycle.d.ts
4306
+ interface ExportLifecycleDeps {
4307
+ doc: Document;
4308
+ /** Host the off-screen capture stage mounts into; matches the viewer container. */
4309
+ container: HTMLElement;
4310
+ store: Store<ViewerState>;
4311
+ registry: index_d_exports$1.ElementRendererRegistry;
4312
+ getTranslator(): Translator;
4313
+ /**
4314
+ * The six 3D opt-in flags as getters (not plain booleans), each already
4315
+ * ANDed with Options > Advanced > "Disable 3D rendering" by the caller
4316
+ * (see `resolve3DRenderingFlags`) and read fresh on every export/print so
4317
+ * a mid-session toggle reaches the very next one. See `RasterizeSlideDeps`.
4318
+ */
4319
+ getSmartArt3D(): boolean;
4320
+ getSurfaceChart3D(): boolean;
4321
+ getBarChart3D(): boolean;
4322
+ getLineChart3D(): boolean;
4323
+ getAreaChart3D(): boolean;
4324
+ getPieChart3D(): boolean;
4325
+ /**
4326
+ * Options > Advanced > "Default resolution" / "Do not compress images"
4327
+ * raster-scale multiplier (see `resolveImageResolutionScale`), read fresh
4328
+ * on every rasterize call so a mid-session change reaches the next export.
4329
+ */
4330
+ getImageResolutionScale(): number;
4331
+ /**
4332
+ * Options > Advanced > "Print hidden slides", read fresh on every print so a
4333
+ * mid-session toggle reaches the very next print job.
4334
+ */
4335
+ getIncludeHiddenSlides?(): boolean;
4336
+ /**
4337
+ * Options > Advanced > "High quality" raster scale for the print
4338
+ * notes/handouts fallback path, read fresh on every print.
4339
+ */
4340
+ getPrintHighQuality?(): boolean;
4341
+ /** Source file name (title-bar name); drives export download names. */
4342
+ fileName?: string;
4343
+ }
3562
4344
  /** The export slice of the public viewer API (see `PptxViewerInstance`). */
3563
4345
  interface ViewerExportApi {
3564
4346
  /** Export a single slide as a PNG download. Defaults to the current slide. */
@@ -3596,14 +4378,23 @@ declare abstract class ViewerExportHost implements ViewerExportApi {
3596
4378
  print(options?: PrintOptions): Promise<boolean>;
3597
4379
  exportJson(): void;
3598
4380
  }
4381
+ /**
4382
+ * Build the export feature for one `PptxViewer` instance: the off-screen
4383
+ * rasterisation stage (`./export/rasterize-slide.ts`) plus the
4384
+ * PNG/PDF/GIF/video/print export controller
4385
+ * (`./export/export-controller.ts`) wired to it. Split out of `PptxViewer`
4386
+ * (mirrors `chrome-lifecycle.ts`) purely to keep the class file under the
4387
+ * file-size budget; owns no state beyond the capture stage.
4388
+ */
4389
+ declare function createExportLifecycle(deps: ExportLifecycleDeps): ExportLifecycle;
3599
4390
  //#endregion
3600
4391
  //#region src/viewer/customization-host.d.ts
3601
- declare abstract class ViewerCustomizationHost extends ViewerExportHost implements ViewerCustomizationApi {
4392
+ declare abstract class ViewerCustomizationHost extends ViewerExportHost implements ViewerCustomizationApi$1 {
3602
4393
  protected abstract readonly customization: ViewerCustomizationLifecycle;
3603
4394
  private get customizationApi();
3604
- getCustomization(): ViewerCustomization;
3605
- setCustomization(next: ViewerCustomization): void;
3606
- updateCustomization(patch: ViewerCustomization): void;
4395
+ getCustomization(): ViewerCustomization$1;
4396
+ setCustomization(next: ViewerCustomization$1): void;
4397
+ updateCustomization(patch: ViewerCustomization$1): void;
3607
4398
  resetCustomization(): void;
3608
4399
  hideRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
3609
4400
  showRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
@@ -3613,15 +4404,15 @@ declare abstract class ViewerCustomizationHost extends ViewerExportHost implemen
3613
4404
  showToolbarButton(button: ToolbarButtonId | RibbonControlId): void;
3614
4405
  hideRibbonControl(control: RibbonControlId): void;
3615
4406
  showRibbonControl(control: RibbonControlId): void;
3616
- hideOptionsPage(page: OptionsPageId): void;
3617
- showOptionsPage(page: OptionsPageId): void;
3618
- hideOptionsSection(section: OptionsSectionId): void;
3619
- showOptionsSection(section: OptionsSectionId): void;
3620
- hideSetting(setting: OptionsSettingId): void;
3621
- showSetting(setting: OptionsSettingId): void;
3622
- lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
3623
- unlockSetting(setting: OptionsSettingId): void;
3624
- setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
4407
+ hideOptionsPage(page: OptionsPageId$1): void;
4408
+ showOptionsPage(page: OptionsPageId$1): void;
4409
+ hideOptionsSection(section: OptionsSectionId$1): void;
4410
+ showOptionsSection(section: OptionsSectionId$1): void;
4411
+ hideSetting(setting: OptionsSettingId$1): void;
4412
+ showSetting(setting: OptionsSettingId$1): void;
4413
+ lockSetting(setting: OptionsSettingId$1, value: ViewerOptionPrimitive, hidden?: boolean): void;
4414
+ unlockSetting(setting: OptionsSettingId$1): void;
4415
+ setSettingDefault(setting: OptionsSettingId$1, value: ViewerOptionPrimitive | undefined): void;
3625
4416
  hideBackstagePage(page: BackstagePage): void;
3626
4417
  showBackstagePage(page: BackstagePage): void;
3627
4418
  hideBackstageCard(card: BackstageCardId): void;
@@ -3632,10 +4423,10 @@ declare abstract class ViewerCustomizationHost extends ViewerExportHost implemen
3632
4423
  showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
3633
4424
  disableShortcut(action: EditorKeyActionName): void;
3634
4425
  enableShortcut(action: EditorKeyActionName): void;
3635
- remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
3636
- setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
3637
- setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
3638
- setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
4426
+ remapShortcut(action: EditorKeyActionName, chords: ShortcutChord$1 | readonly ShortcutChord$1[] | undefined): void;
4427
+ setPanelVisible(panel: ViewerPanelId$1, visible: boolean): void;
4428
+ setFeatureEnabled(feature: ViewerFeatureId$1, enabled: boolean): void;
4429
+ setDialogAvailable(dialog: ViewerDialogId$1, available: boolean): void;
3639
4430
  }
3640
4431
  //#endregion
3641
4432
  //#region src/viewer/PptxViewer.d.ts
@@ -3652,7 +4443,7 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
3652
4443
  readonly renderer: RenderController;
3653
4444
  t: Translator;
3654
4445
  /** The viewer's live theme (kept in sync by `setTheme`); read by `ChromeHost` on mount/remount. */
3655
- currentTheme: ViewerTheme | undefined;
4446
+ currentTheme: ViewerTheme$1 | undefined;
3656
4447
  private readonly availableThemes;
3657
4448
  private readonly availableLocales;
3658
4449
  private currentThemeKey;
@@ -3772,14 +4563,14 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
3772
4563
  getActiveSlideIndex: () => number;
3773
4564
  setActiveSlideIndex: (index: number) => void;
3774
4565
  isDirty: () => boolean;
3775
- getSlides: () => readonly PptxSlide[];
3776
- getSlide: (index: number) => PptxSlide | undefined;
3777
- getActiveSlide: () => PptxSlide | undefined;
3778
- getElements: (index?: number) => readonly PptxElement[];
3779
- getElementById: (id: string, index?: number) => PptxElement | undefined;
3780
- updateElements: (updates: readonly ElementUpdate[], options?: ElementUpdateOptions) => Promise<void>;
3781
- updateElement: (id: string, updates: Partial<PptxElement>) => void;
3782
- addElement: (element: PptxElement) => string | undefined;
4566
+ getSlides: () => readonly index_d_exports$2.PptxSlide[];
4567
+ getSlide: (index: number) => index_d_exports$2.PptxSlide | undefined;
4568
+ getActiveSlide: () => index_d_exports$2.PptxSlide | undefined;
4569
+ getElements: (index?: number) => readonly index_d_exports$2.PptxElement[];
4570
+ getElementById: (id: string, index?: number) => index_d_exports$2.PptxElement | undefined;
4571
+ updateElements: (updates: readonly ElementUpdate$1[], options?: ElementUpdateOptions$1) => Promise<void>;
4572
+ updateElement: (id: string, updates: Partial<index_d_exports$2.PptxElement>) => void;
4573
+ addElement: (element: index_d_exports$2.PptxElement) => string | undefined;
3783
4574
  deleteElements: (ids: string[]) => void;
3784
4575
  duplicateElement: (id: string) => string | undefined;
3785
4576
  getSelectedElementIds: () => string[];
@@ -3804,14 +4595,14 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
3804
4595
  * isn't tracked as a "choice", matching how the Design tab's own gallery
3805
4596
  * already calls this method.
3806
4597
  */
3807
- setTheme(theme: ViewerTheme | undefined): void;
4598
+ setTheme(theme: ViewerTheme$1 | undefined): void;
3808
4599
  applyPresentationTheme(presetId: string): void;
3809
4600
  /** Run the shared WCAG checks against the live deck and show the results. */
3810
4601
  openAccessibility(): void;
3811
4602
  openSettings(tab?: 'general' | 'shortcuts'): void;
3812
4603
  openSetUpSlideShow(): void;
3813
4604
  toggleSubtitles(): void;
3814
- subtitleOptionsStore(): ViewerOptionsStore;
4605
+ subtitleOptionsStore(): import("ooxml-ui/pptx").ViewerOptionsStore;
3815
4606
  openHeaderFooter(): void;
3816
4607
  openCompare(): void;
3817
4608
  openPrintDialog(): void;
@@ -4023,7 +4814,7 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
4023
4814
  * The deck's parsed `ppt/tableStyles.xml` map, for the table properties
4024
4815
  * panel's "Edit style...".
4025
4816
  */
4026
- getTableStyleMap(): ParsedTableStyleMap | undefined;
4817
+ getTableStyleMap(): index_d_exports$2.ParsedTableStyleMap | undefined;
4027
4818
  /** The current theme colour map (scheme key -> hex), for resolving scheme-based table style colours. */
4028
4819
  getThemeColorMap(): Record<string, string> | undefined;
4029
4820
  /**
@@ -4035,8 +4826,8 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
4035
4826
  getRecentPresentationsCount(): number;
4036
4827
  canUndo: () => boolean;
4037
4828
  canRedo: () => boolean;
4038
- save(format?: PptxSaveFormat): Promise<Uint8Array>;
4039
- downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
4829
+ save(format?: index_d_exports$2.PptxSaveFormat): Promise<Uint8Array>;
4830
+ downloadAs(format: index_d_exports$2.PptxSaveFormat, fileName?: string): Promise<void>;
4040
4831
  downloadPptx(fileName?: string): Promise<void>;
4041
4832
  /**
4042
4833
  * Options > Accessibility > "feedback with sound" cue, plus Options > Save >
@@ -4053,8 +4844,8 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
4053
4844
  getSelectedElementId: () => string | null;
4054
4845
  enterPresentation(): Promise<void>;
4055
4846
  exitPresentation(): Promise<void>;
4056
- getRegistry: () => ElementRendererRegistry;
4057
- getHandler: () => PptxHandler | null;
4847
+ getRegistry: () => index_d_exports$1.ElementRendererRegistry;
4848
+ getHandler: () => index_d_exports$2.PptxHandler | null;
4058
4849
  startCollaboration(config: CollaborationConfig): Promise<void>;
4059
4850
  stopCollaboration: () => void;
4060
4851
  getCollaborationStatus: () => ConnectionStatus;
@@ -4075,7 +4866,7 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
4075
4866
  /** The host options with the UI customisation folded in (read on every chrome mount). */
4076
4867
  getChromeOptions(): PptxViewerOptions;
4077
4868
  /** The live resolved UI customisation (every render site reads this). */
4078
- getResolvedCustomization(): ResolvedCustomization;
4869
+ getResolvedCustomization(): ResolvedCustomization$1;
4079
4870
  /** Rebuild the whole chrome (locale switch, customisation change) and re-wire it. */
4080
4871
  private rebuildChrome;
4081
4872
  private remountChrome;
@@ -4087,24 +4878,24 @@ export declare function createPptxViewer(container: HTMLElement, options?: PptxV
4087
4878
  interface CollaborationControllerDeps {
4088
4879
  store: Store<ViewerState>;
4089
4880
  /** Live core handler (owner-role write-back re-serializes through it). */
4090
- getHandler: () => PptxHandler | null;
4881
+ getHandler: () => index_d_exports$2.PptxHandler | null;
4091
4882
  /**
4092
4883
  * Session-level save options (view properties, table styles, tags, deck
4093
4884
  * properties, ...), built the same way as the Save/Export path
4094
4885
  * (`buildDeckSaveOptions`). Without this the elected-writer write-back
4095
4886
  * dropped every session-level edit outside `slides`.
4096
4887
  */
4097
- getSaveOptions?: () => PptxHandlerSaveOptions;
4888
+ getSaveOptions?: () => index_d_exports$2.PptxHandlerSaveOptions;
4098
4889
  /** Enforce the read-only `viewer` role by disabling editing. */
4099
4890
  setEditable: (editable: boolean) => void;
4100
4891
  /** When supplied, apply a session restriction without replacing host edit permission. */
4101
4892
  onReadOnlyChange?: (readOnly: boolean) => void;
4102
4893
  /** Notified on every connection-status transition. */
4103
- onStatusChange?: (status: ConnectionStatus) => void;
4894
+ onStatusChange?: (status: ConnectionStatus$1) => void;
4104
4895
  }
4105
4896
  interface CollaborationController {
4106
4897
  /** Connect and begin syncing. Stops any prior session first. */
4107
- start(config: CollaborationConfig): Promise<void>;
4898
+ start(config: CollaborationConfig$1): Promise<void>;
4108
4899
  /** Disconnect and tear the session down. */
4109
4900
  stop(): void;
4110
4901
  /** Whether a session is currently active. */
@@ -4112,7 +4903,7 @@ interface CollaborationController {
4112
4903
  /** Whether the session's role or host readiness currently blocks editing. */
4113
4904
  isReadOnly(): boolean;
4114
4905
  /** Current connection status. */
4115
- getStatus(): ConnectionStatus;
4906
+ getStatus(): ConnectionStatus$1;
4116
4907
  /** Publish a cursor move (slide-space px); no-op when no session is active. */
4117
4908
  setCursor(x: number, y: number, activeSlideIndex?: number): void;
4118
4909
  /** Publish the local selection; no-op when no session is active. */
@@ -4122,14 +4913,14 @@ interface CollaborationController {
4122
4913
  /** Follow the given peer's active slide, or `null` to stop following. */
4123
4914
  followUser(clientId: number | null): void;
4124
4915
  /** The last config used to start a session (persists after `stop()`, for retry). */
4125
- getConfig(): CollaborationConfig | null;
4916
+ getConfig(): CollaborationConfig$1 | null;
4126
4917
  /**
4127
4918
  * The load pipeline is about to commit a parsed deck to the store: suppress
4128
4919
  * local->doc slide publishing until {@link notifyContentLoaded} runs, so a
4129
4920
  * late joiner's bootstrap deck is never written into the room's doc before
4130
4921
  * the adoption check.
4131
4922
  */
4132
- beginContentLoad(origin: CollabLoadOrigin): void;
4923
+ beginContentLoad(origin: CollabLoadOrigin$1): void;
4133
4924
  /**
4134
4925
  * A content load finished applying to viewer state.
4135
4926
  *
@@ -4139,13 +4930,13 @@ interface CollaborationController {
4139
4930
  * the opposite case - it is what they asked for, so the deferred publish
4140
4931
  * runs and the room adopts it (see `shouldRoomSlidesReplaceLoad`).
4141
4932
  */
4142
- notifyContentLoaded(origin: CollabLoadOrigin): void;
4933
+ notifyContentLoaded(origin: CollabLoadOrigin$1): void;
4143
4934
  /**
4144
4935
  * Interim ("live preview") Y.Doc write channel: publishes in-flight inline
4145
4936
  * editor text that has not reached the store yet, so peers see typing as it
4146
4937
  * happens instead of on commit. Dormant outside a session.
4147
4938
  */
4148
- readonly livePatcher: CollaborationLivePatcher;
4939
+ readonly livePatcher: CollaborationLivePatcher$1;
4149
4940
  /** Stop and release everything (viewer destroy). */
4150
4941
  destroy(): void;
4151
4942
  }
@@ -4177,7 +4968,7 @@ export declare function createCollaborationController(deps: CollaborationControl
4177
4968
  interface CollaborationCursors {
4178
4969
  /** Mount as a sibling of the rendered stage inside the stage wrap. */
4179
4970
  el: HTMLElement;
4180
- update(cursors: readonly RemoteCursor[], scale: number): void;
4971
+ update(cursors: readonly RemoteCursor$1[], scale: number): void;
4181
4972
  destroy(): void;
4182
4973
  }
4183
4974
  export declare function createCollaborationCursors(doc: Document): CollaborationCursors;
@@ -4203,7 +4994,7 @@ export declare function createCollaborationCursors(doc: Document): Collaboration
4203
4994
  interface RemoteSelectionOverlay {
4204
4995
  /** Mount as a sibling of the rendered stage inside the stage wrap. */
4205
4996
  el: HTMLElement;
4206
- update(presences: readonly SanitizedPresence[], elements: readonly PptxElement[], activeSlideIndex: number, scale: number): void;
4997
+ update(presences: readonly SanitizedPresence$1[], elements: readonly index_d_exports$2.PptxElement[], activeSlideIndex: number, scale: number): void;
4207
4998
  destroy(): void;
4208
4999
  }
4209
5000
  //#endregion
@@ -4216,7 +5007,7 @@ interface CollaborationShellOptions extends Pick<CollaborationControllerDeps, 's
4216
5007
  getSourcePending?(): boolean;
4217
5008
  getSourceError?(): boolean;
4218
5009
  getScale?(): number;
4219
- onStateChange?(state: CollaborationShellState): void;
5010
+ onStateChange?(state: CollaborationShellState$1): void;
4220
5011
  }
4221
5012
  interface CollaborationShell {
4222
5013
  /** Existing controller for load boundaries and interim edit publication. */
@@ -4224,8 +5015,8 @@ interface CollaborationShell {
4224
5015
  /** Mount beside the scaled stage; refresh after changing the host's zoom. */
4225
5016
  cursorOverlay: CollaborationCursors;
4226
5017
  selectionOverlay: RemoteSelectionOverlay;
4227
- setConfig(config: CollaborationConfig | undefined): Promise<void>;
4228
- getState(): CollaborationShellState;
5018
+ setConfig(config: CollaborationConfig$1 | undefined): Promise<void>;
5019
+ getState(): CollaborationShellState$1;
4229
5020
  /** Re-evaluate host permission, loading or zoom getters after host-only changes. */
4230
5021
  refresh(): void;
4231
5022
  destroy(): void;
@@ -4233,9 +5024,57 @@ interface CollaborationShell {
4233
5024
  /** Thin custom-chrome wiring; document ownership and sync stay in the controller. */
4234
5025
  export declare function createCollaborationShell(options: CollaborationShellOptions): CollaborationShell;
4235
5026
  //#endregion
5027
+ //#region src/viewer/state-sync.d.ts
5028
+ interface StateSyncDeps {
5029
+ getChrome(): ViewerChrome;
5030
+ renderer: RenderController;
5031
+ callbacks: PptxViewerCallbacks;
5032
+ }
5033
+ /**
5034
+ * Build the store listener that turns {@link ViewerState} transitions into
5035
+ * chrome updates, stage re-renders, and host callbacks. Extracted from
5036
+ * {@link PptxViewer} to keep the class focused on its public API.
5037
+ */
5038
+ declare function createStateSync(deps: StateSyncDeps): StoreListener<ViewerState>;
5039
+ //#endregion
5040
+ //#region src/viewer/theme-apply.d.ts
5041
+ /**
5042
+ * Apply a `ViewerTheme` to the viewer root as inline `--pptx-*` custom
5043
+ * properties (over the stylesheet defaults), removing whatever the previous
5044
+ * theme set. Returns the list of property names now applied, to be passed
5045
+ * back on the next call.
5046
+ */
5047
+ declare function applyThemeVars(root: HTMLElement, theme: ViewerTheme$1 | undefined, previouslyApplied: readonly string[]): string[];
5048
+ //#endregion
5049
+ //#region src/viewer/styles/css.d.ts
5050
+ /** The full stylesheet text (theme-var defaults + chrome rules + editor + collab chrome). */
5051
+ declare function buildViewerCss(): string;
5052
+ //#endregion
4236
5053
  //#region src/viewer/styles/inject.d.ts
5054
+ /**
5055
+ * Inject the viewer stylesheet into a document's `<head>` once (idempotent
5056
+ * per document). Called automatically by `createPptxViewer`; hosts using a
5057
+ * strict CSP without `style-src 'unsafe-inline'` can instead ship the string
5058
+ * from `getViewerCss()` themselves and rely on this being a no-op once a
5059
+ * `#pptx-vanilla-viewer-styles` node exists.
5060
+ */
5061
+ declare function ensureViewerStyles(doc: Document): void;
4237
5062
  /** The complete viewer stylesheet text (for hosts that self-manage CSS). */
4238
5063
  export declare function getViewerCss(): string;
4239
- //#endregion
4240
- export { type AccountAuthConfig, type AutosaveRecord, type AutosaveStatus, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, type BackstageCustomization, CANVAS_CONTEXT_MENU_COMMAND_IDS, type CollabLoadOrigin, type CollaborationConfig, type CollaborationController, type CollaborationControllerDeps, type CollaborationCursors, type CollaborationLivePatcher, type CollaborationRole, type CollaborationShell, type CollaborationShellOptions, type CollaborationShellState, type CollaborationTransport, type ConnectionStatus, type ContextMenuCustomization, type CssStyleMap, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, type EditActions, type ElementRenderContext, type ElementRenderer, type ElementRendererRegistry, type ElementUpdate, type ElementUpdateOptions, type ExportGifOptions, type ExportPdfOptions, type ExportProgress, type ExportVideoOptions, type ExternalCollaborationAwareness, type ExternalCollaborationSession, type ExternalCollaborationSnapshot, type FindReplaceActions, type HostCanvasMenuContext, type HostElementMenuContext, type HostMenuCommand, type InlineEditorSession, type InlineListReadResult, type InlineTextEditSnapshot, type InlineTextSelection, type KeyboardCustomization, type LoadPresentationOptions, type LoadedPresentation, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, type OpenInlineEditorOptions, type OpenPrintWindow, type OptionsCustomization, type OptionsPageId, type OptionsSectionId, type OptionsSettingId, type OptionsSettingValues, type OverlayBox, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, type PptxAiBridge, type PptxAiConfig, type PptxAiConnection, type PptxAiContextStrategy, type PptxAiToolName, type PptxAiWritePolicy, type PptxElement, type PptxElementType, type PptxHandler, type PptxHandlerSaveOptions, type PptxSlide, type PptxViewerCallbacks, type PptxViewerInstance, type PptxViewerOptions, type PptxViewerSource, type PrintOptions, RIBBON_TAB_IDS, type RemoteCursor, type RemoteSelectionOverlay, type ResolvedCustomization, type Ribbon, type RibbonCustomization, type RibbonDesignHandlers, type RibbonDrawHandlers, type RibbonDrawState, type RibbonEditState, type RibbonFileHandlers, type RibbonHandlers, type RibbonInsertHandlers, type RibbonNavHandlers, type RibbonNavState, type RibbonPrimaryHandlers, type RibbonSelectionState, type RibbonSlideShowHandlers, type RibbonTabId, type SanitizedPresence, type SavedPresentationFormat, type SessionDeck, type ShortcutChord, type SlideStageOptions, type Store, type SvgExportOptions, TOOLBAR_BUTTON_IDS, type ToolbarActionId, type TranslationKey, type TranslationMessages, type Translator, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, type ViewerCustomization, type ViewerCustomizationApi, type ViewerDialogId, type ViewerExportFormatId, type ViewerFeatureId, type ViewerPanelId, type ViewerState, type ViewerTheme, type ViewerThemeColors, type ViewportFitOptions, type ViewportFitPadding, type ZoomLevel, buildInlineTextCommitPatch, canInteractWithElement, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, forgetSessionDeck, getSessionTabId, isLegacyBinaryPresentation, isSupportedPresentationFile, loadPresentationDeck, loadSessionDeck, overlayInlineTextSnapshot, parsePresentationSessionId, presentationBaseName, rememberSessionDeck, restoreSessionDeck, savedPresentationFileName, themeToCssVars, vermilionDarkTheme, vermilionLightTheme };
5064
+ declare namespace index_d_exports {
5065
+ export { AccessibilityPanel, AutosaveController, AutosaveRecord, AutosaveStatus, ButtonHandle, ChromeOptions, CollaborationConfig, CollaborationController, CollaborationRole, CollaborationTransport, ColorControlHandle, ConnectionStatus, ContextMenuAiHooks, ContextMenuCommandDeps, ContextMenuTableTarget, DEFAULT_RIBBON_TAB, DrawTool, DropdownHandle, DropdownItem, DropdownOptions, EditActions, ElementContextMenu, ElementContextMenuDeps, ExportCaptureDeps, ExportController, ExportControllerDeps, ExportGifOptions, ExportLifecycle, ExportLifecycleDeps, ExportPdfOptions, ExportProgress, ExportProgressModal, ExportProgressModalDeps, ExportProgressUi, ExportProgressUiDeps, ExportVideoDeps, ExportVideoOptions, FindReplaceActions, FindReplacePanel, IconName, Inspector, InspectorHandlers, InspectorState, KeyboardHandlers, LoadPresentationOptions, LoadedPresentation, MasterViewSidebar, MasterViewSidebarOptions, MobileActionSheets, MobileToolbar, MobileToolbarHandlers, NotesPanel, NotesPanelUpdate, NumberFieldHandle, OFFICE_STANDARD_SWATCHES, OpenPrintWindow, PptxViewer, PptxViewerCallbacks, PptxViewerInstance, PptxViewerOptions, PptxViewerSource, PresentationContextMenu, PresentationContextMenuDeps, PresentationController, PresentationToolbar, PresentationToolbarHandlers, PresentationToolbarState, PresentationTouchControls, PrintOptions, ProtectedViewBanner, RIBBON_TABS, RasterizeSlide, RasterizeSlideController, RasterizeSlideDeps, RasterizeSlideToRaster, RasterizeSlideToTiles, RenderController, RenderControllerDeps, Ribbon, RibbonDesignHandlers, RibbonDrawHandlers, RibbonDrawState, RibbonEditState, RibbonFileHandlers, RibbonHandlers, RibbonInsertHandlers, RibbonNavHandlers, RibbonNavState, RibbonPrimaryHandlers, RibbonSelectionState, RibbonSlideShowHandlers, RibbonTabBar, RibbonTabDef, RibbonTabId, RulerSelection, RulerStrips, RulerStripsState, ShortcutPanel, StateSyncDeps, Store, StoreListener, index_d_exports$2.SvgExportOptions as SvgExportOptions, SwatchPickerHandle, SwatchPickerOptions, ThumbnailRail, TouchGestureHandlers, TranslationMessages, Translator, ViewerChrome, ViewerExportApi, ViewerExportHost, ViewerState, ZoomLevel, applyThemeVars, attachKeyboardNavigation, attachTouchGestures, buildViewerChrome, buildViewerCss, clampSlideIndex, createAccessibilityPanel, createAutosaveController, createCollaborationController, createExportController, createExportLifecycle, createExportProgressModal, createExportProgressUi, createFindReplacePanel, createIcon, createInitialViewerState, createInspector, createMasterViewSidebar, createMobileActionSheets, createMobileToolbar, createNotesPanel, createPptxViewer, createPresentationController, createPresentationToolbar, createPresentationTouchControls, createProtectedViewBanner, createRasterizeSlide, createRenderController, createRibbon, createRibbonTabBar, createRulerStrips, createShortcutPanel, createStateSync, createStore, createThumbnailRail, createTranslator, ensureViewerStyles, exportAllSlidesToSvg, exportSlideToSvg, getViewerCss, isRibbonTab, loadPresentation, makeButton, makeColorControl, makeDropdown, makeNumberField, makeSwatchPicker, mountElementContextMenu, mountPresentationContextMenu, readTableCellTarget, renderToCanvas, resolveSourceToBuffer, resolveTableTarget, revokeBlobUrls, runContextMenuCommand, runGifExport, runPrint, runVideoExport };
5066
+ }
5067
+ type CssStyleMap = index_d_exports$1.CssStyleMap;
5068
+ type ElementRenderContext = index_d_exports$1.ElementRenderContext;
5069
+ type ElementRenderer = index_d_exports$1.ElementRenderer;
5070
+ type ElementRendererRegistry = index_d_exports$1.ElementRendererRegistry;
5071
+ type PptxElementType = index_d_exports$1.PptxElementType;
5072
+ type SlideStageOptions = index_d_exports$1.SlideStageOptions;
5073
+ type applyStyleMap = index_d_exports$1.applyStyleMap;
5074
+ type createDefaultRegistry = index_d_exports$1.createDefaultRegistry;
5075
+ type createEl = index_d_exports$1.createEl;
5076
+ type createElementRendererRegistry = index_d_exports$1.createElementRendererRegistry;
5077
+ type createSvgEl = index_d_exports$1.createSvgEl;
5078
+ type renderSlideStage = index_d_exports$1.renderSlideStage;
5079
+ export { type AccountAuthConfig, type AutosaveRecord, type AutosaveStatus, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, type BackstageCustomization, CANVAS_CONTEXT_MENU_COMMAND_IDS, type CollabLoadOrigin, type CollaborationConfig, type CollaborationController, type CollaborationControllerDeps, type CollaborationCursors, type CollaborationLivePatcher, type CollaborationRole, type CollaborationShell, type CollaborationShellOptions, type CollaborationShellState, type CollaborationTransport, type ConnectionStatus, type ContextMenuCustomization, type CssStyleMap, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, type EditActions, type ElementRenderContext, type ElementRenderer, type ElementRendererRegistry, type ElementUpdate, type ElementUpdateOptions, type ExportGifOptions, type ExportPdfOptions, type ExportProgress, type ExportVideoOptions, type ExternalCollaborationAwareness, type ExternalCollaborationSession, type ExternalCollaborationSnapshot, type FindReplaceActions, type HostCanvasMenuContext, type HostElementMenuContext, type HostMenuCommand, type InlineEditorSession, type InlineListReadResult, type InlineTextEditSnapshot, type InlineTextSelection, type KeyboardCustomization, type LoadPresentationOptions, type LoadedPresentation, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, type OpenInlineEditorOptions, type OpenPrintWindow, type OptionsCustomization, type OptionsPageId, type OptionsSectionId, type OptionsSettingId, type OptionsSettingValues, type OverlayBox, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, type PptxAiBridge, type PptxAiConfig, type PptxAiConnection, type PptxAiContextStrategy, type PptxAiToolName, type PptxAiWritePolicy, type PptxElement, type PptxElementType, type PptxHandler, type PptxHandlerSaveOptions, type PptxSlide, type PptxViewerCallbacks, type PptxViewerInstance, type PptxViewerOptions, type PptxViewerSource, type PrintOptions, RIBBON_TAB_IDS, type RemoteCursor, type RemoteSelectionOverlay, type ResolvedCustomization, type Ribbon, type RibbonCustomization, type RibbonDesignHandlers, type RibbonDrawHandlers, type RibbonDrawState, type RibbonEditState, type RibbonFileHandlers, type RibbonHandlers, type RibbonInsertHandlers, type RibbonNavHandlers, type RibbonNavState, type RibbonPrimaryHandlers, type RibbonSelectionState, type RibbonSlideShowHandlers, type RibbonTabId, type SanitizedPresence, type SavedPresentationFormat, type SessionDeck, type ShortcutChord, type SlideStageOptions, type Store, type SvgExportOptions, TOOLBAR_BUTTON_IDS, type ToolbarActionId, type TranslationKey, type TranslationMessages, type Translator, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, type ViewerCustomization, type ViewerCustomizationApi, type ViewerDialogId, type ViewerExportFormatId, type ViewerFeatureId, type ViewerPanelId, type ViewerState, type ViewerTheme, type ViewerThemeColors, type ViewportFitOptions, type ViewportFitPadding, type ZoomLevel, applyStyleMap, buildInlineTextCommitPatch, canInteractWithElement, createDefaultRegistry, createEl, createElementRendererRegistry, createImageElementFromFile, createSvgEl, createTranslator, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, forgetSessionDeck, getSessionTabId, isLegacyBinaryPresentation, isSupportedPresentationFile, keyToLabel, loadPresentation, loadPresentationDeck, loadSessionDeck, overlayInlineTextSnapshot, parsePresentationSessionId, presentationBaseName, rememberSessionDeck, renderSlideStage, restoreSessionDeck, revokeBlobUrls, savedPresentationFileName, themeToCssVars, translationsEn, vermilionDarkTheme, vermilionLightTheme };
4241
5080
  //# sourceMappingURL=index.d.ts.map