pptx-react-viewer 1.10.1 → 1.10.2

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/dist/index.mjs.br CHANGED
Binary file
package/dist/index.mjs.gz CHANGED
Binary file
@@ -1,6 +1,6 @@
1
- import { C as CollaborationRole, d as CollaborationConfig } from '../PowerPointViewer-S-ugGq-b.mjs';
2
- export { A as AccessibilityIssue, e as AnimationPresetOption, f as CanvasSize, h as ConnectorArrowOption, i as ConnectorGeometryOption, j as ConnectorGeometryType, k as ConnectorPathGeometry, D as DragState, l as DrawingTool, E as EditorHistorySnapshot, m as ElementBounds, n as ElementClipboardPayload, o as ElementContextMenuAction, p as ElementContextMenuState, F as FileViewerHandle, M as MarqueeSelectionState, q as ParsedTableCell, r as ParsedTableData, P as PowerPointViewer, b as PowerPointViewerHandle, c as PowerPointViewerProps, s as PresentationAnimationRuntime, R as ResizeHandle, t as ResizeState, S as ShapeAdjustmentDragState, u as ShapeAdjustmentHandleDescriptor, v as ShapePreset, w as ShapeQuickStyle, x as ShortcutReferenceItem, y as SlideAlignment, z as SlideSectionGroup, B as SlideTransitionOption, G as StrokeDashOption, H as SupportedShapeType, T as TableCellEditorState, I as ToolbarSection, V as ViewerMode, g as getAnimationInitialStyle } from '../PowerPointViewer-S-ugGq-b.mjs';
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';
1
+ import { C as CollaborationRole, d as CollaborationConfig } from '../PowerPointViewer-88hWoBGx.mjs';
2
+ export { A as AccessibilityIssue, e as AnimationPresetOption, f as CanvasSize, h as ConnectorArrowOption, i as ConnectorGeometryOption, j as ConnectorGeometryType, k as ConnectorPathGeometry, D as DragState, l as DrawingTool, E as EditorHistorySnapshot, m as ElementBounds, n as ElementClipboardPayload, o as ElementContextMenuAction, p as ElementContextMenuState, F as FileViewerHandle, M as MarqueeSelectionState, q as ParsedTableCell, r as ParsedTableData, P as PowerPointViewer, b as PowerPointViewerHandle, c as PowerPointViewerProps, s as PresentationAnimationRuntime, R as ResizeHandle, t as ResizeState, S as ShapeAdjustmentDragState, u as ShapeAdjustmentHandleDescriptor, v as ShapePreset, w as ShapeQuickStyle, x as ShortcutReferenceItem, y as SlideAlignment, z as SlideSectionGroup, B as SlideTransitionOption, G as StrokeDashOption, H as SupportedShapeType, T as TableCellEditorState, I as ToolbarSection, V as ViewerMode, g as getAnimationInitialStyle } from '../PowerPointViewer-88hWoBGx.mjs';
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-CLc4eS3z.js';
4
4
  import React__default, { RefObject } from 'react';
5
5
  import { Doc } from 'yjs';
6
6
  import { Awareness } from 'y-protocols/awareness';
@@ -1515,7 +1515,12 @@ declare function useThemeSwitching(input: UseThemeSwitchingInput): ThemeSwitchin
1515
1515
  */
1516
1516
 
1517
1517
  interface UseYjsProviderInput {
1518
- config: CollaborationConfig;
1518
+ /**
1519
+ * Collaboration config, or `undefined` when collaboration is inactive. The
1520
+ * hook is always called (React hook rules) but stays fully dormant, never
1521
+ * opening a transport, while config is absent.
1522
+ */
1523
+ config?: CollaborationConfig;
1519
1524
  }
