@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.
Files changed (77) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
  3. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.js +29 -0
  4. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-emotion.js +34 -0
  5. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +7 -20
  6. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
  7. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +56 -0
  8. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +88 -0
  9. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper.js +10 -73
  10. package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
  11. package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.js +32 -0
  12. package/dist/cjs/ui/Appearance/FullPage/FullPage-emotion.js +38 -0
  13. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +19 -20
  14. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
  15. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-compiled.js +45 -0
  16. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-emotion.js +58 -0
  17. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +21 -26
  18. package/dist/cjs/version-wrapper.js +1 -1
  19. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
  20. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.js +19 -0
  21. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-emotion.js +25 -0
  22. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +5 -17
  23. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
  24. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +46 -0
  25. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +78 -0
  26. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper.js +6 -69
  27. package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
  28. package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.js +23 -0
  29. package/dist/es2019/ui/Appearance/FullPage/FullPage-emotion.js +29 -0
  30. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +17 -19
  31. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
  32. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-compiled.js +34 -0
  33. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-emotion.js +48 -0
  34. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +16 -27
  35. package/dist/es2019/version-wrapper.js +1 -1
  36. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
  37. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.js +21 -0
  38. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-emotion.js +27 -0
  39. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +7 -19
  40. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
  41. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +48 -0
  42. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +80 -0
  43. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper.js +10 -71
  44. package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
  45. package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.js +24 -0
  46. package/dist/esm/ui/Appearance/FullPage/FullPage-emotion.js +31 -0
  47. package/dist/esm/ui/Appearance/FullPage/FullPage.js +19 -19
  48. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
  49. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-compiled.js +37 -0
  50. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-emotion.js +50 -0
  51. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +22 -27
  52. package/dist/esm/version-wrapper.js +1 -1
  53. package/dist/types/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +16 -0
  54. package/dist/types/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +16 -0
  55. package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +3 -8
  56. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +3 -0
  57. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +14 -0
  58. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +4 -10
  59. package/dist/types/ui/Appearance/FullPage/FullPage-compiled.d.ts +7 -0
  60. package/dist/types/ui/Appearance/FullPage/FullPage-emotion.d.ts +7 -0
  61. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +2 -2
  62. package/dist/types/ui/Appearance/FullPage/FullPageToolbar-compiled.d.ts +20 -0
  63. package/dist/types/ui/Appearance/FullPage/FullPageToolbar-emotion.d.ts +20 -0
  64. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -6
  65. package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +16 -0
  66. package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +16 -0
  67. package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper.d.ts +3 -8
  68. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +3 -0
  69. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +14 -0
  70. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +4 -10
  71. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage-compiled.d.ts +7 -0
  72. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage-emotion.d.ts +7 -0
  73. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +2 -2
  74. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar-compiled.d.ts +20 -0
  75. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar-emotion.d.ts +20 -0
  76. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -6
  77. package/package.json +2 -2
@@ -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
- * @jsxRuntime classic
26
- * @jsx jsx
27
- */
28
-
29
- // 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
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 (0, _react2.jsx)(_contextPanel.ContextPanelConsumer, null, function (_ref2) {
110
+ return /*#__PURE__*/_react.default.createElement(_contextPanel.ContextPanelConsumer, null, function (_ref2) {
116
111
  var contextPanelWidth = _ref2.width;
117
- return (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
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
- }, (0, _react2.jsx)(ToolbarPortal, null, (0, _react2.jsx)(_MainToolbarWrapper.MainToolbarWrapper, {
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
- }, (0, _react2.jsx)(_CustomToolbarWrapper.MainToolbarForFirstChildWrapper, {
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), (0, _react2.jsx)(_CustomToolbarWrapper.MainToolbarForSecondChildWrapper, {
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), (0, _react2.jsx)(_ToolbarPortal.ToolbarPortalMountPoint, null))));
131
+ }, shouldSplitToolbar ? nonCustomToolbar : customToolbar), /*#__PURE__*/_react.default.createElement(_ToolbarPortal.ToolbarPortalMountPoint, null))));
137
132
  });
138
133
  });
139
134
 
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "219.9.13";
8
+ var version = exports.version = "219.9.14";
@@ -0,0 +1,4 @@
1
+ ._16jlkb7n{flex-grow:1}
2
+ ._1bahesu3{justify-content:flex-end}
3
+ ._1e0c1txw{display:flex}
4
+ ._4cvr1h6o{align-items:center}
@@ -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
- * @jsxRuntime classic
3
- * @jsx jsx
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 = props => jsx("div", {
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
- * @jsxRuntime classic
3
- * @jsx jsx
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,5 @@
1
+ ._1e0c1txw{display:flex}
2
+ ._1ul95x59{min-width:340px}
3
+ ._2lx21bp4{flex-direction:column}
4
+ ._4t3i1osq{height:100%}
5
+ ._vchhusvi{box-sizing:border-box}
@@ -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));
@@ -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,23 +135,25 @@ 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 jsx(SSRRenderMeasure, {
138
+ return /*#__PURE__*/React.createElement(SSRRenderMeasure, {
143
139
  segmentName: SSR_TRACE_SEGMENT_NAME,
144
140
  startTimestampRef: firstRenderStartTimestampRef,
145
141
  onSSRMeasure: props.onSSRMeasure
146
- }, jsx(ContextPanelWidthProvider, null, jsx("div", {
147
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
148
- css: fullPageEditorWrapper
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 ? jsx(FullPageToolbarNext, {
156
+ }, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? /*#__PURE__*/React.createElement(FullPageToolbarNext, {
159
157
  disabled: !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
160
158
  disabledWithoutInteractionLogic: !!props.disabled,
161
159
  toolbarDockingPosition: (_toolbarDockingPositi = toolbarDockingPosition) !== null && _toolbarDockingPositi !== void 0 ? _toolbarDockingPositi : toolbarDocking,
@@ -167,7 +165,7 @@ export const FullPageEditor = props => {
167
165
  popupsScrollableElement: props.popupsScrollableElement,
168
166
  showKeyline: showKeyline,
169
167
  customPrimaryToolbarComponents: props.customPrimaryToolbarComponents
170
- }) : jsx(FullPageToolbar, {
168
+ }) : /*#__PURE__*/React.createElement(FullPageToolbar, {
171
169
  appearance: props.appearance,
172
170
  editorAPI: editorAPI,
173
171
  beforeIcon: props.primaryToolbarIconBefore,
@@ -194,7 +192,7 @@ export const FullPageEditor = props => {
194
192
  providerFactory: props.providerFactory,
195
193
  showKeyline: showKeyline,
196
194
  featureFlags: props.featureFlags
197
- })), jsx(FullPageContentArea, {
195
+ })), /*#__PURE__*/React.createElement(FullPageContentArea, {
198
196
  editorAPI: editorAPI,
199
197
  ref: scrollContentContainerRef,
200
198
  appearance: props.appearance,
@@ -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}}