pptx-react-viewer 4.17.1 → 4.18.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 (134) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{AiChatPanel-4VMAZWMA.js → AiChatPanel-4RAGQKFE.js} +28 -28
  3. package/dist/AiChatPanel-4RAGQKFE.js.br +0 -0
  4. package/dist/AiChatPanel-4RAGQKFE.js.gz +0 -0
  5. package/dist/{AiChatPanel-Z455OA7S.mjs → AiChatPanel-BIS3OYZ2.mjs} +4 -4
  6. package/dist/AiChatPanel-BIS3OYZ2.mjs.br +0 -0
  7. package/dist/AiChatPanel-BIS3OYZ2.mjs.gz +0 -0
  8. package/dist/{Model3DScene-MFLMJAQX.js → Model3DScene-KJBH5LFE.js} +2 -2
  9. package/dist/Model3DScene-KJBH5LFE.js.br +0 -0
  10. package/dist/Model3DScene-KJBH5LFE.js.gz +0 -0
  11. package/dist/{Model3DScene-DTWVQCBT.mjs → Model3DScene-ZVXXKGMO.mjs} +1 -1
  12. package/dist/{Model3DScene-DTWVQCBT.mjs.br → Model3DScene-ZVXXKGMO.mjs.br} +0 -0
  13. package/dist/Model3DScene-ZVXXKGMO.mjs.gz +0 -0
  14. package/dist/{chunk-QWQADOJZ.js → chunk-2GRLCBMP.js} +1 -9
  15. package/dist/chunk-2GRLCBMP.js.br +0 -0
  16. package/dist/chunk-2GRLCBMP.js.gz +0 -0
  17. package/dist/{chunk-YMVJOQIS.mjs → chunk-5OYCO5WW.mjs} +1 -1
  18. package/dist/chunk-5OYCO5WW.mjs.br +0 -0
  19. package/dist/{chunk-YMVJOQIS.mjs.gz → chunk-5OYCO5WW.mjs.gz} +0 -0
  20. package/dist/{chunk-I6VNRB6R.js → chunk-7T64DQTQ.js} +197 -197
  21. package/dist/chunk-7T64DQTQ.js.br +0 -0
  22. package/dist/chunk-7T64DQTQ.js.gz +0 -0
  23. package/dist/{chunk-QDVMTPYQ.js → chunk-CJ3GYPF6.js} +3192 -4602
  24. package/dist/chunk-CJ3GYPF6.js.br +0 -0
  25. package/dist/chunk-CJ3GYPF6.js.gz +0 -0
  26. package/dist/{chunk-26EMM7IE.mjs → chunk-EDQ436NK.mjs} +5591 -1709
  27. package/dist/chunk-EDQ436NK.mjs.br +0 -0
  28. package/dist/chunk-EDQ436NK.mjs.gz +0 -0
  29. package/dist/{chunk-GLLEZR4U.mjs → chunk-IDZ7S2O3.mjs} +2 -9
  30. package/dist/chunk-IDZ7S2O3.mjs.br +0 -0
  31. package/dist/chunk-IDZ7S2O3.mjs.gz +0 -0
  32. package/dist/{chunk-JSMKHCKC.mjs → chunk-NWWE7I6R.mjs} +1292 -2702
  33. package/dist/chunk-NWWE7I6R.mjs.br +0 -0
  34. package/dist/chunk-NWWE7I6R.mjs.gz +0 -0
  35. package/dist/{chunk-24CSDBXI.js → chunk-SJJ4AOLI.js} +831 -831
  36. package/dist/chunk-SJJ4AOLI.js.br +0 -0
  37. package/dist/chunk-SJJ4AOLI.js.gz +0 -0
  38. package/dist/{chunk-UKR42GJS.mjs → chunk-SJJY4B4V.mjs} +4 -4
  39. package/dist/chunk-SJJY4B4V.mjs.br +0 -0
  40. package/dist/chunk-SJJY4B4V.mjs.gz +0 -0
  41. package/dist/{chunk-I23JEAUE.js → chunk-UWRUG37I.js} +5 -5
  42. package/dist/chunk-UWRUG37I.js.br +0 -0
  43. package/dist/chunk-UWRUG37I.js.gz +0 -0
  44. package/dist/{chunk-HUNX22TC.mjs → chunk-X5O53JPT.mjs} +2 -2
  45. package/dist/chunk-X5O53JPT.mjs.br +0 -0
  46. package/dist/chunk-X5O53JPT.mjs.gz +0 -0
  47. package/dist/{chunk-24UNI4EL.js → chunk-XZQNOZA6.js} +5619 -1721
  48. package/dist/chunk-XZQNOZA6.js.br +0 -0
  49. package/dist/chunk-XZQNOZA6.js.gz +0 -0
  50. package/dist/i18n/de.cjs +1 -0
  51. package/dist/i18n/de.cjs.br +0 -0
  52. package/dist/i18n/de.cjs.gz +0 -0
  53. package/dist/i18n/de.mjs +1 -0
  54. package/dist/i18n/de.mjs.br +0 -0
  55. package/dist/i18n/de.mjs.gz +0 -0
  56. package/dist/i18n/es.cjs +1 -0
  57. package/dist/i18n/es.cjs.br +0 -0
  58. package/dist/i18n/es.cjs.gz +0 -0
  59. package/dist/i18n/es.mjs +1 -0
  60. package/dist/i18n/es.mjs.br +0 -0
  61. package/dist/i18n/es.mjs.gz +0 -0
  62. package/dist/i18n/fr.cjs +1 -0
  63. package/dist/i18n/fr.cjs.br +0 -0
  64. package/dist/i18n/fr.cjs.gz +0 -0
  65. package/dist/i18n/fr.mjs +1 -0
  66. package/dist/i18n/fr.mjs.br +0 -0
  67. package/dist/i18n/fr.mjs.gz +0 -0
  68. package/dist/i18n/zh-CN.cjs +1 -0
  69. package/dist/i18n/zh-CN.cjs.br +0 -0
  70. package/dist/i18n/zh-CN.cjs.gz +0 -0
  71. package/dist/i18n/zh-CN.mjs +1 -0
  72. package/dist/i18n/zh-CN.mjs.br +0 -0
  73. package/dist/i18n/zh-CN.mjs.gz +0 -0
  74. package/dist/i18n.js +4 -4
  75. package/dist/i18n.js.br +0 -0
  76. package/dist/i18n.js.gz +0 -0
  77. package/dist/i18n.mjs +1 -1
  78. package/dist/i18n.mjs.br +0 -0
  79. package/dist/i18n.mjs.gz +0 -0
  80. package/dist/index.d.ts +436 -1
  81. package/dist/index.js +63 -63
  82. package/dist/index.js.br +0 -0
  83. package/dist/index.js.gz +0 -0
  84. package/dist/index.mjs +6 -6
  85. package/dist/index.mjs.br +0 -0
  86. package/dist/index.mjs.gz +0 -0
  87. package/dist/internals.d.ts +391 -1
  88. package/dist/internals.js +105 -105
  89. package/dist/internals.js.br +0 -0
  90. package/dist/internals.js.gz +0 -0
  91. package/dist/internals.mjs +4 -4
  92. package/dist/internals.mjs.br +0 -0
  93. package/dist/internals.mjs.gz +0 -0
  94. package/dist/pptx-viewer.css +1 -1
  95. package/dist/pptx-viewer.css.br +0 -0
  96. package/dist/pptx-viewer.css.gz +0 -0
  97. package/dist/viewer/index.d.ts +436 -1
  98. package/dist/viewer/index.js +27 -27
  99. package/dist/viewer/index.js.br +0 -0
  100. package/dist/viewer/index.js.gz +0 -0
  101. package/dist/viewer/index.mjs +6 -6
  102. package/dist/viewer/index.mjs.br +0 -0
  103. package/dist/viewer/index.mjs.gz +0 -0
  104. package/package.json +1 -1
  105. package/dist/AiChatPanel-4VMAZWMA.js.br +0 -0
  106. package/dist/AiChatPanel-4VMAZWMA.js.gz +0 -0
  107. package/dist/AiChatPanel-Z455OA7S.mjs.br +0 -0
  108. package/dist/AiChatPanel-Z455OA7S.mjs.gz +0 -0
  109. package/dist/Model3DScene-DTWVQCBT.mjs.gz +0 -0
  110. package/dist/Model3DScene-MFLMJAQX.js.br +0 -0
  111. package/dist/Model3DScene-MFLMJAQX.js.gz +0 -0
  112. package/dist/chunk-24CSDBXI.js.br +0 -0
  113. package/dist/chunk-24CSDBXI.js.gz +0 -0
  114. package/dist/chunk-24UNI4EL.js.br +0 -0
  115. package/dist/chunk-24UNI4EL.js.gz +0 -0
  116. package/dist/chunk-26EMM7IE.mjs.br +0 -0
  117. package/dist/chunk-26EMM7IE.mjs.gz +0 -0
  118. package/dist/chunk-GLLEZR4U.mjs.br +0 -0
  119. package/dist/chunk-GLLEZR4U.mjs.gz +0 -0
  120. package/dist/chunk-HUNX22TC.mjs.br +0 -0
  121. package/dist/chunk-HUNX22TC.mjs.gz +0 -0
  122. package/dist/chunk-I23JEAUE.js.br +0 -0
  123. package/dist/chunk-I23JEAUE.js.gz +0 -0
  124. package/dist/chunk-I6VNRB6R.js.br +0 -0
  125. package/dist/chunk-I6VNRB6R.js.gz +0 -0
  126. package/dist/chunk-JSMKHCKC.mjs.br +0 -0
  127. package/dist/chunk-JSMKHCKC.mjs.gz +0 -0
  128. package/dist/chunk-QDVMTPYQ.js.br +0 -0
  129. package/dist/chunk-QDVMTPYQ.js.gz +0 -0
  130. package/dist/chunk-QWQADOJZ.js.br +0 -0
  131. package/dist/chunk-QWQADOJZ.js.gz +0 -0
  132. package/dist/chunk-UKR42GJS.mjs.br +0 -0
  133. package/dist/chunk-UKR42GJS.mjs.gz +0 -0
  134. package/dist/chunk-YMVJOQIS.mjs.br +0 -0
