@wordpress/block-editor 14.3.5 → 14.3.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/README.md +6 -2
- package/build/components/block-list/block.js +0 -3
- package/build/components/block-list/block.js.map +1 -1
- package/build/components/block-list/use-block-props/index.js +1 -4
- package/build/components/block-list/use-block-props/index.js.map +1 -1
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
- package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
- package/build/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
- package/build/components/block-list/zoom-out-separator.js +10 -7
- package/build/components/block-list/zoom-out-separator.js.map +1 -1
- package/build/components/block-popover/index.js +1 -1
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/block-toolbar/index.js +28 -16
- package/build/components/block-toolbar/index.js.map +1 -1
- package/build/components/block-toolbar/use-has-block-toolbar.js +3 -3
- package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build/components/block-tools/index.js +1 -6
- package/build/components/block-tools/index.js.map +1 -1
- package/build/components/block-tools/use-show-block-tools.js +4 -6
- package/build/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build/components/block-tools/zoom-out-mode-inserters.js +22 -36
- package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build/components/iframe/index.js +45 -10
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/inserter/block-patterns-tab/index.js +4 -0
- package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build/components/inserter/hooks/use-insertion-point.js +16 -4
- package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build/components/inserter/media-tab/media-tab.js +4 -0
- package/build/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build/components/inserter/menu.js +8 -2
- package/build/components/inserter/menu.js.map +1 -1
- package/build/components/tool-selector/index.js +5 -1
- package/build/components/tool-selector/index.js.map +1 -1
- package/build/components/use-resize-canvas/index.js +1 -2
- package/build/components/use-resize-canvas/index.js.map +1 -1
- package/build/hooks/block-bindings.js +12 -1
- package/build/hooks/block-bindings.js.map +1 -1
- package/build/hooks/grid-visualizer.js +13 -11
- package/build/hooks/grid-visualizer.js.map +1 -1
- package/build/hooks/layout-child.js +41 -3
- package/build/hooks/layout-child.js.map +1 -1
- package/build/hooks/use-zoom-out.js +24 -16
- package/build/hooks/use-zoom-out.js.map +1 -1
- package/build/private-apis.js +2 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/private-selectors.js +37 -2
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js +15 -8
- package/build/store/selectors.js.map +1 -1
- package/build/utils/block-bindings.js +9 -6
- package/build/utils/block-bindings.js.map +1 -1
- package/build-module/components/block-list/block.js +0 -3
- package/build-module/components/block-list/block.js.map +1 -1
- package/build-module/components/block-list/use-block-props/index.js +1 -4
- package/build-module/components/block-list/use-block-props/index.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
- package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js +9 -12
- package/build-module/components/block-list/use-block-props/use-zoom-out-mode-exit.js.map +1 -1
- package/build-module/components/block-list/zoom-out-separator.js +10 -7
- package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
- package/build-module/components/block-popover/index.js +1 -1
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/block-toolbar/index.js +30 -18
- package/build-module/components/block-toolbar/index.js.map +1 -1
- package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -3
- package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
- package/build-module/components/block-tools/index.js +1 -6
- package/build-module/components/block-tools/index.js.map +1 -1
- package/build-module/components/block-tools/use-show-block-tools.js +4 -6
- package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
- package/build-module/components/block-tools/zoom-out-mode-inserters.js +22 -36
- package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
- package/build-module/components/iframe/index.js +45 -10
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/inserter/block-patterns-tab/index.js +5 -1
- package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
- package/build-module/components/inserter/hooks/use-insertion-point.js +16 -4
- package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
- package/build-module/components/inserter/media-tab/media-tab.js +5 -1
- package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
- package/build-module/components/inserter/menu.js +8 -2
- package/build-module/components/inserter/menu.js.map +1 -1
- package/build-module/components/tool-selector/index.js +5 -1
- package/build-module/components/tool-selector/index.js.map +1 -1
- package/build-module/components/use-resize-canvas/index.js +1 -2
- package/build-module/components/use-resize-canvas/index.js.map +1 -1
- package/build-module/hooks/block-bindings.js +13 -2
- package/build-module/hooks/block-bindings.js.map +1 -1
- package/build-module/hooks/grid-visualizer.js +13 -11
- package/build-module/hooks/grid-visualizer.js.map +1 -1
- package/build-module/hooks/layout-child.js +41 -3
- package/build-module/hooks/layout-child.js.map +1 -1
- package/build-module/hooks/use-zoom-out.js +24 -17
- package/build-module/hooks/use-zoom-out.js.map +1 -1
- package/build-module/private-apis.js +2 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/private-selectors.js +35 -2
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js +15 -8
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/block-bindings.js +9 -6
- package/build-module/utils/block-bindings.js.map +1 -1
- package/build-style/content-rtl.css +19 -26
- package/build-style/content.css +19 -26
- package/build-style/style-rtl.css +36 -21
- package/build-style/style.css +36 -21
- package/package.json +6 -6
- package/src/components/block-canvas/style.scss +1 -0
- package/src/components/block-list/block.js +0 -3
- package/src/components/block-list/content.scss +3 -2
- package/src/components/block-list/use-block-props/index.js +1 -2
- package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +25 -4
- package/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +19 -11
- package/src/components/block-list/zoom-out-separator.js +8 -6
- package/src/components/block-popover/index.js +2 -2
- package/src/components/block-toolbar/index.js +37 -24
- package/src/components/block-toolbar/style.scss +10 -1
- package/src/components/block-toolbar/use-has-block-toolbar.js +19 -28
- package/src/components/block-tools/index.js +0 -9
- package/src/components/block-tools/style.scss +2 -26
- package/src/components/block-tools/use-show-block-tools.js +2 -10
- package/src/components/block-tools/zoom-out-mode-inserters.js +26 -50
- package/src/components/iframe/content.scss +23 -32
- package/src/components/iframe/index.js +60 -13
- package/src/components/iframe/style.scss +18 -0
- package/src/components/inserter/block-patterns-tab/index.js +6 -1
- package/src/components/inserter/hooks/use-insertion-point.js +23 -5
- package/src/components/inserter/media-tab/media-tab.js +6 -1
- package/src/components/inserter/menu.js +12 -1
- package/src/components/inserter/style.scss +6 -0
- package/src/components/list-view/style.scss +9 -0
- package/src/components/rich-text/style.scss +5 -0
- package/src/components/tool-selector/index.js +5 -2
- package/src/components/use-resize-canvas/index.js +1 -3
- package/src/hooks/block-bindings.js +40 -23
- package/src/hooks/grid-visualizer.js +23 -9
- package/src/hooks/layout-child.js +48 -3
- package/src/hooks/use-zoom-out.js +36 -20
- package/src/private-apis.js +2 -0
- package/src/store/private-selectors.js +40 -1
- package/src/store/selectors.js +16 -8
- package/src/style.scss +1 -0
- package/src/utils/block-bindings.js +9 -6
- package/src/utils/test/use-block-bindings-utils.js +174 -0
- package/build/components/block-tools/zoom-out-popover.js +0 -57
- package/build/components/block-tools/zoom-out-popover.js.map +0 -1
- package/build/components/block-tools/zoom-out-toolbar.js +0 -159
- package/build/components/block-tools/zoom-out-toolbar.js.map +0 -1
- package/build-module/components/block-tools/zoom-out-popover.js +0 -48
- package/build-module/components/block-tools/zoom-out-popover.js.map +0 -1
- package/build-module/components/block-tools/zoom-out-toolbar.js +0 -152
- package/build-module/components/block-tools/zoom-out-toolbar.js.map +0 -1
- package/src/components/block-tools/zoom-out-popover.js +0 -46
- package/src/components/block-tools/zoom-out-toolbar.js +0 -167
|
@@ -29,6 +29,8 @@ function isObjectEmpty(object) {
|
|
|
29
29
|
* - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.
|
|
30
30
|
* - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.
|
|
31
31
|
*
|
|
32
|
+
* @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.
|
|
33
|
+
*
|
|
32
34
|
* @return {?WPBlockBindingsUtils} Object containing the block bindings utils.
|
|
33
35
|
*
|
|
34
36
|
* @example
|
|
@@ -59,10 +61,11 @@ function isObjectEmpty(object) {
|
|
|
59
61
|
* removeAllBlockBindings();
|
|
60
62
|
* ```
|
|
61
63
|
*/
|
|
62
|
-
export function useBlockBindingsUtils() {
|
|
64
|
+
export function useBlockBindingsUtils(clientId) {
|
|
63
65
|
const {
|
|
64
|
-
clientId
|
|
66
|
+
clientId: contextClientId
|
|
65
67
|
} = useBlockEditContext();
|
|
68
|
+
const blockClientId = clientId || contextClientId;
|
|
66
69
|
const {
|
|
67
70
|
updateBlockAttributes
|
|
68
71
|
} = useDispatch(blockEditorStore);
|
|
@@ -105,7 +108,7 @@ export function useBlockBindingsUtils() {
|
|
|
105
108
|
bindings: currentBindings,
|
|
106
109
|
...metadata
|
|
107
110
|
} = {}
|
|
108
|
-
} = getBlockAttributes(
|
|
111
|
+
} = getBlockAttributes(blockClientId);
|
|
109
112
|
const newBindings = {
|
|
110
113
|
...currentBindings
|
|
111
114
|
};
|
|
@@ -123,7 +126,7 @@ export function useBlockBindingsUtils() {
|
|
|
123
126
|
if (isObjectEmpty(newMetadata.bindings)) {
|
|
124
127
|
delete newMetadata.bindings;
|
|
125
128
|
}
|
|
126
|
-
updateBlockAttributes(
|
|
129
|
+
updateBlockAttributes(blockClientId, {
|
|
127
130
|
metadata: isObjectEmpty(newMetadata) ? undefined : newMetadata
|
|
128
131
|
});
|
|
129
132
|
};
|
|
@@ -145,8 +148,8 @@ export function useBlockBindingsUtils() {
|
|
|
145
148
|
bindings,
|
|
146
149
|
...metadata
|
|
147
150
|
} = {}
|
|
148
|
-
} = getBlockAttributes(
|
|
149
|
-
updateBlockAttributes(
|
|
151
|
+
} = getBlockAttributes(blockClientId);
|
|
152
|
+
updateBlockAttributes(blockClientId, {
|
|
150
153
|
metadata: isObjectEmpty(metadata) ? undefined : metadata
|
|
151
154
|
});
|
|
152
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","isObjectEmpty","object","Object","keys","length","useBlockBindingsUtils","clientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","bindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils() {\n\tconst { clientId } = useBlockEditContext();\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes(
|
|
1
|
+
{"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","isObjectEmpty","object","Object","keys","length","useBlockBindingsUtils","clientId","contextClientId","blockClientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","bindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @param {?string} clientId Optional block client ID. If not set, it will use the current block client ID from the context.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils( clientId ) {\n\tconst { clientId: contextClientId } = useBlockEditContext();\n\tconst blockClientId = clientId || contextClientId;\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tconst newBindings = { ...currentBindings };\n\n\t\tObject.entries( bindings ).forEach( ( [ attribute, binding ] ) => {\n\t\t\tif ( ! binding && newBindings[ attribute ] ) {\n\t\t\t\tdelete newBindings[ attribute ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewBindings[ attribute ] = binding;\n\t\t} );\n\n\t\tconst newMetadata = {\n\t\t\t...metadata,\n\t\t\tbindings: newBindings,\n\t\t};\n\n\t\tif ( isObjectEmpty( newMetadata.bindings ) ) {\n\t\t\tdelete newMetadata.bindings;\n\t\t}\n\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,\n\t\t} );\n\t};\n\n\t/**\n\t * Removes the bindings property of the `metadata` attribute.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { removeAllBlockBindings } = useBlockBindingsUtils();\n\t * removeAllBlockBindings();\n\t * ```\n\t */\n\tconst removeAllBlockBindings = () => {\n\t\tconst { metadata: { bindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( blockClientId );\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\tmetadata: isObjectEmpty( metadata ) ? undefined : metadata,\n\t\t} );\n\t};\n\n\treturn { updateBlockBindings, removeAllBlockBindings };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;;AAE1D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,SAASC,aAAaA,CAAEC,MAAM,EAAG;EAChC,OAAO,CAAEA,MAAM,IAAIC,MAAM,CAACC,IAAI,CAAEF,MAAO,CAAC,CAACG,MAAM,KAAK,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAEC,QAAQ,EAAG;EACjD,MAAM;IAAEA,QAAQ,EAAEC;EAAgB,CAAC,GAAGR,mBAAmB,CAAC,CAAC;EAC3D,MAAMS,aAAa,GAAGF,QAAQ,IAAIC,eAAe;EACjD,MAAM;IAAEE;EAAsB,CAAC,GAAGd,WAAW,CAAEG,gBAAiB,CAAC;EACjE,MAAM;IAAEY;EAAmB,CAAC,GAAGd,WAAW,CAAC,CAAC,CAACe,MAAM,CAAEb,gBAAiB,CAAC;;EAEvE;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAMc,mBAAmB,GAAKC,QAAQ,IAAM;IAC3C,MAAM;MAAEC,QAAQ,EAAE;QAAED,QAAQ,EAAEE,eAAe;QAAE,GAAGD;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GAClEJ,kBAAkB,CAAEF,aAAc,CAAC;IACpC,MAAMQ,WAAW,GAAG;MAAE,GAAGD;IAAgB,CAAC;IAE1Cb,MAAM,CAACe,OAAO,CAAEJ,QAAS,CAAC,CAACK,OAAO,CAAE,CAAE,CAAEC,SAAS,EAAEC,OAAO,CAAE,KAAM;MACjE,IAAK,CAAEA,OAAO,IAAIJ,WAAW,CAAEG,SAAS,CAAE,EAAG;QAC5C,OAAOH,WAAW,CAAEG,SAAS,CAAE;QAC/B;MACD;MACAH,WAAW,CAAEG,SAAS,CAAE,GAAGC,OAAO;IACnC,CAAE,CAAC;IAEH,MAAMC,WAAW,GAAG;MACnB,GAAGP,QAAQ;MACXD,QAAQ,EAAEG;IACX,CAAC;IAED,IAAKhB,aAAa,CAAEqB,WAAW,CAACR,QAAS,CAAC,EAAG;MAC5C,OAAOQ,WAAW,CAACR,QAAQ;IAC5B;IAEAJ,qBAAqB,CAAED,aAAa,EAAE;MACrCM,QAAQ,EAAEd,aAAa,CAAEqB,WAAY,CAAC,GAAGC,SAAS,GAAGD;IACtD,CAAE,CAAC;EACJ,CAAC;;EAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAME,sBAAsB,GAAGA,CAAA,KAAM;IACpC,MAAM;MAAET,QAAQ,EAAE;QAAED,QAAQ;QAAE,GAAGC;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GACjDJ,kBAAkB,CAAEF,aAAc,CAAC;IACpCC,qBAAqB,CAAED,aAAa,EAAE;MACrCM,QAAQ,EAAEd,aAAa,CAAEc,QAAS,CAAC,GAAGQ,SAAS,GAAGR;IACnD,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAEF,mBAAmB;IAAEW;EAAuB,CAAC;AACvD","ignoreList":[]}
|
|
@@ -500,13 +500,14 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
500
500
|
display: flex;
|
|
501
501
|
align-items: center;
|
|
502
502
|
justify-content: center;
|
|
503
|
+
overflow: hidden;
|
|
503
504
|
font-size: 13px;
|
|
504
505
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
505
506
|
color: #000;
|
|
506
507
|
font-weight: normal;
|
|
507
508
|
}
|
|
508
509
|
.is-zoomed-out .block-editor-block-list__zoom-out-separator {
|
|
509
|
-
font-size: calc(13px
|
|
510
|
+
font-size: calc(13px / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
510
511
|
}
|
|
511
512
|
.block-editor-block-list__zoom-out-separator.is-dragged-over {
|
|
512
513
|
background: #ccc;
|
|
@@ -800,29 +801,12 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
800
801
|
|
|
801
802
|
.block-editor-iframe__body {
|
|
802
803
|
position: relative;
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
.block-editor-iframe__container {
|
|
806
|
-
width: 100%;
|
|
807
|
-
height: 100%;
|
|
808
|
-
overflow-x: hidden;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
.block-editor-iframe__scale-container {
|
|
812
|
-
width: 100%;
|
|
813
|
-
height: 100%;
|
|
814
|
-
display: flex;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
818
|
-
width: var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw);
|
|
819
|
-
margin-right: calc(-1 * (var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2);
|
|
804
|
+
border: 0.01px solid transparent;
|
|
820
805
|
}
|
|
821
806
|
|
|
822
807
|
.block-editor-iframe__html {
|
|
823
|
-
border: 0 solid #ddd;
|
|
824
808
|
transform-origin: top center;
|
|
825
|
-
transition: all
|
|
809
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s, scale 0s, padding 0s;
|
|
826
810
|
}
|
|
827
811
|
@media (prefers-reduced-motion: reduce) {
|
|
828
812
|
.block-editor-iframe__html {
|
|
@@ -830,17 +814,26 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
830
814
|
transition-delay: 0s;
|
|
831
815
|
}
|
|
832
816
|
}
|
|
817
|
+
.block-editor-iframe__html.zoom-out-animation {
|
|
818
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s;
|
|
819
|
+
}
|
|
820
|
+
@media (prefers-reduced-motion: reduce) {
|
|
821
|
+
.block-editor-iframe__html.zoom-out-animation {
|
|
822
|
+
transition-duration: 0s;
|
|
823
|
+
transition-delay: 0s;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
833
826
|
|
|
834
827
|
.block-editor-iframe__html.is-zoomed-out {
|
|
835
|
-
transform: scale(var(--wp-block-editor-iframe-zoom-out-scale));
|
|
828
|
+
transform: translateX(calc(-1*((var(--wp-block-editor-iframe-zoom-out-scale-container-width) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2 / var(--wp-block-editor-iframe-zoom-out-scale))));
|
|
829
|
+
scale: var(--wp-block-editor-iframe-zoom-out-scale);
|
|
836
830
|
background-color: #ddd;
|
|
837
|
-
|
|
838
|
-
|
|
831
|
+
margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)) + 2px));
|
|
832
|
+
padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
833
|
+
padding-bottom: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
839
834
|
}
|
|
840
835
|
.block-editor-iframe__html.is-zoomed-out body {
|
|
841
|
-
min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size))) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
842
|
-
display: flex;
|
|
843
|
-
flex-direction: column;
|
|
836
|
+
min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale))) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
844
837
|
}
|
|
845
838
|
.block-editor-iframe__html.is-zoomed-out body > .is-root-container:not(.wp-block-post-content) {
|
|
846
839
|
flex: 1;
|
package/build-style/content.css
CHANGED
|
@@ -500,13 +500,14 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
500
500
|
display: flex;
|
|
501
501
|
align-items: center;
|
|
502
502
|
justify-content: center;
|
|
503
|
+
overflow: hidden;
|
|
503
504
|
font-size: 13px;
|
|
504
505
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
505
506
|
color: #000;
|
|
506
507
|
font-weight: normal;
|
|
507
508
|
}
|
|
508
509
|
.is-zoomed-out .block-editor-block-list__zoom-out-separator {
|
|
509
|
-
font-size: calc(13px
|
|
510
|
+
font-size: calc(13px / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
510
511
|
}
|
|
511
512
|
.block-editor-block-list__zoom-out-separator.is-dragged-over {
|
|
512
513
|
background: #ccc;
|
|
@@ -800,29 +801,12 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
800
801
|
|
|
801
802
|
.block-editor-iframe__body {
|
|
802
803
|
position: relative;
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
.block-editor-iframe__container {
|
|
806
|
-
width: 100%;
|
|
807
|
-
height: 100%;
|
|
808
|
-
overflow-x: hidden;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
.block-editor-iframe__scale-container {
|
|
812
|
-
width: 100%;
|
|
813
|
-
height: 100%;
|
|
814
|
-
display: flex;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
818
|
-
width: var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw);
|
|
819
|
-
margin-left: calc(-1 * (var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2);
|
|
804
|
+
border: 0.01px solid transparent;
|
|
820
805
|
}
|
|
821
806
|
|
|
822
807
|
.block-editor-iframe__html {
|
|
823
|
-
border: 0 solid #ddd;
|
|
824
808
|
transform-origin: top center;
|
|
825
|
-
transition: all
|
|
809
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s, scale 0s, padding 0s;
|
|
826
810
|
}
|
|
827
811
|
@media (prefers-reduced-motion: reduce) {
|
|
828
812
|
.block-editor-iframe__html {
|
|
@@ -830,17 +814,26 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
830
814
|
transition-delay: 0s;
|
|
831
815
|
}
|
|
832
816
|
}
|
|
817
|
+
.block-editor-iframe__html.zoom-out-animation {
|
|
818
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s;
|
|
819
|
+
}
|
|
820
|
+
@media (prefers-reduced-motion: reduce) {
|
|
821
|
+
.block-editor-iframe__html.zoom-out-animation {
|
|
822
|
+
transition-duration: 0s;
|
|
823
|
+
transition-delay: 0s;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
833
826
|
|
|
834
827
|
.block-editor-iframe__html.is-zoomed-out {
|
|
835
|
-
transform: scale(var(--wp-block-editor-iframe-zoom-out-scale));
|
|
828
|
+
transform: translateX(calc((var(--wp-block-editor-iframe-zoom-out-scale-container-width) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2 / var(--wp-block-editor-iframe-zoom-out-scale)));
|
|
829
|
+
scale: var(--wp-block-editor-iframe-zoom-out-scale);
|
|
836
830
|
background-color: #ddd;
|
|
837
|
-
|
|
838
|
-
|
|
831
|
+
margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)) + 2px));
|
|
832
|
+
padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
833
|
+
padding-bottom: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
839
834
|
}
|
|
840
835
|
.block-editor-iframe__html.is-zoomed-out body {
|
|
841
|
-
min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size))) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
842
|
-
display: flex;
|
|
843
|
-
flex-direction: column;
|
|
836
|
+
min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale))) / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
844
837
|
}
|
|
845
838
|
.block-editor-iframe__html.is-zoomed-out body > .is-root-container:not(.wp-block-post-content) {
|
|
846
839
|
flex: 1;
|
|
@@ -270,7 +270,7 @@ iframe[name=editor-canvas] {
|
|
|
270
270
|
height: 100%;
|
|
271
271
|
display: block;
|
|
272
272
|
background-color: transparent;
|
|
273
|
-
transition: all
|
|
273
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
274
274
|
}
|
|
275
275
|
@media (prefers-reduced-motion: reduce) {
|
|
276
276
|
iframe[name=editor-canvas] {
|
|
@@ -554,25 +554,8 @@ iframe[name=editor-canvas] {
|
|
|
554
554
|
right: 50%;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
.
|
|
558
|
-
|
|
559
|
-
.zoom-out-toolbar .block-editor-block-toolbar-shuffle:focus::before,
|
|
560
|
-
.zoom-out-toolbar .block-selection-button_drag-handle:focus::before {
|
|
561
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
562
|
-
}
|
|
563
|
-
.zoom-out-toolbar .block-editor-block-mover {
|
|
564
|
-
background: none;
|
|
565
|
-
border: none;
|
|
566
|
-
}
|
|
567
|
-
.zoom-out-toolbar .zoom-out-toolbar-button {
|
|
568
|
-
height: 40px;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
572
|
-
visibility: hidden;
|
|
573
|
-
}
|
|
574
|
-
.block-editor-block-tools__zoom-out-mode-inserter-button.is-visible {
|
|
575
|
-
visibility: visible;
|
|
557
|
+
.components-button.block-editor-button-pattern-inserter__button.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
558
|
+
top: -1px;
|
|
576
559
|
}
|
|
577
560
|
|
|
578
561
|
.block-editor-block-lock-modal {
|
|
@@ -1919,6 +1902,22 @@ iframe[name=editor-canvas] {
|
|
|
1919
1902
|
padding: 0;
|
|
1920
1903
|
}
|
|
1921
1904
|
|
|
1905
|
+
.block-editor-iframe__container {
|
|
1906
|
+
width: 100%;
|
|
1907
|
+
height: 100%;
|
|
1908
|
+
overflow-x: hidden;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
.block-editor-iframe__scale-container {
|
|
1912
|
+
height: 100%;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
1916
|
+
width: var(--wp-block-editor-iframe-zoom-out-scale-container-width, 100vw);
|
|
1917
|
+
position: absolute;
|
|
1918
|
+
left: 0;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1922
1921
|
.block-editor-image-size-control {
|
|
1923
1922
|
margin-bottom: 1em;
|
|
1924
1923
|
}
|
|
@@ -2430,6 +2429,14 @@ iframe[name=editor-canvas] {
|
|
|
2430
2429
|
.block-editor-list-view-leaf .block-editor-list-view-block-select-button:hover {
|
|
2431
2430
|
color: var(--wp-admin-theme-color);
|
|
2432
2431
|
}
|
|
2432
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button svg {
|
|
2433
|
+
fill: currentColor;
|
|
2434
|
+
}
|
|
2435
|
+
@media (forced-colors: active) {
|
|
2436
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button svg {
|
|
2437
|
+
fill: CanvasText;
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2433
2440
|
.is-dragging-components-draggable .block-editor-list-view-leaf:not(.is-selected) .block-editor-list-view-block-select-button:hover {
|
|
2434
2441
|
color: inherit;
|
|
2435
2442
|
}
|
|
@@ -3053,10 +3060,14 @@ iframe[name=editor-canvas] {
|
|
|
3053
3060
|
margin-bottom: 8px;
|
|
3054
3061
|
box-shadow: none;
|
|
3055
3062
|
outline: none;
|
|
3063
|
+
border-radius: 2px;
|
|
3056
3064
|
}
|
|
3057
3065
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar {
|
|
3058
3066
|
border-radius: 2px;
|
|
3059
3067
|
}
|
|
3068
|
+
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar-group {
|
|
3069
|
+
background: none;
|
|
3070
|
+
}
|
|
3060
3071
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar__control,
|
|
3061
3072
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-dropdown-menu__toggle {
|
|
3062
3073
|
min-width: 48px;
|
|
@@ -3470,9 +3481,12 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
3470
3481
|
}
|
|
3471
3482
|
.block-editor-block-toolbar > :last-child,
|
|
3472
3483
|
.block-editor-block-toolbar > :last-child .components-toolbar-group,
|
|
3473
|
-
.block-editor-block-toolbar > :last-child .components-toolbar {
|
|
3484
|
+
.block-editor-block-toolbar > :last-child .components-toolbar, .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2), .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar-group, .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar {
|
|
3474
3485
|
border-left: none;
|
|
3475
3486
|
}
|
|
3487
|
+
.block-editor-block-toolbar .components-toolbar-group:empty {
|
|
3488
|
+
display: none;
|
|
3489
|
+
}
|
|
3476
3490
|
|
|
3477
3491
|
.block-editor-block-contextual-toolbar {
|
|
3478
3492
|
position: sticky;
|
|
@@ -3767,6 +3781,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
3767
3781
|
}
|
|
3768
3782
|
|
|
3769
3783
|
.block-editor-inserter__panel-header {
|
|
3784
|
+
position: relative;
|
|
3770
3785
|
display: inline-flex;
|
|
3771
3786
|
align-items: center;
|
|
3772
3787
|
padding: 16px 16px 0;
|
package/build-style/style.css
CHANGED
|
@@ -270,7 +270,7 @@ iframe[name=editor-canvas] {
|
|
|
270
270
|
height: 100%;
|
|
271
271
|
display: block;
|
|
272
272
|
background-color: transparent;
|
|
273
|
-
transition: all
|
|
273
|
+
transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96);
|
|
274
274
|
}
|
|
275
275
|
@media (prefers-reduced-motion: reduce) {
|
|
276
276
|
iframe[name=editor-canvas] {
|
|
@@ -554,25 +554,8 @@ iframe[name=editor-canvas] {
|
|
|
554
554
|
left: 50%;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
.
|
|
558
|
-
|
|
559
|
-
.zoom-out-toolbar .block-editor-block-toolbar-shuffle:focus::before,
|
|
560
|
-
.zoom-out-toolbar .block-selection-button_drag-handle:focus::before {
|
|
561
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
562
|
-
}
|
|
563
|
-
.zoom-out-toolbar .block-editor-block-mover {
|
|
564
|
-
background: none;
|
|
565
|
-
border: none;
|
|
566
|
-
}
|
|
567
|
-
.zoom-out-toolbar .zoom-out-toolbar-button {
|
|
568
|
-
height: 40px;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
572
|
-
visibility: hidden;
|
|
573
|
-
}
|
|
574
|
-
.block-editor-block-tools__zoom-out-mode-inserter-button.is-visible {
|
|
575
|
-
visibility: visible;
|
|
557
|
+
.components-button.block-editor-button-pattern-inserter__button.block-editor-block-tools__zoom-out-mode-inserter-button {
|
|
558
|
+
top: -1px;
|
|
576
559
|
}
|
|
577
560
|
|
|
578
561
|
.block-editor-block-lock-modal {
|
|
@@ -1920,6 +1903,22 @@ iframe[name=editor-canvas] {
|
|
|
1920
1903
|
padding: 0;
|
|
1921
1904
|
}
|
|
1922
1905
|
|
|
1906
|
+
.block-editor-iframe__container {
|
|
1907
|
+
width: 100%;
|
|
1908
|
+
height: 100%;
|
|
1909
|
+
overflow-x: hidden;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
.block-editor-iframe__scale-container {
|
|
1913
|
+
height: 100%;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
.block-editor-iframe__scale-container.is-zoomed-out {
|
|
1917
|
+
width: var(--wp-block-editor-iframe-zoom-out-scale-container-width, 100vw);
|
|
1918
|
+
position: absolute;
|
|
1919
|
+
right: 0;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1923
1922
|
.block-editor-image-size-control {
|
|
1924
1923
|
margin-bottom: 1em;
|
|
1925
1924
|
}
|
|
@@ -2431,6 +2430,14 @@ iframe[name=editor-canvas] {
|
|
|
2431
2430
|
.block-editor-list-view-leaf .block-editor-list-view-block-select-button:hover {
|
|
2432
2431
|
color: var(--wp-admin-theme-color);
|
|
2433
2432
|
}
|
|
2433
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button svg {
|
|
2434
|
+
fill: currentColor;
|
|
2435
|
+
}
|
|
2436
|
+
@media (forced-colors: active) {
|
|
2437
|
+
.block-editor-list-view-leaf .block-editor-list-view-block-select-button svg {
|
|
2438
|
+
fill: CanvasText;
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2434
2441
|
.is-dragging-components-draggable .block-editor-list-view-leaf:not(.is-selected) .block-editor-list-view-block-select-button:hover {
|
|
2435
2442
|
color: inherit;
|
|
2436
2443
|
}
|
|
@@ -3054,10 +3061,14 @@ iframe[name=editor-canvas] {
|
|
|
3054
3061
|
margin-bottom: 8px;
|
|
3055
3062
|
box-shadow: none;
|
|
3056
3063
|
outline: none;
|
|
3064
|
+
border-radius: 2px;
|
|
3057
3065
|
}
|
|
3058
3066
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar {
|
|
3059
3067
|
border-radius: 2px;
|
|
3060
3068
|
}
|
|
3069
|
+
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar-group {
|
|
3070
|
+
background: none;
|
|
3071
|
+
}
|
|
3061
3072
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar__control,
|
|
3062
3073
|
.components-popover.block-editor-rich-text__inline-format-toolbar .components-dropdown-menu__toggle {
|
|
3063
3074
|
min-width: 48px;
|
|
@@ -3471,9 +3482,12 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
3471
3482
|
}
|
|
3472
3483
|
.block-editor-block-toolbar > :last-child,
|
|
3473
3484
|
.block-editor-block-toolbar > :last-child .components-toolbar-group,
|
|
3474
|
-
.block-editor-block-toolbar > :last-child .components-toolbar {
|
|
3485
|
+
.block-editor-block-toolbar > :last-child .components-toolbar, .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2), .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar-group, .block-editor-block-toolbar:has(> :last-child:empty) > :nth-last-child(2) .components-toolbar {
|
|
3475
3486
|
border-right: none;
|
|
3476
3487
|
}
|
|
3488
|
+
.block-editor-block-toolbar .components-toolbar-group:empty {
|
|
3489
|
+
display: none;
|
|
3490
|
+
}
|
|
3477
3491
|
|
|
3478
3492
|
.block-editor-block-contextual-toolbar {
|
|
3479
3493
|
position: sticky;
|
|
@@ -3768,6 +3782,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
3768
3782
|
}
|
|
3769
3783
|
|
|
3770
3784
|
.block-editor-inserter__panel-header {
|
|
3785
|
+
position: relative;
|
|
3771
3786
|
display: inline-flex;
|
|
3772
3787
|
align-items: center;
|
|
3773
3788
|
padding: 16px 16px 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.7",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@wordpress/api-fetch": "^7.8.2",
|
|
41
41
|
"@wordpress/blob": "^4.8.1",
|
|
42
42
|
"@wordpress/block-serialization-default-parser": "^5.8.1",
|
|
43
|
-
"@wordpress/blocks": "^13.8.
|
|
44
|
-
"@wordpress/commands": "^1.8.
|
|
45
|
-
"@wordpress/components": "^28.8.
|
|
43
|
+
"@wordpress/blocks": "^13.8.5",
|
|
44
|
+
"@wordpress/commands": "^1.8.7",
|
|
45
|
+
"@wordpress/components": "^28.8.7",
|
|
46
46
|
"@wordpress/compose": "^7.8.3",
|
|
47
47
|
"@wordpress/data": "^10.8.3",
|
|
48
48
|
"@wordpress/date": "^5.8.2",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@wordpress/keyboard-shortcuts": "^5.8.3",
|
|
59
59
|
"@wordpress/keycodes": "^4.8.2",
|
|
60
60
|
"@wordpress/notices": "^5.8.3",
|
|
61
|
-
"@wordpress/preferences": "^4.8.
|
|
61
|
+
"@wordpress/preferences": "^4.8.7",
|
|
62
62
|
"@wordpress/private-apis": "^1.8.1",
|
|
63
63
|
"@wordpress/rich-text": "^7.8.3",
|
|
64
64
|
"@wordpress/style-engine": "^2.8.1",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "b1ace05ee94f0803e51b205306c19fc706499ede"
|
|
92
92
|
}
|
|
@@ -710,7 +710,6 @@ function BlockListBlockProvider( props ) {
|
|
|
710
710
|
) && hasSelectedInnerBlock( clientId ),
|
|
711
711
|
blockApiVersion: blockType?.apiVersion || 1,
|
|
712
712
|
blockTitle: match?.title || blockType?.title,
|
|
713
|
-
editorMode,
|
|
714
713
|
isSubtreeDisabled:
|
|
715
714
|
blockEditingMode === 'disabled' &&
|
|
716
715
|
isBlockSubtreeDisabled( clientId ),
|
|
@@ -766,7 +765,6 @@ function BlockListBlockProvider( props ) {
|
|
|
766
765
|
themeSupportsLayout,
|
|
767
766
|
isTemporarilyEditingAsBlocks,
|
|
768
767
|
blockEditingMode,
|
|
769
|
-
editorMode,
|
|
770
768
|
mayDisplayControls,
|
|
771
769
|
mayDisplayParentControls,
|
|
772
770
|
index,
|
|
@@ -821,7 +819,6 @@ function BlockListBlockProvider( props ) {
|
|
|
821
819
|
hasOverlay,
|
|
822
820
|
initialPosition,
|
|
823
821
|
blockEditingMode,
|
|
824
|
-
editorMode,
|
|
825
822
|
isHighlighted,
|
|
826
823
|
isMultiSelected,
|
|
827
824
|
isPartiallySelected,
|
|
@@ -464,14 +464,15 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
|
|
|
464
464
|
display: flex;
|
|
465
465
|
align-items: center;
|
|
466
466
|
justify-content: center;
|
|
467
|
+
overflow: hidden;
|
|
467
468
|
font-size: $default-font-size;
|
|
468
469
|
font-family: $default-font;
|
|
469
470
|
color: $black;
|
|
470
471
|
font-weight: normal;
|
|
471
472
|
|
|
472
473
|
.is-zoomed-out & {
|
|
473
|
-
//
|
|
474
|
-
font-size: calc(#{$default-font-size}
|
|
474
|
+
// Maintains an absolute font-size by counter-scaling based on the zoom level.
|
|
475
|
+
font-size: calc(#{$default-font-size} / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
475
476
|
}
|
|
476
477
|
|
|
477
478
|
&.is-dragged-over {
|
|
@@ -86,7 +86,6 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
|
|
|
86
86
|
name,
|
|
87
87
|
blockApiVersion,
|
|
88
88
|
blockTitle,
|
|
89
|
-
editorMode,
|
|
90
89
|
isSelected,
|
|
91
90
|
isSubtreeDisabled,
|
|
92
91
|
hasOverlay,
|
|
@@ -117,7 +116,7 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
|
|
|
117
116
|
useFocusHandler( clientId ),
|
|
118
117
|
useEventHandlers( { clientId, isSelected } ),
|
|
119
118
|
useNavModeExit( clientId ),
|
|
120
|
-
useZoomOutModeExit(
|
|
119
|
+
useZoomOutModeExit(),
|
|
121
120
|
useIsHovered( { clientId } ),
|
|
122
121
|
useIntersectionObserver(),
|
|
123
122
|
useMovingAnimation( { triggerAnimationOnChange: index, clientId } ),
|
|
@@ -10,6 +10,7 @@ import { useRefEffect } from '@wordpress/compose';
|
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
12
|
import { store as blockEditorStore } from '../../../store';
|
|
13
|
+
import { unlock } from '../../../lock-unlock';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Adds block behaviour:
|
|
@@ -20,9 +21,18 @@ import { store as blockEditorStore } from '../../../store';
|
|
|
20
21
|
* @param {string} clientId Block client ID.
|
|
21
22
|
*/
|
|
22
23
|
export function useEventHandlers( { clientId, isSelected } ) {
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const {
|
|
25
|
+
getBlockRootClientId,
|
|
26
|
+
getBlockIndex,
|
|
27
|
+
isZoomOut,
|
|
28
|
+
__unstableGetEditorMode,
|
|
29
|
+
} = unlock( useSelect( blockEditorStore ) );
|
|
30
|
+
const {
|
|
31
|
+
insertAfterBlock,
|
|
32
|
+
removeBlock,
|
|
33
|
+
__unstableSetEditorMode,
|
|
34
|
+
resetZoomLevel,
|
|
35
|
+
} = unlock( useDispatch( blockEditorStore ) );
|
|
26
36
|
|
|
27
37
|
return useRefEffect(
|
|
28
38
|
( node ) => {
|
|
@@ -56,7 +66,14 @@ export function useEventHandlers( { clientId, isSelected } ) {
|
|
|
56
66
|
|
|
57
67
|
event.preventDefault();
|
|
58
68
|
|
|
59
|
-
if (
|
|
69
|
+
if (
|
|
70
|
+
keyCode === ENTER &&
|
|
71
|
+
__unstableGetEditorMode() === 'zoom-out' &&
|
|
72
|
+
isZoomOut()
|
|
73
|
+
) {
|
|
74
|
+
__unstableSetEditorMode( 'edit' );
|
|
75
|
+
resetZoomLevel();
|
|
76
|
+
} else if ( keyCode === ENTER ) {
|
|
60
77
|
insertAfterBlock( clientId );
|
|
61
78
|
} else {
|
|
62
79
|
removeBlock( clientId );
|
|
@@ -88,6 +105,10 @@ export function useEventHandlers( { clientId, isSelected } ) {
|
|
|
88
105
|
getBlockIndex,
|
|
89
106
|
insertAfterBlock,
|
|
90
107
|
removeBlock,
|
|
108
|
+
__unstableGetEditorMode,
|
|
109
|
+
__unstableSetEditorMode,
|
|
110
|
+
isZoomOut,
|
|
111
|
+
resetZoomLevel,
|
|
91
112
|
]
|
|
92
113
|
);
|
|
93
114
|
}
|