@dialpad/dialtone 9.158.0 → 9.160.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 (166) hide show
  1. package/dist/css/dialtone-default-theme.css +20 -1
  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 +20 -1
  5. package/dist/css/dialtone.min.css +1 -1
  6. package/dist/tokens/doc.json +84323 -84323
  7. package/dist/vue3/common/test-utils/node-traversal.cjs +2 -0
  8. package/dist/vue3/common/test-utils/node-traversal.cjs.map +1 -0
  9. package/dist/vue3/common/test-utils/node-traversal.js +54 -0
  10. package/dist/vue3/common/test-utils/node-traversal.js.map +1 -0
  11. package/dist/vue3/component-documentation.json +1 -1
  12. package/dist/vue3/dialtone-vue.cjs +1 -1
  13. package/dist/vue3/dialtone-vue.js +155 -153
  14. package/dist/vue3/dialtone-vue.js.map +1 -1
  15. package/dist/vue3/lib/button/button.cjs +1 -1
  16. package/dist/vue3/lib/button/button.cjs.map +1 -1
  17. package/dist/vue3/lib/button/button.js +146 -81
  18. package/dist/vue3/lib/button/button.js.map +1 -1
  19. package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
  20. package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
  21. package/dist/vue3/lib/datepicker/datepicker.js +306 -242
  22. package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
  23. package/dist/vue3/lib/datepicker/utils.cjs +1 -1
  24. package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
  25. package/dist/vue3/lib/datepicker/utils.js +40 -40
  26. package/dist/vue3/lib/datepicker/utils.js.map +1 -1
  27. package/dist/vue3/lib/dropdown/dropdown-separator.cjs +1 -1
  28. package/dist/vue3/lib/editor/editor.cjs +1 -1
  29. package/dist/vue3/lib/editor/editor.cjs.map +1 -1
  30. package/dist/vue3/lib/editor/editor.js +284 -148
  31. package/dist/vue3/lib/editor/editor.js.map +1 -1
  32. package/dist/vue3/lib/general-row/index.cjs +1 -1
  33. package/dist/vue3/lib/general-row/index.js +6 -4
  34. package/dist/vue3/lib/general-row/index.js.map +1 -1
  35. package/dist/vue3/lib/link/link.cjs +1 -1
  36. package/dist/vue3/lib/link/link.cjs.map +1 -1
  37. package/dist/vue3/lib/link/link.js +58 -18
  38. package/dist/vue3/lib/link/link.js.map +1 -1
  39. package/dist/vue3/lib/list-item-group/list-item-group.cjs +1 -1
  40. package/dist/vue3/lib/list-item-group/list-item-group.js +5 -5
  41. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  42. package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
  43. package/dist/vue3/lib/message-input/message-input.js +9 -7
  44. package/dist/vue3/lib/message-input/message-input.js.map +1 -1
  45. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +4 -4
  46. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  47. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +466 -283
  48. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  49. package/dist/vue3/lib/tooltip-directive/tooltip.cjs +1 -1
  50. package/dist/vue3/lib/tooltip-directive/tooltip.cjs.map +1 -1
  51. package/dist/vue3/lib/tooltip-directive/tooltip.js +69 -67
  52. package/dist/vue3/lib/tooltip-directive/tooltip.js.map +1 -1
  53. package/dist/vue3/localization/en-US.cjs +6 -0
  54. package/dist/vue3/localization/en-US.cjs.map +1 -1
  55. package/dist/vue3/localization/en-US.js +6 -0
  56. package/dist/vue3/localization/en-US.js.map +1 -1
  57. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +68 -1
  58. package/dist/vue3/types/common/test_utils/node_traversal.d.ts +10 -0
  59. package/dist/vue3/types/common/test_utils/node_traversal.d.ts.map +1 -0
  60. package/dist/vue3/types/components/banner/banner.vue.d.ts +136 -2
  61. package/dist/vue3/types/components/banner/banner.vue.d.ts.map +1 -1
  62. package/dist/vue3/types/components/breadcrumbs/breadcrumb_item.vue.d.ts +39 -1
  63. package/dist/vue3/types/components/breadcrumbs/breadcrumb_item.vue.d.ts.map +1 -1
  64. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +39 -1
  65. package/dist/vue3/types/components/button/button.vue.d.ts +68 -1
  66. package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
  67. package/dist/vue3/types/components/chip/chip.vue.d.ts +68 -1
  68. package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
  69. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +68 -1
  70. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  71. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts +4 -0
  72. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
  73. package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts +8 -0
  74. package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
  75. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +4 -0
  76. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
  77. package/dist/vue3/types/components/datepicker/utils.d.ts +1 -1
  78. package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
  79. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +136 -2
  80. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  81. package/dist/vue3/types/components/hovercard/hovercard.vue.d.ts +272 -4
  82. package/dist/vue3/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
  83. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +136 -2
  84. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  85. package/dist/vue3/types/components/link/link.vue.d.ts +39 -1
  86. package/dist/vue3/types/components/link/link.vue.d.ts.map +1 -1
  87. package/dist/vue3/types/components/modal/modal.vue.d.ts +136 -2
  88. package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
  89. package/dist/vue3/types/components/notice/notice.vue.d.ts +136 -2
  90. package/dist/vue3/types/components/notice/notice.vue.d.ts.map +1 -1
  91. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +136 -2
  92. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  93. package/dist/vue3/types/components/pagination/pagination.vue.d.ts +68 -1
  94. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  95. package/dist/vue3/types/components/popover/popover.vue.d.ts +136 -2
  96. package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
  97. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +68 -1
  98. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  99. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +39 -1
  100. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts.map +1 -1
  101. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +39 -1
  102. package/dist/vue3/types/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts +1804 -0
  103. package/dist/vue3/types/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts.map +1 -0
  104. package/dist/vue3/types/components/rich_text_editor/extensions/variable/index.d.ts +3 -0
  105. package/dist/vue3/types/components/rich_text_editor/extensions/variable/index.d.ts.map +1 -0
  106. package/dist/vue3/types/components/rich_text_editor/extensions/variable/variable.d.ts +3 -0
  107. package/dist/vue3/types/components/rich_text_editor/extensions/variable/variable.d.ts.map +1 -0
  108. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +87 -1
  109. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  110. package/dist/vue3/types/components/split_button/split_button-alpha.vue.d.ts +68 -1
  111. package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +68 -1
  112. package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts.map +1 -1
  113. package/dist/vue3/types/components/split_button/split_button.vue.d.ts +272 -4
  114. package/dist/vue3/types/components/split_button/split_button.vue.d.ts.map +1 -1
  115. package/dist/vue3/types/components/tab/tab.vue.d.ts +68 -1
  116. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +136 -2
  117. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  118. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +136 -2
  119. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  120. package/dist/vue3/types/components/toast/toast.vue.d.ts +544 -8
  121. package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
  122. package/dist/vue3/types/directives/tooltip_directive/tooltip.d.ts.map +1 -1
  123. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +68 -1
  124. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
  125. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +272 -4
  126. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  127. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +272 -4
  128. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  129. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +204 -3
  130. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  131. package/dist/vue3/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +68 -1
  132. package/dist/vue3/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
  133. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +136 -2
  134. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  135. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +272 -4
  136. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  137. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +204 -3
  138. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  139. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +664 -4
  140. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  141. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +68 -1
  142. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  143. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +68 -1
  144. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  145. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +68 -1
  146. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  147. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +631 -9
  148. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  149. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts +68 -1
  150. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -1
  151. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +272 -4
  152. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  153. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +68 -1
  154. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  155. package/dist/vue3/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +68 -1
  156. package/dist/vue3/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts.map +1 -1
  157. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +68 -1
  158. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  159. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +68 -1
  160. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  161. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +68 -1
  162. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  163. package/dist/vue3/types/recipes/leftbar/general_row/index.d.ts +1 -0
  164. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +68 -1
  165. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  166. package/package.json +4 -4
@@ -1,67 +1,70 @@
1
- import { nodeViewProps as $, NodeViewWrapper as v, VueRenderer as R, VueNodeViewRenderer as I, BubbleMenu as Q, EditorContent as Z, Editor as ee } from "../../node_modules/@tiptap/vue-3.js";
2
- import { Node as te, nodePasteRule as A, InputRule as ne, mergeAttributes as b, getMarksBetween as oe, combineTransactionSteps as re, getChangedRanges as se, findChildrenInRange as ie, Mark as ae, nodeInputRule as ce, Extension as le } from "@tiptap/core";
3
- import de from "@tiptap/extension-blockquote";
4
- import ue from "@tiptap/extension-code-block";
5
- import me from "@tiptap/extension-code";
6
- import he from "@tiptap/extension-document";
7
- import pe from "@tiptap/extension-gapcursor";
8
- import fe from "@tiptap/extension-hard-break";
9
- import W from "@tiptap/extension-paragraph";
10
- import ge from "@tiptap/extension-placeholder";
11
- import _e from "@tiptap/extension-bold";
12
- import ke from "@tiptap/extension-bullet-list";
13
- import ye from "@tiptap/extension-italic";
14
- import we from "@tiptap/extension-link";
1
+ import { nodeViewProps as L, NodeViewWrapper as v, VueRenderer as R, VueNodeViewRenderer as S, BubbleMenu as ne, EditorContent as oe, Editor as re } from "../../node_modules/@tiptap/vue-3.js";
2
+ import { Node as W, nodePasteRule as O, InputRule as se, mergeAttributes as T, getMarksBetween as ie, combineTransactionSteps as ae, getChangedRanges as ce, findChildrenInRange as le, Mark as de, nodeInputRule as ue, Extension as me } from "@tiptap/core";
3
+ import he from "@tiptap/extension-blockquote";
4
+ import pe from "@tiptap/extension-code-block";
5
+ import fe from "@tiptap/extension-code";
6
+ import ge from "@tiptap/extension-document";
7
+ import _e from "@tiptap/extension-gapcursor";
8
+ import ke from "@tiptap/extension-hard-break";
9
+ import z from "@tiptap/extension-paragraph";
10
+ import ye from "@tiptap/extension-placeholder";
11
+ import be from "@tiptap/extension-bold";
12
+ import we from "@tiptap/extension-bullet-list";
13
+ import Te from "@tiptap/extension-italic";
14
+ import xe from "@tiptap/extension-link";
15
15
  import Ce from "@tiptap/extension-list-item";
