@dialpad/dialtone 9.131.0 → 9.132.0

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 (71) hide show
  1. package/dist/css/dialtone-default-theme.css +1783 -5185
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone-docs.json +1 -1
  4. package/dist/css/dialtone.css +622 -1999
  5. package/dist/css/dialtone.min.css +1 -1
  6. package/dist/css/tokens-docs.json +1 -1
  7. package/dist/tokens/css/tokens-dp-dark.css +104 -265
  8. package/dist/tokens/css/tokens-expressive-dark.css +104 -265
  9. package/dist/tokens/css/tokens-expressive-sm-dark.css +104 -265
  10. package/dist/tokens/css/tokens-tmo-dark.css +104 -265
  11. package/dist/tokens/doc.json +27983 -30007
  12. package/dist/tokens/themes/dp-dark.cjs +1 -1
  13. package/dist/tokens/themes/dp-dark.js +1 -1
  14. package/dist/tokens/themes/expressive-dark.cjs +1 -1
  15. package/dist/tokens/themes/expressive-dark.js +1 -1
  16. package/dist/tokens/themes/expressive-sm-dark.cjs +1 -1
  17. package/dist/tokens/themes/expressive-sm-dark.js +1 -1
  18. package/dist/tokens/themes/tmo-dark.cjs +1 -1
  19. package/dist/tokens/themes/tmo-dark.js +1 -1
  20. package/dist/tokens/tokens-dp-dark.json +11 -34
  21. package/dist/tokens/tokens-expressive-dark.json +11 -34
  22. package/dist/tokens/tokens-expressive-sm-dark.json +11 -34
  23. package/dist/tokens/tokens-tmo-dark.json +11 -34
  24. package/dist/vue2/common/emoji/index.cjs +1 -1
  25. package/dist/vue2/common/emoji/index.cjs.map +1 -1
  26. package/dist/vue2/common/emoji/index.js +25 -17
  27. package/dist/vue2/common/emoji/index.js.map +1 -1
  28. package/dist/vue2/component-documentation.json +1 -1
  29. package/dist/vue2/lib/emoji/emoji.cjs +1 -1
  30. package/dist/vue2/lib/emoji/emoji.cjs.map +1 -1
  31. package/dist/vue2/lib/emoji/emoji.js +16 -16
  32. package/dist/vue2/lib/emoji/emoji.js.map +1 -1
  33. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  34. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  35. package/dist/vue2/lib/message-input/message-input.js +15 -7
  36. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  37. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +7 -7
  38. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  39. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +393 -401
  40. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  41. package/dist/vue2/types/common/emoji/index.d.ts.map +1 -1
  42. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
  43. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +1 -1
  44. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
  45. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  46. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  47. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  48. package/dist/vue3/common/emoji/index.cjs +1 -1
  49. package/dist/vue3/common/emoji/index.cjs.map +1 -1
  50. package/dist/vue3/common/emoji/index.js +39 -33
  51. package/dist/vue3/common/emoji/index.js.map +1 -1
  52. package/dist/vue3/component-documentation.json +1 -1
  53. package/dist/vue3/lib/emoji/emoji.cjs +1 -1
  54. package/dist/vue3/lib/emoji/emoji.cjs.map +1 -1
  55. package/dist/vue3/lib/emoji/emoji.js +17 -17
  56. package/dist/vue3/lib/emoji/emoji.js.map +1 -1
  57. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  58. package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
  59. package/dist/vue3/lib/message-input/message-input.js +60 -52
  60. package/dist/vue3/lib/message-input/message-input.js.map +1 -1
  61. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  62. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  63. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +133 -120
  64. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  65. package/dist/vue3/types/common/emoji/index.d.ts.map +1 -1
  66. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +1 -1
  67. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
  68. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  69. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +2 -1
  70. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  71. package/package.json +3 -3
@@ -1,11 +1,11 @@
1
- import { nodeViewProps as L, NodeViewWrapper as R, VueRenderer as v, VueNodeViewRenderer as I, BubbleMenu as G, EditorContent as Q, Editor as Z } from "../../node_modules/@tiptap/vue-3.js";
1
+ import { nodeViewProps as L, NodeViewWrapper as R, VueRenderer as v, VueNodeViewRenderer as O, BubbleMenu as G, EditorContent as Q, Editor as Z } from "../../node_modules/@tiptap/vue-3.js";
2
2
  import { Node as ee, nodePasteRule as P, InputRule as te, mergeAttributes as b, getMarksBetween as ne, combineTransactionSteps as oe, getChangedRanges as re, findChildrenInRange as ie, Mark as se, nodeInputRule as ae, Extension as le } from "@tiptap/core";
3
3
  import ce from "@tiptap/extension-blockquote";
4
4
  import de from "@tiptap/extension-code-block";
5
5
  import ue from "@tiptap/extension-code";
6
6
  import me from "@tiptap/extension-document";
7
7
  import he from "@tiptap/extension-hard-break";
8
- import q from "@tiptap/extension-paragraph";
8
+ import W from "@tiptap/extension-paragraph";
9
9
  import fe from "@tiptap/extension-placeholder";
10
10
  import pe from "@tiptap/extension-bold";
11
11
  import ge from "@tiptap/extension-bullet-list";
@@ -22,18 +22,17 @@ import Se from "@tiptap/extension-text-style";
22
22
  import Le from "@tiptap/extension-color";
23
23
  import Re from "@tiptap/extension-font-family";
