pptx-vue-viewer 3.13.0 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/{AiChatPanel-Dc2XmKf0.cjs → AiChatPanel-6Umc4BoO.cjs} +85 -85
- package/dist/AiChatPanel-6Umc4BoO.cjs.br +0 -0
- package/dist/AiChatPanel-6Umc4BoO.cjs.gz +0 -0
- package/dist/{AiChatPanel-sVdtVb3S.js → AiChatPanel-cAmp2yp4.js} +64 -64
- package/dist/AiChatPanel-cAmp2yp4.js.br +0 -0
- package/dist/AiChatPanel-cAmp2yp4.js.gz +0 -0
- package/dist/{dist-DUcjFVaq.js → dist-BWG89tTa.js} +19292 -18672
- package/dist/dist-BWG89tTa.js.br +0 -0
- package/dist/dist-BWG89tTa.js.gz +0 -0
- package/dist/{dist-D2_uVQ25.cjs → dist-Vrjrs3Z-.cjs} +19259 -18639
- package/dist/dist-Vrjrs3Z-.cjs.br +0 -0
- package/dist/dist-Vrjrs3Z-.cjs.gz +0 -0
- package/dist/gif-encoder--iOxrlvn.js +2 -0
- package/dist/gif-encoder--iOxrlvn.js.br +0 -0
- package/dist/gif-encoder--iOxrlvn.js.gz +0 -0
- package/dist/gif-encoder-DWKHtWPQ.cjs +2 -0
- package/dist/gif-encoder-DWKHtWPQ.cjs.br +0 -0
- package/dist/gif-encoder-DWKHtWPQ.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.d.ts +1 -1
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +2 -2
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/pptx-vue-viewer.css +51 -14
- package/dist/pptx-vue-viewer.css.br +0 -0
- package/dist/pptx-vue-viewer.css.gz +0 -0
- package/dist/{useViewerSettingsDialog-Cep_86kN.cjs → useViewerSettingsDialog-CTGWd5t0.cjs} +49201 -37001
- package/dist/useViewerSettingsDialog-CTGWd5t0.cjs.br +0 -0
- package/dist/useViewerSettingsDialog-CTGWd5t0.cjs.gz +0 -0
- package/dist/useViewerSettingsDialog-Cv2ofOFS.js +64983 -0
- package/dist/useViewerSettingsDialog-Cv2ofOFS.js.br +0 -0
- package/dist/useViewerSettingsDialog-Cv2ofOFS.js.gz +0 -0
- package/dist/viewer/components/CommentsPanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/MobileSheet.vue.d.ts.map +1 -1
- package/dist/viewer/components/OleEditorDialog.vue.d.ts.map +1 -1
- package/dist/viewer/components/PrintDialog.vue.d.ts.map +1 -1
- package/dist/viewer/components/SettingsAppearanceTab.vue.d.ts.map +1 -1
- package/dist/viewer/components/SettingsDialog.vue.d.ts.map +1 -1
- package/dist/viewer/components/ShareDialog.vue.d.ts.map +1 -1
- package/dist/viewer/components/WordArtEnvelopeGlyph.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/components/ai/AiFocusBar.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/ActionSettingsPanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/AnimationEditorControls.vue.d.ts +8 -0
- package/dist/viewer/components/inspector/AnimationEditorControls.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/AnimationPanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/ArrangePanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/ChartDataGrid.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/FillPanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/InspectorPane.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/InspectorSectionCard.vue.d.ts +27 -0
- package/dist/viewer/components/inspector/InspectorSectionCard.vue.d.ts.map +1 -0
- package/dist/viewer/components/inspector/InspectorTabs.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/QuickStylesGallery.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/StrokePanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/TableCellAdvancedFill.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/TableCellFormattingPanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/TableDataGrid.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/TableStyleEditorFields.vue.d.ts.map +1 -1
- package/dist/viewer/components/inspector/TextPanel.vue.d.ts.map +1 -1
- package/dist/viewer/components/settings/OptionsControlRow.vue.d.ts.map +1 -1
- package/dist/viewer/composables/useEmbeddedFonts.d.ts.map +1 -1
- package/dist/viewer/composables/useGifExport.d.ts +32 -0
- package/dist/viewer/composables/useGifExport.d.ts.map +1 -0
- package/dist/viewer/composables/useGoogleWebfonts.d.ts.map +1 -1
- package/dist/viewer/composables/useIsMobile.d.ts +11 -0
- package/dist/viewer/composables/useIsMobile.d.ts.map +1 -1
- package/dist/viewer/composables/useMediaExport.d.ts +3 -1
- package/dist/viewer/composables/useMediaExport.d.ts.map +1 -1
- package/dist/viewer/composables/useSlideOperations.d.ts +2 -2
- package/dist/viewer/composables/useSlideOperations.d.ts.map +1 -1
- package/dist/viewer/composables/useTextWarpEnvelope.d.ts.map +1 -1
- package/dist/viewer/composables/useViewerApi.d.ts +1 -1
- package/dist/viewer/composables/useViewerApi.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/utils/glyph-outline-cache.d.ts +8 -0
- package/dist/viewer/utils/glyph-outline-cache.d.ts.map +1 -0
- package/dist/{viewer-DR-qKweq.js → viewer-Beg9TsSX.js} +14205 -14025
- package/dist/viewer-Beg9TsSX.js.br +0 -0
- package/dist/viewer-Beg9TsSX.js.gz +0 -0
- package/dist/{viewer-BWi4tUWU.cjs → viewer-Cf9sEYe-.cjs} +9209 -9029
- package/dist/viewer-Cf9sEYe-.cjs.br +0 -0
- package/dist/viewer-Cf9sEYe-.cjs.gz +0 -0
- package/package.json +3 -1
- package/dist/AiChatPanel-Dc2XmKf0.cjs.br +0 -0
- package/dist/AiChatPanel-Dc2XmKf0.cjs.gz +0 -0
- package/dist/AiChatPanel-sVdtVb3S.js.br +0 -0
- package/dist/AiChatPanel-sVdtVb3S.js.gz +0 -0
- package/dist/dist-D2_uVQ25.cjs.br +0 -0
- package/dist/dist-D2_uVQ25.cjs.gz +0 -0
- package/dist/dist-DUcjFVaq.js.br +0 -0
- package/dist/dist-DUcjFVaq.js.gz +0 -0
- package/dist/gif-encoder-B2AxxSF3.cjs +0 -2
- package/dist/gif-encoder-B2AxxSF3.cjs.br +0 -0
- package/dist/gif-encoder-B2AxxSF3.cjs.gz +0 -0
- package/dist/gif-encoder-BzY_aQhr.js +0 -2
- package/dist/gif-encoder-BzY_aQhr.js.br +0 -0
- package/dist/gif-encoder-BzY_aQhr.js.gz +0 -0
- package/dist/useViewerSettingsDialog-CBonloSi.js +0 -52822
- package/dist/useViewerSettingsDialog-CBonloSi.js.br +0 -0
- package/dist/useViewerSettingsDialog-CBonloSi.js.gz +0 -0
- package/dist/useViewerSettingsDialog-Cep_86kN.cjs.br +0 -0
- package/dist/useViewerSettingsDialog-Cep_86kN.cjs.gz +0 -0
- package/dist/viewer-BWi4tUWU.cjs.br +0 -0
- package/dist/viewer-BWi4tUWU.cjs.gz +0 -0
- package/dist/viewer-DR-qKweq.js.br +0 -0
- package/dist/viewer-DR-qKweq.js.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,52 @@ 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
|
+
## [3.14.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@3.14.0) - 2026-09-10
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **shared:** Make every dense panel usable at 360px in all five bindings (by @ChristopherVR) ([f560f4a](https://github.com/ChristopherVR/pptx-viewer/commit/f560f4a5e0d0efc83819f3ea0d30816dcc878a59))
|
|
15
|
+
- **shared:** COM-calibrate the a:lightRig elevation table for all 27 rigs (by @ChristopherVR) ([e0db035](https://github.com/ChristopherVR/pptx-viewer/commit/e0db03513aa2099e6a235dd47f50cc618c456f1d))
|
|
16
|
+
- **core:** Read OLE embeds back from legacy .ppt decks (by @ChristopherVR) ([2f1a9a6](https://github.com/ChristopherVR/pptx-viewer/commit/2f1a9a601ffc9a2e7dff691622ccddf3eb109e8e))
|
|
17
|
+
- **shared:** Tile GIF, video, notes-PDF and print captures past the canvas cap (by @ChristopherVR) ([4cdd3e5](https://github.com/ChristopherVR/pptx-viewer/commit/4cdd3e55cc8eb3ffc96d22060521f0f36efe997f))
|
|
18
|
+
- **core:** SmartArt hang ratios, cascade reserve, generation margins and hub font fit (by @ChristopherVR) ([8ccd7cc](https://github.com/ChristopherVR/pptx-viewer/commit/8ccd7ccec858642fe568cfe310128dd263db3721))
|
|
19
|
+
- **shared:** Decide GIF and video capture scale and cap once for all bindings (by @ChristopherVR) ([ad3adfa](https://github.com/ChristopherVR/pptx-viewer/commit/ad3adfa527fe288d380cd22132543f51e30c3027))
|
|
20
|
+
- **shared:** Warp WordArt envelope glyphs by their real outlines (by @ChristopherVR) ([1e67d70](https://github.com/ChristopherVR/pptx-viewer/commit/1e67d70a0cb9c5fb9ab967c69987fd39fa267d59))
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- **react,vue,angular,svelte,vanilla:** Guard OLE editor state after unmount and steady three e2e specs (by @ChristopherVR) ([6bc1e4c](https://github.com/ChristopherVR/pptx-viewer/commit/6bc1e4c27e98f4f132358a64ea5cb694a9b39af2))
|
|
25
|
+
|
|
26
|
+
### Refactor
|
|
27
|
+
|
|
28
|
+
- **angular,vue:** Split the options pane styles and inspector section card (by @ChristopherVR) ([113f5d2](https://github.com/ChristopherVR/pptx-viewer/commit/113f5d2ada79679e38601e2ab09f8993aa0f425b))
|
|
29
|
+
|
|
30
|
+
### Documentation
|
|
31
|
+
|
|
32
|
+
- **shared:** Record the metal/circle re-measurement and the failed decoupling (by @ChristopherVR) ([57fd7c2](https://github.com/ChristopherVR/pptx-viewer/commit/57fd7c2c944ab171f985903cb11e0da8c389e891))
|
|
33
|
+
|
|
34
|
+
### Testing
|
|
35
|
+
|
|
36
|
+
- **core:** Pin PowerPoint's property-order dependence for combined rotated group edits (by @ChristopherVR) ([dc6692e](https://github.com/ChristopherVR/pptx-viewer/commit/dc6692ebaaaeb6fe28ce635e9ec3c69f4e46c89d))
|
|
37
|
+
|
|
38
|
+
## [3.13.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@3.13.0) - 2026-09-10
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
- **core:** SmartArt composite shape dispatch, per-role font fit and hang ratio (by @ChristopherVR) ([b2d985f](https://github.com/ChristopherVR/pptx-viewer/commit/b2d985f0d5c593c4cca231655d02fed828b548ce))
|
|
43
|
+
- **shared:** Route every raster export through the foreignObject tiled pipeline (by @ChristopherVR) ([1ad1993](https://github.com/ChristopherVR/pptx-viewer/commit/1ad19930714668dba87af52e38872d64e7ad4f9d))
|
|
44
|
+
- **shared:** Sample a bar3D picture fill's first pixel on the first paint (by @ChristopherVR) ([8bdb1bc](https://github.com/ChristopherVR/pptx-viewer/commit/8bdb1bc995e92390f6e622f146e9c5abd623d047))
|
|
45
|
+
- **core:** SmartArt repeated-template slots, table hierarchies and cascades (by @ChristopherVR) ([725033d](https://github.com/ChristopherVR/pptx-viewer/commit/725033db29d984d1d9078224a68cb0ccf590fbba))
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
- **core:** Preserve fractional table row heights ([#224](https://github.com/ChristopherVR/pptx-viewer/issues/224)) (by @Sudhansh6) ([aaa621f](https://github.com/ChristopherVR/pptx-viewer/commit/aaa621f9f3838a84a13b2422c1888454e592a18f))
|
|
50
|
+
- **angular,core:** Land the transition-split component and media-duration wiring (by @ChristopherVR) ([3d0c8c7](https://github.com/ChristopherVR/pptx-viewer/commit/3d0c8c7b6a68c94f6f9a1258342dd43b6f524503))
|
|
51
|
+
|
|
52
|
+
### Testing
|
|
53
|
+
|
|
54
|
+
- **react,svelte,angular,shared:** Update assertions to the camera-matrix and webfont contracts (by @ChristopherVR) ([f2edef8](https://github.com/ChristopherVR/pptx-viewer/commit/f2edef846a5ffb607fb15985512a1142bb47e570))
|
|
55
|
+
|
|
10
56
|
## [3.12.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@3.12.0) - 2026-09-10
|
|
11
57
|
|
|
12
58
|
### Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const e = require("./useViewerSettingsDialog-
|
|
2
|
-
let r = require("vue"), a = require("lucide-vue-next"),
|
|
3
|
-
var
|
|
1
|
+
const e = require("./useViewerSettingsDialog-CTGWd5t0.cjs"), t = require("./viewer-Cf9sEYe-.cjs");
|
|
2
|
+
let r = require("vue"), a = require("lucide-vue-next"), n = require("ai");
|
|
3
|
+
var o = /* @__PURE__ */ new Set([
|
|
4
4
|
"input-available",
|
|
5
5
|
"output-available",
|
|
6
6
|
"output-error"
|
|
@@ -13,15 +13,15 @@ function l(e, a, l, s = {}) {
|
|
|
13
13
|
sendAutomaticallyWhen: a.sendAutomaticallyWhen,
|
|
14
14
|
onError: (e) => l.onError?.(e),
|
|
15
15
|
onToolCall: async ({ toolCall: e }) => {
|
|
16
|
-
const { toolName: t, toolCallId: r, input:
|
|
16
|
+
const { toolName: t, toolCallId: r, input: n } = e, o = p.addToolOutput;
|
|
17
17
|
try {
|
|
18
|
-
|
|
18
|
+
o({
|
|
19
19
|
tool: t,
|
|
20
20
|
toolCallId: r,
|
|
21
|
-
output: await a.executeToolCall(t,
|
|
21
|
+
output: await a.executeToolCall(t, n)
|
|
22
22
|
});
|
|
23
23
|
} catch (e) {
|
|
24
|
-
|
|
24
|
+
o({
|
|
25
25
|
tool: t,
|
|
26
26
|
toolCallId: r,
|
|
27
27
|
state: "output-error",
|
|
@@ -35,10 +35,10 @@ function l(e, a, l, s = {}) {
|
|
|
35
35
|
for (const r of function(e) {
|
|
36
36
|
const t = [];
|
|
37
37
|
for (const r of e) for (const e of r.parts) {
|
|
38
|
-
if (!(0,
|
|
38
|
+
if (!(0, n.isToolUIPart)(e) && !(0, n.isDynamicToolUIPart)(e)) continue;
|
|
39
39
|
const r = e, a = r.toolCallId ?? "";
|
|
40
|
-
0 !== a.length && void 0 !== r.input &&
|
|
41
|
-
toolName: (0,
|
|
40
|
+
0 !== a.length && void 0 !== r.input && o.has(r.state ?? "") && t.push({
|
|
41
|
+
toolName: (0, n.getToolOrDynamicToolName)(e),
|
|
42
42
|
toolCallId: a,
|
|
43
43
|
input: r.input
|
|
44
44
|
});
|
|
@@ -83,8 +83,8 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
83
83
|
prefillNonce: {}
|
|
84
84
|
},
|
|
85
85
|
emits: ["send", "stop"],
|
|
86
|
-
setup(
|
|
87
|
-
const l =
|
|
86
|
+
setup(n, { emit: o }) {
|
|
87
|
+
const l = n, u = o, { t: m } = e.useI18n(), f = (0, r.ref)(""), x = (0, r.ref)(null), g = (0, r.computed)(() => f.value.trim().length > 0);
|
|
88
88
|
function k() {
|
|
89
89
|
const e = f.value.trim();
|
|
90
90
|
0 === e.length || l.isStreaming || (u("send", e), f.value = "");
|
|
@@ -94,10 +94,10 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
94
94
|
}
|
|
95
95
|
return (0, r.watch)(() => l.prefillNonce, (e) => {
|
|
96
96
|
void 0 !== e && 0 !== e && (l.prefillText && (f.value = l.prefillText), (0, r.nextTick)(() => x.value?.focus()));
|
|
97
|
-
}), (e,
|
|
97
|
+
}), (e, n) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", s, [(0, r.createElementVNode)("div", i, [(0, r.withDirectives)((0, r.createElementVNode)("textarea", {
|
|
98
98
|
ref_key: "textareaRef",
|
|
99
99
|
ref: x,
|
|
100
|
-
"onUpdate:modelValue":
|
|
100
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => f.value = e),
|
|
101
101
|
rows: 1,
|
|
102
102
|
placeholder: (0, r.unref)(m)("pptx.ai.placeholder"),
|
|
103
103
|
"aria-label": (0, r.unref)(m)("pptx.ai.placeholder"),
|
|
@@ -109,7 +109,7 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
109
109
|
title: (0, r.unref)(m)("pptx.ai.stop"),
|
|
110
110
|
"aria-label": (0, r.unref)(m)("pptx.ai.stop"),
|
|
111
111
|
class: "shrink-0 rounded-sm p-1.5 text-muted-foreground transition-colors hover:bg-accent",
|
|
112
|
-
onClick:
|
|
112
|
+
onClick: n[1] || (n[1] = (e) => u("stop"))
|
|
113
113
|
}, [(0, r.createVNode)((0, r.unref)(a.Square), { class: "w-4 h-4" })], 8, p)) : ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
|
|
114
114
|
key: 1,
|
|
115
115
|
type: "button",
|
|
@@ -147,20 +147,20 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
147
147
|
"clear-picks",
|
|
148
148
|
"send-directive"
|
|
149
149
|
],
|
|
150
|
-
setup(
|
|
151
|
-
const l =
|
|
150
|
+
setup(n, { emit: o }) {
|
|
151
|
+
const l = n, s = o, { t: i } = e.useI18n(), c = (0, r.computed)(() => t.focusTargetChips(l.targets, l.slides)), p = (0, r.computed)(() => t.isTwoTableFocus(l.targets, l.slides));
|
|
152
152
|
function d() {
|
|
153
153
|
const e = p.value;
|
|
154
154
|
e && s("send-directive", t.mergeTablesDirective(e.slideIndex, e.elementIdA, e.elementIdB));
|
|
155
155
|
}
|
|
156
|
-
return (e,
|
|
156
|
+
return (e, o) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", m, [(0, r.createElementVNode)("div", f, [
|
|
157
157
|
(0, r.createElementVNode)("span", x, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.focusScope")), 1),
|
|
158
158
|
((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(c.value, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)("span", {
|
|
159
159
|
key: e.key,
|
|
160
|
-
class: (0, r.normalizeClass)((0, r.unref)(t.cn)("inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
|
|
160
|
+
class: (0, r.normalizeClass)((0, r.unref)(t.cn)("inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]", n.hasPicks || n.isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground")),
|
|
161
161
|
title: e.title
|
|
162
162
|
}, [(0, r.createElementVNode)("span", k, (0, r.toDisplayString)(e.label), 1)], 10, g))), 128)),
|
|
163
|
-
|
|
163
|
+
n.isPinned ? ((0, r.openBlock)(), (0, r.createElementBlock)("span", y, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.pinnedFocus")), 1)) : (0, r.createCommentVNode)("", !0),
|
|
164
164
|
(0, r.createElementVNode)("div", b, [
|
|
165
165
|
p.value ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
|
|
166
166
|
key: 0,
|
|
@@ -172,25 +172,25 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
172
172
|
type: "button",
|
|
173
173
|
title: (0, r.unref)(i)("pptx.ai.pickElement"),
|
|
174
174
|
"aria-label": (0, r.unref)(i)("pptx.ai.pickAria"),
|
|
175
|
-
"aria-pressed":
|
|
176
|
-
class: (0, r.normalizeClass)((0, r.unref)(t.cn)("rounded-sm p-1",
|
|
177
|
-
onClick:
|
|
175
|
+
"aria-pressed": n.pickMode,
|
|
176
|
+
class: (0, r.normalizeClass)((0, r.unref)(t.cn)("rounded-sm p-1 flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!", n.pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent")),
|
|
177
|
+
onClick: o[0] || (o[0] = (e) => n.pickMode ? s("stop-pick") : s("start-pick"))
|
|
178
178
|
}, [(0, r.createVNode)((0, r.unref)(a.Crosshair), { class: "w-3.5 h-3.5" })], 10, h),
|
|
179
|
-
|
|
179
|
+
n.hasPicks ? ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
|
|
180
180
|
key: 1,
|
|
181
181
|
type: "button",
|
|
182
182
|
title: (0, r.unref)(i)("pptx.ai.pickClear"),
|
|
183
183
|
"aria-label": (0, r.unref)(i)("pptx.ai.pickClear"),
|
|
184
|
-
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent",
|
|
185
|
-
onClick:
|
|
184
|
+
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
185
|
+
onClick: o[1] || (o[1] = (e) => s("clear-picks"))
|
|
186
186
|
}, [(0, r.createVNode)((0, r.unref)(a.X), { class: "w-3.5 h-3.5" })], 8, v)) : ((0, r.openBlock)(), (0, r.createElementBlock)("button", {
|
|
187
187
|
key: 2,
|
|
188
188
|
type: "button",
|
|
189
|
-
title:
|
|
190
|
-
"aria-label":
|
|
191
|
-
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent",
|
|
192
|
-
onClick:
|
|
193
|
-
}, [
|
|
189
|
+
title: n.isPinned ? (0, r.unref)(i)("pptx.ai.clearFocus") : (0, r.unref)(i)("pptx.ai.pinFocus"),
|
|
190
|
+
"aria-label": n.isPinned ? (0, r.unref)(i)("pptx.ai.clearFocus") : (0, r.unref)(i)("pptx.ai.pinFocus"),
|
|
191
|
+
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
192
|
+
onClick: o[2] || (o[2] = (e) => n.isPinned ? s("clear-pin") : s("pin"))
|
|
193
|
+
}, [n.isPinned ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.PinOff), {
|
|
194
194
|
key: 0,
|
|
195
195
|
class: "w-3.5 h-3.5"
|
|
196
196
|
})) : ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.Pin), {
|
|
@@ -198,13 +198,13 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
198
198
|
class: "w-3.5 h-3.5"
|
|
199
199
|
}))], 8, C))
|
|
200
200
|
])
|
|
201
|
-
]),
|
|
201
|
+
]), n.pickMode ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", B, [
|
|
202
202
|
(0, r.createVNode)((0, r.unref)(a.Crosshair), { class: "w-3.5 h-3.5 shrink-0 animate-pulse text-primary" }),
|
|
203
203
|
(0, r.createElementVNode)("span", E, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.pickElementHint")), 1),
|
|
204
204
|
(0, r.createElementVNode)("button", {
|
|
205
205
|
type: "button",
|
|
206
206
|
class: "ml-auto rounded-sm bg-primary px-2 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary/90",
|
|
207
|
-
onClick:
|
|
207
|
+
onClick: o[3] || (o[3] = (e) => s("stop-pick"))
|
|
208
208
|
}, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.pickDone")), 1)
|
|
209
209
|
])) : (0, r.createCommentVNode)("", !0)]));
|
|
210
210
|
}
|
|
@@ -218,7 +218,7 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
218
218
|
"title",
|
|
219
219
|
"aria-label",
|
|
220
220
|
"onClick"
|
|
221
|
-
],
|
|
221
|
+
], j = { class: "border-t border-border px-2.5 py-1.5 text-[10px] text-muted-foreground" }, M = (0, r.defineComponent)({
|
|
222
222
|
__name: "AiHistoryMenu",
|
|
223
223
|
props: {
|
|
224
224
|
chats: {},
|
|
@@ -230,8 +230,8 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
230
230
|
"new-chat",
|
|
231
231
|
"close"
|
|
232
232
|
],
|
|
233
|
-
setup(t, { emit:
|
|
234
|
-
const
|
|
233
|
+
setup(t, { emit: n }) {
|
|
234
|
+
const o = t, l = n, { t: s } = e.useI18n(), i = (0, r.ref)(null);
|
|
235
235
|
function c(e) {
|
|
236
236
|
i.value && !i.value.contains(e.target) && l("close");
|
|
237
237
|
}
|
|
@@ -247,12 +247,12 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
247
247
|
l("new-chat"), l("close");
|
|
248
248
|
})
|
|
249
249
|
}, [(0, r.createVNode)((0, r.unref)(a.Plus), { class: "w-3 h-3" }), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.newChat")), 1)])]),
|
|
250
|
-
0 ===
|
|
250
|
+
0 === o.chats.length ? ((0, r.openBlock)(), (0, r.createElementBlock)("p", S, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.historyEmpty")), 1)) : ((0, r.openBlock)(), (0, r.createElementBlock)("ul", P, [((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(o.chats, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)("li", {
|
|
251
251
|
key: e.id,
|
|
252
252
|
class: "group flex items-center gap-1 px-1"
|
|
253
253
|
}, [(0, r.createElementVNode)("button", {
|
|
254
254
|
type: "button",
|
|
255
|
-
class: (0, r.normalizeClass)(["flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent", e.id ===
|
|
255
|
+
class: (0, r.normalizeClass)(["flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent", e.id === o.activeChatId ? "bg-accent/60" : ""]),
|
|
256
256
|
onClick: (t) => {
|
|
257
257
|
l("resume", e.id), l("close");
|
|
258
258
|
}
|
|
@@ -263,10 +263,10 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
263
263
|
class: "shrink-0 rounded-sm p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",
|
|
264
264
|
onClick: (t) => l("delete", e.id)
|
|
265
265
|
}, [(0, r.createVNode)((0, r.unref)(a.Trash2), { class: "w-3.5 h-3.5" })], 8, F)]))), 128))])),
|
|
266
|
-
(0, r.createElementVNode)("p",
|
|
266
|
+
(0, r.createElementVNode)("p", j, (0, r.toDisplayString)((0, r.unref)(s)("pptx.ai.historyHint")), 1)
|
|
267
267
|
], 512));
|
|
268
268
|
}
|
|
269
|
-
}),
|
|
269
|
+
}), _ = { class: "text-[12px]" }, L = { class: "flex items-center gap-1.5" }, z = {
|
|
270
270
|
key: 0,
|
|
271
271
|
class: "mt-1 pl-5 text-[11px] text-destructive"
|
|
272
272
|
}, R = {
|
|
@@ -275,8 +275,8 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
275
275
|
}, q = { class: "cursor-pointer list-none text-[10px] text-muted-foreground/70 hover:text-muted-foreground" }, H = { class: "mt-0.5 break-words font-mono text-[10px] text-muted-foreground/80" }, U = (0, r.defineComponent)({
|
|
276
276
|
__name: "AiToolCallCard",
|
|
277
277
|
props: { part: {} },
|
|
278
|
-
setup(
|
|
279
|
-
const
|
|
278
|
+
setup(n) {
|
|
279
|
+
const o = n, { t: l } = e.useI18n(), s = {
|
|
280
280
|
view: a.Eye,
|
|
281
281
|
text: a.Type,
|
|
282
282
|
shape: a.Shapes,
|
|
@@ -291,9 +291,9 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
291
291
|
animation: a.Film,
|
|
292
292
|
notes: a.StickyNote,
|
|
293
293
|
tool: a.Wrench
|
|
294
|
-
}, i = (0, r.computed)(() => "output-error" ===
|
|
295
|
-
return (e,
|
|
296
|
-
(0, r.createElementVNode)("div",
|
|
294
|
+
}, i = (0, r.computed)(() => "output-error" === o.part.state), c = (0, r.computed)(() => "output-available" === o.part.state), p = (0, r.computed)(() => !i.value && !c.value), d = (0, r.computed)(() => t.describeToolActivity(o.part.toolName, o.part.input, p.value ? "present" : "past")), u = (0, r.computed)(() => s[d.value.icon] ?? a.Wrench), m = (0, r.computed)(() => t.summarizeToolArgs(o.part.input)), f = (0, r.computed)(() => i.value ? l("pptx.ai.toolFailed") : c.value ? l("pptx.ai.toolDone") : l("pptx.ai.toolRunning"));
|
|
295
|
+
return (e, n) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", _, [
|
|
296
|
+
(0, r.createElementVNode)("div", L, [
|
|
297
297
|
((0, r.openBlock)(), (0, r.createBlock)((0, r.resolveDynamicComponent)(u.value), { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("w-3.5 h-3.5 shrink-0", i.value ? "text-destructive" : "text-muted-foreground")) }, null, 8, ["class"])),
|
|
298
298
|
(0, r.createElementVNode)("span", { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("truncate", i.value ? "text-destructive" : "text-foreground")) }, (0, r.toDisplayString)(d.value.label), 3),
|
|
299
299
|
(0, r.createElementVNode)("span", { class: (0, r.normalizeClass)((0, r.unref)(t.cn)("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" : c.value ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground")) }, [p.value ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.LoaderCircle), {
|
|
@@ -307,8 +307,8 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
307
307
|
class: "w-3 h-3"
|
|
308
308
|
})), (0, r.createTextVNode)(" " + (0, r.toDisplayString)(f.value), 1)], 2)
|
|
309
309
|
]),
|
|
310
|
-
i.value &&
|
|
311
|
-
m.value ? ((0, r.openBlock)(), (0, r.createElementBlock)("details", R, [(0, r.createElementVNode)("summary", q, (0, r.toDisplayString)((0, r.unref)(l)("pptx.ai.toolDetails")), 1), (0, r.createElementVNode)("div", H, (0, r.toDisplayString)((0, r.unref)(t.toolLabel)(
|
|
310
|
+
i.value && o.part.errorText ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", z, (0, r.toDisplayString)(o.part.errorText), 1)) : (0, r.createCommentVNode)("", !0),
|
|
311
|
+
m.value ? ((0, r.openBlock)(), (0, r.createElementBlock)("details", R, [(0, r.createElementVNode)("summary", q, (0, r.toDisplayString)((0, r.unref)(l)("pptx.ai.toolDetails")), 1), (0, r.createElementVNode)("div", H, (0, r.toDisplayString)((0, r.unref)(t.toolLabel)(o.part.toolName)) + ": " + (0, r.toDisplayString)(m.value), 1)])) : (0, r.createCommentVNode)("", !0)
|
|
312
312
|
]));
|
|
313
313
|
}
|
|
314
314
|
}), W = {
|
|
@@ -332,16 +332,16 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
332
332
|
messages: {},
|
|
333
333
|
isStreaming: { type: Boolean }
|
|
334
334
|
},
|
|
335
|
-
setup(
|
|
336
|
-
const
|
|
337
|
-
return (0, r.watch)(() => [
|
|
335
|
+
setup(n) {
|
|
336
|
+
const o = n, { t: l } = e.useI18n(), s = (0, r.ref)(null);
|
|
337
|
+
return (0, r.watch)(() => [o.messages, o.isStreaming], () => {
|
|
338
338
|
(0, r.nextTick)(() => s.value?.scrollIntoView({ block: "end" }));
|
|
339
|
-
}, { deep: !0 }), (e,
|
|
339
|
+
}, { deep: !0 }), (e, n) => 0 === o.messages.length ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", W, [
|
|
340
340
|
(0, r.createVNode)((0, r.unref)(a.Sparkles), { class: "w-7 h-7 text-primary/70" }),
|
|
341
341
|
(0, r.createElementVNode)("p", O, (0, r.toDisplayString)((0, r.unref)(l)("pptx.ai.emptyTitle")), 1),
|
|
342
342
|
(0, r.createElementVNode)("p", X, (0, r.toDisplayString)((0, r.unref)(l)("pptx.ai.emptyHint")), 1)
|
|
343
343
|
])) : ((0, r.openBlock)(), (0, r.createElementBlock)("div", K, [
|
|
344
|
-
((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(
|
|
344
|
+
((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)(o.messages, (e) => ((0, r.openBlock)(), (0, r.createElementBlock)(r.Fragment, { key: e.id }, ["user" === e.role || (0, r.unref)(t.toRenderableParts)(e).length > 0 ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", G, [(0, r.createElementVNode)("div", {
|
|
345
345
|
class: (0, r.normalizeClass)((0, r.unref)(t.cn)("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")),
|
|
346
346
|
"aria-label": "user" === e.role ? (0, r.unref)(l)("pptx.ai.you") : (0, r.unref)(l)("pptx.ai.assistant")
|
|
347
347
|
}, ["user" === e.role ? ((0, r.openBlock)(), (0, r.createBlock)((0, r.unref)(a.User), {
|
|
@@ -354,7 +354,7 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
354
354
|
key: 1,
|
|
355
355
|
part: e
|
|
356
356
|
}, null, 8, ["part"]))], 64))), 128))])])) : (0, r.createCommentVNode)("", !0)], 64))), 128)),
|
|
357
|
-
|
|
357
|
+
o.isStreaming ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", Y, [n[0] || (n[0] = (0, r.createElementVNode)("span", { class: "inline-flex gap-1" }, [
|
|
358
358
|
(0, r.createElementVNode)("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-0.2s]" }),
|
|
359
359
|
(0, r.createElementVNode)("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-0.1s]" }),
|
|
360
360
|
(0, r.createElementVNode)("span", { class: "h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground" })
|
|
@@ -368,12 +368,12 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
368
368
|
}), ee = { class: "rounded-md border border-primary/40 bg-primary/5 p-2.5" }, te = { class: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary" }, re = { class: "text-[12px] font-medium text-foreground" }, ae = {
|
|
369
369
|
key: 0,
|
|
370
370
|
class: "mt-1 max-h-40 space-y-0.5 overflow-y-auto text-[11px] text-muted-foreground"
|
|
371
|
-
},
|
|
371
|
+
}, ne = { class: "mt-2 flex items-center gap-2" }, oe = (0, r.defineComponent)({
|
|
372
372
|
__name: "AiProposalCard",
|
|
373
373
|
props: { proposal: {} },
|
|
374
374
|
emits: ["accept", "reject"],
|
|
375
|
-
setup(
|
|
376
|
-
const l =
|
|
375
|
+
setup(n, { emit: o }) {
|
|
376
|
+
const l = n, s = o, { t: i } = e.useI18n(), c = (0, r.computed)(() => l.proposal.summary.map(t.humanizeDiffLine));
|
|
377
377
|
return (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", ee, [
|
|
378
378
|
(0, r.createElementVNode)("div", te, (0, r.toDisplayString)((0, r.unref)(i)("pptx.ai.proposedChange")), 1),
|
|
379
379
|
(0, r.createElementVNode)("div", re, (0, r.toDisplayString)(l.proposal.label), 1),
|
|
@@ -381,7 +381,7 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
381
381
|
key: t,
|
|
382
382
|
class: "break-words"
|
|
383
383
|
}, (0, r.toDisplayString)(e), 1))), 128))])) : (0, r.createCommentVNode)("", !0),
|
|
384
|
-
(0, r.createElementVNode)("div",
|
|
384
|
+
(0, r.createElementVNode)("div", ne, [(0, r.createElementVNode)("button", {
|
|
385
385
|
type: "button",
|
|
386
386
|
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",
|
|
387
387
|
onClick: t[0] || (t[0] = (e) => s("accept", l.proposal.id))
|
|
@@ -410,12 +410,12 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
410
410
|
bridge: {},
|
|
411
411
|
aiPanel: {}
|
|
412
412
|
},
|
|
413
|
-
async setup(
|
|
414
|
-
let
|
|
415
|
-
const i =
|
|
413
|
+
async setup(n) {
|
|
414
|
+
let o, s;
|
|
415
|
+
const i = n, { t: c } = e.useI18n(), { useChat: p } = ([o, s] = (0, r.withAsyncContext)(() => import("@ai-sdk/vue")), o = await o, s(), o), { messages: d, error: m, isStreaming: f, proposals: x, send: g, stop: k, clearError: y, applyProposal: b, rejectProposal: h, acceptAllProposals: v } = l(p, i.session, i.config, { onToolTarget: (e) => {
|
|
416
416
|
e && void 0 !== e.slideIndex && i.bridge.goToSlide(e.slideIndex), i.aiPanel.flashToolTarget(e);
|
|
417
417
|
} }), C = function(e) {
|
|
418
|
-
const a = (0, r.ref)([]),
|
|
418
|
+
const a = (0, r.ref)([]), n = t.createAiChatHistoryController({
|
|
419
419
|
deckId: e.deckId,
|
|
420
420
|
store: e.store,
|
|
421
421
|
getMessages: () => e.messages.value,
|
|
@@ -424,23 +424,23 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
424
424
|
onChatsChanged: (e) => {
|
|
425
425
|
a.value = e;
|
|
426
426
|
}
|
|
427
|
-
}),
|
|
428
|
-
|
|
427
|
+
}), o = (0, r.ref)(n.activeChatId()), l = () => {
|
|
428
|
+
o.value = n.activeChatId();
|
|
429
429
|
};
|
|
430
|
-
return (0, r.watch)(e.messages, () =>
|
|
430
|
+
return (0, r.watch)(e.messages, () => n.notifyMessagesChanged(), { deep: !0 }), (0, r.onBeforeUnmount)(() => n.dispose()), {
|
|
431
431
|
chats: a,
|
|
432
|
-
activeChatId:
|
|
433
|
-
refresh: () =>
|
|
432
|
+
activeChatId: o,
|
|
433
|
+
refresh: () => n.refresh(),
|
|
434
434
|
newChat: () => {
|
|
435
|
-
|
|
435
|
+
n.newChat(), l();
|
|
436
436
|
},
|
|
437
437
|
resumeChat: async (e) => {
|
|
438
|
-
await
|
|
438
|
+
await n.resumeChat(e), l();
|
|
439
439
|
},
|
|
440
440
|
deleteChat: async (e) => {
|
|
441
|
-
await
|
|
441
|
+
await n.deleteChat(e), l();
|
|
442
442
|
},
|
|
443
|
-
clearCurrent: () =>
|
|
443
|
+
clearCurrent: () => n.clearCurrent()
|
|
444
444
|
};
|
|
445
445
|
}({
|
|
446
446
|
deckId: t.deckIdFromBridge(i.bridge),
|
|
@@ -463,23 +463,23 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
463
463
|
return (e, t) => ((0, r.openBlock)(), (0, r.createElementBlock)("div", le, [
|
|
464
464
|
(0, r.createElementVNode)("div", se, [(0, r.createElementVNode)("button", {
|
|
465
465
|
type: "button",
|
|
466
|
-
class: "inline-flex items-center gap-1 rounded-sm px-1.5 py-1 text-[12px] text-muted-foreground hover:bg-accent",
|
|
466
|
+
class: "inline-flex items-center gap-1 rounded-sm px-1.5 py-1 text-[12px] text-muted-foreground hover:bg-accent max-md:min-h-[44px]!",
|
|
467
467
|
onClick: t[0] || (t[0] = (e) => B.value = !B.value)
|
|
468
468
|
}, [(0, r.createVNode)((0, r.unref)(a.History), { class: "w-3.5 h-3.5" }), (0, r.createTextVNode)(" " + (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.chats")), 1)]), (0, r.createElementVNode)("div", ie, [(0, r.createElementVNode)("button", {
|
|
469
469
|
type: "button",
|
|
470
470
|
title: (0, r.unref)(c)("pptx.ai.newChat"),
|
|
471
471
|
"aria-label": (0, r.unref)(c)("pptx.ai.newChat"),
|
|
472
|
-
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent",
|
|
472
|
+
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
473
473
|
onClick: t[1] || (t[1] = (e) => (0, r.unref)(C).newChat())
|
|
474
474
|
}, [(0, r.createVNode)((0, r.unref)(a.MessageSquarePlus), { class: "w-3.5 h-3.5" })], 8, ce), (0, r.createElementVNode)("button", {
|
|
475
475
|
type: "button",
|
|
476
476
|
title: (0, r.unref)(c)("pptx.ai.clearChat"),
|
|
477
477
|
"aria-label": (0, r.unref)(c)("pptx.ai.clearChat"),
|
|
478
478
|
disabled: 0 === (0, r.unref)(d).length,
|
|
479
|
-
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent disabled:opacity-40",
|
|
479
|
+
class: "rounded-sm p-1 text-muted-foreground hover:bg-accent disabled:opacity-40 flex items-center justify-center max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
480
480
|
onClick: t[2] || (t[2] = (e) => (0, r.unref)(C).clearCurrent())
|
|
481
481
|
}, [(0, r.createVNode)((0, r.unref)(a.Trash2), { class: "w-3.5 h-3.5" })], 8, pe)])]),
|
|
482
|
-
B.value ? ((0, r.openBlock)(), (0, r.createBlock)(
|
|
482
|
+
B.value ? ((0, r.openBlock)(), (0, r.createBlock)(M, {
|
|
483
483
|
key: 0,
|
|
484
484
|
chats: (0, r.unref)(C).chats.value,
|
|
485
485
|
"active-chat-id": (0, r.unref)(C).activeChatId.value,
|
|
@@ -535,7 +535,7 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
535
535
|
type: "button",
|
|
536
536
|
class: "rounded-sm bg-primary/90 px-2 py-0.5 text-[11px] font-medium text-primary-foreground hover:bg-primary",
|
|
537
537
|
onClick: T
|
|
538
|
-
}, (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.acceptAll")), 1)) : (0, r.createCommentVNode)("", !0)]), ((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)((0, r.unref)(x), (e) => ((0, r.openBlock)(), (0, r.createBlock)(
|
|
538
|
+
}, (0, r.toDisplayString)((0, r.unref)(c)("pptx.ai.acceptAll")), 1)) : (0, r.createCommentVNode)("", !0)]), ((0, r.openBlock)(!0), (0, r.createElementBlock)(r.Fragment, null, (0, r.renderList)((0, r.unref)(x), (e) => ((0, r.openBlock)(), (0, r.createBlock)(oe, {
|
|
539
539
|
key: e.id,
|
|
540
540
|
proposal: e,
|
|
541
541
|
onAccept: P,
|
|
@@ -571,27 +571,27 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
571
571
|
aiPanel: {}
|
|
572
572
|
},
|
|
573
573
|
emits: ["close"],
|
|
574
|
-
setup(
|
|
575
|
-
const l =
|
|
576
|
-
const
|
|
574
|
+
setup(n, { emit: o }) {
|
|
575
|
+
const l = n, s = o, { t: i } = e.useI18n(), { state: c, session: p, initError: d } = function(e, a) {
|
|
576
|
+
const n = (0, r.ref)("checking"), o = (0, r.shallowRef)(null), l = (0, r.shallowRef)(void 0);
|
|
577
577
|
let s = 0;
|
|
578
578
|
return (async () => {
|
|
579
579
|
const r = ++s;
|
|
580
|
-
|
|
580
|
+
n.value = "checking", o.value = null, l.value = void 0;
|
|
581
581
|
try {
|
|
582
582
|
const l = await t.isAiAvailable();
|
|
583
583
|
if (r !== s) return;
|
|
584
|
-
if (!l) return void (
|
|
584
|
+
if (!l) return void (n.value = "unavailable");
|
|
585
585
|
const i = await t.createAiChatSession(e, a);
|
|
586
586
|
if (r !== s) return;
|
|
587
|
-
|
|
587
|
+
o.value = i, n.value = "ready";
|
|
588
588
|
} catch (e) {
|
|
589
589
|
if (r !== s) return;
|
|
590
|
-
l.value = e instanceof Error ? e : new Error(String(e)),
|
|
590
|
+
l.value = e instanceof Error ? e : new Error(String(e)), n.value = "error";
|
|
591
591
|
}
|
|
592
592
|
})(), {
|
|
593
|
-
state:
|
|
594
|
-
session:
|
|
593
|
+
state: n,
|
|
594
|
+
session: o,
|
|
595
595
|
initError: l
|
|
596
596
|
};
|
|
597
597
|
}(l.bridge, l.config), u = (0, r.computed)(() => l.panelWidth ? { width: `${l.panelWidth}px` } : void 0), m = t.useAiPanelController({
|
|
@@ -610,7 +610,7 @@ var s = { class: "border-t border-border p-2" }, i = { class: "flex items-end ga
|
|
|
610
610
|
type: "button",
|
|
611
611
|
title: (0, r.unref)(i)("pptx.ai.close"),
|
|
612
612
|
"aria-label": (0, r.unref)(i)("pptx.ai.close"),
|
|
613
|
-
class: "ml-auto rounded-sm p-1 text-muted-foreground transition-colors hover:bg-accent",
|
|
613
|
+
class: "ml-auto flex items-center justify-center rounded-sm p-1 text-muted-foreground transition-colors hover:bg-accent max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
614
614
|
onClick: t[0] || (t[0] = (e) => s("close"))
|
|
615
615
|
}, [(0, r.createVNode)((0, r.unref)(a.X), { class: "w-4 h-4" })], 8, ve)
|
|
616
616
|
]), "checking" === (0, r.unref)(c) ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", Ce, [(0, r.createVNode)((0, r.unref)(a.LoaderCircle), { class: "w-5 h-5 animate-spin" })])) : "unavailable" === (0, r.unref)(c) || "error" === (0, r.unref)(c) ? ((0, r.openBlock)(), (0, r.createElementBlock)("div", Be, [
|
|
Binary file
|
|
Binary file
|