pptx-react-viewer 2.16.2 → 2.16.4
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 +14 -0
- package/dist/{AiChatPanel-WJXPCHQK.mjs → AiChatPanel-7DDN4QUA.mjs} +4 -4
- package/dist/AiChatPanel-7DDN4QUA.mjs.br +0 -0
- package/dist/AiChatPanel-7DDN4QUA.mjs.gz +0 -0
- package/dist/{AiChatPanel-MCGNCS7Q.js → AiChatPanel-KEORKCTT.js} +23 -23
- package/dist/AiChatPanel-KEORKCTT.js.br +0 -0
- package/dist/AiChatPanel-KEORKCTT.js.gz +0 -0
- package/dist/{Model3DScene-IXW2AKAU.mjs → Model3DScene-DEAQMMUS.mjs} +1 -1
- package/dist/{Model3DScene-IXW2AKAU.mjs.br → Model3DScene-DEAQMMUS.mjs.br} +0 -0
- package/dist/Model3DScene-DEAQMMUS.mjs.gz +0 -0
- package/dist/{Model3DScene-Q2DTGVQ7.js → Model3DScene-SBUYEWHL.js} +2 -2
- package/dist/Model3DScene-SBUYEWHL.js.br +0 -0
- package/dist/Model3DScene-SBUYEWHL.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-AD43LAOO.js → SurfaceChart3DScene-I5D54YQ3.js} +2 -2
- package/dist/SurfaceChart3DScene-I5D54YQ3.js.br +0 -0
- package/dist/SurfaceChart3DScene-I5D54YQ3.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-MODEHQ6G.mjs → SurfaceChart3DScene-TXGS2PBK.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-MODEHQ6G.mjs.br → SurfaceChart3DScene-TXGS2PBK.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-TXGS2PBK.mjs.gz +0 -0
- package/dist/{audience-content-store-DaABTAcQ.d.ts → audience-content-store-BvqKy7Hf.d.ts} +2 -2
- package/dist/{audience-content-store-DaABTAcQ.d.ts.map → audience-content-store-BvqKy7Hf.d.ts.map} +1 -1
- package/dist/{chunk-MDFCBYEM.mjs → chunk-23WSCMWN.mjs} +133 -68
- package/dist/chunk-23WSCMWN.mjs.br +0 -0
- package/dist/chunk-23WSCMWN.mjs.gz +0 -0
- package/dist/{chunk-5YV26HMJ.mjs → chunk-5IUEPQTK.mjs} +1 -0
- package/dist/chunk-5IUEPQTK.mjs.br +0 -0
- package/dist/chunk-5IUEPQTK.mjs.gz +0 -0
- package/dist/{chunk-3ISYPBSX.js → chunk-DVZF4ARG.js} +1 -0
- package/dist/chunk-DVZF4ARG.js.br +0 -0
- package/dist/chunk-DVZF4ARG.js.gz +0 -0
- package/dist/{chunk-OYF6ISXZ.mjs → chunk-DWIIYEOG.mjs} +4 -4
- package/dist/chunk-DWIIYEOG.mjs.br +0 -0
- package/dist/{chunk-OYF6ISXZ.mjs.gz → chunk-DWIIYEOG.mjs.gz} +0 -0
- package/dist/{chunk-JV6DI7AK.js → chunk-FQ3FTNKV.js} +1062 -1062
- package/dist/chunk-FQ3FTNKV.js.br +0 -0
- package/dist/chunk-FQ3FTNKV.js.gz +0 -0
- package/dist/{chunk-3OYWYONZ.mjs → chunk-FXGO5KLU.mjs} +3 -3
- package/dist/chunk-FXGO5KLU.mjs.br +0 -0
- package/dist/chunk-FXGO5KLU.mjs.gz +0 -0
- package/dist/{chunk-LDD2UVCV.mjs → chunk-GSAOP4Z4.mjs} +10 -10
- package/dist/chunk-GSAOP4Z4.mjs.br +0 -0
- package/dist/chunk-GSAOP4Z4.mjs.gz +0 -0
- package/dist/{chunk-CIK6XUOH.js → chunk-GZ2V3PWN.js} +3 -3
- package/dist/chunk-GZ2V3PWN.js.br +0 -0
- package/dist/chunk-GZ2V3PWN.js.gz +0 -0
- package/dist/{chunk-P6KM7RO5.js → chunk-HAQDKQ52.js} +266 -266
- package/dist/chunk-HAQDKQ52.js.br +0 -0
- package/dist/chunk-HAQDKQ52.js.gz +0 -0
- package/dist/{chunk-QI2JCXTH.mjs → chunk-J4QZVO3S.mjs} +1 -1
- package/dist/chunk-J4QZVO3S.mjs.br +0 -0
- package/dist/chunk-J4QZVO3S.mjs.gz +0 -0
- package/dist/{chunk-UWYHBCLM.mjs → chunk-LLTUDPRE.mjs} +18 -8
- package/dist/chunk-LLTUDPRE.mjs.br +0 -0
- package/dist/chunk-LLTUDPRE.mjs.gz +0 -0
- package/dist/{chunk-4GX347MG.js → chunk-MZ47MV52.js} +133 -68
- package/dist/chunk-MZ47MV52.js.br +0 -0
- package/dist/chunk-MZ47MV52.js.gz +0 -0
- package/dist/{chunk-PYV6FIYK.js → chunk-NB7M4XBG.js} +38 -38
- package/dist/chunk-NB7M4XBG.js.br +0 -0
- package/dist/chunk-NB7M4XBG.js.gz +0 -0
- package/dist/{chunk-Z4CS2ZYN.mjs → chunk-PLBS7OL2.mjs} +3 -3
- package/dist/chunk-PLBS7OL2.mjs.br +0 -0
- package/dist/chunk-PLBS7OL2.mjs.gz +0 -0
- package/dist/{chunk-NKE64XVV.js → chunk-RBQUSVYR.js} +361 -351
- package/dist/chunk-RBQUSVYR.js.br +0 -0
- package/dist/chunk-RBQUSVYR.js.gz +0 -0
- package/dist/{chunk-MMFM7JRT.js → chunk-ZYQT7I5C.js} +4 -4
- package/dist/chunk-ZYQT7I5C.js.br +0 -0
- package/dist/chunk-ZYQT7I5C.js.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 +41 -41
- 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 +30 -1
- 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/viewer/index.d.ts +1 -1
- package/dist/viewer/index.js +27 -27
- 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/dist/{y-webrtc-DGVURJIF.mjs → y-webrtc-7DLWG3LJ.mjs} +5 -5
- package/dist/y-webrtc-7DLWG3LJ.mjs.br +0 -0
- package/dist/y-webrtc-7DLWG3LJ.mjs.gz +0 -0
- package/dist/{y-webrtc-YN53KW3J.js → y-webrtc-TAJBJIKH.js} +107 -107
- package/dist/y-webrtc-TAJBJIKH.js.br +0 -0
- package/dist/y-webrtc-TAJBJIKH.js.gz +0 -0
- package/dist/{y-websocket-P5LTAJ5T.mjs → y-websocket-DCTJ76B7.mjs} +4 -4
- package/dist/y-websocket-DCTJ76B7.mjs.br +0 -0
- package/dist/y-websocket-DCTJ76B7.mjs.gz +0 -0
- package/dist/{y-websocket-HZCIQLM6.js → y-websocket-DQLOWGV6.js} +81 -81
- package/dist/y-websocket-DQLOWGV6.js.br +0 -0
- package/dist/y-websocket-DQLOWGV6.js.gz +0 -0
- package/dist/{yjs-FKGX4QHS.mjs → yjs-4ED7E5CZ.mjs} +1 -1
- package/dist/yjs-4ED7E5CZ.mjs.br +0 -0
- package/dist/yjs-4ED7E5CZ.mjs.gz +0 -0
- package/dist/{yjs-HBLSEMHP.js → yjs-OWUA3UHD.js} +104 -104
- package/dist/yjs-OWUA3UHD.js.br +0 -0
- package/dist/yjs-OWUA3UHD.js.gz +0 -0
- package/package.json +7 -7
- package/dist/AiChatPanel-MCGNCS7Q.js.br +0 -0
- package/dist/AiChatPanel-MCGNCS7Q.js.gz +0 -0
- package/dist/AiChatPanel-WJXPCHQK.mjs.br +0 -0
- package/dist/AiChatPanel-WJXPCHQK.mjs.gz +0 -0
- package/dist/Model3DScene-IXW2AKAU.mjs.gz +0 -0
- package/dist/Model3DScene-Q2DTGVQ7.js.br +0 -0
- package/dist/Model3DScene-Q2DTGVQ7.js.gz +0 -0
- package/dist/SurfaceChart3DScene-AD43LAOO.js.br +0 -0
- package/dist/SurfaceChart3DScene-AD43LAOO.js.gz +0 -0
- package/dist/SurfaceChart3DScene-MODEHQ6G.mjs.gz +0 -0
- package/dist/chunk-3ISYPBSX.js.br +0 -0
- package/dist/chunk-3ISYPBSX.js.gz +0 -0
- package/dist/chunk-3OYWYONZ.mjs.br +0 -0
- package/dist/chunk-3OYWYONZ.mjs.gz +0 -0
- package/dist/chunk-4GX347MG.js.br +0 -0
- package/dist/chunk-4GX347MG.js.gz +0 -0
- package/dist/chunk-5YV26HMJ.mjs.br +0 -0
- package/dist/chunk-5YV26HMJ.mjs.gz +0 -0
- package/dist/chunk-CIK6XUOH.js.br +0 -0
- package/dist/chunk-CIK6XUOH.js.gz +0 -0
- package/dist/chunk-JV6DI7AK.js.br +0 -0
- package/dist/chunk-JV6DI7AK.js.gz +0 -0
- package/dist/chunk-LDD2UVCV.mjs.br +0 -0
- package/dist/chunk-LDD2UVCV.mjs.gz +0 -0
- package/dist/chunk-MDFCBYEM.mjs.br +0 -0
- package/dist/chunk-MDFCBYEM.mjs.gz +0 -0
- package/dist/chunk-MMFM7JRT.js.br +0 -0
- package/dist/chunk-MMFM7JRT.js.gz +0 -0
- package/dist/chunk-NKE64XVV.js.br +0 -0
- package/dist/chunk-NKE64XVV.js.gz +0 -0
- package/dist/chunk-OYF6ISXZ.mjs.br +0 -0
- package/dist/chunk-P6KM7RO5.js.br +0 -0
- package/dist/chunk-P6KM7RO5.js.gz +0 -0
- package/dist/chunk-PYV6FIYK.js.br +0 -0
- package/dist/chunk-PYV6FIYK.js.gz +0 -0
- package/dist/chunk-QI2JCXTH.mjs.br +0 -0
- package/dist/chunk-QI2JCXTH.mjs.gz +0 -0
- package/dist/chunk-UWYHBCLM.mjs.br +0 -0
- package/dist/chunk-UWYHBCLM.mjs.gz +0 -0
- package/dist/chunk-Z4CS2ZYN.mjs.br +0 -0
- package/dist/chunk-Z4CS2ZYN.mjs.gz +0 -0
- package/dist/y-webrtc-DGVURJIF.mjs.br +0 -0
- package/dist/y-webrtc-DGVURJIF.mjs.gz +0 -0
- package/dist/y-webrtc-YN53KW3J.js.br +0 -0
- package/dist/y-webrtc-YN53KW3J.js.gz +0 -0
- package/dist/y-websocket-HZCIQLM6.js.br +0 -0
- package/dist/y-websocket-HZCIQLM6.js.gz +0 -0
- package/dist/y-websocket-P5LTAJ5T.mjs.br +0 -0
- package/dist/y-websocket-P5LTAJ5T.mjs.gz +0 -0
- package/dist/yjs-FKGX4QHS.mjs.br +0 -0
- package/dist/yjs-FKGX4QHS.mjs.gz +0 -0
- package/dist/yjs-HBLSEMHP.js.br +0 -0
- package/dist/yjs-HBLSEMHP.js.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ 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.16.3](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.16.3) - 2026-08-10
|
|
8
|
+
|
|
9
|
+
### Dependencies
|
|
10
|
+
|
|
11
|
+
- **deps:** Update dompurify requirement from ^3.4.12 to ^3.4.13 ([#151](https://github.com/ChristopherVR/pptx-viewer/issues/151)) (by @dependabot[bot]) ([7b975ff](https://github.com/ChristopherVR/pptx-viewer/commit/7b975ff73403916341fd8a6192fb6fd6c88fdc17))
|
|
12
|
+
- **deps:** Update yjs requirement from ^13.6.31 to ^13.6.32 ([#152](https://github.com/ChristopherVR/pptx-viewer/issues/152)) (by @dependabot[bot]) ([456fdb8](https://github.com/ChristopherVR/pptx-viewer/commit/456fdb8493487ab3e346714755239a90698f6b4d))
|
|
13
|
+
- **deps:** Bump @ai-sdk/react from 4.0.61 to 4.0.59 ([#155](https://github.com/ChristopherVR/pptx-viewer/issues/155)) (by @dependabot[bot]) ([e1d0140](https://github.com/ChristopherVR/pptx-viewer/commit/e1d0140efc316b4266032eb5687714d6af4900c2))
|
|
14
|
+
|
|
15
|
+
### Chores
|
|
16
|
+
|
|
17
|
+
- **deps-dev:** Bump the minor-and-patch group with 2 updates ([#150](https://github.com/ChristopherVR/pptx-viewer/issues/150)) (by @dependabot[bot]) ([ab75bf1](https://github.com/ChristopherVR/pptx-viewer/commit/ab75bf10a96bb2a0da6e963a5b6b8634e4f73d5b))
|
|
18
|
+
|
|
19
|
+
## [2.16.2](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.16.2) - 2026-08-08
|
|
20
|
+
|
|
7
21
|
## [2.16.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.16.1) - 2026-08-07
|
|
8
22
|
|
|
9
23
|
## [2.16.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.16.0) - 2026-08-07
|
|
@@ -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-J4QZVO3S.mjs';
|
|
2
|
+
import { cn } from './chunk-PLBS7OL2.mjs';
|
|
3
|
+
import './chunk-5IUEPQTK.mjs';
|
|
4
|
+
import './chunk-23WSCMWN.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 chunkGZ2V3PWN_js = require('./chunk-GZ2V3PWN.js');
|
|
4
|
+
var chunkHAQDKQ52_js = require('./chunk-HAQDKQ52.js');
|
|
5
|
+
require('./chunk-DVZF4ARG.js');
|
|
6
|
+
require('./chunk-MZ47MV52.js');
|
|
7
7
|
require('./chunk-4VNS5WPM.js');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
@@ -29,7 +29,7 @@ function useAiChat(bridge, config) {
|
|
|
29
29
|
setInitError(void 0);
|
|
30
30
|
void (async () => {
|
|
31
31
|
try {
|
|
32
|
-
const available = await
|
|
32
|
+
const available = await chunkGZ2V3PWN_js.isAiAvailable();
|
|
33
33
|
if (cancelled) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
@@ -37,7 +37,7 @@ function useAiChat(bridge, config) {
|
|
|
37
37
|
setState("unavailable");
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
const built = await
|
|
40
|
+
const built = await chunkGZ2V3PWN_js.createAiChatSession(bridge, configRef.current);
|
|
41
41
|
if (cancelled) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
@@ -143,7 +143,7 @@ function withDeckContext(inner, bridge, strategy) {
|
|
|
143
143
|
}
|
|
144
144
|
let context = "";
|
|
145
145
|
try {
|
|
146
|
-
context = await
|
|
146
|
+
context = await chunkGZ2V3PWN_js.buildDeckContext(bridge, { strategy, focus: {} });
|
|
147
147
|
} catch {
|
|
148
148
|
context = "";
|
|
149
149
|
}
|
|
@@ -206,7 +206,7 @@ function useAiConversation(useChat, session, config, bridge, options = {}) {
|
|
|
206
206
|
continue;
|
|
207
207
|
}
|
|
208
208
|
seen.add(call.toolCallId);
|
|
209
|
-
onToolTargetRef.current?.(
|
|
209
|
+
onToolTargetRef.current?.(chunkGZ2V3PWN_js.toolCanvasTarget(call.toolName, call.input));
|
|
210
210
|
}
|
|
211
211
|
}, [chat.messages]);
|
|
212
212
|
const send = react.useCallback(
|
|
@@ -282,7 +282,7 @@ function deriveTitle(messages) {
|
|
|
282
282
|
}
|
|
283
283
|
function useAiHistory(input) {
|
|
284
284
|
const { deckId, messages, setMessages } = input;
|
|
285
|
-
const store = react.useMemo(() => input.store ??
|
|
285
|
+
const store = react.useMemo(() => input.store ?? chunkGZ2V3PWN_js.createChatHistoryStore(), [input.store]);
|
|
286
286
|
const [activeChatId, setActiveChatId] = react.useState(newChatId);
|
|
287
287
|
const [chats, setChats] = react.useState([]);
|
|
288
288
|
const createdAtRef = react.useRef(Date.now());
|
|
@@ -425,7 +425,7 @@ function AiComposer({
|
|
|
425
425
|
disabled: value.trim().length === 0,
|
|
426
426
|
title: t("pptx.ai.send"),
|
|
427
427
|
"aria-label": t("pptx.ai.send"),
|
|
428
|
-
className:
|
|
428
|
+
className: chunkHAQDKQ52_js.cn(
|
|
429
429
|
"shrink-0 rounded-sm p-1.5 transition-colors",
|
|
430
430
|
value.trim().length === 0 ? "text-muted-foreground/50" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
431
431
|
),
|
|
@@ -451,15 +451,15 @@ function AiFocusBar({
|
|
|
451
451
|
onClearPicks
|
|
452
452
|
}) {
|
|
453
453
|
const { t } = reactI18next.useTranslation();
|
|
454
|
-
const chips =
|
|
455
|
-
const twoTables =
|
|
454
|
+
const chips = chunkGZ2V3PWN_js.focusTargetChips(targets, slides);
|
|
455
|
+
const twoTables = chunkGZ2V3PWN_js.isTwoTableFocus(targets, slides);
|
|
456
456
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border bg-secondary/30", children: [
|
|
457
457
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1 px-2.5 py-1.5", children: [
|
|
458
458
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: t("pptx.ai.focusScope") }),
|
|
459
459
|
chips.map((chip) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
460
460
|
"span",
|
|
461
461
|
{
|
|
462
|
-
className:
|
|
462
|
+
className: chunkHAQDKQ52_js.cn(
|
|
463
463
|
"inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
|
|
464
464
|
hasPicks || isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground"
|
|
465
465
|
),
|
|
@@ -492,7 +492,7 @@ function AiFocusBar({
|
|
|
492
492
|
title: t("pptx.ai.pickElement"),
|
|
493
493
|
"aria-label": t("pptx.ai.pickAria"),
|
|
494
494
|
"aria-pressed": pickMode,
|
|
495
|
-
className:
|
|
495
|
+
className: chunkHAQDKQ52_js.cn(
|
|
496
496
|
"rounded-sm p-1",
|
|
497
497
|
pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
|
|
498
498
|
),
|
|
@@ -571,7 +571,7 @@ function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
|
|
|
571
571
|
{
|
|
572
572
|
type: "button",
|
|
573
573
|
onClick: () => onResume(chat.id),
|
|
574
|
-
className:
|
|
574
|
+
className: chunkHAQDKQ52_js.cn(
|
|
575
575
|
"flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent",
|
|
576
576
|
chat.id === activeChatId && "bg-accent/60"
|
|
577
577
|
),
|
|
@@ -726,26 +726,26 @@ function AiToolCallCard({ part }) {
|
|
|
726
726
|
const failed = part.state === "output-error";
|
|
727
727
|
const done = part.state === "output-available";
|
|
728
728
|
const running = !failed && !done;
|
|
729
|
-
const activity =
|
|
729
|
+
const activity = chunkGZ2V3PWN_js.describeToolActivity(part.toolName, part.input, running ? "present" : "past");
|
|
730
730
|
const Icon = ICONS[activity.icon] ?? lu.LuWrench;
|
|
731
|
-
const rawSummary =
|
|
731
|
+
const rawSummary = chunkGZ2V3PWN_js.summarizeToolArgs(part.input);
|
|
732
732
|
const statusLabel = failed ? t("pptx.ai.toolFailed") : done ? t("pptx.ai.toolDone") : t("pptx.ai.toolRunning");
|
|
733
733
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[12px]", children: [
|
|
734
734
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
735
735
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
736
736
|
Icon,
|
|
737
737
|
{
|
|
738
|
-
className:
|
|
738
|
+
className: chunkHAQDKQ52_js.cn(
|
|
739
739
|
"w-3.5 h-3.5 shrink-0",
|
|
740
740
|
failed ? "text-destructive" : "text-muted-foreground"
|
|
741
741
|
)
|
|
742
742
|
}
|
|
743
743
|
),
|
|
744
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
744
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkHAQDKQ52_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
|
|
745
745
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
746
746
|
"span",
|
|
747
747
|
{
|
|
748
|
-
className:
|
|
748
|
+
className: chunkHAQDKQ52_js.cn(
|
|
749
749
|
"ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]",
|
|
750
750
|
failed ? "bg-destructive/15 text-destructive" : done ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
751
751
|
),
|
|
@@ -762,7 +762,7 @@ function AiToolCallCard({ part }) {
|
|
|
762
762
|
rawSummary && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group mt-0.5 pl-5", children: [
|
|
763
763
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer list-none text-[10px] text-muted-foreground/70 hover:text-muted-foreground", children: t("pptx.ai.toolDetails") }),
|
|
764
764
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-0.5 break-words font-mono text-[10px] text-muted-foreground/80", children: [
|
|
765
|
-
|
|
765
|
+
chunkGZ2V3PWN_js.toolLabel(part.toolName),
|
|
766
766
|
": ",
|
|
767
767
|
rawSummary
|
|
768
768
|
] })
|
|
@@ -793,7 +793,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
793
793
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
794
794
|
"div",
|
|
795
795
|
{
|
|
796
|
-
className:
|
|
796
|
+
className: chunkHAQDKQ52_js.cn(
|
|
797
797
|
"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
|
|
798
798
|
isUser ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary"
|
|
799
799
|
),
|
|
@@ -840,7 +840,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
840
840
|
}
|
|
841
841
|
function AiProposalCard({ proposal, onAccept, onReject }) {
|
|
842
842
|
const { t } = reactI18next.useTranslation();
|
|
843
|
-
const lines = proposal.summary.map(
|
|
843
|
+
const lines = proposal.summary.map(chunkGZ2V3PWN_js.humanizeDiffLine);
|
|
844
844
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md border border-primary/40 bg-primary/5 p-2.5", children: [
|
|
845
845
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary", children: t("pptx.ai.proposedChange") }),
|
|
846
846
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[12px] font-medium text-foreground", children: proposal.label }),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkMZ47MV52_js = require('./chunk-MZ47MV52.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 chunkMZ47MV52_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
|
|
18
18
|
if (disposed) {
|
|
19
19
|
handle.dispose();
|
|
20
20
|
} else {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkMZ47MV52_js = require('./chunk-MZ47MV52.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 chunkMZ47MV52_js.mountSurfaceChart3D(container, {
|
|
29
29
|
cols,
|
|
30
30
|
rows,
|
|
31
31
|
heightMap,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -103,7 +103,7 @@ declare class Observable<N> {
|
|
|
103
103
|
destroy(): void;
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
|
-
//#region ../../node_modules/.bun/y-protocols@1.0.7+
|
|
106
|
+
//#region ../../node_modules/.bun/y-protocols@1.0.7+48ebd0cf55a3d4ab/node_modules/y-protocols/awareness.d.ts
|
|
107
107
|
/**
|
|
108
108
|
* @typedef {Object} MetaClientState
|
|
109
109
|
* @property {number} MetaClientState.clock
|
|
@@ -383,4 +383,4 @@ interface UsePresenterWindowResult {
|
|
|
383
383
|
declare function usePresenterWindow(input: UsePresenterWindowInput): UsePresenterWindowResult;
|
|
384
384
|
//#endregion
|
|
385
385
|
export { usePresenceTracking as C, ThemeSwitchingResult as D, useYjsProvider as E, UseThemeSwitchingInput as O, UsePresenceTrackingResult as S, UseYjsProviderResult as T, UseCollaborativeHistoryResult as _, UsePresenterWindowResult as a, useCollaborativeState as b, usePresenterWindow as c, useFollowMode as d, UseBroadcastFollowerInput as f, UseCollaborativeHistoryInput as g, useYjsDocumentSync as h, UsePresenterWindowInput as i, useThemeSwitching as k, UseFollowModeInput as l, UseYjsDocumentSyncInput as m, loadAudienceContent as n, isAudienceTab as o, useBroadcastFollower as p, storeAudienceContent as r, parseAudienceNonce as s, clearAudienceContent as t, UseFollowModeResult as u, useCollaborativeHistory as v, UseYjsProviderInput as w, UsePresenceTrackingInput as x, UseCollaborativeStateInput as y };
|
|
386
|
-
//# sourceMappingURL=audience-content-store-
|
|
386
|
+
//# sourceMappingURL=audience-content-store-BvqKy7Hf.d.ts.map
|
package/dist/{audience-content-store-DaABTAcQ.d.ts.map → audience-content-store-BvqKy7Hf.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience-content-store-
|
|
1
|
+
{"version":3,"file":"audience-content-store-BvqKy7Hf.d.ts","names":[],"sources":["../src/viewer/hooks/useThemeSwitching.ts","../../../node_modules/.bun/lib0@0.2.117/node_modules/lib0/observable.d.ts","../../../node_modules/.bun/y-protocols@1.0.7+48ebd0cf55a3d4ab/node_modules/y-protocols/awareness.d.ts","../src/viewer/hooks/collaboration/useYjsProvider.ts","../src/viewer/hooks/collaboration/usePresenceTracking.ts","../src/viewer/hooks/collaboration/useCollaborativeState.ts","../src/viewer/hooks/collaboration/useCollaborativeHistory.ts","../src/viewer/hooks/collaboration/useYjsDocumentSync.ts","../src/viewer/hooks/collaboration/useBroadcastFollower.ts","../src/viewer/hooks/collaboration/useFollowMode.ts","../src/viewer/hooks/presentation-mode/usePresenterWindow.ts"],"x_google_ignoreList":[1,2],"mappings":";;;;;;;UAqBiB;;EAEhB,YAAY,UAAU;;EAEtB,MAAM;;EAEN,eAAe,SAAS;;EAExB,kBAAkB,QAAQ;;UAGV;;EAEhB,kBAAkB;;;;;EAMlB,iBAAiB,QAAQ,oBAAoB;;;;;EAM7C,iBACC,aAAa,sBACb,aAAa,qBACb,uBACI;;;;;EAML,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCA,kBAAkB,OAAO,yBAAyB;;;;;;;;;cCrCrD,WAAW;;;;;EAKpB,YAAY,IAAI;;;;;EAKhB,GAAG,MAAM,GAAG,GAAG;;;;;EAKf,KAAK,MAAM,GAAG,GAAG;;;;;EAKjB,IAAI,MAAM,GAAG,GAAG;;;;;;;;;;EAUhB,KAAK,MAAM,GAAG,MAAM;EACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;cC3DS,kBAAkB;;;;EAI3B,YAAY,KAAK,EAAE;EACnB,KAAK,EAAE;;;;EAIP;;;;;EAKA,QAAQ;KACH;;;;;EAKL,MAAM,YAAY;EAClB;;;;EAIA;KACK;;;;;EAKL,cAAc;KACT;;;;;;EAML,mBAAmB,eAAe;;;;EAIlC,aAAa;KACR;;;KASG;EACR;;;;EAIA;;;;UC9Ba;;;;;;EAMhB,SAAS;;UAGO;;EAEhB,QAAQ;;EAER,WAAW;;EAEX,KAAK;;EAEL;;;;;;;;;EASA;;EAEA;;;;;;;;;;;;;iBAkBe,iBAAiB,UAAU,sBAAsB;;;UChFhD;EAChB,WAAW;EACX;EACA;EACA;EACA;;EAEA;EACA;EACA;;UAGgB;;EAEhB,aAAa;;EAEb,oBAAoB,QAAQ,QAAQ,KAAK;;iBAO1B,sBACf,WACA,eACA,UACA,WACA,YACA,MACA,aACA,gBACE,2BAA2B;;;UC3Bb;;;;;;;EAOhB,SAAS;EACT;EACA;;iBAOe,wBACf,QACA,aACA,gBACE,6BAA6B;;;UCvBf;;EAEhB;;EAEA;;EAEA;;EAEA;;EAEA;;UAGgB;;EAEhB;;EAEA;;EAEA;;EAEA;;iBAOe,0BACf,eAAe,gBACf,YACA,YACA,SACA,WACE,+BAA+B;;;UC1BjB;;EAEhB,KAAK;;EAEL,QAAQ;;EAER,2BAA2B,eAAe;;EAE1C,WAAW,MAAM,SAAS,MAAM,eAAe;;EAE/C;;;;;;;EAOA;;EAEA,SAAS,KAAK;;;;;EAKd,uBAAuB;;;;;;;;EAQvB;;iBAGe,qBACf,KACA,QACA,2BACA,WACA,aACA,UACA,QACA,gBACA,eACE;;;UCtDc;;EAEhB,QAAQ;;EAER;;EAEA,sBAAsB;;EAEtB;;;;;EAKA;;iBAOe,uBACf,QACA,kBACA,qBACA,YACA,UACE;;;UCzBc;;EAEhB,QAAQ;;EAER;;EAEA,sBAAsB;;EAEtB;;UAGgB;;EAEhB;;EAEA,aAAa;;iBAOE,gBACf,QACA,kBACA,qBACA,cACE,qBAAqB;;;;;;;iBCgBR;;iBAkDA;UAQC;EAChB;EACA;;EAEA,UAAU,cAAc;EACxB,UAAU;;UAGM;EAChB;EACA;EACA;EACA,sBAAsB;EACtB,sBAAsB,UAAU;EAChC,oBAAoB;;iBAOL,mBAAmB,OAAO,0BAA0B"}
|
|
@@ -8513,20 +8513,18 @@ function createTableElement(input, options) {
|
|
|
8513
8513
|
}
|
|
8514
8514
|
const rows = input.rows.map((rowInput) => ({
|
|
8515
8515
|
height: rowInput.height ?? rowHeight,
|
|
8516
|
-
cells: rowInput.cells.map(
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
})
|
|
8529
|
-
)
|
|
8516
|
+
cells: rowInput.cells.map((cellInput) => ({
|
|
8517
|
+
text: cellInput.text,
|
|
8518
|
+
gridSpan: cellInput.gridSpan,
|
|
8519
|
+
rowSpan: cellInput.rowSpan,
|
|
8520
|
+
style: cellInput.style ? {
|
|
8521
|
+
fontSize: cellInput.style.fontSize,
|
|
8522
|
+
bold: cellInput.style.bold,
|
|
8523
|
+
italic: cellInput.style.italic,
|
|
8524
|
+
color: cellInput.style.color,
|
|
8525
|
+
align: cellInput.style.alignment
|
|
8526
|
+
} : void 0
|
|
8527
|
+
}))
|
|
8530
8528
|
}));
|
|
8531
8529
|
const tableData = {
|
|
8532
8530
|
rows,
|
|
@@ -42495,17 +42493,13 @@ function remapCellStyleColors(style, remap) {
|
|
|
42495
42493
|
function remapTableColors(tableData, remap) {
|
|
42496
42494
|
return {
|
|
42497
42495
|
...tableData,
|
|
42498
|
-
rows: tableData.rows.map(
|
|
42499
|
-
|
|
42500
|
-
|
|
42501
|
-
|
|
42502
|
-
|
|
42503
|
-
|
|
42504
|
-
|
|
42505
|
-
})
|
|
42506
|
-
)
|
|
42507
|
-
})
|
|
42508
|
-
)
|
|
42496
|
+
rows: tableData.rows.map((row) => ({
|
|
42497
|
+
...row,
|
|
42498
|
+
cells: row.cells.map((cell) => ({
|
|
42499
|
+
...cell,
|
|
42500
|
+
style: remapCellStyleColors(cell.style, remap)
|
|
42501
|
+
}))
|
|
42502
|
+
}))
|
|
42509
42503
|
};
|
|
42510
42504
|
}
|
|
42511
42505
|
function remapSlideColors(slide, remap) {
|
|
@@ -42972,9 +42966,10 @@ function parseWhen(node) {
|
|
|
42972
42966
|
} : void 0;
|
|
42973
42967
|
}
|
|
42974
42968
|
function parseSmartArtControlFlow(node, localName22) {
|
|
42975
|
-
const forEach = children5(node, "forEach", localName22).map(
|
|
42976
|
-
|
|
42977
|
-
|
|
42969
|
+
const forEach = children5(node, "forEach", localName22).map((entry2) => ({
|
|
42970
|
+
...parseIterator(entry2),
|
|
42971
|
+
rawXml: entry2
|
|
42972
|
+
}));
|
|
42978
42973
|
const choose = children5(node, "choose", localName22).map((entry2) => {
|
|
42979
42974
|
const otherwiseNode = children5(entry2, "else", localName22)[0];
|
|
42980
42975
|
return {
|
|
@@ -102259,27 +102254,24 @@ function newTableElement(rows = 3, cols = 3, x = DEFAULT_X, y = TABLE_DEFAULT_Y)
|
|
|
102259
102254
|
const columnWidths = Array.from({ length: cols }).fill(colWidth);
|
|
102260
102255
|
const tableRows = Array.from({ length: rows }, (_, rowIdx) => {
|
|
102261
102256
|
const isHeader = rowIdx === 0;
|
|
102262
|
-
const cells = Array.from(
|
|
102263
|
-
{
|
|
102264
|
-
|
|
102265
|
-
|
|
102266
|
-
|
|
102267
|
-
|
|
102268
|
-
|
|
102269
|
-
|
|
102270
|
-
|
|
102271
|
-
|
|
102272
|
-
|
|
102273
|
-
|
|
102274
|
-
|
|
102275
|
-
|
|
102276
|
-
|
|
102277
|
-
|
|
102278
|
-
|
|
102279
|
-
|
|
102280
|
-
}
|
|
102281
|
-
})
|
|
102282
|
-
);
|
|
102257
|
+
const cells = Array.from({ length: cols }, (__, colIdx) => ({
|
|
102258
|
+
text: isHeader ? `Header ${colIdx + 1}` : "",
|
|
102259
|
+
style: {
|
|
102260
|
+
borderTopWidth: 1,
|
|
102261
|
+
borderBottomWidth: 1,
|
|
102262
|
+
borderLeftWidth: 1,
|
|
102263
|
+
borderRightWidth: 1,
|
|
102264
|
+
borderTopColor: "#cccccc",
|
|
102265
|
+
borderBottomColor: "#cccccc",
|
|
102266
|
+
borderLeftColor: "#cccccc",
|
|
102267
|
+
borderRightColor: "#cccccc",
|
|
102268
|
+
...isHeader ? {
|
|
102269
|
+
bold: true,
|
|
102270
|
+
backgroundColor: "#2563eb",
|
|
102271
|
+
color: "#ffffff"
|
|
102272
|
+
} : {}
|
|
102273
|
+
}
|
|
102274
|
+
}));
|
|
102283
102275
|
return { cells, height: isHeader ? 40 : 36 };
|
|
102284
102276
|
});
|
|
102285
102277
|
return {
|
|
@@ -103818,6 +103810,7 @@ var translationsEn = {
|
|
|
103818
103810
|
"pptx.inspector.lock": "Lock",
|
|
103819
103811
|
"pptx.inspector.unlock": "Unlock",
|
|
103820
103812
|
// Slide master / handout master / notes master
|
|
103813
|
+
"pptx.master.backgroundColorLabel": "Master background color",
|
|
103821
103814
|
"pptx.master.collapseMasterPane": "Collapse pane",
|
|
103822
103815
|
"pptx.master.handoutBackground": "Background",
|
|
103823
103816
|
"pptx.master.handoutMasterTitle": "Handout Master",
|
|
@@ -108034,19 +108027,21 @@ function childrenPair(a, b) {
|
|
|
108034
108027
|
}
|
|
108035
108028
|
return boxOverlapRatio(a, b) >= CHILD_OVERLAP_RATIO;
|
|
108036
108029
|
}
|
|
108037
|
-
function
|
|
108030
|
+
function correspondingChildren(a, b) {
|
|
108038
108031
|
if (a.length !== b.length || a.length === 0) {
|
|
108039
|
-
return
|
|
108032
|
+
return void 0;
|
|
108040
108033
|
}
|
|
108041
108034
|
const unclaimed = b.map((child22) => child22);
|
|
108035
|
+
const paired = [];
|
|
108042
108036
|
for (const child22 of a) {
|
|
108043
108037
|
const index = unclaimed.findIndex((candidate) => childrenPair(child22, candidate));
|
|
108044
108038
|
if (index < 0) {
|
|
108045
|
-
return
|
|
108039
|
+
return void 0;
|
|
108046
108040
|
}
|
|
108041
|
+
paired.push([child22, unclaimed[index]]);
|
|
108047
108042
|
unclaimed.splice(index, 1);
|
|
108048
108043
|
}
|
|
108049
|
-
return
|
|
108044
|
+
return paired;
|
|
108050
108045
|
}
|
|
108051
108046
|
function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
|
|
108052
108047
|
const out = [];
|
|
@@ -108055,7 +108050,7 @@ function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
|
|
|
108055
108050
|
if (children8 && containsMorphNamedDescendant(element)) {
|
|
108056
108051
|
const twin = correspondingGroup(element, counterpart);
|
|
108057
108052
|
const twinChildren = twin ? groupChildren(twin) ?? [] : void 0;
|
|
108058
|
-
if (twinChildren &&
|
|
108053
|
+
if (twinChildren && correspondingChildren(children8, twinChildren)) {
|
|
108059
108054
|
out.push(
|
|
108060
108055
|
...flattenMorphElements(children8, twinChildren, offsetX + element.x, offsetY + element.y)
|
|
108061
108056
|
);
|
|
@@ -108066,6 +108061,29 @@ function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
|
|
|
108066
108061
|
}
|
|
108067
108062
|
return out;
|
|
108068
108063
|
}
|
|
108064
|
+
function morphGroupChildPairs(elements, counterpart) {
|
|
108065
|
+
const pairs2 = /* @__PURE__ */ new Map();
|
|
108066
|
+
collectGroupChildPairs(elements, counterpart, pairs2);
|
|
108067
|
+
return pairs2;
|
|
108068
|
+
}
|
|
108069
|
+
function collectGroupChildPairs(elements, counterpart, into) {
|
|
108070
|
+
for (const element of elements) {
|
|
108071
|
+
const children8 = groupChildren(element);
|
|
108072
|
+
if (!children8 || !containsMorphNamedDescendant(element)) {
|
|
108073
|
+
continue;
|
|
108074
|
+
}
|
|
108075
|
+
const twin = correspondingGroup(element, counterpart);
|
|
108076
|
+
const twinChildren = twin ? groupChildren(twin) ?? [] : void 0;
|
|
108077
|
+
const corresponded = twinChildren ? correspondingChildren(children8, twinChildren) : void 0;
|
|
108078
|
+
if (!corresponded) {
|
|
108079
|
+
continue;
|
|
108080
|
+
}
|
|
108081
|
+
for (const [child22, twinChild] of corresponded) {
|
|
108082
|
+
into.set(child22.id, twinChild.id);
|
|
108083
|
+
}
|
|
108084
|
+
collectGroupChildPairs(children8, twinChildren ?? [], into);
|
|
108085
|
+
}
|
|
108086
|
+
}
|
|
108069
108087
|
var OUTLINE_SAMPLE_COUNT = 64;
|
|
108070
108088
|
var ELLIPSE_SAMPLE_COUNT = 48;
|
|
108071
108089
|
function resolveLength(token2, axis) {
|
|
@@ -108532,6 +108550,23 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
108532
108550
|
}
|
|
108533
108551
|
}
|
|
108534
108552
|
}
|
|
108553
|
+
const groupChildPairs = morphGroupChildPairs(fromSlide.elements, toSlide.elements);
|
|
108554
|
+
if (groupChildPairs.size > 0) {
|
|
108555
|
+
const toById = new Map(toElements.map((el) => [el.id, el]));
|
|
108556
|
+
for (const fromEl of fromElements) {
|
|
108557
|
+
if (usedFrom.has(fromEl.id)) {
|
|
108558
|
+
continue;
|
|
108559
|
+
}
|
|
108560
|
+
const toId = groupChildPairs.get(fromEl.id);
|
|
108561
|
+
const toEl = toId === void 0 ? void 0 : toById.get(toId);
|
|
108562
|
+
if (!toEl || usedTo.has(toEl.id) || fromEl.type !== toEl.type) {
|
|
108563
|
+
continue;
|
|
108564
|
+
}
|
|
108565
|
+
pairs2.push({ fromElement: fromEl, toElement: toEl });
|
|
108566
|
+
usedFrom.add(fromEl.id);
|
|
108567
|
+
usedTo.add(toEl.id);
|
|
108568
|
+
}
|
|
108569
|
+
}
|
|
108535
108570
|
for (const fromEl of fromElements) {
|
|
108536
108571
|
if (usedFrom.has(fromEl.id) || !fromEl.shapeId) {
|
|
108537
108572
|
continue;
|
|
@@ -108638,7 +108673,7 @@ function buildMorphMergedOrder(outgoing, incoming, pairs2) {
|
|
|
108638
108673
|
flushOutgoingBelow(outgoing.length);
|
|
108639
108674
|
return rank;
|
|
108640
108675
|
}
|
|
108641
|
-
function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds) {
|
|
108676
|
+
function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds, dissolvingInIds = /* @__PURE__ */ new Set()) {
|
|
108642
108677
|
const rank = buildMorphMergedOrder(outgoing, incoming, pairs2);
|
|
108643
108678
|
const matched = new Set(pairs2.map((pair) => pair.toElement.id));
|
|
108644
108679
|
const counterpart = new Map(pairs2.map((pair) => [pair.fromElement.id, pair.toElement]));
|
|
@@ -108648,7 +108683,7 @@ function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds
|
|
|
108648
108683
|
}));
|
|
108649
108684
|
const lifted = /* @__PURE__ */ new Set();
|
|
108650
108685
|
for (const element of incoming) {
|
|
108651
|
-
if (matched.has(element.id)) {
|
|
108686
|
+
if (matched.has(element.id) && !dissolvingInIds.has(element.id)) {
|
|
108652
108687
|
continue;
|
|
108653
108688
|
}
|
|
108654
108689
|
const mine = rank.get(element.id) ?? 0;
|
|
@@ -108713,6 +108748,21 @@ function tokenizeText(element, mode) {
|
|
|
108713
108748
|
}
|
|
108714
108749
|
return tokens;
|
|
108715
108750
|
}
|
|
108751
|
+
var SAME_SLOT_OVERLAP = 0.5;
|
|
108752
|
+
function ownText(element) {
|
|
108753
|
+
return (element.text ?? "").replace(/\s+/gu, " ").trim();
|
|
108754
|
+
}
|
|
108755
|
+
function morphTextReplacedInSlot(fromElement, toElement) {
|
|
108756
|
+
if (fromElement.type !== "text" || toElement.type !== "text") {
|
|
108757
|
+
return false;
|
|
108758
|
+
}
|
|
108759
|
+
const from = ownText(fromElement);
|
|
108760
|
+
const to = ownText(toElement);
|
|
108761
|
+
if (from === "" || to === "" || from === to) {
|
|
108762
|
+
return false;
|
|
108763
|
+
}
|
|
108764
|
+
return boxOverlapRatio(fromElement, toElement) >= SAME_SLOT_OVERLAP;
|
|
108765
|
+
}
|
|
108716
108766
|
function diffTokens(fromTokens, toTokens) {
|
|
108717
108767
|
const n = fromTokens.length;
|
|
108718
108768
|
const m = toTokens.length;
|
|
@@ -108911,6 +108961,9 @@ function resolveMorphGhostIds(outgoingElements, pairs2) {
|
|
|
108911
108961
|
}
|
|
108912
108962
|
return painted;
|
|
108913
108963
|
}
|
|
108964
|
+
function morphPairIncomingFadesIn(fromElement, toElement, ghosted = true) {
|
|
108965
|
+
return !(ghosted && isInertMorphPair(fromElement, toElement)) && morphPairNeedsCrossfade(fromElement, toElement) && crossfadeIncomingMayFadeIn(toElement);
|
|
108966
|
+
}
|
|
108914
108967
|
function crossfadeIncomingMayFadeIn(element) {
|
|
108915
108968
|
const image = element;
|
|
108916
108969
|
if (image.imagePath || image.svgPath) {
|
|
@@ -108941,17 +108994,18 @@ function generateMorphAnimations(pairs2, durationMs, _mode = "object", ghostIds)
|
|
|
108941
108994
|
continue;
|
|
108942
108995
|
}
|
|
108943
108996
|
const safeName = `pptx-morph-${index}-${toElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
108944
|
-
const
|
|
108945
|
-
const
|
|
108946
|
-
const
|
|
108947
|
-
const
|
|
108997
|
+
const inSlot = morphTextReplacedInSlot(fromElement, toElement);
|
|
108998
|
+
const dx = inSlot ? 0 : fromElement.x + fromElement.width / 2 - (toElement.x + toElement.width / 2);
|
|
108999
|
+
const dy = inSlot ? 0 : fromElement.y + fromElement.height / 2 - (toElement.y + toElement.height / 2);
|
|
109000
|
+
const sx = inSlot ? 1 : Math.max(fromElement.width, 1) / Math.max(toElement.width, 1);
|
|
109001
|
+
const sy = inSlot ? 1 : Math.max(fromElement.height, 1) / Math.max(toElement.height, 1);
|
|
108948
109002
|
const fromOpacity = fromElement.opacity ?? 1;
|
|
108949
109003
|
const toOpacity = toElement.opacity ?? 1;
|
|
108950
109004
|
const toRot = toElement.rotation ?? 0;
|
|
108951
|
-
const fromRot = shortestRotationTarget(toRot, fromElement.rotation ?? 0);
|
|
109005
|
+
const fromRot = inSlot ? toRot : shortestRotationTarget(toRot, fromElement.rotation ?? 0);
|
|
108952
109006
|
const flips = `${toElement.flipHorizontal ? " scaleX(-1)" : ""}${toElement.flipVertical ? " scaleY(-1)" : ""}`;
|
|
108953
109007
|
const inert = ghosted && isInertMorphPair(fromElement, toElement);
|
|
108954
|
-
const crossfadesIn =
|
|
109008
|
+
const crossfadesIn = morphPairIncomingFadesIn(fromElement, toElement, ghosted);
|
|
108955
109009
|
const fromProps = [
|
|
108956
109010
|
` transform: translate(${dx}px, ${dy}px) scale(${sx}, ${sy}) rotate(${fromRot}deg)${flips};`
|
|
108957
109011
|
];
|
|
@@ -109006,12 +109060,13 @@ function generateMorphGhostAnimations(pairs2, durationMs, startIndex, ghostIds)
|
|
|
109006
109060
|
}
|
|
109007
109061
|
const fadesOut = morphPairNeedsCrossfade(fromElement, toElement);
|
|
109008
109062
|
const safeName = `pptx-morph-ghost-${startIndex + index}-${fromElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
109009
|
-
const
|
|
109010
|
-
const
|
|
109011
|
-
const
|
|
109012
|
-
const
|
|
109063
|
+
const inSlot = morphTextReplacedInSlot(fromElement, toElement);
|
|
109064
|
+
const dx = inSlot ? 0 : toElement.x + toElement.width / 2 - (fromElement.x + fromElement.width / 2);
|
|
109065
|
+
const dy = inSlot ? 0 : toElement.y + toElement.height / 2 - (fromElement.y + fromElement.height / 2);
|
|
109066
|
+
const sx = inSlot ? 1 : Math.max(toElement.width, 1) / Math.max(fromElement.width, 1);
|
|
109067
|
+
const sy = inSlot ? 1 : Math.max(toElement.height, 1) / Math.max(fromElement.height, 1);
|
|
109013
109068
|
const fromRot = fromElement.rotation ?? 0;
|
|
109014
|
-
const toRot = shortestRotationTarget(fromRot, toElement.rotation ?? 0);
|
|
109069
|
+
const toRot = inSlot ? fromRot : shortestRotationTarget(fromRot, toElement.rotation ?? 0);
|
|
109015
109070
|
const flips = `${fromElement.flipHorizontal ? " scaleX(-1)" : ""}${fromElement.flipVertical ? " scaleY(-1)" : ""}`;
|
|
109016
109071
|
const opacity2 = fromElement.opacity ?? 1;
|
|
109017
109072
|
const keyframes = `
|
|
@@ -109229,11 +109284,21 @@ function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object
|
|
|
109229
109284
|
(candidate) => outgoingAnimations.has(candidate.fromElement.id) && !morphPairNeedsCrossfade(candidate.fromElement, candidate.toElement)
|
|
109230
109285
|
).map((candidate) => candidate.fromElement.id)
|
|
109231
109286
|
);
|
|
109287
|
+
const dissolvingInIds = new Set(
|
|
109288
|
+
match.pairs.filter(
|
|
109289
|
+
(candidate) => morphPairIncomingFadesIn(
|
|
109290
|
+
candidate.fromElement,
|
|
109291
|
+
candidate.toElement,
|
|
109292
|
+
outgoingAnimations.has(candidate.fromElement.id)
|
|
109293
|
+
)
|
|
109294
|
+
).map((candidate) => candidate.toElement.id)
|
|
109295
|
+
);
|
|
109232
109296
|
const lifted = resolveMorphOverlayArrivals(
|
|
109233
109297
|
flattenedOutgoing,
|
|
109234
109298
|
flattenedIncoming,
|
|
109235
109299
|
match.pairs,
|
|
109236
|
-
holdingGhostIds
|
|
109300
|
+
holdingGhostIds,
|
|
109301
|
+
dissolvingInIds
|
|
109237
109302
|
);
|
|
109238
109303
|
const overlayIncomingAnimations = /* @__PURE__ */ new Map();
|
|
109239
109304
|
for (const id of lifted) {
|
|
Binary file
|
|
Binary file
|