@@ -1509,6 +1509,51 @@ declare function forgetSessionDeck(): Promise<void>;
1509
1509
  * presentation back to the state it was opened in.
1510
1510
  */
1511
1511
  declare function restoreSessionDeck(): Promise<SessionDeck | null>;
1512
+ //#endregion
1513
+ //#region src/render/presentation-session-types.d.ts
1514
+ interface PresentationSnapshot {
1515
+ slideIndex: number;
1516
+ buildStep: number;
1517
+ sequence: number;
1518
+ blackout: 'none' | 'black' | 'white';
1519
+ paused: boolean;
1520
+ elapsedMs: number;
1521
+ zoom?: PresentationZoomState;
1522
+ pointer?: PresentationPointerState;
1523
+ inkStrokes?: PresentationInkStroke[];
1524
+ /**
1525
+ * Whether ink markup is drawn (PowerPoint's Ctrl+M). Undefined means visible,
1526
+ * so existing snapshots keep showing their ink. Hiding never discards the
1527
+ * strokes, which stay in `inkStrokes` and can be kept on exit.
1528
+ */
1529
+ inkMarkupVisible?: boolean;
1530
+ caption?: string;
1531
+ subtitlesVisible?: boolean;
1532
+ }
1533
+ interface PresentationZoomState {
1534
+ scale: number;
1535
+ originX: number;
1536
+ originY: number;
1537
+ }
1538
+ type PresentationPointerTool = 'none' | 'laser' | 'pen' | 'highlighter' | 'eraser';
1539
+ interface PresentationPointerState {
1540
+ tool: PresentationPointerTool;
1541
+ x: number;
1542
+ y: number;
1543
+ color: string;
1544
+ }
1545
+ interface PresentationInkPoint {
1546
+ x: number;
1547
+ y: number;
1548
+ }
1549
+ interface PresentationInkStroke {
1550
+ id: string;
1551
+ slideIndex: number;
1552
+ tool: 'pen' | 'highlighter';
1553
+ color: string;
1554
+ width: number;
1555
+ points: PresentationInkPoint[];
1556
+ }
1512
1557
  /**
1513
1558
  * Store PPTX content bytes so the audience tab can retrieve them.
1514
1559
  * Called by the presenter before opening the audience window.
@@ -1523,11 +1568,146 @@ declare function loadAudienceContent(sessionId?: string): Promise<Uint8Array | n
1523
1568
  * Remove stored audience content (cleanup).
1524
1569
  */
