@opentiny/tiny-robot 0.3.0-alpha.33 → 0.3.0-alpha.35
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/flow-layout-buttons/index.js +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index2.js +14 -14
- package/dist/sender/index.js +1027 -939
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -115,7 +115,7 @@ const P = ["onClick"], Q = {
|
|
|
115
115
|
])
|
|
116
116
|
], 512));
|
|
117
117
|
}
|
|
118
|
-
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-
|
|
118
|
+
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-df81e3e1"]]);
|
|
119
119
|
p.name = "TrFlowLayout";
|
|
120
120
|
const te = function(d) {
|
|
121
121
|
d.component(p.name, p);
|
package/dist/index.d.ts
CHANGED
|
@@ -1221,6 +1221,7 @@ declare function __VLS_template_7(): {
|
|
|
1221
1221
|
slots: {
|
|
1222
1222
|
header?(_: {}): any;
|
|
1223
1223
|
prefix?(_: {}): any;
|
|
1224
|
+
content?(_: {}): any;
|
|
1224
1225
|
decorativeContent?(_: {}): any;
|
|
1225
1226
|
actions?(_: {}): any;
|
|
1226
1227
|
'footer-left'?(_: {}): any;
|
|
@@ -2056,6 +2057,7 @@ export declare interface BubbleSlots {
|
|
|
2056
2057
|
export declare interface ButtonGroupConfig {
|
|
2057
2058
|
file?: ControlState & fileUploadConfig;
|
|
2058
2059
|
submit?: ControlState;
|
|
2060
|
+
voice?: VoiceButtonConfig;
|
|
2059
2061
|
}
|
|
2060
2062
|
|
|
2061
2063
|
export declare type ColorMode = 'light' | 'dark' | 'auto';
|
|
@@ -2928,14 +2930,30 @@ export declare interface SenderProps {
|
|
|
2928
2930
|
stopText?: string;
|
|
2929
2931
|
}
|
|
2930
2932
|
|
|
2933
|
+
export declare interface SpeechCallbacks {
|
|
2934
|
+
onStart: () => void;
|
|
2935
|
+
onInterim: (transcript: string) => void;
|
|
2936
|
+
onFinal: (transcript: string) => void;
|
|
2937
|
+
onEnd: (transcript?: string) => void;
|
|
2938
|
+
onError: (error: Error) => void;
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2931
2941
|
export declare interface SpeechConfig {
|
|
2942
|
+
customHandler?: SpeechHandler;
|
|
2932
2943
|
lang?: string;
|
|
2933
2944
|
continuous?: boolean;
|
|
2934
2945
|
interimResults?: boolean;
|
|
2935
2946
|
autoReplace?: boolean;
|
|
2947
|
+
onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
|
|
2936
2948
|
}
|
|
2937
2949
|
|
|
2938
2950
|
export declare interface SpeechHandler {
|
|
2951
|
+
start: (callbacks: SpeechCallbacks) => Promise<void> | void;
|
|
2952
|
+
stop: () => Promise<void> | void;
|
|
2953
|
+
isSupported: () => boolean;
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
export declare interface SpeechHandlerResult {
|
|
2939
2957
|
speechState: SpeechState;
|
|
2940
2958
|
start: () => void;
|
|
2941
2959
|
stop: () => void;
|
|
@@ -3189,6 +3207,10 @@ export declare function useTouchDevice(): {
|
|
|
3189
3207
|
*/
|
|
3190
3208
|
export declare const vDropzone: Directive<DragAwareElement, DropzoneBinding>;
|
|
3191
3209
|
|
|
3210
|
+
declare interface VoiceButtonConfig {
|
|
3211
|
+
icon?: VNode | Component;
|
|
3212
|
+
}
|
|
3213
|
+
|
|
3192
3214
|
export declare interface WelcomeProps {
|
|
3193
3215
|
title: string;
|
|
3194
3216
|
description: string;
|
package/dist/index2.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as y, onMounted as ee, onBeforeUnmount as te, defineComponent as N, createElementBlock as r, openBlock as s, createElementVNode as R, createVNode as
|
|
1
|
+
import { ref as y, onMounted as ee, onBeforeUnmount as te, defineComponent as N, createElementBlock as r, openBlock as s, createElementVNode as R, createVNode as T, unref as n, toDisplayString as B, mergeModels as K, useModel as W, computed as x, normalizeStyle as ne, Fragment as O, renderList as V, createBlock as Q, resolveDynamicComponent as oe, nextTick as ie, normalizeClass as S, withDirectives as j, createCommentVNode as U, withKeys as q, withModifiers as A, isRef as se, vModelText as le, vShow as re } from "vue";
|
|
2
2
|
import { IconEmptySearch as ae, IconEditPen as ue, IconDelete as ce, IconCheck as de, IconClose as me, IconMenu2 as fe } from "@opentiny/tiny-robot-svgs";
|
|
3
3
|
import { _ as P } from "./_plugin-vue_export-helper.js";
|
|
4
4
|
import { o as X, a as pe, d as ve, c as _e } from "./index3.js";
|
|
5
5
|
import { t as G } from "./utils.js";
|
|
6
6
|
const D = y(!1);
|
|
7
|
-
let
|
|
7
|
+
let b = 0, $;
|
|
8
8
|
function ge() {
|
|
9
9
|
const i = window.matchMedia("(hover: none) and (pointer: coarse)"), m = () => {
|
|
10
10
|
D.value = i.matches;
|
|
@@ -24,9 +24,9 @@ function he() {
|
|
|
24
24
|
return typeof window > "u" ? {
|
|
25
25
|
isTouchDevice: D
|
|
26
26
|
} : (ee(() => {
|
|
27
|
-
|
|
27
|
+
b++, b === 1 && ($ = ge());
|
|
28
28
|
}), te(() => {
|
|
29
|
-
|
|
29
|
+
b = Math.max(0, b - 1), b === 0 && ye();
|
|
30
30
|
}), {
|
|
31
31
|
isTouchDevice: D
|
|
32
32
|
});
|
|
@@ -40,7 +40,7 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
40
40
|
const m = i;
|
|
41
41
|
return (t, c) => (s(), r("div", Ce, [
|
|
42
42
|
R("span", ke, [
|
|
43
|
-
|
|
43
|
+
T(n(ae))
|
|
44
44
|
]),
|
|
45
45
|
R("span", Le, B(m.text), 1)
|
|
46
46
|
]));
|
|
@@ -92,7 +92,7 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
92
92
|
], 8, Re))), 128))
|
|
93
93
|
], 4));
|
|
94
94
|
}
|
|
95
|
-
}), Ie = /* @__PURE__ */ P(xe, [["__scopeId", "data-v-
|
|
95
|
+
}), Ie = /* @__PURE__ */ P(xe, [["__scopeId", "data-v-89fdb41c"]]), Me = ({
|
|
96
96
|
renameControlOnClickOutside: i,
|
|
97
97
|
onItemTitleChange: m
|
|
98
98
|
}) => {
|
|
@@ -131,10 +131,10 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
131
131
|
handleEditCancel: k,
|
|
132
132
|
handleEditConfirm: w
|
|
133
133
|
};
|
|
134
|
-
}, J = Symbol("NO_GROUP"),
|
|
134
|
+
}, J = Symbol("NO_GROUP"), be = {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: "tr-history__group-title"
|
|
137
|
-
},
|
|
137
|
+
}, Te = { class: "tr-history__group-items" }, $e = ["onClick"], Ge = ["title"], Oe = ["onClick"], Be = /* @__PURE__ */ N({
|
|
138
138
|
__name: "index",
|
|
139
139
|
props: {
|
|
140
140
|
data: {},
|
|
@@ -191,8 +191,8 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
191
191
|
class: "tr-history__group",
|
|
192
192
|
key: f.group
|
|
193
193
|
}, [
|
|
194
|
-
f.group !== n(J) ? (s(), r("div",
|
|
195
|
-
R("div",
|
|
194
|
+
f.group !== n(J) ? (s(), r("div", be, B(f.group), 1)) : U("", !0),
|
|
195
|
+
R("div", Te, [
|
|
196
196
|
(s(!0), r(O, null, V(f.items, (u, Z) => (s(), r("div", {
|
|
197
197
|
class: S(["tr-history__item", {
|
|
198
198
|
selected: u.id && u.id === t.selected,
|
|
@@ -245,7 +245,7 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
245
245
|
onClick: e[4] || (e[4] = //@ts-ignore
|
|
246
246
|
(...d) => n(v) && n(v)(...d))
|
|
247
247
|
}, [
|
|
248
|
-
|
|
248
|
+
T(n(de))
|
|
249
249
|
], 512)) : U("", !0),
|
|
250
250
|
t.showRenameControls && n(p) === u ? (s(), r("button", {
|
|
251
251
|
key: 1,
|
|
@@ -256,19 +256,19 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
256
256
|
onClick: e[5] || (e[5] = //@ts-ignore
|
|
257
257
|
(...d) => n(o) && n(o)(...d))
|
|
258
258
|
}, [
|
|
259
|
-
|
|
259
|
+
T(n(me))
|
|
260
260
|
], 512)) : U("", !0),
|
|
261
261
|
R("button", {
|
|
262
262
|
class: S(["menu", { hidden: n(p) === u }]),
|
|
263
263
|
onClick: (d) => z(d, u)
|
|
264
264
|
}, [
|
|
265
|
-
|
|
265
|
+
T(n(fe))
|
|
266
266
|
], 10, Oe)
|
|
267
267
|
])
|
|
268
268
|
], 10, $e))), 128))
|
|
269
269
|
])
|
|
270
270
|
]))), 128)),
|
|
271
|
-
j(
|
|
271
|
+
j(T(Ie, {
|
|
272
272
|
trigger: _.value,
|
|
273
273
|
"onUpdate:trigger": e[7] || (e[7] = (f) => _.value = f),
|
|
274
274
|
data: a.value,
|