@opentiny/tiny-robot 0.3.0-rc.0 → 0.3.0-rc.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.
@@ -360,9 +360,9 @@ const Ce = ["data-file-type"], Fe = {
360
360
  alt: r.file.name,
361
361
  class: "tr-file-card__picture-img"
362
362
  }, null, 8, xe),
363
- m.value ? (o(), d("div", Pe, _[4] || (_[4] = [
363
+ m.value ? (o(), d("div", Pe, [..._[4] || (_[4] = [
364
364
  p("span", { class: "tr-file-card__picture-overlay-text" }, "预览", -1)
365
- ]))) : k("", !0),
365
+ ])])) : k("", !0),
366
366
  c.value || e.value ? (o(), d("div", Me, [
367
367
  c.value ? (o(), d("div", Re, [
368
368
  F(f(j)),
@@ -426,9 +426,9 @@ const Ce = ["data-file-type"], Fe = {
426
426
  }, x(y.label), 11, qe))
427
427
  ]))), 128))
428
428
  ])) : k("", !0)
429
- ])) : c.value ? (o(), d("div", Ke, _[5] || (_[5] = [
429
+ ])) : c.value ? (o(), d("div", Ke, [..._[5] || (_[5] = [
430
430
  p("span", { class: "tr-file-card__uploading-text" }, "上传中...", -1)
431
- ]))) : e.value ? (o(), d("div", Ge, [
431
+ ])])) : e.value ? (o(), d("div", Ge, [
432
432
  _[6] || (_[6] = p("span", { class: "tr-file-card__error-text" }, "上传失败", -1)),
433
433
  p("button", {
434
434
  class: "tr-file-card__retry-btn",
@@ -3817,13 +3817,13 @@ const hi = {
3817
3817
  }, () => [
3818
3818
  Z("div", {
3819
3819
  class: Mu(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
3820
- }, d[0] || (d[0] = [
3820
+ }, [...d[0] || (d[0] = [
3821
3821
  Z("img", {
3822
3822
  src: Dn,
3823
3823
  alt: "loading",
3824
3824
  class: "tr-bubble__loading"
3825
3825
  }, null, -1)
3826
- ]), 2)
3826
+ ])], 2)
3827
3827
  ], !0) : (S(), $("div", {
3828
3828
  key: 1,
3829
3829
  class: Mu(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
@@ -1,60 +1,64 @@
1
- import { defineComponent as v, useCssVars as m, useModel as c, computed as _, createElementBlock as w, openBlock as g, createElementVNode as o, renderSlot as r, createVNode as u, unref as l } from "vue";
2
- import { IconCancelFullScreen as h, IconFullScreen as C, IconClose as $ } from "@opentiny/tiny-robot-svgs";
3
- import d from "../icon-button/index.js";
4
- import { _ as I } from "../_plugin-vue_export-helper.js";
5
- const b = { class: "tr-container" }, z = { class: "tr-container__header" }, B = { class: "tr-container__header-operations" }, S = { class: "tr-container__footer" }, k = /* @__PURE__ */ v({
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";
2
+ import { IconCancelFullScreen as $, IconFullScreen as k, IconClose as M } from "@opentiny/tiny-robot-svgs";
3
+ import f from "../icon-button/index.js";
4
+ import { _ as E } from "../_plugin-vue_export-helper.js";
5
+ const F = { class: "tr-container__header" }, N = { class: "tr-container__title" }, T = { class: "tr-container__header-operations" }, b = { class: "tr-container__footer" }, D = /* @__PURE__ */ g({
6
6
  __name: "index",
7
- props: {
7
+ props: /* @__PURE__ */ c({
8
+ show: { type: Boolean },
9
+ fullscreen: { type: Boolean },
10
+ title: { default: "OpenTiny NEXT" }
11
+ }, {
8
12
  show: { type: Boolean, required: !0 },
9
13
  showModifiers: {},
10
14
  fullscreen: { type: Boolean },
11
15
  fullscreenModifiers: {}
12
- },
13
- emits: ["update:show", "update:fullscreen"],
14
- setup(t) {
15
- m((n) => ({
16
- "12c6880d": s.value ? "0" : "unset",
17
- dbe5f3c0: s.value ? "unset" : "var(--tr-container-width)",
18
- "676af261": a.value ? "var(--tr-z-index-fixed)" : "-1",
19
- "19e9bbe2": a.value ? "1" : "0"
20
- }));
21
- const a = c(t, "show"), s = c(t, "fullscreen"), f = _(() => s.value ? h : C);
22
- return (n, e) => (g(), w("div", b, [
23
- e[3] || (e[3] = o("div", { class: "tr-container__dragging-bar-wrapper" }, [
24
- o("div", { class: "tr-container__dragging-bar" })
16
+ }),
17
+ emits: /* @__PURE__ */ c(["close"], ["update:show", "update:fullscreen"]),
18
+ setup(o, { emit: p }) {
19
+ const m = o, a = u(o, "show"), t = u(o, "fullscreen"), v = w(() => t.value ? $ : k), _ = p, h = () => {
20
+ a.value = !1, _("close");
21
+ };
22
+ return (n, s) => C((S(), B("div", {
23
+ class: y(["tr-container", { fullscreen: t.value }])
24
+ }, [
25
+ s[1] || (s[1] = e("div", { class: "tr-container__dragging-bar-wrapper" }, [
26
+ e("div", { class: "tr-container__dragging-bar" })
25
27
  ], -1)),
26
- o("div", z, [
27
- r(n.$slots, "title", {}, () => [
28
- e[2] || (e[2] = o("h3", { class: "tr-container__title" }, "OpenTiny NEXT", -1))
28
+ e("div", F, [
29
+ l(n.$slots, "title", {}, () => [
30
+ e("h3", N, I(m.title), 1)
29
31
  ], !0),
30
- o("div", B, [
31
- r(n.$slots, "operations", {}, void 0, !0),
32
- u(l(d), {
32
+ e("div", T, [
33
+ l(n.$slots, "operations", {}, void 0, !0),
34
+ d(i(f), {
33
35
  size: "28",
34
36
  "svg-size": "20",
35
- icon: f.value,
36
- onClick: e[0] || (e[0] = (p) => n.$emit("update:fullscreen", !s.value))
37
+ icon: v.value,
38
+ onClick: s[0] || (s[0] = (q) => t.value = !t.value)
37
39
  }, null, 8, ["icon"]),
38
- u(l(d), {
40
+ d(i(f), {
39
41
  size: "28",
40
42
  "svg-size": "20",
41
- icon: l($),
42
- onClick: e[1] || (e[1] = (p) => n.$emit("update:show", !1))
43
+ icon: i(M),
44
+ onClick: h
43
45
  }, null, 8, ["icon"])
44
46
  ])
45
47
  ]),
46
- r(n.$slots, "default", {}, void 0, !0),
47
- o("div", S, [
48
- r(n.$slots, "footer", {}, void 0, !0)
48
+ l(n.$slots, "default", {}, void 0, !0),
49
+ e("div", b, [
50
+ l(n.$slots, "footer", {}, void 0, !0)
49
51
  ])
50
- ]));
52
+ ], 2)), [
53
+ [z, a.value]
54
+ ]);
51
55
  }
52
- }), i = /* @__PURE__ */ I(k, [["__scopeId", "data-v-3fa99833"]]);
53
- i.name = "TrContainer";
54
- const y = function(t) {
55
- t.component(i.name, i);
56
+ }), r = /* @__PURE__ */ E(D, [["__scopeId", "data-v-d064089c"]]);
57
+ r.name = "TrContainer";
58
+ const V = function(o) {
59
+ o.component(r.name, r);
56
60
  };
57
- i.install = y;
61
+ r.install = V;
58
62
  export {
59
- i as default
63
+ r as default
60
64
  };
@@ -11,10 +11,10 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
11
11
  fullscreen: { type: Boolean }
12
12
  },
13
13
  setup(r) {
14
- const a = r, { top: d, left: c, width: p, height: C } = M(() => a.dragTarget), f = y(() => !a.isDragging || !a.dragTarget ? { display: "none" } : {
14
+ const a = r, { top: c, left: d, width: p, height: C } = M(() => a.dragTarget), f = y(() => !a.isDragging || !a.dragTarget ? { display: "none" } : {
15
15
  position: "fixed",
16
- top: `${d.value}px`,
17
- left: `${c.value}px`,
16
+ top: `${c.value}px`,
17
+ left: `${d.value}px`,
18
18
  width: `${p.value}px`,
19
19
  height: `${C.value}px`
20
20
  });
@@ -22,7 +22,7 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
22
22
  default: m(() => [
23
23
  e.isDragging ? (t(), o("div", {
24
24
  key: 0,
25
- class: w(["tr-drag-overlay", { "tr-drag-overlay--fullscreen": e.fullscreen }]),
25
+ class: w(["tr-drag-overlay", { fullscreen: e.fullscreen }]),
26
26
  style: _(f.value)
27
27
  }, [
28
28
  x(e.$slots, "overlay", { isDragging: e.isDragging }, () => [
@@ -46,7 +46,7 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
46
46
  _: 3
47
47
  }));
48
48
  }
49
- }), i = /* @__PURE__ */ Z(z, [["__scopeId", "data-v-92021e6b"]]);
49
+ }), i = /* @__PURE__ */ Z(z, [["__scopeId", "data-v-93553cc8"]]);
50
50
  i.name = "TrDragOverlay";
51
51
  const N = function(r) {
52
52
  r.component(i.name, i);
@@ -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 _, createBlock as d, 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, 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";
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";
@@ -82,9 +82,9 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
82
82
  return (n, s) => {
83
83
  var o, a, v, S, F, M, R, B;
84
84
  return t(), r("div", te, [
85
- _("div", oe, [
86
- _("div", se, [
87
- (o = e.operations) != null && o.length ? (t(), d(l($), {
85
+ d("div", oe, [
86
+ d("div", se, [
87
+ (o = e.operations) != null && o.length ? (t(), _(l($), {
88
88
  key: 0,
89
89
  "max-num": e.operationsLimit,
90
90
  "drop-down-show-label-only": !0,
@@ -99,15 +99,14 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
99
99
  class: "tr-feedback__operations-more-btn"
100
100
  }, {
101
101
  default: f(() => [
102
- s[0] || (s[0] = _("span", null, "更多", -1)),
102
+ s[0] || (s[0] = d("span", null, "更多", -1)),
103
103
  b(l(N))
104
104
  ]),
105
- _: 1,
106
- __: [0]
105
+ _: 1
107
106
  })
108
107
  ]),
109
108
  default: f(() => [
110
- (t(!0), r(A, null, w(e.operations, (i) => (t(), d(l(D), {
109
+ (t(!0), r(A, null, w(e.operations, (i) => (t(), _(l(D), {
111
110
  key: i.name,
112
111
  name: i.name,
113
112
  label: i.label
@@ -129,32 +128,32 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
129
128
  ]),
130
129
  _: 1
131
130
  }, 8, ["max-num"])) : (a = e.sources) != null && a.length ? (t(), r("div", ne, [
132
- _("span", {
131
+ d("span", {
133
132
  class: "tr-feedback__source",
134
133
  onClick: u
135
134
  }, [
136
- _("span", null, y((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
137
- (t(), d(x(p.value ? l(T) : l(N))))
135
+ d("span", null, y((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
136
+ (t(), _(x(p.value ? l(T) : l(N))))
138
137
  ])
139
138
  ])) : k("", !0)
140
139
  ]),
141
- _("div", le, [
140
+ d("div", le, [
142
141
  b(l($), {
143
142
  "max-num": e.actionsLimit,
144
143
  "show-tooltip": !0,
145
144
  onItemClick: E
146
145
  }, {
147
146
  default: f(() => [
148
- (t(!0), r(A, null, w(e.actions, (i) => (t(), d(l(D), {
147
+ (t(!0), r(A, null, w(e.actions, (i) => (t(), _(l(D), {
149
148
  key: i.name,
150
149
  name: i.name,
151
150
  label: i.label
152
151
  }, {
153
152
  default: f(() => [
154
- typeof i.icon == "string" ? (t(), d(l(Q), {
153
+ typeof i.icon == "string" ? (t(), _(l(Q), {
155
154
  key: 0,
156
155
  icon: I[i.icon]
157
- }, null, 8, ["icon"])) : (t(), d(x(i.icon), { key: 1 }))
156
+ }, null, 8, ["icon"])) : (t(), _(x(i.icon), { key: 1 }))
158
157
  ]),
159
158
  _: 2
160
159
  }, 1032, ["name", "label"]))), 128))
@@ -165,15 +164,15 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
165
164
  ]),
166
165
  (S = e.operations) != null && S.length && ((F = e.sources) != null && F.length) || p.value && e.sources ? (t(), r("div", re, [
167
166
  (M = e.operations) != null && M.length && ((R = e.sources) != null && R.length) ? (t(), r("div", ae, [
168
- _("span", {
167
+ d("span", {
169
168
  class: "tr-feedback__source",
170
169
  onClick: u
171
170
  }, [
172
- _("span", null, y((B = e.sources) == null ? void 0 : B.length) + "条来源", 1),
173
- (t(), d(x(p.value ? l(T) : l(N))))
171
+ d("span", null, y((B = e.sources) == null ? void 0 : B.length) + "条来源", 1),
172
+ (t(), _(x(p.value ? l(T) : l(N))))
174
173
  ])
175
174
  ])) : k("", !0),
176
- p.value && e.sources ? (t(), d(l(ee), {
175
+ p.value && e.sources ? (t(), _(l(ee), {
177
176
  key: 1,
178
177
  sources: e.sources,
179
178
  "lines-limit": e.sourcesLinesLimit