@atlaskit/editor-core 219.9.4 → 219.9.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 (29) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -1
  3. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +9 -1
  4. package/dist/cjs/ui/ContextPanel/index-compiled.compiled.css +15 -0
  5. package/dist/cjs/ui/ContextPanel/index-compiled.js +66 -0
  6. package/dist/cjs/ui/ContextPanel/index-emotion.js +94 -0
  7. package/dist/cjs/ui/ContextPanel/index.js +29 -56
  8. package/dist/cjs/version-wrapper.js +1 -1
  9. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -1
  10. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +9 -1
  11. package/dist/es2019/ui/ContextPanel/index-compiled.compiled.css +15 -0
  12. package/dist/es2019/ui/ContextPanel/index-compiled.js +53 -0
  13. package/dist/es2019/ui/ContextPanel/index-emotion.js +82 -0
  14. package/dist/es2019/ui/ContextPanel/index.js +24 -58
  15. package/dist/es2019/version-wrapper.js +1 -1
  16. package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -1
  17. package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +9 -1
  18. package/dist/esm/ui/ContextPanel/index-compiled.compiled.css +15 -0
  19. package/dist/esm/ui/ContextPanel/index-compiled.js +58 -0
  20. package/dist/esm/ui/ContextPanel/index-emotion.js +87 -0
  21. package/dist/esm/ui/ContextPanel/index.js +28 -58
  22. package/dist/esm/version-wrapper.js +1 -1
  23. package/dist/types/ui/ContextPanel/index-compiled.d.ts +25 -0
  24. package/dist/types/ui/ContextPanel/index-emotion.d.ts +15 -0
  25. package/dist/types/ui/ContextPanel/index.d.ts +1 -9
  26. package/dist/types-ts4.5/ui/ContextPanel/index-compiled.d.ts +25 -0
  27. package/dist/types-ts4.5/ui/ContextPanel/index-emotion.d.ts +15 -0
  28. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +1 -9
  29. package/package.json +7 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 219.9.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41962dd9dccb2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/41962dd9dccb2) -
8
+ NO-ISSUE: adds a default toolbar state so we can render the toolbar on initial load without
9
+ relying on editor state
10
+ - Updated dependencies
11
+
12
+ ## 219.9.5
13
+
14
+ ### Patch Changes
15
+
16
+ - [`56bda2bb69c77`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/56bda2bb69c77) -
17
+ EDITOR-6461 - migrate contextpanel styles
18
+ - Updated dependencies
19
+
3
20
  ## 219.9.4
4
21
 
5
22
  ### Patch Changes
@@ -16,6 +16,7 @@ var _ui = require("@atlaskit/editor-common/ui");
16
16
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
17
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
18
18
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
19
20
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
20
21
  var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
21
22
  var _FullPageContentArea = require("./FullPageContentArea");
@@ -170,7 +171,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
170
171
  (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)(isToolbarAIFCEnabled)
171
172
  }
