@atlaskit/editor-core 180.1.0 → 181.0.0
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 +43 -0
- package/dist/cjs/actions/index.js +25 -10
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +0 -5
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +73 -103
- package/dist/cjs/create-editor/create-plugins-list.js +30 -3
- package/dist/cjs/create-editor/preset-utils.js +27 -0
- package/dist/cjs/editor-next/editor-internal.js +2 -2
- package/dist/cjs/editor-next/editor-migration-component.js +18 -2
- package/dist/cjs/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/cjs/editor-next/index.js +13 -9
- package/dist/cjs/editor-next/utils/getProvidersFromEditorProps.js +41 -0
- package/dist/cjs/editor-next/utils/handleProviders.js +17 -22
- package/dist/cjs/editor.js +20 -13
- package/dist/cjs/keymaps/consts.js +1 -16
- package/dist/cjs/labs/next/presets/cxhtml.js +56 -55
- package/dist/cjs/labs/next/presets/default.js +15 -42
- package/dist/cjs/labs/next/presets/mobile.js +76 -89
- package/dist/cjs/labs/next/presets/universal.js +330 -257
- package/dist/cjs/labs/next/presets/useUniversalPreset.js +36 -0
- package/dist/cjs/plugins/analytics/plugin.js +6 -0
- package/dist/cjs/plugins/annotation/utils.js +2 -36
- package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +2 -7
- package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +0 -10
- package/dist/cjs/plugins/caption/index.js +0 -7
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +9 -4
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/cjs/plugins/card/pm-plugins/main.js +6 -3
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +2 -14
- package/dist/cjs/plugins/collab-edit/provider/index.js +1 -8
- package/dist/cjs/plugins/collab-edit/provider/types.js +1 -12
- package/dist/cjs/plugins/context-panel/index.js +1 -6
- package/dist/cjs/plugins/data-consumer/index.js +0 -8
- package/dist/cjs/plugins/date/utils/internal.js +0 -4
- package/dist/cjs/plugins/extension/commands.js +1 -8
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/cjs/plugins/feedback-dialog/index.js +1 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +24 -8
- package/dist/cjs/plugins/floating-toolbar/utils.js +0 -12
- package/dist/cjs/plugins/fragment/index.js +0 -8
- package/dist/cjs/plugins/help-dialog/commands.js +2 -6
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +50 -12
- package/dist/cjs/plugins/layout/styles.js +10 -1
- package/dist/cjs/plugins/list/utils/find.js +0 -28
- package/dist/cjs/plugins/list/utils/indentation.js +1 -25
- package/dist/cjs/plugins/list/utils/node.js +0 -5
- package/dist/cjs/plugins/list/utils/selection.js +2 -15
- package/dist/cjs/plugins/media/utils/media-common.js +1 -20
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +100 -16
- package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
- package/dist/cjs/plugins/mobile-dimensions/index.js +1 -4
- package/dist/cjs/plugins/paste/index.js +1 -2
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +123 -87
- package/dist/cjs/plugins/paste/util/index.js +0 -46
- package/dist/cjs/plugins/quick-insert/assets/index.js +1 -27
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +49 -44
- package/dist/cjs/plugins/status/utils.js +1 -15
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -1
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/cjs/plugins/text-formatting/utils.js +1 -26
- package/dist/cjs/plugins/type-ahead/constants.js +1 -7
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +2 -35
- package/dist/cjs/plugins/type-ahead/utils.js +3 -22
- package/dist/cjs/test-utils.js +4 -12
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +43 -8
- package/dist/cjs/ui/ColorPalette/index.js +18 -0
- package/dist/cjs/ui/ColorPickerButton/index.js +6 -2
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/cjs/ui/ConfigPanel/utils.js +4 -17
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +1 -3
- package/dist/cjs/ui/Resizer/utils.js +1 -3
- package/dist/cjs/ui/styles.js +3 -7
- package/dist/cjs/utils/get-editor-plugins.js +1 -3
- package/dist/cjs/utils/index.js +9 -269
- package/dist/cjs/utils/input-rules.js +1 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +23 -9
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +0 -5
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +67 -82
- package/dist/es2019/create-editor/create-plugins-list.js +25 -3
- package/dist/es2019/create-editor/preset-utils.js +15 -0
- package/dist/es2019/editor-next/editor-internal.js +2 -2
- package/dist/es2019/editor-next/editor-migration-component.js +19 -2
- package/dist/es2019/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/es2019/editor-next/index.js +13 -7
- package/dist/es2019/editor-next/utils/getProvidersFromEditorProps.js +36 -0
- package/dist/es2019/editor-next/utils/handleProviders.js +18 -24
- package/dist/es2019/editor.js +20 -11
- package/dist/es2019/keymaps/consts.js +7 -11
- package/dist/es2019/labs/next/presets/cxhtml.js +56 -53
- package/dist/es2019/labs/next/presets/default.js +18 -38
- package/dist/es2019/labs/next/presets/mobile.js +88 -88
- package/dist/es2019/labs/next/presets/universal.js +338 -265
- package/dist/es2019/labs/next/presets/useUniversalPreset.js +25 -0
- package/dist/es2019/plugins/analytics/plugin.js +7 -0
- package/dist/es2019/plugins/annotation/utils.js +2 -30
- package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +1 -3
- package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/es2019/plugins/caption/index.js +0 -2
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -4
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/es2019/plugins/card/pm-plugins/main.js +6 -3
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +1 -9
- package/dist/es2019/plugins/collab-edit/provider/index.js +1 -1
- package/dist/es2019/plugins/collab-edit/provider/types.js +1 -10
- package/dist/es2019/plugins/context-panel/index.js +0 -3
- package/dist/es2019/plugins/data-consumer/index.js +0 -7
- package/dist/es2019/plugins/date/utils/internal.js +0 -3
- package/dist/es2019/plugins/extension/commands.js +0 -6
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +12 -2
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +3 -0
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/es2019/plugins/feedback-dialog/index.js +0 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -11
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +21 -4
- package/dist/es2019/plugins/floating-toolbar/utils.js +0 -10
- package/dist/es2019/plugins/fragment/index.js +0 -7
- package/dist/es2019/plugins/help-dialog/commands.js +1 -2
- package/dist/es2019/plugins/image-upload/pm-plugins/main.js +47 -5
- package/dist/es2019/plugins/layout/styles.js +12 -4
- package/dist/es2019/plugins/list/utils/find.js +0 -27
- package/dist/es2019/plugins/list/utils/indentation.js +0 -23
- package/dist/es2019/plugins/list/utils/node.js +1 -4
- package/dist/es2019/plugins/list/utils/selection.js +2 -15
- package/dist/es2019/plugins/media/utils/media-common.js +1 -19
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +64 -16
- package/dist/es2019/plugins/mentions/type-ahead/index.js +1 -14
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/es2019/plugins/mobile-dimensions/index.js +0 -3
- package/dist/es2019/plugins/paste/index.js +1 -2
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +126 -94
- package/dist/es2019/plugins/paste/util/index.js +5 -45
- package/dist/es2019/plugins/quick-insert/assets/index.js +0 -8
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +56 -56
- package/dist/es2019/plugins/status/utils.js +1 -11
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/es2019/plugins/text-formatting/utils.js +0 -19
- package/dist/es2019/plugins/type-ahead/constants.js +0 -5
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -35
- package/dist/es2019/plugins/type-ahead/utils.js +0 -23
- package/dist/es2019/test-utils.js +4 -7
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -6
- package/dist/es2019/ui/ColorPalette/index.js +2 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +6 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/es2019/ui/ConfigPanel/utils.js +0 -6
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -1
- package/dist/es2019/ui/styles.js +0 -6
- package/dist/es2019/utils/get-editor-plugins.js +1 -3
- package/dist/es2019/utils/index.js +13 -199
- package/dist/es2019/utils/input-rules.js +0 -14
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +23 -9
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +0 -5
- package/dist/esm/create-editor/ReactEditorViewInternal.js +73 -102
- package/dist/esm/create-editor/create-plugins-list.js +29 -3
- package/dist/esm/create-editor/preset-utils.js +21 -0
- package/dist/esm/editor-next/editor-internal.js +2 -2
- package/dist/esm/editor-next/editor-migration-component.js +18 -2
- package/dist/esm/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/esm/editor-next/index.js +13 -9
- package/dist/esm/editor-next/utils/getProvidersFromEditorProps.js +35 -0
- package/dist/esm/editor-next/utils/handleProviders.js +17 -22
- package/dist/esm/editor.js +20 -13
- package/dist/esm/keymaps/consts.js +7 -11
- package/dist/esm/labs/next/presets/cxhtml.js +56 -55
- package/dist/esm/labs/next/presets/default.js +18 -41
- package/dist/esm/labs/next/presets/mobile.js +88 -90
- package/dist/esm/labs/next/presets/universal.js +330 -257
- package/dist/esm/labs/next/presets/useUniversalPreset.js +29 -0
- package/dist/esm/plugins/analytics/plugin.js +6 -0
- package/dist/esm/plugins/annotation/utils.js +2 -32
- package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +1 -5
- package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/esm/plugins/caption/index.js +0 -2
- package/dist/esm/plugins/card/nodeviews/blockCard.js +9 -4
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/esm/plugins/card/pm-plugins/main.js +6 -3
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -10
- package/dist/esm/plugins/collab-edit/provider/index.js +1 -1
- package/dist/esm/plugins/collab-edit/provider/types.js +1 -10
- package/dist/esm/plugins/context-panel/index.js +0 -3
- package/dist/esm/plugins/data-consumer/index.js +0 -7
- package/dist/esm/plugins/date/utils/internal.js +0 -3
- package/dist/esm/plugins/extension/commands.js +0 -6
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/esm/plugins/feedback-dialog/index.js +0 -2
- package/dist/esm/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +24 -8
- package/dist/esm/plugins/floating-toolbar/utils.js +0 -10
- package/dist/esm/plugins/fragment/index.js +0 -7
- package/dist/esm/plugins/help-dialog/commands.js +0 -3
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +51 -12
- package/dist/esm/plugins/layout/styles.js +11 -2
- package/dist/esm/plugins/list/utils/find.js +0 -27
- package/dist/esm/plugins/list/utils/indentation.js +0 -23
- package/dist/esm/plugins/list/utils/node.js +1 -4
- package/dist/esm/plugins/list/utils/selection.js +2 -12
- package/dist/esm/plugins/media/utils/media-common.js +1 -17
- package/dist/esm/plugins/mentions/nodeviews/mention.js +97 -16
- package/dist/esm/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/esm/plugins/mobile-dimensions/index.js +0 -3
- package/dist/esm/plugins/paste/index.js +1 -2
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +122 -86
- package/dist/esm/plugins/paste/util/index.js +5 -45
- package/dist/esm/plugins/quick-insert/assets/index.js +0 -20
- package/dist/esm/plugins/selection/gap-cursor/actions.js +52 -45
- package/dist/esm/plugins/status/utils.js +1 -13
- package/dist/esm/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/esm/plugins/text-formatting/utils.js +0 -21
- package/dist/esm/plugins/type-ahead/constants.js +0 -5
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -31
- package/dist/esm/plugins/type-ahead/utils.js +2 -20
- package/dist/esm/test-utils.js +4 -7
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +41 -6
- package/dist/esm/ui/ColorPalette/index.js +2 -1
- package/dist/esm/ui/ColorPickerButton/index.js +6 -2
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/esm/ui/ConfigPanel/utils.js +3 -14
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/esm/ui/ElementBrowser/constants.js +0 -1
- package/dist/esm/ui/Resizer/utils.js +0 -1
- package/dist/esm/ui/styles.js +2 -5
- package/dist/esm/utils/get-editor-plugins.js +1 -3
- package/dist/esm/utils/index.js +13 -196
- package/dist/esm/utils/input-rules.js +0 -13
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +4 -4
- package/dist/types/create-editor/ReactEditorView.d.ts +0 -3
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +9 -7
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +3 -4
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -5
- package/dist/types/create-editor/preset-utils.d.ts +2 -0
- package/dist/types/editor-next/editor-internal.d.ts +9 -9
- package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +2 -2
- package/dist/types/editor-next/hooks/useProviderFactory.d.ts +2 -2
- package/dist/types/editor-next/index.d.ts +6 -6
- package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -2
- package/dist/types/editor-next/utils/editorPropTypes.d.ts +1 -1
- package/dist/types/editor-next/utils/getProvidersFromEditorProps.d.ts +9 -0
- package/dist/types/editor-next/utils/handleProviders.d.ts +2 -2
- package/dist/types/editor-next/utils/onEditorCreated.d.ts +2 -2
- package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +1 -1
- package/dist/types/editor.d.ts +7 -4
- package/dist/types/keymaps/consts.d.ts +0 -11
- package/dist/types/labs/next/presets/cxhtml.d.ts +33 -1
- package/dist/types/labs/next/presets/default.d.ts +67 -10
- package/dist/types/labs/next/presets/mobile.d.ts +33 -1
- package/dist/types/labs/next/presets/universal.d.ts +5 -13
- package/dist/types/labs/next/presets/useUniversalPreset.d.ts +7 -0
- package/dist/types/nodeviews/context-adapter.d.ts +0 -1
- package/dist/types/nodeviews/index.d.ts +0 -1
- package/dist/types/plugins/alignment/pm-plugins/types.d.ts +0 -11
- package/dist/types/plugins/annotation/utils.d.ts +0 -17
- package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +2 -3
- package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +2 -6
- package/dist/types/plugins/caption/index.d.ts +0 -2
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +2 -10
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +1 -0
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/code-block/actions.d.ts +0 -4
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -3
- package/dist/types/plugins/collab-edit/provider/index.d.ts +1 -2
- package/dist/types/plugins/collab-edit/provider/types.d.ts +1 -36
- package/dist/types/plugins/context-panel/index.d.ts +2 -3
- package/dist/types/plugins/data-consumer/index.d.ts +0 -2
- package/dist/types/plugins/date/utils/internal.d.ts +0 -1
- package/dist/types/plugins/extension/commands.d.ts +0 -1
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +0 -5
- package/dist/types/plugins/feedback-dialog/index.d.ts +0 -2
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
- package/dist/types/plugins/fragment/index.d.ts +0 -2
- package/dist/types/plugins/help-dialog/commands.d.ts +0 -1
- package/dist/types/plugins/history/actions.d.ts +1 -2
- package/dist/types/plugins/layout/styles.d.ts +2 -1
- package/dist/types/plugins/list/utils/find.d.ts +0 -1
- package/dist/types/plugins/list/utils/indentation.d.ts +0 -1
- package/dist/types/plugins/list/utils/node.d.ts +0 -2
- package/dist/types/plugins/list/utils/selection.d.ts +0 -3
- package/dist/types/plugins/media/utils/media-common.d.ts +0 -5
- package/dist/types/plugins/mentions/types.d.ts +1 -2
- package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +2 -3
- package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +0 -6
- package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -4
- package/dist/types/plugins/mobile-dimensions/index.d.ts +0 -1
- package/dist/types/plugins/paste/index.d.ts +0 -1
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +6 -3
- package/dist/types/plugins/paste/util/index.d.ts +0 -6
- package/dist/types/plugins/quick-insert/assets/index.d.ts +0 -2
- package/dist/types/plugins/status/utils.d.ts +0 -3
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +0 -6
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +2 -12
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +0 -4
- package/dist/types/plugins/type-ahead/constants.d.ts +0 -4
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -10
- package/dist/types/plugins/type-ahead/utils.d.ts +1 -2
- package/dist/types/test-utils.d.ts +4 -5
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +55 -42
- package/dist/types/ui/Appearance/Chromeless.d.ts +0 -5
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +0 -7
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +3 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -5
- package/dist/types/ui/ColorPalette/Palettes/index.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types/ui/ColorPalette/index.d.ts +2 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +4 -2
- package/dist/types/ui/ConfigPanel/types.d.ts +0 -3
- package/dist/types/ui/ConfigPanel/utils.d.ts +2 -3
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +0 -3
- package/dist/types/ui/ElementBrowser/constants.d.ts +0 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +0 -5
- package/dist/types/ui/Resizer/utils.d.ts +0 -1
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/index.d.ts +6 -65
- package/dist/types/utils/input-rules.d.ts +1 -2
- package/dist/types/utils/table.d.ts +0 -1
- package/package.json +23 -24
- package/report.api.md +155 -146
- package/dist/cjs/labs/next/presets/preset.js +0 -101
- package/dist/cjs/plugins/analytics/types/type-ahead.js +0 -5
- package/dist/cjs/plugins/collab-edit/provider/channel.js +0 -313
- package/dist/cjs/plugins/collab-edit/provider/logger.js +0 -17
- package/dist/cjs/plugins/collab-edit/provider/mock-users.js +0 -19
- package/dist/cjs/plugins/data-consumer/plugin-key.js +0 -9
- package/dist/cjs/plugins/media/toolbar/toolbar-messages.js +0 -15
- package/dist/cjs/profiler/render-count.js +0 -60
- package/dist/cjs/ui/ColorPalette/Color/index.js +0 -9
- package/dist/cjs/ui/ConfigPanel/FieldDescription.js +0 -19
- package/dist/cjs/ui/WithPluginState/types.js +0 -5
- package/dist/es2019/labs/next/presets/preset.js +0 -68
- package/dist/es2019/plugins/analytics/types/type-ahead.js +0 -1
- package/dist/es2019/plugins/collab-edit/provider/channel.js +0 -179
- package/dist/es2019/plugins/collab-edit/provider/logger.js +0 -8
- package/dist/es2019/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/es2019/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/es2019/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/es2019/profiler/render-count.js +0 -53
- package/dist/es2019/ui/ColorPalette/Color/index.js +0 -2
- package/dist/es2019/ui/ConfigPanel/FieldDescription.js +0 -12
- package/dist/es2019/ui/WithPluginState/types.js +0 -1
- package/dist/esm/labs/next/presets/preset.js +0 -93
- package/dist/esm/plugins/analytics/types/type-ahead.js +0 -1
- package/dist/esm/plugins/collab-edit/provider/channel.js +0 -305
- package/dist/esm/plugins/collab-edit/provider/logger.js +0 -10
- package/dist/esm/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/esm/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/esm/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/esm/profiler/render-count.js +0 -49
- package/dist/esm/ui/ColorPalette/Color/index.js +0 -2
- package/dist/esm/ui/ConfigPanel/FieldDescription.js +0 -11
- package/dist/esm/ui/WithPluginState/types.js +0 -1
- package/dist/types/labs/next/presets/preset.d.ts +0 -46
- package/dist/types/plugins/analytics/types/type-ahead.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/channel.d.ts +0 -48
- package/dist/types/plugins/collab-edit/provider/logger.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/mock-users.d.ts +0 -6
- package/dist/types/plugins/data-consumer/plugin-key.d.ts +0 -2
- package/dist/types/plugins/media/toolbar/toolbar-messages.d.ts +0 -7
- package/dist/types/profiler/render-count.d.ts +0 -14
- package/dist/types/ui/ColorPalette/Color/index.d.ts +0 -2
- package/dist/types/ui/ConfigPanel/FieldDescription.d.ts +0 -6
- package/dist/types/ui/WithPluginState/types.d.ts +0 -10
|
@@ -21,7 +21,7 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
|
21
21
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
22
22
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
23
23
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
24
|
-
var _ColorPalette =
|
|
24
|
+
var _ColorPalette = _interopRequireWildcard(require("../../../../ui/ColorPalette"));
|
|
25
25
|
var _Dropdown = _interopRequireDefault(require("../../../../ui/Dropdown"));
|
|
26
26
|
var _styles = require("../../../../ui/styles");
|
|
27
27
|
var _ToolbarButton = _interopRequireWildcard(require("../../../../ui/ToolbarButton"));
|
|
@@ -232,14 +232,16 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
232
232
|
}, (0, _react2.jsx)("div", {
|
|
233
233
|
"data-testid": "text-color-palette"
|
|
234
234
|
}, (0, _react2.jsx)(_ColorPalette.default, {
|
|
235
|
-
palette: palette,
|
|
236
235
|
onClick: function onClick(color) {
|
|
237
236
|
return _this2.changeTextColor(color, pluginState.disabled);
|
|
238
237
|
},
|
|
239
238
|
selectedColor: pluginState.color,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
paletteOptions: {
|
|
240
|
+
palette: palette,
|
|
241
|
+
hexToPaletteColor: _editorPalette.hexToEditorTextPaletteColor,
|
|
242
|
+
paletteColorTooltipMessages: _ColorPalette.textPaletteTooltipMessages,
|
|
243
|
+
showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
|
|
244
|
+
}
|
|
243
245
|
}))), (0, _react2.jsx)("span", {
|
|
244
246
|
css: _styles.separatorStyles
|
|
245
247
|
}));
|
|
@@ -23,10 +23,15 @@ function replaceTextUsingCaptureGroup(text) {
|
|
|
23
23
|
var _match = (0, _slicedToArray2.default)(match, 4),
|
|
24
24
|
prefix = _match[1],
|
|
25
25
|
suffix = _match[3];
|
|
26
|
-
var replacement =
|
|
26
|
+
var replacement = text + (suffix || '');
|
|
27
27
|
var tr = state.tr,
|
|
28
28
|
$to = state.selection.$to;
|
|
29
|
-
|
|
29
|
+
var startPos = start + (prefix || '').length;
|
|
30
|
+
var safePos = Math.min(
|
|
31
|
+
// I know it is almost impossible to have a negative value at this point.
|
|
32
|
+
// But, this is JS #trustnoone
|
|
33
|
+
Math.max(startPos, 0), end);
|
|
34
|
+
tr.replaceWith(safePos, end, state.schema.text(replacement, $to.marks()));
|
|
30
35
|
tr.setSelection(_prosemirrorState.Selection.near(tr.doc.resolve(tr.selection.to)));
|
|
31
36
|
return tr;
|
|
32
37
|
};
|
|
@@ -76,6 +81,7 @@ function createSingleQuotesRules() {
|
|
|
76
81
|
// apostrophe
|
|
77
82
|
createReplacementRule('’', /(\w+)(')(\w+)$/)];
|
|
78
83
|
}
|
|
84
|
+
|
|
79
85
|
/**
|
|
80
86
|
* Get replacement rules related to product
|
|
81
87
|
*/
|
|
@@ -3,34 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.markActive = exports.isArrayContainsContent = exports.hasCode = exports.compareItemsArrays = exports.checkFormattingIsPresent = exports.anyMarkActive = void 0;
|
|
7
7
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
8
8
|
var _clearFormatting = require("./commands/clear-formatting");
|
|
9
|
-
var nodeLen = function nodeLen(node) {
|
|
10
|
-
return node.nodeType === 3 && node.nodeValue ? node.nodeValue.length : node.childNodes.length;
|
|
11
|
-
};
|
|
12
|
-
exports.nodeLen = nodeLen;
|
|
13
|
-
var isIgnorable = function isIgnorable(dom) {
|
|
14
|
-
return dom.pmViewDesc && dom.pmViewDesc.size === 0;
|
|
15
|
-
};
|
|
16
|
-
exports.isIgnorable = isIgnorable;
|
|
17
|
-
var isBlockNode = function isBlockNode(dom) {
|
|
18
|
-
var desc = dom.pmViewDesc;
|
|
19
|
-
return desc && desc.node && desc.node.isBlock;
|
|
20
|
-
};
|
|
21
|
-
exports.isBlockNode = isBlockNode;
|
|
22
|
-
var domIndex = function domIndex(node) {
|
|
23
|
-
if (node) {
|
|
24
|
-
for (var index = 0;; index++) {
|
|
25
|
-
node = node.previousSibling;
|
|
26
|
-
if (!node) {
|
|
27
|
-
return index;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return;
|
|
32
|
-
};
|
|
33
|
-
exports.domIndex = domIndex;
|
|
34
9
|
var hasCode = function hasCode(state, pos) {
|
|
35
10
|
var code = state.schema.marks.code;
|
|
36
11
|
var node = pos >= 0 && state.doc.nodeAt(pos);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TYPE_AHEAD_POPUP_CONTENT_CLASS = exports.TYPE_AHEAD_DECORATION_KEY = exports.TYPE_AHEAD_DECORATION_ELEMENT_ID = exports.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = exports.
|
|
6
|
+
exports.TYPE_AHEAD_POPUP_CONTENT_CLASS = exports.TYPE_AHEAD_DECORATION_KEY = exports.TYPE_AHEAD_DECORATION_ELEMENT_ID = exports.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = exports.CloseSelectionOptions = void 0;
|
|
7
7
|
var TYPE_AHEAD_DECORATION_KEY = 'typeahead_decoration_key';
|
|
8
8
|
exports.TYPE_AHEAD_DECORATION_KEY = TYPE_AHEAD_DECORATION_KEY;
|
|
9
9
|
var TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = 'typeaheadDecoration';
|
|
@@ -12,12 +12,6 @@ var TYPE_AHEAD_POPUP_CONTENT_CLASS = 'fabric-editor-typeahead';
|
|
|
12
12
|
exports.TYPE_AHEAD_POPUP_CONTENT_CLASS = TYPE_AHEAD_POPUP_CONTENT_CLASS;
|
|
13
13
|
var TYPE_AHEAD_DECORATION_ELEMENT_ID = 'typeahaed_decoration_element_id';
|
|
14
14
|
exports.TYPE_AHEAD_DECORATION_ELEMENT_ID = TYPE_AHEAD_DECORATION_ELEMENT_ID;
|
|
15
|
-
var NavigationDirection;
|
|
16
|
-
exports.NavigationDirection = NavigationDirection;
|
|
17
|
-
(function (NavigationDirection) {
|
|
18
|
-
NavigationDirection[NavigationDirection["LEFT"] = -1] = "LEFT";
|
|
19
|
-
NavigationDirection[NavigationDirection["RIGHT"] = 1] = "RIGHT";
|
|
20
|
-
})(NavigationDirection || (exports.NavigationDirection = NavigationDirection = {}));
|
|
21
15
|
var CloseSelectionOptions;
|
|
22
16
|
exports.CloseSelectionOptions = CloseSelectionOptions;
|
|
23
17
|
(function (CloseSelectionOptions) {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.factoryDecorations = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
10
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
@@ -146,37 +146,4 @@ var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
146
146
|
removeDecorations: removeDecorations
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
|
-
exports.factoryDecorations = factoryDecorations;
|
|
150
|
-
var isSelectionInsideTypeAhead = function isSelectionInsideTypeAhead(_ref4) {
|
|
151
|
-
var decorationSet = _ref4.decorationSet,
|
|
152
|
-
selection = _ref4.selection;
|
|
153
|
-
if (!decorationSet || decorationSet === _prosemirrorView.DecorationSet.empty) {
|
|
154
|
-
return false;
|
|
155
|
-
}
|
|
156
|
-
var typeAheadDecorations = decorationSet.find(undefined, undefined, function (spec) {
|
|
157
|
-
return spec.isTypeAheadDecoration;
|
|
158
|
-
});
|
|
159
|
-
if (!typeAheadDecorations || typeAheadDecorations.length === 0) {
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
return typeAheadDecorations.some(function (dec) {
|
|
163
|
-
return dec.from === selection.from && dec.to === selection.to;
|
|
164
|
-
});
|
|
165
|
-
};
|
|
166
|
-
exports.isSelectionInsideTypeAhead = isSelectionInsideTypeAhead;
|
|
167
|
-
var findDecorationElement = function findDecorationElement(_ref5) {
|
|
168
|
-
var selection = _ref5.selection,
|
|
169
|
-
decorationSet = _ref5.decorationSet;
|
|
170
|
-
if (!decorationSet || decorationSet === _prosemirrorView.DecorationSet.empty || !(selection instanceof _prosemirrorState.TextSelection) || !selection.$cursor) {
|
|
171
|
-
return null;
|
|
172
|
-
}
|
|
173
|
-
var pos = selection.$cursor.pos;
|
|
174
|
-
var decoration = decorationSet.find(pos, pos, function (spec) {
|
|
175
|
-
return spec === null || spec === void 0 ? void 0 : spec.isTypeAheadDecoration;
|
|
176
|
-
});
|
|
177
|
-
if (!decoration || decoration.length !== 1) {
|
|
178
|
-
return null;
|
|
179
|
-
}
|
|
180
|
-
return document.querySelector("#".concat(decoration[0].spec.key));
|
|
181
|
-
};
|
|
182
|
-
exports.findDecorationElement = findDecorationElement;
|
|
149
|
+
exports.factoryDecorations = factoryDecorations;
|
|
@@ -3,31 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadListAriaLabels = exports.getTypeAheadHandler = exports.getPluginState = exports.
|
|
7
|
-
var _prosemirrorState = require("prosemirror-state");
|
|
8
|
-
var _prosemirrorView = require("prosemirror-view");
|
|
6
|
+
exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadListAriaLabels = exports.getTypeAheadHandler = exports.getPluginState = exports.findHandlerByTrigger = exports.findHandler = void 0;
|
|
9
7
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
10
8
|
var _key = require("./pm-plugins/key");
|
|
11
9
|
var _updateSelectedIndex = require("./commands/update-selected-index");
|
|
12
10
|
var _statsModifier = require("./stats-modifier");
|
|
13
11
|
var _messages = require("./messages");
|
|
14
|
-
var findTypeAheadDecorations = function findTypeAheadDecorations(state) {
|
|
15
|
-
var selection = state.selection;
|
|
16
|
-
var _typeAheadPluginKey$g = _key.pluginKey.getState(state),
|
|
17
|
-
decorationSet = _typeAheadPluginKey$g.decorationSet;
|
|
18
|
-
if (!decorationSet || decorationSet === _prosemirrorView.DecorationSet.empty || !(selection instanceof _prosemirrorState.TextSelection) || !selection.$cursor) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
var pos = selection.$cursor.pos;
|
|
22
|
-
var decoration = decorationSet.find(pos, pos, function (spec) {
|
|
23
|
-
return spec === null || spec === void 0 ? void 0 : spec.isTypeAheadDecoration;
|
|
24
|
-
});
|
|
25
|
-
if (!decoration || decoration.length !== 1) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return decoration[0];
|
|
29
|
-
};
|
|
30
|
-
exports.findTypeAheadDecorations = findTypeAheadDecorations;
|
|
31
12
|
var isTypeAheadHandler = function isTypeAheadHandler(handler) {
|
|
32
13
|
return handler && Object.values(_typeAhead.TypeAheadAvailableNodes).includes(handler.id) && typeof handler.trigger === 'string' && typeof handler.selectItem === 'function' && typeof handler.getItems === 'function';
|
|
33
14
|
};
|
|
@@ -35,8 +16,8 @@ var isTypeAheadHandler = function isTypeAheadHandler(handler) {
|
|
|
35
16
|
/** Is a typeahead plugin open? */
|
|
36
17
|
exports.isTypeAheadHandler = isTypeAheadHandler;
|
|
37
18
|
var isTypeAheadOpen = function isTypeAheadOpen(editorState) {
|
|
38
|
-
var _typeAheadPluginKey$
|
|
39
|
-
return (_key.pluginKey === null || _key.pluginKey === void 0 ? void 0 : (_typeAheadPluginKey$
|
|
19
|
+
var _typeAheadPluginKey$g, _typeAheadPluginKey$g2;
|
|
20
|
+
return (_key.pluginKey === null || _key.pluginKey === void 0 ? void 0 : (_typeAheadPluginKey$g = _key.pluginKey.getState(editorState)) === null || _typeAheadPluginKey$g === void 0 ? void 0 : (_typeAheadPluginKey$g2 = _typeAheadPluginKey$g.decorationSet) === null || _typeAheadPluginKey$g2 === void 0 ? void 0 : _typeAheadPluginKey$g2.find().length) > 0;
|
|
40
21
|
};
|
|
41
22
|
exports.isTypeAheadOpen = isTypeAheadOpen;
|
|
42
23
|
var getPluginState = function getPluginState(editorState) {
|
package/dist/cjs/test-utils.js
CHANGED
|
@@ -28,12 +28,6 @@ Object.defineProperty(exports, "PortalProviderAPI", {
|
|
|
28
28
|
return _PortalProvider.PortalProviderAPI;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
Object.defineProperty(exports, "Preset", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function get() {
|
|
34
|
-
return _preset.Preset;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
31
|
exports.createPMSchemaAndPlugins = void 0;
|
|
38
32
|
Object.defineProperty(exports, "createTypeAheadTools", {
|
|
39
33
|
enumerable: true,
|
|
@@ -48,11 +42,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
48
42
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
49
43
|
var _prosemirrorState = require("prosemirror-state");
|
|
50
44
|
var _sortByOrder = require("./create-editor/sort-by-order");
|
|
51
|
-
var _preset = require("./labs/next/presets/preset");
|
|
52
45
|
var _createSchema = require("./create-editor/create-schema");
|
|
53
46
|
var _base = _interopRequireDefault(require("./plugins/base"));
|
|
54
47
|
var _pluginKey = require("./plugins/analytics/plugin-key");
|
|
55
48
|
var _api = require("./plugins/type-ahead/api");
|
|
49
|
+
var _preset = require("@atlaskit/editor-common/preset");
|
|
56
50
|
var _PortalProvider = require("./ui/PortalProvider");
|
|
57
51
|
var _eventDispatcher = require("./event-dispatcher");
|
|
58
52
|
var _selection = require("./plugins/selection/gap-cursor/selection");
|
|
@@ -106,13 +100,11 @@ function lightProcessPluginsList(editorPlugins) {
|
|
|
106
100
|
});
|
|
107
101
|
}
|
|
108
102
|
var createPMSchemaAndPlugins = function createPMSchemaAndPlugins() {
|
|
109
|
-
var
|
|
103
|
+
var inputPreset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new _preset.EditorPresetBuilder();
|
|
110
104
|
return function (pluginFactoryParams) {
|
|
111
105
|
var editorPlugins = [];
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
editorPlugins = preset.getEditorPlugins();
|
|
106
|
+
var preset = inputPreset.has(_base.default) ? inputPreset : inputPreset.add(_base.default);
|
|
107
|
+
editorPlugins = preset.build();
|
|
116
108
|
var editorConfig = lightProcessPluginsList(editorPlugins);
|
|
117
109
|
var schema = (0, _createSchema.createSchema)(editorConfig);
|
|
118
110
|
var plugins = editorConfig.plugins.sort((0, _sortByOrder.sortByOrder)('plugins')).map(function (_ref) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var
|
|
4
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.mainToolbarCustomComponentsSlotStyle = exports.TableControlsPadding = exports.MainToolbar = void 0;
|
|
9
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -15,7 +16,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
16
17
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
17
18
|
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); }
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
|
|
19
20
|
var TableControlsPadding = 20;
|
|
20
21
|
exports.TableControlsPadding = TableControlsPadding;
|
|
21
22
|
var mainToolbarWrapperStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)(), "var(--ds-surface, white)", TableControlsPadding);
|
|
@@ -25,10 +26,18 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
25
26
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
26
27
|
top = _useState2[0],
|
|
27
28
|
setTop = _useState2[1];
|
|
29
|
+
|
|
30
|
+
// ED-15802: if externalToolbarRef is passed in, set top to externalToolbarRef?.current?.clientHeight
|
|
31
|
+
// else if offsetTop is a number set top to offsetTop
|
|
32
|
+
// otherwise top is 0 as initial state
|
|
28
33
|
(0, _react.useEffect)(function () {
|
|
29
34
|
var _props$externalToolba, _props$externalToolba2;
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
if ((_props$externalToolba = props.externalToolbarRef) !== null && _props$externalToolba !== void 0 && (_props$externalToolba2 = _props$externalToolba.current) !== null && _props$externalToolba2 !== void 0 && _props$externalToolba2.clientHeight) {
|
|
36
|
+
setTop(props.externalToolbarRef.current.clientHeight);
|
|
37
|
+
} else {
|
|
38
|
+
setTop(props.offsetTop || 0);
|
|
39
|
+
}
|
|
40
|
+
}, [props.externalToolbarRef, props.offsetTop]);
|
|
32
41
|
return (0, _react2.jsx)("div", {
|
|
33
42
|
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n top: ", "px;\n "])), top)],
|
|
34
43
|
"data-testid": "ak-editor-main-toolbar",
|
|
@@ -41,13 +50,39 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
41
50
|
"data-testid": "ak-editor-main-toolbar"
|
|
42
51
|
}, props.children);
|
|
43
52
|
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* ED-15802: Scenarios when a sticky bar is used:
|
|
56
|
+
* 1. useStickyToolbar is true
|
|
57
|
+
* 2. useStickyToolbar is a DOM element
|
|
58
|
+
* 3. useStickyToolbar is an object and has offsetTop key;
|
|
59
|
+
*/
|
|
60
|
+
var getStickyParameters = function getStickyParameters(configuration) {
|
|
61
|
+
// const isUsingStickyOffset, isHTMLElement is used so TS can properly infer types.
|
|
62
|
+
var isHTMLElement = (0, _typeof2.default)(configuration) === 'object' && !('offsetTop' in configuration);
|
|
63
|
+
var isUsingStickyOffset = (0, _typeof2.default)(configuration) === 'object' && 'offsetTop' in configuration;
|
|
64
|
+
if ((0, _typeof2.default)(configuration) !== 'object') {
|
|
65
|
+
return {
|
|
66
|
+
externalToolbarRef: undefined,
|
|
67
|
+
offsetTop: undefined
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (isUsingStickyOffset) {
|
|
71
|
+
return {
|
|
72
|
+
offsetTop: configuration.offsetTop
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (isHTMLElement) {
|
|
76
|
+
return {
|
|
77
|
+
externalToolbarRef: configuration
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
};
|
|
44
81
|
var MainToolbar = function MainToolbar(_ref) {
|
|
45
82
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
46
83
|
children = _ref.children;
|
|
47
|
-
if (
|
|
48
|
-
return (0, _react2.jsx)(StickyToolbar,
|
|
49
|
-
externalToolbarRef: typeof useStickyToolbar === 'boolean' ? undefined : useStickyToolbar
|
|
50
|
-
}, children);
|
|
84
|
+
if (useStickyToolbar) {
|
|
85
|
+
return (0, _react2.jsx)(StickyToolbar, getStickyParameters(useStickyToolbar), children);
|
|
51
86
|
}
|
|
52
87
|
return (0, _react2.jsx)(FixedToolbar, null, children);
|
|
53
88
|
};
|
|
@@ -3,7 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "ColorPalette", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _uiColor.ColorPalette;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "backgroundPaletteTooltipMessages", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _uiColor.backgroundPaletteTooltipMessages;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
6
18
|
exports.default = void 0;
|
|
19
|
+
Object.defineProperty(exports, "textPaletteTooltipMessages", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _uiColor.textPaletteTooltipMessages;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
7
25
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
8
26
|
var _default = _uiColor.ColorPalette;
|
|
9
27
|
exports.default = _default;
|
|
@@ -143,13 +143,17 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
143
143
|
isOpenedByKeyboard: isOpenedByKeyboard,
|
|
144
144
|
isPopupPositioned: isPopupPositioned
|
|
145
145
|
}, (0, _react2.jsx)(ColorPaletteWithListeners, {
|
|
146
|
-
palette: props.colorPalette,
|
|
147
146
|
cols: props.cols,
|
|
148
147
|
selectedColor: selectedColor,
|
|
149
148
|
onClick: onColorSelected,
|
|
150
149
|
handleClickOutside: togglePopup,
|
|
151
150
|
handleEscapeKeydown: handleEsc,
|
|
152
|
-
|
|
151
|
+
paletteOptions: {
|
|
152
|
+
palette: props.colorPalette,
|
|
153
|
+
hexToPaletteColor: props.hexToPaletteColor,
|
|
154
|
+
showSomewhatSemanticTooltips: props.showSomewhatSemanticTooltips,
|
|
155
|
+
paletteColorTooltipMessages: props.paletteColorTooltipMessages
|
|
156
|
+
}
|
|
153
157
|
}))));
|
|
154
158
|
};
|
|
155
159
|
var title = props.title || '';
|
|
@@ -1,36 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.validateRequired = exports.validate = exports.isValidHex = exports.isDuplicateField = exports.getSafeParentedName = exports.getOptionFromValue = exports.getNameFromDuplicateField =
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
6
|
+
exports.validateRequired = exports.validate = exports.isValidHex = exports.isDuplicateField = exports.getSafeParentedName = exports.getOptionFromValue = exports.getNameFromDuplicateField = void 0;
|
|
10
7
|
var _types = require("./types");
|
|
11
8
|
var validate = function validate(field, value) {
|
|
12
9
|
return validateRequired(field, value);
|
|
13
10
|
};
|
|
14
11
|
exports.validate = validate;
|
|
15
|
-
var fromEntries = function fromEntries(iterable) {
|
|
16
|
-
return (0, _toConsumableArray2.default)(iterable).reduce(function (obj, _ref) {
|
|
17
|
-
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
18
|
-
key = _ref2[0],
|
|
19
|
-
val = _ref2[1];
|
|
20
|
-
obj[key] = val;
|
|
21
|
-
return obj;
|
|
22
|
-
}, {});
|
|
23
|
-
};
|
|
24
|
-
exports.fromEntries = fromEntries;
|
|
25
12
|
var isEmptyString = function isEmptyString(value) {
|
|
26
13
|
return typeof value === 'string' && value === '';
|
|
27
14
|
};
|
|
28
15
|
var isEmptyArray = function isEmptyArray(value) {
|
|
29
16
|
return Array.isArray(value) && value.length === 0;
|
|
30
17
|
};
|
|
31
|
-
var validateRequired = function validateRequired(
|
|
32
|
-
var isRequired =
|
|
33
|
-
isMultiple =
|
|
18
|
+
var validateRequired = function validateRequired(_ref, value) {
|
|
19
|
+
var isRequired = _ref.isRequired,
|
|
20
|
+
isMultiple = _ref.isMultiple;
|
|
34
21
|
if (isRequired) {
|
|
35
22
|
var isUndefined = typeof value === 'undefined';
|
|
36
23
|
var isEmpty = isEmptyString(value) || isMultiple && isEmptyArray(value) || false;
|
|
@@ -47,7 +47,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
47
47
|
var contentStyles = function contentStyles(props) {
|
|
48
48
|
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), (0, _editorSharedStyles.editorFontSize)({
|
|
49
49
|
theme: props.theme
|
|
50
|
-
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles17.placeholderTextStyles, _styles5.placeholderStyles, (0, _styles7.codeBlockStyles)(props), (0, _styles6.blocktypeStyles)(props), (0, _styles16.textFormattingStyles)(props), _styles.textColorStyles, _styles8.listsStyles, (0, _styles9.ruleStyles)(props), _styles10.mediaStyles, _styles11.layoutStyles, _styles3.telepointerStyle, _styles4.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _styles12.panelStyles)(props), _styles13.fakeCursorStyles, _styles14.mentionsStyles, _styles15.emojiStyles, _styles.tasksAndDecisionsStyles, _styles18.gridStyles, _styles19.linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles20.extensionStyles, (0, _styles21.expandStyles)(props), _styles22.findReplaceStyles, _styles23.taskDecisionStyles, _styles24.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles25.smartCardStyles, _styles.smartCardSharedStyles, _styles26.dateStyles, _styled.embedCardStyles, _styles2.unsupportedStyles, _style.ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
50
|
+
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles17.placeholderTextStyles, _styles5.placeholderStyles, (0, _styles7.codeBlockStyles)(props), (0, _styles6.blocktypeStyles)(props), (0, _styles16.textFormattingStyles)(props), _styles.textColorStyles, _styles8.listsStyles, (0, _styles9.ruleStyles)(props), _styles10.mediaStyles, (0, _styles11.layoutStyles)(props), _styles3.telepointerStyle, _styles4.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _styles12.panelStyles)(props), _styles13.fakeCursorStyles, _styles14.mentionsStyles, _styles15.emojiStyles, _styles.tasksAndDecisionsStyles, _styles18.gridStyles, _styles19.linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles20.extensionStyles, (0, _styles21.expandStyles)(props), _styles22.findReplaceStyles, _styles23.taskDecisionStyles, _styles24.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles25.smartCardStyles, _styles.smartCardSharedStyles, _styles26.dateStyles, _styled.embedCardStyles, _styles2.unsupportedStyles, _style.ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
51
51
|
};
|
|
52
52
|
var createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
53
53
|
return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
@@ -123,7 +123,7 @@ var Footer = function Footer(_ref) {
|
|
|
123
123
|
var HelpLink = function HelpLink(url, helpText) {
|
|
124
124
|
return (0, _react2.jsx)(_customThemeButton.default, {
|
|
125
125
|
iconBefore: (0, _react2.jsx)(_questionCircle.default, {
|
|
126
|
-
label: "
|
|
126
|
+
label: "",
|
|
127
127
|
size: "medium"
|
|
128
128
|
}),
|
|
129
129
|
appearance: "subtle-link",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SIDEBAR_WIDTH = exports.SIDEBAR_HEADING_WRAPPER_HEIGHT = exports.SIDEBAR_HEADING_PADDING_LEFT = exports.
|
|
6
|
+
exports.SIDEBAR_WIDTH = exports.SIDEBAR_HEADING_WRAPPER_HEIGHT = exports.SIDEBAR_HEADING_PADDING_LEFT = exports.SEARCH_ITEM_HEIGHT_WIDTH = exports.SCROLLBAR_WIDTH = exports.MODAL_WRAPPER_PADDING = exports.INLINE_SIDEBAR_HEIGHT = exports.GRID_SIZE = exports.FLEX_ITEMS_CONTAINER_BREAKPOINT_NUMBERS = exports.ELEMENT_LIST_PADDING = exports.ELEMENT_ITEM_HEIGHT = exports.DEVICE_BREAKPOINT_NUMBERS = void 0;
|
|
7
7
|
var _constants = require("@atlaskit/theme/constants");
|
|
8
8
|
var GRID_SIZE = (0, _constants.gridSize)();
|
|
9
9
|
exports.GRID_SIZE = GRID_SIZE;
|
|
@@ -27,8 +27,6 @@ var SIDEBAR_HEADING_PADDING_LEFT = '12px';
|
|
|
27
27
|
exports.SIDEBAR_HEADING_PADDING_LEFT = SIDEBAR_HEADING_PADDING_LEFT;
|
|
28
28
|
var INLINE_SIDEBAR_HEIGHT = '54px';
|
|
29
29
|
exports.INLINE_SIDEBAR_HEIGHT = INLINE_SIDEBAR_HEIGHT;
|
|
30
|
-
var SEARCH_ITEM_MARGIN = '12px';
|
|
31
|
-
exports.SEARCH_ITEM_MARGIN = SEARCH_ITEM_MARGIN;
|
|
32
30
|
var SEARCH_ITEM_HEIGHT_WIDTH = '20px';
|
|
33
31
|
exports.SEARCH_ITEM_HEIGHT_WIDTH = SEARCH_ITEM_HEIGHT_WIDTH;
|
|
34
32
|
var SCROLLBAR_WIDTH = 15;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.snapTo = exports.imageAlignmentMap = exports.handleSides =
|
|
6
|
+
exports.snapTo = exports.imageAlignmentMap = exports.handleSides = void 0;
|
|
7
7
|
var snapTo = function snapTo(target, points) {
|
|
8
8
|
return points.length === 0 ?
|
|
9
9
|
// extreme last case if there are no points somehow
|
|
@@ -14,8 +14,6 @@ var snapTo = function snapTo(target, points) {
|
|
|
14
14
|
exports.snapTo = snapTo;
|
|
15
15
|
var handleSides = ['left', 'right'];
|
|
16
16
|
exports.handleSides = handleSides;
|
|
17
|
-
var alignmentLayouts = ['align-start', 'align-end'];
|
|
18
|
-
exports.alignmentLayouts = alignmentLayouts;
|
|
19
17
|
var imageAlignmentMap = {
|
|
20
18
|
left: 'start',
|
|
21
19
|
right: 'end'
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.expandIconWrapperStyle = exports.
|
|
7
|
+
exports.expandIconWrapperStyle = exports.clickSelectWrapperStyle = exports.buttonGroupStyle = exports.buttonContentStyle = exports.buttonContentReducedSpacingStyle = void 0;
|
|
8
8
|
Object.defineProperty(exports, "scrollbarStyles", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
@@ -24,7 +24,7 @@ var _react = require("@emotion/react");
|
|
|
24
24
|
var _colors = require("@atlaskit/theme/colors");
|
|
25
25
|
var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
26
26
|
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
27
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9
|
|
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
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, ")"));
|
|
@@ -40,10 +40,6 @@ exports.triggerWrapperStyles = triggerWrapperStyles;
|
|
|
40
40
|
var buttonContentStyle = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n min-width: 80px;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n flex-direction: column;\n padding: 6px;\n"])));
|
|
41
41
|
exports.buttonContentStyle = buttonContentStyle;
|
|
42
42
|
var buttonContentReducedSpacingStyle = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n padding: 8px;\n"])));
|
|
43
|
-
|
|
44
|
-
// Taken from the style of inline dialog components
|
|
45
43
|
exports.buttonContentReducedSpacingStyle = buttonContentReducedSpacingStyle;
|
|
46
|
-
var
|
|
47
|
-
exports.dropShadow = dropShadow;
|
|
48
|
-
var clickSelectWrapperStyle = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n user-select: all;\n"])));
|
|
44
|
+
var clickSelectWrapperStyle = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n user-select: all;\n"])));
|
|
49
45
|
exports.clickSelectWrapperStyle = clickSelectWrapperStyle;
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var _api = require("../selection-api/api");
|
|
10
9
|
var _createPluginsList = _interopRequireDefault(require("../create-editor/create-plugins-list"));
|
|
11
10
|
/**
|
|
12
11
|
*
|
|
@@ -23,10 +22,9 @@ var getEditorPlugins = function getEditorPlugins(_ref) {
|
|
|
23
22
|
insertNodeAPI = _ref.insertNodeAPI,
|
|
24
23
|
editorAnalyticsAPI = _ref.editorAnalyticsAPI;
|
|
25
24
|
var dangerouslyAppendedPlugins = (_props$dangerouslyApp = (_props$dangerouslyApp2 = props.dangerouslyAppendPlugins) === null || _props$dangerouslyApp2 === void 0 ? void 0 : _props$dangerouslyApp2.__plugins) !== null && _props$dangerouslyApp !== void 0 ? _props$dangerouslyApp : [];
|
|
26
|
-
var selectionAPI = (0, _api.createEditorSelectionAPI)();
|
|
27
25
|
return [].concat((0, _toConsumableArray2.default)((0, _createPluginsList.default)(props, {
|
|
28
26
|
appearance: prevAppearance
|
|
29
|
-
}, createAnalyticsEvent
|
|
27
|
+
}, createAnalyticsEvent)), (0, _toConsumableArray2.default)(dangerouslyAppendedPlugins));
|
|
30
28
|
};
|
|
31
29
|
var _default = getEditorPlugins;
|
|
32
30
|
exports.default = _default;
|