@matechat/core 1.11.1 → 1.12.0-alpha

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 (42) hide show
  1. package/Attachment/Attachment.vue.d.ts +8 -8
  2. package/Attachment/attachment-types.d.ts +3 -35
  3. package/Attachment/index.css +1 -1
  4. package/Attachment/index.js +43 -45
  5. package/Bubble/index.css +1 -1
  6. package/Bubble/index.js +276 -146
  7. package/Bubble/useBubbleFoundation.d.ts +9 -0
  8. package/FileList/index.js +1 -1
  9. package/Header/index.css +1 -1
  10. package/Header/index.js +11 -11
  11. package/Input/components/EditableBlock.vue.d.ts +2 -2
  12. package/Input/index.css +1 -1
  13. package/Input/index.js +82 -57
  14. package/Introduction/index.css +1 -1
  15. package/Introduction/index.js +129 -39
  16. package/Layout/index.js +6 -6
  17. package/List/index.js +5 -5
  18. package/MarkdownCard/MDCardParser.d.ts +0 -10
  19. package/MarkdownCard/MermaidService-yeLQUW_e.js +142 -0
  20. package/MarkdownCard/index.css +1 -1
  21. package/MarkdownCard/index.js +542 -361
  22. package/MarkdownCard/mdCard.types.d.ts +2 -29
  23. package/MarkdownCard/mdCard.vue.d.ts +2 -2
  24. package/MarkdownCard/useMarkdownCardFoundation.d.ts +8 -0
  25. package/Mention/Mention.vue.d.ts +12 -3
  26. package/Mention/index.css +1 -1
  27. package/Mention/index.js +364 -110
  28. package/Mention/mention-types.d.ts +6 -4
  29. package/Mention/use-mention.d.ts +7 -0
  30. package/Prompt/index.js +1 -1
  31. package/Toolbar/index.css +1 -1
  32. package/Toolbar/index.d.ts +2 -1
  33. package/Toolbar/index.js +189 -198
  34. package/Toolbar/toolbar.types.d.ts +2 -26
  35. package/index.d.ts +2 -2
  36. package/mate-chat.js +2 -1
  37. package/package.json +1 -1
  38. package/Attachment/uploader.d.ts +0 -11
  39. package/MarkdownCard/MDCardService.d.ts +0 -14
  40. package/MarkdownCard/MermaidService-B6BcjbW_.js +0 -127
  41. package/MarkdownCard/MermaidService.d.ts +0 -22
  42. package/Mention/const.d.ts +0 -4
package/Toolbar/index.js CHANGED
@@ -1,7 +1,24 @@
1
1
  import "./index.css";