1520
1525
  interface UseYjsProviderResult {
1521
1526
  /** Current WebSocket connection status. */
@@ -1584,11 +1589,17 @@ declare function usePresenceTracking({ awareness, localClientId, userName, userC
1584
1589
  */
1585
1590
 
1586
1591
  interface UseCollaborativeStateInput {
1587
- config: CollaborationConfig;
1592
+ /**
1593
+ * Collaboration config, or `undefined` when collaboration is inactive. The
1594
+ * hook is always called so the surrounding provider keeps a stable React
1595
+ * tree shape; it produces a dormant value (no transport, empty presence)
1596
+ * while config is absent.
1597
+ */
1598
+ config?: CollaborationConfig;
1588
1599
  canvasWidth: number;
1589
1600
  canvasHeight: number;
1590
1601
  }
1591
- declare function useCollaborativeState({ config, canvasWidth, canvasHeight, }: UseCollaborativeStateInput): CollaborationContextValue;
1602
+ declare function useCollaborativeState({ config, canvasWidth, canvasHeight, }: UseCollaborativeStateInput): CollaborationContextValue | null;
1592
1603
 
1593
1604
  interface UseCollaborativeHistoryInput {
1594
1605
  /** The local user's client ID (from Yjs awareness). */
@@ -1621,14 +1632,20 @@ declare function useCollaborativeHistory({ localClientId: _localClientId, handle
1621
1632
  * remote user presence, broadcast function) to all child components via
1622
1633
  * `useCollaboration()`.
1623
1634
  *
1624
- * This component is only rendered when `collaboration` config is provided to
1625
- * `PowerPointViewer`, ensuring zero bundle/runtime cost when unused.
1635
+ * This provider is rendered unconditionally by `PowerPointViewer` so that
1636
+ * starting or stopping a collaboration session never changes the React tree
1637
+ * shape (which would force a full unmount/remount of the editor subtree). When
1638
+ * no `config` is supplied it stays completely dormant: it opens no transport,
1639
+ * tracks no presence, and exposes a `null` context value so `useCollaboration()`
1640
+ * reports "not collaborating". The Yjs packages remain dynamically imported, so
1641
+ * there is still zero bundle cost until a session actually starts.
1626
1642
  *
1627
1643
  * @module collaboration/CollaborationProvider
1628
1644
  */
1629
1645
 
1630
1646
  interface CollaborationProviderProps {
1631
- config: CollaborationConfig;
1647
+ /** Collaboration config, or `undefined`/omitted while no session is active. */
1648
+ config?: CollaborationConfig;
1632
1649
  canvasWidth: number;
1633
1650
  canvasHeight: number;
1634
1651
  children: React__default.ReactNode;
@@ -1,6 +1,6 @@
1
- import { C as CollaborationRole, d as CollaborationConfig } from '../PowerPointViewer-S-ugGq-b.js';
2
- export { A as AccessibilityIssue, e as AnimationPresetOption, f as CanvasSize, h as ConnectorArrowOption, i as ConnectorGeometryOption, j as ConnectorGeometryType, k as ConnectorPathGeometry, D as DragState, l as DrawingTool, E as EditorHistorySnapshot, m as ElementBounds, n as ElementClipboardPayload, o as ElementContextMenuAction, p as ElementContextMenuState, F as FileViewerHandle, M as MarqueeSelectionState, q as ParsedTableCell, r as ParsedTableData, P as PowerPointViewer, b as PowerPointViewerHandle, c as PowerPointViewerProps, s as PresentationAnimationRuntime, R as ResizeHandle, t as ResizeState, S as ShapeAdjustmentDragState, u as ShapeAdjustmentHandleDescriptor, v as ShapePreset, w as ShapeQuickStyle, x as ShortcutReferenceItem, y as SlideAlignment, z as SlideSectionGroup, B as SlideTransitionOption, G as StrokeDashOption, H as SupportedShapeType, T as TableCellEditorState, I as ToolbarSection, V as ViewerMode, g as getAnimationInitialStyle } from '../PowerPointViewer-S-ugGq-b.js';
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';
1
+ import { C as CollaborationRole, d as CollaborationConfig } from '../PowerPointViewer-88hWoBGx.js';
2
+ export { A as AccessibilityIssue, e as AnimationPresetOption, f as CanvasSize, h as ConnectorArrowOption, i as ConnectorGeometryOption, j as ConnectorGeometryType, k as ConnectorPathGeometry, D as DragState, l as DrawingTool, E as EditorHistorySnapshot, m as ElementBounds, n as ElementClipboardPayload, o as ElementContextMenuAction, p as ElementContextMenuState, F as FileViewerHandle, M as MarqueeSelectionState, q as ParsedTableCell, r as ParsedTableData, P as PowerPointViewer, b as PowerPointViewerHandle, c as PowerPointViewerProps, s as PresentationAnimationRuntime, R as ResizeHandle, t as ResizeState, S as ShapeAdjustmentDragState, u as ShapeAdjustmentHandleDescriptor, v as ShapePreset, w as ShapeQuickStyle, x as ShortcutReferenceItem, y as SlideAlignment, z as SlideSectionGroup, B as SlideTransitionOption, G as StrokeDashOption, H as SupportedShapeType, T as TableCellEditorState, I as ToolbarSection, V as ViewerMode, g as getAnimationInitialStyle } from '../PowerPointViewer-88hWoBGx.js';
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-CLc4eS3z.js';
4
4
  import React__default, { RefObject } from 'react';
5
5
  import { Doc } from 'yjs';
6
6
  import { Awareness } from 'y-protocols/awareness';
@@ -1515,7 +1515,12 @@ declare function useThemeSwitching(input: UseThemeSwitchingInput): ThemeSwitchin
1515
1515
  */
1516
1516
 
1517
1517
  interface UseYjsProviderInput {
1518
- config: CollaborationConfig;
1518
+ /**
1519
+ * Collaboration config, or `undefined` when collaboration is inactive. The
1520
+ * hook is always called (React hook rules) but stays fully dormant, never
1521
+ * opening a transport, while config is absent.
1522
+ */
1523
+ config?: CollaborationConfig;
1519
1524
  }
1520
1525
  interface UseYjsProviderResult {
1521
1526
  /** Current WebSocket connection status. */
@@ -1584,11 +1589,17 @@ declare function usePresenceTracking({ awareness, localClientId, userName, userC
1584
1589
  */
1585
1590
 
1586
1591
  interface UseCollaborativeStateInput {
1587
- config: CollaborationConfig;
1592
+ /**
1593
+ * Collaboration config, or `undefined` when collaboration is inactive. The
1594
+ * hook is always called so the surrounding provider keeps a stable React
1595
+ * tree shape; it produces a dormant value (no transport, empty presence)
1596
+ * while config is absent.
1597
+ */
1598
+ config?: CollaborationConfig;
1588
1599
  canvasWidth: number;
1589
1600
  canvasHeight: number;
1590
1601
  }
1591
- declare function useCollaborativeState({ config, canvasWidth, canvasHeight, }: UseCollaborativeStateInput): CollaborationContextValue;
1602
+ declare function useCollaborativeState({ config, canvasWidth, canvasHeight, }: UseCollaborativeStateInput): CollaborationContextValue | null;
1592
1603
 
1593
1604
  interface UseCollaborativeHistoryInput {
1594
1605
  /** The local user's client ID (from Yjs awareness). */
@@ -1621,14 +1632,20 @@ declare function useCollaborativeHistory({ localClientId: _localClientId, handle
1621
1632
  * remote user presence, broadcast function) to all child components via
1622
1633
  * `useCollaboration()`.
1623
1634
  *
1624
- * This component is only rendered when `collaboration` config is provided to
1625
- * `PowerPointViewer`, ensuring zero bundle/runtime cost when unused.
1635
+ * This provider is rendered unconditionally by `PowerPointViewer` so that
1636
+ * starting or stopping a collaboration session never changes the React tree
1637
+ * shape (which would force a full unmount/remount of the editor subtree). When
1638
+ * no `config` is supplied it stays completely dormant: it opens no transport,
1639
+ * tracks no presence, and exposes a `null` context value so `useCollaboration()`
1640
+ * reports "not collaborating". The Yjs packages remain dynamically imported, so
1641
+ * there is still zero bundle cost until a session actually starts.
1626
1642
  *
1627
1643
  * @module collaboration/CollaborationProvider
1628
1644
  */
1629
1645
 
1630
1646
  interface CollaborationProviderProps {
1631
- config: CollaborationConfig;
1647
+ /** Collaboration config, or `undefined`/omitted while no session is active. */
1648
+ config?: CollaborationConfig;
1632
1649
  canvasWidth: number;
1633
1650
  canvasHeight: number;
1634
1651
  children: React__default.ReactNode;