@atlaskit/editor-plugin-media 1.21.2 → 1.22.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,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.22.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#115817](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115817)
|
|
8
|
+
[`d647eedc6ddd4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d647eedc6ddd4) -
|
|
9
|
+
[ux] [ED-23275] Feature flag cleanup for allow-extended-panel
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 1.22.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#115247](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115247)
|
|
17
|
+
[`251d23ff9e6c8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/251d23ff9e6c8) -
|
|
18
|
+
upgrade adf-schema version to 38.0.0
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 1.21.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -55,17 +55,13 @@ function insertNodesWithOptionalParagraph(nodes) {
|
|
|
55
55
|
nodes.push(paragraph.create());
|
|
56
56
|
openEnd = 1;
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
tr.setSelection(new _state.TextSelection(tr.doc.resolve(endPos), tr.doc.resolve(endPos)));
|
|
66
|
-
} else {
|
|
67
|
-
tr.replaceSelection(new _model.Slice(_model.Fragment.from(nodes), 0, openEnd));
|
|
68
|
-
}
|
|
58
|
+
if (state.selection.empty) {
|
|
59
|
+
tr.insert(state.selection.from, nodes);
|
|
60
|
+
// Set the cursor position at the end of the insertion
|
|
61
|
+
var endPos = state.selection.from + nodes.reduce(function (totalSize, currNode) {
|
|
62
|
+
return totalSize + currNode.nodeSize;
|
|
63
|
+
}, 0);
|
|
64
|
+
tr.setSelection(new _state.TextSelection(tr.doc.resolve(endPos), tr.doc.resolve(endPos)));
|
|
69
65
|
} else {
|
|
70
66
|
tr.replaceSelection(new _model.Slice(_model.Fragment.from(nodes), 0, openEnd));
|
|
71
67
|
}
|
|
@@ -45,15 +45,11 @@ function insertNodesWithOptionalParagraph(nodes, analyticsAttributes = {}, edito
|
|
|
45
45
|
nodes.push(paragraph.create());
|
|
46
46
|
openEnd = 1;
|
|
47
47
|
}
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
tr.setSelection(new TextSelection(tr.doc.resolve(endPos), tr.doc.resolve(endPos)));
|
|
54
|
-
} else {
|
|
55
|
-
tr.replaceSelection(new Slice(Fragment.from(nodes), 0, openEnd));
|
|
56
|
-
}
|
|
48
|
+
if (state.selection.empty) {
|
|
49
|
+
tr.insert(state.selection.from, nodes);
|
|
50
|
+
// Set the cursor position at the end of the insertion
|
|
51
|
+
const endPos = state.selection.from + nodes.reduce((totalSize, currNode) => totalSize + currNode.nodeSize, 0);
|
|
52
|
+
tr.setSelection(new TextSelection(tr.doc.resolve(endPos), tr.doc.resolve(endPos)));
|
|
57
53
|
} else {
|
|
58
54
|
tr.replaceSelection(new Slice(Fragment.from(nodes), 0, openEnd));
|
|
59
55
|
}
|
|
@@ -46,17 +46,13 @@ function insertNodesWithOptionalParagraph(nodes) {
|
|
|
46
46
|
nodes.push(paragraph.create());
|
|
47
47
|
openEnd = 1;
|
|
48
48
|
}
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
tr.setSelection(new TextSelection(tr.doc.resolve(endPos), tr.doc.resolve(endPos)));
|
|
57
|
-
} else {
|
|
58
|
-
tr.replaceSelection(new Slice(Fragment.from(nodes), 0, openEnd));
|
|
59
|
-
}
|
|
49
|
+
if (state.selection.empty) {
|
|
50
|
+
tr.insert(state.selection.from, nodes);
|
|
51
|
+
// Set the cursor position at the end of the insertion
|
|
52
|
+
var endPos = state.selection.from + nodes.reduce(function (totalSize, currNode) {
|
|
53
|
+
return totalSize + currNode.nodeSize;
|
|
54
|
+
}, 0);
|
|
55
|
+
tr.setSelection(new TextSelection(tr.doc.resolve(endPos), tr.doc.resolve(endPos)));
|
|
60
56
|
} else {
|
|
61
57
|
tr.replaceSelection(new Slice(Fragment.from(nodes), 0, openEnd));
|
|
62
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"./types": "./src/types.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/adf-schema": "^
|
|
36
|
+
"@atlaskit/adf-schema": "^38.0.0",
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^6.10.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
39
39
|
"@atlaskit/button": "^18.0.0",
|
|
40
|
-
"@atlaskit/editor-common": "^83.
|
|
40
|
+
"@atlaskit/editor-common": "^83.4.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.6.0",
|
|
42
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
43
|
-
"@atlaskit/editor-plugin-annotation": "1.
|
|
42
|
+
"@atlaskit/editor-plugin-analytics": "^1.4.0",
|
|
43
|
+
"@atlaskit/editor-plugin-annotation": "1.13.0",
|
|
44
44
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
45
45
|
"@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
|
|
46
46
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.0.0",
|
|
@@ -132,9 +132,6 @@
|
|
|
132
132
|
"type": "boolean",
|
|
133
133
|
"referenceOnly": "true"
|
|
134
134
|
},
|
|
135
|
-
"platform.editor.allow-extended-panel": {
|
|
136
|
-
"type": "boolean"
|
|
137
|
-
},
|
|
138
135
|
"platform.editor.a11y_video_controls_keyboard_support_yhcxh": {
|
|
139
136
|
"type": "boolean"
|
|
140
137
|
},
|