@atlaskit/editor-plugin-block-controls 2.15.2 → 2.15.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,20 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 2.15.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#177055](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/177055)
8
+ [`5d0549c752360`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5d0549c752360) -
9
+ ED-25056 add exposure for advanced layouts
10
+ - Updated dependencies
11
+
12
+ ## 2.15.3
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 2.15.2
4
19
 
5
20
  ### Patch Changes
@@ -427,6 +427,9 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
427
427
  var isNestedEnabled = (0, _experiments.editorExperiment)('nested-dnd', true, {
428
428
  exposure: true
429
429
  });
430
+ var isAdvancedLayoutEnabled = (0, _experiments.editorExperiment)('advanced_layouts', true, {
431
+ exposure: true
432
+ });
430
433
  var isOptimisedApply = isNestedEnabled && (0, _experiments.editorExperiment)('optimised-apply-dnd', true, {
431
434
  exposure: true
432
435
  });
@@ -434,9 +437,6 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
434
437
  isNestedEnabled: isNestedEnabled,
435
438
  isOptimisedApply: isOptimisedApply
436
439
  };
437
- if ((0, _platformFeatureFlags.fg)('platform_editor_element_dnd_nested_fix_patch_2')) {
438
- // TODO: Remove this once FG is used in code
439
- }
440
440
  var anchorRectCache;
441
441
  if (!(0, _anchorUtils.isAnchorSupported)() && (0, _platformFeatureFlags.fg)('platform_editor_drag_and_drop_target_v2')) {
442
442
  anchorRectCache = new _anchorUtils.AnchorRectCache();
@@ -506,7 +506,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
506
506
  return false;
507
507
  },
