@cgboiler/biz-basic 1.0.53 → 1.0.55

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 (321) hide show
  1. package/es/index.d.ts +1 -1
  2. package/es/index.js +1 -1
  3. package/es/rich-text-editor/RichTextEditor.d.ts +14 -5
  4. package/es/rich-text-editor/RichTextEditor.js +76 -196
  5. package/es/rich-text-editor/_atomic.css +2 -1
  6. package/es/rich-text-editor/extensions/ConsumedTrigger.d.ts +8 -0
  7. package/es/rich-text-editor/extensions/ConsumedTrigger.js +22 -0
  8. package/es/rich-text-editor/extensions/CustomContent.d.ts +5 -0
  9. package/es/rich-text-editor/extensions/CustomContent.js +103 -0
  10. package/es/rich-text-editor/extensions/HashTag.d.ts +15 -0
  11. package/es/rich-text-editor/extensions/HashTag.js +133 -0
  12. package/es/rich-text-editor/extensions/HorizontalRule.d.ts +2 -0
  13. package/es/rich-text-editor/extensions/HorizontalRule.js +16 -0
  14. package/es/rich-text-editor/extensions/IMEComposition.d.ts +16 -0
  15. package/es/rich-text-editor/extensions/IMEComposition.js +30 -0
  16. package/es/rich-text-editor/extensions/ImageUpload.d.ts +56 -0
  17. package/es/rich-text-editor/extensions/ImageUpload.js +80 -0
  18. package/es/rich-text-editor/extensions/MarkdownExtensions.d.ts +15 -0
  19. package/es/rich-text-editor/extensions/MarkdownExtensions.js +35 -0
  20. package/es/rich-text-editor/extensions/MediaInputRules.d.ts +17 -0
  21. package/es/rich-text-editor/extensions/MediaInputRules.js +47 -0
  22. package/es/rich-text-editor/extensions/MentionExtension.d.ts +15 -0
  23. package/es/rich-text-editor/extensions/MentionExtension.js +60 -0
  24. package/es/rich-text-editor/extensions/index.d.ts +16 -0
  25. package/es/rich-text-editor/extensions/index.js +20 -0
  26. package/es/rich-text-editor/hooks/index.d.ts +6 -0
  27. package/es/rich-text-editor/hooks/index.js +4 -0
  28. package/es/rich-text-editor/hooks/useEditorHistory.d.ts +17 -0
  29. package/es/rich-text-editor/hooks/useEditorHistory.js +87 -0
  30. package/es/rich-text-editor/index copy 2.css +1 -0
  31. package/es/rich-text-editor/index copy 2.less +598 -0
  32. package/es/rich-text-editor/index copy.css +1 -0
  33. package/es/rich-text-editor/index copy.less +356 -0
  34. package/es/rich-text-editor/index.css +1 -1
  35. package/es/rich-text-editor/index.less +444 -254
  36. package/es/rich-text-editor/lib/utils.d.ts +123 -0
  37. package/es/rich-text-editor/lib/utils.js +244 -0
  38. package/es/rich-text-editor/menu-system/components/_atomic.css +44 -0
  39. package/es/rich-text-editor/menu-system/components/blockquote-button.d.ts +49 -0
  40. package/es/rich-text-editor/menu-system/components/blockquote-button.js +75 -0
  41. package/es/rich-text-editor/menu-system/components/code-block-button.d.ts +49 -0
  42. package/es/rich-text-editor/menu-system/components/code-block-button.js +75 -0
  43. package/es/rich-text-editor/menu-system/components/color-highlight-button.d.ts +61 -0
  44. package/es/rich-text-editor/menu-system/components/color-highlight-button.js +102 -0
  45. package/es/rich-text-editor/menu-system/components/color-highlight-popover.d.ts +32 -0
  46. package/es/rich-text-editor/menu-system/components/color-highlight-popover.js +99 -0
  47. package/es/rich-text-editor/menu-system/components/heading-dropdown-menu.d.ts +43 -0
  48. package/es/rich-text-editor/menu-system/components/heading-dropdown-menu.js +102 -0
  49. package/es/rich-text-editor/menu-system/components/horizontal-rule-button.d.ts +22 -0
  50. package/es/rich-text-editor/menu-system/components/horizontal-rule-button.js +42 -0
  51. package/es/rich-text-editor/menu-system/components/image-upload-button.d.ts +40 -0
  52. package/es/rich-text-editor/menu-system/components/image-upload-button.js +71 -0
  53. package/es/rich-text-editor/menu-system/components/image-upload-node.d.ts +93 -0
  54. package/es/rich-text-editor/menu-system/components/image-upload-node.js +299 -0
  55. package/es/rich-text-editor/menu-system/components/link-popover.d.ts +32 -0
  56. package/es/rich-text-editor/menu-system/components/link-popover.js +127 -0
  57. package/es/rich-text-editor/menu-system/components/list-button.d.ts +40 -0
  58. package/es/rich-text-editor/menu-system/components/list-button.js +69 -0
  59. package/es/rich-text-editor/menu-system/components/list-dropdown-menu.d.ts +41 -0
  60. package/es/rich-text-editor/menu-system/components/list-dropdown-menu.js +97 -0
  61. package/es/rich-text-editor/menu-system/components/mark-button.d.ts +58 -0
  62. package/es/rich-text-editor/menu-system/components/mark-button.js +80 -0
  63. package/es/rich-text-editor/menu-system/components/text-align-button.d.ts +58 -0
  64. package/es/rich-text-editor/menu-system/components/text-align-button.js +80 -0
  65. package/es/rich-text-editor/menu-system/components/undo-redo-button.d.ts +58 -0
  66. package/es/rich-text-editor/menu-system/components/undo-redo-button.js +77 -0
  67. package/es/rich-text-editor/menu-system/hooks/use-blockquote.d.ts +34 -0
  68. package/es/rich-text-editor/menu-system/hooks/use-blockquote.js +140 -0
  69. package/es/rich-text-editor/menu-system/hooks/use-code-block.d.ts +34 -0
  70. package/es/rich-text-editor/menu-system/hooks/use-code-block.js +140 -0
  71. package/es/rich-text-editor/menu-system/hooks/use-color-highlight.d.ts +46 -0
  72. package/es/rich-text-editor/menu-system/hooks/use-color-highlight.js +166 -0
  73. package/es/rich-text-editor/menu-system/hooks/use-cursor-visibility.d.ts +7 -0
  74. package/es/rich-text-editor/menu-system/hooks/use-cursor-visibility.js +46 -0
  75. package/es/rich-text-editor/menu-system/hooks/use-element-rect.d.ts +10 -0
  76. package/es/rich-text-editor/menu-system/hooks/use-element-rect.js +132 -0
  77. package/es/rich-text-editor/menu-system/hooks/use-file-upload.d.ts +94 -0
  78. package/es/rich-text-editor/menu-system/hooks/use-file-upload.js +135 -0
  79. package/es/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.d.ts +41 -0
  80. package/es/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.js +70 -0
  81. package/es/rich-text-editor/menu-system/hooks/use-heading.d.ts +26 -0
  82. package/es/rich-text-editor/menu-system/hooks/use-heading.js +166 -0
  83. package/es/rich-text-editor/menu-system/hooks/use-image-upload.d.ts +35 -0
  84. package/es/rich-text-editor/menu-system/hooks/use-image-upload.js +103 -0
  85. package/es/rich-text-editor/menu-system/hooks/use-link-popover.d.ts +10 -0
  86. package/es/rich-text-editor/menu-system/hooks/use-link-popover.js +62 -0
  87. package/es/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.d.ts +34 -0
  88. package/es/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.js +121 -0
  89. package/es/rich-text-editor/menu-system/hooks/use-list.d.ts +28 -0
  90. package/es/rich-text-editor/menu-system/hooks/use-list.js +191 -0
  91. package/es/rich-text-editor/menu-system/hooks/use-mark.d.ts +22 -0
  92. package/es/rich-text-editor/menu-system/hooks/use-mark.js +109 -0
  93. package/es/rich-text-editor/menu-system/hooks/use-menu-navigation.d.ts +16 -0
  94. package/es/rich-text-editor/menu-system/hooks/use-menu-navigation.js +134 -0
  95. package/es/rich-text-editor/menu-system/hooks/use-mobile.d.ts +1 -0
  96. package/es/rich-text-editor/menu-system/hooks/use-mobile.js +20 -0
  97. package/es/rich-text-editor/menu-system/hooks/use-text-align.d.ts +28 -0
  98. package/es/rich-text-editor/menu-system/hooks/use-text-align.js +113 -0
  99. package/es/rich-text-editor/menu-system/hooks/use-throttled-callback.d.ts +8 -0
  100. package/es/rich-text-editor/menu-system/hooks/use-throttled-callback.js +45 -0
  101. package/es/rich-text-editor/menu-system/hooks/use-undo-redo.d.ts +60 -0
  102. package/es/rich-text-editor/menu-system/hooks/use-undo-redo.js +96 -0
  103. package/es/rich-text-editor/menu-system/hooks/use-window-size.d.ts +21 -0
  104. package/es/rich-text-editor/menu-system/hooks/use-window-size.js +74 -0
  105. package/es/rich-text-editor/menu-system/icons/_atomic.css +32 -0
  106. package/es/rich-text-editor/menu-system/icons/index.d.ts +546 -0
  107. package/es/rich-text-editor/menu-system/icons/index.js +487 -0
  108. package/es/rich-text-editor/menu-system/primitives/_atomic.css +38 -0
  109. package/es/rich-text-editor/menu-system/primitives/button.d.ts +110 -0
  110. package/es/rich-text-editor/menu-system/primitives/button.js +107 -0
  111. package/es/rich-text-editor/menu-system/primitives/card.d.ts +75 -0
  112. package/es/rich-text-editor/menu-system/primitives/card.js +116 -0
  113. package/es/rich-text-editor/menu-system/primitives/input.d.ts +37 -0
  114. package/es/rich-text-editor/menu-system/primitives/input.js +55 -0
  115. package/es/rich-text-editor/menu-system/primitives/separator.d.ts +34 -0
  116. package/es/rich-text-editor/menu-system/primitives/separator.js +42 -0
  117. package/es/rich-text-editor/menu-system/primitives/toolbar.d.ts +39 -0
  118. package/es/rich-text-editor/menu-system/primitives/toolbar.js +149 -0
  119. package/es/rich-text-editor/menu-system/styles/animations.css +1 -0
  120. package/es/rich-text-editor/menu-system/styles/animations.less +91 -0
  121. package/es/rich-text-editor/menu-system/styles/button-colors.css +1 -0
  122. package/es/rich-text-editor/menu-system/styles/button-colors.less +142 -0
  123. package/es/rich-text-editor/menu-system/styles/button-group.css +1 -0
  124. package/es/rich-text-editor/menu-system/styles/button-group.less +23 -0
  125. package/es/rich-text-editor/menu-system/styles/button.css +1 -0
  126. package/es/rich-text-editor/menu-system/styles/button.less +322 -0
  127. package/es/rich-text-editor/menu-system/styles/card.css +1 -0
  128. package/es/rich-text-editor/menu-system/styles/card.less +78 -0
  129. package/es/rich-text-editor/menu-system/styles/color-highlight-button.css +1 -0
  130. package/es/rich-text-editor/menu-system/styles/color-highlight-button.less +57 -0
  131. package/es/rich-text-editor/menu-system/styles/color-highlight-popover.css +1 -0
  132. package/es/rich-text-editor/menu-system/styles/color-highlight-popover.less +51 -0
  133. package/es/rich-text-editor/menu-system/styles/dropdown-menu.css +1 -0
  134. package/es/rich-text-editor/menu-system/styles/dropdown-menu.less +40 -0
  135. package/es/rich-text-editor/menu-system/styles/image-upload-node.css +1 -0
  136. package/es/rich-text-editor/menu-system/styles/image-upload-node.less +240 -0
  137. package/es/rich-text-editor/menu-system/styles/input.css +1 -0
  138. package/es/rich-text-editor/menu-system/styles/input.less +53 -0
  139. package/es/rich-text-editor/menu-system/styles/link-popover.css +1 -0
  140. package/es/rich-text-editor/menu-system/styles/link-popover.less +32 -0
  141. package/es/rich-text-editor/menu-system/styles/separator.css +1 -0
  142. package/es/rich-text-editor/menu-system/styles/separator.less +26 -0
  143. package/es/rich-text-editor/menu-system/styles/simple-editor.css +1 -0
  144. package/es/rich-text-editor/menu-system/styles/simple-editor.less +39 -0
  145. package/es/rich-text-editor/menu-system/styles/toolbar.css +1 -0
  146. package/es/rich-text-editor/menu-system/styles/toolbar.less +87 -0
  147. package/es/rich-text-editor/menu-system/styles/variables.css +1 -0
  148. package/es/rich-text-editor/menu-system/styles/variables.less +296 -0
  149. package/es/rich-text-editor/menu-system/utils/tiptap-utils.d.ts +122 -0
  150. package/es/rich-text-editor/menu-system/utils/tiptap-utils.js +243 -0
  151. package/es/rich-text-editor/types.d.ts +4 -0
  152. package/es/rich-text-editor/types.js +4 -0
  153. package/es/rich-text-editor/useExtensions.d.ts +3 -3
  154. package/es/rich-text-editor/useExtensions.js +63 -428
  155. package/es/rich-text-editor/utils/eventHandlers.d.ts +37 -0
  156. package/es/rich-text-editor/utils/eventHandlers.js +103 -0
  157. package/es/rich-text-editor/utils/index.d.ts +6 -0
  158. package/es/rich-text-editor/utils/index.js +19 -0
  159. package/es/rich-text-editor/utils/triggerHelpers.d.ts +31 -0
  160. package/es/rich-text-editor/utils/triggerHelpers.js +46 -0
  161. package/lib/index.d.ts +1 -1
  162. package/lib/index.js +1 -1
  163. package/lib/rich-text-editor/RichTextEditor.d.ts +14 -5
  164. package/lib/rich-text-editor/RichTextEditor.js +76 -206
  165. package/lib/rich-text-editor/_atomic.css +2 -1
  166. package/lib/rich-text-editor/extensions/ConsumedTrigger.d.ts +8 -0
  167. package/lib/rich-text-editor/extensions/ConsumedTrigger.js +41 -0
  168. package/lib/rich-text-editor/extensions/CustomContent.d.ts +5 -0
  169. package/lib/rich-text-editor/extensions/CustomContent.js +132 -0
  170. package/lib/rich-text-editor/extensions/HashTag.d.ts +15 -0
  171. package/lib/rich-text-editor/extensions/HashTag.js +157 -0
  172. package/lib/rich-text-editor/extensions/HorizontalRule.d.ts +2 -0
  173. package/lib/rich-text-editor/extensions/HorizontalRule.js +45 -0
  174. package/lib/rich-text-editor/extensions/IMEComposition.d.ts +16 -0
  175. package/lib/rich-text-editor/extensions/IMEComposition.js +49 -0
  176. package/lib/rich-text-editor/extensions/ImageUpload.d.ts +56 -0
  177. package/lib/rich-text-editor/extensions/ImageUpload.js +99 -0
  178. package/lib/rich-text-editor/extensions/MarkdownExtensions.d.ts +15 -0
  179. package/lib/rich-text-editor/extensions/MarkdownExtensions.js +54 -0
  180. package/lib/rich-text-editor/extensions/MediaInputRules.d.ts +17 -0
  181. package/lib/rich-text-editor/extensions/MediaInputRules.js +66 -0
  182. package/lib/rich-text-editor/extensions/MentionExtension.d.ts +15 -0
  183. package/lib/rich-text-editor/extensions/MentionExtension.js +89 -0
  184. package/lib/rich-text-editor/extensions/index.d.ts +16 -0
  185. package/lib/rich-text-editor/extensions/index.js +49 -0
  186. package/lib/rich-text-editor/hooks/index.d.ts +6 -0
  187. package/lib/rich-text-editor/hooks/index.js +23 -0
  188. package/lib/rich-text-editor/hooks/useEditorHistory.d.ts +17 -0
  189. package/lib/rich-text-editor/hooks/useEditorHistory.js +116 -0
  190. package/lib/rich-text-editor/index copy 2.css +1 -0
  191. package/lib/rich-text-editor/index copy 2.less +598 -0
  192. package/lib/rich-text-editor/index copy.css +1 -0
  193. package/lib/rich-text-editor/index copy.less +356 -0
  194. package/lib/rich-text-editor/index.css +1 -1
  195. package/lib/rich-text-editor/index.less +444 -254
  196. package/lib/rich-text-editor/lib/utils.d.ts +123 -0
  197. package/lib/rich-text-editor/lib/utils.js +263 -0
  198. package/lib/rich-text-editor/menu-system/components/_atomic.css +44 -0
  199. package/lib/rich-text-editor/menu-system/components/blockquote-button.d.ts +49 -0
  200. package/lib/rich-text-editor/menu-system/components/blockquote-button.js +94 -0
  201. package/lib/rich-text-editor/menu-system/components/code-block-button.d.ts +49 -0
  202. package/lib/rich-text-editor/menu-system/components/code-block-button.js +94 -0
  203. package/lib/rich-text-editor/menu-system/components/color-highlight-button.d.ts +61 -0
  204. package/lib/rich-text-editor/menu-system/components/color-highlight-button.js +119 -0
  205. package/lib/rich-text-editor/menu-system/components/color-highlight-popover.d.ts +32 -0
  206. package/lib/rich-text-editor/menu-system/components/color-highlight-popover.js +118 -0
  207. package/lib/rich-text-editor/menu-system/components/heading-dropdown-menu.d.ts +43 -0
  208. package/lib/rich-text-editor/menu-system/components/heading-dropdown-menu.js +131 -0
  209. package/lib/rich-text-editor/menu-system/components/horizontal-rule-button.d.ts +22 -0
  210. package/lib/rich-text-editor/menu-system/components/horizontal-rule-button.js +61 -0
  211. package/lib/rich-text-editor/menu-system/components/image-upload-button.d.ts +40 -0
  212. package/lib/rich-text-editor/menu-system/components/image-upload-button.js +90 -0
  213. package/lib/rich-text-editor/menu-system/components/image-upload-node.d.ts +93 -0
  214. package/lib/rich-text-editor/menu-system/components/image-upload-node.js +316 -0
  215. package/lib/rich-text-editor/menu-system/components/link-popover.d.ts +32 -0
  216. package/lib/rich-text-editor/menu-system/components/link-popover.js +146 -0
  217. package/lib/rich-text-editor/menu-system/components/list-button.d.ts +40 -0
  218. package/lib/rich-text-editor/menu-system/components/list-button.js +88 -0
  219. package/lib/rich-text-editor/menu-system/components/list-dropdown-menu.d.ts +41 -0
  220. package/lib/rich-text-editor/menu-system/components/list-dropdown-menu.js +116 -0
  221. package/lib/rich-text-editor/menu-system/components/mark-button.d.ts +58 -0
  222. package/lib/rich-text-editor/menu-system/components/mark-button.js +99 -0
  223. package/lib/rich-text-editor/menu-system/components/text-align-button.d.ts +58 -0
  224. package/lib/rich-text-editor/menu-system/components/text-align-button.js +99 -0
  225. package/lib/rich-text-editor/menu-system/components/undo-redo-button.d.ts +58 -0
  226. package/lib/rich-text-editor/menu-system/components/undo-redo-button.js +96 -0
  227. package/lib/rich-text-editor/menu-system/hooks/use-blockquote.d.ts +34 -0
  228. package/lib/rich-text-editor/menu-system/hooks/use-blockquote.js +154 -0
  229. package/lib/rich-text-editor/menu-system/hooks/use-code-block.d.ts +34 -0
  230. package/lib/rich-text-editor/menu-system/hooks/use-code-block.js +154 -0
  231. package/lib/rich-text-editor/menu-system/hooks/use-color-highlight.d.ts +46 -0
  232. package/lib/rich-text-editor/menu-system/hooks/use-color-highlight.js +185 -0
  233. package/lib/rich-text-editor/menu-system/hooks/use-cursor-visibility.d.ts +7 -0
  234. package/lib/rich-text-editor/menu-system/hooks/use-cursor-visibility.js +65 -0
  235. package/lib/rich-text-editor/menu-system/hooks/use-element-rect.d.ts +10 -0
  236. package/lib/rich-text-editor/menu-system/hooks/use-element-rect.js +149 -0
  237. package/lib/rich-text-editor/menu-system/hooks/use-file-upload.d.ts +94 -0
  238. package/lib/rich-text-editor/menu-system/hooks/use-file-upload.js +154 -0
  239. package/lib/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.d.ts +41 -0
  240. package/lib/rich-text-editor/menu-system/hooks/use-heading-dropdown-menu.js +84 -0
  241. package/lib/rich-text-editor/menu-system/hooks/use-heading.d.ts +26 -0
  242. package/lib/rich-text-editor/menu-system/hooks/use-heading.js +190 -0
  243. package/lib/rich-text-editor/menu-system/hooks/use-image-upload.d.ts +35 -0
  244. package/lib/rich-text-editor/menu-system/hooks/use-image-upload.js +122 -0
  245. package/lib/rich-text-editor/menu-system/hooks/use-link-popover.d.ts +10 -0
  246. package/lib/rich-text-editor/menu-system/hooks/use-link-popover.js +81 -0
  247. package/lib/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.d.ts +34 -0
  248. package/lib/rich-text-editor/menu-system/hooks/use-list-dropdown-menu.js +140 -0
  249. package/lib/rich-text-editor/menu-system/hooks/use-list.d.ts +28 -0
  250. package/lib/rich-text-editor/menu-system/hooks/use-list.js +205 -0
  251. package/lib/rich-text-editor/menu-system/hooks/use-mark.d.ts +22 -0
  252. package/lib/rich-text-editor/menu-system/hooks/use-mark.js +138 -0
  253. package/lib/rich-text-editor/menu-system/hooks/use-menu-navigation.d.ts +16 -0
  254. package/lib/rich-text-editor/menu-system/hooks/use-menu-navigation.js +153 -0
  255. package/lib/rich-text-editor/menu-system/hooks/use-mobile.d.ts +1 -0
  256. package/lib/rich-text-editor/menu-system/hooks/use-mobile.js +39 -0
  257. package/lib/rich-text-editor/menu-system/hooks/use-text-align.d.ts +28 -0
  258. package/lib/rich-text-editor/menu-system/hooks/use-text-align.js +132 -0
  259. package/lib/rich-text-editor/menu-system/hooks/use-throttled-callback.d.ts +8 -0
  260. package/lib/rich-text-editor/menu-system/hooks/use-throttled-callback.js +64 -0
  261. package/lib/rich-text-editor/menu-system/hooks/use-undo-redo.d.ts +60 -0
  262. package/lib/rich-text-editor/menu-system/hooks/use-undo-redo.js +115 -0
  263. package/lib/rich-text-editor/menu-system/hooks/use-window-size.d.ts +21 -0
  264. package/lib/rich-text-editor/menu-system/hooks/use-window-size.js +93 -0
  265. package/lib/rich-text-editor/menu-system/icons/_atomic.css +32 -0
  266. package/lib/rich-text-editor/menu-system/icons/index.d.ts +546 -0
  267. package/lib/rich-text-editor/menu-system/icons/index.js +506 -0
  268. package/lib/rich-text-editor/menu-system/primitives/_atomic.css +38 -0
  269. package/lib/rich-text-editor/menu-system/primitives/button.d.ts +110 -0
  270. package/lib/rich-text-editor/menu-system/primitives/button.js +126 -0
  271. package/lib/rich-text-editor/menu-system/primitives/card.d.ts +75 -0
  272. package/lib/rich-text-editor/menu-system/primitives/card.js +135 -0
  273. package/lib/rich-text-editor/menu-system/primitives/input.d.ts +37 -0
  274. package/lib/rich-text-editor/menu-system/primitives/input.js +74 -0
  275. package/lib/rich-text-editor/menu-system/primitives/separator.d.ts +34 -0
  276. package/lib/rich-text-editor/menu-system/primitives/separator.js +61 -0
  277. package/lib/rich-text-editor/menu-system/primitives/toolbar.d.ts +39 -0
  278. package/lib/rich-text-editor/menu-system/primitives/toolbar.js +168 -0
  279. package/lib/rich-text-editor/menu-system/styles/animations.css +1 -0
  280. package/lib/rich-text-editor/menu-system/styles/animations.less +91 -0
  281. package/lib/rich-text-editor/menu-system/styles/button-colors.css +1 -0
  282. package/lib/rich-text-editor/menu-system/styles/button-colors.less +142 -0
  283. package/lib/rich-text-editor/menu-system/styles/button-group.css +1 -0
  284. package/lib/rich-text-editor/menu-system/styles/button-group.less +23 -0
  285. package/lib/rich-text-editor/menu-system/styles/button.css +1 -0
  286. package/lib/rich-text-editor/menu-system/styles/button.less +322 -0
  287. package/lib/rich-text-editor/menu-system/styles/card.css +1 -0
  288. package/lib/rich-text-editor/menu-system/styles/card.less +78 -0
  289. package/lib/rich-text-editor/menu-system/styles/color-highlight-button.css +1 -0
  290. package/lib/rich-text-editor/menu-system/styles/color-highlight-button.less +57 -0
  291. package/lib/rich-text-editor/menu-system/styles/color-highlight-popover.css +1 -0
  292. package/lib/rich-text-editor/menu-system/styles/color-highlight-popover.less +51 -0
  293. package/lib/rich-text-editor/menu-system/styles/dropdown-menu.css +1 -0
  294. package/lib/rich-text-editor/menu-system/styles/dropdown-menu.less +40 -0
  295. package/lib/rich-text-editor/menu-system/styles/image-upload-node.css +1 -0
  296. package/lib/rich-text-editor/menu-system/styles/image-upload-node.less +240 -0
  297. package/lib/rich-text-editor/menu-system/styles/input.css +1 -0
  298. package/lib/rich-text-editor/menu-system/styles/input.less +53 -0
  299. package/lib/rich-text-editor/menu-system/styles/link-popover.css +1 -0
  300. package/lib/rich-text-editor/menu-system/styles/link-popover.less +32 -0
  301. package/lib/rich-text-editor/menu-system/styles/separator.css +1 -0
  302. package/lib/rich-text-editor/menu-system/styles/separator.less +26 -0
  303. package/lib/rich-text-editor/menu-system/styles/simple-editor.css +1 -0
  304. package/lib/rich-text-editor/menu-system/styles/simple-editor.less +39 -0
  305. package/lib/rich-text-editor/menu-system/styles/toolbar.css +1 -0
  306. package/lib/rich-text-editor/menu-system/styles/toolbar.less +87 -0
  307. package/lib/rich-text-editor/menu-system/styles/variables.css +1 -0
  308. package/lib/rich-text-editor/menu-system/styles/variables.less +296 -0
  309. package/lib/rich-text-editor/menu-system/utils/tiptap-utils.d.ts +122 -0
  310. package/lib/rich-text-editor/menu-system/utils/tiptap-utils.js +262 -0
  311. package/lib/rich-text-editor/types.d.ts +4 -0
  312. package/lib/rich-text-editor/types.js +4 -0
  313. package/lib/rich-text-editor/useExtensions.d.ts +3 -3
  314. package/lib/rich-text-editor/useExtensions.js +64 -429
  315. package/lib/rich-text-editor/utils/eventHandlers.d.ts +37 -0
  316. package/lib/rich-text-editor/utils/eventHandlers.js +132 -0
  317. package/lib/rich-text-editor/utils/index.d.ts +6 -0
  318. package/lib/rich-text-editor/utils/index.js +32 -0
  319. package/lib/rich-text-editor/utils/triggerHelpers.d.ts +31 -0
  320. package/lib/rich-text-editor/utils/triggerHelpers.js +65 -0
  321. package/package.json +13 -3
