pptx-react-viewer 4.46.0 → 4.47.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +3 -0
  3. package/dist/{AiChatPanel-Z5VHI4WA.mjs → AiChatPanel-6S4LWXGM.mjs} +2 -2
  4. package/dist/AiChatPanel-6S4LWXGM.mjs.br +0 -0
  5. package/dist/AiChatPanel-6S4LWXGM.mjs.gz +0 -0
  6. package/dist/{AiChatPanel-TGZQBH3L.js → AiChatPanel-IEM43TTZ.js} +10 -10
  7. package/dist/AiChatPanel-IEM43TTZ.js.br +0 -0
  8. package/dist/AiChatPanel-IEM43TTZ.js.gz +0 -0
  9. package/dist/{Model3DScene-5HLXSIIK.js → Model3DScene-CCIG67DJ.js} +1 -1
  10. package/dist/Model3DScene-CCIG67DJ.js.br +0 -0
  11. package/dist/Model3DScene-CCIG67DJ.js.gz +0 -0
  12. package/dist/{Model3DScene-MSC4LEKG.mjs → Model3DScene-NUJH2UKM.mjs} +1 -1
  13. package/dist/Model3DScene-NUJH2UKM.mjs.br +0 -0
  14. package/dist/Model3DScene-NUJH2UKM.mjs.gz +0 -0
  15. package/dist/{chunk-CLHUOZSY.mjs → chunk-2I7ZAM4F.mjs} +244 -160
  16. package/dist/chunk-2I7ZAM4F.mjs.br +0 -0
  17. package/dist/chunk-2I7ZAM4F.mjs.gz +0 -0
  18. package/dist/{chunk-UQFIRJGG.mjs → chunk-BL7UYXYD.mjs} +233 -128
  19. package/dist/chunk-BL7UYXYD.mjs.br +0 -0
  20. package/dist/chunk-BL7UYXYD.mjs.gz +0 -0
  21. package/dist/{chunk-FBN7UFW2.mjs → chunk-BVQSH5SS.mjs} +36 -43
  22. package/dist/chunk-BVQSH5SS.mjs.br +0 -0
  23. package/dist/chunk-BVQSH5SS.mjs.gz +0 -0
  24. package/dist/{chunk-VJZJESNT.js → chunk-MA2BI7LX.js} +45 -61
  25. package/dist/chunk-MA2BI7LX.js.br +0 -0
  26. package/dist/chunk-MA2BI7LX.js.gz +0 -0
  27. package/dist/{chunk-W2IMY5SY.js → chunk-PIRHQTI4.js} +0 -2
  28. package/dist/chunk-PIRHQTI4.js.br +0 -0
  29. package/dist/chunk-PIRHQTI4.js.gz +0 -0
  30. package/dist/{chunk-2J3467IB.js → chunk-TANR7L7E.js} +546 -462
  31. package/dist/chunk-TANR7L7E.js.br +0 -0
  32. package/dist/chunk-TANR7L7E.js.gz +0 -0
  33. package/dist/{chunk-Q3DHYOLK.mjs → chunk-UV2HVMKZ.mjs} +1 -2
  34. package/dist/chunk-UV2HVMKZ.mjs.br +0 -0
  35. package/dist/chunk-UV2HVMKZ.mjs.gz +0 -0
  36. package/dist/{chunk-AMXSOQRH.js → chunk-VUVBSQLT.js} +408 -301
  37. package/dist/chunk-VUVBSQLT.js.br +0 -0
  38. package/dist/chunk-VUVBSQLT.js.gz +0 -0
  39. package/dist/i18n.js +1 -1
  40. package/dist/i18n.js.br +2 -2
  41. package/dist/i18n.js.gz +0 -0
  42. package/dist/i18n.mjs +1 -1
  43. package/dist/i18n.mjs.br +1 -1
  44. package/dist/i18n.mjs.gz +0 -0
  45. package/dist/index.d.ts +42 -5
  46. package/dist/index.js +25 -25
  47. package/dist/index.js.br +0 -0
  48. package/dist/index.js.gz +0 -0
  49. package/dist/index.mjs +4 -4
  50. package/dist/index.mjs.br +0 -0
  51. package/dist/index.mjs.gz +0 -0
  52. package/dist/internals.d.ts +66 -7
  53. package/dist/internals.js +82 -82
  54. package/dist/internals.js.br +0 -0
  55. package/dist/internals.js.gz +0 -0
  56. package/dist/internals.mjs +3 -3
  57. package/dist/internals.mjs.br +0 -0
  58. package/dist/internals.mjs.gz +0 -0
  59. package/dist/pptx-viewer-canvas.css +2 -0
  60. package/dist/pptx-viewer-canvas.css.br +0 -0
  61. package/dist/pptx-viewer-canvas.css.gz +0 -0
  62. package/dist/pptx-viewer.css +1 -1
  63. package/dist/pptx-viewer.css.br +0 -0
  64. package/dist/pptx-viewer.css.gz +0 -0
  65. package/dist/{three.module-JPZUM7AI.mjs → three.module-EBJVANGB.mjs} +1 -1
  66. package/dist/three.module-EBJVANGB.mjs.br +0 -0
  67. package/dist/three.module-EBJVANGB.mjs.gz +0 -0
  68. package/dist/{three.module-RIUI7P3J.js → three.module-MBFHAT6M.js} +1 -1
  69. package/dist/three.module-MBFHAT6M.js.br +0 -0
  70. package/dist/three.module-MBFHAT6M.js.gz +0 -0
  71. package/dist/viewer/index.d.ts +44 -9
  72. package/dist/viewer/index.js +20 -20
  73. package/dist/viewer/index.js.br +0 -0
  74. package/dist/viewer/index.js.gz +0 -0
  75. package/dist/viewer/index.mjs +4 -4
  76. package/dist/viewer/index.mjs.br +0 -0
  77. package/dist/viewer/index.mjs.gz +0 -0
  78. package/dist/{y-webrtc-CCA4HVZZ.mjs → y-webrtc-2H7UYAQD.mjs} +1 -1
  79. package/dist/y-webrtc-2H7UYAQD.mjs.br +0 -0
  80. package/dist/y-webrtc-2H7UYAQD.mjs.gz +0 -0
  81. package/dist/{y-webrtc-MB5ZXFBA.js → y-webrtc-DVPQNFLL.js} +5 -5
  82. package/dist/y-webrtc-DVPQNFLL.js.br +0 -0
  83. package/dist/y-webrtc-DVPQNFLL.js.gz +0 -0
  84. package/dist/{y-websocket-JQQZVAMX.js → y-websocket-TN4OKPXQ.js} +1 -1
  85. package/dist/y-websocket-TN4OKPXQ.js.br +0 -0
  86. package/dist/y-websocket-TN4OKPXQ.js.gz +0 -0
  87. package/dist/{y-websocket-SCLLNICY.mjs → y-websocket-WORVRRQS.mjs} +1 -1
  88. package/dist/y-websocket-WORVRRQS.mjs.br +0 -0
  89. package/dist/y-websocket-WORVRRQS.mjs.gz +0 -0
  90. package/package.json +7 -5
  91. package/dist/AiChatPanel-TGZQBH3L.js.br +0 -0
  92. package/dist/AiChatPanel-TGZQBH3L.js.gz +0 -0
  93. package/dist/AiChatPanel-Z5VHI4WA.mjs.br +0 -0
  94. package/dist/AiChatPanel-Z5VHI4WA.mjs.gz +0 -0
  95. package/dist/Model3DScene-5HLXSIIK.js.br +0 -0
  96. package/dist/Model3DScene-5HLXSIIK.js.gz +0 -0
  97. package/dist/Model3DScene-MSC4LEKG.mjs.br +0 -0
  98. package/dist/Model3DScene-MSC4LEKG.mjs.gz +0 -0
  99. package/dist/chunk-2J3467IB.js.br +0 -0
  100. package/dist/chunk-2J3467IB.js.gz +0 -0
  101. package/dist/chunk-AMXSOQRH.js.br +0 -0
  102. package/dist/chunk-AMXSOQRH.js.gz +0 -0
  103. package/dist/chunk-CLHUOZSY.mjs.br +0 -0
  104. package/dist/chunk-CLHUOZSY.mjs.gz +0 -0
  105. package/dist/chunk-FBN7UFW2.mjs.br +0 -0
  106. package/dist/chunk-FBN7UFW2.mjs.gz +0 -0
  107. package/dist/chunk-Q3DHYOLK.mjs.br +0 -0
  108. package/dist/chunk-Q3DHYOLK.mjs.gz +0 -0
  109. package/dist/chunk-UQFIRJGG.mjs.br +0 -0
  110. package/dist/chunk-UQFIRJGG.mjs.gz +0 -0
  111. package/dist/chunk-VJZJESNT.js.br +0 -0
  112. package/dist/chunk-VJZJESNT.js.gz +0 -0
  113. package/dist/chunk-W2IMY5SY.js.br +0 -0
  114. package/dist/chunk-W2IMY5SY.js.gz +0 -0
  115. package/dist/three.module-JPZUM7AI.mjs.br +0 -0
  116. package/dist/three.module-JPZUM7AI.mjs.gz +0 -0
  117. package/dist/three.module-RIUI7P3J.js.br +0 -0
  118. package/dist/three.module-RIUI7P3J.js.gz +0 -0
  119. package/dist/y-webrtc-CCA4HVZZ.mjs.br +0 -0
  120. package/dist/y-webrtc-CCA4HVZZ.mjs.gz +0 -0
  121. package/dist/y-webrtc-MB5ZXFBA.js.br +0 -0
  122. package/dist/y-webrtc-MB5ZXFBA.js.gz +0 -0
  123. package/dist/y-websocket-JQQZVAMX.js.br +0 -0
  124. package/dist/y-websocket-JQQZVAMX.js.gz +0 -0
  125. package/dist/y-websocket-SCLLNICY.mjs.br +0 -0
  126. package/dist/y-websocket-SCLLNICY.mjs.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,50 @@ A release listed with no entries carried no Conventional Commit in this package'
