2024-01-31 07:59:56 -05:00
/******/ ( ( ) => { // webpackBootstrap
2024-05-23 15:39:28 -04:00
/******/ "use strict" ;
/******/ // The require scope
/******/ var _ _webpack _require _ _ = { } ;
2022-04-11 08:04:30 -04:00
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
2024-01-31 07:59:56 -05:00
/******/ ( ( ) => {
2022-04-11 08:04:30 -04:00
/******/ // getDefaultExport function for compatibility with non-harmony modules
2024-01-31 07:59:56 -05:00
/******/ _ _webpack _require _ _ . n = ( module ) => {
2022-04-11 08:04:30 -04:00
/******/ var getter = module && module . _ _esModule ?
2024-01-31 07:59:56 -05:00
/******/ ( ) => ( module [ 'default' ] ) :
/******/ ( ) => ( module ) ;
2022-04-11 08:04:30 -04:00
/******/ _ _webpack _require _ _ . d ( getter , { a : getter } ) ;
/******/ return getter ;
/******/ } ;
2024-01-31 07:59:56 -05:00
/******/ } ) ( ) ;
2022-04-11 08:04:30 -04:00
/******/
/******/ /* webpack/runtime/define property getters */
2024-01-31 07:59:56 -05:00
/******/ ( ( ) => {
2022-04-11 08:04:30 -04:00
/******/ // define getter functions for harmony exports
2024-01-31 07:59:56 -05:00
/******/ _ _webpack _require _ _ . d = ( exports , definition ) => {
2022-04-11 08:04:30 -04:00
/******/ for ( var key in definition ) {
/******/ if ( _ _webpack _require _ _ . o ( definition , key ) && ! _ _webpack _require _ _ . o ( exports , key ) ) {
/******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
/******/ }
/******/ }
/******/ } ;
2024-01-31 07:59:56 -05:00
/******/ } ) ( ) ;
2022-04-11 08:04:30 -04:00
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
2024-01-31 07:59:56 -05:00
/******/ ( ( ) => {
/******/ _ _webpack _require _ _ . o = ( obj , prop ) => ( Object . prototype . hasOwnProperty . call ( obj , prop ) )
/******/ } ) ( ) ;
2022-04-11 08:04:30 -04:00
/******/
/******/ /* webpack/runtime/make namespace object */
2024-01-31 07:59:56 -05:00
/******/ ( ( ) => {
2022-04-11 08:04:30 -04:00
/******/ // define __esModule on exports
2024-01-31 07:59:56 -05:00
/******/ _ _webpack _require _ _ . r = ( exports ) => {
2022-04-11 08:04:30 -04:00
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
2024-01-31 07:59:56 -05:00
/******/ } ) ( ) ;
2022-04-11 08:04:30 -04:00
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
2021-05-25 04:40:25 -04:00
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
// EXPORTS
2022-04-11 08:04:30 -04:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
2024-01-31 07:59:56 -05:00
initialize : ( ) => ( /* binding */ initialize ) ,
initializeEditor : ( ) => ( /* binding */ initializeEditor ) ,
reinitializeEditor : ( ) => ( /* binding */ reinitializeEditor ) ,
store : ( ) => ( /* reexport */ store _store )
2022-04-11 08:04:30 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js
2021-05-25 04:40:25 -04:00
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
2022-04-11 08:04:30 -04:00
_ _webpack _require _ _ . d ( actions _namespaceObject , {
2024-01-31 07:59:56 -05:00
closeModal : ( ) => ( closeModal ) ,
disableComplementaryArea : ( ) => ( disableComplementaryArea ) ,
enableComplementaryArea : ( ) => ( enableComplementaryArea ) ,
openModal : ( ) => ( openModal ) ,
pinItem : ( ) => ( pinItem ) ,
setDefaultComplementaryArea : ( ) => ( setDefaultComplementaryArea ) ,
setFeatureDefaults : ( ) => ( setFeatureDefaults ) ,
setFeatureValue : ( ) => ( setFeatureValue ) ,
toggleFeature : ( ) => ( toggleFeature ) ,
unpinItem : ( ) => ( unpinItem )
2022-04-11 08:04:30 -04:00
} ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , {
2024-01-31 07:59:56 -05:00
getActiveComplementaryArea : ( ) => ( getActiveComplementaryArea ) ,
isComplementaryAreaLoading : ( ) => ( isComplementaryAreaLoading ) ,
isFeatureActive : ( ) => ( isFeatureActive ) ,
isItemPinned : ( ) => ( isItemPinned ) ,
isModalActive : ( ) => ( isModalActive )
2022-04-11 08:04:30 -04:00
} ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/actions.js
var store _actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( store _actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( store _actions _namespaceObject , {
2024-01-31 07:59:56 -05:00
closeGeneralSidebar : ( ) => ( closeGeneralSidebar ) ,
moveBlockToWidgetArea : ( ) => ( moveBlockToWidgetArea ) ,
persistStubPost : ( ) => ( persistStubPost ) ,
saveEditedWidgetAreas : ( ) => ( saveEditedWidgetAreas ) ,
saveWidgetArea : ( ) => ( saveWidgetArea ) ,
saveWidgetAreas : ( ) => ( saveWidgetAreas ) ,
setIsInserterOpened : ( ) => ( setIsInserterOpened ) ,
setIsListViewOpened : ( ) => ( setIsListViewOpened ) ,
setIsWidgetAreaOpen : ( ) => ( setIsWidgetAreaOpen ) ,
setWidgetAreasOpenState : ( ) => ( setWidgetAreasOpenState ) ,
setWidgetIdForClientId : ( ) => ( setWidgetIdForClientId )
2022-04-11 08:04:30 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/resolvers.js
var resolvers _namespaceObject = { } ;
_ _webpack _require _ _ . r ( resolvers _namespaceObject ) ;
2022-04-11 08:04:30 -04:00
_ _webpack _require _ _ . d ( resolvers _namespaceObject , {
2024-01-31 07:59:56 -05:00
getWidgetAreas : ( ) => ( getWidgetAreas ) ,
getWidgets : ( ) => ( getWidgets )
2022-04-11 08:04:30 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/selectors.js
2022-04-11 08:04:30 -04:00
var store _selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( store _selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( store _selectors _namespaceObject , {
2024-01-31 07:59:56 -05:00
_ _experimentalGetInsertionPoint : ( ) => ( _ _experimentalGetInsertionPoint ) ,
canInsertBlockInWidgetArea : ( ) => ( canInsertBlockInWidgetArea ) ,
getEditedWidgetAreas : ( ) => ( getEditedWidgetAreas ) ,
getIsWidgetAreaOpen : ( ) => ( getIsWidgetAreaOpen ) ,
getParentWidgetAreaBlock : ( ) => ( getParentWidgetAreaBlock ) ,
getReferenceWidgetBlocks : ( ) => ( getReferenceWidgetBlocks ) ,
getWidget : ( ) => ( getWidget ) ,
getWidgetAreaForWidgetId : ( ) => ( getWidgetAreaForWidgetId ) ,
getWidgetAreas : ( ) => ( selectors _getWidgetAreas ) ,
getWidgets : ( ) => ( selectors _getWidgets ) ,
isInserterOpened : ( ) => ( isInserterOpened ) ,
isListViewOpened : ( ) => ( isListViewOpened ) ,
isSavingWidgetAreas : ( ) => ( isSavingWidgetAreas )
2022-04-11 08:04:30 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/private-selectors.js
var private _selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( private _selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( private _selectors _namespaceObject , {
2024-05-23 15:39:28 -04:00
getInserterSidebarToggleRef : ( ) => ( getInserterSidebarToggleRef ) ,
2024-01-31 07:59:56 -05:00
getListViewToggleRef : ( ) => ( getListViewToggleRef )
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
} ) ;
2021-05-25 04:40:25 -04:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/index.js
var widget _area _namespaceObject = { } ;
_ _webpack _require _ _ . r ( widget _area _namespaceObject ) ;
2022-04-11 08:04:30 -04:00
_ _webpack _require _ _ . d ( widget _area _namespaceObject , {
2024-01-31 07:59:56 -05:00
metadata : ( ) => ( metadata ) ,
name : ( ) => ( widget _area _name ) ,
settings : ( ) => ( settings )
2022-04-11 08:04:30 -04:00
} ) ;
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","blocks"]
2024-01-31 07:59:56 -05:00
const external _wp _blocks _namespaceObject = window [ "wp" ] [ "blocks" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","data"]
2024-01-31 07:59:56 -05:00
const external _wp _data _namespaceObject = window [ "wp" ] [ "data" ] ;
2023-02-07 02:04:52 -05:00
; // CONCATENATED MODULE: external ["wp","deprecated"]
2024-01-31 07:59:56 -05:00
const external _wp _deprecated _namespaceObject = window [ "wp" ] [ "deprecated" ] ;
2023-02-07 02:04:52 -05:00
var external _wp _deprecated _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _deprecated _namespaceObject ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
; // CONCATENATED MODULE: external ["wp","element"]
2024-01-31 07:59:56 -05:00
const external _wp _element _namespaceObject = window [ "wp" ] [ "element" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","blockLibrary"]
2024-01-31 07:59:56 -05:00
const external _wp _blockLibrary _namespaceObject = window [ "wp" ] [ "blockLibrary" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","coreData"]
2024-01-31 07:59:56 -05:00
const external _wp _coreData _namespaceObject = window [ "wp" ] [ "coreData" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","widgets"]
2024-01-31 07:59:56 -05:00
const external _wp _widgets _namespaceObject = window [ "wp" ] [ "widgets" ] ;
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: external ["wp","preferences"]
2024-01-31 07:59:56 -05:00
const external _wp _preferences _namespaceObject = window [ "wp" ] [ "preferences" ] ;
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: external ["wp","apiFetch"]
2024-01-31 07:59:56 -05:00
const external _wp _apiFetch _namespaceObject = window [ "wp" ] [ "apiFetch" ] ;
2022-04-12 11:12:47 -04:00
var external _wp _apiFetch _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _apiFetch _namespaceObject ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/reducer.js
/ * *
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2022-04-12 11:12:47 -04:00
/ * *
* Controls the open state of the widget areas .
*
* @ param { Object } state Redux state .
* @ param { Object } action Redux action .
*
* @ return { Array } Updated state .
* /
2023-06-27 10:24:19 -04:00
function widgetAreasOpenState ( state = { } , action ) {
2022-04-12 11:12:47 -04:00
const {
type
} = action ;
switch ( type ) {
case 'SET_WIDGET_AREAS_OPEN_STATE' :
{
return action . widgetAreasOpenState ;
}
case 'SET_IS_WIDGET_AREA_OPEN' :
{
const {
clientId ,
isOpen
} = action ;
2023-09-26 10:23:26 -04:00
return {
... state ,
2022-04-12 11:12:47 -04:00
[ clientId ] : isOpen
} ;
}
default :
{
return state ;
}
}
}
2023-09-26 10:23:26 -04:00
2022-04-12 11:12:47 -04:00
/ * *
* Reducer to set the block inserter panel open or closed .
*
* Note : this reducer interacts with the list view panel reducer
* to make sure that only one of the two panels is open at the same time .
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
* /
2023-06-27 10:24:19 -04:00
function blockInserterPanel ( state = false , action ) {
2022-04-12 11:12:47 -04:00
switch ( action . type ) {
case 'SET_IS_LIST_VIEW_OPENED' :
return action . isOpen ? false : state ;
case 'SET_IS_INSERTER_OPENED' :
return action . value ;
}
return state ;
}
2023-09-26 10:23:26 -04:00
2022-04-12 11:12:47 -04:00
/ * *
* Reducer to set the list view panel open or closed .
*
* Note : this reducer interacts with the inserter panel reducer
* to make sure that only one of the two panels is open at the same time .
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
* /
2023-06-27 10:24:19 -04:00
function listViewPanel ( state = false , action ) {
2022-04-12 11:12:47 -04:00
switch ( action . type ) {
case 'SET_IS_INSERTER_OPENED' :
return action . value ? false : state ;
case 'SET_IS_LIST_VIEW_OPENED' :
return action . isOpen ;
}
return state ;
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
/ * *
* This reducer does nothing aside initializing a ref to the list view toggle .
* We will have a unique ref per "editor" instance .
*
* @ param { Object } state
* @ return { Object } Reference to the list view toggle button .
* /
function listViewToggleRef ( state = {
current : null
} ) {
return state ;
}
2024-05-23 15:39:28 -04:00
/ * *
* This reducer does nothing aside initializing a ref to the inserter sidebar toggle .
* We will have a unique ref per "editor" instance .
*
* @ param { Object } state
* @ return { Object } Reference to the inserter sidebar toggle button .
* /
function inserterSidebarToggleRef ( state = {
current : null
} ) {
return state ;
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const reducer = ( ( 0 , external _wp _data _namespaceObject . combineReducers ) ( {
2022-04-12 11:12:47 -04:00
blockInserterPanel ,
2024-05-23 15:39:28 -04:00
inserterSidebarToggleRef ,
2022-04-12 11:12:47 -04:00
listViewPanel ,
2024-05-23 15:39:28 -04:00
listViewToggleRef ,
2022-04-12 11:12:47 -04:00
widgetAreasOpenState
} ) ) ;
; // CONCATENATED MODULE: external ["wp","i18n"]
2024-01-31 07:59:56 -05:00
const external _wp _i18n _namespaceObject = window [ "wp" ] [ "i18n" ] ;
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: external ["wp","notices"]
2024-01-31 07:59:56 -05:00
const external _wp _notices _namespaceObject = window [ "wp" ] [ "notices" ] ;
2024-05-23 15:39:28 -04:00
; // CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs
function r ( e ) { var t , f , n = "" ; if ( "string" == typeof e || "number" == typeof e ) n += e ; else if ( "object" == typeof e ) if ( Array . isArray ( e ) ) { var o = e . length ; for ( t = 0 ; t < o ; t ++ ) e [ t ] && ( f = r ( e [ t ] ) ) && ( n && ( n += " " ) , n += f ) } else for ( f in e ) e [ f ] && ( n && ( n += " " ) , n += f ) ; return n } function clsx ( ) { for ( var e , t , f = 0 , n = "" , o = arguments . length ; f < o ; f ++ ) ( e = arguments [ f ] ) && ( t = r ( e ) ) && ( n && ( n += " " ) , n += t ) ; return n } /* harmony default export */ const dist _clsx = ( clsx ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","components"]
2024-01-31 07:59:56 -05:00
const external _wp _components _namespaceObject = window [ "wp" ] [ "components" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","primitives"]
2024-01-31 07:59:56 -05:00
const external _wp _primitives _namespaceObject = window [ "wp" ] [ "primitives" ] ;
2024-05-31 14:59:00 -04:00
; // CONCATENATED MODULE: external "ReactJSXRuntime"
const external _ReactJSXRuntime _namespaceObject = window [ "ReactJSXRuntime" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const check = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const library _check = ( check ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
const starFilled = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const star _filled = ( starFilled ) ;
2021-11-15 07:50:17 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
const starEmpty = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
fillRule : "evenodd" ,
d : "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z" ,
clipRule : "evenodd"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const star _empty = ( starEmpty ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","viewport"]
2024-01-31 07:59:56 -05:00
const external _wp _viewport _namespaceObject = window [ "wp" ] [ "viewport" ] ;
2024-05-23 15:39:28 -04:00
; // CONCATENATED MODULE: external ["wp","compose"]
const external _wp _compose _namespaceObject = window [ "wp" ] [ "compose" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
2021-11-08 09:29:21 -05:00
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const closeSmall = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const close _small = ( closeSmall ) ;
2021-11-08 09:29:21 -05:00
2024-05-23 15:39:28 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/deprecated.js
/ * *
* WordPress dependencies
* /
function normalizeComplementaryAreaScope ( scope ) {
if ( [ 'core/edit-post' , 'core/edit-site' ] . includes ( scope ) ) {
external _wp _deprecated _default ( ) ( ` ${ scope } interface scope ` , {
alternative : 'core interface scope' ,
hint : 'core/edit-post and core/edit-site are merging.' ,
version : '6.6'
} ) ;
return 'core' ;
}
return scope ;
}
function normalizeComplementaryAreaName ( scope , name ) {
if ( scope === 'core' && name === 'edit-site/template' ) {
external _wp _deprecated _default ( ) ( ` edit-site/template sidebar ` , {
alternative : 'edit-post/document' ,
version : '6.6'
} ) ;
return 'edit-post/document' ;
}
if ( scope === 'core' && name === 'edit-site/block-inspector' ) {
external _wp _deprecated _default ( ) ( ` edit-site/block-inspector sidebar ` , {
alternative : 'edit-post/block' ,
version : '6.6'
} ) ;
return 'edit-post/block' ;
}
return name ;
}
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js
2022-04-11 08:04:30 -04:00
/ * *
* WordPress dependencies
* /
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
2024-05-23 15:39:28 -04:00
/ * *
* Internal dependencies
* /
2022-09-20 11:43:29 -04:00
/ * *
* Set a default complementary area .
*
* @ param { string } scope Complementary area scope .
* @ param { string } area Area identifier .
*
* @ return { Object } Action object .
* /
2024-05-23 15:39:28 -04:00
const setDefaultComplementaryArea = ( scope , area ) => {
scope = normalizeComplementaryAreaScope ( scope ) ;
area = normalizeComplementaryAreaName ( scope , area ) ;
return {
type : 'SET_DEFAULT_COMPLEMENTARY_AREA' ,
scope ,
area
} ;
} ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
2022-04-12 11:12:47 -04:00
* Enable the complementary area .
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ param { string } scope Complementary area scope .
* @ param { string } area Area identifier .
2022-04-11 08:04:30 -04:00
* /
2023-06-27 10:24:19 -04:00
const enableComplementaryArea = ( scope , area ) => ( {
registry ,
dispatch
} ) => {
2022-04-12 11:12:47 -04:00
// Return early if there's no area.
if ( ! area ) {
return ;
2021-11-08 09:29:21 -05:00
}
2024-05-23 15:39:28 -04:00
scope = normalizeComplementaryAreaScope ( scope ) ;
area = normalizeComplementaryAreaName ( scope , area ) ;
2022-09-20 11:43:29 -04:00
const isComplementaryAreaVisible = registry . select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'isComplementaryAreaVisible' ) ;
if ( ! isComplementaryAreaVisible ) {
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , 'isComplementaryAreaVisible' , true ) ;
}
dispatch ( {
type : 'ENABLE_COMPLEMENTARY_AREA' ,
scope ,
area
} ) ;
2022-04-12 11:12:47 -04:00
} ;
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-12 11:12:47 -04:00
* Disable the complementary area .
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ param { string } scope Complementary area scope .
2021-11-08 09:29:21 -05:00
* /
2023-06-27 10:24:19 -04:00
const disableComplementaryArea = scope => ( {
registry
} ) => {
2024-05-23 15:39:28 -04:00
scope = normalizeComplementaryAreaScope ( scope ) ;
2022-09-20 11:43:29 -04:00
const isComplementaryAreaVisible = registry . select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'isComplementaryAreaVisible' ) ;
if ( isComplementaryAreaVisible ) {
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , 'isComplementaryAreaVisible' , false ) ;
}
2022-04-12 11:12:47 -04:00
} ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-12 11:12:47 -04:00
* Pins an item .
2021-05-25 04:40:25 -04:00
*
2022-04-12 11:12:47 -04:00
* @ param { string } scope Item scope .
* @ param { string } item Item identifier .
2022-04-11 08:04:30 -04:00
*
* @ return { Object } Action object .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
const pinItem = ( scope , item ) => ( {
registry
} ) => {
2022-04-12 11:12:47 -04:00
// Return early if there's no item.
if ( ! item ) {
return ;
}
2024-05-23 15:39:28 -04:00
scope = normalizeComplementaryAreaScope ( scope ) ;
item = normalizeComplementaryAreaName ( scope , item ) ;
2023-09-26 10:23:26 -04:00
const pinnedItems = registry . select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'pinnedItems' ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// The item is already pinned, there's nothing to do.
2023-06-27 10:24:19 -04:00
if ( pinnedItems ? . [ item ] === true ) {
2022-04-12 11:12:47 -04:00
return ;
}
2023-09-26 10:23:26 -04:00
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , 'pinnedItems' , {
... pinnedItems ,
2022-04-12 11:12:47 -04:00
[ item ] : true
} ) ;
} ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-12 11:12:47 -04:00
* Unpins an item .
2021-05-25 04:40:25 -04:00
*
2022-04-12 11:12:47 -04:00
* @ param { string } scope Item scope .
* @ param { string } item Item identifier .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
const unpinItem = ( scope , item ) => ( {
registry
} ) => {
2022-04-12 11:12:47 -04:00
// Return early if there's no item.
if ( ! item ) {
return ;
}
2024-05-23 15:39:28 -04:00
scope = normalizeComplementaryAreaScope ( scope ) ;
item = normalizeComplementaryAreaName ( scope , item ) ;
2022-04-12 11:12:47 -04:00
const pinnedItems = registry . select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'pinnedItems' ) ;
2023-09-26 10:23:26 -04:00
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , 'pinnedItems' , {
... pinnedItems ,
2022-04-12 11:12:47 -04:00
[ item ] : false
} ) ;
} ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns an action object used in signalling that a feature should be toggled .
*
* @ param { string } scope The feature scope ( e . g . core / edit - post ) .
* @ param { string } featureName The feature name .
* /
function toggleFeature ( scope , featureName ) {
2023-06-27 10:24:19 -04:00
return function ( {
registry
} ) {
2022-05-10 10:49:35 -04:00
external _wp _deprecated _default ( ) ( ` dispatch( 'core/interface' ).toggleFeature ` , {
2022-04-12 11:12:47 -04:00
since : '6.0' ,
2022-05-10 10:49:35 -04:00
alternative : ` dispatch( 'core/preferences' ).toggle `
2022-04-12 11:12:47 -04:00
} ) ;
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . toggle ( scope , featureName ) ;
2022-04-11 08:04:30 -04:00
} ;
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns an action object used in signalling that a feature should be set to
* a true or false value
*
* @ param { string } scope The feature scope ( e . g . core / edit - post ) .
* @ param { string } featureName The feature name .
* @ param { boolean } value The value to set .
*
* @ return { Object } Action object .
* /
function setFeatureValue ( scope , featureName , value ) {
2023-06-27 10:24:19 -04:00
return function ( {
registry
} ) {
2022-05-10 10:49:35 -04:00
external _wp _deprecated _default ( ) ( ` dispatch( 'core/interface' ).setFeatureValue ` , {
2022-04-12 11:12:47 -04:00
since : '6.0' ,
2022-05-10 10:49:35 -04:00
alternative : ` dispatch( 'core/preferences' ).set `
2022-04-12 11:12:47 -04:00
} ) ;
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . set ( scope , featureName , ! ! value ) ;
2022-04-11 08:04:30 -04:00
} ;
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns an action object used in signalling that defaults should be set for features .
*
* @ param { string } scope The feature scope ( e . g . core / edit - post ) .
* @ param { Object < string , boolean > } defaults A key / value map of feature names to values .
*
* @ return { Object } Action object .
* /
function setFeatureDefaults ( scope , defaults ) {
2023-06-27 10:24:19 -04:00
return function ( {
registry
} ) {
2022-05-10 10:49:35 -04:00
external _wp _deprecated _default ( ) ( ` dispatch( 'core/interface' ).setFeatureDefaults ` , {
2022-04-12 11:12:47 -04:00
since : '6.0' ,
2022-05-10 10:49:35 -04:00
alternative : ` dispatch( 'core/preferences' ).setDefaults `
2022-04-12 11:12:47 -04:00
} ) ;
registry . dispatch ( external _wp _preferences _namespaceObject . store ) . setDefaults ( scope , defaults ) ;
2022-04-11 08:04:30 -04:00
} ;
}
2023-09-26 10:23:26 -04:00
2023-06-28 03:04:13 -04:00
/ * *
* Returns an action object used in signalling that the user opened a modal .
*
* @ param { string } name A string that uniquely identifies the modal .
*
* @ return { Object } Action object .
* /
function openModal ( name ) {
return {
type : 'OPEN_MODAL' ,
name
} ;
}
2023-09-26 10:23:26 -04:00
2023-06-28 03:04:13 -04:00
/ * *
* Returns an action object signalling that the user closed a modal .
*
* @ return { Object } Action object .
* /
function closeModal ( ) {
return {
type : 'CLOSE_MODAL'
} ;
}
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
/ * *
2022-04-12 11:12:47 -04:00
* WordPress dependencies
2022-04-11 08:04:30 -04:00
* /
2021-05-25 04:40:25 -04:00
2022-04-12 11:12:47 -04:00
2023-09-26 10:23:26 -04:00
2024-05-23 15:39:28 -04:00
/ * *
* Internal dependencies
* /
2022-04-11 08:04:30 -04:00
/ * *
* Returns the complementary area that is active in a given scope .
*
* @ param { Object } state Global application state .
* @ param { string } scope Item scope .
*
2022-09-20 11:43:29 -04:00
* @ return { string | null | undefined } The complementary area that is active in the given scope .
2022-04-11 08:04:30 -04:00
* /
2022-04-12 11:12:47 -04:00
const getActiveComplementaryArea = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , scope ) => {
2024-05-23 15:39:28 -04:00
scope = normalizeComplementaryAreaScope ( scope ) ;
2023-09-26 10:23:26 -04:00
const isComplementaryAreaVisible = select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'isComplementaryAreaVisible' ) ;
// Return `undefined` to indicate that the user has never toggled
2022-09-20 11:43:29 -04:00
// visibility, this is the vanilla default. Other code relies on this
// nuance in the return value.
if ( isComplementaryAreaVisible === undefined ) {
return undefined ;
2023-09-26 10:23:26 -04:00
}
2022-09-20 11:43:29 -04:00
2023-09-26 10:23:26 -04:00
// Return `null` to indicate the user hid the complementary area.
2023-06-27 10:24:19 -04:00
if ( isComplementaryAreaVisible === false ) {
2022-09-20 11:43:29 -04:00
return null ;
}
2023-06-27 10:24:19 -04:00
return state ? . complementaryAreas ? . [ scope ] ;
} ) ;
const isComplementaryAreaLoading = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , scope ) => {
2024-05-23 15:39:28 -04:00
scope = normalizeComplementaryAreaScope ( scope ) ;
2023-06-27 10:24:19 -04:00
const isVisible = select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'isComplementaryAreaVisible' ) ;
const identifier = state ? . complementaryAreas ? . [ scope ] ;
return isVisible && identifier === undefined ;
2022-04-12 11:12:47 -04:00
} ) ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Returns a boolean indicating if an item is pinned or not .
2021-05-25 04:40:25 -04:00
*
2022-04-11 08:04:30 -04:00
* @ param { Object } state Global application state .
* @ param { string } scope Scope .
* @ param { string } item Item to check .
*
* @ return { boolean } True if the item is pinned and false otherwise .
2021-05-25 04:40:25 -04:00
* /
2022-04-12 11:12:47 -04:00
const isItemPinned = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , scope , item ) => {
var _pinnedItems$item ;
2024-05-23 15:39:28 -04:00
scope = normalizeComplementaryAreaScope ( scope ) ;
item = normalizeComplementaryAreaName ( scope , item ) ;
2022-04-12 11:12:47 -04:00
const pinnedItems = select ( external _wp _preferences _namespaceObject . store ) . get ( scope , 'pinnedItems' ) ;
2023-06-27 10:24:19 -04:00
return ( _pinnedItems$item = pinnedItems ? . [ item ] ) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true ;
2022-04-12 11:12:47 -04:00
} ) ;
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Returns a boolean indicating whether a feature is active for a particular
* scope .
2021-11-08 09:29:21 -05:00
*
2022-04-11 08:04:30 -04:00
* @ param { Object } state The store state .
* @ param { string } scope The scope of the feature ( e . g . core / edit - post ) .
* @ param { string } featureName The name of the feature .
2021-11-08 09:29:21 -05:00
*
2022-04-11 08:04:30 -04:00
* @ return { boolean } Is the feature enabled ?
2021-11-08 09:29:21 -05:00
* /
2022-04-12 11:12:47 -04:00
const isFeatureActive = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , scope , featureName ) => {
2022-05-10 10:49:35 -04:00
external _wp _deprecated _default ( ) ( ` select( 'core/interface' ).isFeatureActive( scope, featureName ) ` , {
2022-04-12 11:12:47 -04:00
since : '6.0' ,
2022-05-10 10:49:35 -04:00
alternative : ` select( 'core/preferences' ).get( scope, featureName ) `
2022-04-12 11:12:47 -04:00
} ) ;
return ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( scope , featureName ) ;
} ) ;
2023-09-26 10:23:26 -04:00
2023-06-28 03:04:13 -04:00
/ * *
* Returns true if a modal is active , or false otherwise .
*
* @ param { Object } state Global application state .
* @ param { string } modalName A string that uniquely identifies the modal .
*
* @ return { boolean } Whether the modal is active .
* /
function isModalActive ( state , modalName ) {
return state . activeModal === modalName ;
}
2021-05-25 04:40:25 -04:00
2022-09-20 11:43:29 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/reducer.js
/ * *
* WordPress dependencies
* /
2023-06-27 10:24:19 -04:00
function complementaryAreas ( state = { } , action ) {
2022-09-20 11:43:29 -04:00
switch ( action . type ) {
case 'SET_DEFAULT_COMPLEMENTARY_AREA' :
{
const {
scope ,
area
2023-09-26 10:23:26 -04:00
} = action ;
2022-09-20 11:43:29 -04:00
2023-09-26 10:23:26 -04:00
// If there's already an area, don't overwrite it.
2022-09-20 11:43:29 -04:00
if ( state [ scope ] ) {
return state ;
}
2023-09-26 10:23:26 -04:00
return {
... state ,
2022-09-20 11:43:29 -04:00
[ scope ] : area
} ;
}
case 'ENABLE_COMPLEMENTARY_AREA' :
{
const {
scope ,
area
} = action ;
2023-09-26 10:23:26 -04:00
return {
... state ,
2022-09-20 11:43:29 -04:00
[ scope ] : area
} ;
}
}
return state ;
}
2023-09-26 10:23:26 -04:00
2023-06-28 03:04:13 -04:00
/ * *
* Reducer for storing the name of the open modal , or null if no modal is open .
*
* @ param { Object } state Previous state .
* @ param { Object } action Action object containing the ` name ` of the modal
*
* @ return { Object } Updated state
* /
function activeModal ( state = null , action ) {
switch ( action . type ) {
case 'OPEN_MODAL' :
return action . name ;
case 'CLOSE_MODAL' :
return null ;
}
return state ;
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const store _reducer = ( ( 0 , external _wp _data _namespaceObject . combineReducers ) ( {
2023-06-28 03:04:13 -04:00
complementaryAreas ,
activeModal
2022-09-20 11:43:29 -04:00
} ) ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* The identifier for the data store .
2021-11-08 09:29:21 -05:00
*
2022-04-11 08:04:30 -04:00
* @ type { string }
2021-11-08 09:29:21 -05:00
* /
2022-04-11 08:04:30 -04:00
const STORE _NAME = 'core/interface' ;
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
/ * *
* WordPress dependencies
* /
2021-11-15 07:50:17 -05:00
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-11-08 09:29:21 -05:00
* /
2021-05-25 04:40:25 -04:00
2021-06-25 11:52:22 -04:00
2022-09-20 11:43:29 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Store definition for the interface namespace .
*
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @ type { Object }
* /
const store = ( 0 , external _wp _data _namespaceObject . createReduxStore ) ( STORE _NAME , {
2022-09-20 11:43:29 -04:00
reducer : store _reducer ,
2022-04-11 08:04:30 -04:00
actions : actions _namespaceObject ,
2022-04-12 11:12:47 -04:00
selectors : selectors _namespaceObject
2023-09-26 10:23:26 -04:00
} ) ;
2021-06-22 06:00:50 -04:00
2023-09-26 10:23:26 -04:00
// Once we build a more generic persistence plugin that works across types of stores
// we'd be able to replace this with a register call.
2022-04-12 11:12:47 -04:00
( 0 , external _wp _data _namespaceObject . register ) ( store ) ;
2021-06-22 06:00:50 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","plugins"]
2024-01-31 07:59:56 -05:00
const external _wp _plugins _namespaceObject = window [ "wp" ] [ "plugins" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js
/ * *
* WordPress dependencies
* /
2021-06-22 06:00:50 -04:00
2024-01-31 07:59:56 -05:00
/* harmony default export */ const complementary _area _context = ( ( 0 , external _wp _plugins _namespaceObject . withPluginContext ) ( ( context , ownProps ) => {
2022-04-11 08:04:30 -04:00
return {
icon : ownProps . icon || context . icon ,
identifier : ownProps . identifier || ` ${ context . name } / ${ ownProps . name } `
} ;
} ) ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2021-06-15 04:52:30 -04:00
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function ComplementaryAreaToggle ( {
as = external _wp _components _namespaceObject . Button ,
scope ,
identifier ,
icon ,
selectedIcon ,
name ,
... props
} ) {
2022-04-11 08:04:30 -04:00
const ComponentToUse = as ;
2023-09-26 10:23:26 -04:00
const isSelected = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store ) . getActiveComplementaryArea ( scope ) === identifier , [ identifier , scope ] ) ;
2022-04-11 08:04:30 -04:00
const {
enableComplementaryArea ,
disableComplementaryArea
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ComponentToUse , {
2022-04-11 08:04:30 -04:00
icon : selectedIcon && isSelected ? selectedIcon : icon ,
2023-09-26 10:23:26 -04:00
"aria-controls" : identifier . replace ( '/' , ':' ) ,
2022-04-11 08:04:30 -04:00
onClick : ( ) => {
if ( isSelected ) {
disableComplementaryArea ( scope ) ;
} else {
enableComplementaryArea ( scope , identifier ) ;
}
2023-06-27 10:24:19 -04:00
} ,
... props
} ) ;
2022-04-11 08:04:30 -04:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const complementary _area _toggle = ( complementary _area _context ( ComplementaryAreaToggle ) ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* External dependencies
2021-05-25 04:40:25 -04:00
* /
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
const ComplementaryAreaHeader = ( {
smallScreenTitle ,
children ,
className ,
toggleButtonProps
} ) => {
2024-05-31 14:59:00 -04:00
const toggleButton = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( complementary _area _toggle , {
2023-06-27 10:24:19 -04:00
icon : close _small ,
... toggleButtonProps
} ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "components-panel__header interface-complementary-area-header__small" ,
children : [ smallScreenTitle && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h2" , {
className : "interface-complementary-area-header__small-title" ,
children : smallScreenTitle
} ) , toggleButton ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : dist _clsx ( 'components-panel__header' , 'interface-complementary-area-header' , className ) ,
tabIndex : - 1 ,
children : [ children , toggleButton ]
} ) ]
} ) ;
2021-11-08 09:29:21 -05:00
} ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const complementary _area _header = ( ComplementaryAreaHeader ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
2022-09-20 11:43:29 -04:00
const noop = ( ) => { } ;
2023-06-27 10:24:19 -04:00
function ActionItemSlot ( {
name ,
as : Component = external _wp _components _namespaceObject . ButtonGroup ,
fillProps = { } ,
bubblesVirtually ,
... props
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Slot , {
2022-04-11 08:04:30 -04:00
name : name ,
bubblesVirtually : bubblesVirtually ,
2024-05-31 14:59:00 -04:00
fillProps : fillProps ,
children : fills => {
if ( ! external _wp _element _namespaceObject . Children . toArray ( fills ) . length ) {
2022-04-11 08:04:30 -04:00
return null ;
}
2024-05-31 14:59:00 -04:00
// Special handling exists for backward compatibility.
// It ensures that menu items created by plugin authors aren't
// duplicated with automatically injected menu items coming
// from pinnable plugin sidebars.
// @see https://github.com/WordPress/gutenberg/issues/14457
const initializedByPlugins = [ ] ;
external _wp _element _namespaceObject . Children . forEach ( fills , ( {
props : {
_ _unstableExplicitMenuItem ,
_ _unstableTarget
}
} ) => {
if ( _ _unstableTarget && _ _unstableExplicitMenuItem ) {
initializedByPlugins . push ( _ _unstableTarget ) ;
}
} ) ;
const children = external _wp _element _namespaceObject . Children . map ( fills , child => {
if ( ! child . props . _ _unstableExplicitMenuItem && initializedByPlugins . includes ( child . props . _ _unstableTarget ) ) {
return null ;
}
return child ;
} ) ;
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Component , {
... props ,
children : children
} ) ;
}
2021-05-25 04:40:25 -04:00
} ) ;
2022-04-11 08:04:30 -04:00
}
2023-06-27 10:24:19 -04:00
function ActionItem ( {
name ,
as : Component = external _wp _components _namespaceObject . Button ,
onClick ,
... props
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Fill , {
name : name ,
children : ( {
onClick : fpOnClick
} ) => {
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Component , {
onClick : onClick || fpOnClick ? ( ... args ) => {
( onClick || noop ) ( ... args ) ;
( fpOnClick || noop ) ( ... args ) ;
} : undefined ,
... props
} ) ;
}
2022-04-11 08:04:30 -04:00
} ) ;
}
ActionItem . Slot = ActionItemSlot ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const action _item = ( ActionItem ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
const PluginsMenuItem = ( {
// Menu item is marked with unstable prop for backward compatibility.
// They are removed so they don't leak to DOM elements.
// @see https://github.com/WordPress/gutenberg/issues/14457
_ _unstableExplicitMenuItem ,
_ _unstableTarget ,
... restProps
2024-05-31 14:59:00 -04:00
} ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . MenuItem , {
2023-09-26 10:23:26 -04:00
... restProps
2023-06-27 10:24:19 -04:00
} ) ;
function ComplementaryAreaMoreMenuItem ( {
scope ,
target ,
_ _unstableExplicitMenuItem ,
... props
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( complementary _area _toggle , {
2022-04-11 08:04:30 -04:00
as : toggleProps => {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( action _item , {
2022-04-11 08:04:30 -04:00
_ _unstableExplicitMenuItem : _ _unstableExplicitMenuItem ,
_ _unstableTarget : ` ${ scope } / ${ target } ` ,
as : PluginsMenuItem ,
2023-06-27 10:24:19 -04:00
name : ` ${ scope } /plugin-more-menu ` ,
... toggleProps
} ) ;
2022-04-11 08:04:30 -04:00
} ,
role : "menuitemcheckbox" ,
selectedIcon : library _check ,
name : target ,
2023-06-27 10:24:19 -04:00
scope : scope ,
... props
} ) ;
2022-04-11 08:04:30 -04:00
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js
2021-07-06 10:38:40 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* External dependencies
2021-07-06 10:38:40 -04:00
* /
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-11-08 09:29:21 -05:00
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function PinnedItems ( {
scope ,
... props
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Fill , {
2023-06-27 10:24:19 -04:00
name : ` PinnedItems/ ${ scope } ` ,
2022-04-11 08:04:30 -04:00
... props
2023-06-27 10:24:19 -04:00
} ) ;
2022-04-11 08:04:30 -04:00
}
2023-06-27 10:24:19 -04:00
function PinnedItemsSlot ( {
scope ,
className ,
... props
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Slot , {
2023-06-27 10:24:19 -04:00
name : ` PinnedItems/ ${ scope } ` ,
2024-05-31 14:59:00 -04:00
... props ,
children : fills => fills ? . length > 0 && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : dist _clsx ( className , 'interface-pinned-items' ) ,
children : fills
} )
} ) ;
2022-04-11 08:04:30 -04:00
}
PinnedItems . Slot = PinnedItemsSlot ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const pinned _items = ( PinnedItems ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* External dependencies
2021-05-25 04:40:25 -04:00
* /
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
2024-05-23 15:39:28 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-11-08 09:29:21 -05:00
* /
2021-05-25 04:40:25 -04:00
2024-05-31 14:59:00 -04:00
2024-05-23 15:39:28 -04:00
const ANIMATION _DURATION = 0.3 ;
2023-06-27 10:24:19 -04:00
function ComplementaryAreaSlot ( {
scope ,
... props
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Slot , {
2023-06-27 10:24:19 -04:00
name : ` ComplementaryArea/ ${ scope } ` ,
2022-04-11 08:04:30 -04:00
... props
2023-06-27 10:24:19 -04:00
} ) ;
2022-04-11 08:04:30 -04:00
}
2024-05-23 15:39:28 -04:00
const SIDEBAR _WIDTH = 280 ;
const variants = {
open : {
width : SIDEBAR _WIDTH
} ,
closed : {
width : 0
} ,
mobileOpen : {
width : '100vw'
}
} ;
2023-06-27 10:24:19 -04:00
function ComplementaryAreaFill ( {
2024-05-23 15:39:28 -04:00
activeArea ,
isActive ,
2023-06-27 10:24:19 -04:00
scope ,
children ,
2023-09-26 10:23:26 -04:00
className ,
id
2023-06-27 10:24:19 -04:00
} ) {
2024-05-23 15:39:28 -04:00
const disableMotion = ( 0 , external _wp _compose _namespaceObject . useReducedMotion ) ( ) ;
const isMobileViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' , '<' ) ;
// This is used to delay the exit animation to the next tick.
// The reason this is done is to allow us to apply the right transition properties
// When we switch from an open sidebar to another open sidebar.
// we don't want to animate in this case.
const previousActiveArea = ( 0 , external _wp _compose _namespaceObject . usePrevious ) ( activeArea ) ;
const previousIsActive = ( 0 , external _wp _compose _namespaceObject . usePrevious ) ( isActive ) ;
const [ , setState ] = ( 0 , external _wp _element _namespaceObject . useState ) ( { } ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
setState ( { } ) ;
} , [ isActive ] ) ;
const transition = {
type : 'tween' ,
duration : disableMotion || isMobileViewport || ! ! previousActiveArea && ! ! activeArea && activeArea !== previousActiveArea ? 0 : ANIMATION _DURATION ,
ease : [ 0.6 , 0 , 0.4 , 1 ]
} ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Fill , {
name : ` ComplementaryArea/ ${ scope } ` ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . _ _unstableAnimatePresence , {
initial : false ,
children : ( previousIsActive || isActive ) && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . _ _unstableMotion . div , {
variants : variants ,
initial : "closed" ,
animate : isMobileViewport ? 'mobileOpen' : 'open' ,
exit : "closed" ,
transition : transition ,
className : "interface-complementary-area__fill" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
id : id ,
className : className ,
style : {
width : isMobileViewport ? '100vw' : SIDEBAR _WIDTH
} ,
children : children
} )
} )
} )
} ) ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
function useAdjustComplementaryListener ( scope , identifier , activeArea , isActive , isSmall ) {
const previousIsSmall = ( 0 , external _wp _element _namespaceObject . useRef ) ( false ) ;
const shouldOpenWhenNotSmall = ( 0 , external _wp _element _namespaceObject . useRef ) ( false ) ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 15:08:24 -04:00
const {
2022-04-11 08:04:30 -04:00
enableComplementaryArea ,
disableComplementaryArea
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2023-06-27 10:24:19 -04:00
// If the complementary area is active and the editor is switching from
// a big to a small window size.
2022-04-11 08:04:30 -04:00
if ( isActive && isSmall && ! previousIsSmall . current ) {
2023-09-26 10:23:26 -04:00
disableComplementaryArea ( scope ) ;
// Flag the complementary area to be reopened when the window size
2023-06-27 10:24:19 -04:00
// goes from small to big.
2022-04-11 08:04:30 -04:00
shouldOpenWhenNotSmall . current = true ;
2023-09-26 10:23:26 -04:00
} else if (
// If there is a flag indicating the complementary area should be
2023-06-27 10:24:19 -04:00
// enabled when we go from small to big window size and we are going
// from a small to big window size.
2022-04-11 08:04:30 -04:00
shouldOpenWhenNotSmall . current && ! isSmall && previousIsSmall . current ) {
2023-06-27 10:24:19 -04:00
// Remove the flag indicating the complementary area should be
// enabled.
shouldOpenWhenNotSmall . current = false ;
2022-04-11 08:04:30 -04:00
enableComplementaryArea ( scope , identifier ) ;
2023-09-26 10:23:26 -04:00
} else if (
// If the flag is indicating the current complementary should be
2023-06-27 10:24:19 -04:00
// reopened but another complementary area becomes active, remove
// the flag.
2022-04-11 08:04:30 -04:00
shouldOpenWhenNotSmall . current && activeArea && activeArea !== identifier ) {
shouldOpenWhenNotSmall . current = false ;
}
if ( isSmall !== previousIsSmall . current ) {
previousIsSmall . current = isSmall ;
}
2023-09-26 10:23:26 -04:00
} , [ isActive , isSmall , scope , identifier , activeArea , disableComplementaryArea , enableComplementaryArea ] ) ;
2021-05-25 04:40:25 -04:00
}
2023-06-27 10:24:19 -04:00
function ComplementaryArea ( {
children ,
className ,
closeLabel = ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Close plugin' ) ,
identifier ,
header ,
headerClassName ,
icon ,
isPinnable = true ,
panelClassName ,
scope ,
name ,
smallScreenTitle ,
title ,
toggleShortcut ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
isActiveByDefault
2023-06-27 10:24:19 -04:00
} ) {
2024-05-23 15:39:28 -04:00
// This state is used to delay the rendering of the Fill
// until the initial effect runs.
// This prevents the animation from running on mount if
// the complementary area is active by default.
const [ isReady , setIsReady ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
2022-04-11 08:04:30 -04:00
const {
2023-06-27 10:24:19 -04:00
isLoading ,
2022-04-11 08:04:30 -04:00
isActive ,
isPinned ,
activeArea ,
isSmall ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
isLarge ,
showIconLabels
2022-04-11 08:04:30 -04:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getActiveComplementaryArea ,
2023-06-27 10:24:19 -04:00
isComplementaryAreaLoading ,
2022-04-11 08:04:30 -04:00
isItemPinned
} = select ( store ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
const {
get
} = select ( external _wp _preferences _namespaceObject . store ) ;
2022-04-11 08:04:30 -04:00
const _activeArea = getActiveComplementaryArea ( scope ) ;
return {
2023-06-27 10:24:19 -04:00
isLoading : isComplementaryAreaLoading ( scope ) ,
2022-04-11 08:04:30 -04:00
isActive : _activeArea === identifier ,
isPinned : isItemPinned ( scope , identifier ) ,
activeArea : _activeArea ,
isSmall : select ( external _wp _viewport _namespaceObject . store ) . isViewportMatch ( '< medium' ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
isLarge : select ( external _wp _viewport _namespaceObject . store ) . isViewportMatch ( 'large' ) ,
showIconLabels : get ( 'core' , 'showIconLabels' )
2022-04-11 08:04:30 -04:00
} ;
} , [ identifier , scope ] ) ;
useAdjustComplementaryListener ( scope , identifier , activeArea , isActive , isSmall ) ;
const {
enableComplementaryArea ,
disableComplementaryArea ,
pinItem ,
unpinItem
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2023-06-27 10:24:19 -04:00
// Set initial visibility: For large screens, enable if it's active by
// default. For small screens, always initially disable.
2022-04-11 08:04:30 -04:00
if ( isActiveByDefault && activeArea === undefined && ! isSmall ) {
enableComplementaryArea ( scope , identifier ) ;
2023-06-27 10:24:19 -04:00
} else if ( activeArea === undefined && isSmall ) {
disableComplementaryArea ( scope , identifier ) ;
2022-04-11 08:04:30 -04:00
}
2024-05-23 15:39:28 -04:00
setIsReady ( true ) ;
2023-09-26 10:23:26 -04:00
} , [ activeArea , isActiveByDefault , scope , identifier , isSmall , enableComplementaryArea , disableComplementaryArea ] ) ;
2024-05-23 15:39:28 -04:00
if ( ! isReady ) {
return ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ isPinnable && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( pinned _items , {
scope : scope ,
children : isPinned && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( complementary _area _toggle , {
scope : scope ,
identifier : identifier ,
isPressed : isActive && ( ! showIconLabels || isLarge ) ,
"aria-expanded" : isActive ,
"aria-disabled" : isLoading ,
label : title ,
icon : showIconLabels ? library _check : icon ,
showTooltip : ! showIconLabels ,
variant : showIconLabels ? 'tertiary' : undefined ,
size : "compact"
} )
} ) , name && isPinnable && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ComplementaryAreaMoreMenuItem , {
target : name ,
scope : scope ,
icon : icon ,
children : title
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( ComplementaryAreaFill , {
activeArea : activeArea ,
isActive : isActive ,
className : dist _clsx ( 'interface-complementary-area' , className ) ,
scope : scope ,
id : identifier . replace ( '/' , ':' ) ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( complementary _area _header , {
className : headerClassName ,
closeLabel : closeLabel ,
onClose : ( ) => disableComplementaryArea ( scope ) ,
smallScreenTitle : smallScreenTitle ,
toggleButtonProps : {
label : closeLabel ,
size : 'small' ,
shortcut : toggleShortcut ,
scope ,
identifier
} ,
children : header || /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h2" , {
className : "interface-complementary-area-header__title" ,
children : title
} ) , isPinnable && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
className : "interface-complementary-area__pin-unpin-item" ,
icon : isPinned ? star _filled : star _empty ,
label : isPinned ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Unpin from toolbar' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Pin to toolbar' ) ,
onClick : ( ) => ( isPinned ? unpinItem : pinItem ) ( scope , identifier ) ,
isPressed : isPinned ,
"aria-expanded" : isPinned ,
size : "compact"
} ) ]
} )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Panel , {
className : panelClassName ,
children : children
} ) ]
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
const ComplementaryAreaWrapped = complementary _area _context ( ComplementaryArea ) ;
ComplementaryAreaWrapped . Slot = ComplementaryAreaSlot ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const complementary _area = ( ComplementaryAreaWrapped ) ;
2021-05-25 04:40:25 -04:00
2023-02-07 02:04:52 -05:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/navigable-region/index.js
/ * *
* External dependencies
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function NavigableRegion ( {
children ,
className ,
ariaLabel ,
as : Tag = 'div' ,
... props
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Tag , {
2024-05-23 15:39:28 -04:00
className : dist _clsx ( 'interface-navigable-region' , className ) ,
2023-02-07 02:04:52 -05:00
"aria-label" : ariaLabel ,
role : "region" ,
2023-06-27 10:24:19 -04:00
tabIndex : "-1" ,
2024-05-31 14:59:00 -04:00
... props ,
children : children
} ) ;
2023-02-07 02:04:52 -05:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js
/ * *
* External dependencies
* /
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2023-02-07 02:04:52 -05:00
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2024-05-23 15:39:28 -04:00
const interface _skeleton _ANIMATION _DURATION = 0.25 ;
2024-05-31 14:59:00 -04:00
const commonTransition = {
type : 'tween' ,
duration : interface _skeleton _ANIMATION _DURATION ,
ease : [ 0.6 , 0 , 0.4 , 1 ]
} ;
2022-04-11 08:04:30 -04:00
function useHTMLClass ( className ) {
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
const element = document && document . querySelector ( ` html:not(. ${ className } ) ` ) ;
if ( ! element ) {
return ;
}
element . classList . toggle ( className ) ;
return ( ) => {
element . classList . toggle ( className ) ;
} ;
} , [ className ] ) ;
}
2023-06-27 10:24:19 -04:00
const headerVariants = {
hidden : {
2024-05-31 14:59:00 -04:00
opacity : 1 ,
marginTop : - 60
} ,
visible : {
opacity : 1 ,
marginTop : 0
2023-06-27 10:24:19 -04:00
} ,
2024-05-31 14:59:00 -04:00
distractionFreeHover : {
2023-06-27 10:24:19 -04:00
opacity : 1 ,
2024-05-31 14:59:00 -04:00
marginTop : 0 ,
2023-06-27 10:24:19 -04:00
transition : {
2024-05-31 14:59:00 -04:00
... commonTransition ,
2023-06-27 10:24:19 -04:00
delay : 0.2 ,
delayChildren : 0.2
}
} ,
2024-05-31 14:59:00 -04:00
distractionFreeHidden : {
opacity : 0 ,
marginTop : - 60
} ,
distractionFreeDisabled : {
opacity : 0 ,
marginTop : 0 ,
2023-06-27 10:24:19 -04:00
transition : {
2024-05-31 14:59:00 -04:00
... commonTransition ,
delay : 0.8 ,
delayChildren : 0.8
2023-06-27 10:24:19 -04:00
}
}
} ;
function InterfaceSkeleton ( {
isDistractionFree ,
footer ,
header ,
editorNotices ,
sidebar ,
secondarySidebar ,
content ,
actions ,
labels ,
className ,
enableRegionNavigation = true ,
// Todo: does this need to be a prop.
// Can we use a dependency to keyboard-shortcuts directly?
shortcuts
} , ref ) {
2024-05-23 15:39:28 -04:00
const [ secondarySidebarResizeListener , secondarySidebarSize ] = ( 0 , external _wp _compose _namespaceObject . useResizeObserver ) ( ) ;
const isMobileViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' , '<' ) ;
const disableMotion = ( 0 , external _wp _compose _namespaceObject . useReducedMotion ) ( ) ;
const defaultTransition = {
type : 'tween' ,
duration : disableMotion ? 0 : interface _skeleton _ANIMATION _DURATION ,
ease : [ 0.6 , 0 , 0.4 , 1 ]
} ;
2022-04-11 08:04:30 -04:00
const navigateRegionsProps = ( 0 , external _wp _components _namespaceObject . _ _unstableUseNavigateRegions ) ( shortcuts ) ;
useHTMLClass ( 'interface-interface-skeleton__html-container' ) ;
const defaultLabels = {
/* translators: accessibility text for the top bar landmark region. */
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
header : ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'Header' , 'header landmark area' ) ,
2022-04-11 08:04:30 -04:00
/* translators: accessibility text for the content landmark region. */
body : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Content' ) ,
/* translators: accessibility text for the secondary sidebar landmark region. */
secondarySidebar : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block Library' ) ,
/* translators: accessibility text for the settings landmark region. */
sidebar : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Settings' ) ,
/* translators: accessibility text for the publish landmark region. */
actions : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Publish' ) ,
/* translators: accessibility text for the footer landmark region. */
footer : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Footer' )
} ;
2023-09-26 10:23:26 -04:00
const mergedLabels = {
... defaultLabels ,
2022-04-11 08:04:30 -04:00
... labels
} ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
2023-09-26 10:23:26 -04:00
... ( enableRegionNavigation ? navigateRegionsProps : { } ) ,
2023-02-07 02:04:52 -05:00
ref : ( 0 , external _wp _compose _namespaceObject . useMergeRefs ) ( [ ref , enableRegionNavigation ? navigateRegionsProps . ref : undefined ] ) ,
2024-05-31 14:59:00 -04:00
className : dist _clsx ( className , 'interface-interface-skeleton' , navigateRegionsProps . className , ! ! footer && 'has-footer' ) ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "interface-interface-skeleton__editor" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . _ _unstableAnimatePresence , {
initial : false ,
children : ! ! header && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( NavigableRegion , {
as : external _wp _components _namespaceObject . _ _unstableMotion . div ,
className : "interface-interface-skeleton__header" ,
"aria-label" : mergedLabels . header ,
initial : isDistractionFree ? 'distractionFreeHidden' : 'hidden' ,
whileHover : isDistractionFree ? 'distractionFreeHover' : 'visible' ,
animate : isDistractionFree ? 'distractionFreeDisabled' : 'visible' ,
exit : isDistractionFree ? 'distractionFreeHidden' : 'hidden' ,
variants : headerVariants ,
transition : defaultTransition ,
children : header
} )
} ) , isDistractionFree && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "interface-interface-skeleton__header" ,
children : editorNotices
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "interface-interface-skeleton__body" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . _ _unstableAnimatePresence , {
initial : false ,
children : ! ! secondarySidebar && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( NavigableRegion , {
className : "interface-interface-skeleton__secondary-sidebar" ,
ariaLabel : mergedLabels . secondarySidebar ,
as : external _wp _components _namespaceObject . _ _unstableMotion . div ,
initial : "closed" ,
animate : isMobileViewport ? 'mobileOpen' : 'open' ,
exit : "closed" ,
variants : {
open : {
width : secondarySidebarSize . width
} ,
closed : {
width : 0
} ,
mobileOpen : {
width : '100vw'
}
} ,
transition : defaultTransition ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
style : {
position : 'absolute' ,
width : isMobileViewport ? '100vw' : 'fit-content' ,
height : '100%' ,
right : 0
} ,
children : [ secondarySidebarResizeListener , secondarySidebar ]
} )
} )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( NavigableRegion , {
className : "interface-interface-skeleton__content" ,
ariaLabel : mergedLabels . body ,
children : content
} ) , ! ! sidebar && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( NavigableRegion , {
className : "interface-interface-skeleton__sidebar" ,
ariaLabel : mergedLabels . sidebar ,
children : sidebar
} ) , ! ! actions && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( NavigableRegion , {
className : "interface-interface-skeleton__actions" ,
ariaLabel : mergedLabels . actions ,
children : actions
} ) ]
} ) ]
} ) , ! ! footer && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( NavigableRegion , {
className : "interface-interface-skeleton__footer" ,
ariaLabel : mergedLabels . footer ,
children : footer
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const interface _skeleton = ( ( 0 , external _wp _element _namespaceObject . forwardRef ) ( InterfaceSkeleton ) ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","blockEditor"]
2024-01-31 07:59:56 -05:00
const external _wp _blockEditor _namespaceObject = window [ "wp" ] [ "blockEditor" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/transformers.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 15:08:24 -04:00
2023-09-26 10:23:26 -04:00
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 15:08:24 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Converts a widget entity record into a block .
*
* @ param { Object } widget The widget entity record .
* @ return { Object } a block ( converted from the entity record ) .
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 15:08:24 -04:00
* /
2022-04-11 08:04:30 -04:00
function transformWidgetToBlock ( widget ) {
if ( widget . id _base === 'block' ) {
2022-09-20 11:43:29 -04:00
const parsedBlocks = ( 0 , external _wp _blocks _namespaceObject . parse ) ( widget . instance . raw . content , {
_ _unstableSkipAutop : true
} ) ;
2022-04-11 08:04:30 -04:00
if ( ! parsedBlocks . length ) {
return ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) ( ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/paragraph' , { } , [ ] ) , widget . id ) ;
}
return ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) ( parsedBlocks [ 0 ] , widget . id ) ;
}
let attributes ;
if ( widget . _embedded . about [ 0 ] . is _multi ) {
attributes = {
idBase : widget . id _base ,
instance : widget . instance
} ;
} else {
attributes = {
id : widget . id
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 15:08:24 -04:00
} ;
}
2022-04-11 08:04:30 -04:00
return ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) ( ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/legacy-widget' , attributes , [ ] ) , widget . id ) ;
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Converts a block to a widget entity record .
*
* @ param { Object } block The block .
* @ param { Object ? } relatedWidget A related widget entity record from the API ( optional ) .
* @ return { Object } the widget object ( converted from block ) .
* /
2023-06-27 10:24:19 -04:00
function transformBlockToWidget ( block , relatedWidget = { } ) {
2022-04-11 08:04:30 -04:00
let widget ;
const isValidLegacyWidgetBlock = block . name === 'core/legacy-widget' && ( block . attributes . id || block . attributes . instance ) ;
if ( isValidLegacyWidgetBlock ) {
var _block$attributes$id , _block$attributes$idB , _block$attributes$ins ;
2023-09-26 10:23:26 -04:00
widget = {
... relatedWidget ,
2022-04-11 08:04:30 -04:00
id : ( _block$attributes$id = block . attributes . id ) !== null && _block$attributes$id !== void 0 ? _block$attributes$id : relatedWidget . id ,
id _base : ( _block$attributes$idB = block . attributes . idBase ) !== null && _block$attributes$idB !== void 0 ? _block$attributes$idB : relatedWidget . id _base ,
instance : ( _block$attributes$ins = block . attributes . instance ) !== null && _block$attributes$ins !== void 0 ? _block$attributes$ins : relatedWidget . instance
} ;
} else {
2023-09-26 10:23:26 -04:00
widget = {
... relatedWidget ,
2022-04-11 08:04:30 -04:00
id _base : 'block' ,
instance : {
raw : {
content : ( 0 , external _wp _blocks _namespaceObject . serialize ) ( block )
}
}
} ;
2023-09-26 10:23:26 -04:00
}
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 15:08:24 -04:00
2023-09-26 10:23:26 -04:00
// Delete read-only properties.
2022-04-11 08:04:30 -04:00
delete widget . rendered ;
delete widget . rendered _form ;
return widget ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 15:08:24 -04:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/utils.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* "Kind" of the navigation post .
*
* @ type { string }
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const KIND = 'root' ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* "post type" of the navigation post .
*
* @ type { string }
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const WIDGET _AREA _ENTITY _TYPE = 'sidebar' ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* "post type" of the widget area post .
*
* @ type { string }
* /
const POST _TYPE = 'postType' ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Builds an ID for a new widget area post .
*
* @ param { number } widgetAreaId Widget area id .
* @ return { string } An ID .
* /
const buildWidgetAreaPostId = widgetAreaId => ` widget-area- ${ widgetAreaId } ` ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Builds an ID for a global widget areas post .
*
* @ return { string } An ID .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const buildWidgetAreasPostId = ( ) => ` widget-areas ` ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Builds a query to resolve sidebars .
*
* @ return { Object } Query .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
function buildWidgetAreasQuery ( ) {
return {
per _page : - 1
} ;
}
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Builds a query to resolve widgets .
2021-05-25 04:40:25 -04:00
*
2022-04-11 08:04:30 -04:00
* @ return { Object } Query .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
function buildWidgetsQuery ( ) {
return {
per _page : - 1 ,
_embed : 'about'
} ;
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Creates a stub post with given id and set of blocks . Used as a governing entity records
* for all widget areas .
*
* @ param { string } id Post ID .
* @ param { Array } blocks The list of blocks .
* @ return { Object } A stub post object formatted in compliance with the data layer .
* /
const createStubPost = ( id , blocks ) => ( {
id ,
slug : id ,
status : 'draft' ,
type : 'page' ,
blocks ,
meta : {
widgetAreaId : id
2021-07-06 10:38:40 -04:00
}
2022-04-11 08:04:30 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/constants.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Module Constants
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const constants _STORE _NAME = 'core/edit-widgets' ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/actions.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* Internal dependencies
* /
2022-04-11 08:04:30 -04:00
/ * *
* Persists a stub post with given ID to core data store . The post is meant to be in - memory only and
* shouldn ' t be saved via the API .
*
* @ param { string } id Post ID .
* @ param { Array } blocks Blocks the post should consist of .
* @ return { Object } The post object .
* /
2023-06-27 10:24:19 -04:00
const persistStubPost = ( id , blocks ) => ( {
registry
} ) => {
2022-04-11 08:04:30 -04:00
const stubPost = createStubPost ( id , blocks ) ;
registry . dispatch ( external _wp _coreData _namespaceObject . store ) . receiveEntityRecords ( KIND , POST _TYPE , stubPost , {
id : stubPost . id
} , false ) ;
return stubPost ;
} ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Converts all the blocks from edited widget areas into widgets ,
* and submits a batch request to save everything at once .
*
* Creates a snackbar notice on either success or error .
*
* @ return { Function } An action creator .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
const saveEditedWidgetAreas = ( ) => async ( {
select ,
dispatch ,
registry
} ) => {
2022-04-11 08:04:30 -04:00
const editedWidgetAreas = select . getEditedWidgetAreas ( ) ;
2023-06-27 10:24:19 -04:00
if ( ! editedWidgetAreas ? . length ) {
2022-04-11 08:04:30 -04:00
return ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
try {
await dispatch . saveWidgetAreas ( editedWidgetAreas ) ;
registry . dispatch ( external _wp _notices _namespaceObject . store ) . createSuccessNotice ( ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets saved.' ) , {
type : 'snackbar'
} ) ;
} catch ( e ) {
2023-09-26 10:23:26 -04:00
registry . dispatch ( external _wp _notices _namespaceObject . store ) . createErrorNotice ( /* translators: %s: The error message. */
2022-04-11 08:04:30 -04:00
( 0 , external _wp _i18n _namespaceObject . sprintf ) ( ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'There was an error. %s' ) , e . message ) , {
type : 'snackbar'
} ) ;
}
} ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Converts all the blocks from specified widget areas into widgets ,
* and submits a batch request to save everything at once .
*
* @ param { Object [ ] } widgetAreas Widget areas to save .
* @ return { Function } An action creator .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
const saveWidgetAreas = widgetAreas => async ( {
dispatch ,
registry
} ) => {
2022-04-11 08:04:30 -04:00
try {
for ( const widgetArea of widgetAreas ) {
await dispatch . saveWidgetArea ( widgetArea . id ) ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
} finally {
2022-04-12 11:12:47 -04:00
// saveEditedEntityRecord resets the resolution status, let's fix it manually.
2022-04-11 08:04:30 -04:00
await registry . dispatch ( external _wp _coreData _namespaceObject . store ) . finishResolution ( 'getEntityRecord' , KIND , WIDGET _AREA _ENTITY _TYPE , buildWidgetAreasQuery ( ) ) ;
}
} ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Converts all the blocks from a widget area specified by ID into widgets ,
* and submits a batch request to save everything at once .
*
* @ param { string } widgetAreaId ID of the widget area to process .
* @ return { Function } An action creator .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
const saveWidgetArea = widgetAreaId => async ( {
dispatch ,
select ,
registry
} ) => {
2022-04-11 08:04:30 -04:00
const widgets = select . getWidgets ( ) ;
2023-09-26 10:23:26 -04:00
const post = registry . select ( external _wp _coreData _namespaceObject . store ) . getEditedEntityRecord ( KIND , POST _TYPE , buildWidgetAreaPostId ( widgetAreaId ) ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Get all widgets from this area
2023-06-27 10:24:19 -04:00
const areaWidgets = Object . values ( widgets ) . filter ( ( {
sidebar
2023-09-26 10:23:26 -04:00
} ) => sidebar === widgetAreaId ) ;
// Remove all duplicate reference widget instances for legacy widgets.
2022-04-11 08:04:30 -04:00
// Why? We filter out the widgets with duplicate IDs to prevent adding more than one instance of a widget
// implemented using a function. WordPress doesn't support having more than one instance of these, if you try to
// save multiple instances of these in different sidebars you will run into undefined behaviors.
const usedReferenceWidgets = [ ] ;
const widgetsBlocks = post . blocks . filter ( block => {
2021-05-25 04:40:25 -04:00
const {
2022-04-11 08:04:30 -04:00
id
} = block . attributes ;
if ( block . name === 'core/legacy-widget' && id ) {
if ( usedReferenceWidgets . includes ( id ) ) {
return false ;
}
usedReferenceWidgets . push ( id ) ;
}
return true ;
2023-09-26 10:23:26 -04:00
} ) ;
// Determine which widgets have been deleted. We can tell if a widget is
2022-04-11 08:04:30 -04:00
// deleted and not just moved to a different area by looking to see if
// getWidgetAreaForWidgetId() finds something.
const deletedWidgets = [ ] ;
for ( const widget of areaWidgets ) {
const widgetsNewArea = select . getWidgetAreaForWidgetId ( widget . id ) ;
if ( ! widgetsNewArea ) {
deletedWidgets . push ( widget ) ;
}
}
const batchMeta = [ ] ;
const batchTasks = [ ] ;
const sidebarWidgetsIds = [ ] ;
for ( let i = 0 ; i < widgetsBlocks . length ; i ++ ) {
const block = widgetsBlocks [ i ] ;
const widgetId = ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) ;
const oldWidget = widgets [ widgetId ] ;
2023-09-26 10:23:26 -04:00
const widget = transformBlockToWidget ( block , oldWidget ) ;
// We'll replace the null widgetId after save, but we track it here
2022-04-11 08:04:30 -04:00
// since order is important.
2023-09-26 10:23:26 -04:00
sidebarWidgetsIds . push ( widgetId ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Check oldWidget as widgetId might refer to an ID which has been
2022-04-11 08:04:30 -04:00
// deleted, e.g. if a deleted block is restored via undo after saving.
if ( oldWidget ) {
// Update an existing widget.
2023-09-26 10:23:26 -04:00
registry . dispatch ( external _wp _coreData _namespaceObject . store ) . editEntityRecord ( 'root' , 'widget' , widgetId , {
... widget ,
2022-04-11 08:04:30 -04:00
sidebar : widgetAreaId
} , {
undoIgnore : true
} ) ;
const hasEdits = registry . select ( external _wp _coreData _namespaceObject . store ) . hasEditsForEntityRecord ( 'root' , 'widget' , widgetId ) ;
if ( ! hasEdits ) {
continue ;
}
2023-06-27 10:24:19 -04:00
batchTasks . push ( ( {
saveEditedEntityRecord
} ) => saveEditedEntityRecord ( 'root' , 'widget' , widgetId ) ) ;
2022-04-11 08:04:30 -04:00
} else {
// Create a new widget.
2023-06-27 10:24:19 -04:00
batchTasks . push ( ( {
saveEntityRecord
2023-09-26 10:23:26 -04:00
} ) => saveEntityRecord ( 'root' , 'widget' , {
... widget ,
2023-06-27 10:24:19 -04:00
sidebar : widgetAreaId
} ) ) ;
2022-04-11 08:04:30 -04:00
}
batchMeta . push ( {
block ,
position : i ,
clientId : block . clientId
} ) ;
}
for ( const widget of deletedWidgets ) {
2023-06-27 10:24:19 -04:00
batchTasks . push ( ( {
deleteEntityRecord
} ) => deleteEntityRecord ( 'root' , 'widget' , widget . id , {
force : true
} ) ) ;
2022-04-11 08:04:30 -04:00
}
const records = await registry . dispatch ( external _wp _coreData _namespaceObject . store ) . _ _experimentalBatch ( batchTasks ) ;
const preservedRecords = records . filter ( record => ! record . hasOwnProperty ( 'deleted' ) ) ;
const failedWidgetNames = [ ] ;
for ( let i = 0 ; i < preservedRecords . length ; i ++ ) {
const widget = preservedRecords [ i ] ;
const {
block ,
position
2023-09-26 10:23:26 -04:00
} = batchMeta [ i ] ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Set __internalWidgetId on the block. This will be persisted to the
// store when we dispatch receiveEntityRecords( post ) below.
2022-04-11 08:04:30 -04:00
post . blocks [ position ] . attributes . _ _internalWidgetId = widget . id ;
const error = registry . select ( external _wp _coreData _namespaceObject . store ) . getLastEntitySaveError ( 'root' , 'widget' , widget . id ) ;
if ( error ) {
2023-06-27 10:24:19 -04:00
failedWidgetNames . push ( block . attributes ? . name || block ? . name ) ;
2022-04-11 08:04:30 -04:00
}
if ( ! sidebarWidgetsIds [ position ] ) {
sidebarWidgetsIds [ position ] = widget . id ;
}
}
if ( failedWidgetNames . length ) {
2023-09-26 10:23:26 -04:00
throw new Error ( ( 0 , external _wp _i18n _namespaceObject . sprintf ) ( /* translators: %s: List of widget names */
2022-04-11 08:04:30 -04:00
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Could not save the following widgets: %s.' ) , failedWidgetNames . join ( ', ' ) ) ) ;
}
registry . dispatch ( external _wp _coreData _namespaceObject . store ) . editEntityRecord ( KIND , WIDGET _AREA _ENTITY _TYPE , widgetAreaId , {
widgets : sidebarWidgetsIds
} , {
undoIgnore : true
2021-05-25 04:40:25 -04:00
} ) ;
2022-04-11 08:04:30 -04:00
dispatch ( trySaveWidgetArea ( widgetAreaId ) ) ;
registry . dispatch ( external _wp _coreData _namespaceObject . store ) . receiveEntityRecords ( KIND , POST _TYPE , post , undefined ) ;
2021-05-25 04:40:25 -04:00
} ;
2023-06-27 10:24:19 -04:00
const trySaveWidgetArea = widgetAreaId => ( {
registry
} ) => {
2022-04-12 11:12:47 -04:00
registry . dispatch ( external _wp _coreData _namespaceObject . store ) . saveEditedEntityRecord ( KIND , WIDGET _AREA _ENTITY _TYPE , widgetAreaId , {
throwOnError : true
} ) ;
2022-04-11 08:04:30 -04:00
} ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Sets the clientId stored for a particular widgetId .
*
* @ param { number } clientId Client id .
* @ param { number } widgetId Widget id .
*
* @ return { Object } Action .
* /
function setWidgetIdForClientId ( clientId , widgetId ) {
return {
type : 'SET_WIDGET_ID_FOR_CLIENT_ID' ,
clientId ,
widgetId
} ;
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Sets the open state of all the widget areas .
*
* @ param { Object } widgetAreasOpenState The open states of all the widget areas .
*
* @ return { Object } Action .
* /
function setWidgetAreasOpenState ( widgetAreasOpenState ) {
return {
type : 'SET_WIDGET_AREAS_OPEN_STATE' ,
widgetAreasOpenState
} ;
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Sets the open state of the widget area .
*
* @ param { string } clientId The clientId of the widget area .
* @ param { boolean } isOpen Whether the widget area should be opened .
*
* @ return { Object } Action .
* /
function setIsWidgetAreaOpen ( clientId , isOpen ) {
return {
type : 'SET_IS_WIDGET_AREA_OPEN' ,
clientId ,
isOpen
} ;
2021-05-25 04:40:25 -04:00
}
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Returns an action object used to open / close the inserter .
*
* @ param { boolean | Object } value Whether the inserter should be
* opened ( true ) or closed ( false ) .
* To specify an insertion point ,
* use an object .
* @ param { string } value . rootClientId The root client ID to insert at .
* @ param { number } value . insertionIndex The index to insert at .
*
* @ return { Object } Action object .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
function setIsInserterOpened ( value ) {
return {
type : 'SET_IS_INSERTER_OPENED' ,
value
} ;
}
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Returns an action object used to open / close the list view .
*
* @ param { boolean } isOpen A boolean representing whether the list view should be opened or closed .
* @ return { Object } Action object .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
function setIsListViewOpened ( isOpen ) {
return {
type : 'SET_IS_LIST_VIEW_OPENED' ,
isOpen
} ;
2021-05-25 04:40:25 -04:00
}
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Returns an action object signalling that the user closed the sidebar .
*
* @ return { Object } Action creator .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
const closeGeneralSidebar = ( ) => ( {
registry
} ) => {
2022-04-11 08:04:30 -04:00
registry . dispatch ( store ) . disableComplementaryArea ( constants _STORE _NAME ) ;
} ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Action that handles moving a block between widget areas
*
* @ param { string } clientId The clientId of the block to move .
* @ param { string } widgetAreaId The id of the widget area to move the block to .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
const moveBlockToWidgetArea = ( clientId , widgetAreaId ) => async ( {
dispatch ,
select ,
registry
} ) => {
2023-09-26 10:23:26 -04:00
const sourceRootClientId = registry . select ( external _wp _blockEditor _namespaceObject . store ) . getBlockRootClientId ( clientId ) ;
// Search the top level blocks (widget areas) for the one with the matching
2022-04-11 08:04:30 -04:00
// id attribute. Makes the assumption that all top-level blocks are widget
// areas.
const widgetAreas = registry . select ( external _wp _blockEditor _namespaceObject . store ) . getBlocks ( ) ;
2023-06-27 10:24:19 -04:00
const destinationWidgetAreaBlock = widgetAreas . find ( ( {
attributes
} ) => attributes . id === widgetAreaId ) ;
2023-09-26 10:23:26 -04:00
const destinationRootClientId = destinationWidgetAreaBlock . clientId ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Get the index for moving to the end of the destination widget area.
2022-04-11 08:04:30 -04:00
const destinationInnerBlocksClientIds = registry . select ( external _wp _blockEditor _namespaceObject . store ) . getBlockOrder ( destinationRootClientId ) ;
2023-09-26 10:23:26 -04:00
const destinationIndex = destinationInnerBlocksClientIds . length ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Reveal the widget area, if it's not open.
2022-04-11 08:04:30 -04:00
const isDestinationWidgetAreaOpen = select . getIsWidgetAreaOpen ( destinationRootClientId ) ;
if ( ! isDestinationWidgetAreaOpen ) {
dispatch . setIsWidgetAreaOpen ( destinationRootClientId , true ) ;
2023-09-26 10:23:26 -04:00
}
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Move the block.
2022-04-11 08:04:30 -04:00
registry . dispatch ( external _wp _blockEditor _namespaceObject . store ) . moveBlocksToPosition ( [ clientId ] , sourceRootClientId , destinationRootClientId , destinationIndex ) ;
} ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/resolvers.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Creates a "stub" widgets post reflecting all available widget areas . The
* post is meant as a convenient to only exists in runtime and should never be saved . It
* enables a convenient way of editing the widgets by using a regular post editor .
*
* Fetches all widgets from all widgets aras , converts them into blocks , and hydrates a new post with them .
*
* @ return { Function } An action creator .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
const getWidgetAreas = ( ) => async ( {
dispatch ,
registry
} ) => {
2022-04-11 08:04:30 -04:00
const query = buildWidgetAreasQuery ( ) ;
const widgetAreas = await registry . resolveSelect ( external _wp _coreData _namespaceObject . store ) . getEntityRecords ( KIND , WIDGET _AREA _ENTITY _TYPE , query ) ;
const widgetAreaBlocks = [ ] ;
const sortedWidgetAreas = widgetAreas . sort ( ( a , b ) => {
if ( a . id === 'wp_inactive_widgets' ) {
return 1 ;
}
if ( b . id === 'wp_inactive_widgets' ) {
return - 1 ;
}
return 0 ;
} ) ;
for ( const widgetArea of sortedWidgetAreas ) {
widgetAreaBlocks . push ( ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/widget-area' , {
id : widgetArea . id ,
name : widgetArea . name
} ) ) ;
if ( ! widgetArea . widgets . length ) {
// If this widget area has no widgets, it won't get a post setup by
// the getWidgets resolver.
dispatch ( persistStubPost ( buildWidgetAreaPostId ( widgetArea . id ) , [ ] ) ) ;
}
}
const widgetAreasOpenState = { } ;
widgetAreaBlocks . forEach ( ( widgetAreaBlock , index ) => {
// Defaults to open the first widget area.
widgetAreasOpenState [ widgetAreaBlock . clientId ] = index === 0 ;
2021-05-25 04:40:25 -04:00
} ) ;
2022-04-11 08:04:30 -04:00
dispatch ( setWidgetAreasOpenState ( widgetAreasOpenState ) ) ;
dispatch ( persistStubPost ( buildWidgetAreasPostId ( ) , widgetAreaBlocks ) ) ;
} ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Fetches all widgets from all widgets ares , and groups them by widget area Id .
*
* @ return { Function } An action creator .
* /
2023-06-27 10:24:19 -04:00
const getWidgets = ( ) => async ( {
dispatch ,
registry
} ) => {
2022-04-11 08:04:30 -04:00
const query = buildWidgetsQuery ( ) ;
const widgets = await registry . resolveSelect ( external _wp _coreData _namespaceObject . store ) . getEntityRecords ( 'root' , 'widget' , query ) ;
const groupedBySidebar = { } ;
for ( const widget of widgets ) {
const block = transformWidgetToBlock ( widget ) ;
groupedBySidebar [ widget . sidebar ] = groupedBySidebar [ widget . sidebar ] || [ ] ;
groupedBySidebar [ widget . sidebar ] . push ( block ) ;
}
for ( const sidebarId in groupedBySidebar ) {
if ( groupedBySidebar . hasOwnProperty ( sidebarId ) ) {
// Persist the actual post containing the widget block
dispatch ( persistStubPost ( buildWidgetAreaPostId ( sidebarId ) , groupedBySidebar [ sidebarId ] ) ) ;
}
}
} ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/selectors.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2021-06-22 06:00:50 -04:00
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* Internal dependencies
* /
2023-09-26 10:23:26 -04:00
const EMPTY _INSERTION _POINT = {
rootClientId : undefined ,
insertionIndex : undefined
} ;
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Returns all API widgets .
*
* @ return { Object [ ] } API List of widgets .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const selectors _getWidgets = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
const widgets = select ( external _wp _coreData _namespaceObject . store ) . getEntityRecords ( 'root' , 'widget' , buildWidgetsQuery ( ) ) ;
2023-09-26 10:23:26 -04:00
return (
// Key widgets by their ID.
widgets ? . reduce ( ( allWidgets , widget ) => ( {
... allWidgets ,
2022-09-20 11:43:29 -04:00
[ widget . id ] : widget
2023-06-27 10:24:19 -04:00
} ) , { } ) || { }
2022-09-20 11:43:29 -04:00
) ;
2022-04-11 08:04:30 -04:00
} ) ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns API widget data for a particular widget ID .
*
* @ param { number } id Widget ID .
*
* @ return { Object } API widget data for a particular widget ID .
* /
const getWidget = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , id ) => {
const widgets = select ( constants _STORE _NAME ) . getWidgets ( ) ;
return widgets [ id ] ;
} ) ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns all API widget areas .
*
* @ return { Object [ ] } API List of widget areas .
* /
const selectors _getWidgetAreas = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
const query = buildWidgetAreasQuery ( ) ;
return select ( external _wp _coreData _namespaceObject . store ) . getEntityRecords ( KIND , WIDGET _AREA _ENTITY _TYPE , query ) ;
} ) ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Returns widgetArea containing a block identify by given widgetId
*
* @ param { string } widgetId The ID of the widget .
* @ return { Object } Containing widget area .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const getWidgetAreaForWidgetId = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , widgetId ) => {
const widgetAreas = select ( constants _STORE _NAME ) . getWidgetAreas ( ) ;
return widgetAreas . find ( widgetArea => {
const post = select ( external _wp _coreData _namespaceObject . store ) . getEditedEntityRecord ( KIND , POST _TYPE , buildWidgetAreaPostId ( widgetArea . id ) ) ;
const blockWidgetIds = post . blocks . map ( block => ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) ) ;
return blockWidgetIds . includes ( widgetId ) ;
} ) ;
} ) ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Given a child client id , returns the parent widget area block .
*
* @ param { string } clientId The client id of a block in a widget area .
*
* @ return { WPBlock } The widget area block .
* /
const getParentWidgetAreaBlock = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , clientId ) => {
const {
getBlock ,
getBlockName ,
getBlockParents
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
const blockParents = getBlockParents ( clientId ) ;
const widgetAreaClientId = blockParents . find ( parentClientId => getBlockName ( parentClientId ) === 'core/widget-area' ) ;
return getBlock ( widgetAreaClientId ) ;
} ) ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns all edited widget area entity records .
*
* @ return { Object [ ] } List of edited widget area entity records .
* /
const getEditedWidgetAreas = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , ids ) => {
let widgetAreas = select ( constants _STORE _NAME ) . getWidgetAreas ( ) ;
if ( ! widgetAreas ) {
return [ ] ;
}
if ( ids ) {
2023-06-27 10:24:19 -04:00
widgetAreas = widgetAreas . filter ( ( {
id
} ) => ids . includes ( id ) ) ;
2022-04-11 08:04:30 -04:00
}
2023-06-27 10:24:19 -04:00
return widgetAreas . filter ( ( {
id
} ) => select ( external _wp _coreData _namespaceObject . store ) . hasEditsForEntityRecord ( KIND , POST _TYPE , buildWidgetAreaPostId ( id ) ) ) . map ( ( {
id
} ) => select ( external _wp _coreData _namespaceObject . store ) . getEditedEntityRecord ( KIND , WIDGET _AREA _ENTITY _TYPE , id ) ) ;
2022-04-11 08:04:30 -04:00
} ) ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns all blocks representing reference widgets .
*
* @ param { string } referenceWidgetName Optional . If given , only reference widgets with this name will be returned .
* @ return { Array } List of all blocks representing reference widgets
* /
2023-06-27 10:24:19 -04:00
const getReferenceWidgetBlocks = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , referenceWidgetName = null ) => {
2022-04-11 08:04:30 -04:00
const results = [ ] ;
const widgetAreas = select ( constants _STORE _NAME ) . getWidgetAreas ( ) ;
for ( const _widgetArea of widgetAreas ) {
const post = select ( external _wp _coreData _namespaceObject . store ) . getEditedEntityRecord ( KIND , POST _TYPE , buildWidgetAreaPostId ( _widgetArea . id ) ) ;
for ( const block of post . blocks ) {
2023-06-27 10:24:19 -04:00
if ( block . name === 'core/legacy-widget' && ( ! referenceWidgetName || block . attributes ? . referenceWidgetName === referenceWidgetName ) ) {
2022-04-11 08:04:30 -04:00
results . push ( block ) ;
}
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
}
return results ;
} ) ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns true if any widget area is currently being saved .
*
* @ return { boolean } True if any widget area is currently being saved . False otherwise .
* /
const isSavingWidgetAreas = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
2023-06-27 10:24:19 -04:00
const widgetAreasIds = select ( constants _STORE _NAME ) . getWidgetAreas ( ) ? . map ( ( {
id
} ) => id ) ;
2022-04-11 08:04:30 -04:00
if ( ! widgetAreasIds ) {
return false ;
}
for ( const id of widgetAreasIds ) {
const isSaving = select ( external _wp _coreData _namespaceObject . store ) . isSavingEntityRecord ( KIND , WIDGET _AREA _ENTITY _TYPE , id ) ;
if ( isSaving ) {
return true ;
}
}
const widgetIds = [ ... Object . keys ( select ( constants _STORE _NAME ) . getWidgets ( ) ) , undefined // account for new widgets without an ID
] ;
for ( const id of widgetIds ) {
const isSaving = select ( external _wp _coreData _namespaceObject . store ) . isSavingEntityRecord ( 'root' , 'widget' , id ) ;
if ( isSaving ) {
return true ;
}
}
return false ;
} ) ;
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Gets whether the widget area is opened .
*
* @ param { Array } state The open state of the widget areas .
* @ param { string } clientId The clientId of the widget area .
*
* @ return { boolean } True if the widget area is open .
2021-11-08 09:29:21 -05:00
* /
2022-04-11 08:04:30 -04:00
const getIsWidgetAreaOpen = ( state , clientId ) => {
const {
widgetAreasOpenState
} = state ;
return ! ! widgetAreasOpenState [ clientId ] ;
} ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns true if the inserter is opened .
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether the inserter is opened .
* /
function isInserterOpened ( state ) {
return ! ! state . blockInserterPanel ;
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Get the insertion point for the inserter .
*
* @ param { Object } state Global application state .
*
* @ return { Object } The root client ID and index to insert at .
* /
function _ _experimentalGetInsertionPoint ( state ) {
2023-09-26 10:23:26 -04:00
if ( typeof state . blockInserterPanel === 'boolean' ) {
return EMPTY _INSERTION _POINT ;
}
return state . blockInserterPanel ;
2021-11-08 09:29:21 -05:00
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns true if a block can be inserted into a widget area .
*
* @ param { Array } state The open state of the widget areas .
* @ param { string } blockName The name of the block being inserted .
*
* @ return { boolean } True if the block can be inserted in a widget area .
* /
const canInsertBlockInWidgetArea = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , blockName ) => {
// Widget areas are always top-level blocks, which getBlocks will return.
2023-09-26 10:23:26 -04:00
const widgetAreas = select ( external _wp _blockEditor _namespaceObject . store ) . getBlocks ( ) ;
// Makes an assumption that a block that can be inserted into one
2022-04-11 08:04:30 -04:00
// widget area can be inserted into any widget area. Uses the first
// widget area for testing whether the block can be inserted.
const [ firstWidgetArea ] = widgetAreas ;
return select ( external _wp _blockEditor _namespaceObject . store ) . canInsertBlockType ( blockName , firstWidgetArea . clientId ) ;
} ) ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Returns true if the list view is opened .
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether the list view is opened .
* /
function isListViewOpened ( state ) {
return state . listViewPanel ;
}
2021-11-08 09:29:21 -05:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/private-selectors.js
function getListViewToggleRef ( state ) {
return state . listViewToggleRef ;
}
2024-05-23 15:39:28 -04:00
function getInserterSidebarToggleRef ( state ) {
return state . inserterSidebarToggleRef ;
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
; // CONCATENATED MODULE: external ["wp","privateApis"]
2024-01-31 07:59:56 -05:00
const external _wp _privateApis _namespaceObject = window [ "wp" ] [ "privateApis" ] ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/lock-unlock.js
/ * *
* WordPress dependencies
* /
const {
lock ,
unlock
2024-06-18 09:19:30 -04:00
} = ( 0 , external _wp _privateApis _namespaceObject . _ _dangerousOptInToUnstableAPIsOnlyForCoreModules ) ( 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.' , '@wordpress/edit-widgets' ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/index.js
2021-11-08 09:29:21 -05:00
/ * *
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Block editor data store configuration .
*
2022-04-12 11:12:47 -04:00
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#register
2022-04-11 08:04:30 -04:00
*
* @ type { Object }
2021-11-08 09:29:21 -05:00
* /
2022-04-11 08:04:30 -04:00
const storeConfig = {
2022-04-12 11:12:47 -04:00
reducer : reducer ,
2022-04-11 08:04:30 -04:00
selectors : store _selectors _namespaceObject ,
resolvers : resolvers _namespaceObject ,
2022-04-12 11:12:47 -04:00
actions : store _actions _namespaceObject
2022-04-11 08:04:30 -04:00
} ;
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Store definition for the edit widgets namespace .
*
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @ type { Object }
2021-11-08 09:29:21 -05:00
* /
2022-04-12 11:12:47 -04:00
const store _store = ( 0 , external _wp _data _namespaceObject . createReduxStore ) ( constants _STORE _NAME , storeConfig ) ;
2023-09-26 10:23:26 -04:00
( 0 , external _wp _data _namespaceObject . register ) ( store _store ) ;
// This package uses a few in-memory post types as wrappers for convenience.
2022-04-11 08:04:30 -04:00
// This middleware prevents any network requests related to these types as they are
// bound to fail anyway.
external _wp _apiFetch _default ( ) . use ( function ( options , next ) {
2023-06-27 10:24:19 -04:00
if ( options . path ? . indexOf ( '/wp/v2/types/widget-area' ) === 0 ) {
2022-04-11 08:04:30 -04:00
return Promise . resolve ( { } ) ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
return next ( options ) ;
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
unlock ( store _store ) . registerPrivateSelectors ( private _selectors _namespaceObject ) ;
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","hooks"]
2024-01-31 07:59:56 -05:00
const external _wp _hooks _namespaceObject = window [ "wp" ] [ "hooks" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/move-to-widget-area.js
2021-11-08 09:29:21 -05:00
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
const withMoveToWidgetAreaToolbarItem = ( 0 , external _wp _compose _namespaceObject . createHigherOrderComponent ) ( BlockEdit => props => {
2021-05-25 04:40:25 -04:00
const {
2022-04-11 08:04:30 -04:00
clientId ,
name : blockName
} = props ;
2021-05-25 04:40:25 -04:00
const {
2022-04-11 08:04:30 -04:00
widgetAreas ,
currentWidgetAreaId ,
canInsertBlockInWidgetArea
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
// Component won't display for a widget area, so don't run selectors.
if ( blockName === 'core/widget-area' ) {
return { } ;
2021-06-22 06:00:50 -04:00
}
2022-04-11 08:04:30 -04:00
const selectors = select ( store _store ) ;
const widgetAreaBlock = selectors . getParentWidgetAreaBlock ( clientId ) ;
return {
widgetAreas : selectors . getWidgetAreas ( ) ,
2023-06-27 10:24:19 -04:00
currentWidgetAreaId : widgetAreaBlock ? . attributes ? . id ,
2022-04-11 08:04:30 -04:00
canInsertBlockInWidgetArea : selectors . canInsertBlockInWidgetArea ( blockName )
} ;
} , [ clientId , blockName ] ) ;
const {
moveBlockToWidgetArea
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
2023-06-27 10:24:19 -04:00
const hasMultipleWidgetAreas = widgetAreas ? . length > 1 ;
2022-04-11 08:04:30 -04:00
const isMoveToWidgetAreaVisible = blockName !== 'core/widget-area' && hasMultipleWidgetAreas && canInsertBlockInWidgetArea ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockEdit , {
... props
} ) , isMoveToWidgetAreaVisible && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockControls , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _widgets _namespaceObject . MoveToWidgetArea , {
widgetAreas : widgetAreas ,
currentWidgetAreaId : currentWidgetAreaId ,
onSelect : widgetAreaId => {
moveBlockToWidgetArea ( props . clientId , widgetAreaId ) ;
}
} )
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
} , 'withMoveToWidgetAreaToolbarItem' ) ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.BlockEdit' , 'core/edit-widgets/block-edit' , withMoveToWidgetAreaToolbarItem ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","mediaUtils"]
2024-01-31 07:59:56 -05:00
const external _wp _mediaUtils _namespaceObject = window [ "wp" ] [ "mediaUtils" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/replace-media-upload.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2022-04-11 08:04:30 -04:00
const replaceMediaUpload = ( ) => external _wp _mediaUtils _namespaceObject . MediaUpload ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.MediaUpload' , 'core/edit-widgets/replace-media-upload' , replaceMediaUpload ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/index.js
2021-06-01 04:10:04 -04:00
/ * *
* Internal dependencies
* /
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/use-is-dragging-within.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/** @typedef {import('@wordpress/element').RefObject} RefObject */
/ * *
* A React hook to determine if it ' s dragging within the target element .
2021-05-25 04:40:25 -04:00
*
2022-04-11 08:04:30 -04:00
* @ param { RefObject < HTMLElement > } elementRef The target elementRef object .
2021-05-25 04:40:25 -04:00
*
2022-04-11 08:04:30 -04:00
* @ return { boolean } Is dragging within the target element .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const useIsDraggingWithin = elementRef => {
const [ isDraggingWithin , setIsDraggingWithin ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-06-01 04:10:04 -04:00
const {
2022-04-11 08:04:30 -04:00
ownerDocument
} = elementRef . current ;
function handleDragStart ( event ) {
// Check the first time when the dragging starts.
handleDragEnter ( event ) ;
2023-09-26 10:23:26 -04:00
}
2022-04-11 08:04:30 -04:00
2023-09-26 10:23:26 -04:00
// Set to false whenever the user cancel the drag event by either releasing the mouse or press Escape.
2022-04-11 08:04:30 -04:00
function handleDragEnd ( ) {
setIsDraggingWithin ( false ) ;
}
function handleDragEnter ( event ) {
// Check if the current target is inside the item element.
if ( elementRef . current . contains ( event . target ) ) {
setIsDraggingWithin ( true ) ;
} else {
setIsDraggingWithin ( false ) ;
2021-05-25 04:40:25 -04:00
}
2023-09-26 10:23:26 -04:00
}
2022-04-11 08:04:30 -04:00
2023-09-26 10:23:26 -04:00
// Bind these events to the document to catch all drag events.
// Ideally, we can also use `event.relatedTarget`, but sadly that doesn't work in Safari.
2022-04-11 08:04:30 -04:00
ownerDocument . addEventListener ( 'dragstart' , handleDragStart ) ;
ownerDocument . addEventListener ( 'dragend' , handleDragEnd ) ;
ownerDocument . addEventListener ( 'dragenter' , handleDragEnter ) ;
2021-05-25 04:40:25 -04:00
return ( ) => {
2022-04-11 08:04:30 -04:00
ownerDocument . removeEventListener ( 'dragstart' , handleDragStart ) ;
ownerDocument . removeEventListener ( 'dragend' , handleDragEnd ) ;
ownerDocument . removeEventListener ( 'dragenter' , handleDragEnter ) ;
2021-05-25 04:40:25 -04:00
} ;
2022-04-11 08:04:30 -04:00
} , [ ] ) ;
return isDraggingWithin ;
} ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const use _is _dragging _within = ( useIsDraggingWithin ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.js
/ * *
* External dependencies
* /
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function WidgetAreaInnerBlocks ( {
id
} ) {
2022-04-11 08:04:30 -04:00
const [ blocks , onInput , onChange ] = ( 0 , external _wp _coreData _namespaceObject . useEntityBlockEditor ) ( 'root' , 'postType' ) ;
const innerBlocksRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
const isDraggingWithinInnerBlocks = use _is _dragging _within ( innerBlocksRef ) ;
2023-09-26 10:23:26 -04:00
const shouldHighlightDropZone = isDraggingWithinInnerBlocks ;
// Using the experimental hook so that we can control the className of the element.
2022-04-11 08:04:30 -04:00
const innerBlocksProps = ( 0 , external _wp _blockEditor _namespaceObject . useInnerBlocksProps ) ( {
ref : innerBlocksRef
} , {
value : blocks ,
onInput ,
onChange ,
templateLock : false ,
renderAppender : external _wp _blockEditor _namespaceObject . InnerBlocks . ButtonBlockAppender
} ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
2022-04-11 08:04:30 -04:00
"data-widget-area-id" : id ,
2024-05-23 15:39:28 -04:00
className : dist _clsx ( 'wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper' , {
2022-04-11 08:04:30 -04:00
'wp-block-widget-area__highlight-drop-zone' : shouldHighlightDropZone
2024-05-31 14:59:00 -04:00
} ) ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
... innerBlocksProps
2022-04-11 08:04:30 -04:00
} )
2024-05-31 14:59:00 -04:00
} ) ;
2021-06-01 04:10:04 -04:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/index.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2022-04-11 08:04:30 -04:00
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* Internal dependencies
* /
2022-04-11 08:04:30 -04:00
/** @typedef {import('@wordpress/element').RefObject} RefObject */
2021-05-25 04:40:25 -04:00
2023-06-27 10:24:19 -04:00
function WidgetAreaEdit ( {
clientId ,
className ,
attributes : {
id ,
name
}
} ) {
2022-04-11 08:04:30 -04:00
const isOpen = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store _store ) . getIsWidgetAreaOpen ( clientId ) , [ clientId ] ) ;
const {
setIsWidgetAreaOpen
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
const wrapper = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
const setOpen = ( 0 , external _wp _element _namespaceObject . useCallback ) ( openState => setIsWidgetAreaOpen ( clientId , openState ) , [ clientId ] ) ;
const isDragging = useIsDragging ( wrapper ) ;
const isDraggingWithin = use _is _dragging _within ( wrapper ) ;
const [ openedWhileDragging , setOpenedWhileDragging ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( ! isDragging ) {
setOpenedWhileDragging ( false ) ;
return ;
}
if ( isDraggingWithin && ! isOpen ) {
setOpen ( true ) ;
setOpenedWhileDragging ( true ) ;
} else if ( ! isDraggingWithin && isOpen && openedWhileDragging ) {
setOpen ( false ) ;
}
} , [ isOpen , isDragging , isDraggingWithin , openedWhileDragging ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Panel , {
2022-04-11 08:04:30 -04:00
className : className ,
2024-05-31 14:59:00 -04:00
ref : wrapper ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . PanelBody , {
title : name ,
opened : isOpen ,
onToggle : ( ) => {
setIsWidgetAreaOpen ( clientId , ! isOpen ) ;
} ,
scrollAfterOpen : ! isDragging ,
children : ( {
opened
} ) =>
/*#__PURE__*/
// This is required to ensure LegacyWidget blocks are not
// unmounted when the panel is collapsed. Unmounting legacy
// widgets may have unintended consequences (e.g. TinyMCE
// not being properly reinitialized)
( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . _ _unstableDisclosureContent , {
className : "wp-block-widget-area__panel-body-content" ,
visible : opened ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _coreData _namespaceObject . EntityProvider , {
kind : "root" ,
type : "postType" ,
id : ` widget-area- ${ id } ` ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WidgetAreaInnerBlocks , {
id : id
} )
} )
} )
} )
} ) ;
2022-04-11 08:04:30 -04:00
}
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* A React hook to determine if dragging is active .
*
* @ param { RefObject < HTMLElement > } elementRef The target elementRef object .
*
* @ return { boolean } Is dragging within the entire document .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const useIsDragging = elementRef => {
const [ isDragging , setIsDragging ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
const {
ownerDocument
} = elementRef . current ;
function handleDragStart ( ) {
setIsDragging ( true ) ;
}
function handleDragEnd ( ) {
setIsDragging ( false ) ;
}
ownerDocument . addEventListener ( 'dragstart' , handleDragStart ) ;
ownerDocument . addEventListener ( 'dragend' , handleDragEnd ) ;
return ( ) => {
ownerDocument . removeEventListener ( 'dragstart' , handleDragStart ) ;
ownerDocument . removeEventListener ( 'dragend' , handleDragEnd ) ;
} ;
} , [ ] ) ;
return isDragging ;
} ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/index.js
/ * *
* WordPress dependencies
* /
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* Internal dependencies
* /
2022-04-11 08:04:30 -04:00
const metadata = {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
$schema : "https://schemas.wp.org/trunk/block.json" ,
2022-04-11 08:04:30 -04:00
name : "core/widget-area" ,
2024-05-23 15:39:28 -04:00
title : "Widget Area" ,
2022-04-11 08:04:30 -04:00
category : "widgets" ,
attributes : {
id : {
type : "string"
} ,
name : {
type : "string"
}
} ,
supports : {
html : false ,
inserter : false ,
customClassName : false ,
reusable : false ,
_ _experimentalToolbar : false ,
2022-09-20 11:43:29 -04:00
_ _experimentalParentSelector : false ,
_ _experimentalDisableBlockOverlay : true
2022-04-11 08:04:30 -04:00
} ,
editorStyle : "wp-block-widget-area-editor" ,
style : "wp-block-widget-area"
} ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
const {
name : widget _area _name
} = metadata ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
const settings = {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widget Area' ) ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'A widget area container.' ) ,
2023-06-27 10:24:19 -04:00
_ _experimentalLabel : ( {
name : label
} ) => label ,
2022-04-11 08:04:30 -04:00
edit : WidgetAreaEdit
} ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/error-boundary/index.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2021-07-06 10:38:40 -04:00
2021-05-25 04:40:25 -04:00
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function CopyButton ( {
text ,
children
} ) {
2022-04-11 08:04:30 -04:00
const ref = ( 0 , external _wp _compose _namespaceObject . useCopyToClipboard ) ( text ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
2022-04-11 08:04:30 -04:00
variant : "secondary" ,
2024-05-31 14:59:00 -04:00
ref : ref ,
children : children
} ) ;
2021-05-25 04:40:25 -04:00
}
2023-06-27 10:24:19 -04:00
function ErrorBoundaryWarning ( {
message ,
error
} ) {
2024-05-31 14:59:00 -04:00
const actions = [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( CopyButton , {
text : error . stack ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Copy Error' )
} , "copy-error" ) ] ;
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . Warning , {
2023-02-07 02:04:52 -05:00
className : "edit-widgets-error-boundary" ,
2024-05-31 14:59:00 -04:00
actions : actions ,
children : message
} ) ;
2023-02-07 02:04:52 -05:00
}
2022-04-11 08:04:30 -04:00
class ErrorBoundary extends external _wp _element _namespaceObject . Component {
constructor ( ) {
super ( ... arguments ) ;
this . state = {
error : null
} ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
componentDidCatch ( error ) {
2022-09-20 11:43:29 -04:00
( 0 , external _wp _hooks _namespaceObject . doAction ) ( 'editor.ErrorBoundary.errorLogged' , error ) ;
2021-05-25 04:40:25 -04:00
}
2023-02-07 02:04:52 -05:00
static getDerivedStateFromError ( error ) {
return {
error
} ;
2022-04-11 08:04:30 -04:00
}
render ( ) {
2023-02-07 02:04:52 -05:00
if ( ! this . state . error ) {
2022-04-11 08:04:30 -04:00
return this . props . children ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ErrorBoundaryWarning , {
2023-02-07 02:04:52 -05:00
message : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'The editor has encountered an unexpected error.' ) ,
error : this . state . error
} ) ;
2022-04-11 08:04:30 -04:00
}
}
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: external ["wp","patterns"]
2024-01-31 07:59:56 -05:00
const external _wp _patterns _namespaceObject = window [ "wp" ] [ "patterns" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
2024-01-31 07:59:56 -05:00
const external _wp _keyboardShortcuts _namespaceObject = window [ "wp" ] [ "keyboardShortcuts" ] ;
2023-02-07 02:04:52 -05:00
; // CONCATENATED MODULE: external ["wp","keycodes"]
2024-01-31 07:59:56 -05:00
const external _wp _keycodes _namespaceObject = window [ "wp" ] [ "keycodes" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcuts/index.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2023-02-07 02:04:52 -05:00
2023-06-27 10:24:19 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
function KeyboardShortcuts ( ) {
const {
redo ,
undo
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _coreData _namespaceObject . store ) ;
const {
saveEditedWidgetAreas
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/edit-widgets/undo' , event => {
undo ( ) ;
event . preventDefault ( ) ;
} ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/edit-widgets/redo' , event => {
redo ( ) ;
event . preventDefault ( ) ;
} ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/edit-widgets/save' , event => {
event . preventDefault ( ) ;
saveEditedWidgetAreas ( ) ;
} ) ;
return null ;
}
function KeyboardShortcutsRegister ( ) {
2022-04-12 11:12:47 -04:00
// Registering the shortcuts.
2022-04-11 08:04:30 -04:00
const {
registerShortcut
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
registerShortcut ( {
name : 'core/edit-widgets/undo' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Undo your last changes.' ) ,
keyCombination : {
modifier : 'primary' ,
character : 'z'
}
} ) ;
registerShortcut ( {
name : 'core/edit-widgets/redo' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Redo your last undo.' ) ,
keyCombination : {
modifier : 'primaryShift' ,
character : 'z'
2023-02-07 02:04:52 -05:00
} ,
// Disable on Apple OS because it conflicts with the browser's
// history shortcut. It's a fine alias for both Windows and Linux.
// Since there's no conflict for Ctrl+Shift+Z on both Windows and
// Linux, we keep it as the default for consistency.
aliases : ( 0 , external _wp _keycodes _namespaceObject . isAppleOS ) ( ) ? [ ] : [ {
modifier : 'primary' ,
character : 'y'
} ]
2022-04-11 08:04:30 -04:00
} ) ;
registerShortcut ( {
name : 'core/edit-widgets/save' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Save your changes.' ) ,
keyCombination : {
modifier : 'primary' ,
character : 's'
}
} ) ;
registerShortcut ( {
name : 'core/edit-widgets/keyboard-shortcuts' ,
category : 'main' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Display these keyboard shortcuts.' ) ,
keyCombination : {
modifier : 'access' ,
character : 'h'
}
} ) ;
registerShortcut ( {
name : 'core/edit-widgets/next-region' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Navigate to the next part of the editor.' ) ,
keyCombination : {
modifier : 'ctrl' ,
character : '`'
} ,
aliases : [ {
modifier : 'access' ,
character : 'n'
} ]
} ) ;
registerShortcut ( {
name : 'core/edit-widgets/previous-region' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Navigate to the previous part of the editor.' ) ,
keyCombination : {
modifier : 'ctrlShift' ,
character : '`'
} ,
aliases : [ {
modifier : 'access' ,
character : 'p'
2023-02-07 02:04:52 -05:00
} , {
modifier : 'ctrlShift' ,
character : '~'
2022-04-11 08:04:30 -04:00
} ]
} ) ;
} , [ registerShortcut ] ) ;
return null ;
}
KeyboardShortcuts . Register = KeyboardShortcutsRegister ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const keyboard _shortcuts = ( KeyboardShortcuts ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/hooks/use-last-selected-widget-area.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* A react hook that returns the client id of the last widget area to have
* been selected , or to have a selected block within it .
*
* @ return { string } clientId of the widget area last selected .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const useLastSelectedWidgetArea = ( ) => ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getBlockSelectionEnd ,
getBlockName
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
2023-09-26 10:23:26 -04:00
const selectionEndClientId = getBlockSelectionEnd ( ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// If the selected block is a widget area, return its clientId.
2022-04-11 08:04:30 -04:00
if ( getBlockName ( selectionEndClientId ) === 'core/widget-area' ) {
return selectionEndClientId ;
}
const {
getParentWidgetAreaBlock
} = select ( store _store ) ;
const widgetAreaBlock = getParentWidgetAreaBlock ( selectionEndClientId ) ;
2023-06-27 10:24:19 -04:00
const widgetAreaBlockClientId = widgetAreaBlock ? . clientId ;
2022-04-11 08:04:30 -04:00
if ( widgetAreaBlockClientId ) {
return widgetAreaBlockClientId ;
2023-09-26 10:23:26 -04:00
}
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// If no widget area has been selected, return the clientId of the first
// area.
2022-04-11 08:04:30 -04:00
const {
getEntityRecord
} = select ( external _wp _coreData _namespaceObject . store ) ;
const widgetAreasPost = getEntityRecord ( KIND , POST _TYPE , buildWidgetAreasPostId ( ) ) ;
2023-06-27 10:24:19 -04:00
return widgetAreasPost ? . blocks [ 0 ] ? . clientId ;
2022-04-11 08:04:30 -04:00
} , [ ] ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const use _last _selected _widget _area = ( useLastSelectedWidgetArea ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/constants.js
const ALLOW _REUSABLE _BLOCKS = false ;
const ENABLE _EXPERIMENTAL _FSE _BLOCKS = false ;
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.js
2021-11-08 09:29:21 -05:00
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
2021-05-25 04:40:25 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
2024-05-23 15:39:28 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
2024-05-31 14:59:00 -04:00
2023-02-07 02:04:52 -05:00
const {
ExperimentalBlockEditorProvider
2023-02-14 10:44:36 -05:00
} = unlock ( external _wp _blockEditor _namespaceObject . privateApis ) ;
2023-09-26 10:23:26 -04:00
const {
PatternsMenuItems
} = unlock ( external _wp _patterns _namespaceObject . privateApis ) ;
2024-05-23 15:39:28 -04:00
const {
BlockKeyboardShortcuts
} = unlock ( external _wp _blockLibrary _namespaceObject . privateApis ) ;
2023-06-27 10:24:19 -04:00
function WidgetAreasBlockEditorProvider ( {
blockEditorSettings ,
children ,
... props
} ) {
2022-09-20 11:43:29 -04:00
const mediaPermissions = ( 0 , external _wp _coreData _namespaceObject . useResourcePermissions ) ( 'media' ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
const isLargeViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' ) ;
2022-04-11 08:04:30 -04:00
const {
reusableBlocks ,
isFixedToolbarActive ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
keepCaretInsideBlock ,
pageOnFront ,
pageForPosts
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
canUser ,
getEntityRecord ,
getEntityRecords
} = select ( external _wp _coreData _namespaceObject . store ) ;
const siteSettings = canUser ( 'read' , 'settings' ) ? getEntityRecord ( 'root' , 'site' ) : undefined ;
return {
widgetAreas : select ( store _store ) . getWidgetAreas ( ) ,
widgets : select ( store _store ) . getWidgets ( ) ,
reusableBlocks : ALLOW _REUSABLE _BLOCKS ? getEntityRecords ( 'postType' , 'wp_block' ) : [ ] ,
isFixedToolbarActive : ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( 'core/edit-widgets' , 'fixedToolbar' ) ,
keepCaretInsideBlock : ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( 'core/edit-widgets' , 'keepCaretInsideBlock' ) ,
pageOnFront : siteSettings ? . page _on _front ,
pageForPosts : siteSettings ? . page _for _posts
} ;
} , [ ] ) ;
2022-04-11 08:04:30 -04:00
const {
setIsInserterOpened
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
const settings = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
let mediaUploadBlockEditor ;
2022-09-20 11:43:29 -04:00
if ( mediaPermissions . canCreate ) {
2023-06-27 10:24:19 -04:00
mediaUploadBlockEditor = ( {
onError ,
... argumentsObject
} ) => {
2022-04-11 08:04:30 -04:00
( 0 , external _wp _mediaUtils _namespaceObject . uploadMedia ) ( {
wpAllowedMimeTypes : blockEditorSettings . allowedMimeTypes ,
2023-06-27 10:24:19 -04:00
onError : ( {
message
} ) => onError ( message ) ,
2022-04-11 08:04:30 -04:00
... argumentsObject
} ) ;
} ;
}
2023-09-26 10:23:26 -04:00
return {
... blockEditorSettings ,
2022-04-11 08:04:30 -04:00
_ _experimentalReusableBlocks : reusableBlocks ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
hasFixedToolbar : isFixedToolbarActive || ! isLargeViewport ,
2022-04-11 08:04:30 -04:00
keepCaretInsideBlock ,
mediaUpload : mediaUploadBlockEditor ,
templateLock : 'all' ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
_ _experimentalSetIsInserterOpened : setIsInserterOpened ,
pageOnFront ,
pageForPosts
2022-04-11 08:04:30 -04:00
} ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
} , [ blockEditorSettings , isFixedToolbarActive , isLargeViewport , keepCaretInsideBlock , mediaPermissions . canCreate , reusableBlocks , setIsInserterOpened , pageOnFront , pageForPosts ] ) ;
2022-04-11 08:04:30 -04:00
const widgetAreaId = use _last _selected _widget _area ( ) ;
const [ blocks , onInput , onChange ] = ( 0 , external _wp _coreData _namespaceObject . useEntityBlockEditor ) ( KIND , POST _TYPE , {
id : buildWidgetAreasPostId ( )
} ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . SlotFillProvider , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( keyboard _shortcuts . Register , { } ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockKeyboardShortcuts , { } ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( ExperimentalBlockEditorProvider , {
value : blocks ,
onInput : onInput ,
onChange : onChange ,
settings : settings ,
useSubRegistry : false ,
... props ,
children : [ children , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( PatternsMenuItems , {
rootClientId : widgetAreaId
} ) ]
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
2023-06-27 10:24:19 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-left.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const drawerLeft = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2023-06-27 10:24:19 -04:00
width : "24" ,
height : "24" ,
2021-05-25 04:40:25 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
fillRule : "evenodd" ,
clipRule : "evenodd" ,
d : "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const drawer _left = ( drawerLeft ) ;
2023-06-27 10:24:19 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-right.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const drawerRight = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2023-06-27 10:24:19 -04:00
width : "24" ,
height : "24" ,
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
fillRule : "evenodd" ,
clipRule : "evenodd" ,
d : "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const drawer _right = ( drawerRight ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const blockDefault = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2021-05-25 04:40:25 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const block _default = ( blockDefault ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","url"]
2024-01-31 07:59:56 -05:00
const external _wp _url _namespaceObject = window [ "wp" ] [ "url" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","dom"]
2024-01-31 07:59:56 -05:00
const external _wp _dom _namespaceObject = window [ "wp" ] [ "dom" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/sidebar/widget-areas.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function WidgetAreas ( {
selectedWidgetAreaId
} ) {
2022-04-11 08:04:30 -04:00
const widgetAreas = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store _store ) . getWidgetAreas ( ) , [ ] ) ;
2023-06-27 10:24:19 -04:00
const selectedWidgetArea = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => selectedWidgetAreaId && widgetAreas ? . find ( widgetArea => widgetArea . id === selectedWidgetAreaId ) , [ selectedWidgetAreaId , widgetAreas ] ) ;
2022-04-11 08:04:30 -04:00
let description ;
if ( ! selectedWidgetArea ) {
description = ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widget Areas are global parts in your site’ s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.' ) ;
} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {
description = ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Blocks in this Widget Area will not be displayed in your site.' ) ;
} else {
description = selectedWidgetArea . description ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "edit-widgets-widget-areas" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "edit-widgets-widget-areas__top-container" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockIcon , {
icon : block _default
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "p" , {
// Use `dangerouslySetInnerHTML` to keep backwards
// compatibility. Basic markup in the description is an
// established feature of WordPress.
// @see https://github.com/WordPress/gutenberg/issues/33106
dangerouslySetInnerHTML : {
_ _html : ( 0 , external _wp _dom _namespaceObject . safeHTML ) ( description )
}
} ) , widgetAreas ? . length === 0 && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "p" , {
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Your theme does not contain any Widget Areas.' )
} ) , ! selectedWidgetArea && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
href : ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'customize.php' , {
'autofocus[panel]' : 'widgets' ,
return : window . location . pathname
} ) ,
variant : "tertiary" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Manage with live preview' )
} ) ]
} ) ]
} )
} ) ;
2022-04-11 08:04:30 -04:00
}
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/sidebar/index.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
const SIDEBAR _ACTIVE _BY _DEFAULT = external _wp _element _namespaceObject . Platform . select ( {
web : true ,
native : false
} ) ;
2023-09-26 10:23:26 -04:00
const BLOCK _INSPECTOR _IDENTIFIER = 'edit-widgets/block-inspector' ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Widget areas were one called block areas, so use 'edit-widgets/block-areas'
// for backwards compatibility.
2022-04-11 08:04:30 -04:00
const WIDGET _AREAS _IDENTIFIER = 'edit-widgets/block-areas' ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-05-25 04:40:25 -04:00
* /
2024-02-09 13:22:22 -05:00
2024-05-31 14:59:00 -04:00
2024-02-09 13:22:22 -05:00
const {
Tabs
} = unlock ( external _wp _components _namespaceObject . privateApis ) ;
function SidebarHeader ( {
selectedWidgetAreaBlock
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( Tabs . TabList , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Tabs . Tab , {
tabId : WIDGET _AREAS _IDENTIFIER ,
children : selectedWidgetAreaBlock ? selectedWidgetAreaBlock . attributes . name : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widget Areas' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Tabs . Tab , {
tabId : BLOCK _INSPECTOR _IDENTIFIER ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block' )
} ) ]
} ) ;
2024-02-09 13:22:22 -05:00
}
function SidebarContent ( {
hasSelectedNonAreaBlock ,
currentArea ,
isGeneralSidebarOpen ,
selectedWidgetAreaBlock
2023-06-27 10:24:19 -04:00
} ) {
2022-04-11 08:04:30 -04:00
const {
enableComplementaryArea
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
2024-02-09 13:22:22 -05:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( hasSelectedNonAreaBlock && currentArea === WIDGET _AREAS _IDENTIFIER && isGeneralSidebarOpen ) {
enableComplementaryArea ( 'core/edit-widgets' , BLOCK _INSPECTOR _IDENTIFIER ) ;
}
if ( ! hasSelectedNonAreaBlock && currentArea === BLOCK _INSPECTOR _IDENTIFIER && isGeneralSidebarOpen ) {
enableComplementaryArea ( 'core/edit-widgets' , WIDGET _AREAS _IDENTIFIER ) ;
}
// We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`
// out of the dep array because we want this effect to run based on
// block selection changes, not sidebar state changes.
// eslint-disable-next-line react-hooks/exhaustive-deps
} , [ hasSelectedNonAreaBlock , enableComplementaryArea ] ) ;
const tabsContextValue = ( 0 , external _wp _element _namespaceObject . useContext ) ( Tabs . Context ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( complementary _area , {
2024-02-09 13:22:22 -05:00
className : "edit-widgets-sidebar" ,
2024-05-31 14:59:00 -04:00
header : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Tabs . Context . Provider , {
value : tabsContextValue ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( SidebarHeader , {
selectedWidgetAreaBlock : selectedWidgetAreaBlock
} )
} ) ,
2024-02-09 13:22:22 -05:00
headerClassName : "edit-widgets-sidebar__panel-tabs"
/* translators: button label text should, if possible, be under 16 characters. */ ,
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Settings' ) ,
closeLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Close Settings' ) ,
scope : "core/edit-widgets" ,
identifier : currentArea ,
icon : ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? drawer _left : drawer _right ,
2024-05-31 14:59:00 -04:00
isActiveByDefault : SIDEBAR _ACTIVE _BY _DEFAULT ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( Tabs . Context . Provider , {
value : tabsContextValue ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Tabs . TabPanel , {
tabId : WIDGET _AREAS _IDENTIFIER ,
focusable : false ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WidgetAreas , {
selectedWidgetAreaId : selectedWidgetAreaBlock ? . attributes . id
} )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Tabs . TabPanel , {
tabId : BLOCK _INSPECTOR _IDENTIFIER ,
focusable : false ,
children : hasSelectedNonAreaBlock ? /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockInspector , { } ) :
/*#__PURE__*/
// Pretend that Widget Areas are part of the UI by not
// showing the Block Inspector when one is selected.
( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "span" , {
className : "block-editor-block-inspector__no-blocks" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'No block selected.' )
} )
} ) ]
} )
} ) ;
2022-04-11 08:04:30 -04:00
}
function Sidebar ( ) {
const {
currentArea ,
hasSelectedNonAreaBlock ,
isGeneralSidebarOpen ,
selectedWidgetAreaBlock
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getSelectedBlock ,
getBlock ,
getBlockParentsByBlockName
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
const {
getActiveComplementaryArea
} = select ( store ) ;
const selectedBlock = getSelectedBlock ( ) ;
const activeArea = getActiveComplementaryArea ( store _store . name ) ;
let currentSelection = activeArea ;
if ( ! currentSelection ) {
if ( selectedBlock ) {
currentSelection = BLOCK _INSPECTOR _IDENTIFIER ;
} else {
currentSelection = WIDGET _AREAS _IDENTIFIER ;
}
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
let widgetAreaBlock ;
if ( selectedBlock ) {
if ( selectedBlock . name === 'core/widget-area' ) {
widgetAreaBlock = selectedBlock ;
} else {
widgetAreaBlock = getBlock ( getBlockParentsByBlockName ( selectedBlock . clientId , 'core/widget-area' ) [ 0 ] ) ;
2021-05-25 04:40:25 -04:00
}
}
2022-04-11 08:04:30 -04:00
return {
currentArea : currentSelection ,
hasSelectedNonAreaBlock : ! ! ( selectedBlock && selectedBlock . name !== 'core/widget-area' ) ,
isGeneralSidebarOpen : ! ! activeArea ,
selectedWidgetAreaBlock : widgetAreaBlock
} ;
2023-09-26 10:23:26 -04:00
} , [ ] ) ;
2024-02-09 13:22:22 -05:00
const {
enableComplementaryArea
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
2022-04-11 08:04:30 -04:00
2024-02-09 13:22:22 -05:00
// `newSelectedTabId` could technically be falsey if no tab is selected (i.e.
// the initial render) or when we don't want a tab displayed (i.e. the
// sidebar is closed). These cases should both be covered by the `!!` check
// below, so we shouldn't need any additional falsey handling.
const onTabSelect = ( 0 , external _wp _element _namespaceObject . useCallback ) ( newSelectedTabId => {
if ( ! ! newSelectedTabId ) {
enableComplementaryArea ( store _store . name , newSelectedTabId ) ;
2022-04-11 08:04:30 -04:00
}
2024-02-09 13:22:22 -05:00
} , [ enableComplementaryArea ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Tabs
2024-02-09 13:22:22 -05:00
// Due to how this component is controlled (via a value from the
// `interfaceStore`), when the sidebar closes the currently selected
// tab can't be found. This causes the component to continuously reset
// the selection to `null` in an infinite loop. Proactively setting
// the selected tab to `null` avoids that.
, {
selectedTabId : isGeneralSidebarOpen ? currentArea : null ,
onSelect : onTabSelect ,
2024-05-31 14:59:00 -04:00
selectOnMove : false ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( SidebarContent , {
hasSelectedNonAreaBlock : hasSelectedNonAreaBlock ,
currentArea : currentArea ,
isGeneralSidebarOpen : isGeneralSidebarOpen ,
selectedWidgetAreaBlock : selectedWidgetAreaBlock
} )
} ) ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-11-08 09:29:21 -05:00
* /
2024-05-31 14:59:00 -04:00
const plus = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const library _plus = ( plus ) ;
2021-11-15 07:50:17 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list-view.js
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-11-08 09:29:21 -05:00
* /
2024-05-31 14:59:00 -04:00
const listView = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
viewBox : "0 0 24 24" ,
2024-05-31 14:59:00 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const list _view = ( listView ) ;
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
const undo = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const library _undo = ( undo ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
const redo = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const library _redo = ( redo ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/undo-redo/undo.js
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-11-08 09:29:21 -05:00
* /
2022-04-11 08:04:30 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function UndoButton ( props , ref ) {
2022-04-11 08:04:30 -04:00
const hasUndo = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _coreData _namespaceObject . store ) . hasUndo ( ) , [ ] ) ;
const {
undo
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _coreData _namespaceObject . store ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
... props ,
ref : ref ,
2022-04-11 08:04:30 -04:00
icon : ! ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? library _undo : library _redo ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Undo' ) ,
2023-09-26 10:23:26 -04:00
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . primary ( 'z' )
// If there are no undo levels we don't want to actually disable this
2022-04-11 08:04:30 -04:00
// button, because it will remove focus for keyboard users.
// See: https://github.com/WordPress/gutenberg/issues/3486
,
"aria-disabled" : ! hasUndo ,
2024-05-23 15:39:28 -04:00
onClick : hasUndo ? undo : undefined ,
size : "compact"
2022-04-11 08:04:30 -04:00
} ) ;
2021-11-08 09:29:21 -05:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const undo _redo _undo = ( ( 0 , external _wp _element _namespaceObject . forwardRef ) ( UndoButton ) ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/undo-redo/redo.js
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-11-08 09:29:21 -05:00
* /
2022-04-11 08:04:30 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function RedoButton ( props , ref ) {
2022-09-20 11:43:29 -04:00
const shortcut = ( 0 , external _wp _keycodes _namespaceObject . isAppleOS ) ( ) ? external _wp _keycodes _namespaceObject . displayShortcut . primaryShift ( 'z' ) : external _wp _keycodes _namespaceObject . displayShortcut . primary ( 'y' ) ;
2022-04-11 08:04:30 -04:00
const hasRedo = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _coreData _namespaceObject . store ) . hasRedo ( ) , [ ] ) ;
const {
redo
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _coreData _namespaceObject . store ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
... props ,
ref : ref ,
2022-04-11 08:04:30 -04:00
icon : ! ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? library _redo : library _undo ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Redo' ) ,
2023-09-26 10:23:26 -04:00
shortcut : shortcut
// If there are no undo levels we don't want to actually disable this
2022-04-11 08:04:30 -04:00
// button, because it will remove focus for keyboard users.
// See: https://github.com/WordPress/gutenberg/issues/3486
,
"aria-disabled" : ! hasRedo ,
2024-05-23 15:39:28 -04:00
onClick : hasRedo ? redo : undefined ,
size : "compact"
2022-04-11 08:04:30 -04:00
} ) ;
2021-11-08 09:29:21 -05:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const undo _redo _redo = ( ( 0 , external _wp _element _namespaceObject . forwardRef ) ( RedoButton ) ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/document-tools/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function DocumentTools ( ) {
const isMediumViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' ) ;
const {
isInserterOpen ,
isListViewOpen ,
2024-05-23 15:39:28 -04:00
inserterSidebarToggleRef ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
listViewToggleRef
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
isInserterOpened ,
2024-05-23 15:39:28 -04:00
getInserterSidebarToggleRef ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
isListViewOpened ,
getListViewToggleRef
} = unlock ( select ( store _store ) ) ;
return {
isInserterOpen : isInserterOpened ( ) ,
isListViewOpen : isListViewOpened ( ) ,
2024-05-23 15:39:28 -04:00
inserterSidebarToggleRef : getInserterSidebarToggleRef ( ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
listViewToggleRef : getListViewToggleRef ( )
} ;
} , [ ] ) ;
const {
setIsInserterOpened ,
setIsListViewOpened
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
const toggleListView = ( 0 , external _wp _element _namespaceObject . useCallback ) ( ( ) => setIsListViewOpened ( ! isListViewOpen ) , [ setIsListViewOpened , isListViewOpen ] ) ;
2024-05-23 15:39:28 -04:00
const toggleInserterSidebar = ( 0 , external _wp _element _namespaceObject . useCallback ) ( ( ) => setIsInserterOpened ( ! isInserterOpen ) , [ setIsInserterOpened , isInserterOpen ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _blockEditor _namespaceObject . NavigableToolbar , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
className : "edit-widgets-header-toolbar" ,
"aria-label" : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Document tools' ) ,
2024-05-31 14:59:00 -04:00
variant : "unstyled" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarItem , {
ref : inserterSidebarToggleRef ,
as : external _wp _components _namespaceObject . Button ,
className : "edit-widgets-header-toolbar__inserter-toggle" ,
variant : "primary" ,
isPressed : isInserterOpen ,
onMouseDown : event => {
event . preventDefault ( ) ;
} ,
onClick : toggleInserterSidebar ,
icon : library _plus
/ * t r a n s l a t o r s : b u t t o n l a b e l t e x t s h o u l d , i f p o s s i b l e , b e u n d e r 1 6
characters . * / ,
label : ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'Toggle block inserter' , 'Generic label for block inserter button' ) ,
size : "compact"
} ) , isMediumViewport && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarItem , {
as : undo _redo _undo
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarItem , {
as : undo _redo _redo
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarItem , {
as : external _wp _components _namespaceObject . Button ,
className : "edit-widgets-header-toolbar__list-view-toggle" ,
icon : list _view ,
isPressed : isListViewOpen
/* translators: button label text should, if possible, be under 16 characters. */ ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'List View' ) ,
onClick : toggleListView ,
ref : listViewToggleRef ,
size : "compact"
} ) ]
} ) ]
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const document _tools = ( DocumentTools ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/save-button/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function SaveButton ( ) {
const {
hasEditedWidgetAreaIds ,
isSaving
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getEditedWidgetAreas ,
isSavingWidgetAreas
} = select ( store _store ) ;
return {
hasEditedWidgetAreaIds : getEditedWidgetAreas ( ) ? . length > 0 ,
isSaving : isSavingWidgetAreas ( )
} ;
} , [ ] ) ;
const {
saveEditedWidgetAreas
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
2024-02-09 13:22:22 -05:00
const isDisabled = isSaving || ! hasEditedWidgetAreaIds ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
variant : "primary" ,
isBusy : isSaving ,
2024-02-09 13:22:22 -05:00
"aria-disabled" : isDisabled ,
2024-05-23 15:39:28 -04:00
onClick : isDisabled ? undefined : saveEditedWidgetAreas ,
2024-05-31 14:59:00 -04:00
size : "compact" ,
children : isSaving ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Saving…' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Update' )
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const save _button = ( SaveButton ) ;
2022-04-11 08:04:30 -04:00
2024-05-23 15:39:28 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const moreVertical = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2024-05-23 15:39:28 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
} )
} ) ;
2024-05-23 15:39:28 -04:00
/* harmony default export */ const more _vertical = ( moreVertical ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-11-08 09:29:21 -05:00
* /
2024-05-31 14:59:00 -04:00
const external = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const library _external = ( external ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/config.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
const textFormattingShortcuts = [ {
keyCombination : {
modifier : 'primary' ,
character : 'b'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make the selected text bold.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'i'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make the selected text italic.' )
} , {
keyCombination : {
modifier : 'primary' ,
character : 'k'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Convert the selected text into a link.' )
} , {
keyCombination : {
modifier : 'primaryShift' ,
character : 'k'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Remove a link.' )
2022-09-20 11:43:29 -04:00
} , {
keyCombination : {
character : '[['
} ,
2023-02-14 10:44:36 -05:00
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Insert a link to a post or page.' )
2022-04-11 08:04:30 -04:00
} , {
keyCombination : {
modifier : 'primary' ,
character : 'u'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Underline the selected text.' )
2022-09-20 11:43:29 -04:00
} , {
keyCombination : {
modifier : 'access' ,
character : 'd'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Strikethrough the selected text.' )
} , {
keyCombination : {
modifier : 'access' ,
character : 'x'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make the selected text inline code.' )
2023-06-27 10:24:19 -04:00
} , {
keyCombination : {
modifier : 'access' ,
character : '0'
} ,
2024-05-23 15:39:28 -04:00
aliases : [ {
modifier : 'access' ,
character : '7'
} ] ,
2023-06-27 10:24:19 -04:00
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Convert the current heading to a paragraph.' )
} , {
keyCombination : {
modifier : 'access' ,
character : '1-6'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Convert the current paragraph or heading to a heading of level 1 to 6.' )
2024-05-23 15:39:28 -04:00
} , {
keyCombination : {
modifier : 'primaryShift' ,
character : 'SPACE'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Add non breaking space.' )
2022-04-11 08:04:30 -04:00
} ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function KeyCombination ( {
keyCombination ,
forceAriaLabel
} ) {
2022-04-11 08:04:30 -04:00
const shortcut = keyCombination . modifier ? external _wp _keycodes _namespaceObject . displayShortcutList [ keyCombination . modifier ] ( keyCombination . character ) : keyCombination . character ;
const ariaLabel = keyCombination . modifier ? external _wp _keycodes _namespaceObject . shortcutAriaLabel [ keyCombination . modifier ] ( keyCombination . character ) : keyCombination . character ;
2022-09-20 11:43:29 -04:00
const shortcuts = Array . isArray ( shortcut ) ? shortcut : [ shortcut ] ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "kbd" , {
2022-04-11 08:04:30 -04:00
className : "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination" ,
2024-05-31 14:59:00 -04:00
"aria-label" : forceAriaLabel || ariaLabel ,
children : shortcuts . map ( ( character , index ) => {
if ( character === '+' ) {
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _element _namespaceObject . Fragment , {
children : character
} , index ) ;
}
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "kbd" , {
className : "edit-widgets-keyboard-shortcut-help-modal__shortcut-key" ,
children : character
} , index ) ;
} )
} ) ;
2021-05-25 04:40:25 -04:00
}
2023-06-27 10:24:19 -04:00
function Shortcut ( {
description ,
keyCombination ,
aliases = [ ] ,
ariaLabel
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "edit-widgets-keyboard-shortcut-help-modal__shortcut-description" ,
children : description
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "edit-widgets-keyboard-shortcut-help-modal__shortcut-term" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( KeyCombination , {
keyCombination : keyCombination ,
forceAriaLabel : ariaLabel
} ) , aliases . map ( ( alias , index ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( KeyCombination , {
keyCombination : alias ,
forceAriaLabel : ariaLabel
} , index ) ) ]
} ) ]
} ) ;
2021-05-25 04:40:25 -04:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const keyboard _shortcut _help _modal _shortcut = ( Shortcut ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-11-08 09:29:21 -05:00
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function DynamicShortcut ( {
name
} ) {
2022-04-11 08:04:30 -04:00
const {
keyCombination ,
description ,
aliases
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getShortcutKeyCombination ,
getShortcutDescription ,
getShortcutAliases
} = select ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
return {
keyCombination : getShortcutKeyCombination ( name ) ,
aliases : getShortcutAliases ( name ) ,
description : getShortcutDescription ( name )
} ;
} , [ name ] ) ;
if ( ! keyCombination ) {
return null ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( keyboard _shortcut _help _modal _shortcut , {
2022-04-11 08:04:30 -04:00
keyCombination : keyCombination ,
description : description ,
aliases : aliases
} ) ;
2021-11-08 09:29:21 -05:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const dynamic _shortcut = ( DynamicShortcut ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* External dependencies
2021-05-25 04:40:25 -04:00
* /
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2022-04-11 08:04:30 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
const ShortcutList = ( {
shortcuts
} ) =>
2024-05-31 14:59:00 -04:00
/*#__PURE__*/
2023-06-27 10:24:19 -04:00
/ *
* Disable reason : The ` list ` ARIA role is redundant but
* Safari + VoiceOver won ' t announce the list otherwise .
* /
/* eslint-disable jsx-a11y/no-redundant-roles */
2024-05-31 14:59:00 -04:00
( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "ul" , {
2023-06-27 10:24:19 -04:00
className : "edit-widgets-keyboard-shortcut-help-modal__shortcut-list" ,
2024-05-31 14:59:00 -04:00
role : "list" ,
children : shortcuts . map ( ( shortcut , index ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "li" , {
className : "edit-widgets-keyboard-shortcut-help-modal__shortcut" ,
children : typeof shortcut === 'string' ? /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( dynamic _shortcut , {
name : shortcut
} ) : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( keyboard _shortcut _help _modal _shortcut , {
... shortcut
} )
} , index ) )
} )
2023-09-26 10:23:26 -04:00
/* eslint-enable jsx-a11y/no-redundant-roles */ ;
2023-06-27 10:24:19 -04:00
const ShortcutSection = ( {
title ,
shortcuts ,
className
2024-05-31 14:59:00 -04:00
} ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "section" , {
className : dist _clsx ( 'edit-widgets-keyboard-shortcut-help-modal__section' , className ) ,
children : [ ! ! title && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h2" , {
className : "edit-widgets-keyboard-shortcut-help-modal__section-title" ,
children : title
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutList , {
shortcuts : shortcuts
} ) ]
} ) ;
2023-06-27 10:24:19 -04:00
const ShortcutCategorySection = ( {
title ,
categoryName ,
additionalShortcuts = [ ]
} ) => {
2022-04-11 08:04:30 -04:00
const categoryShortcuts = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
return select ( external _wp _keyboardShortcuts _namespaceObject . store ) . getCategoryShortcuts ( categoryName ) ;
} , [ categoryName ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutSection , {
2022-04-11 08:04:30 -04:00
title : title ,
shortcuts : categoryShortcuts . concat ( additionalShortcuts )
} ) ;
} ;
2023-06-27 10:24:19 -04:00
function KeyboardShortcutHelpModal ( {
isModalActive ,
toggleModal
} ) {
2022-04-11 08:04:30 -04:00
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/edit-widgets/keyboard-shortcuts' , toggleModal , {
bindGlobal : true
} ) ;
if ( ! isModalActive ) {
return null ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . Modal , {
2022-04-11 08:04:30 -04:00
className : "edit-widgets-keyboard-shortcut-help-modal" ,
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Keyboard shortcuts' ) ,
2024-05-31 14:59:00 -04:00
onRequestClose : toggleModal ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutSection , {
className : "edit-widgets-keyboard-shortcut-help-modal__main-shortcuts" ,
shortcuts : [ 'core/edit-widgets/keyboard-shortcuts' ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutCategorySection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Global shortcuts' ) ,
categoryName : "global"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutCategorySection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Selection shortcuts' ) ,
categoryName : "selection"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutCategorySection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block shortcuts' ) ,
categoryName : "block" ,
additionalShortcuts : [ {
keyCombination : {
character : '/'
} ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Change the block type after adding a new paragraph.' ) ,
/* translators: The forward-slash character. e.g. '/'. */
ariaLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Forward-slash' )
} ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutSection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Text formatting' ) ,
shortcuts : textFormattingShortcuts
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutCategorySection , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'List View shortcuts' ) ,
categoryName : "list-view"
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
2021-05-25 04:40:25 -04:00
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/more-menu/tools-more-menu-group.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
2022-04-12 11:12:47 -04:00
const {
Fill : ToolsMoreMenuGroup ,
Slot
} = ( 0 , external _wp _components _namespaceObject . createSlotFill ) ( 'EditWidgetsToolsMoreMenuGroup' ) ;
2023-06-27 10:24:19 -04:00
ToolsMoreMenuGroup . Slot = ( {
fillProps
2024-05-31 14:59:00 -04:00
} ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Slot , {
fillProps : fillProps ,
children : fills => fills . length > 0 && fills
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const tools _more _menu _group = ( ToolsMoreMenuGroup ) ;
2022-04-12 11:12:47 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/more-menu/index.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2022-04-12 11:12:47 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
function MoreMenu ( ) {
const [ isKeyboardShortcutsModalActive , setIsKeyboardShortcutsModalVisible ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const toggleKeyboardShortcutsModal = ( ) => setIsKeyboardShortcutsModalVisible ( ! isKeyboardShortcutsModalActive ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/edit-widgets/keyboard-shortcuts' , toggleKeyboardShortcutsModal ) ;
const isLargeViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . DropdownMenu , {
icon : more _vertical ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Options' ) ,
popoverProps : {
placement : 'bottom-end' ,
className : 'more-menu-dropdown__content'
} ,
toggleProps : {
tooltipPosition : 'bottom' ,
size : 'compact'
} ,
children : onClose => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ isLargeViewport && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . MenuGroup , {
label : ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'View' , 'noun' ) ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
scope : "core/edit-widgets" ,
name : "fixedToolbar" ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Top toolbar' ) ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Access all block and document tools in a single place' ) ,
messageActivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Top toolbar activated' ) ,
messageDeactivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Top toolbar deactivated' )
} )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . MenuGroup , {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Tools' ) ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . MenuItem , {
onClick : ( ) => {
setIsKeyboardShortcutsModalVisible ( true ) ;
} ,
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . access ( 'h' ) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Keyboard shortcuts' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
scope : "core/edit-widgets" ,
name : "welcomeGuide" ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome Guide' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . MenuItem , {
role : "menuitem" ,
icon : library _external ,
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'https://wordpress.org/documentation/article/block-based-widgets-editor/' ) ,
target : "_blank" ,
rel : "noopener noreferrer" ,
children : [ ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Help' ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . VisuallyHidden , {
as : "span" ,
children : /* translators: accessibility text */
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( '(opens in a new tab)' )
} ) ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( tools _more _menu _group . Slot , {
fillProps : {
onClose
}
} ) ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . MenuGroup , {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Preferences' ) ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
scope : "core/edit-widgets" ,
name : "keepCaretInsideBlock" ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Contain text cursor inside block' ) ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Aids screen readers by stopping text caret from leaving blocks.' ) ,
messageActivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Contain text cursor inside block activated' ) ,
messageDeactivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Contain text cursor inside block deactivated' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
scope : "core/edit-widgets" ,
name : "themeStyles" ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make the editor look like your theme.' ) ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Use theme styles' )
} ) , isLargeViewport && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
scope : "core/edit-widgets" ,
name : "showBlockBreadcrumbs" ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Display block breadcrumbs' ) ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Shows block breadcrumbs at the bottom of the editor.' ) ,
messageActivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Display block breadcrumbs activated' ) ,
messageDeactivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Display block breadcrumbs deactivated' )
} ) ]
} ) ]
} )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( KeyboardShortcutHelpModal , {
isModalActive : isKeyboardShortcutsModalActive ,
toggleModal : toggleKeyboardShortcutsModal
} ) ]
} ) ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/index.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function Header ( ) {
const isLargeViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' ) ;
const blockToolbarRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
2023-06-27 10:24:19 -04:00
const {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
hasFixedToolbar
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => ( {
hasFixedToolbar : ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( 'core/edit-widgets' , 'fixedToolbar' )
} ) , [ ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "edit-widgets-header" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "edit-widgets-header__navigable-toolbar-wrapper" ,
children : [ isLargeViewport && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h1" , {
className : "edit-widgets-header__title" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets' )
} ) , ! isLargeViewport && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . VisuallyHidden , {
as : "h1" ,
className : "edit-widgets-header__title" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( document _tools , { } ) , hasFixedToolbar && isLargeViewport && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "selected-block-tools-wrapper" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockToolbar , {
hideDragHandle : true
} )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Popover . Slot , {
ref : blockToolbarRef ,
name : "block-toolbar"
} ) ]
} ) ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "edit-widgets-header__actions" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( save _button , { } ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( pinned _items . Slot , {
scope : "core/edit-widgets"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( MoreMenu , { } ) ]
} ) ]
} )
} ) ;
2021-05-25 04:40:25 -04:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const header = ( Header ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/notices/index.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2024-02-09 13:22:22 -05:00
// Last three notices. Slices from the tail end of the list.
2024-05-31 14:59:00 -04:00
2024-02-09 13:22:22 -05:00
const MAX _VISIBLE _NOTICES = - 3 ;
2022-04-11 08:04:30 -04:00
function Notices ( ) {
const {
removeNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
const {
notices
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
return {
notices : select ( external _wp _notices _namespaceObject . store ) . getNotices ( )
} ;
} , [ ] ) ;
2023-06-27 10:24:19 -04:00
const dismissibleNotices = notices . filter ( ( {
isDismissible ,
type
} ) => isDismissible && type === 'default' ) ;
const nonDismissibleNotices = notices . filter ( ( {
isDismissible ,
type
} ) => ! isDismissible && type === 'default' ) ;
const snackbarNotices = notices . filter ( ( {
type
2024-02-09 13:22:22 -05:00
} ) => type === 'snackbar' ) . slice ( MAX _VISIBLE _NOTICES ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . NoticeList , {
notices : nonDismissibleNotices ,
className : "edit-widgets-notices__pinned"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . NoticeList , {
notices : dismissibleNotices ,
className : "edit-widgets-notices__dismissible" ,
onRemove : removeNotice
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . SnackbarList , {
notices : snackbarNotices ,
className : "edit-widgets-notices__snackbar" ,
onRemove : removeNotice
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const notices = ( Notices ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-content/index.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
2023-09-26 10:23:26 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function WidgetAreasBlockEditorContent ( {
blockEditorSettings
} ) {
2022-04-12 11:12:47 -04:00
const hasThemeStyles = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( 'core/edit-widgets' , 'themeStyles' ) , [ ] ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
const isLargeViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' ) ;
2022-04-11 08:04:30 -04:00
const styles = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
return hasThemeStyles ? blockEditorSettings . styles : [ ] ;
} , [ blockEditorSettings , hasThemeStyles ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "edit-widgets-block-editor" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( notices , { } ) , ! isLargeViewport && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockToolbar , {
hideDragHandle : true
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _blockEditor _namespaceObject . BlockTools , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( keyboard _shortcuts , { } ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . _ _unstableEditorStyles , {
styles : styles ,
scope : ".editor-styles-wrapper"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockSelectionClearer , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . WritingFlow , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockList , {
className : "edit-widgets-main-block-list"
} )
} )
} ) ]
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* WordPress dependencies
2021-05-25 04:40:25 -04:00
* /
2024-05-31 14:59:00 -04:00
const close _close = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-11 08:04:30 -04:00
xmlns : "http://www.w3.org/2000/svg" ,
2024-05-31 14:59:00 -04:00
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
d : "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const library _close = ( close _close ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/hooks/use-widget-library-insertion-point.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
const useWidgetLibraryInsertionPoint = ( ) => {
const firstRootId = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
// Default to the first widget area
const {
getEntityRecord
} = select ( external _wp _coreData _namespaceObject . store ) ;
const widgetAreasPost = getEntityRecord ( KIND , POST _TYPE , buildWidgetAreasPostId ( ) ) ;
2023-06-27 10:24:19 -04:00
return widgetAreasPost ? . blocks [ 0 ] ? . clientId ;
2022-04-11 08:04:30 -04:00
} , [ ] ) ;
return ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getBlockRootClientId ,
getBlockSelectionEnd ,
getBlockOrder ,
getBlockIndex
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
2023-09-26 10:23:26 -04:00
const insertionPoint = select ( store _store ) . _ _experimentalGetInsertionPoint ( ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// "Browse all" in the quick inserter will set the rootClientId to the current block.
2022-04-11 08:04:30 -04:00
// Otherwise, it will just be undefined, and we'll have to handle it differently below.
if ( insertionPoint . rootClientId ) {
return insertionPoint ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
const clientId = getBlockSelectionEnd ( ) || firstRootId ;
2023-09-26 10:23:26 -04:00
const rootClientId = getBlockRootClientId ( clientId ) ;
// If the selected block is at the root level, it's a widget area and
2022-04-11 08:04:30 -04:00
// blocks can't be inserted here. Return this block as the root and the
// last child clientId indicating insertion at the end.
if ( clientId && rootClientId === '' ) {
return {
rootClientId : clientId ,
insertionIndex : getBlockOrder ( clientId ) . length
} ;
}
2021-05-25 04:40:25 -04:00
return {
2022-04-11 08:04:30 -04:00
rootClientId ,
insertionIndex : getBlockIndex ( clientId ) + 1
2021-05-25 04:40:25 -04:00
} ;
2022-04-11 08:04:30 -04:00
} , [ firstRootId ] ) ;
} ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const use _widget _library _insertion _point = ( useWidgetLibraryInsertionPoint ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2021-11-08 09:29:21 -05:00
2021-05-25 04:40:25 -04:00
2022-04-12 11:12:47 -04:00
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
function InserterSidebar ( ) {
const isMobileViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' , '<' ) ;
const {
rootClientId ,
insertionIndex
} = use _widget _library _insertion _point ( ) ;
const {
setIsInserterOpened
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
const closeInserter = ( 0 , external _wp _element _namespaceObject . useCallback ) ( ( ) => {
2022-04-12 11:12:47 -04:00
return setIsInserterOpened ( false ) ;
2022-04-11 08:04:30 -04:00
} , [ setIsInserterOpened ] ) ;
2022-04-12 11:12:47 -04:00
const TagName = ! isMobileViewport ? external _wp _components _namespaceObject . VisuallyHidden : 'div' ;
2022-04-11 08:04:30 -04:00
const [ inserterDialogRef , inserterDialogProps ] = ( 0 , external _wp _compose _namespaceObject . _ _experimentalUseDialog ) ( {
2022-04-12 11:12:47 -04:00
onClose : closeInserter ,
2024-05-23 15:39:28 -04:00
focusOnMount : true
2022-04-11 08:04:30 -04:00
} ) ;
2022-04-12 11:12:47 -04:00
const libraryRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
2023-06-27 10:24:19 -04:00
ref : inserterDialogRef ,
... inserterDialogProps ,
2024-05-31 14:59:00 -04:00
className : "edit-widgets-layout__inserter-panel" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( TagName , {
className : "edit-widgets-layout__inserter-panel-header" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
icon : library _close ,
onClick : closeInserter ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Close block inserter' )
} )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "edit-widgets-layout__inserter-panel-content" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . _ _experimentalLibrary , {
showInserterHelpPanel : true ,
shouldFocusBlock : isMobileViewport ,
rootClientId : rootClientId ,
_ _experimentalInsertionIndex : insertionIndex ,
ref : libraryRef
} )
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.js
2021-07-15 14:55:29 -04:00
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2023-06-27 10:24:19 -04:00
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function ListViewSidebar ( ) {
2022-04-11 08:04:30 -04:00
const {
setIsListViewOpened
2023-09-26 10:23:26 -04:00
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
const {
getListViewToggleRef
} = unlock ( ( 0 , external _wp _data _namespaceObject . useSelect ) ( store _store ) ) ;
2023-06-27 10:24:19 -04:00
2023-09-26 10:23:26 -04:00
// Use internal state instead of a ref to make sure that the component
// re-renders when the dropZoneElement updates.
2023-06-27 10:24:19 -04:00
const [ dropZoneElement , setDropZoneElement ] = ( 0 , external _wp _element _namespaceObject . useState ) ( null ) ;
2022-04-11 08:04:30 -04:00
const focusOnMountRef = ( 0 , external _wp _compose _namespaceObject . useFocusOnMount ) ( 'firstElement' ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// When closing the list view, focus should return to the toggle button.
const closeListView = ( 0 , external _wp _element _namespaceObject . useCallback ) ( ( ) => {
setIsListViewOpened ( false ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
getListViewToggleRef ( ) . current ? . focus ( ) ;
} , [ getListViewToggleRef , setIsListViewOpened ] ) ;
2023-09-26 10:23:26 -04:00
const closeOnEscape = ( 0 , external _wp _element _namespaceObject . useCallback ) ( event => {
2022-04-11 08:04:30 -04:00
if ( event . keyCode === external _wp _keycodes _namespaceObject . ESCAPE && ! event . defaultPrevented ) {
event . preventDefault ( ) ;
2023-09-26 10:23:26 -04:00
closeListView ( ) ;
2022-04-11 08:04:30 -04:00
}
2023-09-26 10:23:26 -04:00
} , [ closeListView ] ) ;
return (
2024-05-31 14:59:00 -04:00
/*#__PURE__*/
2023-09-26 10:23:26 -04:00
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
2024-05-31 14:59:00 -04:00
( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
2022-04-11 08:04:30 -04:00
className : "edit-widgets-editor__list-view-panel" ,
2024-05-31 14:59:00 -04:00
onKeyDown : closeOnEscape ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "edit-widgets-editor__list-view-panel-header" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "strong" , {
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'List View' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
icon : close _small ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Close' ) ,
onClick : closeListView
} ) ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "edit-widgets-editor__list-view-panel-content" ,
ref : ( 0 , external _wp _compose _namespaceObject . useMergeRefs ) ( [ focusOnMountRef , setDropZoneElement ] ) ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . _ _experimentalListView , {
dropZoneElement : dropZoneElement
} )
} ) ]
} )
2022-04-11 08:04:30 -04:00
) ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/index.js
/ * *
* WordPress dependencies
* /
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-11-08 09:29:21 -05:00
* /
2022-04-11 08:04:30 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-11-08 09:29:21 -05:00
* /
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function SecondarySidebar ( ) {
2022-04-11 08:04:30 -04:00
const {
isInserterOpen ,
isListViewOpen
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
isInserterOpened ,
isListViewOpened
} = select ( store _store ) ;
return {
isInserterOpen : isInserterOpened ( ) ,
isListViewOpen : isListViewOpened ( )
} ;
} , [ ] ) ;
if ( isInserterOpen ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( InserterSidebar , { } ) ;
2022-04-11 08:04:30 -04:00
}
if ( isListViewOpen ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ListViewSidebar , { } ) ;
2022-04-11 08:04:30 -04:00
}
return null ;
}
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/interface.js
2021-11-08 09:29:21 -05:00
/ * *
* WordPress dependencies
* /
2022-04-11 08:04:30 -04:00
2022-04-12 11:12:47 -04:00
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
* Internal dependencies
* /
2022-04-11 08:04:30 -04:00
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
const interfaceLabels = {
/* translators: accessibility text for the widgets screen top bar landmark region. */
header : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets top bar' ) ,
/* translators: accessibility text for the widgets screen content landmark region. */
body : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets and blocks' ) ,
/* translators: accessibility text for the widgets screen settings landmark region. */
sidebar : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets settings' ) ,
/* translators: accessibility text for the widgets screen footer landmark region. */
footer : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets footer' )
} ;
2023-06-27 10:24:19 -04:00
function Interface ( {
blockEditorSettings
} ) {
2022-04-11 08:04:30 -04:00
const isMobileViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' , '<' ) ;
const isHugeViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'huge' , '>=' ) ;
2021-11-08 09:29:21 -05:00
const {
2022-04-11 08:04:30 -04:00
setIsInserterOpened ,
setIsListViewOpened ,
closeGeneralSidebar
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store _store ) ;
const {
hasBlockBreadCrumbsEnabled ,
hasSidebarEnabled ,
isInserterOpened ,
isListViewOpened ,
previousShortcut ,
nextShortcut
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => ( {
hasSidebarEnabled : ! ! select ( store ) . getActiveComplementaryArea ( store _store . name ) ,
isInserterOpened : ! ! select ( store _store ) . isInserterOpened ( ) ,
isListViewOpened : ! ! select ( store _store ) . isListViewOpened ( ) ,
2022-04-12 11:12:47 -04:00
hasBlockBreadCrumbsEnabled : ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( 'core/edit-widgets' , 'showBlockBreadcrumbs' ) ,
2022-04-11 08:04:30 -04:00
previousShortcut : select ( external _wp _keyboardShortcuts _namespaceObject . store ) . getAllShortcutKeyCombinations ( 'core/edit-widgets/previous-region' ) ,
nextShortcut : select ( external _wp _keyboardShortcuts _namespaceObject . store ) . getAllShortcutKeyCombinations ( 'core/edit-widgets/next-region' )
2023-09-26 10:23:26 -04:00
} ) , [ ] ) ;
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Inserter and Sidebars are mutually exclusive
2022-04-11 08:04:30 -04:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( hasSidebarEnabled && ! isHugeViewport ) {
setIsInserterOpened ( false ) ;
setIsListViewOpened ( false ) ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
} , [ hasSidebarEnabled , isHugeViewport ] ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {
closeGeneralSidebar ( ) ;
}
} , [ isInserterOpened , isListViewOpened , isHugeViewport ] ) ;
2022-04-19 11:11:17 -04:00
const secondarySidebarLabel = isListViewOpened ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'List View' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block Library' ) ;
2022-04-11 08:04:30 -04:00
const hasSecondarySidebar = isListViewOpened || isInserterOpened ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( interface _skeleton , {
2023-09-26 10:23:26 -04:00
labels : {
... interfaceLabels ,
2022-04-19 11:11:17 -04:00
secondarySidebar : secondarySidebarLabel
} ,
2024-05-31 14:59:00 -04:00
header : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( header , { } ) ,
secondarySidebar : hasSecondarySidebar && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( SecondarySidebar , { } ) ,
sidebar : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( complementary _area . Slot , {
2022-04-11 08:04:30 -04:00
scope : "core/edit-widgets"
} ) ,
2024-05-31 14:59:00 -04:00
content : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WidgetAreasBlockEditorContent , {
blockEditorSettings : blockEditorSettings
} )
} ) ,
footer : hasBlockBreadCrumbsEnabled && ! isMobileViewport && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "edit-widgets-layout__footer" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockBreadcrumb , {
rootLabelText : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets' )
} )
} ) ,
2022-04-11 08:04:30 -04:00
shortcuts : {
previous : previousShortcut ,
next : nextShortcut
}
} ) ;
2021-11-08 09:29:21 -05:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const layout _interface = ( Interface ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/unsaved-changes-warning.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Internal dependencies
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
/ * *
* Warns the user if there are unsaved changes before leaving the editor .
*
* This is a duplicate of the component implemented in the editor package .
* Duplicated here as edit - widgets doesn ' t depend on editor .
*
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
* @ return { Component } The component .
2022-04-11 08:04:30 -04:00
* /
function UnsavedChangesWarning ( ) {
const isDirty = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getEditedWidgetAreas
} = select ( store _store ) ;
const editedWidgetAreas = getEditedWidgetAreas ( ) ;
2023-06-27 10:24:19 -04:00
return editedWidgetAreas ? . length > 0 ;
2022-04-11 08:04:30 -04:00
} , [ ] ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
/ * *
* Warns the user if there are unsaved changes before leaving the editor .
*
* @ param { Event } event ` beforeunload ` event .
*
2023-02-07 02:04:52 -05:00
* @ return { string | undefined } Warning prompt message , if unsaved changes exist .
2022-04-11 08:04:30 -04:00
* /
const warnIfUnsavedChanges = event => {
if ( isDirty ) {
event . returnValue = ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'You have unsaved changes. If you proceed, they will be lost.' ) ;
return event . returnValue ;
}
} ;
window . addEventListener ( 'beforeunload' , warnIfUnsavedChanges ) ;
return ( ) => {
window . removeEventListener ( 'beforeunload' , warnIfUnsavedChanges ) ;
} ;
} , [ isDirty ] ) ;
return null ;
}
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/welcome-guide/index.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
function WelcomeGuide ( ) {
var _widgetAreas$filter$l ;
2022-04-12 11:12:47 -04:00
const isActive = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( 'core/edit-widgets' , 'welcomeGuide' ) , [ ] ) ;
2022-04-11 08:04:30 -04:00
const {
2022-04-12 11:12:47 -04:00
toggle
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _preferences _namespaceObject . store ) ;
2022-04-11 08:04:30 -04:00
const widgetAreas = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store _store ) . getWidgetAreas ( {
per _page : - 1
} ) , [ ] ) ;
if ( ! isActive ) {
return null ;
}
2023-06-27 10:24:19 -04:00
const isEntirelyBlockWidgets = widgetAreas ? . every ( widgetArea => widgetArea . id === 'wp_inactive_widgets' || widgetArea . widgets . every ( widgetId => widgetId . startsWith ( 'block-' ) ) ) ;
const numWidgetAreas = ( _widgetAreas$filter$l = widgetAreas ? . filter ( widgetArea => widgetArea . id !== 'wp_inactive_widgets' ) . length ) !== null && _widgetAreas$filter$l !== void 0 ? _widgetAreas$filter$l : 0 ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Guide , {
2022-04-11 08:04:30 -04:00
className : "edit-widgets-welcome-guide" ,
contentLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome to block Widgets' ) ,
finishButtonText : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Get started' ) ,
2022-04-12 11:12:47 -04:00
onFinish : ( ) => toggle ( 'core/edit-widgets' , 'welcomeGuide' ) ,
2022-04-11 08:04:30 -04:00
pages : [ {
2024-05-31 14:59:00 -04:00
image : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WelcomeGuideImage , {
2022-04-11 08:04:30 -04:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-canvas.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-canvas.gif"
} ) ,
2024-05-31 14:59:00 -04:00
content : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h1" , {
className : "edit-widgets-welcome-guide__heading" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome to block Widgets' )
} ) , isEntirelyBlockWidgets ? /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "p" , {
className : "edit-widgets-welcome-guide__text" ,
children : ( 0 , external _wp _i18n _namespaceObject . sprintf ) (
// Translators: %s: Number of block areas in the current theme.
( 0 , external _wp _i18n _namespaceObject . _n ) ( 'Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ ll look on your site.' , 'Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ ll look on your site.' , numWidgetAreas ) , numWidgetAreas )
} )
} ) : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "p" , {
className : "edit-widgets-welcome-guide__text" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'You can now add any block to your site’ s widget areas. Don’ t worry, all of your favorite widgets still work flawlessly.' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "p" , {
className : "edit-widgets-welcome-guide__text" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "strong" , {
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Want to stick with the old widgets?' )
} ) , ' ' , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ExternalLink , {
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'https://wordpress.org/plugins/classic-widgets/' ) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Get the Classic Widgets plugin.' )
} ) ]
} ) ]
} ) ]
} )
2022-04-11 08:04:30 -04:00
} , {
2024-05-31 14:59:00 -04:00
image : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WelcomeGuideImage , {
2022-04-11 08:04:30 -04:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-editor.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-editor.gif"
} ) ,
2024-05-31 14:59:00 -04:00
content : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h1" , {
className : "edit-widgets-welcome-guide__heading" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make each block your own' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "p" , {
className : "edit-widgets-welcome-guide__text" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.' )
} ) ]
} )
2022-04-11 08:04:30 -04:00
} , {
2024-05-31 14:59:00 -04:00
image : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WelcomeGuideImage , {
2022-04-11 08:04:30 -04:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-library.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-library.gif"
} ) ,
2024-05-31 14:59:00 -04:00
content : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h1" , {
className : "edit-widgets-welcome-guide__heading" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Get to know the block library' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "p" , {
className : "edit-widgets-welcome-guide__text" ,
children : ( 0 , external _wp _element _namespaceObject . createInterpolateElement ) ( ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'All of the blocks available to you live in the block library. You’ ll find it wherever you see the <InserterIconImage /> icon.' ) , {
InserterIconImage : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "img" , {
className : "edit-widgets-welcome-guide__inserter-icon" ,
alt : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'inserter' ) ,
src : "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
} )
} )
} ) ]
} )
2022-04-11 08:04:30 -04:00
} , {
2024-05-31 14:59:00 -04:00
image : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WelcomeGuideImage , {
2022-04-11 08:04:30 -04:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-documentation.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-documentation.gif"
} ) ,
2024-05-31 14:59:00 -04:00
content : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h1" , {
className : "edit-widgets-welcome-guide__heading" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Learn how to use the block editor' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "p" , {
className : "edit-widgets-welcome-guide__text" ,
children : [ ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'New to the block editor? Want to learn more about using it? ' ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ExternalLink , {
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'https://wordpress.org/documentation/article/wordpress-block-editor/' ) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Here's a detailed guide." )
} ) ]
} ) ]
} )
2022-04-11 08:04:30 -04:00
} ]
} ) ;
}
2023-06-27 10:24:19 -04:00
function WelcomeGuideImage ( {
nonAnimatedSrc ,
animatedSrc
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "picture" , {
className : "edit-widgets-welcome-guide__image" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "source" , {
srcSet : nonAnimatedSrc ,
media : "(prefers-reduced-motion: reduce)"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "img" , {
src : animatedSrc ,
width : "312" ,
height : "240" ,
alt : ""
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/index.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2022-04-12 11:12:47 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function Layout ( {
blockEditorSettings
} ) {
2022-04-12 11:12:47 -04:00
const {
createErrorNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
function onPluginAreaError ( name ) {
2023-09-26 10:23:26 -04:00
createErrorNotice ( ( 0 , external _wp _i18n _namespaceObject . sprintf ) ( /* translators: %s: plugin name */
2022-04-12 11:12:47 -04:00
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'The "%s" plugin has encountered an error and cannot be rendered.' ) , name ) ) ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ErrorBoundary , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( WidgetAreasBlockEditorProvider , {
blockEditorSettings : blockEditorSettings ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( layout _interface , {
blockEditorSettings : blockEditorSettings
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( Sidebar , { } ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _plugins _namespaceObject . PluginArea , {
onError : onPluginAreaError
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( UnsavedChangesWarning , { } ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WelcomeGuide , { } ) ]
} )
} ) ;
2022-04-11 08:04:30 -04:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const layout = ( Layout ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/index.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2023-02-07 02:04:52 -05:00
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
const disabledBlocks = [ 'core/more' , 'core/freeform' , 'core/template-part' , ... ( ALLOW _REUSABLE _BLOCKS ? [ ] : [ 'core/block' ] ) ] ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Initializes the block editor in the widgets screen .
*
* @ param { string } id ID of the root element to render the screen in .
* @ param { Object } settings Block editor settings .
2021-05-25 04:40:25 -04:00
* /
2023-02-07 02:04:52 -05:00
function initializeEditor ( id , settings ) {
2022-04-11 08:04:30 -04:00
const target = document . getElementById ( id ) ;
2023-02-07 02:04:52 -05:00
const root = ( 0 , external _wp _element _namespaceObject . createRoot ) ( target ) ;
2022-04-11 08:04:30 -04:00
const coreBlocks = ( 0 , external _wp _blockLibrary _namespaceObject . _ _experimentalGetCoreBlocks ) ( ) . filter ( block => {
return ! ( disabledBlocks . includes ( block . name ) || block . name . startsWith ( 'core/post' ) || block . name . startsWith ( 'core/query' ) || block . name . startsWith ( 'core/site' ) || block . name . startsWith ( 'core/navigation' ) ) ;
} ) ;
2022-04-12 11:12:47 -04:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _preferences _namespaceObject . store ) . setDefaults ( 'core/edit-widgets' , {
2022-04-11 08:04:30 -04:00
fixedToolbar : false ,
welcomeGuide : true ,
showBlockBreadcrumbs : true ,
themeStyles : true
} ) ;
2023-09-26 10:23:26 -04:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _blocks _namespaceObject . store ) . reapplyBlockTypeFilters ( ) ;
2022-04-11 08:04:30 -04:00
( 0 , external _wp _blockLibrary _namespaceObject . registerCoreBlocks ) ( coreBlocks ) ;
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetBlock ) ( ) ;
if ( false ) { }
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetVariations ) ( settings ) ;
registerBlock ( widget _area _namespaceObject ) ;
( 0 , external _wp _widgets _namespaceObject . registerWidgetGroupBlock ) ( ) ;
2023-09-26 10:23:26 -04:00
settings . _ _experimentalFetchLinkSuggestions = ( search , searchOptions ) => ( 0 , external _wp _coreData _namespaceObject . _ _experimentalFetchLinkSuggestions ) ( search , searchOptions , settings ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// As we are unregistering `core/freeform` to avoid the Classic block, we must
2022-04-11 08:04:30 -04:00
// replace it with something as the default freeform content handler. Failure to
// do this will result in errors in the default block parser.
// see: https://github.com/WordPress/gutenberg/issues/33097
( 0 , external _wp _blocks _namespaceObject . setFreeformContentHandlerName ) ( 'core/html' ) ;
2024-05-31 14:59:00 -04:00
root . render ( /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( layout , {
2023-02-07 02:04:52 -05:00
blockEditorSettings : settings
} ) ) ;
return root ;
}
2023-09-26 10:23:26 -04:00
2023-02-07 02:04:52 -05:00
/ * *
* Compatibility export under the old ` initialize ` name .
* /
const initialize = initializeEditor ;
function reinitializeEditor ( ) {
external _wp _deprecated _default ( ) ( 'wp.editWidgets.reinitializeEditor' , {
since : '6.2' ,
version : '6.3'
} ) ;
2021-05-25 04:40:25 -04:00
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Function to register an individual block .
*
* @ param { Object } block The block to be registered .
* /
const registerBlock = block => {
if ( ! block ) {
return ;
}
const {
metadata ,
settings ,
name
} = block ;
if ( metadata ) {
( 0 , external _wp _blocks _namespaceObject . unstable _ _bootstrapServerSideBlockDefinitions ) ( {
[ name ] : metadata
} ) ;
}
( 0 , external _wp _blocks _namespaceObject . registerBlockType ) ( name , settings ) ;
} ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
( window . wp = window . wp || { } ) . editWidgets = _ _webpack _exports _ _ ;
/******/ } ) ( )
;