@atlaskit/editor-core 235.0.0 → 235.0.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 +17 -0
- package/dist/cjs/composable-editor/editor-internal-compiled.js +0 -6
- package/dist/cjs/composable-editor/editor-internal.js +3 -12
- package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +1 -7
- package/dist/cjs/ui/Appearance/ChromelessEditorContainer.js +26 -13
- package/dist/cjs/ui/Appearance/Comment/Comment.js +262 -7
- package/dist/cjs/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
- package/dist/cjs/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -6
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -13
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +15 -7
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper.js +41 -10
- package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -6
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +192 -14
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper.js +23 -7
- package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
- package/dist/cjs/ui/ChromeCollapsed/index.js +1 -7
- package/dist/cjs/ui/ContextPanel/index-compiled.js +0 -6
- package/dist/cjs/ui/ContextPanel/index.js +2 -11
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -1
- package/dist/cjs/ui/PluginSlot/PluginSlot-compiled.js +0 -7
- package/dist/cjs/ui/PluginSlot/index.js +1 -6
- package/dist/cjs/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +1 -8
- package/dist/cjs/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +2 -11
- package/dist/cjs/ui/WithFlash/index.js +1 -6
- package/dist/cjs/ui/WithFlash/withFlash-compiled.js +1 -6
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal-compiled.js +0 -6
- package/dist/es2019/composable-editor/editor-internal.js +3 -10
- package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +1 -5
- package/dist/es2019/ui/Appearance/ChromelessEditorContainer.js +24 -12
- package/dist/es2019/ui/Appearance/Comment/Comment.js +254 -5
- package/dist/es2019/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
- package/dist/es2019/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -6
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -8
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +11 -5
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper.js +37 -6
- package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -4
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +186 -11
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper.js +24 -5
- package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
- package/dist/es2019/ui/ChromeCollapsed/index.js +1 -5
- package/dist/es2019/ui/ContextPanel/index-compiled.js +0 -6
- package/dist/es2019/ui/ContextPanel/index.js +2 -7
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -1
- package/dist/es2019/ui/PluginSlot/PluginSlot-compiled.js +0 -7
- package/dist/es2019/ui/PluginSlot/index.js +1 -4
- package/dist/es2019/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +1 -5
- package/dist/es2019/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +2 -9
- package/dist/es2019/ui/WithFlash/index.js +1 -4
- package/dist/es2019/ui/WithFlash/withFlash-compiled.js +0 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal-compiled.js +0 -6
- package/dist/esm/composable-editor/editor-internal.js +3 -12
- package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +1 -7
- package/dist/esm/ui/Appearance/ChromelessEditorContainer.js +25 -14
- package/dist/esm/ui/Appearance/Comment/Comment.js +260 -7
- package/dist/esm/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
- package/dist/esm/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -7
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -12
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +13 -7
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper.js +39 -10
- package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -6
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +190 -13
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
- package/dist/esm/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper.js +23 -7
- package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
- package/dist/esm/ui/ChromeCollapsed/index.js +1 -7
- package/dist/esm/ui/ContextPanel/index-compiled.js +0 -6
- package/dist/esm/ui/ContextPanel/index.js +2 -11
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -1
- package/dist/esm/ui/PluginSlot/PluginSlot-compiled.js +0 -7
- package/dist/esm/ui/PluginSlot/index.js +1 -6
- package/dist/esm/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
- package/dist/esm/ui/Toolbar/ToolbarInner.js +1 -7
- package/dist/esm/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +2 -11
- package/dist/esm/ui/WithFlash/index.js +1 -6
- package/dist/esm/ui/WithFlash/withFlash-compiled.js +0 -6
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/editor-internal-compiled.d.ts +0 -6
- package/dist/types/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.d.ts +0 -4
- package/dist/types/ui/Appearance/ChromelessEditorContainer.d.ts +10 -7
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +24 -2
- package/dist/types/ui/Appearance/Comment/FixedToolbar-compiled.d.ts +0 -6
- package/dist/types/ui/Appearance/Comment/StickyToolbar-compiled.d.ts +0 -6
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +7 -3
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +2 -3
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +54 -6
- package/dist/types/ui/Appearance/FullPage/MainToolbar-compiled.d.ts +0 -6
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +13 -3
- package/dist/types/ui/ChromeCollapsed/ChromeCollapsed-compiled.d.ts +0 -6
- package/dist/types/ui/PluginSlot/PluginSlot-compiled.d.ts +0 -6
- package/dist/types/ui/Toolbar/ToolbarComponentsWrapper-compiled.d.ts +0 -6
- package/dist/types/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.d.ts +0 -6
- package/dist/types/ui/WithFlash/index.d.ts +1 -1
- package/dist/types/ui/WithFlash/withFlash-compiled.d.ts +0 -6
- package/package.json +3 -3
- package/dist/cjs/composable-editor/BaseThemeWrapper.js +0 -47
- package/dist/cjs/composable-editor/editor-internal-emotion.js +0 -35
- package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -36
- package/dist/cjs/ui/Appearance/Chromeless-compiled.js +0 -38
- package/dist/cjs/ui/Appearance/Chromeless-emotion.js +0 -89
- package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +0 -273
- package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +0 -339
- package/dist/cjs/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -89
- package/dist/cjs/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -126
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -29
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -34
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -57
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -89
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -13
- package/dist/cjs/ui/Appearance/FullPage/FullPage-emotion.js +0 -38
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -201
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -398
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -63
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -13
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -35
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -70
- package/dist/cjs/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -13
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +0 -65
- package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -37
- package/dist/cjs/ui/ContextPanel/index-emotion.js +0 -86
- package/dist/cjs/ui/PluginSlot/PluginSlot-emotion.js +0 -35
- package/dist/cjs/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -36
- package/dist/cjs/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -32
- package/dist/cjs/ui/WithFlash/withFlash-emotion.js +0 -91
- package/dist/es2019/composable-editor/BaseThemeWrapper.js +0 -35
- package/dist/es2019/composable-editor/editor-internal-emotion.js +0 -27
- package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -26
- package/dist/es2019/ui/Appearance/Chromeless-compiled.js +0 -30
- package/dist/es2019/ui/Appearance/Chromeless-emotion.js +0 -80
- package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +0 -260
- package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +0 -326
- package/dist/es2019/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -86
- package/dist/es2019/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -123
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -19
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -25
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -47
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -79
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPage-emotion.js +0 -29
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -190
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -390
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -53
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -5
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -30
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -65
- package/dist/es2019/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -5
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +0 -59
- package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -27
- package/dist/es2019/ui/ContextPanel/index-emotion.js +0 -74
- package/dist/es2019/ui/PluginSlot/PluginSlot-emotion.js +0 -25
- package/dist/es2019/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -28
- package/dist/es2019/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -24
- package/dist/es2019/ui/WithFlash/withFlash-emotion.js +0 -75
- package/dist/esm/composable-editor/BaseThemeWrapper.js +0 -39
- package/dist/esm/composable-editor/editor-internal-emotion.js +0 -28
- package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -30
- package/dist/esm/ui/Appearance/Chromeless-compiled.js +0 -31
- package/dist/esm/ui/Appearance/Chromeless-emotion.js +0 -83
- package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +0 -266
- package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +0 -328
- package/dist/esm/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -81
- package/dist/esm/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -119
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -21
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -27
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -49
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -81
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -7
- package/dist/esm/ui/Appearance/FullPage/FullPage-emotion.js +0 -31
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -194
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -388
- package/dist/esm/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -55
- package/dist/esm/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -7
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -29
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -62
- package/dist/esm/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -7
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +0 -59
- package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -29
- package/dist/esm/ui/ContextPanel/index-emotion.js +0 -79
- package/dist/esm/ui/PluginSlot/PluginSlot-emotion.js +0 -29
- package/dist/esm/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -28
- package/dist/esm/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -25
- package/dist/esm/ui/WithFlash/withFlash-emotion.js +0 -88
- package/dist/types/composable-editor/BaseThemeWrapper.d.ts +0 -7
- package/dist/types/composable-editor/editor-internal-emotion.d.ts +0 -15
- package/dist/types/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.d.ts +0 -12
- package/dist/types/ui/Appearance/Chromeless-compiled.d.ts +0 -18
- package/dist/types/ui/Appearance/Chromeless-emotion.d.ts +0 -18
- package/dist/types/ui/Appearance/Comment/Comment-compiled.d.ts +0 -30
- package/dist/types/ui/Appearance/Comment/Comment-emotion.d.ts +0 -20
- package/dist/types/ui/Appearance/Comment/FixedToolbar-emotion.d.ts +0 -19
- package/dist/types/ui/Appearance/Comment/StickyToolbar-emotion.d.ts +0 -21
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +0 -16
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +0 -16
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +0 -3
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +0 -14
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/FullPage-emotion.d.ts +0 -7
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea-compiled.d.ts +0 -57
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea-emotion.d.ts +0 -57
- package/dist/types/ui/Appearance/FullPage/MainToolbar-emotion.d.ts +0 -21
- package/dist/types/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper-compiled.d.ts +0 -19
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper-emotion.d.ts +0 -19
- package/dist/types/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +0 -19
- package/dist/types/ui/ChromeCollapsed/ChromeCollapsed-emotion.d.ts +0 -13
- package/dist/types/ui/ContextPanel/index-emotion.d.ts +0 -13
- package/dist/types/ui/PluginSlot/PluginSlot-emotion.d.ts +0 -12
- package/dist/types/ui/Toolbar/ToolbarComponentsWrapper-emotion.d.ts +0 -17
- package/dist/types/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.d.ts +0 -17
- package/dist/types/ui/WithFlash/withFlash-emotion.d.ts +0 -19
- /package/dist/cjs/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
- /package/dist/cjs/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
-
* Used via `componentWithCondition` in `Comment.tsx`.
|
|
8
|
-
*
|
|
9
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
-
*/
|
|
11
|
-
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
14
|
-
import { css, jsx } from '@emotion/react';
|
|
15
|
-
import classnames from 'classnames';
|
|
16
|
-
import { useIntl } from 'react-intl';
|
|
17
|
-
import ButtonGroup from '@atlaskit/button/button-group';
|
|
18
|
-
import Button from '@atlaskit/button/default/button';
|
|
19
|
-
import { useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
20
|
-
import messages from '@atlaskit/editor-common/messages';
|
|
21
|
-
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
22
|
-
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
23
|
-
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
24
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
25
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line import/no-named-as-default
|
|
28
|
-
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
29
|
-
import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/contentComponentWrapper';
|
|
30
|
-
import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
|
|
31
|
-
import PluginSlot from '../../PluginSlot';
|
|
32
|
-
import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
|
|
33
|
-
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
34
|
-
import WithFlash from '../../WithFlash';
|
|
35
|
-
import { CommentToolbar } from './CommentToolbar';
|
|
36
|
-
import { MainToolbar } from './Toolbar';
|
|
37
|
-
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
38
|
-
const commentEditorStyles = css({
|
|
39
|
-
display: 'flex',
|
|
40
|
-
flexDirection: 'column',
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
|
-
'.less-margin > .ProseMirror': {
|
|
43
|
-
margin: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"}`
|
|
44
|
-
},
|
|
45
|
-
minWidth: '272px',
|
|
46
|
-
height: 'auto',
|
|
47
|
-
backgroundColor: "var(--ds-background-input, #FFFFFF)",
|
|
48
|
-
border: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border-input, #8C8F97)"}`,
|
|
49
|
-
boxSizing: 'border-box',
|
|
50
|
-
borderRadius: "var(--ds-radius-medium, 6px)",
|
|
51
|
-
maxWidth: 'inherit',
|
|
52
|
-
wordWrap: 'break-word'
|
|
53
|
-
});
|
|
54
|
-
const modernisedEditorStyles = css({
|
|
55
|
-
borderRadius: "var(--ds-radius-xlarge, 12px)",
|
|
56
|
-
borderColor: "var(--ds-border-input, #8C8F97)"
|
|
57
|
-
});
|
|
58
|
-
const secondaryToolbarStyles = css({
|
|
59
|
-
boxSizing: 'border-box',
|
|
60
|
-
justifyContent: 'flex-end',
|
|
61
|
-
alignItems: 'center',
|
|
62
|
-
display: 'flex',
|
|
63
|
-
padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-025, 2px)"}`
|
|
64
|
-
});
|
|
65
|
-
const mainToolbarCustomComponentsSlotStyleNew = css({
|
|
66
|
-
display: 'flex',
|
|
67
|
-
justifyContent: 'flex-end',
|
|
68
|
-
alignItems: 'center',
|
|
69
|
-
flexGrow: 1,
|
|
70
|
-
paddingRight: "var(--ds-space-250, 20px)",
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
72
|
-
'> div': {
|
|
73
|
-
display: 'flex',
|
|
74
|
-
flexShrink: 0
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
const mainToolbarCustomComponentsSlotStylePaddingOverride = css({
|
|
78
|
-
paddingRight: 0
|
|
79
|
-
});
|
|
80
|
-
const mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = css({
|
|
81
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
82
|
-
[`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
|
|
83
|
-
paddingRight: 0
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
const appearance = 'comment';
|
|
87
|
-
export const CommentEditorWithIntlEmotion = props => {
|
|
88
|
-
var _editorAPI$blockMenu$, _editorAPI$blockMenu, _editorAPI$blockMenu$2, _editorAPI$blockMenu$3;
|
|
89
|
-
const {
|
|
90
|
-
editorAPI
|
|
91
|
-
} = props;
|
|
92
|
-
|
|
93
|
-
// Get useStandardNodeWidth from block menu plugin shared state
|
|
94
|
-
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
95
|
-
const useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 ? void 0 : (_editorAPI$blockMenu$2 = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu$2 === void 0 ? void 0 : (_editorAPI$blockMenu$3 = _editorAPI$blockMenu$2.currentState()) === null || _editorAPI$blockMenu$3 === void 0 ? void 0 : _editorAPI$blockMenu$3.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
|
|
96
|
-
const {
|
|
97
|
-
editorViewMode,
|
|
98
|
-
primaryToolbarComponentsState,
|
|
99
|
-
maxContentSizeReached
|
|
100
|
-
} = useSharedPluginStateWithSelector(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], states => {
|
|
101
|
-
var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
|
|
102
|
-
return {
|
|
103
|
-
maxContentSizeReached: !!((_states$maxContentSiz = states.maxContentSizeState) !== null && _states$maxContentSiz !== void 0 && _states$maxContentSiz.maxContentSizeReached),
|
|
104
|
-
primaryToolbarComponentsState: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
|
|
105
|
-
editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
|
|
106
|
-
};
|
|
107
|
-
});
|
|
108
|
-
const primaryToolbarState = getPrimaryToolbarComponents(editorAPI, primaryToolbarComponentsState);
|
|
109
|
-
const {
|
|
110
|
-
mediaState
|
|
111
|
-
} = useSharedPluginState(editorAPI, ['media']);
|
|
112
|
-
const intl = useIntl();
|
|
113
|
-
const {
|
|
114
|
-
editorDOMElement,
|
|
115
|
-
editorView,
|
|
116
|
-
editorActions,
|
|
117
|
-
eventDispatcher,
|
|
118
|
-
providerFactory,
|
|
119
|
-
contentComponents,
|
|
120
|
-
customContentComponents,
|
|
121
|
-
customPrimaryToolbarComponents,
|
|
122
|
-
primaryToolbarComponents: primaryToolbarComponentsProp,
|
|
123
|
-
customSecondaryToolbarComponents,
|
|
124
|
-
popupsMountPoint,
|
|
125
|
-
popupsBoundariesElement,
|
|
126
|
-
popupsScrollableElement,
|
|
127
|
-
maxHeight,
|
|
128
|
-
minHeight = 150,
|
|
129
|
-
onSave,
|
|
130
|
-
onCancel,
|
|
131
|
-
disabled,
|
|
132
|
-
dispatchAnalyticsEvent,
|
|
133
|
-
useStickyToolbar,
|
|
134
|
-
pluginHooks,
|
|
135
|
-
featureFlags,
|
|
136
|
-
innerRef,
|
|
137
|
-
isEditorModernisationEnabled
|
|
138
|
-
} = props;
|
|
139
|
-
const showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
|
|
140
|
-
const containerElement = React.useRef(null);
|
|
141
|
-
|
|
142
|
-
// Wrapper container for toolbar and content area
|
|
143
|
-
const wrapperElementRef = useMemo(() => innerRef || /*#__PURE__*/React.createRef(), [innerRef]);
|
|
144
|
-
const [saveButtonDisabled, setSaveButtonDisabled] = useState(false);
|
|
145
|
-
useEffect(() => {
|
|
146
|
-
if (mediaState) {
|
|
147
|
-
mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
|
|
148
|
-
}
|
|
149
|
-
return () => mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
|
|
150
|
-
}, [mediaState]);
|
|
151
|
-
const handleSave = useCallback(() => {
|
|
152
|
-
if (editorView && onSave) {
|
|
153
|
-
onSave(editorView);
|
|
154
|
-
}
|
|
155
|
-
}, [editorView, onSave]);
|
|
156
|
-
const handleCancel = useCallback(() => {
|
|
157
|
-
if (editorView && onCancel) {
|
|
158
|
-
onCancel(editorView);
|
|
159
|
-
}
|
|
160
|
-
}, [editorView, onCancel]);
|
|
161
|
-
const isShortcutToFocusToolbar = useCallback(event => {
|
|
162
|
-
//Alt + F9 to reach first element in this main toolbar
|
|
163
|
-
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
164
|
-
}, []);
|
|
165
|
-
|
|
166
|
-
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
167
|
-
const isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents;
|
|
168
|
-
const handleEscape = useCallback(event => {
|
|
169
|
-
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
170
|
-
editorView === null || editorView === void 0 ? void 0 : editorView.focus();
|
|
171
|
-
}
|
|
172
|
-
event.preventDefault();
|
|
173
|
-
event.stopPropagation();
|
|
174
|
-
}, [editorView]);
|
|
175
|
-
let primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
176
|
-
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
177
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
178
|
-
}
|
|
179
|
-
const isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
|
|
180
|
-
const memoizedContentAreaStyles = useMemo(() => [maxHeight ?
|
|
181
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
182
|
-
css({
|
|
183
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
184
|
-
maxHeight: `${maxHeight}px`,
|
|
185
|
-
// When maxHeight is set, content area should have overflow-y explicitly set as auto
|
|
186
|
-
// As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
|
|
187
|
-
// This will cause the content area to have content overflowing the container
|
|
188
|
-
// so need to set overflow-y as auto to make sure the content area is scrollable
|
|
189
|
-
overflowY: 'auto'
|
|
190
|
-
}) : null], [maxHeight]);
|
|
191
|
-
const contentAreaStyles = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedContentAreaStyles : [maxHeight ?
|
|
192
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
193
|
-
css({
|
|
194
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
195
|
-
maxHeight: `${maxHeight}px`,
|
|
196
|
-
// When maxHeight is set, content area should have overflow-y explicitly set as auto
|
|
197
|
-
// As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
|
|
198
|
-
// This will cause the content area to have content overflowing the container
|
|
199
|
-
// so need to set overflow-y as auto to make sure the content area is scrollable
|
|
200
|
-
overflowY: 'auto'
|
|
201
|
-
}) : null];
|
|
202
|
-
const customToolbarSlot = jsx("div", {
|
|
203
|
-
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
|
|
204
|
-
}, customPrimaryToolbarComponents);
|
|
205
|
-
return jsx(WithFlash, {
|
|
206
|
-
animate: maxContentSizeReached
|
|
207
|
-
}, jsx(WidthProvider, null, jsx("div", {
|
|
208
|
-
css: [commentEditorStyles, isEditorModernisationEnabled && modernisedEditorStyles,
|
|
209
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
210
|
-
css({
|
|
211
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
212
|
-
minHeight: `${minHeight}px`
|
|
213
|
-
})]
|
|
214
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
215
|
-
,
|
|
216
|
-
className: "akEditor",
|
|
217
|
-
ref: wrapperElementRef
|
|
218
|
-
}, jsx(MainToolbar, {
|
|
219
|
-
isEditorModernisationEnabled: isEditorModernisationEnabled,
|
|
220
|
-
useStickyToolbar: useStickyToolbar,
|
|
221
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled,
|
|
222
|
-
isNewToolbarEnabled: isToolbarAIFCEnabled
|
|
223
|
-
}, isToolbarAIFCEnabled ? jsx(ToolbarArrowKeyNavigationProvider, {
|
|
224
|
-
editorView: editorView,
|
|
225
|
-
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
226
|
-
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
227
|
-
handleEscape: handleEscape,
|
|
228
|
-
editorAppearance: appearance,
|
|
229
|
-
useStickyToolbar: useStickyToolbar,
|
|
230
|
-
intl: intl
|
|
231
|
-
}, jsx(CommentToolbar, {
|
|
232
|
-
editorAPI: editorAPI,
|
|
233
|
-
editorView: editorView,
|
|
234
|
-
editorAppearance: appearance,
|
|
235
|
-
disabled: !!disabled,
|
|
236
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
237
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
238
|
-
popupsMountPoint: popupsMountPoint
|
|
239
|
-
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : jsx(ToolbarArrowKeyNavigationProvider, {
|
|
240
|
-
editorView: editorView,
|
|
241
|
-
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
242
|
-
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
243
|
-
handleEscape: handleEscape,
|
|
244
|
-
editorAppearance: appearance,
|
|
245
|
-
useStickyToolbar: useStickyToolbar,
|
|
246
|
-
intl: intl
|
|
247
|
-
}, jsx(Toolbar
|
|
248
|
-
// Ignored via go/ees005
|
|
249
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
250
|
-
, {
|
|
251
|
-
editorView: editorView,
|
|
252
|
-
editorActions: editorActions
|
|
253
|
-
// Ignored via go/ees005
|
|
254
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
255
|
-
,
|
|
256
|
-
eventDispatcher: eventDispatcher
|
|
257
|
-
// Ignored via go/ees005
|
|
258
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
259
|
-
,
|
|
260
|
-
providerFactory: providerFactory,
|
|
261
|
-
appearance: appearance,
|
|
262
|
-
items: primaryToolbarComponents,
|
|
263
|
-
popupsMountPoint: popupsMountPoint,
|
|
264
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
265
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
266
|
-
disabled: !!disabled,
|
|
267
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
268
|
-
containerElement: containerElement.current,
|
|
269
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
270
|
-
}), customToolbarSlot)), jsx(ClickAreaBlock, {
|
|
271
|
-
editorView: editorView,
|
|
272
|
-
editorDisabled: disabled
|
|
273
|
-
}, jsx(WidthConsumer, null, ({
|
|
274
|
-
width
|
|
275
|
-
}) => {
|
|
276
|
-
return jsx(EditorContentContainer, {
|
|
277
|
-
ref: containerElement,
|
|
278
|
-
css: contentAreaStyles,
|
|
279
|
-
isScrollable: maxHeight ? true : undefined
|
|
280
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
281
|
-
,
|
|
282
|
-
className: classnames('ak-editor-content-area', {
|
|
283
|
-
'less-margin': width < akEditorMobileBreakoutPoint
|
|
284
|
-
}),
|
|
285
|
-
featureFlags: featureFlags,
|
|
286
|
-
viewMode: editorViewMode,
|
|
287
|
-
appearance: appearance,
|
|
288
|
-
useStandardNodeWidth: useStandardNodeWidth
|
|
289
|
-
}, customContentComponents && 'before' in customContentComponents ? contentComponentClickWrapper(customContentComponents.before) : contentComponentClickWrapper(customContentComponents), jsx(PluginSlot, {
|
|
290
|
-
editorView: editorView,
|
|
291
|
-
editorActions: editorActions,
|
|
292
|
-
eventDispatcher: eventDispatcher,
|
|
293
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
294
|
-
providerFactory: providerFactory,
|
|
295
|
-
appearance: appearance,
|
|
296
|
-
items: contentComponents,
|
|
297
|
-
popupsMountPoint: popupsMountPoint,
|
|
298
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
299
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
300
|
-
containerElement: containerElement.current,
|
|
301
|
-
disabled: !!disabled,
|
|
302
|
-
wrapperElement: wrapperElementRef.current,
|
|
303
|
-
pluginHooks: pluginHooks
|
|
304
|
-
}), editorDOMElement, customContentComponents && 'after' in customContentComponents ? contentComponentClickWrapper(customContentComponents.after) : null);
|
|
305
|
-
}))), showSecondaryToolbar && jsx("div", {
|
|
306
|
-
css: secondaryToolbarStyles,
|
|
307
|
-
"data-testid": "ak-editor-secondary-toolbar"
|
|
308
|
-
}, jsx(ButtonGroup, null, !!onSave && jsx(Button, {
|
|
309
|
-
appearance: "primary",
|
|
310
|
-
onClick: handleSave,
|
|
311
|
-
testId: "comment-save-button",
|
|
312
|
-
isDisabled: disabled || saveButtonDisabled,
|
|
313
|
-
interactionName: "editor-comment-save-button"
|
|
314
|
-
}, intl.formatMessage(messages.saveButton)), !!onCancel && jsx(Button, {
|
|
315
|
-
appearance: "subtle",
|
|
316
|
-
onClick: handleCancel,
|
|
317
|
-
testId: "comment-cancel-button",
|
|
318
|
-
isDisabled: disabled,
|
|
319
|
-
interactionName: "editor-comment-cancel-button"
|
|
320
|
-
}, intl.formatMessage(messages.cancelButton))), jsx("span", {
|
|
321
|
-
style: {
|
|
322
|
-
flexGrow: 1
|
|
323
|
-
}
|
|
324
|
-
}), customSecondaryToolbarComponents)));
|
|
325
|
-
};
|
|
326
|
-
CommentEditorWithIntlEmotion.displayName = 'CommentEditorAppearance';
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
-
* Used via `componentWithCondition` in `Toolbar.tsx`.
|
|
8
|
-
*
|
|
9
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
13
|
-
import { css, jsx } from '@emotion/react';
|
|
14
|
-
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
15
|
-
const mainToolbarWrapperStyleNew = css({
|
|
16
|
-
position: 'relative',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"} 0`,
|
|
19
|
-
display: 'flex',
|
|
20
|
-
height: 'auto',
|
|
21
|
-
backgroundColor: "var(--ds-surface, #FFFFFF)",
|
|
22
|
-
boxShadow: 'none',
|
|
23
|
-
paddingLeft: "var(--ds-space-250, 20px)",
|
|
24
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
25
|
-
'> div': {
|
|
26
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
27
|
-
'> div:first-of-type:not(style), > style:first-of-type + *': {
|
|
28
|
-
marginLeft: 0
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
32
|
-
'.block-type-btn': {
|
|
33
|
-
paddingLeft: 0
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
/** keep default padding for entire toolbar */
|
|
38
|
-
const mainToolbarWithoutLeftPadding = css({
|
|
39
|
-
padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"} 0`
|
|
40
|
-
});
|
|
41
|
-
const mainToolbarTwoLineStylesNew = css({
|
|
42
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
43
|
-
'& > div': {
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
45
|
-
[`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
|
|
46
|
-
flexDirection: 'column-reverse',
|
|
47
|
-
alignItems: 'end',
|
|
48
|
-
display: 'flex',
|
|
49
|
-
justifyContent: 'flex-end'
|
|
50
|
-
},
|
|
51
|
-
/* make this more explicit for a toolbar */
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
53
|
-
'> div:first-of-type': {
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
55
|
-
[`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
57
|
-
'> div:nth-of-type(2)': {
|
|
58
|
-
justifyContent: 'flex-end',
|
|
59
|
-
display: 'flex'
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
const mainToolbarWrapperStylesVisualRefresh = css({
|
|
66
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
67
|
-
'span svg': {
|
|
68
|
-
maxWidth: '100%'
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
const mainToolbarRadius = css({
|
|
72
|
-
borderRadius: `${"var(--ds-radius-medium, 6px)"} ${"var(--ds-radius-medium, 6px)"} 0 0`
|
|
73
|
-
});
|
|
74
|
-
const editorModernisationToolbarStyle = css({
|
|
75
|
-
borderRadius: `${"var(--ds-radius-xlarge, 12px)"} ${"var(--ds-radius-xlarge, 12px)"} 0 0`,
|
|
76
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
|
-
'&.show-keyline': {
|
|
78
|
-
boxShadow: "var(--ds-shadow-overflow, 0px 0px 8px #1E1F2128, 0px 0px 1px #1E1F211e)"
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
export const FixedToolbarEmotion = props =>
|
|
82
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
83
|
-
jsx("div", {
|
|
84
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding, mainToolbarRadius, props.isEditorModernisationEnabled && editorModernisationToolbarStyle],
|
|
85
|
-
"data-testid": "ak-editor-main-toolbar"
|
|
86
|
-
}, props.children);
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
-
* Used via `componentWithCondition` in `Toolbar.tsx`.
|
|
8
|
-
*
|
|
9
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { useEffect, useState } from 'react';
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
15
|
-
import { css, jsx } from '@emotion/react';
|
|
16
|
-
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
17
|
-
const akEditorMenuZIndex = 500;
|
|
18
|
-
const akEditorToolbarKeylineHeight = 2;
|
|
19
|
-
const mainToolbarWrapperStyleNew = css({
|
|
20
|
-
position: 'relative',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"} 0`,
|
|
23
|
-
display: 'flex',
|
|
24
|
-
height: 'auto',
|
|
25
|
-
backgroundColor: "var(--ds-surface, #FFFFFF)",
|
|
26
|
-
boxShadow: 'none',
|
|
27
|
-
paddingLeft: "var(--ds-space-250, 20px)",
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
29
|
-
'> div': {
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
31
|
-
'> div:first-of-type:not(style), > style:first-of-type + *': {
|
|
32
|
-
marginLeft: 0
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
36
|
-
'.block-type-btn': {
|
|
37
|
-
paddingLeft: 0
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const mainToolbarWithPadding = css({
|
|
41
|
-
padding: `${"var(--ds-space-100, 8px)"}`
|
|
42
|
-
});
|
|
43
|
-
const mainToolbarTwoLineStylesNew = css({
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
45
|
-
'& > div': {
|
|
46
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
47
|
-
[`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
|
|
48
|
-
flexDirection: 'column-reverse',
|
|
49
|
-
alignItems: 'end',
|
|
50
|
-
display: 'flex',
|
|
51
|
-
justifyContent: 'flex-end'
|
|
52
|
-
},
|
|
53
|
-
/* make this more explicit for a toolbar */
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
55
|
-
'> div:first-of-type': {
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
57
|
-
[`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
59
|
-
'> div:nth-of-type(2)': {
|
|
60
|
-
justifyContent: 'flex-end',
|
|
61
|
-
display: 'flex'
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
const mainToolbarWrapperStylesVisualRefresh = css({
|
|
68
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
69
|
-
'span svg': {
|
|
70
|
-
maxWidth: '100%'
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
const mainToolbarRadius = css({
|
|
74
|
-
borderRadius: `${"var(--ds-radius-medium, 6px)"} ${"var(--ds-radius-medium, 6px)"} 0 0`
|
|
75
|
-
});
|
|
76
|
-
const editorModernisationToolbarStyle = css({
|
|
77
|
-
borderRadius: `${"var(--ds-radius-xlarge, 12px)"} ${"var(--ds-radius-xlarge, 12px)"} 0 0`,
|
|
78
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
79
|
-
'&.show-keyline': {
|
|
80
|
-
boxShadow: "var(--ds-shadow-overflow, 0px 0px 8px #1E1F2128, 0px 0px 1px #1E1F211e)"
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
const stickyToolbarWrapperStyleNew = css({
|
|
84
|
-
position: 'sticky',
|
|
85
|
-
paddingBottom: "var(--ds-space-100, 8px)",
|
|
86
|
-
zIndex: akEditorMenuZIndex,
|
|
87
|
-
transition: 'box-shadow ease-in-out 0.2s',
|
|
88
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
89
|
-
'&.show-keyline': {
|
|
90
|
-
boxShadow: `0 ${akEditorToolbarKeylineHeight}px 0 0 ${"var(--ds-background-accent-gray-subtlest, #F0F1F2)"}`
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
export const StickyToolbarEmotion = props => {
|
|
94
|
-
const [top, setTop] = useState(0);
|
|
95
|
-
|
|
96
|
-
// ED-15802: if externalToolbarRef is passed in, set top to externalToolbarRef?.current?.clientHeight
|
|
97
|
-
// else if offsetTop is a number set top to offsetTop
|
|
98
|
-
// otherwise top is 0 as initial state
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
var _props$externalToolba, _props$externalToolba2;
|
|
101
|
-
if ((_props$externalToolba = props.externalToolbarRef) !== null && _props$externalToolba !== void 0 && (_props$externalToolba2 = _props$externalToolba.current) !== null && _props$externalToolba2 !== void 0 && _props$externalToolba2.clientHeight) {
|
|
102
|
-
setTop(props.externalToolbarRef.current.clientHeight);
|
|
103
|
-
} else {
|
|
104
|
-
setTop(props.offsetTop || 0);
|
|
105
|
-
}
|
|
106
|
-
}, [props.externalToolbarRef, props.offsetTop]);
|
|
107
|
-
const wrapperStyle = {
|
|
108
|
-
top: `${top}px`
|
|
109
|
-
};
|
|
110
|
-
return (
|
|
111
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
112
|
-
jsx("div", {
|
|
113
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithPadding, mainToolbarRadius, props.isEditorModernisationEnabled && editorModernisationToolbarStyle]
|
|
114
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/enforce-style-prop -- top is computed dynamically from externalToolbarRef height / offsetTop and cannot be a static css value
|
|
115
|
-
,
|
|
116
|
-
style: wrapperStyle,
|
|
117
|
-
"data-testid": "ak-editor-main-toolbar"
|
|
118
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
119
|
-
,
|
|
120
|
-
className: 'show-keyline'
|
|
121
|
-
}, props.children)
|
|
122
|
-
);
|
|
123
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* BeforeWrapper-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
/**
|
|
3
|
-
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
4
|
-
* Used via `componentWithCondition` in `BeforeWrapper.tsx`.
|
|
5
|
-
*
|
|
6
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
-
*/
|
|
8
|
-
import "./BeforeWrapper-compiled.compiled.css";
|
|
9
|
-
import * as React from 'react';
|
|
10
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
11
|
-
const styles = {
|
|
12
|
-
beforePrimaryToolbarPluginWrapper: "_1e0c1txw _16jlkb7n _1bahesu3 _4cvr1h6o"
|
|
13
|
-
};
|
|
14
|
-
// Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
|
|
15
|
-
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
16
|
-
export const BeforePrimaryToolbarWrapperCompiled = props => /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
18
|
-
className: ax([styles.beforePrimaryToolbarPluginWrapper])
|
|
19
|
-
}, props.beforePrimaryToolbarComponents);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
-
* Used via `componentWithCondition` in `BeforeWrapper.tsx`.
|
|
8
|
-
*
|
|
9
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback; jsx required at runtime for @jsxRuntime classic
|
|
13
|
-
import { css, jsx } from '@emotion/react';
|
|
14
|
-
const beforePrimaryToolbarPluginWrapperStyles = css({
|
|
15
|
-
display: 'flex',
|
|
16
|
-
flexGrow: 1,
|
|
17
|
-
justifyContent: 'flex-end',
|
|
18
|
-
alignItems: 'center'
|
|
19
|
-
});
|
|
20
|
-
// Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
|
|
21
|
-
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
22
|
-
export const BeforePrimaryToolbarWrapperEmotion = props => jsx("div", {
|
|
23
|
-
css: beforePrimaryToolbarPluginWrapperStyles,
|
|
24
|
-
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
25
|
-
}, props.beforePrimaryToolbarComponents);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* CustomToolbarWrapper-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
/**
|
|
3
|
-
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
4
|
-
* Used via `componentWithCondition` in `CustomToolbarWrapper.tsx`.
|
|
5
|
-
*
|
|
6
|
-
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
-
*/
|
|
8
|
-
import "./CustomToolbarWrapper-compiled.compiled.css";
|
|
9
|
-
import * as React from 'react';
|
|
10
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
11
|
-
const firstChildStyles = {
|
|
12
|
-
base: "_1e0c1txw _16jlkb7n",
|
|
13
|
-
twoLine: "_u89dkb7n _9gudkb7n _1hoh1osq _8o3817qo _lhl4esu3 _1s2p1ns9"
|
|
14
|
-
};
|
|
15
|
-
const secondChildStyles = {
|
|
16
|
-
base: "_1ul91ns9",
|
|
17
|
-
twoLine: "_u89dkb7n _9gudkb7n _1hoh1osq _1tjb1wug _1rg31wug _1jzq1wug _cn5x1wug _87t41txw _8o3817qo _1s2pidpf"
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// ---------------- First child wrapper ----------------
|
|
21
|
-
export const MainToolbarForFirstChildWrapperCompiled = ({
|
|
22
|
-
twoLineEditorToolbar,
|
|
23
|
-
children,
|
|
24
|
-
role,
|
|
25
|
-
'aria-label': ariaLabel,
|
|
26
|
-
'data-testid': testId
|
|
27
|
-
}) => /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
role: role,
|
|
29
|
-
"aria-label": ariaLabel,
|
|
30
|
-
"data-testid": testId,
|
|
31
|
-
className: ax([firstChildStyles.base, twoLineEditorToolbar && firstChildStyles.twoLine])
|
|
32
|
-
}, children);
|
|
33
|
-
|
|
34
|
-
// ---------------- Second child wrapper ----------------
|
|
35
|
-
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
36
|
-
export const MainToolbarForSecondChildWrapperCompiled = ({
|
|
37
|
-
twoLineEditorToolbar,
|
|
38
|
-
children,
|
|
39
|
-
role,
|
|
40
|
-
'aria-label': ariaLabel,
|
|
41
|
-
'data-testid': testId
|
|
42
|
-
}) => /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
role: role,
|
|
44
|
-
"aria-label": ariaLabel,
|
|
45
|
-
"data-testid": testId,
|
|
46
|
-
className: ax([secondChildStyles.base, twoLineEditorToolbar && secondChildStyles.twoLine])
|
|
47
|
-
}, children);
|