@opentiny/tiny-robot 0.4.0-alpha.6 → 0.4.0-alpha.7

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,4 +1,4 @@
1
- import { defineComponent as $, useSlots as H, computed as i, ref as f, watch as I, nextTick as W, createElementBlock as _, openBlock as o, createBlock as v, createCommentVNode as N, Fragment as R, renderList as G, unref as h, withCtx as S, createElementVNode as w, resolveDynamicComponent as x, renderSlot as L, createVNode as E, Transition as j, withDirectives as q, normalizeClass as J, withModifiers as K, toDisplayString as Q, vShow as U } from "vue";
1
+ import { defineComponent as $, useSlots as H, computed as i, ref as f, watch as I, nextTick as W, openBlock as o, createElementBlock as _, Fragment as N, renderList as R, createBlock as v, unref as h, withCtx as S, createElementVNode as w, resolveDynamicComponent as G, renderSlot as L, createVNode as x, Transition as j, withDirectives as q, normalizeClass as J, withModifiers as K, createCommentVNode as E, toDisplayString as Q, vShow as U } from "vue";
2
2
  import { IconMenu as Y } from "@opentiny/tiny-robot-svgs";
3
3
  import { TinyTooltip as M } from "@opentiny/vue";
4
4
  import { o as Z, d as ee } from "../index5.js";
