@atlaskit/editor-core 219.9.9 → 219.9.11

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 (33) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
  3. package/dist/cjs/ui/PluginSlot/index.js +70 -6
  4. package/dist/cjs/ui/WithFlash/index.js +8 -80
  5. package/dist/cjs/ui/WithFlash/withFlash-compiled.compiled.css +7 -0
  6. package/dist/cjs/ui/WithFlash/withFlash-compiled.js +58 -0
  7. package/dist/cjs/ui/WithFlash/withFlash-emotion.js +91 -0
  8. package/dist/cjs/version-wrapper.js +1 -1
  9. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
  10. package/dist/es2019/ui/PluginSlot/index.js +67 -2
  11. package/dist/es2019/ui/WithFlash/index.js +6 -69
  12. package/dist/es2019/ui/WithFlash/withFlash-compiled.compiled.css +7 -0
  13. package/dist/es2019/ui/WithFlash/withFlash-compiled.js +36 -0
  14. package/dist/es2019/ui/WithFlash/withFlash-emotion.js +75 -0
  15. package/dist/es2019/version-wrapper.js +1 -1
  16. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
  17. package/dist/esm/ui/PluginSlot/index.js +70 -6
  18. package/dist/esm/ui/WithFlash/index.js +8 -83
  19. package/dist/esm/ui/WithFlash/withFlash-compiled.compiled.css +7 -0
  20. package/dist/esm/ui/WithFlash/withFlash-compiled.js +52 -0
  21. package/dist/esm/ui/WithFlash/withFlash-emotion.js +88 -0
  22. package/dist/esm/version-wrapper.js +1 -1
  23. package/dist/types/types/markdown-mode.d.ts +1 -1
  24. package/dist/types/ui/Appearance/Chromeless-compiled.d.ts +1 -1
  25. package/dist/types/ui/WithFlash/index.d.ts +2 -9
  26. package/dist/types/ui/WithFlash/withFlash-compiled.d.ts +19 -0
  27. package/dist/types/ui/WithFlash/withFlash-emotion.d.ts +19 -0
  28. package/dist/types-ts4.5/types/markdown-mode.d.ts +1 -1
  29. package/dist/types-ts4.5/ui/Appearance/Chromeless-compiled.d.ts +1 -1
  30. package/dist/types-ts4.5/ui/WithFlash/index.d.ts +2 -9
  31. package/dist/types-ts4.5/ui/WithFlash/withFlash-compiled.d.ts +19 -0
  32. package/dist/types-ts4.5/ui/WithFlash/withFlash-emotion.d.ts +19 -0
  33. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 219.9.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a90f47c1c8fe8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a90f47c1c8fe8) -
8
+ Migrate ui/withFlash styles
9
+ - Updated dependencies
10
+
11
+ ## 219.9.10
12
+
13
+ ### Patch Changes
14
+
15
+ - [`96b390b511102`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/96b390b511102) -
16
+ Add the `platform_editor_per_plugin_error_boundary` experiment and use it to isolate editor
17
+ PluginSlot failures to the failing plugin.
18
+ - Updated dependencies
19
+
3
20
  ## 219.9.9
4
21
 
5
22
  ### Patch Changes
@@ -259,7 +259,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
259
259
  var _states$markdownModeS2;
260
260
  return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
261
261
  });
262
- var shouldHideProseMirrorForMarkdownMode = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'wysiwyg' && markdownPluginCurrentIsMarkdownMode;
262
+ var shouldHideProseMirrorForMarkdownMode = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
263
263
  return (0, _react2.jsx)("div", {
264
264
  css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
265
265
  "data-testid": CONTENT_AREA_TEST_ID,
@@ -17,8 +17,8 @@ var _PluginSlotEmotion = require("./PluginSlot-emotion");
17
17
  var PluginsComponentsWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
18
18
  return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
19
19
  }, _PluginSlotCompiled.PluginsComponentsWrapperCompiled, _PluginSlotEmotion.PluginsComponentsWrapperEmotion);
