@atlaskit/editor-plugin-layout 1.11.1 → 1.12.0

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,18 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 1.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#162388](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162388)
8
+ [`ac57b50211fdc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ac57b50211fdc) -
9
+ add 'clamped' option to resizer prop HandleSize which uses CSS to alter height of handle, add
10
+ logic to ensure handles are visible when selection is inside node
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 1.11.1
4
17
 
5
18
  ### Patch Changes
@@ -20,7 +20,8 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
20
20
  var pluginInjectionApi = _ref.pluginInjectionApi,
21
21
  forwardRef = _ref.forwardRef,
22
22
  getPos = _ref.getPos,
23
- view = _ref.view;
23
+ view = _ref.view,
24
+ parentRef = _ref.parentRef;
24
25
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['editorDisabled']),
25
26
  editorDisabledState = _useSharedPluginState.editorDisabledState;
26
27
  var getEditorWidth = function getEditorWidth() {
@@ -31,9 +32,10 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
31
32
  getRef: forwardRef,
32
33
  getPos: getPos,
33
34
  editorView: view,
34
- node: "layoutSection",
35
+ nodeType: "layoutSection",
35
36
  getEditorWidth: getEditorWidth,
36
- disabled: (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) === true
37
+ disabled: (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) === true,
38
+ parentRef: parentRef
37
39
  });
38
40
  };
39
41
  var LayoutSectionView = exports.LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
@@ -71,7 +73,8 @@ var LayoutSectionView = exports.LayoutSectionView = /*#__PURE__*/function (_Reac
71
73
  pluginInjectionApi: props.pluginInjectionApi,
72
74
  forwardRef: forwardRef,
73
75
  getPos: props.getPos,
74
- view: props.view
76
+ view: props.view,
77
+ parentRef: this.layoutDOM
75
78
  });
76
79
  }
77
80
  }, {
@@ -6,7 +6,8 @@ const LayoutBreakoutResizer = ({
6
6
  pluginInjectionApi,
7
7
  forwardRef,
8
8
  getPos,
9
- view
9
+ view,
10
+ parentRef
10
11
  }) => {
11
12
  const {
12
13
  editorDisabledState
@@ -19,9 +20,10 @@ const LayoutBreakoutResizer = ({
19
20
  getRef: forwardRef,
20
21
  getPos: getPos,
21
22
  editorView: view,
22
- node: "layoutSection",
23
+ nodeType: "layoutSection",
23
24
  getEditorWidth: getEditorWidth,
24
- disabled: (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) === true
25
+ disabled: (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) === true,
26
+ parentRef: parentRef
25
27
  });
26
28
  };
27
29
  export class LayoutSectionView extends ReactNodeView {
@@ -48,7 +50,8 @@ export class LayoutSectionView extends ReactNodeView {
48
50
  pluginInjectionApi: props.pluginInjectionApi,
49
51
  forwardRef: forwardRef,
50
52
  getPos: props.getPos,
51
- view: props.view
53
+ view: props.view,
54
+ parentRef: this.layoutDOM
52
55
  });
53
56
  }
54
57
  ignoreMutation(mutation) {
@@ -13,7 +13,8 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
13
13
  var pluginInjectionApi = _ref.pluginInjectionApi,
14
14
  forwardRef = _ref.forwardRef,
15
15
  getPos = _ref.getPos,
16
- view = _ref.view;
16
+ view = _ref.view,
17
+ parentRef = _ref.parentRef;
17
18
  var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['editorDisabled']),
18
19
  editorDisabledState = _useSharedPluginState.editorDisabledState;
19
20
  var getEditorWidth = function getEditorWidth() {
@@ -24,9 +25,10 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
24
25
  getRef: forwardRef,
25
26
  getPos: getPos,
26
27
  editorView: view,
27
- node: "layoutSection",
28
+ nodeType: "layoutSection",
28
29
  getEditorWidth: getEditorWidth,
29
- disabled: (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) === true
30
+ disabled: (editorDisabledState === null || editorDisabledState === void 0 ? void 0 : editorDisabledState.editorDisabled) === true,
31
+ parentRef: parentRef
30
32
  });
31
33
  };
32
34
  export var LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
@@ -64,7 +66,8 @@ export var LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
64
66
  pluginInjectionApi: props.pluginInjectionApi,
65
67
  forwardRef: forwardRef,
66
68
  getPos: props.getPos,
67
- view: props.view
69
+ view: props.view,
70
+ parentRef: this.layoutDOM
68
71
  });
69
72
  }
70
73
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^44.2.0",
35
- "@atlaskit/editor-common": "^94.13.0",
35
+ "@atlaskit/editor-common": "^94.17.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
37
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
38
38
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",