1525
1570
  declare function clearAudienceContent(sessionId?: string): Promise<void>;
1571
+ //#endregion
1572
+ //#region src/render/presentation-blackboard.d.ts
1573
+ /** Blackout state, as carried by {@link PresentationSnapshot}. */
1574
+ type PresentationBlackout = PresentationSnapshot['blackout'];
1575
+ //#endregion
1576
+ //#region src/render/chrome-controls-state.d.ts
1577
+ type ChromeTranslate = (key: string, params?: Record<string, string | number>) => string;
1578
+ type ReadOnlyBannerPasswordError = 'wrong-password' | 'unsupported-algorithm';
1579
+ interface ReadOnlyBannerViewState {
1580
+ /** `ReadOnlyRecommendation.kind`; mirrored onto the host's `data-kind`. */
1581
+ kind: string | null;
1582
+ /** `ReadOnlyRecommendation.messageKey`, translated by `translate`. */
1583
+ messageKey: string;
1584
+ /** Swap the Edit anyway / Dismiss pair for the inline password form. */
1585
+ passwordPromptOpen?: boolean;
1586
+ passwordError?: ReadOnlyBannerPasswordError | null;
1587
+ /** Disables the form while a submitted password is being checked. */
1588
+ checkingPassword?: boolean;
1589
+ translate?: ChromeTranslate;
1590
+ }
1591
+ interface PasteOptionsViewState {
1592
+ /** Right edge of the pasted element in viewport pixels. */
1593
+ left: number;
1594
+ /** Bottom edge of the pasted element in viewport pixels. */
1595
+ top: number;
1596
+ translate?: ChromeTranslate;
1597
+ }
1598
+ interface CompatToastViewItem {
1599
+ readonly id: string;
1600
+ readonly code: string;
1601
+ readonly severity: 'info' | 'warning';
1602
+ readonly messageKey: string;
1603
+ readonly params?: Readonly<Record<string, string>>;
1604
+ }
1605
+ interface CompatToastsViewState {
1606
+ /** Dismiss-filtered toasts. The element shows the first {@link COMPAT_TOAST_VISIBLE_LIMIT}. */
1607
+ toasts: readonly CompatToastViewItem[];
1608
+ /** Extra toasts a host already trimmed off the list it passes. */
1609
+ overflowCount?: number;
1610
+ /** Width of the open right-docked panel (see `compatToastStackStyle`). */
1611
+ rightInset?: number;
1612
+ /** Live height of the docked notes strip (see `compatToastStackStyle`). */
1613
+ bottomInset?: number;
1614
+ translate?: ChromeTranslate;
1615
+ }
1616
+ type DialogFooterVariant = 'secondary' | 'primary' | 'warning';
1617
+ type DialogFooterIcon = 'trash' | 'pen' | 'restore' | 'print' | 'check';
1618
+ interface DialogFooterAction {
1619
+ /** Stable id echoed back in the `dialog-footer-request` intent. */
1620
+ id: string;
1621
+ /** Already-translated visible label and accessible name. */
1622
+ label: string;
1623
+ variant?: DialogFooterVariant;
1624
+ icon?: DialogFooterIcon;
1625
+ disabled?: boolean;
1626
+ /** Optional `data-testid` stamped on the button. */
1627
+ testId?: string;
1628
+ }
1629
+ interface DialogFooterViewState {
1630
+ actions: readonly DialogFooterAction[];
1631
+ }
1632
+ type MobileBarId = 'slides' | 'insert' | 'inspector' | 'comments' | 'notes';
1633
+ interface MobileBarViewState {
1634
+ /** Every button disables at 0 (see `buildBarActions`). */
1635
+ slideCount: number;
1636
+ /** The button whose sheet is open; reflected as `aria-pressed` and a top pill. */
1637
+ activeSheet?: MobileBarId | null;
1638
+ /** Comment count on the badge of Comments (`99+` above 99). */
1639
+ commentCount?: number;
1640
+ /** Buttons dropped entirely, such as Notes when `hiddenActions` hides it. */
1641
+ hidden?: readonly MobileBarId[];
1642
+ /** Buttons disabled beyond the no-slides rule, such as edit-only ones in view mode. */
1643
+ disabled?: readonly MobileBarId[];
1644
+ translate?: ChromeTranslate;
1645
+ }
1646
+ type MobileToolbarId = 'menu' | 'undo' | 'redo' | 'ai' | 'save' | 'present' | 'share';
1647
+ interface MobileToolbarViewState {
1648
+ /** Menu, Undo, Redo, AI and Share only show while editing. */
1649
+ editable: boolean;
1650
+ canUndo: boolean;
1651
+ canRedo: boolean;
1652
+ /** Host opted into the AI assistant; the element draws its toggle. */
1653
+ aiVisible?: boolean;
1654
+ aiActive?: boolean;
1655
+ /** Reflected as `aria-expanded` on Menu when given. */
1656
+ menuOpen?: boolean;
1657
+ /** Buttons dropped entirely (`hiddenActions`, or Share when the host has none). */
1658
+ hidden?: readonly MobileToolbarId[];
1659
+ /** Buttons disabled, such as Present while there is nothing to present. */
1660
+ disabled?: readonly MobileToolbarId[];
1661
+ translate?: ChromeTranslate;
1662
+ }
1663
+ interface PresentToolbarViewState {
1664
+ /** Zero-based slide on screen. */
1665
+ current: number;
1666
+ total: number;
1667
+ /** The armed annotation tool; `none` leaves every tool unpressed. */
1668
+ tool: PresentationPointerTool;
1669
+ penColor: string;
1670
+ highlighterColor: string;
1671
+ hasAnnotations: boolean;
1672
+ /** With the pen, marks the Blackboard toggle active (`isBlackboardActive`). */
1673
+ blackout: PresentationBlackout;
1674
+ /** Show the presenter-view toggle (default false). */
1675
+ presenterViewVisible?: boolean;
1676
+ presenterViewActive?: boolean;
1677
+ /** Epoch ms the show started. The element ticks the readout; null shows 00:00. */
1678
+ startTime: number | null;
1679
+ translate?: ChromeTranslate;
1680
+ }
1681
+ interface PresenterConsoleViewState {
1682
+ /** Ids of toggles that read as on (and the resume / close-window variants). */
1683
+ active: readonly string[];
1684
+ /** Ids of controls that are disabled. */
1685
+ disabled: readonly string[];
1686
+ translate?: ChromeTranslate;
1687
+ }
1526
1688
  /** In-memory clipboard payload stored when an element is copied or cut. */