24
24
  import { PluginKey as T, Plugin as ve } from "@tiptap/pm/state";
25
- import Ie from "@tiptap/suggestion";
26
- import { emojiPattern as W } from "regex-combined-emojis";
27
- import { resolveComponent as c, createBlock as h, openBlock as l, withCtx as u, createVNode as p, createElementBlock as _, withDirectives as Oe, createElementVNode as w, Fragment as Be, renderList as Me, withModifiers as $e, normalizeClass as z, resolveDynamicComponent as Ae, vShow as De, createTextVNode as k, toDisplayString as m, markRaw as O, createCommentVNode as x, mergeProps as Pe } from "vue";
25
+ import Oe from "@tiptap/suggestion";
26
+ import { emojiPattern as q } from "regex-combined-emojis";
27
+ import { resolveComponent as d, createBlock as h, openBlock as l, withCtx as u, createVNode as p, createElementBlock as _, withDirectives as Ie, createElementVNode as w, Fragment as Be, renderList as Me, withModifiers as $e, normalizeClass as z, resolveDynamicComponent as Ae, vShow as De, createTextVNode as k, toDisplayString as m, markRaw as I, createCommentVNode as x, mergeProps as Pe } from "vue";
28
28
  import { _ as g } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
29
29
  import X from "../emoji/emoji.js";
30
- import { emojiRegex as je, stringToUnicode as He, codeToEmojiData as H, emojiShortCodeRegex as Ne } from "../../common/emoji/index.js";
31
- import { emojisIndexed as Fe } from "@dialpad/dialtone-emojis";
30
+ import { getEmojiData as je, emojiRegex as He, stringToUnicode as Ne, codeToEmojiData as H, emojiShortCodeRegex as Fe } from "../../common/emoji/index.js";
32
31
  import Ke from "../list-item/list-item.js";
33
32
  import B from "../stack/stack.js";
34
33
  import M from "tippy.js";
35
- import { getPhoneNumberRegex as Ve, linkRegex as Ue, warnIfUnmounted as qe, returnFirstEl as F } from "../../common/utils/index.js";
36
- import We from "@tiptap/extension-image";
34
+ import { getPhoneNumberRegex as Ve, linkRegex as Ue, warnIfUnmounted as We, returnFirstEl as F } from "../../common/utils/index.js";
35
+ import qe from "@tiptap/extension-image";
37
36
  import N from "@tiptap/extension-mention";
38
37
  import J from "../link/link.js";
39
38
  import { RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as K, RICH_TEXT_EDITOR_OUTPUT_FORMATS as ze, RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as Xe } from "./rich-text-editor-constants.js";
@@ -53,7 +52,7 @@ const tt = {
53
52
  props: L
54
53
  };