508
508
  dragenter: function dragenter(_view, event) {
509
- if ((0, _experiments.editorExperiment)('advanced_layouts', true)) {
509
+ if (isAdvancedLayoutEnabled) {
510
510
  if (isHTMLElement(event.target)) {
511
511
  var closestParentElement = event.target.closest('[data-drag-handler-anchor-depth="0"]');
512
512
  if (closestParentElement) {
@@ -520,7 +520,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
520
520
  },
521
521
  dragstart: function dragstart(view) {
522
522
  var _anchorRectCache;
523
- if ((0, _experiments.editorExperiment)('advanced_layouts', true)) {
523
+ if (isAdvancedLayoutEnabled) {
524
524
  _activeAnchorTracker.defaultActiveAnchorTracker.reset();
525
525
  }
526
526
  (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.setEditorView(view);
@@ -8,10 +8,12 @@ var _browser = require("@atlaskit/editor-common/browser");
8
8
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
9
  var _colors = require("@atlaskit/theme/colors");
10
10
  var previewStyle = {
11
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
11
12
  borderColor: (0, _platformFeatureFlags.fg)('platform_editor_elements_drag_and_drop_ed_23189') ? "var(--ds-border, ".concat(_colors.N30, ")") : "var(--ds-border-focused, ".concat(_colors.B200, ")"),
12
13
  borderStyle: 'solid',
13
14
  borderRadius: "var(--ds-border-radius-100, 3px)",
14
15
  borderWidth: "var(--ds-border-width-outline, 2px)",
16
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
15
17
  backgroundColor: (0, _platformFeatureFlags.fg)('platform_editor_elements_drag_and_drop_ed_23189') ? "var(--ds-skeleton-subtle, ".concat(_colors.N20, ")") : "var(--ds-blanket-selected, #388BFF14)"
16
18
  };
17
19
  var dragPreview = exports.dragPreview = function dragPreview(container, dom, nodeType) {
@@ -402,6 +402,9 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
402
402
  const isNestedEnabled = editorExperiment('nested-dnd', true, {
403
403
  exposure: true
404
404
  });
405
+ const isAdvancedLayoutEnabled = editorExperiment('advanced_layouts', true, {
406
+ exposure: true
407
+ });
405
408
  const isOptimisedApply = isNestedEnabled && editorExperiment('optimised-apply-dnd', true, {
406
409
  exposure: true
407
410
  });
@@ -409,9 +412,6 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
409
412
  isNestedEnabled,
410
413
  isOptimisedApply
411
414
  };
412
- if (fg('platform_editor_element_dnd_nested_fix_patch_2')) {
413
- // TODO: Remove this once FG is used in code
414
- }
415
415
  let anchorRectCache;
416
416
  if (!isAnchorSupported() && fg('platform_editor_drag_and_drop_target_v2')) {
417
417
  anchorRectCache = new AnchorRectCache();
@@ -483,7 +483,7 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
483
483
  return false;
484
484
  },
485
485
  dragenter(_view, event) {
486
- if (editorExperiment('advanced_layouts', true)) {
486
+ if (isAdvancedLayoutEnabled) {
487
487
  if (isHTMLElement(event.target)) {
488
488
  const closestParentElement = event.target.closest('[data-drag-handler-anchor-depth="0"]');
489
489
  if (closestParentElement) {
@@ -497,7 +497,7 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
497
497
  },
498
498
  dragstart(view) {
499
499
  var _anchorRectCache;
500
- if (editorExperiment('advanced_layouts', true)) {
500
+ if (isAdvancedLayoutEnabled) {
501
501
  defaultActiveAnchorTracker.reset();
502
502
  }
503
503
  (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 ? void 0 : _anchorRectCache.setEditorView(view);
@@ -2,10 +2,12 @@ import { browser } from '@atlaskit/editor-common/browser';
2
2
  import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { B200, N20, N30 } from '@atlaskit/theme/colors';
4
4
  const previewStyle = {
5
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
5
6
  borderColor: fg('platform_editor_elements_drag_and_drop_ed_23189') ? `var(--ds-border, ${N30})` : `var(--ds-border-focused, ${B200})`,
6
7
  borderStyle: 'solid',
7
8
  borderRadius: "var(--ds-border-radius-100, 3px)",
8
9
  borderWidth: "var(--ds-border-width-outline, 2px)",
10
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
9
11
  backgroundColor: fg('platform_editor_elements_drag_and_drop_ed_23189') ? `var(--ds-skeleton-subtle, ${N20})` : "var(--ds-blanket-selected, #388BFF14)"
10
12
  };
11
13
  export const dragPreview = (container, dom, nodeType) => {
@@ -420,6 +420,9 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
420
420
  var isNestedEnabled = editorExperiment('nested-dnd', true, {
421
421
  exposure: true
422
422
  });
423
+ var isAdvancedLayoutEnabled = editorExperiment('advanced_layouts', true, {
424
+ exposure: true
425
+ });
423
426
  var isOptimisedApply = isNestedEnabled && editorExperiment('optimised-apply-dnd', true, {
424
427
  exposure: true
425
428
  });
@@ -427,9 +430,6 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
427
430
  isNestedEnabled: isNestedEnabled,
428
431
  isOptimisedApply: isOptimisedApply
429
432
  };
430
- if (fg('platform_editor_element_dnd_nested_fix_patch_2')) {
431
- // TODO: Remove this once FG is used in code
432
- }
433
433
  var anchorRectCache;
434
434
  if (!isAnchorSupported() && fg('platform_editor_drag_and_drop_target_v2')) {
435
435
  anchorRectCache = new AnchorRectCache();
@@ -499,7 +499,7 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
499
499
  return false;
500
500
  },
501
501
  dragenter: function dragenter(_view, event) {
502
- if (editorExperiment('advanced_layouts', true)) {
502
+ if (isAdvancedLayoutEnabled) {
503
503
  if (isHTMLElement(event.target)) {
504
504
  var closestParentElement = event.target.closest('[data-drag-handler-anchor-depth="0"]');
505
505
  if (closestParentElement) {
@@ -513,7 +513,7 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
513
513
  },
514
514
  dragstart: function dragstart(view) {
515
515
  var _anchorRectCache;
516
- if (editorExperiment('advanced_layouts', true)) {
516
+ if (isAdvancedLayoutEnabled) {
517
517
  defaultActiveAnchorTracker.reset();
518
518
  }
519
519
  (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.setEditorView(view);
@@ -2,10 +2,12 @@ import { browser } from '@atlaskit/editor-common/browser';
2
2
  import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { B200, N20, N30 } from '@atlaskit/theme/colors';
4
4
  var previewStyle = {
5
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
5
6
  borderColor: fg('platform_editor_elements_drag_and_drop_ed_23189') ? "var(--ds-border, ".concat(N30, ")") : "var(--ds-border-focused, ".concat(B200, ")"),
6
7
  borderStyle: 'solid',
7
8
  borderRadius: "var(--ds-border-radius-100, 3px)",
8
9
  borderWidth: "var(--ds-border-width-outline, 2px)",
10
+ // eslint-disable-next-line @atlaskit/platform/no-module-level-eval
9
11
  backgroundColor: fg('platform_editor_elements_drag_and_drop_ed_23189') ? "var(--ds-skeleton-subtle, ".concat(N20, ")") : "var(--ds-blanket-selected, #388BFF14)"
10
12
  };
11
13
  export var dragPreview = function dragPreview(container, dom, nodeType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "2.15.2",
3
+ "version": "2.15.4",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@atlaskit/adf-schema": "^46.1.0",
34
- "@atlaskit/editor-common": "^96.3.0",
34
+ "@atlaskit/editor-common": "^96.4.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
@@ -50,7 +50,7 @@
50
50
  "@atlaskit/theme": "^14.0.0",
51
51
  "@atlaskit/tmp-editor-statsig": "^2.25.0",
52
52
  "@atlaskit/tokens": "^2.4.0",
53
- "@atlaskit/tooltip": "^18.9.0",
53
+ "@atlaskit/tooltip": "^19.0.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1",
56
56
  "bind-event-listener": "^3.0.0",