@atlaskit/editor-core 219.9.13 → 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 +20 -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 +20 -20
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
- 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/ui/Appearance/FullPage/FullPageToolbarNext.js +6 -3
- package/dist/cjs/ui/Toolbar/Toolbar.js +3 -1
- 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 +18 -19
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
- 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/ui/Appearance/FullPage/FullPageToolbarNext.js +6 -3
- package/dist/es2019/ui/Toolbar/Toolbar.js +3 -1
- 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 +20 -19
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
- 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/ui/Appearance/FullPage/FullPageToolbarNext.js +6 -3
- package/dist/esm/ui/Toolbar/Toolbar.js +3 -1
- 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/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +2 -1
- package/dist/types/ui/Toolbar/Toolbar.d.ts +2 -2
- 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/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +2 -1
- package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +2 -2
- package/package.json +9 -9
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
1
|
import React, { useEffect, useMemo, useRef, useState } 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 { jsx } from '@emotion/react';
|
|
9
2
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
10
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
11
4
|
import { SSRRenderMeasure } from '@atlaskit/editor-common/performance/ssr-measures';
|
|
@@ -13,14 +6,17 @@ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
13
6
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
14
7
|
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
15
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
16
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
12
|
import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
|
|
13
|
+
import { FullPageEditorWrapperCompiled } from './FullPage-compiled';
|
|
14
|
+
import { FullPageEditorWrapperEmotion } from './FullPage-emotion';
|
|
19
15
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
20
16
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
21
17
|
import { FullPageToolbarNext } from './FullPageToolbarNext';
|
|
22
|
-
import { fullPageEditorWrapper } from './StyledComponents';
|
|
23
18
|
const SSR_TRACE_SEGMENT_NAME = 'reactEditorView/fullPageAppearance';
|
|
19
|
+
const FullPageEditorWrapperMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), FullPageEditorWrapperCompiled, FullPageEditorWrapperEmotion);
|
|
24
20
|
const useShowKeyline = contentAreaRef => {
|
|
25
21
|
const [showKeyline, setShowKeyline] = useState(false);
|
|
26
22
|
useEffect(() => {
|
|
@@ -139,24 +135,27 @@ export const FullPageEditor = props => {
|
|
|
139
135
|
}
|
|
140
136
|
const isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
|
|
141
137
|
const popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 ? void 0 : (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
|
|
142
|
-
return
|
|
138
|
+
return /*#__PURE__*/React.createElement(SSRRenderMeasure, {
|
|
143
139
|
segmentName: SSR_TRACE_SEGMENT_NAME,
|
|
144
140
|
startTimestampRef: firstRenderStartTimestampRef,
|
|
145
141
|
onSSRMeasure: props.onSSRMeasure
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
150
|
-
,
|
|
142
|
+
}, /*#__PURE__*/React.createElement(ContextPanelWidthProvider, null, /*#__PURE__*/React.createElement(FullPageEditorWrapperMigration
|
|
143
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
144
|
+
, {
|
|
151
145
|
className: "akEditor",
|
|
152
|
-
ref: wrapperElementRef
|
|
153
|
-
style
|
|
146
|
+
ref: wrapperElementRef
|
|
147
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
148
|
+
,
|
|
149
|
+
style:
|
|
150
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props
|
|
151
|
+
{
|
|
154
152
|
'--ak-editor-fullpage-toolbar-height':
|
|
155
153
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
156
154
|
FULL_PAGE_EDITOR_TOOLBAR_HEIGHT(isToolbarAIFCEnabled)
|
|
157
155
|
}
|
|
158
|
-
}, !isEditorToolbarHidden && (isToolbarAIFCEnabled ?
|
|
156
|
+
}, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? /*#__PURE__*/React.createElement(FullPageToolbarNext, {
|
|
159
157
|
disabled: !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
|
|
158
|
+
disabledWithoutInteractionLogic: !!props.disabled,
|
|
160
159
|
toolbarDockingPosition: (_toolbarDockingPositi = toolbarDockingPosition) !== null && _toolbarDockingPositi !== void 0 ? _toolbarDockingPositi : toolbarDocking,
|
|
161
160
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
162
161
|
editorAPI: editorAPI,
|
|
@@ -166,7 +165,7 @@ export const FullPageEditor = props => {
|
|
|
166
165
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
167
166
|
showKeyline: showKeyline,
|
|
168
167
|
customPrimaryToolbarComponents: props.customPrimaryToolbarComponents
|
|
169
|
-
}) :
|
|
168
|
+
}) : /*#__PURE__*/React.createElement(FullPageToolbar, {
|
|
170
169
|
appearance: props.appearance,
|
|
171
170
|
editorAPI: editorAPI,
|
|
172
171
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
@@ -193,7 +192,7 @@ export const FullPageEditor = props => {
|
|
|
193
192
|
providerFactory: props.providerFactory,
|
|
194
193
|
showKeyline: showKeyline,
|
|
195
194
|
featureFlags: props.featureFlags
|
|
196
|
-
})),
|
|
195
|
+
})), /*#__PURE__*/React.createElement(FullPageContentArea, {
|
|
197
196
|
editorAPI: editorAPI,
|
|
198
197
|
ref: scrollContentContainerRef,
|
|
199
198
|
appearance: props.appearance,
|
|
@@ -52,15 +52,20 @@ const editorContentAreaProsemirrorStyle = css({
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
EDITOR-7249: Scope to the main editor's ProseMirror (direct child) so nested
|
|
58
|
+
editors like the footer page-comment composer aren't hidden in Syntax view.
|
|
59
|
+
*/
|
|
55
60
|
const hideEditorContentAreaProsemirrorStyle = css({
|
|
56
61
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
57
|
-
'& .ProseMirror': {
|
|
62
|
+
'& > .ak-editor-content-area > .ProseMirror': {
|
|
58
63
|
display: 'none'
|
|
59
64
|
}
|
|
60
65
|
});
|
|
61
66
|
const hideEditorContentAreaProsemirrorWithAttributeStyle = css({
|
|
62
67
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
63
|
-
'&[data-markdown-mode-hide-prosemirror="true"] .ProseMirror': {
|
|
68
|
+
'&[data-markdown-mode-hide-prosemirror="true"] > .ak-editor-content-area > .ProseMirror': {
|
|
64
69
|
display: 'none'
|
|
65
70
|
}
|
|
66
71
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
._16jlkb7n{flex-grow:1}
|
|
2
|
+
._18u0pxbi{margin-left:var(--ds-space-200,1pc)}
|
|
3
|
+
._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
|
|
4
|
+
._1bsbxy5q{width:var(--ds-space-400,2pc)}
|
|
5
|
+
._1e0c1txw{display:flex}
|
|
6
|
+
._2hwxpxbi{margin-right:var(--ds-space-200,1pc)}
|
|
7
|
+
._4cvr1h6o{align-items:center}
|
|
8
|
+
._4t3ixy5q{height:var(--ds-space-400,2pc)}
|
|
9
|
+
._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
|
|
10
|
+
@media (max-width:0px){._mlgzkb7n{grid-column:1}._tuuhkb7n{grid-row:1}}
|
|
@@ -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
|
|
@@ -71,7 +71,8 @@ export const FullPageToolbarNext = ({
|
|
|
71
71
|
popupsMountPoint,
|
|
72
72
|
showKeyline,
|
|
73
73
|
customPrimaryToolbarComponents,
|
|
74
|
-
disabled
|
|
74
|
+
disabled,
|
|
75
|
+
disabledWithoutInteractionLogic
|
|
75
76
|
}) => {
|
|
76
77
|
var _editorAPI$toolbar, _editorAPI$toolbar2, _useToolbarPortal;
|
|
77
78
|
const components = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
|
|
@@ -138,7 +139,8 @@ export const FullPageToolbarNext = ({
|
|
|
138
139
|
editorAPI: editorAPI,
|
|
139
140
|
popupsMountPoint: mountPoint,
|
|
140
141
|
editorAppearance: "full-page",
|
|
141
|
-
isDisabled: disabled
|
|
142
|
+
isDisabled: disabled,
|
|
143
|
+
disabledWithoutInteractionLogic: disabledWithoutInteractionLogic
|
|
142
144
|
}) : /*#__PURE__*/React.createElement(ExcludeFromHydration, null, primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && editorView && !isSSR() && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
143
145
|
toolbar: toolbar,
|
|
144
146
|
components: visibleToolbarComponents,
|
|
@@ -146,7 +148,8 @@ export const FullPageToolbarNext = ({
|
|
|
146
148
|
editorAPI: editorAPI,
|
|
147
149
|
popupsMountPoint: mountPoint,
|
|
148
150
|
editorAppearance: "full-page",
|
|
149
|
-
isDisabled: disabled
|
|
151
|
+
isDisabled: disabled,
|
|
152
|
+
disabledWithoutInteractionLogic: disabledWithoutInteractionLogic
|
|
150
153
|
}))), /*#__PURE__*/React.createElement(SecondChildWrapper, null, /*#__PURE__*/React.createElement("div", {
|
|
151
154
|
className: ax([styles.customToolbarWrapperStyle])
|
|
152
155
|
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/React.createElement("div", {
|
|
@@ -62,7 +62,8 @@ export const ToolbarNext = ({
|
|
|
62
62
|
editorAppearance,
|
|
63
63
|
popupsBoundariesElement,
|
|
64
64
|
popupsScrollableElement,
|
|
65
|
-
isDisabled
|
|
65
|
+
isDisabled,
|
|
66
|
+
disabledWithoutInteractionLogic
|
|
66
67
|
}) => {
|
|
67
68
|
const {
|
|
68
69
|
connectivityStateMode,
|
|
@@ -90,6 +91,7 @@ export const ToolbarNext = ({
|
|
|
90
91
|
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
91
92
|
api: editorAPI,
|
|
92
93
|
isDisabled: isDisabled,
|
|
94
|
+
disabledWithoutInteractionLogic: disabledWithoutInteractionLogic,
|
|
93
95
|
popupsMountPoint: popupsMountPoint,
|
|
94
96
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
95
97
|
popupsScrollableElement: popupsScrollableElement,
|
|
@@ -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
|
+
};
|