pptx-react-viewer 1.1.73 → 1.1.74
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 +6 -0
- package/dist/{PowerPointViewer-DSaLy8x5.d.mts → PowerPointViewer-DNlwKuTs.d.mts} +42 -55
- package/dist/{PowerPointViewer-DSaLy8x5.d.ts → PowerPointViewer-DNlwKuTs.d.ts} +42 -55
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +314 -301
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +314 -301
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.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.mts +64 -7
- package/dist/viewer/index.d.ts +64 -7
- package/dist/viewer/index.js +314 -301
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +314 -301
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -1
package/dist/viewer/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { A as AccessibilityIssue,
|
|
1
|
+
import { C as CollaborationRole, c as CollaborationConfig } from '../PowerPointViewer-DNlwKuTs.js';
|
|
2
|
+
export { A as AccessibilityIssue, d as AnimationPresetOption, e as CanvasSize, f as ConnectorArrowOption, h as ConnectorGeometryOption, i as ConnectorGeometryType, j as ConnectorPathGeometry, D as DragState, k as DrawingTool, E as EditorHistorySnapshot, l as ElementBounds, m as ElementClipboardPayload, n as ElementContextMenuAction, o as ElementContextMenuState, F as FileViewerHandle, M as MarqueeSelectionState, p as ParsedTableCell, q as ParsedTableData, P as PowerPointViewer, a as PowerPointViewerHandle, b as PowerPointViewerProps, r as PresentationAnimationRuntime, R as ResizeHandle, s as ResizeState, S as ShapeAdjustmentDragState, t as ShapeAdjustmentHandleDescriptor, u as ShapePreset, v as ShapeQuickStyle, w as ShortcutReferenceItem, x as SlideAlignment, y as SlideSectionGroup, z as SlideTransitionOption, B as StrokeDashOption, G as SupportedShapeType, T as TableCellEditorState, H as ToolbarSection, V as ViewerMode, g as getAnimationInitialStyle } from '../PowerPointViewer-DNlwKuTs.js';
|
|
3
3
|
import { d, e, n, o, m, l, P, X, p, q, r, s, t, u, v, w, x, y, z, A, B, D, E, F, G, H, J, K, L, h, i, k, j, f, g } from './presentation-BRAUjTRt.js';
|
|
4
4
|
import React__default, { RefObject } from 'react';
|
|
5
|
-
import { Awareness } from 'y-protocols/awareness';
|
|
6
5
|
import { Doc } from 'yjs';
|
|
6
|
+
import { Awareness } from 'y-protocols/awareness';
|
|
7
7
|
import './theme/index.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1357,6 +1357,60 @@ declare class PptxHandler extends PptxHandlerCore {
|
|
|
1357
1357
|
static create(options?: PresentationOptions): Promise<PresentationBuilderResult>;
|
|
1358
1358
|
}
|
|
1359
1359
|
|
|
1360
|
+
/**
|
|
1361
|
+
* Collaboration types: Shared type definitions for the real-time
|
|
1362
|
+
* collaboration infrastructure (Yjs-backed CRDT sync, presence tracking,
|
|
1363
|
+
* collaborative editing).
|
|
1364
|
+
*
|
|
1365
|
+
* @module collaboration/types
|
|
1366
|
+
*/
|
|
1367
|
+
|
|
1368
|
+
/** Connection lifecycle states for the Yjs WebSocket provider. */
|
|
1369
|
+
type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
1370
|
+
/**
|
|
1371
|
+
* Presence data broadcast to other participants.
|
|
1372
|
+
* Cursor position is relative to the slide canvas (0..canvasWidth, 0..canvasHeight).
|
|
1373
|
+
*/
|
|
1374
|
+
interface UserPresence {
|
|
1375
|
+
/** Unique client ID (assigned by Yjs awareness). */
|
|
1376
|
+
clientId: number;
|
|
1377
|
+
/** Sanitised display name. */
|
|
1378
|
+
userName: string;
|
|
1379
|
+
/** Optional avatar URL (validated). */
|
|
1380
|
+
userAvatar?: string;
|
|
1381
|
+
/** Hex colour for the user's cursor ring. */
|
|
1382
|
+
userColor: string;
|
|
1383
|
+
/** Slide index the user is currently viewing. */
|
|
1384
|
+
activeSlideIndex: number;
|
|
1385
|
+
/** Cursor X on the canvas (clamped to slide bounds). */
|
|
1386
|
+
cursorX: number;
|
|
1387
|
+
/** Cursor Y on the canvas (clamped to slide bounds). */
|
|
1388
|
+
cursorY: number;
|
|
1389
|
+
/** ISO timestamp of last update (for stale-presence cleanup). */
|
|
1390
|
+
lastUpdated: string;
|
|
1391
|
+
/** Optional currently selected element ID. */
|
|
1392
|
+
selectedElementId?: string;
|
|
1393
|
+
/** Role in the session (owner, viewer, or collaborator). */
|
|
1394
|
+
role?: CollaborationRole;
|
|
1395
|
+
}
|
|
1396
|
+
/** Value exposed by `CollaborationContext`. */
|
|
1397
|
+
interface CollaborationContextValue {
|
|
1398
|
+
/** Current WebSocket connection status. */
|
|
1399
|
+
status: ConnectionStatus;
|
|
1400
|
+
/** Presence data for all remote users (excludes the local user). */
|
|
1401
|
+
remoteUsers: UserPresence[];
|
|
1402
|
+
/** Broadcast the local user's presence state. */
|
|
1403
|
+
broadcastPresence: (update: Partial<Omit<UserPresence, 'clientId'>>) => void;
|
|
1404
|
+
/** Total number of connected users (including local). */
|
|
1405
|
+
connectedCount: number;
|
|
1406
|
+
/** The collaboration config that was provided. */
|
|
1407
|
+
config: CollaborationConfig;
|
|
1408
|
+
/** The Yjs document (for document sync). */
|
|
1409
|
+
doc: Doc | null;
|
|
1410
|
+
/** Manually retry the WebSocket connection after a timeout or error. */
|
|
1411
|
+
retry: () => void;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1360
1414
|
/** Returns true if the current page was opened as an audience tab. */
|
|
1361
1415
|
declare function isAudienceTab(): boolean;
|
|
1362
1416
|
|
|
@@ -1440,10 +1494,13 @@ interface ThemeSwitchingResult {
|
|
|
1440
1494
|
declare function useThemeSwitching(input: UseThemeSwitchingInput): ThemeSwitchingResult;
|
|
1441
1495
|
|
|
1442
1496
|
/**
|
|
1443
|
-
* useYjsProvider: Manages the Yjs document and
|
|
1497
|
+
* useYjsProvider: Manages the Yjs document and provider lifecycle.
|
|
1444
1498
|
*
|
|
1445
|
-
* Creates a Y.Doc and connects via
|
|
1446
|
-
*
|
|
1499
|
+
* Creates a Y.Doc and connects via one of two transports:
|
|
1500
|
+
* - `websocket` (default): WebSocketProvider against `config.serverUrl`.
|
|
1501
|
+
* - `webrtc`: peer-to-peer WebrtcProvider (no document server); usable from
|
|
1502
|
+
* static hosting. Same-browser tabs sync over BroadcastChannel.
|
|
1503
|
+
* Exposes connection status and cleanup on unmount.
|
|
1447
1504
|
*
|
|
1448
1505
|
* This hook is intentionally thin: it only manages the transport layer.
|
|
1449
1506
|
* Application-level collaboration logic lives in useCollaborativeState
|
|
@@ -1632,4 +1689,4 @@ interface CollaborationStatusIndicatorProps {
|
|
|
1632
1689
|
}
|
|
1633
1690
|
declare function CollaborationStatusIndicator({ status, connectedCount, onRetry, }: CollaborationStatusIndicatorProps): React__default.ReactElement;
|
|
1634
1691
|
|
|
1635
|
-
export { CollaborationConfig, CollaborationContextValue, CollaborationProvider, CollaborationStatusIndicator, type CollaborationStatusIndicatorProps, ConnectionStatus, RemoteUserCursors, type RemoteUserCursorsProps, type ThemeSwitchingResult, type UseCollaborativeHistoryResult, type UseCollaborativeStateInput, type UsePresenceTrackingResult, type UseThemeSwitchingInput, UserAvatarBar, type UserAvatarBarProps, UserPresence, clearAudienceContent, isAudienceTab, loadAudienceContent, storeAudienceContent, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider };
|
|
1692
|
+
export { CollaborationConfig, type CollaborationContextValue, CollaborationProvider, CollaborationRole, CollaborationStatusIndicator, type CollaborationStatusIndicatorProps, type ConnectionStatus, RemoteUserCursors, type RemoteUserCursorsProps, type ThemeSwitchingResult, type UseCollaborativeHistoryResult, type UseCollaborativeStateInput, type UsePresenceTrackingResult, type UseThemeSwitchingInput, UserAvatarBar, type UserAvatarBarProps, type UserPresence, clearAudienceContent, isAudienceTab, loadAudienceContent, storeAudienceContent, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider };
|