@atlaskit/editor-common 97.3.0 → 98.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +1 -2
  3. package/dist/cjs/monitoring/error.js +1 -1
  4. package/dist/cjs/paste/md-plugins/newline-md-plugin.js +6 -6
  5. package/dist/cjs/paste/md-plugins/paragraph-md-plugin.js +6 -8
  6. package/dist/cjs/ui/DropList/index.js +1 -1
  7. package/dist/cjs/ui-menu/DropdownMenu/index.js +1 -0
  8. package/dist/es2019/clipboard/index.js +1 -1
  9. package/dist/es2019/core-utils/document-logger.js +1 -1
  10. package/dist/es2019/element-browser/components/ElementList/cellSizeAndPositionGetter.js +1 -1
  11. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +1 -2
  12. package/dist/es2019/guideline/snapping.js +1 -1
  13. package/dist/es2019/monitoring/error.js +1 -1
  14. package/dist/es2019/normalize-feature-flags.js +1 -1
  15. package/dist/es2019/paste/md-plugins/newline-md-plugin.js +6 -6
  16. package/dist/es2019/paste/md-plugins/paragraph-md-plugin.js +6 -8
  17. package/dist/es2019/preset/plugin-injection-api.js +3 -3
  18. package/dist/es2019/transforms/extension.js +1 -1
  19. package/dist/es2019/ui/DropList/index.js +1 -1
  20. package/dist/es2019/ui/Popup/utils.js +3 -3
  21. package/dist/es2019/ui/unsupported-content-helper.js +2 -2
  22. package/dist/es2019/ui-color/ColorPalette/Palettes/getColorMessage.js +1 -1
  23. package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -0
  24. package/dist/es2019/utils/annotation/index.js +2 -2
  25. package/dist/es2019/utils/breakout.js +1 -1
  26. package/dist/es2019/utils/browser.js +1 -1
  27. package/dist/es2019/utils/calculate-toolbar-position.js +2 -2
  28. package/dist/es2019/utils/commands.js +2 -2
  29. package/dist/es2019/utils/processRawValue.js +1 -1
  30. package/dist/es2019/utils/profiler/render-count.js +2 -2
  31. package/dist/es2019/utils/prosemirror/autojoin.js +1 -1
  32. package/dist/es2019/utils/referentiality.js +1 -1
  33. package/dist/es2019/utils/table.js +4 -4
  34. package/dist/es2019/utils/track-unsupported-content.js +2 -2
  35. package/dist/es2019/utils/validator.js +3 -3
  36. package/dist/es2019/utils/wrap-selection-in.js +1 -1
  37. package/dist/esm/element-browser/components/StatelessElementBrowser.js +1 -2
  38. package/dist/esm/monitoring/error.js +1 -1
  39. package/dist/esm/paste/md-plugins/newline-md-plugin.js +6 -6
  40. package/dist/esm/paste/md-plugins/paragraph-md-plugin.js +6 -8
  41. package/dist/esm/ui/DropList/index.js +1 -1
  42. package/dist/esm/ui-menu/DropdownMenu/index.js +1 -0
  43. package/dist/types/types/feature-flags.d.ts +0 -8
  44. package/dist/types-ts4.5/types/feature-flags.d.ts +0 -8
  45. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 98.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#98966](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98966)
