@atlaskit/editor-core 186.0.0 → 186.0.1

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,12 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 186.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`38dc2298bf5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/38dc2298bf5) - fix issue where wrong expand node type was being inserted into tables
8
+ - Updated dependencies
9
+
3
10
  ## 186.0.0
4
11
 
5
12
  ### Major Changes
@@ -107,6 +107,8 @@ var toggleExpandExpanded = function toggleExpandExpanded(pos, nodeType) {
107
107
  return true;
108
108
  };
109
109
  };
110
+
111
+ // Creates either an expand or a nestedExpand node based on the current selection
110
112
  exports.toggleExpandExpanded = toggleExpandExpanded;
111
113
  var createExpandNode = function createExpandNode(state) {
112
114
  var _state$schema$nodes = state.schema.nodes,
@@ -76,7 +76,7 @@ var expandPlugin = function expandPlugin() {
76
76
  }
77
77
  var tr = (0, _blockType.createWrapSelectionTransaction)({
78
78
  state: state,
79
- type: state.schema.nodes.expand
79
+ type: node.type
80
80
  });
81
81
  return (0, _analytics.addAnalytics)(state, tr, {
82
82
  action: _analytics.ACTION.INSERTED,
@@ -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 = "186.0.0";
9
+ var version = "186.0.1";
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": "186.0.0",
3
+ "version": "186.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -87,6 +87,8 @@ export const toggleExpandExpanded = (pos, nodeType) => (state, dispatch) => {
87
87
  }
88
88
  return true;
89
89
  };
90
+
91
+ // Creates either an expand or a nestedExpand node based on the current selection
90
92
  export const createExpandNode = state => {
91
93
  const {
92
94
  expand,
@@ -58,7 +58,7 @@ const expandPlugin = (options = {}, api) => {
58
58
  }
59
59
  const tr = createWrapSelectionTransaction({
60
60
  state,
61
- type: state.schema.nodes.expand
61
+ type: node.type
62
62
  });
63
63
  return addAnalytics(state, tr, {
64
64
  action: ACTION.INSERTED,
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "186.0.0";
2
+ export const version = "186.0.1";
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": "186.0.0",
3
+ "version": "186.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -96,6 +96,8 @@ export var toggleExpandExpanded = function toggleExpandExpanded(pos, nodeType) {
96
96
  return true;
97
97
  };
98
98
  };
99
+
100
+ // Creates either an expand or a nestedExpand node based on the current selection
99
101
  export var createExpandNode = function createExpandNode(state) {
100
102
  var _state$schema$nodes = state.schema.nodes,
101
103
  expand = _state$schema$nodes.expand,
@@ -61,7 +61,7 @@ var expandPlugin = function expandPlugin() {
61
61
  }
62
62
  var tr = createWrapSelectionTransaction({
63
63
  state: state,
64
- type: state.schema.nodes.expand
64
+ type: node.type
65
65
  });
66
66
  return addAnalytics(state, tr, {
67
67
  action: ACTION.INSERTED,
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "186.0.0";
2
+ export var version = "186.0.1";
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": "186.0.0",
3
+ "version": "186.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { Node as PMNode, NodeType } from 'prosemirror-model';
3
- import { Command } from '../../types';
1
+ import type { EditorState } from 'prosemirror-state';
2
+ import type { Node as PMNode, NodeType } from 'prosemirror-model';
3
+ import type { Command } from '../../types';
4
4
  export declare const setExpandRef: (ref?: HTMLDivElement | null) => Command;
5
5
  export declare const deleteExpandAtPos: (expandNodePos: number, expandNode: PMNode) => Command;
6
6
  export declare const deleteExpand: () => Command;
@@ -1,5 +1,5 @@
1
- import { NextEditorPlugin, EditorProps } from '../../types';
2
- import { LongPressSelectionPluginOptions } from '../selection/types';
1
+ import type { NextEditorPlugin, EditorProps } from '../../types';
2
+ import type { LongPressSelectionPluginOptions } from '../selection/types';
3
3
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
@@ -1,6 +1,6 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { Node as PMNode, NodeType } from 'prosemirror-model';
3
- import { Command } from '../../types';
1
+ import type { EditorState } from 'prosemirror-state';
2
+ import type { Node as PMNode, NodeType } from 'prosemirror-model';
3
+ import type { Command } from '../../types';
4
4
  export declare const setExpandRef: (ref?: HTMLDivElement | null) => Command;
5
5
  export declare const deleteExpandAtPos: (expandNodePos: number, expandNode: PMNode) => Command;
6
6
  export declare const deleteExpand: () => Command;
@@ -1,5 +1,5 @@
1
- import { NextEditorPlugin, EditorProps } from '../../types';
2
- import { LongPressSelectionPluginOptions } from '../selection/types';
1
+ import type { NextEditorPlugin, EditorProps } from '../../types';
2
+ import type { LongPressSelectionPluginOptions } from '../selection/types';
3
3
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "186.0.0",
3
+ "version": "186.0.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/code": "^14.6.0",
56
56
  "@atlaskit/date": "^0.10.0",
57
57
  "@atlaskit/datetime-picker": "^12.7.0",
58
- "@atlaskit/editor-common": "^74.22.0",
58
+ "@atlaskit/editor-common": "^74.23.0",
59
59
  "@atlaskit/editor-json-transformer": "^8.10.0",
60
60
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
61
61
  "@atlaskit/editor-palette": "1.5.1",
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/editor-plugin-grid": "^0.1.0",
70
70
  "@atlaskit/editor-plugin-guideline": "^0.3.4",
71
71
  "@atlaskit/editor-plugin-hyperlink": "^0.2.0",
72
- "@atlaskit/editor-plugin-table": "^2.2.0",
72
+ "@atlaskit/editor-plugin-table": "^2.3.0",
73
73
  "@atlaskit/editor-plugin-width": "^0.1.0",
74
74
  "@atlaskit/editor-shared-styles": "^2.4.0",
75
75
  "@atlaskit/editor-tables": "^2.3.0",
@@ -149,7 +149,7 @@
149
149
  "@atlaskit/collab-provider": "9.7.2",
150
150
  "@atlaskit/dropdown-menu": "^11.10.0",
151
151
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
152
- "@atlaskit/editor-plugin-table": "^2.2.0",
152
+ "@atlaskit/editor-plugin-table": "^2.3.0",
153
153
  "@atlaskit/editor-test-helpers": "^18.10.0",
154
154
  "@atlaskit/flag": "^15.2.0",
155
155
  "@atlaskit/icon-object": "^6.3.0",
@@ -162,7 +162,7 @@
162
162
  "@atlaskit/media-test-helpers": "^33.0.0",
163
163
  "@atlaskit/menu": "^1.9.0",
164
164
  "@atlaskit/platform-feature-flags": "^0.2.0",
165
- "@atlaskit/renderer": "^108.6.0",
165
+ "@atlaskit/renderer": "^108.7.0",
166
166
  "@atlaskit/section-message": "^6.4.0",
167
167
  "@atlaskit/smart-user-picker": "^6.1.0",
168
168
  "@atlaskit/synchrony-test-helpers": "^2.3.0",