172
173
  }, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? (0, _react2.jsx)(_FullPageToolbarNext.FullPageToolbarNext, {
173
- disabled: !!props.disabled,
174
+ disabled: !!props.disabled || !hasHadInteraction && (0, _expValEquals.expValEquals)('platform_editor_default_toolbar_state', 'isEnabled', true),
174
175
  toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
175
176
  beforeIcon: props.primaryToolbarIconBefore,
176
177
  editorAPI: editorAPI,
@@ -141,7 +141,15 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
141
141
  showKeyline: showKeyline || ContextPanelWidth > 0
142
142
  }, beforeIcon && /*#__PURE__*/_react.default.createElement("div", {
143
143
  className: (0, _runtime.ax)([styles.mainToolbarIconBefore, styles.mainToolbarIconBeforeNew])
144
- }, beforeIcon), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(FirstChildWrapper, null, /*#__PURE__*/_react.default.createElement(_ExcludeFromHydration.default, null, primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && (0, _toolbar2.isToolbar)(toolbar) && editorView && !(0, _coreUtils.isSSR)() && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
144
+ }, beforeIcon), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(FirstChildWrapper, null, (0, _expValEquals.expValEquals)('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && (0, _toolbar2.isToolbar)(toolbar) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
145
+ toolbar: toolbar,
146
+ components: visibleToolbarComponents,
147
+ editorView: editorView,
148
+ editorAPI: editorAPI,
149
+ popupsMountPoint: mountPoint,
150
+ editorAppearance: "full-page",
151
+ isDisabled: disabled
152
+ }) : /*#__PURE__*/_react.default.createElement(_ExcludeFromHydration.default, null, primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && (0, _toolbar2.isToolbar)(toolbar) && editorView && !(0, _coreUtils.isSSR)() && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
145
153
  toolbar: toolbar,
146
154
  components: visibleToolbarComponents,
147
155
  editorView: editorView,
@@ -0,0 +1,15 @@
1
+
2
+ ._v5648l2w{transition:width .5s cubic-bezier(.15,1,.3,1)}
3
+ ._v564e1q5{transition:width .6s cubic-bezier(.15,1,.3,1)}
4
+ ._v564glyw{transition:none}._16qshh4h{box-shadow:inset 2px 0 0 0 var(--ds-border,#0b120e24)}
5
+ ._18m915vq{overflow-y:hidden}
6
+ ._18m91wug{overflow-y:auto}
7
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
8
+ ._1bsbidpf{width:0}
9
+ ._1bsbnklw{width:20pc}
10
+ ._1reo15vq{overflow-x:hidden}
11
+ ._4t3i1osq{height:100%}
12
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
13
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
14
+ ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
15
+ ._vchhusvi{box-sizing:border-box}
@@ -0,0 +1,66 @@
1
+ /* index-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.ContextPanelWrapperCompiled = exports.ContextPanelContentCompiled = void 0;
10
+ require("./index-compiled.compiled.css");
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _runtime = require("@compiled/react/runtime");
13
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
+ var _excluded = ["children", "customWidth", "visible", "disableAnimation"],
17
+ _excluded2 = ["children", "customWidth", "visible", "disableAnimation", "hasPadding"];
18
+ /**
19
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
20
+ * Used via `componentWithCondition` in `index.tsx`.
21
+ *
22
+ * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
23
+ */
24
+ 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); }
25
+ var ANIM_SPEED_MS = 500;
26
+ var panelStyles = {
27
+ panel: "_v5648l2w _1reo15vq _18m915vq _1bsbnklw _4t3i1osq _16qshh4h",
28
+ panelHidden: "_1bsbidpf",
29
+ disablePanelAnimation: "_v564glyw",
30
+ content: "_v564e1q5 _vchhusvi _1bsbnklw _4t3i1osq _18m91wug",
31
+ padding: "_ca0qpxbi _u5f3pxbi _n3tdze3t _19bvpxbi",
32
+ customWidthOverflow: "_1reo15vq"
33
+ };
34
+ var ContextPanelWrapperCompiled = exports.ContextPanelWrapperCompiled = function ContextPanelWrapperCompiled(_ref) {
35
+ var children = _ref.children,
36
+ customWidth = _ref.customWidth,
37
+ visible = _ref.visible,
38
+ disableAnimation = _ref.disableAnimation,
39
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
40
+ return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
41
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
42
+ style: customWidth && visible ? {
43
+ width: "".concat(customWidth, "px")
44
+ } : undefined
45
+ // eslint-disable-next-line react/jsx-props-no-spreading
46
+ }, rest, {
47
+ className: (0, _runtime.ax)([panelStyles.panel, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation])
48
+ }), children);
49
+ };
50
+ var ContextPanelContentCompiled = exports.ContextPanelContentCompiled = function ContextPanelContentCompiled(_ref2) {
51
+ var children = _ref2.children,
52
+ customWidth = _ref2.customWidth,
53
+ visible = _ref2.visible,
54
+ disableAnimation = _ref2.disableAnimation,
55
+ hasPadding = _ref2.hasPadding,
56
+ rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
57
+ return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
58
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
59
+ style: customWidth && visible ? {
60
+ width: "".concat(customWidth, "px")
61
+ } : undefined
62
+ // eslint-disable-next-line react/jsx-props-no-spreading
63
+ }, rest, {
64
+ className: (0, _runtime.ax)([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation])
65
+ }), children);
66
+ };
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.ContextPanelWrapperEmotion = exports.ContextPanelContentEmotion = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _react = require("react");
11
+ var _react2 = require("@emotion/react");
12
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
+ var _excluded = ["children", "customWidth", "visible", "disableAnimation"],
14
+ _excluded2 = ["children", "customWidth", "visible", "disableAnimation", "hasPadding"];
15
+ /**
16
+ * @jsxRuntime classic
17
+ * @jsx jsx
18
+ */
19
+ /**
20
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
21
+ * Used via `componentWithCondition` in `index.tsx`.
22
+ *
23
+ * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
24
+ */
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
26
+ var ANIM_SPEED_MS = 500;
27
+ var panelHidden = (0, _react2.css)({
28
+ width: 0
29
+ });
30
+ var panel = (0, _react2.css)({
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
+ width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
33
+ height: '100%',
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
35
+ transition: "width ".concat(ANIM_SPEED_MS, "ms ").concat(_editorSharedStyles.akEditorSwoopCubicBezier),
36
+ overflow: 'hidden',
37
+ boxShadow: "inset 2px 0 0 0 ".concat("var(--ds-border, #0B120E24)")
38
+ });
39
+ var disablePanelAnimation = (0, _react2.css)({
40
+ transition: 'none'
41
+ });
42
+ var content = (0, _react2.css)({
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
+ transition: "width 600ms ".concat(_editorSharedStyles.akEditorSwoopCubicBezier),
45
+ boxSizing: 'border-box',
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
47
+ width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
48
+ height: '100%',
49
+ overflowY: 'auto'
50
+ });
51
+ var paddingStyles = (0, _react2.css)({
52
+ padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px")
53
+ });
54
+ var ContextPanelWrapperEmotion = exports.ContextPanelWrapperEmotion = function ContextPanelWrapperEmotion(_ref) {
55
+ var children = _ref.children,
56
+ customWidth = _ref.customWidth,
57
+ visible = _ref.visible,
58
+ disableAnimation = _ref.disableAnimation,
59
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
60
+ var customPanelWidthStyles = (0, _react.useMemo)(function () {
61
+ return customWidth ? (0, _react2.css)({
62
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
63
+ width: "".concat(customWidth, "px"),
64
+ overflowX: 'hidden'
65
+ }) : undefined;
66
+ }, [customWidth]);
67
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
68
+ css: [panel,
69
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
70
+ customPanelWidthStyles, !visible && panelHidden, disableAnimation && disablePanelAnimation]
71
+ // eslint-disable-next-line react/jsx-props-no-spreading
72
+ }, rest), children);
73
+ };
74
+ var ContextPanelContentEmotion = exports.ContextPanelContentEmotion = function ContextPanelContentEmotion(_ref2) {
75
+ var children = _ref2.children,
76
+ customWidth = _ref2.customWidth,
77
+ visible = _ref2.visible,
78
+ disableAnimation = _ref2.disableAnimation,
79
+ hasPadding = _ref2.hasPadding,
80
+ rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
81
+ var customPanelWidthStyles = (0, _react.useMemo)(function () {
82
+ return customWidth ? (0, _react2.css)({
83
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
84
+ width: "".concat(customWidth, "px"),
85
+ overflowX: 'hidden'
86
+ }) : undefined;
87
+ }, [customWidth]);
88
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
89
+ css: [content, hasPadding && paddingStyles,
90
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
91
+ customPanelWidthStyles, !visible && panelHidden, disableAnimation && disablePanelAnimation]
92
+ // eslint-disable-next-line react/jsx-props-no-spreading
93
+ }, rest), children);
94
+ };
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.ContextPanel = ContextPanel;
8
- exports.panel = exports.content = exports.SwappableContentArea = void 0;
8
+ exports.SwappableContentArea = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -14,7 +14,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _react = _interopRequireDefault(require("react"));
17
- var _react2 = require("@emotion/react");
18
17
  var _reactIntl = require("react-intl");