@@ -45,7 +45,7 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
45
45
  }), I(D, () => {
46
46
  n.value && T();
47
47
  }), (e, a) => (o(), _("div", ne, [
48
- (o(!0), _(R, null, G(V.value, (t, C) => {
48
+ (o(!0), _(N, null, R(V.value, (t, C) => {
49
49
  var c;
50
50
  return o(), v(h(M), {
51
51
  key: C,
@@ -63,7 +63,7 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
63
63
  return A((s = t.props) == null ? void 0 : s.name);
64
64
  }
65
65
  }, [
66
- (o(), v(x(t)))
66
+ (o(), v(G(t)))
67
67
  ], 8, re)
68
68
  ]),
69
69
  _: 2
@@ -85,16 +85,16 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
85
85
  onClick: P
86
86
  }, [
87
87
  L(e.$slots, "moreBtn", {}, () => [
88
- E(h(te), { icon: h(Y) }, null, 8, ["icon"])
88
+ x(h(te), { icon: h(Y) }, null, 8, ["icon"])
89
89
  ], !0),
90
- E(j, { name: "tr-action-group-dropdown" }, {
90
+ x(j, { name: "tr-action-group-dropdown" }, {
91
91
  default: S(() => [
92
92
  q(w("ul", {
93
93
  ref_key: "dropDownRef",
94
94
  ref: d,
95
95
  class: J(["tr-action-group__dropdown", B.value])
96
96
  }, [
97
- (o(!0), _(R, null, G(z.value, (t, C) => {
97
+ (o(!0), _(N, null, R(z.value, (t, C) => {
98
98
  var c;
99
99
  return o(), _("li", {
100
100
  class: "tr-action-group__dropdown-item",
@@ -104,7 +104,7 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
104
104
  return A((s = t.props) == null ? void 0 : s.name);
105
105
  }, ["stop"])
106
106
  }, [
107
- l.dropDownShowLabelOnly ? N("", !0) : (o(), v(x(t), { key: 0 })),
107
+ l.dropDownShowLabelOnly ? E("", !0) : (o(), v(G(t), { key: 0 })),
108
108
  w("span", ae, Q((c = t.props) == null ? void 0 : c.label), 1)
109
109
  ], 8, le);
110
110
  }), 128))
@@ -117,7 +117,7 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
117
117
  ], 512)
118
118
  ]),
119
119
  _: 3
120
- }, 8, ["disabled"])) : N("", !0)
120
+ }, 8, ["disabled"])) : E("", !0)
121
121
  ]));
122
122
  }
123
123
  }), g = /* @__PURE__ */ oe(ce, [["__scopeId", "data-v-f0173895"]]), u = /* @__PURE__ */ $({
@@ -1,4 +1,4 @@
1
- import { computed as C, ref as R, onUnmounted as Y, defineComponent as B, mergeModels as W, useModel as Z, createElementBlock as c, openBlock as s, withModifiers as P, createElementVNode as m, createVNode as x, unref as f, Fragment as z, renderList as D, normalizeClass as U, h as ee, createCommentVNode as k, createBlock as L, toDisplayString as F, withCtx as te, resolveDynamicComponent as O, watch as ne } from "vue";
1
+ import { computed as C, ref as R, onUnmounted as Y, defineComponent as B, useModel as Z, openBlock as s, createElementBlock as c, withModifiers as P, createElementVNode as m, createVNode as x, unref as f, Fragment as z, renderList as D, normalizeClass as U, mergeModels as W, h as ee, createCommentVNode as k, toDisplayString as F, createBlock as L, withCtx as te, resolveDynamicComponent as O, watch as ne } from "vue";
2
2
  import { IconFileOther as ae, IconFileFolder as V, IconFilePpt as q, IconFileExcel as K, IconFileWord as G, IconFilePdf as H, IconFileImage as J, IconClose as re, IconArrowLeft as se, IconArrowRight as ie, IconFileRemove as oe, IconImageLoading as j, IconImageWarning as E } from "@opentiny/tiny-robot-svgs";
3
3
  import { _ as S } from "../_plugin-vue_export-helper.js";
4
4
  import { TinyTooltip as le } from "@opentiny/vue";
@@ -1,9 +1,9 @@
1
- import { B as a, a as b, b as u, c as r, d as l, u as t, e as n, f as B, g as o, h as d, i } from "../index2.js";
1
+ import { B as a, a as b, b as r, c as u, d as l, e as t, f as n, g as B, h as o, i as d, j as i } from "../index2.js";
2
2
  export {
3
3
  a as Bubble,
4
4
  b as BubbleList,
5
- u as BubbleProvider,
6
- r as BubbleRendererMatchPriority,
5
+ r as BubbleProvider,
6
+ u as BubbleRendererMatchPriority,
7
7
  l as BubbleRenderers,
8
8
  t as useBubbleBoxRenderer,
9
9
  n as useBubbleContentRenderer,
@@ -1,10 +1,10 @@
1
- import { defineComponent as g, mergeModels as c, useModel as u, computed as w, withDirectives as C, createElementBlock as B, openBlock as S, normalizeClass as y, createElementVNode as e, renderSlot as l, toDisplayString as I, createVNode as d, unref as i, vShow as z } from "vue";
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
2
  import { IconCancelFullScreen as $, IconFullScreen as k, IconClose as M } from "@opentiny/tiny-robot-svgs";
3
3
  import f from "../icon-button/index.js";
4
4
  import { _ as b } from "../_plugin-vue_export-helper.js";
5
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({
6
6
  __name: "index",
7
- props: /* @__PURE__ */ c({
7
+ props: /* @__PURE__ */ d({
8
8
  show: { type: Boolean },
9
9
  fullscreen: { type: Boolean },
10
10
  title: { default: "OpenTiny NEXT" }
@@ -14,12 +14,12 @@ const E = { class: "tr-container__header" }, F = { class: "tr-container__title"
14
14
  fullscreen: { type: Boolean },
15
15
  fullscreenModifiers: {}
16
16
  }),
17
- emits: /* @__PURE__ */ c(["close"], ["update:show", "update:fullscreen"]),
17
+ emits: /* @__PURE__ */ d(["close"], ["update:show", "update:fullscreen"]),
18
18
  setup(o, { emit: p }) {
19
- const m = o, a = u(o, "show"), t = u(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 ? $ : k), _ = p, h = () => {
20
20
  a.value = !1, _("close");
21
21
  };
22
- return (n, s) => C((S(), B("div", {
22
+ return (n, s) => C((B(), S("div", {
23
23
  class: y(["tr-container", { fullscreen: t.value }])
24
24
  }, [
25
25
  s[1] || (s[1] = e("div", { class: "tr-container__dragging-bar-wrapper" }, [
@@ -31,13 +31,13 @@ const E = { class: "tr-container__header" }, F = { class: "tr-container__title"
31
31
  ], !0),
32
32
  e("div", N, [
33
33
  l(n.$slots, "operations", {}, void 0, !0),
34
- d(i(f), {
34
+ u(i(f), {
35
35
  size: "28",
36
36
  "svg-size": "20",
37
37
  icon: v.value,
38
38
  onClick: s[0] || (s[0] = (q) => t.value = !t.value)
39
39
  }, null, 8, ["icon"]),
40
- d(i(f), {
40
+ u(i(f), {
41
41
  size: "28",
42
42
  "svg-size": "20",
43
43
  icon: i(M),
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, computed as y, createBlock as u, openBlock as t, Transition as F, withCtx as m, createElementBlock as a, createCommentVNode as h, normalizeStyle as x, normalizeClass as _, renderSlot as w, createElementVNode as l, toDisplayString as n, Fragment as D, renderList as B } from "vue";
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
2
  import { c as M } from "../index5.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({
@@ -22,10 +22,10 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
22
22
  default: m(() => [
23
23
  e.isDragging ? (t(), a("div", {
24
24
  key: 0,
25
- class: _(["tr-drag-overlay", { fullscreen: e.fullscreen }]),
26
- style: x(f.value)
25
+ class: x(["tr-drag-overlay", { fullscreen: e.fullscreen }]),
26
+ style: h(f.value)
27
27
  }, [
28
- w(g.$slots, "overlay", { isDragging: e.isDragging }, () => [
28
+ _(g.$slots, "overlay", { isDragging: e.isDragging }, () => [
29
29
  l("div", T, [
30
30
  o[0] || (o[0] = l("div", { class: "tr-drag-overlay__icon" }, [
31
31
  l("img", {
@@ -36,12 +36,12 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
36
36
  l("div", $, [
37
37
  l("div", S, n(e.overlayTitle), 1),
38
38
  l("div", E, [
39
- (t(!0), a(D, null, B(e.overlayDescription, (p, L) => (t(), a("span", { key: L }, n(p), 1))), 128))
39
+ (t(!0), a(w, null, D(e.overlayDescription, (p, L) => (t(), a("span", { key: L }, n(p), 1))), 128))
40
40
  ])
41
41
  ])
42
42
  ])
43
43
  ], !0)
44
- ], 6)) : h("", !0)
44
+ ], 6)) : B("", !0)
45
45
  ]),
46
46
  _: 3
47
47
  }));
@@ -1,5 +1,5 @@
1
- import { ref as k, onUnmounted as T, watch as C, defineComponent as E, mergeModels as y, useModel as H, computed as p, createBlock as I, openBlock as w, unref as X, withCtx as _, createElementVNode as j, createElementBlock as M, Fragment as D, renderList as L, toDisplayString as Y, renderSlot as O } from "vue";
2
- import { w as S, a as b, o as $ } from "../index5.js";
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 b } from "vue";
2
+ import { w as S, b as M, o as $ } from "../index5.js";
3
3
  import { B as A } from "../index6.js";
4
4
  import { u as F } from "../utils.js";
5
5
  import { _ as G } from "../_plugin-vue_export-helper.js";
@@ -55,7 +55,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
55
55
  ), S(
56
56
  [V, q],
57
57
  ([n, i]) => {
58
- const e = b(o), m = b(t), u = e == null ? void 0 : e.getBoundingClientRect(), h = m == null ? void 0 : m.getBoundingClientRect();
58
+ const e = M(o), m = M(t), u = e == null ? void 0 : e.getBoundingClientRect(), h = m == null ? void 0 : m.getBoundingClientRect();
59
59
  if (u && P({ x: n, y: i }, u)) {
60
60
  r.value = "trigger";
61
61
  return;
@@ -74,7 +74,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
74
74
  ), f;
75
75
  }, J = { class: "tr-dropdown-menu__list" }, K = ["onClick"], Q = /* @__PURE__ */ E({
76
76
  __name: "index",
77
- props: /* @__PURE__ */ y({
77
+ props: /* @__PURE__ */ b({
78
78
  appendTo: {},
79
79
  items: {},
80
80
  show: { type: Boolean },
@@ -83,7 +83,7 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
83
83
  show: { type: Boolean, default: !1 },
84
84
  showModifiers: {}
85
85
  }),
86
- emits: /* @__PURE__ */ y(["item-click", "click-outside"], ["update:show"]),
86
+ emits: /* @__PURE__ */ b(["item-click", "click-outside"], ["update:show"]),
87
87
  setup(o, { expose: t, emit: g }) {
88
88
  const l = o, d = g, f = H(o, "show"), r = p({
89
89
  get: () => l.trigger === "manual" ? l.show : f.value,
@@ -133,12 +133,12 @@ const P = (o, t) => o.x >= t.left && o.x <= t.right && o.y >= t.top && o.y <= t.
133
133
  "prevent-overflow": !0,
134
134
  "trigger-events": { onClick: n }
135
135
  }, {
136
- trigger: _(() => [
136
+ trigger: y(() => [
137
137
  O(e.$slots, "trigger", {}, void 0, !0)
138
138
  ]),
139
- content: _(() => [
139
+ content: y(() => [
140
140
  j("ul", J, [
141
- (w(!0), M(D, null, L(l.items, (u) => (w(), M("li", {
141
+ (w(!0), _(D, null, L(l.items, (u) => (w(), _("li", {
142
142
  class: "tr-dropdown-menu__list-item",
143
143
  key: u.id,
144
144
  onClick: (h) => i(u)
@@ -1,4 +1,4 @@
1
- import { defineComponent as V, ref as g, computed as P, onMounted as z, watch as O, createElementBlock as r, openBlock as t, createCommentVNode as k, Fragment as A, renderList as w, toDisplayString as y, createVNode as b, unref as l, nextTick as q, createElementVNode as d, createBlock as _, withCtx as f, createTextVNode as U, resolveDynamicComponent as x } from "vue";
1
+ import { defineComponent as V, ref as g, computed as P, onMounted as z, watch as O, openBlock as t, createElementBlock as r, Fragment as A, renderList as w, toDisplayString as y, createCommentVNode as k, createVNode as b, unref as l, nextTick as q, createElementVNode as d, createBlock as _, withCtx as f, createTextVNode as U, resolveDynamicComponent as x } from "vue";
2
2
  import { IconArrowUp as T, IconArrowDown as N, IconDislike as j, IconLike as H, IconRefresh as J, IconCopy as K } from "@opentiny/tiny-robot-svgs";
3
3
  import { TinyButton as G } from "@opentiny/vue";
4
4
  import $, { ActionGroupItem as D } from "../action-group/index.js";
@@ -1,4 +1,4 @@
1
- import { defineComponent as q, mergeModels as E, useModel as G, watch as g, ref as i, computed as $, createElementBlock as a, openBlock as l, createElementVNode as I, Fragment as C, renderList as D, createCommentVNode as _, normalizeClass as x, createBlock as B, resolveDynamicComponent as b, toDisplayString as S, nextTick as H } from "vue";
1
+ import { defineComponent as q, useModel as G, watch as g, ref as i, computed as E, openBlock as l, createElementBlock as a, Fragment as I, renderList as $, normalizeClass as C, createBlock as x, resolveDynamicComponent as B, toDisplayString as D, createCommentVNode as _, createElementVNode as b, mergeModels as S, nextTick as H } from "vue";
2
2
  import { IconArrowDown as X } from "@opentiny/tiny-robot-svgs";
3
3
  import { e as j, o as J } from "../index5.js";
4
4
  import { _ as K } from "../_plugin-vue_export-helper.js";
@@ -7,7 +7,7 @@ const P = ["onClick"], Q = {
7
7
  class: "tr-flow-layout__item-label"
8
8
  }, U = { class: "tr-flow-layout__dropdown-wrapper" }, Y = ["onClick"], Z = { class: "tr-flow-layout__item-label" }, ee = /* @__PURE__ */ q({
9
9
  __name: "index",
10
- props: /* @__PURE__ */ E({
10
+ props: /* @__PURE__ */ S({
11
11
  items: {},
12
12
  selected: {},
13
13
  linesLimit: { default: Number.MAX_SAFE_INTEGER },
@@ -17,7 +17,7 @@ const P = ["onClick"], Q = {
17
17
  selected: {},
18
18
  selectedModifiers: {}
19
19
  }),
20
- emits: /* @__PURE__ */ E(["item-click"], ["update:selected"]),
20
+ emits: /* @__PURE__ */ S(["item-click"], ["update:selected"]),
21
21
  setup(d, { emit: A }) {
22
22
  const n = d, u = G(d, "selected");
23
23
  g(
@@ -47,7 +47,7 @@ const P = ["onClick"], Q = {
47
47
  g(W, (t) => {
48
48
  t > 0 && L();
49
49
  });
50
- const z = $(() => s.value !== null ? n.items.slice(s.value) : []), O = $(() => s.value === null ? !1 : n.items.findIndex((o) => o.id === u.value) >= s.value), R = (t) => {
50
+ const z = E(() => s.value !== null ? n.items.slice(s.value) : []), O = E(() => s.value === null ? !1 : n.items.findIndex((o) => o.id === u.value) >= s.value), R = (t) => {
51
51
  u.value = t, c.value = !1, F("item-click", t);
52
52
  }, V = () => {
53
53
  n.showMoreTrigger === "click" && (c.value = !c.value);
@@ -65,33 +65,33 @@ const P = ["onClick"], Q = {
65
65
  ref_key: "containerRef",
66
66
  ref: w
67
67
  }, [
68
- (l(!0), a(C, null, D(n.items, (e, f) => (l(), a(C, {
68
+ (l(!0), a(I, null, $(n.items, (e, f) => (l(), a(I, {
69
69
  key: e.id
70
70
  }, [
71
71
  s.value === null || f < s.value ? (l(), a("button", {
72
72
  key: 0,
73
- class: x(["tr-flow-layout__item", { "icon-only": !e.label }, { selected: e.id === u.value }]),
73
+ class: C(["tr-flow-layout__item", { "icon-only": !e.label }, { selected: e.id === u.value }]),
74
74
  ref_for: !0,
75
75
  ref: (r) => N(r, f),
76
76
  onClick: (r) => R(e.id)
77
77
  }, [
78
- (l(), B(b(e.icon), { class: "tr-flow-layout__item-icon" })),
79
- e.label ? (l(), a("span", Q, S(e.label), 1)) : _("", !0)
78
+ (l(), x(B(e.icon), { class: "tr-flow-layout__item-icon" })),
79
+ e.label ? (l(), a("span", Q, D(e.label), 1)) : _("", !0)
80
80
  ], 10, P)) : _("", !0)
81
81
  ], 64))), 128)),
82
- I("div", U, [
82
+ b("div", U, [
83
83
  m.value ? _("", !0) : (l(), a("button", {
84
84
  key: 0,
85
- class: x(["tr-flow-layout__item", "icon-only", { selected: O.value }]),
85
+ class: C(["tr-flow-layout__item", "icon-only", { selected: O.value }]),
86
86
  ref_key: "moreButtonRef",
87
87
  ref: y,
88
88
  onClick: V,
89
89
  onMouseenter: o[0] || (o[0] = (e) => v(!0)),
90
90
  onMouseleave: o[1] || (o[1] = (e) => v(!1))
91
91
  }, [
92
- (l(), B(b(n.moreIcon), { class: "tr-flow-layout__item-icon" }))
92
+ (l(), x(B(n.moreIcon), { class: "tr-flow-layout__item-icon" }))
93
93
  ], 34)),
94
- I("div", {
94
+ b("div", {
95
95
  class: "tr-flow-layout__dropdown-container",
96
96
  onMouseenter: o[2] || (o[2] = (e) => v(!0)),
97
97
  onMouseleave: o[3] || (o[3] = (e) => v(!1))
@@ -102,13 +102,13 @@ const P = ["onClick"], Q = {
102
102
  ref_key: "dropDownRef",
103
103
  ref: k
104
104
  }, [
105
- (l(!0), a(C, null, D(z.value, (e) => (l(), a("button", {
106
- class: x(["tr-flow-layout__dropdown_item", { selected: e.id === u.value }]),
105
+ (l(!0), a(I, null, $(z.value, (e) => (l(), a("button", {
106
+ class: C(["tr-flow-layout__dropdown_item", { selected: e.id === u.value }]),
107
107
  key: e.id,
108
108
  onClick: (f) => R(e.id)
109
109
  }, [
110
- (l(), B(b(e.icon), { class: "tr-flow-layout__item-icon" })),
111
- I("span", Z, S(e.label), 1)
110
+ (l(), x(B(e.icon), { class: "tr-flow-layout__item-icon" })),
111
+ b("span", Z, D(e.label), 1)
112
112
  ], 10, Y))), 128))
113
113
  ], 512)) : _("", !0)
114
114
  ], 32)
@@ -1,4 +1,4 @@
1
- import { defineComponent as r, computed as a, createElementBlock as u, openBlock as l, normalizeStyle as c, normalizeClass as p, createBlock as m, resolveDynamicComponent as d } from "vue";
1
+ import { defineComponent as r, computed as a, openBlock as l, createElementBlock as u, normalizeStyle as c, normalizeClass as p, createBlock as m, resolveDynamicComponent as d } from "vue";
2
2
  import { t as i } from "../utils.js";
3
3
  import { _ as f } from "../_plugin-vue_export-helper.js";
4
4
  const _ = /* @__PURE__ */ r({
package/dist/index.d.ts CHANGED
@@ -39,14 +39,14 @@ declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, Comp
39
39
  key: string;
40
40
  value: unknown;
41
41
  messageIndex: number;
42
- contentIndex?: number;
42
+ contentIndex: number;
43
43
  }) => any;
44
44
  }, string, PublicProps, Readonly<BubbleProps> & Readonly<{
45
45
  "onState-change"?: ((payload: {
46
46
  key: string;
47
47
  value: unknown;
48
48
  messageIndex: number;
49
- contentIndex?: number;
49
+ contentIndex: number;
50
50
  }) => any) | undefined;
51
51
  }>, {
52
52
  placement: "start" | "end";
@@ -286,14 +286,14 @@ scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
286
286
  key: string;
287
287
  value: unknown;
288
288
  messageIndex: number;
289
- contentIndex?: number;
289
+ contentIndex: number;
290
290
  }) => any;
291
291
  }, string, PublicProps, Readonly<BubbleListProps> & Readonly<{
292
292
  "onState-change"?: ((payload: {
293
293
  key: string;
294
294
  value: unknown;
295
295
  messageIndex: number;
296
- contentIndex?: number;
296
+ contentIndex: number;
297
297
  }) => any) | undefined;
298
298
  }>, {
299
299
  contentResolver: (message: BubbleMessage) => ChatMessageContent | undefined;
@@ -2057,11 +2057,11 @@ export declare type BubbleBoxRendererMatch = {
2057
2057
  /**
2058
2058
  * 匹配函数,用于判断是否应该使用此渲染器
2059
2059
  * @param messages - 消息数组
2060
- * @param resolvedContents - 每个消息经过 contentResolver 解析后的内容数组,与 messages 一一对应
2061
- * @param contentIndex - 内容索引,用于指定要渲染的内容项(当 content 为数组时)
2060
+ * @param content - 要渲染的内容项。仅在 `split` 模式下(contentIndex 为数字)才会传入;为当前消息(messages[0])经过 `contentResolver` 解析后的内容;`messages[0].content` 一定是一个数组,`content` 则为对应索引的内容项,即 `messages[0].content[contentIndex]`;当 contentIndex 为 undefined 时,content 也为 undefined
2061
+ * @param contentIndex - 内容索引,用于指定要渲染的内容项。仅在 split 模式下才会传入(为数字),此时 messages 数组长度为 1
2062
2062
  * @returns 如果匹配则返回 true,否则返回 false
2063
2063
  */
2064
- find: (messages: BubbleMessage[], resolvedContents: BubbleMessage['content'][], contentIndex: number | undefined) => boolean;
2064
+ find: (messages: BubbleMessage[], content: ChatMessageContentItem | undefined, contentIndex: number | undefined) => boolean;
2065
2065
  renderer: Component<BubbleBoxRendererProps>;
2066
2066
  priority?: number;
2067
2067
  attributes?: Record<string, string>;
@@ -2073,11 +2073,11 @@ export declare type BubbleContentRendererMatch = {
2073
2073
  /**
2074
2074
  * 匹配函数,用于判断是否应该使用此渲染器
2075
2075
  * @param message - 消息对象
2076
- * @param resolvedContent - 消息经过 contentResolver 解析后的内容
2077
- * @param contentIndex - 内容索引,用于指定要渲染的内容项(当 content 为数组时)
2076
+ * @param content - 要渲染的内容项。为当前消息经过 contentResolver 解析并统一化后的内容项:若解析结果为数组,则取对应索引的内容项(由 contentIndex 指定);若为字符串,则转为 { type: 'text', text: string }。统一化为 ChatMessageContentItem 对象格式
2077
+ * @param contentIndex - 内容索引。由 contentResolver 的解析结果为数组时使用。若 contentResolver 解析结果为字符串,content 会转换为对象,此时 contentIndex 为 0
2078
2078
  * @returns 如果匹配则返回 true,否则返回 false
2079
2079
  */
2080
- find: (message: BubbleMessage, resolvedContent: BubbleMessage['content'], contentIndex: number | undefined) => boolean;
2080
+ find: (message: BubbleMessage, content: ChatMessageContentItem, contentIndex: number) => boolean;
2081
2081
  renderer: Component<BubbleContentRendererProps>;
2082
2082
  priority?: number;
2083
2083
  attributes?: Record<string, string>;
@@ -2085,7 +2085,7 @@ export declare type BubbleContentRendererMatch = {
2085
2085
 
2086
2086
  export declare type BubbleContentRendererProps<T extends ChatMessageContent = ChatMessageContent, S extends Record<string, unknown> = Record<string, unknown>> = {
2087
2087
  message: BubbleMessage<T, S>;
2088
- contentIndex?: number;
2088
+ contentIndex: number;
2089
2089
  };
2090
2090
 
2091
2091
  /**
@@ -2233,46 +2233,46 @@ export declare const BubbleRenderers: {
2233
2233
  });
2234
2234
  Image: DefineComponent< {
2235
2235
  message: BubbleMessage<ChatMessageContentItem[], Record<string, unknown>>;
2236
- contentIndex?: number;
2236
+ contentIndex: number;
2237
2237
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
2238
2238
  message: BubbleMessage<ChatMessageContentItem[], Record<string, unknown>>;
2239
- contentIndex?: number;
2239
+ contentIndex: number;
2240
2240
  }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLImageElement>;
2241
2241
  Loading: DefineComponent< {
2242
2242
  message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
2243
- contentIndex?: number;
2243
+ contentIndex: number;
2244
2244
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
2245
2245
  message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
2246
- contentIndex?: number;
2246
+ contentIndex: number;
2247
2247
  }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2248
2248
  Markdown: DefineComponent< {
2249
2249
  message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
2250
- contentIndex?: number;
2250
+ contentIndex: number;
2251
2251
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
2252
2252
  message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
2253
- contentIndex?: number;
2253
+ contentIndex: number;
2254
2254
  }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2255
2255
  Reasoning: DefineComponent< {
2256
2256
  message: BubbleMessage<ChatMessageContent, {
2257
2257
  thinking?: boolean;
2258
2258
  open?: boolean;
2259
2259
  }>;
2260
- contentIndex?: number;
2260
+ contentIndex: number;
2261
2261
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
2262
2262
  message: BubbleMessage<ChatMessageContent, {
2263
2263
  thinking?: boolean;
2264
2264
  open?: boolean;
2265
2265
  }>;
2266
- contentIndex?: number;
2266
+ contentIndex: number;
2267
2267
  }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
2268
2268
  detailRef: HTMLParagraphElement;
2269
2269
  }, any>;
2270
2270
  Text: DefineComponent< {
2271
2271
  message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
2272
- contentIndex?: number;
2272
+ contentIndex: number;
2273
2273
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
2274
2274
  message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
2275
- contentIndex?: number;
2275
+ contentIndex: number;
2276
2276
  }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2277
2277
  Tool: DefineComponent<BubbleContentRendererProps<ChatMessageContent, {
2278
2278
  toolCall?: Record<string, {
@@ -2293,17 +2293,17 @@ export declare const BubbleRenderers: {
2293
2293
  }, HTMLDivElement>;
2294
2294
  ToolRole: DefineComponent< {
2295
2295
  message: BubbleMessage<string, Record<string, unknown>>;
2296
- contentIndex?: number;
2296
+ contentIndex: number;
2297
2297
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
2298
2298
  message: BubbleMessage<string, Record<string, unknown>>;
2299
- contentIndex?: number;
2299
+ contentIndex: number;
2300
2300
  }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2301
2301
  Tools: DefineComponent< {
2302
2302
  message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
2303
- contentIndex?: number;
2303
+ contentIndex: number;
2304
2304
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
2305
2305
  message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
2306
- contentIndex?: number;
2306
+ contentIndex: number;
2307
2307
  }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2308
2308
  };
2309
2309
 
@@ -3476,13 +3476,12 @@ export declare function useBubbleBoxRenderer(messages: MaybeRefOrGetter<BubbleMe
3476
3476
  attributes?: Record<string, string>;
3477
3477
  }>;
3478
3478
 
3479
- export declare function useBubbleContentRenderer(message: MaybeRefOrGetter<BubbleMessage>, contentIndex?: number): ComputedRef<Component>;
3479
+ export declare function useBubbleContentRenderer(message: MaybeRefOrGetter<BubbleMessage>, contentIndex: number): ComputedRef<Component>;
3480
3480
 
3481
3481
  export declare function useBubbleStateChangeFn(): (key: string, _value: unknown) => void;
3482
3482
 
3483
3483
  export declare const useMessageContent: <T extends ChatMessageContent = ChatMessageContent>(props: Readonly<BubbleContentRendererProps<T>>) => {
3484
- content: ComputedRef<ChatMessageContent | undefined>;
3485
- contentItem: ComputedRef<ChatMessageContentItem | undefined>;
3484
+ content: ComputedRef<ChatMessageContentItem>;
3486
3485
  contentText: ComputedRef<string>;
3487
3486
  };
3488
3487
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import z from "./attachments/index.js";
2
2
  import { B as b, a as x, b as S } from "./index2.js";
3
- import { c as ve, d as fe, j as _e, u as ge, e as he, f as De, g as Te, h as Fe, i as ze } from "./index2.js";
3
+ import { c as ve, d as fe, u as _e, e as ge, f as he, g as De, h as Te, i as Fe, j as ze } from "./index2.js";
4
4
  import E from "./container/index.js";
5
5
  import P from "./conversations/index.js";
6
6
  import B from "./drag-overlay/index.js";