pptx-react-viewer 4.49.0 → 4.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 +106 -0
- package/dist/{AiChatPanel-NKTBHT5B.mjs → AiChatPanel-VJV5OEG2.mjs} +1 -1
- package/dist/AiChatPanel-VJV5OEG2.mjs.br +0 -0
- package/dist/AiChatPanel-VJV5OEG2.mjs.gz +0 -0
- package/dist/{AiChatPanel-S4WNQCY4.js → AiChatPanel-WYAL24DX.js} +9 -9
- package/dist/AiChatPanel-WYAL24DX.js.br +0 -0
- package/dist/AiChatPanel-WYAL24DX.js.gz +0 -0
- package/dist/{chunk-2ZXXHNNR.js → chunk-4OF7X5EE.js} +1669 -3046
- package/dist/chunk-4OF7X5EE.js.br +0 -0
- package/dist/chunk-4OF7X5EE.js.gz +0 -0
- package/dist/{chunk-YKLL2Z33.mjs → chunk-5JJQLK7N.mjs} +452 -1829
- package/dist/chunk-5JJQLK7N.mjs.br +0 -0
- package/dist/chunk-5JJQLK7N.mjs.gz +0 -0
- package/dist/{chunk-PFV626ED.mjs → chunk-77IXTLKU.mjs} +3 -4
- package/dist/chunk-77IXTLKU.mjs.br +0 -0
- package/dist/chunk-77IXTLKU.mjs.gz +0 -0
- package/dist/{chunk-ME5QRTVS.js → chunk-D5NXYXPP.js} +740 -1188
- package/dist/chunk-D5NXYXPP.js.br +0 -0
- package/dist/chunk-D5NXYXPP.js.gz +0 -0
- package/dist/chunk-DDJ634MV.js.br +0 -0
- package/dist/chunk-DDJ634MV.js.gz +0 -0
- package/dist/{chunk-JAI42EXQ.js → chunk-JWNBTFZZ.js} +0 -6
- package/dist/chunk-JWNBTFZZ.js.br +0 -0
- package/dist/chunk-JWNBTFZZ.js.gz +0 -0
- package/dist/{chunk-Z62JFXMZ.mjs → chunk-QHGEPW5G.mjs} +563 -1011
- package/dist/chunk-QHGEPW5G.mjs.br +0 -0
- package/dist/chunk-QHGEPW5G.mjs.gz +0 -0
- package/dist/chunk-QIUK53JR.mjs.br +0 -0
- package/dist/chunk-QIUK53JR.mjs.gz +0 -0
- package/dist/i18n/de.cjs +1138 -221
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +1138 -221
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +1138 -221
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +1138 -221
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +1138 -221
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +1138 -221
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +1138 -221
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +1138 -221
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +5 -15
- package/dist/index.js +24 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +105 -94
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer-canvas.css +1 -1
- package/dist/pptx-viewer-canvas.css.br +0 -0
- package/dist/pptx-viewer-canvas.css.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +7 -12
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/{y-webrtc-2H7UYAQD.mjs → y-webrtc-HRGGVQZH.mjs} +1 -1
- package/dist/y-webrtc-HRGGVQZH.mjs.br +0 -0
- package/dist/y-webrtc-HRGGVQZH.mjs.gz +0 -0
- package/dist/{y-webrtc-DVPQNFLL.js → y-webrtc-QVVT5PCK.js} +124 -124
- package/dist/y-webrtc-QVVT5PCK.js.br +0 -0
- package/dist/y-webrtc-QVVT5PCK.js.gz +0 -0
- package/dist/{y-websocket-WORVRRQS.mjs → y-websocket-46M6UFI7.mjs} +1 -1
- package/dist/y-websocket-46M6UFI7.mjs.br +0 -0
- package/dist/y-websocket-46M6UFI7.mjs.gz +0 -0
- package/dist/{y-websocket-TN4OKPXQ.js → y-websocket-EDOMWMAD.js} +78 -78
- package/dist/y-websocket-EDOMWMAD.js.br +0 -0
- package/dist/y-websocket-EDOMWMAD.js.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-NKTBHT5B.mjs.br +0 -0
- package/dist/AiChatPanel-NKTBHT5B.mjs.gz +0 -0
- package/dist/AiChatPanel-S4WNQCY4.js.br +0 -0
- package/dist/AiChatPanel-S4WNQCY4.js.gz +0 -0
- package/dist/chunk-2ZXXHNNR.js.br +0 -0
- package/dist/chunk-2ZXXHNNR.js.gz +0 -0
- package/dist/chunk-3VVZGHHY.mjs.br +0 -0
- package/dist/chunk-3VVZGHHY.mjs.gz +0 -0
- package/dist/chunk-JAI42EXQ.js.br +0 -0
- package/dist/chunk-JAI42EXQ.js.gz +0 -0
- package/dist/chunk-ME5QRTVS.js.br +0 -0
- package/dist/chunk-ME5QRTVS.js.gz +0 -0
- package/dist/chunk-NUNDT6EL.js.br +0 -0
- package/dist/chunk-NUNDT6EL.js.gz +0 -0
- package/dist/chunk-PFV626ED.mjs.br +0 -0
- package/dist/chunk-PFV626ED.mjs.gz +0 -0
- package/dist/chunk-YKLL2Z33.mjs.br +0 -0
- package/dist/chunk-YKLL2Z33.mjs.gz +0 -0
- package/dist/chunk-Z62JFXMZ.mjs.br +0 -0
- package/dist/chunk-Z62JFXMZ.mjs.gz +0 -0
- package/dist/y-webrtc-2H7UYAQD.mjs.br +0 -0
- package/dist/y-webrtc-2H7UYAQD.mjs.gz +0 -0
- package/dist/y-webrtc-DVPQNFLL.js.br +0 -0
- package/dist/y-webrtc-DVPQNFLL.js.gz +0 -0
- package/dist/y-websocket-TN4OKPXQ.js.br +0 -0
- package/dist/y-websocket-TN4OKPXQ.js.gz +0 -0
- package/dist/y-websocket-WORVRRQS.mjs.br +0 -0
- package/dist/y-websocket-WORVRRQS.mjs.gz +0 -0
- package/dist/{chunk-NUNDT6EL.js → chunk-DDJ634MV.js} +436 -436
- package/dist/{chunk-3VVZGHHY.mjs → chunk-QIUK53JR.mjs} +436 -436
package/dist/i18n/zh-CN.mjs.br
CHANGED
|
Binary file
|
package/dist/i18n/zh-CN.mjs.gz
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React$1__default 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, ToolbarActionId, RibbonAddInTab, ViewerCustomization, PowerPointViewerAPI, ViewerCustomizationApi, CollaborationLivePatcher, InlineListReadResult, EditorImagePasteOptions, ViewerMode, RulerUnit, ElementAnimationState, ShapeAdjustmentHandleDescriptor, InlineTextEditSnapshot, ZoomNavigationTarget, FieldSubstitutionContext, EditPointsCommandId, EditPointsElementPatch, FreeformToolKind, ElementClipboardPayload, AnimationApplyGroup, InsertChartKind, ChangeCaseMode, SlideTemplateId, ReviewCommentsHost, CollaborationShellState } from 'ooxml-ui/pptx';
|
|
4
|
+
import { CollaborationRole, CollaborationConfig, ViewportFitOptions, ViewerFontSource, CanvasSize, DocumentStorage, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, CollaborationInput, ToolbarActionId, RibbonAddInTab, ViewerCustomization, 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
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';
|
|
6
6
|
import { LocaleCatalogEntry } from 'ooxml-ui/pptx/i18n';
|
|
7
7
|
export { LOCALE_CATALOG, LocaleCatalogEntry } from 'ooxml-ui/pptx/i18n';
|
|
@@ -617,6 +617,8 @@ interface ToolbarProps {
|
|
|
617
617
|
onAddShape: () => void;
|
|
618
618
|
onAddTable: (rows?: number, columns?: number) => void;
|
|
619
619
|
onAddChart?: (chartKind: InsertChartKind) => void;
|
|
620
|
+
/** Opens the Insert Chart dialog; without it the Chart menu leaves "Insert Chart..." out. */
|
|
621
|
+
onOpenChartDialog?: () => void;
|
|
620
622
|
onAddSmartArt: () => void;
|
|
621
623
|
onAddEquation: () => void;
|
|
622
624
|
onAddActionButton: (shapeType: string) => void;
|
|
@@ -1001,20 +1003,8 @@ interface SlideCanvasProps {
|
|
|
1001
1003
|
}
|
|
1002
1004
|
//#endregion
|
|
1003
1005
|
//#region src/viewer/hooks/useAutosave.d.ts
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
} | {
|
|
1007
|
-
state: 'disabled';
|
|
1008
|
-
reason: string;
|
|
1009
|
-
} | {
|
|
1010
|
-
state: 'saving';
|
|
1011
|
-
} | {
|
|
1012
|
-
state: 'saved';
|
|
1013
|
-
timestamp: number;
|
|
1014
|
-
} | {
|
|
1015
|
-
state: 'error';
|
|
1016
|
-
message: string;
|
|
1017
|
-
};
|
|
1006
|
+
/** The one autosave status every binding renders (`PptxAutosaveStatus` in `ooxml-ui/pptx`). */
|
|
1007
|
+
type AutosaveStatus = PptxAutosaveStatus;
|
|
1018
1008
|
//#endregion
|
|
1019
1009
|
//#region src/viewer/hooks/useViewerBuildingBlocks-types.d.ts
|
|
1020
1010
|
interface UseViewerBuildingBlocksInput extends ViewportFitOptions {
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunk4OF7X5EE_js = require('./chunk-4OF7X5EE.js');
|
|
4
|
+
var chunkD5NXYXPP_js = require('./chunk-D5NXYXPP.js');
|
|
5
|
+
var chunkJWNBTFZZ_js = require('./chunk-JWNBTFZZ.js');
|
|
6
6
|
require('./chunk-PIRHQTI4.js');
|
|
7
7
|
var pptx = require('ooxml-ui/pptx');
|
|
8
8
|
var i18n = require('ooxml-ui/pptx/i18n');
|
|
@@ -11,87 +11,87 @@ var i18n = require('ooxml-ui/pptx/i18n');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "PowerPointViewer", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk4OF7X5EE_js.PowerPointViewer; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "SlideCanvas", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk4OF7X5EE_js.SlideCanvas; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "SlideTemplateGalleryDialog", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk4OF7X5EE_js.SlideTemplateGalleryDialog; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "SlideTemplatePreview", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk4OF7X5EE_js.SlideTemplatePreview; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "THEME_CATALOG", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk4OF7X5EE_js.THEME_CATALOG; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "Toolbar", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk4OF7X5EE_js.Toolbar; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "ViewerThemeProvider", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk4OF7X5EE_js.ViewerThemeProvider; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "defaultCssVars", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk4OF7X5EE_js.defaultCssVars; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "defaultRadius", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk4OF7X5EE_js.defaultRadius; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "defaultThemeColors", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk4OF7X5EE_js.defaultThemeColors; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "resolveThemeCatalogEntry", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk4OF7X5EE_js.resolveThemeCatalogEntry; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "themeToCssVars", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk4OF7X5EE_js.themeToCssVars; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "useViewerTheme", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunk4OF7X5EE_js.useViewerTheme; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "vermilionDarkColors", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunk4OF7X5EE_js.vermilionDarkColors; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "vermilionDarkTheme", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunk4OF7X5EE_js.vermilionDarkTheme; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "vermilionLightColors", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunk4OF7X5EE_js.vermilionLightColors; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "vermilionLightTheme", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunk4OF7X5EE_js.vermilionLightTheme; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "vermilionRadius", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunk4OF7X5EE_js.vermilionRadius; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "renderToCanvas", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkD5NXYXPP_js.renderToCanvas; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "useViewerBuildingBlocks", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkD5NXYXPP_js.useViewerBuildingBlocks; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "getAnimationInitialStyle", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkJWNBTFZZ_js.getAnimationInitialStyle; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "AVATAR_COLOR_SWATCHES", {
|
|
97
97
|
enumerable: true,
|
package/dist/index.js.br
CHANGED
|
Binary file
|
package/dist/index.js.gz
CHANGED
|
Binary file
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { PowerPointViewer, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, THEME_CATALOG, Toolbar, ViewerThemeProvider, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, useViewerTheme, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from './chunk-
|
|
2
|
-
export { renderToCanvas, useViewerBuildingBlocks } from './chunk-
|
|
3
|
-
export { getAnimationInitialStyle } from './chunk-
|
|
1
|
+
export { PowerPointViewer, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, THEME_CATALOG, Toolbar, ViewerThemeProvider, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, useViewerTheme, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from './chunk-5JJQLK7N.mjs';
|
|
2
|
+
export { renderToCanvas, useViewerBuildingBlocks } from './chunk-QHGEPW5G.mjs';
|
|
3
|
+
export { getAnimationInitialStyle } from './chunk-77IXTLKU.mjs';
|
|
4
4
|
import './chunk-UV2HVMKZ.mjs';
|
|
5
5
|
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';
|
|
6
6
|
export { LOCALE_CATALOG } from 'ooxml-ui/pptx/i18n';
|
package/dist/index.mjs.br
CHANGED
|
Binary file
|
package/dist/index.mjs.gz
CHANGED
|
Binary file
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CollaborationRole, CollaborationConfig, PowerPointViewerAPI, ViewerCustomizationApi, ShapeAdjustmentHandleDescriptor, ChangeCaseMode, ResolvedKeyboardCustomization, FindResult, EditorImagePasteOptions, InsertChartKind, PasteSpecialFormat, SlidePasteRequest, SlideTemplateId, MorphTransitionPlan, ElementAnimationState, ZoomNavigationTarget, PresentationSnapshot, DocumentStorage, ViewerMode, ShapeAdjustmentDragState, InlineTextEditSnapshot, InlineListReadResult, FreeformToolKind, CollaborationLivePatcher, SlideSizeEmu, ElementClipboardPayload, CropSession, FontEmbeddingDescriptor, MasterViewTarget, ViewportFitOptions, CollaborationInput, 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, 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, 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';
|
|
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, ShapeStyle, PptxCommentMention, SmartArtLayout, InkPptxElement, ShapePptxElement, MergeShapeOperation, PptxSlideTransition, PptxAction, PptxSlideMaster, PptxModernCommentAuthor, PptxTheme, 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';
|
|
5
5
|
import * as Y from 'yjs';
|
|
6
6
|
import { Doc } from 'yjs';
|
|
7
|
-
import React$1, { Dispatch, SetStateAction,
|
|
7
|
+
import React$1, { MutableRefObject, Dispatch, SetStateAction, RefObject, ForwardedRef } from 'react';
|
|
8
8
|
|
|
9
9
|
//#region src/viewer/types-core.d.ts
|
|
10
10
|
/**
|
|
@@ -305,6 +305,8 @@ interface ToolbarProps {
|
|
|
305
305
|
onAddShape: () => void;
|
|
306
306
|
onAddTable: (rows?: number, columns?: number) => void;
|
|
307
307
|
onAddChart?: (chartKind: InsertChartKind) => void;
|
|
308
|
+
/** Opens the Insert Chart dialog; without it the Chart menu leaves "Insert Chart..." out. */
|
|
309
|
+
onOpenChartDialog?: () => void;
|
|
308
310
|
onAddSmartArt: () => void;
|
|
309
311
|
onAddEquation: () => void;
|
|
310
312
|
onAddActionButton: (shapeType: string) => void;
|
|
@@ -516,6 +518,73 @@ interface InlineEditingState {
|
|
|
516
518
|
registerInlineEditReader?: (elementId: string, read: () => InlineListReadResult) => () => void;
|
|
517
519
|
}
|
|
518
520
|
//#endregion
|
|
521
|
+
//#region src/viewer/hooks/pointer-handler-types.d.ts
|
|
522
|
+
interface UsePointerHandlersInput {
|
|
523
|
+
editorScale: number;
|
|
524
|
+
canvasStageRef: React.RefObject<HTMLDivElement | null>;
|
|
525
|
+
canvasSize: CanvasSize$1;
|
|
526
|
+
activeSlide: PptxSlide | undefined;
|
|
527
|
+
activeSlideIndex: number;
|
|
528
|
+
gridSpacingPx: number;
|
|
529
|
+
dragStateRef: React.MutableRefObject<DragState | null>;
|
|
530
|
+
resizeStateRef: React.MutableRefObject<ResizeState | null>;
|
|
531
|
+
shapeAdjustmentDragStateRef: React.MutableRefObject<ShapeAdjustmentDragState | null>;
|
|
532
|
+
marqueeStateRef: React.MutableRefObject<MarqueeSelectionState | null>;
|
|
533
|
+
/**
|
|
534
|
+
* Set on pointer-up when a drag/resize/adjustment gesture actually moved the
|
|
535
|
+
* element, so the click handler can tell a genuine "click an already-selected
|
|
536
|
+
* element to edit it" apart from the trailing click a completed gesture
|
|
537
|
+
* leaves behind. See {@link import('./viewer-core-state-types').ViewerCoreState.justInteractedRef}.
|
|
538
|
+
*/
|
|
539
|
+
justInteractedRef: React.MutableRefObject<boolean>;
|
|
540
|
+
/** When true, pointer commits target the per-slide template store. */
|
|
541
|
+
editTemplateMode: boolean;
|
|
542
|
+
snapToGrid: boolean;
|
|
543
|
+
snapToShape: boolean;
|
|
544
|
+
guides: Array<{
|
|
545
|
+
id: string;
|
|
546
|
+
axis: 'h' | 'v';
|
|
547
|
+
position: number;
|
|
548
|
+
}>;
|
|
549
|
+
/** Template (master/layout) elements for the active slide (drag/marquee source while editing templates). */
|
|
550
|
+
templateElements: PptxElement[];
|
|
551
|
+
elementLookup: Map<string, PptxElement>;
|
|
552
|
+
setMarqueeSelectionState: React.Dispatch<React.SetStateAction<MarqueeSelectionState | null>>;
|
|
553
|
+
setSnapLines: React.Dispatch<React.SetStateAction<Array<{
|
|
554
|
+
axis: string;
|
|
555
|
+
position: number;
|
|
556
|
+
}>>>;
|
|
557
|
+
setTemplateElementsBySlideId: React.Dispatch<React.SetStateAction<Record<string, PptxElement[]>>>;
|
|
558
|
+
setPointerCommitNonce: React.Dispatch<React.SetStateAction<number>>;
|
|
559
|
+
effectiveSelectedIds: string[];
|
|
560
|
+
applySelection: (primaryId: string | null, ids?: string[]) => void;
|
|
561
|
+
clearSelection: () => void;
|
|
562
|
+
updateSlides: (updater: (s: PptxSlide[]) => PptxSlide[]) => void;
|
|
563
|
+
updateElementById: (id: string, updates: Partial<PptxElement>) => void;
|
|
564
|
+
markDirty: () => void;
|
|
565
|
+
/**
|
|
566
|
+
* Collaboration live-preview channel. Drag/resize write geometry straight to
|
|
567
|
+
* the DOM (no React state churn per frame), so without this remote peers saw
|
|
568
|
+
* nothing until pointer-up. Optional: absent in standalone building-block
|
|
569
|
+
* compositions, dormant when not collaborating.
|
|
570
|
+
*/
|
|
571
|
+
livePatcher?: CollaborationLivePatcher;
|
|
572
|
+
/**
|
|
573
|
+
* Receives the canvas's move/resize gesture controller (see
|
|
574
|
+
* canvas-gestures.ts) so the press handlers can start it. Optional: a
|
|
575
|
+
* composition without it still arms and disarms the gesture records.
|
|
576
|
+
*/
|
|
577
|
+
gestureRef?: React.MutableRefObject<CanvasGestures | null>;
|
|
578
|
+
}
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region src/viewer/hooks/canvas-gestures.d.ts
|
|
581
|
+
interface CanvasGestures {
|
|
582
|
+
/** Start the gesture armed in `dragStateRef` (move) or `resizeStateRef` (resize). */
|
|
583
|
+
begin(kind: Exclude<GestureKind, 'rotate'>, id: string, pointer: PointerLike): void;
|
|
584
|
+
isActive(): boolean;
|
|
585
|
+
dispose(): void;
|
|
586
|
+
}
|
|
587
|
+
//#endregion
|
|
519
588
|
//#region src/viewer/hooks/canvas-interaction-types.d.ts
|
|
520
589
|
/**
|
|
521
590
|
* Shared type for canvas interaction handler signatures.
|
|
@@ -552,7 +621,8 @@ interface EditorHistoryInput {
|
|
|
552
621
|
error: string | null;
|
|
553
622
|
/**
|
|
554
623
|
* Undo-stack depth (File > Options > Advanced > "Maximum number of undos",
|
|
555
|
-
* resolved via the shared `resolveHistoryDepth`). Defaults to
|
|
624
|
+
* resolved via the shared `resolveHistoryDepth`). Defaults to the shared
|
|
625
|
+
* `DEFAULT_EDITOR_HISTORY_DEPTH`.
|
|
556
626
|
*/
|
|
557
627
|
maxHistoryEntries?: number;
|
|
558
628
|
hasActivePointerInteraction: () => boolean;
|
|
@@ -714,6 +784,8 @@ interface UseCanvasInteractionsInput {
|
|
|
714
784
|
* `ViewerCoreState.justInteractedRef`.
|
|
715
785
|
*/
|
|
716
786
|
justInteractedRef: React.MutableRefObject<boolean>;
|
|
787
|
+
/** The move/resize gesture controller a press starts (set by `usePointerHandlers`). */
|
|
788
|
+
gestureRef?: React.MutableRefObject<CanvasGestures | null>;
|
|
717
789
|
setInlineEditingElementId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
718
790
|
setInlineEditingText: React.Dispatch<React.SetStateAction<string>>;
|
|
719
791
|
setContextMenuState: React.Dispatch<React.SetStateAction<ElementContextMenuState | null>>;
|
|
@@ -949,7 +1021,7 @@ interface InsertElementHandlers {
|
|
|
949
1021
|
handleAddTextBox: () => void;
|
|
950
1022
|
handleAddShape: () => void;
|
|
951
1023
|
handleAddTable: (rows?: number, columns?: number) => void;
|
|
952
|
-
handleAddChart: (chartKind: InsertChartKind) => void;
|
|
1024
|
+
handleAddChart: (chartKind: InsertChartKind, options?: InsertChartOptions) => void;
|
|
953
1025
|
handleInsertSmartArt: (layout: SmartArtLayout, defaultItems: string[]) => void;
|
|
954
1026
|
handleInsertEquation: (omml: Record<string, unknown>) => void;
|
|
955
1027
|
handleUpdateEquation: (omml: Record<string, unknown>) => void;
|
|
@@ -1421,6 +1493,9 @@ interface ViewerDialogsResult {
|
|
|
1421
1493
|
/** Whether the Insert SmartArt dialog is visible. */
|
|
1422
1494
|
isSmartArtDialogOpen: boolean;
|
|
1423
1495
|
setIsSmartArtDialogOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
1496
|
+
/** Whether the Insert Chart dialog is visible. */
|
|
1497
|
+
isChartDialogOpen: boolean;
|
|
1498
|
+
setIsChartDialogOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
1424
1499
|
/** Whether the equation (MathML/OMML) editor dialog is visible. */
|
|
1425
1500
|
isEquationDialogOpen: boolean;
|
|
1426
1501
|
setIsEquationDialogOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -1569,6 +1644,8 @@ interface ViewerCoreState extends InlineEditingState, EditPointsModeState {
|
|
|
1569
1644
|
mediaInputRef: React$1.RefObject<HTMLInputElement | null>;
|
|
1570
1645
|
/** Mutable ref mirroring `activeSlideIndex` for use in event handlers that must not re-subscribe on index change. */
|
|
1571
1646
|
activeSlideIndexRef: React$1.MutableRefObject<number>;
|
|
1647
|
+
/** The autosave engine, which receives in-progress inline text (set by useAutosave). */
|
|
1648
|
+
autosaveDraftSinkRef: React$1.MutableRefObject<InlineTextDraftSink | null>;
|
|
1572
1649
|
/** Tracks the in-progress drag operation (move) for element(s). */
|
|
1573
1650
|
dragStateRef: React$1.MutableRefObject<DragState | null>;
|
|
1574
1651
|
/** Tracks the in-progress resize operation for an element. */
|
|
@@ -1594,6 +1671,11 @@ interface ViewerCoreState extends InlineEditingState, EditPointsModeState {
|
|
|
1594
1671
|
* that made a single Ctrl+Z look like it did nothing.
|
|
1595
1672
|
*/
|
|
1596
1673
|
justInteractedRef: React$1.MutableRefObject<boolean>;
|
|
1674
|
+
/**
|
|
1675
|
+
* The canvas's move/resize gesture controller, set by `usePointerHandlers`
|
|
1676
|
+
* and started by the press handlers (see canvas-gestures.ts).
|
|
1677
|
+
*/
|
|
1678
|
+
gestureControllerRef: React$1.MutableRefObject<CanvasGestures | null>;
|
|
1597
1679
|
/**
|
|
1598
1680
|
* Interim ("live preview") Y.Doc write channel. Drag/resize and inline
|
|
1599
1681
|
* typing publish through it so remote peers see the gesture before it
|
|
@@ -2179,20 +2261,8 @@ interface SlideCanvasProps {
|
|
|
2179
2261
|
}
|
|
2180
2262
|
//#endregion
|
|
2181
2263
|
//#region src/viewer/hooks/useAutosave.d.ts
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
} | {
|
|
2185
|
-
state: 'disabled';
|
|
2186
|
-
reason: string;
|
|
2187
|
-
} | {
|
|
2188
|
-
state: 'saving';
|
|
2189
|
-
} | {
|
|
2190
|
-
state: 'saved';
|
|
2191
|
-
timestamp: number;
|
|
2192
|
-
} | {
|
|
2193
|
-
state: 'error';
|
|
2194
|
-
message: string;
|
|
2195
|
-
};
|
|
2264
|
+
/** The one autosave status every binding renders (`PptxAutosaveStatus` in `ooxml-ui/pptx`). */
|
|
2265
|
+
type AutosaveStatus = PptxAutosaveStatus;
|
|
2196
2266
|
interface UseAutosaveInput {
|
|
2197
2267
|
/** Whether the document has unsaved changes. */
|
|
2198
2268
|
isDirty: boolean;
|
|
@@ -2204,9 +2274,8 @@ interface UseAutosaveInput {
|
|
|
2204
2274
|
* Autosave interval in seconds.
|
|
2205
2275
|
*
|
|
2206
2276
|
* @deprecated Pass {@link intervalMs} instead. Seconds cannot express the
|
|
2207
|
-
* short cadence a host may legitimately ask for
|
|
2208
|
-
*
|
|
2209
|
-
* was silently overruled. Ignored when `intervalMs` is given.
|
|
2277
|
+
* short cadence a host may legitimately ask for. Ignored when `intervalMs`
|
|
2278
|
+
* is given.
|
|
2210
2279
|
*/
|
|
2211
2280
|
intervalSeconds?: number;
|
|
2212
2281
|
/**
|
|
@@ -2223,18 +2292,18 @@ interface UseAutosaveInput {
|
|
|
2223
2292
|
/** Host storage; its recovery methods replace IndexedDB when it has them. */
|
|
2224
2293
|
storage?: DocumentStorage;
|
|
2225
2294
|
/**
|
|
2226
|
-
* The values a snapshot is built from, read
|
|
2227
|
-
*
|
|
2228
|
-
*
|
|
2229
|
-
*
|
|
2230
|
-
* identical deck every N seconds forever. Vue, Svelte and Vanilla never had
|
|
2231
|
-
* that problem because they debounce on the slides array being reassigned;
|
|
2232
|
-
* this is the same trigger, and `shouldWriteAutosaveSnapshot` writes
|
|
2233
|
-
* whenever it is unsure. Omit it and every tick writes, as before.
|
|
2295
|
+
* The values a snapshot is built from (reassigned, never mutated), read on
|
|
2296
|
+
* every render. While `isDirty`, a change in any of them is an edit that
|
|
2297
|
+
* starts the AutoRecover interval; unchanged values never cause a rewrite.
|
|
2298
|
+
* Omit it and only the clean-to-dirty transition counts as an edit.
|
|
2234
2299
|
*/
|
|
2235
2300
|
getChangeSources?: () => readonly unknown[];
|
|
2236
2301
|
/** Called with the serialised deck after each snapshot is written (the host's `onAutosave`). */
|
|
2237
2302
|
onSaved?: ((data: Uint8Array) => void) | undefined;
|
|
2303
|
+
/** Receives the engine so in-progress inline text counts as an edit (`reportInlineTextDraft`). */
|
|
2304
|
+
inlineDraftSinkRef?: MutableRefObject<InlineTextDraftSink | null>;
|
|
2305
|
+
/** The element whose inline editor is open; a closed editor's draft is dropped. */
|
|
2306
|
+
getInlineEditingId?: () => string | null;
|
|
2238
2307
|
}
|
|
2239
2308
|
interface UseAutosaveResult {
|
|
2240
2309
|
/** Current autosave status for display in the StatusBar. */
|
|
@@ -2499,7 +2568,7 @@ interface UseYjsProviderInput {
|
|
|
2499
2568
|
config?: CollaborationConfig;
|
|
2500
2569
|
}
|
|
2501
2570
|
interface UseYjsProviderResult {
|
|
2502
|
-
/** Current
|
|
2571
|
+
/** Current connection status. */
|
|
2503
2572
|
status: ConnectionStatus$1;
|
|
2504
2573
|
/** The Yjs awareness instance (null until connected). */
|
|
2505
2574
|
awareness: Awareness | null;
|
|
@@ -2511,24 +2580,19 @@ interface UseYjsProviderResult {
|
|
|
2511
2580
|
* Whether the provider completed its initial document sync. Local doc
|
|
2512
2581
|
* writes should be gated on this so a late joiner never seeds its
|
|
2513
2582
|
* bootstrap deck into a room whose content has not arrived yet. Websocket
|
|
2514
|
-
* flips it on the provider's
|
|
2515
|
-
*
|
|
2516
|
-
* receives a sync event).
|
|
2583
|
+
* flips it on the provider's sync event; webrtc on peer sync or after the
|
|
2584
|
+
* grace period (a lone fresh-room peer never receives a sync event).
|
|
2517
2585
|
*/
|
|
2518
2586
|
synced: boolean;
|
|
2519
2587
|
/** Manually retry the connection after a timeout or error. */
|
|
2520
2588
|
retry: () => void;
|
|
2521
2589
|
}
|
|
2522
2590
|
/**
|
|
2523
|
-
* Lazily loads `yjs` and
|
|
2524
|
-
*
|
|
2591
|
+
* Lazily loads `yjs` and the transport, creates a Y.Doc and provider, and
|
|
2592
|
+
* tracks the connection lifecycle through the shared session controller.
|
|
2593
|
+
* The Yjs packages are dynamically imported so they are fully tree-shaken
|
|
2594
|
+
* when collaboration is not enabled.
|
|
2525
2595
|
*
|
|
2526
|
-
* If the connection does not succeed within {@link CONNECTION_TIMEOUT_MS},
|
|
2527
|
-
* the provider is torn down and status moves to `'error'`. The consumer
|
|
2528
|
-
* can call `retry()` to attempt a fresh connection.
|
|
2529
|
-
*
|
|
2530
|
-
* The Yjs packages are dynamically imported so they are fully
|
|
2531
|
-
* tree-shaken when collaboration is not enabled.
|
|
2532
2596
|
* This low-level hook owns built-in transports only. Use useCollaborativeState
|
|
2533
2597
|
* (or the full/headless viewer) to attach a host-owned external session.
|
|
2534
2598
|
*/
|
|
@@ -2915,59 +2979,6 @@ interface UseLoadContentResult {
|
|
|
2915
2979
|
}
|
|
2916
2980
|
declare function useLoadContent({ content, clearSelection, history, setSlides, setTemplateElementsBySlideId, mediaDataUrls, setCanvasSize, setSlideSizeEmu, setHeaderFooter, setFirstSlideNumber, setLayoutOptions, setSlideMasters, setModernCommentAuthors, setRecentColors, setTheme, setTableStyleMap, setTableStylesDefaultId, setTableStylesToDelete, setThemeOptions, setCustomShows, setActiveCustomShowId, setSections, setPresentationProperties, setViewProperties, setNotesMaster, setHandoutMaster, setNotesCanvasSize, setCustomProperties, setTagCollections, setCoreProperties, setAppProperties, setEmbeddedFonts, setActiveSlideIndex, setHasMacros, setHasDigitalSignatures, setDigitalSignatureCount, setGuides, setReadOnlyRecommendation, setModifyVerifier, setCompatToasts, setLoading, setError, setIsDirty, setIsEncrypted, onContentApplied, allowExternalImages, initialSlide }: UseLoadContentInput): UseLoadContentResult;
|
|
2917
2981
|
//#endregion
|
|
2918
|
-
//#region src/viewer/hooks/pointer-handler-types.d.ts
|
|
2919
|
-
interface UsePointerHandlersInput {
|
|
2920
|
-
editorScale: number;
|
|
2921
|
-
canvasStageRef: React.RefObject<HTMLDivElement | null>;
|
|
2922
|
-
canvasSize: CanvasSize$1;
|
|
2923
|
-
activeSlide: PptxSlide | undefined;
|
|
2924
|
-
activeSlideIndex: number;
|
|
2925
|
-
gridSpacingPx: number;
|
|
2926
|
-
dragStateRef: React.MutableRefObject<DragState | null>;
|
|
2927
|
-
resizeStateRef: React.MutableRefObject<ResizeState | null>;
|
|
2928
|
-
shapeAdjustmentDragStateRef: React.MutableRefObject<ShapeAdjustmentDragState | null>;
|
|
2929
|
-
marqueeStateRef: React.MutableRefObject<MarqueeSelectionState | null>;
|
|
2930
|
-
/**
|
|
2931
|
-
* Set on pointer-up when a drag/resize/adjustment gesture actually moved the
|
|
2932
|
-
* element, so the click handler can tell a genuine "click an already-selected
|
|
2933
|
-
* element to edit it" apart from the trailing click a completed gesture
|
|
2934
|
-
* leaves behind. See {@link import('./viewer-core-state-types').ViewerCoreState.justInteractedRef}.
|
|
2935
|
-
*/
|
|
2936
|
-
justInteractedRef: React.MutableRefObject<boolean>;
|
|
2937
|
-
/** When true, pointer commits target the per-slide template store. */
|
|
2938
|
-
editTemplateMode: boolean;
|
|
2939
|
-
snapToGrid: boolean;
|
|
2940
|
-
snapToShape: boolean;
|
|
2941
|
-
guides: Array<{
|
|
2942
|
-
id: string;
|
|
2943
|
-
axis: 'h' | 'v';
|
|
2944
|
-
position: number;
|
|
2945
|
-
}>;
|
|
2946
|
-
/** Template (master/layout) elements for the active slide (drag/marquee source while editing templates). */
|
|
2947
|
-
templateElements: PptxElement[];
|
|
2948
|
-
elementLookup: Map<string, PptxElement>;
|
|
2949
|
-
setMarqueeSelectionState: React.Dispatch<React.SetStateAction<MarqueeSelectionState | null>>;
|
|
2950
|
-
setSnapLines: React.Dispatch<React.SetStateAction<Array<{
|
|
2951
|
-
axis: string;
|
|
2952
|
-
position: number;
|
|
2953
|
-
}>>>;
|
|
2954
|
-
setTemplateElementsBySlideId: React.Dispatch<React.SetStateAction<Record<string, PptxElement[]>>>;
|
|
2955
|
-
setPointerCommitNonce: React.Dispatch<React.SetStateAction<number>>;
|
|
2956
|
-
effectiveSelectedIds: string[];
|
|
2957
|
-
applySelection: (primaryId: string | null, ids?: string[]) => void;
|
|
2958
|
-
clearSelection: () => void;
|
|
2959
|
-
updateSlides: (updater: (s: PptxSlide[]) => PptxSlide[]) => void;
|
|
2960
|
-
updateElementById: (id: string, updates: Partial<PptxElement>) => void;
|
|
2961
|
-
markDirty: () => void;
|
|
2962
|
-
/**
|
|
2963
|
-
* Collaboration live-preview channel. Drag/resize write geometry straight to
|
|
2964
|
-
* the DOM (no React state churn per frame), so without this remote peers saw
|
|
2965
|
-
* nothing until pointer-up. Optional: absent in standalone building-block
|
|
2966
|
-
* compositions, dormant when not collaborating.
|
|
2967
|
-
*/
|
|
2968
|
-
livePatcher?: CollaborationLivePatcher;
|
|
2969
|
-
}
|
|
2970
|
-
//#endregion
|
|
2971
2982
|
//#region src/viewer/hooks/usePointerHandlers.d.ts
|
|
2972
2983
|
declare function usePointerHandlers(input: UsePointerHandlersInput): void;
|
|
2973
2984
|
//#endregion
|