@atlaskit/editor-core 202.5.0 → 203.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 +58 -0
- package/dist/cjs/actions/index.js +6 -1
- package/dist/cjs/composable-editor/composable-editor.js +2 -2
- package/dist/cjs/create-editor/ReactEditorView.js +3 -3
- package/dist/cjs/create-editor/ReactEditorViewNext.js +3 -3
- package/dist/cjs/create-editor/create-editor.js +2 -2
- package/dist/cjs/create-editor/create-plugins-list.js +1 -1
- package/dist/cjs/create-editor/create-schema.js +3 -3
- package/dist/cjs/create-editor/get-ui-component.js +4 -4
- package/dist/cjs/editor-appearances/CommentEditor.js +2 -2
- package/dist/cjs/editor-appearances/FullPageEditor.js +2 -2
- package/dist/cjs/editor-appearances/FullWidthEditor.js +2 -2
- package/dist/cjs/editor.js +2 -1
- package/dist/cjs/index.js +4 -10
- package/dist/cjs/test-utils.js +4 -23
- package/dist/cjs/ui/Appearance/Comment/Comment.js +8 -8
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
- package/dist/cjs/ui/ContentStyles/layout.js +2 -14
- package/dist/cjs/ui/PluginSlot/index.js +2 -2
- package/dist/cjs/ui/Toolbar/Toolbar.js +1 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +1 -1
- package/dist/cjs/ui/Toolbar/toolbar-size.js +1 -1
- package/dist/cjs/ui/WithHelpTrigger/index.js +1 -1
- package/dist/cjs/utils/{index.js → whichTransitionEvent.js} +0 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +6 -1
- package/dist/es2019/composable-editor/composable-editor.js +1 -1
- package/dist/es2019/composable-editor.js +3 -0
- package/dist/es2019/create-editor/ReactEditorView.js +2 -2
- package/dist/es2019/create-editor/ReactEditorViewNext.js +2 -2
- package/dist/es2019/create-editor/create-editor.js +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +1 -1
- package/dist/es2019/create-editor/create-schema.js +1 -1
- package/dist/es2019/create-editor/get-ui-component.js +2 -2
- package/dist/es2019/editor-appearances/CommentEditor.js +1 -1
- package/dist/es2019/editor-appearances/FullPageEditor.js +1 -1
- package/dist/es2019/editor-appearances/FullWidthEditor.js +1 -1
- package/dist/es2019/editor-context.js +3 -0
- package/dist/es2019/editor.js +3 -0
- package/dist/es2019/i18n/index.js +3 -0
- package/dist/es2019/index.js +6 -2
- package/dist/es2019/labs-next.js +3 -0
- package/dist/es2019/preset-default.js +3 -0
- package/dist/es2019/preset-universal.js +3 -0
- package/dist/es2019/test-utils.js +4 -3
- package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/es2019/ui/ContentStyles/layout.js +11 -7
- package/dist/es2019/ui/PluginSlot/index.js +1 -1
- package/dist/es2019/ui/Toolbar/Toolbar.js +1 -1
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +1 -1
- package/dist/es2019/ui/Toolbar/toolbar-size.js +1 -2
- package/dist/es2019/ui/WithHelpTrigger/index.js +1 -1
- package/dist/es2019/utils/{index.js → whichTransitionEvent.js} +0 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +6 -1
- package/dist/esm/composable-editor/composable-editor.js +1 -1
- package/dist/esm/composable-editor.js +3 -0
- package/dist/esm/create-editor/ReactEditorView.js +2 -2
- package/dist/esm/create-editor/ReactEditorViewNext.js +2 -2
- package/dist/esm/create-editor/create-editor.js +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +1 -1
- package/dist/esm/create-editor/create-schema.js +1 -1
- package/dist/esm/create-editor/get-ui-component.js +2 -2
- package/dist/esm/editor-appearances/CommentEditor.js +1 -1
- package/dist/esm/editor-appearances/FullPageEditor.js +1 -1
- package/dist/esm/editor-appearances/FullWidthEditor.js +1 -1
- package/dist/esm/editor-context.js +3 -0
- package/dist/esm/editor.js +3 -0
- package/dist/esm/i18n/index.js +3 -0
- package/dist/esm/index.js +6 -2
- package/dist/esm/labs-next.js +3 -0
- package/dist/esm/preset-default.js +3 -0
- package/dist/esm/preset-universal.js +3 -0
- package/dist/esm/test-utils.js +4 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +3 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/esm/ui/ContentStyles/layout.js +2 -3
- package/dist/esm/ui/PluginSlot/index.js +1 -1
- package/dist/esm/ui/Toolbar/Toolbar.js +1 -1
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +1 -1
- package/dist/esm/ui/Toolbar/toolbar-size.js +1 -2
- package/dist/esm/ui/WithHelpTrigger/index.js +1 -1
- package/dist/esm/utils/{index.js → whichTransitionEvent.js} +0 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/actions/index.d.ts +5 -1
- package/dist/types/composable-editor/editor-internal.d.ts +1 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types/create-editor/ReactEditorView/formatFullWidthAppearance.d.ts +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +4 -4
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +1 -1
- package/dist/types/create-editor/create-editor.d.ts +2 -1
- package/dist/types/create-editor/create-plugins-list.d.ts +2 -1
- package/dist/types/create-editor/create-schema.d.ts +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +202 -101
- package/dist/types/create-editor/feature-flags-from-props.d.ts +1 -1
- package/dist/types/create-editor/get-plugins.d.ts +2 -4
- package/dist/types/create-editor/get-ui-component.d.ts +2 -1
- package/dist/types/editor.d.ts +1 -2
- package/dist/types/index.d.ts +3 -4
- package/dist/types/presets/default.d.ts +158 -70
- package/dist/types/presets/universal.d.ts +203 -103
- package/dist/types/presets/useUniversalPreset.d.ts +202 -101
- package/dist/types/test-utils.d.ts +1 -7
- package/dist/types/types/editor-appearance-component.d.ts +2 -6
- package/dist/types/types/editor-config.d.ts +1 -4
- package/dist/types/types/editor-instance.d.ts +2 -3
- package/dist/types/types/editor-props.d.ts +4 -8
- package/dist/types/types/index.d.ts +0 -9
- package/dist/types/types/pm-plugin-list.d.ts +1 -1
- package/dist/types/ui/Appearance/Chromeless.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +3 -4
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -3
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +4 -4
- package/dist/types/ui/ContentStyles/index.d.ts +3 -3
- package/dist/types/ui/ContentStyles/layout.d.ts +0 -2
- package/dist/types/ui/PluginSlot/index.d.ts +2 -3
- package/dist/types/ui/Toolbar/toolbar-size.d.ts +2 -2
- package/dist/types/ui/Toolbar/toolbar-types.d.ts +1 -2
- package/dist/types/utils/is-full-page.d.ts +1 -1
- package/dist/types/utils/performance/plugin-performance-observer.d.ts +2 -1
- package/dist/types/utils/performance/plugin-performance-report.d.ts +1 -2
- package/dist/types/utils/performance/track-transactions.d.ts +1 -1
- package/dist/types/utils/whichTransitionEvent.d.ts +1 -0
- package/dist/types-ts4.5/actions/index.d.ts +5 -1
- package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView/formatFullWidthAppearance.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +4 -4
- package/dist/types-ts4.5/create-editor/ReactEditorViewNext.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/create-editor.d.ts +2 -1
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +2 -1
- package/dist/types-ts4.5/create-editor/create-schema.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +239 -101
- package/dist/types-ts4.5/create-editor/feature-flags-from-props.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -4
- package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +2 -1
- package/dist/types-ts4.5/editor.d.ts +1 -2
- package/dist/types-ts4.5/index.d.ts +3 -4
- package/dist/types-ts4.5/presets/default.d.ts +188 -70
- package/dist/types-ts4.5/presets/universal.d.ts +240 -103
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +239 -101
- package/dist/types-ts4.5/test-utils.d.ts +1 -7
- package/dist/types-ts4.5/types/editor-appearance-component.d.ts +2 -6
- package/dist/types-ts4.5/types/editor-config.d.ts +1 -4
- package/dist/types-ts4.5/types/editor-instance.d.ts +2 -3
- package/dist/types-ts4.5/types/editor-props.d.ts +4 -8
- package/dist/types-ts4.5/types/index.d.ts +0 -9
- package/dist/types-ts4.5/types/pm-plugin-list.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +3 -4
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -3
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +4 -4
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +0 -2
- package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +2 -3
- package/dist/types-ts4.5/ui/Toolbar/toolbar-size.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/toolbar-types.d.ts +1 -2
- package/dist/types-ts4.5/utils/is-full-page.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/plugin-performance-observer.d.ts +2 -1
- package/dist/types-ts4.5/utils/performance/plugin-performance-report.d.ts +1 -2
- package/dist/types-ts4.5/utils/performance/track-transactions.d.ts +1 -1
- package/dist/types-ts4.5/utils/whichTransitionEvent.d.ts +1 -0
- package/package.json +14 -17
- package/dist/cjs/create-editor/ReactEditorViewContext.js +0 -8
- package/dist/cjs/create-editor/index.js +0 -42
- package/dist/cjs/create-editor/sort-by-order.js +0 -18
- package/dist/cjs/element-browser.js +0 -12
- package/dist/cjs/event-dispatcher/index.js +0 -18
- package/dist/cjs/messages.js +0 -36
- package/dist/cjs/nodeviews/index.js +0 -1
- package/dist/cjs/preset-builder.js +0 -12
- package/dist/cjs/types/browser.js +0 -1
- package/dist/cjs/types/editor-appearance.js +0 -1
- package/dist/cjs/types/editor-plugin.js +0 -1
- package/dist/cjs/types/editor-react-context.js +0 -1
- package/dist/cjs/types/empty-state-handler.js +0 -1
- package/dist/cjs/types/feature-flags.js +0 -1
- package/dist/cjs/types/performance-tracking.js +0 -1
- package/dist/cjs/types/pm-config.js +0 -1
- package/dist/cjs/types/pm-plugin.js +0 -1
- package/dist/cjs/types/ui-components.js +0 -1
- package/dist/cjs/ui/Addon/index.js +0 -27
- package/dist/cjs/ui/Appearance/Comment/index.js +0 -12
- package/dist/cjs/ui/Appearance/FullPage/index.js +0 -12
- package/dist/cjs/ui/Toolbar/index.js +0 -26
- package/dist/cjs/ui/Toolbar/types.js +0 -36
- package/dist/es2019/create-editor/ReactEditorViewContext.js +0 -2
- package/dist/es2019/create-editor/index.js +0 -3
- package/dist/es2019/create-editor/sort-by-order.js +0 -1
- package/dist/es2019/element-browser.js +0 -1
- package/dist/es2019/event-dispatcher/index.js +0 -1
- package/dist/es2019/messages.js +0 -7
- package/dist/es2019/nodeviews/index.js +0 -0
- package/dist/es2019/preset-builder.js +0 -1
- package/dist/es2019/types/browser.js +0 -0
- package/dist/es2019/types/editor-appearance.js +0 -0
- package/dist/es2019/types/editor-plugin.js +0 -0
- package/dist/es2019/types/editor-react-context.js +0 -0
- package/dist/es2019/types/empty-state-handler.js +0 -0
- package/dist/es2019/types/feature-flags.js +0 -0
- package/dist/es2019/types/performance-tracking.js +0 -0
- package/dist/es2019/types/pm-config.js +0 -0
- package/dist/es2019/types/pm-plugin.js +0 -0
- package/dist/es2019/types/ui-components.js +0 -0
- package/dist/es2019/ui/Addon/index.js +0 -3
- package/dist/es2019/ui/Appearance/Comment/index.js +0 -1
- package/dist/es2019/ui/Appearance/FullPage/index.js +0 -1
- package/dist/es2019/ui/Toolbar/index.js +0 -3
- package/dist/es2019/ui/Toolbar/types.js +0 -1
- package/dist/esm/create-editor/ReactEditorViewContext.js +0 -2
- package/dist/esm/create-editor/index.js +0 -3
- package/dist/esm/create-editor/sort-by-order.js +0 -1
- package/dist/esm/element-browser.js +0 -1
- package/dist/esm/event-dispatcher/index.js +0 -1
- package/dist/esm/messages.js +0 -7
- package/dist/esm/nodeviews/index.js +0 -0
- package/dist/esm/preset-builder.js +0 -1
- package/dist/esm/types/browser.js +0 -0
- package/dist/esm/types/editor-appearance.js +0 -0
- package/dist/esm/types/editor-plugin.js +0 -0
- package/dist/esm/types/editor-react-context.js +0 -0
- package/dist/esm/types/empty-state-handler.js +0 -0
- package/dist/esm/types/feature-flags.js +0 -0
- package/dist/esm/types/performance-tracking.js +0 -0
- package/dist/esm/types/pm-config.js +0 -0
- package/dist/esm/types/pm-plugin.js +0 -0
- package/dist/esm/types/ui-components.js +0 -0
- package/dist/esm/ui/Addon/index.js +0 -3
- package/dist/esm/ui/Appearance/Comment/index.js +0 -1
- package/dist/esm/ui/Appearance/FullPage/index.js +0 -1
- package/dist/esm/ui/Toolbar/index.js +0 -3
- package/dist/esm/ui/Toolbar/types.js +0 -1
- package/dist/types/create-editor/ReactEditorViewContext.d.ts +0 -2
- package/dist/types/create-editor/index.d.ts +0 -3
- package/dist/types/create-editor/sort-by-order.d.ts +0 -1
- package/dist/types/element-browser.d.ts +0 -1
- package/dist/types/event-dispatcher/index.d.ts +0 -2
- package/dist/types/messages.d.ts +0 -6
- package/dist/types/nodeviews/index.d.ts +0 -1
- package/dist/types/preset-builder.d.ts +0 -1
- package/dist/types/types/browser.d.ts +0 -1
- package/dist/types/types/editor-appearance.d.ts +0 -1
- package/dist/types/types/editor-plugin.d.ts +0 -1
- package/dist/types/types/editor-react-context.d.ts +0 -1
- package/dist/types/types/empty-state-handler.d.ts +0 -1
- package/dist/types/types/feature-flags.d.ts +0 -1
- package/dist/types/types/performance-tracking.d.ts +0 -1
- package/dist/types/types/pm-config.d.ts +0 -1
- package/dist/types/types/pm-plugin.d.ts +0 -1
- package/dist/types/types/ui-components.d.ts +0 -1
- package/dist/types/ui/Addon/index.d.ts +0 -4
- package/dist/types/ui/Appearance/Comment/index.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/index.d.ts +0 -1
- package/dist/types/ui/Toolbar/index.d.ts +0 -4
- package/dist/types/ui/Toolbar/types.d.ts +0 -2
- package/dist/types/utils/index.d.ts +0 -3
- package/dist/types-ts4.5/create-editor/ReactEditorViewContext.d.ts +0 -2
- package/dist/types-ts4.5/create-editor/index.d.ts +0 -3
- package/dist/types-ts4.5/create-editor/sort-by-order.d.ts +0 -1
- package/dist/types-ts4.5/element-browser.d.ts +0 -1
- package/dist/types-ts4.5/event-dispatcher/index.d.ts +0 -2
- package/dist/types-ts4.5/messages.d.ts +0 -6
- package/dist/types-ts4.5/nodeviews/index.d.ts +0 -1
- package/dist/types-ts4.5/preset-builder.d.ts +0 -1
- package/dist/types-ts4.5/types/browser.d.ts +0 -1
- package/dist/types-ts4.5/types/editor-appearance.d.ts +0 -1
- package/dist/types-ts4.5/types/editor-plugin.d.ts +0 -1
- package/dist/types-ts4.5/types/editor-react-context.d.ts +0 -1
- package/dist/types-ts4.5/types/empty-state-handler.d.ts +0 -1
- package/dist/types-ts4.5/types/feature-flags.d.ts +0 -1
- package/dist/types-ts4.5/types/performance-tracking.d.ts +0 -1
- package/dist/types-ts4.5/types/pm-config.d.ts +0 -1
- package/dist/types-ts4.5/types/pm-plugin.d.ts +0 -1
- package/dist/types-ts4.5/types/ui-components.d.ts +0 -1
- package/dist/types-ts4.5/ui/Addon/index.d.ts +0 -4
- package/dist/types-ts4.5/ui/Appearance/Comment/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/Toolbar/index.d.ts +0 -4
- package/dist/types-ts4.5/ui/Toolbar/types.d.ts +0 -2
- package/dist/types-ts4.5/utils/index.d.ts +0 -3
- package/element-browser/package.json +0 -15
- package/messages/package.json +0 -15
- package/preset-builder/package.json +0 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
|
|
3
|
+
import { sortByOrder } from '@atlaskit/editor-common/legacy-rank-plugins';
|
|
3
4
|
import { createEditorStateNotificationPlugin } from './editorStateNotificationPlugin';
|
|
4
|
-
import { sortByOrder } from './sort-by-order';
|
|
5
5
|
export function sortByRank(a, b) {
|
|
6
6
|
return a.rank - b.rank;
|
|
7
7
|
}
|
|
@@ -20,7 +20,7 @@ export function getScrollGutterOptions(props) {
|
|
|
20
20
|
return undefined;
|
|
21
21
|
}
|
|
22
22
|
export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent
|
|
23
|
-
// Omit placeholder since it's an existing prop in `DefaultPresetPluginOptions` and will get
|
|
23
|
+
// Omit placeholder since it's an existing prop in `DefaultPresetPluginOptions` and will get overridden there
|
|
24
24
|
) {
|
|
25
25
|
var _props$linking, _props$textFormatting, _props$linking2;
|
|
26
26
|
var appearance = props.appearance;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import { sanitizeNodes } from '@atlaskit/adf-schema/schema';
|
|
3
|
+
import { sortByOrder } from '@atlaskit/editor-common/legacy-rank-plugins';
|
|
3
4
|
import { createProseMirrorMetadata } from '@atlaskit/editor-common/prosemirror-dom-metadata';
|
|
4
5
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { fixExcludes } from './create-editor';
|
|
7
|
-
import { sortByOrder } from './sort-by-order';
|
|
8
8
|
/**
|
|
9
9
|
* 🧱 Internal Helper Function: Editor FE Platform
|
|
10
10
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Chromeless from '../ui/Appearance/Chromeless';
|
|
2
|
-
import Comment from '../ui/Appearance/Comment';
|
|
3
|
-
import FullPage from '../ui/Appearance/FullPage';
|
|
2
|
+
import { CommentEditorWithIntl as Comment } from '../ui/Appearance/Comment/Comment';
|
|
3
|
+
import { FullPageEditor as FullPage } from '../ui/Appearance/FullPage/FullPage';
|
|
4
4
|
export default function getUiComponent(appearance) {
|
|
5
5
|
appearance = appearance || 'comment';
|
|
6
6
|
switch (appearance) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CoreEditor } from '../composable-editor/core-editor';
|
|
4
|
-
import Comment from '../ui/Appearance/Comment';
|
|
4
|
+
import { CommentEditorWithIntl as Comment } from '../ui/Appearance/Comment/Comment';
|
|
5
5
|
/**
|
|
6
6
|
* Editor component based on `ComposableEditor` which sets the `appearance` to "comment".
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CoreEditor } from '../composable-editor/core-editor';
|
|
4
|
-
import FullPage from '../ui/Appearance/FullPage';
|
|
4
|
+
import { FullPageEditor as FullPage } from '../ui/Appearance/FullPage/FullPage';
|
|
5
5
|
/**
|
|
6
6
|
* Editor component based on `ComposableEditor` which sets the `appearance` to "full-page".
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { CoreEditor } from '../composable-editor/core-editor';
|
|
4
|
-
import FullPage from '../ui/Appearance/FullPage';
|
|
4
|
+
import { FullPageEditor as FullPage } from '../ui/Appearance/FullPage/FullPage';
|
|
5
5
|
/**
|
|
6
6
|
* Editor component based on `ComposableEditor` which sets the `appearance` to "full-width".
|
|
7
7
|
*
|
package/dist/esm/editor.js
CHANGED
|
@@ -7,6 +7,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
import _extends from "@babel/runtime/helpers/extends";
|
|
8
8
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
|
+
// Disable no-re-export rule for entry point files
|
|
11
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
14
|
* @jsxRuntime classic
|
|
12
15
|
* @jsx jsx
|
package/dist/esm/i18n/index.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// Disable no-re-export rule for entry point files
|
|
2
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
|
+
|
|
1
4
|
// Used in products integration code
|
|
2
5
|
export { name, version } from './version-wrapper';
|
|
3
6
|
export { default as Editor } from './editor';
|
|
@@ -23,8 +26,9 @@ export {
|
|
|
23
26
|
* DO NOT USE THIS WILL BE REMOVED SOON. This was intended for internal usage only
|
|
24
27
|
*/
|
|
25
28
|
ContextPanel } from './ui/ContextPanel';
|
|
29
|
+
|
|
26
30
|
// Used in editor-test-helpers and mobile bridge
|
|
27
|
-
export { getNodesCount
|
|
28
|
-
export {
|
|
31
|
+
export { getNodesCount } from './utils/getNodesCount';
|
|
32
|
+
export { default as measurements } from './utils/performance/measure-enum';
|
|
29
33
|
export { default as EditorActions } from './actions';
|
|
30
34
|
export { createEditorContentStyle } from './ui/ContentStyles';
|
package/dist/esm/labs-next.js
CHANGED
package/dist/esm/test-utils.js
CHANGED
|
@@ -2,11 +2,14 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
// Disable no-re-export rule for entry point files
|
|
6
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
7
|
+
|
|
8
|
+
import { sortByOrder } from '@atlaskit/editor-common/legacy-rank-plugins';
|
|
5
9
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
6
10
|
import { basePlugin } from '@atlaskit/editor-plugins/base';
|
|
7
11
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
12
|
import { createSchema } from './create-editor/create-schema';
|
|
9
|
-
import { sortByOrder } from './create-editor/sort-by-order';
|
|
10
13
|
function lightProcessPluginsList(editorPlugins) {
|
|
11
14
|
/**
|
|
12
15
|
* First pass to collect pluginsOptions
|
|
@@ -90,8 +93,6 @@ export var createPMSchemaAndPlugins = function createPMSchemaAndPlugins() {
|
|
|
90
93
|
};
|
|
91
94
|
};
|
|
92
95
|
};
|
|
93
|
-
export { EventDispatcher } from './event-dispatcher';
|
|
94
|
-
export { GapCursorSelection, Side as GapCursorSide } from '@atlaskit/editor-common/selection';
|
|
95
96
|
export function setTextSelection(view, anchor, head) {
|
|
96
97
|
var state = view.state;
|
|
97
98
|
var tr = state.tr.setSelection(TextSelection.create(state.doc, anchor, head));
|
|
@@ -12,16 +12,16 @@ import { useIntl } from 'react-intl-next';
|
|
|
12
12
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
13
13
|
import Button from '@atlaskit/button/new';
|
|
14
14
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
15
|
+
import messages from '@atlaskit/editor-common/messages';
|
|
15
16
|
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
16
17
|
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
17
18
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
18
19
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
19
20
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
20
|
-
import
|
|
21
|
-
import { ClickAreaBlock } from '../../Addon';
|
|
21
|
+
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
22
22
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
23
23
|
import PluginSlot from '../../PluginSlot';
|
|
24
|
-
import Toolbar from '../../Toolbar';
|
|
24
|
+
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
25
25
|
import WithFlash from '../../WithFlash';
|
|
26
26
|
import { MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
|
|
27
27
|
var CommentEditorMargin = 14;
|
|
@@ -10,7 +10,7 @@ import { jsx, useTheme } from '@emotion/react';
|
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
-
import
|
|
13
|
+
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
14
14
|
import { ContextPanel } from '../../ContextPanel';
|
|
15
15
|
import PluginSlot from '../../PluginSlot';
|
|
16
16
|
import { contentArea, contentAreaHeightNoToolbar, contentAreaWrapper, contentAreaWrapperNoStyles, editorContentAreaStyle, editorContentGutterStyle, ScrollContainer, sidebarArea } from './StyledComponents';
|
|
@@ -12,7 +12,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
12
12
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
13
13
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
14
14
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
15
|
-
import Toolbar from '../../Toolbar';
|
|
15
|
+
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
16
16
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
17
17
|
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
18
18
|
export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
@@ -8,7 +8,6 @@ import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/cons
|
|
|
8
8
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
|
-
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
12
11
|
var isPreRelease2 = function isPreRelease2() {
|
|
13
12
|
return editorExperiment('advanced_layouts', true) || fg('platform_editor_advanced_layouts_pre_release_2');
|
|
14
13
|
};
|
|
@@ -55,11 +54,11 @@ var layoutWithSeparatorBorderStyles = function layoutWithSeparatorBorderStyles(v
|
|
|
55
54
|
};
|
|
56
55
|
var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
|
|
57
56
|
return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
58
|
-
css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\t\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t\t/* not resized layout in full-width editor */\n\t\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:
|
|
57
|
+
css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\t\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t\t/* not resized layout in full-width editor */\n\t\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:724px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* not resized layout in fixed-width editor */\n\t\t.ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:788px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* resized layout in full/fixed-width editor */\n\t\t.ProseMirror .fabric-editor-breakout-mark {\n\t\t\t.layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:820px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t"])), layoutWithSeparatorBorderResponsiveStyles(724, viewMode), layoutWithSeparatorBorderResponsiveStyles(788, viewMode), layoutWithSeparatorBorderResponsiveStyles(820, viewMode))
|
|
59
58
|
);
|
|
60
59
|
};
|
|
61
60
|
|
|
62
61
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
63
62
|
export var layoutStyles = function layoutStyles(viewMode) {
|
|
64
|
-
return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\t", "\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset, akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', fg('platform_editor_drag_and_drop_target_v2') ? 'position: relative;' : '', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (editorExperiment('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('nested-dnd', true) && !fg('platform_editor_advanced_layouts_breakout_resizing') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
63
|
+
return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\t", "\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset, akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', fg('platform_editor_drag_and_drop_target_v2') ? 'position: relative;' : '', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (editorExperiment('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('nested-dnd', true) && !fg('platform_editor_advanced_layouts_breakout_resizing') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
65
64
|
};
|
|
@@ -18,7 +18,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
18
18
|
import isEqual from 'lodash/isEqual';
|
|
19
19
|
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
20
20
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
-
import { whichTransitionEvent } from '../../utils';
|
|
21
|
+
import { whichTransitionEvent } from '../../utils/whichTransitionEvent';
|
|
22
22
|
import { ErrorBoundary } from '../ErrorBoundary';
|
|
23
23
|
import { MountPluginHooks } from './mount-plugin-hooks';
|
|
24
24
|
var pluginsComponentsWrapper = css({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
2
3
|
import { ToolbarInner } from './ToolbarInner';
|
|
3
|
-
import { ToolbarSize } from './types';
|
|
4
4
|
export var Toolbar = function Toolbar(props) {
|
|
5
5
|
return /*#__PURE__*/React.createElement(ToolbarInner, {
|
|
6
6
|
items: props.items,
|
|
@@ -10,13 +10,13 @@ import React, { useMemo } from 'react';
|
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
13
|
+
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
13
14
|
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
14
15
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
15
16
|
import { isFullPage } from '../../utils/is-full-page';
|
|
16
17
|
import { useElementWidth } from './hooks';
|
|
17
18
|
import { Toolbar } from './Toolbar';
|
|
18
19
|
import { toolbarSizeToWidth, widthToToolbarSize } from './toolbar-size';
|
|
19
|
-
import { ToolbarSize } from './types';
|
|
20
20
|
var toolbar = css(_defineProperty({
|
|
21
21
|
width: '100%',
|
|
22
22
|
position: 'relative'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext, ToolbarWidthsNext } from '@atlaskit/editor-common/types';
|
|
1
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { isFullPage } from '../../utils/is-full-page';
|
|
3
|
-
import { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext, ToolbarWidthsNext } from './types';
|
|
4
|
-
|
|
5
4
|
// Toolbar sizes for full page editor a little bit different, because it has more buttons e.g. actions button...
|
|
6
5
|
var toolbarSizesFullPageNext = [{
|
|
7
6
|
width: ToolbarWidthsFullPageNext.XXL,
|
|
@@ -10,9 +10,9 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
13
|
+
import { createDispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
13
14
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils/analytics';
|
|
14
15
|
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-plugins/help-dialog';
|
|
15
|
-
import { createDispatch } from '../../event-dispatcher';
|
|
16
16
|
var WithHelpTrigger = /*#__PURE__*/function (_React$Component) {
|
|
17
17
|
_inherits(WithHelpTrigger, _React$Component);
|
|
18
18
|
var _super = _createSuper(WithHelpTrigger);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "
|
|
2
|
+
export var version = "203.0.0";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next/AnalyticsEvent';
|
|
2
2
|
import type { ResolvedEditorState } from '@atlaskit/editor-common/collab';
|
|
3
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
4
|
import type { ContextUpdateHandler, EditorActionsOptions, FeatureFlags, ReplaceRawValue, Transformer } from '@atlaskit/editor-common/types';
|
|
4
5
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { EventDispatcher } from '../event-dispatcher';
|
|
7
7
|
export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
8
8
|
private editorView?;
|
|
9
9
|
private contentTransformer?;
|
|
@@ -40,6 +40,10 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
40
40
|
*/
|
|
41
41
|
getSelectedNode(): Node | undefined;
|
|
42
42
|
isDocumentEmpty(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated - please use `replaceDocument` found in the core plugin actions instead
|
|
45
|
+
* using this will reset your Editor State which could cause some things to break (like emojis)
|
|
46
|
+
*/
|
|
43
47
|
replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
|
|
44
48
|
/** @deprecated [ED-14158] shouldAddToHistory is not being used in this function */
|
|
45
49
|
shouldAddToHistory?: boolean): boolean;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
4
4
|
import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
6
|
import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
6
7
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
8
|
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
8
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
10
|
import type EditorActions from '../actions';
|
|
10
|
-
import type { EventDispatcher } from '../event-dispatcher';
|
|
11
11
|
import { type EditorAppearanceComponentProps } from '../types';
|
|
12
12
|
import type { EditorNextProps } from '../types/editor-props';
|
|
13
13
|
interface InternalProps {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { type ErrorInfo } from 'react';
|
|
2
2
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
3
3
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { UserBrowserExtensionResults } from '@atlaskit/editor-common/utils';
|
|
5
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { FeatureFlags } from '../types/feature-flags';
|
|
7
7
|
export type ErrorBoundaryProps = {
|
|
8
8
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
9
9
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { EditorAppearance } from '
|
|
2
|
+
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
3
|
export declare const formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
|
|
@@ -4,18 +4,18 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
|
4
4
|
import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import type { AnalyticsEventPayload, DispatchAnalyticsEvent, FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import type { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
|
|
7
|
+
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
7
9
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
8
10
|
import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
9
11
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
10
|
-
import type { PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
|
|
12
|
+
import type { EditorAppearance, EditorPlugin, PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
|
|
11
13
|
import { type SEVERITY } from '@atlaskit/editor-common/utils/analytics';
|
|
12
14
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
13
15
|
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
14
16
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
15
17
|
import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
|
|
16
|
-
import {
|
|
17
|
-
import type { Dispatch } from '../event-dispatcher';
|
|
18
|
-
import type { EditorAppearance, EditorConfig, EditorPlugin, EditorProps } from '../types';
|
|
18
|
+
import type { EditorConfig, EditorProps } from '../types';
|
|
19
19
|
import type { EditorNextProps } from '../types/editor-props';
|
|
20
20
|
export interface EditorViewProps {
|
|
21
21
|
editorProps: (EditorProps | EditorNextProps) & {
|
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
4
4
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
6
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
6
7
|
import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
7
8
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
8
9
|
import type { PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
|
|
9
10
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
-
import { EventDispatcher } from '../event-dispatcher';
|
|
11
11
|
import type { EditorConfig, EditorProps } from '../types';
|
|
12
12
|
import type { EditorNextProps } from '../types/editor-props';
|
|
13
13
|
export interface EditorViewProps extends WrappedComponentProps {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
|
|
2
2
|
import type { ErrorReportingHandler } from '@atlaskit/editor-common/error-reporter';
|
|
3
3
|
import { type SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
+
import type { EditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { MarkSpec } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorConfig,
|
|
6
|
+
import type { EditorConfig, PMPluginCreateConfig } from '../types';
|
|
6
7
|
export declare function sortByRank(a: {
|
|
7
8
|
rank: number;
|
|
8
9
|
}, b: {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
2
|
import type { EditorPluginInjectionAPI, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
3
|
+
import type { EditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugins/base';
|
|
4
5
|
import type { DefaultPresetPluginOptions } from '../../src/presets/default';
|
|
5
|
-
import type {
|
|
6
|
+
import type { EditorProps } from '../types';
|
|
6
7
|
import type { EditorPluginFeatureProps } from '../types/editor-props';
|
|
7
8
|
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
8
9
|
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): DefaultPresetPluginOptions & Omit<EditorPluginFeatureProps, 'placeholder'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { MarkConfig, NodeConfig } from '@atlaskit/editor-common/types';
|
|
1
2
|
import type { DOMOutputSpec, MarkSpec, NodeSpec, Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { MarkConfig, NodeConfig } from '../types/pm-config';
|
|
4
4
|
type toDOMType = (node: PMNode | PMMark) => DOMOutputSpec;
|
|
5
5
|
/**
|
|
6
6
|
* 🧱 Internal Helper Function: Editor FE Platform
|