@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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as H, computed as p, ref as R, openBlock as g, createBlock as b, unref as S, createSlots as J, withCtx as r, renderSlot as i, normalizeProps as y, mergeProps as k, createCommentVNode as d, guardReactiveProps as B } from "vue";
2
- import V from "../sender/index.js";
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, $ = 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 = R(), v = R(), D = p(() => {
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 = V.Suggestion;
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 = V.Template;
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
- }), C = p(() => {
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
- }, T = (e) => {
88
+ }, C = (e) => {
89
89
  l("files-selected", e);
90
- }, G = () => {
90
+ }, T = () => {
91
91
  l("speech-start");
92
- }, x = (e) => {
92
+ }, G = (e) => {
93
93
  l("speech-end", e);
94
- }, E = (e) => {
94
+ }, x = (e) => {
95
95
  l("speech-interim", e);
96
- }, F = (e) => {
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 = v.value) == null || e.start();
119
+ (e = k.value) == null || e.start();
120
120
  },
121
121
  stopSpeech: () => {
122
122
  var e;
123
- (e = v.value) == null || e.stop();
123
+ (e = k.value) == null || e.stop();
124
124
  }
125
- }), (e, o) => (g(), b(S(V), {
125
+ }), (e, o) => (g(), b(S(B), {
126
126
  ref_key: "senderRef",
127
127
  ref: u,
128
- modelValue: $.value,
129
- "onUpdate:modelValue": o[0] || (o[0] = (n) => $.value = 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), k({ key: 0 }, {
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: T }), null, 16)) : d("", !0),
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: v,
161
- "speech-config": C.value,
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: G,
164
- onSpeechEnd: x,
165
- onSpeechInterim: E,
166
- onSpeechError: F
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(k({ key: 2 }, n))) : d("", !0)
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(B(n))),
173
- i(e.$slots, "footer", y(B(n)))
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(k({ key: 0 }, n))) : d("", !0),
179
- t.allowFiles && t.mode === "multiple" ? (g(), b(S(z), k({ key: 1 }, {
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: T }), null, 16)) : d("", !0),
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: v,
187
- "speech-config": C.value,
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: G,
190
- onSpeechEnd: x,
191
- onSpeechInterim: E,
192
- onSpeechError: F
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(B(n)))
215
+ i(e.$slots, "content", v(y(n)))
216
216
  ]),
217
217
  key: "2"
218
218
  } : void 0