@atlaskit/editor-core 219.9.13 → 219.9.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
  3. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.js +29 -0
  4. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-emotion.js +34 -0
  5. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +7 -20
  6. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
  7. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +56 -0
  8. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +88 -0
  9. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper.js +10 -73
  10. package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
  11. package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.js +32 -0
  12. package/dist/cjs/ui/Appearance/FullPage/FullPage-emotion.js +38 -0
  13. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +20 -20
  14. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
  15. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
  16. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-compiled.js +45 -0
  17. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar-emotion.js +58 -0
  18. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +21 -26
  19. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +6 -3
  20. package/dist/cjs/ui/Toolbar/Toolbar.js +3 -1
  21. package/dist/cjs/version-wrapper.js +1 -1
  22. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
  23. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.js +19 -0
  24. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-emotion.js +25 -0
  25. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +5 -17
  26. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
  27. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +46 -0
  28. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +78 -0
  29. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper.js +6 -69
  30. package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
  31. package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.js +23 -0
  32. package/dist/es2019/ui/Appearance/FullPage/FullPage-emotion.js +29 -0
  33. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +18 -19
  34. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
  35. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
  36. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-compiled.js +34 -0
  37. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar-emotion.js +48 -0
  38. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +16 -27
  39. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +6 -3
  40. package/dist/es2019/ui/Toolbar/Toolbar.js +3 -1
  41. package/dist/es2019/version-wrapper.js +1 -1
  42. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.compiled.css +4 -0
  43. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.js +21 -0
  44. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-emotion.js +27 -0
  45. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +7 -19
  46. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.compiled.css +4 -0
  47. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +48 -0
  48. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +80 -0
  49. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper.js +10 -71
  50. package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.compiled.css +5 -0
  51. package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.js +24 -0
  52. package/dist/esm/ui/Appearance/FullPage/FullPage-emotion.js +31 -0
  53. package/dist/esm/ui/Appearance/FullPage/FullPage.js +20 -19
  54. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
  55. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-compiled.compiled.css +10 -0
  56. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-compiled.js +37 -0
  57. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar-emotion.js +50 -0
  58. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +22 -27
  59. package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +6 -3
  60. package/dist/esm/ui/Toolbar/Toolbar.js +3 -1
  61. package/dist/esm/version-wrapper.js +1 -1
  62. package/dist/types/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +16 -0
  63. package/dist/types/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +16 -0
  64. package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +3 -8
  65. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +3 -0
  66. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +14 -0
  67. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +4 -10
  68. package/dist/types/ui/Appearance/FullPage/FullPage-compiled.d.ts +7 -0
  69. package/dist/types/ui/Appearance/FullPage/FullPage-emotion.d.ts +7 -0
  70. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +2 -2
  71. package/dist/types/ui/Appearance/FullPage/FullPageToolbar-compiled.d.ts +20 -0
  72. package/dist/types/ui/Appearance/FullPage/FullPageToolbar-emotion.d.ts +20 -0
  73. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -6
  74. package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +2 -1
  75. package/dist/types/ui/Toolbar/Toolbar.d.ts +2 -2
  76. package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +16 -0
  77. package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +16 -0
  78. package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper.d.ts +3 -8
  79. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +3 -0
  80. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +14 -0
  81. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +4 -10
  82. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage-compiled.d.ts +7 -0
  83. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage-emotion.d.ts +7 -0
  84. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +2 -2
  85. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar-compiled.d.ts +20 -0
  86. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar-emotion.d.ts +20 -0
  87. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -6
  88. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +2 -1
  89. package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +2 -2
  90. package/package.json +9 -9
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.NonCustomToolbarWrapperEmotion = exports.MainToolbarIconBeforeEmotion = exports.CustomToolbarWrapperEmotion = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _react = require("@emotion/react");
10
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
+ /**
12
+ * @jsxRuntime classic
13
+ * @jsx jsx
14
+ */
15
+ /**
16
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
17
+ * Used via `componentWithCondition` in `FullPageToolbar.tsx`.
18
+ *
19
+ * Cleanup: delete this file once the experiment has shipped.
20
+ */
21
+
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback; jsx required at runtime for @jsxRuntime classic
23
+
24
+ var nonCustomToolbarWrapperStyle = (0, _react.css)({
25
+ alignItems: 'center',
26
+ display: 'flex',
27
+ flexGrow: 1
28
+ });
29
+ var mainToolbarIconBeforeStyle = (0, _react.css)((0, _defineProperty2.default)({
30
+ margin: "var(--ds-space-200, 16px)",
31
+ height: "var(--ds-space-400, 32px)",
32
+ width: "var(--ds-space-400, 32px)"
33
+ }, "@media (max-width: ".concat(_editorSharedStyles.akEditorMobileMaxWidth, "px)"), {
34
+ gridColumn: 1,
35
+ gridRow: 1
36
+ }));
37
+ var customToolbarWrapperStyle = (0, _react.css)({
38
+ alignItems: 'center',
39
+ display: 'flex'
40
+ });
41
+ var NonCustomToolbarWrapperEmotion = exports.NonCustomToolbarWrapperEmotion = function NonCustomToolbarWrapperEmotion(_ref) {
42
+ var children = _ref.children;
43
+ return (0, _react.jsx)("div", {
44
+ css: nonCustomToolbarWrapperStyle
45
+ }, children);
46
+ };
47
+ var MainToolbarIconBeforeEmotion = exports.MainToolbarIconBeforeEmotion = function MainToolbarIconBeforeEmotion(_ref2) {
48
+ var children = _ref2.children;
49
+ return (0, _react.jsx)("div", {
50
+ css: mainToolbarIconBeforeStyle
51
+ }, children);
52
+ };
53
+ var CustomToolbarWrapperEmotion = exports.CustomToolbarWrapperEmotion = function CustomToolbarWrapperEmotion(_ref3) {
54
+ var children = _ref3.children;
55
+ return (0, _react.jsx)("div", {
56
+ css: customToolbarWrapperStyle
57
+ }, children);
58
+ };
@@ -8,26 +8,31 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.FullPageToolbar = exports.EditorToolbar = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _react2 = require("@emotion/react");
12
11
  var _reactIntl = require("react-intl");
