@matechat/core 1.11.0 → 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 (45) 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 +322 -186
  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 +12 -11
  11. package/Input/components/EditableBlock.vue.d.ts +2 -2
  12. package/Input/index.css +1 -1
  13. package/Input/index.js +699 -108
  14. package/Introduction/index.css +1 -1
  15. package/Introduction/index.js +138 -38
  16. package/Layout/index.js +7 -6
  17. package/List/index.css +1 -1
  18. package/List/index.js +54 -51
  19. package/Locale/index.js +85 -35
  20. package/MarkdownCard/MDCardParser.d.ts +0 -10
  21. package/MarkdownCard/MermaidService-yeLQUW_e.js +142 -0
  22. package/MarkdownCard/index.css +1 -1
  23. package/MarkdownCard/index.js +735 -200
  24. package/MarkdownCard/mdCard.types.d.ts +2 -29
  25. package/MarkdownCard/mdCard.vue.d.ts +2 -2
  26. package/MarkdownCard/useMarkdownCardFoundation.d.ts +8 -0
  27. package/Mention/Mention.vue.d.ts +12 -3
  28. package/Mention/index.css +1 -1
  29. package/Mention/index.js +365 -110
  30. package/Mention/mention-types.d.ts +6 -4
  31. package/Mention/use-mention.d.ts +7 -0
  32. package/Prompt/index.js +1 -1
  33. package/README.md +8 -12
  34. package/Toolbar/index.css +1 -1
  35. package/Toolbar/index.d.ts +2 -1
  36. package/Toolbar/index.js +189 -198
  37. package/Toolbar/toolbar.types.d.ts +2 -26
  38. package/index.d.ts +18 -6
  39. package/mate-chat.js +17 -2
  40. package/package.json +1 -4
  41. package/Attachment/uploader.d.ts +0 -11
  42. package/MarkdownCard/MDCardService.d.ts +0 -14
  43. package/MarkdownCard/MermaidService-B6BcjbW_.js +0 -127
  44. package/MarkdownCard/MermaidService.d.ts +0 -22
  45. package/Mention/const.d.ts +0 -4
