@atlaskit/editor-plugin-paste 1.7.2 → 1.8.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 +22 -0
- package/dist/cjs/handlers.js +1 -1
- package/dist/cjs/plugins/media.js +2 -2
- package/dist/es2019/handlers.js +1 -1
- package/dist/es2019/plugins/media.js +3 -3
- package/dist/esm/handlers.js +1 -1
- package/dist/esm/plugins/media.js +3 -3
- package/package.json +12 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#128347](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128347)
|
|
8
|
+
[`e33566cebd5d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e33566cebd5d1) -
|
|
9
|
+
[ED-24175] bump @atlaskit/adf-schema to 40.8.1 and @atlassian/adf-schema-json to 1.22.0 to
|
|
10
|
+
promotecodeblocks & media in quotes, and nested expands in expands to full schema, and allow
|
|
11
|
+
quotes in panels and decisions in lists in stage0 schema, and a validator spec change
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 1.7.3
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#126553](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126553)
|
|
22
|
+
[`c7d63e493e698`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c7d63e493e698) -
|
|
23
|
+
Removed FF platform.editor.place-cursor-inside-text-block
|
|
24
|
+
|
|
3
25
|
## 1.7.2
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/cjs/handlers.js
CHANGED
|
@@ -959,7 +959,7 @@ function handleRichText(slice, queueCardsFromChangedTr) {
|
|
|
959
959
|
var lastChild = slice.content.lastChild;
|
|
960
960
|
var $nextPos = tr.doc.resolve(tr.mapping.map(selection.from));
|
|
961
961
|
var nextSelection = lastChild !== null && lastChild !== void 0 && lastChild.type.isTextblock ? _state.TextSelection.findFrom($nextPos, -1, true) : new _selection.GapCursorSelection($nextPos, _selection.Side.RIGHT);
|
|
962
|
-
if (nextSelection
|
|
962
|
+
if (nextSelection) {
|
|
963
963
|
tr.setSelection(nextSelection);
|
|
964
964
|
} else if ((0, _utils.insideTableCell)(state) && shouldUpdateCursorPosAfterPaste) {
|
|
965
965
|
var nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
|
|
@@ -33,7 +33,7 @@ function transformSliceForMedia(slice, schema) {
|
|
|
33
33
|
var newSlice = slice;
|
|
34
34
|
if ((0, _utils2.hasParentNodeOfType)([layoutSection, table, bulletList, orderedList, expand, nestedExpand])(selection)) {
|
|
35
35
|
newSlice = (0, _utils.mapSlice)(newSlice, function (node) {
|
|
36
|
-
var extendedOrLegacyAttrs = (0, _platformFeatureFlags.
|
|
36
|
+
var extendedOrLegacyAttrs = (0, _platformFeatureFlags.fg)('platform.editor.media.extended-resize-experience') ? {
|
|
37
37
|
layout: node.attrs.layout,
|
|
38
38
|
widthType: node.attrs.widthType,
|
|
39
39
|
width: node.attrs.width
|
|
@@ -96,7 +96,7 @@ var transformSliceToMediaSingleWithNewExperience = exports.transformSliceToMedia
|
|
|
96
96
|
// The duplication is in the following file:
|
|
97
97
|
// packages/editor/editor-plugin-ai/src/prebuilt/content-transformers/markdown-to-pm/markdown-transformer.ts
|
|
98
98
|
if (node.type === mediaSingle) {
|
|
99
|
-
return (0, _platformFeatureFlags.
|
|
99
|
+
return (0, _platformFeatureFlags.fg)('platform.editor.media.extended-resize-experience') ? mediaSingle.createChecked({
|
|
100
100
|
width: node.attrs.width || _mediaSingle.DEFAULT_IMAGE_WIDTH,
|
|
101
101
|
widthType: node.attrs.widthType || 'pixel',
|
|
102
102
|
layout: node.attrs.layout
|
package/dist/es2019/handlers.js
CHANGED
|
@@ -937,7 +937,7 @@ export function handleRichText(slice, queueCardsFromChangedTr) {
|
|
|
937
937
|
const lastChild = slice.content.lastChild;
|
|
938
938
|
const $nextPos = tr.doc.resolve(tr.mapping.map(selection.from));
|
|
939
939
|
const nextSelection = lastChild !== null && lastChild !== void 0 && lastChild.type.isTextblock ? TextSelection.findFrom($nextPos, -1, true) : new GapCursorSelection($nextPos, Side.RIGHT);
|
|
940
|
-
if (nextSelection
|
|
940
|
+
if (nextSelection) {
|
|
941
941
|
tr.setSelection(nextSelection);
|
|
942
942
|
} else if (insideTableCell(state) && shouldUpdateCursorPosAfterPaste) {
|
|
943
943
|
const nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
|
2
2
|
import { mapSlice, removeNestedEmptyEls, unwrap, walkUpTreeUntil } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import { getRandomHex } from '@atlaskit/media-common';
|
|
5
|
-
import {
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Ensure correct layout in nested mode
|
|
@@ -23,7 +23,7 @@ export function transformSliceForMedia(slice, schema) {
|
|
|
23
23
|
let newSlice = slice;
|
|
24
24
|
if (hasParentNodeOfType([layoutSection, table, bulletList, orderedList, expand, nestedExpand])(selection)) {
|
|
25
25
|
newSlice = mapSlice(newSlice, node => {
|
|
26
|
-
const extendedOrLegacyAttrs =
|
|
26
|
+
const extendedOrLegacyAttrs = fg('platform.editor.media.extended-resize-experience') ? {
|
|
27
27
|
layout: node.attrs.layout,
|
|
28
28
|
widthType: node.attrs.widthType,
|
|
29
29
|
width: node.attrs.width
|
|
@@ -91,7 +91,7 @@ export const transformSliceToMediaSingleWithNewExperience = (slice, schema) => {
|
|
|
91
91
|
// The duplication is in the following file:
|
|
92
92
|
// packages/editor/editor-plugin-ai/src/prebuilt/content-transformers/markdown-to-pm/markdown-transformer.ts
|
|
93
93
|
if (node.type === mediaSingle) {
|
|
94
|
-
return
|
|
94
|
+
return fg('platform.editor.media.extended-resize-experience') ? mediaSingle.createChecked({
|
|
95
95
|
width: node.attrs.width || DEFAULT_IMAGE_WIDTH,
|
|
96
96
|
widthType: node.attrs.widthType || 'pixel',
|
|
97
97
|
layout: node.attrs.layout
|
package/dist/esm/handlers.js
CHANGED
|
@@ -936,7 +936,7 @@ export function handleRichText(slice, queueCardsFromChangedTr) {
|
|
|
936
936
|
var lastChild = slice.content.lastChild;
|
|
937
937
|
var $nextPos = tr.doc.resolve(tr.mapping.map(selection.from));
|
|
938
938
|
var nextSelection = lastChild !== null && lastChild !== void 0 && lastChild.type.isTextblock ? TextSelection.findFrom($nextPos, -1, true) : new GapCursorSelection($nextPos, Side.RIGHT);
|
|
939
|
-
if (nextSelection
|
|
939
|
+
if (nextSelection) {
|
|
940
940
|
tr.setSelection(nextSelection);
|
|
941
941
|
} else if (insideTableCell(state) && shouldUpdateCursorPosAfterPaste) {
|
|
942
942
|
var nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
|
|
@@ -5,7 +5,7 @@ import { DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
|
5
5
|
import { mapSlice, removeNestedEmptyEls, unwrap, walkUpTreeUntil } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
7
7
|
import { getRandomHex } from '@atlaskit/media-common';
|
|
8
|
-
import {
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Ensure correct layout in nested mode
|
|
@@ -25,7 +25,7 @@ export function transformSliceForMedia(slice, schema) {
|
|
|
25
25
|
var newSlice = slice;
|
|
26
26
|
if (hasParentNodeOfType([layoutSection, table, bulletList, orderedList, expand, nestedExpand])(selection)) {
|
|
27
27
|
newSlice = mapSlice(newSlice, function (node) {
|
|
28
|
-
var extendedOrLegacyAttrs =
|
|
28
|
+
var extendedOrLegacyAttrs = fg('platform.editor.media.extended-resize-experience') ? {
|
|
29
29
|
layout: node.attrs.layout,
|
|
30
30
|
widthType: node.attrs.widthType,
|
|
31
31
|
width: node.attrs.width
|
|
@@ -88,7 +88,7 @@ export var transformSliceToMediaSingleWithNewExperience = function transformSlic
|
|
|
88
88
|
// The duplication is in the following file:
|
|
89
89
|
// packages/editor/editor-plugin-ai/src/prebuilt/content-transformers/markdown-to-pm/markdown-transformer.ts
|
|
90
90
|
if (node.type === mediaSingle) {
|
|
91
|
-
return
|
|
91
|
+
return fg('platform.editor.media.extended-resize-experience') ? mediaSingle.createChecked({
|
|
92
92
|
width: node.attrs.width || DEFAULT_IMAGE_WIDTH,
|
|
93
93
|
widthType: node.attrs.widthType || 'pixel',
|
|
94
94
|
layout: node.attrs.layout
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
".": "./src/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/editor-common": "^87.
|
|
37
|
-
"@atlaskit/editor-markdown-transformer": "^5.
|
|
38
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
39
|
-
"@atlaskit/editor-plugin-annotation": "^1.
|
|
40
|
-
"@atlaskit/editor-plugin-better-type-history": "^1.
|
|
41
|
-
"@atlaskit/editor-plugin-card": "^2.
|
|
36
|
+
"@atlaskit/editor-common": "^87.6.0",
|
|
37
|
+
"@atlaskit/editor-markdown-transformer": "^5.11.0",
|
|
38
|
+
"@atlaskit/editor-plugin-analytics": "^1.7.0",
|
|
39
|
+
"@atlaskit/editor-plugin-annotation": "^1.19.0",
|
|
40
|
+
"@atlaskit/editor-plugin-better-type-history": "^1.7.0",
|
|
41
|
+
"@atlaskit/editor-plugin-card": "^2.10.0",
|
|
42
42
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
43
|
-
"@atlaskit/editor-plugin-list": "^3.
|
|
44
|
-
"@atlaskit/editor-plugin-media": "^1.
|
|
43
|
+
"@atlaskit/editor-plugin-list": "^3.8.0",
|
|
44
|
+
"@atlaskit/editor-plugin-media": "^1.28.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
46
46
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
47
47
|
"@atlaskit/media-client": "^27.3.0",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@af/visual-regression": "*",
|
|
59
|
-
"@atlaskit/adf-schema": "^40.
|
|
60
|
-
"@atlaskit/editor-plugin-block-type": "^3.
|
|
59
|
+
"@atlaskit/adf-schema": "^40.8.1",
|
|
60
|
+
"@atlaskit/editor-plugin-block-type": "^3.12.0",
|
|
61
61
|
"@atlaskit/editor-plugin-history": "^1.2.0",
|
|
62
|
-
"@atlaskit/editor-plugin-type-ahead": "^1.
|
|
62
|
+
"@atlaskit/editor-plugin-type-ahead": "^1.7.0",
|
|
63
63
|
"@atlaskit/ssr": "*",
|
|
64
64
|
"@atlaskit/visual-regression": "*",
|
|
65
65
|
"@testing-library/react": "^12.1.5",
|
|
@@ -118,9 +118,6 @@
|
|
|
118
118
|
"platform.editor.media.fix-copy-paste-excel_62g4s": {
|
|
119
119
|
"type": "boolean"
|
|
120
120
|
},
|
|
121
|
-
"platform.editor.place-cursor-inside-text-block": {
|
|
122
|
-
"type": "boolean"
|
|
123
|
-
},
|
|
124
121
|
"platform.editor.multi-bodied-extension_0rygg": {
|
|
125
122
|
"type": "boolean"
|
|
126
123
|
},
|