@opentiny/tiny-robot 0.3.1-alpha.7 → 0.3.1-alpha.8
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/dist/action-group/index.js +9 -9
- package/dist/attachments/index.js +1 -1
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +11 -6
- package/dist/container/index.js +7 -7
- package/dist/drag-overlay/index.js +7 -7
- package/dist/dropdown-menu/index.js +7 -7
- package/dist/feedback/index.js +1 -1
- package/dist/flow-layout-buttons/index.js +17 -17
- package/dist/history/index.js +1 -1
- package/dist/icon-button/index.js +1 -1
- package/dist/index.d.ts +2653 -1357
- package/dist/index.js +158 -123
- package/dist/index2.js +183 -4062
- package/dist/index3.js +266 -285
- package/dist/index4.js +380 -323
- package/dist/index5.js +510 -142
- package/dist/index6.js +301 -0
- package/dist/index7.js +161 -0
- package/dist/mcp-add-form/index.js +7 -7
- package/dist/mcp-server-picker/index.js +1 -1
- package/dist/prompts/index.js +3 -3
- package/dist/sender/index.js +3180 -1399
- package/dist/sender-actions/index.js +13 -0
- package/dist/sender-compat/index.js +229 -0
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +14 -14
- package/dist/suggestion-popover/index.js +181 -182
- package/dist/theme-provider/index.js +7 -7
- package/dist/utils.js +1 -1
- package/dist/welcome/index.js +4 -4
- package/package.json +18 -5
- package/dist/loading.js +0 -4
package/dist/index3.js
CHANGED
|
@@ -1,301 +1,282 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
m(), s.addEventListener("change", m);
|
|
13
|
-
const t = (c) => {
|
|
14
|
-
D.value = c.pointerType !== "mouse";
|
|
15
|
-
};
|
|
16
|
-
return window.addEventListener("pointerdown", t, !0), () => {
|
|
17
|
-
s.removeEventListener("change", m), window.removeEventListener("pointerdown", t, !0);
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function he() {
|
|
21
|
-
b == null || b(), b = void 0;
|
|
22
|
-
}
|
|
23
|
-
function Ce() {
|
|
24
|
-
return typeof window > "u" ? {
|
|
25
|
-
isTouchDevice: D
|
|
26
|
-
} : (ne(() => {
|
|
27
|
-
T++, T === 1 && (b = _e());
|
|
28
|
-
}), oe(() => {
|
|
29
|
-
T = Math.max(0, T - 1), T === 0 && he();
|
|
30
|
-
}), {
|
|
31
|
-
isTouchDevice: D
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon" }, Ee = { class: "tr-history__empty-text" }, we = /* @__PURE__ */ P({
|
|
35
|
-
__name: "Empty",
|
|
1
|
+
var $ = Object.defineProperty;
|
|
2
|
+
var D = (i, o, e) => o in i ? $(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e;
|
|
3
|
+
var C = (i, o, e) => D(i, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { defineComponent as B, toRefs as H, computed as R, watch as F, openBlock as S, createBlock as x, unref as p, ref as V, reactive as A, onUnmounted as P, createElementBlock as j, Fragment as U, normalizeClass as W, createSlots as L, withCtx as y, renderSlot as z, resolveDynamicComponent as M, createCommentVNode as N } from "vue";
|
|
5
|
+
import { e as O } from "./index4.js";
|
|
6
|
+
import { u as I, A as b } from "./index2.js";
|
|
7
|
+
import { IconUpload as T, IconVoice as _, IconRecordingWave as q } from "@opentiny/tiny-robot-svgs";
|
|
8
|
+
import { _ as G } from "./_plugin-vue_export-helper.js";
|
|
9
|
+
const te = /* @__PURE__ */ B({
|
|
10
|
+
__name: "index",
|
|
36
11
|
props: {
|
|
37
|
-
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
accept: { default: "*" },
|
|
14
|
+
multiple: { type: Boolean, default: !0 },
|
|
15
|
+
reset: { type: Boolean, default: !0 },
|
|
16
|
+
maxSize: {},
|
|
17
|
+
maxCount: {},
|
|
18
|
+
tooltip: {},
|
|
19
|
+
size: {},
|
|
20
|
+
icon: {},
|
|
21
|
+
tooltipPlacement: { default: "top" }
|
|
38
22
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, {
|
|
54
|
-
trigger: { default: null },
|
|
55
|
-
triggerModifiers: {},
|
|
56
|
-
data: { default: null },
|
|
57
|
-
dataModifiers: {}
|
|
58
|
-
}),
|
|
59
|
-
emits: /* @__PURE__ */ W(["item-click"], ["update:trigger", "update:data"]),
|
|
60
|
-
setup(s, { emit: m }) {
|
|
61
|
-
const t = j(s, "trigger"), c = j(s, "data"), h = s, C = m, E = _(null);
|
|
62
|
-
Z(
|
|
63
|
-
E,
|
|
64
|
-
() => {
|
|
65
|
-
t.value = null, c.value = null;
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
ignore: [t]
|
|
23
|
+
emits: ["select", "error"],
|
|
24
|
+
setup(i, { expose: o, emit: e }) {
|
|
25
|
+
const n = i, l = e, { accept: c, multiple: h, reset: m } = H(n), { disabled: a } = I(), t = R(() => n.disabled || a.value), { open: r, files: d } = O({
|
|
26
|
+
accept: c,
|
|
27
|
+
multiple: h,
|
|
28
|
+
reset: m
|
|
29
|
+
});
|
|
30
|
+
F(d, (f) => {
|
|
31
|
+
if (!f || f.length === 0) return;
|
|
32
|
+
const g = Array.from(f);
|
|
33
|
+
if (n.maxCount && g.length > n.maxCount) {
|
|
34
|
+
const s = new Error(`最多只能选择 ${n.maxCount} 个文件`);
|
|
35
|
+
l("error", s);
|
|
36
|
+
return;
|
|
69
37
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
38
|
+
if (n.maxSize) {
|
|
39
|
+
const s = n.maxSize * 1024 * 1024, v = g.filter((E) => E.size > s);
|
|
40
|
+
if (v.length > 0) {
|
|
41
|
+
const E = new Error(`以下文件超过 ${n.maxSize}MB 限制: ${v.map((k) => k.name).join(", ")}`);
|
|
42
|
+
l("error", E, v);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
l("select", g);
|
|
47
|
+
});
|
|
48
|
+
const u = () => {
|
|
49
|
+
t.value || r();
|
|
78
50
|
};
|
|
79
|
-
return (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
51
|
+
return o({
|
|
52
|
+
open: r
|
|
53
|
+
}), (f, g) => (S(), x(b, {
|
|
54
|
+
icon: i.icon ?? p(T),
|
|
55
|
+
disabled: t.value,
|
|
56
|
+
size: i.size,
|
|
57
|
+
tooltip: i.tooltip,
|
|
58
|
+
"tooltip-placement": i.tooltipPlacement,
|
|
59
|
+
onClick: u
|
|
60
|
+
}, null, 8, ["icon", "disabled", "size", "tooltip", "tooltip-placement"]));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
class w {
|
|
64
|
+
constructor(o) {
|
|
65
|
+
C(this, "recognition");
|
|
66
|
+
C(this, "options");
|
|
67
|
+
this.options = o, this.initialize();
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* 初始化语音识别实例
|
|
71
|
+
*/
|
|
72
|
+
initialize() {
|
|
73
|
+
this.recognition = new (window.webkitSpeechRecognition || window.SpeechRecognition)(), this.recognition.continuous = this.options.continuous ?? !1, this.recognition.interimResults = this.options.interimResults ?? !0, this.recognition.lang = this.options.lang ?? navigator.language;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 检查浏览器是否支持 Web Speech API
|
|
77
|
+
*/
|
|
78
|
+
static isSupported() {
|
|
79
|
+
return typeof window < "u" && ("webkitSpeechRecognition" in window || "SpeechRecognition" in window);
|
|
94
80
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
81
|
+
/**
|
|
82
|
+
* 检查浏览器是否支持 Web Speech API(实例方法)
|
|
83
|
+
*/
|
|
84
|
+
isSupported() {
|
|
85
|
+
return w.isSupported();
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 设置语音识别事件处理器
|
|
89
|
+
* @param callbacks 语音识别回调函数集合
|
|
90
|
+
*/
|
|
91
|
+
setupEventHandlers(o) {
|
|
92
|
+
!this.recognition || !o || (this.recognition.onstart = () => {
|
|
93
|
+
o.onStart();
|
|
94
|
+
}, this.recognition.onend = () => {
|
|
95
|
+
o.onEnd();
|
|
96
|
+
}, this.recognition.onresult = (e) => {
|
|
97
|
+
const n = Array.from(e.results).map((c) => c[0].transcript).join(""), l = e.results[e.resultIndex];
|
|
98
|
+
l != null && l.isFinal ? o.onFinal(n) : o.onInterim(n);
|
|
99
|
+
}, this.recognition.onerror = (e) => {
|
|
100
|
+
o.onError(new Error(e.error)), this.cleanup();
|
|
112
101
|
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 清理事件监听器
|
|
105
|
+
*/
|
|
106
|
+
cleanup() {
|
|
107
|
+
this.recognition && (this.recognition.onstart = null, this.recognition.onend = null, this.recognition.onresult = null, this.recognition.onerror = null);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* 开始语音识别
|
|
111
|
+
* @param callbacks 语音识别回调函数集合
|
|
112
|
+
*/
|
|
113
|
+
start(o) {
|
|
114
|
+
if (!this.recognition) {
|
|
115
|
+
o.onError(new Error("浏览器不支持语音识别"));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this.setupEventHandlers(o);
|
|
119
|
+
try {
|
|
120
|
+
this.recognition.start();
|
|
121
|
+
} catch (e) {
|
|
122
|
+
o.onError(e instanceof Error ? e : new Error("语音识别启动失败"));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* 停止语音识别并清理资源
|
|
127
|
+
*/
|
|
128
|
+
stop() {
|
|
129
|
+
if (this.recognition) {
|
|
130
|
+
this.cleanup();
|
|
131
|
+
try {
|
|
132
|
+
this.recognition.stop();
|
|
133
|
+
} catch (o) {
|
|
134
|
+
console.warn("停止语音识别时发生错误:", o);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function J(i) {
|
|
140
|
+
const o = V(i), e = A({
|
|
141
|
+
isRecording: !1,
|
|
142
|
+
isSupported: !1,
|
|
143
|
+
error: void 0
|
|
144
|
+
}), n = {
|
|
145
|
+
onStart: () => {
|
|
146
|
+
var a, t;
|
|
147
|
+
e.isRecording = !0, e.error = void 0, (t = (a = o.value).onStart) == null || t.call(a);
|
|
122
148
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
149
|
+
onInterim: (a) => {
|
|
150
|
+
var t, r;
|
|
151
|
+
(r = (t = o.value).onInterim) == null || r.call(t, a);
|
|
152
|
+
},
|
|
153
|
+
onFinal: (a) => {
|
|
154
|
+
var t, r;
|
|
155
|
+
(r = (t = o.value).onFinal) == null || r.call(t, a);
|
|
156
|
+
},
|
|
157
|
+
onEnd: (a) => {
|
|
158
|
+
var t, r;
|
|
159
|
+
e.isRecording && (e.isRecording = !1, (r = (t = o.value).onEnd) == null || r.call(t, a));
|
|
160
|
+
},
|
|
161
|
+
onError: (a) => {
|
|
162
|
+
var t, r;
|
|
163
|
+
e.error = a, e.isRecording = !1, (r = (t = o.value).onError) == null || r.call(t, a);
|
|
164
|
+
}
|
|
165
|
+
}, l = w.isSupported();
|
|
166
|
+
e.isSupported = i.customHandler ? i.customHandler.isSupported() : l;
|
|
167
|
+
const c = i.customHandler ?? (l ? new w(i) : null), h = () => {
|
|
168
|
+
var a, t, r, d;
|
|
169
|
+
if (!e.isSupported || !c) {
|
|
170
|
+
const u = new Error("语音识别不受支持");
|
|
171
|
+
e.error = u, (t = (a = o.value).onError) == null || t.call(a, u);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (e.isRecording) {
|
|
175
|
+
c.stop(), e.isRecording = !1, setTimeout(() => {
|
|
176
|
+
c.start(n);
|
|
177
|
+
}, 200);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
try {
|
|
181
|
+
c.start(n);
|
|
182
|
+
} catch (u) {
|
|
183
|
+
e.error = u instanceof Error ? u : new Error("启动失败"), (d = (r = o.value).onError) == null || d.call(r, e.error);
|
|
184
|
+
}
|
|
185
|
+
}, m = () => {
|
|
186
|
+
!e.isRecording || !c || (c.stop(), n.onEnd());
|
|
187
|
+
};
|
|
188
|
+
return P(() => {
|
|
189
|
+
e.isRecording && c && (c.stop(), e.isRecording = !1);
|
|
190
|
+
}), {
|
|
191
|
+
speechState: e,
|
|
192
|
+
start: h,
|
|
193
|
+
stop: m
|
|
133
194
|
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
class: "tr-history__group-title"
|
|
137
|
-
}, be = { class: "tr-history__group-items" }, Ge = ["onClick"], Oe = ["title"], Se = ["onClick"], Be = /* @__PURE__ */ P({
|
|
195
|
+
}
|
|
196
|
+
const K = /* @__PURE__ */ B({
|
|
138
197
|
__name: "index",
|
|
139
198
|
props: {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
199
|
+
icon: {},
|
|
200
|
+
recordingIcon: {},
|
|
201
|
+
disabled: { type: Boolean },
|
|
202
|
+
size: {},
|
|
203
|
+
tooltip: {},
|
|
204
|
+
tooltipPlacement: { default: "top" },
|
|
205
|
+
speechConfig: {},
|
|
206
|
+
autoInsert: { type: Boolean, default: !0 },
|
|
207
|
+
onButtonClick: {}
|
|
149
208
|
},
|
|
150
|
-
emits: ["
|
|
151
|
-
setup(
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
} = Te({
|
|
169
|
-
renameControlOnClickOutside: t.renameControlOnClickOutside,
|
|
170
|
-
onItemTitleChange: (i, e) => {
|
|
171
|
-
c("item-title-change", i, e);
|
|
209
|
+
emits: ["speech-start", "speech-interim", "speech-final", "speech-end", "speech-error"],
|
|
210
|
+
setup(i, { expose: o, emit: e }) {
|
|
211
|
+
const n = i, l = e, { editor: c, disabled: h } = I(), m = R(() => n.disabled || h.value), a = {
|
|
212
|
+
...n.speechConfig,
|
|
213
|
+
onStart: () => {
|
|
214
|
+
l("speech-start");
|
|
215
|
+
},
|
|
216
|
+
onInterim: (s) => {
|
|
217
|
+
l("speech-interim", s);
|
|
218
|
+
},
|
|
219
|
+
onFinal: (s) => {
|
|
220
|
+
n.autoInsert && c.value && (c.value.commands.insertContent(s + " "), c.value.commands.focus("end")), l("speech-final", s);
|
|
221
|
+
},
|
|
222
|
+
onEnd: (s) => {
|
|
223
|
+
c.value && c.value.commands.focus("end"), l("speech-end", s);
|
|
224
|
+
},
|
|
225
|
+
onError: (s) => {
|
|
226
|
+
l("speech-error", s);
|
|
172
227
|
}
|
|
173
|
-
}
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
176
|
-
|
|
177
|
-
|
|
228
|
+
}, { speechState: t, start: r, stop: d } = J(a), u = async () => {
|
|
229
|
+
if (!m.value) {
|
|
230
|
+
if (n.onButtonClick) {
|
|
231
|
+
let s = !1;
|
|
232
|
+
if (await n.onButtonClick(t.isRecording, () => {
|
|
233
|
+
s = !0;
|
|
234
|
+
}), s) return;
|
|
178
235
|
}
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
e[2] || (e[2] = F(
|
|
219
|
-
//@ts-ignore
|
|
220
|
-
(...d) => n(v) && n(v)(...d),
|
|
221
|
-
["enter"]
|
|
222
|
-
)),
|
|
223
|
-
e[3] || (e[3] = F(
|
|
224
|
-
//@ts-ignore
|
|
225
|
-
(...d) => n(o) && n(o)(...d),
|
|
226
|
-
["escape"]
|
|
227
|
-
))
|
|
228
|
-
]
|
|
229
|
-
}, null, 544)), [
|
|
230
|
-
[re, n(k)]
|
|
231
|
-
]) : A(i.$slots, "item-title", {
|
|
232
|
-
key: 2,
|
|
233
|
-
item: l
|
|
234
|
-
}, () => [
|
|
235
|
-
w("span", {
|
|
236
|
-
class: "text",
|
|
237
|
-
title: l.title
|
|
238
|
-
}, B(l.title), 9, Oe)
|
|
239
|
-
], !0),
|
|
240
|
-
w("span", {
|
|
241
|
-
class: "tr-history__item-actions",
|
|
242
|
-
onClick: e[6] || (e[6] = J(() => {
|
|
243
|
-
}, ["stop"]))
|
|
244
|
-
}, [
|
|
245
|
-
t.showRenameControls && n(p) === l ? (r(), a("button", {
|
|
246
|
-
key: 0,
|
|
247
|
-
class: "editor-confirm",
|
|
248
|
-
ref_for: !0,
|
|
249
|
-
ref_key: "editorConfirmRefList",
|
|
250
|
-
ref: y,
|
|
251
|
-
onClick: e[4] || (e[4] = //@ts-ignore
|
|
252
|
-
(...d) => n(v) && n(v)(...d))
|
|
253
|
-
}, [
|
|
254
|
-
$(n(me))
|
|
255
|
-
], 512)) : G("", !0),
|
|
256
|
-
t.showRenameControls && n(p) === l ? (r(), a("button", {
|
|
257
|
-
key: 1,
|
|
258
|
-
class: "editor-cancel",
|
|
259
|
-
ref_for: !0,
|
|
260
|
-
ref_key: "editorCancelRefList",
|
|
261
|
-
ref: M,
|
|
262
|
-
onClick: e[5] || (e[5] = //@ts-ignore
|
|
263
|
-
(...d) => n(o) && n(o)(...d))
|
|
264
|
-
}, [
|
|
265
|
-
$(n(fe))
|
|
266
|
-
], 512)) : G("", !0),
|
|
267
|
-
w("button", {
|
|
268
|
-
class: U(["menu", { hidden: n(p) === l }]),
|
|
269
|
-
onClick: (d) => K(d, l)
|
|
270
|
-
}, [
|
|
271
|
-
$(n(pe))
|
|
272
|
-
], 10, Se)
|
|
273
|
-
])
|
|
274
|
-
], 10, Ge))), 128))
|
|
275
|
-
])
|
|
276
|
-
]))), 128)),
|
|
277
|
-
q($(Me, {
|
|
278
|
-
trigger: g.value,
|
|
279
|
-
"onUpdate:trigger": e[7] || (e[7] = (f) => g.value = f),
|
|
280
|
-
data: u.value,
|
|
281
|
-
"onUpdate:data": e[8] || (e[8] = (f) => u.value = f),
|
|
282
|
-
items: t.menuItems,
|
|
283
|
-
"menu-list-gap": t.menuListGap,
|
|
284
|
-
onItemClick: ee
|
|
285
|
-
}, null, 8, ["trigger", "data", "items", "menu-list-gap"]), [
|
|
286
|
-
[ae, g.value]
|
|
287
|
-
])
|
|
288
|
-
], 64))
|
|
289
|
-
], 2));
|
|
236
|
+
t.isRecording ? d() : r();
|
|
237
|
+
}
|
|
238
|
+
}, f = R(() => n.icon ?? _), g = R(() => n.recordingIcon ?? q);
|
|
239
|
+
return o({
|
|
240
|
+
start: r,
|
|
241
|
+
stop: d,
|
|
242
|
+
speechState: t
|
|
243
|
+
}), (s, v) => (S(), j(U, null, [
|
|
244
|
+
p(t).isSupported ? (S(), x(b, {
|
|
245
|
+
key: 0,
|
|
246
|
+
icon: f.value,
|
|
247
|
+
disabled: m.value,
|
|
248
|
+
size: i.size,
|
|
249
|
+
tooltip: i.tooltip,
|
|
250
|
+
"tooltip-placement": i.tooltipPlacement,
|
|
251
|
+
class: W({ "is-recording": p(t).isRecording }),
|
|
252
|
+
onClick: u
|
|
253
|
+
}, L({ _: 2 }, [
|
|
254
|
+
s.$slots.icon ? {
|
|
255
|
+
name: "icon",
|
|
256
|
+
fn: y(() => [
|
|
257
|
+
z(s.$slots, "icon", {
|
|
258
|
+
isRecording: p(t).isRecording
|
|
259
|
+
}, void 0, !0)
|
|
260
|
+
]),
|
|
261
|
+
key: "0"
|
|
262
|
+
} : p(t).isRecording ? {
|
|
263
|
+
name: "icon",
|
|
264
|
+
fn: y(() => [
|
|
265
|
+
(S(), x(M(g.value)))
|
|
266
|
+
]),
|
|
267
|
+
key: "1"
|
|
268
|
+
} : void 0
|
|
269
|
+
]), 1032, ["icon", "disabled", "size", "tooltip", "tooltip-placement", "class"])) : N("", !0),
|
|
270
|
+
z(s.$slots, "recording-overlay", {
|
|
271
|
+
isRecording: p(t).isRecording,
|
|
272
|
+
stop: p(d)
|
|
273
|
+
}, void 0, !0)
|
|
274
|
+
], 64));
|
|
290
275
|
}
|
|
291
|
-
}),
|
|
292
|
-
s.component(N.name, N);
|
|
293
|
-
};
|
|
294
|
-
Object.assign(N, {
|
|
295
|
-
name: "TrHistory",
|
|
296
|
-
install: De
|
|
297
|
-
});
|
|
276
|
+
}), ne = /* @__PURE__ */ G(K, [["__scopeId", "data-v-2a013fc9"]]);
|
|
298
277
|
export {
|
|
299
|
-
|
|
300
|
-
|
|
278
|
+
ne as V,
|
|
279
|
+
w as W,
|
|
280
|
+
te as _,
|
|
281
|
+
J as u
|
|
301
282
|
};
|