@atlaskit/editor-plugin-quick-insert 16.1.4 → 16.1.5

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,15 @@
1
1
  # @atlaskit/editor-plugin-quick-insert
2
2
 
3
+ ## 16.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0841b102bfe4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0841b102bfe4a) -
8
+ Add a PM-state-backed multi-location left block-controls surface and register the display-only
9
+ heading collapse button behind `platform_editor_block_control_migration` and
10
+ `platform_editor_collapsible_headings`.
11
+ - Updated dependencies
12
+
3
13
  ## 16.1.4
4
14
 
5
15
  ### Patch Changes
@@ -26,7 +26,7 @@ var getBlockControlQuickInsertComponents = exports.getBlockControlQuickInsertCom
26
26
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
27
27
  surfaceContext = _ref2.surfaceContext;
28
28
  var context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(_blockControlUiContext.BLOCK_CONTROL_UI_CONTEXT);
29
- return !context || context.targetNode.pos !== context.rootNode.pos;
29
+ return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
30
30
  },
31
31
  component: function component(_ref3) {
32
32
  var surfaceContext = _ref3.surfaceContext;
@@ -17,7 +17,7 @@ export const getBlockControlQuickInsertComponents = ({
17
17
  surfaceContext
18
18
  } = {}) => {
19
19
  const context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
20
- return !context || context.targetNode.pos !== context.rootNode.pos;
20
+ return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
21
21
  },
22
22
  component: ({
23
23
  surfaceContext
@@ -19,7 +19,7 @@ export var getBlockControlQuickInsertComponents = function getBlockControlQuickI
19
19
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
20
20
  surfaceContext = _ref2.surfaceContext;
21
21
  var context = surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT);
22
- return !context || context.targetNode.pos !== context.rootNode.pos;
22
+ return !(context !== null && context !== void 0 && context.activeNode) || context.targetNode.pos !== context.rootNode.pos || context.targetNode.pos !== context.activeNode.rootPos;
23
23
  },
24
24
  component: function component(_ref3) {
25
25
  var surfaceContext = _ref3.surfaceContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "16.1.4",
3
+ "version": "16.1.5",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@emotion/react": "^11.7.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@atlaskit/editor-common": "^120.3.0",
49
+ "@atlaskit/editor-common": "^120.5.0",
50
50
  "react": "^18.2.0 || ^19.2.0",
51
51
  "react-dom": "^18.2.0 || ^19.2.0",
52
52
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"