Skip to content

Commit

Permalink
Update packages following @wordpress/fields being made public.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Sep 19, 2024
1 parent 7a24f04 commit be78d45
Show file tree
Hide file tree
Showing 17 changed files with 2,500 additions and 2,177 deletions.
4,417 changes: 2,336 additions & 2,081 deletions package-lock.json

Large diffs are not rendered by default.

145 changes: 73 additions & 72 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"@lodder/grunt-postcss": "^3.1.1",
"@playwright/test": "1.45.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
"@wordpress/babel-preset-default": "8.7.0",
"@wordpress/dependency-extraction-webpack-plugin": "6.7.0",
"@wordpress/e2e-test-utils": "11.7.0",
"@wordpress/e2e-test-utils-playwright": "1.7.0",
"@wordpress/prettier-config": "4.7.0",
"@wordpress/scripts": "29.0.0",
"@wordpress/babel-preset-default": "8.8.2",
"@wordpress/dependency-extraction-webpack-plugin": "6.8.1",
"@wordpress/e2e-test-utils": "11.8.1",
"@wordpress/e2e-test-utils-playwright": "1.8.1",
"@wordpress/prettier-config": "4.8.1",
"@wordpress/scripts": "30.0.2",
"autoprefixer": "10.4.19",
"chalk": "5.3.0",
"check-node-version": "4.2.1",
Expand Down Expand Up @@ -78,72 +78,73 @@
"webpack-livereload-plugin": "3.0.2"
},
"dependencies": {
"@wordpress/a11y": "4.7.0",
"@wordpress/annotations": "3.7.0",
"@wordpress/api-fetch": "7.7.0",
"@wordpress/autop": "4.7.0",
"@wordpress/blob": "4.7.0",
"@wordpress/block-directory": "5.7.0",
"@wordpress/block-editor": "14.2.0",
"@wordpress/block-library": "9.7.0",
"@wordpress/block-serialization-default-parser": "5.7.0",
"@wordpress/blocks": "13.7.0",
"@wordpress/commands": "1.7.0",
"@wordpress/components": "28.7.0",
"@wordpress/compose": "7.7.0",
"@wordpress/core-commands": "1.7.0",
"@wordpress/core-data": "7.7.0",
"@wordpress/customize-widgets": "5.7.0",
"@wordpress/data": "10.7.0",
"@wordpress/data-controls": "4.7.0",
"@wordpress/dataviews": "4.3.0",
"@wordpress/date": "5.7.0",
"@wordpress/deprecated": "4.7.0",
"@wordpress/dom": "4.7.0",
"@wordpress/dom-ready": "4.7.0",
"@wordpress/edit-post": "8.7.0",
"@wordpress/edit-site": "6.7.0",
"@wordpress/edit-widgets": "6.7.0",
"@wordpress/editor": "14.7.0",
"@wordpress/element": "6.7.0",
"@wordpress/escape-html": "3.7.0",
"@wordpress/format-library": "5.7.0",
"@wordpress/hooks": "4.7.0",
"@wordpress/html-entities": "4.7.0",
"@wordpress/i18n": "5.7.0",
"@wordpress/icons": "10.7.0",
"@wordpress/interactivity": "6.7.0",
"@wordpress/interactivity-router": "2.7.0",
"@wordpress/interface": "6.7.0",
"@wordpress/is-shallow-equal": "5.7.0",
"@wordpress/keyboard-shortcuts": "5.7.0",
"@wordpress/keycodes": "4.7.0",
"@wordpress/list-reusable-blocks": "5.7.0",
"@wordpress/media-utils": "5.7.0",
"@wordpress/notices": "5.7.0",
"@wordpress/nux": "9.7.0",
"@wordpress/patterns": "2.7.0",
"@wordpress/plugins": "7.7.0",
"@wordpress/preferences": "4.7.0",
"@wordpress/preferences-persistence": "2.7.0",
"@wordpress/primitives": "4.7.0",
"@wordpress/priority-queue": "3.7.0",
"@wordpress/private-apis": "1.7.0",
"@wordpress/redux-routine": "5.7.0",
"@wordpress/reusable-blocks": "5.7.0",
"@wordpress/rich-text": "7.7.0",
"@wordpress/router": "1.7.0",
"@wordpress/server-side-render": "5.7.0",
"@wordpress/shortcode": "4.7.0",
"@wordpress/style-engine": "2.7.0",
"@wordpress/sync": "1.7.0",
"@wordpress/token-list": "3.7.0",
"@wordpress/undo-manager": "1.7.0",
"@wordpress/url": "4.7.0",
"@wordpress/viewport": "6.7.0",
"@wordpress/warning": "3.7.0",
"@wordpress/widgets": "4.7.0",
"@wordpress/wordcount": "4.7.0",
"@wordpress/a11y": "4.8.1",
"@wordpress/annotations": "3.8.1",
"@wordpress/api-fetch": "7.8.1",
"@wordpress/autop": "4.8.1",
"@wordpress/blob": "4.8.1",
"@wordpress/block-directory": "5.8.3",
"@wordpress/block-editor": "14.3.1",
"@wordpress/block-library": "9.8.2",
"@wordpress/block-serialization-default-parser": "5.8.1",
"@wordpress/blocks": "13.8.1",
"@wordpress/commands": "1.8.1",
"@wordpress/components": "28.8.1",
"@wordpress/compose": "7.8.1",
"@wordpress/core-commands": "1.8.1",
"@wordpress/core-data": "7.8.1",
"@wordpress/customize-widgets": "5.8.2",
"@wordpress/data": "10.8.1",
"@wordpress/data-controls": "4.8.1",
"@wordpress/dataviews": "4.4.1",
"@wordpress/date": "5.8.1",
"@wordpress/deprecated": "4.8.1",
"@wordpress/dom": "4.8.1",
"@wordpress/dom-ready": "4.8.1",
"@wordpress/edit-post": "8.8.3",
"@wordpress/edit-site": "6.8.3",
"@wordpress/edit-widgets": "6.8.2",
"@wordpress/editor": "14.8.3",
"@wordpress/element": "6.8.1",
"@wordpress/escape-html": "3.8.1",
"@wordpress/fields": "0.0.2",
"@wordpress/format-library": "5.8.1",
"@wordpress/hooks": "4.8.1",
"@wordpress/html-entities": "4.8.1",
"@wordpress/i18n": "5.8.1",
"@wordpress/icons": "10.8.1",
"@wordpress/interactivity": "6.8.2",
"@wordpress/interactivity-router": "2.8.2",
"@wordpress/interface": "6.8.1",
"@wordpress/is-shallow-equal": "5.8.1",
"@wordpress/keyboard-shortcuts": "5.8.1",
"@wordpress/keycodes": "4.8.1",
"@wordpress/list-reusable-blocks": "5.8.1",
"@wordpress/media-utils": "5.8.1",
"@wordpress/notices": "5.8.1",
"@wordpress/nux": "9.8.1",
"@wordpress/patterns": "2.8.1",
"@wordpress/plugins": "7.8.1",
"@wordpress/preferences": "4.8.1",
"@wordpress/preferences-persistence": "2.8.1",
"@wordpress/primitives": "4.8.1",
"@wordpress/priority-queue": "3.8.1",
"@wordpress/private-apis": "1.8.1",
"@wordpress/redux-routine": "5.8.1",
"@wordpress/reusable-blocks": "5.8.1",
"@wordpress/rich-text": "7.8.1",
"@wordpress/router": "1.8.1",
"@wordpress/server-side-render": "5.8.1",
"@wordpress/shortcode": "4.8.1",
"@wordpress/style-engine": "2.8.1",
"@wordpress/sync": "1.8.1",
"@wordpress/token-list": "3.8.1",
"@wordpress/undo-manager": "1.8.1",
"@wordpress/url": "4.8.1",
"@wordpress/viewport": "6.8.1",
"@wordpress/warning": "3.8.1",
"@wordpress/widgets": "4.8.1",
"@wordpress/wordcount": "4.8.1",
"backbone": "1.6.0",
"clipboard": "2.0.11",
"core-js-url-browser": "3.6.4",
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/assets/script-loader-packages.min.php

Large diffs are not rendered by default.

35 changes: 32 additions & 3 deletions src/wp-includes/blocks/blocks-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,10 @@
)
),
'spacing' => array(
'blockGap' => true,
'blockGap' => array(
'horizontal',
'vertical'
),
'padding' => true,
'margin' => array(
'top',
Expand Down Expand Up @@ -518,11 +521,18 @@
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'core/categories',
'title' => 'Categories List',
'title' => 'Terms List',
'category' => 'widgets',
'description' => 'Display a list of all categories.',
'description' => 'Display a list of all terms of a given taxonomy.',
'keywords' => array(
'categories'
),
'textdomain' => 'default',
'attributes' => array(
'taxonomy' => array(
'type' => 'string',
'default' => 'category'
),
'displayAsDropdown' => array(
'type' => 'boolean',
'default' => false
Expand Down Expand Up @@ -3695,6 +3705,19 @@
'supports' => array(
'reusable' => false,
'html' => false,
'typography' => array(
'fontSize' => true,
'lineHeight' => true,
'__experimentalFontFamily' => true,
'__experimentalFontWeight' => true,
'__experimentalFontStyle' => true,
'__experimentalTextTransform' => true,
'__experimentalTextDecoration' => true,
'__experimentalLetterSpacing' => true,
'__experimentalDefaultControls' => array(
'fontSize' => true
)
),
'interactivity' => array(
'clientNavigation' => true
)
Expand Down Expand Up @@ -5072,6 +5095,9 @@
'taxQuery' => null,
'parents' => array(

),
'format' => array(

)
)
),
Expand All @@ -5087,6 +5113,9 @@
'default' => false
)
),
'usesContext' => array(
'postType'
),
'providesContext' => array(
'queryId' => 'queryId',
'query' => 'query',
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/buttons/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
},
"spacing": {
"blockGap": true,
"blockGap": [ "horizontal", "vertical" ],
"padding": true,
"margin": [ "top", "bottom" ],
"__experimentalDefaultControls": {
Expand Down
30 changes: 21 additions & 9 deletions src/wp-includes/blocks/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ function render_block_core_categories( $attributes, $content, $block ) {
static $block_id = 0;
++$block_id;

$taxonomy = get_taxonomy( $attributes['taxonomy'] );

$args = array(
'echo' => false,
'hierarchical' => ! empty( $attributes['showHierarchy'] ),
'orderby' => 'name',
'show_count' => ! empty( $attributes['showPostCounts'] ),
'taxonomy' => $attributes['taxonomy'],
'title_li' => '',
'hide_empty' => empty( $attributes['showEmpty'] ),
);
Expand All @@ -36,13 +39,20 @@ function render_block_core_categories( $attributes, $content, $block ) {
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$id = 'wp-block-categories-' . $block_id;
$args['id'] = $id;
$args['show_option_none'] = __( 'Select Category' );
$show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';
$default_label = __( 'Categories' );
$label_text = ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
$wrapper_markup = '<div %1$s><label class="wp-block-categories__label' . $show_label . '" for="' . esc_attr( $id ) . '">' . $label_text . '</label>%2$s</div>';
$items_markup = wp_dropdown_categories( $args );
$type = 'dropdown';
$args['name'] = $taxonomy->query_var;
$args['value_field'] = 'slug';
$args['show_option_none'] = sprintf(
/* translators: %s: taxonomy's singular name */
__( 'Select %s' ),
$taxonomy->labels->singular_name
);

$show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';
$default_label = $taxonomy->label;
$label_text = ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
$wrapper_markup = '<div %1$s><label class="wp-block-categories__label' . $show_label . '" for="' . esc_attr( $id ) . '">' . $label_text . '</label>%2$s</div>';
$items_markup = wp_dropdown_categories( $args );
$type = 'dropdown';

if ( ! is_admin() ) {
// Inject the dropdown script immediately after the select dropdown.
Expand All @@ -54,6 +64,8 @@ function render_block_core_categories( $attributes, $content, $block ) {
);
}
} else {
$args['show_option_none'] = $taxonomy->labels->no_terms;

$wrapper_markup = '<ul %1$s>%2$s</ul>';
$items_markup = wp_list_categories( $args );
$type = 'list';
Expand Down Expand Up @@ -92,8 +104,8 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
( function() {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
location.href = "<?php echo esc_url( home_url() ); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
if ( dropdown.options[ dropdown.selectedIndex ].value !== -1 ) {
location.href = "<?php echo esc_url( home_url() ); ?>/?" + dropdown.name + '=' + dropdown.options[ dropdown.selectedIndex ].value;
}
}
dropdown.onchange = onCatChange;
Expand Down
9 changes: 7 additions & 2 deletions src/wp-includes/blocks/categories/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/categories",
"title": "Categories List",
"title": "Terms List",
"category": "widgets",
"description": "Display a list of all categories.",
"description": "Display a list of all terms of a given taxonomy.",
"keywords": [ "categories" ],
"textdomain": "default",
"attributes": {
"taxonomy": {
"type": "string",
"default": "category"
},
"displayAsDropdown": {
"type": "boolean",
"default": false
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/comments-pagination-next.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo
$label .= $pagination_arrow;
}

$next_comments_link = get_next_comments_link( $label, $max_page );
$next_comments_link = get_next_comments_link( $label, $max_page, $comment_vars['paged'] ?? null );

remove_filter( 'next_posts_link_attributes', $filter_link_attributes );

Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/blocks/comments-pagination-previous.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ function render_block_core_comments_pagination_previous( $attributes, $content,
};
add_filter( 'previous_comments_link_attributes', $filter_link_attributes );

$previous_comments_link = get_previous_comments_link( $label );
$comment_vars = build_comment_query_vars_from_block( $block );
$previous_comments_link = get_previous_comments_link( $label, $comment_vars['paged'] ?? null );

remove_filter( 'previous_comments_link_attributes', $filter_link_attributes );

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function render_block_core_file( $attributes, $content ) {
if ( ! empty( $attributes['displayPreview'] ) ) {
$suffix = wp_scripts_get_suffix();
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
$module_url = gutenberg_url( '/build/interactivity/file.min.js' );
$module_url = gutenberg_url( '/build-module/block-library/file/view.min.js' );
}

wp_register_script_module(
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function render_block_core_image( $attributes, $content, $block ) {
) {
$suffix = wp_scripts_get_suffix();
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
$module_url = gutenberg_url( '/build/interactivity/image.min.js' );
$module_url = gutenberg_url( '/build-module/block-library/image/view.min.js' );
}

wp_register_script_module(
Expand Down
13 changes: 13 additions & 0 deletions src/wp-includes/blocks/navigation-submenu/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@
"supports": {
"reusable": false,
"html": false,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ private static function handle_view_script_module_loading( $attributes, $block,
if ( static::is_interactive( $attributes, $inner_blocks ) ) {
$suffix = wp_scripts_get_suffix();
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
$module_url = gutenberg_url( '/build/interactivity/navigation.min.js' );
$module_url = gutenberg_url( '/build-module/block-library/navigation/view.min.js' );
}

wp_register_script_module(
Expand Down
Loading

0 comments on commit be78d45

Please sign in to comment.