@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
package/report.api.md
CHANGED
|
@@ -23,6 +23,7 @@ import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
|
23
23
|
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
24
24
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
25
25
|
import { ActivityProvider } from '@atlaskit/activity-provider';
|
|
26
|
+
import { AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
|
|
26
27
|
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
27
28
|
import { AnalyticsEventPayload as AnalyticsEventPayload_2 } from '@atlaskit/analytics-next/AnalyticsEvent';
|
|
28
29
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
@@ -45,10 +46,10 @@ import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
45
46
|
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
46
47
|
import { DropdownOptionT } from '@atlaskit/editor-common/types';
|
|
47
48
|
import { EditorActionsOptions } from '@atlaskit/editor-common/types';
|
|
48
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
49
49
|
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
50
50
|
import { FeatureFlags as EditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
51
51
|
import { EditorPlugin } from '@atlaskit/editor-common/types';
|
|
52
|
+
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
52
53
|
import { EditorReactContext } from '@atlaskit/editor-common/types';
|
|
53
54
|
import { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
54
55
|
import { EditorState } from 'prosemirror-state';
|
|
@@ -133,7 +134,6 @@ import type { SelectOption } from '@atlaskit/editor-common/types';
|
|
|
133
134
|
import { setTextSelection } from '@atlaskit/editor-common/utils';
|
|
134
135
|
import { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
135
136
|
import { TaskDecisionProvider } from '@atlaskit/task-decision';
|
|
136
|
-
import { TeamMentionProvider } from '@atlaskit/mention/resource';
|
|
137
137
|
import { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
138
138
|
import type { ThemeModes } from '@atlaskit/theme/types';
|
|
139
139
|
import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
|
|
@@ -255,12 +255,7 @@ type BasePortalProviderProps = {
|
|
|
255
255
|
} & WrappedComponentProps;
|
|
256
256
|
|
|
257
257
|
// @public (undocumented)
|
|
258
|
-
export class BaseReactEditorView<T = {}> extends ReactEditorView_2<T> {
|
|
259
|
-
// (undocumented)
|
|
260
|
-
static defaultProps: {
|
|
261
|
-
getEditorPlugins: GetEditorPlugins;
|
|
262
|
-
};
|
|
263
|
-
}
|
|
258
|
+
export class BaseReactEditorView<T = {}> extends ReactEditorView_2<T> {}
|
|
264
259
|
|
|
265
260
|
// @public (undocumented)
|
|
266
261
|
type BeforeAndAfterToolbarComponents = {
|
|
@@ -613,7 +608,7 @@ type EditInsertedState = {
|
|
|
613
608
|
// @public (undocumented)
|
|
614
609
|
export class Editor extends React_2.Component<
|
|
615
610
|
EditorProps,
|
|
616
|
-
ProviderFactoryState
|
|
611
|
+
ProviderFactoryState & PresetState
|
|
617
612
|
> {
|
|
618
613
|
constructor(props: EditorProps, context: Context);
|
|
619
614
|
componentDidMount(): void;
|
|
@@ -650,7 +645,10 @@ export class Editor extends React_2.Component<
|
|
|
650
645
|
) => Promise<QuickInsertProvider> | undefined;
|
|
651
646
|
// (undocumented)
|
|
652
647
|
static propTypes: {
|
|
653
|
-
minHeight: ({
|
|
648
|
+
minHeight: ({
|
|
649
|
+
appearance,
|
|
650
|
+
minHeight,
|
|
651
|
+
}: Pick<EditorProps, 'appearance' | 'minHeight'>) => Error | null;
|
|
654
652
|
};
|
|
655
653
|
// @deprecated (undocumented)
|
|
656
654
|
registerEditorForActions(
|
|
@@ -746,6 +744,79 @@ export class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
746
744
|
): boolean;
|
|
747
745
|
}
|
|
748
746
|
|
|
747
|
+
// @public (undocumented)
|
|
748
|
+
interface EditorBaseProps
|
|
749
|
+
extends EditorPluginFeatureProps,
|
|
750
|
+
EditorProviderProps {
|
|
751
|
+
// (undocumented)
|
|
752
|
+
appearance?: EditorAppearance;
|
|
753
|
+
// (undocumented)
|
|
754
|
+
codeBlock?: CodeBlockOptions;
|
|
755
|
+
// (undocumented)
|
|
756
|
+
contentComponents?: ReactComponents;
|
|
757
|
+
// (undocumented)
|
|
758
|
+
contentTransformerProvider?: (schema: Schema) => Transformer_2<string>;
|
|
759
|
+
// (undocumented)
|
|
760
|
+
contextPanel?: ReactComponents;
|
|
761
|
+
// (undocumented)
|
|
762
|
+
defaultValue?: Node_2 | Object | string;
|
|
763
|
+
// (undocumented)
|
|
764
|
+
disabled?: boolean;
|
|
765
|
+
// (undocumented)
|
|
766
|
+
editorActions?: EditorActions;
|
|
767
|
+
// (undocumented)
|
|
768
|
+
errorReporterHandler?: ErrorReportingHandler;
|
|
769
|
+
// (undocumented)
|
|
770
|
+
extensionProviders?: ExtensionProvidersProp;
|
|
771
|
+
featureFlags?: {
|
|
772
|
+
[featureFlag: string]: boolean | string;
|
|
773
|
+
};
|
|
774
|
+
// @deprecated
|
|
775
|
+
inputSamplingLimit?: number;
|
|
776
|
+
// (undocumented)
|
|
777
|
+
maxHeight?: number;
|
|
778
|
+
// (undocumented)
|
|
779
|
+
minHeight?: number;
|
|
780
|
+
// (undocumented)
|
|
781
|
+
onCancel?: (editorView: EditorView) => void;
|
|
782
|
+
// (undocumented)
|
|
783
|
+
onChange?: EditorOnChangeHandler;
|
|
784
|
+
// (undocumented)
|
|
785
|
+
onDestroy?: () => void;
|
|
786
|
+
// (undocumented)
|
|
787
|
+
onEditorReady?: (editorActions: EditorActions) => void;
|
|
788
|
+
// (undocumented)
|
|
789
|
+
persistScrollGutter?: boolean;
|
|
790
|
+
// (undocumented)
|
|
791
|
+
placeholder?: string;
|
|
792
|
+
// (undocumented)
|
|
793
|
+
placeholderBracketHint?: string;
|
|
794
|
+
// (undocumented)
|
|
795
|
+
popupsBoundariesElement?: HTMLElement;
|
|
796
|
+
// (undocumented)
|
|
797
|
+
popupsMountPoint?: HTMLElement;
|
|
798
|
+
// (undocumented)
|
|
799
|
+
popupsScrollableElement?: HTMLElement;
|
|
800
|
+
// (undocumented)
|
|
801
|
+
primaryToolbarIconBefore?: ReactElement;
|
|
802
|
+
// (undocumented)
|
|
803
|
+
quickInsert?: QuickInsertOptions;
|
|
804
|
+
// (undocumented)
|
|
805
|
+
secondaryToolbarComponents?: ReactComponents;
|
|
806
|
+
// (undocumented)
|
|
807
|
+
shouldFocus?: boolean;
|
|
808
|
+
// (undocumented)
|
|
809
|
+
textFormatting?: TextFormattingOptions;
|
|
810
|
+
trackValidTransactions?:
|
|
811
|
+
| boolean
|
|
812
|
+
| {
|
|
813
|
+
samplingRate: number;
|
|
814
|
+
};
|
|
815
|
+
// (undocumented)
|
|
816
|
+
UNSAFE_useAnalyticsContext?: boolean;
|
|
817
|
+
useStickyToolbar?: UseStickyToolbarType;
|
|
818
|
+
}
|
|
819
|
+
|
|
749
820
|
// @public (undocumented)
|
|
750
821
|
interface EditorConfig {
|
|
751
822
|
// (undocumented)
|
|
@@ -819,8 +890,8 @@ export class EditorMigrationComponent extends React_2.Component<EditorProps> {
|
|
|
819
890
|
}
|
|
820
891
|
|
|
821
892
|
// @public (undocumented)
|
|
822
|
-
class EditorNext extends React_2.Component<
|
|
823
|
-
constructor(props:
|
|
893
|
+
class EditorNext extends React_2.Component<EditorNextProps> {
|
|
894
|
+
constructor(props: EditorNextProps, context: Context);
|
|
824
895
|
// (undocumented)
|
|
825
896
|
static contextTypes: {
|
|
826
897
|
editorActions: PropTypes.Requireable<object>;
|
|
@@ -828,12 +899,25 @@ class EditorNext extends React_2.Component<EditorProps> {
|
|
|
828
899
|
static defaultProps: EditorProps;
|
|
829
900
|
// (undocumented)
|
|
830
901
|
static propTypes: {
|
|
831
|
-
|
|
902
|
+
preset: ({ preset }: Pick<EditorNextProps, 'preset'>) => Error | null;
|
|
903
|
+
minHeight: ({
|
|
904
|
+
appearance,
|
|
905
|
+
minHeight,
|
|
906
|
+
}: Pick<EditorProps, 'appearance' | 'minHeight'>) => Error | null;
|
|
832
907
|
};
|
|
833
908
|
// (undocumented)
|
|
834
909
|
render(): jsx.JSX.Element;
|
|
835
910
|
}
|
|
836
911
|
|
|
912
|
+
// @public (undocumented)
|
|
913
|
+
interface EditorNextProps
|
|
914
|
+
extends EditorBaseProps,
|
|
915
|
+
EditorSharedPropsWithPlugins,
|
|
916
|
+
EditorProviderProps {
|
|
917
|
+
// (undocumented)
|
|
918
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
919
|
+
}
|
|
920
|
+
|
|
837
921
|
// @public (undocumented)
|
|
838
922
|
type EditorOnChangeHandler = (
|
|
839
923
|
editorView: EditorView,
|
|
@@ -846,8 +930,6 @@ export { EditorPlugin };
|
|
|
846
930
|
|
|
847
931
|
// @public (undocumented)
|
|
848
932
|
interface EditorPluginFeatureProps {
|
|
849
|
-
// (undocumented)
|
|
850
|
-
allowAnalyticsGASV3?: boolean;
|
|
851
933
|
// (undocumented)
|
|
852
934
|
allowBlockType?: BlockTypePluginOptions['allowBlockType'];
|
|
853
935
|
// (undocumented)
|
|
@@ -890,21 +972,13 @@ interface EditorPluginFeatureProps {
|
|
|
890
972
|
menuDisabled: boolean;
|
|
891
973
|
};
|
|
892
974
|
// (undocumented)
|
|
893
|
-
allowTables?: PluginConfig | boolean;
|
|
894
|
-
// (undocumented)
|
|
895
975
|
allowTasksAndDecisions?: boolean;
|
|
896
976
|
// (undocumented)
|
|
897
977
|
allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
|
|
898
978
|
// (undocumented)
|
|
899
979
|
allowTextAlignment?: boolean;
|
|
900
|
-
// (undocumented)
|
|
901
|
-
allowTextColor?: TextColorPluginConfig | boolean;
|
|
902
|
-
// (undocumented)
|
|
903
|
-
allowUndoRedoButtons?: boolean;
|
|
904
980
|
autoScrollIntoView?: boolean;
|
|
905
981
|
// (undocumented)
|
|
906
|
-
collabEdit?: CollabEditOptions;
|
|
907
|
-
// (undocumented)
|
|
908
982
|
elementBrowser?: {
|
|
909
983
|
showModal?: boolean;
|
|
910
984
|
replacePlusMenu?: boolean;
|
|
@@ -916,29 +990,13 @@ interface EditorPluginFeatureProps {
|
|
|
916
990
|
// (undocumented)
|
|
917
991
|
feedbackInfo?: FeedbackInfo;
|
|
918
992
|
// (undocumented)
|
|
919
|
-
insertMenuItems?: MenuItem[];
|
|
920
|
-
linking?: LinkingOptions;
|
|
921
|
-
// (undocumented)
|
|
922
993
|
maxContentSize?: number;
|
|
923
994
|
// (undocumented)
|
|
924
|
-
media?: MediaOptions;
|
|
925
|
-
// (undocumented)
|
|
926
995
|
mention?: MentionPluginConfig;
|
|
927
996
|
// @deprecated
|
|
928
997
|
mentionInsertDisplayName?: boolean;
|
|
929
998
|
// (undocumented)
|
|
930
|
-
onSave?: (editorView: EditorView) => void;
|
|
931
|
-
performanceTracking?: PerformanceTracking;
|
|
932
|
-
// (undocumented)
|
|
933
|
-
primaryToolbarComponents?: PrimaryToolbarComponents;
|
|
934
|
-
// (undocumented)
|
|
935
|
-
sanitizePrivateContent?: boolean;
|
|
936
|
-
// (undocumented)
|
|
937
999
|
saveOnEnter?: boolean;
|
|
938
|
-
// @deprecated (undocumented)
|
|
939
|
-
smartLinks?: CardOptions;
|
|
940
|
-
// @deprecated (undocumented)
|
|
941
|
-
UNSAFE_cards?: CardOptions;
|
|
942
1000
|
// (undocumented)
|
|
943
1001
|
uploadErrorHandler?: (state: MediaState) => void;
|
|
944
1002
|
// (undocumented)
|
|
@@ -960,79 +1018,14 @@ type EditorProduct = 'bitbucket' | 'confluence' | 'jira' | 'stride' | undefined;
|
|
|
960
1018
|
|
|
961
1019
|
// @public (undocumented)
|
|
962
1020
|
export interface EditorProps
|
|
963
|
-
extends
|
|
1021
|
+
extends EditorBaseProps,
|
|
1022
|
+
EditorPluginFeatureProps,
|
|
1023
|
+
EditorSharedPropsWithPlugins,
|
|
964
1024
|
EditorProviderProps {
|
|
965
|
-
// (undocumented)
|
|
966
|
-
appearance?: EditorAppearance;
|
|
967
|
-
// (undocumented)
|
|
968
|
-
codeBlock?: CodeBlockOptions;
|
|
969
|
-
// (undocumented)
|
|
970
|
-
contentComponents?: ReactComponents;
|
|
971
|
-
// (undocumented)
|
|
972
|
-
contentTransformerProvider?: (schema: Schema) => Transformer_2<string>;
|
|
973
|
-
// (undocumented)
|
|
974
|
-
contextPanel?: ReactComponents;
|
|
975
1025
|
// @deprecated (undocumented)
|
|
976
1026
|
dangerouslyAppendPlugins?: {
|
|
977
1027
|
__plugins: EditorPlugin[];
|
|
978
1028
|
};
|
|
979
|
-
// (undocumented)
|
|
980
|
-
defaultValue?: Node_2 | Object | string;
|
|
981
|
-
// (undocumented)
|
|
982
|
-
disabled?: boolean;
|
|
983
|
-
// (undocumented)
|
|
984
|
-
editorActions?: EditorActions;
|
|
985
|
-
// (undocumented)
|
|
986
|
-
errorReporterHandler?: ErrorReportingHandler;
|
|
987
|
-
// (undocumented)
|
|
988
|
-
extensionProviders?: ExtensionProvidersProp;
|
|
989
|
-
featureFlags?: {
|
|
990
|
-
[featureFlag: string]: boolean | string;
|
|
991
|
-
};
|
|
992
|
-
// @deprecated
|
|
993
|
-
inputSamplingLimit?: number;
|
|
994
|
-
// (undocumented)
|
|
995
|
-
maxHeight?: number;
|
|
996
|
-
// (undocumented)
|
|
997
|
-
minHeight?: number;
|
|
998
|
-
// (undocumented)
|
|
999
|
-
onCancel?: (editorView: EditorView) => void;
|
|
1000
|
-
// (undocumented)
|
|
1001
|
-
onChange?: EditorOnChangeHandler;
|
|
1002
|
-
// (undocumented)
|
|
1003
|
-
onDestroy?: () => void;
|
|
1004
|
-
// (undocumented)
|
|
1005
|
-
onEditorReady?: (editorActions: EditorActions) => void;
|
|
1006
|
-
// (undocumented)
|
|
1007
|
-
persistScrollGutter?: boolean;
|
|
1008
|
-
// (undocumented)
|
|
1009
|
-
placeholder?: string;
|
|
1010
|
-
// (undocumented)
|
|
1011
|
-
placeholderBracketHint?: string;
|
|
1012
|
-
// (undocumented)
|
|
1013
|
-
popupsBoundariesElement?: HTMLElement;
|
|
1014
|
-
// (undocumented)
|
|
1015
|
-
popupsMountPoint?: HTMLElement;
|
|
1016
|
-
// (undocumented)
|
|
1017
|
-
popupsScrollableElement?: HTMLElement;
|
|
1018
|
-
// (undocumented)
|
|
1019
|
-
primaryToolbarIconBefore?: ReactElement;
|
|
1020
|
-
// (undocumented)
|
|
1021
|
-
quickInsert?: QuickInsertOptions;
|
|
1022
|
-
// (undocumented)
|
|
1023
|
-
secondaryToolbarComponents?: ReactComponents;
|
|
1024
|
-
// (undocumented)
|
|
1025
|
-
shouldFocus?: boolean;
|
|
1026
|
-
// (undocumented)
|
|
1027
|
-
textFormatting?: TextFormattingOptions;
|
|
1028
|
-
trackValidTransactions?:
|
|
1029
|
-
| boolean
|
|
1030
|
-
| {
|
|
1031
|
-
samplingRate: number;
|
|
1032
|
-
};
|
|
1033
|
-
// (undocumented)
|
|
1034
|
-
UNSAFE_useAnalyticsContext?: boolean;
|
|
1035
|
-
useStickyToolbar?: RefObject<HTMLElement> | boolean;
|
|
1036
1029
|
}
|
|
1037
1030
|
|
|
1038
1031
|
// @public (undocumented)
|
|
@@ -1070,8 +1063,6 @@ interface EditorProviderProps {
|
|
|
1070
1063
|
// (undocumented)
|
|
1071
1064
|
collabEditProvider?: Providers['collabEditProvider'];
|
|
1072
1065
|
// (undocumented)
|
|
1073
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
1074
|
-
// (undocumented)
|
|
1075
1066
|
emojiProvider?: Providers['emojiProvider'];
|
|
1076
1067
|
// (undocumented)
|
|
1077
1068
|
legacyImageUploadProvider?: Providers['imageUploadProvider'];
|
|
@@ -1087,6 +1078,38 @@ interface EditorProviderProps {
|
|
|
1087
1078
|
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
1088
1079
|
}
|
|
1089
1080
|
|
|
1081
|
+
// @public (undocumented)
|
|
1082
|
+
interface EditorSharedPropsWithPlugins {
|
|
1083
|
+
// (undocumented)
|
|
1084
|
+
allowAnalyticsGASV3?: boolean;
|
|
1085
|
+
// (undocumented)
|
|
1086
|
+
allowTables?: PluginConfig | boolean;
|
|
1087
|
+
// (undocumented)
|
|
1088
|
+
allowTextColor?: TextColorPluginConfig | boolean;
|
|
1089
|
+
// (undocumented)
|
|
1090
|
+
allowUndoRedoButtons?: boolean;
|
|
1091
|
+
// (undocumented)
|
|
1092
|
+
collabEdit?: CollabEditOptions;
|
|
1093
|
+
// (undocumented)
|
|
1094
|
+
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
1095
|
+
// (undocumented)
|
|
1096
|
+
insertMenuItems?: MenuItem[];
|
|
1097
|
+
linking?: LinkingOptions;
|
|
1098
|
+
// (undocumented)
|
|
1099
|
+
media?: MediaOptions;
|
|
1100
|
+
// (undocumented)
|
|
1101
|
+
onSave?: (editorView: EditorView) => void;
|
|
1102
|
+
performanceTracking?: PerformanceTracking;
|
|
1103
|
+
// (undocumented)
|
|
1104
|
+
primaryToolbarComponents?: PrimaryToolbarComponents;
|
|
1105
|
+
// (undocumented)
|
|
1106
|
+
sanitizePrivateContent?: boolean;
|
|
1107
|
+
// @deprecated (undocumented)
|
|
1108
|
+
smartLinks?: CardOptions;
|
|
1109
|
+
// @deprecated (undocumented)
|
|
1110
|
+
UNSAFE_cards?: CardOptions;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1090
1113
|
// @public (undocumented)
|
|
1091
1114
|
interface EditorViewProps {
|
|
1092
1115
|
// (undocumented)
|
|
@@ -1096,12 +1119,10 @@ interface EditorViewProps {
|
|
|
1096
1119
|
// (undocumented)
|
|
1097
1120
|
disabled?: boolean;
|
|
1098
1121
|
// (undocumented)
|
|
1099
|
-
editorProps: EditorProps;
|
|
1122
|
+
editorProps: EditorNextProps | EditorProps;
|
|
1100
1123
|
// (undocumented)
|
|
1101
1124
|
experienceStore?: ExperienceStore;
|
|
1102
1125
|
// (undocumented)
|
|
1103
|
-
getEditorPlugins?: GetEditorPlugins;
|
|
1104
|
-
// (undocumented)
|
|
1105
1126
|
onEditorCreated: (instance: {
|
|
1106
1127
|
view: EditorView;
|
|
1107
1128
|
config: EditorConfig;
|
|
@@ -1118,6 +1139,8 @@ interface EditorViewProps {
|
|
|
1118
1139
|
// (undocumented)
|
|
1119
1140
|
portalProviderAPI: PortalProviderAPI;
|
|
1120
1141
|
// (undocumented)
|
|
1142
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
1143
|
+
// (undocumented)
|
|
1121
1144
|
providerFactory: ProviderFactory;
|
|
1122
1145
|
// (undocumented)
|
|
1123
1146
|
render?: (props: {
|
|
@@ -1243,18 +1266,6 @@ export function getDefaultPresetOptionsFromEditorProps(
|
|
|
1243
1266
|
createAnalyticsEvent?: CreateUIAnalyticsEvent,
|
|
1244
1267
|
): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
1245
1268
|
|
|
1246
|
-
// @public (undocumented)
|
|
1247
|
-
type GetEditorPlugins = (props: GetEditorPluginsProps) => EditorPlugin[];
|
|
1248
|
-
|
|
1249
|
-
// @public (undocumented)
|
|
1250
|
-
type GetEditorPluginsProps = {
|
|
1251
|
-
props: EditorProps;
|
|
1252
|
-
prevAppearance?: EditorAppearance;
|
|
1253
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
1254
|
-
insertNodeAPI?: InsertNodeAPI;
|
|
1255
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
1256
|
-
};
|
|
1257
|
-
|
|
1258
1269
|
// @public (undocumented)
|
|
1259
1270
|
export const getListCommands: () => {
|
|
1260
1271
|
indentList: typeof indentList;
|
|
@@ -1469,20 +1480,6 @@ export const insertMediaSingleNode: (
|
|
|
1469
1480
|
alignLeftOnInsert?: boolean | undefined,
|
|
1470
1481
|
) => boolean;
|
|
1471
1482
|
|
|
1472
|
-
// @public (undocumented)
|
|
1473
|
-
type InsertNodeAPI = {
|
|
1474
|
-
insert: (props: InsertNodeConfig) => boolean;
|
|
1475
|
-
};
|
|
1476
|
-
|
|
1477
|
-
// @public (undocumented)
|
|
1478
|
-
type InsertNodeConfig = {
|
|
1479
|
-
node: 'table';
|
|
1480
|
-
options: {
|
|
1481
|
-
selectNodeInserted: boolean;
|
|
1482
|
-
analyticsPayload?: AnalyticsEventPayload;
|
|
1483
|
-
};
|
|
1484
|
-
};
|
|
1485
|
-
|
|
1486
1483
|
// @public (undocumented)
|
|
1487
1484
|
type InsertState = {
|
|
1488
1485
|
type: HyperlinkInsertStatus.INSERT_LINK_TOOLBAR;
|
|
@@ -1883,7 +1880,7 @@ export const mentionPluginKey: PluginKey<MentionPluginState, any>;
|
|
|
1883
1880
|
|
|
1884
1881
|
// @public (undocumented)
|
|
1885
1882
|
export type MentionPluginState = {
|
|
1886
|
-
mentionProvider?: MentionProvider_2
|
|
1883
|
+
mentionProvider?: MentionProvider_2;
|
|
1887
1884
|
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
1888
1885
|
mentions?: Array<MentionDescription>;
|
|
1889
1886
|
};
|
|
@@ -1984,7 +1981,6 @@ interface PanelPluginConfig {
|
|
|
1984
1981
|
|
|
1985
1982
|
// @public (undocumented)
|
|
1986
1983
|
type PastePluginOptions = {
|
|
1987
|
-
plainTextPasteLinkification?: boolean;
|
|
1988
1984
|
cardOptions?: CardOptions;
|
|
1989
1985
|
sanitizePrivateContent?: boolean;
|
|
1990
1986
|
};
|
|
@@ -2150,6 +2146,11 @@ export { PresenceProvider };
|
|
|
2150
2146
|
|
|
2151
2147
|
export { PresenceResource };
|
|
2152
2148
|
|
|
2149
|
+
// @public (undocumented)
|
|
2150
|
+
type PresetState = {
|
|
2151
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
2152
|
+
};
|
|
2153
|
+
|
|
2153
2154
|
// @public (undocumented)
|
|
2154
2155
|
type PrimaryToolbarComponents =
|
|
2155
2156
|
| BeforeAndAfterToolbarComponents
|
|
@@ -2342,10 +2343,10 @@ class ReactEditorView_2<T = {}> extends React_2.Component<
|
|
|
2342
2343
|
state?: EditorState<any> | undefined,
|
|
2343
2344
|
) => DirectEditorProps;
|
|
2344
2345
|
// (undocumented)
|
|
2346
|
+
getEditorState: () => EditorState<any> | undefined;
|
|
2347
|
+
// (undocumented)
|
|
2345
2348
|
getPlugins(
|
|
2346
|
-
|
|
2347
|
-
prevEditorProps?: EditorProps,
|
|
2348
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent,
|
|
2349
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>,
|
|
2349
2350
|
): EditorPlugin[];
|
|
2350
2351
|
// (undocumented)
|
|
2351
2352
|
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
@@ -2354,7 +2355,7 @@ class ReactEditorView_2<T = {}> extends React_2.Component<
|
|
|
2354
2355
|
// (undocumented)
|
|
2355
2356
|
proseMirrorRenderedSeverity?: SEVERITY;
|
|
2356
2357
|
// (undocumented)
|
|
2357
|
-
reconfigureState
|
|
2358
|
+
reconfigureState(props: EditorViewProps): void;
|
|
2358
2359
|
// (undocumented)
|
|
2359
2360
|
render(): JSX.Element;
|
|
2360
2361
|
// (undocumented)
|
|
@@ -2870,6 +2871,14 @@ export const updateStatusWithAnalytics: (
|
|
|
2870
2871
|
status?: StatusType | undefined,
|
|
2871
2872
|
) => Command;
|
|
2872
2873
|
|
|
2874
|
+
// @public (undocumented)
|
|
2875
|
+
type UseStickyToolbarType =
|
|
2876
|
+
| RefObject<HTMLElement>
|
|
2877
|
+
| boolean
|
|
2878
|
+
| {
|
|
2879
|
+
offsetTop: number;
|
|
2880
|
+
};
|
|
2881
|
+
|
|
2873
2882
|
// @public (undocumented)
|
|
2874
2883
|
export const version: string;
|
|
2875
2884
|
|
|
@@ -2936,8 +2945,8 @@ export { WithPluginState };
|
|
|
2936
2945
|
|
|
2937
2946
|
```json
|
|
2938
2947
|
{
|
|
2939
|
-
"@atlaskit/link-provider": "^1.
|
|
2940
|
-
"@atlaskit/media-core": "^34.0.
|
|
2948
|
+
"@atlaskit/link-provider": "^1.5.0",
|
|
2949
|
+
"@atlaskit/media-core": "^34.0.2",
|
|
2941
2950
|
"react": "^16.8.0",
|
|
2942
2951
|
"react-dom": "^16.8.0",
|
|
2943
2952
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.Preset = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _construct2 = _interopRequireDefault(require("@babel/runtime/helpers/construct"));
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var Preset = /*#__PURE__*/function () {
|
|
14
|
-
function Preset() {
|
|
15
|
-
(0, _classCallCheck2.default)(this, Preset);
|
|
16
|
-
for (var _len = arguments.length, more = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
-
more[_key] = arguments[_key];
|
|
18
|
-
}
|
|
19
|
-
this.data = [].concat(more) || [];
|
|
20
|
-
}
|
|
21
|
-
(0, _createClass2.default)(Preset, [{
|
|
22
|
-
key: "add",
|
|
23
|
-
value: function add(nextOrTuple) {
|
|
24
|
-
var newPreset = (0, _construct2.default)(Preset, [nextOrTuple].concat((0, _toConsumableArray2.default)(this.data)));
|
|
25
|
-
// TODO: remove this `this.data.push`,
|
|
26
|
-
// once refactoring `create-plugins-list` to address this complexity:
|
|
27
|
-
/**
|
|
28
|
-
* preset.add(x)
|
|
29
|
-
* preset.add(y)
|
|
30
|
-
* preset.add(z)
|
|
31
|
-
*/
|
|
32
|
-
// to:
|
|
33
|
-
/**
|
|
34
|
-
* immutablePreset = preset.add(x).add(foo).add(bar)
|
|
35
|
-
* presetWithY = presetWithY.add(y)
|
|
36
|
-
* presetWithZ = preset.add(z)
|
|
37
|
-
*/
|
|
38
|
-
this.data.push(nextOrTuple);
|
|
39
|
-
return newPreset;
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
key: "has",
|
|
43
|
-
value: function has(plugin) {
|
|
44
|
-
return this.data.some(function (pluginPreset) {
|
|
45
|
-
if (Array.isArray(pluginPreset)) {
|
|
46
|
-
return pluginPreset[0] === plugin;
|
|
47
|
-
}
|
|
48
|
-
return pluginPreset === plugin;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}, {
|
|
52
|
-
key: "getEditorPlugins",
|
|
53
|
-
value: function getEditorPlugins(excludes) {
|
|
54
|
-
var editorPlugins = this.processEditorPlugins();
|
|
55
|
-
return this.removeExcludedPlugins(editorPlugins, excludes);
|
|
56
|
-
}
|
|
57
|
-
}, {
|
|
58
|
-
key: "processEditorPlugins",
|
|
59
|
-
value: function processEditorPlugins() {
|
|
60
|
-
var cache = new Map();
|
|
61
|
-
this.data.forEach(function (pluginEntry) {
|
|
62
|
-
if (Array.isArray(pluginEntry)) {
|
|
63
|
-
var _pluginEntry = (0, _slicedToArray2.default)(pluginEntry, 2),
|
|
64
|
-
fn = _pluginEntry[0],
|
|
65
|
-
options = _pluginEntry[1];
|
|
66
|
-
cache.set(fn, options);
|
|
67
|
-
} else {
|
|
68
|
-
/**
|
|
69
|
-
* Prevent usage of same plugin twice without override.
|
|
70
|
-
* [
|
|
71
|
-
* plugin1,
|
|
72
|
-
* [plugin1, { option1: value }],
|
|
73
|
-
* plugin1, // This will throw
|
|
74
|
-
* ]
|
|
75
|
-
*/
|
|
76
|
-
if (cache.has(pluginEntry) && cache.get(pluginEntry) === undefined) {
|
|
77
|
-
throw new Error("".concat(pluginEntry, " is already included!"));
|
|
78
|
-
}
|
|
79
|
-
cache.set(pluginEntry, undefined);
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
var plugins = [];
|
|
83
|
-
cache.forEach(function (options, fn) {
|
|
84
|
-
plugins.push(fn(options));
|
|
85
|
-
});
|
|
86
|
-
return plugins;
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
key: "removeExcludedPlugins",
|
|
90
|
-
value: function removeExcludedPlugins(plugins, excludes) {
|
|
91
|
-
if (excludes) {
|
|
92
|
-
return plugins.filter(function (plugin) {
|
|
93
|
-
return !plugin || !excludes.has(plugin.name);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return plugins;
|
|
97
|
-
}
|
|
98
|
-
}]);
|
|
99
|
-
return Preset;
|
|
100
|
-
}();
|
|
101
|
-
exports.Preset = Preset;
|