pptx-react-viewer 1.16.1 → 1.17.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 +4 -0
- package/dist/{Model3DScene-DDKQ372V.mjs → Model3DScene-QHDYQXL2.mjs} +2 -2
- package/dist/Model3DScene-QHDYQXL2.mjs.br +0 -0
- package/dist/Model3DScene-QHDYQXL2.mjs.gz +0 -0
- package/dist/{Model3DScene-UBHBPNJ2.js → Model3DScene-YA4F63DT.js} +3 -3
- package/dist/Model3DScene-YA4F63DT.js.br +0 -0
- package/dist/Model3DScene-YA4F63DT.js.gz +0 -0
- package/dist/PowerPointViewer-C4d7SKZf.d.ts +21 -0
- package/dist/PowerPointViewer-C4d7SKZf.d.ts.map +1 -0
- package/dist/{SurfaceChart3DScene-VSUUH2MX.mjs → SurfaceChart3DScene-GUAS2NWQ.mjs} +2 -2
- package/dist/SurfaceChart3DScene-GUAS2NWQ.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-GUAS2NWQ.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-MNFDDCYS.js → SurfaceChart3DScene-TGNJHTJQ.js} +3 -3
- package/dist/SurfaceChart3DScene-TGNJHTJQ.js.br +0 -0
- package/dist/SurfaceChart3DScene-TGNJHTJQ.js.gz +0 -0
- package/dist/{chunk-4LRPKUP7.js → chunk-3P6O7ZDM.js} +420 -420
- package/dist/chunk-3P6O7ZDM.js.br +0 -0
- package/dist/chunk-3P6O7ZDM.js.gz +0 -0
- package/dist/{chunk-YARAQWA4.mjs → chunk-G22EWPLH.mjs} +134 -4
- package/dist/chunk-G22EWPLH.mjs.br +0 -0
- package/dist/chunk-G22EWPLH.mjs.gz +0 -0
- package/dist/{chunk-TLGPM7SI.js → chunk-JWS3RQKN.js} +160 -28
- package/dist/chunk-JWS3RQKN.js.br +0 -0
- package/dist/chunk-JWS3RQKN.js.gz +0 -0
- package/dist/{chunk-XOSQDCHZ.mjs → chunk-LLHFNGAF.mjs} +4 -4
- package/dist/chunk-LLHFNGAF.mjs.br +0 -0
- package/dist/chunk-LLHFNGAF.mjs.gz +0 -0
- package/dist/{chunk-YW23L4KK.mjs → chunk-LNSHC2Z5.mjs} +117 -156
- package/dist/chunk-LNSHC2Z5.mjs.br +0 -0
- package/dist/chunk-LNSHC2Z5.mjs.gz +0 -0
- package/dist/{chunk-VMQLQEGG.js → chunk-MGLRKGCH.js} +156 -98
- package/dist/chunk-MGLRKGCH.js.br +0 -0
- package/dist/chunk-MGLRKGCH.js.gz +0 -0
- package/dist/{chunk-AJPW5FS7.mjs → chunk-XRYREYXC.mjs} +156 -98
- package/dist/chunk-XRYREYXC.mjs.br +0 -0
- package/dist/chunk-XRYREYXC.mjs.gz +0 -0
- package/dist/{chunk-YQHPV3VP.js → chunk-XW5OMXW6.js} +915 -954
- package/dist/chunk-XW5OMXW6.js.br +0 -0
- package/dist/chunk-XW5OMXW6.js.gz +0 -0
- package/dist/{dist-55M4L5OI.js → dist-2ZAH7U6U.js} +507 -507
- package/dist/dist-2ZAH7U6U.js.br +0 -0
- package/dist/dist-2ZAH7U6U.js.gz +0 -0
- package/dist/{dist-C5CVVTDM.mjs → dist-MXDC6YTS.mjs} +1 -1
- package/dist/dist-MXDC6YTS.mjs.br +0 -0
- package/dist/dist-MXDC6YTS.mjs.gz +0 -0
- package/dist/hooks-unstable.d.ts +9683 -1886
- package/dist/hooks-unstable.d.ts.map +1 -0
- package/dist/hooks-unstable.js +74 -74
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +3 -3
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/i18n.d.ts +27 -1
- package/dist/i18n.d.ts.map +1 -0
- package/dist/index-XGt7MZpa.d.ts +607 -0
- package/dist/index-XGt7MZpa.d.ts.map +1 -0
- package/dist/index.d.ts +4753 -10
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -18
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/types-BK7Nt13M.d.ts +483 -0
- package/dist/types-BK7Nt13M.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +8008 -88
- package/dist/viewer/index.d.ts.map +1 -0
- 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 +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +6 -5
- package/dist/Model3DScene-DDKQ372V.mjs.br +0 -0
- package/dist/Model3DScene-DDKQ372V.mjs.gz +0 -0
- package/dist/Model3DScene-UBHBPNJ2.js.br +0 -0
- package/dist/Model3DScene-UBHBPNJ2.js.gz +0 -0
- package/dist/PowerPointViewer-BsaUH3ZT.d.ts +0 -26
- package/dist/PowerPointViewer-Nxku67uL.d.mts +0 -26
- package/dist/SurfaceChart3DScene-MNFDDCYS.js.br +0 -0
- package/dist/SurfaceChart3DScene-MNFDDCYS.js.gz +0 -0
- package/dist/SurfaceChart3DScene-VSUUH2MX.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-VSUUH2MX.mjs.gz +0 -0
- package/dist/chunk-4LRPKUP7.js.br +0 -0
- package/dist/chunk-4LRPKUP7.js.gz +0 -0
- package/dist/chunk-AJPW5FS7.mjs.br +0 -0
- package/dist/chunk-AJPW5FS7.mjs.gz +0 -0
- package/dist/chunk-TLGPM7SI.js.br +0 -0
- package/dist/chunk-TLGPM7SI.js.gz +0 -0
- package/dist/chunk-VMQLQEGG.js.br +0 -0
- package/dist/chunk-VMQLQEGG.js.gz +0 -0
- package/dist/chunk-XOSQDCHZ.mjs.br +0 -0
- package/dist/chunk-XOSQDCHZ.mjs.gz +0 -0
- package/dist/chunk-YARAQWA4.mjs.br +0 -0
- package/dist/chunk-YARAQWA4.mjs.gz +0 -0
- package/dist/chunk-YQHPV3VP.js.br +0 -0
- package/dist/chunk-YQHPV3VP.js.gz +0 -0
- package/dist/chunk-YW23L4KK.mjs.br +0 -0
- package/dist/chunk-YW23L4KK.mjs.gz +0 -0
- package/dist/dist-55M4L5OI.js.br +0 -0
- package/dist/dist-55M4L5OI.js.gz +0 -0
- package/dist/dist-C5CVVTDM.mjs.br +0 -0
- package/dist/dist-C5CVVTDM.mjs.gz +0 -0
- package/dist/hooks-unstable.d.mts +0 -2300
- package/dist/i18n.d.mts +0 -1
- package/dist/index.d.mts +0 -46
- package/dist/types-ui-NG29h55h.d.mts +0 -712
- package/dist/types-ui-NG29h55h.d.ts +0 -712
- package/dist/usePresenterWindow-DToCijGy.d.ts +0 -1619
- package/dist/usePresenterWindow-DeTm-unp.d.mts +0 -1619
- package/dist/viewer/index.d.mts +0 -129
|
@@ -1,712 +0,0 @@
|
|
|
1
|
-
import { P, a, $, U, g, j, X, R, i } from './presentation-BfnrtJV1.js';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
import { ViewerTheme } from './theme/index.js';
|
|
4
|
-
|
|
5
|
-
/** Viewer interaction mode: read-only, edit, presentation, or master-view. */
|
|
6
|
-
type ViewerMode = 'preview' | 'edit' | 'present' | 'master';
|
|
7
|
-
/**
|
|
8
|
-
* Framework-agnostic imperative API contract for the PowerPoint viewer.
|
|
9
|
-
*
|
|
10
|
-
* Each binding (React `forwardRef` handle, Vue `defineExpose`, Angular public
|
|
11
|
-
* methods) implements this interface so consumers get a consistent progressive
|
|
12
|
-
* API regardless of framework.
|
|
13
|
-
*/
|
|
14
|
-
interface PowerPointViewerAPI {
|
|
15
|
-
/** Serialise the current presentation to `.pptx` bytes. */
|
|
16
|
-
getContent: () => Promise<Uint8Array>;
|
|
17
|
-
/** Navigate to a specific slide by zero-based index. */
|
|
18
|
-
goTo: (slideIndex: number) => void;
|
|
19
|
-
/** Navigate to the previous slide. */
|
|
20
|
-
goPrev: () => void;
|
|
21
|
-
/** Navigate to the next slide. */
|
|
22
|
-
goNext: () => void;
|
|
23
|
-
/** Undo the last editing action. No-op when nothing to undo. */
|
|
24
|
-
undo: () => void;
|
|
25
|
-
/** Redo the last undone action. No-op when nothing to redo. */
|
|
26
|
-
redo: () => void;
|
|
27
|
-
/** Whether an undo action is available. */
|
|
28
|
-
canUndo: () => boolean;
|
|
29
|
-
/** Whether a redo action is available. */
|
|
30
|
-
canRedo: () => boolean;
|
|
31
|
-
/** Get the current zoom level (1 = 100%). */
|
|
32
|
-
getZoom: () => number;
|
|
33
|
-
/** Set the zoom level (clamped to min/max bounds). */
|
|
34
|
-
setZoom: (level: number) => void;
|
|
35
|
-
/** Zoom in by one step. */
|
|
36
|
-
zoomIn: () => void;
|
|
37
|
-
/** Zoom out by one step. */
|
|
38
|
-
zoomOut: () => void;
|
|
39
|
-
/** Reset zoom to 100%. */
|
|
40
|
-
zoomReset: () => void;
|
|
41
|
-
/** Get the current viewer mode. */
|
|
42
|
-
getMode: () => ViewerMode;
|
|
43
|
-
/** Switch the viewer mode (e.g. 'edit', 'preview', 'present'). */
|
|
44
|
-
setMode: (mode: ViewerMode) => void;
|
|
45
|
-
/** Get the zero-based active slide index. */
|
|
46
|
-
getActiveSlideIndex: () => number;
|
|
47
|
-
/** Set the active slide by zero-based index (alias of goTo). */
|
|
48
|
-
setActiveSlideIndex: (index: number) => void;
|
|
49
|
-
/** Get the total number of slides. */
|
|
50
|
-
getSlideCount: () => number;
|
|
51
|
-
/** Whether the document has unsaved changes. */
|
|
52
|
-
isDirty: () => boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Get the full slide array. Returns the actual `PptxSlide[]` from the
|
|
55
|
-
* internal model with full type information (elements, notes, transitions,
|
|
56
|
-
* animations, etc.). The returned reference is a snapshot; mutations are
|
|
57
|
-
* not reflected back unless done via the manipulation methods.
|
|
58
|
-
*/
|
|
59
|
-
getSlides: () => readonly P[];
|
|
60
|
-
/** Get a single slide by zero-based index, or undefined if out of range. */
|
|
61
|
-
getSlide: (index: number) => P | undefined;
|
|
62
|
-
/** Get the currently active slide. */
|
|
63
|
-
getActiveSlide: () => P | undefined;
|
|
64
|
-
/** Add a blank slide after the given index (or at end if omitted). */
|
|
65
|
-
addSlide: (afterIndex?: number) => void;
|
|
66
|
-
/** Delete slides at the given zero-based indexes. At least one slide is kept. */
|
|
67
|
-
deleteSlides: (indexes: number[]) => void;
|
|
68
|
-
/** Duplicate slides at the given zero-based indexes. */
|
|
69
|
-
duplicateSlides: (indexes: number[]) => void;
|
|
70
|
-
/** Move a slide from one position to another. */
|
|
71
|
-
moveSlide: (fromIndex: number, toIndex: number) => void;
|
|
72
|
-
/** Toggle the hidden flag on slides at the given indexes. */
|
|
73
|
-
toggleHideSlides: (indexes: number[]) => void;
|
|
74
|
-
/**
|
|
75
|
-
* Get the elements on a slide. Defaults to the active slide when
|
|
76
|
-
* `slideIndex` is omitted. Returns the full `PptxElement[]` with
|
|
77
|
-
* all type-specific properties intact.
|
|
78
|
-
*/
|
|
79
|
-
getElements: (slideIndex?: number) => readonly a[];
|
|
80
|
-
/** Get a single element by ID from the active slide (or a specified slide). */
|
|
81
|
-
getElementById: (elementId: string, slideIndex?: number) => a | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Update one or more properties of an element by ID on the active slide.
|
|
84
|
-
* Accepts a `Partial<PptxElement>` patch (e.g. `{ x: 100, width: 300 }`).
|
|
85
|
-
*/
|
|
86
|
-
updateElement: (elementId: string, updates: Partial<a>) => void;
|
|
87
|
-
/** Delete elements by their IDs from the active slide. */
|
|
88
|
-
deleteElements: (elementIds: string[]) => void;
|
|
89
|
-
/**
|
|
90
|
-
* Duplicate an element on the active slide.
|
|
91
|
-
* Returns the new element's ID, or undefined if the source was not found.
|
|
92
|
-
*/
|
|
93
|
-
duplicateElement: (elementId: string) => string | undefined;
|
|
94
|
-
/** Get the IDs of currently selected elements. */
|
|
95
|
-
getSelectedElementIds: () => string[];
|
|
96
|
-
/** Programmatically select elements by their IDs. */
|
|
97
|
-
selectElements: (ids: string[]) => void;
|
|
98
|
-
/** Clear the current selection. */
|
|
99
|
-
clearSelection: () => void;
|
|
100
|
-
}
|
|
101
|
-
/** Collaboration role within a session. */
|
|
102
|
-
type CollaborationRole = 'owner' | 'collaborator' | 'viewer';
|
|
103
|
-
/**
|
|
104
|
-
* Collaboration transport.
|
|
105
|
-
*
|
|
106
|
-
* - `'websocket'` (default): y-websocket against `serverUrl`.
|
|
107
|
-
* - `'webrtc'`: y-webrtc peer-to-peer; needs no document server. Peers meet
|
|
108
|
-
* through the `signaling` servers (WebRTC signaling only, no document data)
|
|
109
|
-
* and same-browser tabs additionally sync via BroadcastChannel even without
|
|
110
|
-
* any signaling server, which makes this mode usable from static hosting.
|
|
111
|
-
*/
|
|
112
|
-
type CollaborationTransport = 'websocket' | 'webrtc';
|
|
113
|
-
/**
|
|
114
|
-
* Real-time collaboration configuration.
|
|
115
|
-
*
|
|
116
|
-
* The same shape is accepted by the React, Vue, and Angular bindings.
|
|
117
|
-
*/
|
|
118
|
-
interface CollaborationConfig {
|
|
119
|
-
/** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */
|
|
120
|
-
roomId: string;
|
|
121
|
-
/**
|
|
122
|
-
* WebSocket server URL for the Yjs provider (e.g. "wss://collab.example.com").
|
|
123
|
-
* Ignored (may be empty) when `transport` is `'webrtc'`.
|
|
124
|
-
*/
|
|
125
|
-
serverUrl: string;
|
|
126
|
-
/** Transport to use. Defaults to `'websocket'`. */
|
|
127
|
-
transport?: CollaborationTransport;
|
|
128
|
-
/**
|
|
129
|
-
* WebRTC signaling server URLs (only used when `transport` is `'webrtc'`).
|
|
130
|
-
* Defaults to y-webrtc's built-in public signaling list. Same-browser tabs
|
|
131
|
-
* sync via BroadcastChannel regardless of signaling availability.
|
|
132
|
-
*/
|
|
133
|
-
signaling?: string[];
|
|
134
|
-
/** Display name for the local user. */
|
|
135
|
-
userName: string;
|
|
136
|
-
/** Avatar URL for the local user (optional). */
|
|
137
|
-
userAvatar?: string;
|
|
138
|
-
/** Hex colour for the local user's cursor/presence indicator. */
|
|
139
|
-
userColor?: string;
|
|
140
|
-
/** Optional authentication token sent with the WebSocket handshake. */
|
|
141
|
-
authToken?: string;
|
|
142
|
-
/** Role in the session; defaults to `'collaborator'`. */
|
|
143
|
-
role?: CollaborationRole;
|
|
144
|
-
/**
|
|
145
|
-
* Elected-writer write-back callback (Area 3 of the C3 hardening plan).
|
|
146
|
-
*
|
|
147
|
-
* When the local user has `role: 'owner'`, the binding debounces changes and
|
|
148
|
-
* serializes the current Y.Doc state to a PPTX byte array, then calls this
|
|
149
|
-
* callback so the host can persist the snapshot. Only one writer (the owner)
|
|
150
|
-
* does this; other collaborators never trigger write-back, eliminating the
|
|
151
|
-
* last-save-wins problem.
|
|
152
|
-
*/
|
|
153
|
-
onWriteBack?: (bytes: Uint8Array) => void;
|
|
154
|
-
/**
|
|
155
|
-
* Debounce delay (ms) between the last Y.Doc change and the write-back
|
|
156
|
-
* invocation. Defaults to 5000 ms. Set to 0 to write back on every change
|
|
157
|
-
* (not recommended for large documents).
|
|
158
|
-
*/
|
|
159
|
-
writeBackDebounceMs?: number;
|
|
160
|
-
}
|
|
161
|
-
/** Snapshot of a single element's animation state at a point in the timeline. */
|
|
162
|
-
interface ElementAnimationState {
|
|
163
|
-
/** Whether the element should be visible. */
|
|
164
|
-
visible: boolean;
|
|
165
|
-
/** CSS animation shorthand to apply (undefined = no active animation). */
|
|
166
|
-
cssAnimation: string | undefined;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* "Change Case" text mutation (PowerPoint's Aa dropdown: Sentence case, lower,
|
|
171
|
-
* UPPER, Capitalize Each Word, tOGGLE cASE). Unlike `textCaps` (a purely
|
|
172
|
-
* visual `text-transform`-style render hint), these modes rewrite the actual
|
|
173
|
-
* characters, matching PowerPoint's own behaviour. Framework-agnostic; no
|
|
174
|
-
* framework imports.
|
|
175
|
-
*/
|
|
176
|
-
|
|
177
|
-
type ChangeCaseMode = 'sentence' | 'lower' | 'upper' | 'capitalize' | 'toggle';
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* slide-compare — pure, framework-agnostic slide-diff engine shared by every
|
|
181
|
-
* binding (React / Vue / Angular).
|
|
182
|
-
*
|
|
183
|
-
* Provides two entry points over the same element-diff core:
|
|
184
|
-
* - `comparePresentation(base, compare)` — diffs two full `PptxData` documents
|
|
185
|
-
* (the React surface).
|
|
186
|
-
* - `compareSlides(base, compare)` — diffs two `PptxSlide[]` arrays directly
|
|
187
|
-
* (the Vue editor-foundation surface), plus `compareSlide` for a single
|
|
188
|
-
* slide pair and `diffSlideElements` for the flattened element trees.
|
|
189
|
-
*
|
|
190
|
-
* DOM-free and side-effect-free.
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
|
-
type SlideDiffStatus = 'added' | 'removed' | 'changed' | 'unchanged';
|
|
194
|
-
type ElementChangeKind = 'added' | 'removed' | 'moved' | 'resized' | 'textChanged';
|
|
195
|
-
interface ElementChange {
|
|
196
|
-
elementId: string;
|
|
197
|
-
label: string;
|
|
198
|
-
kind: ElementChangeKind;
|
|
199
|
-
description: string;
|
|
200
|
-
}
|
|
201
|
-
interface SlideDiff {
|
|
202
|
-
status: SlideDiffStatus;
|
|
203
|
-
/** Index in the base (current) presentation, or -1 for added slides. */
|
|
204
|
-
baseIndex: number;
|
|
205
|
-
/** Index in the compare (other) presentation, or -1 for removed slides. */
|
|
206
|
-
compareIndex: number;
|
|
207
|
-
/** The base slide data (undefined for added slides). */
|
|
208
|
-
baseSlide?: P;
|
|
209
|
-
/** The compare slide data (undefined for removed slides). */
|
|
210
|
-
compareSlide?: P;
|
|
211
|
-
/** Per-element changes when status is `changed`. */
|
|
212
|
-
changes: ElementChange[];
|
|
213
|
-
}
|
|
214
|
-
interface CompareResult {
|
|
215
|
-
diffs: SlideDiff[];
|
|
216
|
-
baseSlideCount: number;
|
|
217
|
-
compareSlideCount: number;
|
|
218
|
-
addedCount: number;
|
|
219
|
-
removedCount: number;
|
|
220
|
-
changedCount: number;
|
|
221
|
-
unchangedCount: number;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* mobile-viewport.ts: framework-agnostic viewport / touch / orientation
|
|
226
|
-
* detection shared by the React, Vue, and Angular bindings.
|
|
227
|
-
*
|
|
228
|
-
* These are the pure predicates and feature-detection helpers behind each
|
|
229
|
-
* binding's `useIsMobile` / `IsMobileService`. The reactive wiring (React
|
|
230
|
-
* state, Vue refs, Angular signals) stays in the binding; the breakpoint maths
|
|
231
|
-
* and DOM capability probes live here so all three frameworks switch chrome at
|
|
232
|
-
* exactly the same thresholds.
|
|
233
|
-
*
|
|
234
|
-
* SSR / test safe: every probe feature-detects `window` / `navigator` /
|
|
235
|
-
* `screen` and returns a sensible default when absent.
|
|
236
|
-
*/
|
|
237
|
-
/** Mobile breakpoint: below this width is considered mobile. */
|
|
238
|
-
declare const MOBILE_BREAKPOINT = 768;
|
|
239
|
-
/** Tablet breakpoint: below this width (but >= MOBILE) is tablet. */
|
|
240
|
-
declare const TABLET_BREAKPOINT = 1024;
|
|
241
|
-
/** Device orientation as reported by the screen / viewport aspect ratio. */
|
|
242
|
-
type DeviceOrientation = 'portrait' | 'landscape';
|
|
243
|
-
interface TouchGestureCallbacks {
|
|
244
|
-
/** Called continuously during a pinch gesture with the new (clamped) scale. */
|
|
245
|
-
onPinchZoom?: (newScale: number) => void;
|
|
246
|
-
/** Called when a horizontal swipe is detected. direction: -1 = left, 1 = right. */
|
|
247
|
-
onSwipe?: (direction: -1 | 1) => void;
|
|
248
|
-
/** Called when a long-press is detected, with the press coordinates. */
|
|
249
|
-
onLongPress?: (clientX: number, clientY: number) => void;
|
|
250
|
-
}
|
|
251
|
-
/** In-memory clipboard payload stored when an element is copied or cut. */
|
|
252
|
-
interface ElementClipboardPayload {
|
|
253
|
-
element: a;
|
|
254
|
-
isTemplate: boolean;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Pure handout layout calculations, shared by every binding's print path.
|
|
259
|
-
*
|
|
260
|
-
* Handles distributing slides across pages, computing grid dimensions, and
|
|
261
|
-
* positioning cells within A4 page space. No DOM/framework dependency: callers
|
|
262
|
-
* render the resulting rectangles however their view layer prefers.
|
|
263
|
-
*/
|
|
264
|
-
/** Supported slides-per-page values. */
|
|
265
|
-
type HandoutSlidesPerPage = 1 | 2 | 3 | 4 | 6 | 9;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Pure print helpers shared by every binding's print path: settings validation,
|
|
269
|
-
* slide-range / colour-filter resolution, page-count estimation, HTML markup
|
|
270
|
-
* builders, escaping, and the full print-document assembler.
|
|
271
|
-
*
|
|
272
|
-
* No DOM side effects and no `window.print()`: everything is deterministic and
|
|
273
|
-
* the binding writes the returned HTML string into a print window. The handout
|
|
274
|
-
* grid geometry lives in `handout-layout`; this module reuses it.
|
|
275
|
-
*
|
|
276
|
-
* ng-packagr constraint honoured here (the Angular binding inlines this source
|
|
277
|
-
* and compiles it through ng-packagr): NO `String.prototype.replaceAll`
|
|
278
|
-
* (`escapeHtml` uses `.split(x).join(y)` instead).
|
|
279
|
-
*/
|
|
280
|
-
|
|
281
|
-
/** What to print. */
|
|
282
|
-
type PrintWhat = 'slides' | 'handouts' | 'notes' | 'outline';
|
|
283
|
-
/** Page orientation for the printed output. */
|
|
284
|
-
type PrintOrientation = 'portrait' | 'landscape';
|
|
285
|
-
/** Colour mode for the printed output. */
|
|
286
|
-
type PrintColorMode = 'color' | 'grayscale' | 'blackAndWhite';
|
|
287
|
-
/** Slide range mode. */
|
|
288
|
-
type PrintSlideRange = 'all' | 'current' | 'custom';
|
|
289
|
-
/** Resolved print settings emitted on confirm. */
|
|
290
|
-
interface PrintSettings {
|
|
291
|
-
printWhat: PrintWhat;
|
|
292
|
-
orientation: PrintOrientation;
|
|
293
|
-
colorMode: PrintColorMode;
|
|
294
|
-
frameSlides: boolean;
|
|
295
|
-
slidesPerPage: HandoutSlidesPerPage;
|
|
296
|
-
slideRange: PrintSlideRange;
|
|
297
|
-
customRangeFrom: number;
|
|
298
|
-
customRangeTo: number;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Core data-model types for the PowerPoint viewer/editor plugin.
|
|
303
|
-
*
|
|
304
|
-
* Framework-agnostic types (PptxElement, PptxSlide, TextStyle, etc.)
|
|
305
|
-
* live in `pptx-viewer-core`. This module defines additional types used
|
|
306
|
-
* by the React viewer layer for canvas layout, drag/resize interactions,
|
|
307
|
-
* clipboard operations, undo/redo history, geometry, and shape quick styles.
|
|
308
|
-
*/
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Union of all shape preset types that the viewer can insert or render.
|
|
312
|
-
* Maps to OOXML `a:prstGeom` preset values (e.g. "rect", "ellipse").
|
|
313
|
-
* Includes basic shapes, arrows, connectors, and freeform paths.
|
|
314
|
-
*/
|
|
315
|
-
type SupportedShapeType = 'rect' | 'roundRect' | 'ellipse' | 'triangle' | 'rtTriangle' | 'diamond' | 'cylinder' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'octagon' | 'chevron' | 'star5' | 'star6' | 'star8' | 'plus' | 'heart' | 'cloud' | 'sun' | 'moon' | 'pie' | 'plaque' | 'teardrop' | 'line' | 'rtArrow' | 'leftArrow' | 'upArrow' | 'downArrow' | 'connector' | 'freeform';
|
|
316
|
-
/**
|
|
317
|
-
* Connector geometry presets corresponding to OOXML `a:prstGeom` connector types.
|
|
318
|
-
* Determines the routing style (straight, bent with N segments, or curved).
|
|
319
|
-
*/
|
|
320
|
-
type ConnectorGeometryType = 'straightConnector1' | 'bentConnector2' | 'bentConnector3' | 'bentConnector4' | 'bentConnector5' | 'curvedConnector2' | 'curvedConnector3' | 'curvedConnector4' | 'curvedConnector5';
|
|
321
|
-
/** The pixel dimensions of the slide canvas (presentation slide size). */
|
|
322
|
-
interface CanvasSize {
|
|
323
|
-
/** Width of the canvas in CSS pixels. */
|
|
324
|
-
width: number;
|
|
325
|
-
/** Height of the canvas in CSS pixels. */
|
|
326
|
-
height: number;
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Tracks the state of an ongoing element drag operation.
|
|
330
|
-
* Created on pointer-down and destroyed on pointer-up.
|
|
331
|
-
* During the drag, position changes are applied directly to DOM elements
|
|
332
|
-
* for performance (bypassing React state) and committed to state on completion.
|
|
333
|
-
*/
|
|
334
|
-
interface DragState {
|
|
335
|
-
/** ID of the primary element being dragged. */
|
|
336
|
-
elementId: string;
|
|
337
|
-
/** Client X coordinate at the start of the drag. */
|
|
338
|
-
startClientX: number;
|
|
339
|
-
/** Client Y coordinate at the start of the drag. */
|
|
340
|
-
startClientY: number;
|
|
341
|
-
/** Original positions of all selected elements, keyed by element ID. */
|
|
342
|
-
startPositionsById: Record<string, {
|
|
343
|
-
x: number;
|
|
344
|
-
y: number;
|
|
345
|
-
}>;
|
|
346
|
-
/** DOM elements cached at drag-start to avoid per-frame querySelector calls. */
|
|
347
|
-
domEls: Map<string, HTMLElement>;
|
|
348
|
-
/** Whether the pointer has actually moved since the drag started. */
|
|
349
|
-
moved: boolean;
|
|
350
|
-
/** Accumulated delta, stored during DOM-only drag, committed on pointerup. */
|
|
351
|
-
lastDx: number;
|
|
352
|
-
lastDy: number;
|
|
353
|
-
}
|
|
354
|
-
/** Handle used as the resize anchor point (corners + edge midpoints). */
|
|
355
|
-
type ResizeHandle = 'nw' | 'ne' | 'sw' | 'se' | 'n' | 's' | 'e' | 'w';
|
|
356
|
-
/**
|
|
357
|
-
* Tracks the state of an ongoing element resize operation.
|
|
358
|
-
* Uses direct DOM manipulation during the resize for performance,
|
|
359
|
-
* then commits the final geometry to React state on pointer-up.
|
|
360
|
-
*/
|
|
361
|
-
interface ResizeState {
|
|
362
|
-
/** ID of the element being resized. */
|
|
363
|
-
elementId: string;
|
|
364
|
-
/** Client X coordinate at the start of the resize. */
|
|
365
|
-
startClientX: number;
|
|
366
|
-
/** Client Y coordinate at the start of the resize. */
|
|
367
|
-
startClientY: number;
|
|
368
|
-
/** Original X position of the element. */
|
|
369
|
-
startX: number;
|
|
370
|
-
/** Original Y position of the element. */
|
|
371
|
-
startY: number;
|
|
372
|
-
/** Original width of the element. */
|
|
373
|
-
startWidth: number;
|
|
374
|
-
/** Original height of the element. */
|
|
375
|
-
startHeight: number;
|
|
376
|
-
/** Which handle initiated the resize. */
|
|
377
|
-
handle: ResizeHandle;
|
|
378
|
-
/** Whether the pointer has actually moved since the resize started. */
|
|
379
|
-
moved: boolean;
|
|
380
|
-
/** DOM element cached at resize-start to avoid per-frame querySelector calls. */
|
|
381
|
-
domEl: HTMLElement | null;
|
|
382
|
-
/** Accumulated final geometry, committed on pointerup. */
|
|
383
|
-
lastX: number;
|
|
384
|
-
lastY: number;
|
|
385
|
-
lastWidth: number;
|
|
386
|
-
lastHeight: number;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Describes the position and value of a shape adjustment handle (yellow diamond).
|
|
390
|
-
* Adjustment handles allow users to modify shape parameters like corner radius,
|
|
391
|
-
* arrow width, etc. without a full resize.
|
|
392
|
-
*/
|
|
393
|
-
interface ShapeAdjustmentHandleDescriptor {
|
|
394
|
-
key: string;
|
|
395
|
-
left: number;
|
|
396
|
-
top: number;
|
|
397
|
-
value: number;
|
|
398
|
-
cursor: string;
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* Tracks the state of an ongoing shape adjustment handle drag.
|
|
402
|
-
* Used when the user drags the yellow diamond handle to alter
|
|
403
|
-
* shape-specific parameters (e.g. corner radius on a rounded rectangle).
|
|
404
|
-
*/
|
|
405
|
-
interface ShapeAdjustmentDragState {
|
|
406
|
-
elementId: string;
|
|
407
|
-
key: string;
|
|
408
|
-
shapeType: string;
|
|
409
|
-
startClientX: number;
|
|
410
|
-
startClientY: number;
|
|
411
|
-
startAdjustment: number;
|
|
412
|
-
startWidth: number;
|
|
413
|
-
startHeight: number;
|
|
414
|
-
moved: boolean;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* A snapshot of editor state captured for undo/redo history.
|
|
419
|
-
* Contains the full slide deck state at a point in time so that
|
|
420
|
-
* any editing operation can be reverted or replayed.
|
|
421
|
-
*/
|
|
422
|
-
interface EditorHistorySnapshot {
|
|
423
|
-
width: number;
|
|
424
|
-
height: number;
|
|
425
|
-
activeSlideIndex: number;
|
|
426
|
-
slides: P[];
|
|
427
|
-
templateElementsBySlideId: Record<string, a[]>;
|
|
428
|
-
actionLabel?: string;
|
|
429
|
-
}
|
|
430
|
-
/** Axis-aligned bounding box for an element, used for hit-testing and alignment. */
|
|
431
|
-
interface ElementBounds {
|
|
432
|
-
minX: number;
|
|
433
|
-
minY: number;
|
|
434
|
-
maxX: number;
|
|
435
|
-
maxY: number;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* Geometry data for rendering a connector line as an SVG path.
|
|
439
|
-
* Includes start/end coordinates, the SVG path data string,
|
|
440
|
-
* and optional marker (arrowhead) identifiers.
|
|
441
|
-
*/
|
|
442
|
-
interface ConnectorPathGeometry {
|
|
443
|
-
startX: number;
|
|
444
|
-
startY: number;
|
|
445
|
-
endX: number;
|
|
446
|
-
endY: number;
|
|
447
|
-
pathData: string;
|
|
448
|
-
d?: string;
|
|
449
|
-
viewBox?: string;
|
|
450
|
-
startMarkerId?: string;
|
|
451
|
-
endMarkerId?: string;
|
|
452
|
-
}
|
|
453
|
-
/** A named preset shape style used in the Quick Styles gallery. */
|
|
454
|
-
interface ShapeQuickStyle {
|
|
455
|
-
name: string;
|
|
456
|
-
style: Partial<$>;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Base handle interface for file viewer components.
|
|
461
|
-
* Defined locally to avoid dependency on external file-viewer plugin packages.
|
|
462
|
-
* Provides a standard `getContent` method used by the host application to
|
|
463
|
-
* retrieve the current file content (e.g. for saving).
|
|
464
|
-
*/
|
|
465
|
-
interface FileViewerHandle {
|
|
466
|
-
/** Get the current content of the file (for saving) */
|
|
467
|
-
getContent: () => Promise<string | Uint8Array>;
|
|
468
|
-
}
|
|
469
|
-
/** A shape preset entry used in the toolbar shape insertion palette. */
|
|
470
|
-
interface ShapePreset {
|
|
471
|
-
type: SupportedShapeType;
|
|
472
|
-
label: string;
|
|
473
|
-
icon: React__default.ReactNode;
|
|
474
|
-
}
|
|
475
|
-
/** Tracks the position and target element of an open context menu. */
|
|
476
|
-
interface ElementContextMenuState {
|
|
477
|
-
x: number;
|
|
478
|
-
y: number;
|
|
479
|
-
elementId: string;
|
|
480
|
-
}
|
|
481
|
-
/** Identifies an action triggered from the element right-click context menu. */
|
|
482
|
-
type ElementContextMenuAction = 'copy' | 'cut' | 'paste' | 'duplicate' | 'delete' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'bringForward' | 'sendBackward' | 'bringToFront' | 'sendToBack' | 'comment' | 'addComment' | 'group' | 'ungroup' | 'editPoints' | 'editHyperlink';
|
|
483
|
-
/**
|
|
484
|
-
* State of an active marquee (rubber-band) selection rectangle.
|
|
485
|
-
* Created when the user clicks and drags on the canvas background,
|
|
486
|
-
* and used to compute which elements fall within the selection area.
|
|
487
|
-
*/
|
|
488
|
-
interface MarqueeSelectionState {
|
|
489
|
-
startX: number;
|
|
490
|
-
startY: number;
|
|
491
|
-
currentX: number;
|
|
492
|
-
currentY: number;
|
|
493
|
-
additive: boolean;
|
|
494
|
-
baseSelectionIds?: string[];
|
|
495
|
-
}
|
|
496
|
-
/** Tracks which table cell is selected and/or actively being edited. */
|
|
497
|
-
interface TableCellEditorState {
|
|
498
|
-
rowIndex: number;
|
|
499
|
-
columnIndex: number;
|
|
500
|
-
/** When true the cell has an active text input. */
|
|
501
|
-
isEditing?: boolean;
|
|
502
|
-
/** Optional multi-cell selection (Shift+Click range). Each entry is {row, col}. */
|
|
503
|
-
selectedCells?: Array<{
|
|
504
|
-
row: number;
|
|
505
|
-
col: number;
|
|
506
|
-
}>;
|
|
507
|
-
}
|
|
508
|
-
/** A single parsed table cell with its position, text content, and computed CSS style. */
|
|
509
|
-
interface ParsedTableCell {
|
|
510
|
-
rowIndex: number;
|
|
511
|
-
columnIndex: number;
|
|
512
|
-
text: string;
|
|
513
|
-
style: React__default.CSSProperties;
|
|
514
|
-
rawCell: X;
|
|
515
|
-
}
|
|
516
|
-
/** Complete parsed table data including row/column structure and all cells. */
|
|
517
|
-
interface ParsedTableData {
|
|
518
|
-
rowCount: number;
|
|
519
|
-
columnCount: number;
|
|
520
|
-
rows: X[];
|
|
521
|
-
columnPercentages: number[];
|
|
522
|
-
cells: ParsedTableCell[];
|
|
523
|
-
}
|
|
524
|
-
/** Runtime state for a single element's animation during presentation mode. */
|
|
525
|
-
interface PresentationAnimationRuntime {
|
|
526
|
-
elementId: string;
|
|
527
|
-
state: 'hidden' | 'entering' | 'visible';
|
|
528
|
-
animation: U;
|
|
529
|
-
}
|
|
530
|
-
/**
|
|
531
|
-
* Groups slides into named sections for the slides pane sidebar.
|
|
532
|
-
* Corresponds to OOXML `p15:section` elements in `presentation.xml`.
|
|
533
|
-
*/
|
|
534
|
-
interface SlideSectionGroup {
|
|
535
|
-
id: string;
|
|
536
|
-
label: string;
|
|
537
|
-
slideIndexes: number[];
|
|
538
|
-
/** Section highlight color from p15:sectionPr. */
|
|
539
|
-
color?: string;
|
|
540
|
-
/** Whether the section should start collapsed (from p15:sectionPr). */
|
|
541
|
-
defaultCollapsed?: boolean;
|
|
542
|
-
}
|
|
543
|
-
/** Alignment direction for distributing/aligning multiple selected elements on the slide. */
|
|
544
|
-
type SlideAlignment = 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom';
|
|
545
|
-
/** Identifies one of the ribbon-style toolbar tabs (home, insert, text, etc.). */
|
|
546
|
-
type ToolbarSection = 'file' | 'home' | 'insert' | 'text' | 'arrange' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
|
|
547
|
-
/** The active drawing/inking tool selected in the Draw toolbar tab. */
|
|
548
|
-
type DrawingTool = 'select' | 'pen' | 'highlighter' | 'eraser' | 'freeform';
|
|
549
|
-
/** A single entry in the keyboard shortcuts help panel. */
|
|
550
|
-
interface ShortcutReferenceItem {
|
|
551
|
-
actionKey: string;
|
|
552
|
-
shortcut: string;
|
|
553
|
-
}
|
|
554
|
-
/** An accessibility audit finding (missing alt text, reading order issues, etc.). */
|
|
555
|
-
interface AccessibilityIssue {
|
|
556
|
-
slideIndex: number;
|
|
557
|
-
elementId?: string;
|
|
558
|
-
severity: 'error' | 'warning' | 'info';
|
|
559
|
-
message: string;
|
|
560
|
-
}
|
|
561
|
-
/** Dropdown option for selecting a connector geometry type. */
|
|
562
|
-
interface ConnectorGeometryOption {
|
|
563
|
-
value: ConnectorGeometryType;
|
|
564
|
-
label: string;
|
|
565
|
-
}
|
|
566
|
-
/** Dropdown option for selecting a connector arrowhead style. */
|
|
567
|
-
interface ConnectorArrowOption {
|
|
568
|
-
value: j;
|
|
569
|
-
label: string;
|
|
570
|
-
}
|
|
571
|
-
/** Dropdown option for selecting a stroke dash pattern. */
|
|
572
|
-
interface StrokeDashOption {
|
|
573
|
-
value: i;
|
|
574
|
-
label: string;
|
|
575
|
-
}
|
|
576
|
-
/** Dropdown option for selecting a slide transition type. */
|
|
577
|
-
interface SlideTransitionOption {
|
|
578
|
-
value: NonNullable<R['type']>;
|
|
579
|
-
label: string;
|
|
580
|
-
}
|
|
581
|
-
/** Dropdown option for selecting an animation effect preset. */
|
|
582
|
-
interface AnimationPresetOption {
|
|
583
|
-
value: Exclude<g, 'none'>;
|
|
584
|
-
label: string;
|
|
585
|
-
}
|
|
586
|
-
interface PowerPointViewerProps {
|
|
587
|
-
/** PowerPoint content as Uint8Array */
|
|
588
|
-
content: Uint8Array;
|
|
589
|
-
/** Original file path, used for autosave recovery */
|
|
590
|
-
filePath?: string;
|
|
591
|
-
/**
|
|
592
|
-
* Display name of the open document, shown in the PowerPoint-style title
|
|
593
|
-
* bar (e.g. "quarterly-review.pptx"). Falls back to a generic label.
|
|
594
|
-
*/
|
|
595
|
-
fileName?: string;
|
|
596
|
-
/** Callback when content has unsaved changes */
|
|
597
|
-
onDirtyChange?: (isDirty: boolean) => void;
|
|
598
|
-
onContentChange?: (content: Uint8Array) => void;
|
|
599
|
-
/** Callback when active slide changes */
|
|
600
|
-
onActiveSlideChange?: (slideIndex: number) => void;
|
|
601
|
-
/** Callback when the viewer mode changes (e.g. edit to present). */
|
|
602
|
-
onModeChange?: (mode: ViewerMode) => void;
|
|
603
|
-
/** Callback when the zoom level changes. */
|
|
604
|
-
onZoomChange?: (zoom: number) => void;
|
|
605
|
-
/** Callback when element selection changes. */
|
|
606
|
-
onSelectionChange?: (elementIds: string[]) => void;
|
|
607
|
-
/** Callback when the total slide count changes (slide added/deleted). */
|
|
608
|
-
onSlideCountChange?: (count: number) => void;
|
|
609
|
-
/**
|
|
610
|
-
* Host override for the File ▸ Open action. When provided, the built-in
|
|
611
|
-
* native file picker is bypassed and this is invoked instead; the host is
|
|
612
|
-
* then responsible for supplying a new `content` buffer. When omitted, the
|
|
613
|
-
* viewer opens its own picker and loads the chosen presentation in place.
|
|
614
|
-
*/
|
|
615
|
-
onOpenFile?: () => void;
|
|
616
|
-
/** Whether editing actions are enabled */
|
|
617
|
-
canEdit?: boolean;
|
|
618
|
-
/** Optional class name */
|
|
619
|
-
className?: string;
|
|
620
|
-
/**
|
|
621
|
-
* Display name used as the author for comments and annotations.
|
|
622
|
-
* Falls back to `collaboration.userName` when collaborating, or `'You'`.
|
|
623
|
-
*/
|
|
624
|
-
authorName?: string;
|
|
625
|
-
/**
|
|
626
|
-
* Theme configuration for customising the viewer's appearance.
|
|
627
|
-
*
|
|
628
|
-
* Accepts partial color overrides, a custom border-radius, and
|
|
629
|
-
* arbitrary CSS custom properties. Unset values fall back to the
|
|
630
|
-
* built-in dark theme.
|
|
631
|
-
*
|
|
632
|
-
* @example
|
|
633
|
-
* ```tsx
|
|
634
|
-
* <PowerPointViewer
|
|
635
|
-
* content={bytes}
|
|
636
|
-
* theme={{
|
|
637
|
-
* colors: { primary: "#6366f1", background: "#0f172a" },
|
|
638
|
-
* radius: "0.75rem",
|
|
639
|
-
* }}
|
|
640
|
-
* />
|
|
641
|
-
* ```
|
|
642
|
-
*
|
|
643
|
-
* @see {@link ViewerTheme} for the full type definition.
|
|
644
|
-
*/
|
|
645
|
-
theme?: ViewerTheme;
|
|
646
|
-
/**
|
|
647
|
-
* Optional real-time collaboration configuration.
|
|
648
|
-
*
|
|
649
|
-
* When provided, the viewer enables collaborative editing with live
|
|
650
|
-
* cursors, user presence indicators, and CRDT-based state sync via Yjs.
|
|
651
|
-
* Requires `yjs` and `y-websocket` peer dependencies.
|
|
652
|
-
*
|
|
653
|
-
* @example
|
|
654
|
-
* ```tsx
|
|
655
|
-
* <PowerPointViewer
|
|
656
|
-
* content={bytes}
|
|
657
|
-
* collaboration={{
|
|
658
|
-
* roomId: "my-room-123",
|
|
659
|
-
* serverUrl: "wss://collab.example.com",
|
|
660
|
-
* userName: "Alice",
|
|
661
|
-
* userColor: "#6366f1",
|
|
662
|
-
* }}
|
|
663
|
-
* />
|
|
664
|
-
* ```
|
|
665
|
-
*/
|
|
666
|
-
collaboration?: CollaborationConfig;
|
|
667
|
-
/**
|
|
668
|
-
* Callback invoked when the user starts a collaboration session from the
|
|
669
|
-
* Share dialog. The host app should use this to set the `collaboration`
|
|
670
|
-
* prop with the returned config.
|
|
671
|
-
*/
|
|
672
|
-
onStartCollaboration?: (config: CollaborationConfig) => void;
|
|
673
|
-
/**
|
|
674
|
-
* Callback invoked when the user stops a collaboration session from the
|
|
675
|
-
* Share dialog. The host app should clear the `collaboration` prop.
|
|
676
|
-
*/
|
|
677
|
-
onStopCollaboration?: () => void;
|
|
678
|
-
/**
|
|
679
|
-
* Default values for the Share dialog fields. The host app should provide
|
|
680
|
-
* these to control the session name, user display name, and server URL.
|
|
681
|
-
* If omitted, the Share dialog fields will be empty and require user input.
|
|
682
|
-
*
|
|
683
|
-
* @example
|
|
684
|
-
* ```tsx
|
|
685
|
-
* <PowerPointViewer
|
|
686
|
-
* shareDefaults={{
|
|
687
|
-
* roomId: "session-abc123",
|
|
688
|
-
* userName: "Alice",
|
|
689
|
-
* serverUrl: "ws://localhost:1234",
|
|
690
|
-
* }}
|
|
691
|
-
* />
|
|
692
|
-
* ```
|
|
693
|
-
*/
|
|
694
|
-
shareDefaults?: {
|
|
695
|
-
roomId?: string;
|
|
696
|
-
userName?: string;
|
|
697
|
-
serverUrl?: string;
|
|
698
|
-
};
|
|
699
|
-
/**
|
|
700
|
-
* Opt in to the experimental Three.js SmartArt renderer. When `true`,
|
|
701
|
-
* SmartArt diagrams render as extruded 3D blocks on a WebGL canvas instead
|
|
702
|
-
* of flat SVG. Requires the optional `three` peer dependency; when it is not
|
|
703
|
-
* installed (or the diagram has no geometry), the viewer transparently falls
|
|
704
|
-
* back to the SVG `SmartArtRenderer`. Default `false`.
|
|
705
|
-
*/
|
|
706
|
-
smartArt3D?: boolean;
|
|
707
|
-
}
|
|
708
|
-
interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI {
|
|
709
|
-
getContent: () => Promise<Uint8Array>;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
export { type AccessibilityIssue as A, type SupportedShapeType as B, type CollaborationConfig as C, type DragState as D, type EditorHistorySnapshot as E, type FileViewerHandle as F, type ToolbarSection as G, type ElementAnimationState as H, type ChangeCaseMode as I, type PrintSettings as J, type CompareResult as K, type DeviceOrientation as L, type MarqueeSelectionState as M, type TouchGestureCallbacks as N, MOBILE_BREAKPOINT as O, type PowerPointViewerAPI as P, TABLET_BREAKPOINT as Q, type ResizeHandle as R, type ShapeAdjustmentDragState as S, type TableCellEditorState as T, type ViewerMode as V, type PowerPointViewerHandle as a, type PowerPointViewerProps as b, type AnimationPresetOption as c, type CanvasSize as d, type CollaborationRole as e, type ConnectorArrowOption as f, type ConnectorGeometryOption as g, type ConnectorGeometryType as h, type ConnectorPathGeometry as i, type DrawingTool as j, type ElementBounds as k, type ElementClipboardPayload as l, type ElementContextMenuAction as m, type ElementContextMenuState as n, type ParsedTableCell as o, type ParsedTableData as p, type PresentationAnimationRuntime as q, type ResizeState as r, type ShapeAdjustmentHandleDescriptor as s, type ShapePreset as t, type ShapeQuickStyle as u, type ShortcutReferenceItem as v, type SlideAlignment as w, type SlideSectionGroup as x, type SlideTransitionOption as y, type StrokeDashOption as z };
|