@dialpad/dialtone 9.121.0 → 9.123.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 (383) hide show
  1. package/dist/tokens/doc.json +22069 -22069
  2. package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js +11 -0
  3. package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js.map +1 -0
  4. package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs +2 -0
  5. package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs.map +1 -0
  6. package/dist/vue2/component-documentation.json +1 -1
  7. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  8. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  9. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +17 -8
  10. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  11. package/dist/vue2/lib/avatar/avatar.cjs +1 -1
  12. package/dist/vue2/lib/avatar/avatar.js +5 -2
  13. package/dist/vue2/lib/avatar/avatar.js.map +1 -1
  14. package/dist/vue2/lib/badge/badge.cjs +1 -1
  15. package/dist/vue2/lib/badge/badge.js +7 -4
  16. package/dist/vue2/lib/badge/badge.js.map +1 -1
  17. package/dist/vue2/lib/banner/banner.cjs +2 -2
  18. package/dist/vue2/lib/banner/banner.js +9 -6
  19. package/dist/vue2/lib/banner/banner.js.map +1 -1
  20. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
  21. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js +7 -4
  22. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js.map +1 -1
  23. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  24. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +5 -2
  25. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  26. package/dist/vue2/lib/button/button.cjs +1 -1
  27. package/dist/vue2/lib/button/button.js +5 -2
  28. package/dist/vue2/lib/button/button.js.map +1 -1
  29. package/dist/vue2/lib/button-group/button-group.cjs +1 -1
  30. package/dist/vue2/lib/button-group/button-group.js +11 -8
  31. package/dist/vue2/lib/button-group/button-group.js.map +1 -1
  32. package/dist/vue2/lib/button-group/buttons-decorator.cjs +1 -1
  33. package/dist/vue2/lib/button-group/buttons-decorator.js +7 -4
  34. package/dist/vue2/lib/button-group/buttons-decorator.js.map +1 -1
  35. package/dist/vue2/lib/callbar-button/callbar-button.cjs +1 -1
  36. package/dist/vue2/lib/callbar-button/callbar-button.js +10 -7
  37. package/dist/vue2/lib/callbar-button/callbar-button.js.map +1 -1
  38. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  39. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +5 -2
  40. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  41. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  42. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +12 -9
  43. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  44. package/dist/vue2/lib/callbox/callbox.cjs +1 -1
  45. package/dist/vue2/lib/callbox/callbox.js +5 -2
  46. package/dist/vue2/lib/callbox/callbox.js.map +1 -1
  47. package/dist/vue2/lib/card/card.cjs +1 -1
  48. package/dist/vue2/lib/card/card.js +7 -4
  49. package/dist/vue2/lib/card/card.js.map +1 -1
  50. package/dist/vue2/lib/checkbox/checkbox.cjs +1 -1
  51. package/dist/vue2/lib/checkbox/checkbox.js +5 -2
  52. package/dist/vue2/lib/checkbox/checkbox.js.map +1 -1
  53. package/dist/vue2/lib/checkbox-group/checkbox-group.cjs +1 -1
  54. package/dist/vue2/lib/checkbox-group/checkbox-group.js +8 -5
  55. package/dist/vue2/lib/checkbox-group/checkbox-group.js.map +1 -1
  56. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
  57. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js +12 -9
  58. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js.map +1 -1
  59. package/dist/vue2/lib/chip/chip.cjs +1 -1
  60. package/dist/vue2/lib/chip/chip.js +11 -8
  61. package/dist/vue2/lib/chip/chip.js.map +1 -1
  62. package/dist/vue2/lib/codeblock/codeblock.cjs +2 -2
  63. package/dist/vue2/lib/codeblock/codeblock.js +11 -8
  64. package/dist/vue2/lib/codeblock/codeblock.js.map +1 -1
  65. package/dist/vue2/lib/collapsible/collapsible-lazy-show.cjs +1 -1
  66. package/dist/vue2/lib/collapsible/collapsible-lazy-show.js +5 -2
  67. package/dist/vue2/lib/collapsible/collapsible-lazy-show.js.map +1 -1
  68. package/dist/vue2/lib/collapsible/collapsible.cjs +1 -1
  69. package/dist/vue2/lib/collapsible/collapsible.js +7 -4
  70. package/dist/vue2/lib/collapsible/collapsible.js.map +1 -1
  71. package/dist/vue2/lib/combobox/combobox-empty-list.cjs +1 -1
  72. package/dist/vue2/lib/combobox/combobox-empty-list.js +10 -7
  73. package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
  74. package/dist/vue2/lib/combobox/combobox-loading-list.cjs +1 -1
  75. package/dist/vue2/lib/combobox/combobox-loading-list.js +10 -7
  76. package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
  77. package/dist/vue2/lib/combobox/combobox.cjs +2 -2
  78. package/dist/vue2/lib/combobox/combobox.js +5 -2
  79. package/dist/vue2/lib/combobox/combobox.js.map +1 -1
  80. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  81. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +9 -6
  82. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  83. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  84. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +5 -2
  85. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  86. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  87. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +9 -6
  88. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  89. package/dist/vue2/lib/contact-info/contact-info.cjs +1 -1
  90. package/dist/vue2/lib/contact-info/contact-info.js +8 -5
  91. package/dist/vue2/lib/contact-info/contact-info.js.map +1 -1
  92. package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
  93. package/dist/vue2/lib/contact-row/contact-row.js +5 -2
  94. package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
  95. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  96. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  97. package/dist/vue2/lib/datepicker/datepicker.js +13 -4
  98. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  99. package/dist/vue2/lib/description-list/description-list.cjs +1 -1
  100. package/dist/vue2/lib/description-list/description-list.js +13 -10
  101. package/dist/vue2/lib/description-list/description-list.js.map +1 -1
  102. package/dist/vue2/lib/dropdown/dropdown-list.cjs +1 -1
  103. package/dist/vue2/lib/dropdown/dropdown-list.js +8 -5
  104. package/dist/vue2/lib/dropdown/dropdown-list.js.map +1 -1
  105. package/dist/vue2/lib/dropdown/dropdown-separator.cjs +1 -1
  106. package/dist/vue2/lib/dropdown/dropdown-separator.js +7 -4
  107. package/dist/vue2/lib/dropdown/dropdown-separator.js.map +1 -1
  108. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  109. package/dist/vue2/lib/dropdown/dropdown.js +5 -2
  110. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  111. package/dist/vue2/lib/editor/editor.cjs +1 -1
  112. package/dist/vue2/lib/editor/editor.js +49 -46
  113. package/dist/vue2/lib/editor/editor.js.map +1 -1
  114. package/dist/vue2/lib/emoji/emoji.cjs +1 -1
  115. package/dist/vue2/lib/emoji/emoji.js +10 -7
  116. package/dist/vue2/lib/emoji/emoji.js.map +1 -1
  117. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
  118. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  119. package/dist/vue2/lib/emoji-picker/emoji-picker.js +31 -11
  120. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  121. package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
  122. package/dist/vue2/lib/emoji-row/emoji-row.js +6 -3
  123. package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
  124. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
  125. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js +9 -6
  126. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
  127. package/dist/vue2/lib/empty-state/empty-state.cjs +1 -1
  128. package/dist/vue2/lib/empty-state/empty-state.js +9 -6
  129. package/dist/vue2/lib/empty-state/empty-state.js.map +1 -1
  130. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  131. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +14 -11
  132. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  133. package/dist/vue2/lib/feed-item-row/feed-item-row.cjs +1 -1
  134. package/dist/vue2/lib/feed-item-row/feed-item-row.js +9 -6
  135. package/dist/vue2/lib/feed-item-row/feed-item-row.js.map +1 -1
  136. package/dist/vue2/lib/general-row/general-row.cjs +1 -1
  137. package/dist/vue2/lib/general-row/general-row.js +5 -2
  138. package/dist/vue2/lib/general-row/general-row.js.map +1 -1
  139. package/dist/vue2/lib/general-row/leftbar-general-row-icon.cjs +1 -1
  140. package/dist/vue2/lib/general-row/leftbar-general-row-icon.js +10 -7
  141. package/dist/vue2/lib/general-row/leftbar-general-row-icon.js.map +1 -1
  142. package/dist/vue2/lib/group-row/group-row.cjs +1 -1
  143. package/dist/vue2/lib/group-row/group-row.js +7 -4
  144. package/dist/vue2/lib/group-row/group-row.js.map +1 -1
  145. package/dist/vue2/lib/grouped-chip/grouped-chip.cjs +1 -1
  146. package/dist/vue2/lib/grouped-chip/grouped-chip.js +7 -4
  147. package/dist/vue2/lib/grouped-chip/grouped-chip.js.map +1 -1
  148. package/dist/vue2/lib/hovercard/hovercard.cjs +1 -1
  149. package/dist/vue2/lib/hovercard/hovercard.js +9 -6
  150. package/dist/vue2/lib/hovercard/hovercard.js.map +1 -1
  151. package/dist/vue2/lib/icon/icon.cjs +1 -1
  152. package/dist/vue2/lib/icon/icon.js +12 -9
  153. package/dist/vue2/lib/icon/icon.js.map +1 -1
  154. package/dist/vue2/lib/illustration/illustration.cjs +1 -1
  155. package/dist/vue2/lib/illustration/illustration.js +13 -10
  156. package/dist/vue2/lib/illustration/illustration.js.map +1 -1
  157. package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
  158. package/dist/vue2/lib/image-viewer/image-viewer.js +9 -6
  159. package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
  160. package/dist/vue2/lib/input/input.cjs +1 -1
  161. package/dist/vue2/lib/input/input.js +5 -2
  162. package/dist/vue2/lib/input/input.js.map +1 -1
  163. package/dist/vue2/lib/input-group/input-group.cjs +1 -1
  164. package/dist/vue2/lib/input-group/input-group.js +9 -6
  165. package/dist/vue2/lib/input-group/input-group.js.map +1 -1
  166. package/dist/vue2/lib/item-layout/item-layout.cjs +2 -2
  167. package/dist/vue2/lib/item-layout/item-layout.js +7 -4
  168. package/dist/vue2/lib/item-layout/item-layout.js.map +1 -1
  169. package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
  170. package/dist/vue2/lib/ivr-node/ivr-node.js +14 -11
  171. package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
  172. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
  173. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js +13 -10
  174. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  175. package/dist/vue2/lib/lazy-show/lazy-show.cjs +1 -1
  176. package/dist/vue2/lib/lazy-show/lazy-show.js +5 -2
  177. package/dist/vue2/lib/lazy-show/lazy-show.js.map +1 -1
  178. package/dist/vue2/lib/link/link.cjs +1 -1
  179. package/dist/vue2/lib/link/link.js +9 -6
  180. package/dist/vue2/lib/link/link.js.map +1 -1
  181. package/dist/vue2/lib/list-item/list-item.cjs +1 -1
  182. package/dist/vue2/lib/list-item/list-item.js +25 -22
  183. package/dist/vue2/lib/list-item/list-item.js.map +1 -1
  184. package/dist/vue2/lib/list-item-group/list-item-group.cjs +1 -1
  185. package/dist/vue2/lib/list-item-group/list-item-group.js +11 -8
  186. package/dist/vue2/lib/list-item-group/list-item-group.js.map +1 -1
  187. package/dist/vue2/lib/message-input/message-input-button.cjs +1 -1
  188. package/dist/vue2/lib/message-input/message-input-button.js +7 -4
  189. package/dist/vue2/lib/message-input/message-input-button.js.map +1 -1
  190. package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
  191. package/dist/vue2/lib/message-input/message-input-link.js +5 -2
  192. package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
  193. package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
  194. package/dist/vue2/lib/message-input/message-input-topbar.js +5 -2
  195. package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
  196. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  197. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  198. package/dist/vue2/lib/message-input/message-input.js +23 -9
  199. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  200. package/dist/vue2/lib/modal/modal.cjs +2 -2
  201. package/dist/vue2/lib/modal/modal.js +5 -2
  202. package/dist/vue2/lib/modal/modal.js.map +1 -1
  203. package/dist/vue2/lib/notice/notice-action.cjs +1 -1
  204. package/dist/vue2/lib/notice/notice-action.js +7 -4
  205. package/dist/vue2/lib/notice/notice-action.js.map +1 -1
  206. package/dist/vue2/lib/notice/notice-content.cjs +1 -1
  207. package/dist/vue2/lib/notice/notice-content.js +5 -2
  208. package/dist/vue2/lib/notice/notice-content.js.map +1 -1
  209. package/dist/vue2/lib/notice/notice-icon.cjs +1 -1
  210. package/dist/vue2/lib/notice/notice-icon.js +16 -13
  211. package/dist/vue2/lib/notice/notice-icon.js.map +1 -1
  212. package/dist/vue2/lib/notice/notice.cjs +1 -1
  213. package/dist/vue2/lib/notice/notice.js +10 -7
  214. package/dist/vue2/lib/notice/notice.js.map +1 -1
  215. package/dist/vue2/lib/pagination/pagination.cjs +1 -1
  216. package/dist/vue2/lib/pagination/pagination.js +9 -6
  217. package/dist/vue2/lib/pagination/pagination.js.map +1 -1
  218. package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
  219. package/dist/vue2/lib/popover/popover-header-footer.js +8 -5
  220. package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
  221. package/dist/vue2/lib/popover/popover.cjs +1 -1
  222. package/dist/vue2/lib/popover/popover.js +5 -2
  223. package/dist/vue2/lib/popover/popover.js.map +1 -1
  224. package/dist/vue2/lib/presence/presence.cjs +1 -1
  225. package/dist/vue2/lib/presence/presence.js +7 -4
  226. package/dist/vue2/lib/presence/presence.js.map +1 -1
  227. package/dist/vue2/lib/radio/radio.cjs +1 -1
  228. package/dist/vue2/lib/radio/radio.js +8 -5
  229. package/dist/vue2/lib/radio/radio.js.map +1 -1
  230. package/dist/vue2/lib/radio-group/radio-group.cjs +1 -1
  231. package/dist/vue2/lib/radio-group/radio-group.js +5 -2
  232. package/dist/vue2/lib/radio-group/radio-group.js.map +1 -1
  233. package/dist/vue2/lib/radio-group/radios-decorator.cjs +1 -1
  234. package/dist/vue2/lib/radio-group/radios-decorator.js +9 -6
  235. package/dist/vue2/lib/radio-group/radios-decorator.js.map +1 -1
  236. package/dist/vue2/lib/rich-text-editor/mention-suggestion.cjs +1 -1
  237. package/dist/vue2/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
  238. package/dist/vue2/lib/rich-text-editor/mention-suggestion.js +33 -14
  239. package/dist/vue2/lib/rich-text-editor/mention-suggestion.js.map +1 -1
  240. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +4 -4
  241. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  242. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +364 -315
  243. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  244. package/dist/vue2/lib/root-layout/root-layout.cjs +1 -1
  245. package/dist/vue2/lib/root-layout/root-layout.js +8 -5
  246. package/dist/vue2/lib/root-layout/root-layout.js.map +1 -1
  247. package/dist/vue2/lib/select-menu/select-menu.cjs +1 -1
  248. package/dist/vue2/lib/select-menu/select-menu.js +5 -2
  249. package/dist/vue2/lib/select-menu/select-menu.js.map +1 -1
  250. package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs +1 -1
  251. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js +7 -4
  252. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  253. package/dist/vue2/lib/skeleton/skeleton-list-item.cjs +1 -1
  254. package/dist/vue2/lib/skeleton/skeleton-list-item.js +5 -2
  255. package/dist/vue2/lib/skeleton/skeleton-list-item.js.map +1 -1
  256. package/dist/vue2/lib/skeleton/skeleton-paragraph.cjs +1 -1
  257. package/dist/vue2/lib/skeleton/skeleton-paragraph.js +8 -5
  258. package/dist/vue2/lib/skeleton/skeleton-paragraph.js.map +1 -1
  259. package/dist/vue2/lib/skeleton/skeleton-shape.cjs +1 -1
  260. package/dist/vue2/lib/skeleton/skeleton-shape.js +7 -4
  261. package/dist/vue2/lib/skeleton/skeleton-shape.js.map +1 -1
  262. package/dist/vue2/lib/skeleton/skeleton-text.cjs +1 -1
  263. package/dist/vue2/lib/skeleton/skeleton-text.js +14 -11
  264. package/dist/vue2/lib/skeleton/skeleton-text.js.map +1 -1
  265. package/dist/vue2/lib/skeleton/skeleton.cjs +1 -1
  266. package/dist/vue2/lib/skeleton/skeleton.js +9 -6
  267. package/dist/vue2/lib/skeleton/skeleton.js.map +1 -1
  268. package/dist/vue2/lib/split-button/split-button-alpha.cjs +1 -1
  269. package/dist/vue2/lib/split-button/split-button-alpha.js +12 -9
  270. package/dist/vue2/lib/split-button/split-button-alpha.js.map +1 -1
  271. package/dist/vue2/lib/split-button/split-button-omega.cjs +1 -1
  272. package/dist/vue2/lib/split-button/split-button-omega.js +9 -6
  273. package/dist/vue2/lib/split-button/split-button-omega.js.map +1 -1
  274. package/dist/vue2/lib/split-button/split-button.cjs +1 -1
  275. package/dist/vue2/lib/split-button/split-button.js +9 -6
  276. package/dist/vue2/lib/split-button/split-button.js.map +1 -1
  277. package/dist/vue2/lib/stack/stack.cjs +1 -1
  278. package/dist/vue2/lib/stack/stack.js +15 -12
  279. package/dist/vue2/lib/stack/stack.js.map +1 -1
  280. package/dist/vue2/lib/tab/tab-group.cjs +1 -1
  281. package/dist/vue2/lib/tab/tab-group.js +5 -2
  282. package/dist/vue2/lib/tab/tab-group.js.map +1 -1
  283. package/dist/vue2/lib/tab/tab-panel.cjs +1 -1
  284. package/dist/vue2/lib/tab/tab-panel.js +11 -8
  285. package/dist/vue2/lib/tab/tab-panel.js.map +1 -1
  286. package/dist/vue2/lib/tab/tab.cjs +1 -1
  287. package/dist/vue2/lib/tab/tab.js +10 -7
  288. package/dist/vue2/lib/tab/tab.js.map +1 -1
  289. package/dist/vue2/lib/time-pill/time-pill.cjs +1 -1
  290. package/dist/vue2/lib/time-pill/time-pill.js +8 -5
  291. package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
  292. package/dist/vue2/lib/toast/toast.cjs +1 -1
  293. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  294. package/dist/vue2/lib/toast/toast.js +17 -5
  295. package/dist/vue2/lib/toast/toast.js.map +1 -1
  296. package/dist/vue2/lib/toggle/toggle.cjs +1 -1
  297. package/dist/vue2/lib/toggle/toggle.js +5 -2
  298. package/dist/vue2/lib/toggle/toggle.js.map +1 -1
  299. package/dist/vue2/lib/tooltip/tooltip.cjs +1 -1
  300. package/dist/vue2/lib/tooltip/tooltip.js +9 -6
  301. package/dist/vue2/lib/tooltip/tooltip.js.map +1 -1
  302. package/dist/vue2/lib/top-banner-info/top-banner-info.cjs +1 -1
  303. package/dist/vue2/lib/top-banner-info/top-banner-info.js +5 -2
  304. package/dist/vue2/lib/top-banner-info/top-banner-info.js.map +1 -1
  305. package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
  306. package/dist/vue2/lib/unread-pill/unread-pill.js +8 -5
  307. package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
  308. package/dist/vue2/lib/validation-messages/validation-messages.cjs +1 -1
  309. package/dist/vue2/lib/validation-messages/validation-messages.js +10 -7
  310. package/dist/vue2/lib/validation-messages/validation-messages.js.map +1 -1
  311. package/dist/vue2/node_modules/@tiptap/vue-2.cjs +1 -1
  312. package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
  313. package/dist/vue2/node_modules/@tiptap/vue-2.js +191 -149
  314. package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
  315. package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
  316. package/dist/vue2/shared/sr_only_close_button.js +12 -9
  317. package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
  318. package/dist/vue2/style.css +1 -0
  319. package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
  320. package/dist/vue2/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +16 -16
  321. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +16 -16
  322. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +16 -16
  323. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -0
  324. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
  325. package/dist/vue2/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +16 -16
  326. package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
  327. package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
  328. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  329. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +16 -16
  330. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  331. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  332. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
  333. package/dist/vue3/component-documentation.json +1 -1
  334. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  335. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  336. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +4 -3
  337. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  338. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
  339. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  340. package/dist/vue3/lib/emoji-picker/emoji-picker.js +518 -415
  341. package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
  342. package/dist/vue3/lib/rich-text-editor/mention-suggestion.cjs +1 -1
  343. package/dist/vue3/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
  344. package/dist/vue3/lib/rich-text-editor/mention-suggestion.js +34 -15
  345. package/dist/vue3/lib/rich-text-editor/mention-suggestion.js.map +1 -1
  346. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  347. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  348. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +264 -212
  349. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  350. package/dist/vue3/lib/toggle/toggle.cjs +1 -1
  351. package/dist/vue3/lib/toggle/toggle.cjs.map +1 -1
  352. package/dist/vue3/lib/toggle/toggle.js +27 -18
  353. package/dist/vue3/lib/toggle/toggle.js.map +1 -1
  354. package/dist/vue3/node_modules/@tiptap/vue-3.cjs +1 -1
  355. package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
  356. package/dist/vue3/node_modules/@tiptap/vue-3.js +165 -115
  357. package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
  358. package/dist/vue3/style.css +1 -0
  359. package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts +1 -1
  360. package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
  361. package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +1 -0
  362. package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -1
  363. package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts.map +1 -1
  364. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  365. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +26 -2
  366. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +26 -2
  367. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +26 -2
  368. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -0
  369. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
  370. package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +26 -2
  371. package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
  372. package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
  373. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  374. package/dist/vue3/types/components/toggle/toggle.vue.d.ts +9 -0
  375. package/dist/vue3/types/components/toggle/toggle.vue.d.ts.map +1 -1
  376. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +1 -1
  377. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +26 -2
  378. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
  379. package/package.json +31 -31
  380. package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js +0 -11
  381. package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js.map +0 -1
  382. package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs +0 -2
  383. package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.cjs","sources":["../../../components/toggle/toggle.vue"],"sourcesContent":["<template>\n <div\n class=\"d-toggle-wrapper\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <label\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport { getUniqueString, hasSlotContent, removeClassStyleAttrs, addClassStyleAttrs } from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model modelValue\n * @values true, false, 'mixed'\n */\n modelValue: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n\n /**\n * v-model event event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'update:modelValue',\n ],\n\n data () {\n return {\n internalChecked: this.modelValue,\n hasSlotContent,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...removeClassStyleAttrs(this.$attrs),\n onClick: _ => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n modelValue (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n addClassStyleAttrs,\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n this.$emit('update:modelValue', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString","v","TOGGLE_CHECKED_VALUES","s","TOGGLE_SIZE_MODIFIERS","hasSlotContent","removeClassStyleAttrs","_","newChecked","addClassStyleAttrs","hasLabel","ariaLabel","warn","_hoisted_1","_hoisted_2","_createElementBlock","_mergeProps","$options","_ctx","$data","_openBlock","$props","_renderSlot","_createCommentVNode","_createElementVNode","_hoisted_3"],"mappings":"2QA0CKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EAEzB,KAAM,WAEN,aAAc,GAEd,MAAO,CAKL,GAAI,CACF,KAAM,OACN,SAAW,CAAE,OAAOC,EAAe,gBAAA,CAAK,CACzC,EAMD,SAAU,CACR,KAAM,QACN,QAAS,EACV,EAOD,WAAY,CACV,KAAM,CAAC,QAAS,MAAM,EACtB,QAAS,GACT,UAAYC,GAAMC,wBAAsB,SAASD,CAAC,CACnD,EAOD,cAAe,CACb,KAAM,QACN,QAAS,EACV,EAMD,KAAM,CACJ,KAAM,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KAAA,EAAAC,EAAA,CAAA,KAAA,OAAA,eAAA,WAAA,eAAA,KAAA,IAAA,EA2BQ,MAAM,gEA1BZC,EAAAA,mBA6BM,MA7BNC,aA6BM,CA5BJ,MAAM,kBAAkB,EAChBC,EAAkB,mBAACC,EAAM,MAAA,CAAA,EAAA,CAGzBC,EAAc,eAACD,EAAM,OAAC,OAAO,GADrCE,EAAAA,YAAAL,EAAAA,mBASQ,QATRC,aASQ,CAdZ,IAAA,EAOO,MAAOK,EAAU,WACjB,IAAKA,EAAE,IACAA,EAAe,gBAAA,CACvB,UAAQ,cAAc,CAAA,EAAA,CAGtBC,aAAQJ,EAAA,OAAA,SAAA,CAbd,EAAA,GAAAL,CAAA,GAAAU,EAAA,mBAAA,GAAA,EAAA,EAeIC,EAAA,mBAcS,SAdTR,aAcS,CAbN,GAAIK,EAAE,GACN,KAAMJ,EAAU,WACjB,KAAK,SACJ,eAAcE,EAAe,gBAAC,SAAQ,EACtC,SAAUE,EAAQ,SAClB,gBAAeA,EAAQ,SAAC,SAAQ,EAChC,MAAOJ,EAAa,eACbA,EAAc,cAAA,EAAA,CAGdI,EAAQ,UADhBD,EAAAA,YAAAL,EAAAA,mBAGE,OAHFU,CAGE,GA5BRF,EAAA,mBAAA,GAAA,EAAA,CAAA,EAAA,GAAAT,CAAA"}
