@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.
- package/es/assets/css/main.scss +2 -4
- package/es/components/icons/LazyIcon/LazyIcon.d.ts +9 -18
- package/es/components/icons/LazyIcon/LazyIcon.js +9 -18
- package/es/components/icons/index.d.ts +9 -18
- package/es/components/icons/index.js +9 -18
- package/es/components/molecules/EmojiCollections/CommonCollection/index.js +2 -2
- package/es/components/molecules/EmojiCollections/types.d.ts +0 -1
- package/es/components/molecules/EmojiPopover/EmojiPopover.d.ts +0 -1
- package/es/components/molecules/EmojiPopover/EmojiPopover.js +6 -10
- package/es/components/molecules/EmojiPopover/styled.d.ts +2 -2
- package/es/components/molecules/EmojiPopover/styled.js +1 -1
- package/es/components/molecules/TagifyInput/patternHandlers.js +12 -0
- package/es/components/molecules/TagifyInput/utils.d.ts +1 -0
- package/es/components/molecules/TagifyInput/utils.js +1 -0
- package/es/components/molecules/VirtualizedMenu/VirtualizedMenu.d.ts +3 -6
- package/es/components/molecules/VirtualizedMenu/__mocks__/index.js +982 -2594
- package/es/components/molecules/VirtualizedMenu/components/Item/Item.d.ts +11 -1
- package/es/components/molecules/VirtualizedMenu/components/Item/Item.js +25 -53
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.d.ts +5 -8
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.js +46 -289
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/index.js +0 -1
- package/es/components/molecules/VirtualizedMenu/styled.d.ts +2 -2
- package/es/components/molecules/VirtualizedMenu/styled.js +4 -23
- package/es/components/molecules/VirtualizedMenu/types.d.ts +10 -27
- package/es/components/molecules/VirtualizedMenu/utils.d.ts +5 -8
- package/es/components/molecules/VirtualizedMenu/utils.js +18 -13
- package/es/components/molecules/index.d.ts +0 -1
- package/es/components/molecules/index.js +0 -1
- package/es/components/organism/index.d.ts +0 -1
- package/es/components/organism/index.js +0 -1
- package/es/constants/api.js +3 -3
- package/es/hooks/index.d.ts +0 -4
- package/es/hooks/index.js +0 -4
- package/es/locales/i18n.d.ts +1 -1
- package/es/utils/common.d.ts +9 -14
- package/es/utils/common.js +23 -60
- package/es/utils/index.d.ts +0 -1
- package/es/utils/index.js +0 -1
- package/es/utils/web.d.ts +0 -15
- package/es/utils/web.js +0 -39
- package/package.json +4 -22
- package/es/components/atoms/Eyedropper/Eyedropper.d.ts +0 -2
- package/es/components/atoms/Eyedropper/Eyedropper.js +0 -53
- package/es/components/atoms/Eyedropper/index.d.ts +0 -0
- package/es/components/atoms/Eyedropper/index.js +0 -1
- package/es/components/atoms/Eyedropper/styled.d.ts +0 -9
- package/es/components/atoms/Eyedropper/styled.js +0 -45
- package/es/components/atoms/Eyedropper/types.d.ts +0 -5
- package/es/components/atoms/Eyedropper/types.js +0 -1
- package/es/components/icons/ALignRightIcon.d.ts +0 -3
- package/es/components/icons/ALignRightIcon.js +0 -7
- package/es/components/icons/AlignCenterIcon.d.ts +0 -3
- package/es/components/icons/AlignCenterIcon.js +0 -7
- package/es/components/icons/AlignJustifyIcon.d.ts +0 -3
- package/es/components/icons/AlignJustifyIcon.js +0 -7
- package/es/components/icons/AlignLeftIcon.d.ts +0 -3
- package/es/components/icons/AlignLeftIcon.js +0 -7
- package/es/components/icons/ArrowDropDownIcon.d.ts +0 -3
- package/es/components/icons/ArrowDropDownIcon.js +0 -7
- package/es/components/icons/ChevronRightIcon.d.ts +0 -3
- package/es/components/icons/ChevronRightIcon.js +0 -7
- package/es/components/icons/ColorizeIcon.d.ts +0 -3
- package/es/components/icons/ColorizeIcon.js +0 -7
- package/es/components/icons/LinkOffIcon.d.ts +0 -3
- package/es/components/icons/LinkOffIcon.js +0 -7
- package/es/components/icons/MinusIcon.d.ts +0 -3
- package/es/components/icons/MinusIcon.js +0 -7
- package/es/components/index.scss +0 -2
- package/es/components/molecules/EyedropperButton/EyedropperButton.d.ts +0 -11
- package/es/components/molecules/EyedropperButton/EyedropperButton.js +0 -34
- package/es/components/molecules/EyedropperButton/index.d.ts +0 -0
- package/es/components/molecules/EyedropperButton/index.js +0 -1
- package/es/components/molecules/EyedropperButton/styled.d.ts +0 -7
- package/es/components/molecules/EyedropperButton/styled.js +0 -23
- package/es/components/molecules/FontSizeInput/FontSizeInput.d.ts +0 -3
- package/es/components/molecules/FontSizeInput/FontSizeInput.js +0 -134
- package/es/components/molecules/FontSizeInput/components/FontSizeControl.d.ts +0 -8
- package/es/components/molecules/FontSizeInput/components/FontSizeControl.js +0 -14
- package/es/components/molecules/FontSizeInput/components/FontSizeDropdown.d.ts +0 -21
- package/es/components/molecules/FontSizeInput/components/FontSizeDropdown.js +0 -19
- package/es/components/molecules/FontSizeInput/constants.d.ts +0 -2
- package/es/components/molecules/FontSizeInput/constants.js +0 -5
- package/es/components/molecules/FontSizeInput/index.d.ts +0 -2
- package/es/components/molecules/FontSizeInput/index.js +0 -1
- package/es/components/molecules/FontSizeInput/styled.d.ts +0 -7
- package/es/components/molecules/FontSizeInput/styled.js +0 -40
- package/es/components/molecules/FontSizeInput/styles.scss +0 -15
- package/es/components/molecules/FontSizeInput/types.d.ts +0 -23
- package/es/components/molecules/FontSizeInput/types.js +0 -1
- package/es/components/molecules/FontSizeInput/utils.d.ts +0 -7
- package/es/components/molecules/FontSizeInput/utils.js +0 -9
- package/es/components/molecules/index.scss +0 -1
- package/es/components/organism/ActivityTimeline/__mocks__/event_tracking.json +0 -1290
- package/es/components/organism/ActivityTimeline/__mocks__/timeline.json +0 -3059
- package/es/components/organism/TextEditor/TextEditor.d.ts +0 -3
- package/es/components/organism/TextEditor/TextEditor.js +0 -264
- package/es/components/organism/TextEditor/__mocks__/text-block.settings.json +0 -320
- package/es/components/organism/TextEditor/__mocks__/text-contennt.d.ts +0 -1
- package/es/components/organism/TextEditor/__mocks__/text-contennt.js +0 -38
- package/es/components/organism/TextEditor/constants.d.ts +0 -177
- package/es/components/organism/TextEditor/constants.js +0 -323
- package/es/components/organism/TextEditor/extensions/BackgroundColor.d.ts +0 -25
- package/es/components/organism/TextEditor/extensions/BackgroundColor.js +0 -46
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu-plugin.d.ts +0 -140
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu-plugin.js +0 -366
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu.d.ts +0 -15
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu.js +0 -31
- package/es/components/organism/TextEditor/extensions/BubbleMenu/index.d.ts +0 -2
- package/es/components/organism/TextEditor/extensions/BubbleMenu/index.js +0 -2
- package/es/components/organism/TextEditor/extensions/ClearFormatting.d.ts +0 -16
- package/es/components/organism/TextEditor/extensions/ClearFormatting.js +0 -26
- package/es/components/organism/TextEditor/extensions/Color.d.ts +0 -6
- package/es/components/organism/TextEditor/extensions/Color.js +0 -34
- package/es/components/organism/TextEditor/extensions/Emoji.d.ts +0 -57
- package/es/components/organism/TextEditor/extensions/Emoji.js +0 -184
- package/es/components/organism/TextEditor/extensions/FontFamily.d.ts +0 -6
- package/es/components/organism/TextEditor/extensions/FontFamily.js +0 -36
- package/es/components/organism/TextEditor/extensions/FontSize.d.ts +0 -31
- package/es/components/organism/TextEditor/extensions/FontSize.js +0 -46
- package/es/components/organism/TextEditor/extensions/FontWeight.d.ts +0 -23
- package/es/components/organism/TextEditor/extensions/FontWeight.js +0 -41
- package/es/components/organism/TextEditor/extensions/Indent.d.ts +0 -21
- package/es/components/organism/TextEditor/extensions/Indent.js +0 -63
- package/es/components/organism/TextEditor/extensions/LetterSpacing.d.ts +0 -32
- package/es/components/organism/TextEditor/extensions/LetterSpacing.js +0 -48
- package/es/components/organism/TextEditor/extensions/LineHeight.d.ts +0 -20
- package/es/components/organism/TextEditor/extensions/LineHeight.js +0 -36
- package/es/components/organism/TextEditor/extensions/Link.d.ts +0 -29
- package/es/components/organism/TextEditor/extensions/Link.js +0 -187
- package/es/components/organism/TextEditor/extensions/ListItemMarker.d.ts +0 -13
- package/es/components/organism/TextEditor/extensions/ListItemMarker.js +0 -174
- package/es/components/organism/TextEditor/extensions/OrderedList.d.ts +0 -56
- package/es/components/organism/TextEditor/extensions/OrderedList.js +0 -187
- package/es/components/organism/TextEditor/extensions/SmartTag.d.ts +0 -39
- package/es/components/organism/TextEditor/extensions/SmartTag.js +0 -167
- package/es/components/organism/TextEditor/extensions/StyleMemory.d.ts +0 -36
- package/es/components/organism/TextEditor/extensions/StyleMemory.js +0 -163
- package/es/components/organism/TextEditor/extensions/TextTransform.d.ts +0 -30
- package/es/components/organism/TextEditor/extensions/TextTransform.js +0 -36
- package/es/components/organism/TextEditor/extensions/UnorderedList.d.ts +0 -55
- package/es/components/organism/TextEditor/extensions/UnorderedList.js +0 -176
- package/es/components/organism/TextEditor/hooks/index.d.ts +0 -6
- package/es/components/organism/TextEditor/hooks/index.js +0 -6
- package/es/components/organism/TextEditor/hooks/useColorSet.d.ts +0 -4
- package/es/components/organism/TextEditor/hooks/useColorSet.js +0 -22
- package/es/components/organism/TextEditor/hooks/useDocumentState.d.ts +0 -18
- package/es/components/organism/TextEditor/hooks/useDocumentState.js +0 -42
- package/es/components/organism/TextEditor/hooks/useMarkTracking.d.ts +0 -26
- package/es/components/organism/TextEditor/hooks/useMarkTracking.js +0 -68
- package/es/components/organism/TextEditor/hooks/usePersistence.d.ts +0 -31
- package/es/components/organism/TextEditor/hooks/usePersistence.js +0 -169
- package/es/components/organism/TextEditor/hooks/useStyleMemory.d.ts +0 -6
- package/es/components/organism/TextEditor/hooks/useStyleMemory.js +0 -42
- package/es/components/organism/TextEditor/hooks/useStylePresets.d.ts +0 -34
- package/es/components/organism/TextEditor/hooks/useStylePresets.js +0 -83
- package/es/components/organism/TextEditor/index.d.ts +0 -16
- package/es/components/organism/TextEditor/index.js +0 -8
- package/es/components/organism/TextEditor/index.scss +0 -61
- package/es/components/organism/TextEditor/provider.d.ts +0 -14
- package/es/components/organism/TextEditor/provider.js +0 -33
- package/es/components/organism/TextEditor/store.d.ts +0 -13
- package/es/components/organism/TextEditor/store.js +0 -20
- package/es/components/organism/TextEditor/styled.d.ts +0 -10
- package/es/components/organism/TextEditor/styled.js +0 -94
- package/es/components/organism/TextEditor/types.d.ts +0 -139
- package/es/components/organism/TextEditor/types.js +0 -5
- package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.js +0 -84
- package/es/components/organism/TextEditor/ui/BubbleMenu/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/BubbleMenu/index.js +0 -1
- package/es/components/organism/TextEditor/ui/BubbleToolbar/BubbleToolbar.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/BubbleToolbar/BubbleToolbar.js +0 -1
- package/es/components/organism/TextEditor/ui/BubbleToolbar/index.d.ts +0 -0
- package/es/components/organism/TextEditor/ui/BubbleToolbar/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Button/Button.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/Button/Button.js +0 -31
- package/es/components/organism/TextEditor/ui/Button/index.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/Button/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Button/types.d.ts +0 -10
- package/es/components/organism/TextEditor/ui/Button/types.js +0 -1
- package/es/components/organism/TextEditor/ui/ColorPicker/ColorPicker.d.ts +0 -39
- package/es/components/organism/TextEditor/ui/ColorPicker/ColorPicker.js +0 -131
- package/es/components/organism/TextEditor/ui/ColorPicker/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/ColorPicker/index.js +0 -1
- package/es/components/organism/TextEditor/ui/DropdownButton/DropdownButton.d.ts +0 -17
- package/es/components/organism/TextEditor/ui/DropdownButton/DropdownButton.js +0 -51
- package/es/components/organism/TextEditor/ui/DropdownButton/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/DropdownButton/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Emoji/EmojiList.d.ts +0 -11
- package/es/components/organism/TextEditor/ui/Emoji/EmojiList.js +0 -66
- package/es/components/organism/TextEditor/ui/Emoji/index.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/Emoji/index.js +0 -2
- package/es/components/organism/TextEditor/ui/Emoji/suggestion.d.ts +0 -4
- package/es/components/organism/TextEditor/ui/Emoji/suggestion.js +0 -71
- package/es/components/organism/TextEditor/ui/FontPopover/FontPopover.d.ts +0 -12
- package/es/components/organism/TextEditor/ui/FontPopover/FontPopover.js +0 -69
- package/es/components/organism/TextEditor/ui/FontPopover/styled.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/FontPopover/styled.js +0 -22
- package/es/components/organism/TextEditor/ui/Popover/Popover.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/Popover/Popover.js +0 -9
- package/es/components/organism/TextEditor/ui/Popover/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/Popover/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Select/Select.d.ts +0 -4
- package/es/components/organism/TextEditor/ui/Select/Select.js +0 -7
- package/es/components/organism/TextEditor/ui/Select/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/Select/index.js +0 -1
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/SplitButtonDropdown.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/SplitButtonDropdown.js +0 -44
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/index.js +0 -1
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/styled.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/styled.js +0 -52
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/types.d.ts +0 -19
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/types.js +0 -1
- package/es/components/organism/TextEditor/ui/TextAlignSelect/TextAlignSelect.d.ts +0 -30
- package/es/components/organism/TextEditor/ui/TextAlignSelect/TextAlignSelect.js +0 -77
- package/es/components/organism/TextEditor/ui/TextAlignSelect/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/TextAlignSelect/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Toolbar/Toolbar.d.ts +0 -16
- package/es/components/organism/TextEditor/ui/Toolbar/Toolbar.js +0 -42
- package/es/components/organism/TextEditor/ui/Toolbar/actions/BoldAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/BoldAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/BulletListAction.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/Toolbar/actions/BulletListAction.js +0 -93
- package/es/components/organism/TextEditor/ui/Toolbar/actions/ClearFormattingAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/ClearFormattingAction.js +0 -20
- package/es/components/organism/TextEditor/ui/Toolbar/actions/EmojiAction.d.ts +0 -4
- package/es/components/organism/TextEditor/ui/Toolbar/actions/EmojiAction.js +0 -31
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontFamilyAction.d.ts +0 -7
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontFamilyAction.js +0 -28
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontSizeAction.d.ts +0 -7
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontSizeAction.js +0 -44
- package/es/components/organism/TextEditor/ui/Toolbar/actions/HistoryAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/HistoryAction.js +0 -21
- package/es/components/organism/TextEditor/ui/Toolbar/actions/IndentAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/IndentAction.js +0 -17
- package/es/components/organism/TextEditor/ui/Toolbar/actions/ItalicAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/ItalicAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/LetterSpacing.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/LetterSpacing.js +0 -28
- package/es/components/organism/TextEditor/ui/Toolbar/actions/LinkAction.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/Toolbar/actions/LinkAction.js +0 -17
- package/es/components/organism/TextEditor/ui/Toolbar/actions/OrderedListAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/OrderedListAction.js +0 -67
- package/es/components/organism/TextEditor/ui/Toolbar/actions/OutdentAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/OutdentAction.js +0 -17
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SmartTagAction.d.ts +0 -7
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SmartTagAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SpacingAction.d.ts +0 -10
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SpacingAction.js +0 -45
- package/es/components/organism/TextEditor/ui/Toolbar/actions/StrikeAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/StrikeAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SubscriptAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SubscriptAction.js +0 -26
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SuperscriptAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SuperscriptAction.js +0 -26
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextAlignAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextAlignAction.js +0 -3
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextBackgroundColorAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextBackgroundColorAction.js +0 -29
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextColorAction.d.ts +0 -14
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextColorAction.js +0 -22
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextTransformAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextTransformAction.js +0 -36
- package/es/components/organism/TextEditor/ui/Toolbar/actions/UnderlineAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/UnderlineAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/UnsetLink.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/Toolbar/actions/UnsetLink.js +0 -19
- package/es/components/organism/TextEditor/ui/Toolbar/actions/index.d.ts +0 -24
- package/es/components/organism/TextEditor/ui/Toolbar/actions/index.js +0 -24
- package/es/components/organism/TextEditor/ui/Toolbar/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/Toolbar/index.js +0 -1
- package/es/components/organism/TextEditor/utils/documentState.d.ts +0 -57
- package/es/components/organism/TextEditor/utils/documentState.js +0 -100
- package/es/components/organism/TextEditor/utils/font.d.ts +0 -73
- package/es/components/organism/TextEditor/utils/font.js +0 -160
- package/es/components/organism/TextEditor/utils/htmlProcessing.d.ts +0 -75
- package/es/components/organism/TextEditor/utils/htmlProcessing.js +0 -343
- package/es/components/organism/TextEditor/utils/indent.d.ts +0 -11
- package/es/components/organism/TextEditor/utils/indent.js +0 -56
- package/es/components/organism/TextEditor/utils/index.d.ts +0 -8
- package/es/components/organism/TextEditor/utils/index.js +0 -16
- package/es/components/organism/TextEditor/utils/link.d.ts +0 -108
- package/es/components/organism/TextEditor/utils/link.js +0 -151
- package/es/components/organism/TextEditor/utils/menu.d.ts +0 -134
- package/es/components/organism/TextEditor/utils/menu.js +0 -317
- package/es/components/organism/TextEditor/utils/selection.d.ts +0 -25
- package/es/components/organism/TextEditor/utils/selection.js +0 -57
- package/es/components/organism/TextEditor/utils/shared.d.ts +0 -1
- package/es/components/organism/TextEditor/utils/shared.js +0 -9
- package/es/components/organism/TextEditor/utils/smartTag.d.ts +0 -49
- package/es/components/organism/TextEditor/utils/smartTag.js +0 -89
- package/es/components/organism/TextEditor/utils/style.d.ts +0 -78
- package/es/components/organism/TextEditor/utils/style.js +0 -193
- package/es/components/organism/index.scss +0 -1
- package/es/hooks/useBroadcastedLocalStorage.d.ts +0 -5
- package/es/hooks/useBroadcastedLocalStorage.js +0 -71
- package/es/hooks/useElementSize.d.ts +0 -7
- package/es/hooks/useElementSize.js +0 -56
- package/es/hooks/useEyedropper/attach.d.ts +0 -4
- package/es/hooks/useEyedropper/attach.js +0 -9
- package/es/hooks/useEyedropper/eyedropper.d.ts +0 -69
- package/es/hooks/useEyedropper/eyedropper.js +0 -205
- package/es/hooks/useEyedropper/index.d.ts +0 -2
- package/es/hooks/useEyedropper/index.js +0 -7
- package/es/hooks/useEyedropper/support.d.ts +0 -1
- package/es/hooks/useEyedropper/support.js +0 -3
- package/es/hooks/useEyedropper/types.d.ts +0 -9
- package/es/hooks/useEyedropper/types.js +0 -1
- package/es/hooks/useEyedropper/useEyedropper.d.ts +0 -8
- package/es/hooks/useEyedropper/useEyedropper.js +0 -50
- package/es/hooks/useEyedropper/utils.d.ts +0 -11
- package/es/hooks/useEyedropper/utils.js +0 -17
- package/es/hooks/useIsMounted.d.ts +0 -1
- package/es/hooks/useIsMounted.js +0 -11
- package/es/utils/tree.d.ts +0 -225
- package/es/utils/tree.js +0 -469
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
export declare const SMART_TAG_HIGHLIGHT_BG = "rgba(0, 199, 97, 0.2)";
|
|
2
|
-
export declare const DEFAULT_TEXT_STYLE: {
|
|
3
|
-
fontSize: string;
|
|
4
|
-
color: string;
|
|
5
|
-
fontFamily: string;
|
|
6
|
-
backgroundColor: string;
|
|
7
|
-
lineHeight: string;
|
|
8
|
-
fontWeight: string;
|
|
9
|
-
letterSpacing: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const FONT_WEIGHT_LABELS: {
|
|
12
|
-
readonly thin: "Thin";
|
|
13
|
-
readonly extraLight: "Extra Light";
|
|
14
|
-
readonly light: "Light";
|
|
15
|
-
readonly normal: "Normal";
|
|
16
|
-
readonly medium: "Medium";
|
|
17
|
-
readonly semiBold: "Semi Bold";
|
|
18
|
-
readonly bold: "Bold";
|
|
19
|
-
readonly extraBold: "Extra Bold";
|
|
20
|
-
readonly black: "Black";
|
|
21
|
-
};
|
|
22
|
-
export declare const FONT_WEIGHT_MAP: Record<number, string>;
|
|
23
|
-
export declare const DEFAULT_FONT_CONFIGS: {
|
|
24
|
-
fontFamily: {
|
|
25
|
-
name: string;
|
|
26
|
-
};
|
|
27
|
-
fontWeight: number[];
|
|
28
|
-
}[];
|
|
29
|
-
export declare const LINK_TEXT_COLOR = "#0066CC";
|
|
30
|
-
export declare const COMPONENT_CLS = "antsomi-text-editor";
|
|
31
|
-
export declare const TEXT_EDITOR_CONSTANTS: {
|
|
32
|
-
COLOR_GIRD: string[][];
|
|
33
|
-
TEXT_ALIGN: {
|
|
34
|
-
TITLE: string;
|
|
35
|
-
OPTIONS: {
|
|
36
|
-
LEFT: {
|
|
37
|
-
LABEL: string;
|
|
38
|
-
VALUE: string;
|
|
39
|
-
};
|
|
40
|
-
CENTER: {
|
|
41
|
-
LABEL: string;
|
|
42
|
-
VALUE: string;
|
|
43
|
-
};
|
|
44
|
-
RIGHT: {
|
|
45
|
-
LABEL: string;
|
|
46
|
-
VALUE: string;
|
|
47
|
-
};
|
|
48
|
-
JUSTIFY: {
|
|
49
|
-
LABEL: string;
|
|
50
|
-
VALUE: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
TOOLTIP: string;
|
|
54
|
-
};
|
|
55
|
-
TEXT_TRANSFORM: {
|
|
56
|
-
PLACEHOLDER: string;
|
|
57
|
-
OPTIONS: {
|
|
58
|
-
UPPERCASE: {
|
|
59
|
-
LABEL: string;
|
|
60
|
-
VALUE: string;
|
|
61
|
-
};
|
|
62
|
-
LOWERCASE: {
|
|
63
|
-
LABEL: string;
|
|
64
|
-
VALUE: string;
|
|
65
|
-
};
|
|
66
|
-
CAPITALIZE: {
|
|
67
|
-
LABEL: string;
|
|
68
|
-
VALUE: string;
|
|
69
|
-
};
|
|
70
|
-
NONE: {
|
|
71
|
-
LABEL: string;
|
|
72
|
-
VALUE: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
TOOLTIPS: {
|
|
77
|
-
BOLD: {
|
|
78
|
-
TITLE: string;
|
|
79
|
-
SHORTCUT: string;
|
|
80
|
-
};
|
|
81
|
-
ITALIC: {
|
|
82
|
-
TITLE: string;
|
|
83
|
-
SHORTCUT: string;
|
|
84
|
-
};
|
|
85
|
-
UNDERLINE: {
|
|
86
|
-
TITLE: string;
|
|
87
|
-
SHORTCUT: string;
|
|
88
|
-
};
|
|
89
|
-
STRIKE: {
|
|
90
|
-
TITLE: string;
|
|
91
|
-
SHORTCUT: string;
|
|
92
|
-
};
|
|
93
|
-
BULLET_LIST: {
|
|
94
|
-
TITLE: string;
|
|
95
|
-
SHORTCUT: string;
|
|
96
|
-
};
|
|
97
|
-
ORDERED_LIST: {
|
|
98
|
-
TITLE: string;
|
|
99
|
-
SHORTCUT: string;
|
|
100
|
-
};
|
|
101
|
-
CLEAR_FORMATTING: {
|
|
102
|
-
TITLE: string;
|
|
103
|
-
SHORTCUT: string;
|
|
104
|
-
};
|
|
105
|
-
FONT_FAMILY: {
|
|
106
|
-
PLACEHOLDER: string;
|
|
107
|
-
};
|
|
108
|
-
FONT_SIZE: {
|
|
109
|
-
PLACEHOLDER: string;
|
|
110
|
-
};
|
|
111
|
-
HIGHLIGHT: {
|
|
112
|
-
TITLE: string;
|
|
113
|
-
};
|
|
114
|
-
INDENT: {
|
|
115
|
-
TITLE: string;
|
|
116
|
-
SHORTCUT: string;
|
|
117
|
-
};
|
|
118
|
-
OUTDENT: {
|
|
119
|
-
TITLE: string;
|
|
120
|
-
SHORTCUT: string;
|
|
121
|
-
};
|
|
122
|
-
LINK: {
|
|
123
|
-
TITLE: string;
|
|
124
|
-
};
|
|
125
|
-
SMART_TAG: {
|
|
126
|
-
TITLE: string;
|
|
127
|
-
};
|
|
128
|
-
SUPERSCRIPT: {
|
|
129
|
-
TITLE: string;
|
|
130
|
-
SHORTCUT: string;
|
|
131
|
-
};
|
|
132
|
-
SUBSCRIPT: {
|
|
133
|
-
TITLE: string;
|
|
134
|
-
SHORTCUT: string;
|
|
135
|
-
};
|
|
136
|
-
TEXT_COLOR: {
|
|
137
|
-
TITLE: string;
|
|
138
|
-
};
|
|
139
|
-
UNDO: {
|
|
140
|
-
TITLE: string;
|
|
141
|
-
SHORTCUT: string;
|
|
142
|
-
};
|
|
143
|
-
REDO: {
|
|
144
|
-
TITLE: string;
|
|
145
|
-
SHORTCUT: string;
|
|
146
|
-
};
|
|
147
|
-
LETTER_SPACING: {
|
|
148
|
-
TITLE: string;
|
|
149
|
-
};
|
|
150
|
-
LINE_SPACING: {
|
|
151
|
-
TITLE: string;
|
|
152
|
-
};
|
|
153
|
-
EMOJI: {
|
|
154
|
-
TITLE: string;
|
|
155
|
-
};
|
|
156
|
-
TEXT_TRANSFORM: {
|
|
157
|
-
TITLE: string;
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
LINK_TEXT_COLOR: string;
|
|
161
|
-
};
|
|
162
|
-
export declare const ORDERED_LIST_STYLE_TYPE: {
|
|
163
|
-
readonly decimal: "decimal";
|
|
164
|
-
readonly lowerAlpha: "lower-alpha";
|
|
165
|
-
readonly upperAlpha: "upper-alpha";
|
|
166
|
-
readonly lowerRoman: "lower-roman";
|
|
167
|
-
readonly upperRoman: "upper-roman";
|
|
168
|
-
readonly lowerGreek: "lower-greek";
|
|
169
|
-
readonly decimalLeadingZero: "decimal-leading-zero";
|
|
170
|
-
};
|
|
171
|
-
export declare const UNORDERED_LIST_STYLE_TYPE: {
|
|
172
|
-
readonly disc: "disc";
|
|
173
|
-
readonly circle: "circle";
|
|
174
|
-
readonly square: "square";
|
|
175
|
-
readonly custom: "custom";
|
|
176
|
-
};
|
|
177
|
-
export declare const CUSTOM_LINK_EXTENSION_NAME: "custom_link";
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import { ANTSOMI_COMPONENT_PREFIX_CLS } from '@antscorp/antsomi-ui/es/constants';
|
|
2
|
-
import { formatHotkey } from '@antscorp/antsomi-ui/es/utils';
|
|
3
|
-
const COLOR_GIRD = [
|
|
4
|
-
// Dòng đầu: màu chuẩn
|
|
5
|
-
[
|
|
6
|
-
'#000000',
|
|
7
|
-
'#434343',
|
|
8
|
-
'#666666',
|
|
9
|
-
'#999999',
|
|
10
|
-
'#B7B7B7',
|
|
11
|
-
'#CCCCCC',
|
|
12
|
-
'#D9D9D9',
|
|
13
|
-
'#EFEFEF',
|
|
14
|
-
'#F3F3F3',
|
|
15
|
-
'#FFFFFF',
|
|
16
|
-
],
|
|
17
|
-
// Dòng 2: màu cơ bản
|
|
18
|
-
[
|
|
19
|
-
'#980000',
|
|
20
|
-
'#FF0000',
|
|
21
|
-
'#FF9900',
|
|
22
|
-
'#FFFF00',
|
|
23
|
-
'#00FF00',
|
|
24
|
-
'#00FFFF',
|
|
25
|
-
'#4A86E8',
|
|
26
|
-
'#0000FF',
|
|
27
|
-
'#9900FF',
|
|
28
|
-
'#FF00FF',
|
|
29
|
-
],
|
|
30
|
-
// Dòng 3+
|
|
31
|
-
[
|
|
32
|
-
'#E6B8AF',
|
|
33
|
-
'#F4CCCC',
|
|
34
|
-
'#FCE5CD',
|
|
35
|
-
'#FFF2CC',
|
|
36
|
-
'#D9EAD3',
|
|
37
|
-
'#D0E0E3',
|
|
38
|
-
'#C9DAF8',
|
|
39
|
-
'#CFE2F3',
|
|
40
|
-
'#D9D2E9',
|
|
41
|
-
'#EAD1DC',
|
|
42
|
-
],
|
|
43
|
-
[
|
|
44
|
-
'#DD7E6B',
|
|
45
|
-
'#EA9999',
|
|
46
|
-
'#F9CB9C',
|
|
47
|
-
'#FFE599',
|
|
48
|
-
'#B6D7A8',
|
|
49
|
-
'#A2C4C9',
|
|
50
|
-
'#A4C2F4',
|
|
51
|
-
'#9FC5E8',
|
|
52
|
-
'#B4A7D6',
|
|
53
|
-
'#D5A6BD',
|
|
54
|
-
],
|
|
55
|
-
[
|
|
56
|
-
'#CC4125',
|
|
57
|
-
'#E06666',
|
|
58
|
-
'#F6B26B',
|
|
59
|
-
'#FFD966',
|
|
60
|
-
'#93C47D',
|
|
61
|
-
'#76A5AF',
|
|
62
|
-
'#6D9EEB',
|
|
63
|
-
'#6FA8DC',
|
|
64
|
-
'#8E7CC3',
|
|
65
|
-
'#C27BA0',
|
|
66
|
-
],
|
|
67
|
-
[
|
|
68
|
-
'#A61C00',
|
|
69
|
-
'#CC0000',
|
|
70
|
-
'#E69138',
|
|
71
|
-
'#F1C232',
|
|
72
|
-
'#6AA84F',
|
|
73
|
-
'#45818E',
|
|
74
|
-
'#3C78D8',
|
|
75
|
-
'#3D85C6',
|
|
76
|
-
'#674EA7',
|
|
77
|
-
'#A64D79',
|
|
78
|
-
],
|
|
79
|
-
[
|
|
80
|
-
'#85200C',
|
|
81
|
-
'#990000',
|
|
82
|
-
'#B45F06',
|
|
83
|
-
'#BF9000',
|
|
84
|
-
'#38761D',
|
|
85
|
-
'#134F5C',
|
|
86
|
-
'#1155CC',
|
|
87
|
-
'#0B5394',
|
|
88
|
-
'#351C75',
|
|
89
|
-
'#741B47',
|
|
90
|
-
],
|
|
91
|
-
[
|
|
92
|
-
'#5B0F00',
|
|
93
|
-
'#660000',
|
|
94
|
-
'#783F04',
|
|
95
|
-
'#7F6000',
|
|
96
|
-
'#274E13',
|
|
97
|
-
'#0C343D',
|
|
98
|
-
'#1C4587',
|
|
99
|
-
'#073763',
|
|
100
|
-
'#20124D',
|
|
101
|
-
'#4C1130',
|
|
102
|
-
],
|
|
103
|
-
];
|
|
104
|
-
// TextAlignSelect component
|
|
105
|
-
const TEXT_ALIGN = {
|
|
106
|
-
TITLE: 'Text Align',
|
|
107
|
-
OPTIONS: {
|
|
108
|
-
LEFT: {
|
|
109
|
-
LABEL: 'Left',
|
|
110
|
-
VALUE: 'left',
|
|
111
|
-
},
|
|
112
|
-
CENTER: {
|
|
113
|
-
LABEL: 'Center',
|
|
114
|
-
VALUE: 'center',
|
|
115
|
-
},
|
|
116
|
-
RIGHT: {
|
|
117
|
-
LABEL: 'Right',
|
|
118
|
-
VALUE: 'right',
|
|
119
|
-
},
|
|
120
|
-
JUSTIFY: {
|
|
121
|
-
LABEL: 'Justify',
|
|
122
|
-
VALUE: 'justify',
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
TOOLTIP: 'Align',
|
|
126
|
-
};
|
|
127
|
-
// TextTransformAction component
|
|
128
|
-
const TEXT_TRANSFORM = {
|
|
129
|
-
PLACEHOLDER: 'Text Transform',
|
|
130
|
-
OPTIONS: {
|
|
131
|
-
UPPERCASE: {
|
|
132
|
-
LABEL: 'UPPERCASE',
|
|
133
|
-
VALUE: 'uppercase',
|
|
134
|
-
},
|
|
135
|
-
LOWERCASE: {
|
|
136
|
-
LABEL: 'lowercase',
|
|
137
|
-
VALUE: 'lowercase',
|
|
138
|
-
},
|
|
139
|
-
CAPITALIZE: {
|
|
140
|
-
LABEL: 'Capitalize',
|
|
141
|
-
VALUE: 'capitalize',
|
|
142
|
-
},
|
|
143
|
-
NONE: {
|
|
144
|
-
LABEL: 'none',
|
|
145
|
-
VALUE: 'none',
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
};
|
|
149
|
-
const TOOLTIPS = {
|
|
150
|
-
BOLD: {
|
|
151
|
-
TITLE: 'Bold',
|
|
152
|
-
SHORTCUT: formatHotkey('B'),
|
|
153
|
-
},
|
|
154
|
-
ITALIC: {
|
|
155
|
-
TITLE: 'Italic',
|
|
156
|
-
SHORTCUT: formatHotkey('I'),
|
|
157
|
-
},
|
|
158
|
-
UNDERLINE: {
|
|
159
|
-
TITLE: 'Underline',
|
|
160
|
-
SHORTCUT: formatHotkey('U'),
|
|
161
|
-
},
|
|
162
|
-
STRIKE: {
|
|
163
|
-
TITLE: 'Strike',
|
|
164
|
-
SHORTCUT: formatHotkey('S'),
|
|
165
|
-
},
|
|
166
|
-
BULLET_LIST: {
|
|
167
|
-
TITLE: 'Unordered List',
|
|
168
|
-
SHORTCUT: formatHotkey('8'),
|
|
169
|
-
},
|
|
170
|
-
ORDERED_LIST: {
|
|
171
|
-
TITLE: 'Ordered List',
|
|
172
|
-
SHORTCUT: formatHotkey('7'),
|
|
173
|
-
},
|
|
174
|
-
CLEAR_FORMATTING: {
|
|
175
|
-
TITLE: 'Clear Formatting',
|
|
176
|
-
SHORTCUT: formatHotkey('\\'),
|
|
177
|
-
},
|
|
178
|
-
FONT_FAMILY: {
|
|
179
|
-
PLACEHOLDER: 'Font Family',
|
|
180
|
-
},
|
|
181
|
-
FONT_SIZE: {
|
|
182
|
-
PLACEHOLDER: 'Font Size',
|
|
183
|
-
},
|
|
184
|
-
HIGHLIGHT: {
|
|
185
|
-
TITLE: 'Text Background',
|
|
186
|
-
},
|
|
187
|
-
INDENT: {
|
|
188
|
-
TITLE: 'Indent',
|
|
189
|
-
SHORTCUT: 'Tab',
|
|
190
|
-
},
|
|
191
|
-
OUTDENT: {
|
|
192
|
-
TITLE: 'Outdent',
|
|
193
|
-
SHORTCUT: 'Shift+Tab',
|
|
194
|
-
},
|
|
195
|
-
LINK: {
|
|
196
|
-
TITLE: 'Link',
|
|
197
|
-
},
|
|
198
|
-
SMART_TAG: {
|
|
199
|
-
TITLE: 'Smart Tag',
|
|
200
|
-
},
|
|
201
|
-
SUPERSCRIPT: {
|
|
202
|
-
TITLE: 'Superscript',
|
|
203
|
-
SHORTCUT: formatHotkey('.'),
|
|
204
|
-
},
|
|
205
|
-
SUBSCRIPT: {
|
|
206
|
-
TITLE: 'Subscript',
|
|
207
|
-
SHORTCUT: formatHotkey(','),
|
|
208
|
-
},
|
|
209
|
-
TEXT_COLOR: {
|
|
210
|
-
TITLE: 'Text Color',
|
|
211
|
-
},
|
|
212
|
-
UNDO: {
|
|
213
|
-
TITLE: 'Undo',
|
|
214
|
-
SHORTCUT: formatHotkey('Z'),
|
|
215
|
-
},
|
|
216
|
-
REDO: {
|
|
217
|
-
TITLE: 'Redo',
|
|
218
|
-
SHORTCUT: formatHotkey('Y'),
|
|
219
|
-
},
|
|
220
|
-
LETTER_SPACING: {
|
|
221
|
-
TITLE: 'Letter Spacing',
|
|
222
|
-
},
|
|
223
|
-
LINE_SPACING: {
|
|
224
|
-
TITLE: 'Line Spacing',
|
|
225
|
-
},
|
|
226
|
-
EMOJI: {
|
|
227
|
-
TITLE: 'Emoji',
|
|
228
|
-
},
|
|
229
|
-
TEXT_TRANSFORM: {
|
|
230
|
-
TITLE: 'Text Transform',
|
|
231
|
-
},
|
|
232
|
-
};
|
|
233
|
-
export const SMART_TAG_HIGHLIGHT_BG = 'rgba(0, 199, 97, 0.2)';
|
|
234
|
-
export const DEFAULT_TEXT_STYLE = {
|
|
235
|
-
fontSize: '22px',
|
|
236
|
-
color: '#000',
|
|
237
|
-
fontFamily: 'inherit',
|
|
238
|
-
backgroundColor: 'inherit',
|
|
239
|
-
lineHeight: '1.15',
|
|
240
|
-
fontWeight: 'inherit',
|
|
241
|
-
letterSpacing: '0px',
|
|
242
|
-
};
|
|
243
|
-
export const FONT_WEIGHT_LABELS = {
|
|
244
|
-
thin: 'Thin',
|
|
245
|
-
extraLight: 'Extra Light',
|
|
246
|
-
light: 'Light',
|
|
247
|
-
normal: 'Normal',
|
|
248
|
-
medium: 'Medium',
|
|
249
|
-
semiBold: 'Semi Bold',
|
|
250
|
-
bold: 'Bold',
|
|
251
|
-
extraBold: 'Extra Bold',
|
|
252
|
-
black: 'Black',
|
|
253
|
-
};
|
|
254
|
-
export const FONT_WEIGHT_MAP = {
|
|
255
|
-
100: FONT_WEIGHT_LABELS.thin,
|
|
256
|
-
200: FONT_WEIGHT_LABELS.extraLight,
|
|
257
|
-
300: FONT_WEIGHT_LABELS.light,
|
|
258
|
-
400: FONT_WEIGHT_LABELS.normal,
|
|
259
|
-
500: FONT_WEIGHT_LABELS.medium,
|
|
260
|
-
600: FONT_WEIGHT_LABELS.semiBold,
|
|
261
|
-
700: FONT_WEIGHT_LABELS.bold,
|
|
262
|
-
800: FONT_WEIGHT_LABELS.extraBold,
|
|
263
|
-
900: FONT_WEIGHT_LABELS.black,
|
|
264
|
-
};
|
|
265
|
-
export const DEFAULT_FONT_CONFIGS = [
|
|
266
|
-
{
|
|
267
|
-
fontFamily: { name: 'Arial' },
|
|
268
|
-
fontWeight: [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
fontFamily: { name: 'Roboto' }, // Google Font, not inherently system-wide
|
|
272
|
-
fontWeight: [100, 300, 400, 500, 700, 900],
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
fontFamily: { name: 'Georgia' },
|
|
276
|
-
fontWeight: [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
fontFamily: { name: 'Helvetica' },
|
|
280
|
-
fontWeight: [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
fontFamily: { name: 'Lucida Grande' },
|
|
284
|
-
fontWeight: [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
fontFamily: { name: 'Tahoma' },
|
|
288
|
-
fontWeight: [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
fontFamily: { name: 'Times New Roman' },
|
|
292
|
-
fontWeight: [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
fontFamily: { name: 'Verdana' },
|
|
296
|
-
fontWeight: [100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
297
|
-
},
|
|
298
|
-
];
|
|
299
|
-
export const LINK_TEXT_COLOR = '#0066CC';
|
|
300
|
-
export const COMPONENT_CLS = `${ANTSOMI_COMPONENT_PREFIX_CLS}-text-editor`;
|
|
301
|
-
export const TEXT_EDITOR_CONSTANTS = {
|
|
302
|
-
COLOR_GIRD,
|
|
303
|
-
TEXT_ALIGN,
|
|
304
|
-
TEXT_TRANSFORM,
|
|
305
|
-
TOOLTIPS,
|
|
306
|
-
LINK_TEXT_COLOR,
|
|
307
|
-
};
|
|
308
|
-
export const ORDERED_LIST_STYLE_TYPE = {
|
|
309
|
-
decimal: 'decimal', // 1, 2, 3, ...
|
|
310
|
-
lowerAlpha: 'lower-alpha', // a, b, c, ...
|
|
311
|
-
upperAlpha: 'upper-alpha', // A, B, C, ...
|
|
312
|
-
lowerRoman: 'lower-roman', // i, ii, iii, ...
|
|
313
|
-
upperRoman: 'upper-roman', // I, II, III, ...
|
|
314
|
-
lowerGreek: 'lower-greek', // α, β, γ, ...
|
|
315
|
-
decimalLeadingZero: 'decimal-leading-zero', // 01, 02, 03, ...
|
|
316
|
-
};
|
|
317
|
-
export const UNORDERED_LIST_STYLE_TYPE = {
|
|
318
|
-
disc: 'disc', // •
|
|
319
|
-
circle: 'circle', // ○
|
|
320
|
-
square: 'square', // ■
|
|
321
|
-
custom: 'custom',
|
|
322
|
-
};
|
|
323
|
-
export const CUSTOM_LINK_EXTENSION_NAME = 'custom_link';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Extension } from '@tiptap/core';
|
|
2
|
-
export type BackgroundColorOptions = {
|
|
3
|
-
/**
|
|
4
|
-
* The types where the color can be applied
|
|
5
|
-
* @default ['textStyle']
|
|
6
|
-
* @example ['heading', 'paragraph']
|
|
7
|
-
*/
|
|
8
|
-
types: string[];
|
|
9
|
-
defaultBackgroundColor: string;
|
|
10
|
-
};
|
|
11
|
-
declare module '@tiptap/core' {
|
|
12
|
-
interface Commands<ReturnType> {
|
|
13
|
-
backgroundColor: {
|
|
14
|
-
/**
|
|
15
|
-
* Set the background color
|
|
16
|
-
*/
|
|
17
|
-
setBackgroundColor: (color: string) => ReturnType;
|
|
18
|
-
/**
|
|
19
|
-
* Unset the background color
|
|
20
|
-
*/
|
|
21
|
-
unsetBackgroundColor: () => ReturnType;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export declare const BackgroundColor: Extension<BackgroundColorOptions, any>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Extension } from '@tiptap/core';
|
|
2
|
-
import { DEFAULT_TEXT_STYLE } from '../constants';
|
|
3
|
-
import tinycolor from 'tinycolor2';
|
|
4
|
-
export const BackgroundColor = Extension.create({
|
|
5
|
-
name: 'backgroundColor',
|
|
6
|
-
addOptions() {
|
|
7
|
-
return {
|
|
8
|
-
types: ['textStyle'],
|
|
9
|
-
defaultBackgroundColor: DEFAULT_TEXT_STYLE.backgroundColor,
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
addGlobalAttributes() {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
types: this.options.types,
|
|
16
|
-
attributes: {
|
|
17
|
-
backgroundColor: {
|
|
18
|
-
default: this.options.defaultBackgroundColor,
|
|
19
|
-
parseHTML: element => element.style.backgroundColor?.replace(/['"]+/g, ''),
|
|
20
|
-
renderHTML: attributes => {
|
|
21
|
-
if (!tinycolor(attributes.backgroundColor).isValid()) {
|
|
22
|
-
return {};
|
|
23
|
-
}
|
|
24
|
-
const hexBgColor = tinycolor(attributes.backgroundColor).toString('hex');
|
|
25
|
-
return {
|
|
26
|
-
style: `
|
|
27
|
-
--text-style-bg-color: ${hexBgColor};
|
|
28
|
-
background-color: ${hexBgColor};
|
|
29
|
-
`,
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
];
|
|
36
|
-
},
|
|
37
|
-
addCommands() {
|
|
38
|
-
return {
|
|
39
|
-
setBackgroundColor: color => ({ chain }) => chain().setMark('textStyle', { backgroundColor: color }).run(),
|
|
40
|
-
unsetBackgroundColor: () => ({ chain }) => chain()
|
|
41
|
-
.setMark('textStyle', { backgroundColor: this.options.defaultBackgroundColor || null })
|
|
42
|
-
.removeEmptyTextStyle()
|
|
43
|
-
.run(),
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
});
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { arrow, autoPlacement, flip, hide, inline, offset, shift, size } from '@floating-ui/dom';
|
|
2
|
-
import type { Editor } from '@tiptap/core';
|
|
3
|
-
import type { EditorState, PluginView } from '@tiptap/pm/state';
|
|
4
|
-
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
|
5
|
-
import type { EditorView } from '@tiptap/pm/view';
|
|
6
|
-
export interface BubbleMenuPluginProps {
|
|
7
|
-
/**
|
|
8
|
-
* The plugin key.
|
|
9
|
-
* @type {PluginKey | string}
|
|
10
|
-
* @default 'bubbleMenu'
|
|
11
|
-
*/
|
|
12
|
-
pluginKey: PluginKey | string;
|
|
13
|
-
/**
|
|
14
|
-
* The editor instance.
|
|
15
|
-
*/
|
|
16
|
-
editor: Editor;
|
|
17
|
-
/**
|
|
18
|
-
* The DOM element that contains your menu.
|
|
19
|
-
* @type {HTMLElement}
|
|
20
|
-
* @default null
|
|
21
|
-
*/
|
|
22
|
-
element: HTMLElement;
|
|
23
|
-
container?: HTMLElement | (() => HTMLElement) | null;
|
|
24
|
-
/**
|
|
25
|
-
* The delay in milliseconds before the menu should be updated.
|
|
26
|
-
* This can be useful to prevent performance issues.
|
|
27
|
-
* @type {number}
|
|
28
|
-
* @default 250
|
|
29
|
-
*/
|
|
30
|
-
updateDelay?: number;
|
|
31
|
-
/**
|
|
32
|
-
* The delay in milliseconds before the menu position should be updated on window resize.
|
|
33
|
-
* This can be useful to prevent performance issues.
|
|
34
|
-
* @type {number}
|
|
35
|
-
* @default 60
|
|
36
|
-
*/
|
|
37
|
-
resizeDelay?: number;
|
|
38
|
-
/**
|
|
39
|
-
* A function that determines whether the menu should be shown or not.
|
|
40
|
-
* If this function returns `false`, the menu will be hidden, otherwise it will be shown.
|
|
41
|
-
*/
|
|
42
|
-
shouldShow?: ((props: {
|
|
43
|
-
editor: Editor;
|
|
44
|
-
element: HTMLElement;
|
|
45
|
-
view: EditorView;
|
|
46
|
-
state: EditorState;
|
|
47
|
-
oldState?: EditorState;
|
|
48
|
-
from: number;
|
|
49
|
-
to: number;
|
|
50
|
-
}) => boolean) | null;
|
|
51
|
-
/**
|
|
52
|
-
* The options for the bubble menu. Those are passed to Floating UI and include options for the placement, offset, flip, shift, arrow, size, autoPlacement,
|
|
53
|
-
* hide, and inline middlewares.
|
|
54
|
-
* @default {}
|
|
55
|
-
* @see https://floating-ui.com/docs/computePosition#options
|
|
56
|
-
*/
|
|
57
|
-
options?: {
|
|
58
|
-
strategy?: 'absolute' | 'fixed';
|
|
59
|
-
placement?: 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end';
|
|
60
|
-
offset?: Parameters<typeof offset>[0] | boolean;
|
|
61
|
-
flip?: Parameters<typeof flip>[0] | boolean;
|
|
62
|
-
shift?: Parameters<typeof shift>[0] | boolean;
|
|
63
|
-
arrow?: Parameters<typeof arrow>[0] | false;
|
|
64
|
-
size?: Parameters<typeof size>[0] | boolean;
|
|
65
|
-
autoPlacement?: Parameters<typeof autoPlacement>[0] | boolean;
|
|
66
|
-
hide?: Parameters<typeof hide>[0] | boolean;
|
|
67
|
-
inline?: Parameters<typeof inline>[0] | boolean;
|
|
68
|
-
onShow?: () => void;
|
|
69
|
-
onHide?: () => void;
|
|
70
|
-
onUpdate?: () => void;
|
|
71
|
-
onDestroy?: () => void;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
export type BubbleMenuViewProps = BubbleMenuPluginProps & {
|
|
75
|
-
view: EditorView;
|
|
76
|
-
};
|
|
77
|
-
export declare class BubbleMenuView implements PluginView {
|
|
78
|
-
editor: Editor;
|
|
79
|
-
element: HTMLElement;
|
|
80
|
-
container?: HTMLElement | (() => HTMLElement) | null;
|
|
81
|
-
view: EditorView;
|
|
82
|
-
preventHide: boolean;
|
|
83
|
-
updateDelay: number;
|
|
84
|
-
resizeDelay: number;
|
|
85
|
-
private updateDebounceTimer;
|
|
86
|
-
private resizeDebounceTimer;
|
|
87
|
-
private resizeObserver;
|
|
88
|
-
private isVisible;
|
|
89
|
-
private floatingUIOptions;
|
|
90
|
-
shouldShow: Exclude<BubbleMenuPluginProps['shouldShow'], null>;
|
|
91
|
-
get middlewares(): {
|
|
92
|
-
name: string;
|
|
93
|
-
options?: any;
|
|
94
|
-
fn: (state: {
|
|
95
|
-
x: number;
|
|
96
|
-
y: number;
|
|
97
|
-
platform: import("@floating-ui/core").Platform;
|
|
98
|
-
placement: import("@floating-ui/utils").Placement;
|
|
99
|
-
initialPlacement: import("@floating-ui/utils").Placement;
|
|
100
|
-
strategy: import("@floating-ui/utils").Strategy;
|
|
101
|
-
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
102
|
-
rects: import("@floating-ui/utils").ElementRects;
|
|
103
|
-
elements: import("@floating-ui/dom").Elements;
|
|
104
|
-
}) => import("@floating-ui/core").MiddlewareReturn | Promise<import("@floating-ui/core").MiddlewareReturn>;
|
|
105
|
-
}[];
|
|
106
|
-
constructor({ editor, element, view, updateDelay, resizeDelay, container, shouldShow, options, }: BubbleMenuViewProps);
|
|
107
|
-
mousedownHandler: () => void;
|
|
108
|
-
dragstartHandler: () => void;
|
|
109
|
-
/**
|
|
110
|
-
* Handles the window resize event and element resize event to update the position of the bubble menu.
|
|
111
|
-
* It uses a debounce mechanism to prevent excessive updates.
|
|
112
|
-
* The delay is defined by the `resizeDelay` property.
|
|
113
|
-
*/
|
|
114
|
-
resizeHandler: (delay?: number) => void;
|
|
115
|
-
/**
|
|
116
|
-
* Window resize handler that uses the default resize delay.
|
|
117
|
-
* This is a separate function to maintain the same reference for addEventListener/removeEventListener.
|
|
118
|
-
*/
|
|
119
|
-
windowResizeHandler: () => void;
|
|
120
|
-
/**
|
|
121
|
-
* Sets up ResizeObserver to watch for bubble menu element size changes.
|
|
122
|
-
* This ensures the bubble menu position is updated when the element resizes
|
|
123
|
-
* due to React component rendering different children, not just when the window resizes.
|
|
124
|
-
*/
|
|
125
|
-
setupResizeObserver: () => void;
|
|
126
|
-
focusHandler: () => void;
|
|
127
|
-
blurHandler: ({ event }: {
|
|
128
|
-
event: FocusEvent;
|
|
129
|
-
}) => void;
|
|
130
|
-
updatePosition(): void;
|
|
131
|
-
update(view: EditorView, oldState?: EditorState): void;
|
|
132
|
-
handleDebouncedUpdate: (view: EditorView, oldState?: EditorState) => void;
|
|
133
|
-
getShouldShow(oldState?: EditorState): boolean | undefined;
|
|
134
|
-
updateHandler: (view: EditorView, selectionChanged: boolean, docChanged: boolean, oldState?: EditorState) => void;
|
|
135
|
-
private getContainer;
|
|
136
|
-
show(): void;
|
|
137
|
-
hide(): void;
|
|
138
|
-
destroy(): void;
|
|
139
|
-
}
|
|
140
|
-
export declare const BubbleMenuPlugin: (options: BubbleMenuPluginProps) => Plugin<any>;
|