@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,184 +0,0 @@
1
- import { Node, mergeAttributes } from '@tiptap/core';
2
- import { PluginKey } from '@tiptap/pm/state';
3
- import Suggestion from '@tiptap/suggestion';
4
- import { ICON_EMOJI_COMMON } from '@antscorp/antsomi-ui/es/components/molecules';
5
- import { memoize } from 'lodash';
6
- export const LIST_EMOJI = ICON_EMOJI_COMMON.flatMap(group => group.emojis);
7
- const findEmojiByName = memoize((name) => LIST_EMOJI.find(i => i.name === name)?.emoji);
8
- export const EXTENSION_NAME = 'emoji';
9
- export const Emoji = Node.create({
10
- name: EXTENSION_NAME,
11
- priority: 102,
12
- group: 'inline',
13
- inline: true,
14
- atom: true,
15
- selectable: true,
16
- addOptions() {
17
- return {
18
- HTMLAttributes: {},
19
- deleteTriggerWithBackspace: false,
20
- renderText({ node }) {
21
- return findEmojiByName(node.attrs.name) || node.attrs.name;
22
- },
23
- renderHTML({ options, node }) {
24
- const emoji = findEmojiByName(node.attrs.name);
25
- return [
26
- 'span',
27
- mergeAttributes(this.HTMLAttributes, options.HTMLAttributes),
28
- emoji || node.attrs.name,
29
- ];
30
- },
31
- suggestion: {
32
- char: ':',
33
- pluginKey: new PluginKey('emoji'),
34
- command: ({ editor, range, props }) => {
35
- const { name } = props;
36
- // increase range.to by one when the next node is of type "text"
37
- // and starts with a space character
38
- const { nodeAfter } = editor.view.state.selection.$to;
39
- const overrideSpace = nodeAfter?.text?.startsWith(' ');
40
- if (overrideSpace) {
41
- range.to++;
42
- }
43
- const nodeBeforeMarks = editor.state.doc
44
- .resolve(range.from)
45
- .marks()
46
- .map(i => ({
47
- type: i.type.name,
48
- attrs: i.attrs,
49
- }));
50
- editor
51
- .chain()
52
- .focus()
53
- .insertContentAt(range, [
54
- {
55
- type: this.name,
56
- attrs: { name },
57
- marks: nodeBeforeMarks,
58
- },
59
- {
60
- type: 'text',
61
- text: ' ',
62
- marks: nodeBeforeMarks,
63
- },
64
- ])
65
- .run();
66
- // get reference to `window` object from editor element, to support cross-frame JS usage
67
- editor.view.dom.ownerDocument.defaultView?.getSelection()?.collapseToEnd();
68
- },
69
- allow: ({ state, range }) => {
70
- const $from = state.doc.resolve(range.from);
71
- const type = state.schema.nodes[this.name];
72
- const allow = !!$from.parent.type.contentMatch.matchType(type);
73
- return allow;
74
- },
75
- },
76
- };
77
- },
78
- addAttributes() {
79
- return {
80
- name: {
81
- default: null,
82
- parseHTML: element => element.getAttribute('data-name'),
83
- renderHTML: attributes => {
84
- if (!attributes.name) {
85
- return {};
86
- }
87
- return { 'data-name': attributes.name };
88
- },
89
- },
90
- };
91
- },
92
- parseHTML() {
93
- return [
94
- {
95
- tag: `span[data-type="${this.name}"]`,
96
- },
97
- ];
98
- },
99
- renderHTML({ node, HTMLAttributes }) {
100
- const mergedOptions = { ...this.options };
101
- mergedOptions.HTMLAttributes = mergeAttributes({
102
- 'data-type': this.name,
103
- }, this.options.HTMLAttributes, HTMLAttributes);
104
- const html = this.options.renderHTML({
105
- options: mergedOptions,
106
- node,
107
- });
108
- if (typeof html === 'string') {
109
- return [
110
- 'span',
111
- mergeAttributes({
112
- 'data-type': this.name,
113
- }, this.options.HTMLAttributes, HTMLAttributes),
114
- html,
115
- ];
116
- }
117
- return html;
118
- },
119
- renderText({ node }) {
120
- return this.options.renderText({
121
- options: this.options,
122
- node,
123
- });
124
- },
125
- addKeyboardShortcuts() {
126
- return {
127
- Backspace: () => this.editor.commands.command(({ tr, state }) => {
128
- let isEmoji = false;
129
- const { selection } = state;
130
- const { empty, anchor } = selection;
131
- if (!empty) {
132
- return false;
133
- }
134
- state.doc.nodesBetween(anchor - 1, anchor, (node, pos) => {
135
- if (node.type.name === this.name) {
136
- isEmoji = true;
137
- tr.insertText(this.options.deleteTriggerWithBackspace ? '' : this.options.suggestion.char || '', pos, pos + node.nodeSize);
138
- return false;
139
- }
140
- });
141
- return isEmoji;
142
- }),
143
- };
144
- },
145
- addCommands() {
146
- return {
147
- insertEmoji: emojiName => ({ editor, state }) => {
148
- const { selection } = state;
149
- const nodeBeforeMarks = selection.$from.marks().map(i => ({
150
- type: i.type.name,
151
- attrs: i.attrs,
152
- }));
153
- // Chèn emoji node
154
- editor
155
- .chain()
156
- .focus()
157
- .insertContent([
158
- {
159
- type: this.name,
160
- attrs: { name: emojiName },
161
- marks: nodeBeforeMarks,
162
- },
163
- {
164
- type: 'text',
165
- text: ' ',
166
- marks: nodeBeforeMarks,
167
- },
168
- ])
169
- .run();
170
- // Đưa con trỏ về cuối emoji
171
- editor.view.dom.ownerDocument.defaultView?.getSelection()?.collapseToEnd();
172
- return true;
173
- },
174
- };
175
- },
176
- addProseMirrorPlugins() {
177
- return [
178
- Suggestion({
179
- editor: this.editor,
180
- ...this.options.suggestion,
181
- }),
182
- ];
183
- },
184
- });
@@ -1,6 +0,0 @@
1
- import { FontFamilyOptions as TiptapFontFamilyOptions } from '@tiptap/extension-text-style';
2
- interface FontFamilyOptions extends TiptapFontFamilyOptions {
3
- defaultFontFamily: string;
4
- }
5
- export declare const FontFamily: import("@tiptap/core").Extension<FontFamilyOptions, any>;
6
- export {};
@@ -1,36 +0,0 @@
1
- import { FontFamily as TiptapFontFamilyExtension, } from '@tiptap/extension-text-style';
2
- export const FontFamily = TiptapFontFamilyExtension.extend({
3
- addCommands() {
4
- return {
5
- ...this.parent?.(),
6
- unsetFontFamily: () => ({ chain }) => chain()
7
- .setMark('textStyle', {
8
- fontFamily: this.options.defaultFontFamily || null,
9
- })
10
- .removeEmptyTextStyle()
11
- .run(),
12
- };
13
- },
14
- addGlobalAttributes() {
15
- return [
16
- ...(this.parent?.() || []),
17
- {
18
- types: this.options.types,
19
- attributes: {
20
- fontFamily: {
21
- default: this.options.defaultFontFamily,
22
- renderHTML: attrs => {
23
- if (!attrs.fontFamily || attrs.fontFamily === this.options.defaultFontFamily) {
24
- return {};
25
- }
26
- return {
27
- style: `font-family: ${attrs.fontFamily}`,
28
- };
29
- },
30
- parseHTML: element => element.style.fontFamily || this.options.defaultFontFamily,
31
- },
32
- },
33
- },
34
- ];
35
- },
36
- });
@@ -1,31 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export type FontSizeOptions = {
3
- /**
4
- * A list of node names where the font size can be applied.
5
- * @default ['textStyle']
6
- * @example ['heading', 'paragraph']
7
- */
8
- types: string[];
9
- defaultFontSize: string;
10
- };
11
- declare module '@tiptap/core' {
12
- interface Commands<ReturnType> {
13
- fontSize: {
14
- /**
15
- * Set the font size
16
- * @param fontSize The font size
17
- * @example editor.commands.setFontSize('16px')
18
- */
19
- setFontSize: (fontSize: string) => ReturnType;
20
- /**
21
- * Unset the font size
22
- * @example editor.commands.unsetFontSize()
23
- */
24
- unsetFontSize: () => ReturnType;
25
- };
26
- }
27
- }
28
- /**
29
- * This extension allows you to set a font size for text.
30
- */
31
- export declare const FontSize: Extension<FontSizeOptions, any>;
@@ -1,46 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { DEFAULT_TEXT_STYLE } from '../constants';
3
- /**
4
- * This extension allows you to set a font size for text.
5
- */
6
- export const FontSize = Extension.create({
7
- name: 'fontSize',
8
- addOptions() {
9
- return {
10
- types: ['textStyle'],
11
- defaultFontSize: DEFAULT_TEXT_STYLE.fontSize,
12
- };
13
- },
14
- addGlobalAttributes() {
15
- return [
16
- {
17
- types: this.options.types,
18
- attributes: {
19
- fontSize: {
20
- default: this.options.defaultFontSize,
21
- parseHTML: element => element.style.fontSize || this.options.defaultFontSize,
22
- renderHTML: attrs => {
23
- if (!attrs.fontSize || attrs.fontSize === this.options.defaultFontSize) {
24
- return {};
25
- }
26
- return {
27
- style: `font-size: ${attrs.fontSize}`,
28
- };
29
- },
30
- },
31
- },
32
- },
33
- ];
34
- },
35
- addCommands() {
36
- return {
37
- setFontSize: fontSize => ({ chain }) => chain().setMark('textStyle', { fontSize }).run(),
38
- unsetFontSize: () => ({ chain }) => chain()
39
- .setMark('textStyle', {
40
- fontSize: this.options.defaultFontSize || null,
41
- })
42
- .removeEmptyTextStyle()
43
- .run(),
44
- };
45
- },
46
- });
@@ -1,23 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export interface FontWeightOptions {
3
- types: string[];
4
- defaultWeight: string | number;
5
- }
6
- declare module '@tiptap/core' {
7
- interface Commands<ReturnType> {
8
- fontWeight: {
9
- /**
10
- * Set the font weight
11
- * @param fontWeight The font weight
12
- * @example editor.commands.setFontWeight('bold')
13
- */
14
- setFontWeight: (fontWeight: string | number) => ReturnType;
15
- /**
16
- * Unset the font weight
17
- * @example editor.commands.unsetFontWeight()
18
- */
19
- unsetFontWeight: () => ReturnType;
20
- };
21
- }
22
- }
23
- export declare const FontWeight: Extension<any, any>;
@@ -1,41 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { DEFAULT_TEXT_STYLE } from '../constants';
3
- export const FontWeight = Extension.create({
4
- name: 'fontWeight',
5
- addOptions() {
6
- return {
7
- types: ['textStyle'],
8
- defaultWeight: DEFAULT_TEXT_STYLE.fontWeight,
9
- };
10
- },
11
- addGlobalAttributes() {
12
- return [
13
- {
14
- types: this.options.types,
15
- attributes: {
16
- fontWeight: {
17
- default: this.options.defaultWeight,
18
- renderHTML: attributes => {
19
- if (!attributes.fontWeight) {
20
- return {};
21
- }
22
- return {
23
- style: `font-weight: ${attributes.fontWeight}`,
24
- };
25
- },
26
- parseHTML: element => element.style.fontWeight,
27
- },
28
- },
29
- },
30
- ];
31
- },
32
- addCommands() {
33
- return {
34
- setFontWeight: fontWeight => ({ chain }) => chain().setMark('textStyle', { fontWeight }).run(),
35
- unsetFontWeight: () => ({ chain }) => chain()
36
- .setMark('textStyle', { fontWeight: this.options.defaultWeight })
37
- .removeEmptyTextStyle()
38
- .run(),
39
- };
40
- },
41
- });
@@ -1,21 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export interface IndentOptions {
3
- types: string[];
4
- minIndent: number;
5
- maxIndent: number;
6
- }
7
- declare module '@tiptap/core' {
8
- interface Commands<ReturnType> {
9
- indent: {
10
- /**
11
- * Set the indent attribute
12
- */
13
- indent: () => ReturnType;
14
- /**
15
- * Set the outdent attribute
16
- */
17
- outdent: () => ReturnType;
18
- };
19
- }
20
- }
21
- export declare const Indent: Extension<IndentOptions, any>;
@@ -1,63 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { createIndentCommand } from '../utils/indent';
3
- export const Indent = Extension.create({
4
- name: 'indent',
5
- addOptions() {
6
- return {
7
- types: ['paragraph', 'heading', 'blockquote'],
8
- minIndent: 0 /* IndentProps.min */,
9
- maxIndent: 7 /* IndentProps.max */,
10
- };
11
- },
12
- addGlobalAttributes() {
13
- return [
14
- {
15
- types: this.options.types,
16
- attributes: {
17
- indent: {
18
- default: 0,
19
- parseHTML: element => {
20
- const identAttr = element.getAttribute('data-indent');
21
- return (identAttr ? parseInt(identAttr, 10) : 0) || 0;
22
- },
23
- renderHTML: attributes => {
24
- if (!attributes.indent) {
25
- return {};
26
- }
27
- return {
28
- 'data-indent': attributes.indent,
29
- style: `padding-left: ${attributes.indent * 1}em`,
30
- };
31
- },
32
- },
33
- },
34
- },
35
- ];
36
- },
37
- addCommands() {
38
- return {
39
- indent: () => createIndentCommand({
40
- delta: 1 /* IndentProps.more */,
41
- types: this.options.types,
42
- }),
43
- outdent: () => createIndentCommand({
44
- delta: -1 /* IndentProps.less */,
45
- types: this.options.types,
46
- }),
47
- };
48
- },
49
- addKeyboardShortcuts() {
50
- return {
51
- Tab: () => {
52
- if (!(this.editor.isActive('bulletList') || this.editor.isActive('orderedList')))
53
- return this.editor.commands.indent();
54
- return this.editor.commands.sinkListItem('listItem');
55
- },
56
- 'Shift-Tab': () => {
57
- if (!(this.editor.isActive('bulletList') || this.editor.isActive('orderedList')))
58
- return this.editor.commands.outdent();
59
- return this.editor.commands.sinkListItem('listItem');
60
- },
61
- };
62
- },
63
- });
@@ -1,32 +0,0 @@
1
- import '@tiptap/extension-text-style';
2
- import { Extension } from '@tiptap/core';
3
- export type LetterSpacingOptions = {
4
- /**
5
- * A list of node names where the letter spacing can be applied.
6
- * @default ['textStyle']
7
- * @example ['heading', 'paragraph']
8
- */
9
- types: string[];
10
- defaultLetterSpacing?: string;
11
- };
12
- declare module '@tiptap/core' {
13
- interface Commands<ReturnType> {
14
- letterSpacing: {
15
- /**
16
- * Set the letter spacing
17
- * @param letterSpacing The letter spacing
18
- * @example editor.commands.setLetterSpacing('1px')
19
- */
20
- setLetterSpacing: (letterSpacing: string) => ReturnType;
21
- /**
22
- * Unset the letter spacing
23
- * @example editor.commands.unsetLetterSpacing()
24
- */
25
- unsetLetterSpacing: () => ReturnType;
26
- };
27
- }
28
- }
29
- /**
30
- * This extension allows you to set a letter spacing for text.
31
- */
32
- export declare const LetterSpacing: Extension<LetterSpacingOptions, any>;
@@ -1,48 +0,0 @@
1
- import '@tiptap/extension-text-style';
2
- import { Extension } from '@tiptap/core';
3
- import { DEFAULT_TEXT_STYLE } from '../constants';
4
- /**
5
- * This extension allows you to set a letter spacing for text.
6
- */
7
- export const LetterSpacing = Extension.create({
8
- name: 'letterSpacing',
9
- addOptions() {
10
- return {
11
- defaultWeight: DEFAULT_TEXT_STYLE.letterSpacing,
12
- types: ['textStyle'],
13
- };
14
- },
15
- addGlobalAttributes() {
16
- return [
17
- {
18
- types: this.options.types,
19
- attributes: {
20
- letterSpacing: {
21
- default: this.options.defaultLetterSpacing,
22
- parseHTML: el => el.style.letterSpacing || this.options.defaultLetterSpacing,
23
- renderHTML: attrs => {
24
- const { letterSpacing } = attrs;
25
- if (!letterSpacing || letterSpacing === this.options.defaultLetterSpacing) {
26
- return {};
27
- }
28
- return {
29
- style: `letter-spacing: ${attrs.letterSpacing}`,
30
- };
31
- },
32
- },
33
- },
34
- },
35
- ];
36
- },
37
- addCommands() {
38
- return {
39
- setLetterSpacing: letterSpacing => ({ chain }) => chain().setMark('textStyle', { letterSpacing }).run(),
40
- unsetLetterSpacing: () => ({ chain }) => chain()
41
- .setMark('textStyle', {
42
- letterSpacing: null,
43
- })
44
- .removeEmptyTextStyle()
45
- .run(),
46
- };
47
- },
48
- });
@@ -1,20 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export interface LineHeightOptions {
3
- types: string[];
4
- defaultHeight: string;
5
- }
6
- declare module '@tiptap/core' {
7
- interface Commands<ReturnType> {
8
- lineHeight: {
9
- /**
10
- * Set the line height attribute
11
- */
12
- setLineHeight: (height: string) => ReturnType;
13
- /**
14
- * Unset the text align attribute
15
- */
16
- unsetLineHeight: () => ReturnType;
17
- };
18
- }
19
- }
20
- export declare const LineHeight: Extension<LineHeightOptions, any>;
@@ -1,36 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { DEFAULT_TEXT_STYLE } from '../constants';
3
- export const LineHeight = Extension.create({
4
- name: 'lineHeight',
5
- addOptions() {
6
- return {
7
- defaultHeight: DEFAULT_TEXT_STYLE.lineHeight,
8
- types: ['heading', 'paragraph'],
9
- };
10
- },
11
- addGlobalAttributes() {
12
- return [
13
- {
14
- types: this.options.types,
15
- attributes: {
16
- lineHeight: {
17
- default: this.options.defaultHeight,
18
- parseHTML: element => element.style.lineHeight,
19
- renderHTML: attrs => {
20
- if (!attrs.lineHeight || attrs.lineHeight === this.options.defaultHeight) {
21
- return {};
22
- }
23
- return { style: `line-height: ${attrs.lineHeight}` };
24
- },
25
- },
26
- },
27
- },
28
- ];
29
- },
30
- addCommands() {
31
- return {
32
- setLineHeight: (height) => ({ commands }) => this.options.types.every(type => commands.updateAttributes(type, { lineHeight: height })),
33
- unsetLineHeight: () => ({ commands }) => this.options.types.every(type => commands.resetAttributes(type, 'lineHeight')),
34
- };
35
- },
36
- });
@@ -1,29 +0,0 @@
1
- import { LinkAttrs } from '../types';
2
- import { LinkOptions as TiptapLinkOptions } from '@tiptap/extension-link';
3
- export type LinkOptions = TiptapLinkOptions & {
4
- highlight: boolean;
5
- };
6
- declare module '@tiptap/core' {
7
- interface Commands<ReturnType> {
8
- customLink: {
9
- setCustomLink: (params: {
10
- attrs?: LinkAttrs;
11
- content?: string;
12
- }) => ReturnType;
13
- deleteCustomLink: (predicate: (attrs: LinkAttrs) => boolean) => ReturnType;
14
- unsetCustomLink: () => ReturnType;
15
- updateCustomLinkAttrsGlobally: (predicate: (currentAttrs: LinkAttrs) => boolean, updateFn: (params: {
16
- currentAttrs: LinkAttrs;
17
- currentContent: string;
18
- }) => {
19
- attrs?: LinkAttrs;
20
- content?: string;
21
- } | false) => ReturnType;
22
- updateCustomLinkHighlight: (enabled: boolean) => ReturnType;
23
- };
24
- }
25
- }
26
- export interface CustomLinkStorage {
27
- highlight: boolean;
28
- }
29
- export declare const CustomLink: import("@tiptap/core").Mark<LinkOptions, CustomLinkStorage>;