Editor: Update @wordpress packages for 6.2 Beta 2.

Updates the `@wordpress` packages to include the following changes:

- Add missing period in keyboard shortcut descriptions
- Site Editor: Append template type and name to the site editor page title
- Specify active color state for template navigation button
- Global Styles: Move more link about custom CSS to part of description
- ToolsPanel: Display optional items when values are updated externally
- File block: Re-add editor styles for classic themes
- Enable undo after creating a new menu
- Style Book: Exclude blocks that are not allowed to insert
- Add basic tsconfig.json validation
- Fix Experiments native variant breakage
- Update moment and moment-timezone packages to fix timezone issues
- NavigatorButton: Reuse Button types
- ToolsPanel: Ensure display of optional items when panel id is null
- ColorPalette: Ensure text label contrast checking works with CSS variables
- Components: Add support for named arguments in the navigator components
- Rename experiments package to private-apis
- Cherry-pick CLI: Fix the default label to match the documentation
- Handle block metadata attribute and related experimental APIs
- Fix: Remove browser default border for iframe in the editor
- [Layout]: Fix align controls for hybrid themes
- Visual Regression tests: use default playwright utils
- SelectControl: Fix multiple prop styling
- Fix clicking on the toggle button not closing the block inserter
- Update deps for the useEffect that creates navigation menus
- Minor updates in Private APIs docs
- Site Editor: Fix custom Template Parts rename action
- [Block Library - Cover]: Ensure url is not malformed due to sanitization through wp_kses
- Revert "Prevent the image from being resized larger than its container"
- Lodash: Remove from @wordpress/keycodes package
- Distraction free mode: Fix keyboard shortcut not working
- Popover: lock the __experimentalPopoverPositionToPlacement function
- Rename the "experiments" export to "privateApis"
- Add an aria label to the site save dialog
- Navigator: add more pattern matching tests, refine existing tests
- Add parent navigation support for the navigator component
- Add back link to Design heading in site editor navigation to return to Dashboard
- Add a nested level when selecting templates or template parts
- Move site editor 6.2 specific code to the right file
- Fix site editor navigation

References:
* [1bf01c01a8 Gutenberg's commit for publishing the packages]

Follow-up to [55257].

Props ntsekouras.
See #57471.
Built from https://develop.svn.wordpress.org/trunk@55333


git-svn-id: http://core.svn.wordpress.org/trunk@54866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
hellofromTonya 2023-02-14 15:44:36 +00:00
parent b23607d537
commit 8588041fd2
41 changed files with 17651 additions and 16648 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,4 +6,9 @@
font-size:1.125em;
padding:calc(.667em + 2px) calc(1.333em + 2px);
text-decoration:none;
}
.wp-block-file__button{
background:#32373c;
color:#fff;
}

View File