55
54
  function nt(e, t, o, n, r, i) {
56
- const s = c("dt-emoji"), a = c("node-view-wrapper");
55
+ const s = d("dt-emoji"), a = d("node-view-wrapper");
57
56
  return l(), h(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
58
57
  default: u(() => [
59
58
  p(s, {
@@ -142,17 +141,17 @@ const ot = /* @__PURE__ */ g(tt, [["render", nt]]), rt = {
142
141
  class: "d-suggestion-list"
143
142
  };
144
143
  function at(e, t, o, n, r, i) {
145
- const s = c("dt-list-item");
144
+ const s = d("dt-list-item");
146
145
  return l(), _("div", it, [
147
- Oe(w("ul", st, [
148
- (l(!0), _(Be, null, Me(o.items, (a, d) => (l(), h(s, {
146
+ Ie(w("ul", st, [
147
+ (l(!0), _(Be, null, Me(o.items, (a, c) => (l(), h(s, {
149
148
  key: a.id,
150
149
  class: z([
151
150
  "d-suggestion-list__item",
152
- { "d-list-item--highlighted": d === r.selectedIndex }
151
+ { "d-list-item--highlighted": c === r.selectedIndex }
153
152
  ]),
154
153
  "navigation-type": "arrow-keys",
155
- onClick: (f) => i.selectItem(d),
154
+ onClick: (f) => i.selectItem(c),
156
155
  onKeydown: $e(i.onKeyDown, ["prevent"])
157
156
  }, {
158
157
  default: u(() => [
@@ -180,7 +179,7 @@ const $ = /* @__PURE__ */ g(rt, [["render", at]]), lt = {
180
179
  }
181
180
  };
182
181
  function ct(e, t, o, n, r, i) {
183
- const s = c("dt-emoji"), a = c("dt-stack");
182
+ const s = d("dt-emoji"), a = d("dt-stack");
184
183
  return l(), h(a, {
185
184
  direction: "row",
186
185
  gap: "400"
@@ -211,18 +210,25 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
211
210
  }
212
211
  };
213
212
  }
214
- }, ut = 20, mt = {
213
+ }, ut = 20, mt = (e, t, o) => {
214
+ var a, c;
215
+ const n = (a = e.shortname) == null ? void 0 : a.replaceAll(":", ""), r = (c = t.shortname) == null ? void 0 : c.replaceAll(":", ""), i = n.startsWith(o), s = r.startsWith(o);
216
+ return i && !s ? -1 : !i && s ? 1 : n.localeCompare(r);
217
+ }, ht = {
215
218
  items: ({ query: e }) => {
216
219
  if (e.length < 2)
217
220
  return [];
218
- const t = Object.values(Fe);
221
+ const t = Object.values(je());
219
222
  return e = e.toLowerCase(), t.filter(
220
- (n) => [
221
- n.name,
222
- n.shortname.replaceAll(":", ""),
223
- ...n.keywords
224
- ].some((r) => r.startsWith(e))
225
- ).splice(0, ut).map((n) => ({ code: n.shortname }));
223
+ (n) => {
224
+ var r;
225
+ return [
226
+ n.name,
227
+ (r = n.shortname) == null ? void 0 : r.replaceAll(":", ""),
228
+ ...n.keywords || []
229
+ ].some((i) => i && i.startsWith(e));
230
+ }
231
+ ).splice(0, ut).sort((n, r) => mt(n, r, e)).map((n) => ({ code: n.shortname }));
226
232
  },
227
233
  command: ({ editor: e, range: t, props: o }) => {
228
234
  var i, s;
@@ -240,7 +246,7 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
240
246
  onStart: (n) => {
241
247
  e = new v($, {
242
248
  props: {
243
- itemComponent: O(dt),
249
+ itemComponent: I(dt),
244
250
  itemType: "emoji",
245
251
  ...n
246
252
  },
@@ -278,14 +284,14 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
278
284
  }
279
285
  };
280
286
  }
281
- }, ht = /(:\w+:)$/, ft = new RegExp(W + "$"), pt = (e) => {
287
+ }, ft = /(:\w+:)$/, pt = new RegExp(q + "$"), gt = (e) => {
282
288
  if (e && H(e[0]))
283
289
  return { text: e[2] || e[0] };
284
- }, gt = (e) => [...e.matchAll(Ne)].filter((o) => H(o[0])).map((o) => ({
290
+ }, _t = (e) => [...e.matchAll(Fe)].filter((o) => H(o[0])).map((o) => ({
285
291
  index: o.index,
286
292
  text: o[0],
287
293
  match: o
288
- })), _t = ee.create({
294
+ })), yt = ee.create({
289
295
  name: "emoji",
290
296
  addOptions() {
291
297
  return {
@@ -297,7 +303,7 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
297
303
  selectable: !1,
298
304
  atom: !0,
299
305
  addNodeView() {
300
- return I(ot);
306
+ return O(ot);
301
307
  },
302
308
  addAttributes() {
303
309
  return {
@@ -314,7 +320,7 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
314
320
  ];
315
321
  },
316
322
  renderText({ node: e }) {
317
- return He(H(e.attrs.code).unicode_output);
323
+ return Ne(H(e.attrs.code).unicode_output);
318
324
  },
319
325
  renderHTML({ HTMLAttributes: e }) {
320
326
  return ["emoji-component", b(this.options.HTMLAttributes, e)];
@@ -323,9 +329,9 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
323
329
  return [
324
330
  new te({
325
331
  find: (e) => {
326
- const t = e.match(ht) || e.match(ft);
332
+ const t = e.match(ft) || e.match(pt);
327
333
  if (t)
328
- return pt(t);
334
+ return gt(t);
329
335
  },
330
336
  handler: ({ state: e, range: t, match: o }) => {
331
337
  const { tr: n } = e, r = t.from, i = t.to;
@@ -337,7 +343,7 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
337
343
  addPasteRules() {
338
344
  return [
339
345
  P({
340
- find: gt,
346
+ find: _t,
341
347
  type: this.type,
342
348
  getAttributes(e) {
343
349
  return {
@@ -346,7 +352,7 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
346
352
  }
347
353
  }),
348
354
  P({
349
- find: je,
355
+ find: He,
350
356
  type: this.type,
351
357
  getAttributes(e) {
352
358
  return {
@@ -358,12 +364,12 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
358
364
  },
359
365
  addProseMirrorPlugins() {
360
366
  return [
361
- Ie({
367
+ Oe({
362
368
  char: ":",
363
369
  pluginKey: new T("emoji"),
364
370
  editor: this.editor,
365
371
  ...this.options.suggestion,
366
- ...mt
372
+ ...ht
367
373
  })
368
374
  ];
369
375
  },
@@ -380,7 +386,7 @@ const dt = /* @__PURE__ */ g(lt, [["render", ct]]), A = {
380
386
  };
381
387
  }
382
388
  });
383
- function yt(e, t, o = () => !0) {
389
+ function wt(e, t, o = () => !0) {
384
390
  const n = [];
385
391
  t.lastIndex = 0;
386
392
  let r;
@@ -388,10 +394,10 @@ function yt(e, t, o = () => !0) {
388
394
  o(e, r) && n.push(r);
389
395
  return n;
390
396
  }
391
- function wt(e, t) {
397
+ function kt(e, t) {
392
398
  return !["#", "@"].includes(e.charAt(t.index)) && !["#", "@"].includes(e.charAt(t.index - 1));
393
399
  }
394
- function kt(e) {
400
+ function xt(e) {
395
401
  const t = new RegExp(
396
402
  "(?:" + [
397
403
  `[!?.,:;'"]`,
@@ -401,7 +407,7 @@ function kt(e) {
401
407
  );
402
408
  return e.replace(t, "");
403
409
  }
404
- function xt(e, t) {
410
+ function bt(e, t) {
405
411
  const o = e.slice(0, t + 1).search(/\S+\s*$/), n = e.slice(t).search(/\s/);
406
412
  if (n < 0) {
407
413
  const r = e.slice(o);
@@ -418,13 +424,13 @@ function xt(e, t) {
418
424
  };
419
425
  }
420
426
  function j(e, t, o, n) {
421
- const r = xt(e, t);
427
+ const r = bt(e, t);
422
428
  if (n.lastIndex = 0, !n.test(r.text))
423
429
  return r;
424
430
  const i = o === "left" ? r.from - 1 : r.to + 1;
425
431
  return i <= 0 || i >= e.length || i === t ? r : j(e, i, o, n);
426
432
  }
427
- function bt(e, t, o, n) {
433
+ function Ct(e, t, o, n) {
428
434
  const r = Math.max(e.from - 1, 0), i = Math.min(e.to + 1, t.content.size), s = ne(r, i, t);
429
435
  for (const a of s)
430
436
  a.mark.type === n && o.removeMark(a.from, a.to, n);
@@ -435,7 +441,7 @@ function U(e, t, o, n, r, i) {
435
441
  return;
436
442
  let s = o - t - 1;
437
443
  s = s < 0 ? 0 : s;
438
- const a = n - t, d = j(
444
+ const a = n - t, c = j(
439
445
  e,
440
446
  s,
441
447
  "left",
@@ -445,13 +451,13 @@ function U(e, t, o, n, r, i) {
445
451
  a,
446
452
  "right",
447
453
  V
448
- ), y = e.slice(d.from, f.to);
449
- yt(y, Ue, wt).forEach((D) => {
450
- const C = kt(D[0]), S = t + d.from + D.index + 1, Y = S + C.length;
454
+ ), y = e.slice(c.from, f.to);
455
+ wt(y, Ue, kt).forEach((D) => {
456
+ const C = xt(D[0]), S = t + c.from + D.index + 1, Y = S + C.length;
451
457
  r.addMark(S, Y, i.create());
452
458
  });
453
459
  }
454
- function Ct(e) {
460
+ function Tt(e) {
455
461
  let t = !1;
456
462
  return new ve({
457
463
  key: new T("autolink"),
@@ -461,12 +467,12 @@ function Ct(e) {
461
467
  return;
462
468
  const { tr: s } = r, { textContent: a } = r.doc;
463
469
  t || U(a, 0, 0, a.length, s, e.type), t = !0;
464
- const d = oe(
470
+ const c = oe(
465
471
  n.doc,
466
472
  [...o]
467
473
  );
468
- return re(d).forEach(({ oldRange: y, newRange: E }) => {
469
- bt(E, r.doc, s, e.type), ie(
474
+ return re(c).forEach(({ oldRange: y, newRange: E }) => {
475
+ Ct(E, r.doc, s, e.type), ie(
470
476
  r.doc,
471
477
  E,
472
478
  (C) => C.isTextblock
@@ -484,10 +490,10 @@ function Ct(e) {
484
490
  }
485
491
  });
486
492
  }
487
- const Tt = {
493
+ const Et = {
488
494
  class: "d-link d-c-text d-d-inline-block d-wb-break-all",
489
495
  rel: "noopener noreferrer nofollow"
490
- }, Et = se.create({
496
+ }, St = se.create({
491
497
  name: "CustomLink",
492
498
  renderHTML({ HTMLAttributes: e }) {
493
499
  return [
@@ -495,7 +501,7 @@ const Tt = {
495
501
  b(
496
502
  this.options.HTMLAttributes,
497
503
  e,
498
- Tt
504
+ Et
499
505
  )
500
506
  ];
501
507
  },
@@ -504,10 +510,10 @@ const Tt = {
504
510
  },
505
511
  addProseMirrorPlugins() {
506
512
  return [
507
- Ct({ type: this.type })
513
+ Tt({ type: this.type })
508
514
  ];
509
515
  }
510
- }), St = We.extend({
516
+ }), Lt = qe.extend({
511
517
  name: "ConfigurableImage",
512
518
  addAttributes() {
513
519
  return {
@@ -531,14 +537,14 @@ const Tt = {
531
537
  }
532
538
  };
533
539
  }
534
- }).configure({ inline: !0, allowBase64: !0 }), Lt = q.extend({
540
+ }).configure({ inline: !0, allowBase64: !0 }), Rt = W.extend({
535
541
  parseHTML() {
536
542
  return [{ tag: "div" }];
537
543
  },
538
544
  renderHTML({ HTMLAttributes: e }) {
539
545
  return ["div", b(this.options.HTMLAttributes, e), 0];
540
546
  }
541
- }), Rt = {
547
+ }), vt = {
542
548
  compatConfig: { MODE: 3 },
543
549
  name: "MentionComponent",
544
550
  components: {
@@ -552,8 +558,8 @@ const Tt = {
552
558
  }
553
559
  }
554
560
  };
555
- function vt(e, t, o, n, r, i) {
556
- const s = c("dt-link"), a = c("node-view-wrapper");
561
+ function Ot(e, t, o, n, r, i) {
562
+ const s = d("dt-link"), a = d("node-view-wrapper");
557
563
  return l(), h(a, { class: "d-d-inline-block" }, {
558
564
  default: u(() => [
559
565
  p(s, { kind: "mention" }, {
@@ -566,9 +572,9 @@ function vt(e, t, o, n, r, i) {
566
572
  _: 1
567
573
  });
568
574
  }
569
- const It = /* @__PURE__ */ g(Rt, [["render", vt]]), Ot = N.extend({
575
+ const It = /* @__PURE__ */ g(vt, [["render", Ot]]), Bt = N.extend({
570
576
  addNodeView() {
571
- return I(It);
577
+ return O(It);
572
578
  },
573
579
  parseHTML() {
574
580
  return [
@@ -601,7 +607,7 @@ const It = /* @__PURE__ */ g(Rt, [["render", vt]]), Ot = N.extend({
601
607
  char: "@",
602
608
  pluginKey: new T("mentionSuggestion")
603
609
  }
604
- }), Bt = {
610
+ }), Mt = {
605
611
  compatConfig: { MODE: 3 },
606
612
  name: "ChannelComponent",
607
613
  components: {
@@ -615,8 +621,8 @@ const It = /* @__PURE__ */ g(Rt, [["render", vt]]), Ot = N.extend({
615
621
  }
616
622
  }
617
623
  };
618
- function Mt(e, t, o, n, r, i) {
619
- const s = c("dt-link"), a = c("node-view-wrapper");
624
+ function $t(e, t, o, n, r, i) {
625
+ const s = d("dt-link"), a = d("node-view-wrapper");
620
626
  return l(), h(a, { class: "d-d-inline-block" }, {
621
627
  default: u(() => [
622
628
  p(s, { kind: "mention" }, {
@@ -629,10 +635,10 @@ function Mt(e, t, o, n, r, i) {
629
635
  _: 1
630
636
  });
631
637
  }
632
- const $t = /* @__PURE__ */ g(Bt, [["render", Mt]]), At = N.extend({
638
+ const At = /* @__PURE__ */ g(Mt, [["render", $t]]), Dt = N.extend({
633
639
  name: "channel",
634
640
  addNodeView() {
635
- return I($t);
641
+ return O(At);
636
642
  },
637
643
  parseHTML() {
638
644
  return [
@@ -665,7 +671,7 @@ const $t = /* @__PURE__ */ g(Bt, [["render", Mt]]), At = N.extend({
665
671
  char: "#",
666
672
  pluginKey: new T("channelSuggestion")
667
673
  }
668
- }), Dt = {
674
+ }), Pt = {
669
675
  compatConfig: { MODE: 3 },
670
676
  name: "SlashCommandsComponent",
671
677
  components: {
@@ -688,8 +694,8 @@ const $t = /* @__PURE__ */ g(Bt, [["render", Mt]]), At = N.extend({
688
694
  t && typeof t == "function" && t(e);
689
695
  }
690
696
  };
691
- function Pt(e, t, o, n, r, i) {
692
- const s = c("node-view-wrapper");
697
+ function jt(e, t, o, n, r, i) {
698
+ const s = d("node-view-wrapper");
693
699
  return l(), h(s, { class: "d-d-inline-block" }, {
694
700
  default: u(() => [
695
701
  k(m(i.text), 1)
@@ -697,14 +703,14 @@ function Pt(e, t, o, n, r, i) {
697
703
  _: 1
698
704
  });
699
705
  }
700
- const jt = /* @__PURE__ */ g(Dt, [["render", Pt]]), Ht = (e, t) => [...e.matchAll(t)].map((n) => {
706
+ const Ht = /* @__PURE__ */ g(Pt, [["render", jt]]), Nt = (e, t) => [...e.matchAll(t)].map((n) => {
701
707
  let r = n[2];
702
708
  return r.endsWith(" ") || (r += " "), {
703
709
  index: n.index,
704
710
  text: r,
705
711
  match: n
706
712
  };
707
- }), Nt = N.extend({
713
+ }), Ft = N.extend({
708
714
  name: "slash-commands",
709
715
  group: "inline",
710
716
  inline: !0,
@@ -721,7 +727,7 @@ const jt = /* @__PURE__ */ g(Dt, [["render", Pt]]), Ht = (e, t) => [...e.matchAl
721
727
  };
722
728
  },
723
729
  addNodeView() {
724
- return I(jt);
730
+ return O(Ht);
725
731
  },
726
732
  parseHTML() {
727
733
  return [
@@ -767,7 +773,7 @@ const jt = /* @__PURE__ */ g(Dt, [["render", Pt]]), Ht = (e, t) => [...e.matchAl
767
773
  const e = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) ?$`, "g");
768
774
  return [
769
775
  P({
770
- find: (n) => Ht(n, t),
776
+ find: (n) => Nt(n, t),
771
777
  type: this.type,
772
778
  getAttributes(n) {
773
779
  return { command: n[0].trim() };
@@ -780,7 +786,7 @@ const jt = /* @__PURE__ */ g(Dt, [["render", Pt]]), Ht = (e, t) => [...e.matchAl
780
786
  char: "/",
781
787
  pluginKey: new T("slashCommandSuggestion")
782
788
  }
783
- }), Ft = {
789
+ }), Kt = {
784
790
  compatConfig: { MODE: 3 },
785
791
  name: "MentionSuggestion",
786
792
  components: {
@@ -821,15 +827,15 @@ const jt = /* @__PURE__ */ g(Dt, [["render", Pt]]), Ht = (e, t) => [...e.matchAl
821
827
  return this.item.showDetails;
822
828
  }
823
829
  }
824
- }, Kt = { class: "d-mention-suggestion__name" }, Vt = {
830
+ }, Vt = { class: "d-mention-suggestion__name" }, Ut = {
825
831
  key: 1,
826
832
  class: "d-mention-suggestion__divider"
827
- }, Ut = {
833
+ }, Wt = {
828
834
  key: 2,
829
835
  class: "d-mention-suggestion__status"
830
836
  };
831
837
  function qt(e, t, o, n, r, i) {
832
- const s = c("dt-avatar"), a = c("dt-stack");
838
+ const s = d("dt-avatar"), a = d("dt-stack");
833
839
  return l(), h(a, {
834
840
  direction: "row",
835
841
  class: "d-mention-suggestion__container",
@@ -849,7 +855,7 @@ function qt(e, t, o, n, r, i) {
849
855
  gap: "100"
850
856
  }, {
851
857
  default: u(() => [
852
- w("span", Kt, m(i.name), 1),
858
+ w("span", Vt, m(i.name), 1),
853
859
  i.showDetails ? (l(), h(a, {
854
860
  key: 0,
855
861
  direction: "row",
@@ -861,8 +867,8 @@ function qt(e, t, o, n, r, i) {
861
867
  key: 0,
862
868
  class: z(["d-mention-suggestion__presence", [i.presenceFontColorClass]])
863
869
  }, m(i.presenceText), 3)) : x("", !0),
864
- i.status && i.presenceText ? (l(), _("div", Vt, " • ")) : x("", !0),
865
- i.status ? (l(), _("div", Ut, m(i.status), 1)) : x("", !0)
870
+ i.status && i.presenceText ? (l(), _("div", Ut, " • ")) : x("", !0),
871
+ i.status ? (l(), _("div", Wt, m(i.status), 1)) : x("", !0)
866
872
  ]),
867
873
  _: 1
868
874
  })) : x("", !0)
@@ -873,7 +879,7 @@ function qt(e, t, o, n, r, i) {
873
879
  _: 1
874
880
  });
875
881
  }
876
- const Wt = /* @__PURE__ */ g(Ft, [["render", qt]]), zt = {
882
+ const zt = /* @__PURE__ */ g(Kt, [["render", qt]]), Xt = {
877
883
  // This function comes from the user and passed to the editor directly.
878
884
  // This will also activate the mention plugin on the editor
879
885
  // items: ({ query }) => { return [] },
@@ -884,7 +890,7 @@ const Wt = /* @__PURE__ */ g(Ft, [["render", qt]]), zt = {
884
890
  onStart: (n) => {
885
891
  e = new v($, {
886
892
  props: {
887
- itemComponent: O(Wt),
893
+ itemComponent: I(zt),
888
894
  itemType: "mention",
889
895
  ...n
890
896
  },
@@ -922,7 +928,7 @@ const Wt = /* @__PURE__ */ g(Ft, [["render", qt]]), zt = {
922
928
  }
923
929
  };
924
930
  }
925
- }, Xt = {
931
+ }, Jt = {
926
932
  compatConfig: { MODE: 3 },
927
933
  name: "ChannelSuggestion",
928
934
  components: {
@@ -942,9 +948,9 @@ const Wt = /* @__PURE__ */ g(Ft, [["render", qt]]), zt = {
942
948
  }
943
949
  }
944
950
  };
945
- function Jt(e, t, o, n, r, i) {
946
- const s = c("dt-icon-hash"), a = c("dt-icon-lock"), d = c("dt-stack");
947
- return l(), h(d, {
951
+ function Yt(e, t, o, n, r, i) {
952
+ const s = d("dt-icon-hash"), a = d("dt-icon-lock"), c = d("dt-stack");
953
+ return l(), h(c, {
948
954
  direction: "row",
949
955
  gap: "400"
950
956
  }, {
@@ -961,7 +967,7 @@ function Jt(e, t, o, n, r, i) {
961
967
  _: 1
962
968
  });
963
969
  }
964
- const Yt = /* @__PURE__ */ g(Xt, [["render", Jt]]), Gt = {
970
+ const Gt = /* @__PURE__ */ g(Jt, [["render", Yt]]), Qt = {
965
971
  // This function comes from the user and passed to the editor directly.
966
972
  // This will also activate the mention plugin on the editor
967
973
  // items: ({ query }) => { return [] },
@@ -972,7 +978,7 @@ const Yt = /* @__PURE__ */ g(Xt, [["render", Jt]]), Gt = {
972
978
  onStart: (n) => {
973
979
  e = new v($, {
974
980
  props: {
975
- itemComponent: O(Yt),
981
+ itemComponent: I(Gt),
976
982
  itemType: "channel",
977
983
  ...n
978
984
  },
@@ -1010,7 +1016,7 @@ const Yt = /* @__PURE__ */ g(Xt, [["render", Jt]]), Gt = {
1010
1016
  }
1011
1017
  };
1012
1018
  }
1013
- }, Qt = {
1019
+ }, Zt = {
1014
1020
  compatConfig: { MODE: 3 },
1015
1021
  name: "SlashCommandSuggestion",
1016
1022
  props: {
@@ -1030,17 +1036,17 @@ const Yt = /* @__PURE__ */ g(Xt, [["render", Jt]]), Gt = {
1030
1036
  return this.item.parametersExample;
1031
1037
  }
1032
1038
  }
1033
- }, Zt = { class: "d-body--md-compact" }, en = { key: 0 }, tn = { class: "d-body--sm d-fc-tertiary" };
1034
- function nn(e, t, o, n, r, i) {
1039
+ }, en = { class: "d-body--md-compact" }, tn = { key: 0 }, nn = { class: "d-body--sm d-fc-tertiary" };
1040
+ function on(e, t, o, n, r, i) {
1035
1041
  return l(), _("div", null, [
1036
- w("div", Zt, [
1042
+ w("div", en, [
1037
1043
  w("span", null, "/" + m(i.command), 1),
1038
- i.parametersExample ? (l(), _("span", en, m(i.parametersExample), 1)) : x("", !0)
1044
+ i.parametersExample ? (l(), _("span", tn, m(i.parametersExample), 1)) : x("", !0)
1039
1045
  ]),
1040
- w("div", tn, m(i.description), 1)
1046
+ w("div", nn, m(i.description), 1)
1041
1047
  ]);
1042
1048
  }
1043
- const on = /* @__PURE__ */ g(Qt, [["render", nn]]), rn = {
1049
+ const rn = /* @__PURE__ */ g(Zt, [["render", on]]), sn = {
1044
1050
  // This function comes from the user and passed to the editor directly.
1045
1051
  // This will also activate the mention plugin on the editor
1046
1052
  // items: ({ query }) => { return [] },
@@ -1053,7 +1059,7 @@ const on = /* @__PURE__ */ g(Qt, [["render", nn]]), rn = {
1053
1059
  e = new v($, {
1054
1060
  parent: void 0,
1055
1061
  props: {
1056
- itemComponent: O(on),
1062
+ itemComponent: I(rn),
1057
1063
  itemType: "slash-command",
1058
1064
  ...n
1059
1065
  },
@@ -1091,7 +1097,7 @@ const on = /* @__PURE__ */ g(Qt, [["render", nn]]), rn = {
1091
1097
  }
1092
1098
  };
1093
1099
  }
1094
- }, sn = {
1100
+ }, an = {
1095
1101
  compatConfig: { MODE: 3 },
1096
1102
  name: "DtRichTextEditor",
1097
1103
  components: {
@@ -1464,7 +1470,7 @@ const on = /* @__PURE__ */ g(Qt, [["render", nn]]), rn = {
1464
1470
  // eslint-disable-next-line complexity
1465
1471
  extensions() {
1466
1472
  const e = [me, Ce, Ee, he];
1467
- e.push(this.useDivTags ? Lt : q), this.allowBlockquote && e.push(ce), this.allowBold && e.push(pe), this.allowBulletList && (e.push(ge), e.push(we.extend({
1473
+ e.push(this.useDivTags ? Rt : W), this.allowBold && e.push(pe), this.allowBlockquote && e.push(ce), this.allowBulletList && (e.push(ge), e.push(we.extend({
1468
1474
  renderText({ node: n }) {
1469
1475
  return n.textContent;
1470
1476
  }
@@ -1485,31 +1491,38 @@ const on = /* @__PURE__ */ g(Qt, [["render", nn]]), rn = {
1485
1491
  };
1486
1492
  }
1487
1493
  });
1488
- if (e.push(o), this.link && e.push(ye.extend({ inclusive: !1 }).configure({
1494
+ if (e.push(o), this.link && e.push(ye.extend({
1495
+ inclusive: !1,
1496
+ addKeyboardShortcuts() {
1497
+ return {
1498
+ "Mod-k": () => (t.$emit("edit-link"), !0)
1499
+ };
1500
+ }
1501
+ }).configure({
1489
1502
  HTMLAttributes: {
1490
1503
  class: "d-link d-wb-break-all"
1491
1504
  },
1492
1505
  openOnClick: !1,
1493
1506
  autolink: !0,
1494
1507
  protocols: K
1495
- })), this.customLink && e.push(this.getExtension(Et, this.customLink)), this.mentionSuggestion) {
1496
- const n = { ...this.mentionSuggestion, ...zt };
1497
- e.push(Ot.configure({ suggestion: n }));
1508
+ })), this.customLink && e.push(this.getExtension(St, this.customLink)), this.mentionSuggestion) {
1509
+ const n = { ...this.mentionSuggestion, ...Xt };
1510
+ e.push(Bt.configure({ suggestion: n }));
1498
1511
  }
1499
1512
  if (this.channelSuggestion) {
1500
- const n = { ...this.channelSuggestion, ...Gt };
1501
- e.push(At.configure({ suggestion: n }));
1513
+ const n = { ...this.channelSuggestion, ...Qt };
1514
+ e.push(Dt.configure({ suggestion: n }));
1502
1515
  }
1503
1516
  if (this.slashCommandSuggestion) {
1504
- const n = { ...this.slashCommandSuggestion, ...rn };
1505
- e.push(Nt.configure({
1517
+ const n = { ...this.slashCommandSuggestion, ...sn };
1518
+ e.push(Ft.configure({
1506
1519
  suggestion: n,
1507
1520
  onSelectedCommand: (r) => {
1508
1521
  this.$emit("selected-command", r);
1509
1522
  }
1510
1523
  }));
1511
1524
  }
1512
- return e.push(_t), e.push(Te.configure({
1525
+ return e.push(yt), e.push(Te.configure({
1513
1526
  types: ["paragraph"]
1514
1527
  })), this.allowCode && e.push(ue), this.allowCodeblock && e.push(de.extend({
1515
1528
  renderText({ node: n }) {
@@ -1521,7 +1534,7 @@ ${n.textContent}
1521
1534
  HTMLAttributes: {
1522
1535
  class: "d-rich-text-editor__code-block"
1523
1536
  }
1524
- })), this.allowInlineImages && e.push(St), (this.allowFontFamily || this.allowFontColor) && (e.push(Se), this.allowFontColor && e.push(Le), this.allowFontFamily && e.push(Re)), this.additionalExtensions.length && e.push(...this.additionalExtensions), e;
1537
+ })), this.allowInlineImages && e.push(Lt), (this.allowFontFamily || this.allowFontColor) && (e.push(Se), this.allowFontColor && e.push(Le), this.allowFontFamily && e.push(Re)), this.additionalExtensions.length && e.push(...this.additionalExtensions), e;
1525
1538
  },
1526
1539
  inputAttrs() {
1527
1540
  const e = {
@@ -1561,7 +1574,7 @@ ${n.textContent}
1561
1574
  this.destroyEditor();
1562
1575
  },
1563
1576
  mounted() {
1564
- qe(F(this.$el), this.$options.name), this.processValue(this.modelValue, !1);
1577
+ We(F(this.$el), this.$options.name), this.processValue(this.modelValue, !1);
1565
1578
  },
1566
1579
  methods: {
1567
1580
  createEditor() {
@@ -1604,9 +1617,9 @@ ${n.textContent}
1604
1617
  * @param editor the editor instance.
1605
1618
  */
1606
1619
  getSelectedLinkText(e) {
1607
- var a, d, f;
1620
+ var a, c, f;
1608
1621
  const { view: t, state: o } = e, { from: n, to: r } = t.state.selection, i = o.doc.textBetween(n, r, ""), s = this.editor.state.doc.nodeAt(n);
1609
- return s && ((f = (d = (a = s.marks) == null ? void 0 : a.at(0)) == null ? void 0 : d.type) == null ? void 0 : f.name) === "link" ? s.textContent : i;
1622
+ return s && ((f = (c = (a = s.marks) == null ? void 0 : a.at(0)) == null ? void 0 : c.type) == null ? void 0 : f.name) === "link" ? s.textContent : i;
1610
1623
  },
1611
1624
  editLink() {
1612
1625
  const e = this.getSelectedLinkText(this.editor), t = {
@@ -1627,13 +1640,13 @@ ${n.textContent}
1627
1640
  },
1628
1641
  // eslint-disable-next-line complexity
1629
1642
  setLink(e, t, o, n = K, r) {
1630
- var a, d, f;
1643
+ var a, c, f;
1631
1644
  if (!e) {
1632
1645
  this.removeLink();
1633
1646
  return;
1634
1647
  }
1635
1648
  n.find((y) => y.test(e)) || (e = `${r}${e}`), this.editor.chain().focus().extendMarkRange("link").run();
1636
- const s = (f = (d = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : d.state) == null ? void 0 : f.selection;
1649
+ const s = (f = (c = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : c.state) == null ? void 0 : f.selection;
1637
1650
  this.editor.chain().focus().insertContent(t).setTextSelection({ from: s.from, to: s.from + t.length }).setLink({ href: e, class: o.class }).run();
1638
1651
  },
1639
1652
  // eslint-disable-next-line complexity
@@ -1641,7 +1654,7 @@ ${n.textContent}
1641
1654
  const o = this.getOutput();
1642
1655
  if (!(t && Qe(e, o))) {
1643
1656
  if (typeof e == "string" && this.outputFormat === "text") {
1644
- const n = new RegExp(`(${W})`, "g");
1657
+ const n = new RegExp(`(${q})`, "g");
1645
1658
  e = e == null ? void 0 : e.replace(n, '<emoji-component code="$1"></emoji-component>');
1646
1659
  }
1647
1660
  this.editor.commands.setContent(e, !1, { preserveWhitespace: "full" });
@@ -1773,11 +1786,11 @@ ${n.textContent}
1773
1786
  this.editor.commands.focus();
1774
1787
  }
1775
1788
  }
1776
- }, an = { class: "d-popover__dialog" };
1777
- function ln(e, t, o, n, r, i) {
1778
- const s = c("dt-button"), a = c("dt-stack"), d = c("bubble-menu"), f = c("editor-content");
1789
+ }, ln = { class: "d-popover__dialog" };
1790
+ function cn(e, t, o, n, r, i) {
1791
+ const s = d("dt-button"), a = d("dt-stack"), c = d("bubble-menu"), f = d("editor-content");
1779
1792
  return l(), _("div", null, [
1780
- r.editor && o.link && !o.hideLinkBubbleMenu ? (l(), h(d, {
1793
+ r.editor && o.link && !o.hideLinkBubbleMenu ? (l(), h(c, {
1781
1794
  key: 0,
1782
1795
  editor: r.editor,
1783
1796
  "should-show": i.bubbleMenuShouldShow,
@@ -1785,7 +1798,7 @@ function ln(e, t, o, n, r, i) {
1785
1798
  style: { visibility: "visible" }
1786
1799
  }, {
1787
1800
  default: u(() => [
1788
- w("div", an, [
1801
+ w("div", ln, [
1789
1802
  p(a, {
1790
1803
  direction: "row",
1791
1804
  class: "d-rich-text-editor-bubble-menu__button-stack",
@@ -1837,7 +1850,7 @@ function ln(e, t, o, n, r, i) {
1837
1850
  }, i.attrs), null, 16, ["editor"])
1838
1851
  ]);
1839
1852
  }
1840
- const eo = /* @__PURE__ */ g(sn, [["render", ln]]);
1853
+ const eo = /* @__PURE__ */ g(an, [["render", cn]]);
1841
1854
  export {
1842
1855
  eo as default
1843
1856
  };