1527
1689
  interface ElementClipboardPayload {
1528
1690
  element: PptxElement;
1529
1691
  isTemplate: boolean;
1530
1692
  }
1693
+ //#endregion
1694
+ //#region src/render/command-search.d.ts
1695
+ /**
1696
+ * Command-search data for the PowerPoint-style "Tell me what you want to do"
1697
+ * search bar. Provides searchable command entries grouped by category, each
1698
+ * mapping a label translation key to a command identifier that bindings can
1699
+ * dispatch.
1700
+ */
1701
+ interface CommandSearchEntry {
1702
+ /** Translation key for the display label. */
1703
+ labelKey: string;
1704
+ /** Command identifier dispatched to the host binding. */
1705
+ command: string;
1706
+ /** Optional icon hint (binding resolves to framework icon component). */
1707
+ icon?: string;
1708
+ /** Category grouping key; hosts with their own short list may omit it. */
1709
+ category?: 'format' | 'insert' | 'view' | 'slideShow' | 'design' | 'arrange';
1710
+ }
1531
1711
  interface SubtitleSettings {
1532
1712
  spokenLanguage: string;
1533
1713
  }
@@ -1672,11 +1852,15 @@ interface RibbonHomeControlState {
1672
1852
  disabled?: boolean;
1673
1853
  /** Omit for ordinary commands; a boolean reflects `aria-pressed`. */
1674
1854
  pressed?: boolean;
1855
+ /** Popover triggers only: reflects `aria-expanded` while the native popover is open. */
1856
+ expanded?: boolean;
1675
1857
  hidden?: boolean;
1676
1858
  }
1859
+ /** State key of a control: its id, or `id#part` when several buttons share one id. */
1860
+ type RibbonHomeKey = RibbonControlId | `${RibbonControlId}#${string}`;
1677
1861
  interface RibbonHomeViewState {
1678
1862
  /** Missing entries are enabled, unpressed and visible. */
1679
- controls: Readonly<Partial<Record<RibbonControlId, RibbonHomeControlState>>>;
1863
+ controls: Readonly<Partial<Record<RibbonHomeKey, RibbonHomeControlState>>>;
1680
1864
  translate?: (key: string) => string;
1681
1865
  }
1682
1866
  /** Controlled View tab state. Native viewers own the values and every side effect. */
@@ -1709,6 +1893,113 @@ interface RibbonTransitionsViewState {
1709
1893
  translate?: RibbonTransitionsTranslate;
1710
1894
  }
1711
1895
  //#endregion
