@atlaskit/editor-common 135.3.0 → 136.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 (35) hide show
  1. package/CHANGELOG.md +41 -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/messages/layout.js +0 -5
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/portal/PortalBucket.js +7 -35
  7. package/dist/cjs/portal/PortalManager.js +1 -2
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/cjs/utils/document.js +3 -24
  10. package/dist/cjs/utils/index.js +0 -6
  11. package/dist/es2019/ai-messages/ai-suggestions.js +5 -0
  12. package/dist/es2019/analytics/types/ai-suggestions-events.js +2 -0
  13. package/dist/es2019/messages/layout.js +0 -5
  14. package/dist/es2019/monitoring/error.js +1 -1
  15. package/dist/es2019/portal/PortalBucket.js +2 -26
  16. package/dist/es2019/portal/PortalManager.js +1 -2
  17. package/dist/es2019/ui/DropList/index.js +1 -1
  18. package/dist/es2019/utils/document.js +0 -24
  19. package/dist/es2019/utils/index.js +1 -1
  20. package/dist/esm/ai-messages/ai-suggestions.js +5 -0
  21. package/dist/esm/analytics/types/ai-suggestions-events.js +2 -0
  22. package/dist/esm/messages/layout.js +0 -5
  23. package/dist/esm/monitoring/error.js +1 -1
  24. package/dist/esm/portal/PortalBucket.js +8 -36
  25. package/dist/esm/portal/PortalManager.js +1 -2
  26. package/dist/esm/ui/DropList/index.js +1 -1
  27. package/dist/esm/utils/document.js +3 -24
  28. package/dist/esm/utils/index.js +1 -1
  29. package/dist/types/ai-messages/ai-suggestions.d.ts +5 -0
  30. package/dist/types/analytics/types/ai-suggestions-events.d.ts +2 -0
  31. package/dist/types/credit-guard/types.d.ts +1 -1
  32. package/dist/types/messages/layout.d.ts +0 -5
  33. package/dist/types/utils/document.d.ts +0 -1
  34. package/dist/types/utils/index.d.ts +1 -1
  35. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 136.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f039487b0e531`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f039487b0e531) -
8
+ Remove the unused `bracketTyped` helper from `@atlaskit/editor-common/utils` and
9
+ `@atlaskit/editor-common/utils/document`, and the unused `layoutPlaceholder` message from
10
+ `@atlaskit/editor-common/messages/layout`. Neither has had a caller since the
11
+ `platform_editor_controls` experiment cleanup. If you import either, copy the implementation or
12
+ message into your package.
13
+
14
+ ### Minor Changes
15
+
16
+ - [`b39746d497598`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b39746d497598) -
17
+ Show "Feel free to keep editing, suggestions are on the way" in the AI suggestions thinking
18
+ messages behind platform_editor_ai_suggested_edits_reduce_cancel. Under the same experiment, size
19
+ the thinking bar to its longest rotating message so it doesn't resize between messages.
20
+ - [`8dcac7cf29ad6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8dcac7cf29ad6) -
21
+ EDITOR-10169: Add the Rovo Chat Content Reviewer analytics entry point for the
22
+ platform_editor_rovo_chat_review_cta experiment.
23
+
24
+ Track review generation outcomes for the new Rovo Chat entry point.
25
+
26
+ ### Patch Changes
27
+
28
+ - [`2177c03219c5c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2177c03219c5c) -
29
+ Check `getAICreditStatus` before more Remix buttons open Remix, showing the product's credits
30
+ content below the button when credits are blocked:
31
+
32
+ - the expand and nested expand toolbars, as `expandFloatingToolbar-remix`
33
+ - the layout toolbar, as `layoutFloatingToolbar-remix`
34
+ - the native tabs toolbar, as `nativeTabsFloatingToolbar-remix`
35
+ - the native embed toolbar, as `nativeEmbedFloatingToolbar-remix`
36
+
37
+ Adds these names and `nativeEmbedFloatingToolbar-askRovo` to the editor and Confluence credit
38
+ feature names.
39
+
40
+ - [`b2444e74978c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b2444e74978c4) -
41
+ Make the shipped editor memory-leak reductions permanent and remove the experiment checks.
42
+ - Updated dependencies
43
+
3
44
  ## 135.3.0
4
45
 
5
46
  ### 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.
@@ -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 = "135.3.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 = "135.3.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -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.
@@ -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 = "135.3.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;
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "135.2.0";
16
+ const packageVersion = "135.3.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -1,29 +1,5 @@
1
1
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
2
2
  import { getStepRange } from './getStepRange';
