pptx-react-viewer 2.16.3 → 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.
Files changed (97) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{AiChatPanel-RGIINA3S.mjs → AiChatPanel-7DDN4QUA.mjs} +3 -3
  3. package/dist/AiChatPanel-7DDN4QUA.mjs.br +0 -0
  4. package/dist/AiChatPanel-7DDN4QUA.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-2WWE5U3X.js → AiChatPanel-KEORKCTT.js} +22 -22
  6. package/dist/AiChatPanel-KEORKCTT.js.br +0 -0
  7. package/dist/AiChatPanel-KEORKCTT.js.gz +0 -0
  8. package/dist/{Model3DScene-2ZP3V2P2.mjs → Model3DScene-DEAQMMUS.mjs} +1 -1
  9. package/dist/Model3DScene-DEAQMMUS.mjs.br +0 -0
  10. package/dist/Model3DScene-DEAQMMUS.mjs.gz +0 -0
  11. package/dist/{Model3DScene-D2ZJ5XGR.js → Model3DScene-SBUYEWHL.js} +2 -2
  12. package/dist/Model3DScene-SBUYEWHL.js.br +0 -0
  13. package/dist/Model3DScene-SBUYEWHL.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-DWQ3IP5C.js → SurfaceChart3DScene-I5D54YQ3.js} +2 -2
  15. package/dist/SurfaceChart3DScene-I5D54YQ3.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-I5D54YQ3.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-L7YPNZ7X.mjs → SurfaceChart3DScene-TXGS2PBK.mjs} +1 -1
  18. package/dist/SurfaceChart3DScene-TXGS2PBK.mjs.br +0 -0
  19. package/dist/SurfaceChart3DScene-TXGS2PBK.mjs.gz +0 -0
  20. package/dist/{chunk-KMT3SLZC.mjs → chunk-23WSCMWN.mjs} +91 -19
  21. package/dist/chunk-23WSCMWN.mjs.br +0 -0
  22. package/dist/{chunk-KMT3SLZC.mjs.gz → chunk-23WSCMWN.mjs.gz} +0 -0
  23. package/dist/{chunk-ZYBVQXLR.js → chunk-FQ3FTNKV.js} +1054 -1054
  24. package/dist/chunk-FQ3FTNKV.js.br +0 -0
  25. package/dist/chunk-FQ3FTNKV.js.gz +0 -0
  26. package/dist/{chunk-FVWVEWUG.mjs → chunk-GSAOP4Z4.mjs} +7 -7
  27. package/dist/chunk-GSAOP4Z4.mjs.br +0 -0
  28. package/dist/chunk-GSAOP4Z4.mjs.gz +0 -0
  29. package/dist/{chunk-LBP6BUD4.js → chunk-GZ2V3PWN.js} +3 -3
  30. package/dist/chunk-GZ2V3PWN.js.br +0 -0
  31. package/dist/chunk-GZ2V3PWN.js.gz +0 -0
  32. package/dist/{chunk-KTWK3D6O.js → chunk-HAQDKQ52.js} +255 -255
  33. package/dist/chunk-HAQDKQ52.js.br +0 -0
  34. package/dist/chunk-HAQDKQ52.js.gz +0 -0
  35. package/dist/{chunk-JHDAOYRQ.mjs → chunk-J4QZVO3S.mjs} +1 -1
  36. package/dist/chunk-J4QZVO3S.mjs.br +0 -0
  37. package/dist/chunk-J4QZVO3S.mjs.gz +0 -0
  38. package/dist/{chunk-OZ3HGL6E.mjs → chunk-LLTUDPRE.mjs} +2 -2
  39. package/dist/chunk-LLTUDPRE.mjs.br +0 -0
  40. package/dist/{chunk-OZ3HGL6E.mjs.gz → chunk-LLTUDPRE.mjs.gz} +0 -0
  41. package/dist/{chunk-2UVKMKRP.js → chunk-MZ47MV52.js} +91 -19
  42. package/dist/chunk-MZ47MV52.js.br +0 -0
  43. package/dist/{chunk-2UVKMKRP.js.gz → chunk-MZ47MV52.js.gz} +0 -0
  44. package/dist/{chunk-EBLFH3R2.mjs → chunk-PLBS7OL2.mjs} +2 -2
  45. package/dist/chunk-PLBS7OL2.mjs.br +0 -0
  46. package/dist/chunk-PLBS7OL2.mjs.gz +0 -0
  47. package/dist/{chunk-U7SASWG4.js → chunk-RBQUSVYR.js} +340 -340
  48. package/dist/chunk-RBQUSVYR.js.br +0 -0
  49. package/dist/chunk-RBQUSVYR.js.gz +0 -0
  50. package/dist/index.js +39 -39
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +5 -5
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/internals.js +78 -78
  57. package/dist/internals.js.br +0 -0
  58. package/dist/internals.js.gz +0 -0
  59. package/dist/internals.mjs +3 -3
  60. package/dist/internals.mjs.br +0 -0
  61. package/dist/internals.mjs.gz +0 -0
  62. package/dist/viewer/index.js +26 -26
  63. package/dist/viewer/index.js.br +0 -0
  64. package/dist/viewer/index.js.gz +0 -0
  65. package/dist/viewer/index.mjs +5 -5
  66. package/dist/viewer/index.mjs.br +0 -0
  67. package/dist/viewer/index.mjs.gz +0 -0
  68. package/package.json +2 -2
  69. package/dist/AiChatPanel-2WWE5U3X.js.br +0 -0
  70. package/dist/AiChatPanel-2WWE5U3X.js.gz +0 -0
  71. package/dist/AiChatPanel-RGIINA3S.mjs.br +0 -0
  72. package/dist/AiChatPanel-RGIINA3S.mjs.gz +0 -0
  73. package/dist/Model3DScene-2ZP3V2P2.mjs.br +0 -0
  74. package/dist/Model3DScene-2ZP3V2P2.mjs.gz +0 -0
  75. package/dist/Model3DScene-D2ZJ5XGR.js.br +0 -0
  76. package/dist/Model3DScene-D2ZJ5XGR.js.gz +0 -0
  77. package/dist/SurfaceChart3DScene-DWQ3IP5C.js.br +0 -0
  78. package/dist/SurfaceChart3DScene-DWQ3IP5C.js.gz +0 -0
  79. package/dist/SurfaceChart3DScene-L7YPNZ7X.mjs.br +0 -0
  80. package/dist/SurfaceChart3DScene-L7YPNZ7X.mjs.gz +0 -0
  81. package/dist/chunk-2UVKMKRP.js.br +0 -0
  82. package/dist/chunk-EBLFH3R2.mjs.br +0 -0
  83. package/dist/chunk-EBLFH3R2.mjs.gz +0 -0
  84. package/dist/chunk-FVWVEWUG.mjs.br +0 -0
  85. package/dist/chunk-FVWVEWUG.mjs.gz +0 -0
  86. package/dist/chunk-JHDAOYRQ.mjs.br +0 -0
  87. package/dist/chunk-JHDAOYRQ.mjs.gz +0 -0
  88. package/dist/chunk-KMT3SLZC.mjs.br +0 -0
  89. package/dist/chunk-KTWK3D6O.js.br +0 -0
  90. package/dist/chunk-KTWK3D6O.js.gz +0 -0
  91. package/dist/chunk-LBP6BUD4.js.br +0 -0
  92. package/dist/chunk-LBP6BUD4.js.gz +0 -0
  93. package/dist/chunk-OZ3HGL6E.mjs.br +0 -0
  94. package/dist/chunk-U7SASWG4.js.br +0 -0
  95. package/dist/chunk-U7SASWG4.js.gz +0 -0
  96. package/dist/chunk-ZYBVQXLR.js.br +0 -0
  97. package/dist/chunk-ZYBVQXLR.js.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ 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
