pptx-react-viewer 4.1.3 → 4.1.5
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 +19 -0
- package/dist/{AiChatPanel-JRTQN34D.mjs → AiChatPanel-UF3TZGAQ.mjs} +3 -53
- package/dist/AiChatPanel-UF3TZGAQ.mjs.br +0 -0
- package/dist/AiChatPanel-UF3TZGAQ.mjs.gz +0 -0
- package/dist/{AiChatPanel-VZ62ZQNU.js → AiChatPanel-ZBT7PKJR.js} +27 -77
- package/dist/AiChatPanel-ZBT7PKJR.js.br +0 -0
- package/dist/AiChatPanel-ZBT7PKJR.js.gz +0 -0
- package/dist/{Area3DChartScene-QCH4NNZL.mjs → Area3DChartScene-FEXGRMWJ.mjs} +1 -1
- package/dist/{Area3DChartScene-QCH4NNZL.mjs.br → Area3DChartScene-FEXGRMWJ.mjs.br} +0 -0
- package/dist/Area3DChartScene-FEXGRMWJ.mjs.gz +0 -0
- package/dist/{Area3DChartScene-VQNCRSDZ.js → Area3DChartScene-JTROOJSK.js} +2 -2
- package/dist/{Area3DChartScene-VQNCRSDZ.js.br → Area3DChartScene-JTROOJSK.js.br} +0 -0
- package/dist/Area3DChartScene-JTROOJSK.js.gz +0 -0
- package/dist/{Bar3DChartScene-VBRVQVN6.mjs → Bar3DChartScene-P4U4BRVA.mjs} +1 -1
- package/dist/{Bar3DChartScene-VBRVQVN6.mjs.br → Bar3DChartScene-P4U4BRVA.mjs.br} +0 -0
- package/dist/Bar3DChartScene-P4U4BRVA.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-NPZT66IK.js → Bar3DChartScene-QX5RUSRA.js} +2 -2
- package/dist/Bar3DChartScene-QX5RUSRA.js.br +0 -0
- package/dist/Bar3DChartScene-QX5RUSRA.js.gz +0 -0
- package/dist/{Line3DChartScene-7XGQ6QFQ.mjs → Line3DChartScene-6NCPU5DB.mjs} +1 -1
- package/dist/{Line3DChartScene-7XGQ6QFQ.mjs.br → Line3DChartScene-6NCPU5DB.mjs.br} +0 -0
- package/dist/Line3DChartScene-6NCPU5DB.mjs.gz +0 -0
- package/dist/{Line3DChartScene-GJUCVGDL.js → Line3DChartScene-BWTS264J.js} +2 -2
- package/dist/Line3DChartScene-BWTS264J.js.br +0 -0
- package/dist/Line3DChartScene-BWTS264J.js.gz +0 -0
- package/dist/{Model3DScene-7E7BU5Y2.js → Model3DScene-IFAV52XV.js} +2 -2
- package/dist/Model3DScene-IFAV52XV.js.br +0 -0
- package/dist/Model3DScene-IFAV52XV.js.gz +0 -0
- package/dist/{Model3DScene-PBKZNDKB.mjs → Model3DScene-KBKADDJH.mjs} +1 -1
- package/dist/Model3DScene-KBKADDJH.mjs.br +0 -0
- package/dist/Model3DScene-KBKADDJH.mjs.gz +0 -0
- package/dist/{PieChart3DScene-3PVA5VNU.js → PieChart3DScene-BJNUS5VB.js} +2 -2
- package/dist/{PieChart3DScene-3PVA5VNU.js.br → PieChart3DScene-BJNUS5VB.js.br} +0 -0
- package/dist/PieChart3DScene-BJNUS5VB.js.gz +0 -0
- package/dist/{PieChart3DScene-5XSEZSYN.mjs → PieChart3DScene-RPKCSINA.mjs} +1 -1
- package/dist/{PieChart3DScene-5XSEZSYN.mjs.br → PieChart3DScene-RPKCSINA.mjs.br} +0 -0
- package/dist/PieChart3DScene-RPKCSINA.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-A5HYFHRW.js → SurfaceChart3DScene-FOU6J6ZR.js} +2 -2
- package/dist/SurfaceChart3DScene-FOU6J6ZR.js.br +0 -0
- package/dist/SurfaceChart3DScene-FOU6J6ZR.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-GIOWPS46.mjs → SurfaceChart3DScene-HI35BLTV.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-GIOWPS46.mjs.br → SurfaceChart3DScene-HI35BLTV.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-HI35BLTV.mjs.gz +0 -0
- package/dist/{chunk-YOQ32RE2.js → chunk-D6K76ELX.js} +32 -5
- package/dist/chunk-D6K76ELX.js.br +0 -0
- package/dist/chunk-D6K76ELX.js.gz +0 -0
- package/dist/{chunk-HMYXURQE.mjs → chunk-GUNIJ6LG.mjs} +27 -2
- package/dist/chunk-GUNIJ6LG.mjs.br +0 -0
- package/dist/chunk-GUNIJ6LG.mjs.gz +0 -0
- package/dist/{chunk-JALEH4XN.js → chunk-GUXPTFLX.js} +173 -173
- package/dist/chunk-GUXPTFLX.js.br +0 -0
- package/dist/chunk-GUXPTFLX.js.gz +0 -0
- package/dist/{chunk-NP7VD6WD.js → chunk-IIRZO7I2.js} +810 -805
- package/dist/chunk-IIRZO7I2.js.br +0 -0
- package/dist/chunk-IIRZO7I2.js.gz +0 -0
- package/dist/{chunk-HOTRF22H.mjs → chunk-OKDFNVIT.mjs} +22 -17
- package/dist/chunk-OKDFNVIT.mjs.br +0 -0
- package/dist/chunk-OKDFNVIT.mjs.gz +0 -0
- package/dist/{chunk-FDDLPJ4X.js → chunk-Q7PKJ6AQ.js} +1072 -1066
- package/dist/chunk-Q7PKJ6AQ.js.br +0 -0
- package/dist/chunk-Q7PKJ6AQ.js.gz +0 -0
- package/dist/{chunk-5BXSMQGL.js → chunk-RAZKPNMR.js} +29 -16
- package/dist/chunk-RAZKPNMR.js.br +0 -0
- package/dist/{chunk-5BXSMQGL.js.gz → chunk-RAZKPNMR.js.gz} +0 -0
- package/dist/{chunk-T6LATGKT.mjs → chunk-TIJQMK3M.mjs} +16 -10
- package/dist/chunk-TIJQMK3M.mjs.br +0 -0
- package/dist/chunk-TIJQMK3M.mjs.gz +0 -0
- package/dist/{chunk-56W6FT53.mjs → chunk-UVMS5TV6.mjs} +29 -17
- package/dist/chunk-UVMS5TV6.mjs.br +0 -0
- package/dist/{chunk-56W6FT53.mjs.gz → chunk-UVMS5TV6.mjs.gz} +0 -0
- package/dist/{chunk-3CEKODIF.mjs → chunk-YFZPV7QM.mjs} +1 -1
- package/dist/chunk-YFZPV7QM.mjs.br +0 -0
- package/dist/{chunk-3CEKODIF.mjs.gz → chunk-YFZPV7QM.mjs.gz} +0 -0
- package/dist/index.js +47 -47
- 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.d.ts +2 -0
- package/dist/internals.js +104 -104
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.js +26 -26
- 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-JRTQN34D.mjs.br +0 -0
- package/dist/AiChatPanel-JRTQN34D.mjs.gz +0 -0
- package/dist/AiChatPanel-VZ62ZQNU.js.br +0 -0
- package/dist/AiChatPanel-VZ62ZQNU.js.gz +0 -0
- package/dist/Area3DChartScene-QCH4NNZL.mjs.gz +0 -0
- package/dist/Area3DChartScene-VQNCRSDZ.js.gz +0 -0
- package/dist/Bar3DChartScene-NPZT66IK.js.br +0 -0
- package/dist/Bar3DChartScene-NPZT66IK.js.gz +0 -0
- package/dist/Bar3DChartScene-VBRVQVN6.mjs.gz +0 -0
- package/dist/Line3DChartScene-7XGQ6QFQ.mjs.gz +0 -0
- package/dist/Line3DChartScene-GJUCVGDL.js.br +0 -0
- package/dist/Line3DChartScene-GJUCVGDL.js.gz +0 -0
- package/dist/Model3DScene-7E7BU5Y2.js.br +0 -0
- package/dist/Model3DScene-7E7BU5Y2.js.gz +0 -0
- package/dist/Model3DScene-PBKZNDKB.mjs.br +0 -0
- package/dist/Model3DScene-PBKZNDKB.mjs.gz +0 -0
- package/dist/PieChart3DScene-3PVA5VNU.js.gz +0 -0
- package/dist/PieChart3DScene-5XSEZSYN.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-A5HYFHRW.js.br +0 -0
- package/dist/SurfaceChart3DScene-A5HYFHRW.js.gz +0 -0
- package/dist/SurfaceChart3DScene-GIOWPS46.mjs.gz +0 -0
- package/dist/chunk-3CEKODIF.mjs.br +0 -0
- package/dist/chunk-56W6FT53.mjs.br +0 -0
- package/dist/chunk-5BXSMQGL.js.br +0 -0
- package/dist/chunk-FDDLPJ4X.js.br +0 -0
- package/dist/chunk-FDDLPJ4X.js.gz +0 -0
- package/dist/chunk-HMYXURQE.mjs.br +0 -0
- package/dist/chunk-HMYXURQE.mjs.gz +0 -0
- package/dist/chunk-HOTRF22H.mjs.br +0 -0
- package/dist/chunk-HOTRF22H.mjs.gz +0 -0
- package/dist/chunk-JALEH4XN.js.br +0 -0
- package/dist/chunk-JALEH4XN.js.gz +0 -0
- package/dist/chunk-NP7VD6WD.js.br +0 -0
- package/dist/chunk-NP7VD6WD.js.gz +0 -0
- package/dist/chunk-T6LATGKT.mjs.br +0 -0
- package/dist/chunk-T6LATGKT.mjs.gz +0 -0
- package/dist/chunk-YOQ32RE2.js.br +0 -0
- package/dist/chunk-YOQ32RE2.js.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ A release listed with no entries carried no Conventional Commit in this package'
|
|
|
7
7
|
scope: scripts/release-plan.mjs re-releases a package whenever any of its files
|
|
8
8
|
change, not only on conventional ones.
|
|
9
9
|
|
|
10
|
+
## [4.1.4](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@4.1.4) - 2026-09-22
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **ai:** Keep optional sdk imports out of message helpers (by @ChristopherVR) ([889c5bc](https://github.com/ChristopherVR/pptx-viewer/commit/889c5bc870f2fd3acac78f5cafa106c7e00c2959))
|
|
15
|
+
- **react:** Constrain slide thumbnail frames to preview width (by @ChristopherVR) ([08369c2](https://github.com/ChristopherVR/pptx-viewer/commit/08369c2ae1534e3eaea636ccef87eae636373bdb))
|
|
16
|
+
- **layout:** Render inherited artwork on inserted slides (by @ChristopherVR) ([179aa2f](https://github.com/ChristopherVR/pptx-viewer/commit/179aa2f6390dda0cdad6818e017119402642bd87))
|
|
17
|
+
|
|
18
|
+
## [4.1.3](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@4.1.3) - 2026-09-21
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **deps:** Align ai sdk runtime and adapters (by @ChristopherVR) ([3a7d2e9](https://github.com/ChristopherVR/pptx-viewer/commit/3a7d2e978885b02be4541b27c4d44b64846412ac))
|
|
23
|
+
- **autosave:** Acknowledge restores and surface delete failures ([#339](https://github.com/ChristopherVR/pptx-viewer/issues/339)) (by @yunfeizhu) ([e0f9569](https://github.com/ChristopherVR/pptx-viewer/commit/e0f9569efb5352b42e4499d1e7244708f894b8a6))
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
- **deps:** Bump @ai-sdk/react from 4.0.110 to 4.0.108 ([#335](https://github.com/ChristopherVR/pptx-viewer/issues/335)) (by @dependabot[bot]) ([56c7005](https://github.com/ChristopherVR/pptx-viewer/commit/56c7005c53b9f1aa9ca6bc5f4357d7cc4fd5983d))
|
|
28
|
+
|
|
10
29
|
## [4.1.2](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@4.1.2) - 2026-09-21
|
|
11
30
|
|
|
12
31
|
### Bug Fixes
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { deckIdFromBridge, isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, mergeTablesDirective, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { deckIdFromBridge, isAiAvailable, createAiChatSession, extractReadyToolCalls, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, mergeTablesDirective, toRenderableParts, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-GUNIJ6LG.mjs';
|
|
2
|
+
import { cn } from './chunk-YFZPV7QM.mjs';
|
|
3
|
+
import './chunk-UVMS5TV6.mjs';
|
|
4
4
|
import './chunk-PC7H3C5W.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';
|
|
8
8
|
import { LuSparkles, LuX, LuLoaderCircle, LuTriangleAlert, LuHistory, LuMessageSquarePlus, LuTrash2, LuPlus, LuGitMerge, LuCrosshair, LuPinOff, LuPin, LuUser, LuBot, LuCheck, LuSquare, LuSend, LuMessageSquare, LuPalette, LuUndo2, LuWrench, LuStickyNote, LuFilm, LuNavigation, LuSearch, LuMove, LuChartColumn, LuLayoutTemplate, LuTable, LuShapes, LuType, LuEye } from 'react-icons/lu';
|
|
9
|
-
import { isToolUIPart, isDynamicToolUIPart, getToolOrDynamicToolName, isTextUIPart } from 'ai';
|
|
10
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
10
|
|
|
12
11
|
function useAiChat(bridge, config) {
|
|
@@ -49,55 +48,6 @@ function useAiChat(bridge, config) {
|
|
|
49
48
|
}, [bridge]);
|
|
50
49
|
return { state, session, initError };
|
|
51
50
|
}
|
|
52
|
-
var READY_TOOL_STATES = /* @__PURE__ */ new Set([
|
|
53
|
-
"input-available",
|
|
54
|
-
"output-available",
|
|
55
|
-
"output-error"
|
|
56
|
-
]);
|
|
57
|
-
function extractReadyToolCalls(messages) {
|
|
58
|
-
const out = [];
|
|
59
|
-
for (const message of messages) {
|
|
60
|
-
for (const part of message.parts) {
|
|
61
|
-
if (!isToolUIPart(part) && !isDynamicToolUIPart(part)) {
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
const tp = part;
|
|
65
|
-
const toolCallId = tp.toolCallId ?? "";
|
|
66
|
-
if (toolCallId.length === 0 || tp.input === void 0) {
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
if (!READY_TOOL_STATES.has(tp.state ?? "")) {
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
out.push({ toolName: getToolOrDynamicToolName(part), toolCallId, input: tp.input });
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return out;
|
|
76
|
-
}
|
|
77
|
-
function toRenderableParts(message) {
|
|
78
|
-
const out = [];
|
|
79
|
-
for (const part of message.parts) {
|
|
80
|
-
if (isTextUIPart(part)) {
|
|
81
|
-
if (part.text.trim().length > 0) {
|
|
82
|
-
out.push({ kind: "text", text: part.text });
|
|
83
|
-
}
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
if (isToolUIPart(part) || isDynamicToolUIPart(part)) {
|
|
87
|
-
const tp = part;
|
|
88
|
-
out.push({
|
|
89
|
-
kind: "tool",
|
|
90
|
-
toolName: getToolOrDynamicToolName(part),
|
|
91
|
-
toolCallId: tp.toolCallId ?? "",
|
|
92
|
-
state: tp.state ?? "input-streaming",
|
|
93
|
-
input: tp.input,
|
|
94
|
-
output: tp.output,
|
|
95
|
-
errorText: tp.errorText
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return out;
|
|
100
|
-
}
|
|
101
51
|
|
|
102
52
|
// src/viewer/hooks/ai/ai-context-transport.ts
|
|
103
53
|
function injectDeckContext(messages, context) {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkD6K76ELX_js = require('./chunk-D6K76ELX.js');
|
|
4
|
+
var chunkGUXPTFLX_js = require('./chunk-GUXPTFLX.js');
|
|
5
|
+
require('./chunk-RAZKPNMR.js');
|
|
6
6
|
require('./chunk-NXGUR2DO.js');
|
|
7
7
|
require('./chunk-4VNS5WPM.js');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
10
|
var lu = require('react-icons/lu');
|
|
11
|
-
var ai = require('ai');
|
|
12
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
12
|
|
|
14
13
|
function useAiChat(bridge, config) {
|
|
@@ -23,7 +22,7 @@ function useAiChat(bridge, config) {
|
|
|
23
22
|
setInitError(void 0);
|
|
24
23
|
void (async () => {
|
|
25
24
|
try {
|
|
26
|
-
const available = await
|
|
25
|
+
const available = await chunkD6K76ELX_js.isAiAvailable();
|
|
27
26
|
if (cancelled) {
|
|
28
27
|
return;
|
|
29
28
|
}
|
|
@@ -31,7 +30,7 @@ function useAiChat(bridge, config) {
|
|
|
31
30
|
setState("unavailable");
|
|
32
31
|
return;
|
|
33
32
|
}
|
|
34
|
-
const built = await
|
|
33
|
+
const built = await chunkD6K76ELX_js.createAiChatSession(bridge, configRef.current);
|
|
35
34
|
if (cancelled) {
|
|
36
35
|
return;
|
|
37
36
|
}
|
|
@@ -51,55 +50,6 @@ function useAiChat(bridge, config) {
|
|
|
51
50
|
}, [bridge]);
|
|
52
51
|
return { state, session, initError };
|
|
53
52
|
}
|
|
54
|
-
var READY_TOOL_STATES = /* @__PURE__ */ new Set([
|
|
55
|
-
"input-available",
|
|
56
|
-
"output-available",
|
|
57
|
-
"output-error"
|
|
58
|
-
]);
|
|
59
|
-
function extractReadyToolCalls(messages) {
|
|
60
|
-
const out = [];
|
|
61
|
-
for (const message of messages) {
|
|
62
|
-
for (const part of message.parts) {
|
|
63
|
-
if (!ai.isToolUIPart(part) && !ai.isDynamicToolUIPart(part)) {
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
const tp = part;
|
|
67
|
-
const toolCallId = tp.toolCallId ?? "";
|
|
68
|
-
if (toolCallId.length === 0 || tp.input === void 0) {
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
if (!READY_TOOL_STATES.has(tp.state ?? "")) {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
out.push({ toolName: ai.getToolOrDynamicToolName(part), toolCallId, input: tp.input });
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return out;
|
|
78
|
-
}
|
|
79
|
-
function toRenderableParts(message) {
|
|
80
|
-
const out = [];
|
|
81
|
-
for (const part of message.parts) {
|
|
82
|
-
if (ai.isTextUIPart(part)) {
|
|
83
|
-
if (part.text.trim().length > 0) {
|
|
84
|
-
out.push({ kind: "text", text: part.text });
|
|
85
|
-
}
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
if (ai.isToolUIPart(part) || ai.isDynamicToolUIPart(part)) {
|
|
89
|
-
const tp = part;
|
|
90
|
-
out.push({
|
|
91
|
-
kind: "tool",
|
|
92
|
-
toolName: ai.getToolOrDynamicToolName(part),
|
|
93
|
-
toolCallId: tp.toolCallId ?? "",
|
|
94
|
-
state: tp.state ?? "input-streaming",
|
|
95
|
-
input: tp.input,
|
|
96
|
-
output: tp.output,
|
|
97
|
-
errorText: tp.errorText
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return out;
|
|
102
|
-
}
|
|
103
53
|
|
|
104
54
|
// src/viewer/hooks/ai/ai-context-transport.ts
|
|
105
55
|
function injectDeckContext(messages, context) {
|
|
@@ -137,7 +87,7 @@ function withDeckContext(inner, bridge, strategy) {
|
|
|
137
87
|
}
|
|
138
88
|
let context = "";
|
|
139
89
|
try {
|
|
140
|
-
context = await
|
|
90
|
+
context = await chunkD6K76ELX_js.buildDeckContext(bridge, { strategy, focus: {} });
|
|
141
91
|
} catch {
|
|
142
92
|
context = "";
|
|
143
93
|
}
|
|
@@ -195,12 +145,12 @@ function useAiConversation(useChat, session, config, bridge, options = {}) {
|
|
|
195
145
|
chatRef.current = chat;
|
|
196
146
|
react.useEffect(() => {
|
|
197
147
|
const seen = seenToolCallsRef.current;
|
|
198
|
-
for (const call of extractReadyToolCalls(chat.messages)) {
|
|
148
|
+
for (const call of chunkD6K76ELX_js.extractReadyToolCalls(chat.messages)) {
|
|
199
149
|
if (seen.has(call.toolCallId)) {
|
|
200
150
|
continue;
|
|
201
151
|
}
|
|
202
152
|
seen.add(call.toolCallId);
|
|
203
|
-
onToolTargetRef.current?.(
|
|
153
|
+
onToolTargetRef.current?.(chunkD6K76ELX_js.toolCanvasTarget(call.toolName, call.input));
|
|
204
154
|
}
|
|
205
155
|
}, [chat.messages]);
|
|
206
156
|
const send = react.useCallback(
|
|
@@ -234,7 +184,7 @@ function useAiConversation(useChat, session, config, bridge, options = {}) {
|
|
|
234
184
|
const setMessages = react.useCallback(
|
|
235
185
|
(next) => {
|
|
236
186
|
chat.setMessages(next);
|
|
237
|
-
for (const call of extractReadyToolCalls(next)) {
|
|
187
|
+
for (const call of chunkD6K76ELX_js.extractReadyToolCalls(next)) {
|
|
238
188
|
seenToolCallsRef.current.add(call.toolCallId);
|
|
239
189
|
}
|
|
240
190
|
session.proposals.clear();
|
|
@@ -276,7 +226,7 @@ function deriveTitle(messages) {
|
|
|
276
226
|
}
|
|
277
227
|
function useAiHistory(input) {
|
|
278
228
|
const { deckId, messages, setMessages } = input;
|
|
279
|
-
const store = react.useMemo(() => input.store ??
|
|
229
|
+
const store = react.useMemo(() => input.store ?? chunkD6K76ELX_js.createChatHistoryStore(), [input.store]);
|
|
280
230
|
const [activeChatId, setActiveChatId] = react.useState(newChatId);
|
|
281
231
|
const [chats, setChats] = react.useState([]);
|
|
282
232
|
const createdAtRef = react.useRef(Date.now());
|
|
@@ -419,7 +369,7 @@ function AiComposer({
|
|
|
419
369
|
disabled: value.trim().length === 0,
|
|
420
370
|
title: t("pptx.ai.send"),
|
|
421
371
|
"aria-label": t("pptx.ai.send"),
|
|
422
|
-
className:
|
|
372
|
+
className: chunkGUXPTFLX_js.cn(
|
|
423
373
|
"shrink-0 rounded-sm p-1.5 transition-colors",
|
|
424
374
|
value.trim().length === 0 ? "text-muted-foreground/50" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
425
375
|
),
|
|
@@ -442,15 +392,15 @@ function AiFocusBar({
|
|
|
442
392
|
onClearPicks
|
|
443
393
|
}) {
|
|
444
394
|
const { t } = reactI18next.useTranslation();
|
|
445
|
-
const chips =
|
|
446
|
-
const twoTables =
|
|
395
|
+
const chips = chunkD6K76ELX_js.focusTargetChips(targets, slides);
|
|
396
|
+
const twoTables = chunkD6K76ELX_js.isTwoTableFocus(targets, slides);
|
|
447
397
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border bg-secondary/30", children: [
|
|
448
398
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1 px-2.5 py-1.5", children: [
|
|
449
399
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: t("pptx.ai.focusScope") }),
|
|
450
400
|
chips.map((chip) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
451
401
|
"span",
|
|
452
402
|
{
|
|
453
|
-
className:
|
|
403
|
+
className: chunkGUXPTFLX_js.cn(
|
|
454
404
|
"inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
|
|
455
405
|
hasPicks || isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground"
|
|
456
406
|
),
|
|
@@ -466,7 +416,7 @@ function AiFocusBar({
|
|
|
466
416
|
{
|
|
467
417
|
type: "button",
|
|
468
418
|
onClick: () => onSendDirective(
|
|
469
|
-
|
|
419
|
+
chunkD6K76ELX_js.mergeTablesDirective(
|
|
470
420
|
twoTables.slideIndex,
|
|
471
421
|
twoTables.elementIdA,
|
|
472
422
|
twoTables.elementIdB
|
|
@@ -487,7 +437,7 @@ function AiFocusBar({
|
|
|
487
437
|
title: t("pptx.ai.pickElement"),
|
|
488
438
|
"aria-label": t("pptx.ai.pickAria"),
|
|
489
439
|
"aria-pressed": pickMode,
|
|
490
|
-
className:
|
|
440
|
+
className: chunkGUXPTFLX_js.cn(
|
|
491
441
|
"rounded-sm p-1 max-md:min-w-[44px]! max-md:min-h-[44px]! flex items-center justify-center",
|
|
492
442
|
pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
|
|
493
443
|
),
|
|
@@ -566,7 +516,7 @@ function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
|
|
|
566
516
|
{
|
|
567
517
|
type: "button",
|
|
568
518
|
onClick: () => onResume(chat.id),
|
|
569
|
-
className:
|
|
519
|
+
className: chunkGUXPTFLX_js.cn(
|
|
570
520
|
"flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent",
|
|
571
521
|
chat.id === activeChatId && "bg-accent/60"
|
|
572
522
|
),
|
|
@@ -721,26 +671,26 @@ function AiToolCallCard({ part }) {
|
|
|
721
671
|
const failed = part.state === "output-error";
|
|
722
672
|
const done = part.state === "output-available";
|
|
723
673
|
const running = !failed && !done;
|
|
724
|
-
const activity =
|
|
674
|
+
const activity = chunkD6K76ELX_js.describeToolActivity(part.toolName, part.input, running ? "present" : "past");
|
|
725
675
|
const Icon = ICONS[activity.icon] ?? lu.LuWrench;
|
|
726
|
-
const rawSummary =
|
|
676
|
+
const rawSummary = chunkD6K76ELX_js.summarizeToolArgs(part.input);
|
|
727
677
|
const statusLabel = failed ? t("pptx.ai.toolFailed") : done ? t("pptx.ai.toolDone") : t("pptx.ai.toolRunning");
|
|
728
678
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[12px]", children: [
|
|
729
679
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
730
680
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
731
681
|
Icon,
|
|
732
682
|
{
|
|
733
|
-
className:
|
|
683
|
+
className: chunkGUXPTFLX_js.cn(
|
|
734
684
|
"w-3.5 h-3.5 shrink-0",
|
|
735
685
|
failed ? "text-destructive" : "text-muted-foreground"
|
|
736
686
|
)
|
|
737
687
|
}
|
|
738
688
|
),
|
|
739
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
689
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkGUXPTFLX_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
|
|
740
690
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
741
691
|
"span",
|
|
742
692
|
{
|
|
743
|
-
className:
|
|
693
|
+
className: chunkGUXPTFLX_js.cn(
|
|
744
694
|
"ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]",
|
|
745
695
|
failed ? "bg-destructive/15 text-destructive" : done ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
746
696
|
),
|
|
@@ -757,7 +707,7 @@ function AiToolCallCard({ part }) {
|
|
|
757
707
|
rawSummary && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group mt-0.5 pl-5", children: [
|
|
758
708
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer list-none text-[10px] text-muted-foreground/70 hover:text-muted-foreground", children: t("pptx.ai.toolDetails") }),
|
|
759
709
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-0.5 break-words font-mono text-[10px] text-muted-foreground/80", children: [
|
|
760
|
-
|
|
710
|
+
chunkD6K76ELX_js.toolLabel(part.toolName),
|
|
761
711
|
": ",
|
|
762
712
|
rawSummary
|
|
763
713
|
] })
|
|
@@ -780,7 +730,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
780
730
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-3 overflow-y-auto px-3 py-3", children: [
|
|
781
731
|
messages.map((message) => {
|
|
782
732
|
const isUser = message.role === "user";
|
|
783
|
-
const parts = toRenderableParts(message);
|
|
733
|
+
const parts = chunkD6K76ELX_js.toRenderableParts(message);
|
|
784
734
|
if (parts.length === 0 && !isUser) {
|
|
785
735
|
return null;
|
|
786
736
|
}
|
|
@@ -788,7 +738,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
788
738
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
789
739
|
"div",
|
|
790
740
|
{
|
|
791
|
-
className:
|
|
741
|
+
className: chunkGUXPTFLX_js.cn(
|
|
792
742
|
"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
|
|
793
743
|
isUser ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary"
|
|
794
744
|
),
|
|
@@ -835,7 +785,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
835
785
|
}
|
|
836
786
|
function AiProposalCard({ proposal, onAccept, onReject }) {
|
|
837
787
|
const { t } = reactI18next.useTranslation();
|
|
838
|
-
const lines = proposal.summary.map(
|
|
788
|
+
const lines = proposal.summary.map(chunkD6K76ELX_js.humanizeDiffLine);
|
|
839
789
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md border border-primary/40 bg-primary/5 p-2.5", children: [
|
|
840
790
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary", children: t("pptx.ai.proposedChange") }),
|
|
841
791
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[12px] font-medium text-foreground", children: proposal.label }),
|
|
@@ -1043,7 +993,7 @@ function AiChatPanel({
|
|
|
1043
993
|
}) {
|
|
1044
994
|
const { t } = reactI18next.useTranslation();
|
|
1045
995
|
const { state, session, initError } = useAiChat(bridge, config);
|
|
1046
|
-
const deckId = react.useMemo(() =>
|
|
996
|
+
const deckId = react.useMemo(() => chunkD6K76ELX_js.deckIdFromBridge(bridge), [bridge]);
|
|
1047
997
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1048
998
|
"div",
|
|
1049
999
|
{
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStableChart3DInteraction, useLatestRef } from './chunk-T6GFCLSM.mjs';
|
|
2
|
-
import { mountAreaChart3D } from './chunk-
|
|
2
|
+
import { mountAreaChart3D } from './chunk-UVMS5TV6.mjs';
|
|
3
3
|
import './chunk-XGB3TDIC.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkRAZKPNMR_js = require('./chunk-RAZKPNMR.js');
|
|
5
5
|
require('./chunk-4VNS5WPM.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -23,7 +23,7 @@ function Area3DChartScene({
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
let disposed = false;
|
|
26
|
-
void
|
|
26
|
+
void chunkRAZKPNMR_js.mountAreaChart3D(container, options, stableInteraction).then((handle) => {
|
|
27
27
|
if (disposed) {
|
|
28
28
|
handle.dispose();
|
|
29
29
|
} else {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStableChart3DInteraction, useLatestRef } from './chunk-T6GFCLSM.mjs';
|
|
2
|
-
import { mountBarChart3D } from './chunk-
|
|
2
|
+
import { mountBarChart3D } from './chunk-UVMS5TV6.mjs';
|
|
3
3
|
import './chunk-XGB3TDIC.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkRAZKPNMR_js = require('./chunk-RAZKPNMR.js');
|
|
5
5
|
require('./chunk-4VNS5WPM.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -23,7 +23,7 @@ function Bar3DChartScene({
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
let disposed = false;
|
|
26
|
-
void
|
|
26
|
+
void chunkRAZKPNMR_js.mountBarChart3D(container, options, stableInteraction).then((handle) => {
|
|
27
27
|
if (disposed) {
|
|
28
28
|
handle.dispose();
|
|
29
29
|
} else {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStableChart3DInteraction, useLatestRef } from './chunk-T6GFCLSM.mjs';
|
|
2
|
-
import { mountLineChart3D } from './chunk-
|
|
2
|
+
import { mountLineChart3D } from './chunk-UVMS5TV6.mjs';
|
|
3
3
|
import './chunk-XGB3TDIC.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkRAZKPNMR_js = require('./chunk-RAZKPNMR.js');
|
|
5
5
|
require('./chunk-4VNS5WPM.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -23,7 +23,7 @@ function Line3DChartScene({
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
let disposed = false;
|
|
26
|
-
void
|
|
26
|
+
void chunkRAZKPNMR_js.mountLineChart3D(container, options, stableInteraction).then((handle) => {
|
|
27
27
|
if (disposed) {
|
|
28
28
|
handle.dispose();
|
|
29
29
|
} else {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRAZKPNMR_js = require('./chunk-RAZKPNMR.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 chunkRAZKPNMR_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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkRAZKPNMR_js = require('./chunk-RAZKPNMR.js');
|
|
5
5
|
require('./chunk-4VNS5WPM.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -21,7 +21,7 @@ function PieChart3DScene({
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
let disposed = false;
|
|
24
|
-
void
|
|
24
|
+
void chunkRAZKPNMR_js.mountPieChart3D(container, options, stableInteraction).then((handle) => {
|
|
25
25
|
if (disposed) {
|
|
26
26
|
handle.dispose();
|
|
27
27
|
} else {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStableChart3DInteraction, useLatestRef } from './chunk-T6GFCLSM.mjs';
|
|
2
|
-
import { mountPieChart3D } from './chunk-
|
|
2
|
+
import { mountPieChart3D } from './chunk-UVMS5TV6.mjs';
|
|
3
3
|
import './chunk-XGB3TDIC.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDNR6CH6I_js = require('./chunk-DNR6CH6I.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkRAZKPNMR_js = require('./chunk-RAZKPNMR.js');
|
|
5
5
|
require('./chunk-4VNS5WPM.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -23,7 +23,7 @@ function SurfaceChart3DScene({
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
let disposed = false;
|
|
26
|
-
void
|
|
26
|
+
void chunkRAZKPNMR_js.mountSurfaceChart3D(container, options, stableInteraction).then((handle) => {
|
|
27
27
|
if (disposed) {
|
|
28
28
|
handle.dispose();
|
|
29
29
|
} else {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStableChart3DInteraction, useLatestRef } from './chunk-T6GFCLSM.mjs';
|
|
2
|
-
import { mountSurfaceChart3D } from './chunk-
|
|
2
|
+
import { mountSurfaceChart3D } from './chunk-UVMS5TV6.mjs';
|
|
3
3
|
import './chunk-XGB3TDIC.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
Binary file
|
|
Binary file
|