@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
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export type { ProsemirrorGetPosHandler, ReactNodeProps, ReactComponentProps, getPosHandler, getPosHandlerNode, ForwardRef, } from './types';
|
|
2
2
|
export { default as ReactNodeView } from './ReactNodeView';
|
|
3
3
|
export { SelectionBasedNodeView } from './SelectionBasedNodeView';
|
|
4
|
-
export type { ContextAdaptersMap as ContextAdapter } from './context-adapter';
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import { Dispatch } from '../../../event-dispatcher';
|
|
2
|
-
import { Transaction } from 'prosemirror-state';
|
|
3
1
|
export declare type AlignmentState = 'start' | 'end' | 'center';
|
|
4
2
|
export declare type AlignmentPluginState = {
|
|
5
3
|
align: AlignmentState;
|
|
6
4
|
isEnabled?: boolean;
|
|
7
5
|
};
|
|
8
|
-
export declare type ActionHandlerParams = {
|
|
9
|
-
dispatch: Dispatch;
|
|
10
|
-
pluginState: AlignmentPluginState;
|
|
11
|
-
tr: Transaction;
|
|
12
|
-
params?: {
|
|
13
|
-
align?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -10,24 +10,7 @@ import { AnalyticsEventPayloadCallback } from '../analytics/utils';
|
|
|
10
10
|
* @param $pos Position to center search around
|
|
11
11
|
*/
|
|
12
12
|
export declare const surroundingMarks: ($pos: ResolvedPos) => Mark<any>[][];
|
|
13
|
-
/**
|
|
14
|
-
* Finds annotation marks, and returns their IDs.
|
|
15
|
-
* @param marks Array of marks to search in
|
|
16
|
-
*/
|
|
17
|
-
export declare const filterAnnotationIds: (marks: Array<Mark>) => Array<string>;
|
|
18
|
-
/**
|
|
19
|
-
* Re-orders the annotation array based on the order in the document.
|
|
20
|
-
*
|
|
21
|
-
* This places the marks that do not appear in the surrounding nodes
|
|
22
|
-
* higher in the list. That is, the inner-most one appears first.
|
|
23
|
-
*
|
|
24
|
-
* Undo, for example, can re-order annotation marks in the document.
|
|
25
|
-
* @param annotations annotation metadata
|
|
26
|
-
* @param $from location to look around (usually the selection)
|
|
27
|
-
*/
|
|
28
|
-
export declare const reorderAnnotations: (annotations: Array<AnnotationInfo>, $from: ResolvedPos) => void;
|
|
29
13
|
export declare const getAllAnnotations: (doc: Node) => string[];
|
|
30
|
-
export declare const getSelectionStartRect: () => ClientRect | null;
|
|
31
14
|
export declare const addDraftDecoration: (start: number, end: number) => Decoration<{
|
|
32
15
|
[key: string]: any;
|
|
33
16
|
} & import("prosemirror-view").InlineDecorationSpec>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from 'prosemirror-state';
|
|
3
|
-
|
|
3
|
+
declare type StateChangeHandler = (fromPos: number, toPos: number) => any;
|
|
4
4
|
export declare class ReactNodeViewState {
|
|
5
5
|
private changeHandlers;
|
|
6
6
|
constructor();
|
|
@@ -10,5 +10,4 @@ export declare class ReactNodeViewState {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const stateKey: PluginKey<ReactNodeViewState, any>;
|
|
12
12
|
export declare const plugin: SafePlugin<ReactNodeViewState, any>;
|
|
13
|
-
|
|
14
|
-
export default plugins;
|
|
13
|
+
export {};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { Schema
|
|
1
|
+
import { Schema } from 'prosemirror-model';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { FeatureFlags } from '../../../types/feature-flags';
|
|
4
|
-
|
|
5
|
-
export declare function headingRule(nodeType: NodeType, maxLevel: number): InputRuleWrapper;
|
|
6
|
-
export declare function blockQuoteRule(nodeType: NodeType): InputRuleWrapper;
|
|
7
|
-
export declare function codeBlockRule(nodeType: NodeType): InputRuleWrapper;
|
|
8
|
-
export declare function inputRulePlugin(schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
4
|
+
declare function inputRulePlugin(schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
9
5
|
export default inputRulePlugin;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { EditorView } from 'prosemirror-view';
|
|
5
3
|
import { SmartCardProps } from './genericCard';
|
|
6
|
-
import { ReactNodeView
|
|
7
|
-
export interface Props {
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
node: PMNode;
|
|
10
|
-
view: EditorView;
|
|
11
|
-
getPos: getPosHandler;
|
|
12
|
-
}
|
|
4
|
+
import { ReactNodeView } from '../../../nodeviews/';
|
|
13
5
|
export declare class BlockCardComponent extends React.PureComponent<SmartCardProps> {
|
|
14
6
|
private scrollContainer?;
|
|
15
7
|
onClick: () => void;
|
|
@@ -24,7 +16,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
24
16
|
gapCursorSpan: () => JSX.Element | undefined;
|
|
25
17
|
render(): JSX.Element;
|
|
26
18
|
}
|
|
27
|
-
export declare type BlockCardNodeViewProps = Pick<SmartCardProps, 'platform'>;
|
|
19
|
+
export declare type BlockCardNodeViewProps = Pick<SmartCardProps, 'platform' | 'showServerActions'>;
|
|
28
20
|
export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
|
|
29
21
|
createDomRef(): HTMLElement;
|
|
30
22
|
render(): JSX.Element;
|
|
@@ -26,6 +26,7 @@ export interface CardProps extends CardNodeViewProps {
|
|
|
26
26
|
allowResizing?: boolean;
|
|
27
27
|
fullWidthMode?: boolean;
|
|
28
28
|
useAlternativePreloader?: boolean;
|
|
29
|
+
showServerActions?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export interface SmartCardProps extends CardProps {
|
|
31
32
|
cardContext?: EditorContext<typeof SmartCardContext>;
|
|
@@ -18,5 +18,5 @@ export declare class InlineCardComponent extends React.PureComponent<SmartCardPr
|
|
|
18
18
|
}) => void;
|
|
19
19
|
render(): JSX.Element | null;
|
|
20
20
|
}
|
|
21
|
-
export declare type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader'>;
|
|
21
|
+
export declare type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'showServerActions'>;
|
|
22
22
|
export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps): JSX.Element;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { Command } from '../../types';
|
|
2
|
-
export declare type DomAtPos = (pos: number) => {
|
|
3
|
-
node: HTMLElement;
|
|
4
|
-
offset: number;
|
|
5
|
-
};
|
|
6
2
|
export declare const removeCodeBlock: Command;
|
|
7
3
|
export declare const changeLanguage: (language: string) => Command;
|
|
8
4
|
export declare const copyContentToClipboard: Command;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EditorState } from 'prosemirror-state';
|
|
2
|
-
import { CommandDispatch } from '../../../types';
|
|
3
2
|
export declare type CodeBlockState = {
|
|
4
3
|
pos: number | null;
|
|
5
4
|
contentCopied: boolean;
|
|
@@ -7,5 +6,3 @@ export declare type CodeBlockState = {
|
|
|
7
6
|
shouldIgnoreFollowingMutations: boolean;
|
|
8
7
|
};
|
|
9
8
|
export declare const getPluginState: (state: EditorState) => CodeBlockState;
|
|
10
|
-
export declare const setPluginState: (stateProps: Object) => (state: EditorState, dispatch: CommandDispatch) => boolean;
|
|
11
|
-
export declare type CodeBlockStateSubscriber = (state: CodeBlockState) => any;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { ARI, AVI, CollabEditProvider, CollabEvent, CollabEventData, Config, DocumentResponse, MixedResponse, Participant, PubSubClient, PubSubOnEvent, StepResponse, TelepointerData, } from './types';
|
|
1
|
+
export type { CollabEditProvider } from './types';
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { CollabEventTelepointerData as TelepointerData, CollabParticipant as Participant } from '@atlaskit/editor-common/collab';
|
|
3
|
-
export type { CollabEvent, CollabEventData, CollabEditProvider, } from '@atlaskit/editor-common/collab';
|
|
4
|
-
export type { TelepointerData, Participant };
|
|
5
|
-
export interface DocumentResponse {
|
|
6
|
-
version: number;
|
|
7
|
-
doc: any;
|
|
8
|
-
}
|
|
9
|
-
export interface StepResponse {
|
|
10
|
-
version: number;
|
|
11
|
-
steps: any[];
|
|
12
|
-
}
|
|
13
|
-
export declare type MixedResponse = DocumentResponse & StepResponse;
|
|
14
|
-
export interface Config extends ServiceConfig {
|
|
15
|
-
docId: string;
|
|
16
|
-
userId: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Same as PubSub client types (don't want a direct dep though)
|
|
20
|
-
*/
|
|
21
|
-
export declare type ARI = string;
|
|
22
|
-
export declare type AVI = string;
|
|
23
|
-
export interface PubSubOnEvent<T = any> {
|
|
24
|
-
(event: string, data: T): void;
|
|
25
|
-
}
|
|
26
|
-
export interface PubSubClient {
|
|
27
|
-
on(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
28
|
-
off(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
|
|
29
|
-
join(aris: ARI[]): Promise<PubSubClient>;
|
|
30
|
-
leave(aris: ARI[]): Promise<PubSubClient>;
|
|
31
|
-
}
|
|
32
|
-
export declare enum PubSubSpecialEventType {
|
|
33
|
-
ERROR = "ERROR",
|
|
34
|
-
CONNECTED = "CONNECTED",
|
|
35
|
-
RECONNECT = "RECONNECT"
|
|
36
|
-
}
|
|
1
|
+
export type { CollabEditProvider } from '@atlaskit/editor-common/collab';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PluginKey
|
|
2
|
+
import { PluginKey } from 'prosemirror-state';
|
|
3
3
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { ContextPanelHandler } from './types';
|
|
5
5
|
export declare const pluginKey: PluginKey<ContextPanelPluginState, any>;
|
|
6
|
-
|
|
6
|
+
declare type ContextPanelPluginState = {
|
|
7
7
|
handlers: ContextPanelHandler[];
|
|
8
8
|
contents: React.ReactNode[];
|
|
9
9
|
};
|
|
10
|
-
export declare function getPluginState(state: EditorState): any;
|
|
11
10
|
declare const contextPanelPlugin: NextEditorPlugin<'contextPanel'>;
|
|
12
11
|
export default contextPanelPlugin;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Plugin } from 'prosemirror-state';
|
|
2
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
export declare function createPlugin(): Plugin | undefined;
|
|
4
2
|
declare const dataConsumerMarkPlugin: NextEditorPlugin<'dataConsumerPlugin'>;
|
|
5
3
|
export default dataConsumerMarkPlugin;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateType } from '../types';
|
|
2
2
|
import { DateSegment } from '../types';
|
|
3
|
-
export declare function padToTwo(number: number): string;
|
|
4
3
|
/**
|
|
5
4
|
* Inconclusively check if a date string is valid - a value of false means it is definitely
|
|
6
5
|
* invalid, a value of true means it might be valid.
|
|
@@ -6,7 +6,6 @@ export declare function updateState(state: Partial<ExtensionState>): import("@at
|
|
|
6
6
|
export declare function setEditingContextToContextPanel<T extends Parameters = Parameters>(processParametersBefore: TransformBefore<T>, processParametersAfter: TransformAfter<T>): import("@atlaskit/editor-common/types").Command;
|
|
7
7
|
export declare const clearEditingContext: import("@atlaskit/editor-common/types").Command;
|
|
8
8
|
export declare const forceAutoSave: (resolve: () => void, reject?: ((reason?: any) => void) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
9
|
-
export declare const showContextPanel: import("@atlaskit/editor-common/types").Command;
|
|
10
9
|
export declare const updateExtensionLayout: (layout: ExtensionLayout) => import("@atlaskit/editor-common/types").Command;
|
|
11
10
|
export declare const removeExtension: () => import("@atlaskit/editor-common/types").Command;
|
|
12
11
|
export declare const removeDescendantNodes: (sourceNode?: PMNode<any> | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -10,11 +10,6 @@ import { EventDispatcher } from '../../../event-dispatcher';
|
|
|
10
10
|
interface ExtensionNodeViewOptions {
|
|
11
11
|
appearance?: EditorAppearance;
|
|
12
12
|
}
|
|
13
|
-
export interface Props {
|
|
14
|
-
node: PmNode;
|
|
15
|
-
providerFactory: ProviderFactory;
|
|
16
|
-
view: EditorView;
|
|
17
|
-
}
|
|
18
13
|
export declare class ExtensionNode extends ReactNodeView {
|
|
19
14
|
ignoreMutation(mutation: MutationRecord | {
|
|
20
15
|
type: 'selection';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { PluginKey } from 'prosemirror-state';
|
|
2
1
|
import type { FeedbackInfo } from '../../types';
|
|
3
2
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare const pluginKey: PluginKey<any, any>;
|
|
5
3
|
export declare const openFeedbackDialog: (feedbackInfo?: FeedbackInfo | undefined) => Promise<unknown>;
|
|
6
4
|
declare const feedbackDialog: NextEditorPlugin<'feedbackDialog', {
|
|
7
5
|
pluginConfiguration: FeedbackInfo;
|
|
@@ -15,6 +15,7 @@ export interface Props {
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
appearance?: ButtonAppearance;
|
|
17
17
|
ariaHasPopup?: boolean | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | undefined;
|
|
18
|
+
ariaLabel?: string;
|
|
18
19
|
href?: string;
|
|
19
20
|
target?: string;
|
|
20
21
|
children?: React.ReactNode;
|
|
@@ -23,6 +24,7 @@ export interface Props {
|
|
|
23
24
|
testId?: string;
|
|
24
25
|
hideTooltipOnClick?: boolean;
|
|
25
26
|
tabIndex?: number | null | undefined;
|
|
27
|
+
areaControls?: string;
|
|
26
28
|
}
|
|
27
|
-
declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, selected, disabled, href, target, appearance, children, className, tooltipContent, testId, hideTooltipOnClick, ariaHasPopup, tabIndex, }: Props) => JSX.Element;
|
|
29
|
+
declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, selected, disabled, href, target, appearance, children, className, tooltipContent, testId, hideTooltipOnClick, ariaHasPopup, tabIndex, areaControls, ariaLabel, }: Props) => JSX.Element;
|
|
28
30
|
export default _default;
|
|
@@ -2,5 +2,3 @@ import { Node } from 'prosemirror-model';
|
|
|
2
2
|
export declare const shallowEqual: (objA?: Object | undefined, objB?: Object | undefined) => boolean;
|
|
3
3
|
export declare const compareArrays: <T>(left: T[], right: T[], compareFn?: (left: T, right: T) => boolean) => boolean;
|
|
4
4
|
export declare function findNode(parent: Node, predicate: (node: Node) => boolean): Node | undefined;
|
|
5
|
-
export declare function getFocusableElements(rootNode: HTMLElement | null): HTMLElement[];
|
|
6
|
-
export declare function getFirstFocusableElement(rootNode: HTMLElement | null): HTMLElement;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
export declare function createPlugin(): SafePlugin;
|
|
4
2
|
declare const fragmentMarkPlugin: NextEditorPlugin<'fragmentPlugin'>;
|
|
5
3
|
export default fragmentMarkPlugin;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { Transaction } from 'prosemirror-state';
|
|
2
2
|
export declare const openHelpCommand: (tr: Transaction, dispatch?: Function | undefined) => boolean;
|
|
3
3
|
export declare const closeHelpCommand: (tr: Transaction, dispatch: Function) => void;
|
|
4
|
-
export declare const stopPropagationCommand: (e: Event) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
2
|
import { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
|
|
2
3
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
3
|
-
export declare const layoutStyles: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const layoutStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ResolvedPos } from 'prosemirror-model';
|
|
2
2
|
import { Transaction } from 'prosemirror-state';
|
|
3
3
|
export declare const getListLiftTarget: (resPos: ResolvedPos) => number;
|
|
4
|
-
export declare const getNextSiblingListItemPosition: ($pos: ResolvedPos) => ResolvedPos | null;
|
|
5
4
|
export declare const hasValidListIndentationLevel: ({ tr, maxIndentation, }: {
|
|
6
5
|
tr: Transaction;
|
|
7
6
|
maxIndentation: number;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Node as PMNode, NodeType } from 'prosemirror-model';
|
|
2
2
|
import { Transaction } from 'prosemirror-state';
|
|
3
|
-
export declare function isDocumentNode(node: PMNode | null | undefined): boolean;
|
|
4
3
|
export declare function isListNode(node: PMNode | null | undefined): boolean;
|
|
5
4
|
export declare function isParagraphNode(node: PMNode | null | undefined): boolean;
|
|
6
5
|
export declare function isListItemNode(node: PMNode | null | undefined): boolean;
|
|
7
6
|
export declare function isBulletList(node: PMNode | null | undefined): boolean;
|
|
8
|
-
export declare function isListNodeValidContent(node: PMNode): boolean;
|
|
9
7
|
export declare enum JoinDirection {
|
|
10
8
|
LEFT = 1,
|
|
11
9
|
RIGHT = -1
|
|
@@ -17,11 +17,8 @@ declare type NormalizeListItemsSelection = (props: {
|
|
|
17
17
|
doc: PMNode;
|
|
18
18
|
}) => Selection;
|
|
19
19
|
export declare const normalizeListItemsSelection: NormalizeListItemsSelection;
|
|
20
|
-
export declare const resolvePositionToStartOfListItem: ($pos: ResolvedPos) => ResolvedPos;
|
|
21
|
-
export declare const resolvePositionToEndOfListItem: ($pos: ResolvedPos) => ResolvedPos;
|
|
22
20
|
declare type CreateNodeRange = (props: {
|
|
23
21
|
selection: Selection;
|
|
24
22
|
}) => NodeRange | null;
|
|
25
23
|
export declare const createListNodeRange: CreateNodeRange;
|
|
26
|
-
export declare const createListItemNodeRange: CreateNodeRange;
|
|
27
24
|
export {};
|
|
@@ -14,12 +14,7 @@ export declare const posOfPrecedingMediaGroup: (state: EditorState) => number |
|
|
|
14
14
|
* or the selection is the entire paragraph
|
|
15
15
|
*/
|
|
16
16
|
export declare const isInsidePotentialEmptyParagraph: (state: EditorState) => boolean;
|
|
17
|
-
export declare const posOfMediaGroupBelow: (state: EditorState, $pos: ResolvedPos, prepend?: boolean) => number | undefined;
|
|
18
17
|
export declare const posOfParentMediaGroup: (state: EditorState, $pos?: ResolvedPos<any> | undefined, prepend?: boolean) => number | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* The function will return the position after current selection where mediaGroup can be inserted.
|
|
21
|
-
*/
|
|
22
|
-
export declare function endPositionForMedia(state: EditorState, resolvedPos: ResolvedPos): number;
|
|
23
18
|
export declare const removeMediaNode: (view: EditorView, node: PMNode, getPos: ProsemirrorGetPosHandler) => void;
|
|
24
19
|
export declare const splitMediaGroup: (view: EditorView) => boolean;
|
|
25
20
|
export declare const copyOptionalAttrsFromMediaState: (mediaState: MediaState, node: PMNode) => void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { MentionDescription, MentionProvider } from '@atlaskit/mention';
|
|
4
|
-
import { TeamMentionProvider } from '@atlaskit/mention/resource';
|
|
5
4
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
5
|
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
7
6
|
export interface TeamInfoAttrAnalytics {
|
|
@@ -19,7 +18,7 @@ export interface MentionPluginOptions extends MentionPluginConfig {
|
|
|
19
18
|
allowZeroWidthSpaceAfter?: boolean;
|
|
20
19
|
}
|
|
21
20
|
export declare type MentionPluginState = {
|
|
22
|
-
mentionProvider?: MentionProvider
|
|
21
|
+
mentionProvider?: MentionProvider;
|
|
23
22
|
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
24
23
|
mentions?: Array<MentionDescription>;
|
|
25
24
|
};
|
|
@@ -2,14 +2,13 @@ import { MentionDescription } from '@atlaskit/mention/resource';
|
|
|
2
2
|
import { UserRole } from '@atlaskit/mention';
|
|
3
3
|
import React, { SyntheticEvent } from 'react';
|
|
4
4
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
-
|
|
5
|
+
interface OnMentionEvent {
|
|
6
6
|
(mention: MentionDescription, event?: SyntheticEvent<any>): void;
|
|
7
7
|
}
|
|
8
|
-
export declare const INVITE_ITEM_MIN_HEIGHT: number;
|
|
9
8
|
export declare const INVITE_ITEM_DESCRIPTION: {
|
|
10
9
|
id: string;
|
|
11
10
|
};
|
|
12
|
-
|
|
11
|
+
interface Props {
|
|
13
12
|
productName?: string;
|
|
14
13
|
onMount?: () => void;
|
|
15
14
|
onMouseEnter?: OnMentionEvent;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export interface MentionItemStyleProps {
|
|
2
|
-
selected?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export interface NameSectionStyleProps {
|
|
5
|
-
restricted?: boolean;
|
|
6
|
-
}
|
|
7
1
|
export declare const ROW_SIDE_PADDING = 14;
|
|
8
2
|
export declare const rowStyle: import("@emotion/react").SerializedStyles;
|
|
9
3
|
export declare const AVATAR_HEIGHT = 36;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
|
|
4
|
+
interface Props {
|
|
5
5
|
editorView?: EditorView;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
testId?: string;
|
|
8
8
|
}
|
|
9
|
-
export interface State {
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
}
|
|
12
9
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
13
10
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
14
11
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
3
3
|
export declare type PastePluginOptions = {
|
|
4
|
-
plainTextPasteLinkification?: boolean;
|
|
5
4
|
cardOptions?: CardOptions;
|
|
6
5
|
sanitizePrivateContent?: boolean;
|
|
7
6
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { AnalyticsEventPayload, PasteType, PasteContent } from '../../analytics';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
-
import { Slice, Fragment } from 'prosemirror-model';
|
|
3
|
+
import { Slice, Fragment, Schema } from 'prosemirror-model';
|
|
4
4
|
import { Command } from '../../../types';
|
|
5
|
-
import { EditorState } from 'prosemirror-state';
|
|
6
5
|
declare type PasteContext = {
|
|
7
6
|
type: PasteType;
|
|
8
7
|
asPlain?: boolean;
|
|
@@ -11,7 +10,11 @@ declare type PasteContext = {
|
|
|
11
10
|
/** Did this paste action split a list in half? */
|
|
12
11
|
pasteSplitList?: boolean;
|
|
13
12
|
};
|
|
14
|
-
|
|
13
|
+
declare type GetContentProps = {
|
|
14
|
+
schema: Schema;
|
|
15
|
+
slice: Slice;
|
|
16
|
+
};
|
|
17
|
+
export declare function getContent({ schema, slice }: GetContentProps): PasteContent;
|
|
15
18
|
export declare function getMediaTraceId(slice: Slice): undefined;
|
|
16
19
|
export declare function createPasteAnalyticsPayload(view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext): AnalyticsEventPayload;
|
|
17
20
|
export declare function sendPasteAnalyticsEvent(view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext): void;
|
|
@@ -3,15 +3,9 @@ import { EditorState, Selection, Transaction } from 'prosemirror-state';
|
|
|
3
3
|
import { PasteSource } from '../../analytics';
|
|
4
4
|
export declare function isPastedFromWord(html?: string): boolean;
|
|
5
5
|
export declare function isPastedFromExcel(html?: string): boolean;
|
|
6
|
-
export declare function isPastedFromDropboxPaper(html?: string): boolean;
|
|
7
|
-
export declare function isPastedFromGoogleDocs(html?: string): boolean;
|
|
8
|
-
export declare function isPastedFromGoogleSpreadSheets(html?: string): boolean;
|
|
9
|
-
export declare function isPastedFromPages(html?: string): boolean;
|
|
10
|
-
export declare function isPastedFromFabricEditor(html?: string): boolean;
|
|
11
6
|
export declare const isSingleLine: (text: string) => boolean;
|
|
12
7
|
export declare function htmlContainsSingleFile(html: string): boolean;
|
|
13
8
|
export declare function getPasteSource(event: ClipboardEvent): PasteSource;
|
|
14
|
-
export declare function isCode(str: string): boolean;
|
|
15
9
|
export declare function escapeLinks(text: string): string;
|
|
16
10
|
export declare function hasOnlyNodesOfType(...nodeTypes: NodeType[]): (slice: Slice) => boolean;
|
|
17
11
|
export declare function applyTextMarksToSlice(schema: Schema, marks?: Mark<any>[]): (slice: Slice) => Slice;
|
|
@@ -19,10 +19,8 @@ export declare const IconPanelNote: React.ComponentType<IconProps> & Loadable.Lo
|
|
|
19
19
|
export declare const IconPanelSuccess: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
20
20
|
export declare const IconPanelWarning: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
21
21
|
export declare const IconPanel: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
22
|
-
export declare const IconCustomPanel: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
23
22
|
export declare const IconQuote: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
24
23
|
export declare const IconStatus: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
25
|
-
export declare const IconFallback: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
26
24
|
declare type HeadingProps = IconProps & {
|
|
27
25
|
level: HeadingLevels;
|
|
28
26
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
2
1
|
import { Selection, Transaction } from 'prosemirror-state';
|
|
3
2
|
import { StatusType } from './types';
|
|
4
3
|
export declare const mayGetStatusAtSelection: (selection: Selection) => StatusType | null;
|
|
5
|
-
export declare const mayGetStatusAtPos: (pos: number | null, doc: PMNode) => StatusType | null;
|
|
6
4
|
export declare const isEmptyStatus: (node: StatusType) => boolean;
|
|
7
|
-
export declare const setSelectionNearPos: (tr: Transaction, pos: number) => Transaction;
|
|
8
5
|
export declare const setNodeSelectionNearPos: (tr: Transaction, pos: number) => Transaction;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
2
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
-
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
3
|
import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
|
|
6
4
|
import { PortalProviderAPI } from '../../../ui/PortalProvider';
|
|
7
|
-
export interface TaskDecisionPluginState {
|
|
8
|
-
currentTaskDecisionItem: PMNode | undefined;
|
|
9
|
-
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
10
|
-
}
|
|
11
5
|
export declare function createPlugin(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, useLongPressSelection?: boolean): SafePlugin<any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import {
|
|
2
|
+
import { PluginKey } from 'prosemirror-state';
|
|
3
3
|
import { Dispatch } from '../../../event-dispatcher';
|
|
4
4
|
import { PaletteColor } from '../../../ui/ColorPalette/Palettes/type';
|
|
5
5
|
export { DEFAULT_COLOR } from '../utils/color';
|
|
@@ -9,16 +9,7 @@ export declare type TextColorPluginState = {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
color: string | null;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
dispatch: Dispatch;
|
|
14
|
-
pluginState: TextColorPluginState;
|
|
15
|
-
tr: Transaction;
|
|
16
|
-
params?: {
|
|
17
|
-
color?: string;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare type TextColorDefaultColor = {
|
|
12
|
+
declare type TextColorDefaultColor = {
|
|
22
13
|
color: string;
|
|
23
14
|
label: string;
|
|
24
15
|
};
|
|
@@ -27,7 +18,6 @@ export interface TextColorPluginConfig {
|
|
|
27
18
|
/** @deprecated [ED-15849] Color selection palette now shows more colors by default. */
|
|
28
19
|
allowMoreTextColors?: boolean;
|
|
29
20
|
}
|
|
30
|
-
export declare function createInitialPluginState(editorState: EditorState, pluginConfig?: TextColorPluginConfig): TextColorPluginState;
|
|
31
21
|
export declare enum ACTIONS {
|
|
32
22
|
RESET_COLOR = 0,
|
|
33
23
|
SET_COLOR = 1,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from 'prosemirror-state';
|
|
3
3
|
import { Dispatch } from '../../../event-dispatcher';
|
|
4
|
-
export declare type StateChangeHandler = (state: ClearFormattingState) => any;
|
|
5
4
|
export interface ClearFormattingState {
|
|
6
5
|
formattingIsPresent?: boolean;
|
|
7
6
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { MarkType, Mark as PMMark } from 'prosemirror-model';
|
|
2
2
|
import { EditorState } from 'prosemirror-state';
|
|
3
3
|
import { MenuIconItem } from './ui/Toolbar/types';
|
|
4
|
-
export declare const nodeLen: (node: Node) => number;
|
|
5
|
-
export declare const isIgnorable: (dom: any) => boolean;
|
|
6
|
-
export declare const isBlockNode: (dom: any) => boolean;
|
|
7
|
-
export declare const domIndex: (node: Node | null) => number | undefined;
|
|
8
4
|
export declare const hasCode: (state: EditorState, pos: number) => boolean;
|
|
9
5
|
/**
|
|
10
6
|
* Determine if a mark (with specific attribute values) exists anywhere in the selection.
|
|
@@ -2,10 +2,6 @@ export declare const TYPE_AHEAD_DECORATION_KEY = "typeahead_decoration_key";
|
|
|
2
2
|
export declare const TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = "typeaheadDecoration";
|
|
3
3
|
export declare const TYPE_AHEAD_POPUP_CONTENT_CLASS = "fabric-editor-typeahead";
|
|
4
4
|
export declare const TYPE_AHEAD_DECORATION_ELEMENT_ID = "typeahaed_decoration_element_id";
|
|
5
|
-
export declare enum NavigationDirection {
|
|
6
|
-
LEFT = -1,
|
|
7
|
-
RIGHT = 1
|
|
8
|
-
}
|
|
9
5
|
export declare enum CloseSelectionOptions {
|
|
10
6
|
BEFORE_TEXT_INSERTED = "BEFORE_TEXT_INSERTED",
|
|
11
7
|
AFTER_TEXT_INSERTED = "AFTER_TEXT_INSERTED"
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Selection } from 'prosemirror-state';
|
|
2
|
-
import { DecorationSet } from 'prosemirror-view';
|
|
3
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
2
|
import { IntlShape } from 'react-intl-next';
|
|
5
3
|
import type { CreateTypeAheadDecorations, RemoveTypeAheadDecorations, PopupMountPointReference } from '../types';
|
|
@@ -13,12 +11,4 @@ declare type FactoryReturn = {
|
|
|
13
11
|
removeDecorations: RemoveTypeAheadDecorations;
|
|
14
12
|
};
|
|
15
13
|
export declare const factoryDecorations: ({ intl, popupMountRef, createAnalyticsEvent, }: FactoryProps) => FactoryReturn;
|
|
16
|
-
export declare const isSelectionInsideTypeAhead: ({ decorationSet, selection, }: {
|
|
17
|
-
decorationSet?: DecorationSet<any> | undefined;
|
|
18
|
-
selection: Selection;
|
|
19
|
-
}) => boolean;
|
|
20
|
-
export declare const findDecorationElement: ({ selection, decorationSet, }: {
|
|
21
|
-
selection: Selection;
|
|
22
|
-
decorationSet?: DecorationSet<any> | undefined;
|
|
23
|
-
}) => HTMLElement | null;
|
|
24
14
|
export {};
|