19
18
  var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
20
19
  var _contextPanel = require("@atlaskit/editor-common/context-panel");
@@ -22,46 +21,21 @@ var _hooks = require("@atlaskit/editor-common/hooks");
22
21
  var _messages = require("@atlaskit/editor-common/messages");
23
22
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
24
23
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
25
25
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
26
+ var _indexCompiled = require("./index-compiled");
27
+ var _indexEmotion = require("./index-emotion");
26
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; }
27
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; }
28
30
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
29
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable jsdoc/require-jsdoc -- Pre-existing lint debt surfaced by this mechanical type-import-only PR. */ /**
30
- * @jsxRuntime classic
31
- * @jsx jsx
32
- */ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
31
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable jsdoc/require-jsdoc -- Pre-existing lint debt surfaced by this mechanical type-import-only PR. */
33
32
  var ANIM_SPEED_MS = 500;
34
- var panelHidden = (0, _react2.css)({
35
- width: 0
36
- });
37
-
38
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
39
- var panel = exports.panel = (0, _react2.css)({
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
41
- width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
42
- height: '100%',
43
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
- transition: "width ".concat(ANIM_SPEED_MS, "ms ").concat(_editorSharedStyles.akEditorSwoopCubicBezier),
45
- overflow: 'hidden',
46
- boxShadow: "inset 2px 0 0 0 ".concat("var(--ds-border, #0B120E24)")
47
- });
48
- var disablePanelAnimation = (0, _react2.css)({
49
- transition: 'none'
50
- });
51
-
52
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
53
- var content = exports.content = (0, _react2.css)({
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
- transition: "width 600ms ".concat(_editorSharedStyles.akEditorSwoopCubicBezier),
56
- boxSizing: 'border-box',
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
- width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
59
- height: '100%',
60
- overflowY: 'auto'
61
- });
62
- var paddingStyles = (0, _react2.css)({
63
- padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px")
64
- });
33
+ var ContextPanelWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
34
+ return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
35
+ }, _indexCompiled.ContextPanelWrapperCompiled, _indexEmotion.ContextPanelWrapperEmotion);
36
+ var ContextPanelContentMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
37
+ return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
38
+ }, _indexCompiled.ContextPanelContentCompiled, _indexEmotion.ContextPanelContentEmotion);
65
39
  // Ignored via go/ees005
