@opentiny/tiny-robot 0.4.2-alpha.9 → 0.5.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/dist/index.d.ts +370 -92
- package/dist/index2.js +12 -12
- package/dist/index7.js +21 -24
- package/dist/layout/index.js +495 -504
- package/dist/sender/index.js +1031 -1053
- package/dist/sender-compat/index.js +38 -38
- package/dist/style.css +1 -1
- package/dist/suggestion-popover/index.js +2 -4
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as H, computed as p, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as H, computed as p, ref as F, openBlock as g, createBlock as b, unref as S, createSlots as J, withCtx as r, renderSlot as i, normalizeProps as v, guardReactiveProps as y, createCommentVNode as d, mergeProps as R } from "vue";
|
|
2
|
+
import B from "../sender/index.js";
|
|
3
3
|
import { _ as z, V as W } from "../index3.js";
|
|
4
4
|
const w = /* @__PURE__ */ H({
|
|
5
5
|
__name: "index",
|
|
@@ -29,16 +29,16 @@ const w = /* @__PURE__ */ H({
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["update:modelValue", "update:templateData", "submit", "clear", "speech-start", "speech-end", "speech-interim", "speech-error", "suggestion-select", "focus", "blur", "escape-press", "cancel", "reset-template", "files-selected"],
|
|
31
31
|
setup(t, { expose: L, emit: P }) {
|
|
32
|
-
const c = t, l = P,
|
|
32
|
+
const c = t, l = P, V = p({
|
|
33
33
|
get: () => c.modelValue ?? "",
|
|
34
34
|
set: (e) => {
|
|
35
35
|
l("update:modelValue", e);
|
|
36
36
|
}
|
|
37
|
-
}), j = p(() => c.defaultValue), u =
|
|
37
|
+
}), j = p(() => c.defaultValue), u = F(), k = F(), D = p(() => {
|
|
38
38
|
var n;
|
|
39
39
|
const e = [];
|
|
40
40
|
if ((n = c.suggestions) != null && n.length) {
|
|
41
|
-
const s =
|
|
41
|
+
const s = B.Suggestion;
|
|
42
42
|
s && e.push(
|
|
43
43
|
s.configure({
|
|
44
44
|
items: c.suggestions,
|
|
@@ -51,13 +51,13 @@ const w = /* @__PURE__ */ H({
|
|
|
51
51
|
})
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
-
const o =
|
|
54
|
+
const o = B.Template;
|
|
55
55
|
return o && e.push(o.configure({})), e;
|
|
56
56
|
}), I = p(() => {
|
|
57
57
|
var o;
|
|
58
58
|
const e = {};
|
|
59
59
|
return (o = c.buttonGroup) != null && o.submit && (e.submit = c.buttonGroup.submit), Object.keys(e).length > 0 ? e : void 0;
|
|
60
|
-
}),
|
|
60
|
+
}), $ = p(() => {
|
|
61
61
|
if (typeof c.speech != "boolean")
|
|
62
62
|
return c.speech;
|
|
63
63
|
}), K = (e) => {
|
|
@@ -85,15 +85,15 @@ const w = /* @__PURE__ */ H({
|
|
|
85
85
|
l("focus", e);
|
|
86
86
|
}, q = (e) => {
|
|
87
87
|
l("blur", e);
|
|
88
|
-
},
|
|
88
|
+
}, C = (e) => {
|
|
89
89
|
l("files-selected", e);
|
|
90
|
-
},
|
|
90
|
+
}, T = () => {
|
|
91
91
|
l("speech-start");
|
|
92
|
-
},
|
|
92
|
+
}, G = (e) => {
|
|
93
93
|
l("speech-end", e);
|
|
94
|
-
},
|
|
94
|
+
}, x = (e) => {
|
|
95
95
|
l("speech-interim", e);
|
|
96
|
-
},
|
|
96
|
+
}, E = (e) => {
|
|
97
97
|
l("speech-error", e);
|
|
98
98
|
};
|
|
99
99
|
return L({
|
|
@@ -116,17 +116,17 @@ const w = /* @__PURE__ */ H({
|
|
|
116
116
|
setTemplateData: K,
|
|
117
117
|
startSpeech: () => {
|
|
118
118
|
var e;
|
|
119
|
-
(e =
|
|
119
|
+
(e = k.value) == null || e.start();
|
|
120
120
|
},
|
|
121
121
|
stopSpeech: () => {
|
|
122
122
|
var e;
|
|
123
|
-
(e =
|
|
123
|
+
(e = k.value) == null || e.stop();
|
|
124
124
|
}
|
|
125
|
-
}), (e, o) => (g(), b(S(
|
|
125
|
+
}), (e, o) => (g(), b(S(B), {
|
|
126
126
|
ref_key: "senderRef",
|
|
127
127
|
ref: u,
|
|
128
|
-
modelValue:
|
|
129
|
-
"onUpdate:modelValue": o[0] || (o[0] = (n) =>
|
|
128
|
+
modelValue: V.value,
|
|
129
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => V.value = n),
|
|
130
130
|
"default-value": j.value,
|
|
131
131
|
mode: t.mode,
|
|
132
132
|
placeholder: t.placeholder,
|
|
@@ -150,46 +150,46 @@ const w = /* @__PURE__ */ H({
|
|
|
150
150
|
"actions-inline": r((n) => {
|
|
151
151
|
var s, a, m, f, h;
|
|
152
152
|
return [
|
|
153
|
-
t.allowFiles && t.mode === "single" ? (g(), b(S(z),
|
|
153
|
+
t.allowFiles && t.mode === "single" ? (g(), b(S(z), R({ key: 0 }, {
|
|
154
154
|
...(s = t.buttonGroup) == null ? void 0 : s.file,
|
|
155
155
|
tooltip: (m = (a = t.buttonGroup) == null ? void 0 : a.file) == null ? void 0 : m.tooltips
|
|
156
|
-
}, { onSelect:
|
|
156
|
+
}, { onSelect: C }), null, 16)) : d("", !0),
|
|
157
157
|
t.allowSpeech && t.mode === "single" ? (g(), b(S(W), {
|
|
158
158
|
key: 1,
|
|
159
159
|
ref_key: "voiceRef",
|
|
160
|
-
ref:
|
|
161
|
-
"speech-config":
|
|
160
|
+
ref: k,
|
|
161
|
+
"speech-config": $.value,
|
|
162
162
|
icon: (h = (f = t.buttonGroup) == null ? void 0 : f.voice) == null ? void 0 : h.icon,
|
|
163
|
-
onSpeechStart:
|
|
164
|
-
onSpeechEnd:
|
|
165
|
-
onSpeechInterim:
|
|
166
|
-
onSpeechError:
|
|
163
|
+
onSpeechStart: T,
|
|
164
|
+
onSpeechEnd: G,
|
|
165
|
+
onSpeechInterim: x,
|
|
166
|
+
onSpeechError: E
|
|
167
167
|
}, null, 8, ["speech-config", "icon"])) : d("", !0),
|
|
168
|
-
e.$slots.actions ? i(e.$slots, "actions", y(
|
|
168
|
+
e.$slots.actions ? i(e.$slots, "actions", v(y(n)), void 0, void 0, 2) : d("", !0)
|
|
169
169
|
];
|
|
170
170
|
}),
|
|
171
171
|
footer: r((n) => [
|
|
172
|
-
i(e.$slots, "footer-left", y(
|
|
173
|
-
i(e.$slots, "footer", y(
|
|
172
|
+
i(e.$slots, "footer-left", v(y(n))),
|
|
173
|
+
i(e.$slots, "footer", v(y(n)))
|
|
174
174
|
]),
|
|
175
175
|
"footer-right": r((n) => {
|
|
176
176
|
var s, a, m, f, h;
|
|
177
177
|
return [
|
|
178
|
-
e.$slots["footer-right"] ? i(e.$slots, "footer-right", y(
|
|
179
|
-
t.allowFiles && t.mode === "multiple" ? (g(), b(S(z),
|
|
178
|
+
e.$slots["footer-right"] ? i(e.$slots, "footer-right", v(y(n)), void 0, void 0, 0) : d("", !0),
|
|
179
|
+
t.allowFiles && t.mode === "multiple" ? (g(), b(S(z), R({ key: 1 }, {
|
|
180
180
|
...(s = t.buttonGroup) == null ? void 0 : s.file,
|
|
181
181
|
tooltip: (m = (a = t.buttonGroup) == null ? void 0 : a.file) == null ? void 0 : m.tooltips
|
|
182
|
-
}, { onSelect:
|
|
182
|
+
}, { onSelect: C }), null, 16)) : d("", !0),
|
|
183
183
|
t.allowSpeech && t.mode === "multiple" ? (g(), b(S(W), {
|
|
184
184
|
key: 2,
|
|
185
185
|
ref_key: "voiceRef",
|
|
186
|
-
ref:
|
|
187
|
-
"speech-config":
|
|
186
|
+
ref: k,
|
|
187
|
+
"speech-config": $.value,
|
|
188
188
|
icon: (h = (f = t.buttonGroup) == null ? void 0 : f.voice) == null ? void 0 : h.icon,
|
|
189
|
-
onSpeechStart:
|
|
190
|
-
onSpeechEnd:
|
|
191
|
-
onSpeechInterim:
|
|
192
|
-
onSpeechError:
|
|
189
|
+
onSpeechStart: T,
|
|
190
|
+
onSpeechEnd: G,
|
|
191
|
+
onSpeechInterim: x,
|
|
192
|
+
onSpeechError: E
|
|
193
193
|
}, null, 8, ["speech-config", "icon"])) : d("", !0)
|
|
194
194
|
];
|
|
195
195
|
}),
|
|
@@ -212,7 +212,7 @@ const w = /* @__PURE__ */ H({
|
|
|
212
212
|
e.$slots.content ? {
|
|
213
213
|
name: "content",
|
|
214
214
|
fn: r((n) => [
|
|
215
|
-
i(e.$slots, "content", y(
|
|
215
|
+
i(e.$slots, "content", v(y(n)))
|
|
216
216
|
]),
|
|
217
217
|
key: "2"
|
|
218
218
|
} : void 0
|