2
- import { defineComponent as v, ref as _, createElementBlock as L, openBlock as c, createStaticVNode as R, createElementVNode as s, watch as I, normalizeClass as b, useSlots as z, reactive as K, normalizeStyle as P, createCommentVNode as N, Fragment as F, renderList as T, renderSlot as x, createBlock as H, unref as O, resolveDynamicComponent as V } from "vue";
3
- var w = /* @__PURE__ */ ((e) => (e.COPY = "copy", e.LIKE = "like", e.DISLIKE = "dislike", e.REFRESH = "refresh", e.SHARE = "share", e.DELETE = "delete", e))(w || {});
4
- const Y = {
2
+ import { defineComponent as v, ref as k, openBlock as C, createElementBlock as c, createStaticVNode as P, createElementVNode as r, watch as M, normalizeClass as E, useSlots as T, reactive as z, normalizeStyle as F, createCommentVNode as N, Fragment as O, renderList as V, renderSlot as y, unref as H, createBlock as U, resolveDynamicComponent as G } from "vue";
3
+ function Y(e) {
4
+ return typeof e != "string" ? Promise.reject() : navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(e).then(() => {
5
+ }).catch((s) => x(e)) : x(e);
6
+ }
7
+ function x(e) {
8
+ return new Promise((s, n) => {
9
+ const t = document.createElement("textarea");
10
+ t.value = e, t.style.position = "fixed", t.style.top = "-9999px", t.style.left = "-9999px", t.style.opacity = "0", t.style.zIndex = "-1000", t.setAttribute("readonly", ""), document.body.appendChild(t);
11
+ try {
12
+ t.select(), t.setSelectionRange(0, t.value.length), document.execCommand("copy") ? s(null) : n();
13
+ } catch {
14
+ n();
15
+ } finally {
16
+ document.body.removeChild(t);
17
+ }
18
+ });
19
+ }
20
+ var d = /* @__PURE__ */ ((e) => (e.COPY = "copy", e.LIKE = "like", e.DISLIKE = "dislike", e.REFRESH = "refresh", e.SHARE = "share", e.DELETE = "delete", e))(d || {});
21
+ const j = 0, f = 16, q = {
5
22
  // 操作项列表
6
23
  items: {
7
24
  type: Array,
@@ -9,30 +26,21 @@ const Y = {
9
26
  },
10
27
  iconSize: {
11
28
  type: Number,
12
- default: 16
29
+ default: f
13
30
  },
14
31
  // 操作项之间的间隔
15
32
  gap: {
16
33
  type: Number,
17
- default: 0
18
- }
19
- }, w1 = {
20
- size: {
21
- type: Number,
22
- default: 16
23
- },
24
- configData: {
25
- type: Object,
26
- required: !0
34
+ default: j
27
35
  }
28
- }, g = {
36
+ }, u = {
29
37
  width: {
30
38
  type: Number,
31
- default: 16
39
+ default: f
32
40
  },
33
41
  height: {
34
42
  type: Number,
35
- default: 16
43
+ default: f
36
44
  },
37
45
  // 点赞/点踩 是否默认激活
38
46
  isActive: {
@@ -44,58 +52,41 @@ const Y = {
44
52
  type: String,
45
53
  default: ""
46
54
  }
47
- }, j = { class: "mc-action-item" }, q = ["width", "height"], G = ["width", "height"], J = /* @__PURE__ */ v({
55
+ }, J = { class: "mc-action-item" }, Q = ["width", "height"], W = ["width", "height"], X = /* @__PURE__ */ v({
48
56
  __name: "CopyIcon",
49
- props: g,
57
+ props: u,
50
58
  setup(e) {
51
- const C = e, n = _(!1), h = async () => {
52
- n.value = !0, setTimeout(() => {
59
+ const s = e, n = k(!1), t = async () => {
60
+ setTimeout(() => {
53
61
  n.value = !1;
54
62
  }, 1500);
55
63
  try {
56
- await l(C.text);
64
+ await Y(s.text), n.value = !0;
57
65
  } catch {
58
66
  }
59
67
  };
60
- function l(t) {
61
- return typeof t != "string" ? Promise.reject() : navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(t).then(() => {
62
- }).catch((r) => p(t)) : p(t);
63
- }
64
- function p(t) {
65
- return new Promise((r, m) => {
66
- const d = document.createElement("textarea");
67
- d.value = t, d.style.position = "fixed", d.style.top = "-9999px", d.style.left = "-9999px", d.style.opacity = "0", d.style.zIndex = "-1000", d.setAttribute("readonly", ""), document.body.appendChild(d);
68
- try {
69
- d.select(), d.setSelectionRange(0, d.value.length), document.execCommand("copy") ? r(null) : m();
70
- } catch {
71
- m();
72
- } finally {
73
- document.body.removeChild(d);
74
- }
75
- });
76
- }
77
- return (t, r) => (c(), L("div", j, [
78
- n.value ? (c(), L("svg", {
68
+ return (i, a) => (C(), c("div", J, [
69
+ n.value ? (C(), c("svg", {
79
70
  key: 0,
80
- width: t.width,
81
- height: t.height,
71
+ width: i.width,
72
+ height: i.height,
82
73
  viewBox: "0 0 16 16",
83
74
  version: "1.1",
84
75
  xmlns: "http://www.w3.org/2000/svg",
85
76
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
86
- }, r[0] || (r[0] = [
87
- R('<desc data-v-ba532642>Created with Sketch.</desc><defs data-v-ba532642><polygon id="path-1" points="6.53553391 9.77817459 12.1923882 4.12132034 13.6066017 5.53553391 6.53553391 12.6066017 3 9.07106781 4.41421356 7.65685425 6.53553391 9.77817459" data-v-ba532642></polygon></defs><g id="status/whiteBG/correct" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" data-v-ba532642><mask id="mask-2" fill="white" data-v-ba532642><use xlink:href="#path-1" data-v-ba532642></use></mask><use id="Mask" fill="currentColor" xlink:href="#path-1" data-v-ba532642></use></g>', 3)
88
- ]), 8, q)) : (c(), L("svg", {
77
+ }, a[0] || (a[0] = [
78
+ P('<desc data-v-de82714b>Created with Sketch.</desc><defs data-v-de82714b><polygon id="path-1" points="6.53553391 9.77817459 12.1923882 4.12132034 13.6066017 5.53553391 6.53553391 12.6066017 3 9.07106781 4.41421356 7.65685425 6.53553391 9.77817459" data-v-de82714b></polygon></defs><g id="status/whiteBG/correct" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" data-v-de82714b><mask id="mask-2" fill="white" data-v-de82714b><use xlink:href="#path-1" data-v-de82714b></use></mask><use id="Mask" fill="currentColor" xlink:href="#path-1" data-v-de82714b></use></g>', 3)
79
+ ]), 8, Q)) : (C(), c("svg", {
89
80
  key: 1,
90
- width: t.width,
91
- height: t.height,
81
+ width: i.width,
82
+ height: i.height,
92
83
  viewBox: "0 0 16 16",
93
84
  version: "1.1",
94
85
  xmlns: "http://www.w3.org/2000/svg",
95
86
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
96
- onClick: h
97
- }, r[1] || (r[1] = [
98
- s(
87
+ onClick: t
88
+ }, a[1] || (a[1] = [
89
+ r(
99
90
  "g",
100
91
  {
101
92
  id: "页面-1",
@@ -105,15 +96,15 @@ const Y = {
105
96
  "fill-rule": "evenodd"
106
97
  },
107
98
  [
108
- s("g", {
99
+ r("g", {
109
100
  id: "API-starter-图标入库",
110
101
  transform: "translate(-592.000000, -204.000000)"
111
102
  }, [
112
- s("g", {
103
+ r("g", {
113
104
  id: "方格备份-16",
114
105
  transform: "translate(560.000000, 180.000000)"
115
106
  }, [
116
- s("text", {
107
+ r("text", {
117
108
  id: "图标",
118
109
  "font-family": "PingFangSC-Regular, PingFang SC",
119
110
  "font-size": "12",
@@ -121,13 +112,13 @@ const Y = {
121
112
  "line-spacing": "16",
122
113
  fill: "#71757F"
123
114
  }, [
124
- s("tspan", {
115
+ r("tspan", {
125
116
  x: "27.136",
126
117
  y: "61"
127
118
  }, "复制")
128
119
  ])
129
120
  ]),
130
- s("path", {
121
+ r("path", {
131
122
  d: "M604.5,206 C605.279696,206 605.920449,206.594888 605.993133,207.35554 L606,207.5 L606,214.5 C606,215.279696 605.405112,215.920449 604.64446,215.993133 L604.5,216 L604,216 L604,216.5 C604,217.279696 603.405112,217.920449 602.64446,217.993133 L602.5,218 L595.5,218 C594.671573,218 594,217.328427 594,216.5 L594,216.5 L594,209.5 C594,208.671573 594.671573,208 595.5,208 L595.5,208 L596,208 L596,207.5 C596,206.720304 596.594888,206.079551 597.35554,206.006867 L597.5,206 L604.5,206 Z M602.5,209 L595.5,209 C595.223858,209 595,209.223858 595,209.5 L595,209.5 L595,216.5 C595,216.776142 595.223858,217 595.5,217 L595.5,217 L602.5,217 C602.776142,217 603,216.776142 603,216.5 L603,216.5 L603,209.5 C603,209.223858 602.776142,209 602.5,209 L602.5,209 Z M604.5,207 L597.5,207 C597.25454,207 597.050392,207.176875 597.008056,207.410124 L597,207.5 L597,208 L602.5,208 C603.279696,208 603.920449,208.594888 603.993133,209.35554 L604,209.5 L604,215 L604.5,215 C604.74546,215 604.949608,214.823125 604.991944,214.589876 L605,214.5 L605,207.5 C605,207.25454 604.823125,207.050392 604.589876,207.008056 L604.5,207 Z",
132
123
  id: "形状结合",
133
124
  fill: "currentColor",
@@ -138,28 +129,28 @@ const Y = {
138
129
  -1
139
130
  /* HOISTED */
140
131
  )
141
- ]), 8, G))
132
+ ]), 8, W))
142
133
  ]));
143
134
  }
144
- }), u = (e, C) => {
135
+ }), p = (e, s) => {
145
136
  const n = e.__vccOpts || e;
146
- for (const [h, l] of C)
147
- n[h] = l;
137
+ for (const [t, i] of s)
138
+ n[t] = i;
148
139
  return n;
149
- }, S = /* @__PURE__ */ u(J, [["__scopeId", "data-v-ba532642"]]), Q = { class: "mc-action-item" }, U = ["width", "height"], W = /* @__PURE__ */ v({
140
+ }, S = /* @__PURE__ */ p(X, [["__scopeId", "data-v-de82714b"]]), e1 = { class: "mc-action-item" }, t1 = ["width", "height"], i1 = /* @__PURE__ */ v({
150
141
  __name: "DeleteIcon",
151
- props: g,
142
+ props: u,
152
143
  setup(e) {
153
- return (C, n) => (c(), L("div", Q, [
154
- (c(), L("svg", {
155
- width: C.width,
156
- height: C.height,
144
+ return (s, n) => (C(), c("div", e1, [
145
+ (C(), c("svg", {
146
+ width: s.width,
147
+ height: s.height,
157
148
  viewBox: "0 0 16 16",
158
149
  version: "1.1",
159
150
  xmlns: "http://www.w3.org/2000/svg",
160
151
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
161
152
  }, n[0] || (n[0] = [
162
- s(
153
+ r(
163
154
  "g",
164
155
  {
165
156
  id: "codehub-delete-op",
@@ -169,7 +160,7 @@ const Y = {
169
160
  "fill-rule": "evenodd"
170
161
  },
171
162
  [
172
- s("path", {
163
+ r("path", {
173
164
  d: "M12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,13 C13,14.0543618 12.1841222,14.9181651 11.1492623,14.9945143 L11,15 L5,15 C3.9456382,15 3.08183488,14.1841222 3.00548574,13.1492623 L3,13 L3,5.5 C3,5.22385763 3.22385763,5 3.5,5 C3.77614237,5 4,5.22385763 4,5.5 L4,13 C4,13.5128358 4.38604019,13.9355072 4.88337887,13.9932723 L5,14 L11,14 C11.5128358,14 11.9355072,13.6139598 11.9932723,13.1166211 L12,13 L12,5.5 C12,5.22385763 12.2238576,5 12.5,5 Z M6.53333333,6 C6.79515721,6 7.0129156,6.17687516 7.05807395,6.41012437 L7.06666667,6.5 L7.06666667,11.5 C7.06666667,11.7761424 6.8278852,12 6.53333333,12 C6.27150945,12 6.05375107,11.8231248 6.00859271,11.5898756 L6,11.5 L6,6.5 C6,6.22385763 6.23878147,6 6.53333333,6 Z M9.53333333,6 C9.79515721,6 10.0129156,6.17687516 10.058074,6.41012437 L10.0666667,6.5 L10.0666667,11.5 C10.0666667,11.7761424 9.8278852,12 9.53333333,12 C9.27150945,12 9.05375107,11.8231248 9.00859271,11.5898756 L9,11.5 L9,6.5 C9,6.22385763 9.23878147,6 9.53333333,6 Z M10,1 C10.5128358,1 10.9355072,1.38604019 10.9932723,1.88337887 L11,2 L11,3 L14.5,3 C14.7761424,3 15,3.22385763 15,3.5 C15,3.77614237 14.7761424,4 14.5,4 L1.5,4 C1.22385763,4 1,3.77614237 1,3.5 C1,3.22385763 1.22385763,3 1.5,3 L5,3 L5,2 C5,1.48716416 5.38604019,1.06449284 5.88337887,1.00672773 L6,1 L10,1 Z M10,2 L6,2 L6,3 L10,3 L10,2 Z",
174
165
  fill: "currentColor"
175
166
  })
@@ -177,41 +168,41 @@ const Y = {
177
168
  -1
178
169
  /* HOISTED */
179
170
  )
180
- ]), 8, U))
171
+ ]), 8, t1))
181
172
  ]));
182
173
  }
183
- }), E = /* @__PURE__ */ u(W, [["__scopeId", "data-v-bbbbce5a"]]), X = ["width", "height"], e1 = ["width", "height"], t1 = /* @__PURE__ */ v({
174
+ }), A = /* @__PURE__ */ p(i1, [["__scopeId", "data-v-85a0d662"]]), n1 = ["width", "height"], o1 = ["width", "height"], s1 = /* @__PURE__ */ v({
184
175
  __name: "DislikeIcon",
185
- props: g,
176
+ props: u,
186
177
  emits: ["activeChange"],
187
- setup(e, { emit: C }) {
188
- const n = C, h = e, l = _(h.isActive);
189
- I(
190
- () => h.isActive,
178
+ setup(e, { emit: s }) {
179
+ const n = s, t = e, i = k(t.isActive);
180
+ M(
181
+ () => t.isActive,
191
182
  () => {
192
- l.value = h.isActive;
183
+ i.value = t.isActive;
193
184
  }
194
185
  );
195
- const p = () => {
196
- l.value = !l.value, n("activeChange", l.value);
186
+ const a = () => {
187
+ i.value = !i.value, n("activeChange", i.value);
197
188
  };
198
- return (t, r) => (c(), L(
189
+ return (h, w) => (C(), c(
199
190
  "div",
200
191
  {
201
- class: b(["mc-action-item", { "mc-action-item-active": l.value }]),
202
- onClick: p
192
+ class: E(["mc-action-item", { "mc-action-item-active": i.value }]),
193
+ onClick: a
203
194
  },
204
195
  [
205
- l.value ? (c(), L("svg", {
196
+ i.value ? (C(), c("svg", {
206
197
  key: 0,
207
- width: t.width,
208
- height: t.height,
198
+ width: h.width,
199
+ height: h.height,
209
200
  viewBox: "0 0 16 16",
210
201
  version: "1.1",
211
202
  xmlns: "http://www.w3.org/2000/svg",
212
203
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
213
- }, r[0] || (r[0] = [
214
- s(
204
+ }, w[0] || (w[0] = [
205
+ r(
215
206
  "path",
216
207
  {
217
208
  id: "矢量 1",
@@ -223,16 +214,16 @@ const Y = {
223
214
  -1
224
215
  /* HOISTED */
225
216
  )
226
- ]), 8, X)) : (c(), L("svg", {
217
+ ]), 8, n1)) : (C(), c("svg", {
227
218
  key: 1,
228
- width: t.width,
229
- height: t.height,
219
+ width: h.width,
220
+ height: h.height,
230
221
  viewBox: "0 0 16 16",
231
222
  version: "1.1",
232
223
  xmlns: "http://www.w3.org/2000/svg",
233
224
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
234
- }, r[1] || (r[1] = [
235
- s(
225
+ }, w[1] || (w[1] = [
226
+ r(
236
227
  "g",
237
228
  {
238
229
  id: "Dislike",
@@ -242,7 +233,7 @@ const Y = {
242
233
  "fill-rule": "evenodd"
243
234
  },
244
235
  [
245
- s("path", {
236
+ r("path", {
246
237
  d: "M11.55205,1 C13.14165,1 14.16285,1.458308 14.49075,2.448728 C14.81075,3.415528 15.17575,5.009158 15.29175,6.292968 L15.29175,6.292968 L15.30985,6.514648 L15.33085,6.925358 C15.38255,8.656368 14.91455,9.740718 13.65015,9.740718 L13.65015,9.740718 L9.55591,9.741028 L9.60108,9.881038 C10.02005,11.217788 10.18555,12.247488 10.08695,12.992388 C9.89815,14.419688 8.75318,15.633388 7.67652,15.272788 L7.67652,15.272788 L7.55713,15.226188 C7.03589,14.992888 6.86426,14.595988 6.70117,13.653488 L6.70117,13.653488 L6.54492,12.721688 L6.4978,12.506488 C6.4231,12.182088 6.33277,11.910688 6.21558,11.674688 C5.8313,10.900988 5.28443,10.233788 4.57056,9.670048 L4.57056,9.670048 L2.60156,9.670288 C1.71704,9.670288 1,8.953248 1,8.068728 L1,8.068728 L1,2.605228 C1,1.720708 1.71704,1.003601 2.60156,1.003601 L2.60156,1.003601 L4.83325,1 Z M11.55205,1.999998 L5.33301,1.999998 L5.33301,9.002988 L5.41699,9.071468 C6.13672,9.686458 6.70239,10.406788 7.11109,11.230088 C7.23584,11.480988 7.33399,11.750888 7.4148,12.050988 L7.50098,12.409088 L7.56079,12.715988 L7.69336,13.519388 C7.69946,13.553388 7.70557,13.586088 7.71167,13.617588 L7.76441,13.867488 C7.83374,14.157988 7.8982,14.283188 7.96558,14.313488 C8.30152,14.463788 8.97461,13.775988 9.09571,12.861188 C9.17749,12.243388 9.00025,11.240388 8.55029,9.880678 C8.51196,9.764348 8.49854,9.641728 8.51099,9.520328 C8.55908,9.045288 8.98218,8.699098 9.45679,8.742858 L13.65015,8.740718 C14.18895,8.740718 14.43655,7.941288 14.29595,6.382938 C14.18755,5.183288 13.83915,3.662168 13.54155,2.762938 L13.50585,2.674618 C13.30125,2.245118 12.68435,1.999998 11.55205,1.999998 Z M4.33277,2.003598 L2.60156,2.003598 C2.26929,2.003598 2,2.272948 2,2.605228 L2,2.605228 L2,8.068668 L2.00781,8.166258 C2.05445,8.452148 2.30249,8.670288 2.60156,8.670288 L2.60156,8.670288 L4.33277,8.670598 L4.33277,2.003598 Z",
247
238
  id: "形状结合",
248
239
  fill: "currentColor"
@@ -251,51 +242,51 @@ const Y = {
251
242
  -1
252
243
  /* HOISTED */
253
244
  )
254
- ]), 8, e1))
245
+ ]), 8, o1))
255
246
  ],
256
247
  2
257
248
  /* CLASS */
258
249
  ));
259
250
  }
260
- }), Z = /* @__PURE__ */ u(t1, [["__scopeId", "data-v-08c9b641"]]), i1 = ["width", "height"], n1 = ["width", "height"], o1 = /* @__PURE__ */ v({
251
+ }), Z = /* @__PURE__ */ p(s1, [["__scopeId", "data-v-d4542e71"]]), l1 = ["width", "height"], r1 = ["width", "height"], C1 = /* @__PURE__ */ v({
261
252
  __name: "LikeIcon",
262
- props: g,
253
+ props: u,
263
254
  emits: ["activeChange"],
264
- setup(e, { emit: C }) {
265
- const n = C, h = e, l = _(h.isActive);
266
- I(
267
- () => h.isActive,
255
+ setup(e, { emit: s }) {
256
+ const n = s, t = e, i = k(t.isActive);
257
+ M(
258
+ () => t.isActive,
268
259
  () => {
269
- l.value = h.isActive;
260
+ i.value = t.isActive;
270
261
  }
271
262
  );
272
- const p = () => {
273
- l.value = !l.value, n("activeChange", l.value);
263
+ const a = () => {
264
+ i.value = !i.value, n("activeChange", i.value);
274
265
  };
275
- return (t, r) => (c(), L(
266
+ return (h, w) => (C(), c(
276
267
  "div",
277
268
  {
278
- class: b(["mc-action-item", { "mc-action-item-active": l.value }]),
279
- onClick: p
269
+ class: E(["mc-action-item", { "mc-action-item-active": i.value }]),
270
+ onClick: a
280
271
  },
281
272
  [
282
- l.value ? (c(), L("svg", {
273
+ i.value ? (C(), c("svg", {
283
274
  key: 0,
284
- width: t.width,
285
- height: t.height,
275
+ width: h.width,
276
+ height: h.height,
286
277
  viewBox: "0 0 16 16",
287
278
  version: "1.1",
288
279
  xmlns: "http://www.w3.org/2000/svg",
289
280
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
290
- }, r[0] || (r[0] = [
291
- s(
281
+ }, w[0] || (w[0] = [
282
+ r(
292
283
  "desc",
293
284
  null,
294
285
  "Created with Sketch.",
295
286
  -1
296
287
  /* HOISTED */
297
288
  ),
298
- s(
289
+ r(
299
290
  "path",
300
291
  {
301
292
  id: "矢量 1",
@@ -307,15 +298,15 @@ const Y = {
307
298
  -1
308
299
  /* HOISTED */
309
300
  )
310
- ]), 8, i1)) : (c(), L("svg", {
301
+ ]), 8, l1)) : (C(), c("svg", {
311
302
  key: 1,
312
- width: t.width,
313
- height: t.height,
303
+ width: h.width,
304
+ height: h.height,
314
305
  viewBox: "0 0 16 16",
315
306
  xmlns: "http://www.w3.org/2000/svg",
316
307
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
317
- }, r[1] || (r[1] = [
318
- s(
308
+ }, w[1] || (w[1] = [
309
+ r(
319
310
  "g",
320
311
  {
321
312
  id: "页面-1",
@@ -325,7 +316,7 @@ const Y = {
325
316
  "fill-rule": "evenodd"
326
317
  },
327
318
  [
328
- s("path", {
319
+ r("path", {
329
320
  d: "M11.55205,1 C13.14165,1 14.16285,1.458308 14.49075,2.448728 C14.81075,3.415528 15.17575,5.009158 15.29175,6.292968 L15.29175,6.292968 L15.30985,6.514648 L15.33085,6.925358 C15.38255,8.656368 14.91455,9.740718 13.65015,9.740718 L13.65015,9.740718 L9.55591,9.741028 L9.60108,9.881038 C10.02005,11.217788 10.18555,12.247488 10.08695,12.992388 C9.89815,14.419688 8.75318,15.633388 7.67652,15.272788 L7.67652,15.272788 L7.55713,15.226188 C7.03589,14.992888 6.86426,14.595988 6.70117,13.653488 L6.70117,13.653488 L6.54492,12.721688 L6.4978,12.506488 C6.4231,12.182088 6.33277,11.910688 6.21558,11.674688 C5.8313,10.900988 5.28443,10.233788 4.57056,9.670048 L4.57056,9.670048 L2.60156,9.670288 C1.71704,9.670288 1,8.953248 1,8.068728 L1,8.068728 L1,2.605228 C1,1.720708 1.71704,1.003601 2.60156,1.003601 L2.60156,1.003601 L4.83325,1 Z M11.55205,1.999998 L5.33301,1.999998 L5.33301,9.002988 L5.41699,9.071468 L5.6796615,9.30702243 C6.27568484,9.86814941 6.7534775,10.5097005 7.11109,11.230088 C7.23584,11.480988 7.33399,11.750888 7.4148,12.050988 L7.4148,12.050988 L7.50098,12.409088 L7.56079,12.715988 L7.69336,13.519388 L7.702515,13.5694255 L7.702515,13.5694255 L7.71167,13.617588 L7.76441,13.867488 L7.79384741,13.9820728 C7.85221673,14.1918227 7.90782571,14.2875166 7.96558,14.313488 C8.30152,14.463788 8.97461,13.775988 9.09571,12.861188 C9.17749,12.243388 9.00025,11.240388 8.55029,9.880678 C8.51196,9.764348 8.49854,9.641728 8.51099,9.520328 C8.55908,9.045288 8.98218,8.699098 9.45679,8.742858 L9.45679,8.742858 L13.65015,8.740718 L13.7287739,8.73472734 C14.2127395,8.6588777 14.42952,7.8633705 14.29595,6.382938 C14.18755,5.183288 13.83915,3.662168 13.54155,2.762938 L13.54155,2.762938 L13.50585,2.674618 L13.4594021,2.5911944 C13.216706,2.21352476 12.6088633,1.999998 11.55205,1.999998 L11.55205,1.999998 Z M4.33277,2.003598 L2.60156,2.003598 C2.26929,2.003598 2,2.272948 2,2.605228 L2,2.605228 L2,8.068668 L2.00781,8.166258 C2.05445,8.452148 2.30249,8.670288 2.60156,8.670288 L2.60156,8.670288 L4.33277,8.670598 L4.33277,2.003598 Z",
330
321
  id: "dislike",
331
322
  fill: "currentColor",
@@ -335,26 +326,26 @@ const Y = {
335
326
  -1
336
327
  /* HOISTED */
337
328
  )
338
- ]), 8, n1))
329
+ ]), 8, r1))
339
330
  ],
340
331
  2
341
332
  /* CLASS */
342
333
  ));
343
334
  }
344
- }), $ = /* @__PURE__ */ u(o1, [["__scopeId", "data-v-5bfb7d70"]]), s1 = { class: "mc-action-item" }, l1 = ["width", "height"], r1 = /* @__PURE__ */ v({
335
+ }), b = /* @__PURE__ */ p(C1, [["__scopeId", "data-v-804650d8"]]), c1 = { class: "mc-action-item" }, L1 = ["width", "height"], a1 = /* @__PURE__ */ v({
345
336
  __name: "RefreshIcon",
346
- props: g,
337
+ props: u,
347
338
  setup(e) {
348
- return (C, n) => (c(), L("div", s1, [
349
- (c(), L("svg", {
339
+ return (s, n) => (C(), c("div", c1, [
340
+ (C(), c("svg", {
350
341
  xmlns: "http://www.w3.org/2000/svg",
351
342
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
352
- width: C.width,
353
- height: C.height,
343
+ width: s.width,
344
+ height: s.height,
354
345
  viewBox: "0 0 16 16",
355
346
  version: "1.1"
356
347
  }, n[0] || (n[0] = [
357
- s(
348
+ r(
358
349
  "g",
359
350
  {
360
351
  id: "Re-generate",
@@ -364,7 +355,7 @@ const Y = {
364
355
  "fill-rule": "evenodd"
365
356
  },
366
357
  [
367
- s("path", {
358
+ r("path", {
368
359
  d: "M12.7143179,3.28587475 C13.981136,4.55339434 14.6666667,6.24406622 14.6666667,7.99999694 L14.6661599,8.02257215 C14.6655102,8.03703705 14.6642357,8.05147912 14.6623363,8.06585443 L14.6666667,7.99999694 C14.6666667,8.0371769 14.6626086,8.07340903 14.6549111,8.10827457 C14.6517992,8.1222052 14.6480389,8.13632563 14.6436512,8.15029154 C14.6390061,8.1651613 14.6336213,8.17980434 14.6275902,8.19410809 C14.6231995,8.20453649 14.6185439,8.21463293 14.613534,8.22459678 C14.6049463,8.24162018 14.5952425,8.2583947 14.5846307,8.27451859 C14.5792264,8.282804 14.5735765,8.29085725 14.5676615,8.2987751 C14.5571418,8.31280391 14.5460319,8.32617172 14.5342667,8.33892584 C14.5300122,8.343554 14.5251791,8.34859129 14.5202201,8.35355033 L14.5076464,8.36569453 C14.4940828,8.37834683 14.4798146,8.39025348 14.4649071,8.4013492 L14.5202201,8.35355033 C14.4937641,8.38000631 14.465081,8.40287777 14.4347743,8.42216473 C14.4224394,8.42996083 14.4098046,8.43724836 14.3968374,8.44398448 C14.3832773,8.45105337 14.3694473,8.45743098 14.3554103,8.46314429 C14.3412925,8.46891455 14.3266036,8.47413114 14.3116174,8.47866321 C14.2992824,8.48234275 14.2871467,8.4855024 14.2749295,8.48819956 C14.2606866,8.49139588 14.2459756,8.4939711 14.2310588,8.49588898 C14.2147923,8.49795142 14.1986607,8.49923861 14.1825093,8.49974745 L14.1666667,8.49999694 L14.1666667,8.49999694 L14.1394006,8.49925755 C14.1253117,8.49849283 14.1112491,8.49713493 14.0972533,8.49518384 L14.1666667,8.49999694 C14.1273209,8.49999694 14.0890366,8.49545228 14.05231,8.48685924 C14.0384692,8.48357481 14.0248075,8.47976105 14.0112962,8.4753569 C13.9958192,8.47034085 13.9804276,8.46445184 13.9654221,8.45784679 C13.9544183,8.45302561 13.9434536,8.44772707 13.9326545,8.4420051 C13.9165024,8.43339464 13.9009385,8.4240044 13.8859565,8.41382189 C13.8807017,8.41031248 13.8749119,8.40620635 13.8691922,8.40196243 L13.8550466,8.39103641 C13.8474863,8.38500359 13.8401047,8.3787561 13.8329113,8.37230316 L13.8131133,8.35355033 L12.6151133,7.15555033 C12.4198511,6.96028819 12.4198511,6.6437057 12.6151133,6.44844355 C12.7926243,6.27093251 13.0704001,6.25479514 13.2661411,6.40003145 L13.3222201,6.44844355 L13.498767,6.62598997 C13.2544588,5.64420827 12.7478288,4.73400934 12.0071133,3.99288367 C9.79437542,1.78014581 6.20562458,1.78014581 3.99288672,3.99288367 C1.78014071,6.20562968 1.78014071,9.79375159 3.99288672,12.0071102 C6.20562458,14.2198481 9.79437542,14.2198481 12.0071133,12.0071102 C12.2023754,11.8118481 12.5189579,11.8118481 12.7142201,12.0071102 C12.9094822,12.2023724 12.9094822,12.5189549 12.7142201,12.714217 C10.1109579,15.3174791 5.88904209,15.3174791 3.28573101,12.7141681 C0.682525952,10.1102423 0.682525952,5.88903088 3.28577994,3.28577688 C5.88904209,0.682514739 10.1109579,0.682514739 12.7143179,3.28587475 Z",
369
360
  id: "形状结合",
370
361
  fill: "currentColor"
@@ -373,30 +364,30 @@ const Y = {
373
364
  -1
374
365
  /* HOISTED */
375
366
  )
376
- ]), 8, l1))
367
+ ]), 8, L1))
377
368
  ]));
378
369
  }
379
- }), A = /* @__PURE__ */ u(r1, [["__scopeId", "data-v-9870e7a6"]]), c1 = { class: "mc-action-item" }, C1 = ["width", "height"], L1 = /* @__PURE__ */ v({
370
+ }), $ = /* @__PURE__ */ p(a1, [["__scopeId", "data-v-4a2ea0ec"]]), d1 = { class: "mc-action-item" }, h1 = ["width", "height"], w1 = /* @__PURE__ */ v({
380
371
  __name: "ShareIcon",
381
- props: g,
372
+ props: u,
382
373
  setup(e) {
383
- return (C, n) => (c(), L("div", c1, [
384
- (c(), L("svg", {
374
+ return (s, n) => (C(), c("div", d1, [
375
+ (C(), c("svg", {
385
376
  xmlns: "http://www.w3.org/2000/svg",
386
377
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
387
- width: C.width,
388
- height: C.height,
378
+ width: s.width,
379
+ height: s.height,
389
380
  viewBox: "0 0 16 16",
390
381
  version: "1.1"
391
382
  }, n[0] || (n[0] = [
392
- s(
383
+ r(
393
384
  "desc",
394
385
  null,
395
386
  "Created with Sketch.",
396
387
  -1
397
388
  /* HOISTED */
398
389
  ),
399
- s(
390
+ r(
400
391
  "g",
401
392
  {
402
393
  id: "释义图标/分享",
@@ -406,12 +397,12 @@ const Y = {
406
397
  "fill-rule": "evenodd"
407
398
  },
408
399
  [
409
- s("g", {
400
+ r("g", {
410
401
  id: "分享",
411
402
  fill: "currentColor",
412
403
  "fill-rule": "nonzero"
413
404
  }, [
414
- s("path", {
405
+ r("path", {
415
406
  d: "M6.3804718,9.82599637 C5.83206631,10.5398588 4.96976903,11 4,11 C2.34314575,11 1,9.65685425 1,8 C1,6.34314575 2.34314575,5 4,5 C4.96976903,5 5.83206631,5.46014123 6.3804718,6.17400363 L10.1006387,4.20450353 C10.0351367,3.98105658 10,3.7446316 10,3.5 C10,2.11928813 11.1192881,1 12.5,1 C13.8807119,1 15,2.11928813 15,3.5 C15,4.88071187 13.8807119,6 12.5,6 C11.7223166,6 11.0275695,5.64490757 10.5690501,5.08801416 L6.84895235,7.0574777 C6.94695785,7.35387727 7,7.67074431 7,8 C7,8.32925569 6.94695785,8.64612273 6.84895235,8.9425223 L10.5690501,10.9119858 C11.0275695,10.3550924 11.7223166,10 12.5,10 C13.8807119,10 15,11.1192881 15,12.5 C15,13.8807119 13.8807119,15 12.5,15 C11.1192881,15 10,13.8807119 10,12.5 C10,12.2553684 10.0351367,12.0189434 10.1006387,11.7954965 L6.3804718,9.82599637 L6.3804718,9.82599637 Z M4,10 C5.1045695,10 6,9.1045695 6,8 C6,6.8954305 5.1045695,6 4,6 C2.8954305,6 2,6.8954305 2,8 C2,9.1045695 2.8954305,10 4,10 Z M12.5,14 C13.3284271,14 14,13.3284271 14,12.5 C14,11.6715729 13.3284271,11 12.5,11 C11.6715729,11 11,11.6715729 11,12.5 C11,13.3284271 11.6715729,14 12.5,14 Z M12.5,5 C13.3284271,5 14,4.32842712 14,3.5 C14,2.67157288 13.3284271,2 12.5,2 C11.6715729,2 11,2.67157288 11,3.5 C11,4.32842712 11.6715729,5 12.5,5 Z",
416
407
  id: "形状"
417
408
  })
@@ -420,77 +411,77 @@ const Y = {
420
411
  -1
421
412
  /* HOISTED */
422
413
  )
423
- ]), 8, C1))
414
+ ]), 8, h1))
424
415
  ]));
425
416
  }
426
- }), D = /* @__PURE__ */ u(L1, [["__scopeId", "data-v-2a9dee06"]]), a1 = ["title", "onClick"], d1 = /* @__PURE__ */ v({
417
+ }), D = /* @__PURE__ */ p(w1, [["__scopeId", "data-v-558a7278"]]), v1 = ["title", "onClick"], p1 = /* @__PURE__ */ v({
427
418
  __name: "Toolbar",
428
- props: Y,
419
+ props: q,
429
420
  emits: ["onClick"],
430
- setup(e, { emit: C }) {
431
- var y;
432
- const n = C, h = e, l = z(), p = K((y = h.items) == null ? void 0 : y.map((i) => ({ ...i }))), t = {
433
- [w.COPY]: S,
434
- [w.LIKE]: $,
435
- [w.DISLIKE]: Z,
436
- [w.REFRESH]: A,
437
- [w.SHARE]: D,
438
- [w.DELETE]: E
439
- }, r = () => {
440
- const i = p.find(
441
- (o) => o.icon === w.LIKE
442
- ), a = p.find(
443
- (o) => o.icon === w.DISLIKE
421
+ setup(e, { emit: s }) {
422
+ var _;
423
+ const n = s, t = e, i = T(), a = z((_ = t.items) == null ? void 0 : _.map((o) => ({ ...o }))), h = {
424
+ [d.COPY]: S,
425
+ [d.LIKE]: b,
426
+ [d.DISLIKE]: Z,
427
+ [d.REFRESH]: $,
428
+ [d.SHARE]: D,
429
+ [d.DELETE]: A
430
+ }, w = () => {
431
+ const o = a.find(
432
+ (l) => l.icon === d.LIKE
433
+ ), L = a.find(
434
+ (l) => l.icon === d.DISLIKE
444
435
  );
445
- i != null && i.isActive && a && (a.isActive = !1);
446
- }, m = () => {
447
- const i = p.find(
448
- (a) => a.icon === w.DISLIKE
436
+ o != null && o.isActive && L && (L.isActive = !1);
437
+ }, B = () => {
438
+ const o = a.find(
439
+ (L) => L.icon === d.DISLIKE
449
440
  );
450
- i && (i.isActive = !1);
451
- }, d = () => {
452
- const i = p.find(
453
- (a) => a.icon === w.LIKE
441
+ o && (o.isActive = !1);
442
+ }, R = () => {
443
+ const o = a.find(
444
+ (L) => L.icon === d.LIKE
454
445
  );
455
- i && (i.isActive = !1);
456
- }, k = (i, a) => {
457
- var o;
458
- a.icon === w.LIKE ? m() : a.icon === w.DISLIKE && d(), (o = a.onClick) == null || o.call(a, a, i), n("onClick", a, i);
459
- }, B = (i, a) => {
460
- a.isActive = i;
446
+ o && (o.isActive = !1);
447
+ }, m = (o, L) => {
448
+ var l;
449
+ L.icon === d.LIKE ? B() : L.icon === d.DISLIKE && R(), (l = L.onClick) == null || l.call(L, L, o), n("onClick", L, o);
450
+ }, K = (o, L) => {
451
+ L.isActive = o;
461
452
  };
462
- return r(), (i, a) => (c(), L(
453
+ return w(), (o, L) => (C(), c(
463
454
  "div",
464
455
  {
465
456
  class: "mc-actions",
466
- style: P({ gap: `${i.gap}px` })
457
+ style: F({ gap: `${o.gap}px` })
467
458
  },
468
459
  [
469
460
  N(" 显示的操作项 "),
470
- (c(!0), L(
471
- F,
461
+ (C(!0), c(
462
+ O,
472
463
  null,
473
- T(p, (o) => x(i.$slots, o.key, {
474
- key: o.key,
475
- actionData: o
464
+ V(a, (l) => y(o.$slots, l.key, {
465
+ key: l.key,
466
+ actionData: l
476
467
  }, () => [
477
- O(l)[`${o.key}-icon`] ? (c(), L("div", {
468
+ H(i)[`${l.key}-icon`] ? (C(), c("div", {
478
469
  key: 0,
479
470
  class: "mc-action-item",
480
- title: o.label,
481
- onClick: (f) => k(f, o)
471
+ title: l.label,
472
+ onClick: (g) => m(g, l)
482
473
  }, [
483
- x(i.$slots, `${o.key}-icon`, { actionData: o }, void 0, !0)
484
- ], 8, a1)) : (c(), H(V(t[o.icon]), {
474
+ y(o.$slots, `${l.key}-icon`, { actionData: l }, void 0, !0)
475
+ ], 8, v1)) : (C(), U(G(h[l.icon]), {
485
476
  key: 1,
486
- "is-active": o.isActive,
487
- width: i.iconSize ?? 16,
488
- height: i.iconSize ?? 16,
489
- text: o.text,
490
- title: o.label,
477
+ "is-active": l.isActive,
478
+ width: o.iconSize ?? 16,
479
+ height: o.iconSize ?? 16,
480
+ text: l.text,
481
+ title: l.label,
491
482
  class: "mc-action-item",
492
- onActiveChange: (f) => B(f, o),
493
- onClick: (f) => k(f, o)
483
+ onActiveChange: (g) => K(g, l),
484
+ onClick: (g) => m(g, l)
494
485
  }, null, 40, ["is-active", "width", "height", "text", "title", "onActiveChange", "onClick"]))
495
486
  ], !0)),
496
487
  128
@@ -501,19 +492,19 @@ const Y = {
501
492
  /* STYLE */
502
493
  ));
503
494
  }
504
- }), M = /* @__PURE__ */ u(d1, [["__scopeId", "data-v-b407530e"]]);
505
- M.install = (e) => {
506
- e.component("McToolbar", M), e.component("McCopyIcon", S), e.component("McDeleteIcon", E), e.component("McLikeIcon", $), e.component("McDislikeIcon", Z), e.component("McRefreshIcon", A), e.component("McShareIcon", D);
495
+ }), I = /* @__PURE__ */ p(p1, [["__scopeId", "data-v-ad8c9e9b"]]);
496
+ I.install = (e) => {
497
+ e.component("McToolbar", I), e.component("McCopyIcon", S), e.component("McDeleteIcon", A), e.component("McLikeIcon", b), e.component("McDislikeIcon", Z), e.component("McRefreshIcon", $), e.component("McShareIcon", D);
507
498
  };
508
499
  export {
509
- w1 as ActionItemProps,
510
- g as IconComponentProps,
500
+ u as IconComponentProps,
511
501
  S as McCopyIcon,
512
- E as McDeleteIcon,
513
- $ as McLikeIcon,
514
- A as McRefreshIcon,
502
+ A as McDeleteIcon,
503
+ Z as McDislikeIcon,
504
+ b as McLikeIcon,
505
+ $ as McRefreshIcon,
515
506
  D as McShareIcon,
516
- M as McToolbar,
517
- w as ToolbarAction,
518
- Y as ToolbarProps
507
+ I as McToolbar,
508
+ d as ToolbarAction,
509
+ q as ToolbarProps
519
510
  };