@wordpress/block-editor 13.0.5 → 13.0.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/build/autocompleters/block.js +1 -1
- package/build/autocompleters/block.js.map +1 -1
- package/build/components/block-list/use-block-props/use-block-refs.js +9 -2
- package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build/components/block-toolbar/shuffle.js +1 -1
- package/build/components/block-toolbar/shuffle.js.map +1 -1
- package/build/components/global-styles/hooks.js +5 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +52 -8
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/layouts/constrained.js +6 -2
- package/build/layouts/constrained.js.map +1 -1
- package/build/store/private-selectors.js +6 -7
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js +5 -28
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +36 -0
- package/build/store/utils.js.map +1 -1
- package/build-module/autocompleters/block.js +1 -1
- package/build-module/autocompleters/block.js.map +1 -1
- package/build-module/components/block-list/use-block-props/use-block-refs.js +11 -4
- package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
- package/build-module/components/block-toolbar/shuffle.js +1 -1
- package/build-module/components/block-toolbar/shuffle.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +5 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +52 -8
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/layouts/constrained.js +6 -2
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/store/private-selectors.js +7 -8
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js +7 -30
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +35 -0
- package/build-module/store/utils.js.map +1 -1
- package/package.json +3 -3
- package/src/autocompleters/block.js +2 -1
- package/src/components/block-list/use-block-props/use-block-refs.js +19 -3
- package/src/components/block-toolbar/shuffle.js +2 -1
- package/src/components/global-styles/hooks.js +5 -1
- package/src/components/global-styles/test/use-global-styles-output.js +18 -8
- package/src/components/global-styles/use-global-styles-output.js +57 -8
- package/src/layouts/constrained.js +10 -2
- package/src/store/private-selectors.js +5 -5
- package/src/store/selectors.js +9 -40
- package/src/store/utils.js +38 -0
- package/src/utils/test/transform-styles.js +49 -0
|
@@ -125,6 +125,21 @@ describe( 'transformStyles', () => {
|
|
|
125
125
|
expect( output ).toMatchSnapshot();
|
|
126
126
|
} );
|
|
127
127
|
|
|
128
|
+
it( `should not try to replace 'body' in the middle of a classname`, () => {
|
|
129
|
+
const prefix = '.my-namespace';
|
|
130
|
+
const input = `.has-body-text { color: red; }`;
|
|
131
|
+
const output = transformStyles(
|
|
132
|
+
[
|
|
133
|
+
{
|
|
134
|
+
css: input,
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
prefix
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
expect( output ).toEqual( [ `${ prefix } ${ input }` ] );
|
|
141
|
+
} );
|
|
142
|
+
|
|
128
143
|
it( 'should ignore keyframes', () => {
|
|
129
144
|
const input = `
|
|
130
145
|
@keyframes edit-post__fade-in-animation {
|
|
@@ -210,6 +225,40 @@ describe( 'transformStyles', () => {
|
|
|
210
225
|
|
|
211
226
|
expect( output ).toMatchSnapshot();
|
|
212
227
|
} );
|
|
228
|
+
|
|
229
|
+
it( 'should not try to wrap items within `:where` selectors', () => {
|
|
230
|
+
const input = `:where(.wp-element-button:active, .wp-block-button__link:active) { color: blue; }`;
|
|
231
|
+
const prefix = '.my-namespace';
|
|
232
|
+
const expected = [ `${ prefix } ${ input }` ];
|
|
233
|
+
|
|
234
|
+
const output = transformStyles(
|
|
235
|
+
[
|
|
236
|
+
{
|
|
237
|
+
css: input,
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
prefix
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
expect( output ).toEqual( expected );
|
|
244
|
+
} );
|
|
245
|
+
|
|
246
|
+
it( 'should not try to prefix pseudo elements on `:where` selectors', () => {
|
|
247
|
+
const input = `:where(.wp-element-button, .wp-block-button__link)::before { color: blue; }`;
|
|
248
|
+
const prefix = '.my-namespace';
|
|
249
|
+
const expected = [ `${ prefix } ${ input }` ];
|
|
250
|
+
|
|
251
|
+
const output = transformStyles(
|
|
252
|
+
[
|
|
253
|
+
{
|
|
254
|
+
css: input,
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
prefix
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
expect( output ).toEqual( expected );
|
|
261
|
+
} );
|
|
213
262
|
} );
|
|
214
263
|
|
|
215
264
|
it( 'should not break with data urls', () => {
|