@wordpress/block-editor 9.8.0 → 9.8.1-next.957ca95e4c.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/build/components/block-list/block-list-compact.native.js +73 -0
- package/build/components/block-list/block-list-compact.native.js.map +1 -0
- package/build/components/block-list/use-block-props/use-focus-first-element.js +1 -1
- package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build/components/block-popover/index.js +1 -3
- package/build/components/block-popover/index.js.map +1 -1
- package/build/components/colors-gradients/control.js +1 -0
- package/build/components/colors-gradients/control.js.map +1 -1
- package/build/components/inner-blocks/index.native.js +6 -2
- package/build/components/inner-blocks/index.native.js.map +1 -1
- package/build/components/rich-text/index.js +10 -0
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/spacing-sizes-control/spacing-input-control.js +6 -1
- package/build/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
- package/build/components/spacing-sizes-control/utils.js +32 -1
- package/build/components/spacing-sizes-control/utils.js.map +1 -1
- package/build/components/text-decoration-control/index.js +28 -17
- package/build/components/text-decoration-control/index.js.map +1 -1
- package/build/components/text-transform-control/index.js +21 -14
- package/build/components/text-transform-control/index.js.map +1 -1
- package/build/components/writing-flow/index.js +2 -0
- package/build/components/writing-flow/index.js.map +1 -1
- package/build/components/writing-flow/use-select-all.js +7 -10
- package/build/components/writing-flow/use-select-all.js.map +1 -1
- package/build/hooks/align.js +3 -1
- package/build/hooks/align.js.map +1 -1
- package/build/hooks/anchor.js +3 -7
- package/build/hooks/anchor.js.map +1 -1
- package/build/hooks/dimensions.js +6 -6
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/font-appearance.js +2 -1
- package/build/hooks/font-appearance.js.map +1 -1
- package/build/hooks/font-family.js +3 -1
- package/build/hooks/font-family.js.map +1 -1
- package/build/hooks/font-size.js +3 -1
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/gap.js +23 -6
- package/build/hooks/gap.js.map +1 -1
- package/build/hooks/layout.js +3 -1
- package/build/hooks/layout.js.map +1 -1
- package/build/hooks/letter-spacing.js +2 -1
- package/build/hooks/letter-spacing.js.map +1 -1
- package/build/hooks/line-height.js +2 -1
- package/build/hooks/line-height.js.map +1 -1
- package/build/hooks/lock.js +3 -7
- package/build/hooks/lock.js.map +1 -1
- package/build/hooks/text-decoration.js +2 -1
- package/build/hooks/text-decoration.js.map +1 -1
- package/build/hooks/text-transform.js +2 -1
- package/build/hooks/text-transform.js.map +1 -1
- package/build/layouts/constrained.js +12 -2
- package/build/layouts/constrained.js.map +1 -1
- package/build/layouts/flow.js +12 -2
- package/build/layouts/flow.js.map +1 -1
- package/build-module/components/block-list/block-list-compact.native.js +58 -0
- package/build-module/components/block-list/block-list-compact.native.js.map +1 -0
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js +1 -1
- package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
- package/build-module/components/block-popover/index.js +1 -3
- package/build-module/components/block-popover/index.js.map +1 -1
- package/build-module/components/colors-gradients/control.js +1 -0
- package/build-module/components/colors-gradients/control.js.map +1 -1
- package/build-module/components/inner-blocks/index.native.js +5 -2
- package/build-module/components/inner-blocks/index.native.js.map +1 -1
- package/build-module/components/rich-text/index.js +10 -0
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/spacing-sizes-control/spacing-input-control.js +7 -2
- package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
- package/build-module/components/spacing-sizes-control/utils.js +30 -1
- package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
- package/build-module/components/text-decoration-control/index.js +25 -18
- package/build-module/components/text-decoration-control/index.js.map +1 -1
- package/build-module/components/text-transform-control/index.js +19 -15
- package/build-module/components/text-transform-control/index.js.map +1 -1
- package/build-module/components/writing-flow/index.js +2 -0
- package/build-module/components/writing-flow/index.js.map +1 -1
- package/build-module/components/writing-flow/use-select-all.js +7 -10
- package/build-module/components/writing-flow/use-select-all.js.map +1 -1
- package/build-module/hooks/align.js +4 -2
- package/build-module/hooks/align.js.map +1 -1
- package/build-module/hooks/anchor.js +3 -6
- package/build-module/hooks/anchor.js.map +1 -1
- package/build-module/hooks/dimensions.js +6 -6
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/font-appearance.js +2 -1
- package/build-module/hooks/font-appearance.js.map +1 -1
- package/build-module/hooks/font-family.js +3 -1
- package/build-module/hooks/font-family.js.map +1 -1
- package/build-module/hooks/font-size.js +3 -1
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/gap.js +22 -6
- package/build-module/hooks/gap.js.map +1 -1
- package/build-module/hooks/layout.js +4 -2
- package/build-module/hooks/layout.js.map +1 -1
- package/build-module/hooks/letter-spacing.js +2 -1
- package/build-module/hooks/letter-spacing.js.map +1 -1
- package/build-module/hooks/line-height.js +2 -1
- package/build-module/hooks/line-height.js.map +1 -1
- package/build-module/hooks/lock.js +3 -6
- package/build-module/hooks/lock.js.map +1 -1
- package/build-module/hooks/text-decoration.js +2 -1
- package/build-module/hooks/text-decoration.js.map +1 -1
- package/build-module/hooks/text-transform.js +2 -1
- package/build-module/hooks/text-transform.js.map +1 -1
- package/build-module/layouts/constrained.js +13 -3
- package/build-module/layouts/constrained.js.map +1 -1
- package/build-module/layouts/flow.js +13 -3
- package/build-module/layouts/flow.js.map +1 -1
- package/build-style/style-rtl.css +42 -41
- package/build-style/style.css +42 -41
- package/package.json +28 -28
- package/src/components/block-list/block-list-compact.native.js +62 -0
- package/src/components/block-list/style.scss +29 -6
- package/src/components/block-list/use-block-props/use-focus-first-element.js +1 -1
- package/src/components/block-popover/index.js +0 -2
- package/src/components/block-switcher/test/index.js +1 -2
- package/src/components/button-block-appender/style.scss +23 -0
- package/src/components/colors-gradients/control.js +1 -0
- package/src/components/inner-blocks/index.native.js +5 -1
- package/src/components/rich-text/index.js +9 -0
- package/src/components/spacing-sizes-control/spacing-input-control.js +5 -0
- package/src/components/spacing-sizes-control/test/utils.js +26 -0
- package/src/components/spacing-sizes-control/utils.js +36 -9
- package/src/components/text-decoration-control/index.js +41 -30
- package/src/components/text-decoration-control/stories/index.js +37 -0
- package/src/components/text-transform-control/index.js +27 -27
- package/src/components/text-transform-control/stories/index.js +37 -0
- package/src/components/writing-flow/index.js +2 -0
- package/src/components/writing-flow/use-select-all.js +10 -13
- package/src/hooks/align.js +2 -2
- package/src/hooks/anchor.js +1 -6
- package/src/hooks/dimensions.js +7 -8
- package/src/hooks/font-appearance.js +1 -0
- package/src/hooks/font-family.js +2 -0
- package/src/hooks/font-size.js +2 -0
- package/src/hooks/gap.js +43 -25
- package/src/hooks/layout.js +2 -2
- package/src/hooks/letter-spacing.js +1 -0
- package/src/hooks/line-height.js +1 -0
- package/src/hooks/lock.js +1 -6
- package/src/hooks/test/gap.js +16 -22
- package/src/hooks/text-decoration.js +1 -0
- package/src/hooks/text-transform.js +1 -0
- package/src/hooks/typography.scss +0 -6
- package/src/layouts/constrained.js +12 -9
- package/src/layouts/flow.js +12 -10
- package/src/style.scss +0 -2
- package/src/components/text-decoration-control/style.scss +0 -18
- package/src/components/text-transform-control/style.scss +0 -18
|
@@ -15,7 +15,7 @@ import { getCSSRules } from '@wordpress/style-engine';
|
|
|
15
15
|
*/
|
|
16
16
|
import useSetting from '../components/use-setting';
|
|
17
17
|
import { appendSelectors, getBlockGapCSS, getAlignmentsInfo } from './utils';
|
|
18
|
-
import {
|
|
18
|
+
import { getGapCSSValue } from '../hooks/gap';
|
|
19
19
|
import { shouldSkipSerialization } from '../hooks/utils';
|
|
20
20
|
|
|
21
21
|
export default {
|
|
@@ -117,16 +117,19 @@ export default {
|
|
|
117
117
|
layoutDefinitions,
|
|
118
118
|
} ) {
|
|
119
119
|
const { contentSize, wideSize } = layout;
|
|
120
|
-
const blockGapStyleValue =
|
|
121
|
-
|
|
122
|
-
);
|
|
120
|
+
const blockGapStyleValue = getGapCSSValue( style?.spacing?.blockGap );
|
|
121
|
+
|
|
123
122
|
// If a block's block.json skips serialization for spacing or
|
|
124
123
|
// spacing.blockGap, don't apply the user-defined value to the styles.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
let blockGapValue = '';
|
|
125
|
+
if ( ! shouldSkipSerialization( blockName, 'spacing', 'blockGap' ) ) {
|
|
126
|
+
// If an object is provided only use the 'top' value for this kind of gap.
|
|
127
|
+
if ( blockGapStyleValue?.top ) {
|
|
128
|
+
blockGapValue = getGapCSSValue( blockGapStyleValue?.top );
|
|
129
|
+
} else if ( typeof blockGapStyleValue === 'string' ) {
|
|
130
|
+
blockGapValue = getGapCSSValue( blockGapStyleValue );
|
|
131
|
+
}
|
|
132
|
+
}
|
|
130
133
|
|
|
131
134
|
let output =
|
|
132
135
|
!! contentSize || !! wideSize
|
package/src/layouts/flow.js
CHANGED
|
@@ -6,9 +6,8 @@ import { __ } from '@wordpress/i18n';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
9
|
import { getBlockGapCSS, getAlignmentsInfo } from './utils';
|
|
11
|
-
import {
|
|
10
|
+
import { getGapCSSValue } from '../hooks/gap';
|
|
12
11
|
import { shouldSkipSerialization } from '../hooks/utils';
|
|
13
12
|
|
|
14
13
|
export default {
|
|
@@ -27,16 +26,19 @@ export default {
|
|
|
27
26
|
hasBlockGapSupport,
|
|
28
27
|
layoutDefinitions,
|
|
29
28
|
} ) {
|
|
30
|
-
const blockGapStyleValue =
|
|
31
|
-
|
|
32
|
-
);
|
|
29
|
+
const blockGapStyleValue = getGapCSSValue( style?.spacing?.blockGap );
|
|
30
|
+
|
|
33
31
|
// If a block's block.json skips serialization for spacing or
|
|
34
32
|
// spacing.blockGap, don't apply the user-defined value to the styles.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
let blockGapValue = '';
|
|
34
|
+
if ( ! shouldSkipSerialization( blockName, 'spacing', 'blockGap' ) ) {
|
|
35
|
+
// If an object is provided only use the 'top' value for this kind of gap.
|
|
36
|
+
if ( blockGapStyleValue?.top ) {
|
|
37
|
+
blockGapValue = getGapCSSValue( blockGapStyleValue?.top );
|
|
38
|
+
} else if ( typeof blockGapStyleValue === 'string' ) {
|
|
39
|
+
blockGapValue = getGapCSSValue( blockGapStyleValue );
|
|
40
|
+
}
|
|
41
|
+
}
|
|
40
42
|
|
|
41
43
|
let output = '';
|
|
42
44
|
|
package/src/style.scss
CHANGED
|
@@ -46,8 +46,6 @@
|
|
|
46
46
|
@import "./components/responsive-block-control/style.scss";
|
|
47
47
|
@import "./components/rich-text/style.scss";
|
|
48
48
|
@import "./components/skip-to-selected-block/style.scss";
|
|
49
|
-
@import "./components/text-transform-control/style.scss";
|
|
50
|
-
@import "./components/text-decoration-control/style.scss";
|
|
51
49
|
@import "./components/tool-selector/style.scss";
|
|
52
50
|
@import "./components/url-input/style.scss";
|
|
53
51
|
@import "./components/url-popover/style.scss";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.block-editor-text-decoration-control {
|
|
2
|
-
flex: 0 0 50%;
|
|
3
|
-
|
|
4
|
-
legend {
|
|
5
|
-
margin-bottom: 8px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.block-editor-text-decoration-control__buttons {
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
margin-bottom: 24px;
|
|
11
|
-
|
|
12
|
-
.components-button.has-icon {
|
|
13
|
-
min-width: 24px;
|
|
14
|
-
padding: 0;
|
|
15
|
-
margin-right: 4px;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.block-editor-text-transform-control {
|
|
2
|
-
flex: 0 0 50%;
|
|
3
|
-
|
|
4
|
-
legend {
|
|
5
|
-
margin-bottom: 8px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.block-editor-text-transform-control__buttons {
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
margin-bottom: 24px;
|
|
11
|
-
|
|
12
|
-
.components-button.has-icon {
|
|
13
|
-
min-width: 24px;
|
|
14
|
-
padding: 0;
|
|
15
|
-
margin-right: 4px;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|