pptx-react-viewer 4.55.0 → 4.56.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 (60) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +16 -1
  3. package/dist/ai.d.ts +17 -0
  4. package/dist/ai.js +11 -0
  5. package/dist/ai.js.br +2 -0
  6. package/dist/ai.js.gz +0 -0
  7. package/dist/ai.mjs +9 -0
  8. package/dist/ai.mjs.br +0 -0
  9. package/dist/ai.mjs.gz +0 -0
  10. package/dist/{chunk-OIQAJR57.js → chunk-BL2P6K67.js} +100 -5
  11. package/dist/chunk-BL2P6K67.js.br +0 -0
  12. package/dist/chunk-BL2P6K67.js.gz +0 -0
  13. package/dist/{chunk-V7JICDSL.js → chunk-CNCPFDFS.js} +3113 -3132
  14. package/dist/chunk-CNCPFDFS.js.br +0 -0
  15. package/dist/chunk-CNCPFDFS.js.gz +0 -0
  16. package/dist/{chunk-64BFLDBT.mjs → chunk-EZRO5ETF.mjs} +101 -6
  17. package/dist/chunk-EZRO5ETF.mjs.br +0 -0
  18. package/dist/chunk-EZRO5ETF.mjs.gz +0 -0
  19. package/dist/chunk-F6WCYCHV.js +40 -0
  20. package/dist/chunk-F6WCYCHV.js.br +0 -0
  21. package/dist/chunk-F6WCYCHV.js.gz +0 -0
  22. package/dist/chunk-NE5JQMED.mjs +37 -0
  23. package/dist/chunk-NE5JQMED.mjs.br +0 -0
  24. package/dist/chunk-NE5JQMED.mjs.gz +0 -0
  25. package/dist/{chunk-EXSGJHOH.mjs → chunk-NESLWTLG.mjs} +3017 -3037
  26. package/dist/chunk-NESLWTLG.mjs.br +0 -0
  27. package/dist/chunk-NESLWTLG.mjs.gz +0 -0
  28. package/dist/index.d.ts +95 -14
  29. package/dist/index.js +28 -23
  30. package/dist/index.js.br +0 -0
  31. package/dist/index.js.gz +0 -0
  32. package/dist/index.mjs +3 -2
  33. package/dist/index.mjs.br +0 -0
  34. package/dist/index.mjs.gz +0 -0
  35. package/dist/internals.d.ts +64 -7
  36. package/dist/internals.js +80 -80
  37. package/dist/internals.js.br +0 -0
  38. package/dist/internals.js.gz +0 -0
  39. package/dist/internals.mjs +1 -1
  40. package/dist/internals.mjs.br +0 -0
  41. package/dist/internals.mjs.gz +0 -0
  42. package/dist/pptx-viewer-canvas.css +1 -1
  43. package/dist/pptx-viewer-canvas.css.br +0 -0
  44. package/dist/pptx-viewer-canvas.css.gz +0 -0
  45. package/dist/viewer/index.d.ts +20 -10
  46. package/dist/viewer/index.js +19 -18
  47. package/dist/viewer/index.js.br +0 -0
  48. package/dist/viewer/index.js.gz +0 -0
  49. package/dist/viewer/index.mjs +3 -2
  50. package/dist/viewer/index.mjs.br +0 -0
  51. package/dist/viewer/index.mjs.gz +0 -0
  52. package/package.json +9 -4
  53. package/dist/chunk-64BFLDBT.mjs.br +0 -0
  54. package/dist/chunk-64BFLDBT.mjs.gz +0 -0
  55. package/dist/chunk-EXSGJHOH.mjs.br +0 -0
  56. package/dist/chunk-EXSGJHOH.mjs.gz +0 -0
  57. package/dist/chunk-OIQAJR57.js.br +0 -0
  58. package/dist/chunk-OIQAJR57.js.gz +0 -0
  59. package/dist/chunk-V7JICDSL.js.br +0 -0
  60. package/dist/chunk-V7JICDSL.js.gz +0 -0
Binary file
Binary file
package/dist/index.d.ts CHANGED
@@ -1,15 +1,17 @@
1
1
  import * as React$1 from 'react';
2
2
  import React$1__default, { ReactNode, ReactElement } from 'react';
3
3
  import * as ooxml_ui_pptx from 'ooxml-ui/pptx';