16
- import be from "@tiptap/extension-ordered-list";
17
- import xe from "@tiptap/extension-strike";
18
- import Te from "@tiptap/extension-underline";
19
- import Ee from "@tiptap/extension-text";
20
- import Se from "@tiptap/extension-text-align";
21
- import Le from "@tiptap/extension-history";
22
- import $e from "@tiptap/extension-table";
23
- import ve from "@tiptap/extension-table-cell";
24
- import Re from "@tiptap/extension-table-header";
25
- import Ie from "@tiptap/extension-table-row";
26
- import Me from "@tiptap/extension-text-style";
27
- import Be from "@tiptap/extension-color";
28
- import Ne from "@tiptap/extension-font-family";
29
- import { PluginKey as T, Plugin as Oe } from "@tiptap/pm/state";
30
- import De from "@tiptap/suggestion";
31
- import { emojiPattern as z } from "regex-combined-emojis";
32
- import { resolveComponent as d, openBlock as l, createBlock as m, withCtx as u, createVNode as f, createElementBlock as _, withDirectives as Ae, createElementVNode as k, Fragment as Pe, renderList as je, withModifiers as j, normalizeClass as X, resolveDynamicComponent as He, vShow as Ke, createTextVNode as C, toDisplayString as h, markRaw as M, createCommentVNode as w, mergeProps as Fe } from "vue";
16
+ import Ee from "@tiptap/extension-ordered-list";
17
+ import Le from "@tiptap/extension-strike";
18
+ import ve from "@tiptap/extension-underline";
19
+ import Se from "@tiptap/extension-text";
20
+ import $e from "@tiptap/extension-text-align";
21
+ import Ie from "@tiptap/extension-history";
22
+ import Ae from "@tiptap/extension-table";
23
+ import Re from "@tiptap/extension-table-cell";
24
+ import Me from "@tiptap/extension-table-header";
25
+ import Be from "@tiptap/extension-table-row";
26
+ import Ne from "@tiptap/extension-text-style";
27
+ import De from "@tiptap/extension-color";
28
+ import Oe from "@tiptap/extension-font-family";
29
+ import { PluginKey as $, Plugin as He } from "@tiptap/pm/state";
30
+ import Pe from "@tiptap/suggestion";
31
+ import { emojiPattern as X } from "regex-combined-emojis";
32
+ import { resolveComponent as l, openBlock as d, createBlock as p, withCtx as u, createVNode as m, createElementBlock as y, withDirectives as je, createElementVNode as b, Fragment as Ve, renderList as Ke, withModifiers as P, normalizeClass as G, resolveDynamicComponent as Fe, vShow as Ue, createTextVNode as C, toDisplayString as f, markRaw as M, createCommentVNode as w, withKeys as qe, mergeProps as J } from "vue";
33
33
  import { _ as g } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
34
- import J from "../emoji/emoji.js";
35
- import { getEmojiData as Ve, emojiRegex as qe, stringToUnicode as Ue, codeToEmojiData as H, emojiShortCodeRegex as We } from "../../common/emoji/index.js";
36
- import ze from "../list-item/list-item.js";
37
- import E from "../stack/stack.js";
34
+ import Y from "../emoji/emoji.js";
35
+ import { getEmojiData as We, emojiRegex as ze, stringToUnicode as Xe, codeToEmojiData as j, emojiShortCodeRegex as Ge } from "../../common/emoji/index.js";
36
+ import Je from "../list-item/list-item.js";
37
+ import I from "../stack/stack.js";
38
38
  import B from "tippy.js";