20
- var PluginSlot = function PluginSlot(_ref) {
21
- var items = _ref.items,
20
+ var PluginComponent = function PluginComponent(_ref) {
21
+ var component = _ref.component,
22
22
  editorView = _ref.editorView,
23
23
  editorActions = _ref.editorActions,
24
24
  eventDispatcher = _ref.eventDispatcher,
@@ -30,11 +30,43 @@ var PluginSlot = function PluginSlot(_ref) {
30
30
  containerElement = _ref.containerElement,
31
31
  disabled = _ref.disabled,
32
32
  dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
33
- wrapperElement = _ref.wrapperElement,
34
- pluginHooks = _ref.pluginHooks;
33
+ wrapperElement = _ref.wrapperElement;
34
+ return component({
35
+ editorView: editorView,
36
+ editorActions: editorActions,
37
+ eventDispatcher: eventDispatcher,
38
+ providerFactory: providerFactory,
39
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
40
+ // Ignored via go/ees005
41
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
42
+ appearance: appearance,
43
+ popupsMountPoint: popupsMountPoint,
44
+ popupsBoundariesElement: popupsBoundariesElement,
45
+ popupsScrollableElement: popupsScrollableElement,
46
+ containerElement: containerElement,
47
+ disabled: disabled,
48
+ wrapperElement: wrapperElement
49
+ });
50
+ };
51
+ var PluginSlot = function PluginSlot(_ref2) {
52
+ var items = _ref2.items,
53
+ editorView = _ref2.editorView,
54
+ editorActions = _ref2.editorActions,
55
+ eventDispatcher = _ref2.eventDispatcher,
56
+ providerFactory = _ref2.providerFactory,
57
+ appearance = _ref2.appearance,
58
+ popupsMountPoint = _ref2.popupsMountPoint,
59
+ popupsBoundariesElement = _ref2.popupsBoundariesElement,
60
+ popupsScrollableElement = _ref2.popupsScrollableElement,
61
+ containerElement = _ref2.containerElement,
62
+ disabled = _ref2.disabled,
63
+ dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
64
+ wrapperElement = _ref2.wrapperElement,
65
+ pluginHooks = _ref2.pluginHooks;
35
66
  if (!items && !pluginHooks) {
36
67
  return null;
37
68
  }
69
+ var isolatePluginSlotFailures = Boolean(items === null || items === void 0 ? void 0 : items.length) && (0, _expValEquals.expValEquals)('platform_editor_per_plugin_error_boundary', 'isEnabled', true);
38
70
  return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
39
71
  component: _analytics.ACTION_SUBJECT.PLUGIN_SLOT,
40
72
  fallbackComponent: null
@@ -44,9 +76,41 @@ var PluginSlot = function PluginSlot(_ref) {
44
76
  containerElement: containerElement
45
77
  }), /*#__PURE__*/_react.default.createElement(PluginsComponentsWrapperMigration, {
46
78
  "data-testid": "plugins-components-wrapper"
47
- }, items === null || items === void 0 ? void 0 : items.map(function (component, key) {
79
+ }, items === null || items === void 0 ? void 0 : items.map(function (component, index) {
80
+ if (isolatePluginSlotFailures) {
81
+ return (
82
+ /*#__PURE__*/
83
+ // The wrapper adds a small amount of overhead, but moves the plugin factory call
84
+ // inside the per-plugin boundary while still invoking it as a factory.
85
+ _react.default.createElement(_ErrorBoundary.ErrorBoundary
86
+ // Switching to a data-derived key currently breaks editor-plugin-ai's
87
+ // Discard flow (which relies on positional remounts to reset modal
88
+ // state). Tracked for follow-up behind a separate gate.
89
+ // eslint-disable-next-line react/no-array-index-key
90
+ , {
91
+ key: index,
92
+ component: _analytics.ACTION_SUBJECT.PLUGIN_SLOT,
93
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
94
+ fallbackComponent: null
95
+ }, /*#__PURE__*/_react.default.createElement(PluginComponent, {
96
+ component: component,
97
+ editorView: editorView,
98
+ editorActions: editorActions,
99
+ eventDispatcher: eventDispatcher,
100
+ providerFactory: providerFactory,
101
+ appearance: appearance,
102
+ popupsMountPoint: popupsMountPoint,
103
+ popupsBoundariesElement: popupsBoundariesElement,
104
+ popupsScrollableElement: popupsScrollableElement,
105
+ containerElement: containerElement,
106
+ disabled: disabled,
107
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
108
+ wrapperElement: wrapperElement
109
+ }))
110
+ );
111
+ }
48
112
  var props = {
49
- key: key
113
+ key: index
50
114
  };
51
115
  var element = component({
52
116
  editorView: editorView,
@@ -1,86 +1,14 @@
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
6
  exports.default = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
11
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
- var _react = _interopRequireDefault(require("react"));
15
- var _react2 = require("@emotion/react");
16
- 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)); }
17
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
18
- * @jsxRuntime classic
19
- * @jsx jsx
20
- */ // 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
21
- var pulseBackground = (0, _react2.keyframes)({
22
- '50%': {
23
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
24
- }
25
- });
26
- var pulseBackgroundReverse = (0, _react2.keyframes)({
27
- '0%': {
28
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
29
- },
30
- '50%': {
31
- backgroundColor: 'auto'
32
- },
33
- '100%': {
34
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
35
- }
36
- });
37
- var flashWrapper = (0, _react2.css)({
38
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
39
- '&.-flash > div': {
40
- animationName: pulseBackgroundReverse,
41
- animationDuration: '0.25s',
42
- animationTimingFunction: 'ease-in-out'
43
- },
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
45
- '& > div': {
46
- animation: "'none'"
47
- }
48
- });
49
- var flashWrapperAnimated = (0, _react2.css)((0, _defineProperty2.default)({}, "".concat(flashWrapper, " & > div"), {
50
- animationName: pulseBackground,
51
- animationDuration: '0.25s',
52
- animationTimingFunction: 'ease-in-out'
53
- }));
54
- // Ignored via go/ees005
55
- // eslint-disable-next-line @repo/internal/react/no-class-components
56
- var WithFlash = exports.default = /*#__PURE__*/function (_React$Component) {
57
- function WithFlash() {
58
- var _this;
59
- (0, _classCallCheck2.default)(this, WithFlash);
60
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
61
- args[_key] = arguments[_key];
62
- }
63
- _this = _callSuper(this, WithFlash, [].concat(args));
64
- (0, _defineProperty2.default)(_this, "toggle", false);
65
- return _this;
66
- }
67
- (0, _inherits2.default)(WithFlash, _React$Component);
68
- return (0, _createClass2.default)(WithFlash, [{
69
- key: "render",
70
- value: function render() {
71
- var _this$props = this.props,
72
- animate = _this$props.animate,
73
- children = _this$props.children;
74
- this.toggle = animate && !this.toggle;
75
- return (
76
- // eslint-disable-next-line @atlaskit/design-system/prefer-primitives
77
- (0, _react2.jsx)("div", {
78
- css: animate ? flashWrapperAnimated : flashWrapper
79
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
80
- ,
81
- className: this.toggle ? '-flash' : ''
82
- }, children)
83
- );
84
- }
85
- }]);
86
- }(_react.default.Component);
7
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
8
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
9
+ var _withFlashCompiled = require("./withFlash-compiled");
10
+ var _withFlashEmotion = require("./withFlash-emotion");
11
+ var WithFlash = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
12
+ return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
13
+ }, _withFlashCompiled.WithFlashCompiled, _withFlashEmotion.WithFlashEmotion);
14
+ var _default = exports.default = WithFlash;
@@ -0,0 +1,7 @@
1
+ ._16nrglyw>div{animation:none}
2
+ ._1q4h1bej.-flash>div{animation-name:k8m8d1y}
3
+ ._1q4hp6wo.-flash>div{animation-name:k1bd9ir4}
4
+ ._4eh31doz.-flash>div{animation-duration:.25s}
5
+ ._l0dz1ytf.-flash>div{animation-timing-function:ease-in-out}
6
+ @keyframes k1bd9ir4{0%{background-color:var(--ds-blanket-danger,#ef5c4814)}50%{background-color:auto}to{background-color:var(--ds-blanket-danger,#ef5c4814)}}
7
+ @keyframes k8m8d1y{50%{background-color:var(--ds-blanket-danger,#ef5c4814)}}
@@ -0,0 +1,58 @@
1
+ /* withFlash-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.WithFlashCompiled = void 0;
9
+ require("./withFlash-compiled.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
14
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
+ var _react = _interopRequireDefault(require("react"));
18
+ 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)); }
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
20
+ * Compiled 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 experiment has shipped.
24
+ */
25
+ var pulseBackground = null;
26
+ var pulseBackgroundReverse = null;
27
+ var compiledStyles = {
28
+ flashWrapper: "_16nrglyw _1q4hp6wo _4eh31doz _l0dz1ytf",
29
+ flashWrapperAnimated: "_1q4h1bej _4eh31doz _l0dz1ytf"
30
+ };
31
+ // Ignored via go/ees005
32
+ // eslint-disable-next-line @repo/internal/react/no-class-components
33
+ var WithFlashCompiled = exports.WithFlashCompiled = /*#__PURE__*/function (_React$Component) {
34
+ function WithFlashCompiled() {
35
+ var _this;
36
+ (0, _classCallCheck2.default)(this, WithFlashCompiled);
37
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
38
+ args[_key] = arguments[_key];
39
+ }
40
+ _this = _callSuper(this, WithFlashCompiled, [].concat(args));
41
+ (0, _defineProperty2.default)(_this, "toggle", false);
42
+ return _this;
43
+ }
44
+ (0, _inherits2.default)(WithFlashCompiled, _React$Component);
45
+ return (0, _createClass2.default)(WithFlashCompiled, [{
46
+ key: "render",
47
+ value: function render() {
48
+ var _this$props = this.props,
49
+ animate = _this$props.animate,
50
+ children = _this$props.children;
51
+ this.toggle = animate && !this.toggle;
52
+ return /*#__PURE__*/_react.default.createElement("div", {
53
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
54
+ className: (0, _runtime.ax)([animate ? compiledStyles.flashWrapperAnimated : compiledStyles.flashWrapper, this.toggle ? '-flash' : ''])
55
+ }, children);
56
+ }
57
+ }]);
58
+ }(_react.default.Component);
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.WithFlashEmotion = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
11
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
+ var _react = _interopRequireDefault(require("react"));
15
+ var _react2 = require("@emotion/react");
16
+ 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)); }
17
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
18
+ * @jsxRuntime classic
19
+ * @jsx jsx
20
+ */ /**
21
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
22
+ * Used via `componentWithCondition` in `index.tsx`.
23
+ *
24
+ * Cleanup: delete this file once the experiment has shipped.
25
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
26
+ var pulseBackground = (0, _react2.keyframes)({
27
+ '50%': {
28
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
29
+ }
30
+ });
31
+ var pulseBackgroundReverse = (0, _react2.keyframes)({
32
+ '0%': {
33
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
34
+ },
35
+ '50%': {
36
+ backgroundColor: 'auto'
37
+ },
38
+ '100%': {
39
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
40
+ }
41
+ });
42
+ var flashWrapper = (0, _react2.css)({
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
44
+ '&.-flash > div': {
45
+ animationName: pulseBackgroundReverse,
46
+ animationDuration: '0.25s',
47
+ animationTimingFunction: 'ease-in-out'
48
+ },
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
50
+ '& > div': {
51
+ animation: 'none'
52
+ }
53
+ });
54
+ var flashWrapperAnimated = (0, _react2.css)((0, _defineProperty2.default)({}, "&.-flash > div", {
55
+ animationName: pulseBackground,
56
+ animationDuration: '0.25s',
57
+ animationTimingFunction: 'ease-in-out'
58
+ }));
59
+ // Ignored via go/ees005
60
+ // eslint-disable-next-line @repo/internal/react/no-class-components
61
+ var WithFlashEmotion = exports.WithFlashEmotion = /*#__PURE__*/function (_React$Component) {
62
+ function WithFlashEmotion() {
63
+ var _this;
64
+ (0, _classCallCheck2.default)(this, WithFlashEmotion);
65
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
66
+ args[_key] = arguments[_key];
67
+ }
68
+ _this = _callSuper(this, WithFlashEmotion, [].concat(args));
69
+ (0, _defineProperty2.default)(_this, "toggle", false);
70
+ return _this;
71
+ }
72
+ (0, _inherits2.default)(WithFlashEmotion, _React$Component);
73
+ return (0, _createClass2.default)(WithFlashEmotion, [{
74
+ key: "render",
75
+ value: function render() {
76
+ var _this$props = this.props,
77
+ animate = _this$props.animate,
78
+ children = _this$props.children;
79
+ this.toggle = animate && !this.toggle;
80
+ return (
81
+ // eslint-disable-next-line @atlaskit/design-system/prefer-primitives
82
+ (0, _react2.jsx)("div", {
83
+ css: animate ? flashWrapperAnimated : flashWrapper
84
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
85
+ ,
86
+ className: this.toggle ? '-flash' : ''
87
+ }, children)
88
+ );
89
+ }
90
+ }]);
91
+ }(_react.default.Component);
@@ -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.8";
8
+ var version = exports.version = "219.9.10";
@@ -251,7 +251,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
251
251
  var _states$markdownModeS2;
252
252
  return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
253
253
  });
254
- const shouldHideProseMirrorForMarkdownMode = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'wysiwyg' && markdownPluginCurrentIsMarkdownMode;
254
+ const shouldHideProseMirrorForMarkdownMode = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
255
255
  return jsx("div", {
256
256
  css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
257
257
  "data-testid": CONTENT_AREA_TEST_ID,
@@ -8,6 +8,38 @@ import { MountPluginHooks } from './mount-plugin-hooks';
8
8
  import { PluginsComponentsWrapperCompiled } from './PluginSlot-compiled';
9
9
  import { PluginsComponentsWrapperEmotion } from './PluginSlot-emotion';
10
10
  const PluginsComponentsWrapperMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), PluginsComponentsWrapperCompiled, PluginsComponentsWrapperEmotion);
11
+ const PluginComponent = ({
12
+ component,
13
+ editorView,
14
+ editorActions,
15
+ eventDispatcher,
16
+ providerFactory,
17
+ appearance,
18
+ popupsMountPoint,
19
+ popupsBoundariesElement,
20
+ popupsScrollableElement,
21
+ containerElement,
22
+ disabled,
23
+ dispatchAnalyticsEvent,
24
+ wrapperElement
25
+ }) => {
26
+ return component({
27
+ editorView: editorView,
28
+ editorActions: editorActions,
29
+ eventDispatcher: eventDispatcher,
30
+ providerFactory,
31
+ dispatchAnalyticsEvent,
32
+ // Ignored via go/ees005
33
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
34
+ appearance: appearance,
35
+ popupsMountPoint,
36
+ popupsBoundariesElement,
37
+ popupsScrollableElement,
38
+ containerElement,
39
+ disabled,
40
+ wrapperElement
41
+ });
42
+ };
11
43
  const PluginSlot = ({
12
44
  items,
13
45
  editorView,
@@ -27,6 +59,7 @@ const PluginSlot = ({
27
59
  if (!items && !pluginHooks) {
28
60
  return null;
29
61
  }
62
+ const isolatePluginSlotFailures = Boolean(items === null || items === void 0 ? void 0 : items.length) && expValEquals('platform_editor_per_plugin_error_boundary', 'isEnabled', true);
30
63
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
31
64
  component: ACTION_SUBJECT.PLUGIN_SLOT,
32
65
  fallbackComponent: null
@@ -36,9 +69,41 @@ const PluginSlot = ({
36
69
  containerElement: containerElement
37
70
  }), /*#__PURE__*/React.createElement(PluginsComponentsWrapperMigration, {
38
71
  "data-testid": "plugins-components-wrapper"
39
- }, items === null || items === void 0 ? void 0 : items.map((component, key) => {
72
+ }, items === null || items === void 0 ? void 0 : items.map((component, index) => {
73
+ if (isolatePluginSlotFailures) {
74
+ return (
75
+ /*#__PURE__*/
76
+ // The wrapper adds a small amount of overhead, but moves the plugin factory call
77
+ // inside the per-plugin boundary while still invoking it as a factory.
78
+ React.createElement(ErrorBoundary
79
+ // Switching to a data-derived key currently breaks editor-plugin-ai's
80
+ // Discard flow (which relies on positional remounts to reset modal
81
+ // state). Tracked for follow-up behind a separate gate.
82
+ // eslint-disable-next-line react/no-array-index-key
83
+ , {
84
+ key: index,
85
+ component: ACTION_SUBJECT.PLUGIN_SLOT,
86
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
87
+ fallbackComponent: null
88
+ }, /*#__PURE__*/React.createElement(PluginComponent, {
89
+ component: component,
90
+ editorView: editorView,
91
+ editorActions: editorActions,
92
+ eventDispatcher: eventDispatcher,
93
+ providerFactory: providerFactory,
94
+ appearance: appearance,
95
+ popupsMountPoint: popupsMountPoint,
96
+ popupsBoundariesElement: popupsBoundariesElement,
97
+ popupsScrollableElement: popupsScrollableElement,
98
+ containerElement: containerElement,
99
+ disabled: disabled,
100
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
101
+ wrapperElement: wrapperElement
102
+ }))
103
+ );
104
+ }
40
105
  const props = {
41
- key
106
+ key: index
42
107
  };
43
108
  const element = component({
44
109
  editorView: editorView,
@@ -1,69 +1,6 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
- import React from 'react';
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
9
- import { css, jsx, keyframes } from '@emotion/react';
10
- const pulseBackground = keyframes({
11
- '50%': {
12
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
13
- }
14
- });
15
- const pulseBackgroundReverse = keyframes({
16
- '0%': {
17
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
18
- },
19
- '50%': {
20
- backgroundColor: 'auto'
21
- },
22
- '100%': {
23
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
24
- }
25
- });
26
- const flashWrapper = css({
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
28
- '&.-flash > div': {
29
- animationName: pulseBackgroundReverse,
30
- animationDuration: '0.25s',
31
- animationTimingFunction: 'ease-in-out'
32
- },
33
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
34
- '& > div': {
35
- animation: "'none'"
36
- }
37
- });
38
- const flashWrapperAnimated = css({
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
40
- [`${flashWrapper} & > div`]: {
41
- animationName: pulseBackground,
42
- animationDuration: '0.25s',
43
- animationTimingFunction: 'ease-in-out'
44
- }
45
- });
46
- // Ignored via go/ees005
47
- // eslint-disable-next-line @repo/internal/react/no-class-components
48
- export default class WithFlash extends React.Component {
49
- constructor(...args) {
50
- super(...args);
51
- _defineProperty(this, "toggle", false);
52
- }
53
- render() {
54
- const {
55
- animate,
56
- children
57
- } = this.props;
58
- this.toggle = animate && !this.toggle;
59
- return (
60
- // eslint-disable-next-line @atlaskit/design-system/prefer-primitives
61
- jsx("div", {
62
- css: animate ? flashWrapperAnimated : flashWrapper
63
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
64
- ,
65
- className: this.toggle ? '-flash' : ''
66
- }, children)
67
- );
68
- }
69
- }
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { WithFlashCompiled } from './withFlash-compiled';
4
+ import { WithFlashEmotion } from './withFlash-emotion';
5
+ const WithFlash = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), WithFlashCompiled, WithFlashEmotion);
6
+ export default WithFlash;
@@ -0,0 +1,7 @@
1
+ ._16nrglyw>div{animation:none}
2
+ ._1q4h1bej.-flash>div{animation-name:k8m8d1y}
3
+ ._1q4hp6wo.-flash>div{animation-name:k1bd9ir4}
4
+ ._4eh31doz.-flash>div{animation-duration:.25s}
5
+ ._l0dz1ytf.-flash>div{animation-timing-function:ease-in-out}
6
+ @keyframes k1bd9ir4{0%{background-color:var(--ds-blanket-danger,#ef5c4814)}50%{background-color:auto}to{background-color:var(--ds-blanket-danger,#ef5c4814)}}
7
+ @keyframes k8m8d1y{50%{background-color:var(--ds-blanket-danger,#ef5c4814)}}
@@ -0,0 +1,36 @@
1
+ /* withFlash-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import "./withFlash-compiled.compiled.css";
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ /**
6
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
7
+ * Used via `componentWithCondition` in `index.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import React from 'react';
12
+ const pulseBackground = null;
13
+ const pulseBackgroundReverse = null;
14
+ const compiledStyles = {
15
+ flashWrapper: "_16nrglyw _1q4hp6wo _4eh31doz _l0dz1ytf",
16
+ flashWrapperAnimated: "_1q4h1bej _4eh31doz _l0dz1ytf"
17
+ };
18
+ // Ignored via go/ees005
19
+ // eslint-disable-next-line @repo/internal/react/no-class-components
20
+ export class WithFlashCompiled extends React.Component {
21
+ constructor(...args) {
22
+ super(...args);
23
+ _defineProperty(this, "toggle", false);
24
+ }
25
+ render() {
26
+ const {
27
+ animate,
28
+ children
29
+ } = this.props;
30
+ this.toggle = animate && !this.toggle;
31
+ return /*#__PURE__*/React.createElement("div", {
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
33
+ className: ax([animate ? compiledStyles.flashWrapperAnimated : compiledStyles.flashWrapper, this.toggle ? '-flash' : ''])
34
+ }, children);
35
+ }
36
+ }
@@ -0,0 +1,75 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
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 experiment has shipped.
11
+ */
12
+ import React from 'react';
13
+
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
15
+ import { css, jsx, keyframes } from '@emotion/react';
16
+ const pulseBackground = keyframes({
17
+ '50%': {
18
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
19
+ }
20
+ });
21
+ const pulseBackgroundReverse = keyframes({
22
+ '0%': {
23
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
24
+ },
25
+ '50%': {
26
+ backgroundColor: 'auto'
27
+ },
28
+ '100%': {
29
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
30
+ }
31
+ });
32
+ const flashWrapper = css({
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
34
+ '&.-flash > div': {
35
+ animationName: pulseBackgroundReverse,
36
+ animationDuration: '0.25s',
37
+ animationTimingFunction: 'ease-in-out'
38
+ },
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
40
+ '& > div': {
41
+ animation: 'none'
42
+ }
43
+ });
44
+ const flashWrapperAnimated = css({
45
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
46
+ [`&.-flash > div`]: {
47
+ animationName: pulseBackground,
48
+ animationDuration: '0.25s',
49
+ animationTimingFunction: 'ease-in-out'
50
+ }
51
+ });
52
+ // Ignored via go/ees005
53
+ // eslint-disable-next-line @repo/internal/react/no-class-components
54
+ export class WithFlashEmotion extends React.Component {
55
+ constructor(...args) {
56
+ super(...args);
57
+ _defineProperty(this, "toggle", false);
58
+ }
59
+ render() {
60
+ const {
61
+ animate,
62
+ children
63
+ } = this.props;
64
+ this.toggle = animate && !this.toggle;
65
+ return (
66
+ // eslint-disable-next-line @atlaskit/design-system/prefer-primitives
67
+ jsx("div", {
68
+ css: animate ? flashWrapperAnimated : flashWrapper
69
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
70
+ ,
71
+ className: this.toggle ? '-flash' : ''
72
+ }, children)
73
+ );
74
+ }
75
+ }
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "219.9.8";
2
+ export const version = "219.9.10";
@@ -249,7 +249,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
249
249
  var _states$markdownModeS2;
250
250
  return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
251
251
  });
252
- var shouldHideProseMirrorForMarkdownMode = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'wysiwyg' && markdownPluginCurrentIsMarkdownMode;
252
+ var shouldHideProseMirrorForMarkdownMode = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
253
253
  return jsx("div", {
254
254
  css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
255
255
  "data-testid": CONTENT_AREA_TEST_ID,
@@ -10,8 +10,8 @@ import { PluginsComponentsWrapperEmotion } from './PluginSlot-emotion';
10
10
  var PluginsComponentsWrapperMigration = componentWithCondition(function () {
11
11
  return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
12
12
  }, PluginsComponentsWrapperCompiled, PluginsComponentsWrapperEmotion);
13
- var PluginSlot = function PluginSlot(_ref) {
14
- var items = _ref.items,
13
+ var PluginComponent = function PluginComponent(_ref) {
14
+ var component = _ref.component,
15
15
  editorView = _ref.editorView,
16
16
  editorActions = _ref.editorActions,
17
17
  eventDispatcher = _ref.eventDispatcher,
@@ -23,11 +23,43 @@ var PluginSlot = function PluginSlot(_ref) {
23
23
  containerElement = _ref.containerElement,
24
24
  disabled = _ref.disabled,
25
25
  dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
26
- wrapperElement = _ref.wrapperElement,
27
- pluginHooks = _ref.pluginHooks;
26
+ wrapperElement = _ref.wrapperElement;
27
+ return component({
28
+ editorView: editorView,
29
+ editorActions: editorActions,
30
+ eventDispatcher: eventDispatcher,
31
+ providerFactory: providerFactory,
32
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
33
+ // Ignored via go/ees005
34
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
35
+ appearance: appearance,
36
+ popupsMountPoint: popupsMountPoint,
37
+ popupsBoundariesElement: popupsBoundariesElement,
38
+ popupsScrollableElement: popupsScrollableElement,
39
+ containerElement: containerElement,
40
+ disabled: disabled,
41
+ wrapperElement: wrapperElement
42
+ });
43
+ };
44
+ var PluginSlot = function PluginSlot(_ref2) {
45
+ var items = _ref2.items,
46
+ editorView = _ref2.editorView,
47
+ editorActions = _ref2.editorActions,
48
+ eventDispatcher = _ref2.eventDispatcher,
49
+ providerFactory = _ref2.providerFactory,
50
+ appearance = _ref2.appearance,
51
+ popupsMountPoint = _ref2.popupsMountPoint,
52
+ popupsBoundariesElement = _ref2.popupsBoundariesElement,
53
+ popupsScrollableElement = _ref2.popupsScrollableElement,
54
+ containerElement = _ref2.containerElement,
55
+ disabled = _ref2.disabled,
56
+ dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
57
+ wrapperElement = _ref2.wrapperElement,
58
+ pluginHooks = _ref2.pluginHooks;
28
59
  if (!items && !pluginHooks) {
29
60
  return null;
30
61
  }
62
+ var isolatePluginSlotFailures = Boolean(items === null || items === void 0 ? void 0 : items.length) && expValEquals('platform_editor_per_plugin_error_boundary', 'isEnabled', true);
31
63
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
32
64
  component: ACTION_SUBJECT.PLUGIN_SLOT,
33
65
  fallbackComponent: null
@@ -37,9 +69,41 @@ var PluginSlot = function PluginSlot(_ref) {
37
69
  containerElement: containerElement
38
70
  }), /*#__PURE__*/React.createElement(PluginsComponentsWrapperMigration, {
39
71
  "data-testid": "plugins-components-wrapper"
40
- }, items === null || items === void 0 ? void 0 : items.map(function (component, key) {
72
+ }, items === null || items === void 0 ? void 0 : items.map(function (component, index) {
73
+ if (isolatePluginSlotFailures) {
74
+ return (
75
+ /*#__PURE__*/
76
+ // The wrapper adds a small amount of overhead, but moves the plugin factory call
77
+ // inside the per-plugin boundary while still invoking it as a factory.
78
+ React.createElement(ErrorBoundary
79
+ // Switching to a data-derived key currently breaks editor-plugin-ai's
80
+ // Discard flow (which relies on positional remounts to reset modal
81
+ // state). Tracked for follow-up behind a separate gate.
82
+ // eslint-disable-next-line react/no-array-index-key
83
+ , {
84
+ key: index,
85
+ component: ACTION_SUBJECT.PLUGIN_SLOT,
86
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
87
+ fallbackComponent: null
88
+ }, /*#__PURE__*/React.createElement(PluginComponent, {
89
+ component: component,
90
+ editorView: editorView,
91
+ editorActions: editorActions,
92
+ eventDispatcher: eventDispatcher,
93
+ providerFactory: providerFactory,
94
+ appearance: appearance,
95
+ popupsMountPoint: popupsMountPoint,
96
+ popupsBoundariesElement: popupsBoundariesElement,
97
+ popupsScrollableElement: popupsScrollableElement,
98
+ containerElement: containerElement,
99
+ disabled: disabled,
100
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
101
+ wrapperElement: wrapperElement
102
+ }))
103
+ );
104
+ }
41
105
  var props = {
42
- key: key
106
+ key: index
43
107
  };
44
108
  var element = component({
45
109
  editorView: editorView,
@@ -1,83 +1,8 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
4
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- /**
10
- * @jsxRuntime classic
11
- * @jsx jsx
12
- */
13
- import React from 'react';
14
-
15
- // 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
16
- import { css, jsx, keyframes } from '@emotion/react';
17
- var pulseBackground = keyframes({
18
- '50%': {
19
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
20
- }
21
- });
22
- var pulseBackgroundReverse = keyframes({
23
- '0%': {
24
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
25
- },
26
- '50%': {
27
- backgroundColor: 'auto'
28
- },
29
- '100%': {
30
- backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
31
- }
32
- });
33
- var flashWrapper = css({
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
35
- '&.-flash > div': {
36
- animationName: pulseBackgroundReverse,
37
- animationDuration: '0.25s',
38
- animationTimingFunction: 'ease-in-out'
39
- },
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
- '& > div': {
42
- animation: "'none'"
43
- }
44
- });
45
- var flashWrapperAnimated = css(_defineProperty({}, "".concat(flashWrapper, " & > div"), {
46
- animationName: pulseBackground,
47
- animationDuration: '0.25s',
48
- animationTimingFunction: 'ease-in-out'
49
- }));
50
- // Ignored via go/ees005
51
- // eslint-disable-next-line @repo/internal/react/no-class-components
52
- var WithFlash = /*#__PURE__*/function (_React$Component) {
53
- function WithFlash() {
54
- var _this;
55
- _classCallCheck(this, WithFlash);
56
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
57
- args[_key] = arguments[_key];
58
- }
59
- _this = _callSuper(this, WithFlash, [].concat(args));
60
- _defineProperty(_this, "toggle", false);
61
- return _this;
62
- }
63
- _inherits(WithFlash, _React$Component);
64
- return _createClass(WithFlash, [{
65
- key: "render",
66
- value: function render() {
67
- var _this$props = this.props,
68
- animate = _this$props.animate,
69
- children = _this$props.children;
70
- this.toggle = animate && !this.toggle;
71
- return (
72
- // eslint-disable-next-line @atlaskit/design-system/prefer-primitives
73
- jsx("div", {
74
- css: animate ? flashWrapperAnimated : flashWrapper
75
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
76
- ,
77
- className: this.toggle ? '-flash' : ''
78
- }, children)
79
- );
80
- }
81
- }]);
82
- }(React.Component);
83
- export { WithFlash as default };
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { WithFlashCompiled } from './withFlash-compiled';
4
+ import { WithFlashEmotion } from './withFlash-emotion';
5
+ var WithFlash = componentWithCondition(function () {
6
+ return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
7
+ }, WithFlashCompiled, WithFlashEmotion);
8
+ export default WithFlash;
@@ -0,0 +1,7 @@
1
+ ._16nrglyw>div{animation:none}
2
+ ._1q4h1bej.-flash>div{animation-name:k8m8d1y}
3
+ ._1q4hp6wo.-flash>div{animation-name:k1bd9ir4}
4
+ ._4eh31doz.-flash>div{animation-duration:.25s}
5
+ ._l0dz1ytf.-flash>div{animation-timing-function:ease-in-out}
6
+ @keyframes k1bd9ir4{0%{background-color:var(--ds-blanket-danger,#ef5c4814)}50%{background-color:auto}to{background-color:var(--ds-blanket-danger,#ef5c4814)}}
7
+ @keyframes k8m8d1y{50%{background-color:var(--ds-blanket-danger,#ef5c4814)}}
@@ -0,0 +1,52 @@
1
+ /* withFlash-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
7
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
+ import "./withFlash-compiled.compiled.css";
9
+ import { ax, ix } from "@compiled/react/runtime";
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
+ /**
13
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
14
+ * Used via `componentWithCondition` in `index.tsx`.
15
+ *
16
+ * Cleanup: delete this file once the experiment has shipped.
17
+ */
18
+ import React from 'react';
19
+ var pulseBackground = null;
20
+ var pulseBackgroundReverse = null;
21
+ var compiledStyles = {
22
+ flashWrapper: "_16nrglyw _1q4hp6wo _4eh31doz _l0dz1ytf",
23
+ flashWrapperAnimated: "_1q4h1bej _4eh31doz _l0dz1ytf"
24
+ };
25
+ // Ignored via go/ees005
26
+ // eslint-disable-next-line @repo/internal/react/no-class-components
27
+ export var WithFlashCompiled = /*#__PURE__*/function (_React$Component) {
28
+ function WithFlashCompiled() {
29
+ var _this;
30
+ _classCallCheck(this, WithFlashCompiled);
31
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
32
+ args[_key] = arguments[_key];
33
+ }
34
+ _this = _callSuper(this, WithFlashCompiled, [].concat(args));
35
+ _defineProperty(_this, "toggle", false);
36
+ return _this;
37
+ }
38
+ _inherits(WithFlashCompiled, _React$Component);
39
+ return _createClass(WithFlashCompiled, [{
40
+ key: "render",
41
+ value: function render() {
42
+ var _this$props = this.props,
43
+ animate = _this$props.animate,
44
+ children = _this$props.children;
45
+ this.toggle = animate && !this.toggle;
46
+ return /*#__PURE__*/React.createElement("div", {
47
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
48
+ className: ax([animate ? compiledStyles.flashWrapperAnimated : compiledStyles.flashWrapper, this.toggle ? '-flash' : ''])
49
+ }, children);
50
+ }
51
+ }]);
52
+ }(React.Component);
@@ -0,0 +1,88 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
4
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
+ /**
10
+ * @jsxRuntime classic
11
+ * @jsx jsx
12
+ */
13
+ /**
14
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
15
+ * Used via `componentWithCondition` in `index.tsx`.
16
+ *
17
+ * Cleanup: delete this file once the experiment has shipped.
18
+ */
19
+ import React from 'react';
20
+
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
22
+ import { css, jsx, keyframes } from '@emotion/react';
23
+ var pulseBackground = keyframes({
24
+ '50%': {
25
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
26
+ }
27
+ });
28
+ var pulseBackgroundReverse = keyframes({
29
+ '0%': {
30
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
31
+ },
32
+ '50%': {
33
+ backgroundColor: 'auto'
34
+ },
35
+ '100%': {
36
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
37
+ }
38
+ });
39
+ var flashWrapper = css({
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
+ '&.-flash > div': {
42
+ animationName: pulseBackgroundReverse,
43
+ animationDuration: '0.25s',
44
+ animationTimingFunction: 'ease-in-out'
45
+ },
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
47
+ '& > div': {
48
+ animation: 'none'
49
+ }
50
+ });
51
+ var flashWrapperAnimated = css(_defineProperty({}, "&.-flash > div", {
52
+ animationName: pulseBackground,
53
+ animationDuration: '0.25s',
54
+ animationTimingFunction: 'ease-in-out'
55
+ }));
56
+ // Ignored via go/ees005
57
+ // eslint-disable-next-line @repo/internal/react/no-class-components
58
+ export var WithFlashEmotion = /*#__PURE__*/function (_React$Component) {
59
+ function WithFlashEmotion() {
60
+ var _this;
61
+ _classCallCheck(this, WithFlashEmotion);
62
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
63
+ args[_key] = arguments[_key];
64
+ }
65
+ _this = _callSuper(this, WithFlashEmotion, [].concat(args));
66
+ _defineProperty(_this, "toggle", false);
67
+ return _this;
68
+ }
69
+ _inherits(WithFlashEmotion, _React$Component);
70
+ return _createClass(WithFlashEmotion, [{
71
+ key: "render",
72
+ value: function render() {
73
+ var _this$props = this.props,
74
+ animate = _this$props.animate,
75
+ children = _this$props.children;
76
+ this.toggle = animate && !this.toggle;
77
+ return (
78
+ // eslint-disable-next-line @atlaskit/design-system/prefer-primitives
79
+ jsx("div", {
80
+ css: animate ? flashWrapperAnimated : flashWrapper
81
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
82
+ ,
83
+ className: this.toggle ? '-flash' : ''
84
+ }, children)
85
+ );
86
+ }
87
+ }]);
88
+ }(React.Component);
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "219.9.8";
2
+ export var version = "219.9.10";
@@ -1,5 +1,5 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- export type MarkdownModeView = 'syntax' | 'wysiwyg' | 'preview';
2
+ export type MarkdownModeView = 'syntax' | 'split-view' | 'preview';
3
3
  export type MarkdownModePlugin = NextEditorPlugin<'markdownMode', {
4
4
  actions: {
5
5
  setView: (view: MarkdownModeView) => void;
@@ -15,4 +15,4 @@ export interface ChromelessEditorContainerProps extends HTMLAttributes<HTMLDivEl
15
15
  maxHeight?: number;
16
16
  minHeight: number;
17
17
  }
18
- export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight }: ChromelessEditorContainerProps) => React.JSX.Element;
18
+ export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight, }: ChromelessEditorContainerProps) => React.JSX.Element;
@@ -1,14 +1,7 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
- import { jsx } from '@emotion/react';
7
2
  export interface Props {
8
3
  animate: boolean;
9
4
  children?: React.ReactNode;
10
5
  }
11
- export default class WithFlash extends React.Component<Props> {
12
- private toggle;
13
- render(): jsx.JSX.Element;
14
- }
6
+ declare const WithFlash: React.ComponentType<Props>;
7
+ export default WithFlash;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ /**
6
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
7
+ * Used via `componentWithCondition` in `index.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import React from 'react';
12
+ export interface Props {
13
+ animate: boolean;
14
+ children?: React.ReactNode;
15
+ }
16
+ export declare class WithFlashCompiled extends React.Component<Props> {
17
+ private toggle;
18
+ render(): React.JSX.Element;
19
+ }
@@ -0,0 +1,19 @@
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 `index.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import React from 'react';
12
+ export interface Props {
13
+ animate: boolean;
14
+ children?: React.ReactNode;
15
+ }
16
+ export declare class WithFlashEmotion extends React.Component<Props> {
17
+ private toggle;
18
+ render(): React.JSX.Element;
19
+ }
@@ -1,5 +1,5 @@
1
1
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- export type MarkdownModeView = 'syntax' | 'wysiwyg' | 'preview';
2
+ export type MarkdownModeView = 'syntax' | 'split-view' | 'preview';
3
3
  export type MarkdownModePlugin = NextEditorPlugin<'markdownMode', {
4
4
  actions: {
5
5
  setView: (view: MarkdownModeView) => void;
@@ -15,4 +15,4 @@ export interface ChromelessEditorContainerProps extends HTMLAttributes<HTMLDivEl
15
15
  maxHeight?: number;
16
16
  minHeight: number;
17
17
  }
18
- export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight }: ChromelessEditorContainerProps) => React.JSX.Element;
18
+ export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight, }: ChromelessEditorContainerProps) => React.JSX.Element;
@@ -1,14 +1,7 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
- import { jsx } from '@emotion/react';
7
2
  export interface Props {
8
3
  animate: boolean;
9
4
  children?: React.ReactNode;
10
5
  }
11
- export default class WithFlash extends React.Component<Props> {
12
- private toggle;
13
- render(): jsx.JSX.Element;
14
- }
6
+ declare const WithFlash: React.ComponentType<Props>;
7
+ export default WithFlash;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ /**
6
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
7
+ * Used via `componentWithCondition` in `index.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import React from 'react';
12
+ export interface Props {
13
+ animate: boolean;
14
+ children?: React.ReactNode;
15
+ }
16
+ export declare class WithFlashCompiled extends React.Component<Props> {
17
+ private toggle;
18
+ render(): React.JSX.Element;
19
+ }
@@ -0,0 +1,19 @@
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 `index.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import React from 'react';
12
+ export interface Props {
13
+ animate: boolean;
14
+ children?: React.ReactNode;
15
+ }
16
+ export declare class WithFlashEmotion extends React.Component<Props> {
17
+ private toggle;
18
+ render(): React.JSX.Element;
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "219.9.9",
3
+ "version": "219.9.11",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/editor-toolbar-model": "^0.5.0",
67
67
  "@atlaskit/emoji": "^70.10.0",
68
68
  "@atlaskit/feature-gate-js-client": "^5.7.0",
69
- "@atlaskit/icon": "^35.1.0",
69
+ "@atlaskit/icon": "^35.3.0",
70
70
  "@atlaskit/link": "^3.4.0",
71
71
  "@atlaskit/media-card": "^80.5.0",
72
72
  "@atlaskit/mention": "^26.0.0",
@@ -74,7 +74,7 @@
74
74
  "@atlaskit/platform-feature-flags-react": "^0.5.0",
75
75
  "@atlaskit/react-ufo": "^6.1.0",
76
76
  "@atlaskit/task-decision": "^20.1.0",
77
- "@atlaskit/tmp-editor-statsig": "^83.0.0",
77
+ "@atlaskit/tmp-editor-statsig": "^84.0.0",
78
78
  "@atlaskit/tokens": "^13.0.0",
79
79
  "@atlaskit/tooltip": "^22.3.0",
80
80
  "@atlaskit/width-detector": "^5.1.0",
@@ -92,7 +92,7 @@
92
92
  "uuid": "^3.1.0"
93
93
  },
94
94
  "peerDependencies": {
95
- "@atlaskit/editor-common": "^114.46.0",
95
+ "@atlaskit/editor-common": "^114.47.0",
96
96
  "@atlaskit/link-provider": "^4.4.0",
97
97
  "@atlaskit/media-core": "^37.1.0",
98
98
  "react": "^18.2.0",
@@ -113,7 +113,7 @@
113
113
  "@atlaskit/editor-plugin-paste": "^11.2.0",
114
114
  "@atlaskit/editor-test-helpers": "workspace:^",
115
115
  "@atlaskit/link-provider": "^4.4.0",
116
- "@atlaskit/linking-common": "^9.11.0",
116
+ "@atlaskit/linking-common": "^9.12.0",
117
117
  "@atlaskit/logo": "^20.1.0",
118
118
  "@atlaskit/media-core": "^37.1.0",
119
119
  "@atlaskit/media-integration-test-helpers": "workspace:^",
@@ -124,7 +124,7 @@
124
124
  "@atlaskit/renderer": "^131.1.0",
125
125
  "@atlaskit/section-message": "^8.13.0",
126
126
  "@atlaskit/synchrony-test-helpers": "workspace:^",
127
- "@atlaskit/toggle": "^15.6.0",
127
+ "@atlaskit/toggle": "^16.0.0",
128
128
  "@atlaskit/util-data-test": "^18.6.0",
129
129
  "@atlassian/a11y-jest-testing": "^0.11.0",
130
130
  "@atlassian/a11y-playwright-testing": "^0.10.0",
@@ -132,7 +132,7 @@
132
132
  "@atlassian/editor-rovo-bridge": "^8.11.0",
133
133
  "@atlassian/feature-flags-test-utils": "^1.1.0",
134
134
  "@atlassian/react-compiler-gating": "workspace:^",
135
- "@atlassian/search-client": "^1.8.0",
135
+ "@atlassian/search-client": "^1.9.0",
136
136
  "@atlassian/search-provider": "^11.1.0",
137
137
  "@atlassian/structured-docs-types": "workspace:^",
138
138
  "@atlassian/user-profile-card": "^1.5.0",