@atlaskit/editor-common 110.46.1 → 110.46.3

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 (58) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/cjs/analytics/types/enums.js +1 -0
  3. package/dist/cjs/messages/find-replace.js +5 -0
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/quick-insert/messages.js +10 -0
  6. package/dist/cjs/styles/shared/sync-block.js +2 -1
  7. package/dist/cjs/sync-block.js +6 -0
  8. package/dist/cjs/transforms/index.js +6 -0
  9. package/dist/cjs/transforms/sync-block.js +30 -1
  10. package/dist/cjs/ui/DropList/index.js +1 -1
  11. package/dist/cjs/ui/HoverLinkOverlay/index.js +2 -2
  12. package/dist/cjs/utils/breakout.js +13 -2
  13. package/dist/cjs/utils/index.js +12 -0
  14. package/dist/es2019/analytics/types/enums.js +1 -0
  15. package/dist/es2019/messages/find-replace.js +5 -0
  16. package/dist/es2019/monitoring/error.js +1 -1
  17. package/dist/es2019/quick-insert/messages.js +10 -0
  18. package/dist/es2019/styles/shared/sync-block.js +1 -0
  19. package/dist/es2019/sync-block.js +1 -1
  20. package/dist/es2019/transforms/index.js +1 -1
  21. package/dist/es2019/transforms/sync-block.js +29 -0
  22. package/dist/es2019/ui/DropList/index.js +1 -1
  23. package/dist/es2019/ui/HoverLinkOverlay/index.js +2 -2
  24. package/dist/es2019/utils/breakout.js +11 -0
  25. package/dist/es2019/utils/index.js +1 -1
  26. package/dist/esm/analytics/types/enums.js +1 -0
  27. package/dist/esm/messages/find-replace.js +5 -0
  28. package/dist/esm/monitoring/error.js +1 -1
  29. package/dist/esm/quick-insert/messages.js +10 -0
  30. package/dist/esm/styles/shared/sync-block.js +1 -0
  31. package/dist/esm/sync-block.js +1 -1
  32. package/dist/esm/transforms/index.js +1 -1
  33. package/dist/esm/transforms/sync-block.js +29 -0
  34. package/dist/esm/ui/DropList/index.js +1 -1
  35. package/dist/esm/ui/HoverLinkOverlay/index.js +2 -2
  36. package/dist/esm/utils/breakout.js +10 -0
  37. package/dist/esm/utils/index.js +1 -1
  38. package/dist/types/analytics/types/enums.d.ts +1 -0
  39. package/dist/types/analytics/types/general-events.d.ts +4 -1
  40. package/dist/types/messages/find-replace.d.ts +5 -0
  41. package/dist/types/quick-insert/messages.d.ts +10 -0
  42. package/dist/types/styles/shared/sync-block.d.ts +1 -0
  43. package/dist/types/sync-block.d.ts +1 -1
  44. package/dist/types/transforms/index.d.ts +1 -1
  45. package/dist/types/transforms/sync-block.d.ts +15 -0
  46. package/dist/types/utils/breakout.d.ts +3 -0
  47. package/dist/types/utils/index.d.ts +1 -1
  48. package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
  49. package/dist/types-ts4.5/analytics/types/general-events.d.ts +4 -1
  50. package/dist/types-ts4.5/messages/find-replace.d.ts +5 -0
  51. package/dist/types-ts4.5/quick-insert/messages.d.ts +10 -0
  52. package/dist/types-ts4.5/styles/shared/sync-block.d.ts +1 -0
  53. package/dist/types-ts4.5/sync-block.d.ts +1 -1
  54. package/dist/types-ts4.5/transforms/index.d.ts +1 -1
  55. package/dist/types-ts4.5/transforms/sync-block.d.ts +15 -0
  56. package/dist/types-ts4.5/utils/breakout.d.ts +3 -0
  57. package/dist/types-ts4.5/utils/index.d.ts +1 -1
  58. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.46.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`79172823f4e47`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/79172823f4e47) -