39
- import { linkRegex as Xe, getPhoneNumberRegex as Je, warnIfUnmounted as Ge, returnFirstEl as F } from "../../common/utils/index.js";
40
- import Ye from "@tiptap/extension-image";
41
- import K from "@tiptap/extension-mention";
42
- import G from "../link/link.js";
43
- import { DtIconLock as Qe } from "@dialpad/dialtone-icons/vue3";
44
- import { RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as V, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Ze, RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as et } from "./rich-text-editor-constants.js";
45
- import tt from "../avatar/avatar.js";
46
- import nt from "@dialpad/dialtone-icons/vue3/hash";
47
- import ot from "@dialpad/dialtone-icons/vue3/lock";
48
- import rt from "deep-equal";
49
- import { DialtoneLocalization as st } from "../../localization/index.js";
50
- import it from "../button/button.js";
51
- const at = {
39
+ import { linkRegex as Ye, getPhoneNumberRegex as Qe, warnIfUnmounted as Ze, returnFirstEl as K } from "../../common/utils/index.js";
40
+ import et from "@tiptap/extension-image";
41
+ import V from "@tiptap/extension-mention";
42
+ import Q from "../link/link.js";
43
+ import { DtIconLock as tt } from "@dialpad/dialtone-icons/vue3";
44
+ import { DialtoneLocalization as Z } from "../../localization/index.js";
45
+ import nt from "../input/input.js";
46
+ import ot from "../popover/popover.js";
47
+ import ee from "../button/button.js";
48
+ import rt from "../badge/badge.js";
49
+ import { RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as F, RICH_TEXT_EDITOR_OUTPUT_FORMATS as st, RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as it } from "./rich-text-editor-constants.js";
50
+ import at from "../avatar/avatar.js";
51
+ import ct from "@dialpad/dialtone-icons/vue3/hash";
52
+ import lt from "@dialpad/dialtone-icons/vue3/lock";
53
+ import dt from "deep-equal";
54
+ const ut = {
52
55
  compatConfig: { MODE: 3 },
53
56
  name: "EmojiComponent",
54
57
  components: {
55
58
  NodeViewWrapper: v,
56
- DtEmoji: J
59
+ DtEmoji: Y
57
60
  },
58
- props: $
61
+ props: L
59
62
  };
60
- function ct(e, t, o, n, r, s) {
61
- const i = d("dt-emoji"), a = d("node-view-wrapper");
62
- return l(), m(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
63
+ function mt(e, t, o, n, r, s) {
64
+ const i = l("dt-emoji"), a = l("node-view-wrapper");
65
+ return d(), p(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
63
66
  default: u(() => [
64
- f(i, {
67
+ m(i, {
65
68
  size: "500",
66
69
  code: e.node.attrs.code
67
70
  }, null, 8, ["code"])
@@ -69,11 +72,11 @@ function ct(e, t, o, n, r, s) {
69
72
  _: 1
70
73
  });
71
74
  }
72
- const lt = /* @__PURE__ */ g(at, [["render", ct]]), dt = {
75
+ const ht = /* @__PURE__ */ g(ut, [["render", mt]]), pt = {
73
76
  compatConfig: { MODE: 3 },
74
77
  name: "SuggestionList",
75
78
  components: {
76
- DtListItem: ze
79
+ DtListItem: Je
77
80
  },
78
81
  props: {
79
82
  items: {
@@ -142,40 +145,40 @@ const lt = /* @__PURE__ */ g(at, [["render", ct]]), dt = {
142
145
  }
143
146
  }
144
147
  }
145
- }, ut = { class: "d-popover__dialog d-suggestion-list__container" }, mt = {
148
+ }, ft = { class: "d-popover__dialog d-suggestion-list__container" }, gt = {
146
149
  ref: "suggestionList",
147
150
  class: "d-suggestion-list"
148
151
  };
149
- function ht(e, t, o, n, r, s) {
150
- const i = d("dt-list-item");
151
- return l(), _("div", ut, [
152
- Ae(k("ul", mt, [
153
- (l(!0), _(Pe, null, je(o.items, (a, c) => (l(), m(i, {
152
+ function _t(e, t, o, n, r, s) {
153
+ const i = l("dt-list-item");
154
+ return d(), y("div", ft, [
155
+ je(b("ul", gt, [
156
+ (d(!0), y(Ve, null, Ke(o.items, (a, c) => (d(), p(i, {
154
157
  key: a.id,
155
- class: X([
158
+ class: G([
156
159
  "d-suggestion-list__item",
157
160
  { "d-list-item--highlighted": c === r.selectedIndex }
158
161
  ]),
159
162
  "navigation-type": "arrow-keys",
160
- onClick: (p) => s.selectItem(c),
161
- onKeydown: j(s.onKeyDown, ["prevent"])
163
+ onClick: (h) => s.selectItem(c),
164
+ onKeydown: P(s.onKeyDown, ["prevent"])
162
165
  }, {
163
166
  default: u(() => [
164
- (l(), m(He(o.itemComponent), { item: a }, null, 8, ["item"]))
167
+ (d(), p(Fe(o.itemComponent), { item: a }, null, 8, ["item"]))
165
168
  ]),
166
169
  _: 2
167
170
  }, 1032, ["class", "onClick", "onKeydown"]))), 128))
168
171
  ], 512), [
169
- [Ke, o.items.length]
172
+ [Ue, o.items.length]
170
173
  ])
171
174
  ]);
172
175
  }
173
- const N = /* @__PURE__ */ g(dt, [["render", ht]]), pt = {
176
+ const N = /* @__PURE__ */ g(pt, [["render", _t]]), kt = {
174
177
  compatConfig: { MODE: 3 },
175
178
  name: "EmojiSuggestion",
176
179
  components: {
177
- DtEmoji: J,
178
- DtStack: E
180
+ DtEmoji: Y,
181
+ DtStack: I
179
182
  },
180
183
  props: {
181
184
  item: {
@@ -184,23 +187,23 @@ const N = /* @__PURE__ */ g(dt, [["render", ht]]), pt = {
184
187
  }
185
188
  }
186
189
  };
187
- function ft(e, t, o, n, r, s) {
188
- const i = d("dt-emoji"), a = d("dt-stack");
189
- return l(), m(a, {
190
+ function yt(e, t, o, n, r, s) {
191
+ const i = l("dt-emoji"), a = l("dt-stack");
192
+ return d(), p(a, {
190
193
  direction: "row",
191
194
  gap: "400"
192
195
  }, {
193
196
  default: u(() => [
194
- f(i, {
197
+ m(i, {
195
198
  size: "200",
196
199
  code: o.item.code
197
200
  }, null, 8, ["code"]),
198
- C(" " + h(o.item.code), 1)
201
+ C(" " + f(o.item.code), 1)
199
202
  ]),
200
203
  _: 1
201
204
  });
202
205
  }
203
- const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
206
+ const bt = /* @__PURE__ */ g(kt, [["render", yt]]), D = {
204
207
  name: "hideOnEsc",
205
208
  defaultValue: !0,
206
209
  fn({ hide: e }) {
@@ -216,15 +219,15 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
216
219
  }
217
220
  };
218
221
  }
219
- }, _t = 20, kt = (e, t, o) => {
222
+ }, wt = 20, Tt = (e, t, o) => {
220
223
  var a, c;
221
224
  const n = (a = e.shortname) == null ? void 0 : a.replaceAll(":", ""), r = (c = t.shortname) == null ? void 0 : c.replaceAll(":", ""), s = n.startsWith(o), i = r.startsWith(o);
222
225
  return s && !i ? -1 : !s && i ? 1 : n.localeCompare(r);
223
- }, yt = {
226
+ }, xt = {
224
227
  items: ({ query: e }) => {
225
228
  if (e.length < 2)
226
229
  return [];
227
- const t = Object.values(Ve());
230
+ const t = Object.values(We());
228
231
  return e = e.toLowerCase(), t.filter(
229
232
  (n) => {
230
233
  var r;
@@ -234,7 +237,7 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
234
237
  ...n.keywords || []
235
238
  ].some((s) => s && s.startsWith(e));
236
239
  }
237
- ).splice(0, _t).sort((n, r) => kt(n, r, e)).map((n) => ({ code: n.shortname }));
240
+ ).splice(0, wt).sort((n, r) => Tt(n, r, e)).map((n) => ({ code: n.shortname }));
238
241
  },
239
242
  command: ({ editor: e, range: t, props: o }) => {
240
243
  var s, i;
@@ -252,7 +255,7 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
252
255
  onStart: (n) => {
253
256
  e = new R(N, {
254
257
  props: {
255
- itemComponent: M(gt),
258
+ itemComponent: M(bt),
256
259
  itemType: "emoji",
257
260
  ...n
258
261
  },
@@ -272,7 +275,7 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
272
275
  trigger: "manual",
273
276
  placement: "top-start",
274
277
  zIndex: 650,
275
- plugins: [O]
278
+ plugins: [D]
276
279
  }), n.items.length > 0 && (t == null || t[0].show()));
277
280
  },
278
281
  onUpdate(n) {
@@ -290,14 +293,14 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
290
293
  }
291
294
  };
292
295
  }
293
- }, wt = /(:\w+:)$/, Ct = new RegExp(z + "$"), bt = (e) => {
294
- if (e && H(e[0]))
296
+ }, Ct = /(:\w+:)$/, Et = new RegExp(X + "$"), Lt = (e) => {
297
+ if (e && j(e[0]))
295
298
  return { text: e[2] || e[0] };
296
- }, xt = (e) => [...e.matchAll(We)].filter((o) => H(o[0])).map((o) => ({
299
+ }, vt = (e) => [...e.matchAll(Ge)].filter((o) => j(o[0])).map((o) => ({
297
300
  index: o.index,
298
301
  text: o[0],
299
302
  match: o
300
- })), Tt = te.create({
303
+ })), St = W.create({
301
304
  name: "emoji",
302
305
  addOptions() {
303
306
  return {
@@ -309,7 +312,7 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
309
312
  selectable: !1,
310
313
  atom: !0,
311
314
  addNodeView() {
312
- return I(lt);
315
+ return S(ht);
313
316
  },
314
317
  addAttributes() {
315
318
  return {
@@ -326,18 +329,18 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
326
329
  ];
327
330
  },
328
331
  renderText({ node: e }) {
329
- return Ue(H(e.attrs.code).unicode_output);
332
+ return Xe(j(e.attrs.code).unicode_output);
330
333
  },
331
334
  renderHTML({ HTMLAttributes: e }) {
332
- return ["emoji-component", b(this.options.HTMLAttributes, e)];
335
+ return ["emoji-component", T(this.options.HTMLAttributes, e)];
333
336
  },
334
337
  addInputRules() {
335
338
  return [
336
- new ne({
339
+ new se({
337
340
  find: (e) => {
338
- const t = e.match(wt) || e.match(Ct);
341
+ const t = e.match(Ct) || e.match(Et);
339
342
  if (t)
340
- return bt(t);
343
+ return Lt(t);
341
344
  },
342
345
  handler: ({ state: e, range: t, match: o }) => {
343
346
  const { tr: n } = e, r = t.from, s = t.to;
@@ -348,8 +351,8 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
348
351
  },
349
352
  addPasteRules() {
350
353
  return [
351
- A({
352
- find: xt,
354
+ O({
355
+ find: vt,
353
356
  type: this.type,
354
357
  getAttributes(e) {
355
358
  return {
@@ -357,8 +360,8 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
357
360
  };
358
361
  }
359
362
  }),
360
- A({
361
- find: qe,
363
+ O({
364
+ find: ze,
362
365
  type: this.type,
363
366
  getAttributes(e) {
364
367
  return {
@@ -370,12 +373,12 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
370
373
  },
371
374
  addProseMirrorPlugins() {
372
375
  return [
373
- De({
376
+ Pe({
374
377
  char: ":",
375
- pluginKey: new T("emoji"),
378
+ pluginKey: new $("emoji"),
376
379
  editor: this.editor,
377
380
  ...this.options.suggestion,
378
- ...yt
381
+ ...xt
379
382
  })
380
383
  ];
381
384
  },
@@ -392,7 +395,7 @@ const gt = /* @__PURE__ */ g(pt, [["render", ft]]), O = {
392
395
  };
393
396
  }
394
397
  });
395
- function Et(e, t, o = () => !0) {
398
+ function $t(e, t, o = () => !0) {
396
399
  const n = [];
397
400
  t.lastIndex = 0;
398
401
  let r;
@@ -400,10 +403,10 @@ function Et(e, t, o = () => !0) {
400
403
  o(e, r) && n.push(r);
401
404
  return n;
402
405
  }
403
- function St(e, t) {
406
+ function It(e, t) {
404
407
  return !["#", "@"].includes(e.charAt(t.index)) && !["#", "@"].includes(e.charAt(t.index - 1));
405
408
  }
406
- function Lt(e) {
409
+ function At(e) {
407
410
  const t = new RegExp(
408
411
  "(?:" + [
409
412
  `[!?.,:;'"]`,
@@ -413,7 +416,7 @@ function Lt(e) {
413
416
  );
414
417
  return e.replace(t, "");
415
418
  }
416
- function $t(e, t) {
419
+ function Rt(e, t) {
417
420
  const o = e.slice(0, t + 1).search(/\S+\s*$/), n = e.slice(t).search(/\s/);
418
421
  if (n < 0) {
419
422
  const r = e.slice(o);
@@ -429,65 +432,65 @@ function $t(e, t) {
429
432
  to: n + t
430
433
  };
431
434
  }
432
- function P(e, t, o, n) {
433
- const r = $t(e, t);
435
+ function H(e, t, o, n) {
436
+ const r = Rt(e, t);
434
437
  if (n.lastIndex = 0, !n.test(r.text))
435
438
  return r;
436
439
  const s = o === "left" ? r.from - 1 : r.to + 1;
437
- return s <= 0 || s >= e.length || s === t ? r : P(e, s, o, n);
440
+ return s <= 0 || s >= e.length || s === t ? r : H(e, s, o, n);
438
441
  }
439
- function vt(e, t, o, n) {
440
- const r = Math.max(e.from - 1, 0), s = Math.min(e.to + 1, t.content.size), i = oe(r, s, t);
442
+ function Mt(e, t, o, n) {
443
+ const r = Math.max(e.from - 1, 0), s = Math.min(e.to + 1, t.content.size), i = ie(r, s, t);
441
444
  for (const a of i)
442
445
  a.mark.type === n && o.removeMark(a.from, a.to, n);
443
446
  }
444
- const q = Je(1, 15);
445
- function U(e, t, o, n, r, s) {
447
+ const U = Qe(1, 15);
448
+ function q(e, t, o, n, r, s) {
446
449
  if (!e)
447
450
  return;
448
451
  let i = o - t - 1;
449
452
  i = i < 0 ? 0 : i;
450
- const a = n - t, c = P(
453
+ const a = n - t, c = H(
451
454
  e,
452
455
  i,
453
456
  "left",
454
- q
455
- ), p = P(
457
+ U
458
+ ), h = H(
456
459
  e,
457
460
  a,
458
461
  "right",
459
- q
460
- ), y = e.slice(c.from, p.to);
461
- Et(y, Xe, St).forEach((D) => {
462
- const x = Lt(D[0]), L = t + c.from + D.index + 1, Y = L + x.length;
463
- r.addMark(L, Y, s.create());
462
+ U
463
+ ), _ = e.slice(c.from, h.to);
464
+ $t(_, Ye, It).forEach((x) => {
465
+ const E = At(x[0]), A = t + c.from + x.index + 1, te = A + E.length;
466
+ r.addMark(A, te, s.create());
464
467
  });
465
468
  }
466
- function Rt(e) {
469
+ function Bt(e) {
467
470
  let t = !1;
468
- return new Oe({
469
- key: new T("autolink"),
471
+ return new He({
472
+ key: new $("autolink"),
470
473
  appendTransaction: (o, n, r) => {
471
- const s = o.some((y) => y.docChanged) && !n.doc.eq(r.doc);
474
+ const s = o.some((_) => _.docChanged) && !n.doc.eq(r.doc);
472
475
  if (t && !s)
473
476
  return;
474
477
  const { tr: i } = r, { textContent: a } = r.doc;
475
- t || U(a, 0, 0, a.length, i, e.type), t = !0;
476
- const c = re(
478
+ t || q(a, 0, 0, a.length, i, e.type), t = !0;
479
+ const c = ae(
477
480
  n.doc,
478
481
  [...o]
479
482
  );
480
- return se(c).forEach(({ oldRange: y, newRange: S }) => {
481
- vt(S, r.doc, i, e.type), ie(
483
+ return ce(c).forEach(({ oldRange: _, newRange: k }) => {
484
+ Mt(k, r.doc, i, e.type), le(
482
485
  r.doc,
483
- S,
484
- (x) => x.isTextblock
485
- ).forEach(({ node: x, pos: L }) => {
486
- U(
487
- x.textContent,
488
- L,
489
- y.from,
490
- S.to,
486
+ k,
487
+ (E) => E.isTextblock
488
+ ).forEach(({ node: E, pos: A }) => {
489
+ q(
490
+ E.textContent,
491
+ A,
492
+ _.from,
493
+ k.to,
491
494
  i,
492
495
  e.type
493
496
  );
@@ -496,18 +499,18 @@ function Rt(e) {
496
499
  }
497
500
  });
498
501
  }
499
- const It = {
502
+ const Nt = {
500
503
  class: "d-link d-c-text d-d-inline-block d-wb-break-all",
501
504
  rel: "noopener noreferrer nofollow"
502
- }, Mt = ae.create({
505
+ }, Dt = de.create({
503
506
  name: "CustomLink",
504
507
  renderHTML({ HTMLAttributes: e }) {
505
508
  return [
506
509
  "a",
507
- b(
510
+ T(
508
511
  this.options.HTMLAttributes,
509
512
  e,
510
- It
513
+ Nt
511
514
  )
512
515
  ];
513
516
  },
@@ -516,10 +519,10 @@ const It = {
516
519
  },
517
520
  addProseMirrorPlugins() {
518
521
  return [
519
- Rt({ type: this.type })
522
+ Bt({ type: this.type })
520
523
  ];
521
524
  }
522
- }), Bt = Ye.extend({
525
+ }), Ot = et.extend({
523
526
  name: "ConfigurableImage",
524
527
  addAttributes() {
525
528
  return {
@@ -543,21 +546,21 @@ const It = {
543
546
  }
544
547
  };
545
548
  }
546
- }).configure({ inline: !0, allowBase64: !0 }), Nt = W.extend({
549
+ }).configure({ inline: !0, allowBase64: !0 }), Ht = z.extend({
547
550
  parseHTML() {
548
551
  return [{ tag: "div" }];
549
552
  },
550
553
  renderHTML({ HTMLAttributes: e }) {
551
- return ["div", b(this.options.HTMLAttributes, e), 0];
554
+ return ["div", T(this.options.HTMLAttributes, e), 0];
552
555
  }
553
- }), Ot = {
556
+ }), Pt = {
554
557
  compatConfig: { MODE: 3 },
555
558
  name: "MentionComponent",
556
559
  components: {
557
560
  NodeViewWrapper: v,
558
- DtLink: G
561
+ DtLink: Q
559
562
  },
560
- props: $,
563
+ props: L,
561
564
  computed: {
562
565
  text() {
563
566
  return "@" + this.$props.node.attrs.name;
@@ -575,16 +578,16 @@ const It = {
575
578
  }
576
579
  }
577
580
  };
578
- function Dt(e, t, o, n, r, s) {
579
- const i = d("dt-link"), a = d("node-view-wrapper");
580
- return l(), m(a, { class: "d-d-inline-block" }, {
581
+ function jt(e, t, o, n, r, s) {
582
+ const i = l("dt-link"), a = l("node-view-wrapper");
583
+ return d(), p(a, { class: "d-d-inline-block" }, {
581
584
  default: u(() => [
582
- f(i, {
585
+ m(i, {
583
586
  kind: "mention",
584
- onClick: j(s.handleClick, ["prevent"])
587
+ onClick: P(s.handleClick, ["prevent"])
585
588
  }, {
586
589
  default: u(() => [
587
- C(h(s.text), 1)
590
+ C(f(s.text), 1)
588
591
  ]),
589
592
  _: 1
590
593
  }, 8, ["onClick"])
@@ -592,9 +595,9 @@ function Dt(e, t, o, n, r, s) {
592
595
  _: 1
593
596
  });
594
597
  }
595
- const At = /* @__PURE__ */ g(Ot, [["render", Dt]]), Pt = K.extend({
598
+ const Vt = /* @__PURE__ */ g(Pt, [["render", jt]]), Kt = V.extend({
596
599
  addNodeView() {
597
- return I(At);
600
+ return S(Vt);
598
601
  },
599
602
  parseHTML() {
600
603
  return [
@@ -623,23 +626,23 @@ const At = /* @__PURE__ */ g(Ot, [["render", Dt]]), Pt = K.extend({
623
626
  return `@${e.attrs.id}`;
624
627
  },
625
628
  renderHTML({ HTMLAttributes: e }) {
626
- return ["mention-component", b(this.options.HTMLAttributes, e)];
629
+ return ["mention-component", T(this.options.HTMLAttributes, e)];
627
630
  }
628
631
  }).configure({
629
632
  suggestion: {
630
633
  char: "@",
631
- pluginKey: new T("mentionSuggestion")
634
+ pluginKey: new $("mentionSuggestion")
632
635
  }
633
- }), jt = {
636
+ }), Ft = {
634
637
  compatConfig: { MODE: 3 },
635
638
  name: "ChannelComponent",
636
639
  components: {
637
640
  NodeViewWrapper: v,
638
- DtLink: G,
639
- DtIconLock: Qe,
640
- DtStack: E
641
+ DtLink: Q,
642
+ DtIconLock: tt,
643
+ DtStack: I
641
644
  },
642
- props: $,
645
+ props: L,
643
646
  computed: {
644
647
  text() {
645
648
  return this.$props.node.attrs.locked ? this.$props.node.attrs.name : "#" + this.$props.node.attrs.name;
@@ -657,25 +660,25 @@ const At = /* @__PURE__ */ g(Ot, [["render", Dt]]), Pt = K.extend({
657
660
  }
658
661
  }
659
662
  };
660
- function Ht(e, t, o, n, r, s) {
661
- const i = d("dt-icon-lock"), a = d("dt-stack"), c = d("dt-link"), p = d("node-view-wrapper");
662
- return l(), m(p, { class: "d-d-inline-block" }, {
663
+ function Ut(e, t, o, n, r, s) {
664
+ const i = l("dt-icon-lock"), a = l("dt-stack"), c = l("dt-link"), h = l("node-view-wrapper");
665
+ return d(), p(h, { class: "d-d-inline-block" }, {
663
666
  default: u(() => [
664
- f(c, {
667
+ m(c, {
665
668
  kind: "mention",
666
- onClick: j(s.handleClick, ["prevent"])
669
+ onClick: P(s.handleClick, ["prevent"])
667
670
  }, {
668
671
  default: u(() => [
669
- f(a, {
672
+ m(a, {
670
673
  direction: "row",
671
674
  gap: "0"
672
675
  }, {
673
676
  default: u(() => [
674
- e.$props.node.attrs.locked ? (l(), m(i, {
677
+ e.$props.node.attrs.locked ? (d(), p(i, {
675
678
  key: 0,
676
679
  size: "200"
677
680
  })) : w("", !0),
678
- k("span", null, h(s.text), 1)
681
+ b("span", null, f(s.text), 1)
679
682
  ]),
680
683
  _: 1
681
684
  })
@@ -686,10 +689,10 @@ function Ht(e, t, o, n, r, s) {
686
689
  _: 1
687
690
  });
688
691
  }
689
- const Kt = /* @__PURE__ */ g(jt, [["render", Ht]]), Ft = K.extend({
692
+ const qt = /* @__PURE__ */ g(Ft, [["render", Ut]]), Wt = V.extend({
690
693
  name: "channel",
691
694
  addNodeView() {
692
- return I(Kt);
695
+ return S(qt);
693
696
  },
694
697
  parseHTML() {
695
698
  return [
@@ -718,21 +721,21 @@ const Kt = /* @__PURE__ */ g(jt, [["render", Ht]]), Ft = K.extend({
718
721
  return `#${e.attrs.id}`;
719
722
  },
720
723
  renderHTML({ HTMLAttributes: e }) {
721
- return ["channel-component", b(this.options.HTMLAttributes, e)];
724
+ return ["channel-component", T(this.options.HTMLAttributes, e)];
722
725
  }
723
726
  }).configure({
724
727
  suggestion: {
725
728
  char: "#",
726
- pluginKey: new T("channelSuggestion")
729
+ pluginKey: new $("channelSuggestion")
727
730
  }
728
- }), Vt = {
731
+ }), zt = {
729
732
  compatConfig: { MODE: 3 },
730
733
  name: "SlashCommandsComponent",
731
734
  components: {
732
735
  NodeViewWrapper: v
733
736
  },
734
737
  props: {
735
- ...$
738
+ ...L
736
739
  },
737
740
  emits: ["selected-command"],
738
741
  computed: {
@@ -748,23 +751,23 @@ const Kt = /* @__PURE__ */ g(jt, [["render", Ht]]), Ft = K.extend({
748
751
  t && typeof t == "function" && t(e);
749
752
  }
750
753
  };
751
- function qt(e, t, o, n, r, s) {
752
- const i = d("node-view-wrapper");
753
- return l(), m(i, { class: "d-d-inline-block" }, {
754
+ function Xt(e, t, o, n, r, s) {
755
+ const i = l("node-view-wrapper");
756
+ return d(), p(i, { class: "d-d-inline-block" }, {
754
757
  default: u(() => [
755
- C(h(s.text), 1)
758
+ C(f(s.text), 1)
756
759
  ]),
757
760
  _: 1
758
761
  });
759
762
  }
760
- const Ut = /* @__PURE__ */ g(Vt, [["render", qt]]), Wt = (e, t) => [...e.matchAll(t)].map((n) => {
763
+ const Gt = /* @__PURE__ */ g(zt, [["render", Xt]]), Jt = (e, t) => [...e.matchAll(t)].map((n) => {
761
764
  let r = n[2];
762
765
  return r.endsWith(" ") || (r += " "), {
763
766
  index: n.index,
764
767
  text: r,
765
768
  match: n
766
769
  };
767
- }), zt = K.extend({
770
+ }), Yt = V.extend({
768
771
  name: "slash-commands",
769
772
  group: "inline",
770
773
  inline: !0,
@@ -781,7 +784,7 @@ const Ut = /* @__PURE__ */ g(Vt, [["render", qt]]), Wt = (e, t) => [...e.matchAl
781
784
  };
782
785
  },
783
786
  addNodeView() {
784
- return I(Ut);
787
+ return S(Gt);
785
788
  },
786
789
  parseHTML() {
787
790
  return [
@@ -807,13 +810,13 @@ const Ut = /* @__PURE__ */ g(Vt, [["render", qt]]), Wt = (e, t) => [...e.matchAl
807
810
  return `/${e.attrs.command}`;
808
811
  },
809
812
  renderHTML({ HTMLAttributes: e }) {
810
- return ["command-component", b(this.options.HTMLAttributes, e)];
813
+ return ["command-component", T(this.options.HTMLAttributes, e)];
811
814
  },
812
815
  addInputRules() {
813
816
  var o;
814
817
  const e = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) $`);
815
818
  return [
816
- ce({
819
+ ue({
817
820
  find: t,
818
821
  type: this.type,
819
822
  getAttributes(n) {
@@ -826,8 +829,8 @@ const Ut = /* @__PURE__ */ g(Vt, [["render", qt]]), Wt = (e, t) => [...e.matchAl
826
829
  var o;
827
830
  const e = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) ?$`, "g");
828
831
  return [
829
- A({
830
- find: (n) => Wt(n, t),
832
+ O({
833
+ find: (n) => Jt(n, t),
831
834
  type: this.type,
832
835
  getAttributes(n) {
833
836
  return { command: n[0].trim() };
@@ -838,14 +841,172 @@ const Ut = /* @__PURE__ */ g(Vt, [["render", qt]]), Wt = (e, t) => [...e.matchAl
838
841
  }).configure({
839
842
  suggestion: {
840
843
  char: "/",
841
- pluginKey: new T("slashCommandSuggestion")
844
+ pluginKey: new $("slashCommandSuggestion")
842
845
  }
843
- }), Xt = {
846
+ }), Qt = 100, Zt = {
847
+ name: "VariableComponent",
848
+ components: {
849
+ DtBadge: rt,
850
+ DtButton: ee,
851
+ DtPopover: ot,
852
+ DtInput: nt,
853
+ NodeViewWrapper: v
854
+ },
855
+ props: L,
856
+ data() {
857
+ return {
858
+ i18n: new Z(),
859
+ MAX_VARIABLE_ALT_LENGTH: Qt
860
+ };
861
+ },
862
+ computed: {
863
+ altText: {
864
+ get() {
865
+ var e, t;
866
+ return ((t = (e = this.node) == null ? void 0 : e.attrs) == null ? void 0 : t.altText) || "";
867
+ },
868
+ set(e) {
869
+ this.updateAttributes({ altText: e });
870
+ }
871
+ },
872
+ variableId() {
873
+ var e, t;
874
+ return (t = (e = this.node) == null ? void 0 : e.attrs) == null ? void 0 : t.id;
875
+ },
876
+ placeholder() {
877
+ var e;
878
+ return ((e = this.variableData) == null ? void 0 : e.placeholder) || "";
879
+ },
880
+ variableItems() {
881
+ var e, t;
882
+ return ((t = (e = this.extension) == null ? void 0 : e.options) == null ? void 0 : t.variableItems) || [];
883
+ },
884
+ variableData() {
885
+ return this.variableItems.find((e) => e.id === this.variableId);
886
+ },
887
+ badgeLabel() {
888
+ return `{} ${this.placeholder}`;
889
+ },
890
+ placeholderText() {
891
+ return `Replaces ${this.placeholder}`;
892
+ }
893
+ }
894
+ };
895
+ function en(e, t, o, n, r, s) {
896
+ const i = l("dt-badge"), a = l("dt-button"), c = l("dt-input"), h = l("dt-popover"), _ = l("node-view-wrapper");
897
+ return d(), p(_, { class: "d-d-inline-block" }, {
898
+ default: u(() => [
899
+ m(h, {
900
+ padding: "small",
901
+ "navigation-type": "arrow-keys",
902
+ placement: "top-start",
903
+ modal: !1
904
+ }, {
905
+ anchor: u(({ attrs: k }) => [
906
+ m(a, J(k, { kind: "unstyled" }), {
907
+ default: u(() => [
908
+ m(i, {
909
+ text: s.badgeLabel,
910
+ contenteditable: "false"
911
+ }, null, 8, ["text"])
912
+ ]),
913
+ _: 1
914
+ }, 16)
915
+ ]),
916
+ content: u(({ close: k }) => [
917
+ m(c, {
918
+ modelValue: s.altText,
919
+ "onUpdate:modelValue": t[0] || (t[0] = (x) => s.altText = x),
920
+ "root-class": "d-p8 d-w332",
921
+ label: r.i18n.$t("DIALTONE_EDITOR_VARIABLE_LABEL"),
922
+ placeholder: s.placeholderText,
923
+ validate: {
924
+ length: {
925
+ description: r.i18n.$t("DIALTONE_EDITOR_VARIABLE_VALIDATE_DESCRIPTION"),
926
+ message: r.i18n.$t("DIALTONE_EDITOR_VARIABLE_VALIDATE_MESSAGE"),
927
+ max: r.MAX_VARIABLE_ALT_LENGTH,
928
+ warn: r.MAX_VARIABLE_ALT_LENGTH,
929
+ limitMaxLength: !0
930
+ }
931
+ },
932
+ onKeyup: qe((x) => k(), ["enter"])
933
+ }, null, 8, ["modelValue", "label", "placeholder", "validate", "onKeyup"])
934
+ ]),
935
+ _: 1
936
+ })
937
+ ]),
938
+ _: 1
939
+ });
940
+ }
941
+ const tn = /* @__PURE__ */ g(Zt, [["render", en]]), nn = W.create({
942
+ name: "variable",
943
+ group: "inline",
944
+ inline: !0,
945
+ selectable: !0,
946
+ atom: !0,
947
+ addOptions() {
948
+ return {
949
+ HTMLAttributes: {},
950
+ variableItems: []
951
+ };
952
+ },
953
+ addNodeView() {
954
+ return S(tn);
955
+ },
956
+ addAttributes() {
957
+ return {
958
+ id: {
959
+ default: null,
960
+ parseHTML: (e) => e.getAttribute("data-variable-id"),
961
+ renderHTML: (e) => e.id ? {
962
+ "data-variable-id": e.id
963
+ } : {}
964
+ },
965
+ altText: {
966
+ default: "",
967
+ parseHTML: (e) => e.getAttribute("data-alt-text"),
968
+ renderHTML: (e) => e.altText ? {
969
+ "data-alt-text": e.altText
970
+ } : {}
971
+ }
972
+ };
973
+ },
974
+ parseHTML() {
975
+ return [
976
+ {
977
+ tag: "variable"
978
+ }
979
+ ];
980
+ },
981
+ renderText({ node: e }) {
982
+ return e.attrs.altText;
983
+ },
984
+ renderHTML({ node: e, HTMLAttributes: t }) {
985
+ return [
986
+ "variable",
987
+ T(this.options.HTMLAttributes, t, {
988
+ "data-variable-id": e.attrs.id,
989
+ "data-alt-text": e.attrs.altText
990
+ })
991
+ ];
992
+ },
993
+ addCommands() {
994
+ return {
995
+ insertVariable: (e = {}) => ({ commands: t }) => t.insertContent({
996
+ type: this.name,
997
+ attrs: {
998
+ id: e.id || null,
999
+ altText: e.altText || ""
1000
+ }
1001
+ })
1002
+ };
1003
+ }
1004
+ }), on = {
844
1005
  compatConfig: { MODE: 3 },
845
1006
  name: "MentionSuggestion",
846
1007
  components: {
847
- DtAvatar: tt,
848
- DtStack: E
1008
+ DtAvatar: at,
1009
+ DtStack: I
849
1010
  },
850
1011
  props: {
851
1012
  item: {
@@ -881,22 +1042,22 @@ const Ut = /* @__PURE__ */ g(Vt, [["render", qt]]), Wt = (e, t) => [...e.matchAl
881
1042
  return this.item.showDetails;
882
1043
  }
883
1044
  }
884
- }, Jt = { class: "d-mention-suggestion__name" }, Gt = {
1045
+ }, rn = { class: "d-mention-suggestion__name" }, sn = {
885
1046
  key: 1,
886
1047
  class: "d-mention-suggestion__divider"
887
- }, Yt = {
1048
+ }, an = {
888
1049
  key: 2,
889
1050
  class: "d-mention-suggestion__status"
890
1051
  };
891
- function Qt(e, t, o, n, r, s) {
892
- const i = d("dt-avatar"), a = d("dt-stack");
893
- return l(), m(a, {
1052
+ function cn(e, t, o, n, r, s) {
1053
+ const i = l("dt-avatar"), a = l("dt-stack");
1054
+ return d(), p(a, {
894
1055
  direction: "row",
895
1056
  class: "d-mention-suggestion__container",
896
1057
  gap: "400"
897
1058
  }, {
898
1059
  default: u(() => [
899
- f(i, {
1060
+ m(i, {
900
1061
  "full-name": s.name,
901
1062
  "image-src": s.avatarSrc,
902
1063
  "image-alt": s.name,
@@ -904,25 +1065,25 @@ function Qt(e, t, o, n, r, s) {
904
1065
  presence: s.presence,
905
1066
  size: "sm"
906
1067
  }, null, 8, ["full-name", "image-src", "image-alt", "show-presence", "presence"]),
907
- f(a, {
1068
+ m(a, {
908
1069
  class: "d-mention-suggestion__details-container",
909
1070
  gap: "100"
910
1071
  }, {
911
1072
  default: u(() => [
912
- k("span", Jt, h(s.name), 1),
913
- s.showDetails ? (l(), m(a, {
1073
+ b("span", rn, f(s.name), 1),
1074
+ s.showDetails ? (d(), p(a, {
914
1075
  key: 0,
915
1076
  direction: "row",
916
1077
  gap: "300",
917
1078
  class: "d-label--sm-plain"
918
1079
  }, {
919
1080
  default: u(() => [
920
- s.presenceText ? (l(), _("span", {
1081
+ s.presenceText ? (d(), y("span", {
921
1082
  key: 0,
922
- class: X(["d-mention-suggestion__presence", [s.presenceFontColorClass]])
923
- }, h(s.presenceText), 3)) : w("", !0),
924
- s.status && s.presenceText ? (l(), _("div", Gt, " • ")) : w("", !0),
925
- s.status ? (l(), _("div", Yt, h(s.status), 1)) : w("", !0)
1083
+ class: G(["d-mention-suggestion__presence", [s.presenceFontColorClass]])
1084
+ }, f(s.presenceText), 3)) : w("", !0),
1085
+ s.status && s.presenceText ? (d(), y("div", sn, " • ")) : w("", !0),
1086
+ s.status ? (d(), y("div", an, f(s.status), 1)) : w("", !0)
926
1087
  ]),
927
1088
  _: 1
928
1089
  })) : w("", !0)
@@ -933,7 +1094,7 @@ function Qt(e, t, o, n, r, s) {
933
1094
  _: 1
934
1095
  });
935
1096
  }
936
- const Zt = /* @__PURE__ */ g(Xt, [["render", Qt]]), en = {
1097
+ const ln = /* @__PURE__ */ g(on, [["render", cn]]), dn = {
937
1098
  // This function comes from the user and passed to the editor directly.
938
1099
  // This will also activate the mention plugin on the editor
939
1100
  // items: ({ query }) => { return [] },
@@ -944,7 +1105,7 @@ const Zt = /* @__PURE__ */ g(Xt, [["render", Qt]]), en = {
944
1105
  onStart: (n) => {
945
1106
  e = new R(N, {
946
1107
  props: {
947
- itemComponent: M(Zt),
1108
+ itemComponent: M(ln),
948
1109
  itemType: "mention",
949
1110
  ...n
950
1111
  },
@@ -964,7 +1125,7 @@ const Zt = /* @__PURE__ */ g(Xt, [["render", Qt]]), en = {
964
1125
  trigger: "manual",
965
1126
  placement: "top-start",
966
1127
  zIndex: 650,
967
- plugins: [O]
1128
+ plugins: [D]
968
1129
  }), n.items.length > 0 && (t == null || t[0].show()));
969
1130
  },
970
1131
  onUpdate(n) {
@@ -982,13 +1143,13 @@ const Zt = /* @__PURE__ */ g(Xt, [["render", Qt]]), en = {
982
1143
  }
983
1144
  };
984
1145
  }
985
- }, tn = {
1146
+ }, un = {
986
1147
  compatConfig: { MODE: 3 },
987
1148
  name: "ChannelSuggestion",
988
1149
  components: {
989
- DtStack: E,
990
- DtIconHash: nt,
991
- DtIconLock: ot
1150
+ DtStack: I,
1151
+ DtIconHash: ct,
1152
+ DtIconLock: lt
992
1153
  },
993
1154
  props: {
994
1155
  item: {
@@ -1002,26 +1163,26 @@ const Zt = /* @__PURE__ */ g(Xt, [["render", Qt]]), en = {
1002
1163
  }
1003
1164
  }
1004
1165
  };
1005
- function nn(e, t, o, n, r, s) {
1006
- const i = d("dt-icon-hash"), a = d("dt-icon-lock"), c = d("dt-stack");
1007
- return l(), m(c, {
1166
+ function mn(e, t, o, n, r, s) {
1167
+ const i = l("dt-icon-hash"), a = l("dt-icon-lock"), c = l("dt-stack");
1168
+ return d(), p(c, {
1008
1169
  direction: "row",
1009
1170
  gap: "400"
1010
1171
  }, {
1011
1172
  default: u(() => [
1012
- o.item.locked ? (l(), m(a, {
1173
+ o.item.locked ? (d(), p(a, {
1013
1174
  key: 1,
1014
1175
  size: "300"
1015
- })) : (l(), m(i, {
1176
+ })) : (d(), p(i, {
1016
1177
  key: 0,
1017
1178
  size: "300"
1018
1179
  })),
1019
- k("span", null, h(s.name), 1)
1180
+ b("span", null, f(s.name), 1)
1020
1181
  ]),
1021
1182
  _: 1
1022
1183
  });
1023
1184
  }
1024
- const on = /* @__PURE__ */ g(tn, [["render", nn]]), rn = {
1185
+ const hn = /* @__PURE__ */ g(un, [["render", mn]]), pn = {
1025
1186
  // This function comes from the user and passed to the editor directly.
1026
1187
  // This will also activate the mention plugin on the editor
1027
1188
  // items: ({ query }) => { return [] },
@@ -1032,7 +1193,7 @@ const on = /* @__PURE__ */ g(tn, [["render", nn]]), rn = {
1032
1193
  onStart: (n) => {
1033
1194
  e = new R(N, {
1034
1195
  props: {
1035
- itemComponent: M(on),
1196
+ itemComponent: M(hn),
1036
1197
  itemType: "channel",
1037
1198
  ...n
1038
1199
  },
@@ -1052,7 +1213,7 @@ const on = /* @__PURE__ */ g(tn, [["render", nn]]), rn = {
1052
1213
  trigger: "manual",
1053
1214
  placement: "top-start",
1054
1215
  zIndex: 650,
1055
- plugins: [O]
1216
+ plugins: [D]
1056
1217
  }), n.items.length > 0 && (t == null || t[0].show()));
1057
1218
  },
1058
1219
  onUpdate(n) {
@@ -1070,7 +1231,7 @@ const on = /* @__PURE__ */ g(tn, [["render", nn]]), rn = {
1070
1231
  }
1071
1232
  };
1072
1233
  }
1073
- }, sn = {
1234
+ }, fn = {
1074
1235
  compatConfig: { MODE: 3 },
1075
1236
  name: "SlashCommandSuggestion",
1076
1237
  props: {
@@ -1090,17 +1251,17 @@ const on = /* @__PURE__ */ g(tn, [["render", nn]]), rn = {
1090
1251
  return this.item.parametersExample;
1091
1252
  }
1092
1253
  }
1093
- }, an = { class: "d-body--md-compact" }, cn = { key: 0 }, ln = { class: "d-body--sm d-fc-tertiary" };
1094
- function dn(e, t, o, n, r, s) {
1095
- return l(), _("div", null, [
1096
- k("div", an, [
1097
- k("span", null, "/" + h(s.command), 1),
1098
- s.parametersExample ? (l(), _("span", cn, h(s.parametersExample), 1)) : w("", !0)
1254
+ }, gn = { class: "d-body--md-compact" }, _n = { key: 0 }, kn = { class: "d-body--sm d-fc-tertiary" };
1255
+ function yn(e, t, o, n, r, s) {
1256
+ return d(), y("div", null, [
1257
+ b("div", gn, [
1258
+ b("span", null, "/" + f(s.command), 1),
1259
+ s.parametersExample ? (d(), y("span", _n, f(s.parametersExample), 1)) : w("", !0)
1099
1260
  ]),
1100
- k("div", ln, h(s.description), 1)
1261
+ b("div", kn, f(s.description), 1)
1101
1262
  ]);
1102
1263
  }
1103
- const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1264
+ const bn = /* @__PURE__ */ g(fn, [["render", yn]]), wn = {
1104
1265
  // This function comes from the user and passed to the editor directly.
1105
1266
  // This will also activate the mention plugin on the editor
1106
1267
  // items: ({ query }) => { return [] },
@@ -1113,7 +1274,7 @@ const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1113
1274
  e = new R(N, {
1114
1275
  parent: void 0,
1115
1276
  props: {
1116
- itemComponent: M(un),
1277
+ itemComponent: M(bn),
1117
1278
  itemType: "slash-command",
1118
1279
  ...n
1119
1280
  },
@@ -1133,7 +1294,7 @@ const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1133
1294
  trigger: "manual",
1134
1295
  placement: "top-start",
1135
1296
  zIndex: 650,
1136
- plugins: [O]
1297
+ plugins: [D]
1137
1298
  }), n.items.length > 0 && (t == null || t[0].show()));
1138
1299
  },
1139
1300
  onUpdate(n) {
@@ -1151,14 +1312,14 @@ const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1151
1312
  }
1152
1313
  };
1153
1314
  }
1154
- }, hn = {
1315
+ }, Tn = {
1155
1316
  compatConfig: { MODE: 3 },
1156
1317
  name: "DtRichTextEditor",
1157
1318
  components: {
1158
- EditorContent: Z,
1159
- BubbleMenu: Q,
1160
- DtButton: it,
1161
- DtStack: E
1319
+ EditorContent: oe,
1320
+ BubbleMenu: ne,
1321
+ DtButton: ee,
1322
+ DtStack: I
1162
1323
  },
1163
1324
  props: {
1164
1325
  /**
@@ -1230,7 +1391,7 @@ const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1230
1391
  type: [Boolean, String, Number],
1231
1392
  default: !1,
1232
1393
  validator(e) {
1233
- return typeof e == "string" ? et.includes(e) : !0;
1394
+ return typeof e == "string" ? it.includes(e) : !0;
1234
1395
  }
1235
1396
  },
1236
1397
  /**
@@ -1243,7 +1404,7 @@ const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1243
1404
  type: String,
1244
1405
  default: "html",
1245
1406
  validator(e) {
1246
- return Ze.includes(e);
1407
+ return st.includes(e);
1247
1408
  }
1248
1409
  },
1249
1410
  /**
@@ -1402,6 +1563,20 @@ const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1402
1563
  type: Boolean,
1403
1564
  default: !1
1404
1565
  },
1566
+ /**
1567
+ * Whether the input allows variables to be introduced in the text.
1568
+ */
1569
+ allowVariable: {
1570
+ type: Boolean,
1571
+ default: !1
1572
+ },
1573
+ /**
1574
+ * Array of available variable items that can be inserted.
1575
+ */
1576
+ variableItems: {
1577
+ type: Array,
1578
+ default: () => []
1579
+ },
1405
1580
  /**
1406
1581
  * Additional TipTap extensions to be added to the editor.
1407
1582
  */
@@ -1527,11 +1702,11 @@ const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1527
1702
  tippyOptions: {
1528
1703
  appendTo: () => {
1529
1704
  var e;
1530
- return (e = F(this.$refs.editor.$el).getRootNode()) == null ? void 0 : e.querySelector("body");
1705
+ return (e = K(this.$refs.editor.$el).getRootNode()) == null ? void 0 : e.querySelector("body");
1531
1706
  },
1532
1707
  placement: "top-start"
1533
1708
  },
1534
- i18n: new st(),
1709
+ i18n: new Z(),
1535
1710
  // JSON-to-markdown converter
1536
1711
  jsonToMarkdownConverter: {
1537
1712
  convertToMarkdown(e) {
@@ -1555,7 +1730,8 @@ const un = /* @__PURE__ */ g(sn, [["render", dn]]), mn = {
1555
1730
  mention: (n) => this.processMentionNode(n),
1556
1731
  channel: (n) => this.processChannelNode(n),
1557
1732
  "slash-commands": (n) => this.processSlashCommandsNode(n),
1558
- emoji: (n) => this.processEmojiNode(n)
1733
+ emoji: (n) => this.processEmojiNode(n),
1734
+ variable: (n) => this.processVariableNode(n)
1559
1735
  }[e.type];
1560
1736
  return o ? o(e) : this.processUnknownNode(e);
1561
1737
  },
@@ -1617,6 +1793,11 @@ ${this.processNodeContent(e)}
1617
1793
  var t;
1618
1794
  return ((t = e.attrs) == null ? void 0 : t.code) || "";
1619
1795
  },
1796
+ processVariableNode(e) {
1797
+ var n, r;
1798
+ const t = ((n = e.attrs) == null ? void 0 : n.id) || "", o = ((r = e.attrs) == null ? void 0 : r.altText) || "";
1799
+ return `{{${t}=${o}}}`;
1800
+ },
1620
1801
  processUnknownNode(e) {
1621
1802
  return this.processNodeContent(e);
1622
1803
  },
@@ -1665,15 +1846,15 @@ ${this.processNodeContent(e)}
1665
1846
  },
1666
1847
  // eslint-disable-next-line complexity
1667
1848
  extensions() {
1668
- const e = [he, Ee, Le, fe];
1669
- e.push(this.useDivTags ? Nt : W), this.allowBold && e.push(_e), this.allowBlockquote && e.push(de), this.allowBulletList && (e.push(ke), e.push(Ce.extend({
1849
+ const e = [ge, Se, Ie, ke];
1850
+ e.push(this.useDivTags ? Ht : z), this.allowBold && e.push(be), this.allowBlockquote && e.push(he), this.allowBulletList && (e.push(we), e.push(Ce.extend({
1670
1851
  renderText({ node: n }) {
1671
1852
  return n.textContent;
1672
1853
  }
1673
- })), e.push(be)), this.allowItalic && e.push(ye), this.allowStrike && e.push(xe), this.allowUnderline && e.push(Te), this.placeholder && e.push(
1674
- ge.configure({ placeholder: this.placeholder })
1854
+ })), e.push(Ee)), this.allowItalic && e.push(Te), this.allowStrike && e.push(Le), this.allowUnderline && e.push(ve), this.placeholder && e.push(
1855
+ ye.configure({ placeholder: this.placeholder })
1675
1856
  );
1676
- const t = this, o = le.create({
1857
+ const t = this, o = me.create({
1677
1858
  addKeyboardShortcuts() {
1678
1859
  return {
1679
1860
  "Shift-Enter": ({ editor: n }) => t.allowLineBreaks ? !1 : (n.commands.first(({ commands: r }) => [
@@ -1687,7 +1868,7 @@ ${this.processNodeContent(e)}
1687
1868
  };
1688
1869
  }
1689
1870
  });
1690
- if (e.push(o), this.link && e.push(we.extend({
1871
+ if (e.push(o), this.link && e.push(xe.extend({
1691
1872
  inclusive: !1,
1692
1873
  addKeyboardShortcuts() {
1693
1874
  return {
@@ -1700,27 +1881,29 @@ ${this.processNodeContent(e)}
1700
1881
  },
1701
1882
  openOnClick: !1,
1702
1883
  autolink: !0,
1703
- protocols: V
1704
- })), this.customLink && e.push(this.getExtension(Mt, this.customLink)), this.mentionSuggestion) {
1705
- const n = { ...this.mentionSuggestion, ...en };
1706
- e.push(Pt.configure({ suggestion: n }));
1884
+ protocols: F
1885
+ })), this.customLink && e.push(this.getExtension(Dt, this.customLink)), this.mentionSuggestion) {
1886
+ const n = { ...this.mentionSuggestion, ...dn };
1887
+ e.push(Kt.configure({ suggestion: n }));
1707
1888
  }
1708
1889
  if (this.channelSuggestion) {
1709
- const n = { ...this.channelSuggestion, ...rn };
1710
- e.push(Ft.configure({ suggestion: n }));
1890
+ const n = { ...this.channelSuggestion, ...pn };
1891
+ e.push(Wt.configure({ suggestion: n }));
1711
1892
  }
1712
1893
  if (this.slashCommandSuggestion) {
1713
- const n = { ...this.slashCommandSuggestion, ...mn };
1714
- e.push(zt.configure({
1894
+ const n = { ...this.slashCommandSuggestion, ...wn };
1895
+ e.push(Yt.configure({
1715
1896
  suggestion: n,
1716
1897
  onSelectedCommand: (r) => {
1717
1898
  this.$emit("selected-command", r);
1718
1899
  }
1719
1900
  }));
1720
1901
  }
1721
- return e.push(Tt), e.push(Se.configure({
1902
+ return this.allowVariable && e.push(nn.configure({
1903
+ variableItems: this.variableItems
1904
+ })), e.push(St), e.push($e.configure({
1722
1905
  types: ["paragraph"]
1723
- })), this.allowCode && e.push(me), this.allowCodeblock && e.push(ue.extend({
1906
+ })), this.allowCode && e.push(fe), this.allowCodeblock && e.push(pe.extend({
1724
1907
  renderText({ node: n }) {
1725
1908
  return `\`\`\`
1726
1909
  ${n.textContent}
@@ -1730,7 +1913,7 @@ ${n.textContent}
1730
1913
  HTMLAttributes: {
1731
1914
  class: "d-rich-text-editor__code-block"
1732
1915
  }
1733
- })), this.allowInlineImages && e.push(Bt), (this.allowFontFamily || this.allowFontColor) && (e.push(Me), this.allowFontColor && e.push(Be), this.allowFontFamily && e.push(Ne)), this.additionalExtensions.length && e.push(...this.additionalExtensions), this.allowTables && e.push($e.configure({ resizable: !0 }), Ie, Re, ve, pe), e;
1916
+ })), this.allowInlineImages && e.push(Ot), (this.allowFontFamily || this.allowFontColor) && (e.push(Ne), this.allowFontColor && e.push(De), this.allowFontFamily && e.push(Oe)), this.additionalExtensions.length && e.push(...this.additionalExtensions), this.allowTables && e.push(Ae.configure({ resizable: !0 }), Be, Me, Re, _e), e;
1734
1917
  },
1735
1918
  inputAttrs() {
1736
1919
  const e = {
@@ -1770,11 +1953,11 @@ ${n.textContent}
1770
1953
  this.destroyEditor();
1771
1954
  },
1772
1955
  mounted() {
1773
- Ge(F(this.$el), this.$options.name), this.processValue(this.modelValue, !1);
1956
+ Ze(K(this.$el), this.$options.name), this.processValue(this.modelValue, !1);
1774
1957
  },
1775
1958
  methods: {
1776
1959
  createEditor() {
1777
- this.editor = new ee({
1960
+ this.editor = new re({
1778
1961
  autofocus: this.autoFocus,
1779
1962
  content: this.modelValue,
1780
1963
  editable: this.editable,
@@ -1813,9 +1996,9 @@ ${n.textContent}
1813
1996
  * @param editor the editor instance.
1814
1997
  */
1815
1998
  getSelectedLinkText(e) {
1816
- var a, c, p;
1999
+ var a, c, h;
1817
2000
  const { view: t, state: o } = e, { from: n, to: r } = t.state.selection, s = o.doc.textBetween(n, r, ""), i = this.editor.state.doc.nodeAt(n);
1818
- return i && ((p = (c = (a = i.marks) == null ? void 0 : a.at(0)) == null ? void 0 : c.type) == null ? void 0 : p.name) === "link" ? i.textContent : s;
2001
+ return i && ((h = (c = (a = i.marks) == null ? void 0 : a.at(0)) == null ? void 0 : c.type) == null ? void 0 : h.name) === "link" ? i.textContent : s;
1819
2002
  },
1820
2003
  editLink() {
1821
2004
  const e = this.getSelectedLinkText(this.editor), t = {
@@ -1834,21 +2017,21 @@ ${n.textContent}
1834
2017
  const e = this.editor.getAttributes("link").href;
1835
2018
  window.open(e, "_blank");
1836
2019
  },
1837
- setLink(e, t, o, n = V, r) {
1838
- var a, c, p;
2020
+ setLink(e, t, o, n = F, r) {
2021
+ var a, c, h;
1839
2022
  if (!e) {
1840
2023
  this.removeLink();
1841
2024
  return;
1842
2025
  }
1843
- n.find((y) => y.test(e)) || (e = `${r}${e}`), this.editor.chain().focus().extendMarkRange("link").run();
1844
- const i = (p = (c = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : c.state) == null ? void 0 : p.selection;
2026
+ n.find((_) => _.test(e)) || (e = `${r}${e}`), this.editor.chain().focus().extendMarkRange("link").run();
2027
+ const i = (h = (c = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : c.state) == null ? void 0 : h.selection;
1845
2028
  this.editor.chain().focus().insertContent(t).setTextSelection({ from: i.from, to: i.from + t.length }).setLink({ href: e, class: o.class }).run();
1846
2029
  },
1847
2030
  processValue(e, t = !0) {
1848
2031
  const o = this.getOutput();
1849
- if (!(t && rt(e, o))) {
2032
+ if (!(t && dt(e, o))) {
1850
2033
  if (typeof e == "string" && this.outputFormat === "text") {
1851
- const n = new RegExp(`(${z})`, "g");
2034
+ const n = new RegExp(`(${X})`, "g");
1852
2035
  e = e == null ? void 0 : e.replace(n, '<emoji-component code="$1"></emoji-component>');
1853
2036
  }
1854
2037
  this.editor.commands.setContent(e, !1, { preserveWhitespace: "full" });
@@ -1987,11 +2170,11 @@ ${n.textContent}
1987
2170
  this.editor.commands.focus();
1988
2171
  }
1989
2172
  }
1990
- }, pn = { class: "d-popover__dialog" };
1991
- function fn(e, t, o, n, r, s) {
1992
- const i = d("dt-button"), a = d("dt-stack"), c = d("bubble-menu"), p = d("editor-content");
1993
- return l(), _("div", null, [
1994
- r.editor && o.link && !o.hideLinkBubbleMenu ? (l(), m(c, {
2173
+ }, xn = { class: "d-popover__dialog" };
2174
+ function Cn(e, t, o, n, r, s) {
2175
+ const i = l("dt-button"), a = l("dt-stack"), c = l("bubble-menu"), h = l("editor-content");
2176
+ return d(), y("div", null, [
2177
+ r.editor && o.link && !o.hideLinkBubbleMenu ? (d(), p(c, {
1995
2178
  key: 0,
1996
2179
  editor: r.editor,
1997
2180
  "should-show": s.bubbleMenuShouldShow,
@@ -1999,40 +2182,40 @@ function fn(e, t, o, n, r, s) {
1999
2182
  style: { visibility: "visible" }
2000
2183
  }, {
2001
2184
  default: u(() => [
2002
- k("div", pn, [
2003
- f(a, {
2185
+ b("div", xn, [
2186
+ m(a, {
2004
2187
  direction: "row",
2005
2188
  class: "d-rich-text-editor-bubble-menu__button-stack",
2006
2189
  gap: "0"
2007
2190
  }, {
2008
2191
  default: u(() => [
2009
- f(i, {
2192
+ m(i, {
2010
2193
  kind: "muted",
2011
2194
  importance: "clear",
2012
2195
  onClick: s.editLink
2013
2196
  }, {
2014
2197
  default: u(() => [
2015
- C(h(r.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")), 1)
2198
+ C(f(r.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")), 1)
2016
2199
  ]),
2017
2200
  _: 1
2018
2201
  }, 8, ["onClick"]),
2019
- f(i, {
2202
+ m(i, {
2020
2203
  kind: "muted",
2021
2204
  importance: "clear",
2022
2205
  onClick: s.openLink
2023
2206
  }, {
2024
2207
  default: u(() => [
2025
- C(h(r.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")), 1)
2208
+ C(f(r.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")), 1)
2026
2209
  ]),
2027
2210
  _: 1
2028
2211
  }, 8, ["onClick"]),
2029
- f(i, {
2212
+ m(i, {
2030
2213
  kind: "danger",
2031
2214
  importance: "clear",
2032
2215
  onClick: s.removeLink
2033
2216
  }, {
2034
2217
  default: u(() => [
2035
- C(h(r.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")), 1)
2218
+ C(f(r.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")), 1)
2036
2219
  ]),
2037
2220
  _: 1
2038
2221
  }, 8, ["onClick"])
@@ -2043,7 +2226,7 @@ function fn(e, t, o, n, r, s) {
2043
2226
  ]),
2044
2227
  _: 1
2045
2228
  }, 8, ["editor", "should-show", "tippy-options"])) : w("", !0),
2046
- f(p, Fe({
2229
+ m(h, J({
2047
2230
  ref: "editor",
2048
2231
  editor: r.editor,
2049
2232
  class: "d-rich-text-editor",
@@ -2051,8 +2234,8 @@ function fn(e, t, o, n, r, s) {
2051
2234
  }, s.attrs), null, 16, ["editor"])
2052
2235
  ]);
2053
2236
  }
2054
- const ho = /* @__PURE__ */ g(hn, [["render", fn]]);
2237
+ const Eo = /* @__PURE__ */ g(Tn, [["render", Cn]]);
2055
2238
  export {
2056
- ho as default
2239
+ Eo as default
2057
2240
  };
2058
2241
  //# sourceMappingURL=rich-text-editor.js.map