@atlaskit/editor-plugin-block-menu 10.1.1 → 10.1.3

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,19 @@
1
1
  # @atlaskit/editor-plugin-block-menu
2
2
 
3
+ ## 10.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4c2645b77929d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4c2645b77929d) -
8
+ [ux] EDITOR-7346 add ai and diff plugin support for panel_c1
9
+ - Updated dependencies
10
+
11
+ ## 10.1.2
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 10.1.1
4
18
 
5
19
  ### Patch Changes
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.upgradePanelNodesToPanelC1 = exports.isTransformDisabledBasedOnStepsConfig = exports.convertNodesToTargetType = void 0;
7
- var _utils = require("@atlaskit/editor-common/utils");
7
+ var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
8
8
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
9
- var _utils2 = require("../transform-node-utils/utils");
9
+ var _utils = require("../transform-node-utils/utils");
10
10
  var _TRANSFORMATION_MATRIX = require("./TRANSFORMATION_MATRIX");
11
11
  var _types = require("./types");
12
12
  // Upgrade broken-out panel nodes to panel_c1 if the parent node allows it
@@ -16,7 +16,7 @@ var upgradePanelNodesToPanelC1 = exports.upgradePanelNodesToPanelC1 = function u
16
16
  }
17
17
  return nodes.map(function (node) {
18
18
  if (node.type.name === 'panel') {
19
- var shouldUsePanelC1 = !parentNode || (0, _utils.isNodeTypeValidChildOf)('panel_c1', parentNode, schema);
19
+ var shouldUsePanelC1 = !parentNode || (0, _nodeTypeUtils.isNodeTypeValidChildOf)('panel_c1', parentNode, schema);
20
20
  if (shouldUsePanelC1) {
21
21
  var _schema$nodes$panel_c;
22
22
  return (_schema$nodes$panel_c = schema.nodes['panel_c1'].createAndFill(node.attrs, node.content, node.marks)) !== null && _schema$nodes$panel_c !== void 0 ? _schema$nodes$panel_c : node;
@@ -54,7 +54,7 @@ var convertNodesToTargetType = exports.convertNodesToTargetType = function conve
54
54
  }
55
55
  var selectedNodeTypeName = (0, _types.toNodeTypeValue)((0, _types.getNodeName)(sourceNodes));
56
56
  var initialTargetNodeTypeName = (0, _types.toNodeTypeValue)(targetNodeType.name);
57
- var targetNodeTypeName = (0, _utils2.getTargetNodeTypeNameInContext)(initialTargetNodeTypeName, isNested, parentNode, schema);
57
+ var targetNodeTypeName = (0, _utils.getTargetNodeTypeNameInContext)(initialTargetNodeTypeName, isNested, parentNode, schema);
58
58
  if (!selectedNodeTypeName || !targetNodeTypeName) {
59
59
  return sourceNodes;
60
60
  }
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isTextNode = exports.isListNode = exports.getTargetNodeTypeNameInContext = exports.getSelectedNode = exports.getBlockNodesInRange = exports.createTextContent = exports.convertTextNodeToParagraph = exports.convertNestedExpandToExpand = exports.convertExpandToNestedExpand = void 0;
7
- var _utils = require("@atlaskit/editor-common/utils");
7
+ var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
- var _utils2 = require("@atlaskit/editor-prosemirror/utils");
9
+ var _utils = require("@atlaskit/editor-prosemirror/utils");
10
10
  var _editorTables = require("@atlaskit/editor-tables");
11
11
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
12
  var _types = require("./types");
@@ -32,7 +32,7 @@ var getSelectedNode = exports.getSelectedNode = function getSelectedNode(selecti
32
32
  };
33
33
  }
34
34
  if (selection instanceof _editorTables.CellSelection) {
35
- var tableSelected = (0, _utils2.findParentNodeOfType)(selection.$from.doc.type.schema.nodes.table)(selection);
35
+ var tableSelected = (0, _utils.findParentNodeOfType)(selection.$from.doc.type.schema.nodes.table)(selection);
36
36
  return tableSelected;
37
37
  }
38
38
  if (selection instanceof _state.TextSelection) {
@@ -44,19 +44,19 @@ var getSelectedNode = exports.getSelectedNode = function getSelectedNode(selecti
44
44
  codeBlock = _selection$$from$doc$.codeBlock,
45
45
  paragraph = _selection$$from$doc$.paragraph,
46
46
  heading = _selection$$from$doc$.heading;
47
- var quoteSelected = (0, _utils2.findParentNodeOfType)([blockquote])(selection);
47
+ var quoteSelected = (0, _utils.findParentNodeOfType)([blockquote])(selection);
48
48
  if (quoteSelected) {
49
49
  return quoteSelected;
50
50
  }
51
- var codeBlockSelected = (0, _utils2.findParentNodeOfType)([codeBlock])(selection);
51
+ var codeBlockSelected = (0, _utils.findParentNodeOfType)([codeBlock])(selection);
52
52
  if (codeBlockSelected) {
53
53
  return codeBlockSelected;
54
54
  }
55
- var listSelected = (0, _utils2.findParentNodeOfType)([bulletList, taskList, orderedList])(selection);
55
+ var listSelected = (0, _utils.findParentNodeOfType)([bulletList, taskList, orderedList])(selection);
56
56
  if (listSelected) {
57
57
  return listSelected;
58
58
  }
59
- var paragraphOrHeading = (0, _utils2.findParentNodeOfType)([paragraph, heading])(selection);
59
+ var paragraphOrHeading = (0, _utils.findParentNodeOfType)([paragraph, heading])(selection);
60
60
  if (paragraphOrHeading) {
61
61
  return paragraphOrHeading;
62
62
  }
@@ -71,7 +71,7 @@ var getTargetNodeTypeNameInContext = exports.getTargetNodeTypeNameInContext = fu
71
71
  return 'nestedExpand';
72
72
  }
73
73
  if (nodeTypeName === 'panel' && schema !== null && schema !== void 0 && schema.nodes['panel_c1'] && (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true)) {
74
- if (!parentNode || (0, _utils.isNodeTypeValidChildOf)('panel_c1', parentNode, schema)) {
74
+ if (!parentNode || (0, _nodeTypeUtils.isNodeTypeValidChildOf)('panel_c1', parentNode, schema)) {
75
75
  return 'panel_c1';
76
76
  }
77
77
  }
@@ -1,4 +1,4 @@
1
- import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils';
1
+ import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils/node-type-utils';
2
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
3
  import { getTargetNodeTypeNameInContext } from '../transform-node-utils/utils';
4
4
  import { TRANSFORMATION_MATRIX, TRANSFORMATION_MATRIX_PANEL_C1 } from './TRANSFORMATION_MATRIX';
@@ -1,4 +1,4 @@
1
- import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils';
1
+ import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils/node-type-utils';
2
2
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
4
  import { CellSelection } from '@atlaskit/editor-tables';
@@ -1,4 +1,4 @@
1
- import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils';
1
+ import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils/node-type-utils';
2
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
3
  import { getTargetNodeTypeNameInContext } from '../transform-node-utils/utils';
4
4
  import { TRANSFORMATION_MATRIX, TRANSFORMATION_MATRIX_PANEL_C1 } from './TRANSFORMATION_MATRIX';
@@ -1,4 +1,4 @@
1
- import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils';
1
+ import { isNodeTypeValidChildOf } from '@atlaskit/editor-common/utils/node-type-utils';
2
2
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
4
  import { CellSelection } from '@atlaskit/editor-tables';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-menu",
3
- "version": "10.1.1",
3
+ "version": "10.1.3",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/browser-apis": "^0.0.2",
32
32
  "@atlaskit/css": "^0.19.0",
33
33
  "@atlaskit/editor-plugin-analytics": "^11.0.0",
34
- "@atlaskit/editor-plugin-block-controls": "^12.0.0",
34
+ "@atlaskit/editor-plugin-block-controls": "^12.2.0",
35
35
  "@atlaskit/editor-plugin-decorations": "^11.0.0",
36
36
  "@atlaskit/editor-plugin-selection": "^11.0.0",
37
37
  "@atlaskit/editor-plugin-user-intent": "^9.0.0",
@@ -39,18 +39,18 @@
39
39
  "@atlaskit/editor-shared-styles": "^3.11.0",
40
40
  "@atlaskit/editor-tables": "^2.10.0",
41
41
  "@atlaskit/editor-toolbar": "^1.10.0",
42
- "@atlaskit/flag": "^17.12.0",
42
+ "@atlaskit/flag": "^17.13.0",
43
43
  "@atlaskit/icon": "^35.4.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/primitives": "^19.0.0",
46
46
  "@atlaskit/prosemirror-history": "^0.2.0",
47
- "@atlaskit/tmp-editor-statsig": "^89.0.0",
48
- "@atlaskit/tokens": "^13.1.0",
47
+ "@atlaskit/tmp-editor-statsig": "^90.2.0",
48
+ "@atlaskit/tokens": "^13.3.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "bind-event-listener": "^3.0.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^115.2.0",
53
+ "@atlaskit/editor-common": "^115.7.0",
54
54
  "react": "^18.2.0",
55
55
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
56
56
  },