4
- import { CollaborationRole, CollaborationConfig, ViewportFitOptions, ViewerFontSource, CanvasSize, DocumentStorage, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, CollaborationInput, GoogleFontsOption, ToolbarActionId, RibbonAddInTab, ViewerCustomization, PptxLoadLimits, PowerPointViewerAPI, ViewerCustomizationApi, CollaborationLivePatcher, InlineListReadResult, EditorImagePasteOptions, ViewerMode, RulerUnit, ElementAnimationState, ShapeAdjustmentHandleDescriptor, InlineTextEditSnapshot, ZoomNavigationTarget, FieldSubstitutionContext, EditPointsCommandId, EditPointsElementPatch, FreeformToolKind, ElementClipboardPayload, AnimationApplyGroup, InsertChartKind, ChangeCaseMode, SlideTemplateId, ReviewCommentsHost, CollaborationShellState, PptxAutosaveStatus } from 'ooxml-ui/pptx';
5
- export { AVATAR_COLOR_SWATCHES, AccountAuthConfig, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, BackstageCustomization, CANVAS_CONTEXT_MENU_COMMAND_IDS, CollaborationConfig, CollaborationShellState, ContextMenuCustomization, DEFAULT_VIEWER_PROFILE, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, ElementUpdate, ElementUpdateOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, HostCanvasMenuContext, HostElementMenuContext, HostMenuCommand, KeyboardCustomization, LocalStorageUsageSummary, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, OptionsCustomization, OptionsPageId, OptionsSectionId, OptionsSettingId, OptionsSettingValues, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PowerPointViewerAPI, RIBBON_TAB_IDS, ResolvedCustomization, RibbonCustomization, SLIDE_TEMPLATES, SavedPresentationFormat, ShortcutChord, SlideTemplateId, SlideTemplateSpec, StoredViewerPrefs, THEME_CATALOG, TOOLBAR_BUTTON_IDS, ThemeCatalogEntry, ToolbarActionId, ToolbarButtonId, ToolbarTabId, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, VIEWER_PREFS_STORAGE_KEY, ViewerCustomization, ViewerCustomizationApi, ViewerDialogId, ViewerExportFormatId, ViewerFeatureId, ViewerMode, ViewerPanelId, ViewerProfile, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding, buildSlideTemplateContent, buildSlideTemplateSlide, clearAllLocalViewerData, clearStoredViewerPrefs, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, getLocalStorageUsageSummary, isLegacyBinaryPresentation, isSupportedPresentationFile, presentationBaseName, readStoredViewerPrefs, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, savedPresentationFileName, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs } from 'ooxml-ui/pptx';
4
+ import { CollaborationRole, CollaborationConfig, ViewportFitOptions, ViewerFontSource, CanvasSize, DocumentStorage, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, CollaborationInput, GoogleFontsOption, ToolbarActionId, RibbonAddInTab, ViewerCustomization, PptxLoadLimits, PowerPointViewerAPI, ViewerCustomizationApi, CollaborationLivePatcher, InlineListReadResult, EditorImagePasteOptions, ViewerMode, RulerUnit, ElementAnimationState, ShapeAdjustmentHandleDescriptor, InlineTextEditSnapshot, ZoomNavigationTarget, FieldSubstitutionContext, EditPointsCommandId, EditPointsElementPatch, FreeformToolKind, ElementClipboardPayload, AnimationApplyGroup, InsertChartKind, ChangeCaseMode, SlideTemplateId, ReviewCommentsHost, SlidesPaneLayoutGalleryRequest, CollaborationShellState, PptxAutosaveStatus } from 'ooxml-ui/pptx';
5
+ export { AVATAR_COLOR_SWATCHES, AccountAuthConfig, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, BackstageCustomization, CANVAS_CONTEXT_MENU_COMMAND_IDS, CollaborationConfig, CollaborationShellState, ContextMenuCustomization, DEFAULT_VIEWER_PROFILE, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, ElementUpdate, ElementUpdateOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, HostCanvasMenuContext, HostElementMenuContext, HostMenuCommand, KeyboardCustomization, LocalStorageUsageSummary, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, OptionsCustomization, OptionsPageId, OptionsSectionId, OptionsSettingId, OptionsSettingValues, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PowerPointViewerAPI, RIBBON_TAB_IDS, ResolvedCustomization, RibbonCustomization, SLIDE_TEMPLATES, SavedPresentationFormat, ShortcutChord, SlideTemplateId, SlideTemplateSpec, SlidesPaneLayoutGalleryRequest, StoredViewerPrefs, THEME_CATALOG, TOOLBAR_BUTTON_IDS, ThemeCatalogEntry, ToolbarActionId, ToolbarButtonId, ToolbarTabId, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, VIEWER_PREFS_STORAGE_KEY, ViewerCustomization, ViewerCustomizationApi, ViewerDialogId, ViewerExportFormatId, ViewerFeatureId, ViewerMode, ViewerPanelId, ViewerProfile, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding, buildSlideTemplateContent, buildSlideTemplateSlide, clearAllLocalViewerData, clearStoredViewerPrefs, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, getLocalStorageUsageSummary, isLegacyBinaryPresentation, isSupportedPresentationFile, presentationBaseName, readStoredViewerPrefs, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, savedPresentationFileName, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs } from 'ooxml-ui/pptx';
6
+ import { PptxAiConfig } from 'ooxml-ui/pptx/ai';
7
+ export { PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiWritePolicy } from 'ooxml-ui/pptx/ai';
8
+ import { PptxAiAssistant } from 'ooxml-ui/pptx/ai/host';
9
+ export { PptxAiAssistant } from 'ooxml-ui/pptx/ai/host';
6
10
  import { LocaleCatalogEntry } from 'ooxml-ui/pptx/i18n';
7
11
  export { LOCALE_CATALOG, LocaleCatalogEntry } from 'ooxml-ui/pptx/i18n';
8
12
  import { PptxCoreProperties, PptxAnimationPreset, PptxNativeAnimation, PptxSlide, PptxElement, TextStyle, InkPptxElement, ShapePptxElement, PptxAction, PptxComment, PptxElementAnimation, ConnectorPptxElement, ParsedTableStyleMap, PptxTheme, ShapeStyle, PptxLayoutOption, PptxLayoutPreview, PptxCustomShow, PptxSlideTransition, PptxPresentationProperties } from 'ooxml-core/pptx';
9
13
  import { CollaborationWriteBackState, CollaborationState } from 'ooxml-core/collab';
10
14
  export { CollaborationState } from 'ooxml-core/collab';
11
- import { PptxAiConfig } from 'ooxml-ui/pptx/ai';
12
- export { PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiWritePolicy } from 'ooxml-ui/pptx/ai';
13
15
  import { Doc } from 'yjs';
14
16
  import { Options } from 'html2canvas-pro';
15
17
 
@@ -149,6 +151,19 @@ interface TableCellEditorState {
149
151
  col: number;
150
152
  }>;
151
153
  }
154
+ /**
155
+ * Groups slides into named sections for the slides pane sidebar.
156
+ * Corresponds to OOXML `p15:section` elements in `presentation.xml`.
157
+ */
158
+ interface SlideSectionGroup {
159
+ id: string;
160
+ label: string;
161
+ slideIndexes: number[];
162
+ /** Section highlight color from p15:sectionPr. */
163
+ color?: string;
164
+ /** Whether the section should start collapsed (from p15:sectionPr). */
165
+ defaultCollapsed?: boolean;
166
+ }
152
167
  /** Identifies one of the ribbon-style toolbar tabs (home, insert, text, etc.). */
