@wordpress/block-editor 12.18.0 → 12.18.1
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/build/components/dimensions-tool/aspect-ratio-tool.js +2 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +30 -5
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +9 -7
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +6 -0
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/hooks/dimensions.js +71 -1
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/index.js +2 -2
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/style.js +3 -0
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/utils.js +3 -2
- package/build/hooks/utils.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js +2 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +30 -5
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +9 -7
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +6 -0
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/hooks/dimensions.js +70 -2
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/index.js +2 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/style.js +3 -0
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/utils.js +3 -2
- package/build-module/hooks/utils.js.map +1 -1
- package/package.json +4 -4
- package/src/components/dimensions-tool/aspect-ratio-tool.js +4 -1
- package/src/components/global-styles/dimensions-panel.js +50 -1
- package/src/components/global-styles/hooks.js +9 -6
- package/src/components/global-styles/use-global-styles-output.js +6 -0
- package/src/hooks/dimensions.js +74 -3
- package/src/hooks/index.js +2 -0
- package/src/hooks/style.js +4 -0
- package/src/hooks/utils.js +4 -0
package/src/hooks/style.js
CHANGED
|
@@ -133,10 +133,14 @@ const skipSerializationPathsEdit = {
|
|
|
133
133
|
*/
|
|
134
134
|
const skipSerializationPathsSave = {
|
|
135
135
|
...skipSerializationPathsEdit,
|
|
136
|
+
[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: [
|
|
137
|
+
`${ DIMENSIONS_SUPPORT_KEY }.aspectRatio`,
|
|
138
|
+
], // Skip serialization of aspect ratio in save mode.
|
|
136
139
|
[ `${ BACKGROUND_SUPPORT_KEY }` ]: [ BACKGROUND_SUPPORT_KEY ], // Skip serialization of background support in save mode.
|
|
137
140
|
};
|
|
138
141
|
|
|
139
142
|
const skipSerializationPathsSaveChecks = {
|
|
143
|
+
[ `${ DIMENSIONS_SUPPORT_KEY }.aspectRatio` ]: true,
|
|
140
144
|
[ `${ BACKGROUND_SUPPORT_KEY }` ]: true,
|
|
141
145
|
};
|
|
142
146
|
|
package/src/hooks/utils.js
CHANGED
|
@@ -195,6 +195,7 @@ export function useBlockSettings( name, parentLayout ) {
|
|
|
195
195
|
blockGap,
|
|
196
196
|
spacingSizes,
|
|
197
197
|
units,
|
|
198
|
+
aspectRatio,
|
|
198
199
|
minHeight,
|
|
199
200
|
layout,
|
|
200
201
|
borderColor,
|
|
@@ -244,6 +245,7 @@ export function useBlockSettings( name, parentLayout ) {
|
|
|
244
245
|
'spacing.blockGap',
|
|
245
246
|
'spacing.spacingSizes',
|
|
246
247
|
'spacing.units',
|
|
248
|
+
'dimensions.aspectRatio',
|
|
247
249
|
'dimensions.minHeight',
|
|
248
250
|
'layout',
|
|
249
251
|
'border.color',
|
|
@@ -343,6 +345,7 @@ export function useBlockSettings( name, parentLayout ) {
|
|
|
343
345
|
width: borderWidth,
|
|
344
346
|
},
|
|
345
347
|
dimensions: {
|
|
348
|
+
aspectRatio,
|
|
346
349
|
minHeight,
|
|
347
350
|
},
|
|
348
351
|
layout,
|
|
@@ -371,6 +374,7 @@ export function useBlockSettings( name, parentLayout ) {
|
|
|
371
374
|
blockGap,
|
|
372
375
|
spacingSizes,
|
|
373
376
|
units,
|
|
377
|
+
aspectRatio,
|
|
374
378
|
minHeight,
|
|
375
379
|
layout,
|
|
376
380
|
parentLayout,
|