@antscorp/antsomi-ui 2.0.92-text-editor-beta.6 → 2.0.93

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 (317) hide show
  1. package/es/assets/css/main.scss +2 -4
  2. package/es/components/icons/LazyIcon/LazyIcon.d.ts +9 -18
  3. package/es/components/icons/LazyIcon/LazyIcon.js +9 -18
  4. package/es/components/icons/index.d.ts +9 -18
  5. package/es/components/icons/index.js +9 -18
  6. package/es/components/molecules/EmojiCollections/CommonCollection/index.js +2 -2
  7. package/es/components/molecules/EmojiCollections/types.d.ts +0 -1
  8. package/es/components/molecules/EmojiPopover/EmojiPopover.d.ts +0 -1
  9. package/es/components/molecules/EmojiPopover/EmojiPopover.js +6 -10
  10. package/es/components/molecules/EmojiPopover/styled.d.ts +2 -2
  11. package/es/components/molecules/EmojiPopover/styled.js +1 -1
  12. package/es/components/molecules/TagifyInput/patternHandlers.js +12 -0
  13. package/es/components/molecules/TagifyInput/utils.d.ts +1 -0
  14. package/es/components/molecules/TagifyInput/utils.js +1 -0
  15. package/es/components/molecules/VirtualizedMenu/VirtualizedMenu.d.ts +3 -6
  16. package/es/components/molecules/VirtualizedMenu/__mocks__/index.js +982 -2594
  17. package/es/components/molecules/VirtualizedMenu/components/Item/Item.d.ts +11 -1
  18. package/es/components/molecules/VirtualizedMenu/components/Item/Item.js +25 -53
  19. package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.d.ts +5 -8
  20. package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.js +46 -289
  21. package/es/components/molecules/VirtualizedMenu/components/MenuInline/index.js +0 -1
  22. package/es/components/molecules/VirtualizedMenu/styled.d.ts +2 -2
  23. package/es/components/molecules/VirtualizedMenu/styled.js +4 -23
  24. package/es/components/molecules/VirtualizedMenu/types.d.ts +10 -27
  25. package/es/components/molecules/VirtualizedMenu/utils.d.ts +5 -8
  26. package/es/components/molecules/VirtualizedMenu/utils.js +18 -13
  27. package/es/components/molecules/index.d.ts +0 -1
  28. package/es/components/molecules/index.js +0 -1
  29. package/es/components/organism/index.d.ts +0 -1
  30. package/es/components/organism/index.js +0 -1
  31. package/es/constants/api.js +3 -3
  32. package/es/hooks/index.d.ts +0 -4
  33. package/es/hooks/index.js +0 -4
  34. package/es/locales/i18n.d.ts +1 -1
  35. package/es/utils/common.d.ts +9 -14
  36. package/es/utils/common.js +23 -60
  37. package/es/utils/index.d.ts +0 -1
  38. package/es/utils/index.js +0 -1
  39. package/es/utils/web.d.ts +0 -15
  40. package/es/utils/web.js +0 -39
  41. package/package.json +4 -22
  42. package/es/components/atoms/Eyedropper/Eyedropper.d.ts +0 -2
  43. package/es/components/atoms/Eyedropper/Eyedropper.js +0 -53
  44. package/es/components/atoms/Eyedropper/index.d.ts +0 -0
  45. package/es/components/atoms/Eyedropper/index.js +0 -1
  46. package/es/components/atoms/Eyedropper/styled.d.ts +0 -9
  47. package/es/components/atoms/Eyedropper/styled.js +0 -45
  48. package/es/components/atoms/Eyedropper/types.d.ts +0 -5
  49. package/es/components/atoms/Eyedropper/types.js +0 -1
  50. package/es/components/icons/ALignRightIcon.d.ts +0 -3
  51. package/es/components/icons/ALignRightIcon.js +0 -7
  52. package/es/components/icons/AlignCenterIcon.d.ts +0 -3
  53. package/es/components/icons/AlignCenterIcon.js +0 -7
  54. package/es/components/icons/AlignJustifyIcon.d.ts +0 -3
  55. package/es/components/icons/AlignJustifyIcon.js +0 -7
  56. package/es/components/icons/AlignLeftIcon.d.ts +0 -3
  57. package/es/components/icons/AlignLeftIcon.js +0 -7
  58. package/es/components/icons/ArrowDropDownIcon.d.ts +0 -3
  59. package/es/components/icons/ArrowDropDownIcon.js +0 -7
  60. package/es/components/icons/ChevronRightIcon.d.ts +0 -3
  61. package/es/components/icons/ChevronRightIcon.js +0 -7
  62. package/es/components/icons/ColorizeIcon.d.ts +0 -3
  63. package/es/components/icons/ColorizeIcon.js +0 -7
  64. package/es/components/icons/LinkOffIcon.d.ts +0 -3
  65. package/es/components/icons/LinkOffIcon.js +0 -7
  66. package/es/components/icons/MinusIcon.d.ts +0 -3
  67. package/es/components/icons/MinusIcon.js +0 -7
  68. package/es/components/index.scss +0 -2
  69. package/es/components/molecules/EyedropperButton/EyedropperButton.d.ts +0 -11
  70. package/es/components/molecules/EyedropperButton/EyedropperButton.js +0 -34
  71. package/es/components/molecules/EyedropperButton/index.d.ts +0 -0
  72. package/es/components/molecules/EyedropperButton/index.js +0 -1
  73. package/es/components/molecules/EyedropperButton/styled.d.ts +0 -7
  74. package/es/components/molecules/EyedropperButton/styled.js +0 -23
  75. package/es/components/molecules/FontSizeInput/FontSizeInput.d.ts +0 -3
  76. package/es/components/molecules/FontSizeInput/FontSizeInput.js +0 -134
  77. package/es/components/molecules/FontSizeInput/components/FontSizeControl.d.ts +0 -8
  78. package/es/components/molecules/FontSizeInput/components/FontSizeControl.js +0 -14
  79. package/es/components/molecules/FontSizeInput/components/FontSizeDropdown.d.ts +0 -21
  80. package/es/components/molecules/FontSizeInput/components/FontSizeDropdown.js +0 -19
  81. package/es/components/molecules/FontSizeInput/constants.d.ts +0 -2
  82. package/es/components/molecules/FontSizeInput/constants.js +0 -5
  83. package/es/components/molecules/FontSizeInput/index.d.ts +0 -2
  84. package/es/components/molecules/FontSizeInput/index.js +0 -1
  85. package/es/components/molecules/FontSizeInput/styled.d.ts +0 -7
  86. package/es/components/molecules/FontSizeInput/styled.js +0 -40
  87. package/es/components/molecules/FontSizeInput/styles.scss +0 -15
  88. package/es/components/molecules/FontSizeInput/types.d.ts +0 -23
  89. package/es/components/molecules/FontSizeInput/types.js +0 -1
  90. package/es/components/molecules/FontSizeInput/utils.d.ts +0 -7
  91. package/es/components/molecules/FontSizeInput/utils.js +0 -9
  92. package/es/components/molecules/index.scss +0 -1
  93. package/es/components/organism/ActivityTimeline/__mocks__/event_tracking.json +0 -1290
  94. package/es/components/organism/ActivityTimeline/__mocks__/timeline.json +0 -3059
  95. package/es/components/organism/TextEditor/TextEditor.d.ts +0 -3
  96. package/es/components/organism/TextEditor/TextEditor.js +0 -264
  97. package/es/components/organism/TextEditor/__mocks__/text-block.settings.json +0 -320
  98. package/es/components/organism/TextEditor/__mocks__/text-contennt.d.ts +0 -1
  99. package/es/components/organism/TextEditor/__mocks__/text-contennt.js +0 -38
  100. package/es/components/organism/TextEditor/constants.d.ts +0 -177
  101. package/es/components/organism/TextEditor/constants.js +0 -323
  102. package/es/components/organism/TextEditor/extensions/BackgroundColor.d.ts +0 -25
  103. package/es/components/organism/TextEditor/extensions/BackgroundColor.js +0 -46
  104. package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu-plugin.d.ts +0 -140
  105. package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu-plugin.js +0 -366
  106. package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu.d.ts +0 -15
  107. package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu.js +0 -31
  108. package/es/components/organism/TextEditor/extensions/BubbleMenu/index.d.ts +0 -2
  109. package/es/components/organism/TextEditor/extensions/BubbleMenu/index.js +0 -2
  110. package/es/components/organism/TextEditor/extensions/ClearFormatting.d.ts +0 -16
  111. package/es/components/organism/TextEditor/extensions/ClearFormatting.js +0 -26
  112. package/es/components/organism/TextEditor/extensions/Color.d.ts +0 -6
  113. package/es/components/organism/TextEditor/extensions/Color.js +0 -34
  114. package/es/components/organism/TextEditor/extensions/Emoji.d.ts +0 -57
  115. package/es/components/organism/TextEditor/extensions/Emoji.js +0 -184
  116. package/es/components/organism/TextEditor/extensions/FontFamily.d.ts +0 -6
  117. package/es/components/organism/TextEditor/extensions/FontFamily.js +0 -36
  118. package/es/components/organism/TextEditor/extensions/FontSize.d.ts +0 -31
  119. package/es/components/organism/TextEditor/extensions/FontSize.js +0 -46
  120. package/es/components/organism/TextEditor/extensions/FontWeight.d.ts +0 -23
  121. package/es/components/organism/TextEditor/extensions/FontWeight.js +0 -41
  122. package/es/components/organism/TextEditor/extensions/Indent.d.ts +0 -21
  123. package/es/components/organism/TextEditor/extensions/Indent.js +0 -63
  124. package/es/components/organism/TextEditor/extensions/LetterSpacing.d.ts +0 -32
  125. package/es/components/organism/TextEditor/extensions/LetterSpacing.js +0 -48
  126. package/es/components/organism/TextEditor/extensions/LineHeight.d.ts +0 -20
  127. package/es/components/organism/TextEditor/extensions/LineHeight.js +0 -36
  128. package/es/components/organism/TextEditor/extensions/Link.d.ts +0 -29
  129. package/es/components/organism/TextEditor/extensions/Link.js +0 -187
  130. package/es/components/organism/TextEditor/extensions/ListItemMarker.d.ts +0 -13
  131. package/es/components/organism/TextEditor/extensions/ListItemMarker.js +0 -174
  132. package/es/components/organism/TextEditor/extensions/OrderedList.d.ts +0 -56
  133. package/es/components/organism/TextEditor/extensions/OrderedList.js +0 -187
  134. package/es/components/organism/TextEditor/extensions/SmartTag.d.ts +0 -39
  135. package/es/components/organism/TextEditor/extensions/SmartTag.js +0 -167
  136. package/es/components/organism/TextEditor/extensions/StyleMemory.d.ts +0 -36
  137. package/es/components/organism/TextEditor/extensions/StyleMemory.js +0 -163
  138. package/es/components/organism/TextEditor/extensions/TextTransform.d.ts +0 -30
  139. package/es/components/organism/TextEditor/extensions/TextTransform.js +0 -36
  140. package/es/components/organism/TextEditor/extensions/UnorderedList.d.ts +0 -55
  141. package/es/components/organism/TextEditor/extensions/UnorderedList.js +0 -176
  142. package/es/components/organism/TextEditor/hooks/index.d.ts +0 -6
  143. package/es/components/organism/TextEditor/hooks/index.js +0 -6
  144. package/es/components/organism/TextEditor/hooks/useColorSet.d.ts +0 -4
  145. package/es/components/organism/TextEditor/hooks/useColorSet.js +0 -22
  146. package/es/components/organism/TextEditor/hooks/useDocumentState.d.ts +0 -18
  147. package/es/components/organism/TextEditor/hooks/useDocumentState.js +0 -42
  148. package/es/components/organism/TextEditor/hooks/useMarkTracking.d.ts +0 -26
  149. package/es/components/organism/TextEditor/hooks/useMarkTracking.js +0 -68
  150. package/es/components/organism/TextEditor/hooks/usePersistence.d.ts +0 -31
  151. package/es/components/organism/TextEditor/hooks/usePersistence.js +0 -169
  152. package/es/components/organism/TextEditor/hooks/useStyleMemory.d.ts +0 -6
  153. package/es/components/organism/TextEditor/hooks/useStyleMemory.js +0 -42
  154. package/es/components/organism/TextEditor/hooks/useStylePresets.d.ts +0 -34
  155. package/es/components/organism/TextEditor/hooks/useStylePresets.js +0 -83
  156. package/es/components/organism/TextEditor/index.d.ts +0 -16
  157. package/es/components/organism/TextEditor/index.js +0 -8
  158. package/es/components/organism/TextEditor/index.scss +0 -61
  159. package/es/components/organism/TextEditor/provider.d.ts +0 -14
  160. package/es/components/organism/TextEditor/provider.js +0 -33
  161. package/es/components/organism/TextEditor/store.d.ts +0 -13
  162. package/es/components/organism/TextEditor/store.js +0 -20
  163. package/es/components/organism/TextEditor/styled.d.ts +0 -10
  164. package/es/components/organism/TextEditor/styled.js +0 -94
  165. package/es/components/organism/TextEditor/types.d.ts +0 -139
  166. package/es/components/organism/TextEditor/types.js +0 -5
  167. package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.d.ts +0 -6
  168. package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.js +0 -84
  169. package/es/components/organism/TextEditor/ui/BubbleMenu/index.d.ts +0 -1
  170. package/es/components/organism/TextEditor/ui/BubbleMenu/index.js +0 -1
  171. package/es/components/organism/TextEditor/ui/BubbleToolbar/BubbleToolbar.d.ts +0 -1
  172. package/es/components/organism/TextEditor/ui/BubbleToolbar/BubbleToolbar.js +0 -1
  173. package/es/components/organism/TextEditor/ui/BubbleToolbar/index.d.ts +0 -0
  174. package/es/components/organism/TextEditor/ui/BubbleToolbar/index.js +0 -1
  175. package/es/components/organism/TextEditor/ui/Button/Button.d.ts +0 -2
  176. package/es/components/organism/TextEditor/ui/Button/Button.js +0 -31
  177. package/es/components/organism/TextEditor/ui/Button/index.d.ts +0 -2
  178. package/es/components/organism/TextEditor/ui/Button/index.js +0 -1
  179. package/es/components/organism/TextEditor/ui/Button/types.d.ts +0 -10
  180. package/es/components/organism/TextEditor/ui/Button/types.js +0 -1
  181. package/es/components/organism/TextEditor/ui/ColorPicker/ColorPicker.d.ts +0 -39
  182. package/es/components/organism/TextEditor/ui/ColorPicker/ColorPicker.js +0 -131
  183. package/es/components/organism/TextEditor/ui/ColorPicker/index.d.ts +0 -1
  184. package/es/components/organism/TextEditor/ui/ColorPicker/index.js +0 -1
  185. package/es/components/organism/TextEditor/ui/DropdownButton/DropdownButton.d.ts +0 -17
  186. package/es/components/organism/TextEditor/ui/DropdownButton/DropdownButton.js +0 -51
  187. package/es/components/organism/TextEditor/ui/DropdownButton/index.d.ts +0 -1
  188. package/es/components/organism/TextEditor/ui/DropdownButton/index.js +0 -1
  189. package/es/components/organism/TextEditor/ui/Emoji/EmojiList.d.ts +0 -11
  190. package/es/components/organism/TextEditor/ui/Emoji/EmojiList.js +0 -66
  191. package/es/components/organism/TextEditor/ui/Emoji/index.d.ts +0 -2
  192. package/es/components/organism/TextEditor/ui/Emoji/index.js +0 -2
  193. package/es/components/organism/TextEditor/ui/Emoji/suggestion.d.ts +0 -4
  194. package/es/components/organism/TextEditor/ui/Emoji/suggestion.js +0 -71
  195. package/es/components/organism/TextEditor/ui/FontPopover/FontPopover.d.ts +0 -12
  196. package/es/components/organism/TextEditor/ui/FontPopover/FontPopover.js +0 -69
  197. package/es/components/organism/TextEditor/ui/FontPopover/styled.d.ts +0 -1
  198. package/es/components/organism/TextEditor/ui/FontPopover/styled.js +0 -22
  199. package/es/components/organism/TextEditor/ui/Popover/Popover.d.ts +0 -6
  200. package/es/components/organism/TextEditor/ui/Popover/Popover.js +0 -9
  201. package/es/components/organism/TextEditor/ui/Popover/index.d.ts +0 -1
  202. package/es/components/organism/TextEditor/ui/Popover/index.js +0 -1
  203. package/es/components/organism/TextEditor/ui/Select/Select.d.ts +0 -4
  204. package/es/components/organism/TextEditor/ui/Select/Select.js +0 -7
  205. package/es/components/organism/TextEditor/ui/Select/index.d.ts +0 -1
  206. package/es/components/organism/TextEditor/ui/Select/index.js +0 -1
  207. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/SplitButtonDropdown.d.ts +0 -2
  208. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/SplitButtonDropdown.js +0 -44
  209. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/index.d.ts +0 -1
  210. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/index.js +0 -1
  211. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/styled.d.ts +0 -2
  212. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/styled.js +0 -52
  213. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/types.d.ts +0 -19
  214. package/es/components/organism/TextEditor/ui/SplitButtonDropdown/types.js +0 -1
  215. package/es/components/organism/TextEditor/ui/TextAlignSelect/TextAlignSelect.d.ts +0 -30
  216. package/es/components/organism/TextEditor/ui/TextAlignSelect/TextAlignSelect.js +0 -77
  217. package/es/components/organism/TextEditor/ui/TextAlignSelect/index.d.ts +0 -1
  218. package/es/components/organism/TextEditor/ui/TextAlignSelect/index.js +0 -1
  219. package/es/components/organism/TextEditor/ui/Toolbar/Toolbar.d.ts +0 -16
  220. package/es/components/organism/TextEditor/ui/Toolbar/Toolbar.js +0 -42
  221. package/es/components/organism/TextEditor/ui/Toolbar/actions/BoldAction.d.ts +0 -5
  222. package/es/components/organism/TextEditor/ui/Toolbar/actions/BoldAction.js +0 -18
  223. package/es/components/organism/TextEditor/ui/Toolbar/actions/BulletListAction.d.ts +0 -6
  224. package/es/components/organism/TextEditor/ui/Toolbar/actions/BulletListAction.js +0 -93
  225. package/es/components/organism/TextEditor/ui/Toolbar/actions/ClearFormattingAction.d.ts +0 -5
  226. package/es/components/organism/TextEditor/ui/Toolbar/actions/ClearFormattingAction.js +0 -20
  227. package/es/components/organism/TextEditor/ui/Toolbar/actions/EmojiAction.d.ts +0 -4
  228. package/es/components/organism/TextEditor/ui/Toolbar/actions/EmojiAction.js +0 -31
  229. package/es/components/organism/TextEditor/ui/Toolbar/actions/FontFamilyAction.d.ts +0 -7
  230. package/es/components/organism/TextEditor/ui/Toolbar/actions/FontFamilyAction.js +0 -28
  231. package/es/components/organism/TextEditor/ui/Toolbar/actions/FontSizeAction.d.ts +0 -7
  232. package/es/components/organism/TextEditor/ui/Toolbar/actions/FontSizeAction.js +0 -44
  233. package/es/components/organism/TextEditor/ui/Toolbar/actions/HistoryAction.d.ts +0 -5
  234. package/es/components/organism/TextEditor/ui/Toolbar/actions/HistoryAction.js +0 -21
  235. package/es/components/organism/TextEditor/ui/Toolbar/actions/IndentAction.d.ts +0 -5
  236. package/es/components/organism/TextEditor/ui/Toolbar/actions/IndentAction.js +0 -17
  237. package/es/components/organism/TextEditor/ui/Toolbar/actions/ItalicAction.d.ts +0 -5
  238. package/es/components/organism/TextEditor/ui/Toolbar/actions/ItalicAction.js +0 -18
  239. package/es/components/organism/TextEditor/ui/Toolbar/actions/LetterSpacing.d.ts +0 -5
  240. package/es/components/organism/TextEditor/ui/Toolbar/actions/LetterSpacing.js +0 -28
  241. package/es/components/organism/TextEditor/ui/Toolbar/actions/LinkAction.d.ts +0 -6
  242. package/es/components/organism/TextEditor/ui/Toolbar/actions/LinkAction.js +0 -17
  243. package/es/components/organism/TextEditor/ui/Toolbar/actions/OrderedListAction.d.ts +0 -5
  244. package/es/components/organism/TextEditor/ui/Toolbar/actions/OrderedListAction.js +0 -67
  245. package/es/components/organism/TextEditor/ui/Toolbar/actions/OutdentAction.d.ts +0 -5
  246. package/es/components/organism/TextEditor/ui/Toolbar/actions/OutdentAction.js +0 -17
  247. package/es/components/organism/TextEditor/ui/Toolbar/actions/SmartTagAction.d.ts +0 -7
  248. package/es/components/organism/TextEditor/ui/Toolbar/actions/SmartTagAction.js +0 -18
  249. package/es/components/organism/TextEditor/ui/Toolbar/actions/SpacingAction.d.ts +0 -10
  250. package/es/components/organism/TextEditor/ui/Toolbar/actions/SpacingAction.js +0 -45
  251. package/es/components/organism/TextEditor/ui/Toolbar/actions/StrikeAction.d.ts +0 -5
  252. package/es/components/organism/TextEditor/ui/Toolbar/actions/StrikeAction.js +0 -18
  253. package/es/components/organism/TextEditor/ui/Toolbar/actions/SubscriptAction.d.ts +0 -5
  254. package/es/components/organism/TextEditor/ui/Toolbar/actions/SubscriptAction.js +0 -26
  255. package/es/components/organism/TextEditor/ui/Toolbar/actions/SuperscriptAction.d.ts +0 -5
  256. package/es/components/organism/TextEditor/ui/Toolbar/actions/SuperscriptAction.js +0 -26
  257. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextAlignAction.d.ts +0 -5
  258. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextAlignAction.js +0 -3
  259. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextBackgroundColorAction.d.ts +0 -5
  260. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextBackgroundColorAction.js +0 -29
  261. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextColorAction.d.ts +0 -14
  262. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextColorAction.js +0 -22
  263. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextTransformAction.d.ts +0 -5
  264. package/es/components/organism/TextEditor/ui/Toolbar/actions/TextTransformAction.js +0 -36
  265. package/es/components/organism/TextEditor/ui/Toolbar/actions/UnderlineAction.d.ts +0 -5
  266. package/es/components/organism/TextEditor/ui/Toolbar/actions/UnderlineAction.js +0 -18
  267. package/es/components/organism/TextEditor/ui/Toolbar/actions/UnsetLink.d.ts +0 -6
  268. package/es/components/organism/TextEditor/ui/Toolbar/actions/UnsetLink.js +0 -19
  269. package/es/components/organism/TextEditor/ui/Toolbar/actions/index.d.ts +0 -24
  270. package/es/components/organism/TextEditor/ui/Toolbar/actions/index.js +0 -24
  271. package/es/components/organism/TextEditor/ui/Toolbar/index.d.ts +0 -1
  272. package/es/components/organism/TextEditor/ui/Toolbar/index.js +0 -1
  273. package/es/components/organism/TextEditor/utils/documentState.d.ts +0 -57
  274. package/es/components/organism/TextEditor/utils/documentState.js +0 -100
  275. package/es/components/organism/TextEditor/utils/font.d.ts +0 -73
  276. package/es/components/organism/TextEditor/utils/font.js +0 -160
  277. package/es/components/organism/TextEditor/utils/htmlProcessing.d.ts +0 -75
  278. package/es/components/organism/TextEditor/utils/htmlProcessing.js +0 -343
  279. package/es/components/organism/TextEditor/utils/indent.d.ts +0 -11
  280. package/es/components/organism/TextEditor/utils/indent.js +0 -56
  281. package/es/components/organism/TextEditor/utils/index.d.ts +0 -8
  282. package/es/components/organism/TextEditor/utils/index.js +0 -16
  283. package/es/components/organism/TextEditor/utils/link.d.ts +0 -108
  284. package/es/components/organism/TextEditor/utils/link.js +0 -151
  285. package/es/components/organism/TextEditor/utils/menu.d.ts +0 -134
  286. package/es/components/organism/TextEditor/utils/menu.js +0 -317
  287. package/es/components/organism/TextEditor/utils/selection.d.ts +0 -25
  288. package/es/components/organism/TextEditor/utils/selection.js +0 -57
  289. package/es/components/organism/TextEditor/utils/shared.d.ts +0 -1
  290. package/es/components/organism/TextEditor/utils/shared.js +0 -9
  291. package/es/components/organism/TextEditor/utils/smartTag.d.ts +0 -49
  292. package/es/components/organism/TextEditor/utils/smartTag.js +0 -89
  293. package/es/components/organism/TextEditor/utils/style.d.ts +0 -78
  294. package/es/components/organism/TextEditor/utils/style.js +0 -193
  295. package/es/components/organism/index.scss +0 -1
  296. package/es/hooks/useBroadcastedLocalStorage.d.ts +0 -5
  297. package/es/hooks/useBroadcastedLocalStorage.js +0 -71
  298. package/es/hooks/useElementSize.d.ts +0 -7
  299. package/es/hooks/useElementSize.js +0 -56
  300. package/es/hooks/useEyedropper/attach.d.ts +0 -4
  301. package/es/hooks/useEyedropper/attach.js +0 -9
  302. package/es/hooks/useEyedropper/eyedropper.d.ts +0 -69
  303. package/es/hooks/useEyedropper/eyedropper.js +0 -205
  304. package/es/hooks/useEyedropper/index.d.ts +0 -2
  305. package/es/hooks/useEyedropper/index.js +0 -7
  306. package/es/hooks/useEyedropper/support.d.ts +0 -1
  307. package/es/hooks/useEyedropper/support.js +0 -3
  308. package/es/hooks/useEyedropper/types.d.ts +0 -9
  309. package/es/hooks/useEyedropper/types.js +0 -1
  310. package/es/hooks/useEyedropper/useEyedropper.d.ts +0 -8
  311. package/es/hooks/useEyedropper/useEyedropper.js +0 -50
  312. package/es/hooks/useEyedropper/utils.d.ts +0 -11
  313. package/es/hooks/useEyedropper/utils.js +0 -17
  314. package/es/hooks/useIsMounted.d.ts +0 -1
  315. package/es/hooks/useIsMounted.js +0 -11
  316. package/es/utils/tree.d.ts +0 -225
  317. package/es/utils/tree.js +0 -469