153
168
  type ToolbarSection = 'file' | 'home' | 'insert' | 'text' | 'arrange' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
154
169
  /** The active drawing/inking tool selected in the Draw toolbar tab. */
@@ -513,22 +528,30 @@ interface PowerPointViewerProps extends ViewportFitOptions {
513
528
  ribbonAddIns?: readonly RibbonAddInTab[];
514
529
  /**
515
530
  * Opt in to the built-in AI assistant. When provided, a Sparkles toggle
516
- * appears in the toolbar and opens a chat panel wired to this config; when
517
- * omitted, no AI icon renders and no AI code is loaded (the panel and its
518
- * `@ai-sdk/react` dependency are `React.lazy`-imported only on first open).
531
+ * appears in the toolbar and opens a chat panel; when omitted, no AI icon
532
+ * renders and no AI code is loaded (the panel and its `@ai-sdk/react`
533
+ * dependency are `React.lazy`-imported only on first open).
519
534
  *
520
- * The host supplies the model connection (a backend `endpoint`, an in-browser
521
- * `model`, or a custom `transport`) plus optional tool allow/deny lists and a
522
- * write policy. Requires the optional `ai` and `@ai-sdk/react` peers.
535
+ * Pass a plain `PptxAiConfig` (supported and not deprecated), or the opaque
536
+ * handle `createAiAssistant(config)` returns (from `pptx-react-viewer/ai`, the
537
+ * opt-in entry that brings the chat panel). Both open the same panel. Only a
538
+ * value from `createAiAssistant` is read as a handle; any other value is a
539
+ * plain config, which the viewer does not validate. The config supplies the
540
+ * model connection (a backend `endpoint`, an in-browser `model`, or a custom
541
+ * `transport`) plus optional tool allow/deny lists and a write policy.
542
+ * Requires the optional `ai` and `@ai-sdk/react` peers.
523
543
  *
524
544
  * @example
525
545
  * ```tsx
526
- * <PowerPointViewer content={bytes} ai={{ connection: { kind: 'model', model } }} />
546
+ * import { createAiAssistant } from 'pptx-react-viewer/ai';
547
+ *
548
+ * const assistant = createAiAssistant({ connection: { kind: 'endpoint', api: '/api/chat' } });
549
+ * <PowerPointViewer content={bytes} ai={assistant} />
527
550
  * ```
528
551
  *
529
552
  * @see {@link PptxAiConfig}
530
553
  */
531
- ai?: PptxAiConfig;
554
+ ai?: PptxAiConfig | PptxAiAssistant;
532
555
  /**
533
556
  * Framework-neutral UI customisation. See docs/guide/customization.md.
534
557
  * Unioned with `hiddenActions`. A new object replaces the whole
@@ -1070,6 +1093,49 @@ interface SlideCanvasProps {
1070
1093
  outlineAuthoring?: OutlineAuthoringProps;
1071
1094
  }
1072
1095
  //#endregion
1096
+ //#region src/viewer/components/slides-pane/types.d.ts
1097
+ interface SlidesPaneSidebarProps {
1098
+ slides: PptxSlide[];
1099
+ templateElementsBySlideId: Record<string, PptxElement[]>;
1100
+ activeSlideIndex: number;
1101
+ canvasSize: CanvasSize$1;
1102
+ sectionGroups: SlideSectionGroup[];
1103
+ isOpen: boolean;
1104
+ canEdit: boolean;
1105
+ onSelectSlide: (index: number) => void;
1106
+ onSlideContextMenu: (e: React$1__default.MouseEvent, index: number) => void;
1107
+ onMoveSlide: (fromIndex: number, toIndex: number) => void;
1108
+ onAddSlide: () => void;
1109
+ onAddSlideAfter: (index: number) => void;
1110
+ onDuplicateSlides: (indexes: number[]) => void;
1111
+ onDeleteSlides: (indexes: number[]) => void;
1112
+ onHideSlides: (indexes: number[]) => void;
1113
+ /** Makes `index` active, then opens the Layout gallery anchored at (x, y). */
1114
+ onOpenLayoutForSlide: (index: number, x: number, y: number) => void;
1115
+ onCollapse: () => void;
1116
+ onAddSection?: (name: string, afterSlideIndex: number) => void;
1117
+ onRenameSection?: (sectionId: string, newName: string) => void;
1118
+ onDeleteSection?: (sectionId: string) => void;
1119
+ onMoveSectionUp?: (sectionId: string) => void;
1120
+ onMoveSectionDown?: (sectionId: string) => void;
1121
+ /**
1122
+ * Persist the collapse flag onto the section model, so it round-trips
1123
+ * through save exactly as it does in the other four bindings.
1124
+ */
1125
+ onToggleSectionCollapse?: (sectionId: string) => void;
1126
+ /** Recorded rehearsal timings in ms, keyed by slide index. */
1127
+ rehearsalTimings?: Record<number, number>;
1128
+ /** Width of the panel in pixels (for resizable panels). */
1129
+ panelWidth?: number;
1130
+ /**
1131
+ * Presentation-wide field context (date/header/footer/custom props) so
1132
+ * thumbnails substitute the same field placeholders as the canvas.
1133
+ */
1134
+ fieldContext?: FieldSubstitutionContext;
1135
+ /** Theme + table style map so thumbnails resolve table band/header colours. */
1136
+ tableStyleContext?: TableStyleContext;
1137
+ }
1138
+ //#endregion
1073
1139
  //#region src/viewer/hooks/useAutosave.d.ts
1074
1140
  /** The one autosave status every binding renders (`PptxAutosaveStatus` in `ooxml-ui/pptx`). */
