@atlaskit/editor-common 135.3.0 → 137.0.0

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 (73) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/cjs/ai-messages/ai-suggestions.js +5 -0
  3. package/dist/cjs/analytics/types/ai-suggestions-events.js +2 -0
  4. package/dist/cjs/card/LinkToolbarButtonGroup.js +2 -4
  5. package/dist/cjs/card/link-toolbar-button-group-options.js +2 -3
  6. package/dist/cjs/credit-guard/CreditCheckedFloatingToolbarButton.js +3 -5
  7. package/dist/cjs/credit-guard/getCreditCheckedFloatingToolbarItem.js +1 -3
  8. package/dist/cjs/floating-toolbar/DropdownMenuExtensionItems.js +2 -3
  9. package/dist/cjs/messages/layout.js +0 -5
  10. package/dist/cjs/monitoring/error.js +1 -1
  11. package/dist/cjs/portal/PortalBucket.js +7 -35
  12. package/dist/cjs/portal/PortalManager.js +1 -2
  13. package/dist/cjs/ui/DropList/index.js +1 -1
  14. package/dist/cjs/ui/FloatingToolbar/Button.js +3 -4
  15. package/dist/cjs/ui/FloatingToolbar/Separator.js +2 -10
  16. package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +1 -1
  17. package/dist/cjs/utils/document.js +3 -24
  18. package/dist/cjs/utils/index.js +0 -6
  19. package/dist/es2019/ai-messages/ai-suggestions.js +5 -0
  20. package/dist/es2019/analytics/types/ai-suggestions-events.js +2 -0
  21. package/dist/es2019/card/LinkToolbarButtonGroup.js +2 -4
  22. package/dist/es2019/card/link-toolbar-button-group-options.js +2 -3
  23. package/dist/es2019/credit-guard/CreditCheckedFloatingToolbarButton.js +2 -4
  24. package/dist/es2019/credit-guard/getCreditCheckedFloatingToolbarItem.js +0 -2
  25. package/dist/es2019/floating-toolbar/DropdownMenuExtensionItems.js +2 -3
  26. package/dist/es2019/messages/layout.js +0 -5
  27. package/dist/es2019/monitoring/error.js +1 -1
  28. package/dist/es2019/portal/PortalBucket.js +2 -26
  29. package/dist/es2019/portal/PortalManager.js +1 -2
  30. package/dist/es2019/ui/DropList/index.js +1 -1
  31. package/dist/es2019/ui/FloatingToolbar/Button.js +3 -4
  32. package/dist/es2019/ui/FloatingToolbar/Separator.js +2 -10
  33. package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +1 -1
  34. package/dist/es2019/utils/document.js +0 -24
  35. package/dist/es2019/utils/index.js +1 -1
  36. package/dist/esm/ai-messages/ai-suggestions.js +5 -0
  37. package/dist/esm/analytics/types/ai-suggestions-events.js +2 -0
  38. package/dist/esm/card/LinkToolbarButtonGroup.js +2 -4
  39. package/dist/esm/card/link-toolbar-button-group-options.js +2 -3
  40. package/dist/esm/credit-guard/CreditCheckedFloatingToolbarButton.js +3 -5
  41. package/dist/esm/credit-guard/getCreditCheckedFloatingToolbarItem.js +1 -3
  42. package/dist/esm/floating-toolbar/DropdownMenuExtensionItems.js +2 -3
  43. package/dist/esm/messages/layout.js +0 -5
  44. package/dist/esm/monitoring/error.js +1 -1
  45. package/dist/esm/portal/PortalBucket.js +8 -36
  46. package/dist/esm/portal/PortalManager.js +1 -2
  47. package/dist/esm/ui/DropList/index.js +1 -1
  48. package/dist/esm/ui/FloatingToolbar/Button.js +3 -4
  49. package/dist/esm/ui/FloatingToolbar/Separator.js +2 -10
  50. package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +1 -1
  51. package/dist/esm/utils/document.js +3 -24
  52. package/dist/esm/utils/index.js +1 -1
  53. package/dist/types/ai-messages/ai-suggestions.d.ts +5 -0
  54. package/dist/types/analytics/types/ai-suggestions-events.d.ts +2 -0
  55. package/dist/types/card/LinkToolbarButtonGroup.d.ts +0 -1
  56. package/dist/types/card/index.d.ts +1 -1
  57. package/dist/types/card/link-toolbar-button-group-options.d.ts +1 -1
  58. package/dist/types/card/types.d.ts +6 -0
  59. package/dist/types/credit-guard/CreditCheckedFloatingToolbarButton.d.ts +1 -2
  60. package/dist/types/credit-guard/getCreditCheckedFloatingToolbarItem.d.ts +1 -1
  61. package/dist/types/credit-guard/types.d.ts +1 -1
  62. package/dist/types/floating-toolbar/DropdownMenuExtensionItems.d.ts +0 -1
  63. package/dist/types/messages/layout.d.ts +0 -5
  64. package/dist/types/ui/FloatingToolbar/Button.d.ts +0 -1
  65. package/dist/types/ui/FloatingToolbar/Separator.d.ts +1 -2
  66. package/dist/types/utils/document.d.ts +0 -1
  67. package/dist/types/utils/index.d.ts +1 -1
  68. package/package.json +7 -7
  69. package/dist/cjs/toolbar-flag-check.js +0 -9
  70. package/dist/es2019/toolbar-flag-check.js +0 -1
  71. package/dist/esm/toolbar-flag-check.js +0 -3
  72. package/dist/types/toolbar-flag-check.d.ts +0 -1
  73. package/toolbar-flag-check/package.json +0 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,69 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 137.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`cabf3c7e59b8d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cabf3c7e59b8d) -
8
+ Remove the `@atlaskit/editor-common/toolbar-flag-check` entry point and the
9
+ `areAnyNewToolbarFlagsEnabled` prop from `LinkToolbarButtonGroup`, `getButtonGroupOption`,
10
+ `CreditCheckedFloatingToolbarButton`, `getCreditCheckedFloatingToolbarItem`,
11
+ `DropdownMenuExtensionItems`, and the floating toolbar `Button` and `Separator` components.
12
+ `areToolbarFlagsEnabled` always returned `true` after the `platform_editor_controls` cleanup, so
13
+ these components now always render the new toolbar styles. Remove any import of
14
+ `toolbar-flag-check` and stop passing `areAnyNewToolbarFlagsEnabled`.
15
+
16
+ ### Minor Changes
17
+
18
+ - [`895e65e4d77e5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/895e65e4d77e5) -
19
+ Add optional getEmbedCardTransformNode to EmbedCardTransformers so the card toolbar can check
20
+ where a transformed embed would be inserted
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
26
+ ## 136.0.0
27
+
28
+ ### Major Changes
29
+
30
+ - [`f039487b0e531`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f039487b0e531) -
31
+ Remove the unused `bracketTyped` helper from `@atlaskit/editor-common/utils` and
32
+ `@atlaskit/editor-common/utils/document`, and the unused `layoutPlaceholder` message from
33
+ `@atlaskit/editor-common/messages/layout`. Neither has had a caller since the
34
+ `platform_editor_controls` experiment cleanup. If you import either, copy the implementation or
35
+ message into your package.
36
+
37
+ ### Minor Changes
38
+
39
+ - [`b39746d497598`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b39746d497598) -
40
+ Show "Feel free to keep editing, suggestions are on the way" in the AI suggestions thinking
41
+ messages behind platform_editor_ai_suggested_edits_reduce_cancel. Under the same experiment, size
42
+ the thinking bar to its longest rotating message so it doesn't resize between messages.
43
+ - [`8dcac7cf29ad6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8dcac7cf29ad6) -
44
+ EDITOR-10169: Add the Rovo Chat Content Reviewer analytics entry point for the
45
+ platform_editor_rovo_chat_review_cta experiment.
46
+
47
+ Track review generation outcomes for the new Rovo Chat entry point.
48
+
49
+ ### Patch Changes
50
+
51
+ - [`2177c03219c5c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2177c03219c5c) -
52
+ Check `getAICreditStatus` before more Remix buttons open Remix, showing the product's credits
53
+ content below the button when credits are blocked:
54
+
55
+ - the expand and nested expand toolbars, as `expandFloatingToolbar-remix`
56
+ - the layout toolbar, as `layoutFloatingToolbar-remix`
57
+ - the native tabs toolbar, as `nativeTabsFloatingToolbar-remix`
58
+ - the native embed toolbar, as `nativeEmbedFloatingToolbar-remix`
59
+
60
+ Adds these names and `nativeEmbedFloatingToolbar-askRovo` to the editor and Confluence credit
61
+ feature names.
62
+
63
+ - [`b2444e74978c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b2444e74978c4) -
64
+ Make the shipped editor memory-leak reductions permanent and remove the experiment checks.
65
+ - Updated dependencies
66
+
3
67
  ## 135.3.0
4
68
 
5
69
  ### Minor Changes
@@ -331,6 +331,11 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
331
331
  defaultMessage: 'This may take a few minutes',
332
332
  description: 'Loading message setting expectations that the AI review may take a few minutes'
333
333
  },
334
+ thinkingKeepEditing: {
335
+ id: 'fabric.editor.ai.suggestions.thinking.keepEditing.non-final',
336
+ defaultMessage: 'Feel free to keep editing, suggestions are on the way',
337
+ description: 'Loading message on the AI suggestions thinking bar telling the user the review is running and they can keep editing while suggestions are generated'
338
+ },
334
339
  thinkingReviewingConsistency: {
335
340
  id: 'fabric.editor.ai.suggestions.thinking.reviewingConsistency.non-final',
336
341
  defaultMessage: 'Reviewing consistency',
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.AiSuggestionsRightRailEntryPointValue = exports.AiSuggestionsRegenerationTriggerValue = exports.AiSuggestionsRegenerationOutcomeValue = exports.AiSuggestionsEntryPointValue = void 0;
7
7
  var AiSuggestionsEntryPointValue = exports.AiSuggestionsEntryPointValue = /*#__PURE__*/function (AiSuggestionsEntryPointValue) {
8
8
  AiSuggestionsEntryPointValue["PRIMARY_TOOLBAR"] = "primaryToolbar";
9
+ /** Content Reviewer quick action in the Rovo Chat editor empty state. */
10
+ AiSuggestionsEntryPointValue["ROVO_CHAT"] = "rovoChat";
9
11
  /**
10
12
  * @private
11
13
  * @deprecated Legacy entry point retained for backwards compatibility.
@@ -52,8 +52,7 @@ var LinkToolbarButtonGroup = exports.LinkToolbarButtonGroup = function LinkToolb
52
52
  testId = _ref3.testId,
53
53
  tooltipContent = _ref3.tooltipContent,
54
54
  title = _ref3.title,
55
- icon = _ref3.icon,
56
- areAnyNewToolbarFlagsEnabled = _ref3.areAnyNewToolbarFlagsEnabled;
55
+ icon = _ref3.icon;
57
56
  var ButtonIcon = icon;
58
57
  return (0, _react2.jsx)(DisallowedWrapper, {
59
58
  key: testId,
@@ -69,8 +68,7 @@ var LinkToolbarButtonGroup = exports.LinkToolbarButtonGroup = function LinkToolb
69
68
  onClick: onClick,
70
69
  testId: testId,
71
70
  disabled: disabled,
72
- tooltipContent: tooltipContent,
73
- areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
71
+ tooltipContent: tooltipContent
74
72
  }));
75
73
  }));
76
74
  };
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "appearancePropsMap", {
11
11
  });
12
12
  exports.getButtonGroupOption = void 0;
13
13
  var _appearancePropsMap2 = require("./appearancePropsMap");
14
- var getButtonGroupOption = exports.getButtonGroupOption = function getButtonGroupOption(intl, areAnyNewToolbarFlagsEnabled, dispatchCommand, _ref) {
14
+ var getButtonGroupOption = exports.getButtonGroupOption = function getButtonGroupOption(intl, dispatchCommand, _ref) {
15
15
  var disabled = _ref.disabled,
16
16
  _onClick = _ref.onClick,
17
17
  selected = _ref.selected,
@@ -30,8 +30,7 @@ var getButtonGroupOption = exports.getButtonGroupOption = function getButtonGrou
30
30
  disabled: Boolean(disabled),
31
31
  tooltipContent: tooltip || null,
32
32
  testId: testId,
33
- selected: selected,
34
- areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
33
+ selected: selected
35
34
  };
36
35
  };
37
36
  // eslint-disable-next-line @atlaskit/editor/no-re-export
@@ -20,8 +20,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
20
20
  * product's credits popup to itself when credits are blocked. Matches the floating toolbar's own buttons.
21
21
  */
22
22
  var CreditCheckedFloatingToolbarButton = exports.CreditCheckedFloatingToolbarButton = function CreditCheckedFloatingToolbarButton(_ref) {
23
- var areAnyNewToolbarFlagsEnabled = _ref.areAnyNewToolbarFlagsEnabled,
24
- button = _ref.button,
23
+ var button = _ref.button,
25
24
  creditCheck = _ref.creditCheck,
26
25
  getAICreditStatus = _ref.getAICreditStatus,
27
26
  view = _ref.view;
@@ -100,10 +99,9 @@ var CreditCheckedFloatingToolbarButton = exports.CreditCheckedFloatingToolbarBut
100
99
  isRadioButton: button.isRadioButton,
101
100
  pulse: button.pulse,
102
101
  testId: button.testId,
103
- interactionName: button.interactionName,
104
- areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
102
+ interactionName: button.interactionName
105
103
  }, showTitle && title);
106
- }, [areAnyNewToolbarFlagsEnabled, button, runCommand]);
104
+ }, [button, runCommand]);
107
105
  return /*#__PURE__*/_react.default.createElement(_CreditCheckedPopup.CreditCheckedPopup, {
108
106
  creditCheck: creditCheck,
109
107
  getAICreditStatus: getAICreditStatus,
@@ -9,8 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _CreditCheckedFloatingToolbarButton = require("./CreditCheckedFloatingToolbarButton");
10
10
  /** Wraps a floating toolbar button so it is credit checked, keeping its own appearance and handlers. */
11
11
  var getCreditCheckedFloatingToolbarItem = exports.getCreditCheckedFloatingToolbarItem = function getCreditCheckedFloatingToolbarItem(_ref) {
12
- var areAnyNewToolbarFlagsEnabled = _ref.areAnyNewToolbarFlagsEnabled,
13
- button = _ref.button,
12
+ var button = _ref.button,
14
13
  creditCheck = _ref.creditCheck,
15
14
  getAICreditStatus = _ref.getAICreditStatus;
16
15
  return {
@@ -19,7 +18,6 @@ var getCreditCheckedFloatingToolbarItem = exports.getCreditCheckedFloatingToolba
19
18
  render: function render(view, idx) {
20
19
  return /*#__PURE__*/_react.default.createElement(_CreditCheckedFloatingToolbarButton.CreditCheckedFloatingToolbarButton, {
21
20
  key: idx,
22
- areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled,
23
21
  button: button,
24
22
  creditCheck: creditCheck,
25
23
  getAICreditStatus: getAICreditStatus,
@@ -147,8 +147,7 @@ var DropdownMenuExtensionItems = exports.DropdownMenuExtensionItems = function D
147
147
  editorView = props.editorView,
148
148
  extension = props.extension,
149
149
  disabled = props.disabled,
150
- dropdownOptions = props.dropdownOptions,
151
- areAnyNewToolbarFlagsEnabled = props.areAnyNewToolbarFlagsEnabled;
150
+ dropdownOptions = props.dropdownOptions;
152
151
 
153
152
  // Ignored via go/ees005
154
153
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -214,5 +213,5 @@ var DropdownMenuExtensionItems = exports.DropdownMenuExtensionItems = function D
214
213
  extension: extension,
215
214
  dropdownOptions: dropdownOptions
216
215
  });
217
- }), areAnyNewToolbarFlagsEnabled && /*#__PURE__*/_react.default.createElement(_DropdownSeparator.DropdownSeparator, null));
216
+ }), /*#__PURE__*/_react.default.createElement(_DropdownSeparator.DropdownSeparator, null));
218
217
  };
@@ -76,11 +76,6 @@ var toolbarMessages = exports.toolbarMessages = (0, _reactIntl.defineMessages)({
76
76
  defaultMessage: 'Layout options',
77
77
  description: "a floating toolbar radiogroup's aria label"
78
78
  },
79
- layoutPlaceholder: {
80
- id: 'fabric.editor.layout.placeholder',
81
- defaultMessage: 'Add content',
82
- description: 'Placeholder text shown inside an empty layout column, prompting the user to add content.'
83
- },
84
79
  controlslayoutPlaceholder: {
85
80
  id: 'fabric.editor.layout.controls.placeholder',
86
81
  defaultMessage: '/ to insert',
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
27
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
28
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
29
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
30
- var packageVersion = "135.2.0";
30
+ var packageVersion = "136.0.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -8,41 +8,16 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.PortalBucket = PortalBucket;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
12
11
  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); }
13
- function LegacyPortalBucket(_ref) {
14
- var id = _ref.id,
15
- portalManager = _ref.portalManager;
16
- // State to hold the current portals for this bucket
17
- var _useState = (0, _react.useState)({}),
18
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
19
- portals = _useState2[0],
20
- setPortals = _useState2[1];
21
- // Effect to register/unregister this bucket with the portal manager on mount/unmount
22
- (0, _react.useLayoutEffect)(function () {
23
- portalManager.registerBucket(id, setPortals);
24
- return function () {
25
- portalManager.unregisterBucket(id);
26
- };
27
- }, [id, portalManager]);
28
- // Memoize the portal elements to avoid unnecessary re-renders
29
- var portalElements = (0, _react.useMemo)(function () {
30
- return Object.values(portals);
31
- }, [portals]);
32
- // Render the current portal elements
33
- // @ts-ignore - TS2322 TypeScript 5.9.2 upgrade
34
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, portalElements);
35
- }
36
-
37
12
  /**
38
13
  * Portals stay in the manager; state is only a render tick. React keeps
39
14
  * hook state on both the current and alternate fiber, so storing portals
40
15
  * in state would retain removed portals until the next render.
41
16
  */
42
- function TickPortalBucket(_ref2) {
17
+ function TickPortalBucket(_ref) {
43
18
  var _portalManager$getBuc, _portalManager$getBuc2;
44
- var id = _ref2.id,
45
- portalManager = _ref2.portalManager;
19
+ var id = _ref.id,
20
+ portalManager = _ref.portalManager;
46
21
  var _useReducer = (0, _react.useReducer)(function (tick) {
47
22
  return tick + 1;
48
23
  }, 0),
@@ -71,13 +46,10 @@ function TickPortalBucket(_ref2) {
71
46
  * @param {PortalManager} props.portalManager An instance of `PortalManager` which manages the registration and unregistration of portal buckets and their content.
72
47
  * @returns {React.ReactElement} The React element(s) that are currently registered to this portal bucket.
73
48
  */
74
- function PortalBucket(_ref3) {
75
- var id = _ref3.id,
76
- portalManager = _ref3.portalManager;
77
- return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_reduce_memory_leaks') ? /*#__PURE__*/_react.default.createElement(TickPortalBucket, {
78
- id: id,
79
- portalManager: portalManager
80
- }) : /*#__PURE__*/_react.default.createElement(LegacyPortalBucket, {
49
+ function PortalBucket(_ref2) {
50
+ var id = _ref2.id,
51
+ portalManager = _ref2.portalManager;
52
+ return /*#__PURE__*/_react.default.createElement(TickPortalBucket, {
81
53
  id: id,
82
54
  portalManager: portalManager
83
55
  });
@@ -10,7 +10,6 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
11
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
12
  var _throttle = _interopRequireDefault(require("lodash/throttle"));
13
- var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
15
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -207,7 +206,7 @@ var PortalManager = exports.PortalManager = /*#__PURE__*/function () {
207
206
  var _this$portalToBucketM,
208
207
  _this4 = this;
209
208
  var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
210
- if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_reduce_memory_leaks') || !this.portalToBucketMap.has(key)) {
209
+ if (!this.portalToBucketMap.has(key)) {
211
210
  this.createBucket();
212
211
  // @ts-ignore - TS2538 TypeScript 5.9.2 upgrade
213
212
  this.buckets[this.getCurrentBucket()].capacity -= 1;
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "135.2.0";
26
+ var packageVersion = "136.0.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -57,8 +57,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
57
57
  ariaLabel = _ref.ariaLabel,
58
58
  isRadioButton = _ref.isRadioButton,
59
59
  isLoading = _ref.isLoading,
60
- pulse = _ref.pulse,
61
- areAnyNewToolbarFlagsEnabled = _ref.areAnyNewToolbarFlagsEnabled;
60
+ pulse = _ref.pulse;
62
61
  // Check if there's only an icon and add additional styles
63
62
  var iconOnly = (icon || iconAfter) && !children;
64
63
  var customSpacing = iconOnly ? _iconOnlySpacing.iconOnlySpacing : {};
@@ -116,7 +115,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
116
115
  appearance: appearance,
117
116
  state: themeProps.state,
118
117
  mode: themeProps.mode
119
- })), areAnyNewToolbarFlagsEnabled ? customSizeAndPadding : {})
118
+ })), customSizeAndPadding)
120
119
  }, rest);
121
120
  },
122
121
  id: id,
@@ -126,7 +125,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
126
125
  role: isRadioButton ? 'radio' : undefined,
127
126
  "aria-expanded": ariaHasPopup ? selected : undefined,
128
127
  "aria-controls": ariaHasPopup ? areaControls : undefined,
129
- spacing: areAnyNewToolbarFlagsEnabled ? 'default' : 'compact',
128
+ spacing: "default",
130
129
  href: href,
131
130
  target: target,
132
131
  appearance: appearance,
@@ -12,13 +12,6 @@ var _react = require("@emotion/react");
12
12
  // 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
13
13
 
14
14
  var separator = (0, _react.css)({
15
- background: "var(--ds-border, #0B120E24)",
16
- width: '1px',
17
- height: '20px',
18
- margin: "0 ".concat("var(--ds-space-050, 4px)"),
19
- alignSelf: 'center'
20
- });
21
- var separatorNew = (0, _react.css)({
22
15
  background: "var(--ds-border, #0B120E24)",
23
16
  width: '1px',
24
17
  height: '20px',
@@ -28,10 +21,9 @@ var separatorFullHeight = (0, _react.css)({
28
21
  height: '40px'
29
22
  });
30
23
  var _default = exports.default = function _default(_ref) {
31
- var fullHeight = _ref.fullHeight,
32
- areAnyNewToolbarFlagsEnabled = _ref.areAnyNewToolbarFlagsEnabled;
24
+ var fullHeight = _ref.fullHeight;
33
25
  return (0, _react.jsx)("div", {
34
- css: [areAnyNewToolbarFlagsEnabled ? separatorNew : separator, fullHeight && separatorFullHeight]
26
+ css: [separator, fullHeight && separatorFullHeight]
35
27
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
36
28
  ,
37
29
  className: "separator"
@@ -289,6 +289,6 @@ function getFilteredFocusableElements(rootNode) {
289
289
  return getFocusableElements(rootNode).filter(function (elm) {
290
290
  // Check if element or any ancestor is hidden or disabled
291
291
  var isHiddenOrDisabled = isElementOrAncestorHiddenOrDisabled(elm, rootNode);
292
- return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('[data-keyboard-navigation-independent]') && !elm.closest('.scroll-buttons') && !isHiddenOrDisabled;
292
+ return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('[data-keyboard-navigation-independent]') && !isHiddenOrDisabled;
293
293
  });
294
294
  }
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.areNodesEqualIgnoreAttrs = areNodesEqualIgnoreAttrs;
8
- exports.bracketTyped = bracketTyped;
9
8
  exports.getChangedNodes = getChangedNodes;
10
9
  Object.defineProperty(exports, "getStepRange", {
11
10
  enumerable: true,
@@ -51,26 +50,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
51
50
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
52
51
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
53
52
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
54
- function bracketTyped(state) {
55
- var selection = state.selection;
56
- var _ref = selection,
57
- $cursor = _ref.$cursor,
58
- $anchor = _ref.$anchor;
59
- if (!$cursor) {
60
- return false;
61
- }
62
- var node = $cursor.nodeBefore;
63
- if (!node) {
64
- return false;
65
- }
66
- if (node.type.name === 'text' && node.text === '{') {
67
- var paragraphNode = $anchor.node();
68
- return paragraphNode.marks.length === 0 && (0, _hasDocAsParent.hasDocAsParent)($anchor);
69
- }
70
- return false;
71
- }
72
-
73
- // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
74
53
  function nodesBetweenChanged(tr, f, startPos) {
75
54
  var stepRange = (0, _getStepRange.getStepRange)(tr);
76
55
  if (!stepRange) {
@@ -78,9 +57,9 @@ function nodesBetweenChanged(tr, f, startPos) {
78
57
  }
79
58
  tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
80
59
  }
81
- function getChangedNodesIn(_ref2) {
82
- var tr = _ref2.tr,
83
- doc = _ref2.doc;
60
+ function getChangedNodesIn(_ref) {
61
+ var tr = _ref.tr,
62
+ doc = _ref.doc;
84
63
  var nodes = [];
85
64
  var stepRange = (0, _getStepRange.getStepRange)(tr);
86
65
  if (!stepRange) {
@@ -124,12 +124,6 @@ Object.defineProperty(exports, "autoJoinTr", {
124
124
  return _autojoin.autoJoinTr;
125
125
  }
126
126
  });
127
- Object.defineProperty(exports, "bracketTyped", {
128
- enumerable: true,
129
- get: function get() {
130
- return _document.bracketTyped;
131
- }
132
- });
133
127
  Object.defineProperty(exports, "breakoutConsts", {
134
128
  enumerable: true,
135
129
  get: function get() {
@@ -325,6 +325,11 @@ export const aiSuggestionsMessages = defineMessages({
325
325
  defaultMessage: 'This may take a few minutes',
326
326
  description: 'Loading message setting expectations that the AI review may take a few minutes'
327
327
  },
328
+ thinkingKeepEditing: {
329
+ id: 'fabric.editor.ai.suggestions.thinking.keepEditing.non-final',
330
+ defaultMessage: 'Feel free to keep editing, suggestions are on the way',
331
+ description: 'Loading message on the AI suggestions thinking bar telling the user the review is running and they can keep editing while suggestions are generated'
332
+ },
328
333
  thinkingReviewingConsistency: {
329
334
  id: 'fabric.editor.ai.suggestions.thinking.reviewingConsistency.non-final',
330
335
  defaultMessage: 'Reviewing consistency',
@@ -1,5 +1,7 @@
1
1
  export let AiSuggestionsEntryPointValue = /*#__PURE__*/function (AiSuggestionsEntryPointValue) {
2
2
  AiSuggestionsEntryPointValue["PRIMARY_TOOLBAR"] = "primaryToolbar";
3
+ /** Content Reviewer quick action in the Rovo Chat editor empty state. */
4
+ AiSuggestionsEntryPointValue["ROVO_CHAT"] = "rovoChat";
3
5
  /**
4
6
  * @private
5
7
  * @deprecated Legacy entry point retained for backwards compatibility.
@@ -47,8 +47,7 @@ export const LinkToolbarButtonGroup = ({
47
47
  testId,
48
48
  tooltipContent,
49
49
  title,
50
- icon,
51
- areAnyNewToolbarFlagsEnabled
50
+ icon
52
51
  }) => {
53
52
  const ButtonIcon = icon;
54
53
  return jsx(DisallowedWrapper, {
@@ -65,8 +64,7 @@ export const LinkToolbarButtonGroup = ({
65
64
  onClick: onClick,
66
65
  testId: testId,
67
66
  disabled: disabled,
68
- tooltipContent: tooltipContent,
69
- areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
67
+ tooltipContent: tooltipContent
70
68
  }));
71
69
  }));
72
70
  };
@@ -1,5 +1,5 @@
1
1
  import { appearancePropsMap } from './appearancePropsMap';
2
- export const getButtonGroupOption = (intl, areAnyNewToolbarFlagsEnabled, dispatchCommand, {
2
+ export const getButtonGroupOption = (intl, dispatchCommand, {
3
3
  disabled,
4
4
  onClick,
5
5
  selected,
@@ -18,8 +18,7 @@ export const getButtonGroupOption = (intl, areAnyNewToolbarFlagsEnabled, dispatc
18
18
  disabled: Boolean(disabled),
19
19
  tooltipContent: tooltip || null,
20
20
  testId,
21
- selected,
22
- areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
21
+ selected
23
22
  };
24
23
  };
25
24
  // eslint-disable-next-line @atlaskit/editor/no-re-export
@@ -12,7 +12,6 @@ import { CreditCheckedPopup } from './CreditCheckedPopup';
12
12
  * product's credits popup to itself when credits are blocked. Matches the floating toolbar's own buttons.
13
13
  */
14
14
  export const CreditCheckedFloatingToolbarButton = ({
15
- areAnyNewToolbarFlagsEnabled,
16
15
  button,
17
16
  creditCheck,
18
17
  getAICreditStatus,
@@ -88,10 +87,9 @@ export const CreditCheckedFloatingToolbarButton = ({
88
87
  isRadioButton: button.isRadioButton,
89
88
  pulse: button.pulse,
90
89
  testId: button.testId,
91
- interactionName: button.interactionName,
92
- areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
90
+ interactionName: button.interactionName
93
91
  }, showTitle && title);
94
- }, [areAnyNewToolbarFlagsEnabled, button, runCommand]);
92
+ }, [button, runCommand]);
95
93
  return /*#__PURE__*/React.createElement(CreditCheckedPopup, {
96
94
  creditCheck: creditCheck,
97
95
  getAICreditStatus: getAICreditStatus,
@@ -3,7 +3,6 @@ import { CreditCheckedFloatingToolbarButton } from './CreditCheckedFloatingToolb
3
3
 
4
4
  /** Wraps a floating toolbar button so it is credit checked, keeping its own appearance and handlers. */
5
5
  export const getCreditCheckedFloatingToolbarItem = ({
6
- areAnyNewToolbarFlagsEnabled,
7
6
  button,
8
7
  creditCheck,
9
8
  getAICreditStatus
@@ -12,7 +11,6 @@ export const getCreditCheckedFloatingToolbarItem = ({
12
11
  fallback: [],
13
12
  render: (view, idx) => /*#__PURE__*/React.createElement(CreditCheckedFloatingToolbarButton, {
14
13
  key: idx,
15
- areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled,
16
14
  button: button,
17
15
  creditCheck: creditCheck,
18
16
  getAICreditStatus: getAICreditStatus,
@@ -107,8 +107,7 @@ export const DropdownMenuExtensionItems = props => {
107
107
  editorView,
108
108
  extension,
109
109
  disabled,
110
- dropdownOptions,
111
- areAnyNewToolbarFlagsEnabled
110
+ dropdownOptions
112
111
  } = props;
113
112
 
114
113
  // Ignored via go/ees005
@@ -146,5 +145,5 @@ export const DropdownMenuExtensionItems = props => {
146
145
  extension: extension,
147
146
  dropdownOptions: dropdownOptions
148
147
  });
149
- }), areAnyNewToolbarFlagsEnabled && /*#__PURE__*/React.createElement(DropdownSeparator, null));
148
+ }), /*#__PURE__*/React.createElement(DropdownSeparator, null));
150
149
  };
@@ -70,11 +70,6 @@ export const toolbarMessages = defineMessages({
70
70
  defaultMessage: 'Layout options',
71
71
  description: "a floating toolbar radiogroup's aria label"
72
72
  },
73
- layoutPlaceholder: {
74
- id: 'fabric.editor.layout.placeholder',
75
- defaultMessage: 'Add content',
76
- description: 'Placeholder text shown inside an empty layout column, prompting the user to add content.'
77
- },
78
73
  controlslayoutPlaceholder: {
79
74
  id: 'fabric.editor.layout.controls.placeholder',
80
75
  defaultMessage: '/ to insert',
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "135.2.0";
16
+ const packageVersion = "136.0.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -1,25 +1,4 @@
1
- import React, { useCallback, useLayoutEffect, useMemo, useReducer, useState } from 'react';
2
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
3
- function LegacyPortalBucket({
4
- id,
5
- portalManager
6
- }) {
7
- // State to hold the current portals for this bucket
8
- const [portals, setPortals] = useState({});
9
- // Effect to register/unregister this bucket with the portal manager on mount/unmount
10
- useLayoutEffect(() => {
11
- portalManager.registerBucket(id, setPortals);
12
- return () => {
13
- portalManager.unregisterBucket(id);
14
- };
15
- }, [id, portalManager]);
16
- // Memoize the portal elements to avoid unnecessary re-renders
17
- const portalElements = useMemo(() => Object.values(portals), [portals]);
18
- // Render the current portal elements
19
- // @ts-ignore - TS2322 TypeScript 5.9.2 upgrade
20
- return /*#__PURE__*/React.createElement(React.Fragment, null, portalElements);
21
- }
22
-
1
+ import React, { useCallback, useLayoutEffect, useReducer } from 'react';
23
2
  /**
24
3
  * Portals stay in the manager; state is only a render tick. React keeps
25
4
  * hook state on both the current and alternate fiber, so storing portals
@@ -56,10 +35,7 @@ export function PortalBucket({
56
35
  id,
57
36
  portalManager
58
37
  }) {
59
- return isExperimentEnabled('platform_editor_reduce_memory_leaks') ? /*#__PURE__*/React.createElement(TickPortalBucket, {
60
- id: id,
61
- portalManager: portalManager
62
- }) : /*#__PURE__*/React.createElement(LegacyPortalBucket, {
38
+ return /*#__PURE__*/React.createElement(TickPortalBucket, {
63
39
  id: id,
64
40
  portalManager: portalManager
65
41
  });
@@ -1,6 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import throttle from 'lodash/throttle';
3
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  const DEFAULT_INITIAL_BUCKETS = 50;
6
5
  const DEFAULT_MAX_BUCKET_CAPACITY = 50;
@@ -163,7 +162,7 @@ export class PortalManager {
163
162
  }
164
163
  registerPortal(key, portal, immediate = false) {
165
164
  var _this$portalToBucketM;
166
- if (!isExperimentEnabled('platform_editor_reduce_memory_leaks') || !this.portalToBucketMap.has(key)) {
165
+ if (!this.portalToBucketMap.has(key)) {
167
166
  this.createBucket();
168
167
  // @ts-ignore - TS2538 TypeScript 5.9.2 upgrade
169
168
  this.buckets[this.getCurrentBucket()].capacity -= 1;