pptx-react-viewer 2.2.1 → 2.4.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 (152) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-O4NYWO3D.js → AiChatPanel-HLLGXBZF.js} +23 -24
  3. package/dist/AiChatPanel-HLLGXBZF.js.br +0 -0
  4. package/dist/AiChatPanel-HLLGXBZF.js.gz +0 -0
  5. package/dist/{AiChatPanel-XRKEPXAM.mjs → AiChatPanel-SXYMXFYS.mjs} +4 -5
  6. package/dist/AiChatPanel-SXYMXFYS.mjs.br +0 -0
  7. package/dist/AiChatPanel-SXYMXFYS.mjs.gz +0 -0
  8. package/dist/{Model3DScene-JN5F5C4Z.mjs → Model3DScene-IECT4RWT.mjs} +1 -2
  9. package/dist/Model3DScene-IECT4RWT.mjs.br +0 -0
  10. package/dist/Model3DScene-IECT4RWT.mjs.gz +0 -0
  11. package/dist/{Model3DScene-HYE6HA2C.js → Model3DScene-ZQBWLAMC.js} +2 -3
  12. package/dist/Model3DScene-ZQBWLAMC.js.br +0 -0
  13. package/dist/Model3DScene-ZQBWLAMC.js.gz +0 -0
  14. package/dist/{PowerPointViewer-gmU5rc7K.d.ts → PowerPointViewer-Cjn1RgSz.d.ts} +2 -2
  15. package/dist/{PowerPointViewer-gmU5rc7K.d.ts.map → PowerPointViewer-Cjn1RgSz.d.ts.map} +1 -1
  16. package/dist/{SurfaceChart3DScene-FDJ6LC4E.js → SurfaceChart3DScene-4KRMRWW6.js} +2 -3
  17. package/dist/SurfaceChart3DScene-4KRMRWW6.js.br +0 -0
  18. package/dist/SurfaceChart3DScene-4KRMRWW6.js.gz +0 -0
  19. package/dist/{SurfaceChart3DScene-V7P3LQVV.mjs → SurfaceChart3DScene-52C3IMPQ.mjs} +1 -2
  20. package/dist/SurfaceChart3DScene-52C3IMPQ.mjs.br +0 -0
  21. package/dist/SurfaceChart3DScene-52C3IMPQ.mjs.gz +0 -0
  22. package/dist/audience-content-store-BMlth_3U.d.ts +386 -0
  23. package/dist/audience-content-store-BMlth_3U.d.ts.map +1 -0
  24. package/dist/{chunk-YIFO3WQO.js → chunk-25VSL2BB.js} +1 -0
  25. package/dist/chunk-25VSL2BB.js.br +0 -0
  26. package/dist/chunk-25VSL2BB.js.gz +0 -0
  27. package/dist/{chunk-XJTWUXXC.js → chunk-5GHLRHBR.js} +3 -3
  28. package/dist/chunk-5GHLRHBR.js.br +0 -0
  29. package/dist/chunk-5GHLRHBR.js.gz +0 -0
  30. package/dist/{chunk-2U243ZEP.js → chunk-5TPQJWEO.js} +267 -252
  31. package/dist/chunk-5TPQJWEO.js.br +0 -0
  32. package/dist/chunk-5TPQJWEO.js.gz +0 -0
  33. package/dist/{chunk-O75FHZQJ.mjs → chunk-G6Q3NXRV.mjs} +23 -8
  34. package/dist/chunk-G6Q3NXRV.mjs.br +0 -0
  35. package/dist/chunk-G6Q3NXRV.mjs.gz +0 -0
  36. package/dist/{chunk-RYHBWTPI.mjs → chunk-KK7FWBGO.mjs} +89 -69
  37. package/dist/chunk-KK7FWBGO.mjs.br +0 -0
  38. package/dist/chunk-KK7FWBGO.mjs.gz +0 -0
  39. package/dist/{chunk-7NSLKNCT.mjs → chunk-LRIXPSVT.mjs} +4 -6
  40. package/dist/chunk-LRIXPSVT.mjs.br +0 -0
  41. package/dist/chunk-LRIXPSVT.mjs.gz +0 -0
  42. package/dist/{chunk-I2HF7ZPO.mjs → chunk-Q6FC2552.mjs} +1 -1
  43. package/dist/chunk-Q6FC2552.mjs.br +0 -0
  44. package/dist/chunk-Q6FC2552.mjs.gz +0 -0
  45. package/dist/{chunk-R2H3FHK6.js → chunk-QBZA2GMB.mjs} +47788 -32364
  46. package/dist/chunk-QBZA2GMB.mjs.br +0 -0
  47. package/dist/chunk-QBZA2GMB.mjs.gz +0 -0
  48. package/dist/{chunk-K2AW5UXT.js → chunk-VEZO33T2.js} +314 -316
  49. package/dist/chunk-VEZO33T2.js.br +0 -0
  50. package/dist/chunk-VEZO33T2.js.gz +0 -0
  51. package/dist/{chunk-PE2I5L6R.mjs → chunk-WK56SFN7.js} +48287 -31794
  52. package/dist/chunk-WK56SFN7.js.br +0 -0
  53. package/dist/chunk-WK56SFN7.js.gz +0 -0
  54. package/dist/{chunk-QULJW7LU.js → chunk-XSBFV6TL.js} +929 -909
  55. package/dist/chunk-XSBFV6TL.js.br +0 -0
  56. package/dist/chunk-XSBFV6TL.js.gz +0 -0
  57. package/dist/{chunk-PZTPX3HK.mjs → chunk-Z6HIZWIQ.mjs} +1 -0
  58. package/dist/chunk-Z6HIZWIQ.mjs.br +0 -0
  59. package/dist/chunk-Z6HIZWIQ.mjs.gz +0 -0
  60. package/dist/i18n.js +4 -4
  61. package/dist/i18n.js.br +0 -0
  62. package/dist/i18n.js.gz +0 -0
  63. package/dist/i18n.mjs +1 -1
  64. package/dist/i18n.mjs.br +0 -0
  65. package/dist/i18n.mjs.gz +0 -0
  66. package/dist/index.d.ts +92 -87
  67. package/dist/index.js +39 -40
  68. package/dist/index.js.br +0 -0
  69. package/dist/index.js.gz +0 -0
  70. package/dist/index.mjs +6 -7
  71. package/dist/index.mjs.br +0 -0
  72. package/dist/index.mjs.gz +0 -0
  73. package/dist/internals.d.ts +519 -514
  74. package/dist/internals.d.ts.map +1 -1
  75. package/dist/internals.js +79 -81
  76. package/dist/internals.js.br +0 -0
  77. package/dist/internals.js.gz +0 -0
  78. package/dist/internals.mjs +4 -6
  79. package/dist/internals.mjs.br +0 -0
  80. package/dist/internals.mjs.gz +0 -0
  81. package/dist/pptx-viewer.css +1 -1
  82. package/dist/pptx-viewer.css.br +0 -0
  83. package/dist/pptx-viewer.css.gz +0 -0
  84. package/dist/{animation-timeline-eb5z0SHW.d.ts → types-DciBT90G.d.ts} +4 -3
  85. package/dist/types-DciBT90G.d.ts.map +1 -0
  86. package/dist/{useViewerBuildingBlocks-CjureTRf.d.ts → useViewerBuildingBlocks-DMDZRawe.d.ts} +4 -4
  87. package/dist/{useViewerBuildingBlocks-CjureTRf.d.ts.map → useViewerBuildingBlocks-DMDZRawe.d.ts.map} +1 -1
  88. package/dist/viewer/index.d.ts +92 -88
  89. package/dist/viewer/index.js +22 -24
  90. package/dist/viewer/index.js.br +0 -0
  91. package/dist/viewer/index.js.gz +0 -0
  92. package/dist/viewer/index.mjs +6 -8
  93. package/dist/viewer/index.mjs.br +0 -0
  94. package/dist/viewer/index.mjs.gz +0 -0
  95. package/package.json +4 -4
  96. package/dist/AiChatPanel-O4NYWO3D.js.br +0 -0
  97. package/dist/AiChatPanel-O4NYWO3D.js.gz +0 -0
  98. package/dist/AiChatPanel-XRKEPXAM.mjs.br +0 -0
  99. package/dist/AiChatPanel-XRKEPXAM.mjs.gz +0 -0
  100. package/dist/Model3DScene-HYE6HA2C.js.br +0 -0
  101. package/dist/Model3DScene-HYE6HA2C.js.gz +0 -0
  102. package/dist/Model3DScene-JN5F5C4Z.mjs.br +0 -0
  103. package/dist/Model3DScene-JN5F5C4Z.mjs.gz +0 -0
  104. package/dist/SurfaceChart3DScene-FDJ6LC4E.js.br +0 -0
  105. package/dist/SurfaceChart3DScene-FDJ6LC4E.js.gz +0 -0
  106. package/dist/SurfaceChart3DScene-V7P3LQVV.mjs.br +0 -0
  107. package/dist/SurfaceChart3DScene-V7P3LQVV.mjs.gz +0 -0
  108. package/dist/animation-timeline-eb5z0SHW.d.ts.map +0 -1
  109. package/dist/chunk-2QHCOESN.js +0 -28037
  110. package/dist/chunk-2QHCOESN.js.br +0 -0
  111. package/dist/chunk-2QHCOESN.js.gz +0 -0
  112. package/dist/chunk-2U243ZEP.js.br +0 -0
  113. package/dist/chunk-2U243ZEP.js.gz +0 -0
  114. package/dist/chunk-6G6S7PEI.mjs +0 -27604
  115. package/dist/chunk-6G6S7PEI.mjs.br +0 -0
  116. package/dist/chunk-6G6S7PEI.mjs.gz +0 -0
  117. package/dist/chunk-7NSLKNCT.mjs.br +0 -0
  118. package/dist/chunk-7NSLKNCT.mjs.gz +0 -0
  119. package/dist/chunk-I2HF7ZPO.mjs.br +0 -0
  120. package/dist/chunk-I2HF7ZPO.mjs.gz +0 -0
  121. package/dist/chunk-IKBO6CZC.js +0 -2
  122. package/dist/chunk-IKBO6CZC.js.br +0 -3
  123. package/dist/chunk-IKBO6CZC.js.gz +0 -0
  124. package/dist/chunk-K2AW5UXT.js.br +0 -0
  125. package/dist/chunk-K2AW5UXT.js.gz +0 -0
  126. package/dist/chunk-O75FHZQJ.mjs.br +0 -0
  127. package/dist/chunk-O75FHZQJ.mjs.gz +0 -0
  128. package/dist/chunk-PE2I5L6R.mjs.br +0 -0
  129. package/dist/chunk-PE2I5L6R.mjs.gz +0 -0
  130. package/dist/chunk-PZTPX3HK.mjs.br +0 -0
  131. package/dist/chunk-PZTPX3HK.mjs.gz +0 -0
  132. package/dist/chunk-QULJW7LU.js.br +0 -0
  133. package/dist/chunk-QULJW7LU.js.gz +0 -0
  134. package/dist/chunk-R2H3FHK6.js.br +0 -0
  135. package/dist/chunk-R2H3FHK6.js.gz +0 -0
  136. package/dist/chunk-RYHBWTPI.mjs.br +0 -0
  137. package/dist/chunk-RYHBWTPI.mjs.gz +0 -0
  138. package/dist/chunk-T5U6P2JH.mjs +0 -1
  139. package/dist/chunk-T5U6P2JH.mjs.br +0 -0
  140. package/dist/chunk-T5U6P2JH.mjs.gz +0 -0
  141. package/dist/chunk-XJTWUXXC.js.br +0 -0
  142. package/dist/chunk-XJTWUXXC.js.gz +0 -0
  143. package/dist/chunk-YIFO3WQO.js.br +0 -0
  144. package/dist/chunk-YIFO3WQO.js.gz +0 -0
  145. package/dist/dist-VEWYRBTB.mjs +0 -2
  146. package/dist/dist-VEWYRBTB.mjs.br +0 -0
  147. package/dist/dist-VEWYRBTB.mjs.gz +0 -0
  148. package/dist/dist-ZCJLIRYG.js +0 -2275
  149. package/dist/dist-ZCJLIRYG.js.br +0 -0
  150. package/dist/dist-ZCJLIRYG.js.gz +0 -0
  151. package/dist/index-CDCSXtK3.d.ts +0 -685
  152. package/dist/index-CDCSXtK3.d.ts.map +0 -1