1075
1141
  type AutosaveStatus = PptxAutosaveStatus;
@@ -1128,6 +1194,12 @@ interface UseViewerBuildingBlocksInput extends ViewportFitOptions {
1128
1194
  onOpenHeaderFooter?: () => void;
1129
1195
  /** Fired by the toolbar's "Share" button; the host owns rendering that dialog. */
1130
1196
  onOpenShareDialog?: () => void;
1197
+ /**
1198
+ * Fired by the "Layout" entry of a slide's context menu in `<SlidesPane>`,
1199
+ * after that slide is made active; the host owns rendering the Layout
1200
+ * gallery (for example anchored at the click point).
1201
+ */
1202
+ onOpenLayoutGallery?: (request: SlidesPaneLayoutGalleryRequest) => void;
1131
1203
  }
1132
1204
  interface ViewerBuildingBlocksResult {
1133
1205
  /** Connection and presence state for a custom status bar, or null when disabled. */
@@ -1143,6 +1215,12 @@ interface ViewerBuildingBlocksResult {
1143
1215
  toolbarProps: ToolbarProps;
1144
1216
  /** Flat, self-contained props for the standalone `<SlideCanvas>` component. */
1145
1217
  canvasProps: SlideCanvasProps;
1218
+ /**
1219
+ * Flat, self-contained props for the standalone `<SlidesPane>` component:
1220
+ * the slide thumbnail rail `PowerPointViewer` shows beside the canvas.
1221
+ * Its open state is the toolbar's sidebar toggle.
1222
+ */
1223
+ slidesPaneProps: SlidesPaneSidebarProps;
1146
1224
  /** Current viewer mode (edit, view, present, master). */
1147
1225
  mode: ViewerMode;
1148
1226
  /** True while the initial parse of `content` is in progress. */
@@ -1162,6 +1240,9 @@ declare function Toolbar(p: ToolbarProps): React$1__default.ReactElement;
1162
1240
  //#region src/viewer/components/SlideCanvas.d.ts
1163
1241
  declare function SlideCanvas(props: SlideCanvasProps): React$1.JSX.Element;
1164
1242
  //#endregion
1243
+ //#region src/viewer/components/SlidesPaneSidebar.d.ts
1244
+ declare function SlidesPaneSidebar({ slides, templateElementsBySlideId, activeSlideIndex, canvasSize, sectionGroups, isOpen, canEdit, onSelectSlide, onSlideContextMenu, onMoveSlide, onAddSlide, onAddSlideAfter, onDuplicateSlides, onDeleteSlides, onHideSlides, onOpenLayoutForSlide, onCollapse: _onCollapse, onAddSection, onRenameSection, onDeleteSection, onMoveSectionUp, onMoveSectionDown, onToggleSectionCollapse, rehearsalTimings, panelWidth, fieldContext, tableStyleContext }: SlidesPaneSidebarProps): React$1__default.ReactElement | null;
1245
+ //#endregion
1165
1246
  //#region src/viewer/components/SlideTemplateGalleryDialog.d.ts
1166
1247
  interface SlideTemplateGalleryDialogProps {
1167
1248
  isOpen: boolean;
@@ -1199,5 +1280,5 @@ declare function SlideTemplatePreview({ templateId, scheme }: SlideTemplatePrevi
1199
1280
  */
1200
1281
  declare function renderToCanvas(element: HTMLElement, options?: Partial<Options>): Promise<HTMLCanvasElement>;
1201
1282
 
1202
- export { PowerPointViewer, PptxI18nProvider, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, Toolbar, ViewerThemeProvider, getAnimationInitialStyle, renderToCanvas, useViewerBuildingBlocks, useViewerTheme };
1203
- export type { CollaborationContextValue, PowerPointViewerHandle, PowerPointViewerProps, PptxI18nProviderProps, PptxTranslate, PptxTranslateParams, SlideCanvasProps, SlideTemplateGalleryDialogProps, SlideTemplatePreviewProps, ToolbarProps, UseViewerBuildingBlocksInput, ViewerBuildingBlocksResult, ViewerLoadDetail };
1283
+ export { PowerPointViewer, PptxI18nProvider, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, SlidesPaneSidebar as SlidesPane, Toolbar, ViewerThemeProvider, getAnimationInitialStyle, renderToCanvas, useViewerBuildingBlocks, useViewerTheme };
1284
+ export type { CollaborationContextValue, PowerPointViewerHandle, PowerPointViewerProps, PptxI18nProviderProps, PptxTranslate, PptxTranslateParams, SlideCanvasProps, SlideTemplateGalleryDialogProps, SlideTemplatePreviewProps, SlidesPaneSidebarProps as SlidesPaneProps, ToolbarProps, UseViewerBuildingBlocksInput, ViewerBuildingBlocksResult, ViewerLoadDetail };
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkV7JICDSL_js = require('./chunk-V7JICDSL.js');
4
- var chunkOIQAJR57_js = require('./chunk-OIQAJR57.js');
3
+ var chunkCNCPFDFS_js = require('./chunk-CNCPFDFS.js');
4
+ require('./chunk-F6WCYCHV.js');
5
+ var chunkBL2P6K67_js = require('./chunk-BL2P6K67.js');
5
6
  var chunk5KFSMXI4_js = require('./chunk-5KFSMXI4.js');
6
7
  require('./chunk-PIRHQTI4.js');
7
8
  var pptx = require('ooxml-ui/pptx');
@@ -11,87 +12,91 @@ var i18n = require('ooxml-ui/pptx/i18n');
11
12
 
12
13
  Object.defineProperty(exports, "PowerPointViewer", {
13
14
  enumerable: true,
14
- get: function () { return chunkV7JICDSL_js.PowerPointViewer; }
15
+ get: function () { return chunkCNCPFDFS_js.PowerPointViewer; }
15
16
  });
16
17
  Object.defineProperty(exports, "PptxI18nProvider", {
17
18
  enumerable: true,
18
- get: function () { return chunkV7JICDSL_js.PptxI18nProvider; }
19
+ get: function () { return chunkCNCPFDFS_js.PptxI18nProvider; }
19
20
  });
20
21
  Object.defineProperty(exports, "SlideCanvas", {
21
22
  enumerable: true,
22
- get: function () { return chunkV7JICDSL_js.SlideCanvas; }
23
+ get: function () { return chunkCNCPFDFS_js.SlideCanvas; }
23
24
  });
24
25
  Object.defineProperty(exports, "SlideTemplateGalleryDialog", {
25
26
  enumerable: true,
26
- get: function () { return chunkV7JICDSL_js.SlideTemplateGalleryDialog; }
27
+ get: function () { return chunkCNCPFDFS_js.SlideTemplateGalleryDialog; }
27
28
  });
28
29
  Object.defineProperty(exports, "SlideTemplatePreview", {
29
30
  enumerable: true,
30
- get: function () { return chunkV7JICDSL_js.SlideTemplatePreview; }
31
+ get: function () { return chunkCNCPFDFS_js.SlideTemplatePreview; }
32
+ });
33
+ Object.defineProperty(exports, "SlidesPane", {
34
+ enumerable: true,
35
+ get: function () { return chunkCNCPFDFS_js.SlidesPaneSidebar; }
31
36
  });
32
37
  Object.defineProperty(exports, "THEME_CATALOG", {
33
38
  enumerable: true,
34
- get: function () { return chunkV7JICDSL_js.THEME_CATALOG; }
39
+ get: function () { return chunkCNCPFDFS_js.THEME_CATALOG; }
35
40
  });
36
41
  Object.defineProperty(exports, "Toolbar", {
37
42
  enumerable: true,
38
- get: function () { return chunkV7JICDSL_js.Toolbar; }
43
+ get: function () { return chunkCNCPFDFS_js.Toolbar; }
39
44
  });
40
45
  Object.defineProperty(exports, "ViewerThemeProvider", {
41
46
  enumerable: true,
42
- get: function () { return chunkV7JICDSL_js.ViewerThemeProvider; }
47
+ get: function () { return chunkCNCPFDFS_js.ViewerThemeProvider; }
43
48
  });
44
49
  Object.defineProperty(exports, "defaultCssVars", {
45
50
  enumerable: true,
46
- get: function () { return chunkV7JICDSL_js.defaultCssVars; }
51
+ get: function () { return chunkCNCPFDFS_js.defaultCssVars; }
47
52
  });
48
53
  Object.defineProperty(exports, "defaultRadius", {
49
54
  enumerable: true,
50
- get: function () { return chunkV7JICDSL_js.defaultRadius; }
55
+ get: function () { return chunkCNCPFDFS_js.defaultRadius; }
51
56
  });
52
57
  Object.defineProperty(exports, "defaultThemeColors", {
53
58
  enumerable: true,
54
- get: function () { return chunkV7JICDSL_js.defaultThemeColors; }
59
+ get: function () { return chunkCNCPFDFS_js.defaultThemeColors; }
55
60
  });
56
61
  Object.defineProperty(exports, "resolveThemeCatalogEntry", {
57
62
  enumerable: true,
58
- get: function () { return chunkV7JICDSL_js.resolveThemeCatalogEntry; }
63
+ get: function () { return chunkCNCPFDFS_js.resolveThemeCatalogEntry; }
59
64
  });
60
65
  Object.defineProperty(exports, "themeToCssVars", {
61
66
  enumerable: true,
62
- get: function () { return chunkV7JICDSL_js.themeToCssVars; }
67
+ get: function () { return chunkCNCPFDFS_js.themeToCssVars; }
63
68
  });
64
69
  Object.defineProperty(exports, "useViewerTheme", {
65
70
  enumerable: true,
66
- get: function () { return chunkV7JICDSL_js.useViewerTheme; }
71
+ get: function () { return chunkCNCPFDFS_js.useViewerTheme; }
67
72
  });
68
73
  Object.defineProperty(exports, "vermilionDarkColors", {
69
74
  enumerable: true,
70
- get: function () { return chunkV7JICDSL_js.vermilionDarkColors; }
75
+ get: function () { return chunkCNCPFDFS_js.vermilionDarkColors; }
71
76
  });
72
77
  Object.defineProperty(exports, "vermilionDarkTheme", {
73
78
  enumerable: true,
74
- get: function () { return chunkV7JICDSL_js.vermilionDarkTheme; }
79
+ get: function () { return chunkCNCPFDFS_js.vermilionDarkTheme; }
75
80
  });
76
81
  Object.defineProperty(exports, "vermilionLightColors", {
77
82
  enumerable: true,
78
- get: function () { return chunkV7JICDSL_js.vermilionLightColors; }
83
+ get: function () { return chunkCNCPFDFS_js.vermilionLightColors; }
79
84
  });
80
85
  Object.defineProperty(exports, "vermilionLightTheme", {
81
86
  enumerable: true,
82
- get: function () { return chunkV7JICDSL_js.vermilionLightTheme; }
87
+ get: function () { return chunkCNCPFDFS_js.vermilionLightTheme; }
83
88
  });
84
89
  Object.defineProperty(exports, "vermilionRadius", {
85
90
  enumerable: true,
86
- get: function () { return chunkV7JICDSL_js.vermilionRadius; }
91
+ get: function () { return chunkCNCPFDFS_js.vermilionRadius; }
87
92
  });
88
93
  Object.defineProperty(exports, "renderToCanvas", {
89
94
  enumerable: true,
90
- get: function () { return chunkOIQAJR57_js.renderToCanvas; }
95
+ get: function () { return chunkBL2P6K67_js.renderToCanvas; }
91
96
  });
92
97
  Object.defineProperty(exports, "useViewerBuildingBlocks", {
93
98
  enumerable: true,
94
- get: function () { return chunkOIQAJR57_js.useViewerBuildingBlocks; }
99
+ get: function () { return chunkBL2P6K67_js.useViewerBuildingBlocks; }
95
100
  });
96
101
  Object.defineProperty(exports, "getAnimationInitialStyle", {
97
102
  enumerable: true,
package/dist/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
- export { PowerPointViewer, PptxI18nProvider, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, THEME_CATALOG, Toolbar, ViewerThemeProvider, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, useViewerTheme, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from './chunk-EXSGJHOH.mjs';
2
- export { renderToCanvas, useViewerBuildingBlocks } from './chunk-64BFLDBT.mjs';
1
+ export { PowerPointViewer, PptxI18nProvider, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, SlidesPaneSidebar as SlidesPane, THEME_CATALOG, Toolbar, ViewerThemeProvider, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, useViewerTheme, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from './chunk-NESLWTLG.mjs';
2
+ import './chunk-NE5JQMED.mjs';
3
+ export { renderToCanvas, useViewerBuildingBlocks } from './chunk-EZRO5ETF.mjs';
3
4
  export { getAnimationInitialStyle } from './chunk-MR3ZSEHS.mjs';
4
5
  import './chunk-UV2HVMKZ.mjs';
5
6
  export { AVATAR_COLOR_SWATCHES, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, CANVAS_CONTEXT_MENU_COMMAND_IDS, DEFAULT_VIEWER_PROFILE, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, RIBBON_TAB_IDS, SLIDE_TEMPLATES, TOOLBAR_BUTTON_IDS, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, VIEWER_PREFS_STORAGE_KEY, buildSlideTemplateContent, buildSlideTemplateSlide, clearAllLocalViewerData, clearStoredViewerPrefs, createImageElementFromFile, describeCollaborationShellState, getLocalStorageUsageSummary, isLegacyBinaryPresentation, isSupportedPresentationFile, presentationBaseName, readStoredViewerPrefs, resolveProfileInitial, saveViewerProfile, savedPresentationFileName, writeStoredViewerPrefs } from 'ooxml-ui/pptx';
package/dist/index.mjs.br CHANGED
Binary file
package/dist/index.mjs.gz CHANGED
Binary file
@@ -1,4 +1,4 @@
1
- import { CollaborationRole, CollaborationConfig, HistoryTheme, PowerPointViewerAPI, ViewerCustomizationApi, PptxAutosaveStatus, ShapeAdjustmentHandleDescriptor, ChangeCaseMode, ResolvedKeyboardCustomization, FindResult, EditorImagePasteOptions, InsertChartKind, InsertChartOptions, PasteSpecialFormat, SlidePasteRequest, SlideTemplateId, MorphTransitionPlan, ElementAnimationState, ZoomNavigationTarget, PresentationSnapshot, DocumentStorage, InlineTextDraftSink, ViewerMode, ShapeAdjustmentDragState, GestureKind, PointerLike, InlineTextEditSnapshot, InlineListReadResult, FreeformToolKind, CollaborationLivePatcher, SlideSizeEmu, ElementClipboardPayload, CropSession, FontEmbeddingDescriptor, MasterViewTarget, ViewportFitOptions, CollaborationInput, GoogleFontsOption, PptxLoadLimits, ToolbarActionId, CollaborationShellState, AnimationApplyGroup, ReviewCommentsHost, RulerUnit, FieldSubstitutionContext, EditPointsCommandId, EditPointsElementPatch, PresentationPointerTool, RunProgramNotice, BorrowedCollaborationAwareness, CollabLoadOrigin, AuthoredSlideRange, DocumentSaveReason, FragmentedLayer, PrintSettings, ThemeEditorEdit, CompareResult, ReadOnlyRecommendation, CompatibilityWarningToast, DeviceOrientation, ResolvedCustomization, AutosaveRecord, DeckSavePurpose, ZoomExcursion, TouchGestureCallbacks, ViewerAutosaveStatus, ViewerOptionsStore, ViewerOptions, AutosaveRecoveryPrompt, VirtualizedRange, ToolbarTabId } from 'ooxml-ui/pptx';
1
+ import { CollaborationRole, CollaborationConfig, HistoryTheme, PowerPointViewerAPI, ViewerCustomizationApi, PptxAutosaveStatus, ShapeAdjustmentHandleDescriptor, EditorHistoryController, ChangeCaseMode, ResolvedKeyboardCustomization, FindResult, EditorImagePasteOptions, InsertChartKind, InsertChartOptions, PasteSpecialFormat, SlidePasteRequest, SlideTemplateId, MorphTransitionPlan, ElementAnimationState, ZoomNavigationTarget, PresentationSnapshot, DocumentStorage, InlineTextDraftSink, ViewerMode, ShapeAdjustmentDragState, GestureKind, PointerLike, InlineTextEditSnapshot, InlineListReadResult, FreeformToolKind, CollaborationLivePatcher, SlideSizeEmu, ElementClipboardPayload, CropSession, FontEmbeddingDescriptor, MasterViewTarget, ViewportFitOptions, CollaborationInput, GoogleFontsOption, PptxLoadLimits, ToolbarActionId, SlidesPaneLayoutGalleryRequest, CollaborationShellState, AnimationApplyGroup, ReviewCommentsHost, RulerUnit, FieldSubstitutionContext, EditPointsCommandId, EditPointsElementPatch, PresentationPointerTool, RunProgramNotice, BorrowedCollaborationAwareness, CollabLoadOrigin, AuthoredSlideRange, DocumentSaveReason, FragmentedLayer, PrintSettings, ThemeEditorEdit, CompareResult, ReadOnlyRecommendation, CompatibilityWarningToast, DeviceOrientation, ResolvedCustomization, AutosaveRecord, DeckSavePurpose, ZoomExcursion, TouchGestureCallbacks, ViewerAutosaveStatus, ViewerOptionsStore, ViewerOptions, AutosaveRecoveryPrompt, VirtualizedRange, ToolbarTabId } from 'ooxml-ui/pptx';
2
2
  export { CINEMATIC_TRANSITION_KEYFRAMES, CollaborationConfig, DEFAULT_MORPH_DURATION_MS, DEFAULT_TRANSITION_DURATION_MS, DeviceOrientation, EASE, INSTANT, MOBILE_BREAKPOINT, P14_TRANSITION_KEYFRAMES, P14_TRANSITION_KEYFRAMES_2, P14_TRANSITION_KEYFRAMES_ALL, RANDOM_ELIGIBLE_TYPES, ResolvedDirection, ResolvedDirection8, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_KEYFRAMES_CSS, SlideTransitionAnimations, TABLET_BREAKPOINT, TRANSITION_SPEED_DURATION_MS, TouchGestureCallbacks, VirtualizedRange, WHEEL_SPOKE_COUNTS, computeVirtualRange, getCinematicTransitionAnimations, getP14TransitionAnimations, getSlideTransitionAnimations, resolveDirection, resolveDirection8, resolveOrientation, resolveSlideTransition, resolveTransitionDurationMs, resolveWheelSpokeCount } from 'ooxml-ui/pptx';
3
3
  import { PptxSlide, PptxElement, PptxElementAnimation, TextStyle, PptxHeaderFooter, PptxTheme, PptxSlideMaster, ShapeStyle, PptxCommentMention, SmartArtLayout, InkPptxElement, ShapePptxElement, MergeShapeOperation, PptxSlideTransition, PptxAction, PptxModernCommentAuthor, ParsedTableStyleMap, PptxThemeOption, PptxCustomShow, PptxSection, PptxPresentationProperties, PptxViewProperties, PptxNotesMaster, PptxHandoutMaster, PptxCustomProperty, PptxTagCollection, PptxCoreProperties, PptxAppProperties, PptxEmbeddedFont, MasterViewTab, PptxSlideLayout, PptxHandler, PptxLayoutOption, PptxLayoutPreview, PptxComment, ConnectorPptxElement, PptxThemePreset, PptxThemeColorScheme, PptxThemeFontScheme, PptxData, PptxHandlerSaveOptions, PptxSaveFormat, TextSegment, PptxModifyVerifier } from 'ooxml-core/pptx';
4
4
  import { CollaborationWriteBackState } from 'ooxml-core/collab';
@@ -685,6 +685,8 @@ interface EditorHistoryResult {
685
685
  * behind them: a Slide Master view command removed a layout the package cannot get back.
686
686
  */
687
687
  forgetHistory: (reaches: (snapshot: EditorHistorySnapshot) => boolean) => void;
688
+ /** Route Undo and Redo through a room's history while attached (returns the detach). */
689
+ attachCollaboration: EditorHistoryController<EditorHistorySnapshot>['attachCollaboration'];
688
690
  /**
689
691
  * Pause (`true`) and resume (`false`) change tracking. A gallery hover preview swaps the
690
692
  * slides in for a moment; while tracking is held that is neither an undo step nor an edit, and
@@ -848,7 +850,7 @@ interface UseCanvasInteractionsInput {
848
850
  * (AutoCorrect, Options > Proofing). Applied only to user-typed commits,
849
851
  * never to programmatic segment remaps.
850
852
  */
851
- transformCommittedText?: (text: string) => string;
853
+ transformCommittedText?: (text: string, previous?: string) => string;
852
854
  }
853
855
  declare function useCanvasInteractions(input: UseCanvasInteractionsInput): CanvasInteractionHandlers;
854
856
  //#endregion
@@ -1418,7 +1420,7 @@ interface UseTableOperationsInput {
1418
1420
  ops: ElementOperations;
1419
1421
  history: EditorHistoryResult;
1420
1422
  /** AutoCorrect transform applied to committed table-cell text edits. */
1421
- transformCommittedText?: (text: string) => string;
1423
+ transformCommittedText?: (text: string, previous?: string) => string;
1422
1424
  }
1423
1425
  interface TableStructHandlers {
1424
1426
  handleCommitCellEdit: (elementId: string, rowIndex: number, colIndex: number, text: string) => void;
@@ -2088,7 +2090,7 @@ interface UseEditorOperationsInput {
2088
2090
  /** Ref to the loaded PPTX handler; populated by the content-lifecycle hook. */
2089
2091
  handlerRef?: React$1.RefObject<PptxHandler | null> | React$1.MutableRefObject<PptxHandler | null>;
2090
2092
  /** AutoCorrect transform applied to committed inline text edits. */
2091
- transformCommittedText?: (text: string) => string;
2093
+ transformCommittedText?: (text: string, previous?: string) => string;
2092
2094
  /** Host keyboard customisation, forwarded to the Find shortcut. */
2093
2095
  keyboard?: ResolvedKeyboardCustomization;
2094
2096
  }
@@ -2308,6 +2310,49 @@ interface SlideCanvasProps {
2308
2310
  outlineAuthoring?: OutlineAuthoringProps;
2309
2311
  }
2310
2312
  //#endregion
2313
+ //#region src/viewer/components/slides-pane/types.d.ts
2314
+ interface SlidesPaneSidebarProps {
2315
+ slides: PptxSlide[];
2316
+ templateElementsBySlideId: Record<string, PptxElement[]>;
2317
+ activeSlideIndex: number;
2318
+ canvasSize: CanvasSize$1;
2319
+ sectionGroups: SlideSectionGroup[];
2320
+ isOpen: boolean;
2321
+ canEdit: boolean;
2322
+ onSelectSlide: (index: number) => void;
2323
+ onSlideContextMenu: (e: React$1.MouseEvent, index: number) => void;
2324
+ onMoveSlide: (fromIndex: number, toIndex: number) => void;
2325
+ onAddSlide: () => void;
2326
+ onAddSlideAfter: (index: number) => void;
2327
+ onDuplicateSlides: (indexes: number[]) => void;
2328
+ onDeleteSlides: (indexes: number[]) => void;
2329
+ onHideSlides: (indexes: number[]) => void;
2330
+ /** Makes `index` active, then opens the Layout gallery anchored at (x, y). */
2331
+ onOpenLayoutForSlide: (index: number, x: number, y: number) => void;
2332
+ onCollapse: () => void;
2333
+ onAddSection?: (name: string, afterSlideIndex: number) => void;
2334
+ onRenameSection?: (sectionId: string, newName: string) => void;
2335
+ onDeleteSection?: (sectionId: string) => void;
2336
+ onMoveSectionUp?: (sectionId: string) => void;
2337
+ onMoveSectionDown?: (sectionId: string) => void;
2338
+ /**
2339
+ * Persist the collapse flag onto the section model, so it round-trips
2340
+ * through save exactly as it does in the other four bindings.
2341
+ */
2342
+ onToggleSectionCollapse?: (sectionId: string) => void;
2343
+ /** Recorded rehearsal timings in ms, keyed by slide index. */
2344
+ rehearsalTimings?: Record<number, number>;
2345
+ /** Width of the panel in pixels (for resizable panels). */
2346
+ panelWidth?: number;
2347
+ /**
2348
+ * Presentation-wide field context (date/header/footer/custom props) so
2349
+ * thumbnails substitute the same field placeholders as the canvas.
2350
+ */
2351
+ fieldContext?: FieldSubstitutionContext;
2352
+ /** Theme + table style map so thumbnails resolve table band/header colours. */
2353
+ tableStyleContext?: TableStyleContext;
2354
+ }
2355
+ //#endregion
2311
2356
  //#region src/viewer/hooks/useAutosave.d.ts
2312
2357
  /** The one autosave status every binding renders (`PptxAutosaveStatus` in `ooxml-ui/pptx`). */
2313
2358
  type AutosaveStatus = PptxAutosaveStatus;
@@ -2415,6 +2460,12 @@ interface UseViewerBuildingBlocksInput extends ViewportFitOptions {
2415
2460
  onOpenHeaderFooter?: () => void;
2416
2461
  /** Fired by the toolbar's "Share" button; the host owns rendering that dialog. */
2417
2462
  onOpenShareDialog?: () => void;
2463
+ /**
2464
+ * Fired by the "Layout" entry of a slide's context menu in `<SlidesPane>`,
2465
+ * after that slide is made active; the host owns rendering the Layout
2466
+ * gallery (for example anchored at the click point).
2467
+ */
2468
+ onOpenLayoutGallery?: (request: SlidesPaneLayoutGalleryRequest) => void;
2418
2469
  }
2419
2470
  interface ViewerBuildingBlocksResult {
2420
2471
  /** Connection and presence state for a custom status bar, or null when disabled. */
@@ -2430,6 +2481,12 @@ interface ViewerBuildingBlocksResult {
2430
2481
  toolbarProps: ToolbarProps;
2431
2482
  /** Flat, self-contained props for the standalone `<SlideCanvas>` component. */
2432
2483
  canvasProps: SlideCanvasProps;
2484
+ /**
2485
+ * Flat, self-contained props for the standalone `<SlidesPane>` component:
2486
+ * the slide thumbnail rail `PowerPointViewer` shows beside the canvas.
2487
+ * Its open state is the toolbar's sidebar toggle.
2488
+ */
2489
+ slidesPaneProps: SlidesPaneSidebarProps;
2433
2490
  /** Current viewer mode (edit, view, present, master). */
2434
2491
  mode: ViewerMode;
2435
2492
  /** True while the initial parse of `content` is in progress. */
@@ -3126,7 +3183,7 @@ interface UseSerializeInput {
3126
3183
  inlineEditingTextRef: React$1.MutableRefObject<string>;
3127
3184
  inlineEditingSnapshotRef?: React$1.MutableRefObject<InlineTextEditSnapshot | undefined>;
3128
3185
  inlineEditingReaderRef?: React$1.MutableRefObject<PendingInlineEditReader | undefined>;
3129
- transformCommittedText?: (text: string) => string;
3186
+ transformCommittedText?: (text: string, previous?: string) => string;
3130
3187
  password?: string;
3131
3188
  /**
3132
3189
  * File > Fonts > "Embed fonts in the file". `false` passes
@@ -3642,7 +3699,7 @@ interface UseContentLifecycleInput {
3642
3699
  actionSoundHandlerRef: React$1.MutableRefObject<PptxHandler | null>;
3643
3700
  setIsEncryptedDialogOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
3644
3701
  password?: string;
3645
- transformCommittedText?: (text: string) => string;
3702
+ transformCommittedText?: (text: string, previous?: string) => string;
3646
3703
  /** Forwarded to {@link useLoadContent}: fires after a parse applies. */
3647
3704
  onContentApplied?: () => void;
3648
3705
  /** Forwarded to {@link useLoadContent}: File > Options > Trust Center > "Allow external content". */
@@ -3718,7 +3775,7 @@ declare function useKeyboardShortcutWiring(input: UseKeyboardShortcutWiringInput
3718
3775
  //#endregion
3719
3776
  //#region src/viewer/hooks/useViewerIntegration.d.ts
3720
3777
  interface UseViewerIntegrationInput {
3721
- transformCommittedText?: (text: string) => string;
3778
+ transformCommittedText?: (text: string, previous?: string) => string;
3722
3779
  state: ViewerState;
3723
3780
  zoom: UseZoomViewportResult;
3724
3781
  history: EditorHistoryResult;