3
- import { hasDocAsParent } from './hasDocAsParent';
4
- export function bracketTyped(state) {
5
- const {
6
- selection
7
- } = state;
8
- const {
9
- $cursor,
10
- $anchor
11
- } = selection;
12
- if (!$cursor) {
13
- return false;
14
- }
15
- const node = $cursor.nodeBefore;
16
- if (!node) {
17
- return false;
18
- }
19
- if (node.type.name === 'text' && node.text === '{') {
20
- const paragraphNode = $anchor.node();
21
- return paragraphNode.marks.length === 0 && hasDocAsParent($anchor);
22
- }
23
- return false;
24
- }
25
-
26
- // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
27
3
  export function nodesBetweenChanged(tr, f, startPos) {
28
4
  const stepRange = getStepRange(tr);
29
5
  if (!stepRange) {
@@ -162,7 +162,7 @@ export { gridTypeForLayout } from './grid';
162
162
  *
163
163
  * Use `@atlaskit/editor-common/utils/document` entry-point instead.
164
164
  */
165
- export { nodesBetweenChanged, bracketTyped, getChangedNodes } from './document';
165
+ export { nodesBetweenChanged, getChangedNodes } from './document';
166
166
  export { getStepRange } from './getStepRange';
167
167
  export { hasDocAsParent } from './hasDocAsParent';
168
168
  export { hasVisibleContent } from './hasVisibleContent';
@@ -325,6 +325,11 @@ export var 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 var 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.
@@ -70,11 +70,6 @@ export var 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',
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
19
19
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "135.2.0";
22
+ var packageVersion = "135.3.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -1,39 +1,14 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useCallback, useLayoutEffect, useMemo, useReducer, useState } from 'react';
3
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
- function LegacyPortalBucket(_ref) {
5
- var id = _ref.id,
6
- portalManager = _ref.portalManager;
7
- // State to hold the current portals for this bucket
8
- var _useState = useState({}),
9
- _useState2 = _slicedToArray(_useState, 2),
10
- portals = _useState2[0],
11
- setPortals = _useState2[1];
12
- // Effect to register/unregister this bucket with the portal manager on mount/unmount
13
- useLayoutEffect(function () {
14
- portalManager.registerBucket(id, setPortals);
15
- return function () {
16
- portalManager.unregisterBucket(id);
17
- };
18
- }, [id, portalManager]);
19
- // Memoize the portal elements to avoid unnecessary re-renders
20
- var portalElements = useMemo(function () {
21
- return Object.values(portals);
22
- }, [portals]);
23
- // Render the current portal elements
24
- // @ts-ignore - TS2322 TypeScript 5.9.2 upgrade
25
- return /*#__PURE__*/React.createElement(React.Fragment, null, portalElements);
26
- }
27
-
2
+ import React, { useCallback, useLayoutEffect, useReducer } from 'react';
28
3
  /**
29
4
  * Portals stay in the manager; state is only a render tick. React keeps
30
5
  * hook state on both the current and alternate fiber, so storing portals
31
6
  * in state would retain removed portals until the next render.
32
7
  */
33
- function TickPortalBucket(_ref2) {
8
+ function TickPortalBucket(_ref) {
34
9
  var _portalManager$getBuc, _portalManager$getBuc2;
35
- var id = _ref2.id,
36
- portalManager = _ref2.portalManager;
10
+ var id = _ref.id,
11
+ portalManager = _ref.portalManager;
37
12
  var _useReducer = useReducer(function (tick) {
38
13
  return tick + 1;
39
14
  }, 0),
@@ -62,13 +37,10 @@ function TickPortalBucket(_ref2) {
62
37
  * @param {PortalManager} props.portalManager An instance of `PortalManager` which manages the registration and unregistration of portal buckets and their content.
63
38
  * @returns {React.ReactElement} The React element(s) that are currently registered to this portal bucket.
64
39
  */
65
- export function PortalBucket(_ref3) {
66
- var id = _ref3.id,
67
- portalManager = _ref3.portalManager;
68
- return isExperimentEnabled('platform_editor_reduce_memory_leaks') ? /*#__PURE__*/React.createElement(TickPortalBucket, {
69
- id: id,
70
- portalManager: portalManager
71
- }) : /*#__PURE__*/React.createElement(LegacyPortalBucket, {
40
+ export function PortalBucket(_ref2) {
41
+ var id = _ref2.id,
42
+ portalManager = _ref2.portalManager;
43
+ return /*#__PURE__*/React.createElement(TickPortalBucket, {
72
44
  id: id,
73
45
  portalManager: portalManager
74
46
  });
@@ -5,7 +5,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  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; }
6
6
  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) { _defineProperty(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; }
7
7
  import throttle from 'lodash/throttle';
8
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
9
  var DEFAULT_INITIAL_BUCKETS = 50;
11
10
  var DEFAULT_MAX_BUCKET_CAPACITY = 50;
@@ -200,7 +199,7 @@ export var PortalManager = /*#__PURE__*/function () {
200
199
  var _this$portalToBucketM,
201
200
  _this4 = this;
202
201
  var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
203
- if (!isExperimentEnabled('platform_editor_reduce_memory_leaks') || !this.portalToBucketMap.has(key)) {
202
+ if (!this.portalToBucketMap.has(key)) {
204
203
  this.createBucket();
205
204
  // @ts-ignore - TS2538 TypeScript 5.9.2 upgrade
206
205
  this.buckets[this.getCurrentBucket()].capacity -= 1;
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "135.2.0";
23
+ var packageVersion = "135.3.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -6,27 +6,6 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
6
6
  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; }
7
7
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
8
8
  import { getStepRange } from './getStepRange';
9
- import { hasDocAsParent } from './hasDocAsParent';
10
- export function bracketTyped(state) {
11
- var selection = state.selection;
12
- var _ref = selection,
13
- $cursor = _ref.$cursor,
14
- $anchor = _ref.$anchor;
15
- if (!$cursor) {
16
- return false;
17
- }
18
- var node = $cursor.nodeBefore;
19
- if (!node) {
20
- return false;
21
- }
22
- if (node.type.name === 'text' && node.text === '{') {
23
- var paragraphNode = $anchor.node();
24
- return paragraphNode.marks.length === 0 && hasDocAsParent($anchor);
25
- }
26
- return false;
27
- }
28
-
29
- // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
30
9
  export function nodesBetweenChanged(tr, f, startPos) {
31
10
  var stepRange = getStepRange(tr);
32
11
  if (!stepRange) {
@@ -34,9 +13,9 @@ export function nodesBetweenChanged(tr, f, startPos) {
34
13
  }
35
14
  tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
36
15
  }
37
- function getChangedNodesIn(_ref2) {
38
- var tr = _ref2.tr,
39
- doc = _ref2.doc;
16
+ function getChangedNodesIn(_ref) {
17
+ var tr = _ref.tr,
18
+ doc = _ref.doc;
40
19
  var nodes = [];
41
20
  var stepRange = getStepRange(tr);
42
21
  if (!stepRange) {
@@ -162,7 +162,7 @@ export { gridTypeForLayout } from './grid';
162
162
  *
163
163
  * Use `@atlaskit/editor-common/utils/document` entry-point instead.
164
164
  */
165
- export { nodesBetweenChanged, bracketTyped, getChangedNodes } from './document';
165
+ export { nodesBetweenChanged, getChangedNodes } from './document';
166
166
  export { getStepRange } from './getStepRange';
167
167
  export { hasDocAsParent } from './hasDocAsParent';
168
168
  export { hasVisibleContent } from './hasVisibleContent';
@@ -398,6 +398,11 @@ export declare const aiSuggestionsMessages: {
398
398
  description: string;
399
399
  id: string;
400
400
  };
401
+ thinkingKeepEditing: {
402
+ defaultMessage: string;
403
+ description: string;
404
+ id: string;
405
+ };
401
406
  thinkingMayTakeAFewMinutes: {
402
407
  defaultMessage: string;
403
408
  description: string;
@@ -2,6 +2,8 @@ import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
2
  import type { OperationalAEP, TrackAEP } from './utils';
3
3
  export declare enum AiSuggestionsEntryPointValue {
4
4
  PRIMARY_TOOLBAR = "primaryToolbar",
5
+ /** Content Reviewer quick action in the Rovo Chat editor empty state. */
6
+ ROVO_CHAT = "rovoChat",
5
7
  /**
6
8
  * @private
7
9
  * @deprecated Legacy entry point retained for backwards compatibility.
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- export type EditorAICreditFeatureName = 'blockMenu-askRovo' | 'blockMenu-remix' | 'selectionToolbar-askRovo' | 'selectionToolbar-remix' | 'commentEditor-askRovo' | 'quickInsert-askRovo' | 'elementBrowser-askRovo' | 'panelFloatingToolbar-remix' | 'primaryToolbar-write' | 'mediaFloatingToolbar-editImage' | 'tableFloatingToolbar-remix' | 'smartLinkFloatingToolbar-askRovo' | 'codeBlockFloatingToolbar-remix' | 'imageGenerationMediaInsert' | 'blockControls-remix';
2
+ export type EditorAICreditFeatureName = 'blockMenu-askRovo' | 'blockMenu-remix' | 'selectionToolbar-askRovo' | 'selectionToolbar-remix' | 'commentEditor-askRovo' | 'quickInsert-askRovo' | 'elementBrowser-askRovo' | 'panelFloatingToolbar-remix' | 'primaryToolbar-write' | 'mediaFloatingToolbar-editImage' | 'tableFloatingToolbar-remix' | 'smartLinkFloatingToolbar-askRovo' | 'codeBlockFloatingToolbar-remix' | 'expandFloatingToolbar-remix' | 'layoutFloatingToolbar-remix' | 'nativeTabsFloatingToolbar-remix' | 'nativeEmbedFloatingToolbar-remix' | 'nativeEmbedFloatingToolbar-askRovo' | 'imageGenerationMediaInsert' | 'blockControls-remix';
3
3
  export type AICreditCheck = {
4
4
  featureName: EditorAICreditFeatureName;
5
5
  };
@@ -74,11 +74,6 @@ export declare const toolbarMessages: {
74
74
  description: string;
75
75
  id: string;
76
76
  };
77
- layoutPlaceholder: {
78
- defaultMessage: string;
79
- description: string;
80
- id: string;
81
- };
82
77
  leftSidebar: {
83
78
  defaultMessage: string;
84
79
  description: string;
@@ -1,7 +1,6 @@
1
1
  import type { Node } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  type ChangedFn = (node: Node, pos: number, parent: Node | null, index: number) => boolean | void;
4
- export declare function bracketTyped(state: EditorState): boolean;
5
4
  export declare function nodesBetweenChanged(tr: Transaction | ReadonlyTransaction, f: ChangedFn, startPos?: number): void;
6
5
  export declare function getChangedNodes(tr: ReadonlyTransaction | Transaction): {
7
6
  node: Node;
@@ -167,7 +167,7 @@ export { gridTypeForLayout } from './grid';
167
167
  *
168
168
  * Use `@atlaskit/editor-common/utils/document` entry-point instead.
169
169
  */
170
- export { nodesBetweenChanged, bracketTyped, getChangedNodes } from './document';
170
+ export { nodesBetweenChanged, getChangedNodes } from './document';
171
171
  export { getStepRange } from './getStepRange';
172
172
  export { hasDocAsParent } from './hasDocAsParent';
173
173
  export { hasVisibleContent } from './hasVisibleContent';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "135.3.0",
3
+ "version": "136.0.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/editor-json-transformer": "^10.0.0",
46
46
  "@atlaskit/editor-palette": "^3.5.0",
47
47
  "@atlaskit/editor-prosemirror": "^9.0.0",
48
- "@atlaskit/editor-shared-styles": "^5.1.0",
48
+ "@atlaskit/editor-shared-styles": "^5.2.0",
49
49
  "@atlaskit/editor-tables": "^3.2.0",
50
50
  "@atlaskit/editor-toolbar": "^2.11.0",
51
51
  "@atlaskit/editor-toolbar-model": "^1.2.0",
@@ -54,8 +54,8 @@
54
54
  "@atlaskit/feature-gate-js-client": "^8.0.0",
55
55
  "@atlaskit/icon": "^38.1.0",
56
56
  "@atlaskit/link": "^5.1.0",
57
- "@atlaskit/link-datasource": "^7.14.0",
58
- "@atlaskit/link-picker": "^6.21.0",
57
+ "@atlaskit/link-datasource": "^7.15.0",
58
+ "@atlaskit/link-picker": "^6.22.0",
59
59
  "@atlaskit/linking-common": "^13.0.0",
60
60
  "@atlaskit/logo": "^23.3.0",
61
61
  "@atlaskit/media-card": "^82.3.0",
@@ -81,8 +81,8 @@
81
81
  "@atlaskit/react-compiler-gating": "^0.2.0",
82
82
  "@atlaskit/react-ufo": "^8.5.0",
83
83
  "@atlaskit/section-message": "^10.3.0",
84
- "@atlaskit/smart-card": "^46.17.0",
85
- "@atlaskit/smart-user-picker": "^12.13.0",
84
+ "@atlaskit/smart-card": "^46.18.0",
85
+ "@atlaskit/smart-user-picker": "^12.14.0",
86
86
  "@atlaskit/spinner": "^20.4.0",
87
87
  "@atlaskit/task-decision": "^21.16.0",
88
88
  "@atlaskit/teams-app-config": "^3.1.0",