@atlaskit/editor-core 217.12.8 → 217.12.9

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,26 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 217.12.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a9fb116e4a8d8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a9fb116e4a8d8) -
8
+ fix(editor): fix paragraph nodes not highlighting on hover over block menu delete action
9
+
10
+ Two root causes fixed:
11
+ 1. CSS danger styles were gated behind
12
+ `expValNoExposure('platform_editor_block_menu', 'isEnabled', false)`, meaning they were
13
+ excluded when the new block menu was enabled. Removed the gate so danger styles are always
14
+ injected.
15
+
16
+ 2. `hoverDecorationCommand` used `tr.selection` directly, which for paragraphs is a collapsed
17
+ `TextSelection` (cursor inside text). This caused `getSourceNodesFromSelectionRange` to return
18
+ an empty array, so no decorations were created. Fixed by passing `preservedSelection` (a
19
+ `NodeSelection` pointing at the whole paragraph node) from `blockControls` shared state through
20
+ to `hoverDecoration`.
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 217.12.8
4
25
 
5
26
  ### Patch Changes
@@ -15,7 +15,6 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
15
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
16
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
17
17
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
- var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
19
18
  var _tokens = require("@atlaskit/tokens");
20
19
  var _getBaseFontSize = require("../../composable-editor/utils/getBaseFontSize");
21
20
  var _aiPanel = require("./styles/aiPanel");
@@ -539,7 +538,7 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
539
538
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
540
539
  _selectionToolbarStyles.selectionToolbarAnimationStyles,
541
540
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
542
- (0, _expVal.expValNoExposure)('platform_editor_block_menu', 'isEnabled', false) && [
541
+ (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && [
543
542
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
544
543
  _blockTypeStyles.blockquoteDangerStyles,
545
544
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -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 = "217.12.8";
8
+ var version = exports.version = "217.12.9";
@@ -14,7 +14,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
14
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
15
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
16
16
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
17
- import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
18
17
  import { useThemeObserver } from '@atlaskit/tokens';
19
18
  import { getBaseFontSize } from '../../composable-editor/utils/getBaseFontSize';
20
19
  import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
@@ -535,7 +534,7 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
535
534
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
536
535
  selectionToolbarAnimationStyles,
537
536
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
538
- expValNoExposure('platform_editor_block_menu', 'isEnabled', false) && [
537
+ editorExperiment('platform_editor_block_menu', true) && [
539
538
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
540
539
  blockquoteDangerStyles,
541
540
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "217.12.8";
2
+ export const version = "217.12.9";
@@ -15,7 +15,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
16
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
17
17
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
18
- import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
19
18
  import { useThemeObserver } from '@atlaskit/tokens';
20
19
  import { getBaseFontSize } from '../../composable-editor/utils/getBaseFontSize';
21
20
  import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
@@ -531,7 +530,7 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
531
530
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
532
531
  selectionToolbarAnimationStyles,
533
532
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
534
- expValNoExposure('platform_editor_block_menu', 'isEnabled', false) && [
533
+ editorExperiment('platform_editor_block_menu', true) && [
535
534
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
536
535
  blockquoteDangerStyles,
537
536
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "217.12.8";
2
+ export var version = "217.12.9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "217.12.8",
3
+ "version": "217.12.9",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -67,7 +67,7 @@
67
67
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
68
68
  "@atlaskit/react-ufo": "^5.13.0",
69
69
  "@atlaskit/task-decision": "^19.3.0",
70
- "@atlaskit/tmp-editor-statsig": "^59.1.0",
70
+ "@atlaskit/tmp-editor-statsig": "^60.2.0",
71
71
  "@atlaskit/tokens": "^13.0.0",
72
72
  "@atlaskit/tooltip": "^21.1.0",
73
73
  "@atlaskit/width-detector": "^5.0.0",