@atlaskit/editor-core 181.0.1 → 182.0.1
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/CHANGELOG.md +46 -0
- package/codemods/140.0.0-rc-kraken-fix-type-errors.ts +0 -2
- package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +0 -17
- package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +0 -4
- package/dist/cjs/create-editor/sort-by-order.js +12 -0
- package/dist/cjs/editor-next/editor-migration-component.js +4 -1
- package/dist/cjs/editor-next/utils/deprecationWarnings.js +0 -5
- package/dist/cjs/labs/next/full-page.js +2 -1
- package/dist/cjs/labs/next/presets/default.js +2 -1
- package/dist/cjs/labs/next/presets/universal.js +7 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +2 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +4 -7
- package/dist/cjs/plugins/analytics/plugin.js +6 -6
- package/dist/cjs/plugins/avatar-group/index.js +5 -2
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -2
- package/dist/cjs/plugins/base/index.js +4 -2
- package/dist/cjs/plugins/base/pm-plugins/disable-spell-checking.js +1 -3
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -6
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +2 -8
- package/dist/cjs/plugins/border/index.js +20 -0
- package/dist/cjs/plugins/card/index.js +4 -2
- package/dist/cjs/plugins/card/toolbar.js +12 -15
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +7 -3
- package/dist/cjs/plugins/code-block/toolbar.js +1 -1
- package/dist/cjs/plugins/collab-edit/analytics.js +2 -3
- package/dist/cjs/plugins/collab-edit/events/handlers.js +2 -2
- package/dist/cjs/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/cjs/plugins/collab-edit/index.js +5 -3
- package/dist/cjs/plugins/collab-edit/plugin.js +4 -3
- package/dist/cjs/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +2 -3
- package/dist/cjs/plugins/date/index.js +90 -64
- package/dist/cjs/plugins/editor-disabled/index.js +8 -0
- package/dist/cjs/plugins/expand/index.js +4 -1
- package/dist/cjs/plugins/expand/nodeviews/index.js +6 -7
- package/dist/cjs/plugins/expand/pm-plugins/main.js +5 -2
- package/dist/cjs/plugins/extension/extension-api.js +27 -14
- package/dist/cjs/plugins/extension/pm-plugins/main.js +117 -177
- package/dist/cjs/plugins/extension/pm-plugins/utils.js +80 -0
- package/dist/cjs/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +7 -11
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +3 -4
- package/dist/cjs/plugins/find-replace/index.js +5 -2
- package/dist/cjs/plugins/floating-toolbar/index.js +15 -7
- package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +2 -1
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +13 -3
- package/dist/cjs/plugins/floating-toolbar/ui/SimpleModal.js +2 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +6 -5
- package/dist/cjs/plugins/hyperlink/Toolbar.js +9 -12
- package/dist/cjs/plugins/hyperlink/index.js +6 -2
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -4
- package/dist/cjs/plugins/index.js +7 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
- package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +5 -5
- package/dist/cjs/plugins/list/commands/index.js +31 -27
- package/dist/cjs/plugins/list/commands/outdent-list.js +2 -3
- package/dist/cjs/plugins/list/index.js +4 -3
- package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +3 -1
- package/dist/cjs/plugins/list/pm-plugins/input-rules/index.js +2 -1
- package/dist/cjs/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +58 -0
- package/dist/cjs/plugins/list/pm-plugins/keymap.js +4 -4
- package/dist/cjs/plugins/list/pm-plugins/main.js +23 -21
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -1
- package/dist/cjs/plugins/media/nodeviews/styles.js +13 -1
- package/dist/cjs/plugins/media/toolbar/commands.js +105 -2
- package/dist/cjs/plugins/media/toolbar/imageBorder.js +20 -0
- package/dist/cjs/plugins/media/toolbar/index.js +33 -4
- package/dist/cjs/plugins/media/ui/ImageBorder/index.js +219 -0
- package/dist/cjs/plugins/media/ui/ImageBorder/messages.js +50 -0
- package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +54 -0
- package/dist/cjs/plugins/media/utils/current-media-node.js +28 -5
- package/dist/cjs/plugins/paste/util/index.js +2 -0
- package/dist/cjs/plugins/rank.js +1 -1
- package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +5 -0
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +2 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +3 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +2 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +6 -3
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +3 -2
- package/dist/cjs/test-utils.js +3 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +4 -2
- package/dist/cjs/ui/styles.js +1 -1
- package/dist/cjs/utils/input-rules.js +0 -17
- package/dist/cjs/utils/insert.js +53 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/sort-by-order.js +11 -0
- package/dist/es2019/editor-next/editor-migration-component.js +4 -1
- package/dist/es2019/editor-next/utils/deprecationWarnings.js +0 -5
- package/dist/es2019/labs/next/full-page.js +2 -1
- package/dist/es2019/labs/next/presets/default.js +2 -1
- package/dist/es2019/labs/next/presets/universal.js +8 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +3 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +0 -8
- package/dist/es2019/plugins/analytics/plugin.js +45 -43
- package/dist/es2019/plugins/avatar-group/index.js +26 -21
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -2
- package/dist/es2019/plugins/base/index.js +101 -97
- package/dist/es2019/plugins/base/pm-plugins/disable-spell-checking.js +1 -3
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -6
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +2 -7
- package/dist/es2019/plugins/border/index.js +11 -0
- package/dist/es2019/plugins/card/index.js +4 -2
- package/dist/es2019/plugins/card/toolbar.js +10 -11
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +7 -3
- package/dist/es2019/plugins/code-block/toolbar.js +2 -2
- package/dist/es2019/plugins/collab-edit/analytics.js +2 -3
- package/dist/es2019/plugins/collab-edit/events/handlers.js +2 -2
- package/dist/es2019/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/es2019/plugins/collab-edit/index.js +5 -3
- package/dist/es2019/plugins/collab-edit/plugin.js +4 -3
- package/dist/es2019/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +2 -3
- package/dist/es2019/plugins/date/index.js +92 -64
- package/dist/es2019/plugins/editor-disabled/index.js +8 -0
- package/dist/es2019/plugins/expand/index.js +57 -53
- package/dist/es2019/plugins/expand/nodeviews/index.js +6 -9
- package/dist/es2019/plugins/expand/pm-plugins/main.js +5 -3
- package/dist/es2019/plugins/extension/extension-api.js +31 -13
- package/dist/es2019/plugins/extension/pm-plugins/main.js +77 -96
- package/dist/es2019/plugins/extension/pm-plugins/utils.js +30 -0
- package/dist/es2019/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +1 -8
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +3 -3
- package/dist/es2019/plugins/find-replace/index.js +5 -2
- package/dist/es2019/plugins/floating-toolbar/index.js +159 -149
- package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +4 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +13 -3
- package/dist/es2019/plugins/floating-toolbar/ui/SimpleModal.js +4 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +6 -5
- package/dist/es2019/plugins/hyperlink/Toolbar.js +7 -9
- package/dist/es2019/plugins/hyperlink/index.js +66 -62
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -3
- package/dist/es2019/plugins/index.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
- package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +5 -5
- package/dist/es2019/plugins/list/commands/index.js +4 -4
- package/dist/es2019/plugins/list/commands/outdent-list.js +2 -4
- package/dist/es2019/plugins/list/index.js +80 -77
- package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +3 -1
- package/dist/es2019/plugins/list/pm-plugins/input-rules/index.js +2 -1
- package/dist/es2019/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +52 -0
- package/dist/es2019/plugins/list/pm-plugins/keymap.js +4 -4
- package/dist/es2019/plugins/list/pm-plugins/main.js +46 -46
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +4 -1
- package/dist/es2019/plugins/media/nodeviews/styles.js +12 -1
- package/dist/es2019/plugins/media/toolbar/commands.js +93 -0
- package/dist/es2019/plugins/media/toolbar/imageBorder.js +15 -0
- package/dist/es2019/plugins/media/toolbar/index.js +36 -5
- package/dist/es2019/plugins/media/ui/ImageBorder/index.js +206 -0
- package/dist/es2019/plugins/media/ui/ImageBorder/messages.js +43 -0
- package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +124 -0
- package/dist/es2019/plugins/media/utils/current-media-node.js +22 -3
- package/dist/es2019/plugins/paste/util/index.js +2 -0
- package/dist/es2019/plugins/rank.js +1 -1
- package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +7 -0
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +2 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +59 -55
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +2 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +6 -3
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +3 -2
- package/dist/es2019/test-utils.js +3 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -2
- package/dist/es2019/ui/styles.js +1 -0
- package/dist/es2019/utils/input-rules.js +0 -17
- package/dist/es2019/utils/insert.js +61 -10
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/sort-by-order.js +11 -0
- package/dist/esm/editor-next/editor-migration-component.js +3 -0
- package/dist/esm/editor-next/utils/deprecationWarnings.js +0 -5
- package/dist/esm/labs/next/full-page.js +2 -1
- package/dist/esm/labs/next/presets/default.js +2 -1
- package/dist/esm/labs/next/presets/universal.js +8 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +3 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +3 -5
- package/dist/esm/plugins/analytics/plugin.js +6 -6
- package/dist/esm/plugins/avatar-group/index.js +5 -2
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -2
- package/dist/esm/plugins/base/index.js +4 -2
- package/dist/esm/plugins/base/pm-plugins/disable-spell-checking.js +1 -3
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -6
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +2 -8
- package/dist/esm/plugins/border/index.js +13 -0
- package/dist/esm/plugins/card/index.js +4 -2
- package/dist/esm/plugins/card/toolbar.js +12 -15
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +7 -3
- package/dist/esm/plugins/code-block/toolbar.js +2 -2
- package/dist/esm/plugins/collab-edit/analytics.js +2 -3
- package/dist/esm/plugins/collab-edit/events/handlers.js +2 -2
- package/dist/esm/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/esm/plugins/collab-edit/index.js +5 -3
- package/dist/esm/plugins/collab-edit/plugin.js +4 -3
- package/dist/esm/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/esm/plugins/collab-edit/ui/avatars.js +2 -3
- package/dist/esm/plugins/date/index.js +90 -64
- package/dist/esm/plugins/editor-disabled/index.js +8 -0
- package/dist/esm/plugins/expand/index.js +4 -1
- package/dist/esm/plugins/expand/nodeviews/index.js +6 -7
- package/dist/esm/plugins/expand/pm-plugins/main.js +5 -2
- package/dist/esm/plugins/extension/extension-api.js +24 -12
- package/dist/esm/plugins/extension/pm-plugins/main.js +113 -173
- package/dist/esm/plugins/extension/pm-plugins/utils.js +72 -0
- package/dist/esm/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +1 -10
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +3 -4
- package/dist/esm/plugins/find-replace/index.js +5 -2
- package/dist/esm/plugins/floating-toolbar/index.js +15 -7
- package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +13 -3
- package/dist/esm/plugins/floating-toolbar/ui/SimpleModal.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +6 -5
- package/dist/esm/plugins/hyperlink/Toolbar.js +9 -13
- package/dist/esm/plugins/hyperlink/index.js +6 -2
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -4
- package/dist/esm/plugins/index.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
- package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +5 -5
- package/dist/esm/plugins/list/commands/index.js +31 -27
- package/dist/esm/plugins/list/commands/outdent-list.js +2 -3
- package/dist/esm/plugins/list/index.js +4 -3
- package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +3 -1
- package/dist/esm/plugins/list/pm-plugins/input-rules/index.js +2 -1
- package/dist/esm/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +51 -0
- package/dist/esm/plugins/list/pm-plugins/keymap.js +4 -4
- package/dist/esm/plugins/list/pm-plugins/main.js +23 -21
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +6 -1
- package/dist/esm/plugins/media/nodeviews/styles.js +13 -1
- package/dist/esm/plugins/media/toolbar/commands.js +99 -0
- package/dist/esm/plugins/media/toolbar/imageBorder.js +14 -0
- package/dist/esm/plugins/media/toolbar/index.js +34 -5
- package/dist/esm/plugins/media/ui/ImageBorder/index.js +211 -0
- package/dist/esm/plugins/media/ui/ImageBorder/messages.js +43 -0
- package/dist/esm/plugins/media/ui/ImageBorder/styles.js +37 -0
- package/dist/esm/plugins/media/utils/current-media-node.js +24 -3
- package/dist/esm/plugins/paste/util/index.js +2 -0
- package/dist/esm/plugins/rank.js +1 -1
- package/dist/esm/plugins/rule/pm-plugins/input-rule.js +5 -0
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +2 -1
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +3 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +2 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +6 -3
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +3 -2
- package/dist/esm/test-utils.js +3 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -2
- package/dist/esm/ui/styles.js +1 -1
- package/dist/esm/utils/input-rules.js +0 -17
- package/dist/esm/utils/insert.js +56 -10
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/sort-by-order.d.ts +9 -0
- package/dist/types/editor-next/editor-migration-component.d.ts +1 -0
- package/dist/types/labs/next/presets/cxhtml.d.ts +36 -2
- package/dist/types/labs/next/presets/default.d.ts +72 -4
- package/dist/types/labs/next/presets/mobile.d.ts +36 -2
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/styles.d.ts +0 -1
- package/dist/types/plugins/analytics/plugin.d.ts +2 -0
- package/dist/types/plugins/avatar-group/index.d.ts +2 -0
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +2 -0
- package/dist/types/plugins/base/index.d.ts +2 -0
- package/dist/types/plugins/base/pm-plugins/disable-spell-checking.d.ts +2 -1
- package/dist/types/plugins/border/index.d.ts +3 -0
- package/dist/types/plugins/card/index.d.ts +2 -0
- package/dist/types/plugins/card/toolbar.d.ts +2 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +5 -2
- package/dist/types/plugins/collab-edit/analytics.d.ts +2 -1
- package/dist/types/plugins/collab-edit/events/handlers.d.ts +2 -1
- package/dist/types/plugins/collab-edit/events/initialize.d.ts +3 -1
- package/dist/types/plugins/collab-edit/index.d.ts +2 -0
- package/dist/types/plugins/collab-edit/plugin.d.ts +2 -1
- package/dist/types/plugins/collab-edit/ui/avatars-with-plugin-state.d.ts +4 -0
- package/dist/types/plugins/collab-edit/ui/avatars.d.ts +2 -0
- package/dist/types/plugins/date/index.d.ts +9 -1
- package/dist/types/plugins/editor-disabled/index.d.ts +3 -1
- package/dist/types/plugins/expand/index.d.ts +2 -0
- package/dist/types/plugins/expand/nodeviews/index.d.ts +5 -2
- package/dist/types/plugins/expand/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +8 -2
- package/dist/types/plugins/extension/pm-plugins/utils.d.ts +3 -0
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -7
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +2 -0
- package/dist/types/plugins/find-replace/index.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/index.d.ts +4 -1
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +2 -0
- package/dist/types/plugins/hyperlink/Toolbar.d.ts +2 -1
- package/dist/types/plugins/hyperlink/index.d.ts +2 -0
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +2 -0
- package/dist/types/plugins/index.d.ts +1 -0
- package/dist/types/plugins/list/actions/outdent-list-items-selected.d.ts +2 -1
- package/dist/types/plugins/list/commands/index.d.ts +3 -2
- package/dist/types/plugins/list/commands/outdent-list.d.ts +2 -1
- package/dist/types/plugins/list/index.d.ts +2 -0
- package/dist/types/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +1 -1
- package/dist/types/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +13 -0
- package/dist/types/plugins/list/pm-plugins/keymap.d.ts +2 -1
- package/dist/types/plugins/list/pm-plugins/main.d.ts +3 -2
- package/dist/types/plugins/media/nodeviews/styles.d.ts +3 -1
- package/dist/types/plugins/media/toolbar/commands.d.ts +5 -0
- package/dist/types/plugins/media/toolbar/imageBorder.d.ts +2 -0
- package/dist/types/plugins/media/types.d.ts +3 -0
- package/dist/types/plugins/media/ui/ImageBorder/index.d.ts +13 -0
- package/dist/types/plugins/media/ui/ImageBorder/messages.d.ts +42 -0
- package/dist/types/plugins/media/ui/ImageBorder/styles.d.ts +15 -0
- package/dist/types/plugins/media/utils/current-media-node.d.ts +6 -0
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +0 -2
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +2 -0
- package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +2 -0
- package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +2 -0
- package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +3 -1
- package/dist/types/test-utils.d.ts +4 -2
- package/dist/types/types/editor-props.d.ts +5 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +5 -5
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +12 -11
- package/report.api.md +12 -4
- package/codemods/__tests__/rename-experimental-text-color-prop.ts +0 -204
- package/codemods/migrates/rename-experimental-text-color-prop.ts +0 -6
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.toolbarButtonWrapper = exports.menuItemDimensions = exports.line = exports.itemSpacing = exports.contextualSubMenu = exports.contextualMenuColorIcon = exports.contextualMenuArrow = exports.buttonWrapperStyle = exports.buttonStyle = void 0;
|
|
9
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
|
+
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
12
|
+
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
13
|
+
var _constants = require("@atlaskit/theme/constants");
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
// menuItemDimensions and itemSpacing are copied from
|
|
18
|
+
// packages/editor/editor-core/src/plugins/floating-toolbar/ui/DropdownMenu.tsx
|
|
19
|
+
|
|
20
|
+
var menuItemDimensions = {
|
|
21
|
+
width: 175,
|
|
22
|
+
height: 32
|
|
23
|
+
};
|
|
24
|
+
exports.menuItemDimensions = menuItemDimensions;
|
|
25
|
+
var itemSpacing = (0, _constants.gridSize)() / 2;
|
|
26
|
+
exports.itemSpacing = itemSpacing;
|
|
27
|
+
var contextualMenuArrow = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n &::after {\n content: '\u203A';\n margin-left: 4px;\n line-height: 20px;\n color: ", ";\n }\n"])), "var(--ds-icon, ".concat(colors.N90, ")"));
|
|
28
|
+
exports.contextualMenuArrow = contextualMenuArrow;
|
|
29
|
+
var contextualMenuColorIcon = function contextualMenuColorIcon(color) {
|
|
30
|
+
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n &::before {\n content: '';\n display: block;\n border: 1px solid ", ";\n border-radius: ", ";\n width: 20px;\n height: 20px;\n ", "\n }\n"])), contextualMenuArrow, _uiColor.DEFAULT_BORDER_COLOR, "var(--ds-radius-100, 3px)", color && "background: ".concat(color));
|
|
31
|
+
};
|
|
32
|
+
exports.contextualMenuColorIcon = contextualMenuColorIcon;
|
|
33
|
+
var contextualSubMenu = function contextualSubMenu(index) {
|
|
34
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n display: flex;\n position: absolute;\n top: ", "px;\n left: ", "px;\n padding: 8px;\n\n > div {\n padding: 0;\n }\n"])), "var(--ds-radius-100, 3px)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(colors.N60A, ", 0 0 1px ").concat(colors.N60A), ")"), index * (menuItemDimensions.height + itemSpacing * 2), menuItemDimensions.width);
|
|
35
|
+
};
|
|
36
|
+
exports.contextualSubMenu = contextualSubMenu;
|
|
37
|
+
var buttonStyle = function buttonStyle(selected) {
|
|
38
|
+
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 26px;\n width: 26px;\n padding: 0;\n border-radius: 4px;\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n display: block;\n"])), selected ? "var(--ds-text, ".concat(colors.N800, ")") : "var(--ds-background-neutral, ".concat(colors.N20A, ")"), _uiColor.DEFAULT_BORDER_COLOR);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
42
|
+
exports.buttonStyle = buttonStyle;
|
|
43
|
+
var buttonWrapperStyle = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid transparent;\n margin: 1px;\n font-size: 0;\n display: flex;\n align-items: center;\n padding: 1px;\n border-radius: 6px;\n &:focus-within,\n &:focus,\n &:hover {\n border-color: ", " !important;\n }\n"])), colors.N50);
|
|
44
|
+
exports.buttonWrapperStyle = buttonWrapperStyle;
|
|
45
|
+
var line = function line(size, selected) {
|
|
46
|
+
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n &:before {\n content: '';\n display: block;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 12px;\n height: ", "px;\n background-color: ", ";\n border-radius: 90px;\n transform: translate(-50%, -50%) rotate(135deg);\n }\n"])), size, selected ? "var(--ds-icon-inverse, ".concat(colors.N0, ")") : "var(--ds-icon, #44546F)");
|
|
47
|
+
};
|
|
48
|
+
exports.line = line;
|
|
49
|
+
var toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
|
|
50
|
+
var enabled = _ref.enabled,
|
|
51
|
+
isOpen = _ref.isOpen;
|
|
52
|
+
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
|
|
53
|
+
};
|
|
54
|
+
exports.toolbarButtonWrapper = toolbarButtonWrapper;
|
|
@@ -3,19 +3,42 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.currentMediaNode = void 0;
|
|
6
|
+
exports.currentMediaNodeWithPos = exports.currentMediaNodeBorderMark = exports.currentMediaNode = void 0;
|
|
7
7
|
var _prosemirrorState = require("prosemirror-state");
|
|
8
|
-
var
|
|
8
|
+
var currentMediaNodeWithPos = function currentMediaNodeWithPos(editorState) {
|
|
9
9
|
var doc = editorState.doc,
|
|
10
10
|
selection = editorState.selection,
|
|
11
11
|
schema = editorState.schema;
|
|
12
12
|
if (!doc || !selection || !(selection instanceof _prosemirrorState.NodeSelection) || selection.node.type !== schema.nodes.mediaSingle) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
var
|
|
15
|
+
var pos = selection.$anchor.pos + 1;
|
|
16
|
+
var node = doc.nodeAt(pos);
|
|
16
17
|
if (!node || node.type !== schema.nodes.media) {
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
node: node,
|
|
22
|
+
pos: pos
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
exports.currentMediaNodeWithPos = currentMediaNodeWithPos;
|
|
26
|
+
var currentMediaNode = function currentMediaNode(editorState) {
|
|
27
|
+
var _currentMediaNodeWith;
|
|
28
|
+
return (_currentMediaNodeWith = currentMediaNodeWithPos(editorState)) === null || _currentMediaNodeWith === void 0 ? void 0 : _currentMediaNodeWith.node;
|
|
29
|
+
};
|
|
30
|
+
exports.currentMediaNode = currentMediaNode;
|
|
31
|
+
var currentMediaNodeBorderMark = function currentMediaNodeBorderMark(editorState) {
|
|
32
|
+
var node = currentMediaNode(editorState);
|
|
33
|
+
if (!node) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
var borderMark = node.marks.find(function (m) {
|
|
37
|
+
return m.type.name === 'border';
|
|
38
|
+
});
|
|
39
|
+
if (!borderMark) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
return borderMark.attrs;
|
|
20
43
|
};
|
|
21
|
-
exports.
|
|
44
|
+
exports.currentMediaNodeBorderMark = currentMediaNodeBorderMark;
|
|
@@ -25,6 +25,7 @@ var _analytics = require("../../analytics");
|
|
|
25
25
|
var _prosemirrorState = require("prosemirror-state");
|
|
26
26
|
var _prosemirrorUtils = require("prosemirror-utils");
|
|
27
27
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
28
|
+
var _sortByOrder = require("../../../create-editor/sort-by-order");
|
|
28
29
|
function isPastedFromWord(html) {
|
|
29
30
|
return !!html && html.indexOf('urn:schemas-microsoft-com:office:word') >= 0;
|
|
30
31
|
}
|
|
@@ -113,6 +114,7 @@ function applyTextMarksToSlice(schema, marks) {
|
|
|
113
114
|
}) || []), (0, _toConsumableArray2.default)(parent.type.allowedMarks(marks).filter(function (mark) {
|
|
114
115
|
return mark.type !== linkMark;
|
|
115
116
|
})));
|
|
117
|
+
node.marks.sort((0, _sortByOrder.sortByOrderWithTypeName)('marks'));
|
|
116
118
|
return false;
|
|
117
119
|
}
|
|
118
120
|
return true;
|
package/dist/cjs/plugins/rank.js
CHANGED
|
@@ -27,7 +27,7 @@ var _default = {
|
|
|
27
27
|
// Inline marks
|
|
28
28
|
'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'typeAheadQuery',
|
|
29
29
|
// Block marks
|
|
30
|
-
'alignment', 'breakout', 'indentation', 'annotation', 'dataConsumer',
|
|
30
|
+
'alignment', 'breakout', 'indentation', 'annotation', 'dataConsumer', 'border',
|
|
31
31
|
// Unsupported mark
|
|
32
32
|
'unsupportedMark', 'unsupportedNodeAttribute']
|
|
33
33
|
};
|
|
@@ -9,6 +9,7 @@ var _prosemirrorModel = require("prosemirror-model");
|
|
|
9
9
|
var _inputRules = require("../../../utils/input-rules");
|
|
10
10
|
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
11
11
|
var _insert = require("../../../utils/insert");
|
|
12
|
+
var _prosemirrorUtils = require("prosemirror-utils");
|
|
12
13
|
var _analytics = require("../../analytics");
|
|
13
14
|
var _featureFlagsContext = require("../../feature-flags-context");
|
|
14
15
|
var createHorizontalRule = function createHorizontalRule(state, start, end, inputMethod) {
|
|
@@ -43,6 +44,10 @@ var createHorizontalRule = function createHorizontalRule(state, start, end, inpu
|
|
|
43
44
|
};
|
|
44
45
|
exports.createHorizontalRule = createHorizontalRule;
|
|
45
46
|
var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, start, end) {
|
|
47
|
+
var listItem = state.schema.nodes.listItem;
|
|
48
|
+
if ((0, _prosemirrorUtils.hasParentNodeOfType)(listItem)(state.selection)) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
46
51
|
return createHorizontalRule(state, start, end, _analytics.INPUT_METHOD.FORMATTING);
|
|
47
52
|
};
|
|
48
53
|
function inputRulePlugin(schema, featureFlags) {
|
|
@@ -42,7 +42,8 @@ var useClearIcon = function useClearIcon(_ref) {
|
|
|
42
42
|
name: 'clearFormatting'
|
|
43
43
|
},
|
|
44
44
|
isActive: false,
|
|
45
|
-
isDisabled: !formattingIsPresent
|
|
45
|
+
isDisabled: !formattingIsPresent,
|
|
46
|
+
'aria-label': _keymaps.clearFormatting ? (0, _keymaps.tooltip)(_keymaps.clearFormatting, String(clearFormattingLabel)) : String(clearFormattingLabel)
|
|
46
47
|
};
|
|
47
48
|
}, [clearFormattingLabel, isPluginAvailable, formattingIsPresent]);
|
|
48
49
|
};
|
|
@@ -11,9 +11,10 @@ var _WithPluginState = _interopRequireDefault(require("../../ui/WithPluginState"
|
|
|
11
11
|
var _types = require("../../ui/Toolbar/types");
|
|
12
12
|
var _main = require("../list/pm-plugins/main");
|
|
13
13
|
var _indentationButtons = require("./pm-plugins/indentation-buttons");
|
|
14
|
-
var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref) {
|
|
14
|
+
var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref, api) {
|
|
15
15
|
var showIndentationButtons = _ref.showIndentationButtons,
|
|
16
16
|
allowHeadingAndParagraphIndentation = _ref.allowHeadingAndParagraphIndentation;
|
|
17
|
+
var featureFlags = (api === null || api === void 0 ? void 0 : api.dependencies.featureFlags.sharedState.currentState()) || {};
|
|
17
18
|
return {
|
|
18
19
|
name: 'toolbarListsIndentation',
|
|
19
20
|
pmPlugins: function pmPlugins() {
|
|
@@ -50,6 +51,7 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref)
|
|
|
50
51
|
return null;
|
|
51
52
|
}
|
|
52
53
|
return /*#__PURE__*/_react.default.createElement(_ui.default, {
|
|
54
|
+
featureFlags: featureFlags,
|
|
53
55
|
isSmall: isSmall,
|
|
54
56
|
isReducedSpacing: isToolbarReducedSpacing,
|
|
55
57
|
disabled: disabled,
|
|
@@ -62,7 +62,8 @@ function ToolbarDropdown(props) {
|
|
|
62
62
|
setIsDropdownOpen(!shouldCloseMenu);
|
|
63
63
|
return onItemActivated({
|
|
64
64
|
editorView: props.editorView,
|
|
65
|
-
buttonName: item.value.name
|
|
65
|
+
buttonName: item.value.name,
|
|
66
|
+
featureFlags: props.featureFlags
|
|
66
67
|
});
|
|
67
68
|
};
|
|
68
69
|
return (0, _react.jsx)("span", {
|
|
@@ -23,7 +23,8 @@ function ToolbarListsIndentation(props) {
|
|
|
23
23
|
popupsBoundariesElement = props.popupsBoundariesElement,
|
|
24
24
|
popupsScrollableElement = props.popupsScrollableElement,
|
|
25
25
|
indentDisabled = props.indentDisabled,
|
|
26
|
-
outdentDisabled = props.outdentDisabled
|
|
26
|
+
outdentDisabled = props.outdentDisabled,
|
|
27
|
+
featureFlags = props.featureFlags;
|
|
27
28
|
if (isSmall) {
|
|
28
29
|
return (0, _react.jsx)(_ToolbarDropdown.ToolbarDropdown, {
|
|
29
30
|
editorView: props.editorView,
|
|
@@ -39,7 +40,8 @@ function ToolbarListsIndentation(props) {
|
|
|
39
40
|
indentDisabled: indentDisabled,
|
|
40
41
|
outdentDisabled: outdentDisabled,
|
|
41
42
|
disabled: disabled,
|
|
42
|
-
onItemActivated: _onItemActivated.onItemActivated
|
|
43
|
+
onItemActivated: _onItemActivated.onItemActivated,
|
|
44
|
+
featureFlags: featureFlags
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
return (0, _react.jsx)(_Toolbar.Toolbar, {
|
|
@@ -53,6 +55,7 @@ function ToolbarListsIndentation(props) {
|
|
|
53
55
|
indentDisabled: indentDisabled,
|
|
54
56
|
outdentDisabled: outdentDisabled,
|
|
55
57
|
disabled: disabled,
|
|
56
|
-
onItemActivated: _onItemActivated.onItemActivated
|
|
58
|
+
onItemActivated: _onItemActivated.onItemActivated,
|
|
59
|
+
featureFlags: featureFlags
|
|
57
60
|
});
|
|
58
61
|
}
|
|
@@ -11,7 +11,8 @@ var _analytics = require("../../analytics");
|
|
|
11
11
|
var _indentationButtons = require("../pm-plugins/indentation-buttons");
|
|
12
12
|
function onItemActivated(_ref) {
|
|
13
13
|
var buttonName = _ref.buttonName,
|
|
14
|
-
editorView = _ref.editorView
|
|
14
|
+
editorView = _ref.editorView,
|
|
15
|
+
featureFlags = _ref.featureFlags;
|
|
15
16
|
switch (buttonName) {
|
|
16
17
|
case 'bullet_list':
|
|
17
18
|
(0, _commands.toggleBulletList)(editorView, _analytics.INPUT_METHOD.TOOLBAR);
|
|
@@ -40,7 +41,7 @@ function onItemActivated(_ref) {
|
|
|
40
41
|
(0, _commands2.getOutdentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
41
42
|
}
|
|
42
43
|
if (_node === 'list') {
|
|
43
|
-
(0, _commands.outdentList)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
|
44
|
+
(0, _commands.outdentList)(_analytics.INPUT_METHOD.TOOLBAR, featureFlags)(editorView.state, editorView.dispatch);
|
|
44
45
|
}
|
|
45
46
|
if (_node === 'taskList') {
|
|
46
47
|
(0, _keymaps.getUnindentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
|
package/dist/cjs/test-utils.js
CHANGED
|
@@ -104,7 +104,9 @@ var createPMSchemaAndPlugins = function createPMSchemaAndPlugins() {
|
|
|
104
104
|
return function (pluginFactoryParams) {
|
|
105
105
|
var editorPlugins = [];
|
|
106
106
|
var preset = inputPreset.has(_base.default) ? inputPreset : inputPreset.add(_base.default);
|
|
107
|
-
editorPlugins = preset.build(
|
|
107
|
+
editorPlugins = preset.build({
|
|
108
|
+
pluginInjectionAPI: pluginFactoryParams.pluginInjectionAPI
|
|
109
|
+
});
|
|
108
110
|
var editorConfig = lightProcessPluginsList(editorPlugins);
|
|
109
111
|
var schema = (0, _createSchema.createSchema)(editorConfig);
|
|
110
112
|
var plugins = editorConfig.plugins.sort((0, _sortByOrder.sortByOrder)('plugins')).map(function (_ref) {
|
|
@@ -57,14 +57,16 @@ var EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
57
57
|
eventDispatcher: props.eventDispatcher,
|
|
58
58
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
59
59
|
inviteToEditHandler: (_props$collabEdit2 = props.collabEdit) === null || _props$collabEdit2 === void 0 ? void 0 : _props$collabEdit2.inviteToEditHandler,
|
|
60
|
-
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected
|
|
60
|
+
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected,
|
|
61
|
+
featureFlags: props.featureFlags || {}
|
|
61
62
|
}), (_props$featureFlags5 = props.featureFlags) !== null && _props$featureFlags5 !== void 0 && _props$featureFlags5.findReplace && (_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.twoLineEditorToolbar ? (0, _react2.jsx)(_FindReplaceToolbarButtonWithState.default, {
|
|
62
63
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
63
64
|
popupsMountPoint: props.popupsMountPoint,
|
|
64
65
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
65
66
|
editorView: props.editorView,
|
|
66
67
|
containerElement: props.containerElement,
|
|
67
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent
|
|
68
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
69
|
+
featureFlags: props.featureFlags
|
|
68
70
|
}) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
|
|
69
71
|
(0, _react.useEffect)(function () {
|
|
70
72
|
var _props$featureFlags7;
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -27,7 +27,7 @@ var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
|
27
27
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
28
28
|
var buttonGroupStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n\n & > div {\n display: flex;\n }\n"])));
|
|
29
29
|
exports.buttonGroupStyle = buttonGroupStyle;
|
|
30
|
-
var separatorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), "var(--ds-border, ".concat(_colors.N30, ")"));
|
|
30
|
+
var separatorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n user-select: none;\n"])), "var(--ds-border, ".concat(_colors.N30, ")"));
|
|
31
31
|
exports.separatorStyles = separatorStyles;
|
|
32
32
|
var wrapperStyle = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n\n > div,\n > span {\n display: flex;\n }\n\n > div > div {\n display: flex;\n }\n\n margin-left: 0;\n min-width: auto;\n"])));
|
|
33
33
|
exports.wrapperStyle = wrapperStyle;
|
|
@@ -13,8 +13,6 @@ var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
|
13
13
|
var _analytics = require("../plugins/analytics");
|
|
14
14
|
var _analytics2 = require("@atlaskit/editor-common/analytics");
|
|
15
15
|
var _prosemirrorHistory = require("prosemirror-history");
|
|
16
|
-
var _prosemirrorUtils = require("prosemirror-utils");
|
|
17
|
-
var _featureFlagsContext = require("../plugins/feature-flags-context");
|
|
18
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20
18
|
var ruleWithAnalytics = function ruleWithAnalytics(getPayload) {
|
|
@@ -109,21 +107,6 @@ var createWrappingJoinRule = function createWrappingJoinRule(_ref3) {
|
|
|
109
107
|
tr.setNodeMarkup(parentNodePosMapped, parentNode.type, parentNode.attrs, allowedMarks);
|
|
110
108
|
}
|
|
111
109
|
tr.wrap(range, wrapping);
|
|
112
|
-
var featureFlags = (0, _featureFlagsContext.getFeatureFlags)(state);
|
|
113
|
-
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists && nodeType === state.schema.nodes.orderedList) {
|
|
114
|
-
// if an orderedList node would be inserted by the input rule match, and
|
|
115
|
-
// that orderedList node is being added directly before another orderedList
|
|
116
|
-
// node, then join those nodes
|
|
117
|
-
var $end = tr.doc.resolve(tr.mapping.map(end));
|
|
118
|
-
var _node = (0, _prosemirrorUtils.findParentNodeOfTypeClosestToPos)($end, nodeType);
|
|
119
|
-
if (_node) {
|
|
120
|
-
var nodeEnd = _node.pos + _node.node.nodeSize;
|
|
121
|
-
var after = tr.doc.resolve(nodeEnd).nodeAfter;
|
|
122
|
-
if (after && after.type === nodeType && (0, _prosemirrorTransform.canJoin)(tr.doc, nodeEnd) && (!joinPredicate || joinPredicate(match, after, _analytics2.JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST.JOINED_TO_LIST_BELOW))) {
|
|
123
|
-
tr.join(nodeEnd);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
110
|
var before = tr.doc.resolve(fixedStart - 1).nodeBefore;
|
|
128
111
|
if (before && before.type === nodeType && (0, _prosemirrorTransform.canJoin)(tr.doc, fixedStart - 1) && (!joinPredicate || joinPredicate(match, before, _analytics2.JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST.JOINED_TO_LIST_ABOVE))) {
|
|
129
112
|
tr.join(fixedStart - 1);
|
package/dist/cjs/utils/insert.js
CHANGED
|
@@ -11,6 +11,7 @@ var _prosemirrorTransform = require("prosemirror-transform");
|
|
|
11
11
|
var _document = require("./document");
|
|
12
12
|
var _gapCursorSelection = require("../plugins/selection/gap-cursor-selection");
|
|
13
13
|
var _selection = require("./selection");
|
|
14
|
+
var _node = require("../plugins/list/utils/node");
|
|
14
15
|
var LookDirection;
|
|
15
16
|
exports.LookDirection = LookDirection;
|
|
16
17
|
(function (LookDirection) {
|
|
@@ -27,6 +28,18 @@ var nodeIsInsideAList = function nodeIsInsideAList(tr) {
|
|
|
27
28
|
var nodes = tr.doc.type.schema.nodes;
|
|
28
29
|
return (0, _prosemirrorUtils.hasParentNodeOfType)([nodes.orderedList, nodes.bulletList])(tr.selection);
|
|
29
30
|
};
|
|
31
|
+
var selectionIsInsideAPanel = function selectionIsInsideAPanel(tr) {
|
|
32
|
+
var nodes = tr.doc.type.schema.nodes;
|
|
33
|
+
return (0, _prosemirrorUtils.hasParentNodeOfType)(nodes.panel)(tr.selection);
|
|
34
|
+
};
|
|
35
|
+
var selectionIsInNestedList = function selectionIsInNestedList(tr) {
|
|
36
|
+
var nodes = tr.doc.type.schema.nodes;
|
|
37
|
+
var parentListNode = (0, _prosemirrorUtils.findParentNodeOfType)([nodes.orderedList, nodes.bulletList])(tr.selection);
|
|
38
|
+
if (!parentListNode) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return (0, _node.isListItemNode)(tr.doc.resolve(parentListNode.pos).parent);
|
|
42
|
+
};
|
|
30
43
|
var insertBeforeOrAfter = function insertBeforeOrAfter(tr, lookDirection, $parentPos, $proposedPosition, content) {
|
|
31
44
|
/**
|
|
32
45
|
* This block caters for the first item in a parent with the cursor being at the very start
|
|
@@ -54,9 +67,7 @@ var safeInsert = function safeInsert(content, position) {
|
|
|
54
67
|
var _tr$selection$$from$n;
|
|
55
68
|
var nodes = tr.doc.type.schema.nodes;
|
|
56
69
|
var whitelist = [nodes.rule, nodes.mediaSingle];
|
|
57
|
-
|
|
58
|
-
// fallback if the node to insert is not in the whitelist, or if the insertion should happen within a list.
|
|
59
|
-
if (content instanceof _prosemirrorModel.Fragment || !whitelist.includes(content.type) || nodeIsInsideAList(tr)) {
|
|
70
|
+
if (content instanceof _prosemirrorModel.Fragment || !whitelist.includes(content.type)) {
|
|
60
71
|
return null;
|
|
61
72
|
}
|
|
62
73
|
|
|
@@ -88,14 +99,28 @@ var safeInsert = function safeInsert(content, position) {
|
|
|
88
99
|
}
|
|
89
100
|
var grandParentNodeType = (_tr$selection$$from$n = tr.selection.$from.node(-1)) === null || _tr$selection$$from$n === void 0 ? void 0 : _tr$selection$$from$n.type;
|
|
90
101
|
var parentNodeType = tr.selection.$from.parent.type;
|
|
91
|
-
|
|
102
|
+
|
|
103
|
+
// if there is no direction, and cannot split for this particular node
|
|
104
|
+
var noDirectionAndShouldNotSplit = !lookDirection && !shouldSplitSelectedNodeOnNodeInsertion({
|
|
92
105
|
parentNodeType: parentNodeType,
|
|
93
106
|
grandParentNodeType: grandParentNodeType,
|
|
94
107
|
content: content
|
|
95
|
-
})
|
|
108
|
+
});
|
|
109
|
+
var ruleNodeInANestedListNode = content.type === nodes.rule && selectionIsInNestedList(tr);
|
|
110
|
+
var nonRuleNodeInListNode = !(content.type === nodes.rule) && nodeIsInsideAList(tr);
|
|
111
|
+
if (ruleNodeInANestedListNode || noDirectionAndShouldNotSplit && nonRuleNodeInListNode || noDirectionAndShouldNotSplit && !nodeIsInsideAList(tr)) {
|
|
96
112
|
// node to be inserted is an invalid child of selection so insert below selected node
|
|
97
113
|
return (0, _prosemirrorUtils.safeInsert)(content, tr.selection.from)(tr);
|
|
98
114
|
}
|
|
115
|
+
|
|
116
|
+
// if node is a rule and that is a flat list splitting and not at the end of a list
|
|
117
|
+
var _tr$selection = tr.selection,
|
|
118
|
+
from = _tr$selection.from,
|
|
119
|
+
to = _tr$selection.to;
|
|
120
|
+
var ruleTypeInAList = content.type === nodes.rule && nodeIsInsideAList(tr);
|
|
121
|
+
if (ruleTypeInAList && !($insertPos.pos === insertPosEnd)) {
|
|
122
|
+
return tr.replaceRange(from, to, new _prosemirrorModel.Slice(_prosemirrorModel.Fragment.from(nodes.rule.createChecked()), 0, 0));
|
|
123
|
+
}
|
|
99
124
|
if (!lookDirection) {
|
|
100
125
|
// fallback to consumer for now
|
|
101
126
|
return null;
|
|
@@ -117,7 +142,14 @@ var safeInsert = function safeInsert(content, position) {
|
|
|
117
142
|
|
|
118
143
|
// If we can't insert, and we think we should split, we fallback to consumer for now
|
|
119
144
|
if (shouldSplit(parentNode.type, tr.doc.type.schema.nodes)) {
|
|
120
|
-
|
|
145
|
+
var nextTr = finaliseInsert(insertBeforeOrAfter(tr, lookDirection, $parentPos, $proposedPosition, content), content.nodeSize);
|
|
146
|
+
|
|
147
|
+
// Move selection to the closest text node, otherwise it defaults to the whatever the lookDirection is set to above
|
|
148
|
+
if ([nodes.orderedList, nodes.bulletList].includes(parentNode.type) && nextTr) {
|
|
149
|
+
return nextTr.setSelection(_prosemirrorState.TextSelection.between(nextTr.selection.$from, nextTr.selection.$from));
|
|
150
|
+
} else {
|
|
151
|
+
return nextTr;
|
|
152
|
+
}
|
|
121
153
|
}
|
|
122
154
|
|
|
123
155
|
// Can not insert into current parent, step up one parent
|
|
@@ -165,7 +197,21 @@ var insertSelectedItem = function insertSelectedItem(maybeNode) {
|
|
|
165
197
|
*
|
|
166
198
|
*/
|
|
167
199
|
} else if (node.isBlock) {
|
|
168
|
-
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* Rule has unique insertion behaviour
|
|
203
|
+
* so using this safeInsert function in order to handle specific cases in flat list vs nested list
|
|
204
|
+
* instead of a generic pmSafeInsert (i.e appending at the end)
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
|
|
208
|
+
var selectionInsideAPanel = selectionIsInsideAPanel(tr);
|
|
209
|
+
if (node.type.name === 'rule' && !selectionInsideAPanel) {
|
|
210
|
+
var _safeInsert;
|
|
211
|
+
tr = (_safeInsert = safeInsert(node, tr.selection.from)(tr)) !== null && _safeInsert !== void 0 ? _safeInsert : tr;
|
|
212
|
+
} else {
|
|
213
|
+
tr = (0, _prosemirrorUtils.safeInsert)((0, _selection.normaliseNestedLayout)(state, node), undefined, true)(tr);
|
|
214
|
+
}
|
|
169
215
|
|
|
170
216
|
/**
|
|
171
217
|
*
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "182.0.1";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -3,4 +3,15 @@ export function sortByOrder(item) {
|
|
|
3
3
|
return function (a, b) {
|
|
4
4
|
return Ranks[item].indexOf(a.name) - Ranks[item].indexOf(b.name);
|
|
5
5
|
};
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// while functionally the same, in order to avoid potentially rewriting the ~10
|
|
9
|
+
// existing implementations of the above function I decided creating a separate
|
|
10
|
+
// function avoided that whole mess. If someone can think of a better way to implement
|
|
11
|
+
// the above and below into a single function please do so
|
|
12
|
+
|
|
13
|
+
export function sortByOrderWithTypeName(item) {
|
|
14
|
+
return function (a, b) {
|
|
15
|
+
return Ranks[item].indexOf(a.type.name) - Ranks[item].indexOf(b.type.name);
|
|
16
|
+
};
|
|
6
17
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
4
5
|
import Editor from '../editor';
|
|
5
6
|
import EditorNext from './index';
|
|
7
|
+
import { defaultProps } from './utils/editorPropTypes';
|
|
6
8
|
import useUniversalPreset from '../labs/next/presets/useUniversalPreset';
|
|
7
9
|
const EditorNextWrapper = ({
|
|
8
10
|
props
|
|
@@ -24,4 +26,5 @@ export default class EditorMigrationComponent extends React.Component {
|
|
|
24
26
|
props: this.props
|
|
25
27
|
});
|
|
26
28
|
}
|
|
27
|
-
}
|
|
29
|
+
}
|
|
30
|
+
_defineProperty(EditorMigrationComponent, "defaultProps", defaultProps);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { nextMajorVersion } from '../../version-wrapper';
|
|
2
2
|
export default function deprecationWarnings(props) {
|
|
3
|
-
var _props$allowTextColor;
|
|
4
3
|
if (process.env.NODE_ENV === 'production') {
|
|
5
4
|
return;
|
|
6
5
|
}
|
|
@@ -32,8 +31,4 @@ export default function deprecationWarnings(props) {
|
|
|
32
31
|
// eslint-disable-next-line no-console
|
|
33
32
|
console.warn(`Advanced table options are deprecated (except isHeaderRowRequired) to continue using advanced table features use - <Editor allowTables={{ advanced: true }} /> [Will be changed in editor-core@${nextVersion}]`);
|
|
34
33
|
}
|
|
35
|
-
if (props.hasOwnProperty('allowTextColor') && typeof props.allowTextColor !== 'boolean' && (props === null || props === void 0 ? void 0 : (_props$allowTextColor = props.allowTextColor) === null || _props$allowTextColor === void 0 ? void 0 : _props$allowTextColor.allowMoreTextColors) !== undefined) {
|
|
36
|
-
// eslint-disable-next-line no-console
|
|
37
|
-
console.warn(`"allowMoreTextColors" field of "allowTextColor" property is deprecated. It will be removedin editor-core@${nextVersion}. The color palette now shows more colors by default.`);
|
|
38
|
-
}
|
|
39
34
|
}
|
|
@@ -166,7 +166,8 @@ function FullPage(props) {
|
|
|
166
166
|
editorView: config.editorView,
|
|
167
167
|
eventDispatcher: config.eventDispatcher,
|
|
168
168
|
inviteToEditHandler: collabEdit === null || collabEdit === void 0 ? void 0 : collabEdit.inviteToEditHandler,
|
|
169
|
-
isInviteToEditButtonSelected: collabEdit === null || collabEdit === void 0 ? void 0 : collabEdit.isInviteToEditButtonSelected
|
|
169
|
+
isInviteToEditButtonSelected: collabEdit === null || collabEdit === void 0 ? void 0 : collabEdit.isInviteToEditButtonSelected,
|
|
170
|
+
featureFlags: {}
|
|
170
171
|
}), primaryToolbarComponents)), jsx("div", {
|
|
171
172
|
css: contentArea
|
|
172
173
|
}, jsx(ContentStyles, {
|
|
@@ -13,6 +13,7 @@ import typeAheadPlugin from '../../../plugins/type-ahead';
|
|
|
13
13
|
import submitEditorPlugin from '../../../plugins/submit-editor';
|
|
14
14
|
import fakeTextCursorPlugin from '../../../plugins/fake-text-cursor';
|
|
15
15
|
import featureFlagsContextPlugin from '../../../plugins/feature-flags-context';
|
|
16
|
+
import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
16
17
|
import floatingToolbarPlugin from '../../../plugins/floating-toolbar';
|
|
17
18
|
import clipboardPlugin from '../../../plugins/clipboard';
|
|
18
19
|
import placeholderPlugin from '../../../plugins/placeholder';
|
|
@@ -29,7 +30,7 @@ import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
|
29
30
|
* their placement in the editor toolbar
|
|
30
31
|
*/
|
|
31
32
|
export function createDefaultPreset(options) {
|
|
32
|
-
const preset = new EditorPresetBuilder().add([pastePlugin, options.paste]).add(clipboardPlugin).add([basePlugin, options.base]).maybeAdd(undoRedoPlugin, (p, builder) => {
|
|
33
|
+
const preset = new EditorPresetBuilder().add([featureFlagsPlugin, options.featureFlags || {}]).add([pastePlugin, options.paste]).add(clipboardPlugin).add([basePlugin, options.base]).maybeAdd(undoRedoPlugin, (p, builder) => {
|
|
33
34
|
var _options$featureFlags;
|
|
34
35
|
// The undo redo plugin needs to be add before the blockTypePlugin
|
|
35
36
|
if ((_options$featureFlags = options.featureFlags) !== null && _options$featureFlags !== void 0 && _options$featureFlags.undoRedoButtons) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, cardPlugin, gridPlugin, statusPlugin, alignmentPlugin, indentationPlugin, analyticsPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, contextPanelPlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin } from '../../../plugins';
|
|
1
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, cardPlugin, gridPlugin, statusPlugin, alignmentPlugin, indentationPlugin, analyticsPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, contextPanelPlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
|
|
2
2
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
3
3
|
import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
|
|
4
4
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
@@ -110,7 +110,8 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
110
110
|
uploadErrorHandler: props.uploadErrorHandler,
|
|
111
111
|
waitForMediaUpload: props.waitForMediaUpload,
|
|
112
112
|
isCopyPasteEnabled: !isMobile,
|
|
113
|
-
alignLeftOnInsert
|
|
113
|
+
alignLeftOnInsert,
|
|
114
|
+
getEditorFeatureFlags
|
|
114
115
|
}]);
|
|
115
116
|
}
|
|
116
117
|
return builder;
|
|
@@ -373,6 +374,11 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
373
374
|
}]);
|
|
374
375
|
}
|
|
375
376
|
return builder;
|
|
377
|
+
}).maybeAdd(borderPlugin, (plugin, builder) => {
|
|
378
|
+
if (props.UNSAFE_allowBorderMark) {
|
|
379
|
+
return builder.add(plugin);
|
|
380
|
+
}
|
|
381
|
+
return builder;
|
|
376
382
|
}).maybeAdd(fragmentMarkPlugin, (plugin, builder) => {
|
|
377
383
|
if (props.allowFragmentMark) {
|
|
378
384
|
return builder.add(plugin);
|
|
@@ -7,7 +7,8 @@ import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
|
7
7
|
import ToolbarButton from '../../../../ui/ToolbarButton';
|
|
8
8
|
import Dropdown from '../../../../ui/Dropdown';
|
|
9
9
|
import Alignment from '../../../../ui/Alignment';
|
|
10
|
-
import { expandIconWrapper,
|
|
10
|
+
import { expandIconWrapper, triggerWrapper, wrapper } from './styles';
|
|
11
|
+
import { separatorStyles } from '../../../../ui/styles';
|
|
11
12
|
import { IconMap } from './icon-map';
|
|
12
13
|
import { messages } from './messages';
|
|
13
14
|
export class AlignmentToolbar extends React.Component {
|
|
@@ -132,7 +133,7 @@ export class AlignmentToolbar extends React.Component {
|
|
|
132
133
|
onClick: align => this.changeAlignment(align, false),
|
|
133
134
|
selectedAlignment: pluginState.align
|
|
134
135
|
})), jsx("span", {
|
|
135
|
-
css:
|
|
136
|
+
css: separatorStyles
|
|
136
137
|
}));
|
|
137
138
|
}
|
|
138
139
|
componentDidUpdate(prevProps) {
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import { N30 } from '@atlaskit/theme/colors';
|
|
3
2
|
export const triggerWrapper = css`
|
|
4
3
|
display: flex;
|
|
5
4
|
`;
|
|
6
|
-
export const separator = css`
|
|
7
|
-
background: ${`var(--ds-border, ${N30})`};
|
|
8
|
-
width: 1px;
|
|
9
|
-
height: 24px;
|
|
10
|
-
display: inline-block;
|
|
11
|
-
margin: 0 8px;
|
|
12
|
-
`;
|
|
13
5
|
export const wrapper = css`
|
|
14
6
|
display: flex;
|
|
15
7
|
align-items: center;
|