@atlaskit/editor-plugin-layout 2.7.3 → 2.7.4

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-layout
2
2
 
3
+ ## 2.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#158601](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158601)
8
+ [`7dfac59b4421f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7dfac59b4421f) -
9
+ ED-27401: Updated layout guidelines
10
+ - Updated dependencies
11
+
3
12
  ## 2.7.3
4
13
 
5
14
  ### Patch Changes
@@ -23,6 +23,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
23
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
24
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
25
25
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
26
+ var layoutDynamicFullWidthGuidelineOffset = 16;
26
27
  var isEmptyParagraph = function isEmptyParagraph(node) {
27
28
  return !!node && node.type.name === 'paragraph' && !node.childCount;
28
29
  };
@@ -106,7 +107,8 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
106
107
  displayGapCursor: displayGapCursor,
107
108
  onResizeStart: function onResizeStart() {
108
109
  selectIntoCurrentLayout();
109
- }
110
+ },
111
+ dynamicFullWidthGuidelineOffset: layoutDynamicFullWidthGuidelineOffset
110
112
  });
111
113
  };
112
114
  var toDOM = function toDOM() {
@@ -116,7 +118,23 @@ var toDOM = function toDOM() {
116
118
  'data-layout-section': true
117
119
  }, 0]];
118
120
  };
121
+
122
+ /**
123
+ *
124
+ */
119
125
  var LayoutSectionView = exports.LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
126
+ /**
127
+ * constructor
128
+ * @param props
129
+ * @param props.node
130
+ * @param props.view
131
+ * @param props.getPos
132
+ * @param props.portalProviderAPI
133
+ * @param props.eventDispatcher
134
+ * @param props.pluginInjectionApi
135
+ * @param props.options
136
+ * @example
137
+ */
120
138
  function LayoutSectionView(props) {
121
139
  var _this;
122
140
  (0, _classCallCheck2.default)(this, LayoutSectionView);
@@ -125,6 +143,12 @@ var LayoutSectionView = exports.LayoutSectionView = /*#__PURE__*/function (_Reac
125
143
  _this.options = props.options;
126
144
  return _this;
127
145
  }
146
+
147
+ /**
148
+ * getContentDOM
149
+ * @example
150
+ * @returns
151
+ */
128
152
  (0, _inherits2.default)(LayoutSectionView, _ReactNodeView);
129
153
  return (0, _createClass2.default)(LayoutSectionView, [{
130
154
  key: "getContentDOM",
@@ -143,6 +167,13 @@ var LayoutSectionView = exports.LayoutSectionView = /*#__PURE__*/function (_Reac
143
167
  contentDOM: contentDOM
144
168
  };
145
169
  }
170
+
171
+ /**
172
+ * setDomAttrs
173
+ * @param node
174
+ * @param element
175
+ * @example
176
+ */
146
177
  }, {
147
178
  key: "setDomAttrs",
148
179
  value: function setDomAttrs(node, element) {
@@ -150,6 +181,14 @@ var LayoutSectionView = exports.LayoutSectionView = /*#__PURE__*/function (_Reac
150
181
  this.layoutDOM.setAttribute('data-column-rule-style', node.attrs.columnRuleStyle);
151
182
  }
152
183
  }
184
+
185
+ /**
186
+ * render
187
+ * @param props
188
+ * @param forwardRef
189
+ * @example
190
+ * @returns
191
+ */
153
192
  }, {
154
193
  key: "render",
155
194
  value: function render(props, forwardRef) {
@@ -165,6 +204,13 @@ var LayoutSectionView = exports.LayoutSectionView = /*#__PURE__*/function (_Reac
165
204
  parentRef: this.layoutDOM
166
205
  });
167
206
  }
207
+
208
+ /**
209
+ * ignoreMutation
210
+ * @param mutation
211
+ * @example
212
+ * @returns
213
+ */
168
214
  }, {
169
215
  key: "ignoreMutation",
170
216
  value: function ignoreMutation(mutation) {
@@ -6,6 +6,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
6
6
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
7
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
8
  import { selectIntoLayout } from '../pm-plugins/utils';
9
+ const layoutDynamicFullWidthGuidelineOffset = 16;
9
10
  const isEmptyParagraph = node => {
10
11
  return !!node && node.type.name === 'paragraph' && !node.childCount;
11
12
  };
@@ -92,7 +93,8 @@ const LayoutBreakoutResizer = ({
92
93
  displayGapCursor: displayGapCursor,
93
94
  onResizeStart: () => {
94
95
  selectIntoCurrentLayout();
95
- }
96
+ },
97
+ dynamicFullWidthGuidelineOffset: layoutDynamicFullWidthGuidelineOffset
96
98
  });
97
99
  };
98
100
  const toDOM = () => ['div', {
@@ -100,12 +102,34 @@ const toDOM = () => ['div', {
100
102
  }, ['div', {
101
103
  'data-layout-section': true
102
104
  }, 0]];
105
+
106
+ /**
107
+ *
108
+ */
103
109
  export class LayoutSectionView extends ReactNodeView {
110
+ /**
111
+ * constructor
112
+ * @param props
113
+ * @param props.node
114
+ * @param props.view
115
+ * @param props.getPos
116
+ * @param props.portalProviderAPI
117
+ * @param props.eventDispatcher
118
+ * @param props.pluginInjectionApi
119
+ * @param props.options
120
+ * @example
121
+ */
104
122
  constructor(props) {
105
123
  super(props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props);
106
124
  this.isEmpty = isEmptyLayout(this.node);
107
125
  this.options = props.options;
108
126
  }
127
+
128
+ /**
129
+ * getContentDOM
130
+ * @example
131
+ * @returns
132
+ */
109
133
  getContentDOM() {
110
134
  const {
111
135
  dom: container,
@@ -122,11 +146,26 @@ export class LayoutSectionView extends ReactNodeView {
122
146
  contentDOM
123
147
  };
124
148
  }
149
+
150
+ /**
151
+ * setDomAttrs
152
+ * @param node
153
+ * @param element
154
+ * @example
155
+ */
125
156
  setDomAttrs(node, element) {
126
157
  if (this.layoutDOM) {
127
158
  this.layoutDOM.setAttribute('data-column-rule-style', node.attrs.columnRuleStyle);
128
159
  }
129
160
  }
161
+
162
+ /**
163
+ * render
164
+ * @param props
165
+ * @param forwardRef
166
+ * @example
167
+ * @returns
168
+ */
130
169
  render(props, forwardRef) {
131
170
  this.isEmpty = isEmptyLayout(this.node);
132
171
  if (this.layoutDOM) {
@@ -140,6 +179,13 @@ export class LayoutSectionView extends ReactNodeView {
140
179
  parentRef: this.layoutDOM
141
180
  });
142
181
  }
182
+
183
+ /**
184
+ * ignoreMutation
185
+ * @param mutation
186
+ * @example
187
+ * @returns
188
+ */
143
189
  ignoreMutation(mutation) {
144
190
  return ignoreResizerMutations(mutation);
145
191
  }
@@ -13,6 +13,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
13
13
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
14
14
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
15
  import { selectIntoLayout } from '../pm-plugins/utils';
16
+ var layoutDynamicFullWidthGuidelineOffset = 16;
16
17
  var isEmptyParagraph = function isEmptyParagraph(node) {
17
18
  return !!node && node.type.name === 'paragraph' && !node.childCount;
18
19
  };
@@ -96,7 +97,8 @@ var LayoutBreakoutResizer = function LayoutBreakoutResizer(_ref) {
96
97
  displayGapCursor: displayGapCursor,
97
98
  onResizeStart: function onResizeStart() {
98
99
  selectIntoCurrentLayout();
99
- }
100
+ },
101
+ dynamicFullWidthGuidelineOffset: layoutDynamicFullWidthGuidelineOffset
100
102
  });
101
103
  };
102
104
  var toDOM = function toDOM() {
@@ -106,7 +108,23 @@ var toDOM = function toDOM() {
106
108
  'data-layout-section': true
107
109
  }, 0]];
108
110
  };
111
+
112
+ /**
113
+ *
114
+ */
109
115
  export var LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
116
+ /**
117
+ * constructor
118
+ * @param props
119
+ * @param props.node
120
+ * @param props.view
121
+ * @param props.getPos
122
+ * @param props.portalProviderAPI
123
+ * @param props.eventDispatcher
124
+ * @param props.pluginInjectionApi
125
+ * @param props.options
126
+ * @example
127
+ */
110
128
  function LayoutSectionView(props) {
111
129
  var _this;
112
130
  _classCallCheck(this, LayoutSectionView);
@@ -115,6 +133,12 @@ export var LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
115
133
  _this.options = props.options;
116
134
  return _this;
117
135
  }
136
+
137
+ /**
138
+ * getContentDOM
139
+ * @example
140
+ * @returns
141
+ */
118
142
  _inherits(LayoutSectionView, _ReactNodeView);
119
143
  return _createClass(LayoutSectionView, [{
120
144
  key: "getContentDOM",
@@ -133,6 +157,13 @@ export var LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
133
157
  contentDOM: contentDOM
134
158
  };
135
159
  }
160
+
161
+ /**
162
+ * setDomAttrs
163
+ * @param node
164
+ * @param element
165
+ * @example
166
+ */
136
167
  }, {
137
168
  key: "setDomAttrs",
138
169
  value: function setDomAttrs(node, element) {
@@ -140,6 +171,14 @@ export var LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
140
171
  this.layoutDOM.setAttribute('data-column-rule-style', node.attrs.columnRuleStyle);
141
172
  }
142
173
  }
174
+
175
+ /**
176
+ * render
177
+ * @param props
178
+ * @param forwardRef
179
+ * @example
180
+ * @returns
181
+ */
143
182
  }, {
144
183
  key: "render",
145
184
  value: function render(props, forwardRef) {
@@ -155,6 +194,13 @@ export var LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
155
194
  parentRef: this.layoutDOM
156
195
  });
157
196
  }
197
+
198
+ /**
199
+ * ignoreMutation
200
+ * @param mutation
201
+ * @example
202
+ * @returns
203
+ */
158
204
  }, {
159
205
  key: "ignoreMutation",
160
206
  value: function ignoreMutation(mutation) {
@@ -17,10 +17,25 @@ type LayoutSectionViewProps = {
17
17
  options: LayoutPluginOptions;
18
18
  };
19
19
  type ForwardRef = (ref: HTMLElement | null) => void;
20
+ /**
21
+ *
22
+ */
20
23
  export declare class LayoutSectionView extends ReactNodeView<LayoutSectionViewProps> {
21
24
  options: LayoutPluginOptions;
22
25
  layoutDOM?: HTMLElement;
23
26
  isEmpty?: boolean;
27
+ /**
28
+ * constructor
29
+ * @param props
30
+ * @param props.node
31
+ * @param props.view
32
+ * @param props.getPos
33
+ * @param props.portalProviderAPI
34
+ * @param props.eventDispatcher
35
+ * @param props.pluginInjectionApi
36
+ * @param props.options
37
+ * @example
38
+ */
24
39
  constructor(props: {
25
40
  node: PMNode;
26
41
  view: EditorView;
@@ -30,12 +45,36 @@ export declare class LayoutSectionView extends ReactNodeView<LayoutSectionViewPr
30
45
  pluginInjectionApi: ExtractInjectionAPI<LayoutPlugin>;
31
46
  options: LayoutPluginOptions;
32
47
  });
48
+ /**
49
+ * getContentDOM
50
+ * @example
51
+ * @returns
52
+ */
33
53
  getContentDOM(): {
34
54
  dom: HTMLElement;
35
55
  contentDOM: HTMLElement | undefined;
36
56
  };
57
+ /**
58
+ * setDomAttrs
59
+ * @param node
60
+ * @param element
61
+ * @example
62
+ */
37
63
  setDomAttrs(node: PMNode, element: HTMLElement): void;
64
+ /**
65
+ * render
66
+ * @param props
67
+ * @param forwardRef
68
+ * @example
69
+ * @returns
70
+ */
38
71
  render(props: LayoutSectionViewProps, forwardRef: ForwardRef): React.JSX.Element;
72
+ /**
73
+ * ignoreMutation
74
+ * @param mutation
75
+ * @example
76
+ * @returns
77
+ */
39
78
  ignoreMutation(mutation: MutationRecord | {
40
79
  type: 'selection';
41
80
  target: Node;
@@ -17,10 +17,25 @@ type LayoutSectionViewProps = {
17
17
  options: LayoutPluginOptions;
18
18
  };
19
19
  type ForwardRef = (ref: HTMLElement | null) => void;
20
+ /**
21
+ *
22
+ */
20
23
  export declare class LayoutSectionView extends ReactNodeView<LayoutSectionViewProps> {
21
24
  options: LayoutPluginOptions;
22
25
  layoutDOM?: HTMLElement;
23
26
  isEmpty?: boolean;
27
+ /**
28
+ * constructor
29
+ * @param props
30
+ * @param props.node
31
+ * @param props.view
32
+ * @param props.getPos
33
+ * @param props.portalProviderAPI
34
+ * @param props.eventDispatcher
35
+ * @param props.pluginInjectionApi
36
+ * @param props.options
37
+ * @example
38
+ */
24
39
  constructor(props: {
25
40
  node: PMNode;
26
41
  view: EditorView;
@@ -30,12 +45,36 @@ export declare class LayoutSectionView extends ReactNodeView<LayoutSectionViewPr
30
45
  pluginInjectionApi: ExtractInjectionAPI<LayoutPlugin>;
31
46
  options: LayoutPluginOptions;
32
47
  });
48
+ /**
49
+ * getContentDOM
50
+ * @example
51
+ * @returns
52
+ */
33
53
  getContentDOM(): {
34
54
  dom: HTMLElement;
35
55
  contentDOM: HTMLElement | undefined;
36
56
  };
57
+ /**
58
+ * setDomAttrs
59
+ * @param node
60
+ * @param element
61
+ * @example
62
+ */
37
63
  setDomAttrs(node: PMNode, element: HTMLElement): void;
64
+ /**
65
+ * render
66
+ * @param props
67
+ * @param forwardRef
68
+ * @example
69
+ * @returns
70
+ */
38
71
  render(props: LayoutSectionViewProps, forwardRef: ForwardRef): React.JSX.Element;
72
+ /**
73
+ * ignoreMutation
74
+ * @param mutation
75
+ * @example
76
+ * @returns
77
+ */
39
78
  ignoreMutation(mutation: MutationRecord | {
40
79
  type: 'selection';
41
80
  target: Node;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "2.7.3",
3
+ "version": "2.7.4",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,8 +34,8 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@atlaskit/adf-schema": "^47.6.0",
37
- "@atlaskit/editor-common": "^105.0.0",
38
- "@atlaskit/editor-plugin-analytics": "^2.2.0",
37
+ "@atlaskit/editor-common": "^105.8.0",
38
+ "@atlaskit/editor-plugin-analytics": "^2.3.0",
39
39
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
40
40
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
41
41
  "@atlaskit/editor-plugin-guideline": "^2.0.0",
@@ -43,10 +43,10 @@
43
43
  "@atlaskit/editor-plugin-width": "^3.0.0",
44
44
  "@atlaskit/editor-prosemirror": "7.0.0",
45
45
  "@atlaskit/editor-shared-styles": "^3.4.0",
46
- "@atlaskit/icon": "^26.0.0",
46
+ "@atlaskit/icon": "^26.1.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/tmp-editor-statsig": "^4.19.0",
49
- "@atlaskit/tokens": "^4.8.0",
48
+ "@atlaskit/tmp-editor-statsig": "^4.24.0",
49
+ "@atlaskit/tokens": "^4.9.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1"
52
52
  },