@atlaskit/editor-plugin-decorations 7.0.3 → 7.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,11 @@
1
1
  # @atlaskit/editor-plugin-decorations
2
2
 
3
+ ## 7.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 7.0.3
4
10
 
5
11
  ### Patch Changes
@@ -92,10 +92,11 @@ var hoverDecorationCommand = exports.hoverDecorationCommand = function hoverDeco
92
92
  if (decorations.length === 0) {
93
93
  return tr;
94
94
  }
95
+ var hasDangerDecorations = className.split(' ').includes('danger');
95
96
  tr.setMeta(_main.decorationStateKey, {
96
97
  action: add ? _main.ACTIONS.DECORATION_ADD : _main.ACTIONS.DECORATION_REMOVE,
97
98
  data: _view.DecorationSet.create(tr.doc, decorations),
98
- hasDangerDecorations: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? className === 'danger' : undefined
99
+ hasDangerDecorations: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) && hasDangerDecorations
99
100
  }).setMeta('addToHistory', false);
100
101
  return tr;
101
102
  };
@@ -85,10 +85,11 @@ export const hoverDecorationCommand = ({
85
85
  if (decorations.length === 0) {
86
86
  return tr;
87
87
  }
88
+ const hasDangerDecorations = className.split(' ').includes('danger');
88
89
  tr.setMeta(decorationStateKey, {
89
90
  action: add ? ACTIONS.DECORATION_ADD : ACTIONS.DECORATION_REMOVE,
90
91
  data: DecorationSet.create(tr.doc, decorations),
91
- hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? className === 'danger' : undefined
92
+ hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && hasDangerDecorations
92
93
  }).setMeta('addToHistory', false);
93
94
  return tr;
94
95
  };
@@ -86,10 +86,11 @@ export var hoverDecorationCommand = function hoverDecorationCommand(_ref) {
86
86
  if (decorations.length === 0) {
87
87
  return tr;
88
88
  }
89
+ var hasDangerDecorations = className.split(' ').includes('danger');
89
90
  tr.setMeta(decorationStateKey, {
90
91
  action: add ? ACTIONS.DECORATION_ADD : ACTIONS.DECORATION_REMOVE,
91
92
  data: DecorationSet.create(tr.doc, decorations),
92
- hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? className === 'danger' : undefined
93
+ hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && hasDangerDecorations
93
94
  }).setMeta('addToHistory', false);
94
95
  return tr;
95
96
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-decorations",
3
- "version": "7.0.3",
3
+ "version": "7.0.4",
4
4
  "description": "Decorations plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,11 +21,11 @@
21
21
  "dependencies": {
22
22
  "@atlaskit/editor-prosemirror": "^7.2.0",
23
23
  "@atlaskit/editor-tables": "^2.9.0",
24
- "@atlaskit/tmp-editor-statsig": "^16.27.0",
24
+ "@atlaskit/tmp-editor-statsig": "^17.0.0",
25
25
  "@babel/runtime": "^7.0.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "@atlaskit/editor-common": "^111.8.0",
28
+ "@atlaskit/editor-common": "^111.9.0",
29
29
  "react": "^18.2.0",
30
30
  "react-dom": "^18.2.0"
31
31
  },