@atlaskit/editor-core 191.3.1 → 191.3.2
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 +7 -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.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 -1
- 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 -1
- 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/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.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 +1 -1
- 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 +1 -1
- 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/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.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 +1 -1
- 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 +1 -1
- 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/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/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/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/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/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 +3 -2
- 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/package.json +6 -3
|
@@ -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
|
/**
|
|
@@ -2,15 +2,27 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
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
|
+
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
6
|
+
import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
7
|
+
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
8
|
+
import { avatarGroupPlugin } from '@atlaskit/editor-plugin-avatar-group';
|
|
9
|
+
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
|
|
5
10
|
import { borderPlugin } from '@atlaskit/editor-plugin-border';
|
|
11
|
+
import { breakoutPlugin } from '@atlaskit/editor-plugin-breakout';
|
|
6
12
|
import { captionPlugin } from '@atlaskit/editor-plugin-caption';
|
|
7
13
|
import { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
8
14
|
import { codeBidiWarningPlugin } from '@atlaskit/editor-plugin-code-bidi-warning';
|
|
15
|
+
import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
9
16
|
import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
10
17
|
import { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
18
|
+
import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
|
|
19
|
+
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
11
20
|
import { datePlugin } from '@atlaskit/editor-plugin-date';
|
|
12
21
|
import { emojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
13
22
|
import { expandPlugin } from '@atlaskit/editor-plugin-expand';
|
|
23
|
+
import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
24
|
+
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
25
|
+
import { findReplacePlugin } from '@atlaskit/editor-plugin-find-replace';
|
|
14
26
|
import { fragmentPlugin } from '@atlaskit/editor-plugin-fragment';
|
|
15
27
|
import { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
16
28
|
import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
@@ -30,28 +42,16 @@ import { pasteOptionsToolbarPlugin } from '@atlaskit/editor-plugin-paste-options
|
|
|
30
42
|
import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
|
|
31
43
|
import { rulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
32
44
|
import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
33
|
-
import { breakoutPlugin } from '@atlaskit/editor-plugin-breakout';
|
|
34
45
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
35
46
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
36
47
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
37
48
|
import { tasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
38
49
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
39
50
|
import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-lists-indentation';
|
|
40
|
-
import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
|
|
41
|
-
import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
42
|
-
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
43
|
-
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
44
51
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
45
|
-
import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
46
|
-
import { avatarGroupPlugin } from '@atlaskit/editor-plugin-avatar-group';
|
|
47
|
-
import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
48
|
-
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
|
|
49
|
-
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
50
|
-
import { findReplacePlugin } from '@atlaskit/editor-plugin-find-replace';
|
|
51
|
-
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
52
52
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
53
|
-
import { createDefaultPreset } from './default';
|
|
54
53
|
import { version as coreVersion } from '../version-wrapper';
|
|
54
|
+
import { createDefaultPreset } from './default';
|
|
55
55
|
/**
|
|
56
56
|
* Creates a preset with all of the available plugins.
|
|
57
57
|
* Basis for create-plugins-list and can be used to migrate from Editor -> EditorNext (Presets project)
|
package/dist/esm/test-utils.js
CHANGED
|
@@ -2,11 +2,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
5
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
6
|
+
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
7
|
+
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
8
|
import { createSchema } from './create-editor/create-schema';
|
|
8
9
|
import { sortByOrder } from './create-editor/sort-by-order';
|
|
9
|
-
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
10
10
|
function lightProcessPluginsList(editorPlugins) {
|
|
11
11
|
/**
|
|
12
12
|
* First pass to collect pluginsOptions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
4
|
import { N60A } from '@atlaskit/theme/colors';
|
|
5
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
6
|
export var dropdown = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n box-sizing: border-box;\n padding: ", " 0;\n"])), "var(--ds-surface-overlay, white)", borderRadius(), "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), "var(--ds-space-050, 4px)");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
4
|
+
import { N20, N800 } from '@atlaskit/theme/colors';
|
|
5
5
|
export var dropdownItem = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n padding: ", " ", "\n ", " ", ";\n color: ", ";\n > span {\n display: flex;\n margin-right: ", ";\n }\n &:hover {\n background-color: ", ";\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-400, 32px)", "var(--ds-space-100, 8px)", "var(--ds-space-150, 12px)", "var(--ds-text, ".concat(N800, ")"), "var(--ds-space-100, 8px)", "var(--ds-background-neutral-subtle-hovered, ".concat(N20, ")"));
|
|
@@ -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
|
var insideContentArea = function insideContentArea(ref) {
|
|
8
7
|
while (ref) {
|
|
@@ -12,12 +12,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
import React, { Fragment } from 'react';
|
|
14
14
|
import { css, jsx } from '@emotion/react';
|
|
15
|
-
import
|
|
15
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
16
|
+
import { usePresetContext } from '../../presets/context';
|
|
16
17
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
18
|
+
import PluginSlot from '../PluginSlot';
|
|
17
19
|
import { scrollbarStyles } from '../styles';
|
|
18
20
|
import WithFlash from '../WithFlash';
|
|
19
|
-
import { usePresetContext } from '../../presets/context';
|
|
20
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
21
21
|
var chromelessEditor = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 20px;\n height: auto;\n\n overflow-x: hidden;\n overflow-y: auto;\n ", ";\n max-width: inherit;\n box-sizing: border-box;\n word-wrap: break-word;\n\n div > .ProseMirror {\n outline: none;\n white-space: pre-wrap;\n padding: 0;\n margin: 0;\n\n & > :last-child {\n padding-bottom: 0.5em;\n }\n }\n"])), scrollbarStyles);
|
|
22
22
|
var ContentArea = createEditorContentStyle();
|
|
23
23
|
ContentArea.displayName = 'ContentArea';
|
|
@@ -12,27 +12,27 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
import React, { Fragment } from 'react';
|
|
14
14
|
import { css, jsx } from '@emotion/react';
|
|
15
|
+
import classnames from 'classnames';
|
|
16
|
+
import { injectIntl } from 'react-intl-next';
|
|
15
17
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
16
18
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import Toolbar from '../../Toolbar';
|
|
20
|
-
import PluginSlot from '../../PluginSlot';
|
|
21
|
-
import { ClickAreaBlock } from '../../Addon';
|
|
22
|
-
import { tableCommentEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
23
|
-
import WithFlash from '../../WithFlash';
|
|
19
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
20
|
+
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
24
21
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
22
|
+
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
23
|
+
import { tableCommentEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
25
24
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
26
|
-
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
27
25
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
26
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
27
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
30
28
|
import messages from '../../../messages';
|
|
31
29
|
import { usePresetContext } from '../../../presets/context';
|
|
32
|
-
import {
|
|
30
|
+
import { ClickAreaBlock } from '../../Addon';
|
|
33
31
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
34
|
-
import
|
|
35
|
-
import
|
|
32
|
+
import PluginSlot from '../../PluginSlot';
|
|
33
|
+
import Toolbar from '../../Toolbar';
|
|
34
|
+
import WithFlash from '../../WithFlash';
|
|
35
|
+
import { MainToolbar, mainToolbarCustomComponentsSlotStyle, TableControlsPadding } from './Toolbar';
|
|
36
36
|
var CommentEditorMargin = 14;
|
|
37
37
|
var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: ", " ", "\n ", ";\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Paragraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-background-input, white)", "var(--ds-border, ".concat(N40, ")"), borderRadius());
|
|
38
38
|
var ContentArea = createEditorContentStyle(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n overflow-x: ", ";\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for table controls. Otherwise margin collapse and controls are misplaced. **/\n .ProseMirror {\n margin: ", " ", "px\n ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), getBooleanFF('platform.editor.table-sticky-scrollbar') ? 'clip' : 'hidden', "var(--ds-space-150, 12px)", CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, TableControlsPadding, tableCommentEditorStyles));
|
|
@@ -7,8 +7,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
7
7
|
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
+
import { akEditorMenuZIndex, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
10
11
|
import { N30 } from '@atlaskit/theme/colors';
|
|
11
|
-
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
export var TableControlsPadding = 20;
|
|
13
13
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
14
14
|
var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
-
import React, { useEffect,
|
|
3
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
-
import { fullPageEditorWrapper } from './StyledComponents';
|
|
6
5
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
6
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
8
8
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
9
|
-
import {
|
|
9
|
+
import { fullPageEditorWrapper } from './StyledComponents';
|
|
10
10
|
var useShowKeyline = function useShowKeyline(contentAreaRef) {
|
|
11
11
|
var _useState = useState(false),
|
|
12
12
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -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 var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
12
13
|
var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
13
14
|
var theme = useTheme();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
|
|
4
|
-
import React, {
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
|
-
import Toolbar from '../../Toolbar';
|
|
8
|
-
import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyle, mainToolbarSecondChildStyle, nonCustomToolbarWrapperStyle, customToolbarWrapperStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
|
|
9
|
-
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
10
7
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
|
+
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
11
9
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
12
10
|
import { usePresetContext } from '../../../presets/context';
|
|
11
|
+
import Toolbar from '../../Toolbar';
|
|
13
12
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
13
|
+
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
14
14
|
export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
15
15
|
var _props$featureFlags, _props$customPrimaryT, _props$featureFlags2, _props$featureFlags3, _editorAPI$avatarGrou, _props$collabEdit, _props$collabEdit2, _props$collabEdit3;
|
|
16
16
|
var _useState = useState(false),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
+
import { akEditorFloatingDialogZIndex, akEditorMobileMaxWidth, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
4
5
|
import { N30 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { akEditorFloatingDialogZIndex, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
export var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
7
7
|
var toolbarLineHeight = 56;
|
|
8
8
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { taskListSelector, decisionListSelector } from '@atlaskit/adf-schema';
|
|
6
|
-
import { createEditorContentStyle } from '../../ContentStyles';
|
|
4
|
+
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
7
5
|
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
8
6
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugin-table/ui/consts';
|
|
7
|
+
import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorSwoopCubicBezier, akLayoutGutterOffset, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { createEditorContentStyle } from '../../ContentStyles';
|
|
9
9
|
import { scrollbarStyles } from '../../styles';
|
|
10
10
|
var SWOOP_ANIMATION = "0.5s ".concat(akEditorSwoopCubicBezier);
|
|
11
11
|
var TOTAL_PADDING = akEditorGutterPadding * 2;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import React, {
|
|
4
|
+
import React, { forwardRef, useCallback } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import WithFlash from '../WithFlash';
|
|
7
|
-
import { createEditorContentStyle } from '../ContentStyles';
|
|
8
|
-
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
9
|
-
import { usePresetContext } from '../../presets/context';
|
|
10
6
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
7
|
+
import { usePresetContext } from '../../presets/context';
|
|
8
|
+
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
9
|
+
import { createEditorContentStyle } from '../ContentStyles';
|
|
10
|
+
import WithFlash from '../WithFlash';
|
|
11
11
|
|
|
12
12
|
// 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.
|
|
13
13
|
// Copied packages/editor/editor-mobile-bridge/src/editor/editor-plugins/mobile-dimensions/index.ts
|
|
@@ -9,11 +9,11 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
9
9
|
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; } }
|
|
10
10
|
/** @jsx jsx */
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import { jsx } from '@emotion/react';
|
|
13
12
|
import { PureComponent } from 'react';
|
|
14
|
-
import {
|
|
13
|
+
import { jsx } from '@emotion/react';
|
|
15
14
|
import { injectIntl } from 'react-intl-next';
|
|
16
15
|
import { messages } from './messages';
|
|
16
|
+
import { inputStyle } from './styles';
|
|
17
17
|
var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
18
18
|
_inherits(ChromeCollapsed, _PureComponent);
|
|
19
19
|
var _super = _createSuper(ChromeCollapsed);
|
|
@@ -2,6 +2,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { akEditorSubtleAccent, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
5
|
import { N300, N50 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
7
|
export var inputStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */\n input& {\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n height: 40px;\n padding-left: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n font-size: ", ";\n width: 100%;\n font-weight: 400;\n line-height: 1.42857142857143;\n letter-spacing: -0.005em;\n color: ", ";\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n cursor: text;\n }\n }\n"])), "var(--ds-background-input, white)", "var(--ds-border-input, ".concat(akEditorSubtleAccent, ")"), borderRadius(), "var(--ds-space-250, 20px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", relativeFontSizeToBase16(14), "var(--ds-text-subtlest, ".concat(N300, ")"), "var(--ds-background-input-hovered, white)", "var(--ds-border-input, ".concat(N50, ")"));
|
|
@@ -7,10 +7,10 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
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; } }
|
|
10
|
-
import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
11
10
|
import React from 'react';
|
|
12
|
-
import
|
|
11
|
+
import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
13
12
|
import { ComposableEditor } from '../../composable-editor';
|
|
13
|
+
import Editor from '../../editor';
|
|
14
14
|
import EditorWithActions from '../../EditorWithActions';
|
|
15
15
|
import ChromeCollapsed from '../ChromeCollapsed';
|
|
16
16
|
var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
+
import { CodeBlockSharedCssClassName, codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
5
|
+
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
6
|
import { R75 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorDeleteIconColor, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
7
|
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
8
8
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &::after {\n height: 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, none)");
|
|
9
9
|
};
|
|
@@ -2,5 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
5
|
-
import {
|
|
5
|
+
import { akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
export var dateStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n .", " {\n line-height: initial;\n cursor: pointer;\n }\n\n &.", " {\n .", " > span {\n ", "\n }\n }\n }\n\n .danger {\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px\n ", ";\n }\n }\n"])), DateSharedCssClassName.DATE_CONTAINER, DateSharedCssClassName.DATE_WRAPPER, akEditorSelectedNodeClassName, DateSharedCssClassName.DATE_WRAPPER, getSelectionStyles([SelectionStyle.BoxShadow]), DateSharedCssClassName.DATE_CONTAINER, akEditorSelectedNodeClassName, DateSharedCssClassName.DATE_WRAPPER, akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { N40A, N50A, N80A, R300, R50 } from '@atlaskit/theme/colors';
|
|
5
4
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
5
|
+
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
6
6
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import {
|
|
8
|
+
import { N40A, N50A, N80A, R300, R50 } from '@atlaskit/theme/colors';
|
|
9
9
|
var EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
10
10
|
var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR() {
|
|
11
11
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-icon-subtle, ".concat(N80A, ")"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
4
|
+
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
6
6
|
export var extensionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .multiBodiedExtensionView-content-wrap {\n &.danger > span > .multiBodiedExtension--container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n &:not(.danger).", " {\n & > span > .multiBodiedExtension--container {\n ", "\n }\n }\n .multiBodiedExtension--container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n }\n\n .extensionView-content-wrap,\n .multiBodiedExtensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n\n [data-mark-type='fragment'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n }\n }\n\n &:first-child {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-top: 0;\n }\n }\n }\n\n &:nth-last-of-type(-n + 2):not(:first-of-type) {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n\n & > [data-mark-type='dataConsumer'] {\n & > .extensionView-content-wrap,\n & > .bodiedExtensionView-content-wrap {\n margin-bottom: 0;\n }\n }\n }\n }\n"])), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), blockNodesVerticalMargin, blockNodesVerticalMargin);
|
|
@@ -2,32 +2,32 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles, SmartCardSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
|
-
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
5
|
+
import { css, jsx, useTheme } from '@emotion/react';
|
|
9
6
|
import { telepointerStyle } from '@atlaskit/editor-common/collab';
|
|
10
|
-
import {
|
|
7
|
+
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
8
|
+
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
9
|
+
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
10
|
+
import { annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFix, dateSharedStyle, embedCardStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, shadowSharedStyle, SmartCardSharedCssClassName, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
11
|
+
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
12
|
+
import { codeMarkSharedStyles, linkSharedStyle, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
13
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
11
14
|
import { blocktypeStyles } from '@atlaskit/editor-plugin-block-type/styles';
|
|
15
|
+
import { findReplaceStyles } from '@atlaskit/editor-plugin-find-replace/styles';
|
|
12
16
|
import { textHighlightStyle } from '@atlaskit/editor-plugin-paste-options-toolbar/styles';
|
|
17
|
+
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
18
|
+
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
19
|
+
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorLineHeight, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
20
|
+
import { N200, N30A, N500 } from '@atlaskit/theme/colors';
|
|
21
|
+
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
13
22
|
import { codeBlockStyles } from './code-block';
|
|
14
|
-
import {
|
|
23
|
+
import { dateStyles } from './date';
|
|
24
|
+
import { expandStyles } from './expand';
|
|
25
|
+
import { extensionStyles } from './extension';
|
|
15
26
|
import { layoutStyles } from './layout';
|
|
27
|
+
import { mediaStyles } from './media';
|
|
16
28
|
import { panelStyles } from './panel';
|
|
17
|
-
import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
|
|
18
|
-
import { extensionStyles } from './extension';
|
|
19
|
-
import { expandStyles } from './expand';
|
|
20
|
-
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
21
|
-
import { findReplaceStyles } from '@atlaskit/editor-plugin-find-replace/styles';
|
|
22
|
-
import { taskDecisionStyles } from './tasks-and-decisions';
|
|
23
29
|
import { statusStyles } from './status';
|
|
24
|
-
import {
|
|
25
|
-
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
26
|
-
import { linkSharedStyle, codeMarkSharedStyles, ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
27
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
28
|
-
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
29
|
-
import { N500, N30A, N200 } from '@atlaskit/theme/colors';
|
|
30
|
-
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
30
|
+
import { taskDecisionStyles } from './tasks-and-decisions';
|
|
31
31
|
export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n"])), linkSharedStyle);
|
|
32
32
|
var ruleStyles = function ruleStyles() {
|
|
33
33
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), ruleSharedStyles(), "var(--ds-space-050, 4px)", akEditorLineHeight, akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(akEditorSelectedBorderColor, ")"));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { columnLayoutSharedStyle, LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from '@atlaskit/editor-common/styles';
|
|
6
|
-
import { gridMediumMaxWidth, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akLayoutGutterOffset, akEditorSwoopCubicBezier, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
import { columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '@atlaskit/editor-common/styles';
|
|
7
5
|
import { TableCssClassName } from '@atlaskit/editor-plugin-table/types';
|
|
8
6
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugin-table/ui/consts';
|
|
7
|
+
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
9
9
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
10
10
|
export var layoutStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n // TODO: Migrate away from gridSize\n // Recommendation: Replace directly with 7px\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid\n ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > :not(style):first-child,\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n > .embedCardView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > style:first-child\n + .ProseMirror-gapcursor.-right\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > .ProseMirror-gapcursor.-right:first-of-type\n + .embedCardView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > style:first-child\n + .ProseMirror-gapcursor\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n // TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n // This is because the default state already uses the same token and, as such, the hover style won't change anything.\n // https://product-fabric.atlassian.net/browse/DSP-4441\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border: ", "px solid\n ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), columnLayoutSharedStyle, 8 - 1, akLayoutGutterOffset, akEditorSwoopCubicBezier, akEditorSelectedBorderSize, "var(--ds-border, ".concat(N40A, ")"), LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, gridMediumMaxWidth, akEditorSelectedBorderSize, "var(--ds-border, ".concat(N50A, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
+
import { mediaInlineImageStyles } from '@atlaskit/editor-common/media-inline';
|
|
4
5
|
import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
5
6
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
6
7
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
7
8
|
import { B200, N60, Y500 } from '@atlaskit/theme/colors';
|
|
8
|
-
import { mediaInlineImageStyles } from '@atlaskit/editor-common/media-inline';
|
|
9
9
|
export var mediaStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .media-extended-resize-experience[layout^='wrap-'] {\n // override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n // to prevent scroll bar\n overflow: visible !important;\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n ", "\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: ", ";\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: ", ";\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize legacy handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", " !important;\n }\n /* Media resize new handlers */\n .resizer-handle-thumb {\n background: ", " !important;\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: ", "; /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n\n .warning {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n\n .", " .", "::after {\n border: 1px solid ", ";\n }\n\n .", " .", " {\n box-shadow: 0 0 0 1px ", " !important;\n }\n\n .resizer-handle-thumb {\n background: ", " !important;\n }\n }\n"])), mediaSingleSharedStyle, richMediaClassName, richMediaClassName, richMediaClassName, mediaInlineImageStyles, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, "var(--ds-border, ".concat(N60, ")"), akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-border-focused, ".concat(B200, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), richMediaClassName, fileCardImageViewSelector, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", richMediaClassName, fileCardImageViewSelector, "var(--ds-border-warning, ".concat(Y500, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-warning, ".concat(Y500, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-warning, ".concat(Y500, ")"), "var(--ds-icon-warning, ".concat(Y500, ")"));
|
|
10
10
|
|
|
11
11
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { PanelSharedCssClassName, panelSharedStyles } from '@atlaskit/editor-common/panel';
|
|
5
|
+
import { akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
export var panelStyles = function panelStyles() {
|
|
7
7
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n cursor: pointer;\n\n /* Danger when top level node */\n &.danger {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", " !important;\n\n .", " {\n color: ", " !important;\n }\n }\n }\n\n .", " {\n cursor: text;\n }\n\n /* Danger when nested node */\n .danger .", " {\n &[data-panel-type] {\n background-color: ", ";\n\n .", " {\n color: ", ";\n }\n }\n }\n\n ", ";\n }\n\n .", ".", ":not(.danger) {\n ", "\n }\n"])), PanelSharedCssClassName.prefix, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), PanelSharedCssClassName.content, PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), panelSharedStyles(), PanelSharedCssClassName.prefix, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]));
|
|
8
8
|
};
|
|
@@ -2,5 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { StatusSharedCssClassName, TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
5
|
-
import {
|
|
5
|
+
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
export var statusStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", ",\n .", ",\n [data-layout-section] {\n .", " {\n max-width: 100%;\n line-height: 0;\n\n > span {\n width: 100%;\n }\n }\n }\n .", " {\n > span {\n cursor: pointer;\n line-height: 0; /* Prevent responsive layouts increasing height of container. */\n }\n\n &.", "\n .", "\n > span {\n ", "\n }\n }\n\n .danger {\n .", " > span {\n background-color: ", ";\n }\n\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n }\n }\n"])), TableSharedCssClassName.TABLE_CELL_WRAPPER, TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER, StatusSharedCssClassName.STATUS_CONTAINER, StatusSharedCssClassName.STATUS_CONTAINER, akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, getSelectionStyles([SelectionStyle.BoxShadow]), StatusSharedCssClassName.STATUS_LOZENGE, akEditorDeleteBackgroundWithOpacity, StatusSharedCssClassName.STATUS_CONTAINER, akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, akEditorSelectedBorderSize, akEditorDeleteBorder);
|