@atlaskit/editor-plugin-local-id 11.0.3 → 11.0.4

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-plugin-local-id
2
2
 
3
+ ## 11.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0eee224e21f86`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0eee224e21f86) -
8
+ Clean up feature gate `platform_editor_use_localid_dedupe`
9
+ - Updated dependencies
10
+
3
11
  ## 11.0.3
4
12
 
5
13
  ### Patch Changes
@@ -12,7 +12,6 @@ var _collab = require("@atlaskit/editor-common/collab");
12
12
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
13
13
  var _utils = require("@atlaskit/editor-common/utils");
14
14
  var _state = require("@atlaskit/editor-prosemirror/state");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
16
  var _generateShortUUID = require("./generateShortUUID");
18
17
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
@@ -156,28 +155,23 @@ var createPlugin = exports.createPlugin = function createPlugin(api) {
156
155
  return true;
157
156
  }
158
157
  modified = true;
159
- if ((0, _platformFeatureFlags.fg)('platform_editor_use_localid_dedupe')) {
160
- // Always add to addedNodes for duplicate prevention
161
- addedNodes.add(node);
162
- if ((0, _expValEquals.expValEquals)('platform_editor_ai_tablecell_localids', 'isEnabled', true)) {
163
- var _positionsByNode$get;
164
- var positions = (_positionsByNode$get = positionsByNode.get(node)) !== null && _positionsByNode$get !== void 0 ? _positionsByNode$get : new Set();
165
- positions.add(pos);
166
- positionsByNode.set(node, positions);
167
- } else {
168
- addedNodePos.set(node, pos);
169
- }
158
+
159
+ // Always add to addedNodes for duplicate prevention
160
+ addedNodes.add(node);
161
+ if ((0, _expValEquals.expValEquals)('platform_editor_ai_tablecell_localids', 'isEnabled', true)) {
162
+ var _positionsByNode$get;
163
+ var positions = (_positionsByNode$get = positionsByNode.get(node)) !== null && _positionsByNode$get !== void 0 ? _positionsByNode$get : new Set();
164
+ positions.add(pos);
165
+ positionsByNode.set(node, positions);
170
166
  } else {
171
- if (!(node !== null && node !== void 0 && node.attrs.localId)) {
172
- nodesToUpdate.set(pos, generateUUID());
173
- }
167
+ addedNodePos.set(node, pos);
174
168
  }
175
169
  return true;
176
170
  });
177
171
  });
178
172
  });
179
173
  });
180
- if (addedNodes.size > 0 && (0, _platformFeatureFlags.fg)('platform_editor_use_localid_dedupe')) {
174
+ if (addedNodes.size > 0) {
181
175
  newState.doc.descendants(function (node) {
182
176
  var _node$attrs;
183
177
  // Also track existing UUIDs in the global Set for short UUID collision detection
@@ -3,7 +3,6 @@ import { tintDirtyTransaction } from '@atlaskit/editor-common/collab';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { stepHasSlice } from '@atlaskit/editor-common/utils';
5
5
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
  import { generateShortUUID, generatedShortUUIDs } from './generateShortUUID';
9
8
  export const localIdPluginKey = new PluginKey('localIdPlugin');
@@ -144,28 +143,23 @@ export const createPlugin = api => {
144
143
  return true;
145
144
  }
146
145
  modified = true;
147
- if (fg('platform_editor_use_localid_dedupe')) {
148
- // Always add to addedNodes for duplicate prevention
149
- addedNodes.add(node);
150
- if (expValEquals('platform_editor_ai_tablecell_localids', 'isEnabled', true)) {
151
- var _positionsByNode$get;
152
- const positions = (_positionsByNode$get = positionsByNode.get(node)) !== null && _positionsByNode$get !== void 0 ? _positionsByNode$get : new Set();
153
- positions.add(pos);
154
- positionsByNode.set(node, positions);
155
- } else {
156
- addedNodePos.set(node, pos);
157
- }
146
+
147
+ // Always add to addedNodes for duplicate prevention
148
+ addedNodes.add(node);
149
+ if (expValEquals('platform_editor_ai_tablecell_localids', 'isEnabled', true)) {
150
+ var _positionsByNode$get;
151
+ const positions = (_positionsByNode$get = positionsByNode.get(node)) !== null && _positionsByNode$get !== void 0 ? _positionsByNode$get : new Set();
152
+ positions.add(pos);
153
+ positionsByNode.set(node, positions);
158
154
  } else {
159
- if (!(node !== null && node !== void 0 && node.attrs.localId)) {
160
- nodesToUpdate.set(pos, generateUUID());
161
- }
155
+ addedNodePos.set(node, pos);
162
156
  }
163
157
  return true;
164
158
  });
165
159
  });
166
160
  });
