diff --git a/.eslintrc.js b/.eslintrc.js index 2e92b495691873..211ddd9bc35860 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -322,6 +322,7 @@ module.exports = { 'BorderBoxControl', 'BorderControl', 'BoxControl', + 'Button', 'ComboboxControl', 'CustomSelectControl', 'DimensionControl', @@ -343,7 +344,7 @@ module.exports = { selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"][value.expression.value!=false])):not(:has(JSXAttribute[name.name="size"][value.value!="default"]))`, message: componentName + - ' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', + ' should have the `__next40pxDefaultSize` prop when using the default size.', } ) ), { // Falsy `__next40pxDefaultSize` without a `render` prop. @@ -352,14 +353,6 @@ module.exports = { message: 'FormFileUpload should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', }, - // Temporary rules until all existing components have the `__next40pxDefaultSize` prop. - ...[ 'Button' ].map( ( componentName ) => ( { - // Not strict. Allows pre-existing __next40pxDefaultSize={ false } usage until they are all manually updated. - selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"]))`, - message: - componentName + - ' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', - } ) ), ], }, }, diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml index e24b30eea7ba7c..2de66f77e3918b 100644 --- a/.github/workflows/bundle-size.yml +++ b/.github/workflows/bundle-size.yml @@ -49,7 +49,7 @@ jobs: check-latest: true cache: npm - - uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c # v2.6.0 + - uses: preactjs/compressed-size-action@6fa0e7ca017120c754863b31123c5ee2860fd434 # v2.7.0 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' pattern: '{build/**/*.min.js,build/**/*.css,build-module/**/*.min.js}' diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index 917ee6144087e6..9392ba100af713 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -28,7 +28,7 @@ jobs: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Use desired version of Java - uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0 + uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 with: distribution: 'corretto' java-version: '17' diff --git a/changelog.txt b/changelog.txt index b802a88a14202c..06d92230737fc5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,342 @@ == Changelog == += 19.4.0-rc.1 = + + +## Changelog + +### Enhancements + +#### Block Library +- Added keywords to query loop block. ([65515](https://github.com/WordPress/gutenberg/pull/65515)) +- Added: DropZone when sitelogo is present. ([65596](https://github.com/WordPress/gutenberg/pull/65596)) +- Avatar: Add block example. ([65509](https://github.com/WordPress/gutenberg/pull/65509)) +- Buttons: add box-sizing:Border-box rule. ([65716](https://github.com/WordPress/gutenberg/pull/65716)) +- Comment Author Name: Add block example. ([65558](https://github.com/WordPress/gutenberg/pull/65558)) +- Comment Content: Add block example. ([65559](https://github.com/WordPress/gutenberg/pull/65559)) +- Comment Date: Add block example. ([65632](https://github.com/WordPress/gutenberg/pull/65632)) +- Comment Edit/Reply Links: Add block examples. ([65601](https://github.com/WordPress/gutenberg/pull/65601)) +- Comment Pagination: Add previous and next link block examples. ([65633](https://github.com/WordPress/gutenberg/pull/65633)) +- Comments Pagination Numbers: Add block example. ([65635](https://github.com/WordPress/gutenberg/pull/65635)) +- Comments Title: Add block example. ([65557](https://github.com/WordPress/gutenberg/pull/65557)) +- File block: Allow content only editing. ([65787](https://github.com/WordPress/gutenberg/pull/65787)) +- Navigation block: Use `apply_block_hooks_to_content()`. ([65703](https://github.com/WordPress/gutenberg/pull/65703)) +- Post Navigation Link: Add block examples. ([65552](https://github.com/WordPress/gutenberg/pull/65552)) +- Query No Results: Add block example. ([65555](https://github.com/WordPress/gutenberg/pull/65555)) +- Query Pagination Numbers: Add block example. ([65636](https://github.com/WordPress/gutenberg/pull/65636)) +- Query Pagination: Add block example. ([65556](https://github.com/WordPress/gutenberg/pull/65556)) +- Query Title: Add block example. ([65554](https://github.com/WordPress/gutenberg/pull/65554)) +- Revert: Time To Read: Add block example. ([65510](https://github.com/WordPress/gutenberg/pull/65510)) +- Table of Contents: Try maintaining block example attributes. ([65549](https://github.com/WordPress/gutenberg/pull/65549)) +- Term Description: Add block example. ([65553](https://github.com/WordPress/gutenberg/pull/65553)) +- Time To Read: Add block example. ([65512](https://github.com/WordPress/gutenberg/pull/65512)) + +#### Components +- Light branding for the reference site. ([65764](https://github.com/WordPress/gutenberg/pull/65764)) +- BorderControl: Use `__next40pxDefaultSize` prop for Reset button. ([65682](https://github.com/WordPress/gutenberg/pull/65682)) +- Composite: Always await initial render setup in unit tests. ([65823](https://github.com/WordPress/gutenberg/pull/65823)) +- DatePicker: Use compact button size. ([65653](https://github.com/WordPress/gutenberg/pull/65653)) +- Guide: Update finish button to use the new default size. ([65680](https://github.com/WordPress/gutenberg/pull/65680)) +- Navigator: Add support for exit animation. ([64777](https://github.com/WordPress/gutenberg/pull/64777)) +- Remove `useEvent` from components package. ([65388](https://github.com/WordPress/gutenberg/pull/65388)) +- Simplify MenuGroup component styles. ([65561](https://github.com/WordPress/gutenberg/pull/65561)) +- Storybook: Allow for case-agnostic filtering of icons. ([65780](https://github.com/WordPress/gutenberg/pull/65780)) +- ToggleGroupControl: Improve animation. ([65175](https://github.com/WordPress/gutenberg/pull/65175)) +- Tabs: Tweak sizing and overflow behavior of TabList. ([64371](https://github.com/WordPress/gutenberg/pull/64371)) + +#### Zoom Out +- Add prompt to zoom out separator. ([65392](https://github.com/WordPress/gutenberg/pull/65392)) +- Make sections `contentOnly` in Zoom Out. ([65396](https://github.com/WordPress/gutenberg/pull/65396)) +- Move the toggle button to before the device preview dropdown. ([65446](https://github.com/WordPress/gutenberg/pull/65446)) +- Only show zoom out inserters on block selection. ([65759](https://github.com/WordPress/gutenberg/pull/65759)) + +#### Block Editor +- Hide block transforms in contentOnly mode for non-content blocks. ([65394](https://github.com/WordPress/gutenberg/pull/65394)) +- Inserter: Always show the list of all patterns in the inserter. ([65611](https://github.com/WordPress/gutenberg/pull/65611)) +- MediaPlaceholder: Use InputControl in URL popover. ([65656](https://github.com/WordPress/gutenberg/pull/65656)) +- Use proper named `File` when uploading external images. ([65693](https://github.com/WordPress/gutenberg/pull/65693)) + +#### Data Views +- DataForm - Add combined fields support. ([65399](https://github.com/WordPress/gutenberg/pull/65399)) +- Filter UI: Remove popover max height. ([65835](https://github.com/WordPress/gutenberg/pull/65835)) +- Dataviews configuration dropdown: Remove style overrides. ([65373](https://github.com/WordPress/gutenberg/pull/65373)) + +#### Post Editor +- Edit Post: Remove unnecessary effect in `InitPatternModal`. ([65734](https://github.com/WordPress/gutenberg/pull/65734)) +- Editor: Consistent external media pre-publish image/button sizes. ([65668](https://github.com/WordPress/gutenberg/pull/65668)) + +#### Global Styles +- Editor Canvas: Tweak close button. ([65694](https://github.com/WordPress/gutenberg/pull/65694)) +- Style book: Create static categories. ([65430](https://github.com/WordPress/gutenberg/pull/65430)) + +#### Edit Mode +- Update tools menus with Write / Design order. ([65721](https://github.com/WordPress/gutenberg/pull/65721)) + +#### Select Mode +- Select Mode: Updates to the block toolbar. ([65485](https://github.com/WordPress/gutenberg/pull/65485)) +- Select Mode: Use the content-only behavior in select mode. ([65204](https://github.com/WordPress/gutenberg/pull/65204)) + +#### Icons +- Adds envelope icon. ([65638](https://github.com/WordPress/gutenberg/pull/65638)) + +#### Site Editor +- Global Styles: Remove navigator screen overrides. ([65522](https://github.com/WordPress/gutenberg/pull/65522)) +- Command Palette: "Add new page" within the site editor creates new page in site editor. ([65476](https://github.com/WordPress/gutenberg/pull/65476)) +- Update elevation in the site editor. ([65410](https://github.com/WordPress/gutenberg/pull/65410)) + +#### Block bindings +- Connected blocks, add backdrop-color. ([65233](https://github.com/WordPress/gutenberg/pull/65233)) + +#### Extensibility +- Stabilize the PreSavePost and SavePost filters. ([64198](https://github.com/WordPress/gutenberg/pull/64198)) + +#### Base Styles +- Base styles: Add type tokens. ([65418](https://github.com/WordPress/gutenberg/pull/65418)) + +#### Tools +- Composer: Allow composer/installers 2.x. ([65356](https://github.com/WordPress/gutenberg/pull/65356)) + +#### Block hooks +- Hooks: Add support for async filters and actions. ([64204](https://github.com/WordPress/gutenberg/pull/64204)) + +### New APIs + +- Revert "Make `wordpress/fields` a private package". ([65477](https://github.com/WordPress/gutenberg/pull/65477)) +- Stabilise role attribute property. ([65484](https://github.com/WordPress/gutenberg/pull/65484)) + +#### Block bindings +- Open the stable editor APIs. ([65713](https://github.com/WordPress/gutenberg/pull/65713)) + +#### Components +- Navigator: Stabilize and export APIs. ([64613](https://github.com/WordPress/gutenberg/pull/64613)) + +### Bug Fixes + +#### Components +- Block Editor: Validate options for the 'HeadingLevelDropdown' component. ([65425](https://github.com/WordPress/gutenberg/pull/65425)) +- Composite: Fix legacy implementation passing store prop. ([65821](https://github.com/WordPress/gutenberg/pull/65821)) +- Composite: Make items tabbable if active element gets removed. ([65720](https://github.com/WordPress/gutenberg/pull/65720)) +- Navigator: Fix isInitial logic. ([65527](https://github.com/WordPress/gutenberg/pull/65527)) +- Restore accidentally removed entries in changelog (components package). ([65804](https://github.com/WordPress/gutenberg/pull/65804)) +- useToolsPanel: Calculate derived state in reducer to prevent too many renders. ([65564](https://github.com/WordPress/gutenberg/pull/65564)) +- useToolsPanel: Calculate menuItems in layout effect to avoid painting intermediate state. ([65494](https://github.com/WordPress/gutenberg/pull/65494)) + +#### Zoom Out +- Fix focus loss when deleting selected block in zoom out mode. ([65761](https://github.com/WordPress/gutenberg/pull/65761)) +- Handle zoom out when changing device preview. ([65444](https://github.com/WordPress/gutenberg/pull/65444)) +- Hide Zoom Out Inserters when dragging into canvas. ([65789](https://github.com/WordPress/gutenberg/pull/65789)) +- Makes spacing consistent in zoom out vertical toolbar. ([63994](https://github.com/WordPress/gutenberg/pull/63994)) +- Remove one occurrence of the verb Toggle from Zoom out control. ([65609](https://github.com/WordPress/gutenberg/pull/65609)) +- Reset zoom out level when device type is changed. ([65652](https://github.com/WordPress/gutenberg/pull/65652)) +- Resize cover block only in normal mode. ([65731](https://github.com/WordPress/gutenberg/pull/65731)) + +#### Block Editor +- Fix unable to remove empty blocks on merge. ([65262](https://github.com/WordPress/gutenberg/pull/65262)) +- Inserter: Fix Block visibility manager. ([65700](https://github.com/WordPress/gutenberg/pull/65700)) +- Link autocompleter: Decode post title HTML entities. ([65589](https://github.com/WordPress/gutenberg/pull/65589)) +- Openverse: Prevent multiple insertions during upload. ([65719](https://github.com/WordPress/gutenberg/pull/65719)) +- Paste Handler: Try to fix pasting text with formatting. ([63779](https://github.com/WordPress/gutenberg/pull/63779)) +- Remove user-select:Text. ([65662](https://github.com/WordPress/gutenberg/pull/65662)) +- Editor: Remove edit template menu item from block settings menu in blocks outside template. ([65560](https://github.com/WordPress/gutenberg/pull/65560)) +- Top Toolbar: Show document bar when no block is selected even if block tools are expanded. ([65839](https://github.com/WordPress/gutenberg/pull/65839)) +- Revert "Allow multi-select on iOS Safari/touch devices". ([65414](https://github.com/WordPress/gutenberg/pull/65414)) + +#### Global Styles +- Avoid errors when a fontSize preset is not available. ([65791](https://github.com/WordPress/gutenberg/pull/65791)) +- Fix: Shadow/Font size preset panel crashes the editor. ([65765](https://github.com/WordPress/gutenberg/pull/65765)) +- Revert "Font Library: Group fonts by source (#63211)". ([65590](https://github.com/WordPress/gutenberg/pull/65590)) +- Tweak entity save panel button. ([65695](https://github.com/WordPress/gutenberg/pull/65695)) + +#### Block bindings +- Fix editing protected custom fields in block bindings. ([65658](https://github.com/WordPress/gutenberg/pull/65658)) +- Fix showing bindings field values in theme templates. ([65639](https://github.com/WordPress/gutenberg/pull/65639)) +- Only pass context included in `usesContext` from rich text component. ([65618](https://github.com/WordPress/gutenberg/pull/65618)) +- Use `registry` instead of `select` in `canUserEditValue`. ([65659](https://github.com/WordPress/gutenberg/pull/65659)) + +#### Block Library +- Categories block: Escape label. ([65540](https://github.com/WordPress/gutenberg/pull/65540)) +- Search block: Reset size correctly when clearing unit control. ([65468](https://github.com/WordPress/gutenberg/pull/65468)) +- Social Links: Fix block appender size. ([65769](https://github.com/WordPress/gutenberg/pull/65769)) + +#### Site Editor +- Fix: Makes edit mode selector persistent in top toolbar mode. ([65511](https://github.com/WordPress/gutenberg/pull/65511)) +- Global styles: Do not navigate twice to home screen when opening the sidebar. ([65523](https://github.com/WordPress/gutenberg/pull/65523)) +- Make resizable frame compatible with RTL languages. ([65545](https://github.com/WordPress/gutenberg/pull/65545)) +- Command Palette: Fix "Add new page" command for hybrid theme. ([65534](https://github.com/WordPress/gutenberg/pull/65534)) +- Export `useResizeObserver` React Native version directly. ([65588](https://github.com/WordPress/gutenberg/pull/65588)) +- Fix `useResizeObserver` bugs. ([65389](https://github.com/WordPress/gutenberg/pull/65389)) +- Fix aria-checked attribute not set for plugin settings buttons in Options dropdown. ([65667](https://github.com/WordPress/gutenberg/pull/65667)) +- Revert "useToolsPanel: Calculate menuItems in layout effect to avoid painting intermediate state". ([65533](https://github.com/WordPress/gutenberg/pull/65533)) + +#### Focus Mode +- Limit zoom out toggle to specific post types. ([65732](https://github.com/WordPress/gutenberg/pull/65732)) + +#### List View +- Fix miscolored icons. ([65707](https://github.com/WordPress/gutenberg/pull/65707)) + +#### Media +- Fix output buffering for cross-origin isolation. ([65701](https://github.com/WordPress/gutenberg/pull/65701)) + +#### Block Directory +- Fix downloadable block item alignment. ([65677](https://github.com/WordPress/gutenberg/pull/65677)) + +#### Typography +- Remove additional Typeset screen and surface typesets in the typography panel. ([65579](https://github.com/WordPress/gutenberg/pull/65579)) + +#### Widgets Editor +- Fixed the focus cutoff of the editor buttons in the widgets editor. ([65395](https://github.com/WordPress/gutenberg/pull/65395)) + +#### Post Editor +- Omit meta boxes on “design” type posts. ([64990](https://github.com/WordPress/gutenberg/pull/64990)) + +#### Data Views +- Fix grid layout padding on small screens. ([64878](https://github.com/WordPress/gutenberg/pull/64878)) + +#### Build Tools +- Babel preset: Add missing pkg files. ([65481](https://github.com/WordPress/gutenberg/pull/65481)) +- Temp disable test for Classic Block Media issue. ([65793](https://github.com/WordPress/gutenberg/pull/65793)) + +#### Select Mode +- Select Mode: Blocks outside the main sections root should be disabled. ([65518](https://github.com/WordPress/gutenberg/pull/65518)) +- Select Mode: Prevent the inbetween inserter from triggering within sections. ([65529](https://github.com/WordPress/gutenberg/pull/65529)) + +### Accessibility + +#### Post Editor +- Make the Settings panel toggle button show its keyboard shortcut in its tooltip. ([65322](https://github.com/WordPress/gutenberg/pull/65322)) +- Resizable Editor: Make the editor resizable with arrow keys. ([65546](https://github.com/WordPress/gutenberg/pull/65546)) + +#### Components +- ToggleGroupControl: Fix arrow key navigation in RTL. ([65735](https://github.com/WordPress/gutenberg/pull/65735)) + +#### Zoom Out +- Don't show tooltip in zoom out toggle button when showIconLabels is true. ([65573](https://github.com/WordPress/gutenberg/pull/65573)) + +#### Block Library +- Improve the Query Loop block display settings labels. ([65524](https://github.com/WordPress/gutenberg/pull/65524)) + +#### Block Editor +- Updates LayoutTypeSwitcher to use ToggleGroupControl. ([65498](https://github.com/WordPress/gutenberg/pull/65498)) + +#### Code Quality +- A11y: Move script module HTML printing to 6.7 compat. ([65620](https://github.com/WordPress/gutenberg/pull/65620)) +- Update to use a11y script module package in Core. ([65539](https://github.com/WordPress/gutenberg/pull/65539)) + +#### Site Editor +- Update icon in home button. ([65497](https://github.com/WordPress/gutenberg/pull/65497)) + +### Performance + +#### Block Library +- Script Modules: Centralize (re)registration. ([65460](https://github.com/WordPress/gutenberg/pull/65460)) + +#### Block Editor +- Remove editorMode from blockProps. ([65326](https://github.com/WordPress/gutenberg/pull/65326)) +- Move insertionPoint state to block-editor store/rename existing insertionPoint to insertionCue. ([65098](https://github.com/WordPress/gutenberg/pull/65098)) + + +### Documentation + +- Block Bindings: Add `@since` tag in bindings apis JSDocs. ([65796](https://github.com/WordPress/gutenberg/pull/65796)) +- Block Editor: Fix README for FontFamilyControl component. ([65660](https://github.com/WordPress/gutenberg/pull/65660)) +- Composite: Add "With Tooltip" storybook example. ([65817](https://github.com/WordPress/gutenberg/pull/65817)) +- DataViews documentation: Add high-level graph explaining DataViews and data sources interaction. ([65457](https://github.com/WordPress/gutenberg/pull/65457)) +- Docs/interactivity api router package readme. ([62062](https://github.com/WordPress/gutenberg/pull/62062)) +- Docs: Remove PHPDoc for non-existing parameter. ([65640](https://github.com/WordPress/gutenberg/pull/65640)) +- Navigator: Fix README heading hierarchy. ([65763](https://github.com/WordPress/gutenberg/pull/65763)) +- Packages documentation: Minor typo corrections. ([65664](https://github.com/WordPress/gutenberg/pull/65664)) +- Plugin: Fix small typo in readme.txt file. ([65634](https://github.com/WordPress/gutenberg/pull/65634)) +- RichText: Fix JSDoc block typos. ([65607](https://github.com/WordPress/gutenberg/pull/65607)) +- SelectControl: Add story for `prefix` slot. ([65730](https://github.com/WordPress/gutenberg/pull/65730)) +- Update JSDoc block for RichText package to-html-string. ([65688](https://github.com/WordPress/gutenberg/pull/65688)) +- Update block-filters.md. ([64959](https://github.com/WordPress/gutenberg/pull/64959)) +- iAPI: Refactor types and add a "Core Concepts - Using TypeScript" guide. ([64577](https://github.com/WordPress/gutenberg/pull/64577)) + +### Code Quality + +#### Components +- BorderBoxControl: Promote to stable. ([65586](https://github.com/WordPress/gutenberg/pull/65586)) +- BorderControl: Promote to stable. ([65475](https://github.com/WordPress/gutenberg/pull/65475)) +- BoxControl: Promote to stable. ([65469](https://github.com/WordPress/gutenberg/pull/65469)) +- Cleanup unused `ToggleGroupControl` configuration values. ([65456](https://github.com/WordPress/gutenberg/pull/65456)) +- Fix `useInstanceId` hook references. ([65733](https://github.com/WordPress/gutenberg/pull/65733)) +- Navigator: Internal refactor in preparation for stabilization. ([65671](https://github.com/WordPress/gutenberg/pull/65671)) +- Navigator: Mark experimental exports as deprecated. ([65802](https://github.com/WordPress/gutenberg/pull/65802)) +- SearchControl: Fix rest props mutation. ([65740](https://github.com/WordPress/gutenberg/pull/65740)) +- `ToggleGroupControl`: Clean up animation logic. ([65808](https://github.com/WordPress/gutenberg/pull/65808)) + +#### Block Editor +- Button: Add `__next40pxDefaultSize` in block-editor 6. ([65742](https://github.com/WordPress/gutenberg/pull/65742)) +- Decouple "zoom/scaling the canvas" from zoom out mode (without mode rename). ([65482](https://github.com/WordPress/gutenberg/pull/65482)) +- Don't memoize 'getContentLockingParent' and 'getParentSectionBlock' selectors. ([65649](https://github.com/WordPress/gutenberg/pull/65649)) +- Inserter: Update how we compute the actual insertion point for blocks. ([65490](https://github.com/WordPress/gutenberg/pull/65490)) +- LinkControl: Fix unneeded `props` prop. ([65650](https://github.com/WordPress/gutenberg/pull/65650)) +- Navigator: Use stable export instead of experimental export. ([65753](https://github.com/WordPress/gutenberg/pull/65753)) +- Button: Add `__next40pxDefaultSize` in dataviews, reusable-blocks, etc. ([65715](https://github.com/WordPress/gutenberg/pull/65715)) +- Fix: Button Replace remaining 40px default size violations [Block Directory]. ([65467](https://github.com/WordPress/gutenberg/pull/65467)) +- Fix: Button Replace remaining 40px default size violations [Block Editor 2]. ([65308](https://github.com/WordPress/gutenberg/pull/65308)) +- Fix: Button Replace remaining 40px default size violations [Block Editor 3]. ([65225](https://github.com/WordPress/gutenberg/pull/65225)) +- Fix: Button Replace remaining 40px default size violations [Block Editor 5]. ([65361](https://github.com/WordPress/gutenberg/pull/65361)) +- Fix: Button: Replace remaining 40px default size violation [Edit Site 1]. ([65226](https://github.com/WordPress/gutenberg/pull/65226)) +- Fix: Button: Replace remaining 40px default size violation [Edit Site 3]. ([65309](https://github.com/WordPress/gutenberg/pull/65309)) + +#### Block bindings +- Only pass `usesContext` properties to editor APIs. ([65661](https://github.com/WordPress/gutenberg/pull/65661)) +- Refactor passing select and dispatch instead of full Registry. ([65710](https://github.com/WordPress/gutenberg/pull/65710)) +- Unify logic in `getPostMetaFields` function. ([65462](https://github.com/WordPress/gutenberg/pull/65462)) + +#### Post Editor +- Customize widgets, edit post: Refactor Button to new sizes. ([65807](https://github.com/WordPress/gutenberg/pull/65807)) +- Header: Remove unused property `isZoomedOutView` in `useSelect()`. ([65628](https://github.com/WordPress/gutenberg/pull/65628)) + +#### Block Library +- Blocks: Don't memoize 'hasContentRoleAttribute' selector. ([65617](https://github.com/WordPress/gutenberg/pull/65617)) +- Blocks: Update '__experimentalHasContentRoleAttribute' deprecation. ([65616](https://github.com/WordPress/gutenberg/pull/65616)) + +#### Global Styles +- Global style revisions: Remove unnecessary `goTo` navigation call. ([65810](https://github.com/WordPress/gutenberg/pull/65810)) + +#### Site Editor +- Edit Site: Fix `useLink` prop mutation. ([65739](https://github.com/WordPress/gutenberg/pull/65739)) + +#### Data Views +- Migrate store/actions from editor package to fields package. ([65289](https://github.com/WordPress/gutenberg/pull/65289)) + + +### Tools + +#### Testing +- Block Bindings: Refactor end-to-end tests. ([65526](https://github.com/WordPress/gutenberg/pull/65526)) +- GH Actions: Run the tests against PHP 8.3. ([65357](https://github.com/WordPress/gutenberg/pull/65357)) +- Revert "Temp disable test for Classic Block Media issue.". ([65809](https://github.com/WordPress/gutenberg/pull/65809)) + +#### Build Tooling +- Composer: Prevent a lock file from being created. ([65359](https://github.com/WordPress/gutenberg/pull/65359)) +- Composer: Update minimum required PHPUnit Polyfills. ([65355](https://github.com/WordPress/gutenberg/pull/65355)) +- PHP unit tests: Remove WP_RUN_CORE_TESTS const. ([65631](https://github.com/WordPress/gutenberg/pull/65631)) +- DEWP: Check for magic comments before minification. ([65582](https://github.com/WordPress/gutenberg/pull/65582)) +- DEWP: Handle cyclical module dependencies. ([65291](https://github.com/WordPress/gutenberg/pull/65291)) +- Label enforcer: Add `Gutenberg plugin` to the list of single required labels. ([65253](https://github.com/WordPress/gutenberg/pull/65253)) + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @auareyou: Light branding for the reference site. ([65764](https://github.com/WordPress/gutenberg/pull/65764)) +- @crisbusquets: Adds envelope icon. ([65638](https://github.com/WordPress/gutenberg/pull/65638)) +- @davy440: Update block-filters.md. ([64959](https://github.com/WordPress/gutenberg/pull/64959)) +- @dhruvang21: Fix: Button Replace remaining 40px default size violations [Block Editor 2]. ([65308](https://github.com/WordPress/gutenberg/pull/65308)) +- @PARTHVATALIYA: Fix: Button Replace remaining 40px default size violations [Block Editor 5]. ([65361](https://github.com/WordPress/gutenberg/pull/65361)) +- @spadeshoe: Updates LayoutTypeSwitcher to use ToggleGroupControl. ([65498](https://github.com/WordPress/gutenberg/pull/65498)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @afercia @amitraj2203 @anomiex @auareyou @carolinan @cbravobernal @ciampo @crisbusquets @DaniGuardiola @davy440 @dhruvang21 @djcowan @draganescu @ellatrix @getdave @gigitux @hbhalodia @jameskoster @jasmussen @jeryj @jffng @jrfnl @jsnajdr @juanmaguitar @keoshi @kevin940726 @louwie17 @luisherranz @Mamaduka @manzoorwanijk @matiasbenedetto @michalczaplinski @mirka @mtias @noisysocks @oandregal @ockham @PARTHVATALIYA @peterwilsoncc @philwp @priethor @ramonjd @SantosGuillamot @shail-mehta @sirreal @Soean @spadeshoe @stokesman @swissspidy @t-hamano @talldan @tyxla @vcanales @vipul0425 @youknowriad + + = 19.3.0 = ## Changelog diff --git a/docs/reference-guides/data/data-core-editor.md b/docs/reference-guides/data/data-core-editor.md index a4c1a59f0c4231..ac3413e694877b 100644 --- a/docs/reference-guides/data/data-core-editor.md +++ b/docs/reference-guides/data/data-core-editor.md @@ -248,6 +248,12 @@ _Returns_ Returns the post type of the post currently being edited. +_Usage_ + +```js +const currentPostType = wp.data.select( 'core/editor' ).getCurrentPostType(); +``` + _Parameters_ - _state_ `Object`: Global application state. @@ -284,6 +290,24 @@ _Returns_ Returns a single attribute of the post being edited, preferring the unsaved edit if one exists, but falling back to the attribute for the last known saved state of the post. +_Usage_ + +```js +// Get specific media size based on the featured media ID +// Note: change sizes?.large for any registered size +const getFeaturedMediaUrl = useSelect( ( select ) => { + const getFeaturedMediaId = + select( 'core/editor' ).getEditedPostAttribute( 'featured_media' ); + const getMedia = select( 'core' ).getMedia( getFeaturedMediaId ); + + return ( + getMedia?.media_details?.sizes?.large?.source_url || + getMedia?.source_url || + '' + ); +}, [] ); +``` + _Parameters_ - _state_ `Object`: Global application state. @@ -1154,11 +1178,38 @@ Disables the publish sidebar. Returns an action object used in signalling that attributes of the post have been edited. +_Usage_ + +```js +// Update the post title +wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } ); +``` + +```js +// Get specific media size based on the featured media ID +// Note: change sizes?.large for any registered size +const getFeaturedMediaUrl = useSelect( ( select ) => { + const getFeaturedMediaId = + select( 'core/editor' ).getEditedPostAttribute( 'featured_media' ); + const getMedia = select( 'core' ).getMedia( getFeaturedMediaId ); + + return ( + getMedia?.media_details?.sizes?.large?.source_url || + getMedia?.source_url || + '' + ); +}, [] ); +``` + _Parameters_ - _edits_ `Object`: Post attributes to edit. - _options_ `Object`: Options for the edit. +_Returns_ + +- `Object`: Action object + ### enablePublishSidebar Enable the publish sidebar. diff --git a/package-lock.json b/package-lock.json index c13e4cf2096cd0..0de59cfd601aa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gutenberg", - "version": "19.3.0", + "version": "19.4.0-rc.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "gutenberg", - "version": "19.3.0", + "version": "19.4.0-rc.1", "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -23071,15 +23071,15 @@ } }, "node_modules/cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz", + "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==", "dev": true, "dependencies": { - "rrweb-cssom": "^0.6.0" + "rrweb-cssom": "^0.7.1" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/csstype": { @@ -23131,29 +23131,28 @@ } }, "node_modules/data-urls": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", - "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", "dev": true, "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.0" + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/data-urls/node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", "dev": true, "dependencies": { - "punycode": "^2.3.0" + "punycode": "^2.3.1" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/data-urls/node_modules/webidl-conversions": { @@ -23166,16 +23165,16 @@ } }, "node_modules/data-urls/node_modules/whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "dev": true, "dependencies": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/date-fns": { @@ -24369,27 +24368,6 @@ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "dev": true, - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/domhandler": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", @@ -29032,15 +29010,15 @@ "integrity": "sha512-fvYTvdCFOWQupGxqkahrkA+ERBuMdzkxwtUdKrxR6rmMd4Pfl+iZ1QiQYoaZ0B/v0y59MOMnz3XFUWbT50/NWA==" }, "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", "dev": true, "dependencies": { - "whatwg-encoding": "^2.0.0" + "whatwg-encoding": "^3.1.1" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/html-entities": { @@ -32169,40 +32147,38 @@ } }, "node_modules/jsdom": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", - "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "version": "25.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.1.tgz", + "integrity": "sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==", "dev": true, "dependencies": { - "abab": "^2.0.6", - "cssstyle": "^3.0.0", - "data-urls": "^4.0.0", + "cssstyle": "^4.1.0", + "data-urls": "^5.0.0", "decimal.js": "^10.4.3", - "domexception": "^4.0.0", "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.4", + "nwsapi": "^2.2.12", "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", + "rrweb-cssom": "^0.7.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", + "tough-cookie": "^5.0.0", + "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.1", - "ws": "^8.13.0", - "xml-name-validator": "^4.0.0" + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "peerDependencies": { - "canvas": "^2.5.0" + "canvas": "^2.11.2" }, "peerDependenciesMeta": { "canvas": { @@ -32219,40 +32195,54 @@ "querystring": "^0.2.0" } }, - "node_modules/jsdom/node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "node_modules/jsdom/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" + "debug": "^4.3.4" }, "engines": { - "node": ">=6" + "node": ">= 14" } }, - "node_modules/jsdom/node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "node_modules/jsdom/node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { - "punycode": "^2.3.0" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">=14" + "node": ">= 14" } }, - "node_modules/jsdom/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "node_modules/jsdom/node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, "engines": { - "node": ">= 4.0.0" + "node": ">= 14" + } + }, + "node_modules/jsdom/node_modules/tr46": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "dev": true, + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" } }, "node_modules/jsdom/node_modules/webidl-conversions": { @@ -32265,16 +32255,16 @@ } }, "node_modules/jsdom/node_modules/whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "dev": true, "dependencies": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/jsdom/node_modules/ws": { @@ -38722,9 +38712,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "version": "2.2.13", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.13.tgz", + "integrity": "sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==", "dev": true }, "node_modules/nx": { @@ -42389,12 +42379,6 @@ "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "dev": true }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, "node_modules/public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -42888,12 +42872,6 @@ "node": ">=0.4.x" } }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, "node_modules/queue": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", @@ -44948,9 +44926,9 @@ } }, "node_modules/rrweb-cssom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", - "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", + "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==", "dev": true }, "node_modules/rtlcss": { @@ -48701,6 +48679,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/tldts": { + "version": "6.1.50", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.50.tgz", + "integrity": "sha512-q9GOap6q3KCsLMdOjXhWU5jVZ8/1dIib898JBRLsN+tBhENpBDcAVQbE0epADOjw11FhQQy9AcbqKGBQPUfTQA==", + "dev": true, + "dependencies": { + "tldts-core": "^6.1.50" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.50", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.50.tgz", + "integrity": "sha512-na2EcZqmdA2iV9zHV7OHQDxxdciEpxrjbkp+aHmZgnZKHzoElLajP59np5/4+sare9fQBfixgvXKx8ev1d7ytw==", + "dev": true + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -48807,6 +48803,18 @@ "node": ">=6" } }, + "node_modules/tough-cookie": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", + "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", + "dev": true, + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -49798,16 +49806,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, "node_modules/url-template": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", @@ -50134,15 +50132,15 @@ "dev": true }, "node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dev": true, "dependencies": { - "xml-name-validator": "^4.0.0" + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/wait-port": { @@ -51756,15 +51754,15 @@ } }, "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dev": true, "dependencies": { "iconv-lite": "0.6.3" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/whatwg-fetch": { @@ -51773,12 +51771,12 @@ "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==" }, "node_modules/whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/whatwg-url": { @@ -52285,12 +52283,12 @@ "dev": true }, "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "dev": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/xmlbuilder": { @@ -52564,7 +52562,7 @@ }, "packages/a11y": { "name": "@wordpress/a11y", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -52578,7 +52576,7 @@ }, "packages/annotations": { "name": "@wordpress/annotations", - "version": "3.8.0", + "version": "3.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -52606,7 +52604,7 @@ }, "packages/api-fetch": { "name": "@wordpress/api-fetch", - "version": "7.8.0", + "version": "7.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -52620,7 +52618,7 @@ }, "packages/autop": { "name": "@wordpress/autop", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -52632,7 +52630,7 @@ }, "packages/babel-plugin-import-jsx-pragma": { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "5.8.0", + "version": "5.9.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -52645,7 +52643,7 @@ }, "packages/babel-plugin-makepot": { "name": "@wordpress/babel-plugin-makepot", - "version": "6.8.0", + "version": "6.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -52663,7 +52661,7 @@ }, "packages/babel-preset-default": { "name": "@wordpress/babel-preset-default", - "version": "8.8.0", + "version": "8.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -52686,7 +52684,7 @@ }, "packages/base-styles": { "name": "@wordpress/base-styles", - "version": "5.8.0", + "version": "5.9.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -52696,7 +52694,7 @@ }, "packages/blob": { "name": "@wordpress/blob", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -52708,7 +52706,7 @@ }, "packages/block-directory": { "name": "@wordpress/block-directory", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -52744,7 +52742,7 @@ }, "packages/block-editor": { "name": "@wordpress/block-editor", - "version": "14.3.0", + "version": "14.4.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -52843,7 +52841,7 @@ }, "packages/block-library": { "name": "@wordpress/block-library", - "version": "9.8.0", + "version": "9.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -52909,7 +52907,7 @@ }, "packages/block-serialization-default-parser": { "name": "@wordpress/block-serialization-default-parser", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -52921,7 +52919,7 @@ }, "packages/block-serialization-spec-parser": { "name": "@wordpress/block-serialization-spec-parser", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "pegjs": "^0.10.0", @@ -52934,7 +52932,7 @@ }, "packages/blocks": { "name": "@wordpress/blocks", - "version": "13.8.0", + "version": "13.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -52988,7 +52986,7 @@ }, "packages/browserslist-config": { "name": "@wordpress/browserslist-config", - "version": "6.8.0", + "version": "6.9.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -52998,7 +52996,7 @@ }, "packages/commands": { "name": "@wordpress/commands", - "version": "1.8.0", + "version": "1.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53171,7 +53169,7 @@ }, "packages/components": { "name": "@wordpress/components", - "version": "28.8.0", + "version": "28.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@ariakit/react": "^0.4.10", @@ -53291,7 +53289,7 @@ }, "packages/compose": { "name": "@wordpress/compose", - "version": "7.8.0", + "version": "7.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53328,7 +53326,7 @@ }, "packages/core-commands": { "name": "@wordpress/core-commands", - "version": "1.8.0", + "version": "1.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53357,7 +53355,7 @@ }, "packages/core-data": { "name": "@wordpress/core-data", - "version": "7.8.0", + "version": "7.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53402,7 +53400,7 @@ }, "packages/create-block": { "name": "@wordpress/create-block", - "version": "4.51.0", + "version": "4.52.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -53430,7 +53428,7 @@ }, "packages/create-block-tutorial-template": { "name": "@wordpress/create-block-tutorial-template", - "version": "4.8.0", + "version": "4.9.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -53440,7 +53438,7 @@ }, "packages/customize-widgets": { "name": "@wordpress/customize-widgets", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53478,7 +53476,7 @@ }, "packages/data": { "name": "@wordpress/data", - "version": "10.8.0", + "version": "10.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53507,7 +53505,7 @@ }, "packages/data-controls": { "name": "@wordpress/data-controls", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53525,7 +53523,7 @@ }, "packages/dataviews": { "name": "@wordpress/dataviews", - "version": "4.4.0", + "version": "4.5.0", "license": "GPL-2.0-or-later", "dependencies": { "@ariakit/react": "^0.4.10", @@ -53582,7 +53580,7 @@ }, "packages/date": { "name": "@wordpress/date", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53597,7 +53595,7 @@ }, "packages/dependency-extraction-webpack-plugin": { "name": "@wordpress/dependency-extraction-webpack-plugin", - "version": "6.8.0", + "version": "6.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -53613,7 +53611,7 @@ }, "packages/deprecated": { "name": "@wordpress/deprecated", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53626,7 +53624,7 @@ }, "packages/docgen": { "name": "@wordpress/docgen", - "version": "2.8.0", + "version": "2.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -53648,7 +53646,7 @@ }, "packages/dom": { "name": "@wordpress/dom", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53661,7 +53659,7 @@ }, "packages/dom-ready": { "name": "@wordpress/dom-ready", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -53673,7 +53671,7 @@ }, "packages/e2e-test-utils": { "name": "@wordpress/e2e-test-utils", - "version": "11.8.0", + "version": "11.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -53696,7 +53694,7 @@ }, "packages/e2e-test-utils-playwright": { "name": "@wordpress/e2e-test-utils-playwright", - "version": "1.8.0", + "version": "1.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -53724,7 +53722,7 @@ }, "packages/e2e-tests": { "name": "@wordpress/e2e-tests", - "version": "8.8.0", + "version": "8.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -53764,7 +53762,7 @@ }, "packages/edit-post": { "name": "@wordpress/edit-post", - "version": "8.8.0", + "version": "8.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53811,7 +53809,7 @@ }, "packages/edit-site": { "name": "@wordpress/edit-site", - "version": "6.8.0", + "version": "6.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53873,7 +53871,7 @@ }, "packages/edit-widgets": { "name": "@wordpress/edit-widgets", - "version": "6.8.0", + "version": "6.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53916,7 +53914,7 @@ }, "packages/editor": { "name": "@wordpress/editor", - "version": "14.8.0", + "version": "14.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53978,7 +53976,7 @@ }, "packages/element": { "name": "@wordpress/element", - "version": "6.8.0", + "version": "6.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53997,7 +53995,7 @@ }, "packages/env": { "name": "@wordpress/env", - "version": "10.8.0", + "version": "10.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54139,7 +54137,7 @@ }, "packages/escape-html": { "name": "@wordpress/escape-html", - "version": "3.8.0", + "version": "3.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -54151,7 +54149,7 @@ }, "packages/eslint-plugin": { "name": "@wordpress/eslint-plugin", - "version": "21.1.0", + "version": "21.2.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54194,7 +54192,7 @@ }, "packages/fields": { "name": "@wordpress/fields", - "version": "0.0.1", + "version": "0.1.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54230,7 +54228,7 @@ }, "packages/format-library": { "name": "@wordpress/format-library", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54258,7 +54256,7 @@ }, "packages/hooks": { "name": "@wordpress/hooks", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -54270,7 +54268,7 @@ }, "packages/html-entities": { "name": "@wordpress/html-entities", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -54282,7 +54280,7 @@ }, "packages/i18n": { "name": "@wordpress/i18n", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54302,7 +54300,7 @@ }, "packages/icons": { "name": "@wordpress/icons", - "version": "10.8.0", + "version": "10.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54316,7 +54314,7 @@ }, "packages/interactivity": { "name": "@wordpress/interactivity", - "version": "6.8.0", + "version": "6.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@preact/signals": "^1.2.2", @@ -54329,7 +54327,7 @@ }, "packages/interactivity-router": { "name": "@wordpress/interactivity-router", - "version": "2.8.0", + "version": "2.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/a11y": "file:../a11y", @@ -54366,7 +54364,7 @@ }, "packages/interface": { "name": "@wordpress/interface", - "version": "6.8.0", + "version": "6.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54395,7 +54393,7 @@ }, "packages/is-shallow-equal": { "name": "@wordpress/is-shallow-equal", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -54407,7 +54405,7 @@ }, "packages/jest-console": { "name": "@wordpress/jest-console", - "version": "8.8.0", + "version": "8.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54424,7 +54422,7 @@ }, "packages/jest-preset-default": { "name": "@wordpress/jest-preset-default", - "version": "12.8.0", + "version": "12.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54442,7 +54440,7 @@ }, "packages/jest-puppeteer-axe": { "name": "@wordpress/jest-puppeteer-axe", - "version": "7.8.0", + "version": "7.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54465,7 +54463,7 @@ }, "packages/keyboard-shortcuts": { "name": "@wordpress/keyboard-shortcuts", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54483,7 +54481,7 @@ }, "packages/keycodes": { "name": "@wordpress/keycodes", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54496,7 +54494,7 @@ }, "packages/lazy-import": { "name": "@wordpress/lazy-import", - "version": "2.8.0", + "version": "2.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54511,7 +54509,7 @@ }, "packages/list-reusable-blocks": { "name": "@wordpress/list-reusable-blocks", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54534,7 +54532,7 @@ }, "packages/media-utils": { "name": "@wordpress/media-utils", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54550,7 +54548,7 @@ }, "packages/notices": { "name": "@wordpress/notices", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54567,7 +54565,7 @@ }, "packages/npm-package-json-lint-config": { "name": "@wordpress/npm-package-json-lint-config", - "version": "5.8.0", + "version": "5.9.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -54580,7 +54578,7 @@ }, "packages/nux": { "name": "@wordpress/nux", - "version": "9.8.0", + "version": "9.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54603,7 +54601,7 @@ }, "packages/patterns": { "name": "@wordpress/patterns", - "version": "2.8.0", + "version": "2.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54633,7 +54631,7 @@ }, "packages/plugins": { "name": "@wordpress/plugins", - "version": "7.8.0", + "version": "7.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54656,7 +54654,7 @@ }, "packages/postcss-plugins-preset": { "name": "@wordpress/postcss-plugins-preset", - "version": "5.8.0", + "version": "5.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54673,7 +54671,7 @@ }, "packages/postcss-themes": { "name": "@wordpress/postcss-themes", - "version": "6.8.0", + "version": "6.9.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -54686,7 +54684,7 @@ }, "packages/preferences": { "name": "@wordpress/preferences", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54712,7 +54710,7 @@ }, "packages/preferences-persistence": { "name": "@wordpress/preferences-persistence", - "version": "2.8.0", + "version": "2.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54725,7 +54723,7 @@ }, "packages/prettier-config": { "name": "@wordpress/prettier-config", - "version": "4.8.0", + "version": "4.9.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -54738,7 +54736,7 @@ }, "packages/primitives": { "name": "@wordpress/primitives", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54755,7 +54753,7 @@ }, "packages/priority-queue": { "name": "@wordpress/priority-queue", - "version": "3.8.0", + "version": "3.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54768,7 +54766,7 @@ }, "packages/private-apis": { "name": "@wordpress/private-apis", - "version": "1.8.0", + "version": "1.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -54780,7 +54778,7 @@ }, "packages/project-management-automation": { "name": "@wordpress/project-management-automation", - "version": "2.8.0", + "version": "2.9.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54810,7 +54808,7 @@ }, "packages/react-i18n": { "name": "@wordpress/react-i18n", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54966,7 +54964,7 @@ }, "packages/readable-js-assets-webpack-plugin": { "name": "@wordpress/readable-js-assets-webpack-plugin", - "version": "3.8.0", + "version": "3.9.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -54979,7 +54977,7 @@ }, "packages/redux-routine": { "name": "@wordpress/redux-routine", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55024,7 +55022,7 @@ }, "packages/reusable-blocks": { "name": "@wordpress/reusable-blocks", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55051,7 +55049,7 @@ }, "packages/rich-text": { "name": "@wordpress/rich-text", - "version": "7.8.0", + "version": "7.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55075,7 +55073,7 @@ }, "packages/router": { "name": "@wordpress/router", - "version": "1.8.0", + "version": "1.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55094,7 +55092,7 @@ }, "packages/scripts": { "name": "@wordpress/scripts", - "version": "30.0.0", + "version": "30.1.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55549,7 +55547,7 @@ }, "packages/server-side-render": { "name": "@wordpress/server-side-render", - "version": "5.8.0", + "version": "5.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55575,7 +55573,7 @@ }, "packages/shortcode": { "name": "@wordpress/shortcode", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55588,7 +55586,7 @@ }, "packages/style-engine": { "name": "@wordpress/style-engine", - "version": "2.8.0", + "version": "2.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55601,7 +55599,7 @@ }, "packages/stylelint-config": { "name": "@wordpress/stylelint-config", - "version": "23.0.0", + "version": "23.1.0", "dev": true, "license": "MIT", "dependencies": { @@ -55719,7 +55717,7 @@ }, "packages/sync": { "name": "@wordpress/sync", - "version": "1.8.0", + "version": "1.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55740,7 +55738,7 @@ }, "packages/token-list": { "name": "@wordpress/token-list", - "version": "3.8.0", + "version": "3.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -55752,7 +55750,7 @@ }, "packages/undo-manager": { "name": "@wordpress/undo-manager", - "version": "1.8.0", + "version": "1.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55765,7 +55763,7 @@ }, "packages/url": { "name": "@wordpress/url", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55778,7 +55776,7 @@ }, "packages/viewport": { "name": "@wordpress/viewport", - "version": "6.8.0", + "version": "6.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55796,7 +55794,7 @@ }, "packages/warning": { "name": "@wordpress/warning", - "version": "3.8.0", + "version": "3.9.0", "license": "GPL-2.0-or-later", "engines": { "node": ">=18.12.0", @@ -55805,7 +55803,7 @@ }, "packages/widgets": { "name": "@wordpress/widgets", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55833,7 +55831,7 @@ }, "packages/wordcount": { "name": "@wordpress/wordcount", - "version": "4.8.0", + "version": "4.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -74397,12 +74395,12 @@ } }, "cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz", + "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==", "dev": true, "requires": { - "rrweb-cssom": "^0.6.0" + "rrweb-cssom": "^0.7.1" } }, "csstype": { @@ -74445,23 +74443,22 @@ "dev": true }, "data-urls": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", - "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", "dev": true, "requires": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.0" + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" }, "dependencies": { "tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", "dev": true, "requires": { - "punycode": "^2.3.0" + "punycode": "^2.3.1" } }, "webidl-conversions": { @@ -74471,12 +74468,12 @@ "dev": true }, "whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "dev": true, "requires": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" } } @@ -75353,23 +75350,6 @@ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" }, - "domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "dev": true, - "requires": { - "webidl-conversions": "^7.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true - } - } - }, "domhandler": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", @@ -78931,12 +78911,12 @@ "integrity": "sha512-fvYTvdCFOWQupGxqkahrkA+ERBuMdzkxwtUdKrxR6rmMd4Pfl+iZ1QiQYoaZ0B/v0y59MOMnz3XFUWbT50/NWA==" }, "html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", "dev": true, "requires": { - "whatwg-encoding": "^2.0.0" + "whatwg-encoding": "^3.1.1" } }, "html-entities": { @@ -80659,7 +80639,7 @@ "@types/node": "*", "jest-mock": "^29.6.2", "jest-util": "^29.6.2", - "jsdom": "22.1.0" + "jsdom": "25.0.1" } }, "jest-environment-node": { @@ -81206,62 +81186,71 @@ "dev": true }, "jsdom": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", - "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "version": "25.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.1.tgz", + "integrity": "sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==", "dev": true, "requires": { - "abab": "^2.0.6", - "cssstyle": "^3.0.0", - "data-urls": "^4.0.0", + "cssstyle": "^4.1.0", + "data-urls": "^5.0.0", "decimal.js": "^10.4.3", - "domexception": "^4.0.0", "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.4", + "nwsapi": "^2.2.12", "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", + "rrweb-cssom": "^0.7.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", + "tough-cookie": "^5.0.0", + "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.1", - "ws": "^8.13.0", - "xml-name-validator": "^4.0.0" + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" }, "dependencies": { - "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" + "debug": "^4.3.4" } }, - "tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "requires": { - "punycode": "^2.3.0" + "agent-base": "^7.1.0", + "debug": "^4.3.4" } }, - "universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true + "https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "4" + } + }, + "tr46": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "dev": true, + "requires": { + "punycode": "^2.3.1" + } }, "webidl-conversions": { "version": "7.0.0", @@ -81270,12 +81259,12 @@ "dev": true }, "whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "dev": true, "requires": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" } }, @@ -86290,9 +86279,9 @@ "dev": true }, "nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "version": "2.2.13", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.13.tgz", + "integrity": "sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==", "dev": true }, "nx": { @@ -88988,12 +88977,6 @@ "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "dev": true }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -89340,12 +89323,6 @@ "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", "dev": true }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, "queue": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", @@ -90925,9 +90902,9 @@ "dev": true }, "rrweb-cssom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", - "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", + "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==", "dev": true }, "rtlcss": { @@ -93779,6 +93756,21 @@ "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", "dev": true }, + "tldts": { + "version": "6.1.50", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.50.tgz", + "integrity": "sha512-q9GOap6q3KCsLMdOjXhWU5jVZ8/1dIib898JBRLsN+tBhENpBDcAVQbE0epADOjw11FhQQy9AcbqKGBQPUfTQA==", + "dev": true, + "requires": { + "tldts-core": "^6.1.50" + } + }, + "tldts-core": { + "version": "6.1.50", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.50.tgz", + "integrity": "sha512-na2EcZqmdA2iV9zHV7OHQDxxdciEpxrjbkp+aHmZgnZKHzoElLajP59np5/4+sare9fQBfixgvXKx8ev1d7ytw==", + "dev": true + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -93863,6 +93855,15 @@ "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", "dev": true }, + "tough-cookie": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", + "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", + "dev": true, + "requires": { + "tldts": "^6.1.32" + } + }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -94633,16 +94634,6 @@ } } }, - "url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, "url-template": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", @@ -94863,12 +94854,12 @@ "dev": true }, "w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dev": true, "requires": { - "xml-name-validator": "^4.0.0" + "xml-name-validator": "^5.0.0" } }, "wait-port": { @@ -96045,9 +96036,9 @@ "dev": true }, "whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dev": true, "requires": { "iconv-lite": "0.6.3" @@ -96059,9 +96050,9 @@ "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==" }, "whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true }, "whatwg-url": { @@ -96468,9 +96459,9 @@ "dev": true }, "xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "dev": true }, "xmlbuilder": { diff --git a/package.json b/package.json index 5ecd0ef57b3516..5b8af1f99e7ad9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "19.3.0", + "version": "19.4.0-rc.1", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", @@ -267,7 +267,7 @@ "worker-farm": "1.7.0" }, "overrides": { - "jsdom": "22.1.0" + "jsdom": "25.0.1" }, "scripts": { "build": "npm run build:packages && wp-scripts build", diff --git a/packages/a11y/CHANGELOG.md b/packages/a11y/CHANGELOG.md index 626488313977d1..7da784818f78c8 100644 --- a/packages/a11y/CHANGELOG.md +++ b/packages/a11y/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.9.0 (2024-10-03) + ## 4.8.0 (2024-09-19) ## 4.7.0 (2024-09-05) diff --git a/packages/a11y/package.json b/packages/a11y/package.json index d3337485a18284..e3868dca8b6baf 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/a11y", - "version": "4.8.0", + "version": "4.9.0", "description": "Accessibility (a11y) utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/annotations/CHANGELOG.md b/packages/annotations/CHANGELOG.md index 7ac3e50c3fd8b6..caf30a752bb986 100644 --- a/packages/annotations/CHANGELOG.md +++ b/packages/annotations/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.9.0 (2024-10-03) + ## 3.8.0 (2024-09-19) ## 3.7.0 (2024-09-05) diff --git a/packages/annotations/package.json b/packages/annotations/package.json index edaae0ca7617bd..ab482712954252 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/annotations", - "version": "3.8.0", + "version": "3.9.0", "description": "Annotate content in the Gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/api-fetch/CHANGELOG.md b/packages/api-fetch/CHANGELOG.md index 7c333170b6cc11..151afa5206c35c 100644 --- a/packages/api-fetch/CHANGELOG.md +++ b/packages/api-fetch/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.9.0 (2024-10-03) + ## 7.8.0 (2024-09-19) ## 7.7.0 (2024-09-05) diff --git a/packages/api-fetch/package.json b/packages/api-fetch/package.json index 54fb852a75402e..3ad4425db40309 100644 --- a/packages/api-fetch/package.json +++ b/packages/api-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/api-fetch", - "version": "7.8.0", + "version": "7.9.0", "description": "Utility to make WordPress REST API requests.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/autop/CHANGELOG.md b/packages/autop/CHANGELOG.md index 4bb494dcfff5c0..b56c0ada46a919 100644 --- a/packages/autop/CHANGELOG.md +++ b/packages/autop/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.9.0 (2024-10-03) + ## 4.8.0 (2024-09-19) ## 4.7.0 (2024-09-05) diff --git a/packages/autop/package.json b/packages/autop/package.json index 49ddffcf79f9ce..9320cfc26213aa 100644 --- a/packages/autop/package.json +++ b/packages/autop/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/autop", - "version": "4.8.0", + "version": "4.9.0", "description": "WordPress's automatic paragraph functions `autop` and `removep`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md index 5a68cf8eb40400..8f15b849096f66 100644 --- a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md +++ b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.9.0 (2024-10-03) + ## 5.8.0 (2024-09-19) ## 5.7.0 (2024-09-05) diff --git a/packages/babel-plugin-import-jsx-pragma/package.json b/packages/babel-plugin-import-jsx-pragma/package.json index d06a750eb0d91e..47ecbcccd5eb2f 100644 --- a/packages/babel-plugin-import-jsx-pragma/package.json +++ b/packages/babel-plugin-import-jsx-pragma/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "5.8.0", + "version": "5.9.0", "description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-makepot/CHANGELOG.md b/packages/babel-plugin-makepot/CHANGELOG.md index d878e1fb6b020c..d307791a37424a 100644 --- a/packages/babel-plugin-makepot/CHANGELOG.md +++ b/packages/babel-plugin-makepot/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.9.0 (2024-10-03) + ## 6.8.0 (2024-09-19) ## 6.7.0 (2024-09-05) diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json index 5c9cbb1384796b..d04a20a7164594 100644 --- a/packages/babel-plugin-makepot/package.json +++ b/packages/babel-plugin-makepot/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-makepot", - "version": "6.8.0", + "version": "6.9.0", "description": "WordPress Babel internationalization (i18n) plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-preset-default/CHANGELOG.md b/packages/babel-preset-default/CHANGELOG.md index b31be6ffd8d56d..c577d6fd038bcf 100644 --- a/packages/babel-preset-default/CHANGELOG.md +++ b/packages/babel-preset-default/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.9.0 (2024-10-03) + ### Bug Fixes - Fix a bug in 8.8.1 due to missing files in the published package ([#65481](https://github.com/WordPress/gutenberg/pull/65481)). diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index 1203586ec20292..f98ac198e22730 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-preset-default", - "version": "8.8.0", + "version": "8.9.0", "description": "Default Babel preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/base-styles/CHANGELOG.md b/packages/base-styles/CHANGELOG.md index ea6b765aea3f11..8e92ddeece4d20 100644 --- a/packages/base-styles/CHANGELOG.md +++ b/packages/base-styles/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.9.0 (2024-10-03) + ## 5.8.0 (2024-09-19) ## 5.7.0 (2024-09-05) diff --git a/packages/base-styles/package.json b/packages/base-styles/package.json index c6ab374e1f5dd3..b1da65dde47970 100644 --- a/packages/base-styles/package.json +++ b/packages/base-styles/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/base-styles", - "version": "5.8.0", + "version": "5.9.0", "description": "Base SCSS utilities and variables for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blob/CHANGELOG.md b/packages/blob/CHANGELOG.md index c13c6e6faf6ac8..1631fe7e0618b3 100644 --- a/packages/blob/CHANGELOG.md +++ b/packages/blob/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.9.0 (2024-10-03) + ## 4.8.0 (2024-09-19) ## 4.7.0 (2024-09-05) diff --git a/packages/blob/package.json b/packages/blob/package.json index cbcf04ecf64882..96d35105fc8246 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blob", - "version": "4.8.0", + "version": "4.9.0", "description": "Blob utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-directory/CHANGELOG.md b/packages/block-directory/CHANGELOG.md index 8c25431f1b5b5e..2677ce827c1d69 100644 --- a/packages/block-directory/CHANGELOG.md +++ b/packages/block-directory/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.9.0 (2024-10-03) + ## 5.8.0 (2024-09-19) ## 5.7.0 (2024-09-05) diff --git a/packages/block-directory/package.json b/packages/block-directory/package.json index 974125a5f3f2c3..b1f0aaf2a599ad 100644 --- a/packages/block-directory/package.json +++ b/packages/block-directory/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-directory", - "version": "5.8.0", + "version": "5.9.0", "description": "Extend editor with block directory features to search, download and install blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md index db61ff05e3c1ad..5e3151285966e2 100644 --- a/packages/block-editor/CHANGELOG.md +++ b/packages/block-editor/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 14.4.0 (2024-10-03) + ## 14.3.0 (2024-09-19) ## 14.2.0 (2024-09-05) diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index a135f126d7eb3c..1c6c313345d723 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-editor", - "version": "14.3.0", + "version": "14.4.0", "description": "Generic block editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-editor/src/components/block-list/content.scss b/packages/block-editor/src/components/block-list/content.scss index c5fda109d8b67d..6a88813b0c6049 100644 --- a/packages/block-editor/src/components/block-list/content.scss +++ b/packages/block-editor/src/components/block-list/content.scss @@ -91,14 +91,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b } } - // Ensure an accurate partial text selection. - // To do this, we disable text selection on the main container, then re-enable it only on the - // elements that actually get selected. - // To keep in mind: user-select is currently inherited to all nodes inside. - .has-multi-selection & { - user-select: none; - } - // Re-enable it on components inside. [class^="components-"] { user-select: text; @@ -117,11 +109,9 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b overflow-wrap: break-word; pointer-events: auto; - user-select: text; &.is-editing-disabled { pointer-events: none; - user-select: none; } &.has-negative-margin { diff --git a/packages/block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js b/packages/block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js index 01cc462e507ecf..19b778ca8fccfc 100644 --- a/packages/block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +++ b/packages/block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js @@ -10,6 +10,7 @@ import { useRefEffect } from '@wordpress/compose'; * Internal dependencies */ import { store as blockEditorStore } from '../../../store'; +import { unlock } from '../../../lock-unlock'; /** * Adds block behaviour: @@ -20,9 +21,18 @@ import { store as blockEditorStore } from '../../../store'; * @param {string} clientId Block client ID. */ export function useEventHandlers( { clientId, isSelected } ) { - const { getBlockRootClientId, getBlockIndex } = - useSelect( blockEditorStore ); - const { insertAfterBlock, removeBlock } = useDispatch( blockEditorStore ); + const { + getBlockRootClientId, + getBlockIndex, + isZoomOut, + __unstableGetEditorMode, + } = unlock( useSelect( blockEditorStore ) ); + const { + insertAfterBlock, + removeBlock, + __unstableSetEditorMode, + resetZoomLevel, + } = unlock( useDispatch( blockEditorStore ) ); return useRefEffect( ( node ) => { @@ -56,7 +66,14 @@ export function useEventHandlers( { clientId, isSelected } ) { event.preventDefault(); - if ( keyCode === ENTER ) { + if ( + keyCode === ENTER && + __unstableGetEditorMode() === 'zoom-out' && + isZoomOut() + ) { + __unstableSetEditorMode( 'edit' ); + resetZoomLevel(); + } else if ( keyCode === ENTER ) { insertAfterBlock( clientId ); } else { removeBlock( clientId ); @@ -88,6 +105,10 @@ export function useEventHandlers( { clientId, isSelected } ) { getBlockIndex, insertAfterBlock, removeBlock, + __unstableGetEditorMode, + __unstableSetEditorMode, + isZoomOut, + resetZoomLevel, ] ); } diff --git a/packages/block-editor/src/components/block-tools/index.js b/packages/block-editor/src/components/block-tools/index.js index bad331561317f8..cbcb5b8e50b09a 100644 --- a/packages/block-editor/src/components/block-tools/index.js +++ b/packages/block-editor/src/components/block-tools/index.js @@ -25,7 +25,6 @@ import usePopoverScroll from '../block-popover/use-popover-scroll'; import ZoomOutModeInserters from './zoom-out-mode-inserters'; import { useShowBlockTools } from './use-show-block-tools'; import { unlock } from '../../lock-unlock'; -import getEditorRegion from '../../utils/get-editor-region'; function selector( select ) { const { @@ -83,7 +82,6 @@ export default function BlockTools( { } = useShowBlockTools(); const { - clearSelectedBlock, duplicateBlocks, removeBlocks, replaceBlocks, @@ -95,8 +93,6 @@ export default function BlockTools( { expandBlock, } = unlock( useDispatch( blockEditorStore ) ); - const blockSelectionButtonRef = useRef(); - function onKeyDown( event ) { if ( event.defaultPrevented ) { return; @@ -157,13 +153,6 @@ export default function BlockTools( { // block so that focus is directed back to the beginning of the selection. // In effect, to the user this feels like deselecting the multi-selection. selectBlock( clientIds[ 0 ] ); - } else if ( - clientIds.length === 1 && - event.target === blockSelectionButtonRef?.current - ) { - event.preventDefault(); - clearSelectedBlock(); - getEditorRegion( __unstableContentRef.current )?.focus(); } } else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) { // If focus is currently within a text field, such as a rich text block or other editable field, diff --git a/packages/block-editor/src/components/block-tools/style.scss b/packages/block-editor/src/components/block-tools/style.scss index b7586a6715dcc6..bfb8b958f01ca6 100644 --- a/packages/block-editor/src/components/block-tools/style.scss +++ b/packages/block-editor/src/components/block-tools/style.scss @@ -201,4 +201,9 @@ background: none; border: none; } + + // Make the spacing consistent between controls. + .zoom-out-toolbar-button { + height: $button-size-next-default-40px; + } } diff --git a/packages/block-editor/src/components/block-tools/zoom-out-toolbar.js b/packages/block-editor/src/components/block-tools/zoom-out-toolbar.js index f2c073117d2ce8..2b5c6a3e3cea6e 100644 --- a/packages/block-editor/src/components/block-tools/zoom-out-toolbar.js +++ b/packages/block-editor/src/components/block-tools/zoom-out-toolbar.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { dragHandle, trash, edit } from '@wordpress/icons'; +import { dragHandle, trash } from '@wordpress/icons'; import { Button, ToolbarButton } from '@wordpress/components'; import { useSelect, useDispatch } from '@wordpress/data'; import { store as blocksStore } from '@wordpress/blocks'; @@ -15,7 +15,6 @@ import BlockDraggable from '../block-draggable'; import BlockMover from '../block-mover'; import Shuffle from '../block-toolbar/shuffle'; import NavigableToolbar from '../navigable-toolbar'; -import { unlock } from '../../lock-unlock'; export default function ZoomOutToolbar( { clientId, __unstableContentRef } ) { const selected = useSelect( @@ -74,12 +73,9 @@ export default function ZoomOutToolbar( { clientId, __unstableContentRef } ) { isPrevBlockTemplatePart, canRemove, canMove, - setIsInserterOpened, } = selected; - const { removeBlock, __unstableSetEditorMode, resetZoomLevel } = unlock( - useDispatch( blockEditorStore ) - ); + const { removeBlock } = useDispatch( blockEditorStore ); const showBlockDraggable = canMove && ! isBlockTemplatePart; @@ -123,23 +119,6 @@ export default function ZoomOutToolbar( { clientId, __unstableContentRef } ) { ) } - { ! isBlockTemplatePart && ( - { - // Setting may be undefined. - if ( typeof setIsInserterOpened === 'function' ) { - setIsInserterOpened( false ); - } - __unstableSetEditorMode( 'edit' ); - resetZoomLevel(); - __unstableContentRef.current?.focus(); - } } - /> - ) } - { canRemove && ! isBlockTemplatePart && ( ), info: __( 'Focus on content.' ), + 'aria-label': __( 'Write' ), }, { value: 'edit', @@ -88,6 +89,7 @@ function ToolSelector( props, ref ) { ), info: __( 'Edit layout and styles.' ), + 'aria-label': __( 'Design' ), }, ] } /> diff --git a/packages/block-editor/src/components/writing-flow/use-tab-nav.js b/packages/block-editor/src/components/writing-flow/use-tab-nav.js index 3788c7021fd664..216e7b6e04ad57 100644 --- a/packages/block-editor/src/components/writing-flow/use-tab-nav.js +++ b/packages/block-editor/src/components/writing-flow/use-tab-nav.js @@ -19,10 +19,17 @@ export default function useTabNav() { const focusCaptureBeforeRef = useRef(); const focusCaptureAfterRef = useRef(); - const { hasMultiSelection, getSelectedBlockClientId, getBlockCount } = - useSelect( blockEditorStore ); + const { + hasMultiSelection, + getSelectedBlockClientId, + getBlockCount, + getBlockOrder, + getLastFocus, + getSectionRootClientId, + isZoomOut, + __unstableGetEditorMode, + } = unlock( useSelect( blockEditorStore ) ); const { setLastFocus } = unlock( useDispatch( blockEditorStore ) ); - const { getLastFocus } = unlock( useSelect( blockEditorStore ) ); // Reference that holds the a flag for enabling or disabling // capturing on the focus capture elements. @@ -45,6 +52,24 @@ export default function useTabNav() { ) .focus(); } + } + // In "compose" mode without a selected ID, we want to place focus on the section root when tabbing to the canvas. + else if ( __unstableGetEditorMode() === 'zoom-out' && isZoomOut() ) { + const sectionRootClientId = getSectionRootClientId(); + const sectionBlocks = getBlockOrder( sectionRootClientId ); + + // If we have section within the section root, focus the first one. + if ( sectionBlocks.length ) { + container.current + .querySelector( `[data-block="${ sectionBlocks[ 0 ] }"]` ) + .focus(); + } + // If we don't have any section blocks, focus the section root. + else { + container.current + .querySelector( `[data-block="${ sectionRootClientId }"]` ) + .focus(); + } } else { const canvasElement = container.current.ownerDocument === event.target.ownerDocument @@ -61,7 +86,6 @@ export default function useTabNav() { const next = isBefore ? tabbables[ 0 ] : tabbables[ tabbables.length - 1 ]; - next.focus(); } } diff --git a/packages/block-library/CHANGELOG.md b/packages/block-library/CHANGELOG.md index 08accf8c36d9e5..5ffd428b6dbdcf 100644 --- a/packages/block-library/CHANGELOG.md +++ b/packages/block-library/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 9.9.0 (2024-10-03) + ## 9.8.0 (2024-09-19) ## 9.7.0 (2024-09-05) diff --git a/packages/block-library/package.json b/packages/block-library/package.json index aa9daf62dda63a..ac25e1cdb815ab 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-library", - "version": "9.8.0", + "version": "9.9.0", "description": "Block library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index 0669a082b1086f..a16d5a6c2c69c7 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -55,7 +55,6 @@ @import "./query-pagination-numbers/editor.scss"; @import "./post-featured-image/editor.scss"; @import "./post-comments-form/editor.scss"; -@import "./post-content/editor.scss"; @import "./editor-elements.scss"; :root .editor-styles-wrapper { diff --git a/packages/block-library/src/file/block.json b/packages/block-library/src/file/block.json index bf0082c576dd16..2c5e888c2aff64 100644 --- a/packages/block-library/src/file/block.json +++ b/packages/block-library/src/file/block.json @@ -16,7 +16,8 @@ "role": "local" }, "href": { - "type": "string" + "type": "string", + "role": "content" }, "fileId": { "type": "string", @@ -27,13 +28,15 @@ "fileName": { "type": "rich-text", "source": "rich-text", - "selector": "a:not([download])" + "selector": "a:not([download])", + "role": "content" }, "textLinkHref": { "type": "string", "source": "attribute", "selector": "a:not([download])", - "attribute": "href" + "attribute": "href", + "role": "content" }, "textLinkTarget": { "type": "string", @@ -48,7 +51,8 @@ "downloadButtonText": { "type": "rich-text", "source": "rich-text", - "selector": "a[download]" + "selector": "a[download]", + "role": "content" }, "displayPreview": { "type": "boolean" diff --git a/packages/block-library/src/post-content/editor.scss b/packages/block-library/src/post-content/editor.scss deleted file mode 100644 index 626774697aec5f..00000000000000 --- a/packages/block-library/src/post-content/editor.scss +++ /dev/null @@ -1,4 +0,0 @@ -// Disable text selection in the post content placeholder. -.wp-block-post-content.wp-block-post-content { - user-select: none; -} diff --git a/packages/block-library/src/post-terms/index.php b/packages/block-library/src/post-terms/index.php index 69d7b04b096b53..3e7a05f10117e4 100644 --- a/packages/block-library/src/post-terms/index.php +++ b/packages/block-library/src/post-terms/index.php @@ -24,11 +24,6 @@ function render_block_core_post_terms( $attributes, $content, $block ) { return ''; } - $post_terms = get_the_terms( $block->context['postId'], $attributes['term'] ); - if ( is_wp_error( $post_terms ) || empty( $post_terms ) ) { - return ''; - } - $classes = array( 'taxonomy-' . $attributes['term'] ); if ( isset( $attributes['textAlign'] ) ) { $classes[] = 'has-text-align-' . $attributes['textAlign']; @@ -51,13 +46,19 @@ function render_block_core_post_terms( $attributes, $content, $block ) { $suffix = '' . $attributes['suffix'] . '' . $suffix; } - return get_the_term_list( + $post_terms = get_the_term_list( $block->context['postId'], $attributes['term'], wp_kses_post( $prefix ), '' . esc_html( $separator ) . '', wp_kses_post( $suffix ) ); + + if ( is_wp_error( $post_terms ) || empty( $post_terms ) ) { + return ''; + } + + return $post_terms; } /** diff --git a/packages/block-library/src/query/edit/inspector-controls/index.js b/packages/block-library/src/query/edit/inspector-controls/index.js index 3128c3526926f9..28a6113620fb7c 100644 --- a/packages/block-library/src/query/edit/inspector-controls/index.js +++ b/packages/block-library/src/query/edit/inspector-controls/index.js @@ -211,7 +211,7 @@ export default function QueryInspectorControls( props ) { label={ __( 'Query type' ) } isBlock onChange={ ( value ) => { - setQuery( { inherit: !! value } ); + setQuery( { inherit: value === 'default' } ); } } help={ inherit @@ -222,14 +222,14 @@ export default function QueryInspectorControls( props ) { 'Display a list of posts or custom post types based on specific criteria.' ) } - value={ !! inherit } + value={ !! inherit ? 'default' : 'custom' } > diff --git a/packages/block-serialization-default-parser/CHANGELOG.md b/packages/block-serialization-default-parser/CHANGELOG.md index 47e1db147942ff..4104f5282ce3fb 100644 --- a/packages/block-serialization-default-parser/CHANGELOG.md +++ b/packages/block-serialization-default-parser/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.9.0 (2024-10-03) + ## 5.8.0 (2024-09-19) ## 5.7.0 (2024-09-05) diff --git a/packages/block-serialization-default-parser/package.json b/packages/block-serialization-default-parser/package.json index 60e638120952d8..5dabca2d129452 100644 --- a/packages/block-serialization-default-parser/package.json +++ b/packages/block-serialization-default-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-default-parser", - "version": "5.8.0", + "version": "5.9.0", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-spec-parser/CHANGELOG.md b/packages/block-serialization-spec-parser/CHANGELOG.md index 173ce09db51e2b..87c683849585e0 100644 --- a/packages/block-serialization-spec-parser/CHANGELOG.md +++ b/packages/block-serialization-spec-parser/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.9.0 (2024-10-03) + ## 5.8.0 (2024-09-19) ## 5.7.0 (2024-09-05) diff --git a/packages/block-serialization-spec-parser/package.json b/packages/block-serialization-spec-parser/package.json index ab73fa1689ad67..38469f4d295298 100644 --- a/packages/block-serialization-spec-parser/package.json +++ b/packages/block-serialization-spec-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-spec-parser", - "version": "5.8.0", + "version": "5.9.0", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blocks/CHANGELOG.md b/packages/blocks/CHANGELOG.md index 838983c17233ea..7e163fec2ad161 100644 --- a/packages/blocks/CHANGELOG.md +++ b/packages/blocks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 13.9.0 (2024-10-03) + ## 13.8.0 (2024-09-19) ## 13.7.0 (2024-09-05) diff --git a/packages/blocks/package.json b/packages/blocks/package.json index b2c24928b7c344..644e428cb686b4 100644 --- a/packages/blocks/package.json +++ b/packages/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blocks", - "version": "13.8.0", + "version": "13.9.0", "description": "Block API for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/browserslist-config/CHANGELOG.md b/packages/browserslist-config/CHANGELOG.md index cbe4763ea32706..9dae2564c1a32e 100644 --- a/packages/browserslist-config/CHANGELOG.md +++ b/packages/browserslist-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.9.0 (2024-10-03) + ## 6.8.0 (2024-09-19) ## 6.7.0 (2024-09-05) diff --git a/packages/browserslist-config/package.json b/packages/browserslist-config/package.json index cae627c406e817..0c4d314203483b 100644 --- a/packages/browserslist-config/package.json +++ b/packages/browserslist-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/browserslist-config", - "version": "6.8.0", + "version": "6.9.0", "description": "WordPress Browserslist shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/commands/CHANGELOG.md b/packages/commands/CHANGELOG.md index b8f45c79470040..2b268bd66f404e 100644 --- a/packages/commands/CHANGELOG.md +++ b/packages/commands/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.9.0 (2024-10-03) + ## 1.8.0 (2024-09-19) ## 1.7.0 (2024-09-05) diff --git a/packages/commands/package.json b/packages/commands/package.json index 769931293bd2fd..6fd5fdf9971e46 100644 --- a/packages/commands/package.json +++ b/packages/commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/commands", - "version": "1.8.0", + "version": "1.9.0", "description": "Handles the commands menu.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 4c00ea32bae2cb..f7f22160c2187b 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -4,11 +4,20 @@ ### Bug Fixes +- `PaletteEdit`: dedupe palette element slugs ([#65772](https://github.com/WordPress/gutenberg/pull/65772)). +- `RangeControl`: do not tooltip contents to the DOM when not shown ([#65875](https://github.com/WordPress/gutenberg/pull/65875)). +- `Tabs`: fix skipping indication animation glitch ([#65878](https://github.com/WordPress/gutenberg/pull/65878)). + +## 28.9.0 (2024-10-03) + +### Bug Fixes + - `ToolsPanel`: atomic one-step state update when (un)registering panels ([#65564](https://github.com/WordPress/gutenberg/pull/65564)). - `Navigator`: fix `isInitial` logic ([#65527](https://github.com/WordPress/gutenberg/pull/65527)). - `ToggleGroupControl`: Fix arrow key navigation in RTL ([#65735](https://github.com/WordPress/gutenberg/pull/65735)). - `ToggleGroupControl`: indicator doesn't jump around when the layout around it changes ([#65175](https://github.com/WordPress/gutenberg/pull/65175)). - `Composite`: fix legacy support for the store prop ([#65821](https://github.com/WordPress/gutenberg/pull/65821)). +- `Composite`: make items tabbable if active element gets removed ([#65720](https://github.com/WordPress/gutenberg/pull/65720)). ### Deprecations diff --git a/packages/components/package.json b/packages/components/package.json index 98eb4c5de0430d..0a2b7b0d0431be 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/components", - "version": "28.8.0", + "version": "28.9.0", "description": "UI components for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/components/src/composite/item.tsx b/packages/components/src/composite/item.tsx index 4a02f76039a5cf..edbf0b92e039af 100644 --- a/packages/components/src/composite/item.tsx +++ b/packages/components/src/composite/item.tsx @@ -26,5 +26,23 @@ export const CompositeItem = forwardRef< // obfuscated to discourage its use outside of the component's internals. const store = ( props.store ?? context.store ) as Ariakit.CompositeStore; - return ; + // If the active item is not connected, Composite may end up in a state + // where none of the items are tabbable. In this case, we force all items to + // be tabbable, so that as soon as an item received focus, it becomes active + // and Composite goes back to working as expected. + const tabbable = Ariakit.useStoreState( store, ( state ) => { + return ( + state?.activeId !== null && + ! store?.item( state?.activeId )?.element?.isConnected + ); + } ); + + return ( + + ); } ); diff --git a/packages/components/src/composite/stories/index.story.tsx b/packages/components/src/composite/stories/index.story.tsx index d6e4999407e993..c5518375df8a6f 100644 --- a/packages/components/src/composite/stories/index.story.tsx +++ b/packages/components/src/composite/stories/index.story.tsx @@ -13,6 +13,7 @@ import { useContext, useMemo } from '@wordpress/element'; */ import { createSlotFill, Provider as SlotFillProvider } from '../../slot-fill'; import { Composite } from '..'; +import { Tooltip } from '../../tooltip'; const meta: Meta< typeof Composite > = { title: 'Components/Composite', @@ -353,3 +354,44 @@ const Fill = ( { children } ) => { }, }, }; + +/** + * Combining the `Tooltip` and `Composite` component has a few caveats. And while there are a few ways to compose these two components, our recommendation is to render `Composite.Item` as a child of `Tooltip`. + * + * ```jsx + * // 🔴 Does not work + * + * + * + * } + * /> + * + * // 🟢 Good + * + * + * Item one + * + * + * ``` + */ +export const WithTooltips: StoryObj< typeof Composite > = { + ...Default, + args: { + ...Default.args, + children: ( + <> + + Item one + + + Item two + + + Item three + + + ), + }, +}; diff --git a/packages/components/src/composite/test/index.tsx b/packages/components/src/composite/test/index.tsx new file mode 100644 index 00000000000000..64619aaed01bd6 --- /dev/null +++ b/packages/components/src/composite/test/index.tsx @@ -0,0 +1,123 @@ +/** + * External dependencies + */ +import { queryByAttribute, render, screen } from '@testing-library/react'; +import { click, press, waitFor } from '@ariakit/test'; +import type { ComponentProps } from 'react'; + +/** + * WordPress dependencies + */ +import { useState } from '@wordpress/element'; + +/** + * Internal dependencies + */ +import { Composite } from '..'; + +// This is necessary because of how Ariakit calculates page up and +// page down. Without this, nothing has a height, and so paging up +// and down doesn't behave as expected in tests. + +let clientHeightSpy: jest.SpiedGetter< + typeof HTMLElement.prototype.clientHeight +>; + +beforeAll( () => { + clientHeightSpy = jest + .spyOn( HTMLElement.prototype, 'clientHeight', 'get' ) + .mockImplementation( function getClientHeight( this: HTMLElement ) { + if ( this.tagName === 'BODY' ) { + return window.outerHeight; + } + return 50; + } ); +} ); + +afterAll( () => { + clientHeightSpy?.mockRestore(); +} ); + +async function renderAndValidate( ...args: Parameters< typeof render > ) { + const view = render( ...args ); + await waitFor( () => { + const activeButton = queryByAttribute( + 'data-active-item', + view.baseElement, + 'true' + ); + expect( activeButton ).not.toBeNull(); + } ); + return view; +} + +function RemoveItemTest( props: ComponentProps< typeof Composite > ) { + const [ showThirdItem, setShowThirdItem ] = useState( true ); + return ( + <> + + + Item 1 + Item 2 + { showThirdItem && Item 3 } + + + + ); +} + +describe( 'Composite', () => { + it( 'should remain focusable even when there are no elements in the DOM associated with the currently active ID', async () => { + await renderAndValidate( ); + + const toggleButton = screen.getByRole( 'button', { + name: 'Toggle third item', + } ); + + await press.Tab(); + await press.Tab(); + + expect( + screen.getByRole( 'button', { name: 'Item 1' } ) + ).toHaveFocus(); + + await press.ArrowRight(); + await press.ArrowRight(); + + expect( + screen.getByRole( 'button', { name: 'Item 3' } ) + ).toHaveFocus(); + + await click( toggleButton ); + + expect( + screen.queryByRole( 'button', { name: 'Item 3' } ) + ).not.toBeInTheDocument(); + + await press.ShiftTab(); + + expect( + screen.getByRole( 'button', { name: 'Item 2' } ) + ).toHaveFocus(); + + await click( toggleButton ); + + expect( + screen.getByRole( 'button', { name: 'Item 3' } ) + ).toBeVisible(); + + await press.ShiftTab(); + + expect( + screen.getByRole( 'button', { name: 'Item 2' } ) + ).toHaveFocus(); + + await press.ArrowRight(); + + expect( + screen.getByRole( 'button', { name: 'Item 3' } ) + ).toHaveFocus(); + } ); +} ); diff --git a/packages/components/src/palette-edit/index.tsx b/packages/components/src/palette-edit/index.tsx index 601ea758b75bba..8bfcb7240b9ea4 100644 --- a/packages/components/src/palette-edit/index.tsx +++ b/packages/components/src/palette-edit/index.tsx @@ -49,7 +49,6 @@ import { kebabCase } from '../utils/strings'; import type { Color, ColorPickerPopoverProps, - Gradient, NameInputProps, OptionProps, PaletteEditListViewProps, @@ -70,6 +69,28 @@ function NameInput( { value, onChange, label }: NameInputProps ) { ); } +/* + * Deduplicates the slugs of the provided elements. + */ +export function deduplicateElementSlugs< T extends PaletteElement >( + elements: T[] +) { + const slugCounts: { [ slug: string ]: number } = {}; + + return elements.map( ( element ) => { + let newSlug: string | undefined; + + const { slug } = element; + slugCounts[ slug ] = ( slugCounts[ slug ] || 0 ) + 1; + + if ( slugCounts[ slug ] > 1 ) { + newSlug = `${ slug }-${ slugCounts[ slug ] - 1 }`; + } + + return { ...element, slug: newSlug ?? slug }; + } ); +} + /** * Returns a name and slug for a palette item. The name takes the format "Color + id". * To ensure there are no duplicate ids, this function checks all slugs. @@ -109,7 +130,7 @@ export function getNameAndSlugForPosition( }; } -function ColorPickerPopover< T extends Color | Gradient >( { +function ColorPickerPopover< T extends PaletteElement >( { isGradient, element, onChange, @@ -167,7 +188,7 @@ function ColorPickerPopover< T extends Color | Gradient >( { ); } -function Option< T extends Color | Gradient >( { +function Option< T extends PaletteElement >( { canOnlyChangeValues, element, onChange, @@ -265,7 +286,7 @@ function Option< T extends Color | Gradient >( { ); } -function PaletteEditListView< T extends Color | Gradient >( { +function PaletteEditListView< T extends PaletteElement >( { elements, onChange, canOnlyChangeValues, @@ -280,7 +301,11 @@ function PaletteEditListView< T extends Color | Gradient >( { elementsReferenceRef.current = elements; }, [ elements ] ); - const debounceOnChange = useDebounce( onChange, 100 ); + const debounceOnChange = useDebounce( + ( updatedElements: T[] ) => + onChange( deduplicateElementSlugs( updatedElements ) ), + 100 + ); return ( diff --git a/packages/components/src/palette-edit/test/index.tsx b/packages/components/src/palette-edit/test/index.tsx index 980630633b97f9..7dc00dbba22042 100644 --- a/packages/components/src/palette-edit/test/index.tsx +++ b/packages/components/src/palette-edit/test/index.tsx @@ -7,7 +7,10 @@ import { click, type, press } from '@ariakit/test'; /** * Internal dependencies */ -import PaletteEdit, { getNameAndSlugForPosition } from '..'; +import PaletteEdit, { + getNameAndSlugForPosition, + deduplicateElementSlugs, +} from '..'; import type { PaletteElement } from '../types'; const noop = () => {}; @@ -97,6 +100,52 @@ describe( 'getNameAndSlugForPosition', () => { } ); } ); +describe( 'deduplicateElementSlugs', () => { + it( 'should not change the slugs if they are unique', () => { + const elements: PaletteElement[] = [ + { + slug: 'test-color-1', + color: '#ffffff', + name: 'Test Color 1', + }, + { + slug: 'test-color-2', + color: '#1a4548', + name: 'Test Color 2', + }, + ]; + + expect( deduplicateElementSlugs( elements ) ).toEqual( elements ); + } ); + it( 'should change the slugs if they are not unique', () => { + const elements: PaletteElement[] = [ + { + slug: 'test-color-1', + color: '#ffffff', + name: 'Test Color 1', + }, + { + slug: 'test-color-1', + color: '#1a4548', + name: 'Test Color 2', + }, + ]; + + expect( deduplicateElementSlugs( elements ) ).toEqual( [ + { + slug: 'test-color-1', + color: '#ffffff', + name: 'Test Color 1', + }, + { + slug: 'test-color-1-1', + color: '#1a4548', + name: 'Test Color 2', + }, + ] ); + } ); +} ); + describe( 'PaletteEdit', () => { const defaultProps = { paletteLabel: 'Test label', diff --git a/packages/components/src/range-control/styles/range-control-styles.ts b/packages/components/src/range-control/styles/range-control-styles.ts index dae1d0de3ddb66..6e9c68ace97532 100644 --- a/packages/components/src/range-control/styles/range-control-styles.ts +++ b/packages/components/src/range-control/styles/range-control-styles.ts @@ -57,7 +57,10 @@ const wrapperMargin = ( { marks, __nextHasNoMarginBottom }: WrapperProps ) => { return ''; }; -export const Wrapper = styled.div< WrapperProps >` +export const Wrapper = styled( 'div', { + shouldForwardProp: ( prop: string ) => + ! [ 'color', '__nextHasNoMarginBottom', 'marks' ].includes( prop ), +} )< WrapperProps >` display: block; flex: 1; position: relative; @@ -261,9 +264,20 @@ export const InputRange = styled.input` `; const tooltipShow = ( { show }: TooltipProps ) => { - return css( { - opacity: show ? 1 : 0, - } ); + return css` + display: ${ show ? 'inline-block' : 'none' }; + opacity: ${ show ? 1 : 0 }; + + @media not ( prefers-reduced-motion ) { + transition: + opacity 120ms ease, + display 120ms ease allow-discrete; + } + + @starting-style { + opacity: 0; + } + `; }; const tooltipPosition = ( { position }: TooltipProps ) => { @@ -284,10 +298,8 @@ export const Tooltip = styled.span< TooltipProps >` background: rgba( 0, 0, 0, 0.8 ); border-radius: ${ CONFIG.radiusSmall }; color: white; - display: inline-block; font-size: 12px; min-width: 32px; - opacity: 0; padding: 4px 8px; pointer-events: none; position: absolute; @@ -295,11 +307,8 @@ export const Tooltip = styled.span< TooltipProps >` user-select: none; line-height: 1.4; - @media not ( prefers-reduced-motion ) { - transition: opacity 120ms ease; - } - ${ tooltipShow }; + ${ tooltipPosition }; ${ rtl( { transform: 'translateX(-50%)' }, diff --git a/packages/components/src/range-control/tooltip.tsx b/packages/components/src/range-control/tooltip.tsx index 432415086dcef9..4156c026464347 100644 --- a/packages/components/src/range-control/tooltip.tsx +++ b/packages/components/src/range-control/tooltip.tsx @@ -40,7 +40,7 @@ export default function SimpleTooltip( return ( { + if ( ! parent || ! rect ) { + return; + } + + const { scrollLeft: parentScroll } = parent; + const parentWidth = parent.getBoundingClientRect().width; + const { left: childLeft, width: childWidth } = rect; + + const parentRightEdge = parentScroll + parentWidth; + const childRightEdge = childLeft + childWidth; + const rightOverflow = childRightEdge + margin - parentRightEdge; + const leftOverflow = parentScroll - ( childLeft - margin ); + if ( leftOverflow > 0 ) { + parent.scrollLeft = parentScroll - leftOverflow; + } else if ( rightOverflow > 0 ) { + parent.scrollLeft = parentScroll + rightOverflow; + } + }, [ margin, parent, rect ] ); +} export const TabList = forwardRef< HTMLDivElement, @@ -35,44 +67,27 @@ export const TabList = forwardRef< const activeId = useStoreState( store, 'activeId' ); const selectOnMove = useStoreState( store, 'selectOnMove' ); const items = useStoreState( store, 'items' ); - const [ parent, setParent ] = useState< HTMLElement | null >(); + const [ parent, setParent ] = useState< HTMLElement >(); const refs = useMergeRefs( [ ref, setParent ] ); + const selectedRect = useTrackElementOffsetRect( + store?.item( selectedId )?.element + ); + + // Track overflow to show scroll hints. const overflow = useTrackOverflow( parent, { first: items?.at( 0 )?.element, last: items?.at( -1 )?.element, } ); - const selectedTabPosition = useTrackElementOffsetRect( - store?.item( selectedId )?.element - ); - - const [ animationEnabled, setAnimationEnabled ] = useState( false ); - useOnValueUpdate( selectedId, ( { previousValue } ) => { - if ( previousValue ) { - setAnimationEnabled( true ); - } + // Size, position, and animate the indicator. + useAnimatedOffsetRect( parent, selectedRect, { + prefix: 'selected', + dataAttribute: 'indicator-animated', + transitionEndFilter: ( event ) => event.pseudoElement === '::before', } ); // Make sure selected tab is scrolled into view. - useLayoutEffect( () => { - if ( ! parent || ! selectedTabPosition ) { - return; - } - - const { scrollLeft: parentScroll } = parent; - const parentWidth = parent.getBoundingClientRect().width; - const { left: childLeft, width: childWidth } = selectedTabPosition; - - const parentRightEdge = parentScroll + parentWidth; - const childRightEdge = childLeft + childWidth; - const rightOverflow = childRightEdge + SCROLL_MARGIN - parentRightEdge; - const leftOverflow = parentScroll - ( childLeft - SCROLL_MARGIN ); - if ( leftOverflow > 0 ) { - parent.scrollLeft = parentScroll - leftOverflow; - } else if ( rightOverflow > 0 ) { - parent.scrollLeft = parentScroll + rightOverflow; - } - }, [ parent, selectedTabPosition ] ); + useScrollRectIntoView( parent, selectedRect ); const onBlur = () => { if ( ! selectOnMove ) { @@ -97,30 +112,13 @@ export const TabList = forwardRef< { - if ( event.pseudoElement === '::before' ) { - setAnimationEnabled( false ); - } - } } - /> - } + render={ } onBlur={ onBlur } tabIndex={ -1 } { ...otherProps } - style={ { - '--indicator-top': selectedTabPosition.top, - '--indicator-right': selectedTabPosition.right, - '--indicator-left': selectedTabPosition.left, - '--indicator-width': selectedTabPosition.width, - '--indicator-height': selectedTabPosition.height, - ...otherProps.style, - } } className={ clsx( overflow.first && 'is-overflowing-first', overflow.last && 'is-overflowing-last', - animationEnabled && 'is-animation-enabled', otherProps.className ) } > diff --git a/packages/components/src/toggle-group-control/test/__snapshots__/index.tsx.snap b/packages/components/src/toggle-group-control/test/__snapshots__/index.tsx.snap index 6885263d09b23d..d2d98eaba85e6f 100644 --- a/packages/components/src/toggle-group-control/test/__snapshots__/index.tsx.snap +++ b/packages/components/src/toggle-group-control/test/__snapshots__/index.tsx.snap @@ -61,7 +61,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] = } @media not ( prefers-reduced-motion ) { - .emotion-8.is-animation-enabled::before { + .emotion-8[data-indicator-animated]::before { transition-property: transform,border-radius; transition-duration: 0.2s; transition-timing-function: ease-out; @@ -426,7 +426,7 @@ exports[`ToggleGroupControl controlled should render correctly with text options } @media not ( prefers-reduced-motion ) { - .emotion-8.is-animation-enabled::before { + .emotion-8[data-indicator-animated]::before { transition-property: transform,border-radius; transition-duration: 0.2s; transition-timing-function: ease-out; @@ -695,7 +695,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`] } @media not ( prefers-reduced-motion ) { - .emotion-8.is-animation-enabled::before { + .emotion-8[data-indicator-animated]::before { transition-property: transform,border-radius; transition-duration: 0.2s; transition-timing-function: ease-out; @@ -1054,7 +1054,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio } @media not ( prefers-reduced-motion ) { - .emotion-8.is-animation-enabled::before { + .emotion-8[data-indicator-animated]::before { transition-property: transform,border-radius; transition-duration: 0.2s; transition-timing-function: ease-out; diff --git a/packages/components/src/toggle-group-control/toggle-group-control/component.tsx b/packages/components/src/toggle-group-control/toggle-group-control/component.tsx index 5f8da76676293e..0b4c22d7df9298 100644 --- a/packages/components/src/toggle-group-control/toggle-group-control/component.tsx +++ b/packages/components/src/toggle-group-control/toggle-group-control/component.tsx @@ -6,7 +6,7 @@ import type { ForwardedRef } from 'react'; /** * WordPress dependencies */ -import { useLayoutEffect, useMemo, useState } from '@wordpress/element'; +import { useMemo, useState } from '@wordpress/element'; /** * Internal dependencies @@ -21,67 +21,8 @@ import * as styles from './styles'; import { ToggleGroupControlAsRadioGroup } from './as-radio-group'; import { ToggleGroupControlAsButtonGroup } from './as-button-group'; import { useTrackElementOffsetRect } from '../../utils/element-rect'; -import { useOnValueUpdate } from '../../utils/hooks/use-on-value-update'; -import { useEvent, useMergeRefs } from '@wordpress/compose'; - -/** - * A utility used to animate something (e.g. an indicator for the selected option - * of a component). - * - * It works by tracking the position and size (i.e., the "rect") of a given subelement, - * typically the one that corresponds to the selected option, relative to its offset - * parent. Then it: - * - * - Keeps CSS variables with that information in the parent, so that the animation - * can be implemented with them. - * - Adds a `is-animation-enabled` CSS class when the element changes, so that the - * target (e.g. the indicator) can be animated to its new position. - * - Removes the `is-animation-enabled` class when the animation is done. - */ -function useSubelementAnimation( - subelement?: HTMLElement | null, - { - parent = subelement?.offsetParent as HTMLElement | null | undefined, - prefix = 'subelement', - transitionEndFilter, - }: { - parent?: HTMLElement | null | undefined; - prefix?: string; - transitionEndFilter?: ( event: TransitionEvent ) => boolean; - } = {} -) { - const rect = useTrackElementOffsetRect( subelement ); - - const setProperties = useEvent( () => { - ( Object.keys( rect ) as Array< keyof typeof rect > ).forEach( - ( property ) => - property !== 'element' && - parent?.style.setProperty( - `--${ prefix }-${ property }`, - String( rect[ property ] ) - ) - ); - } ); - useLayoutEffect( () => { - setProperties(); - }, [ rect, setProperties ] ); - useOnValueUpdate( rect.element, ( { previousValue } ) => { - // Only enable the animation when moving from one element to another. - if ( rect.element && previousValue ) { - parent?.classList.add( 'is-animation-enabled' ); - } - } ); - useLayoutEffect( () => { - function onTransitionEnd( event: TransitionEvent ) { - if ( transitionEndFilter?.( event ) ?? true ) { - parent?.classList.remove( 'is-animation-enabled' ); - } - } - parent?.addEventListener( 'transitionend', onTransitionEnd ); - return () => - parent?.removeEventListener( 'transitionend', onTransitionEnd ); - }, [ parent, transitionEndFilter ] ); -} +import { useMergeRefs } from '@wordpress/compose'; +import { useAnimatedOffsetRect } from '../../utils/hooks/use-animated-offset-rect'; function UnconnectedToggleGroupControl( props: WordPressComponentProps< ToggleGroupControlProps, 'div', false >, @@ -110,9 +51,12 @@ function UnconnectedToggleGroupControl( const [ selectedElement, setSelectedElement ] = useState< HTMLElement >(); const [ controlElement, setControlElement ] = useState< HTMLElement >(); const refs = useMergeRefs( [ setControlElement, forwardedRef ] ); - useSubelementAnimation( value ? selectedElement : undefined, { - parent: controlElement, + const selectedRect = useTrackElementOffsetRect( + value ? selectedElement : undefined + ); + useAnimatedOffsetRect( controlElement, selectedRect, { prefix: 'selected', + dataAttribute: 'indicator-animated', transitionEndFilter: ( event ) => event.pseudoElement === '::before', } ); diff --git a/packages/components/src/toggle-group-control/toggle-group-control/styles.ts b/packages/components/src/toggle-group-control/toggle-group-control/styles.ts index ee6122126f557f..bb6efe476b2b2c 100644 --- a/packages/components/src/toggle-group-control/toggle-group-control/styles.ts +++ b/packages/components/src/toggle-group-control/toggle-group-control/styles.ts @@ -28,7 +28,7 @@ export const toggleGroupControl = ( { ${ ! isDeselectable && enclosingBorders( isBlock ) } @media not ( prefers-reduced-motion ) { - &.is-animation-enabled::before { + &[data-indicator-animated]::before { transition-property: transform, border-radius; transition-duration: 0.2s; transition-timing-function: ease-out; diff --git a/packages/components/src/utils/hooks/use-animated-offset-rect.ts b/packages/components/src/utils/hooks/use-animated-offset-rect.ts new file mode 100644 index 00000000000000..4056089738fe99 --- /dev/null +++ b/packages/components/src/utils/hooks/use-animated-offset-rect.ts @@ -0,0 +1,107 @@ +/* eslint-disable jsdoc/require-param */ + +/** + * WordPress dependencies + */ +import { useEvent } from '@wordpress/compose'; +import { useLayoutEffect } from '@wordpress/element'; +/** + * Internal dependencies + */ +import type { ElementOffsetRect } from '../element-rect'; +import { useOnValueUpdate } from './use-on-value-update'; + +/** + * A utility used to animate something in a container component based on the "offset + * rect" (position relative to the container and size) of a subelement. For example, + * this is useful to render an indicator for the selected option of a component, and + * to animate it when the selected option changes. + * + * Takes in a container element and the up-to-date "offset rect" of the target + * subelement, obtained with `useTrackElementOffsetRect`. Then it does the following: + * + * - Adds CSS variables with rect information to the container, so that the indicator + * can be rendered and animated with them. These are kept up-to-date, enabling CSS + * transitions on change. + * - Sets an attribute (`data-subelement-animated` by default) when the tracked + * element changes, so that the target (e.g. the indicator) can be animated to its + * new size and position. + * - Removes the attribute when the animation is done. + * + * The need for the attribute is due to the fact that the rect might update in + * situations other than when the tracked element changes, e.g. the tracked element + * might be resized. In such cases, there is no need to animate the indicator, and + * the change in size or position of the indicator needs to be reflected immediately. + */ +export function useAnimatedOffsetRect( + /** + * The container element. + */ + container: HTMLElement | undefined, + /** + * The rect of the tracked element. + */ + rect: ElementOffsetRect, + { + prefix = 'subelement', + dataAttribute = `${ prefix }-animated`, + transitionEndFilter = () => true, + }: { + /** + * The prefix used for the CSS variables, e.g. if `prefix` is `selected`, the + * CSS variables will be `--selected-top`, `--selected-left`, etc. + * @default 'subelement' + */ + prefix?: string; + /** + * The name of the data attribute used to indicate that the animation is in + * progress. The `data-` prefix is added automatically. + * + * For example, if `dataAttribute` is `indicator-animated`, the attribute will + * be `data-indicator-animated`. + * @default `${ prefix }-animated` + */ + dataAttribute?: string; + /** + * A function that is called with the transition event and returns a boolean + * indicating whether the animation should be stopped. The default is a function + * that always returns `true`. + * + * For example, if the animated element is the `::before` pseudo-element, the + * function can be written as `( event ) => event.pseudoElement === '::before'`. + * @default () => true + */ + transitionEndFilter?: ( event: TransitionEvent ) => boolean; + } = {} +) { + const setProperties = useEvent( () => { + ( Object.keys( rect ) as Array< keyof typeof rect > ).forEach( + ( property ) => + property !== 'element' && + container?.style.setProperty( + `--${ prefix }-${ property }`, + String( rect[ property ] ) + ) + ); + } ); + useLayoutEffect( () => { + setProperties(); + }, [ rect, setProperties ] ); + useOnValueUpdate( rect.element, ( { previousValue } ) => { + // Only enable the animation when moving from one element to another. + if ( rect.element && previousValue ) { + container?.setAttribute( `data-${ dataAttribute }`, '' ); + } + } ); + useLayoutEffect( () => { + function onTransitionEnd( event: TransitionEvent ) { + if ( transitionEndFilter( event ) ) { + container?.removeAttribute( `data-${ dataAttribute }` ); + } + } + container?.addEventListener( 'transitionend', onTransitionEnd ); + return () => + container?.removeEventListener( 'transitionend', onTransitionEnd ); + }, [ dataAttribute, container, transitionEndFilter ] ); +} +/* eslint-enable jsdoc/require-param */ diff --git a/packages/compose/CHANGELOG.md b/packages/compose/CHANGELOG.md index 28269dca692a4f..e94eed5a08677b 100644 --- a/packages/compose/CHANGELOG.md +++ b/packages/compose/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.9.0 (2024-10-03) + ### Bug Fixes - `useResizeObserver`: export legacy API at top-level for React Native ([#65588](https://github.com/WordPress/gutenberg/pull/65588)). diff --git a/packages/compose/package.json b/packages/compose/package.json index f52ac9956a75c1..83ffd1d2b364f1 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/compose", - "version": "7.8.0", + "version": "7.9.0", "description": "WordPress higher-order components (HOCs).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-commands/CHANGELOG.md b/packages/core-commands/CHANGELOG.md index 2d8d93373f4c5e..bd259351a87999 100644 --- a/packages/core-commands/CHANGELOG.md +++ b/packages/core-commands/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.9.0 (2024-10-03) + ## 1.8.0 (2024-09-19) ## 1.7.0 (2024-09-05) diff --git a/packages/core-commands/package.json b/packages/core-commands/package.json index a2d3c76ebe5d9c..1eed9f5348145a 100644 --- a/packages/core-commands/package.json +++ b/packages/core-commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-commands", - "version": "1.8.0", + "version": "1.9.0", "description": "WordPress core reusable commands.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-data/CHANGELOG.md b/packages/core-data/CHANGELOG.md index fcedd5d1100661..8a59c811840357 100644 --- a/packages/core-data/CHANGELOG.md +++ b/packages/core-data/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.9.0 (2024-10-03) + ## 7.8.0 (2024-09-19) ## 7.7.0 (2024-09-05) diff --git a/packages/core-data/package.json b/packages/core-data/package.json index b0eadbcea26039..4037bd577c3233 100644 --- a/packages/core-data/package.json +++ b/packages/core-data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-data", - "version": "7.8.0", + "version": "7.9.0", "description": "Access to and manipulation of core WordPress entities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-interactive-template/package.json b/packages/create-block-interactive-template/package.json index ad30a4b7e01955..e8b38dab906cca 100644 --- a/packages/create-block-interactive-template/package.json +++ b/packages/create-block-interactive-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-interactive-template", - "version": "2.8.0", + "version": "2.9.0", "description": "Template for @wordpress/create-block to create interactive blocks with the Interactivity API.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-tutorial-template/CHANGELOG.md b/packages/create-block-tutorial-template/CHANGELOG.md index e93bc0270ba953..9be4223c70f383 100644 --- a/packages/create-block-tutorial-template/CHANGELOG.md +++ b/packages/create-block-tutorial-template/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.9.0 (2024-10-03) + ## 4.8.0 (2024-09-19) ## 4.7.0 (2024-09-05) diff --git a/packages/create-block-tutorial-template/package.json b/packages/create-block-tutorial-template/package.json index 67b0c9554ed988..9eceb95dda83c5 100644 --- a/packages/create-block-tutorial-template/package.json +++ b/packages/create-block-tutorial-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-tutorial-template", - "version": "4.8.0", + "version": "4.9.0", "description": "This is a template for @wordpress/create-block that creates an example 'Copyright Date' block. This block is used in the official WordPress block development Quick Start Guide.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index d3a8c1c75dd3fb..db161872fb9828 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.52.0 (2024-10-03) + ## 4.51.0 (2024-09-19) ## 4.50.0 (2024-09-05) diff --git a/packages/create-block/package.json b/packages/create-block/package.json index e1522c887deef8..7c31cb57687f00 100644 --- a/packages/create-block/package.json +++ b/packages/create-block/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block", - "version": "4.51.0", + "version": "4.52.0", "description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/customize-widgets/CHANGELOG.md b/packages/customize-widgets/CHANGELOG.md index 061b656c892c79..46064bac3391ec 100644 --- a/packages/customize-widgets/CHANGELOG.md +++ b/packages/customize-widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.9.0 (2024-10-03) + ## 5.8.0 (2024-09-19) ## 5.7.0 (2024-09-05) diff --git a/packages/customize-widgets/package.json b/packages/customize-widgets/package.json index 05edab039844b5..7231de9ac1b18f 100644 --- a/packages/customize-widgets/package.json +++ b/packages/customize-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/customize-widgets", - "version": "5.8.0", + "version": "5.9.0", "description": "Widgets blocks in Customizer Module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data-controls/CHANGELOG.md b/packages/data-controls/CHANGELOG.md index 3d16450a7825b4..6e70039bc74765 100644 --- a/packages/data-controls/CHANGELOG.md +++ b/packages/data-controls/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.9.0 (2024-10-03) + ## 4.8.0 (2024-09-19) ## 4.7.0 (2024-09-05) diff --git a/packages/data-controls/package.json b/packages/data-controls/package.json index 5d4d06d3c13cd8..cf4aab46c6daee 100644 --- a/packages/data-controls/package.json +++ b/packages/data-controls/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data-controls", - "version": "4.8.0", + "version": "4.9.0", "description": "A set of common controls for the @wordpress/data api.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data/CHANGELOG.md b/packages/data/CHANGELOG.md index f9ebf9eb17a68c..71db937ed73b48 100644 --- a/packages/data/CHANGELOG.md +++ b/packages/data/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 10.9.0 (2024-10-03) + ## 10.8.0 (2024-09-19) ## 10.7.0 (2024-09-05) diff --git a/packages/data/package.json b/packages/data/package.json index 11396fe33e0876..7ba4efc4592254 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data", - "version": "10.8.0", + "version": "10.9.0", "description": "Data module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dataviews/CHANGELOG.md b/packages/dataviews/CHANGELOG.md index 6ce337d726e083..7569cfb93ac0b6 100644 --- a/packages/dataviews/CHANGELOG.md +++ b/packages/dataviews/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.5.0 (2024-10-03) + ## 4.4.0 (2024-09-19) ## 4.3.0 (2024-09-05) diff --git a/packages/dataviews/package.json b/packages/dataviews/package.json index 6265d88a4ad82f..d5b465a3f7b2de 100644 --- a/packages/dataviews/package.json +++ b/packages/dataviews/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dataviews", - "version": "4.4.0", + "version": "4.5.0", "description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dataviews/src/components/dataviews-filters/style.scss b/packages/dataviews/src/components/dataviews-filters/style.scss index ad834fb224e2e4..130ef8872615a5 100644 --- a/packages/dataviews/src/components/dataviews-filters/style.scss +++ b/packages/dataviews/src/components/dataviews-filters/style.scss @@ -160,7 +160,6 @@ } .dataviews-filters__search-widget-listbox { - max-height: $grid-unit * 23; padding: $grid-unit-05; overflow: auto; } diff --git a/packages/date/CHANGELOG.md b/packages/date/CHANGELOG.md index 8c28ff83d53ed8..01e9cdc76984c8 100644 --- a/packages/date/CHANGELOG.md +++ b/packages/date/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.9.0 (2024-10-03) + ## 5.8.0 (2024-09-19) ## 5.7.0 (2024-09-05) diff --git a/packages/date/package.json b/packages/date/package.json index ad957a6393e1c8..3023e0cba30e51 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/date", - "version": "5.8.0", + "version": "5.9.0", "description": "Date module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dependency-extraction-webpack-plugin/CHANGELOG.md b/packages/dependency-extraction-webpack-plugin/CHANGELOG.md index 7c8f74d2906fed..c9d127e899fd73 100644 --- a/packages/dependency-extraction-webpack-plugin/CHANGELOG.md +++ b/packages/dependency-extraction-webpack-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.9.0 (2024-10-03) + ### Enhancements - Detection of magic comments is now done before minification ([#65582](https://github.com/WordPress/gutenberg/pull/65582)). diff --git a/packages/dependency-extraction-webpack-plugin/package.json b/packages/dependency-extraction-webpack-plugin/package.json index a9368e1eb18259..2eb71b69864232 100644 --- a/packages/dependency-extraction-webpack-plugin/package.json +++ b/packages/dependency-extraction-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dependency-extraction-webpack-plugin", - "version": "6.8.0", + "version": "6.9.0", "description": "Extract WordPress script dependencies from webpack bundles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/deprecated/CHANGELOG.md b/packages/deprecated/CHANGELOG.md index 945bf44ad6a653..0fb389ad15d7e1 100644 --- a/packages/deprecated/CHANGELOG.md +++ b/packages/deprecated/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.9.0 (2024-10-03) + ## 4.8.0 (2024-09-19) ## 4.7.0 (2024-09-05) diff --git a/packages/deprecated/package.json b/packages/deprecated/package.json index 245d459fb842e5..2c7d69a11ea921 100644 --- a/packages/deprecated/package.json +++ b/packages/deprecated/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/deprecated", - "version": "4.8.0", + "version": "4.9.0", "description": "Deprecation utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/docgen/CHANGELOG.md b/packages/docgen/CHANGELOG.md index 3e966fc4518d75..d01b1f9a9f62d7 100644 --- a/packages/docgen/CHANGELOG.md +++ b/packages/docgen/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.9.0 (2024-10-03) + ## 2.8.0 (2024-09-19) ## 2.7.0 (2024-09-05) diff --git a/packages/docgen/package.json b/packages/docgen/package.json index 9bd4581859193f..2829246f9e4309 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/docgen", - "version": "2.8.0", + "version": "2.9.0", "description": "Autogenerate public API documentation from exports and JSDoc comments.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom-ready/CHANGELOG.md b/packages/dom-ready/CHANGELOG.md index 265e7b5947061a..a14e6185202376 100644 --- a/packages/dom-ready/CHANGELOG.md +++ b/packages/dom-ready/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.9.0 (2024-10-03) + ## 4.8.0 (2024-09-19) ## 4.7.0 (2024-09-05) diff --git a/packages/dom-ready/package.json b/packages/dom-ready/package.json index 9f4ffbcf61e410..56913124da79f3 100644 --- a/packages/dom-ready/package.json +++ b/packages/dom-ready/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom-ready", - "version": "4.8.0", + "version": "4.9.0", "description": "Execute callback after the DOM is loaded.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom/CHANGELOG.md b/packages/dom/CHANGELOG.md index 77f85a59cada84..e5c95089da8c36 100644 --- a/packages/dom/CHANGELOG.md +++ b/packages/dom/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.9.0 (2024-10-03) + ## 4.8.0 (2024-09-19) ## 4.7.0 (2024-09-05) diff --git a/packages/dom/package.json b/packages/dom/package.json index 6707de05992697..c80beed815ea90 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom", - "version": "4.8.0", + "version": "4.9.0", "description": "DOM utilities module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils-playwright/CHANGELOG.md b/packages/e2e-test-utils-playwright/CHANGELOG.md index b53821f46eefef..0c1833eed08495 100644 --- a/packages/e2e-test-utils-playwright/CHANGELOG.md +++ b/packages/e2e-test-utils-playwright/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.9.0 (2024-10-03) + ## 1.8.0 (2024-09-19) ## 1.7.0 (2024-09-05) diff --git a/packages/e2e-test-utils-playwright/package.json b/packages/e2e-test-utils-playwright/package.json index f8e31ddc3c359a..ebec29be94c89d 100644 --- a/packages/e2e-test-utils-playwright/package.json +++ b/packages/e2e-test-utils-playwright/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils-playwright", - "version": "1.8.0", + "version": "1.9.0", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils-playwright/src/editor/index.ts b/packages/e2e-test-utils-playwright/src/editor/index.ts index c222f68aecc90a..4ed32134f0979a 100644 --- a/packages/e2e-test-utils-playwright/src/editor/index.ts +++ b/packages/e2e-test-utils-playwright/src/editor/index.ts @@ -28,6 +28,7 @@ import { saveSiteEditorEntities } from './site-editor'; import { setIsFixedToolbar } from './set-is-fixed-toolbar'; import { switchToLegacyCanvas } from './switch-to-legacy-canvas'; import { transformBlockTo } from './transform-block-to'; +import { switchEditorTool } from './switch-editor-tool'; type EditorConstructorProps = { page: Page; @@ -84,6 +85,8 @@ export class Editor { /** @borrows setIsFixedToolbar as this.setIsFixedToolbar */ setIsFixedToolbar: typeof setIsFixedToolbar = setIsFixedToolbar.bind( this ); + /** @borrows switchEditorTool as this.switchEditorTool */ + switchEditorTool: typeof switchEditorTool = switchEditorTool.bind( this ); /** @borrows switchToLegacyCanvas as this.switchToLegacyCanvas */ switchToLegacyCanvas: typeof switchToLegacyCanvas = switchToLegacyCanvas.bind( this ); diff --git a/packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts b/packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts new file mode 100644 index 00000000000000..67894abe0dcf7f --- /dev/null +++ b/packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts @@ -0,0 +1,34 @@ +/** + * Internal dependencies + */ +import type { Editor } from './index'; + +/** + * Switch the editor tool being used. + * + * @param this + * @param label The text string of the button label. + */ +export async function switchEditorTool( this: Editor, label: string ) { + const toolsToolbar = this.page.getByRole( 'toolbar', { + name: 'Document tools', + } ); + await toolsToolbar + .getByRole( 'button', { + name: 'Tools', + } ) + .click(); + const menu = this.page.getByRole( 'menu', { + name: 'Tools', + } ); + await menu + .getByRole( 'menuitemradio', { + name: label, + } ) + .click(); + await toolsToolbar + .getByRole( 'button', { + name: 'Tools', + } ) + .click(); +} diff --git a/packages/e2e-test-utils/CHANGELOG.md b/packages/e2e-test-utils/CHANGELOG.md index 98c17f5b6ecb01..8a00b87a34dfd9 100644 --- a/packages/e2e-test-utils/CHANGELOG.md +++ b/packages/e2e-test-utils/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 11.9.0 (2024-10-03) + ## 11.8.0 (2024-09-19) ## 11.7.0 (2024-09-05) diff --git a/packages/e2e-test-utils/package.json b/packages/e2e-test-utils/package.json index eeb0e66cb62a78..a91938f54dd52c 100644 --- a/packages/e2e-test-utils/package.json +++ b/packages/e2e-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils", - "version": "11.8.0", + "version": "11.9.0", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-tests/CHANGELOG.md b/packages/e2e-tests/CHANGELOG.md index 3fe696deaabb53..9d94db55206f10 100644 --- a/packages/e2e-tests/CHANGELOG.md +++ b/packages/e2e-tests/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.9.0 (2024-10-03) + ## 8.8.0 (2024-09-19) ## 8.7.0 (2024-09-05) diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index 2ce38150c96a00..714542e115c823 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-tests", - "version": "8.8.0", + "version": "8.9.0", "description": "End-To-End (E2E) tests for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-post/CHANGELOG.md b/packages/edit-post/CHANGELOG.md index 3eb52f26e65012..41a960ee4e5d27 100644 --- a/packages/edit-post/CHANGELOG.md +++ b/packages/edit-post/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.9.0 (2024-10-03) + ## 8.8.0 (2024-09-19) ## 8.7.0 (2024-09-05) diff --git a/packages/edit-post/package.json b/packages/edit-post/package.json index 1e5cbb13892a17..dd2eaa5115bafb 100644 --- a/packages/edit-post/package.json +++ b/packages/edit-post/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-post", - "version": "8.8.0", + "version": "8.9.0", "description": "Edit Post module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-site/CHANGELOG.md b/packages/edit-site/CHANGELOG.md index b14fb6dcd6d3e8..e2a728b3fc9ce9 100644 --- a/packages/edit-site/CHANGELOG.md +++ b/packages/edit-site/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.9.0 (2024-10-03) + ## 6.8.0 (2024-09-19) ## 6.7.0 (2024-09-05) diff --git a/packages/edit-site/package.json b/packages/edit-site/package.json index ef1cdaaa6a5c76..bd86d74c686801 100644 --- a/packages/edit-site/package.json +++ b/packages/edit-site/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-site", - "version": "6.8.0", + "version": "6.9.0", "description": "Edit Site Page module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-site/src/components/global-styles/font-sizes/font-size.js b/packages/edit-site/src/components/global-styles/font-sizes/font-size.js index 63310203ef05b1..b99703d39c8d62 100644 --- a/packages/edit-site/src/components/global-styles/font-sizes/font-size.js +++ b/packages/edit-site/src/components/global-styles/font-sizes/font-size.js @@ -197,7 +197,11 @@ function FontSize() { - + diff --git a/packages/edit-widgets/CHANGELOG.md b/packages/edit-widgets/CHANGELOG.md index 6115fc42560f82..80fde2bfec86e7 100644 --- a/packages/edit-widgets/CHANGELOG.md +++ b/packages/edit-widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.9.0 (2024-10-03) + ## 6.8.0 (2024-09-19) ## 6.7.0 (2024-09-05) diff --git a/packages/edit-widgets/package.json b/packages/edit-widgets/package.json index f0cc613aa40fc2..e9d0f18df460a6 100644 --- a/packages/edit-widgets/package.json +++ b/packages/edit-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-widgets", - "version": "6.8.0", + "version": "6.9.0", "description": "Widgets Page module for WordPress..", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index 6f31c1735021f6..dbd2884ab88560 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 14.9.0 (2024-10-03) + ## 14.8.0 (2024-09-19) ## 14.7.0 (2024-09-05) diff --git a/packages/editor/package.json b/packages/editor/package.json index 29cbffcfb72221..8781b0b992d94f 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/editor", - "version": "14.8.0", + "version": "14.9.0", "description": "Enhanced block editor for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/editor/src/components/header/index.js b/packages/editor/src/components/header/index.js index f49ada48997ce5..631643f26d4d5f 100644 --- a/packages/editor/src/components/header/index.js +++ b/packages/editor/src/components/header/index.js @@ -1,6 +1,7 @@ /** * WordPress dependencies */ +import { store as blockEditorStore } from '@wordpress/block-editor'; import { useSelect } from '@wordpress/data'; import { useMediaQuery, useViewportMatch } from '@wordpress/compose'; import { __unstableMotion as motion } from '@wordpress/components'; @@ -52,12 +53,13 @@ function Header( { const isLargeViewport = useViewportMatch( 'medium' ); const isTooNarrowForDocumentBar = useMediaQuery( '(max-width: 403px)' ); const { + postType, isTextEditor, isPublishSidebarOpened, showIconLabels, hasFixedToolbar, + hasBlockSelection, isNestedEntity, - postType, } = useSelect( ( select ) => { const { get: getPreference } = select( preferencesStore ); const { @@ -73,6 +75,8 @@ function Header( { isPublishSidebarOpened: _isPublishSidebarOpened(), showIconLabels: getPreference( 'core', 'showIconLabels' ), hasFixedToolbar: getPreference( 'core', 'fixedToolbar' ), + hasBlockSelection: + !! select( blockEditorStore ).getBlockSelectionStart(), isNestedEntity: !! getEditorSettings().onNavigateToPreviousEntityRecord, }; @@ -85,7 +89,9 @@ function Header( { const [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] = useState( true ); - const hasCenter = isBlockToolsCollapsed && ! isTooNarrowForDocumentBar; + const hasCenter = + ( ! hasBlockSelection || isBlockToolsCollapsed ) && + ! isTooNarrowForDocumentBar; const hasBackButton = useHasBackButton(); /* * The edit-post-header classname is only kept for backward compatability diff --git a/packages/editor/src/components/post-template/classic-theme.js b/packages/editor/src/components/post-template/classic-theme.js index 8127a18909f5cc..4a65a9b4c75636 100644 --- a/packages/editor/src/components/post-template/classic-theme.js +++ b/packages/editor/src/components/post-template/classic-theme.js @@ -177,8 +177,7 @@ function PostTemplateDropdownContent( { onClose } ) { { canEdit && onNavigateToEntityRecord && (