@opentiny/tiny-robot 0.2.0-alpha.0 → 0.2.0-alpha.1

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.
Files changed (136) hide show
  1. package/dist/action-group/ActionGroup.vue.d.ts +26 -0
  2. package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
  3. package/dist/action-group/index.d.ts +12 -0
  4. package/dist/action-group/index.type.d.ts +16 -0
  5. package/dist/feedback/components/SourceList.vue.d.ts +11 -0
  6. package/dist/feedback/components/index.d.ts +1 -0
  7. package/dist/feedback/index.d.ts +7 -0
  8. package/dist/feedback/index.type.d.ts +25 -0
  9. package/dist/feedback/index.vue.d.ts +13 -0
  10. package/dist/history/components/index.d.ts +2 -0
  11. package/dist/history/components/item-tag.vue.d.ts +5 -0
  12. package/dist/history/components/search-empty.vue.d.ts +7 -0
  13. package/dist/history/composables/index.d.ts +1 -0
  14. package/dist/history/composables/useEditItemTitle.d.ts +12 -0
  15. package/dist/history/index.d.ts +6 -0
  16. package/dist/history/index.type.d.ts +43 -0
  17. package/dist/history/index.vue.d.ts +2 -0
  18. package/dist/icon-button/index.d.ts +7 -0
  19. package/dist/icon-button/index.type.d.ts +7 -0
  20. package/dist/icon-button/index.vue.d.ts +6 -0
  21. package/dist/index.d.ts +10 -1
  22. package/dist/index.js +57 -27
  23. package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +1335 -884
  24. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +660 -144
  25. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +85 -0
  26. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +1783 -0
  27. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +77 -0
  28. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
  29. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +176 -0
  30. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +248 -0
  31. package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +190 -0
  32. package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +53 -0
  33. package/dist/packages/components/src/action-group/ActionGroup.vue.js +7 -0
  34. package/dist/packages/components/src/action-group/ActionGroup.vue2.js +97 -0
  35. package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +14 -0
  36. package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +4 -0
  37. package/dist/packages/components/src/action-group/index.js +17 -0
  38. package/dist/packages/components/src/bubble/bubble.vue.js +2 -2
  39. package/dist/packages/components/src/bubble/bubble.vue2.js +46 -46
  40. package/dist/packages/components/src/container/index.vue.js +1 -1
  41. package/dist/packages/components/src/container/index.vue2.js +17 -17
  42. package/dist/packages/components/src/feedback/components/SourceList.vue.js +7 -0
  43. package/dist/packages/components/src/feedback/components/SourceList.vue2.js +52 -0
  44. package/dist/packages/components/src/feedback/index.js +9 -0
  45. package/dist/packages/components/src/feedback/index.vue.js +7 -0
  46. package/dist/packages/components/src/feedback/index.vue2.js +142 -0
  47. package/dist/packages/components/src/history/components/item-tag.vue.js +7 -0
  48. package/dist/packages/components/src/history/components/item-tag.vue2.js +21 -0
  49. package/dist/packages/components/src/history/components/search-empty.vue.js +7 -0
  50. package/dist/packages/components/src/history/components/search-empty.vue2.js +20 -0
  51. package/dist/packages/components/src/history/composables/useEditItemTitle.js +43 -0
  52. package/dist/packages/components/src/history/index.js +11 -0
  53. package/dist/packages/components/src/history/index.vue.js +7 -0
  54. package/dist/packages/components/src/history/index.vue2.js +130 -0
  55. package/dist/packages/components/src/icon-button/index.js +9 -0
  56. package/dist/packages/components/src/icon-button/index.vue.js +7 -0
  57. package/dist/packages/components/src/icon-button/index.vue2.js +40 -0
  58. package/dist/packages/components/src/prompts/prompt.vue.js +2 -2
  59. package/dist/packages/components/src/prompts/prompt.vue2.js +17 -15
  60. package/dist/packages/components/src/question/components/HotQuestions.vue.js +23 -23
  61. package/dist/packages/components/src/question/index.vue.js +18 -18
  62. package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +7 -0
  63. package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +121 -0
  64. package/dist/packages/components/src/sender/index.vue.js +149 -128
  65. package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +38 -0
  66. package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +4 -0
  67. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +107 -0
  68. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +4 -0
  69. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +123 -0
  70. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +4 -0
  71. package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +45 -0
  72. package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +17 -0
  73. package/dist/packages/components/src/suggestion/index.js +9 -0
  74. package/dist/packages/components/src/suggestion/index.vue.js +179 -0
  75. package/dist/packages/components/src/suggestion/index.vue2.js +4 -0
  76. package/dist/packages/components/src/suggestion/utils/dom.js +18 -0
  77. package/dist/packages/svgs/dist/tiny-robot-svgs.js +306 -90
  78. package/dist/question/components/HotQuestions.vue.d.ts +2 -2
  79. package/dist/sender/components/TemplateEditor.vue.d.ts +18 -0
  80. package/dist/sender/index.type.d.ts +47 -0
  81. package/dist/sender/index.vue.d.ts +68 -3
  82. package/dist/style.css +1 -1
  83. package/dist/suggestion/components/CategoryNav.vue.d.ts +45 -0
  84. package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +32 -0
  85. package/dist/suggestion/components/SuggestionPanel.vue.d.ts +84 -0
  86. package/dist/suggestion/composables/useKeyboardNavigation.d.ts +18 -0
  87. package/dist/suggestion/composables/useSuggestionFilter.d.ts +10 -0
  88. package/dist/suggestion/composables/useTriggerDetection.d.ts +11 -0
  89. package/dist/suggestion/index.d.ts +7 -0
  90. package/dist/suggestion/index.type.d.ts +94 -0
  91. package/dist/suggestion/index.vue.d.ts +343 -0
  92. package/dist/suggestion/utils/dom.d.ts +20 -0
  93. package/package.json +4 -3
  94. package/src/action-group/ActionGroup.vue +232 -0
  95. package/src/action-group/ActionGroupItem.vue +9 -0
  96. package/src/action-group/index.ts +25 -0
  97. package/src/action-group/index.type.ts +20 -0
  98. package/src/bubble/bubble.vue +4 -14
  99. package/src/container/index.vue +1 -2
  100. package/src/feedback/components/SourceList.vue +112 -0
  101. package/src/feedback/components/index.ts +1 -0
  102. package/src/feedback/index.ts +12 -0
  103. package/src/feedback/index.type.ts +27 -0
  104. package/src/feedback/index.vue +166 -0
  105. package/src/history/components/index.ts +2 -0
  106. package/src/history/components/item-tag.vue +49 -0
  107. package/src/history/components/search-empty.vue +38 -0
  108. package/src/history/composables/index.ts +1 -0
  109. package/src/history/composables/useEditItemTitle.ts +75 -0
  110. package/src/history/index.ts +12 -0
  111. package/src/history/index.type.ts +50 -0
  112. package/src/history/index.vue +292 -0
  113. package/src/icon-button/index.ts +12 -0
  114. package/src/icon-button/index.type.ts +8 -0
  115. package/src/icon-button/index.vue +52 -0
  116. package/src/index.ts +33 -1
  117. package/src/prompts/prompt.vue +7 -21
  118. package/src/question/components/HotQuestions.vue +1 -1
  119. package/src/question/index.less +9 -10
  120. package/src/sender/components/TemplateEditor.vue +274 -0
  121. package/src/sender/index.less +17 -7
  122. package/src/sender/index.type.ts +51 -0
  123. package/src/sender/index.vue +56 -8
  124. package/src/sender/vars.less +3 -3
  125. package/src/suggestion/components/CategoryNav.vue +38 -0
  126. package/src/suggestion/components/SuggestionCapsule.vue +183 -0
  127. package/src/suggestion/components/SuggestionPanel.vue +147 -0
  128. package/src/suggestion/composables/useKeyboardNavigation.ts +101 -0
  129. package/src/suggestion/composables/useSuggestionFilter.ts +34 -0
  130. package/src/suggestion/composables/useTriggerDetection.ts +46 -0
  131. package/src/suggestion/index.less +497 -0
  132. package/src/suggestion/index.ts +12 -0
  133. package/src/suggestion/index.type.ts +101 -0
  134. package/src/suggestion/index.vue +338 -0
  135. package/src/suggestion/utils/dom.ts +66 -0
  136. package/src/suggestion/vars.less +141 -0