167
161
  });
168
- if (addedNodes.size > 0 && fg('platform_editor_use_localid_dedupe')) {
162
+ if (addedNodes.size > 0) {
169
163
  newState.doc.descendants(node => {
170
164
  var _node$attrs;
171
165
  // Also track existing UUIDs in the global Set for short UUID collision detection
@@ -8,7 +8,6 @@ import { tintDirtyTransaction } from '@atlaskit/editor-common/collab';
8
8
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
9
9
  import { stepHasSlice } from '@atlaskit/editor-common/utils';
10
10
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { generateShortUUID, generatedShortUUIDs } from './generateShortUUID';
14
13
  export var localIdPluginKey = new PluginKey('localIdPlugin');
@@ -149,28 +148,23 @@ export var createPlugin = function createPlugin(api) {
149
148
  return true;
150
149
  }
151
150
  modified = true;
152
- if (fg('platform_editor_use_localid_dedupe')) {
153
- // Always add to addedNodes for duplicate prevention
154
- addedNodes.add(node);
155
- if (expValEquals('platform_editor_ai_tablecell_localids', 'isEnabled', true)) {
156
- var _positionsByNode$get;
157
- var positions = (_positionsByNode$get = positionsByNode.get(node)) !== null && _positionsByNode$get !== void 0 ? _positionsByNode$get : new Set();
158
- positions.add(pos);
159
- positionsByNode.set(node, positions);
160
- } else {
161
- addedNodePos.set(node, pos);
162
- }
151
+
152
+ // Always add to addedNodes for duplicate prevention
153
+ addedNodes.add(node);
154
+ if (expValEquals('platform_editor_ai_tablecell_localids', 'isEnabled', true)) {
155
+ var _positionsByNode$get;
156
+ var positions = (_positionsByNode$get = positionsByNode.get(node)) !== null && _positionsByNode$get !== void 0 ? _positionsByNode$get : new Set();
157
+ positions.add(pos);
158
+ positionsByNode.set(node, positions);
163
159
  } else {
164
- if (!(node !== null && node !== void 0 && node.attrs.localId)) {
165
- nodesToUpdate.set(pos, generateUUID());
166
- }
160
+ addedNodePos.set(node, pos);
167
161
  }
168
162
  return true;
169
163
  });
170
164
  });
171
165
  });
172
166
  });
173
- if (addedNodes.size > 0 && fg('platform_editor_use_localid_dedupe')) {
167
+ if (addedNodes.size > 0) {
174
168
  newState.doc.descendants(function (node) {
175
169
  var _node$attrs;
176
170
  // Also track existing UUIDs in the global Set for short UUID collision detection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-local-id",
3
- "version": "11.0.3",
3
+ "version": "11.0.4",
4
4
  "description": "LocalId plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -20,18 +20,18 @@
20
20
  "sideEffects": false,
21
21
  "atlaskit:src": "src/index.ts",
22
22
  "dependencies": {
23
- "@atlaskit/adf-schema": "^56.5.0",
23
+ "@atlaskit/adf-schema": "^56.6.0",
24
24
  "@atlaskit/editor-plugin-collab-edit": "^14.0.0",
25
25
  "@atlaskit/editor-plugin-composition": "^12.0.0",
26
26
  "@atlaskit/editor-plugin-limited-mode": "^10.0.0",
27
27
  "@atlaskit/editor-prosemirror": "^8.0.0",
28
28
  "@atlaskit/platform-feature-flags": "^2.1.0",
29
- "@atlaskit/tmp-editor-statsig": "^141.0.0",
29
+ "@atlaskit/tmp-editor-statsig": "^141.1.0",
30
30
  "@babel/runtime": "^7.0.0",
31
31
  "raf-schd": "^4.0.3"
32
32
  },
33
33
  "peerDependencies": {
34
- "@atlaskit/editor-common": "^117.2.0",
34
+ "@atlaskit/editor-common": "^117.3.0",
35
35
  "react": "^18.2.0 || ^19.2.0"
36
36
  },
37
37
  "devDependencies": {
@@ -75,9 +75,6 @@
75
75
  }
76
76
  },
77
77
  "platform-feature-flags": {
78
- "platform_editor_use_localid_dedupe": {
79
- "type": "boolean"
80
- },
81
78
  "platform_editor_ai_aifc_localid_error_reporting": {
82
79
  "type": "boolean"
83
80
  }
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "extends": "../../../tsconfig.json",
3
- "include": [
4
- "src/**/*.ts",
5
- "src/**/*.tsx"
6
- ]
2
+ "extends": "./tsconfig.dev.json",
3
+ "compilerOptions": {
4
+ "disableReferencedProjectLoad": true,
5
+ "disableSolutionSearching": true
6
+ }
7
7
  }