@opentiny/tiny-robot 0.3.0-alpha.11 → 0.3.0-alpha.13
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 +15 -15
- package/dist/attachments/index.js +62 -62
- package/dist/container/index.js +10 -10
- package/dist/dropdown-menu/index.js +116 -49
- package/dist/feedback/index.js +50 -50
- package/dist/flow-layout-buttons/index.js +10 -10
- package/dist/history/index.js +26 -26
- package/dist/index.d.ts +189 -35
- package/dist/index.js +47 -43
- package/dist/index2.js +7 -6
- package/dist/index3.js +426 -418
- package/dist/index4.js +98 -88
- package/dist/index5.js +22 -21
- package/dist/index6.js +795 -599
- package/dist/index7.js +3622 -1717
- package/dist/mcp-server-picker/index.js +29972 -0
- package/dist/question/index.js +12 -12
- package/dist/sender/index.js +212 -212
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +67 -67
- package/dist/suggestion-pills/index.js +11 -11
- package/dist/suggestion-popover/index.js +64 -64
- package/dist/tiny-robot-svgs.js +162 -108
- package/dist/useSlotRefs.js +13 -13
- package/dist/utils.js +8 -2
- package/package.json +10 -3
package/dist/index4.js
CHANGED
|
@@ -1,54 +1,64 @@
|
|
|
1
|
-
import { nextTick as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
7
|
-
setup: (r) => () =>
|
|
8
|
-
props: ["
|
|
1
|
+
import { onMounted as U, nextTick as B, h as C, defineComponent as g, render as R, onBeforeUnmount as D, Teleport as W, computed as h, ref as E, createBlock as F, openBlock as _, Transition as j, normalizeProps as q, guardReactiveProps as L, withCtx as Z, createElementBlock as G, createCommentVNode as J, renderSlot as K, useSlots as Q, watch as X, useAttrs as Y, resolveDynamicComponent as ee, unref as S, mergeProps as k, createVNode as te } from "vue";
|
|
2
|
+
import { b as oe, a as re, e as ne } from "./index3.js";
|
|
3
|
+
import { t as u } from "./utils.js";
|
|
4
|
+
import { _ as N } from "./_plugin-vue_export-helper.js";
|
|
5
|
+
import { u as se } from "./useSlotRefs.js";
|
|
6
|
+
const pe = g({
|
|
7
|
+
setup: (r) => () => C(W, r.propsFactory(), r.vnodeFactory()),
|
|
8
|
+
props: ["propsFactory", "vnodeFactory"]
|
|
9
9
|
});
|
|
10
|
-
function
|
|
11
|
-
let e = null,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
function ae(r, n) {
|
|
11
|
+
let e = null, t = null, s = !1;
|
|
12
|
+
U(() => {
|
|
13
|
+
B(() => {
|
|
14
|
+
s || (t = document.createElement("div"), e = C(pe, { propsFactory: r, vnodeFactory: n }), R(e, t));
|
|
15
|
+
});
|
|
16
|
+
}), D(() => {
|
|
17
|
+
s = !0, B(() => {
|
|
18
|
+
t && (R(null, t), t.remove(), e = null, t = null);
|
|
17
19
|
});
|
|
18
20
|
});
|
|
19
21
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
function ce(r, n) {
|
|
23
|
+
return h(() => {
|
|
24
|
+
var v;
|
|
25
|
+
if (n instanceof HTMLElement)
|
|
26
|
+
return n;
|
|
27
|
+
const e = n, t = oe(r), s = (v = t == null ? void 0 : t.getRootNode) == null ? void 0 : v.call(t), i = s instanceof ShadowRoot, d = i ? s : document.body;
|
|
28
|
+
if (e) {
|
|
29
|
+
if (!i && e === "body")
|
|
30
|
+
return document.body;
|
|
31
|
+
const f = d.querySelector(e);
|
|
32
|
+
if (f instanceof Node) return f;
|
|
33
|
+
}
|
|
34
|
+
return d;
|
|
25
35
|
});
|
|
26
36
|
}
|
|
27
|
-
const
|
|
37
|
+
const ie = /* @__PURE__ */ g({
|
|
28
38
|
__name: "Popper",
|
|
29
39
|
props: {
|
|
30
40
|
show: { type: Boolean },
|
|
31
41
|
transitionProps: {}
|
|
32
42
|
},
|
|
33
|
-
setup(r, { expose:
|
|
34
|
-
const e =
|
|
35
|
-
return
|
|
43
|
+
setup(r, { expose: n }) {
|
|
44
|
+
const e = E(null);
|
|
45
|
+
return n({
|
|
36
46
|
popperRef: e
|
|
37
|
-
}), (
|
|
38
|
-
default:
|
|
39
|
-
|
|
47
|
+
}), (t, s) => (_(), F(j, q(L(t.transitionProps)), {
|
|
48
|
+
default: Z(() => [
|
|
49
|
+
t.show ? (_(), G("div", {
|
|
40
50
|
key: 0,
|
|
41
51
|
class: "tr-base-popper",
|
|
42
52
|
ref_key: "popperRef",
|
|
43
53
|
ref: e
|
|
44
54
|
}, [
|
|
45
|
-
|
|
46
|
-
], 512)) :
|
|
55
|
+
K(t.$slots, "default", {}, void 0, !0)
|
|
56
|
+
], 512)) : J("", !0)
|
|
47
57
|
]),
|
|
48
58
|
_: 3
|
|
49
59
|
}, 16));
|
|
50
60
|
}
|
|
51
|
-
}),
|
|
61
|
+
}), le = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-25c13ab7"]]), ue = /* @__PURE__ */ g({
|
|
52
62
|
inheritAttrs: !1,
|
|
53
63
|
__name: "index",
|
|
54
64
|
props: {
|
|
@@ -67,85 +77,85 @@ const fe = /* @__PURE__ */ g({
|
|
|
67
77
|
triggerEvents: {}
|
|
68
78
|
},
|
|
69
79
|
setup(r, {
|
|
70
|
-
expose:
|
|
80
|
+
expose: n
|
|
71
81
|
}) {
|
|
72
|
-
const e = r,
|
|
73
|
-
vnodes:
|
|
74
|
-
ref:
|
|
75
|
-
setRef:
|
|
76
|
-
} =
|
|
77
|
-
const
|
|
78
|
-
for (const [
|
|
79
|
-
/^on[A-Z]/.test(
|
|
80
|
-
return
|
|
81
|
-
},
|
|
82
|
-
var
|
|
83
|
-
return ((
|
|
84
|
-
}),
|
|
85
|
-
var
|
|
82
|
+
const e = r, t = Q(), {
|
|
83
|
+
vnodes: s,
|
|
84
|
+
ref: i,
|
|
85
|
+
setRef: d
|
|
86
|
+
} = se(t.trigger), v = (o = {}) => {
|
|
87
|
+
const p = {};
|
|
88
|
+
for (const [c, a] of Object.entries(o))
|
|
89
|
+
/^on[A-Z]/.test(c) && typeof a == "function" && (p[c] = a);
|
|
90
|
+
return p;
|
|
91
|
+
}, f = E(null), b = h(() => {
|
|
92
|
+
var o;
|
|
93
|
+
return ((o = f.value) == null ? void 0 : o.popperRef) || null;
|
|
94
|
+
}), m = h(() => {
|
|
95
|
+
var o, p;
|
|
86
96
|
return typeof e.offset == "number" ? {
|
|
87
97
|
mainAxis: e.offset,
|
|
88
98
|
crossAxis: 0
|
|
89
99
|
} : {
|
|
90
|
-
mainAxis: ((
|
|
91
|
-
crossAxis: ((
|
|
100
|
+
mainAxis: ((o = e.offset) == null ? void 0 : o.mainAxis) ?? 0,
|
|
101
|
+
crossAxis: ((p = e.offset) == null ? void 0 : p.crossAxis) ?? 0
|
|
92
102
|
};
|
|
93
103
|
}), {
|
|
94
|
-
top:
|
|
95
|
-
bottom:
|
|
104
|
+
top: $,
|
|
105
|
+
bottom: O,
|
|
96
106
|
left: w,
|
|
97
|
-
right:
|
|
98
|
-
width:
|
|
99
|
-
update:
|
|
100
|
-
} =
|
|
101
|
-
width:
|
|
102
|
-
height:
|
|
103
|
-
} =
|
|
107
|
+
right: V,
|
|
108
|
+
width: z,
|
|
109
|
+
update: A
|
|
110
|
+
} = re(i), {
|
|
111
|
+
width: y,
|
|
112
|
+
height: P
|
|
113
|
+
} = ne(b, void 0, {
|
|
104
114
|
box: "border-box"
|
|
105
|
-
}),
|
|
115
|
+
}), H = h(() => {
|
|
106
116
|
const {
|
|
107
|
-
placement:
|
|
108
|
-
preventOverflow:
|
|
109
|
-
} = e,
|
|
110
|
-
if (!
|
|
111
|
-
l
|
|
117
|
+
placement: o,
|
|
118
|
+
preventOverflow: p
|
|
119
|
+
} = e, c = {}, a = (l, x) => {
|
|
120
|
+
if (!p) {
|
|
121
|
+
c[l] = x;
|
|
112
122
|
return;
|
|
113
123
|
}
|
|
114
|
-
const
|
|
115
|
-
l[
|
|
124
|
+
const T = u(l === "top" ? P.value : y.value);
|
|
125
|
+
l === "top" ? c[l] = `clamp(var(--tr-base-popper-min-top), ${x}, calc(var(--tr-base-popper-max-bottom) - ${T}))` : l === "left" && (c[l] = `clamp(var(--tr-base-popper-min-left), ${x}, calc(var(--tr-base-popper-max-right) - ${T}))`);
|
|
116
126
|
};
|
|
117
|
-
return
|
|
127
|
+
return o.includes("top") && a("top", u($.value - P.value - m.value.mainAxis)), o.includes("bottom") && a("top", u(O.value + m.value.mainAxis)), o.includes("left") && a("left", u(w.value + m.value.crossAxis)), o.includes("right") && a("left", u(V.value - y.value + m.value.crossAxis)), o.includes("center") && a("left", u(w.value + z.value / 2 - y.value / 2 + m.value.crossAxis)), c;
|
|
118
128
|
});
|
|
119
|
-
|
|
120
|
-
|
|
129
|
+
X(() => e.show, (o) => {
|
|
130
|
+
o && A();
|
|
121
131
|
}, {
|
|
122
132
|
flush: "post"
|
|
123
133
|
});
|
|
124
|
-
const I =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
ref:
|
|
134
|
+
const I = ce(i, e.appendTo), M = Y();
|
|
135
|
+
return ae(() => ({
|
|
136
|
+
to: I.value
|
|
137
|
+
}), () => te(le, k({
|
|
138
|
+
ref: f,
|
|
129
139
|
show: e.show,
|
|
130
140
|
transitionProps: e.transitionProps,
|
|
131
|
-
style:
|
|
132
|
-
},
|
|
141
|
+
style: H.value
|
|
142
|
+
}, M), {
|
|
133
143
|
default: () => {
|
|
134
|
-
var
|
|
135
|
-
return [(
|
|
144
|
+
var o;
|
|
145
|
+
return [(o = t.content) == null ? void 0 : o.call(t)];
|
|
136
146
|
}
|
|
137
|
-
})),
|
|
138
|
-
triggerRef:
|
|
139
|
-
popperRef:
|
|
140
|
-
update:
|
|
141
|
-
}), (
|
|
142
|
-
ref:
|
|
143
|
-
},
|
|
147
|
+
})), n({
|
|
148
|
+
triggerRef: i,
|
|
149
|
+
popperRef: b,
|
|
150
|
+
update: A
|
|
151
|
+
}), (o, p) => (_(), F(ee(S(s)[0]), k({
|
|
152
|
+
ref: S(d)
|
|
153
|
+
}, v(e.triggerEvents)), null, 16));
|
|
144
154
|
}
|
|
145
|
-
}),
|
|
146
|
-
|
|
155
|
+
}), fe = /* @__PURE__ */ N(ue, [["__scopeId", "data-v-f1e25842"]]);
|
|
156
|
+
fe.name = "TrBasePopper";
|
|
147
157
|
export {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
158
|
+
fe as B,
|
|
159
|
+
ae as c,
|
|
160
|
+
ce as u
|
|
151
161
|
};
|
package/dist/index5.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { W as B, s as C, d as k, f as _, p as $, $ as O, g as A, h as j } from "./index7.js";
|
|
2
2
|
import { createElementBlock as w, openBlock as f, createElementVNode as r, resolveComponent as D, mergeProps as I, createBlock as h, createCommentVNode as T, renderSlot as E, resolveDynamicComponent as L, normalizeClass as M, toDisplayString as U } from "vue";
|
|
3
3
|
const z = ({ emit: e, props: t, state: n, designConfig: o }) => (d) => {
|
|
4
4
|
var s, l;
|
|
@@ -14,8 +14,8 @@ const z = ({ emit: e, props: t, state: n, designConfig: o }) => (d) => {
|
|
|
14
14
|
disabled: e.disabled,
|
|
15
15
|
plain: t(() => e.plain || (i.buttonGroup || {}).plain),
|
|
16
16
|
round: t(() => {
|
|
17
|
-
var c,
|
|
18
|
-
return (g = (
|
|
17
|
+
var c, b, g;
|
|
18
|
+
return (g = (b = e.round) != null ? b : (c = u == null ? void 0 : u.props) == null ? void 0 : c.round) != null ? g : !1;
|
|
19
19
|
}),
|
|
20
20
|
formDisabled: t(() => (i.tinyForm || {}).disabled),
|
|
21
21
|
buttonDisabled: t(
|
|
@@ -29,12 +29,12 @@ const z = ({ emit: e, props: t, state: n, designConfig: o }) => (d) => {
|
|
|
29
29
|
},
|
|
30
30
|
{ immediate: !0 }
|
|
31
31
|
);
|
|
32
|
-
const
|
|
32
|
+
const v = {
|
|
33
33
|
state: a,
|
|
34
34
|
clearTimer: F(a),
|
|
35
35
|
handleClick: z({ emit: l, props: e, state: a, designConfig: u })
|
|
36
36
|
};
|
|
37
|
-
return n(
|
|
37
|
+
return n(v.clearTimer), v;
|
|
38
38
|
};
|
|
39
39
|
var H = {
|
|
40
40
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -98,21 +98,21 @@ var H = {
|
|
|
98
98
|
-1
|
|
99
99
|
/* HOISTED */
|
|
100
100
|
), R = [V, P, Z];
|
|
101
|
-
function
|
|
101
|
+
function W(e, t) {
|
|
102
102
|
return f(), w("svg", H, [].concat(R));
|
|
103
103
|
}
|
|
104
|
-
var
|
|
105
|
-
render:
|
|
106
|
-
},
|
|
104
|
+
var X = {
|
|
105
|
+
render: W
|
|
106
|
+
}, Y = function() {
|
|
107
107
|
return C({
|
|
108
108
|
name: "IconLoadingShadow",
|
|
109
|
-
component:
|
|
109
|
+
component: X
|
|
110
110
|
})();
|
|
111
111
|
};
|
|
112
|
-
function
|
|
112
|
+
function q(e, t) {
|
|
113
113
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
114
114
|
if (n) return (n = n.call(e)).next.bind(n);
|
|
115
|
-
if (Array.isArray(e) || (n =
|
|
115
|
+
if (Array.isArray(e) || (n = J(e)) || t) {
|
|
116
116
|
n && (e = n);
|
|
117
117
|
var o = 0;
|
|
118
118
|
return function() {
|
|
@@ -122,7 +122,7 @@ function J(e, t) {
|
|
|
122
122
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
123
123
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function J(e, t) {
|
|
126
126
|
if (e) {
|
|
127
127
|
if (typeof e == "string") return S(e, t);
|
|
128
128
|
var n = {}.toString.call(e).slice(8, -1);
|
|
@@ -134,17 +134,17 @@ function S(e, t) {
|
|
|
134
134
|
for (var n = 0, o = Array(t); n < t; n++) o[n] = e[n];
|
|
135
135
|
return o;
|
|
136
136
|
}
|
|
137
|
-
var
|
|
138
|
-
for (var o = t.__vccOpts || t, d =
|
|
137
|
+
var K = function(t, n) {
|
|
138
|
+
for (var o = t.__vccOpts || t, d = q(n), s; !(s = d()).done; ) {
|
|
139
139
|
var l = s.value, i = l[0], u = l[1];
|
|
140
140
|
o[i] = u;
|
|
141
141
|
}
|
|
142
142
|
return o;
|
|
143
|
-
},
|
|
143
|
+
}, Q = k({
|
|
144
144
|
emits: ["click"],
|
|
145
|
-
props: [].concat(
|
|
145
|
+
props: [].concat($, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "customClass", "ghost", "customStyle"]),
|
|
146
146
|
components: {
|
|
147
|
-
IconLoading:
|
|
147
|
+
IconLoading: Y()
|
|
148
148
|
},
|
|
149
149
|
setup: function(t, n) {
|
|
150
150
|
return _({
|
|
@@ -194,7 +194,7 @@ function ee(e, t, n, o, d, s) {
|
|
|
194
194
|
)];
|
|
195
195
|
})], 16, x);
|
|
196
196
|
}
|
|
197
|
-
var m = /* @__PURE__ */ Q
|
|
197
|
+
var m = /* @__PURE__ */ K(Q, [["render", ee]]);
|
|
198
198
|
function y() {
|
|
199
199
|
return y = Object.assign ? Object.assign.bind() : function(e) {
|
|
200
200
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -299,7 +299,7 @@ var te = function(t) {
|
|
|
299
299
|
props: ne,
|
|
300
300
|
slots: Object,
|
|
301
301
|
setup: function(t, n) {
|
|
302
|
-
return
|
|
302
|
+
return O({
|
|
303
303
|
props: t,
|
|
304
304
|
context: n,
|
|
305
305
|
template: te
|
|
@@ -311,5 +311,6 @@ p.install = function(e) {
|
|
|
311
311
|
};
|
|
312
312
|
p.version = oe;
|
|
313
313
|
export {
|
|
314
|
-
p as B
|
|
314
|
+
p as B,
|
|
315
|
+
Y as i
|
|
315
316
|
};
|