13
12
  var _contextPanel = require("@atlaskit/editor-common/context-panel");
14
13
  var _messages = require("@atlaskit/editor-common/messages");
15
14
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
15
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
16
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
17
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
18
  var _ToolbarPortal = require("../../Toolbar/ToolbarPortal");
18
19
  var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
19
20
  var _BeforeWrapper = require("./BeforeWrapper");
20
21
  var _CustomToolbarWrapper = require("./CustomToolbarWrapper");
22
+ var _FullPageToolbarCompiled = require("./FullPageToolbar-compiled");
23
+ var _FullPageToolbarEmotion = require("./FullPageToolbar-emotion");
21
24
  var _MainToolbar = require("./MainToolbar");
22
25
  var _MainToolbarWrapper = require("./MainToolbarWrapper");
23
26
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
24
- /**
25
- * @jsxRuntime classic
26
- * @jsx jsx
27
- */
28
-
29
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
30
-
27
+ var NonCustomToolbarWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
28
+ return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
29
+ }, _FullPageToolbarCompiled.NonCustomToolbarWrapperCompiled, _FullPageToolbarEmotion.NonCustomToolbarWrapperEmotion);
30
+ var MainToolbarIconBeforeMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
31
+ return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
32
+ }, _FullPageToolbarCompiled.MainToolbarIconBeforeCompiled, _FullPageToolbarEmotion.MainToolbarIconBeforeEmotion);
33
+ var CustomToolbarWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
34
+ return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
35
+ }, _FullPageToolbarCompiled.CustomToolbarWrapperCompiled, _FullPageToolbarEmotion.CustomToolbarWrapperEmotion);
31
36
  var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
32
37
  var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
33
38
  var _useState = (0, _react.useState)(false),
@@ -47,13 +52,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
47
52
  ToolbarPortal = _ref.Portal;
48
53
  var hasToolbarPortal = ToolbarPortal !== _react.default.Fragment;
49
54
  var popupsMountPoint = hasToolbarPortal ? undefined : props.popupsMountPoint;
