@atlaskit/editor-common 122.8.0 → 122.9.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 (87) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/cjs/ai-messages/ai-suggestions.js +20 -0
  3. package/dist/cjs/element-browser/components/ViewMore.js +1 -1
  4. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  5. package/dist/cjs/extensibility/GeneratedContentReveal.js +1 -1
  6. package/dist/cjs/extensions/UnknownMacroPlaceholder.js +1 -1
  7. package/dist/cjs/icons/shared/PanelErrorIcon.js +1 -1
  8. package/dist/cjs/icons/shared/PanelInfoIcon.js +1 -1
  9. package/dist/cjs/icons/shared/PanelNoteIcon.js +1 -1
  10. package/dist/cjs/icons/shared/PanelSuccessIcon.js +1 -1
  11. package/dist/cjs/icons/shared/PanelWarningIcon.js +1 -1
  12. package/dist/cjs/monitoring/error.js +1 -1
  13. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +1 -1
  14. package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +1 -1
  15. package/dist/cjs/table/NewSortingIcon.js +1 -1
  16. package/dist/cjs/table/getStickyHeaderHeight.js +34 -0
  17. package/dist/cjs/ui/DropList/index.js +1 -1
  18. package/dist/cjs/ui/Shortcut/index.js +1 -1
  19. package/dist/cjs/ui/Toolbar/ButtonGroup.js +1 -1
  20. package/dist/cjs/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  21. package/dist/cjs/ui/Toolbar/DropdownWrapper.js +1 -1
  22. package/dist/cjs/ui/Toolbar/ExpandIcon.js +1 -1
  23. package/dist/cjs/ui/Toolbar/Separator.js +1 -1
  24. package/dist/cjs/utils/areDocsEqualByBlockStructureAndText.js +51 -0
  25. package/dist/cjs/utils/document.js +1 -0
  26. package/dist/cjs/utils/filter/privacy-filter.js +2 -2
  27. package/dist/cjs/utils/is-non-production-build.js +21 -0
  28. package/dist/es2019/ai-messages/ai-suggestions.js +20 -0
  29. package/dist/es2019/element-browser/components/ViewMore.js +1 -1
  30. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  31. package/dist/es2019/extensibility/GeneratedContentReveal.js +1 -1
  32. package/dist/es2019/extensions/UnknownMacroPlaceholder.js +1 -1
  33. package/dist/es2019/icons/shared/PanelErrorIcon.js +1 -1
  34. package/dist/es2019/icons/shared/PanelInfoIcon.js +1 -1
  35. package/dist/es2019/icons/shared/PanelNoteIcon.js +1 -1
  36. package/dist/es2019/icons/shared/PanelSuccessIcon.js +1 -1
  37. package/dist/es2019/icons/shared/PanelWarningIcon.js +1 -1
  38. package/dist/es2019/monitoring/error.js +1 -1
  39. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +1 -1
  40. package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +1 -1
  41. package/dist/es2019/table/NewSortingIcon.js +1 -1
  42. package/dist/es2019/table/getStickyHeaderHeight.js +28 -0
  43. package/dist/es2019/ui/DropList/index.js +1 -1
  44. package/dist/es2019/ui/Shortcut/index.js +1 -1
  45. package/dist/es2019/ui/Toolbar/ButtonGroup.js +1 -1
  46. package/dist/es2019/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  47. package/dist/es2019/ui/Toolbar/DropdownWrapper.js +1 -1
  48. package/dist/es2019/ui/Toolbar/ExpandIcon.js +1 -1
  49. package/dist/es2019/ui/Toolbar/Separator.js +1 -1
  50. package/dist/es2019/utils/areDocsEqualByBlockStructureAndText.js +46 -0
  51. package/dist/es2019/utils/document.js +1 -0
  52. package/dist/es2019/utils/filter/privacy-filter.js +1 -1
  53. package/dist/es2019/utils/is-non-production-build.js +15 -0
  54. package/dist/esm/ai-messages/ai-suggestions.js +20 -0
  55. package/dist/esm/element-browser/components/ViewMore.js +1 -1
  56. package/dist/esm/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  57. package/dist/esm/extensibility/GeneratedContentReveal.js +1 -1
  58. package/dist/esm/extensions/UnknownMacroPlaceholder.js +1 -1
  59. package/dist/esm/icons/shared/PanelErrorIcon.js +1 -1
  60. package/dist/esm/icons/shared/PanelInfoIcon.js +1 -1
  61. package/dist/esm/icons/shared/PanelNoteIcon.js +1 -1
  62. package/dist/esm/icons/shared/PanelSuccessIcon.js +1 -1
  63. package/dist/esm/icons/shared/PanelWarningIcon.js +1 -1
  64. package/dist/esm/monitoring/error.js +1 -1
  65. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +1 -1
  66. package/dist/esm/quick-insert/QuickInsertHoverPreview.js +1 -1
  67. package/dist/esm/table/NewSortingIcon.js +1 -1
  68. package/dist/esm/table/getStickyHeaderHeight.js +28 -0
  69. package/dist/esm/ui/DropList/index.js +1 -1
  70. package/dist/esm/ui/Shortcut/index.js +1 -1
  71. package/dist/esm/ui/Toolbar/ButtonGroup.js +1 -1
  72. package/dist/esm/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  73. package/dist/esm/ui/Toolbar/DropdownWrapper.js +1 -1
  74. package/dist/esm/ui/Toolbar/ExpandIcon.js +1 -1
  75. package/dist/esm/ui/Toolbar/Separator.js +1 -1
  76. package/dist/esm/utils/areDocsEqualByBlockStructureAndText.js +46 -0
  77. package/dist/esm/utils/document.js +1 -0
  78. package/dist/esm/utils/filter/privacy-filter.js +1 -1
  79. package/dist/esm/utils/is-non-production-build.js +15 -0
  80. package/dist/types/ai-messages/ai-suggestions.d.ts +20 -0
  81. package/dist/types/table/getStickyHeaderHeight.d.ts +6 -0
  82. package/dist/types/utils/areDocsEqualByBlockStructureAndText.d.ts +6 -0
  83. package/dist/types/utils/is-non-production-build.d.ts +10 -0
  84. package/package.json +8 -4
  85. package/table/get-sticky-header-height/package.json +10 -0
  86. package/utils/areDocsEqualByBlockStructureAndText/package.json +10 -0
  87. package/utils/is-non-production-build/package.json +10 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 122.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`1167e60345129`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1167e60345129) -