1896
+ //#region src/render/status-bar-state.d.ts
1897
+ /**
1898
+ * Shared model for the bottom status bar (`pptx-ui-status-bar`).
1899
+ *
1900
+ * The slide counter, save indicator, notes toggle, view-mode buttons and zoom
1901
+ * cluster were hand-built five times. The view owns the markup, pressed state
1902
+ * and gating; hosts own every effect (notes panel, view switching, zoom).
1903
+ */
1904
+ type StatusBarTranslate = (key: string, params?: Record<string, string | number>) => string;
1905
+ type StatusBarSaveKind = 'idle' | 'saving' | 'error';
1906
+ type StatusBarViewMode = 'normal' | 'sorter' | 'slideShow';
1907
+ interface StatusBarViewState {
1908
+ slideCount: number;
1909
+ /** Zero-based active slide; clamped into range for display. */
1910
+ activeSlideIndex: number;
1911
+ /** Already-translated save indicator, see {@link resolveStatusBarSave}. */
1912
+ saveText: string;
1913
+ saveKind?: StatusBarSaveKind;
1914
+ /** Omit to hide the whole zoom cluster. */
1915
+ zoomPercent?: number;
1916
+ showNotes?: boolean;
1917
+ notesExpanded?: boolean;
1918
+ /** Default true. False drops the Normal / Sorter / Slide Show cluster. */
1919
+ showViewModes?: boolean;
1920
+ /** Default true. */
1921
+ showSorter?: boolean;
1922
+ /** Default true. */
1923
+ showSlideShow?: boolean;
1924
+ /** The pressed view button; omit when none is active. */
1925
+ viewMode?: StatusBarViewMode;
1926
+ translate?: StatusBarTranslate;
1927
+ }
1928
+ //#endregion
1929
+ //#region src/render/notes-toolbar-state.d.ts
1930
+ /**
1931
+ * Shared model for the speaker-notes formatting toolbar (`pptx-ui-notes-toolbar`).
1932
+ *
1933
+ * The toolbar owns the buttons, their order, icons, labels, enabled state and
1934
+ * the hyperlink popover. Hosts own the contenteditable editor, selection-based
1935
+ * edits, history, printing and persistence, and route typed intents to them.
1936
+ */
1937
+ type NotesToolbarTranslate = (key: string, params?: Record<string, string | number>) => string;
1938
+ interface NotesToolbarViewState {
1939
+ /** True while the rich (contenteditable) surface is active. Drives the mode button label. */
1940
+ rich: boolean;
1941
+ /** Enables the formatting buttons. False in the plain editor, where they cannot act. */
1942
+ canFormat: boolean;
1943
+ /** Shows the Print button. */
1944
+ showPrint: boolean;
1945
+ /** Disables every button, for example while no slide is selected. */
1946
+ disabled?: boolean;
1947
+ /** Host translator; keys are the canonical `pptx.notes.*` set. Omitted: keys are shown. */
1948
+ translate?: NotesToolbarTranslate;
1949
+ }
1950
+ //#endregion
1951
+ //#region src/render/title-bar-state.d.ts
1952
+ type TitleBarTranslate = (key: string, params?: Record<string, string | number>) => string;
1953
+ type TitleBarPlacement = 'titleBar' | 'belowRibbon';
1954
+ type TitleBarTone = 'idle' | 'saving' | 'error';
1955
+ interface TitleBarAutosaveView {
1956
+ enabled: boolean;
1957
+ /** Default true. False renders the switch inert (host policy `autosave: false`). */
1958
+ toggleAvailable?: boolean;
1959
+ /** Translation key from `resolveTitleBarStatusKey`. */
1960
+ statusKey: string;
1961
+ /** Colour of the status text; only meaningful while `enabled`. */
1962
+ tone?: TitleBarTone;
1963
+ }
1964
+ interface TitleBarHistoryState {
1965
+ canUndo: boolean;
1966
+ canRedo: boolean;
1967
+ /** Description of the pending action, e.g. "Delete shape". */
1968
+ undoLabel?: string | null;
1969
+ redoLabel?: string | null;
1970
+ /** Default true. Maps to `hiddenActions: ['undo']`. */
1971
+ showUndo?: boolean;
1972
+ /** Default true. Maps to `hiddenActions: ['redo']`. */
1973
+ showRedo?: boolean;
1974
+ }
1975
+ interface TitleBarQuickAccessView {
1976
+ visible: boolean;
1977
+ position: QuickAccessPosition;
1978
+ showCommandLabels: boolean;
1979
+ /** Ordered catalog ids (File > Options > Quick Access Toolbar). */
1980
+ commandIds: readonly string[];
1981
+ }
1982
+ interface TitleBarViewState {
1983
+ /** Edit mode with an editable deck. Gates AutoSave, the strip, status and search. */
1984
+ editing: boolean;
1985
+ /** Whether the command search shows; hosts pass `editing`. */
1986
+ searchVisible: boolean;
1987
+ /** Display name; the translated default shows when empty. */
1988
+ fileName?: string;
1989
+ autosave: TitleBarAutosaveView;
1990
+ history: TitleBarHistoryState;
1991
+ /** Default true. */
1992
+ showSave?: boolean;
1993
+ quickAccess: TitleBarQuickAccessView;
1994
+ /** Search catalogue; defaults to the shared `COMMAND_SEARCH_ENTRIES`. */
1995
+ commands?: readonly CommandSearchEntry[];
1996
+ /** Default true. False drops the "Find in Slides" fallback row. */
1997
+ contentSearch?: boolean;
1998
+ /** ScreenTip rule (Options > General); returning undefined suppresses the title. */
1999
+ screenTip?: (label: string) => string | undefined;
2000
+ translate?: TitleBarTranslate;
2001
+ }
2002
+ //#endregion
1712
2003
  //#region src/web-components/theme-editor.d.ts
1713
2004
  interface PptxUiThemeEditorElement extends HTMLElement {
1714
2005
  theme: PptxTheme | undefined;
@@ -1720,6 +2011,74 @@ declare global {
1720
2011
  'pptx-ui-theme-editor': PptxUiThemeEditorElement;
1721
2012
  }
1722
2013
  }
