@atlaskit/editor-core 214.2.1 → 214.2.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 214.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`124f42c79b002`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/124f42c79b002) -
8
+ Clean up feature gate cc_complexit_fe_improve_node_validation
9
+ - Updated dependencies
10
+
3
11
  ## 214.2.1
4
12
 
5
13
  ### Patch Changes
@@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.findChangedNodesFromTransaction = void 0;
7
- var _utils = require("@atlaskit/editor-prosemirror/utils");
8
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
7
  /**
10
8
  * Finds all top level nodes affected by the transaction
11
9
  * Uses from/to positions in transaction's steps to work out which nodes will
@@ -15,20 +13,12 @@ var findChangedNodesFromTransaction = exports.findChangedNodesFromTransaction =
15
13
  var nodes = [];
16
14
  var steps = tr.steps || [];
17
15
  steps.forEach(function (step) {
18
- step.getMap().forEach(function (oldStart, oldEnd, newStart, newEnd) {
16
+ step.getMap().forEach(function (_oldStart, _oldEnd, newStart, newEnd) {
19
17
  tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), function (node) {
20
- var nodeToCheck = node;
21
- if ((0, _platformFeatureFlags.fg)('cc_complexit_fe_improve_node_validation')) {
22
- var schema = tr.selection.$from.doc.type.schema;
23
- var parentNode = (0, _utils.findParentNode)(function (node) {
24
- return node.type !== schema.nodes.paragraph;
25
- })(tr.selection);
26
- nodeToCheck = parentNode ? parentNode.node : node;
27
- }
28
18
  if (!nodes.find(function (n) {
29
- return n === nodeToCheck;
19
+ return n === node;
30
20
  })) {
31
- nodes.push(nodeToCheck);
21
+ nodes.push(node);
32
22
  }
33
23
  return false;
34
24
  });
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "214.2.0";
8
+ var version = exports.version = "214.2.1";
@@ -1,6 +1,3 @@
1
- import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
-
4
1
  /**
5
2
  * Finds all top level nodes affected by the transaction
6
3
  * Uses from/to positions in transaction's steps to work out which nodes will
@@ -10,18 +7,10 @@ export const findChangedNodesFromTransaction = tr => {
10
7
  const nodes = [];
11
8
  const steps = tr.steps || [];
12
9
  steps.forEach(step => {
13
- step.getMap().forEach((oldStart, oldEnd, newStart, newEnd) => {
10
+ step.getMap().forEach((_oldStart, _oldEnd, newStart, newEnd) => {
14
11
  tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), node => {
15
- let nodeToCheck = node;
16
- if (fg('cc_complexit_fe_improve_node_validation')) {
17
- const {
18
- schema
19
- } = tr.selection.$from.doc.type;
20
- const parentNode = findParentNode(node => node.type !== schema.nodes.paragraph)(tr.selection);
21
- nodeToCheck = parentNode ? parentNode.node : node;
22
- }
23
- if (!nodes.find(n => n === nodeToCheck)) {
24
- nodes.push(nodeToCheck);
12
+ if (!nodes.find(n => n === node)) {
13
+ nodes.push(node);
25
14
  }
26
15
  return false;
27
16
  });
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "214.2.0";
2
+ export const version = "214.2.1";
@@ -1,6 +1,3 @@
1
- import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
-
4
1
  /**
5
2
  * Finds all top level nodes affected by the transaction
6
3
  * Uses from/to positions in transaction's steps to work out which nodes will
@@ -10,20 +7,12 @@ export var findChangedNodesFromTransaction = function findChangedNodesFromTransa
10
7
  var nodes = [];
11
8
  var steps = tr.steps || [];
12
9
  steps.forEach(function (step) {
13
- step.getMap().forEach(function (oldStart, oldEnd, newStart, newEnd) {
10
+ step.getMap().forEach(function (_oldStart, _oldEnd, newStart, newEnd) {
14
11
  tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), function (node) {
15
- var nodeToCheck = node;
16
- if (fg('cc_complexit_fe_improve_node_validation')) {
17
- var schema = tr.selection.$from.doc.type.schema;
18
- var parentNode = findParentNode(function (node) {
19
- return node.type !== schema.nodes.paragraph;
20
- })(tr.selection);
21
- nodeToCheck = parentNode ? parentNode.node : node;
22
- }
23
12
  if (!nodes.find(function (n) {
24
- return n === nodeToCheck;
13
+ return n === node;
25
14
  })) {
26
- nodes.push(nodeToCheck);
15
+ nodes.push(node);
27
16
  }
28
17
  return false;
29
18
  });
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "214.2.0";
2
+ export var version = "214.2.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "214.2.1",
3
+ "version": "214.2.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -81,7 +81,7 @@
81
81
  "uuid": "^3.1.0"
82
82
  },
83
83
  "peerDependencies": {
84
- "@atlaskit/editor-common": "^110.7.0",
84
+ "@atlaskit/editor-common": "^110.8.0",
85
85
  "@atlaskit/link-provider": "^4.0.0",
86
86
  "@atlaskit/media-core": "^37.0.0",
87
87
  "react": "^18.2.0",
@@ -150,9 +150,6 @@
150
150
  }
151
151
  },
152
152
  "platform-feature-flags": {
153
- "cc_complexit_fe_improve_node_validation": {
154
- "type": "boolean"
155
- },
156
153
  "cc_editor_abort_ufo_load_on_editor_scroll": {
157
154
  "type": "boolean"
158
155
  },