pptx-vue-viewer 2.13.0 → 2.13.2
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 +12 -0
- package/dist/{AiChatPanel-B8Ql84M5.cjs → AiChatPanel-CtoBtOtB.cjs} +143 -139
- package/dist/AiChatPanel-CtoBtOtB.cjs.br +0 -0
- package/dist/AiChatPanel-CtoBtOtB.cjs.gz +0 -0
- package/dist/AiChatPanel-xSeCJVHJ.js +512 -0
- package/dist/AiChatPanel-xSeCJVHJ.js.br +0 -0
- package/dist/AiChatPanel-xSeCJVHJ.js.gz +0 -0
- package/dist/{dist-Pa1hVhzE.cjs → dist-CNLUj2f9.cjs} +6474 -6381
- package/dist/dist-CNLUj2f9.cjs.br +0 -0
- package/dist/dist-CNLUj2f9.cjs.gz +0 -0
- package/dist/{dist-CkupeMQB.js → dist-CrzKtRxp.js} +6374 -6281
- package/dist/dist-CrzKtRxp.js.br +0 -0
- package/dist/dist-CrzKtRxp.js.gz +0 -0
- package/dist/gif-encoder-N24YqPHj.js +2 -0
- package/dist/gif-encoder-N24YqPHj.js.br +0 -0
- package/dist/gif-encoder-N24YqPHj.js.gz +0 -0
- package/dist/gif-encoder-xPQiQFxW.cjs +2 -0
- package/dist/gif-encoder-xPQiQFxW.cjs.br +0 -0
- package/dist/gif-encoder-xPQiQFxW.cjs.gz +0 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.br +0 -0
- package/dist/index.cjs.gz +0 -0
- package/dist/index.js +3 -3
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/internals.cjs +1 -1
- package/dist/internals.cjs.br +0 -0
- package/dist/internals.cjs.gz +0 -0
- package/dist/internals.js +2 -2
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/{useViewerSettingsDialog-CY1t9MEH.cjs → useViewerSettingsDialog-BSsouEGv.cjs} +4023 -3940
- package/dist/useViewerSettingsDialog-BSsouEGv.cjs.br +0 -0
- package/dist/useViewerSettingsDialog-BSsouEGv.cjs.gz +0 -0
- package/dist/{useViewerSettingsDialog-B-QhCt02.js → useViewerSettingsDialog-CiRnHsjC.js} +3554 -3486
- package/dist/useViewerSettingsDialog-CiRnHsjC.js.br +0 -0
- package/dist/useViewerSettingsDialog-CiRnHsjC.js.gz +0 -0
- package/dist/viewer/components/ElementMediaBox.vue.d.ts.map +1 -1
- package/dist/viewer/components/PresentationMode.vue.d.ts.map +1 -1
- package/dist/viewer/components/ai/AiChatPanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/ai/AiConversation.vue.d.ts.map +1 -1
- package/dist/viewer/composables/ai/useAiConversation.d.ts +3 -1
- package/dist/viewer/composables/ai/useAiConversation.d.ts.map +1 -1
- package/dist/viewer/composables/cross-slide-audio.d.ts +12 -0
- package/dist/viewer/composables/cross-slide-audio.d.ts.map +1 -0
- package/dist/viewer/composables/usePresentationVisibilityPause.d.ts +11 -0
- package/dist/viewer/composables/usePresentationVisibilityPause.d.ts.map +1 -0
- package/dist/viewer/composables/useSlideAutoAdvance.d.ts +7 -0
- package/dist/viewer/composables/useSlideAutoAdvance.d.ts.map +1 -1
- package/dist/viewer/index.cjs +1 -1
- package/dist/viewer/index.cjs.br +0 -0
- package/dist/viewer/index.cjs.gz +0 -0
- package/dist/viewer/index.js +3 -3
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/{viewer-Bq3ngZeA.js → viewer-BVGVczOF.js} +9387 -9360
- package/dist/viewer-BVGVczOF.js.br +0 -0
- package/dist/viewer-BVGVczOF.js.gz +0 -0
- package/dist/{viewer-SRdb6B8w.cjs → viewer-CKGNkLtj.cjs} +5448 -5421
- package/dist/viewer-CKGNkLtj.cjs.br +0 -0
- package/dist/viewer-CKGNkLtj.cjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-B8Ql84M5.cjs.br +0 -0
- package/dist/AiChatPanel-B8Ql84M5.cjs.gz +0 -0
- package/dist/AiChatPanel-Pd17JAHM.js +0 -509
- package/dist/AiChatPanel-Pd17JAHM.js.br +0 -0
- package/dist/AiChatPanel-Pd17JAHM.js.gz +0 -0
- package/dist/dist-CkupeMQB.js.br +0 -0
- package/dist/dist-CkupeMQB.js.gz +0 -0
- package/dist/dist-Pa1hVhzE.cjs.br +0 -0
- package/dist/dist-Pa1hVhzE.cjs.gz +0 -0
- package/dist/gif-encoder-BclZ9xjR.cjs +0 -2
- package/dist/gif-encoder-BclZ9xjR.cjs.br +0 -0
- package/dist/gif-encoder-BclZ9xjR.cjs.gz +0 -0
- package/dist/gif-encoder-DNWK0lM2.js +0 -2
- package/dist/gif-encoder-DNWK0lM2.js.br +0 -0
- package/dist/gif-encoder-DNWK0lM2.js.gz +0 -0
- package/dist/useViewerSettingsDialog-B-QhCt02.js.br +0 -0
- package/dist/useViewerSettingsDialog-B-QhCt02.js.gz +0 -0
- package/dist/useViewerSettingsDialog-CY1t9MEH.cjs.br +0 -0
- package/dist/useViewerSettingsDialog-CY1t9MEH.cjs.gz +0 -0
- package/dist/viewer-Bq3ngZeA.js.br +0 -0
- package/dist/viewer-Bq3ngZeA.js.gz +0 -0
- package/dist/viewer-SRdb6B8w.cjs.br +0 -0
- package/dist/viewer-SRdb6B8w.cjs.gz +0 -0
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptx-vue-viewer",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.2",
|
|
4
4
|
"description": "Vue 3 PowerPoint viewer and editor component: render, edit, and export PPTX slides in the browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"editor",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"terser": "^5.49.0",
|
|
97
97
|
"three": "^0.185.1",
|
|
98
98
|
"typescript": "6.0.3",
|
|
99
|
-
"vite": "^8.
|
|
99
|
+
"vite": "^8.2.0",
|
|
100
100
|
"vite-plugin-dts": "^5.0.3",
|
|
101
101
|
"vitest": "^4.1.10",
|
|
102
102
|
"vue-tsc": "^3.3.7",
|
|
Binary file
|
|
Binary file
|
|
@@ -1,509 +0,0 @@
|
|
|
1
|
-
import { hn as e } from "./useViewerSettingsDialog-B-QhCt02.js";
|
|
2
|
-
import { S as t, _ as a, c as r, f as s, g as l, h as o, m as i, o as n, p, s as d, v as c, y as u } from "./viewer-Bq3ngZeA.js";
|
|
3
|
-
import { Fragment as m, computed as x, createBlock as g, createCommentVNode as f, createElementBlock as b, createElementVNode as v, createTextVNode as y, createVNode as h, defineComponent as k, nextTick as w, normalizeClass as P, normalizeStyle as C, onBeforeUnmount as S, openBlock as T, ref as I, renderList as A, resolveDynamicComponent as _, shallowRef as E, toDisplayString as j, unref as F, vModelText as B, watch as M, withDirectives as D } from "vue";
|
|
4
|
-
import { Bot as N, ChartColumn as R, Check as W, Crosshair as $, Eye as H, Film as V, GitMerge as z, LayoutTemplate as K, LoaderCircle as L, Move as O, Navigation as U, Palette as q, Pin as G, PinOff as J, Search as Q, Send as X, Shapes as Y, Sparkles as Z, Square as ee, StickyNote as te, Table as ae, Trash2 as re, TriangleAlert as se, Type as le, User as oe, Wrench as ie, X as ne } from "lucide-vue-next";
|
|
5
|
-
import { useChat as pe } from "@ai-sdk/vue";
|
|
6
|
-
import { getToolOrDynamicToolName as de, isDynamicToolUIPart as ce, isToolUIPart as ue } from "ai";
|
|
7
|
-
var me = /* @__PURE__ */ new Set([
|
|
8
|
-
"input-available",
|
|
9
|
-
"output-available",
|
|
10
|
-
"output-error"
|
|
11
|
-
]);
|
|
12
|
-
function xe(e, t, a = {}) {
|
|
13
|
-
const r = I(e.proposals.list()), s = () => {
|
|
14
|
-
r.value = e.proposals.list();
|
|
15
|
-
}, l = pe({
|
|
16
|
-
transport: e.transport,
|
|
17
|
-
sendAutomaticallyWhen: e.sendAutomaticallyWhen,
|
|
18
|
-
onError: (e) => t.onError?.(e),
|
|
19
|
-
onToolCall: async ({ toolCall: t }) => {
|
|
20
|
-
const { toolName: a, toolCallId: r, input: o } = t, i = l.addToolOutput;
|
|
21
|
-
try {
|
|
22
|
-
i({
|
|
23
|
-
tool: a,
|
|
24
|
-
toolCallId: r,
|
|
25
|
-
output: await e.executeToolCall(a, o)
|
|
26
|
-
});
|
|
27
|
-
} catch (e) {
|
|
28
|
-
i({
|
|
29
|
-
tool: a,
|
|
30
|
-
toolCallId: r,
|
|
31
|
-
state: "output-error",
|
|
32
|
-
errorText: e instanceof Error ? e.message : String(e)
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
s();
|
|
36
|
-
}
|
|
37
|
-
}), o = x(() => "submitted" === l.status.value || "streaming" === l.status.value), i = /* @__PURE__ */ new Set();
|
|
38
|
-
M(l.messages, (e) => {
|
|
39
|
-
for (const t of function(e) {
|
|
40
|
-
const t = [];
|
|
41
|
-
for (const a of e) for (const e of a.parts) {
|
|
42
|
-
if (!ue(e) && !ce(e)) continue;
|
|
43
|
-
const a = e, r = a.toolCallId ?? "";
|
|
44
|
-
0 !== r.length && void 0 !== a.input && me.has(a.state ?? "") && t.push({
|
|
45
|
-
toolName: de(e),
|
|
46
|
-
toolCallId: r,
|
|
47
|
-
input: a.input
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return t;
|
|
51
|
-
}(e)) i.has(t.toolCallId) || (i.add(t.toolCallId), a.onToolTarget?.(c(t.toolName, t.input)));
|
|
52
|
-
}, { deep: !0 });
|
|
53
|
-
return {
|
|
54
|
-
messages: l.messages,
|
|
55
|
-
status: l.status,
|
|
56
|
-
error: l.error,
|
|
57
|
-
isStreaming: o,
|
|
58
|
-
proposals: r,
|
|
59
|
-
send: (e) => {
|
|
60
|
-
const t = e.trim();
|
|
61
|
-
0 !== t.length && l.sendMessage({ text: t });
|
|
62
|
-
},
|
|
63
|
-
stop: () => {
|
|
64
|
-
l.stop();
|
|
65
|
-
},
|
|
66
|
-
clearError: () => l.clearError(),
|
|
67
|
-
applyProposal: (t) => {
|
|
68
|
-
e.proposals.apply(t), s();
|
|
69
|
-
},
|
|
70
|
-
rejectProposal: (t) => {
|
|
71
|
-
e.proposals.revert(t), s();
|
|
72
|
-
},
|
|
73
|
-
acceptAllProposals: () => {
|
|
74
|
-
e.proposals.acceptAll(), s();
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
var ge = { class: "border-t border-border p-2" }, fe = { class: "flex items-end gap-1.5 rounded-md border border-input bg-background px-2 py-1.5 focus-within:border-ring" }, be = ["placeholder", "aria-label"], ve = ["title", "aria-label"], ye = [
|
|
79
|
-
"disabled",
|
|
80
|
-
"title",
|
|
81
|
-
"aria-label"
|
|
82
|
-
], he = k({
|
|
83
|
-
__name: "AiComposer",
|
|
84
|
-
props: {
|
|
85
|
-
isStreaming: { type: Boolean },
|
|
86
|
-
prefillText: {},
|
|
87
|
-
prefillNonce: {}
|
|
88
|
-
},
|
|
89
|
-
emits: ["send", "stop"],
|
|
90
|
-
setup(a, { emit: r }) {
|
|
91
|
-
const s = a, l = r, { t: o } = e(), i = I(""), n = I(null), p = x(() => i.value.trim().length > 0);
|
|
92
|
-
function d() {
|
|
93
|
-
const e = i.value.trim();
|
|
94
|
-
0 === e.length || s.isStreaming || (l("send", e), i.value = "");
|
|
95
|
-
}
|
|
96
|
-
function c(e) {
|
|
97
|
-
"Enter" !== e.key || e.shiftKey || (e.preventDefault(), d());
|
|
98
|
-
}
|
|
99
|
-
return M(() => s.prefillNonce, (e) => {
|
|
100
|
-
void 0 !== e && 0 !== e && (s.prefillText && (i.value = s.prefillText), w(() => n.value?.focus()));
|
|
101
|
-
}), (e, a) => (T(), b("div", ge, [v("div", fe, [D(v("textarea", {
|
|
102
|
-
ref_key: "textareaRef",
|
|
103
|
-
ref: n,
|
|
104
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) => i.value = e),
|
|
105
|
-
rows: 1,
|
|
106
|
-
placeholder: F(o)("pptx.ai.placeholder"),
|
|
107
|
-
"aria-label": F(o)("pptx.ai.placeholder"),
|
|
108
|
-
class: "max-h-32 min-h-[1.5rem] flex-1 resize-none bg-transparent text-[13px] text-foreground outline-none placeholder:text-muted-foreground",
|
|
109
|
-
onKeydown: c
|
|
110
|
-
}, null, 40, be), [[B, i.value]]), s.isStreaming ? (T(), b("button", {
|
|
111
|
-
key: 0,
|
|
112
|
-
type: "button",
|
|
113
|
-
title: F(o)("pptx.ai.stop"),
|
|
114
|
-
"aria-label": F(o)("pptx.ai.stop"),
|
|
115
|
-
class: "shrink-0 rounded-sm p-1.5 text-muted-foreground transition-colors hover:bg-accent",
|
|
116
|
-
onClick: a[1] || (a[1] = (e) => l("stop"))
|
|
117
|
-
}, [h(F(ee), { class: "w-4 h-4" })], 8, ve)) : (T(), b("button", {
|
|
118
|
-
key: 1,
|
|
119
|
-
type: "button",
|
|
120
|
-
disabled: !p.value,
|
|
121
|
-
title: F(o)("pptx.ai.send"),
|
|
122
|
-
"aria-label": F(o)("pptx.ai.send"),
|
|
123
|
-
class: P(F(t)("shrink-0 rounded-sm p-1.5 transition-colors", p.value ? "bg-primary text-primary-foreground hover:bg-primary/90" : "text-muted-foreground/50")),
|
|
124
|
-
onClick: d
|
|
125
|
-
}, [h(F(X), { class: "w-4 h-4" })], 10, ye))])]));
|
|
126
|
-
}
|
|
127
|
-
}), ke = { class: "border-b border-border bg-secondary/30" }, we = { class: "flex flex-wrap items-center gap-1 px-2.5 py-1.5" }, Pe = { class: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground" }, Ce = ["title"], Se = { class: "truncate" }, Te = {
|
|
128
|
-
key: 0,
|
|
129
|
-
class: "rounded-full bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium text-primary"
|
|
130
|
-
}, Ie = { class: "ml-auto flex items-center gap-0.5" }, Ae = [
|
|
131
|
-
"title",
|
|
132
|
-
"aria-label",
|
|
133
|
-
"aria-pressed"
|
|
134
|
-
], _e = ["title", "aria-label"], Ee = ["title", "aria-label"], je = {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: "flex items-center gap-2 border-t border-primary/20 bg-primary/5 px-2.5 py-1"
|
|
137
|
-
}, Fe = { class: "text-[11px] font-medium text-primary" }, Be = k({
|
|
138
|
-
__name: "AiFocusBar",
|
|
139
|
-
props: {
|
|
140
|
-
targets: {},
|
|
141
|
-
slides: {},
|
|
142
|
-
isPinned: { type: Boolean },
|
|
143
|
-
pickMode: { type: Boolean },
|
|
144
|
-
hasPicks: { type: Boolean }
|
|
145
|
-
},
|
|
146
|
-
emits: [
|
|
147
|
-
"pin",
|
|
148
|
-
"clear-pin",
|
|
149
|
-
"start-pick",
|
|
150
|
-
"stop-pick",
|
|
151
|
-
"clear-picks",
|
|
152
|
-
"send-directive"
|
|
153
|
-
],
|
|
154
|
-
setup(a, { emit: s }) {
|
|
155
|
-
const l = a, o = s, { t: i } = e(), n = x(() => d(l.targets, l.slides)), p = x(() => r(l.targets, l.slides));
|
|
156
|
-
function c() {
|
|
157
|
-
const e = p.value;
|
|
158
|
-
e && o("send-directive", `Merge the two selected tables (elementIdA=${e.elementIdA}, elementIdB=${e.elementIdB}) on slide ${e.slideIndex + 1} using merge_tables; stage it now, do not ask me to confirm.`);
|
|
159
|
-
}
|
|
160
|
-
return (e, r) => (T(), b("div", ke, [v("div", we, [
|
|
161
|
-
v("span", Pe, j(F(i)("pptx.ai.focusScope")), 1),
|
|
162
|
-
(T(!0), b(m, null, A(n.value, (e) => (T(), b("span", {
|
|
163
|
-
key: e.key,
|
|
164
|
-
class: P(F(t)("inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]", a.hasPicks || a.isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground")),
|
|
165
|
-
title: e.title
|
|
166
|
-
}, [v("span", Se, j(e.label), 1)], 10, Ce))), 128)),
|
|
167
|
-
a.isPinned ? (T(), b("span", Te, j(F(i)("pptx.ai.pinnedFocus")), 1)) : f("", !0),
|
|
168
|
-
v("div", Ie, [
|
|
169
|
-
p.value ? (T(), b("button", {
|
|
170
|
-
key: 0,
|
|
171
|
-
type: "button",
|
|
172
|
-
class: "inline-flex items-center gap-1 rounded-sm bg-primary/90 px-1.5 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary",
|
|
173
|
-
onClick: c
|
|
174
|
-
}, [h(F(z), { class: "w-3 h-3" }), y(" " + j(F(i)("pptx.ai.mergeSelectedTables")), 1)])) : f("", !0),
|
|
175
|
-
v("button", {
|
|
176
|
-
type: "button",
|
|
177
|
-
title: F(i)("pptx.ai.pickElement"),
|
|
178
|
-
"aria-label": F(i)("pptx.ai.pickAria"),
|
|
179
|
-
"aria-pressed": a.pickMode,
|
|
180
|
-
class: P(F(t)("rounded-sm p-1", a.pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent")),
|
|
181
|
-
onClick: r[0] || (r[0] = (e) => a.pickMode ? o("stop-pick") : o("start-pick"))
|
|
182
|
-
}, [h(F($), { class: "w-3.5 h-3.5" })], 10, Ae),
|
|
183
|
-
a.hasPicks ? (T(), b("button", {
|
|
184
|
-
key: 1,
|
|
185
|
-
type: "button",
|
|
186
|
-
title: F(i)("pptx.ai.pickClear"),
|
|
187
|
-
"aria-label": F(i)("pptx.ai.pickClear"),
|
|
188
|
-
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent",
|
|
189
|
-
onClick: r[1] || (r[1] = (e) => o("clear-picks"))
|
|
190
|
-
}, [h(F(ne), { class: "w-3.5 h-3.5" })], 8, _e)) : (T(), b("button", {
|
|
191
|
-
key: 2,
|
|
192
|
-
type: "button",
|
|
193
|
-
title: a.isPinned ? F(i)("pptx.ai.clearFocus") : F(i)("pptx.ai.pinFocus"),
|
|
194
|
-
"aria-label": a.isPinned ? F(i)("pptx.ai.clearFocus") : F(i)("pptx.ai.pinFocus"),
|
|
195
|
-
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent",
|
|
196
|
-
onClick: r[2] || (r[2] = (e) => a.isPinned ? o("clear-pin") : o("pin"))
|
|
197
|
-
}, [a.isPinned ? (T(), g(F(J), {
|
|
198
|
-
key: 0,
|
|
199
|
-
class: "w-3.5 h-3.5"
|
|
200
|
-
})) : (T(), g(F(G), {
|
|
201
|
-
key: 1,
|
|
202
|
-
class: "w-3.5 h-3.5"
|
|
203
|
-
}))], 8, Ee))
|
|
204
|
-
])
|
|
205
|
-
]), a.pickMode ? (T(), b("div", je, [
|
|
206
|
-
h(F($), { class: "w-3.5 h-3.5 shrink-0 animate-pulse text-primary" }),
|
|
207
|
-
v("span", Fe, j(F(i)("pptx.ai.pickElementHint")), 1),
|
|
208
|
-
v("button", {
|
|
209
|
-
type: "button",
|
|
210
|
-
class: "ml-auto rounded-sm bg-primary px-2 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary/90",
|
|
211
|
-
onClick: r[3] || (r[3] = (e) => o("stop-pick"))
|
|
212
|
-
}, j(F(i)("pptx.ai.pickDone")), 1)
|
|
213
|
-
])) : f("", !0)]));
|
|
214
|
-
}
|
|
215
|
-
}), Me = { class: "text-[12px]" }, De = { class: "flex items-center gap-1.5" }, Ne = {
|
|
216
|
-
key: 0,
|
|
217
|
-
class: "mt-1 pl-5 text-[11px] text-destructive"
|
|
218
|
-
}, Re = {
|
|
219
|
-
key: 1,
|
|
220
|
-
class: "group mt-0.5 pl-5"
|
|
221
|
-
}, We = { class: "cursor-pointer list-none text-[10px] text-muted-foreground/70 hover:text-muted-foreground" }, $e = { class: "mt-0.5 break-words font-mono text-[10px] text-muted-foreground/80" }, He = k({
|
|
222
|
-
__name: "AiToolCallCard",
|
|
223
|
-
props: { part: {} },
|
|
224
|
-
setup(a) {
|
|
225
|
-
const r = a, { t: s } = e(), o = {
|
|
226
|
-
view: H,
|
|
227
|
-
text: le,
|
|
228
|
-
shape: Y,
|
|
229
|
-
theme: q,
|
|
230
|
-
table: ae,
|
|
231
|
-
slide: K,
|
|
232
|
-
chart: R,
|
|
233
|
-
move: O,
|
|
234
|
-
delete: re,
|
|
235
|
-
search: Q,
|
|
236
|
-
nav: U,
|
|
237
|
-
animation: V,
|
|
238
|
-
notes: te,
|
|
239
|
-
tool: ie
|
|
240
|
-
}, i = x(() => "output-error" === r.part.state), n = x(() => "output-available" === r.part.state), d = x(() => !i.value && !n.value), c = x(() => p(r.part.toolName, r.part.input, d.value ? "present" : "past")), m = x(() => o[c.value.icon] ?? ie), h = x(() => l(r.part.input)), k = x(() => i.value ? s("pptx.ai.toolFailed") : n.value ? s("pptx.ai.toolDone") : s("pptx.ai.toolRunning"));
|
|
241
|
-
return (e, a) => (T(), b("div", Me, [
|
|
242
|
-
v("div", De, [
|
|
243
|
-
(T(), g(_(m.value), { class: P(F(t)("w-3.5 h-3.5 shrink-0", i.value ? "text-destructive" : "text-muted-foreground")) }, null, 8, ["class"])),
|
|
244
|
-
v("span", { class: P(F(t)("truncate", i.value ? "text-destructive" : "text-foreground")) }, j(c.value.label), 3),
|
|
245
|
-
v("span", { class: P(F(t)("ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]", i.value ? "bg-destructive/15 text-destructive" : n.value ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground")) }, [d.value ? (T(), g(F(L), {
|
|
246
|
-
key: 0,
|
|
247
|
-
class: "w-3 h-3 animate-spin"
|
|
248
|
-
})) : n.value ? (T(), g(F(W), {
|
|
249
|
-
key: 1,
|
|
250
|
-
class: "w-3 h-3"
|
|
251
|
-
})) : (T(), g(F(se), {
|
|
252
|
-
key: 2,
|
|
253
|
-
class: "w-3 h-3"
|
|
254
|
-
})), y(" " + j(k.value), 1)], 2)
|
|
255
|
-
]),
|
|
256
|
-
i.value && r.part.errorText ? (T(), b("div", Ne, j(r.part.errorText), 1)) : f("", !0),
|
|
257
|
-
h.value ? (T(), b("details", Re, [v("summary", We, j(F(s)("pptx.ai.toolDetails")), 1), v("div", $e, j(F(u)(r.part.toolName)) + ": " + j(h.value), 1)])) : f("", !0)
|
|
258
|
-
]));
|
|
259
|
-
}
|
|
260
|
-
}), Ve = {
|
|
261
|
-
key: 0,
|
|
262
|
-
class: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center"
|
|
263
|
-
}, ze = { class: "text-sm font-medium text-foreground" }, Ke = { class: "text-[12px] text-muted-foreground" }, Le = {
|
|
264
|
-
key: 1,
|
|
265
|
-
class: "flex-1 space-y-3 overflow-y-auto px-3 py-3"
|
|
266
|
-
}, Oe = {
|
|
267
|
-
key: 0,
|
|
268
|
-
class: "flex gap-2"
|
|
269
|
-
}, Ue = ["aria-label"], qe = { class: "min-w-0 flex-1 space-y-1.5" }, Ge = {
|
|
270
|
-
key: 0,
|
|
271
|
-
class: "whitespace-pre-wrap break-words text-[13px] leading-relaxed text-foreground"
|
|
272
|
-
}, Je = {
|
|
273
|
-
key: 0,
|
|
274
|
-
class: "flex items-center gap-2 pl-8 text-[12px] text-muted-foreground"
|
|
275
|
-
}, Qe = k({
|
|
276
|
-
__name: "AiMessageList",
|
|
277
|
-
props: {
|
|
278
|
-
messages: {},
|
|
279
|
-
isStreaming: { type: Boolean }
|
|
280
|
-
},
|
|
281
|
-
setup(r) {
|
|
282
|
-
const s = r, { t: l } = e(), o = I(null);
|
|
283
|
-
return M(() => [s.messages, s.isStreaming], () => {
|
|
284
|
-
w(() => o.value?.scrollIntoView({ block: "end" }));
|
|
285
|
-
}, { deep: !0 }), (e, r) => 0 === s.messages.length ? (T(), b("div", Ve, [
|
|
286
|
-
h(F(Z), { class: "w-7 h-7 text-primary/70" }),
|
|
287
|
-
v("p", ze, j(F(l)("pptx.ai.emptyTitle")), 1),
|
|
288
|
-
v("p", Ke, j(F(l)("pptx.ai.emptyHint")), 1)
|
|
289
|
-
])) : (T(), b("div", Le, [
|
|
290
|
-
(T(!0), b(m, null, A(s.messages, (e) => (T(), b(m, { key: e.id }, ["user" === e.role || F(a)(e).length > 0 ? (T(), b("div", Oe, [v("div", {
|
|
291
|
-
class: P(F(t)("mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full", "user" === e.role ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary")),
|
|
292
|
-
"aria-label": "user" === e.role ? F(l)("pptx.ai.you") : F(l)("pptx.ai.assistant")
|
|
293
|
-
}, ["user" === e.role ? (T(), g(F(oe), {
|
|
294
|
-
key: 0,
|
|
295
|
-
class: "w-3.5 h-3.5"
|
|
296
|
-
})) : (T(), g(F(N), {
|
|
297
|
-
key: 1,
|
|
298
|
-
class: "w-3.5 h-3.5"
|
|
299
|
-
}))], 10, Ue), v("div", qe, [(T(!0), b(m, null, A(F(a)(e), (e, t) => (T(), b(m, { key: "tool" === e.kind && e.toolCallId || t }, ["text" === e.kind ? (T(), b("p", Ge, j(e.text), 1)) : (T(), g(He, {
|
|
300
|
-
key: 1,
|
|
301
|
-
part: e
|
|
302
|
-
}, null, 8, ["part"]))], 64))), 128))])])) : f("", !0)], 64))), 128)),
|
|
303
|
-
s.isStreaming ? (T(), b("div", Je, [r[0] || (r[0] = v("span", { class: "inline-flex gap-1" }, [
|
|
304
|
-
v("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-0.2s]" }),
|
|
305
|
-
v("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-0.1s]" }),
|
|
306
|
-
v("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground" })
|
|
307
|
-
], -1)), y(" " + j(F(l)("pptx.ai.thinking")), 1)])) : f("", !0),
|
|
308
|
-
v("div", {
|
|
309
|
-
ref_key: "endRef",
|
|
310
|
-
ref: o
|
|
311
|
-
}, null, 512)
|
|
312
|
-
]));
|
|
313
|
-
}
|
|
314
|
-
}), Xe = { class: "rounded-md border border-primary/40 bg-primary/5 p-2.5" }, Ye = { class: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary" }, Ze = { class: "text-[12px] font-medium text-foreground" }, et = {
|
|
315
|
-
key: 0,
|
|
316
|
-
class: "mt-1 max-h-40 space-y-0.5 overflow-y-auto text-[11px] text-muted-foreground"
|
|
317
|
-
}, tt = { class: "mt-2 flex items-center gap-2" }, at = k({
|
|
318
|
-
__name: "AiProposalCard",
|
|
319
|
-
props: { proposal: {} },
|
|
320
|
-
emits: ["accept", "reject"],
|
|
321
|
-
setup(t, { emit: a }) {
|
|
322
|
-
const r = t, s = a, { t: l } = e(), o = x(() => r.proposal.summary.map(i));
|
|
323
|
-
return (e, t) => (T(), b("div", Xe, [
|
|
324
|
-
v("div", Ye, j(F(l)("pptx.ai.proposedChange")), 1),
|
|
325
|
-
v("div", Ze, j(r.proposal.label), 1),
|
|
326
|
-
o.value.length > 0 ? (T(), b("ul", et, [(T(!0), b(m, null, A(o.value, (e, t) => (T(), b("li", {
|
|
327
|
-
key: t,
|
|
328
|
-
class: "break-words"
|
|
329
|
-
}, j(e), 1))), 128))])) : f("", !0),
|
|
330
|
-
v("div", tt, [v("button", {
|
|
331
|
-
type: "button",
|
|
332
|
-
class: "inline-flex items-center gap-1 rounded-sm bg-primary px-2 py-1 text-[11px] font-medium text-primary-foreground transition-colors hover:bg-primary/90",
|
|
333
|
-
onClick: t[0] || (t[0] = (e) => s("accept", r.proposal.id))
|
|
334
|
-
}, [h(F(W), { class: "w-3.5 h-3.5" }), y(" " + j(F(l)("pptx.ai.accept")), 1)]), v("button", {
|
|
335
|
-
type: "button",
|
|
336
|
-
class: "inline-flex items-center gap-1 rounded-sm border border-border px-2 py-1 text-[11px] text-muted-foreground transition-colors hover:bg-accent",
|
|
337
|
-
onClick: t[1] || (t[1] = (e) => s("reject", r.proposal.id))
|
|
338
|
-
}, [h(F(ne), { class: "w-3.5 h-3.5" }), y(" " + j(F(l)("pptx.ai.reject")), 1)])])
|
|
339
|
-
]));
|
|
340
|
-
}
|
|
341
|
-
}), rt = { class: "flex min-h-0 flex-1 flex-col" }, st = {
|
|
342
|
-
key: 0,
|
|
343
|
-
class: "mx-3 mb-2 flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/5 px-2.5 py-1.5 text-[12px] text-destructive"
|
|
344
|
-
}, lt = { class: "min-w-0 flex-1" }, ot = { class: "font-medium" }, it = { class: "max-h-24 overflow-y-auto break-words text-[11px] opacity-80" }, nt = {
|
|
345
|
-
key: 1,
|
|
346
|
-
class: "max-h-[38%] space-y-2 overflow-y-auto border-t border-border bg-background px-3 py-2"
|
|
347
|
-
}, pt = { class: "flex items-center justify-between" }, dt = { class: "text-[11px] font-semibold uppercase tracking-wide text-muted-foreground" }, ct = k({
|
|
348
|
-
__name: "AiConversation",
|
|
349
|
-
props: {
|
|
350
|
-
session: {},
|
|
351
|
-
config: {},
|
|
352
|
-
bridge: {},
|
|
353
|
-
aiPanel: {}
|
|
354
|
-
},
|
|
355
|
-
setup(t) {
|
|
356
|
-
const a = t, { t: r } = e(), { messages: s, error: l, isStreaming: o, proposals: i, send: n, stop: p, clearError: d, applyProposal: c, rejectProposal: u, acceptAllProposals: y } = xe(a.session, a.config, { onToolTarget: (e) => {
|
|
357
|
-
e && void 0 !== e.slideIndex && a.bridge.goToSlide(e.slideIndex), a.aiPanel.flashToolTarget(e);
|
|
358
|
-
} }), k = a.session.changeAnimator.subscribe((e) => {
|
|
359
|
-
e && a.bridge.goToSlide(e.slideIndex), a.aiPanel.showChangeBatch(e);
|
|
360
|
-
});
|
|
361
|
-
S(() => k());
|
|
362
|
-
const w = x(() => a.aiPanel.pickTargets.value.length > 0), P = x(() => w.value ? a.aiPanel.pickTargets.value : a.aiPanel.pinnedFocus.value ?? a.aiPanel.liveFocusTargets.value), C = x(() => !w.value && null !== a.aiPanel.pinnedFocus.value);
|
|
363
|
-
function I(e) {
|
|
364
|
-
a.aiPanel.flashToolTarget(null), c(e);
|
|
365
|
-
}
|
|
366
|
-
function _() {
|
|
367
|
-
a.aiPanel.flashToolTarget(null), y();
|
|
368
|
-
}
|
|
369
|
-
return (e, t) => (T(), b("div", rt, [
|
|
370
|
-
h(Be, {
|
|
371
|
-
targets: P.value,
|
|
372
|
-
slides: a.bridge.getSlides(),
|
|
373
|
-
"is-pinned": C.value,
|
|
374
|
-
"pick-mode": a.aiPanel.pickMode.value,
|
|
375
|
-
"has-picks": w.value,
|
|
376
|
-
onPin: a.aiPanel.pinFocus,
|
|
377
|
-
onClearPin: a.aiPanel.clearPinnedFocus,
|
|
378
|
-
onStartPick: a.aiPanel.startPicking,
|
|
379
|
-
onStopPick: a.aiPanel.stopPicking,
|
|
380
|
-
onClearPicks: a.aiPanel.clearPicks,
|
|
381
|
-
onSendDirective: F(n)
|
|
382
|
-
}, null, 8, [
|
|
383
|
-
"targets",
|
|
384
|
-
"slides",
|
|
385
|
-
"is-pinned",
|
|
386
|
-
"pick-mode",
|
|
387
|
-
"has-picks",
|
|
388
|
-
"onPin",
|
|
389
|
-
"onClearPin",
|
|
390
|
-
"onStartPick",
|
|
391
|
-
"onStopPick",
|
|
392
|
-
"onClearPicks",
|
|
393
|
-
"onSendDirective"
|
|
394
|
-
]),
|
|
395
|
-
h(Qe, {
|
|
396
|
-
messages: F(s),
|
|
397
|
-
"is-streaming": F(o)
|
|
398
|
-
}, null, 8, ["messages", "is-streaming"]),
|
|
399
|
-
F(l) ? (T(), b("div", st, [
|
|
400
|
-
h(F(se), { class: "mt-0.5 w-3.5 h-3.5 shrink-0" }),
|
|
401
|
-
v("div", lt, [v("div", ot, j(F(r)("pptx.ai.errorPrefix")), 1), v("div", it, j(F(l).message), 1)]),
|
|
402
|
-
v("button", {
|
|
403
|
-
type: "button",
|
|
404
|
-
class: "shrink-0 rounded-sm px-1.5 py-0.5 text-[11px] underline-offset-2 hover:underline",
|
|
405
|
-
onClick: t[0] || (t[0] = (...e) => F(d) && F(d)(...e))
|
|
406
|
-
}, j(F(r)("pptx.ai.retry")), 1)
|
|
407
|
-
])) : f("", !0),
|
|
408
|
-
F(i).length > 0 ? (T(), b("div", nt, [v("div", pt, [v("span", dt, j(F(r)("pptx.ai.pendingChanges", { count: F(i).length })), 1), F(i).length > 1 ? (T(), b("button", {
|
|
409
|
-
key: 0,
|
|
410
|
-
type: "button",
|
|
411
|
-
class: "rounded-sm bg-primary/90 px-2 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary",
|
|
412
|
-
onClick: _
|
|
413
|
-
}, j(F(r)("pptx.ai.acceptAll")), 1)) : f("", !0)]), (T(!0), b(m, null, A(F(i), (e) => (T(), g(at, {
|
|
414
|
-
key: e.id,
|
|
415
|
-
proposal: e,
|
|
416
|
-
onAccept: I,
|
|
417
|
-
onReject: F(u)
|
|
418
|
-
}, null, 8, ["proposal", "onReject"]))), 128))])) : f("", !0),
|
|
419
|
-
h(he, {
|
|
420
|
-
"is-streaming": F(o),
|
|
421
|
-
"prefill-text": a.aiPanel.prefill.value.text,
|
|
422
|
-
"prefill-nonce": a.aiPanel.prefill.value.nonce,
|
|
423
|
-
onSend: F(n),
|
|
424
|
-
onStop: F(p)
|
|
425
|
-
}, null, 8, [
|
|
426
|
-
"is-streaming",
|
|
427
|
-
"prefill-text",
|
|
428
|
-
"prefill-nonce",
|
|
429
|
-
"onSend",
|
|
430
|
-
"onStop"
|
|
431
|
-
])
|
|
432
|
-
]));
|
|
433
|
-
}
|
|
434
|
-
}), ut = { class: "flex items-center gap-2 border-b border-border px-3 py-2" }, mt = { class: "text-sm font-semibold text-foreground" }, xt = ["title", "aria-label"], gt = {
|
|
435
|
-
key: 0,
|
|
436
|
-
class: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground"
|
|
437
|
-
}, ft = {
|
|
438
|
-
key: 1,
|
|
439
|
-
class: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center"
|
|
440
|
-
}, bt = { class: "text-sm font-medium text-foreground" }, vt = { class: "text-[12px] text-muted-foreground" }, yt = k({
|
|
441
|
-
__name: "AiChatPanel",
|
|
442
|
-
props: {
|
|
443
|
-
bridge: {},
|
|
444
|
-
config: {},
|
|
445
|
-
panelWidth: {},
|
|
446
|
-
aiPanel: {}
|
|
447
|
-
},
|
|
448
|
-
emits: ["close"],
|
|
449
|
-
setup(t, { emit: a }) {
|
|
450
|
-
const r = t, l = a, { t: i } = e(), { state: p, session: d, initError: c } = function(e, t) {
|
|
451
|
-
const a = I("checking"), r = E(null), l = E(void 0);
|
|
452
|
-
let i = 0;
|
|
453
|
-
return (async () => {
|
|
454
|
-
const n = ++i;
|
|
455
|
-
a.value = "checking", r.value = null, l.value = void 0;
|
|
456
|
-
try {
|
|
457
|
-
const l = await o();
|
|
458
|
-
if (n !== i) return;
|
|
459
|
-
if (!l) return void (a.value = "unavailable");
|
|
460
|
-
const p = await s(e, t);
|
|
461
|
-
if (n !== i) return;
|
|
462
|
-
r.value = p, a.value = "ready";
|
|
463
|
-
} catch (e) {
|
|
464
|
-
if (n !== i) return;
|
|
465
|
-
l.value = e instanceof Error ? e : new Error(String(e)), a.value = "error";
|
|
466
|
-
}
|
|
467
|
-
})(), {
|
|
468
|
-
state: a,
|
|
469
|
-
session: r,
|
|
470
|
-
initError: l
|
|
471
|
-
};
|
|
472
|
-
}(r.bridge, r.config), u = x(() => r.panelWidth ? { width: `${r.panelWidth}px` } : void 0), m = n({
|
|
473
|
-
activeSlideIndex: I(0),
|
|
474
|
-
selectedElementIds: I([]),
|
|
475
|
-
selectedElement: () => null
|
|
476
|
-
}), y = x(() => r.aiPanel ?? m);
|
|
477
|
-
return (e, t) => (T(), b("div", {
|
|
478
|
-
"data-pptx-ai-panel": "",
|
|
479
|
-
class: "absolute right-0 top-0 z-30 flex h-full w-80 flex-col border-l border-border bg-card shadow-xl max-md:inset-x-0 max-md:top-auto max-md:bottom-0 max-md:h-[75dvh] max-md:w-full max-md:rounded-t-2xl max-md:border-l-0 max-md:border-t max-md:shadow-2xl",
|
|
480
|
-
style: C(u.value)
|
|
481
|
-
}, [v("div", ut, [
|
|
482
|
-
h(F(Z), { class: "w-4 h-4 text-primary" }),
|
|
483
|
-
v("span", mt, j(F(i)("pptx.ai.title")), 1),
|
|
484
|
-
v("button", {
|
|
485
|
-
type: "button",
|
|
486
|
-
title: F(i)("pptx.ai.close"),
|
|
487
|
-
"aria-label": F(i)("pptx.ai.close"),
|
|
488
|
-
class: "ml-auto rounded-sm p-1 text-muted-foreground transition-colors hover:bg-accent",
|
|
489
|
-
onClick: t[0] || (t[0] = (e) => l("close"))
|
|
490
|
-
}, [h(F(ne), { class: "w-4 h-4" })], 8, xt)
|
|
491
|
-
]), "checking" === F(p) ? (T(), b("div", gt, [h(F(L), { class: "w-5 h-5 animate-spin" })])) : "unavailable" === F(p) || "error" === F(p) ? (T(), b("div", ft, [
|
|
492
|
-
h(F(se), { class: "w-6 h-6 text-muted-foreground" }),
|
|
493
|
-
v("p", bt, j(F(i)("pptx.ai.unavailableTitle")), 1),
|
|
494
|
-
v("p", vt, j(F(c)?.message ?? F(i)("pptx.ai.unavailableHint")), 1)
|
|
495
|
-
])) : "ready" === F(p) && F(d) ? (T(), g(ct, {
|
|
496
|
-
key: 2,
|
|
497
|
-
session: F(d),
|
|
498
|
-
config: r.config,
|
|
499
|
-
bridge: r.bridge,
|
|
500
|
-
"ai-panel": y.value
|
|
501
|
-
}, null, 8, [
|
|
502
|
-
"session",
|
|
503
|
-
"config",
|
|
504
|
-
"bridge",
|
|
505
|
-
"ai-panel"
|
|
506
|
-
])) : f("", !0)], 4));
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
export { yt as default };
|
|
Binary file
|
|
Binary file
|
package/dist/dist-CkupeMQB.js.br
DELETED
|
Binary file
|
package/dist/dist-CkupeMQB.js.gz
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|