8
+ [`5c8e4c2ce26bf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c8e4c2ce26bf) -
9
+ Remove platform_editor_table_new_column_resizing experiment, remove options and all logic inside
10
+ editor-plugin-table and remove it from feature flag plugin config.
11
+
3
12
  ## 97.3.0
4
13
 
5
14
  ### Minor Changes
@@ -142,9 +142,8 @@ function StatelessElementBrowser(props) {
142
142
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
143
143
  columnCount = _useState2[0],
144
144
  setColumnCount = _useState2[1];
145
- var selectedCategoryIndex;
146
145
  var isFocusSearch;
147
- selectedCategoryIndex = (_props$categories = props.categories) === null || _props$categories === void 0 ? void 0 : _props$categories.findIndex(function (category) {
146
+ var selectedCategoryIndex = (_props$categories = props.categories) === null || _props$categories === void 0 ? void 0 : _props$categories.findIndex(function (category) {
148
147
  return category.name === selectedCategory;
149
148
  });
150
149
  if (showCategories) {
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "97.3.0";
20
+ var packageVersion = "98.0.0";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -12,15 +12,15 @@ exports.default = void 0;
12
12
  // Ignored via go/ees005
13
13
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
14
  var newline = function newline(state, silent) {
15
- var pmax,
16
- // ED-15363: unread variables
17
- // max,
18
- // ws,
19
- pos = state.pos;
15
+ var pos = state.pos;
16
+ // ED-15363: unread variables
17
+ // max,
18
+ // ws,
19
+
20
20
  if (state.src.charCodeAt(pos) !== 0x0a /* \n */) {
21
21
  return false;
22
22
  }
23
- pmax = state.pending.length - 1;
23
+ var pmax = state.pending.length - 1;
24
24
  // ED-15363: unread variable
25
25
  // max = state.posMax;
26
26
 
@@ -13,16 +13,14 @@ exports.default = void 0;
13
13
  // Ignored via go/ees005
14
14
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
15
  var paragraph = function paragraph(state, startLine) {
16
- var content,
17
- terminate,
16
+ var terminate,
18
17
  i,
19
18
  l,
20
19
  token,
21
- oldParentType,
22
- nextLine = startLine + 1,
23
- terminatorRules = state.md.block.ruler.getRules('paragraph'),
24
- endLine = state.lineMax;
25
- oldParentType = state.parentType;
20
+ nextLine = startLine + 1;
21
+ var terminatorRules = state.md.block.ruler.getRules('paragraph');
22
+ var endLine = state.lineMax;
23
+ var oldParentType = state.parentType;
26
24
  state.parentType = 'paragraph';
27
25
 
28
26
  // jump line-by-line until empty one or EOF
@@ -57,7 +55,7 @@ var paragraph = function paragraph(state, startLine) {
57
55
  // beginning and end of paragraphs).
58
56
 
59
57
  // content = state.getLines(startLine, nextLine, state.blkIndent, false) .trim()
60
- content = state.getLines(startLine, nextLine, state.blkIndent, false);
58
+ var content = state.getLines(startLine, nextLine, state.blkIndent, false);
61
59
  state.line = nextLine;
62
60
  token = state.push('paragraph_open', 'p', 1);
63
61
  token.map = [startLine, state.line];
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "97.3.0";
26
+ var packageVersion = "98.0.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -32,6 +32,7 @@ var _ArrowKeyNavigationProvider = require("../ArrowKeyNavigationProvider");
32
32
  var _types = require("../ArrowKeyNavigationProvider/types");
33
33
  var _excluded = ["children"];
34
34
  var _templateObject, _templateObject2;
35
+ /* eslint-disable @repo/internal/react/no-class-components */
35
36
  /**
36
37
  * @jsxRuntime classic
37
38
  * @jsx jsx
@@ -88,7 +88,7 @@ export const getAnalyticsPayload = (state, action) => {
88
88
  actionSubjectId: selectionActionSubjectId
89
89
  } = selectionAnalyticsPayload;
90
90
  const node = (_attributes = selectionAnalyticsPayload.attributes) === null || _attributes === void 0 ? void 0 : _attributes.node;
91
- let content = [];
91
+ const content = [];
92
92
  let extensionType;
93
93
  let extensionKey;
94
94
  switch (selectionActionSubjectId) {
@@ -141,7 +141,7 @@ const getBlockNodeContent = (node, pos) => {
141
141
  return blockNodeContent;
142
142
  };
143
143
  const getInlineNodes = (nodes, pos) => {
144
- let inlineNodes = nodes.map(node => {
144
+ const inlineNodes = nodes.map(node => {
145
145
  const {
146
146
  nodeSize
147
147
  } = node;
@@ -12,7 +12,7 @@ export default function cellSizeAndPositionGetter(containerWidth, scrollbarWidth
12
12
  * Save the currently rendered columnY positions.
13
13
  * Have to be within the current render scope.
14
14
  */
15
- let columnYMap = [];
15
+ const columnYMap = [];
16
16
  return ({
17
17
  index
18
18
  }) => {
@@ -130,9 +130,8 @@ function StatelessElementBrowser(props) {
130
130
  } = useContainerWidth();
131
131
  const categoryBeenChosen = useRef(false);
132
132
  const [columnCount, setColumnCount] = useState(1);
133
- let selectedCategoryIndex;
134
133
  let isFocusSearch;
135
- selectedCategoryIndex = (_props$categories = props.categories) === null || _props$categories === void 0 ? void 0 : _props$categories.findIndex(category => {
134
+ const selectedCategoryIndex = (_props$categories = props.categories) === null || _props$categories === void 0 ? void 0 : _props$categories.findIndex(category => {
136
135
  return category.name === selectedCategory;
137
136
  });
138
137
  if (showCategories) {
@@ -14,7 +14,7 @@ export const findClosestSnap = (mediaSingleWidth, snapArray, guidelineSnaps, sna
14
14
  const gap = Math.abs(snapArray[closestGapIndex] - mediaSingleWidth);
15
15
  if (gap < snapGap) {
16
16
  const snappingWidth = snapArray[closestGapIndex];
17
- let guidelineKeys = [];
17
+ const guidelineKeys = [];
18
18
  // find wich guideline have the matching snap width
19
19
  guidelineSnaps.forEach(gs => {
20
20
  if (gs.width === snappingWidth) {
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "97.3.0";
4
+ const packageVersion = "98.0.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -9,7 +9,7 @@ value, objectFlagKeys) {
9
9
  }
10
10
  function isValidJSONObject(value) {
11
11
  try {
12
- let result = JSON.parse(value);
12
+ const result = JSON.parse(value);
13
13
  if (typeof result === 'object' && result !== null) {
14
14
  return true;
15
15
  }
@@ -6,15 +6,15 @@
6
6
  // Ignored via go/ees005
7
7
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
8
  const newline = (state, silent) => {
9
- let pmax,
10
- // ED-15363: unread variables
11
- // max,
12
- // ws,
13
- pos = state.pos;
9
+ let pos = state.pos;
10
+ // ED-15363: unread variables
11
+ // max,
12
+ // ws,
13
+
14
14
  if (state.src.charCodeAt(pos) !== 0x0a /* \n */) {
15
15
  return false;
16
16
  }
17
- pmax = state.pending.length - 1;
17
+ const pmax = state.pending.length - 1;
18
18
  // ED-15363: unread variable
19
19
  // max = state.posMax;
20
20
 
@@ -7,16 +7,14 @@
7
7
  // Ignored via go/ees005
8
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
9
  const paragraph = (state, startLine) => {
10
- let content,
11
- terminate,
10
+ let terminate,
12
11
  i,
13
12
  l,
14
13
  token,
15
- oldParentType,
16
- nextLine = startLine + 1,
17
- terminatorRules = state.md.block.ruler.getRules('paragraph'),
18
- endLine = state.lineMax;
19
- oldParentType = state.parentType;
14
+ nextLine = startLine + 1;
15
+ const terminatorRules = state.md.block.ruler.getRules('paragraph');
16
+ const endLine = state.lineMax;
17
+ const oldParentType = state.parentType;
20
18
  state.parentType = 'paragraph';
21
19
 
22
20
  // jump line-by-line until empty one or EOF
@@ -51,7 +49,7 @@ const paragraph = (state, startLine) => {
51
49
  // beginning and end of paragraphs).
52
50
 
53
51
  // content = state.getLines(startLine, nextLine, state.blkIndent, false) .trim()
54
- content = state.getLines(startLine, nextLine, state.blkIndent, false);
52
+ const content = state.getLines(startLine, nextLine, state.blkIndent, false);
55
53
  state.line = nextLine;
56
54
  token = state.push('paragraph_open', 'p', 1);
57
55
  token.map = [startLine, state.line];
@@ -54,7 +54,7 @@ const extractSharedStateFromPlugins = ({
54
54
  }) => {
55
55
  const isInitialization = !oldEditorState && newEditorState;
56
56
  const result = new Map();
57
- for (let plugin of plugins) {
57
+ for (const plugin of plugins) {
58
58
  if (!plugin || !hasGetSharedState(plugin)) {
59
59
  continue;
60
60
  }
@@ -76,7 +76,7 @@ const notifyListenersThrottled = throttle(({
76
76
  updatesToNotifyQueue
77
77
  }) => {
78
78
  const callbacks = [];
79
- for (let [pluginName, diffs] of updatesToNotifyQueue.entries()) {
79
+ for (const [pluginName, diffs] of updatesToNotifyQueue.entries()) {
80
80
  const pluginListeners = listeners.get(pluginName) || [];
81
81
  pluginListeners.forEach(callback => {
82
82
  diffs.forEach(diff => {
@@ -192,7 +192,7 @@ export class SharedStateAPI {
192
192
  if (sharedStateDiffs.size === 0) {
193
193
  return;
194
194
  }
195
- for (let [pluginName, nextDiff] of sharedStateDiffs) {
195
+ for (const [pluginName, nextDiff] of sharedStateDiffs) {
196
196
  const currentDiffQueue = updatesToNotifyQueue.get(pluginName) || [];
197
197
  updatesToNotifyQueue.set(pluginName, [...currentDiffQueue, nextDiff]);
198
198
  }
@@ -47,7 +47,7 @@ export const transformSliceToRemoveOpenMultiBodiedExtension = (slice, schema) =>
47
47
  if (((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === multiBodiedExtension && ((_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 ? void 0 : (_slice$content$firstC3 = _slice$content$firstC2.firstChild) === null || _slice$content$firstC3 === void 0 ? void 0 : _slice$content$firstC3.type) !== extensionFrame) {
48
48
  depthToReduce = 1;
49
49
  }
50
- let fragment = mapFragment(slice.content, (node, parent, index) => {
50
+ const fragment = mapFragment(slice.content, (node, parent, index) => {
51
51
  if (node.type === multiBodiedExtension && !parent || node.type === extensionFrame) {
52
52
  const currentNodeIsAtStartAndIsOpen = slice.openStart >= depthToReduce && index === 0;
53
53
  const currentNodeIsAtEndAndIsOpen = slice.openEnd >= depthToReduce && index + 1 === slice.content.childCount;
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "97.3.0";
16
+ const packageVersion = "98.0.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -145,8 +145,8 @@ const calculateVerticalStickBottom = ({
145
145
  ...position
146
146
  };
147
147
  if (scrollParent) {
148
- let topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
149
- let targetEnd = targetHeight + topOffsetTop;
148
+ const topOffsetTop = targetTop - scrollParent.getBoundingClientRect().top;
149
+ const targetEnd = targetHeight + topOffsetTop;
150
150
  if (scrollParent.clientHeight - targetEnd <= popup.clientHeight + offset[1] * 2 && topOffsetTop < scrollParent.clientHeight) {
151
151
  const scroll = targetEnd - scrollParent.clientHeight + offset[1] * 2;
152
152
  let top = newPos.top || 0;
@@ -213,7 +213,7 @@ const calculateVerticalPlacement = ({
213
213
  } else if (placement === 'start') {
214
214
  position.top = Math.ceil(targetTop - popupOffsetParentTop - offset[1] + (isPopupParentBody ? 0 : popupOffsetParentScrollTop));
215
215
  } else {
216
- let top = Math.ceil(targetTop - popupOffsetParentTop + targetHeight + (isPopupParentBody ? 0 : popupOffsetParentScrollTop) - borderBottomWidth + offset[1]);
216
+ const top = Math.ceil(targetTop - popupOffsetParentTop + targetHeight + (isPopupParentBody ? 0 : popupOffsetParentScrollTop) - borderBottomWidth + offset[1]);
217
217
  position.top = top;
218
218
  }
219
219
  return position;
@@ -4,9 +4,9 @@ export function getUnsupportedContent(
4
4
  // Ignored via go/ees005
5
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
6
  message, prefix, node, intl) {
7
- let defaultLocale = 'en';
7
+ const defaultLocale = 'en';
8
8
  let canTranslateToLocale = true;
9
- let locale = intl ? intl.locale : defaultLocale;
9
+ const locale = intl ? intl.locale : defaultLocale;
10
10
  let finalMessage = message.defaultMessage;
11
11
  if (node && locale.startsWith(defaultLocale)) {
12
12
  const {
@@ -1,5 +1,5 @@
1
1
  export default function getColorMessage(messages, color) {
2
- let message = messages[color];
2
+ const message = messages[color];
3
3
  if (!message) {
4
4
  // eslint-disable-next-line no-console
5
5
  console.warn(`Text color palette does not have an internationalization message for color ${color.toUpperCase()}.
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
+ /* eslint-disable @repo/internal/react/no-class-components */
3
4
  /**
4
5
  * @jsxRuntime classic
5
6
  * @jsx jsx
@@ -39,7 +39,7 @@ export const getAnnotationIdsFromRange = (rangeSelection, doc, schema) => {
39
39
  from,
40
40
  to
41
41
  } = rangeSelection;
42
- let annotations = new Set();
42
+ const annotations = new Set();
43
43
  doc.nodesBetween(from, to, node => {
44
44
  if (!node.marks) {
45
45
  return true;
@@ -104,7 +104,7 @@ export function getRangeInlineNodeNames({
104
104
  if (!fg('editor_inline_comments_on_inline_nodes')) {
105
105
  return undefined;
106
106
  }
107
- let nodeNames = new Set();
107
+ const nodeNames = new Set();
108
108
  try {
109
109
  doc.nodesBetween(pos.from, pos.to, node => {
110
110
  if (node.isInline) {
@@ -32,7 +32,7 @@ const breakoutConsts = {
32
32
  if (effectiveFullWidth <= 0) {
33
33
  return '100%';
34
34
  }
35
- let wideWidth = breakoutConsts.calcWideWidth(containerWidth, undefined, undefined, padding);
35
+ const wideWidth = breakoutConsts.calcWideWidth(containerWidth, undefined, undefined, padding);
36
36
  if (wideWidth.endsWith('%')) {
37
37
  return `${Math.min(effectiveFullWidth, breakoutConsts.fullWidthLayoutWidth)}px`;
38
38
  }
@@ -39,7 +39,7 @@ if (typeof navigator !== 'undefined') {
39
39
  // Ignored via go/ees005
40
40
  // eslint-disable-next-line require-unicode-regexp
41
41
  /Windows|Win\d+/i.test(navigator.userAgent);
42
- let ie = result.ie = !!(ieUpTo10 || ie11up || ieEdge);
42
+ const ie = result.ie = !!(ieUpTo10 || ie11up || ieEdge);
43
43
  result.ie_version = ieUpTo10 ?
44
44
  // Ignored via go/ees005
45
45
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -104,8 +104,8 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
104
104
  head,
105
105
  anchor
106
106
  } = editorView.state.selection;
107
- let topCoords = editorView.coordsAtPos(Math.min(head, anchor));
108
- let bottomCoords = editorView.coordsAtPos(Math.max(head, anchor) - Math.min(range.endOffset, 1));
107
+ const topCoords = editorView.coordsAtPos(Math.min(head, anchor));
108
+ const bottomCoords = editorView.coordsAtPos(Math.max(head, anchor) - Math.min(range.endOffset, 1));
109
109
  let top;
110
110
  // If not the same line, display toolbar below.
111
111
  if (head > anchor && topCoords.top !== bottomCoords.top) {
@@ -263,11 +263,11 @@ export const insertContentDeleteRange = (tr, getSelectionResolvedPos, insertions
263
263
  // eslint-disable-next-line @typescript-eslint/max-params
264
264
  ) => {
265
265
  insertions.forEach(contentInsert => {
266
- let [content, pos] = contentInsert;
266
+ const [content, pos] = contentInsert;
267
267
  tr.insert(tr.mapping.map(pos), content);
268
268
  });
269
269
  deletions.forEach(deleteRange => {
270
- let [firstPos, lastPos] = deleteRange;
270
+ const [firstPos, lastPos] = deleteRange;
271
271
  tr.delete(tr.mapping.map(firstPos), tr.mapping.map(lastPos));
272
272
  });
273
273
  tr.setSelection(new TextSelection(getSelectionResolvedPos(tr)));
@@ -207,7 +207,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
207
207
  } = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent));
208
208
  }
209
209
  const entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent);
210
- let newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
210
+ const newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
211
211
  const parsedDoc = Node.fromJSON(schema, newEntity);
212
212
 
213
213
  // throws an error if the document is invalid
@@ -72,7 +72,7 @@ export class RenderCountProfiler {
72
72
  const component = (_this$store$PROFILER_ = (_this$store3 = this.store) === null || _this$store3 === void 0 ? void 0 : (_this$store3$PROFILER = _this$store3[PROFILER_KEY]) === null || _this$store3$PROFILER === void 0 ? void 0 : (_this$store3$PROFILER2 = _this$store3$PROFILER.components) === null || _this$store3$PROFILER2 === void 0 ? void 0 : _this$store3$PROFILER2[componentId]) !== null && _this$store$PROFILER_ !== void 0 ? _this$store$PROFILER_ : {};
73
73
  const counters = [];
74
74
  // eslint-disable-next-line guard-for-in
75
- for (let instanceId in component) {
75
+ for (const instanceId in component) {
76
76
  const counter = {
77
77
  instanceId,
78
78
  count: component[instanceId].count
@@ -88,7 +88,7 @@ export class RenderCountProfiler {
88
88
  const component = (_this$store$PROFILER_2 = (_this$store4 = this.store) === null || _this$store4 === void 0 ? void 0 : (_this$store4$PROFILER = _this$store4[PROFILER_KEY]) === null || _this$store4$PROFILER === void 0 ? void 0 : (_this$store4$PROFILER2 = _this$store4$PROFILER.components) === null || _this$store4$PROFILER2 === void 0 ? void 0 : _this$store4$PROFILER2[componentId]) !== null && _this$store$PROFILER_2 !== void 0 ? _this$store$PROFILER_2 : {};
89
89
  let total = 0;
90
90
  // eslint-disable-next-line guard-for-in
91
- for (let instanceId in component) {
91
+ for (const instanceId in component) {
92
92
  total += component[instanceId].count;
93
93
  }
94
94
  return total;
@@ -12,7 +12,7 @@ import { canJoin } from '@atlaskit/editor-prosemirror/transform';
12
12
  */
13
13
  export function autoJoinTr(tr, isJoinable) {
14
14
  if (Array.isArray(isJoinable)) {
15
- let types = isJoinable;
15
+ const types = isJoinable;
16
16
  isJoinable = node => types.indexOf(node.type.name) > -1;
17
17
  }
18
18
  const ranges = [];
@@ -191,7 +191,7 @@ const getChildrenNodeAmount = (id, allNodes) => {
191
191
  traverseHistory.set(id, false);
192
192
  while (searchTerms.size > 0) {
193
193
  const [currTerm] = searchTerms;
194
- let targets = getNodeTargetsById(currTerm, allNodes);
194
+ const targets = getNodeTargetsById(currTerm, allNodes);
195
195
  targets.forEach(target => {
196
196
  const isTargetCounted = traverseHistory.get(target);
197
197
  if (!isTargetCounted) {
@@ -9,7 +9,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
9
9
  export function getColumnWidths(node) {
10
10
  let tableColumnWidths = [];
11
11
  node.forEach(row => {
12
- let currentTableWidth = [];
12
+ const currentTableWidth = [];
13
13
  row.forEach(cell => {
14
14
  const {
15
15
  colspan,
@@ -36,7 +36,7 @@ export function calcTableColumnWidths(node) {
36
36
  // TODO: replaced with getColumnWidths, which correctly scans entire table for column widths
37
37
  if (fg('platform_editor_table_row_span_fix')) {
38
38
  const firstRow = node.firstChild;
39
- let tableColumnWidths = [];
39
+ const tableColumnWidths = [];
40
40
  if (firstRow) {
41
41
  firstRow.forEach(cell => {
42
42
  const {
@@ -63,7 +63,7 @@ export function calcTableColumnWidths(node) {
63
63
  // Sanity validation, but it should always have a first row
64
64
  // Iterate for the cells in the first row
65
65
  firstRow.forEach(colNode => {
66
- let colwidth = colNode.attrs.colwidth || [0];
66
+ const colwidth = colNode.attrs.colwidth || [0];
67
67
 
68
68
  // If we have colwidth, we added it
69
69
  if (colwidth) {
@@ -111,7 +111,7 @@ export function isPositionNearTableRow(pos, schema, direction) {
111
111
  if (!schema.nodes.tableRow) {
112
112
  return false;
113
113
  }
114
- let doc = pos.doc;
114
+ const doc = pos.doc;
115
115
  let resolved = pos;
116
116
  const sibling = direction === 'before' ? 'nodeBefore' : 'nodeAfter';
117
117
  while (resolved.depth > 0) {
@@ -13,7 +13,7 @@ function concatAncestorHierarchy(node, ancestoryHierarchy) {
13
13
  const sanitizeMarks = (marks = []) => {
14
14
  // Ignored via go/ees005
15
15
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- let sanitizedMarks = [];
16
+ const sanitizedMarks = [];
17
17
  marks.forEach(mark => {
18
18
  if (mark.attrs) {
19
19
  const attrs = sanitizeAttributes(mark.attrs);
@@ -32,7 +32,7 @@ const sanitizeMarks = (marks = []) => {
32
32
  const sanitizeAttributes = (attrs = {}) => {
33
33
  // Ignored via go/ees005
34
34
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- let sanitizedAttrs = Object.assign({}, attrs);
35
+ const sanitizedAttrs = Object.assign({}, attrs);
36
36
  Object.keys(attrs).filter(key => !whitelistedAttributes.includes(key)).forEach(key => {
37
37
  sanitizedAttrs[key] !== null ? sanitizedAttrs[key] = '' : sanitizedAttrs[key] = 'null';
38
38
  });
@@ -528,7 +528,7 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
528
528
  case 'paragraph':
529
529
  {
530
530
  if (adfStage === 'stage0') {
531
- let paragraphNode = {
531
+ const paragraphNode = {
532
532
  type,
533
533
  content: content || []
534
534
  };
@@ -559,7 +559,7 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
559
559
  }
560
560
  case 'text':
561
561
  {
562
- let {
562
+ const {
563
563
  marks
564
564
  } = node;
565
565
  if (text) {
@@ -583,7 +583,7 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
583
583
  const between = (x, a, b) => x >= a && x <= b;
584
584
  if (level && between(level, 1, 6)) {
585
585
  if (adfStage === 'stage0') {
586
- let headingNode = {
586
+ const headingNode = {
587
587
  type,
588
588
  content: content,
589
589
  attrs: {
@@ -7,7 +7,7 @@ import { createWrapSelectionTransaction } from './create-wrap-selection-transact
7
7
  */
8
8
  export function wrapSelectionIn(type) {
9
9
  return function (state, dispatch) {
10
- let tr = createWrapSelectionTransaction({
10
+ const tr = createWrapSelectionTransaction({
11
11
  state,
12
12
  type
13
13
  });
@@ -131,9 +131,8 @@ function StatelessElementBrowser(props) {
131
131
  _useState2 = _slicedToArray(_useState, 2),
132
132
  columnCount = _useState2[0],
133
133
  setColumnCount = _useState2[1];
134
- var selectedCategoryIndex;
135
134
  var isFocusSearch;
136
- selectedCategoryIndex = (_props$categories = props.categories) === null || _props$categories === void 0 ? void 0 : _props$categories.findIndex(function (category) {
135
+ var selectedCategoryIndex = (_props$categories = props.categories) === null || _props$categories === void 0 ? void 0 : _props$categories.findIndex(function (category) {
137
136
  return category.name === selectedCategory;
138
137
  });
139
138
  if (showCategories) {
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "97.3.0";
10
+ var packageVersion = "98.0.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -6,15 +6,15 @@
6
6
  // Ignored via go/ees005
7
7
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
8
  var newline = function newline(state, silent) {
9
- var pmax,
10
- // ED-15363: unread variables
11
- // max,
12
- // ws,
13
- pos = state.pos;
9
+ var pos = state.pos;
10
+ // ED-15363: unread variables
11
+ // max,
12
+ // ws,
13
+
14
14
  if (state.src.charCodeAt(pos) !== 0x0a /* \n */) {
15
15
  return false;
16
16
  }
17
- pmax = state.pending.length - 1;
17
+ var pmax = state.pending.length - 1;
18
18
  // ED-15363: unread variable
19
19
  // max = state.posMax;
20
20
 
@@ -7,16 +7,14 @@
7
7
  // Ignored via go/ees005
8
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
9
  var paragraph = function paragraph(state, startLine) {
10
- var content,
11
- terminate,
10
+ var terminate,
12
11
  i,
13
12
  l,
14
13
  token,
15
- oldParentType,
16
- nextLine = startLine + 1,
17
- terminatorRules = state.md.block.ruler.getRules('paragraph'),
18
- endLine = state.lineMax;
19
- oldParentType = state.parentType;
14
+ nextLine = startLine + 1;
15
+ var terminatorRules = state.md.block.ruler.getRules('paragraph');
16
+ var endLine = state.lineMax;
17
+ var oldParentType = state.parentType;
20
18
  state.parentType = 'paragraph';
21
19
 
22
20
  // jump line-by-line until empty one or EOF
@@ -51,7 +49,7 @@ var paragraph = function paragraph(state, startLine) {
51
49
  // beginning and end of paragraphs).
52
50
 
53
51
  // content = state.getLines(startLine, nextLine, state.blkIndent, false) .trim()
54
- content = state.getLines(startLine, nextLine, state.blkIndent, false);
52
+ var content = state.getLines(startLine, nextLine, state.blkIndent, false);
55
53
  state.line = nextLine;
56
54
  token = state.push('paragraph_open', 'p', 1);
57
55
  token.map = [startLine, state.line];
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "97.3.0";
23
+ var packageVersion = "98.0.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -15,6 +15,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
15
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) { _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; }
16
16
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
17
17
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
18
+ /* eslint-disable @repo/internal/react/no-class-components */
18
19
  /**
19
20
  * @jsxRuntime classic
20
21
  * @jsx jsx
@@ -206,14 +206,6 @@ export type FeatureFlags = {
206
206
  * @default false
207
207
  */
208
208
  tableWithFixedColumnWidthsOption?: boolean;
209
- /**
210
- * @description
211
- * Enables new column resizing experience
212
- *
213
- * @see https://product-fabric.atlassian.net/browse/ED-17798
214
- * @default false
215
- */
216
- tableNewColumnResizing?: boolean;
217
209
  /**
218
210
  * @description
219
211
  * Enables macro interaction visual updates
@@ -206,14 +206,6 @@ export type FeatureFlags = {
206
206
  * @default false
207
207
  */
208
208
  tableWithFixedColumnWidthsOption?: boolean;
209
- /**
210
- * @description
211
- * Enables new column resizing experience
212
- *
213
- * @see https://product-fabric.atlassian.net/browse/ED-17798
214
- * @default false
215
- */
216
- tableNewColumnResizing?: boolean;
217
209
  /**
218
210
  * @description
219
211
  * Enables macro interaction visual updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "97.3.0",
3
+ "version": "98.0.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -149,12 +149,12 @@
149
149
  "@atlaskit/primitives": "^13.3.0",
150
150
  "@atlaskit/profilecard": "^21.1.0",
151
151
  "@atlaskit/section-message": "^6.8.0",
152
- "@atlaskit/smart-card": "^33.1.0",
152
+ "@atlaskit/smart-card": "^33.3.0",
153
153
  "@atlaskit/smart-user-picker": "^6.11.0",
154
154
  "@atlaskit/spinner": "^16.3.0",
155
155
  "@atlaskit/task-decision": "^17.11.0",
156
156
  "@atlaskit/textfield": "^6.7.0",
157
- "@atlaskit/tmp-editor-statsig": "^2.30.0",
157
+ "@atlaskit/tmp-editor-statsig": "^2.31.0",
158
158
  "@atlaskit/tokens": "^2.5.0",
159
159
  "@atlaskit/tooltip": "^19.0.0",
160
160
  "@atlaskit/width-detector": "^4.3.0",