1
+ {"version":3,"file":"toggle.cjs","sources":["../../../components/toggle/toggle.vue"],"sourcesContent":["<template>\n <div\n :class=\"['d-toggle-wrapper', wrapperClass]\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <label\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport { getUniqueString, hasSlotContent, removeClassStyleAttrs, addClassStyleAttrs } from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model modelValue\n * @values true, false, 'mixed'\n */\n modelValue: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional styling for the wrapper element\n */\n wrapperClass: {\n type: [String, Array, Object],\n default: undefined,\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n\n /**\n * v-model event event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'update:modelValue',\n ],\n\n data () {\n return {\n internalChecked: this.modelValue,\n hasSlotContent,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...removeClassStyleAttrs(this.$attrs),\n onClick: _ => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n modelValue (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n addClassStyleAttrs,\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n this.$emit('update:modelValue', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString","v","TOGGLE_CHECKED_VALUES","s","TOGGLE_SIZE_MODIFIERS","hasSlotContent","removeClassStyleAttrs","_","newChecked","addClassStyleAttrs","hasLabel","ariaLabel","warn","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_mergeProps","$props","$options","_ctx","$data","_renderSlot","_createCommentVNode","_createElementVNode","_hoisted_3"],"mappings":"2QA0CKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EAEzB,KAAM,WAEN,aAAc,GAEd,MAAO,CAKL,GAAI,CACF,KAAM,OACN,SAAW,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, createElementVNode as u } from "vue";
2
- import { getUniqueString as g, hasSlotContent as m, removeClassStyleAttrs as C, addClassStyleAttrs as b } from "../../common/utils/index.js";
3
- import { TOGGLE_CHECKED_VALUES as f, TOGGLE_SIZE_MODIFIERS as o } from "./toggle-constants.js";
1
+ import { warn as h, openBlock as l, createElementBlock as s, mergeProps as i, renderSlot as c, createCommentVNode as n, createElementVNode as u } from "vue";
2
+ import { getUniqueString as g, hasSlotContent as m, removeClassStyleAttrs as C, addClassStyleAttrs as f } from "../../common/utils/index.js";
3
+ import { TOGGLE_CHECKED_VALUES as b, TOGGLE_SIZE_MODIFIERS as o } from "./toggle-constants.js";
4
4
  import { _ as k } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const p = {
6
6
  compatConfig: { MODE: 3 },
@@ -32,7 +32,7 @@ const p = {
32
32
  modelValue: {
33
33
  type: [Boolean, String],
34
34
  default: !1,
35
- validator: (e) => f.includes(e)
35
+ validator: (e) => b.includes(e)
36
36
  },
37
37
  /**
38
38
  * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually
@@ -67,6 +67,13 @@ const p = {
67
67
  type: [String, Array, Object],
68
68
  default: ""
69
69
  },
70
+ /**
71
+ * Additional styling for the wrapper element
72
+ */
73
+ wrapperClass: {
74
+ type: [String, Array, Object],
75
+ default: void 0
76
+ },
70
77
  /**
71
78
  * A set of props that are passed into the label container
72
79
  */
@@ -133,7 +140,7 @@ const p = {
133
140
  this.runValidations();
134
141
  },
135
142
  methods: {
136
- addClassStyleAttrs: b,
143
+ addClassStyleAttrs: f,
137
144
  toggleCheckedValue() {
138
145
  this.$emit("change", !this.internalChecked), this.$emit("update:modelValue", !this.internalChecked), this.toggleOnClick && (this.internalChecked = !this.internalChecked);
139
146
  },
@@ -150,34 +157,36 @@ const p = {
150
157
  );
151
158
  }
152
159
  }
153
- }, _ = ["for"], S = ["id", "role", "aria-checked", "disabled", "aria-disabled"], y = {
160
+ }, S = ["for"], _ = ["id", "role", "aria-checked", "disabled", "aria-disabled"], y = {
154
161
  key: 0,
155
162
  class: "d-toggle__inner"
156
163
  };
157
- function V(e, d, t, E, n, l) {
158
- return a(), s("div", i({ class: "d-toggle-wrapper" }, l.addClassStyleAttrs(e.$attrs)), [
159
- n.hasSlotContent(e.$slots.default) ? (a(), s("label", i({
164
+ function V(e, d, t, E, r, a) {
165
+ return l(), s("div", i({
166
+ class: ["d-toggle-wrapper", t.wrapperClass]
167
+ }, a.addClassStyleAttrs(e.$attrs)), [
168
+ r.hasSlotContent(e.$slots.default) ? (l(), s("label", i({
160
169
  key: 0,
161
170
  class: t.labelClass,
162
171
  for: t.id
163
172
  }, t.labelChildProps, { "data-qa": "toggle-label" }), [
164
173
  c(e.$slots, "default")
165
- ], 16, _)) : r("", !0),
174
+ ], 16, S)) : n("", !0),
166
175
  u("button", i({
167
176
  id: t.id,
168
- role: l.toggleRole,
177
+ role: a.toggleRole,
169
178
  type: "button",
170
- "aria-checked": n.internalChecked.toString(),
179
+ "aria-checked": r.internalChecked.toString(),
171
180
  disabled: t.disabled,
172
181
  "aria-disabled": t.disabled.toString(),
173
- class: l.toggleClasses
174
- }, l.inputListeners), [
175
- t.showIcon ? (a(), s("span", y)) : r("", !0)
176
- ], 16, S)
182
+ class: a.toggleClasses
183
+ }, a.inputListeners), [
184
+ t.showIcon ? (l(), s("span", y)) : n("", !0)
185
+ ], 16, _)
177
186
  ], 16);
178
187
  }
179
- const w = /* @__PURE__ */ k(p, [["render", V]]);
188
+ const v = /* @__PURE__ */ k(p, [["render", V]]);
180
189
  export {
181
- w as default
190
+ v as default
182
191
  };
183
192
  //# sourceMappingURL=toggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.js","sources":["../../../components/toggle/toggle.vue"],"sourcesContent":["<template>\n <div\n class=\"d-toggle-wrapper\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <label\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport { getUniqueString, hasSlotContent, removeClassStyleAttrs, addClassStyleAttrs } from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model modelValue\n * @values true, false, 'mixed'\n */\n modelValue: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n\n /**\n * v-model event event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'update:modelValue',\n ],\n\n data () {\n return {\n internalChecked: this.modelValue,\n hasSlotContent,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...removeClassStyleAttrs(this.$attrs),\n onClick: _ => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n modelValue (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n addClassStyleAttrs,\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n this.$emit('update:modelValue', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString","v","TOGGLE_CHECKED_VALUES","s","TOGGLE_SIZE_MODIFIERS","hasSlotContent","removeClassStyleAttrs","_","newChecked","addClassStyleAttrs","hasLabel","ariaLabel","warn","_hoisted_1","_hoisted_2","_createElementBlock","_mergeProps","$options","_ctx","$data","_openBlock","$props","_renderSlot","_createCommentVNode","_createElementVNode","_hois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1BZC,EA6BM,OA7BNC,EA6BM,EA5BJ,OAAM,mBAAkB,GAChBC,EAAkB,mBAACC,EAAM,MAAA,CAAA,GAAA;AAAA,IAGzBC,EAAc,eAACD,EAAM,OAAC,OAAO,KADrCE,KAAAL,EASQ,SATRC,EASQ;AAAA,MAdZ,KAAA;AAAA,MAOO,OAAOK,EAAU;AAAA,MACjB,KAAKA,EAAE;AAAA,OACAA,EAAe,iBAAA,EACvB,WAAQ,eAAc,CAAA,GAAA;AAAA,MAGtBC,EAAQJ,EAAA,QAAA,SAAA;AAAA,IAbd,GAAA,IAAAL,CAAA,KAAAU,EAAA,IAAA,EAAA;AAAA,IAeIC,EAcS,UAdTR,EAcS;AAAA,MAbN,IAAIK,EAAE;AAAA,MACN,MAAMJ,EAAU;AAAA,MACjB,MAAK;AAAA,MACJ,gBAAcE,EAAe,gBAAC,SAAQ;AAAA,MACtC,UAAUE,EAAQ;AAAA,MAClB,iBAAeA,EAAQ,SAAC,SAAQ;AAAA,MAChC,OAAOJ,EAAa;AAAA,OACbA,EAAc,cAAA,GAAA;AAAA,MAGdI,EAAQ,YADhBD,KAAAL,EAGE,QAHFU,CAGE,KA5BRF,EAAA,IAAA,EAAA;AAAA,IAAA,GAAA,IAAAT,CAAA;AAAA;;;"}
1
+ {"version":3,"file":"toggle.js","sources":["../../../components/toggle/toggle.vue"],"sourcesContent":["<template>\n <div\n :class=\"['d-toggle-wrapper', wrapperClass]\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <label\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport { getUniqueString, hasSlotContent, removeClassStyleAttrs, addClassStyleAttrs } from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model modelValue\n * @values true, false, 'mixed'\n */\n modelValue: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional styling for the wrapper element\n */\n wrapperClass: {\n type: [String, Array, Object],\n default: undefined,\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n\n /**\n * v-model event event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'update:modelValue',\n ],\n\n data () {\n return {\n internalChecked: this.modelValue,\n hasSlotContent,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...removeClassStyleAttrs(this.$attrs),\n onClick: _ => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n modelValue (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n addClassStyleAttrs,\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n this.$emit('update:modelValue', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString","v","TOGGLE_CHECKED_VALUES","s","TOGGLE_SIZE_MODIFIERS","hasSlotContent","removeClassStyleAttrs","_","newChecked","addClassStyleAttrs","hasLabel","ariaLabel","warn","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_mergeProps","$props","$options","_ctx","$data","_renderSlot","_createCommentVNode","_createElementVNode","_hoisted_3"],"mappings":";;;;AA0CA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EAEzB,MAAM;AAAA,EAEN,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAKL,I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AAAA,IA5BH,4BAA4BC,EAAY,YAAA;AAAA,EACjC,GAAAC,EAAA,mBAAmBC,EAAM,MAAA,CAAA,GAAA;AAAA,IAGzBC,EAAc,eAACD,EAAM,OAAC,OAAO,KADrCL,KAAAC,EASQ,SATRC,EASQ;AAAA,MAdZ,KAAA;AAAA,MAOO,OAAOC,EAAU;AAAA,MACjB,KAAKA,EAAE;AAAA,OACAA,EAAe,iBAAA,EACvB,WAAQ,eAAc,CAAA,GAAA;AAAA,MAGtBI,EAAQF,EAAA,QAAA,SAAA;AAAA,IAbd,GAAA,IAAAP,CAAA,KAAAU,EAAA,IAAA,EAAA;AAAA,IAeIC,EAcS,UAdTP,EAcS;AAAA,MAbN,IAAIC,EAAE;AAAA,MACN,MAAMC,EAAU;AAAA,MACjB,MAAK;AAAA,MACJ,gBAAcE,EAAe,gBAAC,SAAQ;AAAA,MACtC,UAAUH,EAAQ;AAAA,MAClB,iBAAeA,EAAQ,SAAC,SAAQ;AAAA,MAChC,OAAOC,EAAa;AAAA,OACbA,EAAc,cAAA,GAAA;AAAA,MAGdD,EAAQ,YADhBH,KAAAC,EAGE,QAHFS,CAGE,KA5BRF,EAAA,IAAA,EAAA;AAAA,IAAA,GAAA,IAAAT,CAAA;AAAA;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@tiptap/extension-bubble-menu"),o=require("vue"),u=require("@tiptap/core"),m=require("@tiptap/extension-floating-menu"),f=o.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:e}){const n=o.ref(null);return o.onMounted(()=>{const{updateDelay:t,editor:i,pluginKey:s,shouldShow:d,tippyOptions:c}=r;i.registerPlugin(h.BubbleMenuPlugin({updateDelay:t,editor:i,element:n.value,pluginKey:s,shouldShow:d,tippyOptions:c}))}),o.onBeforeUnmount(()=>{const{pluginKey:t,editor:i}=r;i.unregisterPlugin(t)}),()=>{var t;return o.h("div",{ref:n},(t=e.default)===null||t===void 0?void 0:t.call(e))}}});function a(r){return o.customRef((e,n)=>({get(){return e(),r},set(t){r=t,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class l extends u.Editor{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=a(this.view.state),this.reactiveExtensionStorage=a(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),o.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,n){super.registerPlugin(e,n),this.reactiveState.value=this.view.state}unregisterPlugin(e){super.unregisterPlugin(e),this.reactiveState.value=this.view.state}}const v=o.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(r){const e=o.ref(),n=o.getCurrentInstance();return o.watchEffect(()=>{const t=r.editor;t&&t.options.element&&e.value&&o.nextTick(()=>{if(!e.value||!t.options.element.firstChild)return;const i=o.unref(e.value);e.value.append(...t.options.element.childNodes),t.contentComponent=n.ctx._,n&&(t.appContext={...n.appContext,provides:n.provides}),t.setOptions({element:i}),t.createNodeViews()})}),o.onBeforeUnmount(()=>{const t=r.editor;if(!t||(t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,t.appContext=null,!t.options.element.firstChild))return;const i=document.createElement("div");i.append(...t.options.element.childNodes),t.setOptions({element:i})}),{rootEl:e}},render(){return o.h("div",{ref:r=>{this.rootEl=r}})}}),g=o.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:e}){const n=o.ref(null);return o.onMounted(()=>{const{pluginKey:t,editor:i,tippyOptions:s,shouldShow:d}=r;i.registerPlugin(m.FloatingMenuPlugin({pluginKey:t,editor:i,element:n.value,tippyOptions:s,shouldShow:d}))}),o.onBeforeUnmount(()=>{const{pluginKey:t,editor:i}=r;i.unregisterPlugin(t)}),()=>{var t;return o.h("div",{ref:n},(t=e.default)===null||t===void 0?void 0:t.call(e))}}}),y=o.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return o.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),C=o.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var r,e;return o.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(r=this.$slots).default)===null||e===void 0?void 0:e.call(r))}}),w=(r={})=>{const e=o.shallowRef();return o.onMounted(()=>{e.value=new l(r)}),o.onBeforeUnmount(()=>{var n;(n=e.value)===null||n===void 0||n.destroy()}),e};class p{constructor(e,{props:n={},editor:t}){this.editor=t,this.component=o.markRaw(e),this.el=document.createElement("div"),this.props=o.reactive(n),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var e,n,t,i;return!((n=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||n===void 0)&&n.exposed?this.renderedComponent.vNode.component.exposed:(i=(t=this.renderedComponent.vNode)===null||t===void 0?void 0:t.component)===null||i===void 0?void 0:i.proxy}renderComponent(){let e=o.h(this.component,this.props);return this.editor.appContext&&(e.appContext=this.editor.appContext),typeof document<"u"&&this.el&&o.render(e,this.el),{vNode:e,destroy:()=>{this.el&&o.render(null,this.el),this.el=null,e=null},el:this.el?this.el.firstElementChild:null}}updateProps(e={}){Object.entries(e).forEach(([n,t])=>{this.props[n]=t}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}const b={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0}};class _ extends u.NodeView{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()},n=this.onDragStart.bind(this);this.decorationClasses=o.ref(this.getDecorationClasses());const t=o.defineComponent({extends:{...this.component},props:Object.keys(e),template:this.component.template,setup:i=>{var s,d;return o.provide("onDragStart",n),o.provide("decorationClasses",this.decorationClasses),(d=(s=this.component).setup)===null||d===void 0?void 0:d.call(s,i,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.renderer=new p(t,{editor:this.editor,props:e})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}update(e,n){const t=i=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(i)};if(typeof this.options.update=="function"){const i=this.node,s=this.decorations;return this.node=e,this.decorations=n,this.options.update({oldNode:i,oldDecorations:s,newNode:e,newDecorations:n,updateProps:()=>t({node:e,decorations:n})})}return e.type!==this.node.type?!1:(e===this.node&&this.decorations===n||(this.node=e,this.decorations=n,t({node:e,decorations:n})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(e=>e.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy()}}function S(r,e){return n=>{if(!n.editor.contentComponent)return{};const t=typeof r=="function"&&"__vccOpts"in r?r.__vccOpts:r;return new _(t,n,e)}}exports.BubbleMenu=f;exports.Editor=l;exports.EditorContent=v;exports.FloatingMenu=g;exports.NodeViewContent=y;exports.NodeViewWrapper=C;exports.VueNodeViewRenderer=S;exports.VueRenderer=p;exports.nodeViewProps=b;exports.useEditor=w;Object.keys(u).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(exports,r)&&Object.defineProperty(exports,r,{enumerable:!0,get:()=>u[r]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@tiptap/extension-bubble-menu"),o=require("vue"),u=require("@tiptap/core"),f=require("@tiptap/extension-floating-menu"),v=o.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:t}){const n=o.ref(null);return o.onMounted(()=>{const{updateDelay:e,editor:i,pluginKey:s,shouldShow:d,tippyOptions:l}=r;i.registerPlugin(h.BubbleMenuPlugin({updateDelay:e,editor:i,element:n.value,pluginKey:s,shouldShow:d,tippyOptions:l}))}),o.onBeforeUnmount(()=>{const{pluginKey:e,editor:i}=r;i.unregisterPlugin(e)}),()=>{var e;return o.h("div",{ref:n},(e=t.default)===null||e===void 0?void 0:e.call(t))}}});function a(r){return o.customRef((t,n)=>({get(){return t(),r},set(e){r=e,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class p extends u.Editor{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=a(this.view.state),this.reactiveExtensionStorage=a(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),o.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,n){const e=super.registerPlugin(t,n);return this.reactiveState&&(this.reactiveState.value=e),e}unregisterPlugin(t){const n=super.unregisterPlugin(t);return this.reactiveState&&n&&(this.reactiveState.value=n),n}}const m=o.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(r){const t=o.ref(),n=o.getCurrentInstance();return o.watchEffect(()=>{const e=r.editor;e&&e.options.element&&t.value&&o.nextTick(()=>{if(!t.value||!e.options.element.firstChild)return;const i=o.unref(t.value);t.value.append(...e.options.element.childNodes),e.contentComponent=n.ctx._,n&&(e.appContext={...n.appContext,provides:n.provides}),e.setOptions({element:i}),e.createNodeViews()})}),o.onBeforeUnmount(()=>{const e=r.editor;e&&(e.contentComponent=null,e.appContext=null)}),{rootEl:t}},render(){return o.h("div",{ref:r=>{this.rootEl=r}})}}),g=o.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:t}){const n=o.ref(null);return o.onMounted(()=>{const{pluginKey:e,editor:i,tippyOptions:s,shouldShow:d}=r;i.registerPlugin(f.FloatingMenuPlugin({pluginKey:e,editor:i,element:n.value,tippyOptions:s,shouldShow:d}))}),o.onBeforeUnmount(()=>{const{pluginKey:e,editor:i}=r;i.unregisterPlugin(e)}),()=>{var e;return o.h("div",{ref:n},(e=t.default)===null||e===void 0?void 0:e.call(t))}}}),y=o.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return o.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),b=o.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var r,t;return o.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(t=(r=this.$slots).default)===null||t===void 0?void 0:t.call(r))}}),C=(r={})=>{const t=o.shallowRef();return o.onMounted(()=>{t.value=new p(r)}),o.onBeforeUnmount(()=>{var n,e,i;const s=(n=t.value)===null||n===void 0?void 0:n.options.element,d=s==null?void 0:s.cloneNode(!0);(e=s==null?void 0:s.parentNode)===null||e===void 0||e.replaceChild(d,s),(i=t.value)===null||i===void 0||i.destroy()}),t};class c{constructor(t,{props:n={},editor:e}){this.editor=e,this.component=o.markRaw(t),this.el=document.createElement("div"),this.props=o.reactive(n),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var t,n,e,i;return!((n=(t=this.renderedComponent.vNode)===null||t===void 0?void 0:t.component)===null||n===void 0)&&n.exposed?this.renderedComponent.vNode.component.exposed:(i=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||i===void 0?void 0:i.proxy}renderComponent(){let t=o.h(this.component,this.props);return this.editor.appContext&&(t.appContext=this.editor.appContext),typeof document<"u"&&this.el&&o.render(t,this.el),{vNode:t,destroy:()=>{this.el&&o.render(null,this.el),this.el=null,t=null},el:this.el?this.el.firstElementChild:null}}updateProps(t={}){Object.entries(t).forEach(([n,e])=>{this.props[n]=e}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}const w={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}};class S extends u.NodeView{mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()},n=this.onDragStart.bind(this);this.decorationClasses=o.ref(this.getDecorationClasses());const e=o.defineComponent({extends:{...this.component},props:Object.keys(t),template:this.component.template,setup:i=>{var s,d;return o.provide("onDragStart",n),o.provide("decorationClasses",this.decorationClasses),(d=(s=this.component).setup)===null||d===void 0?void 0:d.call(s,i,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new c(e,{editor:this.editor,props:t})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:t,to:n}=this.editor.state.selection,e=this.getPos();if(typeof e=="number")if(t<=e&&n>=e+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,n,e){const i=s=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(s)};if(typeof this.options.update=="function"){const s=this.node,d=this.decorations,l=this.innerDecorations;return this.node=t,this.decorations=n,this.innerDecorations=e,this.options.update({oldNode:s,oldDecorations:d,newNode:t,newDecorations:n,oldInnerDecorations:l,innerDecorations:e,updateProps:()=>i({node:t,decorations:n,innerDecorations:e})})}return t.type!==this.node.type?!1:(t===this.node&&this.decorations===n&&this.innerDecorations===e||(this.node=t,this.decorations=n,this.innerDecorations=e,i({node:t,decorations:n,innerDecorations:e})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(t=>t.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}}function _(r,t){return n=>{if(!n.editor.contentComponent)return{};const e=typeof r=="function"&&"__vccOpts"in r?r.__vccOpts:r;return new S(e,n,t)}}exports.BubbleMenu=v;exports.Editor=p;exports.EditorContent=m;exports.FloatingMenu=g;exports.NodeViewContent=y;exports.NodeViewWrapper=b;exports.VueNodeViewRenderer=_;exports.VueRenderer=c;exports.nodeViewProps=w;exports.useEditor=C;Object.keys(u).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(exports,r)&&Object.defineProperty(exports,r,{enumerable:!0,get:()=>u[r]})});
2
2
  //# sourceMappingURL=vue-3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"vue-3.cjs","sources":["../../../../../node_modules/.pnpm/@tiptap+vue-3@2.6.6_@tiptap+core@2.6.6_@tiptap+pm@2.6.6__@tiptap+pm@2.6.6_vue@3.4.15_typescript@5.6.3_/node_modules/@tiptap/vue-3/dist/index.js"],"sourcesContent":["import { BubbleMenuPlugin } from '@tiptap/extension-bubble-menu';\nimport { defineComponent, ref, onMounted, onBeforeUnmount, h, markRaw, customRef, getCurrentInstance, watchEffect, nextTick, unref, shallowRef, reactive, render, provide } from 'vue';\nimport { Editor as Editor$1, NodeView } from '@tiptap/core';\nexport * from '@tiptap/core';\nimport { FloatingMenuPlugin } from '@tiptap/extension-floating-menu';\n\nconst BubbleMenu = defineComponent({\n name: 'BubbleMenu',\n props: {\n pluginKey: {\n type: [String, Object],\n default: 'bubbleMenu',\n },\n editor: {\n type: Object,\n required: true,\n },\n updateDelay: {\n type: Number,\n default: undefined,\n },\n tippyOptions: {\n type: Object,\n default: () => ({}),\n },\n shouldShow: {\n type: Function,\n default: null,\n },\n },\n setup(props, { slots }) {\n const root = ref(null);\n onMounted(() => {\n const { updateDelay, editor, pluginKey, shouldShow, tippyOptions, } = props;\n editor.registerPlugin(BubbleMenuPlugin({\n updateDelay,\n editor,\n element: root.value,\n pluginKey,\n shouldShow,\n tippyOptions,\n }));\n });\n onBeforeUnmount(() => {\n const { pluginKey, editor } = props;\n editor.unregisterPlugin(pluginKey);\n });\n return () => { var _a; return h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };\n },\n});\n\n/* eslint-disable react-hooks/rules-of-hooks */\nfunction useDebouncedRef(value) {\n return customRef((track, trigger) => {\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n // update state\n value = newValue;\n // update view as soon as possible\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n trigger();\n });\n });\n },\n };\n });\n}\nclass Editor extends Editor$1 {\n constructor(options = {}) {\n super(options);\n this.contentComponent = null;\n this.appContext = null;\n this.reactiveState = useDebouncedRef(this.view.state);\n this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);\n this.on('beforeTransaction', ({ nextState }) => {\n this.reactiveState.value = nextState;\n this.reactiveExtensionStorage.value = this.extensionStorage;\n });\n return markRaw(this); // eslint-disable-line\n }\n get state() {\n return this.reactiveState ? this.reactiveState.value : this.view.state;\n }\n get storage() {\n return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;\n }\n /**\n * Register a ProseMirror plugin.\n */\n registerPlugin(plugin, handlePlugins) {\n super.registerPlugin(plugin, handlePlugins);\n this.reactiveState.value = this.view.state;\n }\n /**\n * Unregister a ProseMirror plugin.\n */\n unregisterPlugin(nameOrPluginKey) {\n super.unregisterPlugin(nameOrPluginKey);\n this.reactiveState.value = this.view.state;\n }\n}\n\nconst EditorContent = defineComponent({\n name: 'EditorContent',\n props: {\n editor: {\n default: null,\n type: Object,\n },\n },\n setup(props) {\n const rootEl = ref();\n const instance = getCurrentInstance();\n watchEffect(() => {\n const editor = props.editor;\n if (editor && editor.options.element && rootEl.value) {\n nextTick(() => {\n if (!rootEl.value || !editor.options.element.firstChild) {\n return;\n }\n const element = unref(rootEl.value);\n rootEl.value.append(...editor.options.element.childNodes);\n // @ts-ignore\n editor.contentComponent = instance.ctx._;\n if (instance) {\n editor.appContext = {\n ...instance.appContext,\n // Vue internally uses prototype chain to forward/shadow injects across the entire component chain\n // so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext\n // @ts-expect-error forward instance's 'provides' into appContext\n provides: instance.provides,\n };\n }\n editor.setOptions({\n element,\n });\n editor.createNodeViews();\n });\n }\n });\n onBeforeUnmount(() => {\n const editor = props.editor;\n if (!editor) {\n return;\n }\n // destroy nodeviews before vue removes dom element\n if (!editor.isDestroyed) {\n editor.view.setProps({\n nodeViews: {},\n });\n }\n editor.contentComponent = null;\n editor.appContext = null;\n if (!editor.options.element.firstChild) {\n return;\n }\n const newElement = document.createElement('div');\n newElement.append(...editor.options.element.childNodes);\n editor.setOptions({\n element: newElement,\n });\n });\n return { rootEl };\n },\n render() {\n return h('div', {\n ref: (el) => { this.rootEl = el; },\n });\n },\n});\n\nconst FloatingMenu = defineComponent({\n name: 'FloatingMenu',\n props: {\n pluginKey: {\n // TODO: TypeScript breaks :(\n // type: [String, Object as PropType<Exclude<FloatingMenuPluginProps['pluginKey'], string>>],\n type: null,\n default: 'floatingMenu',\n },\n editor: {\n type: Object,\n required: true,\n },\n tippyOptions: {\n type: Object,\n default: () => ({}),\n },\n shouldShow: {\n type: Function,\n default: null,\n },\n },\n setup(props, { slots }) {\n const root = ref(null);\n onMounted(() => {\n const { pluginKey, editor, tippyOptions, shouldShow, } = props;\n editor.registerPlugin(FloatingMenuPlugin({\n pluginKey,\n editor,\n element: root.value,\n tippyOptions,\n shouldShow,\n }));\n });\n onBeforeUnmount(() => {\n const { pluginKey, editor } = props;\n editor.unregisterPlugin(pluginKey);\n });\n return () => { var _a; return h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };\n },\n});\n\nconst NodeViewContent = defineComponent({\n name: 'NodeViewContent',\n props: {\n as: {\n type: String,\n default: 'div',\n },\n },\n render() {\n return h(this.as, {\n style: {\n whiteSpace: 'pre-wrap',\n },\n 'data-node-view-content': '',\n });\n },\n});\n\nconst NodeViewWrapper = defineComponent({\n name: 'NodeViewWrapper',\n props: {\n as: {\n type: String,\n default: 'div',\n },\n },\n inject: ['onDragStart', 'decorationClasses'],\n render() {\n var _a, _b;\n return h(this.as, {\n // @ts-ignore\n class: this.decorationClasses,\n style: {\n whiteSpace: 'normal',\n },\n 'data-node-view-wrapper': '',\n // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)\n onDragstart: this.onDragStart,\n }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));\n },\n});\n\nconst useEditor = (options = {}) => {\n const editor = shallowRef();\n onMounted(() => {\n editor.value = new Editor(options);\n });\n onBeforeUnmount(() => {\n var _a;\n (_a = editor.value) === null || _a === void 0 ? void 0 : _a.destroy();\n });\n return editor;\n};\n\n/**\n * This class is used to render Vue components inside the editor.\n */\nclass VueRenderer {\n constructor(component, { props = {}, editor }) {\n this.editor = editor;\n this.component = markRaw(component);\n this.el = document.createElement('div');\n this.props = reactive(props);\n this.renderedComponent = this.renderComponent();\n }\n get element() {\n return this.renderedComponent.el;\n }\n get ref() {\n var _a, _b, _c, _d;\n // Composition API\n if ((_b = (_a = this.renderedComponent.vNode) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.exposed) {\n return this.renderedComponent.vNode.component.exposed;\n }\n // Option API\n return (_d = (_c = this.renderedComponent.vNode) === null || _c === void 0 ? void 0 : _c.component) === null || _d === void 0 ? void 0 : _d.proxy;\n }\n renderComponent() {\n let vNode = h(this.component, this.props);\n if (this.editor.appContext) {\n vNode.appContext = this.editor.appContext;\n }\n if (typeof document !== 'undefined' && this.el) {\n render(vNode, this.el);\n }\n const destroy = () => {\n if (this.el) {\n render(null, this.el);\n }\n this.el = null;\n vNode = null;\n };\n return { vNode, destroy, el: this.el ? this.el.firstElementChild : null };\n }\n updateProps(props = {}) {\n Object.entries(props).forEach(([key, value]) => {\n this.props[key] = value;\n });\n this.renderComponent();\n }\n destroy() {\n this.renderedComponent.destroy();\n }\n}\n\nconst nodeViewProps = {\n editor: {\n type: Object,\n required: true,\n },\n node: {\n type: Object,\n required: true,\n },\n decorations: {\n type: Object,\n required: true,\n },\n selected: {\n type: Boolean,\n required: true,\n },\n extension: {\n type: Object,\n required: true,\n },\n getPos: {\n type: Function,\n required: true,\n },\n updateAttributes: {\n type: Function,\n required: true,\n },\n deleteNode: {\n type: Function,\n required: true,\n },\n};\nclass VueNodeView extends NodeView {\n mount() {\n const props = {\n editor: this.editor,\n node: this.node,\n decorations: this.decorations,\n selected: false,\n extension: this.extension,\n getPos: () => this.getPos(),\n updateAttributes: (attributes = {}) => this.updateAttributes(attributes),\n deleteNode: () => this.deleteNode(),\n };\n const onDragStart = this.onDragStart.bind(this);\n this.decorationClasses = ref(this.getDecorationClasses());\n const extendedComponent = defineComponent({\n extends: { ...this.component },\n props: Object.keys(props),\n template: this.component.template,\n setup: reactiveProps => {\n var _a, _b;\n provide('onDragStart', onDragStart);\n provide('decorationClasses', this.decorationClasses);\n return (_b = (_a = this.component).setup) === null || _b === void 0 ? void 0 : _b.call(_a, reactiveProps, {\n expose: () => undefined,\n });\n },\n // add support for scoped styles\n // @ts-ignore\n // eslint-disable-next-line\n __scopeId: this.component.__scopeId,\n // add support for CSS Modules\n // @ts-ignore\n // eslint-disable-next-line\n __cssModules: this.component.__cssModules,\n // add support for vue devtools\n // @ts-ignore\n // eslint-disable-next-line\n __name: this.component.__name,\n // @ts-ignore\n // eslint-disable-next-line\n __file: this.component.__file,\n });\n this.renderer = new VueRenderer(extendedComponent, {\n editor: this.editor,\n props,\n });\n }\n get dom() {\n if (!this.renderer.element || !this.renderer.element.hasAttribute('data-node-view-wrapper')) {\n throw Error('Please use the NodeViewWrapper component for your node view.');\n }\n return this.renderer.element;\n }\n get contentDOM() {\n if (this.node.isLeaf) {\n return null;\n }\n return this.dom.querySelector('[data-node-view-content]');\n }\n update(node, decorations) {\n const updateProps = (props) => {\n this.decorationClasses.value = this.getDecorationClasses();\n this.renderer.updateProps(props);\n };\n if (typeof this.options.update === 'function') {\n const oldNode = this.node;\n const oldDecorations = this.decorations;\n this.node = node;\n this.decorations = decorations;\n return this.options.update({\n oldNode,\n oldDecorations,\n newNode: node,\n newDecorations: decorations,\n updateProps: () => updateProps({ node, decorations }),\n });\n }\n if (node.type !== this.node.type) {\n return false;\n }\n if (node === this.node && this.decorations === decorations) {\n return true;\n }\n this.node = node;\n this.decorations = decorations;\n updateProps({ node, decorations });\n return true;\n }\n selectNode() {\n this.renderer.updateProps({\n selected: true,\n });\n if (this.renderer.element) {\n this.renderer.element.classList.add('ProseMirror-selectednode');\n }\n }\n deselectNode() {\n this.renderer.updateProps({\n selected: false,\n });\n if (this.renderer.element) {\n this.renderer.element.classList.remove('ProseMirror-selectednode');\n }\n }\n getDecorationClasses() {\n return (this.decorations\n // @ts-ignore\n .map(item => item.type.attrs.class)\n .flat()\n .join(' '));\n }\n destroy() {\n this.renderer.destroy();\n }\n}\nfunction VueNodeViewRenderer(component, options) {\n return (props) => {\n // try to get the parent component\n // this is important for vue devtools to show the component hierarchy correctly\n // maybe it’s `undefined` because <editor-content> isn’t rendered yet\n if (!props.editor.contentComponent) {\n return {};\n }\n // check for class-component and normalize if neccessary\n const normalizedComponent = typeof component === 'function' && '__vccOpts' in component\n // eslint-disable-next-line no-underscore-dangle\n ? component.__vccOpts\n : component;\n return new VueNodeView(normalizedComponent, props, options);\n };\n}\n\nexport { BubbleMenu, Editor, EditorContent, FloatingMenu, NodeViewContent, NodeViewWrapper, VueNodeViewRenderer, VueRenderer, nodeViewProps, useEditor };\n//# sourceMappingURL=index.js.map\n"],"names":["BubbleMenu","defineComponent","props","slots","root","ref","onMounted","updateDelay","editor","pluginKey","shouldShow","tippyOptions","BubbleMenuPlugin","onBeforeUnmount","_a","h","useDebouncedRef","value","customRef","track","trigger","newValue","Editor","Editor$1","options","nextState","markRaw","plugin","handlePlugins","nameOrPluginKey","EditorContent","rootEl","instance","getCurrentInstance","watchEffect","nextTick","element","unref","newElement","el","FloatingMenu","FloatingMenuPlugin","NodeViewContent","NodeViewWrapper","_b","useEditor","shallowRef","VueRenderer","component","reactive","_c","_d","vNode","render","key","nodeViewProps","VueNodeView","NodeView","attributes","onDragStart","extendedComponent","reactiveProps","provide","node","decorations","updateProps","oldNode","oldDecorations","item","VueNodeViewRenderer","normalizedComponent"],"mappings":"yNAMMA,EAAaC,EAAAA,gBAAgB,CAC/B,KAAM,aACN,MAAO,CACH,UAAW,CACP,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,YACZ,EACD,OAAQ,CACJ,KAAM,OACN,SAAU,EACb,EACD,YAAa,CACT,KAAM,OACN,QAAS,MACZ,EACD,aAAc,CACV,KAAM,OACN,QAAS,KAAO,CAAA,EACnB,EACD,WAAY,CACR,KAAM,SACN,QAAS,IACZ,CACJ,EACD,MAAMC,EAAO,CAAE,MAAAC,GAAS,CACpB,MAAMC,EAAOC,MAAI,IAAI,EACrBC,OAAAA,EAAAA,UAAU,IAAM,CACZ,KAAM,CAAE,YAAAC,EAAa,OAAAC,EAAQ,UAAAC,EAAW,WAAAC,EAAY,aAAAC,CAAe,EAAGT,EACtEM,EAAO,eAAeI,mBAAiB,CACnC,YAAAL,EACA,OAAAC,EACA,QAASJ,EAAK,MACd,UAAAK,EACA,WAAAC,EACA,aAAAC,CACH,CAAA,CAAC,CACd,CAAS,EACDE,EAAAA,gBAAgB,IAAM,CAClB,KAAM,CAAE,UAAAJ,EAAW,OAAAD,CAAQ,EAAGN,EAC9BM,EAAO,iBAAiBC,CAAS,CAC7C,CAAS,EACM,IAAM,CAAE,IAAIK,EAAI,OAAOC,EAAC,EAAC,MAAO,CAAE,IAAKX,IAASU,EAAKX,EAAM,WAAa,MAAQW,IAAO,OAAS,OAASA,EAAG,KAAKX,CAAK,CAAC,EACjI,CACL,CAAC,EAGD,SAASa,EAAgBC,EAAO,CAC5B,OAAOC,EAAS,UAAC,CAACC,EAAOC,KACd,CACH,KAAM,CACF,OAAAD,IACOF,CACV,EACD,IAAII,EAAU,CAEVJ,EAAQI,EAER,sBAAsB,IAAM,CACxB,sBAAsB,IAAM,CACxBD,GACxB,CAAqB,CACrB,CAAiB,CACJ,CACb,EACK,CACL,CACA,MAAME,UAAeC,EAAAA,MAAS,CAC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xB,EAAS,CAC7C,OAAQtB,GAAU,CAId,GAAI,CAACA,EAAM,OAAO,iBACd,MAAO,GAGX,MAAMoE,EAAsB,OAAOtB,GAAc,YAAc,cAAeA,EAExEA,EAAU,UACVA,EACN,OAAO,IAAIQ,EAAYc,EAAqBpE,EAAOsB,CAAO,CAClE,CACA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"vue-3.cjs","sources":["../../../../../node_modules/.pnpm/@tiptap+vue-3@2.12.0_@tiptap+core@2.12.0_@tiptap+pm@2.12.0__@tiptap+pm@2.12.0_vue@3.4.15_typescript@5.6.3_/node_modules/@tiptap/vue-3/dist/index.js"],"sourcesContent":["import { BubbleMenuPlugin } from '@tiptap/extension-bubble-menu';\nimport { defineComponent, ref, onMounted, onBeforeUnmount, h, markRaw, customRef, getCurrentInstance, watchEffect, nextTick, unref, shallowRef, reactive, render, provide } from 'vue';\nimport { Editor as Editor$1, NodeView } from '@tiptap/core';\nexport * from '@tiptap/core';\nimport { FloatingMenuPlugin } from '@tiptap/extension-floating-menu';\n\nconst BubbleMenu = defineComponent({\n name: 'BubbleMenu',\n props: {\n pluginKey: {\n type: [String, Object],\n default: 'bubbleMenu',\n },\n editor: {\n type: Object,\n required: true,\n },\n updateDelay: {\n type: Number,\n default: undefined,\n },\n tippyOptions: {\n type: Object,\n default: () => ({}),\n },\n shouldShow: {\n type: Function,\n default: null,\n },\n },\n setup(props, { slots }) {\n const root = ref(null);\n onMounted(() => {\n const { updateDelay, editor, pluginKey, shouldShow, tippyOptions, } = props;\n editor.registerPlugin(BubbleMenuPlugin({\n updateDelay,\n editor,\n element: root.value,\n pluginKey,\n shouldShow,\n tippyOptions,\n }));\n });\n onBeforeUnmount(() => {\n const { pluginKey, editor } = props;\n editor.unregisterPlugin(pluginKey);\n });\n return () => { var _a; return h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };\n },\n});\n\n/* eslint-disable react-hooks/rules-of-hooks */\nfunction useDebouncedRef(value) {\n return customRef((track, trigger) => {\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n // update state\n value = newValue;\n // update view as soon as possible\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n trigger();\n });\n });\n },\n };\n });\n}\nclass Editor extends Editor$1 {\n constructor(options = {}) {\n super(options);\n this.contentComponent = null;\n this.appContext = null;\n this.reactiveState = useDebouncedRef(this.view.state);\n this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);\n this.on('beforeTransaction', ({ nextState }) => {\n this.reactiveState.value = nextState;\n this.reactiveExtensionStorage.value = this.extensionStorage;\n });\n return markRaw(this); // eslint-disable-line\n }\n get state() {\n return this.reactiveState ? this.reactiveState.value : this.view.state;\n }\n get storage() {\n return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;\n }\n /**\n * Register a ProseMirror plugin.\n */\n registerPlugin(plugin, handlePlugins) {\n const nextState = super.registerPlugin(plugin, handlePlugins);\n if (this.reactiveState) {\n this.reactiveState.value = nextState;\n }\n return nextState;\n }\n /**\n * Unregister a ProseMirror plugin.\n */\n unregisterPlugin(nameOrPluginKey) {\n const nextState = super.unregisterPlugin(nameOrPluginKey);\n if (this.reactiveState && nextState) {\n this.reactiveState.value = nextState;\n }\n return nextState;\n }\n}\n\nconst EditorContent = defineComponent({\n name: 'EditorContent',\n props: {\n editor: {\n default: null,\n type: Object,\n },\n },\n setup(props) {\n const rootEl = ref();\n const instance = getCurrentInstance();\n watchEffect(() => {\n const editor = props.editor;\n if (editor && editor.options.element && rootEl.value) {\n nextTick(() => {\n if (!rootEl.value || !editor.options.element.firstChild) {\n return;\n }\n const element = unref(rootEl.value);\n rootEl.value.append(...editor.options.element.childNodes);\n // @ts-ignore\n editor.contentComponent = instance.ctx._;\n if (instance) {\n editor.appContext = {\n ...instance.appContext,\n // Vue internally uses prototype chain to forward/shadow injects across the entire component chain\n // so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext\n // @ts-expect-error forward instance's 'provides' into appContext\n provides: instance.provides,\n };\n }\n editor.setOptions({\n element,\n });\n editor.createNodeViews();\n });\n }\n });\n onBeforeUnmount(() => {\n const editor = props.editor;\n if (!editor) {\n return;\n }\n editor.contentComponent = null;\n editor.appContext = null;\n });\n return { rootEl };\n },\n render() {\n return h('div', {\n ref: (el) => { this.rootEl = el; },\n });\n },\n});\n\nconst FloatingMenu = defineComponent({\n name: 'FloatingMenu',\n props: {\n pluginKey: {\n // TODO: TypeScript breaks :(\n // type: [String, Object as PropType<Exclude<FloatingMenuPluginProps['pluginKey'], string>>],\n type: null,\n default: 'floatingMenu',\n },\n editor: {\n type: Object,\n required: true,\n },\n tippyOptions: {\n type: Object,\n default: () => ({}),\n },\n shouldShow: {\n type: Function,\n default: null,\n },\n },\n setup(props, { slots }) {\n const root = ref(null);\n onMounted(() => {\n const { pluginKey, editor, tippyOptions, shouldShow, } = props;\n editor.registerPlugin(FloatingMenuPlugin({\n pluginKey,\n editor,\n element: root.value,\n tippyOptions,\n shouldShow,\n }));\n });\n onBeforeUnmount(() => {\n const { pluginKey, editor } = props;\n editor.unregisterPlugin(pluginKey);\n });\n return () => { var _a; return h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };\n },\n});\n\nconst NodeViewContent = defineComponent({\n name: 'NodeViewContent',\n props: {\n as: {\n type: String,\n default: 'div',\n },\n },\n render() {\n return h(this.as, {\n style: {\n whiteSpace: 'pre-wrap',\n },\n 'data-node-view-content': '',\n });\n },\n});\n\nconst NodeViewWrapper = defineComponent({\n name: 'NodeViewWrapper',\n props: {\n as: {\n type: String,\n default: 'div',\n },\n },\n inject: ['onDragStart', 'decorationClasses'],\n render() {\n var _a, _b;\n return h(this.as, {\n // @ts-ignore\n class: this.decorationClasses,\n style: {\n whiteSpace: 'normal',\n },\n 'data-node-view-wrapper': '',\n // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)\n onDragstart: this.onDragStart,\n }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));\n },\n});\n\nconst useEditor = (options = {}) => {\n const editor = shallowRef();\n onMounted(() => {\n editor.value = new Editor(options);\n });\n onBeforeUnmount(() => {\n var _a, _b, _c;\n // Cloning root node (and its children) to avoid content being lost by destroy\n const nodes = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.options.element;\n const newEl = nodes === null || nodes === void 0 ? void 0 : nodes.cloneNode(true);\n (_b = nodes === null || nodes === void 0 ? void 0 : nodes.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(newEl, nodes);\n (_c = editor.value) === null || _c === void 0 ? void 0 : _c.destroy();\n });\n return editor;\n};\n\n/**\n * This class is used to render Vue components inside the editor.\n */\nclass VueRenderer {\n constructor(component, { props = {}, editor }) {\n this.editor = editor;\n this.component = markRaw(component);\n this.el = document.createElement('div');\n this.props = reactive(props);\n this.renderedComponent = this.renderComponent();\n }\n get element() {\n return this.renderedComponent.el;\n }\n get ref() {\n var _a, _b, _c, _d;\n // Composition API\n if ((_b = (_a = this.renderedComponent.vNode) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.exposed) {\n return this.renderedComponent.vNode.component.exposed;\n }\n // Option API\n return (_d = (_c = this.renderedComponent.vNode) === null || _c === void 0 ? void 0 : _c.component) === null || _d === void 0 ? void 0 : _d.proxy;\n }\n renderComponent() {\n let vNode = h(this.component, this.props);\n if (this.editor.appContext) {\n vNode.appContext = this.editor.appContext;\n }\n if (typeof document !== 'undefined' && this.el) {\n render(vNode, this.el);\n }\n const destroy = () => {\n if (this.el) {\n render(null, this.el);\n }\n this.el = null;\n vNode = null;\n };\n return { vNode, destroy, el: this.el ? this.el.firstElementChild : null };\n }\n updateProps(props = {}) {\n Object.entries(props).forEach(([key, value]) => {\n this.props[key] = value;\n });\n this.renderComponent();\n }\n destroy() {\n this.renderedComponent.destroy();\n }\n}\n\n/* eslint-disable no-underscore-dangle */\nconst nodeViewProps = {\n editor: {\n type: Object,\n required: true,\n },\n node: {\n type: Object,\n required: true,\n },\n decorations: {\n type: Object,\n required: true,\n },\n selected: {\n type: Boolean,\n required: true,\n },\n extension: {\n type: Object,\n required: true,\n },\n getPos: {\n type: Function,\n required: true,\n },\n updateAttributes: {\n type: Function,\n required: true,\n },\n deleteNode: {\n type: Function,\n required: true,\n },\n view: {\n type: Object,\n required: true,\n },\n innerDecorations: {\n type: Object,\n required: true,\n },\n HTMLAttributes: {\n type: Object,\n required: true,\n },\n};\nclass VueNodeView extends NodeView {\n mount() {\n const props = {\n editor: this.editor,\n node: this.node,\n decorations: this.decorations,\n innerDecorations: this.innerDecorations,\n view: this.view,\n selected: false,\n extension: this.extension,\n HTMLAttributes: this.HTMLAttributes,\n getPos: () => this.getPos(),\n updateAttributes: (attributes = {}) => this.updateAttributes(attributes),\n deleteNode: () => this.deleteNode(),\n };\n const onDragStart = this.onDragStart.bind(this);\n this.decorationClasses = ref(this.getDecorationClasses());\n const extendedComponent = defineComponent({\n extends: { ...this.component },\n props: Object.keys(props),\n template: this.component.template,\n setup: reactiveProps => {\n var _a, _b;\n provide('onDragStart', onDragStart);\n provide('decorationClasses', this.decorationClasses);\n return (_b = (_a = this.component).setup) === null || _b === void 0 ? void 0 : _b.call(_a, reactiveProps, {\n expose: () => undefined,\n });\n },\n // add support for scoped styles\n // @ts-ignore\n // eslint-disable-next-line\n __scopeId: this.component.__scopeId,\n // add support for CSS Modules\n // @ts-ignore\n // eslint-disable-next-line\n __cssModules: this.component.__cssModules,\n // add support for vue devtools\n // @ts-ignore\n // eslint-disable-next-line\n __name: this.component.__name,\n // @ts-ignore\n // eslint-disable-next-line\n __file: this.component.__file,\n });\n this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);\n this.editor.on('selectionUpdate', this.handleSelectionUpdate);\n this.renderer = new VueRenderer(extendedComponent, {\n editor: this.editor,\n props,\n });\n }\n /**\n * Return the DOM element.\n * This is the element that will be used to display the node view.\n */\n get dom() {\n if (!this.renderer.element || !this.renderer.element.hasAttribute('data-node-view-wrapper')) {\n throw Error('Please use the NodeViewWrapper component for your node view.');\n }\n return this.renderer.element;\n }\n /**\n * Return the content DOM element.\n * This is the element that will be used to display the rich-text content of the node.\n */\n get contentDOM() {\n if (this.node.isLeaf) {\n return null;\n }\n return this.dom.querySelector('[data-node-view-content]');\n }\n /**\n * On editor selection update, check if the node is selected.\n * If it is, call `selectNode`, otherwise call `deselectNode`.\n */\n handleSelectionUpdate() {\n const { from, to } = this.editor.state.selection;\n const pos = this.getPos();\n if (typeof pos !== 'number') {\n return;\n }\n if (from <= pos && to >= pos + this.node.nodeSize) {\n if (this.renderer.props.selected) {\n return;\n }\n this.selectNode();\n }\n else {\n if (!this.renderer.props.selected) {\n return;\n }\n this.deselectNode();\n }\n }\n /**\n * On update, update the React component.\n * To prevent unnecessary updates, the `update` option can be used.\n */\n update(node, decorations, innerDecorations) {\n const rerenderComponent = (props) => {\n this.decorationClasses.value = this.getDecorationClasses();\n this.renderer.updateProps(props);\n };\n if (typeof this.options.update === 'function') {\n const oldNode = this.node;\n const oldDecorations = this.decorations;\n const oldInnerDecorations = this.innerDecorations;\n this.node = node;\n this.decorations = decorations;\n this.innerDecorations = innerDecorations;\n return this.options.update({\n oldNode,\n oldDecorations,\n newNode: node,\n newDecorations: decorations,\n oldInnerDecorations,\n innerDecorations,\n updateProps: () => rerenderComponent({ node, decorations, innerDecorations }),\n });\n }\n if (node.type !== this.node.type) {\n return false;\n }\n if (node === this.node && this.decorations === decorations && this.innerDecorations === innerDecorations) {\n return true;\n }\n this.node = node;\n this.decorations = decorations;\n this.innerDecorations = innerDecorations;\n rerenderComponent({ node, decorations, innerDecorations });\n return true;\n }\n /**\n * Select the node.\n * Add the `selected` prop and the `ProseMirror-selectednode` class.\n */\n selectNode() {\n this.renderer.updateProps({\n selected: true,\n });\n if (this.renderer.element) {\n this.renderer.element.classList.add('ProseMirror-selectednode');\n }\n }\n /**\n * Deselect the node.\n * Remove the `selected` prop and the `ProseMirror-selectednode` class.\n */\n deselectNode() {\n this.renderer.updateProps({\n selected: false,\n });\n if (this.renderer.element) {\n this.renderer.element.classList.remove('ProseMirror-selectednode');\n }\n }\n getDecorationClasses() {\n return (this.decorations\n // @ts-ignore\n .map(item => item.type.attrs.class)\n .flat()\n .join(' '));\n }\n destroy() {\n this.renderer.destroy();\n this.editor.off('selectionUpdate', this.handleSelectionUpdate);\n }\n}\nfunction VueNodeViewRenderer(component, options) {\n return props => {\n // try to get the parent component\n // this is important for vue devtools to show the component hierarchy correctly\n // maybe it’s `undefined` because <editor-content> isn’t rendered yet\n if (!props.editor.contentComponent) {\n return {};\n }\n // check for class-component and normalize if neccessary\n const normalizedComponent = typeof component === 'function' && '__vccOpts' in component\n ? component.__vccOpts\n : component;\n return new VueNodeView(normalizedComponent, props, options);\n };\n}\n\nexport { BubbleMenu, Editor, EditorContent, FloatingMenu, NodeViewContent, NodeViewWrapper, VueNodeViewRenderer, VueRenderer, nodeViewProps, useEditor };\n//# sourceMappingURL=index.js.map\n"],"names":["BubbleMenu","defineComponent","props","slots","root","ref","onMounted","updateDelay","editor","pluginKey","shouldShow","tippyOptions","BubbleMenuPlugin","onBeforeUnmount","_a","h","useDebouncedRef","value","customRef","track","trigger","newValue","Editor","Editor$1","options","nextState","markRaw","plugin","handlePlugins","nameOrPluginKey","EditorContent","rootEl","instance","getCurrentInstance","watchEffect","nextTick","element","unref","el","FloatingMenu","FloatingMenuPlugin","NodeViewContent","NodeViewWrapper","_b","useEditor","shallowRef","_c","nodes","newEl","VueRenderer","component","reactive","_d","vNode","render","key","nodeViewProps","VueNodeView","NodeView","attributes","onDragStart","extendedComponent","reactiveProps","provide","from","to","pos","node","decorations","innerDecorations","rerenderComponent","oldNode","oldDecorations","oldInnerDecorations","item","VueNodeViewRenderer","normalizedComponent"],"mappings":"yNAMMA,EAAaC,EAAAA,gBAAgB,CAC/B,KAAM,aACN,MAAO,CACH,UAAW,CACP,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,YACZ,EACD,OAAQ,CACJ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