@atlaskit/editor-core 179.0.2 → 179.0.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,11 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 179.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d93b14cdda6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d93b14cdda6) - [ED-16678] fix - add extra check for props.getPos to fix slow extension rendering
8
+
3
9
  ## 179.0.2
4
10
 
5
11
  ### Patch Changes
@@ -35,11 +35,12 @@ function ExtensionWithPluginState(props) {
35
35
  var isMobile = editorAppearance === 'mobile';
36
36
  var hasChildren = !!children;
37
37
  var removeBorder = hideFrame && !isMobile && !hasBody || false;
38
+ var isTopLevelNode = props.getPos && !isNaN(props.getPos()) && props.view.state.doc.resolve(props.getPos()).depth === 0;
38
39
  var shouldBreakout =
39
40
  // Extension should breakout when the layout is set to 'full-width' or 'wide'.
40
41
  ['full-width', 'wide'].includes(node.attrs.layout) &&
41
42
  // Extension breakout state should only be respected for top level nodes.
42
- props.view.state.doc.resolve(props.getPos()).depth === 0 &&
43
+ isTopLevelNode &&
43
44
  // Extension breakout state should not be respected when the editor appearance is full-width mode
44
45
  editorAppearance !== 'full-width';
45
46
  var classNames = (0, _classnames2.default)('extension-container', 'block', shadowClassNames, (0, _defineProperty2.default)({
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "179.0.2";
9
+ var version = "179.0.3";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "179.0.2",
3
+ "version": "179.0.3",
4
4
  "sideEffects": false
5
5
  }
@@ -27,11 +27,12 @@ function ExtensionWithPluginState(props) {
27
27
  const isMobile = editorAppearance === 'mobile';
28
28
  const hasChildren = !!children;
29
29
  const removeBorder = hideFrame && !isMobile && !hasBody || false;
30
+ const isTopLevelNode = props.getPos && !isNaN(props.getPos()) && props.view.state.doc.resolve(props.getPos()).depth === 0;
30
31
  const shouldBreakout =
31
32
  // Extension should breakout when the layout is set to 'full-width' or 'wide'.
32
33
  ['full-width', 'wide'].includes(node.attrs.layout) &&
33
34
  // Extension breakout state should only be respected for top level nodes.
34
- props.view.state.doc.resolve(props.getPos()).depth === 0 &&
35
+ isTopLevelNode &&
35
36
  // Extension breakout state should not be respected when the editor appearance is full-width mode
36
37
  editorAppearance !== 'full-width';
37
38
  const classNames = classnames('extension-container', 'block', shadowClassNames, {
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "179.0.2";
2
+ export const version = "179.0.3";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "179.0.2",
3
+ "version": "179.0.3",
4
4
  "sideEffects": false
5
5
  }
@@ -29,11 +29,12 @@ function ExtensionWithPluginState(props) {
29
29
  var isMobile = editorAppearance === 'mobile';
30
30
  var hasChildren = !!children;
31
31
  var removeBorder = hideFrame && !isMobile && !hasBody || false;
32
+ var isTopLevelNode = props.getPos && !isNaN(props.getPos()) && props.view.state.doc.resolve(props.getPos()).depth === 0;
32
33
  var shouldBreakout =
33
34
  // Extension should breakout when the layout is set to 'full-width' or 'wide'.
34
35
  ['full-width', 'wide'].includes(node.attrs.layout) &&
35
36
  // Extension breakout state should only be respected for top level nodes.
36
- props.view.state.doc.resolve(props.getPos()).depth === 0 &&
37
+ isTopLevelNode &&
37
38
  // Extension breakout state should not be respected when the editor appearance is full-width mode
38
39
  editorAppearance !== 'full-width';
39
40
  var classNames = classnames('extension-container', 'block', shadowClassNames, _defineProperty({
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "179.0.2";
2
+ export var version = "179.0.3";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "179.0.2",
3
+ "version": "179.0.3",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "179.0.2",
3
+ "version": "179.0.3",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -191,7 +191,7 @@
191
191
  "fetch-mock": "^8.0.0",
192
192
  "jscodeshift": "^0.13.0",
193
193
  "lz-string": "^1.4.4",
194
- "mockdate": "^3.0.2",
194
+ "mockdate": "^3.0.5",
195
195
  "node-fetch": "^2.6.7",
196
196
  "prettier": "^2.7.0",
197
197
  "prosemirror-dev-tools": "^3.1.0",