@atlaskit/editor-core 180.1.0 → 181.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -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 +37 -5
- package/dist/cjs/create-editor/feature-flags-from-props.js +31 -26
- 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/index.js +4 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +6 -37
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/cjs/plugins/type-ahead/utils.js +25 -24
- 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 +32 -5
- package/dist/es2019/create-editor/feature-flags-from-props.js +31 -26
- 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/index.js +4 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +4 -37
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/es2019/plugins/type-ahead/utils.js +22 -25
- 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 +36 -5
- package/dist/esm/create-editor/feature-flags-from-props.js +31 -26
- 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/index.js +4 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +4 -33
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/esm/plugins/type-ahead/utils.js +24 -22
- 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/index.d.ts +1 -0
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +2 -11
- package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +3 -3
- 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/dist/esm/utils/index.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import { toggleMark } from 'prosemirror-commands';
|
|
2
|
-
import { Fragment, Slice } from 'prosemirror-model';
|
|
3
2
|
import { NodeSelection, TextSelection } from 'prosemirror-state';
|
|
4
|
-
import { findWrapping, liftTarget } from 'prosemirror-transform';
|
|
5
3
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
6
4
|
import { FakeTextCursorSelection } from '../plugins/fake-text-cursor/cursor';
|
|
7
5
|
import { hasParentNodeOfType } from 'prosemirror-utils';
|
|
8
6
|
import { isNodeEmpty } from './document';
|
|
9
7
|
import { atTheBeginningOfDoc, atTheEndOfDoc } from './prosemirror/position';
|
|
8
|
+
import { isMediaNode } from '@atlaskit/editor-common/utils';
|
|
10
9
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
11
10
|
export { isEmptyParagraph, hasVisibleContent, isNodeEmpty, isEmptyDocument, processRawValue, getStepRange, findFarthestParentNode, isSelectionEndOfParagraph, nodesBetweenChanged, getNodesCount } from './document';
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export { normaliseNestedLayout, setNodeSelection, setAllSelection, setGapCursorSelection, setCellSelection, setTextSelection, isValidPosition } from './selection';
|
|
16
|
-
export { containsClassName } from './dom';
|
|
11
|
+
export { sanitiseMarksInSelection } from './mark';
|
|
12
|
+
export { isParagraph, isText, isLinkMark } from './nodes';
|
|
13
|
+
export { normaliseNestedLayout, setNodeSelection, setGapCursorSelection, setTextSelection } from './selection';
|
|
17
14
|
export { default as measurements } from './performance/measure-enum';
|
|
18
|
-
function validateNode(_node) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
15
|
function isMarkTypeCompatibleWithMark(markType, mark) {
|
|
22
16
|
return !mark.type.excludes(markType) && !markType.excludes(mark.type);
|
|
23
17
|
}
|
|
@@ -25,23 +19,12 @@ function isMarkTypeAllowedInNode(markType, state) {
|
|
|
25
19
|
return toggleMark(markType)(state);
|
|
26
20
|
}
|
|
27
21
|
export function canMoveUp(state) {
|
|
28
|
-
var selection = state.selection
|
|
29
|
-
doc = state.doc;
|
|
30
|
-
|
|
22
|
+
var selection = state.selection;
|
|
31
23
|
/**
|
|
32
|
-
* If there's a media element on the selection
|
|
33
|
-
* add text blocks with arrow navigation.
|
|
34
|
-
* Also, the selection could be media | mediaGroup.
|
|
24
|
+
* If there's a media element on the selection it will use a gap cursor to move
|
|
35
25
|
*/
|
|
36
|
-
if (selection instanceof NodeSelection) {
|
|
37
|
-
|
|
38
|
-
/** Weird way of checking if the previous element is a paragraph */
|
|
39
|
-
var mediaAncestorNode = doc.nodeAt(selection.anchor - 3);
|
|
40
|
-
return !!(mediaAncestorNode && mediaAncestorNode.type.name === 'paragraph');
|
|
41
|
-
} else if (selection.node.type.name === 'mediaGroup') {
|
|
42
|
-
var mediaGroupAncestorNode = selection.$anchor.nodeBefore;
|
|
43
|
-
return !!(mediaGroupAncestorNode && mediaGroupAncestorNode.type.name === 'paragraph');
|
|
44
|
-
}
|
|
26
|
+
if (selection instanceof NodeSelection && isMediaNode(selection.node)) {
|
|
27
|
+
return true;
|
|
45
28
|
}
|
|
46
29
|
if (selection instanceof TextSelection) {
|
|
47
30
|
if (!selection.empty) {
|
|
@@ -51,21 +34,13 @@ export function canMoveUp(state) {
|
|
|
51
34
|
return !atTheBeginningOfDoc(state);
|
|
52
35
|
}
|
|
53
36
|
export function canMoveDown(state) {
|
|
54
|
-
var selection = state.selection
|
|
55
|
-
doc = state.doc;
|
|
37
|
+
var selection = state.selection;
|
|
56
38
|
|
|
57
39
|
/**
|
|
58
|
-
* If there's a media element on the selection
|
|
59
|
-
* add text blocks with arrow navigation.
|
|
60
|
-
* Also, the selection could be media | mediaGroup.
|
|
40
|
+
* If there's a media element on the selection it will use a gap cursor to move
|
|
61
41
|
*/
|
|
62
|
-
if (selection instanceof NodeSelection) {
|
|
63
|
-
|
|
64
|
-
var nodeAfter = doc.nodeAt(selection.$head.after());
|
|
65
|
-
return !!(nodeAfter && nodeAfter.type.name === 'paragraph');
|
|
66
|
-
} else if (selection.node.type.name === 'mediaGroup') {
|
|
67
|
-
return !(selection.$head.parentOffset === selection.$anchor.parent.content.size);
|
|
68
|
-
}
|
|
42
|
+
if (selection instanceof NodeSelection && isMediaNode(selection.node)) {
|
|
43
|
+
return true;
|
|
69
44
|
}
|
|
70
45
|
if (selection instanceof TextSelection) {
|
|
71
46
|
if (!selection.empty) {
|
|
@@ -126,19 +101,6 @@ export function isMarkTypeAllowedInCurrentSelection(markType, state) {
|
|
|
126
101
|
return allowedInActiveMarks;
|
|
127
102
|
});
|
|
128
103
|
}
|
|
129
|
-
export function createSliceWithContent(content, state) {
|
|
130
|
-
return new Slice(Fragment.from(state.schema.text(content)), 0, 0);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Determines if content inside a selection can be joined with the next block.
|
|
135
|
-
* We need this check since the built-in method for "joinDown" will join a orderedList with bulletList.
|
|
136
|
-
*/
|
|
137
|
-
export function canJoinDown(selection, doc, nodeType) {
|
|
138
|
-
return checkNodeDown(selection, doc, function (node) {
|
|
139
|
-
return node.type === nodeType;
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
104
|
export function checkNodeDown(selection, doc, filter) {
|
|
143
105
|
var ancestorDepth = findAncestorPosition(doc, selection.$to).depth;
|
|
144
106
|
|
|
@@ -150,65 +112,10 @@ export function checkNodeDown(selection, doc, filter) {
|
|
|
150
112
|
return res.nodeAfter ? filter(res.nodeAfter) : false;
|
|
151
113
|
}
|
|
152
114
|
|
|
153
|
-
/**
|
|
154
|
-
* Determines if content inside a selection can be joined with the previous block.
|
|
155
|
-
* We need this check since the built-in method for "joinUp" will join a orderedList with bulletList.
|
|
156
|
-
*/
|
|
157
|
-
export function canJoinUp(selection, doc, nodeType) {
|
|
158
|
-
var res = doc.resolve(selection.$from.before(findAncestorPosition(doc, selection.$from).depth));
|
|
159
|
-
return res.nodeBefore && res.nodeBefore.type === nodeType;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Finds all "selection-groups" within a range. A selection group is based on ancestors.
|
|
164
|
-
*
|
|
165
|
-
* Example:
|
|
166
|
-
* Given the following document and selection ({<} = start of selection and {>} = end)
|
|
167
|
-
* doc
|
|
168
|
-
* blockquote
|
|
169
|
-
* ul
|
|
170
|
-
* li
|
|
171
|
-
* li{<}
|
|
172
|
-
* li
|
|
173
|
-
* p
|
|
174
|
-
* p{>}
|
|
175
|
-
*
|
|
176
|
-
* The output will be two selection-groups. One within the ul and one with the two paragraphs.
|
|
177
|
-
*/
|
|
178
|
-
export function getGroupsInRange(doc, $from, $to) {
|
|
179
|
-
var isNodeValid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : validateNode;
|
|
180
|
-
var groups = Array();
|
|
181
|
-
var commonAncestor = hasCommonAncestor(doc, $from, $to);
|
|
182
|
-
var fromAncestor = findAncestorPosition(doc, $from);
|
|
183
|
-
if (commonAncestor || fromAncestor.depth === 1 && isNodeValid($from.node(1))) {
|
|
184
|
-
groups.push({
|
|
185
|
-
$from: $from,
|
|
186
|
-
$to: $to
|
|
187
|
-
});
|
|
188
|
-
} else {
|
|
189
|
-
var current = $from;
|
|
190
|
-
while (current.pos < $to.pos) {
|
|
191
|
-
var ancestorPos = findAncestorPosition(doc, current);
|
|
192
|
-
while (ancestorPos.depth > 1) {
|
|
193
|
-
ancestorPos = findAncestorPosition(doc, ancestorPos);
|
|
194
|
-
}
|
|
195
|
-
var endPos = doc.resolve(Math.min(
|
|
196
|
-
// should not be smaller then start position in case of an empty paragraph for example.
|
|
197
|
-
Math.max(ancestorPos.start(ancestorPos.depth), ancestorPos.end(ancestorPos.depth) - 3), $to.pos));
|
|
198
|
-
groups.push({
|
|
199
|
-
$from: current,
|
|
200
|
-
$to: endPos
|
|
201
|
-
});
|
|
202
|
-
current = doc.resolve(Math.min(endPos.after(1) + 1, doc.nodeSize - 2));
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
return groups;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
115
|
/**
|
|
209
116
|
* Traverse the document until an "ancestor" is found. Any nestable block can be an ancestor.
|
|
210
117
|
*/
|
|
211
|
-
|
|
118
|
+
function findAncestorPosition(doc, pos) {
|
|
212
119
|
var nestableBlocks = ['blockquote', 'bulletList', 'orderedList'];
|
|
213
120
|
if (pos.depth === 1) {
|
|
214
121
|
return pos;
|
|
@@ -224,96 +131,6 @@ export function findAncestorPosition(doc, pos) {
|
|
|
224
131
|
}
|
|
225
132
|
return newPos;
|
|
226
133
|
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Determine if two positions have a common ancestor.
|
|
230
|
-
*/
|
|
231
|
-
export function hasCommonAncestor(doc, $from, $to) {
|
|
232
|
-
var current;
|
|
233
|
-
var target;
|
|
234
|
-
if ($from.depth > $to.depth) {
|
|
235
|
-
current = findAncestorPosition(doc, $from);
|
|
236
|
-
target = findAncestorPosition(doc, $to);
|
|
237
|
-
} else {
|
|
238
|
-
current = findAncestorPosition(doc, $to);
|
|
239
|
-
target = findAncestorPosition(doc, $from);
|
|
240
|
-
}
|
|
241
|
-
while (current.depth > target.depth && current.depth > 1) {
|
|
242
|
-
current = findAncestorPosition(doc, current);
|
|
243
|
-
}
|
|
244
|
-
return current.node(current.depth) === target.node(target.depth);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Takes a selection $from and $to and lift all text nodes from their parents to document-level
|
|
249
|
-
*/
|
|
250
|
-
export function liftSelection(tr, doc, $from, $to) {
|
|
251
|
-
var startPos = $from.start($from.depth);
|
|
252
|
-
var endPos = $to.end($to.depth);
|
|
253
|
-
var target = Math.max(0, findAncestorPosition(doc, $from).depth - 1);
|
|
254
|
-
tr.doc.nodesBetween(startPos, endPos, function (node, pos) {
|
|
255
|
-
if (node.isText ||
|
|
256
|
-
// Text node
|
|
257
|
-
node.isTextblock && !node.textContent // Empty paragraph
|
|
258
|
-
) {
|
|
259
|
-
var res = tr.doc.resolve(tr.mapping.map(pos));
|
|
260
|
-
var sel = new NodeSelection(res);
|
|
261
|
-
var range = sel.$from.blockRange(sel.$to);
|
|
262
|
-
if (liftTarget(range) !== undefined) {
|
|
263
|
-
tr.lift(range, target);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
startPos = tr.mapping.map(startPos);
|
|
268
|
-
endPos = tr.mapping.map(endPos);
|
|
269
|
-
endPos = tr.doc.resolve(endPos).end(tr.doc.resolve(endPos).depth); // We want to select the entire node
|
|
270
|
-
|
|
271
|
-
tr.setSelection(new TextSelection(tr.doc.resolve(startPos), tr.doc.resolve(endPos)));
|
|
272
|
-
return {
|
|
273
|
-
tr: tr,
|
|
274
|
-
$from: tr.doc.resolve(startPos),
|
|
275
|
-
$to: tr.doc.resolve(endPos)
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Lift nodes in block to one level above.
|
|
281
|
-
*/
|
|
282
|
-
export function liftSiblingNodes(view) {
|
|
283
|
-
var tr = view.state.tr;
|
|
284
|
-
var _view$state$selection = view.state.selection,
|
|
285
|
-
$from = _view$state$selection.$from,
|
|
286
|
-
$to = _view$state$selection.$to;
|
|
287
|
-
var blockStart = tr.doc.resolve($from.start($from.depth - 1));
|
|
288
|
-
var blockEnd = tr.doc.resolve($to.end($to.depth - 1));
|
|
289
|
-
var range = blockStart.blockRange(blockEnd);
|
|
290
|
-
view.dispatch(tr.lift(range, blockStart.depth - 1));
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Lift sibling nodes to document-level and select them.
|
|
295
|
-
*/
|
|
296
|
-
export function liftAndSelectSiblingNodes(view) {
|
|
297
|
-
var tr = view.state.tr;
|
|
298
|
-
var _view$state$selection2 = view.state.selection,
|
|
299
|
-
$from = _view$state$selection2.$from,
|
|
300
|
-
$to = _view$state$selection2.$to;
|
|
301
|
-
var blockStart = tr.doc.resolve($from.start($from.depth - 1));
|
|
302
|
-
var blockEnd = tr.doc.resolve($to.end($to.depth - 1));
|
|
303
|
-
// TODO: [ts30] handle void and null properly
|
|
304
|
-
var range = blockStart.blockRange(blockEnd);
|
|
305
|
-
tr.setSelection(new TextSelection(blockStart, blockEnd));
|
|
306
|
-
tr.lift(range, blockStart.depth - 1);
|
|
307
|
-
return tr;
|
|
308
|
-
}
|
|
309
|
-
export function wrapIn(nodeType, tr, $from, $to) {
|
|
310
|
-
var range = $from.blockRange($to);
|
|
311
|
-
var wrapping = range && findWrapping(range, nodeType);
|
|
312
|
-
if (wrapping) {
|
|
313
|
-
tr = tr.wrap(range, wrapping).scrollIntoView();
|
|
314
|
-
}
|
|
315
|
-
return tr;
|
|
316
|
-
}
|
|
317
134
|
var transformer = new JSONTransformer();
|
|
318
135
|
export function toJSON(node) {
|
|
319
136
|
return transformer.encode(node);
|
|
@@ -24,19 +24,6 @@ export var ruleWithAnalytics = function ruleWithAnalytics(getPayload) {
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
export var ruleWithTransform = function ruleWithTransform(transform) {
|
|
28
|
-
return function (originalRule) {
|
|
29
|
-
var onHandlerApply = function onHandlerApply(state, tr, matchResult) {
|
|
30
|
-
transform(state, tr);
|
|
31
|
-
if (originalRule.onHandlerApply) {
|
|
32
|
-
originalRule.onHandlerApply(state, tr, matchResult);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
return _objectSpread(_objectSpread({}, originalRule), {}, {
|
|
36
|
-
onHandlerApply: onHandlerApply
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
27
|
export var createRule = function createRule(match, handler) {
|
|
41
28
|
return {
|
|
42
29
|
match: match,
|
package/dist/esm/version.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Node } from 'prosemirror-model';
|
|
2
|
-
import {
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
import { EventDispatcher } from '../event-dispatcher';
|
|
2
|
+
import { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue } from '@atlaskit/editor-common/types';
|
|
5
3
|
import { AnalyticsEventPayload } from '@atlaskit/analytics-next/AnalyticsEvent';
|
|
6
|
-
import { Transformer } from '@atlaskit/editor-common/types';
|
|
7
4
|
import { ResolvedEditorState } from '@atlaskit/editor-common/collab';
|
|
5
|
+
import { Transformer } from '@atlaskit/editor-common/types';
|
|
6
|
+
import { EditorView } from 'prosemirror-view';
|
|
7
|
+
import { EventDispatcher } from '../event-dispatcher';
|
|
8
8
|
export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
9
9
|
private editorView?;
|
|
10
10
|
private contentTransformer?;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ReactEditorView as BaseReactEditorView } from './ReactEditorViewInternal';
|
|
3
3
|
export declare class ReactEditorView<T = {}> extends BaseReactEditorView<T> {
|
|
4
|
-
static defaultProps: {
|
|
5
|
-
getEditorPlugins: import("../types/get-editor-props").GetEditorPlugins;
|
|
6
|
-
};
|
|
7
4
|
}
|
|
8
5
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<import("./ReactEditorViewInternal").EditorViewProps & import("react-intl-next").WrappedComponentProps<"intl">>> & {
|
|
9
6
|
WrappedComponent: import("react").ComponentType<import("./ReactEditorViewInternal").EditorViewProps & import("react-intl-next").WrappedComponentProps<"intl">>;
|
|
@@ -8,21 +8,21 @@ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
8
8
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
9
9
|
import { ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
11
|
-
import { Transformer } from '@atlaskit/editor-common/types';
|
|
11
|
+
import { Transformer, AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
|
|
12
12
|
import { Dispatch, EventDispatcher } from '../event-dispatcher';
|
|
13
13
|
import { AnalyticsEventPayload, DispatchAnalyticsEvent, FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
import { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
|
|
15
|
+
import type { EditorNextProps } from '../types/editor-props';
|
|
15
16
|
import { PortalProviderAPI } from '../ui/PortalProvider';
|
|
16
17
|
import { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
17
18
|
import { TransactionTracker } from '../utils/performance/track-transactions';
|
|
18
19
|
import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
19
|
-
import {
|
|
20
|
+
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
20
21
|
export interface EditorViewProps {
|
|
21
|
-
editorProps: EditorProps;
|
|
22
|
+
editorProps: EditorProps | EditorNextProps;
|
|
22
23
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
23
24
|
providerFactory: ProviderFactory;
|
|
24
25
|
portalProviderAPI: PortalProviderAPI;
|
|
25
|
-
getEditorPlugins?: GetEditorPlugins;
|
|
26
26
|
allowAnalyticsGASV3?: boolean;
|
|
27
27
|
disabled?: boolean;
|
|
28
28
|
experienceStore?: ExperienceStore;
|
|
@@ -47,8 +47,8 @@ export interface EditorViewProps {
|
|
|
47
47
|
eventDispatcher: EventDispatcher;
|
|
48
48
|
transformer?: Transformer<string>;
|
|
49
49
|
}) => void;
|
|
50
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
50
51
|
}
|
|
51
|
-
export declare function shouldReconfigureState(props: EditorProps, nextProps: EditorProps): boolean;
|
|
52
52
|
interface CreateEditorStateOptions {
|
|
53
53
|
props: EditorViewProps;
|
|
54
54
|
context: EditorReactContext;
|
|
@@ -77,11 +77,13 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
77
77
|
private reliabilityInterval?;
|
|
78
78
|
private pluginPerformanceObserver;
|
|
79
79
|
private featureFlags;
|
|
80
|
+
private pluginInjectionAPI;
|
|
80
81
|
private onPluginObservation;
|
|
81
82
|
get transactionTracking(): import("../types/performance-tracking").TransactionTracking;
|
|
82
83
|
private getPluginNames;
|
|
83
84
|
private countNodes;
|
|
84
85
|
constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
|
|
86
|
+
getEditorState: () => EditorState<any> | undefined;
|
|
85
87
|
UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
|
|
86
88
|
formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
|
|
87
89
|
resetEditorState: ({ doc, shouldScrollToBottom, }: {
|
|
@@ -89,7 +91,7 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
89
91
|
shouldScrollToBottom: boolean;
|
|
90
92
|
}) => void;
|
|
91
93
|
blur: () => void;
|
|
92
|
-
reconfigureState
|
|
94
|
+
reconfigureState(props: EditorViewProps): void;
|
|
93
95
|
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
94
96
|
componentDidMount(): void;
|
|
95
97
|
/**
|
|
@@ -97,7 +99,7 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
97
99
|
*/
|
|
98
100
|
componentWillUnmount(): void;
|
|
99
101
|
private editorPlugins;
|
|
100
|
-
getPlugins(
|
|
102
|
+
getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
|
|
101
103
|
createEditorState: (options: CreateEditorStateOptions) => EditorState<any>;
|
|
102
104
|
private onEditorViewStateUpdated;
|
|
103
105
|
private trackValidTransactions;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EditorViewProps } from './ReactEditorViewInternal';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps<"intl"> & Required<Pick<EditorViewProps & WrappedComponentProps<"intl">, "getEditorPlugins">>>;
|
|
4
|
+
export declare function ReactEditorViewEditor<T = {}>(props: EditorViewProps & WrappedComponentProps & T): JSX.Element;
|
|
5
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps<"intl">>> & {
|
|
6
|
+
WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps<"intl">>;
|
|
8
7
|
};
|
|
9
8
|
export default _default;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { EditorPlugin, EditorProps } from '../types';
|
|
3
3
|
import { EditorPluginFeatureProps } from '../types/editor-props';
|
|
4
|
-
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { InsertNodeAPI } from '../insert-api/types';
|
|
6
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
8
4
|
import { ScrollGutterPluginOptions } from '../plugins/base/pm-plugins/scroll-gutter';
|
|
9
5
|
import { DefaultPresetPluginOptions } from '../labs/next/presets/default';
|
|
10
6
|
import { EditorPresetProps } from '../labs/next/presets/types';
|
|
7
|
+
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
11
8
|
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
12
9
|
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
13
10
|
/**
|
|
@@ -16,4 +13,5 @@ export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProp
|
|
|
16
13
|
* Note: The order that presets are added determines
|
|
17
14
|
* their placement in the editor toolbar
|
|
18
15
|
*/
|
|
19
|
-
export default function createPluginsList(props: EditorProps, prevProps?: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent
|
|
16
|
+
export default function createPluginsList(props: EditorProps, prevProps?: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPlugin[];
|
|
17
|
+
export declare function createPreset(props: EditorProps, prevProps?: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetBuilder<any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Transformer } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { Transformer, AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
@@ -7,11 +7,11 @@ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
|
7
7
|
import EditorActions from '../actions';
|
|
8
8
|
import { EventDispatcher } from '../event-dispatcher';
|
|
9
9
|
import { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
10
|
-
import { EditorProps } from '../types/editor-props';
|
|
10
|
+
import { EditorProps, EditorNextProps } from '../types/editor-props';
|
|
11
11
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
12
|
-
import {
|
|
13
|
-
interface Props {
|
|
14
|
-
props:
|
|
12
|
+
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
13
|
+
interface Props<PropsType> {
|
|
14
|
+
props: PropsType;
|
|
15
15
|
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
16
16
|
createAnalyticsEvent: CreateUIAnalyticsEvent;
|
|
17
17
|
handleSave: (view: EditorView) => void;
|
|
@@ -26,19 +26,19 @@ interface Props {
|
|
|
26
26
|
view: EditorView;
|
|
27
27
|
transformer?: Transformer<string>;
|
|
28
28
|
}) => void;
|
|
29
|
-
|
|
29
|
+
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
30
30
|
}
|
|
31
|
-
interface InternalProps extends Omit<Props
|
|
31
|
+
interface InternalProps extends Omit<Props<EditorNextProps | EditorProps>, 'getExperienceStore'> {
|
|
32
32
|
providerFactory: ProviderFactory;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* EditorInternal is used for the internal editor react component
|
|
36
36
|
* with the lifecycle methods extracted into hooks.
|
|
37
37
|
*/
|
|
38
|
-
export default function EditorInternal(props: Props): jsx.JSX.Element;
|
|
38
|
+
export default function EditorInternal(props: Props<EditorNextProps>): jsx.JSX.Element;
|
|
39
39
|
/**
|
|
40
40
|
* EditorInternalComponent is used to capture the common component
|
|
41
41
|
* from the `render` method of `Editor` and share it with `EditorNext`.
|
|
42
42
|
*/
|
|
43
|
-
export declare function EditorInternalWithoutHooks({ props, handleAnalyticsEvent, createAnalyticsEvent, handleSave, editorActions, providerFactory, onEditorCreated, onEditorDestroyed,
|
|
43
|
+
export declare function EditorInternalWithoutHooks({ props, handleAnalyticsEvent, createAnalyticsEvent, handleSave, editorActions, providerFactory, onEditorCreated, onEditorDestroyed, preset, }: InternalProps): jsx.JSX.Element;
|
|
44
44
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
3
|
-
import { EditorProps } from '../../types/editor-props';
|
|
3
|
+
import { EditorProps, EditorNextProps } from '../../types/editor-props';
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* Hook to run the analytics for the Editor component.
|
|
@@ -10,4 +10,4 @@ import { EditorProps } from '../../types/editor-props';
|
|
|
10
10
|
* @param getExperienceStore function to retrieve the Editor's current ExperienceStore
|
|
11
11
|
* @param createAnalyticsEvent
|
|
12
12
|
*/
|
|
13
|
-
export default function useMeasureEditorMountTime(props: EditorProps, getExperienceStore: () => ExperienceStore | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent): void;
|
|
13
|
+
export default function useMeasureEditorMountTime(props: EditorProps | EditorNextProps, getExperienceStore: () => ExperienceStore | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import {
|
|
2
|
+
import { EditorNextProps } from '../../types/editor-props';
|
|
3
3
|
import EditorActions from '../../actions';
|
|
4
4
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import { QuickInsertProvider } from '../../plugins/quick-insert/types';
|
|
@@ -18,4 +18,4 @@ export declare type ProviderFactoryState = {
|
|
|
18
18
|
* @param createAnalyticsEvent
|
|
19
19
|
* @returns ProviderFactory for Editor
|
|
20
20
|
*/
|
|
21
|
-
export default function useProviderFactory(props:
|
|
21
|
+
export default function useProviderFactory(props: EditorNextProps, editorActions: EditorActions, createAnalyticsEvent: CreateUIAnalyticsEvent): ProviderFactory;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { EditorNextProps } from '../types/editor-props';
|
|
5
5
|
import { Context } from './utils/editorPropTypes';
|
|
6
|
-
export default class EditorNext extends React.Component<
|
|
6
|
+
export default class EditorNext extends React.Component<EditorNextProps> {
|
|
7
7
|
/**
|
|
8
8
|
* WARNING: Code should be shared between Editor + EditorNext
|
|
9
9
|
* If you are making changes that affect both, consider making them
|
|
10
10
|
* in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
|
|
11
11
|
*/
|
|
12
|
-
static defaultProps: EditorProps;
|
|
12
|
+
static defaultProps: import("../types/editor-props").EditorProps;
|
|
13
13
|
static contextTypes: {
|
|
14
14
|
editorActions: PropTypes.Requireable<object>;
|
|
15
15
|
};
|
|
16
16
|
static propTypes: {
|
|
17
|
-
|
|
17
|
+
preset: ({ preset }: Pick<EditorNextProps, 'preset'>) => Error | null;
|
|
18
|
+
minHeight: ({ appearance, minHeight, }: Pick<import("../types/editor-props").EditorProps, "appearance" | "minHeight">) => Error | null;
|
|
18
19
|
};
|
|
19
20
|
private editorActions;
|
|
20
21
|
private createAnalyticsEvent?;
|
|
21
22
|
private editorSessionId;
|
|
22
23
|
private experienceStore?;
|
|
23
24
|
private startTime?;
|
|
24
|
-
constructor(props:
|
|
25
|
+
constructor(props: EditorNextProps, context: Context);
|
|
25
26
|
private onEditorCreated;
|
|
26
27
|
private onEditorDestroyed;
|
|
27
28
|
private handleSave;
|
|
@@ -30,5 +31,4 @@ export default class EditorNext extends React.Component<EditorProps> {
|
|
|
30
31
|
private unregisterEditorFromActions;
|
|
31
32
|
private getExperienceStore;
|
|
32
33
|
render(): jsx.JSX.Element;
|
|
33
|
-
private getEditorPlugins;
|
|
34
34
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EditorProps } from '../../types/editor-props';
|
|
2
|
-
export default function deprecationWarnings(props: EditorProps): void;
|
|
1
|
+
import { EditorProps, EditorNextProps } from '../../types/editor-props';
|
|
2
|
+
export default function deprecationWarnings(props: EditorProps | EditorNextProps): void;
|
|
@@ -14,6 +14,6 @@ export declare type Context = {
|
|
|
14
14
|
* @returns Editor prop-types
|
|
15
15
|
*/
|
|
16
16
|
export declare function propTypes(errorMessage: string): {
|
|
17
|
-
minHeight: ({ appearance, minHeight }: EditorProps) => Error | null;
|
|
17
|
+
minHeight: ({ appearance, minHeight, }: Pick<EditorProps, 'appearance' | 'minHeight'>) => Error | null;
|
|
18
18
|
};
|
|
19
19
|
export declare const defaultProps: EditorProps;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
import { EditorProps } from '../../types/editor-props';
|
|
3
|
+
declare type Complete<T> = {
|
|
4
|
+
[P in keyof Required<T>]: Pick<T, P> extends Required<Pick<T, P>> ? T[P] : T[P] | undefined;
|
|
5
|
+
};
|
|
6
|
+
declare type EditorProviderProps = Pick<EditorProps, 'linking' | 'smartLinks' | 'UNSAFE_cards' | 'autoformattingProvider' | 'media' | 'emojiProvider' | 'mentionProvider' | 'taskDecisionProvider' | 'contextIdentifierProvider' | 'searchProvider' | 'macroProvider' | 'activityProvider' | 'collabEdit' | 'collabEditProvider' | 'presenceProvider' | 'legacyImageUploadProvider'>;
|
|
7
|
+
declare type RequiredProviders = Complete<Omit<Providers, 'reactionsStore' | 'profilecardProvider' | 'extensionProvider' | 'quickInsertProvider'>>;
|
|
8
|
+
export default function getProvidersFromEditorProps({ linking, smartLinks, UNSAFE_cards, autoformattingProvider, media, emojiProvider, mentionProvider, legacyImageUploadProvider, taskDecisionProvider, contextIdentifierProvider, searchProvider, macroProvider, activityProvider, collabEdit, collabEditProvider, presenceProvider, }: EditorProviderProps): RequiredProviders;
|
|
9
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
2
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
3
4
|
import { QuickInsertProvider } from '../../plugins/quick-insert/types';
|
|
4
|
-
import { EditorProps } from '../../types/editor-props';
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
* Utility to set all the providers on a provider factory
|
|
@@ -11,4 +11,4 @@ import { EditorProps } from '../../types/editor-props';
|
|
|
11
11
|
* @param extensionProvider
|
|
12
12
|
* @param quickInsertProvider
|
|
13
13
|
*/
|
|
14
|
-
export default function handleProviders(providerFactory: ProviderFactory,
|
|
14
|
+
export default function handleProviders(providerFactory: ProviderFactory, { emojiProvider, mentionProvider, taskDecisionProvider, contextIdentifierProvider, collabEditProvider, activityProvider, presenceProvider, macroProvider, imageUploadProvider, mediaProvider, autoformattingProvider, searchProvider, cardProvider, }: Providers, extensionProvider?: ExtensionProvider, quickInsertProvider?: Promise<QuickInsertProvider>): void;
|
|
@@ -4,9 +4,9 @@ import { Transformer } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
import { EditorView } from 'prosemirror-view';
|
|
5
5
|
import EditorActions from '../../actions';
|
|
6
6
|
import { EventDispatcher } from '../../event-dispatcher';
|
|
7
|
-
import { EditorProps } from '../../types/editor-props';
|
|
7
|
+
import { EditorProps, EditorNextProps } from '../../types/editor-props';
|
|
8
8
|
export default function onEditorCreated(instance: {
|
|
9
9
|
view: EditorView;
|
|
10
10
|
eventDispatcher: EventDispatcher;
|
|
11
11
|
transformer?: Transformer<string>;
|
|
12
|
-
}, props: EditorProps, setExperienceStore: (experienceStore: ExperienceStore) => void, getExperienceStore: () => ExperienceStore | undefined, getCreateAnalyticsEvent: () => CreateUIAnalyticsEvent | undefined, editorActions: EditorActions, startTime: number | undefined, registerEditorForActions: (editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<string>) => void): void;
|
|
12
|
+
}, props: EditorProps | EditorNextProps, setExperienceStore: (experienceStore: ExperienceStore) => void, getExperienceStore: () => ExperienceStore | undefined, getCreateAnalyticsEvent: () => CreateUIAnalyticsEvent | undefined, editorActions: EditorActions, startTime: number | undefined, registerEditorForActions: (editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<string>) => void): void;
|
|
@@ -12,4 +12,4 @@ import { EditorProps } from '../../types/editor-props';
|
|
|
12
12
|
* @param getCreateAnalyticsEvent return the CreateUIAnalyticsEvent of the Editor
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
export default function sendDurationAnalytics(action: ACTION.EDITOR_MOUNTED | ACTION.ON_EDITOR_READY_CALLBACK, props: EditorProps, getExperienceStore: () => ExperienceStore | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined): (duration: number, startTime: number) => Promise<void>;
|
|
15
|
+
export default function sendDurationAnalytics(action: ACTION.EDITOR_MOUNTED | ACTION.ON_EDITOR_READY_CALLBACK, props: Pick<EditorProps, 'contextIdentifierProvider' | 'featureFlags'>, getExperienceStore: () => ExperienceStore | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined): (duration: number, startTime: number) => Promise<void>;
|