7
7
  scope: scripts/release-plan.mjs releases whenever any published file changes, not only on
8
8
  conventional commits.
9
9
 
10
+ ## [4.47.1](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.47.1) - 2026-10-22
11
+
12
+ ### Bug Fixes
13
+
14
+ - **ui:** Fit the pptx slide to sub-pixel viewport sizes ([#165](https://github.com/ChristopherVR/ooxml/issues/165)) ([d09a71d](https://github.com/ChristopherVR/ooxml/commit/d09a71d1e478eebc28edec2af309e7f4b0a69dbb))
15
+ - **pptx:** Inject the .ppt svg rasteriser and move it to pptx/node ([be73b10](https://github.com/ChristopherVR/ooxml/commit/be73b10464c4629ebffa86d631b086e46a42fbe3))
16
+
17
+ ### Performance
18
+
19
+ - **pptx:** Share workers in the react 18 test leg ([34507aa](https://github.com/ChristopherVR/ooxml/commit/34507aa95cb689418d6c7e755d32b592a912ec27))
20
+
21
+ ## [4.47.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.47.0) - 2026-10-22
22
+
23
+ ### Features
24
+
25
+ - **react:** Ship a canvas-only stylesheet as canvas.css ([34ef433](https://github.com/ChristopherVR/ooxml/commit/34ef433e6136bce3ca15b5d7024d867123d8af91))
26
+ - **pptx:** Route saves and recovery through host-owned storage ([4ad5655](https://github.com/ChristopherVR/ooxml/commit/4ad565525269ef0284114efad6d5e4a7bed756e4))
27
+ - **pptx:** Add readOnly to the five viewer bindings ([4aadd67](https://github.com/ChristopherVR/ooxml/commit/4aadd678969d4b2d4811d86880b91c79ba7ca3b6))
28
+ - **pptx:** Report the missing host events from the react viewer ([2ba8c58](https://github.com/ChristopherVR/ooxml/commit/2ba8c58d45446cf912eab5d3c4c026a55fd50a3e))
29
+ - **pptx:** Report inspector and AI property edits, emit vue dirty-change ([83d879d](https://github.com/ChristopherVR/ooxml/commit/83d879d4e27dec236e32af86064afebac21c6af9))
30
+ - **embedding:** Land the host customization, read-only and storage contracts ([822a6a0](https://github.com/ChristopherVR/ooxml/commit/822a6a073840b9e9d1671476542322b28332dc42))
31
+ - **automation:** Run the document tools against open editors ([6a45ebc](https://github.com/ChristopherVR/ooxml/commit/6a45ebc3651a21739b5e18e7758395c866656198))
32
+
33
+ ### Bug Fixes
34
+
35
+ - **pptx:** Scope the viewer stylesheet reset to the viewer roots ([c390b2b](https://github.com/ChristopherVR/ooxml/commit/c390b2ba2f0ec7811c3554b9989346c6e8cd927d))
36
+ - **pptx:** Fit the react slide before its first paint ([#164](https://github.com/ChristopherVR/ooxml/issues/164)) ([a8eed20](https://github.com/ChristopherVR/ooxml/commit/a8eed2004fbfe69d79f9ceaab785b09fe0fbb8f2))
37
+ - **pptx:** Report host save failures and use host recovery everywhere ([8e982c8](https://github.com/ChristopherVR/ooxml/commit/8e982c8576f656d10200a45cc1708a5ac8e14ed6))
38
+ - **pptx:** Align cache maintenance tests with the shared sweeps ([a13ff2d](https://github.com/ChristopherVR/ooxml/commit/a13ff2d5f487599fe43a37a503436bd069375479))
39
+
40
+ ### Other
41
+
42
+ - Integrate the customization contract into host storage ([629554b](https://github.com/ChristopherVR/ooxml/commit/629554b3030728bfe16e11ac8ae5b2530bb28a17))
43
+ - Integrate the pptx binding events into host storage ([08272a2](https://github.com/ChristopherVR/ooxml/commit/08272a298c8b249aa0bf143b689ff01f66663309))
44
+ - Bring origin/main into the embedding work ([a3711a1](https://github.com/ChristopherVR/ooxml/commit/a3711a14049a2cd11b994e76eafec039db2dc2de))
45
+
46
+ ### Performance
47
+
48
+ - **react:** Let hosts tree-shake unused components from the bundle ([5959b25](https://github.com/ChristopherVR/ooxml/commit/5959b2586753af02bafb10e9520b373293551935))
49
+
50
+ ### Testing
51
+
52
+ - **react:** Compare canvas.css sources as posix paths ([3fc535c](https://github.com/ChristopherVR/ooxml/commit/3fc535c1513d848ed548fcf6bd0d986325ae2be4))
53
+
10
54
  ## [Unreleased]
11
55
 
12
56
  ### Documentation
package/README.md CHANGED
@@ -228,6 +228,8 @@ viewport rather than the whole 540 px host.
228
228
 
229
229
  `useViewerBuildingBlocks` accepts the same `content` / `canEdit` / `filePath` / `hiddenActions` / `onDirtyChange`-style inputs as `PowerPointViewer`, plus `onOpenSettings` / `onOpenHeaderFooter` / `onOpenShareDialog` callbacks (fired by the corresponding toolbar buttons) since this composition doesn't render those dialogs itself. It's an additive alternative, not a replacement: dialogs, presentation-mode overlays, mobile chrome, resizable side panels, and real-time collaboration are all part of `PowerPointViewer` and are out of scope for these building blocks. Reach for `PowerPointViewer` when you need the full editor; reach for `useViewerBuildingBlocks` when you're assembling your own chrome around just the toolbar and canvas.
230
230
 
231
+ The bundled stylesheet's base reset (Tailwind's preflight) applies only inside the viewer root, a canvas viewport and elements with a `data-pptx-scope` attribute, so your page's own headings, lists and margins stay as they are. `SlideCanvas` and `Toolbar` carry the scope themselves; give any other element of a composed shell that uses the viewer's classes an ancestor with `data-pptx-scope`. A canvas-only shell can import `pptx-react-viewer/canvas.css` instead of `pptx-react-viewer/styles`.
232
+
231
233
  ---
232
234
 
233
235
  ## Styling & theming
@@ -236,6 +238,7 @@ The viewer's UI references **CSS custom properties** (`--pptx-*`, the shadcn/ui
236
238
 
237
239
  - **Tailwind CSS v4 project**: the viewer classes resolve through your existing Tailwind tokens. No extra CSS import needed.
238
240
  - **No Tailwind**: import the bundled stylesheet once at your app entry: `import 'pptx-react-viewer/styles';`
241
+ - **Canvas only**: a host that renders just `SlideCanvas` (see [Composing a custom viewer shell](#composing-a-custom-viewer-shell)) can import `pptx-react-viewer/canvas.css` instead: the same tokens and reset with only the utilities the canvas uses (about 46 KB, 8 KB gzipped, against 112 KB, 16 KB gzipped).
239
242
  - **CSS custom properties**: define the `--pptx-*` properties yourself for full control.
240
243
 
241
244
  Override specific values with the `theme` prop:
@@ -1,5 +1,5 @@
1
- import { cn } from './chunk-FBN7UFW2.mjs';
2
- import './chunk-Q3DHYOLK.mjs';
1
+ import { cn } from './chunk-BVQSH5SS.mjs';
2
+ import './chunk-UV2HVMKZ.mjs';
3
3
  import { useMemo, useRef, useState, useEffect, useReducer, useCallback } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { LuSparkles, LuX, LuLoaderCircle, LuTriangleAlert, LuHistory, LuMessageSquarePlus, LuTrash2, LuPlus, LuGitMerge, LuCrosshair, LuPinOff, LuPin, LuUser, LuBot, LuCheck, LuSquare, LuSend, LuMessageSquare, LuPalette, LuUndo2, LuWrench, LuStickyNote, LuFilm, LuNavigation, LuSearch, LuMove, LuChartColumn, LuLayoutTemplate, LuTable, LuShapes, LuType, LuEye } from 'react-icons/lu';
Binary file
Binary file
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkVJZJESNT_js = require('./chunk-VJZJESNT.js');
4
- require('./chunk-W2IMY5SY.js');
3
+ var chunkMA2BI7LX_js = require('./chunk-MA2BI7LX.js');
4
+ require('./chunk-PIRHQTI4.js');
5
5
  var react = require('react');
6
6
  var reactI18next = require('react-i18next');
7
7
  var lu = require('react-icons/lu');
@@ -365,7 +365,7 @@ function AiComposer({
365
365
  disabled: value.trim().length === 0,
366
366
  title: t("pptx.ai.send"),
367
367
  "aria-label": t("pptx.ai.send"),
368
- className: chunkVJZJESNT_js.cn(
368
+ className: chunkMA2BI7LX_js.cn(
369
369
  "shrink-0 rounded-sm p-1.5 transition-colors",
370
370
  value.trim().length === 0 ? "text-muted-foreground/50" : "bg-primary text-primary-foreground hover:bg-primary/90"
371
371
  ),
@@ -396,7 +396,7 @@ function AiFocusBar({
396
396
  chips.map((chip) => /* @__PURE__ */ jsxRuntime.jsx(
397
397
  "span",
398
398
  {
399
- className: chunkVJZJESNT_js.cn(
399
+ className: chunkMA2BI7LX_js.cn(
400
400
  "inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
401
401
  hasPicks || isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground"
402
402
  ),
@@ -433,7 +433,7 @@ function AiFocusBar({
433
433
  title: t("pptx.ai.pickElement"),
434
434
  "aria-label": t("pptx.ai.pickAria"),
435
435
  "aria-pressed": pickMode,
436
- className: chunkVJZJESNT_js.cn(
436
+ className: chunkMA2BI7LX_js.cn(
437
437
  "rounded-sm p-1 max-md:min-w-[44px]! max-md:min-h-[44px]! flex items-center justify-center",
438
438
  pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
439
439
  ),
@@ -512,7 +512,7 @@ function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
512
512
  {
513
513
  type: "button",
514
514
  onClick: () => onResume(chat.id),
515
- className: chunkVJZJESNT_js.cn(
515
+ className: chunkMA2BI7LX_js.cn(
516
516
  "flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent",
517
517
  chat.id === activeChatId && "bg-accent/60"
518
518
  ),
@@ -676,17 +676,17 @@ function AiToolCallCard({ part }) {
676
676
  /* @__PURE__ */ jsxRuntime.jsx(
677
677
  Icon,
678
678
  {
679
- className: chunkVJZJESNT_js.cn(
679
+ className: chunkMA2BI7LX_js.cn(
680
680
  "w-3.5 h-3.5 shrink-0",
681
681
  failed ? "text-destructive" : "text-muted-foreground"
682
682
  )
683
683
  }
684
684
  ),
685
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkVJZJESNT_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
685
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkMA2BI7LX_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
686
686
  /* @__PURE__ */ jsxRuntime.jsxs(
687
687
  "span",
688
688
  {
689
- className: chunkVJZJESNT_js.cn(
689
+ className: chunkMA2BI7LX_js.cn(
690
690
  "ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]",
691
691
  failed ? "bg-destructive/15 text-destructive" : done ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
692
692
  ),
@@ -734,7 +734,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
734
734
  /* @__PURE__ */ jsxRuntime.jsx(
735
735
  "div",
736
736
  {
737
- className: chunkVJZJESNT_js.cn(
737
+ className: chunkMA2BI7LX_js.cn(
738
738
  "mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
739
739
  isUser ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary"
740
740
  ),
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('./chunk-W2IMY5SY.js');
3
+ require('./chunk-PIRHQTI4.js');
4
4
  var pptx = require('ooxml-ui/pptx');
5
5
  var react = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- import './chunk-Q3DHYOLK.mjs';
1
+ import './chunk-UV2HVMKZ.mjs';
2
2
  import { mountModel3D } from 'ooxml-ui/pptx';
3
3
  import { useRef, useEffect } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';