@atlaskit/editor-plugin-quick-insert 16.1.1 → 16.1.2

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,14 @@
1
1
  # @atlaskit/editor-plugin-quick-insert
2
2
 
3
+ ## 16.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e62dacf4416fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e62dacf4416fd) -
8
+ Add the shared popup-anchor contract, registry-backed drag handle, and menu integrations behind
9
+ `platform_editor_block_control_migration`.
10
+ - Updated dependencies
11
+
3
12
  ## 16.1.1
4
13
 
5
14
  ### Patch Changes
@@ -25,7 +25,8 @@ var getBlockControlQuickInsertComponents = exports.getBlockControlQuickInsertCom
25
25
  isHidden: function isHidden() {
26
26
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
27
27
  surfaceContext = _ref2.surfaceContext;
28
- return (surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(_blockControlUiContext.BLOCK_CONTROL_UI_CONTEXT)) === undefined;
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
30
  },
30
31
  component: function component(_ref3) {
31
32
  var surfaceContext = _ref3.surfaceContext;
@@ -15,7 +15,10 @@ export const getBlockControlQuickInsertComponents = ({
15
15
  }],
16
16
  isHidden: ({
17
17
  surfaceContext
18
- } = {}) => (surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT)) === undefined,
18
+ } = {}) => {
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;
21
+ },
19
22
  component: ({
20
23
  surfaceContext
21
24
  }) => {
@@ -18,7 +18,8 @@ export var getBlockControlQuickInsertComponents = function getBlockControlQuickI
18
18
  isHidden: function isHidden() {
19
19
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
20
20
  surfaceContext = _ref2.surfaceContext;
21
- return (surfaceContext === null || surfaceContext === void 0 ? void 0 : surfaceContext.get(BLOCK_CONTROL_UI_CONTEXT)) === undefined;
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
23
  },
23
24
  component: function component(_ref3) {
24
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.1",
3
+ "version": "16.1.2",
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.2.0",
49
+ "@atlaskit/editor-common": "^120.3.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"