@atlaskit/editor-core 208.3.5 → 208.3.6

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 (24) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper.js +119 -0
  3. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +6 -1
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +9 -9
  5. package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper.js +97 -0
  6. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -7
  7. package/dist/cjs/version-wrapper.js +1 -1
  8. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper.js +103 -0
  9. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -1
  10. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +10 -10
  11. package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper.js +92 -0
  12. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +5 -9
  13. package/dist/es2019/version-wrapper.js +1 -1
  14. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper.js +111 -0
  15. package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -1
  16. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +10 -10
  17. package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper.js +90 -0
  18. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +5 -9
  19. package/dist/esm/version-wrapper.js +1 -1
  20. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +15 -0
  21. package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +20 -0
  22. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +15 -0
  23. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +20 -0
  24. package/package.json +3 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 208.3.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#165932](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165932)
8
+ [`993d95ad7a45c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/993d95ad7a45c) -
9
+ migrated toolbar off dynamic styles to static styles behind experiment
10
+
3
11
  ## 208.3.5
4
12
 
5
13
  ### Patch Changes
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.MainToolbarForSecondChildWrapper = exports.MainToolbarForFirstChildWrapper = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _react2 = require("@emotion/react");
10
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
11
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
+ var _MainToolbar = require("./MainToolbar");
13
+ /**
14
+ * @jsxRuntime classic
15
+ * @jsx jsx
16
+ */
17
+
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
+
20
+ // Pre-computed static styles for first- and second-child wrappers.
21
+ // These contain no runtime logic and are safe for static-emotion mode.
22
+
23
+ var firstChildStaticBase = (0, _react2.css)({
24
+ display: 'flex',
25
+ flexGrow: 1
26
+ });
27
+
28
+ // we can't avoid some kind of function call here, so we need to disable the rule
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
30
+ var firstChildStaticTwoLine = (0, _react2.css)({
31
+ '@media (max-width: 868px)': {
32
+ flex: '1 1 100%',
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
34
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
35
+ justifyContent: 'flex-end',
36
+ minWidth: 'fit-content'
37
+ }
38
+ });
39
+ var secondChildStaticBase = (0, _react2.css)({
40
+ minWidth: 'fit-content'
41
+ });
42
+
43
+ // we can't avoid some kind of function call here, so we need to disable the rule
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
45
+ var secondChildStaticTwoLine = (0, _react2.css)({
46
+ '@media (max-width: 868px)': {
47
+ display: 'flex',
48
+ flexGrow: 1,
49
+ flex: '1 1 100%',
50
+ margin: 'auto',
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
52
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
53
+ minWidth: 0
54
+ }
55
+ });
56
+
57
+ // ---------------- First child wrapper ----------------
58
+ var FirstChildWrapperStatic = function FirstChildWrapperStatic(_ref) {
59
+ var twoLineEditorToolbar = _ref.twoLineEditorToolbar,
60
+ children = _ref.children,
61
+ role = _ref.role,
62
+ ariaLabel = _ref['aria-label'],
63
+ testId = _ref['data-testid'];
64
+ return (0, _react2.jsx)("div", {
65
+ css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
66
+ role: role,
67
+ "aria-label": ariaLabel,
68
+ "data-testid": testId
69
+ }, children);
70
+ };
71
+ var FirstChildWrapperDynamic = function FirstChildWrapperDynamic(_ref2) {
72
+ var twoLineEditorToolbar = _ref2.twoLineEditorToolbar,
73
+ children = _ref2.children,
74
+ role = _ref2.role,
75
+ ariaLabel = _ref2['aria-label'],
76
+ testId = _ref2['data-testid'];
77
+ return (0, _react2.jsx)("div", {
78
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
79
+ css: (0, _MainToolbar.mainToolbarFirstChildStyle)(twoLineEditorToolbar),
80
+ role: role,
81
+ "aria-label": ariaLabel,
82
+ "data-testid": testId
83
+ }, children);
84
+ };
85
+ var MainToolbarForFirstChildWrapper = exports.MainToolbarForFirstChildWrapper = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
86
+ return (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true);
87
+ }, FirstChildWrapperStatic, FirstChildWrapperDynamic);
88
+
89
+ // ---------------- Second child wrapper ----------------
90
+ var SecondChildWrapperStatic = function SecondChildWrapperStatic(_ref3) {
91
+ var twoLineEditorToolbar = _ref3.twoLineEditorToolbar,
92
+ children = _ref3.children,
93
+ role = _ref3.role,
94
+ ariaLabel = _ref3['aria-label'],
95
+ testId = _ref3['data-testid'];
96
+ return (0, _react2.jsx)("div", {
97
+ css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
98
+ role: role,
99
+ "aria-label": ariaLabel,
100
+ "data-testid": testId
101
+ }, children);
102
+ };
103
+ var SecondChildWrapperDynamic = function SecondChildWrapperDynamic(_ref4) {
104
+ var twoLineEditorToolbar = _ref4.twoLineEditorToolbar,
105
+ children = _ref4.children,
106
+ role = _ref4.role,
107
+ ariaLabel = _ref4['aria-label'],
108
+ testId = _ref4['data-testid'];
109
+ return (0, _react2.jsx)("div", {
110
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
111
+ css: (0, _MainToolbar.mainToolbarSecondChildStyle)(twoLineEditorToolbar),
112
+ role: role,
113
+ "aria-label": ariaLabel,
114
+ "data-testid": testId
115
+ }, children);
116
+ };
117
+ var MainToolbarForSecondChildWrapper = exports.MainToolbarForSecondChildWrapper = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
118
+ return (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true);
119
+ }, SecondChildWrapperStatic, SecondChildWrapperDynamic);
@@ -13,6 +13,7 @@ var _browser = require("@atlaskit/editor-common/browser");
13
13
  var _hooks = require("@atlaskit/editor-common/hooks");
14
14
  var _ui = require("@atlaskit/editor-common/ui");
15
15
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
16
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
17
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
19
  var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
@@ -163,7 +164,11 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
163
164
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
164
165
  ,
165
166
  className: "akEditor",
166
- ref: wrapperElementRef
167
+ ref: wrapperElementRef,
168
+ style: {
169
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
170
+ '--ak-editor-fullpage-toolbar-height': (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)()
171
+ }
167
172
  }, !isEditorToolbarHidden && (0, _react2.jsx)(_FullPageToolbar.FullPageToolbar, {
168
173
  appearance: props.appearance,
169
174
  editorAPI: editorAPI,
@@ -17,7 +17,9 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
17
  var _ToolbarPortal = require("../../Toolbar/ToolbarPortal");
18
18
  var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
19
19
  var _BeforeWrapper = require("./BeforeWrapper");
20
+ var _CustomToolbarWrapper = require("./CustomToolbarWrapper");
20
21
  var _MainToolbar = require("./MainToolbar");
22
+ var _MainToolbarWrapper = require("./MainToolbarWrapper");
21
23
  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); }
22
24
  /**
23
25
  * @jsxRuntime classic
@@ -130,18 +132,16 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
130
132
  isShortcutToFocusToolbar: isShortcutToFocusToolbar,
131
133
  handleEscape: handleEscape,
132
134
  intl: props.intl
133
- }, (0, _react2.jsx)(ToolbarPortal, null, (0, _react2.jsx)("div", {
134
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
135
- css: (0, _MainToolbar.mainToolbarStyle)(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
135
+ }, (0, _react2.jsx)(ToolbarPortal, null, (0, _react2.jsx)(_MainToolbarWrapper.MainToolbarWrapper, {
136
+ showKeyline: props.showKeyline || contextPanelWidth > 0,
137
+ twoLineEditorToolbar: twoLineEditorToolbar,
136
138
  "data-testid": "ak-editor-main-toolbar"
137
- }, (0, _react2.jsx)("div", {
138
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
139
- css: (0, _MainToolbar.mainToolbarFirstChildStyle)(twoLineEditorToolbar),
139
+ }, (0, _react2.jsx)(_CustomToolbarWrapper.MainToolbarForFirstChildWrapper, {
140
+ twoLineEditorToolbar: twoLineEditorToolbar,
140
141
  role: "toolbar",
141
142
  "aria-label": props.intl.formatMessage(_messages.fullPageMessages.toolbarLabel)
142
- }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), (0, _react2.jsx)("div", {
143
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
144
- css: (0, _MainToolbar.mainToolbarSecondChildStyle)(twoLineEditorToolbar),
143
+ }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), (0, _react2.jsx)(_CustomToolbarWrapper.MainToolbarForSecondChildWrapper, {
144
+ twoLineEditorToolbar: twoLineEditorToolbar,
145
145
  "data-testid": "avatar-group-outside-plugin",
146
146
  role: "region",
147
147
  "aria-label": props.intl.formatMessage(_messages.fullPageMessages.pageActionsLabel)
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.MainToolbarWrapper = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _react2 = require("@emotion/react");
11
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
14
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
+ var _MainToolbar = require("./MainToolbar");
16
+ /**
17
+ * @jsxRuntime classic
18
+ * @jsx jsx
19
+ */
20
+
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
+
23
+ // Base styles that don't depend on feature flags
24
+ var baseToolbarStyles = (0, _react2.css)({
25
+ position: 'relative',
26
+ alignItems: 'center',
27
+ boxShadow: 'none',
28
+ borderBottom: "1px solid ".concat("var(--ds-border, #091E4224)"),
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
30
+ transition: "box-shadow 200ms ".concat(_editorSharedStyles.akEditorSwoopCubicBezier),
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
32
+ zIndex: _editorSharedStyles.akEditorFloatingDialogZIndex,
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
34
+ display: 'flex',
35
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
36
+ flexShrink: 0,
37
+ backgroundColor: "var(--ds-surface, #FFFFFF)",
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
39
+ '& object': {
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
41
+ height: '0 !important'
42
+ }
43
+ });
44
+ var flexibleIconSize = (0, _react2.css)({
45
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
46
+ '& span svg': {
47
+ maxWidth: '100%'
48
+ }
49
+ });
50
+ // box-shadow is overriden by the mainToolbar
51
+ var mainToolbarWithKeyline = (0, _react2.css)({
52
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
53
+ boxShadow: "var(--ds-shadow-overflow, 0px 0px 8px #091E4228, 0px 0px 1px #091E421e)"
54
+ });
55
+ var mainToolbarTwoLineStyle = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(_MainToolbar.MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
56
+ flexWrap: 'wrap',
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
58
+ height: "calc(var(--ak-editor-fullpage-toolbar-height) * 2)"
59
+ }));
60
+ var MainToolbarWrapperNext = function MainToolbarWrapperNext(_ref) {
61
+ var showKeyline = _ref.showKeyline,
62
+ twoLineEditorToolbar = _ref.twoLineEditorToolbar,
63
+ children = _ref.children,
64
+ testId = _ref['data-testid'];
65
+ return (0, _react2.jsx)("div", {
66
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
67
+ css: [baseToolbarStyles, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && flexibleIconSize, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle],
68
+ "data-testid": testId
69
+ }, children);
70
+ };
71
+
72
+ /**
73
+ * Original version of the toolbar wrapper using dynamic styles
74
+ */
75
+ var MainToolbarWrapperOld = function MainToolbarWrapperOld(_ref2) {
76
+ var showKeyline = _ref2.showKeyline,
77
+ twoLineEditorToolbar = _ref2.twoLineEditorToolbar,
78
+ children = _ref2.children,
79
+ testId = _ref2['data-testid'];
80
+ return (0, _react2.jsx)("div", {
81
+ css:
82
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
83
+ (0, _MainToolbar.mainToolbarStyle)(showKeyline, twoLineEditorToolbar),
84
+ "data-testid": testId
85
+ }, children);
86
+ };
87
+
88
+ /**
89
+ * Wrapper component for the main toolbar that handles feature flag based styling
90
+ * @example
91
+ * <MainToolbarWrapper showKeyline={true} twoLineEditorToolbar={false}>
92
+ * <ToolbarContent />
93
+ * </MainToolbarWrapper>
94
+ */
95
+ var MainToolbarWrapper = exports.MainToolbarWrapper = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
96
+ return (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true);
97
+ }, MainToolbarWrapperNext, MainToolbarWrapperOld);
@@ -126,11 +126,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
126
126
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
127
127
  _codeBlockStyles.codeBlockStyles,
128
128
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
129
- !(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && _editorUGCTokenStyles.editorUGCTokensDefault, ((0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed')) && (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') &&
129
+ !(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && _editorUGCTokenStyles.editorUGCTokensDefault, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') &&
130
130
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
131
- _editorUGCTokenStyles.editorUGCTokensRefreshed, !((0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed')) && (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') &&
132
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
133
- _editorUGCTokenStyles.editorUGCTokensModernized,
131
+ _editorUGCTokenStyles.editorUGCTokensRefreshed,
134
132
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
135
133
  _blockTypeStyles.blocktypeStyles,
136
134
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -268,12 +266,10 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
268
266
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
269
267
  _smartCardStyles.linkingVisualRefreshV1Styles,
270
268
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
271
- _dateStyles.dateVanillaStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? (0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed') ?
269
+ _dateStyles.dateVanillaStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ?
272
270
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
273
271
  _paragraphStyles.paragraphStylesUGCRefreshed :
274
272
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
275
- _paragraphStyles.paragraphStylesUGCModernized :
276
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
277
273
  _paragraphStyles.paragraphStylesOld,
278
274
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
279
275
  (0, _platformFeatureFlags.fg)('platform_editor_hyperlink_underline') ? _link.linkStyles : _link.linkStylesOld,
@@ -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 = "208.3.4";
8
+ var version = exports.version = "208.3.5";
@@ -0,0 +1,103 @@
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 -- Ignored via go/DSP-18766
8
+ import { css, jsx } from '@emotion/react';
9
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
10
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
+ import { mainToolbarFirstChildStyle, mainToolbarSecondChildStyle } from './MainToolbar';
12
+ // Pre-computed static styles for first- and second-child wrappers.
13
+ // These contain no runtime logic and are safe for static-emotion mode.
14
+
15
+ const firstChildStaticBase = css({
16
+ display: 'flex',
17
+ flexGrow: 1
18
+ });
19
+
20
+ // we can't avoid some kind of function call here, so we need to disable the rule
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
+ const firstChildStaticTwoLine = css({
23
+ '@media (max-width: 868px)': {
24
+ flex: '1 1 100%',
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
26
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
27
+ justifyContent: 'flex-end',
28
+ minWidth: 'fit-content'
29
+ }
30
+ });
31
+ const secondChildStaticBase = css({
32
+ minWidth: 'fit-content'
33
+ });
34
+
35
+ // we can't avoid some kind of function call here, so we need to disable the rule
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
+ const secondChildStaticTwoLine = css({
38
+ '@media (max-width: 868px)': {
39
+ display: 'flex',
40
+ flexGrow: 1,
41
+ flex: '1 1 100%',
42
+ margin: 'auto',
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
45
+ minWidth: 0
46
+ }
47
+ });
48
+
49
+ // ---------------- First child wrapper ----------------
50
+ const FirstChildWrapperStatic = ({
51
+ twoLineEditorToolbar,
52
+ children,
53
+ role,
54
+ 'aria-label': ariaLabel,
55
+ 'data-testid': testId
56
+ }) => jsx("div", {
57
+ css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
58
+ role: role,
59
+ "aria-label": ariaLabel,
60
+ "data-testid": testId
61
+ }, children);
62
+ const FirstChildWrapperDynamic = ({
63
+ twoLineEditorToolbar,
64
+ children,
65
+ role,
66
+ 'aria-label': ariaLabel,
67
+ 'data-testid': testId
68
+ }) => jsx("div", {
69
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
70
+ css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
71
+ role: role,
72
+ "aria-label": ariaLabel,
73
+ "data-testid": testId
74
+ }, children);
75
+ export const MainToolbarForFirstChildWrapper = componentWithCondition(() => expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true), FirstChildWrapperStatic, FirstChildWrapperDynamic);
76
+
77
+ // ---------------- Second child wrapper ----------------
78
+ const SecondChildWrapperStatic = ({
79
+ twoLineEditorToolbar,
80
+ children,
81
+ role,
82
+ 'aria-label': ariaLabel,
83
+ 'data-testid': testId
84
+ }) => jsx("div", {
85
+ css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
86
+ role: role,
87
+ "aria-label": ariaLabel,
88
+ "data-testid": testId
89
+ }, children);
90
+ const SecondChildWrapperDynamic = ({
91
+ twoLineEditorToolbar,
92
+ children,
93
+ role,
94
+ 'aria-label': ariaLabel,
95
+ 'data-testid': testId
96
+ }) => jsx("div", {
97
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
98
+ css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
99
+ role: role,
100
+ "aria-label": ariaLabel,
101
+ "data-testid": testId
102
+ }, children);
103
+ export const MainToolbarForSecondChildWrapper = componentWithCondition(() => expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true), SecondChildWrapperStatic, SecondChildWrapperDynamic);
@@ -10,6 +10,7 @@ import { browser } from '@atlaskit/editor-common/browser';
10
10
  import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
11
11
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
12
12
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
13
+ import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
13
14
  import { fg } from '@atlaskit/platform-feature-flags';
14
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
16
  import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
@@ -148,7 +149,11 @@ export const FullPageEditor = props => {
148
149
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
149
150
  ,
150
151
  className: "akEditor",
151
- ref: wrapperElementRef
152
+ ref: wrapperElementRef,
153
+ style: {
154
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
155
+ '--ak-editor-fullpage-toolbar-height': FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()
156
+ }
152
157
  }, !isEditorToolbarHidden && jsx(FullPageToolbar, {
153
158
  appearance: props.appearance,
154
159
  editorAPI: editorAPI,
@@ -15,7 +15,9 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
15
  import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
16
16
  import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
17
17
  import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
18
- import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
18
+ import { MainToolbarForFirstChildWrapper, MainToolbarForSecondChildWrapper } from './CustomToolbarWrapper';
19
+ import { customToolbarWrapperStyle, mainToolbarIconBeforeStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
20
+ import { MainToolbarWrapper } from './MainToolbarWrapper';
19
21
  export const EditorToolbar = /*#__PURE__*/React.memo(props => {
20
22
  var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
21
23
  const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
@@ -118,18 +120,16 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
118
120
  isShortcutToFocusToolbar: isShortcutToFocusToolbar,
119
121
  handleEscape: handleEscape,
120
122
  intl: props.intl
121
- }, jsx(ToolbarPortal, null, jsx("div", {
122
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
123
- css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
123
+ }, jsx(ToolbarPortal, null, jsx(MainToolbarWrapper, {
124
+ showKeyline: props.showKeyline || contextPanelWidth > 0,
125
+ twoLineEditorToolbar: twoLineEditorToolbar,
124
126
  "data-testid": "ak-editor-main-toolbar"
125
- }, jsx("div", {
126
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
127
- css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
127
+ }, jsx(MainToolbarForFirstChildWrapper, {
128
+ twoLineEditorToolbar: twoLineEditorToolbar,
128
129
  role: "toolbar",
129
130
  "aria-label": props.intl.formatMessage(messages.toolbarLabel)
130
- }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
131
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
132
- css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
131
+ }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx(MainToolbarForSecondChildWrapper, {
132
+ twoLineEditorToolbar: twoLineEditorToolbar,
133
133
  "data-testid": "avatar-group-outside-plugin",
134
134
  role: "region",
135
135
  "aria-label": props.intl.formatMessage(messages.pageActionsLabel)
@@ -0,0 +1,92 @@
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 -- Ignored via go/DSP-18766
8
+ import { css, jsx } from '@emotion/react';
9
+ import { akEditorFloatingDialogZIndex, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
12
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
+ import { mainToolbarStyle as mainToolbarStyleDynamic, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
14
+
15
+ // Base styles that don't depend on feature flags
16
+ const baseToolbarStyles = css({
17
+ position: 'relative',
18
+ alignItems: 'center',
19
+ boxShadow: 'none',
20
+ borderBottom: `1px solid ${"var(--ds-border, #091E4224)"}`,
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
22
+ transition: `box-shadow 200ms ${akEditorSwoopCubicBezier}`,
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
24
+ zIndex: akEditorFloatingDialogZIndex,
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
26
+ display: 'flex',
27
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
28
+ flexShrink: 0,
29
+ backgroundColor: "var(--ds-surface, #FFFFFF)",
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
31
+ '& object': {
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
33
+ height: '0 !important'
34
+ }
35
+ });
36
+ const flexibleIconSize = css({
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
38
+ '& span svg': {
39
+ maxWidth: '100%'
40
+ }
41
+ });
42
+ // box-shadow is overriden by the mainToolbar
43
+ const mainToolbarWithKeyline = css({
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
45
+ boxShadow: `${"var(--ds-shadow-overflow, 0px 0px 8px #091E4228, 0px 0px 1px #091E421e)"}`
46
+ });
47
+ const mainToolbarTwoLineStyle = css({
48
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
49
+ [`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
50
+ flexWrap: 'wrap',
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
52
+ height: `calc(var(--ak-editor-fullpage-toolbar-height) * 2)`
53
+ }
54
+ });
55
+ const MainToolbarWrapperNext = ({
56
+ showKeyline,
57
+ twoLineEditorToolbar,
58
+ children,
59
+ 'data-testid': testId
60
+ }) => {
61
+ return jsx("div", {
62
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
63
+ css: [baseToolbarStyles, fg('platform-visual-refresh-icons') && flexibleIconSize, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle],
64
+ "data-testid": testId
65
+ }, children);
66
+ };
67
+
68
+ /**
69
+ * Original version of the toolbar wrapper using dynamic styles
70
+ */
71
+ const MainToolbarWrapperOld = ({
72
+ showKeyline,
73
+ twoLineEditorToolbar,
74
+ children,
75
+ 'data-testid': testId
76
+ }) => {
77
+ return jsx("div", {
78
+ css:
79
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
80
+ mainToolbarStyleDynamic(showKeyline, twoLineEditorToolbar),
81
+ "data-testid": testId
82
+ }, children);
83
+ };
84
+
85
+ /**
86
+ * Wrapper component for the main toolbar that handles feature flag based styling
87
+ * @example
88
+ * <MainToolbarWrapper showKeyline={true} twoLineEditorToolbar={false}>
89
+ * <ToolbarContent />
90
+ * </MainToolbarWrapper>
91
+ */
92
+ export const MainToolbarWrapper = componentWithCondition(() => expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true), MainToolbarWrapperNext, MainToolbarWrapperOld);
@@ -25,7 +25,7 @@ import { codeMarkStyles } from './styles/codeMarkStyles';
25
25
  import { commentEditorStyles } from './styles/commentEditorStyles';
