pptx-react-viewer 1.0.11 → 1.1.1

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.
@@ -264,6 +264,8 @@ interface ViewerTheme {
264
264
  * `CollaborationProvider` and wires up presence tracking, remote cursors,
265
265
  * and CRDT-based state synchronisation.
266
266
  */
267
+ /** Role of a user within a collaboration or broadcast session. */
268
+ type CollaborationRole = 'collaborator' | 'broadcaster' | 'viewer';
267
269
  interface CollaborationConfig {
268
270
  /** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */
269
271
  roomId: string;
@@ -277,6 +279,8 @@ interface CollaborationConfig {
277
279
  userColor?: string;
278
280
  /** Optional authentication token sent with the WebSocket handshake. */
279
281
  authToken?: string;
282
+ /** Role in the session — defaults to `'collaborator'`. */
283
+ role?: CollaborationRole;
280
284
  }
281
285
  /** Connection lifecycle states for the Yjs WebSocket provider. */
282
286
  type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
@@ -303,6 +307,8 @@ interface UserPresence {
303
307
  lastUpdated: string;
304
308
  /** Optional currently selected element ID. */
305
309
  selectedElementId?: string;
310
+ /** Role in the session (broadcaster, viewer, or collaborator). */
311
+ role?: CollaborationRole;
306
312
  }
307
313
  /** Value exposed by `CollaborationContext`. */
308
314
  interface CollaborationContextValue {
@@ -461,6 +467,11 @@ interface PowerPointViewerProps {
461
467
  canEdit?: boolean;
462
468
  /** Optional class name */
463
469
  className?: string;
470
+ /**
471
+ * Display name used as the author for comments and annotations.
472
+ * Falls back to `collaboration.userName` when collaborating, or `'You'`.
473
+ */
474
+ authorName?: string;
464
475
  /**
465
476
  * Theme configuration for customising the viewer's appearance.
466
477
  *
@@ -553,4 +564,4 @@ declare function getAnimationInitialStyle(preset: PptxAnimationPreset | undefine
553
564
  */
554
565
  declare const PowerPointViewer: React.ForwardRefExoticComponent<PowerPointViewerProps & React.RefAttributes<PowerPointViewerHandle>>;
555
566
 
556
- export { type AccessibilityIssue as A, type SlideSectionGroup as B, type CollaborationConfig as C, type DragState as D, type EditorHistorySnapshot as E, type FileViewerHandle as F, type SlideTransitionOption as G, type StrokeDashOption as H, type SupportedShapeType as I, type ToolbarSection as J, type ViewerMode as K, type MarqueeSelectionState as M, PowerPointViewer as P, type ResizeHandle as R, type ShapeAdjustmentDragState as S, type TableCellEditorState as T, type UserPresence as U, type ViewerThemeColors as V, type ViewerTheme as a, type PowerPointViewerHandle as b, type PowerPointViewerProps as c, type ConnectionStatus as d, type CollaborationContextValue as e, type AnimationPresetOption as f, getAnimationInitialStyle as g, type CanvasSize as h, type ConnectorArrowOption as i, type ConnectorGeometryOption as j, type ConnectorGeometryType as k, type ConnectorPathGeometry as l, type DrawingTool as m, type ElementBounds as n, type ElementClipboardPayload as o, type ElementContextMenuAction as p, type ElementContextMenuState as q, type ParsedTableCell as r, type ParsedTableData as s, type PresentationAnimationRuntime as t, type ResizeState as u, type ShapeAdjustmentHandleDescriptor as v, type ShapePreset as w, type ShapeQuickStyle as x, type ShortcutReferenceItem as y, type SlideAlignment as z };
567
+ export { type AccessibilityIssue as A, type SlideAlignment as B, type CollaborationConfig as C, type DragState as D, type EditorHistorySnapshot as E, type FileViewerHandle as F, type SlideSectionGroup as G, type SlideTransitionOption as H, type StrokeDashOption as I, type SupportedShapeType as J, type ToolbarSection as K, type ViewerMode as L, type MarqueeSelectionState as M, PowerPointViewer as P, type ResizeHandle as R, type ShapeAdjustmentDragState as S, type TableCellEditorState as T, type UserPresence as U, type ViewerThemeColors as V, type ViewerTheme as a, type PowerPointViewerHandle as b, type PowerPointViewerProps as c, type ConnectionStatus as d, type CollaborationContextValue as e, type AnimationPresetOption as f, getAnimationInitialStyle as g, type CanvasSize as h, type CollaborationRole as i, type ConnectorArrowOption as j, type ConnectorGeometryOption as k, type ConnectorGeometryType as l, type ConnectorPathGeometry as m, type DrawingTool as n, type ElementBounds as o, type ElementClipboardPayload as p, type ElementContextMenuAction as q, type ElementContextMenuState as r, type ParsedTableCell as s, type ParsedTableData as t, type PresentationAnimationRuntime as u, type ResizeState as v, type ShapeAdjustmentHandleDescriptor as w, type ShapePreset as x, type ShapeQuickStyle as y, type ShortcutReferenceItem as z };
@@ -264,6 +264,8 @@ interface ViewerTheme {
264
264
  * `CollaborationProvider` and wires up presence tracking, remote cursors,
265
265
  * and CRDT-based state synchronisation.
266
266
  */
267
+ /** Role of a user within a collaboration or broadcast session. */
268
+ type CollaborationRole = 'collaborator' | 'broadcaster' | 'viewer';
267
269
  interface CollaborationConfig {
268
270
  /** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */
269
271
  roomId: string;
@@ -277,6 +279,8 @@ interface CollaborationConfig {
277
279
  userColor?: string;
278
280
  /** Optional authentication token sent with the WebSocket handshake. */
279
281
  authToken?: string;
282
+ /** Role in the session — defaults to `'collaborator'`. */
283
+ role?: CollaborationRole;
280
284
  }
281
285
  /** Connection lifecycle states for the Yjs WebSocket provider. */
282
286
  type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
@@ -303,6 +307,8 @@ interface UserPresence {
303
307
  lastUpdated: string;
304
308
  /** Optional currently selected element ID. */
305
309
  selectedElementId?: string;
310
+ /** Role in the session (broadcaster, viewer, or collaborator). */
311
+ role?: CollaborationRole;
306
312
  }
307
313
  /** Value exposed by `CollaborationContext`. */
308
314
  interface CollaborationContextValue {
@@ -461,6 +467,11 @@ interface PowerPointViewerProps {
461
467
  canEdit?: boolean;
462
468
  /** Optional class name */
463
469
  className?: string;
470
+ /**
471
+ * Display name used as the author for comments and annotations.
472
+ * Falls back to `collaboration.userName` when collaborating, or `'You'`.
473
+ */
474
+ authorName?: string;
464
475
  /**
465
476
  * Theme configuration for customising the viewer's appearance.
466
477
  *
@@ -553,4 +564,4 @@ declare function getAnimationInitialStyle(preset: PptxAnimationPreset | undefine
553
564
  */
554
565
  declare const PowerPointViewer: React.ForwardRefExoticComponent<PowerPointViewerProps & React.RefAttributes<PowerPointViewerHandle>>;
555
566
 
556
- export { type AccessibilityIssue as A, type SlideSectionGroup as B, type CollaborationConfig as C, type DragState as D, type EditorHistorySnapshot as E, type FileViewerHandle as F, type SlideTransitionOption as G, type StrokeDashOption as H, type SupportedShapeType as I, type ToolbarSection as J, type ViewerMode as K, type MarqueeSelectionState as M, PowerPointViewer as P, type ResizeHandle as R, type ShapeAdjustmentDragState as S, type TableCellEditorState as T, type UserPresence as U, type ViewerThemeColors as V, type ViewerTheme as a, type PowerPointViewerHandle as b, type PowerPointViewerProps as c, type ConnectionStatus as d, type CollaborationContextValue as e, type AnimationPresetOption as f, getAnimationInitialStyle as g, type CanvasSize as h, type ConnectorArrowOption as i, type ConnectorGeometryOption as j, type ConnectorGeometryType as k, type ConnectorPathGeometry as l, type DrawingTool as m, type ElementBounds as n, type ElementClipboardPayload as o, type ElementContextMenuAction as p, type ElementContextMenuState as q, type ParsedTableCell as r, type ParsedTableData as s, type PresentationAnimationRuntime as t, type ResizeState as u, type ShapeAdjustmentHandleDescriptor as v, type ShapePreset as w, type ShapeQuickStyle as x, type ShortcutReferenceItem as y, type SlideAlignment as z };
567
+ export { type AccessibilityIssue as A, type SlideAlignment as B, type CollaborationConfig as C, type DragState as D, type EditorHistorySnapshot as E, type FileViewerHandle as F, type SlideSectionGroup as G, type SlideTransitionOption as H, type StrokeDashOption as I, type SupportedShapeType as J, type ToolbarSection as K, type ViewerMode as L, type MarqueeSelectionState as M, PowerPointViewer as P, type ResizeHandle as R, type ShapeAdjustmentDragState as S, type TableCellEditorState as T, type UserPresence as U, type ViewerThemeColors as V, type ViewerTheme as a, type PowerPointViewerHandle as b, type PowerPointViewerProps as c, type ConnectionStatus as d, type CollaborationContextValue as e, type AnimationPresetOption as f, getAnimationInitialStyle as g, type CanvasSize as h, type CollaborationRole as i, type ConnectorArrowOption as j, type ConnectorGeometryOption as k, type ConnectorGeometryType as l, type ConnectorPathGeometry as m, type DrawingTool as n, type ElementBounds as o, type ElementClipboardPayload as p, type ElementContextMenuAction as q, type ElementContextMenuState as r, type ParsedTableCell as s, type ParsedTableData as t, type PresentationAnimationRuntime as u, type ResizeState as v, type ShapeAdjustmentHandleDescriptor as w, type ShapePreset as x, type ShapeQuickStyle as y, type ShortcutReferenceItem as z };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as ViewerThemeColors, a as ViewerTheme } from './PowerPointViewer-gSKLhZDo.mjs';
2
- export { P as PowerPointViewer, b as PowerPointViewerHandle, c as PowerPointViewerProps, g as getAnimationInitialStyle } from './PowerPointViewer-gSKLhZDo.mjs';
1
+ import { V as ViewerThemeColors, a as ViewerTheme } from './PowerPointViewer-DtLlYf0r.mjs';
2
+ export { P as PowerPointViewer, b as PowerPointViewerHandle, c as PowerPointViewerProps, g as getAnimationInitialStyle } from './PowerPointViewer-DtLlYf0r.mjs';
3
3
  import { Options } from 'html2canvas-pro';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import 'pptx-viewer-core';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as ViewerThemeColors, a as ViewerTheme } from './PowerPointViewer-gSKLhZDo.js';
2
- export { P as PowerPointViewer, b as PowerPointViewerHandle, c as PowerPointViewerProps, g as getAnimationInitialStyle } from './PowerPointViewer-gSKLhZDo.js';
1
+ import { V as ViewerThemeColors, a as ViewerTheme } from './PowerPointViewer-DtLlYf0r.js';
2
+ export { P as PowerPointViewer, b as PowerPointViewerHandle, c as PowerPointViewerProps, g as getAnimationInitialStyle } from './PowerPointViewer-DtLlYf0r.js';
3
3
  import { Options } from 'html2canvas-pro';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import 'pptx-viewer-core';