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.
- package/CHANGELOG.md +44 -0
- package/README.md +3 -0
- package/dist/{AiChatPanel-Z5VHI4WA.mjs → AiChatPanel-6S4LWXGM.mjs} +2 -2
- package/dist/AiChatPanel-6S4LWXGM.mjs.br +0 -0
- package/dist/AiChatPanel-6S4LWXGM.mjs.gz +0 -0
- package/dist/{AiChatPanel-TGZQBH3L.js → AiChatPanel-IEM43TTZ.js} +10 -10
- package/dist/AiChatPanel-IEM43TTZ.js.br +0 -0
- package/dist/AiChatPanel-IEM43TTZ.js.gz +0 -0
- package/dist/{Model3DScene-5HLXSIIK.js → Model3DScene-CCIG67DJ.js} +1 -1
- package/dist/Model3DScene-CCIG67DJ.js.br +0 -0
- package/dist/Model3DScene-CCIG67DJ.js.gz +0 -0
- package/dist/{Model3DScene-MSC4LEKG.mjs → Model3DScene-NUJH2UKM.mjs} +1 -1
- package/dist/Model3DScene-NUJH2UKM.mjs.br +0 -0
- package/dist/Model3DScene-NUJH2UKM.mjs.gz +0 -0
- package/dist/{chunk-CLHUOZSY.mjs → chunk-2I7ZAM4F.mjs} +244 -160
- package/dist/chunk-2I7ZAM4F.mjs.br +0 -0
- package/dist/chunk-2I7ZAM4F.mjs.gz +0 -0
- package/dist/{chunk-UQFIRJGG.mjs → chunk-BL7UYXYD.mjs} +233 -128
- package/dist/chunk-BL7UYXYD.mjs.br +0 -0
- package/dist/chunk-BL7UYXYD.mjs.gz +0 -0
- package/dist/{chunk-FBN7UFW2.mjs → chunk-BVQSH5SS.mjs} +36 -43
- package/dist/chunk-BVQSH5SS.mjs.br +0 -0
- package/dist/chunk-BVQSH5SS.mjs.gz +0 -0
- package/dist/{chunk-VJZJESNT.js → chunk-MA2BI7LX.js} +45 -61
- package/dist/chunk-MA2BI7LX.js.br +0 -0
- package/dist/chunk-MA2BI7LX.js.gz +0 -0
- package/dist/{chunk-W2IMY5SY.js → chunk-PIRHQTI4.js} +0 -2
- package/dist/chunk-PIRHQTI4.js.br +0 -0
- package/dist/chunk-PIRHQTI4.js.gz +0 -0
- package/dist/{chunk-2J3467IB.js → chunk-TANR7L7E.js} +546 -462
- package/dist/chunk-TANR7L7E.js.br +0 -0
- package/dist/chunk-TANR7L7E.js.gz +0 -0
- package/dist/{chunk-Q3DHYOLK.mjs → chunk-UV2HVMKZ.mjs} +1 -2
- package/dist/chunk-UV2HVMKZ.mjs.br +0 -0
- package/dist/chunk-UV2HVMKZ.mjs.gz +0 -0
- package/dist/{chunk-AMXSOQRH.js → chunk-VUVBSQLT.js} +408 -301
- package/dist/chunk-VUVBSQLT.js.br +0 -0
- package/dist/chunk-VUVBSQLT.js.gz +0 -0
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.br +2 -2
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +1 -1
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +42 -5
- package/dist/index.js +25 -25
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +66 -7
- package/dist/internals.js +82 -82
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer-canvas.css +2 -0
- package/dist/pptx-viewer-canvas.css.br +0 -0
- package/dist/pptx-viewer-canvas.css.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/{three.module-JPZUM7AI.mjs → three.module-EBJVANGB.mjs} +1 -1
- package/dist/three.module-EBJVANGB.mjs.br +0 -0
- package/dist/three.module-EBJVANGB.mjs.gz +0 -0
- package/dist/{three.module-RIUI7P3J.js → three.module-MBFHAT6M.js} +1 -1
- package/dist/three.module-MBFHAT6M.js.br +0 -0
- package/dist/three.module-MBFHAT6M.js.gz +0 -0
- package/dist/viewer/index.d.ts +44 -9
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/{y-webrtc-CCA4HVZZ.mjs → y-webrtc-2H7UYAQD.mjs} +1 -1
- package/dist/y-webrtc-2H7UYAQD.mjs.br +0 -0
- package/dist/y-webrtc-2H7UYAQD.mjs.gz +0 -0
- package/dist/{y-webrtc-MB5ZXFBA.js → y-webrtc-DVPQNFLL.js} +5 -5
- package/dist/y-webrtc-DVPQNFLL.js.br +0 -0
- package/dist/y-webrtc-DVPQNFLL.js.gz +0 -0
- package/dist/{y-websocket-JQQZVAMX.js → y-websocket-TN4OKPXQ.js} +1 -1
- package/dist/y-websocket-TN4OKPXQ.js.br +0 -0
- package/dist/y-websocket-TN4OKPXQ.js.gz +0 -0
- package/dist/{y-websocket-SCLLNICY.mjs → y-websocket-WORVRRQS.mjs} +1 -1
- package/dist/y-websocket-WORVRRQS.mjs.br +0 -0
- package/dist/y-websocket-WORVRRQS.mjs.gz +0 -0
- package/package.json +7 -5
- package/dist/AiChatPanel-TGZQBH3L.js.br +0 -0
- package/dist/AiChatPanel-TGZQBH3L.js.gz +0 -0
- package/dist/AiChatPanel-Z5VHI4WA.mjs.br +0 -0
- package/dist/AiChatPanel-Z5VHI4WA.mjs.gz +0 -0
- package/dist/Model3DScene-5HLXSIIK.js.br +0 -0
- package/dist/Model3DScene-5HLXSIIK.js.gz +0 -0
- package/dist/Model3DScene-MSC4LEKG.mjs.br +0 -0
- package/dist/Model3DScene-MSC4LEKG.mjs.gz +0 -0
- package/dist/chunk-2J3467IB.js.br +0 -0
- package/dist/chunk-2J3467IB.js.gz +0 -0
- package/dist/chunk-AMXSOQRH.js.br +0 -0
- package/dist/chunk-AMXSOQRH.js.gz +0 -0
- package/dist/chunk-CLHUOZSY.mjs.br +0 -0
- package/dist/chunk-CLHUOZSY.mjs.gz +0 -0
- package/dist/chunk-FBN7UFW2.mjs.br +0 -0
- package/dist/chunk-FBN7UFW2.mjs.gz +0 -0
- package/dist/chunk-Q3DHYOLK.mjs.br +0 -0
- package/dist/chunk-Q3DHYOLK.mjs.gz +0 -0
- package/dist/chunk-UQFIRJGG.mjs.br +0 -0
- package/dist/chunk-UQFIRJGG.mjs.gz +0 -0
- package/dist/chunk-VJZJESNT.js.br +0 -0
- package/dist/chunk-VJZJESNT.js.gz +0 -0
- package/dist/chunk-W2IMY5SY.js.br +0 -0
- package/dist/chunk-W2IMY5SY.js.gz +0 -0
- package/dist/three.module-JPZUM7AI.mjs.br +0 -0
- package/dist/three.module-JPZUM7AI.mjs.gz +0 -0
- package/dist/three.module-RIUI7P3J.js.br +0 -0
- package/dist/three.module-RIUI7P3J.js.gz +0 -0
- package/dist/y-webrtc-CCA4HVZZ.mjs.br +0 -0
- package/dist/y-webrtc-CCA4HVZZ.mjs.gz +0 -0
- package/dist/y-webrtc-MB5ZXFBA.js.br +0 -0
- package/dist/y-webrtc-MB5ZXFBA.js.gz +0 -0
- package/dist/y-websocket-JQQZVAMX.js.br +0 -0
- package/dist/y-websocket-JQQZVAMX.js.gz +0 -0
- package/dist/y-websocket-SCLLNICY.mjs.br +0 -0
- 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-
|
|
2
|
-
import './chunk-
|
|
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
|
|
4
|
-
require('./chunk-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|