pptx-vanilla-viewer 3.25.0 → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/{UTIF-GZSKTRT6.js → UTIF-LQ75PLTK.js} +1 -1
  3. package/dist/{UTIF-5QV6J4EO.cjs → UTIF-MJZNLSN4.cjs} +1 -1
  4. package/dist/ai-panel-46TOQGQI.cjs +1 -0
  5. package/dist/ai-panel-FTFSUVYC.js +1 -0
  6. package/dist/chunk-7J6FCEU4.js +1 -0
  7. package/dist/chunk-AN54O4IH.cjs +2 -0
  8. package/dist/chunk-G63ICTFC.cjs +4 -0
  9. package/dist/chunk-IMYWC6IV.js +4 -0
  10. package/dist/chunk-RLZ2DLYI.js +2 -0
  11. package/dist/chunk-Y4U22O3R.cjs +1 -0
  12. package/dist/i18n/de.cjs +1 -0
  13. package/dist/i18n/de.mjs +1 -0
  14. package/dist/i18n/es.cjs +1 -0
  15. package/dist/i18n/es.mjs +1 -0
  16. package/dist/i18n/fr.cjs +1 -0
  17. package/dist/i18n/fr.mjs +1 -0
  18. package/dist/i18n/zh-CN.cjs +1 -0
  19. package/dist/i18n/zh-CN.mjs +1 -0
  20. package/dist/index.cjs +594 -69
  21. package/dist/index.d.ts +1657 -817
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +594 -69
  24. package/dist/internals.cjs +1 -1
  25. package/dist/internals.d.ts +2 -1
  26. package/dist/internals.js +1 -1
  27. package/dist/{transition-overlay-D7asQvRY.d.ts → transition-overlay-CxqDHlcC.d.ts} +9554 -13466
  28. package/dist/transition-overlay-CxqDHlcC.d.ts.map +1 -0
  29. package/package.json +5 -6
  30. package/dist/ai-panel-DDUION4P.js +0 -1
  31. package/dist/ai-panel-LXTLJNO3.cjs +0 -1
  32. package/dist/chunk-3AUE6LVL.js +0 -3874
  33. package/dist/chunk-4X3RQDZK.js +0 -4
  34. package/dist/chunk-A7J5UORL.cjs +0 -4
  35. package/dist/chunk-DMNHV7UN.js +0 -157
  36. package/dist/chunk-DSJNVDWS.cjs +0 -1
  37. package/dist/chunk-FSRPMVAS.js +0 -1
  38. package/dist/chunk-NN4SKHOD.cjs +0 -3874
  39. package/dist/chunk-S5WTFNOE.cjs +0 -157
  40. package/dist/transition-overlay-D7asQvRY.d.ts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,57 +1,9 @@
