Skip to content

Commit

Permalink
Editor: Update npm packages.
Browse files Browse the repository at this point in the history
Updates the editor npm packages to the latest patch versions for 6.5.1.

See WordPress/gutenberg#60577.

Built from https://develop.svn.wordpress.org/trunk@57949


git-svn-id: https://core.svn.wordpress.org/trunk@57446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
johnbillion committed Apr 9, 2024
1 parent 79704cc commit 6df6afd
Show file tree
Hide file tree
Showing 20 changed files with 238 additions and 144 deletions.
2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.min.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wp-includes/blocks/avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
$label = '';
if ( '_blank' === $attributes['linkTarget'] ) {
// translators: %s is the Author name.
$label = 'aria-label="' . sprintf( esc_attr__( '(%s author archive, opens in a new tab)' ), $author_name ) . '"';
$label = 'aria-label="' . esc_attr( sprintf( __( '(%s author archive, opens in a new tab)' ), $author_name ) ) . '"';
}
// translators: %1$s: Author archive link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
Expand All @@ -76,7 +76,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
$label = '';
if ( '_blank' === $attributes['linkTarget'] ) {
// translators: %s is the Comment Author name.
$label = 'aria-label="' . sprintf( esc_attr__( '(%s website link, opens in a new tab)' ), $comment->comment_author ) . '"';
$label = 'aria-label="' . esc_attr( sprintf( __( '(%s website link, opens in a new tab)' ), $comment->comment_author ) ) . '"';
}
// translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
Expand Down
5 changes: 3 additions & 2 deletions wp-includes/blocks/navigation/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ const {
},
handleMenuFocusout(event) {
const {
modal
modal,
type
} = (0,interactivity_namespaceObject.getContext)();
// If focus is outside modal, and in the document, close menu
// event.target === The element losing focus
Expand All @@ -160,7 +161,7 @@ const {
// `window.document.activeElement` doesn't change.

// The event.relatedTarget is null when something outside the navigation menu is clicked. This is only necessary for Safari.
if (event.relatedTarget === null || !modal?.contains(event.relatedTarget) && event.target !== window.document.activeElement) {
if (event.relatedTarget === null || !modal?.contains(event.relatedTarget) && event.target !== window.document.activeElement && type === 'submenu') {
actions.closeMenu('click');
actions.closeMenu('focus');
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/blocks/navigation/view.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions wp-includes/css/dist/edit-post/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -586,17 +586,15 @@ body.is-fullscreen-mode .interface-interface-skeleton{
border-bottom:none;
}
.is-distraction-free .edit-post-header{
-webkit-backdrop-filter:blur(20px) !important;
backdrop-filter:blur(20px) !important;
background-color:#ffffffe6;
background-color:#fff;
border-bottom:1px solid #e0e0e0;
position:absolute;
width:100%;
}
.is-distraction-free .edit-post-header>.edit-post-header__settings>.edit-post-header__post-preview-button{
visibility:hidden;
}
.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__inserter-toggle{
.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle{
display:none;
}
.is-distraction-free .interface-interface-skeleton__header:focus-within{
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/edit-post/style-rtl.min.css

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions wp-includes/css/dist/edit-post/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -586,17 +586,15 @@ body.is-fullscreen-mode .interface-interface-skeleton{
border-bottom:none;
}
.is-distraction-free .edit-post-header{
-webkit-backdrop-filter:blur(20px) !important;
backdrop-filter:blur(20px) !important;
background-color:#ffffffe6;
background-color:#fff;
border-bottom:1px solid #e0e0e0;
position:absolute;
width:100%;
}
.is-distraction-free .edit-post-header>.edit-post-header__settings>.edit-post-header__post-preview-button{
visibility:hidden;
}
.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__inserter-toggle{
.is-distraction-free .edit-post-header>.edit-post-header__settings>.editor-preview-dropdown,.is-distraction-free .edit-post-header>.edit-post-header__settings>.interface-pinned-items,.is-distraction-free .edit-post-header>.edit-post-header__toolbar .editor-document-tools__document-overview-toggle{
display:none;
}
.is-distraction-free .interface-interface-skeleton__header:focus-within{
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/edit-post/style.min.css

Large diffs are not rendered by default.

97 changes: 57 additions & 40 deletions wp-includes/js/dist/block-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -42439,11 +42439,13 @@ function PatternsListHeader({
function PatternList({
searchValue,
selectedCategory,
patternCategories
patternCategories,
rootClientId
}) {
const container = (0,external_wp_element_namespaceObject.useRef)();
const debouncedSpeak = (0,external_wp_compose_namespaceObject.useDebounce)(external_wp_a11y_namespaceObject.speak, 500);
const [destinationRootClientId, onInsertBlocks] = use_insertion_point({
rootClientId,
shouldFocusBlock: true
});
const [patterns,, onClickPattern] = use_patterns_state(onInsertBlocks, destinationRootClientId);
Expand Down Expand Up @@ -42589,7 +42591,8 @@ function PatternsExplorer({
searchValue: searchValue,
selectedCategory: selectedCategory,
patternCategories: patternCategories,
patternSourceFilter: patternSourceFilter
patternSourceFilter: patternSourceFilter,
rootClientId: rootClientId
}));
}
function PatternsExplorerModal({
Expand Down Expand Up @@ -60705,7 +60708,8 @@ const ImageURLInputUI = ({
rel,
showLightboxSetting,
lightboxEnabled,
onSetLightbox
onSetLightbox,
resetLightbox
}) => {
const [isOpen, setIsOpen] = (0,external_wp_element_namespaceObject.useState)(false);
// Use internal state instead of a ref to make sure that the component
Expand Down Expand Up @@ -60866,22 +60870,66 @@ const ImageURLInputUI = ({
onChange: onSetLinkClass
}));
const linkEditorValue = urlInput !== null ? urlInput : url;
const showLinkEditor = (!linkEditorValue && !lightboxEnabled) === true;
const hideLightboxPanel = !lightboxEnabled || lightboxEnabled && !showLightboxSetting;
const showLinkEditor = !linkEditorValue && hideLightboxPanel;
const urlLabel = (getLinkDestinations().find(destination => destination.linkDestination === linkDestination) || {}).title;
const PopoverChildren = () => {
if (lightboxEnabled && showLightboxSetting && !url && !isEditingLink) {
return (0,external_React_.createElement)("div", {
className: "block-editor-url-popover__expand-on-click"
}, (0,external_React_.createElement)(build_module_icon, {
icon: library_fullscreen
}), (0,external_React_.createElement)("div", {
className: "text"
}, (0,external_React_.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Expand on click')), (0,external_React_.createElement)("p", {
className: "description"
}, (0,external_wp_i18n_namespaceObject.__)('Scales the image with a lightbox effect'))), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
icon: link_off,
label: (0,external_wp_i18n_namespaceObject.__)('Disable expand on click'),
onClick: () => {
onSetLightbox(false);
},
size: "compact"
}));
} else if (!url || isEditingLink) {
return (0,external_React_.createElement)(url_popover.LinkEditor, {
className: "block-editor-format-toolbar__link-container-content",
value: linkEditorValue,
onChangeInputValue: setUrlInput,
onSubmit: onSubmitLinkChange(),
autocompleteRef: autocompleteRef
});
} else if (url && !isEditingLink) {
return (0,external_React_.createElement)(external_React_.Fragment, null, (0,external_React_.createElement)(url_popover.LinkViewer, {
className: "block-editor-format-toolbar__link-container-content",
url: url,
onEditLinkClick: startEditLink,
urlLabel: urlLabel
}), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
icon: link_off,
label: (0,external_wp_i18n_namespaceObject.__)('Remove link'),
onClick: () => {
onLinkRemove();
resetLightbox();
},
size: "compact"
}));
}
};
return (0,external_React_.createElement)(external_React_.Fragment, null, (0,external_React_.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
icon: library_link,
className: "components-toolbar__control",
label: (0,external_wp_i18n_namespaceObject.__)('Link'),
"aria-expanded": isOpen,
onClick: openLinkUI,
ref: setPopoverAnchor,
isActive: !!url || lightboxEnabled
isActive: !!url || lightboxEnabled && showLightboxSetting
}), isOpen && (0,external_React_.createElement)(url_popover, {
ref: wrapperRef,
anchor: popoverAnchor,
onFocusOutside: onFocusOutside(),
onClose: closeLinkUI,
renderSettings: !lightboxEnabled ? () => advancedOptions : null,
renderSettings: hideLightboxPanel ? () => advancedOptions : null,
additionalControls: showLinkEditor && (0,external_React_.createElement)(external_wp_components_namespaceObject.NavigableMenu, null, getLinkDestinations().map(link => (0,external_React_.createElement)(external_wp_components_namespaceObject.MenuItem, {
key: link.linkDestination,
icon: link.icon,
Expand All @@ -60908,38 +60956,7 @@ const ImageURLInputUI = ({
}
}, (0,external_wp_i18n_namespaceObject.__)('Expand on click'))),
offset: 13
}, (!url || isEditingLink) && !lightboxEnabled && (0,external_React_.createElement)(external_React_.Fragment, null, (0,external_React_.createElement)(url_popover.LinkEditor, {
className: "block-editor-format-toolbar__link-container-content",
value: linkEditorValue,
onChangeInputValue: setUrlInput,
onSubmit: onSubmitLinkChange(),
autocompleteRef: autocompleteRef
})), url && !isEditingLink && !lightboxEnabled && (0,external_React_.createElement)(external_React_.Fragment, null, (0,external_React_.createElement)(url_popover.LinkViewer, {
className: "block-editor-format-toolbar__link-container-content",
url: url,
onEditLinkClick: startEditLink,
urlLabel: urlLabel
}), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
icon: link_off,
label: (0,external_wp_i18n_namespaceObject.__)('Remove link'),
onClick: onLinkRemove,
size: "compact"
})), !url && !isEditingLink && lightboxEnabled && (0,external_React_.createElement)("div", {
className: "block-editor-url-popover__expand-on-click"
}, (0,external_React_.createElement)(build_module_icon, {
icon: library_fullscreen
}), (0,external_React_.createElement)("div", {
className: "text"
}, (0,external_React_.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Expand on click')), (0,external_React_.createElement)("p", {
className: "description"
}, (0,external_wp_i18n_namespaceObject.__)('Scales the image with a lightbox effect'))), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
icon: link_off,
label: (0,external_wp_i18n_namespaceObject.__)('Disable expand on click'),
onClick: () => {
onSetLightbox(false);
},
size: "compact"
}))));
}, PopoverChildren()));
};


Expand Down Expand Up @@ -62395,12 +62412,12 @@ const DeprecatedExperimentalRecursionProvider = props => {
...props
});
};
const DeprecatedExperimentalUseHasRecursion = props => {
const DeprecatedExperimentalUseHasRecursion = (...args) => {
external_wp_deprecated_default()('wp.blockEditor.__experimentalUseHasRecursion', {
since: '6.5',
alternative: 'wp.blockEditor.useHasRecursion'
});
return useHasRecursion(...props);
return useHasRecursion(...args);
};

;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
Expand Down
4 changes: 2 additions & 2 deletions wp-includes/js/dist/block-editor.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 6df6afd

Please sign in to comment.