@atlaskit/editor-core 191.3.1 → 191.4.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 +18 -0
- package/codemods/140.0.0-rc-kraken-fix-type-errors.ts +1 -1
- package/codemods/145.0.0-deprecate-props.ts +1 -1
- package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +2 -1
- package/codemods/__tests__/remove-config-panel-width-prop.ts +2 -1
- package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +2 -1
- package/codemods/__tests__/rename-smartlinks-prop.ts +1 -1
- package/codemods/__tests__/rename-unsafe-allowUndoRedoButtons-prop.ts +1 -1
- package/codemods/__tests__/rename-unsafe-cards-prop.ts +1 -1
- package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +3 -2
- package/codemods/migrates/remove-config-panel-width-prop.ts +3 -2
- package/codemods/migrates/rename-editor-to-editor-migration-component.ts +2 -2
- package/codemods/migrates/rename-smartlinks-prop.ts +2 -2
- package/codemods/utils.ts +3 -2
- package/dist/cjs/actions/index.js +8 -8
- package/dist/cjs/composable-editor/editor-internal.js +1 -1
- package/dist/cjs/composable-editor/editor.js +7 -7
- package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +17 -17
- package/dist/cjs/create-editor/create-editor.js +1 -1
- package/dist/cjs/create-editor/create-schema.js +2 -2
- package/dist/cjs/create-editor/get-ui-component.js +1 -1
- package/dist/cjs/editor-context.js +13 -0
- package/dist/cjs/editor.js +1 -1
- package/dist/cjs/presets/default.js +19 -19
- package/dist/cjs/presets/universal.js +13 -13
- package/dist/cjs/test-utils.js +2 -2
- package/dist/cjs/ui/Addon/Dropdown/styles.js +1 -1
- package/dist/cjs/ui/Addon/click-area-helper.js +3 -3
- package/dist/cjs/ui/Appearance/Chromeless.js +3 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +13 -13
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +19 -19
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -3
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +4 -4
- package/dist/cjs/ui/ChromeCollapsed/index.js +1 -1
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/cjs/ui/CollapsedEditor/index.js +2 -2
- package/dist/cjs/ui/ContentStyles/code-block.js +2 -2
- package/dist/cjs/ui/ContentStyles/expand.js +1 -1
- package/dist/cjs/ui/ContentStyles/index.js +18 -18
- package/dist/cjs/ui/ContentStyles/layout.js +2 -2
- package/dist/cjs/ui/ContentStyles/media.js +1 -1
- package/dist/cjs/ui/ContextPanel/index.js +5 -5
- package/dist/cjs/ui/ErrorBoundary/index.js +1 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +3 -3
- package/dist/cjs/ui/ToolbarFeedback/index.js +23 -23
- package/dist/cjs/ui/ToolbarFeedback/styles.js +2 -2
- package/dist/cjs/ui/ToolbarHelp/index.js +1 -1
- package/dist/cjs/ui/WithHelpTrigger/index.js +1 -1
- package/dist/cjs/use-preset.js +2 -1
- package/dist/cjs/utils/document.js +1 -1
- package/dist/cjs/utils/extensions.js +1 -1
- package/dist/cjs/utils/performance/components/RenderTracking.js +1 -1
- package/dist/cjs/utils/performance/plugin-performance-observer.js +1 -1
- package/dist/cjs/utils/prepare-extension-provider.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +2 -2
- package/dist/es2019/composable-editor/editor.js +8 -8
- package/dist/es2019/create-editor/ErrorBoundary.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +19 -19
- package/dist/es2019/create-editor/create-editor.js +1 -1
- package/dist/es2019/create-editor/create-preset.js +1 -0
- package/dist/es2019/create-editor/create-schema.js +2 -2
- package/dist/es2019/create-editor/get-ui-component.js +1 -1
- package/dist/es2019/editor-context.js +1 -0
- package/dist/es2019/editor.js +1 -1
- package/dist/es2019/messages.js +1 -1
- package/dist/es2019/presets/context.js +1 -1
- package/dist/es2019/presets/default.js +20 -19
- package/dist/es2019/presets/universal.js +13 -13
- package/dist/es2019/test-utils.js +2 -2
- package/dist/es2019/ui/Addon/Dropdown/styles.js +1 -1
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +1 -1
- package/dist/es2019/ui/Addon/click-area-helper.js +3 -4
- package/dist/es2019/ui/Appearance/Chromeless.js +3 -3
- package/dist/es2019/ui/Appearance/Comment/Comment.js +13 -13
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -3
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +1 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +3 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +5 -4
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -4
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +2 -3
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +3 -3
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +5 -5
- package/dist/es2019/ui/ChromeCollapsed/index.js +2 -2
- package/dist/es2019/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/es2019/ui/CollapsedEditor/index.js +2 -2
- package/dist/es2019/ui/ContentStyles/code-block.js +2 -2
- package/dist/es2019/ui/ContentStyles/date.js +1 -1
- package/dist/es2019/ui/ContentStyles/expand.js +2 -2
- package/dist/es2019/ui/ContentStyles/extension.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +19 -19
- package/dist/es2019/ui/ContentStyles/layout.js +3 -3
- package/dist/es2019/ui/ContentStyles/media.js +1 -1
- package/dist/es2019/ui/ContentStyles/panel.js +2 -2
- package/dist/es2019/ui/ContentStyles/status.js +1 -1
- package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/es2019/ui/ContextPanel/index.js +6 -5
- package/dist/es2019/ui/ErrorBoundary/index.js +1 -1
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +3 -3
- package/dist/es2019/ui/ToolbarButton/index.js +1 -1
- package/dist/es2019/ui/ToolbarFeedback/index.js +10 -10
- package/dist/es2019/ui/ToolbarFeedback/styles.js +2 -2
- package/dist/es2019/ui/ToolbarHelp/index.js +1 -1
- package/dist/es2019/ui/WithHelpTrigger/index.js +2 -2
- package/dist/es2019/use-preset.js +1 -1
- package/dist/es2019/utils/document.js +1 -1
- package/dist/es2019/utils/extensions.js +1 -1
- package/dist/es2019/utils/performance/components/RenderTracking.js +1 -1
- package/dist/es2019/utils/performance/plugin-performance-observer.js +1 -1
- package/dist/es2019/utils/performance/plugin-performance-report.js +1 -1
- package/dist/es2019/utils/performance/simple-measure-to-entries.js +1 -1
- package/dist/es2019/utils/performance/track-transactions.js +1 -1
- package/dist/es2019/utils/prepare-extension-provider.js +1 -1
- package/dist/es2019/utils/prepare-quick-insert-provider.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +2 -2
- package/dist/esm/composable-editor/editor.js +8 -8
- package/dist/esm/create-editor/ErrorBoundary.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +19 -19
- package/dist/esm/create-editor/create-editor.js +1 -1
- package/dist/esm/create-editor/create-preset.js +1 -0
- package/dist/esm/create-editor/create-schema.js +2 -2
- package/dist/esm/create-editor/get-ui-component.js +1 -1
- package/dist/esm/editor-context.js +1 -0
- package/dist/esm/editor.js +1 -1
- package/dist/esm/messages.js +1 -1
- package/dist/esm/presets/context.js +1 -1
- package/dist/esm/presets/default.js +20 -19
- package/dist/esm/presets/universal.js +13 -13
- package/dist/esm/test-utils.js +2 -2
- package/dist/esm/ui/Addon/Dropdown/styles.js +1 -1
- package/dist/esm/ui/Addon/DropdownItem/styles.js +1 -1
- package/dist/esm/ui/Addon/click-area-helper.js +3 -4
- package/dist/esm/ui/Appearance/Chromeless.js +3 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +13 -13
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -3
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +1 -0
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +3 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +5 -4
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -4
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +2 -3
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +3 -3
- package/dist/esm/ui/AppearanceComponents/Mobile.js +5 -5
- package/dist/esm/ui/ChromeCollapsed/index.js +2 -2
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/esm/ui/CollapsedEditor/index.js +2 -2
- package/dist/esm/ui/ContentStyles/code-block.js +2 -2
- package/dist/esm/ui/ContentStyles/date.js +1 -1
- package/dist/esm/ui/ContentStyles/expand.js +2 -2
- package/dist/esm/ui/ContentStyles/extension.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +19 -19
- package/dist/esm/ui/ContentStyles/layout.js +3 -3
- package/dist/esm/ui/ContentStyles/media.js +1 -1
- package/dist/esm/ui/ContentStyles/panel.js +2 -2
- package/dist/esm/ui/ContentStyles/status.js +1 -1
- package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/esm/ui/ContextPanel/index.js +6 -5
- package/dist/esm/ui/ErrorBoundary/index.js +1 -1
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +3 -3
- package/dist/esm/ui/ToolbarButton/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +10 -10
- package/dist/esm/ui/ToolbarFeedback/styles.js +2 -2
- package/dist/esm/ui/ToolbarHelp/index.js +1 -1
- package/dist/esm/ui/WithHelpTrigger/index.js +2 -2
- package/dist/esm/use-preset.js +2 -1
- package/dist/esm/utils/document.js +1 -1
- package/dist/esm/utils/extensions.js +1 -1
- package/dist/esm/utils/performance/components/RenderTracking.js +1 -1
- package/dist/esm/utils/performance/plugin-performance-observer.js +1 -1
- package/dist/esm/utils/performance/plugin-performance-report.js +1 -1
- package/dist/esm/utils/performance/simple-measure-to-entries.js +1 -1
- package/dist/esm/utils/performance/track-transactions.js +1 -1
- package/dist/esm/utils/prepare-extension-provider.js +1 -1
- package/dist/esm/utils/prepare-quick-insert-provider.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/CollapsedEditor/index.d.ts +1 -1
- package/dist/types/EditorWithActions/index.d.ts +1 -1
- package/dist/types/actions/index.d.ts +3 -3
- package/dist/types/composable-editor/editor-internal.d.ts +1 -1
- package/dist/types/composable-editor/hooks/useMemoEditorProps.d.ts +1 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +13 -13
- package/dist/types/create-editor/create-editor.d.ts +1 -1
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -3
- package/dist/types/create-editor/create-preset.d.ts +1 -1
- package/dist/types/create-editor/get-plugins.d.ts +2 -2
- package/dist/types/editor-context.d.ts +1 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/presets/context.d.ts +1 -1
- package/dist/types/presets/default.d.ts +8 -8
- package/dist/types/presets/universal.d.ts +1 -1
- package/dist/types/presets/useUniversalPreset.d.ts +1 -1
- package/dist/types/test-utils.d.ts +3 -3
- package/dist/types/types/editor-appearance-component.d.ts +6 -6
- package/dist/types/types/editor-config.d.ts +1 -1
- package/dist/types/types/editor-instance.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +10 -10
- package/dist/types/types/pm-plugin-list.d.ts +4 -4
- package/dist/types/ui/Addon/Dropdown/index.d.ts +2 -2
- package/dist/types/ui/Addon/DropdownItem/index.d.ts +1 -1
- package/dist/types/ui/Addon/types.d.ts +1 -1
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +6 -5
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +5 -5
- package/dist/types/ui/Appearance/Mobile.d.ts +1 -1
- package/dist/types/ui/ChromeCollapsed/index.d.ts +1 -1
- package/dist/types/ui/ContentStyles/layout.d.ts +1 -1
- package/dist/types/ui/ContextPanel/index.d.ts +1 -1
- package/dist/types/ui/PluginSlot/index.d.ts +5 -5
- package/dist/types/ui/Toolbar/Toolbar.d.ts +1 -1
- package/dist/types/ui/Toolbar/ToolbarInner.d.ts +1 -1
- package/dist/types/ui/Toolbar/ToolbarWithSizeDetector.d.ts +1 -1
- package/dist/types/ui/Toolbar/toolbar-size.d.ts +1 -1
- package/dist/types/ui/Toolbar/toolbar-types.d.ts +4 -4
- package/dist/types/ui/ToolbarButton/index.d.ts +1 -1
- package/dist/types/ui/ToolbarFeedback/index.d.ts +0 -1
- package/dist/types/ui/ToolbarHelp/index.d.ts +1 -1
- package/dist/types/ui/WithEditorActions/index.d.ts +1 -1
- package/dist/types/ui/WithPluginState/index.d.ts +2 -1
- package/dist/types/use-preset.d.ts +1 -1
- package/dist/types/utils/action.d.ts +3 -3
- package/dist/types/utils/document.d.ts +5 -5
- package/dist/types/utils/extensions.d.ts +3 -3
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/is-full-page.d.ts +1 -1
- package/dist/types/utils/node-width.d.ts +1 -1
- package/dist/types/utils/performance/components/RenderTracking.d.ts +1 -1
- package/dist/types/utils/performance/instrumented-plugin.d.ts +1 -1
- package/dist/types/utils/performance/plugin-performance-observer.d.ts +2 -2
- package/dist/types/utils/performance/plugin-performance-report.d.ts +1 -1
- package/dist/types/utils/prepare-quick-insert-provider.d.ts +2 -2
- package/dist/types-ts4.5/CollapsedEditor/index.d.ts +1 -1
- package/dist/types-ts4.5/EditorWithActions/index.d.ts +1 -1
- package/dist/types-ts4.5/actions/index.d.ts +3 -3
- package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/hooks/useMemoEditorProps.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +13 -13
- package/dist/types-ts4.5/create-editor/create-editor.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +3 -3
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -2
- package/dist/types-ts4.5/editor-context.d.ts +1 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/presets/context.d.ts +1 -1
- package/dist/types-ts4.5/presets/default.d.ts +8 -8
- package/dist/types-ts4.5/presets/universal.d.ts +1 -1
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +1 -1
- package/dist/types-ts4.5/test-utils.d.ts +3 -3
- package/dist/types-ts4.5/types/editor-appearance-component.d.ts +6 -6
- package/dist/types-ts4.5/types/editor-config.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-instance.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +10 -10
- package/dist/types-ts4.5/types/pm-plugin-list.d.ts +4 -4
- package/dist/types-ts4.5/ui/Addon/Dropdown/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/Addon/DropdownItem/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Addon/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +6 -5
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +5 -5
- package/dist/types-ts4.5/ui/Appearance/Mobile.d.ts +1 -1
- package/dist/types-ts4.5/ui/ChromeCollapsed/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +5 -5
- package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/ToolbarInner.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/ToolbarWithSizeDetector.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/toolbar-size.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/toolbar-types.d.ts +4 -4
- package/dist/types-ts4.5/ui/ToolbarButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ToolbarFeedback/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/ToolbarHelp/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/WithEditorActions/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/WithPluginState/index.d.ts +2 -1
- package/dist/types-ts4.5/use-preset.d.ts +1 -1
- package/dist/types-ts4.5/utils/action.d.ts +3 -3
- package/dist/types-ts4.5/utils/document.d.ts +5 -5
- package/dist/types-ts4.5/utils/extensions.d.ts +3 -3
- package/dist/types-ts4.5/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/is-full-page.d.ts +1 -1
- package/dist/types-ts4.5/utils/node-width.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/components/RenderTracking.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/instrumented-plugin.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/plugin-performance-observer.d.ts +2 -2
- package/dist/types-ts4.5/utils/performance/plugin-performance-report.d.ts +1 -1
- package/dist/types-ts4.5/utils/prepare-quick-insert-provider.d.ts +2 -2
- package/docs/0-intro.tsx +19 -40
- package/docs/1-legacy-editor.tsx +3 -2
- package/docs/2-labs.tsx +1 -1
- package/docs/3-autoformatting.tsx +1 -1
- package/docs/4-annotations.tsx +2 -2
- package/docs/editor-use-only.tsx +1 -0
- package/editor-context/package.json +15 -0
- package/package.json +8 -5
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.wrapper = exports.confirmationText = exports.confirmationPopup = exports.confirmationImg = exports.confirmationHeader = exports.buttonContent = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
11
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
12
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
12
|
+
var _constants = require("@atlaskit/theme/constants");
|
|
13
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
14
14
|
var buttonContent = exports.buttonContent = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n height: 24px;\n line-height: 24px;\n min-width: 70px;\n"])));
|
|
15
15
|
var wrapper = exports.wrapper = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-right: 0;\n"])));
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactIntlNext = require("react-intl-next");
|
|
9
10
|
var _question = _interopRequireDefault(require("@atlaskit/icon/glyph/question"));
|
|
10
11
|
var _ToolbarButton = _interopRequireDefault(require("../ToolbarButton"));
|
|
11
12
|
var _WithHelpTrigger = _interopRequireDefault(require("../WithHelpTrigger"));
|
|
12
|
-
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _messages = require("./messages");
|
|
14
14
|
var TooltipHelpTrigger = function TooltipHelpTrigger(_ref) {
|
|
15
15
|
var _ref$title = _ref.title,
|
|
@@ -15,9 +15,9 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
17
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
18
|
-
var _eventDispatcher = require("../../event-dispatcher");
|
|
19
18
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
20
19
|
var _editorPluginHelpDialog = require("@atlaskit/editor-plugin-help-dialog");
|
|
20
|
+
var _eventDispatcher = require("../../event-dispatcher");
|
|
21
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
22
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
23
|
var WithHelpTrigger = exports.default = /*#__PURE__*/function (_React$Component) {
|
package/dist/cjs/use-preset.js
CHANGED
|
@@ -39,7 +39,8 @@ var _context = require("./presets/context");
|
|
|
39
39
|
* }
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
function usePreset(createPreset
|
|
42
|
+
function usePreset(createPreset) {
|
|
43
|
+
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
43
44
|
var editorApi = (0, _context.usePresetContext)();
|
|
44
45
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
46
|
var preset = (0, _react.useMemo)(createPreset, dependencies);
|
|
@@ -15,9 +15,9 @@ Object.defineProperty(exports, "isInEmptyLine", {
|
|
|
15
15
|
exports.nodesBetweenChanged = nodesBetweenChanged;
|
|
16
16
|
exports.processRawFragmentValue = processRawFragmentValue;
|
|
17
17
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
18
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
18
19
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
19
20
|
var _nodeWidth = require("./node-width");
|
|
20
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
21
21
|
function processRawFragmentValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
|
|
22
22
|
if (!value) {
|
|
23
23
|
return;
|
|
@@ -10,9 +10,9 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
13
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
13
14
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
14
15
|
var _providerHelpers = require("@atlaskit/editor-common/provider-helpers");
|
|
15
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
16
16
|
/**
|
|
17
17
|
* Utils to send analytics event when a extension is inserted using quickInsert
|
|
18
18
|
*/
|
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.RenderTracking = RenderTracking;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
10
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
11
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
12
|
function RenderTracking(props) {
|
|
13
13
|
var debouncedHandleAnalyticsEvent = (0, _react.useMemo)(function () {
|
|
14
14
|
return (0, _debounce.default)(props.handleAnalyticsEvent, 500);
|
|
@@ -10,8 +10,8 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
var _pluginPerformanceReport = require("./plugin-performance-report");
|
|
13
|
-
var _trackTransactions = require("./track-transactions");
|
|
14
13
|
var _simpleMeasureToEntries = require("./simple-measure-to-entries");
|
|
14
|
+
var _trackTransactions = require("./track-transactions");
|
|
15
15
|
var PluginPerformanceObserver = exports.PluginPerformanceObserver = /*#__PURE__*/function () {
|
|
16
16
|
function PluginPerformanceObserver(callback) {
|
|
17
17
|
var _this = this;
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
9
8
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
9
|
+
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
10
10
|
function prepareExtensionProvidersInternal(editorActions, extensionProviders) {
|
|
11
11
|
if (!extensionProviders) {
|
|
12
12
|
return;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { analyticsEventKey, findNodePosByLocalIds, isEmptyDocument, processRawValue } from '@atlaskit/editor-common/utils';
|
|
2
3
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import { findParentNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import { analyticsEventKey, isEmptyDocument, processRawValue, findNodePosByLocalIds } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { createDispatch } from '../event-dispatcher';
|
|
7
7
|
import { toJSON } from '../utils';
|
|
8
8
|
import { __temporaryFixForConfigPanel, getEditorValueWithMedia } from '../utils/action';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
-
import {
|
|
3
|
+
import { Fragment, memo, useCallback } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { PortalProviderWithThemeProviders, PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
@@ -10,8 +10,8 @@ import ErrorBoundary from '../create-editor/ErrorBoundary';
|
|
|
10
10
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
11
11
|
import ReactEditorView from '../create-editor/ReactEditorView';
|
|
12
12
|
import { ContextAdapter } from '../nodeviews/context-adapter';
|
|
13
|
-
import EditorContext from '../ui/EditorContext';
|
|
14
13
|
import { useSetPresetContext } from '../presets/context';
|
|
14
|
+
import EditorContext from '../ui/EditorContext';
|
|
15
15
|
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
16
16
|
import { getBaseFontSize } from './utils/getBaseFontSize';
|
|
17
17
|
/**
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
-
import {
|
|
3
|
+
import { useCallback, useMemo, useRef } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
+
import isEqual from 'lodash/isEqual';
|
|
5
6
|
import uuid from 'uuid/v4';
|
|
6
7
|
import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
8
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
9
|
import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import { useConstructor } from '@atlaskit/editor-common/hooks';
|
|
8
11
|
import { EditorExperience, ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
9
12
|
import { getAnalyticsAppearance, startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
|
|
10
13
|
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
11
|
-
import isEqual from 'lodash/isEqual';
|
|
12
14
|
import EditorActions from '../actions';
|
|
13
15
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
14
|
-
import { name, version } from '../version-wrapper';
|
|
15
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
16
|
-
import { useConstructor } from '@atlaskit/editor-common/hooks';
|
|
17
16
|
import { useEditorContext } from '../ui/EditorContext';
|
|
18
17
|
import measurements from '../utils/performance/measure-enum';
|
|
18
|
+
import { name, version } from '../version-wrapper';
|
|
19
19
|
import { EditorInternal } from './editor-internal';
|
|
20
|
-
import sendDurationAnalytics from './utils/sendDurationAnalytics';
|
|
21
|
-
import trackEditorActions from './utils/trackEditorActions';
|
|
22
20
|
import useMeasureEditorMountTime from './hooks/useMeasureEditorMountTime';
|
|
23
|
-
import useProviderFactory from './hooks/useProviderFactory';
|
|
24
21
|
import useMemoEditorProps from './hooks/useMemoEditorProps';
|
|
22
|
+
import useProviderFactory from './hooks/useProviderFactory';
|
|
23
|
+
import sendDurationAnalytics from './utils/sendDurationAnalytics';
|
|
24
|
+
import trackEditorActions from './utils/trackEditorActions';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Editor wrapper that deals with the lifecycle logic of the editor
|
|
@@ -2,11 +2,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import uuid from 'uuid';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
5
6
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
6
7
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
7
8
|
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
8
9
|
import { isOutdatedBrowser, sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
9
|
-
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
10
10
|
import { WithEditorView } from './WithEditorView';
|
|
11
11
|
export class ErrorBoundaryWithEditorView extends React.Component {
|
|
12
12
|
constructor(props) {
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { injectIntl } from 'react-intl-next';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import { injectIntl } from 'react-intl-next';
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, getAnalyticsEventsFromTransaction, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
7
|
+
import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
8
|
+
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
9
|
+
import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
10
|
+
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
11
|
+
import { countNodes } from '@atlaskit/editor-common/utils';
|
|
12
|
+
import { analyticsEventKey, browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
|
|
5
13
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
14
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import { editorMessages } from './messages';
|
|
8
|
-
import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking, processRawValue, analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
9
|
-
import { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
10
15
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
11
|
-
import {
|
|
12
|
-
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
13
|
-
import { findChangedNodesFromTransaction, validateNodes, validNode } from '../utils/nodes';
|
|
14
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, PLATFORMS, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
15
|
-
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
16
|
-
import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
17
|
-
import { createErrorReporter, createPMPlugins, processPluginsList } from './create-editor';
|
|
18
|
-
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
16
|
+
import { getNodesCount } from '../utils/document';
|
|
19
17
|
import { isFullPage } from '../utils/is-full-page';
|
|
18
|
+
import { findChangedNodesFromTransaction, validateNodes, validNode } from '../utils/nodes';
|
|
19
|
+
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
20
20
|
import measurements from '../utils/performance/measure-enum';
|
|
21
|
-
import { getNodesCount } from '../utils/document';
|
|
22
|
-
import { createSchema } from './create-schema';
|
|
23
21
|
import { PluginPerformanceObserver } from '../utils/performance/plugin-performance-observer';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
22
|
+
import { freezeUnsafeTransactionProperties } from '../utils/performance/safer-transactions';
|
|
23
|
+
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_ON_CHANGE, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, TransactionTracker } from '../utils/performance/track-transactions';
|
|
24
|
+
import { DEFAULT_SAMPLING_RATE_VALID_TRANSACTIONS, PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD, PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD } from './consts';
|
|
25
|
+
import { createErrorReporter, createPMPlugins, processPluginsList } from './create-editor';
|
|
26
26
|
import createPluginsList from './create-plugins-list';
|
|
27
|
-
import {
|
|
27
|
+
import { createSchema } from './create-schema';
|
|
28
|
+
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
29
|
+
import { editorMessages } from './messages';
|
|
28
30
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
29
|
-
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
30
|
-
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
31
31
|
function handleEditorFocus(view) {
|
|
32
32
|
if (view.hasFocus()) {
|
|
33
33
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
2
|
-
import { sortByOrder } from './sort-by-order';
|
|
3
2
|
import { InstrumentedPlugin } from '../utils/performance/instrumented-plugin';
|
|
3
|
+
import { sortByOrder } from './sort-by-order';
|
|
4
4
|
export function sortByRank(a, b) {
|
|
5
5
|
return a.rank - b.rank;
|
|
6
6
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import createUniversalPreset from '../presets/universal';
|
|
2
2
|
import { getDefaultPresetOptionsFromEditorProps } from './create-plugins-list';
|
|
3
3
|
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
4
|
+
|
|
4
5
|
// Separate file, we should not accidentally import this into the `ComposableEditor`
|
|
5
6
|
// otherwise it will blow up the bundle size.
|
|
6
7
|
export function createPreset(props, prevProps) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { sortByOrder } from './sort-by-order';
|
|
2
|
-
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
1
|
import { sanitizeNodes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
3
|
import { fixExcludes } from './create-editor';
|
|
4
|
+
import { sortByOrder } from './sort-by-order';
|
|
5
5
|
export function createSchema(editorConfig) {
|
|
6
6
|
const marks = fixExcludes(editorConfig.marks.sort(sortByOrder('marks')).reduce((acc, mark) => {
|
|
7
7
|
acc[mark.name] = mark.mark;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import FullPage from '../ui/Appearance/FullPage';
|
|
2
1
|
import Chromeless from '../ui/Appearance/Chromeless';
|
|
3
2
|
import Comment from '../ui/Appearance/Comment';
|
|
3
|
+
import FullPage from '../ui/Appearance/FullPage';
|
|
4
4
|
import Mobile from '../ui/Appearance/Mobile';
|
|
5
5
|
export default function getUiComponent(appearance) {
|
|
6
6
|
appearance = appearance || 'comment';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EditorContext } from './ui/EditorContext';
|
package/dist/es2019/editor.js
CHANGED
|
@@ -3,9 +3,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
7
6
|
import { ComposableEditor } from './composable-editor';
|
|
8
7
|
import useUniversalPreset from './presets/useUniversalPreset';
|
|
8
|
+
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
9
9
|
const ComposableEditorWrapper = ({
|
|
10
10
|
props
|
|
11
11
|
}) => {
|
package/dist/es2019/messages.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Common Translations will live here
|
|
2
|
-
import commonMessages, { linkMessages, linkToolbarMessages, statusMessages
|
|
2
|
+
import commonMessages, { dateMessages, linkMessages, linkToolbarMessages, statusMessages } from '@atlaskit/editor-common/messages';
|
|
3
3
|
export { linkMessages };
|
|
4
4
|
export { statusMessages };
|
|
5
5
|
export { dateMessages };
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
// #region Imports
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
4
|
+
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
+
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
6
|
+
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
7
|
+
import { betterTypeHistoryPlugin } from '@atlaskit/editor-plugin-better-type-history';
|
|
4
8
|
import { blockTypePlugin } from '@atlaskit/editor-plugin-block-type';
|
|
5
9
|
import { clearMarksOnEmptyDocPlugin } from '@atlaskit/editor-plugin-clear-marks-on-empty-doc';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
12
|
-
import { focusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
10
|
+
import { clipboardPlugin } from '@atlaskit/editor-plugin-clipboard';
|
|
11
|
+
import { codeBlockPlugin } from '@atlaskit/editor-plugin-code-block';
|
|
12
|
+
import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
|
|
13
|
+
import { copyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
|
|
14
|
+
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
13
15
|
import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
14
|
-
import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
15
|
-
import { submitEditorPlugin } from '@atlaskit/editor-plugin-submit-editor';
|
|
16
16
|
import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
17
|
-
import { copyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
|
|
18
17
|
import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
18
|
+
import { focusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
19
|
+
import { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
20
|
+
import { pastePlugin } from '@atlaskit/editor-plugin-paste';
|
|
21
21
|
import { placeholderPlugin } from '@atlaskit/editor-plugin-placeholder';
|
|
22
|
-
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
23
|
-
import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
|
|
24
22
|
import { quickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
25
23
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
26
|
-
import { codeBlockPlugin } from '@atlaskit/editor-plugin-code-block';
|
|
27
|
-
import { undoRedoPlugin } from '@atlaskit/editor-plugin-undo-redo';
|
|
28
|
-
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
29
|
-
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
30
24
|
import { selectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
25
|
+
import { submitEditorPlugin } from '@atlaskit/editor-plugin-submit-editor';
|
|
26
|
+
import { textFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
27
|
+
import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
28
|
+
import { undoRedoPlugin } from '@atlaskit/editor-plugin-undo-redo';
|
|
29
|
+
import { unsupportedContentPlugin } from '@atlaskit/editor-plugin-unsupported-content';
|
|
30
|
+
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
31
31
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
32
|
+
|
|
32
33
|
// #endregion
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
3
|
+
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
4
|
+
import { avatarGroupPlugin } from '@atlaskit/editor-plugin-avatar-group';
|
|
5
|
+
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
|
|
1
6
|
import { borderPlugin } from '@atlaskit/editor-plugin-border';
|
|
7
|
+
import { breakoutPlugin } from '@atlaskit/editor-plugin-breakout';
|
|
2
8
|
import { captionPlugin } from '@atlaskit/editor-plugin-caption';
|
|
3
9
|
import { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
4
10
|
import { codeBidiWarningPlugin } from '@atlaskit/editor-plugin-code-bidi-warning';
|
|
11
|
+
import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
5
12
|
import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
6
13
|
import { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
14
|
+
import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
|
|
15
|
+
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
7
16
|
import { datePlugin } from '@atlaskit/editor-plugin-date';
|
|
8
17
|
import { emojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
9
18
|
import { expandPlugin } from '@atlaskit/editor-plugin-expand';
|
|
19
|
+
import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
20
|
+
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
21
|
+
import { findReplacePlugin } from '@atlaskit/editor-plugin-find-replace';
|
|
10
22
|
import { fragmentPlugin } from '@atlaskit/editor-plugin-fragment';
|
|
11
23
|
import { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
12
24
|
import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
@@ -26,28 +38,16 @@ import { pasteOptionsToolbarPlugin } from '@atlaskit/editor-plugin-paste-options
|
|
|
26
38
|
import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
|
|
27
39
|
import { rulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
28
40
|
import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
29
|
-
import { breakoutPlugin } from '@atlaskit/editor-plugin-breakout';
|
|
30
41
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
31
42
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
32
43
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
33
44
|
import { tasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
34
45
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
35
46
|
import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-lists-indentation';
|
|
36
|
-
import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
|
|
37
|
-
import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
38
|
-
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
39
|
-
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
40
47
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
41
|
-
import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
42
|
-
import { avatarGroupPlugin } from '@atlaskit/editor-plugin-avatar-group';
|
|
43
|
-
import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
44
|
-
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
|
|
45
|
-
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
46
|
-
import { findReplacePlugin } from '@atlaskit/editor-plugin-find-replace';
|
|
47
|
-
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
48
48
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
49
|
-
import { createDefaultPreset } from './default';
|
|
50
49
|
import { version as coreVersion } from '../version-wrapper';
|
|
50
|
+
import { createDefaultPreset } from './default';
|
|
51
51
|
/**
|
|
52
52
|
* Creates a preset with all of the available plugins.
|
|
53
53
|
* Basis for create-plugins-list and can be used to migrate from Editor -> EditorNext (Presets project)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
1
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
2
|
+
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
3
|
+
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import { createSchema } from './create-editor/create-schema';
|
|
4
5
|
import { sortByOrder } from './create-editor/sort-by-order';
|
|
5
|
-
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
6
6
|
function lightProcessPluginsList(editorPlugins) {
|
|
7
7
|
/**
|
|
8
8
|
* First pass to collect pluginsOptions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
3
2
|
import { N60A } from '@atlaskit/theme/colors';
|
|
3
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
4
4
|
export const dropdown = css`
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
2
|
-
import { setSelectionTopLevelBlocks } from '@atlaskit/editor-common/selection';
|
|
3
|
-
import { addParagraphAtEnd } from '@atlaskit/editor-common/commands';
|
|
4
1
|
import { tintDirtyTransaction } from '@atlaskit/editor-common/collab';
|
|
5
|
-
|
|
2
|
+
import { addParagraphAtEnd } from '@atlaskit/editor-common/commands';
|
|
3
|
+
import { setSelectionTopLevelBlocks } from '@atlaskit/editor-common/selection';
|
|
4
|
+
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
6
5
|
// we ignore all of the clicks made inside <div class="ak-editor-content-area" /> (but not clicks on the node itself)
|
|
7
6
|
const insideContentArea = ref => {
|
|
8
7
|
while (ref) {
|
|
@@ -2,12 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React, { Fragment } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
|
-
import
|
|
5
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
|
+
import { usePresetContext } from '../../presets/context';
|
|
6
7
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
8
|
+
import PluginSlot from '../PluginSlot';
|
|
7
9
|
import { scrollbarStyles } from '../styles';
|
|
8
10
|
import WithFlash from '../WithFlash';
|
|
9
|
-
import { usePresetContext } from '../../presets/context';
|
|
10
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
const chromelessEditor = css`
|
|
12
12
|
line-height: 20px;
|
|
13
13
|
height: auto;
|
|
@@ -2,27 +2,27 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React, { Fragment } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
import { injectIntl } from 'react-intl-next';
|
|
5
7
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
6
8
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import Toolbar from '../../Toolbar';
|
|
10
|
-
import PluginSlot from '../../PluginSlot';
|
|
11
|
-
import { ClickAreaBlock } from '../../Addon';
|
|
12
|
-
import { tableCommentEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
13
|
-
import WithFlash from '../../WithFlash';
|
|
9
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
10
|
+
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
14
11
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
12
|
+
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
13
|
+
import { tableCommentEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
15
14
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
16
|
-
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
17
15
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
16
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
17
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
20
18
|
import messages from '../../../messages';
|
|
21
19
|
import { usePresetContext } from '../../../presets/context';
|
|
22
|
-
import {
|
|
20
|
+
import { ClickAreaBlock } from '../../Addon';
|
|
23
21
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
24
|
-
import
|
|
25
|
-
import
|
|
22
|
+
import PluginSlot from '../../PluginSlot';
|
|
23
|
+
import Toolbar from '../../Toolbar';
|
|
24
|
+
import WithFlash from '../../WithFlash';
|
|
25
|
+
import { MainToolbar, mainToolbarCustomComponentsSlotStyle, TableControlsPadding } from './Toolbar';
|
|
26
26
|
const CommentEditorMargin = 14;
|
|
27
27
|
const commentEditorStyle = css`
|
|
28
28
|
display: flex;
|
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import {
|
|
7
|
-
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { akEditorMenuZIndex, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
8
7
|
export const TableControlsPadding = 20;
|
|
9
8
|
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
10
9
|
const mainToolbarWrapperStyle = (isTwoLineEditorToolbar = false) => css`
|
|
@@ -56,7 +55,7 @@ const stickyToolbarWrapperStyle = css`
|
|
|
56
55
|
transition: box-shadow ease-in-out 0.2s;
|
|
57
56
|
&.show-keyline {
|
|
58
57
|
box-shadow: 0 ${akEditorToolbarKeylineHeight}px 0 0
|
|
59
|
-
${
|
|
58
|
+
${"var(--ds-background-accent-gray-subtlest, #F1F2F4)"};
|
|
60
59
|
}
|
|
61
60
|
`;
|
|
62
61
|
const StickyToolbar = props => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import React, { useEffect,
|
|
2
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { fullPageEditorWrapper } from './StyledComponents';
|
|
5
4
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
7
7
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
8
|
-
import {
|
|
8
|
+
import { fullPageEditorWrapper } from './StyledComponents';
|
|
9
9
|
const useShowKeyline = contentAreaRef => {
|
|
10
10
|
const [showKeyline, setShowKeyline] = useState(false);
|
|
11
11
|
useEffect(() => {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
|
|
3
|
-
import { WidthConsumer, ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
2
|
+
|
|
4
3
|
import React, { useImperativeHandle, useRef } from 'react';
|
|
4
|
+
import { jsx, useTheme } from '@emotion/react';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
|
+
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { ContextPanelConsumer, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
6
8
|
import { ClickAreaBlock } from '../../Addon';
|
|
7
9
|
import ContextPanel from '../../ContextPanel';
|
|
8
10
|
import PluginSlot from '../../PluginSlot';
|
|
9
|
-
import { contentArea, editorContentAreaStyle,
|
|
10
|
-
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
11
|
+
import { contentArea, editorContentAreaStyle, editorContentGutterStyle, positionedOverEditorStyle, ScrollContainer, sidebarArea } from './StyledComponents';
|
|
11
12
|
export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
12
13
|
const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
13
14
|
const theme = useTheme();
|