@atlaskit/editor-plugin-block-controls 9.0.13 → 9.0.14
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 +9 -0
- package/dist/cjs/editor-commands/move-to-layout.js +3 -1
- package/dist/cjs/pm-plugins/decorations-drop-target-active.js +3 -1
- package/dist/cjs/ui/drop-target.js +3 -1
- package/dist/es2019/editor-commands/move-to-layout.js +3 -1
- package/dist/es2019/pm-plugins/decorations-drop-target-active.js +3 -1
- package/dist/es2019/ui/drop-target.js +3 -1
- package/dist/esm/editor-commands/move-to-layout.js +3 -1
- package/dist/esm/pm-plugins/decorations-drop-target-active.js +3 -1
- package/dist/esm/ui/drop-target.js +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 9.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3895f6d32cc49`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3895f6d32cc49) -
|
|
8
|
+
Replace expValEquals with editorExperiment for platform_synced_block experiment to ensure
|
|
9
|
+
consistent exposure firing
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 9.0.13
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -143,7 +143,9 @@ var canMoveToLayout = function canMoveToLayout(api, from, to, tr, moveNodeAtCurs
|
|
|
143
143
|
}
|
|
144
144
|
var $to = tr.doc.resolve(to);
|
|
145
145
|
var allowedParentTypes = [doc, layoutSection];
|
|
146
|
-
if (bodiedSyncBlock && (0,
|
|
146
|
+
if (bodiedSyncBlock && (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _experiments.editorExperiment)('platform_synced_block_patch_6', true, {
|
|
147
|
+
exposure: true
|
|
148
|
+
})) {
|
|
147
149
|
allowedParentTypes.push(bodiedSyncBlock);
|
|
148
150
|
}
|
|
149
151
|
|
|
@@ -214,7 +214,9 @@ var getActiveDropTargetDecorations = exports.getActiveDropTargetDecorations = fu
|
|
|
214
214
|
}
|
|
215
215
|
var anchorEmitNodeWithPos = rootNodeWithPos;
|
|
216
216
|
if ((0, _experiments.editorExperiment)('advanced_layouts', true)) {
|
|
217
|
-
if ((0,
|
|
217
|
+
if ((0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _experiments.editorExperiment)('platform_synced_block_patch_6', true, {
|
|
218
|
+
exposure: true
|
|
219
|
+
})) {
|
|
218
220
|
var schema = rootNodeWithPos.node.type.schema;
|
|
219
221
|
var layoutSection = schema.nodes.layoutSection;
|
|
220
222
|
var isLayoutSectionChildOfRoot = (0, _utils2.findChildrenByType)(rootNodeWithPos.node, layoutSection, false).length > 0;
|
|
@@ -113,7 +113,9 @@ var HoverZone = function HoverZone(_ref) {
|
|
|
113
113
|
_useActiveAnchorTrack2 = (0, _slicedToArray2.default)(_useActiveAnchorTrack, 2),
|
|
114
114
|
_isActive = _useActiveAnchorTrack2[0],
|
|
115
115
|
setActiveAnchor = _useActiveAnchorTrack2[1];
|
|
116
|
-
var isInsideBodiedSyncBlock = parent && parent.type.name === 'bodiedSyncBlock' && (0,
|
|
116
|
+
var isInsideBodiedSyncBlock = parent && parent.type.name === 'bodiedSyncBlock' && (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _experiments.editorExperiment)('platform_synced_block_patch_6', true, {
|
|
117
|
+
exposure: true
|
|
118
|
+
});
|
|
117
119
|
(0, _react.useEffect)(function () {
|
|
118
120
|
if (ref.current) {
|
|
119
121
|
return (0, _adapter.dropTargetForElements)({
|
|
@@ -140,7 +140,9 @@ const canMoveToLayout = (api, from, to, tr, moveNodeAtCursorPos) => {
|
|
|
140
140
|
}
|
|
141
141
|
const $to = tr.doc.resolve(to);
|
|
142
142
|
const allowedParentTypes = [doc, layoutSection];
|
|
143
|
-
if (bodiedSyncBlock &&
|
|
143
|
+
if (bodiedSyncBlock && editorExperiment('platform_synced_block', true) && editorExperiment('platform_synced_block_patch_6', true, {
|
|
144
|
+
exposure: true
|
|
145
|
+
})) {
|
|
144
146
|
allowedParentTypes.push(bodiedSyncBlock);
|
|
145
147
|
}
|
|
146
148
|
|
|
@@ -197,7 +197,9 @@ export const getActiveDropTargetDecorations = (activeDropTargetNode, state, api,
|
|
|
197
197
|
}
|
|
198
198
|
let anchorEmitNodeWithPos = rootNodeWithPos;
|
|
199
199
|
if (editorExperiment('advanced_layouts', true)) {
|
|
200
|
-
if (
|
|
200
|
+
if (editorExperiment('platform_synced_block', true) && editorExperiment('platform_synced_block_patch_6', true, {
|
|
201
|
+
exposure: true
|
|
202
|
+
})) {
|
|
201
203
|
const schema = rootNodeWithPos.node.type.schema;
|
|
202
204
|
const {
|
|
203
205
|
layoutSection
|
|
@@ -101,7 +101,9 @@ const HoverZone = ({
|
|
|
101
101
|
return node ? getNodeAnchor(node) : '';
|
|
102
102
|
}, [api, node, pos, position]);
|
|
103
103
|
const [_isActive, setActiveAnchor] = useActiveAnchorTracker(anchorName);
|
|
104
|
-
const isInsideBodiedSyncBlock = parent && parent.type.name === 'bodiedSyncBlock' &&
|
|
104
|
+
const isInsideBodiedSyncBlock = parent && parent.type.name === 'bodiedSyncBlock' && editorExperiment('platform_synced_block', true) && editorExperiment('platform_synced_block_patch_6', true, {
|
|
105
|
+
exposure: true
|
|
106
|
+
});
|
|
105
107
|
useEffect(() => {
|
|
106
108
|
if (ref.current) {
|
|
107
109
|
return dropTargetForElements({
|
|
@@ -137,7 +137,9 @@ var canMoveToLayout = function canMoveToLayout(api, from, to, tr, moveNodeAtCurs
|
|
|
137
137
|
}
|
|
138
138
|
var $to = tr.doc.resolve(to);
|
|
139
139
|
var allowedParentTypes = [doc, layoutSection];
|
|
140
|
-
if (bodiedSyncBlock &&
|
|
140
|
+
if (bodiedSyncBlock && editorExperiment('platform_synced_block', true) && editorExperiment('platform_synced_block_patch_6', true, {
|
|
141
|
+
exposure: true
|
|
142
|
+
})) {
|
|
141
143
|
allowedParentTypes.push(bodiedSyncBlock);
|
|
142
144
|
}
|
|
143
145
|
|
|
@@ -209,7 +209,9 @@ export var getActiveDropTargetDecorations = function getActiveDropTargetDecorati
|
|
|
209
209
|
}
|
|
210
210
|
var anchorEmitNodeWithPos = rootNodeWithPos;
|
|
211
211
|
if (editorExperiment('advanced_layouts', true)) {
|
|
212
|
-
if (
|
|
212
|
+
if (editorExperiment('platform_synced_block', true) && editorExperiment('platform_synced_block_patch_6', true, {
|
|
213
|
+
exposure: true
|
|
214
|
+
})) {
|
|
213
215
|
var schema = rootNodeWithPos.node.type.schema;
|
|
214
216
|
var layoutSection = schema.nodes.layoutSection;
|
|
215
217
|
var isLayoutSectionChildOfRoot = findChildrenByType(rootNodeWithPos.node, layoutSection, false).length > 0;
|
|
@@ -105,7 +105,9 @@ var HoverZone = function HoverZone(_ref) {
|
|
|
105
105
|
_useActiveAnchorTrack2 = _slicedToArray(_useActiveAnchorTrack, 2),
|
|
106
106
|
_isActive = _useActiveAnchorTrack2[0],
|
|
107
107
|
setActiveAnchor = _useActiveAnchorTrack2[1];
|
|
108
|
-
var isInsideBodiedSyncBlock = parent && parent.type.name === 'bodiedSyncBlock' &&
|
|
108
|
+
var isInsideBodiedSyncBlock = parent && parent.type.name === 'bodiedSyncBlock' && editorExperiment('platform_synced_block', true) && editorExperiment('platform_synced_block_patch_6', true, {
|
|
109
|
+
exposure: true
|
|
110
|
+
});
|
|
109
111
|
useEffect(function () {
|
|
110
112
|
if (ref.current) {
|
|
111
113
|
return dropTargetForElements({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.14",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
57
|
"@atlaskit/primitives": "^18.0.0",
|
|
58
58
|
"@atlaskit/theme": "^22.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^42.0.0",
|
|
60
60
|
"@atlaskit/tokens": "^11.1.0",
|
|
61
61
|
"@atlaskit/tooltip": "^21.0.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"uuid": "^3.1.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@atlaskit/editor-common": "^112.
|
|
70
|
+
"@atlaskit/editor-common": "^112.7.0",
|
|
71
71
|
"react": "^18.2.0",
|
|
72
72
|
"react-dom": "^18.2.0",
|
|
73
73
|
"react-intl-next": "npm:react-intl@^5.18.1"
|