8
+ [ux] EDITOR-3961 strip breakout mark from renderer sync block html
9
+ - [`a528ea956ce65`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a528ea956ce65) -
10
+ [ux] EDITOR-3956 fix sync block resize handle padding and alignment
11
+ - Updated dependencies
12
+
13
+ ## 110.46.2
14
+
15
+ ### Patch Changes
16
+
17
+ - [`53aef9589ca55`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/53aef9589ca55) -
18
+ [EDITOR-3786] Make sure that for any check of `cc_editor_ai_content_mode` &&
19
+ `platform_editor_content_mode_button_mvp` in the code we are also checking
20
+ `confluence_compact_text_format`
21
+ - [`06de6cb74b477`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/06de6cb74b477) -
22
+ [ux] [ENGHEALTH-47507] internationalise strings behind feature gate platform_editor_dec_a11y_fixes
23
+ - [`c32dc3155a31a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c32dc3155a31a) -
24
+ Added an organic changes monitor which will reported anayltics when an organic change occurs. The
25
+ new analytic will contain extra information regarding only the transaction which caused the
26
+ organic change.
27
+ - Updated dependencies
28
+
3
29
  ## 110.46.1
4
30
 
5
31
  ### Patch Changes
@@ -166,6 +166,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
166
166
  ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
167
167
  ACTION["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
168
168
  ACTION["STEPS_TRACKED"] = "stepsTracked";
169
+ ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
169
170
  ACTION["STEPS_FILTERED"] = "stepsFiltered";
170
171
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
171
172
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
@@ -26,6 +26,11 @@ var findReplaceMessages = exports.findReplaceMessages = (0, _reactIntlNext.defin
26
26
  defaultMessage: 'Find previous',
27
27
  description: 'Locate the previous occurrence of the word or phrase that was searched for'
28
28
  },
29
+ findReplaceDialogAriaLabel: {
30
+ id: 'fabric.editor.findReplaceDialogAriaLabel',
31
+ defaultMessage: 'Find and Replace',
32
+ description: 'Aria label for the "Find and Replace" dialog'
33
+ },
29
34
  closeFindReplaceDialog: {
30
35
  id: 'fabric.editor.closeFindReplaceDialog',
31
36
  defaultMessage: 'Close',
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  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); }
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 = "110.46.0";
22
+ var packageVersion = "110.46.2";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -11,6 +11,16 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
11
11
  defaultMessage: 'Help',
12
12
  description: 'Element browser help button label'
13
13
  },
14
+ insert: {
15
+ id: 'fabric.editor.elementbrowser.modal.insert',
16
+ defaultMessage: 'Insert',
17
+ description: 'Element browser insert button label'
18
+ },
19
+ close: {
20
+ id: 'fabric.editor.elementbrowser.modal.close',
21
+ defaultMessage: 'Close',
22
+ description: 'Element browser close button label'
23
+ },
14
24
  all: {
15
25
  id: 'fabric.editor.elementbrowser.categorylist.category-all',
16
26
  defaultMessage: 'All',
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.viewModeClassName = exports.disabledClassName = exports.SyncBlockStateCssClassName = exports.SyncBlockSharedCssClassName = exports.SyncBlockLabelSharedCssClassName = exports.BodiedSyncBlockSharedCssClassName = void 0;
6
+ exports.viewModeClassName = exports.disabledClassName = exports.SyncBlockStateCssClassName = exports.SyncBlockSharedCssClassName = exports.SyncBlockRendererDataAttributeName = exports.SyncBlockLabelSharedCssClassName = exports.BodiedSyncBlockSharedCssClassName = void 0;
7
7
  var prefix = 'ak-editor-sync-block';
8
8
  var SyncBlockSharedCssClassName = exports.SyncBlockSharedCssClassName = {
9
9
  prefix: prefix,
@@ -11,6 +11,7 @@ var SyncBlockSharedCssClassName = exports.SyncBlockSharedCssClassName = {
11
11
  error: "".concat(prefix, "__error_state"),
12
12
  loading: "".concat(prefix, "__loading_state")
13
13
  };
14
+ var SyncBlockRendererDataAttributeName = exports.SyncBlockRendererDataAttributeName = 'data-sync-block-renderer';
14
15
  var bodiedPrefix = 'ak-editor-bodied-sync-block';
15
16
  var BodiedSyncBlockSharedCssClassName = exports.BodiedSyncBlockSharedCssClassName = {
16
17
  prefix: bodiedPrefix,
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "SyncBlockLabelSharedCssClassName", {
15
15
  return _syncBlock.SyncBlockLabelSharedCssClassName;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "SyncBlockRendererDataAttributeName", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _syncBlock.SyncBlockRendererDataAttributeName;
22
+ }
23
+ });
18
24
  Object.defineProperty(exports, "SyncBlockSharedCssClassName", {
19
25
  enumerable: true,
20
26
  get: function get() {
@@ -45,6 +45,12 @@ Object.defineProperty(exports, "isTaskList", {
45
45
  return _listUtils.isTaskList;
46
46
  }
47
47
  });
48
+ Object.defineProperty(exports, "removeBreakoutFromRendererSyncBlockHTML", {
49
+ enumerable: true,
50
+ get: function get() {
51
+ return _syncBlock.removeBreakoutFromRendererSyncBlockHTML;
52
+ }
53
+ });
48
54
  Object.defineProperty(exports, "removeLayoutFromFirstChild", {
49
55
  enumerable: true,
50
56
  get: function get() {
@@ -4,10 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.transformSyncBlock = void 0;
7
+ exports.transformSyncBlock = exports.removeBreakoutFromRendererSyncBlockHTML = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _adfSchema = require("@atlaskit/adf-schema");
11
+ var _styles = require("../styles");
12
+ var _syncBlock = require("../sync-block");
11
13
  var _slice = require("../utils/slice");
12
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; }
13
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; }
@@ -48,4 +50,31 @@ var transformSyncBlock = exports.transformSyncBlock = function transformSyncBloc
48
50
  return node;
49
51
  });
50
52
  return slice;
53
+ };
54
+
55
+ /**
56
+ * Remove breakout mark from renderer sync block.
57
+ *
58
+ * When copying from renderer, we want to paste the content and not the sync block.
59
+ *
60
+ * If the renderer sync block is interpreted as a sync block node by Prosemirror's parser,
61
+ * then since syncBlock is a leaf node, it will stop looking for any nested content and so the content inside the sync block,
62
+ * and so what we actually want will be gone from the pasted slice
63
+ *
64
+ * So we make sure the sync block is not interpreted as a sync block node, by using data-sync-block-renderer instead of data-sync-block
65
+ * However, sync blocks can have breakout marks. When Prosemirror skips over the sync block node, it will then apply that breakout mark to the next node (incorrectly)
66
+ *
67
+ * So we need to strip out all of the breakout marks around renderer sync blocks beforehand while parsing the HTML.
68
+ */
69
+ var removeBreakoutFromRendererSyncBlockHTML = exports.removeBreakoutFromRendererSyncBlockHTML = function removeBreakoutFromRendererSyncBlockHTML(html) {
70
+ var parser = new DOMParser();
71
+ var doc = parser.parseFromString(html, 'text/html');
72
+ doc.querySelectorAll("div.".concat(_styles.BreakoutCssClassName.BREAKOUT_MARK)).forEach(function (breakoutDiv) {
73
+ // Check if this breakout div directly contains a renderer sync block
74
+ var rendererDiv = breakoutDiv.querySelector(":scope > div[".concat(_syncBlock.SyncBlockRendererDataAttributeName, "]"));
75
+ if (rendererDiv) {
76
+ breakoutDiv.replaceWith(rendererDiv);
77
+ }
78
+ });
79
+ return doc.body.innerHTML;
51
80
  };
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "110.46.0";
27
+ var packageVersion = "110.46.2";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -273,7 +273,7 @@ var HoverLinkOverlayOriginal = function HoverLinkOverlayOriginal(_ref) {
273
273
  href: url,
274
274
  target: "_blank",
275
275
  style: {
276
- paddingBlock: compactPadding ? '1px' : (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
276
+ paddingBlock: compactPadding ? '1px' : (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
277
277
  },
278
278
  onClick: handleClick,
279
279
  testId: "inline-card-hoverlink-overlay"
@@ -412,7 +412,7 @@ var HoverLinkOverlayNew = function HoverLinkOverlayNew(_ref2) {
412
412
  href: url,
413
413
  target: "_blank",
414
414
  style: {
415
- paddingBlock: compactPadding ? '1px' : (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
415
+ paddingBlock: compactPadding ? '1px' : (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
416
416
  },
417
417
  onClick: handleClick,
418
418
  testId: "inline-card-hoverlink-overlay"
@@ -4,16 +4,27 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.calcBreakoutWidth = exports.breakoutConsts = exports.absoluteBreakoutWidth = void 0;
7
+ exports.calcBreakoutWidth = exports.breakoutResizableNodes = exports.breakoutConsts = exports.absoluteBreakoutWidth = void 0;
8
8
  exports.calcBreakoutWidthPx = calcBreakoutWidthPx;
9
9
  exports.calcWideWidth = exports.calcBreakoutWithCustomWidth = void 0;
10
10
  exports.calculateBreakoutStyles = calculateBreakoutStyles;
11
- exports.getTitle = exports.getNextBreakoutMode = void 0;
11
+ exports.getTitle = exports.getNextBreakoutMode = exports.getBreakoutResizableNodeTypes = void 0;
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
13
  var _messages = _interopRequireDefault(require("../messages"));
14
14
  var _BaseTheme = require("../ui/BaseTheme");
15
15
  var _WidthProvider = require("../ui/WidthProvider");
16
16
  var _dom = require("./dom");
17
+ var breakoutResizableNodes = exports.breakoutResizableNodes = ['expand', 'layoutSection', 'codeBlock', 'syncBlock', 'bodiedSyncBlock'];
18
+ var getBreakoutResizableNodeTypes = exports.getBreakoutResizableNodeTypes = function getBreakoutResizableNodeTypes(schema) {
19
+ var _schema$nodes = schema.nodes,
20
+ expand = _schema$nodes.expand,
21
+ codeBlock = _schema$nodes.codeBlock,
22
+ layoutSection = _schema$nodes.layoutSection,
23
+ syncBlock = _schema$nodes.syncBlock,
24
+ bodiedSyncBlock = _schema$nodes.bodiedSyncBlock;
25
+ return new Set([expand, codeBlock, layoutSection, syncBlock, bodiedSyncBlock]);
26
+ };
27
+
17
28
  /**
18
29
  * Variables required to construct a context for breakout ssr inline script.
19
30
  *
@@ -148,6 +148,12 @@ Object.defineProperty(exports, "breakoutConsts", {
148
148
  return _breakout.breakoutConsts;
149
149
  }
150
150
  });
151
+ Object.defineProperty(exports, "breakoutResizableNodes", {
152
+ enumerable: true,
153
+ get: function get() {
154
+ return _breakout.breakoutResizableNodes;
155
+ }
156
+ });
151
157
  Object.defineProperty(exports, "browser", {
152
158
  enumerable: true,
153
159
  get: function get() {
@@ -426,6 +432,12 @@ Object.defineProperty(exports, "getAnnotationMarksForPos", {
426
432
  return _annotation.getAnnotationMarksForPos;
427
433
  }
428
434
  });
435
+ Object.defineProperty(exports, "getBreakoutResizableNodeTypes", {
436
+ enumerable: true,
437
+ get: function get() {
438
+ return _breakout.getBreakoutResizableNodeTypes;
439
+ }
440
+ });
429
441
  Object.defineProperty(exports, "getChangedNodes", {
430
442
  enumerable: true,
431
443
  get: function get() {
@@ -160,6 +160,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
160
160
  ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
161
161
  ACTION["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
162
162
  ACTION["STEPS_TRACKED"] = "stepsTracked";
163
+ ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
163
164
  ACTION["STEPS_FILTERED"] = "stepsFiltered";
164
165
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
165
166
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
@@ -20,6 +20,11 @@ export const findReplaceMessages = defineMessages({
20
20
  defaultMessage: 'Find previous',
21
21
  description: 'Locate the previous occurrence of the word or phrase that was searched for'
22
22
  },
23
+ findReplaceDialogAriaLabel: {
24
+ id: 'fabric.editor.findReplaceDialogAriaLabel',
25
+ defaultMessage: 'Find and Replace',
26
+ description: 'Aria label for the "Find and Replace" dialog'
27
+ },
23
28
  closeFindReplaceDialog: {
24
29
  id: 'fabric.editor.closeFindReplaceDialog',
25
30
  defaultMessage: 'Close',
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "110.46.0";
7
+ const packageVersion = "110.46.2";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -5,6 +5,16 @@ export const messages = defineMessages({
5
5
  defaultMessage: 'Help',
6
6
  description: 'Element browser help button label'
7
7
  },
8
+ insert: {
9
+ id: 'fabric.editor.elementbrowser.modal.insert',
10
+ defaultMessage: 'Insert',
11
+ description: 'Element browser insert button label'
12
+ },
13
+ close: {
14
+ id: 'fabric.editor.elementbrowser.modal.close',
15
+ defaultMessage: 'Close',
16
+ description: 'Element browser close button label'
17
+ },
8
18
  all: {
9
19
  id: 'fabric.editor.elementbrowser.categorylist.category-all',
10
20
  defaultMessage: 'All',
@@ -5,6 +5,7 @@ export const SyncBlockSharedCssClassName = {
5
5
  error: `${prefix}__error_state`,
6
6
  loading: `${prefix}__loading_state`
7
7
  };
8
+ export const SyncBlockRendererDataAttributeName = 'data-sync-block-renderer';
8
9
  const bodiedPrefix = 'ak-editor-bodied-sync-block';
9
10
  export const BodiedSyncBlockSharedCssClassName = {
10
11
  prefix: bodiedPrefix,
@@ -1,4 +1,4 @@
1
1
  // Disable no-re-export rule for entry point files
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
- export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName } from './styles/shared/sync-block';
4
+ export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName, SyncBlockRendererDataAttributeName } from './styles/shared/sync-block';
@@ -8,4 +8,4 @@ export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToC
8
8
  export { transformSliceToDecisionList } from './decision-list';
9
9
  export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
10
10
  export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
11
- export { transformSyncBlock } from './sync-block';
11
+ export { transformSyncBlock, removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
@@ -1,4 +1,6 @@
1
1
  import { uuid } from '@atlaskit/adf-schema';
2
+ import { BreakoutCssClassName } from '../styles';
3
+ import { SyncBlockRendererDataAttributeName } from '../sync-block';
2
4
  import { mapSlice } from '../utils/slice';
3
5
  const transformSyncBlockNode = (node, schema, isFromEditor) => {
4
6
  // if copying from renderer, flatten out the content and remove the sync block
@@ -38,4 +40,31 @@ export const transformSyncBlock = (slice, schema, pasteSource) => {
38
40
  return node;
39
41
  });
40
42
  return slice;
43
+ };
44
+
45
+ /**
46
+ * Remove breakout mark from renderer sync block.
47
+ *
48
+ * When copying from renderer, we want to paste the content and not the sync block.
49
+ *
50
+ * If the renderer sync block is interpreted as a sync block node by Prosemirror's parser,
51
+ * then since syncBlock is a leaf node, it will stop looking for any nested content and so the content inside the sync block,
52
+ * and so what we actually want will be gone from the pasted slice
53
+ *
54
+ * So we make sure the sync block is not interpreted as a sync block node, by using data-sync-block-renderer instead of data-sync-block
55
+ * However, sync blocks can have breakout marks. When Prosemirror skips over the sync block node, it will then apply that breakout mark to the next node (incorrectly)
56
+ *
57
+ * So we need to strip out all of the breakout marks around renderer sync blocks beforehand while parsing the HTML.
58
+ */
59
+ export const removeBreakoutFromRendererSyncBlockHTML = html => {
60
+ const parser = new DOMParser();
61
+ const doc = parser.parseFromString(html, 'text/html');
62
+ doc.querySelectorAll(`div.${BreakoutCssClassName.BREAKOUT_MARK}`).forEach(breakoutDiv => {
63
+ // Check if this breakout div directly contains a renderer sync block
64
+ const rendererDiv = breakoutDiv.querySelector(`:scope > div[${SyncBlockRendererDataAttributeName}]`);
65
+ if (rendererDiv) {
66
+ breakoutDiv.replaceWith(rendererDiv);
67
+ }
68
+ });
69
+ return doc.body.innerHTML;
41
70
  };
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "110.46.0";
17
+ const packageVersion = "110.46.2";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -249,7 +249,7 @@ const HoverLinkOverlayOriginal = ({
249
249
  href: url,
250
250
  target: "_blank",
251
251
  style: {
252
- paddingBlock: compactPadding ? '1px' : expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
252
+ paddingBlock: compactPadding ? '1px' : expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
253
253
  },
254
254
  onClick: handleClick,
255
255
  testId: "inline-card-hoverlink-overlay"
@@ -374,7 +374,7 @@ const HoverLinkOverlayNew = ({
374
374
  href: url,
375
375
  target: "_blank",
376
376
  style: {
377
- paddingBlock: compactPadding ? '1px' : expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
377
+ paddingBlock: compactPadding ? '1px' : expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
378
378
  },
379
379
  onClick: handleClick,
380
380
  testId: "inline-card-hoverlink-overlay"
@@ -3,6 +3,17 @@ import commonMessages from '../messages';
3
3
  import { mapBreakpointToLayoutMaxWidth } from '../ui/BaseTheme';
4
4
  import { getBreakpoint } from '../ui/WidthProvider';
5
5
  import { parsePx } from './dom';
6
+ export const breakoutResizableNodes = ['expand', 'layoutSection', 'codeBlock', 'syncBlock', 'bodiedSyncBlock'];
7
+ export const getBreakoutResizableNodeTypes = schema => {
8
+ const {
9
+ expand,
10
+ codeBlock,
11
+ layoutSection,
12
+ syncBlock,
13
+ bodiedSyncBlock
14
+ } = schema.nodes;
15
+ return new Set([expand, codeBlock, layoutSection, syncBlock, bodiedSyncBlock]);
16
+ };
6
17
 
7
18
  /**
8
19
  * Variables required to construct a context for breakout ssr inline script.
@@ -26,7 +26,7 @@ ErrorReporter } from './error-reporter';
26
26
  export { isPastDate, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC } from './date';
27
27
  export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, setAllSelection, setCellSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, isEmptyParagraph, isInLayoutColumn, removeBlockMarks, filterChildrenBetween } from './editor-core-utils';
28
28
  export { withImageLoader } from './imageLoader';
29
- export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth } from './breakout';
29
+ export { breakoutResizableNodes, getBreakoutResizableNodeTypes, absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth } from './breakout';
30
30
  export {
31
31
  /**
32
32
  * @private
@@ -160,6 +160,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
160
160
  ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
161
161
  ACTION["NCS_SESSION_STEP_METRICS"] = "ncsSessionStepMetrics";
162
162
  ACTION["STEPS_TRACKED"] = "stepsTracked";
163
+ ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
163
164
  ACTION["STEPS_FILTERED"] = "stepsFiltered";
164
165
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
165
166
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
@@ -20,6 +20,11 @@ export var findReplaceMessages = defineMessages({
20
20
  defaultMessage: 'Find previous',
21
21
  description: 'Locate the previous occurrence of the word or phrase that was searched for'
22
22
  },
23
+ findReplaceDialogAriaLabel: {
24
+ id: 'fabric.editor.findReplaceDialogAriaLabel',
25
+ defaultMessage: 'Find and Replace',
26
+ description: 'Aria label for the "Find and Replace" dialog'
27
+ },
23
28
  closeFindReplaceDialog: {
24
29
  id: 'fabric.editor.closeFindReplaceDialog',
25
30
  defaultMessage: 'Close',
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "110.46.0";
13
+ var packageVersion = "110.46.2";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -5,6 +5,16 @@ export var messages = defineMessages({
5
5
  defaultMessage: 'Help',
6
6
  description: 'Element browser help button label'
7
7
  },
8
+ insert: {
9
+ id: 'fabric.editor.elementbrowser.modal.insert',
10
+ defaultMessage: 'Insert',
11
+ description: 'Element browser insert button label'
12
+ },
13
+ close: {
14
+ id: 'fabric.editor.elementbrowser.modal.close',
15
+ defaultMessage: 'Close',
16
+ description: 'Element browser close button label'
17
+ },
8
18
  all: {
9
19
  id: 'fabric.editor.elementbrowser.categorylist.category-all',
10
20
  defaultMessage: 'All',
@@ -5,6 +5,7 @@ export var SyncBlockSharedCssClassName = {
5
5
  error: "".concat(prefix, "__error_state"),
6
6
  loading: "".concat(prefix, "__loading_state")
7
7
  };
8
+ export var SyncBlockRendererDataAttributeName = 'data-sync-block-renderer';
8
9
  var bodiedPrefix = 'ak-editor-bodied-sync-block';
9
10
  export var BodiedSyncBlockSharedCssClassName = {
10
11
  prefix: bodiedPrefix,
@@ -1,4 +1,4 @@
1
1
  // Disable no-re-export rule for entry point files
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
- export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName } from './styles/shared/sync-block';
4
+ export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName, SyncBlockRendererDataAttributeName } from './styles/shared/sync-block';
@@ -8,4 +8,4 @@ export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToC
8
8
  export { transformSliceToDecisionList } from './decision-list';
9
9
  export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
10
10
  export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
11
- export { transformSyncBlock } from './sync-block';
11
+ export { transformSyncBlock, removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
@@ -3,6 +3,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  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; }
4
4
  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; }
5
5
  import { uuid } from '@atlaskit/adf-schema';
6
+ import { BreakoutCssClassName } from '../styles';
7
+ import { SyncBlockRendererDataAttributeName } from '../sync-block';
6
8
  import { mapSlice } from '../utils/slice';
7
9
  var transformSyncBlockNode = function transformSyncBlockNode(node, schema, isFromEditor) {
8
10
  // if copying from renderer, flatten out the content and remove the sync block
@@ -41,4 +43,31 @@ export var transformSyncBlock = function transformSyncBlock(slice, schema, paste
41
43
  return node;
42
44
  });
43
45
  return slice;
46
+ };
47
+
48
+ /**
49
+ * Remove breakout mark from renderer sync block.
50
+ *
51
+ * When copying from renderer, we want to paste the content and not the sync block.
52
+ *
53
+ * If the renderer sync block is interpreted as a sync block node by Prosemirror's parser,
54
+ * then since syncBlock is a leaf node, it will stop looking for any nested content and so the content inside the sync block,
55
+ * and so what we actually want will be gone from the pasted slice
56
+ *
57
+ * So we make sure the sync block is not interpreted as a sync block node, by using data-sync-block-renderer instead of data-sync-block
58
+ * However, sync blocks can have breakout marks. When Prosemirror skips over the sync block node, it will then apply that breakout mark to the next node (incorrectly)
59
+ *
60
+ * So we need to strip out all of the breakout marks around renderer sync blocks beforehand while parsing the HTML.
61
+ */
62
+ export var removeBreakoutFromRendererSyncBlockHTML = function removeBreakoutFromRendererSyncBlockHTML(html) {
63
+ var parser = new DOMParser();
64
+ var doc = parser.parseFromString(html, 'text/html');
65
+ doc.querySelectorAll("div.".concat(BreakoutCssClassName.BREAKOUT_MARK)).forEach(function (breakoutDiv) {
66
+ // Check if this breakout div directly contains a renderer sync block
67
+ var rendererDiv = breakoutDiv.querySelector(":scope > div[".concat(SyncBlockRendererDataAttributeName, "]"));
68
+ if (rendererDiv) {
69
+ breakoutDiv.replaceWith(rendererDiv);
70
+ }
71
+ });
72
+ return doc.body.innerHTML;
44
73
  };
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "110.46.0";
24
+ var packageVersion = "110.46.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -259,7 +259,7 @@ var HoverLinkOverlayOriginal = function HoverLinkOverlayOriginal(_ref) {
259
259
  href: url,
260
260
  target: "_blank",
261
261
  style: {
262
- paddingBlock: compactPadding ? '1px' : expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
262
+ paddingBlock: compactPadding ? '1px' : expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
263
263
  },
264
264
  onClick: handleClick,
265
265
  testId: "inline-card-hoverlink-overlay"
@@ -398,7 +398,7 @@ var HoverLinkOverlayNew = function HoverLinkOverlayNew(_ref2) {
398
398
  href: url,
399
399
  target: "_blank",
400
400
  style: {
401
- paddingBlock: compactPadding ? '1px' : expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
401
+ paddingBlock: compactPadding ? '1px' : expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
402
402
  },
403
403
  onClick: handleClick,
404
404
  testId: "inline-card-hoverlink-overlay"
@@ -3,6 +3,16 @@ import commonMessages from '../messages';
3
3
  import { mapBreakpointToLayoutMaxWidth } from '../ui/BaseTheme';
4
4
  import { getBreakpoint } from '../ui/WidthProvider';
5
5
  import { parsePx } from './dom';
6
+ export var breakoutResizableNodes = ['expand', 'layoutSection', 'codeBlock', 'syncBlock', 'bodiedSyncBlock'];
7
+ export var getBreakoutResizableNodeTypes = function getBreakoutResizableNodeTypes(schema) {
8
+ var _schema$nodes = schema.nodes,
9
+ expand = _schema$nodes.expand,
10
+ codeBlock = _schema$nodes.codeBlock,
11
+ layoutSection = _schema$nodes.layoutSection,
12
+ syncBlock = _schema$nodes.syncBlock,
13
+ bodiedSyncBlock = _schema$nodes.bodiedSyncBlock;
14
+ return new Set([expand, codeBlock, layoutSection, syncBlock, bodiedSyncBlock]);
15
+ };
6
16
 
7
17
  /**
8
18
  * Variables required to construct a context for breakout ssr inline script.
@@ -26,7 +26,7 @@ ErrorReporter } from './error-reporter';
26
26
  export { isPastDate, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC } from './date';
27
27
  export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, setAllSelection, setCellSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, isEmptyParagraph, isInLayoutColumn, removeBlockMarks, filterChildrenBetween } from './editor-core-utils';
28
28
  export { withImageLoader } from './imageLoader';
29
- export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth } from './breakout';
29
+ export { breakoutResizableNodes, getBreakoutResizableNodeTypes, absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth } from './breakout';
30
30
  export {
31
31
  /**
32
32
  * @private
@@ -159,6 +159,7 @@ export declare enum ACTION {
159
159
  SORT_COLUMN_NOT_ALLOWED = "sortColumnNotAllowed",
160
160
  NCS_SESSION_STEP_METRICS = "ncsSessionStepMetrics",
161
161
  STEPS_TRACKED = "stepsTracked",
162
+ ORGANIC_CHANGES_TRACKED = "organicChangesTracked",
162
163
  STEPS_FILTERED = "stepsFiltered",
163
164
  CREATE_NOT_ALLOWED = "createNotAllowed",
164
165
  UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
@@ -179,6 +179,9 @@ type InvalidMediaContentTransformedAEP = OperationalAEP<ACTION.INVALID_MEDIA_CON
179
179
  type CollabStepsTrackerPayloadAEP = OperationalAEP<ACTION.STEPS_TRACKED | ACTION.STEPS_FILTERED, ACTION_SUBJECT.COLLAB, undefined, {
180
180
  steps: unknown[];
181
181
  }>;
182
+ type CollabOrganicChangesTrackerPayloadAEP = OperationalAEP<ACTION.ORGANIC_CHANGES_TRACKED, ACTION_SUBJECT.COLLAB, undefined, {
183
+ organicChanges: unknown[];
184
+ }>;
182
185
  type BlocksDragInitAEP = OperationalAEP<ACTION.BLOCKS_DRAG_INIT, ACTION_SUBJECT.EDITOR, undefined, {
183
186
  duration: number;
184
187
  nodesCount: number | undefined;
@@ -214,5 +217,5 @@ type ChangeToneMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR
214
217
  type TranslateMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_DROPDOWN_MENU_ITEM, ACTION_SUBJECT_ID.AI_TRANSLATE, {
215
218
  inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
216
219
  }>;
217
- export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP | RovoMoreOptionsClickedAEP | AskRovoButtonClickedAEP | ChangeToneMenuItemClickedAEP | TranslateMenuItemClickedAEP | MediaSingleWidthTransformedAEP;
220
+ export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CollabOrganicChangesTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP | RovoMoreOptionsClickedAEP | AskRovoButtonClickedAEP | ChangeToneMenuItemClickedAEP | TranslateMenuItemClickedAEP | MediaSingleWidthTransformedAEP;
218
221
  export {};
@@ -19,6 +19,11 @@ export declare const findReplaceMessages: {
19
19
  defaultMessage: string;
20
20
  description: string;
21
21
  };
22
+ findReplaceDialogAriaLabel: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
22
27
  closeFindReplaceDialog: {
23
28
  id: string;
24
29
  defaultMessage: string;
@@ -4,6 +4,16 @@ export declare const messages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ insert: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ close: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
7
17
  all: {
8
18
  id: string;
9
19
  defaultMessage: string;
@@ -4,6 +4,7 @@ export declare const SyncBlockSharedCssClassName: {
4
4
  error: string;
5
5
  loading: string;
6
6
  };
7
+ export declare const SyncBlockRendererDataAttributeName = "data-sync-block-renderer";
7
8
  export declare const BodiedSyncBlockSharedCssClassName: {
8
9
  prefix: string;
9
10
  renderer: string;
@@ -1 +1 @@
1
- export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName, } from './styles/shared/sync-block';
1
+ export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName, SyncBlockRendererDataAttributeName, } from './styles/shared/sync-block';
@@ -5,5 +5,5 @@ export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToC
5
5
  export { transformSliceToDecisionList } from './decision-list';
6
6
  export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
7
7
  export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent, } from './list-utils';
8
- export { transformSyncBlock } from './sync-block';
8
+ export { transformSyncBlock, removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
9
9
  export type { TransformContext, TransformFunction } from './list-types';
@@ -5,3 +5,18 @@ import type { PasteSource } from '../analytics';
5
5
  * Otherwise, (e.g. if copying from renderer), flatten out the content and remove the sync block
6
6
  */
7
7
  export declare const transformSyncBlock: (slice: Slice, schema: Schema, pasteSource: PasteSource) => Slice;
8
+ /**
9
+ * Remove breakout mark from renderer sync block.
10
+ *
11
+ * When copying from renderer, we want to paste the content and not the sync block.
12
+ *
13
+ * If the renderer sync block is interpreted as a sync block node by Prosemirror's parser,
14
+ * then since syncBlock is a leaf node, it will stop looking for any nested content and so the content inside the sync block,
15
+ * and so what we actually want will be gone from the pasted slice
16
+ *
17
+ * So we make sure the sync block is not interpreted as a sync block node, by using data-sync-block-renderer instead of data-sync-block
18
+ * However, sync blocks can have breakout marks. When Prosemirror skips over the sync block node, it will then apply that breakout mark to the next node (incorrectly)
19
+ *
20
+ * So we need to strip out all of the breakout marks around renderer sync blocks beforehand while parsing the HTML.
21
+ */
22
+ export declare const removeBreakoutFromRendererSyncBlockHTML: (html: string) => string;
@@ -1,7 +1,10 @@
1
1
  import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
2
+ import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
3
  import type { BreakoutMode } from '../types/breakout';
3
4
  import { mapBreakpointToLayoutMaxWidth } from '../ui/BaseTheme';
4
5
  import { getBreakpoint } from '../ui/WidthProvider';
6
+ export declare const breakoutResizableNodes: string[];
7
+ export declare const getBreakoutResizableNodeTypes: (schema: Schema) => Set<import("prosemirror-model").NodeType>;
5
8
  /**
6
9
  * Variables required to construct a context for breakout ssr inline script.
7
10
  *
@@ -27,7 +27,7 @@ export type { Date } from './date';
27
27
  export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, setAllSelection, setCellSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, isEmptyParagraph, isInLayoutColumn, removeBlockMarks, filterChildrenBetween, } from './editor-core-utils';
28
28
  export { withImageLoader } from './imageLoader';
29
29
  export type { ImageLoaderProps, ImageLoaderState, ImageStatus } from './imageLoader';
30
- export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth, } from './breakout';
30
+ export { breakoutResizableNodes, getBreakoutResizableNodeTypes, absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth, } from './breakout';
31
31
  export type { BreakoutConstsType } from './breakout';
32
32
  export {
33
33
  /**
@@ -159,6 +159,7 @@ export declare enum ACTION {
159
159
  SORT_COLUMN_NOT_ALLOWED = "sortColumnNotAllowed",
160
160
  NCS_SESSION_STEP_METRICS = "ncsSessionStepMetrics",
161
161
  STEPS_TRACKED = "stepsTracked",
162
+ ORGANIC_CHANGES_TRACKED = "organicChangesTracked",
162
163
  STEPS_FILTERED = "stepsFiltered",
163
164
  CREATE_NOT_ALLOWED = "createNotAllowed",
164
165
  UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
@@ -179,6 +179,9 @@ type InvalidMediaContentTransformedAEP = OperationalAEP<ACTION.INVALID_MEDIA_CON
179
179
  type CollabStepsTrackerPayloadAEP = OperationalAEP<ACTION.STEPS_TRACKED | ACTION.STEPS_FILTERED, ACTION_SUBJECT.COLLAB, undefined, {
180
180
  steps: unknown[];
181
181
  }>;
182
+ type CollabOrganicChangesTrackerPayloadAEP = OperationalAEP<ACTION.ORGANIC_CHANGES_TRACKED, ACTION_SUBJECT.COLLAB, undefined, {
183
+ organicChanges: unknown[];
184
+ }>;
182
185
  type BlocksDragInitAEP = OperationalAEP<ACTION.BLOCKS_DRAG_INIT, ACTION_SUBJECT.EDITOR, undefined, {
183
186
  duration: number;
184
187
  nodesCount: number | undefined;
@@ -214,5 +217,5 @@ type ChangeToneMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR
214
217
  type TranslateMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_DROPDOWN_MENU_ITEM, ACTION_SUBJECT_ID.AI_TRANSLATE, {
215
218
  inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
216
219
  }>;
217
- export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP | RovoMoreOptionsClickedAEP | AskRovoButtonClickedAEP | ChangeToneMenuItemClickedAEP | TranslateMenuItemClickedAEP | MediaSingleWidthTransformedAEP;
220
+ export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CollabOrganicChangesTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP | RovoMoreOptionsClickedAEP | AskRovoButtonClickedAEP | ChangeToneMenuItemClickedAEP | TranslateMenuItemClickedAEP | MediaSingleWidthTransformedAEP;
218
221
  export {};
@@ -19,6 +19,11 @@ export declare const findReplaceMessages: {
19
19
  defaultMessage: string;
20
20
  description: string;
21
21
  };
22
+ findReplaceDialogAriaLabel: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
22
27
  closeFindReplaceDialog: {
23
28
  id: string;
24
29
  defaultMessage: string;
@@ -4,6 +4,16 @@ export declare const messages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ insert: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ close: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
7
17
  all: {
8
18
  id: string;
9
19
  defaultMessage: string;
@@ -4,6 +4,7 @@ export declare const SyncBlockSharedCssClassName: {
4
4
  error: string;
5
5
  loading: string;
6
6
  };
7
+ export declare const SyncBlockRendererDataAttributeName = "data-sync-block-renderer";
7
8
  export declare const BodiedSyncBlockSharedCssClassName: {
8
9
  prefix: string;
9
10
  renderer: string;
@@ -1 +1 @@
1
- export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName, } from './styles/shared/sync-block';
1
+ export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName, SyncBlockRendererDataAttributeName, } from './styles/shared/sync-block';
@@ -5,5 +5,5 @@ export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToC
5
5
  export { transformSliceToDecisionList } from './decision-list';
6
6
  export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
7
7
  export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent, } from './list-utils';
8
- export { transformSyncBlock } from './sync-block';
8
+ export { transformSyncBlock, removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
9
9
  export type { TransformContext, TransformFunction } from './list-types';
@@ -5,3 +5,18 @@ import type { PasteSource } from '../analytics';
5
5
  * Otherwise, (e.g. if copying from renderer), flatten out the content and remove the sync block
6
6
  */
7
7
  export declare const transformSyncBlock: (slice: Slice, schema: Schema, pasteSource: PasteSource) => Slice;
8
+ /**
9
+ * Remove breakout mark from renderer sync block.
10
+ *
11
+ * When copying from renderer, we want to paste the content and not the sync block.
12
+ *
13
+ * If the renderer sync block is interpreted as a sync block node by Prosemirror's parser,
14
+ * then since syncBlock is a leaf node, it will stop looking for any nested content and so the content inside the sync block,
15
+ * and so what we actually want will be gone from the pasted slice
16
+ *
17
+ * So we make sure the sync block is not interpreted as a sync block node, by using data-sync-block-renderer instead of data-sync-block
18
+ * However, sync blocks can have breakout marks. When Prosemirror skips over the sync block node, it will then apply that breakout mark to the next node (incorrectly)
19
+ *
20
+ * So we need to strip out all of the breakout marks around renderer sync blocks beforehand while parsing the HTML.
21
+ */
22
+ export declare const removeBreakoutFromRendererSyncBlockHTML: (html: string) => string;
@@ -1,7 +1,10 @@
1
1
  import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
2
+ import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
3
  import type { BreakoutMode } from '../types/breakout';
3
4
  import { mapBreakpointToLayoutMaxWidth } from '../ui/BaseTheme';
4
5
  import { getBreakpoint } from '../ui/WidthProvider';
6
+ export declare const breakoutResizableNodes: string[];
7
+ export declare const getBreakoutResizableNodeTypes: (schema: Schema) => Set<import("prosemirror-model").NodeType>;
5
8
  /**
6
9
  * Variables required to construct a context for breakout ssr inline script.
7
10
  *
@@ -27,7 +27,7 @@ export type { Date } from './date';
27
27
  export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, setAllSelection, setCellSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, isEmptyParagraph, isInLayoutColumn, removeBlockMarks, filterChildrenBetween, } from './editor-core-utils';
28
28
  export { withImageLoader } from './imageLoader';
29
29
  export type { ImageLoaderProps, ImageLoaderState, ImageStatus } from './imageLoader';
30
- export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth, } from './breakout';
30
+ export { breakoutResizableNodes, getBreakoutResizableNodeTypes, absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, getNextBreakoutMode, getTitle, calcBreakoutWithCustomWidth, } from './breakout';
31
31
  export type { BreakoutConstsType } from './breakout';
32
32
  export {
33
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.46.1",
3
+ "version": "110.46.3",
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/"
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/analytics-namespaced-context": "^7.2.0",
38
38
  "@atlaskit/analytics-next": "^11.1.0",
39
39
  "@atlaskit/atlassian-context": "^0.6.0",
40
- "@atlaskit/button": "^23.8.0",
40
+ "@atlaskit/button": "^23.9.0",
41
41
  "@atlaskit/codemod-utils": "^4.2.0",
42
42
  "@atlaskit/css": "^0.18.0",
43
43
  "@atlaskit/custom-steps": "^0.16.0",
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/task-decision": "^19.2.0",
82
82
  "@atlaskit/textfield": "^8.2.0",
83
83
  "@atlaskit/theme": "^21.0.0",
84
- "@atlaskit/tmp-editor-statsig": "^15.14.0",
84
+ "@atlaskit/tmp-editor-statsig": "^16.0.0",
85
85
  "@atlaskit/tokens": "^8.6.0",
86
86
  "@atlaskit/tooltip": "^20.11.0",
87
87
  "@atlaskit/width-detector": "^5.0.0",