2014
+ interface PptxUiCompatToastsElement extends HTMLElement {
2015
+ state: CompatToastsViewState;
2016
+ }
2017
+ declare global {
2018
+ interface HTMLElementTagNameMap {
2019
+ 'pptx-ui-compat-toasts': PptxUiCompatToastsElement;
2020
+ }
2021
+ }
2022
+ interface PptxUiDialogFooterElement extends HTMLElement {
2023
+ state: DialogFooterViewState;
2024
+ /** Move keyboard focus to an action, e.g. the primary one when a dialog opens. */
2025
+ focusAction(id: string): void;
2026
+ }
2027
+ declare global {
2028
+ interface HTMLElementTagNameMap {
2029
+ 'pptx-ui-dialog-footer': PptxUiDialogFooterElement;
2030
+ }
2031
+ }
2032
+ interface PptxUiMobileBarElement extends HTMLElement {
2033
+ state: MobileBarViewState;
2034
+ }
2035
+ declare global {
2036
+ interface HTMLElementTagNameMap {
2037
+ 'pptx-ui-mobile-bar': PptxUiMobileBarElement;
2038
+ }
2039
+ }
2040
+ interface PptxUiMobileToolbarElement extends HTMLElement {
2041
+ state: MobileToolbarViewState;
2042
+ }
2043
+ declare global {
2044
+ interface HTMLElementTagNameMap {
2045
+ 'pptx-ui-mobile-toolbar': PptxUiMobileToolbarElement;
2046
+ }
2047
+ }
2048
+ interface PptxUiPasteOptionsElement extends HTMLElement {
2049
+ state: PasteOptionsViewState;
2050
+ }
2051
+ declare global {
2052
+ interface HTMLElementTagNameMap {
2053
+ 'pptx-ui-paste-options': PptxUiPasteOptionsElement;
2054
+ }
2055
+ }
2056
+ interface PptxUiPresentToolbarElement extends HTMLElement {
2057
+ state: PresentToolbarViewState;
2058
+ /** Close an open colour palette, e.g. when the host auto-hides the bar. */
2059
+ closePalettes(): void;
2060
+ }
2061
+ declare global {
2062
+ interface HTMLElementTagNameMap {
2063
+ 'pptx-ui-present-toolbar': PptxUiPresentToolbarElement;
2064
+ }
2065
+ }
2066
+ interface PptxUiPresenterConsoleElement extends HTMLElement {
2067
+ state: PresenterConsoleViewState;
2068
+ }
2069
+ declare global {
2070
+ interface HTMLElementTagNameMap {
2071
+ 'pptx-ui-presenter-console': PptxUiPresenterConsoleElement;
2072
+ }
2073
+ }
2074
+ interface PptxUiReadOnlyBannerElement extends HTMLElement {
2075
+ state: ReadOnlyBannerViewState;
2076
+ }
2077
+ declare global {
2078
+ interface HTMLElementTagNameMap {
2079
+ 'pptx-ui-read-only-banner': PptxUiReadOnlyBannerElement;
2080
+ }
2081
+ }
1723
2082
  interface PptxUiRibbonAnimationsElement extends HTMLElement {
1724
2083
  state: RibbonAnimationsViewState;
1725
2084
  }
@@ -1738,6 +2097,8 @@ declare global {
1738
2097
  }
1739
2098
  interface PptxUiRibbonHomeElement extends HTMLElement {
1740
2099
  state: RibbonHomeViewState;
2100
+ /** Wrapper (or button) of a control id, where a host mounts or anchors its native popover. */
2101
+ anchor(id: string): HTMLElement | undefined;
1741
2102
  }