@@ -0,0 +1,190 @@
1
+ import { noop as E, isIOS as A, tryOnMounted as C, isClient as N, toArray as S, watchImmediate as x, tryOnScopeDispose as L, pxValue as P, injectLocal as z, isObject as H } from "../../../../@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js";
2
+ import { getLifeCycleTarget as te } from "../../../../@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js";
3
+ import { shallowRef as I, watch as R, computed as O, toValue as y, watchEffect as F, hasInjectionContext as $, unref as j, getCurrentInstance as B, onMounted as Q } from "vue";
4
+ const W = N ? window : void 0;
5
+ function M(o) {
6
+ var t;
7
+ const r = y(o);
8
+ return (t = r == null ? void 0 : r.$el) != null ? t : r;
9
+ }
10
+ function w(...o) {
11
+ const t = [], r = () => {
12
+ t.forEach((i) => i()), t.length = 0;
13
+ }, l = (i, n, u, c) => (i.addEventListener(n, u, c), () => i.removeEventListener(n, u, c)), f = O(() => {
14
+ const i = S(y(o[0])).filter((n) => n != null);
15
+ return i.every((n) => typeof n != "string") ? i : void 0;
16
+ }), g = x(
17
+ () => {
18
+ var i, n;
19
+ return [
20
+ (n = (i = f.value) == null ? void 0 : i.map((u) => M(u))) != null ? n : [W].filter((u) => u != null),
21
+ S(y(f.value ? o[1] : o[0])),
22
+ S(j(f.value ? o[2] : o[1])),
23
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
24
+ y(f.value ? o[3] : o[2])
25
+ ];
26
+ },
27
+ ([i, n, u, c]) => {
28
+ if (r(), !(i != null && i.length) || !(n != null && n.length) || !(u != null && u.length))
29
+ return;
30
+ const v = H(c) ? { ...c } : c;
31
+ t.push(
32
+ ...i.flatMap(
33
+ (h) => n.flatMap(
34
+ (a) => u.map((p) => l(h, a, p, v))
35
+ )
36
+ )
37
+ );
38
+ },
39
+ { flush: "post" }
40
+ ), m = () => {
41
+ g(), r();
42
+ };
43
+ return L(r), m;
44
+ }
45
+ let k = !1;
46
+ function Z(o, t, r = {}) {
47
+ const { window: l = W, ignore: f = [], capture: g = !0, detectIframe: m = !1, controls: i = !1 } = r;
48
+ if (!l)
49
+ return i ? { stop: E, cancel: E, trigger: E } : E;
50
+ if (A && !k) {
51
+ k = !0;
52
+ const e = { passive: !0 };
53
+ Array.from(l.document.body.children).forEach((s) => w(s, "click", E, e)), w(l.document.documentElement, "click", E, e);
54
+ }
55
+ let n = !0;
56
+ const u = (e) => y(f).some((s) => {
57
+ if (typeof s == "string")
58
+ return Array.from(l.document.querySelectorAll(s)).some((d) => d === e.target || e.composedPath().includes(d));
59
+ {
60
+ const d = M(s);
61
+ return d && (e.target === d || e.composedPath().includes(d));
62
+ }
63
+ });
64
+ function c(e) {
65
+ const s = y(e);
66
+ return s && s.$.subTree.shapeFlag === 16;
67
+ }
68
+ function v(e, s) {
69
+ const d = y(e), b = d.$.subTree && d.$.subTree.children;
70
+ return b == null || !Array.isArray(b) ? !1 : b.some((V) => V.el === s.target || s.composedPath().includes(V.el));
71
+ }
72
+ const h = (e) => {
73
+ const s = M(o);
74
+ if (e.target != null && !(!(s instanceof Element) && c(o) && v(o, e)) && !(!s || s === e.target || e.composedPath().includes(s))) {
75
+ if ("detail" in e && e.detail === 0 && (n = !u(e)), !n) {
76
+ n = !0;
77
+ return;
78
+ }
79
+ t(e);
80
+ }
81
+ };
82
+ let a = !1;
83
+ const p = [
84
+ w(l, "click", (e) => {
85
+ a || (a = !0, setTimeout(() => {
86
+ a = !1;
87
+ }, 0), h(e));
88
+ }, { passive: !0, capture: g }),
89
+ w(l, "pointerdown", (e) => {
90
+ const s = M(o);
91
+ n = !u(e) && !!(s && !e.composedPath().includes(s));
92
+ }, { passive: !0 }),
93
+ m && w(l, "blur", (e) => {
94
+ setTimeout(() => {
95
+ var s;
96
+ const d = M(o);
97
+ ((s = l.document.activeElement) == null ? void 0 : s.tagName) === "IFRAME" && !(d != null && d.contains(l.document.activeElement)) && t(e);
98
+ }, 0);
99
+ }, { passive: !0 })
100
+ ].filter(Boolean), T = () => p.forEach((e) => e());
101
+ return i ? {
102
+ stop: T,
103
+ cancel: () => {
104
+ n = !1;
105
+ },
106
+ trigger: (e) => {
107
+ n = !0, h(e), n = !1;
108
+ }
109
+ } : T;
110
+ }
111
+ function Y() {
112
+ const o = I(!1), t = B();
113
+ return t && Q(() => {
114
+ o.value = !0;
115
+ }, t), o;
116
+ }
117
+ function D(o) {
118
+ const t = Y();
119
+ return O(() => (t.value, !!o()));
120
+ }
121
+ const G = Symbol("vueuse-ssr-width");
122
+ function J() {
123
+ const o = $() ? z(G, null) : null;
124
+ return typeof o == "number" ? o : void 0;
125
+ }
126
+ function K(o, t = {}) {
127
+ const { window: r = W, ssrWidth: l = J() } = t, f = D(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), g = I(typeof l == "number"), m = I(), i = I(!1), n = (u) => {
128
+ i.value = u.matches;
129
+ };
130
+ return F(() => {
131
+ if (g.value) {
132
+ g.value = !f.value;
133
+ const u = y(o).split(",");
134
+ i.value = u.some((c) => {
135
+ const v = c.includes("not all"), h = c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
136
+ let p = !!(h || a);
137
+ return h && p && (p = l >= P(h[1])), a && p && (p = l <= P(a[1])), v ? !p : p;
138
+ });
139
+ return;
140
+ }
141
+ f.value && (m.value = r.matchMedia(y(o)), i.value = m.value.matches);
142
+ }), w(m, "change", n, { passive: !0 }), O(() => i.value);
143
+ }
144
+ function q(o = {}) {
145
+ const {
146
+ window: t = W,
147
+ initialWidth: r = Number.POSITIVE_INFINITY,
148
+ initialHeight: l = Number.POSITIVE_INFINITY,
149
+ listenOrientation: f = !0,
150
+ includeScrollbar: g = !0,
151
+ type: m = "inner"
152
+ } = o, i = I(r), n = I(l), u = () => {
153
+ if (t)
154
+ if (m === "outer")
155
+ i.value = t.outerWidth, n.value = t.outerHeight;
156
+ else if (m === "visual" && t.visualViewport) {
157
+ const { width: v, height: h, scale: a } = t.visualViewport;
158
+ i.value = Math.round(v * a), n.value = Math.round(h * a);
159
+ } else g ? (i.value = t.innerWidth, n.value = t.innerHeight) : (i.value = t.document.documentElement.clientWidth, n.value = t.document.documentElement.clientHeight);
160
+ };
161
+ u(), C(u);
162
+ const c = { passive: !0 };
163
+ if (w("resize", u, c), t && m === "visual" && t.visualViewport && w(t.visualViewport, "resize", u, c), f) {
164
+ const v = K("(orientation: portrait)");
165
+ R(v, () => u());
166
+ }
167
+ return { width: i, height: n };
168
+ }
169
+ export {
170
+ W as defaultWindow,
171
+ te as getLifeCycleTarget,
172
+ z as injectLocal,
173
+ N as isClient,
174
+ A as isIOS,
175
+ H as isObject,
176
+ E as noop,
177
+ Z as onClickOutside,
178
+ P as pxValue,
179
+ S as toArray,
180
+ C as tryOnMounted,
181
+ L as tryOnScopeDispose,
182
+ M as unrefElement,
183
+ w as useEventListener,
184
+ K as useMediaQuery,
185
+ Y as useMounted,
186
+ J as useSSRWidth,
187
+ D as useSupported,
188
+ q as useWindowSize,
189
+ x as watchImmediate
190
+ };
@@ -0,0 +1,53 @@
1
+ import { onMounted as a, nextTick as c, watch as s, getCurrentScope as u, onScopeDispose as l, getCurrentInstance as r, hasInjectionContext as d, inject as w } from "vue";
2
+ function b(t) {
3
+ return u() ? (l(t), !0) : !1;
4
+ }
5
+ const i = /* @__PURE__ */ new WeakMap(), v = (...t) => {
6
+ var n;
7
+ const e = t[0], o = (n = r()) == null ? void 0 : n.proxy;
8
+ if (o == null && !d())
9
+ throw new Error("injectLocal must be called in setup");
10
+ return o && i.has(o) && e in i.get(o) ? i.get(o)[e] : w(...t);
11
+ }, f = typeof window < "u" && typeof document < "u";
12
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
13
+ const p = Object.prototype.toString, h = (t) => p.call(t) === "[object Object]", S = () => {
14
+ }, j = /* @__PURE__ */ g();
15
+ function g() {
16
+ var t, n;
17
+ return f && ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((n = window == null ? void 0 : window.navigator) == null ? void 0 : n.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
18
+ }
19
+ function O(t) {
20
+ return t.endsWith("rem") ? Number.parseFloat(t) * 16 : Number.parseFloat(t);
21
+ }
22
+ function A(t) {
23
+ return Array.isArray(t) ? t : [t];
24
+ }
25
+ function m(t) {
26
+ return r();
27
+ }
28
+ function I(t, n = !0, e) {
29
+ m() ? a(t, e) : n ? t() : c(t);
30
+ }
31
+ function k(t, n, e) {
32
+ return s(
33
+ t,
34
+ n,
35
+ {
36
+ ...e,
37
+ immediate: !0
38
+ }
39
+ );
40
+ }
41
+ export {
42
+ m as getLifeCycleTarget,
43
+ v as injectLocal,
44
+ f as isClient,
45
+ j as isIOS,
46
+ h as isObject,
47
+ S as noop,
48
+ O as pxValue,
49
+ A as toArray,
50
+ I as tryOnMounted,
51
+ b as tryOnScopeDispose,
52
+ k as watchImmediate
53
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./ActionGroup.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9d495a61"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,97 @@
1
+ import { defineComponent as V, useSlots as $, computed as a, useTemplateRef as y, ref as C, watch as S, nextTick as z, createElementBlock as l, openBlock as n, createCommentVNode as b, Fragment as D, renderList as B, createBlock as R, resolveDynamicComponent as N, renderSlot as P, createVNode as E, unref as x, Transition as X, withCtx as q, withDirectives as H, createElementVNode as A, normalizeClass as W, withModifiers as j, toDisplayString as J, vShow as K } from "vue";
2
+ import { IconMenu as Q } from "../../../svgs/dist/tiny-robot-svgs.js";
3
+ import { onClickOutside as U, useWindowSize as Y } from "../../../../node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js";
4
+ import "../icon-button/index.js";
5
+ import Z from "../icon-button/index.vue.js";
6
+ const ee = { class: "tr-action-group" }, te = ["onClick"], oe = ["onClick"], ne = { class: "tr-action-group__dropdown-item-text" }, se = /* @__PURE__ */ V({
7
+ __name: "ActionGroup",
8
+ props: {
9
+ maxNum: {},
10
+ dropDownShowLabelOnly: { type: Boolean }
11
+ },
12
+ emits: ["item-click"],
13
+ setup(M, { emit: I }) {
14
+ const v = M, T = $(), L = I, c = a(() => {
15
+ var o, t;
16
+ const e = T.default();
17
+ return Array.isArray(e) ? e.length === 1 && ((o = e[0].type) == null ? void 0 : o.toString()) === "Symbol(v-fgt)" ? e[0].children : e : ((t = e.type) == null ? void 0 : t.toString()) === "Symbol(v-fgt)" ? e.children : [e];
18
+ }), i = a(() => {
19
+ const e = v.maxNum ?? Number.MAX_SAFE_INTEGER;
20
+ return e > 0 ? e : Number.MAX_SAFE_INTEGER;
21
+ }), s = a(() => c.value.length > i.value), F = a(() => s.value ? c.value.slice(0, i.value) : c.value), G = a(() => s.value ? c.value.slice(i.value) : []), u = y("moreBtnRef"), p = y("dropDownRef"), r = C(!1), O = () => {
22
+ r.value = !r.value;
23
+ };
24
+ U(p, (e) => {
25
+ var o;
26
+ (o = u.value) != null && o.contains(e.target) || (r.value = !1);
27
+ });
28
+ const _ = (e) => {
29
+ L("item-click", e), r.value = !1;
30
+ }, w = C("placement-bottom"), { height: h } = Y(), g = () => {
31
+ if (!p.value || !u.value)
32
+ return "placement-bottom";
33
+ const e = p.value.getBoundingClientRect(), o = u.value.getBoundingClientRect();
34
+ w.value = o.bottom + e.height + 16 > h.value ? "placement-top" : "placement-bottom";
35
+ };
36
+ return S(r, (e) => {
37
+ e && z(() => {
38
+ g();
39
+ });
40
+ }), S(h, () => {
41
+ r.value && g();
42
+ }), (e, o) => (n(), l("div", ee, [
43
+ (n(!0), l(D, null, B(F.value, (t, m) => (n(), l("span", {
44
+ key: m,
45
+ class: "tr-action-group__btn-wrapper",
46
+ onClick: (d) => {
47
+ var f;
48
+ return _((f = t.props) == null ? void 0 : f.name);
49
+ }
50
+ }, [
51
+ (n(), R(N(t)))
52
+ ], 8, te))), 128)),
53
+ s.value ? (n(), l("span", {
54
+ key: 0,
55
+ ref: "moreBtnRef",
56
+ class: "tr-action-group__btn-wrapper",
57
+ onClick: O
58
+ }, [
59
+ P(e.$slots, "moreBtn", {}, () => [
60
+ E(x(Z), {
61
+ icon: x(Q),
62
+ tooltip: "更多"
63
+ }, null, 8, ["icon"])
64
+ ], !0),
65
+ E(X, { name: "tr-action-group-dropdown" }, {
66
+ default: q(() => [
67
+ H(A("ul", {
68
+ ref: "dropDownRef",
69
+ class: W(["tr-action-group__dropdown", w.value])
70
+ }, [
71
+ (n(!0), l(D, null, B(G.value, (t, m) => {
72
+ var d;
73
+ return n(), l("li", {
74
+ class: "tr-action-group__dropdown-item",
75
+ key: m,
76
+ onClick: j((f) => {
77
+ var k;
78
+ return _((k = t.props) == null ? void 0 : k.name);
79
+ }, ["stop"])
80
+ }, [
81
+ v.dropDownShowLabelOnly ? b("", !0) : (n(), R(N(t), { key: 0 })),
82
+ A("span", ne, J((d = t.props) == null ? void 0 : d.label), 1)
83
+ ], 8, oe);
84
+ }), 128))
85
+ ], 2), [
86
+ [K, r.value]
87
+ ])
88
+ ]),
89
+ _: 1
90
+ })
91
+ ], 512)) : b("", !0)
92
+ ]));
93
+ }
94
+ });
95
+ export {
96
+ se as default
97
+ };
@@ -0,0 +1,14 @@
1
+ import { defineComponent as t, renderSlot as o } from "vue";
2
+ const a = /* @__PURE__ */ t({
3
+ __name: "ActionGroupItem",
4
+ props: {
5
+ name: {},
6
+ label: {}
7
+ },
8
+ setup(r) {
9
+ return (e, n) => o(e.$slots, "default");
10
+ }
11
+ });
12
+ export {
13
+ a as default
14
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ActionGroupItem.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,17 @@
1
+ import o from "./ActionGroup.vue.js";
2
+ import n from "./ActionGroupItem.vue.js";
3
+ o.name = "TrActionGroup";
4
+ const i = function(t) {
5
+ t.component(o.name, o);
6
+ };
7
+ o.install = i;
8
+ n.name = "TrActionGroupItem";
9
+ const m = function(t) {
10
+ t.component(n.name, n);
11
+ };
12
+ n.install = m;
13
+ const a = n;
14
+ export {
15
+ a as ActionGroupItem,
16
+ o as default
17
+ };
@@ -1,7 +1,7 @@
1
1
  import o from "./bubble.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ddd36d13"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f7db2e1c"]]);
5
5
  export {
6
- r as default
6
+ e as default
7
7
  };
@@ -1,20 +1,20 @@
1
- import { defineComponent as f, useCssVars as B, useSlots as M, computed as l, createElementBlock as s, openBlock as o, normalizeClass as y, createCommentVNode as c, createElementVNode as a, createBlock as v, resolveDynamicComponent as h, renderSlot as d, toDisplayString as S, unref as x, Fragment as D, renderList as L, withDirectives as V, vShow as $ } from "vue";
2
- import E from "../../../../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js";
3
- import H from "./components/actions/copy.vue.js";
4
- import I from "./components/actions/refresh.vue.js";
5
- const N = {
1
+ import { defineComponent as g, useCssVars as B, useSlots as A, computed as c, createElementBlock as s, openBlock as o, normalizeClass as h, createCommentVNode as d, createElementVNode as a, createBlock as _, resolveDynamicComponent as f, renderSlot as i, toDisplayString as M, unref as S, Fragment as x, renderList as D, withDirectives as L, vShow as V } from "vue";
2
+ import $ from "../../../../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js";
3
+ import E from "./components/actions/copy.vue.js";
4
+ import H from "./components/actions/refresh.vue.js";
5
+ const I = {
6
6
  key: 0,
7
7
  class: "tr-bubble__avatar"
8
- }, T = { class: "tr-bubble__content-wrapper" }, W = {
8
+ }, N = { class: "tr-bubble__content-wrapper" }, T = {
9
9
  key: 1,
10
- class: /* @__PURE__ */ y(["tr-bubble__content"])
11
- }, z = { class: "tr-bubbule__body" }, F = ["innerHTML"], R = { key: 1 }, j = {
10
+ class: /* @__PURE__ */ h(["tr-bubble__content"])
11
+ }, W = { class: "tr-bubbule__body" }, z = ["innerHTML"], F = { key: 1 }, R = {
12
12
  key: 2,
13
13
  class: "tr-bubbule__aborted"
14
- }, q = {
14
+ }, j = {
15
15
  key: 0,
16
16
  class: "tr-bubbule__footer"
17
- }, G = { class: "tr-bubbule__footer-left" }, J = { class: "tr-bubbule__footer-actions" }, U = /* @__PURE__ */ f({
17
+ }, q = { class: "tr-bubbule__footer-left" }, G = { class: "tr-bubbule__footer-actions" }, Q = /* @__PURE__ */ g({
18
18
  __name: "bubble",
19
19
  props: {
20
20
  content: { default: "" },
@@ -30,16 +30,16 @@ const N = {
30
30
  maxWidth: { default: "80%" }
31
31
  },
32
32
  emits: ["copy", "refresh", "action"],
33
- setup(k, { emit: C }) {
34
- B((r) => ({
35
- "088abd95": e.maxWidth
33
+ setup(v, { emit: y }) {
34
+ B((n) => ({
35
+ "8efd816c": e.maxWidth
36
36
  }));
37
- const e = k, u = C, w = M(), p = l(() => e.type === "markdown" ? E(e.mdConfig || {}).render(e.content) : e.content), b = l(() => e.placement === "start"), m = l(() => e.avatar ? f(() => () => e.avatar) : null), i = /* @__PURE__ */ new Map([
37
+ const e = v, l = y, k = A(), p = c(() => e.type === "markdown" ? $(e.mdConfig || {}).render(e.content) : e.content), b = c(() => e.placement === "start"), u = /* @__PURE__ */ new Map([
38
38
  [
39
39
  "copy",
40
40
  {
41
41
  name: "copy",
42
- vnode: H,
42
+ vnode: E,
43
43
  show: !0
44
44
  }
45
45
  ],
@@ -47,26 +47,26 @@ const N = {
47
47
  "refresh",
48
48
  {
49
49
  name: "refresh",
50
- vnode: I,
50
+ vnode: H,
51
51
  show: !0
52
52
  }
53
53
  ]
54
- ]), _ = l(() => (e.actions || []).map((t) => typeof t == "string" ? i.get(t) : i.has(t.name) ? {
55
- ...i.get(t.name),
54
+ ]), m = c(() => (e.actions || []).map((t) => typeof t == "string" ? u.get(t) : u.has(t.name) ? {
55
+ ...u.get(t.name),
56
56
  ...t
57
- } : t).filter((t) => !!t)), g = (r, ...t) => {
58
- if (r === "copy") {
59
- u("copy", t[0]);
57
+ } : t).filter((t) => !!t)), w = (n, ...t) => {
58
+ if (n === "copy") {
59
+ l("copy", t[0]);
60
60
  return;
61
61
  }
62
- if (r === "refresh") {
63
- u("refresh");
62
+ if (n === "refresh") {
63
+ l("refresh");
64
64
  return;
65
65
  }
66
- u("action", r, ...t);
66
+ l("action", n, ...t);
67
67
  };
68
- return (r, t) => (o(), s("div", {
69
- class: y([
68
+ return (n, t) => (o(), s("div", {
69
+ class: h([
70
70
  "tr-bubble",
71
71
  {
72
72
  "placement-start": b.value,
@@ -74,45 +74,45 @@ const N = {
74
74
  }
75
75
  ])
76
76
  }, [
77
- m.value ? (o(), s("div", N, [
78
- (o(), v(h(m.value)))
79
- ])) : c("", !0),
80
- a("div", T, [
81
- e.loading ? d(r.$slots, "loading", { key: 0 }, () => [
77
+ e.avatar ? (o(), s("div", I, [
78
+ (o(), _(f(e.avatar)))
79
+ ])) : d("", !0),
80
+ a("div", N, [
81
+ e.loading ? i(n.$slots, "loading", { key: 0 }, () => [
82
82
  t[0] || (t[0] = a("div", { class: "tr-bubble__loading" }, [
83
83
  a("span"),
84
84
  a("span"),
85
85
  a("span")
86
86
  ], -1))
87
- ], !0) : (o(), s("div", W, [
88
- a("div", z, [
89
- d(r.$slots, "default", {}, () => [
87
+ ], !0) : (o(), s("div", T, [
88
+ a("div", W, [
89
+ i(n.$slots, "default", {}, () => [
90
90
  e.type === "markdown" ? (o(), s("span", {
91
91
  key: 0,
92
92
  innerHTML: p.value
93
- }, null, 8, F)) : (o(), s("span", R, S(p.value), 1)),
94
- e.aborted ? (o(), s("span", j, "(用户停止)")) : c("", !0)
93
+ }, null, 8, z)) : (o(), s("span", F, M(p.value), 1)),
94
+ e.aborted ? (o(), s("span", R, "(用户停止)")) : d("", !0)
95
95
  ], !0)
96
96
  ]),
97
- x(w).footer || _.value.length > 0 ? (o(), s("div", q, [
98
- a("div", G, [
99
- d(r.$slots, "footer", {}, void 0, !0)
97
+ S(k).footer || m.value.length > 0 ? (o(), s("div", j, [
98
+ a("div", q, [
99
+ i(n.$slots, "footer", {}, void 0, !0)
100
100
  ]),
101
- a("div", J, [
102
- (o(!0), s(D, null, L(_.value, (n) => V((o(), v(h(n.vnode), {
103
- key: n == null ? void 0 : n.name,
101
+ a("div", G, [
102
+ (o(!0), s(x, null, D(m.value, (r) => L((o(), _(f(r.vnode), {
103
+ key: r == null ? void 0 : r.name,
104
104
  bubbleItem: e,
105
- onClick: (A) => g(n.name, A)
105
+ onClick: (C) => w(r.name, C)
106
106
  }, null, 8, ["onClick"])), [
107
- [$, typeof n.show == "function" ? n.show(e) : n.show]
107
+ [V, typeof r.show == "function" ? r.show(e) : r.show]
108
108
  ])), 128))
109
109
  ])
110
- ])) : c("", !0)
110
+ ])) : d("", !0)
111
111
  ]))
112
112
  ])
113
113
  ], 2));
114
114
  }
115
115
  });
116
116
  export {
117
- U as default
117
+ Q as default
118
118
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6a7e1263"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0ee55898"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as f, useCssVars as v, useModel as i, computed as p, createElementBlock as _, openBlock as m, createElementVNode as e, renderSlot as n, createVNode as a, unref as c } from "vue";
2
- import { IconCancelFullScreen as b, IconFullScreen as h, IconClose as w } from "../../../svgs/dist/tiny-robot-svgs.js";
3
- const $ = { class: "tr-container" }, g = { class: "tr-container__header" }, C = { class: "tr-container__header-operations" }, S = { class: "tr-container__body" }, k = { class: "tr-container__footer" }, I = /* @__PURE__ */ f({
1
+ import { defineComponent as f, useCssVars as v, useModel as i, computed as p, createElementBlock as _, openBlock as m, createElementVNode as e, renderSlot as s, createVNode as a, unref as d } from "vue";
2
+ import { IconCancelFullScreen as h, IconFullScreen as w, IconClose as b } from "../../../svgs/dist/tiny-robot-svgs.js";
3
+ const $ = { class: "tr-container" }, g = { class: "tr-container__header" }, C = { class: "tr-container__header-operations" }, S = { class: "tr-container__body" }, k = { class: "tr-container__footer" }, F = /* @__PURE__ */ f({
4
4
  __name: "index",
5
5
  props: {
6
6
  show: { type: Boolean, required: !0 },
@@ -11,45 +11,45 @@ const $ = { class: "tr-container" }, g = { class: "tr-container__header" }, C =
11
11
  emits: ["update:show", "update:fullscreen"],
12
12
  setup(r) {
13
13
  v((o) => ({
14
- "4f670360": s.value ? "0" : "unset",
15
- "01550f1a": s.value ? "unset" : "var(--tr-container-width)",
16
- "9b01cee4": l.value ? "100" : "-1",
17
- "46b87c3c": l.value ? "1" : "0"
14
+ "1de4f8d0": n.value ? "0" : "unset",
15
+ "75a61de3": n.value ? "unset" : "var(--tr-container-width)",
16
+ "1422451e": l.value ? "100" : "-1",
17
+ "4bd25f52": l.value ? "1" : "0"
18
18
  }));
19
- const l = i(r, "show"), s = i(r, "fullscreen"), u = p(() => s.value ? b : h);
19
+ const l = i(r, "show"), n = i(r, "fullscreen"), u = p(() => n.value ? h : w);
20
20
  return (o, t) => (m(), _("div", $, [
21
21
  t[3] || (t[3] = e("div", { class: "tr-container__dragging-bar-wrapper" }, [
22
22
  e("div", { class: "tr-container__dragging-bar" })
23
23
  ], -1)),
24
24
  e("div", g, [
25
- n(o.$slots, "title", {}, () => [
25
+ s(o.$slots, "title", {}, () => [
26
26
  t[2] || (t[2] = e("h3", { class: "tr-container__title" }, "OpenTiny NEXT", -1))
27
27
  ], !0),
28
28
  e("div", C, [
29
- n(o.$slots, "operations", {}, void 0, !0),
29
+ s(o.$slots, "operations", {}, void 0, !0),
30
30
  e("button", {
31
31
  class: "icon-btn",
32
- onClick: t[0] || (t[0] = (d) => o.$emit("update:fullscreen", !s.value))
32
+ onClick: t[0] || (t[0] = (c) => o.$emit("update:fullscreen", !n.value))
33
33
  }, [
34
- a(c(u))
34
+ a(d(u))
35
35
  ]),
36
36
  e("button", {
37
37
  class: "icon-btn",
38
- onClick: t[1] || (t[1] = (d) => o.$emit("update:show", !1))
38
+ onClick: t[1] || (t[1] = (c) => o.$emit("update:show", !1))
39
39
  }, [
40
- a(c(w))
40
+ a(d(b))
41
41
  ])
42
42
  ])
43
43
  ]),
44
44
  e("div", S, [
45
- n(o.$slots, "default", {}, void 0, !0)
45
+ s(o.$slots, "default", {}, void 0, !0)
46
46
  ]),
47
47
  e("div", k, [
48
- n(o.$slots, "footer", {}, void 0, !0)
48
+ s(o.$slots, "footer", {}, void 0, !0)
49
49
  ])
50
50
  ]));
51
51
  }
52
52
  });
53
53
  export {
54
- I as default
54
+ F as default
55
55
  };
@@ -0,0 +1,7 @@
1
+ import o from "./SourceList.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5817f518"]]);
5
+ export {
6
+ p as default
7
+ };