@opentiny/tiny-robot 0.4.2-alpha.2 → 0.4.2-alpha.4

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.
@@ -1,8 +1,8 @@
1
- import { defineComponent as g, useModel as c, computed as w, withDirectives as C, openBlock as B, createElementBlock as S, normalizeClass as y, createElementVNode as e, renderSlot as l, toDisplayString as I, createVNode as u, unref as i, vShow as z, mergeModels as d } from "vue";
2
- import { IconCancelFullScreen as $, IconFullScreen as k, IconClose as M } from "@opentiny/tiny-robot-svgs";
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 b } from "../_plugin-vue_export-helper.js";
5
- const E = { class: "tr-container__header" }, F = { class: "tr-container__title" }, N = { class: "tr-container__header-operations" }, T = { class: "tr-container__footer" }, D = /* @__PURE__ */ g({
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 ? $ : k), _ = p, h = () => {
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(), S("div", {
23
- class: y(["tr-container", { fullscreen: t.value }])
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", E, [
28
+ e("div", T, [
29
29
  l(n.$slots, "title", {}, () => [
30
- e("h3", F, I(m.title), 1)
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(M),
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", T, [
49
+ e("div", D, [
50
50
  l(n.$slots, "footer", {}, void 0, !0)
51
51
  ])
52
52
  ], 2)), [
53
- [z, a.value]
53
+ [E, a.value]
54
54
  ]);
55
55
  }
56
- }), r = /* @__PURE__ */ b(D, [["__scopeId", "data-v-1ebfc5e5"]]);
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 { d as M } from "../index4.js";
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,5 +1,5 @@
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 { w as S, a as b, o as $ } from "../index4.js";
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";
package/dist/index.d.ts CHANGED
@@ -308,6 +308,8 @@ tooltipPlacement: TooltipPlacement;
308
308
  autoInsert: boolean;
309
309
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
310
310
 
311
+ declare const __VLS_component_18: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
312
+
311
313
  declare const __VLS_component_2: DefineComponent<BubbleListProps, {
312
314
  scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
313
315
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
@@ -1059,6 +1061,15 @@ declare function __VLS_template_17(): {
1059
1061
  rootEl: any;
1060
1062
  };
1061
1063
 
1064
+ declare function __VLS_template_18(): {
1065
+ attrs: Partial<{}>;
1066
+ slots: {
1067
+ prepend?(_: {}): any;
1068
+ };
1069
+ refs: {};
1070
+ rootEl: any;
1071
+ };
1072
+
1062
1073
  declare function __VLS_template_2(): {
1063
1074
  attrs: Partial<{}>;
1064
1075
  slots: Readonly<BubbleListSlots> & BubbleListSlots;
@@ -1538,6 +1549,8 @@ declare type __VLS_TemplateResult_16 = ReturnType<typeof __VLS_template_16>;
1538
1549
 
1539
1550
  declare type __VLS_TemplateResult_17 = ReturnType<typeof __VLS_template_17>;
1540
1551
 
1552
+ declare type __VLS_TemplateResult_18 = ReturnType<typeof __VLS_template_18>;
1553
+
1541
1554
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1542
1555
 
1543
1556
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
@@ -1608,6 +1621,12 @@ declare type __VLS_WithTemplateSlots_17<T, S> = T & {
1608
1621
  };
1609
1622
  };
1610
1623
 
1624
+ declare type __VLS_WithTemplateSlots_18<T, S> = T & {
1625
+ new (): {
1626
+ $slots: S;
1627
+ };
1628
+ };
1629
+
1611
1630
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1612
1631
  new (): {
1613
1632
  $slots: S;
@@ -2277,7 +2296,7 @@ declare const _default_23: DefineComponent< {}, {}, {}, {}, {}, ComponentOpti
2277
2296
  export { _default_23 as TrWordCounter }
2278
2297
  export { _default_23 as WordCounter }
2279
2298
 
2280
- declare const _default_24: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
2299
+ declare const _default_24: __VLS_WithTemplateSlots_18<typeof __VLS_component_18, __VLS_TemplateResult_18["slots"]>;
2281
2300
  export { _default_24 as DefaultActionButtons }
2282
2301
  export { _default_24 as TrDefaultActionButtons }
2283
2302
 
@@ -4611,7 +4630,7 @@ export declare interface UploadButtonProps {
4611
4630
 
4612
4631
  export declare interface UrlAttachment extends BaseAttachment {
4613
4632
  url: string;
4614
- size: number;
4633
+ size?: number;
4615
4634
  rawFile?: File;
4616
4635
  }
4617
4636
 
package/dist/index.js CHANGED
@@ -20,8 +20,8 @@ import { useTheme as $e } from "./theme-provider/index.js";
20
20
  import N from "./welcome/index.js";
21
21
  import V from "./mcp-server-picker/index.js";
22
22
  import I from "./mcp-add-form/index.js";
23
- import { A as U, S as K, _ as X, W as Y, D as q } from "./index2.js";
24
- import { a as ke, u as Ne } from "./index2.js";
23
+ import { A as U, a as K, _ as X, W as Y, D as q } from "./index2.js";
24
+ import { S as ke, u as Ne } from "./index2.js";
25
25
  import { _ as G, V as J } from "./index3.js";
26
26
  var u = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(u || {});
27
27
  function Q(e, r) {
package/dist/index2.js CHANGED
@@ -1,19 +1,28 @@
1
- import { inject as A, defineComponent as h, computed as d, openBlock as i, createBlock as b, unref as o, withCtx as x, createElementVNode as f, normalizeClass as v, renderSlot as B, resolveDynamicComponent as D, normalizeStyle as E, createElementBlock as p, createVNode as m, toDisplayString as w, createCommentVNode as k, Transition as I } from "vue";
2
- import { _ as S } from "./_plugin-vue_export-helper.js";
3
- import { IconSend as P, IconStop as N, IconClear as F } from "@opentiny/tiny-robot-svgs";
4
- import { TinyTooltip as T } from "@opentiny/vue";
5
- const R = Symbol("sender-context");
6
- function g() {
7
- const a = A(R);
8
- if (!a)
1
+ import { inject as R, isVNode as V, h as F, defineComponent as y, computed as l, openBlock as i, createBlock as f, unref as o, withCtx as S, createElementVNode as k, normalizeStyle as I, normalizeClass as v, renderSlot as B, resolveDynamicComponent as P, createElementBlock as b, createVNode as x, toDisplayString as T, createCommentVNode as h, useSlots as W, Transition as $ } from "vue";
2
+ import { _ as w } from "./_plugin-vue_export-helper.js";
3
+ import { IconSend as N, IconStop as j, IconClose as U } from "@opentiny/tiny-robot-svgs";
4
+ import { TinyTooltip as D } from "@opentiny/vue";
5
+ import { t as G } from "./utils.js";
6
+ const K = Symbol("sender-context");
7
+ function C() {
8
+ const t = R(K);
9
+ if (!t)
9
10
  throw new Error("useSenderContext must be used within Sender component");
10
- return a;
11
+ return t;
11
12
  }
12
- function $(a) {
13
- if (a)
14
- return typeof a == "string" ? () => a : a;
13
+ const A = "tr-sender-tooltip-inner";
14
+ function E(t) {
15
+ return t ? typeof t == "string" ? t.split(/\s+/).includes(A) : Array.isArray(t) ? t.some(E) : typeof t == "object" ? !!t[A] : !1 : !1;
15
16
  }
16
- const L = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
17
+ function z(t) {
18
+ var e;
19
+ return V(t) && E((e = t.props) == null ? void 0 : e.class) ? t : F("div", { class: A }, t);
20
+ }
21
+ function O(t) {
22
+ if (t)
23
+ return typeof t == "string" ? () => z(t) : () => z(t());
24
+ }
25
+ const M = ["disabled"], X = ["disabled"], Y = /* @__PURE__ */ y({
17
26
  __name: "index",
18
27
  props: {
19
28
  icon: {},
@@ -23,177 +32,194 @@ const L = ["disabled"], V = ["disabled"], W = /* @__PURE__ */ h({
23
32
  tooltipPlacement: { default: "top" },
24
33
  size: {}
25
34
  },
26
- setup(a) {
27
- const t = a, s = d(() => $(t.tooltip)), l = d(() => t.size ? { fontSize: typeof t.size == "number" ? `${t.size}px` : t.size } : {});
28
- return (r, c) => t.tooltip ? (i(), b(o(T), {
35
+ setup(t) {
36
+ const e = t, n = {
37
+ normal: "32px",
38
+ small: "28px"
39
+ }, a = l(() => O(e.tooltip)), d = (s) => s === "small" ? {
40
+ "--tr-action-button-size": n.small
41
+ } : s === "normal" ? {
42
+ "--tr-action-button-size": n.normal
43
+ } : {
44
+ "--tr-action-button-size": G(s)
45
+ }, c = l(() => e.size ? d(e.size) : {});
46
+ return (s, u) => e.tooltip ? (i(), f(o(D), {
29
47
  key: 0,
30
- "render-content": s.value,
31
- placement: t.tooltipPlacement,
48
+ "render-content": a.value,
49
+ placement: e.tooltipPlacement,
32
50
  effect: "light",
33
51
  "visible-arrow": !1,
34
52
  "popper-class": "tr-action-button-tooltip-popper"
35
53
  }, {
36
- default: x(() => [
37
- f("button", {
38
- class: v(["tr-action-button", { active: t.active }]),
39
- disabled: t.disabled,
40
- onFocusCapture: c[0] || (c[0] = (u) => u.stopPropagation())
54
+ default: S(() => [
55
+ k("button", {
56
+ class: v(["tr-action-button", { active: e.active }]),
57
+ style: I(c.value),
58
+ disabled: e.disabled,
59
+ onFocusCapture: u[0] || (u[0] = (r) => r.stopPropagation())
41
60
  }, [
42
- B(r.$slots, "icon", {}, () => [
43
- (i(), b(D(t.icon), {
44
- style: E(l.value)
45
- }, null, 8, ["style"]))
61
+ B(s.$slots, "icon", {}, () => [
62
+ (i(), f(P(e.icon)))
46
63
  ], !0)
47
- ], 42, L)
64
+ ], 46, M)
48
65
  ]),
49
66
  _: 3
50
- }, 8, ["render-content", "placement"])) : (i(), p("button", {
67
+ }, 8, ["render-content", "placement"])) : (i(), b("button", {
51
68
  key: 1,
52
- class: v(["tr-action-button", { active: t.active }]),
53
- disabled: t.disabled
69
+ class: v(["tr-action-button", { active: e.active }]),
70
+ style: I(c.value),
71
+ disabled: e.disabled
54
72
  }, [
55
- B(r.$slots, "icon", {}, () => [
56
- (i(), b(D(t.icon), {
57
- style: E(l.value)
58
- }, null, 8, ["style"]))
73
+ B(s.$slots, "icon", {}, () => [
74
+ (i(), f(P(e.icon)))
59
75
  ], !0)
60
- ], 10, V));
76
+ ], 14, X));
61
77
  }
62
- }), O = /* @__PURE__ */ S(W, [["__scopeId", "data-v-01ebbab5"]]), j = {
78
+ }), Z = /* @__PURE__ */ w(Y, [["__scopeId", "data-v-875619e6"]]), q = {
63
79
  key: 0,
64
80
  class: "tr-sender-submit-button__cancel-text"
65
- }, K = /* @__PURE__ */ h({
81
+ }, H = /* @__PURE__ */ y({
66
82
  __name: "index",
67
- setup(a) {
68
- const { canSubmit: t, loading: s, defaultActions: l, submit: r, cancel: c, stopText: u } = g(), _ = d(() => {
69
- var e, n;
70
- return (n = (e = l.value) == null ? void 0 : e.submit) != null && n.disabled ? !0 : !t.value && !s.value;
71
- }), y = d(() => {
72
- var e, n;
73
- return $((n = (e = l.value) == null ? void 0 : e.submit) == null ? void 0 : n.tooltip);
74
- }), z = d(() => {
75
- var e, n;
76
- return ((n = (e = l.value) == null ? void 0 : e.submit) == null ? void 0 : n.tooltipPlacement) ?? "top";
77
- }), C = () => {
78
- _.value || (s.value ? c() : r());
83
+ setup(t) {
84
+ const { canSubmit: e, loading: n, defaultActions: a, submit: d, cancel: c, stopText: s } = C(), u = l(() => {
85
+ var _, m;
86
+ return (m = (_ = a.value) == null ? void 0 : _.submit) != null && m.disabled ? !0 : !e.value && !n.value;
87
+ }), r = l(() => {
88
+ var _, m;
89
+ return O((m = (_ = a.value) == null ? void 0 : _.submit) == null ? void 0 : m.tooltip);
90
+ }), p = l(() => {
91
+ var _, m;
92
+ return ((m = (_ = a.value) == null ? void 0 : _.submit) == null ? void 0 : m.tooltipPlacement) ?? "top";
93
+ }), g = () => {
94
+ u.value || (n.value ? c() : d());
79
95
  };
80
- return (e, n) => y.value && !o(s) ? (i(), b(o(T), {
96
+ return (_, m) => r.value && !o(n) ? (i(), f(o(D), {
81
97
  key: 0,
82
- "render-content": y.value,
83
- placement: z.value,
98
+ "render-content": r.value,
99
+ placement: p.value,
84
100
  effect: "light",
85
101
  "visible-arrow": !1,
86
102
  "popper-class": "tr-submit-button-tooltip-popper"
87
103
  }, {
88
- default: x(() => [
89
- f("div", {
104
+ default: S(() => [
105
+ k("div", {
90
106
  class: v([
91
107
  "tr-sender-submit-button",
92
108
  {
93
- "is-disabled": _.value,
94
- "is-loading": o(s)
109
+ "is-disabled": u.value,
110
+ "is-loading": o(n)
95
111
  }
96
112
  ]),
97
- onClick: C
113
+ onClick: g
98
114
  }, [
99
- m(o(P), { class: "tr-sender-submit-button__icon" })
115
+ x(o(N), { class: "tr-sender-submit-button__icon" })
100
116
  ], 2)
101
117
  ]),
102
118
  _: 1
103
- }, 8, ["render-content", "placement"])) : (i(), p("div", {
119
+ }, 8, ["render-content", "placement"])) : (i(), b("div", {
104
120
  key: 1,
105
121
  class: v([
106
122
  "tr-sender-submit-button",
107
123
  {
108
- "is-disabled": _.value,
109
- "is-loading": o(s)
124
+ "is-disabled": u.value,
125
+ "is-loading": o(n)
110
126
  }
111
127
  ]),
112
- onClick: C
128
+ onClick: g
113
129
  }, [
114
- o(s) ? (i(), p("div", {
130
+ o(n) ? (i(), b("div", {
115
131
  key: 1,
116
- class: v(["tr-sender-submit-button__cancel", { "icon-only": !o(u) }])
132
+ class: v(["tr-sender-submit-button__cancel", { "icon-only": !o(s) }])
117
133
  }, [
118
- m(o(N), { class: "tr-sender-submit-button__cancel-icon" }),
119
- o(u) ? (i(), p("span", j, w(o(u)), 1)) : k("", !0)
120
- ], 2)) : (i(), b(o(P), {
134
+ x(o(j), { class: "tr-sender-submit-button__cancel-icon" }),
135
+ o(s) ? (i(), b("span", q, T(o(s)), 1)) : h("", !0)
136
+ ], 2)) : (i(), f(o(N), {
121
137
  key: 0,
122
138
  class: "tr-sender-submit-button__icon"
123
139
  }))
124
140
  ], 2));
125
141
  }
126
- }), X = /* @__PURE__ */ S(K, [["__scopeId", "data-v-4b48493a"]]), Y = /* @__PURE__ */ h({
142
+ }), J = /* @__PURE__ */ w(H, [["__scopeId", "data-v-a58e69fe"]]), L = () => {
143
+ const { hasContent: t, clearable: e, loading: n, defaultActions: a } = C(), d = l(() => {
144
+ var r, p;
145
+ return ((p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.disabled) !== void 0 ? a.value.clear.disabled : !1;
146
+ }), c = l(() => {
147
+ var r, p;
148
+ return (p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.tooltip;
149
+ }), s = l(() => {
150
+ var r, p;
151
+ return ((p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.tooltipPlacement) ?? "top";
152
+ }), u = l(() => e.value && t.value && !n.value && !d.value);
153
+ return {
154
+ isDisabled: d,
155
+ tooltip: c,
156
+ tooltipPlacement: s,
157
+ show: u
158
+ };
159
+ }, Q = /* @__PURE__ */ y({
127
160
  __name: "index",
128
- setup(a) {
129
- const { hasContent: t, clearable: s, clear: l, loading: r, defaultActions: c } = g(), u = d(() => {
130
- var e, n;
131
- return ((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.disabled) !== void 0 ? c.value.clear.disabled : !1;
132
- }), _ = d(() => {
133
- var e, n;
134
- return $((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.tooltip);
135
- }), y = d(() => {
136
- var e, n;
137
- return ((n = (e = c.value) == null ? void 0 : e.clear) == null ? void 0 : n.tooltipPlacement) ?? "top";
138
- }), z = d(() => s.value && t.value && !r.value && !u.value), C = () => {
139
- u.value || l();
161
+ setup(t) {
162
+ const { clear: e } = C(), { isDisabled: n, tooltip: a, tooltipPlacement: d, show: c } = L(), s = () => {
163
+ n.value || e();
140
164
  };
141
- return (e, n) => z.value ? (i(), b(O, {
165
+ return (u, r) => o(c) ? (i(), f(Z, {
142
166
  key: 0,
143
- icon: o(F),
144
- disabled: u.value,
145
- tooltip: _.value,
146
- "tooltip-placement": y.value,
147
- onClick: C
148
- }, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) : k("", !0);
167
+ icon: o(U),
168
+ disabled: o(n),
169
+ tooltip: o(a),
170
+ "tooltip-placement": o(d),
171
+ onClick: s
172
+ }, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) : h("", !0);
149
173
  }
150
- }), q = {
174
+ }), tt = {
151
175
  key: 0,
152
176
  class: "tr-sender-word-counter"
153
- }, G = /* @__PURE__ */ h({
177
+ }, et = /* @__PURE__ */ y({
154
178
  __name: "index",
155
- setup(a) {
156
- const { characterCount: t, maxLength: s, isOverLimit: l, showWordLimit: r } = g(), c = d(() => r.value && s.value !== void 0);
157
- return (u, _) => c.value ? (i(), p("span", q, [
158
- f("span", {
159
- class: v({ "is-over-limit": o(l) })
160
- }, w(o(t)), 3),
161
- f("span", null, "/" + w(o(s)), 1)
162
- ])) : k("", !0);
179
+ setup(t) {
180
+ const { characterCount: e, maxLength: n, isOverLimit: a, showWordLimit: d } = C(), c = l(() => d.value && n.value !== void 0);
181
+ return (s, u) => c.value ? (i(), b("span", tt, [
182
+ k("span", {
183
+ class: v({ "is-over-limit": o(a) })
184
+ }, T(o(e)), 3),
185
+ k("span", null, "/" + T(o(n)), 1)
186
+ ])) : h("", !0);
163
187
  }
164
- }), nt = /* @__PURE__ */ S(G, [["__scopeId", "data-v-206396cd"]]), H = { class: "tr-default-action-buttons" }, J = {
188
+ }), ut = /* @__PURE__ */ w(et, [["__scopeId", "data-v-206396cd"]]), ot = {
189
+ key: 0,
190
+ class: "tr-default-action-buttons"
191
+ }, nt = {
165
192
  key: 0,
166
193
  class: "tr-action-buttons-group"
167
- }, M = { class: "tr-submit-wrapper" }, Q = /* @__PURE__ */ h({
194
+ }, st = /* @__PURE__ */ y({
168
195
  __name: "index",
169
- setup(a) {
170
- const { hasContent: t, loading: s } = g();
171
- return (l, r) => (i(), p("div", H, [
172
- m(I, { name: "tr-slide-right" }, {
173
- default: x(() => [
174
- o(t) || o(s) ? (i(), p("div", J, [
175
- m(I, { name: "tr-slide-right" }, {
176
- default: x(() => [
177
- m(Y)
196
+ setup(t) {
197
+ const e = W(), { hasContent: n, loading: a } = C(), { show: d } = L(), c = l(() => !!e.prepend), s = l(() => n.value || a.value), u = l(() => c.value || d.value), r = l(() => c.value || s.value);
198
+ return (p, g) => (i(), f($, { name: "tr-slide-right" }, {
199
+ default: S(() => [
200
+ r.value ? (i(), b("div", ot, [
201
+ u.value ? (i(), b("div", nt, [
202
+ B(p.$slots, "prepend", {}, void 0, !0),
203
+ x($, { name: "tr-slide-right" }, {
204
+ default: S(() => [
205
+ x(Q)
178
206
  ]),
179
207
  _: 1
180
- }),
181
- f("div", M, [
182
- m(X)
183
- ])
184
- ])) : k("", !0)
185
- ]),
186
- _: 1
187
- })
188
- ]));
208
+ })
209
+ ])) : h("", !0),
210
+ s.value ? (i(), f(J, { key: 1 })) : h("", !0)
211
+ ])) : h("", !0)
212
+ ]),
213
+ _: 3
214
+ }));
189
215
  }
190
- }), ot = /* @__PURE__ */ S(Q, [["__scopeId", "data-v-209924d7"]]);
216
+ }), dt = /* @__PURE__ */ w(st, [["__scopeId", "data-v-e9441989"]]);
191
217
  export {
192
- O as A,
193
- ot as D,
194
- X as S,
195
- nt as W,
196
- Y as _,
197
- R as a,
198
- g as u
218
+ Z as A,
219
+ dt as D,
220
+ K as S,
221
+ ut as W,
222
+ Q as _,
223
+ J as a,
224
+ C as u
199
225
  };
package/dist/index3.js CHANGED
@@ -4,7 +4,7 @@ var C = (i, o, e) => D(i, typeof o != "symbol" ? o + "" : o, e);
4
4
  import { defineComponent as B, toRefs as H, computed as R, watch as F, openBlock as S, createBlock as x, unref as p, ref as V, reactive as A, onUnmounted as P, createElementBlock as j, Fragment as U, normalizeClass as W, createSlots as L, withCtx as y, renderSlot as z, resolveDynamicComponent as M, createCommentVNode as N } from "vue";
5
5
  import { e as O } from "./index4.js";
6
6
  import { u as I, A as b } from "./index2.js";
7
- import { IconUpload as T, IconVoice as _, IconRecordingWave as q } from "@opentiny/tiny-robot-svgs";
7
+ import { IconImageUpload as T, IconVoice as _, IconRecordingWave as q } from "@opentiny/tiny-robot-svgs";
8
8
  import { _ as G } from "./_plugin-vue_export-helper.js";
9
9
  const te = /* @__PURE__ */ B({
10
10
  __name: "index",
package/dist/index4.js CHANGED
@@ -754,20 +754,20 @@ function it(e = {}) {
754
754
  return { width: r, height: s };
755
755
  }
756
756
  export {
757
- S as a,
758
- it as b,
757
+ Ke as a,
758
+ Ze as b,
759
759
  et as c,
760
- Ze as d,
760
+ M as d,
761
761
  tt as e,
762
- Ue as f,
763
- M as g,
764
- Qe as h,
765
- rt as i,
766
- ve as j,
767
- de as k,
768
- nt as l,
769
- Ke as m,
762
+ de as f,
763
+ ot as g,
764
+ rt as h,
765
+ ve as i,
766
+ nt as j,
767
+ Qe as k,
768
+ it as l,
769
+ qe as m,
770
770
  Je as o,
771
- ot as u,
772
- qe as w
771
+ S as u,
772
+ Ue as w
773
773
  };