pptx-react-viewer 2.6.7 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/{AiChatPanel-I22AHEBC.js → AiChatPanel-G6DKXSM3.js} +22 -22
- package/dist/AiChatPanel-G6DKXSM3.js.br +0 -0
- package/dist/AiChatPanel-G6DKXSM3.js.gz +0 -0
- package/dist/{AiChatPanel-E5PVW4MN.mjs → AiChatPanel-J5IGSCYA.mjs} +3 -3
- package/dist/AiChatPanel-J5IGSCYA.mjs.br +0 -0
- package/dist/AiChatPanel-J5IGSCYA.mjs.gz +0 -0
- package/dist/{Model3DScene-UYOY6QJN.mjs → Model3DScene-ID6CQKEJ.mjs} +1 -1
- package/dist/{Model3DScene-UYOY6QJN.mjs.br → Model3DScene-ID6CQKEJ.mjs.br} +0 -0
- package/dist/Model3DScene-ID6CQKEJ.mjs.gz +0 -0
- package/dist/{Model3DScene-VC3HMMBO.js → Model3DScene-S7LKZ6IA.js} +2 -2
- package/dist/Model3DScene-S7LKZ6IA.js.br +0 -0
- package/dist/Model3DScene-S7LKZ6IA.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-PDULQ4DY.mjs → SurfaceChart3DScene-V5H6MXYW.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-PDULQ4DY.mjs.br → SurfaceChart3DScene-V5H6MXYW.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-V5H6MXYW.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-YMRRZC5V.js → SurfaceChart3DScene-XSJXJM6H.js} +2 -2
- package/dist/SurfaceChart3DScene-XSJXJM6H.js.br +0 -0
- package/dist/SurfaceChart3DScene-XSJXJM6H.js.gz +0 -0
- package/dist/{chunk-QOWFOMZP.js → chunk-2LOBDOTK.js} +92 -19
- package/dist/chunk-2LOBDOTK.js.br +0 -0
- package/dist/{chunk-QOWFOMZP.js.gz → chunk-2LOBDOTK.js.gz} +0 -0
- package/dist/{chunk-C4JFU2XG.js → chunk-4KMTZLNS.js} +315 -315
- package/dist/chunk-4KMTZLNS.js.br +0 -0
- package/dist/chunk-4KMTZLNS.js.gz +0 -0
- package/dist/{chunk-TJFZ7ZP6.js → chunk-6C4UY7GX.js} +3 -3
- package/dist/chunk-6C4UY7GX.js.br +0 -0
- package/dist/chunk-6C4UY7GX.js.gz +0 -0
- package/dist/{chunk-AB4WM3RK.js → chunk-B4XJTZR4.js} +236 -236
- package/dist/chunk-B4XJTZR4.js.br +0 -0
- package/dist/chunk-B4XJTZR4.js.gz +0 -0
- package/dist/{chunk-5XXNNTE2.js → chunk-GLQFRVAN.js} +851 -845
- package/dist/chunk-GLQFRVAN.js.br +0 -0
- package/dist/chunk-GLQFRVAN.js.gz +0 -0
- package/dist/{chunk-Y6WE6JJO.mjs → chunk-IGKLB7NQ.mjs} +2 -2
- package/dist/chunk-IGKLB7NQ.mjs.br +0 -0
- package/dist/chunk-IGKLB7NQ.mjs.gz +0 -0
- package/dist/{chunk-5QS6ANI7.mjs → chunk-SOLHDKNK.mjs} +1 -1
- package/dist/chunk-SOLHDKNK.mjs.br +0 -0
- package/dist/{chunk-5QS6ANI7.mjs.gz → chunk-SOLHDKNK.mjs.gz} +0 -0
- package/dist/{chunk-LR546YFN.mjs → chunk-WH46JCNF.mjs} +92 -19
- package/dist/chunk-WH46JCNF.mjs.br +0 -0
- package/dist/chunk-WH46JCNF.mjs.gz +0 -0
- package/dist/{chunk-CKERNV36.mjs → chunk-Y4EB65WB.mjs} +15 -9
- package/dist/chunk-Y4EB65WB.mjs.br +0 -0
- package/dist/chunk-Y4EB65WB.mjs.gz +0 -0
- package/dist/{chunk-B7DXNZPM.mjs → chunk-YUHEJWUN.mjs} +2 -2
- package/dist/chunk-YUHEJWUN.mjs.br +0 -0
- package/dist/chunk-YUHEJWUN.mjs.gz +0 -0
- package/dist/index.js +34 -34
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +78 -78
- 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/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-E5PVW4MN.mjs.br +0 -0
- package/dist/AiChatPanel-E5PVW4MN.mjs.gz +0 -0
- package/dist/AiChatPanel-I22AHEBC.js.br +0 -0
- package/dist/AiChatPanel-I22AHEBC.js.gz +0 -0
- package/dist/Model3DScene-UYOY6QJN.mjs.gz +0 -0
- package/dist/Model3DScene-VC3HMMBO.js.br +0 -0
- package/dist/Model3DScene-VC3HMMBO.js.gz +0 -0
- package/dist/SurfaceChart3DScene-PDULQ4DY.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-YMRRZC5V.js.br +0 -0
- package/dist/SurfaceChart3DScene-YMRRZC5V.js.gz +0 -0
- package/dist/chunk-5QS6ANI7.mjs.br +0 -0
- package/dist/chunk-5XXNNTE2.js.br +0 -0
- package/dist/chunk-5XXNNTE2.js.gz +0 -0
- package/dist/chunk-AB4WM3RK.js.br +0 -0
- package/dist/chunk-AB4WM3RK.js.gz +0 -0
- package/dist/chunk-B7DXNZPM.mjs.br +0 -0
- package/dist/chunk-B7DXNZPM.mjs.gz +0 -0
- package/dist/chunk-C4JFU2XG.js.br +0 -0
- package/dist/chunk-C4JFU2XG.js.gz +0 -0
- package/dist/chunk-CKERNV36.mjs.br +0 -0
- package/dist/chunk-CKERNV36.mjs.gz +0 -0
- package/dist/chunk-LR546YFN.mjs.br +0 -0
- package/dist/chunk-LR546YFN.mjs.gz +0 -0
- package/dist/chunk-QOWFOMZP.js.br +0 -0
- package/dist/chunk-TJFZ7ZP6.js.br +0 -0
- package/dist/chunk-TJFZ7ZP6.js.gz +0 -0
- package/dist/chunk-Y6WE6JJO.mjs.br +0 -0
- package/dist/chunk-Y6WE6JJO.mjs.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@ 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.6.7](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.6.7) - 2026-07-30
|
|
8
|
+
|
|
7
9
|
## [2.6.6](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.6.6) - 2026-07-30
|
|
8
10
|
|
|
9
11
|
## [2.6.5](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.6.5) - 2026-07-30
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk6C4UY7GX_js = require('./chunk-6C4UY7GX.js');
|
|
4
|
+
var chunkB4XJTZR4_js = require('./chunk-B4XJTZR4.js');
|
|
5
5
|
require('./chunk-25VSL2BB.js');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-2LOBDOTK.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 chunk6C4UY7GX_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 chunk6C4UY7GX_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 chunk6C4UY7GX_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?.(chunk6C4UY7GX_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 ?? chunk6C4UY7GX_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: chunkB4XJTZR4_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 = chunk6C4UY7GX_js.focusTargetChips(targets, slides);
|
|
456
|
+
const twoTables = chunk6C4UY7GX_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: chunkB4XJTZR4_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: chunkB4XJTZR4_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: chunkB4XJTZR4_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 = chunk6C4UY7GX_js.describeToolActivity(part.toolName, part.input, running ? "present" : "past");
|
|
731
731
|
const Icon = ICONS[activity.icon] ?? lu.LuWrench;
|
|
732
|
-
const rawSummary =
|
|
732
|
+
const rawSummary = chunk6C4UY7GX_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: chunkB4XJTZR4_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: chunkB4XJTZR4_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: chunkB4XJTZR4_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
|
+
chunk6C4UY7GX_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: chunkB4XJTZR4_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(chunk6C4UY7GX_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,7 +1,7 @@
|
|
|
1
|
-
import { isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-SOLHDKNK.mjs';
|
|
2
|
+
import { cn } from './chunk-IGKLB7NQ.mjs';
|
|
3
3
|
import './chunk-Z6HIZWIQ.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-WH46JCNF.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
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2LOBDOTK_js = require('./chunk-2LOBDOTK.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 chunk2LOBDOTK_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 chunk2LOBDOTK_js = require('./chunk-2LOBDOTK.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 chunk2LOBDOTK_js.mountSurfaceChart3D(container, {
|
|
29
29
|
cols,
|
|
30
30
|
rows,
|
|
31
31
|
heightMap,
|
|
Binary file
|
|
Binary file
|
|
@@ -44638,7 +44638,7 @@ function applySeriesDataLabelsToXml(seriesNode, dataLabels, getLocalName2) {
|
|
|
44638
44638
|
const dLblsKey = findKey13(seriesNode, "dLbls", getLocalName2);
|
|
44639
44639
|
const labels = dataLabels ?? [];
|
|
44640
44640
|
const existingByIdx = /* @__PURE__ */ new Map();
|
|
44641
|
-
let
|
|
44641
|
+
let groupChildren2 = [];
|
|
44642
44642
|
if (dLblsKey) {
|
|
44643
44643
|
const dLbls = seriesNode[dLblsKey];
|
|
44644
44644
|
const dLblKey = findKey13(dLbls, "dLbl", getLocalName2);
|
|
@@ -44653,9 +44653,9 @@ function applySeriesDataLabelsToXml(seriesNode, dataLabels, getLocalName2) {
|
|
|
44653
44653
|
}
|
|
44654
44654
|
}
|
|
44655
44655
|
}
|
|
44656
|
-
|
|
44656
|
+
groupChildren2 = Object.keys(dLbls).filter((k) => getLocalName2(k) !== "dLbl").map((k) => [k, dLbls[k]]);
|
|
44657
44657
|
}
|
|
44658
|
-
if (labels.length === 0 &&
|
|
44658
|
+
if (labels.length === 0 && groupChildren2.length === 0) {
|
|
44659
44659
|
if (dLblsKey) {
|
|
44660
44660
|
delete seriesNode[dLblsKey];
|
|
44661
44661
|
}
|
|
@@ -44666,7 +44666,7 @@ function applySeriesDataLabelsToXml(seriesNode, dataLabels, getLocalName2) {
|
|
|
44666
44666
|
if (built.length > 0) {
|
|
44667
44667
|
newDLbls["c:dLbl"] = built.length === 1 ? built[0] : built;
|
|
44668
44668
|
}
|
|
44669
|
-
const ordered32 = [...
|
|
44669
|
+
const ordered32 = [...groupChildren2].sort((a, b) => {
|
|
44670
44670
|
const ai = DLBLS_GROUP_ORDER.indexOf(getLocalName2(a[0]));
|
|
44671
44671
|
const bi = DLBLS_GROUP_ORDER.indexOf(getLocalName2(b[0]));
|
|
44672
44672
|
return (ai === -1 ? DLBLS_GROUP_ORDER.length : ai) - (bi === -1 ? DLBLS_GROUP_ORDER.length : bi);
|
|
@@ -98334,6 +98334,44 @@ ${body}
|
|
|
98334
98334
|
keyframes
|
|
98335
98335
|
};
|
|
98336
98336
|
}
|
|
98337
|
+
function groupChildren(element) {
|
|
98338
|
+
if (element.type !== "group") {
|
|
98339
|
+
return void 0;
|
|
98340
|
+
}
|
|
98341
|
+
const children8 = element.children;
|
|
98342
|
+
return Array.isArray(children8) && children8.length > 0 ? children8 : void 0;
|
|
98343
|
+
}
|
|
98344
|
+
function containsMorphNamedDescendant(element) {
|
|
98345
|
+
const children8 = groupChildren(element);
|
|
98346
|
+
if (!children8) {
|
|
98347
|
+
return false;
|
|
98348
|
+
}
|
|
98349
|
+
for (const child22 of children8) {
|
|
98350
|
+
if (getElementMorphName(child22) !== void 0 || containsMorphNamedDescendant(child22)) {
|
|
98351
|
+
return true;
|
|
98352
|
+
}
|
|
98353
|
+
}
|
|
98354
|
+
return false;
|
|
98355
|
+
}
|
|
98356
|
+
function toAbsolute(child22, offsetX, offsetY) {
|
|
98357
|
+
if (offsetX === 0 && offsetY === 0) {
|
|
98358
|
+
return child22;
|
|
98359
|
+
}
|
|
98360
|
+
return { ...child22, x: child22.x + offsetX, y: child22.y + offsetY };
|
|
98361
|
+
}
|
|
98362
|
+
function flattenMorphElements(elements, offsetX = 0, offsetY = 0) {
|
|
98363
|
+
const out = [];
|
|
98364
|
+
for (const element of elements) {
|
|
98365
|
+
const children8 = groupChildren(element);
|
|
98366
|
+
if (children8 && containsMorphNamedDescendant(element)) {
|
|
98367
|
+
out.push(...flattenMorphElements(children8, offsetX + element.x, offsetY + element.y));
|
|
98368
|
+
continue;
|
|
98369
|
+
}
|
|
98370
|
+
out.push(toAbsolute(element, offsetX, offsetY));
|
|
98371
|
+
}
|
|
98372
|
+
return out;
|
|
98373
|
+
}
|
|
98374
|
+
var SAME_BOX_TOLERANCE_PX = 0.5;
|
|
98337
98375
|
function getElementMorphName(element) {
|
|
98338
98376
|
if (element.name) {
|
|
98339
98377
|
const name = element.name.trim();
|
|
@@ -98384,12 +98422,14 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
98384
98422
|
const pairs2 = [];
|
|
98385
98423
|
const usedFrom = /* @__PURE__ */ new Set();
|
|
98386
98424
|
const usedTo = /* @__PURE__ */ new Set();
|
|
98387
|
-
|
|
98425
|
+
const fromElements = flattenMorphElements(fromSlide.elements);
|
|
98426
|
+
const toElements = flattenMorphElements(toSlide.elements);
|
|
98427
|
+
for (const fromEl of fromElements) {
|
|
98388
98428
|
const fromName = getElementMorphName(fromEl);
|
|
98389
98429
|
if (!fromName) {
|
|
98390
98430
|
continue;
|
|
98391
98431
|
}
|
|
98392
|
-
for (const toEl of
|
|
98432
|
+
for (const toEl of toElements) {
|
|
98393
98433
|
if (usedTo.has(toEl.id)) {
|
|
98394
98434
|
continue;
|
|
98395
98435
|
}
|
|
@@ -98409,7 +98449,7 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
98409
98449
|
}
|
|
98410
98450
|
return creationIds.get(el.id);
|
|
98411
98451
|
};
|
|
98412
|
-
for (const fromEl of
|
|
98452
|
+
for (const fromEl of fromElements) {
|
|
98413
98453
|
if (usedFrom.has(fromEl.id)) {
|
|
98414
98454
|
continue;
|
|
98415
98455
|
}
|
|
@@ -98417,7 +98457,7 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
98417
98457
|
if (!fromGuid) {
|
|
98418
98458
|
continue;
|
|
98419
98459
|
}
|
|
98420
|
-
for (const toEl of
|
|
98460
|
+
for (const toEl of toElements) {
|
|
98421
98461
|
if (usedTo.has(toEl.id) || fromEl.type !== toEl.type) {
|
|
98422
98462
|
continue;
|
|
98423
98463
|
}
|
|
@@ -98429,11 +98469,11 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
98429
98469
|
}
|
|
98430
98470
|
}
|
|
98431
98471
|
}
|
|
98432
|
-
for (const fromEl of
|
|
98472
|
+
for (const fromEl of fromElements) {
|
|
98433
98473
|
if (usedFrom.has(fromEl.id) || !fromEl.shapeId) {
|
|
98434
98474
|
continue;
|
|
98435
98475
|
}
|
|
98436
|
-
for (const toEl of
|
|
98476
|
+
for (const toEl of toElements) {
|
|
98437
98477
|
if (usedTo.has(toEl.id)) {
|
|
98438
98478
|
continue;
|
|
98439
98479
|
}
|
|
@@ -98448,13 +98488,13 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
98448
98488
|
}
|
|
98449
98489
|
}
|
|
98450
98490
|
}
|
|
98451
|
-
for (const fromEl of
|
|
98491
|
+
for (const fromEl of fromElements) {
|
|
98452
98492
|
if (usedFrom.has(fromEl.id)) {
|
|
98453
98493
|
continue;
|
|
98454
98494
|
}
|
|
98455
98495
|
let bestMatch = null;
|
|
98456
98496
|
let bestDist = Infinity;
|
|
98457
|
-
for (const toEl of
|
|
98497
|
+
for (const toEl of toElements) {
|
|
98458
98498
|
if (usedTo.has(toEl.id)) {
|
|
98459
98499
|
continue;
|
|
98460
98500
|
}
|
|
@@ -98480,8 +98520,24 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
98480
98520
|
usedTo.add(bestMatch.id);
|
|
98481
98521
|
}
|
|
98482
98522
|
}
|
|
98483
|
-
const
|
|
98484
|
-
|
|
98523
|
+
for (const fromEl of fromElements) {
|
|
98524
|
+
if (usedFrom.has(fromEl.id)) {
|
|
98525
|
+
continue;
|
|
98526
|
+
}
|
|
98527
|
+
for (const toEl of toElements) {
|
|
98528
|
+
if (usedTo.has(toEl.id)) {
|
|
98529
|
+
continue;
|
|
98530
|
+
}
|
|
98531
|
+
if (Math.abs(fromEl.x - toEl.x) <= SAME_BOX_TOLERANCE_PX && Math.abs(fromEl.y - toEl.y) <= SAME_BOX_TOLERANCE_PX && Math.abs(fromEl.width - toEl.width) <= SAME_BOX_TOLERANCE_PX && Math.abs(fromEl.height - toEl.height) <= SAME_BOX_TOLERANCE_PX) {
|
|
98532
|
+
pairs2.push({ fromElement: fromEl, toElement: toEl });
|
|
98533
|
+
usedFrom.add(fromEl.id);
|
|
98534
|
+
usedTo.add(toEl.id);
|
|
98535
|
+
break;
|
|
98536
|
+
}
|
|
98537
|
+
}
|
|
98538
|
+
}
|
|
98539
|
+
const unmatchedFrom = fromElements.filter((el) => !usedFrom.has(el.id));
|
|
98540
|
+
const unmatchedTo = toElements.filter((el) => !usedTo.has(el.id));
|
|
98485
98541
|
return { pairs: pairs2, unmatchedFrom, unmatchedTo };
|
|
98486
98542
|
}
|
|
98487
98543
|
function tokenizeText(element, mode) {
|
|
@@ -98728,13 +98784,12 @@ function generateMorphAnimations(pairs2, durationMs, _mode = "object") {
|
|
|
98728
98784
|
const sy = Math.max(fromElement.height, 1) / Math.max(toElement.height, 1);
|
|
98729
98785
|
const fromOpacity = fromElement.opacity ?? 1;
|
|
98730
98786
|
const toOpacity = toElement.opacity ?? 1;
|
|
98731
|
-
const fromRot = fromElement.rotation ?? 0;
|
|
98732
98787
|
const toRot = toElement.rotation ?? 0;
|
|
98788
|
+
const fromRot = shortestRotationTarget(toRot, fromElement.rotation ?? 0);
|
|
98733
98789
|
const flips = `${toElement.flipHorizontal ? " scaleX(-1)" : ""}${toElement.flipVertical ? " scaleY(-1)" : ""}`;
|
|
98734
|
-
const crossfades = morphPairNeedsCrossfade(fromElement, toElement);
|
|
98735
98790
|
const fromProps = [
|
|
98736
98791
|
` transform: translate(${dx}px, ${dy}px) scale(${sx}, ${sy}) rotate(${fromRot}deg)${flips};`,
|
|
98737
|
-
` opacity: ${
|
|
98792
|
+
` opacity: ${fromOpacity};`
|
|
98738
98793
|
];
|
|
98739
98794
|
const toProps = [
|
|
98740
98795
|
` transform: translate(0, 0) scale(1, 1) rotate(${toRot}deg)${flips};`,
|
|
@@ -98778,7 +98833,7 @@ function generateMorphGhostAnimations(pairs2, durationMs, startIndex) {
|
|
|
98778
98833
|
const sx = Math.max(toElement.width, 1) / Math.max(fromElement.width, 1);
|
|
98779
98834
|
const sy = Math.max(toElement.height, 1) / Math.max(fromElement.height, 1);
|
|
98780
98835
|
const fromRot = fromElement.rotation ?? 0;
|
|
98781
|
-
const toRot = toElement.rotation ?? 0;
|
|
98836
|
+
const toRot = shortestRotationTarget(fromRot, toElement.rotation ?? 0);
|
|
98782
98837
|
const flips = `${fromElement.flipHorizontal ? " scaleX(-1)" : ""}${fromElement.flipVertical ? " scaleY(-1)" : ""}`;
|
|
98783
98838
|
const keyframes = `
|
|
98784
98839
|
@keyframes ${safeName} {
|
|
@@ -98801,6 +98856,15 @@ function generateMorphGhostAnimations(pairs2, durationMs, startIndex) {
|
|
|
98801
98856
|
}
|
|
98802
98857
|
return animations;
|
|
98803
98858
|
}
|
|
98859
|
+
function shortestRotationTarget(fromDeg, toDeg) {
|
|
98860
|
+
let delta = (toDeg - fromDeg) % 360;
|
|
98861
|
+
if (delta > 180) {
|
|
98862
|
+
delta -= 360;
|
|
98863
|
+
} else if (delta <= -180) {
|
|
98864
|
+
delta += 360;
|
|
98865
|
+
}
|
|
98866
|
+
return fromDeg + delta;
|
|
98867
|
+
}
|
|
98804
98868
|
function staticTransformSuffix(el) {
|
|
98805
98869
|
const rot = el.rotation ?? 0;
|
|
98806
98870
|
return ` rotate(${rot}deg)${el.flipHorizontal ? " scaleX(-1)" : ""}${el.flipVertical ? " scaleY(-1)" : ""}`;
|
|
@@ -98916,7 +98980,7 @@ function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object
|
|
|
98916
98980
|
return void 0;
|
|
98917
98981
|
}
|
|
98918
98982
|
const animations = generateFullMorphTransition(fromSlide, toSlide, durationMs, mode);
|
|
98919
|
-
const outgoingElements =
|
|
98983
|
+
const outgoingElements = flattenMorphElements(fromSlide.elements);
|
|
98920
98984
|
const outgoingIds = new Set(outgoingElements.map((element) => element.id));
|
|
98921
98985
|
const incomingAnimations = /* @__PURE__ */ new Map();
|
|
98922
98986
|
const outgoingAnimations = /* @__PURE__ */ new Map();
|
|
@@ -101294,6 +101358,11 @@ var INSTANT = {
|
|
|
101294
101358
|
};
|
|
101295
101359
|
var DEFAULT_TRANSITION_DURATION_MS = 1e3;
|
|
101296
101360
|
var DEFAULT_MORPH_DURATION_MS = 2e3;
|
|
101361
|
+
var TRANSITION_SPEED_DURATION_MS = {
|
|
101362
|
+
fast: 500,
|
|
101363
|
+
med: 750,
|
|
101364
|
+
slow: 1e3
|
|
101365
|
+
};
|
|
101297
101366
|
var EASE = "ease-in-out";
|
|
101298
101367
|
var P14_TRANSITION_KEYFRAMES = `
|
|
101299
101368
|
/* \u2500\u2500 Conveyor (translate X with staggered timing) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
@@ -102504,6 +102573,10 @@ function resolveTransitionDurationMs(transition) {
|
|
|
102504
102573
|
if (typeof transition.durationMs === "number" && transition.durationMs > 0) {
|
|
102505
102574
|
return transition.durationMs;
|
|
102506
102575
|
}
|
|
102576
|
+
const speedMs = transition.speed ? TRANSITION_SPEED_DURATION_MS[transition.speed] : void 0;
|
|
102577
|
+
if (typeof speedMs === "number") {
|
|
102578
|
+
return speedMs;
|
|
102579
|
+
}
|
|
102507
102580
|
if (transition.type === "morph") {
|
|
102508
102581
|
return DEFAULT_MORPH_DURATION_MS;
|
|
102509
102582
|
}
|
|
Binary file
|
|
Binary file
|