66
40
  // eslint-disable-next-line @repo/internal/react/no-class-components
67
41
  var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
@@ -96,7 +70,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
96
70
  var onExited = (0, _expValEquals.expValEquals)('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? _this.handleTransitionExited : function () {
97
71
  return _this.unsetPluginContent();
98
72
  };
99
- return (0, _react2.jsx)(_Transition.default, {
73
+ return /*#__PURE__*/_react.default.createElement(_Transition.default, {
100
74
  timeout: _this.state.mounted ? animSpeedMs : 0,
101
75
  in: !!pluginContent,
102
76
  mountOnEnter: true,
@@ -110,7 +84,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
110
84
  return;
111
85
  }
112
86
  var animSpeedMs = (0, _platformFeatureFlags.fg)('platform_editor_disable_context_panel_animation') ? 0 : ANIM_SPEED_MS;
113
- return (0, _react2.jsx)(_Transition.default, {
87
+ return /*#__PURE__*/_react.default.createElement(_Transition.default, {
114
88
  timeout: _this.state.mounted ? animSpeedMs : 0,
115
89
  in: isVisible,
116
90
  mountOnEnter: true,
@@ -145,34 +119,33 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
145
119
  var userVisible = !!this.props.visible;
146
120
  var visible = userVisible || !!this.state.currentPluginContent;
147
121
  var hasPadding = this.props.hasPadding === undefined ? true : this.props.hasPadding;
148
- var customPanelWidthStyles = (0, _react2.css)({
149
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
150
- width: "".concat(this.props.customWidth, "px"),
151
- overflowX: 'hidden'
152
- });
153
- return (0, _react2.jsx)(_contextPanel.ContextPanelConsumer, null, function (_ref) {
122
+ var disableAnimation = (0, _platformFeatureFlags.fg)('platform_editor_disable_context_panel_animation');
123
+ return /*#__PURE__*/_react.default.createElement(_contextPanel.ContextPanelConsumer, null, function (_ref) {
154
124
  var _this2$props$intl, _this2$props$intl2;
155
125
  var broadcastWidth = _ref.broadcastWidth;
156
126
  var contextPanelWidth = visible ? width : 0;
157
127
  broadcastWidth(contextPanelWidth);
158
- return (0, _react2.jsx)("div", {
159
- css: [panel,
160
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
161
- _this2.props.customWidth && customPanelWidthStyles, !visible && panelHidden, (0, _platformFeatureFlags.fg)('platform_editor_disable_context_panel_animation') && disablePanelAnimation],
162
- "data-testid": "context-panel-panel",
128
+ return /*#__PURE__*/_react.default.createElement(ContextPanelWrapperMigration, {
129
+ customWidth: _this2.props.customWidth,
130
+ visible: visible,
131
+ disableAnimation: disableAnimation,
132
+ "data-testid": "context-panel-panel"
133
+ // eslint-disable-next-line @atlassian/a11y/no-empty-aria-label -- Pre-existing; intl should always resolve a label here
134
+ ,
163
135
  "aria-label": ((_this2$props$intl = _this2.props.intl) === null || _this2$props$intl === void 0 ? void 0 : _this2$props$intl.formatMessage(_messages.contextPanelMessages.panelLabel)) || '',
164
136
  "aria-modal": "false",
165
137
  role: "dialog"
166
- }, (0, _react2.jsx)("div", {
138
+ }, /*#__PURE__*/_react.default.createElement(ContextPanelContentMigration, {
139
+ customWidth: _this2.props.customWidth,
140
+ visible: visible,
141
+ disableAnimation: disableAnimation,
142
+ hasPadding: hasPadding,
167
143
  "data-testid": "context-panel-content"
168
144
  // Adding tabIndex=0 here to make content focusable as it is a scrollable region
169
145
  ,
170
146
  tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_nov_a11y_fixes') ? 0 : undefined,
171
147
  role: (0, _platformFeatureFlags.fg)('platform_editor_nov_a11y_fixes') ? 'region' : undefined,
172
- "aria-label": (0, _platformFeatureFlags.fg)('platform_editor_nov_a11y_fixes') ? (_this2$props$intl2 = _this2.props.intl) === null || _this2$props$intl2 === void 0 ? void 0 : _this2$props$intl2.formatMessage(_messages.contextPanelMessages.panelContentLabel) : undefined,
173
- css: [content, hasPadding && paddingStyles,
174
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
175
- _this2.props.customWidth && customPanelWidthStyles, !visible && panelHidden, (0, _platformFeatureFlags.fg)('platform_editor_disable_context_panel_animation') && disablePanelAnimation]
148
+ "aria-label": (0, _platformFeatureFlags.fg)('platform_editor_nov_a11y_fixes') ? (_this2$props$intl2 = _this2.props.intl) === null || _this2$props$intl2 === void 0 ? void 0 : _this2$props$intl2.formatMessage(_messages.contextPanelMessages.panelContentLabel) : undefined
176
149
  }, _this2.showPluginContent() || _this2.showProvidedContent(userVisible)));
177
150
  });
178
151
  }
@@ -195,7 +168,7 @@ function ContextPanel(props) {
195
168
  return states === null || states === void 0 || (_states$contextPanelS = states.contextPanelState) === null || _states$contextPanelS === void 0 ? void 0 : _states$contextPanelS.contents;
196
169
  });
197
170
  var firstContent = contextPanelContents && contextPanelContents.find(Boolean);
198
- return (0, _react2.jsx)(SwappableContentArea
171
+ return /*#__PURE__*/_react.default.createElement(SwappableContentArea
199
172
  // Ignored via go/ees005
200
173
  // eslint-disable-next-line react/jsx-props-no-spreading
201
174
  , (0, _extends2.default)({}, props, {
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "219.9.3";
8
+ var version = exports.version = "219.9.5";
@@ -13,6 +13,7 @@ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
13
13
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
14
14
  import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
15
15
  import { fg } from '@atlaskit/platform-feature-flags';
16
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
17
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
17
18
  import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
18
19
  import { FullPageContentArea } from './FullPageContentArea';
@@ -155,7 +156,7 @@ export const FullPageEditor = props => {
155
156
  FULL_PAGE_EDITOR_TOOLBAR_HEIGHT(isToolbarAIFCEnabled)
156
157
  }
157
158
  }, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? jsx(FullPageToolbarNext, {
158
- disabled: !!props.disabled,
159
+ disabled: !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
159
160
  toolbarDockingPosition: (_toolbarDockingPositi = toolbarDockingPosition) !== null && _toolbarDockingPositi !== void 0 ? _toolbarDockingPositi : toolbarDocking,
160
161
  beforeIcon: props.primaryToolbarIconBefore,
161
162
  editorAPI: editorAPI,
@@ -131,7 +131,15 @@ export const FullPageToolbarNext = ({
131
131
  showKeyline: showKeyline || ContextPanelWidth > 0
132
132
  }, beforeIcon && /*#__PURE__*/React.createElement("div", {
133
133
  className: ax([styles.mainToolbarIconBefore, styles.mainToolbarIconBeforeNew])
134
- }, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, /*#__PURE__*/React.createElement(ExcludeFromHydration, null, primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && editorView && !isSSR() && /*#__PURE__*/React.createElement(ToolbarNext, {
134
+ }, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
135
+ toolbar: toolbar,
136
+ components: visibleToolbarComponents,
137
+ editorView: editorView,
138
+ editorAPI: editorAPI,
139
+ popupsMountPoint: mountPoint,
140
+ editorAppearance: "full-page",
141
+ isDisabled: disabled
142
+ }) : /*#__PURE__*/React.createElement(ExcludeFromHydration, null, primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && editorView && !isSSR() && /*#__PURE__*/React.createElement(ToolbarNext, {
135
143
  toolbar: toolbar,
136
144
  components: visibleToolbarComponents,
137
145
  editorView: editorView,
@@ -0,0 +1,15 @@
1
+
2
+ ._v5648l2w{transition:width .5s cubic-bezier(.15,1,.3,1)}
3
+ ._v564e1q5{transition:width .6s cubic-bezier(.15,1,.3,1)}
4
+ ._v564glyw{transition:none}._16qshh4h{box-shadow:inset 2px 0 0 0 var(--ds-border,#0b120e24)}
5
+ ._18m915vq{overflow-y:hidden}
6
+ ._18m91wug{overflow-y:auto}
7
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
8
+ ._1bsbidpf{width:0}
9
+ ._1bsbnklw{width:20pc}
10
+ ._1reo15vq{overflow-x:hidden}
11
+ ._4t3i1osq{height:100%}
12
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
13
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
14
+ ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
15
+ ._vchhusvi{box-sizing:border-box}
@@ -0,0 +1,53 @@
1
+ /* index-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import "./index-compiled.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ /**
7
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
8
+ * Used via `componentWithCondition` in `index.tsx`.
9
+ *
10
+ * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
11
+ */
12
+
13
+ import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
14
+ const ANIM_SPEED_MS = 500;
15
+ const panelStyles = {
16
+ panel: "_v5648l2w _1reo15vq _18m915vq _1bsbnklw _4t3i1osq _16qshh4h",
17
+ panelHidden: "_1bsbidpf",
18
+ disablePanelAnimation: "_v564glyw",
19
+ content: "_v564e1q5 _vchhusvi _1bsbnklw _4t3i1osq _18m91wug",
20
+ padding: "_ca0qpxbi _u5f3pxbi _n3tdze3t _19bvpxbi",
21
+ customWidthOverflow: "_1reo15vq"
22
+ };
23
+ export const ContextPanelWrapperCompiled = ({
24
+ children,
25
+ customWidth,
26
+ visible,
27
+ disableAnimation,
28
+ ...rest
29
+ }) => /*#__PURE__*/React.createElement("div", _extends({
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
31
+ style: customWidth && visible ? {
32
+ width: `${customWidth}px`
33
+ } : undefined
34
+ // eslint-disable-next-line react/jsx-props-no-spreading
35
+ }, rest, {
36
+ className: ax([panelStyles.panel, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation])
37
+ }), children);
38
+ export const ContextPanelContentCompiled = ({
39
+ children,
40
+ customWidth,
41
+ visible,
42
+ disableAnimation,
43
+ hasPadding,
44
+ ...rest
45
+ }) => /*#__PURE__*/React.createElement("div", _extends({
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
47
+ style: customWidth && visible ? {
48
+ width: `${customWidth}px`
49
+ } : undefined
50
+ // eslint-disable-next-line react/jsx-props-no-spreading
51
+ }, rest, {
52
+ className: ax([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation])
53
+ }), children);
@@ -0,0 +1,82 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
6
+ /**
7
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
8
+ * Used via `componentWithCondition` in `index.tsx`.
9
+ *
10
+ * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
11
+ */
12
+ import { useMemo } from 'react';
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
14
+ import { css, jsx } from '@emotion/react';
15
+ import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
16
+ const ANIM_SPEED_MS = 500;
17
+ const panelHidden = css({
18
+ width: 0
19
+ });
20
+ const panel = css({
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
+ width: `${akEditorContextPanelWidth}px`,
23
+ height: '100%',
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
+ transition: `width ${ANIM_SPEED_MS}ms ${akEditorSwoopCubicBezier}`,
26
+ overflow: 'hidden',
27
+ boxShadow: `inset 2px 0 0 0 ${"var(--ds-border, #0B120E24)"}`
28
+ });
29
+ const disablePanelAnimation = css({
30
+ transition: 'none'
31
+ });
32
+ const content = css({
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
34
+ transition: `width 600ms ${akEditorSwoopCubicBezier}`,
35
+ boxSizing: 'border-box',
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
+ width: `${akEditorContextPanelWidth}px`,
38
+ height: '100%',
39
+ overflowY: 'auto'
40
+ });
41
+ const paddingStyles = css({
42
+ padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"} 0px`
43
+ });
44
+ export const ContextPanelWrapperEmotion = ({
45
+ children,
46
+ customWidth,
47
+ visible,
48
+ disableAnimation,
49
+ ...rest
50
+ }) => {
51
+ const customPanelWidthStyles = useMemo(() => customWidth ? css({
52
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
53
+ width: `${customWidth}px`,
54
+ overflowX: 'hidden'
55
+ }) : undefined, [customWidth]);
56
+ return jsx("div", _extends({
57
+ css: [panel,
58
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
59
+ customPanelWidthStyles, !visible && panelHidden, disableAnimation && disablePanelAnimation]
60
+ // eslint-disable-next-line react/jsx-props-no-spreading
61
+ }, rest), children);
62
+ };
63
+ export const ContextPanelContentEmotion = ({
64
+ children,
65
+ customWidth,
66
+ visible,
67
+ disableAnimation,
68
+ hasPadding,
69
+ ...rest
70
+ }) => {
71
+ const customPanelWidthStyles = useMemo(() => customWidth ? css({
72
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
73
+ width: `${customWidth}px`,
74
+ overflowX: 'hidden'
75
+ }) : undefined, [customWidth]);
76
+ return jsx("div", _extends({
77
+ css: [content, hasPadding && paddingStyles,
78
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
79
+ customPanelWidthStyles, !visible && panelHidden, disableAnimation && disablePanelAnimation]
80
+ // eslint-disable-next-line react/jsx-props-no-spreading
81
+ }, rest), children);
82
+ };