26
26
  import { cursorStyles } from './styles/cursorStyles';
27
27
  import { dateStyles, dateVanillaStyles } from './styles/dateStyles';
28
- import { editorUGCTokensDefault, editorUGCTokensModernized, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
28
+ import { editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
29
29
  import { embedCardStyles } from './styles/embedCardStyles';
30
30
  import { reactEmojiStyles, vanillaEmojiStyles } from './styles/emoji';
31
31
  import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes } from './styles/expandStyles';
@@ -44,7 +44,7 @@ import { listsStyles, listsStylesSafariFix } from './styles/list';
44
44
  import { mediaAlignmentStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
45
45
  import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles } from './styles/mentions';
46
46
  import { panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
47
- import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
47
+ import { paragraphStylesOld, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
48
48
  import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderTextStylesMixin_fg_platform_editor_system_fake_text_highlight_colour, placeholderWrapStyles } from './styles/placeholderStyles';
49
49
  import { pragmaticResizerStyles, pragmaticResizerStylesNew, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, resizerStyles } from './styles/resizerStyles';
50
50
  import { ruleStyles } from './styles/rule';
@@ -121,11 +121,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
121
121
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
122
122
  codeBlockStyles,
123
123
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
124
- !fg('platform_editor_typography_ugc') && editorUGCTokensDefault, (fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && fg('platform_editor_typography_ugc') &&
124
+ !fg('platform_editor_typography_ugc') && editorUGCTokensDefault, fg('platform_editor_typography_ugc') &&
125
125
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
126
- editorUGCTokensRefreshed, !(fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && fg('platform_editor_typography_ugc') &&
127
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
128
- editorUGCTokensModernized,
126
+ editorUGCTokensRefreshed,
129
127
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
130
128
  blocktypeStyles,
131
129
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -263,12 +261,10 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
263
261
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
264
262
  linkingVisualRefreshV1Styles,
265
263
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
266
- dateVanillaStyles, fg('platform_editor_typography_ugc') ? fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed') ?
264
+ dateVanillaStyles, fg('platform_editor_typography_ugc') ?
267
265
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
268
266
  paragraphStylesUGCRefreshed :
269
267
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
270
- paragraphStylesUGCModernized :
271
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
272
268
  paragraphStylesOld,
273
269
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
274
270
  fg('platform_editor_hyperlink_underline') ? linkStyles : linkStylesOld,
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "208.3.4";
2
+ export const version = "208.3.5";
@@ -0,0 +1,111 @@
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 -- Ignored via go/DSP-18766
8
+ import { css, jsx } from '@emotion/react';
9
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
10
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
+ import { mainToolbarFirstChildStyle, mainToolbarSecondChildStyle } from './MainToolbar';
12
+ // Pre-computed static styles for first- and second-child wrappers.
13
+ // These contain no runtime logic and are safe for static-emotion mode.
14
+
15
+ var firstChildStaticBase = css({
16
+ display: 'flex',
17
+ flexGrow: 1
18
+ });
19
+
20
+ // we can't avoid some kind of function call here, so we need to disable the rule
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
+ var firstChildStaticTwoLine = css({
23
+ '@media (max-width: 868px)': {
24
+ flex: '1 1 100%',
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
26
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
27
+ justifyContent: 'flex-end',
28
+ minWidth: 'fit-content'
29
+ }
30
+ });
31
+ var secondChildStaticBase = css({
32
+ minWidth: 'fit-content'
33
+ });
34
+
35
+ // we can't avoid some kind of function call here, so we need to disable the rule
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
+ var secondChildStaticTwoLine = css({
38
+ '@media (max-width: 868px)': {
39
+ display: 'flex',
40
+ flexGrow: 1,
41
+ flex: '1 1 100%',
42
+ margin: 'auto',
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
45
+ minWidth: 0
46
+ }
47
+ });
48
+
49
+ // ---------------- First child wrapper ----------------
50
+ var FirstChildWrapperStatic = function FirstChildWrapperStatic(_ref) {
51
+ var twoLineEditorToolbar = _ref.twoLineEditorToolbar,
52
+ children = _ref.children,
53
+ role = _ref.role,
54
+ ariaLabel = _ref['aria-label'],
55
+ testId = _ref['data-testid'];
56
+ return jsx("div", {
57
+ css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
58
+ role: role,
59
+ "aria-label": ariaLabel,
60
+ "data-testid": testId
61
+ }, children);
62
+ };
63
+ var FirstChildWrapperDynamic = function FirstChildWrapperDynamic(_ref2) {
64
+ var twoLineEditorToolbar = _ref2.twoLineEditorToolbar,
65
+ children = _ref2.children,
66
+ role = _ref2.role,
67
+ ariaLabel = _ref2['aria-label'],
68
+ testId = _ref2['data-testid'];
69
+ return jsx("div", {
70
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
71
+ css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
72
+ role: role,
73
+ "aria-label": ariaLabel,
74
+ "data-testid": testId
75
+ }, children);
76
+ };
77
+ export var MainToolbarForFirstChildWrapper = componentWithCondition(function () {
78
+ return expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true);
79
+ }, FirstChildWrapperStatic, FirstChildWrapperDynamic);
80
+
81
+ // ---------------- Second child wrapper ----------------
82
+ var SecondChildWrapperStatic = function SecondChildWrapperStatic(_ref3) {
83
+ var twoLineEditorToolbar = _ref3.twoLineEditorToolbar,
84
+ children = _ref3.children,
85
+ role = _ref3.role,
86
+ ariaLabel = _ref3['aria-label'],
87
+ testId = _ref3['data-testid'];
88
+ return jsx("div", {
89
+ css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
90
+ role: role,
91
+ "aria-label": ariaLabel,
92
+ "data-testid": testId
93
+ }, children);
94
+ };
95
+ var SecondChildWrapperDynamic = function SecondChildWrapperDynamic(_ref4) {
96
+ var twoLineEditorToolbar = _ref4.twoLineEditorToolbar,
97
+ children = _ref4.children,
98
+ role = _ref4.role,
99
+ ariaLabel = _ref4['aria-label'],
100
+ testId = _ref4['data-testid'];
101
+ return jsx("div", {
102
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
103
+ css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
104
+ role: role,
105
+ "aria-label": ariaLabel,
106
+ "data-testid": testId
107
+ }, children);
108
+ };
109
+ export var MainToolbarForSecondChildWrapper = componentWithCondition(function () {
110
+ return expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true);
111
+ }, SecondChildWrapperStatic, SecondChildWrapperDynamic);
@@ -11,6 +11,7 @@ import { browser } from '@atlaskit/editor-common/browser';
11
11
  import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
12
12
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
13
13
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
14
+ import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
14
15
  import { fg } from '@atlaskit/platform-feature-flags';
15
16
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
16
17
  import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
@@ -153,7 +154,11 @@ export var FullPageEditor = function FullPageEditor(props) {
153
154
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
154
155
  ,
155
156
  className: "akEditor",
156
- ref: wrapperElementRef
157
+ ref: wrapperElementRef,
158
+ style: {
159
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
160
+ '--ak-editor-fullpage-toolbar-height': FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()
161
+ }
157
162
  }, !isEditorToolbarHidden && jsx(FullPageToolbar, {
158
163
  appearance: props.appearance,
159
164
  editorAPI: editorAPI,
@@ -16,7 +16,9 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
16
16
  import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
17
17
  import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
18
18
  import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
19
- import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
19
+ import { MainToolbarForFirstChildWrapper, MainToolbarForSecondChildWrapper } from './CustomToolbarWrapper';
20
+ import { customToolbarWrapperStyle, mainToolbarIconBeforeStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
21
+ import { MainToolbarWrapper } from './MainToolbarWrapper';
20
22
  export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
21
23
  var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
22
24
  var _useState = useState(false),
@@ -121,18 +123,16 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
121
123
  isShortcutToFocusToolbar: isShortcutToFocusToolbar,
122
124
  handleEscape: handleEscape,
123
125
  intl: props.intl
124
- }, jsx(ToolbarPortal, null, jsx("div", {
125
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
126
- css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
126
+ }, jsx(ToolbarPortal, null, jsx(MainToolbarWrapper, {
127
+ showKeyline: props.showKeyline || contextPanelWidth > 0,
128
+ twoLineEditorToolbar: twoLineEditorToolbar,
127
129
  "data-testid": "ak-editor-main-toolbar"
128
- }, jsx("div", {
129
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
130
- css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
130
+ }, jsx(MainToolbarForFirstChildWrapper, {
131
+ twoLineEditorToolbar: twoLineEditorToolbar,
131
132
  role: "toolbar",
132
133
  "aria-label": props.intl.formatMessage(messages.toolbarLabel)
133
- }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
134
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
135
- css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
134
+ }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx(MainToolbarForSecondChildWrapper, {
135
+ twoLineEditorToolbar: twoLineEditorToolbar,
136
136
  "data-testid": "avatar-group-outside-plugin",
137
137
  role: "region",
138
138
  "aria-label": props.intl.formatMessage(messages.pageActionsLabel)
@@ -0,0 +1,90 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
6
+ import React from 'react';
7
+
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
+ import { css, jsx } from '@emotion/react';
10
+ import { akEditorFloatingDialogZIndex, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
12
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
13
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
+ import { mainToolbarStyle as mainToolbarStyleDynamic, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
15
+
16
+ // Base styles that don't depend on feature flags
17
+ var baseToolbarStyles = css({
18
+ position: 'relative',
19
+ alignItems: 'center',
20
+ boxShadow: 'none',
21
+ borderBottom: "1px solid ".concat("var(--ds-border, #091E4224)"),
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
23
+ transition: "box-shadow 200ms ".concat(akEditorSwoopCubicBezier),
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
25
+ zIndex: akEditorFloatingDialogZIndex,
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
27
+ display: 'flex',
28
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
29
+ flexShrink: 0,
30
+ backgroundColor: "var(--ds-surface, #FFFFFF)",
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
32
+ '& object': {
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
34
+ height: '0 !important'
35
+ }
36
+ });
37
+ var flexibleIconSize = css({
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
39
+ '& span svg': {
40
+ maxWidth: '100%'
41
+ }
42
+ });
43
+ // box-shadow is overriden by the mainToolbar
44
+ var mainToolbarWithKeyline = css({
45
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
46
+ boxShadow: "var(--ds-shadow-overflow, 0px 0px 8px #091E4228, 0px 0px 1px #091E421e)"
47
+ });
48
+ var mainToolbarTwoLineStyle = css(_defineProperty({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
49
+ flexWrap: 'wrap',
50
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
51
+ height: "calc(var(--ak-editor-fullpage-toolbar-height) * 2)"
52
+ }));
53
+ var MainToolbarWrapperNext = function MainToolbarWrapperNext(_ref) {
54
+ var showKeyline = _ref.showKeyline,
55
+ twoLineEditorToolbar = _ref.twoLineEditorToolbar,
56
+ children = _ref.children,
57
+ testId = _ref['data-testid'];
58
+ return jsx("div", {
59
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
60
+ css: [baseToolbarStyles, fg('platform-visual-refresh-icons') && flexibleIconSize, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle],
61
+ "data-testid": testId
62
+ }, children);
63
+ };
64
+
65
+ /**
66
+ * Original version of the toolbar wrapper using dynamic styles
67
+ */
68
+ var MainToolbarWrapperOld = function MainToolbarWrapperOld(_ref2) {
69
+ var showKeyline = _ref2.showKeyline,
70
+ twoLineEditorToolbar = _ref2.twoLineEditorToolbar,
71
+ children = _ref2.children,
72
+ testId = _ref2['data-testid'];
73
+ return jsx("div", {
74
+ css:
75
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
76
+ mainToolbarStyleDynamic(showKeyline, twoLineEditorToolbar),
77
+ "data-testid": testId
78
+ }, children);
79
+ };
80
+
81
+ /**
82
+ * Wrapper component for the main toolbar that handles feature flag based styling
83
+ * @example
84
+ * <MainToolbarWrapper showKeyline={true} twoLineEditorToolbar={false}>
85
+ * <ToolbarContent />
86
+ * </MainToolbarWrapper>
87
+ */
88
+ export var MainToolbarWrapper = componentWithCondition(function () {
89
+ return expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true);
90
+ }, MainToolbarWrapperNext, MainToolbarWrapperOld);
@@ -25,7 +25,7 @@ import { codeMarkStyles } from './styles/codeMarkStyles';
25
25
  import { commentEditorStyles } from './styles/commentEditorStyles';
26
26
  import { cursorStyles } from './styles/cursorStyles';
27
27
  import { dateStyles, dateVanillaStyles } from './styles/dateStyles';
28
- import { editorUGCTokensDefault, editorUGCTokensModernized, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
28
+ import { editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
29
29
  import { embedCardStyles } from './styles/embedCardStyles';
30
30
  import { reactEmojiStyles, vanillaEmojiStyles } from './styles/emoji';
31
31
  import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes } from './styles/expandStyles';
@@ -44,7 +44,7 @@ import { listsStyles, listsStylesSafariFix } from './styles/list';
44
44
  import { mediaAlignmentStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
45
45
  import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles } from './styles/mentions';
46
46
  import { panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
47
- import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
47
+ import { paragraphStylesOld, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
48
48
  import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderTextStylesMixin_fg_platform_editor_system_fake_text_highlight_colour, placeholderWrapStyles } from './styles/placeholderStyles';
49
49
  import { pragmaticResizerStyles, pragmaticResizerStylesNew, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, resizerStyles } from './styles/resizerStyles';
50
50
  import { ruleStyles } from './styles/rule';
@@ -118,11 +118,9 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
118
118
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
119
119
  codeBlockStyles,
120
120
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
121
- !fg('platform_editor_typography_ugc') && editorUGCTokensDefault, (fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && fg('platform_editor_typography_ugc') &&
121
+ !fg('platform_editor_typography_ugc') && editorUGCTokensDefault, fg('platform_editor_typography_ugc') &&
122
122
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
123
- editorUGCTokensRefreshed, !(fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && fg('platform_editor_typography_ugc') &&
124
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
125
- editorUGCTokensModernized,
123
+ editorUGCTokensRefreshed,
126
124
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
127
125
  blocktypeStyles,
128
126
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -260,12 +258,10 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
260
258
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
261
259
  linkingVisualRefreshV1Styles,
262
260
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
263
- dateVanillaStyles, fg('platform_editor_typography_ugc') ? fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed') ?
261
+ dateVanillaStyles, fg('platform_editor_typography_ugc') ?
264
262
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
265
263
  paragraphStylesUGCRefreshed :
266
264
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
267
- paragraphStylesUGCModernized :
268
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
269
265
  paragraphStylesOld,
270
266
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
271
267
  fg('platform_editor_hyperlink_underline') ? linkStyles : linkStylesOld,
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "208.3.4";
2
+ export var version = "208.3.5";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ interface ChildWrapperProps {
7
+ twoLineEditorToolbar: boolean;
8
+ children: React.ReactNode;
9
+ role?: string;
10
+ 'aria-label'?: string;
11
+ 'data-testid'?: string;
12
+ }
13
+ export declare const MainToolbarForFirstChildWrapper: React.FC<ChildWrapperProps>;
14
+ export declare const MainToolbarForSecondChildWrapper: React.FC<ChildWrapperProps>;
15
+ export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ interface MainToolbarWrapperProps {
7
+ showKeyline: boolean;
8
+ twoLineEditorToolbar: boolean;
9
+ children: React.ReactNode;
10
+ 'data-testid'?: string;
11
+ }
12
+ /**
13
+ * Wrapper component for the main toolbar that handles feature flag based styling
14
+ * @example
15
+ * <MainToolbarWrapper showKeyline={true} twoLineEditorToolbar={false}>
16
+ * <ToolbarContent />
17
+ * </MainToolbarWrapper>
18
+ */
19
+ export declare const MainToolbarWrapper: React.FC<MainToolbarWrapperProps>;
20
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ interface ChildWrapperProps {
7
+ twoLineEditorToolbar: boolean;
8
+ children: React.ReactNode;
9
+ role?: string;
10
+ 'aria-label'?: string;
11
+ 'data-testid'?: string;
12
+ }
13
+ export declare const MainToolbarForFirstChildWrapper: React.FC<ChildWrapperProps>;
14
+ export declare const MainToolbarForSecondChildWrapper: React.FC<ChildWrapperProps>;
15
+ export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ interface MainToolbarWrapperProps {
7
+ showKeyline: boolean;
8
+ twoLineEditorToolbar: boolean;
9
+ children: React.ReactNode;
10
+ 'data-testid'?: string;
11
+ }
12
+ /**
13
+ * Wrapper component for the main toolbar that handles feature flag based styling
14
+ * @example
15
+ * <MainToolbarWrapper showKeyline={true} twoLineEditorToolbar={false}>
16
+ * <ToolbarContent />
17
+ * </MainToolbarWrapper>
18
+ */
19
+ export declare const MainToolbarWrapper: React.FC<MainToolbarWrapperProps>;
20
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "208.3.5",
3
+ "version": "208.3.6",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -97,7 +97,7 @@
97
97
  "@atlaskit/editor-plugin-list": "^4.2.0",
98
98
  "@atlaskit/editor-plugin-paste": "^3.3.0",
99
99
  "@atlaskit/link-provider": "^3.3.0",
100
- "@atlaskit/logo": "^19.2.0",
100
+ "@atlaskit/logo": "^19.3.0",
101
101
  "@atlaskit/media-core": "^37.0.0",
102
102
  "@atlaskit/media-integration-test-helpers": "workspace:^",
103
103
  "@atlaskit/media-test-helpers": "^37.0.0",
@@ -105,7 +105,7 @@
105
105
  "@atlaskit/primitives": "^14.9.0",
106
106
  "@atlaskit/renderer": "^119.0.0",
107
107
  "@atlaskit/section-message": "^8.2.0",
108
- "@atlaskit/smart-card": "^38.14.0",
108
+ "@atlaskit/smart-card": "^38.15.0",
109
109
  "@atlaskit/synchrony-test-helpers": "workspace:^",
110
110
  "@atlaskit/toggle": "^15.0.0",
111
111
  "@atlaskit/util-data-test": "^18.0.0",
@@ -567,9 +567,6 @@
567
567
  "platform_editor_breakout_resizing_hello_release": {
568
568
  "type": "boolean"
569
569
  },
570
- "confluence_typography_refreshed": {
571
- "type": "boolean"
572
- },
573
570
  "atlas_editor_typography_refreshed": {
574
571
  "type": "boolean"
575
572
  },