pptx-vanilla-viewer 3.48.0 → 3.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +131 -0
- package/README.md +3 -3
- package/dist/i18n/de.cjs +1138 -221
- package/dist/i18n/de.mjs +1138 -221
- package/dist/i18n/es.cjs +1138 -221
- package/dist/i18n/es.mjs +1138 -221
- package/dist/i18n/fr.cjs +1138 -221
- package/dist/i18n/fr.mjs +1138 -221
- package/dist/i18n/zh-CN.cjs +1138 -221
- package/dist/i18n/zh-CN.mjs +1138 -221
- package/dist/index.cjs +111 -439
- package/dist/index.d.ts +98 -128
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +107 -435
- package/dist/styles.css +7 -335
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __reExport, i as __exportAll, r as index_d_exports$2 } from "./transition-overlay-xJ7M4VZA.js";
|
|
2
|
-
import { AccountAuthConfig, AccountAuthConfig as AccountAuthConfig$1, AlignEdge, AnimationGroup, AutosaveActivation, AutosaveRecord, AutosaveRecord as AutosaveRecord$1, AutosaveRecoveryOffer, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, BackstageCardId, BackstageCustomization, BackstagePage, CANVAS_CONTEXT_MENU_COMMAND_IDS, CanvasContextMenuCommandId, CanvasSize, ChangeCaseMode, ChartPartRef, CollabLoadOrigin, CollabLoadOrigin as CollabLoadOrigin$1, CollaborationConfig, CollaborationConfig as CollaborationConfig$1, CollaborationInput, CollaborationInput as CollaborationInput$1, CollaborationLivePatcher, CollaborationLivePatcher as CollaborationLivePatcher$1, CollaborationRole, CollaborationShellState, CollaborationShellState as CollaborationShellState$1, CollaborationState, CollaborationState as CollaborationState$1, CollaborationState as CollaborationState$2, CollaborationTransport, CompatibilityWarningToast, ConnectionStatus, ConnectionStatus as ConnectionStatus$1, ContextMenuCommandId, ContextMenuCustomization, ContextMenuTableContext, CropElementUpdate, CropSession, DeckSaveIntent, DeckStyleState, DocumentStorage, 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, HostBackstagePage, HostBackstageRegionId, HostCanvasMenuContext, HostElementMenuContext, HostMenuCommand, InlineListReadResult, InlineListReadResult as InlineListReadResult$1, InlineTextEditSnapshot, InlineTextEditSnapshot as InlineTextEditSnapshot$1, InlineTextSelection, InlineTextSelection as InlineTextSelection$1, InsertChartKind, KeyboardCustomization, MasterViewCrudAction, MasterViewCrudActionId, MobileSheetKey,
|
|
2
|
+
import { AccountAuthConfig, AccountAuthConfig as AccountAuthConfig$1, AlignEdge, AnimationGroup, AutosaveActivation, AutosaveRecord, AutosaveRecord as AutosaveRecord$1, AutosaveRecoveryController, 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, CollaborationInput, CollaborationInput as CollaborationInput$1, CollaborationLivePatcher, CollaborationLivePatcher as CollaborationLivePatcher$1, CollaborationRole, CollaborationShellState, CollaborationShellState as CollaborationShellState$1, CollaborationState, CollaborationState as CollaborationState$1, CollaborationState as CollaborationState$2, CollaborationTransport, CompatibilityWarningToast, ConnectionStatus, ConnectionStatus as ConnectionStatus$1, ContextMenuCommandId, ContextMenuCustomization, ContextMenuTableContext, CropElementUpdate, CropSession, DeckSaveIntent, DeckStyleState, DocumentStorage, 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, HostBackstagePage, HostBackstageRegionId, HostCanvasMenuContext, HostElementMenuContext, HostMenuCommand, InlineListReadResult, InlineListReadResult as InlineListReadResult$1, InlineTextDraft, InlineTextEditSnapshot, InlineTextEditSnapshot as InlineTextEditSnapshot$1, InlineTextSelection, InlineTextSelection as InlineTextSelection$1, InsertChartKind, InsertChartOptions, KeyboardCustomization, MasterViewCrudAction, MasterViewCrudActionId, MobileSheetKey, 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, PptxUiRibbonInsertElement, PresentationBlackout, PresentationPointerTool, PresentationSnapshot, PrintSettings, RIBBON_TAB_IDS, RasterizeElementResult, RasterizeElementTilesResult, ReadOnlyBannerPasswordError, ReadOnlyRecommendation, RemoteCursor, RemoteCursor as RemoteCursor$1, ResolvedCustomization, ResolvedCustomization as ResolvedCustomization$1, ReviewCommentsHost, RibbonAddInTab, RibbonContextualTabId, RibbonControlId, RibbonCustomization, RibbonGalleryApplyResult, RibbonGalleryContext, RibbonGroupId, RibbonTransitionDraft, RulerUnit, RunProgramNotice, SanitizedPresence, SanitizedPresence as SanitizedPresence$1, SavedPresentationFormat, SessionDeck, ShapePresetType, ShareDefaults, ShortcutChord, ShortcutChord as ShortcutChord$1, SlideCommentsChange, SlidePasteRequest, SlideSizeEmu, SlideSizeRescaleMode, SlideTemplateId, StatusBarAutosave, StrokeToInkElementOpts, TOOLBAR_BUTTON_IDS, TextAdvancedChanges, ThemeCatalogEntry, ToolbarActionId, ToolbarActionId as ToolbarActionId$1, ToolbarButtonId, ToolbarTabId, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, ViewerAutosaveStatus, ViewerCapabilityId, 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, ViewerRegionContext, ViewerRegionId, ViewerRegionRenderer, ViewerTheme, ViewerTheme as ViewerTheme$1, ViewerThemeColors, ViewportFitOptions, ViewportFitOptions as ViewportFitOptions$1, ViewportFitPadding, ZoomExcursion, ZoomNavigationTarget, buildInlineTextCommitPatch, canInteractWithElement, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, findReplacementAvailability, forgetSessionDeck, getSessionTabId, isLegacyBinaryPresentation, isSupportedPresentationFile, loadPresentationDeck, loadSessionDeck, overlayInlineTextSnapshot, parsePresentationSessionId, presentationBaseName, rememberSessionDeck, restoreSessionDeck, savedPresentationFileName, themeToCssVars, vermilionDarkTheme, vermilionLightTheme } from "ooxml-ui/pptx";
|
|
3
3
|
import { LocaleCatalogEntry, TranslationKey, TranslationMessages, Translator, createTranslator, keyToLabel, translationsEn } from "ooxml-ui/pptx/i18n";
|
|
4
4
|
import { LoadPresentationOptions, LoadedPresentation, loadPresentation, revokeBlobUrls } from "ooxml-ui/pptx/dom";
|
|
5
5
|
import { PptxAiBridge, PptxAiConfig, PptxAiConfig as PptxAiConfig$1, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiWritePolicy } from "ooxml-ui/pptx/ai";
|
|
@@ -27,10 +27,8 @@ export declare function createStore<T extends object>(initial: T): Store<T>;
|
|
|
27
27
|
import * as import_ooxml_ui_pptx_dom from "ooxml-ui/pptx/dom";
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/viewer/state/viewer-state.d.ts
|
|
30
|
-
/** Why the last password attempt failed; see `checkModifyPassword` (`pptx
|
|
31
|
-
type ModifyPasswordErrorReason$1 =
|
|
32
|
-
ok: false;
|
|
33
|
-
}>['reason'];
|
|
30
|
+
/** Why the last password attempt failed; see `checkModifyPassword` (`ooxml-ui/pptx`). */
|
|
31
|
+
type ModifyPasswordErrorReason$1 = ReadOnlyBannerPasswordError;
|
|
34
32
|
/** `zoom` is either an explicit scale factor (1 = 100%) or fit-to-viewport. */
|
|
35
33
|
type ZoomLevel = number | 'fit';
|
|
36
34
|
/**
|
|
@@ -318,9 +316,18 @@ interface ViewerState {
|
|
|
318
316
|
* Whether the read-only recommendation banner has been closed for this
|
|
319
317
|
* load, by either "Edit anyway" or the plain dismiss button. Independent
|
|
320
318
|
* from whether editing is actually locked: "Dismiss" hides the banner but
|
|
321
|
-
* keeps the lock, only "Edit anyway" lifts it too
|
|
319
|
+
* keeps the lock, only "Edit anyway" lifts it too (see
|
|
320
|
+
* {@link readOnlyEditAnyway}).
|
|
322
321
|
*/
|
|
323
322
|
readOnlyBannerDismissed: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Whether "Edit anyway" (or the right password) lifted the read-only
|
|
325
|
+
* recommendation's lock for this load. The lock is ANDed into the editable
|
|
326
|
+
* state, so the host's `setEditable(true)` does not lift it. Optional so a
|
|
327
|
+
* host state built before this field still type-checks; missing reads as
|
|
328
|
+
* false (`createInitialViewerState` sets it).
|
|
329
|
+
*/
|
|
330
|
+
readOnlyEditAnyway?: boolean;
|
|
324
331
|
/**
|
|
325
332
|
* The loaded deck's raw `p:modifyVerifier`, kept alongside
|
|
326
333
|
* {@link readOnlyRecommendation} so `submitReadOnlyPassword` can check a
|
|
@@ -337,6 +344,13 @@ interface ViewerState {
|
|
|
337
344
|
readOnlyPasswordError: ModifyPasswordErrorReason$1 | null;
|
|
338
345
|
/** True while a submitted password is being checked; disables the form. */
|
|
339
346
|
readOnlyCheckingPassword: boolean;
|
|
347
|
+
/**
|
|
348
|
+
* Which password check a result belongs to (`ReadOnlySession.passwordCheck`
|
|
349
|
+
* in `ooxml-ui/pptx`): a new load, Cancel and every new check move it on,
|
|
350
|
+
* so a check that finishes late is dropped. Optional like
|
|
351
|
+
* {@link readOnlyEditAnyway}; missing reads as 0.
|
|
352
|
+
*/
|
|
353
|
+
readOnlyPasswordCheck?: number;
|
|
340
354
|
/**
|
|
341
355
|
* Compatibility-warning toasts for the current load (deck-level
|
|
342
356
|
* `data.warnings` concatenated with every slide's own `warnings`, deduped
|
|
@@ -730,9 +744,6 @@ interface InspectorActions {
|
|
|
730
744
|
setTableRowHeight(row: number, height: number): void;
|
|
731
745
|
mergeTableCells(cells: TableCellPosition[]): void;
|
|
732
746
|
splitTableCell(cell: TableCellPosition): void;
|
|
733
|
-
setSmartArtNodeText(nodeId: string, text: string): void;
|
|
734
|
-
setSmartArtNodeStyle(nodeId: string, patch: Partial<index_d_exports$2.PptxSmartArtNodeStyle>): void;
|
|
735
|
-
mutateSmartArtNode(nodeId: string, action: 'add' | 'addChild' | 'remove' | 'promote' | 'demote'): void;
|
|
736
747
|
replaceSmartArtData(data: index_d_exports$2.PptxSmartArtData): void;
|
|
737
748
|
setSmartArtLayout(layout: index_d_exports$2.SmartArtLayoutType): void;
|
|
738
749
|
setSmartArtColorScheme(scheme: index_d_exports$2.SmartArtColorScheme): void;
|
|
@@ -905,8 +916,14 @@ interface EditActions extends TextActions, ArrangeActions, ClipboardActions, Sli
|
|
|
905
916
|
masterView: MasterViewCrudActions;
|
|
906
917
|
comments: CommentActions;
|
|
907
918
|
toggleFormatPainter(): void;
|
|
908
|
-
|
|
909
|
-
|
|
919
|
+
/**
|
|
920
|
+
* Every pick adds `color` to the recent colours except a drag tick through
|
|
921
|
+
* the native colour picker (`committed: false`), which only applies live:
|
|
922
|
+
* the picker records the colour it settles on through `pushRecentColor`.
|
|
923
|
+
*/
|
|
924
|
+
setShapeFill(color: string, ref?: index_d_exports$2.PptxThemeColorRef, committed?: boolean): void;
|
|
925
|
+
/** Same `committed` contract as {@link setShapeFill}, for the outline colour. */
|
|
926
|
+
setShapeStroke(color: string, ref?: index_d_exports$2.PptxThemeColorRef, committed?: boolean): void;
|
|
910
927
|
setShapeStrokeWidth(width: number): void;
|
|
911
928
|
setShapeStyle(patch: Partial<index_d_exports$2.ShapeStyle>): void;
|
|
912
929
|
setShapeType(shapeType: string): void;
|
|
@@ -923,7 +940,8 @@ interface EditActions extends TextActions, ArrangeActions, ClipboardActions, Sli
|
|
|
923
940
|
/** Existing history-tracked insertion transaction for a prepared element. */
|
|
924
941
|
insertElement(element: index_d_exports$2.PptxElement): void;
|
|
925
942
|
/** Insert a default chart for the given dropdown entry (defaults to Column). */
|
|
926
|
-
|
|
943
|
+
/** `options` carries the Insert Chart dialog's title and grouping. */
|
|
944
|
+
insertChart(chartKind?: InsertChartKind, options?: InsertChartOptions): void;
|
|
927
945
|
insertSmartArt(layout: index_d_exports$2.SmartArtLayout, defaultItems: string[]): void;
|
|
928
946
|
insertEquation(omml: Record<string, unknown>): void;
|
|
929
947
|
updateEquation(id: string, omml: Record<string, unknown>): void;
|
|
@@ -1123,11 +1141,14 @@ interface InspectorHandlers {
|
|
|
1123
1141
|
/**
|
|
1124
1142
|
* Set the shape fill colour. Pass `ref` for a theme-swatch pick (wins on
|
|
1125
1143
|
* save, so the fill follows a later theme change); omit it to clear a
|
|
1126
|
-
* previously-stored ref for a plain/custom/recent pick.
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1144
|
+
* previously-stored ref for a plain/custom/recent pick. The colour also
|
|
1145
|
+
* goes into the recent colours, unless `committed` is `false`: a drag tick
|
|
1146
|
+
* through the native picker, which records only the colour it settles on
|
|
1147
|
+
* (its `change`, through {@link pushRecentColor}).
|
|
1148
|
+
*/
|
|
1149
|
+
setShapeFill(color: string, ref?: index_d_exports$2.PptxThemeColorRef, committed?: boolean): void;
|
|
1150
|
+
/** Same `ref` and `committed` contract as {@link setShapeFill}, for the stroke colour. */
|
|
1151
|
+
setShapeStroke(color: string, ref?: index_d_exports$2.PptxThemeColorRef, committed?: boolean): void;
|
|
1131
1152
|
setShapeStrokeWidth(width: number): void;
|
|
1132
1153
|
setShapeStyle(patch: Partial<index_d_exports$2.ShapeStyle>): void;
|
|
1133
1154
|
setShapeType(shapeType: string): void;
|
|
@@ -1212,15 +1233,11 @@ interface InspectorHandlers {
|
|
|
1212
1233
|
setTableRowHeight(row: number, height: number): void;
|
|
1213
1234
|
mergeTableCells(cells: TableCellPosition[]): void;
|
|
1214
1235
|
splitTableCell(cell: TableCellPosition): void;
|
|
1215
|
-
setSmartArtNodeText(nodeId: string, text: string): void;
|
|
1216
|
-
setSmartArtNodeStyle(nodeId: string, patch: Partial<index_d_exports$2.PptxSmartArtNodeStyle>): void;
|
|
1217
|
-
mutateSmartArtNode(nodeId: string, action: 'add' | 'addChild' | 'remove' | 'promote' | 'demote'): void;
|
|
1218
1236
|
/**
|
|
1219
1237
|
* Commit a whole replacement `smartArtData`, reflowed and history-integrated
|
|
1220
|
-
* like every other SmartArt mutation. Used by the text pane
|
|
1221
|
-
*
|
|
1222
|
-
*
|
|
1223
|
-
* handlers` builders before committing.
|
|
1238
|
+
* like every other SmartArt mutation. Used by the text pane
|
|
1239
|
+
* (`pptx-ui-smartart-text-pane`), which computes the next data through the
|
|
1240
|
+
* pptx SmartArt facades before emitting it.
|
|
1224
1241
|
*/
|
|
1225
1242
|
replaceSmartArtData(data: index_d_exports$2.PptxSmartArtData): void;
|
|
1226
1243
|
setSmartArtLayout(layout: index_d_exports$2.SmartArtLayoutType): void;
|
|
@@ -1940,8 +1957,8 @@ interface PresentationTouchControls {
|
|
|
1940
1957
|
declare function createPresentationTouchControls(doc: Document, t: Translator, handlers: PresentationTouchControlHandlers, hiddenActions?: readonly ToolbarActionId$1[]): PresentationTouchControls;
|
|
1941
1958
|
//#endregion
|
|
1942
1959
|
//#region src/viewer/ui/read-only-banner.d.ts
|
|
1943
|
-
/** Why the last password attempt failed; see `checkModifyPassword` (`pptx
|
|
1944
|
-
type ModifyPasswordErrorReason =
|
|
1960
|
+
/** Why the last password attempt failed; see `checkModifyPassword` (`ooxml-ui/pptx`). */
|
|
1961
|
+
type ModifyPasswordErrorReason = ReadOnlyBannerPasswordError;
|
|
1945
1962
|
//#endregion
|
|
1946
1963
|
//#region src/viewer/ui/ribbon/tabs/view-tab.d.ts
|
|
1947
1964
|
/** The View > Show toggles, as the viewer state currently holds them. */
|
|
@@ -2978,57 +2995,6 @@ declare const DEFAULT_RIBBON_TAB: RibbonTabId;
|
|
|
2978
2995
|
/** True when `id` is a known ribbon tab (guards persisted/host-supplied tab ids). */
|
|
2979
2996
|
declare function isRibbonTab(id: string): id is RibbonTabId;
|
|
2980
2997
|
//#endregion
|
|
2981
|
-
//#region src/viewer/ui/swatch-picker.d.ts
|
|
2982
|
-
/**
|
|
2983
|
-
* Office "Standard Colors" swatch set, shared by both the font-colour and
|
|
2984
|
-
* highlight-colour pickers (`pptx-viewer-shared`'s canonical catalogue, so
|
|
2985
|
-
* this binding cannot drift from the others' standard-colour row).
|
|
2986
|
-
*/
|
|
2987
|
-
declare const OFFICE_STANDARD_SWATCHES: readonly string[];
|
|
2988
|
-
interface SwatchPickerOptions {
|
|
2989
|
-
/** Accessible label / title for the trigger button. */
|
|
2990
|
-
label: string;
|
|
2991
|
-
/** Icon shown in the trigger (a small colour bar under it reflects the value). */
|
|
2992
|
-
icon: IconName;
|
|
2993
|
-
swatches: readonly string[];
|
|
2994
|
-
/** Fallback colour when no value is set yet. */
|
|
2995
|
-
fallback: string;
|
|
2996
|
-
onSelect(hex: string): void;
|
|
2997
|
-
/**
|
|
2998
|
-
* Fired ONLY by a theme-swatch click, carrying both the hex and the ref.
|
|
2999
|
-
* Provide alongside `themeColorMap` to show the deck's real "Theme Colors"
|
|
3000
|
-
* grid above the standard swatches (font colour only: highlight colour has
|
|
3001
|
-
* no theme-ref concept on the model).
|
|
3002
|
-
*/
|
|
3003
|
-
onSelectTheme?(commit: ThemeColorPickerCommit): void;
|
|
3004
|
-
/** As `DropdownOptions.external`: the trigger is a shared Home button. */
|
|
3005
|
-
external?: {
|
|
3006
|
-
anchor(): HTMLElement | undefined;
|
|
3007
|
-
onOpenChange?(open: boolean): void;
|
|
3008
|
-
};
|
|
3009
|
-
}
|
|
3010
|
-
interface SwatchPickerHandle {
|
|
3011
|
-
el: HTMLElement;
|
|
3012
|
-
/** Open or close the menu (the only way to open an external-trigger picker). */
|
|
3013
|
-
toggle(): void;
|
|
3014
|
-
setValue(hex: string | undefined): void;
|
|
3015
|
-
setDisabled(disabled: boolean): void;
|
|
3016
|
-
/** B6: refresh the "Recent colours" row (most-recent-first); hidden when empty. */
|
|
3017
|
-
setRecentColors(colors: readonly string[]): void;
|
|
3018
|
-
/** Set the deck's theme colour map; the theme-swatch grid hides itself when `undefined`. */
|
|
3019
|
-
setThemeColorMap(themeColorMap: Record<string, string> | undefined): void;
|
|
3020
|
-
/** Highlight the swatch matching the element's current theme ref, if any. */
|
|
3021
|
-
setSelectedRef(ref: index_d_exports$2.PptxThemeColorRef | undefined): void;
|
|
3022
|
-
}
|
|
3023
|
-
/**
|
|
3024
|
-
* A reusable swatch-grid colour picker: a small pill trigger (icon + a
|
|
3025
|
-
* colour-bar swab of the current value) that opens a grid of preset swatches
|
|
3026
|
-
* plus a "Custom colour..." row backed by a native `<input type="color">`.
|
|
3027
|
-
* Used by the ribbon's font-colour and highlight-colour controls (upgrading
|
|
3028
|
-
* them from the bare native colour input the format toolbar used).
|
|
3029
|
-
*/
|
|
3030
|
-
declare function makeSwatchPicker(doc: Document, t: Translator, options: SwatchPickerOptions): SwatchPickerHandle;
|
|
3031
|
-
//#endregion
|
|
3032
2998
|
//#region src/viewer/ui/ruler-strips.d.ts
|
|
3033
2999
|
/**
|
|
3034
3000
|
* The View > Rulers strips: a horizontal ruler along the top of the slide, a
|
|
@@ -3186,6 +3152,8 @@ interface PresentationPlayback {
|
|
|
3186
3152
|
* caller falls through to its normal show-order advance.
|
|
3187
3153
|
*/
|
|
3188
3154
|
consumeZoomReturnOnAdvance(currentSlideIndex: number): number | undefined;
|
|
3155
|
+
/** The pending zoom excursion, read by the shared show step without consuming it. */
|
|
3156
|
+
peekZoomExcursion(): ZoomExcursion | undefined;
|
|
3189
3157
|
/** Cancel any running transition/timers and forget all per-slide state. */
|
|
3190
3158
|
reset(): void;
|
|
3191
3159
|
/**
|
|
@@ -3334,39 +3302,25 @@ declare function createRenderController(deps: RenderControllerDeps): RenderContr
|
|
|
3334
3302
|
//#endregion
|
|
3335
3303
|
//#region src/viewer/autosave/autosave-controller.d.ts
|
|
3336
3304
|
/**
|
|
3337
|
-
*
|
|
3338
|
-
*
|
|
3339
|
-
*
|
|
3340
|
-
* A local edit marks the document dirty; a debounce timer then re-serializes the
|
|
3341
|
-
* deck through the shared `saveDeckWithPassword` and persists it under
|
|
3342
|
-
* `filePath` via `saveAutosaveSnapshot` (evicting the oldest record on quota
|
|
3343
|
-
* exhaustion). The recovery blob is a crash-safety net only; **it never clears
|
|
3344
|
-
* the editor's dirty flag** or stands in for the user's real Save.
|
|
3345
|
-
*
|
|
3346
|
-
* The snapshot is written with `recoverySnapshotIntent`, so it is a plain ZIP
|
|
3347
|
-
* even when the deck is password protected: `getAutosaveSnapshot` hands the
|
|
3348
|
-
* bytes back with no password, and an encrypted package would simply refuse to
|
|
3349
|
-
* open (see `deck-save-encryption` in `pptx-viewer-shared` for the reasoning
|
|
3350
|
-
* and the cleartext-at-rest tradeoff it accepts).
|
|
3351
|
-
*
|
|
3352
|
-
* Two decisions are NOT made here, so all five bindings share them:
|
|
3305
|
+
* The vanilla adapter of the shared recovery autosave engine
|
|
3306
|
+
* (`createAutosaveController` in `ooxml-ui/pptx`) and of the shared recovery
|
|
3307
|
+
* offer (`createAutosaveRecoveryController`).
|
|
3353
3308
|
*
|
|
3354
|
-
*
|
|
3355
|
-
*
|
|
3356
|
-
*
|
|
3357
|
-
*
|
|
3358
|
-
*
|
|
3359
|
-
*
|
|
3360
|
-
*
|
|
3361
|
-
* the user keeps typing; the ceiling keeps the promise that a snapshot lands
|
|
3362
|
-
* no later than one interval after the FIRST unsaved edit.
|
|
3309
|
+
* The engine follows PowerPoint's AutoRecover: while there are unsaved edits a
|
|
3310
|
+
* snapshot (always a plain ZIP, written with `recoverySnapshotIntent`) lands
|
|
3311
|
+
* one interval after the first edit, and nothing is written while the deck is
|
|
3312
|
+
* unchanged. A recovery snapshot **never clears the editor's dirty flag**: it
|
|
3313
|
+
* is a crash-safety net, not the user's Save. Whether autosave runs at all is
|
|
3314
|
+
* the shared `resolveAutosaveActivation` verdict, read live through
|
|
3315
|
+
* {@link AutosaveControllerDeps.getActivation}.
|
|
3363
3316
|
*
|
|
3364
|
-
*
|
|
3365
|
-
*
|
|
3366
|
-
*
|
|
3367
|
-
*
|
|
3317
|
+
* This adapter only feeds the engine from the store (local edits set `dirty`;
|
|
3318
|
+
* loads and remote collaboration applies do not) and serialises the deck. The
|
|
3319
|
+
* recovery offer is probed once per loaded deck and surfaced both to the host
|
|
3320
|
+
* callback ({@link AutosaveControllerDeps.onRecovery}) and to the viewer's own
|
|
3321
|
+
* prompt ({@link AutosaveControllerDeps.onRecoveryOffer}).
|
|
3368
3322
|
*/
|
|
3369
|
-
type AutosaveStatus =
|
|
3323
|
+
type AutosaveStatus = ViewerAutosaveStatus;
|
|
3370
3324
|
interface AutosaveControllerDeps {
|
|
3371
3325
|
store: Store<ViewerState>;
|
|
3372
3326
|
/** Live core handler used to serialize the current slides to `.pptx` bytes. */
|
|
@@ -3385,8 +3339,7 @@ interface AutosaveControllerDeps {
|
|
|
3385
3339
|
/**
|
|
3386
3340
|
* The Protect-Presentation state, forwarded to the shared save decision.
|
|
3387
3341
|
* Deliberately inert here: a recovery snapshot is written in the clear
|
|
3388
|
-
* whatever it says.
|
|
3389
|
-
* decision function as every real save instead of side-stepping it.
|
|
3342
|
+
* whatever it says.
|
|
3390
3343
|
*/
|
|
3391
3344
|
getSaveIntent?: () => DeckSaveIntent;
|
|
3392
3345
|
/** Surface status transitions (toolbar indicator + optional host callback). */
|
|
@@ -3405,16 +3358,22 @@ interface AutosaveControllerDeps {
|
|
|
3405
3358
|
* still be asked about work a crash left behind.
|
|
3406
3359
|
*/
|
|
3407
3360
|
isRecoveryAllowed?: () => boolean;
|
|
3361
|
+
/** Load restored bytes through the viewer's load path (the recovery offer's restore). */
|
|
3362
|
+
loadFile?: (bytes: Uint8Array) => Promise<void> | void;
|
|
3408
3363
|
}
|
|
3409
3364
|
interface AutosaveController {
|
|
3410
|
-
/** Force an immediate snapshot
|
|
3365
|
+
/** Force an immediate snapshot of unsaved edits (no-op while autosave is not active). */
|
|
3411
3366
|
saveNow(): Promise<void>;
|
|
3367
|
+
/** In-progress inline text: a changed draft is an edit and goes into the snapshot. */
|
|
3368
|
+
noteInlineDraft(draft: InlineTextDraft | null): void;
|
|
3412
3369
|
/** Current status. */
|
|
3413
3370
|
getStatus(): AutosaveStatus;
|
|
3414
3371
|
/** Re-read the activation verdict (the toggle or edit-ability changed). */
|
|
3415
3372
|
refresh(): void;
|
|
3416
3373
|
/** Whether new edits currently schedule recovery snapshots. */
|
|
3417
3374
|
isEnabled(): boolean;
|
|
3375
|
+
/** The shared recovery offer (restore and dismiss). */
|
|
3376
|
+
getRecovery(): AutosaveRecoveryController;
|
|
3418
3377
|
/** Tear down the timer + store subscription. */
|
|
3419
3378
|
destroy(): void;
|
|
3420
3379
|
}
|
|
@@ -3668,31 +3627,32 @@ declare function createExportController(deps: ExportControllerDeps): ExportContr
|
|
|
3668
3627
|
//#endregion
|
|
3669
3628
|
//#region src/viewer/export/export-progress-modal.d.ts
|
|
3670
3629
|
/**
|
|
3671
|
-
* ExportProgressModal:
|
|
3672
|
-
*
|
|
3673
|
-
*
|
|
3674
|
-
*
|
|
3675
|
-
*
|
|
3676
|
-
* It deliberately does NOT close on backdrop click or Escape: an export in
|
|
3677
|
-
* flight should only end by completing, erroring, or the user pressing
|
|
3678
|
-
* Cancel. `onCancel` aborts cooperatively (the export loops check the
|
|
3679
|
-
* signal between slides).
|
|
3630
|
+
* ExportProgressModal: the progress modal shown while a multi-slide export (PDF / GIF / WebM)
|
|
3631
|
+
* runs. A thin adapter over the shared `pptx-ui-export-progress`, which owns the dialog and
|
|
3632
|
+
* progress bar semantics, focus and the look, and is deliberately not dismissable: the export
|
|
3633
|
+
* ends by completing, erroring or Cancel. `onCancel` aborts cooperatively (the export loops
|
|
3634
|
+
* check the signal between slides).
|
|
3680
3635
|
*/
|
|
3681
3636
|
interface ExportProgressModal {
|
|
3682
3637
|
/** Show the modal with a fresh title, zeroed bar, and initial status. */
|
|
3683
3638
|
open(title: string, status: string): void;
|
|
3684
3639
|
/** Update the bar (0-100, clamped) and the status line under it. */
|
|
3685
3640
|
update(progress: number, status: string): void;
|
|
3686
|
-
/** Hide
|
|
3641
|
+
/** Hide the modal. */
|
|
3687
3642
|
close(): void;
|
|
3688
3643
|
}
|
|
3689
3644
|
interface ExportProgressModalDeps {
|
|
3690
3645
|
doc: Document;
|
|
3691
3646
|
getTranslator(): Translator;
|
|
3647
|
+
/**
|
|
3648
|
+
* Where the modal mounts: the viewer's chrome root, so it takes the viewer's theme variables.
|
|
3649
|
+
* Defaults to `doc.body`.
|
|
3650
|
+
*/
|
|
3651
|
+
getHost?(): HTMLElement;
|
|
3692
3652
|
/** The Cancel control was pressed (abort the in-flight export). */
|
|
3693
3653
|
onCancel(): void;
|
|
3694
3654
|
}
|
|
3695
|
-
/** Build a (closed) progress modal; `open` mounts it
|
|
3655
|
+
/** Build a (closed) progress modal; `open` mounts it into the host. */
|
|
3696
3656
|
declare function createExportProgressModal(deps: ExportProgressModalDeps): ExportProgressModal;
|
|
3697
3657
|
//#endregion
|
|
3698
3658
|
//#region src/viewer/export/export-progress-ui.d.ts
|
|
@@ -4576,6 +4536,8 @@ interface ExportLifecycleDeps {
|
|
|
4576
4536
|
doc: Document;
|
|
4577
4537
|
/** Host the off-screen capture stage mounts into; matches the viewer container. */
|
|
4578
4538
|
container: HTMLElement;
|
|
4539
|
+
/** Where the export progress modal mounts (the chrome root, which carries the theme). */
|
|
4540
|
+
getModalHost?(): HTMLElement;
|
|
4579
4541
|
store: Store<ViewerState>;
|
|
4580
4542
|
registry: index_d_exports$1.ElementRendererRegistry;
|
|
4581
4543
|
getTranslator(): Translator;
|
|
@@ -4751,6 +4713,8 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
|
|
|
4751
4713
|
/** Host/user intent is retained while collaboration temporarily disables editing. */
|
|
4752
4714
|
private requestedEditable;
|
|
4753
4715
|
private requestedReadOnly;
|
|
4716
|
+
/** The read-only banner's actions over the store (the shared `read-only-session` model). */
|
|
4717
|
+
private readonly readOnlyActions;
|
|
4754
4718
|
private annotations;
|
|
4755
4719
|
private parityWorkflows;
|
|
4756
4720
|
private aiChat;
|
|
@@ -5014,7 +4978,8 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
|
|
|
5014
4978
|
/**
|
|
5015
4979
|
* The edit state the viewer actually runs in: what the host asked for (the
|
|
5016
4980
|
* `editable` option and `readOnly` flag, `setEditable`), AND-ed with a
|
|
5017
|
-
* collaboration read-only role
|
|
4981
|
+
* collaboration read-only role, the `capabilities.edit` customisation and
|
|
4982
|
+
* the deck's read-only recommendation until "Edit anyway" lifts it.
|
|
5018
4983
|
*/
|
|
5019
4984
|
private effectiveEditable;
|
|
5020
4985
|
private applyEditable;
|
|
@@ -5023,7 +4988,9 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
|
|
|
5023
4988
|
/**
|
|
5024
4989
|
* The read-only recommendation banner's "Edit anyway" button
|
|
5025
4990
|
* (`p:modifyVerifier` / "Mark as Final"): lifts the lock and hides the
|
|
5026
|
-
* banner, unlike plain dismiss which only hides it.
|
|
4991
|
+
* banner, unlike plain dismiss which only hides it. The lock is ANDed into
|
|
4992
|
+
* {@link effectiveEditable}, so lifting it never turns on editing the host
|
|
4993
|
+
* did not ask for.
|
|
5027
4994
|
*
|
|
5028
4995
|
* When the recommendation's `requiresPassword` is set (a `modifyVerifier`
|
|
5029
4996
|
* with a hash this viewer can check), this opens the inline password
|
|
@@ -5038,8 +5005,9 @@ export declare class PptxViewer extends ViewerCustomizationHost implements PptxV
|
|
|
5038
5005
|
cancelReadOnlyPasswordPrompt(): void;
|
|
5039
5006
|
/**
|
|
5040
5007
|
* Check `password` against the deck's `modifyVerifier`
|
|
5041
|
-
* (`checkModifyPassword`, `pptx
|
|
5042
|
-
*
|
|
5008
|
+
* (`checkModifyPassword`, `ooxml-ui/pptx`); unlocks and closes the prompt
|
|
5009
|
+
* on a match, otherwise leaves the deck locked and reports why. A result
|
|
5010
|
+
* that arrives after a new load or Cancel is dropped.
|
|
5043
5011
|
*/
|
|
5044
5012
|
submitReadOnlyPassword(password: string): void;
|
|
5045
5013
|
private checkReadOnlyPassword;
|
|
@@ -5265,8 +5233,10 @@ interface CollaborationController {
|
|
|
5265
5233
|
//#endregion
|
|
5266
5234
|
//#region src/viewer/collab/collaboration-controller.d.ts
|
|
5267
5235
|
/**
|
|
5268
|
-
* Yjs collaboration with built-in transports or a borrowed host session.
|
|
5269
|
-
*
|
|
5236
|
+
* Yjs collaboration with built-in transports or a borrowed host session. The
|
|
5237
|
+
* room lifecycle (owned sessions, transport, connection status, first-write
|
|
5238
|
+
* gate, pagehide teardown) is the shared `createCollaborationSessionController`;
|
|
5239
|
+
* granular slide sync and presence live in their focused modules.
|
|
5270
5240
|
*
|
|
5271
5241
|
* KNOWN LIMITATION: collaboration undo semantics are undefined - the local
|
|
5272
5242
|
* `EditorHistory` stack keeps working but does not coordinate with peers
|
|
@@ -5384,7 +5354,7 @@ declare function ensureViewerStyles(doc: Document): void;
|
|
|
5384
5354
|
/** The complete viewer stylesheet text (for hosts that self-manage CSS). */
|
|
5385
5355
|
export declare function getViewerCss(): string;
|
|
5386
5356
|
declare namespace index_d_exports {
|
|
5387
|
-
export { AccessibilityPanel, AutosaveController, AutosaveRecord, AutosaveStatus, ButtonHandle, ChromeOptions, CollaborationConfig, CollaborationController, CollaborationRole, CollaborationState$2 as CollaborationState, 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,
|
|
5357
|
+
export { AccessibilityPanel, AutosaveController, AutosaveRecord, AutosaveStatus, ButtonHandle, ChromeOptions, CollaborationConfig, CollaborationController, CollaborationRole, CollaborationState$2 as CollaborationState, 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, 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, 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, mountElementContextMenu, mountPresentationContextMenu, readTableCellTarget, renderToCanvas, resolveSourceToBuffer, resolveTableTarget, revokeBlobUrls, runContextMenuCommand, runGifExport, runPrint, runVideoExport };
|
|
5388
5358
|
}
|
|
5389
5359
|
type CssStyleMap = index_d_exports$1.CssStyleMap;
|
|
5390
5360
|
type ElementRenderContext = index_d_exports$1.ElementRenderContext;
|