@atlaskit/editor-core 219.9.14 → 219.9.15
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 +8 -0
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.js +29 -0
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-emotion.js +34 -0
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +7 -20
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +56 -0
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +88 -0
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper.js +10 -73
- package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.js +32 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage-emotion.js +38 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +19 -20
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-compiled.js +45 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-emotion.js +58 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +21 -26
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.js +19 -0
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-emotion.js +25 -0
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +5 -17
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +46 -0
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +78 -0
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper.js +6 -69
- package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.js +23 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage-emotion.js +29 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +17 -19
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-compiled.js +34 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-emotion.js +48 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +16 -27
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.js +21 -0
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-emotion.js +27 -0
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +7 -19
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +48 -0
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +80 -0
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper.js +10 -71
- package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
- package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.js +24 -0
- package/dist/esm/ui/Appearance/FullPage/FullPage-emotion.js +31 -0
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +19 -19
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-compiled.js +37 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-emotion.js +50 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +22 -27
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +16 -0
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +16 -0
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +3 -8
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +3 -0
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +14 -0
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +4 -10
- package/dist/types/ui/Appearance/FullPage/FullPage-compiled.d.ts +7 -0
- package/dist/types/ui/Appearance/FullPage/FullPage-emotion.d.ts +7 -0
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar-compiled.d.ts +20 -0
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar-emotion.d.ts +20 -0
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -6
- package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +16 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +16 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper.d.ts +3 -8
- package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +3 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +14 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +4 -10
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage-compiled.d.ts +7 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage-emotion.d.ts +7 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +2 -2
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar-compiled.d.ts +20 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar-emotion.d.ts +20 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -6
- package/package.json +2 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* FullPageToolbar-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
/**
|
|
3
|
+
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
4
|
+
* Used via `componentWithCondition` in `FullPageToolbar.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
+
*/
|
|
8
|
+
import "./FullPageToolbar-compiled.compiled.css";
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
11
|
+
const nonCustomToolbarCompiledStyles = {
|
|
12
|
+
root: "_4cvr1h6o _1e0c1txw _16jlkb7n"
|
|
13
|
+
};
|
|
14
|
+
const mainToolbarIconBeforeCompiledStyles = {
|
|
15
|
+
root: "_19pkpxbi _2hwxpxbi _otyrpxbi _18u0pxbi _4t3ixy5q _1bsbxy5q _mlgzkb7n _tuuhkb7n"
|
|
16
|
+
};
|
|
17
|
+
const customToolbarCompiledStyles = {
|
|
18
|
+
root: "_4cvr1h6o _1e0c1txw"
|
|
19
|
+
};
|
|
20
|
+
export const NonCustomToolbarWrapperCompiled = ({
|
|
21
|
+
children
|
|
22
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: ax([nonCustomToolbarCompiledStyles.root])
|
|
24
|
+
}, children);
|
|
25
|
+
export const MainToolbarIconBeforeCompiled = ({
|
|
26
|
+
children
|
|
27
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: ax([mainToolbarIconBeforeCompiledStyles.root])
|
|
29
|
+
}, children);
|
|
30
|
+
export const CustomToolbarWrapperCompiled = ({
|
|
31
|
+
children
|
|
32
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: ax([customToolbarCompiledStyles.root])
|
|
34
|
+
}, children);
|
|
@@ -0,0 +1,48 @@
|
|
|
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 `FullPageToolbar.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
|
+
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
15
|
+
const nonCustomToolbarWrapperStyle = css({
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
flexGrow: 1
|
|
19
|
+
});
|
|
20
|
+
const mainToolbarIconBeforeStyle = css({
|
|
21
|
+
margin: "var(--ds-space-200, 16px)",
|
|
22
|
+
height: "var(--ds-space-400, 32px)",
|
|
23
|
+
width: "var(--ds-space-400, 32px)",
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
25
|
+
[`@media (max-width: ${akEditorMobileMaxWidth}px)`]: {
|
|
26
|
+
gridColumn: 1,
|
|
27
|
+
gridRow: 1
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const customToolbarWrapperStyle = css({
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
display: 'flex'
|
|
33
|
+
});
|
|
34
|
+
export const NonCustomToolbarWrapperEmotion = ({
|
|
35
|
+
children
|
|
36
|
+
}) => jsx("div", {
|
|
37
|
+
css: nonCustomToolbarWrapperStyle
|
|
38
|
+
}, children);
|
|
39
|
+
export const MainToolbarIconBeforeEmotion = ({
|
|
40
|
+
children
|
|
41
|
+
}) => jsx("div", {
|
|
42
|
+
css: mainToolbarIconBeforeStyle
|
|
43
|
+
}, children);
|
|
44
|
+
export const CustomToolbarWrapperEmotion = ({
|
|
45
|
+
children
|
|
46
|
+
}) => jsx("div", {
|
|
47
|
+
css: customToolbarWrapperStyle
|
|
48
|
+
}, children);
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
1
|
import React, { useEffect, useCallback, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
// 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
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
10
2
|
import { injectIntl } from 'react-intl';
|
|
11
3
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
|
|
12
4
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
13
5
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
6
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
9
|
import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
16
10
|
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
17
11
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
18
12
|
import { MainToolbarForFirstChildWrapper, MainToolbarForSecondChildWrapper } from './CustomToolbarWrapper';
|
|
19
|
-
import {
|
|
13
|
+
import { CustomToolbarWrapperCompiled, MainToolbarIconBeforeCompiled, NonCustomToolbarWrapperCompiled } from './FullPageToolbar-compiled';
|
|
14
|
+
import { CustomToolbarWrapperEmotion, MainToolbarIconBeforeEmotion, NonCustomToolbarWrapperEmotion } from './FullPageToolbar-emotion';
|
|
15
|
+
import { MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
|
|
20
16
|
import { MainToolbarWrapper } from './MainToolbarWrapper';
|
|
17
|
+
const NonCustomToolbarWrapperMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), NonCustomToolbarWrapperCompiled, NonCustomToolbarWrapperEmotion);
|
|
18
|
+
const MainToolbarIconBeforeMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), MainToolbarIconBeforeCompiled, MainToolbarIconBeforeEmotion);
|
|
19
|
+
const CustomToolbarWrapperMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), CustomToolbarWrapperCompiled, CustomToolbarWrapperEmotion);
|
|
21
20
|
export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
22
21
|
var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
|
|
23
22
|
const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
|
|
@@ -37,13 +36,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
37
36
|
};
|
|
38
37
|
const hasToolbarPortal = ToolbarPortal !== React.Fragment;
|
|
39
38
|
const popupsMountPoint = hasToolbarPortal ? undefined : props.popupsMountPoint;
|
|
40
|
-
const nonCustomToolbar =
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
42
|
-
jsx("div", {
|
|
43
|
-
css: nonCustomToolbarWrapperStyle
|
|
44
|
-
}, props.beforeIcon && jsx("div", {
|
|
45
|
-
css: mainToolbarIconBeforeStyle
|
|
46
|
-
}, props.beforeIcon), jsx(Toolbar, {
|
|
39
|
+
const nonCustomToolbar = /*#__PURE__*/React.createElement(NonCustomToolbarWrapperMigration, null, props.beforeIcon && /*#__PURE__*/React.createElement(MainToolbarIconBeforeMigration, null, props.beforeIcon), /*#__PURE__*/React.createElement(Toolbar, {
|
|
47
40
|
editorView: props.editorView,
|
|
48
41
|
editorActions: props.editorActions,
|
|
49
42
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -59,11 +52,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
59
52
|
hasMinWidth: props.hasMinWidth,
|
|
60
53
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
61
54
|
}));
|
|
62
|
-
const customToolbar =
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
64
|
-
jsx("div", {
|
|
65
|
-
css: customToolbarWrapperStyle
|
|
66
|
-
}, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
|
|
55
|
+
const customToolbar = /*#__PURE__*/React.createElement(CustomToolbarWrapperMigration, null, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
|
|
67
56
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
68
57
|
}) : null, !editorExperiment('platform_editor_controls', 'variant1') && editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.registerToolbarButton({
|
|
69
58
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
@@ -100,28 +89,28 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
100
89
|
event.preventDefault();
|
|
101
90
|
event.stopPropagation();
|
|
102
91
|
}, [props.editorView]);
|
|
103
|
-
return
|
|
92
|
+
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
|
|
104
93
|
width: contextPanelWidth
|
|
105
|
-
}) =>
|
|
94
|
+
}) => /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
106
95
|
editorView: props.editorView,
|
|
107
96
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
108
97
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
109
98
|
handleEscape: handleEscape,
|
|
110
99
|
intl: props.intl
|
|
111
|
-
},
|
|
100
|
+
}, /*#__PURE__*/React.createElement(ToolbarPortal, null, /*#__PURE__*/React.createElement(MainToolbarWrapper, {
|
|
112
101
|
showKeyline: props.showKeyline || contextPanelWidth > 0,
|
|
113
102
|
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
114
103
|
"data-testid": "ak-editor-main-toolbar"
|
|
115
|
-
},
|
|
104
|
+
}, /*#__PURE__*/React.createElement(MainToolbarForFirstChildWrapper, {
|
|
116
105
|
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
117
106
|
role: "toolbar",
|
|
118
107
|
"aria-label": props.intl.formatMessage(messages.toolbarLabel)
|
|
119
|
-
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar),
|
|
108
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), /*#__PURE__*/React.createElement(MainToolbarForSecondChildWrapper, {
|
|
120
109
|
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
121
110
|
"data-testid": "avatar-group-outside-plugin",
|
|
122
111
|
role: "region",
|
|
123
112
|
"aria-label": props.intl.formatMessage(messages.pageActionsLabel)
|
|
124
|
-
}, shouldSplitToolbar ? nonCustomToolbar : customToolbar),
|
|
113
|
+
}, shouldSplitToolbar ? nonCustomToolbar : customToolbar), /*#__PURE__*/React.createElement(ToolbarPortalMountPoint, null)))));
|
|
125
114
|
});
|
|
126
115
|
|
|
127
116
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "219.9.
|
|
2
|
+
export const version = "219.9.14";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* BeforeWrapper-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
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
|
+
var 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 var BeforePrimaryToolbarWrapperCompiled = function BeforePrimaryToolbarWrapperCompiled(props) {
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
19
|
+
className: ax([styles.beforePrimaryToolbarPluginWrapper])
|
|
20
|
+
}, props.beforePrimaryToolbarComponents);
|
|
21
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
var 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 var BeforePrimaryToolbarWrapperEmotion = function BeforePrimaryToolbarWrapperEmotion(props) {
|
|
23
|
+
return jsx("div", {
|
|
24
|
+
css: beforePrimaryToolbarPluginWrapperStyles,
|
|
25
|
+
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
26
|
+
}, props.beforePrimaryToolbarComponents);
|
|
27
|
+
};
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// 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
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
8
|
-
var beforePrimaryToolbarPluginWrapperStyles = css({
|
|
9
|
-
display: 'flex',
|
|
10
|
-
flexGrow: 1,
|
|
11
|
-
justifyContent: 'flex-end',
|
|
12
|
-
alignItems: 'center'
|
|
13
|
-
});
|
|
1
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
|
+
import { BeforePrimaryToolbarWrapperCompiled } from './BeforeWrapper-compiled';
|
|
4
|
+
import { BeforePrimaryToolbarWrapperEmotion } from './BeforeWrapper-emotion';
|
|
14
5
|
// Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
|
|
15
6
|
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
16
|
-
export var BeforePrimaryToolbarWrapper = function
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
20
|
-
}, props.beforePrimaryToolbarComponents);
|
|
21
|
-
};
|
|
7
|
+
export var BeforePrimaryToolbarWrapper = componentWithCondition(function () {
|
|
8
|
+
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
9
|
+
}, BeforePrimaryToolbarWrapperCompiled, BeforePrimaryToolbarWrapperEmotion);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
._16jlkb7n{flex-grow:1}
|
|
2
|
+
._1e0c1txw{display:flex}
|
|
3
|
+
._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
|
|
4
|
+
@media (max-width:868px){._u89dkb7n{flex-grow:1}._9gudkb7n{flex-shrink:1}._1hoh1osq{flex-basis:100%}._1tjb1wug{margin-top:auto}._1rg31wug{margin-right:auto}._1jzq1wug{margin-bottom:auto}._cn5x1wug{margin-left:auto}._87t41txw{display:flex}._8o3817qo{height:var(--ak-editor-fullpage-toolbar-height)}._1s2pidpf{min-width:0}._lhl4esu3{justify-content:flex-end}._1s2p1ns9{min-width:-moz-fit-content;min-width:fit-content}}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* CustomToolbarWrapper-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
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
|
+
var firstChildStyles = {
|
|
12
|
+
base: "_1e0c1txw _16jlkb7n",
|
|
13
|
+
twoLine: "_u89dkb7n _9gudkb7n _1hoh1osq _8o3817qo _lhl4esu3 _1s2p1ns9"
|
|
14
|
+
};
|
|
15
|
+
var secondChildStyles = {
|
|
16
|
+
base: "_1ul91ns9",
|
|
17
|
+
twoLine: "_u89dkb7n _9gudkb7n _1hoh1osq _1tjb1wug _1rg31wug _1jzq1wug _cn5x1wug _87t41txw _8o3817qo _1s2pidpf"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// ---------------- First child wrapper ----------------
|
|
21
|
+
export var MainToolbarForFirstChildWrapperCompiled = function MainToolbarForFirstChildWrapperCompiled(_ref) {
|
|
22
|
+
var twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
23
|
+
children = _ref.children,
|
|
24
|
+
role = _ref.role,
|
|
25
|
+
ariaLabel = _ref['aria-label'],
|
|
26
|
+
testId = _ref['data-testid'];
|
|
27
|
+
return /*#__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
|
+
|
|
35
|
+
// ---------------- Second child wrapper ----------------
|
|
36
|
+
export var MainToolbarForSecondChildWrapperCompiled = function MainToolbarForSecondChildWrapperCompiled(_ref2) {
|
|
37
|
+
var twoLineEditorToolbar = _ref2.twoLineEditorToolbar,
|
|
38
|
+
children = _ref2.children,
|
|
39
|
+
role = _ref2.role,
|
|
40
|
+
ariaLabel = _ref2['aria-label'],
|
|
41
|
+
testId = _ref2['data-testid'];
|
|
42
|
+
return /*#__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);
|
|
48
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
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 `CustomToolbarWrapper.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
|
|
13
|
+
// 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
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
15
|
+
// Pre-computed static styles for first- and second-child wrappers.
|
|
16
|
+
// These contain no runtime logic and are safe for static-emotion mode.
|
|
17
|
+
|
|
18
|
+
var firstChildStaticBase = css({
|
|
19
|
+
display: 'flex',
|
|
20
|
+
flexGrow: 1
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// we can't avoid some kind of function call here, so we need to disable the rule
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
|
+
var firstChildStaticTwoLine = css({
|
|
26
|
+
'@media (max-width: 868px)': {
|
|
27
|
+
flex: '1 1 100%',
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
29
|
+
height: 'var(--ak-editor-fullpage-toolbar-height)',
|
|
30
|
+
justifyContent: 'flex-end',
|
|
31
|
+
minWidth: 'fit-content'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var secondChildStaticBase = css({
|
|
35
|
+
minWidth: 'fit-content'
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// we can't avoid some kind of function call here, so we need to disable the rule
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
40
|
+
var secondChildStaticTwoLine = css({
|
|
41
|
+
'@media (max-width: 868px)': {
|
|
42
|
+
display: 'flex',
|
|
43
|
+
flexGrow: 1,
|
|
44
|
+
flex: '1 1 100%',
|
|
45
|
+
margin: 'auto',
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
47
|
+
height: 'var(--ak-editor-fullpage-toolbar-height)',
|
|
48
|
+
minWidth: 0
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// ---------------- First child wrapper ----------------
|
|
53
|
+
export var MainToolbarForFirstChildWrapperEmotion = function MainToolbarForFirstChildWrapperEmotion(_ref) {
|
|
54
|
+
var twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
55
|
+
children = _ref.children,
|
|
56
|
+
role = _ref.role,
|
|
57
|
+
ariaLabel = _ref['aria-label'],
|
|
58
|
+
testId = _ref['data-testid'];
|
|
59
|
+
return jsx("div", {
|
|
60
|
+
css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
|
|
61
|
+
role: role,
|
|
62
|
+
"aria-label": ariaLabel,
|
|
63
|
+
"data-testid": testId
|
|
64
|
+
}, children);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// ---------------- Second child wrapper ----------------
|
|
68
|
+
export var MainToolbarForSecondChildWrapperEmotion = function MainToolbarForSecondChildWrapperEmotion(_ref2) {
|
|
69
|
+
var twoLineEditorToolbar = _ref2.twoLineEditorToolbar,
|
|
70
|
+
children = _ref2.children,
|
|
71
|
+
role = _ref2.role,
|
|
72
|
+
ariaLabel = _ref2['aria-label'],
|
|
73
|
+
testId = _ref2['data-testid'];
|
|
74
|
+
return jsx("div", {
|
|
75
|
+
css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
|
|
76
|
+
role: role,
|
|
77
|
+
"aria-label": ariaLabel,
|
|
78
|
+
"data-testid": testId
|
|
79
|
+
}, children);
|
|
80
|
+
};
|
|
@@ -1,74 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
// 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
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
// Pre-computed static styles for first- and second-child wrappers.
|
|
10
|
-
// These contain no runtime logic and are safe for static-emotion mode.
|
|
11
|
-
|
|
12
|
-
var firstChildStaticBase = css({
|
|
13
|
-
display: 'flex',
|
|
14
|
-
flexGrow: 1
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
// we can't avoid some kind of function call here, so we need to disable the rule
|
|
18
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
|
-
var firstChildStaticTwoLine = css({
|
|
20
|
-
'@media (max-width: 868px)': {
|
|
21
|
-
flex: '1 1 100%',
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
|
-
height: 'var(--ak-editor-fullpage-toolbar-height)',
|
|
24
|
-
justifyContent: 'flex-end',
|
|
25
|
-
minWidth: 'fit-content'
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
var secondChildStaticBase = css({
|
|
29
|
-
minWidth: 'fit-content'
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// we can't avoid some kind of function call here, so we need to disable the rule
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
34
|
-
var secondChildStaticTwoLine = css({
|
|
35
|
-
'@media (max-width: 868px)': {
|
|
36
|
-
display: 'flex',
|
|
37
|
-
flexGrow: 1,
|
|
38
|
-
flex: '1 1 100%',
|
|
39
|
-
margin: 'auto',
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
41
|
-
height: 'var(--ak-editor-fullpage-toolbar-height)',
|
|
42
|
-
minWidth: 0
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
1
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
|
+
import { MainToolbarForFirstChildWrapperCompiled, MainToolbarForSecondChildWrapperCompiled } from './CustomToolbarWrapper-compiled';
|
|
4
|
+
import { MainToolbarForFirstChildWrapperEmotion, MainToolbarForSecondChildWrapperEmotion } from './CustomToolbarWrapper-emotion';
|
|
46
5
|
// ---------------- First child wrapper ----------------
|
|
47
|
-
export var MainToolbarForFirstChildWrapper = function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
role = _ref.role,
|
|
51
|
-
ariaLabel = _ref['aria-label'],
|
|
52
|
-
testId = _ref['data-testid'];
|
|
53
|
-
return jsx("div", {
|
|
54
|
-
css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
|
|
55
|
-
role: role,
|
|
56
|
-
"aria-label": ariaLabel,
|
|
57
|
-
"data-testid": testId
|
|
58
|
-
}, children);
|
|
59
|
-
};
|
|
6
|
+
export var MainToolbarForFirstChildWrapper = componentWithCondition(function () {
|
|
7
|
+
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
8
|
+
}, MainToolbarForFirstChildWrapperCompiled, MainToolbarForFirstChildWrapperEmotion);
|
|
60
9
|
|
|
61
10
|
// ---------------- Second child wrapper ----------------
|
|
62
|
-
export var MainToolbarForSecondChildWrapper = function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
role = _ref2.role,
|
|
66
|
-
ariaLabel = _ref2['aria-label'],
|
|
67
|
-
testId = _ref2['data-testid'];
|
|
68
|
-
return jsx("div", {
|
|
69
|
-
css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
|
|
70
|
-
role: role,
|
|
71
|
-
"aria-label": ariaLabel,
|
|
72
|
-
"data-testid": testId
|
|
73
|
-
}, children);
|
|
74
|
-
};
|
|
11
|
+
export var MainToolbarForSecondChildWrapper = componentWithCondition(function () {
|
|
12
|
+
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
13
|
+
}, MainToolbarForSecondChildWrapperCompiled, MainToolbarForSecondChildWrapperEmotion);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* FullPage-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
/**
|
|
3
|
+
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
4
|
+
* Used via `componentWithCondition` in `FullPage.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
+
*/
|
|
8
|
+
import "./FullPage-compiled.compiled.css";
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
11
|
+
import { forwardRef } from 'react';
|
|
12
|
+
var styles = {
|
|
13
|
+
root: "_1ul95x59 _4t3i1osq _1e0c1txw _2lx21bp4 _vchhusvi"
|
|
14
|
+
};
|
|
15
|
+
export var FullPageEditorWrapperCompiled = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
className = _ref.className,
|
|
18
|
+
style = _ref.style;
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: ax([styles.root, className]),
|
|
22
|
+
style: style
|
|
23
|
+
}, children);
|
|
24
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
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 `FullPage.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import { forwardRef } from 'react';
|
|
12
|
+
|
|
13
|
+
// 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
|
|
14
|
+
import { jsx } from '@emotion/react';
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- intentional: emotion fallback branch imports from StyledComponents
|
|
17
|
+
import { fullPageEditorWrapper as fullPageEditorWrapperStyles } from './StyledComponents';
|
|
18
|
+
export var FullPageEditorWrapperEmotion = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
className = _ref.className,
|
|
21
|
+
style = _ref.style;
|
|
22
|
+
return (
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-classname-prop -- intentional: emotion fallback branch reuses StyledComponents style
|
|
24
|
+
jsx("div", {
|
|
25
|
+
css: fullPageEditorWrapperStyles,
|
|
26
|
+
ref: ref,
|
|
27
|
+
className: className,
|
|
28
|
+
style: style
|
|
29
|
+
}, children)
|
|
30
|
+
);
|
|
31
|
+
});
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
2
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
// 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
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
10
3
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
11
4
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
12
5
|
import { SSRRenderMeasure } from '@atlaskit/editor-common/performance/ssr-measures';
|
|
@@ -14,14 +7,19 @@ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
14
7
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
15
8
|
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
16
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
17
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
13
|
import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
|
|
14
|
+
import { FullPageEditorWrapperCompiled } from './FullPage-compiled';
|
|
15
|
+
import { FullPageEditorWrapperEmotion } from './FullPage-emotion';
|
|
20
16
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
21
17
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
22
18
|
import { FullPageToolbarNext } from './FullPageToolbarNext';
|
|
23
|
-
import { fullPageEditorWrapper } from './StyledComponents';
|
|
24
19
|
var SSR_TRACE_SEGMENT_NAME = 'reactEditorView/fullPageAppearance';
|
|
20
|
+
var FullPageEditorWrapperMigration = componentWithCondition(function () {
|
|
21
|
+
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
22
|
+
}, FullPageEditorWrapperCompiled, FullPageEditorWrapperEmotion);
|
|
25
23
|
var useShowKeyline = function useShowKeyline(contentAreaRef) {
|
|
26
24
|
var _useState = useState(false),
|
|
27
25
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -144,23 +142,25 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
144
142
|
}
|
|
145
143
|
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
|
|
146
144
|
var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
|
|
147
|
-
return
|
|
145
|
+
return /*#__PURE__*/React.createElement(SSRRenderMeasure, {
|
|
148
146
|
segmentName: SSR_TRACE_SEGMENT_NAME,
|
|
149
147
|
startTimestampRef: firstRenderStartTimestampRef,
|
|
150
148
|
onSSRMeasure: props.onSSRMeasure
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
155
|
-
,
|
|
149
|
+
}, /*#__PURE__*/React.createElement(ContextPanelWidthProvider, null, /*#__PURE__*/React.createElement(FullPageEditorWrapperMigration
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
151
|
+
, {
|
|
156
152
|
className: "akEditor",
|
|
157
|
-
ref: wrapperElementRef
|
|
158
|
-
style
|
|
153
|
+
ref: wrapperElementRef
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
155
|
+
,
|
|
156
|
+
style:
|
|
157
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props
|
|
158
|
+
{
|
|
159
159
|
'--ak-editor-fullpage-toolbar-height':
|
|
160
160
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
161
161
|
FULL_PAGE_EDITOR_TOOLBAR_HEIGHT(isToolbarAIFCEnabled)
|
|
162
162
|
}
|
|
163
|
-
}, !isEditorToolbarHidden && (isToolbarAIFCEnabled ?
|
|
163
|
+
}, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? /*#__PURE__*/React.createElement(FullPageToolbarNext, {
|
|
164
164
|
disabled: !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
|
|
165
165
|
disabledWithoutInteractionLogic: !!props.disabled,
|
|
166
166
|
toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
|
|
@@ -172,7 +172,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
172
172
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
173
173
|
showKeyline: showKeyline,
|
|
174
174
|
customPrimaryToolbarComponents: props.customPrimaryToolbarComponents
|
|
175
|
-
}) :
|
|
175
|
+
}) : /*#__PURE__*/React.createElement(FullPageToolbar, {
|
|
176
176
|
appearance: props.appearance,
|
|
177
177
|
editorAPI: editorAPI,
|
|
178
178
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
@@ -199,7 +199,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
199
199
|
providerFactory: props.providerFactory,
|
|
200
200
|
showKeyline: showKeyline,
|
|
201
201
|
featureFlags: props.featureFlags
|
|
202
|
-
})),
|
|
202
|
+
})), /*#__PURE__*/React.createElement(FullPageContentArea, {
|
|
203
203
|
editorAPI: editorAPI,
|
|
204
204
|
ref: scrollContentContainerRef,
|
|
205
205
|
appearance: props.appearance,
|