@opentiny/tiny-robot 0.3.0-alpha.3 → 0.3.0-alpha.4
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 +44 -41
- package/dist/base-popper/index.js +4 -0
- package/dist/bubble/index.js +1207 -1992
- package/dist/close.js +1 -1
- package/dist/container/index.js +12 -12
- package/dist/dropdown-menu/index.js +79 -64
- package/dist/feedback/index.js +43 -43
- package/dist/flow-layout-buttons/index.js +29 -26
- package/dist/history/index.js +25 -25
- package/dist/icon-button/index.js +18 -19
- package/dist/index.d.ts +562 -1945
- package/dist/index.js +43 -58
- package/dist/index2.js +359 -290
- package/dist/index3.js +137 -298
- package/dist/index4.js +269 -591
- package/dist/index5.js +528 -2048
- package/dist/index6.js +2069 -4665
- package/dist/index7.js +4749 -0
- package/dist/question/index.js +59 -59
- package/dist/sender/index.js +994 -1184
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +70 -70
- package/dist/suggestion-pills/index.js +125 -158
- package/dist/suggestion-popover/index.js +246 -219
- package/dist/tiny-robot-svgs.js +174 -227
- package/dist/useSlotRefs.js +36 -0
- package/dist/utils.js +4 -15
- package/package.json +3 -4
- package/dist/loading.js +0 -4
package/dist/history/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as V, createElementBlock as u, openBlock as n, normalizeStyle as X, normalizeClass as D, createElementVNode as p, toDisplayString as k, createVNode as m, unref as e, ref as G, watchEffect as Y, nextTick as Z, mergeModels as N, useCssVars as q, computed as h, useModel as P, createCommentVNode as E, Fragment as T, renderList as $, createBlock as R, withDirectives as ee, mergeProps as te, withCtx as
|
|
2
|
-
import {
|
|
3
|
-
import { I as le } from "../
|
|
4
|
-
import { T as
|
|
1
|
+
import { defineComponent as V, createElementBlock as u, openBlock as n, normalizeStyle as X, normalizeClass as D, createElementVNode as p, toDisplayString as k, createVNode as m, unref as e, ref as G, watchEffect as Y, nextTick as Z, mergeModels as N, useCssVars as q, computed as h, useModel as P, createCommentVNode as E, Fragment as T, renderList as $, createBlock as R, withDirectives as ee, mergeProps as te, withCtx as z, withModifiers as H, vModelText as re } from "vue";
|
|
2
|
+
import { f as oe, z as se, r as ae, n as ne, t as ie } from "../tiny-robot-svgs.js";
|
|
3
|
+
import { I as le } from "../index6.js";
|
|
4
|
+
import { T as S } from "../index5.js";
|
|
5
5
|
import B from "../icon-button/index.js";
|
|
6
6
|
import { o as ce } from "../index2.js";
|
|
7
|
-
import { _ as
|
|
7
|
+
import { _ as M } from "../_plugin-vue_export-helper.js";
|
|
8
8
|
const ue = /* @__PURE__ */ V({
|
|
9
9
|
__name: "item-tag",
|
|
10
10
|
props: {
|
|
@@ -21,7 +21,7 @@ const ue = /* @__PURE__ */ V({
|
|
|
21
21
|
p("span", null, k(t.text), 1)
|
|
22
22
|
], 6));
|
|
23
23
|
}
|
|
24
|
-
}), de = /* @__PURE__ */
|
|
24
|
+
}), de = /* @__PURE__ */ M(ue, [["__scopeId", "data-v-346767bb"]]), _e = { class: "tr-history__empty" }, pe = { class: "tr-history__empty-icon" }, he = { class: "tr-history__empty-text" }, me = /* @__PURE__ */ V({
|
|
25
25
|
__name: "search-empty",
|
|
26
26
|
props: {
|
|
27
27
|
text: { default: "暂无内容" }
|
|
@@ -35,7 +35,7 @@ const ue = /* @__PURE__ */ V({
|
|
|
35
35
|
p("span", he, k(t.text), 1)
|
|
36
36
|
]));
|
|
37
37
|
}
|
|
38
|
-
}), fe = /* @__PURE__ */
|
|
38
|
+
}), fe = /* @__PURE__ */ M(me, [["__scopeId", "data-v-b21f5bc0"]]), ve = (i) => {
|
|
39
39
|
const t = G(), a = (l) => {
|
|
40
40
|
t.value = {
|
|
41
41
|
id: l.id,
|
|
@@ -106,20 +106,20 @@ const ue = /* @__PURE__ */ V({
|
|
|
106
106
|
var s;
|
|
107
107
|
const o = typeof ((s = c[0]) == null ? void 0 : s.group);
|
|
108
108
|
return o === "string" || o === "symbol";
|
|
109
|
-
}, I = h(() => Array.isArray(a.data) ? a.data || [] : a.data[g.value] || []), w = Symbol("NO_GROUP"),
|
|
109
|
+
}, I = h(() => Array.isArray(a.data) ? a.data || [] : a.data[g.value] || []), w = Symbol("NO_GROUP"), O = h(() => {
|
|
110
110
|
const c = I.value;
|
|
111
111
|
return l(c) ? c : [{ group: w, items: c }];
|
|
112
|
-
}), x = h(() => a.searchBar ?
|
|
112
|
+
}), x = h(() => a.searchBar ? O.value.map((o) => ({
|
|
113
113
|
...o,
|
|
114
114
|
items: o.items.filter((s) => a.searchFn(f.value || "", s))
|
|
115
|
-
})).filter((o) => o.items.length > 0) :
|
|
115
|
+
})).filter((o) => o.items.length > 0) : O.value), K = h(() => x.value.length === 0 ? !1 : x.value[0].group === w ? x.value[0].items.length > 0 : !0), L = (c) => {
|
|
116
116
|
var o;
|
|
117
117
|
c.id !== ((o = C.value) == null ? void 0 : o.id) && r("item-click", c);
|
|
118
118
|
}, W = () => {
|
|
119
119
|
r("close");
|
|
120
120
|
}, F = (c) => {
|
|
121
121
|
r("item-delete", c);
|
|
122
|
-
}, { editingItem: C, handleEdit: j, handleEditorInputRef: J, handleKeyDown:
|
|
122
|
+
}, { editingItem: C, handleEdit: j, handleEditorInputRef: J, handleKeyDown: Q } = ve(r);
|
|
123
123
|
return (c, o) => (n(), u("div", ye, [
|
|
124
124
|
p("div", ke, [
|
|
125
125
|
(n(!0), u(T, null, $(v.value, (s) => (n(), u("div", {
|
|
@@ -138,7 +138,7 @@ const ue = /* @__PURE__ */ V({
|
|
|
138
138
|
}, null, 8, ["modelValue", "placeholder", "prefix-icon"])
|
|
139
139
|
])) : E("", !0),
|
|
140
140
|
p("div", xe, [
|
|
141
|
-
|
|
141
|
+
K.value ? (n(!0), u(T, { key: 0 }, $(x.value, (s) => (n(), u("div", {
|
|
142
142
|
key: s.group,
|
|
143
143
|
class: "tr-history__group"
|
|
144
144
|
}, [
|
|
@@ -146,43 +146,43 @@ const ue = /* @__PURE__ */ V({
|
|
|
146
146
|
p("span", null, k(s.group), 1)
|
|
147
147
|
])) : E("", !0),
|
|
148
148
|
(n(!0), u(T, null, $(s.items, (d) => {
|
|
149
|
-
var
|
|
149
|
+
var A;
|
|
150
150
|
return n(), u("div", {
|
|
151
151
|
key: `${d.id}-${d.title}`,
|
|
152
152
|
class: D(["tr-history__item", { selected: a.selected === d.id }]),
|
|
153
|
-
onClick: (y) =>
|
|
153
|
+
onClick: (y) => L(d)
|
|
154
154
|
}, [
|
|
155
|
-
((
|
|
155
|
+
((A = e(C)) == null ? void 0 : A.id) !== d.id ? (n(), u(T, { key: 0 }, [
|
|
156
156
|
p("span", Ie, k(d.title), 1),
|
|
157
157
|
d.tag ? (n(), R(e(de), te({
|
|
158
158
|
key: 0,
|
|
159
159
|
class: "tr-history__item-tag"
|
|
160
160
|
}, { ref_for: !0 }, d.tag), null, 16)) : E("", !0),
|
|
161
161
|
p("div", we, [
|
|
162
|
-
m(e(
|
|
162
|
+
m(e(S), {
|
|
163
163
|
content: "编辑",
|
|
164
164
|
effect: "dark",
|
|
165
165
|
placement: "top",
|
|
166
166
|
"open-delay": 500
|
|
167
167
|
}, {
|
|
168
|
-
default:
|
|
168
|
+
default: z(() => [
|
|
169
169
|
m(e(B), {
|
|
170
170
|
icon: e(ae),
|
|
171
|
-
onClick:
|
|
171
|
+
onClick: H((y) => e(j)(d), ["stop"])
|
|
172
172
|
}, null, 8, ["icon", "onClick"])
|
|
173
173
|
]),
|
|
174
174
|
_: 2
|
|
175
175
|
}, 1024),
|
|
176
|
-
m(e(
|
|
176
|
+
m(e(S), {
|
|
177
177
|
content: "删除",
|
|
178
178
|
effect: "dark",
|
|
179
179
|
placement: "top",
|
|
180
180
|
"open-delay": 500
|
|
181
181
|
}, {
|
|
182
|
-
default:
|
|
182
|
+
default: z(() => [
|
|
183
183
|
m(e(B), {
|
|
184
184
|
icon: e(ne),
|
|
185
|
-
onClick:
|
|
185
|
+
onClick: H((y) => F(d), ["stop"])
|
|
186
186
|
}, null, 8, ["icon", "onClick"])
|
|
187
187
|
]),
|
|
188
188
|
_: 2
|
|
@@ -195,7 +195,7 @@ const ue = /* @__PURE__ */ V({
|
|
|
195
195
|
ref_for: !0,
|
|
196
196
|
ref: e(J),
|
|
197
197
|
onKeydown: o[2] || (o[2] = //@ts-ignore
|
|
198
|
-
(...y) => e(
|
|
198
|
+
(...y) => e(Q) && e(Q)(...y))
|
|
199
199
|
}, null, 544)), [
|
|
200
200
|
[re, e(C).title]
|
|
201
201
|
])
|
|
@@ -215,10 +215,10 @@ const ue = /* @__PURE__ */ V({
|
|
|
215
215
|
])
|
|
216
216
|
]));
|
|
217
217
|
}
|
|
218
|
-
}),
|
|
219
|
-
i.component("TrHistory",
|
|
218
|
+
}), U = /* @__PURE__ */ M($e, [["__scopeId", "data-v-8aa5fd59"]]), Be = function(i) {
|
|
219
|
+
i.component("TrHistory", U);
|
|
220
220
|
}, Ne = {
|
|
221
|
-
...
|
|
221
|
+
...U,
|
|
222
222
|
install: Be,
|
|
223
223
|
name: "TrHistory"
|
|
224
224
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { t as
|
|
1
|
+
import { defineComponent as r, computed as a, createElementBlock as u, openBlock as l, normalizeStyle as c, normalizeClass as p, createBlock as m, resolveDynamicComponent as d } from "vue";
|
|
2
|
+
import { t as i } from "../utils.js";
|
|
3
3
|
import { _ as f } from "../_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ r({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
7
|
icon: {},
|
|
@@ -9,24 +9,23 @@ const v = /* @__PURE__ */ p({
|
|
|
9
9
|
svgSize: { default: "16px" },
|
|
10
10
|
rounded: { type: Boolean }
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const o = t, a = n(() => c(o.size)), r = n(() => c(o.svgSize));
|
|
18
|
-
return (i, z) => (s(), u("button", {
|
|
19
|
-
class: m(["tr-icon-button", { rounded: o.rounded }])
|
|
12
|
+
setup(o) {
|
|
13
|
+
const e = o, s = a(() => i(e.size)), n = a(() => i(e.svgSize));
|
|
14
|
+
return (z, h) => (l(), u("button", {
|
|
15
|
+
class: p(["tr-icon-button", { rounded: e.rounded }]),
|
|
16
|
+
style: c({ width: s.value, height: s.value })
|
|
20
17
|
}, [
|
|
21
|
-
(
|
|
22
|
-
|
|
18
|
+
(l(), m(d(e.icon), {
|
|
19
|
+
style: c({ width: n.value, height: n.value, fontSize: n.value })
|
|
20
|
+
}, null, 8, ["style"]))
|
|
21
|
+
], 6));
|
|
23
22
|
}
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
23
|
+
}), t = /* @__PURE__ */ f(_, [["__scopeId", "data-v-159698f7"]]);
|
|
24
|
+
t.name = "TrIconButton";
|
|
25
|
+
const v = function(o) {
|
|
26
|
+
o.component(t.name, t);
|
|
28
27
|
};
|
|
29
|
-
|
|
28
|
+
t.install = v;
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
t as default
|
|
32
31
|
};
|