@wordpress/block-editor 15.15.0 → 15.16.1-next.v.202604091042.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-inspector/index.cjs +2 -1
- package/build/components/block-inspector/index.cjs.map +2 -2
- 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/block-visibility/modal.cjs +2 -2
- package/build/components/block-visibility/modal.cjs.map +1 -1
- package/build/components/block-visibility/viewport-visibility-info.cjs +6 -1
- package/build/components/block-visibility/viewport-visibility-info.cjs.map +2 -2
- package/build/components/global-styles/background-panel.cjs +142 -33
- package/build/components/global-styles/background-panel.cjs.map +2 -2
- package/build/components/global-styles/color-panel.cjs +18 -7
- package/build/components/global-styles/color-panel.cjs.map +2 -2
- package/build/components/global-styles/hooks.cjs +8 -4
- package/build/components/global-styles/hooks.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/inspector-controls-tabs/styles-tab.cjs +2 -1
- package/build/components/inspector-controls-tabs/styles-tab.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/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/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/hooks/background.cjs +74 -21
- package/build/hooks/background.cjs.map +3 -3
- package/build/hooks/block-style-variation.cjs +5 -6
- package/build/hooks/block-style-variation.cjs.map +3 -3
- package/build/hooks/cross-origin-isolation.cjs +6 -6
- package/build/hooks/cross-origin-isolation.cjs.map +2 -2
- package/build/hooks/custom-css.cjs +5 -0
- package/build/hooks/custom-css.cjs.map +2 -2
- package/build/hooks/fit-text.cjs +46 -58
- package/build/hooks/fit-text.cjs.map +3 -3
- package/build/hooks/index.cjs +2 -2
- package/build/hooks/index.cjs.map +2 -2
- package/build/hooks/utils.cjs +5 -1
- package/build/hooks/utils.cjs.map +2 -2
- package/build/private-apis.cjs +1 -1
- package/build/private-apis.cjs.map +1 -1
- package/build/store/actions.cjs +8 -12
- package/build/store/actions.cjs.map +2 -2
- package/build/store/private-selectors.cjs +2 -2
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/reducer.cjs +112 -146
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs +14 -15
- 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-inspector/index.mjs +2 -1
- package/build-module/components/block-inspector/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/block-visibility/modal.mjs +2 -2
- package/build-module/components/block-visibility/modal.mjs.map +1 -1
- package/build-module/components/block-visibility/viewport-visibility-info.mjs +6 -1
- package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
- package/build-module/components/global-styles/background-panel.mjs +141 -34
- package/build-module/components/global-styles/background-panel.mjs.map +2 -2
- package/build-module/components/global-styles/color-panel.mjs +17 -7
- package/build-module/components/global-styles/color-panel.mjs.map +2 -2
- package/build-module/components/global-styles/hooks.mjs +8 -4
- package/build-module/components/global-styles/hooks.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/inspector-controls-tabs/styles-tab.mjs +2 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.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/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/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/hooks/background.mjs +76 -22
- package/build-module/hooks/background.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/cross-origin-isolation.mjs +6 -6
- package/build-module/hooks/cross-origin-isolation.mjs.map +2 -2
- package/build-module/hooks/custom-css.mjs +5 -0
- package/build-module/hooks/custom-css.mjs.map +2 -2
- package/build-module/hooks/fit-text.mjs +46 -58
- package/build-module/hooks/fit-text.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/utils.mjs +5 -1
- package/build-module/hooks/utils.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 +8 -12
- package/build-module/store/actions.mjs.map +2 -2
- package/build-module/store/private-selectors.mjs +2 -2
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/reducer.mjs +112 -145
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs +14 -15
- 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/content-rtl.css +2 -2
- package/build-style/content.css +2 -2
- package/build-style/style-rtl.css +35 -14
- package/build-style/style.css +35 -14
- package/package.json +38 -39
- package/src/autocompleters/style.scss +0 -8
- package/src/components/autocomplete/index.js +1 -2
- package/src/components/background-image-control/style.scss +0 -4
- package/src/components/block-draggable/test/helpers.native.js +1 -1
- package/src/components/block-inspector/index.js +1 -0
- 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/block-visibility/viewport-visibility-info.js +8 -1
- package/src/components/fit-text-size-warning/style.scss +1 -5
- package/src/components/global-styles/background-panel.js +157 -11
- package/src/components/global-styles/color-panel.js +23 -7
- package/src/components/global-styles/hooks.js +12 -4
- package/src/components/global-styles/test/background-panel.js +44 -1
- package/src/components/iframe/get-compatibility-styles.js +1 -1
- package/src/components/inserter/media-tab/hooks.js +1 -1
- package/src/components/inspector-controls-tabs/styles-tab.js +1 -0
- package/src/components/link-control/README.md +2 -2
- package/src/components/link-control/search-input.js +1 -1
- package/src/components/link-picker/link-preview.js +2 -1
- 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/use-on-block-drop/index.js +1 -1
- package/src/components/use-paste-styles/index.js +2 -2
- package/src/hooks/background.js +122 -21
- package/src/hooks/background.scss +45 -0
- package/src/hooks/block-style-variation.js +3 -4
- package/src/hooks/cross-origin-isolation.js +6 -6
- package/src/hooks/custom-css.js +6 -0
- package/src/hooks/fit-text.js +73 -83
- package/src/hooks/index.js +1 -1
- package/src/hooks/test/cross-origin-isolation.js +7 -3
- package/src/hooks/utils.js +4 -0
- package/src/private-apis.js +2 -2
- package/src/store/actions.js +9 -16
- package/src/store/private-selectors.js +2 -2
- package/src/store/reducer.js +144 -193
- package/src/store/selectors.js +33 -23
- package/src/store/test/private-selectors.js +107 -71
- package/src/store/test/reducer.js +593 -152
- package/src/store/test/registry-selectors.js +1 -1
- package/src/store/test/selectors.js +345 -262
- package/src/store/utils.js +1 -1
- package/src/style.scss +1 -0
- 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
|
@@ -875,7 +875,7 @@ var canInsertBlockTypeUnmemoized = (state, blockName, rootClientId = null) => {
|
|
|
875
875
|
if (isWithinSection && getBlockName(state, sectionClientId) === "core/block") {
|
|
876
876
|
return false;
|
|
877
877
|
}
|
|
878
|
-
if (isWithinSection && (isParentSectionBlock || blockEditingMode === "contentOnly") && !(0, import_private_selectors.isContainerInsertableToInContentOnlyMode)(
|
|
878
|
+
if (isWithinSection && (isParentSectionBlock || blockEditingMode === "contentOnly" || blockEditingMode === "disabled") && !(0, import_private_selectors.isContainerInsertableToInContentOnlyMode)(
|
|
879
879
|
state,
|
|
880
880
|
blockName,
|
|
881
881
|
rootClientId
|
|
@@ -1005,9 +1005,9 @@ function canRemoveBlock(state, clientId) {
|
|
|
1005
1005
|
if (defaultBlocks.length > 1) {
|
|
1006
1006
|
return true;
|
|
1007
1007
|
}
|
|
1008
|
-
} else {
|
|
1009
1008
|
return false;
|
|
1010
1009
|
}
|
|
1010
|
+
return false;
|
|
1011
1011
|
}
|
|
1012
1012
|
return rootBlockEditingMode !== "disabled";
|
|
1013
1013
|
}
|
|
@@ -1382,7 +1382,7 @@ function getDirectInsertBlock(state, rootClientId = null) {
|
|
|
1382
1382
|
if (!rootClientId) {
|
|
1383
1383
|
return;
|
|
1384
1384
|
}
|
|
1385
|
-
const { defaultBlock, directInsert } = state.blockListSettings
|
|
1385
|
+
const { defaultBlock, directInsert } = state.blockListSettings.get(rootClientId) ?? {};
|
|
1386
1386
|
if (!defaultBlock || !directInsert) {
|
|
1387
1387
|
return;
|
|
1388
1388
|
}
|
|
@@ -1517,7 +1517,7 @@ var __experimentalGetPatternTransformItems = (0, import_data.createRegistrySelec
|
|
|
1517
1517
|
)
|
|
1518
1518
|
);
|
|
1519
1519
|
function getBlockListSettings(state, clientId) {
|
|
1520
|
-
return state.blockListSettings
|
|
1520
|
+
return state.blockListSettings.get(clientId);
|
|
1521
1521
|
}
|
|
1522
1522
|
function getSettings(state) {
|
|
1523
1523
|
return state.settings;
|
|
@@ -1527,15 +1527,14 @@ function isLastBlockChangePersistent(state) {
|
|
|
1527
1527
|
}
|
|
1528
1528
|
var __experimentalGetBlockListSettingsForBlocks = (0, import_data.createSelector)(
|
|
1529
1529
|
(state, clientIds = []) => {
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1530
|
+
const blockListSettingsForBlocks = {};
|
|
1531
|
+
for (const clientId of clientIds) {
|
|
1532
|
+
const settings = getBlockListSettings(state, clientId);
|
|
1533
|
+
if (settings) {
|
|
1534
|
+
blockListSettingsForBlocks[clientId] = settings;
|
|
1533
1535
|
}
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
[clientId]: state.blockListSettings[clientId]
|
|
1537
|
-
};
|
|
1538
|
-
}, {});
|
|
1536
|
+
}
|
|
1537
|
+
return blockListSettingsForBlocks;
|
|
1539
1538
|
},
|
|
1540
1539
|
(state) => [state.blockListSettings]
|
|
1541
1540
|
);
|
|
@@ -1581,7 +1580,7 @@ function isBlockHighlighted(state, clientId) {
|
|
|
1581
1580
|
return state.highlightedBlock === clientId;
|
|
1582
1581
|
}
|
|
1583
1582
|
function areInnerBlocksControlled(state, clientId) {
|
|
1584
|
-
return
|
|
1583
|
+
return state.blocks.controlledInnerBlocks.has(clientId);
|
|
1585
1584
|
}
|
|
1586
1585
|
var __experimentalGetActiveBlockIdByBlockNames = (0, import_data.createSelector)(
|
|
1587
1586
|
(state, validBlockNames) => {
|
|
@@ -1688,8 +1687,8 @@ function getBlockEditingMode(state, clientId = "") {
|
|
|
1688
1687
|
if (state.derivedBlockEditingModes?.has(clientId)) {
|
|
1689
1688
|
return state.derivedBlockEditingModes.get(clientId);
|
|
1690
1689
|
}
|
|
1691
|
-
if (state.blockEditingModes.has(clientId)) {
|
|
1692
|
-
return state.blockEditingModes.get(clientId);
|
|
1690
|
+
if (state.blocks.blockEditingModes.has(clientId)) {
|
|
1691
|
+
return state.blocks.blockEditingModes.get(clientId);
|
|
1693
1692
|
}
|
|
1694
1693
|
return "default";
|
|
1695
1694
|
}
|