@ -1 +1 @@
.wp-block-button__link{background-color:#32373c;border-radius:9999px;box-shadow:none;color:#fff;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}
.wp-block-button__link{background-color:#32373c;border-radius:9999px;box-shadow:none;color:#fff;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-file__button{background:#32373c;color:#fff}

View File

@ -6,4 +6,9 @@
font-size:1.125em;
padding:calc(.667em + 2px) calc(1.333em + 2px);
text-decoration:none;
}
.wp-block-file__button{
background:#32373c;
color:#fff;
}

View File

@ -1 +1 @@
.wp-block-button__link{background-color:#32373c;border-radius:9999px;box-shadow:none;color:#fff;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}
.wp-block-button__link{background-color:#32373c;border-radius:9999px;box-shadow:none;color:#fff;font-size:1.125em;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-file__button{background:#32373c;color:#fff}

View File

@ -2647,4 +2647,7 @@ div[data-type="core/post-featured-image"] img{
.editor-styles-wrapper .has-huge-font-size{
font-size:var(--wp--preset--font-size--huge);
}
.editor-styles-wrapper iframe:not([frameborder]){
border:0;
}

File diff suppressed because one or more lines are too long

View File

@ -2643,4 +2643,7 @@ div[data-type="core/post-featured-image"] img{
.editor-styles-wrapper .has-huge-font-size{
font-size:var(--wp--preset--font-size--huge);
}
.editor-styles-wrapper iframe:not([frameborder]){
border:0;
}

File diff suppressed because one or more lines are too long

View File

@ -2598,18 +2598,7 @@ body.lockscroll,html.lockscroll{
.components-select-control__input{
-webkit-tap-highlight-color:rgba(0, 0, 0, 0) !important;
background:#fff;
height:36px;
line-height:36px;
margin:1px;
outline:0;
width:100%;
}
@media (min-width:782px){
.components-select-control__input{
height:28px;
line-height:28px;
}
}
@media (max-width:782px){

File diff suppressed because one or more lines are too long

View File

@ -2598,18 +2598,7 @@ body.lockscroll,html.lockscroll{
.components-select-control__input{
-webkit-tap-highlight-color:rgba(0, 0, 0, 0) !important;
background:#fff;
height:36px;
line-height:36px;
margin:1px;
outline:0;
width:100%;
}
@media (min-width:782px){
.components-select-control__input{
height:28px;
line-height:28px;
}
}
@media (max-width:782px){

File diff suppressed because one or more lines are too long

View File

@ -982,7 +982,8 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
}
.edit-site-global-styles-screen-css-help-link{
padding-right:16px;
display:block;
margin-top:8px;
}
.edit-site-global-styles-screen-variations{
@ -1979,31 +1980,12 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
}
.edit-site-layout__hub{
background:#000;
border-radius:8px;
box-shadow:0 .7px 1px rgba(0,0,0,.15),0 2.7px 3.8px -.2px rgba(0,0,0,.15),0 5.5px 7.8px -.3px rgba(0,0,0,.15),-.1px 11.5px 16.4px -.5px rgba(0,0,0,.15);
height:68px;
padding:16px 0 16px 16px;
position:fixed;
right:24px;
top:24px;
width:calc(100vw - 48px);
z-index:3;
}
.edit-site-layout.is-full-canvas .edit-site-layout__hub{
border-radius:0;
box-shadow:none;
height:60px;
padding:0 0 0 16px;
position:fixed;
right:0;
top:0;
width:100vw;
}
@media (min-width:782px){
.edit-site-layout.is-full-canvas .edit-site-layout__hub{
padding-left:0;
width:auto;
}
width:calc(100vw - 48px);
z-index:3;
}
.edit-site-layout.is-full-canvas.is-edit-mode .edit-site-layout__hub{
padding-left:0;
@ -2014,6 +1996,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
width:312px;
}
}
.edit-site-layout.is-full-canvas .edit-site-layout__hub{
border-radius:0;
box-shadow:none;
padding-left:16px;
width:100vw;
}
@media (min-width:782px){
.edit-site-layout.is-full-canvas .edit-site-layout__hub{
padding-left:0;
width:auto;
}
}
.edit-site-layout__header{
display:flex;
@ -2259,6 +2253,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
}
.edit-site-sidebar-navigation-screen__content{
color:#949494;
margin:0 36px 16px 16px;
}
@ -2268,7 +2263,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
margin-bottom:8px;
padding-bottom:8px;
padding-left:16px;
padding-top:164px;
padding-top:108px;
position:sticky;
top:0;
}
@ -2284,14 +2279,10 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
.edit-site-sidebar-navigation-screen__back{
color:#e0e0e0;
}
.edit-site-sidebar-navigation-screen__back:hover{
.edit-site-sidebar-navigation-screen__back:hover,.edit-site-sidebar-navigation-screen__back:not([aria-disabled=true]):active{
color:#fff;
}
.edit-site-sidebar-navigation-screen__icon-placeholder{
width:36px;
}
.edit-site-sidebar-navigation-screen-templates__see-all{
margin-top:16px !important;
}
@ -2307,25 +2298,17 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
justify-content:space-between;
}
.edit-site-site-hub__edit-button{
color:#fff;
height:32px;
}
.edit-site-site-hub__post-type{
opacity:.6;
}
.edit-site-site-hub__view-mode-toggle-container{
background:#1e1e1e;
flex-shrink:0;
height:60px;
width:64px;
}
.edit-site-layout.is-edit-mode .edit-site-site-hub__view-mode-toggle-container{
width:60px;
}
.edit-site-site-hub__text-content{
overflow:hidden;
}

File diff suppressed because one or more lines are too long

View File

@ -982,7 +982,8 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
}
.edit-site-global-styles-screen-css-help-link{
padding-left:16px;
display:block;
margin-top:8px;
}
.edit-site-global-styles-screen-variations{
@ -1979,31 +1980,12 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
}
.edit-site-layout__hub{
background:#000;
border-radius:8px;
box-shadow:0 .7px 1px rgba(0,0,0,.15),0 2.7px 3.8px -.2px rgba(0,0,0,.15),0 5.5px 7.8px -.3px rgba(0,0,0,.15),.1px 11.5px 16.4px -.5px rgba(0,0,0,.15);
height:68px;
left:24px;
padding:16px 16px 16px 0;
position:fixed;
top:24px;
width:calc(100vw - 48px);
z-index:3;
}
.edit-site-layout.is-full-canvas .edit-site-layout__hub{
border-radius:0;
box-shadow:none;
height:60px;
left:0;
padding:0 16px 0 0;
position:fixed;
top:0;
width:100vw;
}
@media (min-width:782px){
.edit-site-layout.is-full-canvas .edit-site-layout__hub{
padding-right:0;
width:auto;
}
width:calc(100vw - 48px);
z-index:3;
}
.edit-site-layout.is-full-canvas.is-edit-mode .edit-site-layout__hub{
padding-right:0;
@ -2014,6 +1996,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
width:312px;
}
}
.edit-site-layout.is-full-canvas .edit-site-layout__hub{
border-radius:0;
box-shadow:none;
padding-right:16px;
width:100vw;
}
@media (min-width:782px){
.edit-site-layout.is-full-canvas .edit-site-layout__hub{
padding-right:0;
width:auto;
}
}
.edit-site-layout__header{
display:flex;
@ -2259,6 +2253,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
}
.edit-site-sidebar-navigation-screen__content{
color:#949494;
margin:0 16px 16px 36px;
}
@ -2268,7 +2263,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
margin-bottom:8px;
padding-bottom:8px;
padding-right:16px;
padding-top:164px;
padding-top:108px;
position:sticky;
top:0;
}
@ -2284,14 +2279,10 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
.edit-site-sidebar-navigation-screen__back{
color:#e0e0e0;
}
.edit-site-sidebar-navigation-screen__back:hover{
.edit-site-sidebar-navigation-screen__back:hover,.edit-site-sidebar-navigation-screen__back:not([aria-disabled=true]):active{
color:#fff;
}
.edit-site-sidebar-navigation-screen__icon-placeholder{
width:36px;
}
.edit-site-sidebar-navigation-screen-templates__see-all{
margin-top:16px !important;
}
@ -2307,25 +2298,17 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
justify-content:space-between;
}
.edit-site-site-hub__edit-button{
color:#fff;
height:32px;
}
.edit-site-site-hub__post-type{
opacity:.6;
}
.edit-site-site-hub__view-mode-toggle-container{
background:#1e1e1e;
flex-shrink:0;
height:60px;
width:64px;
}
.edit-site-layout.is-edit-mode .edit-site-site-hub__view-mode-toggle-container{
width:60px;
}
.edit-site-site-hub__text-content{
overflow:hidden;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13850,7 +13850,7 @@ function getInnerBlocksTemplate(attributes) {
const isTemporaryMedia = (id, url) => !id && (0,external_wp_blob_namespaceObject.isBlobURL)(url);
function CoverEdit(_ref) {
var _useSetting;
var _attributes$url, _useSetting;
let {
attributes,
@ -13890,7 +13890,8 @@ function CoverEdit(_ref) {
// depending on the value of the useFeaturedImage flag
// to preview in edit the dynamic featured image
const url = useFeaturedImage ? mediaUrl : attributes.url;
const url = useFeaturedImage ? mediaUrl : // Ensure the url is not malformed due to sanitization through `wp_kses`.
(_attributes$url = attributes.url) === null || _attributes$url === void 0 ? void 0 : _attributes$url.replaceAll('&', '&');
const backgroundType = useFeaturedImage ? IMAGE_BACKGROUND_TYPE : attributes.backgroundType;
const {
__unstableMarkNextChangeAsNotPersistent
@ -23748,6 +23749,7 @@ function image_Image(_ref) {
canInsertCover,
imageEditing,
imageSizes,
maxWidth,
mediaUpload
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
@ -23758,7 +23760,7 @@ function image_Image(_ref) {
const rootClientId = getBlockRootClientId(clientId);
const settings = Object.fromEntries(Object.entries(getSettings()).filter(_ref2 => {
let [key] = _ref2;
return ['imageEditing', 'imageSizes', 'mediaUpload'].includes(key);
return ['imageEditing', 'imageSizes', 'maxWidth', 'mediaUpload'].includes(key);
}));
return { ...settings,
canInsertCover: canInsertBlockType('core/cover', rootClientId)
@ -24105,10 +24107,14 @@ function image_Image(_ref) {
const minHeight = naturalHeight < naturalWidth ? constants_MIN_SIZE : constants_MIN_SIZE / ratio; // With the current implementation of ResizableBox, an image needs an
// explicit pixel value for the max-width. In absence of being able to
// set the content-width, this max-width is currently dictated by the
// vanilla editor style. We'll use the clientWidth here, to prevent the width
// of the image growing larger than the width of the block column.
// vanilla editor style. The following variable adds a buffer to this
// vanilla style, so 3rd party themes have some wiggleroom. This does,
// in most cases, allow you to scale the image beyond the width of the
// main column, though not infinitely.
// @todo It would be good to revisit this once a content-width variable
// becomes available.
const maxWidthBuffer = clientWidth;
const maxWidthBuffer = maxWidth * 2.5;
let showRightHandle = false;
let showLeftHandle = false;
/* eslint-disable no-lonely-if */
@ -30838,7 +30844,6 @@ function UnsavedInnerBlocks(_ref) {
});
const {
isSaving,
draftNavigationMenus,
hasResolvedDraftNavigationMenus
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
if (isDisabled) {
@ -30852,13 +30857,13 @@ function UnsavedInnerBlocks(_ref) {
} = select(external_wp_coreData_namespaceObject.store);
return {
isSaving: isSavingEntityRecord('postType', 'wp_navigation'),
draftNavigationMenus: getEntityRecords(...DRAFT_MENU_PARAMS),
draftNavigationMenus: getEntityRecords( // This is needed so that hasResolvedDraftNavigationMenus gives the correct status.
...DRAFT_MENU_PARAMS),
hasResolvedDraftNavigationMenus: hasFinishedResolution('getEntityRecords', DRAFT_MENU_PARAMS)
};
}, [isDisabled]);
const {
hasResolvedNavigationMenus,
navigationMenus
hasResolvedNavigationMenus
} = useNavigationMenu(); // Automatically save the uncontrolled blocks.
(0,external_wp_element_namespaceObject.useEffect)(() => {
@ -30879,7 +30884,7 @@ function UnsavedInnerBlocks(_ref) {
}
createNavigationMenu(null, blocks);
}, [isDisabled, isSaving, hasResolvedDraftNavigationMenus, hasResolvedNavigationMenus, draftNavigationMenus, navigationMenus, hasSelection, createNavigationMenu, blocks]);
}, [isDisabled, isSaving, hasResolvedDraftNavigationMenus, hasResolvedNavigationMenus, innerBlocksAreDirty, hasSelection]);
const Wrapper = isSaving ? external_wp_components_namespaceObject.Disabled : 'div';
return (0,external_wp_element_namespaceObject.createElement)(Wrapper, innerBlocksProps);
}
@ -31188,7 +31193,8 @@ function useCreateNavigationMenu(clientId) {
const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(null);
const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null);
const {
saveEntityRecord
saveEntityRecord,
editEntityRecord
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
const generateDefaultTitle = useGenerateDefaultNavigationTitle(clientId); // This callback uses data from the two placeholder steps and only creates
// a new navigation menu when the user completes the final step.
@ -31229,7 +31235,15 @@ function useCreateNavigationMenu(clientId) {
return saveEntityRecord('postType', 'wp_navigation', record).then(response => {
setValue(response);
setStatus(CREATE_NAVIGATION_MENU_SUCCESS);
setStatus(CREATE_NAVIGATION_MENU_SUCCESS); // Set the status to publish so that the Navigation block
// shows up in the multi entity save flow.
if (postStatus !== 'publish') {
editEntityRecord('postType', 'wp_navigation', response.id, {
status: 'publish'
});
}
return response;
}).catch(err => {
setError(err === null || err === void 0 ? void 0 : err.message);
@ -31850,9 +31864,9 @@ const LeafMoreMenu = props => {
});
};
;// CONCATENATED MODULE: external ["wp","experiments"]
var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/experiments.js
;// CONCATENATED MODULE: external ["wp","privateApis"]
var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/private-apis.js
/**
* WordPress dependencies
*/
@ -31860,7 +31874,7 @@ var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
const {
lock,
unlock
} = (0,external_wp_experiments_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/block-library');
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/block-library');
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/navigation/edit/deleted-navigation-warning.js
@ -31917,7 +31931,7 @@ const MainContent = _ref => {
} = _ref;
const {
OffCanvasEditor
} = unlock(external_wp_blockEditor_namespaceObject.experiments); // Provide a hierarchy of clientIds for the given Navigation block (clientId).
} = unlock(external_wp_blockEditor_namespaceObject.privateApis); // Provide a hierarchy of clientIds for the given Navigation block (clientId).
// This is required else the list view will display the entire block tree.
const clientIdsTree = (0,external_wp_data_namespaceObject.useSelect)(select => {
@ -32077,10 +32091,7 @@ function Navigation(_ref) {
};
const recursionId = `navigationMenu/${ref}`;
const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.__experimentalUseHasRecursion)(recursionId);
const {
editEntityRecord
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store); // Preload classic menus, so that they don't suddenly pop-in when viewing
const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.__experimentalUseHasRecursion)(recursionId); // Preload classic menus, so that they don't suddenly pop-in when viewing
// the Select Menu dropdown.
const {
@ -32092,9 +32103,6 @@ function Navigation(_ref) {
const [showClassicMenuConversionNotice, hideClassicMenuConversionNotice] = use_navigation_notice({
name: 'block-library/core/navigation/classic-menu-conversion'
});
const [showMenuAutoPublishDraftNotice, hideMenuAutoPublishDraftNotice] = use_navigation_notice({
name: 'block-library/core/navigation/auto-publish-draft'
});
const [showNavigationMenuPermissionsNotice, hideNavigationMenuPermissionsNotice] = use_navigation_notice({
name: 'block-library/core/navigation/permissions/update'
});
@ -32149,7 +32157,6 @@ function Navigation(_ref) {
isNavigationMenuResolved,
isNavigationMenuMissing,
navigationMenus,
navigationMenu,
canUserUpdateNavigationMenu,
hasResolvedCanUserUpdateNavigationMenu,
canUserDeleteNavigationMenu,
@ -32374,24 +32381,7 @@ function Navigation(_ref) {
const isResponsive = 'never' !== overlayMenu;
const overlayMenuPreviewClasses = classnames_default()('wp-block-navigation__overlay-menu-preview', {
open: overlayMenuPreview
}); // Prompt the user to publish the menu they have set as a draft
const isDraftNavigationMenu = (navigationMenu === null || navigationMenu === void 0 ? void 0 : navigationMenu.status) === 'draft';
(0,external_wp_element_namespaceObject.useEffect)(() => {
hideMenuAutoPublishDraftNotice();
if (!isDraftNavigationMenu) {
return;
}
editEntityRecord('postType', 'wp_navigation', navigationMenu === null || navigationMenu === void 0 ? void 0 : navigationMenu.id, {
status: 'publish'
}, {
throwOnError: true
}).catch(() => {
showMenuAutoPublishDraftNotice((0,external_wp_i18n_namespaceObject.__)('Error occurred while publishing the navigation menu.'));
});
}, [isDraftNavigationMenu, navigationMenu]);
});
const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
const stylingInspectorControls = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, hasSubmenuIndicatorSetting && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
title: (0,external_wp_i18n_namespaceObject.__)('Display')
@ -32518,8 +32508,6 @@ function Navigation(_ref) {
}, (0,external_wp_element_namespaceObject.createElement)(UnsavedInnerBlocks, {
createNavigationMenu: createNavigationMenu,
blocks: uncontrolledInnerBlocks,
templateLock: templateLock,
navigationMenus: navigationMenus,
hasSelection: isSelected || isInnerBlockSelected
})));
} // Show a warning if the selected menu is no longer available.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1098,7 +1098,7 @@ const textFormattingShortcuts = [{
keyCombination: {
character: '[['
},
description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page')
description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page.')
}, {
keyCombination: {
modifier: 'primary',
@ -1896,9 +1896,9 @@ function useBlocksFocusControl(blocks) {
}, [focusedWidgetIdRef, selectBlock]);
}
;// CONCATENATED MODULE: external ["wp","experiments"]
var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/experiments.js
;// CONCATENATED MODULE: external ["wp","privateApis"]
var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/private-apis.js
/**
* WordPress dependencies
*/
@ -1906,7 +1906,7 @@ var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
const {
lock,
unlock
} = (0,external_wp_experiments_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/customize-widgets');
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/customize-widgets');
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.js
@ -1924,7 +1924,7 @@ const {
const {
ExperimentalBlockEditorProvider
} = unlock(external_wp_blockEditor_namespaceObject.experiments);
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
function SidebarEditorProvider(_ref) {
let {
sidebar,

File diff suppressed because one or more lines are too long

View File

@ -1536,9 +1536,9 @@ const builtinControls = {
})
};
;// CONCATENATED MODULE: external ["wp","experiments"]
var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/experiments.js
;// CONCATENATED MODULE: external ["wp","privateApis"]
var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/private-apis.js
/**
* WordPress dependencies
*/
@ -1546,7 +1546,7 @@ var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
const {
lock,
unlock
} = (0,external_wp_experiments_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/data');
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/data');
;// CONCATENATED MODULE: ./node_modules/is-promise/index.mjs
function isPromise(obj) {

File diff suppressed because one or more lines are too long

View File

@ -4284,7 +4284,7 @@ const textFormattingShortcuts = [{
keyCombination: {
character: '[['
},
description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page')
description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page.')
}, {
keyCombination: {
modifier: 'primary',
@ -5598,10 +5598,13 @@ function HeaderToolbar() {
showTooltip: !showIconLabels,
variant: showIconLabels ? 'tertiary' : undefined
}));
const openInserter = (0,external_wp_element_namespaceObject.useCallback)(() => {
const toggleInserter = (0,external_wp_element_namespaceObject.useCallback)(() => {
if (isInserterOpened) {
// Focusing the inserter button closes the inserter popover.
// Focusing the inserter button should close the inserter popover.
// However, there are some cases it won't close when the focus is lost.
// See https://github.com/WordPress/gutenberg/issues/43090 for more details.
inserterButton.current.focus();
setIsInserterOpened(false);
} else {
setIsInserterOpened(true);
}
@ -5623,7 +5626,7 @@ function HeaderToolbar() {
variant: "primary",
isPressed: isInserterOpened,
onMouseDown: preventDefault,
onClick: openInserter,
onClick: toggleInserter,
disabled: !isInserterEnabled,
icon: library_plus,
label: showIconLabels ? shortLabel : longLabel,
@ -9534,9 +9537,9 @@ function EditorInitialization(_ref) {
return null;
}
;// CONCATENATED MODULE: external ["wp","experiments"]
var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/experiments.js
;// CONCATENATED MODULE: external ["wp","privateApis"]
var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/private-apis.js
/**
* WordPress dependencies
*/
@ -9544,7 +9547,7 @@ var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
const {
lock,
unlock
} = (0,external_wp_experiments_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/edit-post');
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/edit-post');
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/editor.js
@ -9571,7 +9574,7 @@ const {
const {
ExperimentalEditorProvider
} = unlock(external_wp_editor_namespaceObject.experiments);
} = unlock(external_wp_editor_namespaceObject.privateApis);
function Editor(_ref) {
let {

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -3026,9 +3026,9 @@ const useLastSelectedWidgetArea = () => (0,external_wp_data_namespaceObject.useS
const ALLOW_REUSABLE_BLOCKS = false;
const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
;// CONCATENATED MODULE: external ["wp","experiments"]
var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/experiments.js
;// CONCATENATED MODULE: external ["wp","privateApis"]
var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/private-apis.js
/**
* WordPress dependencies
*/
@ -3036,7 +3036,7 @@ var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
const {
lock,
unlock
} = (0,external_wp_experiments_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/edit-widgets');
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/edit-widgets');
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.js
@ -3066,7 +3066,7 @@ const {
const {
ExperimentalBlockEditorProvider
} = unlock(external_wp_blockEditor_namespaceObject.experiments);
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
function WidgetAreasBlockEditorProvider(_ref) {
let {
blockEditorSettings,
@ -3580,7 +3580,7 @@ const textFormattingShortcuts = [{
keyCombination: {
character: '[['
},
description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page')
description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page.')
}, {
keyCombination: {
modifier: 'primary',

File diff suppressed because one or more lines are too long

View File

@ -1470,7 +1470,6 @@ __webpack_require__.d(__webpack_exports__, {
"__unstableRichTextInputEvent": function() { return /* reexport */ __unstableRichTextInputEvent; },
"cleanForSlug": function() { return /* reexport */ cleanForSlug; },
"createCustomColorsHOC": function() { return /* reexport */ createCustomColorsHOC; },
"experiments": function() { return /* reexport */ experiments; },
"getColorClassName": function() { return /* reexport */ getColorClassName; },
"getColorObjectByAttributeValues": function() { return /* reexport */ getColorObjectByAttributeValues; },
"getColorObjectByColorValue": function() { return /* reexport */ getColorObjectByColorValue; },
@ -1478,6 +1477,7 @@ __webpack_require__.d(__webpack_exports__, {
"getFontSizeClass": function() { return /* reexport */ getFontSizeClass; },
"getTemplatePartIcon": function() { return /* reexport */ getTemplatePartIcon; },
"mediaUpload": function() { return /* reexport */ mediaUpload; },
"privateApis": function() { return /* reexport */ privateApis; },
"store": function() { return /* reexport */ store_store; },
"storeConfig": function() { return /* reexport */ storeConfig; },
"transformStyles": function() { return /* reexport */ external_wp_blockEditor_namespaceObject.transformStyles; },
@ -13206,7 +13206,7 @@ function mediaUpload(_ref) {
const EMPTY_BLOCKS_LIST = [];
const BLOCK_EDITOR_SETTINGS = ['__experimentalBlockDirectory', '__experimentalDiscussionSettings', '__experimentalFeatures', '__experimentalGlobalStylesBaseStyles', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened', '__unstableGalleryWithImageBlocks', 'alignWide', 'allowedBlockTypes', 'blockInspectorTabs', 'allowedMimeTypes', 'bodyPlaceholder', 'canLockBlocks', 'capabilities', 'clearBlockSelection', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomSpacingSizes', 'disableCustomGradients', 'disableLayoutStyles', 'enableCustomLineHeight', 'enableCustomSpacing', 'enableCustomUnits', 'enableOpenverseMediaCategory', 'focusMode', 'fontSizes', 'gradients', 'generateAnchors', 'hasFixedToolbar', 'hasInlineToolbar', 'isDistractionFree', 'imageDefaultSize', 'imageDimensions', 'imageEditing', 'imageSizes', 'isRTL', 'keepCaretInsideBlock', 'locale', 'maxWidth', 'onUpdateDefaultBlockStyles', 'postsPerPage', 'readOnly', 'styles', 'template', 'templateLock', 'titlePlaceholder', 'supportsLayout', 'widgetTypesToHideFromLegacyWidgetBlock', '__unstableHasCustomAppender', '__unstableIsPreviewMode', '__unstableResolvedAssets'];
const BLOCK_EDITOR_SETTINGS = ['__experimentalBlockDirectory', '__experimentalDiscussionSettings', '__experimentalFeatures', '__experimentalGlobalStylesBaseStyles', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened', '__unstableGalleryWithImageBlocks', 'alignWide', 'allowedBlockTypes', 'blockInspectorTabs', 'allowedMimeTypes', 'bodyPlaceholder', 'canLockBlocks', 'capabilities', 'clearBlockSelection', 'codeEditingEnabled', 'colors', 'disableCustomColors', 'disableCustomFontSizes', 'disableCustomSpacingSizes', 'disableCustomGradients', 'disableLayoutStyles', 'enableCustomLineHeight', 'enableCustomSpacing', 'enableCustomUnits', 'enableOpenverseMediaCategory', 'focusMode', 'fontSizes', 'gradients', 'generateAnchors', 'hasFixedToolbar', 'hasInlineToolbar', 'isDistractionFree', 'imageDefaultSize', 'imageDimensions', 'imageEditing', 'imageSizes', 'isRTL', 'keepCaretInsideBlock', 'locale', 'maxWidth', 'onUpdateDefaultBlockStyles', 'postsPerPage', 'readOnly', 'styles', 'template', 'templateLock', 'titlePlaceholder', 'supportsLayout', 'widgetTypesToHideFromLegacyWidgetBlock', '__unstableHasCustomAppender', '__unstableIsPreviewMode', '__unstableResolvedAssets', '__unstableIsBlockBasedTheme'];
/**
* React hook used to compute the block editor settings to use for the post editor.
*
@ -13318,8 +13318,8 @@ function useBlockEditorSettings(settings, hasTemplate) {
/* harmony default export */ var use_block_editor_settings = (useBlockEditorSettings);
;// CONCATENATED MODULE: external ["wp","experiments"]
var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
;// CONCATENATED MODULE: external ["wp","privateApis"]
var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/lockUnlock.js
/**
* WordPress dependencies
@ -13328,7 +13328,7 @@ var external_wp_experiments_namespaceObject = window["wp"]["experiments"];
const {
lock,
unlock
} = (0,external_wp_experiments_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/editor');
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/editor');
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/index.js
@ -13354,7 +13354,7 @@ const {
const {
ExperimentalBlockEditorProvider
} = unlock(external_wp_blockEditor_namespaceObject.experiments);
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const ExperimentalEditorProvider = with_registry_provider(_ref => {
let {
__unstableTemplate,
@ -13682,14 +13682,14 @@ function cleanForSlug(string) {
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/experiments.js
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/private-apis.js
/**
* Internal dependencies
*/
const experiments = {};
lock(experiments, {
const privateApis = {};
lock(privateApis, {
ExperimentalEditorProvider: ExperimentalEditorProvider
});

File diff suppressed because one or more lines are too long

View File

@ -410,8 +410,6 @@ function capitalCase(input, options) {
return noCase(input, __assign({ delimiter: " ", transform: capitalCaseTransform }, options));
}
;// CONCATENATED MODULE: external "lodash"
var external_lodash_namespaceObject = window["lodash"];
;// CONCATENATED MODULE: external ["wp","i18n"]
var external_wp_i18n_namespaceObject = window["wp"]["i18n"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/keycodes/build-module/platform.js
@ -455,7 +453,6 @@ function isAppleOS() {
* External dependencies
*/
/**
* WordPress dependencies
*/
@ -487,6 +484,8 @@ function isAppleOS() {
/** @typedef {(event: KeyboardEvent, character: string, isApple?: () => boolean) => boolean} WPEventKeyHandler */
/** @typedef {( isApple: () => boolean ) => WPModifierPart[]} WPModifier */
/**
* Keycode for BACKSPACE key.
*/
@ -588,6 +587,23 @@ const SHIFT = 'shift';
const ZERO = 48;
/**
* Map the values of an object with a specified callback and return the result object.
*
* @template T
*
* @param {T} object Object to map values of.
* @param {( value: any ) => any} mapFn Mapping function
*
* @return {any} Active modifier constants.
*/
function mapValues(object, mapFn) {
return Object.fromEntries(Object.entries(object).map(_ref => {
let [key, value] = _ref;
return [key, mapFn(value)];
}));
}
/**
* Object that contains functions that return the available modifier
* depending on platform.
@ -595,6 +611,7 @@ const ZERO = 48;
* @type {WPModifierHandler< ( isApple: () => boolean ) => WPModifierPart[]>}
*/
const modifiers = {
primary: _isApple => _isApple() ? [COMMAND] : [CTRL],
primaryShift: _isApple => _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT],
@ -624,7 +641,9 @@ const modifiers = {
* shortcuts.
*/
const rawShortcut = (0,external_lodash_namespaceObject.mapValues)(modifiers, modifier => {
const rawShortcut = mapValues(modifiers, (
/** @type {WPModifier} */
modifier) => {
return (
/** @type {WPKeyHandler<string>} */
function (character) {
@ -648,7 +667,9 @@ const rawShortcut = (0,external_lodash_namespaceObject.mapValues)(modifiers, mod
* shortcut sequences.
*/
const displayShortcutList = (0,external_lodash_namespaceObject.mapValues)(modifiers, modifier => {
const displayShortcutList = mapValues(modifiers, (
/** @type {WPModifier} */
modifier) => {
return (
/** @type {WPKeyHandler<string[]>} */
function (character) {
@ -664,7 +685,9 @@ const displayShortcutList = (0,external_lodash_namespaceObject.mapValues)(modifi
[SHIFT]: isApple ? '⇧' : 'Shift'
};
const modifierKeys = modifier(_isApple).reduce((accumulator, key) => {
const replacementKey = (0,external_lodash_namespaceObject.get)(replacementKeyMap, key, key); // If on the Mac, adhere to platform convention and don't show plus between keys.
var _replacementKeyMap$ke;
const replacementKey = (_replacementKeyMap$ke = replacementKeyMap[key]) !== null && _replacementKeyMap$ke !== void 0 ? _replacementKeyMap$ke : key; // If on the Mac, adhere to platform convention and don't show plus between keys.
if (isApple) {
return [...accumulator, replacementKey];
@ -698,7 +721,9 @@ const displayShortcutList = (0,external_lodash_namespaceObject.mapValues)(modifi
* display shortcuts.
*/
const displayShortcut = (0,external_lodash_namespaceObject.mapValues)(displayShortcutList, shortcutList => {
const displayShortcut = mapValues(displayShortcutList, (
/** @type {WPKeyHandler<string[]>} */
shortcutList) => {
return (
/** @type {WPKeyHandler<string>} */
function (character) {
@ -723,13 +748,17 @@ const displayShortcut = (0,external_lodash_namespaceObject.mapValues)(displaySho
* shortcut ARIA labels.
*/
const shortcutAriaLabel = (0,external_lodash_namespaceObject.mapValues)(modifiers, modifier => {
const shortcutAriaLabel = mapValues(modifiers, (
/** @type {WPModifier} */
modifier) => {
return (
/** @type {WPKeyHandler<string>} */
function (character) {
let _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
const isApple = _isApple();
/** @type {Record<string,string>} */
const replacementKeyMap = {
[SHIFT]: 'Shift',
@ -749,7 +778,11 @@ const shortcutAriaLabel = (0,external_lodash_namespaceObject.mapValues)(modifier
/* translators: tilde as in the character '~' */
'~': (0,external_wp_i18n_namespaceObject.__)('Tilde')
};
return [...modifier(_isApple), character].map(key => capitalCase((0,external_lodash_namespaceObject.get)(replacementKeyMap, key, key))).join(isApple ? ' ' : ' + ');
return [...modifier(_isApple), character].map(key => {
var _replacementKeyMap$ke2;
return capitalCase((_replacementKeyMap$ke2 = replacementKeyMap[key]) !== null && _replacementKeyMap$ke2 !== void 0 ? _replacementKeyMap$ke2 : key);
}).join(isApple ? ' ' : ' + ');
}
);
});
@ -786,7 +819,9 @@ function getEventModifiers(event) {
*/
const isKeyboardEvent = (0,external_lodash_namespaceObject.mapValues)(modifiers, getModifiers => {
const isKeyboardEvent = mapValues(modifiers, (
/** @type {WPModifier} */
getModifiers) => {
return (
/** @type {WPEventKeyHandler} */
function (event, character) {
@ -794,6 +829,15 @@ const isKeyboardEvent = (0,external_lodash_namespaceObject.mapValues)(modifiers,
const mods = getModifiers(_isApple);
const eventMods = getEventModifiers(event);
/** @type {Record<string,string>} */
const replacementWithShiftKeyMap = {
Comma: ',',
Backslash: '\\',
// Windows returns `\` for both IntlRo and IntlYen.
IntlRo: '\\',
IntlYen: '\\'
};
const modsDiff = mods.filter(mod => !eventMods.includes(mod));
const eventModsDiff = eventMods.filter(mod => !mods.includes(mod));
@ -811,14 +855,15 @@ const isKeyboardEvent = (0,external_lodash_namespaceObject.mapValues)(modifiers,
if (event.altKey && character.length === 1) {
key = String.fromCharCode(event.keyCode).toLowerCase();
} // Replace some characters to match the key indicated
// by the shortcut on Windows.
} // `event.key` returns the value of the key pressed, taking into the state of
// modifier keys such as `Shift`. If the shift key is pressed, a different
// value may be returned depending on the keyboard layout. It is necessary to
// convert to the physical key value that don't take into account keyboard
// layout or modifier key state.
if (!_isApple()) {
if (event.shiftKey && character.length === 1 && event.code === 'Comma') {
key = ',';
}
if (event.shiftKey && character.length === 1 && replacementWithShiftKeyMap[event.code]) {
key = replacementWithShiftKeyMap[event.code];
} // For backwards compatibility.

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */
!function(){"use strict";var t={d:function(n,e){for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{ALT:function(){return j},BACKSPACE:function(){return d},COMMAND:function(){return T},CTRL:function(){return L},DELETE:function(){return b},DOWN:function(){return E},END:function(){return w},ENTER:function(){return h},ESCAPE:function(){return g},F10:function(){return P},HOME:function(){return A},LEFT:function(){return C},PAGEDOWN:function(){return v},PAGEUP:function(){return y},RIGHT:function(){return S},SHIFT:function(){return _},SPACE:function(){return m},TAB:function(){return p},UP:function(){return O},ZERO:function(){return R},displayShortcut:function(){return x},displayShortcutList:function(){return k},isAppleOS:function(){return s},isKeyboardEvent:function(){return N},modifiers:function(){return M},rawShortcut:function(){return Z},shortcutAriaLabel:function(){return D}});var e=function(){return e=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},e.apply(this,arguments)};Object.create;Object.create;function r(t){return t.toLowerCase()}var o=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],i=/[^A-Z0-9]+/gi;function u(t,n,e){return n instanceof RegExp?t.replace(n,e):n.reduce((function(t,n){return t.replace(n,e)}),t)}function c(t){return function(t){return t.charAt(0).toUpperCase()+t.substr(1)}(t.toLowerCase())}function f(t,n){return void 0===n&&(n={}),function(t,n){void 0===n&&(n={});for(var e=n.splitRegexp,c=void 0===e?o:e,f=n.stripRegexp,a=void 0===f?i:f,l=n.transform,s=void 0===l?r:l,d=n.delimiter,p=void 0===d?" ":d,h=u(u(t,c,"$1\0$2"),a,"\0"),g=0,m=h.length;"\0"===h.charAt(g);)g++;for(;"\0"===h.charAt(m-1);)m--;return h.slice(g,m).split("\0").map(s).join(p)}(t,e({delimiter:" ",transform:c},n))}var a=window.lodash,l=window.wp.i18n;function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!t){if("undefined"==typeof window)return!1;t=window}const{platform:n}=t.navigator;return-1!==n.indexOf("Mac")||["iPad","iPhone"].includes(n)}const d=8,p=9,h=13,g=27,m=32,y=33,v=34,w=35,A=36,C=37,O=38,S=39,E=40,b=46,P=121,j="alt",L="ctrl",T="meta",_="shift",R=48,M={primary:t=>t()?[T]:[L],primaryShift:t=>t()?[_,T]:[L,_],primaryAlt:t=>t()?[j,T]:[L,j],secondary:t=>t()?[_,j,T]:[L,_,j],access:t=>t()?[L,j]:[_,j],ctrl:()=>[L],alt:()=>[j],ctrlShift:()=>[L,_],shift:()=>[_],shiftAlt:()=>[_,j],undefined:()=>[]},Z=(0,a.mapValues)(M,(t=>function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return[...t(e),n.toLowerCase()].join("+")})),k=(0,a.mapValues)(M,(t=>function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;const r=e(),o={[j]:r?"⌥":"Alt",[L]:r?"⌃":"Ctrl",[T]:"⌘",[_]:r?"⇧":"Shift"},i=t(e).reduce(((t,n)=>{const e=(0,a.get)(o,n,n);return r?[...t,e]:[...t,e,"+"]}),[]),u=f(n,{stripRegexp:/[^A-Z0-9~`,\.\\\-]/gi});return[...i,u]})),x=(0,a.mapValues)(k,(t=>function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return t(n,e).join("")})),D=(0,a.mapValues)(M,(t=>function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;const r=e(),o={[_]:"Shift",[T]:r?"Command":"Control",[L]:"Control",[j]:r?"Option":"Alt",",":(0,l.__)("Comma"),".":(0,l.__)("Period"),"`":(0,l.__)("Backtick"),"~":(0,l.__)("Tilde")};return[...t(e),n].map((t=>f((0,a.get)(o,t,t)))).join(r?" ":" + ")}));function K(t){return[j,L,T,_].filter((n=>t[`${n}Key`]))}const N=(0,a.mapValues)(M,(t=>function(n,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s;const o=t(r),i=K(n),u=o.filter((t=>!i.includes(t))),c=i.filter((t=>!o.includes(t)));if(u.length>0||c.length>0)return!1;let f=n.key.toLowerCase();return e?(n.altKey&&1===e.length&&(f=String.fromCharCode(n.keyCode).toLowerCase()),r()||n.shiftKey&&1===e.length&&"Comma"===n.code&&(f=","),"del"===e&&(e="delete"),f===e.toLowerCase()):o.includes(f)}));(window.wp=window.wp||{}).keycodes=n}();
!function(){"use strict";var t={d:function(n,r){for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{ALT:function(){return P},BACKSPACE:function(){return d},COMMAND:function(){return L},CTRL:function(){return j},DELETE:function(){return S},DOWN:function(){return E},END:function(){return m},ENTER:function(){return p},ESCAPE:function(){return h},F10:function(){return b},HOME:function(){return A},LEFT:function(){return w},PAGEDOWN:function(){return y},PAGEUP:function(){return v},RIGHT:function(){return O},SHIFT:function(){return T},SPACE:function(){return g},TAB:function(){return s},UP:function(){return C},ZERO:function(){return _},displayShortcut:function(){return x},displayShortcutList:function(){return Z},isAppleOS:function(){return a},isKeyboardEvent:function(){return N},modifiers:function(){return k},rawShortcut:function(){return M},shortcutAriaLabel:function(){return D}});var r=function(){return r=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},r.apply(this,arguments)};Object.create;Object.create;function e(t){return t.toLowerCase()}var o=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],i=/[^A-Z0-9]+/gi;function u(t,n,r){return n instanceof RegExp?t.replace(n,r):n.reduce((function(t,n){return t.replace(n,r)}),t)}function c(t){return function(t){return t.charAt(0).toUpperCase()+t.substr(1)}(t.toLowerCase())}function f(t,n){return void 0===n&&(n={}),function(t,n){void 0===n&&(n={});for(var r=n.splitRegexp,c=void 0===r?o:r,f=n.stripRegexp,l=void 0===f?i:f,a=n.transform,d=void 0===a?e:a,s=n.delimiter,p=void 0===s?" ":s,h=u(u(t,c,"$1\0$2"),l,"\0"),g=0,v=h.length;"\0"===h.charAt(g);)g++;for(;"\0"===h.charAt(v-1);)v--;return h.slice(g,v).split("\0").map(d).join(p)}(t,r({delimiter:" ",transform:c},n))}var l=window.wp.i18n;function a(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!t){if("undefined"==typeof window)return!1;t=window}const{platform:n}=t.navigator;return-1!==n.indexOf("Mac")||["iPad","iPhone"].includes(n)}const d=8,s=9,p=13,h=27,g=32,v=33,y=34,m=35,A=36,w=37,C=38,O=39,E=40,S=46,b=121,P="alt",j="ctrl",L="meta",T="shift",_=48;function R(t,n){return Object.fromEntries(Object.entries(t).map((t=>{let[r,e]=t;return[r,n(e)]})))}const k={primary:t=>t()?[L]:[j],primaryShift:t=>t()?[T,L]:[j,T],primaryAlt:t=>t()?[P,L]:[j,P],secondary:t=>t()?[T,P,L]:[j,T,P],access:t=>t()?[j,P]:[T,P],ctrl:()=>[j],alt:()=>[P],ctrlShift:()=>[j,T],shift:()=>[T],shiftAlt:()=>[T,P],undefined:()=>[]},M=R(k,(t=>function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return[...t(r),n.toLowerCase()].join("+")})),Z=R(k,(t=>function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;const e=r(),o={[P]:e?"⌥":"Alt",[j]:e?"⌃":"Ctrl",[L]:"⌘",[T]:e?"⇧":"Shift"},i=t(r).reduce(((t,n)=>{var r;const i=null!==(r=o[n])&&void 0!==r?r:n;return e?[...t,i]:[...t,i,"+"]}),[]),u=f(n,{stripRegexp:/[^A-Z0-9~`,\.\\\-]/gi});return[...i,u]})),x=R(Z,(t=>function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return t(n,r).join("")})),D=R(k,(t=>function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;const e=r(),o={[T]:"Shift",[L]:e?"Command":"Control",[j]:"Control",[P]:e?"Option":"Alt",",":(0,l.__)("Comma"),".":(0,l.__)("Period"),"`":(0,l.__)("Backtick"),"~":(0,l.__)("Tilde")};return[...t(r),n].map((t=>{var n;return f(null!==(n=o[t])&&void 0!==n?n:t)})).join(e?" ":" + ")}));function K(t){return[P,j,L,T].filter((n=>t[`${n}Key`]))}const N=R(k,(t=>function(n,r){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;const o=t(e),i=K(n),u={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},c=o.filter((t=>!i.includes(t))),f=i.filter((t=>!o.includes(t)));if(c.length>0||f.length>0)return!1;let l=n.key.toLowerCase();return r?(n.altKey&&1===r.length&&(l=String.fromCharCode(n.keyCode).toLowerCase()),n.shiftKey&&1===r.length&&u[n.code]&&(l=u[n.code]),"del"===r&&(r="delete"),l===r.toLowerCase()):o.includes(l)}));(window.wp=window.wp||{}).keycodes=n}();

244
wp-includes/js/dist/private-apis.js vendored Normal file
View File

@ -0,0 +1,244 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"__dangerousOptInToUnstableAPIsOnlyForCoreModules": function() { return /* reexport */ __dangerousOptInToUnstableAPIsOnlyForCoreModules; }
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/private-apis/build-module/implementation.js
/**
* wordpress/private-apis the utilities to enable private cross-package
* exports of private APIs.
*
* This "implementation.js" file is needed for the sake of the unit tests. It
* exports more than the public API of the package to aid in testing.
*/
/**
* The list of core modules allowed to opt-in to the private APIs.
*/
const CORE_MODULES_USING_PRIVATE_APIS = ['@wordpress/block-editor', '@wordpress/block-library', '@wordpress/blocks', '@wordpress/components', '@wordpress/customize-widgets', '@wordpress/data', '@wordpress/edit-post', '@wordpress/edit-site', '@wordpress/edit-widgets', '@wordpress/editor'];
/**
* A list of core modules that already opted-in to
* the privateApis package.
*
* @type {string[]}
*/
const registeredPrivateApis = [];
/*
* Warning for theme and plugin developers.
*
* The use of private developer APIs is intended for use by WordPress Core
* and the Gutenberg plugin exclusively.
*
* Dangerously opting in to using these APIs is NOT RECOMMENDED. Furthermore,
* the WordPress Core philosophy to strive to maintain backward compatibility
* for third-party developers DOES NOT APPLY to private APIs.
*
* THE CONSENT STRING FOR OPTING IN TO THESE APIS MAY CHANGE AT ANY TIME AND
* WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A
* CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.
*/
const requiredConsent = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';
/** @type {boolean} */
let allowReRegistration; // Use try/catch to force "false" if the environment variable is not explicitly
// set to true (e.g. when building WordPress core).
try {
var _process$env$ALLOW_EX;
allowReRegistration = (_process$env$ALLOW_EX = process.env.ALLOW_EXPERIMENT_REREGISTRATION) !== null && _process$env$ALLOW_EX !== void 0 ? _process$env$ALLOW_EX : false;
} catch (error) {
allowReRegistration = false;
}
/**
* Called by a @wordpress package wishing to opt-in to accessing or exposing
* private private APIs.
*
* @param {string} consent The consent string.
* @param {string} moduleName The name of the module that is opting in.
* @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions.
*/
const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, moduleName) => {
if (!CORE_MODULES_USING_PRIVATE_APIS.includes(moduleName)) {
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}". ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
}
if (!allowReRegistration && registeredPrivateApis.includes(moduleName)) {
// This check doesn't play well with Story Books / Hot Module Reloading
// and isn't included in the Gutenberg plugin. It only matters in the
// WordPress core release.
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}" which is already registered. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
}
if (consent !== requiredConsent) {
throw new Error(`You tried to opt-in to unstable APIs without confirming you know the consequences. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on the next WordPress release.');
}
registeredPrivateApis.push(moduleName);
return {
lock,
unlock
};
};
/**
* Binds private data to an object.
* It does not alter the passed object in any way, only
* registers it in an internal map of private data.
*
* The private data can't be accessed by any other means
* than the `unlock` function.
*
* @example
* ```js
* const object = {};
* const privateData = { a: 1 };
* lock( object, privateData );
*
* object
* // {}
*
* unlock( object );
* // { a: 1 }
* ```
*
* @param {any} object The object to bind the private data to.
* @param {any} privateData The private data to bind to the object.
*/
function lock(object, privateData) {
if (!object) {
throw new Error('Cannot lock an undefined object.');
}
if (!(__private in object)) {
object[__private] = {};
}
lockedData.set(object[__private], privateData);
}
/**
* Unlocks the private data bound to an object.
*
* It does not alter the passed object in any way, only
* returns the private data paired with it using the `lock()`
* function.
*
* @example
* ```js
* const object = {};
* const privateData = { a: 1 };
* lock( object, privateData );
*
* object
* // {}
*
* unlock( object );
* // { a: 1 }
* ```
*
* @param {any} object The object to unlock the private data from.
* @return {any} The private data bound to the object.
*/
function unlock(object) {
if (!object) {
throw new Error('Cannot unlock an undefined object.');
}
if (!(__private in object)) {
throw new Error('Cannot unlock an object that was not locked before. ');
}
return lockedData.get(object[__private]);
}
const lockedData = new WeakMap();
/**
* Used by lock() and unlock() to uniquely identify the private data
* related to a containing object.
*/
const __private = Symbol('Private API ID'); // Unit tests utilities:
/**
* Private function to allow the unit tests to allow
* a mock module to access the private APIs.
*
* @param {string} name The name of the module.
*/
function allowCoreModule(name) {
CORE_MODULES_USING_PRIVATE_APIS.push(name);
}
/**
* Private function to allow the unit tests to set
* a custom list of allowed modules.
*/
function resetAllowedCoreModules() {
while (CORE_MODULES_USING_PRIVATE_APIS.length) {
CORE_MODULES_USING_PRIVATE_APIS.pop();
}
}
/**
* Private function to allow the unit tests to reset
* the list of registered private apis.
*/
function resetRegisteredPrivateApis() {
while (registeredPrivateApis.length) {
registeredPrivateApis.pop();
}
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/private-apis/build-module/index.js
(window.wp = window.wp || {}).privateApis = __webpack_exports__;
/******/ })()
;

View File

@ -0,0 +1,2 @@
/*! This file is auto-generated */
!function(){"use strict";var e={d:function(o,r){for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{__dangerousOptInToUnstableAPIsOnlyForCoreModules:function(){return i}});const r=["@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/components","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor"],t=[];let n;try{var s;n=null!==(s=process.env.ALLOW_EXPERIMENT_REREGISTRATION)&&void 0!==s&&s}catch(e){n=!1}const i=(e,o)=>{if(!r.includes(o))throw new Error(`You tried to opt-in to unstable APIs as module "${o}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!n&&t.includes(o))throw new Error(`You tried to opt-in to unstable APIs as module "${o}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release."!==e)throw new Error("You tried to opt-in to unstable APIs without confirming you know the consequences. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on the next WordPress release.");return t.push(o),{lock:a,unlock:d}};function a(e,o){if(!e)throw new Error("Cannot lock an undefined object.");l in e||(e[l]={}),u.set(e[l],o)}function d(e){if(!e)throw new Error("Cannot unlock an undefined object.");if(!(l in e))throw new Error("Cannot unlock an object that was not locked before. ");return u.get(e[l])}const u=new WeakMap,l=Symbol("Private API ID");(window.wp=window.wp||{}).privateApis=o}();

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-beta1-55332';
$wp_version = '6.2-beta1-55333';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.