@@ -0,0 +1,386 @@
1
+ import { C as CollaborationConfig$1, D as UserPresence, E as ConnectionStatus, w as CollaborationContextValue } from "./types-DciBT90G.js";
2
+ import { PptxData, PptxElement, PptxHandler, PptxSlide, PptxThemeColorScheme, PptxThemeFontScheme, PptxThemePreset } from "pptx-viewer-core";
3
+ import { CollaborationConfig, CollaborationLivePatcher, PresentationSnapshot, clearAudienceContent, loadAudienceContent, storeAudienceContent } from "pptx-viewer-shared";
4
+ import { RefObject } from "react";
5
+ import * as Y from "yjs";
6
+ import { Doc, Doc as YDoc } from "yjs";
7
+ //#region src/viewer/hooks/useThemeSwitching.d.ts
8
+ interface UseThemeSwitchingInput {
9
+ /** Ref to the PptxHandler instance. */
10
+ handlerRef: RefObject<PptxHandler | null>;
11
+ /** Current parsed presentation data (null when nothing is loaded). */
12
+ data: PptxData | null;
13
+ /** Callback to update the presentation data after theme switch. */
14
+ onDataChange: (newData: PptxData) => void;
15
+ /** Optional callback fired when theme switch completes successfully. */
16
+ onThemeChanged?: (preset: PptxThemePreset) => void;
17
+ }
18
+ interface ThemeSwitchingResult {
19
+ /** All available built-in theme presets. */
20
+ presets: readonly PptxThemePreset[];
21
+ /**
22
+ * Apply a theme preset to the current presentation.
23
+ * Updates both the in-memory ZIP and all resolved element colours.
24
+ */
25
+ switchToPreset: (preset: PptxThemePreset) => Promise<void>;
26
+ /**
27
+ * Apply a custom colour scheme (and optional font scheme) to the
28
+ * current presentation.
29
+ */
30
+ switchToCustom: (colorScheme: PptxThemeColorScheme, fontScheme?: PptxThemeFontScheme, themeName?: string) => Promise<void>;
31
+ /**
32
+ * Get the preset matching the current presentation theme (if any).
33
+ * Returns undefined if the current theme does not match a built-in preset.
34
+ */
35
+ currentPreset: PptxThemePreset | undefined;
36
+ }
37
+ /**
38
+ * React hook providing theme switching capabilities for the PowerPoint viewer.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * const { presets, switchToPreset, currentPreset } = useThemeSwitching({
43
+ * handlerRef,
44
+ * data,
45
+ * onDataChange: setData,
46
+ * });
47
+ *
48
+ * return (
49
+ * <div>
50
+ * {presets.map(preset => (
51
+ * <button
52
+ * key={preset.id}
53
+ * onClick={() => switchToPreset(preset)}
54
+ * aria-pressed={preset.id === currentPreset?.id}
55
+ * >
56
+ * {preset.name}
57
+ * </button>
58
+ * ))}
59
+ * </div>
60
+ * );
61
+ * ```
62
+ */
63
+ declare function useThemeSwitching(input: UseThemeSwitchingInput): ThemeSwitchingResult;
64
+ //#endregion
65
+ //#region ../../node_modules/.bun/lib0@0.2.117/node_modules/lib0/observable.d.ts
66
+ /**
67
+ * Handles named events.
68
+ *
69
+ * @deprecated
70
+ * @template N
71
+ */
72
+ declare class Observable<N> {
73
+ /**
74
+ * Some desc.
75
+ * @type {Map<N, any>}
76
+ */
77
+ _observers: Map<N, any>;
78
+ /**
79
+ * @param {N} name
80
+ * @param {function} f
81
+ */
82
+ on(name: N, f: Function): void;
83
+ /**
84
+ * @param {N} name
85
+ * @param {function} f
86
+ */
87
+ once(name: N, f: Function): void;
88
+ /**
89
+ * @param {N} name
90
+ * @param {function} f
91
+ */
92
+ off(name: N, f: Function): void;
93
+ /**
94
+ * Emit a named event. All registered event listeners that listen to the
95
+ * specified name will receive the event.
96
+ *
97
+ * @todo This should catch exceptions
98
+ *
99
+ * @param {N} name The event name.
100
+ * @param {Array<any>} args The arguments that are applied to the event listener.
101
+ */
102
+ emit(name: N, args: Array<any>): void;
103
+ destroy(): void;
104
+ }
105
+ //#endregion
106
+ //#region ../../node_modules/.bun/y-protocols@1.0.7+253afa400b9c0a30/node_modules/y-protocols/awareness.d.ts
107
+ /**
108
+ * @typedef {Object} MetaClientState
109
+ * @property {number} MetaClientState.clock
110
+ * @property {number} MetaClientState.lastUpdated unix timestamp
111
+ */
112
+ /**
113
+ * The Awareness class implements a simple shared state protocol that can be used for non-persistent data like awareness information
114
+ * (cursor, username, status, ..). Each client can update its own local state and listen to state changes of
115
+ * remote clients. Every client may set a state of a remote peer to `null` to mark the client as offline.
116
+ *
117
+ * Each client is identified by a unique client id (something we borrow from `doc.clientID`). A client can override
118
+ * its own state by propagating a message with an increasing timestamp (`clock`). If such a message is received, it is
119
+ * applied if the known state of that client is older than the new state (`clock < newClock`). If a client thinks that
120
+ * a remote client is offline, it may propagate a message with
121
+ * `{ clock: currentClientClock, state: null, client: remoteClient }`. If such a
122
+ * message is received, and the known clock of that client equals the received clock, it will override the state with `null`.
123
+ *
124
+ * Before a client disconnects, it should propagate a `null` state with an updated clock.
125
+ *
126
+ * Awareness states must be updated every 30 seconds. Otherwise the Awareness instance will delete the client state.
127
+ *
128
+ * @extends {Observable<string>}
129
+ */
130
+ declare class Awareness extends Observable<string> {
131
+ /**
132
+ * @param {Y.Doc} doc
133
+ */
134
+ constructor(doc: Y.Doc);
135
+ doc: Y.Doc;
136
+ /**
137
+ * @type {number}
138
+ */
139
+ clientID: number;
140
+ /**
141
+ * Maps from client id to client state
142
+ * @type {Map<number, Object<string, any>>}
143
+ */
144
+ states: Map<number, {
145
+ [x: string]: any;
146
+ }>;
147
+ /**
148
+ * @type {Map<number, MetaClientState>}
149
+ */
150
+ meta: Map<number, MetaClientState>;
151
+ _checkInterval: any;
152
+ /**
153
+ * @return {Object<string,any>|null}
154
+ */
155
+ getLocalState(): {
156
+ [x: string]: any;
157
+ } | null;
158
+ /**
159
+ * @param {Object<string,any>|null} state
160
+ */
161
+ setLocalState(state: {
162
+ [x: string]: any;
163
+ } | null): void;
164
+ /**
165
+ * @param {string} field
166
+ * @param {any} value
167
+ */
168
+ setLocalStateField(field: string, value: any): void;
169
+ /**
170
+ * @return {Map<number,Object<string,any>>}
171
+ */
172
+ getStates(): Map<number, {
173
+ [x: string]: any;
174
+ }>;
175
+ }
176
+ type MetaClientState = {
177
+ clock: number;
178
+ /**
179
+ * unix timestamp
180
+ */
181
+ lastUpdated: number;
182
+ };
183
+ //#endregion
184
+ //#region src/viewer/hooks/collaboration/useYjsProvider.d.ts
185
+ interface UseYjsProviderInput {
186
+ /**
187
+ * Collaboration config, or `undefined` when collaboration is inactive. The
188
+ * hook is always called (React hook rules) but stays fully dormant, never
189
+ * opening a transport, while config is absent.
190
+ */
191
+ config?: CollaborationConfig$1;
192
+ }
193
+ interface UseYjsProviderResult {
194
+ /** Current WebSocket connection status. */
195
+ status: ConnectionStatus;
196
+ /** The Yjs awareness instance (null until connected). */
197
+ awareness: Awareness | null;
198
+ /** The Yjs document (null until initialised). */
199
+ doc: YDoc | null;
200
+ /** Local awareness client ID. */
201
+ clientId: number | null;
202
+ /**
203
+ * Whether the provider completed its initial document sync. Local doc
204
+ * writes should be gated on this so a late joiner never seeds its
205
+ * bootstrap deck into a room whose content has not arrived yet. Websocket
206
+ * flips it on the provider's 'synced' event; webrtc flips it on peer sync
207
+ * or after {@link INITIAL_SYNC_GRACE_MS} (a lone fresh-room peer never
208
+ * receives a sync event).
209
+ */
210
+ synced: boolean;
211
+ /** Manually retry the connection after a timeout or error. */
212
+ retry: () => void;
213
+ }
214
+ /**
215
+ * Lazily loads `yjs` and `y-websocket`, creates a Y.Doc and
216
+ * WebSocketProvider, and tracks the connection lifecycle.
217
+ *
218
+ * If the connection does not succeed within {@link CONNECTION_TIMEOUT_MS},
219
+ * the provider is torn down and status moves to `'error'`. The consumer
220
+ * can call `retry()` to attempt a fresh connection.
221
+ *
222
+ * The Yjs packages are dynamically imported so they are fully
223
+ * tree-shaken when collaboration is not enabled.
224
+ */
225
+ declare function useYjsProvider({ config }: UseYjsProviderInput): UseYjsProviderResult;
226
+ //#endregion
227
+ //#region src/viewer/hooks/collaboration/usePresenceTracking.d.ts
228
+ interface UsePresenceTrackingInput {
229
+ awareness: Awareness | null;
230
+ localClientId: number | null;
231
+ userName: string;
232
+ userColor: string;
233
+ userAvatar?: string;
234
+ /** Role in the session (broadcaster, viewer, or collaborator). */
235
+ role?: string;
236
+ canvasWidth: number;
237
+ canvasHeight: number;
238
+ }
239
+ interface UsePresenceTrackingResult {
240
+ /** Presence data for all remote users (excludes local). */
241
+ remoteUsers: UserPresence[];
242
+ /** Broadcast a partial presence update for the local user. */
243
+ broadcastPresence: (update: Partial<Omit<UserPresence, 'clientId'>>) => void;
244
+ }
245
+ declare function usePresenceTracking({ awareness, localClientId, userName, userColor, userAvatar, role, canvasWidth, canvasHeight }: UsePresenceTrackingInput): UsePresenceTrackingResult;
246
+ //#endregion
247
+ //#region src/viewer/hooks/collaboration/useCollaborativeState.d.ts
248
+ interface UseCollaborativeStateInput {
249
+ /**
250
+ * Collaboration config, or `undefined` when collaboration is inactive. The
251
+ * hook is always called so the surrounding provider keeps a stable React
252
+ * tree shape; it produces a dormant value (no transport, empty presence)
253
+ * while config is absent.
254
+ */
255
+ config?: CollaborationConfig$1;
256
+ canvasWidth: number;
257
+ canvasHeight: number;
258
+ }
259
+ declare function useCollaborativeState({ config, canvasWidth, canvasHeight }: UseCollaborativeStateInput): CollaborationContextValue | null;
260
+ //#endregion
261
+ //#region src/viewer/hooks/collaboration/useCollaborativeHistory.d.ts
262
+ interface UseCollaborativeHistoryInput {
263
+ /** The local user's client ID (from Yjs awareness). */
264
+ localClientId: number | null;
265
+ /** Standard history undo function. */
266
+ handleUndo: () => void;
267
+ /** Standard history redo function. */
268
+ handleRedo: () => void;
269
+ /** Whether undo is available. */
270
+ canUndo: boolean;
271
+ /** Whether redo is available. */
272
+ canRedo: boolean;
273
+ }
274
+ interface UseCollaborativeHistoryResult {
275
+ /** Undo the last local change. */
276
+ handleUndo: () => void;
277
+ /** Redo the last undone local change. */
278
+ handleRedo: () => void;
279
+ /** Whether undo is available. */
280
+ canUndo: boolean;
281
+ /** Whether redo is available. */
282
+ canRedo: boolean;
283
+ }
284
+ declare function useCollaborativeHistory({ localClientId: _localClientId, handleUndo, handleRedo, canUndo, canRedo }: UseCollaborativeHistoryInput): UseCollaborativeHistoryResult;
285
+ //#endregion
286
+ //#region src/viewer/hooks/collaboration/useYjsDocumentSync.d.ts
287
+ interface UseYjsDocumentSyncInput {
288
+ /** The Yjs document (from useYjsProvider). null when not collaborating. */
289
+ doc: Doc | null;
290
+ /** Current slides state. */
291
+ slides: PptxSlide[];
292
+ /** Separated master/layout (template) elements, merged back on write-back. */
293
+ templateElementsBySlideId: Record<string, PptxElement[]>;
294
+ /** React state setter for slides. */
295
+ setSlides: React.Dispatch<React.SetStateAction<PptxSlide[]>>;
296
+ /** Whether collaboration is active (status === 'connected'). */
297
+ isConnected: boolean;
298
+ /**
299
+ * Whether the provider completed its initial document sync. Local -> doc
300
+ * writes are gated on this so a late joiner never seeds its bootstrap deck
301
+ * into a room whose real content has not arrived yet. Defaults to true for
302
+ * callers that manage sync readiness themselves.
303
+ */
304
+ isSynced?: boolean;
305
+ /** Collaboration config (for role and write-back). */
306
+ config?: Pick<CollaborationConfig, 'role' | 'onWriteBack' | 'writeBackDebounceMs'>;
307
+ /**
308
+ * Return the source PPTX bytes for write-back serialization. Only called
309
+ * when role === 'owner' and onWriteBack is set.
310
+ */
311
+ getSourceBytes?: () => Uint8Array | null;
312
+ /**
313
+ * Monotonic counter bumped each time the content-load pipeline finishes
314
+ * applying a parsed deck to viewer state. A local load that lands while the
315
+ * shared doc already holds slides (a late joiner's bootstrap deck parsing
316
+ * after the room state arrived) would silently clobber the synced slides;
317
+ * each bump re-adopts the doc's slides when the room has content.
318
+ */
319
+ loadVersion?: number;
320
+ }
321
+ declare function useYjsDocumentSync({ doc, slides, templateElementsBySlideId, setSlides, isConnected, isSynced, config, getSourceBytes, loadVersion }: UseYjsDocumentSyncInput): void;
322
+ //#endregion
323
+ //#region src/viewer/hooks/collaboration/useBroadcastFollower.d.ts
324
+ interface UseBroadcastFollowerInput {
325
+ /** The collaboration context (null when collaboration is disabled). */
326
+ collab: CollaborationContextValue | null;
327
+ /** Current local active slide index. */
328
+ activeSlideIndex: number;
329
+ /** Setter for the active slide index. */
330
+ setActiveSlideIndex: (index: number) => void;
331
+ /** Total number of slides (for bounds checking). */
332
+ slideCount: number;
333
+ /**
334
+ * When true, auto-follow stands down (e.g. the local user is manually
335
+ * following a specific peer via the follow bar). Defaults to false.
336
+ */
337
+ paused?: boolean;
338
+ }
339
+ declare function useBroadcastFollower({ collab, activeSlideIndex, setActiveSlideIndex, slideCount, paused }: UseBroadcastFollowerInput): void;
340
+ //#endregion
341
+ //#region src/viewer/hooks/collaboration/useFollowMode.d.ts
342
+ interface UseFollowModeInput {
343
+ /** The collaboration context (null when collaboration is disabled). */
344
+ collab: CollaborationContextValue | null;
345
+ /** Current local active slide index. */
346
+ activeSlideIndex: number;
347
+ /** Setter for the active slide index. */
348
+ setActiveSlideIndex: (index: number) => void;
349
+ /** Total number of slides (for bounds checking). */
350
+ slideCount: number;
351
+ }
352
+ interface UseFollowModeResult {
353
+ /** The clientId currently being followed, or null. */
354
+ followedClientId: number | null;
355
+ /** Follow the given peer, or `null` to stop following. */
356
+ followUser: (clientId: number | null) => void;
357
+ }
358
+ declare function useFollowMode({ collab, activeSlideIndex, setActiveSlideIndex, slideCount }: UseFollowModeInput): UseFollowModeResult;
359
+ //#endregion
360
+ //#region src/viewer/hooks/presentation-mode/usePresenterWindow.d.ts
361
+ /**
362
+ * Parse the session nonce from the current page URL hash. Returns null if the
363
+ * hash is not in the expected `#pptx-audience&nonce=<uuid>` form.
364
+ */
365
+ declare function parseAudienceNonce(): string | null;
366
+ /** Returns true if the current page was opened as an audience tab. */
367
+ declare function isAudienceTab(): boolean;
368
+ interface UsePresenterWindowInput {
369
+ currentSlideIndex: number;
370
+ isPresenterMode: boolean;
371
+ /** Raw PPTX bytes to share with the audience tab via IndexedDB. */
372
+ content?: ArrayBuffer | Uint8Array | null;
373
+ snapshot: PresentationSnapshot;
374
+ }
375
+ interface UsePresenterWindowResult {
376
+ openAudienceWindow: () => boolean;
377
+ closeAudienceWindow: () => void;
378
+ isAudienceWindowOpen: () => boolean;
379
+ syncSlideToAudience: (slideIndex: number) => void;
380
+ syncStateToAudience: (snapshot: PresentationSnapshot) => void;
381
+ swapDisplays: () => Promise<boolean>;
382
+ }
383
+ declare function usePresenterWindow(input: UsePresenterWindowInput): UsePresenterWindowResult;
384
+ //#endregion
385
+ export { usePresenceTracking as C, ThemeSwitchingResult as D, useYjsProvider as E, UseThemeSwitchingInput as O, UsePresenceTrackingResult as S, UseYjsProviderResult as T, UseCollaborativeHistoryResult as _, UsePresenterWindowResult as a, useCollaborativeState as b, usePresenterWindow as c, useFollowMode as d, UseBroadcastFollowerInput as f, UseCollaborativeHistoryInput as g, useYjsDocumentSync as h, UsePresenterWindowInput as i, useThemeSwitching as k, UseFollowModeInput as l, UseYjsDocumentSyncInput as m, loadAudienceContent as n, isAudienceTab as o, useBroadcastFollower as p, storeAudienceContent as r, parseAudienceNonce as s, clearAudienceContent as t, UseFollowModeResult as u, useCollaborativeHistory as v, UseYjsProviderInput as w, UsePresenceTrackingInput as x, UseCollaborativeStateInput as y };
386
+ //# sourceMappingURL=audience-content-store-BMlth_3U.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audience-content-store-BMlth_3U.d.ts","names":[],"sources":["../src/viewer/hooks/useThemeSwitching.ts","../../../node_modules/.bun/lib0@0.2.117/node_modules/lib0/observable.d.ts","../../../node_modules/.bun/y-protocols@1.0.7+253afa400b9c0a30/node_modules/y-protocols/awareness.d.ts","../src/viewer/hooks/collaboration/useYjsProvider.ts","../src/viewer/hooks/collaboration/usePresenceTracking.ts","../src/viewer/hooks/collaboration/useCollaborativeState.ts","../src/viewer/hooks/collaboration/useCollaborativeHistory.ts","../src/viewer/hooks/collaboration/useYjsDocumentSync.ts","../src/viewer/hooks/collaboration/useBroadcastFollower.ts","../src/viewer/hooks/collaboration/useFollowMode.ts","../src/viewer/hooks/presentation-mode/usePresenterWindow.ts"],"x_google_ignoreList":[1,2],"mappings":";;;;;;;UAqBiB;;EAEhB,YAAY,UAAU;;EAEtB,MAAM;;EAEN,eAAe,SAAS;;EAExB,kBAAkB,QAAQ;;UAGV;;EAEhB,kBAAkB;;;;;EAMlB,iBAAiB,QAAQ,oBAAoB;;;;;EAM7C,iBACC,aAAa,sBACb,aAAa,qBACb,uBACI;;;;;EAML,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCA,kBAAkB,OAAO,yBAAyB;;;;;;;;;cCrCrD,WAAW;;;;;EAKpB,YAAY,IAAI;;;;;EAKhB,GAAG,MAAM,GAAG,GAAG;;;;;EAKf,KAAK,MAAM,GAAG,GAAG;;;;;EAKjB,IAAI,MAAM,GAAG,GAAG;;;;;;;;;;EAUhB,KAAK,MAAM,GAAG,MAAM;EACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;cC3DS,kBAAkB;;;;EAI3B,YAAY,KAAK,EAAE;EACnB,KAAK,EAAE;;;;EAIP;;;;;EAKA,QAAQ;KACH;;;;;EAKL,MAAM,YAAY;EAClB;;;;EAIA;KACK;;;;;EAKL,cAAc;KACT;;;;;;EAML,mBAAmB,eAAe;;;;EAIlC,aAAa;KACR;;;KASG;EACR;;;;EAIA;;;;UC9Ba;;;;;;EAMhB,SAAS;;UAGO;;EAEhB,QAAQ;;EAER,WAAW;;EAEX,KAAK;;EAEL;;;;;;;;;EASA;;EAEA;;;;;;;;;;;;;iBAkBe,iBAAiB,UAAU,sBAAsB;;;UChFhD;EAChB,WAAW;EACX;EACA;EACA;EACA;;EAEA;EACA;EACA;;UAGgB;;EAEhB,aAAa;;EAEb,oBAAoB,QAAQ,QAAQ,KAAK;;iBAO1B,sBACf,WACA,eACA,UACA,WACA,YACA,MACA,aACA,gBACE,2BAA2B;;;UC3Bb;;;;;;;EAOhB,SAAS;EACT;EACA;;iBAOe,wBACf,QACA,aACA,gBACE,6BAA6B;;;UCvBf;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA;;UAGgB;;EAEhB;;EAEA;;EAEA;;EAEA;;iBAOe,0BACf,eAAe,gBACf,YACA,YACA,SACA,WACE,+BAA+B;;;UC1BjB;;EAEhB,KAAK;;EAEL,QAAQ;;EAER,2BAA2B,eAAe;;EAE1C,WAAW,MAAM,SAAS,MAAM,eAAe;;EAE/C;;;;;;;EAOA;;EAEA,SAAS,KAAK;;;;;EAKd,uBAAuB;;;;;;;;EAQvB;;iBAGe,qBACf,KACA,QACA,2BACA,WACA,aACA,UACA,QACA,gBACA,eACE;;;UCtDc;;EAEhB,QAAQ;;EAER;;EAEA,sBAAsB;;EAEtB;;;;;EAKA;;iBAOe,uBACf,QACA,kBACA,qBACA,YACA,UACE;;;UCzBc;;EAEhB,QAAQ;;EAER;;EAEA,sBAAsB;;EAEtB;;UAGgB;;EAEhB;;EAEA,aAAa;;iBAOE,gBACf,QACA,kBACA,qBACA,cACE,qBAAqB;;;;;;;iBCgBR;;iBAkDA;UAQC;EAChB;EACA;;EAEA,UAAU,cAAc;EACxB,UAAU;;UAGM;EAChB;EACA;EACA;EACA,sBAAsB;EACtB,sBAAsB,UAAU;EAChC,oBAAoB;;iBAOL,mBAAmB,OAAO,0BAA0B"}
@@ -377,6 +377,7 @@ var translationsEn = {
377
377
  "pptx.presentation.highlighter": "Highlighter",
378
378
  "pptx.presentation.eraser": "Eraser",
379
379
  "pptx.presentation.laserPointer": "Laser Pointer",
380
+ "pptx.presentation.endOfSlideShow": "End of slide show, click to exit.",
380
381
  "pptx.presentation.pointerTools": "Pointer Options",
381
382
  // Selection pane
382
383
  "pptx.selectionPane.title": "Selection Pane",
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkR2H3FHK6_js = require('./chunk-R2H3FHK6.js');
3
+ var chunkWK56SFN7_js = require('./chunk-WK56SFN7.js');
4
4
  var chunk4VNS5WPM_js = require('./chunk-4VNS5WPM.js');
5
5
  var mcp = require('pptx-viewer-mcp');
6
6
  var mcpSchemas = require('pptx-viewer-mcp/schemas');
@@ -14879,7 +14879,7 @@ async function buildSlideMarkdown(slides, slideIndex2, meta3, options = {}) {
14879
14879
  };
14880
14880
  let markdown;
14881
14881
  try {
14882
- const converter = new chunkR2H3FHK6_js.PptxMarkdownConverter(
14882
+ const converter = new chunkWK56SFN7_js.PptxMarkdownConverter(
14883
14883
  "",
14884
14884
  {
14885
14885
  sourceName: meta3.title ?? "deck.pptx",
@@ -15470,7 +15470,7 @@ var getTheme = (ctx) => {
15470
15470
  name: theme?.name,
15471
15471
  colorScheme: theme?.colorScheme,
15472
15472
  fontScheme: theme?.fontScheme,
15473
- availablePresets: Object.keys(chunkR2H3FHK6_js.ThemePresets)
15473
+ availablePresets: Object.keys(chunkWK56SFN7_js.ThemePresets)
15474
15474
  };
15475
15475
  };
15476
15476
  var readExecutors = {
Binary file
Binary file