@wordpress/block-library 7.13.0 → 7.13.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/columns/transforms.js +10 -1
- package/build/columns/transforms.js.map +1 -1
- package/build/cover/edit/block-controls.js +9 -2
- package/build/cover/edit/block-controls.js.map +1 -1
- package/build/gallery/gap-styles.js +5 -4
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/home-link/index.js +14 -1
- package/build/home-link/index.js.map +1 -1
- package/build/image/edit.js +3 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/use-client-width.js +3 -1
- package/build/image/use-client-width.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/index.native.js +3 -15
- package/build/index.native.js.map +1 -1
- package/build/latest-posts/deprecated.js +14 -1
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/index.js +14 -1
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/deprecated.js +84 -1
- package/build/list/deprecated.js.map +1 -1
- package/build/list/edit.js +153 -134
- package/build/list/edit.js.map +1 -1
- package/build/list/index.js +29 -34
- package/build/list/index.js.map +1 -1
- package/build/list/save.js +1 -5
- package/build/list/save.js.map +1 -1
- package/build/list/{v2/tag-name.js → tag-name.js} +0 -0
- package/build/list/tag-name.js.map +1 -0
- package/build/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
- package/build/list/tag-name.native.js.map +1 -0
- package/build/list/transforms.js +61 -95
- package/build/list/transforms.js.map +1 -1
- package/build/list/{v2/migrate.js → utils.js} +3 -2
- package/build/list/utils.js.map +1 -0
- package/build/list-item/edit.native.js +21 -3
- package/build/list-item/edit.native.js.map +1 -1
- package/build/list-item/hooks/use-copy.js +2 -0
- package/build/list-item/hooks/use-copy.js.map +1 -1
- package/build/list-item/hooks/use-merge.js +0 -1
- package/build/list-item/hooks/use-merge.js.map +1 -1
- package/build/list-item/hooks/use-outdent-list-item.js +0 -1
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/hooks/use-space.js +10 -1
- package/build/list-item/hooks/use-space.js.map +1 -1
- package/build/list-item/index.js +0 -1
- package/build/list-item/index.js.map +1 -1
- package/build/list-item/utils.js +0 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/navigation/edit/index.js +6 -3
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +6 -4
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +4 -15
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/post-excerpt/index.js +4 -2
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-terms/edit.js +0 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/use-post-terms.js +4 -24
- package/build/post-terms/use-post-terms.js.map +1 -1
- package/build/query-no-results/index.js +13 -0
- package/build/query-no-results/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +4 -2
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-title/index.js +1 -0
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +4 -2
- package/build/quote/index.js.map +1 -1
- package/build/term-description/index.js +6 -0
- package/build/term-description/index.js.map +1 -1
- package/build/verse/index.js +1 -0
- package/build/verse/index.js.map +1 -1
- package/build-module/columns/transforms.js +10 -1
- package/build-module/columns/transforms.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +10 -3
- package/build-module/cover/edit/block-controls.js.map +1 -1
- package/build-module/gallery/gap-styles.js +6 -5
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/home-link/index.js +14 -1
- package/build-module/home-link/index.js.map +1 -1
- package/build-module/image/edit.js +4 -2
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/use-client-width.js +3 -1
- package/build-module/image/use-client-width.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +3 -15
- package/build-module/index.native.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +14 -1
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/index.js +14 -1
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/deprecated.js +83 -1
- package/build-module/list/deprecated.js.map +1 -1
- package/build-module/list/edit.js +151 -134
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list/index.js +29 -29
- package/build-module/list/index.js.map +1 -1
- package/build-module/list/save.js +2 -6
- package/build-module/list/save.js.map +1 -1
- package/build-module/list/{v2/tag-name.js → tag-name.js} +0 -0
- package/build-module/list/tag-name.js.map +1 -0
- package/build-module/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
- package/build-module/list/tag-name.native.js.map +1 -0
- package/build-module/list/transforms.js +62 -97
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/{v2/migrate.js → utils.js} +3 -2
- package/build-module/list/utils.js.map +1 -0
- package/build-module/list-item/edit.native.js +19 -3
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/hooks/use-copy.js +2 -0
- package/build-module/list-item/hooks/use-copy.js.map +1 -1
- package/build-module/list-item/hooks/use-merge.js +0 -1
- package/build-module/list-item/hooks/use-merge.js.map +1 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js +0 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/hooks/use-space.js +10 -1
- package/build-module/list-item/hooks/use-space.js.map +1 -1
- package/build-module/list-item/index.js +0 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/list-item/utils.js +0 -1
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/navigation/edit/index.js +5 -3
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +6 -4
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +5 -15
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/post-excerpt/index.js +4 -2
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-terms/edit.js +0 -1
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/use-post-terms.js +5 -25
- package/build-module/post-terms/use-post-terms.js.map +1 -1
- package/build-module/query-no-results/index.js +13 -0
- package/build-module/query-no-results/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +4 -2
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-title/index.js +1 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +4 -2
- package/build-module/quote/index.js.map +1 -1
- package/build-module/term-description/index.js +6 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/verse/index.js +1 -0
- package/build-module/verse/index.js.map +1 -1
- package/build-style/button/style-rtl.css +1 -4
- package/build-style/button/style.css +1 -4
- package/build-style/code/editor-rtl.css +79 -0
- package/build-style/code/editor.css +79 -0
- package/build-style/cover/editor-rtl.css +0 -3
- package/build-style/cover/editor.css +0 -3
- package/build-style/editor-rtl.css +9 -44
- package/build-style/editor.css +9 -44
- package/build-style/group/editor-rtl.css +2 -22
- package/build-style/group/editor.css +2 -22
- package/build-style/navigation/editor-rtl.css +3 -19
- package/build-style/navigation/editor.css +3 -19
- package/build-style/navigation/style-rtl.css +8 -1
- package/build-style/navigation/style.css +8 -1
- package/build-style/style-rtl.css +9 -5
- package/build-style/style.css +9 -5
- package/package.json +28 -28
- package/src/button/style.scss +1 -8
- package/src/code/editor.scss +3 -0
- package/src/columns/transforms.js +17 -3
- package/src/cover/edit/block-controls.js +15 -3
- package/src/cover/editor.scss +0 -4
- package/src/editor.scss +1 -0
- package/src/gallery/gap-styles.js +10 -6
- package/src/gallery/index.php +23 -2
- package/src/group/editor.scss +1 -28
- package/src/home-link/block.json +14 -1
- package/src/image/edit.js +3 -3
- package/src/image/use-client-width.js +1 -1
- package/src/index.js +1 -4
- package/src/index.native.js +2 -13
- package/src/latest-posts/block.json +14 -1
- package/src/list/deprecated.js +71 -1
- package/src/list/edit.js +146 -133
- package/src/list/index.js +25 -24
- package/src/list/save.js +3 -4
- package/src/list/{v2/tag-name.js → tag-name.js} +0 -0
- package/src/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
- package/src/list/test/__snapshots__/edit.native.js.snap +14 -2
- package/src/list/test/edit.native.js +0 -154
- package/src/list/transforms.js +57 -111
- package/src/list/{v2/migrate.js → utils.js} +2 -2
- package/src/list-item/block.json +0 -1
- package/src/list-item/edit.native.js +32 -2
- package/src/list-item/hooks/use-copy.js +2 -0
- package/src/list-item/hooks/use-space.js +10 -2
- package/src/list-item/style.native.scss +8 -0
- package/src/navigation/edit/index.js +14 -4
- package/src/navigation/edit/responsive-wrapper.js +8 -3
- package/src/navigation/edit/unsaved-inner-blocks.js +14 -24
- package/src/navigation/editor.scss +2 -23
- package/src/navigation/index.php +13 -8
- package/src/navigation/style.scss +11 -2
- package/src/post-excerpt/block.json +4 -2
- package/src/post-terms/edit.js +0 -1
- package/src/post-terms/use-post-terms.js +10 -15
- package/src/query-no-results/block.json +13 -0
- package/src/query-pagination-numbers/block.json +4 -2
- package/src/query-title/block.json +1 -0
- package/src/quote/block.json +4 -2
- package/src/term-description/block.json +6 -0
- package/src/verse/block.json +1 -0
- package/build/list/v2/deprecated.js +0 -117
- package/build/list/v2/deprecated.js.map +0 -1
- package/build/list/v2/edit.js +0 -200
- package/build/list/v2/edit.js.map +0 -1
- package/build/list/v2/index.js +0 -36
- package/build/list/v2/index.js.map +0 -1
- package/build/list/v2/migrate.js.map +0 -1
- package/build/list/v2/save.js +0 -34
- package/build/list/v2/save.js.map +0 -1
- package/build/list/v2/tag-name.js.map +0 -1
- package/build/list/v2/tag-name.native.js.map +0 -1
- package/build/list/v2/transforms.js +0 -137
- package/build/list/v2/transforms.js.map +0 -1
- package/build-module/list/v2/deprecated.js +0 -104
- package/build-module/list/v2/deprecated.js.map +0 -1
- package/build-module/list/v2/edit.js +0 -179
- package/build-module/list/v2/edit.js.map +0 -1
- package/build-module/list/v2/index.js +0 -21
- package/build-module/list/v2/index.js.map +0 -1
- package/build-module/list/v2/migrate.js.map +0 -1
- package/build-module/list/v2/save.js +0 -23
- package/build-module/list/v2/save.js.map +0 -1
- package/build-module/list/v2/tag-name.js.map +0 -1
- package/build-module/list/v2/tag-name.native.js.map +0 -1
- package/build-module/list/v2/transforms.js +0 -127
- package/build-module/list/v2/transforms.js.map +0 -1
- package/src/list/test/migrate.js +0 -158
- package/src/list/v2/deprecated.js +0 -89
- package/src/list/v2/edit.js +0 -192
- package/src/list/v2/index.js +0 -22
- package/src/list/v2/save.js +0 -18
- package/src/list/v2/transforms.js +0 -120
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import classnames from 'classnames';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -42,7 +37,6 @@ const ALLOWED_BLOCKS = [
|
|
|
42
37
|
];
|
|
43
38
|
|
|
44
39
|
export default function UnsavedInnerBlocks( {
|
|
45
|
-
blockProps,
|
|
46
40
|
blocks,
|
|
47
41
|
clientId,
|
|
48
42
|
hasSavedUnsavedInnerBlocks,
|
|
@@ -83,12 +77,17 @@ export default function UnsavedInnerBlocks( {
|
|
|
83
77
|
const isDisabled = useContext( Disabled.Context );
|
|
84
78
|
const savingLock = useRef( false );
|
|
85
79
|
|
|
86
|
-
const innerBlocksProps = useInnerBlocksProps(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
const innerBlocksProps = useInnerBlocksProps(
|
|
81
|
+
{
|
|
82
|
+
className: 'wp-block-navigation__container',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
renderAppender: hasSelection ? undefined : false,
|
|
86
|
+
allowedBlocks: ALLOWED_BLOCKS,
|
|
87
|
+
__experimentalDefaultBlock: DEFAULT_BLOCK,
|
|
88
|
+
__experimentalDirectInsert: shouldDirectInsert,
|
|
89
|
+
}
|
|
90
|
+
);
|
|
92
91
|
|
|
93
92
|
const { isSaving, draftNavigationMenus, hasResolvedDraftNavigationMenus } =
|
|
94
93
|
useSelect(
|
|
@@ -172,18 +171,9 @@ export default function UnsavedInnerBlocks( {
|
|
|
172
171
|
const Wrapper = isSaving ? Disabled : 'div';
|
|
173
172
|
|
|
174
173
|
return (
|
|
175
|
-
|
|
176
|
-
<
|
|
177
|
-
className={ classnames(
|
|
178
|
-
'wp-block-navigation__unsaved-changes-overlay',
|
|
179
|
-
{
|
|
180
|
-
'is-saving': isSaving,
|
|
181
|
-
}
|
|
182
|
-
) }
|
|
183
|
-
>
|
|
184
|
-
<div { ...innerBlocksProps } />
|
|
185
|
-
</div>
|
|
174
|
+
<>
|
|
175
|
+
<Wrapper { ...innerBlocksProps } />
|
|
186
176
|
{ isSaving && <Spinner /> }
|
|
187
|
-
|
|
177
|
+
</>
|
|
188
178
|
);
|
|
189
179
|
}
|
|
@@ -290,9 +290,8 @@ $color-control-label-height: 20px;
|
|
|
290
290
|
right: 0;
|
|
291
291
|
bottom: 0;
|
|
292
292
|
left: 0;
|
|
293
|
-
border: $border-width dashed currentColor;
|
|
294
|
-
opacity: 0.4;
|
|
295
293
|
pointer-events: none;
|
|
294
|
+
@include placeholder-style();
|
|
296
295
|
|
|
297
296
|
// Inherit border radius from style variations.
|
|
298
297
|
border-radius: inherit;
|
|
@@ -300,7 +299,6 @@ $color-control-label-height: 20px;
|
|
|
300
299
|
|
|
301
300
|
> svg {
|
|
302
301
|
fill: currentColor;
|
|
303
|
-
opacity: 0.4;
|
|
304
302
|
}
|
|
305
303
|
}
|
|
306
304
|
|
|
@@ -568,21 +566,6 @@ body.editor-styles-wrapper
|
|
|
568
566
|
padding: $grid-unit-10 $grid-unit-15;
|
|
569
567
|
}
|
|
570
568
|
|
|
571
|
-
.wp-block-navigation__unsaved-changes {
|
|
572
|
-
position: relative;
|
|
573
|
-
|
|
574
|
-
.components-spinner {
|
|
575
|
-
position: absolute;
|
|
576
|
-
top: calc(50% - #{$spinner-size} / 2);
|
|
577
|
-
left: calc(50% - #{$spinner-size} / 2);
|
|
578
|
-
|
|
579
|
-
// Delay showing the saving spinner until after 2 seconds.
|
|
580
|
-
// This should ensure it only shows for slow connections.
|
|
581
|
-
opacity: 0;
|
|
582
|
-
animation: 0.5s linear 2s normal forwards fadein;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
569
|
@keyframes fadeouthalf {
|
|
587
570
|
0% {
|
|
588
571
|
opacity: 1;
|
|
@@ -592,11 +575,6 @@ body.editor-styles-wrapper
|
|
|
592
575
|
}
|
|
593
576
|
}
|
|
594
577
|
|
|
595
|
-
.wp-block-navigation__unsaved-changes-overlay.is-saving {
|
|
596
|
-
opacity: 1;
|
|
597
|
-
animation: 0.5s linear 2s normal forwards fadeouthalf;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
578
|
.wp-block-navigation-delete-menu-button {
|
|
601
579
|
width: 100%;
|
|
602
580
|
justify-content: center;
|
|
@@ -606,6 +584,7 @@ body.editor-styles-wrapper
|
|
|
606
584
|
.wp-block-navigation__overlay-menu-preview {
|
|
607
585
|
display: flex;
|
|
608
586
|
align-items: center;
|
|
587
|
+
justify-content: space-between;
|
|
609
588
|
width: 100%;
|
|
610
589
|
background-color: $gray-100;
|
|
611
590
|
padding: 0 $grid-unit-30;
|
package/src/navigation/index.php
CHANGED
|
@@ -610,16 +610,20 @@ function render_block_core_navigation( $attributes, $content, $block ) {
|
|
|
610
610
|
$is_hidden_by_default ? 'always-shown' : '',
|
|
611
611
|
);
|
|
612
612
|
|
|
613
|
-
$
|
|
614
|
-
$
|
|
615
|
-
$toggle_button_content
|
|
613
|
+
$should_display_icon_label = isset( $attributes['hasIcon'] ) && true === $attributes['hasIcon'];
|
|
614
|
+
$toggle_button_icon = '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="4" y="7.5" width="16" height="1.5" /><rect x="4" y="15" width="16" height="1.5" /></svg>';
|
|
615
|
+
$toggle_button_content = $should_display_icon_label ? $toggle_button_icon : __( 'Menu' );
|
|
616
|
+
$toggle_close_button_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>';
|
|
617
|
+
$toggle_close_button_content = $should_display_icon_label ? $toggle_close_button_icon : __( 'Close' );
|
|
618
|
+
$toggle_aria_label_open = $should_display_icon_label ? 'aria-label="' . __( 'Open menu' ) . '"' : ''; // Open button label.
|
|
619
|
+
$toggle_aria_label_close = $should_display_icon_label ? 'aria-label="' . __( 'Close menu' ) . '"' : ''; // Close button label.
|
|
616
620
|
|
|
617
621
|
$responsive_container_markup = sprintf(
|
|
618
|
-
'<button aria-haspopup="true"
|
|
622
|
+
'<button aria-haspopup="true" %3$s class="%6$s" data-micromodal-trigger="%1$s">%9$s</button>
|
|
619
623
|
<div class="%5$s" style="%7$s" id="%1$s">
|
|
620
624
|
<div class="wp-block-navigation__responsive-close" tabindex="-1" data-micromodal-close>
|
|
621
625
|
<div class="wp-block-navigation__responsive-dialog" aria-label="%8$s">
|
|
622
|
-
<button
|
|
626
|
+
<button %4$s data-micromodal-close class="wp-block-navigation__responsive-container-close">%10$s</button>
|
|
623
627
|
<div class="wp-block-navigation__responsive-container-content" id="%1$s-content">
|
|
624
628
|
%2$s
|
|
625
629
|
</div>
|
|
@@ -628,13 +632,14 @@ function render_block_core_navigation( $attributes, $content, $block ) {
|
|
|
628
632
|
</div>',
|
|
629
633
|
esc_attr( $modal_unique_id ),
|
|
630
634
|
$inner_blocks_html,
|
|
631
|
-
|
|
632
|
-
|
|
635
|
+
$toggle_aria_label_open,
|
|
636
|
+
$toggle_aria_label_close,
|
|
633
637
|
esc_attr( implode( ' ', $responsive_container_classes ) ),
|
|
634
638
|
esc_attr( implode( ' ', $open_button_classes ) ),
|
|
635
639
|
safecss_filter_attr( $colors['overlay_inline_styles'] ),
|
|
636
640
|
__( 'Menu' ),
|
|
637
|
-
$toggle_button_content
|
|
641
|
+
$toggle_button_content,
|
|
642
|
+
$toggle_close_button_content
|
|
638
643
|
);
|
|
639
644
|
|
|
640
645
|
return sprintf(
|
|
@@ -468,8 +468,11 @@ button.wp-block-navigation-item__content {
|
|
|
468
468
|
flex-direction: column;
|
|
469
469
|
background-color: inherit;
|
|
470
470
|
|
|
471
|
-
//
|
|
472
|
-
padding: 2rem;
|
|
471
|
+
// Try to inherit any root paddings set, so the X can align to a top-right aligned menu.
|
|
472
|
+
padding-top: var(--wp--style--root--padding-top, 2rem);
|
|
473
|
+
padding-right: var(--wp--style--root--padding-right, 2rem);
|
|
474
|
+
padding-bottom: var(--wp--style--root--padding-bottom, 2rem);
|
|
475
|
+
padding-left: var(--wp--style--root--padding-left, 2rem);
|
|
473
476
|
|
|
474
477
|
// Allow modal to scroll.
|
|
475
478
|
overflow: auto;
|
|
@@ -613,6 +616,7 @@ button.wp-block-navigation-item__content {
|
|
|
613
616
|
border: none;
|
|
614
617
|
margin: 0;
|
|
615
618
|
padding: 0;
|
|
619
|
+
text-transform: inherit;
|
|
616
620
|
|
|
617
621
|
svg {
|
|
618
622
|
fill: currentColor;
|
|
@@ -646,6 +650,11 @@ button.wp-block-navigation-item__content {
|
|
|
646
650
|
.wp-block-navigation__responsive-close {
|
|
647
651
|
width: 100%;
|
|
648
652
|
|
|
653
|
+
// Try to inherit wide-width when defined, so the X can align to a top-right aligned menu.
|
|
654
|
+
max-width: var(--wp--style--global--wide-size, 100%);
|
|
655
|
+
margin-left: auto;
|
|
656
|
+
margin-right: auto;
|
|
657
|
+
|
|
649
658
|
// This element is not keyboard accessible, and is focusable only using the mouse.
|
|
650
659
|
// It is part of the MicroModal library that adds a scrim outside of a modal dialog that is not fullscreen,
|
|
651
660
|
// where clicking that scrim closes the overlay just like the close button.
|
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"typography": {
|
|
38
38
|
"fontSize": true,
|
|
39
39
|
"lineHeight": true,
|
|
40
|
-
"
|
|
40
|
+
"__experimentalFontFamily": true,
|
|
41
41
|
"__experimentalFontWeight": true,
|
|
42
|
-
"
|
|
42
|
+
"__experimentalFontStyle": true,
|
|
43
43
|
"__experimentalTextTransform": true,
|
|
44
|
+
"__experimentalTextDecoration": true,
|
|
45
|
+
"__experimentalLetterSpacing": true,
|
|
44
46
|
"__experimentalDefaultControls": {
|
|
45
47
|
"fontSize": true
|
|
46
48
|
}
|
package/src/post-terms/edit.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
5
5
|
import { useSelect } from '@wordpress/data';
|
|
6
6
|
|
|
7
|
-
export default function usePostTerms( { postId,
|
|
8
|
-
const {
|
|
9
|
-
|
|
7
|
+
export default function usePostTerms( { postId, term } ) {
|
|
8
|
+
const { slug } = term;
|
|
9
|
+
|
|
10
10
|
return useSelect(
|
|
11
11
|
( select ) => {
|
|
12
12
|
const visible = term?.visibility?.publicly_queryable;
|
|
@@ -17,30 +17,25 @@ export default function usePostTerms( { postId, postType, term } ) {
|
|
|
17
17
|
hasPostTerms: false,
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
// Waiting for post terms to be fetched.
|
|
22
|
-
return { isLoading: term?.postTerms?.includes( postType ) };
|
|
23
|
-
}
|
|
24
|
-
if ( ! termIds.length ) {
|
|
25
|
-
return { isLoading: false };
|
|
26
|
-
}
|
|
20
|
+
|
|
27
21
|
const { getEntityRecords, isResolving } = select( coreStore );
|
|
28
22
|
const taxonomyArgs = [
|
|
29
23
|
'taxonomy',
|
|
30
24
|
slug,
|
|
31
25
|
{
|
|
32
|
-
|
|
26
|
+
post: postId,
|
|
27
|
+
per_page: -1,
|
|
33
28
|
context: 'view',
|
|
34
29
|
},
|
|
35
30
|
];
|
|
36
31
|
const terms = getEntityRecords( ...taxonomyArgs );
|
|
37
|
-
|
|
32
|
+
|
|
38
33
|
return {
|
|
39
34
|
postTerms: terms,
|
|
40
|
-
isLoading:
|
|
35
|
+
isLoading: isResolving( 'getEntityRecords', taxonomyArgs ),
|
|
41
36
|
hasPostTerms: !! terms?.length,
|
|
42
37
|
};
|
|
43
38
|
},
|
|
44
|
-
[
|
|
39
|
+
[ postId, term?.visibility?.publicly_queryable ]
|
|
45
40
|
);
|
|
46
41
|
}
|
|
@@ -15,6 +15,19 @@
|
|
|
15
15
|
"color": {
|
|
16
16
|
"gradients": true,
|
|
17
17
|
"link": true
|
|
18
|
+
},
|
|
19
|
+
"typography": {
|
|
20
|
+
"fontSize": true,
|
|
21
|
+
"lineHeight": true,
|
|
22
|
+
"__experimentalFontFamily": true,
|
|
23
|
+
"__experimentalFontWeight": true,
|
|
24
|
+
"__experimentalFontStyle": true,
|
|
25
|
+
"__experimentalTextTransform": true,
|
|
26
|
+
"__experimentalTextDecoration": true,
|
|
27
|
+
"__experimentalLetterSpacing": true,
|
|
28
|
+
"__experimentalDefaultControls": {
|
|
29
|
+
"fontSize": true
|
|
30
|
+
}
|
|
18
31
|
}
|
|
19
32
|
}
|
|
20
33
|
}
|
|
@@ -21,10 +21,12 @@
|
|
|
21
21
|
"typography": {
|
|
22
22
|
"fontSize": true,
|
|
23
23
|
"lineHeight": true,
|
|
24
|
-
"
|
|
24
|
+
"__experimentalFontFamily": true,
|
|
25
25
|
"__experimentalFontWeight": true,
|
|
26
|
-
"
|
|
26
|
+
"__experimentalFontStyle": true,
|
|
27
27
|
"__experimentalTextTransform": true,
|
|
28
|
+
"__experimentalTextDecoration": true,
|
|
29
|
+
"__experimentalLetterSpacing": true,
|
|
28
30
|
"__experimentalDefaultControls": {
|
|
29
31
|
"fontSize": true
|
|
30
32
|
}
|
package/src/quote/block.json
CHANGED
|
@@ -34,10 +34,12 @@
|
|
|
34
34
|
"typography": {
|
|
35
35
|
"fontSize": true,
|
|
36
36
|
"lineHeight": true,
|
|
37
|
-
"
|
|
37
|
+
"__experimentalFontFamily": true,
|
|
38
38
|
"__experimentalFontWeight": true,
|
|
39
|
-
"
|
|
39
|
+
"__experimentalFontStyle": true,
|
|
40
40
|
"__experimentalTextTransform": true,
|
|
41
|
+
"__experimentalTextDecoration": true,
|
|
42
|
+
"__experimentalLetterSpacing": true,
|
|
41
43
|
"__experimentalDefaultControls": {
|
|
42
44
|
"fontSize": true,
|
|
43
45
|
"fontAppearance": true
|
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
"typography": {
|
|
29
29
|
"fontSize": true,
|
|
30
30
|
"lineHeight": true,
|
|
31
|
+
"__experimentalFontFamily": true,
|
|
32
|
+
"__experimentalFontWeight": true,
|
|
33
|
+
"__experimentalFontStyle": true,
|
|
34
|
+
"__experimentalTextTransform": true,
|
|
35
|
+
"__experimentalTextDecoration": true,
|
|
36
|
+
"__experimentalLetterSpacing": true,
|
|
31
37
|
"__experimentalDefaultControls": {
|
|
32
38
|
"fontSize": true
|
|
33
39
|
}
|
package/src/verse/block.json
CHANGED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
|
-
var _blockEditor = require("@wordpress/block-editor");
|
|
13
|
-
|
|
14
|
-
var _deprecated = _interopRequireDefault(require("../deprecated"));
|
|
15
|
-
|
|
16
|
-
var _migrate = require("./migrate");
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* WordPress dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Internal dependencies
|
|
24
|
-
*/
|
|
25
|
-
const v1 = {
|
|
26
|
-
attributes: {
|
|
27
|
-
ordered: {
|
|
28
|
-
type: 'boolean',
|
|
29
|
-
default: false,
|
|
30
|
-
__experimentalRole: 'content'
|
|
31
|
-
},
|
|
32
|
-
values: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
source: 'html',
|
|
35
|
-
selector: 'ol,ul',
|
|
36
|
-
multiline: 'li',
|
|
37
|
-
__unstableMultilineWrapperTags: ['ol', 'ul'],
|
|
38
|
-
default: '',
|
|
39
|
-
__experimentalRole: 'content'
|
|
40
|
-
},
|
|
41
|
-
type: {
|
|
42
|
-
type: 'string'
|
|
43
|
-
},
|
|
44
|
-
start: {
|
|
45
|
-
type: 'number'
|
|
46
|
-
},
|
|
47
|
-
reversed: {
|
|
48
|
-
type: 'boolean'
|
|
49
|
-
},
|
|
50
|
-
placeholder: {
|
|
51
|
-
type: 'string'
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
supports: {
|
|
55
|
-
anchor: true,
|
|
56
|
-
className: false,
|
|
57
|
-
typography: {
|
|
58
|
-
fontSize: true,
|
|
59
|
-
__experimentalFontFamily: true,
|
|
60
|
-
lineHeight: true,
|
|
61
|
-
__experimentalFontStyle: true,
|
|
62
|
-
__experimentalFontWeight: true,
|
|
63
|
-
__experimentalLetterSpacing: true,
|
|
64
|
-
__experimentalTextTransform: true,
|
|
65
|
-
__experimentalDefaultControls: {
|
|
66
|
-
fontSize: true
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
color: {
|
|
70
|
-
gradients: true,
|
|
71
|
-
link: true,
|
|
72
|
-
__experimentalDefaultControls: {
|
|
73
|
-
background: true,
|
|
74
|
-
text: true
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
__unstablePasteTextInline: true,
|
|
78
|
-
__experimentalSelector: 'ol,ul',
|
|
79
|
-
__experimentalSlashInserter: true
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
save(_ref) {
|
|
83
|
-
let {
|
|
84
|
-
attributes
|
|
85
|
-
} = _ref;
|
|
86
|
-
const {
|
|
87
|
-
ordered,
|
|
88
|
-
values,
|
|
89
|
-
type,
|
|
90
|
-
reversed,
|
|
91
|
-
start
|
|
92
|
-
} = attributes;
|
|
93
|
-
const TagName = ordered ? 'ol' : 'ul';
|
|
94
|
-
return (0, _element.createElement)(TagName, _blockEditor.useBlockProps.save({
|
|
95
|
-
type,
|
|
96
|
-
reversed,
|
|
97
|
-
start
|
|
98
|
-
}), (0, _element.createElement)(_blockEditor.RichText.Content, {
|
|
99
|
-
value: values,
|
|
100
|
-
multiline: "li"
|
|
101
|
-
}));
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
migrate: _migrate.migrateToListV2
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* New deprecations need to be placed first
|
|
108
|
-
* for them to have higher priority.
|
|
109
|
-
*
|
|
110
|
-
* Old deprecations may need to be updated as well.
|
|
111
|
-
*
|
|
112
|
-
* See block-deprecation.md
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
var _default = [v1, ..._deprecated.default];
|
|
116
|
-
exports.default = _default;
|
|
117
|
-
//# sourceMappingURL=deprecated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/list/v2/deprecated.js"],"names":["v1","attributes","ordered","type","default","__experimentalRole","values","source","selector","multiline","__unstableMultilineWrapperTags","start","reversed","placeholder","supports","anchor","className","typography","fontSize","__experimentalFontFamily","lineHeight","__experimentalFontStyle","__experimentalFontWeight","__experimentalLetterSpacing","__experimentalTextTransform","__experimentalDefaultControls","color","gradients","link","background","text","__unstablePasteTextInline","__experimentalSelector","__experimentalSlashInserter","save","TagName","useBlockProps","migrate","migrateToListV2","initialDeprecations"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,MAAMA,EAAE,GAAG;AACVC,EAAAA,UAAU,EAAE;AACXC,IAAAA,OAAO,EAAE;AACRC,MAAAA,IAAI,EAAE,SADE;AAERC,MAAAA,OAAO,EAAE,KAFD;AAGRC,MAAAA,kBAAkB,EAAE;AAHZ,KADE;AAMXC,IAAAA,MAAM,EAAE;AACPH,MAAAA,IAAI,EAAE,QADC;AAEPI,MAAAA,MAAM,EAAE,MAFD;AAGPC,MAAAA,QAAQ,EAAE,OAHH;AAIPC,MAAAA,SAAS,EAAE,IAJJ;AAKPC,MAAAA,8BAA8B,EAAE,CAAE,IAAF,EAAQ,IAAR,CALzB;AAMPN,MAAAA,OAAO,EAAE,EANF;AAOPC,MAAAA,kBAAkB,EAAE;AAPb,KANG;AAeXF,IAAAA,IAAI,EAAE;AACLA,MAAAA,IAAI,EAAE;AADD,KAfK;AAkBXQ,IAAAA,KAAK,EAAE;AACNR,MAAAA,IAAI,EAAE;AADA,KAlBI;AAqBXS,IAAAA,QAAQ,EAAE;AACTT,MAAAA,IAAI,EAAE;AADG,KArBC;AAwBXU,IAAAA,WAAW,EAAE;AACZV,MAAAA,IAAI,EAAE;AADM;AAxBF,GADF;AA6BVW,EAAAA,QAAQ,EAAE;AACTC,IAAAA,MAAM,EAAE,IADC;AAETC,IAAAA,SAAS,EAAE,KAFF;AAGTC,IAAAA,UAAU,EAAE;AACXC,MAAAA,QAAQ,EAAE,IADC;AAEXC,MAAAA,wBAAwB,EAAE,IAFf;AAGXC,MAAAA,UAAU,EAAE,IAHD;AAIXC,MAAAA,uBAAuB,EAAE,IAJd;AAKXC,MAAAA,wBAAwB,EAAE,IALf;AAMXC,MAAAA,2BAA2B,EAAE,IANlB;AAOXC,MAAAA,2BAA2B,EAAE,IAPlB;AAQXC,MAAAA,6BAA6B,EAAE;AAC9BP,QAAAA,QAAQ,EAAE;AADoB;AARpB,KAHH;AAeTQ,IAAAA,KAAK,EAAE;AACNC,MAAAA,SAAS,EAAE,IADL;AAENC,MAAAA,IAAI,EAAE,IAFA;AAGNH,MAAAA,6BAA6B,EAAE;AAC9BI,QAAAA,UAAU,EAAE,IADkB;AAE9BC,QAAAA,IAAI,EAAE;AAFwB;AAHzB,KAfE;AAuBTC,IAAAA,yBAAyB,EAAE,IAvBlB;AAwBTC,IAAAA,sBAAsB,EAAE,OAxBf;AAyBTC,IAAAA,2BAA2B,EAAE;AAzBpB,GA7BA;;AAwDVC,EAAAA,IAAI,OAAmB;AAAA,QAAjB;AAAEjC,MAAAA;AAAF,KAAiB;AACtB,UAAM;AAAEC,MAAAA,OAAF;AAAWI,MAAAA,MAAX;AAAmBH,MAAAA,IAAnB;AAAyBS,MAAAA,QAAzB;AAAmCD,MAAAA;AAAnC,QAA6CV,UAAnD;AACA,UAAMkC,OAAO,GAAGjC,OAAO,GAAG,IAAH,GAAU,IAAjC;AAEA,WACC,4BAAC,OAAD,EAAckC,2BAAcF,IAAd,CAAoB;AAAE/B,MAAAA,IAAF;AAAQS,MAAAA,QAAR;AAAkBD,MAAAA;AAAlB,KAApB,CAAd,EACC,4BAAC,qBAAD,CAAU,OAAV;AAAkB,MAAA,KAAK,EAAGL,MAA1B;AAAmC,MAAA,SAAS,EAAC;AAA7C,MADD,CADD;AAKA,GAjES;;AAkEV+B,EAAAA,OAAO,EAAEC;AAlEC,CAAX;AAqEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;eACe,CAAEtC,EAAF,EAAM,GAAGuC,mBAAT,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport initialDeprecations from '../deprecated';\nimport { migrateToListV2 } from './migrate';\n\nconst v1 = {\n\tattributes: {\n\t\tordered: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tvalues: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'ol,ul',\n\t\t\tmultiline: 'li',\n\t\t\t__unstableMultilineWrapperTags: [ 'ol', 'ul' ],\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttype: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tstart: {\n\t\t\ttype: 'number',\n\t\t},\n\t\treversed: {\n\t\t\ttype: 'boolean',\n\t\t},\n\t\tplaceholder: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tclassName: false,\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\t__experimentalFontFamily: true,\n\t\t\tlineHeight: true,\n\t\t\t__experimentalFontStyle: true,\n\t\t\t__experimentalFontWeight: true,\n\t\t\t__experimentalLetterSpacing: true,\n\t\t\t__experimentalTextTransform: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t},\n\t\t},\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t},\n\t\t},\n\t\t__unstablePasteTextInline: true,\n\t\t__experimentalSelector: 'ol,ul',\n\t\t__experimentalSlashInserter: true,\n\t},\n\tsave( { attributes } ) {\n\t\tconst { ordered, values, type, reversed, start } = attributes;\n\t\tconst TagName = ordered ? 'ol' : 'ul';\n\n\t\treturn (\n\t\t\t<TagName { ...useBlockProps.save( { type, reversed, start } ) }>\n\t\t\t\t<RichText.Content value={ values } multiline=\"li\" />\n\t\t\t</TagName>\n\t\t);\n\t},\n\tmigrate: migrateToListV2,\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v1, ...initialDeprecations ];\n"]}
|