package/Bubble/index.js CHANGED
@@ -1,5 +1,64 @@
1
- import { defineComponent as M, createElementBlock as l, openBlock as r, normalizeStyle as h, createElementVNode as v, ref as p, watch as N, createCommentVNode as d, normalizeClass as b, toDisplayString as A, createVNode as w, useSlots as B, computed as $, normalizeProps as R, guardReactiveProps as E, unref as Z, renderSlot as y, createTextVNode as F } from "vue";
2
- const T = {
1
+ import "./index.css";
2
+ var N = Object.defineProperty;
3
+ var F = (s, e, t) => e in s ? N(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
4
+ var $ = (s, e, t) => F(s, typeof e != "symbol" ? e + "" : e, t);
5
+ import { openBlock as l, createElementBlock as u, createElementVNode as p, defineComponent as S, normalizeStyle as f, ref as C, watch as R, createCommentVNode as g, normalizeClass as y, toDisplayString as Z, createVNode as M, reactive as E, nextTick as T, onBeforeUnmount as I, computed as _, useSlots as D, unref as h, renderSlot as L, normalizeProps as z, guardReactiveProps as U, createTextVNode as H } from "vue";
6
+ const P = (s, e) => {
7
+ const t = s.__vccOpts || s;
8
+ for (const [n, o] of e)
9
+ t[n] = o;
10
+ return t;
11
+ }, O = {}, j = { class: "mc-bubble-loading" };
12
+ function G(s, e) {
13
+ return l(), u("div", j, e[0] || (e[0] = [
14
+ p(
15
+ "div",
16
+ { class: "loading-dot dot-start" },
17
+ null,
18
+ -1
19
+ /* HOISTED */
20
+ ),
21
+ p(
22
+ "div",
23
+ { class: "loading-dot dot-middle" },
24
+ null,
25
+ -1
26
+ /* HOISTED */
27
+ ),
28
+ p(
29
+ "div",
30
+ { class: "loading-dot dot-end" },
31
+ null,
32
+ -1
33
+ /* HOISTED */
34
+ )
35
+ ]));
36
+ }
37
+ const W = /* @__PURE__ */ P(O, [["render", G], ["__scopeId", "data-v-395fc568"]]), q = 36, J = 36, K = {
38
+ content: {
39
+ type: String,
40
+ default: ""
41
+ },
42
+ loading: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ align: {
47
+ type: String,
48
+ default: "left"
49
+ },
50
+ avatarPosition: {
51
+ type: String,
52
+ default: "side"
53
+ },
54
+ variant: {
55
+ type: String,
56
+ default: "filled"
57
+ },
58
+ avatarConfig: {
59
+ type: Object
60
+ }
61
+ }, Q = {
3
62
  name: {
4
63
  type: String,
5
64
  default: ""
@@ -23,7 +82,7 @@ const T = {
23
82
  type: String,
24
83
  default: ""
25
84
  }
26
- }, _ = /* @__PURE__ */ M({
85
+ }, X = /* @__PURE__ */ S({
27
86
  __name: "AvatarBodyIcon",
28
87
  props: {
29
88
  width: {
@@ -35,21 +94,21 @@ const T = {
35
94
  default: 16
36
95
  }
37
96
  },
38
- setup(i) {
39
- return (a, s) => (r(), l(
97
+ setup(s) {
98
+ return (e, t) => (l(), u(
40
99
  "svg",
41
100
  {
42
- style: h({
43
- width: `${i.width}px`,
44
- height: `${i.height}px`,
101
+ style: f({
102
+ width: `${s.width}px`,
103
+ height: `${s.height}px`,
45
104
  verticalAlign: "middle"
46
105
  }),
47
106
  viewBox: "0 0 30 30",
48
107
  version: "1.1",
49
108
  xmlns: "http://www.w3.org/2000/svg"
50
109
  },
51
- s[0] || (s[0] = [
52
- v(
110
+ t[0] || (t[0] = [
111
+ p(
53
112
  "g",
54
113
  {
55
114
  stroke: "none",
@@ -58,14 +117,14 @@ const T = {
58
117
  "fill-rule": "evenodd"
59
118
  },
60
119
  [
61
- v("circle", {
120
+ p("circle", {
62
121
  id: "Oval",
63
122
  fill: "#CACFD8",
64
123
  cx: "15",
65
124
  cy: "15",
66
125
  r: "15"
67
126
  }),
68
- v("path", {
127
+ p("path", {
69
128
  d: "M14.9997866,16 C12.5145053,16 10.4997866,13.9852814 10.4997866, 11.5 C10.4997866,9.01471863 12.5145053,7 14.9997866,7 C17.485068, 7 19.4997866,9.01471863 19.4997866,11.5 C19.4997866,13.9852814 17.485068, 16 14.9997866,16 Z M23,23 L7,22.998553 C7,19.0122153 10.8892296, 16.5 14.9997866,16.5 C19.1103437,16.5 23,20 23,23 Z",
70
129
  fill: "#FFFFFF"
71
130
  })
@@ -78,7 +137,7 @@ const T = {
78
137
  /* STYLE */
79
138
  ));
80
139
  }
81
- }), D = /* @__PURE__ */ M({
140
+ }), Y = /* @__PURE__ */ S({
82
141
  __name: "AvatarNoBodyIcon",
83
142
  props: {
84
143
  width: {
@@ -90,21 +149,21 @@ const T = {
90
149
  default: 16
91
150
  }
92
151
  },
93
- setup(i) {
94
- return (a, s) => (r(), l(
152
+ setup(s) {
153
+ return (e, t) => (l(), u(
95
154
  "svg",
96
155
  {
97
- style: h({
98
- width: `${i.width}px`,
99
- height: `${i.height}px`,
156
+ style: f({
157
+ width: `${s.width}px`,
158
+ height: `${s.height}px`,
100
159
  verticalAlign: "middle"
101
160
  }),
102
161
  viewBox: "0 0 30 30",
103
162
  version: "1.1",
104
163
  xmlns: "http://www.w3.org/2000/svg"
105
164
  },
106
- s[0] || (s[0] = [
107
- v(
165
+ t[0] || (t[0] = [
166
+ p(
108
167
  "g",
109
168
  {
110
169
  stroke: "none",
@@ -113,7 +172,7 @@ const T = {
113
172
  "fill-rule": "evenodd"
114
173
  },
115
174
  [
116
- v("path", {
175
+ p("path", {
117
176
  d: `M22.31,19.2474562 L22.31,21.9974562 L20.81,21.9974562 L20.81, 19.2474562 L18.06,19.2474562 L18.06,17.7474562
118
177
  L20.81,17.7474562 L20.81, 14.9974562 L22.31,14.9974562 L22.31,17.7474562 L25.06,17.7474562 L25.06, 19.2474562
119
178
  L22.31,19.2474562 Z M14.9297866,14.9974562 C12.4445053, 14.9974562 10.4297866,12.9827376 10.4297866,10.4974562
@@ -123,7 +182,7 @@ const T = {
123
182
  17.9612467,15.983021 19.2414296, 16.7474562 L17.06,16.7474562 L17.06,20.2474562 L19.6797866,20.2474562 Z`,
124
183
  fill: "#959EB2"
125
184
  }),
126
- v("path", {
185
+ p("path", {
127
186
  d: `M0,15 L1,15 C1,15.6118966 1.03919561,16.2186526 1.11683409,
128
187
  16.8178549 L0.125124012,16.9463505 C0.0425740367,16.309242 0,
129
188
  15.6595925 0,15 Z M0.503241262,18.867175 L1.46961749,18.6100428 C1.62594651,
@@ -210,239 +269,316 @@ const T = {
210
269
  /* STYLE */
211
270
  ));
212
271
  }
213
- }), I = { class: "mc-bubble-avatar-wrapper" }, z = ["src"], P = /* @__PURE__ */ M({
272
+ }), V = { class: "mc-bubble-avatar-wrapper" }, x = ["src"], e1 = /* @__PURE__ */ S({
214
273
  __name: "Avatar",
215
- props: T,
216
- setup(i) {
217
- const a = i, s = p(!1), n = p(!0), g = p(1), t = p(12), o = p(), C = (e) => {
218
- if (a.gender) {
219
- a.gender.toLowerCase() === "male" ? g.value = 1 : a.gender.toLowerCase() === "female" && (g.value = 0);
274
+ props: Q,
275
+ setup(s) {
276
+ const e = s, t = C(!1), n = C(!0), o = C(1), r = C(12), i = C(), b = (a) => {
277
+ if (e.gender) {
278
+ e.gender.toLowerCase() === "male" ? o.value = 1 : e.gender.toLowerCase() === "female" && (o.value = 0);
220
279
  return;
221
280
  }
222
- const u = e.charCodeAt(0);
223
- g.value = u % 2;
224
- }, L = (e, u) => {
225
- if (e.length < 2)
226
- o.value = e;
227
- else if (/^[\u4e00-\u9fa5]/.test(e))
228
- o.value = e.substr(e.length - 2, 2);
229
- else if (/^[A-Za-z]/.test(e))
230
- if (/[_ -]/.test(e)) {
231
- const c = e.split(/_|-|\s+/)[0], m = e.split(/_|-|\s+/)[1];
232
- o.value = c.substr(0, 1).toUpperCase() + m.substr(0, 1).toUpperCase();
281
+ const c = a.charCodeAt(0);
282
+ o.value = c % 2;
283
+ }, w = (a, c) => {
284
+ if (a.length < 2)
285
+ i.value = a;
286
+ else if (/^[\u4e00-\u9fa5]/.test(a))
287
+ i.value = a.substr(a.length - 2, 2);
288
+ else if (/^[A-Za-z]/.test(a))
289
+ if (/[_ -]/.test(a)) {
290
+ const v = a.split(/_|-|\s+/)[0], A = a.split(/_|-|\s+/)[1];
291
+ i.value = v.substr(0, 1).toUpperCase() + A.substr(0, 1).toUpperCase();
233
292
  } else
234
- o.value = e.substr(0, 2).toUpperCase();
293
+ i.value = a.substr(0, 2).toUpperCase();
235
294
  else
236
- o.value = e.substr(0, 2);
237
- u < 30 && (o.value = e.substr(0, 1).toUpperCase()), C(e.substr(0, 1));
238
- }, f = (e) => {
239
- const u = e, c = Math.min(a.width, a.height);
240
- u ? (n.value = !1, L(u, c)) : u === "" ? (n.value = !1, o.value = "") : n.value = !0, t.value = c / 4 + 3;
295
+ i.value = a.substr(0, 2);
296
+ c < 30 && (i.value = a.substr(0, 1).toUpperCase()), b(a.substr(0, 1));
297
+ }, m = (a) => {
298
+ const c = a, v = Math.min(e.width, e.height);
299
+ c ? (n.value = !1, w(c, v)) : c === "" ? (n.value = !1, i.value = "") : n.value = !0, r.value = v / 4 + 3;
241
300
  };
242
- return f(a.name), N([() => a.name, () => a.width, () => a.height, () => a.gender], () => {
243
- f(a.name);
244
- }), (e, u) => {
245
- var c, m;
246
- return r(), l("span", I, [
247
- e.imgSrc && !s.value ? (r(), l("img", {
301
+ return m(e.name), R([() => e.name, () => e.width, () => e.height, () => e.gender], () => {
302
+ m(e.name);
303
+ }), (a, c) => {
304
+ var v, A;
305
+ return l(), u("span", V, [
306
+ a.imgSrc && !t.value ? (l(), u("img", {
248
307
  key: 0,
249
- src: e.imgSrc,
308
+ src: a.imgSrc,
250
309
  alt: "",
251
- onError: u[0] || (u[0] = () => s.value = !0),
252
- style: h({
253
- height: `${e.height}px`,
254
- width: `${e.width}px`,
255
- borderRadius: e.isRound ? "100%" : "0"
310
+ onError: c[0] || (c[0] = () => t.value = !0),
311
+ style: f({
312
+ height: `${a.height}px`,
313
+ width: `${a.width}px`,
314
+ borderRadius: a.isRound ? "100%" : "0"
256
315
  })
257
- }, null, 44, z)) : d("v-if", !0),
258
- !e.imgSrc && !n.value && ((c = o.value) == null ? void 0 : c.length) !== 0 ? (r(), l(
316
+ }, null, 44, x)) : g("v-if", !0),
317
+ !a.imgSrc && !n.value && ((v = i.value) == null ? void 0 : v.length) !== 0 ? (l(), u(
259
318
  "span",
260
319
  {
261
320
  key: 1,
262
- class: b(["mc-bubble-avatar-style", `mc-bubble-avatar-background-${g.value}`]),
263
- style: h({
264
- height: `${e.height}px`,
265
- width: `${e.width}px`,
266
- lineHeight: `${e.height}px`,
267
- fontSize: `${t.value}px`,
268
- borderRadius: e.isRound ? "100%" : "0"
321
+ class: y(["mc-bubble-avatar-style", `mc-bubble-avatar-background-${o.value}`]),
322
+ style: f({
323
+ height: `${a.height}px`,
324
+ width: `${a.width}px`,
325
+ lineHeight: `${a.height}px`,
326
+ fontSize: `${r.value}px`,
327
+ borderRadius: a.isRound ? "100%" : "0"
269
328
  })
270
329
  },
271
- A(o.value),
330
+ Z(i.value),
272
331
  7
273
332
  /* TEXT, CLASS, STYLE */
274
- )) : d("v-if", !0),
275
- !e.imgSrc && !n.value && ((m = o.value) == null ? void 0 : m.length) === 0 ? (r(), l(
333
+ )) : g("v-if", !0),
334
+ !a.imgSrc && !n.value && ((A = i.value) == null ? void 0 : A.length) === 0 ? (l(), u(
276
335
  "span",
277
336
  {
278
337
  key: 2,
279
338
  class: "mc-bubble-avatar-style",
280
- style: h({ borderRadius: e.isRound ? "100%" : "0" })
339
+ style: f({ borderRadius: a.isRound ? "100%" : "0" })
281
340
  },
282
341
  [
283
- w(_, {
284
- width: e.width,
285
- height: e.height
342
+ M(X, {
343
+ width: a.width,
344
+ height: a.height
286
345
  }, null, 8, ["width", "height"])
287
346
  ],
288
347
  4
289
348
  /* STYLE */
290
- )) : d("v-if", !0),
291
- !e.imgSrc && n.value || e.imgSrc && s.value ? (r(), l(
349
+ )) : g("v-if", !0),
350
+ !a.imgSrc && n.value || a.imgSrc && t.value ? (l(), u(
292
351
  "span",
293
352
  {
294
353
  key: 3,
295
354
  class: "mc-bubble-avatar-style",
296
- style: h({ borderRadius: e.isRound ? "100%" : "0" })
355
+ style: f({ borderRadius: a.isRound ? "100%" : "0" })
297
356
  },
298
357
  [
299
- w(D, {
300
- width: e.width,
301
- height: e.height
358
+ M(Y, {
359
+ width: a.width,
360
+ height: a.height
302
361
  }, null, 8, ["width", "height"])
303
362
  ],
304
363
  4
305
364
  /* STYLE */
306
- )) : d("v-if", !0)
365
+ )) : g("v-if", !0)
307
366
  ]);
308
367
  };
309
368
  }
310
- }), U = {
311
- content: {
312
- type: String,
313
- default: ""
314
- },
315
- loading: {
316
- type: Boolean,
317
- default: !1
318
- },
319
- align: {
320
- type: String,
321
- default: "left"
322
- },
323
- avatarPosition: {
324
- type: String,
325
- default: "side"
326
- },
327
- variant: {
328
- type: String,
329
- default: "filled"
330
- },
331
- avatarConfig: {
332
- type: Object
369
+ });
370
+ function t1() {
371
+ const s = E({});
372
+ return {
373
+ getCache: (e) => s[e],
374
+ getCaches: () => ({ ...s }),
375
+ setCache: (e, t) => {
376
+ s[e] = t;
377
+ },
378
+ nextTick: T
379
+ };
380
+ }
381
+ function a1({
382
+ adapter: s,
383
+ foundationClass: e
384
+ }) {
385
+ const t = C(null), n = () => (t.value || (t.value = new e(s), typeof t.value.init == "function" && t.value.init()), t.value), o = () => {
386
+ t.value && (typeof t.value.destroy == "function" && t.value.destroy(), t.value = null);
387
+ };
388
+ return I(() => {
389
+ o();
390
+ }), {
391
+ foundation: n(),
392
+ destroyFoundation: o
393
+ };
394
+ }
395
+ const s1 = "name", r1 = "imgSrc", d = () => {
396
+ };
397
+ class k {
398
+ constructor(e) {
399
+ $(this, "_adapter");
400
+ this._adapter = { ...k.defaultAdapter, ...e };
401
+ }
402
+ static get cssClasses() {
403
+ return {};
404
+ }
405
+ static get strings() {
406
+ return {};
407
+ }
408
+ static get numbers() {
409
+ return {};
410
+ }
411
+ static get defaultAdapter() {
412
+ return {
413
+ getProp: d,
414
+ getProps: d,
415
+ getState: d,
416
+ getStates: d,
417
+ setState: d,
418
+ getContext: d,
419
+ getContexts: d,
420
+ getCache: d,
421
+ setCache: d,
422
+ getCaches: d,
423
+ stopPropagation: d
424
+ };
425
+ }
426
+ getProp(e) {
427
+ return this._adapter.getProp(e);
428
+ }
429
+ getProps() {
430
+ return this._adapter.getProps();
431
+ }
432
+ getState(e) {
433
+ return this._adapter.getState(e);
434
+ }
435
+ getStates() {
436
+ return this._adapter.getStates();
437
+ }
438
+ setState(e, t) {
439
+ return this._adapter.setState({ ...e }, t);
440
+ }
441
+ /* istanbul ignore next */
442
+ getCaches() {
443
+ return this._adapter.getCaches();
444
+ }
445
+ getCache(e) {
446
+ return this._adapter.getCache(e);
447
+ }
448
+ setCache(e, t) {
449
+ return e && this._adapter.setCache(e, t);
450
+ }
451
+ nextTick(e) {
452
+ return this._adapter.nextTick(e);
453
+ }
454
+ _isInProps(e) {
455
+ const t = this.getProps();
456
+ return e in t;
457
+ }
458
+ init(e) {
459
+ }
460
+ destroy() {
461
+ }
462
+ }
463
+ class n1 extends k {
464
+ constructor(e) {
465
+ super({ ...e });
466
+ }
467
+ getBubbleClasses() {
468
+ const { align: e, loading: t, isEmptyAvatar: n, avatarPosition: o } = this.getProps();
469
+ return [
470
+ `mc-bubble-avatar-${o}`,
471
+ `mc-bubble-${e}`,
472
+ t ? "mc-bubble-loading" : "",
473
+ n ? "mc-bubble-avatar-empty" : ""
474
+ ].filter(Boolean).join(" ");
475
+ }
476
+ getIsEmptyAvatar(e) {
477
+ if (e) {
478
+ const t = Object.keys(e), n = t.some(
479
+ (o) => o === s1 || o === r1
480
+ );
481
+ return t.length < 1 || !n;
482
+ } else
483
+ return !0;
333
484
  }
334
- }, H = 36, O = 36, j = "name", G = "imgSrc", k = (i, a) => {
335
- const s = i.__vccOpts || i;
336
- for (const [n, g] of a)
337
- s[n] = g;
338
- return s;
339
- }, W = {}, q = { class: "mc-bubble-loading" };
340
- function J(i, a) {
341
- return r(), l("div", q, a[0] || (a[0] = [
342
- v(
343
- "div",
344
- { class: "loading-dot dot-start" },
345
- null,
346
- -1
347
- /* HOISTED */
348
- ),
349
- v(
350
- "div",
351
- { class: "loading-dot dot-middle" },
352
- null,
353
- -1
354
- /* HOISTED */
355
- ),
356
- v(
357
- "div",
358
- { class: "loading-dot dot-end" },
359
- null,
360
- -1
361
- /* HOISTED */
362
- )
363
- ]));
364
485
  }
365
- const K = /* @__PURE__ */ k(W, [["render", J], ["__scopeId", "data-v-395fc568"]]), Q = {
486
+ function o1({ props: s }) {
487
+ const t = {
488
+ ...t1(),
489
+ getProps: () => s,
490
+ getProp: (i) => s[i],
491
+ getStates: () => ({}),
492
+ getState: (i) => {
493
+ },
494
+ setState: (i, b) => {
495
+ }
496
+ }, { foundation: n } = a1({
497
+ adapter: t,
498
+ foundationClass: n1
499
+ }), o = _(() => n.getBubbleClasses()), r = _(() => n.getIsEmptyAvatar(s.avatarConfig));
500
+ return {
501
+ foundation: n,
502
+ bubbleClasses: o,
503
+ isEmptyAvatar: r
504
+ };
505
+ }
506
+ const i1 = {
507
+ key: 0,
508
+ class: "mc-bubble-avatar"
509
+ }, l1 = {
366
510
  key: 0,
367
511
  class: "mc-bubble-avatar-name"
368
- }, X = {
512
+ }, u1 = {
369
513
  key: 1,
370
514
  class: "loading-container"
371
- }, Y = /* @__PURE__ */ M({
515
+ }, d1 = /* @__PURE__ */ S({
372
516
  __name: "Bubble",
373
- props: U,
374
- setup(i) {
375
- const a = B(), s = i, n = $(() => [
376
- `mc-bubble-avatar-${s.avatarPosition}`,
377
- `mc-bubble-${s.align}`,
378
- s.loading ? "mc-bubble-loading" : ""
379
- ]), g = $(() => {
380
- if (s.avatarConfig) {
381
- const t = Object.keys(s.avatarConfig), o = t.some((C) => C === j || C === G);
382
- return t.length < 1 || !o;
383
- } else
384
- return !0;
385
- });
386
- return (t, o) => {
387
- var C, L, f;
388
- return r(), l(
517
+ props: K,
518
+ setup(s) {
519
+ const e = D(), t = s, { bubbleClasses: n, isEmptyAvatar: o } = o1({ props: t });
520
+ return (r, i) => {
521
+ var b, w, m;
522
+ return l(), u(
389
523
  "div",
390
524
  {
391
- class: b(["mc-bubble", n.value])
525
+ class: y(["mc-bubble", h(n)])
392
526
  },
393
527
  [
394
- t.avatarConfig ? (r(), l(
528
+ h(e).avatar ? (l(), u("div", i1, [
529
+ L(r.$slots, "avatar", {}, void 0, !0)
530
+ ])) : r.avatarConfig ? (l(), u(
395
531
  "div",
396
532
  {
397
- key: 0,
398
- class: b(["mc-bubble-avatar", { "empty-avatar": g.value }])
533
+ key: 1,
534
+ class: y(["mc-bubble-avatar", { "empty-avatar": h(o) }])
399
535
  },
400
536
  [
401
- w(
402
- P,
403
- R(E(
404
- g.value ? {
405
- width: ((C = t.avatarConfig) == null ? void 0 : C.width) || Z(H),
406
- height: ((L = t.avatarConfig) == null ? void 0 : L.height) || Z(O)
407
- } : t.avatarConfig
537
+ M(
538
+ e1,
539
+ z(U(
540
+ h(o) ? {
541
+ width: ((b = r.avatarConfig) == null ? void 0 : b.width) || h(q),
542
+ height: ((w = r.avatarConfig) == null ? void 0 : w.height) || h(J)
543
+ } : r.avatarConfig
408
544
  )),
409
545
  null,
410
546
  16
411
547
  /* FULL_PROPS */
412
548
  ),
413
- t.avatarPosition === "top" ? (r(), l(
549
+ r.avatarPosition === "top" ? (l(), u(
414
550
  "span",
415
- Q,
416
- A((f = t.avatarConfig) == null ? void 0 : f.displayName),
551
+ l1,
552
+ Z((m = r.avatarConfig) == null ? void 0 : m.displayName),
417
553
  1
418
554
  /* TEXT */
419
- )) : d("v-if", !0)
555
+ )) : g("v-if", !0)
420
556
  ],
421
557
  2
422
558
  /* CLASS */
423
- )) : d("v-if", !0),
424
- v(
559
+ )) : g("v-if", !0),
560
+ p(
425
561
  "div",
426
562
  {
427
- class: b(["mc-bubble-content-container", { "with-avatar": t.avatarConfig }])
563
+ class: y(["mc-bubble-content-container", { "with-avatar": r.avatarConfig }])
428
564
  },
429
565
  [
430
- t.loading ? d("v-if", !0) : y(t.$slots, "top", { key: 0 }, void 0, !0),
431
- t.loading ? (r(), l("div", X, [
432
- y(t.$slots, "loadingTpl", {}, () => [
433
- w(K)
566
+ r.loading ? g("v-if", !0) : L(r.$slots, "top", { key: 0 }, void 0, !0),
567
+ r.loading ? (l(), u("div", u1, [
568
+ L(r.$slots, "loadingTpl", {}, () => [
569
+ M(W)
434
570
  ], !0)
435
- ])) : d("v-if", !0),
436
- (Z(a).default || t.content) && !t.loading ? (r(), l(
571
+ ])) : g("v-if", !0),
572
+ (h(e).default || r.content) && !r.loading ? (l(), u(
437
573
  "div",
438
574
  {
439
575
  key: 2,
440
- class: b(["mc-bubble-content", [t.variant]])
576
+ class: y(["mc-bubble-content", [r.variant]])
441
577
  },
442
578
  [
443
- y(t.$slots, "default", {}, () => [
444
- F(
445
- A(t.content),
579
+ L(r.$slots, "default", {}, () => [
580
+ H(
581
+ Z(r.content),
446
582
  1
447
583
  /* TEXT */
448
584
  )
@@ -450,8 +586,8 @@ const K = /* @__PURE__ */ k(W, [["render", J], ["__scopeId", "data-v-395fc568"]]
450
586
  ],
451
587
  2
452
588
  /* CLASS */
453
- )) : d("v-if", !0),
454
- t.loading ? d("v-if", !0) : y(t.$slots, "bottom", { key: 3 }, void 0, !0)
589
+ )) : g("v-if", !0),
590
+ r.loading ? g("v-if", !0) : L(r.$slots, "bottom", { key: 3 }, void 0, !0)
455
591
  ],
456
592
  2
457
593
  /* CLASS */
@@ -462,10 +598,10 @@ const K = /* @__PURE__ */ k(W, [["render", J], ["__scopeId", "data-v-395fc568"]]
462
598
  );
463
599
  };
464
600
  }
465
- }), S = /* @__PURE__ */ k(Y, [["__scopeId", "data-v-7e509691"]]);
466
- S.install = (i) => {
467
- i.component("McBubble", S);
601
+ }), B = /* @__PURE__ */ P(d1, [["__scopeId", "data-v-9c10edf4"]]);
602
+ B.install = (s) => {
603
+ s.component("McBubble", B);
468
604
  };
469
605
  export {
470
- S as McBubble
606
+ B as McBubble
471
607
  };