@atlaskit/editor-core 185.9.2 → 185.9.5

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
+ ## 185.9.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`dbfd6704c14`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dbfd6704c14) - [ux] ED-18061 - Safe insert node selected codeblock in paste handler logic
8
+ - Updated dependencies
9
+
3
10
  ## 185.9.2
4
11
 
5
12
  ### Patch Changes
@@ -121,7 +121,9 @@ function handlePasteIntoTaskOrDecisionOrPanel(slice, queueCardsFromChangedTr) {
121
121
  // and the slice is not a whole node (i.e. openStart is 1 and openEnd is 0)
122
122
  // or the slice's first node is a paragraph,
123
123
  // then we can replace the selection with our slice.
124
- if ((transformedSliceIsValidNode || selectionIsValidNode) && !(transformedSlice.openStart === 1 && transformedSlice.openEnd === 0) || ((_transformedSlice$con = transformedSlice.content.firstChild) === null || _transformedSlice$con === void 0 ? void 0 : _transformedSlice$con.type) === paragraph) {
124
+ if ((transformedSliceIsValidNode || selectionIsValidNode) && !(transformedSlice.openStart === 1 && transformedSlice.openEnd === 0 ||
125
+ // Whole codeblock node has reverse slice depths.
126
+ transformedSlice.openStart === 0 && transformedSlice.openEnd === 1) || ((_transformedSlice$con = transformedSlice.content.firstChild) === null || _transformedSlice$con === void 0 ? void 0 : _transformedSlice$con.type) === paragraph) {
125
127
  tr.replaceSelection(transformedSlice).scrollIntoView();
126
128
  } else {
127
129
  // This maintains both the selection (destination) and the slice (paste content).
@@ -268,7 +268,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
268
268
  var selectionParentNode = state.selection.$head.node(selectionDepth - 1);
269
269
  var selectionParentType = selectionParentNode === null || selectionParentNode === void 0 ? void 0 : selectionParentNode.type;
270
270
  var edgeCaseNodeTypes = [(_schema$nodes = schema.nodes) === null || _schema$nodes === void 0 ? void 0 : _schema$nodes.panel, (_schema$nodes2 = schema.nodes) === null || _schema$nodes2 === void 0 ? void 0 : _schema$nodes2.taskList, (_schema$nodes3 = schema.nodes) === null || _schema$nodes3 === void 0 ? void 0 : _schema$nodes3.decisionList];
271
- if (slice.openStart === 0 && selectionParentNode && edgeCaseNodeTypes.includes(selectionParentType)) {
271
+ if (slice.openStart === 0 && slice.openEnd !== 1 && selectionParentNode && edgeCaseNodeTypes.includes(selectionParentType)) {
272
272
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
273
273
  slice.openStart = 1;
274
274
  }
@@ -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 = "185.9.2";
9
+ var version = "185.9.5";
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": "185.9.2",
3
+ "version": "185.9.5",
4
4
  "sideEffects": false
5
5
  }
@@ -101,7 +101,9 @@ export function handlePasteIntoTaskOrDecisionOrPanel(slice, queueCardsFromChange
101
101
  // and the slice is not a whole node (i.e. openStart is 1 and openEnd is 0)
102
102
  // or the slice's first node is a paragraph,
103
103
  // then we can replace the selection with our slice.
104
- if ((transformedSliceIsValidNode || selectionIsValidNode) && !(transformedSlice.openStart === 1 && transformedSlice.openEnd === 0) || ((_transformedSlice$con = transformedSlice.content.firstChild) === null || _transformedSlice$con === void 0 ? void 0 : _transformedSlice$con.type) === paragraph) {
104
+ if ((transformedSliceIsValidNode || selectionIsValidNode) && !(transformedSlice.openStart === 1 && transformedSlice.openEnd === 0 ||
105
+ // Whole codeblock node has reverse slice depths.
106
+ transformedSlice.openStart === 0 && transformedSlice.openEnd === 1) || ((_transformedSlice$con = transformedSlice.content.firstChild) === null || _transformedSlice$con === void 0 ? void 0 : _transformedSlice$con.type) === paragraph) {
105
107
  tr.replaceSelection(transformedSlice).scrollIntoView();
106
108
  } else {
107
109
  // This maintains both the selection (destination) and the slice (paste content).
@@ -234,7 +234,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
234
234
  const selectionParentNode = state.selection.$head.node(selectionDepth - 1);
235
235
  const selectionParentType = selectionParentNode === null || selectionParentNode === void 0 ? void 0 : selectionParentNode.type;
236
236
  const edgeCaseNodeTypes = [(_schema$nodes = schema.nodes) === null || _schema$nodes === void 0 ? void 0 : _schema$nodes.panel, (_schema$nodes2 = schema.nodes) === null || _schema$nodes2 === void 0 ? void 0 : _schema$nodes2.taskList, (_schema$nodes3 = schema.nodes) === null || _schema$nodes3 === void 0 ? void 0 : _schema$nodes3.decisionList];
237
- if (slice.openStart === 0 && selectionParentNode && edgeCaseNodeTypes.includes(selectionParentType)) {
237
+ if (slice.openStart === 0 && slice.openEnd !== 1 && selectionParentNode && edgeCaseNodeTypes.includes(selectionParentType)) {
238
238
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
239
239
  slice.openStart = 1;
240
240
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "185.9.2";
2
+ export const version = "185.9.5";
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": "185.9.2",
3
+ "version": "185.9.5",
4
4
  "sideEffects": false
5
5
  }
@@ -99,7 +99,9 @@ export function handlePasteIntoTaskOrDecisionOrPanel(slice, queueCardsFromChange
99
99
  // and the slice is not a whole node (i.e. openStart is 1 and openEnd is 0)
100
100
  // or the slice's first node is a paragraph,
101
101
  // then we can replace the selection with our slice.
102
- if ((transformedSliceIsValidNode || selectionIsValidNode) && !(transformedSlice.openStart === 1 && transformedSlice.openEnd === 0) || ((_transformedSlice$con = transformedSlice.content.firstChild) === null || _transformedSlice$con === void 0 ? void 0 : _transformedSlice$con.type) === paragraph) {
102
+ if ((transformedSliceIsValidNode || selectionIsValidNode) && !(transformedSlice.openStart === 1 && transformedSlice.openEnd === 0 ||
103
+ // Whole codeblock node has reverse slice depths.
104
+ transformedSlice.openStart === 0 && transformedSlice.openEnd === 1) || ((_transformedSlice$con = transformedSlice.content.firstChild) === null || _transformedSlice$con === void 0 ? void 0 : _transformedSlice$con.type) === paragraph) {
103
105
  tr.replaceSelection(transformedSlice).scrollIntoView();
104
106
  } else {
105
107
  // This maintains both the selection (destination) and the slice (paste content).
@@ -254,7 +254,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
254
254
  var selectionParentNode = state.selection.$head.node(selectionDepth - 1);
255
255
  var selectionParentType = selectionParentNode === null || selectionParentNode === void 0 ? void 0 : selectionParentNode.type;
256
256
  var edgeCaseNodeTypes = [(_schema$nodes = schema.nodes) === null || _schema$nodes === void 0 ? void 0 : _schema$nodes.panel, (_schema$nodes2 = schema.nodes) === null || _schema$nodes2 === void 0 ? void 0 : _schema$nodes2.taskList, (_schema$nodes3 = schema.nodes) === null || _schema$nodes3 === void 0 ? void 0 : _schema$nodes3.decisionList];
257
- if (slice.openStart === 0 && selectionParentNode && edgeCaseNodeTypes.includes(selectionParentType)) {
257
+ if (slice.openStart === 0 && slice.openEnd !== 1 && selectionParentNode && edgeCaseNodeTypes.includes(selectionParentType)) {
258
258
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
259
259
  slice.openStart = 1;
260
260
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "185.9.2";
2
+ export var version = "185.9.5";
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": "185.9.2",
3
+ "version": "185.9.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "185.9.2",
3
+ "version": "185.9.5",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/code": "^14.6.0",
50
50
  "@atlaskit/date": "^0.10.0",
51
51
  "@atlaskit/datetime-picker": "^12.7.0",
52
- "@atlaskit/editor-common": "^74.15.0",
52
+ "@atlaskit/editor-common": "^74.17.0",
53
53
  "@atlaskit/editor-json-transformer": "^8.10.0",
54
54
  "@atlaskit/editor-markdown-transformer": "^5.2.0",
55
55
  "@atlaskit/editor-palette": "1.5.1",
@@ -95,7 +95,7 @@
95
95
  "@atlaskit/spinner": "^15.5.0",
96
96
  "@atlaskit/status": "^1.3.0",
97
97
  "@atlaskit/tabs": "^13.4.0",
98
- "@atlaskit/task-decision": "^17.6.0",
98
+ "@atlaskit/task-decision": "^17.7.0",
99
99
  "@atlaskit/textarea": "^4.7.0",
100
100
  "@atlaskit/textfield": "^5.6.0",
101
101
  "@atlaskit/theme": "^12.5.0",
@@ -243,6 +243,10 @@
243
243
  },
244
244
  "platform.editor.media.extended-resize-experience": {
245
245
  "type": "boolean"
246
+ },
247
+ "platform.design-system-team.border-checkbox_nyoiu": {
248
+ "type": "boolean",
249
+ "referenceOnly": "true"
246
250
  }
247
251
  },
248
252
  "tests": {