50
- var nonCustomToolbar =
51
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
52
- (0, _react2.jsx)("div", {
53
- css: _MainToolbar.nonCustomToolbarWrapperStyle
54
- }, props.beforeIcon && (0, _react2.jsx)("div", {
55
- css: _MainToolbar.mainToolbarIconBeforeStyle
56
- }, props.beforeIcon), (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector, {
55
+ var nonCustomToolbar = /*#__PURE__*/_react.default.createElement(NonCustomToolbarWrapperMigration, null, props.beforeIcon && /*#__PURE__*/_react.default.createElement(MainToolbarIconBeforeMigration, null, props.beforeIcon), /*#__PURE__*/_react.default.createElement(_ToolbarWithSizeDetector.ToolbarWithSizeDetector, {
57
56
  editorView: props.editorView,
58
57
  editorActions: props.editorActions,
59
58
  eventDispatcher: props.eventDispatcher,
@@ -69,11 +68,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
69
68
  hasMinWidth: props.hasMinWidth,
70
69
  twoLineEditorToolbar: twoLineEditorToolbar
71
70
  }));
72
- var customToolbar =
73
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
74
- (0, _react2.jsx)("div", {
75
- css: _MainToolbar.customToolbarWrapperStyle
76
- }, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
71
+ var customToolbar = /*#__PURE__*/_react.default.createElement(CustomToolbarWrapperMigration, null, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/_react.default.createElement(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
77
72
  beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
78
73
  }) : null, !(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.registerToolbarButton({
79
74
  popupsBoundariesElement: props.popupsBoundariesElement,
@@ -112,28 +107,28 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
112
107
  event.preventDefault();
113
108
  event.stopPropagation();
114
109
  }, [props.editorView]);
115
- return (0, _react2.jsx)(_contextPanel.ContextPanelConsumer, null, function (_ref2) {
110
+ return /*#__PURE__*/_react.default.createElement(_contextPanel.ContextPanelConsumer, null, function (_ref2) {
116
111
  var contextPanelWidth = _ref2.width;
117
- return (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
112
+ return /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarArrowKeyNavigationProvider, {
118
113
  editorView: props.editorView,
119
114
  childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
120
115
  isShortcutToFocusToolbar: isShortcutToFocusToolbar,
121
116
  handleEscape: handleEscape,
122
117
  intl: props.intl
123
- }, (0, _react2.jsx)(ToolbarPortal, null, (0, _react2.jsx)(_MainToolbarWrapper.MainToolbarWrapper, {
118
+ }, /*#__PURE__*/_react.default.createElement(ToolbarPortal, null, /*#__PURE__*/_react.default.createElement(_MainToolbarWrapper.MainToolbarWrapper, {
124
119
  showKeyline: props.showKeyline || contextPanelWidth > 0,
125
120
  twoLineEditorToolbar: twoLineEditorToolbar,
126
121
  "data-testid": "ak-editor-main-toolbar"
127
- }, (0, _react2.jsx)(_CustomToolbarWrapper.MainToolbarForFirstChildWrapper, {
122
+ }, /*#__PURE__*/_react.default.createElement(_CustomToolbarWrapper.MainToolbarForFirstChildWrapper, {
128
123
  twoLineEditorToolbar: twoLineEditorToolbar,
129
124
  role: "toolbar",
130
125
  "aria-label": props.intl.formatMessage(_messages.fullPageMessages.toolbarLabel)
131
- }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), (0, _react2.jsx)(_CustomToolbarWrapper.MainToolbarForSecondChildWrapper, {
126
+ }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), /*#__PURE__*/_react.default.createElement(_CustomToolbarWrapper.MainToolbarForSecondChildWrapper, {
132
127
  twoLineEditorToolbar: twoLineEditorToolbar,
133
128
  "data-testid": "avatar-group-outside-plugin",
134
129
  role: "region",
135
130
  "aria-label": props.intl.formatMessage(_messages.fullPageMessages.pageActionsLabel)
136
- }, shouldSplitToolbar ? nonCustomToolbar : customToolbar), (0, _react2.jsx)(_ToolbarPortal.ToolbarPortalMountPoint, null))));
131
+ }, shouldSplitToolbar ? nonCustomToolbar : customToolbar), /*#__PURE__*/_react.default.createElement(_ToolbarPortal.ToolbarPortalMountPoint, null))));
137
132
  });
138
133
  });
139
134
 
@@ -80,7 +80,8 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
80
80
  popupsMountPoint = _ref4.popupsMountPoint,
81
81
  showKeyline = _ref4.showKeyline,
82
82
  customPrimaryToolbarComponents = _ref4.customPrimaryToolbarComponents,
83
- disabled = _ref4.disabled;
83
+ disabled = _ref4.disabled,
84
+ disabledWithoutInteractionLogic = _ref4.disabledWithoutInteractionLogic;
84
85
  var components = editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
85
86
  var runtimeOverride = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['toolbar'], function (states) {
86
87
  var _states$toolbarState;
@@ -148,7 +149,8 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
148
149
  editorAPI: editorAPI,
149
150
  popupsMountPoint: mountPoint,
150
151
  editorAppearance: "full-page",
151
- isDisabled: disabled
152
+ isDisabled: disabled,
153
+ disabledWithoutInteractionLogic: disabledWithoutInteractionLogic
152
154
  }) : /*#__PURE__*/_react.default.createElement(_ExcludeFromHydration.default, null, primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && (0, _toolbar2.isToolbar)(toolbar) && editorView && !(0, _coreUtils.isSSR)() && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
153
155
  toolbar: toolbar,
154
156
  components: visibleToolbarComponents,
@@ -156,7 +158,8 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
156
158
  editorAPI: editorAPI,
157
159
  popupsMountPoint: mountPoint,
158
160
  editorAppearance: "full-page",
159
- isDisabled: disabled
161
+ isDisabled: disabled,
162
+ disabledWithoutInteractionLogic: disabledWithoutInteractionLogic
160
163
  }))), /*#__PURE__*/_react.default.createElement(SecondChildWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
161
164
  className: (0, _runtime.ax)([styles.customToolbarWrapperStyle])
162
165
  }, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/_react.default.createElement("div", {
@@ -70,7 +70,8 @@ var ToolbarNext = exports.ToolbarNext = function ToolbarNext(_ref) {
70
70
  editorAppearance = _ref.editorAppearance,
71
71
  popupsBoundariesElement = _ref.popupsBoundariesElement,
72
72
  popupsScrollableElement = _ref.popupsScrollableElement,
73
- isDisabled = _ref.isDisabled;
73
+ isDisabled = _ref.isDisabled,
74
+ disabledWithoutInteractionLogic = _ref.disabledWithoutInteractionLogic;
74
75
  var _usePluginState = usePluginState(editorAPI),
75
76
  connectivityStateMode = _usePluginState.connectivityStateMode,
76
77
  editorViewMode = _usePluginState.editorViewMode,
@@ -98,6 +99,7 @@ var ToolbarNext = exports.ToolbarNext = function ToolbarNext(_ref) {
98
99
  }, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarUIProvider, {
99
100
  api: editorAPI,
100
101
  isDisabled: isDisabled,
102
+ disabledWithoutInteractionLogic: disabledWithoutInteractionLogic,
101
103
  popupsMountPoint: popupsMountPoint,
102
104
  popupsBoundariesElement: popupsBoundariesElement,
103
105
  popupsScrollableElement: popupsScrollableElement,
@@ -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.12";
8
+ var version = exports.version = "219.9.14";
@@ -0,0 +1,4 @@
1
+ ._16jlkb7n{flex-grow:1}
2
+ ._1bahesu3{justify-content:flex-end}
3
+ ._1e0c1txw{display:flex}
4
+ ._4cvr1h6o{align-items:center}
@@ -0,0 +1,19 @@
1
+ /* BeforeWrapper-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ /**
3
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
4
+ * Used via `componentWithCondition` in `BeforeWrapper.tsx`.
5
+ *
6
+ * Cleanup: delete this file once the experiment has shipped.
7
+ */
8
+ import "./BeforeWrapper-compiled.compiled.css";
9
+ import * as React from 'react';
10
+ import { ax, ix } from "@compiled/react/runtime";
11
+ const styles = {
12
+ beforePrimaryToolbarPluginWrapper: "_1e0c1txw _16jlkb7n _1bahesu3 _4cvr1h6o"
13
+ };
14
+ // Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
15
+ // only in `FullPageToolbar` to decouple the plugin from the main toolbar
16
+ export const BeforePrimaryToolbarWrapperCompiled = props => /*#__PURE__*/React.createElement("div", {
17
+ "data-testid": 'before-primary-toolbar-components-plugin',
18
+ className: ax([styles.beforePrimaryToolbarPluginWrapper])
19
+ }, props.beforePrimaryToolbarComponents);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ /**
6
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
7
+ * Used via `componentWithCondition` in `BeforeWrapper.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback; jsx required at runtime for @jsxRuntime classic
13
+ import { css, jsx } from '@emotion/react';
14
+ const beforePrimaryToolbarPluginWrapperStyles = css({
15
+ display: 'flex',
16
+ flexGrow: 1,
17
+ justifyContent: 'flex-end',
18
+ alignItems: 'center'
19
+ });
20
+ // Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
21
+ // only in `FullPageToolbar` to decouple the plugin from the main toolbar
22
+ export const BeforePrimaryToolbarWrapperEmotion = props => jsx("div", {
23
+ css: beforePrimaryToolbarPluginWrapperStyles,
24
+ "data-testid": 'before-primary-toolbar-components-plugin'
25
+ }, props.beforePrimaryToolbarComponents);
@@ -1,19 +1,7 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
-
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
7
- import { css, jsx } from '@emotion/react';
8
- const beforePrimaryToolbarPluginWrapperStyles = css({
9
- display: 'flex',
10
- flexGrow: 1,
11
- justifyContent: 'flex-end',
12
- alignItems: 'center'
13
- });
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { BeforePrimaryToolbarWrapperCompiled } from './BeforeWrapper-compiled';
4
+ import { BeforePrimaryToolbarWrapperEmotion } from './BeforeWrapper-emotion';
14
5
  // Duplicate of the wrapper from `editor-plugins/before-primary-toolbar` used
15
6
  // only in `FullPageToolbar` to decouple the plugin from the main toolbar
16
- export const BeforePrimaryToolbarWrapper = props => jsx("div", {
17
- css: beforePrimaryToolbarPluginWrapperStyles,
18
- "data-testid": 'before-primary-toolbar-components-plugin'
19
- }, props.beforePrimaryToolbarComponents);
7
+ export const BeforePrimaryToolbarWrapper = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), BeforePrimaryToolbarWrapperCompiled, BeforePrimaryToolbarWrapperEmotion);
@@ -0,0 +1,4 @@
1
+ ._16jlkb7n{flex-grow:1}
2
+ ._1e0c1txw{display:flex}
3
+ ._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
4
+ @media (max-width:868px){._u89dkb7n{flex-grow:1}._9gudkb7n{flex-shrink:1}._1hoh1osq{flex-basis:100%}._1tjb1wug{margin-top:auto}._1rg31wug{margin-right:auto}._1jzq1wug{margin-bottom:auto}._cn5x1wug{margin-left:auto}._87t41txw{display:flex}._8o3817qo{height:var(--ak-editor-fullpage-toolbar-height)}._1s2pidpf{min-width:0}._lhl4esu3{justify-content:flex-end}._1s2p1ns9{min-width:-moz-fit-content;min-width:fit-content}}
@@ -0,0 +1,46 @@
1
+ /* CustomToolbarWrapper-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ /**
3
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
4
+ * Used via `componentWithCondition` in `CustomToolbarWrapper.tsx`.
5
+ *
6
+ * Cleanup: delete this file once the experiment has shipped.
7
+ */
8
+ import "./CustomToolbarWrapper-compiled.compiled.css";
9
+ import * as React from 'react';
10
+ import { ax, ix } from "@compiled/react/runtime";
11
+ const firstChildStyles = {
12
+ base: "_1e0c1txw _16jlkb7n",
13
+ twoLine: "_u89dkb7n _9gudkb7n _1hoh1osq _8o3817qo _lhl4esu3 _1s2p1ns9"
14
+ };
15
+ const secondChildStyles = {
16
+ base: "_1ul91ns9",
17
+ twoLine: "_u89dkb7n _9gudkb7n _1hoh1osq _1tjb1wug _1rg31wug _1jzq1wug _cn5x1wug _87t41txw _8o3817qo _1s2pidpf"
18
+ };
19
+
20
+ // ---------------- First child wrapper ----------------
21
+ export const MainToolbarForFirstChildWrapperCompiled = ({
22
+ twoLineEditorToolbar,
23
+ children,
24
+ role,
25
+ 'aria-label': ariaLabel,
26
+ 'data-testid': testId
27
+ }) => /*#__PURE__*/React.createElement("div", {
28
+ role: role,
29
+ "aria-label": ariaLabel,
30
+ "data-testid": testId,
31
+ className: ax([firstChildStyles.base, twoLineEditorToolbar && firstChildStyles.twoLine])
32
+ }, children);
33
+
34
+ // ---------------- Second child wrapper ----------------
35
+ export const MainToolbarForSecondChildWrapperCompiled = ({
36
+ twoLineEditorToolbar,
37
+ children,
38
+ role,
39
+ 'aria-label': ariaLabel,
40
+ 'data-testid': testId
41
+ }) => /*#__PURE__*/React.createElement("div", {
42
+ role: role,
43
+ "aria-label": ariaLabel,
44
+ "data-testid": testId,
45
+ className: ax([secondChildStyles.base, twoLineEditorToolbar && secondChildStyles.twoLine])
46
+ }, children);
@@ -0,0 +1,78 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ /**
6
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
7
+ * Used via `componentWithCondition` in `CustomToolbarWrapper.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import React from 'react';
12
+
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback; jsx required at runtime for @jsxRuntime classic
14
+ import { css, jsx } from '@emotion/react';
15
+ // Pre-computed static styles for first- and second-child wrappers.
16
+ // These contain no runtime logic and are safe for static-emotion mode.
17
+
18
+ const firstChildStaticBase = css({
19
+ display: 'flex',
20
+ flexGrow: 1
21
+ });
22
+
23
+ // we can't avoid some kind of function call here, so we need to disable the rule
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
+ const firstChildStaticTwoLine = css({
26
+ '@media (max-width: 868px)': {
27
+ flex: '1 1 100%',
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
29
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
30
+ justifyContent: 'flex-end',
31
+ minWidth: 'fit-content'
32
+ }
33
+ });
34
+ const secondChildStaticBase = css({
35
+ minWidth: 'fit-content'
36
+ });
37
+
38
+ // we can't avoid some kind of function call here, so we need to disable the rule
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
40
+ const secondChildStaticTwoLine = css({
41
+ '@media (max-width: 868px)': {
42
+ display: 'flex',
43
+ flexGrow: 1,
44
+ flex: '1 1 100%',
45
+ margin: 'auto',
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
47
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
48
+ minWidth: 0
49
+ }
50
+ });
51
+
52
+ // ---------------- First child wrapper ----------------
53
+ export const MainToolbarForFirstChildWrapperEmotion = ({
54
+ twoLineEditorToolbar,
55
+ children,
56
+ role,
57
+ 'aria-label': ariaLabel,
58
+ 'data-testid': testId
59
+ }) => jsx("div", {
60
+ css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
61
+ role: role,
62
+ "aria-label": ariaLabel,
63
+ "data-testid": testId
64
+ }, children);
65
+
66
+ // ---------------- Second child wrapper ----------------
67
+ export const MainToolbarForSecondChildWrapperEmotion = ({
68
+ twoLineEditorToolbar,
69
+ children,
70
+ role,
71
+ 'aria-label': ariaLabel,
72
+ 'data-testid': testId
73
+ }) => jsx("div", {
74
+ css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
75
+ role: role,
76
+ "aria-label": ariaLabel,
77
+ "data-testid": testId
78
+ }, children);
@@ -1,72 +1,9 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
8
- import { css, jsx } from '@emotion/react';
9
- // Pre-computed static styles for first- and second-child wrappers.
10
- // These contain no runtime logic and are safe for static-emotion mode.
11
-
12
- const firstChildStaticBase = css({
13
- display: 'flex',
14
- flexGrow: 1
15
- });
16
-
17
- // we can't avoid some kind of function call here, so we need to disable the rule
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
19
- const firstChildStaticTwoLine = css({
20
- '@media (max-width: 868px)': {
21
- flex: '1 1 100%',
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
23
- height: 'var(--ak-editor-fullpage-toolbar-height)',
24
- justifyContent: 'flex-end',
25
- minWidth: 'fit-content'
26
- }
27
- });
28
- const secondChildStaticBase = css({
29
- minWidth: 'fit-content'
30
- });
31
-
32
- // we can't avoid some kind of function call here, so we need to disable the rule
33
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
34
- const secondChildStaticTwoLine = css({
35
- '@media (max-width: 868px)': {
36
- display: 'flex',
37
- flexGrow: 1,
38
- flex: '1 1 100%',
39
- margin: 'auto',
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
41
- height: 'var(--ak-editor-fullpage-toolbar-height)',
42
- minWidth: 0
43
- }
44
- });
45
-
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { MainToolbarForFirstChildWrapperCompiled, MainToolbarForSecondChildWrapperCompiled } from './CustomToolbarWrapper-compiled';
4
+ import { MainToolbarForFirstChildWrapperEmotion, MainToolbarForSecondChildWrapperEmotion } from './CustomToolbarWrapper-emotion';
46
5
  // ---------------- First child wrapper ----------------
47
- export const MainToolbarForFirstChildWrapper = ({
48
- twoLineEditorToolbar,
49
- children,
50
- role,
51
- 'aria-label': ariaLabel,
52
- 'data-testid': testId
53
- }) => jsx("div", {
54
- css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
55
- role: role,
56
- "aria-label": ariaLabel,
57
- "data-testid": testId
58
- }, children);
6
+ export const MainToolbarForFirstChildWrapper = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), MainToolbarForFirstChildWrapperCompiled, MainToolbarForFirstChildWrapperEmotion);
59
7
 
60
8
  // ---------------- Second child wrapper ----------------
61
- export const MainToolbarForSecondChildWrapper = ({
62
- twoLineEditorToolbar,
63
- children,
64
- role,
65
- 'aria-label': ariaLabel,
66
- 'data-testid': testId
67
- }) => jsx("div", {
68
- css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
69
- role: role,
70
- "aria-label": ariaLabel,
71
- "data-testid": testId
72
- }, children);
9
+ export const MainToolbarForSecondChildWrapper = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), MainToolbarForSecondChildWrapperCompiled, MainToolbarForSecondChildWrapperEmotion);
@@ -0,0 +1,5 @@
1
+ ._1e0c1txw{display:flex}
2
+ ._1ul95x59{min-width:340px}
3
+ ._2lx21bp4{flex-direction:column}
4
+ ._4t3i1osq{height:100%}
5
+ ._vchhusvi{box-sizing:border-box}
@@ -0,0 +1,23 @@
1
+ /* FullPage-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ /**
3
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
4
+ * Used via `componentWithCondition` in `FullPage.tsx`.
5
+ *
6
+ * Cleanup: delete this file once the experiment has shipped.
7
+ */
8
+ import "./FullPage-compiled.compiled.css";
9
+ import * as React from 'react';
10
+ import { ax, ix } from "@compiled/react/runtime";
11
+ import { forwardRef } from 'react';
12
+ const styles = {
13
+ root: "_1ul95x59 _4t3i1osq _1e0c1txw _2lx21bp4 _vchhusvi"
14
+ };
15
+ export const FullPageEditorWrapperCompiled = /*#__PURE__*/forwardRef(({
16
+ children,
17
+ className,
18
+ style
19
+ }, ref) => /*#__PURE__*/React.createElement("div", {
20
+ ref: ref,
21
+ className: ax([styles.root, className]),
22
+ style: style
23
+ }, children));
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ /**
6
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
7
+ * Used via `componentWithCondition` in `FullPage.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import { forwardRef } from 'react';
12
+
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback; jsx required at runtime for @jsxRuntime classic
14
+ import { jsx } from '@emotion/react';
15
+
16
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- intentional: emotion fallback branch imports from StyledComponents
17
+ import { fullPageEditorWrapper as fullPageEditorWrapperStyles } from './StyledComponents';
18
+ export const FullPageEditorWrapperEmotion = /*#__PURE__*/forwardRef(({
19
+ children,
20
+ className,
21
+ style
22
+ }, ref) =>
23
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-classname-prop -- intentional: emotion fallback branch reuses StyledComponents style
24
+ jsx("div", {
25
+ css: fullPageEditorWrapperStyles,
26
+ ref: ref,
27
+ className: className,
28
+ style: style
29
+ }, children));