diff --git a/.eslintrc.js b/.eslintrc.js
index caf01b7cbd71d..b5349d2de0a1f 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -216,6 +216,12 @@ module.exports = {
},
],
'no-restricted-syntax': [ 'error', ...restrictedSyntax ],
+ 'jsdoc/check-tag-names': [
+ 'error',
+ {
+ definedTags: [ 'jest-environment' ],
+ },
+ ],
},
overrides: [
{
diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml
index 6106eee492c32..499a2c020255c 100644
--- a/.github/workflows/bundle-size.yml
+++ b/.github/workflows/bundle-size.yml
@@ -52,5 +52,5 @@ jobs:
- uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c # v2.6.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
- pattern: '{build/**/*.min.js,build/**/*.css}'
+ pattern: '{build/**/*.min.js,build/**/*.css,build-module/**/*.min.js}'
clean-script: 'distclean'
diff --git a/.stylelintrc.json b/.stylelintrc.json
index 663befa2e4ce0..557376e02c406 100644
--- a/.stylelintrc.json
+++ b/.stylelintrc.json
@@ -1,5 +1,5 @@
{
- "extends": "@wordpress/stylelint-config/scss",
+ "extends": "@wordpress/stylelint-config/scss-stylistic",
"rules": {
"at-rule-empty-line-before": null,
"at-rule-no-unknown": null,
@@ -21,7 +21,7 @@
}
],
"font-weight-notation": null,
- "max-line-length": null,
+ "@stylistic/max-line-length": null,
"no-descending-specificity": null,
"property-disallowed-list": [
[ "order" ],
@@ -34,7 +34,7 @@
"value-keyword-case": null,
"scss/operator-no-unspaced": null,
"scss/selector-no-redundant-nesting-selector": null,
- "scss/at-import-partial-extension": null,
+ "scss/load-partial-extension": null,
"scss/no-global-function-names": null,
"scss/comment-no-empty": null,
"scss/at-extend-no-missing-placeholder": null,
diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh
index 4ba931c4a4aeb..ad627e05f0c69 100755
--- a/bin/build-plugin-zip.sh
+++ b/bin/build-plugin-zip.sh
@@ -98,6 +98,7 @@ zip -r gutenberg.zip \
packages/block-serialization-default-parser/*.php \
post-content.php \
$build_files \
+ build-module \
readme.txt \
changelog.txt \
README.md
diff --git a/changelog.txt b/changelog.txt
index dc0a2487f725f..b0e6c8e907582 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,7 +1,6 @@
== Changelog ==
-= 19.2.0-rc.1 =
-
+= 19.2.0 =
## Changelog
@@ -40,6 +39,12 @@
- Rely on `Text` component instead of `Truncate` in bindings panel. ([65007](https://github.com/WordPress/gutenberg/pull/65007))
- Remove `getPlaceholder` API and rely on `key` argument or source label. ([64910](https://github.com/WordPress/gutenberg/pull/64910))
+#### Data Views
+- Add: Reorder control at the field level on the new view configuration UI. ([64381](https://github.com/WordPress/gutenberg/pull/64381))
+- Dataviews Filter search widget: Do not use Composite store. ([64985](https://github.com/WordPress/gutenberg/pull/64985))
+- Dataviews list view: Do not use Composite store. ([64987](https://github.com/WordPress/gutenberg/pull/64987))
+- Move bulk actions menu to the Footer, consolidate with floating toolbar and total items display. ([64268](https://github.com/WordPress/gutenberg/pull/64268))
+
#### Block Editor
- Add 'Reset' option to MediaReplaceFlow component. ([64826](https://github.com/WordPress/gutenberg/pull/64826))
- Block Patterns List: Do not use Composite store. ([64983](https://github.com/WordPress/gutenberg/pull/64983))
@@ -106,12 +111,14 @@
- Add safeguard to `mediaUploadMiddleware`. ([64843](https://github.com/WordPress/gutenberg/pull/64843))
- Allow multi-select on iOS Safari/touch devices. ([63671](https://github.com/WordPress/gutenberg/pull/63671))
+- Core Data: Fix the 'query._fields' property check inside 'getEntityRecord' resolver. ([65079](https://github.com/WordPress/gutenberg/pull/65079))
- Fix Modify content-locked menu item not showing if the block is not selected. ([61605](https://github.com/WordPress/gutenberg/pull/61605))
- Fix editor error in Safari due to availability of checkVisibility method. ([65069](https://github.com/WordPress/gutenberg/pull/65069))
- Fix: Pagination arrows are pointing in the wrong direction in RTL languages. ([64962](https://github.com/WordPress/gutenberg/pull/64962))
- Footnotes: Only replace attribute if footnotes were detected. ([63935](https://github.com/WordPress/gutenberg/pull/63935))
- Paste: Fix image paste from Google Forms. ([64502](https://github.com/WordPress/gutenberg/pull/64502))
- Revert Focus pattern inserter search when activating zoom out inserter. ([64748](https://github.com/WordPress/gutenberg/pull/64748))
+- Try: Update block warnings. ([64997](https://github.com/WordPress/gutenberg/pull/64997))
#### Block Library
- De-duplicate block toolbar icons for patterns. ([65054](https://github.com/WordPress/gutenberg/pull/65054))
@@ -175,6 +182,9 @@
#### Site Editor
- DataViews: Fix pattern title direction in RTL languages. ([64967](https://github.com/WordPress/gutenberg/pull/64967))
+#### Typography
+- Site Title, Post Title: Fix typography for blocks with `a` children. ([64911](https://github.com/WordPress/gutenberg/pull/64911))
+
#### NUX
- Fix visibility of the template Welcome Guide in the Site Editor. ([64789](https://github.com/WordPress/gutenberg/pull/64789))
@@ -223,6 +233,9 @@
- Add 'OPTIONS /page' to preloaded paths. ([64890](https://github.com/WordPress/gutenberg/pull/64890))
- Editor: Don't use selector shortcuts for the Site data. ([64884](https://github.com/WordPress/gutenberg/pull/64884))
+#### Interactivity API
+- Prevent calling `proxifyContext` with context proxies inside `wp-context`. ([65090](https://github.com/WordPress/gutenberg/pull/65090))
+
#### Block Library
- Media & Text: Don't use background-image. ([64981](https://github.com/WordPress/gutenberg/pull/64981))
@@ -353,7 +366,7 @@ The following PRs were merged by first-time contributors:
The following contributors merged PRs in this release:
-@aaronrobertshaw @afercia @akasunil @Aljullu @andrewserong @atachibana @benoitchantre @carolinan @cbravobernal @ciampo @DAreRodz @dcalhoun @desrosj @dsas @ellatrix @fullofcaffeine @getdave @gziolo @Imran92 @imrraaj @jacobcassidy @jameskoster @jasmussen @jawadmalikdev @jeryj @jorgefilipecosta @jsnajdr @juanmaguitar @kevin940726 @lezama @Mamaduka @matiasbenedetto @mirka @noisysocks @ntsekouras @oandregal @ockham @ramonjd @richtabor @rithik56 @rohitmathur-7 @ryanwelcher @SantosGuillamot @scruffian @sgomes @shail-mehta @spacedmonkey @stokesman @swissspidy @t-hamano @talldan @tjcafferkey @tyxla
+@aaronrobertshaw @afercia @akasunil @Aljullu @andrewserong @atachibana @benoitchantre @carolinan @cbravobernal @ciampo @DAreRodz @dcalhoun @desrosj @dsas @ellatrix @fullofcaffeine @getdave @gziolo @Imran92 @imrraaj @jacobcassidy @jameskoster @jasmussen @jawadmalikdev @jeryj @jorgefilipecosta @jsnajdr @juanmaguitar @kevin940726 @lezama @Mamaduka @matiasbenedetto @mirka @noisysocks @ntsekouras @oandregal @ockham @rafaelgallani @ramonjd @richtabor @rithik56 @rohitmathur-7 @ryanwelcher @SantosGuillamot @scruffian @sgomes @shail-mehta @spacedmonkey @stokesman @swissspidy @t-hamano @talldan @tjcafferkey @tyxla
= 19.1.0 =
diff --git a/docs/manifest.json b/docs/manifest.json
index e4eba19d99fa2..d7f74d47995b6 100644
--- a/docs/manifest.json
+++ b/docs/manifest.json
@@ -1697,6 +1697,12 @@
"markdown_source": "../packages/eslint-plugin/README.md",
"parent": "packages"
},
+ {
+ "title": "@wordpress/fields",
+ "slug": "packages-fields",
+ "markdown_source": "../packages/fields/README.md",
+ "parent": "packages"
+ },
{
"title": "@wordpress/format-library",
"slug": "packages-format-library",
diff --git a/docs/reference-guides/block-api/block-context.md b/docs/reference-guides/block-api/block-context.md
index 5fdc670fe6040..09c33dfb71b7c 100644
--- a/docs/reference-guides/block-api/block-context.md
+++ b/docs/reference-guides/block-api/block-context.md
@@ -141,7 +141,7 @@ export default function Edit( props ) {
return (
setAttributes( { recordId: Number( val ) } )
diff --git a/lib/compat/wordpress-6.6/rest-api.php b/lib/compat/wordpress-6.6/rest-api.php
index fee9c71b86c07..eadd3b1d376a7 100644
--- a/lib/compat/wordpress-6.6/rest-api.php
+++ b/lib/compat/wordpress-6.6/rest-api.php
@@ -88,76 +88,116 @@ function gutenberg_register_global_styles_revisions_endpoints() {
add_action( 'rest_api_init', 'gutenberg_register_global_styles_revisions_endpoints' );
-if ( ! function_exists( 'gutenberg_register_wp_rest_themes_stylesheet_directory_uri_field' ) ) {
- /**
- * Adds `stylesheet_uri` fields to WP_REST_Themes_Controller class.
- */
- function gutenberg_register_wp_rest_themes_stylesheet_directory_uri_field() {
- register_rest_field(
- 'theme',
- 'stylesheet_uri',
- array(
- 'get_callback' => function ( $item ) {
- if ( ! empty( $item['stylesheet'] ) ) {
- $theme = wp_get_theme( $item['stylesheet'] );
- $current_theme = wp_get_theme();
- if ( $theme->get_stylesheet() === $current_theme->get_stylesheet() ) {
- return get_stylesheet_directory_uri();
- } else {
- return $theme->get_stylesheet_directory_uri();
- }
+/**
+ * Adds `stylesheet_uri` fields to WP_REST_Themes_Controller class.
+ */
+function gutenberg_register_wp_rest_themes_stylesheet_directory_uri_field() {
+ register_rest_field(
+ 'theme',
+ 'stylesheet_uri',
+ array(
+ 'get_callback' => function ( $item ) {
+ if ( ! empty( $item['stylesheet'] ) ) {
+ $theme = wp_get_theme( $item['stylesheet'] );
+ $current_theme = wp_get_theme();
+ if ( $theme->get_stylesheet() === $current_theme->get_stylesheet() ) {
+ return get_stylesheet_directory_uri();
+ } else {
+ return $theme->get_stylesheet_directory_uri();
}
+ }
- return null;
- },
- 'schema' => array(
- 'type' => 'string',
- 'description' => __( 'The uri for the theme\'s stylesheet directory.', 'gutenberg' ),
- 'format' => 'uri',
- 'readonly' => true,
- 'context' => array( 'view', 'edit', 'embed' ),
- ),
- )
- );
- }
+ return null;
+ },
+ 'schema' => array(
+ 'type' => 'string',
+ 'description' => __( 'The uri for the theme\'s stylesheet directory.', 'gutenberg' ),
+ 'format' => 'uri',
+ 'readonly' => true,
+ 'context' => array( 'view', 'edit', 'embed' ),
+ ),
+ )
+ );
}
add_action( 'rest_api_init', 'gutenberg_register_wp_rest_themes_stylesheet_directory_uri_field' );
-if ( ! function_exists( 'gutenberg_register_wp_rest_themes_template_directory_uri_field' ) ) {
- /**
- * Adds `template_uri` fields to WP_REST_Themes_Controller class.
- */
- function gutenberg_register_wp_rest_themes_template_directory_uri_field() {
- register_rest_field(
- 'theme',
- 'template_uri',
- array(
- 'get_callback' => function ( $item ) {
- if ( ! empty( $item['stylesheet'] ) ) {
- $theme = wp_get_theme( $item['stylesheet'] );
- $current_theme = wp_get_theme();
- if ( $theme->get_stylesheet() === $current_theme->get_stylesheet() ) {
- return get_template_directory_uri();
- } else {
- return $theme->get_template_directory_uri();
- }
+/**
+ * Adds `template_uri` fields to WP_REST_Themes_Controller class.
+ */
+function gutenberg_register_wp_rest_themes_template_directory_uri_field() {
+ register_rest_field(
+ 'theme',
+ 'template_uri',
+ array(
+ 'get_callback' => function ( $item ) {
+ if ( ! empty( $item['stylesheet'] ) ) {
+ $theme = wp_get_theme( $item['stylesheet'] );
+ $current_theme = wp_get_theme();
+ if ( $theme->get_stylesheet() === $current_theme->get_stylesheet() ) {
+ return get_template_directory_uri();
+ } else {
+ return $theme->get_template_directory_uri();
}
+ }
- return null;
- },
- 'schema' => array(
- 'type' => 'string',
- 'description' => __( 'The uri for the theme\'s template directory. If this is a child theme, this refers to the parent theme, otherwise this is the same as the theme\'s stylesheet directory.', 'gutenberg' ),
- 'format' => 'uri',
- 'readonly' => true,
- 'context' => array( 'view', 'edit', 'embed' ),
- ),
- )
- );
- }
+ return null;
+ },
+ 'schema' => array(
+ 'type' => 'string',
+ 'description' => __( 'The uri for the theme\'s template directory. If this is a child theme, this refers to the parent theme, otherwise this is the same as the theme\'s stylesheet directory.', 'gutenberg' ),
+ 'format' => 'uri',
+ 'readonly' => true,
+ 'context' => array( 'view', 'edit', 'embed' ),
+ ),
+ )
+ );
}
add_action( 'rest_api_init', 'gutenberg_register_wp_rest_themes_template_directory_uri_field' );
+/**
+ * Adds `template` and `template_lock` fields to WP_REST_Post_Types_Controller class.
+ */
+function gutenberg_register_wp_rest_post_types_controller_fields() {
+ register_rest_field(
+ 'type',
+ 'template',
+ array(
+ 'get_callback' => function ( $item ) {
+ $post_type = get_post_type_object( $item['slug'] );
+ if ( ! empty( $post_type ) ) {
+ return $post_type->template ?? array();
+ }
+ },
+ 'schema' => array(
+ 'type' => 'array',
+ 'description' => __( 'The block template associated with the post type.', 'gutenberg' ),
+ 'readonly' => true,
+ 'context' => array( 'view', 'edit', 'embed' ),
+ ),
+ )
+ );
+ register_rest_field(
+ 'type',
+ 'template_lock',
+ array(
+ 'get_callback' => function ( $item ) {
+ $post_type = get_post_type_object( $item['slug'] );
+ if ( ! empty( $post_type ) ) {
+ return ! empty( $post_type->template_lock ) ? $post_type->template_lock : false;
+ }
+ },
+ 'schema' => array(
+ 'type' => array( 'string', 'boolean' ),
+ 'enum' => array( 'all', 'insert', 'contentOnly', false ),
+ 'description' => __( 'The template_lock associated with the post type, or false if none.', 'gutenberg' ),
+ 'readonly' => true,
+ 'context' => array( 'view', 'edit', 'embed' ),
+ ),
+ )
+ );
+}
+add_action( 'rest_api_init', 'gutenberg_register_wp_rest_post_types_controller_fields' );
+
/**
* Preload theme and global styles paths to avoid flash of variation styles in post editor.
*
diff --git a/lib/experimental/blocks.php b/lib/experimental/blocks.php
index bfe57c26b3eca..68113276ec1c0 100644
--- a/lib/experimental/blocks.php
+++ b/lib/experimental/blocks.php
@@ -78,45 +78,42 @@ function wp_enqueue_block_view_script( $block_name, $args ) {
}
}
-/*
+/**
+ * Registers a new block style for one or more block types.
+ *
* WP_Block_Styles_Registry was marked as `final` in core so it cannot be
* updated via Gutenberg to allow registration of a style across multiple
* block types as well as with an optional style object. This function will
* support the desired functionality until the styles registry can be updated
* in core.
+ *
+ * @param string|array $block_name Block type name including namespace or array of namespaced block type names.
+ * @param array $style_properties Array containing the properties of the style name, label,
+ * style_handle (name of the stylesheet to be enqueued),
+ * inline_style (string containing the CSS to be added),
+ * style_data (theme.json-like object to generate CSS from).
+ *
+ * @return bool True if all block styles were registered with success and false otherwise.
*/
-if ( ! function_exists( 'gutenberg_register_block_style' ) ) {
- /**
- * Registers a new block style for one or more block types.
- *
- * @param string|array $block_name Block type name including namespace or array of namespaced block type names.
- * @param array $style_properties Array containing the properties of the style name, label,
- * style_handle (name of the stylesheet to be enqueued),
- * inline_style (string containing the CSS to be added),
- * style_data (theme.json-like object to generate CSS from).
- *
- * @return bool True if all block styles were registered with success and false otherwise.
- */
- function gutenberg_register_block_style( $block_name, $style_properties ) {
- if ( ! is_string( $block_name ) && ! is_array( $block_name ) ) {
- _doing_it_wrong(
- __METHOD__,
- __( 'Block name must be a string or array.', 'gutenberg' ),
- '6.6.0'
- );
+function gutenberg_register_block_style( $block_name, $style_properties ) {
+ if ( ! is_string( $block_name ) && ! is_array( $block_name ) ) {
+ _doing_it_wrong(
+ __METHOD__,
+ __( 'Block name must be a string or array.', 'gutenberg' ),
+ '6.6.0'
+ );
- return false;
- }
+ return false;
+ }
- $block_names = is_string( $block_name ) ? array( $block_name ) : $block_name;
- $result = true;
+ $block_names = is_string( $block_name ) ? array( $block_name ) : $block_name;
+ $result = true;
- foreach ( $block_names as $name ) {
- if ( ! WP_Block_Styles_Registry::get_instance()->register( $name, $style_properties ) ) {
- $result = false;
- }
+ foreach ( $block_names as $name ) {
+ if ( ! WP_Block_Styles_Registry::get_instance()->register( $name, $style_properties ) ) {
+ $result = false;
}
-
- return $result;
}
+
+ return $result;
}
diff --git a/lib/interactivity-api.php b/lib/interactivity-api.php
index 6f04a3ba8fc92..90535f1ebaa42 100644
--- a/lib/interactivity-api.php
+++ b/lib/interactivity-api.php
@@ -16,14 +16,14 @@ function gutenberg_reregister_interactivity_script_modules() {
wp_register_script_module(
'@wordpress/interactivity',
- gutenberg_url( '/build/interactivity/' . ( SCRIPT_DEBUG ? 'debug.min.js' : 'index.min.js' ) ),
+ gutenberg_url( '/build-module/' . ( SCRIPT_DEBUG ? 'interactivity/debug.min.js' : 'interactivity/index.min.js' ) ),
array(),
$default_version
);
wp_register_script_module(
'@wordpress/interactivity-router',
- gutenberg_url( '/build/interactivity/router.min.js' ),
+ gutenberg_url( '/build-module/interactivity-router/index.min.js' ),
array( '@wordpress/interactivity' ),
$default_version
);
diff --git a/lib/rest-api.php b/lib/rest-api.php
index ea87f42463704..0becbc4a72d35 100644
--- a/lib/rest-api.php
+++ b/lib/rest-api.php
@@ -19,60 +19,12 @@ function gutenberg_register_global_styles_endpoints() {
}
add_action( 'rest_api_init', 'gutenberg_register_global_styles_endpoints' );
-if ( ! function_exists( 'gutenberg_register_edit_site_export_controller_endpoints' ) ) {
- /**
- * Registers the Edit Site Export REST API routes.
- */
- function gutenberg_register_edit_site_export_controller_endpoints() {
- $edit_site_export_controller = new WP_REST_Edit_Site_Export_Controller_Gutenberg();
- $edit_site_export_controller->register_routes();
- }
-}
-
-add_action( 'rest_api_init', 'gutenberg_register_edit_site_export_controller_endpoints' );
-if ( ! function_exists( 'gutenberg_register_wp_rest_post_types_controller_fields' ) ) {
- /**
- * Adds `template` and `template_lock` fields to WP_REST_Post_Types_Controller class.
- */
- function gutenberg_register_wp_rest_post_types_controller_fields() {
- register_rest_field(
- 'type',
- 'template',
- array(
- 'get_callback' => function ( $item ) {
- $post_type = get_post_type_object( $item['slug'] );
- if ( ! empty( $post_type ) ) {
- return $post_type->template ?? array();
- }
- },
- 'schema' => array(
- 'type' => 'array',
- 'description' => __( 'The block template associated with the post type.', 'gutenberg' ),
- 'readonly' => true,
- 'context' => array( 'view', 'edit', 'embed' ),
- ),
- )
- );
- register_rest_field(
- 'type',
- 'template_lock',
- array(
- 'get_callback' => function ( $item ) {
- $post_type = get_post_type_object( $item['slug'] );
- if ( ! empty( $post_type ) ) {
- return ! empty( $post_type->template_lock ) ? $post_type->template_lock : false;
- }
- },
- 'schema' => array(
- 'type' => array( 'string', 'boolean' ),
- 'enum' => array( 'all', 'insert', 'contentOnly', false ),
- 'description' => __( 'The template_lock associated with the post type, or false if none.', 'gutenberg' ),
- 'readonly' => true,
- 'context' => array( 'view', 'edit', 'embed' ),
- ),
- )
- );
- }
+/**
+ * Registers the Edit Site Export REST API routes.
+ */
+function gutenberg_register_edit_site_export_controller_endpoints() {
+ $edit_site_export_controller = new WP_REST_Edit_Site_Export_Controller_Gutenberg();
+ $edit_site_export_controller->register_routes();
}
-add_action( 'rest_api_init', 'gutenberg_register_wp_rest_post_types_controller_fields' );
+add_action( 'rest_api_init', 'gutenberg_register_edit_site_export_controller_endpoints' );
diff --git a/package-lock.json b/package-lock.json
index b9e116f15388b..32819be602f72 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "gutenberg",
- "version": "19.2.0-rc.1",
+ "version": "19.2.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "gutenberg",
- "version": "19.2.0-rc.1",
+ "version": "19.2.0",
"hasInstallScript": true,
"license": "GPL-2.0-or-later",
"dependencies": {
@@ -40,12 +40,14 @@
"@wordpress/editor": "file:packages/editor",
"@wordpress/element": "file:packages/element",
"@wordpress/escape-html": "file:packages/escape-html",
+ "@wordpress/fields": "file:packages/fields",
"@wordpress/format-library": "file:packages/format-library",
"@wordpress/hooks": "file:packages/hooks",
"@wordpress/html-entities": "file:packages/html-entities",
"@wordpress/i18n": "file:packages/i18n",
"@wordpress/icons": "file:packages/icons",
"@wordpress/interactivity": "file:packages/interactivity",
+ "@wordpress/interactivity-router": "file:packages/interactivity-router",
"@wordpress/interface": "file:packages/interface",
"@wordpress/is-shallow-equal": "file:packages/is-shallow-equal",
"@wordpress/keyboard-shortcuts": "file:packages/keyboard-shortcuts",
@@ -4097,6 +4099,92 @@
"node": ">=0.1.90"
}
},
+ "node_modules/@csstools/css-parser-algorithms": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.1.tgz",
+ "integrity": "sha512-lSquqZCHxDfuTg/Sk2hiS0mcSFCEBuj49JfzPHJogDBT0mGCyY5A1AQzBWngitrp7i1/HAZpIgzF/VjhOEIJIg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@csstools/css-tokenizer": "^3.0.1"
+ }
+ },
+ "node_modules/@csstools/css-tokenizer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.1.tgz",
+ "integrity": "sha512-UBqaiu7kU0lfvaP982/o3khfXccVlHPWp0/vwwiIgDF0GmqqqxoiXC/6FCjlS9u92f7CoEz6nXKQnrn1kIAkOw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@csstools/media-query-list-parser": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz",
+ "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@csstools/css-parser-algorithms": "^3.0.1",
+ "@csstools/css-tokenizer": "^3.0.1"
+ }
+ },
+ "node_modules/@csstools/selector-specificity": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz",
+ "integrity": "sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "postcss-selector-parser": "^6.1.0"
+ }
+ },
"node_modules/@dabh/diagnostics": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz",
@@ -4117,6 +4205,16 @@
"node": ">=10.0.0"
}
},
+ "node_modules/@dual-bundle/import-meta-resolve": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz",
+ "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==",
+ "dev": true,
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/@egjs/hammerjs": {
"version": "2.0.17",
"resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
@@ -13362,6 +13460,34 @@
"url": "https://opencollective.com/storybook"
}
},
+ "node_modules/@stylistic/stylelint-plugin": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.0.1.tgz",
+ "integrity": "sha512-j3mH8HSw2Rob/KJFWZ627w3CQ8gQqVHtzCdPeEffUg5vOgpz4rgrR+Xw2kU0OQCDcdW8Y1nKfdXKKjM5Rn8X0g==",
+ "dev": true,
+ "dependencies": {
+ "@csstools/css-parser-algorithms": "^3.0.0",
+ "@csstools/css-tokenizer": "^3.0.0",
+ "@csstools/media-query-list-parser": "^3.0.0",
+ "is-plain-object": "^5.0.0",
+ "postcss-selector-parser": "^6.1.2",
+ "postcss-value-parser": "^4.2.0",
+ "style-search": "^0.1.0",
+ "stylelint": "^16.8.2"
+ },
+ "engines": {
+ "node": "^18.12 || >=20.9"
+ },
+ "peerDependencies": {
+ "stylelint": "^16.8.0"
+ }
+ },
+ "node_modules/@stylistic/stylelint-plugin/node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true
+ },
"node_modules/@svgr/babel-plugin-add-jsx-attribute": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz",
@@ -17028,6 +17154,10 @@
"resolved": "packages/eslint-plugin",
"link": true
},
+ "node_modules/@wordpress/fields": {
+ "resolved": "packages/fields",
+ "link": true
+ },
"node_modules/@wordpress/format-library": {
"resolved": "packages/format-library",
"link": true
@@ -21015,27 +21145,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/clone-regexp": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz",
- "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==",
- "dev": true,
- "dependencies": {
- "is-regexp": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/clone-regexp/node_modules/is-regexp": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz",
- "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/clone-response": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
@@ -22648,6 +22757,15 @@
"postcss": "^8.0.9"
}
},
+ "node_modules/css-functions-list": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz",
+ "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=12 || >=16"
+ }
+ },
"node_modules/css-loader": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.2.0.tgz",
@@ -26043,18 +26161,6 @@
"node": ">= 8"
}
},
- "node_modules/execall": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz",
- "integrity": "sha512-0FU2hZ5Hh6iQnarpRtQurM/aAvp3RIbfvgLHrcqJYzhXyV2KFruhuChf9NC6waAhiUR7FFtlugkI4p7f2Fqlow==",
- "dev": true,
- "dependencies": {
- "clone-regexp": "^2.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/exit": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
@@ -26559,10 +26665,13 @@
}
},
"node_modules/fastest-levenshtein": {
- "version": "1.0.12",
- "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz",
- "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==",
- "dev": true
+ "version": "1.0.16",
+ "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
+ "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4.9.1"
+ }
},
"node_modules/fastq": {
"version": "1.6.0",
@@ -27053,9 +27162,9 @@
}
},
"node_modules/flatted": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz",
- "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
+ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
"dev": true
},
"node_modules/flow-enums-runtime": {
@@ -28987,12 +29096,15 @@
}
},
"node_modules/html-tags": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz",
- "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz",
+ "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==",
"dev": true,
"engines": {
"node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/html-webpack-plugin": {
@@ -29452,15 +29564,6 @@
"node": ">=4"
}
},
- "node_modules/import-lazy": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
- "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/import-local": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
@@ -32384,9 +32487,9 @@
}
},
"node_modules/keyv": {
- "version": "4.5.3",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz",
- "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==",
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"dev": true,
"dependencies": {
"json-buffer": "3.0.1"
@@ -32436,9 +32539,9 @@
}
},
"node_modules/known-css-properties": {
- "version": "0.24.0",
- "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.24.0.tgz",
- "integrity": "sha512-RTSoaUAfLvpR357vWzAz/50Q/BmHfmE6ETSWfutT0AJiw10e6CmcdYRQJlLRd95B53D0Y2aD1jSxD3V3ySF+PA==",
+ "version": "0.34.0",
+ "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz",
+ "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==",
"dev": true
},
"node_modules/kuler": {
@@ -37962,12 +38065,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/normalize-selector": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz",
- "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=",
- "dev": true
- },
"node_modules/normalize-url": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
@@ -40991,9 +41088,9 @@
}
},
"node_modules/picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
+ "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew=="
},
"node_modules/picomatch": {
"version": "2.3.1",
@@ -41816,31 +41913,67 @@
"dev": true
},
"node_modules/postcss-resolve-nested-selector": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz",
- "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==",
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz",
+ "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==",
"dev": true
},
"node_modules/postcss-safe-parser": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz",
- "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.0.tgz",
+ "integrity": "sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==",
"dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss-safe-parser"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
"engines": {
- "node": ">=12.0"
+ "node": ">=18.0"
},
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
+ "peerDependencies": {
+ "postcss": "^8.4.31"
+ }
+ },
+ "node_modules/postcss-scss": {
+ "version": "4.0.9",
+ "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz",
+ "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss-scss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "engines": {
+ "node": ">=12.0"
},
"peerDependencies": {
- "postcss": "^8.3.3"
+ "postcss": "^8.4.29"
}
},
"node_modules/postcss-selector-parser": {
- "version": "6.0.13",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
- "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
+ "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
"dev": true,
"dependencies": {
"cssesc": "^3.0.0",
@@ -47308,128 +47441,135 @@
}
},
"node_modules/stylelint": {
- "version": "14.2.0",
- "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.2.0.tgz",
- "integrity": "sha512-i0DrmDXFNpDsWiwx6SPRs4/pyw4kvZgqpDGvsTslQMY7hpUl6r33aQvNSn6cnTg2wtZ9rreFElI7XAKpOWi1vQ==",
+ "version": "16.8.2",
+ "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.8.2.tgz",
+ "integrity": "sha512-fInKATippQhcSm7AB+T32GpI+626yohrg33GkFT/5jzliUw5qhlwZq2UQQwgl3HsHrf09oeARi0ZwgY/UWEv9A==",
"dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/stylelint"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/stylelint"
+ }
+ ],
"dependencies": {
+ "@csstools/css-parser-algorithms": "^3.0.0",
+ "@csstools/css-tokenizer": "^3.0.0",
+ "@csstools/media-query-list-parser": "^3.0.0",
+ "@csstools/selector-specificity": "^4.0.0",
+ "@dual-bundle/import-meta-resolve": "^4.1.0",
"balanced-match": "^2.0.0",
- "colord": "^2.9.2",
- "cosmiconfig": "^7.0.1",
- "debug": "^4.3.3",
- "execall": "^2.0.0",
- "fast-glob": "^3.2.7",
- "fastest-levenshtein": "^1.0.12",
- "file-entry-cache": "^6.0.1",
- "get-stdin": "^8.0.0",
+ "colord": "^2.9.3",
+ "cosmiconfig": "^9.0.0",
+ "css-functions-list": "^3.2.2",
+ "css-tree": "^2.3.1",
+ "debug": "^4.3.6",
+ "fast-glob": "^3.3.2",
+ "fastest-levenshtein": "^1.0.16",
+ "file-entry-cache": "^9.0.0",
"global-modules": "^2.0.0",
- "globby": "^11.0.4",
+ "globby": "^11.1.0",
"globjoin": "^0.1.4",
- "html-tags": "^3.1.0",
- "ignore": "^5.2.0",
- "import-lazy": "^4.0.0",
+ "html-tags": "^3.3.1",
+ "ignore": "^5.3.2",
"imurmurhash": "^0.1.4",
"is-plain-object": "^5.0.0",
- "known-css-properties": "^0.24.0",
+ "known-css-properties": "^0.34.0",
"mathml-tag-names": "^2.1.3",
- "meow": "^9.0.0",
- "micromatch": "^4.0.4",
+ "meow": "^13.2.0",
+ "micromatch": "^4.0.7",
"normalize-path": "^3.0.0",
- "normalize-selector": "^0.2.0",
- "picocolors": "^1.0.0",
- "postcss": "^8.3.11",
- "postcss-media-query-parser": "^0.2.3",
- "postcss-resolve-nested-selector": "^0.1.1",
- "postcss-safe-parser": "^6.0.0",
- "postcss-selector-parser": "^6.0.7",
- "postcss-value-parser": "^4.1.0",
+ "picocolors": "^1.0.1",
+ "postcss": "^8.4.41",
+ "postcss-resolve-nested-selector": "^0.1.6",
+ "postcss-safe-parser": "^7.0.0",
+ "postcss-selector-parser": "^6.1.2",
+ "postcss-value-parser": "^4.2.0",
"resolve-from": "^5.0.0",
- "specificity": "^0.4.1",
"string-width": "^4.2.3",
- "strip-ansi": "^6.0.1",
- "style-search": "^0.1.0",
+ "strip-ansi": "^7.1.0",
+ "supports-hyperlinks": "^3.0.0",
"svg-tags": "^1.0.0",
- "table": "^6.7.5",
- "v8-compile-cache": "^2.3.0",
- "write-file-atomic": "^3.0.3"
+ "table": "^6.8.2",
+ "write-file-atomic": "^5.0.1"
},
"bin": {
- "stylelint": "bin/stylelint.js"
+ "stylelint": "bin/stylelint.mjs"
},
"engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/stylelint"
+ "node": ">=18.12.0"
}
},
- "node_modules/stylelint-config-recommended": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-6.0.0.tgz",
- "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==",
- "dev": true,
- "peerDependencies": {
- "stylelint": "^14.0.0"
- }
+ "node_modules/stylelint/node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
},
- "node_modules/stylelint-config-recommended-scss": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-5.0.2.tgz",
- "integrity": "sha512-b14BSZjcwW0hqbzm9b0S/ScN2+3CO3O4vcMNOw2KGf8lfVSwJ4p5TbNEXKwKl1+0FMtgRXZj6DqVUe/7nGnuBg==",
+ "node_modules/stylelint/node_modules/balanced-match": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz",
+ "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==",
+ "dev": true
+ },
+ "node_modules/stylelint/node_modules/cosmiconfig": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz",
+ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==",
"dev": true,
"dependencies": {
- "postcss-scss": "^4.0.2",
- "stylelint-config-recommended": "^6.0.0",
- "stylelint-scss": "^4.0.0"
+ "env-paths": "^2.2.1",
+ "import-fresh": "^3.3.0",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.2.0"
},
- "peerDependencies": {
- "stylelint": "^14.0.0"
- }
- },
- "node_modules/stylelint-config-recommended-scss/node_modules/postcss-scss": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.3.tgz",
- "integrity": "sha512-j4KxzWovfdHsyxwl1BxkUal/O4uirvHgdzMKS1aWJBAV0qh2qj5qAZqpeBfVUYGWv+4iK9Az7SPyZ4fyNju1uA==",
- "dev": true,
"engines": {
- "node": ">=12.0"
+ "node": ">=14"
},
"funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
+ "url": "https://github.com/sponsors/d-fischer"
},
"peerDependencies": {
- "postcss": "^8.3.3"
+ "typescript": ">=4.9.5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
}
},
- "node_modules/stylelint-scss": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.1.0.tgz",
- "integrity": "sha512-BNYTo7MMamhFOlcaAWp2dMpjg6hPyM/FFqfDIYzmYVLMmQJqc8lWRIiTqP4UX5bresj9Vo0dKC6odSh43VP2NA==",
+ "node_modules/stylelint/node_modules/css-tree": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
"dev": true,
"dependencies": {
- "lodash": "^4.17.21",
- "postcss-media-query-parser": "^0.2.3",
- "postcss-resolve-nested-selector": "^0.1.1",
- "postcss-selector-parser": "^6.0.6",
- "postcss-value-parser": "^4.1.0"
+ "mdn-data": "2.0.30",
+ "source-map-js": "^1.0.1"
},
- "peerDependencies": {
- "stylelint": "^14.0.0"
+ "engines": {
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
}
},
- "node_modules/stylelint-scss/node_modules/postcss-value-parser": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
- "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
- "dev": true
- },
- "node_modules/stylelint/node_modules/balanced-match": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz",
- "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==",
- "dev": true
+ "node_modules/stylelint/node_modules/debug": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
+ "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
},
"node_modules/stylelint/node_modules/emoji-regex": {
"version": "8.0.0",
@@ -47437,16 +47577,75 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
- "node_modules/stylelint/node_modules/get-stdin": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz",
- "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==",
+ "node_modules/stylelint/node_modules/fast-glob": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
+ "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/stylelint/node_modules/file-entry-cache": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.0.0.tgz",
+ "integrity": "sha512-6MgEugi8p2tiUhqO7GnPsmbCCzj0YRCwwaTbpGRyKZesjRSzkqkAE9fPp7V2yMs5hwfgbQLgdvSSkGNg1s5Uvw==",
"dev": true,
+ "dependencies": {
+ "flat-cache": "^5.0.0"
+ },
"engines": {
- "node": ">=10"
+ "node": ">=18"
+ }
+ },
+ "node_modules/stylelint/node_modules/flat-cache": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz",
+ "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==",
+ "dev": true,
+ "dependencies": {
+ "flatted": "^3.3.1",
+ "keyv": "^4.5.4"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/stylelint/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/stylelint/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/stylelint/node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
}
},
"node_modules/stylelint/node_modules/is-fullwidth-code-point": {
@@ -47458,45 +47657,68 @@
"node": ">=8"
}
},
- "node_modules/stylelint/node_modules/meow": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz",
- "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==",
+ "node_modules/stylelint/node_modules/js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"dependencies": {
- "@types/minimist": "^1.2.0",
- "camelcase-keys": "^6.2.2",
- "decamelize": "^1.2.0",
- "decamelize-keys": "^1.1.0",
- "hard-rejection": "^2.1.0",
- "minimist-options": "4.1.0",
- "normalize-package-data": "^3.0.0",
- "read-pkg-up": "^7.0.1",
- "redent": "^3.0.0",
- "trim-newlines": "^3.0.0",
- "type-fest": "^0.18.0",
- "yargs-parser": "^20.2.3"
+ "argparse": "^2.0.1"
},
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/stylelint/node_modules/mdn-data": {
+ "version": "2.0.30",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
+ "dev": true
+ },
+ "node_modules/stylelint/node_modules/meow": {
+ "version": "13.2.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz",
+ "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==",
+ "dev": true,
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/stylelint/node_modules/normalize-package-data": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
- "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
+ "node_modules/stylelint/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/stylelint/node_modules/postcss": {
+ "version": "8.4.41",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz",
+ "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
"dependencies": {
- "hosted-git-info": "^4.0.1",
- "is-core-module": "^2.5.0",
- "semver": "^7.3.4",
- "validate-npm-package-license": "^3.0.1"
+ "nanoid": "^3.3.7",
+ "picocolors": "^1.0.1",
+ "source-map-js": "^1.2.0"
},
"engines": {
- "node": ">=10"
+ "node": "^10 || ^12 || >=14"
}
},
"node_modules/stylelint/node_modules/postcss-value-parser": {
@@ -47514,6 +47736,27 @@
"node": ">=8"
}
},
+ "node_modules/stylelint/node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true,
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/stylelint/node_modules/source-map-js": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
+ "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/stylelint/node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -47528,28 +47771,84 @@
"node": ">=8"
}
},
- "node_modules/stylelint/node_modules/type-fest": {
- "version": "0.18.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz",
- "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==",
+ "node_modules/stylelint/node_modules/string-width/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
"engines": {
- "node": ">=10"
+ "node": ">=8"
+ }
+ },
+ "node_modules/stylelint/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/stylelint/node_modules/strip-ansi/node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/stylelint/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/stylelint/node_modules/supports-hyperlinks": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz",
+ "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0",
+ "supports-color": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=14.18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/stylelint/node_modules/write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
"dev": true,
"dependencies": {
"imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
+ "signal-exit": "^4.0.1"
+ },
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/stylis": {
@@ -47742,9 +48041,9 @@
}
},
"node_modules/table": {
- "version": "6.8.0",
- "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz",
- "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==",
+ "version": "6.8.2",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz",
+ "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==",
"dev": true,
"dependencies": {
"ajv": "^8.0.1",
@@ -53890,6 +54189,21 @@
}
}
},
+ "packages/fields": {
+ "name": "@wordpress/fields",
+ "version": "0.0.1",
+ "license": "GPL-2.0-or-later",
+ "dependencies": {
+ "@babel/runtime": "^7.16.0"
+ },
+ "engines": {
+ "node": ">=18.12.0",
+ "npm": ">=8.19.2"
+ },
+ "peerDependencies": {
+ "react": "^18.0.0"
+ }
+ },
"packages/format-library": {
"name": "@wordpress/format-library",
"version": "5.7.0",
@@ -54812,7 +55126,7 @@
"sass-loader": "^12.1.0",
"schema-utils": "^4.2.0",
"source-map-loader": "^3.0.0",
- "stylelint": "^14.2.0",
+ "stylelint": "^16.8.2",
"terser-webpack-plugin": "^5.3.9",
"url-loader": "^4.1.1",
"webpack": "^5.88.2",
@@ -55266,15 +55580,116 @@
"dev": true,
"license": "MIT",
"dependencies": {
- "stylelint-config-recommended": "^6.0.0",
- "stylelint-config-recommended-scss": "^5.0.2"
+ "@stylistic/stylelint-plugin": "^3.0.1",
+ "stylelint-config-recommended": "^14.0.1",
+ "stylelint-config-recommended-scss": "^14.1.0"
},
"engines": {
"node": ">=18.12.0",
"npm": ">=8.19.2"
},
"peerDependencies": {
- "stylelint": "^14.2"
+ "stylelint": "^16.8.2"
+ }
+ },
+ "packages/stylelint-config/node_modules/css-tree": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
+ "dev": true,
+ "dependencies": {
+ "mdn-data": "2.0.30",
+ "source-map-js": "^1.0.1"
+ },
+ "engines": {
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
+ }
+ },
+ "packages/stylelint-config/node_modules/mdn-data": {
+ "version": "2.0.30",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
+ "dev": true
+ },
+ "packages/stylelint-config/node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true
+ },
+ "packages/stylelint-config/node_modules/source-map-js": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
+ "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "packages/stylelint-config/node_modules/stylelint-config-recommended": {
+ "version": "14.0.1",
+ "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz",
+ "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/stylelint"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/stylelint"
+ }
+ ],
+ "engines": {
+ "node": ">=18.12.0"
+ },
+ "peerDependencies": {
+ "stylelint": "^16.1.0"
+ }
+ },
+ "packages/stylelint-config/node_modules/stylelint-config-recommended-scss": {
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz",
+ "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==",
+ "dev": true,
+ "dependencies": {
+ "postcss-scss": "^4.0.9",
+ "stylelint-config-recommended": "^14.0.1",
+ "stylelint-scss": "^6.4.0"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.3.3",
+ "stylelint": "^16.6.1"
+ },
+ "peerDependenciesMeta": {
+ "postcss": {
+ "optional": true
+ }
+ }
+ },
+ "packages/stylelint-config/node_modules/stylelint-scss": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.5.1.tgz",
+ "integrity": "sha512-ZLqdqihm6uDYkrsOeD6YWb+stZI8Wn92kUNDhE4M+g9g1aCnRv0JlOrttFiAJJwaNzpdQgX3YJb5vDQXVuO9Ww==",
+ "dev": true,
+ "dependencies": {
+ "css-tree": "2.3.1",
+ "is-plain-object": "5.0.0",
+ "known-css-properties": "^0.34.0",
+ "postcss-media-query-parser": "^0.2.3",
+ "postcss-resolve-nested-selector": "^0.1.4",
+ "postcss-selector-parser": "^6.1.1",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ },
+ "peerDependencies": {
+ "stylelint": "^16.0.2"
}
},
"packages/sync": {
@@ -58150,6 +58565,30 @@
"integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
"dev": true
},
+ "@csstools/css-parser-algorithms": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.1.tgz",
+ "integrity": "sha512-lSquqZCHxDfuTg/Sk2hiS0mcSFCEBuj49JfzPHJogDBT0mGCyY5A1AQzBWngitrp7i1/HAZpIgzF/VjhOEIJIg==",
+ "dev": true
+ },
+ "@csstools/css-tokenizer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.1.tgz",
+ "integrity": "sha512-UBqaiu7kU0lfvaP982/o3khfXccVlHPWp0/vwwiIgDF0GmqqqxoiXC/6FCjlS9u92f7CoEz6nXKQnrn1kIAkOw==",
+ "dev": true
+ },
+ "@csstools/media-query-list-parser": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz",
+ "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==",
+ "dev": true
+ },
+ "@csstools/selector-specificity": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz",
+ "integrity": "sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==",
+ "dev": true
+ },
"@dabh/diagnostics": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz",
@@ -58167,6 +58606,12 @@
"integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
"dev": true
},
+ "@dual-bundle/import-meta-resolve": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz",
+ "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==",
+ "dev": true
+ },
"@egjs/hammerjs": {
"version": "2.0.17",
"resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
@@ -64734,6 +65179,30 @@
"file-system-cache": "2.3.0"
}
},
+ "@stylistic/stylelint-plugin": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.0.1.tgz",
+ "integrity": "sha512-j3mH8HSw2Rob/KJFWZ627w3CQ8gQqVHtzCdPeEffUg5vOgpz4rgrR+Xw2kU0OQCDcdW8Y1nKfdXKKjM5Rn8X0g==",
+ "dev": true,
+ "requires": {
+ "@csstools/css-parser-algorithms": "^3.0.0",
+ "@csstools/css-tokenizer": "^3.0.0",
+ "@csstools/media-query-list-parser": "^3.0.0",
+ "is-plain-object": "^5.0.0",
+ "postcss-selector-parser": "^6.1.2",
+ "postcss-value-parser": "^4.2.0",
+ "style-search": "^0.1.0",
+ "stylelint": "^16.8.2"
+ },
+ "dependencies": {
+ "postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true
+ }
+ }
+ },
"@svgr/babel-plugin-add-jsx-attribute": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz",
@@ -68447,6 +68916,12 @@
"requireindex": "^1.2.0"
}
},
+ "@wordpress/fields": {
+ "version": "file:packages/fields",
+ "requires": {
+ "@babel/runtime": "^7.16.0"
+ }
+ },
"@wordpress/format-library": {
"version": "file:packages/format-library",
"requires": {
@@ -68990,7 +69465,7 @@
"sass-loader": "^12.1.0",
"schema-utils": "^4.2.0",
"source-map-loader": "^3.0.0",
- "stylelint": "^14.2.0",
+ "stylelint": "^16.8.2",
"terser-webpack-plugin": "^5.3.9",
"url-loader": "^4.1.1",
"webpack": "^5.88.2",
@@ -69304,8 +69779,71 @@
"@wordpress/stylelint-config": {
"version": "file:packages/stylelint-config",
"requires": {
- "stylelint-config-recommended": "^6.0.0",
- "stylelint-config-recommended-scss": "^5.0.2"
+ "@stylistic/stylelint-plugin": "^3.0.1",
+ "stylelint-config-recommended": "^14.0.1",
+ "stylelint-config-recommended-scss": "^14.1.0"
+ },
+ "dependencies": {
+ "css-tree": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
+ "dev": true,
+ "requires": {
+ "mdn-data": "2.0.30",
+ "source-map-js": "^1.0.1"
+ }
+ },
+ "mdn-data": {
+ "version": "2.0.30",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
+ "dev": true
+ },
+ "postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true
+ },
+ "source-map-js": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
+ "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
+ "dev": true
+ },
+ "stylelint-config-recommended": {
+ "version": "14.0.1",
+ "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz",
+ "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==",
+ "dev": true
+ },
+ "stylelint-config-recommended-scss": {
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz",
+ "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==",
+ "dev": true,
+ "requires": {
+ "postcss-scss": "^4.0.9",
+ "stylelint-config-recommended": "^14.0.1",
+ "stylelint-scss": "^6.4.0"
+ }
+ },
+ "stylelint-scss": {
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.5.1.tgz",
+ "integrity": "sha512-ZLqdqihm6uDYkrsOeD6YWb+stZI8Wn92kUNDhE4M+g9g1aCnRv0JlOrttFiAJJwaNzpdQgX3YJb5vDQXVuO9Ww==",
+ "dev": true,
+ "requires": {
+ "css-tree": "2.3.1",
+ "is-plain-object": "5.0.0",
+ "known-css-properties": "^0.34.0",
+ "postcss-media-query-parser": "^0.2.3",
+ "postcss-resolve-nested-selector": "^0.1.4",
+ "postcss-selector-parser": "^6.1.1",
+ "postcss-value-parser": "^4.2.0"
+ }
+ }
}
},
"@wordpress/sync": {
@@ -72301,23 +72839,6 @@
}
}
},
- "clone-regexp": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz",
- "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==",
- "dev": true,
- "requires": {
- "is-regexp": "^2.0.0"
- },
- "dependencies": {
- "is-regexp": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz",
- "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==",
- "dev": true
- }
- }
- },
"clone-response": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
@@ -73594,6 +74115,12 @@
"integrity": "sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==",
"dev": true
},
+ "css-functions-list": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz",
+ "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==",
+ "dev": true
+ },
"css-loader": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.2.0.tgz",
@@ -76129,15 +76656,6 @@
}
}
},
- "execall": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz",
- "integrity": "sha512-0FU2hZ5Hh6iQnarpRtQurM/aAvp3RIbfvgLHrcqJYzhXyV2KFruhuChf9NC6waAhiUR7FFtlugkI4p7f2Fqlow==",
- "dev": true,
- "requires": {
- "clone-regexp": "^2.1.0"
- }
- },
"exit": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
@@ -76550,9 +77068,9 @@
}
},
"fastest-levenshtein": {
- "version": "1.0.12",
- "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz",
- "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==",
+ "version": "1.0.16",
+ "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
+ "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==",
"dev": true
},
"fastq": {
@@ -76941,9 +77459,9 @@
}
},
"flatted": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz",
- "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
+ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
"dev": true
},
"flow-enums-runtime": {
@@ -78407,9 +78925,9 @@
}
},
"html-tags": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz",
- "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz",
+ "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==",
"dev": true
},
"html-webpack-plugin": {
@@ -78731,12 +79249,6 @@
}
}
},
- "import-lazy": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
- "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
- "dev": true
- },
"import-local": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
@@ -80890,9 +81402,9 @@
}
},
"keyv": {
- "version": "4.5.3",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz",
- "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==",
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"dev": true,
"requires": {
"json-buffer": "3.0.1"
@@ -80930,9 +81442,9 @@
"dev": true
},
"known-css-properties": {
- "version": "0.24.0",
- "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.24.0.tgz",
- "integrity": "sha512-RTSoaUAfLvpR357vWzAz/50Q/BmHfmE6ETSWfutT0AJiw10e6CmcdYRQJlLRd95B53D0Y2aD1jSxD3V3ySF+PA==",
+ "version": "0.34.0",
+ "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz",
+ "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==",
"dev": true
},
"kuler": {
@@ -85240,12 +85752,6 @@
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
"dev": true
},
- "normalize-selector": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz",
- "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=",
- "dev": true
- },
"normalize-url": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
@@ -87503,9 +88009,9 @@
"integrity": "sha512-SO+NP5argMoJVCWcYiOofPUeEWDIM47FNCBJtp6uJ8PpjtBcudYJTzCbCMit5dzmfSLCoijzEwIXOqPqD45xQg=="
},
"picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
+ "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew=="
},
"picomatch": {
"version": "2.3.1",
@@ -88095,21 +88601,27 @@
}
},
"postcss-resolve-nested-selector": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz",
- "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==",
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz",
+ "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==",
"dev": true
},
"postcss-safe-parser": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz",
- "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.0.tgz",
+ "integrity": "sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==",
+ "dev": true
+ },
+ "postcss-scss": {
+ "version": "4.0.9",
+ "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz",
+ "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==",
"dev": true
},
"postcss-selector-parser": {
- "version": "6.0.13",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
- "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
+ "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
"dev": true,
"requires": {
"cssesc": "^3.0.0",
@@ -92285,68 +92797,152 @@
}
},
"stylelint": {
- "version": "14.2.0",
- "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.2.0.tgz",
- "integrity": "sha512-i0DrmDXFNpDsWiwx6SPRs4/pyw4kvZgqpDGvsTslQMY7hpUl6r33aQvNSn6cnTg2wtZ9rreFElI7XAKpOWi1vQ==",
+ "version": "16.8.2",
+ "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.8.2.tgz",
+ "integrity": "sha512-fInKATippQhcSm7AB+T32GpI+626yohrg33GkFT/5jzliUw5qhlwZq2UQQwgl3HsHrf09oeARi0ZwgY/UWEv9A==",
"dev": true,
"requires": {
+ "@csstools/css-parser-algorithms": "^3.0.0",
+ "@csstools/css-tokenizer": "^3.0.0",
+ "@csstools/media-query-list-parser": "^3.0.0",
+ "@csstools/selector-specificity": "^4.0.0",
+ "@dual-bundle/import-meta-resolve": "^4.1.0",
"balanced-match": "^2.0.0",
- "colord": "^2.9.2",
- "cosmiconfig": "^7.0.1",
- "debug": "^4.3.3",
- "execall": "^2.0.0",
- "fast-glob": "^3.2.7",
- "fastest-levenshtein": "^1.0.12",
- "file-entry-cache": "^6.0.1",
- "get-stdin": "^8.0.0",
+ "colord": "^2.9.3",
+ "cosmiconfig": "^9.0.0",
+ "css-functions-list": "^3.2.2",
+ "css-tree": "^2.3.1",
+ "debug": "^4.3.6",
+ "fast-glob": "^3.3.2",
+ "fastest-levenshtein": "^1.0.16",
+ "file-entry-cache": "^9.0.0",
"global-modules": "^2.0.0",
- "globby": "^11.0.4",
+ "globby": "^11.1.0",
"globjoin": "^0.1.4",
- "html-tags": "^3.1.0",
- "ignore": "^5.2.0",
- "import-lazy": "^4.0.0",
+ "html-tags": "^3.3.1",
+ "ignore": "^5.3.2",
"imurmurhash": "^0.1.4",
"is-plain-object": "^5.0.0",
- "known-css-properties": "^0.24.0",
+ "known-css-properties": "^0.34.0",
"mathml-tag-names": "^2.1.3",
- "meow": "^9.0.0",
- "micromatch": "^4.0.4",
+ "meow": "^13.2.0",
+ "micromatch": "^4.0.7",
"normalize-path": "^3.0.0",
- "normalize-selector": "^0.2.0",
- "picocolors": "^1.0.0",
- "postcss": "^8.3.11",
- "postcss-media-query-parser": "^0.2.3",
- "postcss-resolve-nested-selector": "^0.1.1",
- "postcss-safe-parser": "^6.0.0",
- "postcss-selector-parser": "^6.0.7",
- "postcss-value-parser": "^4.1.0",
+ "picocolors": "^1.0.1",
+ "postcss": "^8.4.41",
+ "postcss-resolve-nested-selector": "^0.1.6",
+ "postcss-safe-parser": "^7.0.0",
+ "postcss-selector-parser": "^6.1.2",
+ "postcss-value-parser": "^4.2.0",
"resolve-from": "^5.0.0",
- "specificity": "^0.4.1",
"string-width": "^4.2.3",
- "strip-ansi": "^6.0.1",
- "style-search": "^0.1.0",
+ "strip-ansi": "^7.1.0",
+ "supports-hyperlinks": "^3.0.0",
"svg-tags": "^1.0.0",
- "table": "^6.7.5",
- "v8-compile-cache": "^2.3.0",
- "write-file-atomic": "^3.0.3"
+ "table": "^6.8.2",
+ "write-file-atomic": "^5.0.1"
},
"dependencies": {
+ "argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
+ },
"balanced-match": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz",
"integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==",
"dev": true
},
+ "cosmiconfig": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz",
+ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==",
+ "dev": true,
+ "requires": {
+ "env-paths": "^2.2.1",
+ "import-fresh": "^3.3.0",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.2.0"
+ }
+ },
+ "css-tree": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
+ "dev": true,
+ "requires": {
+ "mdn-data": "2.0.30",
+ "source-map-js": "^1.0.1"
+ }
+ },
+ "debug": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
+ "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
- "get-stdin": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz",
- "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==",
+ "fast-glob": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
+ "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ }
+ },
+ "file-entry-cache": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.0.0.tgz",
+ "integrity": "sha512-6MgEugi8p2tiUhqO7GnPsmbCCzj0YRCwwaTbpGRyKZesjRSzkqkAE9fPp7V2yMs5hwfgbQLgdvSSkGNg1s5Uvw==",
+ "dev": true,
+ "requires": {
+ "flat-cache": "^5.0.0"
+ }
+ },
+ "flat-cache": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz",
+ "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==",
+ "dev": true,
+ "requires": {
+ "flatted": "^3.3.1",
+ "keyv": "^4.5.4"
+ }
+ },
+ "glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
"dev": true
},
"is-fullwidth-code-point": {
@@ -92355,36 +92951,42 @@
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
- "meow": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz",
- "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==",
+ "js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"requires": {
- "@types/minimist": "^1.2.0",
- "camelcase-keys": "^6.2.2",
- "decamelize": "^1.2.0",
- "decamelize-keys": "^1.1.0",
- "hard-rejection": "^2.1.0",
- "minimist-options": "4.1.0",
- "normalize-package-data": "^3.0.0",
- "read-pkg-up": "^7.0.1",
- "redent": "^3.0.0",
- "trim-newlines": "^3.0.0",
- "type-fest": "^0.18.0",
- "yargs-parser": "^20.2.3"
+ "argparse": "^2.0.1"
}
},
- "normalize-package-data": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
- "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
+ "mdn-data": {
+ "version": "2.0.30",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
+ "dev": true
+ },
+ "meow": {
+ "version": "13.2.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz",
+ "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "postcss": {
+ "version": "8.4.41",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz",
+ "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==",
"dev": true,
"requires": {
- "hosted-git-info": "^4.0.1",
- "is-core-module": "^2.5.0",
- "semver": "^7.3.4",
- "validate-npm-package-license": "^3.0.1"
+ "nanoid": "^3.3.7",
+ "picocolors": "^1.0.1",
+ "source-map-js": "^1.2.0"
}
},
"postcss-value-parser": {
@@ -92399,6 +93001,18 @@
"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true
},
+ "signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true
+ },
+ "source-map-js": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
+ "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
+ "dev": true
+ },
"string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -92408,74 +93022,67 @@
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
+ },
+ "dependencies": {
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
}
},
- "type-fest": {
- "version": "0.18.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz",
- "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==",
- "dev": true
+ "strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^6.0.1"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "dev": true
+ }
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "supports-hyperlinks": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz",
+ "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0",
+ "supports-color": "^7.0.0"
+ }
},
"write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
"dev": true,
"requires": {
"imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
+ "signal-exit": "^4.0.1"
}
}
}
},
- "stylelint-config-recommended": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-6.0.0.tgz",
- "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==",
- "dev": true
- },
- "stylelint-config-recommended-scss": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-5.0.2.tgz",
- "integrity": "sha512-b14BSZjcwW0hqbzm9b0S/ScN2+3CO3O4vcMNOw2KGf8lfVSwJ4p5TbNEXKwKl1+0FMtgRXZj6DqVUe/7nGnuBg==",
- "dev": true,
- "requires": {
- "postcss-scss": "^4.0.2",
- "stylelint-config-recommended": "^6.0.0",
- "stylelint-scss": "^4.0.0"
- },
- "dependencies": {
- "postcss-scss": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.3.tgz",
- "integrity": "sha512-j4KxzWovfdHsyxwl1BxkUal/O4uirvHgdzMKS1aWJBAV0qh2qj5qAZqpeBfVUYGWv+4iK9Az7SPyZ4fyNju1uA==",
- "dev": true
- }
- }
- },
- "stylelint-scss": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.1.0.tgz",
- "integrity": "sha512-BNYTo7MMamhFOlcaAWp2dMpjg6hPyM/FFqfDIYzmYVLMmQJqc8lWRIiTqP4UX5bresj9Vo0dKC6odSh43VP2NA==",
- "dev": true,
- "requires": {
- "lodash": "^4.17.21",
- "postcss-media-query-parser": "^0.2.3",
- "postcss-resolve-nested-selector": "^0.1.1",
- "postcss-selector-parser": "^6.0.6",
- "postcss-value-parser": "^4.1.0"
- },
- "dependencies": {
- "postcss-value-parser": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
- "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
- "dev": true
- }
- }
- },
"stylis": {
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz",
@@ -92620,9 +93227,9 @@
}
},
"table": {
- "version": "6.8.0",
- "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz",
- "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==",
+ "version": "6.8.2",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz",
+ "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==",
"dev": true,
"requires": {
"ajv": "^8.0.1",
diff --git a/package.json b/package.json
index 22cdf2ce7acc8..29e5f10b6f7a5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
- "version": "19.2.0-rc.1",
+ "version": "19.2.0",
"private": true,
"description": "A new WordPress editor experience.",
"author": "The WordPress Contributors",
@@ -52,12 +52,14 @@
"@wordpress/editor": "file:packages/editor",
"@wordpress/element": "file:packages/element",
"@wordpress/escape-html": "file:packages/escape-html",
+ "@wordpress/fields": "file:packages/fields",
"@wordpress/format-library": "file:packages/format-library",
"@wordpress/hooks": "file:packages/hooks",
"@wordpress/html-entities": "file:packages/html-entities",
"@wordpress/i18n": "file:packages/i18n",
"@wordpress/icons": "file:packages/icons",
"@wordpress/interactivity": "file:packages/interactivity",
+ "@wordpress/interactivity-router": "file:packages/interactivity-router",
"@wordpress/interface": "file:packages/interface",
"@wordpress/is-shallow-equal": "file:packages/is-shallow-equal",
"@wordpress/keyboard-shortcuts": "file:packages/keyboard-shortcuts",
diff --git a/packages/base-styles/_mixins.scss b/packages/base-styles/_mixins.scss
index ebccbe0e5e8ae..91017c8bb9932 100644
--- a/packages/base-styles/_mixins.scss
+++ b/packages/base-styles/_mixins.scss
@@ -512,7 +512,7 @@
@mixin gradient-colors-deprecated() {
// Our classes uses the same values we set for gradient value attributes.
- /* stylelint-disable function-comma-space-after -- We can not use spacing because of WP multi site kses rule. */
+ /* stylelint-disable @stylistic/function-comma-space-after -- We can not use spacing because of WP multi site kses rule. */
.has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background {
background: linear-gradient(135deg,rgba(0,208,132,1) 0%,rgba(6,147,227,1) 100%);
}
@@ -540,7 +540,7 @@
.has-midnight-gradient-background {
background: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);
}
- /* stylelint-enable function-comma-space-after */
+ /* stylelint-enable @stylistic/function-comma-space-after */
}
@mixin custom-scrollbars-on-hover($handle-color, $handle-color-hover) {
diff --git a/packages/block-editor/src/components/block-inspector/style.scss b/packages/block-editor/src/components/block-inspector/style.scss
index cf7131722722c..bdbf3660d9619 100644
--- a/packages/block-editor/src/components/block-inspector/style.scss
+++ b/packages/block-editor/src/components/block-inspector/style.scss
@@ -11,10 +11,8 @@
}
.components-base-control {
- margin-bottom: #{ $grid-unit-30 };
-
- &:last-child {
- margin-bottom: $grid-unit-10;
+ &:where(:not(:last-child)) {
+ margin-bottom: $grid-unit-20;
}
}
diff --git a/packages/block-editor/src/components/block-switcher/style.scss b/packages/block-editor/src/components/block-switcher/style.scss
index 823a656668a62..3dc2a7d591c92 100644
--- a/packages/block-editor/src/components/block-switcher/style.scss
+++ b/packages/block-editor/src/components/block-switcher/style.scss
@@ -55,30 +55,6 @@
}
}
-// Style this the same as the block buttons in the library.
-// Needs specificity to override the icon button.
-.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon,
-.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon,
-.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon,
-.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon {
- .block-editor-block-icon {
- height: 100%;
- position: relative;
- margin: 0 auto;
- display: flex;
- align-items: center;
- min-width: 100%;
- }
-
- // Position the focus style correctly.
- &::before {
- top: $grid-unit-10;
- right: $grid-unit-10;
- bottom: $grid-unit-10;
- left: $grid-unit-10;
- }
-}
-
.components-popover.block-editor-block-switcher__popover .components-popover__content {
min-width: 300px;
}
diff --git a/packages/block-editor/src/components/list-view/index.js b/packages/block-editor/src/components/list-view/index.js
index 1493fa655a5aa..87599ea870913 100644
--- a/packages/block-editor/src/components/list-view/index.js
+++ b/packages/block-editor/src/components/list-view/index.js
@@ -119,20 +119,16 @@ function ListViewComponent(
const blockIndexes = useListViewBlockIndexes( clientIdsTree );
const { getBlock } = useSelect( blockEditorStore );
- const { visibleBlockCount, shouldShowInnerBlocks } = useSelect(
+ const { visibleBlockCount } = useSelect(
( select ) => {
- const {
- getGlobalBlockCount,
- getClientIdsOfDescendants,
- __unstableGetEditorMode,
- } = select( blockEditorStore );
+ const { getGlobalBlockCount, getClientIdsOfDescendants } =
+ select( blockEditorStore );
const draggedBlockCount =
draggedClientIds?.length > 0
? getClientIdsOfDescendants( draggedClientIds ).length + 1
: 0;
return {
visibleBlockCount: getGlobalBlockCount() - draggedBlockCount,
- shouldShowInnerBlocks: __unstableGetEditorMode() !== 'zoom-out',
};
},
[ draggedClientIds ]
@@ -397,7 +393,6 @@ function ListViewComponent(
fixedListWindow={ fixedListWindow }
selectedClientIds={ selectedClientIds }
isExpanded={ isExpanded }
- shouldShowInnerBlocks={ shouldShowInnerBlocks }
showAppender={ showAppender }
/>
diff --git a/packages/block-editor/src/hooks/layout.js b/packages/block-editor/src/hooks/layout.js
index 2ea8c5f37c9e7..22d916d7b791b 100644
--- a/packages/block-editor/src/hooks/layout.js
+++ b/packages/block-editor/src/hooks/layout.js
@@ -233,7 +233,6 @@ function LayoutPanelPure( {
<>
- { showColumnsControl && (
-
- ) }
- { showMinWidthControl && (
-
- ) }
+
+ { showColumnsControl && (
+
+ ) }
+ { showMinWidthControl && (
+
+ ) }
+
>
);
},
diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js
index b72ebd1818337..d76f90bc94ffe 100644
--- a/packages/block-editor/src/store/private-selectors.js
+++ b/packages/block-editor/src/store/private-selectors.js
@@ -114,6 +114,7 @@ export const getEnabledClientIdsTree = createSelector(
state.blockEditingModes,
state.settings.templateLock,
state.blockListSettings,
+ state.editorMode,
]
);
diff --git a/packages/block-library/package.json b/packages/block-library/package.json
index 4d0212490858c..1353ef24c77d8 100644
--- a/packages/block-library/package.json
+++ b/packages/block-library/package.json
@@ -30,6 +30,13 @@
"src/**/*.scss",
"{src,build,build-module}/*/init.js"
],
+ "wpScriptModuleExports": {
+ "./file/view": "./build-module/file/view.js",
+ "./image/view": "./build-module/image/view.js",
+ "./navigation/view": "./build-module/navigation/view.js",
+ "./query/view": "./build-module/query/view.js",
+ "./search/view": "./build-module/search/view.js"
+ },
"dependencies": {
"@babel/runtime": "^7.16.0",
"@wordpress/a11y": "file:../a11y",
diff --git a/packages/block-library/src/archives/edit.js b/packages/block-library/src/archives/edit.js
index ee9bf60fb77ec..60b8715988ed9 100644
--- a/packages/block-library/src/archives/edit.js
+++ b/packages/block-library/src/archives/edit.js
@@ -53,7 +53,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
- { createInterpolateElement(
- __(
- 'Navigation Menu has been deleted or is unavailable. '
- ),
- {
- button: (
-
- ),
- }
- ) }
-
+function DeletedNavigationWarning( { onCreateNew, isNotice = false } ) {
+ const message = createInterpolateElement(
+ __(
+ 'Navigation Menu has been deleted or is unavailable. '
+ ),
+ {
+ button: (
+
+ ),
+ }
+ );
+
+ return isNotice ? (
+
+ { message }
+
+ ) : (
+ { message }
);
}
diff --git a/packages/block-library/src/navigation/edit/menu-inspector-controls.js b/packages/block-library/src/navigation/edit/menu-inspector-controls.js
index e21655eef9071..8f6c2e47fe775 100644
--- a/packages/block-library/src/navigation/edit/menu-inspector-controls.js
+++ b/packages/block-library/src/navigation/edit/menu-inspector-controls.js
@@ -94,7 +94,9 @@ const MainContent = ( {
const { navigationMenu } = useNavigationMenu( currentMenuId );
if ( currentMenuId && isNavigationMenuMissing ) {
- return ;
+ return (
+
+ );
}
if ( isLoading ) {
diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php
index ccadd5c4a222d..ec72b03b6906f 100644
--- a/packages/block-library/src/navigation/index.php
+++ b/packages/block-library/src/navigation/index.php
@@ -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(
diff --git a/packages/block-library/src/query/index.php b/packages/block-library/src/query/index.php
index 6cc57dc08388c..d10db26529854 100644
--- a/packages/block-library/src/query/index.php
+++ b/packages/block-library/src/query/index.php
@@ -26,7 +26,7 @@ function render_block_core_query( $attributes, $content, $block ) {
if ( $is_interactive ) {
$suffix = wp_scripts_get_suffix();
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
- $module_url = gutenberg_url( '/build/interactivity/query.min.js' );
+ $module_url = gutenberg_url( '/build-module/block-library/query/view.min.js' );
}
wp_register_script_module(
diff --git a/packages/block-library/src/search/index.php b/packages/block-library/src/search/index.php
index 39b8591c86600..fb09cdd36406e 100644
--- a/packages/block-library/src/search/index.php
+++ b/packages/block-library/src/search/index.php
@@ -82,7 +82,7 @@ function render_block_core_search( $attributes ) {
if ( $is_expandable_searchfield ) {
$suffix = wp_scripts_get_suffix();
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
- $module_url = gutenberg_url( '/build/interactivity/search.min.js' );
+ $module_url = gutenberg_url( '/build-module/block-library/search/view.min.js' );
}
wp_register_script_module(
diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md
index 8c656f4adb48b..67a63b8b65646 100644
--- a/packages/components/CHANGELOG.md
+++ b/packages/components/CHANGELOG.md
@@ -2,6 +2,10 @@
## Unreleased
+### Bug Fixes
+
+- `Tabs`: indicator positioning under RTL direction ([#64926](https://github.com/WordPress/gutenberg/pull/64926)).
+
### Deprecations
- Deprecate `__unstableComposite`, `__unstableCompositeGroup`, `__unstableCompositeItem` and `__unstableUseCompositeState`. Consumers of the package should use the stable `Composite` component instead ([#63572](https://github.com/WordPress/gutenberg/pull/63572)).
@@ -12,10 +16,16 @@
### Enhancements
+- `Navigator`: warn if a screen's `path` doesn't follow a URL-like scheme ([#65231](https://github.com/WordPress/gutenberg/pull/65231)).
- `Modal`: Decrease close button size and remove horizontal offset ([#65131](https://github.com/WordPress/gutenberg/pull/65131)).
+### Bug Fixes
+
+- `DatePicker`: better hover/focus styles ([#65117](https://github.com/WordPress/gutenberg/pull/65117)).
+
### Internal
+- `Tabs`: improved performance of the indicator animation ([#64926](https://github.com/WordPress/gutenberg/pull/64926)).
- `Composite`: Remove from private APIs ([#63569](https://github.com/WordPress/gutenberg/pull/63569)).
- use local copy of `use-lilius` instead of `npm` dependency ([#65097](https://github.com/WordPress/gutenberg/pull/65097)).
diff --git a/packages/components/src/date-time/date/styles.ts b/packages/components/src/date-time/date/styles.ts
index bffc8ae35d2a6..84405854827ec 100644
--- a/packages/components/src/date-time/date/styles.ts
+++ b/packages/components/src/date-time/date/styles.ts
@@ -7,13 +7,13 @@ import styled from '@emotion/styled';
* Internal dependencies
*/
import Button from '../../button';
-import { COLORS, CONFIG } from '../../utils';
+import { boxSizingReset, COLORS, CONFIG } from '../../utils';
import { HStack } from '../../h-stack';
import { Heading } from '../../heading';
import { space } from '../../utils/space';
export const Wrapper = styled.div`
- box-sizing: border-box;
+ ${ boxSizingReset }
`;
export const Navigator = styled( HStack )`
@@ -38,7 +38,7 @@ export const Calendar = styled.div`
`;
export const DayOfWeek = styled.div`
- color: ${ COLORS.gray[ 700 ] };
+ color: ${ COLORS.theme.gray[ 700 ] };
font-size: ${ CONFIG.fontSize };
line-height: ${ CONFIG.fontLineHeightBase };
@@ -90,15 +90,34 @@ export const DayButton = styled( Button, {
${ ( props ) =>
props.isSelected &&
`
- background: ${ COLORS.theme.accent };
- color: ${ COLORS.white };
+ background: ${ COLORS.theme.accent };
+
+ &,
+ &:hover:not(:disabled, [aria-disabled=true]) {
+ color: ${ COLORS.theme.accentInverted };
+ }
+
+ &:focus:not(:disabled),
+ &:focus:not(:disabled) {
+ border: ${ CONFIG.borderWidthFocus } solid currentColor;
+ }
+
+ /* Highlight the selected day for high-contrast mode */
+ &::after {
+ content: '';
+ position: absolute;
+ pointer-events: none;
+ inset: 0;
+ border-radius: inherit;
+ border: 1px solid transparent;
+ }
` }
${ ( props ) =>
! props.isSelected &&
props.isToday &&
`
- background: ${ COLORS.gray[ 200 ] };
+ background: ${ COLORS.theme.gray[ 200 ] };
` }
}
@@ -106,15 +125,16 @@ export const DayButton = styled( Button, {
props.hasEvents &&
`
::before {
- background: ${ props.isSelected ? COLORS.white : COLORS.theme.accent };
+ border: 2px solid ${
+ props.isSelected
+ ? COLORS.theme.accentInverted
+ : COLORS.theme.accent
+ };
border-radius: ${ CONFIG.radiusRound };
- bottom: 2px;
content: " ";
- height: 4px;
left: 50%;
- margin-left: -2px;
position: absolute;
- width: 4px;
+ transform: translate(-50%, 9px);
}
` }
`;
diff --git a/packages/components/src/navigator/navigator-screen/component.tsx b/packages/components/src/navigator/navigator-screen/component.tsx
index be5c4bfaf41ec..5882f271d4518 100644
--- a/packages/components/src/navigator/navigator-screen/component.tsx
+++ b/packages/components/src/navigator/navigator-screen/component.tsx
@@ -17,6 +17,7 @@ import {
import { useMergeRefs } from '@wordpress/compose';
import { isRTL as isRTLFn } from '@wordpress/i18n';
import { escapeAttribute } from '@wordpress/escape-html';
+import warning from '@wordpress/warning';
/**
* Internal dependencies
@@ -33,6 +34,12 @@ function UnconnectedNavigatorScreen(
props: WordPressComponentProps< NavigatorScreenProps, 'div', false >,
forwardedRef: ForwardedRef< any >
) {
+ if ( ! /^\//.test( props.path ) ) {
+ warning(
+ 'wp.components.NavigatorScreen: the `path` should follow a URL-like scheme; it should start with and be separated by the `/` character.'
+ );
+ }
+
const screenId = useId();
const { children, className, path, ...otherProps } = useContextSystem(
props,
diff --git a/packages/components/src/navigator/test/index.tsx b/packages/components/src/navigator/test/index.tsx
index 9b9b257ea0968..820942a22644b 100644
--- a/packages/components/src/navigator/test/index.tsx
+++ b/packages/components/src/navigator/test/index.tsx
@@ -642,6 +642,14 @@ describe( 'Navigator', () => {
).toHaveAttribute( 'id', INVALID_HTML_ATTRIBUTE.escaped );
} );
+ it( 'should warn if the `path` prop does not follow the required format', () => {
+ render( Test );
+
+ expect( console ).toHaveWarnedWith(
+ 'wp.components.NavigatorScreen: the `path` should follow a URL-like scheme; it should start with and be separated by the `/` character.'
+ );
+ } );
+
it( 'should match correctly paths with named arguments', async () => {
const user = userEvent.setup();
diff --git a/packages/components/src/select-control/README.md b/packages/components/src/select-control/README.md
index 6c3ecda886a18..c240243408fab 100644
--- a/packages/components/src/select-control/README.md
+++ b/packages/components/src/select-control/README.md
@@ -103,7 +103,7 @@ Render a user interface to select multiple users from a list.
```jsx
{
this.setState( { users } );
@@ -126,7 +126,7 @@ const [ item, setItem ] = useState( '' );
// ...
{ setItem( selection ) } }
__nextHasNoMarginBottom
diff --git a/packages/components/src/tabs/styles.ts b/packages/components/src/tabs/styles.ts
index fcdb43512d82f..a6425f9ab31e4 100644
--- a/packages/components/src/tabs/styles.ts
+++ b/packages/components/src/tabs/styles.ts
@@ -22,36 +22,65 @@ export const TabListWrapper = styled.div`
text-align: start;
}
- @media not ( prefers-reduced-motion: reduce ) {
+ @media not ( prefers-reduced-motion ) {
&.is-animation-enabled::after {
- transition-property: left, top, width, height;
+ transition-property: transform;
transition-duration: 0.2s;
transition-timing-function: ease-out;
}
}
+ --direction-factor: 1;
+ --direction-origin-x: left;
+ --indicator-start: var( --indicator-left );
+ &:dir( rtl ) {
+ --direction-factor: -1;
+ --direction-origin-x: right;
+ --indicator-start: var( --indicator-right );
+ }
&::after {
content: '';
position: absolute;
pointer-events: none;
+ transform-origin: var( --direction-origin-x ) top;
// Windows high contrast mode.
outline: 2px solid transparent;
outline-offset: -1px;
}
- &:not( [aria-orientation='vertical'] )::after {
- bottom: 0;
- left: var( --indicator-left );
- width: var( --indicator-width );
- height: 0;
- border-bottom: var( --wp-admin-border-width-focus ) solid
- ${ COLORS.theme.accent };
+
+ /* Using a large value to avoid antialiasing rounding issues
+ when scaling in the transform, see: https://stackoverflow.com/a/52159123 */
+ --antialiasing-factor: 100;
+ &:not( [aria-orientation='vertical'] ) {
+ &::after {
+ bottom: 0;
+ height: 0;
+ width: calc( var( --antialiasing-factor ) * 1px );
+ transform: translateX(
+ calc(
+ var( --indicator-start ) * var( --direction-factor ) *
+ 1px
+ )
+ )
+ scaleX(
+ calc(
+ var( --indicator-width ) / var( --antialiasing-factor )
+ )
+ );
+ border-bottom: var( --wp-admin-border-width-focus ) solid
+ ${ COLORS.theme.accent };
+ }
}
&[aria-orientation='vertical']::after {
z-index: -1;
+ top: 0;
left: 0;
width: 100%;
- top: var( --indicator-top );
- height: var( --indicator-height );
+ width: calc( var( --antialiasing-factor ) * 1px );
+ transform: translateY( calc( var( --indicator-top ) * 1px ) )
+ scaleY(
+ calc( var( --indicator-height ) / var( --antialiasing-factor ) )
+ );
background-color: ${ COLORS.theme.gray[ 100 ] };
}
`;
diff --git a/packages/components/src/tabs/tablist.tsx b/packages/components/src/tabs/tablist.tsx
index 80ed9b4c5bea2..2977d6a628370 100644
--- a/packages/components/src/tabs/tablist.tsx
+++ b/packages/components/src/tabs/tablist.tsx
@@ -78,10 +78,11 @@ export const TabList = forwardRef<
onBlur={ onBlur }
{ ...otherProps }
style={ {
- '--indicator-left': `${ indicatorPosition.left }px`,
- '--indicator-top': `${ indicatorPosition.top }px`,
- '--indicator-width': `${ indicatorPosition.width }px`,
- '--indicator-height': `${ indicatorPosition.height }px`,
+ '--indicator-top': indicatorPosition.top,
+ '--indicator-right': indicatorPosition.right,
+ '--indicator-left': indicatorPosition.left,
+ '--indicator-width': indicatorPosition.width,
+ '--indicator-height': indicatorPosition.height,
...otherProps.style,
} }
className={ clsx(
diff --git a/packages/components/src/utils/element-rect.ts b/packages/components/src/utils/element-rect.ts
index 9f6eb120b32fc..550ec35b0bc93 100644
--- a/packages/components/src/utils/element-rect.ts
+++ b/packages/components/src/utils/element-rect.ts
@@ -2,134 +2,37 @@
/**
* WordPress dependencies
*/
-import { useRef, useEffect, useState } from '@wordpress/element';
+import { useLayoutEffect, useRef, useState } from '@wordpress/element';
+import { useResizeObserver } from '@wordpress/compose';
/**
* Internal dependencies
*/
import { useEvent } from './hooks/use-event';
/**
- * `useTrackElementRectUpdates` options.
+ * The position and dimensions of an element, relative to its offset parent.
*/
-export type UseTrackElementRectUpdatesOptions = {
+export type ElementOffsetRect = {
/**
- * Whether to trigger the callback when an element's ResizeObserver is
- * first set up, including when the target element changes.
- *
- * @default true
+ * The distance from the top edge of the offset parent to the top edge of
+ * the element.
*/
- fireOnElementInit?: boolean;
-};
-
-/**
- * Tracks an element's "rect" (size and position) and fires `onRect` for all
- * of its discrete values. The element can be changed dynamically and **it
- * must not be stored in a ref**. Instead, it should be stored in a React
- * state or equivalent.
- *
- * By default, `onRect` is called initially for the target element (including
- * when the target element changes), not only on size or position updates.
- * This allows consumers of the hook to always be in sync with all rect values
- * of the target element throughout its lifetime. This behavior can be
- * disabled by setting the `fireOnElementInit` option to `false`.
- *
- * Under the hood, it sets up a `ResizeObserver` that tracks the element. The
- * target element can be changed dynamically, and the observer will be
- * updated accordingly.
- *
- * @example
- *
- * ```tsx
- * const [ targetElement, setTargetElement ] = useState< HTMLElement | null >();
- *
- * useTrackElementRectUpdates( targetElement, ( element ) => {
- * console.log( 'Element resized:', element );
- * } );
- *
- * ;
- * ```
- */
-export function useTrackElementRectUpdates(
+ top: number;
/**
- * The target element to observe. It can be changed dynamically.
+ * The distance from the right edge of the offset parent to the right edge
+ * of the element.
*/
- targetElement: HTMLElement | undefined | null,
+ right: number;
/**
- * Callback to fire when the element is resized. It will also be
- * called when the observer is set up, unless `fireOnElementInit` is
- * set to `false`.
+ * The distance from the bottom edge of the offset parent to the bottom edge
+ * of the element.
*/
- onRect: (
- /**
- * The element being tracked at the time of this update.
- */
- element: HTMLElement,
- /**
- * The list of
- * [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)
- * objects passed to the `ResizeObserver.observe` callback. This list
- * won't be available when the observer is set up, and only on updates.
- */
- resizeObserverEntries?: ResizeObserverEntry[]
- ) => void,
- { fireOnElementInit = true }: UseTrackElementRectUpdatesOptions = {}
-) {
- const onRectEvent = useEvent( onRect );
-
- const observedElementRef = useRef< HTMLElement | null >();
- const resizeObserverRef = useRef< ResizeObserver >();
-
- // TODO: could this be a layout effect?
- useEffect( () => {
- if ( targetElement === observedElementRef.current ) {
- return;
- }
-
- observedElementRef.current = targetElement;
-
- // Set up a ResizeObserver.
- if ( ! resizeObserverRef.current ) {
- resizeObserverRef.current = new ResizeObserver( ( entries ) => {
- if ( observedElementRef.current ) {
- onRectEvent( observedElementRef.current, entries );
- }
- } );
- }
- const { current: resizeObserver } = resizeObserverRef;
-
- // Observe new element.
- if ( targetElement ) {
- if ( fireOnElementInit ) {
- // TODO: investigate if this can be removed,
- // see: https://stackoverflow.com/a/60026394
- onRectEvent( targetElement );
- }
- resizeObserver.observe( targetElement );
- }
-
- return () => {
- // Unobserve previous element.
- if ( observedElementRef.current ) {
- resizeObserver.unobserve( observedElementRef.current );
- }
- };
- }, [ fireOnElementInit, onRectEvent, targetElement ] );
-}
-
-/**
- * The position and dimensions of an element, relative to its offset parent.
- */
-export type ElementOffsetRect = {
+ bottom: number;
/**
* The distance from the left edge of the offset parent to the left edge of
* the element.
*/
left: number;
- /**
- * The distance from the top edge of the offset parent to the top edge of
- * the element.
- */
- top: number;
/**
* The width of the element.
*/
@@ -144,51 +47,111 @@ export type ElementOffsetRect = {
* An `ElementOffsetRect` object with all values set to zero.
*/
export const NULL_ELEMENT_OFFSET_RECT = {
- left: 0,
top: 0,
+ right: 0,
+ bottom: 0,
+ left: 0,
width: 0,
height: 0,
} satisfies ElementOffsetRect;
/**
* Returns the position and dimensions of an element, relative to its offset
- * parent. This is useful in contexts where `getBoundingClientRect` is not
- * suitable, such as when the element is transformed.
+ * parent, with subpixel precision. Values reflect the real measures before any
+ * potential scaling distortions along the X and Y axes.
*
- * **Note:** the `left` and `right` values are adjusted due to a limitation
- * in the way the browser calculates the offset position of the element,
- * which can cause unwanted scrollbars to appear. This adjustment makes the
- * values potentially inaccurate within a range of 1 pixel.
+ * Useful in contexts where plain `getBoundingClientRect` calls or `ResizeObserver`
+ * entries are not suitable, such as when the element is transformed, and when
+ * `element.offset` methods are not precise enough.
+ *
+ * **Note:** in some contexts, like when the scale is 0, this method will fail
+ * because it's impossible to calculate a scaling ratio. When that happens, it
+ * will return `undefined`.
*/
export function getElementOffsetRect(
element: HTMLElement
-): ElementOffsetRect {
+): ElementOffsetRect | undefined {
+ // Position and dimension values computed with `getBoundingClientRect` have
+ // subpixel precision, but are affected by distortions since they represent
+ // the "real" measures, or in other words, the actual final values as rendered
+ // by the browser.
+ const rect = element.getBoundingClientRect();
+ if ( rect.width === 0 || rect.height === 0 ) {
+ return;
+ }
+ const offsetParentRect =
+ element.offsetParent?.getBoundingClientRect() ??
+ NULL_ELEMENT_OFFSET_RECT;
+
+ // Computed widths and heights have subpixel precision, and are not affected
+ // by distortions.
+ const computedWidth = parseFloat( getComputedStyle( element ).width );
+ const computedHeight = parseFloat( getComputedStyle( element ).height );
+
+ // We can obtain the current scale factor for the element by comparing "computed"
+ // dimensions with the "real" ones.
+ const scaleX = computedWidth / rect.width;
+ const scaleY = computedHeight / rect.height;
+
return {
- // The adjustments mentioned in the documentation above are necessary
- // because `offsetLeft` and `offsetTop` are rounded to the nearest pixel,
- // which can result in a position mismatch that causes unwanted overflow.
- // For context, see: https://github.com/WordPress/gutenberg/pull/61979
- left: Math.max( element.offsetLeft - 1, 0 ),
- top: Math.max( element.offsetTop - 1, 0 ),
- // This is a workaround to obtain these values with a sub-pixel precision,
- // since `offsetWidth` and `offsetHeight` are rounded to the nearest pixel.
- width: parseFloat( getComputedStyle( element ).width ),
- height: parseFloat( getComputedStyle( element ).height ),
+ // To obtain the adjusted values for the position:
+ // 1. Compute the element's position relative to the offset parent.
+ // 2. Correct for the scale factor.
+ top: ( rect.top - offsetParentRect?.top ) * scaleY,
+ right: ( offsetParentRect?.right - rect.right ) * scaleX,
+ bottom: ( offsetParentRect?.bottom - rect.bottom ) * scaleY,
+ left: ( rect.left - offsetParentRect?.left ) * scaleX,
+ // Computed dimensions don't need any adjustments.
+ width: computedWidth,
+ height: computedHeight,
};
}
+const POLL_RATE = 100;
+
/**
* Tracks the position and dimensions of an element, relative to its offset
* parent. The element can be changed dynamically.
+ *
+ * **Note:** sometimes, the measurement will fail (see `getElementOffsetRect`'s
+ * documentation for more details). When that happens, this hook will attempt
+ * to measure again after a frame, and if that fails, it will poll every 100
+ * milliseconds until it succeeds.
*/
export function useTrackElementOffsetRect(
targetElement: HTMLElement | undefined | null
) {
const [ indicatorPosition, setIndicatorPosition ] =
useState< ElementOffsetRect >( NULL_ELEMENT_OFFSET_RECT );
+ const intervalRef = useRef< ReturnType< typeof setInterval > >();
+
+ const measure = useEvent( () => {
+ if ( targetElement ) {
+ const elementOffsetRect = getElementOffsetRect( targetElement );
+ if ( elementOffsetRect ) {
+ setIndicatorPosition( elementOffsetRect );
+ clearInterval( intervalRef.current );
+ return true;
+ }
+ } else {
+ clearInterval( intervalRef.current );
+ }
+ return false;
+ } );
+
+ const setElement = useResizeObserver( () => {
+ if ( ! measure() ) {
+ requestAnimationFrame( () => {
+ if ( ! measure() ) {
+ intervalRef.current = setInterval( measure, POLL_RATE );
+ }
+ } );
+ }
+ } );
- useTrackElementRectUpdates( targetElement, ( element ) =>
- setIndicatorPosition( getElementOffsetRect( element ) )
+ useLayoutEffect(
+ () => setElement( targetElement ),
+ [ setElement, targetElement ]
);
return indicatorPosition;
diff --git a/packages/dataviews/src/dataviews-layouts/list/index.tsx b/packages/dataviews/src/dataviews-layouts/list/index.tsx
index 8a3f6a297338c..fb46521fe217b 100644
--- a/packages/dataviews/src/dataviews-layouts/list/index.tsx
+++ b/packages/dataviews/src/dataviews-layouts/list/index.tsx
@@ -395,6 +395,9 @@ export default function ViewList< Item >( props: ViewListProps< Item > ) {
data.length - 1,
Math.max( 0, targetIndex )
);
+ if ( ! data[ clampedIndex ] ) {
+ return;
+ }
const itemIdPrefix = generateCompositeItemIdPrefix(
data[ clampedIndex ]
);
diff --git a/packages/dependency-extraction-webpack-plugin/lib/util.js b/packages/dependency-extraction-webpack-plugin/lib/util.js
index ee5c2face1b9d..fcc6e5a0ed173 100644
--- a/packages/dependency-extraction-webpack-plugin/lib/util.js
+++ b/packages/dependency-extraction-webpack-plugin/lib/util.js
@@ -9,6 +9,7 @@ const BUNDLED_PACKAGES = [
'@wordpress/interface',
'@wordpress/sync',
'@wordpress/undo-manager',
+ '@wordpress/fields',
];
/**
diff --git a/packages/editor/src/components/provider/index.js b/packages/editor/src/components/provider/index.js
index aaf25621d3324..11b1478d58434 100644
--- a/packages/editor/src/components/provider/index.js
+++ b/packages/editor/src/components/provider/index.js
@@ -4,7 +4,11 @@
import { useEffect, useLayoutEffect, useMemo } from '@wordpress/element';
import { useDispatch, useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
-import { EntityProvider, useEntityBlockEditor } from '@wordpress/core-data';
+import {
+ EntityProvider,
+ useEntityBlockEditor,
+ store as coreStore,
+} from '@wordpress/core-data';
import {
BlockEditorProvider,
BlockContextProvider,
@@ -48,7 +52,6 @@ const noop = () => {};
*/
const NON_CONTEXTUAL_POST_TYPES = [
'wp_block',
- 'wp_template',
'wp_navigation',
'wp_template_part',
];
@@ -161,31 +164,59 @@ export const ExperimentalEditorProvider = withRegistryProvider(
BlockEditorProviderComponent = ExperimentalBlockEditorProvider,
__unstableTemplate: template,
} ) => {
- const { editorSettings, selection, isReady, mode } = useSelect(
- ( select ) => {
+ const { editorSettings, selection, isReady, mode, postTypes } =
+ useSelect( ( select ) => {
const {
getEditorSettings,
getEditorSelection,
getRenderingMode,
__unstableIsEditorReady,
} = select( editorStore );
+ const { getPostTypes } = select( coreStore );
+
return {
editorSettings: getEditorSettings(),
isReady: __unstableIsEditorReady(),
mode: getRenderingMode(),
selection: getEditorSelection(),
+ postTypes: getPostTypes( { per_page: -1 } ),
};
- },
- []
- );
+ }, [] );
const shouldRenderTemplate = !! template && mode !== 'post-only';
const rootLevelPost = shouldRenderTemplate ? template : post;
const defaultBlockContext = useMemo( () => {
- const postContext =
+ const postContext = {};
+ // If it is a template, try to inherit the post type from the slug.
+ if ( post.type === 'wp_template' ) {
+ if ( ! post.is_custom ) {
+ const [ kind ] = post.slug.split( '-' );
+ switch ( kind ) {
+ case 'page':
+ postContext.postType = 'page';
+ break;
+ case 'single':
+ // Infer the post type from the slug.
+ const postTypesSlugs =
+ postTypes?.map( ( entity ) => entity.slug ) ||
+ [];
+ const match = post.slug.match(
+ `^single-(${ postTypesSlugs.join(
+ '|'
+ ) })(?:-.+)?$`
+ );
+ if ( match ) {
+ postContext.postType = match[ 1 ];
+ }
+ break;
+ }
+ }
+ } else if (
! NON_CONTEXTUAL_POST_TYPES.includes( rootLevelPost.type ) ||
shouldRenderTemplate
- ? { postId: post.id, postType: post.type }
- : {};
+ ) {
+ postContext.postId = post.id;
+ postContext.postType = post.type;
+ }
return {
...postContext,
@@ -200,6 +231,7 @@ export const ExperimentalEditorProvider = withRegistryProvider(
post.type,
rootLevelPost.type,
rootLevelPost.slug,
+ postTypes,
] );
const { id, type } = rootLevelPost;
const blockEditorSettings = useBlockEditorSettings(
diff --git a/packages/fields/.npmrc b/packages/fields/.npmrc
new file mode 100644
index 0000000000000..43c97e719a5a8
--- /dev/null
+++ b/packages/fields/.npmrc
@@ -0,0 +1 @@
+package-lock=false
diff --git a/packages/fields/CHANGELOG.md b/packages/fields/CHANGELOG.md
new file mode 100644
index 0000000000000..e04ce921cdfdc
--- /dev/null
+++ b/packages/fields/CHANGELOG.md
@@ -0,0 +1,5 @@
+
+
+## Unreleased
+
+Initial release.
diff --git a/packages/fields/README.md b/packages/fields/README.md
new file mode 100644
index 0000000000000..c5044d1e9fdd2
--- /dev/null
+++ b/packages/fields/README.md
@@ -0,0 +1,27 @@
+# Fields
+
+This package provides core elements for the DataView library, designed to simplify the creation and management of data display elements in WordPress.
+
+## Installation
+
+Install the module
+
+```bash
+npm install @wordpress/fields --save
+```
+
+## Usage
+
+
+
+Nothing to document.
+
+
+
+## Contributing to this package
+
+This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
+
+To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).
+
+
diff --git a/packages/fields/package.json b/packages/fields/package.json
new file mode 100644
index 0000000000000..4d5d33a10e5ed
--- /dev/null
+++ b/packages/fields/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "@wordpress/fields",
+ "version": "0.0.1",
+ "description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).",
+ "author": "The WordPress Contributors",
+ "license": "GPL-2.0-or-later",
+ "keywords": [
+ "wordpress",
+ "gutenberg",
+ "dataviews"
+ ],
+ "homepage": "https://github.com/WordPress/gutenberg/tree/HEAD/packages/fields/README.md",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/WordPress/gutenberg.git",
+ "directory": "packages/fields"
+ },
+ "bugs": {
+ "url": "https://github.com/WordPress/gutenberg/issues"
+ },
+ "engines": {
+ "node": ">=18.12.0",
+ "npm": ">=8.19.2"
+ },
+ "main": "build/index.js",
+ "module": "build-module/index.js",
+ "types": "build-types",
+ "sideEffects": [
+ "build-style/**",
+ "src/**/*.scss"
+ ],
+ "dependencies": {
+ "@babel/runtime": "^7.16.0"
+ },
+ "peerDependencies": {
+ "react": "^18.0.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/packages/fields/src/index.ts b/packages/fields/src/index.ts
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/packages/fields/tsconfig.json b/packages/fields/tsconfig.json
new file mode 100644
index 0000000000000..79aa09d0ad56e
--- /dev/null
+++ b/packages/fields/tsconfig.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "https://json.schemastore.org/tsconfig.json",
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "rootDir": "src",
+ "declarationDir": "build-types",
+ "checkJs": false
+ },
+ "references": [],
+ "include": [ "src" ]
+}
diff --git a/packages/interactivity-router/package.json b/packages/interactivity-router/package.json
index 53b68068c528a..db85c0d8bdba3 100644
--- a/packages/interactivity-router/package.json
+++ b/packages/interactivity-router/package.json
@@ -26,6 +26,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
+ "wpScriptModuleExports": "./build-module/index.js",
"dependencies": {
"@wordpress/interactivity": "file:../interactivity"
},
diff --git a/packages/interactivity/package.json b/packages/interactivity/package.json
index 3e29d9aabeeab..6be9f3c4a0d7d 100644
--- a/packages/interactivity/package.json
+++ b/packages/interactivity/package.json
@@ -26,6 +26,10 @@
"module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
+ "wpScriptModuleExports": {
+ ".": "./build-module/index.js",
+ "./debug": "./build-module/debug.js"
+ },
"dependencies": {
"@preact/signals": "^1.2.2",
"preact": "^10.19.3"
diff --git a/packages/private-apis/src/implementation.js b/packages/private-apis/src/implementation.js
index c268e46f669cb..13ee9873e899d 100644
--- a/packages/private-apis/src/implementation.js
+++ b/packages/private-apis/src/implementation.js
@@ -31,6 +31,7 @@ const CORE_MODULES_USING_PRIVATE_APIS = [
'@wordpress/reusable-blocks',
'@wordpress/router',
'@wordpress/dataviews',
+ '@wordpress/fields',
];
/**
diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md
index ea8a59d1ad2ad..43fe001351bc2 100644
--- a/packages/scripts/CHANGELOG.md
+++ b/packages/scripts/CHANGELOG.md
@@ -2,6 +2,12 @@
## Unreleased
+
+### Breaking Changes
+
+- Updated `stylelint` dependency to `^16.8.2` ([#64828](https://github.com/WordPress/gutenberg/pull/64828)).
+- Switched default config from `@wordpress/stylelint-config/scss` to use `@wordpress/stylelint-config/scss-stylistic` to keep stylistic rules ([#64828](https://github.com/WordPress/gutenberg/pull/64828)).
+
## 29.0.0 (2024-09-05)
### Breaking Changes
diff --git a/packages/scripts/config/.stylelintrc.json b/packages/scripts/config/.stylelintrc.json
index 1cfc8fc10ea56..96c4ccca74905 100644
--- a/packages/scripts/config/.stylelintrc.json
+++ b/packages/scripts/config/.stylelintrc.json
@@ -1,5 +1,5 @@
{
- "extends": "@wordpress/stylelint-config/scss",
+ "extends": "@wordpress/stylelint-config/scss-stylistic",
"rules": {
"selector-class-pattern": null
}
diff --git a/packages/scripts/package.json b/packages/scripts/package.json
index 6661e9876683f..d9e74d0c71826 100644
--- a/packages/scripts/package.json
+++ b/packages/scripts/package.json
@@ -85,7 +85,7 @@
"sass-loader": "^12.1.0",
"schema-utils": "^4.2.0",
"source-map-loader": "^3.0.0",
- "stylelint": "^14.2.0",
+ "stylelint": "^16.8.2",
"terser-webpack-plugin": "^5.3.9",
"url-loader": "^4.1.1",
"webpack": "^5.88.2",
diff --git a/packages/stylelint-config/CHANGELOG.md b/packages/stylelint-config/CHANGELOG.md
index 9cb29690af289..4cc05e02105ff 100644
--- a/packages/stylelint-config/CHANGELOG.md
+++ b/packages/stylelint-config/CHANGELOG.md
@@ -2,6 +2,20 @@
## Unreleased
+### Breaking Changes
+
+- Updated `stylelint` peer dependency requirement to `^16.8.2` ([#64828](https://github.com/WordPress/gutenberg/pull/64828)).
+- Updated `stylelint-config-recommended` to `^14.0.1` and disabled new rules ([#64828](https://github.com/WordPress/gutenberg/pull/64828)).
+- Updated `stylelint-config-recommended-scss` to `^14.1.0` and disabled new rules ([#64828](https://github.com/WordPress/gutenberg/pull/64828)).
+- Added `@stylistic/stylelint-plugin` dependency at `^3.0.1` ([#64828](https://github.com/WordPress/gutenberg/pull/64828)).
+- Migrated stylelint's deprecated rules from v15 to use `@stylistic/stylelint-plugin` ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). For more information, see the [stylelint migration guide](https://stylelint.io/migration-guide/to-15). To migrate your rule overrides, you just need to add `@stylistic/` in front of the rule names.
+- Created new `stylistic` and `scss-stylistic` configs ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). If you want to continue using the exact same rule set as before, you should use these, however if you currently use something like `stylelint-config-prettier` to disable formatting rules, you will want to use the non-stylistic configs (using the same names as before).
+- `scss/at-import-partial-extension` has been renamed ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). You must convert this rule to `scss/load-partial-extension` instead (name only change).
+
+### Bug Fixes
+
+- Fixes `declaration-block-no-duplicate-properties` in the `scss` config to use the same value as the base config ([#64828](https://github.com/WordPress/gutenberg/pull/64828)).
+
## 22.7.0 (2024-09-05)
## 22.6.0 (2024-08-21)
diff --git a/packages/stylelint-config/README.md b/packages/stylelint-config/README.md
index c6d69a9d18348..5d760dddc8f92 100644
--- a/packages/stylelint-config/README.md
+++ b/packages/stylelint-config/README.md
@@ -30,16 +30,38 @@ If you've globally installed `@wordpress/stylelint-config` using the `-g` flag,
## Presets
-In addition to the default preset, there is also a SCSS preset. This preset extends both `@wordpress/stylelint-config` and [`stylelint-config-recommended-scss`](https://github.com/kristerkari/stylelint-config-recommended-scss).
+In addition to the default preset, there is also a SCSS preset and 2 stylistic variant presets.
### SCSS
+This preset extends both `@wordpress/stylelint-config` and [`stylelint-config-recommended-scss`](https://github.com/kristerkari/stylelint-config-recommended-scss).
+
```json
{
"extends": [ "@wordpress/stylelint-config/scss" ]
}
```
+### Stylistic
+
+This preset extends `@wordpress/stylelint-config` and adds stylistic rules such as `indentation`.
+
+```json
+{
+ "extends": [ "@wordpress/stylelint-config/stylistic" ]
+}
+```
+
+### SCSS Stylistic
+
+This preset extends`@wordpress/stylelint-config`, `@wordpress/stylelint-config/stylistic` and `@wordpress/stylelint-config/scss`, and adapts some stylistic rules for SCSS.
+
+```json
+{
+ "extends": [ "@wordpress/stylelint-config/scss-stylistic" ]
+}
+```
+
## Extending the config
Simply add a `"rules"` key to your config and add your overrides there.
@@ -48,10 +70,10 @@ For example, to change the `indentation` to four spaces and turn off the `number
```json
{
- "extends": "@wordpress/stylelint-config",
+ "extends": "@wordpress/stylelint-config/stylistic",
"rules": {
- "indentation": 4,
- "number-leading-zero": null
+ "@stylistic/indentation": 4,
+ "@stylistic/number-leading-zero": null
}
}
```
diff --git a/packages/stylelint-config/index.js b/packages/stylelint-config/index.js
index 0ab4f954cb35b..3e5e00b05a2a4 100644
--- a/packages/stylelint-config/index.js
+++ b/packages/stylelint-config/index.js
@@ -1,7 +1,8 @@
'use strict';
+/** @type {import('stylelint').Config} */
module.exports = {
- extends: 'stylelint-config-recommended',
+ extends: [ 'stylelint-config-recommended' ].map( require.resolve ),
rules: {
'at-rule-empty-line-before': [
'always',
@@ -10,15 +11,7 @@ module.exports = {
ignore: [ 'after-comment' ],
},
],
- 'at-rule-name-case': 'lower',
- 'at-rule-name-space-after': 'always-single-line',
'at-rule-no-unknown': true,
- 'at-rule-semicolon-newline-after': 'always',
- 'block-closing-brace-newline-after': 'always',
- 'block-closing-brace-newline-before': 'always',
- 'block-opening-brace-newline-after': 'always',
- 'block-opening-brace-space-before': 'always',
- 'color-hex-case': 'lower',
'color-hex-length': 'short',
'color-named': 'never',
'comment-empty-line-before': [
@@ -27,20 +20,12 @@ module.exports = {
ignore: [ 'stylelint-commands' ],
},
],
- 'declaration-bang-space-after': 'never',
- 'declaration-bang-space-before': 'always',
'declaration-block-no-duplicate-properties': [
true,
{
ignore: [ 'consecutive-duplicates' ],
},
],
- 'declaration-block-semicolon-newline-after': 'always',
- 'declaration-block-semicolon-space-before': 'never',
- 'declaration-block-trailing-semicolon': 'always',
- 'declaration-colon-newline-after': 'always-multi-line',
- 'declaration-colon-space-after': 'always-single-line',
- 'declaration-colon-space-before': 'never',
'declaration-property-unit-allowed-list': {
'line-height': [ 'px' ],
},
@@ -51,51 +36,20 @@ module.exports = {
ignore: [ 'relative' ],
},
],
- 'function-comma-space-after': 'always',
- 'function-comma-space-before': 'never',
- 'function-max-empty-lines': 1,
'function-name-case': [
'lower',
{
ignoreFunctions: [ '/^DXImageTransform.Microsoft.*$/' ],
},
],
- 'function-parentheses-space-inside': 'never',
'function-url-quotes': 'never',
- 'function-whitespace-after': 'always',
- indentation: 'tab',
'length-zero-no-unit': true,
- 'max-empty-lines': 2,
- 'max-line-length': [
- 80,
- {
- ignore: 'non-comments',
- ignorePattern: [
- '/(https?://[0-9,a-z]*.*)|(^description\\:.+)|(^tags\\:.+)/i',
- ],
- },
- ],
- 'media-feature-colon-space-after': 'always',
- 'media-feature-colon-space-before': 'never',
- 'media-feature-range-operator-space-after': 'always',
- 'media-feature-range-operator-space-before': 'always',
- 'media-query-list-comma-newline-after': 'always-multi-line',
- 'media-query-list-comma-space-after': 'always-single-line',
- 'media-query-list-comma-space-before': 'never',
- 'no-eol-whitespace': true,
- 'no-missing-end-of-source-newline': true,
- 'number-leading-zero': 'always',
- 'number-no-trailing-zeros': true,
- 'property-case': 'lower',
'rule-empty-line-before': [
'always',
{
ignore: [ 'after-comment' ],
},
],
- 'selector-attribute-brackets-space-inside': 'never',
- 'selector-attribute-operator-space-after': 'never',
- 'selector-attribute-operator-space-before': 'never',
'selector-attribute-quotes': 'always',
'selector-class-pattern': [
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
@@ -111,21 +65,15 @@ module.exports = {
'Selector should use lowercase and separate words with hyphens (selector-id-pattern)',
},
],
- 'selector-combinator-space-after': 'always',
- 'selector-combinator-space-before': 'always',
- 'selector-list-comma-newline-after': 'always',
- 'selector-list-comma-space-before': 'never',
- 'selector-max-empty-lines': 0,
- 'selector-pseudo-class-case': 'lower',
- 'selector-pseudo-class-parentheses-space-inside': 'never',
- 'selector-pseudo-element-case': 'lower',
'selector-pseudo-element-colon-notation': 'double',
'selector-type-case': 'lower',
- 'string-quotes': 'double',
- 'unit-case': 'lower',
'value-keyword-case': 'lower',
- 'value-list-comma-newline-after': 'always-multi-line',
- 'value-list-comma-space-after': 'always-single-line',
- 'value-list-comma-space-before': 'never',
+
+ /* Disable new rules from stylelint-config-recommended 7 > 14 */
+ 'function-no-unknown': null,
+ 'keyframe-block-no-duplicate-selectors': null,
+ 'annotation-no-unknown': null,
+ 'selector-anb-no-unmatchable': null,
+ 'media-query-no-invalid': null,
},
};
diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json
index 19e6f19bfd2f8..53051078b9b86 100644
--- a/packages/stylelint-config/package.json
+++ b/packages/stylelint-config/package.json
@@ -32,11 +32,12 @@
],
"main": "index.js",
"dependencies": {
- "stylelint-config-recommended": "^6.0.0",
- "stylelint-config-recommended-scss": "^5.0.2"
+ "@stylistic/stylelint-plugin": "^3.0.1",
+ "stylelint-config-recommended": "^14.0.1",
+ "stylelint-config-recommended-scss": "^14.1.0"
},
"peerDependencies": {
- "stylelint": "^14.2"
+ "stylelint": "^16.8.2"
},
"npmpackagejsonlint": {
"extends": "@wordpress/npm-package-json-lint-config",
diff --git a/packages/stylelint-config/scss-stylistic.js b/packages/stylelint-config/scss-stylistic.js
new file mode 100644
index 0000000000000..5d9bbb50c7b66
--- /dev/null
+++ b/packages/stylelint-config/scss-stylistic.js
@@ -0,0 +1,16 @@
+'use strict';
+
+/** @type {import('stylelint').Config} */
+module.exports = {
+ extends: [ './stylistic', './scss' ].map( require.resolve ),
+ rules: {
+ '@stylistic/block-opening-brace-space-before': 'always',
+ '@stylistic/block-closing-brace-newline-after': [
+ 'always',
+ {
+ ignoreAtRules: [ 'if', 'else' ],
+ },
+ ],
+ '@stylistic/at-rule-name-space-after': 'always',
+ },
+};
diff --git a/packages/stylelint-config/scss.js b/packages/stylelint-config/scss.js
index 09940642b218b..3f0aacce31d5a 100644
--- a/packages/stylelint-config/scss.js
+++ b/packages/stylelint-config/scss.js
@@ -1,5 +1,6 @@
'use strict';
+/** @type {import('stylelint').Config} */
module.exports = {
extends: [ './', 'stylelint-config-recommended-scss' ].map(
require.resolve
@@ -18,19 +19,18 @@ module.exports = {
},
],
- 'block-opening-brace-space-before': 'always',
- 'block-closing-brace-newline-after': [
- 'always',
- {
- ignoreAtRules: [ 'if', 'else' ],
- },
- ],
- 'at-rule-name-space-after': 'always',
'scss/at-else-closing-brace-newline-after': 'always-last-in-chain',
'scss/at-else-closing-brace-space-after': 'always-intermediate',
'scss/at-else-empty-line-before': 'never',
'scss/at-if-closing-brace-newline-after': 'always-last-in-chain',
'scss/at-if-closing-brace-space-after': 'always-intermediate',
'scss/selector-no-redundant-nesting-selector': true,
+ /* This value gets overwritten by stylelint-config-recommended-scss so we need to set it again. */
+ 'declaration-block-no-duplicate-properties': [
+ true,
+ {
+ ignore: [ 'consecutive-duplicates' ],
+ },
+ ],
},
};
diff --git a/packages/stylelint-config/stylistic.js b/packages/stylelint-config/stylistic.js
new file mode 100644
index 0000000000000..54a1a2ca63dd7
--- /dev/null
+++ b/packages/stylelint-config/stylistic.js
@@ -0,0 +1,72 @@
+'use strict';
+
+/** @type {import('stylelint').Config} */
+module.exports = {
+ extends: [ './' ].map( require.resolve ),
+ plugins: [ '@stylistic/stylelint-plugin' ],
+ rules: {
+ '@stylistic/at-rule-name-case': 'lower',
+ '@stylistic/at-rule-name-space-after': 'always-single-line',
+ '@stylistic/at-rule-semicolon-newline-after': 'always',
+ '@stylistic/block-closing-brace-newline-after': 'always',
+ '@stylistic/block-closing-brace-newline-before': 'always',
+ '@stylistic/block-opening-brace-newline-after': 'always',
+ '@stylistic/block-opening-brace-space-before': 'always',
+ '@stylistic/color-hex-case': 'lower',
+ '@stylistic/declaration-bang-space-after': 'never',
+ '@stylistic/declaration-bang-space-before': 'always',
+ '@stylistic/declaration-block-semicolon-newline-after': 'always',
+ '@stylistic/declaration-block-semicolon-space-before': 'never',
+ '@stylistic/declaration-block-trailing-semicolon': 'always',
+ '@stylistic/declaration-colon-newline-after': 'always-multi-line',
+ '@stylistic/declaration-colon-space-after': 'always-single-line',
+ '@stylistic/declaration-colon-space-before': 'never',
+ '@stylistic/function-comma-space-after': 'always',
+ '@stylistic/function-comma-space-before': 'never',
+ '@stylistic/function-max-empty-lines': 1,
+ '@stylistic/function-parentheses-space-inside': 'never',
+ '@stylistic/function-whitespace-after': 'always',
+ '@stylistic/indentation': 'tab',
+ '@stylistic/max-empty-lines': 2,
+ '@stylistic/max-line-length': [
+ 80,
+ {
+ ignore: 'non-comments',
+ ignorePattern: [
+ '/(https?://[0-9,a-z]*.*)|(^description\\:.+)|(^tags\\:.+)/i',
+ ],
+ },
+ ],
+ '@stylistic/media-feature-colon-space-after': 'always',
+ '@stylistic/media-feature-colon-space-before': 'never',
+ '@stylistic/media-feature-range-operator-space-after': 'always',
+ '@stylistic/media-feature-range-operator-space-before': 'always',
+ '@stylistic/media-query-list-comma-newline-after': 'always-multi-line',
+ '@stylistic/media-query-list-comma-space-after': 'always-single-line',
+ '@stylistic/media-query-list-comma-space-before': 'never',
+ '@stylistic/no-eol-whitespace': true,
+ '@stylistic/no-missing-end-of-source-newline': true,
+ '@stylistic/number-leading-zero': 'always',
+ '@stylistic/number-no-trailing-zeros': true,
+ '@stylistic/property-case': 'lower',
+ '@stylistic/selector-attribute-brackets-space-inside': 'never',
+ '@stylistic/selector-attribute-operator-space-after': 'never',
+ '@stylistic/selector-attribute-operator-space-before': 'never',
+ '@stylistic/selector-combinator-space-after': 'always',
+ '@stylistic/selector-combinator-space-before': 'always',
+ '@stylistic/selector-list-comma-newline-after': 'always',
+ '@stylistic/selector-list-comma-space-before': 'never',
+ '@stylistic/selector-max-empty-lines': 0,
+ '@stylistic/selector-pseudo-class-case': 'lower',
+ '@stylistic/selector-pseudo-class-parentheses-space-inside': 'never',
+ '@stylistic/selector-pseudo-element-case': 'lower',
+ '@stylistic/string-quotes': 'double',
+ '@stylistic/unit-case': 'lower',
+ '@stylistic/value-list-comma-newline-after': 'always-multi-line',
+ '@stylistic/value-list-comma-space-after': 'always-single-line',
+ '@stylistic/value-list-comma-space-before': 'never',
+
+ /* Add back deprecated rule from stylelint-config-recommended */
+ '@stylistic/no-extra-semicolons': true,
+ },
+};
diff --git a/packages/stylelint-config/test/.stylelintignore b/packages/stylelint-config/test/.stylelintignore
new file mode 100644
index 0000000000000..f74c877ecba44
--- /dev/null
+++ b/packages/stylelint-config/test/.stylelintignore
@@ -0,0 +1 @@
+# This file needs to exist so test files have a way to unignore the files in this folder.
diff --git a/packages/stylelint-config/test/.stylelintrc.json b/packages/stylelint-config/test/.stylelintrc.json
index 1ea6c83527d28..059284930a130 100644
--- a/packages/stylelint-config/test/.stylelintrc.json
+++ b/packages/stylelint-config/test/.stylelintrc.json
@@ -1,4 +1,13 @@
{
- "extends": "@wordpress/stylelint-config/scss",
- "ignoreFiles": [ "*-invalid.scss" ]
+ "extends": "./.stylelintrc.tests.json",
+ "overrides": [
+ {
+ "files": [ "*.scss", "**/*.scss" ],
+ "ignoreFiles": [ "*-invalid.scss" ]
+ },
+ {
+ "files": [ "*.css", "**/*.css" ],
+ "ignoreFiles": [ "*-invalid.css" ]
+ }
+ ]
}
diff --git a/packages/stylelint-config/test/.stylelintrc.tests.json b/packages/stylelint-config/test/.stylelintrc.tests.json
new file mode 100644
index 0000000000000..c80288c8dc8bb
--- /dev/null
+++ b/packages/stylelint-config/test/.stylelintrc.tests.json
@@ -0,0 +1,13 @@
+{
+ "rules": {},
+ "overrides": [
+ {
+ "files": [ "*.scss", "**/*.scss" ],
+ "extends": "@wordpress/stylelint-config/scss-stylistic"
+ },
+ {
+ "files": [ "*.css", "**/*.css" ],
+ "extends": "@wordpress/stylelint-config/stylistic"
+ }
+ ]
+}
diff --git a/packages/stylelint-config/test/__snapshots__/commenting.js.snap b/packages/stylelint-config/test/__snapshots__/commenting.js.snap
index 4eaddcac0148c..ab191a80e1e73 100644
--- a/packages/stylelint-config/test/__snapshots__/commenting.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/commenting.js.snap
@@ -2,8 +2,19 @@
exports[`flags warnings with invalid commenting css snapshot matches warnings 1`] = `
[
+ {
+ "column": 131,
+ "endColumn": 132,
+ "endLine": 24,
+ "line": 24,
+ "rule": "@stylistic/max-line-length",
+ "severity": "error",
+ "text": "Expected line length to be no more than 80 characters (@stylistic/max-line-length)",
+ },
{
"column": 1,
+ "endColumn": 3,
+ "endLine": 14,
"line": 9,
"rule": "comment-empty-line-before",
"severity": "error",
@@ -11,17 +22,12 @@ exports[`flags warnings with invalid commenting css snapshot matches warnings 1`
},
{
"column": 1,
+ "endColumn": 44,
+ "endLine": 18,
"line": 18,
"rule": "comment-empty-line-before",
"severity": "error",
"text": "Expected empty line before comment (comment-empty-line-before)",
},
- {
- "column": 131,
- "line": 24,
- "rule": "max-line-length",
- "severity": "error",
- "text": "Expected line length to be no more than 80 characters (max-line-length)",
- },
]
`;
diff --git a/packages/stylelint-config/test/__snapshots__/functions.js.snap b/packages/stylelint-config/test/__snapshots__/functions.js.snap
index 2a559eaea3317..aa3ee40e69cc6 100644
--- a/packages/stylelint-config/test/__snapshots__/functions.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/functions.js.snap
@@ -4,6 +4,8 @@ exports[`flags warnings with invalid functions css snapshot matches warnings 1`]
[
{
"column": 9,
+ "endColumn": 13,
+ "endLine": 4,
"line": 4,
"rule": "function-name-case",
"severity": "error",
diff --git a/packages/stylelint-config/test/__snapshots__/index.js.snap b/packages/stylelint-config/test/__snapshots__/index.js.snap
index ec66034995164..10c35b02e0e93 100644
--- a/packages/stylelint-config/test/__snapshots__/index.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/index.js.snap
@@ -4,10 +4,12 @@ exports[`flags warnings with invalid css snapshot matches warnings 1`] = `
[
{
"column": 7,
+ "endColumn": 8,
+ "endLine": 2,
"line": 2,
- "rule": "number-leading-zero",
+ "rule": "@stylistic/number-leading-zero",
"severity": "error",
- "text": "Expected a leading zero (number-leading-zero)",
+ "text": "Expected a leading zero (@stylistic/number-leading-zero)",
},
]
`;
diff --git a/packages/stylelint-config/test/__snapshots__/media-queries.js.snap b/packages/stylelint-config/test/__snapshots__/media-queries.js.snap
index 298e30bb24b9c..93bcf3c13d399 100644
--- a/packages/stylelint-config/test/__snapshots__/media-queries.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/media-queries.js.snap
@@ -2,82 +2,104 @@
exports[`flags warnings with invalid media queries css snapshot matches warnings 1`] = `
[
- {
- "column": 1,
- "line": 31,
- "rule": "at-rule-no-unknown",
- "severity": "error",
- "text": "Unexpected unknown at-rule "@mdia" (at-rule-no-unknown)",
- },
{
"column": 26,
+ "endColumn": 27,
+ "endLine": 1,
"line": 1,
- "rule": "media-feature-colon-space-after",
+ "rule": "@stylistic/media-feature-colon-space-after",
"severity": "error",
- "text": "Expected single space after ":" (media-feature-colon-space-after)",
+ "text": "Expected single space after ":" (@stylistic/media-feature-colon-space-after)",
},
{
"column": 27,
+ "endColumn": 28,
+ "endLine": 6,
"line": 6,
- "rule": "media-feature-colon-space-after",
+ "rule": "@stylistic/media-feature-colon-space-after",
"severity": "error",
- "text": "Expected single space after ":" (media-feature-colon-space-after)",
+ "text": "Expected single space after ":" (@stylistic/media-feature-colon-space-after)",
},
{
"column": 27,
+ "endColumn": 28,
+ "endLine": 6,
"line": 6,
- "rule": "media-feature-colon-space-before",
- "severity": "error",
- "text": "Unexpected whitespace before ":" (media-feature-colon-space-before)",
- },
- {
- "column": 17,
- "line": 11,
- "rule": "media-feature-name-no-unknown",
+ "rule": "@stylistic/media-feature-colon-space-before",
"severity": "error",
- "text": "Unexpected unknown media feature name "max-width 699px" (media-feature-name-no-unknown)",
+ "text": "Unexpected whitespace before ":" (@stylistic/media-feature-colon-space-before)",
},
{
"column": 28,
+ "endColumn": 29,
+ "endLine": 16,
"line": 16,
- "rule": "media-feature-range-operator-space-after",
+ "rule": "@stylistic/media-feature-range-operator-space-after",
"severity": "error",
- "text": "Expected single space after range operator (media-feature-range-operator-space-after)",
+ "text": "Expected single space after range operator (@stylistic/media-feature-range-operator-space-after)",
},
{
"column": 29,
+ "endColumn": 30,
+ "endLine": 21,
"line": 21,
- "rule": "media-feature-range-operator-space-after",
+ "rule": "@stylistic/media-feature-range-operator-space-after",
"severity": "error",
- "text": "Expected single space after range operator (media-feature-range-operator-space-after)",
+ "text": "Expected single space after range operator (@stylistic/media-feature-range-operator-space-after)",
},
{
"column": 25,
+ "endColumn": 26,
+ "endLine": 16,
"line": 16,
- "rule": "media-feature-range-operator-space-before",
+ "rule": "@stylistic/media-feature-range-operator-space-before",
"severity": "error",
- "text": "Expected single space before range operator (media-feature-range-operator-space-before)",
+ "text": "Expected single space before range operator (@stylistic/media-feature-range-operator-space-before)",
},
{
"column": 25,
+ "endColumn": 26,
+ "endLine": 26,
"line": 26,
- "rule": "media-feature-range-operator-space-before",
+ "rule": "@stylistic/media-feature-range-operator-space-before",
"severity": "error",
- "text": "Expected single space before range operator (media-feature-range-operator-space-before)",
+ "text": "Expected single space before range operator (@stylistic/media-feature-range-operator-space-before)",
},
{
"column": 27,
+ "endColumn": 28,
+ "endLine": 36,
"line": 36,
- "rule": "media-query-list-comma-space-before",
+ "rule": "@stylistic/media-query-list-comma-space-before",
"severity": "error",
- "text": "Unexpected whitespace before "," (media-query-list-comma-space-before)",
+ "text": "Unexpected whitespace before "," (@stylistic/media-query-list-comma-space-before)",
},
{
"column": 27,
+ "endColumn": 28,
+ "endLine": 40,
"line": 40,
- "rule": "media-query-list-comma-space-before",
+ "rule": "@stylistic/media-query-list-comma-space-before",
+ "severity": "error",
+ "text": "Unexpected whitespace before "," (@stylistic/media-query-list-comma-space-before)",
+ },
+ {
+ "column": 1,
+ "endColumn": 6,
+ "endLine": 31,
+ "line": 31,
+ "rule": "at-rule-no-unknown",
+ "severity": "error",
+ "text": "Unexpected unknown at-rule "@mdia" (at-rule-no-unknown)",
+ },
+ {
+ "column": 17,
+ "endColumn": 24,
+ "endLine": 11,
+ "line": 11,
+ "rule": "media-feature-name-no-unknown",
"severity": "error",
- "text": "Unexpected whitespace before "," (media-query-list-comma-space-before)",
+ "text": "Unexpected unknown media feature name "unknown" (media-feature-name-no-unknown)",
},
]
`;
diff --git a/packages/stylelint-config/test/__snapshots__/properties.js.snap b/packages/stylelint-config/test/__snapshots__/properties.js.snap
index 9bb0ab2395484..a0c36aa885e1f 100644
--- a/packages/stylelint-config/test/__snapshots__/properties.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/properties.js.snap
@@ -4,13 +4,35 @@ exports[`flags warnings with invalid properties css snapshot matches warnings 1`
[
{
"column": 13,
+ "endColumn": 14,
+ "endLine": 2,
"line": 2,
- "rule": "color-hex-case",
+ "rule": "@stylistic/color-hex-case",
"severity": "error",
- "text": "Expected "#FFFFFF" to be "#ffffff" (color-hex-case)",
+ "text": "Expected "#FFFFFF" to be "#ffffff" (@stylistic/color-hex-case)",
},
{
"column": 13,
+ "endColumn": 14,
+ "endLine": 2,
+ "line": 2,
+ "rule": "@stylistic/declaration-colon-space-after",
+ "severity": "error",
+ "text": "Expected single space after ":" with a single-line declaration (@stylistic/declaration-colon-space-after)",
+ },
+ {
+ "column": 17,
+ "endColumn": 19,
+ "endLine": 4,
+ "line": 4,
+ "rule": "@stylistic/unit-case",
+ "severity": "error",
+ "text": "Expected "PX" to be "px" (@stylistic/unit-case)",
+ },
+ {
+ "column": 13,
+ "endColumn": 20,
+ "endLine": 2,
"line": 2,
"rule": "color-hex-length",
"severity": "error",
@@ -18,34 +40,26 @@ exports[`flags warnings with invalid properties css snapshot matches warnings 1`
},
{
"column": 2,
+ "endColumn": 8,
+ "endLine": 5,
"line": 5,
"rule": "declaration-block-no-shorthand-property-overrides",
"severity": "error",
"text": "Unexpected shorthand "margin" after "margin-left" (declaration-block-no-shorthand-property-overrides)",
},
- {
- "column": 13,
- "line": 2,
- "rule": "declaration-colon-space-after",
- "severity": "error",
- "text": "Expected single space after ":" with a single-line declaration (declaration-colon-space-after)",
- },
{
"column": 2,
+ "endColumn": 7,
+ "endLine": 6,
"line": 6,
"rule": "property-no-unknown",
"severity": "error",
"text": "Unexpected unknown property "argin" (property-no-unknown)",
},
- {
- "column": 15,
- "line": 4,
- "rule": "unit-case",
- "severity": "error",
- "text": "Expected "PX" to be "px" (unit-case)",
- },
{
"column": 11,
+ "endColumn": 16,
+ "endLine": 3,
"line": 3,
"rule": "value-keyword-case",
"severity": "error",
diff --git a/packages/stylelint-config/test/__snapshots__/scss.js.snap b/packages/stylelint-config/test/__snapshots__/scss.js.snap
index dd199336323ff..a1abeef86ac96 100644
--- a/packages/stylelint-config/test/__snapshots__/scss.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/scss.js.snap
@@ -2,8 +2,37 @@
exports[`flags warnings with invalid scss snapshot matches warnings 1`] = `
[
+ {
+ "column": 5,
+ "endColumn": 6,
+ "endLine": 14,
+ "line": 14,
+ "rule": "@stylistic/block-opening-brace-space-before",
+ "severity": "error",
+ "text": "Expected single space before "{" (@stylistic/block-opening-brace-space-before)",
+ },
+ {
+ "column": 7,
+ "endColumn": 8,
+ "endLine": 31,
+ "line": 31,
+ "rule": "@stylistic/number-leading-zero",
+ "severity": "error",
+ "text": "Expected a leading zero (@stylistic/number-leading-zero)",
+ },
+ {
+ "column": 15,
+ "endColumn": 16,
+ "endLine": 28,
+ "line": 28,
+ "rule": "@stylistic/no-extra-semicolons",
+ "severity": "error",
+ "text": "Unexpected extra semicolon (@stylistic/no-extra-semicolons)",
+ },
{
"column": 1,
+ "endColumn": 6,
+ "endLine": 14,
"line": 14,
"rule": "scss/at-else-empty-line-before",
"severity": "error",
@@ -11,6 +40,8 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = `
},
{
"column": 2,
+ "endColumn": 3,
+ "endLine": 12,
"line": 12,
"rule": "scss/at-if-closing-brace-newline-after",
"severity": "error",
@@ -18,6 +49,8 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = `
},
{
"column": 2,
+ "endColumn": 3,
+ "endLine": 12,
"line": 12,
"rule": "scss/at-if-closing-brace-space-after",
"severity": "error",
@@ -25,6 +58,8 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = `
},
{
"column": 1,
+ "endColumn": 9,
+ "endLine": 1,
"line": 1,
"rule": "scss/at-rule-no-unknown",
"severity": "error",
@@ -32,31 +67,12 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = `
},
{
"column": 2,
+ "endColumn": 15,
+ "endLine": 22,
"line": 22,
"rule": "at-rule-empty-line-before",
"severity": "error",
"text": "Unexpected empty line before at-rule (at-rule-empty-line-before)",
},
- {
- "column": 5,
- "line": 14,
- "rule": "block-opening-brace-space-before",
- "severity": "error",
- "text": "Expected single space before "{" (block-opening-brace-space-before)",
- },
- {
- "column": 15,
- "line": 28,
- "rule": "no-extra-semicolons",
- "severity": "error",
- "text": "Unexpected extra semicolon (no-extra-semicolons)",
- },
- {
- "column": 7,
- "line": 31,
- "rule": "number-leading-zero",
- "severity": "error",
- "text": "Expected a leading zero (number-leading-zero)",
- },
]
`;
diff --git a/packages/stylelint-config/test/__snapshots__/selectors-scss.js.snap b/packages/stylelint-config/test/__snapshots__/selectors-scss.js.snap
index 31cbf77098ec6..ea1746c538362 100644
--- a/packages/stylelint-config/test/__snapshots__/selectors-scss.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/selectors-scss.js.snap
@@ -4,6 +4,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1`
[
{
"column": 2,
+ "endColumn": 3,
+ "endLine": 3,
"line": 3,
"rule": "scss/selector-no-redundant-nesting-selector",
"severity": "error",
@@ -11,6 +13,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1`
},
{
"column": 2,
+ "endColumn": 3,
+ "endLine": 10,
"line": 10,
"rule": "scss/selector-no-redundant-nesting-selector",
"severity": "error",
@@ -18,6 +22,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1`
},
{
"column": 2,
+ "endColumn": 3,
+ "endLine": 17,
"line": 17,
"rule": "scss/selector-no-redundant-nesting-selector",
"severity": "error",
@@ -25,6 +31,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1`
},
{
"column": 2,
+ "endColumn": 3,
+ "endLine": 24,
"line": 24,
"rule": "scss/selector-no-redundant-nesting-selector",
"severity": "error",
@@ -32,6 +40,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1`
},
{
"column": 2,
+ "endColumn": 3,
+ "endLine": 31,
"line": 31,
"rule": "scss/selector-no-redundant-nesting-selector",
"severity": "error",
@@ -39,6 +49,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1`
},
{
"column": 10,
+ "endColumn": 11,
+ "endLine": 31,
"line": 31,
"rule": "selector-pseudo-element-colon-notation",
"severity": "error",
diff --git a/packages/stylelint-config/test/__snapshots__/selectors.js.snap b/packages/stylelint-config/test/__snapshots__/selectors.js.snap
index 42242da99d451..f39edbfdb3fa5 100644
--- a/packages/stylelint-config/test/__snapshots__/selectors.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/selectors.js.snap
@@ -2,8 +2,19 @@
exports[`flags warnings with invalid selectors css snapshot matches warnings 1`] = `
[
+ {
+ "column": 12,
+ "endColumn": 13,
+ "endLine": 17,
+ "line": 17,
+ "rule": "@stylistic/string-quotes",
+ "severity": "error",
+ "text": "Expected double quotes (@stylistic/string-quotes)",
+ },
{
"column": 15,
+ "endColumn": 19,
+ "endLine": 18,
"line": 18,
"rule": "declaration-property-unit-allowed-list",
"severity": "error",
@@ -11,6 +22,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`]
},
{
"column": 1,
+ "endColumn": 11,
+ "endLine": 25,
"line": 25,
"rule": "selector-class-pattern",
"severity": "error",
@@ -18,6 +31,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`]
},
{
"column": 1,
+ "endColumn": 13,
+ "endLine": 1,
"line": 1,
"rule": "selector-id-pattern",
"severity": "error",
@@ -25,6 +40,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`]
},
{
"column": 1,
+ "endColumn": 14,
+ "endLine": 5,
"line": 5,
"rule": "selector-id-pattern",
"severity": "error",
@@ -32,6 +49,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`]
},
{
"column": 4,
+ "endColumn": 17,
+ "endLine": 9,
"line": 9,
"rule": "selector-id-pattern",
"severity": "error",
@@ -39,6 +58,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`]
},
{
"column": 1,
+ "endColumn": 10,
+ "endLine": 21,
"line": 21,
"rule": "selector-id-pattern",
"severity": "error",
@@ -46,17 +67,12 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`]
},
{
"column": 10,
+ "endColumn": 11,
+ "endLine": 29,
"line": 29,
"rule": "selector-pseudo-element-colon-notation",
"severity": "error",
"text": "Expected double colon pseudo-element notation (selector-pseudo-element-colon-notation)",
},
- {
- "column": 12,
- "line": 17,
- "rule": "string-quotes",
- "severity": "error",
- "text": "Expected double quotes (string-quotes)",
- },
]
`;
diff --git a/packages/stylelint-config/test/__snapshots__/structure.js.snap b/packages/stylelint-config/test/__snapshots__/structure.js.snap
index b41ef9131547f..c59cfb0fc2918 100644
--- a/packages/stylelint-config/test/__snapshots__/structure.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/structure.js.snap
@@ -4,59 +4,75 @@ exports[`flags warnings with invalid structure css snapshot matches warnings 1`]
[
{
"column": 45,
+ "endColumn": 46,
+ "endLine": 7,
"line": 7,
- "rule": "block-closing-brace-newline-before",
+ "rule": "@stylistic/block-closing-brace-newline-before",
"severity": "error",
- "text": "Expected newline before "}" (block-closing-brace-newline-before)",
+ "text": "Expected newline before "}" (@stylistic/block-closing-brace-newline-before)",
},
{
"column": 14,
+ "endColumn": 15,
+ "endLine": 7,
"line": 7,
- "rule": "block-opening-brace-newline-after",
+ "rule": "@stylistic/block-opening-brace-newline-after",
"severity": "error",
- "text": "Expected newline after "{" (block-opening-brace-newline-after)",
+ "text": "Expected newline after "{" (@stylistic/block-opening-brace-newline-after)",
},
{
"column": 32,
+ "endColumn": 33,
+ "endLine": 7,
"line": 7,
- "rule": "declaration-block-semicolon-newline-after",
+ "rule": "@stylistic/declaration-block-semicolon-newline-after",
"severity": "error",
- "text": "Expected newline after ";" (declaration-block-semicolon-newline-after)",
+ "text": "Expected newline after ";" (@stylistic/declaration-block-semicolon-newline-after)",
},
{
- "column": 12,
- "line": 1,
- "rule": "selector-list-comma-newline-after",
+ "column": 3,
+ "endColumn": 4,
+ "endLine": 4,
+ "line": 4,
+ "rule": "@stylistic/indentation",
"severity": "error",
- "text": "Expected newline after "," (selector-list-comma-newline-after)",
+ "text": "Expected indentation of 0 tabs (@stylistic/indentation)",
},
{
- "column": 25,
- "line": 1,
- "rule": "selector-list-comma-newline-after",
+ "column": 3,
+ "endColumn": 20,
+ "endLine": 2,
+ "line": 2,
+ "rule": "@stylistic/indentation",
"severity": "error",
- "text": "Expected newline after "," (selector-list-comma-newline-after)",
+ "text": "Expected indentation of 1 tab (@stylistic/indentation)",
},
{
"column": 3,
- "line": 4,
- "rule": "indentation",
+ "endColumn": 15,
+ "endLine": 3,
+ "line": 3,
+ "rule": "@stylistic/indentation",
"severity": "error",
- "text": "Expected indentation of 0 tabs (indentation)",
+ "text": "Expected indentation of 1 tab (@stylistic/indentation)",
},
{
- "column": 3,
- "line": 2,
- "rule": "indentation",
+ "column": 12,
+ "endColumn": 13,
+ "endLine": 1,
+ "line": 1,
+ "rule": "@stylistic/selector-list-comma-newline-after",
"severity": "error",
- "text": "Expected indentation of 1 tab (indentation)",
+ "text": "Expected newline after "," (@stylistic/selector-list-comma-newline-after)",
},
{
- "column": 3,
- "line": 3,
- "rule": "indentation",
+ "column": 25,
+ "endColumn": 26,
+ "endLine": 1,
+ "line": 1,
+ "rule": "@stylistic/selector-list-comma-newline-after",
"severity": "error",
- "text": "Expected indentation of 1 tab (indentation)",
+ "text": "Expected newline after "," (@stylistic/selector-list-comma-newline-after)",
},
]
`;
diff --git a/packages/stylelint-config/test/__snapshots__/values.js.snap b/packages/stylelint-config/test/__snapshots__/values.js.snap
index 2331e0364e5c7..95c34fcbfc8d4 100644
--- a/packages/stylelint-config/test/__snapshots__/values.js.snap
+++ b/packages/stylelint-config/test/__snapshots__/values.js.snap
@@ -4,20 +4,26 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] =
[
{
"column": 16,
+ "endColumn": 17,
+ "endLine": 2,
"line": 2,
- "rule": "declaration-block-trailing-semicolon",
+ "rule": "@stylistic/declaration-block-trailing-semicolon",
"severity": "error",
- "text": "Expected a trailing semicolon (declaration-block-trailing-semicolon)",
+ "text": "Expected a trailing semicolon (@stylistic/declaration-block-trailing-semicolon)",
},
{
"column": 13,
+ "endColumn": 14,
+ "endLine": 2,
"line": 2,
- "rule": "declaration-colon-space-after",
+ "rule": "@stylistic/declaration-colon-space-after",
"severity": "error",
- "text": "Expected single space after ":" with a single-line declaration (declaration-colon-space-after)",
+ "text": "Expected single space after ":" with a single-line declaration (@stylistic/declaration-colon-space-after)",
},
{
"column": 15,
+ "endColumn": 20,
+ "endLine": 12,
"line": 12,
"rule": "declaration-property-unit-allowed-list",
"severity": "error",
@@ -25,6 +31,8 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] =
},
{
"column": 15,
+ "endColumn": 30,
+ "endLine": 10,
"line": 10,
"rule": "font-family-name-quotes",
"severity": "error",
@@ -32,13 +40,17 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] =
},
{
"column": 15,
+ "endColumn": 19,
+ "endLine": 11,
"line": 11,
"rule": "font-weight-notation",
"severity": "error",
- "text": "Expected numeric font-weight notation (font-weight-notation)",
+ "text": "Expected "bold" to be "700" (font-weight-notation)",
},
{
"column": 11,
+ "endColumn": 13,
+ "endLine": 6,
"line": 6,
"rule": "length-zero-no-unit",
"severity": "error",
@@ -46,6 +58,8 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] =
},
{
"column": 15,
+ "endColumn": 17,
+ "endLine": 6,
"line": 6,
"rule": "length-zero-no-unit",
"severity": "error",
@@ -53,6 +67,8 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] =
},
{
"column": 24,
+ "endColumn": 26,
+ "endLine": 6,
"line": 6,
"rule": "length-zero-no-unit",
"severity": "error",
@@ -60,6 +76,8 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] =
},
{
"column": 1,
+ "endColumn": 10,
+ "endLine": 15,
"line": 15,
"rule": "no-duplicate-selectors",
"severity": "error",
diff --git a/packages/stylelint-config/test/commenting.js b/packages/stylelint-config/test/commenting.js
index 1a23a47434fc1..dde02f605faf1 100644
--- a/packages/stylelint-config/test/commenting.js
+++ b/packages/stylelint-config/test/commenting.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/commenting-valid.css',
- 'utf-8'
- ),
- invalidCss = fs.readFileSync(
- './packages/stylelint-config/test/commenting-invalid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid commenting css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './commenting-valid.css' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid commenting css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidCss,
- config,
- } );
+ result = getStylelintResult( './commenting-invalid.css' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/functions.js b/packages/stylelint-config/test/functions.js
index 38b0fbf37a3a8..d6fb2a7ddf84e 100644
--- a/packages/stylelint-config/test/functions.js
+++ b/packages/stylelint-config/test/functions.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/functions-valid.css',
- 'utf-8'
- ),
- invalidCss = fs.readFileSync(
- './packages/stylelint-config/test/functions-invalid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid functions css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './functions-valid.css' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid functions css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidCss,
- config,
- } );
+ result = getStylelintResult( './functions-invalid.css' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/index.js b/packages/stylelint-config/test/index.js
index dfc857e8a4504..d974a9ac110f7 100644
--- a/packages/stylelint-config/test/index.js
+++ b/packages/stylelint-config/test/index.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/css-valid.css',
- 'utf-8'
- ),
- invalidCss = fs.readFileSync(
- './packages/stylelint-config/test/css-invalid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './css-valid.css' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidCss,
- config,
- } );
+ result = getStylelintResult( './css-invalid.css' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/media-queries-invalid.css b/packages/stylelint-config/test/media-queries-invalid.css
index c89a2776bb807..8fff7111065e0 100644
--- a/packages/stylelint-config/test/media-queries-invalid.css
+++ b/packages/stylelint-config/test/media-queries-invalid.css
@@ -8,7 +8,7 @@
/* Your selectors */
}
-@media all and (max-width 699px) {
+@media all and (unknown) {
/* Your selectors */
}
diff --git a/packages/stylelint-config/test/media-queries.js b/packages/stylelint-config/test/media-queries.js
index a3b59aa0fb541..6b8390e7933b9 100644
--- a/packages/stylelint-config/test/media-queries.js
+++ b/packages/stylelint-config/test/media-queries.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/media-queries-valid.css',
- 'utf-8'
- ),
- invalidCss = fs.readFileSync(
- './packages/stylelint-config/test/media-queries-invalid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid media queries css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './media-queries-valid.css' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid media queries css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidCss,
- config,
- } );
+ result = getStylelintResult( './media-queries-invalid.css' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/properties.js b/packages/stylelint-config/test/properties.js
index 35cedc7697515..51dded0543d43 100644
--- a/packages/stylelint-config/test/properties.js
+++ b/packages/stylelint-config/test/properties.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/properties-valid.css',
- 'utf-8'
- ),
- invalidCss = fs.readFileSync(
- './packages/stylelint-config/test/properties-invalid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid properties css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './properties-valid.css' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid properties css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidCss,
- config,
- } );
+ result = getStylelintResult( './properties-invalid.css' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/scss.js b/packages/stylelint-config/test/scss.js
index 9372d502b0d8a..efe01c3d0f2cc 100644
--- a/packages/stylelint-config/test/scss.js
+++ b/packages/stylelint-config/test/scss.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../scss' ),
- validScss = fs.readFileSync(
- './packages/stylelint-config/test/scss-valid.scss',
- 'utf-8'
- ),
- invalidScss = fs.readFileSync(
- './packages/stylelint-config/test/scss-invalid.scss',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid scss', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validScss,
- config,
- } );
+ result = getStylelintResult( './scss-valid.scss' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid scss', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidScss,
- config,
- } );
+ result = getStylelintResult( './scss-invalid.scss' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/selectors-scss.js b/packages/stylelint-config/test/selectors-scss.js
index 94a85ff86543e..5ec1f2fbd1b42 100644
--- a/packages/stylelint-config/test/selectors-scss.js
+++ b/packages/stylelint-config/test/selectors-scss.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../scss' ),
- validScss = fs.readFileSync(
- './packages/stylelint-config/test/selectors-valid.scss',
- 'utf-8'
- ),
- invalidScss = fs.readFileSync(
- './packages/stylelint-config/test/selectors-invalid.scss',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid selectors scss', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validScss,
- config,
- } );
+ result = getStylelintResult( './selectors-valid.scss' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid selectors scss', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidScss,
- config,
- } );
+ result = getStylelintResult( './selectors-invalid.scss' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/selectors.js b/packages/stylelint-config/test/selectors.js
index 337d1d00eed31..276ac87548961 100644
--- a/packages/stylelint-config/test/selectors.js
+++ b/packages/stylelint-config/test/selectors.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/selectors-valid.css',
- 'utf-8'
- ),
- invalidCss = fs.readFileSync(
- './packages/stylelint-config/test/selectors-invalid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid selectors css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './selectors-valid.css' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid selectors css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidCss,
- config,
- } );
+ result = getStylelintResult( './selectors-invalid.css' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/structure.js b/packages/stylelint-config/test/structure.js
index 7ec03a3b667ba..29dc22a35daf1 100644
--- a/packages/stylelint-config/test/structure.js
+++ b/packages/stylelint-config/test/structure.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/structure-valid.css',
- 'utf-8'
- ),
- invalidCss = fs.readFileSync(
- './packages/stylelint-config/test/structure-invalid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid structure css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './structure-valid.css' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid structure css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidCss,
- config,
- } );
+ result = getStylelintResult( './structure-invalid.css' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/themes.js b/packages/stylelint-config/test/themes.js
index f0016832b24d7..0a25c6e871df7 100644
--- a/packages/stylelint-config/test/themes.js
+++ b/packages/stylelint-config/test/themes.js
@@ -1,26 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/themes-valid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './themes-valid.css' );
} );
it( 'did not error', () => {
diff --git a/packages/stylelint-config/test/utils/index.js b/packages/stylelint-config/test/utils/index.js
new file mode 100644
index 0000000000000..c24e04f0a67a4
--- /dev/null
+++ b/packages/stylelint-config/test/utils/index.js
@@ -0,0 +1,34 @@
+/**
+ * External dependencies
+ */
+const util = require( 'node:util' ),
+ path = require( 'node:path' ),
+ childProcess = require( 'node:child_process' );
+
+const execute = util.promisify( childProcess.exec );
+
+const generateStylelintCommand = ( filename ) =>
+ 'npx stylelint ' +
+ path.resolve( __dirname, '../', filename ) +
+ ' -c' +
+ path.resolve( __dirname, '../', './.stylelintrc.tests.json' ) +
+ ' --formatter json' +
+ ' --ignore-path ' +
+ path.resolve( __dirname, '../', './.stylelintignore' );
+
+module.exports = {
+ getStylelintResult: ( filename ) =>
+ execute( generateStylelintCommand( filename ) )
+ .then( ( { stderr } ) => {
+ return {
+ errored: false,
+ results: JSON.parse( stderr ),
+ };
+ } )
+ .catch( ( { stderr } ) => {
+ return {
+ errored: true,
+ results: JSON.parse( stderr ),
+ };
+ } ),
+};
diff --git a/packages/stylelint-config/test/values.js b/packages/stylelint-config/test/values.js
index 97cbc58e02f3b..749a50a94c204 100644
--- a/packages/stylelint-config/test/values.js
+++ b/packages/stylelint-config/test/values.js
@@ -1,30 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/values-valid.css',
- 'utf-8'
- ),
- invalidCss = fs.readFileSync(
- './packages/stylelint-config/test/values-invalid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid values css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './values-valid.css' );
} );
it( 'did not error', () => {
@@ -42,10 +26,7 @@ describe( 'flags warnings with invalid values css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: invalidCss,
- config,
- } );
+ result = getStylelintResult( './values-invalid.css' );
} );
it( 'did error', () => {
diff --git a/packages/stylelint-config/test/vendor-prefixes.js b/packages/stylelint-config/test/vendor-prefixes.js
index e3ec4d2a7e5df..bc3e1f571aee5 100644
--- a/packages/stylelint-config/test/vendor-prefixes.js
+++ b/packages/stylelint-config/test/vendor-prefixes.js
@@ -1,26 +1,14 @@
-/**
- * External dependencies
- */
-const fs = require( 'fs' ),
- stylelint = require( 'stylelint' );
-
/**
* Internal dependencies
*/
-const config = require( '../' ),
- validCss = fs.readFileSync(
- './packages/stylelint-config/test/vendor-prefixes-valid.css',
- 'utf-8'
- );
+const utils = require( './utils' );
+const getStylelintResult = utils.getStylelintResult;
describe( 'flags no warnings with valid vendor prefixes css', () => {
let result;
beforeEach( () => {
- result = stylelint.lint( {
- code: validCss,
- config,
- } );
+ result = getStylelintResult( './vendor-prefixes-valid.css' );
} );
it( 'did not error', () => {
diff --git a/packages/widgets/src/blocks/legacy-widget/edit/widget-type-selector.js b/packages/widgets/src/blocks/legacy-widget/edit/widget-type-selector.js
index d543b7b4b08d8..432588f6aea85 100644
--- a/packages/widgets/src/blocks/legacy-widget/edit/widget-type-selector.js
+++ b/packages/widgets/src/blocks/legacy-widget/edit/widget-type-selector.js
@@ -29,7 +29,7 @@ export default function WidgetTypeSelector( { selectedId, onSelect } ) {
{
const legacyWidgetBlock =
await widgetsCustomizerPage.addBlock( 'Legacy Widget' );
await page
- .locator(
- 'role=combobox[name="Select a legacy widget to display:"i]'
- )
+ .locator( 'role=combobox[name="Legacy widget"i]' )
.selectOption( 'test_widget' );
await expect(
diff --git a/tools/webpack/interactivity.js b/tools/webpack/interactivity.js
deleted file mode 100644
index 7f5c7f64a09d7..0000000000000
--- a/tools/webpack/interactivity.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * External dependencies
- */
-const { join } = require( 'path' );
-
-/**
- * WordPress dependencies
- */
-const DependencyExtractionWebpackPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' );
-
-/**
- * Internal dependencies
- */
-const { baseConfig, plugins } = require( './shared' );
-
-module.exports = {
- ...baseConfig,
- name: 'interactivity',
- entry: {
- index: './packages/interactivity',
- debug: './packages/interactivity/src/debug',
- router: './packages/interactivity-router',
- navigation: './packages/block-library/src/navigation/view.js',
- query: './packages/block-library/src/query/view.js',
- image: './packages/block-library/src/image/view.js',
- file: './packages/block-library/src/file/view.js',
- search: './packages/block-library/src/search/view.js',
- },
- experiments: {
- outputModule: true,
- },
- output: {
- devtoolNamespace: 'wp',
- filename: './build/interactivity/[name].min.js',
- library: {
- type: 'module',
- },
- path: join( __dirname, '..', '..' ),
- environment: { module: true },
- module: true,
- chunkFormat: 'module',
- },
- resolve: {
- extensions: [ '.js', '.ts', '.tsx' ],
- },
- module: {
- rules: [
- {
- test: /\.(j|t)sx?$/,
- exclude: /node_modules/,
- use: [
- {
- loader: require.resolve( 'babel-loader' ),
- options: {
- cacheDirectory:
- process.env.BABEL_CACHE_DIRECTORY || true,
- babelrc: false,
- configFile: false,
- presets: [
- '@babel/preset-typescript',
- '@babel/preset-react',
- ],
- },
- },
- ],
- },
- ],
- },
- plugins: [ ...plugins, new DependencyExtractionWebpackPlugin() ],
- watchOptions: {
- ignored: [ '**/node_modules' ],
- aggregateTimeout: 500,
- },
-};
diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js
index 055665c2feb1c..a1610d0a5ba54 100644
--- a/tools/webpack/packages.js
+++ b/tools/webpack/packages.js
@@ -34,6 +34,7 @@ const BUNDLED_PACKAGES = [
'@wordpress/interface',
'@wordpress/sync',
'@wordpress/undo-manager',
+ '@wordpress/fields',
];
// PHP files in packages that have to be copied during build.
diff --git a/tools/webpack/script-modules.js b/tools/webpack/script-modules.js
new file mode 100644
index 0000000000000..57652e0be28e2
--- /dev/null
+++ b/tools/webpack/script-modules.js
@@ -0,0 +1,133 @@
+/**
+ * External dependencies
+ */
+const { join } = require( 'path' );
+
+/**
+ * WordPress dependencies
+ */
+const DependencyExtractionWebpackPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' );
+
+/**
+ * Internal dependencies
+ */
+const { baseConfig, plugins } = require( './shared' );
+
+const WORDPRESS_NAMESPACE = '@wordpress/';
+const { createRequire } = require( 'node:module' );
+
+const rootURL = new URL( '..', `file://${ __dirname }` );
+const fromRootRequire = createRequire( rootURL );
+
+/** @type {Iterable<[string, string]>} */
+const iterableDeps = Object.entries(
+ fromRootRequire( './package.json' ).dependencies
+);
+
+/** @type {Map} */
+const gutenbergScriptModules = new Map();
+for ( const [ packageName, versionSpecifier ] of iterableDeps ) {
+ if (
+ ! packageName.startsWith( WORDPRESS_NAMESPACE ) ||
+ ! versionSpecifier.startsWith( 'file:' ) ||
+ packageName.startsWith( WORDPRESS_NAMESPACE + 'react-native' )
+ ) {
+ continue;
+ }
+
+ const packageRequire = createRequire(
+ // Remove the leading "file:" specifier to build a package URL.
+ new URL( `${ versionSpecifier.substring( 5 ) }/`, rootURL )
+ );
+
+ const depPackageJson = packageRequire( './package.json' );
+ if ( ! Object.hasOwn( depPackageJson, 'wpScriptModuleExports' ) ) {
+ continue;
+ }
+
+ const moduleName = packageName.substring( WORDPRESS_NAMESPACE.length );
+ let { wpScriptModuleExports } = depPackageJson;
+
+ // Special handling for { "wpScriptModuleExports": "./build-module/index.js" }.
+ if ( typeof wpScriptModuleExports === 'string' ) {
+ wpScriptModuleExports = { '.': wpScriptModuleExports };
+ }
+
+ if ( Object.getPrototypeOf( wpScriptModuleExports ) !== Object.prototype ) {
+ throw new Error( 'wpScriptModuleExports must be an object' );
+ }
+
+ for ( const [ exportName, exportPath ] of Object.entries(
+ wpScriptModuleExports
+ ) ) {
+ if ( typeof exportPath !== 'string' ) {
+ throw new Error( 'wpScriptModuleExports paths must be strings' );
+ }
+
+ if ( ! exportPath.startsWith( './' ) ) {
+ throw new Error(
+ 'wpScriptModuleExports paths must start with "./"'
+ );
+ }
+
+ const name =
+ exportName === '.' ? 'index' : exportName.replace( /^\.\/?/, '' );
+
+ gutenbergScriptModules.set(
+ `${ moduleName }/${ name }`,
+ packageRequire.resolve( exportPath )
+ );
+ }
+}
+
+module.exports = {
+ ...baseConfig,
+ name: 'script-modules',
+ entry: Object.fromEntries( gutenbergScriptModules.entries() ),
+ experiments: {
+ outputModule: true,
+ },
+ output: {
+ devtoolNamespace: 'wp',
+ filename: './build-module/[name].min.js',
+ library: {
+ type: 'module',
+ },
+ path: join( __dirname, '..', '..' ),
+ environment: { module: true },
+ module: true,
+ chunkFormat: 'module',
+ asyncChunks: false,
+ },
+ resolve: {
+ extensions: [ '.js', '.ts', '.tsx' ],
+ },
+ module: {
+ rules: [
+ {
+ test: /\.(j|t)sx?$/,
+ exclude: /node_modules/,
+ use: [
+ {
+ loader: require.resolve( 'babel-loader' ),
+ options: {
+ cacheDirectory:
+ process.env.BABEL_CACHE_DIRECTORY || true,
+ babelrc: false,
+ configFile: false,
+ presets: [
+ '@babel/preset-typescript',
+ '@babel/preset-react',
+ ],
+ },
+ },
+ ],
+ },
+ ],
+ },
+ plugins: [ ...plugins, new DependencyExtractionWebpackPlugin() ],
+ watchOptions: {
+ ignored: [ '**/node_modules' ],
+ aggregateTimeout: 500,
+ },
+};
diff --git a/tsconfig.json b/tsconfig.json
index 6be31e9b61bef..3ab54f66019bc 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -25,6 +25,7 @@
{ "path": "packages/element" },
{ "path": "packages/escape-html" },
{ "path": "packages/eslint-plugin" },
+ { "path": "packages/fields" },
{ "path": "packages/hooks" },
{ "path": "packages/html-entities" },
{ "path": "packages/html-entities" },
diff --git a/webpack.config.js b/webpack.config.js
index 45b22cc5354dc..51889b06d1eb4 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -3,13 +3,13 @@
*/
const blocksConfig = require( './tools/webpack/blocks' );
const developmentConfigs = require( './tools/webpack/development' );
-const interactivity = require( './tools/webpack/interactivity' );
+const scriptModules = require( './tools/webpack/script-modules' );
const packagesConfig = require( './tools/webpack/packages' );
const vendorsConfig = require( './tools/webpack/vendors' );
module.exports = [
...blocksConfig,
- interactivity,
+ scriptModules,
packagesConfig,
...developmentConfigs,
...vendorsConfig,