@@ -0,0 +1,93 @@
1
+ import { type PropType } from 'vue';
2
+ import '../styles/image-upload-node.less';
3
+ export declare const ImageUploadNodeView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ editor: {
5
+ type: PropType<import("@tiptap/core").NodeViewProps["editor"]>;
6
+ required: true;
7
+ };
8
+ node: {
9
+ type: PropType<import("@tiptap/core").NodeViewProps["node"]>;
10
+ required: true;
11
+ };
12
+ decorations: {
13
+ type: PropType<import("@tiptap/core").NodeViewProps["decorations"]>;
14
+ required: true;
15
+ };
16
+ selected: {
17
+ type: PropType<import("@tiptap/core").NodeViewProps["selected"]>;
18
+ required: true;
19
+ };
20
+ extension: {
21
+ type: PropType<import("@tiptap/core").NodeViewProps["extension"]>;
22
+ required: true;
23
+ };
24
+ getPos: {
25
+ type: PropType<import("@tiptap/core").NodeViewProps["getPos"]>;
26
+ required: true;
27
+ };
28
+ updateAttributes: {
29
+ type: PropType<import("@tiptap/core").NodeViewProps["updateAttributes"]>;
30
+ required: true;
31
+ };
32
+ deleteNode: {
33
+ type: PropType<import("@tiptap/core").NodeViewProps["deleteNode"]>;
34
+ required: true;
35
+ };
36
+ view: {
37
+ type: PropType<import("@tiptap/core").NodeViewProps["view"]>;
38
+ required: true;
39
+ };
40
+ innerDecorations: {
41
+ type: PropType<import("@tiptap/core").NodeViewProps["innerDecorations"]>;
42
+ required: true;
43
+ };
44
+ HTMLAttributes: {
45
+ type: PropType<import("@tiptap/core").NodeViewProps["HTMLAttributes"]>;
46
+ required: true;
47
+ };
48
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
49
+ editor: {
50
+ type: PropType<import("@tiptap/core").NodeViewProps["editor"]>;
51
+ required: true;
52
+ };
53
+ node: {
54
+ type: PropType<import("@tiptap/core").NodeViewProps["node"]>;
55
+ required: true;
56
+ };
57
+ decorations: {
58
+ type: PropType<import("@tiptap/core").NodeViewProps["decorations"]>;
59
+ required: true;
60
+ };
61
+ selected: {
62
+ type: PropType<import("@tiptap/core").NodeViewProps["selected"]>;
63
+ required: true;
64
+ };
65
+ extension: {
66
+ type: PropType<import("@tiptap/core").NodeViewProps["extension"]>;
67
+ required: true;
68
+ };
69
+ getPos: {
70
+ type: PropType<import("@tiptap/core").NodeViewProps["getPos"]>;
71
+ required: true;
72
+ };
73
+ updateAttributes: {
74
+ type: PropType<import("@tiptap/core").NodeViewProps["updateAttributes"]>;
75
+ required: true;
76
+ };
77
+ deleteNode: {
78
+ type: PropType<import("@tiptap/core").NodeViewProps["deleteNode"]>;
79
+ required: true;
80
+ };
81
+ view: {
82
+ type: PropType<import("@tiptap/core").NodeViewProps["view"]>;
83
+ required: true;
84
+ };
85
+ innerDecorations: {
86
+ type: PropType<import("@tiptap/core").NodeViewProps["innerDecorations"]>;
87
+ required: true;
88
+ };
89
+ HTMLAttributes: {
90
+ type: PropType<import("@tiptap/core").NodeViewProps["HTMLAttributes"]>;
91
+ required: true;
92
+ };
93
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,299 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __async = (__this, __arguments, generator) => {
21
+ return new Promise((resolve, reject) => {
22
+ var fulfilled = (value) => {
23
+ try {
24
+ step(generator.next(value));
25
+ } catch (e) {
26
+ reject(e);
27
+ }
28
+ };
29
+ var rejected = (value) => {
30
+ try {
31
+ step(generator.throw(value));
32
+ } catch (e) {
33
+ reject(e);
34
+ }
35
+ };
36
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
37
+ step((generator = generator.apply(__this, __arguments)).next());
38
+ });
39
+ };
40
+ import { createVNode as _createVNode, createTextVNode as _createTextVNode, Fragment as _Fragment } from "vue";
41
+ import "./_atomic.css";
42
+ import { defineComponent, ref } from "vue";
43
+ import { nodeViewProps, NodeViewWrapper } from "@tiptap/vue-3";
44
+ import { Button } from "../primitives/button";
45
+ import { CloseIcon, CloudUploadIcon, FileIcon, FileCornerIcon } from "../icons";
46
+ import { focusNextNode, isValidPosition } from "../utils/tiptap-utils";
47
+ import { useFileUpload } from "../hooks/use-file-upload";
48
+ import "../styles/image-upload-node.css";
49
+ const ImageUploadDragArea = defineComponent({
50
+ name: "ImageUploadDragArea",
51
+ props: {
52
+ onFile: {
53
+ type: Function,
54
+ required: true
55
+ }
56
+ },
57
+ setup(props, {
58
+ slots
59
+ }) {
60
+ const isDragOver = ref(false);
61
+ const isDragActive = ref(false);
62
+ const handleDragEnter = (e) => {
63
+ e.preventDefault();
64
+ e.stopPropagation();
65
+ isDragActive.value = true;
66
+ };
67
+ const handleDragLeave = (e) => {
68
+ e.preventDefault();
69
+ e.stopPropagation();
70
+ if (!e.currentTarget.contains(e.relatedTarget)) {
71
+ isDragActive.value = false;
72
+ isDragOver.value = false;
73
+ }
74
+ };
75
+ const handleDragOver = (e) => {
76
+ e.preventDefault();
77
+ e.stopPropagation();
78
+ isDragOver.value = true;
79
+ };
80
+ const handleDrop = (e) => {
81
+ var _a;
82
+ e.preventDefault();
83
+ e.stopPropagation();
84
+ isDragActive.value = false;
85
+ isDragOver.value = false;
86
+ const files = Array.from(((_a = e.dataTransfer) == null ? void 0 : _a.files) || []);
87
+ if (files.length > 0) {
88
+ props.onFile(files);
89
+ }
90
+ };
91
+ return () => {
92
+ var _a;
93
+ return _createVNode("div", {
94
+ "class": `tiptap-image-upload-drag-area ${isDragActive.value ? "drag-active" : ""} ${isDragOver.value ? "drag-over" : ""}`,
95
+ "onDragenter": handleDragEnter,
96
+ "onDragleave": handleDragLeave,
97
+ "onDragover": handleDragOver,
98
+ "onDrop": handleDrop
99
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
100
+ };
101
+ }
102
+ });
103
+ const ImageUploadPreview = defineComponent({
104
+ name: "ImageUploadPreview",
105
+ props: {
106
+ fileItem: {
107
+ type: Object,
108
+ required: true
109
+ },
110
+ onRemove: {
111
+ type: Function,
112
+ required: true
113
+ }
114
+ },
115
+ setup(props) {
116
+ const formatFileSize = (bytes) => {
117
+ if (bytes === 0)
118
+ return "0 Bytes";
119
+ const k = 1024;
120
+ const sizes = ["Bytes", "KB", "MB", "GB"];
121
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
122
+ return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
123
+ };
124
+ return () => _createVNode("div", {
125
+ "class": "tiptap-image-upload-preview"
126
+ }, [props.fileItem.status === "uploading" && _createVNode("div", {
127
+ "class": "tiptap-image-upload-progress",
128
+ "style": {
129
+ width: `${props.fileItem.progress}%`
130
+ }
131
+ }, null), _createVNode("div", {
132
+ "class": "tiptap-image-upload-preview-content"
133
+ }, [_createVNode("div", {
134
+ "class": "tiptap-image-upload-file-info"
135
+ }, [_createVNode("div", {
136
+ "class": "tiptap-image-upload-file-icon"
137
+ }, [_createVNode(CloudUploadIcon, null, null)]), _createVNode("div", {
138
+ "class": "tiptap-image-upload-details"
139
+ }, [_createVNode("span", {
140
+ "class": "tiptap-image-upload-text"
141
+ }, [props.fileItem.file.name]), _createVNode("span", {
142
+ "class": "tiptap-image-upload-subtext"
143
+ }, [formatFileSize(props.fileItem.file.size)])])]), _createVNode("div", {
144
+ "class": "tiptap-image-upload-actions"
145
+ }, [props.fileItem.status === "uploading" && _createVNode("span", {
146
+ "class": "tiptap-image-upload-progress-text"
147
+ }, [props.fileItem.progress, _createTextVNode("%")]), _createVNode(Button, {
148
+ "type": "button",
149
+ "data-style": "ghost",
150
+ "onClick": (e) => {
151
+ e.stopPropagation();
152
+ props.onRemove();
153
+ }
154
+ }, {
155
+ default: () => [_createVNode(CloseIcon, {
156
+ "class": "tiptap-button-icon"
157
+ }, null)]
158
+ })])])]);
159
+ }
160
+ });
161
+ const DropZoneContent = defineComponent({
162
+ name: "DropZoneContent",
163
+ props: {
164
+ maxSize: {
165
+ type: Number,
166
+ required: true
167
+ },
168
+ limit: {
169
+ type: Number,
170
+ required: true
171
+ }
172
+ },
173
+ render() {
174
+ return _createVNode(_Fragment, null, [_createVNode("div", {
175
+ "class": "tiptap-image-upload-dropzone"
176
+ }, [_createVNode(FileIcon, null, null), _createVNode(FileCornerIcon, null, null), _createVNode("div", {
177
+ "class": "tiptap-image-upload-icon-container"
178
+ }, [_createVNode(CloudUploadIcon, null, null)])]), _createVNode("div", {
179
+ "class": "tiptap-image-upload-content"
180
+ }, [_createVNode("span", {
181
+ "class": "tiptap-image-upload-text"
182
+ }, [_createVNode("em", null, [_createTextVNode("Click to upload")]), _createTextVNode(" or drag and drop")]), _createVNode("span", {
183
+ "class": "tiptap-image-upload-subtext"
184
+ }, [_createTextVNode("Maximum "), this.limit, _createTextVNode(" file"), this.limit === 1 ? "" : "s", _createTextVNode(", "), this.maxSize / 1024 / 1024, _createTextVNode("MB each.")])])]);
185
+ }
186
+ });
187
+ const ImageUploadNodeView = defineComponent({
188
+ name: "ImageUploadNodeView",
189
+ props: nodeViewProps,
190
+ setup(props) {
191
+ const {
192
+ accept,
193
+ limit,
194
+ maxSize
195
+ } = props.node.attrs;
196
+ const inputRef = ref();
197
+ const extension = props.extension;
198
+ const uploadOptions = {
199
+ maxSize,
200
+ limit,
201
+ accept,
202
+ upload: extension.options.upload,
203
+ onSuccess: extension.options.onSuccess,
204
+ onError: extension.options.onError
205
+ };
206
+ const {
207
+ fileItems,
208
+ uploadFiles,
209
+ removeFileItem,
210
+ clearAllFiles
211
+ } = useFileUpload(uploadOptions);
212
+ const handleUpload = (files) => __async(this, null, function* () {
213
+ const urls = yield uploadFiles(files);
214
+ if (urls.length > 0) {
215
+ const pos = props.getPos();
216
+ if (isValidPosition(pos)) {
217
+ const imageNodes = urls.map((url, index) => {
218
+ var _a;
219
+ const filename = ((_a = files[index]) == null ? void 0 : _a.name.replace(/\.[^/.]+$/, "")) || "unknown";
220
+ return {
221
+ type: extension.options.type,
222
+ attrs: __spreadProps(__spreadValues({}, extension.options), {
223
+ src: url,
224
+ alt: filename,
225
+ title: filename
226
+ })
227
+ };
228
+ });
229
+ props.editor.chain().focus().deleteRange({
230
+ from: pos,
231
+ to: pos + props.node.nodeSize
232
+ }).insertContentAt(pos, imageNodes).run();
233
+ focusNextNode(props.editor);
234
+ }
235
+ }
236
+ });
237
+ const handleChange = (e) => {
238
+ var _a, _b;
239
+ const target = e.target;
240
+ const files = target.files;
241
+ if (!files || files.length === 0) {
242
+ (_b = (_a = extension.options).onError) == null ? void 0 : _b.call(_a, new Error("No file selected"));
243
+ return;
244
+ }
245
+ handleUpload(Array.from(files));
246
+ };
247
+ const handleClick = () => {
248
+ if (inputRef.value && fileItems.value.length === 0) {
249
+ inputRef.value.value = "";
250
+ inputRef.value.click();
251
+ }
252
+ };
253
+ return () => {
254
+ const hasFiles = fileItems.value.length > 0;
255
+ return _createVNode(NodeViewWrapper, {
256
+ "class": "tiptap-image-upload",
257
+ "tabindex": 0,
258
+ "onClick": handleClick
259
+ }, {
260
+ default: () => [!hasFiles && _createVNode(ImageUploadDragArea, {
261
+ "onFile": handleUpload
262
+ }, {
263
+ default: () => [_createVNode(DropZoneContent, {
264
+ "maxSize": maxSize,
265
+ "limit": limit
266
+ }, null)]
267
+ }), hasFiles && _createVNode("div", {
268
+ "class": "tiptap-image-upload-previews"
269
+ }, [fileItems.value.length > 1 && _createVNode("div", {
270
+ "class": "tiptap-image-upload-header"
271
+ }, [_createVNode("span", null, [_createTextVNode("Uploading "), fileItems.value.length, _createTextVNode(" files")]), _createVNode(Button, {
272
+ "type": "button",
273
+ "data-style": "ghost",
274
+ "onClick": (e) => {
275
+ e.stopPropagation();
276
+ clearAllFiles();
277
+ }
278
+ }, {
279
+ default: () => [_createTextVNode("Clear All")]
280
+ })]), fileItems.value.map((fileItem) => _createVNode(ImageUploadPreview, {
281
+ "key": fileItem.id,
282
+ "fileItem": fileItem,
283
+ "onRemove": () => removeFileItem(fileItem.id)
284
+ }, null))]), _createVNode("input", {
285
+ "ref": inputRef,
286
+ "name": "file",
287
+ "accept": accept,
288
+ "type": "file",
289
+ "multiple": limit > 1,
290
+ "onChange": handleChange,
291
+ "onClick": (e) => e.stopPropagation()
292
+ }, null)]
293
+ });
294
+ };
295
+ }
296
+ });
297
+ export {
298
+ ImageUploadNodeView
299
+ };
@@ -0,0 +1,32 @@
1
+ import { type PropType } from 'vue';
2
+ import '../styles/link-popover.less';
3
+ export declare const LinkPopover: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ editor: {
5
+ type: PropType<any>;
6
+ required: true;
7
+ };
8
+ hideWhenUnavailable: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ className: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
+ editor: {
18
+ type: PropType<any>;
19
+ required: true;
20
+ };
21
+ hideWhenUnavailable: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ className: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ }>> & Readonly<{}>, {
30
+ className: string;
31
+ hideWhenUnavailable: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,127 @@
1
+ import { createVNode as _createVNode, mergeProps as _mergeProps, Fragment as _Fragment } from "vue";
2
+ import "./_atomic.css";
3
+ import { defineComponent, ref, watch } from "vue";
4
+ import { useLinkPopover } from "../hooks/use-link-popover";
5
+ import { Button } from "../primitives/button";
6
+ import { cn } from "../utils/tiptap-utils";
7
+ import { ElPopover, ElInput } from "element-plus";
8
+ import { LinkIcon, TrashIcon, ExternalLinkIcon, CornerDownLeftIcon } from "../icons";
9
+ import "../styles/link-popover.css";
10
+ const LinkPopover = defineComponent({
11
+ name: "LinkPopover",
12
+ props: {
13
+ editor: {
14
+ type: Object,
15
+ required: true
16
+ },
17
+ hideWhenUnavailable: {
18
+ type: Boolean,
19
+ default: false
20
+ },
21
+ className: {
22
+ type: String,
23
+ default: ""
24
+ }
25
+ },
26
+ setup(props, {
27
+ attrs
28
+ }) {
29
+ const {
30
+ isVisible,
31
+ linkUrl,
32
+ inNewTab,
33
+ handleSetLink
34
+ } = useLinkPopover({
35
+ editor: props.editor
36
+ });
37
+ const tempUrl = ref("");
38
+ const tempNewTab = ref(false);
39
+ watch(isVisible, (val) => {
40
+ if (val) {
41
+ tempUrl.value = linkUrl.value;
42
+ tempNewTab.value = inNewTab.value;
43
+ }
44
+ });
45
+ const onApply = () => {
46
+ handleSetLink(tempUrl.value, tempNewTab.value);
47
+ };
48
+ const onRemove = () => {
49
+ handleSetLink("", false);
50
+ };
51
+ const onOpenLink = () => {
52
+ if (linkUrl.value) {
53
+ window.open(linkUrl.value, "_blank");
54
+ }
55
+ };
56
+ return () => {
57
+ if (!isVisible.value)
58
+ return null;
59
+ const trigger = _createVNode(Button, _mergeProps({
60
+ "type": "button",
61
+ "data-style": "ghost",
62
+ "data-active-state": linkUrl.value ? "on" : "off",
63
+ "role": "button",
64
+ "tooltip": "Link",
65
+ "class": cn(props.className)
66
+ }, attrs), {
67
+ default: () => [_createVNode(LinkIcon, {
68
+ "class": "tiptap-button-icon"
69
+ }, null)]
70
+ });
71
+ return _createVNode(ElPopover, {
72
+ "trigger": "click",
73
+ "width": "auto",
74
+ "popper-class": "tiptap-link-popover"
75
+ }, {
76
+ reference: () => trigger,
77
+ default: () => _createVNode("div", {
78
+ "class": "tiptap-link-popover-content"
79
+ }, [_createVNode("div", {
80
+ "class": "tiptap-link-popover-row"
81
+ }, [_createVNode(ElInput, {
82
+ "modelValue": tempUrl.value,
83
+ "onUpdate:modelValue": ($event) => tempUrl.value = $event,
84
+ "placeholder": "Paste a link...",
85
+ "size": "small",
86
+ "style": "width: 180px;",
87
+ "onKeydown": (e) => e.key === "Enter" && onApply()
88
+ }, null), _createVNode(Button, {
89
+ "type": "button",
90
+ "data-style": "ghost",
91
+ "onClick": onApply,
92
+ "tooltip": "Apply",
93
+ "data-size": "small"
94
+ }, {
95
+ default: () => [_createVNode(CornerDownLeftIcon, {
96
+ "class": "tiptap-button-icon"
97
+ }, null)]
98
+ }), linkUrl.value && _createVNode(_Fragment, null, [_createVNode("div", {
99
+ "class": "tiptap-link-popover-vertical-separator"
100
+ }, null), _createVNode(Button, {
101
+ "type": "button",
102
+ "data-style": "ghost",
103
+ "onClick": onOpenLink,
104
+ "tooltip": "Open in new window",
105
+ "data-size": "small"
106
+ }, {
107
+ default: () => [_createVNode(ExternalLinkIcon, {
108
+ "class": "tiptap-button-icon"
109
+ }, null)]
110
+ }), _createVNode(Button, {
111
+ "type": "button",
112
+ "data-style": "ghost",
113
+ "onClick": onRemove,
114
+ "tooltip": "Remove",
115
+ "data-size": "small"
116
+ }, {
117
+ default: () => [_createVNode(TrashIcon, {
118
+ "class": "tiptap-button-icon"
119
+ }, null)]
120
+ })])])])
121
+ });
122
+ };
123
+ }
124
+ });
125
+ export {
126
+ LinkPopover
127
+ };
@@ -0,0 +1,40 @@
1
+ import { type PropType } from 'vue';
2
+ import { type ListType } from '../hooks/use-list';
3
+ export declare const ListButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ editor: {
5
+ type: PropType<any>;
6
+ required: true;
7
+ };
8
+ type: {
9
+ type: PropType<ListType>;
10
+ required: true;
11
+ };
12
+ hideWhenUnavailable: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ className: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
+ editor: {
22
+ type: PropType<any>;
23
+ required: true;
24
+ };
25
+ type: {
26
+ type: PropType<ListType>;
27
+ required: true;
28
+ };
29
+ hideWhenUnavailable: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ className: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
37
+ }>> & Readonly<{}>, {
38
+ className: string;
39
+ hideWhenUnavailable: boolean;
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,69 @@
1
+ import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
+ import "./_atomic.css";
3
+ import { defineComponent } from "vue";
4
+ import { useList } from "../hooks/use-list";
5
+ import { Button } from "../primitives/button";
6
+ import { cn } from "../utils/tiptap-utils";
7
+ const ListButton = defineComponent({
8
+ name: "ListButton",
9
+ props: {
10
+ editor: {
11
+ type: Object,
12
+ required: true
13
+ },
14
+ type: {
15
+ type: String,
16
+ required: true
17
+ },
18
+ hideWhenUnavailable: {
19
+ type: Boolean,
20
+ default: false
21
+ },
22
+ className: {
23
+ type: String,
24
+ default: ""
25
+ }
26
+ },
27
+ setup(props, {
28
+ attrs
29
+ }) {
30
+ const {
31
+ isVisible,
32
+ isActive,
33
+ handleToggle,
34
+ canToggle,
35
+ label,
36
+ shortcutKeys,
37
+ Icon
38
+ } = useList({
39
+ editor: props.editor,
40
+ type: props.type,
41
+ hideWhenUnavailable: props.hideWhenUnavailable
42
+ });
43
+ return () => {
44
+ if (!isVisible.value)
45
+ return null;
46
+ return _createVNode(Button, _mergeProps({
47
+ "type": "button",
48
+ "disabled": !canToggle.value,
49
+ "data-style": "ghost",
50
+ "data-active-state": isActive.value ? "on" : "off",
51
+ "role": "button",
52
+ "tabindex": -1,
53
+ "aria-label": label,
54
+ "aria-pressed": isActive.value,
55
+ "tooltip": label,
56
+ "shortcutKeys": shortcutKeys,
57
+ "onClick": handleToggle,
58
+ "class": cn(props.className)
59
+ }, attrs), {
60
+ default: () => [_createVNode(Icon, {
61
+ "class": "tiptap-button-icon"
62
+ }, null)]
63
+ });
64
+ };
65
+ }
66
+ });
67
+ export {
68
+ ListButton
69
+ };