@atlaskit/editor-plugin-block-controls 6.3.9 → 7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 7.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`687c1b8fa7801`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/687c1b8fa7801) -
14
+ EDITOR-1566 bump adf-schema + update validator
15
+
16
+ ### Patch Changes
17
+
18
+ - [`a11b4fec9c5d4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a11b4fec9c5d4) -
19
+ [FD-90806] Clean up platform_editor_remove_drag_handle_fix
20
+ - Updated dependencies
21
+
3
22
  ## 6.3.9
4
23
 
5
24
  ### Patch Changes
@@ -344,15 +344,9 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
344
344
  }
345
345
  }
346
346
  var maybeNodeCountChanged = !isAllText && numReplaceSteps > 0;
347
- var latestActiveNode;
348
- if ((0, _platformFeatureFlags.fg)('platform_editor_remove_drag_handle_fix')) {
349
- latestActiveNode = meta === null || meta === void 0 ? void 0 : meta.activeNode;
350
- if (!latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
351
- latestActiveNode = activeNode;
352
- }
353
- } else {
354
- var _meta$activeNode;
355
- latestActiveNode = (_meta$activeNode = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode !== void 0 ? _meta$activeNode : activeNode;
347
+ var latestActiveNode = meta === null || meta === void 0 ? void 0 : meta.activeNode;
348
+ if (!latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
349
+ latestActiveNode = activeNode;
356
350
  }
357
351
 
358
352
  // Re-create node decorations
@@ -419,14 +413,9 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
419
413
  // Create/recreate handle dec when the active node is missing/changes, or the editor viewport has changed (non-anchor pos workaround)
420
414
  var shouldRecreateHandle = latestActiveNode && (activeNodeChanged || isActiveNodeModified || editorSizeChanged || handleNeedsRedraw);
421
415
  var shouldRecreateQuickInsertButton = latestActiveNode && (rootActiveNodeChanged || isActiveNodeModified || editorSizeChanged || handleNeedsRedraw);
422
- var shouldRemoveHandle = false;
423
- if ((0, _platformFeatureFlags.fg)('platform_editor_remove_drag_handle_fix')) {
424
- // If the active node is missing, we need to remove the handle
425
- shouldRemoveHandle = latestActiveNode ? isResizerResizing || isActiveNodeDeleted && !isReplacedWithSameSize || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved) : true;
426
- } else {
427
- // Remove handle dec when explicitly hidden, a node is resizing, activeNode pos was deleted, or DnD moved a node
428
- shouldRemoveHandle = latestActiveNode && (isResizerResizing || isActiveNodeDeleted || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved));
429
- }
416
+
417
+ // If the active node is missing, we need to remove the handle
418
+ var shouldRemoveHandle = latestActiveNode ? isResizerResizing || isActiveNodeDeleted && !isReplacedWithSameSize || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved) : true;
430
419
  if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
431
420
  // Remove handle dec when editor is blurred
432
421
  shouldRemoveHandle = shouldRemoveHandle || (meta === null || meta === void 0 ? void 0 : meta.editorBlurred);
@@ -343,15 +343,9 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
343
343
  }
344
344
  }
345
345
  const maybeNodeCountChanged = !isAllText && numReplaceSteps > 0;
346
- let latestActiveNode;
347
- if (fg('platform_editor_remove_drag_handle_fix')) {
348
- latestActiveNode = meta === null || meta === void 0 ? void 0 : meta.activeNode;
349
- if (!latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
350
- latestActiveNode = activeNode;
351
- }
352
- } else {
353
- var _meta$activeNode;
354
- latestActiveNode = (_meta$activeNode = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode !== void 0 ? _meta$activeNode : activeNode;
346
+ let latestActiveNode = meta === null || meta === void 0 ? void 0 : meta.activeNode;
347
+ if (!latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
348
+ latestActiveNode = activeNode;
355
349
  }
356
350
 
357
351
  // Re-create node decorations
@@ -416,14 +410,9 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
416
410
  // Create/recreate handle dec when the active node is missing/changes, or the editor viewport has changed (non-anchor pos workaround)
417
411
  const shouldRecreateHandle = latestActiveNode && (activeNodeChanged || isActiveNodeModified || editorSizeChanged || handleNeedsRedraw);
418
412
  const shouldRecreateQuickInsertButton = latestActiveNode && (rootActiveNodeChanged || isActiveNodeModified || editorSizeChanged || handleNeedsRedraw);
419
- let shouldRemoveHandle = false;
420
- if (fg('platform_editor_remove_drag_handle_fix')) {
421
- // If the active node is missing, we need to remove the handle
422
- shouldRemoveHandle = latestActiveNode ? isResizerResizing || isActiveNodeDeleted && !isReplacedWithSameSize || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved) : true;
423
- } else {
424
- // Remove handle dec when explicitly hidden, a node is resizing, activeNode pos was deleted, or DnD moved a node
425
- shouldRemoveHandle = latestActiveNode && (isResizerResizing || isActiveNodeDeleted || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved));
426
- }
413
+
414
+ // If the active node is missing, we need to remove the handle
415
+ let shouldRemoveHandle = latestActiveNode ? isResizerResizing || isActiveNodeDeleted && !isReplacedWithSameSize || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved) : true;
427
416
  if (editorExperiment('platform_editor_controls', 'variant1')) {
428
417
  // Remove handle dec when editor is blurred
429
418
  shouldRemoveHandle = shouldRemoveHandle || (meta === null || meta === void 0 ? void 0 : meta.editorBlurred);
@@ -337,15 +337,9 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
337
337
  }
338
338
  }
339
339
  var maybeNodeCountChanged = !isAllText && numReplaceSteps > 0;
340
- var latestActiveNode;
341
- if (fg('platform_editor_remove_drag_handle_fix')) {
342
- latestActiveNode = meta === null || meta === void 0 ? void 0 : meta.activeNode;
343
- if (!latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
344
- latestActiveNode = activeNode;
345
- }
346
- } else {
347
- var _meta$activeNode;
348
- latestActiveNode = (_meta$activeNode = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode !== void 0 ? _meta$activeNode : activeNode;
340
+ var latestActiveNode = meta === null || meta === void 0 ? void 0 : meta.activeNode;
341
+ if (!latestActiveNode && (!isActiveNodeDeleted || isReplacedWithSameSize)) {
342
+ latestActiveNode = activeNode;
349
343
  }
350
344
 
351
345
  // Re-create node decorations
@@ -412,14 +406,9 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
412
406
  // Create/recreate handle dec when the active node is missing/changes, or the editor viewport has changed (non-anchor pos workaround)
413
407
  var shouldRecreateHandle = latestActiveNode && (activeNodeChanged || isActiveNodeModified || editorSizeChanged || handleNeedsRedraw);
414
408
  var shouldRecreateQuickInsertButton = latestActiveNode && (rootActiveNodeChanged || isActiveNodeModified || editorSizeChanged || handleNeedsRedraw);
415
- var shouldRemoveHandle = false;
416
- if (fg('platform_editor_remove_drag_handle_fix')) {
417
- // If the active node is missing, we need to remove the handle
418
- shouldRemoveHandle = latestActiveNode ? isResizerResizing || isActiveNodeDeleted && !isReplacedWithSameSize || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved) : true;
419
- } else {
420
- // Remove handle dec when explicitly hidden, a node is resizing, activeNode pos was deleted, or DnD moved a node
421
- shouldRemoveHandle = latestActiveNode && (isResizerResizing || isActiveNodeDeleted || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved));
422
- }
409
+
410
+ // If the active node is missing, we need to remove the handle
411
+ var shouldRemoveHandle = latestActiveNode ? isResizerResizing || isActiveNodeDeleted && !isReplacedWithSameSize || (meta === null || meta === void 0 ? void 0 : meta.nodeMoved) : true;
423
412
  if (editorExperiment('platform_editor_controls', 'variant1')) {
424
413
  // Remove handle dec when editor is blurred
425
414
  shouldRemoveHandle = shouldRemoveHandle || (meta === null || meta === void 0 ? void 0 : meta.editorBlurred);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "6.3.9",
3
+ "version": "7.0.0",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,19 +28,19 @@
28
28
  ],
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "dependencies": {
31
- "@atlaskit/adf-schema": "^51.1.2",
32
- "@atlaskit/editor-plugin-accessibility-utils": "^5.0.0",
33
- "@atlaskit/editor-plugin-analytics": "^5.2.0",
34
- "@atlaskit/editor-plugin-editor-disabled": "^5.0.0",
35
- "@atlaskit/editor-plugin-feature-flags": "^4.0.0",
36
- "@atlaskit/editor-plugin-interaction": "^7.0.0",
37
- "@atlaskit/editor-plugin-limited-mode": "^2.1.0",
38
- "@atlaskit/editor-plugin-metrics": "^6.2.0",
39
- "@atlaskit/editor-plugin-quick-insert": "^5.0.0",
40
- "@atlaskit/editor-plugin-selection": "^5.0.0",
41
- "@atlaskit/editor-plugin-type-ahead": "^5.2.0",
42
- "@atlaskit/editor-plugin-user-intent": "^3.0.0",
43
- "@atlaskit/editor-plugin-width": "^6.0.0",
31
+ "@atlaskit/adf-schema": "^51.2.0",
32
+ "@atlaskit/editor-plugin-accessibility-utils": "^6.0.0",
33
+ "@atlaskit/editor-plugin-analytics": "^6.0.0",
34
+ "@atlaskit/editor-plugin-editor-disabled": "^6.0.0",
35
+ "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
36
+ "@atlaskit/editor-plugin-interaction": "^8.0.0",
37
+ "@atlaskit/editor-plugin-limited-mode": "^3.0.0",
38
+ "@atlaskit/editor-plugin-metrics": "^7.0.0",
39
+ "@atlaskit/editor-plugin-quick-insert": "^6.0.0",
40
+ "@atlaskit/editor-plugin-selection": "^6.0.0",
41
+ "@atlaskit/editor-plugin-type-ahead": "^6.0.0",
42
+ "@atlaskit/editor-plugin-user-intent": "^4.0.0",
43
+ "@atlaskit/editor-plugin-width": "^7.0.0",
44
44
  "@atlaskit/editor-prosemirror": "7.0.0",
45
45
  "@atlaskit/editor-shared-styles": "^3.6.0",
46
46
  "@atlaskit/editor-tables": "^2.9.0",
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
53
53
  "@atlaskit/primitives": "^14.15.0",
54
54
  "@atlaskit/theme": "^21.0.0",
55
- "@atlaskit/tmp-editor-statsig": "^12.29.0",
55
+ "@atlaskit/tmp-editor-statsig": "^12.31.0",
56
56
  "@atlaskit/tokens": "^6.3.0",
57
57
  "@atlaskit/tooltip": "^20.4.0",
58
58
  "@babel/runtime": "^7.0.0",
@@ -64,7 +64,7 @@
64
64
  "uuid": "^3.1.0"
65
65
  },
66
66
  "peerDependencies": {
67
- "@atlaskit/editor-common": "^109.15.0",
67
+ "@atlaskit/editor-common": "^110.0.0",
68
68
  "react": "^18.2.0",
69
69
  "react-dom": "^18.2.0",
70
70
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -126,9 +126,6 @@
126
126
  "platform_editor_ease_of_use_metrics": {
127
127
  "type": "boolean"
128
128
  },
129
- "platform_editor_remove_drag_handle_fix": {
130
- "type": "boolean"
131
- },
132
129
  "platform_editor_drag_layout_column_into_nodes": {
133
130
  "type": "boolean"
134
131
  },