@wordpress/block-editor 15.16.0 → 15.17.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 +2 -0
- package/build/components/autocomplete/index.cjs +1 -2
- package/build/components/autocomplete/index.cjs.map +3 -3
- package/build/components/block-list/block-crash-warning.cjs +4 -2
- package/build/components/block-list/block-crash-warning.cjs.map +2 -2
- package/build/components/block-list/block-html.cjs +6 -2
- package/build/components/block-list/block-html.cjs.map +2 -2
- package/build/components/block-mover/button.cjs +4 -3
- package/build/components/block-mover/button.cjs.map +2 -2
- package/build/components/block-mover/index.cjs +1 -8
- package/build/components/block-mover/index.cjs.map +2 -2
- package/build/components/copy-handler/index.cjs.map +2 -2
- package/build/components/iframe/get-compatibility-styles.cjs +1 -1
- package/build/components/iframe/get-compatibility-styles.cjs.map +2 -2
- package/build/components/inserter/media-tab/hooks.cjs +1 -1
- package/build/components/inserter/media-tab/hooks.cjs.map +2 -2
- package/build/components/link-control/link-preview.cjs +3 -1
- package/build/components/link-control/link-preview.cjs.map +2 -2
- package/build/components/link-control/search-input.cjs +1 -1
- package/build/components/link-control/search-input.cjs.map +2 -2
- package/build/components/link-picker/link-preview.cjs +2 -1
- package/build/components/link-picker/link-preview.cjs.map +3 -3
- package/build/components/preset-input-control/index.cjs +7 -4
- package/build/components/preset-input-control/index.cjs.map +2 -2
- package/build/components/rich-text/event-listeners/index.cjs.map +2 -2
- package/build/components/rich-text/index.cjs +1 -1
- package/build/components/rich-text/index.cjs.map +2 -2
- package/build/components/rich-text/input-event.cjs +3 -3
- package/build/components/rich-text/input-event.cjs.map +2 -2
- package/build/components/spacing-sizes-control/utils.cjs +1 -1
- package/build/components/spacing-sizes-control/utils.cjs.map +2 -2
- package/build/components/use-on-block-drop/index.cjs +1 -1
- package/build/components/use-on-block-drop/index.cjs.map +2 -2
- package/build/components/use-paste-styles/index.cjs +2 -2
- package/build/components/use-paste-styles/index.cjs.map +2 -2
- package/build/components/writing-flow/use-selection-observer.cjs +23 -1
- package/build/components/writing-flow/use-selection-observer.cjs.map +2 -2
- package/build/hooks/block-style-variation.cjs +5 -6
- package/build/hooks/block-style-variation.cjs.map +3 -3
- package/build/hooks/index.cjs +2 -2
- package/build/hooks/index.cjs.map +2 -2
- package/build/hooks/style.cjs +54 -52
- package/build/hooks/style.cjs.map +2 -2
- package/build/private-apis.cjs +1 -1
- package/build/private-apis.cjs.map +1 -1
- package/build/store/actions.cjs +0 -8
- package/build/store/actions.cjs.map +2 -2
- package/build/store/reducer.cjs +52 -53
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs +12 -13
- package/build/store/selectors.cjs.map +2 -2
- package/build/store/utils.cjs +1 -1
- package/build/store/utils.cjs.map +2 -2
- package/build/utils/pasting.cjs +1 -1
- package/build/utils/pasting.cjs.map +2 -2
- package/build-module/components/autocomplete/index.mjs +1 -2
- package/build-module/components/autocomplete/index.mjs.map +2 -2
- package/build-module/components/block-list/block-crash-warning.mjs +4 -2
- package/build-module/components/block-list/block-crash-warning.mjs.map +2 -2
- package/build-module/components/block-list/block-html.mjs +7 -3
- package/build-module/components/block-list/block-html.mjs.map +2 -2
- package/build-module/components/block-mover/button.mjs +4 -3
- package/build-module/components/block-mover/button.mjs.map +2 -2
- package/build-module/components/block-mover/index.mjs +1 -8
- package/build-module/components/block-mover/index.mjs.map +2 -2
- package/build-module/components/copy-handler/index.mjs.map +2 -2
- package/build-module/components/iframe/get-compatibility-styles.mjs +1 -1
- package/build-module/components/iframe/get-compatibility-styles.mjs.map +2 -2
- package/build-module/components/inserter/media-tab/hooks.mjs +1 -1
- package/build-module/components/inserter/media-tab/hooks.mjs.map +2 -2
- package/build-module/components/link-control/link-preview.mjs +3 -1
- package/build-module/components/link-control/link-preview.mjs.map +2 -2
- package/build-module/components/link-control/search-input.mjs +1 -1
- package/build-module/components/link-control/search-input.mjs.map +2 -2
- package/build-module/components/link-picker/link-preview.mjs +2 -1
- package/build-module/components/link-picker/link-preview.mjs.map +2 -2
- package/build-module/components/preset-input-control/index.mjs +7 -4
- package/build-module/components/preset-input-control/index.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/index.mjs.map +2 -2
- package/build-module/components/rich-text/index.mjs +2 -2
- package/build-module/components/rich-text/index.mjs.map +2 -2
- package/build-module/components/rich-text/input-event.mjs +2 -2
- package/build-module/components/rich-text/input-event.mjs.map +2 -2
- package/build-module/components/spacing-sizes-control/utils.mjs +1 -1
- package/build-module/components/spacing-sizes-control/utils.mjs.map +2 -2
- package/build-module/components/use-on-block-drop/index.mjs +1 -1
- package/build-module/components/use-on-block-drop/index.mjs.map +2 -2
- package/build-module/components/use-paste-styles/index.mjs +2 -2
- package/build-module/components/use-paste-styles/index.mjs.map +2 -2
- package/build-module/components/writing-flow/use-selection-observer.mjs +23 -1
- package/build-module/components/writing-flow/use-selection-observer.mjs.map +2 -2
- package/build-module/hooks/block-style-variation.mjs +4 -5
- package/build-module/hooks/block-style-variation.mjs.map +2 -2
- package/build-module/hooks/index.mjs +2 -2
- package/build-module/hooks/index.mjs.map +2 -2
- package/build-module/hooks/style.mjs +54 -52
- package/build-module/hooks/style.mjs.map +2 -2
- package/build-module/private-apis.mjs +2 -2
- package/build-module/private-apis.mjs.map +1 -1
- package/build-module/store/actions.mjs +0 -8
- package/build-module/store/actions.mjs.map +2 -2
- package/build-module/store/reducer.mjs +52 -53
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs +12 -13
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-module/store/utils.mjs +1 -1
- package/build-module/store/utils.mjs.map +2 -2
- package/build-module/utils/pasting.mjs +1 -1
- package/build-module/utils/pasting.mjs.map +2 -2
- package/build-style/style-rtl.css +0 -7
- package/build-style/style.css +0 -7
- package/package.json +38 -39
- package/src/autocompleters/style.scss +0 -8
- package/src/components/autocomplete/index.js +1 -2
- package/src/components/block-draggable/test/helpers.native.js +1 -1
- package/src/components/block-list/block-crash-warning.js +3 -1
- package/src/components/block-list/block-crash-warning.native.js +3 -1
- package/src/components/block-list/block-html.js +13 -3
- package/src/components/block-mover/button.js +7 -4
- package/src/components/block-mover/index.js +1 -8
- package/src/components/copy-handler/index.js +1 -0
- package/src/components/iframe/get-compatibility-styles.js +1 -1
- package/src/components/inserter/media-tab/hooks.js +1 -1
- package/src/components/link-control/README.md +2 -2
- package/src/components/link-control/link-preview.js +3 -1
- package/src/components/link-control/search-input.js +1 -1
- package/src/components/link-picker/link-preview.js +2 -1
- package/src/components/preset-input-control/index.js +10 -4
- package/src/components/preset-input-control/test/index.js +70 -0
- package/src/components/rich-text/event-listeners/index.js +1 -0
- package/src/components/rich-text/index.js +1 -1
- package/src/components/rich-text/index.native.js +1 -1
- package/src/components/rich-text/input-event.js +1 -1
- package/src/components/rich-text/input-event.native.js +1 -1
- package/src/components/rich-text/native/index.native.js +18 -17
- package/src/components/spacing-sizes-control/utils.js +1 -1
- package/src/components/use-on-block-drop/index.js +1 -1
- package/src/components/use-paste-styles/index.js +2 -2
- package/src/components/writing-flow/use-selection-observer.js +39 -1
- package/src/hooks/block-style-variation.js +3 -4
- package/src/hooks/index.js +1 -1
- package/src/hooks/style.js +75 -61
- package/src/private-apis.js +2 -2
- package/src/store/actions.js +0 -8
- package/src/store/reducer.js +62 -67
- package/src/store/selectors.js +31 -21
- package/src/store/test/private-selectors.js +44 -41
- package/src/store/test/reducer.js +159 -88
- package/src/store/test/registry-selectors.js +1 -1
- package/src/store/test/selectors.js +265 -200
- package/src/store/utils.js +1 -1
- package/src/utils/pasting.js +1 -1
- package/build/autocompleters/link.cjs +0 -81
- package/build/autocompleters/link.cjs.map +0 -7
- package/build-module/autocompleters/link.mjs +0 -50
- package/build-module/autocompleters/link.mjs.map +0 -7
- package/src/autocompleters/link.js +0 -63
|
@@ -757,7 +757,7 @@ var canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) => {
|
|
|
757
757
|
if (isWithinSection && getBlockName(state, sectionClientId) === "core/block") {
|
|
758
758
|
return false;
|
|
759
759
|
}
|
|
760
|
-
if (isWithinSection && (isParentSectionBlock || blockEditingMode === "contentOnly") && !isContainerInsertableToInContentOnlyMode(
|
|
760
|
+
if (isWithinSection && (isParentSectionBlock || blockEditingMode === "contentOnly" || blockEditingMode === "disabled") && !isContainerInsertableToInContentOnlyMode(
|
|
761
761
|
state,
|
|
762
762
|
blockName,
|
|
763
763
|
rootClientId
|
|
@@ -887,9 +887,9 @@ function canRemoveBlock(state, clientId) {
|
|
|
887
887
|
if (defaultBlocks.length > 1) {
|
|
888
888
|
return true;
|
|
889
889
|
}
|
|
890
|
-
} else {
|
|
891
890
|
return false;
|
|
892
891
|
}
|
|
892
|
+
return false;
|
|
893
893
|
}
|
|
894
894
|
return rootBlockEditingMode !== "disabled";
|
|
895
895
|
}
|
|
@@ -1264,7 +1264,7 @@ function getDirectInsertBlock(state, rootClientId = null) {
|
|
|
1264
1264
|
if (!rootClientId) {
|
|
1265
1265
|
return;
|
|
1266
1266
|
}
|
|
1267
|
-
const { defaultBlock, directInsert } = state.blockListSettings
|
|
1267
|
+
const { defaultBlock, directInsert } = state.blockListSettings.get(rootClientId) ?? {};
|
|
1268
1268
|
if (!defaultBlock || !directInsert) {
|
|
1269
1269
|
return;
|
|
1270
1270
|
}
|
|
@@ -1399,7 +1399,7 @@ var __experimentalGetPatternTransformItems = createRegistrySelector(
|
|
|
1399
1399
|
)
|
|
1400
1400
|
);
|
|
1401
1401
|
function getBlockListSettings(state, clientId) {
|
|
1402
|
-
return state.blockListSettings
|
|
1402
|
+
return state.blockListSettings.get(clientId);
|
|
1403
1403
|
}
|
|
1404
1404
|
function getSettings(state) {
|
|
1405
1405
|
return state.settings;
|
|
@@ -1409,15 +1409,14 @@ function isLastBlockChangePersistent(state) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
var __experimentalGetBlockListSettingsForBlocks = createSelector(
|
|
1411
1411
|
(state, clientIds = []) => {
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1412
|
+
const blockListSettingsForBlocks = {};
|
|
1413
|
+
for (const clientId of clientIds) {
|
|
1414
|
+
const settings = getBlockListSettings(state, clientId);
|
|
1415
|
+
if (settings) {
|
|
1416
|
+
blockListSettingsForBlocks[clientId] = settings;
|
|
1415
1417
|
}
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
[clientId]: state.blockListSettings[clientId]
|
|
1419
|
-
};
|
|
1420
|
-
}, {});
|
|
1418
|
+
}
|
|
1419
|
+
return blockListSettingsForBlocks;
|
|
1421
1420
|
},
|
|
1422
1421
|
(state) => [state.blockListSettings]
|
|
1423
1422
|
);
|
|
@@ -1463,7 +1462,7 @@ function isBlockHighlighted(state, clientId) {
|
|
|
1463
1462
|
return state.highlightedBlock === clientId;
|
|
1464
1463
|
}
|
|
1465
1464
|
function areInnerBlocksControlled(state, clientId) {
|
|
1466
|
-
return
|
|
1465
|
+
return state.blocks.controlledInnerBlocks.has(clientId);
|
|
1467
1466
|
}
|
|
1468
1467
|
var __experimentalGetActiveBlockIdByBlockNames = createSelector(
|
|
1469
1468
|
(state, validBlockNames) => {
|