@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
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
|
-
import Toolbar from '../../Toolbar';
|
|
7
|
-
import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyle, mainToolbarSecondChildStyle, nonCustomToolbarWrapperStyle, customToolbarWrapperStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
|
|
8
|
-
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
9
6
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
10
8
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
11
9
|
import { usePresetContext } from '../../../presets/context';
|
|
10
|
+
import Toolbar from '../../Toolbar';
|
|
12
11
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
12
|
+
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
13
13
|
export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
14
14
|
var _props$featureFlags, _props$customPrimaryT, _props$featureFlags2, _props$featureFlags3, _editorAPI$avatarGrou, _props$collabEdit, _props$collabEdit2, _props$collabEdit3;
|
|
15
15
|
const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import {
|
|
3
|
-
import { akEditorFloatingDialogZIndex, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
2
|
+
import { akEditorFloatingDialogZIndex, akEditorMobileMaxWidth, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
4
3
|
export const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
5
4
|
const toolbarLineHeight = 56;
|
|
6
5
|
|
|
7
6
|
// box-shadow is overriden by the mainToolbar
|
|
8
7
|
const mainToolbarWithKeyline = css`
|
|
9
8
|
box-shadow: 0 ${akEditorToolbarKeylineHeight}px 0 0
|
|
10
|
-
${
|
|
9
|
+
${"var(--ds-background-accent-gray-subtlest, #F1F2F4)"};
|
|
11
10
|
`;
|
|
12
11
|
const mainToolbarTwoLineStyle = css`
|
|
13
12
|
@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import {
|
|
3
|
-
import { taskListSelector, decisionListSelector } from '@atlaskit/adf-schema';
|
|
4
|
-
import { createEditorContentStyle } from '../../ContentStyles';
|
|
2
|
+
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
5
3
|
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
6
4
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugin-table/ui/consts';
|
|
5
|
+
import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorSwoopCubicBezier, akLayoutGutterOffset, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { createEditorContentStyle } from '../../ContentStyles';
|
|
7
7
|
import { scrollbarStyles } from '../../styles';
|
|
8
8
|
const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
|
|
9
9
|
const TOTAL_PADDING = akEditorGutterPadding * 2;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { forwardRef, useCallback } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import WithFlash from '../WithFlash';
|
|
5
|
-
import { createEditorContentStyle } from '../ContentStyles';
|
|
6
|
-
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
7
|
-
import { usePresetContext } from '../../presets/context';
|
|
8
4
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
|
+
import { usePresetContext } from '../../presets/context';
|
|
6
|
+
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
7
|
+
import { createEditorContentStyle } from '../ContentStyles';
|
|
8
|
+
import WithFlash from '../WithFlash';
|
|
9
9
|
|
|
10
10
|
// Only mobile bridge is using this appearance. We have some plans to decouple the appearances from editor-core. So it doesn't make sense to move this plugin to a separated package for now.
|
|
11
11
|
// Copied packages/editor/editor-mobile-bridge/src/editor/editor-plugins/mobile-dimensions/index.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
4
|
import { PureComponent } from 'react';
|
|
6
|
-
import {
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
7
6
|
import { injectIntl } from 'react-intl-next';
|
|
8
7
|
import { messages } from './messages';
|
|
8
|
+
import { inputStyle } from './styles';
|
|
9
9
|
class ChromeCollapsed extends PureComponent {
|
|
10
10
|
constructor(...args) {
|
|
11
11
|
super(...args);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { akEditorSubtleAccent, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
3
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
4
3
|
import { N300, N50 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
5
|
export const inputStyle = css`
|
|
6
6
|
/* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */
|
|
7
7
|
input& {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import
|
|
3
|
+
import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
5
4
|
import { ComposableEditor } from '../../composable-editor';
|
|
5
|
+
import Editor from '../../editor';
|
|
6
6
|
import EditorWithActions from '../../EditorWithActions';
|
|
7
7
|
import ChromeCollapsed from '../ChromeCollapsed';
|
|
8
8
|
export default class CollapsedEditor extends React.Component {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { CodeBlockSharedCssClassName, codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
3
|
+
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
2
4
|
import { R75 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorDeleteIconColor, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
5
5
|
const GutterDangerOverlay = () => css`
|
|
6
6
|
&::after {
|
|
7
7
|
height: 100%;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
3
|
-
import {
|
|
3
|
+
import { akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
export const dateStyles = css`
|
|
5
5
|
.${DateSharedCssClassName.DATE_CONTAINER} {
|
|
6
6
|
.${DateSharedCssClassName.DATE_WRAPPER} {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import { N40A, N50A, N80A, R300, R50 } from '@atlaskit/theme/colors';
|
|
3
2
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
3
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import {
|
|
6
|
+
import { N40A, N50A, N80A, R300, R50 } from '@atlaskit/theme/colors';
|
|
7
7
|
const EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
8
8
|
const EXPAND_ICON_COLOR = () => css`
|
|
9
9
|
color: ${`var(--ds-icon-subtle, ${N80A})`};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import {
|
|
2
|
+
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
4
4
|
export const extensionStyles = css`
|
|
5
5
|
.multiBodiedExtensionView-content-wrap {
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles, SmartCardSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
5
|
-
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
3
|
+
import { css, jsx, useTheme } from '@emotion/react';
|
|
7
4
|
import { telepointerStyle } from '@atlaskit/editor-common/collab';
|
|
8
|
-
import {
|
|
5
|
+
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
6
|
+
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
7
|
+
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
8
|
+
import { annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFix, dateSharedStyle, embedCardStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, shadowSharedStyle, SmartCardSharedCssClassName, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
9
|
+
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
10
|
+
import { codeMarkSharedStyles, linkSharedStyle, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
11
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
9
12
|
import { blocktypeStyles } from '@atlaskit/editor-plugin-block-type/styles';
|
|
13
|
+
import { findReplaceStyles } from '@atlaskit/editor-plugin-find-replace/styles';
|
|
10
14
|
import { textHighlightStyle } from '@atlaskit/editor-plugin-paste-options-toolbar/styles';
|
|
15
|
+
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
16
|
+
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
17
|
+
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorLineHeight, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
18
|
+
import { N200, N30A, N500 } from '@atlaskit/theme/colors';
|
|
19
|
+
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
11
20
|
import { codeBlockStyles } from './code-block';
|
|
12
|
-
import {
|
|
21
|
+
import { dateStyles } from './date';
|
|
22
|
+
import { expandStyles } from './expand';
|
|
23
|
+
import { extensionStyles } from './extension';
|
|
13
24
|
import { layoutStyles } from './layout';
|
|
25
|
+
import { mediaStyles } from './media';
|
|
14
26
|
import { panelStyles } from './panel';
|
|
15
|
-
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
16
|
-
import { extensionStyles } from './extension';
|
|
17
|
-
import { expandStyles } from './expand';
|
|
18
|
-
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
19
|
-
import { findReplaceStyles } from '@atlaskit/editor-plugin-find-replace/styles';
|
|
20
|
-
import { taskDecisionStyles } from './tasks-and-decisions';
|
|
21
27
|
import { statusStyles } from './status';
|
|
22
|
-
import {
|
|
23
|
-
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
24
|
-
import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
25
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
26
|
-
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
27
|
-
import { N500, N30A, N200 } from '@atlaskit/theme/colors';
|
|
28
|
-
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
28
|
+
import { taskDecisionStyles } from './tasks-and-decisions';
|
|
29
29
|
export const linkStyles = css`
|
|
30
30
|
.ProseMirror {
|
|
31
31
|
${linkSharedStyle}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import {
|
|
3
|
-
import { columnLayoutSharedStyle, LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
|
|
4
|
-
import { gridMediumMaxWidth, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akLayoutGutterOffset, akEditorSwoopCubicBezier, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
2
|
+
import { columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '@atlaskit/editor-common/styles';
|
|
5
3
|
import { TableCssClassName } from '@atlaskit/editor-plugin-table/types';
|
|
6
4
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugin-table/ui/consts';
|
|
5
|
+
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
7
7
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
8
8
|
export const layoutStyles = css`
|
|
9
9
|
.ProseMirror {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { mediaInlineImageStyles } from '@atlaskit/editor-common/media-inline';
|
|
2
3
|
import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
3
4
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
4
5
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
5
6
|
import { B200, N60, Y500 } from '@atlaskit/theme/colors';
|
|
6
|
-
import { mediaInlineImageStyles } from '@atlaskit/editor-common/media-inline';
|
|
7
7
|
export const mediaStyles = css`
|
|
8
8
|
.ProseMirror {
|
|
9
9
|
${mediaSingleSharedStyle} & [layout='full-width'] .${richMediaClassName},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PanelSharedCssClassName, panelSharedStyles } from '@atlaskit/editor-common/panel';
|
|
3
|
+
import { akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
export const panelStyles = () => css`
|
|
5
5
|
.ProseMirror {
|
|
6
6
|
.${PanelSharedCssClassName.prefix} {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { StatusSharedCssClassName, TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
3
|
-
import {
|
|
3
|
+
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
export const statusStyles = css`
|
|
5
5
|
.${TableSharedCssClassName.TABLE_CELL_WRAPPER},
|
|
6
6
|
.${TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
3
|
-
import {
|
|
3
|
+
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
export const taskDecisionStyles = css`
|
|
5
5
|
[data-decision-wrapper] {
|
|
6
6
|
cursor: pointer;
|
|
@@ -4,14 +4,14 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
import React, { useContext } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import Transition from 'react-transition-group/Transition';
|
|
7
|
-
import { N30 } from '@atlaskit/theme/colors';
|
|
8
|
-
import { akEditorSwoopCubicBezier, akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorBreakoutPadding, akEditorContextPanelWidth, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
9
7
|
import { ContextPanelConsumer, WidthContext } from '@atlaskit/editor-common/ui';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
8
|
+
import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
+
import { akEditorBreakoutPadding, akEditorContextPanelWidth, akEditorDefaultLayoutWidth, akEditorSwoopCubicBezier, akEditorWideLayoutWidth, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
12
10
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { N30 } from '@atlaskit/theme/colors';
|
|
13
12
|
import { getChildBreakoutModes } from '../../utils/document';
|
|
14
|
-
import
|
|
13
|
+
import WithEditorActions from '../WithEditorActions';
|
|
14
|
+
import WithPluginState from '../WithPluginState';
|
|
15
15
|
const ANIM_SPEED_MS = 500;
|
|
16
16
|
const EDITOR_WIDTH = akEditorDefaultLayoutWidth + akEditorBreakoutPadding;
|
|
17
17
|
const WIDE_EDITOR_WIDTH = akEditorWideLayoutWidth + akEditorBreakoutPadding;
|
|
@@ -176,6 +176,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
176
176
|
// It might be that we need to inject the pluginInjectionApi
|
|
177
177
|
// via context so that we can use it in this file (similar to
|
|
178
178
|
// WithEditorActions). To be investigated further.
|
|
179
|
+
|
|
179
180
|
// @ts-ignore
|
|
180
181
|
const widthPluginKey = {
|
|
181
182
|
key: 'widthPlugin$',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
4
3
|
import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
5
5
|
export class ErrorBoundary extends React.Component {
|
|
6
6
|
constructor(...args) {
|
|
7
7
|
super(...args);
|
|
@@ -2,13 +2,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
|
-
import { WidthObserver } from '@atlaskit/width-detector';
|
|
6
5
|
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { WidthObserver } from '@atlaskit/width-detector';
|
|
7
|
+
import { isFullPage } from '../../utils/is-full-page';
|
|
7
8
|
import { useElementWidth } from './hooks';
|
|
8
|
-
import { widthToToolbarSize, toolbarSizeToWidth } from './toolbar-size';
|
|
9
9
|
import { Toolbar } from './Toolbar';
|
|
10
|
+
import { toolbarSizeToWidth, widthToToolbarSize } from './toolbar-size';
|
|
10
11
|
import { ToolbarSize } from './types';
|
|
11
|
-
import { isFullPage } from '../../utils/is-full-page';
|
|
12
12
|
const toolbar = css`
|
|
13
13
|
width: 100%;
|
|
14
14
|
position: relative;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
|
-
import ReactDOM from 'react-dom';
|
|
6
4
|
import { PureComponent } from 'react';
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
7
6
|
import PropTypes from 'prop-types';
|
|
8
|
-
import
|
|
9
|
-
import { Popup } from '@atlaskit/editor-common/ui';
|
|
7
|
+
import ReactDOM from 'react-dom';
|
|
10
8
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
11
9
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { wrapper, buttonContent, confirmationPopup, confirmationText, confirmationHeader, confirmationImg } from './styles';
|
|
15
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
16
|
-
import { createDispatch } from '../../event-dispatcher';
|
|
17
|
-
import deprecationWarnings from '../../utils/deprecation-warnings';
|
|
10
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
11
|
+
import { Popup } from '@atlaskit/editor-common/ui';
|
|
18
12
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
13
|
+
import Spinner from '@atlaskit/spinner';
|
|
14
|
+
import { createDispatch } from '../../event-dispatcher';
|
|
19
15
|
import { usePresetContext } from '../../presets/context';
|
|
16
|
+
import deprecationWarnings from '../../utils/deprecation-warnings';
|
|
17
|
+
import ToolbarButton from '../ToolbarButton';
|
|
18
|
+
import withOuterListeners from '../with-outer-listeners';
|
|
19
|
+
import { buttonContent, confirmationHeader, confirmationImg, confirmationPopup, confirmationText, wrapper } from './styles';
|
|
20
20
|
const PopupWithOutsideListeners = withOuterListeners(Popup);
|
|
21
21
|
const POPUP_HEIGHT = 388;
|
|
22
22
|
const POPUP_WIDTH = 280;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
3
|
-
import { N60A, N400, P400 } from '@atlaskit/theme/colors';
|
|
4
2
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { N400, N60A, P400 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
5
|
export const buttonContent = css`
|
|
6
6
|
display: flex;
|
|
7
7
|
height: 24px;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { injectIntl } from 'react-intl-next';
|
|
2
3
|
import QuestionIcon from '@atlaskit/icon/glyph/question';
|
|
3
4
|
import ToolbarButton from '../ToolbarButton';
|
|
4
5
|
import WithHelpTrigger from '../WithHelpTrigger';
|
|
5
|
-
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import { messages } from './messages';
|
|
7
7
|
const TooltipHelpTrigger = ({
|
|
8
8
|
title = 'Open help dialog',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT,
|
|
5
|
-
import { createDispatch } from '../../event-dispatcher';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
5
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
7
6
|
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-plugin-help-dialog';
|
|
7
|
+
import { createDispatch } from '../../event-dispatcher';
|
|
8
8
|
export default class WithHelpTrigger extends React.Component {
|
|
9
9
|
constructor(...args) {
|
|
10
10
|
super(...args);
|
|
@@ -33,7 +33,7 @@ import { usePresetContext } from './presets/context';
|
|
|
33
33
|
* }
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
export function usePreset(createPreset, dependencies) {
|
|
36
|
+
export function usePreset(createPreset, dependencies = []) {
|
|
37
37
|
const editorApi = usePresetContext();
|
|
38
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
39
|
const preset = useMemo(createPreset, dependencies);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getStepRange, processRawValue } from '@atlaskit/editor-common/utils';
|
|
1
2
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import { getBreakoutMode } from './node-width';
|
|
3
|
-
import { processRawValue, getStepRange } from '@atlaskit/editor-common/utils';
|
|
4
4
|
export { isInEmptyLine } from '@atlaskit/editor-common/utils';
|
|
5
5
|
export function processRawFragmentValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
|
|
6
6
|
if (!value) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
|
|
4
5
|
import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
|
|
5
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
/**
|
|
7
7
|
* Utils to send analytics event when a extension is inserted using quickInsert
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import debounce from 'lodash/debounce';
|
|
3
|
-
import { useComponentRenderTracking } from '@atlaskit/editor-common/utils';
|
|
4
3
|
import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { useComponentRenderTracking } from '@atlaskit/editor-common/utils';
|
|
5
5
|
export function RenderTracking(props) {
|
|
6
6
|
const debouncedHandleAnalyticsEvent = useMemo(() => debounce(props.handleAnalyticsEvent, 500), [props.handleAnalyticsEvent]);
|
|
7
7
|
useComponentRenderTracking({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { PluginPerformanceReport } from './plugin-performance-report';
|
|
3
|
-
import { DEFAULT_USE_PERFORMANCE_MARK, EVENT_NAME_DISPATCH_TRANSACTION } from './track-transactions';
|
|
4
3
|
import { SimpleMeasurementLogger } from './simple-measure-to-entries';
|
|
4
|
+
import { DEFAULT_USE_PERFORMANCE_MARK, EVENT_NAME_DISPATCH_TRANSACTION } from './track-transactions';
|
|
5
5
|
export class PluginPerformanceObserver {
|
|
6
6
|
constructor(callback) {
|
|
7
7
|
_defineProperty(this, "getNodeCounts", () => [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { outlier } from './outlier';
|
|
3
|
-
import { EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE,
|
|
3
|
+
import { EVENT_NAME_ON_CHANGE, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED } from './track-transactions';
|
|
4
4
|
export class PluginPerformanceReport {
|
|
5
5
|
constructor(entry) {
|
|
6
6
|
_defineProperty(this, "count", 0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED
|
|
2
|
+
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_ON_CHANGE, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED } from './track-transactions';
|
|
3
3
|
const EVENT_NAMES = [EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, EVENT_NAME_ON_CHANGE, EVENT_NAME_DISPATCH_TRANSACTION];
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { isPerformanceAPIAvailable, startMeasure, stopMeasure
|
|
2
|
+
import { getTimeSince, isPerformanceAPIAvailable, startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
|
|
3
3
|
export const EVENT_NAME_STATE_APPLY = `🦉 EditorView::state::apply`;
|
|
4
4
|
export const EVENT_NAME_UPDATE_STATE = `🦉 EditorView::updateState`;
|
|
5
5
|
export const EVENT_NAME_VIEW_STATE_UPDATED = `🦉 EditorView::onEditorViewStateUpdated`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { combineExtensionProviders } from '@atlaskit/editor-common/extensions';
|
|
2
1
|
import memoizeOne from 'memoize-one';
|
|
2
|
+
import { combineExtensionProviders } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
function prepareExtensionProvidersInternal(editorActions, extensionProviders) {
|
|
4
4
|
if (!extensionProviders) {
|
|
5
5
|
return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "191.
|
|
2
|
+
export const version = "191.4.0";
|
|
@@ -3,10 +3,10 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
|
+
import { analyticsEventKey, findNodePosByLocalIds, isEmptyDocument, processRawValue } from '@atlaskit/editor-common/utils';
|
|
6
7
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
7
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
9
|
import { findParentNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
-
import { analyticsEventKey, isEmptyDocument, processRawValue, findNodePosByLocalIds } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { createDispatch } from '../event-dispatcher';
|
|
11
11
|
import { toJSON } from '../utils';
|
|
12
12
|
import { __temporaryFixForConfigPanel as _temporaryFixForConfigPanel, getEditorValueWithMedia } from '../utils/action';
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
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
5
|
/** @jsx jsx */
|
|
6
|
-
import {
|
|
6
|
+
import { Fragment, memo, useCallback } from 'react';
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { PortalProviderWithThemeProviders, PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
@@ -13,8 +13,8 @@ import ErrorBoundary from '../create-editor/ErrorBoundary';
|
|
|
13
13
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
14
14
|
import ReactEditorView from '../create-editor/ReactEditorView';
|
|
15
15
|
import { ContextAdapter } from '../nodeviews/context-adapter';
|
|
16
|
-
import EditorContext from '../ui/EditorContext';
|
|
17
16
|
import { useSetPresetContext } from '../presets/context';
|
|
17
|
+
import EditorContext from '../ui/EditorContext';
|
|
18
18
|
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
19
19
|
import { getBaseFontSize } from './utils/getBaseFontSize';
|
|
20
20
|
/**
|
|
@@ -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
|
|
@@ -14,11 +14,11 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import uuid from 'uuid';
|
|
16
16
|
import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
17
|
+
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
17
18
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
18
19
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
19
20
|
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
20
21
|
import { isOutdatedBrowser, sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
21
|
-
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
22
22
|
import { WithEditorView } from './WithEditorView';
|
|
23
23
|
export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
24
24
|
_inherits(ErrorBoundaryWithEditorView, _React$Component);
|