8
+ Add `getNonProductionBuildAnalyticsAttributes` for product analytics listeners to attach an
9
+ explicit `isNonProductionBuild` boolean behind `platform_editor_non_production_build_analytics`.
10
+ Unknown classifications and the control cohort omit the attribute. The helper accepts a lazy
11
+ classifier callback so product metadata and cookies are only read in treatment.
12
+ - [`9686b07310cc9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9686b07310cc9) -
13
+ Show the count of new suggestions after a review and reuse the toolbar review icon. Keep existing
14
+ refresh timing, View navigation, and dismissal behavior.
15
+ - [`20d41af8d6f4c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/20d41af8d6f4c) -
16
+ EDITOR-9000 Fixes scroll to suggestion when it is in table with sticky header
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 122.8.2
23
+
24
+ ### Patch Changes
25
+
26
+ - [`2bbc1c84de468`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2bbc1c84de468) -
27
+ Migrate Volt consumer imports to existing definitions and align affected test mocks without
28
+ changing runtime behavior.
29
+ - Updated dependencies
30
+
31
+ ## 122.8.1
32
+
33
+ ### Patch Changes
34
+
35
+ - [`442abbe2a88e0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/442abbe2a88e0) -
36
+ Normalize documents before relaxed show-diff comparisons when Confluence version-history diffing
37
+ is enabled.
38
+
3
39
  ## 122.8.0
4
40
 
5
41
  ### Minor Changes
@@ -356,6 +356,26 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
356
356
  defaultMessage: 'Finalizing suggestions for review',
357
357
  description: 'Loading message shown while the AI is finalizing suggestions for review'
358
358
  },
359
+ thinkingCompleteSuggestionCount: {
360
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.suggestionCount.non-final',
361
+ defaultMessage: '{count, plural, one {# suggestion} other {# suggestions}} from {reviewer}',
362
+ description: 'Number of newly available suggestions after a review that began with no pending suggestions. Reviewer is the agent name.'
363
+ },
364
+ thinkingCompleteNewSuggestionCount: {
365
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.newSuggestionCount.non-final',
366
+ defaultMessage: '{count, plural, one {# new suggestion} other {# new suggestions}} from {reviewer}',
367
+ description: 'Number of newly available suggestions after a review that began with pending suggestions. Reviewer is the agent name.'
368
+ },
369
+ thinkingCompleteSuggestionCountWithoutReviewer: {
370
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.suggestionCountWithoutReviewer.non-final',
371
+ defaultMessage: '{count, plural, one {# suggestion} other {# suggestions}}',
372
+ description: 'Review result count when the reviewer name is unavailable and no suggestions existed at review start.'
373
+ },
374
+ thinkingCompleteNewSuggestionCountWithoutReviewer: {
375
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.newSuggestionCountWithoutReviewer.non-final',
376
+ defaultMessage: '{count, plural, one {# new suggestion} other {# new suggestions}}',
377
+ description: 'Review result count when the reviewer name is unavailable and suggestions existed at review start.'
378
+ },
359
379
  thinkingCompleteReviewComplete: {
360
380
  id: 'fabric.editor.ai.suggestions.thinkingComplete.reviewComplete.non-final',
361
381
  defaultMessage: 'Suggestions ready',
@@ -1,4 +1,4 @@
1
- /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -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 = "122.7.0";
30
+ var packageVersion = "122.8.2";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -1,4 +1,4 @@
1
- /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* NewSortingIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* NewSortingIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getStickyHeaderHeight = getStickyHeaderHeight;
7
+ var _utils = require("@atlaskit/editor-prosemirror/utils");
8
+ /**
9
+ * Returns the outermost table's sticky header height for `targetPos` when it is eligible to be
10
+ * sticky. Table headers at least half the viewport high intentionally do not become sticky.
11
+ */
12
+ function getStickyHeaderHeight(view, targetPos) {
13
+ var _findParentNodeOfType;
14
+ var closestTable = (0, _utils.findParentNodeOfTypeClosestToPos)(view.state.doc.resolve(targetPos), view.state.schema.nodes.table);
15
+ if (!closestTable) {
16
+ return undefined;
17
+ }
18
+ var outermostTable = (_findParentNodeOfType = (0, _utils.findParentNodeOfTypeClosestToPos)(view.state.doc.resolve(closestTable.pos), view.state.schema.nodes.table)) !== null && _findParentNodeOfType !== void 0 ? _findParentNodeOfType : closestTable;
19
+ var firstRow = outermostTable.node.firstChild;
20
+ var isHeaderRow = Boolean(firstRow && firstRow.childCount > 0);
21
+ firstRow === null || firstRow === void 0 || firstRow.forEach(function (cell) {
22
+ isHeaderRow && (isHeaderRow = cell.type === view.state.schema.nodes.tableHeader);
23
+ });
24
+ if (!isHeaderRow) {
25
+ return undefined;
26
+ }
27
+ var firstRowDom = view.nodeDOM(outermostTable.pos + 1);
28
+ if (!(firstRowDom instanceof HTMLTableRowElement)) {
29
+ return undefined;
30
+ }
31
+ var headerRow = firstRowDom;
32
+ var height = headerRow.getBoundingClientRect().height;
33
+ return height > 0 && height <= window.innerHeight / 2 ? height : undefined;
34
+ }
@@ -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 = "122.7.0";
27
+ var packageVersion = "122.8.2";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* ButtonGroup.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ButtonGroup.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* DropdownWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* DropdownWrapper.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* ExpandIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ExpandIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* Separator.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* Separator.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.areDocsEqualByBlockStructureAndText = areDocsEqualByBlockStructureAndText;
7
+ var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
8
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
9
+ var _transform = require("@atlaskit/editor-prosemirror/transform");
10
+ /**
11
+ * Returns true when documents have the same text and block structure, while ignoring marks and
12
+ * attributes. This is useful when comparing documents produced by different serialization paths.
13
+ */
14
+ function areDocsEqualByBlockStructureAndText(node1, node2) {
15
+ if ((0, _fg.fg)('confluence_ncs_step_diffing_version_history')) {
16
+ node1 = normalizeDocument(node1);
17
+ node2 = normalizeDocument(node2);
18
+ }
19
+ if (node1.textContent !== node2.textContent) {
20
+ return false;
21
+ }
22
+ var stripped1 = stripMarks(node1);
23
+ var stripped2 = stripMarks(node2);
24
+ return stripped1.nodeSize === stripped2.nodeSize && isBlockStructureEqual(stripped1, stripped2);
25
+ }
26
+ var transformers = new WeakMap();
27
+ function normalizeDocument(node) {
28
+ var schema = node.type.schema;
29
+ var transformer = transformers.get(schema);
30
+ if (!transformer) {
31
+ transformer = new _editorJsonTransformer.JSONTransformer(schema);
32
+ transformers.set(schema, transformer);
33
+ }
34
+ return transformer.parse(transformer.encode(node));
35
+ }
36
+ function stripMarks(doc) {
37
+ var tr = new _transform.Transform(doc);
38
+ tr.removeMark(0, doc.content.size);
39
+ return tr.doc;
40
+ }
41
+ function isBlockStructureEqual(node1, node2) {
42
+ if (node1.type !== node2.type || node1.childCount !== node2.childCount) {
43
+ return false;
44
+ }
45
+ for (var index = 0; index < node1.childCount; index++) {
46
+ if (!isBlockStructureEqual(node1.child(index), node2.child(index))) {
47
+ return false;
48
+ }
49
+ }
50
+ return true;
51
+ }
@@ -219,6 +219,7 @@ function areFragmentsEqual(frag1, frag2, attributesToIgnore, opts) {
219
219
  });
220
220
  return childrenEqual;
221
221
  }
222
+
222
223
  // eslint-disable-next-line @atlaskit/editor/no-re-export
223
224
 
224
225
  // eslint-disable-next-line @atlaskit/editor/no-re-export
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.sanitizeNodeForPrivacy = sanitizeNodeForPrivacy;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _traverse = require("@atlaskit/adf-utils/traverse");
10
- var _resource = require("@atlaskit/mention/resource");
10
+ var _isResolvingMentionProvider = require("@atlaskit/mention/is-resolving-mention-provider");
11
11
  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; }
12
12
  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; }
13
13
  /**
@@ -41,7 +41,7 @@ function sanitizeNodeForPrivacy(json, providerFactory) {
41
41
  var _handler = function handler(_name, providerPromise) {
42
42
  if (providerPromise) {
43
43
  providerPromise.then(function (provider) {
44
- if ((0, _resource.isResolvingMentionProvider)(provider)) {
44
+ if ((0, _isResolvingMentionProvider.isResolvingMentionProvider)(provider)) {
45
45
  mentionNames.forEach(function (name, id) {
46
46
  provider.cacheMentionName(id, name);
47
47
  });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getNonProductionBuildAnalyticsAttributes = void 0;
7
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
8
+ /**
9
+ * Adds a product-owned build classification when the analytics experiment is enabled.
10
+ * A classifier callback is only evaluated in treatment, keeping browser reads out of control.
11
+ * An unknown classification is omitted; an explicit false is preserved.
12
+ */
13
+ var getNonProductionBuildAnalyticsAttributes = exports.getNonProductionBuildAnalyticsAttributes = function getNonProductionBuildAnalyticsAttributes(classification) {
14
+ if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_non_production_build_analytics')) {
15
+ return {};
16
+ }
17
+ var isNonProductionBuild = typeof classification === 'function' ? classification() : classification;
18
+ return isNonProductionBuild !== undefined ? {
19
+ isNonProductionBuild: isNonProductionBuild
20
+ } : {};
21
+ };
@@ -350,6 +350,26 @@ export const aiSuggestionsMessages = defineMessages({
350
350
  defaultMessage: 'Finalizing suggestions for review',
351
351
  description: 'Loading message shown while the AI is finalizing suggestions for review'
352
352
  },
353
+ thinkingCompleteSuggestionCount: {
354
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.suggestionCount.non-final',
355
+ defaultMessage: '{count, plural, one {# suggestion} other {# suggestions}} from {reviewer}',
356
+ description: 'Number of newly available suggestions after a review that began with no pending suggestions. Reviewer is the agent name.'
357
+ },
358
+ thinkingCompleteNewSuggestionCount: {
359
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.newSuggestionCount.non-final',
360
+ defaultMessage: '{count, plural, one {# new suggestion} other {# new suggestions}} from {reviewer}',
361
+ description: 'Number of newly available suggestions after a review that began with pending suggestions. Reviewer is the agent name.'
362
+ },
363
+ thinkingCompleteSuggestionCountWithoutReviewer: {
364
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.suggestionCountWithoutReviewer.non-final',
365
+ defaultMessage: '{count, plural, one {# suggestion} other {# suggestions}}',
366
+ description: 'Review result count when the reviewer name is unavailable and no suggestions existed at review start.'
367
+ },
368
+ thinkingCompleteNewSuggestionCountWithoutReviewer: {
369
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.newSuggestionCountWithoutReviewer.non-final',
370
+ defaultMessage: '{count, plural, one {# new suggestion} other {# new suggestions}}',
371
+ description: 'Review result count when the reviewer name is unavailable and suggestions existed at review start.'
372
+ },
353
373
  thinkingCompleteReviewComplete: {
354
374
  id: 'fabric.editor.ai.suggestions.thinkingComplete.reviewComplete.non-final',
355
375
  defaultMessage: 'Suggestions ready',
@@ -1,4 +1,4 @@
1
- /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./ViewMore.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./GeneratedContentReveal.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useEffect, useState } from 'react';
@@ -1,4 +1,4 @@
1
- /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./UnknownMacroPlaceholder.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelErrorIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelInfoIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelNoteIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelSuccessIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelWarningIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -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 = "122.7.0";
16
+ const packageVersion = "122.8.2";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -1,4 +1,4 @@
1
- /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./CompactQuickInsertMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useState } from 'react';
@@ -1,4 +1,4 @@
1
- /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./QuickInsertHoverPreview.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* NewSortingIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* NewSortingIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./NewSortingIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -0,0 +1,28 @@
1
+ import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
2
+ /**
3
+ * Returns the outermost table's sticky header height for `targetPos` when it is eligible to be
4
+ * sticky. Table headers at least half the viewport high intentionally do not become sticky.
5
+ */
6
+ export function getStickyHeaderHeight(view, targetPos) {
7
+ var _findParentNodeOfType;
8
+ const closestTable = findParentNodeOfTypeClosestToPos(view.state.doc.resolve(targetPos), view.state.schema.nodes.table);
9
+ if (!closestTable) {
10
+ return undefined;
11
+ }
12
+ const outermostTable = (_findParentNodeOfType = findParentNodeOfTypeClosestToPos(view.state.doc.resolve(closestTable.pos), view.state.schema.nodes.table)) !== null && _findParentNodeOfType !== void 0 ? _findParentNodeOfType : closestTable;
13
+ const firstRow = outermostTable.node.firstChild;
14
+ let isHeaderRow = Boolean(firstRow && firstRow.childCount > 0);
15
+ firstRow === null || firstRow === void 0 ? void 0 : firstRow.forEach(cell => {
16
+ isHeaderRow &&= cell.type === view.state.schema.nodes.tableHeader;
17
+ });
18
+ if (!isHeaderRow) {
19
+ return undefined;
20
+ }
21
+ const firstRowDom = view.nodeDOM(outermostTable.pos + 1);
22
+ if (!(firstRowDom instanceof HTMLTableRowElement)) {
23
+ return undefined;
24
+ }
25
+ const headerRow = firstRowDom;
26
+ const height = headerRow.getBoundingClientRect().height;
27
+ return height > 0 && height <= window.innerHeight / 2 ? height : undefined;
28
+ }
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "122.7.0";
17
+ const packageVersion = "122.8.2";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ButtonGroup.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ButtonGroup.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./ButtonGroup.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./DropdownTriggerWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* DropdownWrapper.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./DropdownWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ExpandIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ExpandIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./ExpandIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* Separator.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* Separator.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./Separator.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -0,0 +1,46 @@
1
+ import { JSONTransformer } from '@atlaskit/editor-json-transformer';
2
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
3
+ import { Transform } from '@atlaskit/editor-prosemirror/transform';
4
+
5
+ /**
6
+ * Returns true when documents have the same text and block structure, while ignoring marks and
7
+ * attributes. This is useful when comparing documents produced by different serialization paths.
8
+ */
9
+ export function areDocsEqualByBlockStructureAndText(node1, node2) {
10
+ if (fg('confluence_ncs_step_diffing_version_history')) {
11
+ node1 = normalizeDocument(node1);
12
+ node2 = normalizeDocument(node2);
13
+ }
14
+ if (node1.textContent !== node2.textContent) {
15
+ return false;
16
+ }
17
+ const stripped1 = stripMarks(node1);
18
+ const stripped2 = stripMarks(node2);
19
+ return stripped1.nodeSize === stripped2.nodeSize && isBlockStructureEqual(stripped1, stripped2);
20
+ }
21
+ const transformers = new WeakMap();
22
+ function normalizeDocument(node) {
23
+ const schema = node.type.schema;
24
+ let transformer = transformers.get(schema);
25
+ if (!transformer) {
26
+ transformer = new JSONTransformer(schema);
27
+ transformers.set(schema, transformer);
28
+ }
29
+ return transformer.parse(transformer.encode(node));
30
+ }
31
+ function stripMarks(doc) {
32
+ const tr = new Transform(doc);
33
+ tr.removeMark(0, doc.content.size);
34
+ return tr.doc;
35
+ }
36
+ function isBlockStructureEqual(node1, node2) {
37
+ if (node1.type !== node2.type || node1.childCount !== node2.childCount) {
38
+ return false;
39
+ }
40
+ for (let index = 0; index < node1.childCount; index++) {
41
+ if (!isBlockStructureEqual(node1.child(index), node2.child(index))) {
42
+ return false;
43
+ }
44
+ }
45
+ return true;
46
+ }
@@ -155,6 +155,7 @@ function areFragmentsEqual(frag1, frag2, attributesToIgnore, opts) {
155
155
  });
156
156
  return childrenEqual;
157
157
  }
158
+
158
159
  // eslint-disable-next-line @atlaskit/editor/no-re-export
159
160
  export { getStepRange } from './getStepRange';
160
161
  // eslint-disable-next-line @atlaskit/editor/no-re-export
@@ -1,5 +1,5 @@
1
1
  import { traverse } from '@atlaskit/adf-utils/traverse';
2
- import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
2
+ import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
3
3
  /**
4
4
  * Sanitises a document where some content should not be in the document (e.g. mention names).
5
5
  *
@@ -0,0 +1,15 @@
1
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
+ /**
3
+ * Adds a product-owned build classification when the analytics experiment is enabled.
4
+ * A classifier callback is only evaluated in treatment, keeping browser reads out of control.
5
+ * An unknown classification is omitted; an explicit false is preserved.
6
+ */
7
+ export const getNonProductionBuildAnalyticsAttributes = classification => {
8
+ if (!isExperimentEnabled('platform_editor_non_production_build_analytics')) {
9
+ return {};
10
+ }
11
+ const isNonProductionBuild = typeof classification === 'function' ? classification() : classification;
12
+ return isNonProductionBuild !== undefined ? {
13
+ isNonProductionBuild
14
+ } : {};
15
+ };
@@ -350,6 +350,26 @@ export var aiSuggestionsMessages = defineMessages({
350
350
  defaultMessage: 'Finalizing suggestions for review',
351
351
  description: 'Loading message shown while the AI is finalizing suggestions for review'
352
352
  },
353
+ thinkingCompleteSuggestionCount: {
354
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.suggestionCount.non-final',
355
+ defaultMessage: '{count, plural, one {# suggestion} other {# suggestions}} from {reviewer}',
356
+ description: 'Number of newly available suggestions after a review that began with no pending suggestions. Reviewer is the agent name.'
357
+ },
358
+ thinkingCompleteNewSuggestionCount: {
359
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.newSuggestionCount.non-final',
360
+ defaultMessage: '{count, plural, one {# new suggestion} other {# new suggestions}} from {reviewer}',
361
+ description: 'Number of newly available suggestions after a review that began with pending suggestions. Reviewer is the agent name.'
362
+ },
363
+ thinkingCompleteSuggestionCountWithoutReviewer: {
364
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.suggestionCountWithoutReviewer.non-final',
365
+ defaultMessage: '{count, plural, one {# suggestion} other {# suggestions}}',
366
+ description: 'Review result count when the reviewer name is unavailable and no suggestions existed at review start.'
367
+ },
368
+ thinkingCompleteNewSuggestionCountWithoutReviewer: {
369
+ id: 'fabric.editor.ai.suggestions.thinkingComplete.newSuggestionCountWithoutReviewer.non-final',
370
+ defaultMessage: '{count, plural, one {# new suggestion} other {# new suggestions}}',
371
+ description: 'Review result count when the reviewer name is unavailable and suggestions existed at review start.'
372
+ },
353
373
  thinkingCompleteReviewComplete: {
354
374
  id: 'fabric.editor.ai.suggestions.thinkingComplete.reviewComplete.non-final',
355
375
  defaultMessage: 'Suggestions ready',
@@ -1,4 +1,4 @@
1
- /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./ViewMore.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./GeneratedContentReveal.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./UnknownMacroPlaceholder.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelErrorIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelInfoIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelNoteIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelSuccessIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./PanelWarningIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -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 = "122.7.0";
22
+ var packageVersion = "122.8.2";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -1,4 +1,4 @@
1
- /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./CompactQuickInsertMenuItem.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./QuickInsertHoverPreview.compiled.css";
@@ -1,4 +1,4 @@
1
- /* NewSortingIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* NewSortingIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./NewSortingIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -0,0 +1,28 @@
1
+ import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
2
+ /**
3
+ * Returns the outermost table's sticky header height for `targetPos` when it is eligible to be
4
+ * sticky. Table headers at least half the viewport high intentionally do not become sticky.
5
+ */
6
+ export function getStickyHeaderHeight(view, targetPos) {
7
+ var _findParentNodeOfType;
8
+ var closestTable = findParentNodeOfTypeClosestToPos(view.state.doc.resolve(targetPos), view.state.schema.nodes.table);
9
+ if (!closestTable) {
10
+ return undefined;
11
+ }
12
+ var outermostTable = (_findParentNodeOfType = findParentNodeOfTypeClosestToPos(view.state.doc.resolve(closestTable.pos), view.state.schema.nodes.table)) !== null && _findParentNodeOfType !== void 0 ? _findParentNodeOfType : closestTable;
13
+ var firstRow = outermostTable.node.firstChild;
14
+ var isHeaderRow = Boolean(firstRow && firstRow.childCount > 0);
15
+ firstRow === null || firstRow === void 0 || firstRow.forEach(function (cell) {
16
+ isHeaderRow && (isHeaderRow = cell.type === view.state.schema.nodes.tableHeader);
17
+ });
18
+ if (!isHeaderRow) {
19
+ return undefined;
20
+ }
21
+ var firstRowDom = view.nodeDOM(outermostTable.pos + 1);
22
+ if (!(firstRowDom instanceof HTMLTableRowElement)) {
23
+ return undefined;
24
+ }
25
+ var headerRow = firstRowDom;
26
+ var height = headerRow.getBoundingClientRect().height;
27
+ return height > 0 && height <= window.innerHeight / 2 ? height : undefined;
28
+ }
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "122.7.0";
24
+ var packageVersion = "122.8.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ButtonGroup.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ButtonGroup.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./ButtonGroup.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./DropdownTriggerWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* DropdownWrapper.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./DropdownWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ExpandIcon.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* ExpandIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./ExpandIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* Separator.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* Separator.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./Separator.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -0,0 +1,46 @@
1
+ import { JSONTransformer } from '@atlaskit/editor-json-transformer';
2
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
3
+ import { Transform } from '@atlaskit/editor-prosemirror/transform';
4
+
5
+ /**
6
+ * Returns true when documents have the same text and block structure, while ignoring marks and
7
+ * attributes. This is useful when comparing documents produced by different serialization paths.
8
+ */
9
+ export function areDocsEqualByBlockStructureAndText(node1, node2) {
10
+ if (fg('confluence_ncs_step_diffing_version_history')) {
11
+ node1 = normalizeDocument(node1);
12
+ node2 = normalizeDocument(node2);
13
+ }
14
+ if (node1.textContent !== node2.textContent) {
15
+ return false;
16
+ }
17
+ var stripped1 = stripMarks(node1);
18
+ var stripped2 = stripMarks(node2);
19
+ return stripped1.nodeSize === stripped2.nodeSize && isBlockStructureEqual(stripped1, stripped2);
20
+ }
21
+ var transformers = new WeakMap();
22
+ function normalizeDocument(node) {
23
+ var schema = node.type.schema;
24
+ var transformer = transformers.get(schema);
25
+ if (!transformer) {
26
+ transformer = new JSONTransformer(schema);
27
+ transformers.set(schema, transformer);
28
+ }
29
+ return transformer.parse(transformer.encode(node));
30
+ }
31
+ function stripMarks(doc) {
32
+ var tr = new Transform(doc);
33
+ tr.removeMark(0, doc.content.size);
34
+ return tr.doc;
35
+ }
36
+ function isBlockStructureEqual(node1, node2) {
37
+ if (node1.type !== node2.type || node1.childCount !== node2.childCount) {
38
+ return false;
39
+ }
40
+ for (var index = 0; index < node1.childCount; index++) {
41
+ if (!isBlockStructureEqual(node1.child(index), node2.child(index))) {
42
+ return false;
43
+ }
44
+ }
45
+ return true;
46
+ }
@@ -175,6 +175,7 @@ function areFragmentsEqual(frag1, frag2, attributesToIgnore, opts) {
175
175
  });
176
176
  return childrenEqual;
177
177
  }
178
+
178
179
  // eslint-disable-next-line @atlaskit/editor/no-re-export
179
180
  export { getStepRange } from './getStepRange';
180
181
  // eslint-disable-next-line @atlaskit/editor/no-re-export
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
4
  import { traverse } from '@atlaskit/adf-utils/traverse';
5
- import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
5
+ import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
6
6
  /**
7
7
  * Sanitises a document where some content should not be in the document (e.g. mention names).
8
8
  *
@@ -0,0 +1,15 @@
1
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
+ /**
3
+ * Adds a product-owned build classification when the analytics experiment is enabled.
4
+ * A classifier callback is only evaluated in treatment, keeping browser reads out of control.
5
+ * An unknown classification is omitted; an explicit false is preserved.
6
+ */
7
+ export var getNonProductionBuildAnalyticsAttributes = function getNonProductionBuildAnalyticsAttributes(classification) {
8
+ if (!isExperimentEnabled('platform_editor_non_production_build_analytics')) {
9
+ return {};
10
+ }
11
+ var isNonProductionBuild = typeof classification === 'function' ? classification() : classification;
12
+ return isNonProductionBuild !== undefined ? {
13
+ isNonProductionBuild: isNonProductionBuild
14
+ } : {};
15
+ };
@@ -298,6 +298,16 @@ export declare const aiSuggestionsMessages: {
298
298
  description: string;
299
299
  id: string;
300
300
  };
301
+ thinkingCompleteNewSuggestionCount: {
302
+ defaultMessage: string;
303
+ description: string;
304
+ id: string;
305
+ };
306
+ thinkingCompleteNewSuggestionCountWithoutReviewer: {
307
+ defaultMessage: string;
308
+ description: string;
309
+ id: string;
310
+ };
301
311
  thinkingCompleteNoSuggestions: {
302
312
  defaultMessage: string;
303
313
  description: string;
@@ -318,6 +328,16 @@ export declare const aiSuggestionsMessages: {
318
328
  description: string;
319
329
  id: string;
320
330
  };
331
+ thinkingCompleteSuggestionCount: {
332
+ defaultMessage: string;
333
+ description: string;
334
+ id: string;
335
+ };
336
+ thinkingCompleteSuggestionCountWithoutReviewer: {
337
+ defaultMessage: string;
338
+ description: string;
339
+ id: string;
340
+ };
321
341
  thinkingCompleteViewSuggestions: {
322
342
  defaultMessage: string;
323
343
  description: string;
@@ -0,0 +1,6 @@
1
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
+ /**
3
+ * Returns the outermost table's sticky header height for `targetPos` when it is eligible to be
4
+ * sticky. Table headers at least half the viewport high intentionally do not become sticky.
5
+ */
6
+ export declare function getStickyHeaderHeight(view: EditorView, targetPos: number): number | undefined;
@@ -0,0 +1,6 @@
1
+ import type { Node } from '@atlaskit/editor-prosemirror/model';
2
+ /**
3
+ * Returns true when documents have the same text and block structure, while ignoring marks and
4
+ * attributes. This is useful when comparing documents produced by different serialization paths.
5
+ */
6
+ export declare function areDocsEqualByBlockStructureAndText(node1: Node, node2: Node): boolean;
@@ -0,0 +1,10 @@
1
+ type NonProductionBuildAnalyticsAttributes = {
2
+ isNonProductionBuild?: boolean;
3
+ };
4
+ /**
5
+ * Adds a product-owned build classification when the analytics experiment is enabled.
6
+ * A classifier callback is only evaluated in treatment, keeping browser reads out of control.
7
+ * An unknown classification is omitted; an explicit false is preserved.
8
+ */
9
+ export declare const getNonProductionBuildAnalyticsAttributes: (classification?: boolean | (() => boolean | undefined)) => NonProductionBuildAnalyticsAttributes;
10
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "122.8.0",
3
+ "version": "122.9.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/"
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/media-picker": "^72.4.0",
65
65
  "@atlaskit/media-ui": "^30.16.0",
66
66
  "@atlaskit/media-viewer": "^54.8.0",
67
- "@atlaskit/mention": "^29.1.0",
67
+ "@atlaskit/mention": "^29.2.0",
68
68
  "@atlaskit/menu": "^10.2.0",
69
69
  "@atlaskit/object": "^2.3.0",
70
70
  "@atlaskit/onboarding": "^15.4.0",
@@ -78,13 +78,13 @@
78
78
  "@atlaskit/react-compiler-gating": "^0.2.0",
79
79
  "@atlaskit/react-ufo": "^7.10.0",
80
80
  "@atlaskit/section-message": "^10.2.0",
81
- "@atlaskit/smart-card": "^45.23.0",
81
+ "@atlaskit/smart-card": "^45.24.0",
82
82
  "@atlaskit/smart-user-picker": "^11.8.0",
83
83
  "@atlaskit/spinner": "^20.4.0",
84
84
  "@atlaskit/task-decision": "^21.10.0",
85
85
  "@atlaskit/teams-app-config": "^3.1.0",
86
86
  "@atlaskit/textfield": "^10.2.0",
87
- "@atlaskit/tmp-editor-statsig": "^196.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^197.0.0",
88
88
  "@atlaskit/tokens": "^17.0.0",
89
89
  "@atlaskit/tooltip": "^24.3.0",
90
90
  "@atlaskit/width-detector": "^7.2.0",
@@ -145,6 +145,10 @@
145
145
  "sinon": "^2.2.0"
146
146
  },
147
147
  "platform-feature-flags": {
148
+ "confluence_ncs_step_diffing_version_history": {
149
+ "type": "boolean",
150
+ "referenceOnly": true
151
+ },
148
152
  "platform_editor_add_text_color_tracking": {
149
153
  "type": "boolean"
150
154
  },
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/table/get-sticky-header-height",
3
+ "main": "../../dist/cjs/table/getStickyHeaderHeight.js",
4
+ "module": "../../dist/esm/table/getStickyHeaderHeight.js",
5
+ "module:es2019": "../../dist/es2019/table/getStickyHeaderHeight.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/table/getStickyHeaderHeight.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/utils/areDocsEqualByBlockStructureAndText",
3
+ "main": "../../dist/cjs/utils/areDocsEqualByBlockStructureAndText.js",
4
+ "module": "../../dist/esm/utils/areDocsEqualByBlockStructureAndText.js",
5
+ "module:es2019": "../../dist/es2019/utils/areDocsEqualByBlockStructureAndText.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/utils/areDocsEqualByBlockStructureAndText.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/utils/is-non-production-build",
3
+ "main": "../../dist/cjs/utils/is-non-production-build.js",
4
+ "module": "../../dist/esm/utils/is-non-production-build.js",
5
+ "module:es2019": "../../dist/es2019/utils/is-non-production-build.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/utils/is-non-production-build.d.ts"
10
+ }