@opentiny/tiny-robot 0.3.1-alpha.8 → 0.3.1-alpha.9
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/base-popper/index.js +1 -1
- package/dist/bubble/index.js +4017 -11
- package/dist/chat-input/index.js +3154 -0
- package/dist/dropdown-menu/index.js +1 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +684 -968
- package/dist/index.js +104 -108
- package/dist/index2.js +90 -90
- package/dist/index3.js +150 -155
- package/dist/index4.js +295 -319
- package/dist/index5.js +279 -507
- package/dist/index6.js +146 -286
- package/dist/loading.js +4 -0
- package/dist/mcp-server-picker/index.js +57 -58
- package/dist/sender/index.js +6 -3261
- package/dist/sender-compat/index.js +109 -105
- package/dist/style.css +1 -1
- package/dist/suggestion-popover/index.js +185 -184
- package/package.json +17 -17
- package/dist/index7.js +0 -161
- /package/dist/{sender-actions → chat-input-actions}/index.js +0 -0
package/dist/index.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import F from "./attachments/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import { Bubble as B, BubbleList as x, BubbleProvider as z } from "./bubble/index.js";
|
|
3
|
+
import { BubbleContentClassRenderer as ze, BubbleMarkdownContentRenderer as Ce } from "./bubble/index.js";
|
|
4
|
+
import C from "./container/index.js";
|
|
5
|
+
import E from "./conversations/index.js";
|
|
6
|
+
import b from "./drag-overlay/index.js";
|
|
7
7
|
import P from "./dropdown-menu/index.js";
|
|
8
|
-
import
|
|
9
|
-
import { H as
|
|
10
|
-
import { u as
|
|
8
|
+
import L from "./feedback/index.js";
|
|
9
|
+
import { H as A } from "./index5.js";
|
|
10
|
+
import { u as be } from "./index5.js";
|
|
11
11
|
import y from "./icon-button/index.js";
|
|
12
|
-
import { Prompt as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
12
|
+
import { Prompt as H, Prompts as O } from "./prompts/index.js";
|
|
13
|
+
import W from "./sender/index.js";
|
|
14
|
+
import j from "./sender-compat/index.js";
|
|
15
|
+
import M, { SuggestionPillButton as w } from "./suggestion-pills/index.js";
|
|
16
|
+
import R from "./suggestion-popover/index.js";
|
|
17
17
|
import $ from "./theme-provider/index.js";
|
|
18
|
-
import { useTheme as
|
|
18
|
+
import { useTheme as Le } from "./theme-provider/index.js";
|
|
19
19
|
import k from "./welcome/index.js";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { A as
|
|
23
|
-
import {
|
|
24
|
-
import { _ as
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
import V from "./mcp-server-picker/index.js";
|
|
21
|
+
import I from "./mcp-add-form/index.js";
|
|
22
|
+
import { A as N, S as U, _ as q, W as G, D as J } from "./index2.js";
|
|
23
|
+
import { u as ye } from "./index2.js";
|
|
24
|
+
import { _ as K, V as Q } from "./index3.js";
|
|
25
|
+
import { W as Oe, u as We } from "./index3.js";
|
|
26
|
+
var d = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(d || {});
|
|
27
|
+
function X(e, r) {
|
|
27
28
|
if (!r) return !0;
|
|
28
29
|
const o = r.split(",").map((t) => t.trim());
|
|
29
30
|
return o.includes("*") ? !0 : o.some((t) => {
|
|
@@ -36,45 +37,45 @@ function J(e, r) {
|
|
|
36
37
|
return e.type === t;
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function _(e, r) {
|
|
40
41
|
return e.size <= r;
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function Y(e, r) {
|
|
43
44
|
return e.length <= r;
|
|
44
45
|
}
|
|
45
46
|
function Z(e, r) {
|
|
46
47
|
const { accept: o, multiple: t, maxSize: a, maxFiles: l } = r, n = [], s = [];
|
|
47
|
-
if (!
|
|
48
|
+
if (!Y(e, l))
|
|
48
49
|
return {
|
|
49
50
|
acceptedFiles: n,
|
|
50
51
|
rejectedFiles: Array.from(e),
|
|
51
52
|
rejectionReason: {
|
|
52
|
-
code:
|
|
53
|
+
code: d.FileCountExceeded,
|
|
53
54
|
message: `文件数量不能超过 ${l} 个`
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
if (e.forEach((i) => {
|
|
57
|
-
|
|
58
|
+
X(i, o) && _(i, a) ? n.push(i) : s.push(i);
|
|
58
59
|
}), !t && n.length > 1)
|
|
59
60
|
return {
|
|
60
61
|
acceptedFiles: [],
|
|
61
62
|
rejectedFiles: n,
|
|
62
63
|
rejectionReason: {
|
|
63
|
-
code:
|
|
64
|
+
code: d.FileCountExceeded,
|
|
64
65
|
message: "只允许上传一个文件"
|
|
65
66
|
}
|
|
66
67
|
};
|
|
67
68
|
if (s.length > 0) {
|
|
68
|
-
const i = s.some((p) => !
|
|
69
|
+
const i = s.some((p) => !_(p, a)), u = i ? d.FileSizeExceeded : d.FileTypeNotAllowed, m = i ? `文件大小不能超过 ${a / 1024 / 1024}MB` : `文件类型不匹配 (accept: ${o})`;
|
|
69
70
|
return {
|
|
70
71
|
acceptedFiles: n,
|
|
71
72
|
rejectedFiles: s,
|
|
72
|
-
rejectionReason: { code:
|
|
73
|
+
rejectionReason: { code: u, message: m }
|
|
73
74
|
};
|
|
74
75
|
}
|
|
75
76
|
return { acceptedFiles: n, rejectedFiles: s, rejectionReason: null };
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
+
function D(e) {
|
|
78
79
|
return {
|
|
79
80
|
accept: e.accept || "*",
|
|
80
81
|
multiple: e.multiple ?? !0,
|
|
@@ -85,7 +86,7 @@ function T(e) {
|
|
|
85
86
|
disabled: e.disabled || !1
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
|
-
const
|
|
89
|
+
const Se = {
|
|
89
90
|
/**
|
|
90
91
|
* 挂载指令
|
|
91
92
|
* @param el 元素
|
|
@@ -94,7 +95,7 @@ const Be = {
|
|
|
94
95
|
mounted(e, r) {
|
|
95
96
|
let o = 0;
|
|
96
97
|
const { disabled: t, onDraggingChange: a } = r.value;
|
|
97
|
-
e.__vDropzoneOptions__ =
|
|
98
|
+
e.__vDropzoneOptions__ = D(r.value);
|
|
98
99
|
const l = {
|
|
99
100
|
/**
|
|
100
101
|
* 拖拽进入
|
|
@@ -123,22 +124,22 @@ const Be = {
|
|
|
123
124
|
var c;
|
|
124
125
|
if (t) return;
|
|
125
126
|
n.preventDefault(), o = 0, a(!1, null);
|
|
126
|
-
const s = (c = n.dataTransfer) == null ? void 0 : c.files, { onDrop: i, onError:
|
|
127
|
+
const s = (c = n.dataTransfer) == null ? void 0 : c.files, { onDrop: i, onError: u, accept: m, multiple: p, maxSize: T, maxFiles: g } = e.__vDropzoneOptions__;
|
|
127
128
|
if (s && s.length > 0) {
|
|
128
|
-
const h = Array.from(s), { acceptedFiles: f, rejectedFiles:
|
|
129
|
+
const h = Array.from(s), { acceptedFiles: f, rejectedFiles: S, rejectionReason: v } = Z(h, {
|
|
129
130
|
accept: m,
|
|
130
131
|
multiple: p,
|
|
131
|
-
maxSize:
|
|
132
|
+
maxSize: T,
|
|
132
133
|
maxFiles: g
|
|
133
134
|
});
|
|
134
|
-
|
|
135
|
+
v && u({ files: S, ...v }), f.length > 0 && i(f);
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
};
|
|
138
139
|
e.__vDropzoneHandlers__ = l, e.addEventListener("dragenter", l.handleDragEnter), e.addEventListener("dragover", l.handleDragOver), e.addEventListener("dragleave", l.handleDragLeave), e.addEventListener("drop", l.handleDrop);
|
|
139
140
|
},
|
|
140
141
|
updated(e, r) {
|
|
141
|
-
e.__vDropzoneOptions__ && (e.__vDropzoneOptions__ =
|
|
142
|
+
e.__vDropzoneOptions__ && (e.__vDropzoneOptions__ = D(r.value));
|
|
142
143
|
},
|
|
143
144
|
/**
|
|
144
145
|
* 卸载指令
|
|
@@ -149,34 +150,34 @@ const Be = {
|
|
|
149
150
|
}
|
|
150
151
|
}, ee = [
|
|
151
152
|
F,
|
|
152
|
-
|
|
153
|
-
b,
|
|
153
|
+
B,
|
|
154
154
|
x,
|
|
155
|
-
E,
|
|
156
155
|
z,
|
|
157
156
|
C,
|
|
157
|
+
E,
|
|
158
|
+
b,
|
|
158
159
|
P,
|
|
159
|
-
A,
|
|
160
160
|
L,
|
|
161
|
+
A,
|
|
161
162
|
y,
|
|
162
|
-
O,
|
|
163
|
-
M,
|
|
164
163
|
H,
|
|
165
|
-
|
|
166
|
-
j,
|
|
164
|
+
O,
|
|
167
165
|
W,
|
|
166
|
+
j,
|
|
167
|
+
M,
|
|
168
168
|
w,
|
|
169
|
+
R,
|
|
169
170
|
$,
|
|
170
171
|
k,
|
|
171
|
-
N,
|
|
172
172
|
V,
|
|
173
173
|
I,
|
|
174
|
+
N,
|
|
174
175
|
U,
|
|
175
|
-
K,
|
|
176
176
|
q,
|
|
177
|
+
K,
|
|
178
|
+
Q,
|
|
177
179
|
G,
|
|
178
|
-
|
|
179
|
-
Y
|
|
180
|
+
J
|
|
180
181
|
], Fe = {
|
|
181
182
|
install(e) {
|
|
182
183
|
ee.forEach((r) => {
|
|
@@ -186,76 +187,71 @@ const Be = {
|
|
|
186
187
|
}
|
|
187
188
|
};
|
|
188
189
|
export {
|
|
189
|
-
|
|
190
|
+
N as ActionButton,
|
|
190
191
|
F as Attachments,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
x as
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
192
|
+
B as Bubble,
|
|
193
|
+
ze as BubbleContentClassRenderer,
|
|
194
|
+
x as BubbleList,
|
|
195
|
+
Ce as BubbleMarkdownContentRenderer,
|
|
196
|
+
z as BubbleProvider,
|
|
197
|
+
q as ClearButton,
|
|
198
|
+
C as Container,
|
|
199
|
+
E as Conversations,
|
|
200
|
+
J as DefaultActionButtons,
|
|
201
|
+
b as DragOverlay,
|
|
201
202
|
P as DropdownMenu,
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
L as Feedback,
|
|
204
|
+
A as History,
|
|
204
205
|
y as IconButton,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
R as SenderCompat,
|
|
206
|
+
I as McpAddForm,
|
|
207
|
+
V as McpServerPicker,
|
|
208
|
+
H as Prompt,
|
|
209
|
+
O as Prompts,
|
|
210
|
+
W as Sender,
|
|
211
|
+
j as SenderCompat,
|
|
212
212
|
U as SubmitButton,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
w as SuggestionPillButton,
|
|
214
|
+
M as SuggestionPills,
|
|
215
|
+
R as SuggestionPopover,
|
|
216
216
|
$ as ThemeProvider,
|
|
217
|
-
|
|
217
|
+
N as TrActionButton,
|
|
218
218
|
F as TrAttachments,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
219
|
+
B as TrBubble,
|
|
220
|
+
x as TrBubbleList,
|
|
221
|
+
z as TrBubbleProvider,
|
|
222
|
+
q as TrClearButton,
|
|
223
|
+
C as TrContainer,
|
|
224
|
+
E as TrConversations,
|
|
225
|
+
J as TrDefaultActionButtons,
|
|
226
|
+
b as TrDragOverlay,
|
|
227
227
|
P as TrDropdownMenu,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
L as TrFeedback,
|
|
229
|
+
A as TrHistory,
|
|
230
230
|
y as TrIconButton,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
231
|
+
I as TrMcpAddForm,
|
|
232
|
+
V as TrMcpServerPicker,
|
|
233
|
+
H as TrPrompt,
|
|
234
|
+
O as TrPrompts,
|
|
235
|
+
W as TrSender,
|
|
236
|
+
j as TrSenderCompat,
|
|
237
237
|
U as TrSubmitButton,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
w as TrSuggestionPillButton,
|
|
239
|
+
M as TrSuggestionPills,
|
|
240
|
+
R as TrSuggestionPopover,
|
|
241
241
|
$ as TrThemeProvider,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
K as TrUploadButton,
|
|
243
|
+
Q as TrVoiceButton,
|
|
244
244
|
k as TrWelcome,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
G as TrWordCounter,
|
|
246
|
+
K as UploadButton,
|
|
247
|
+
Q as VoiceButton,
|
|
248
|
+
Oe as WebSpeechHandler,
|
|
248
249
|
k as Welcome,
|
|
249
|
-
|
|
250
|
+
G as WordCounter,
|
|
250
251
|
Fe as default,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
ye as useOmitMessageFields,
|
|
257
|
-
we as useSenderContext,
|
|
258
|
-
Re as useTheme,
|
|
259
|
-
Me as useTouchDevice,
|
|
260
|
-
Be as vDropzone
|
|
252
|
+
ye as useSenderContext,
|
|
253
|
+
We as useSpeechHandler,
|
|
254
|
+
Le as useTheme,
|
|
255
|
+
be as useTouchDevice,
|
|
256
|
+
Se as vDropzone
|
|
261
257
|
};
|
package/dist/index2.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { IconSend as
|
|
4
|
-
import { TinyTooltip as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
if (!
|
|
9
|
-
throw new Error("
|
|
10
|
-
return
|
|
1
|
+
import { inject as E, defineComponent as h, computed as p, openBlock as i, createBlock as m, unref as o, withCtx as x, createElementVNode as f, normalizeClass as b, renderSlot as $, resolveDynamicComponent as T, normalizeStyle as B, createElementBlock as d, createVNode as _, toDisplayString as I, createCommentVNode as k, Transition as P } from "vue";
|
|
2
|
+
import { _ as g } from "./_plugin-vue_export-helper.js";
|
|
3
|
+
import { IconSend as A, IconStop as N, IconClear as F } from "@opentiny/tiny-robot-svgs";
|
|
4
|
+
import { TinyTooltip as D } from "@opentiny/vue";
|
|
5
|
+
const L = Symbol("chat-input-context");
|
|
6
|
+
function w() {
|
|
7
|
+
const s = E(L);
|
|
8
|
+
if (!s)
|
|
9
|
+
throw new Error("useChatInputContext must be used within ChatInput component");
|
|
10
|
+
return s;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
if (
|
|
14
|
-
return typeof
|
|
12
|
+
function S(s) {
|
|
13
|
+
if (s)
|
|
14
|
+
return typeof s == "string" ? () => s : s;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const R = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
17
17
|
__name: "index",
|
|
18
18
|
props: {
|
|
19
19
|
icon: {},
|
|
@@ -21,13 +21,13 @@ const L = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
|
21
21
|
active: { type: Boolean, default: !1 },
|
|
22
22
|
tooltip: {},
|
|
23
23
|
tooltipPlacement: { default: "top" },
|
|
24
|
-
size: {}
|
|
24
|
+
size: { default: 32 }
|
|
25
25
|
},
|
|
26
|
-
setup(
|
|
27
|
-
const t =
|
|
28
|
-
return (r, c) => t.tooltip ? (i(),
|
|
26
|
+
setup(s) {
|
|
27
|
+
const t = s, a = p(() => S(t.tooltip)), l = p(() => ({ fontSize: typeof t.size == "number" ? `${t.size}px` : t.size }));
|
|
28
|
+
return (r, c) => t.tooltip ? (i(), m(o(D), {
|
|
29
29
|
key: 0,
|
|
30
|
-
"render-content":
|
|
30
|
+
"render-content": a.value,
|
|
31
31
|
placement: t.tooltipPlacement,
|
|
32
32
|
effect: "light",
|
|
33
33
|
"visible-arrow": !1,
|
|
@@ -35,49 +35,49 @@ const L = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
|
35
35
|
}, {
|
|
36
36
|
default: x(() => [
|
|
37
37
|
f("button", {
|
|
38
|
-
class:
|
|
38
|
+
class: b(["tr-action-button", { active: t.active }]),
|
|
39
39
|
disabled: t.disabled,
|
|
40
40
|
onFocusCapture: c[0] || (c[0] = (u) => u.stopPropagation())
|
|
41
41
|
}, [
|
|
42
|
-
|
|
43
|
-
(i(),
|
|
44
|
-
style:
|
|
42
|
+
$(r.$slots, "icon", {}, () => [
|
|
43
|
+
(i(), m(T(t.icon), {
|
|
44
|
+
style: B(l.value)
|
|
45
45
|
}, null, 8, ["style"]))
|
|
46
46
|
], !0)
|
|
47
|
-
], 42,
|
|
47
|
+
], 42, R)
|
|
48
48
|
]),
|
|
49
49
|
_: 3
|
|
50
|
-
}, 8, ["render-content", "placement"])) : (i(),
|
|
50
|
+
}, 8, ["render-content", "placement"])) : (i(), d("button", {
|
|
51
51
|
key: 1,
|
|
52
|
-
class:
|
|
52
|
+
class: b(["tr-action-button", { active: t.active }]),
|
|
53
53
|
disabled: t.disabled
|
|
54
54
|
}, [
|
|
55
|
-
|
|
56
|
-
(i(),
|
|
57
|
-
style:
|
|
55
|
+
$(r.$slots, "icon", {}, () => [
|
|
56
|
+
(i(), m(T(t.icon), {
|
|
57
|
+
style: B(l.value)
|
|
58
58
|
}, null, 8, ["style"]))
|
|
59
59
|
], !0)
|
|
60
60
|
], 10, V));
|
|
61
61
|
}
|
|
62
|
-
}), O = /* @__PURE__ */
|
|
62
|
+
}), O = /* @__PURE__ */ g(W, [["__scopeId", "data-v-13f08153"]]), j = {
|
|
63
63
|
key: 0,
|
|
64
|
-
class: "tr-
|
|
65
|
-
},
|
|
64
|
+
class: "tr-chat-input-submit-button__cancel-text"
|
|
65
|
+
}, H = /* @__PURE__ */ h({
|
|
66
66
|
__name: "index",
|
|
67
|
-
setup(
|
|
68
|
-
const { canSubmit: t, loading:
|
|
67
|
+
setup(s) {
|
|
68
|
+
const { canSubmit: t, loading: a, defaultActions: l, submit: r, cancel: c, stopText: u } = w(), v = p(() => {
|
|
69
69
|
var e, n;
|
|
70
|
-
return (n = (e = l.value) == null ? void 0 : e.submit) != null && n.disabled ? !0 : !t.value && !
|
|
71
|
-
}), y =
|
|
70
|
+
return (n = (e = l.value) == null ? void 0 : e.submit) != null && n.disabled ? !0 : !t.value && !a.value;
|
|
71
|
+
}), y = p(() => {
|
|
72
72
|
var e, n;
|
|
73
|
-
return
|
|
74
|
-
}), z =
|
|
73
|
+
return S((n = (e = l.value) == null ? void 0 : e.submit) == null ? void 0 : n.tooltip);
|
|
74
|
+
}), z = p(() => {
|
|
75
75
|
var e, n;
|
|
76
76
|
return ((n = (e = l.value) == null ? void 0 : e.submit) == null ? void 0 : n.tooltipPlacement) ?? "top";
|
|
77
77
|
}), C = () => {
|
|
78
|
-
|
|
78
|
+
a.value ? c() : r();
|
|
79
79
|
};
|
|
80
|
-
return (e, n) => y.value && !o(
|
|
80
|
+
return (e, n) => y.value && !o(a) ? (i(), m(o(D), {
|
|
81
81
|
key: 0,
|
|
82
82
|
"render-content": y.value,
|
|
83
83
|
placement: z.value,
|
|
@@ -87,99 +87,99 @@ const L = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
|
87
87
|
}, {
|
|
88
88
|
default: x(() => [
|
|
89
89
|
f("div", {
|
|
90
|
-
class:
|
|
91
|
-
"tr-
|
|
90
|
+
class: b([
|
|
91
|
+
"tr-chat-input-submit-button",
|
|
92
92
|
{
|
|
93
|
-
"is-disabled":
|
|
94
|
-
"is-loading": o(
|
|
93
|
+
"is-disabled": v.value,
|
|
94
|
+
"is-loading": o(a)
|
|
95
95
|
}
|
|
96
96
|
]),
|
|
97
97
|
onClick: C
|
|
98
98
|
}, [
|
|
99
|
-
|
|
99
|
+
_(o(A), { class: "tr-chat-input-submit-button__icon" })
|
|
100
100
|
], 2)
|
|
101
101
|
]),
|
|
102
102
|
_: 1
|
|
103
|
-
}, 8, ["render-content", "placement"])) : (i(),
|
|
103
|
+
}, 8, ["render-content", "placement"])) : (i(), d("div", {
|
|
104
104
|
key: 1,
|
|
105
|
-
class:
|
|
106
|
-
"tr-
|
|
105
|
+
class: b([
|
|
106
|
+
"tr-chat-input-submit-button",
|
|
107
107
|
{
|
|
108
|
-
"is-disabled":
|
|
109
|
-
"is-loading": o(
|
|
108
|
+
"is-disabled": v.value,
|
|
109
|
+
"is-loading": o(a)
|
|
110
110
|
}
|
|
111
111
|
]),
|
|
112
112
|
onClick: C
|
|
113
113
|
}, [
|
|
114
|
-
o(
|
|
114
|
+
o(a) ? (i(), d("div", {
|
|
115
115
|
key: 1,
|
|
116
|
-
class:
|
|
116
|
+
class: b(["tr-chat-input-submit-button__cancel", { "icon-only": !o(u) }])
|
|
117
117
|
}, [
|
|
118
|
-
|
|
119
|
-
o(u) ? (i(),
|
|
120
|
-
], 2)) : (i(),
|
|
118
|
+
_(o(N), { class: "tr-chat-input-submit-button__cancel-icon" }),
|
|
119
|
+
o(u) ? (i(), d("span", j, I(o(u)), 1)) : k("", !0)
|
|
120
|
+
], 2)) : (i(), m(o(A), {
|
|
121
121
|
key: 0,
|
|
122
|
-
class: "tr-
|
|
122
|
+
class: "tr-chat-input-submit-button__icon"
|
|
123
123
|
}))
|
|
124
124
|
], 2));
|
|
125
125
|
}
|
|
126
|
-
}),
|
|
126
|
+
}), K = /* @__PURE__ */ g(H, [["__scopeId", "data-v-f1b6fef8"]]), U = /* @__PURE__ */ h({
|
|
127
127
|
__name: "index",
|
|
128
|
-
setup(
|
|
129
|
-
const { hasContent: t, clearable:
|
|
128
|
+
setup(s) {
|
|
129
|
+
const { hasContent: t, clearable: a, clear: l, loading: r, defaultActions: c } = w(), u = p(() => {
|
|
130
130
|
var e, n;
|
|
131
131
|
return ((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.disabled) !== void 0 ? c.value.clear.disabled : !1;
|
|
132
|
-
}),
|
|
132
|
+
}), v = p(() => {
|
|
133
133
|
var e, n;
|
|
134
|
-
return
|
|
135
|
-
}), y =
|
|
134
|
+
return S((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.tooltip);
|
|
135
|
+
}), y = p(() => {
|
|
136
136
|
var e, n;
|
|
137
137
|
return ((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.tooltipPlacement) ?? "top";
|
|
138
|
-
}), z =
|
|
138
|
+
}), z = p(() => a.value && t.value && !r.value && !u.value), C = () => {
|
|
139
139
|
u.value || l();
|
|
140
140
|
};
|
|
141
|
-
return (e, n) => z.value ? (i(),
|
|
141
|
+
return (e, n) => z.value ? (i(), m(O, {
|
|
142
142
|
key: 0,
|
|
143
143
|
icon: o(F),
|
|
144
144
|
disabled: u.value,
|
|
145
|
-
tooltip:
|
|
145
|
+
tooltip: v.value,
|
|
146
146
|
"tooltip-placement": y.value,
|
|
147
147
|
onClick: C
|
|
148
148
|
}, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) : k("", !0);
|
|
149
149
|
}
|
|
150
|
-
}),
|
|
150
|
+
}), X = {
|
|
151
151
|
key: 0,
|
|
152
|
-
class: "tr-
|
|
153
|
-
},
|
|
152
|
+
class: "tr-chat-input-word-counter"
|
|
153
|
+
}, Y = /* @__PURE__ */ h({
|
|
154
154
|
__name: "index",
|
|
155
|
-
setup(
|
|
156
|
-
const { characterCount: t, maxLength:
|
|
157
|
-
return (u,
|
|
155
|
+
setup(s) {
|
|
156
|
+
const { characterCount: t, maxLength: a, isOverLimit: l, showWordLimit: r } = w(), c = p(() => r.value && a.value !== void 0);
|
|
157
|
+
return (u, v) => c.value ? (i(), d("span", X, [
|
|
158
158
|
f("span", {
|
|
159
|
-
class:
|
|
160
|
-
},
|
|
161
|
-
f("span", null, "/" +
|
|
159
|
+
class: b({ "is-over-limit": o(l) })
|
|
160
|
+
}, I(o(t)), 3),
|
|
161
|
+
f("span", null, "/" + I(o(a)), 1)
|
|
162
162
|
])) : k("", !0);
|
|
163
163
|
}
|
|
164
|
-
}), nt = /* @__PURE__ */
|
|
164
|
+
}), nt = /* @__PURE__ */ g(Y, [["__scopeId", "data-v-e7c0fd64"]]), q = { class: "tr-default-action-buttons" }, G = {
|
|
165
165
|
key: 0,
|
|
166
166
|
class: "tr-action-buttons-group"
|
|
167
|
-
},
|
|
167
|
+
}, J = { class: "tr-submit-wrapper" }, M = /* @__PURE__ */ h({
|
|
168
168
|
__name: "index",
|
|
169
|
-
setup(
|
|
170
|
-
const { hasContent: t, loading:
|
|
171
|
-
return (l, r) => (i(),
|
|
172
|
-
|
|
169
|
+
setup(s) {
|
|
170
|
+
const { hasContent: t, loading: a } = w();
|
|
171
|
+
return (l, r) => (i(), d("div", q, [
|
|
172
|
+
_(P, { name: "tr-slide-right" }, {
|
|
173
173
|
default: x(() => [
|
|
174
|
-
o(t) || o(
|
|
175
|
-
|
|
174
|
+
o(t) || o(a) ? (i(), d("div", G, [
|
|
175
|
+
_(P, { name: "tr-slide-right" }, {
|
|
176
176
|
default: x(() => [
|
|
177
|
-
|
|
177
|
+
_(U)
|
|
178
178
|
]),
|
|
179
179
|
_: 1
|
|
180
180
|
}),
|
|
181
|
-
f("div",
|
|
182
|
-
|
|
181
|
+
f("div", J, [
|
|
182
|
+
_(K)
|
|
183
183
|
])
|
|
184
184
|
])) : k("", !0)
|
|
185
185
|
]),
|
|
@@ -187,13 +187,13 @@ const L = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
|
|
|
187
187
|
})
|
|
188
188
|
]));
|
|
189
189
|
}
|
|
190
|
-
}), ot = /* @__PURE__ */
|
|
190
|
+
}), ot = /* @__PURE__ */ g(M, [["__scopeId", "data-v-e40bfaf6"]]);
|
|
191
191
|
export {
|
|
192
192
|
O as A,
|
|
193
|
+
L as C,
|
|
193
194
|
ot as D,
|
|
194
|
-
|
|
195
|
+
K as S,
|
|
195
196
|
nt as W,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
g as u
|
|
197
|
+
U as _,
|
|
198
|
+
w as u
|
|
199
199
|
};
|