',
+ 'settings' => array(),
+ 'section' => $this->section_key,
)
);
- $choices = array();
- foreach ( $this->fonts as $font_slug => $font_setting ) {
- $choices[ $font_slug ] = $font_setting['name'];
- }
-
$wp_customize->add_control(
- $setting_name,
+ $this->section_key . '-site-editor-button',
array(
- 'section' => $this->section_key,
- 'label' => $label,
- 'type' => 'select',
- 'choices' => $choices,
+ 'type' => 'hidden',
+ 'description' => sprintf( 'Use Site Editor', esc_url( admin_url( 'site-editor.php?styles=open' ) ) ),
+ 'settings' => array(),
+ 'section' => $this->section_key,
)
);
-
- // Update the setting to the dirty value.
- // This is needed to preserve the settings when other Customizer settings change.
- $dirty_value = $wp_customize->get_setting( $setting_name )->post_value();
- if ( ! empty( $dirty_value ) ) {
- $wp_customize->get_setting( $setting_name )->user_value = $dirty_value;
- }
- }
-
- function handle_customize_save_after( $wp_customize ) {
- $body_value = $wp_customize->get_setting( $this->section_key . 'body' )->value();
- $heading_value = $wp_customize->get_setting( $this->section_key . 'heading' )->value();
-
- if ( ! isset( $body_value ) && ! isset( $heading_value ) ) {
- return;
- }
-
- $body_default = $wp_customize->get_setting( $this->section_key . 'body' )->default;
- $heading_default = $wp_customize->get_setting( $this->section_key . 'heading' )->default;
-
- if ( ! isset( $body_value ) ) {
- $body_value = $body_default;
- }
-
- if ( ! isset( $heading_value ) ) {
- $heading_value = $heading_default;
- }
-
- $body_setting = $this->fonts[ $body_value ];
- $body_setting['name'] = 'Body (' . $body_setting['name'] . ')';
- $body_setting['fontSlug'] = $body_setting['slug'];
- $body_setting['slug'] = 'body-font';
-
- $heading_setting = $this->fonts[ $heading_value ];
- $heading_setting['name'] = 'Heading (' . $heading_setting['name'] . ')';
- $heading_setting['fontSlug'] = $heading_setting['slug'];
- $heading_setting['slug'] = 'heading-font';
-
- // Set up variables for the theme.json.
- $font_families = array(
- $body_setting,
- $heading_setting,
- );
-
- $body_font_family_variable = 'var(--wp--preset--font-family--' . $body_setting['slug'] . ')';
- $heading_font_family_variable = 'var(--wp--preset--font-family--' . $heading_setting['slug'] . ')';
-
- // Get the user's global styles CPT id
- $user_custom_post_type_id = WP_Theme_JSON_Resolver_Gutenberg::get_user_global_styles_post_id();
-
- // API request to get global styles
- $get_request = new WP_REST_Request( 'GET', '/wp/v2/global-styles/' );
- $get_request->set_param( 'id', $user_custom_post_type_id );
-
- $global_styles_controller = new Gutenberg_REST_Global_Styles_Controller();
- $global_styles = $global_styles_controller->get_item( $get_request );
-
- // converts data to array (in some cases settings and styles are objects insted of arrays)
- $new_settings = (array) $global_styles->data['settings'];
- $new_styles = (array) $global_styles->data['styles'];
-
- // Set new typography settings
- if ( $font_families ) {
- $new_settings['typography']['fontFamilies']['custom'] = $font_families;
- }
-
- // Add the updated global styles to the update request
- $update_request = new WP_REST_Request( 'PUT', '/wp/v2/global-styles/' );
- $update_request->set_param( 'id', $user_custom_post_type_id );
- $update_request->set_param( 'settings', $new_settings );
- $update_request->set_param( 'styles', $new_styles );
-
- // Update the theme.json with the new settings.
- $updated_global_styles = $global_styles_controller->update_item( $update_request );
- delete_transient( 'global_styles' );
- delete_transient( 'global_styles_' . get_stylesheet() );
- delete_transient( 'gutenberg_global_styles' );
- delete_transient( 'gutenberg_global_styles_' . get_stylesheet() );
}
-
}
new GlobalStylesFontsCustomizer;
diff --git a/blockbase/vendor/autoload.php b/blockbase/vendor/autoload.php
new file mode 100644
index 0000000000..34e531d230
--- /dev/null
+++ b/blockbase/vendor/autoload.php
@@ -0,0 +1,7 @@
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+`Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+, 1 April 1989
+Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/blockbase/vendor/automattic/jetpack-google-fonts-provider/README.md b/blockbase/vendor/automattic/jetpack-google-fonts-provider/README.md
new file mode 100644
index 0000000000..6e2fa6f983
--- /dev/null
+++ b/blockbase/vendor/automattic/jetpack-google-fonts-provider/README.md
@@ -0,0 +1,61 @@
+# Jetpack Google Fonts Provider Package
+
+WordPress Webfonts provider for Google Fonts
+
+## How to install google-fonts-provider
+
+Package is published in [Packagist](https://packagist.org/packages/automattic/jetpack-google-fonts-provider). We recommend using the latest version there. You can install it in a composer managed project with `composer require automattic/jetpack-google-fonts-provider`.
+
+You can also test with the latest development versions like below:
+
+```json
+"require": {
+ "automattic/jetpack-google-fonts-provider": "dev-master"
+}
+```
+
+## Usage
+
+The WordPress Webfonts API is available by activating the Gutenberg plugin and is planned to be included in WordPress 6.0.
+
+### Register the provider
+
+This package contains the provider class, but the provider needs to be registered before it can be used.
+
+```php
+wp_register_webfont_provider( 'google-fonts', '\Automattic\Jetpack\Fonts\Google_Fonts_Provider' );
+```
+
+### Register fonts
+
+After registering the provider, you can register any of the fonts available in the [Google Fonts catalog](https://fonts.google.com) to make them available for use in the block editor typography settings, Global styles, and your site's CSS.
+
+```php
+wp_register_webfont(
+ array(
+ 'font-family' => 'Lato',
+ 'provider' => 'google-fonts',
+ ),
+);
+```
+
+### Add preconnect link
+
+Adding a preconnect link to the `` of the page will help make sure the font files load as soon as possible, and reduce the layout shift when they are displayed. See [this list of webfont best practices](https://web.dev/font-best-practices/#preconnect-to-critical-third-party-origins) for more details. To do so, we can rely on WordPress' `wp_resource_hints` filter like so:
+
+```php
+add_filter( 'wp_resource_hints', '\Automattic\Jetpack\Fonts\Utils::font_source_resource_hint', 10, 2 );
+```
+
+### Additional info
+
+For a discussion about the Webfonts API in WordPress, see https://make.wordpress.org/core/2021/09/28/implementing-a-webfonts-api-in-wordpress-core/.
+
+## Security
+
+Need to report a security vulnerability? Go to [https://automattic.com/security/](https://automattic.com/security/) or directly to our security bug bounty site [https://hackerone.com/automattic](https://hackerone.com/automattic).
+
+## License
+
+Jetpack Google Fonts Provider is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)
+
diff --git a/blockbase/vendor/automattic/jetpack-google-fonts-provider/SECURITY.md b/blockbase/vendor/automattic/jetpack-google-fonts-provider/SECURITY.md
new file mode 100644
index 0000000000..b4b46c0ee2
--- /dev/null
+++ b/blockbase/vendor/automattic/jetpack-google-fonts-provider/SECURITY.md
@@ -0,0 +1,38 @@
+# Security Policy
+
+Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/).
+
+## Supported Versions
+
+Generally, only the latest version of Jetpack has continued support. If a critical vulnerability is found in the current version of Jetpack, we may opt to backport any patches to previous versions.
+
+## Reporting a Vulnerability
+
+[Jetpack](https://jetpack.com/) is an open-source plugin for WordPress. Our HackerOne program covers the plugin software, as well as a variety of related projects and infrastructure.
+
+**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.**
+
+Our most critical targets are:
+
+* Jetpack and the Jetpack composer packages (all within this repo)
+* Jetpack.com -- the primary marketing site.
+* cloud.jetpack.com -- a management site.
+* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites.
+
+For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic).
+
+_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._
+
+## Guidelines
+
+We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines:
+
+* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines).
+* Pen-testing Production:
+ * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above).
+ * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC.
+ * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels.
+ * To be eligible for a bounty, all of these guidelines must be followed.
+* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability.
+
+We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties.
diff --git a/blockbase/vendor/automattic/jetpack-google-fonts-provider/composer.json b/blockbase/vendor/automattic/jetpack-google-fonts-provider/composer.json
new file mode 100644
index 0000000000..c765946e54
--- /dev/null
+++ b/blockbase/vendor/automattic/jetpack-google-fonts-provider/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "automattic/jetpack-google-fonts-provider",
+ "description": "WordPress Webfonts provider for Google Fonts",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {},
+ "require-dev": {
+ "yoast/phpunit-polyfills": "1.0.3",
+ "automattic/jetpack-changelogger": "^3.1",
+ "brain/monkey": "2.6.1"
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-coverage": [
+ "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-clover \"$COVERAGE_DIR/clover.xml\""
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-google-fonts-provider",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-google-fonts-provider/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-master": "0.3.x-dev"
+ },
+ "textdomain": "jetpack-google-fonts-provider"
+ }
+}
diff --git a/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/class-google-fonts-provider.php b/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/class-google-fonts-provider.php
new file mode 100644
index 0000000000..c2006a54f3
--- /dev/null
+++ b/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/class-google-fonts-provider.php
@@ -0,0 +1,359 @@
+
+
+ get_remote_styles( $url );
+
+ /*
+ * Early return if the request failed.
+ * Cache an empty string for 60 seconds to avoid bottlenecks.
+ */
+ if ( empty( $css ) ) {
+ \set_site_transient( $id, '', MINUTE_IN_SECONDS );
+ return '';
+ }
+
+ // Cache the CSS for a month.
+ \set_site_transient( $id, $css, MONTH_IN_SECONDS );
+ }
+
+ return $css;
+ }
+
+ /**
+ * Gets styles from the remote font service via the given URL.
+ *
+ * @param string $url The URL to fetch.
+
+ * @return string The styles on success. Empty string on failure.
+ */
+ protected function get_remote_styles( $url ) {
+ // Use a modern user-agent, to get woff2 files.
+ $args = array( 'user-agent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0' );
+
+ // Get the remote URL contents.
+ $response = \wp_safe_remote_get( $url, $args );
+
+ // Early return if the request failed.
+ if ( \is_wp_error( $response ) || 200 !== \wp_remote_retrieve_response_code( $response ) ) {
+ return '';
+ }
+
+ // Get the response body.
+ return \wp_remote_retrieve_body( $response );
+ }
+
+ /**
+ * Gets the `@font-face` CSS styles for Google Fonts.
+ *
+ * This method does the following processing tasks:
+ * 1. Orchestrates an optimized Google Fonts API URL for each font-family.
+ * 2. Caches each URL, if not already cached.
+ * 3. Does a remote request to the Google Fonts API service to fetch the styles.
+ * 4. Generates the `@font-face` for all its webfonts.
+ *
+ * @return string The `@font-face` CSS.
+ */
+ public function get_css() {
+ $css = '';
+ $urls = $this->build_collection_api_urls();
+
+ foreach ( $urls as $url ) {
+ $css .= $this->get_cached_remote_styles( 'jetpack_google_fonts_' . md5( $url ), $url );
+ }
+
+ return $css;
+ }
+
+ /**
+ * Builds the Google Fonts URL for a collection of webfonts.
+ *
+ * For example, if given the following webfonts:
+ * ```
+ * array(
+ * array(
+ * 'font-family' => 'Source Serif Pro',
+ * 'font-style' => 'normal',
+ * 'font-weight' => '200 400',
+ * ),
+ * array(
+ * 'font-family' => 'Source Serif Pro',
+ * 'font-style' => 'italic',
+ * 'font-weight' => '400 600',
+ * ),
+ * )
+ * ```
+ * then the returned collection would be:
+ * ```
+ * array(
+ * 'https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,200;0,300;0,400;1,400;1,500;1,600&display=fallback'
+ * )
+ * ```
+ *
+ * @return array Collection of font-family urls.
+ */
+ private function build_collection_api_urls() {
+ $font_families_urls = array();
+
+ /*
+ * Iterate over each font-family group to build the Google Fonts API URL
+ * for that specific family. Each is added to the collection of URLs to be
+ * returned to the `get_css()` method for making the remote request.
+ */
+ foreach ( $this->organize_webfonts() as $font_display => $font_families ) {
+ $url_parts = array();
+ foreach ( $font_families as $font_family => $webfonts ) {
+ list( $normal_weights, $italic_weights ) = $this->collect_font_weights( $webfonts );
+
+ // Build the font-style with its font-weights.
+ $url_part = rawurlencode( $font_family );
+ if ( empty( $italic_weights ) && ! empty( $normal_weights ) ) {
+ $url_part .= ':wght@' . implode( ';', $normal_weights );
+ } elseif ( ! empty( $italic_weights ) && empty( $normal_weights ) ) {
+ $url_part .= ':ital,wght@1,' . implode( ';', $normal_weights );
+ } elseif ( ! empty( $italic_weights ) && ! empty( $normal_weights ) ) {
+ $url_part .= ':ital,wght@0,' . implode( ';0,', $normal_weights ) . ';1,' . implode( ';1,', $italic_weights );
+ }
+
+ // Add it to the collection.
+ $url_parts[] = $url_part;
+ }
+
+ // Build the URL for this font-family and add it to the collection.
+ $font_families_urls[] = $this->root_url . '?family=' . implode( '&family=', $url_parts ) . '&display=' . $font_display;
+ }
+
+ return $font_families_urls;
+ }
+
+ /**
+ * Organizes the webfonts by font-display and then font-family.
+ *
+ * To optimizing building the URL for the Google Fonts API request,
+ * this method organizes the webfonts first by font-display and then
+ * by font-family.
+ *
+ * For example, if given the following webfonts:
+ * ```
+ * array(
+ * array(
+ * 'font-family' => 'Source Serif Pro',
+ * 'font-style' => 'normal',
+ * 'font-weight' => '200 400',
+ * ),
+ * array(
+ * 'font-family' => 'Source Serif Pro',
+ * 'font-style' => 'italic',
+ * 'font-weight' => '400 600',
+ * ),
+ * )
+ * ```
+ * then the returned collection would be:
+ * ```
+ * array(
+ * 'fallback' => array(
+ * 'Source Serif Pro' => array(
+ * array(
+ * 'font-family' => 'Source Serif Pro',
+ * 'font-style' => 'normal',
+ * 'font-weight' => '200 400',
+ * ),
+ * array(
+ * 'font-family' => 'Source Serif Pro',
+ * 'font-style' => 'italic',
+ * 'font-weight' => '400 600',
+ * ),
+ * ),
+ * ),
+ * )
+ *
+ * @return array[][] Webfonts organized by font-display and then font-family.
+ */
+ private function organize_webfonts() {
+ $font_display_groups = array();
+
+ /*
+ * Group by font-display.
+ * Each font-display will need to be a separate request.
+ */
+ foreach ( $this->webfonts as $webfont ) {
+ if ( ! isset( $font_display_groups[ $webfont['font-display'] ] ) ) {
+ $font_display_groups[ $webfont['font-display'] ] = array();
+ }
+ $font_display_groups[ $webfont['font-display'] ][] = $webfont;
+ }
+
+ /*
+ * Iterate over each font-display group and group by font-family.
+ * Multiple font-families can be combined in the same request,
+ * but their params need to be grouped.
+ */
+ foreach ( $font_display_groups as $font_display => $font_display_group ) {
+ $font_families = array();
+
+ foreach ( $font_display_group as $webfont ) {
+ if ( ! isset( $font_families[ $webfont['font-family'] ] ) ) {
+ $font_families[ $webfont['font-family'] ] = array();
+ }
+ $font_families[ $webfont['font-family'] ][] = $webfont;
+ }
+
+ $font_display_groups[ $font_display ] = $font_families;
+ }
+
+ return $font_display_groups;
+ }
+
+ /**
+ * Collects all font-weights grouped by 'normal' and 'italic' font-style.
+ *
+ * For example, if given the following webfonts:
+ * ```
+ * array(
+ * array(
+ * 'font-family' => 'Source Serif Pro',
+ * 'font-style' => 'normal',
+ * 'font-weight' => '200 400',
+ * ),
+ * array(
+ * 'font-family' => 'Source Serif Pro',
+ * 'font-style' => 'italic',
+ * 'font-weight' => '400 600',
+ * ),
+ * )
+ * ```
+ * Then the returned collection would be:
+ * ```
+ * array(
+ * array( 200, 300, 400 ),
+ * array( 400, 500, 600 ),
+ * )
+ * ```
+ *
+ * @param array $webfonts Webfonts to process.
+ * @return array[] {
+ * The font-weights grouped by font-style.
+ *
+ * @type array $normal_weights Individual font-weight values for 'normal' font-style.
+ * @type array $italic_weights Individual font-weight values for 'italic' font-style.
+ * }
+ */
+ private function collect_font_weights( array $webfonts ) {
+ $normal_weights = array();
+ $italic_weights = array();
+
+ foreach ( $webfonts as $webfont ) {
+ $font_weights = $this->get_font_weights( $webfont['font-weight'] );
+ // Skip this webfont if it does not have a font-weight defined.
+ if ( empty( $font_weights ) ) {
+ continue;
+ }
+
+ // Add the individual font-weights to the end of font-style array.
+ if ( 'italic' === $webfont['font-style'] ) {
+ array_push( $italic_weights, ...$font_weights );
+ } else {
+ array_push( $normal_weights, ...$font_weights );
+ }
+ }
+
+ // Remove duplicates.
+ $normal_weights = array_unique( $normal_weights );
+ $italic_weights = array_unique( $italic_weights );
+
+ return array( $normal_weights, $italic_weights );
+ }
+
+ /**
+ * Converts the given string of font-weight into an array of individual weight values.
+ *
+ * When given a single font-weight, the value is wrapped into an array.
+ *
+ * A range of font-weights is specified as '400 600' with the lightest value first,
+ * a space, and then the heaviest value last.
+ *
+ * When given a range of font-weight values, the range is converted into individual
+ * font-weight values. For example, a range of '400 600' is converted into
+ * `array( 400, 500, 600 )`.
+ *
+ * @param string $font_weights The font-weights string.
+ * @return array The font-weights array.
+ */
+ private function get_font_weights( $font_weights ) {
+ $font_weights = trim( $font_weights );
+
+ // A single font-weight.
+ if ( false === strpos( $font_weights, ' ' ) ) {
+ return array( $font_weights );
+ }
+
+ // Process a range of font-weight values that are delimited by ' '.
+ $font_weights = explode( ' ', $font_weights );
+
+ // If there are 2 values, treat them as a range.
+ if ( 2 === count( $font_weights ) ) {
+ $font_weights = range( (int) $font_weights[0], (int) $font_weights[1], 100 );
+ }
+
+ return $font_weights;
+ }
+}
diff --git a/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/class-utils.php b/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/class-utils.php
new file mode 100644
index 0000000000..3ea69559de
--- /dev/null
+++ b/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/class-utils.php
@@ -0,0 +1,57 @@
+ 'https://fonts.gstatic.com',
+ 'crossorigin',
+ );
+ }
+
+ return $urls;
+ }
+
+ /**
+ * Check if a font family is registered (verifying that it can be enqueued).
+ *
+ * This function will not be needed if/when WP_Webfonts provides this functionality.
+ *
+ * @link https://github.com/WordPress/gutenberg/pull/39988
+ * @link https://github.com/WordPress/gutenberg/blob/e94fffae0684aa5a6dc370ce3eba262cb77071d9/lib/experimental/class-wp-webfonts.php#L217
+ *
+ * @param string $font_family_name Name of font family.
+ * @return boolean|void Whether the font family is registered, or void if WP_Webfonts is not available.
+ */
+ public static function is_font_family_registered( $font_family_name ) {
+ if ( ! function_exists( 'wp_webfonts' ) || ! method_exists( 'WP_Webfonts', 'get_font_slug' ) ) {
+ return;
+ }
+
+ $wp_webfonts = wp_webfonts();
+
+ $slug = \WP_Webfonts::get_font_slug( $font_family_name );
+
+ return isset( $wp_webfonts->get_registered_webfonts()[ $slug ] );
+ }
+}
diff --git a/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-blocks.php b/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-blocks.php
new file mode 100644
index 0000000000..f715bfdf0a
--- /dev/null
+++ b/blockbase/vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-blocks.php
@@ -0,0 +1,37 @@
+.+)\)$/', $font_family, $matches );
+
+ if ( isset( $matches['slug'] ) ) {
+ return $matches['slug'];
+ }
+
+ // Full string: var:preset|font-family|slug
+ // We do not care about the origin of the font, only its slug.
+ preg_match( '/font-family\|(?P.+)$/', $font_family, $matches );
+
+ if ( isset( $matches['slug'] ) ) {
+ return $matches['slug'];
+ }
+
+ return $font_family;
+ }
+}
diff --git a/blockbase/vendor/composer/ClassLoader.php b/blockbase/vendor/composer/ClassLoader.php
new file mode 100644
index 0000000000..afef3fa2ad
--- /dev/null
+++ b/blockbase/vendor/composer/ClassLoader.php
@@ -0,0 +1,572 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier
+ * @author Jordi Boggiano
+ * @see https://www.php-fig.org/psr/psr-0/
+ * @see https://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+ /** @var ?string */
+ private $vendorDir;
+
+ // PSR-4
+ /**
+ * @var array[]
+ * @psalm-var array>
+ */
+ private $prefixLengthsPsr4 = array();
+ /**
+ * @var array[]
+ * @psalm-var array>
+ */
+ private $prefixDirsPsr4 = array();
+ /**
+ * @var array[]
+ * @psalm-var array
+ */
+ private $fallbackDirsPsr4 = array();
+
+ // PSR-0
+ /**
+ * @var array[]
+ * @psalm-var array>
+ */
+ private $prefixesPsr0 = array();
+ /**
+ * @var array[]
+ * @psalm-var array
+ */
+ private $fallbackDirsPsr0 = array();
+
+ /** @var bool */
+ private $useIncludePath = false;
+
+ /**
+ * @var string[]
+ * @psalm-var array
+ */
+ private $classMap = array();
+
+ /** @var bool */
+ private $classMapAuthoritative = false;
+
+ /**
+ * @var bool[]
+ * @psalm-var array
+ */
+ private $missingClasses = array();
+
+ /** @var ?string */
+ private $apcuPrefix;
+
+ /**
+ * @var self[]
+ */
+ private static $registeredLoaders = array();
+
+ /**
+ * @param ?string $vendorDir
+ */
+ public function __construct($vendorDir = null)
+ {
+ $this->vendorDir = $vendorDir;
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getPrefixes()
+ {
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
+ }
+
+ return array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return array>
+ */
+ public function getPrefixesPsr4()
+ {
+ return $this->prefixDirsPsr4;
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return array
+ */
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirsPsr0;
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return array
+ */
+ public function getFallbackDirsPsr4()
+ {
+ return $this->fallbackDirsPsr4;
+ }
+
+ /**
+ * @return string[] Array of classname => path
+ * @psalm-return array
+ */
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param string[] $classMap Class to filename map
+ * @psalm-param array $classMap
+ *
+ * @return void
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param string[]|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @return void
+ */
+ public function add($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ if ($prepend) {
+ $this->fallbackDirsPsr0 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr0
+ );
+ } else {
+ $this->fallbackDirsPsr0 = array_merge(
+ $this->fallbackDirsPsr0,
+ (array) $paths
+ );
+ }
+
+ return;
+ }
+
+ $first = $prefix[0];
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+
+ return;
+ }
+ if ($prepend) {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixesPsr0[$first][$prefix]
+ );
+ } else {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $this->prefixesPsr0[$first][$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param string[]|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return void
+ */
+ public function addPsr4($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ // Register directories for the root namespace.
+ if ($prepend) {
+ $this->fallbackDirsPsr4 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr4
+ );
+ } else {
+ $this->fallbackDirsPsr4 = array_merge(
+ $this->fallbackDirsPsr4,
+ (array) $paths
+ );
+ }
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ // Register directories for a new namespace.
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ } elseif ($prepend) {
+ // Prepend directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixDirsPsr4[$prefix]
+ );
+ } else {
+ // Append directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $this->prefixDirsPsr4[$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param string[]|string $paths The PSR-0 base directories
+ *
+ * @return void
+ */
+ public function set($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr0 = (array) $paths;
+ } else {
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace,
+ * replacing any others previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param string[]|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return void
+ */
+ public function setPsr4($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr4 = (array) $paths;
+ } else {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param bool $useIncludePath
+ *
+ * @return void
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return bool
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ *
+ * @return void
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
+ *
+ * @param string|null $apcuPrefix
+ *
+ * @return void
+ */
+ public function setApcuPrefix($apcuPrefix)
+ {
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
+ }
+
+ /**
+ * The APCu prefix in use, or null if APCu caching is not enabled.
+ *
+ * @return string|null
+ */
+ public function getApcuPrefix()
+ {
+ return $this->apcuPrefix;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader or not
+ *
+ * @return void
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+ if (null === $this->vendorDir) {
+ return;
+ }
+
+ if ($prepend) {
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+ } else {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ self::$registeredLoaders[$this->vendorDir] = $this;
+ }
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ *
+ * @return void
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+
+ if (null !== $this->vendorDir) {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ }
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return true|null True if loaded, null otherwise
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ includeFile($file);
+
+ return true;
+ }
+
+ return null;
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|false The path if found, false otherwise
+ */
+ public function findFile($class)
+ {
+ // class map lookup
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+ return false;
+ }
+ if (null !== $this->apcuPrefix) {
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+ if ($hit) {
+ return $file;
+ }
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if (false === $file && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+
+ if (null !== $this->apcuPrefix) {
+ apcu_add($this->apcuPrefix.$class, $file);
+ }
+
+ if (false === $file) {
+ // Remember that this class does not exist.
+ $this->missingClasses[$class] = true;
+ }
+
+ return $file;
+ }
+
+ /**
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
+ *
+ * @return self[]
+ */
+ public static function getRegisteredLoaders()
+ {
+ return self::$registeredLoaders;
+ }
+
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
+ private function findFileWithExtension($class, $ext)
+ {
+ // PSR-4 lookup
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+ $first = $class[0];
+ if (isset($this->prefixLengthsPsr4[$first])) {
+ $subPath = $class;
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
+ $subPath = substr($subPath, 0, $lastPos);
+ $search = $subPath . '\\';
+ if (isset($this->prefixDirsPsr4[$search])) {
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
+ if (file_exists($file = $dir . $pathEnd)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-4 fallback dirs
+ foreach ($this->fallbackDirsPsr4 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 lookup
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+ } else {
+ // PEAR-like class name
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+ }
+
+ if (isset($this->prefixesPsr0[$first])) {
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-0 fallback dirs
+ foreach ($this->fallbackDirsPsr0 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 include paths.
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+ return $file;
+ }
+
+ return false;
+ }
+}
+
+/**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ * @private
+ */
+function includeFile($file)
+{
+ include $file;
+}
diff --git a/blockbase/vendor/composer/InstalledVersions.php b/blockbase/vendor/composer/InstalledVersions.php
new file mode 100644
index 0000000000..d50e0c9fcc
--- /dev/null
+++ b/blockbase/vendor/composer/InstalledVersions.php
@@ -0,0 +1,350 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ */
+class InstalledVersions
+{
+ /**
+ * @var mixed[]|null
+ * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
+ private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array}>
+ */
+ private static $installedByVendor = array();
+
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+
+ return $packagesByType;
+ }
+
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints($constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
+ * @return array[]
+ * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}
+ */
+ public static function getRawData()
+ {
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = require __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+ $installed[] = self::$installed;
+
+ return $installed;
+ }
+}
diff --git a/blockbase/vendor/composer/LICENSE b/blockbase/vendor/composer/LICENSE
new file mode 100644
index 0000000000..f27399a042
--- /dev/null
+++ b/blockbase/vendor/composer/LICENSE
@@ -0,0 +1,21 @@
+
+Copyright (c) Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/blockbase/vendor/composer/autoload_classmap.php b/blockbase/vendor/composer/autoload_classmap.php
new file mode 100644
index 0000000000..63bb56a6a4
--- /dev/null
+++ b/blockbase/vendor/composer/autoload_classmap.php
@@ -0,0 +1,14 @@
+ $vendorDir . '/automattic/jetpack-google-fonts-provider/src/class-google-fonts-provider.php',
+ 'Automattic\\Jetpack\\Fonts\\Introspectors\\Blocks' => $vendorDir . '/automattic/jetpack-google-fonts-provider/src/introspectors/class-blocks.php',
+ 'Automattic\\Jetpack\\Fonts\\Introspectors\\Global_Styles' => $vendorDir . '/automattic/jetpack-google-fonts-provider/src/introspectors/class-global-styles.php',
+ 'Automattic\\Jetpack\\Fonts\\Utils' => $vendorDir . '/automattic/jetpack-google-fonts-provider/src/class-utils.php',
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+);
diff --git a/blockbase/vendor/composer/autoload_namespaces.php b/blockbase/vendor/composer/autoload_namespaces.php
new file mode 100644
index 0000000000..b7fc0125db
--- /dev/null
+++ b/blockbase/vendor/composer/autoload_namespaces.php
@@ -0,0 +1,9 @@
+= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
+ if ($useStaticLoader) {
+ require __DIR__ . '/autoload_static.php';
+
+ call_user_func(\Composer\Autoload\ComposerStaticInit0777abd23b9615aca0bf30e3e2b460bb::getInitializer($loader));
+ } else {
+ $map = require __DIR__ . '/autoload_namespaces.php';
+ foreach ($map as $namespace => $path) {
+ $loader->set($namespace, $path);
+ }
+
+ $map = require __DIR__ . '/autoload_psr4.php';
+ foreach ($map as $namespace => $path) {
+ $loader->setPsr4($namespace, $path);
+ }
+
+ $classMap = require __DIR__ . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
+ }
+
+ $loader->register(true);
+
+ return $loader;
+ }
+}
diff --git a/blockbase/vendor/composer/autoload_static.php b/blockbase/vendor/composer/autoload_static.php
new file mode 100644
index 0000000000..dd682563a7
--- /dev/null
+++ b/blockbase/vendor/composer/autoload_static.php
@@ -0,0 +1,24 @@
+ __DIR__ . '/..' . '/automattic/jetpack-google-fonts-provider/src/class-google-fonts-provider.php',
+ 'Automattic\\Jetpack\\Fonts\\Introspectors\\Blocks' => __DIR__ . '/..' . '/automattic/jetpack-google-fonts-provider/src/introspectors/class-blocks.php',
+ 'Automattic\\Jetpack\\Fonts\\Introspectors\\Global_Styles' => __DIR__ . '/..' . '/automattic/jetpack-google-fonts-provider/src/introspectors/class-global-styles.php',
+ 'Automattic\\Jetpack\\Fonts\\Utils' => __DIR__ . '/..' . '/automattic/jetpack-google-fonts-provider/src/class-utils.php',
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+ );
+
+ public static function getInitializer(ClassLoader $loader)
+ {
+ return \Closure::bind(function () use ($loader) {
+ $loader->classMap = ComposerStaticInit0777abd23b9615aca0bf30e3e2b460bb::$classMap;
+
+ }, null, ClassLoader::class);
+ }
+}
diff --git a/blockbase/vendor/composer/installed.json b/blockbase/vendor/composer/installed.json
new file mode 100644
index 0000000000..e5d0938a13
--- /dev/null
+++ b/blockbase/vendor/composer/installed.json
@@ -0,0 +1,55 @@
+{
+ "packages": [
+ {
+ "name": "automattic/jetpack-google-fonts-provider",
+ "version": "v0.3.0",
+ "version_normalized": "0.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Automattic/jetpack-google-fonts-provider.git",
+ "reference": "cc26c71d0156bcdce80552cb7f084c23b5fe7be4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Automattic/jetpack-google-fonts-provider/zipball/cc26c71d0156bcdce80552cb7f084c23b5fe7be4",
+ "reference": "cc26c71d0156bcdce80552cb7f084c23b5fe7be4",
+ "shasum": ""
+ },
+ "require-dev": {
+ "automattic/jetpack-changelogger": "^3.1",
+ "brain/monkey": "2.6.1",
+ "yoast/phpunit-polyfills": "1.0.3"
+ },
+ "time": "2022-04-26T14:33:32+00:00",
+ "type": "jetpack-library",
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-google-fonts-provider",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-google-fonts-provider/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-master": "0.3.x-dev"
+ },
+ "textdomain": "jetpack-google-fonts-provider"
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "description": "WordPress Webfonts provider for Google Fonts",
+ "support": {
+ "source": "https://github.com/Automattic/jetpack-google-fonts-provider/tree/v0.3.0"
+ },
+ "install-path": "../automattic/jetpack-google-fonts-provider"
+ }
+ ],
+ "dev": true,
+ "dev-package-names": []
+}
diff --git a/blockbase/vendor/composer/installed.php b/blockbase/vendor/composer/installed.php
new file mode 100644
index 0000000000..26a47beedb
--- /dev/null
+++ b/blockbase/vendor/composer/installed.php
@@ -0,0 +1,32 @@
+ array(
+ 'pretty_version' => 'dev-trunk',
+ 'version' => 'dev-trunk',
+ 'type' => 'project',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'reference' => '090426a9c2af3d685443c079e5e3368550a4d51c',
+ 'name' => 'automattic/blockbase',
+ 'dev' => true,
+ ),
+ 'versions' => array(
+ 'automattic/blockbase' => array(
+ 'pretty_version' => 'dev-trunk',
+ 'version' => 'dev-trunk',
+ 'type' => 'project',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'reference' => '090426a9c2af3d685443c079e5e3368550a4d51c',
+ 'dev_requirement' => false,
+ ),
+ 'automattic/jetpack-google-fonts-provider' => array(
+ 'pretty_version' => 'v0.3.0',
+ 'version' => '0.3.0.0',
+ 'type' => 'jetpack-library',
+ 'install_path' => __DIR__ . '/../automattic/jetpack-google-fonts-provider',
+ 'aliases' => array(),
+ 'reference' => 'cc26c71d0156bcdce80552cb7f084c23b5fe7be4',
+ 'dev_requirement' => false,
+ ),
+ ),
+);
diff --git a/meraki/theme.json b/meraki/theme.json
index 80f5b85da6..36a6f13bd1 100644
--- a/meraki/theme.json
+++ b/meraki/theme.json
@@ -61,7 +61,7 @@
},
{
"fontFamily": "Jost, sans-serif",
- "slug": "heading-font",
+ "slug": "jost",
"name": "Headings (Jost)",
"fontFace": [
{
@@ -140,7 +140,7 @@
},
"core/navigation-link": {
"typography": {
- "fontFamily": "var(--wp--preset--font-family--heading-font)",
+ "fontFamily": "var(--wp--preset--font-family--jost)",
"letterSpacing": "0.05em",
"fontSize": "var(--wp--preset--font-size--tiny)",
"textTransform": "uppercase"
@@ -166,7 +166,7 @@
},
"core/site-tagline": {
"typography": {
- "fontFamily": "var(--wp--preset--font-family--heading-font)",
+ "fontFamily": "var(--wp--preset--font-family--jost)",
"fontSize": "var(--wp--preset--font-size--small)"
}
}