Editor: Update WordPress packages for 6.0 RC 3
[53402] Theme: Use a better method to determine the theme name during export [53403] Editor: Update WordPress packages for 6.0 RC 3 [53404] Editor: Return additional block patterns to server-generated settings Props SergeyBiryukov, scruffian, davidbaumwald, jeremyfelt, zieladam, ndiego, jsnajdr, peterwilsoncc, johnstonphilip. Merges [53402], [53403] and [53404] to the 6.0 branch. Fixes #55567. Built from https://develop.svn.wordpress.org/branches/6.0@53405 git-svn-id: http://core.svn.wordpress.org/branches/6.0@52994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1af74a4629
commit
347a117b37
|
@ -209,6 +209,10 @@ $editor_settings = array(
|
|||
'enableCustomFields' => (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ),
|
||||
);
|
||||
|
||||
// Add additional back-compat patterns registered by `current_screen` et al.
|
||||
$editor_settings['__experimentalAdditionalBlockPatterns'] = WP_Block_Patterns_Registry::get_instance()->get_all_registered( true );
|
||||
$editor_settings['__experimentalAdditionalBlockPatternCategories'] = WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered( true );
|
||||
|
||||
$autosave = wp_get_post_autosave( $post->ID );
|
||||
if ( $autosave ) {
|
||||
if ( mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) {
|
||||
|
|
|
@ -68,6 +68,11 @@ $custom_settings = array(
|
|||
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
|
||||
'__unstableHomeTemplate' => $home_template,
|
||||
);
|
||||
|
||||
// Add additional back-compat patterns registered by `current_screen` et al.
|
||||
$custom_settings['__experimentalAdditionalBlockPatterns'] = WP_Block_Patterns_Registry::get_instance()->get_all_registered( true );
|
||||
$custom_settings['__experimentalAdditionalBlockPatternCategories'] = WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered( true );
|
||||
|
||||
$editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context );
|
||||
|
||||
if ( isset( $_GET['postType'] ) && ! isset( $_GET['postId'] ) ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -937,7 +937,7 @@ function wp_generate_block_templates_export_file() {
|
|||
}
|
||||
|
||||
$obscura = wp_generate_password( 12, false, false );
|
||||
$theme_name = wp_get_theme()->get( 'TextDomain' );
|
||||
$theme_name = basename( get_stylesheet() );
|
||||
$filename = get_temp_dir() . $theme_name . $obscura . '.zip';
|
||||
|
||||
$zip = new ZipArchive();
|
||||
|
|
|
@ -74,6 +74,21 @@
|
|||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-post-comments {
|
||||
/* utility classes */
|
||||
/* end utility classes */
|
||||
}
|
||||
.wp-block-post-comments .alignleft {
|
||||
float: right;
|
||||
}
|
||||
.wp-block-post-comments .alignright {
|
||||
float: left;
|
||||
}
|
||||
.wp-block-post-comments .navigation::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
.wp-block-post-comments .commentlist {
|
||||
clear: both;
|
||||
list-style: none;
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-top:.5em;margin-left:.75em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{margin-top:1em;margin-bottom:1em;display:block}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{display:block;box-sizing:border-box;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
|
||||
.wp-block-post-comments .alignleft{float:right}.wp-block-post-comments .alignright{float:left}.wp-block-post-comments .navigation:after{content:"";display:table;clear:both}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-top:.5em;margin-left:.75em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{margin-top:1em;margin-bottom:1em;display:block}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{display:block;box-sizing:border-box;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
|
|
@ -74,6 +74,21 @@
|
|||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-post-comments {
|
||||
/* utility classes */
|
||||
/* end utility classes */
|
||||
}
|
||||
.wp-block-post-comments .alignleft {
|
||||
float: left;
|
||||
}
|
||||
.wp-block-post-comments .alignright {
|
||||
float: right;
|
||||
}
|
||||
.wp-block-post-comments .navigation::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
.wp-block-post-comments .commentlist {
|
||||
clear: both;
|
||||
list-style: none;
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-top:.5em;margin-right:.75em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{margin-top:1em;margin-bottom:1em;display:block}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{display:block;box-sizing:border-box;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
|
||||
.wp-block-post-comments .alignleft{float:left}.wp-block-post-comments .alignright{float:right}.wp-block-post-comments .navigation:after{content:"";display:table;clear:both}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-top:.5em;margin-right:.75em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{margin-top:1em;margin-bottom:1em;display:block}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{display:block;box-sizing:border-box;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-size:1em;font-family:inherit}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}.wp-block-post-comments input[type=submit]{border:none}
|
|
@ -19,6 +19,14 @@ final class WP_Block_Pattern_Categories_Registry {
|
|||
*/
|
||||
private $registered_categories = array();
|
||||
|
||||
/**
|
||||
* Pattern categories registered outside the `init` action.
|
||||
*
|
||||
* @since 6.0.0
|
||||
* @var array[]
|
||||
*/
|
||||
private $registered_categories_outside_init = array();
|
||||
|
||||
/**
|
||||
* Container for the main instance of the class.
|
||||
*
|
||||
|
@ -50,11 +58,20 @@ final class WP_Block_Pattern_Categories_Registry {
|
|||
return false;
|
||||
}
|
||||
|
||||
$this->registered_categories[ $category_name ] = array_merge(
|
||||
$category = array_merge(
|
||||
array( 'name' => $category_name ),
|
||||
$category_properties
|
||||
);
|
||||
|
||||
$this->registered_categories[ $category_name ] = $category;
|
||||
|
||||
// If the category is registered inside an action other than `init`, store it
|
||||
// also to a dedicated array. Used to detect deprecated registrations inside
|
||||
// `admin_init` or `current_screen`.
|
||||
if ( current_action() && 'init' !== current_action() ) {
|
||||
$this->registered_categories_outside_init[ $category_name ] = $category;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -78,6 +95,7 @@ final class WP_Block_Pattern_Categories_Registry {
|
|||
}
|
||||
|
||||
unset( $this->registered_categories[ $category_name ] );
|
||||
unset( $this->registered_categories_outside_init[ $category_name ] );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -103,10 +121,15 @@ final class WP_Block_Pattern_Categories_Registry {
|
|||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param bool $outside_init_only Return only categories registered outside the `init` action.
|
||||
* @return array[] Array of arrays containing the registered pattern categories properties.
|
||||
*/
|
||||
public function get_all_registered() {
|
||||
return array_values( $this->registered_categories );
|
||||
public function get_all_registered( $outside_init_only = false ) {
|
||||
return array_values(
|
||||
$outside_init_only
|
||||
? $this->registered_categories_outside_init
|
||||
: $this->registered_categories
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,14 @@ final class WP_Block_Patterns_Registry {
|
|||
*/
|
||||
private $registered_patterns = array();
|
||||
|
||||
/**
|
||||
* Patterns registered outside the `init` action.
|
||||
*
|
||||
* @since 6.0.0
|
||||
* @var array[]
|
||||
*/
|
||||
private $registered_patterns_outside_init = array();
|
||||
|
||||
/**
|
||||
* Container for the main instance of the class.
|
||||
*
|
||||
|
@ -92,10 +100,18 @@ final class WP_Block_Patterns_Registry {
|
|||
return false;
|
||||
}
|
||||
|
||||
$this->registered_patterns[ $pattern_name ] = array_merge(
|
||||
$pattern = array_merge(
|
||||
$pattern_properties,
|
||||
array( 'name' => $pattern_name )
|
||||
);
|
||||
$this->registered_patterns[ $pattern_name ] = $pattern;
|
||||
|
||||
// If the pattern is registered inside an action other than `init`, store it
|
||||
// also to a dedicated array. Used to detect deprecated registrations inside
|
||||
// `admin_init` or `current_screen`.
|
||||
if ( current_action() && 'init' !== current_action() ) {
|
||||
$this->registered_patterns_outside_init[ $pattern_name ] = $pattern;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -120,6 +136,7 @@ final class WP_Block_Patterns_Registry {
|
|||
}
|
||||
|
||||
unset( $this->registered_patterns[ $pattern_name ] );
|
||||
unset( $this->registered_patterns_outside_init[ $pattern_name ] );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -145,11 +162,16 @@ final class WP_Block_Patterns_Registry {
|
|||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param bool $outside_init_only Return only patterns registered outside the `init` action.
|
||||
* @return array[] Array of arrays containing the registered block patterns properties,
|
||||
* and per style.
|
||||
*/
|
||||
public function get_all_registered() {
|
||||
return array_values( $this->registered_patterns );
|
||||
public function get_all_registered( $outside_init_only = false ) {
|
||||
return array_values(
|
||||
$outside_init_only
|
||||
? $this->registered_patterns_outside_init
|
||||
: $this->registered_patterns
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2101,6 +2101,21 @@ p.has-background {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.wp-block-post-comments {
|
||||
/* utility classes */
|
||||
/* end utility classes */
|
||||
}
|
||||
.wp-block-post-comments .alignleft {
|
||||
float: right;
|
||||
}
|
||||
.wp-block-post-comments .alignright {
|
||||
float: left;
|
||||
}
|
||||
.wp-block-post-comments .navigation::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
.wp-block-post-comments .commentlist {
|
||||
clear: both;
|
||||
list-style: none;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2127,6 +2127,21 @@ p.has-background {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.wp-block-post-comments {
|
||||
/* utility classes */
|
||||
/* end utility classes */
|
||||
}
|
||||
.wp-block-post-comments .alignleft {
|
||||
float: left;
|
||||
}
|
||||
.wp-block-post-comments .alignright {
|
||||
float: right;
|
||||
}
|
||||
.wp-block-post-comments .navigation::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
.wp-block-post-comments .commentlist {
|
||||
clear: both;
|
||||
list-style: none;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13019,6 +13019,11 @@ function Warning(_ref) {
|
|||
secondaryActions
|
||||
} = _ref;
|
||||
return (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
style: {
|
||||
display: 'contents',
|
||||
all: 'initial'
|
||||
}
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
className: classnames_default()(className, 'block-editor-warning')
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
className: "block-editor-warning__contents"
|
||||
|
@ -13041,7 +13046,7 @@ function Warning(_ref) {
|
|||
}, () => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, secondaryActions.map((item, pos) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
||||
onClick: item.onClick,
|
||||
key: pos
|
||||
}, item.title)))))));
|
||||
}, item.title))))))));
|
||||
}
|
||||
/**
|
||||
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -14555,28 +14555,6 @@ module.exports = window["moment"];
|
|||
|
||||
/* (ignored) */
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 7472:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var GetIntrinsic = __webpack_require__(4219);
|
||||
|
||||
var $Array = GetIntrinsic('%Array%');
|
||||
|
||||
// eslint-disable-next-line global-require
|
||||
var toStr = !$Array.isArray && __webpack_require__(9630)('Object.prototype.toString');
|
||||
|
||||
// https://ecma-international.org/ecma-262/6.0/#sec-isarray
|
||||
|
||||
module.exports = $Array.isArray || function IsArray(argument) {
|
||||
return toStr(argument) === '[object Array]';
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3665:
|
||||
|
@ -15056,18 +15034,8 @@ module.exports = function IsAccessorDescriptor(Desc) {
|
|||
"use strict";
|
||||
|
||||
|
||||
var GetIntrinsic = __webpack_require__(4219);
|
||||
|
||||
var $Array = GetIntrinsic('%Array%');
|
||||
|
||||
// eslint-disable-next-line global-require
|
||||
var toStr = !$Array.isArray && __webpack_require__(9630)('Object.prototype.toString');
|
||||
|
||||
// https://ecma-international.org/ecma-262/6.0/#sec-isarray
|
||||
|
||||
module.exports = $Array.isArray || function IsArray(argument) {
|
||||
return toStr(argument) === '[object Array]';
|
||||
};
|
||||
module.exports = __webpack_require__(4351);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
@ -15772,7 +15740,7 @@ var $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.definePr
|
|||
var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();
|
||||
|
||||
// eslint-disable-next-line global-require
|
||||
var isArray = hasArrayLengthDefineBug && __webpack_require__(7472); // this does not depend on any other AOs.
|
||||
var isArray = hasArrayLengthDefineBug && __webpack_require__(4351);
|
||||
|
||||
var callBound = __webpack_require__(9630);
|
||||
|
||||
|
@ -15818,6 +15786,26 @@ module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPro
|
|||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4351:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var GetIntrinsic = __webpack_require__(4219);
|
||||
|
||||
var $Array = GetIntrinsic('%Array%');
|
||||
|
||||
// eslint-disable-next-line global-require
|
||||
var toStr = !$Array.isArray && __webpack_require__(9630)('Object.prototype.toString');
|
||||
|
||||
module.exports = $Array.isArray || function IsArray(argument) {
|
||||
return toStr(argument) === '[object Array]';
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5114:
|
||||
|
@ -38024,10 +38012,10 @@ function computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {
|
|||
|
||||
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@use-gesture/core/dist/actions-8e12537b.esm.js
|
||||
;// CONCATENATED MODULE: ./node_modules/@use-gesture/core/dist/actions-e2a59bb9.esm.js
|
||||
|
||||
|
||||
function actions_8e12537b_esm_defineProperty(obj, key, value) {
|
||||
function actions_e2a59bb9_esm_defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
|
@ -38042,7 +38030,7 @@ function actions_8e12537b_esm_defineProperty(obj, key, value) {
|
|||
return obj;
|
||||
}
|
||||
|
||||
function actions_8e12537b_esm_ownKeys(object, enumerableOnly) {
|
||||
function actions_e2a59bb9_esm_ownKeys(object, enumerableOnly) {
|
||||
var keys = Object.keys(object);
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
|
@ -38055,12 +38043,12 @@ function actions_8e12537b_esm_ownKeys(object, enumerableOnly) {
|
|||
return keys;
|
||||
}
|
||||
|
||||
function actions_8e12537b_esm_objectSpread2(target) {
|
||||
function actions_e2a59bb9_esm_objectSpread2(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = null != arguments[i] ? arguments[i] : {};
|
||||
i % 2 ? actions_8e12537b_esm_ownKeys(Object(source), !0).forEach(function (key) {
|
||||
actions_8e12537b_esm_defineProperty(target, key, source[key]);
|
||||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : actions_8e12537b_esm_ownKeys(Object(source)).forEach(function (key) {
|
||||
i % 2 ? actions_e2a59bb9_esm_ownKeys(Object(source), !0).forEach(function (key) {
|
||||
actions_e2a59bb9_esm_defineProperty(target, key, source[key]);
|
||||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : actions_e2a59bb9_esm_ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
@ -38096,10 +38084,16 @@ function capitalize(string) {
|
|||
return string[0].toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
const actionsWithoutCaptureSupported = ['enter', 'leave'];
|
||||
|
||||
function hasCapture(capture = false, actionKey) {
|
||||
return capture && !actionsWithoutCaptureSupported.includes(actionKey);
|
||||
}
|
||||
|
||||
function toHandlerProp(device, action = '', capture = false) {
|
||||
const deviceProps = EVENT_TYPE_MAP[device];
|
||||
const actionKey = deviceProps ? deviceProps[action] || action : action;
|
||||
return 'on' + capitalize(device) + capitalize(actionKey) + (capture ? 'Capture' : '');
|
||||
return 'on' + capitalize(device) + capitalize(actionKey) + (hasCapture(capture, actionKey) ? 'Capture' : '');
|
||||
}
|
||||
const pointerCaptureEvents = ['gotpointercapture', 'lostpointercapture'];
|
||||
function parseProp(prop) {
|
||||
|
@ -38463,7 +38457,7 @@ class Engine {
|
|||
const config = this.config;
|
||||
if (!state._active) this.clean();
|
||||
if ((state._blocked || !state.intentional) && !state._force && !config.triggerAllEvents) return;
|
||||
const memo = this.handler(actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, shared), state), {}, {
|
||||
const memo = this.handler(actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, shared), state), {}, {
|
||||
[this.aliasKey]: state.values
|
||||
}));
|
||||
if (memo !== undefined) state.memo = memo;
|
||||
|
@ -38495,7 +38489,7 @@ class CoordinatesEngine extends Engine {
|
|||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "aliasKey", 'xy');
|
||||
actions_e2a59bb9_esm_defineProperty(this, "aliasKey", 'xy');
|
||||
}
|
||||
|
||||
reset() {
|
||||
|
@ -38551,6 +38545,10 @@ const commonConfigResolver = {
|
|||
return value;
|
||||
},
|
||||
|
||||
eventOptions(value, _k, config) {
|
||||
return actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, config.shared.eventOptions), value);
|
||||
},
|
||||
|
||||
preventDefault(value = false) {
|
||||
return value;
|
||||
},
|
||||
|
@ -38595,7 +38593,7 @@ const commonConfigResolver = {
|
|||
if (false) {}
|
||||
|
||||
const DEFAULT_AXIS_THRESHOLD = 0;
|
||||
const coordinatesConfigResolver = actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, commonConfigResolver), {}, {
|
||||
const coordinatesConfigResolver = actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, commonConfigResolver), {}, {
|
||||
axis(_v, _k, {
|
||||
axis
|
||||
}) {
|
||||
|
@ -38642,7 +38640,7 @@ class DragEngine extends CoordinatesEngine {
|
|||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "ingKey", 'dragging');
|
||||
actions_e2a59bb9_esm_defineProperty(this, "ingKey", 'dragging');
|
||||
}
|
||||
|
||||
reset() {
|
||||
|
@ -38702,13 +38700,13 @@ class DragEngine extends CoordinatesEngine {
|
|||
const config = this.config;
|
||||
const state = this.state;
|
||||
if (event.buttons != null && (Array.isArray(config.pointerButtons) ? !config.pointerButtons.includes(event.buttons) : config.pointerButtons !== -1 && config.pointerButtons !== event.buttons)) return;
|
||||
this.ctrl.setEventIds(event);
|
||||
const ctrlIds = this.ctrl.setEventIds(event);
|
||||
|
||||
if (config.pointerCapture) {
|
||||
event.target.setPointerCapture(event.pointerId);
|
||||
}
|
||||
|
||||
if (state._pointerActive) return;
|
||||
if (ctrlIds && ctrlIds.size > 1 && state._pointerActive) return;
|
||||
this.start(event);
|
||||
this.setupPointer(event);
|
||||
state._pointerId = pointerId(event);
|
||||
|
@ -38866,11 +38864,11 @@ class DragEngine extends CoordinatesEngine {
|
|||
|
||||
setupScrollPrevention(event) {
|
||||
persistEvent(event);
|
||||
this.eventStore.add(this.sharedConfig.window, 'touch', 'change', this.preventScroll.bind(this), {
|
||||
const remove = this.eventStore.add(this.sharedConfig.window, 'touch', 'change', this.preventScroll.bind(this), {
|
||||
passive: false
|
||||
});
|
||||
this.eventStore.add(this.sharedConfig.window, 'touch', 'end', this.clean.bind(this));
|
||||
this.eventStore.add(this.sharedConfig.window, 'touch', 'cancel', this.clean.bind(this));
|
||||
this.eventStore.add(this.sharedConfig.window, 'touch', 'end', remove);
|
||||
this.eventStore.add(this.sharedConfig.window, 'touch', 'cancel', remove);
|
||||
this.timeoutStore.add('startPointerDrag', this.startPointerDrag.bind(this), this.config.preventScrollDelay, event);
|
||||
}
|
||||
|
||||
|
@ -38888,8 +38886,8 @@ class DragEngine extends CoordinatesEngine {
|
|||
if (deltaFn) {
|
||||
const state = this.state;
|
||||
const factor = event.shiftKey ? 10 : event.altKey ? 0.1 : 1;
|
||||
state._delta = deltaFn(factor);
|
||||
this.start(event);
|
||||
state._delta = deltaFn(factor);
|
||||
state._keyboardActive = true;
|
||||
V.addTo(state._movement, state._delta);
|
||||
this.compute(event);
|
||||
|
@ -38933,22 +38931,22 @@ function persistEvent(event) {
|
|||
'persist' in event && typeof event.persist === 'function' && event.persist();
|
||||
}
|
||||
|
||||
const actions_8e12537b_esm_isBrowser = typeof window !== 'undefined' && window.document && window.document.createElement;
|
||||
const actions_e2a59bb9_esm_isBrowser = typeof window !== 'undefined' && window.document && window.document.createElement;
|
||||
|
||||
function actions_8e12537b_esm_supportsTouchEvents() {
|
||||
return actions_8e12537b_esm_isBrowser && 'ontouchstart' in window;
|
||||
function actions_e2a59bb9_esm_supportsTouchEvents() {
|
||||
return actions_e2a59bb9_esm_isBrowser && 'ontouchstart' in window;
|
||||
}
|
||||
|
||||
function isTouchScreen() {
|
||||
return actions_8e12537b_esm_supportsTouchEvents() || actions_8e12537b_esm_isBrowser && window.navigator.maxTouchPoints > 1;
|
||||
return actions_e2a59bb9_esm_supportsTouchEvents() || actions_e2a59bb9_esm_isBrowser && window.navigator.maxTouchPoints > 1;
|
||||
}
|
||||
|
||||
function actions_8e12537b_esm_supportsPointerEvents() {
|
||||
return actions_8e12537b_esm_isBrowser && 'onpointerdown' in window;
|
||||
function actions_e2a59bb9_esm_supportsPointerEvents() {
|
||||
return actions_e2a59bb9_esm_isBrowser && 'onpointerdown' in window;
|
||||
}
|
||||
|
||||
function supportsPointerLock() {
|
||||
return actions_8e12537b_esm_isBrowser && 'exitPointerLock' in window.document;
|
||||
return actions_e2a59bb9_esm_isBrowser && 'exitPointerLock' in window.document;
|
||||
}
|
||||
|
||||
function supportsGestureEvents() {
|
||||
|
@ -38960,11 +38958,11 @@ function supportsGestureEvents() {
|
|||
}
|
||||
|
||||
const SUPPORT = {
|
||||
isBrowser: actions_8e12537b_esm_isBrowser,
|
||||
isBrowser: actions_e2a59bb9_esm_isBrowser,
|
||||
gesture: supportsGestureEvents(),
|
||||
touch: isTouchScreen(),
|
||||
touchscreen: isTouchScreen(),
|
||||
pointer: actions_8e12537b_esm_supportsPointerEvents(),
|
||||
pointer: actions_e2a59bb9_esm_supportsPointerEvents(),
|
||||
pointerLock: supportsPointerLock()
|
||||
};
|
||||
|
||||
|
@ -38978,7 +38976,7 @@ const DEFAULT_DRAG_AXIS_THRESHOLD = {
|
|||
touch: 0,
|
||||
pen: 8
|
||||
};
|
||||
const dragConfigResolver = actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, coordinatesConfigResolver), {}, {
|
||||
const dragConfigResolver = actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, coordinatesConfigResolver), {}, {
|
||||
device(_v, _k, {
|
||||
pointer: {
|
||||
touch = false,
|
||||
|
@ -39050,7 +39048,7 @@ const dragConfigResolver = actions_8e12537b_esm_objectSpread2(actions_8e12537b_e
|
|||
|
||||
axisThreshold(value) {
|
||||
if (!value) return DEFAULT_DRAG_AXIS_THRESHOLD;
|
||||
return actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value);
|
||||
return actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -39063,9 +39061,9 @@ class PinchEngine extends Engine {
|
|||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "ingKey", 'pinching');
|
||||
actions_e2a59bb9_esm_defineProperty(this, "ingKey", 'pinching');
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "aliasKey", 'da');
|
||||
actions_e2a59bb9_esm_defineProperty(this, "aliasKey", 'da');
|
||||
}
|
||||
|
||||
init() {
|
||||
|
@ -39329,7 +39327,7 @@ class PinchEngine extends Engine {
|
|||
|
||||
}
|
||||
|
||||
const pinchConfigResolver = actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, commonConfigResolver), {}, {
|
||||
const pinchConfigResolver = actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, commonConfigResolver), {}, {
|
||||
device(_v, _k, {
|
||||
shared,
|
||||
pointer: {
|
||||
|
@ -39387,7 +39385,7 @@ class MoveEngine extends CoordinatesEngine {
|
|||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "ingKey", 'moving');
|
||||
actions_e2a59bb9_esm_defineProperty(this, "ingKey", 'moving');
|
||||
}
|
||||
|
||||
move(event) {
|
||||
|
@ -39429,7 +39427,7 @@ class MoveEngine extends CoordinatesEngine {
|
|||
|
||||
}
|
||||
|
||||
const moveConfigResolver = actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, coordinatesConfigResolver), {}, {
|
||||
const moveConfigResolver = actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, coordinatesConfigResolver), {}, {
|
||||
mouseOnly: (value = true) => value
|
||||
});
|
||||
|
||||
|
@ -39437,7 +39435,7 @@ class ScrollEngine extends CoordinatesEngine {
|
|||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "ingKey", 'scrolling');
|
||||
actions_e2a59bb9_esm_defineProperty(this, "ingKey", 'scrolling');
|
||||
}
|
||||
|
||||
scroll(event) {
|
||||
|
@ -39476,7 +39474,7 @@ class WheelEngine extends CoordinatesEngine {
|
|||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "ingKey", 'wheeling');
|
||||
actions_e2a59bb9_esm_defineProperty(this, "ingKey", 'wheeling');
|
||||
}
|
||||
|
||||
wheel(event) {
|
||||
|
@ -39524,7 +39522,7 @@ class HoverEngine extends CoordinatesEngine {
|
|||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "ingKey", 'hovering');
|
||||
actions_e2a59bb9_esm_defineProperty(this, "ingKey", 'hovering');
|
||||
}
|
||||
|
||||
enter(event) {
|
||||
|
@ -39555,42 +39553,42 @@ class HoverEngine extends CoordinatesEngine {
|
|||
|
||||
}
|
||||
|
||||
const hoverConfigResolver = actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, coordinatesConfigResolver), {}, {
|
||||
const hoverConfigResolver = actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, coordinatesConfigResolver), {}, {
|
||||
mouseOnly: (value = true) => value
|
||||
});
|
||||
|
||||
const actions_8e12537b_esm_EngineMap = new Map();
|
||||
const actions_e2a59bb9_esm_EngineMap = new Map();
|
||||
const ConfigResolverMap = new Map();
|
||||
function actions_8e12537b_esm_registerAction(action) {
|
||||
actions_8e12537b_esm_EngineMap.set(action.key, action.engine);
|
||||
function actions_e2a59bb9_esm_registerAction(action) {
|
||||
actions_e2a59bb9_esm_EngineMap.set(action.key, action.engine);
|
||||
ConfigResolverMap.set(action.key, action.resolver);
|
||||
}
|
||||
const actions_8e12537b_esm_dragAction = {
|
||||
const actions_e2a59bb9_esm_dragAction = {
|
||||
key: 'drag',
|
||||
engine: DragEngine,
|
||||
resolver: dragConfigResolver
|
||||
};
|
||||
const actions_8e12537b_esm_hoverAction = {
|
||||
const actions_e2a59bb9_esm_hoverAction = {
|
||||
key: 'hover',
|
||||
engine: HoverEngine,
|
||||
resolver: hoverConfigResolver
|
||||
};
|
||||
const actions_8e12537b_esm_moveAction = {
|
||||
const actions_e2a59bb9_esm_moveAction = {
|
||||
key: 'move',
|
||||
engine: MoveEngine,
|
||||
resolver: moveConfigResolver
|
||||
};
|
||||
const actions_8e12537b_esm_pinchAction = {
|
||||
const actions_e2a59bb9_esm_pinchAction = {
|
||||
key: 'pinch',
|
||||
engine: PinchEngine,
|
||||
resolver: pinchConfigResolver
|
||||
};
|
||||
const actions_8e12537b_esm_scrollAction = {
|
||||
const actions_e2a59bb9_esm_scrollAction = {
|
||||
key: 'scroll',
|
||||
engine: ScrollEngine,
|
||||
resolver: scrollConfigResolver
|
||||
};
|
||||
const actions_8e12537b_esm_wheelAction = {
|
||||
const actions_e2a59bb9_esm_wheelAction = {
|
||||
key: 'wheel',
|
||||
engine: WheelEngine,
|
||||
resolver: wheelConfigResolver
|
||||
|
@ -39717,7 +39715,7 @@ function use_gesture_core_esm_parse(config, gestureKey) {
|
|||
|
||||
if (gestureKey) {
|
||||
const resolver = ConfigResolverMap.get(gestureKey);
|
||||
_config[gestureKey] = resolveWith(actions_8e12537b_esm_objectSpread2({
|
||||
_config[gestureKey] = resolveWith(actions_e2a59bb9_esm_objectSpread2({
|
||||
shared: _config.shared
|
||||
}, rest), resolver);
|
||||
} else {
|
||||
|
@ -39725,7 +39723,7 @@ function use_gesture_core_esm_parse(config, gestureKey) {
|
|||
const resolver = ConfigResolverMap.get(key);
|
||||
|
||||
if (resolver) {
|
||||
_config[key] = resolveWith(actions_8e12537b_esm_objectSpread2({
|
||||
_config[key] = resolveWith(actions_e2a59bb9_esm_objectSpread2({
|
||||
shared: _config.shared
|
||||
}, rest[key]), resolver);
|
||||
} else if (false) {}
|
||||
|
@ -39736,33 +39734,43 @@ function use_gesture_core_esm_parse(config, gestureKey) {
|
|||
}
|
||||
|
||||
class EventStore {
|
||||
constructor(ctrl) {
|
||||
actions_8e12537b_esm_defineProperty(this, "_listeners", []);
|
||||
constructor(ctrl, gestureKey) {
|
||||
actions_e2a59bb9_esm_defineProperty(this, "_listeners", new Set());
|
||||
|
||||
this._ctrl = ctrl;
|
||||
this._gestureKey = gestureKey;
|
||||
}
|
||||
|
||||
add(element, device, action, handler, options) {
|
||||
const listeners = this._listeners;
|
||||
const type = toDomEventType(device, action);
|
||||
|
||||
const eventOptions = actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, this._ctrl.config.shared.eventOptions), options);
|
||||
const _options = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {};
|
||||
|
||||
const eventOptions = actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, _options), options);
|
||||
|
||||
element.addEventListener(type, handler, eventOptions);
|
||||
|
||||
this._listeners.push(() => element.removeEventListener(type, handler, eventOptions));
|
||||
const remove = () => {
|
||||
element.removeEventListener(type, handler, eventOptions);
|
||||
listeners.delete(remove);
|
||||
};
|
||||
|
||||
listeners.add(remove);
|
||||
return remove;
|
||||
}
|
||||
|
||||
clean() {
|
||||
this._listeners.forEach(remove => remove());
|
||||
|
||||
this._listeners = [];
|
||||
this._listeners.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TimeoutStore {
|
||||
constructor() {
|
||||
actions_8e12537b_esm_defineProperty(this, "_timeouts", new Map());
|
||||
actions_e2a59bb9_esm_defineProperty(this, "_timeouts", new Map());
|
||||
}
|
||||
|
||||
add(key, callback, ms = 140, ...args) {
|
||||
|
@ -39787,23 +39795,23 @@ class TimeoutStore {
|
|||
|
||||
class Controller {
|
||||
constructor(handlers) {
|
||||
actions_8e12537b_esm_defineProperty(this, "gestures", new Set());
|
||||
actions_e2a59bb9_esm_defineProperty(this, "gestures", new Set());
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "_targetEventStore", new EventStore(this));
|
||||
actions_e2a59bb9_esm_defineProperty(this, "_targetEventStore", new EventStore(this));
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "gestureEventStores", {});
|
||||
actions_e2a59bb9_esm_defineProperty(this, "gestureEventStores", {});
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "gestureTimeoutStores", {});
|
||||
actions_e2a59bb9_esm_defineProperty(this, "gestureTimeoutStores", {});
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "handlers", {});
|
||||
actions_e2a59bb9_esm_defineProperty(this, "handlers", {});
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "config", {});
|
||||
actions_e2a59bb9_esm_defineProperty(this, "config", {});
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "pointerIds", new Set());
|
||||
actions_e2a59bb9_esm_defineProperty(this, "pointerIds", new Set());
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "touchIds", new Set());
|
||||
actions_e2a59bb9_esm_defineProperty(this, "touchIds", new Set());
|
||||
|
||||
actions_8e12537b_esm_defineProperty(this, "state", {
|
||||
actions_e2a59bb9_esm_defineProperty(this, "state", {
|
||||
shared: {
|
||||
shiftKey: false,
|
||||
metaKey: false,
|
||||
|
@ -39818,8 +39826,10 @@ class Controller {
|
|||
setEventIds(event) {
|
||||
if (isTouch(event)) {
|
||||
this.touchIds = new Set(touchIds(event));
|
||||
return this.touchIds;
|
||||
} else if ('pointerId' in event) {
|
||||
if (event.type === 'pointerup' || event.type === 'pointercancel') this.pointerIds.delete(event.pointerId);else if (event.type === 'pointerdown') this.pointerIds.add(event.pointerId);
|
||||
return this.pointerIds;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39848,7 +39858,6 @@ class Controller {
|
|||
|
||||
bind(...args) {
|
||||
const sharedConfig = this.config.shared;
|
||||
const eventOptions = sharedConfig.eventOptions;
|
||||
const props = {};
|
||||
let target;
|
||||
|
||||
|
@ -39857,18 +39866,21 @@ class Controller {
|
|||
if (!target) return;
|
||||
}
|
||||
|
||||
const bindFunction = bindToProps(props, eventOptions, !!target);
|
||||
|
||||
if (sharedConfig.enabled) {
|
||||
for (const gestureKey of this.gestures) {
|
||||
if (this.config[gestureKey].enabled) {
|
||||
const Engine = actions_8e12537b_esm_EngineMap.get(gestureKey);
|
||||
const gestureConfig = this.config[gestureKey];
|
||||
const bindFunction = bindToProps(props, gestureConfig.eventOptions, !!target);
|
||||
|
||||
if (gestureConfig.enabled) {
|
||||
const Engine = actions_e2a59bb9_esm_EngineMap.get(gestureKey);
|
||||
new Engine(this, args, gestureKey).bind(bindFunction);
|
||||
}
|
||||
}
|
||||
|
||||
const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target);
|
||||
|
||||
for (const eventKey in this.nativeHandlers) {
|
||||
bindFunction(eventKey, '', event => this.nativeHandlers[eventKey](actions_8e12537b_esm_objectSpread2(actions_8e12537b_esm_objectSpread2({}, this.state.shared), {}, {
|
||||
nativeBindFunction(eventKey, '', event => this.nativeHandlers[eventKey](actions_e2a59bb9_esm_objectSpread2(actions_e2a59bb9_esm_objectSpread2({}, this.state.shared), {}, {
|
||||
event,
|
||||
args
|
||||
})), undefined, true);
|
||||
|
@ -39899,7 +39911,7 @@ class Controller {
|
|||
|
||||
function setupGesture(ctrl, gestureKey) {
|
||||
ctrl.gestures.add(gestureKey);
|
||||
ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl);
|
||||
ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl, gestureKey);
|
||||
ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore();
|
||||
}
|
||||
|
||||
|
@ -40009,7 +40021,7 @@ function useRecognizers(handlers, config = {}, gestureKey, nativeHandlers) {
|
|||
}
|
||||
|
||||
function use_gesture_react_esm_useDrag(handler, config) {
|
||||
actions_8e12537b_esm_registerAction(actions_8e12537b_esm_dragAction);
|
||||
actions_e2a59bb9_esm_registerAction(actions_e2a59bb9_esm_dragAction);
|
||||
return useRecognizers({
|
||||
drag: handler
|
||||
}, config || {}, 'drag');
|
||||
|
@ -40044,7 +40056,7 @@ function useMove(handler, config) {
|
|||
}
|
||||
|
||||
function useHover(handler, config) {
|
||||
actions_8e12537b_esm_registerAction(actions_8e12537b_esm_hoverAction);
|
||||
actions_e2a59bb9_esm_registerAction(actions_e2a59bb9_esm_hoverAction);
|
||||
return useRecognizers({
|
||||
hover: handler
|
||||
}, config || {}, 'hover');
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11033,6 +11033,7 @@ function ResizableEditor(_ref) {
|
|||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
@ -11065,46 +11066,49 @@ const LAYOUT = {
|
|||
alignments: []
|
||||
};
|
||||
function BlockEditor(_ref) {
|
||||
var _storedSettings$__exp, _storedSettings$__exp2;
|
||||
|
||||
let {
|
||||
setIsInserterOpen
|
||||
} = _ref;
|
||||
const {
|
||||
settings
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
let storedSettings = select(store_store).getSettings(setIsInserterOpen);
|
||||
|
||||
if (!storedSettings.__experimentalBlockPatterns) {
|
||||
storedSettings = { ...storedSettings,
|
||||
__experimentalBlockPatterns: select(external_wp_coreData_namespaceObject.store).getBlockPatterns()
|
||||
};
|
||||
}
|
||||
|
||||
if (!storedSettings.__experimentalBlockPatternCategories) {
|
||||
storedSettings = { ...storedSettings,
|
||||
__experimentalBlockPatternCategories: select(external_wp_coreData_namespaceObject.store).getBlockPatternCategories()
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
settings: storedSettings
|
||||
};
|
||||
}, [setIsInserterOpen]);
|
||||
const {
|
||||
storedSettings,
|
||||
templateType,
|
||||
templateId,
|
||||
page
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getSettings,
|
||||
getEditedPostType,
|
||||
getEditedPostId,
|
||||
getPage
|
||||
} = select(store_store);
|
||||
return {
|
||||
storedSettings: getSettings(setIsInserterOpen),
|
||||
templateType: getEditedPostType(),
|
||||
templateId: getEditedPostId(),
|
||||
page: getPage()
|
||||
};
|
||||
}, [setIsInserterOpen]);
|
||||
const settingsBlockPatterns = (_storedSettings$__exp = storedSettings.__experimentalAdditionalBlockPatterns) !== null && _storedSettings$__exp !== void 0 ? _storedSettings$__exp : // WP 6.0
|
||||
storedSettings.__experimentalBlockPatterns; // WP 5.9
|
||||
|
||||
const settingsBlockPatternCategories = (_storedSettings$__exp2 = storedSettings.__experimentalAdditionalBlockPatternCategories) !== null && _storedSettings$__exp2 !== void 0 ? _storedSettings$__exp2 : // WP 6.0
|
||||
storedSettings.__experimentalBlockPatternCategories; // WP 5.9
|
||||
|
||||
const {
|
||||
restBlockPatterns,
|
||||
restBlockPatternCategories
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
|
||||
restBlockPatterns: select(external_wp_coreData_namespaceObject.store).getBlockPatterns(),
|
||||
restBlockPatternCategories: select(external_wp_coreData_namespaceObject.store).getBlockPatternCategories()
|
||||
}), []);
|
||||
const blockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_lodash_namespaceObject.unionBy)(settingsBlockPatterns, restBlockPatterns, 'name'), [settingsBlockPatterns, restBlockPatterns]);
|
||||
const blockPatternCategories = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_lodash_namespaceObject.unionBy)(settingsBlockPatternCategories, restBlockPatternCategories, 'name'), [settingsBlockPatternCategories, restBlockPatternCategories]);
|
||||
const settings = (0,external_wp_element_namespaceObject.useMemo)(() => ({ ...(0,external_lodash_namespaceObject.omit)(storedSettings, ['__experimentalAdditionalBlockPatterns', '__experimentalAdditionalBlockPatternCategories']),
|
||||
__experimentalBlockPatterns: blockPatterns,
|
||||
__experimentalBlockPatternCategories: blockPatternCategories
|
||||
}), [storedSettings, blockPatterns, blockPatternCategories]);
|
||||
const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', templateType);
|
||||
const {
|
||||
setPage
|
||||
|
@ -11122,6 +11126,7 @@ function BlockEditor(_ref) {
|
|||
clearSelectedBlock
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
|
||||
const isTemplatePart = templateType === 'wp_template_part';
|
||||
const hasBlocks = blocks.length !== 0;
|
||||
|
||||
const NavMenuSidebarToggle = () => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
|
||||
className: "components-toolbar__control",
|
||||
|
@ -11167,7 +11172,7 @@ function BlockEditor(_ref) {
|
|||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockList, {
|
||||
className: "edit-site-block-editor__block-list wp-site-blocks",
|
||||
__experimentalLayout: LAYOUT,
|
||||
renderAppender: isTemplatePart ? false : undefined
|
||||
renderAppender: isTemplatePart && hasBlocks ? false : undefined
|
||||
})), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, null, _ref2 => {
|
||||
let {
|
||||
onClose
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8826,7 +8826,7 @@ function FlatTermSelector(_ref) {
|
|||
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
if (hasResolvedTerms) {
|
||||
const newValues = terms.map(term => unescapeString(term.name));
|
||||
const newValues = (terms !== null && terms !== void 0 ? terms : []).map(term => unescapeString(term.name));
|
||||
setValues(newValues);
|
||||
}
|
||||
}, [terms, hasResolvedTerms]);
|
||||
|
@ -8848,7 +8848,7 @@ function FlatTermSelector(_ref) {
|
|||
}
|
||||
|
||||
function onChange(termNames) {
|
||||
const availableTerms = [...terms, ...(searchResults !== null && searchResults !== void 0 ? searchResults : [])];
|
||||
const availableTerms = [...(terms !== null && terms !== void 0 ? terms : []), ...(searchResults !== null && searchResults !== void 0 ? searchResults : [])];
|
||||
const uniqueTerms = (0,external_lodash_namespaceObject.uniqBy)(termNames, term => term.toLowerCase());
|
||||
const newTermNames = uniqueTerms.filter(termName => !(0,external_lodash_namespaceObject.find)(availableTerms, term => isSameTermName(term.name, termName))); // Optimistically update term values.
|
||||
// The selector will always re-fetch terms later.
|
||||
|
@ -11462,6 +11462,8 @@ function mediaUpload(_ref) {
|
|||
*/
|
||||
|
||||
function useBlockEditorSettings(settings, hasTemplate) {
|
||||
var _settings$__experimen, _settings$__experimen2;
|
||||
|
||||
const {
|
||||
reusableBlocks,
|
||||
hasUploadPermissions,
|
||||
|
@ -11489,17 +11491,21 @@ function useBlockEditorSettings(settings, hasTemplate) {
|
|||
pageOnFront: siteSettings === null || siteSettings === void 0 ? void 0 : siteSettings.page_on_front
|
||||
};
|
||||
}, []);
|
||||
const settingsBlockPatterns = (_settings$__experimen = settings.__experimentalAdditionalBlockPatterns) !== null && _settings$__experimen !== void 0 ? _settings$__experimen : // WP 6.0
|
||||
settings.__experimentalBlockPatterns; // WP 5.9
|
||||
|
||||
const settingsBlockPatternCategories = (_settings$__experimen2 = settings.__experimentalAdditionalBlockPatternCategories) !== null && _settings$__experimen2 !== void 0 ? _settings$__experimen2 : // WP 6.0
|
||||
settings.__experimentalBlockPatternCategories; // WP 5.9
|
||||
|
||||
const {
|
||||
__experimentalBlockPatterns: settingsBlockPatterns,
|
||||
__experimentalBlockPatternCategories: settingsBlockPatternCategories
|
||||
} = settings;
|
||||
const {
|
||||
blockPatterns,
|
||||
blockPatternCategories
|
||||
restBlockPatterns,
|
||||
restBlockPatternCategories
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
|
||||
blockPatterns: settingsBlockPatterns !== null && settingsBlockPatterns !== void 0 ? settingsBlockPatterns : select(external_wp_coreData_namespaceObject.store).getBlockPatterns(),
|
||||
blockPatternCategories: settingsBlockPatternCategories !== null && settingsBlockPatternCategories !== void 0 ? settingsBlockPatternCategories : select(external_wp_coreData_namespaceObject.store).getBlockPatternCategories()
|
||||
}), [settingsBlockPatterns, settingsBlockPatternCategories]);
|
||||
restBlockPatterns: select(external_wp_coreData_namespaceObject.store).getBlockPatterns(),
|
||||
restBlockPatternCategories: select(external_wp_coreData_namespaceObject.store).getBlockPatternCategories()
|
||||
}), []);
|
||||
const blockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_lodash_namespaceObject.unionBy)(settingsBlockPatterns, restBlockPatterns, 'name'), [settingsBlockPatterns, restBlockPatterns]);
|
||||
const blockPatternCategories = (0,external_wp_element_namespaceObject.useMemo)(() => (0,external_lodash_namespaceObject.unionBy)(settingsBlockPatternCategories, restBlockPatternCategories, 'name'), [settingsBlockPatternCategories, restBlockPatternCategories]);
|
||||
const {
|
||||
undo
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -82,7 +82,7 @@ class WP_REST_Edit_Site_Export_Controller extends WP_REST_Controller {
|
|||
return $filename;
|
||||
}
|
||||
|
||||
$theme_name = wp_get_theme()->get( 'TextDomain' );
|
||||
$theme_name = basename( get_stylesheet() );
|
||||
header( 'Content-Type: application/zip' );
|
||||
header( 'Content-Disposition: attachment; filename=' . $theme_name . '.zip' );
|
||||
header( 'Content-Length: ' . filesize( $filename ) );
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-RC2-53389';
|
||||
$wp_version = '6.0-RC2-53405';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue