@opentiny/tiny-robot 0.4.0 → 0.4.1-alpha.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/README.md +192 -1
- package/README.zh-CN.md +192 -0
- package/dist/action-group/index.js +3 -3
- package/dist/anchor/index.js +856 -0
- package/dist/attachments/index.js +326 -269
- package/dist/container/index.js +13 -13
- package/dist/drag-overlay/index.js +1 -1
- package/dist/dropdown-menu/index.js +18 -18
- package/dist/feedback/index.js +2 -2
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/index.d.ts +470 -203
- package/dist/index.js +121 -117
- package/dist/index2.js +152 -126
- package/dist/index3.js +1 -1
- package/dist/index4.js +91 -85
- package/dist/index5.js +81 -81
- package/dist/index6.js +453 -414
- package/dist/index7.js +30 -30
- package/dist/index8.js +8 -8
- package/dist/mcp-server-picker/index.js +178 -177
- package/dist/sender/index.js +1579 -1448
- package/dist/sender-actions/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +13 -13
- package/dist/suggestion-popover/index.js +122 -125
- package/dist/useSlotRefs.js +1 -1
- package/dist/utils.js +1 -1
- package/dist/welcome/index.js +9 -9
- package/package.json +52 -15
- package/dist/no-data.js +0 -4
package/dist/container/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as g, useModel as c, computed as w, withDirectives as C, openBlock as B, createElementBlock as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as g, useModel as c, computed as w, withDirectives as C, openBlock as B, createElementBlock as y, normalizeClass as I, createElementVNode as e, renderSlot as l, toDisplayString as z, createVNode as u, unref as i, vShow as E, mergeModels as d } from "vue";
|
|
2
|
+
import { IconExitFullScreen as S, IconEnterFullScreen as $, IconClose as k } from "@opentiny/tiny-robot-svgs";
|
|
3
3
|
import f from "../icon-button/index.js";
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
4
|
+
import { _ as M } from "../_plugin-vue_export-helper.js";
|
|
5
|
+
const T = { class: "tr-container__header" }, b = { class: "tr-container__title" }, N = { class: "tr-container__header-operations" }, D = { class: "tr-container__footer" }, F = /* @__PURE__ */ g({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: /* @__PURE__ */ d({
|
|
8
8
|
show: { type: Boolean },
|
|
@@ -16,18 +16,18 @@ const E = { class: "tr-container__header" }, F = { class: "tr-container__title"
|
|
|
16
16
|
}),
|
|
17
17
|
emits: /* @__PURE__ */ d(["close"], ["update:show", "update:fullscreen"]),
|
|
18
18
|
setup(o, { emit: p }) {
|
|
19
|
-
const m = o, a = c(o, "show"), t = c(o, "fullscreen"), v = w(() => t.value ?
|
|
19
|
+
const m = o, a = c(o, "show"), t = c(o, "fullscreen"), v = w(() => t.value ? S : $), _ = p, h = () => {
|
|
20
20
|
a.value = !1, _("close");
|
|
21
21
|
};
|
|
22
|
-
return (n, s) => C((B(),
|
|
23
|
-
class:
|
|
22
|
+
return (n, s) => C((B(), y("div", {
|
|
23
|
+
class: I(["tr-container", { fullscreen: t.value }])
|
|
24
24
|
}, [
|
|
25
25
|
s[1] || (s[1] = e("div", { class: "tr-container__dragging-bar-wrapper" }, [
|
|
26
26
|
e("div", { class: "tr-container__dragging-bar" })
|
|
27
27
|
], -1)),
|
|
28
|
-
e("div",
|
|
28
|
+
e("div", T, [
|
|
29
29
|
l(n.$slots, "title", {}, () => [
|
|
30
|
-
e("h3",
|
|
30
|
+
e("h3", b, z(m.title), 1)
|
|
31
31
|
], !0),
|
|
32
32
|
e("div", N, [
|
|
33
33
|
l(n.$slots, "operations", {}, void 0, !0),
|
|
@@ -40,20 +40,20 @@ const E = { class: "tr-container__header" }, F = { class: "tr-container__title"
|
|
|
40
40
|
u(i(f), {
|
|
41
41
|
size: "28",
|
|
42
42
|
"svg-size": "20",
|
|
43
|
-
icon: i(
|
|
43
|
+
icon: i(k),
|
|
44
44
|
onClick: h
|
|
45
45
|
}, null, 8, ["icon"])
|
|
46
46
|
])
|
|
47
47
|
]),
|
|
48
48
|
l(n.$slots, "default", {}, void 0, !0),
|
|
49
|
-
e("div",
|
|
49
|
+
e("div", D, [
|
|
50
50
|
l(n.$slots, "footer", {}, void 0, !0)
|
|
51
51
|
])
|
|
52
52
|
], 2)), [
|
|
53
|
-
[
|
|
53
|
+
[E, a.value]
|
|
54
54
|
]);
|
|
55
55
|
}
|
|
56
|
-
}), r = /* @__PURE__ */
|
|
56
|
+
}), r = /* @__PURE__ */ M(F, [["__scopeId", "data-v-8bd84c90"]]);
|
|
57
57
|
r.name = "TrContainer";
|
|
58
58
|
const V = function(o) {
|
|
59
59
|
o.component(r.name, r);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as v, computed as y, openBlock as t, createBlock as u, Transition as F, withCtx as m, createElementBlock as a, normalizeStyle as h, normalizeClass as x, renderSlot as _, createElementVNode as l, toDisplayString as n, Fragment as w, renderList as D, createCommentVNode as B } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { b as M } from "../index4.js";
|
|
3
3
|
import { _ as Z } from "../_plugin-vue_export-helper.js";
|
|
4
4
|
const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs/%3e%3crect%20width='80.000000'%20height='80.000000'%20fill='%23FFFFFF'%20fill-opacity='0'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014ZM10%2015L70%2015C71%2015%2071.75%2015.25%2072.25%2015.75C72.75%2016.25%2073%2017%2073%2018L73%2063C73%2064%2072.75%2064.75%2072.25%2065.25C71.75%2065.75%2071%2066%2070%2066L10%2066C9%2066%208.25%2065.75%207.75%2065.25C7.25%2064.75%207%2064%207%2063L7%2018C7%2017%207.25%2016.25%207.75%2015.75C8.25%2015.25%209%2015%2010%2015Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M6%2047.27L24.56%2029.06C25.73%2027.91%2027.6%2027.91%2028.77%2029.06L44.52%2044.51C45.69%2045.66%2047.56%2045.66%2048.72%2044.51L56.64%2036.75C57.8%2035.6%2059.67%2035.6%2060.84%2036.75L74%2049.67L74%2062C74%2064.76%2071.76%2067%2069%2067L11%2067C8.23%2067%206%2064.76%206%2062L6%2047.27Z'%20fill='%23F0F0F0'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d=''%20fill='%23808080'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cellipse%20cx='40.000000'%20cy='40.000000'%20rx='8.000001'%20ry='8.000002'%20fill='%231476FF'%20fill-opacity='1.000000'/%3e%3cpath%20d='M40%2035.5C40.27%2035.5%2040.5%2035.72%2040.5%2036L40.5%2039.49L44%2039.5C44.27%2039.5%2044.5%2039.72%2044.5%2040C44.5%2040.27%2044.27%2040.5%2044%2040.5L40.5%2040.5L40.5%2044C40.5%2044.27%2040.27%2044.5%2040%2044.5C39.72%2044.5%2039.5%2044.27%2039.5%2044L39.5%2040.5L36%2040.5C35.72%2040.5%2035.5%2040.27%2035.5%2040C35.5%2039.72%2035.72%2039.5%2036%2039.5L39.5%2039.5L39.5%2036C39.5%2035.72%2039.72%2035.5%2040%2035.5Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014Z'%20fill='%23FFFFFF'%20fill-opacity='0'%20fill-rule='evenodd'/%3e%3cpath%20d='M10%2014L70%2014C72.2%2014%2074%2015.79%2074%2018L74%2063C74%2065.2%2072.2%2067%2070%2067L10%2067C7.79%2067%206%2065.2%206%2063L6%2018C6%2015.79%207.79%2014%2010%2014ZM10%2015L70%2015C71%2015%2071.75%2015.25%2072.25%2015.75C72.75%2016.25%2073%2017%2073%2018L73%2063C73%2064%2072.75%2064.75%2072.25%2065.25C71.75%2065.75%2071%2066%2070%2066L10%2066C9%2066%208.25%2065.75%207.75%2065.25C7.25%2064.75%207%2064%207%2063L7%2018C7%2017%207.25%2016.25%207.75%2015.75C8.25%2015.25%209%2015%2010%2015Z'%20fill='%23808080'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3ccircle%20cx='58.000000'%20cy='27.000000'%20r='5.000000'%20fill='%23DBDBDB'%20fill-opacity='1.000000'/%3e%3c/svg%3e", T = { class: "tr-drag-overlay__content" }, $ = { class: "tr-drag-overlay__text" }, S = { class: "tr-drag-overlay__title" }, E = { class: "tr-drag-overlay__description" }, z = /* @__PURE__ */ v({
|
|
5
5
|
__name: "index",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ref as k, onUnmounted as T, watch as C, defineComponent as E, useModel as H, computed as p, openBlock as w, createBlock as I, unref as X, withCtx as y, createElementVNode as j, createElementBlock as _, Fragment as D, renderList as L, toDisplayString as Y, renderSlot as O, mergeModels as M } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { m as S, u as b, o as $ } from "../index4.js";
|
|
3
3
|
import { B as A } from "../index8.js";
|
|
4
4
|
import { u as F } from "../utils.js";
|
|
5
5
|
import { _ as G } from "../_plugin-vue_export-helper.js";
|
|
6
6
|
const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.bottom, N = (o, t, g = !1) => {
|
|
7
7
|
if (t.length < 3) return !1;
|
|
8
|
-
const l = o.x,
|
|
9
|
-
let
|
|
8
|
+
const l = o.x, f = o.y;
|
|
9
|
+
let d = !1;
|
|
10
10
|
const r = (s, c, a, n, i, e) => {
|
|
11
11
|
const m = (i - a) * (c - n) - (e - n) * (s - a);
|
|
12
12
|
if (Math.abs(m) > 1e-10) return !1;
|
|
@@ -15,14 +15,14 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
15
15
|
};
|
|
16
16
|
for (let s = 0, c = t.length - 1; s < t.length; c = s++) {
|
|
17
17
|
const a = t[s].x, n = t[s].y, i = t[c].x, e = t[c].y;
|
|
18
|
-
if (g && r(l,
|
|
18
|
+
if (g && r(l, f, a, n, i, e))
|
|
19
19
|
return !0;
|
|
20
|
-
if (n >
|
|
21
|
-
const u = (i - a) * (
|
|
22
|
-
l < u && (
|
|
20
|
+
if (n > f && e <= f || e > f && n <= f) {
|
|
21
|
+
const u = (i - a) * (f - n) / (e - n) + a;
|
|
22
|
+
l < u && (d = !d);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return d;
|
|
26
26
|
}, U = (o, t) => t.bottom < o.top ? [
|
|
27
27
|
{ x: o.left, y: o.top },
|
|
28
28
|
{ x: o.right, y: o.top },
|
|
@@ -34,7 +34,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
34
34
|
{ x: t.right, y: t.top },
|
|
35
35
|
{ x: t.left, y: t.top }
|
|
36
36
|
] : [], { x: V, y: q } = F(), z = (o, t, g) => {
|
|
37
|
-
const { delayEnter: l = 0, delayLeave:
|
|
37
|
+
const { delayEnter: l = 0, delayLeave: f = 0 } = g || {}, d = k(!1), r = k("outside");
|
|
38
38
|
let s = null;
|
|
39
39
|
const c = () => {
|
|
40
40
|
s && (clearTimeout(s), s = null);
|
|
@@ -43,8 +43,8 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
43
43
|
c();
|
|
44
44
|
});
|
|
45
45
|
const a = (n) => {
|
|
46
|
-
const i = n ? l :
|
|
47
|
-
c(), i ? s = setTimeout(() =>
|
|
46
|
+
const i = n ? l : f;
|
|
47
|
+
c(), i ? s = setTimeout(() => d.value = n, i) : d.value = n;
|
|
48
48
|
};
|
|
49
49
|
return C(
|
|
50
50
|
r,
|
|
@@ -71,7 +71,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
71
71
|
N({ x: n, y: i }, U(u, h), !0) ? r.value = "polygon" : r.value = "outside";
|
|
72
72
|
},
|
|
73
73
|
{ throttle: 10 }
|
|
74
|
-
),
|
|
74
|
+
), d;
|
|
75
75
|
}, J = { class: "tr-dropdown-menu__list" }, K = ["onClick"], Q = /* @__PURE__ */ E({
|
|
76
76
|
__name: "index",
|
|
77
77
|
props: /* @__PURE__ */ M({
|
|
@@ -85,10 +85,10 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
85
85
|
}),
|
|
86
86
|
emits: /* @__PURE__ */ M(["item-click", "click-outside"], ["update:show"]),
|
|
87
87
|
setup(o, { expose: t, emit: g }) {
|
|
88
|
-
const l = o,
|
|
89
|
-
get: () => l.trigger === "manual" ? l.show :
|
|
88
|
+
const l = o, f = g, d = H(o, "show"), r = p({
|
|
89
|
+
get: () => l.trigger === "manual" ? l.show : d.value,
|
|
90
90
|
set: (e) => {
|
|
91
|
-
l.trigger !== "manual" && (
|
|
91
|
+
l.trigger !== "manual" && (d.value = e);
|
|
92
92
|
}
|
|
93
93
|
}), s = k(null), c = p(() => {
|
|
94
94
|
var e;
|
|
@@ -101,7 +101,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
101
101
|
$(
|
|
102
102
|
a,
|
|
103
103
|
(e) => {
|
|
104
|
-
|
|
104
|
+
f("click-outside", e), r.value = !1;
|
|
105
105
|
},
|
|
106
106
|
{ ignore: [c] }
|
|
107
107
|
);
|
|
@@ -114,7 +114,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
114
114
|
const n = () => {
|
|
115
115
|
l.trigger === "click" && (r.value = !r.value);
|
|
116
116
|
}, i = (e) => {
|
|
117
|
-
r.value = !1,
|
|
117
|
+
r.value = !1, f("item-click", e);
|
|
118
118
|
};
|
|
119
119
|
return t({
|
|
120
120
|
update: () => {
|
|
@@ -148,7 +148,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
|
|
|
148
148
|
_: 3
|
|
149
149
|
}, 8, ["show", "append-to", "trigger-events"]));
|
|
150
150
|
}
|
|
151
|
-
}), v = /* @__PURE__ */ G(Q, [["__scopeId", "data-v-
|
|
151
|
+
}), v = /* @__PURE__ */ G(Q, [["__scopeId", "data-v-6fc07009"]]);
|
|
152
152
|
v.name = "TrDropdownMenu";
|
|
153
153
|
const W = function(o) {
|
|
154
154
|
o.component(v.name, v);
|
package/dist/feedback/index.js
CHANGED
|
@@ -50,7 +50,7 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
50
50
|
])) : k("", !0)
|
|
51
51
|
]));
|
|
52
52
|
}
|
|
53
|
-
}), ee = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-
|
|
53
|
+
}), ee = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-0a3b7acb"]]), te = { class: "tr-feedback" }, oe = { class: "tr-feedback__operations" }, se = { class: "tr-feedback__operations-left" }, ne = { key: 1 }, le = { class: "tr-feedback__operations-right" }, re = {
|
|
54
54
|
key: 0,
|
|
55
55
|
class: "tr-feedback__footer"
|
|
56
56
|
}, ae = { key: 0 }, ie = /* @__PURE__ */ V({
|
|
@@ -181,7 +181,7 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
181
181
|
]);
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
}), C = /* @__PURE__ */ X(ie, [["__scopeId", "data-v-
|
|
184
|
+
}), C = /* @__PURE__ */ X(ie, [["__scopeId", "data-v-80a60d78"]]);
|
|
185
185
|
C.name = "TrFeedback";
|
|
186
186
|
const ce = function(h) {
|
|
187
187
|
h.component(C.name, C);
|
|
@@ -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-66224781"]]);
|
|
119
119
|
p.name = "TrFlowLayout";
|
|
120
120
|
const te = function(d) {
|
|
121
121
|
d.component(p.name, p);
|