@opentiny/tiny-robot 0.5.2-beta.0 → 0.5.2-rc.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/dist/anchor/index.js +32 -32
- package/dist/container/index.js +15 -16
- package/dist/dropdown-menu/index.js +97 -141
- package/dist/index.d.ts +122 -695
- package/dist/index.js +89 -103
- package/dist/index4.js +2 -2
- package/dist/index6.js +399 -408
- package/dist/index7.js +180 -271
- package/dist/index8.js +102 -87
- package/dist/layout/index.js +1 -1
- package/dist/sender/index.js +2138 -1219
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +36 -37
- package/dist/useSlotRefs.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +4 -4
- package/dist/extension-manager/index.js +0 -1006
- package/dist/floating-ui.dom.js +0 -970
- package/dist/model-selector/index.js +0 -1003
- package/dist/useTeleportTarget.js +0 -25
package/dist/index8.js
CHANGED
|
@@ -1,50 +1,64 @@
|
|
|
1
|
-
import { onMounted as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { _ as
|
|
1
|
+
import { onMounted as U, nextTick as B, h as C, render as R, onBeforeUnmount as D, defineComponent as _, Teleport as W, computed as h, ref as E, openBlock as g, createBlock as F, Transition as j, normalizeProps as q, guardReactiveProps as L, withCtx as Z, createElementBlock as G, renderSlot as J, createCommentVNode 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 { a as oe, d as re, c as ne } from "./index4.js";
|
|
3
|
+
import { t as u } from "./utils.js";
|
|
4
|
+
import { _ as N } from "./_plugin-vue_export-helper.js";
|
|
5
5
|
import { u as se } from "./useSlotRefs.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
setup: (r) => () => k(D, r.propsFactory(), r.vnodeFactory()),
|
|
6
|
+
const pe = _({
|
|
7
|
+
setup: (r) => () => C(W, r.propsFactory(), r.vnodeFactory()),
|
|
9
8
|
props: ["propsFactory", "vnodeFactory"]
|
|
10
9
|
});
|
|
11
|
-
function ae(r,
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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));
|
|
16
15
|
});
|
|
17
|
-
}),
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
}), D(() => {
|
|
17
|
+
s = !0, B(() => {
|
|
18
|
+
t && (R(null, t), t.remove(), e = null, t = null);
|
|
20
19
|
});
|
|
21
20
|
});
|
|
22
21
|
}
|
|
23
|
-
|
|
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;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const ie = /* @__PURE__ */ _({
|
|
24
38
|
__name: "Popper",
|
|
25
39
|
props: {
|
|
26
40
|
show: { type: Boolean },
|
|
27
41
|
transitionProps: {}
|
|
28
42
|
},
|
|
29
|
-
setup(r, { expose:
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
popperRef:
|
|
33
|
-
}), (
|
|
34
|
-
default:
|
|
35
|
-
r.show ? (
|
|
43
|
+
setup(r, { expose: n }) {
|
|
44
|
+
const e = E(null);
|
|
45
|
+
return n({
|
|
46
|
+
popperRef: e
|
|
47
|
+
}), (t, s) => (g(), F(j, q(L(r.transitionProps)), {
|
|
48
|
+
default: Z(() => [
|
|
49
|
+
r.show ? (g(), G("div", {
|
|
36
50
|
key: 0,
|
|
37
51
|
class: "tr-base-popper",
|
|
38
52
|
ref_key: "popperRef",
|
|
39
|
-
ref:
|
|
53
|
+
ref: e
|
|
40
54
|
}, [
|
|
41
|
-
|
|
42
|
-
], 512)) :
|
|
55
|
+
J(t.$slots, "default", {}, void 0, !0)
|
|
56
|
+
], 512)) : K("", !0)
|
|
43
57
|
]),
|
|
44
58
|
_: 3
|
|
45
59
|
}, 16));
|
|
46
60
|
}
|
|
47
|
-
}),
|
|
61
|
+
}), le = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-25c13ab7"]]), ue = /* @__PURE__ */ _({
|
|
48
62
|
inheritAttrs: !1,
|
|
49
63
|
__name: "index",
|
|
50
64
|
props: {
|
|
@@ -63,84 +77,85 @@ const le = /* @__PURE__ */ h({
|
|
|
63
77
|
triggerEvents: {}
|
|
64
78
|
},
|
|
65
79
|
setup(r, {
|
|
66
|
-
expose:
|
|
80
|
+
expose: n
|
|
67
81
|
}) {
|
|
68
|
-
const
|
|
69
|
-
vnodes:
|
|
70
|
-
ref:
|
|
71
|
-
setRef:
|
|
72
|
-
} = se(
|
|
73
|
-
const
|
|
74
|
-
for (const [
|
|
75
|
-
/^on[A-Z]/.test(
|
|
76
|
-
return
|
|
77
|
-
},
|
|
78
|
-
var
|
|
79
|
-
return ((
|
|
80
|
-
}),
|
|
81
|
-
var
|
|
82
|
-
return typeof
|
|
83
|
-
mainAxis:
|
|
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;
|
|
96
|
+
return typeof e.offset == "number" ? {
|
|
97
|
+
mainAxis: e.offset,
|
|
84
98
|
crossAxis: 0
|
|
85
99
|
} : {
|
|
86
|
-
mainAxis: ((
|
|
87
|
-
crossAxis: ((
|
|
100
|
+
mainAxis: ((o = e.offset) == null ? void 0 : o.mainAxis) ?? 0,
|
|
101
|
+
crossAxis: ((p = e.offset) == null ? void 0 : p.crossAxis) ?? 0
|
|
88
102
|
};
|
|
89
103
|
}), {
|
|
90
|
-
top:
|
|
104
|
+
top: $,
|
|
91
105
|
bottom: O,
|
|
92
|
-
left:
|
|
93
|
-
right:
|
|
94
|
-
width:
|
|
95
|
-
update:
|
|
96
|
-
} =
|
|
97
|
-
width:
|
|
98
|
-
height:
|
|
99
|
-
} =
|
|
106
|
+
left: w,
|
|
107
|
+
right: V,
|
|
108
|
+
width: z,
|
|
109
|
+
update: A
|
|
110
|
+
} = re(i), {
|
|
111
|
+
width: x,
|
|
112
|
+
height: P
|
|
113
|
+
} = ne(b, void 0, {
|
|
100
114
|
box: "border-box"
|
|
101
|
-
}),
|
|
115
|
+
}), H = h(() => {
|
|
102
116
|
const {
|
|
103
|
-
placement:
|
|
104
|
-
preventOverflow:
|
|
105
|
-
} =
|
|
106
|
-
if (!
|
|
107
|
-
|
|
117
|
+
placement: o,
|
|
118
|
+
preventOverflow: p
|
|
119
|
+
} = e, c = {}, a = (l, y) => {
|
|
120
|
+
if (!p) {
|
|
121
|
+
c[l] = y;
|
|
108
122
|
return;
|
|
109
123
|
}
|
|
110
|
-
const
|
|
111
|
-
|
|
124
|
+
const T = u(l === "top" ? P.value : x.value);
|
|
125
|
+
l === "top" ? c[l] = `clamp(var(--tr-base-popper-min-top), ${y}, calc(var(--tr-base-popper-max-bottom) - ${T}))` : l === "left" && (c[l] = `clamp(var(--tr-base-popper-min-left), ${y}, calc(var(--tr-base-popper-max-right) - ${T}))`);
|
|
112
126
|
};
|
|
113
|
-
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 - x.value + m.value.crossAxis)), o.includes("center") && a("left", u(w.value + z.value / 2 - x.value / 2 + m.value.crossAxis)), c;
|
|
114
128
|
});
|
|
115
|
-
X(() =>
|
|
116
|
-
|
|
129
|
+
X(() => e.show, (o) => {
|
|
130
|
+
o && A();
|
|
117
131
|
}, {
|
|
118
132
|
flush: "post"
|
|
119
133
|
});
|
|
120
|
-
const
|
|
134
|
+
const I = ce(i, e.appendTo), M = Y();
|
|
121
135
|
return ae(() => ({
|
|
122
|
-
to:
|
|
123
|
-
}), () => te(
|
|
124
|
-
ref:
|
|
125
|
-
show:
|
|
126
|
-
transitionProps:
|
|
127
|
-
style:
|
|
128
|
-
},
|
|
136
|
+
to: I.value
|
|
137
|
+
}), () => te(le, k({
|
|
138
|
+
ref: f,
|
|
139
|
+
show: e.show,
|
|
140
|
+
transitionProps: e.transitionProps,
|
|
141
|
+
style: H.value
|
|
142
|
+
}, M), {
|
|
129
143
|
default: () => {
|
|
130
|
-
var
|
|
131
|
-
return [(
|
|
144
|
+
var o;
|
|
145
|
+
return [(o = t.content) == null ? void 0 : o.call(t)];
|
|
132
146
|
}
|
|
133
|
-
})),
|
|
134
|
-
triggerRef:
|
|
135
|
-
popperRef:
|
|
136
|
-
update:
|
|
137
|
-
}), (
|
|
138
|
-
ref:
|
|
139
|
-
},
|
|
147
|
+
})), n({
|
|
148
|
+
triggerRef: i,
|
|
149
|
+
popperRef: b,
|
|
150
|
+
update: A
|
|
151
|
+
}), (o, p) => (g(), F(ee(S(s)[0]), k({
|
|
152
|
+
ref: S(d)
|
|
153
|
+
}, v(e.triggerEvents)), null, 16));
|
|
140
154
|
}
|
|
141
|
-
}),
|
|
142
|
-
|
|
155
|
+
}), fe = /* @__PURE__ */ N(ue, [["__scopeId", "data-v-f1e25842"]]);
|
|
156
|
+
fe.name = "TrBasePopper";
|
|
143
157
|
export {
|
|
144
|
-
|
|
145
|
-
ae as c
|
|
158
|
+
fe as B,
|
|
159
|
+
ae as c,
|
|
160
|
+
ce as u
|
|
146
161
|
};
|
package/dist/layout/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toValue as q, shallowRef as A, computed as c, provide as ke, inject as Pe, defineComponent as k, openBlock as E, createElementBlock as I, normalizeClass as K, createElementVNode as B, ref as te, createBlock as G, createCommentVNode as N, renderSlot as $, Fragment as Me, renderList as Ne, useAttrs as $e, watch as _e, Teleport as Be, mergeProps as Ye, unref as Z, createVNode as Xe, useSlots as Ve, isRef as Ge, normalizeStyle as be, withCtx as pe, normalizeProps as Ue, guardReactiveProps as qe, createTextVNode as Ze, toDisplayString as je, onBeforeUnmount as Ke } from "vue";
|
|
2
|
-
import { g as V, t as Je, m as Qe, b as et,
|
|
2
|
+
import { g as V, t as Je, m as Qe, b as et, a as tt, j as Se, n as nt } from "../index4.js";
|
|
3
3
|
import { _ as Y } from "../_plugin-vue_export-helper.js";
|
|
4
4
|
function ze(e) {
|
|
5
5
|
const t = q(e.value) !== void 0, n = A(q(e.defaultValue));
|