1
- import { $ as InlineTextSelection, $n as ViewerThemeColors, $r as PptxTableCellStyle, $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 PptxSmartArtNodeStyle, 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 PptxSmartArtData, Zt as SlideTemplateId, _ as CollabLoadOrigin, _i as PptxThemeColorRef, _n as ViewerMode, _r as ParsedTableStyleMap, _t as PPTX_OPEN_ACCEPT, a as AutosaveRecord, ai as PptxThemeFontScheme, 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 PptxViewProperties, cn as VIEWER_FEATURE_IDS, cr as PptxHandler, ct as OPTIONS_SETTING_IDS, d as CANVAS_CONTEXT_MENU_COMMAND_IDS, di as SmartArtLayout, dn as ViewerCustomizationApi, dr as SvgExportOptions, dt as OptionsSectionId, ei as PptxTableData, en as TOOLBAR_BUTTON_IDS, er as defaultCssVars, et as InsertChartKind, fi as SmartArtLayoutType, 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 PptxThemeColorScheme, 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 ShapeStyle, 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 PptxTextStyleLevels, nn as TextAdvancedChanges, nr as defaultThemeColors, nt as MasterViewCrudAction, o as BACKSTAGE_CARD_IDS, oi as PptxThemeOption, on as VIEWER_DIALOG_IDS, or as AccessibilityIssue, ot as OPTIONS_PAGE_IDS, p as CanvasContextMenuCommandId, pi as TablePptxElement, pn as ViewerDialogId, pr as MasterViewTab, pt as OptionsSettingValues, q as HostCanvasMenuContext, qr as PptxSection, qt as ShareDefaults, r as AccountAuthConfig, ri as PptxTheme, rn as ToolbarActionId, rr as themeToCssVars, rt as MasterViewCrudActionId, s as BACKSTAGE_PAGE_IDS, si as PptxTransitionType, sn as VIEWER_EXPORT_FORMAT_IDS, sr as MergeShapeOperation, st as OPTIONS_SECTION_IDS, ti as PptxTagCollection, tr as defaultRadius, tt as KeyboardCustomization, u as BackstagePage, ui as SmartArtColorScheme, 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-D7asQvRY.js";
2
- import { ChatTransport, LanguageModel, ToolSet, UIMessage } from "ai";
3
- import "pptx-viewer-mcp";
1
+ import { $ as PptxThemeOption, A as PptxCustomShow, B as PptxModifyVerifier, C as PptxAppProperties, D as PptxCommentMention, E as PptxCommentAuthor, F as PptxHandoutMaster, G as PptxSlideMaster, H as PptxPresentationProperties, I as PptxHeaderFooter, J as PptxTableData, K as PptxSlideTransition, L as PptxImageEffects, M as PptxElement, N as PptxElementAnimation, O as PptxCoreProperties, P as PptxEmbeddedFont, Q as PptxThemeFontScheme, R as PptxLayoutPreview, S as PptxAnimationTrigger, T as PptxComment, U as PptxSection, V as PptxNotesMaster, W as PptxSlide, X as PptxTextStyleLevels, Y as PptxTagCollection, Z as PptxThemeColorScheme, _ as PptxAnimationPreset, a as PptxHandler, at as PptxSmartArtNodeStyle, b as PptxAnimationTimelineAnchor, c as SvgExportOptions, ct as SmartArtLayoutType, d as MediaPptxElement, dt as XmlObject, et as PptxTransitionType, f as OleObjectType, ft as PptxThemeColorRef, g as PptxAnimationDirection, h as PptxAfterAnimationAction, i as MergeShapeOperation, it as PptxSmartArtData, j as PptxData, k as PptxCustomProperty, l as ElementAction, lt as TextSegment, m as ParsedTableStyleMap, nt as ShapeStyle, o as PptxHandlerSaveOptions, ot as SmartArtColorScheme, p as OlePptxElement, q as PptxTableCellStyle, r as AccessibilityIssue, rt as TablePptxElement, s as PptxSaveFormat, st as SmartArtLayout, tt as PptxViewProperties, u as MasterViewTab, ut as TextStyle, v as PptxAnimationRepeatMode, w as PptxChartData, x as PptxAnimationTimingCurve, y as PptxAnimationSequence, z as PptxModernCommentAuthor } from "./transition-overlay-CxqDHlcC.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
7
  //#endregion
56
8
  //#region src/viewer/state/store.d.ts
57
9
  /**
@@ -73,347 +25,7 @@ interface Store<T extends object> {
73
25
  subscribe(listener: StoreListener<T>): () => void;
74
26
  }
75
27
  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;
28
+ import * as import_ooxml_ui_pptx_dom from "ooxml-ui/pptx/dom";
417
29
  //#endregion
418
30
  //#region src/viewer/state/viewer-state.d.ts
419
31
  /** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
@@ -607,13 +219,13 @@ interface ViewerState {
607
219
  column: number;
608
220
  }>;
609
221
  /** Active rich-text range captured from the inline editor. */
610
- selectedTextRange: InlineTextSelection | null;
222
+ selectedTextRange: InlineTextSelection$1 | null;
611
223
  /**
612
224
  * On-canvas chart part selection (a clicked bar/dot/slice/series line),
613
225
  * surfaced to the chart inspector's data grid + point-index picker. Cleared
614
226
  * whenever the general element selection changes (see `selectionState`).
615
227
  */
616
- chartPartSelection: ChartPartSelection | null;
228
+ chartPartSelection: index_d_exports$1.ChartPartSelection | null;
617
229
  /** Source element id while the one-shot Format Painter is armed. */
618
230
  formatPainterSourceId: string | null;
619
231
  /** When true, selection and element mutations target inherited template elements. */
@@ -633,9 +245,9 @@ interface ViewerState {
633
245
  /** True when the right-hand property inspector panel is shown (editing chrome). */
634
246
  inspectorOpen: boolean;
635
247
  /** Remote collaborators currently in the session (empty when not collaborating). */
636
- remotePresences: SanitizedPresence[];
248
+ remotePresences: SanitizedPresence$1[];
637
249
  /** Remote cursors visible on the current slide, projected from `remotePresences`. */
638
- cursors: RemoteCursor[];
250
+ cursors: RemoteCursor$1[];
639
251
  /** Client id of the peer the local user is following, or null when free. */
640
252
  followedClientId: number | null;
641
253
  /** In-memory clipboard payload from the last copy/cut, or null. */
@@ -725,6 +337,8 @@ interface ViewerState {
725
337
  runProgramNotices: RunProgramNotice[];
726
338
  }
727
339
  export declare function createInitialViewerState(): ViewerState;
340
+ /** Clamp a slide index into the valid range for the given slide count. */
341
+ declare function clampSlideIndex(index: number, slideCount: number): number;
728
342
  //#endregion
729
343
  //#region src/viewer/editor/editor-animation-actions.d.ts
730
344
  /**
@@ -1033,7 +647,7 @@ interface InspectorActions {
1033
647
  setTextWrap(wrap: NonNullable<TextStyle['textWrap']>): void;
1034
648
  setAutoFitMode(mode: NonNullable<TextStyle['autoFitMode']>): void;
1035
649
  setTextAdvanced(patch: TextAdvancedChanges): void;
1036
- setTextStyle(patch: Partial<TextStyle>, selection?: InlineTextSelection | null): void;
650
+ setTextStyle(patch: Partial<TextStyle>, selection?: InlineTextSelection$1 | null): void;
1037
651
  setFillOpacity(opacity: number): void;
1038
652
  setStrokeOpacity(opacity: number): void;
1039
653
  setGradientFill(state: GradientState): void;
@@ -1308,8 +922,209 @@ interface AccessibilityPanel {
1308
922
  open(issues: readonly AccessibilityIssue[]): void;
1309
923
  close(): void;
1310
924
  }
925
+ /**
926
+ * A keyboard-accessible, live accessibility checker result panel. It is kept
927
+ * separate from the element inspector so it remains useful in read-only mode,
928
+ * while the View ribbon is its discoverable entry point.
929
+ */
930
+ declare function createAccessibilityPanel(doc: Document, t: Translator, onSelectSlide: (index: number) => void): AccessibilityPanel;
1311
931
  //#endregion
1312
932
  //#region src/viewer/ui/inspector/types.d.ts
933
+ /**
934
+ * The inspector edit actions: universal geometry + flat fill/stroke, plus the
935
+ * element-type-aware sections (text anchor/wrap/autofit, gradient fill +
936
+ * opacity, image adjustments/crop, table-level flags + padding).
937
+ */
938
+ interface InspectorHandlers {
939
+ /** Select an element from the Elements (layer-order) tab. */
940
+ selectElement(id: string): void;
941
+ /** Open the full Document Properties dialog from the Properties tab. */
942
+ openDocumentProperties(): void;
943
+ /**
944
+ * File > Options > Advanced > "Properties follow chart data point for
945
+ * current workbook", read fresh on every chart category removal.
946
+ */
947
+ getChartFollowDataPoint(): boolean;
948
+ /** Merge a patch into the presentation show/print settings (PRESENTATION card). */
949
+ updatePresentationSettings(patch: Partial<PptxPresentationProperties>): void;
950
+ /** Apply a packaged theme part by archive path (THEME card). */
951
+ applyThemeByPath(themePath: string, allMasters: boolean): void;
952
+ /** Re-theme the deck from the THEME EDITOR card's staged colours/fonts/name. */
953
+ applyThemeEdit(payload: {
954
+ colorScheme: PptxThemeColorScheme;
955
+ fontScheme: PptxThemeFontScheme;
956
+ name: string;
957
+ }): void | Promise<void>;
958
+ /** Replace the deck's `ppt/tags/*.xml` collections (TAGS card). */
959
+ updateTagCollections(next: PptxTagCollection[]): void;
960
+ /**
961
+ * The deck's parsed `ppt/tableStyles.xml` map, for the table properties
962
+ * panel's "Edit style...". `undefined` means the host has not wired the
963
+ * table-style-editor feature through; the button then simply does not render.
964
+ */
965
+ getTableStyleMap(): ParsedTableStyleMap | undefined;
966
+ /** The current theme colour map (scheme key -> hex), for resolving scheme-based table style colours. */
967
+ getThemeColorMap(): Record<string, string> | undefined;
968
+ /** Commit a full replacement style map (section edit, create, or delete already applied). */
969
+ updateTableStyleMap(nextMap: ParsedTableStyleMap): void;
970
+ /** Record a styleId for save-time removal from `ppt/tableStyles.xml`. */
971
+ deleteTableStyle(styleId: string): void;
972
+ /** Patch the active slide (THEME OVERRIDE card). */
973
+ updateActiveSlide(patch: Partial<PptxSlide>): void;
974
+ /**
975
+ * Set a layout/master's background colour (SLIDE BACKGROUND card's
976
+ * template rows, shown while `editTemplateMode` is on). Master Views
977
+ * covers the same ground but requires leaving the slide.
978
+ */
979
+ setTemplateBackground(path: string, backgroundColor: string): void;
980
+ /** Read a layout/master's current background colour. */
981
+ getTemplateBackgroundColor(path: string): string | undefined;
982
+ /** Resize the slide canvas (the SLIDE SIZE card's raw W/H inputs). */
983
+ updateCanvasSize(size: {
984
+ width: number;
985
+ height: number;
986
+ }): void;
987
+ /**
988
+ * Adopt an EMU slide size (SLIDE SIZE preset dropdown / orientation toggle).
989
+ * Writes both the EMU state and the pixel canvas.
990
+ */
991
+ updateSlideSize(size: SlideSizeEmu): void;
992
+ /**
993
+ * Adopt an EMU slide size AND rescale every slide's content for it in one
994
+ * undoable step (the "Scale content for the new slide size?" prompt shown
995
+ * when the deck has content and the new size differs from the current one).
996
+ */
997
+ applySlideSizeRescale(size: SlideSizeEmu, mode: SlideSizeRescaleMode): void;
998
+ /** Add a comment on the current slide (Comments tab). */
999
+ addComment(text: string, mentions?: PptxCommentMention[]): void;
1000
+ /** Append a reply under a top-level comment (Comments tab reply form). */
1001
+ addCommentReply(parentId: string, text: string, mentions?: PptxCommentMention[]): void;
1002
+ /** Replace a comment's (or reply's) text (Comments tab edit-in-place). */
1003
+ editComment(id: string, text: string): void;
1004
+ deleteComment(id: string): void;
1005
+ toggleCommentResolved(id: string): void;
1006
+ /** Set/clear one effect bucket on the selected element (docked Animation panel). */
1007
+ setAnimationEffect(group: AnimationGroup, preset: PptxAnimationPreset | 'none'): void;
1008
+ /** Apply/clear a catalogue motion path by preset id (`'none'` clears it). */
1009
+ applyMotionPath(presetId: string): void;
1010
+ /** Patch timing/effect options on one element's animation entry. */
1011
+ setAnimationTiming(elementId: string, patch: AnimationTimingPatch): void;
1012
+ /** Stage a picked effect sound file, or clear it entirely (`undefined`). */
1013
+ setAnimationSound(elementId: string, pick: {
1014
+ dataUrl: string;
1015
+ fileName?: string;
1016
+ } | undefined): void;
1017
+ /** Stage one of PowerPoint's 19 built-in stock sounds by catalogue id. */
1018
+ setAnimationStockSound(elementId: string, catalogueId: string): void;
1019
+ /** Move an element's animation one step in the slide play order. */
1020
+ reorderAnimation(elementId: string, direction: 'up' | 'down'): void;
1021
+ setGeometry(patch: GeometryPatch): void;
1022
+ /** Flip the selected element's lock (see elementLockTogglePatch). */
1023
+ toggleElementLock(): void;
1024
+ /**
1025
+ * Set the shape fill colour. Pass `ref` for a theme-swatch pick (wins on
1026
+ * save, so the fill follows a later theme change); omit it to clear a
1027
+ * previously-stored ref for a plain/custom/recent pick.
1028
+ */
1029
+ setShapeFill(color: string, ref?: PptxThemeColorRef): void;
1030
+ /** Same `ref` contract as {@link setShapeFill}, for the stroke colour. */
1031
+ setShapeStroke(color: string, ref?: PptxThemeColorRef): void;
1032
+ setShapeStrokeWidth(width: number): void;
1033
+ setShapeStyle(patch: Partial<ShapeStyle>): void;
1034
+ setShapeType(shapeType: string): void;
1035
+ /**
1036
+ * B6: fold a colour into the deck's "Recent colours" (`p:clrMru`) MRU list,
1037
+ * without touching the selected element. Every inspector colour input that
1038
+ * has no dedicated recent-colours row of its own (chart/table/image/
1039
+ * SmartArt/text-effects colours, gradient stops, pattern fill) calls this
1040
+ * on COMMIT (native `change`, never the continuous `input` event a drag
1041
+ * through the OS picker fires) so the deck's MRU list still grows even
1042
+ * though there is nowhere on screen to show it going in.
1043
+ */
1044
+ pushRecentColor(hex: string): void;
1045
+ setTextVerticalAlign(vAlign: InspectorState['vAlign']): void;
1046
+ setTextWrap(wrap: InspectorState['textWrap']): void;
1047
+ setAutoFitMode(mode: InspectorState['autoFitMode']): void;
1048
+ setTextAdvanced(patch: TextAdvancedChanges): void;
1049
+ setTextStyle(patch: Partial<TextStyle>, selection?: InlineTextSelection$1 | null): void;
1050
+ setFillOpacity(opacity: number): void;
1051
+ setStrokeOpacity(opacity: number): void;
1052
+ setGradientFill(state: GradientState): void;
1053
+ addGradientStop(color: string, position: number): void;
1054
+ removeGradientStop(index: number): void;
1055
+ updateGradientStop(index: number, changes: Partial<GradientState['stops'][number]>): void;
1056
+ setImageBrightness(value: number): void;
1057
+ setImageContrast(value: number): void;
1058
+ setImageSaturation(value: number): void;
1059
+ setImageCrop(edge: 'left' | 'top' | 'right' | 'bottom', value: number): void;
1060
+ setImageEffects(patch: Partial<PptxImageEffects>): void;
1061
+ replaceImage(): void;
1062
+ resetImage(): void;
1063
+ resetCrop(): void;
1064
+ setElementAction(trigger: 'click' | 'hover', action: ElementAction): void;
1065
+ /** Set the selected element's accessibility description (Alt Text field). */
1066
+ setAltText(text: string): void;
1067
+ /**
1068
+ * Set the selected element's accessibility title (`p:cNvPr/@title`).
1069
+ * Applies to a plain shape/text box/connector and every graphic-frame
1070
+ * kind (table/chart/smartArt/ole/media), not a picture (which has no
1071
+ * title field). See {@link PptxNonVisualDescription}.
1072
+ */
1073
+ setTitle(text: string): void;
1074
+ /**
1075
+ * Set the selected OLE element's Object Name (`p:oleObj/@name`, ECMA-376
1076
+ * SS13.3.4). A browser cannot run the native application an embedded OLE
1077
+ * object belongs to, so the object stays read-only; this name already
1078
+ * parses, saves, and syncs via collaboration and only lacked an editing
1079
+ * surface.
1080
+ */
1081
+ setOleName(name: string): void;
1082
+ /**
1083
+ * Patch an in-place OLE content edit (spreadsheet cell / document
1084
+ * paragraph / nested-deck slide title / Replace File) onto the selected
1085
+ * element. Callers pass `buildOleContentUpdatePatch`'s output, which
1086
+ * already scopes the patch to the fields a content edit can touch.
1087
+ */
1088
+ setOleContent(patch: Partial<OlePptxElement>): void;
1089
+ setChartData(data: PptxChartData): void;
1090
+ setMediaProperties(patch: Partial<MediaPptxElement>): void;
1091
+ setTableHeaderRow(enabled: boolean): void;
1092
+ setTableBandedRows(enabled: boolean): void;
1093
+ setTableCellPadding(padding: number): void;
1094
+ setTableOptions(patch: Partial<PptxTableData>, cellStyle?: Partial<PptxTableCellStyle>): void;
1095
+ /**
1096
+ * Replace the selected table's whole `tableData` (inspector data grid).
1097
+ *
1098
+ * `setTableOptions` cannot serve here: it re-applies the element's existing
1099
+ * rows after the patch, so a row/cell change made through it is discarded.
1100
+ */
1101
+ /**
1102
+ * Replace the selected table's whole `tableData`, plus the graphic-frame
1103
+ * `rawXml` the renderer and save writer actually read for a table parsed from
1104
+ * a real deck (a `tableData`-only patch is invisible on such tables).
1105
+ */
1106
+ setTableData(data: PptxTableData, rawXml?: XmlObject): void;
1107
+ setTableCellStyle(row: number, column: number, patch: Partial<PptxTableCellStyle>): void;
1108
+ setTableCellStyles(cells: TableCellPosition[], patch: Partial<PptxTableCellStyle>): void;
1109
+ mutateTableStructure(cell: TableCellPosition, action: TableStructureAction): void;
1110
+ setTableColumnWidth(column: number, percent: number): void;
1111
+ setTableRowHeight(row: number, height: number): void;
1112
+ mergeTableCells(cells: TableCellPosition[]): void;
1113
+ splitTableCell(cell: TableCellPosition): void;
1114
+ setSmartArtNodeText(nodeId: string, text: string): void;
1115
+ setSmartArtNodeStyle(nodeId: string, patch: Partial<PptxSmartArtNodeStyle>): void;
1116
+ mutateSmartArtNode(nodeId: string, action: 'add' | 'addChild' | 'remove' | 'promote' | 'demote'): void;
1117
+ /**
1118
+ * Commit a whole replacement `smartArtData`, reflowed and history-integrated
1119
+ * like every other SmartArt mutation. Used by the text pane's Tab / Enter /
1120
+ * Backspace keyboard handling, which computes the next data (and, for
1121
+ * add/remove, the node to focus next) via the shared `smartart-node-pane-
1122
+ * handlers` builders before committing.
1123
+ */
1124
+ replaceSmartArtData(data: PptxSmartArtData): void;
1125
+ setSmartArtLayout(layout: SmartArtLayoutType): void;
1126
+ setSmartArtColorScheme(scheme: SmartArtColorScheme): void;
1127
+ }
1313
1128
  /** Selection-derived state the inspector reflects, computed by `buildInspectorState`. */
1314
1129
  interface InspectorState {
1315
1130
  hasSelection: boolean;
@@ -1375,7 +1190,7 @@ interface InspectorState {
1375
1190
  textDirection: 'horizontal' | 'vertical' | 'vertical270' | 'eaVert' | 'wordArtVert' | 'wordArtVertRtl' | 'mongolianVert';
1376
1191
  textRtl: boolean;
1377
1192
  textStyle: TextStyle | undefined;
1378
- selectedTextRange: InlineTextSelection | null;
1193
+ selectedTextRange: InlineTextSelection$1 | null;
1379
1194
  imageBrightness: number;
1380
1195
  imageContrast: number;
1381
1196
  imageSaturation: number;
@@ -1524,6 +1339,18 @@ interface Inspector {
1524
1339
  setEditable(editable: boolean): void;
1525
1340
  }
1526
1341
  //#endregion
1342
+ //#region src/viewer/ui/inspector/inspector.d.ts
1343
+ /**
1344
+ * The property inspector: a right-hand panel with React's three-tab strip
1345
+ * (Elements | Properties | Comments). The Properties tab shows the
1346
+ * element-type-aware sections when something is selected and a deck-level
1347
+ * panel (presentation / slide size / document) otherwise; Elements lists the
1348
+ * slide's layer order; Comments carries the slide's review comments. Vanilla
1349
+ * counterpart of React's `InspectorPane`, scoped to the highest-traffic
1350
+ * panels. All labels from the shared `pptx.*` dictionary.
1351
+ */
1352
+ declare function createInspector(doc: Document, t: Translator, handlers: InspectorHandlers): Inspector;
1353
+ //#endregion
1527
1354
  //#region src/viewer/ui/master-view-sidebar.d.ts
1528
1355
  interface MasterViewSidebarOptions {
1529
1356
  tab: MasterViewTab;
@@ -1563,6 +1390,7 @@ interface MasterViewSidebar {
1563
1390
  render(options: MasterViewSidebarOptions): void;
1564
1391
  setVisible(visible: boolean): void;
1565
1392
  }
1393
+ declare function createMasterViewSidebar(doc: Document, t: Translator): MasterViewSidebar;
1566
1394
  //#endregion
1567
1395
  //#region src/viewer/ui/ribbon/ribbon-types.d.ts
1568
1396
  /** Ribbon tab identifiers this wave implements (see `ribbon-tabs.ts` for the full future roster). */
@@ -1581,7 +1409,7 @@ interface RibbonNavHandlers {
1581
1409
  openAccessibility(): void;
1582
1410
  openSettings(tab?: 'general' | 'shortcuts'): void;
1583
1411
  /** The host's resolved UI customisation (omitted: nothing customised). */
1584
- getCustomization?(): ResolvedCustomization;
1412
+ getCustomization?(): ResolvedCustomization$1;
1585
1413
  openHeaderFooter(): void;
1586
1414
  openCompare(): void;
1587
1415
  openSelectionPane(): void;
@@ -1620,7 +1448,7 @@ interface RibbonFileHandlers {
1620
1448
  createPresentation(templateId: string): void;
1621
1449
  openSettings(): void;
1622
1450
  /** The host's resolved UI customisation (omitted: nothing customised). */
1623
- getCustomization?(): ResolvedCustomization;
1451
+ getCustomization?(): ResolvedCustomization$1;
1624
1452
  openShare(): void;
1625
1453
  openDocumentProperties(): void;
1626
1454
  openFontEmbedding(): void;
@@ -1849,8 +1677,16 @@ interface MobileActionSheets {
1849
1677
  setEditable(editable: boolean): void;
1850
1678
  setNotesExpanded(expanded: boolean): void;
1851
1679
  }
1680
+ declare function createMobileActionSheets(doc: Document, t: Translator, handlers: RibbonHandlers, onSelectSlide: (index: number) => void, inspector: HTMLElement | null, hiddenActions?: readonly ToolbarActionId$1[]): MobileActionSheets;
1852
1681
  //#endregion
1853
1682
  //#region src/viewer/ui/mobile-toolbar.d.ts
1683
+ interface MobileToolbarHandlers {
1684
+ openMenu(): void;
1685
+ undo(): void;
1686
+ redo(): void;
1687
+ save(): void;
1688
+ present(): void;
1689
+ }
1854
1690
  interface MobileToolbar {
1855
1691
  el: HTMLElement;
1856
1692
  collaborationHost: HTMLElement;
@@ -1864,6 +1700,16 @@ interface MobileToolbar {
1864
1700
  aiHost: HTMLElement;
1865
1701
  setEditState(state: RibbonEditState): void;
1866
1702
  }
1703
+ /**
1704
+ * Compact phone toolbar matching React's menu/edit/save/present action row. A
1705
+ * thin adapter over the shared `pptx-ui-mobile-toolbar`, which owns the markup
1706
+ * and gating. Applies the same `hiddenActions` rules as the desktop chrome:
1707
+ * undo/redo hide independently, and present shares the `'fullscreen'` action
1708
+ * with the status bar / View tab's slide-show toggle. The AI toggle and the
1709
+ * collaboration pill are host-mounted into the element's `ai` and
1710
+ * `collaboration` slots; Share is the collaboration pill, so it is not drawn.
1711
+ */
1712
+ declare function createMobileToolbar(doc: Document, t: Translator, handlers: MobileToolbarHandlers, hiddenActions?: readonly ToolbarActionId$1[]): MobileToolbar;
1867
1713
  //#endregion
1868
1714
  //#region src/viewer/ui/notes-panel.d.ts
1869
1715
  /** State the panel needs to reflect: the slide to read notes from, and whether edits are allowed. */
@@ -1884,8 +1730,48 @@ interface NotesPanel {
1884
1730
  /** Expand or collapse the notes body (header stays visible either way). */
1885
1731
  setExpanded(expanded: boolean): void;
1886
1732
  }
1733
+ /**
1734
+ * The speaker-notes panel: a collapsible strip docked below the
1735
+ * slide stage. Vanilla counterpart of the Vue binding's `NotesPanel.vue`
1736
+ * plain `<textarea>` surface only; there is no rich contentEditable chrome
1737
+ * here (that is out of scope for this binding).
1738
+ *
1739
+ * The textarea is uncontrolled: its `value` is set imperatively and only
1740
+ * re-seeded on a genuine slide swap (keyed by slide id), matching the
1741
+ * mobile-safe rationale documented on the Vue editor. Edits commit on
1742
+ * `change` / `blur`, never per keystroke.
1743
+ */
1744
+ declare function createNotesPanel(doc: Document, t: Translator, onToggle: () => void, onCommit: (notes: string, notesSegments?: TextSegment[]) => void): NotesPanel;
1887
1745
  //#endregion
1888
1746
  //#region src/viewer/ui/presentation-toolbar.d.ts
1747
+ /**
1748
+ * The floating slide-show toolbar, matching React's `PresentationToolbar`.
1749
+ *
1750
+ * Vanilla previously shipped ONLY `presentation-touch-controls.ts`, whose CSS
1751
+ * hides it outside a coarse pointer, so a desktop presenter saw no show chrome
1752
+ * at all: no counter, no navigation, and no way out short of Escape. This is the
1753
+ * desktop bar, a thin adapter over the shared `pptx-ui-present-toolbar`, which
1754
+ * renders the shared `present-chrome` inventory (control ids, order, names,
1755
+ * colour palettes and the elapsed readout) so it cannot drift from the other four
1756
+ * bindings.
1757
+ *
1758
+ * This module owns behaviour only: the auto-hide wrapper, the start time and the
1759
+ * state reflection. The element tree lives in the shared package.
1760
+ */
1761
+ interface PresentationToolbarHandlers {
1762
+ previous(): void;
1763
+ next(): void;
1764
+ /** Select an annotation tool; the caller decides whether re-selecting clears it. */
1765
+ setTool(tool: PresentationPointerTool): void;
1766
+ /** Set the active pointer colour (picking a swatch also selects its tool). */
1767
+ setColor(color: string): void;
1768
+ /** One-click blackboard: arm/disarm the black screen and the pen together. */
1769
+ toggleBlackboard(): void;
1770
+ clearAnnotations(): void;
1771
+ /** Open/close the presenter console + audience display. */
1772
+ togglePresenterView(): void;
1773
+ end(): void;
1774
+ }
1889
1775
  /** Everything the bar reflects; pushed in as partial patches from two sources. */
1890
1776
  interface PresentationToolbarState {
1891
1777
  /** Zero-based active slide. */
@@ -1910,12 +1796,29 @@ interface PresentationToolbar {
1910
1796
  toggleVisible(): void;
1911
1797
  dispose(): void;
1912
1798
  }
1799
+ /**
1800
+ * Build the show toolbar. `container` is the surface the bottom trigger zone is
1801
+ * measured against (the `.pptxv` root, which is also the fullscreen element).
1802
+ */
1803
+ declare function createPresentationToolbar(doc: Document, t: Translator, container: HTMLElement, handlers: PresentationToolbarHandlers): PresentationToolbar;
1913
1804
  //#endregion
1914
1805
  //#region src/viewer/ui/presentation-touch-controls.d.ts
1806
+ interface PresentationTouchControlHandlers {
1807
+ previous(): void;
1808
+ next(): void;
1809
+ exit(): void;
1810
+ }
1915
1811
  interface PresentationTouchControls {
1916
1812
  el: HTMLElement;
1917
1813
  update(current: number, total: number): void;
1918
1814
  }
1815
+ /**
1816
+ * Build persistent, safe-area-aware controls for coarse-pointer slide shows.
1817
+ * The prev/next pair is gated as a unit on the `'navigation'` action (the exit
1818
+ * affordance always stays, since removing it would trap a touch user in
1819
+ * presentation mode).
1820
+ */
1821
+ declare function createPresentationTouchControls(doc: Document, t: Translator, handlers: PresentationTouchControlHandlers, hiddenActions?: readonly ToolbarActionId$1[]): PresentationTouchControls;
1919
1822
  //#endregion
1920
1823
  //#region src/viewer/ui/read-only-banner.d.ts
1921
1824
  /** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
@@ -1992,7 +1895,7 @@ interface Ribbon {
1992
1895
  * never called, and a hidden button/cluster inside a tab is never built by
1993
1896
  * that tab's own module (see `ribbon-types.ts` handlers vs. this file).
1994
1897
  */
1995
- export declare function createRibbon(doc: Document, t: Translator, handlers: RibbonHandlers, hiddenActions?: readonly ToolbarActionId[], accountAuth?: AccountAuthConfig): Ribbon;
1898
+ export declare function createRibbon(doc: Document, t: Translator, handlers: RibbonHandlers, hiddenActions?: readonly ToolbarActionId$1[], accountAuth?: AccountAuthConfig$1): Ribbon;
1996
1899
  //#endregion
1997
1900
  //#region src/viewer/ui/shortcut-panel.d.ts
1998
1901
  interface ShortcutPanel {
@@ -2002,9 +1905,21 @@ interface ShortcutPanel {
2002
1905
  close(): void;
2003
1906
  isOpen(): boolean;
2004
1907
  }
2005
- //#endregion
2006
- //#region src/viewer/ui/status-bar.d.ts
2007
- /** Autosave lifecycle states pushed into the save-state text. */
1908
+ /**
1909
+ * The keyboard-shortcut cheat sheet.
1910
+ *
1911
+ * Every other binding shipped one; the vanilla binding was the only viewer with
1912
+ * no way to discover its own keymap. Rows come from the shared
1913
+ * {@link VIEWER_SHORTCUT_REFERENCE}, so the list cannot claim a binding the
1914
+ * shared keymap does not actually resolve.
1915
+ *
1916
+ * It carries `data-pptx-shortcuts-panel`, the neutral hook the cross-binding
1917
+ * e2e suite locates it by.
1918
+ */
1919
+ declare function createShortcutPanel(doc: Document, t: Translator): ShortcutPanel;
1920
+ //#endregion
1921
+ //#region src/viewer/ui/status-bar.d.ts
1922
+ /** Autosave lifecycle states pushed into the save-state text. */
2008
1923
  type StatusBarSaveKind = 'idle' | 'saving' | 'saved' | 'error';
2009
1924
  interface StatusBar {
2010
1925
  el: HTMLElement;
@@ -2101,11 +2016,11 @@ interface InlineEditorSession {
2101
2016
  /** Recognize a merged model revision before the ordinary model replacement guard. */
2102
2017
  checkModel?: (model: PptxElement | undefined) => boolean;
2103
2018
  /** Canonical accepted state only, for retirement before a host permission veto. */
2104
- readAccepted?: () => InlineTextEditSnapshot | undefined;
2019
+ readAccepted?: () => InlineTextEditSnapshot$1 | undefined;
2105
2020
  activateList(element: PptxElement): boolean | undefined;
2106
- readSnapshot(): InlineTextEditSnapshot | undefined;
2107
- readList(): InlineListReadResult | undefined;
2108
- formatSnapshot(snapshot: InlineTextEditSnapshot): boolean;
2021
+ readSnapshot(): InlineTextEditSnapshot$1 | undefined;
2022
+ readList(): InlineListReadResult$1 | undefined;
2023
+ formatSnapshot(snapshot: InlineTextEditSnapshot$1): boolean;
2109
2024
  /** Commit the current text (fires `onCommit` when changed) and close. */
2110
2025
  commit(): void;
2111
2026
  /** Close without committing. */
@@ -2122,17 +2037,17 @@ interface OpenInlineEditorOptions {
2122
2037
  spellCheck?: boolean;
2123
2038
  /** Use the existing connected slide channel, never create another session. */
2124
2039
  collaboration?: {
2125
- patcher: CollaborationLivePatcher;
2040
+ patcher: CollaborationLivePatcher$1;
2126
2041
  slideId?: string;
2127
2042
  };
2128
2043
  /** Called with the edited text on commit (only when it changed). */
2129
- onCommit(text: string, snapshot?: InlineTextEditSnapshot): void;
2044
+ onCommit(text: string, snapshot?: InlineTextEditSnapshot$1): void;
2130
2045
  /**
2131
2046
  * Called with the edited text on EVERY keystroke. Used for the collaboration
2132
2047
  * live preview only: it must not touch editor state or history.
2133
2048
  */
2134
- onInput?(text: string, snapshot?: InlineTextEditSnapshot): void;
2135
- onSelectionChange?(selection: InlineTextSelection | null): void;
2049
+ onInput?(text: string, snapshot?: InlineTextEditSnapshot$1): void;
2050
+ onSelectionChange?(selection: InlineTextSelection$1 | null): void;
2136
2051
  /** Called after the surface closes (commit or cancel). */
2137
2052
  onClose(): void;
2138
2053
  /**
@@ -2176,6 +2091,15 @@ interface ThumbnailSectionActions {
2176
2091
  }
2177
2092
  //#endregion
2178
2093
  //#region src/viewer/ui/thumbnails.d.ts
2094
+ /** The item-2 multi-select/context-menu deps; all optional so existing callers keep working. */
2095
+ interface ThumbnailRailMenuDeps {
2096
+ store: Store<ViewerState>;
2097
+ getEditActions(): EditActions;
2098
+ addSlideAfter(index: number): void;
2099
+ duplicateSlides(indexes: number[]): void;
2100
+ deleteSlides(indexes: number[]): void;
2101
+ toggleHideSlides(indexes: number[]): void;
2102
+ }
2179
2103
  interface ThumbnailRail {
2180
2104
  el: HTMLElement;
2181
2105
  /** Rebuild the rail for a new slide list (uses `renderStage` per slide). */
@@ -2191,10 +2115,61 @@ interface ThumbnailRail {
2191
2115
  layoutIndex: number | null;
2192
2116
  }): void;
2193
2117
  }
2118
+ /**
2119
+ * The thumbnail sidebar: a scaled-down live render of every slide; clicking a
2120
+ * thumbnail navigates to it. Rebuilt only when the slide list changes.
2121
+ */
2122
+ declare function createThumbnailRail(doc: Document, t: Translator, onSelect: (index: number) => void, onAddSlide?: () => void, menuDeps?: ThumbnailRailMenuDeps): ThumbnailRail;
2194
2123
  //#endregion
2195
2124
  //#region src/viewer/ui/title-bar.d.ts
2196
2125
  /** Autosave lifecycle states the title-bar status text reflects. */
2197
2126
  type TitleBarAutosaveKind = 'idle' | 'saving' | 'saved' | 'error';
2127
+ /** Live Quick Access Toolbar config (File > Options > Quick Access Toolbar). */
2128
+ interface TitleBarQuickAccessState {
2129
+ visible: boolean;
2130
+ showCommandLabels: boolean;
2131
+ commandIds: readonly string[];
2132
+ }
2133
+ interface TitleBarQuickAccess {
2134
+ getState(): TitleBarQuickAccessState;
2135
+ /** Run a non-core command id (`presentFromStart`, `print`, `zoomIn`, ...). */
2136
+ run(id: string): void;
2137
+ /** ScreenTip text for a command label; undefined suppresses the tooltip. */
2138
+ screenTip(label: string): string | undefined;
2139
+ }
2140
+ interface TitleBarDeps {
2141
+ /** Display name of the open document (host-supplied). */
2142
+ fileName?: string;
2143
+ /** Whether the AutoSave switch starts on. */
2144
+ autosaveEnabled: boolean;
2145
+ /**
2146
+ * Whether the switch can change anything (default `true`). The host's
2147
+ * `autosave: false` is a policy the user cannot override, and a switch that
2148
+ * silently does nothing is worse than a visibly disabled one, so it renders
2149
+ * inert instead of pretending to work. See
2150
+ * `pptx-viewer-shared/render/autosave-policy`.
2151
+ */
2152
+ autosaveToggleAvailable?: boolean;
2153
+ /** Flip autosave; returns the new enabled state the switch reflects. */
2154
+ onToggleAutosave(): boolean;
2155
+ save(): void;
2156
+ undo(): void;
2157
+ redo(): void;
2158
+ /** Run a shared command-search id (`COMMAND_SEARCH_ENTRIES`), see `title-bar-commands.ts`. */
2159
+ runCommand(id: string): void;
2160
+ /** The search box's "Find in Slides" row: toggle the Find & Replace panel. */
2161
+ findInSlides(): void;
2162
+ /** Individually hidden toolbar buttons (gates undo/redo independently). */
2163
+ hiddenActions?: readonly ToolbarActionId$1[];
2164
+ /** Options-driven Quick Access strip; omitted = the classic Save/Undo/Redo. */
2165
+ quickAccess?: TitleBarQuickAccess;
2166
+ /**
2167
+ * Fires whenever the below-the-ribbon strip's emptiness is recomputed, so the
2168
+ * detached dock (see `ViewerChrome.setQuickAccessPosition`) can hide instead
2169
+ * of showing an empty bar.
2170
+ */
2171
+ onQuickAccessVisibilityChange?(hidden: boolean): void;
2172
+ }
2198
2173
  interface TitleBar {
2199
2174
  /** The shared `pptx-ui-title-bar` host; host-owned parts are slotted into it. */
2200
2175
  el: HTMLElement;
@@ -2221,6 +2196,68 @@ interface TitleBar {
2221
2196
  }
2222
2197
  //#endregion
2223
2198
  //#region src/viewer/ui/chrome.d.ts
2199
+ interface ChromeOptions {
2200
+ showToolbar: boolean;
2201
+ showThumbnails: boolean;
2202
+ /** Show the ribbon's editing surface (tab bar + Home/Insert/View content); default true. */
2203
+ showFormatToolbar: boolean;
2204
+ /** Build the property inspector panel (default true; shown only when editable). */
2205
+ showInspector: boolean;
2206
+ /** Host customisation region gates (default true): see `customization-lifecycle`. */
2207
+ showTitleBar?: boolean;
2208
+ showStatusBar?: boolean;
2209
+ showNotes?: boolean;
2210
+ /** Whether editing is initially enabled (gates ribbon tab content/inspector visibility). */
2211
+ editable: boolean;
2212
+ /**
2213
+ * Individually hidden toolbar buttons/ribbon tabs (default: nothing
2214
+ * hidden). Threaded down to every chrome surface that renders a hideable
2215
+ * action so DOM nodes for hidden actions are never constructed.
2216
+ */
2217
+ hiddenActions?: readonly ToolbarActionId$1[];
2218
+ /** Every ribbon handler (nav/primary/file/insert/edit/findReplace). */
2219
+ ribbonHandlers: RibbonHandlers;
2220
+ /**
2221
+ * The slides pane thumbnail context menu's multi-select bulk operations
2222
+ * (New Slide/Duplicate/Delete/Layout/Hide/Add Section). Omit to fall back
2223
+ * to the rail's single-slide "+ Add Slide" behaviour only, with no
2224
+ * right-click menu or Ctrl/Shift multi-select.
2225
+ */
2226
+ thumbnailMenu?: ThumbnailRailMenuDeps;
2227
+ /** Inspector actions (geometry + shape fill/stroke). */
2228
+ inspectorHandlers: InspectorHandlers;
2229
+ /**
2230
+ * Slide-show toolbar actions (annotation tools, presenter view, end show).
2231
+ * Navigation and exit reuse `ribbonHandlers.nav`; only the annotation and
2232
+ * presenter-console actions have no ribbon equivalent, so they arrive here.
2233
+ */
2234
+ presentationToolbarHandlers: Pick<PresentationToolbarHandlers, 'setTool' | 'setColor' | 'toggleBlackboard' | 'clearAnnotations' | 'togglePresenterView'>;
2235
+ /** PowerPoint-style top chrome, built when the toolbar is visible. */
2236
+ titleBar: TitleBarDeps;
2237
+ /** Optional File > Account sign-in hook point; disabled/absent by default. */
2238
+ accountAuth?: AccountAuthConfig$1;
2239
+ onSelectSlide(index: number): void;
2240
+ /** Header click on the notes panel; shares the ribbon Notes button's handler. */
2241
+ onToggleNotes(): void;
2242
+ /** Fired when the notes textarea commits (change/blur) in editable mode. */
2243
+ onCommitNotes(notes: string, notesSegments?: TextSegment[]): void;
2244
+ /** "Enable Editing" click on the Protected View banner. */
2245
+ onEnableEditing(): void;
2246
+ /** "Edit anyway" click on the read-only recommendation banner. */
2247
+ onEditAnywayFromReadOnly(): void;
2248
+ /** Close click on the read-only recommendation banner. */
2249
+ onDismissReadOnlyBanner(): void;
2250
+ /** The read-only recommendation banner's password form submit. */
2251
+ onSubmitReadOnlyPassword(password: string): void;
2252
+ /** The read-only recommendation banner's password form "Cancel". */
2253
+ onCancelReadOnlyPasswordPrompt(): void;
2254
+ /** One compatibility toast's own dismiss button. */
2255
+ onDismissCompatToast(id: string): void;
2256
+ /** The compatibility toast stack's "Dismiss all" button. */
2257
+ onDismissAllCompatToasts(): void;
2258
+ /** One run-program notice's own dismiss button. */
2259
+ onDismissRunProgramNotice(id: string): void;
2260
+ }
2224
2261
  /** The viewer's static DOM skeleton plus the mutable overlay controls. */
2225
2262
  interface ViewerChrome {
2226
2263
  /** `.pptxv` root (focusable; keyboard navigation attaches here). */
@@ -2281,6 +2318,427 @@ interface ViewerChrome {
2281
2318
  /** Replace the running-show "Run program" notice stack. */
2282
2319
  setRunProgramNotices(notices: readonly RunProgramNotice[]): void;
2283
2320
  }
2321
+ /**
2322
+ * Build the viewer chrome: ribbon (optional), thumbnail rail (optional),
2323
+ * viewport + stage host, and the loading/error/empty overlays. Pure DOM
2324
+ * assembly; all behaviour is wired by the caller through the handlers.
2325
+ */
2326
+ declare function buildViewerChrome(doc: Document, t: Translator, options: ChromeOptions): ViewerChrome;
2327
+ //#endregion
2328
+ //#region src/viewer/ui/icon-paths.d.ts
2329
+ declare const ICON_PATHS: {
2330
+ readonly 'chevron-left': readonly ['M15 18l-6-6 6-6'];
2331
+ readonly 'chevron-right': readonly ['M9 18l6-6-6-6'];
2332
+ readonly 'chevron-down': readonly ['M6 9l6 6 6-6'];
2333
+ readonly 'chevron-up': readonly ['M18 15l-6-6-6 6'];
2334
+ 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'];
2335
+ 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'];
2336
+ 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'];
2337
+ readonly play: readonly ['M6 4l14 8-14 8V4z'];
2338
+ readonly sidebar: readonly ['M4 4h16v16H4z', 'M9 4v16'];
2339
+ readonly undo: readonly ['M3 7v6h6', 'M21 17a9 9 0 0 0-15-6.7L3 13'];
2340
+ readonly redo: readonly ['M21 7v6h-6', 'M3 17a9 9 0 0 1 15-6.7L21 13'];
2341
+ 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'];
2342
+ readonly notes: readonly ['M5 4h14v16H5z', 'M8 9h8', 'M8 13h8', 'M8 17h4'];
2343
+ readonly plus: readonly ['M12 5v14', 'M5 12h14'];
2344
+ readonly minus: readonly ['M5 12h14'];
2345
+ 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'];
2346
+ readonly 'bring-front': readonly ['M9 3h12v12H9z', 'M3 9h6v12h12v-6', 'M3 9h6V3'];
2347
+ readonly 'send-back': readonly ['M3 9h12v12H3z', 'M9 3h12v12h-6', 'M15 15h6V9'];
2348
+ readonly 'bring-forward': readonly ['M8 8h13v13H8z', 'M3 3h10v5', 'M3 3v10h5'];
2349
+ readonly 'send-backward': readonly ['M3 3h13v13H3z', 'M16 16h5V8', 'M16 21h5v-5'];
2350
+ 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'];
2351
+ 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'];
2352
+ 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'];
2353
+ 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'];
2354
+ 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'];
2355
+ 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'];
2356
+ readonly trash: readonly ['M4 6h16', 'M9 6V4h6v2', 'M6 6l1 14h10l1-14', 'M10 11v5', 'M14 11v5'];
2357
+ readonly bold: readonly ['M6 4h6a3.5 3.5 0 0 1 0 7H6z', 'M6 11h7a3.5 3.5 0 0 1 0 7H6z'];
2358
+ readonly italic: readonly ['M11 4h6', 'M7 20h6', 'M15 4L9 20'];
2359
+ readonly underline: readonly ['M6 4v6a6 6 0 0 0 12 0V4', 'M5 21h14'];
2360
+ 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'];
2361
+ 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'];
2362
+ readonly 'a-up': readonly ['M5 18l4-11 4 11', 'M6.5 14h5', 'M17 10l3-3 3 3'];
2363
+ readonly 'a-down': readonly ['M5 18l4-11 4 11', 'M6.5 14h5', 'M17 7l3 3 3-3'];
2364
+ readonly 'clear-format': readonly ['M4 7V4h11l-1.5 3', 'M14 7l6 13', 'M9.5 10.5L18 19', 'M4 20h7'];
2365
+ readonly 'text-direction': readonly [];
2366
+ readonly palette: readonly [];
2367
+ 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'];
2368
+ readonly 'char-spacing': readonly ['M6 6h2v12H6z', 'M16 6h2v12h-2z', 'M2 20h2M2 20v-2M2 20v2', 'M22 20h-2M22 20v-2M22 20v2'];
2369
+ readonly 'font-color': readonly ['M6 20h12', 'M9.5 4h5L18 16H6L9.5 4z'];
2370
+ readonly highlight: readonly ['M11 15l-4 4H3v-4l4-4', 'M14.5 4.5l5 5L9 20l-5-1 1-5z'];
2371
+ readonly 'bullet-list': readonly ['M9 6h11', 'M9 12h11', 'M9 18h11', 'M4 6h.01', 'M4 12h.01', 'M4 18h.01'];
2372
+ readonly 'numbered-list': readonly ['M10 6h11', 'M10 12h11', 'M10 18h11', 'M4 6h1v3', 'M4 13a1 1 0 0 1 1-1h1v2l-2 2h2', 'M4 17h2v3H4'];
2373
+ readonly 'indent-increase': readonly ['M3 5h18', 'M3 19h18', 'M3 12h9', 'M14 9l4 3-4 3'];
2374
+ readonly 'indent-decrease': readonly ['M3 5h18', 'M3 19h18', 'M3 12h9', 'M18 9l-4 3 4 3'];
2375
+ readonly 'align-left': readonly ['M4 6h16', 'M4 12h10', 'M4 18h14'];
2376
+ readonly 'align-center': readonly ['M4 6h16', 'M7 12h10', 'M6 18h12'];
2377
+ readonly 'align-right': readonly ['M4 6h16', 'M10 12h10', 'M6 18h14'];
2378
+ readonly 'align-justify': readonly ['M4 6h16', 'M4 12h16', 'M4 18h16'];
2379
+ readonly 'align-top': readonly ['M4 4h16', 'M9 9h6v11H9z'];
2380
+ readonly 'align-middle': readonly ['M4 12h16', 'M9 6.5h6v11H9z'];
2381
+ readonly 'align-bottom': readonly ['M4 20h16', 'M9 4h6v11H9z'];
2382
+ readonly 'distribute-h': readonly ['M3 4v16', 'M21 4v16', 'M8 9h3v6H8z', 'M13 9h3v6h-3z'];
2383
+ readonly 'distribute-v': readonly ['M4 3h16', 'M4 21h16', 'M9 8v3h6V8z', 'M9 13v3h6v-3z'];
2384
+ readonly 'flip-h': readonly ['M12 3v18', 'M17 8l3 4-3 4', 'M7 8l-3 4 3 4'];
2385
+ readonly 'flip-v': readonly ['M3 12h18', 'M8 17l4 3 4-3', 'M8 7l4-3 4 3'];
2386
+ readonly group: readonly ['M4 4h10v10H4z', 'M10 10h10v10H10z'];
2387
+ readonly ungroup: readonly ['M4 4h7v7H4z', 'M13 13h7v7h-7z'];
2388
+ 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'];
2389
+ readonly search: readonly ['M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14z', 'M21 21l-4.35-4.35'];
2390
+ readonly replace: readonly ['M4 7h11l-3-3', 'M4 7l3 3', 'M20 17H9l3-3', 'M20 17l-3 3'];
2391
+ readonly 'new-slide': readonly ['M4 4h16v16H4z', 'M12 8v8', 'M8 12h8'];
2392
+ 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'];
2393
+ 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'];
2394
+ readonly table: readonly ['M3 4h18v16H3z', 'M3 10h18', 'M3 16h18', 'M9 4v16', 'M15 4v16'];
2395
+ 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'];
2396
+ readonly video: readonly ['M3 5h13v14H3z', 'M16 10l5-3v10l-5-3z'];
2397
+ readonly 'text-box': readonly ['M4 4h16v16H4z', 'M9 9h6', 'M12 9v7'];
2398
+ readonly chart: readonly ['M3 3v18h18', 'M7 11h3v6H7z', 'M12 7h3v10h-3z', 'M17 13h3v4h-3z'];
2399
+ readonly file: readonly ['M6 2h9l5 5v15H6z', 'M15 2v5h5'];
2400
+ readonly download: readonly ['M12 3v12', 'M7 10l5 5 5-5', 'M5 21h14'];
2401
+ readonly package: readonly ['M21 8l-9 5-9-5', 'M3 8l9-5 9 5v8l-9 5-9-5z', 'M12 13v8'];
2402
+ 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'];
2403
+ readonly square: readonly ['M4 4h16v16H4z'];
2404
+ readonly circle: readonly ['M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z'];
2405
+ readonly triangle: readonly ['M12 3l9 18H3z'];
2406
+ readonly diamond: readonly ['M12 2l10 10-10 10L2 12z'];
2407
+ 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'];
2408
+ readonly 'move-right': readonly ['M5 12h14', 'M13 6l6 6-6 6'];
2409
+ readonly equation: readonly ['M4 17h6', 'M7 14v6', 'M14 7l4.5 10', 'M15.5 14h5'];
2410
+ readonly 'smart-art': readonly ['M3 3h8v8H3z', 'M13 13h8v8h-8z', 'M11 7h2', 'M17 11v2'];
2411
+ readonly 'action-button': readonly ['M3 3h18v18H3z', 'M13 7l4 5-4 5'];
2412
+ readonly field: readonly ['M4 7h16', 'M4 12h10', 'M4 17h12', 'M19 12a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'];
2413
+ readonly cursor: readonly ['M4 4l7.07 17 2.51-7.39L21 11.07 4 4z'];
2414
+ 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'];
2415
+ readonly highlighter: readonly ['M9 11l-6 6v3h3l9.5-9.5', 'M14.5 4l5.5 5.5-2.5 2.5-5.5-5.5z'];
2416
+ 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'];
2417
+ readonly menu: readonly ['M4 6h16', 'M4 12h16', 'M4 18h16'];
2418
+ 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'];
2419
+ 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'];
2420
+ readonly 'panel-left': readonly ['M4 4h16v16H4z', 'M9 4v16'];
2421
+ readonly 'panel-right': readonly ['M4 4h16v16H4z', 'M15 4v16'];
2422
+ readonly 'sticky-note': readonly ['M5 4h14v10l-6 6H5z', 'M13 20v-6h6'];
2423
+ readonly monitor: readonly ['M3 5h18v12H3z', 'M8 21h8', 'M12 17v4'];
2424
+ readonly presentation: readonly ['M3 4h18', 'M5 4h14v11H5z', 'M12 15v3', 'M9 21l3-3 3 3'];
2425
+ readonly columns: readonly ['M4 4h16v16H4z', 'M12 4v16'];
2426
+ 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'];
2427
+ 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'];
2428
+ 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'];
2429
+ readonly ellipsis: readonly ['M5 12h.01', 'M12 12h.01', 'M19 12h.01'];
2430
+ 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'];
2431
+ readonly send: readonly ['M22 2L11 13', 'M22 2l-7 20-4-9-9-4 20-7z'];
2432
+ 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'];
2433
+ 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'];
2434
+ 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'];
2435
+ readonly check: readonly ['M20 6L9 17l-5-5'];
2436
+ 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'];
2437
+ readonly close: readonly ['M18 6L6 18', 'M6 6l12 12'];
2438
+ 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'];
2439
+ 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'];
2440
+ readonly timer: readonly ['M10 2h4', 'M12 14l3-3', 'M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16z'];
2441
+ 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'];
2442
+ 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'];
2443
+ 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'];
2444
+ 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'];
2445
+ 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'];
2446
+ readonly 'circle-pause': readonly ['M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z', 'M10 9v6', 'M14 9v6'];
2447
+ readonly 'circle-play': readonly ['M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z', 'M10 8l6 4-6 4z'];
2448
+ 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'];
2449
+ readonly 'grid-2x2': readonly ['M3 3h18v18H3z', 'M12 3v18', 'M3 12h18'];
2450
+ 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'];
2451
+ readonly 'mouse-pointer-2': readonly ['M4 3l7 17 2.5-6.5L20 11z'];
2452
+ readonly captions: readonly ['M3 5h18v14H3z', 'M7 12h3', 'M14 12h3'];
2453
+ readonly 'monitor-off': readonly ['M3 5h13', 'M21 5v9', 'M3 5v9h11', 'M8 21h8', 'M12 17v4', 'M3 3l18 18'];
2454
+ readonly 'arrow-left-right': readonly ['M8 3L4 7l4 4', 'M4 7h16', 'M16 13l4 4-4 4', 'M20 17H4'];
2455
+ readonly lock: readonly ['M3 11h18v11H3z', 'M7 11V7a5 5 0 0 1 10 0v4'];
2456
+ readonly 'lock-open': readonly ['M3 11h18v11H3z', 'M7 11V7a5 5 0 0 1 9.9-1'];
2457
+ 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'];
2458
+ 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'];
2459
+ readonly 'merge-shapes': readonly ['M3 3h12v12H3z', 'M9 9h12v12H9z'];
2460
+ readonly crop: readonly ['M6 2v14a2 2 0 0 0 2 2h14', 'M18 22V8a2 2 0 0 0-2-2H2'];
2461
+ };
2462
+ type IconName = keyof typeof ICON_PATHS;
2463
+ //#endregion
2464
+ //#region src/viewer/ui/icons.d.ts
2465
+ /** Build a 16x16 stroked icon `<svg>` for the given name. */
2466
+ declare function createIcon(doc: Document, name: IconName): SVGSVGElement;
2467
+ //#endregion
2468
+ //#region src/viewer/ui/controls.d.ts
2469
+ /**
2470
+ * Small reusable DOM control builders for the editing chrome (format toolbar +
2471
+ * inspector). Each returns the element plus an imperative handle so the editor
2472
+ * can enable/disable and reflect the selected element's values without a
2473
+ * framework. Pure DOM assembly; all behaviour is the caller's `on*` handlers.
2474
+ */
2475
+ interface ButtonOptions {
2476
+ label: string;
2477
+ icon?: IconName;
2478
+ /** Short text glyph when no icon (e.g. "B" for bold). */
2479
+ text?: string;
2480
+ /**
2481
+ * Visible text label rendered next to the icon; turns the fixed-size icon
2482
+ * button into a React-style labelled pill (`.pptxv-btn-pill`).
2483
+ */
2484
+ textLabel?: string;
2485
+ /** Extra class on the button (e.g. for a bold/italic glyph style). */
2486
+ className?: string;
2487
+ onClick(): void;
2488
+ }
2489
+ interface ButtonHandle {
2490
+ btn: HTMLButtonElement;
2491
+ setActive(active: boolean): void;
2492
+ setDisabled(disabled: boolean): void;
2493
+ }
2494
+ /** Build an icon/glyph button labelled (title + aria-label) via `label`. */
2495
+ declare function makeButton(doc: Document, options: ButtonOptions): ButtonHandle;
2496
+ interface ColorControlOptions {
2497
+ label: string;
2498
+ /** Fired on every colour change (native `<input type=color>` input event). */
2499
+ onInput(hex: string): void;
2500
+ /**
2501
+ * B6: fired once the picker COMMITS (native `change`), separate from the
2502
+ * continuous `onInput` a drag through the OS colour picker fires. Wired by
2503
+ * callers to `InspectorHandlers.pushRecentColor` so the "Recent colours"
2504
+ * MRU list grows once per pick rather than on every drag tick.
2505
+ */
2506
+ onCommit?(hex: string): void;
2507
+ }
2508
+ interface ColorControlHandle {
2509
+ el: HTMLElement;
2510
+ setValue(hex: string | undefined): void;
2511
+ setDisabled(disabled: boolean): void;
2512
+ }
2513
+ /**
2514
+ * A labelled colour swatch backed by a native `<input type="color">`. The
2515
+ * visible swatch shows the current colour; clicking it opens the OS picker.
2516
+ */
2517
+ declare function makeColorControl(doc: Document, options: ColorControlOptions, fallback?: string): ColorControlHandle;
2518
+ interface NumberFieldOptions {
2519
+ label: string;
2520
+ min?: number;
2521
+ max?: number;
2522
+ step?: number;
2523
+ /** Fired on commit (Enter / change / blur) with the parsed number. */
2524
+ onCommit(value: number): void;
2525
+ }
2526
+ interface NumberFieldHandle {
2527
+ el: HTMLElement;
2528
+ input: HTMLInputElement;
2529
+ setValue(value: number): void;
2530
+ setDisabled(disabled: boolean): void;
2531
+ }
2532
+ /**
2533
+ * A compact labelled numeric field. Commits on change/blur/Enter (never per
2534
+ * keystroke), so typing "-12" isn't committed digit-by-digit. The label text is
2535
+ * shown before the input (e.g. "X", "W").
2536
+ */
2537
+ declare function makeNumberField(doc: Document, options: NumberFieldOptions): NumberFieldHandle;
2538
+ //#endregion
2539
+ //#region src/viewer/ui/dropdown.d.ts
2540
+ /** One selectable entry in a {@link makeDropdown} menu. */
2541
+ interface DropdownItem<T> {
2542
+ label: string;
2543
+ value: T;
2544
+ /** Optional inline style applied to the item's label (e.g. `fontFamily`). */
2545
+ style?: Partial<CSSStyleDeclaration>;
2546
+ /**
2547
+ * Renders a non-selectable heading above this item, starting a group.
2548
+ *
2549
+ * Used by the Home tab's font dropdown, which PowerPoint splits into theme
2550
+ * fonts / embedded / added-this-session / all.
2551
+ */
2552
+ groupLabel?: string;
2553
+ /** Trailing hint shown after the label (e.g. the theme role "Headings"). */
2554
+ hint?: string;
2555
+ }
2556
+ interface DropdownOptions<T> {
2557
+ /** Accessible label / title for the trigger button. */
2558
+ triggerLabel: string;
2559
+ /** Visible text on the trigger button (kept in sync via `setTriggerText`). */
2560
+ triggerText: string;
2561
+ items: ReadonlyArray<DropdownItem<T>>;
2562
+ onSelect(value: T): void;
2563
+ /** Trailing chevron icon; defaults to `'chevron-down'`. */
2564
+ icon?: IconName;
2565
+ /**
2566
+ * Use a trigger the host already renders (a shared Home button): no trigger
2567
+ * is built, `el` holds only the menu and is appended inside `anchor`'s
2568
+ * wrapper, and the menu opens through `toggle()`.
2569
+ */
2570
+ external?: {
2571
+ anchor(): HTMLElement | undefined;
2572
+ onOpenChange?(open: boolean): void;
2573
+ };
2574
+ }
2575
+ interface DropdownHandle<T> {
2576
+ el: HTMLElement;
2577
+ /** Open or close the menu (the only way to open an external-trigger menu). */
2578
+ toggle(): void;
2579
+ setDisabled(disabled: boolean): void;
2580
+ setTriggerText(text: string): void;
2581
+ /** Replace the whole item list (the font dropdown regroups per deck). */
2582
+ setItems(items: ReadonlyArray<DropdownItem<T>>): void;
2583
+ /** Highlight the item matching `value` (adds `is-selected`); pass `undefined` to clear. */
2584
+ setSelected(value: T | undefined): void;
2585
+ close(): void;
2586
+ }
2587
+ /**
2588
+ * A small popover dropdown: a pill trigger button that opens a scrollable list
2589
+ * of items on click, closing on selection or an outside pointerdown. Shared by
2590
+ * every ribbon group that needs a labelled choice list (font family/size, line
2591
+ * spacing, character spacing, change case, ...).
2592
+ */
2593
+ declare function makeDropdown<T>(doc: Document, options: DropdownOptions<T>): DropdownHandle<T>;
2594
+ //#endregion
2595
+ //#region src/viewer/ui/element-context-menu-commands.d.ts
2596
+ /** The AI hooks the two AI entries need (structurally the `AiFocusController`). */
2597
+ interface ContextMenuAiHooks {
2598
+ askAboutSelection(): void;
2599
+ fixElement(element: PptxElement | null, slideIndex: number): void;
2600
+ }
2601
+ /** The table cell the menu was opened on, plus what the shared builder asks about it. */
2602
+ interface ContextMenuTableTarget {
2603
+ cell: TableCellPosition;
2604
+ context: ContextMenuTableContext;
2605
+ }
2606
+ interface ContextMenuCommandDeps {
2607
+ doc: Document;
2608
+ store: Store<ViewerState>;
2609
+ getEditActions(): EditActions;
2610
+ /** Slide review comments (React's context-menu "Add Comment" opens the same surface). */
2611
+ openComments(): void;
2612
+ /** Hyperlink dialog for the selected element. */
2613
+ openHyperlink(): void;
2614
+ /** AI focus controller when the host configured `ai`, otherwise null. */
2615
+ getAi(): ContextMenuAiHooks | null;
2616
+ /** Enter Edit Points on a shape (omitted: the entry does nothing). */
2617
+ startEditPoints?(elementId: string): boolean;
2618
+ }
2619
+ /** The `{row, column}` a right-click landed on, when it landed inside a table cell. */
2620
+ declare function readTableCellTarget(target: EventTarget | null): TableCellPosition | null;
2621
+ /**
2622
+ * The table context for the right-clicked element, or null when this is not a
2623
+ * table cell. The cell under the cursor wins over the stored selection so the
2624
+ * commands act on what the user actually aimed at.
2625
+ */
2626
+ declare function resolveTableTarget(state: ViewerState, element: PptxElement | null, target: EventTarget | null): ContextMenuTableTarget | null;
2627
+ /** Run `id` against the live editor actions. Table commands no-op without a cell. */
2628
+ declare function runContextMenuCommand(id: ContextMenuCommandId, deps: ContextMenuCommandDeps, table: ContextMenuTableTarget | null): void;
2629
+ //#endregion
2630
+ //#region src/viewer/ui/element-context-menu.d.ts
2631
+ interface ElementContextMenuDeps extends ContextMenuCommandDeps {
2632
+ doc: Document;
2633
+ /**
2634
+ * Live translator getter, not a value: `setLocale` swaps the viewer's
2635
+ * translator, and a captured copy would keep labelling the menu in the old
2636
+ * language for the rest of the session.
2637
+ */
2638
+ getTranslator(): Translator;
2639
+ /** The scrollable viewport that contains the stage. */
2640
+ viewport: HTMLElement;
2641
+ /** The live `.pptxv-stage` node, or null (rebuilt on every render). */
2642
+ getStageRoot(): HTMLElement | null;
2643
+ /** Make `id` the selection before a command acts on it. */
2644
+ selectElement(id: string): void;
2645
+ /** The host's resolved UI customisation, read at open time (omitted: none). */
2646
+ getCustomization?(): ResolvedCustomization$1;
2647
+ }
2648
+ interface ElementContextMenu {
2649
+ destroy(): void;
2650
+ }
2651
+ /** Attach the element context menu to the editing canvas. */
2652
+ declare function mountElementContextMenu(deps: ElementContextMenuDeps): ElementContextMenu;
2653
+ //#endregion
2654
+ //#region src/viewer/ui/presentation-context-menu.d.ts
2655
+ interface PresentationContextMenuDeps {
2656
+ doc: Document;
2657
+ store: Store<ViewerState>;
2658
+ /** The element the menu is mounted under (the `.pptxv` root). */
2659
+ root: HTMLElement;
2660
+ getTranslator(): Translator;
2661
+ /** File > Options > Advanced > "Show menu on right mouse click". */
2662
+ shouldShow(): boolean;
2663
+ next(): void;
2664
+ prev(): void;
2665
+ exitPresentation(): void;
2666
+ showAllSlides(): void;
2667
+ togglePresenterView(): void;
2668
+ setPointerTool(tool: 'none' | 'pen' | 'highlighter' | 'laser'): void;
2669
+ eraseAnnotations(): void;
2670
+ toggleBlank(value: 'black' | 'white'): void;
2671
+ }
2672
+ interface PresentationContextMenu {
2673
+ destroy(): void;
2674
+ }
2675
+ /** Attach the slide-show right-click menu to the presentation root. */
2676
+ declare function mountPresentationContextMenu(deps: PresentationContextMenuDeps): PresentationContextMenu;
2677
+ //#endregion
2678
+ //#region src/viewer/ui/keyboard.d.ts
2679
+ interface KeyboardHandlers {
2680
+ next(): void;
2681
+ prev(): void;
2682
+ first(): void;
2683
+ last(): void;
2684
+ /** Invoked on Escape (used to exit presentation mode). */
2685
+ escape(): void;
2686
+ /** True while a slide show is running; gates the show-only shortcuts. */
2687
+ isPresenting?(): boolean;
2688
+ /** Jump to a zero-based slide index (typed slide number during a show). */
2689
+ goToSlide?(index: number): void;
2690
+ /** Number of slides, so a typed slide number can be range-checked. */
2691
+ getSlideCount?(): number;
2692
+ /** Select a pointer tool (Ctrl+L / Ctrl+P / Ctrl+A / Ctrl+E). */
2693
+ setPointerTool?(tool: PresentationPointerTool): void;
2694
+ /** Erase the show's ink annotations (E). */
2695
+ eraseAnnotations?(): void;
2696
+ /** Show or hide ink markup (Ctrl+M). */
2697
+ toggleInkMarkup?(): void;
2698
+ /** Blank the screen black or white (B / W, or `.` / `,`). */
2699
+ toggleBlank?(value: 'black' | 'white'): void;
2700
+ /** Show or hide live captions (PowerPoint's bare `J`). */
2701
+ toggleSubtitles?(): void;
2702
+ /** Show or hide the running show's own chrome (Ctrl+H). */
2703
+ toggleChrome?(): void;
2704
+ /** Raise PowerPoint's "See All Slides" navigator (Ctrl+S). */
2705
+ showAllSlides?(): void;
2706
+ /** Bare F5: the exact entry point the ribbon's "From Beginning" button calls. */
2707
+ startFromBeginning?(): void;
2708
+ /** Shift+F5: the exact entry point the ribbon's "From Current Slide" button calls. */
2709
+ startFromCurrent?(): void;
2710
+ /** False when the host switched the slide show off: F5 / Shift+F5 then fall through. */
2711
+ isSlideShowStartEnabled?(): boolean;
2712
+ }
2713
+ /**
2714
+ * Attach slideshow keyboard navigation to the viewer root.
2715
+ *
2716
+ * While a show is running the full PowerPoint shortcut set applies, resolved by
2717
+ * the shared slide-show map. Outside a show only the arrows, Page keys, Home,
2718
+ * End and Escape navigate: PowerPoint's bare-letter commands (N, P, B, W, E)
2719
+ * belong to the show, and binding them in the editor would hijack typing.
2720
+ *
2721
+ * Returns a detach function. Keys originating from form fields are ignored.
2722
+ */
2723
+ declare function attachKeyboardNavigation(root: HTMLElement, handlers: KeyboardHandlers): () => void;
2724
+ //#endregion
2725
+ //#region src/viewer/ui/touch-gestures.d.ts
2726
+ interface TouchGestureHandlers {
2727
+ /** Read the current effective scale, including fit-to-viewport resolution. */
2728
+ getScale(): number;
2729
+ /** Persist a concrete scale after a two-finger pinch. */
2730
+ onPinchZoom(scale: number): void;
2731
+ /** Whether a one-finger swipe may change slides at this moment. */
2732
+ isSwipeEnabled(): boolean;
2733
+ onNext(): void;
2734
+ onPrevious(): void;
2735
+ }
2736
+ /**
2737
+ * Attach React-parity touch gestures to the stable viewport node. Pinching is
2738
+ * available in every mode; slide swipes deliberately stay disabled while
2739
+ * editing so they cannot steal element move/resize gestures.
2740
+ */
2741
+ declare function attachTouchGestures(target: HTMLElement, handlers: TouchGestureHandlers): () => void;
2284
2742
  //#endregion
2285
2743
  //#region src/viewer/ui/presentation.d.ts
2286
2744
  interface PresentationController {
@@ -2293,6 +2751,200 @@ interface PresentationController {
2293
2751
  /** Remove listeners. */
2294
2752
  dispose(): void;
2295
2753
  }
2754
+ /**
2755
+ * Presentation mode over the real Fullscreen API. `onChange` fires for every
2756
+ * transition, including user-initiated exits (Esc, browser chrome), driven by
2757
+ * the `fullscreenchange` event rather than the promise result.
2758
+ *
2759
+ * In environments without the Fullscreen API (older browsers, tests) it
2760
+ * degrades to a plain state toggle so the viewer still hides its chrome.
2761
+ */
2762
+ declare function createPresentationController(target: HTMLElement, onChange: (presenting: boolean) => void): PresentationController;
2763
+ //#endregion
2764
+ //#region src/viewer/ui/ribbon/find-replace-panel.d.ts
2765
+ interface FindReplacePanel {
2766
+ el: HTMLElement;
2767
+ toggle(): void;
2768
+ setOpen(open: boolean): void;
2769
+ isOpen(): boolean;
2770
+ setEditable(editable: boolean): void;
2771
+ }
2772
+ /**
2773
+ * A simple docked Find & Replace panel (query + replacement + match-case
2774
+ * toggle + Find/Replace/Replace All), backed by the shared `find-replace.ts`
2775
+ * helpers via {@link FindReplaceActions}. No in-canvas match highlighting or
2776
+ * next/previous cursor (see that module's docs); status text reports the
2777
+ * match count / replacement count instead.
2778
+ */
2779
+ declare function createFindReplacePanel(doc: Document, t: Translator, actions: FindReplaceActions): FindReplacePanel;
2780
+ //#endregion
2781
+ //#region src/viewer/ui/ribbon/ribbon-tab-bar.d.ts
2782
+ interface RibbonTabBar {
2783
+ el: HTMLElement;
2784
+ setActive(tab: RibbonTabId | RibbonContextualTabId): void;
2785
+ /**
2786
+ * Show the selection's contextual tabs (Shape Format, Picture Format, ...)
2787
+ * after the fixed tabs, PowerPoint-style.
2788
+ */
2789
+ setContextualTabs(tabs: readonly RibbonContextualTabId[]): void;
2790
+ /** Hide/show tab buttons per Options > Customize Ribbon (File always shown). */
2791
+ setHiddenTabs(hidden: ReadonlySet<string>): void;
2792
+ /** Set each tab's `title` from a ScreenTip resolver (Options > General). */
2793
+ applyScreenTips(resolve: (label: string) => string | undefined): void;
2794
+ }
2795
+ /** Right-side quick actions on the tab row (React's `TabRowActions`). */
2796
+ interface RibbonTabBarActions {
2797
+ /** The red-dot Record button (starts rehearsal/recording). */
2798
+ startRecording(): void;
2799
+ }
2800
+ /**
2801
+ * The ribbon's tab strip (File/Home/Insert/.../View), à la React's ribbon tab
2802
+ * row. Tabs in `hiddenActions` are never constructed, matching how the ribbon
2803
+ * itself skips building content for a hidden tab. The right side carries the
2804
+ * Record button plus a `.pptxv-tabrow-actions` host the collaboration UI
2805
+ * mounts its Share trigger into (see `collab/collab-ui.ts`).
2806
+ */
2807
+ declare function createRibbonTabBar(doc: Document, t: Translator, onSelect: (tab: RibbonTabId | RibbonContextualTabId) => void, hiddenActions?: readonly ToolbarActionId$1[], actions?: RibbonTabBarActions): RibbonTabBar;
2808
+ //#endregion
2809
+ //#region src/viewer/ui/ribbon/ribbon-tabs.d.ts
2810
+ /**
2811
+ * The ribbon tab registry: id + i18n label key, in display order.
2812
+ *
2813
+ * Mirrors React's `TOOLBAR_SECTIONS` (see `packages/react/src/viewer/constants/toolbar.ts`)
2814
+ * tab order/labels, but this wave only implements content for `file` / `home`
2815
+ * / `insert` / `draw` / `design` / `transitions` / `animations` / `view`. The
2816
+ * remaining entries are commented out rather than omitted so a later wave
2817
+ * adds one registry line + one tab-content module per tab, matching this
2818
+ * file's shape.
2819
+ *
2820
+ * Ids here are the ribbon-tab subset of the shared `ToolbarTabId` (see
2821
+ * `pptx-viewer-shared`'s `toolbar-actions.ts`); `createRibbon` filters this
2822
+ * list through `filterVisibleTabs` so a host's `hiddenActions` option skips
2823
+ * building a hidden tab's content entirely, rather than hiding it after the
2824
+ * fact.
2825
+ */
2826
+ interface RibbonTabDef {
2827
+ id: RibbonTabId;
2828
+ labelKey: string;
2829
+ }
2830
+ declare const RIBBON_TABS: readonly RibbonTabDef[];
2831
+ /** The default active tab on mount. */
2832
+ declare const DEFAULT_RIBBON_TAB: RibbonTabId;
2833
+ /** True when `id` is a known ribbon tab (guards persisted/host-supplied tab ids). */
2834
+ declare function isRibbonTab(id: string): id is RibbonTabId;
2835
+ //#endregion
2836
+ //#region src/viewer/ui/swatch-picker.d.ts
2837
+ /**
2838
+ * Office "Standard Colors" swatch set, shared by both the font-colour and
2839
+ * highlight-colour pickers (`pptx-viewer-shared`'s canonical catalogue, so
2840
+ * this binding cannot drift from the others' standard-colour row).
2841
+ */
2842
+ declare const OFFICE_STANDARD_SWATCHES: readonly string[];
2843
+ interface SwatchPickerOptions {
2844
+ /** Accessible label / title for the trigger button. */
2845
+ label: string;
2846
+ /** Icon shown in the trigger (a small colour bar under it reflects the value). */
2847
+ icon: IconName;
2848
+ swatches: readonly string[];
2849
+ /** Fallback colour when no value is set yet. */
2850
+ fallback: string;
2851
+ onSelect(hex: string): void;
2852
+ /**
2853
+ * Fired ONLY by a theme-swatch click, carrying both the hex and the ref.
2854
+ * Provide alongside `themeColorMap` to show the deck's real "Theme Colors"
2855
+ * grid above the standard swatches (font colour only: highlight colour has
2856
+ * no theme-ref concept on the model).
2857
+ */
2858
+ onSelectTheme?(commit: ThemeColorPickerCommit): void;
2859
+ /** As `DropdownOptions.external`: the trigger is a shared Home button. */
2860
+ external?: {
2861
+ anchor(): HTMLElement | undefined;
2862
+ onOpenChange?(open: boolean): void;
2863
+ };
2864
+ }
2865
+ interface SwatchPickerHandle {
2866
+ el: HTMLElement;
2867
+ /** Open or close the menu (the only way to open an external-trigger picker). */
2868
+ toggle(): void;
2869
+ setValue(hex: string | undefined): void;
2870
+ setDisabled(disabled: boolean): void;
2871
+ /** B6: refresh the "Recent colours" row (most-recent-first); hidden when empty. */
2872
+ setRecentColors(colors: readonly string[]): void;
2873
+ /** Set the deck's theme colour map; the theme-swatch grid hides itself when `undefined`. */
2874
+ setThemeColorMap(themeColorMap: Record<string, string> | undefined): void;
2875
+ /** Highlight the swatch matching the element's current theme ref, if any. */
2876
+ setSelectedRef(ref: PptxThemeColorRef | undefined): void;
2877
+ }
2878
+ /**
2879
+ * A reusable swatch-grid colour picker: a small pill trigger (icon + a
2880
+ * colour-bar swab of the current value) that opens a grid of preset swatches
2881
+ * plus a "Custom colour..." row backed by a native `<input type="color">`.
2882
+ * Used by the ribbon's font-colour and highlight-colour controls (upgrading
2883
+ * them from the bare native colour input the format toolbar used).
2884
+ */
2885
+ declare function makeSwatchPicker(doc: Document, t: Translator, options: SwatchPickerOptions): SwatchPickerHandle;
2886
+ //#endregion
2887
+ //#region src/viewer/ui/ruler-strips.d.ts
2888
+ /**
2889
+ * The View > Rulers strips: a horizontal ruler along the top of the slide, a
2890
+ * vertical one down the left, and the corner square where they meet.
2891
+ *
2892
+ * Drawn as SIBLINGS of the scaled stage (inside `.pptxv-stage-wrap`, in the
2893
+ * gutter the `pptxv-showRulers` rule opens up around it) rather than inside it,
2894
+ * because the stage carries a CSS `transform: scale()`: a ruler inside it would
2895
+ * have its tick strokes and labels scaled by the zoom instead of tracking it.
2896
+ * The strips therefore receive the scale and lay their ticks out in
2897
+ * already-scaled screen px.
2898
+ *
2899
+ * Tick geometry comes from the shared `generateTicks` and a drag off a strip is
2900
+ * resolved by the shared `rulerDragToGuidePosition`, so this binding agrees
2901
+ * with React, Vue, Angular and Svelte on unit, subdivision density, label
2902
+ * thinning and the guide-drop rules. Vanilla previously faked the whole feature
2903
+ * with a flat 18px border on the stage wrap: no ticks, no labels, no guides.
2904
+ */
2905
+ /** Selected element extent (unscaled slide px) shaded on both strips. */
2906
+ interface RulerSelection {
2907
+ x: number;
2908
+ y: number;
2909
+ width: number;
2910
+ height: number;
2911
+ }
2912
+ interface RulerStripsState {
2913
+ /** View > Rulers, minus presentation mode (rulers are an editing aid). */
2914
+ visible: boolean;
2915
+ canvasSize: CanvasSize;
2916
+ /** Effective stage scale (fit * zoom). */
2917
+ scale: number;
2918
+ unit: RulerUnit;
2919
+ selection: RulerSelection | null;
2920
+ /** Offer the drag-out-a-guide gesture (editable canvases only). */
2921
+ draggable: boolean;
2922
+ }
2923
+ interface RulerStrips {
2924
+ /**
2925
+ * Attach the strips to the stage wrap. Re-callable: the wrap's children are
2926
+ * replaced on every stage render, so the strips must be re-appended after it.
2927
+ */
2928
+ mount(stageWrap: HTMLElement): void;
2929
+ /** Repaint from the current state (hides the strips when not visible). */
2930
+ update(state: RulerStripsState): void;
2931
+ destroy(): void;
2932
+ }
2933
+ declare function createRulerStrips(doc: Document, onCreateGuide: (axis: 'h' | 'v', position: number) => void): RulerStrips;
2934
+ //#endregion
2935
+ //#region src/viewer/ui/protected-view-banner.d.ts
2936
+ /**
2937
+ * PowerPoint's Protected View bar: a persistent strip below the Ribbon while
2938
+ * Trust Center > "Open documents in Protected View" is holding a freshly
2939
+ * opened deck read-only, with the one real "Enable Editing" affordance that
2940
+ * lifts it for the rest of the session. See `shouldOpenInProtectedView` and
2941
+ * `ViewerState.protectedView`.
2942
+ */
2943
+ interface ProtectedViewBanner {
2944
+ el: HTMLElement;
2945
+ setActive(active: boolean): void;
2946
+ }
2947
+ declare function createProtectedViewBanner(doc: Document, t: Translator, onEnableEditing: () => void): ProtectedViewBanner;
2296
2948
  //#endregion
2297
2949
  //#region src/viewer/animation/presentation-playback.d.ts
2298
2950
  /** Everything the controller needs after a stage (re)render. */
@@ -2400,6 +3052,101 @@ interface PresentationPlayback {
2400
3052
  }
2401
3053
  //#endregion
2402
3054
  //#region src/viewer/render-controller.d.ts
3055
+ interface RenderControllerDeps {
3056
+ doc: Document;
3057
+ store: Store<ViewerState>;
3058
+ registry: index_d_exports$1.ElementRendererRegistry;
3059
+ /**
3060
+ * Getters, not plain booleans, so chrome/translator swaps (setLocale) and
3061
+ * the six 3D flags below are picked up live.
3062
+ */
3063
+ getChrome(): ViewerChrome;
3064
+ getTranslator(): Translator;
3065
+ getFitOptions?(): ViewportFitOptions$1;
3066
+ /**
3067
+ * Opt-in WebGL SmartArt renderer flag; see `PptxViewerOptions.smartArt3D`.
3068
+ * Already ANDed with Options > Advanced > "Disable 3D rendering" by the
3069
+ * caller (see `resolve3DRenderingFlags`), so this getter alone decides
3070
+ * whether the WebGL scene renders.
3071
+ */
3072
+ getSmartArt3D(): boolean;
3073
+ /**
3074
+ * Opt-in interactive WebGL surface-chart renderer flag; see
3075
+ * `PptxViewerOptions.surfaceChart3D`. Same "already ANDed" note as
3076
+ * `getSmartArt3D`.
3077
+ */
3078
+ getSurfaceChart3D(): boolean;
3079
+ /**
3080
+ * Opt-in interactive WebGL bar3D-chart renderer flag; see
3081
+ * `PptxViewerOptions.barChart3D`. Same "already ANDed" note as
3082
+ * `getSmartArt3D`.
3083
+ */
3084
+ getBarChart3D(): boolean;
3085
+ /**
3086
+ * Opt-in interactive WebGL line3D-chart renderer flag; see
3087
+ * `PptxViewerOptions.lineChart3D`. Same "already ANDed" note as
3088
+ * `getSmartArt3D`.
3089
+ */
3090
+ getLineChart3D(): boolean;
3091
+ /**
3092
+ * Opt-in interactive WebGL area3D-chart renderer flag; see
3093
+ * `PptxViewerOptions.areaChart3D`. Same "already ANDed" note as
3094
+ * `getSmartArt3D`.
3095
+ */
3096
+ getAreaChart3D(): boolean;
3097
+ /**
3098
+ * Opt-in interactive WebGL pie3D-chart renderer flag; see
3099
+ * `PptxViewerOptions.pieChart3D`. Same "already ANDed" note as
3100
+ * `getSmartArt3D`.
3101
+ */
3102
+ getPieChart3D(): boolean;
3103
+ /**
3104
+ * `viewerOptions.advanced.pixelateMosaicAnimation`. `true` plays the
3105
+ * blocky mosaic reveal for `p:animEffect/@filter="pixelate"`; `false`
3106
+ * (the default, matching PowerPoint's own behaviour) snaps the element
3107
+ * to its end state. See `resolveFilterEffect`'s doc in
3108
+ * `pptx-viewer-shared`'s `animation-filter-effects.ts`.
3109
+ */
3110
+ getPixelateMosaicAnimation(): boolean;
3111
+ /** History-integrated handout master layout mutation. */
3112
+ onHandoutSlidesPerPageChange(count: number): void;
3113
+ onMasterBackgroundColorChange(color: string): void;
3114
+ /** Run a Slide Master view sidebar CRUD command (B4). */
3115
+ onMasterCrudAction(id: MasterViewCrudActionId): void;
3116
+ onSectionToggle(sectionId: string): void;
3117
+ onSectionRename(sectionId: string, name: string): void;
3118
+ onSectionDelete(sectionId: string): void;
3119
+ onSectionMove(sectionId: string, direction: 'up' | 'down'): void;
3120
+ onSectionAddAfter(slideIndex: number): void;
3121
+ /** Navigate from a presentation Zoom tile. */
3122
+ onZoomClick(target: ZoomNavigationTarget, returnSlideIndex: number): void;
3123
+ /** A canvas comment marker dot was clicked; bring the comments UI on screen. */
3124
+ onCommentMarkerClick?(commentId: string): void;
3125
+ onSmartArtNodeTextChange?(element: PptxElement, nodeId: string, text: string): void;
3126
+ onSmartArtNodeFillChange?(element: PptxElement, nodeId: string, fill: string): void;
3127
+ /**
3128
+ * Commit a chart data point dragged on the canvas. Gated on `interactive`
3129
+ * below with the SmartArt hooks, so thumbnails, the presenter console and
3130
+ * export rasters never arm the chart marks.
3131
+ */
3132
+ onChartPointChange?(element: PptxElement, chartData: PptxChartData): void;
3133
+ /**
3134
+ * A table column/row boundary was dragged on the canvas. Gated on
3135
+ * `interactive` with the other on-canvas edit hooks.
3136
+ */
3137
+ onTableResizeColumns?(element: PptxElement, widths: number[]): void;
3138
+ onTableResizeRow?(element: PptxElement, rowIndex: number, height: number): void;
3139
+ /**
3140
+ * A chart part was pressed on the canvas. Gated on `interactive` with the
3141
+ * other chart/SmartArt hooks. See `ElementRenderContext.onChartPartSelect`.
3142
+ */
3143
+ onChartPartSelect?(element: PptxElement, part: ChartPartRef): void;
3144
+ /**
3145
+ * Invoked after every stage render (the stage host is rebuilt with
3146
+ * `replaceChildren`); the editor re-mounts its overlay layer here.
3147
+ */
3148
+ onStageRendered?(): void;
3149
+ }
2403
3150
  interface RenderController {
2404
3151
  /** Re-render everything (used after a chrome rebuild). */
2405
3152
  renderAll(): void;
@@ -2431,265 +3178,12 @@ interface RenderController {
2431
3178
  */
2432
3179
  readonly presentationPlayback: PresentationPlayback;
2433
3180
  }
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
3181
  /**
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.
3182
+ * The DOM render orchestration for {@link PptxViewer}: turns store state into
3183
+ * stage / thumbnail / toolbar updates. Split from the class to keep both
3184
+ * halves small; it owns no state of its own.
2460
3185
  */
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
- /**
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.
2548
- */
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
- }
3186
+ declare function createRenderController(deps: RenderControllerDeps): RenderController;
2693
3187
  //#endregion
2694
3188
  //#region src/viewer/autosave/autosave-controller.d.ts
2695
3189
  /**
@@ -2726,10 +3220,119 @@ interface LocaleCatalogEntry {
2726
3220
  * the viewer's own prompt ({@link AutosaveControllerDeps.onRecoveryOffer}).
2727
3221
  */
2728
3222
  type AutosaveStatus = 'idle' | 'saving' | 'saved' | 'error';
3223
+ interface AutosaveControllerDeps {
3224
+ store: Store<ViewerState>;
3225
+ /** Live core handler used to serialize the current slides to `.pptx` bytes. */
3226
+ getHandler: () => PptxHandler | null;
3227
+ /** IndexedDB key for the recovery snapshot (usually the open file's name). */
3228
+ filePath: string;
3229
+ /** Public document name rendered in the recovery message. */
3230
+ fileName?: string;
3231
+ /**
3232
+ * The resolved cadence in ms, read EVERY time the timer is armed so a
3233
+ * File > Options > Save change applies without rebuilding the viewer.
3234
+ */
3235
+ getIntervalMs: () => number;
3236
+ /**
3237
+ * The Protect-Presentation state, forwarded to the shared save decision.
3238
+ * Deliberately inert here: a recovery snapshot is written in the clear
3239
+ * whatever it says. It is threaded through so this path runs the same one
3240
+ * decision function as every real save instead of side-stepping it.
3241
+ */
3242
+ getSaveIntent?: () => DeckSaveIntent;
3243
+ /** Surface status transitions (toolbar indicator + optional host callback). */
3244
+ onStatus?: (status: AutosaveStatus) => void;
3245
+ /** The raw record, for the host's `onAutosaveRecovery` hook. */
3246
+ onRecovery?: (record: AutosaveRecord$1) => void;
3247
+ /** The shared prompt descriptor + record, for the viewer's own dialog. */
3248
+ onRecoveryOffer?: (offer: AutosaveRecoveryOffer) => void;
3249
+ /** The live shared activation verdict; omitted means "always active". */
3250
+ getActivation?: () => AutosaveActivation;
3251
+ /**
3252
+ * Whether a snapshot may be OFFERED back. This is the host ceiling alone
3253
+ * (`autosave !== false`): a user who merely switched the toggle off should
3254
+ * still be asked about work a crash left behind.
3255
+ */
3256
+ isRecoveryAllowed?: () => boolean;
3257
+ }
3258
+ interface AutosaveController {
3259
+ /** Force an immediate snapshot, bypassing the debounce window. */
3260
+ saveNow(): Promise<void>;
3261
+ /** Current status. */
3262
+ getStatus(): AutosaveStatus;
3263
+ /** Re-read the activation verdict (the toggle or edit-ability changed). */
3264
+ refresh(): void;
3265
+ /** Whether new edits currently schedule recovery snapshots. */
3266
+ isEnabled(): boolean;
3267
+ /** Tear down the timer + store subscription. */
3268
+ destroy(): void;
3269
+ }
3270
+ declare function createAutosaveController(deps: AutosaveControllerDeps): AutosaveController;
2729
3271
  //#endregion
2730
3272
  //#region src/viewer/export/export-types.d.ts
3273
+ /**
3274
+ * Types shared by the per-format export runners (`export-gif.ts`,
3275
+ * `export-video.ts`, `export-print.ts`) and the controller that wraps them
3276
+ * (`export-controller.ts`). Kept in their own module so the runners never
3277
+ * import from the controller (no cycles).
3278
+ */
3279
+ /**
3280
+ * Rasterise the slide at `index` to an `HTMLCanvasElement`. Injected so the
3281
+ * export modules stay DOM-capture-free and unit-testable. `scaleMultiplier`
3282
+ * (default 1) is an extra factor the print path applies when Options >
3283
+ * Advanced > "High quality" is on.
3284
+ */
3285
+ type RasterizeSlide = (index: number, scaleMultiplier?: number) => Promise<HTMLCanvasElement>;
3286
+ /**
3287
+ * Same capture as {@link RasterizeSlide}, but returns the full
3288
+ * `RasterizeElementResult` (tiled `png-bytes` included) instead of a plain
3289
+ * canvas. Used by the PNG-export and "copy slide as image" paths so a
3290
+ * request whose full resolution exceeds the browser's canvas cap is tiled
3291
+ * and stitched into pre-encoded PNG bytes instead of a canvas
3292
+ * `toBlob`/`toDataURL` call.
3293
+ */
3294
+ type RasterizeSlideToRaster = (index: number, scaleMultiplier?: number) => Promise<RasterizeElementResult>;
3295
+ /**
3296
+ * Same capture, but returns the raw per-tile canvases (no PNG stitching).
3297
+ * Used by PDF export so a page whose resolution exceeds the browser canvas
3298
+ * cap is composed of several small tile images instead of one oversized or
3299
+ * stitched canvas.
3300
+ */
3301
+ type RasterizeSlideToTiles = (index: number, scaleMultiplier?: number) => Promise<RasterizeElementTilesResult>;
2731
3302
  /** Per-slide progress callback: `(currentSlideIndex, totalSlides)`. */
2732
3303
  type ExportProgress = (current: number, total: number) => void;
3304
+ /** Dependencies every per-format export runner receives from the controller. */
3305
+ interface ExportCaptureDeps {
3306
+ store: Store<ViewerState>;
3307
+ rasterizeSlide: RasterizeSlide;
3308
+ /**
3309
+ * PNG-export / "copy slide as image" only; see {@link RasterizeSlideToRaster}.
3310
+ * Optional: existing test fixtures that only exercise PDF/GIF/video/print
3311
+ * (none of which touch this path) do not need to supply it.
3312
+ * `exportSlidePng`/`copySlideAsImage` fall back to wrapping
3313
+ * `rasterizeSlide`'s plain canvas when this is omitted.
3314
+ */
3315
+ rasterizeSlideToRaster?: RasterizeSlideToRaster;
3316
+ /**
3317
+ * PDF export only; see {@link RasterizeSlideToTiles}. Optional for the
3318
+ * same reason `rasterizeSlideToRaster` is: `exportPdf` falls back to
3319
+ * `rasterizeSlide`'s single canvas per page when this is omitted.
3320
+ */
3321
+ rasterizeSlideToTiles?: RasterizeSlideToTiles;
3322
+ /** Resolved base file name (no extension) for downloads. */
3323
+ baseName: string;
3324
+ /**
3325
+ * Live translator (host-supplied), for the print path's own UI text.
3326
+ * Optional: only the print path actually needs it, and falls back to a
3327
+ * default English `createTranslator()` when omitted (e.g. a GIF/video
3328
+ * test fixture that never touches print).
3329
+ */
3330
+ getTranslator?(): Translator;
3331
+ /** Options > Advanced > "Print hidden slides". Defaults to `false` (excluded), matching PowerPoint. */
3332
+ getIncludeHiddenSlides?(): boolean;
3333
+ /** Options > Advanced > "High quality" raster scale for the print fallback path. */
3334
+ getPrintHighQuality?(): boolean;
3335
+ }
2733
3336
  //#endregion
2734
3337
  //#region src/viewer/export/export-gif.d.ts
2735
3338
  /**
@@ -2766,6 +3369,12 @@ interface ExportGifOptions {
2766
3369
  /** Abort the export early; the capture loop checks this between slides. */
2767
3370
  signal?: AbortSignal;
2768
3371
  }
3372
+ /**
3373
+ * Capture every slide, encode the frames as an animated GIF, and trigger a
3374
+ * `<baseName>.gif` download. No-op when the deck is empty. Throws the shared
3375
+ * `AbortError` when `signal` aborts between slide captures.
3376
+ */
3377
+ declare function runGifExport(deps: ExportCaptureDeps, options?: ExportGifOptions): Promise<void>;
2769
3378
  //#endregion
2770
3379
  //#region src/viewer/export/export-print.d.ts
2771
3380
  /**
@@ -2803,6 +3412,13 @@ interface PrintOptions extends Partial<PrintSettings> {
2803
3412
  */
2804
3413
  openPrintWindow?: OpenPrintWindow;
2805
3414
  }
3415
+ /**
3416
+ * Assemble the printable HTML document for the (validated) settings and open
3417
+ * it in a print window. Resolves `true` when the window opened, `false` when
3418
+ * it was blocked or nothing matched the slide range. Throws the shared
3419
+ * `AbortError` when `signal` aborts between slide captures.
3420
+ */
3421
+ declare function runPrint(deps: ExportCaptureDeps, options?: PrintOptions): Promise<boolean>;
2806
3422
  //#endregion
2807
3423
  //#region src/viewer/export/export-video.d.ts
2808
3424
  /**
@@ -2831,6 +3447,17 @@ interface ExportVideoOptions {
2831
3447
  /** Abort the export early; checked between slides and between frames. */
2832
3448
  signal?: AbortSignal;
2833
3449
  }
3450
+ /** Deps for {@link runVideoExport}; adds a sleep seam for fast unit tests. */
3451
+ interface ExportVideoDeps extends ExportCaptureDeps {
3452
+ /** Overridable frame-hold sleep (test seam). Defaults to `setTimeout`. */
3453
+ waitMs?: (ms: number) => Promise<void>;
3454
+ }
3455
+ /**
3456
+ * Capture every slide, record them into a WebM video, and trigger a
3457
+ * `<baseName>.webm` download. No-op when the deck is empty. Throws the shared
3458
+ * `AbortError` when `signal` aborts during capture or recording.
3459
+ */
3460
+ declare function runVideoExport(deps: ExportVideoDeps, options?: ExportVideoOptions): Promise<void>;
2834
3461
  //#endregion
2835
3462
  //#region src/viewer/export/export-controller.d.ts
2836
3463
  /** Options for the multi-slide PDF export (progress + cooperative cancel). */
@@ -2840,6 +3467,109 @@ interface ExportPdfOptions {
2840
3467
  /** Abort the export early; the loop checks this between slides. */
2841
3468
  signal?: AbortSignal;
2842
3469
  }
3470
+ interface ExportControllerDeps {
3471
+ store: Store<ViewerState>;
3472
+ rasterizeSlide: RasterizeSlide;
3473
+ /** PNG-export / "copy slide as image" only; see {@link RasterizeSlideToRaster}. */
3474
+ rasterizeSlideToRaster?: RasterizeSlideToRaster;
3475
+ /** PDF export only; see {@link RasterizeSlideToTiles}. */
3476
+ rasterizeSlideToTiles?: RasterizeSlideToTiles;
3477
+ /** Base file name (without extension) for downloads. Defaults to `presentation`. */
3478
+ fileName?: string;
3479
+ /** Live translator (host-supplied), for the print path's own UI text. */
3480
+ getTranslator?: ExportCaptureDeps['getTranslator'];
3481
+ /** Options > Advanced > "Print hidden slides". */
3482
+ getIncludeHiddenSlides?: ExportCaptureDeps['getIncludeHiddenSlides'];
3483
+ /** Options > Advanced > "High quality" raster scale for the print fallback path. */
3484
+ getPrintHighQuality?: ExportCaptureDeps['getPrintHighQuality'];
3485
+ }
3486
+ interface ExportController {
3487
+ /** Export a single slide as a PNG download. Defaults to the current slide. */
3488
+ exportSlidePng(index?: number): Promise<void>;
3489
+ /** Copy a slide to the system clipboard as a PNG image. */
3490
+ copySlideAsImage(index?: number): Promise<void>;
3491
+ /** Export every slide as a multi-page PDF download (one slide per page). */
3492
+ exportPdf(options?: ExportPdfOptions): Promise<void>;
3493
+ /** Export every slide as an animated GIF download (one frame per slide). */
3494
+ exportGif(options?: ExportGifOptions): Promise<void>;
3495
+ /** Export every slide as a WebM video download (MediaRecorder). */
3496
+ exportVideo(options?: ExportVideoOptions): Promise<void>;
3497
+ /** Assemble the printable document and open it in a print window. */
3498
+ print(options?: PrintOptions): Promise<boolean>;
3499
+ /** Serialize the deck to `pptx-viewer-json` and download it. */
3500
+ exportJson(): void;
3501
+ }
3502
+ /**
3503
+ * Export controller: render slides to PNG / PDF / GIF / WebM video, plus the
3504
+ * print flow. Vanilla port of Vue's `useExport` composable extended with the
3505
+ * GIF/video/print surface from React's `useExportHandlers` (the per-format
3506
+ * capture drivers live in `export-gif.ts` / `export-video.ts` /
3507
+ * `export-print.ts`; all pure planning/encoding/assembly is shared). A plain
3508
+ * closure with an internal `exporting` guard replaces the reactive flag, since
3509
+ * nothing in the vanilla binding currently needs to reactively observe
3510
+ * export-in-progress state.
3511
+ *
3512
+ * Rasterisation is delegated to the injected `rasterizeSlide` (the host owns
3513
+ * the DOM + `html2canvas-pro`, see `rasterize-slide.ts`). `jspdf` is loaded
3514
+ * lazily so it stays out of the main bundle.
3515
+ */
3516
+ declare function createExportController(deps: ExportControllerDeps): ExportController;
3517
+ //#endregion
3518
+ //#region src/viewer/export/export-progress-modal.d.ts
3519
+ /**
3520
+ * ExportProgressModal: a centered, non-dismissable overlay shown while a
3521
+ * multi-slide export (PDF / GIF / WebM) runs. Vanilla port of the shared
3522
+ * ExportProgressModal pattern (React/Vue/Angular/Svelte): same layout and
3523
+ * `--pptx-*` theme tokens, hand-built DOM instead of a template.
3524
+ *
3525
+ * It deliberately does NOT close on backdrop click or Escape: an export in
3526
+ * flight should only end by completing, erroring, or the user pressing
3527
+ * Cancel. `onCancel` aborts cooperatively (the export loops check the
3528
+ * signal between slides).
3529
+ */
3530
+ interface ExportProgressModal {
3531
+ /** Show the modal with a fresh title, zeroed bar, and initial status. */
3532
+ open(title: string, status: string): void;
3533
+ /** Update the bar (0-100, clamped) and the status line under it. */
3534
+ update(progress: number, status: string): void;
3535
+ /** Hide and remove the modal from the document. */
3536
+ close(): void;
3537
+ }
3538
+ interface ExportProgressModalDeps {
3539
+ doc: Document;
3540
+ getTranslator(): Translator;
3541
+ /** The Cancel control was pressed (abort the in-flight export). */
3542
+ onCancel(): void;
3543
+ }
3544
+ /** Build a (closed) progress modal; `open` mounts it onto `doc.body`. */
3545
+ declare function createExportProgressModal(deps: ExportProgressModalDeps): ExportProgressModal;
3546
+ //#endregion
3547
+ //#region src/viewer/export/export-progress-ui.d.ts
3548
+ /**
3549
+ * Wires the multi-slide exports (PDF / GIF / WebM) to the progress modal:
3550
+ * a `begin -> run -> end` envelope owning the modal state and the
3551
+ * `AbortController` the export loops check between slides. Vanilla port of
3552
+ * Svelte's `ExportUiState` / Vue's `useExportProgress`; all percentage maths
3553
+ * and status labels come from `pptx-viewer-shared` (`export-progress.ts`) so
3554
+ * every binding shows identical progress.
3555
+ *
3556
+ * A caller-supplied `onProgress`/`signal` (the public `PptxViewerInstance`
3557
+ * export API accepts them) still works: caller callbacks are invoked alongside
3558
+ * the modal's, and an aborted caller signal aborts the envelope's controller.
3559
+ */
3560
+ interface ExportProgressUiDeps {
3561
+ modal: ExportProgressModal;
3562
+ controller: ExportController;
3563
+ getTranslator(): Translator;
3564
+ }
3565
+ interface ExportProgressUi {
3566
+ runPdf(options?: ExportPdfOptions): Promise<void>;
3567
+ runGif(options?: ExportGifOptions): Promise<void>;
3568
+ runVideo(options?: ExportVideoOptions): Promise<void>;
3569
+ /** Abort the in-flight export (the modal's Cancel control routes here). */
3570
+ cancel(): void;
3571
+ }
3572
+ declare function createExportProgressUi(deps: ExportProgressUiDeps): ExportProgressUi;
2843
3573
  //#endregion
2844
3574
  //#region src/viewer/export/export-svg.d.ts
2845
3575
  /** Export one parsed slide as resolution-independent SVG markup. */
@@ -2847,6 +3577,113 @@ export declare function exportSlideToSvg(slide: PptxSlide, width: number, height
2847
3577
  /** Export the selected slides in a parsed presentation as SVG markup. */
2848
3578
  export declare function exportAllSlidesToSvg(data: PptxData, options?: SvgExportOptions): string[];
2849
3579
  //#endregion
3580
+ //#region src/viewer/export/rasterize-slide.d.ts
3581
+ interface RasterizeSlideDeps {
3582
+ doc: Document;
3583
+ /** Host the off-screen capture stage is appended to; removed on `destroy()`. */
3584
+ container: HTMLElement;
3585
+ store: Store<ViewerState>;
3586
+ registry: index_d_exports$1.ElementRendererRegistry;
3587
+ getTranslator(): Translator;
3588
+ /**
3589
+ * Opt-in WebGL SmartArt renderer flag; see `PptxViewerOptions.smartArt3D`.
3590
+ * A getter, not a plain boolean, read fresh on every `rasterizeSlide()`
3591
+ * call so a mid-session Options > Advanced > "Disable 3D rendering" toggle
3592
+ * (already ANDed in by the caller, see `resolve3DRenderingFlags`) reaches
3593
+ * the very next export/print without reconstructing this controller.
3594
+ */
3595
+ getSmartArt3D(): boolean;
3596
+ /**
3597
+ * Opt-in interactive WebGL surface-chart renderer flag; see
3598
+ * `PptxViewerOptions.surfaceChart3D`. Same "read fresh" note as
3599
+ * `getSmartArt3D`.
3600
+ */
3601
+ getSurfaceChart3D(): boolean;
3602
+ /**
3603
+ * Opt-in interactive WebGL bar3D-chart renderer flag; see
3604
+ * `PptxViewerOptions.barChart3D`. Same "read fresh" note as `getSmartArt3D`.
3605
+ */
3606
+ getBarChart3D(): boolean;
3607
+ /**
3608
+ * Opt-in interactive WebGL line3D-chart renderer flag; see
3609
+ * `PptxViewerOptions.lineChart3D`. Same "read fresh" note as
3610
+ * `getSmartArt3D`.
3611
+ */
3612
+ getLineChart3D(): boolean;
3613
+ /**
3614
+ * Opt-in interactive WebGL area3D-chart renderer flag; see
3615
+ * `PptxViewerOptions.areaChart3D`. Same "read fresh" note as
3616
+ * `getSmartArt3D`.
3617
+ */
3618
+ getAreaChart3D(): boolean;
3619
+ /**
3620
+ * Opt-in interactive WebGL pie3D-chart renderer flag; see
3621
+ * `PptxViewerOptions.pieChart3D`. Same "read fresh" note as `getSmartArt3D`.
3622
+ */
3623
+ getPieChart3D(): boolean;
3624
+ /**
3625
+ * Options > Advanced > "Default resolution" / "Do not compress images"
3626
+ * raster-scale multiplier (see `resolveImageResolutionScale` in
3627
+ * `pptx-viewer-shared`), applied on top of the baseline capture scale so
3628
+ * the option has real effect without changing the default (highFidelity)
3629
+ * export quality.
3630
+ */
3631
+ getImageResolutionScale(): number;
3632
+ /**
3633
+ * Overridable frame-wait before capture (test seam: the real
3634
+ * `requestAnimationFrame` double-wait is not worth driving through fake
3635
+ * timers). Defaults to {@link nextFrame}.
3636
+ */
3637
+ waitForFrame?: () => Promise<void>;
3638
+ }
3639
+ interface RasterizeSlideController {
3640
+ /**
3641
+ * Render slide `index` off-screen at scale 1 and capture it to a single
3642
+ * full-resolution canvas via the shared `rasterizeElementTiledToCanvas`
3643
+ * (foreignObject -> vector-SVG -> html2canvas-pro fallback chain), tiling
3644
+ * and stitching transparently (never reducing scale) if the requested
3645
+ * resolution would exceed the browser's canvas cap. `scaleMultiplier`
3646
+ * (default 1) is an extra factor on top of the baseline 2x * Options >
3647
+ * Advanced > Image Size/Quality scale; the Print dialog's notes/handouts
3648
+ * raster path passes a higher value when Options > Advanced > "High
3649
+ * quality" is on, without changing plain PNG/PDF export.
3650
+ */
3651
+ rasterizeSlide(index: number, scaleMultiplier?: number): Promise<HTMLCanvasElement>;
3652
+ /**
3653
+ * Same capture as {@link rasterizeSlide}, but returns the full
3654
+ * `RasterizeElementResult` instead of unwrapping to a plain canvas. Used
3655
+ * by the PNG-export and "copy slide as image" paths so a request whose
3656
+ * full resolution exceeds the browser's canvas cap is tiled and stitched
3657
+ * as pre-encoded PNG bytes (`kind: 'png-bytes'`) instead of a canvas
3658
+ * `toBlob`/`toDataURL` call, since no single canvas could hold the full
3659
+ * image.
3660
+ */
3661
+ rasterizeSlideToRaster(index: number, scaleMultiplier?: number): Promise<RasterizeElementResult>;
3662
+ /**
3663
+ * Same capture, but returns the raw per-tile canvases (no PNG stitching).
3664
+ * Used by PDF export so a page whose resolution exceeds the browser
3665
+ * canvas cap is composed of several small tile images instead of one
3666
+ * oversized or stitched canvas.
3667
+ */
3668
+ rasterizeSlideToTiles(index: number, scaleMultiplier?: number): Promise<RasterizeElementTilesResult>;
3669
+ /** Remove the off-screen capture stage from the DOM. */
3670
+ destroy(): void;
3671
+ }
3672
+ /**
3673
+ * Build the off-screen capture stage used by PNG/PDF export: a hidden host
3674
+ * (fixed off-canvas, `aria-hidden`) that renders one slide at a time at scale
3675
+ * 1 via the shared `renderSlideStage`, then rasterises it through the shared
3676
+ * `rasterizeElement` / `rasterizeElementTiles` /
3677
+ * `rasterizeElementTiledToCanvas` entry points; `renderToCanvas`
3678
+ * (html2canvas-pro) is only ever the last-resort `html2canvasFallback` driver
3679
+ * handed to them. Vanilla port of Vue's `useExportWiring.rasterizeSlide`
3680
+ * (`packages/vue/src/viewer/composables/useExportWiring.ts`): Vue re-renders
3681
+ * an off-screen `<SlideStage>` behind a template ref; the vanilla binding
3682
+ * owns the DOM directly, so this builds and re-populates one host element for
3683
+ * the life of the controller instead.
3684
+ */
3685
+ declare function createRasterizeSlide(deps: RasterizeSlideDeps): RasterizeSlideController;
3686
+ //#endregion
2850
3687
  //#region src/viewer/export/render-to-canvas.d.ts
2851
3688
  /**
2852
3689
  * A drop-in wrapper around `html2canvas-pro` that first normalises modern CSS
@@ -2867,100 +3704,8 @@ export declare function renderToCanvas(element: HTMLElement, options?: Partial<O
2867
3704
  * a URL string to fetch.
2868
3705
  */
2869
3706
  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;
3707
+ /** Normalise any accepted source into an `ArrayBuffer` of `.pptx` bytes. */
3708
+ declare function resolveSourceToBuffer(source: PptxViewerSource): Promise<ArrayBuffer>;
2964
3709
  //#endregion
2965
3710
  //#region src/viewer/types.d.ts
2966
3711
  /** Callbacks mirroring the Vue component's emits. */
@@ -2995,7 +3740,7 @@ interface PptxViewerCallbacks {
2995
3740
  /** Fired on every collaboration connection-status transition. */
2996
3741
  onCollaborationStatus?: (status: ConnectionStatus) => void;
2997
3742
  }
2998
- interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3743
+ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions$1 {
2999
3744
  /**
3000
3745
  * The presentation to open: raw `.pptx` bytes (ArrayBuffer / Uint8Array),
3001
3746
  * a Blob/File, or a URL string to fetch. Omit to start empty and call
@@ -3005,7 +3750,7 @@ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3005
3750
  /** Licensed font sources supplied by the host application. */
3006
3751
  fonts?: ViewerFontSource[];
3007
3752
  /** Viewer chrome theme (shared `ViewerTheme`: colors, radius, CSS vars). */
3008
- theme?: ViewerTheme;
3753
+ theme?: ViewerTheme$1;
3009
3754
  /** Display name shown in the PowerPoint-style title bar. */
3010
3755
  fileName?: string;
3011
3756
  /** UI locale (default `'en'`). Dictionaries come from `messages`. */
@@ -3045,7 +3790,7 @@ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3045
3790
  * Disabled by default: the Account page's sign-in section renders nothing
3046
3791
  * unless `enabled: true` is passed.
3047
3792
  */
3048
- accountAuth?: AccountAuthConfig;
3793
+ accountAuth?: AccountAuthConfig$1;
3049
3794
  /** Zero-based slide to show after load (default 0). */
3050
3795
  initialSlide?: number;
3051
3796
  /**
@@ -3083,20 +3828,20 @@ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3083
3828
  * the same feature. Unlike {@link showToolbar}, this hides individual
3084
3829
  * pieces rather than the whole chrome.
3085
3830
  */
3086
- hiddenActions?: ToolbarActionId[];
3831
+ hiddenActions?: ToolbarActionId$1[];
3087
3832
  /**
3088
3833
  * Framework-neutral UI customisation. See docs/guide/customization.md.
3089
3834
  * Seeds the instance's customisation; the `ViewerCustomizationApi` methods
3090
3835
  * on the returned instance (`hideRibbonTab`, `setCustomization`, ...)
3091
3836
  * change it live. {@link hiddenActions} still applies and is unioned with it.
3092
3837
  */
3093
- customization?: ViewerCustomization;
3838
+ customization?: ViewerCustomization$1;
3094
3839
  /**
3095
3840
  * Custom element-renderer registry. Defaults to `createDefaultRegistry()`;
3096
3841
  * pass your own (or mutate the default via `getRegistry()`) to add or
3097
3842
  * override element renderers.
3098
3843
  */
3099
- registry?: ElementRendererRegistry;
3844
+ registry?: index_d_exports$1.ElementRendererRegistry;
3100
3845
  /**
3101
3846
  * Unit system for the View > Rulers tick labels (default `'inches'`, as
3102
3847
  * PowerPoint does). Mirrors React's `rulerUnit` prop; the tick generator is
@@ -3241,10 +3986,10 @@ interface PptxViewerOptions extends PptxViewerCallbacks, ViewportFitOptions {
3241
3986
  * the model connection (a backend `endpoint`, an in-browser `model`, or a
3242
3987
  * custom `transport`); see {@link PptxAiConfig}.
3243
3988
  */
3244
- ai?: PptxAiConfig;
3989
+ ai?: PptxAiConfig$1;
3245
3990
  }
3246
3991
  /** The viewer handle returned by `createPptxViewer`. */
3247
- interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi {
3992
+ interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi$1 {
3248
3993
  /** Load a presentation from bytes or a Blob/File (replaces the current one). */
3249
3994
  loadFile(file: Blob | ArrayBuffer | Uint8Array): Promise<void>;
3250
3995
  /** Fetch and load a presentation from a URL. */
@@ -3267,7 +4012,7 @@ interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi
3267
4012
  zoomOut(): void;
3268
4013
  zoomToFit(): void;
3269
4014
  /** Apply a new viewer theme (pass `undefined` to reset to defaults). */
3270
- setTheme(theme: ViewerTheme | undefined): void;
4015
+ setTheme(theme: ViewerTheme$1 | undefined): void;
3271
4016
  /** Switch the UI locale (rebuilds the chrome labels). */
3272
4017
  setLocale(locale: string): void;
3273
4018
  /** Enter presentation mode (real Fullscreen API). */
@@ -3334,7 +4079,7 @@ interface PptxViewerInstance extends PowerPointViewerAPI, ViewerCustomizationApi
3334
4079
  */
3335
4080
  exportJson(): void;
3336
4081
  /** The element-renderer registry in effect (extension point). */
3337
- getRegistry(): ElementRendererRegistry;
4082
+ getRegistry(): index_d_exports$1.ElementRendererRegistry;
3338
4083
  /**
3339
4084
  * Escape hatch: the live `pptx-viewer-core` handler for the loaded file
3340
4085
  * (or `null`). Enables advanced operations (save, markdown conversion,
@@ -3386,9 +4131,9 @@ interface ChromeHost {
3386
4131
  /** The host options with the UI customisation folded into the chrome flags. */
3387
4132
  getChromeOptions(): PptxViewerOptions;
3388
4133
  /** The live resolved UI customisation. */
3389
- getResolvedCustomization(): ResolvedCustomization;
4134
+ getResolvedCustomization(): ResolvedCustomization$1;
3390
4135
  /** The viewer's live theme (kept in sync by `setTheme`); read on mount/remount instead of the static `options.theme`. */
3391
- currentTheme: ViewerTheme | undefined;
4136
+ currentTheme: ViewerTheme$1 | undefined;
3392
4137
  editor: {
3393
4138
  commitNotes(notes: string, notesSegments?: TextSegment[]): void;
3394
4139
  getEditActions(): EditActions;
@@ -3531,7 +4276,7 @@ interface ChromeHost {
3531
4276
  openFile(): void;
3532
4277
  openRecentFile(key: string): void;
3533
4278
  createPresentation(templateId: string): void;
3534
- setTheme(theme: ViewerTheme | undefined): void;
4279
+ setTheme(theme: ViewerTheme$1 | undefined): void;
3535
4280
  applyPresentationTheme(presetId: string): void;
3536
4281
  }
3537
4282
  //#endregion
@@ -3539,7 +4284,7 @@ interface ChromeHost {
3539
4284
  interface ViewerCustomizationLifecycle {
3540
4285
  readonly controller: ViewerCustomizationController;
3541
4286
  /** The current resolved customisation (read lazily by every render site). */
3542
- getResolved(): ResolvedCustomization;
4287
+ getResolved(): ResolvedCustomization$1;
3543
4288
  /**
3544
4289
  * The host options with the customisation folded into the flags the chrome
3545
4290
  * builders already read: `hiddenActions` (legacy list unioned with the
@@ -3548,7 +4293,7 @@ interface ViewerCustomizationLifecycle {
3548
4293
  getChromeOptions(): PptxViewerOptions;
3549
4294
  /** The host configured `ai` AND the customisation keeps the AI feature. */
3550
4295
  isAiEnabled(): boolean;
3551
- isDialogAvailable(dialog: ViewerDialogId): boolean;
4296
+ isDialogAvailable(dialog: ViewerDialogId$1): boolean;
3552
4297
  /**
3553
4298
  * Start applying the customisation: push the constraints into the options
3554
4299
  * store now and on every change, and call `onChange` after each change so
@@ -3559,6 +4304,44 @@ interface ViewerCustomizationLifecycle {
3559
4304
  }
3560
4305
  //#endregion
3561
4306
  //#region src/viewer/export-lifecycle.d.ts
4307
+ interface ExportLifecycleDeps {
4308
+ doc: Document;
4309
+ /** Host the off-screen capture stage mounts into; matches the viewer container. */
4310
+ container: HTMLElement;
4311
+ store: Store<ViewerState>;
4312
+ registry: index_d_exports$1.ElementRendererRegistry;
4313
+ getTranslator(): Translator;
4314
+ /**
4315
+ * The six 3D opt-in flags as getters (not plain booleans), each already
4316
+ * ANDed with Options > Advanced > "Disable 3D rendering" by the caller
4317
+ * (see `resolve3DRenderingFlags`) and read fresh on every export/print so
4318
+ * a mid-session toggle reaches the very next one. See `RasterizeSlideDeps`.
4319
+ */
4320
+ getSmartArt3D(): boolean;
4321
+ getSurfaceChart3D(): boolean;
4322
+ getBarChart3D(): boolean;
4323
+ getLineChart3D(): boolean;
4324
+ getAreaChart3D(): boolean;
4325
+ getPieChart3D(): boolean;
4326
+ /**
4327
+ * Options > Advanced > "Default resolution" / "Do not compress images"
4328
+ * raster-scale multiplier (see `resolveImageResolutionScale`), read fresh
4329
+ * on every rasterize call so a mid-session change reaches the next export.
4330
+ */
4331
+ getImageResolutionScale(): number;
4332
+ /**
4333
+ * Options > Advanced > "Print hidden slides", read fresh on every print so a
4334
+ * mid-session toggle reaches the very next print job.
4335
+ */
4336
+ getIncludeHiddenSlides?(): boolean;
4337
+ /**
4338
+ * Options > Advanced > "High quality" raster scale for the print
4339
+ * notes/handouts fallback path, read fresh on every print.
4340
+ */
4341
+ getPrintHighQuality?(): boolean;
4342
+ /** Source file name (title-bar name); drives export download names. */
4343
+ fileName?: string;
4344
+ }
3562
4345
  /** The export slice of the public viewer API (see `PptxViewerInstance`). */
3563
4346
  interface ViewerExportApi {
3564
4347
  /** Export a single slide as a PNG download. Defaults to the current slide. */
@@ -3596,14 +4379,23 @@ declare abstract class ViewerExportHost implements ViewerExportApi {
3596
4379
  print(options?: PrintOptions): Promise<boolean>;
3597
4380
  exportJson(): void;
3598
4381
  }
4382
+ /**
4383
+ * Build the export feature for one `PptxViewer` instance: the off-screen
4384
+ * rasterisation stage (`./export/rasterize-slide.ts`) plus the
4385
+ * PNG/PDF/GIF/video/print export controller
4386
+ * (`./export/export-controller.ts`) wired to it. Split out of `PptxViewer`
4387
+ * (mirrors `chrome-lifecycle.ts`) purely to keep the class file under the
4388
+ * file-size budget; owns no state beyond the capture stage.
4389
+ */
4390
+ declare function createExportLifecycle(deps: ExportLifecycleDeps): ExportLifecycle;
3599
4391
  //#endregion
3600
4392
  //#region src/viewer/customization-host.d.ts
3601
- declare abstract class ViewerCustomizationHost extends ViewerExportHost implements ViewerCustomizationApi {
4393
+ declare abstract class ViewerCustomizationHost extends ViewerExportHost implements ViewerCustomizationApi$1 {
3602
4394
  protected abstract readonly customization: ViewerCustomizationLifecycle;
3603
4395
  private get customizationApi();
3604
- getCustomization(): ViewerCustomization;
3605
- setCustomization(next: ViewerCustomization): void;
3606
- updateCustomization(patch: ViewerCustomization): void;
4396
+ getCustomization(): ViewerCustomization$1;
4397
+ setCustomization(next: ViewerCustomization$1): void;
4398
+ updateCustomization(patch: ViewerCustomization$1): void;
3607
4399
  resetCustomization(): void;
3608
4400
  hideRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
3609
4401
  showRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
@@ -3613,15 +4405,15 @@ declare abstract class ViewerCustomizationHost extends ViewerExportHost implemen
3613
4405
  showToolbarButton(button: ToolbarButtonId | RibbonControlId): void;
3614
4406
  hideRibbonControl(control: RibbonControlId): void;
3615
4407
  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;
4408
+ hideOptionsPage(page: OptionsPageId$1): void;
4409
+ showOptionsPage(page: OptionsPageId$1): void;
4410
+ hideOptionsSection(section: OptionsSectionId$1): void;
4411
+ showOptionsSection(section: OptionsSectionId$1): void;
4412
+ hideSetting(setting: OptionsSettingId$1): void;
4413
+ showSetting(setting: OptionsSettingId$1): void;
4414
+ lockSetting(setting: OptionsSettingId$1, value: ViewerOptionPrimitive, hidden?: boolean): void;
4415
+ unlockSetting(setting: OptionsSettingId$1): void;
4416
+ setSettingDefault(setting: OptionsSettingId$1, value: ViewerOptionPrimitive | undefined): void;
3625
4417
  hideBackstagePage(page: BackstagePage): void;
3626
4418
  showBackstagePage(page: BackstagePage): void;
3627
4419
  hideBackstageCard(card: BackstageCardId): void;
@@ -3632,10 +4424,10 @@ declare abstract class ViewerCustomizationHost extends ViewerExportHost implemen
3632
4424
  showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
3633
4425
  disableShortcut(action: EditorKeyActionName): void;
3634
4426
  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;
4427
+ remapShortcut(action: EditorKeyActionName, chords: ShortcutChord$1 | readonly ShortcutChord$1[] | undefined): void;
4428
+ setPanelVisible(panel: ViewerPanelId$1, visible: boolean): void;
4429
+ setFeatureEnabled(feature: ViewerFeatureId$1, enabled: boolean): void;
4430
+ setDialogAvailable(dialog: ViewerDialogId$1, available: boolean): void;
3639
4431
  }
3640
4432
  //#endregion
3641
4433
  //#region src/viewer/PptxViewer.d.ts
@@ -3652,7 +4444,7 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
3652
4444
  readonly renderer: RenderController;
3653
4445
  t: Translator;
3654
4446
  /** The viewer's live theme (kept in sync by `setTheme`); read by `ChromeHost` on mount/remount. */
3655
- currentTheme: ViewerTheme | undefined;
4447
+ currentTheme: ViewerTheme$1 | undefined;
3656
4448
  private readonly availableThemes;
3657
4449
  private readonly availableLocales;
3658
4450
  private currentThemeKey;
@@ -3777,7 +4569,7 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
3777
4569
  getActiveSlide: () => PptxSlide | undefined;
3778
4570
  getElements: (index?: number) => readonly PptxElement[];
3779
4571
  getElementById: (id: string, index?: number) => PptxElement | undefined;
3780
- updateElements: (updates: readonly ElementUpdate[], options?: ElementUpdateOptions) => Promise<void>;
4572
+ updateElements: (updates: readonly ElementUpdate$1[], options?: ElementUpdateOptions$1) => Promise<void>;
3781
4573
  updateElement: (id: string, updates: Partial<PptxElement>) => void;
3782
4574
  addElement: (element: PptxElement) => string | undefined;
3783
4575
  deleteElements: (ids: string[]) => void;
@@ -3804,14 +4596,14 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
3804
4596
  * isn't tracked as a "choice", matching how the Design tab's own gallery
3805
4597
  * already calls this method.
3806
4598
  */
3807
- setTheme(theme: ViewerTheme | undefined): void;
4599
+ setTheme(theme: ViewerTheme$1 | undefined): void;
3808
4600
  applyPresentationTheme(presetId: string): void;
3809
4601
  /** Run the shared WCAG checks against the live deck and show the results. */
3810
4602
  openAccessibility(): void;
3811
4603
  openSettings(tab?: 'general' | 'shortcuts'): void;
3812
4604
  openSetUpSlideShow(): void;
3813
4605
  toggleSubtitles(): void;
3814
- subtitleOptionsStore(): ViewerOptionsStore;
4606
+ subtitleOptionsStore(): import("ooxml-ui/pptx").ViewerOptionsStore;
3815
4607
  openHeaderFooter(): void;
3816
4608
  openCompare(): void;
3817
4609
  openPrintDialog(): void;
@@ -4053,7 +4845,7 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
4053
4845
  getSelectedElementId: () => string | null;
4054
4846
  enterPresentation(): Promise<void>;
4055
4847
  exitPresentation(): Promise<void>;
4056
- getRegistry: () => ElementRendererRegistry;
4848
+ getRegistry: () => index_d_exports$1.ElementRendererRegistry;
4057
4849
  getHandler: () => PptxHandler | null;
4058
4850
  startCollaboration(config: CollaborationConfig): Promise<void>;
4059
4851
  stopCollaboration: () => void;
@@ -4075,7 +4867,7 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
4075
4867
  /** The host options with the UI customisation folded in (read on every chrome mount). */
4076
4868
  getChromeOptions(): PptxViewerOptions;
4077
4869
  /** The live resolved UI customisation (every render site reads this). */
4078
- getResolvedCustomization(): ResolvedCustomization;
4870
+ getResolvedCustomization(): ResolvedCustomization$1;
4079
4871
  /** Rebuild the whole chrome (locale switch, customisation change) and re-wire it. */
4080
4872
  private rebuildChrome;
4081
4873
  private remountChrome;
@@ -4100,11 +4892,11 @@ interface CollaborationControllerDeps {
4100
4892
  /** When supplied, apply a session restriction without replacing host edit permission. */
4101
4893
  onReadOnlyChange?: (readOnly: boolean) => void;
4102
4894
  /** Notified on every connection-status transition. */
4103
- onStatusChange?: (status: ConnectionStatus) => void;
4895
+ onStatusChange?: (status: ConnectionStatus$1) => void;
4104
4896
  }
4105
4897
  interface CollaborationController {
4106
4898
  /** Connect and begin syncing. Stops any prior session first. */
4107
- start(config: CollaborationConfig): Promise<void>;
4899
+ start(config: CollaborationConfig$1): Promise<void>;
4108
4900
  /** Disconnect and tear the session down. */
4109
4901
  stop(): void;
4110
4902
  /** Whether a session is currently active. */
@@ -4112,7 +4904,7 @@ interface CollaborationController {
4112
4904
  /** Whether the session's role or host readiness currently blocks editing. */
4113
4905
  isReadOnly(): boolean;
4114
4906
  /** Current connection status. */
4115
- getStatus(): ConnectionStatus;
4907
+ getStatus(): ConnectionStatus$1;
4116
4908
  /** Publish a cursor move (slide-space px); no-op when no session is active. */
4117
4909
  setCursor(x: number, y: number, activeSlideIndex?: number): void;
4118
4910
  /** Publish the local selection; no-op when no session is active. */
@@ -4122,14 +4914,14 @@ interface CollaborationController {
4122
4914
  /** Follow the given peer's active slide, or `null` to stop following. */
4123
4915
  followUser(clientId: number | null): void;
4124
4916
  /** The last config used to start a session (persists after `stop()`, for retry). */
4125
- getConfig(): CollaborationConfig | null;
4917
+ getConfig(): CollaborationConfig$1 | null;
4126
4918
  /**
4127
4919
  * The load pipeline is about to commit a parsed deck to the store: suppress
4128
4920
  * local->doc slide publishing until {@link notifyContentLoaded} runs, so a
4129
4921
  * late joiner's bootstrap deck is never written into the room's doc before
4130
4922
  * the adoption check.
4131
4923
  */
4132
- beginContentLoad(origin: CollabLoadOrigin): void;
4924
+ beginContentLoad(origin: CollabLoadOrigin$1): void;
4133
4925
  /**
4134
4926
  * A content load finished applying to viewer state.
4135
4927
  *
@@ -4139,13 +4931,13 @@ interface CollaborationController {
4139
4931
  * the opposite case - it is what they asked for, so the deferred publish
4140
4932
  * runs and the room adopts it (see `shouldRoomSlidesReplaceLoad`).
4141
4933
  */
4142
- notifyContentLoaded(origin: CollabLoadOrigin): void;
4934
+ notifyContentLoaded(origin: CollabLoadOrigin$1): void;
4143
4935
  /**
4144
4936
  * Interim ("live preview") Y.Doc write channel: publishes in-flight inline
4145
4937
  * editor text that has not reached the store yet, so peers see typing as it
4146
4938
  * happens instead of on commit. Dormant outside a session.
4147
4939
  */
4148
- readonly livePatcher: CollaborationLivePatcher;
4940
+ readonly livePatcher: CollaborationLivePatcher$1;
4149
4941
  /** Stop and release everything (viewer destroy). */
4150
4942
  destroy(): void;
4151
4943
  }
@@ -4177,7 +4969,7 @@ export declare function createCollaborationController(deps: CollaborationControl
4177
4969
  interface CollaborationCursors {
4178
4970
  /** Mount as a sibling of the rendered stage inside the stage wrap. */
4179
4971
  el: HTMLElement;
4180
- update(cursors: readonly RemoteCursor[], scale: number): void;
4972
+ update(cursors: readonly RemoteCursor$1[], scale: number): void;
4181
4973
  destroy(): void;
4182
4974
  }
4183
4975
  export declare function createCollaborationCursors(doc: Document): CollaborationCursors;
@@ -4203,7 +4995,7 @@ export declare function createCollaborationCursors(doc: Document): Collaboration
4203
4995
  interface RemoteSelectionOverlay {
4204
4996
  /** Mount as a sibling of the rendered stage inside the stage wrap. */
4205
4997
  el: HTMLElement;
4206
- update(presences: readonly SanitizedPresence[], elements: readonly PptxElement[], activeSlideIndex: number, scale: number): void;
4998
+ update(presences: readonly SanitizedPresence$1[], elements: readonly PptxElement[], activeSlideIndex: number, scale: number): void;
4207
4999
  destroy(): void;
4208
5000
  }
4209
5001
  //#endregion
@@ -4216,7 +5008,7 @@ interface CollaborationShellOptions extends Pick<CollaborationControllerDeps, 's
4216
5008
  getSourcePending?(): boolean;
4217
5009
  getSourceError?(): boolean;
4218
5010
  getScale?(): number;
4219
- onStateChange?(state: CollaborationShellState): void;
5011
+ onStateChange?(state: CollaborationShellState$1): void;
4220
5012
  }
4221
5013
  interface CollaborationShell {
4222
5014
  /** Existing controller for load boundaries and interim edit publication. */
@@ -4224,8 +5016,8 @@ interface CollaborationShell {
4224
5016
  /** Mount beside the scaled stage; refresh after changing the host's zoom. */
4225
5017
  cursorOverlay: CollaborationCursors;
4226
5018
  selectionOverlay: RemoteSelectionOverlay;
4227
- setConfig(config: CollaborationConfig | undefined): Promise<void>;
4228
- getState(): CollaborationShellState;
5019
+ setConfig(config: CollaborationConfig$1 | undefined): Promise<void>;
5020
+ getState(): CollaborationShellState$1;
4229
5021
  /** Re-evaluate host permission, loading or zoom getters after host-only changes. */
4230
5022
  refresh(): void;
4231
5023
  destroy(): void;
@@ -4233,9 +5025,57 @@ interface CollaborationShell {
4233
5025
  /** Thin custom-chrome wiring; document ownership and sync stay in the controller. */
4234
5026
  export declare function createCollaborationShell(options: CollaborationShellOptions): CollaborationShell;
4235
5027
  //#endregion
5028
+ //#region src/viewer/state-sync.d.ts
5029
+ interface StateSyncDeps {
5030
+ getChrome(): ViewerChrome;
5031
+ renderer: RenderController;
5032
+ callbacks: PptxViewerCallbacks;
5033
+ }
5034
+ /**
5035
+ * Build the store listener that turns {@link ViewerState} transitions into
5036
+ * chrome updates, stage re-renders, and host callbacks. Extracted from
5037
+ * {@link PptxViewer} to keep the class focused on its public API.
5038
+ */
5039
+ declare function createStateSync(deps: StateSyncDeps): StoreListener<ViewerState>;
5040
+ //#endregion
5041
+ //#region src/viewer/theme-apply.d.ts
5042
+ /**
5043
+ * Apply a `ViewerTheme` to the viewer root as inline `--pptx-*` custom
5044
+ * properties (over the stylesheet defaults), removing whatever the previous
5045
+ * theme set. Returns the list of property names now applied, to be passed
5046
+ * back on the next call.
5047
+ */
5048
+ declare function applyThemeVars(root: HTMLElement, theme: ViewerTheme$1 | undefined, previouslyApplied: readonly string[]): string[];
5049
+ //#endregion
5050
+ //#region src/viewer/styles/css.d.ts
5051
+ /** The full stylesheet text (theme-var defaults + chrome rules + editor + collab chrome). */
5052
+ declare function buildViewerCss(): string;
5053
+ //#endregion
4236
5054
  //#region src/viewer/styles/inject.d.ts
5055
+ /**
5056
+ * Inject the viewer stylesheet into a document's `<head>` once (idempotent
5057
+ * per document). Called automatically by `createPptxViewer`; hosts using a
5058
+ * strict CSP without `style-src 'unsafe-inline'` can instead ship the string
5059
+ * from `getViewerCss()` themselves and rely on this being a no-op once a
5060
+ * `#pptx-vanilla-viewer-styles` node exists.
5061
+ */
5062
+ declare function ensureViewerStyles(doc: Document): void;
4237
5063
  /** The complete viewer stylesheet text (for hosts that self-manage CSS). */
4238
5064
  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 };
5065
+ declare namespace index_d_exports {
5066
+ 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, 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 };
5067
+ }
5068
+ type CssStyleMap = index_d_exports$1.CssStyleMap;
5069
+ type ElementRenderContext = index_d_exports$1.ElementRenderContext;
5070
+ type ElementRenderer = index_d_exports$1.ElementRenderer;
5071
+ type ElementRendererRegistry = index_d_exports$1.ElementRendererRegistry;
5072
+ type PptxElementType = index_d_exports$1.PptxElementType;
5073
+ type SlideStageOptions = index_d_exports$1.SlideStageOptions;
5074
+ type applyStyleMap = index_d_exports$1.applyStyleMap;
5075
+ type createDefaultRegistry = index_d_exports$1.createDefaultRegistry;
5076
+ type createEl = index_d_exports$1.createEl;
5077
+ type createElementRendererRegistry = index_d_exports$1.createElementRendererRegistry;
5078
+ type createSvgEl = index_d_exports$1.createSvgEl;
5079
+ type renderSlideStage = index_d_exports$1.renderSlideStage;
5080
+ 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
5081
  //# sourceMappingURL=index.d.ts.map