@@ -1,108 +0,0 @@
1
- import { EditorState } from '@tiptap/pm/state';
2
- import { EditorView } from '@tiptap/pm/view';
3
- import { LinkAttrs, LinkHandler, LinkMark, LinkMarkRange } from '../types';
4
- /**
5
- * Kiểm tra xem cursor có đang nằm trong một đoạn text có mark là link hay không
6
- * @param state EditorState của Tiptap/ProseMirror
7
- * @returns true nếu cursor đang nằm trong link, false nếu không
8
- */
9
- export declare const isCursorInLink: (state: EditorState) => boolean;
10
- /**
11
- * Gets all link mark ranges within a specified range
12
- * @param params Object containing state, from and to positions
13
- * @returns Array of MarkRange objects for links
14
- */
15
- export declare const getLinkMarkRanges: (params: {
16
- state: EditorState;
17
- from: number;
18
- to: number;
19
- }) => LinkMarkRange[];
20
- /**
21
- * Gets the range of a link mark at a specific position
22
- * @param params Object containing state and optional position
23
- * @returns Link mark range or undefined
24
- */
25
- export declare const getLinkRange: (params: {
26
- state: EditorState;
27
- pos?: number;
28
- }) => void | import("@tiptap/core").Range;
29
- /**
30
- * Gets the first link mark in a range
31
- * @param params Object containing state, optional from and to positions
32
- * @returns Link mark or undefined
33
- */
34
- export declare const getLinkMark: (params: {
35
- state: EditorState;
36
- from?: number;
37
- to?: number;
38
- }) => {
39
- readonly type: import("prosemirror-model").MarkType;
40
- addToSet: (set: readonly import("prosemirror-model").Mark[]) => readonly import("prosemirror-model").Mark[];
41
- removeFromSet: (set: readonly import("prosemirror-model").Mark[]) => readonly import("prosemirror-model").Mark[];
42
- isInSet: (set: readonly import("prosemirror-model").Mark[]) => boolean;
43
- eq: (other: import("prosemirror-model").Mark) => boolean;
44
- toJSON: () => any;
45
- attrs: LinkAttrs;
46
- } | undefined;
47
- /**
48
- * Gets all link marks in a range
49
- * @param params Object containing state, from and to positions
50
- * @returns Array of link marks
51
- */
52
- export declare const getLinkMarks: (params: {
53
- state: EditorState;
54
- from: number;
55
- to: number;
56
- }) => LinkMark[];
57
- /**
58
- * Gets all link attrs from a range
59
- * @param params Object containing state, optional from and to positions
60
- * @returns Array of link attrs
61
- */
62
- export declare const getLinkAttrsFromRange: (params: {
63
- state: EditorState;
64
- from?: number;
65
- to?: number;
66
- }) => LinkAttrs[];
67
- /**
68
- * Gets the active link attrs and inactive links from a range
69
- * @param params Object containing state, optional from and to positions
70
- * @returns Object with active link Attrs and inactiveLink Attrs or undefined
71
- */
72
- export declare const getActiveLinkAttrsFromRange: (params: {
73
- state: EditorState;
74
- from?: number;
75
- to?: number;
76
- }) => {
77
- readonly activeAttrs: LinkAttrs;
78
- readonly inactiveLinks: LinkAttrs[];
79
- } | undefined;
80
- /**
81
- * Extends selection to include full link marks
82
- * @param state EditorState
83
- * @param from Start position
84
- * @param to End position
85
- * @returns Object with extended from, to positions and link attrs
86
- */
87
- export declare const extendSelectionToFullLinks: (state: EditorState, from: number, to: number) => {
88
- from: number;
89
- to: number;
90
- linkAttrs?: undefined;
91
- } | {
92
- from: number;
93
- to: number;
94
- linkAttrs: LinkAttrs;
95
- };
96
- /**
97
- * Handles link actions (create or edit)
98
- * @param view EditorView instance
99
- * @param linkHandler Link handler callbacks
100
- */
101
- export declare function handleLinkAction(view: EditorView, linkHandler: LinkHandler | undefined): void;
102
- /**
103
- * Checks if the link menu should be shown
104
- * @param state EditorState
105
- * @returns true if link menu should be shown
106
- */
107
- export declare const isShowLinkToolbar: (state: EditorState) => boolean;
108
- export declare const isDynamicLink: ({ data }: LinkAttrs) => boolean;
@@ -1,151 +0,0 @@
1
- import { TextSelection } from '@tiptap/pm/state';
2
- import { getMarkRange, getMarksBetween, isMarkActive } from '@tiptap/core';
3
- import { isNoSelection } from './selection';
4
- import { isEmpty } from 'lodash';
5
- import { isLinkMarkRange } from '../types';
6
- import { CUSTOM_LINK_EXTENSION_NAME } from '../constants';
7
- /**
8
- * Kiểm tra xem cursor có đang nằm trong một đoạn text có mark là link hay không
9
- * @param state EditorState của Tiptap/ProseMirror
10
- * @returns true nếu cursor đang nằm trong link, false nếu không
11
- */
12
- export const isCursorInLink = (state) => isMarkActive(state, CUSTOM_LINK_EXTENSION_NAME);
13
- /**
14
- * Gets all link mark ranges within a specified range
15
- * @param params Object containing state, from and to positions
16
- * @returns Array of MarkRange objects for links
17
- */
18
- export const getLinkMarkRanges = (params) => {
19
- const { state } = params;
20
- const from = params.from ?? state.selection.from;
21
- const to = params.to ?? state.selection.to;
22
- return getMarksBetween(from, to, state.doc).filter(isLinkMarkRange);
23
- };
24
- /**
25
- * Gets the range of a link mark at a specific position
26
- * @param params Object containing state and optional position
27
- * @returns Link mark range or undefined
28
- */
29
- export const getLinkRange = (params) => {
30
- const { state } = params;
31
- const { schema } = state;
32
- const $pos = state.doc.resolve(params?.pos || state.selection.from);
33
- return getMarkRange($pos, schema.marks.link);
34
- };
35
- /**
36
- * Gets the first link mark in a range
37
- * @param params Object containing state, optional from and to positions
38
- * @returns Link mark or undefined
39
- */
40
- export const getLinkMark = (params) => {
41
- const { state } = params;
42
- const from = params.from ?? state.selection.from;
43
- const to = params.to ?? state.selection.to;
44
- return getLinkMarkRanges({ state, from, to }).at(0)?.mark;
45
- };
46
- /**
47
- * Gets all link marks in a range
48
- * @param params Object containing state, from and to positions
49
- * @returns Array of link marks
50
- */
51
- export const getLinkMarks = (params) => {
52
- const { state, from, to } = params;
53
- return getMarksBetween(from, to, state.doc)
54
- .filter(isLinkMarkRange)
55
- .map(range => range.mark);
56
- };
57
- /**
58
- * Gets all link attrs from a range
59
- * @param params Object containing state, optional from and to positions
60
- * @returns Array of link attrs
61
- */
62
- export const getLinkAttrsFromRange = (params) => {
63
- const { state } = params;
64
- const from = params.from ?? state.selection.from;
65
- const to = params.to ?? state.selection.to;
66
- return getLinkMarkRanges({ state, from, to }).map(r => r.mark.attrs);
67
- };
68
- /**
69
- * Gets the active link attrs and inactive links from a range
70
- * @param params Object containing state, optional from and to positions
71
- * @returns Object with active link Attrs and inactiveLink Attrs or undefined
72
- */
73
- export const getActiveLinkAttrsFromRange = (params) => {
74
- const { state } = params;
75
- const from = params.from ?? state.selection.from;
76
- const to = params.to ?? state.selection.to;
77
- const linkAttrs = getLinkAttrsFromRange({ state, from, to });
78
- if (linkAttrs.length === 0)
79
- return undefined;
80
- const [activeAttrs, ...inactiveLinks] = linkAttrs;
81
- return {
82
- activeAttrs,
83
- inactiveLinks,
84
- };
85
- };
86
- /**
87
- * Extends selection to include full link marks
88
- * @param state EditorState
89
- * @param from Start position
90
- * @param to End position
91
- * @returns Object with extended from, to positions and link attrs
92
- */
93
- export const extendSelectionToFullLinks = (state, from, to) => {
94
- const { activeAttrs } = getActiveLinkAttrsFromRange({ state, from, to }) || {};
95
- const linkMarkRanges = getLinkMarkRanges({ state, from, to });
96
- if (linkMarkRanges.length === 0 || isEmpty(activeAttrs))
97
- return { from, to };
98
- // Tính toán range mới
99
- const newFrom = Math.min(...linkMarkRanges.map(range => range.from), from);
100
- const newTo = Math.max(...linkMarkRanges.map(range => range.to), to);
101
- return {
102
- from: newFrom,
103
- to: newTo,
104
- linkAttrs: activeAttrs,
105
- };
106
- };
107
- /**
108
- * Handles link actions (create or edit)
109
- * @param view EditorView instance
110
- * @param linkHandler Link handler callbacks
111
- */
112
- export function handleLinkAction(view, linkHandler) {
113
- const { state } = view;
114
- const { tr } = state;
115
- const { from, to, empty } = state.selection;
116
- if (empty && isMarkActive(state, CUSTOM_LINK_EXTENSION_NAME)) {
117
- const linkRange = getLinkRange({ state, pos: from });
118
- const linkMark = getLinkMark({ state });
119
- if (linkRange && linkMark) {
120
- // Update selection to include full link
121
- view.dispatch(tr.setSelection(TextSelection.create(tr.doc, linkRange.from, linkRange.to)));
122
- linkHandler?.edit?.({
123
- attrs: linkMark.attrs,
124
- selectionText: state.doc.textBetween(linkRange.from, linkRange.to),
125
- });
126
- return;
127
- }
128
- }
129
- const { from: newFrom, to: newTo, linkAttrs } = extendSelectionToFullLinks(state, from, to);
130
- // Update selection to include full links
131
- view.dispatch(tr.setSelection(TextSelection.create(tr.doc, newFrom, newTo)));
132
- const selectedText = state.doc.textBetween(newFrom, newTo);
133
- if (linkAttrs) {
134
- linkHandler?.edit?.({
135
- attrs: linkAttrs,
136
- selectionText: selectedText,
137
- });
138
- }
139
- else {
140
- linkHandler?.setNew?.({
141
- selectionText: selectedText,
142
- });
143
- }
144
- }
145
- /**
146
- * Checks if the link menu should be shown
147
- * @param state EditorState
148
- * @returns true if link menu should be shown
149
- */
150
- export const isShowLinkToolbar = (state) => isNoSelection(state) && isCursorInLink(state);
151
- export const isDynamicLink = ({ data }) => !!data && 'dynamic' in data && data.dynamic === 'true';
@@ -1,134 +0,0 @@
1
- import { EditorState } from '@tiptap/pm/state';
2
- import { Editor } from '@tiptap/core';
3
- import { EditorView } from '@tiptap/pm/view';
4
- /**
5
- * Default function to determine if bubble menu should be shown
6
- * @param params Object containing editor state and view information
7
- * @returns true if bubble menu should be shown
8
- */
9
- export declare const defaultShouldShowBubbleMenu: (params: {
10
- state: EditorState;
11
- view: EditorView;
12
- element: HTMLElement;
13
- editor: Editor;
14
- }) => boolean;
15
- /**
16
- * Checks if link menu should be shown
17
- * @param state EditorState
18
- * @returns true if link menu should be shown
19
- */
20
- export declare const shouldShowLinkMenu: (state: EditorState) => boolean;
21
- /**
22
- * Calculates optimal menu position relative to selection
23
- * @param view EditorView instance
24
- * @param menuElement Menu element to position
25
- * @returns Position coordinates
26
- */
27
- export declare function calculateMenuPosition(view: EditorView, menuElement: HTMLElement): {
28
- top: number;
29
- left: number;
30
- };
31
- /**
32
- * Checks if menu should be hidden based on editor state
33
- * @param editor Editor instance
34
- * @returns true if menu should be hidden
35
- */
36
- export declare function shouldHideMenu(editor: Editor): boolean;
37
- /**
38
- * Gets the active menu type based on current selection
39
- * @param state EditorState
40
- * @returns Menu type identifier
41
- */
42
- export declare function getActiveMenuType(state: EditorState): 'default' | 'link' | 'smartTag' | null;
43
- /**
44
- * Menu visibility manager class
45
- */
46
- export declare class MenuVisibilityManager {
47
- private visibleMenus;
48
- private callbacks;
49
- /**
50
- * Shows a menu with given ID
51
- * @param menuId Menu identifier
52
- * @param onShow Optional callback when menu is shown
53
- */
54
- showMenu(menuId: string, onShow?: () => void): void;
55
- /**
56
- * Hides a specific menu
57
- * @param menuId Menu identifier
58
- */
59
- hideMenu(menuId: string): void;
60
- /**
61
- * Hides all visible menus
62
- */
63
- hideAllMenus(): void;
64
- /**
65
- * Checks if a menu is visible
66
- * @param menuId Menu identifier
67
- * @returns true if menu is visible
68
- */
69
- isMenuVisible(menuId: string): boolean;
70
- /**
71
- * Gets all visible menu IDs
72
- * @returns Array of visible menu IDs
73
- */
74
- getVisibleMenus(): string[];
75
- }
76
- /**
77
- * Menu positioning utilities
78
- */
79
- export declare class MenuPositioner {
80
- private container;
81
- constructor(container?: HTMLElement);
82
- /**
83
- * Positions menu relative to a DOM element
84
- * @param menuElement Menu element to position
85
- * @param targetElement Target element to position relative to
86
- * @param placement Placement preference
87
- */
88
- positionRelativeToElement(menuElement: HTMLElement, targetElement: HTMLElement, placement?: 'top' | 'bottom' | 'left' | 'right'): void;
89
- /**
90
- * Positions menu at specific coordinates
91
- * @param menuElement Menu element to position
92
- * @param x X coordinate
93
- * @param y Y coordinate
94
- */
95
- positionAtCoordinates(menuElement: HTMLElement, x: number, y: number): void;
96
- }
97
- /**
98
- * Menu keyboard navigation handler
99
- */
100
- export declare class MenuKeyboardHandler {
101
- private menuElement;
102
- private focusableElements;
103
- private currentIndex;
104
- constructor(menuElement: HTMLElement);
105
- /**
106
- * Updates the list of focusable elements
107
- */
108
- updateFocusableElements(): void;
109
- /**
110
- * Handles keyboard events for menu navigation
111
- * @param event Keyboard event
112
- */
113
- handleKeyDown(event: KeyboardEvent): boolean;
114
- /**
115
- * Focuses the next focusable element
116
- */
117
- focusNext(): void;
118
- /**
119
- * Focuses the previous focusable element
120
- */
121
- focusPrevious(): void;
122
- /**
123
- * Focuses the first focusable element
124
- */
125
- focusFirst(): void;
126
- /**
127
- * Focuses the last focusable element
128
- */
129
- focusLast(): void;
130
- /**
131
- * Removes focus from menu
132
- */
133
- blur(): void;
134
- }