1742
2103
  declare global {
1743
2104
  interface HTMLElementTagNameMap {
@@ -1745,6 +2106,12 @@ declare global {
1745
2106
  'pptx-ui-ribbon-home-font': PptxUiRibbonHomeElement;
1746
2107
  'pptx-ui-ribbon-home-paragraph': PptxUiRibbonHomeElement;
1747
2108
  'pptx-ui-ribbon-home-editing': PptxUiRibbonHomeElement;
2109
+ 'pptx-ui-ribbon-home-slides': PptxUiRibbonHomeElement;
2110
+ 'pptx-ui-ribbon-home-drawing': PptxUiRibbonHomeElement;
2111
+ 'pptx-ui-ribbon-home-arrange-align': PptxUiRibbonHomeElement;
2112
+ 'pptx-ui-ribbon-home-arrange-flip': PptxUiRibbonHomeElement;
2113
+ 'pptx-ui-ribbon-home-arrange-order': PptxUiRibbonHomeElement;
2114
+ 'pptx-ui-ribbon-home-arrange-edit': PptxUiRibbonHomeElement;
1748
2115
  }
1749
2116
  }
1750
2117
  interface PptxUiRibbonTransitionsElement extends HTMLElement {
@@ -1812,6 +2179,74 @@ declare global {
1812
2179
  'pptx-ui-subtitle-settings': PptxUiSubtitleSettingsElement;
1813
2180
  }
1814
2181
  }
2182
+ interface PptxUiStatusBarElement extends HTMLElement {
2183
+ state: StatusBarViewState;
2184
+ }
2185
+ declare global {
2186
+ interface HTMLElementTagNameMap {
2187
+ 'pptx-ui-status-bar': PptxUiStatusBarElement;
2188
+ }
2189
+ }
2190
+ interface PptxUiNotesToolbarElement extends HTMLElement {
2191
+ state: NotesToolbarViewState;
2192
+ }
2193
+ declare global {
2194
+ interface HTMLElementTagNameMap {
2195
+ 'pptx-ui-notes-toolbar': PptxUiNotesToolbarElement;
2196
+ }
2197
+ }
2198
+ interface PptxUiTitleBarElement extends HTMLElement {
2199
+ state: TitleBarViewState | undefined;
2200
+ placement: TitleBarPlacement;
2201
+ }
2202
+ declare global {
2203
+ interface HTMLElementTagNameMap {
2204
+ 'pptx-ui-title-bar': PptxUiTitleBarElement;
2205
+ }
2206
+ }
2207
+ /** One row of a context menu. Hosts decide `id`, wording, gating and what activation does. */
2208
+ interface ContextMenuViewItem {
2209
+ /** Stable command id, echoed by `menu-request`. */
2210
+ id: string;
2211
+ /** Already-translated visible label. */
2212
+ label: string;
2213
+ /** Draw a rule before this row. */
2214
+ separatorBefore?: boolean;
2215
+ /** Group heading shown before this row; the row and the ones after it join that group. */
2216
+ heading?: string;
2217
+ /** Destructive command (Delete): tinted. */
2218
+ danger?: boolean;
2219
+ /** Offered but unavailable: announced and drawn dim, skipped by arrow keys. */
2220
+ disabled?: boolean;
2221
+ /** A toggle (Grid and Guides, Ruler) in this state; omitted for one-shot commands. */
2222
+ checked?: boolean;
2223
+ }
2224
+ /** Everything the controlled element needs to draw one menu. */
2225
+ interface ContextMenuViewState {
2226
+ /** Pointer position, in viewport pixels. The element clamps it into the window. */
2227
+ x: number;
2228
+ y: number;
2229
+ /** Accessible name of the menu. */
2230
+ label: string;
2231
+ items: readonly ContextMenuViewItem[];
2232
+ /**
2233
+ * Test-hook attributes copied onto the host element (`data-pptx-context-menu`,
2234
+ * `data-pptx-canvas-context-menu`, ...). Only `data-pptx-*` names are accepted.
2235
+ */
2236
+ markers?: readonly string[];
2237
+ /** Stacking order; defaults to {@link CONTEXT_MENU_EDITOR_LAYER}. */
2238
+ zIndex?: number;
2239
+ /** Move focus onto the first command on open. Default true. */
2240
+ autoFocus?: boolean;
2241
+ }
2242
+ interface PptxUiContextMenuElement extends HTMLElement {
2243
+ state: ContextMenuViewState;
2244
+ }
2245
+ declare global {
2246
+ interface HTMLElementTagNameMap {
2247
+ 'pptx-ui-context-menu': PptxUiContextMenuElement;
2248
+ }
2249
+ }
1815
2250
  //#endregion
1816
2251
  //#region src/web-components/select-value.d.ts
1817
2252
  /** Public DOM shape used by all bindings; the element is not a native select. */
@@ -1,96 +1,96 @@
1
1
  'use strict';
2
2
 
3
- var chunkQDVMTPYQ_js = require('../chunk-QDVMTPYQ.js');
4
- require('../chunk-I23JEAUE.js');
5
- var chunk24CSDBXI_js = require('../chunk-24CSDBXI.js');
6
- var chunkI6VNRB6R_js = require('../chunk-I6VNRB6R.js');
7
- var chunk24UNI4EL_js = require('../chunk-24UNI4EL.js');
8
- require('../chunk-QWQADOJZ.js');
3
+ var chunkCJ3GYPF6_js = require('../chunk-CJ3GYPF6.js');
4
+ require('../chunk-UWRUG37I.js');
5
+ var chunkSJJ4AOLI_js = require('../chunk-SJJ4AOLI.js');
6
+ var chunk7T64DQTQ_js = require('../chunk-7T64DQTQ.js');
7
+ var chunkXZQNOZA6_js = require('../chunk-XZQNOZA6.js');
8
+ require('../chunk-2GRLCBMP.js');
9
9
  require('../chunk-4VNS5WPM.js');
10
10
 
11
11
 
12
12
 
13
13
  Object.defineProperty(exports, "CollaborationStatusIndicator", {
14
14
  enumerable: true,
15
- get: function () { return chunkQDVMTPYQ_js.CollaborationStatusIndicator; }
15
+ get: function () { return chunkCJ3GYPF6_js.CollaborationStatusIndicator; }
16
16
  });
17
17
  Object.defineProperty(exports, "PowerPointViewer", {
18
18
  enumerable: true,
19
- get: function () { return chunkQDVMTPYQ_js.PowerPointViewer; }
19
+ get: function () { return chunkCJ3GYPF6_js.PowerPointViewer; }
20
20
  });
21
21
  Object.defineProperty(exports, "UserAvatarBar", {
22
22
  enumerable: true,
23
- get: function () { return chunkQDVMTPYQ_js.UserAvatarBar; }
23
+ get: function () { return chunkCJ3GYPF6_js.UserAvatarBar; }
24
24
  });
25
25
  Object.defineProperty(exports, "CollaborationProvider", {
26
26
  enumerable: true,
27
- get: function () { return chunk24CSDBXI_js.CollaborationProvider; }
27
+ get: function () { return chunkSJJ4AOLI_js.CollaborationProvider; }
28
28
  });
29
29
  Object.defineProperty(exports, "RemoteUserCursors", {
30
30
  enumerable: true,
31
- get: function () { return chunk24CSDBXI_js.RemoteUserCursors; }
31
+ get: function () { return chunkSJJ4AOLI_js.RemoteUserCursors; }
32
32
  });
33
33
  Object.defineProperty(exports, "isAudienceTab", {
34
34
  enumerable: true,
35
- get: function () { return chunk24CSDBXI_js.isAudienceTab; }
35
+ get: function () { return chunkSJJ4AOLI_js.isAudienceTab; }
36
36
  });
37
37
  Object.defineProperty(exports, "parseAudienceNonce", {
38
38
  enumerable: true,
39
- get: function () { return chunk24CSDBXI_js.parseAudienceNonce; }
39
+ get: function () { return chunkSJJ4AOLI_js.parseAudienceNonce; }
40
40
  });
41
41
  Object.defineProperty(exports, "useCollaborativeHistory", {
42
42
  enumerable: true,
43
- get: function () { return chunk24CSDBXI_js.useCollaborativeHistory; }
43
+ get: function () { return chunkSJJ4AOLI_js.useCollaborativeHistory; }
44
44
  });
45
45
  Object.defineProperty(exports, "useCollaborativeState", {
46
46
  enumerable: true,
47
- get: function () { return chunk24CSDBXI_js.useCollaborativeState; }
47
+ get: function () { return chunkSJJ4AOLI_js.useCollaborativeState; }
48
48
  });
49
49
  Object.defineProperty(exports, "usePresenceTracking", {
50
50
  enumerable: true,
51
- get: function () { return chunk24CSDBXI_js.usePresenceTracking; }
51
+ get: function () { return chunkSJJ4AOLI_js.usePresenceTracking; }
52
52
  });
53
53
  Object.defineProperty(exports, "useThemeSwitching", {
54
54
  enumerable: true,
55
- get: function () { return chunk24CSDBXI_js.useThemeSwitching; }
55
+ get: function () { return chunkSJJ4AOLI_js.useThemeSwitching; }
56
56
  });
57
57
  Object.defineProperty(exports, "useYjsProvider", {
58
58
  enumerable: true,
59
- get: function () { return chunk24CSDBXI_js.useYjsProvider; }
59
+ get: function () { return chunkSJJ4AOLI_js.useYjsProvider; }
60
60
  });
61
61
  Object.defineProperty(exports, "getAnimationInitialStyle", {
62
62
  enumerable: true,
63
- get: function () { return chunkI6VNRB6R_js.getAnimationInitialStyle; }
63
+ get: function () { return chunk7T64DQTQ_js.getAnimationInitialStyle; }
64
64
  });
65
65
  Object.defineProperty(exports, "clearAudienceContent", {
66
66
  enumerable: true,
67
- get: function () { return chunk24UNI4EL_js.clearAudienceContent; }
67
+ get: function () { return chunkXZQNOZA6_js.clearAudienceContent; }
68
68
  });
69
69
  Object.defineProperty(exports, "forgetSessionDeck", {
70
70
  enumerable: true,
71
- get: function () { return chunk24UNI4EL_js.forgetSessionDeck; }
71
+ get: function () { return chunkXZQNOZA6_js.forgetSessionDeck; }
72
72
  });
73
73
  Object.defineProperty(exports, "getSessionTabId", {
74
74
  enumerable: true,
75
- get: function () { return chunk24UNI4EL_js.getSessionTabId; }
75
+ get: function () { return chunkXZQNOZA6_js.getSessionTabId; }
76
76
  });
77
77
  Object.defineProperty(exports, "loadAudienceContent", {
78
78
  enumerable: true,
79
- get: function () { return chunk24UNI4EL_js.loadAudienceContent; }
79
+ get: function () { return chunkXZQNOZA6_js.loadAudienceContent; }
80
80
  });
81
81
  Object.defineProperty(exports, "loadSessionDeck", {
82
82
  enumerable: true,
83
- get: function () { return chunk24UNI4EL_js.loadSessionDeck; }
83
+ get: function () { return chunkXZQNOZA6_js.loadSessionDeck; }
84
84
  });
85
85
  Object.defineProperty(exports, "rememberSessionDeck", {
86
86
  enumerable: true,
87
- get: function () { return chunk24UNI4EL_js.rememberSessionDeck; }
87
+ get: function () { return chunkXZQNOZA6_js.rememberSessionDeck; }
88
88
  });
89
89
  Object.defineProperty(exports, "restoreSessionDeck", {
90
90
  enumerable: true,
91
- get: function () { return chunk24UNI4EL_js.restoreSessionDeck; }
91
+ get: function () { return chunkXZQNOZA6_js.restoreSessionDeck; }
92
92
  });
93
93
  Object.defineProperty(exports, "storeAudienceContent", {
94
94
  enumerable: true,
95
- get: function () { return chunk24UNI4EL_js.storeAudienceContent; }
95
+ get: function () { return chunkXZQNOZA6_js.storeAudienceContent; }
96
96
  });
Binary file
Binary file
@@ -1,7 +1,7 @@
1
- export { CollaborationStatusIndicator, PowerPointViewer, UserAvatarBar } from '../chunk-JSMKHCKC.mjs';
2
- import '../chunk-YMVJOQIS.mjs';
3
- export { CollaborationProvider, RemoteUserCursors, isAudienceTab, parseAudienceNonce, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-UKR42GJS.mjs';
4
- export { getAnimationInitialStyle } from '../chunk-HUNX22TC.mjs';
5
- export { clearAudienceContent, forgetSessionDeck, getSessionTabId, loadAudienceContent, loadSessionDeck, rememberSessionDeck, restoreSessionDeck, storeAudienceContent } from '../chunk-26EMM7IE.mjs';
6
- import '../chunk-GLLEZR4U.mjs';
1
+ export { CollaborationStatusIndicator, PowerPointViewer, UserAvatarBar } from '../chunk-NWWE7I6R.mjs';
2
+ import '../chunk-5OYCO5WW.mjs';
3
+ export { CollaborationProvider, RemoteUserCursors, isAudienceTab, parseAudienceNonce, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-SJJY4B4V.mjs';
4
+ export { getAnimationInitialStyle } from '../chunk-X5O53JPT.mjs';
5
+ export { clearAudienceContent, forgetSessionDeck, getSessionTabId, loadAudienceContent, loadSessionDeck, rememberSessionDeck, restoreSessionDeck, storeAudienceContent } from '../chunk-EDQ436NK.mjs';
6
+ import '../chunk-IDZ7S2O3.mjs';
7
7
  import '../chunk-XGB3TDIC.mjs';
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-react-viewer",
3
- "version": "4.17.1",
3
+ "version": "4.18.0",
4
4
  "description": "pptx-viewer for React: a PowerPoint viewer and editor component to render, edit, and export PPTX slides in the browser.",
5
5
  "keywords": [
6
6
  "editor",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file