pptx-react-viewer 2.11.1 → 2.12.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 +4 -0
- package/dist/{AiChatPanel-RMQIJDUJ.mjs → AiChatPanel-CGGUPVQX.mjs} +4 -4
- package/dist/AiChatPanel-CGGUPVQX.mjs.br +0 -0
- package/dist/AiChatPanel-CGGUPVQX.mjs.gz +0 -0
- package/dist/{AiChatPanel-E6W3EACA.js → AiChatPanel-UEFYTUJN.js} +23 -23
- package/dist/AiChatPanel-UEFYTUJN.js.br +0 -0
- package/dist/AiChatPanel-UEFYTUJN.js.gz +0 -0
- package/dist/{Model3DScene-U4B4NZJT.js → Model3DScene-QYXJNALP.js} +2 -2
- package/dist/{Model3DScene-U4B4NZJT.js.br → Model3DScene-QYXJNALP.js.br} +0 -0
- package/dist/Model3DScene-QYXJNALP.js.gz +0 -0
- package/dist/{Model3DScene-WHSHBMR5.mjs → Model3DScene-TU4NTHRM.mjs} +1 -1
- package/dist/Model3DScene-TU4NTHRM.mjs.br +0 -0
- package/dist/Model3DScene-TU4NTHRM.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-5S43UBRD.js → SurfaceChart3DScene-4VCO3DRP.js} +2 -2
- package/dist/SurfaceChart3DScene-4VCO3DRP.js.br +0 -0
- package/dist/SurfaceChart3DScene-4VCO3DRP.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-77JP5XH5.mjs → SurfaceChart3DScene-VTJBKUQY.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-77JP5XH5.mjs.br → SurfaceChart3DScene-VTJBKUQY.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-VTJBKUQY.mjs.gz +0 -0
- package/dist/{chunk-NJ4PTG4F.mjs → chunk-4GYNTY2G.mjs} +28 -48
- package/dist/chunk-4GYNTY2G.mjs.br +0 -0
- package/dist/chunk-4GYNTY2G.mjs.gz +0 -0
- package/dist/{chunk-PXYZFWDA.mjs → chunk-4SGXEGVL.mjs} +339 -256
- package/dist/chunk-4SGXEGVL.mjs.br +0 -0
- package/dist/chunk-4SGXEGVL.mjs.gz +0 -0
- package/dist/{chunk-IOVOQ6ZJ.js → chunk-BXAK3JFM.js} +301 -1
- package/dist/chunk-BXAK3JFM.js.br +0 -0
- package/dist/chunk-BXAK3JFM.js.gz +0 -0
- package/dist/{chunk-FV7HEYCX.mjs → chunk-CABQXGPI.mjs} +621 -70
- package/dist/chunk-CABQXGPI.mjs.br +0 -0
- package/dist/chunk-CABQXGPI.mjs.gz +0 -0
- package/dist/{chunk-IXBM3HWH.js → chunk-GBKIWNW6.js} +2047 -1964
- package/dist/chunk-GBKIWNW6.js.br +0 -0
- package/dist/chunk-GBKIWNW6.js.gz +0 -0
- package/dist/{chunk-FAP6OPLL.js → chunk-LE6YA5WB.js} +262 -296
- package/dist/chunk-LE6YA5WB.js.br +0 -0
- package/dist/chunk-LE6YA5WB.js.gz +0 -0
- package/dist/{chunk-HF6L2CTF.mjs → chunk-N3NKU7SC.mjs} +1 -1
- package/dist/chunk-N3NKU7SC.mjs.br +0 -0
- package/dist/{chunk-HF6L2CTF.mjs.gz → chunk-N3NKU7SC.mjs.gz} +0 -0
- package/dist/{chunk-QT6BPOZM.js → chunk-NUDH7TI2.js} +355 -375
- package/dist/chunk-NUDH7TI2.js.br +0 -0
- package/dist/chunk-NUDH7TI2.js.gz +0 -0
- package/dist/{chunk-KDJBWJJH.js → chunk-TDUDH7S4.js} +648 -71
- package/dist/chunk-TDUDH7S4.js.br +0 -0
- package/dist/chunk-TDUDH7S4.js.gz +0 -0
- package/dist/{chunk-RHR7GTDX.mjs → chunk-TEXIGSA6.mjs} +301 -1
- package/dist/chunk-TEXIGSA6.mjs.br +0 -0
- package/dist/chunk-TEXIGSA6.mjs.gz +0 -0
- package/dist/{chunk-X3SFCKAF.js → chunk-UIWY4XJT.js} +3 -3
- package/dist/chunk-UIWY4XJT.js.br +0 -0
- package/dist/chunk-UIWY4XJT.js.gz +0 -0
- package/dist/{chunk-DD54KUDG.mjs → chunk-YIPR3GKG.mjs} +24 -58
- package/dist/chunk-YIPR3GKG.mjs.br +0 -0
- package/dist/chunk-YIPR3GKG.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.js +36 -36
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.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/viewer/index.js +22 -22
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-E6W3EACA.js.br +0 -0
- package/dist/AiChatPanel-E6W3EACA.js.gz +0 -0
- package/dist/AiChatPanel-RMQIJDUJ.mjs.br +0 -0
- package/dist/AiChatPanel-RMQIJDUJ.mjs.gz +0 -0
- package/dist/Model3DScene-U4B4NZJT.js.gz +0 -0
- package/dist/Model3DScene-WHSHBMR5.mjs.br +0 -0
- package/dist/Model3DScene-WHSHBMR5.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-5S43UBRD.js.br +0 -0
- package/dist/SurfaceChart3DScene-5S43UBRD.js.gz +0 -0
- package/dist/SurfaceChart3DScene-77JP5XH5.mjs.gz +0 -0
- package/dist/chunk-DD54KUDG.mjs.br +0 -0
- package/dist/chunk-DD54KUDG.mjs.gz +0 -0
- package/dist/chunk-FAP6OPLL.js.br +0 -0
- package/dist/chunk-FAP6OPLL.js.gz +0 -0
- package/dist/chunk-FV7HEYCX.mjs.br +0 -0
- package/dist/chunk-FV7HEYCX.mjs.gz +0 -0
- package/dist/chunk-HF6L2CTF.mjs.br +0 -0
- package/dist/chunk-IOVOQ6ZJ.js.br +0 -0
- package/dist/chunk-IOVOQ6ZJ.js.gz +0 -0
- package/dist/chunk-IXBM3HWH.js.br +0 -0
- package/dist/chunk-IXBM3HWH.js.gz +0 -0
- package/dist/chunk-KDJBWJJH.js.br +0 -0
- package/dist/chunk-KDJBWJJH.js.gz +0 -0
- package/dist/chunk-NJ4PTG4F.mjs.br +0 -0
- package/dist/chunk-NJ4PTG4F.mjs.gz +0 -0
- package/dist/chunk-PXYZFWDA.mjs.br +0 -0
- package/dist/chunk-PXYZFWDA.mjs.gz +0 -0
- package/dist/chunk-QT6BPOZM.js.br +0 -0
- package/dist/chunk-QT6BPOZM.js.gz +0 -0
- package/dist/chunk-RHR7GTDX.mjs.br +0 -0
- package/dist/chunk-RHR7GTDX.mjs.gz +0 -0
- package/dist/chunk-X3SFCKAF.js.br +0 -0
- package/dist/chunk-X3SFCKAF.js.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
|
|
5
5
|
by [git-cliff](https://git-cliff.org); do not edit it by hand.
|
|
6
6
|
|
|
7
|
+
## [2.12.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.12.0) - 2026-08-01
|
|
8
|
+
|
|
9
|
+
## [2.11.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.11.1) - 2026-07-31
|
|
10
|
+
|
|
7
11
|
## [2.11.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.11.0) - 2026-07-31
|
|
8
12
|
|
|
9
13
|
## [2.10.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.10.0) - 2026-07-31
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-N3NKU7SC.mjs';
|
|
2
|
+
import { cn } from './chunk-YIPR3GKG.mjs';
|
|
3
|
+
import './chunk-TEXIGSA6.mjs';
|
|
4
|
+
import './chunk-CABQXGPI.mjs';
|
|
5
5
|
import './chunk-XGB3TDIC.mjs';
|
|
6
6
|
import { useMemo, useRef, useState, useEffect, useReducer, useCallback } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkUIWY4XJT_js = require('./chunk-UIWY4XJT.js');
|
|
4
|
+
var chunkLE6YA5WB_js = require('./chunk-LE6YA5WB.js');
|
|
5
|
+
require('./chunk-BXAK3JFM.js');
|
|
6
|
+
require('./chunk-TDUDH7S4.js');
|
|
7
7
|
require('./chunk-4VNS5WPM.js');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
@@ -30,7 +30,7 @@ function useAiChat(bridge, config) {
|
|
|
30
30
|
setInitError(void 0);
|
|
31
31
|
void (async () => {
|
|
32
32
|
try {
|
|
33
|
-
const available = await
|
|
33
|
+
const available = await chunkUIWY4XJT_js.isAiAvailable();
|
|
34
34
|
if (cancelled) {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
@@ -38,7 +38,7 @@ function useAiChat(bridge, config) {
|
|
|
38
38
|
setState("unavailable");
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
const built = await
|
|
41
|
+
const built = await chunkUIWY4XJT_js.createAiChatSession(bridge, configRef.current);
|
|
42
42
|
if (cancelled) {
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
@@ -144,7 +144,7 @@ function withDeckContext(inner, bridge, strategy) {
|
|
|
144
144
|
}
|
|
145
145
|
let context = "";
|
|
146
146
|
try {
|
|
147
|
-
context = await
|
|
147
|
+
context = await chunkUIWY4XJT_js.buildDeckContext(bridge, { strategy, focus: {} });
|
|
148
148
|
} catch {
|
|
149
149
|
context = "";
|
|
150
150
|
}
|
|
@@ -207,7 +207,7 @@ function useAiConversation(session, config, bridge, options = {}) {
|
|
|
207
207
|
continue;
|
|
208
208
|
}
|
|
209
209
|
seen.add(call.toolCallId);
|
|
210
|
-
onToolTargetRef.current?.(
|
|
210
|
+
onToolTargetRef.current?.(chunkUIWY4XJT_js.toolCanvasTarget(call.toolName, call.input));
|
|
211
211
|
}
|
|
212
212
|
}, [chat.messages]);
|
|
213
213
|
const send = react.useCallback(
|
|
@@ -283,7 +283,7 @@ function deriveTitle(messages) {
|
|
|
283
283
|
}
|
|
284
284
|
function useAiHistory(input) {
|
|
285
285
|
const { deckId, messages, setMessages } = input;
|
|
286
|
-
const store = react.useMemo(() => input.store ??
|
|
286
|
+
const store = react.useMemo(() => input.store ?? chunkUIWY4XJT_js.createChatHistoryStore(), [input.store]);
|
|
287
287
|
const [activeChatId, setActiveChatId] = react.useState(newChatId);
|
|
288
288
|
const [chats, setChats] = react.useState([]);
|
|
289
289
|
const createdAtRef = react.useRef(Date.now());
|
|
@@ -426,7 +426,7 @@ function AiComposer({
|
|
|
426
426
|
disabled: value.trim().length === 0,
|
|
427
427
|
title: t("pptx.ai.send"),
|
|
428
428
|
"aria-label": t("pptx.ai.send"),
|
|
429
|
-
className:
|
|
429
|
+
className: chunkLE6YA5WB_js.cn(
|
|
430
430
|
"shrink-0 rounded-sm p-1.5 transition-colors",
|
|
431
431
|
value.trim().length === 0 ? "text-muted-foreground/50" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
432
432
|
),
|
|
@@ -452,15 +452,15 @@ function AiFocusBar({
|
|
|
452
452
|
onClearPicks
|
|
453
453
|
}) {
|
|
454
454
|
const { t } = reactI18next.useTranslation();
|
|
455
|
-
const chips =
|
|
456
|
-
const twoTables =
|
|
455
|
+
const chips = chunkUIWY4XJT_js.focusTargetChips(targets, slides);
|
|
456
|
+
const twoTables = chunkUIWY4XJT_js.isTwoTableFocus(targets, slides);
|
|
457
457
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border bg-secondary/30", children: [
|
|
458
458
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1 px-2.5 py-1.5", children: [
|
|
459
459
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: t("pptx.ai.focusScope") }),
|
|
460
460
|
chips.map((chip) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
461
461
|
"span",
|
|
462
462
|
{
|
|
463
|
-
className:
|
|
463
|
+
className: chunkLE6YA5WB_js.cn(
|
|
464
464
|
"inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
|
|
465
465
|
hasPicks || isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground"
|
|
466
466
|
),
|
|
@@ -493,7 +493,7 @@ function AiFocusBar({
|
|
|
493
493
|
title: t("pptx.ai.pickElement"),
|
|
494
494
|
"aria-label": t("pptx.ai.pickAria"),
|
|
495
495
|
"aria-pressed": pickMode,
|
|
496
|
-
className:
|
|
496
|
+
className: chunkLE6YA5WB_js.cn(
|
|
497
497
|
"rounded-sm p-1",
|
|
498
498
|
pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
|
|
499
499
|
),
|
|
@@ -572,7 +572,7 @@ function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
|
|
|
572
572
|
{
|
|
573
573
|
type: "button",
|
|
574
574
|
onClick: () => onResume(chat.id),
|
|
575
|
-
className:
|
|
575
|
+
className: chunkLE6YA5WB_js.cn(
|
|
576
576
|
"flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent",
|
|
577
577
|
chat.id === activeChatId && "bg-accent/60"
|
|
578
578
|
),
|
|
@@ -727,26 +727,26 @@ function AiToolCallCard({ part }) {
|
|
|
727
727
|
const failed = part.state === "output-error";
|
|
728
728
|
const done = part.state === "output-available";
|
|
729
729
|
const running = !failed && !done;
|
|
730
|
-
const activity =
|
|
730
|
+
const activity = chunkUIWY4XJT_js.describeToolActivity(part.toolName, part.input, running ? "present" : "past");
|
|
731
731
|
const Icon = ICONS[activity.icon] ?? lu.LuWrench;
|
|
732
|
-
const rawSummary =
|
|
732
|
+
const rawSummary = chunkUIWY4XJT_js.summarizeToolArgs(part.input);
|
|
733
733
|
const statusLabel = failed ? t("pptx.ai.toolFailed") : done ? t("pptx.ai.toolDone") : t("pptx.ai.toolRunning");
|
|
734
734
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[12px]", children: [
|
|
735
735
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
736
736
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
737
737
|
Icon,
|
|
738
738
|
{
|
|
739
|
-
className:
|
|
739
|
+
className: chunkLE6YA5WB_js.cn(
|
|
740
740
|
"w-3.5 h-3.5 shrink-0",
|
|
741
741
|
failed ? "text-destructive" : "text-muted-foreground"
|
|
742
742
|
)
|
|
743
743
|
}
|
|
744
744
|
),
|
|
745
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
745
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkLE6YA5WB_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
|
|
746
746
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
747
747
|
"span",
|
|
748
748
|
{
|
|
749
|
-
className:
|
|
749
|
+
className: chunkLE6YA5WB_js.cn(
|
|
750
750
|
"ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]",
|
|
751
751
|
failed ? "bg-destructive/15 text-destructive" : done ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
752
752
|
),
|
|
@@ -763,7 +763,7 @@ function AiToolCallCard({ part }) {
|
|
|
763
763
|
rawSummary && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group mt-0.5 pl-5", children: [
|
|
764
764
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer list-none text-[10px] text-muted-foreground/70 hover:text-muted-foreground", children: t("pptx.ai.toolDetails") }),
|
|
765
765
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-0.5 break-words font-mono text-[10px] text-muted-foreground/80", children: [
|
|
766
|
-
|
|
766
|
+
chunkUIWY4XJT_js.toolLabel(part.toolName),
|
|
767
767
|
": ",
|
|
768
768
|
rawSummary
|
|
769
769
|
] })
|
|
@@ -794,7 +794,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
794
794
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
795
795
|
"div",
|
|
796
796
|
{
|
|
797
|
-
className:
|
|
797
|
+
className: chunkLE6YA5WB_js.cn(
|
|
798
798
|
"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
|
|
799
799
|
isUser ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary"
|
|
800
800
|
),
|
|
@@ -841,7 +841,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
841
841
|
}
|
|
842
842
|
function AiProposalCard({ proposal, onAccept, onReject }) {
|
|
843
843
|
const { t } = reactI18next.useTranslation();
|
|
844
|
-
const lines = proposal.summary.map(
|
|
844
|
+
const lines = proposal.summary.map(chunkUIWY4XJT_js.humanizeDiffLine);
|
|
845
845
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md border border-primary/40 bg-primary/5 p-2.5", children: [
|
|
846
846
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary", children: t("pptx.ai.proposedChange") }),
|
|
847
847
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[12px] font-medium text-foreground", children: proposal.label }),
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTDUDH7S4_js = require('./chunk-TDUDH7S4.js');
|
|
4
4
|
require('./chunk-4VNS5WPM.js');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -14,7 +14,7 @@ function Model3DScene({ modelUrl, interactive, width, height }) {
|
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
16
|
let disposed = false;
|
|
17
|
-
void
|
|
17
|
+
void chunkTDUDH7S4_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
|
|
18
18
|
if (disposed) {
|
|
19
19
|
handle.dispose();
|
|
20
20
|
} else {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTDUDH7S4_js = require('./chunk-TDUDH7S4.js');
|
|
4
4
|
require('./chunk-4VNS5WPM.js');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -25,7 +25,7 @@ function SurfaceChart3DScene({
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
let disposed = false;
|
|
28
|
-
void
|
|
28
|
+
void chunkTDUDH7S4_js.mountSurfaceChart3D(container, {
|
|
29
29
|
cols,
|
|
30
30
|
rows,
|
|
31
31
|
heightMap,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, UNGROUPED_SECTION_ID, stopAllPersistentAudio, buildSaveSlides, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, executeMediaCommand, buildPdfFromImageData, buildNotesPdf, EMU_PER_PX, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-
|
|
2
|
-
import { translationsEn } from './chunk-
|
|
3
|
-
import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, clampZoomScale, zoomInScale, zoomOutScale, PresentationAnimationController, computeEntranceAnimationDelay, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, buildMorphTransitionPlan, morphOptionToMode, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, buildInitialGuides, EncryptedFileError, saveAutosaveSnapshot, isTemplateElementId, hasShapeProperties, hasTextProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, downloadBlob, sanitizeDownloadFilename, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, mayLeaveSlideShow, remapTextToSegments, guidePxToEmu, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, derivePresenceList, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildThemeColorMap, reResolveSlideColors, createPresentationSessionId, resolveTransitionDurationMs,
|
|
1
|
+
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, UNGROUPED_SECTION_ID, stopAllPersistentAudio, buildSaveSlides, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, executeMediaCommand, buildPdfFromImageData, buildNotesPdf, EMU_PER_PX, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-YIPR3GKG.mjs';
|
|
2
|
+
import { translationsEn } from './chunk-TEXIGSA6.mjs';
|
|
3
|
+
import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, clampZoomScale, zoomInScale, zoomOutScale, PresentationAnimationController, computeEntranceAnimationDelay, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, buildMorphTransitionPlan, morphOptionToMode, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, buildInitialGuides, EncryptedFileError, saveAutosaveSnapshot, isTemplateElementId, hasShapeProperties, hasTextProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, downloadBlob, sanitizeDownloadFilename, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, mayLeaveSlideShow, remapTextToSegments, guidePxToEmu, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, derivePresenceList, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildThemeColorMap, reResolveSlideColors, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, resolveShowSlideIndexes, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, buildPrintHtmlDocument, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, elementActionToPptxAction, buildSmartArtPresetData, computeSnapToShape, publishLiveGeometry, computeMarqueeHitIds, mergeAdditiveSelection, applyResize, snapBoxToGrid, applyMotionPathPreset } from './chunk-CABQXGPI.mjs';
|
|
4
4
|
import { useRef, useState, useEffect, useCallback, useMemo, useSyncExternalStore, useImperativeHandle } from 'react';
|
|
5
5
|
import JSZip from 'jszip';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
@@ -496,7 +496,7 @@ function useEditorHistory(input) {
|
|
|
496
496
|
const [canRedo, setCanRedo] = useState(false);
|
|
497
497
|
const [undoLabel, setUndoLabel] = useState(void 0);
|
|
498
498
|
const [redoLabel, setRedoLabel] = useState(void 0);
|
|
499
|
-
const [
|
|
499
|
+
const [editCommitNonce, setEditCommitNonce] = useState(0);
|
|
500
500
|
const updateHistoryAvailability = useCallback(() => {
|
|
501
501
|
setCanUndo(historyPastRef.current.length > 0);
|
|
502
502
|
setCanRedo(historyFutureRef.current.length > 0);
|
|
@@ -551,7 +551,7 @@ function useEditorHistory(input) {
|
|
|
551
551
|
}, 0);
|
|
552
552
|
}, []);
|
|
553
553
|
const markDirty = useCallback(() => {
|
|
554
|
-
|
|
554
|
+
setEditCommitNonce((previous) => previous + 1);
|
|
555
555
|
}, []);
|
|
556
556
|
const handleUndo = useCallback(() => {
|
|
557
557
|
const previousSnapshot = historyPastRef.current.pop();
|
|
@@ -631,7 +631,7 @@ function useEditorHistory(input) {
|
|
|
631
631
|
if (hasActivePointerInteraction()) {
|
|
632
632
|
return;
|
|
633
633
|
}
|
|
634
|
-
const cheapHash = `${pointerCommitNonce}|${slides.length}|${activeSlideIndex}|${canvasSize.width}x${canvasSize.height}|${slides.map((s) => `${s.id}:${s.elements.length}`).join("/")}`;
|
|
634
|
+
const cheapHash = `${pointerCommitNonce}|${editCommitNonce}|${slides.length}|${activeSlideIndex}|${canvasSize.width}x${canvasSize.height}|${slides.map((s) => `${s.id}:${s.elements.length}`).join("/")}`;
|
|
635
635
|
if (cheapHash === lastCheapHashRef.current) {
|
|
636
636
|
return;
|
|
637
637
|
}
|
|
@@ -663,6 +663,7 @@ function useEditorHistory(input) {
|
|
|
663
663
|
buildHistorySnapshot,
|
|
664
664
|
canvasSize.height,
|
|
665
665
|
canvasSize.width,
|
|
666
|
+
editCommitNonce,
|
|
666
667
|
error,
|
|
667
668
|
hasActivePointerInteraction,
|
|
668
669
|
loading,
|
|
@@ -1781,43 +1782,22 @@ function useRehearsalTimings(input) {
|
|
|
1781
1782
|
|
|
1782
1783
|
// src/viewer/hooks/presentation-mode/presentation-actions.ts
|
|
1783
1784
|
function handlePresentationActionImpl(action, deps) {
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
deps.
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
if (actionStr.includes("hlinkshowjump")) {
|
|
1799
|
-
const lower = actionStr.toLowerCase();
|
|
1800
|
-
if (lower.includes("nextslide")) {
|
|
1801
|
-
deps.movePresentationSlide(1);
|
|
1802
|
-
} else if (lower.includes("previousslide")) {
|
|
1803
|
-
deps.movePresentationSlide(-1);
|
|
1804
|
-
} else if (lower.includes("firstslide")) {
|
|
1805
|
-
deps.navigateToSlide(0);
|
|
1806
|
-
} else if (lower.includes("lastslide")) {
|
|
1807
|
-
deps.navigateToSlide(deps.slidesLength - 1);
|
|
1808
|
-
} else if (lower.includes("endshow")) {
|
|
1809
|
-
deps.onSetMode("edit");
|
|
1810
|
-
}
|
|
1811
|
-
return;
|
|
1812
|
-
}
|
|
1813
|
-
if (actionStr.includes("hlinksldjump")) {
|
|
1814
|
-
return;
|
|
1815
|
-
}
|
|
1816
|
-
if (action.url && !actionStr.includes("hlinksldjump")) {
|
|
1817
|
-
if (isUrlSafe(action.url)) {
|
|
1818
|
-
window.open(action.url, "_blank", "noopener,noreferrer");
|
|
1785
|
+
runPresentationAction(
|
|
1786
|
+
action,
|
|
1787
|
+
{ slideCount: deps.slidesLength },
|
|
1788
|
+
{
|
|
1789
|
+
goToSlide: (slideIndex) => {
|
|
1790
|
+
deps.navigateToSlide(slideIndex);
|
|
1791
|
+
},
|
|
1792
|
+
move: (direction) => {
|
|
1793
|
+
deps.movePresentationSlide(direction);
|
|
1794
|
+
},
|
|
1795
|
+
endShow: () => {
|
|
1796
|
+
deps.onSetMode("edit");
|
|
1797
|
+
},
|
|
1798
|
+
playSound: deps.onPlayActionSound ? (soundPath) => deps.onPlayActionSound?.(soundPath) : void 0
|
|
1819
1799
|
}
|
|
1820
|
-
|
|
1800
|
+
);
|
|
1821
1801
|
}
|
|
1822
1802
|
|
|
1823
1803
|
// src/viewer/hooks/presentation-mode/slide-transition.ts
|
|
@@ -2144,7 +2124,7 @@ function usePresentationMode(input) {
|
|
|
2144
2124
|
const [allSlidesOpen, setAllSlidesOpen] = useState(false);
|
|
2145
2125
|
const [endOfShowVisible, setEndOfShowVisible] = useState(false);
|
|
2146
2126
|
const [presentationStartTime, setPresentationStartTime] = useState(null);
|
|
2147
|
-
const
|
|
2127
|
+
const showGuard = useMemo(() => createPresenterShowGuard(), []);
|
|
2148
2128
|
const {
|
|
2149
2129
|
presentationAnimations,
|
|
2150
2130
|
presentationElementStates,
|
|
@@ -2296,7 +2276,7 @@ function usePresentationMode(input) {
|
|
|
2296
2276
|
}, [onSetMode, setRehearsing]);
|
|
2297
2277
|
const togglePresenterView = useCallback(() => {
|
|
2298
2278
|
if (!presenterMode) {
|
|
2299
|
-
|
|
2279
|
+
showGuard.expectAudienceBounce();
|
|
2300
2280
|
try {
|
|
2301
2281
|
if (document.fullscreenElement) {
|
|
2302
2282
|
void document.exitFullscreen().catch(() => {
|
|
@@ -2319,7 +2299,7 @@ function usePresentationMode(input) {
|
|
|
2319
2299
|
} catch {
|
|
2320
2300
|
}
|
|
2321
2301
|
}
|
|
2322
|
-
}, [presenterMode, presentationStartTime, containerRef]);
|
|
2302
|
+
}, [presenterMode, presentationStartTime, containerRef, showGuard]);
|
|
2323
2303
|
usePresentationKeyboard({
|
|
2324
2304
|
mode,
|
|
2325
2305
|
movePresentationSlide,
|
|
@@ -2383,8 +2363,7 @@ function usePresentationMode(input) {
|
|
|
2383
2363
|
}
|
|
2384
2364
|
let wasFullscreen = Boolean(document.fullscreenElement);
|
|
2385
2365
|
const handleFullscreenChange = () => {
|
|
2386
|
-
if (
|
|
2387
|
-
switchingToPresenterRef.current = false;
|
|
2366
|
+
if (showGuard.classifyFullscreenExit() === "restore-show") {
|
|
2388
2367
|
wasFullscreen = Boolean(document.fullscreenElement);
|
|
2389
2368
|
return;
|
|
2390
2369
|
}
|
|
@@ -2409,7 +2388,8 @@ function usePresentationMode(input) {
|
|
|
2409
2388
|
rehearsing,
|
|
2410
2389
|
recordCurrentSlideTime,
|
|
2411
2390
|
presentationSlideIndex,
|
|
2412
|
-
setShowRehearsalSummary
|
|
2391
|
+
setShowRehearsalSummary,
|
|
2392
|
+
showGuard
|
|
2413
2393
|
]);
|
|
2414
2394
|
useEffect(() => {
|
|
2415
2395
|
const timersRef = presentationTimersRef;
|
|
Binary file
|
|
Binary file
|