@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
|
@@ -11,34 +11,34 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
11
11
|
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); }; }
|
|
12
12
|
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; } }
|
|
13
13
|
import React from 'react';
|
|
14
|
-
import { injectIntl } from 'react-intl-next';
|
|
15
14
|
import PropTypes from 'prop-types';
|
|
15
|
+
import { injectIntl } from 'react-intl-next';
|
|
16
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, getAnalyticsEventsFromTransaction, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
17
|
+
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
18
|
+
import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
19
|
+
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
20
|
+
import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
21
|
+
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
22
|
+
import { countNodes as _countNodes } from '@atlaskit/editor-common/utils';
|
|
23
|
+
import { analyticsEventKey, browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
|
|
16
24
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
17
25
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
18
|
-
import { editorMessages } from './messages';
|
|
19
|
-
import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking, processRawValue, analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
20
|
-
import { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
21
26
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
22
|
-
import {
|
|
23
|
-
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
24
|
-
import { findChangedNodesFromTransaction, validateNodes, validNode } from '../utils/nodes';
|
|
25
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, PLATFORMS, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
26
|
-
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
27
|
-
import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
28
|
-
import { createErrorReporter, createPMPlugins, processPluginsList } from './create-editor';
|
|
29
|
-
import { getDocStructure } from '@atlaskit/editor-common/core-utils';
|
|
27
|
+
import { getNodesCount } from '../utils/document';
|
|
30
28
|
import { isFullPage } from '../utils/is-full-page';
|
|
29
|
+
import { findChangedNodesFromTransaction, validateNodes, validNode } from '../utils/nodes';
|
|
30
|
+
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
31
31
|
import measurements from '../utils/performance/measure-enum';
|
|
32
|
-
import { getNodesCount } from '../utils/document';
|
|
33
|
-
import { createSchema } from './create-schema';
|
|
34
32
|
import { PluginPerformanceObserver } from '../utils/performance/plugin-performance-observer';
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
33
|
+
import { freezeUnsafeTransactionProperties } from '../utils/performance/safer-transactions';
|
|
34
|
+
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_ON_CHANGE, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, TransactionTracker } from '../utils/performance/track-transactions';
|
|
35
|
+
import { DEFAULT_SAMPLING_RATE_VALID_TRANSACTIONS, PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD, PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD } from './consts';
|
|
36
|
+
import { createErrorReporter, createPMPlugins, processPluginsList } from './create-editor';
|
|
37
37
|
import createPluginsList from './create-plugins-list';
|
|
38
|
-
import {
|
|
38
|
+
import { createSchema } from './create-schema';
|
|
39
|
+
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
40
|
+
import { editorMessages } from './messages';
|
|
39
41
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
40
|
-
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
41
|
-
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
42
42
|
function handleEditorFocus(view) {
|
|
43
43
|
if (view.hasFocus()) {
|
|
44
44
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
3
|
-
import { sortByOrder } from './sort-by-order';
|
|
4
3
|
import { InstrumentedPlugin } from '../utils/performance/instrumented-plugin';
|
|
4
|
+
import { sortByOrder } from './sort-by-order';
|
|
5
5
|
export function sortByRank(a, b) {
|
|
6
6
|
return a.rank - b.rank;
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import createUniversalPreset from '../presets/universal';
|
|
2
2
|
import { getDefaultPresetOptionsFromEditorProps } from './create-plugins-list';
|
|
3
3
|
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
4
|
+
|
|
4
5
|
// Separate file, we should not accidentally import this into the `ComposableEditor`
|
|
5
6
|
// otherwise it will blow up the bundle size.
|
|
6
7
|
export function createPreset(props, prevProps) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { sortByOrder } from './sort-by-order';
|
|
2
|
-
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
1
|
import { sanitizeNodes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
3
|
import { fixExcludes } from './create-editor';
|
|
4
|
+
import { sortByOrder } from './sort-by-order';
|
|
5
5
|
export function createSchema(editorConfig) {
|
|
6
6
|
var marks = fixExcludes(editorConfig.marks.sort(sortByOrder('marks')).reduce(function (acc, mark) {
|
|
7
7
|
acc[mark.name] = mark.mark;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import FullPage from '../ui/Appearance/FullPage';
|
|
2
1
|
import Chromeless from '../ui/Appearance/Chromeless';
|
|
3
2
|
import Comment from '../ui/Appearance/Comment';
|
|
3
|
+
import FullPage from '../ui/Appearance/FullPage';
|
|
4
4
|
import Mobile from '../ui/Appearance/Mobile';
|
|
5
5
|
export default function getUiComponent(appearance) {
|
|
6
6
|
appearance = appearance || 'comment';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EditorContext } from './ui/EditorContext';
|
package/dist/esm/editor.js
CHANGED
|
@@ -10,9 +10,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
10
10
|
/** @jsx jsx */
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { jsx } from '@emotion/react';
|
|
13
|
-
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
14
13
|
import { ComposableEditor } from './composable-editor';
|
|
15
14
|
import useUniversalPreset from './presets/useUniversalPreset';
|
|
15
|
+
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
16
16
|
var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
17
17
|
var props = _ref.props;
|
|
18
18
|
var preset = useUniversalPreset({
|
package/dist/esm/messages.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Common Translations will live here
|
|
2
|
-
import commonMessages, { linkMessages, linkToolbarMessages, statusMessages
|
|
2
|
+
import commonMessages, { dateMessages, linkMessages, linkToolbarMessages, statusMessages } from '@atlaskit/editor-common/messages';
|
|
3
3
|
export { linkMessages };
|
|
4
4
|
export { statusMessages };
|
|
5
5
|
export { dateMessages };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useContext, useMemo, useState } from 'react';
|
|
3
3
|
export var EditorAPIContext = /*#__PURE__*/React.createContext({});
|
|
4
4
|
export var PresetContextProvider = function PresetContextProvider(_ref) {
|
|
5
5
|
var children = _ref.children;
|
|
@@ -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,15 +7,14 @@ 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 {
|
|
11
|
-
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { akEditorMenuZIndex, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
12
11
|
export var TableControlsPadding = 20;
|
|
13
12
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
14
13
|
var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
|
|
15
14
|
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
16
15
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", ";\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n ", "\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
|
|
17
16
|
};
|
|
18
|
-
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", ";\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-
|
|
17
|
+
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", ";\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
|
|
19
18
|
var StickyToolbar = function StickyToolbar(props) {
|
|
20
19
|
var _useState = useState(0),
|
|
21
20
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -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,13 +1,12 @@
|
|
|
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 { akEditorFloatingDialogZIndex, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
import { akEditorFloatingDialogZIndex, akEditorMobileMaxWidth, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
6
5
|
export var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
7
6
|
var toolbarLineHeight = 56;
|
|
8
7
|
|
|
9
8
|
// box-shadow is overriden by the mainToolbar
|
|
10
|
-
var mainToolbarWithKeyline = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow: 0 ", "px 0 0\n ", ";\n"])), akEditorToolbarKeylineHeight, "var(--ds-
|
|
9
|
+
var mainToolbarWithKeyline = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow: 0 ", "px 0 0\n ", ";\n"])), akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
|
|
11
10
|
var mainToolbarTwoLineStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n flex-wrap: wrap;\n height: calc(", "px * 2);\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, toolbarLineHeight);
|
|
12
11
|
var mainToolbar = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n box-shadow: none;\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4456\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), akEditorSwoopCubicBezier, akEditorFloatingDialogZIndex, toolbarLineHeight, "var(--ds-surface, white)", akEditorMobileMaxWidth, toolbarLineHeight);
|
|
13
12
|
export var mainToolbarStyle = function mainToolbarStyle(showKeyline, twoLineEditorToolbar) {
|
|
@@ -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, ")"));
|