+
7
19
  ## [2.16.2](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.16.2) - 2026-08-08
8
20
 
9
21
  ## [2.16.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@2.16.1) - 2026-08-07
@@ -1,7 +1,7 @@
1
- import { isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-JHDAOYRQ.mjs';
2
- import { cn } from './chunk-EBLFH3R2.mjs';
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
3
  import './chunk-5IUEPQTK.mjs';
4
- import './chunk-KMT3SLZC.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 chunkLBP6BUD4_js = require('./chunk-LBP6BUD4.js');
4
- var chunkKTWK3D6O_js = require('./chunk-KTWK3D6O.js');
3
+ var chunkGZ2V3PWN_js = require('./chunk-GZ2V3PWN.js');
4
+ var chunkHAQDKQ52_js = require('./chunk-HAQDKQ52.js');
5
5
  require('./chunk-DVZF4ARG.js');
6
- require('./chunk-2UVKMKRP.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 chunkLBP6BUD4_js.isAiAvailable();
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 chunkLBP6BUD4_js.createAiChatSession(bridge, configRef.current);
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 chunkLBP6BUD4_js.buildDeckContext(bridge, { strategy, focus: {} });
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?.(chunkLBP6BUD4_js.toolCanvasTarget(call.toolName, call.input));
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 ?? chunkLBP6BUD4_js.createChatHistoryStore(), [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: chunkKTWK3D6O_js.cn(
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 = chunkLBP6BUD4_js.focusTargetChips(targets, slides);
455
- const twoTables = chunkLBP6BUD4_js.isTwoTableFocus(targets, slides);
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: chunkKTWK3D6O_js.cn(
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: chunkKTWK3D6O_js.cn(
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: chunkKTWK3D6O_js.cn(
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 = chunkLBP6BUD4_js.describeToolActivity(part.toolName, part.input, running ? "present" : "past");
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 = chunkLBP6BUD4_js.summarizeToolArgs(part.input);
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: chunkKTWK3D6O_js.cn(
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: chunkKTWK3D6O_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
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: chunkKTWK3D6O_js.cn(
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
- chunkLBP6BUD4_js.toolLabel(part.toolName),
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: chunkKTWK3D6O_js.cn(
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(chunkLBP6BUD4_js.humanizeDiffLine);
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
@@ -1,4 +1,4 @@
1
- import { mountModel3D } from './chunk-KMT3SLZC.mjs';
1
+ import { mountModel3D } from './chunk-23WSCMWN.mjs';
2
2
  import './chunk-XGB3TDIC.mjs';
3
3
  import { useRef, useEffect } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2UVKMKRP_js = require('./chunk-2UVKMKRP.js');
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 chunk2UVKMKRP_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
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 chunk2UVKMKRP_js = require('./chunk-2UVKMKRP.js');
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 chunk2UVKMKRP_js.mountSurfaceChart3D(container, {
28
+ void chunkMZ47MV52_js.mountSurfaceChart3D(container, {
29
29
  cols,
30
30
  rows,
31
31
  heightMap,
@@ -1,4 +1,4 @@
1
- import { mountSurfaceChart3D } from './chunk-KMT3SLZC.mjs';
1
+ import { mountSurfaceChart3D } from './chunk-23WSCMWN.mjs';
2
2
  import './chunk-XGB3TDIC.mjs';
3
3
  import { useRef, useEffect } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -108027,19 +108027,21 @@ function childrenPair(a, b) {
108027
108027
  }
108028
108028
  return boxOverlapRatio(a, b) >= CHILD_OVERLAP_RATIO;
108029
108029
  }
108030
- function childrenCorrespond(a, b) {
108030
+ function correspondingChildren(a, b) {
108031
108031
  if (a.length !== b.length || a.length === 0) {
108032
- return false;
108032
+ return void 0;
108033
108033
  }
108034
108034
  const unclaimed = b.map((child22) => child22);
108035
+ const paired = [];
108035
108036
  for (const child22 of a) {
108036
108037
  const index = unclaimed.findIndex((candidate) => childrenPair(child22, candidate));
108037
108038
  if (index < 0) {
108038
- return false;
108039
+ return void 0;
108039
108040
  }
108041
+ paired.push([child22, unclaimed[index]]);
108040
108042
  unclaimed.splice(index, 1);
108041
108043
  }
108042
- return true;
108044
+ return paired;
108043
108045
  }
108044
108046
  function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
108045
108047
  const out = [];
@@ -108048,7 +108050,7 @@ function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
108048
108050
  if (children8 && containsMorphNamedDescendant(element)) {
108049
108051
  const twin = correspondingGroup(element, counterpart);
108050
108052
  const twinChildren = twin ? groupChildren(twin) ?? [] : void 0;
108051
- if (twinChildren && childrenCorrespond(children8, twinChildren)) {
108053
+ if (twinChildren && correspondingChildren(children8, twinChildren)) {
108052
108054
  out.push(
108053
108055
  ...flattenMorphElements(children8, twinChildren, offsetX + element.x, offsetY + element.y)
108054
108056
  );
@@ -108059,6 +108061,29 @@ function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
108059
108061
  }
108060
108062
  return out;
108061
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
+ }
108062
108087
  var OUTLINE_SAMPLE_COUNT = 64;
108063
108088
  var ELLIPSE_SAMPLE_COUNT = 48;
108064
108089
  function resolveLength(token2, axis) {
@@ -108525,6 +108550,23 @@ function matchMorphElementsFull(fromSlide, toSlide) {
108525
108550
  }
108526
108551
  }
108527
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
+ }
108528
108570
  for (const fromEl of fromElements) {
108529
108571
  if (usedFrom.has(fromEl.id) || !fromEl.shapeId) {
108530
108572
  continue;
@@ -108631,7 +108673,7 @@ function buildMorphMergedOrder(outgoing, incoming, pairs2) {
108631
108673
  flushOutgoingBelow(outgoing.length);
108632
108674
  return rank;
108633
108675
  }
108634
- function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds) {
108676
+ function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds, dissolvingInIds = /* @__PURE__ */ new Set()) {
108635
108677
  const rank = buildMorphMergedOrder(outgoing, incoming, pairs2);
108636
108678
  const matched = new Set(pairs2.map((pair) => pair.toElement.id));
108637
108679
  const counterpart = new Map(pairs2.map((pair) => [pair.fromElement.id, pair.toElement]));
@@ -108641,7 +108683,7 @@ function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds
108641
108683
  }));
108642
108684
  const lifted = /* @__PURE__ */ new Set();
108643
108685
  for (const element of incoming) {
108644
- if (matched.has(element.id)) {
108686
+ if (matched.has(element.id) && !dissolvingInIds.has(element.id)) {
108645
108687
  continue;
108646
108688
  }
108647
108689
  const mine = rank.get(element.id) ?? 0;
@@ -108706,6 +108748,21 @@ function tokenizeText(element, mode) {
108706
108748
  }
108707
108749
  return tokens;
108708
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
+ }
108709
108766
  function diffTokens(fromTokens, toTokens) {
108710
108767
  const n = fromTokens.length;
108711
108768
  const m = toTokens.length;
@@ -108904,6 +108961,9 @@ function resolveMorphGhostIds(outgoingElements, pairs2) {
108904
108961
  }
108905
108962
  return painted;
108906
108963
  }
108964
+ function morphPairIncomingFadesIn(fromElement, toElement, ghosted = true) {
108965
+ return !(ghosted && isInertMorphPair(fromElement, toElement)) && morphPairNeedsCrossfade(fromElement, toElement) && crossfadeIncomingMayFadeIn(toElement);
108966
+ }
108907
108967
  function crossfadeIncomingMayFadeIn(element) {
108908
108968
  const image = element;
108909
108969
  if (image.imagePath || image.svgPath) {
@@ -108934,17 +108994,18 @@ function generateMorphAnimations(pairs2, durationMs, _mode = "object", ghostIds)
108934
108994
  continue;
108935
108995
  }
108936
108996
  const safeName = `pptx-morph-${index}-${toElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
108937
- const dx = fromElement.x + fromElement.width / 2 - (toElement.x + toElement.width / 2);
108938
- const dy = fromElement.y + fromElement.height / 2 - (toElement.y + toElement.height / 2);
108939
- const sx = Math.max(fromElement.width, 1) / Math.max(toElement.width, 1);
108940
- const sy = Math.max(fromElement.height, 1) / Math.max(toElement.height, 1);
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);
108941
109002
  const fromOpacity = fromElement.opacity ?? 1;
108942
109003
  const toOpacity = toElement.opacity ?? 1;
108943
109004
  const toRot = toElement.rotation ?? 0;
108944
- const fromRot = shortestRotationTarget(toRot, fromElement.rotation ?? 0);
109005
+ const fromRot = inSlot ? toRot : shortestRotationTarget(toRot, fromElement.rotation ?? 0);
108945
109006
  const flips = `${toElement.flipHorizontal ? " scaleX(-1)" : ""}${toElement.flipVertical ? " scaleY(-1)" : ""}`;
108946
109007
  const inert = ghosted && isInertMorphPair(fromElement, toElement);
108947
- const crossfadesIn = !inert && morphPairNeedsCrossfade(fromElement, toElement) && crossfadeIncomingMayFadeIn(toElement);
109008
+ const crossfadesIn = morphPairIncomingFadesIn(fromElement, toElement, ghosted);
108948
109009
  const fromProps = [
108949
109010
  ` transform: translate(${dx}px, ${dy}px) scale(${sx}, ${sy}) rotate(${fromRot}deg)${flips};`
108950
109011
  ];
@@ -108999,12 +109060,13 @@ function generateMorphGhostAnimations(pairs2, durationMs, startIndex, ghostIds)
108999
109060
  }
109000
109061
  const fadesOut = morphPairNeedsCrossfade(fromElement, toElement);
109001
109062
  const safeName = `pptx-morph-ghost-${startIndex + index}-${fromElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
109002
- const dx = toElement.x + toElement.width / 2 - (fromElement.x + fromElement.width / 2);
109003
- const dy = toElement.y + toElement.height / 2 - (fromElement.y + fromElement.height / 2);
109004
- const sx = Math.max(toElement.width, 1) / Math.max(fromElement.width, 1);
109005
- const sy = Math.max(toElement.height, 1) / Math.max(fromElement.height, 1);
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);
109006
109068
  const fromRot = fromElement.rotation ?? 0;
109007
- const toRot = shortestRotationTarget(fromRot, toElement.rotation ?? 0);
109069
+ const toRot = inSlot ? fromRot : shortestRotationTarget(fromRot, toElement.rotation ?? 0);
109008
109070
  const flips = `${fromElement.flipHorizontal ? " scaleX(-1)" : ""}${fromElement.flipVertical ? " scaleY(-1)" : ""}`;
109009
109071
  const opacity2 = fromElement.opacity ?? 1;
109010
109072
  const keyframes = `
@@ -109222,11 +109284,21 @@ function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object
109222
109284
  (candidate) => outgoingAnimations.has(candidate.fromElement.id) && !morphPairNeedsCrossfade(candidate.fromElement, candidate.toElement)
109223
109285
  ).map((candidate) => candidate.fromElement.id)
109224
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
+ );
109225
109296
  const lifted = resolveMorphOverlayArrivals(
109226
109297
  flattenedOutgoing,
109227
109298
  flattenedIncoming,
109228
109299
  match.pairs,
109229
- holdingGhostIds
109300
+ holdingGhostIds,
109301
+ dissolvingInIds
109230
109302
  );
109231
109303
  const overlayIncomingAnimations = /* @__PURE__ */ new Map();
109232
109304
  for (const id of lifted) {
Binary file