@opentiny/tiny-robot 0.3.0-alpha.25 → 0.3.0-alpha.27
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 +1 -1
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +233 -215
- package/dist/drag-overlay/index.js +1 -1
- package/dist/dropdown-menu/index.js +2 -2
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/history/index.js +2 -285
- package/dist/index.d.ts +14 -8
- package/dist/index.js +19 -17
- package/dist/index2.js +276 -691
- package/dist/index3.js +697 -148
- package/dist/index4.js +161 -0
- package/dist/mcp-add-form/index.js +1 -1
- package/dist/mcp-server-picker/index.js +1 -1
- package/dist/sender/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +2 -2
- package/dist/useSlotRefs.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +3 -3
package/dist/index4.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
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, d 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
|
+
});
|
|
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);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
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__ */ g({
|
|
38
|
+
__name: "Popper",
|
|
39
|
+
props: {
|
|
40
|
+
show: { type: Boolean },
|
|
41
|
+
transitionProps: {}
|
|
42
|
+
},
|
|
43
|
+
setup(r, { expose: n }) {
|
|
44
|
+
const e = E(null);
|
|
45
|
+
return n({
|
|
46
|
+
popperRef: e
|
|
47
|
+
}), (t, s) => (_(), F(j, q(L(t.transitionProps)), {
|
|
48
|
+
default: Z(() => [
|
|
49
|
+
t.show ? (_(), G("div", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "tr-base-popper",
|
|
52
|
+
ref_key: "popperRef",
|
|
53
|
+
ref: e
|
|
54
|
+
}, [
|
|
55
|
+
K(t.$slots, "default", {}, void 0, !0)
|
|
56
|
+
], 512)) : J("", !0)
|
|
57
|
+
]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 16));
|
|
60
|
+
}
|
|
61
|
+
}), le = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-25c13ab7"]]), ue = /* @__PURE__ */ g({
|
|
62
|
+
inheritAttrs: !1,
|
|
63
|
+
__name: "index",
|
|
64
|
+
props: {
|
|
65
|
+
appendTo: {},
|
|
66
|
+
offset: {},
|
|
67
|
+
placement: {
|
|
68
|
+
default: "top-center"
|
|
69
|
+
},
|
|
70
|
+
preventOverflow: {
|
|
71
|
+
type: Boolean
|
|
72
|
+
},
|
|
73
|
+
show: {
|
|
74
|
+
type: Boolean
|
|
75
|
+
},
|
|
76
|
+
transitionProps: {},
|
|
77
|
+
triggerEvents: {}
|
|
78
|
+
},
|
|
79
|
+
setup(r, {
|
|
80
|
+
expose: n
|
|
81
|
+
}) {
|
|
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,
|
|
98
|
+
crossAxis: 0
|
|
99
|
+
} : {
|
|
100
|
+
mainAxis: ((o = e.offset) == null ? void 0 : o.mainAxis) ?? 0,
|
|
101
|
+
crossAxis: ((p = e.offset) == null ? void 0 : p.crossAxis) ?? 0
|
|
102
|
+
};
|
|
103
|
+
}), {
|
|
104
|
+
top: $,
|
|
105
|
+
bottom: O,
|
|
106
|
+
left: w,
|
|
107
|
+
right: V,
|
|
108
|
+
width: z,
|
|
109
|
+
update: A
|
|
110
|
+
} = re(i), {
|
|
111
|
+
width: y,
|
|
112
|
+
height: P
|
|
113
|
+
} = ne(b, void 0, {
|
|
114
|
+
box: "border-box"
|
|
115
|
+
}), H = h(() => {
|
|
116
|
+
const {
|
|
117
|
+
placement: o,
|
|
118
|
+
preventOverflow: p
|
|
119
|
+
} = e, c = {}, a = (l, x) => {
|
|
120
|
+
if (!p) {
|
|
121
|
+
c[l] = x;
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
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}))`);
|
|
126
|
+
};
|
|
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;
|
|
128
|
+
});
|
|
129
|
+
X(() => e.show, (o) => {
|
|
130
|
+
o && A();
|
|
131
|
+
}, {
|
|
132
|
+
flush: "post"
|
|
133
|
+
});
|
|
134
|
+
const I = ce(i, e.appendTo), M = Y();
|
|
135
|
+
return ae(() => ({
|
|
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), {
|
|
143
|
+
default: () => {
|
|
144
|
+
var o;
|
|
145
|
+
return [(o = t.content) == null ? void 0 : o.call(t)];
|
|
146
|
+
}
|
|
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));
|
|
154
|
+
}
|
|
155
|
+
}), fe = /* @__PURE__ */ N(ue, [["__scopeId", "data-v-f1e25842"]]);
|
|
156
|
+
fe.name = "TrBasePopper";
|
|
157
|
+
export {
|
|
158
|
+
fe as B,
|
|
159
|
+
ae as c,
|
|
160
|
+
ce as u
|
|
161
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, ref as b, useModel as k, watch as O, onUnmounted as R, createElementBlock as _, openBlock as v, createElementVNode as t, withDirectives as c, vModelText as f, createVNode as y, unref as D, createCommentVNode as $ } from "vue";
|
|
2
2
|
import { TinyRadioGroup as E } from "@opentiny/vue";
|
|
3
|
-
import { e as L } from "../
|
|
3
|
+
import { e as L } from "../index3.js";
|
|
4
4
|
import { _ as T } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
const M = { class: "form-editor__container" }, S = { class: "form-editor__item" }, F = { class: "form-editor__item" }, I = { class: "form-editor__item" }, N = { class: "form-editor__item" }, H = { class: "form-editor__item" }, w = { class: "form-editor__item" }, A = ["src"], C = "https://res.hc-cdn.com/tinyui-design/1.1.0.20250526191525/home/images/tiny-ng.svg", P = /* @__PURE__ */ g({
|
|
6
6
|
__name: "FormEditor",
|
|
@@ -3,7 +3,7 @@ import { TinyPopconfirm as ve, TinySwitch as X, TinyTabs as fe, TinyTabItem as Y
|
|
|
3
3
|
import { IconArrowRight as ke, IconArrowDown as be, IconDelete as Te, IconClose as ae, IconEmptySearch as Ce, IconPlus as Pe, IconSearch as ee } from "@opentiny/tiny-robot-svgs";
|
|
4
4
|
import { _ as z } from "../_plugin-vue_export-helper.js";
|
|
5
5
|
import { _ as we } from "../no-data.js";
|
|
6
|
-
import { o as Se } from "../
|
|
6
|
+
import { o as Se } from "../index3.js";
|
|
7
7
|
import $e from "../mcp-add-form/index.js";
|
|
8
8
|
const xe = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-card__content" }, Ae = { class: "plugin-card__info" }, Fe = { class: "plugin-card__name" }, Me = {
|
|
9
9
|
key: 0,
|
package/dist/sender/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as F, watch as ne, reactive as ot, computed as L, defineComponent as Se, createElementBlock as I, openBlock as b, createCommentVNode as N, normalizeStyle as Je, createBlock as Y, unref as C, withCtx as he, createElementVNode as U, createVNode as Z, normalizeClass as oe, toDisplayString as ue, useAttrs as st, resolveComponent as at, mergeProps as we, Fragment as ve, renderList as _e, mergeModels as lt, useModel as rt, onMounted as it, onUnmounted as ut, nextTick as te, Transition as Ve, withModifiers as ct, useSlots as dt, renderSlot as ie, isRef as ft, createTextVNode as Ge } from "vue";
|
|
2
2
|
import { TinyTooltip as Me, TinyInput as pt } from "@opentiny/vue";
|
|
3
|
-
import { e as ht } from "../
|
|
3
|
+
import { e as ht } from "../index3.js";
|
|
4
4
|
import { IconUpload as vt, IconVoice as yt, IconLoadingSpeech as gt, IconClear as mt, IconSend as bt, IconStop as wt, IconAssociate as _t } from "@opentiny/tiny-robot-svgs";
|
|
5
5
|
import { _ as Ce } from "../_plugin-vue_export-helper.js";
|
|
6
6
|
import { t as St } from "../utils.js";
|