@atlaskit/editor-core 219.9.15 → 219.9.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/composable-editor/core-editor.js +7 -10
- package/dist/cjs/composable-editor/editor-internal-compiled.compiled.css +3 -0
- package/dist/cjs/composable-editor/editor-internal-compiled.js +27 -0
- package/dist/cjs/composable-editor/editor-internal-emotion.js +31 -0
- package/dist/cjs/composable-editor/editor-internal.js +17 -20
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -15
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar-compiled.js +46 -0
- package/dist/cjs/ui/Appearance/FullPage/{FullPageToolbar-emotion.js → MainToolbar-emotion.js} +25 -24
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +14 -68
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-compiled.compiled.css +14 -0
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +35 -0
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +70 -0
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper.js +7 -61
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +6 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/styles/layout.js +5 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/core-editor.js +4 -11
- package/dist/es2019/composable-editor/editor-internal-compiled.compiled.css +3 -0
- package/dist/es2019/composable-editor/editor-internal-compiled.js +18 -0
- package/dist/es2019/composable-editor/editor-internal-emotion.js +23 -0
- package/dist/es2019/composable-editor/editor-internal.js +12 -21
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +1 -8
- package/dist/es2019/ui/Appearance/FullPage/{FullPageToolbar-compiled.js → MainToolbar-compiled.js} +19 -16
- package/dist/es2019/ui/Appearance/FullPage/{FullPageToolbar-emotion.js → MainToolbar-emotion.js} +20 -19
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +7 -70
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-compiled.compiled.css +14 -0
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +30 -0
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +65 -0
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper.js +5 -63
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +6 -0
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/layout.js +5 -7
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/core-editor.js +4 -11
- package/dist/esm/composable-editor/editor-internal-compiled.compiled.css +3 -0
- package/dist/esm/composable-editor/editor-internal-compiled.js +19 -0
- package/dist/esm/composable-editor/editor-internal-emotion.js +24 -0
- package/dist/esm/composable-editor/editor-internal.js +14 -21
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -14
- package/dist/esm/ui/Appearance/FullPage/{FullPageToolbar-compiled.js → MainToolbar-compiled.js} +19 -16
- package/dist/esm/ui/Appearance/FullPage/{FullPageToolbar-emotion.js → MainToolbar-emotion.js} +21 -20
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +13 -65
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-compiled.compiled.css +14 -0
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +29 -0
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +62 -0
- package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper.js +7 -60
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +6 -0
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/layout.js +5 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/core-editor.d.ts +2 -2
- package/dist/types/composable-editor/editor-internal-compiled.d.ts +14 -0
- package/dist/types/composable-editor/editor-internal-emotion.d.ts +14 -0
- package/dist/types/composable-editor/editor-internal.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/{FullPageToolbar-compiled.d.ts → MainToolbar-compiled.d.ts} +10 -9
- package/dist/{types-ts4.5/ui/Appearance/FullPage/FullPageToolbar-emotion.d.ts → types/ui/Appearance/FullPage/MainToolbar-emotion.d.ts} +10 -9
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +10 -6
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper-compiled.d.ts +19 -0
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper-emotion.d.ts +19 -0
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +3 -14
- package/dist/types-ts4.5/composable-editor/core-editor.d.ts +2 -2
- package/dist/types-ts4.5/composable-editor/editor-internal-compiled.d.ts +14 -0
- package/dist/types-ts4.5/composable-editor/editor-internal-emotion.d.ts +14 -0
- package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/{FullPageToolbar-compiled.d.ts → MainToolbar-compiled.d.ts} +10 -9
- package/dist/{types/ui/Appearance/FullPage/FullPageToolbar-emotion.d.ts → types-ts4.5/ui/Appearance/FullPage/MainToolbar-emotion.d.ts} +10 -9
- package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbar.d.ts +10 -6
- package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarWrapper-compiled.d.ts +19 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarWrapper-emotion.d.ts +19 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +3 -14
- package/package.json +3 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-compiled.js +0 -45
- /package/dist/cjs/ui/Appearance/FullPage/{FullPageToolbar-compiled.compiled.css → MainToolbar-compiled.compiled.css} +0 -0
- /package/dist/es2019/ui/Appearance/FullPage/{FullPageToolbar-compiled.compiled.css → MainToolbar-compiled.compiled.css} +0 -0
- /package/dist/esm/ui/Appearance/FullPage/{FullPageToolbar-compiled.compiled.css → MainToolbar-compiled.compiled.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 219.9.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`906fe47a3e48f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/906fe47a3e48f) -
|
|
8
|
+
Migrates MainToolbar and MainToolbarWrapper to compiled CSS
|
|
9
|
+
- [`6d50881d7019e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6d50881d7019e) -
|
|
10
|
+
Migrate composable editor styles
|
|
11
|
+
|
|
12
|
+
## 219.9.16
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`3b52ed6492f99`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b52ed6492f99) -
|
|
17
|
+
Fix layout column blank-space focus for vertical alignment
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 219.9.15
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -9,8 +10,7 @@ exports.default = void 0;
|
|
|
9
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
11
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
var _react = require("react");
|
|
13
|
-
var _react2 = require("@emotion/react");
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
15
15
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
16
16
|
var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
|
|
@@ -30,12 +30,9 @@ var _useMeasureEditorMountTime = _interopRequireDefault(require("./hooks/useMeas
|
|
|
30
30
|
var _useMemoEditorProps = _interopRequireDefault(require("./hooks/useMemoEditorProps"));
|
|
31
31
|
var _useProviderFactory = _interopRequireDefault(require("./hooks/useProviderFactory"));
|
|
32
32
|
var _sendDurationAnalytics = _interopRequireDefault(require("./utils/sendDurationAnalytics"));
|
|
33
|
+
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); }
|
|
33
34
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35
|
-
* @jsxRuntime classic
|
|
36
|
-
* @jsx jsx
|
|
37
|
-
*/ // 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
|
|
38
|
-
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
35
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
39
36
|
// Ignored via go/ees005
|
|
40
37
|
// eslint-disable-next-line import/no-named-as-default
|
|
41
38
|
/**
|
|
@@ -96,7 +93,7 @@ function Editor(passedProps) {
|
|
|
96
93
|
}
|
|
97
94
|
}, [onSaveFromProps]);
|
|
98
95
|
var isFullPageAppearance = Boolean(props.appearance && ['full-page', 'full-width'].concat((0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_synced_block', true) ? ['max'] : [])).includes(props.appearance));
|
|
99
|
-
return
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, isFullPageAppearance ? /*#__PURE__*/_react.default.createElement(_editorInpMetrics.EditorINPMetrics, null) : null, /*#__PURE__*/_react.default.createElement(_editorInternal.EditorInternal, {
|
|
100
97
|
props: props,
|
|
101
98
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
102
99
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -135,11 +132,11 @@ function CoreEditor(props) {
|
|
|
135
132
|
};
|
|
136
133
|
}, [props.appearance]);
|
|
137
134
|
var memodEditorFeatureFlags = useMemoEditorFeatureFlags(props.featureFlags);
|
|
138
|
-
return
|
|
135
|
+
return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricEditorAnalyticsContext
|
|
139
136
|
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
140
137
|
, {
|
|
141
138
|
data: data
|
|
142
|
-
},
|
|
139
|
+
}, /*#__PURE__*/_react.default.createElement(Editor
|
|
143
140
|
// Ignored via go/ees005
|
|
144
141
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
145
142
|
, (0, _extends2.default)({}, props, {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* editor-internal-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 `editor-internal.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
+
*/
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
exports.EditorInternalContainerCompiled = void 0;
|
|
15
|
+
require("./editor-internal-compiled.compiled.css");
|
|
16
|
+
var React = _interopRequireWildcard(require("react"));
|
|
17
|
+
var _runtime = require("@compiled/react/runtime");
|
|
18
|
+
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); }
|
|
19
|
+
var editorContainerCompiledStyles = {
|
|
20
|
+
root: "_kqswh2mm _1bsb1osq _4t3i1osq"
|
|
21
|
+
};
|
|
22
|
+
var EditorInternalContainerCompiled = exports.EditorInternalContainerCompiled = function EditorInternalContainerCompiled(_ref) {
|
|
23
|
+
var children = _ref.children;
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: (0, _runtime.ax)([editorContainerCompiledStyles.root])
|
|
26
|
+
}, children);
|
|
27
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EditorInternalContainerEmotion = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
/**
|
|
9
|
+
* @jsxRuntime classic
|
|
10
|
+
* @jsx jsx
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
14
|
+
* Used via `componentWithCondition` in `editor-internal.tsx`.
|
|
15
|
+
*
|
|
16
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
20
|
+
|
|
21
|
+
var editorContainerEmotionStyles = (0, _react.css)({
|
|
22
|
+
position: 'relative',
|
|
23
|
+
width: '100%',
|
|
24
|
+
height: '100%'
|
|
25
|
+
});
|
|
26
|
+
var EditorInternalContainerEmotion = exports.EditorInternalContainerEmotion = function EditorInternalContainerEmotion(_ref) {
|
|
27
|
+
var children = _ref.children;
|
|
28
|
+
return (0, _react.jsx)("div", {
|
|
29
|
+
css: editorContainerEmotionStyles
|
|
30
|
+
}, children);
|
|
31
|
+
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.EditorInternal = void 0;
|
|
8
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _react = require("react");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
13
13
|
var _portal = require("@atlaskit/editor-common/portal");
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
15
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _ErrorBoundary = _interopRequireDefault(require("../create-editor/ErrorBoundary"));
|
|
17
18
|
var _ReactEditorView = _interopRequireDefault(require("../create-editor/ReactEditorView"));
|
|
@@ -20,17 +21,15 @@ var _IntlProviderIfMissingWrapper = require("../ui/IntlProviderIfMissingWrapper/
|
|
|
20
21
|
var _featureFlagsFromProps = require("../utils/feature-flags-from-props");
|
|
21
22
|
var _RenderTracking = require("../utils/performance/components/RenderTracking");
|
|
22
23
|
var _BaseThemeWrapper = require("./BaseThemeWrapper");
|
|
24
|
+
var _editorInternalCompiled = require("./editor-internal-compiled");
|
|
25
|
+
var _editorInternalEmotion = require("./editor-internal-emotion");
|
|
23
26
|
var _getBaseFontSize = require("./utils/getBaseFontSize");
|
|
27
|
+
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
28
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var editorContainerStyles = (0, _react2.css)({
|
|
30
|
-
position: 'relative',
|
|
31
|
-
width: '100%',
|
|
32
|
-
height: '100%'
|
|
33
|
-
});
|
|
29
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
|
+
var EditorInternalContainerMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
31
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
32
|
+
}, _editorInternalCompiled.EditorInternalContainerCompiled, _editorInternalEmotion.EditorInternalContainerEmotion);
|
|
34
33
|
var DEFAULT_VALUE_PROP_TO_IGNORE = ['defaultValue'];
|
|
35
34
|
|
|
36
35
|
/**
|
|
@@ -68,23 +67,21 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
68
67
|
nodeViewPortalProviderAPI = _usePortalProvider4[0],
|
|
69
68
|
NodeViewPortalRenderer = _usePortalProvider4[1];
|
|
70
69
|
var propsToIgnore = (0, _expValEquals.expValEquals)('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? DEFAULT_VALUE_PROP_TO_IGNORE : ['defaultValue'];
|
|
71
|
-
return
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, renderTrackingEnabled && /*#__PURE__*/_react.default.createElement(_RenderTracking.RenderTracking, {
|
|
72
71
|
componentProps: props,
|
|
73
72
|
action: _analytics.ACTION.RE_RENDERED,
|
|
74
73
|
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
75
74
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
76
75
|
propsToIgnore: propsToIgnore,
|
|
77
76
|
useShallow: useShallow
|
|
78
|
-
}),
|
|
77
|
+
}), /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, {
|
|
79
78
|
errorTracking: true,
|
|
80
79
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
81
80
|
contextIdentifierProvider: props.contextIdentifierProvider,
|
|
82
81
|
featureFlags: featureFlags
|
|
83
|
-
}, (
|
|
84
|
-
css: editorContainerStyles
|
|
85
|
-
}, (0, _react2.jsx)(_EditorContext.default, {
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement(EditorInternalContainerMigration, null, /*#__PURE__*/_react.default.createElement(_EditorContext.default, {
|
|
86
83
|
editorActions: editorActions
|
|
87
|
-
},
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_IntlProviderIfMissingWrapper.IntlProviderIfMissingWrapper, null, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_ReactEditorView.default, {
|
|
88
85
|
editorProps: overriddenEditorProps,
|
|
89
86
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
90
87
|
portalProviderAPI: portalProviderAPI,
|
|
@@ -105,9 +102,9 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
105
102
|
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
106
103
|
editorRef = _ref2.editorRef,
|
|
107
104
|
editorAPI = _ref2.editorAPI;
|
|
108
|
-
return
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(_BaseThemeWrapper.BaseThemeWrapper, {
|
|
109
106
|
baseFontSize: (0, _getBaseFontSize.getBaseFontSize)(props.appearance, props.contentMode)
|
|
110
|
-
},
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(AppearanceComponent, {
|
|
111
108
|
innerRef: editorRef,
|
|
112
109
|
editorAPI: editorAPI
|
|
113
110
|
// Ignored via go/ees005
|
|
@@ -148,5 +145,5 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
148
145
|
preset: preset
|
|
149
146
|
}));
|
|
150
147
|
}
|
|
151
|
-
}),
|
|
148
|
+
}), /*#__PURE__*/_react.default.createElement(PortalRenderer, null), /*#__PURE__*/_react.default.createElement(NodeViewPortalRenderer, null)))))));
|
|
152
149
|
});
|
|
@@ -12,27 +12,14 @@ var _reactIntl = require("react-intl");
|
|
|
12
12
|
var _contextPanel = require("@atlaskit/editor-common/context-panel");
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
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");
|
|
17
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
16
|
var _ToolbarPortal = require("../../Toolbar/ToolbarPortal");
|
|
19
17
|
var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
|
|
20
18
|
var _BeforeWrapper = require("./BeforeWrapper");
|
|
21
19
|
var _CustomToolbarWrapper = require("./CustomToolbarWrapper");
|
|
22
|
-
var _FullPageToolbarCompiled = require("./FullPageToolbar-compiled");
|
|
23
|
-
var _FullPageToolbarEmotion = require("./FullPageToolbar-emotion");
|
|
24
20
|
var _MainToolbar = require("./MainToolbar");
|
|
25
21
|
var _MainToolbarWrapper = require("./MainToolbarWrapper");
|
|
26
22
|
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); }
|
|
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);
|
|
36
23
|
var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
37
24
|
var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
|
|
38
25
|
var _useState = (0, _react.useState)(false),
|
|
@@ -52,7 +39,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
52
39
|
ToolbarPortal = _ref.Portal;
|
|
53
40
|
var hasToolbarPortal = ToolbarPortal !== _react.default.Fragment;
|
|
54
41
|
var popupsMountPoint = hasToolbarPortal ? undefined : props.popupsMountPoint;
|
|
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, {
|
|
42
|
+
var nonCustomToolbar = /*#__PURE__*/_react.default.createElement(_MainToolbar.NonCustomToolbarWrapperMigration, null, props.beforeIcon && /*#__PURE__*/_react.default.createElement(_MainToolbar.MainToolbarIconBeforeMigration, null, props.beforeIcon), /*#__PURE__*/_react.default.createElement(_ToolbarWithSizeDetector.ToolbarWithSizeDetector, {
|
|
56
43
|
editorView: props.editorView,
|
|
57
44
|
editorActions: props.editorActions,
|
|
58
45
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -68,7 +55,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
68
55
|
hasMinWidth: props.hasMinWidth,
|
|
69
56
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
70
57
|
}));
|
|
71
|
-
var customToolbar = /*#__PURE__*/_react.default.createElement(CustomToolbarWrapperMigration, null, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/_react.default.createElement(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
|
|
58
|
+
var customToolbar = /*#__PURE__*/_react.default.createElement(_MainToolbar.CustomToolbarWrapperMigration, null, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/_react.default.createElement(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
|
|
72
59
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
73
60
|
}) : 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({
|
|
74
61
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* MainToolbar-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 `MainToolbar.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
+
*/
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
exports.NonCustomToolbarWrapperCompiled = exports.MainToolbarIconBeforeCompiled = exports.CustomToolbarWrapperCompiled = void 0;
|
|
15
|
+
require("./MainToolbar-compiled.compiled.css");
|
|
16
|
+
var _runtime = require("@compiled/react/runtime");
|
|
17
|
+
var _react = _interopRequireDefault(require("react"));
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
19
|
+
|
|
20
|
+
var nonCustomToolbarWrapperCompiledStyles = {
|
|
21
|
+
root: "_4cvr1h6o _1e0c1txw _16jlkb7n"
|
|
22
|
+
};
|
|
23
|
+
var NonCustomToolbarWrapperCompiled = exports.NonCustomToolbarWrapperCompiled = function NonCustomToolbarWrapperCompiled(_ref) {
|
|
24
|
+
var children = _ref.children;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: (0, _runtime.ax)([nonCustomToolbarWrapperCompiledStyles.root])
|
|
27
|
+
}, children);
|
|
28
|
+
};
|
|
29
|
+
var customToolbarWrapperCompiledStyles = {
|
|
30
|
+
root: "_4cvr1h6o _1e0c1txw"
|
|
31
|
+
};
|
|
32
|
+
var CustomToolbarWrapperCompiled = exports.CustomToolbarWrapperCompiled = function CustomToolbarWrapperCompiled(_ref2) {
|
|
33
|
+
var children = _ref2.children;
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
35
|
+
className: (0, _runtime.ax)([customToolbarWrapperCompiledStyles.root])
|
|
36
|
+
}, children);
|
|
37
|
+
};
|
|
38
|
+
var mainToolbarIconBeforeCompiledStyles = {
|
|
39
|
+
root: "_19pkpxbi _2hwxpxbi _otyrpxbi _18u0pxbi _4t3ixy5q _1bsbxy5q _mlgzkb7n _tuuhkb7n"
|
|
40
|
+
};
|
|
41
|
+
var MainToolbarIconBeforeCompiled = exports.MainToolbarIconBeforeCompiled = function MainToolbarIconBeforeCompiled(_ref3) {
|
|
42
|
+
var children = _ref3.children;
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
className: (0, _runtime.ax)([mainToolbarIconBeforeCompiledStyles.root])
|
|
45
|
+
}, children);
|
|
46
|
+
};
|
package/dist/cjs/ui/Appearance/FullPage/{FullPageToolbar-emotion.js → MainToolbar-emotion.js}
RENAMED
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.NonCustomToolbarWrapperEmotion = exports.MainToolbarIconBeforeEmotion = exports.CustomToolbarWrapperEmotion = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = require("
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _react2 = require("@emotion/react");
|
|
10
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
12
|
/**
|
|
12
13
|
* @jsxRuntime classic
|
|
@@ -14,45 +15,45 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
14
15
|
*/
|
|
15
16
|
/**
|
|
16
17
|
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
17
|
-
* Used via `componentWithCondition` in `
|
|
18
|
+
* Used via `componentWithCondition` in `MainToolbar.tsx`.
|
|
18
19
|
*
|
|
19
20
|
* Cleanup: delete this file once the experiment has shipped.
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
23
24
|
|
|
24
|
-
var
|
|
25
|
+
var nonCustomToolbarWrapperEmotionStyles = (0, _react2.css)({
|
|
25
26
|
alignItems: 'center',
|
|
26
27
|
display: 'flex',
|
|
27
28
|
flexGrow: 1
|
|
28
29
|
});
|
|
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
30
|
var NonCustomToolbarWrapperEmotion = exports.NonCustomToolbarWrapperEmotion = function NonCustomToolbarWrapperEmotion(_ref) {
|
|
42
31
|
var children = _ref.children;
|
|
43
|
-
return (0,
|
|
44
|
-
css:
|
|
32
|
+
return (0, _react2.jsx)("div", {
|
|
33
|
+
css: nonCustomToolbarWrapperEmotionStyles
|
|
45
34
|
}, children);
|
|
46
35
|
};
|
|
47
|
-
var
|
|
36
|
+
var customToolbarWrapperEmotionStyles = (0, _react2.css)({
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
display: 'flex'
|
|
39
|
+
});
|
|
40
|
+
var CustomToolbarWrapperEmotion = exports.CustomToolbarWrapperEmotion = function CustomToolbarWrapperEmotion(_ref2) {
|
|
48
41
|
var children = _ref2.children;
|
|
49
|
-
return (0,
|
|
50
|
-
css:
|
|
42
|
+
return (0, _react2.jsx)("div", {
|
|
43
|
+
css: customToolbarWrapperEmotionStyles
|
|
51
44
|
}, children);
|
|
52
45
|
};
|
|
53
|
-
var
|
|
46
|
+
var mainToolbarIconBeforeEmotionStyles = (0, _react2.css)((0, _defineProperty2.default)({
|
|
47
|
+
margin: "var(--ds-space-200, 16px)",
|
|
48
|
+
height: "var(--ds-space-400, 32px)",
|
|
49
|
+
width: "var(--ds-space-400, 32px)"
|
|
50
|
+
}, "@media (max-width: ".concat(_editorSharedStyles.akEditorMobileMaxWidth, "px)"), {
|
|
51
|
+
gridColumn: 1,
|
|
52
|
+
gridRow: 1
|
|
53
|
+
}));
|
|
54
|
+
var MainToolbarIconBeforeEmotion = exports.MainToolbarIconBeforeEmotion = function MainToolbarIconBeforeEmotion(_ref3) {
|
|
54
55
|
var children = _ref3.children;
|
|
55
|
-
return (0,
|
|
56
|
-
css:
|
|
56
|
+
return (0, _react2.jsx)("div", {
|
|
57
|
+
css: mainToolbarIconBeforeEmotionStyles
|
|
57
58
|
}, children);
|
|
58
59
|
};
|
|
@@ -1,74 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
exports.NonCustomToolbarWrapperMigration = exports.MainToolbarIconBeforeMigration = exports.MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = exports.CustomToolbarWrapperMigration = void 0;
|
|
7
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
8
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
9
|
+
var _MainToolbarCompiled = require("./MainToolbar-compiled");
|
|
10
|
+
var _MainToolbarEmotion = require("./MainToolbar-emotion");
|
|
13
11
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = exports.MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}));
|
|
24
|
-
var mainToolbarFirstChild = (0, _react.css)((0, _defineProperty2.default)({
|
|
25
|
-
display: 'flex',
|
|
26
|
-
flexGrow: 1
|
|
27
|
-
}, "@media (max-width: ".concat(_editorSharedStyles.akEditorMobileMaxWidth, "px)"), {
|
|
28
|
-
gridColumn: 1,
|
|
29
|
-
gridRow: 1
|
|
30
|
-
}));
|
|
31
|
-
var mainToolbarFirstChildTowLine = function mainToolbarFirstChildTowLine() {
|
|
32
|
-
var editorToolbarHeight = (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)();
|
|
33
|
-
return (0, _react.css)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
34
|
-
flex: '1 1 100%',
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
36
|
-
height: editorToolbarHeight,
|
|
37
|
-
justifyContent: 'flex-end',
|
|
38
|
-
minWidth: 'fit-content'
|
|
39
|
-
}));
|
|
40
|
-
};
|
|
41
|
-
var mainToolbarFirstChildStyle = exports.mainToolbarFirstChildStyle = function mainToolbarFirstChildStyle(twoLineEditorToolbar) {
|
|
42
|
-
return [mainToolbarFirstChild, twoLineEditorToolbar && mainToolbarFirstChildTowLine];
|
|
43
|
-
};
|
|
44
|
-
var mainToolbarSecondChild = (0, _react.css)({
|
|
45
|
-
minWidth: 'fit-content'
|
|
46
|
-
});
|
|
47
|
-
var mainToolbarSecondChildTwoLine = function mainToolbarSecondChildTwoLine() {
|
|
48
|
-
var editorToolbarHeight = (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)();
|
|
49
|
-
return (0, _react.css)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
50
|
-
display: 'flex',
|
|
51
|
-
flexGrow: 1,
|
|
52
|
-
flex: '1 1 100%',
|
|
53
|
-
margin: 'auto',
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
55
|
-
height: editorToolbarHeight,
|
|
56
|
-
minWidth: 0
|
|
57
|
-
}));
|
|
58
|
-
};
|
|
59
|
-
var mainToolbarSecondChildStyle = exports.mainToolbarSecondChildStyle = function mainToolbarSecondChildStyle(twoLineEditorToolbar) {
|
|
60
|
-
return [mainToolbarSecondChild, twoLineEditorToolbar && mainToolbarSecondChildTwoLine];
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
|
-
var nonCustomToolbarWrapperStyle = exports.nonCustomToolbarWrapperStyle = (0, _react.css)({
|
|
65
|
-
alignItems: 'center',
|
|
66
|
-
display: 'flex',
|
|
67
|
-
flexGrow: 1
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
71
|
-
var customToolbarWrapperStyle = exports.customToolbarWrapperStyle = (0, _react.css)({
|
|
72
|
-
alignItems: 'center',
|
|
73
|
-
display: 'flex'
|
|
74
|
-
});
|
|
12
|
+
var NonCustomToolbarWrapperMigration = exports.NonCustomToolbarWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
13
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
14
|
+
}, _MainToolbarCompiled.NonCustomToolbarWrapperCompiled, _MainToolbarEmotion.NonCustomToolbarWrapperEmotion);
|
|
15
|
+
var CustomToolbarWrapperMigration = exports.CustomToolbarWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
16
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
17
|
+
}, _MainToolbarCompiled.CustomToolbarWrapperCompiled, _MainToolbarEmotion.CustomToolbarWrapperEmotion);
|
|
18
|
+
var MainToolbarIconBeforeMigration = exports.MainToolbarIconBeforeMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
19
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
20
|
+
}, _MainToolbarCompiled.MainToolbarIconBeforeCompiled, _MainToolbarEmotion.MainToolbarIconBeforeEmotion);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
._v56419ab{transition:box-shadow .2s cubic-bezier(.15,1,.3,1)}
|
|
3
|
+
._n7zlia51{border-bottom:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}._16qs1nax{box-shadow:var(--ds-shadow-overflow,0 0 8px #1e1f2128,0 0 1px #1e1f211e)}
|
|
4
|
+
._16qsglyw{box-shadow:none}
|
|
5
|
+
._1e0c1txw{display:flex}
|
|
6
|
+
._1krdgrf3 object{height:0!important}
|
|
7
|
+
._1o9zidpf{flex-shrink:0}
|
|
8
|
+
._1pby16oo{z-index:510}
|
|
9
|
+
._3pwj1osq span svg{max-width:100%}
|
|
10
|
+
._4cvr1h6o{align-items:center}
|
|
11
|
+
._4t3i17qo{height:var(--ak-editor-fullpage-toolbar-height)}
|
|
12
|
+
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
13
|
+
._kqswh2mm{position:relative}
|
|
14
|
+
@media (max-width:868px){._1s5v1g80{flex-wrap:wrap}._8o38zpre{height:calc(var(--ak-editor-fullpage-toolbar-height)*2)}}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* MainToolbarWrapper-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 `MainToolbarWrapper.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
7
|
+
*/
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
exports.MainToolbarWrapperCompiled = void 0;
|
|
15
|
+
require("./MainToolbarWrapper-compiled.compiled.css");
|
|
16
|
+
var _runtime = require("@compiled/react/runtime");
|
|
17
|
+
var _react = _interopRequireDefault(require("react"));
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
19
|
+
|
|
20
|
+
var styles = {
|
|
21
|
+
base: "_v56419ab _n7zlia51 _kqswh2mm _4cvr1h6o _16qsglyw _1pby16oo _1e0c1txw _4t3i17qo _1o9zidpf _bfhkvuon _1krdgrf3",
|
|
22
|
+
flexibleIconSize: "_3pwj1osq",
|
|
23
|
+
keyline: "_16qs1nax",
|
|
24
|
+
twoLine: "_1s5v1g80 _8o38zpre"
|
|
25
|
+
};
|
|
26
|
+
var MainToolbarWrapperCompiled = exports.MainToolbarWrapperCompiled = function MainToolbarWrapperCompiled(_ref) {
|
|
27
|
+
var showKeyline = _ref.showKeyline,
|
|
28
|
+
twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
29
|
+
children = _ref.children,
|
|
30
|
+
testId = _ref['data-testid'];
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
"data-testid": testId,
|
|
33
|
+
className: (0, _runtime.ax)([styles.base, styles.flexibleIconSize, showKeyline && styles.keyline, twoLineEditorToolbar && styles.twoLine])
|
|
34
|
+
}, children);
|
|
35
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.MainToolbarWrapperEmotion = 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 _MainToolbar = require("./MainToolbar");
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
* @jsx jsx
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
19
|
+
* Used via `componentWithCondition` in `MainToolbarWrapper.tsx`.
|
|
20
|
+
*
|
|
21
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
|
|
25
|
+
|
|
26
|
+
var baseToolbarStyles = (0, _react2.css)({
|
|
27
|
+
position: 'relative',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
boxShadow: 'none',
|
|
30
|
+
borderBottom: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
+
transition: "box-shadow 200ms ".concat(_editorSharedStyles.akEditorSwoopCubicBezier),
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
34
|
+
zIndex: _editorSharedStyles.akEditorFloatingDialogZIndex,
|
|
35
|
+
display: 'flex',
|
|
36
|
+
height: 'var(--ak-editor-fullpage-toolbar-height)',
|
|
37
|
+
flexShrink: 0,
|
|
38
|
+
backgroundColor: "var(--ds-surface, #FFFFFF)",
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
40
|
+
'& object': {
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
42
|
+
height: '0 !important'
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
var flexibleIconSize = (0, _react2.css)({
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
47
|
+
'& span svg': {
|
|
48
|
+
maxWidth: '100%'
|
|
49
|
+
}
|
|
50
|
+
});
|
|
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 #1E1F2128, 0px 0px 1px #1E1F211e)"
|
|
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 MainToolbarWrapperEmotion = exports.MainToolbarWrapperEmotion = function MainToolbarWrapperEmotion(_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 -- Ignored via go/DSP-18766
|
|
67
|
+
css: [baseToolbarStyles, flexibleIconSize, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle],
|
|
68
|
+
"data-testid": testId
|
|
69
|
+
}, children);
|
|
70
|
+
};
|