@atlaskit/editor-core 219.9.14 → 219.9.16
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 +16 -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/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +6 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/styles/layout.js +5 -7
- 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/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +6 -0
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/layout.js +5 -7
- 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/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +6 -0
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/layout.js +5 -7
- 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 +3 -3
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.NonCustomToolbarWrapperEmotion = exports.MainToolbarIconBeforeEmotion = exports.CustomToolbarWrapperEmotion = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
|
+
/**
|
|
12
|
+
* @jsxRuntime classic
|
|
13
|
+
* @jsx jsx
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
17
|
+
* Used via `componentWithCondition` in `FullPageToolbar.tsx`.
|
|
18
|
+
*
|
|
19
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// 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
|
|
23
|
+
|
|
24
|
+
var nonCustomToolbarWrapperStyle = (0, _react.css)({
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
flexGrow: 1
|
|
28
|
+
});
|
|
29
|
+
var mainToolbarIconBeforeStyle = (0, _react.css)((0, _defineProperty2.default)({
|
|
30
|
+
margin: "var(--ds-space-200, 16px)",
|
|
31
|
+
height: "var(--ds-space-400, 32px)",
|
|
32
|
+
width: "var(--ds-space-400, 32px)"
|
|
33
|
+
}, "@media (max-width: ".concat(_editorSharedStyles.akEditorMobileMaxWidth, "px)"), {
|
|
34
|
+
gridColumn: 1,
|
|
35
|
+
gridRow: 1
|
|
36
|
+
}));
|
|
37
|
+
var customToolbarWrapperStyle = (0, _react.css)({
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
display: 'flex'
|
|
40
|
+
});
|
|
41
|
+
var NonCustomToolbarWrapperEmotion = exports.NonCustomToolbarWrapperEmotion = function NonCustomToolbarWrapperEmotion(_ref) {
|
|
42
|
+
var children = _ref.children;
|
|
43
|
+
return (0, _react.jsx)("div", {
|
|
44
|
+
css: nonCustomToolbarWrapperStyle
|
|
45
|
+
}, children);
|
|
46
|
+
};
|
|
47
|
+
var MainToolbarIconBeforeEmotion = exports.MainToolbarIconBeforeEmotion = function MainToolbarIconBeforeEmotion(_ref2) {
|
|
48
|
+
var children = _ref2.children;
|
|
49
|
+
return (0, _react.jsx)("div", {
|
|
50
|
+
css: mainToolbarIconBeforeStyle
|
|
51
|
+
}, children);
|
|
52
|
+
};
|
|
53
|
+
var CustomToolbarWrapperEmotion = exports.CustomToolbarWrapperEmotion = function CustomToolbarWrapperEmotion(_ref3) {
|
|
54
|
+
var children = _ref3.children;
|
|
55
|
+
return (0, _react.jsx)("div", {
|
|
56
|
+
css: customToolbarWrapperStyle
|
|
57
|
+
}, children);
|
|
58
|
+
};
|
|
@@ -8,26 +8,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.FullPageToolbar = exports.EditorToolbar = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
11
|
var _reactIntl = require("react-intl");
|
|
13
12
|
var _contextPanel = require("@atlaskit/editor-common/context-panel");
|
|
14
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
15
14
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
15
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
16
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
18
|
var _ToolbarPortal = require("../../Toolbar/ToolbarPortal");
|
|
18
19
|
var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
|
|
19
20
|
var _BeforeWrapper = require("./BeforeWrapper");
|
|
20
21
|
var _CustomToolbarWrapper = require("./CustomToolbarWrapper");
|
|
22
|
+
var _FullPageToolbarCompiled = require("./FullPageToolbar-compiled");
|
|
23
|
+
var _FullPageToolbarEmotion = require("./FullPageToolbar-emotion");
|
|
21
24
|
var _MainToolbar = require("./MainToolbar");
|
|
22
25
|
var _MainToolbarWrapper = require("./MainToolbarWrapper");
|
|
23
26
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
var NonCustomToolbarWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
28
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
29
|
+
}, _FullPageToolbarCompiled.NonCustomToolbarWrapperCompiled, _FullPageToolbarEmotion.NonCustomToolbarWrapperEmotion);
|
|
30
|
+
var MainToolbarIconBeforeMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
31
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
32
|
+
}, _FullPageToolbarCompiled.MainToolbarIconBeforeCompiled, _FullPageToolbarEmotion.MainToolbarIconBeforeEmotion);
|
|
33
|
+
var CustomToolbarWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
34
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
35
|
+
}, _FullPageToolbarCompiled.CustomToolbarWrapperCompiled, _FullPageToolbarEmotion.CustomToolbarWrapperEmotion);
|
|
31
36
|
var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
32
37
|
var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
|
|
33
38
|
var _useState = (0, _react.useState)(false),
|
|
@@ -47,13 +52,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
47
52
|
ToolbarPortal = _ref.Portal;
|
|
48
53
|
var hasToolbarPortal = ToolbarPortal !== _react.default.Fragment;
|
|
49
54
|
var popupsMountPoint = hasToolbarPortal ? undefined : props.popupsMountPoint;
|
|
50
|
-
var nonCustomToolbar =
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
52
|
-
(0, _react2.jsx)("div", {
|
|
53
|
-
css: _MainToolbar.nonCustomToolbarWrapperStyle
|
|
54
|
-
}, props.beforeIcon && (0, _react2.jsx)("div", {
|
|
55
|
-
css: _MainToolbar.mainToolbarIconBeforeStyle
|
|
56
|
-
}, props.beforeIcon), (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector, {
|
|
55
|
+
var nonCustomToolbar = /*#__PURE__*/_react.default.createElement(NonCustomToolbarWrapperMigration, null, props.beforeIcon && /*#__PURE__*/_react.default.createElement(MainToolbarIconBeforeMigration, null, props.beforeIcon), /*#__PURE__*/_react.default.createElement(_ToolbarWithSizeDetector.ToolbarWithSizeDetector, {
|
|
57
56
|
editorView: props.editorView,
|
|
58
57
|
editorActions: props.editorActions,
|
|
59
58
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -69,11 +68,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
69
68
|
hasMinWidth: props.hasMinWidth,
|
|
70
69
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
71
70
|
}));
|
|
72
|
-
var customToolbar =
|
|
73
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
74
|
-
(0, _react2.jsx)("div", {
|
|
75
|
-
css: _MainToolbar.customToolbarWrapperStyle
|
|
76
|
-
}, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
|
|
71
|
+
var customToolbar = /*#__PURE__*/_react.default.createElement(CustomToolbarWrapperMigration, null, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/_react.default.createElement(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
|
|
77
72
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
78
73
|
}) : null, !(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.registerToolbarButton({
|
|
79
74
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
@@ -112,28 +107,28 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
112
107
|
event.preventDefault();
|
|
113
108
|
event.stopPropagation();
|
|
114
109
|
}, [props.editorView]);
|
|
115
|
-
return
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(_contextPanel.ContextPanelConsumer, null, function (_ref2) {
|
|
116
111
|
var contextPanelWidth = _ref2.width;
|
|
117
|
-
return
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
118
113
|
editorView: props.editorView,
|
|
119
114
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
120
115
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
121
116
|
handleEscape: handleEscape,
|
|
122
117
|
intl: props.intl
|
|
123
|
-
},
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement(ToolbarPortal, null, /*#__PURE__*/_react.default.createElement(_MainToolbarWrapper.MainToolbarWrapper, {
|
|
124
119
|
showKeyline: props.showKeyline || contextPanelWidth > 0,
|
|
125
120
|
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
126
121
|
"data-testid": "ak-editor-main-toolbar"
|
|
127
|
-
},
|
|
122
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomToolbarWrapper.MainToolbarForFirstChildWrapper, {
|
|
128
123
|
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
129
124
|
role: "toolbar",
|
|
130
125
|
"aria-label": props.intl.formatMessage(_messages.fullPageMessages.toolbarLabel)
|
|
131
|
-
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar),
|
|
126
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), /*#__PURE__*/_react.default.createElement(_CustomToolbarWrapper.MainToolbarForSecondChildWrapper, {
|
|
132
127
|
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
133
128
|
"data-testid": "avatar-group-outside-plugin",
|
|
134
129
|
role: "region",
|
|
135
130
|
"aria-label": props.intl.formatMessage(_messages.fullPageMessages.pageActionsLabel)
|
|
136
|
-
}, shouldSplitToolbar ? nonCustomToolbar : customToolbar),
|
|
131
|
+
}, shouldSplitToolbar ? nonCustomToolbar : customToolbar), /*#__PURE__*/_react.default.createElement(_ToolbarPortal.ToolbarPortalMountPoint, null))));
|
|
137
132
|
});
|
|
138
133
|
});
|
|
139
134
|
|
|
@@ -606,6 +606,7 @@
|
|
|
606
606
|
._15pyjp4b .pm-table-wrapper>table>tbody>tr>th{vertical-align:top}
|
|
607
607
|
._15q4m0zr .ProseMirror [layout^=wrap-]+[layout^=wrap-]+div[class^=fabric-editor-align]{clear:both!important}
|
|
608
608
|
._15r21s89 .search-match-block.search-match-block-selected .loader-wrapper>a{box-shadow:0 0 0 4px var(--ds-background-accent-magenta-subtlest-pressed,#fcb6e1),0 0 0 5px var(--ds-background-accent-magenta-bolder-hovered,#943d73)}
|
|
609
|
+
._15sh1bp4 .ProseMirror [data-layout-section] [data-layout-column][data-valign=bottom]>[data-layout-content]{flex-direction:column}
|
|
609
610
|
._15t1i7a9 .pm-table-sticky-wrapper>table>tbody>tr>td{font-weight:var(--ds-font-weight-regular,400)}
|
|
610
611
|
._15uri7a9 .ak-editor-expand__title-input{font-weight:var(--ds-font-weight-regular,400)}
|
|
611
612
|
._15ve1gly .ProseMirror .danger .code-block .line-number-gutter{background-color:var(--ds-background-danger,#ffeceb)}
|
|
@@ -627,6 +628,7 @@
|
|
|
627
628
|
._16am1j28 .ProseMirror [data-layout-section].ak-editor-selected-node:not(.danger) [data-layout-column] ::-moz-selection{background-color:transparent}
|
|
628
629
|
._16atr4us .ak-editor-selected-node:not(.search-match-block)>.editor-mention-primitive.mention-self{box-shadow:0 0 0 1px var(--ds-border-selected,#1868db)}
|
|
629
630
|
._16d4idpf .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child h4:first-child:not(style){margin-top:0}
|
|
631
|
+
._16df1txw .ProseMirror [data-layout-section] [data-layout-column][data-valign=middle]>[data-layout-content]{display:flex}
|
|
630
632
|
._16e11mi1 .fabric-editor-breakout-mark:has([data-prosemirror-node-name=expand])>.pm-breakout-resize-handle-container--left{left:-25px}
|
|
631
633
|
._16fuidpf .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child p style:first-child+*{margin-top:0}
|
|
632
634
|
._16fx73ad .ProseMirror [data-layout-section]{cursor:default}
|
|
@@ -1835,6 +1837,7 @@
|
|
|
1835
1837
|
._1ybf1nka .search-match-block [data-smart-link-container=true]{box-shadow:inset 0 0 0 1px var(--ds-border-accent-magenta,#cd519d),inset 0 0 0 5px var(--ds-background-accent-magenta-subtler,#fdd0ec)}
|
|
1836
1838
|
._1ybwjocv .search-match-text.selected-search-match{background-color:var(--ds-background-accent-magenta-subtlest-pressed,#fcb6e1)!important}
|
|
1837
1839
|
._1yd8i8nm .pm-table-wrapper>table th:not(.danger) .code-block:not(.danger) .line-number-gutter{background-color:var(--ds-background-neutral,#0515240f)}
|
|
1840
|
+
._1ydd1bp4 .ProseMirror [data-layout-section] [data-layout-column][data-valign=middle]>[data-layout-content]{flex-direction:column}
|
|
1838
1841
|
._1ydjglyw .ProseMirror .ak-editor-panel .ak-editor-panel__icon{-webkit-user-select:none}
|
|
1839
1842
|
._1ydu1up9 .search-match-block .loader-wrapper>a{box-shadow:0 0 0 4px var(--ds-background-accent-magenta-subtler,#fdd0ec),0 0 0 5px var(--ds-border-accent-magenta,#cd519d)}
|
|
1840
1843
|
._1yg7azsu .ak-editor-selected-node>.editor-mention-primitive.mention-self{color:var(--ds-text-subtle,#505258)}
|
|
@@ -2265,6 +2268,7 @@
|
|
|
2265
2268
|
._as951j5o .ProseMirror h2 strong{font-weight:var(--editor-font-ugc-token-weight-heading-bold)}
|
|
2266
2269
|
._at5bidpf .ProseMirror .code-block{margin-right:0}
|
|
2267
2270
|
._atbw16ux .ProseMirror [data-layout-section].ak-editor-selected-node:not(.danger) [data-layout-column]:after{content:"\00a0"}
|
|
2271
|
+
._av0z1h6o .ProseMirror [data-layout-section] [data-layout-column][data-valign=middle]>[data-layout-content]{justify-content:center}
|
|
2268
2272
|
._awp7f705 [layout=wrap-left]+.ProseMirror-gapcursor+span+[layout=wrap-right]:after{content:" "}
|
|
2269
2273
|
._ay2w187o{--local-background-disabled:var(--ds-background-disabled,#0515240f)}
|
|
2270
2274
|
._ay4r7mnp .ak-editor-expand__content .expand-content-wrapper{clip:rect(1px,1px,1px,1px)}
|
|
@@ -2752,6 +2756,7 @@
|
|
|
2752
2756
|
._ksblidpf .fabric-editor-alignment:first-of-type:first-child p:first-child:not(style){margin-top:0}
|
|
2753
2757
|
._ksg217vv .ProseMirror h1>.media-inline-image-wrapper{transform:translateY(-3px)}
|
|
2754
2758
|
._ktc91e5h .pm-table-sticky-wrapper>table th{text-align:left}
|
|
2759
|
+
._ktyiesu3 .ProseMirror [data-layout-section] [data-layout-column][data-valign=bottom]>[data-layout-content]{justify-content:flex-end}
|
|
2755
2760
|
._kw4vglyw .ProseMirror .ak-editor-panel .ak-editor-panel__icon{ms-user-select:none}
|
|
2756
2761
|
._kxdfidpf .ProseMirror .ak-editor-selected-node .emoji-common-emoji-image:before{left:0}
|
|
2757
2762
|
._ky807vkz [data-prosemirror-node-name=decisionItem]>[data-decision-wrapper]>[data-component=icon]{width:1pc}
|
|
@@ -3304,6 +3309,7 @@
|
|
|
3304
3309
|
._wg06idpf [data-prosemirror-node-name=date] .date-lozenger-container span{margin-top:0}
|
|
3305
3310
|
._wgjz10yn .ProseMirror h3>:is(a,span[data-mark-type=border]) .media-inline-image-wrapper{height:25px}
|
|
3306
3311
|
._wgub1j28 .ProseMirror span.pm-placeholder.ak-editor-selected-node ::selection{background-color:transparent}
|
|
3312
|
+
._whzv1txw .ProseMirror [data-layout-section] [data-layout-column][data-valign=bottom]>[data-layout-content]{display:flex}
|
|
3307
3313
|
._wi0pglyw .ak-editor-sync-block__label{box-shadow:none}
|
|
3308
3314
|
._wi4l1j28 .dateView-content-wrap.ak-editor-selected-node .date-lozenger-container>span ::-moz-selection{background-color:transparent}
|
|
3309
3315
|
._wiz6tlke .embedCardView-content-wrap .loader-wrapper>div{cursor:pointer}
|
|
@@ -209,7 +209,7 @@ var editorContentStyles = {
|
|
|
209
209
|
hyperLinkFloatingToolbarStyles: "_14olidpf _1499idpf _w11vidpf _162zidpf",
|
|
210
210
|
indentationStyles: "_10pe1ul9 _ygai1wqb _1czel1r9 _126j68cl _cnga1w81 _14uamgvx",
|
|
211
211
|
InlineNodeViewSharedStyles: "_omad1nu9 _64cs1rj4 _fukv1q9c _1rhx1jtm _1bbqglyw _1v741j28 _17xw1j28 _kdjsglyw _6q1jryon",
|
|
212
|
-
layoutBaseStyles: "_o2as1f61 _3t6qixl8 _19z7kb7n _e6qzkb7n _c9uhf1ug _19eyia51 _1r5q12b0 _cx2xutpp _2wy7h2mm _14hwidpf _1ed8usvi _navqidpf _84fsidpf _gt3aidpf _13jnidpf _1iuzidpf _15nuidpf _4fc0idpf _cs4didpf _1iwn1osq _10q81kdv _i6821hrf _16fxtlke _ez6hglyw _17igidpf _1ayiyh40 _x1d2idpf _9m42yh40",
|
|
212
|
+
layoutBaseStyles: "_o2as1f61 _3t6qixl8 _19z7kb7n _e6qzkb7n _c9uhf1ug _19eyia51 _1r5q12b0 _cx2xutpp _2wy7h2mm _14hwidpf _1ed8usvi _navqidpf _84fsidpf _gt3aidpf _13jnidpf _1iuzidpf _15nuidpf _4fc0idpf _cs4didpf _1iwn1osq _10q81kdv _i6821hrf _whzv1txw _16df1txw _15sh1bp4 _1ydd1bp4 _av0z1h6o _ktyiesu3 _16fxtlke _ez6hglyw _17igidpf _1ayiyh40 _x1d2idpf _9m42yh40",
|
|
213
213
|
layoutBaseStylesAdvanced: "_19eyidpf",
|
|
214
214
|
layoutBaseStylesFixesUnderNestedDnDFG: "_o2as17in _1v5d1crf _5jfcgktf _3mtd1crf _c82wgktf",
|
|
215
215
|
layoutBaseStylesFixesUnderNestedDnDFGExcludingBodiedSync: "_o2as17in _157i1f61 _1v5d1crf _5jfcgktf _3mtd1crf _c82wgktf",
|
|
@@ -506,22 +506,20 @@ var layoutBaseStyles = exports.layoutBaseStyles = (0, _react.css)({
|
|
|
506
506
|
clear: 'both'
|
|
507
507
|
}
|
|
508
508
|
},
|
|
509
|
+
// Keep the editable content wrapper stretched so blank column space remains a text hit area.
|
|
510
|
+
// Apply vertical alignment to the wrapper contents rather than shrinking the wrapper itself.
|
|
509
511
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
510
|
-
'&[data-valign="middle"], &[data-valign="bottom"]': {
|
|
512
|
+
'&[data-valign="middle"] > [data-layout-content], &[data-valign="bottom"] > [data-layout-content]': {
|
|
511
513
|
display: 'flex',
|
|
512
514
|
flexDirection: 'column'
|
|
513
515
|
},
|
|
514
516
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
515
|
-
'&[data-valign="middle"]': {
|
|
517
|
+
'&[data-valign="middle"] > [data-layout-content]': {
|
|
516
518
|
justifyContent: 'center'
|
|
517
519
|
},
|
|
518
520
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
519
|
-
'&[data-valign="bottom"]': {
|
|
521
|
+
'&[data-valign="bottom"] > [data-layout-content]': {
|
|
520
522
|
justifyContent: 'flex-end'
|
|
521
|
-
},
|
|
522
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
523
|
-
'&[data-valign="middle"] > [data-layout-content], &[data-valign="bottom"] > [data-layout-content]': {
|
|
524
|
-
height: 'auto'
|
|
525
523
|
}
|
|
526
524
|
}
|
|
527
525
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
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);
|
|
@@ -0,0 +1,25 @@
|
|
|
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,19 +1,7 @@
|
|
|
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
|
-
const 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 const BeforePrimaryToolbarWrapper =
|
|
17
|
-
css: beforePrimaryToolbarPluginWrapperStyles,
|
|
18
|
-
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
19
|
-
}, props.beforePrimaryToolbarComponents);
|
|
7
|
+
export const BeforePrimaryToolbarWrapper = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), 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,46 @@
|
|
|
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
|
+
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
|
+
export const MainToolbarForSecondChildWrapperCompiled = ({
|
|
36
|
+
twoLineEditorToolbar,
|
|
37
|
+
children,
|
|
38
|
+
role,
|
|
39
|
+
'aria-label': ariaLabel,
|
|
40
|
+
'data-testid': testId
|
|
41
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
role: role,
|
|
43
|
+
"aria-label": ariaLabel,
|
|
44
|
+
"data-testid": testId,
|
|
45
|
+
className: ax([secondChildStyles.base, twoLineEditorToolbar && secondChildStyles.twoLine])
|
|
46
|
+
}, children);
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
const 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
|
+
const 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
|
+
const 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
|
+
const 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 const MainToolbarForFirstChildWrapperEmotion = ({
|
|
54
|
+
twoLineEditorToolbar,
|
|
55
|
+
children,
|
|
56
|
+
role,
|
|
57
|
+
'aria-label': ariaLabel,
|
|
58
|
+
'data-testid': testId
|
|
59
|
+
}) => jsx("div", {
|
|
60
|
+
css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
|
|
61
|
+
role: role,
|
|
62
|
+
"aria-label": ariaLabel,
|
|
63
|
+
"data-testid": testId
|
|
64
|
+
}, children);
|
|
65
|
+
|
|
66
|
+
// ---------------- Second child wrapper ----------------
|
|
67
|
+
export const MainToolbarForSecondChildWrapperEmotion = ({
|
|
68
|
+
twoLineEditorToolbar,
|
|
69
|
+
children,
|
|
70
|
+
role,
|
|
71
|
+
'aria-label': ariaLabel,
|
|
72
|
+
'data-testid': testId
|
|
73
|
+
}) => jsx("div", {
|
|
74
|
+
css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
|
|
75
|
+
role: role,
|
|
76
|
+
"aria-label": ariaLabel,
|
|
77
|
+
"data-testid": testId
|
|
78
|
+
}, children);
|
|
@@ -1,72 +1,9 @@
|
|
|
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
|
-
const 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
|
-
const 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
|
-
const 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
|
-
const 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 const MainToolbarForFirstChildWrapper = (
|
|
48
|
-
twoLineEditorToolbar,
|
|
49
|
-
children,
|
|
50
|
-
role,
|
|
51
|
-
'aria-label': ariaLabel,
|
|
52
|
-
'data-testid': testId
|
|
53
|
-
}) => jsx("div", {
|
|
54
|
-
css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
|
|
55
|
-
role: role,
|
|
56
|
-
"aria-label": ariaLabel,
|
|
57
|
-
"data-testid": testId
|
|
58
|
-
}, children);
|
|
6
|
+
export const MainToolbarForFirstChildWrapper = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), MainToolbarForFirstChildWrapperCompiled, MainToolbarForFirstChildWrapperEmotion);
|
|
59
7
|
|
|
60
8
|
// ---------------- Second child wrapper ----------------
|
|
61
|
-
export const MainToolbarForSecondChildWrapper = (
|
|
62
|
-
twoLineEditorToolbar,
|
|
63
|
-
children,
|
|
64
|
-
role,
|
|
65
|
-
'aria-label': ariaLabel,
|
|
66
|
-
'data-testid': testId
|
|
67
|
-
}) => jsx("div", {
|
|
68
|
-
css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
|
|
69
|
-
role: role,
|
|
70
|
-
"aria-label": ariaLabel,
|
|
71
|
-
"data-testid": testId
|
|
72
|
-
}, children);
|
|
9
|
+
export const MainToolbarForSecondChildWrapper = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), MainToolbarForSecondChildWrapperCompiled, MainToolbarForSecondChildWrapperEmotion);
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
const styles = {
|
|
13
|
+
root: "_1ul95x59 _4t3i1osq _1e0c1txw _2lx21bp4 _vchhusvi"
|
|
14
|
+
};
|
|
15
|
+
export const FullPageEditorWrapperCompiled = /*#__PURE__*/forwardRef(({
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
style
|
|
19
|
+
}, ref) => /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: ax([styles.root, className]),
|
|
22
|
+
style: style
|
|
23
|
+
}, children));
|
|
@@ -0,0 +1,29 @@
|
|
|
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 const FullPageEditorWrapperEmotion = /*#__PURE__*/forwardRef(({
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
style
|
|
22
|
+
}, ref) =>
|
|
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));
|