2024-01-31 07:59:56 -05:00
/******/ ( ( ) => { // webpackBootstrap
2024-05-23 15:39:28 -04:00
/******/ "use strict" ;
2022-04-11 08:04:30 -04:00
/******/ var _ _webpack _modules _ _ = ( {
2024-02-15 11:53:15 -05:00
/***/ 7734 :
2024-01-31 07:59:56 -05:00
/***/ ( ( module ) => {
2023-02-07 02:04:52 -05:00
// do not edit .js files directly - edit src/index.jst
var envHasBigInt64Array = typeof BigInt64Array !== 'undefined' ;
module . exports = function equal ( a , b ) {
if ( a === b ) return true ;
if ( a && b && typeof a == 'object' && typeof b == 'object' ) {
if ( a . constructor !== b . constructor ) return false ;
var length , i , keys ;
if ( Array . isArray ( a ) ) {
length = a . length ;
if ( length != b . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( ! equal ( a [ i ] , b [ i ] ) ) return false ;
return true ;
}
if ( ( a instanceof Map ) && ( b instanceof Map ) ) {
if ( a . size !== b . size ) return false ;
for ( i of a . entries ( ) )
if ( ! b . has ( i [ 0 ] ) ) return false ;
for ( i of a . entries ( ) )
if ( ! equal ( i [ 1 ] , b . get ( i [ 0 ] ) ) ) return false ;
return true ;
}
if ( ( a instanceof Set ) && ( b instanceof Set ) ) {
if ( a . size !== b . size ) return false ;
for ( i of a . entries ( ) )
if ( ! b . has ( i [ 0 ] ) ) return false ;
return true ;
}
if ( ArrayBuffer . isView ( a ) && ArrayBuffer . isView ( b ) ) {
length = a . length ;
if ( length != b . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( a [ i ] !== b [ i ] ) return false ;
return true ;
}
if ( a . constructor === RegExp ) return a . source === b . source && a . flags === b . flags ;
if ( a . valueOf !== Object . prototype . valueOf ) return a . valueOf ( ) === b . valueOf ( ) ;
if ( a . toString !== Object . prototype . toString ) return a . toString ( ) === b . toString ( ) ;
keys = Object . keys ( a ) ;
length = keys . length ;
if ( length !== Object . keys ( b ) . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( ! Object . prototype . hasOwnProperty . call ( b , keys [ i ] ) ) return false ;
for ( i = length ; i -- !== 0 ; ) {
var key = keys [ i ] ;
if ( ! equal ( a [ key ] , b [ key ] ) ) return false ;
}
return true ;
}
// true if both NaN, false otherwise
return a !== a && b !== b ;
} ;
2022-04-11 08:04:30 -04:00
/***/ } )
/******/ } ) ;
/************************************************************************/
2021-05-25 04:40:25 -04:00
/******/ // The module cache
2022-04-11 08:04:30 -04:00
/******/ var _ _webpack _module _cache _ _ = { } ;
/******/
2021-05-25 04:40:25 -04:00
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/ // Check if module is in cache
2022-04-11 08:04:30 -04:00
/******/ var cachedModule = _ _webpack _module _cache _ _ [ moduleId ] ;
/******/ if ( cachedModule !== undefined ) {
/******/ return cachedModule . exports ;
2021-05-25 04:40:25 -04:00
/******/ }
/******/ // Create a new module (and put it into the cache)
2022-04-11 08:04:30 -04:00
/******/ var module = _ _webpack _module _cache _ _ [ moduleId ] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
2021-05-25 04:40:25 -04:00
/******/ exports : { }
/******/ } ;
2022-04-11 08:04:30 -04:00
/******/
2021-05-25 04:40:25 -04:00
/******/ // Execute the module function
2022-04-11 08:04:30 -04:00
/******/ _ _webpack _modules _ _ [ moduleId ] ( module , module . exports , _ _webpack _require _ _ ) ;
/******/
2021-05-25 04:40:25 -04:00
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
2022-04-11 08:04:30 -04:00
/******/
2021-05-25 04:40:25 -04:00
/************************************************************************/
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 _ _ = { } ;
2024-05-23 15:39:28 -04:00
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
2024-01-31 07:59:56 -05:00
( ( ) => {
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 ) ,
store : ( ) => ( /* reexport */ store )
2022-04-11 08:04:30 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
2022-04-12 11:12:47 -04:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/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
_ _experimentalGetInsertionPoint : ( ) => ( _ _experimentalGetInsertionPoint ) ,
isInserterOpened : ( ) => ( isInserterOpened )
2022-04-12 11:12:47 -04:00
} ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/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
setIsInserterOpened : ( ) => ( setIsInserterOpened )
2022-04-12 11:12:47 -04:00
} ) ;
2022-04-11 08:04:30 -04: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","widgets"]
2024-01-31 07:59:56 -05:00
const external _wp _widgets _namespaceObject = window [ "wp" ] [ "widgets" ] ;
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" ] ;
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-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","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","blockEditor"]
2024-01-31 07:59:56 -05:00
const external _wp _blockEditor _namespaceObject = window [ "wp" ] [ "blockEditor" ] ;
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: external ["wp","compose"]
2024-01-31 07:59:56 -05:00
const external _wp _compose _namespaceObject = window [ "wp" ] [ "compose" ] ;
2022-09-20 11:43:29 -04:00
; // CONCATENATED MODULE: external ["wp","hooks"]
2024-01-31 07:59:56 -05:00
const external _wp _hooks _namespaceObject = window [ "wp" ] [ "hooks" ] ;
2024-05-31 14:59:00 -04:00
; // CONCATENATED MODULE: external "ReactJSXRuntime"
const external _ReactJSXRuntime _namespaceObject = window [ "ReactJSXRuntime" ] ;
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/error-boundary/index.js
2022-04-11 08:04:30 -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
2022-04-12 11:12:47 -04:00
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function CopyButton ( {
text ,
children
} ) {
2022-04-12 11:12:47 -04:00
const ref = ( 0 , external _wp _compose _namespaceObject . useCopyToClipboard ) ( text ) ;
2024-09-19 21:55:35 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button
// TODO: Switch to `true` (40px size) if possible
, {
_ _next40pxDefaultSize : false ,
2022-04-12 11:12:47 -04:00
variant : "secondary" ,
2024-05-31 14:59:00 -04:00
ref : ref ,
children : children
} ) ;
2022-04-12 11:12:47 -04:00
}
class ErrorBoundary extends external _wp _element _namespaceObject . Component {
constructor ( ) {
super ( ... arguments ) ;
this . state = {
error : null
} ;
}
componentDidCatch ( error ) {
this . setState ( {
error
} ) ;
2022-09-20 11:43:29 -04:00
( 0 , external _wp _hooks _namespaceObject . doAction ) ( 'editor.ErrorBoundary.errorLogged' , error ) ;
2022-04-12 11:12:47 -04:00
}
render ( ) {
const {
error
} = this . state ;
if ( ! error ) {
return this . props . children ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . Warning , {
2022-04-12 11:12:47 -04:00
className : "customize-widgets-error-boundary" ,
2024-05-31 14:59:00 -04:00
actions : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( CopyButton , {
text : error . stack ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Copy Error' )
} , "copy-error" ) ] ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'The editor has encountered an unexpected error.' )
} ) ;
2022-04-12 11:12:47 -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-12 11:12:47 -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-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js
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
/ * *
* WordPress dependencies
* /
2022-04-11 08:04:30 -04:00
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function BlockInspectorButton ( {
inspector ,
closeMenu ,
... props
} ) {
2022-04-12 11:12:47 -04:00
const selectedBlockClientId = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _blockEditor _namespaceObject . store ) . getSelectedBlockClientId ( ) , [ ] ) ;
const selectedBlock = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => document . getElementById ( ` block- ${ selectedBlockClientId } ` ) , [ selectedBlockClientId ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . MenuItem , {
2022-04-12 11:12:47 -04:00
onClick : ( ) => {
// Open the inspector.
inspector . open ( {
returnFocusWhenClose : selectedBlock
2023-09-26 10:23:26 -04:00
} ) ;
// Then close the dropdown menu.
2022-04-12 11:12:47 -04:00
closeMenu ( ) ;
2023-06-27 10:24:19 -04:00
} ,
2024-05-31 14:59:00 -04:00
... props ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Show more settings' )
} ) ;
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
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const block _inspector _button = ( BlockInspectorButton ) ;
2022-04-12 11:12:47 -04:00
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-12 11:12:47 -04:00
; // CONCATENATED MODULE: external ["wp","keycodes"]
2024-01-31 07:59:56 -05:00
const external _wp _keycodes _namespaceObject = window [ "wp" ] [ "keycodes" ] ;
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: external ["wp","primitives"]
2024-01-31 07:59:56 -05:00
const external _wp _primitives _namespaceObject = window [ "wp" ] [ "primitives" ] ;
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
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-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
2022-04-11 08:04:30 -04:00
/ * *
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
2024-05-31 14:59:00 -04:00
const redo = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-12 11:12:47 -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-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const plus = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-12 11:12:47 -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 ) ;
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
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-12 11:12:47 -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
* /
2024-05-31 14:59:00 -04:00
const closeSmall = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-12 11:12:47 -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 ) ;
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-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/reducer.js
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-12 11:12:47 -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-12 11:12:47 -04:00
* Reducer tracking whether the inserter is open .
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ param { boolean | Object } state
* @ param { Object } action
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-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_INSERTER_OPENED' :
return action . value ;
2022-04-11 08:04:30 -04:00
}
2022-04-12 11:12:47 -04:00
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
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/customize-widgets/build-module/store/selectors.js
2023-09-26 10:23:26 -04:00
const EMPTY _INSERTION _POINT = {
rootClientId : undefined ,
insertionIndex : undefined
} ;
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-12 11:12:47 -04:00
* Returns true if the inserter is opened .
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ param { Object } state Global application state .
2022-04-11 08:04:30 -04:00
*
2023-09-26 10:23:26 -04:00
* @ example
* ` ` ` js
* import { store as customizeWidgetsStore } from '@wordpress/customize-widgets' ;
* import { _ _ } from '@wordpress/i18n' ;
* import { useSelect } from '@wordpress/data' ;
*
* const ExampleComponent = ( ) => {
* const { isInserterOpened } = useSelect (
* ( select ) => select ( customizeWidgetsStore ) ,
* [ ]
* ) ;
*
* return isInserterOpened ( )
* ? _ _ ( 'Inserter is open' )
* : _ _ ( 'Inserter is closed.' ) ;
* } ;
* ` ` `
*
2022-04-12 11:12:47 -04:00
* @ return { boolean } Whether the inserter is opened .
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-12 11:12:47 -04:00
function isInserterOpened ( state ) {
return ! ! state . blockInserterPanel ;
2022-04-11 08:04:30 -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-12 11:12:47 -04:00
* Get the insertion point for the inserter .
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ param { Object } state Global application state .
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ return { Object } The root client ID and index to insert at .
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-12 11:12:47 -04:00
function _ _experimentalGetInsertionPoint ( state ) {
2023-09-26 10:23:26 -04:00
if ( typeof state . blockInserterPanel === 'boolean' ) {
return EMPTY _INSERTION _POINT ;
}
return state . blockInserterPanel ;
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/customize-widgets/build-module/store/actions.js
2022-04-11 08:04:30 -04:00
/ * *
2022-04-12 11:12:47 -04:00
* Returns an action object used to open / close the inserter .
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ 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 .
2022-04-11 08:04:30 -04:00
*
2023-09-26 10:23:26 -04:00
* @ example
* ` ` ` js
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
* import { useState } from 'react' ;
2023-09-26 10:23:26 -04:00
* import { store as customizeWidgetsStore } from '@wordpress/customize-widgets' ;
* import { _ _ } from '@wordpress/i18n' ;
* import { useDispatch } from '@wordpress/data' ;
* import { Button } from '@wordpress/components' ;
*
* const ExampleComponent = ( ) => {
* const { setIsInserterOpened } = useDispatch ( customizeWidgetsStore ) ;
* const [ isOpen , setIsOpen ] = useState ( false ) ;
*
* return (
* < Button
* onClick = { ( ) => {
* setIsInserterOpened ( ! isOpen ) ;
* setIsOpen ( ! isOpen ) ;
* } }
* >
* { _ _ ( 'Open/close inserter' ) }
* < / B u t t o n >
* ) ;
* } ;
* ` ` `
*
2022-04-11 08:04:30 -04:00
* @ return { Object } Action object .
* /
2022-04-12 11:12:47 -04:00
function setIsInserterOpened ( value ) {
2022-04-11 08:04:30 -04:00
return {
2022-04-12 11:12:47 -04:00
type : 'SET_IS_INSERTER_OPENED' ,
value
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/customize-widgets/build-module/store/constants.js
2022-04-11 08:04:30 -04:00
/ * *
2022-04-12 11:12:47 -04:00
* Module Constants
2022-04-11 08:04:30 -04:00
* /
2022-04-12 11:12:47 -04:00
const STORE _NAME = 'core/customize-widgets' ;
2021-05-25 04:40:25 -04:00
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/store/index.js
2022-04-11 08:04:30 -04:00
/ * *
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
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
2022-04-12 11:12:47 -04:00
* Internal 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
* Block editor data store configuration .
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registering-a-store
2022-04-11 08:04:30 -04:00
*
2022-04-12 11:12:47 -04:00
* @ type { Object }
2022-04-11 08:04:30 -04:00
* /
2022-04-12 11:12:47 -04:00
const storeConfig = {
reducer : reducer ,
selectors : selectors _namespaceObject ,
actions : actions _namespaceObject
} ;
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-12 11:12:47 -04:00
* Store definition for the edit widgets namespace .
2022-04-11 08:04:30 -04:00
*
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @ type { Object }
2021-05-25 04:40:25 -04:00
* /
2022-04-12 11:12:47 -04:00
const store = ( 0 , external _wp _data _namespaceObject . createReduxStore ) ( STORE _NAME , storeConfig ) ;
( 0 , external _wp _data _namespaceObject . register ) ( store ) ;
2022-04-11 08:04:30 -04:00
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/index.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2022-04-12 11:12:47 -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
2023-06-27 10:24:19 -04:00
function Inserter ( {
setIsOpened
} ) {
2022-04-12 11:12:47 -04:00
const inserterTitleId = ( 0 , external _wp _compose _namespaceObject . useInstanceId ) ( Inserter , 'customize-widget-layout__inserter-panel-title' ) ;
const insertionPoint = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store ) . _ _experimentalGetInsertionPoint ( ) , [ ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
2022-04-12 11:12:47 -04:00
className : "customize-widgets-layout__inserter-panel" ,
2024-05-31 14:59:00 -04:00
"aria-labelledby" : inserterTitleId ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "customize-widgets-layout__inserter-panel-header" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h2" , {
id : inserterTitleId ,
className : "customize-widgets-layout__inserter-panel-header-title" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Add a block' )
2024-09-19 21:55:35 -04:00
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button
// TODO: Switch to `true` (40px size) if possible
, {
_ _next40pxDefaultSize : false ,
2024-05-31 14:59:00 -04:00
className : "customize-widgets-layout__inserter-panel-header-close-button" ,
icon : close _small ,
onClick : ( ) => setIsOpened ( false ) ,
"aria-label" : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Close inserter' )
} ) ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "customize-widgets-layout__inserter-panel-content" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . _ _experimentalLibrary , {
rootClientId : insertionPoint . rootClientId ,
_ _experimentalInsertionIndex : insertionPoint . insertionIndex ,
showInserterHelpPanel : true ,
onSelect : ( ) => setIsOpened ( false )
} )
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const components _inserter = ( Inserter ) ;
2021-05-25 04:40:25 -04:00
2022-04-12 11:12:47 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
2024-05-31 14:59:00 -04:00
const moreVertical = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2022-04-12 11:12:47 -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-01-31 07:59:56 -05:00
/* harmony default export */ const more _vertical = ( moreVertical ) ;
2021-05-25 04:40:25 -04:00
2024-05-23 15:39:28 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
2022-09-20 11:43:29 -04:00
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const external = /*#__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 : "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-05-23 15:39:28 -04:00
/* harmony default export */ const library _external = ( external ) ;
2022-09-20 11:43:29 -04:00
2024-05-23 15:39:28 -04:00
; // CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
const external _wp _keyboardShortcuts _namespaceObject = window [ "wp" ] [ "keyboardShortcuts" ] ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-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
} ] ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-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 ;
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 : "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination" ,
2024-05-31 14:59:00 -04:00
"aria-label" : forceAriaLabel || ariaLabel ,
children : ( Array . isArray ( shortcut ) ? shortcut : [ shortcut ] ) . 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 : "customize-widgets-keyboard-shortcut-help-modal__shortcut-key" ,
children : character
} , index ) ;
} )
} ) ;
2022-04-11 08:04:30 -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 : "customize-widgets-keyboard-shortcut-help-modal__shortcut-description" ,
children : description
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "customize-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/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.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
2023-06-27 10:24:19 -04:00
function DynamicShortcut ( {
name
} ) {
2021-05-25 04:40:25 -04:00
const {
2022-04-11 08:04:30 -04:00
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 )
2021-05-25 04:40:25 -04:00
} ;
2022-04-11 08:04:30 -04:00
} , [ 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-06-28 12:01:36 -04: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/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.js
2021-05-25 04:40:25 -04:00
/ * *
* 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
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 : "customize-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 : "customize-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 ( 'customize-widgets-keyboard-shortcut-help-modal__section' , className ) ,
children : [ ! ! title && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h2" , {
className : "customize-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
const {
registerShortcut
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
registerShortcut ( {
name : 'core/customize-widgets/keyboard-shortcuts' ,
category : 'main' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Display these keyboard shortcuts.' ) ,
keyCombination : {
modifier : 'access' ,
character : 'h'
}
} ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/keyboard-shortcuts' , toggleModal ) ;
if ( ! isModalActive ) {
return null ;
2021-05-25 04:40:25 -04:00
}
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 : "customize-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 : "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts" ,
shortcuts : [ 'core/customize-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
} ) ]
} ) ;
2021-05-25 04:40:25 -04:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-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
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 MoreMenu ( ) {
const [ isKeyboardShortcutsModalActive , setIsKeyboardShortcutsModalVisible ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const toggleKeyboardShortcutsModal = ( ) => setIsKeyboardShortcutsModalVisible ( ! isKeyboardShortcutsModalActive ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/keyboard-shortcuts' , toggleKeyboardShortcutsModal ) ;
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 . ToolbarDropdownMenu , {
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 : ( ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__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/customize-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/customize-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 ) ( 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/customize-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 ) ( 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/customize-widgets/build-module/components/header/index.js
/ * *
* External dependencies
* /
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2021-11-08 09:29:21 -05:00
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
function Header ( {
sidebar ,
inserter ,
isInserterOpened ,
setIsInserterOpened ,
isFixedToolbarActive
} ) {
2022-04-11 08:04:30 -04:00
const [ [ hasUndo , hasRedo ] , setUndoRedo ] = ( 0 , external _wp _element _namespaceObject . useState ) ( [ sidebar . hasUndo ( ) , sidebar . hasRedo ( ) ] ) ;
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
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
return sidebar . subscribeHistory ( ( ) => {
setUndoRedo ( [ sidebar . hasUndo ( ) , sidebar . hasRedo ( ) ] ) ;
2021-06-01 04:10:04 -04:00
} ) ;
2022-04-11 08:04:30 -04:00
} , [ sidebar ] ) ;
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 : dist _clsx ( 'customize-widgets-header' , {
'is-fixed-toolbar-active' : isFixedToolbarActive
} ) ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _blockEditor _namespaceObject . NavigableToolbar , {
className : "customize-widgets-header-toolbar" ,
"aria-label" : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Document tools' ) ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarButton , {
icon : ! ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? library _undo : library _redo
/* translators: button label text should, if possible, be under 16 characters. */ ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Undo' ) ,
2024-09-19 21:55:35 -04:00
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . primary ( 'z' ) ,
disabled : ! hasUndo ,
2024-05-31 14:59:00 -04:00
onClick : sidebar . undo ,
className : "customize-widgets-editor-history-button undo-button"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarButton , {
icon : ! ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? library _redo : library _undo
/* translators: button label text should, if possible, be under 16 characters. */ ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Redo' ) ,
2024-09-19 21:55:35 -04:00
shortcut : shortcut ,
disabled : ! hasRedo ,
2024-05-31 14:59:00 -04:00
onClick : sidebar . redo ,
className : "customize-widgets-editor-history-button redo-button"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarButton , {
className : "customize-widgets-header-toolbar__inserter-toggle" ,
isPressed : isInserterOpened ,
variant : "primary" ,
icon : library _plus ,
label : ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'Add block' , 'Generic label for block inserter button' ) ,
onClick : ( ) => {
setIsInserterOpened ( isOpen => ! isOpen ) ;
}
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( MoreMenu , { } ) ]
} )
} ) , ( 0 , external _wp _element _namespaceObject . createPortal ) ( /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( components _inserter , {
setIsOpened : setIsInserterOpened
} ) , inserter . contentContainer [ 0 ] ) ]
} ) ;
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/customize-widgets/build-module/components/inserter/use-inserter.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
function useInserter ( inserter ) {
2022-04-12 11:12:47 -04:00
const isInserterOpened = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store ) . isInserterOpened ( ) , [ ] ) ;
2021-07-13 12:41:28 -04:00
const {
2022-04-11 08:04:30 -04:00
setIsInserterOpened
2022-04-12 11:12:47 -04:00
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
2022-04-11 08:04:30 -04:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( isInserterOpened ) {
inserter . open ( ) ;
2021-07-13 12:41:28 -04:00
} else {
2022-04-11 08:04:30 -04:00
inserter . close ( ) ;
}
} , [ inserter , isInserterOpened ] ) ;
return [ isInserterOpened , ( 0 , external _wp _element _namespaceObject . useCallback ) ( updater => {
let isOpen = updater ;
if ( typeof updater === 'function' ) {
2022-04-12 11:12:47 -04:00
isOpen = updater ( ( 0 , external _wp _data _namespaceObject . select ) ( store ) . isInserterOpened ( ) ) ;
2022-04-11 08:04:30 -04:00
}
setIsInserterOpened ( isOpen ) ;
} , [ setIsInserterOpened ] ) ] ;
}
2021-05-25 04:40:25 -04:00
2023-02-07 02:04:52 -05:00
// EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js
2024-02-15 11:53:15 -05:00
var es6 = _ _webpack _require _ _ ( 7734 ) ;
2023-02-07 02:04:52 -05:00
var es6 _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( es6 ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: external ["wp","isShallowEqual"]
2024-01-31 07:59:56 -05:00
const external _wp _isShallowEqual _namespaceObject = window [ "wp" ] [ "isShallowEqual" ] ;
2022-04-11 08:04:30 -04:00
var external _wp _isShallowEqual _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _isShallowEqual _namespaceObject ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/utils.js
// @ts-check
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
* Convert settingId to widgetId .
2021-05-25 04:40:25 -04:00
*
2022-04-11 08:04:30 -04:00
* @ param { string } settingId The setting id .
* @ return { string } The widget id .
2021-05-25 04:40:25 -04:00
* /
2022-04-11 08:04:30 -04:00
function settingIdToWidgetId ( settingId ) {
const matches = settingId . match ( /^widget_(.+)(?:\[(\d+)\])$/ ) ;
if ( matches ) {
const idBase = matches [ 1 ] ;
const number = parseInt ( matches [ 2 ] , 10 ) ;
return ` ${ idBase } - ${ number } ` ;
}
return settingId ;
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
* Transform a block to a customizable widget .
*
* @ param { WPBlock } block The block to be transformed from .
* @ param { Object } existingWidget The widget to be extended from .
* @ return { Object } The transformed widget .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
function blockToWidget ( block , existingWidget = null ) {
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 ) {
if ( block . attributes . id ) {
// Widget that does not extend WP_Widget.
widget = {
id : block . attributes . id
} ;
} else {
const {
encoded ,
hash ,
raw ,
... rest
2023-09-26 10:23:26 -04:00
} = block . attributes . instance ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Widget that extends WP_Widget.
2022-04-11 08:04:30 -04:00
widget = {
idBase : block . attributes . idBase ,
2023-09-26 10:23:26 -04:00
instance : {
... existingWidget ? . instance ,
2022-04-11 08:04:30 -04:00
// Required only for the customizer.
is _widget _customizer _js _value : true ,
encoded _serialized _instance : encoded ,
instance _hash _key : hash ,
raw _instance : raw ,
... rest
}
} ;
}
} else {
const instance = {
content : ( 0 , external _wp _blocks _namespaceObject . serialize ) ( block )
} ;
widget = {
idBase : 'block' ,
widgetClass : 'WP_Widget_Block' ,
instance : {
raw _instance : instance
}
} ;
}
2022-09-20 11:43:29 -04:00
const {
form ,
rendered ,
... restExistingWidget
} = existingWidget || { } ;
2023-09-26 10:23:26 -04:00
return {
... restExistingWidget ,
2022-04-11 08:04:30 -04:00
... widget
} ;
}
2023-09-26 10:23:26 -04:00
2021-05-25 04:40:25 -04:00
/ * *
2022-04-11 08:04:30 -04:00
* Transform a widget to a block .
*
* @ param { Object } widget The widget to be transformed from .
* @ param { string } widget . id The widget id .
* @ param { string } widget . idBase The id base of the widget .
* @ param { number } widget . number The number / index of the widget .
* @ param { Object } widget . instance The instance of the widget .
* @ return { WPBlock } The transformed block .
2021-05-25 04:40:25 -04:00
* /
2023-06-27 10:24:19 -04:00
function widgetToBlock ( {
id ,
idBase ,
number ,
instance
} ) {
2022-04-11 08:04:30 -04:00
let block ;
const {
encoded _serialized _instance : encoded ,
instance _hash _key : hash ,
raw _instance : raw ,
... rest
} = instance ;
if ( idBase === 'block' ) {
2023-02-07 02:04:52 -05:00
var _raw$content ;
const parsedBlocks = ( 0 , external _wp _blocks _namespaceObject . parse ) ( ( _raw$content = raw . content ) !== null && _raw$content !== void 0 ? _raw$content : '' , {
2022-09-20 11:43:29 -04:00
_ _unstableSkipAutop : true
} ) ;
2022-04-11 08:04:30 -04:00
block = parsedBlocks . length ? parsedBlocks [ 0 ] : ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/paragraph' , { } ) ;
} else if ( number ) {
// Widget that extends WP_Widget.
block = ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/legacy-widget' , {
idBase ,
instance : {
encoded ,
hash ,
raw ,
... rest
}
} ) ;
} else {
// Widget that does not extend WP_Widget.
block = ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/legacy-widget' , {
id
} ) ;
}
return ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) ( block , id ) ;
}
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.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
/ * *
* WordPress dependencies
* /
/ * *
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 widgetsToBlocks ( widgets ) {
return widgets . map ( widget => widgetToBlock ( widget ) ) ;
}
function useSidebarBlockEditor ( sidebar ) {
const [ blocks , setBlocks ] = ( 0 , external _wp _element _namespaceObject . useState ) ( ( ) => widgetsToBlocks ( sidebar . getWidgets ( ) ) ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
return sidebar . subscribe ( ( prevWidgets , nextWidgets ) => {
setBlocks ( prevBlocks => {
const prevWidgetsMap = new Map ( prevWidgets . map ( widget => [ widget . id , widget ] ) ) ;
const prevBlocksMap = new Map ( prevBlocks . map ( block => [ ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) , block ] ) ) ;
const nextBlocks = nextWidgets . map ( nextWidget => {
2023-09-26 10:23:26 -04:00
const prevWidget = prevWidgetsMap . get ( nextWidget . id ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Bail out updates.
2022-04-11 08:04:30 -04:00
if ( prevWidget && prevWidget === nextWidget ) {
return prevBlocksMap . get ( nextWidget . id ) ;
}
return widgetToBlock ( nextWidget ) ;
2023-09-26 10:23:26 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Bail out updates.
2022-04-11 08:04:30 -04:00
if ( external _wp _isShallowEqual _default ( ) ( prevBlocks , nextBlocks ) ) {
return prevBlocks ;
}
return nextBlocks ;
} ) ;
} ) ;
} , [ sidebar ] ) ;
const onChangeBlocks = ( 0 , external _wp _element _namespaceObject . useCallback ) ( nextBlocks => {
setBlocks ( prevBlocks => {
if ( external _wp _isShallowEqual _default ( ) ( prevBlocks , nextBlocks ) ) {
return prevBlocks ;
}
const prevBlocksMap = new Map ( prevBlocks . map ( block => [ ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) , block ] ) ) ;
const nextWidgets = nextBlocks . map ( nextBlock => {
2023-09-26 10:23:26 -04:00
const widgetId = ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( nextBlock ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Update existing widgets.
2022-04-11 08:04:30 -04:00
if ( widgetId && prevBlocksMap . has ( widgetId ) ) {
const prevBlock = prevBlocksMap . get ( widgetId ) ;
2023-09-26 10:23:26 -04:00
const prevWidget = sidebar . getWidget ( widgetId ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Bail out updates by returning the previous widgets.
// Deep equality is necessary until the block editor's internals changes.
2023-02-07 02:04:52 -05:00
if ( es6 _default ( ) ( nextBlock , prevBlock ) && prevWidget ) {
2022-04-11 08:04:30 -04:00
return prevWidget ;
}
return blockToWidget ( nextBlock , prevWidget ) ;
2023-09-26 10:23:26 -04:00
}
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Add a new widget.
2022-04-11 08:04:30 -04:00
return blockToWidget ( nextBlock ) ;
2023-09-26 10:23:26 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
2023-09-26 10:23:26 -04:00
// Bail out updates if the updated widgets are the same.
2022-04-11 08:04:30 -04:00
if ( external _wp _isShallowEqual _default ( ) ( sidebar . getWidgets ( ) , nextWidgets ) ) {
return prevBlocks ;
}
const addedWidgetIds = sidebar . setWidgets ( nextWidgets ) ;
return nextBlocks . reduce ( ( updatedNextBlocks , nextBlock , index ) => {
const addedWidgetId = addedWidgetIds [ index ] ;
if ( addedWidgetId !== null ) {
// Only create a new instance if necessary to prevent
// the whole editor from re-rendering on every edit.
if ( updatedNextBlocks === nextBlocks ) {
updatedNextBlocks = nextBlocks . slice ( ) ;
}
updatedNextBlocks [ index ] = ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) ( nextBlock , addedWidgetId ) ;
}
return updatedNextBlocks ;
} , nextBlocks ) ;
} ) ;
} , [ sidebar ] ) ;
return [ blocks , onChangeBlocks , onChangeBlocks ] ;
}
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/index.js
/ * *
* WordPress dependencies
* /
2021-11-08 09:29:21 -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 FocusControlContext = ( 0 , external _wp _element _namespaceObject . createContext ) ( ) ;
2023-06-27 10:24:19 -04:00
function FocusControl ( {
api ,
sidebarControls ,
children
} ) {
2022-04-11 08:04:30 -04:00
const [ focusedWidgetIdRef , setFocusedWidgetIdRef ] = ( 0 , external _wp _element _namespaceObject . useState ) ( {
current : null
} ) ;
const focusWidget = ( 0 , external _wp _element _namespaceObject . useCallback ) ( widgetId => {
for ( const sidebarControl of sidebarControls ) {
const widgets = sidebarControl . setting . get ( ) ;
if ( widgets . includes ( widgetId ) ) {
sidebarControl . sectionInstance . expand ( {
// Schedule it after the complete callback so that
// it won't be overridden by the "Back" button focus.
completeCallback ( ) {
// Create a "ref-like" object every time to ensure
// the same widget id can also triggers the focus control.
setFocusedWidgetIdRef ( {
current : widgetId
} ) ;
}
} ) ;
break ;
}
}
} , [ sidebarControls ] ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
function handleFocus ( settingId ) {
const widgetId = settingIdToWidgetId ( settingId ) ;
focusWidget ( widgetId ) ;
}
2023-06-27 10:24:19 -04:00
let previewBound = false ;
2022-04-11 08:04:30 -04:00
function handleReady ( ) {
api . previewer . preview . bind ( 'focus-control-for-setting' , handleFocus ) ;
2023-06-27 10:24:19 -04:00
previewBound = true ;
2022-04-11 08:04:30 -04:00
}
api . previewer . bind ( 'ready' , handleReady ) ;
return ( ) => {
api . previewer . unbind ( 'ready' , handleReady ) ;
2023-06-27 10:24:19 -04:00
if ( previewBound ) {
api . previewer . preview . unbind ( 'focus-control-for-setting' , handleFocus ) ;
}
2022-04-11 08:04:30 -04:00
} ;
} , [ api , focusWidget ] ) ;
const context = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => [ focusedWidgetIdRef , focusWidget ] , [ focusedWidgetIdRef , focusWidget ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( FocusControlContext . Provider , {
value : context ,
children : children
} ) ;
2022-04-11 08:04:30 -04:00
}
const useFocusControl = ( ) => ( 0 , external _wp _element _namespaceObject . useContext ) ( FocusControlContext ) ;
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.js
/ * *
* WordPress dependencies
* /
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04: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
function useBlocksFocusControl ( blocks ) {
const {
selectBlock
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
const [ focusedWidgetIdRef ] = useFocusControl ( ) ;
const blocksRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( blocks ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
blocksRef . current = blocks ;
} , [ blocks ] ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( focusedWidgetIdRef . current ) {
const focusedBlock = blocksRef . current . find ( block => ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) === focusedWidgetIdRef . current ) ;
if ( focusedBlock ) {
2023-09-26 10:23:26 -04:00
selectBlock ( focusedBlock . clientId ) ;
// If the block is already being selected, the DOM node won't
2022-04-11 08:04:30 -04:00
// get focused again automatically.
// We select the DOM and focus it manually here.
const blockNode = document . querySelector ( ` [data-block=" ${ focusedBlock . clientId } "] ` ) ;
2023-06-27 10:24:19 -04:00
blockNode ? . focus ( ) ;
2022-04-11 08:04:30 -04:00
}
}
} , [ focusedWidgetIdRef , selectBlock ] ) ;
}
2021-11-08 09:29:21 -05:00
2023-02-14 10:44:36 -05:00
; // CONCATENATED MODULE: external ["wp","privateApis"]
2024-01-31 07:59:56 -05:00
const external _wp _privateApis _namespaceObject = window [ "wp" ] [ "privateApis" ] ;
2023-06-27 10:24:19 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/lock-unlock.js
2023-02-07 02:04:52 -05:00
/ * *
* 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/customize-widgets' ) ;
2023-02-07 02:04:52 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
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-11-15 07:50:17 -05:00
2021-11-08 09:29:21 -05: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-06-27 10:24:19 -04:00
function SidebarEditorProvider ( {
sidebar ,
settings ,
children
} ) {
2022-04-11 08:04:30 -04:00
const [ blocks , onInput , onChange ] = useSidebarBlockEditor ( sidebar ) ;
useBlocksFocusControl ( blocks ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ExperimentalBlockEditorProvider , {
2022-04-11 08:04:30 -04:00
value : blocks ,
onInput : onInput ,
onChange : onChange ,
settings : settings ,
2024-05-31 14:59:00 -04:00
useSubRegistry : false ,
children : children
} ) ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/welcome-guide/index.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
* /
2021-11-15 07:50:17 -05:00
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 WelcomeGuide ( {
sidebar
} ) {
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 isEntirelyBlockWidgets = sidebar . getWidgets ( ) . every ( widget => widget . id . startsWith ( 'block-' ) ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , {
className : "customize-widgets-welcome-guide" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
className : "customize-widgets-welcome-guide__image__wrapper" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "picture" , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "source" , {
srcSet : "https://s.w.org/images/block-editor/welcome-editor.svg" ,
media : "(prefers-reduced-motion: reduce)"
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "img" , {
className : "customize-widgets-welcome-guide__image" ,
src : "https://s.w.org/images/block-editor/welcome-editor.gif" ,
width : "312" ,
height : "240" ,
alt : ""
} ) ]
} )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h1" , {
className : "customize-widgets-welcome-guide__heading" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome to block Widgets' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "p" , {
className : "customize-widgets-welcome-guide__text" ,
children : isEntirelyBlockWidgets ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Your theme provides 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.' ) : ( 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.' )
2024-09-19 21:55:35 -04:00
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button
// TODO: Switch to `true` (40px size) if possible
, {
_ _next40pxDefaultSize : false ,
2024-05-31 14:59:00 -04:00
className : "customize-widgets-welcome-guide__button" ,
variant : "primary" ,
onClick : ( ) => toggle ( 'core/customize-widgets' , 'welcomeGuide' ) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Got it' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "hr" , {
className : "customize-widgets-welcome-guide__separator"
} ) , ! isEntirelyBlockWidgets && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "p" , {
className : "customize-widgets-welcome-guide__more-info" ,
children : [ ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Want to stick with the old widgets?' ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "br" , { } ) , /*#__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.' )
} ) ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "p" , {
className : "customize-widgets-welcome-guide__more-info" ,
children : [ ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'New to the block editor?' ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "br" , { } ) , /*#__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
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcuts/index.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
* /
2021-11-15 07:50:17 -05:00
2021-11-08 09:29:21 -05:00
2023-06-27 10:24:19 -04:00
function KeyboardShortcuts ( {
undo ,
redo ,
save
} ) {
2022-04-11 08:04:30 -04:00
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/undo' , event => {
undo ( ) ;
event . preventDefault ( ) ;
} ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/redo' , event => {
redo ( ) ;
event . preventDefault ( ) ;
} ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/customize-widgets/save' , event => {
event . preventDefault ( ) ;
save ( ) ;
} ) ;
return null ;
}
function KeyboardShortcutsRegister ( ) {
const {
registerShortcut ,
unregisterShortcut
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
registerShortcut ( {
name : 'core/customize-widgets/undo' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Undo your last changes.' ) ,
keyCombination : {
modifier : 'primary' ,
character : 'z'
}
} ) ;
registerShortcut ( {
name : 'core/customize-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/customize-widgets/save' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Save your changes.' ) ,
keyCombination : {
modifier : 'primary' ,
character : 's'
}
} ) ;
return ( ) => {
unregisterShortcut ( 'core/customize-widgets/undo' ) ;
unregisterShortcut ( 'core/customize-widgets/redo' ) ;
unregisterShortcut ( 'core/customize-widgets/save' ) ;
} ;
} , [ registerShortcut ] ) ;
return null ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
KeyboardShortcuts . Register = KeyboardShortcutsRegister ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const keyboard _shortcuts = ( KeyboardShortcuts ) ;
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/block-appender/index.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
2022-04-11 08:04:30 -04:00
function BlockAppender ( props ) {
const ref = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
2023-09-26 10:23:26 -04:00
const isBlocksListEmpty = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _blockEditor _namespaceObject . store ) . getBlockCount ( ) === 0 ) ;
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Move the focus to the block appender to prevent focus from
// being lost when emptying the widget area.
2022-04-11 08:04:30 -04:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( isBlocksListEmpty && ref . current ) {
const {
ownerDocument
} = ref . current ;
if ( ! ownerDocument . activeElement || ownerDocument . activeElement === ownerDocument . body ) {
ref . current . focus ( ) ;
}
}
} , [ isBlocksListEmpty ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . ButtonBlockAppender , {
2023-09-26 10:23:26 -04:00
... props ,
2022-04-11 08:04:30 -04:00
ref : ref
2023-06-27 10:24:19 -04:00
} ) ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/index.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
* /
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
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
* /
2022-04-11 08:04:30 -04:00
2024-05-31 14:59:00 -04:00
2023-09-26 10:23:26 -04:00
const {
ExperimentalBlockCanvas : BlockCanvas
} = unlock ( external _wp _blockEditor _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 SidebarBlockEditor ( {
blockEditorSettings ,
sidebar ,
inserter ,
inspector
} ) {
2022-04-11 08:04:30 -04:00
const [ isInserterOpened , setIsInserterOpened ] = useInserter ( inserter ) ;
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 isMediumViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'small' ) ;
2022-04-11 08:04:30 -04:00
const {
hasUploadPermissions ,
isFixedToolbarActive ,
keepCaretInsideBlock ,
isWelcomeGuideActive
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
2022-09-20 11:43:29 -04:00
var _select$canUser ;
2022-04-11 08:04:30 -04:00
const {
2022-04-12 11:12:47 -04:00
get
} = select ( external _wp _preferences _namespaceObject . store ) ;
2022-04-11 08:04:30 -04:00
return {
2024-09-19 21:55:35 -04:00
hasUploadPermissions : ( _select$canUser = select ( external _wp _coreData _namespaceObject . store ) . canUser ( 'create' , {
kind : 'root' ,
name : 'media'
} ) ) !== null && _select$canUser !== void 0 ? _select$canUser : true ,
2022-04-12 11:12:47 -04:00
isFixedToolbarActive : ! ! get ( 'core/customize-widgets' , 'fixedToolbar' ) ,
keepCaretInsideBlock : ! ! get ( 'core/customize-widgets' , 'keepCaretInsideBlock' ) ,
isWelcomeGuideActive : ! ! get ( 'core/customize-widgets' , 'welcomeGuide' )
2022-04-11 08:04:30 -04:00
} ;
} , [ ] ) ;
const settings = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
let mediaUploadBlockEditor ;
if ( hasUploadPermissions ) {
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
_ _experimentalSetIsInserterOpened : setIsInserterOpened ,
mediaUpload : mediaUploadBlockEditor ,
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 || ! isMediumViewport ,
2022-04-11 08:04:30 -04:00
keepCaretInsideBlock ,
_ _unstableHasCustomAppender : true
} ;
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
} , [ hasUploadPermissions , blockEditorSettings , isFixedToolbarActive , isMediumViewport , keepCaretInsideBlock , setIsInserterOpened ] ) ;
2022-04-11 08:04:30 -04:00
if ( isWelcomeGuideActive ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WelcomeGuide , {
2022-04-11 08:04:30 -04:00
sidebar : sidebar
} ) ;
}
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 ) ( keyboard _shortcuts . Register , { } ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockKeyboardShortcuts , { } ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( SidebarEditorProvider , {
sidebar : sidebar ,
settings : settings ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( keyboard _shortcuts , {
undo : sidebar . undo ,
redo : sidebar . redo ,
save : sidebar . save
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( header , {
sidebar : sidebar ,
inserter : inserter ,
isInserterOpened : isInserterOpened ,
setIsInserterOpened : setIsInserterOpened ,
isFixedToolbarActive : isFixedToolbarActive || ! isMediumViewport
} ) , ( isFixedToolbarActive || ! isMediumViewport ) && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockToolbar , {
hideDragHandle : true
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockCanvas , {
shouldIframe : false ,
styles : settings . defaultEditorStyles ,
height : "100%" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockList , {
renderAppender : BlockAppender
} )
} ) , ( 0 , external _wp _element _namespaceObject . createPortal ) (
/*#__PURE__*/
// This is a temporary hack to prevent button component inside <BlockInspector>
// from submitting form when type="button" is not specified.
( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "form" , {
onSubmit : event => event . preventDefault ( ) ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockInspector , { } )
} ) , inspector . contentContainer [ 0 ] ) ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . _ _unstableBlockSettingsMenuFirstItem , {
children : ( {
onClose
} ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( block _inspector _button , {
inspector : inspector ,
closeMenu : onClose
} )
} ) ]
} ) ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-controls/index.js
2021-11-08 09:29:21 -05:00
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
const SidebarControlsContext = ( 0 , external _wp _element _namespaceObject . createContext ) ( ) ;
2023-06-27 10:24:19 -04:00
function SidebarControls ( {
sidebarControls ,
activeSidebarControl ,
children
} ) {
2022-04-11 08:04:30 -04:00
const context = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => ( {
sidebarControls ,
activeSidebarControl
} ) , [ sidebarControls , activeSidebarControl ] ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( SidebarControlsContext . Provider , {
value : context ,
children : children
} ) ;
2022-04-11 08:04:30 -04:00
}
function useSidebarControls ( ) {
const {
sidebarControls
} = ( 0 , external _wp _element _namespaceObject . useContext ) ( SidebarControlsContext ) ;
return sidebarControls ;
}
function useActiveSidebarControl ( ) {
const {
activeSidebarControl
} = ( 0 , external _wp _element _namespaceObject . useContext ) ( SidebarControlsContext ) ;
return activeSidebarControl ;
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.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
* /
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* We can ' t just use < BlockSelectionClearer > because the customizer has
* many root nodes rather than just one in the post editor .
* We need to listen to the focus events in all those roots , and also in
* the preview iframe .
* This hook will clear the selected block when focusing outside the editor ,
* with a few exceptions :
* 1. Focusing on popovers .
* 2. Focusing on the inspector .
* 3. Focusing on any modals / dialogs .
* These cases are normally triggered by user interactions from the editor ,
* not by explicitly focusing outside the editor , hence no need for clearing .
2021-11-08 09:29:21 -05:00
*
2022-04-11 08:04:30 -04:00
* @ param { Object } sidebarControl The sidebar control instance .
* @ param { Object } popoverRef The ref object of the popover node container .
2021-11-08 09:29:21 -05:00
* /
2022-04-11 08:04:30 -04:00
function useClearSelectedBlock ( sidebarControl , popoverRef ) {
const {
hasSelectedBlock ,
hasMultiSelection
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( external _wp _blockEditor _namespaceObject . store ) ;
const {
clearSelectedBlock
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( popoverRef . current && sidebarControl ) {
const inspector = sidebarControl . inspector ;
const container = sidebarControl . container [ 0 ] ;
const ownerDocument = container . ownerDocument ;
const ownerWindow = ownerDocument . defaultView ;
function handleClearSelectedBlock ( element ) {
2023-09-26 10:23:26 -04:00
if (
// 1. Make sure there are blocks being selected.
( hasSelectedBlock ( ) || hasMultiSelection ( ) ) &&
// 2. The element should exist in the DOM (not deleted).
element && ownerDocument . contains ( element ) &&
// 3. It should also not exist in the container, the popover, nor the dialog.
! container . contains ( element ) && ! popoverRef . current . contains ( element ) && ! element . closest ( '[role="dialog"]' ) &&
// 4. The inspector should not be opened.
2022-04-11 08:04:30 -04:00
! inspector . expanded ( ) ) {
clearSelectedBlock ( ) ;
}
2023-09-26 10:23:26 -04:00
}
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Handle mouse down in the same document.
2022-04-11 08:04:30 -04:00
function handleMouseDown ( event ) {
handleClearSelectedBlock ( event . target ) ;
2023-09-26 10:23:26 -04:00
}
// Handle focusing outside the current document, like to iframes.
2022-04-11 08:04:30 -04:00
function handleBlur ( ) {
handleClearSelectedBlock ( ownerDocument . activeElement ) ;
}
ownerDocument . addEventListener ( 'mousedown' , handleMouseDown ) ;
ownerWindow . addEventListener ( 'blur' , handleBlur ) ;
return ( ) => {
ownerDocument . removeEventListener ( 'mousedown' , handleMouseDown ) ;
ownerWindow . removeEventListener ( 'blur' , handleBlur ) ;
} ;
}
} , [ popoverRef , sidebarControl , hasSelectedBlock , hasMultiSelection , clearSelectedBlock ] ) ;
}
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/index.js
2021-11-08 09:29:21 -05:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2022-04-11 08:04:30 -04:00
2024-05-31 14:59:00 -04:00
2023-06-27 10:24:19 -04:00
function CustomizeWidgets ( {
api ,
sidebarControls ,
blockEditorSettings
} ) {
2022-04-11 08:04:30 -04:00
const [ activeSidebarControl , setActiveSidebarControl ] = ( 0 , external _wp _element _namespaceObject . useState ) ( null ) ;
const parentContainer = document . getElementById ( 'customize-theme-controls' ) ;
const popoverRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
useClearSelectedBlock ( activeSidebarControl , popoverRef ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
const unsubscribers = sidebarControls . map ( sidebarControl => sidebarControl . subscribe ( expanded => {
if ( expanded ) {
setActiveSidebarControl ( sidebarControl ) ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
} ) ) ;
return ( ) => {
unsubscribers . forEach ( unsubscriber => unsubscriber ( ) ) ;
} ;
} , [ sidebarControls ] ) ;
2024-05-31 14:59:00 -04:00
const activeSidebar = activeSidebarControl && ( 0 , external _wp _element _namespaceObject . createPortal ) ( /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ErrorBoundary , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( SidebarBlockEditor , {
blockEditorSettings : blockEditorSettings ,
sidebar : activeSidebarControl . sidebarAdapter ,
inserter : activeSidebarControl . inserter ,
inspector : activeSidebarControl . inspector
} , activeSidebarControl . id )
} ) , activeSidebarControl . container [ 0 ] ) ;
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// We have to portal this to the parent of both the editor and the inspector,
// so that the popovers will appear above both of them.
2024-05-31 14:59:00 -04:00
const popover = parentContainer && ( 0 , external _wp _element _namespaceObject . createPortal ) ( /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , {
2022-04-11 08:04:30 -04:00
className : "customize-widgets-popover" ,
2024-05-31 14:59:00 -04:00
ref : popoverRef ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Popover . Slot , { } )
} ) , parentContainer ) ;
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . SlotFillProvider , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( SidebarControls , {
sidebarControls : sidebarControls ,
activeSidebarControl : activeSidebarControl ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( FocusControl , {
api : api ,
sidebarControls : sidebarControls ,
children : [ activeSidebar , popover ]
} )
} )
} ) ;
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/customize-widgets/build-module/controls/inspector-section.js
function getInspectorSection ( ) {
const {
wp : {
customize
}
} = window ;
return class InspectorSection extends customize . Section {
constructor ( id , options ) {
super ( id , options ) ;
this . parentSection = options . parentSection ;
this . returnFocusWhenClose = null ;
this . _isOpen = false ;
}
get isOpen ( ) {
return this . _isOpen ;
}
set isOpen ( value ) {
this . _isOpen = value ;
this . triggerActiveCallbacks ( ) ;
}
ready ( ) {
this . contentContainer [ 0 ] . classList . add ( 'customize-widgets-layout__inspector' ) ;
}
isContextuallyActive ( ) {
return this . isOpen ;
}
onChangeExpanded ( expanded , args ) {
super . onChangeExpanded ( expanded , args ) ;
if ( this . parentSection && ! args . unchanged ) {
if ( expanded ) {
this . parentSection . collapse ( {
manualTransition : true
} ) ;
} else {
this . parentSection . expand ( {
manualTransition : true ,
completeCallback : ( ) => {
// Return focus after finishing the transition.
if ( this . returnFocusWhenClose && ! this . contentContainer [ 0 ] . contains ( this . returnFocusWhenClose ) ) {
this . returnFocusWhenClose . focus ( ) ;
}
}
} ) ;
}
}
}
2023-06-27 10:24:19 -04:00
open ( {
returnFocusWhenClose
} = { } ) {
2022-04-11 08:04:30 -04:00
this . isOpen = true ;
this . returnFocusWhenClose = returnFocusWhenClose ;
this . expand ( {
allowMultiple : true
} ) ;
}
close ( ) {
this . collapse ( {
allowMultiple : true
} ) ;
}
collapse ( options ) {
// Overridden collapse() function. Mostly call the parent collapse(), but also
// move our .isOpen to false.
// Initially, I tried tracking this with onChangeExpanded(), but it doesn't work
// because the block settings sidebar is a layer "on top of" the G editor sidebar.
//
// For example, when closing the block settings sidebar, the G
// editor sidebar would display, and onChangeExpanded in
// inspector-section would run with expanded=true, but I want
// isOpen to be false when the block settings is closed.
this . isOpen = false ;
super . collapse ( options ) ;
}
triggerActiveCallbacks ( ) {
// Manually fire the callbacks associated with moving this.active
// from false to true. "active" is always true for this section,
// and "isContextuallyActive" reflects if the block settings
// sidebar is currently visible, that is, it has replaced the main
// Gutenberg view.
// The WP customizer only checks ".isContextuallyActive()" when
// ".active" changes values. But our ".active" never changes value.
// The WP customizer never foresaw a section being used a way we
// fit the block settings sidebar into a section. By manually
// triggering the "this.active" callbacks, we force the WP
// customizer to query our .isContextuallyActive() function and
// update its view of our status.
this . active . callbacks . fireWith ( this . active , [ false , true ] ) ;
}
} ;
}
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-section.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
* /
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
* /
2022-04-11 08:04:30 -04:00
const getInspectorSectionId = sidebarId => ` widgets-inspector- ${ sidebarId } ` ;
function getSidebarSection ( ) {
const {
wp : {
customize
}
} = window ;
2022-04-12 11:12:47 -04:00
const reduceMotionMediaQuery = window . matchMedia ( '(prefers-reduced-motion: reduce)' ) ;
let isReducedMotion = reduceMotionMediaQuery . matches ;
reduceMotionMediaQuery . addEventListener ( 'change' , event => {
isReducedMotion = event . matches ;
} ) ;
2022-04-11 08:04:30 -04:00
return class SidebarSection extends customize . Section {
ready ( ) {
const InspectorSection = getInspectorSection ( ) ;
this . inspector = new InspectorSection ( getInspectorSectionId ( this . id ) , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block Settings' ) ,
parentSection : this ,
customizeAction : [ ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Customizing' ) , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Widgets' ) , this . params . title ] . join ( ' ▸ ' )
} ) ;
customize . section . add ( this . inspector ) ;
this . contentContainer [ 0 ] . classList . add ( 'customize-widgets__sidebar-section' ) ;
}
hasSubSectionOpened ( ) {
return this . inspector . expanded ( ) ;
}
onChangeExpanded ( expanded , _args ) {
const controls = this . controls ( ) ;
2023-09-26 10:23:26 -04:00
const args = {
... _args ,
2022-04-11 08:04:30 -04:00
completeCallback ( ) {
controls . forEach ( control => {
2023-06-27 10:24:19 -04:00
control . onChangeSectionExpanded ? . ( expanded , args ) ;
2022-04-11 08:04:30 -04:00
} ) ;
2023-06-27 10:24:19 -04:00
_args . completeCallback ? . ( ) ;
2021-11-15 07:50:17 -05:00
}
2022-04-11 08:04:30 -04:00
} ;
if ( args . manualTransition ) {
if ( expanded ) {
this . contentContainer . addClass ( [ 'busy' , 'open' ] ) ;
this . contentContainer . removeClass ( 'is-sub-section-open' ) ;
this . contentContainer . closest ( '.wp-full-overlay' ) . addClass ( 'section-open' ) ;
} else {
this . contentContainer . addClass ( [ 'busy' , 'is-sub-section-open' ] ) ;
this . contentContainer . closest ( '.wp-full-overlay' ) . addClass ( 'section-open' ) ;
this . contentContainer . removeClass ( 'open' ) ;
2022-04-12 11:12:47 -04:00
}
const handleTransitionEnd = ( ) => {
this . contentContainer . removeClass ( 'busy' ) ;
args . completeCallback ( ) ;
} ;
if ( isReducedMotion ) {
handleTransitionEnd ( ) ;
} else {
this . contentContainer . one ( 'transitionend' , handleTransitionEnd ) ;
2022-04-11 08:04:30 -04:00
}
} else {
super . onChangeExpanded ( expanded , args ) ;
}
}
} ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-adapter.js
/ * *
* Internal dependencies
* /
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
const {
wp
} = window ;
function parseWidgetId ( widgetId ) {
const matches = widgetId . match ( /^(.+)-(\d+)$/ ) ;
if ( matches ) {
return {
idBase : matches [ 1 ] ,
number : parseInt ( matches [ 2 ] , 10 )
} ;
2023-09-26 10:23:26 -04:00
}
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Likely an old single widget.
2022-04-11 08:04:30 -04:00
return {
idBase : widgetId
} ;
}
function widgetIdToSettingId ( widgetId ) {
const {
idBase ,
number
} = parseWidgetId ( widgetId ) ;
if ( number ) {
return ` widget_ ${ idBase } [ ${ number } ] ` ;
}
return ` widget_ ${ idBase } ` ;
}
2023-09-26 10:23:26 -04:00
2021-11-08 09:29:21 -05:00
/ * *
2022-04-11 08:04:30 -04:00
* This is a custom debounce function to call different callbacks depending on
* whether it ' s the _leading _ call or not .
*
* @ param { Function } leading The callback that gets called first .
* @ param { Function } callback The callback that gets called after the first time .
* @ param { number } timeout The debounced time in milliseconds .
* @ return { Function } The debounced function .
2021-11-08 09:29:21 -05:00
* /
2022-04-11 08:04:30 -04:00
function debounce ( leading , callback , timeout ) {
let isLeading = false ;
let timerID ;
2023-06-27 10:24:19 -04:00
function debounced ( ... args ) {
2022-04-11 08:04:30 -04:00
const result = ( isLeading ? callback : leading ) . apply ( this , args ) ;
isLeading = true ;
clearTimeout ( timerID ) ;
timerID = setTimeout ( ( ) => {
isLeading = false ;
} , timeout ) ;
return result ;
}
debounced . cancel = ( ) => {
isLeading = false ;
clearTimeout ( timerID ) ;
} ;
return debounced ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
class SidebarAdapter {
constructor ( setting , api ) {
this . setting = setting ;
this . api = api ;
this . locked = false ;
this . widgetsCache = new WeakMap ( ) ;
this . subscribers = new Set ( ) ;
this . history = [ this . _getWidgetIds ( ) . map ( widgetId => this . getWidget ( widgetId ) ) ] ;
this . historyIndex = 0 ;
2023-09-26 10:23:26 -04:00
this . historySubscribers = new Set ( ) ;
// Debounce the input for 1 second.
2022-04-11 08:04:30 -04:00
this . _debounceSetHistory = debounce ( this . _pushHistory , this . _replaceHistory , 1000 ) ;
this . setting . bind ( this . _handleSettingChange . bind ( this ) ) ;
this . api . bind ( 'change' , this . _handleAllSettingsChange . bind ( this ) ) ;
this . undo = this . undo . bind ( this ) ;
this . redo = this . redo . bind ( this ) ;
this . save = this . save . bind ( this ) ;
}
subscribe ( callback ) {
this . subscribers . add ( callback ) ;
return ( ) => {
this . subscribers . delete ( callback ) ;
} ;
}
getWidgets ( ) {
return this . history [ this . historyIndex ] ;
}
2023-06-27 10:24:19 -04:00
_emit ( ... args ) {
2022-04-11 08:04:30 -04:00
for ( const callback of this . subscribers ) {
2023-06-27 10:24:19 -04:00
callback ( ... args ) ;
2022-04-11 08:04:30 -04:00
}
}
_getWidgetIds ( ) {
return this . setting . get ( ) ;
}
_pushHistory ( ) {
this . history = [ ... this . history . slice ( 0 , this . historyIndex + 1 ) , this . _getWidgetIds ( ) . map ( widgetId => this . getWidget ( widgetId ) ) ] ;
this . historyIndex += 1 ;
this . historySubscribers . forEach ( listener => listener ( ) ) ;
}
_replaceHistory ( ) {
this . history [ this . historyIndex ] = this . _getWidgetIds ( ) . map ( widgetId => this . getWidget ( widgetId ) ) ;
}
_handleSettingChange ( ) {
if ( this . locked ) {
return ;
}
const prevWidgets = this . getWidgets ( ) ;
this . _pushHistory ( ) ;
this . _emit ( prevWidgets , this . getWidgets ( ) ) ;
}
_handleAllSettingsChange ( setting ) {
if ( this . locked ) {
return ;
}
if ( ! setting . id . startsWith ( 'widget_' ) ) {
return ;
}
const widgetId = settingIdToWidgetId ( setting . id ) ;
if ( ! this . setting . get ( ) . includes ( widgetId ) ) {
return ;
}
const prevWidgets = this . getWidgets ( ) ;
this . _pushHistory ( ) ;
this . _emit ( prevWidgets , this . getWidgets ( ) ) ;
}
_createWidget ( widget ) {
const widgetModel = wp . customize . Widgets . availableWidgets . findWhere ( {
id _base : widget . idBase
} ) ;
let number = widget . number ;
if ( widgetModel . get ( 'is_multi' ) && ! number ) {
widgetModel . set ( 'multi_number' , widgetModel . get ( 'multi_number' ) + 1 ) ;
number = widgetModel . get ( 'multi_number' ) ;
}
const settingId = number ? ` widget_ ${ widget . idBase } [ ${ number } ] ` : ` widget_ ${ widget . idBase } ` ;
const settingArgs = {
transport : wp . customize . Widgets . data . selectiveRefreshableWidgets [ widgetModel . get ( 'id_base' ) ] ? 'postMessage' : 'refresh' ,
previewer : this . setting . previewer
} ;
const setting = this . api . create ( settingId , settingId , '' , settingArgs ) ;
setting . set ( widget . instance ) ;
const widgetId = settingIdToWidgetId ( settingId ) ;
return widgetId ;
}
_removeWidget ( widget ) {
const settingId = widgetIdToSettingId ( widget . id ) ;
const setting = this . api ( settingId ) ;
if ( setting ) {
const instance = setting . get ( ) ;
this . widgetsCache . delete ( instance ) ;
}
this . api . remove ( settingId ) ;
}
_updateWidget ( widget ) {
2023-09-26 10:23:26 -04:00
const prevWidget = this . getWidget ( widget . id ) ;
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Bail out update if nothing changed.
2022-04-11 08:04:30 -04:00
if ( prevWidget === widget ) {
return widget . id ;
2023-09-26 10:23:26 -04:00
}
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Update existing setting if only the widget's instance changed.
2022-04-11 08:04:30 -04:00
if ( prevWidget . idBase && widget . idBase && prevWidget . idBase === widget . idBase ) {
const settingId = widgetIdToSettingId ( widget . id ) ;
this . api ( settingId ) . set ( widget . instance ) ;
return widget . id ;
2023-09-26 10:23:26 -04:00
}
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Otherwise delete and re-create.
2022-04-11 08:04:30 -04:00
this . _removeWidget ( widget ) ;
return this . _createWidget ( widget ) ;
}
getWidget ( widgetId ) {
if ( ! widgetId ) {
return null ;
2021-11-08 09:29:21 -05:00
}
const {
2022-04-11 08:04:30 -04:00
idBase ,
number
} = parseWidgetId ( widgetId ) ;
const settingId = widgetIdToSettingId ( widgetId ) ;
const setting = this . api ( settingId ) ;
if ( ! setting ) {
return null ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
const instance = setting . get ( ) ;
if ( this . widgetsCache . has ( instance ) ) {
return this . widgetsCache . get ( instance ) ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
const widget = {
id : widgetId ,
idBase ,
number ,
instance
2021-11-08 09:29:21 -05:00
} ;
2022-04-11 08:04:30 -04:00
this . widgetsCache . set ( instance , widget ) ;
return widget ;
}
_updateWidgets ( nextWidgets ) {
this . locked = true ;
const addedWidgetIds = [ ] ;
const nextWidgetIds = nextWidgets . map ( nextWidget => {
if ( nextWidget . id && this . getWidget ( nextWidget . id ) ) {
addedWidgetIds . push ( null ) ;
return this . _updateWidget ( nextWidget ) ;
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
const widgetId = this . _createWidget ( nextWidget ) ;
addedWidgetIds . push ( widgetId ) ;
return widgetId ;
} ) ;
const deletedWidgets = this . getWidgets ( ) . filter ( widget => ! nextWidgetIds . includes ( widget . id ) ) ;
deletedWidgets . forEach ( widget => this . _removeWidget ( widget ) ) ;
this . setting . set ( nextWidgetIds ) ;
this . locked = false ;
return addedWidgetIds ;
}
setWidgets ( nextWidgets ) {
const addedWidgetIds = this . _updateWidgets ( nextWidgets ) ;
this . _debounceSetHistory ( ) ;
return addedWidgetIds ;
}
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Undo / Redo related features
* /
hasUndo ( ) {
return this . historyIndex > 0 ;
}
hasRedo ( ) {
return this . historyIndex < this . history . length - 1 ;
}
_seek ( historyIndex ) {
const currentWidgets = this . getWidgets ( ) ;
this . historyIndex = historyIndex ;
const widgets = this . history [ this . historyIndex ] ;
this . _updateWidgets ( widgets ) ;
this . _emit ( currentWidgets , this . getWidgets ( ) ) ;
this . historySubscribers . forEach ( listener => listener ( ) ) ;
this . _debounceSetHistory . cancel ( ) ;
}
undo ( ) {
if ( ! this . hasUndo ( ) ) {
return ;
}
this . _seek ( this . historyIndex - 1 ) ;
}
redo ( ) {
if ( ! this . hasRedo ( ) ) {
2021-11-08 09:29:21 -05:00
return ;
}
2022-04-11 08:04:30 -04:00
this . _seek ( this . historyIndex + 1 ) ;
}
subscribeHistory ( listener ) {
this . historySubscribers . add ( listener ) ;
2021-11-08 09:29:21 -05:00
return ( ) => {
2022-04-11 08:04:30 -04:00
this . historySubscribers . delete ( listener ) ;
2021-11-08 09:29:21 -05:00
} ;
2022-04-11 08:04:30 -04:00
}
save ( ) {
this . api . previewer . save ( ) ;
}
}
2021-11-08 09:29:21 -05:00
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/customize-widgets/build-module/controls/inserter-outer-section.js
/ * *
* WordPress dependencies
* /
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04: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
function getInserterOuterSection ( ) {
const {
wp : {
customize
}
} = window ;
2023-09-26 10:23:26 -04:00
const OuterSection = customize . OuterSection ;
// Override the OuterSection class to handle multiple outer sections.
2022-04-11 08:04:30 -04:00
// It closes all the other outer sections whenever one is opened.
// The result is that at most one outer section can be opened at the same time.
customize . OuterSection = class extends OuterSection {
onChangeExpanded ( expanded , args ) {
if ( expanded ) {
customize . section . each ( section => {
if ( section . params . type === 'outer' && section . id !== this . id ) {
if ( section . expanded ( ) ) {
section . collapse ( ) ;
}
}
} ) ;
}
return super . onChangeExpanded ( expanded , args ) ;
}
2023-09-26 10:23:26 -04:00
} ;
// Handle constructor so that "params.type" can be correctly pointed to "outer".
2022-04-11 08:04:30 -04:00
customize . sectionConstructor . outer = customize . OuterSection ;
return class InserterOuterSection extends customize . OuterSection {
2023-06-27 10:24:19 -04:00
constructor ( ... args ) {
2023-09-26 10:23:26 -04:00
super ( ... args ) ;
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// This is necessary since we're creating a new class which is not identical to the original OuterSection.
// @See https://github.com/WordPress/wordpress-develop/blob/42b05c397c50d9dc244083eff52991413909d4bd/src/js/_enqueues/wp/customize/controls.js#L1427-L1436
2022-04-11 08:04:30 -04:00
this . params . type = 'outer' ;
this . activeElementBeforeExpanded = null ;
2023-09-26 10:23:26 -04:00
const ownerWindow = this . contentContainer [ 0 ] . ownerDocument . defaultView ;
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Handle closing the inserter when pressing the Escape key.
2022-04-11 08:04:30 -04:00
ownerWindow . addEventListener ( 'keydown' , event => {
if ( this . expanded ( ) && ( event . keyCode === external _wp _keycodes _namespaceObject . ESCAPE || event . code === 'Escape' ) && ! event . defaultPrevented ) {
event . preventDefault ( ) ;
event . stopPropagation ( ) ;
2022-04-12 11:12:47 -04:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened ( false ) ;
2022-04-11 08:04:30 -04:00
}
2023-09-26 10:23:26 -04:00
} ,
// Use capture mode to make this run before other event listeners.
2022-04-11 08:04:30 -04:00
true ) ;
2023-09-26 10:23:26 -04:00
this . contentContainer . addClass ( 'widgets-inserter' ) ;
2021-11-08 09:29:21 -05:00
2023-09-26 10:23:26 -04:00
// Set a flag if the state is being changed from open() or close().
// Don't propagate the event if it's an internal action to prevent infinite loop.
2022-04-11 08:04:30 -04:00
this . isFromInternalAction = false ;
this . expanded . bind ( ( ) => {
if ( ! this . isFromInternalAction ) {
// Propagate the event to React to sync the state.
2022-04-12 11:12:47 -04:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened ( this . expanded ( ) ) ;
2022-04-11 08:04:30 -04:00
}
this . isFromInternalAction = false ;
} ) ;
}
open ( ) {
if ( ! this . expanded ( ) ) {
const contentContainer = this . contentContainer [ 0 ] ;
this . activeElementBeforeExpanded = contentContainer . ownerDocument . activeElement ;
this . isFromInternalAction = true ;
this . expand ( {
completeCallback ( ) {
// We have to do this in a "completeCallback" or else the elements will not yet be visible/tabbable.
// The first one should be the close button,
// we want to skip it and choose the second one instead, which is the search box.
const searchBox = external _wp _dom _namespaceObject . focus . tabbable . find ( contentContainer ) [ 1 ] ;
if ( searchBox ) {
searchBox . focus ( ) ;
}
}
} ) ;
}
2021-11-08 09:29:21 -05:00
}
2022-04-11 08:04:30 -04:00
close ( ) {
if ( this . expanded ( ) ) {
const contentContainer = this . contentContainer [ 0 ] ;
const activeElement = contentContainer . ownerDocument . activeElement ;
this . isFromInternalAction = true ;
this . collapse ( {
completeCallback ( ) {
// Return back the focus when closing the inserter.
// Only do this if the active element which triggers the action is inside the inserter,
// (the close button for instance). In that case the focus will be lost.
// Otherwise, we don't hijack the focus when the user is focusing on other elements
// (like the quick inserter).
if ( contentContainer . contains ( activeElement ) ) {
// Return back the focus when closing the inserter.
if ( this . activeElementBeforeExpanded ) {
this . activeElementBeforeExpanded . focus ( ) ;
}
}
}
} ) ;
}
}
} ;
}
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-control.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
* /
2022-04-11 08:04:30 -04:00
const getInserterId = controlId => ` widgets-inserter- ${ controlId } ` ;
function getSidebarControl ( ) {
const {
wp : {
customize
}
} = window ;
return class SidebarControl extends customize . Control {
2023-06-27 10:24:19 -04:00
constructor ( ... args ) {
super ( ... args ) ;
2022-04-11 08:04:30 -04:00
this . subscribers = new Set ( ) ;
}
ready ( ) {
const InserterOuterSection = getInserterOuterSection ( ) ;
this . inserter = new InserterOuterSection ( getInserterId ( this . id ) , { } ) ;
customize . section . add ( this . inserter ) ;
this . sectionInstance = customize . section ( this . section ( ) ) ;
this . inspector = this . sectionInstance . inspector ;
this . sidebarAdapter = new SidebarAdapter ( this . setting , customize ) ;
}
subscribe ( callback ) {
this . subscribers . add ( callback ) ;
return ( ) => {
this . subscribers . delete ( callback ) ;
} ;
}
onChangeSectionExpanded ( expanded , args ) {
if ( ! args . unchanged ) {
// Close the inserter when the section collapses.
if ( ! expanded ) {
2022-04-12 11:12:47 -04:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened ( false ) ;
2022-04-11 08:04:30 -04:00
}
this . subscribers . forEach ( subscriber => subscriber ( expanded , args ) ) ;
}
}
} ;
}
2021-11-08 09:29:21 -05:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/move-to-sidebar.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
/ * *
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
2022-04-11 08:04:30 -04:00
const withMoveToSidebarToolbarItem = ( 0 , external _wp _compose _namespaceObject . createHigherOrderComponent ) ( BlockEdit => props => {
let widgetId = ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( props ) ;
const sidebarControls = useSidebarControls ( ) ;
const activeSidebarControl = useActiveSidebarControl ( ) ;
2023-06-27 10:24:19 -04:00
const hasMultipleSidebars = sidebarControls ? . length > 1 ;
2022-04-11 08:04:30 -04:00
const blockName = props . name ;
const clientId = props . clientId ;
const canInsertBlockInSidebar = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
// Use an empty string to represent the root block list, which
// in the customizer editor represents a sidebar/widget area.
return select ( external _wp _blockEditor _namespaceObject . store ) . canInsertBlockType ( blockName , '' ) ;
} , [ blockName ] ) ;
const block = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _blockEditor _namespaceObject . store ) . getBlock ( clientId ) , [ clientId ] ) ;
const {
removeBlock
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
const [ , focusWidget ] = useFocusControl ( ) ;
function moveToSidebar ( sidebarControlId ) {
const newSidebarControl = sidebarControls . find ( sidebarControl => sidebarControl . id === sidebarControlId ) ;
if ( widgetId ) {
/ * *
* If there ' s a widgetId , move it to the other sidebar .
* /
const oldSetting = activeSidebarControl . setting ;
const newSetting = newSidebarControl . setting ;
2023-02-07 02:04:52 -05:00
oldSetting ( oldSetting ( ) . filter ( id => id !== widgetId ) ) ;
2022-04-11 08:04:30 -04:00
newSetting ( [ ... newSetting ( ) , widgetId ] ) ;
} else {
/ * *
* If there isn 't a widgetId, it' s most likely a inner block .
* First , remove the block in the original sidebar ,
* then , create a new widget in the new sidebar and get back its widgetId .
* /
const sidebarAdapter = newSidebarControl . sidebarAdapter ;
removeBlock ( clientId ) ;
2023-09-26 10:23:26 -04:00
const addedWidgetIds = sidebarAdapter . setWidgets ( [ ... sidebarAdapter . getWidgets ( ) , blockToWidget ( block ) ] ) ;
// The last non-null id is the added widget's id.
2022-04-11 08:04:30 -04:00
widgetId = addedWidgetIds . reverse ( ) . find ( id => ! ! id ) ;
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 focus to the moved widget and expand the sidebar.
2022-04-11 08:04:30 -04:00
focusWidget ( widgetId ) ;
}
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
2024-09-19 21:55:35 -04:00
} , "edit" ) , hasMultipleSidebars && canInsertBlockInSidebar && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockControls , {
2024-05-31 14:59:00 -04:00
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _widgets _namespaceObject . MoveToWidgetArea , {
widgetAreas : sidebarControls . map ( sidebarControl => ( {
id : sidebarControl . id ,
name : sidebarControl . params . label ,
description : sidebarControl . params . description
} ) ) ,
currentWidgetAreaId : activeSidebarControl ? . id ,
onSelect : moveToSidebar
} )
} ) ]
} ) ;
2022-04-11 08:04:30 -04:00
} , 'withMoveToSidebarToolbarItem' ) ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.BlockEdit' , 'core/customize-widgets/block-edit' , withMoveToSidebarToolbarItem ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/replace-media-upload.js
/ * *
* WordPress dependencies
* /
2021-05-25 04:40:25 -04:00
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 ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/wide-widget-display.js
2021-05-25 04:40:25 -04:00
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
const {
wp : wide _widget _display _wp
} = window ;
const withWideWidgetDisplay = ( 0 , external _wp _compose _namespaceObject . createHigherOrderComponent ) ( BlockEdit => props => {
2023-06-27 10:24:19 -04:00
var _wp$customize$Widgets ;
2022-04-11 08:04:30 -04:00
const {
idBase
} = props . attributes ;
2023-06-27 10:24:19 -04:00
const isWide = ( _wp$customize$Widgets = wide _widget _display _wp . customize . Widgets . data . availableWidgets . find ( widget => widget . id _base === idBase ) ? . is _wide ) !== null && _wp$customize$Widgets !== void 0 ? _wp$customize$Widgets : false ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockEdit , {
2023-09-26 10:23:26 -04:00
... props ,
2022-04-11 08:04:30 -04:00
isWide : isWide
2024-09-19 21:55:35 -04:00
} , "edit" ) ;
2022-04-11 08:04:30 -04:00
} , 'withWideWidgetDisplay' ) ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.BlockEdit' , 'core/customize-widgets/wide-widget-display' , withWideWidgetDisplay ) ;
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/filters/index.js
/ * *
* Internal dependencies
* /
2021-05-25 04:40:25 -04:00
2022-04-11 08:04:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/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
2024-05-31 14:59:00 -04:00
2022-04-11 08:04:30 -04:00
const {
wp : build _module _wp
} = window ;
const DISABLED _BLOCKS = [ 'core/more' , 'core/block' , 'core/freeform' , 'core/template-part' ] ;
const ENABLE _EXPERIMENTAL _FSE _BLOCKS = false ;
2023-09-26 10:23:26 -04:00
2022-04-11 08:04:30 -04:00
/ * *
* Initializes the widgets block editor in the customizer .
*
* @ param { string } editorName The editor name .
* @ param { Object } blockEditorSettings Block editor settings .
* /
function initialize ( editorName , blockEditorSettings ) {
2022-04-12 11:12:47 -04:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _preferences _namespaceObject . store ) . setDefaults ( 'core/customize-widgets' , {
2022-04-11 08:04:30 -04:00
fixedToolbar : false ,
welcomeGuide : 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
const coreBlocks = ( 0 , external _wp _blockLibrary _namespaceObject . _ _experimentalGetCoreBlocks ) ( ) . filter ( block => {
return ! ( DISABLED _BLOCKS . includes ( block . name ) || block . name . startsWith ( 'core/post' ) || block . name . startsWith ( 'core/query' ) || block . name . startsWith ( 'core/site' ) || block . name . startsWith ( 'core/navigation' ) ) ;
} ) ;
( 0 , external _wp _blockLibrary _namespaceObject . registerCoreBlocks ) ( coreBlocks ) ;
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetBlock ) ( ) ;
if ( false ) { }
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetVariations ) ( blockEditorSettings ) ;
2023-09-26 10:23:26 -04:00
( 0 , external _wp _widgets _namespaceObject . registerWidgetGroupBlock ) ( ) ;
// 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' ) ;
const SidebarControl = getSidebarControl ( blockEditorSettings ) ;
build _module _wp . customize . sectionConstructor . sidebar = getSidebarSection ( ) ;
build _module _wp . customize . controlConstructor . sidebar _block _editor = SidebarControl ;
const container = document . createElement ( 'div' ) ;
document . body . appendChild ( container ) ;
build _module _wp . customize . bind ( 'ready' , ( ) => {
const sidebarControls = [ ] ;
build _module _wp . customize . control . each ( control => {
if ( control instanceof SidebarControl ) {
sidebarControls . push ( control ) ;
}
} ) ;
2024-09-19 21:55:35 -04:00
( 0 , external _wp _element _namespaceObject . createRoot ) ( container ) . render ( /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _element _namespaceObject . StrictMode , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( CustomizeWidgets , {
api : build _module _wp . customize ,
sidebarControls : sidebarControls ,
blockEditorSettings : blockEditorSettings
} )
2023-06-27 10:24:19 -04:00
} ) ) ;
2022-04-11 08:04:30 -04:00
} ) ;
2021-05-25 04:40:25 -04:00
}
2023-09-26 10:23:26 -04:00
2024-01-31 07:59:56 -05:00
} ) ( ) ;
2022-04-11 08:04:30 -04:00
( window . wp = window . wp || { } ) . customizeWidgets = _ _webpack _exports _ _ ;
/******/ } ) ( )
;