@atlaskit/editor-plugin-synced-block 27.0.5 → 27.0.7
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,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 27.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bb942625d4990`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bb942625d4990) -
|
|
8
|
+
Clean up the shipped synced block node types experiment, retaining node type collection for
|
|
9
|
+
content conversions.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 27.0.6
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 27.0.5
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -15,7 +15,6 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
15
15
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
16
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
17
17
|
var _utils3 = require("@atlaskit/editor-synced-block-provider/utils");
|
|
18
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
19
18
|
var _main = require("../pm-plugins/main");
|
|
20
19
|
var _utils4 = require("../pm-plugins/utils/utils");
|
|
21
20
|
var _types = require("../types");
|
|
@@ -133,11 +132,9 @@ var createSyncedBlock = exports.createSyncedBlock = function createSyncedBlock(_
|
|
|
133
132
|
});
|
|
134
133
|
return false;
|
|
135
134
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}))).sort();
|
|
140
|
-
}
|
|
135
|
+
nodeTypes = (0, _toConsumableArray2.default)(new Set((0, _utils.getSourceNodesFromSelectionRange)(tr, tr.selection).map(function (node) {
|
|
136
|
+
return node.type.name;
|
|
137
|
+
}))).sort();
|
|
141
138
|
var _attrs = syncBlockStore.sourceManager.generateBodiedSyncBlockAttrs();
|
|
142
139
|
var _newBodiedSyncBlockNode = bodiedSyncBlock.createAndFill(_attrs, conversionInfo.contentToInclude, conversionInfo.breakoutMark ? [conversionInfo.breakoutMark] : undefined);
|
|
143
140
|
if (!_newBodiedSyncBlockNode) {
|
|
@@ -160,7 +157,7 @@ var createSyncedBlock = exports.createSyncedBlock = function createSyncedBlock(_
|
|
|
160
157
|
}
|
|
161
158
|
|
|
162
159
|
// Stash creation-type signals on the final transaction after any typeahead
|
|
163
|
-
// reassignment. nodeTypes is populated only for
|
|
160
|
+
// reassignment. nodeTypes is populated only for non-empty conversions.
|
|
164
161
|
tr.setMeta(_main.creationMetaKey, {
|
|
165
162
|
createdEmpty: createdEmpty,
|
|
166
163
|
inputMethod: inputMethod,
|
|
@@ -6,7 +6,6 @@ import { DOMSerializer, Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
6
6
|
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { findSelectedNodeOfType, removeParentNodeOfType, removeSelectedNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import { getSourceProductFromResourceIdSafe } from '@atlaskit/editor-synced-block-provider/utils';
|
|
9
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
9
|
import { creationMetaKey, deleteMechanismMetaKey, syncedBlockPluginKey } from '../pm-plugins/main';
|
|
11
10
|
import { canBeConvertedToSyncBlock, deferDispatch, findSyncBlock, findSyncBlockOrBodiedSyncBlock, isBodiedSyncBlockNode } from '../pm-plugins/utils/utils';
|
|
12
11
|
import { FLAG_ID } from '../types';
|
|
@@ -128,9 +127,7 @@ export const createSyncedBlock = ({
|
|
|
128
127
|
});
|
|
129
128
|
return false;
|
|
130
129
|
}
|
|
131
|
-
|
|
132
|
-
nodeTypes = [...new Set(getSourceNodesFromSelectionRange(tr, tr.selection).map(node => node.type.name))].sort();
|
|
133
|
-
}
|
|
130
|
+
nodeTypes = [...new Set(getSourceNodesFromSelectionRange(tr, tr.selection).map(node => node.type.name))].sort();
|
|
134
131
|
const attrs = syncBlockStore.sourceManager.generateBodiedSyncBlockAttrs();
|
|
135
132
|
const newBodiedSyncBlockNode = bodiedSyncBlock.createAndFill(attrs, conversionInfo.contentToInclude, conversionInfo.breakoutMark ? [conversionInfo.breakoutMark] : undefined);
|
|
136
133
|
if (!newBodiedSyncBlockNode) {
|
|
@@ -153,7 +150,7 @@ export const createSyncedBlock = ({
|
|
|
153
150
|
}
|
|
154
151
|
|
|
155
152
|
// Stash creation-type signals on the final transaction after any typeahead
|
|
156
|
-
// reassignment. nodeTypes is populated only for
|
|
153
|
+
// reassignment. nodeTypes is populated only for non-empty conversions.
|
|
157
154
|
tr.setMeta(creationMetaKey, {
|
|
158
155
|
createdEmpty,
|
|
159
156
|
inputMethod,
|
|
@@ -10,7 +10,6 @@ import { DOMSerializer, Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
10
10
|
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import { findSelectedNodeOfType, removeParentNodeOfType, removeSelectedNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
12
12
|
import { getSourceProductFromResourceIdSafe } from '@atlaskit/editor-synced-block-provider/utils';
|
|
13
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
13
|
import { creationMetaKey, deleteMechanismMetaKey, syncedBlockPluginKey } from '../pm-plugins/main';
|
|
15
14
|
import { canBeConvertedToSyncBlock, deferDispatch, findSyncBlock, findSyncBlockOrBodiedSyncBlock, isBodiedSyncBlockNode } from '../pm-plugins/utils/utils';
|
|
16
15
|
import { FLAG_ID } from '../types';
|
|
@@ -126,11 +125,9 @@ export var createSyncedBlock = function createSyncedBlock(_ref) {
|
|
|
126
125
|
});
|
|
127
126
|
return false;
|
|
128
127
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}))).sort();
|
|
133
|
-
}
|
|
128
|
+
nodeTypes = _toConsumableArray(new Set(getSourceNodesFromSelectionRange(tr, tr.selection).map(function (node) {
|
|
129
|
+
return node.type.name;
|
|
130
|
+
}))).sort();
|
|
134
131
|
var _attrs = syncBlockStore.sourceManager.generateBodiedSyncBlockAttrs();
|
|
135
132
|
var _newBodiedSyncBlockNode = bodiedSyncBlock.createAndFill(_attrs, conversionInfo.contentToInclude, conversionInfo.breakoutMark ? [conversionInfo.breakoutMark] : undefined);
|
|
136
133
|
if (!_newBodiedSyncBlockNode) {
|
|
@@ -153,7 +150,7 @@ export var createSyncedBlock = function createSyncedBlock(_ref) {
|
|
|
153
150
|
}
|
|
154
151
|
|
|
155
152
|
// Stash creation-type signals on the final transaction after any typeahead
|
|
156
|
-
// reassignment. nodeTypes is populated only for
|
|
153
|
+
// reassignment. nodeTypes is populated only for non-empty conversions.
|
|
157
154
|
tr.setMeta(creationMetaKey, {
|
|
158
155
|
createdEmpty: createdEmpty,
|
|
159
156
|
inputMethod: inputMethod,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "27.0.
|
|
3
|
+
"version": "27.0.7",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
54
54
|
"@atlaskit/primitives": "^22.6.0",
|
|
55
55
|
"@atlaskit/spinner": "20.4.4",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^246.0.0",
|
|
57
57
|
"@atlaskit/tokens": "20.7.0",
|
|
58
58
|
"@atlaskit/tooltip": "^24.4.0",
|
|
59
59
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"memoize-one": "^6.0.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@atlaskit/editor-common": "^133.
|
|
68
|
+
"@atlaskit/editor-common": "^133.7.0",
|
|
69
69
|
"react": "^18.2.0 || ^19.2.0",
|
|
70
70
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
71
71
|
},
|