2024-01-31 07:59:56 -05:00
/******/ ( ( ) => { // webpackBootstrap
2023-09-26 10:23:26 -04:00
/******/ "use strict" ;
/******/ // The require scope
/******/ var _ _webpack _require _ _ = { } ;
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
2024-01-31 07:59:56 -05:00
/******/ ( ( ) => {
2023-09-26 10:23:26 -04:00
/******/ // define getter functions for harmony exports
2024-01-31 07:59:56 -05:00
/******/ _ _webpack _require _ _ . d = ( exports , definition ) => {
2023-09-26 10:23:26 -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
/******/ } ) ( ) ;
2023-09-26 10:23:26 -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 ) )
/******/ } ) ( ) ;
2023-09-26 10:23:26 -04:00
/******/
/******/ /* webpack/runtime/make namespace object */
2024-01-31 07:59:56 -05:00
/******/ ( ( ) => {
2023-09-26 10:23:26 -04:00
/******/ // define __esModule on exports
2024-01-31 07:59:56 -05:00
/******/ _ _webpack _require _ _ . r = ( exports ) => {
2023-09-26 10:23:26 -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
/******/ } ) ( ) ;
2023-09-26 10:23:26 -04:00
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
2024-01-31 07:59:56 -05:00
privateApis : ( ) => ( /* reexport */ privateApis ) ,
store : ( ) => ( /* reexport */ store )
2023-09-26 10:23:26 -04:00
} ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/patterns/build-module/store/actions.js
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , {
2024-01-31 07:59:56 -05:00
convertSyncedPatternToStatic : ( ) => ( convertSyncedPatternToStatic ) ,
createPattern : ( ) => ( createPattern ) ,
createPatternFromFile : ( ) => ( createPatternFromFile ) ,
setEditingPattern : ( ) => ( setEditingPattern )
2023-09-26 10:23:26 -04:00
} ) ;
// NAMESPACE OBJECT: ./node_modules/@wordpress/patterns/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
isEditingPattern : ( ) => ( selectors _isEditingPattern )
2023-09-26 10:23:26 -04:00
} ) ;
; // CONCATENATED MODULE: external ["wp","data"]
2024-01-31 07:59:56 -05:00
const external _wp _data _namespaceObject = window [ "wp" ] [ "data" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/store/reducer.js
/ * *
* WordPress dependencies
* /
function isEditingPattern ( state = { } , action ) {
if ( action ? . type === 'SET_EDITING_PATTERN' ) {
return {
... state ,
[ action . clientId ] : action . isEditing
} ;
}
return state ;
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const reducer = ( ( 0 , external _wp _data _namespaceObject . combineReducers ) ( {
2023-09-26 10:23:26 -04:00
isEditingPattern
} ) ) ;
; // CONCATENATED MODULE: external ["wp","blocks"]
2024-01-31 07:59:56 -05:00
const external _wp _blocks _namespaceObject = window [ "wp" ] [ "blocks" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: external ["wp","coreData"]
2024-01-31 07:59:56 -05:00
const external _wp _coreData _namespaceObject = window [ "wp" ] [ "coreData" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: external ["wp","blockEditor"]
2024-01-31 07:59:56 -05:00
const external _wp _blockEditor _namespaceObject = window [ "wp" ] [ "blockEditor" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/constants.js
const PATTERN _TYPES = {
theme : 'pattern' ,
user : 'wp_block'
} ;
const PATTERN _DEFAULT _CATEGORY = 'all-patterns' ;
const PATTERN _USER _CATEGORY = 'my-patterns' ;
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 EXCLUDED _PATTERN _SOURCES = [ 'core' , 'pattern-directory/core' , 'pattern-directory/featured' ] ;
2023-09-26 10:23:26 -04:00
const PATTERN _SYNC _TYPES = {
full : 'fully' ,
unsynced : 'unsynced'
} ;
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
// TODO: This should not be hardcoded. Maybe there should be a config and/or an UI.
const PARTIAL _SYNCING _SUPPORTED _BLOCKS = {
2024-02-27 09:48:23 -05:00
'core/paragraph' : [ 'content' ] ,
'core/heading' : [ 'content' ] ,
'core/button' : [ 'text' , 'url' , 'linkTarget' , 'rel' ] ,
'core/image' : [ 'id' , 'url' , 'title' , 'alt' ]
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
const PATTERN _OVERRIDES _BINDING _SOURCE = 'core/pattern-overrides' ;
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
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/store/actions.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/ * *
* Returns a generator converting one or more static blocks into a pattern , or creating a new empty pattern .
*
* @ param { string } title Pattern title .
* @ param { 'full' | 'unsynced' } syncType They way block is synced , 'full' or 'unsynced' .
* @ param { string | undefined } [ content ] Optional serialized content of blocks to convert to pattern .
* @ param { number [ ] | undefined } [ categories ] Ids of any selected categories .
* /
const createPattern = ( title , syncType , content , categories ) => async ( {
registry
} ) => {
const meta = syncType === PATTERN _SYNC _TYPES . unsynced ? {
wp _pattern _sync _status : syncType
} : undefined ;
const reusableBlock = {
title ,
content ,
status : 'publish' ,
meta ,
wp _pattern _category : categories
} ;
const updatedRecord = await registry . dispatch ( external _wp _coreData _namespaceObject . store ) . saveEntityRecord ( 'postType' , 'wp_block' , reusableBlock ) ;
return updatedRecord ;
} ;
/ * *
* Create a pattern from a JSON file .
* @ param { File } file The JSON file instance of the pattern .
* @ param { number [ ] | undefined } [ categories ] Ids of any selected categories .
* /
const createPatternFromFile = ( file , categories ) => async ( {
dispatch
} ) => {
const fileContent = await file . text ( ) ;
/** @type {import('./types').PatternJSON} */
let parsedContent ;
try {
parsedContent = JSON . parse ( fileContent ) ;
} catch ( e ) {
throw new Error ( 'Invalid JSON file' ) ;
}
if ( parsedContent . _ _file !== 'wp_block' || ! parsedContent . title || ! parsedContent . content || typeof parsedContent . title !== 'string' || typeof parsedContent . content !== 'string' || parsedContent . syncStatus && typeof parsedContent . syncStatus !== 'string' ) {
2023-09-26 15:11:22 -04:00
throw new Error ( 'Invalid pattern JSON file' ) ;
2023-09-26 10:23:26 -04:00
}
const pattern = await dispatch . createPattern ( parsedContent . title , parsedContent . syncStatus , parsedContent . content , categories ) ;
return pattern ;
} ;
/ * *
* Returns a generator converting a synced pattern block into a static block .
*
* @ param { string } clientId The client ID of the block to attach .
* /
const convertSyncedPatternToStatic = clientId => ( {
registry
} ) => {
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 patternBlock = registry . select ( external _wp _blockEditor _namespaceObject . store ) . getBlock ( clientId ) ;
2024-05-23 15:39:28 -04:00
const existingOverrides = patternBlock . attributes ? . content ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function cloneBlocksAndRemoveBindings ( blocks ) {
return blocks . map ( block => {
let metadata = block . attributes . metadata ;
if ( metadata ) {
metadata = {
... metadata
} ;
delete metadata . id ;
delete metadata . bindings ;
2024-05-31 14:59:00 -04:00
// Use overridden values of the pattern block if they exist.
if ( existingOverrides ? . [ metadata . name ] ) {
2024-05-23 15:39:28 -04:00
// Iterate over each overriden attribute.
for ( const [ attributeName , value ] of Object . entries ( existingOverrides [ metadata . name ] ) ) {
// Skip if the attribute does not exist in the block type.
if ( ! ( 0 , external _wp _blocks _namespaceObject . getBlockType ) ( block . name ) ? . attributes [ attributeName ] ) {
continue ;
}
// Update the block attribute with the override value.
block . attributes [ attributeName ] = value ;
}
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
}
return ( 0 , external _wp _blocks _namespaceObject . cloneBlock ) ( block , {
metadata : metadata && Object . keys ( metadata ) . length > 0 ? metadata : undefined
} , cloneBlocksAndRemoveBindings ( block . innerBlocks ) ) ;
} ) ;
}
2024-05-23 15:39:28 -04:00
const patternInnerBlocks = registry . select ( external _wp _blockEditor _namespaceObject . store ) . getBlocks ( patternBlock . clientId ) ;
registry . dispatch ( external _wp _blockEditor _namespaceObject . store ) . replaceBlocks ( patternBlock . clientId , cloneBlocksAndRemoveBindings ( patternInnerBlocks ) ) ;
2023-09-26 10:23:26 -04:00
} ;
/ * *
* Returns an action descriptor for SET _EDITING _PATTERN action .
*
* @ param { string } clientId The clientID of the pattern to target .
* @ param { boolean } isEditing Whether the block should be in editing state .
* @ return { Object } Action descriptor .
* /
function setEditingPattern ( clientId , isEditing ) {
return {
type : 'SET_EDITING_PATTERN' ,
clientId ,
isEditing
} ;
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/store/constants.js
/ * *
* Module Constants
* /
const STORE _NAME = 'core/patterns' ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/store/selectors.js
/ * *
* Returns true if pattern is in the editing state .
*
* @ param { Object } state Global application state .
* @ param { number } clientId the clientID of the block .
* @ return { boolean } Whether the pattern is in the editing state .
* /
function selectors _isEditingPattern ( state , clientId ) {
return state . isEditingPattern [ clientId ] ;
}
; // CONCATENATED MODULE: external ["wp","privateApis"]
2024-01-31 07:59:56 -05:00
const external _wp _privateApis _namespaceObject = window [ "wp" ] [ "privateApis" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/lock-unlock.js
/ * *
* WordPress dependencies
* /
const {
lock ,
unlock
2024-06-18 09:19:30 -04:00
} = ( 0 , external _wp _privateApis _namespaceObject . _ _dangerousOptInToUnstableAPIsOnlyForCoreModules ) ( 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.' , '@wordpress/patterns' ) ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/store/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/ * *
* Post editor data store configuration .
*
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore
*
* @ type { Object }
* /
const storeConfig = {
reducer : reducer
} ;
/ * *
* Store definition for the editor namespace .
*
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @ type { Object }
* /
const store = ( 0 , external _wp _data _namespaceObject . createReduxStore ) ( STORE _NAME , {
... storeConfig
} ) ;
( 0 , external _wp _data _namespaceObject . register ) ( store ) ;
unlock ( store ) . registerPrivateActions ( actions _namespaceObject ) ;
unlock ( store ) . registerPrivateSelectors ( selectors _namespaceObject ) ;
; // CONCATENATED MODULE: external ["wp","components"]
2024-01-31 07:59:56 -05:00
const external _wp _components _namespaceObject = window [ "wp" ] [ "components" ] ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
; // CONCATENATED MODULE: external ["wp","element"]
2024-01-31 07:59:56 -05:00
const external _wp _element _namespaceObject = window [ "wp" ] [ "element" ] ;
2024-05-23 15:39:28 -04:00
; // CONCATENATED MODULE: external ["wp","i18n"]
const external _wp _i18n _namespaceObject = window [ "wp" ] [ "i18n" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/api/index.js
/ * *
* Internal dependencies
* /
/ * *
* Determines whether a block is overridable .
*
* @ param { WPBlock } block The block to test .
*
* @ return { boolean } ` true ` if a block is overridable , ` false ` otherwise .
* /
function isOverridableBlock ( block ) {
return Object . keys ( PARTIAL _SYNCING _SUPPORTED _BLOCKS ) . includes ( block . name ) && ! ! block . attributes . metadata ? . name && ! ! block . attributes . metadata ? . bindings && Object . values ( block . attributes . metadata . bindings ) . some ( binding => binding . source === 'core/pattern-overrides' ) ;
}
2024-05-31 14:59:00 -04:00
/ * *
* Determines whether the blocks list has overridable blocks .
*
* @ param { WPBlock [ ] } blocks The blocks list .
*
* @ return { boolean } ` true ` if the list has overridable blocks , ` false ` otherwise .
* /
function hasOverridableBlocks ( blocks ) {
return blocks . some ( block => {
if ( isOverridableBlock ( block ) ) {
return true ;
}
return hasOverridableBlocks ( block . innerBlocks ) ;
} ) ;
}
2024-05-23 15:39:28 -04:00
2024-05-31 14:59:00 -04:00
; // CONCATENATED MODULE: external "ReactJSXRuntime"
const external _ReactJSXRuntime _namespaceObject = window [ "ReactJSXRuntime" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/overrides-panel.js
2024-05-23 15:39:28 -04:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2024-05-23 15:39:28 -04:00
const {
BlockQuickNavigation
} = unlock ( external _wp _blockEditor _namespaceObject . privateApis ) ;
function OverridesPanel ( ) {
const allClientIds = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _blockEditor _namespaceObject . store ) . getClientIdsWithDescendants ( ) , [ ] ) ;
const {
getBlock
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( external _wp _blockEditor _namespaceObject . store ) ;
const clientIdsWithOverrides = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => allClientIds . filter ( clientId => {
const block = getBlock ( clientId ) ;
return isOverridableBlock ( block ) ;
} ) , [ allClientIds , getBlock ] ) ;
if ( ! clientIdsWithOverrides ? . length ) {
return null ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . PanelBody , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Overrides' ) ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockQuickNavigation , {
clientIds : clientIdsWithOverrides
} )
} ) ;
2024-05-23 15:39:28 -04:00
}
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: external ["wp","notices"]
2024-01-31 07:59:56 -05:00
const external _wp _notices _namespaceObject = window [ "wp" ] [ "notices" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: external ["wp","compose"]
2024-01-31 07:59:56 -05:00
const external _wp _compose _namespaceObject = window [ "wp" ] [ "compose" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: external ["wp","htmlEntities"]
2024-01-31 07:59:56 -05:00
const external _wp _htmlEntities _namespaceObject = window [ "wp" ] [ "htmlEntities" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/category-selector.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
2023-09-26 10:23:26 -04:00
const unescapeString = arg => {
return ( 0 , external _wp _htmlEntities _namespaceObject . decodeEntities ) ( arg ) ;
} ;
const CATEGORY _SLUG = 'wp_pattern_category' ;
function CategorySelector ( {
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
categoryTerms ,
onChange ,
categoryMap
2023-09-26 10:23:26 -04:00
} ) {
const [ search , setSearch ] = ( 0 , external _wp _element _namespaceObject . useState ) ( '' ) ;
const debouncedSearch = ( 0 , external _wp _compose _namespaceObject . useDebounce ) ( setSearch , 500 ) ;
const suggestions = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
return Array . from ( categoryMap . values ( ) ) . map ( category => unescapeString ( category . label ) ) . filter ( category => {
if ( search !== '' ) {
return category . toLowerCase ( ) . includes ( search . toLowerCase ( ) ) ;
}
return true ;
} ) . sort ( ( a , b ) => a . localeCompare ( b ) ) ;
} , [ search , categoryMap ] ) ;
2023-09-26 10:23:26 -04:00
function handleChange ( termNames ) {
const uniqueTerms = termNames . reduce ( ( terms , newTerm ) => {
if ( ! terms . some ( term => term . toLowerCase ( ) === newTerm . toLowerCase ( ) ) ) {
terms . push ( newTerm ) ;
}
return terms ;
} , [ ] ) ;
onChange ( uniqueTerms ) ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . FormTokenField , {
2023-09-26 10:23:26 -04:00
className : "patterns-menu-items__convert-modal-categories" ,
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
value : categoryTerms ,
2023-09-26 10:23:26 -04:00
suggestions : suggestions ,
onChange : handleChange ,
onInputChange : debouncedSearch ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Categories' ) ,
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
tokenizeOnBlur : true ,
_ _experimentalExpandOnFocus : 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
_ _next40pxDefaultSize : true ,
_ _nextHasNoMarginBottom : true
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
} ) ;
2023-09-26 10:23:26 -04:00
}
2024-02-20 10:41:18 -05:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/private-hooks.js
2023-09-26 10:23:26 -04:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/ * *
2024-02-20 10:41:18 -05:00
* Helper hook that creates a Map with the core and user patterns categories
* and removes any duplicates . It ' s used when we need to create new user
* categories when creating or importing patterns .
* This hook also provides a function to find or create a pattern category .
*
* @ return { Object } The merged categories map and the callback function to find or create a category .
2023-09-26 10:23:26 -04:00
* /
2024-02-20 10:41:18 -05:00
function useAddPatternCategory ( ) {
2023-09-26 10:23:26 -04:00
const {
saveEntityRecord ,
invalidateResolution
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _coreData _namespaceObject . store ) ;
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
const {
corePatternCategories ,
userPatternCategories
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getUserPatternCategories ,
getBlockPatternCategories
} = select ( external _wp _coreData _namespaceObject . store ) ;
return {
corePatternCategories : getBlockPatternCategories ( ) ,
userPatternCategories : getUserPatternCategories ( )
} ;
2024-02-20 10:41:18 -05:00
} , [ ] ) ;
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
const categoryMap = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
// Merge the user and core pattern categories and remove any duplicates.
const uniqueCategories = new Map ( ) ;
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
userPatternCategories . forEach ( category => {
uniqueCategories . set ( category . label . toLowerCase ( ) , {
label : category . label ,
name : category . name ,
id : category . id
} ) ;
} ) ;
corePatternCategories . forEach ( category => {
if ( ! uniqueCategories . has ( category . label . toLowerCase ( ) ) &&
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
// There are two core categories with `Post` label so explicitly remove the one with
// the `query` slug to avoid any confusion.
category . name !== 'query' ) {
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
uniqueCategories . set ( category . label . toLowerCase ( ) , {
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
label : category . label ,
name : category . name
} ) ;
}
} ) ;
return uniqueCategories ;
} , [ userPatternCategories , corePatternCategories ] ) ;
2023-09-26 10:23:26 -04:00
async function findOrCreateTerm ( term ) {
try {
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 existingTerm = categoryMap . get ( term . toLowerCase ( ) ) ;
2024-02-20 10:41:18 -05:00
if ( existingTerm ? . id ) {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
return existingTerm . id ;
}
// If we have an existing core category we need to match the new user category to the
// correct slug rather than autogenerating it to prevent duplicates, eg. the core `Headers`
// category uses the singular `header` as the slug.
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
const termData = existingTerm ? {
name : existingTerm . label ,
slug : existingTerm . name
} : {
2023-09-26 10:23:26 -04:00
name : term
Update npm packages to latest versions for 6.4 beta 3.
The npm packages needed a further update for beta 3 in preparation for 6.4.
Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56808
git-svn-id: http://core.svn.wordpress.org/trunk@56320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-09 13:24:24 -04:00
} ;
const newTerm = await saveEntityRecord ( 'taxonomy' , CATEGORY _SLUG , termData , {
2023-09-26 10:23:26 -04:00
throwOnError : true
} ) ;
invalidateResolution ( 'getUserPatternCategories' ) ;
return newTerm . id ;
} catch ( error ) {
if ( error . code !== 'term_exists' ) {
throw error ;
}
return error . data . term _id ;
}
}
2024-02-20 10:41:18 -05:00
return {
categoryMap ,
findOrCreateTerm
} ;
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/create-pattern-modal.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
2024-02-20 10:41:18 -05:00
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2024-02-20 10:41:18 -05:00
function CreatePatternModal ( {
className = 'patterns-menu-items__convert-modal' ,
2024-05-31 14:59:00 -04:00
modalTitle ,
2024-02-20 10:41:18 -05:00
... restProps
} ) {
2024-05-31 14:59:00 -04:00
const defaultModalTitle = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _coreData _namespaceObject . store ) . getPostType ( PATTERN _TYPES . user ) ? . labels ? . add _new _item , [ ] ) ;
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Modal , {
title : modalTitle || defaultModalTitle ,
2024-02-20 10:41:18 -05:00
onRequestClose : restProps . onClose ,
2024-05-31 14:59:00 -04:00
overlayClassName : className ,
2024-09-19 21:55:35 -04:00
focusOnMount : "firstContentElement" ,
size : "small" ,
2024-05-31 14:59:00 -04:00
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( CreatePatternModalContents , {
... restProps
} )
} ) ;
2024-02-20 10:41:18 -05:00
}
function CreatePatternModalContents ( {
2024-05-31 14:59:00 -04:00
confirmLabel = ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Add' ) ,
2024-02-20 10:41:18 -05:00
defaultCategories = [ ] ,
content ,
onClose ,
onError ,
onSuccess ,
defaultSyncType = PATTERN _SYNC _TYPES . full ,
defaultTitle = ''
} ) {
const [ syncType , setSyncType ] = ( 0 , external _wp _element _namespaceObject . useState ) ( defaultSyncType ) ;
const [ categoryTerms , setCategoryTerms ] = ( 0 , external _wp _element _namespaceObject . useState ) ( defaultCategories ) ;
const [ title , setTitle ] = ( 0 , external _wp _element _namespaceObject . useState ) ( defaultTitle ) ;
const [ isSaving , setIsSaving ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const {
createPattern
} = unlock ( ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ) ;
const {
createErrorNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
const {
categoryMap ,
findOrCreateTerm
} = useAddPatternCategory ( ) ;
async function onCreate ( patternTitle , sync ) {
if ( ! title || isSaving ) {
return ;
}
try {
setIsSaving ( true ) ;
const categories = await Promise . all ( categoryTerms . map ( termName => findOrCreateTerm ( termName ) ) ) ;
const newPattern = await createPattern ( patternTitle , sync , typeof content === 'function' ? content ( ) : content , categories ) ;
onSuccess ( {
pattern : newPattern ,
categoryId : PATTERN _DEFAULT _CATEGORY
} ) ;
} catch ( error ) {
createErrorNotice ( error . message , {
type : 'snackbar' ,
id : 'pattern-create'
} ) ;
onError ? . ( ) ;
} finally {
setIsSaving ( false ) ;
setCategoryTerms ( [ ] ) ;
setTitle ( '' ) ;
}
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "form" , {
2023-09-26 10:23:26 -04:00
onSubmit : event => {
event . preventDefault ( ) ;
onCreate ( title , syncType ) ;
2024-05-31 14:59:00 -04:00
} ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalVStack , {
spacing : "5" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . TextControl , {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Name' ) ,
value : title ,
onChange : setTitle ,
placeholder : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'My pattern' ) ,
className : "patterns-create-modal__name-input" ,
_ _nextHasNoMarginBottom : true ,
_ _next40pxDefaultSize : true
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( CategorySelector , {
categoryTerms : categoryTerms ,
onChange : setCategoryTerms ,
categoryMap : categoryMap
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToggleControl , {
2024-09-19 21:55:35 -04:00
_ _nextHasNoMarginBottom : true ,
2024-06-11 06:07:32 -04:00
label : ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'Synced' , 'pattern (singular)' ) ,
2024-05-31 14:59:00 -04:00
help : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Sync this pattern across multiple locations.' ) ,
checked : syncType === PATTERN _SYNC _TYPES . full ,
onChange : ( ) => {
setSyncType ( syncType === PATTERN _SYNC _TYPES . full ? PATTERN _SYNC _TYPES . unsynced : PATTERN _SYNC _TYPES . full ) ;
}
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalHStack , {
justify : "right" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "tertiary" ,
onClick : ( ) => {
onClose ( ) ;
setTitle ( '' ) ;
} ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Cancel' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "primary" ,
type : "submit" ,
"aria-disabled" : ! title || isSaving ,
isBusy : isSaving ,
children : confirmLabel
} ) ]
} ) ]
} )
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/duplicate-pattern-modal.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function getTermLabels ( pattern , categories ) {
// Theme patterns rely on core pattern categories.
if ( pattern . type !== PATTERN _TYPES . user ) {
Editor: update npm packages in trunk for 6.7.1.
Syncs Editor packages for WordPress 6.7.1 RC1. Includes the following PRs:
- https://github.com/WordPress/gutenberg/pull/66945
- https://github.com/WordPress/gutenberg/pull/66889
- https://github.com/WordPress/gutenberg/pull/67139
Reviewed by desrosj.
Merges [59437] to trunk.
Props mmaattiiaass, ramonopoly, mamaduka, get_dave, poena, ntsekouras, mcsf, jsnajdr, 0mirka00, desrosj, joemcgill, cbravobernal, azaozz, room34, mayanktripathi32, im3dabasia1, jonsurrell.
Fixes #62478, #62447.
Built from https://develop.svn.wordpress.org/trunk@59438
git-svn-id: http://core.svn.wordpress.org/trunk@58824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-11-20 11:20:31 -05:00
return categories . core ? . filter ( category => pattern . categories ? . includes ( category . name ) ) . map ( category => category . label ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
}
return categories . user ? . filter ( category => pattern . wp _pattern _category . includes ( category . id ) ) . map ( category => category . label ) ;
}
function useDuplicatePatternProps ( {
pattern ,
onSuccess
} ) {
const {
createSuccessNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
const categories = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getUserPatternCategories ,
getBlockPatternCategories
} = select ( external _wp _coreData _namespaceObject . store ) ;
return {
core : getBlockPatternCategories ( ) ,
user : getUserPatternCategories ( )
} ;
} ) ;
if ( ! pattern ) {
return null ;
}
return {
content : pattern . content ,
defaultCategories : getTermLabels ( pattern , categories ) ,
defaultSyncType : pattern . type !== PATTERN _TYPES . user // Theme patterns are unsynced by default.
? PATTERN _SYNC _TYPES . unsynced : pattern . wp _pattern _sync _status || PATTERN _SYNC _TYPES . full ,
defaultTitle : ( 0 , external _wp _i18n _namespaceObject . sprintf ) ( /* translators: %s: Existing pattern title */
2024-10-31 00:09:28 -04:00
( 0 , external _wp _i18n _namespaceObject . _x ) ( '%s (Copy)' , 'pattern' ) , typeof pattern . title === 'string' ? pattern . title : pattern . title . raw ) ,
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
onSuccess : ( {
pattern : newPattern
} ) => {
createSuccessNotice ( ( 0 , external _wp _i18n _namespaceObject . sprintf ) (
// translators: %s: The new pattern's title e.g. 'Call to action (copy)'.
2024-10-31 00:09:28 -04:00
( 0 , external _wp _i18n _namespaceObject . _x ) ( '"%s" duplicated.' , 'pattern' ) , newPattern . title . raw ) , {
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
type : 'snackbar' ,
id : 'patterns-create'
} ) ;
onSuccess ? . ( {
pattern : newPattern
} ) ;
}
} ;
}
function DuplicatePatternModal ( {
pattern ,
onClose ,
onSuccess
} ) {
const duplicatedProps = useDuplicatePatternProps ( {
pattern ,
onSuccess
} ) ;
if ( ! pattern ) {
return null ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( CreatePatternModal , {
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
modalTitle : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Duplicate pattern' ) ,
confirmLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Duplicate' ) ,
onClose : onClose ,
onError : onClose ,
... duplicatedProps
} ) ;
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/rename-pattern-modal.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function RenamePatternModal ( {
onClose ,
onError ,
onSuccess ,
pattern ,
... props
} ) {
const originalName = ( 0 , external _wp _htmlEntities _namespaceObject . decodeEntities ) ( pattern . title ) ;
const [ name , setName ] = ( 0 , external _wp _element _namespaceObject . useState ) ( originalName ) ;
const [ isSaving , setIsSaving ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const {
editEntityRecord ,
_ _experimentalSaveSpecifiedEntityEdits : saveSpecifiedEntityEdits
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _coreData _namespaceObject . store ) ;
const {
createSuccessNotice ,
createErrorNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
const onRename = async event => {
event . preventDefault ( ) ;
if ( ! name || name === pattern . title || isSaving ) {
return ;
}
try {
await editEntityRecord ( 'postType' , pattern . type , pattern . id , {
title : name
} ) ;
setIsSaving ( true ) ;
setName ( '' ) ;
onClose ? . ( ) ;
const savedRecord = await saveSpecifiedEntityEdits ( 'postType' , pattern . type , pattern . id , [ 'title' ] , {
throwOnError : true
} ) ;
onSuccess ? . ( savedRecord ) ;
createSuccessNotice ( ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Pattern renamed' ) , {
type : 'snackbar' ,
id : 'pattern-update'
} ) ;
} catch ( error ) {
onError ? . ( ) ;
const errorMessage = error . message && error . code !== 'unknown_error' ? error . message : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'An error occurred while renaming the pattern.' ) ;
createErrorNotice ( errorMessage , {
type : 'snackbar' ,
id : 'pattern-update'
} ) ;
} finally {
setIsSaving ( false ) ;
setName ( '' ) ;
}
} ;
const onRequestClose = ( ) => {
onClose ? . ( ) ;
setName ( '' ) ;
} ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Modal , {
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
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Rename' ) ,
... props ,
2024-05-31 14:59:00 -04:00
onRequestClose : onClose ,
2024-09-19 21:55:35 -04:00
focusOnMount : "firstContentElement" ,
size : "small" ,
2024-05-31 14:59:00 -04:00
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "form" , {
onSubmit : onRename ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalVStack , {
spacing : "5" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . TextControl , {
_ _nextHasNoMarginBottom : true ,
_ _next40pxDefaultSize : true ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Name' ) ,
value : name ,
onChange : setName ,
required : true
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalHStack , {
justify : "right" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "tertiary" ,
onClick : onRequestClose ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Cancel' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "primary" ,
type : "submit" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Save' )
} ) ]
} ) ]
} )
} )
} ) ;
2023-09-26 10:23:26 -04:00
}
; // CONCATENATED MODULE: external ["wp","primitives"]
2024-01-31 07:59:56 -05:00
const external _wp _primitives _namespaceObject = window [ "wp" ] [ "primitives" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/symbol.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
const symbol = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
2023-09-26 10:23:26 -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 : "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"
} )
} ) ;
2024-01-31 07:59:56 -05:00
/* harmony default export */ const library _symbol = ( symbol ) ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/pattern-convert-button.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2023-09-26 15:11:22 -04:00
2023-09-26 10:23:26 -04:00
/ * *
* Menu control to convert block ( s ) to a pattern block .
*
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
* @ param { Object } props Component props .
* @ param { string [ ] } props . clientIds Client ids of selected blocks .
* @ param { string } props . rootClientId ID of the currently selected top - level block .
* @ param { ( ) => void } props . closeBlockSettingsMenu Callback to close the block settings menu dropdown .
* @ return { import ( 'react' ) . ComponentType } The menu control or null .
2023-09-26 10:23:26 -04:00
* /
2024-05-31 14:59:00 -04:00
2023-09-26 10:23:26 -04:00
function PatternConvertButton ( {
clientIds ,
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
rootClientId ,
closeBlockSettingsMenu
2023-09-26 10:23:26 -04:00
} ) {
const {
createSuccessNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
const {
replaceBlocks
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
// Ignore reason: false positive of the lint rule.
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
const {
setEditingPattern
} = unlock ( ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ) ;
const [ isModalOpen , setIsModalOpen ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const canConvert = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
var _getBlocksByClientId ;
const {
canUser
} = select ( external _wp _coreData _namespaceObject . store ) ;
const {
getBlocksByClientId ,
canInsertBlockType ,
getBlockRootClientId
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
const rootId = rootClientId || ( clientIds . length > 0 ? getBlockRootClientId ( clientIds [ 0 ] ) : undefined ) ;
const blocks = ( _getBlocksByClientId = getBlocksByClientId ( clientIds ) ) !== null && _getBlocksByClientId !== void 0 ? _getBlocksByClientId : [ ] ;
const isReusable = blocks . length === 1 && blocks [ 0 ] && ( 0 , external _wp _blocks _namespaceObject . isReusableBlock ) ( blocks [ 0 ] ) && ! ! select ( external _wp _coreData _namespaceObject . store ) . getEntityRecord ( 'postType' , 'wp_block' , blocks [ 0 ] . attributes . ref ) ;
const _canConvert =
// Hide when this is already a synced pattern.
! isReusable &&
// Hide when patterns are disabled.
canInsertBlockType ( 'core/block' , rootId ) && blocks . every ( block =>
// Guard against the case where a regular block has *just* been converted.
! ! block &&
// Hide on invalid blocks.
block . isValid &&
// Hide when block doesn't support being made into a pattern.
( 0 , external _wp _blocks _namespaceObject . hasBlockSupport ) ( block . name , 'reusable' , true ) ) &&
// Hide when current doesn't have permission to do that.
2024-09-19 21:55:35 -04:00
// Blocks refers to the wp_block post type, this checks the ability to create a post of that type.
! ! canUser ( 'create' , {
kind : 'postType' ,
name : 'wp_block'
} ) ;
2023-09-26 10:23:26 -04:00
return _canConvert ;
} , [ clientIds , rootClientId ] ) ;
const {
getBlocksByClientId
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( external _wp _blockEditor _namespaceObject . store ) ;
const getContent = ( 0 , external _wp _element _namespaceObject . useCallback ) ( ( ) => ( 0 , external _wp _blocks _namespaceObject . serialize ) ( getBlocksByClientId ( clientIds ) ) , [ getBlocksByClientId , clientIds ] ) ;
if ( ! canConvert ) {
return null ;
}
const handleSuccess = ( {
pattern
} ) => {
2023-09-26 15:11:22 -04:00
if ( pattern . wp _pattern _sync _status !== PATTERN _SYNC _TYPES . unsynced ) {
const newBlock = ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( 'core/block' , {
ref : pattern . id
} ) ;
replaceBlocks ( clientIds , newBlock ) ;
setEditingPattern ( newBlock . clientId , 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
closeBlockSettingsMenu ( ) ;
2023-09-26 15:11:22 -04:00
}
createSuccessNotice ( pattern . wp _pattern _sync _status === PATTERN _SYNC _TYPES . unsynced ? ( 0 , external _wp _i18n _namespaceObject . sprintf ) (
2023-09-26 10:23:26 -04:00
// translators: %s: the name the user has given to the pattern.
2023-09-26 15:11:22 -04:00
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Unsynced pattern created: %s' ) , pattern . title . raw ) : ( 0 , external _wp _i18n _namespaceObject . sprintf ) (
2023-09-26 10:23:26 -04:00
// translators: %s: the name the user has given to the pattern.
2023-09-26 15:11:22 -04:00
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Synced pattern created: %s' ) , pattern . title . raw ) , {
2023-09-26 10:23:26 -04:00
type : 'snackbar' ,
id : 'convert-to-pattern-success'
} ) ;
setIsModalOpen ( false ) ;
} ;
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 . MenuItem , {
icon : library _symbol ,
onClick : ( ) => setIsModalOpen ( true ) ,
"aria-expanded" : isModalOpen ,
"aria-haspopup" : "dialog" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Create pattern' )
} ) , isModalOpen && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( CreatePatternModal , {
content : getContent ,
onSuccess : pattern => {
handleSuccess ( pattern ) ;
} ,
onError : ( ) => {
setIsModalOpen ( false ) ;
} ,
onClose : ( ) => {
setIsModalOpen ( false ) ;
}
} ) ]
} ) ;
2023-09-26 10:23:26 -04:00
}
; // CONCATENATED MODULE: external ["wp","url"]
2024-01-31 07:59:56 -05:00
const external _wp _url _namespaceObject = window [ "wp" ] [ "url" ] ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/patterns-manage-button.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2023-09-26 10:23:26 -04:00
function PatternsManageButton ( {
clientId
} ) {
const {
canRemove ,
isVisible ,
managePatternsUrl
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getBlock ,
canRemoveBlock ,
2024-05-23 15:39:28 -04:00
getBlockCount
2023-09-26 10:23:26 -04:00
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
const {
canUser
} = select ( external _wp _coreData _namespaceObject . store ) ;
const reusableBlock = getBlock ( clientId ) ;
return {
canRemove : canRemoveBlock ( clientId ) ,
2024-09-19 21:55:35 -04:00
isVisible : ! ! reusableBlock && ( 0 , external _wp _blocks _namespaceObject . isReusableBlock ) ( reusableBlock ) && ! ! canUser ( 'update' , {
kind : 'postType' ,
name : 'wp_block' ,
id : reusableBlock . attributes . ref
} ) ,
2023-09-26 10:23:26 -04:00
innerBlockCount : getBlockCount ( clientId ) ,
// The site editor and templates both check whether the user
// has edit_theme_options capabilities. We can leverage that here
// and omit the manage patterns link if the user can't access it.
2024-09-19 21:55:35 -04:00
managePatternsUrl : canUser ( 'create' , {
kind : 'postType' ,
name : 'wp_template'
} ) ? ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'site-editor.php' , {
2023-09-26 10:23:26 -04:00
path : '/patterns'
} ) : ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'edit.php' , {
post _type : 'wp_block'
} )
} ;
} , [ clientId ] ) ;
// Ignore reason: false positive of the lint rule.
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
const {
convertSyncedPatternToStatic
} = unlock ( ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ) ;
if ( ! isVisible ) {
return null ;
}
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ canRemove && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . MenuItem , {
onClick : ( ) => convertSyncedPatternToStatic ( clientId ) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Detach' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . MenuItem , {
href : managePatternsUrl ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Manage patterns' )
} ) ]
} ) ;
2023-09-26 10:23:26 -04:00
}
2024-01-31 07:59:56 -05:00
/* harmony default export */ const patterns _manage _button = ( PatternsManageButton ) ;
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
2023-09-26 10:23:26 -04:00
function PatternsMenuItems ( {
rootClientId
} ) {
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockSettingsMenuControls , {
children : ( {
selectedClientIds ,
onClose
} ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( PatternConvertButton , {
clientIds : selectedClientIds ,
rootClientId : rootClientId ,
closeBlockSettingsMenu : onClose
} ) , selectedClientIds . length === 1 && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( patterns _manage _button , {
clientId : selectedClientIds [ 0 ]
} ) ]
} )
} ) ;
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
; // CONCATENATED MODULE: external ["wp","a11y"]
2024-01-31 07:59:56 -05:00
const external _wp _a11y _namespaceObject = window [ "wp" ] [ "a11y" ] ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/rename-pattern-category-modal.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-31 14:59:00 -04:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
function RenamePatternCategoryModal ( {
category ,
existingCategories ,
onClose ,
onError ,
onSuccess ,
... props
} ) {
const id = ( 0 , external _wp _element _namespaceObject . useId ) ( ) ;
const textControlRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
const [ name , setName ] = ( 0 , external _wp _element _namespaceObject . useState ) ( ( 0 , external _wp _htmlEntities _namespaceObject . decodeEntities ) ( category . name ) ) ;
const [ isSaving , setIsSaving ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const [ validationMessage , setValidationMessage ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const validationMessageId = validationMessage ? ` patterns-rename-pattern-category-modal__validation-message- ${ id } ` : undefined ;
const {
saveEntityRecord ,
invalidateResolution
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _coreData _namespaceObject . store ) ;
const {
createErrorNotice ,
createSuccessNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
const onChange = newName => {
if ( validationMessage ) {
setValidationMessage ( undefined ) ;
}
setName ( newName ) ;
} ;
const onSave = async event => {
event . preventDefault ( ) ;
if ( isSaving ) {
return ;
}
if ( ! name || name === category . name ) {
const message = ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Please enter a new name for this category.' ) ;
( 0 , external _wp _a11y _namespaceObject . speak ) ( message , 'assertive' ) ;
setValidationMessage ( message ) ;
textControlRef . current ? . focus ( ) ;
return ;
}
// Check existing categories to avoid creating duplicates.
if ( existingCategories . patternCategories . find ( existingCategory => {
// Compare the id so that the we don't disallow the user changing the case of their current category
// (i.e. renaming 'test' to 'Test').
return existingCategory . id !== category . id && existingCategory . label . toLowerCase ( ) === name . toLowerCase ( ) ;
} ) ) {
const message = ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'This category already exists. Please use a different name.' ) ;
( 0 , external _wp _a11y _namespaceObject . speak ) ( message , 'assertive' ) ;
setValidationMessage ( message ) ;
textControlRef . current ? . focus ( ) ;
return ;
}
try {
setIsSaving ( true ) ;
// User pattern category properties may differ as they can be
// normalized for use alongside template part areas, core pattern
// categories etc. As a result we won't just destructure the passed
// category object.
const savedRecord = await saveEntityRecord ( 'taxonomy' , CATEGORY _SLUG , {
id : category . id ,
slug : category . slug ,
name
} ) ;
invalidateResolution ( 'getUserPatternCategories' ) ;
onSuccess ? . ( savedRecord ) ;
onClose ( ) ;
createSuccessNotice ( ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Pattern category renamed.' ) , {
type : 'snackbar' ,
id : 'pattern-category-update'
} ) ;
} catch ( error ) {
onError ? . ( ) ;
createErrorNotice ( error . message , {
type : 'snackbar' ,
id : 'pattern-category-update'
} ) ;
} finally {
setIsSaving ( false ) ;
setName ( '' ) ;
}
} ;
const onRequestClose = ( ) => {
onClose ( ) ;
setName ( '' ) ;
} ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Modal , {
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
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Rename' ) ,
onRequestClose : onRequestClose ,
2024-05-31 14:59:00 -04:00
... props ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "form" , {
onSubmit : onSave ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalVStack , {
spacing : "5" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalVStack , {
spacing : "2" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . TextControl , {
ref : textControlRef ,
_ _nextHasNoMarginBottom : true ,
_ _next40pxDefaultSize : true ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Name' ) ,
value : name ,
onChange : onChange ,
"aria-describedby" : validationMessageId ,
required : true
} ) , validationMessage && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "span" , {
className : "patterns-rename-pattern-category-modal__validation-message" ,
id : validationMessageId ,
children : validationMessage
} ) ]
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalHStack , {
justify : "right" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "tertiary" ,
onClick : onRequestClose ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Cancel' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "primary" ,
type : "submit" ,
"aria-disabled" : ! name || name === category . name || isSaving ,
isBusy : isSaving ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Save' )
} ) ]
} ) ]
} )
} )
} ) ;
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
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/allow-overrides-modal.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
2024-05-23 15:39:28 -04:00
function AllowOverridesModal ( {
placeholder ,
initialName = '' ,
onClose ,
onSave
} ) {
const [ editedBlockName , setEditedBlockName ] = ( 0 , external _wp _element _namespaceObject . useState ) ( initialName ) ;
const descriptionId = ( 0 , external _wp _element _namespaceObject . useId ) ( ) ;
const isNameValid = ! ! editedBlockName . trim ( ) ;
const handleSubmit = ( ) => {
if ( editedBlockName !== initialName ) {
const message = ( 0 , external _wp _i18n _namespaceObject . sprintf ) ( /* translators: %s: new name/label for the block */
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block name changed to: "%s".' ) , editedBlockName ) ;
// Must be assertive to immediately announce change.
( 0 , external _wp _a11y _namespaceObject . speak ) ( message , 'assertive' ) ;
}
onSave ( editedBlockName ) ;
// Immediate close avoids ability to hit save multiple times.
onClose ( ) ;
} ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Modal , {
2024-05-23 15:39:28 -04:00
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Enable overrides' ) ,
onRequestClose : onClose ,
focusOnMount : "firstContentElement" ,
aria : {
describedby : descriptionId
} ,
2024-05-31 14:59:00 -04:00
size : "small" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "form" , {
onSubmit : event => {
event . preventDefault ( ) ;
if ( ! isNameValid ) {
return ;
}
handleSubmit ( ) ;
} ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalVStack , {
spacing : "6" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . _ _experimentalText , {
id : descriptionId ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override.' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . TextControl , {
_ _nextHasNoMarginBottom : true ,
_ _next40pxDefaultSize : true ,
value : editedBlockName ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Name' ) ,
help : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.' ) ,
placeholder : placeholder ,
onChange : setEditedBlockName
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalHStack , {
justify : "right" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "tertiary" ,
onClick : onClose ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Cancel' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
"aria-disabled" : ! isNameValid ,
variant : "primary" ,
type : "submit" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Enable' )
} ) ]
} ) ]
} )
} )
} ) ;
2024-05-23 15:39:28 -04:00
}
function DisallowOverridesModal ( {
onClose ,
onSave
} ) {
const descriptionId = ( 0 , external _wp _element _namespaceObject . useId ) ( ) ;
2024-05-31 14:59:00 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Modal , {
2024-05-23 15:39:28 -04:00
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Disable overrides' ) ,
onRequestClose : onClose ,
aria : {
describedby : descriptionId
} ,
2024-05-31 14:59:00 -04:00
size : "small" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "form" , {
onSubmit : event => {
event . preventDefault ( ) ;
onSave ( ) ;
onClose ( ) ;
} ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalVStack , {
spacing : "6" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . _ _experimentalText , {
id : descriptionId ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern.' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . _ _experimentalHStack , {
justify : "right" ,
children : [ /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "tertiary" ,
onClick : onClose ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Cancel' )
} ) , /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
variant : "primary" ,
type : "submit" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Disable' )
} ) ]
} ) ]
} )
} )
} ) ;
2024-05-23 15:39:28 -04:00
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/pattern-overrides-controls.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
/ * *
* WordPress dependencies
* /
2024-03-12 10:08:24 -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
/ * *
* Internal dependencies
* /
2024-03-12 10:08:24 -04:00
2024-05-31 14:59:00 -04:00
2024-05-23 15:39:28 -04:00
function PatternOverridesControls ( {
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
attributes ,
2024-06-25 09:49:28 -04:00
setAttributes ,
name : blockName
2024-05-23 15:39:28 -04:00
} ) {
const controlId = ( 0 , external _wp _element _namespaceObject . useId ) ( ) ;
const [ showAllowOverridesModal , setShowAllowOverridesModal ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const [ showDisallowOverridesModal , setShowDisallowOverridesModal ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
2024-05-31 14:59:00 -04:00
const hasName = ! ! attributes . metadata ? . name ;
const defaultBindings = attributes . metadata ? . bindings ? . _ _default ;
2024-07-02 10:53:30 -04:00
const hasOverrides = hasName && defaultBindings ? . source === PATTERN _OVERRIDES _BINDING _SOURCE ;
2024-05-31 14:59:00 -04:00
const isConnectedToOtherSources = defaultBindings ? . source && defaultBindings . source !== PATTERN _OVERRIDES _BINDING _SOURCE ;
2024-09-19 21:55:35 -04:00
const {
updateBlockBindings
2024-09-30 21:18:28 -04:00
} = ( 0 , external _wp _blockEditor _namespaceObject . useBlockBindingsUtils ) ( ) ;
2024-05-23 15:39:28 -04:00
function updateBindings ( isChecked , customName ) {
if ( customName ) {
2024-09-19 21:55:35 -04:00
setAttributes ( {
metadata : {
... attributes . metadata ,
name : customName
}
} ) ;
2024-03-04 09:08:24 -05:00
}
2024-09-19 21:55:35 -04:00
updateBlockBindings ( {
_ _default : isChecked ? {
source : PATTERN _OVERRIDES _BINDING _SOURCE
} : undefined
2024-05-23 15:39:28 -04:00
} ) ;
}
2024-03-04 09:08:24 -05:00
2024-05-23 15:39:28 -04:00
// Avoid overwriting other (e.g. meta) bindings.
if ( isConnectedToOtherSources ) {
return null ;
}
2024-06-25 09:49:28 -04:00
const hasUnsupportedImageAttributes = blockName === 'core/image' && ( ! ! attributes . caption ? . length || ! ! attributes . href ? . length ) ;
2024-07-02 10:53:30 -04:00
const helpText = ! hasOverrides && hasUnsupportedImageAttributes ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( ` Overrides currently don't support image captions or links. Remove the caption or link first before enabling overrides. ` ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Allow changes to this block throughout instances of this pattern.' ) ;
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 _blockEditor _namespaceObject . InspectorControls , {
group : "advanced" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . BaseControl , {
2024-09-19 21:55:35 -04:00
_ _nextHasNoMarginBottom : true ,
2024-05-31 14:59:00 -04:00
id : controlId ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Overrides' ) ,
2024-06-25 09:49:28 -04:00
help : helpText ,
2024-05-31 14:59:00 -04:00
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , {
_ _next40pxDefaultSize : true ,
className : "pattern-overrides-control__allow-overrides-button" ,
variant : "secondary" ,
"aria-haspopup" : "dialog" ,
onClick : ( ) => {
2024-07-02 10:53:30 -04:00
if ( hasOverrides ) {
2024-05-31 14:59:00 -04:00
setShowDisallowOverridesModal ( true ) ;
} else {
setShowAllowOverridesModal ( true ) ;
}
} ,
2024-07-02 10:53:30 -04:00
disabled : ! hasOverrides && hasUnsupportedImageAttributes ,
2024-09-19 21:55:35 -04:00
accessibleWhenDisabled : true ,
2024-07-02 10:53:30 -04:00
children : hasOverrides ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Disable overrides' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Enable overrides' )
2024-05-31 14:59:00 -04:00
} )
} )
} ) , showAllowOverridesModal && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( AllowOverridesModal , {
initialName : attributes . metadata ? . name ,
onClose : ( ) => setShowAllowOverridesModal ( false ) ,
onSave : newName => {
updateBindings ( true , newName ) ;
2024-05-23 15:39:28 -04:00
}
2024-05-31 14:59:00 -04:00
} ) , showDisallowOverridesModal && /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( DisallowOverridesModal , {
onClose : ( ) => setShowDisallowOverridesModal ( false ) ,
onSave : ( ) => updateBindings ( false )
} ) ]
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 16:07:12 -05:00
}
2024-05-23 15:39:28 -04:00
/* harmony default export */ const pattern _overrides _controls = ( PatternOverridesControls ) ;
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-02-09 13:22:22 -05:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/reset-overrides-control.js
/ * *
* WordPress dependencies
* /
2024-05-31 14:59:00 -04:00
2024-05-23 15:39:28 -04:00
const CONTENT = 'content' ;
2024-02-09 13:22:22 -05:00
function ResetOverridesControl ( props ) {
2024-03-04 09:08:24 -05:00
const name = props . attributes . metadata ? . name ;
2024-05-23 15:39:28 -04:00
const registry = ( 0 , external _wp _data _namespaceObject . useRegistry ) ( ) ;
const isOverriden = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
2024-03-04 09:08:24 -05:00
if ( ! name ) {
2024-05-23 15:39:28 -04:00
return ;
2024-02-09 13:22:22 -05:00
}
const {
2024-05-23 15:39:28 -04:00
getBlockAttributes ,
getBlockParentsByBlockName
2024-02-09 13:22:22 -05:00
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
2024-05-23 15:39:28 -04:00
const [ patternClientId ] = getBlockParentsByBlockName ( props . clientId , 'core/block' , true ) ;
if ( ! patternClientId ) {
return ;
}
const overrides = getBlockAttributes ( patternClientId ) [ CONTENT ] ;
if ( ! overrides ) {
return ;
2024-02-09 13:22:22 -05:00
}
2024-05-23 15:39:28 -04:00
return overrides . hasOwnProperty ( name ) ;
2024-03-04 09:08:24 -05:00
} , [ props . clientId , name ] ) ;
2024-05-23 15:39:28 -04:00
function onClick ( ) {
const {
getBlockAttributes ,
getBlockParentsByBlockName
} = registry . select ( external _wp _blockEditor _namespaceObject . store ) ;
const [ patternClientId ] = getBlockParentsByBlockName ( props . clientId , 'core/block' , true ) ;
if ( ! patternClientId ) {
return ;
}
const overrides = getBlockAttributes ( patternClientId ) [ CONTENT ] ;
if ( ! overrides . hasOwnProperty ( name ) ) {
return ;
}
const {
updateBlockAttributes ,
_ _unstableMarkLastChangeAsPersistent
} = registry . dispatch ( external _wp _blockEditor _namespaceObject . store ) ;
_ _unstableMarkLastChangeAsPersistent ( ) ;
let newOverrides = {
... overrides
} ;
delete newOverrides [ name ] ;
if ( ! Object . keys ( newOverrides ) . length ) {
newOverrides = undefined ;
}
updateBlockAttributes ( patternClientId , {
[ CONTENT ] : newOverrides
} ) ;
}
2024-07-18 12:03:23 -04:00
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . _ _unstableBlockToolbarLastItem , {
2024-05-31 14:59:00 -04:00
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarGroup , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarButton , {
onClick : onClick ,
disabled : ! isOverriden ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Reset' )
} )
} )
} ) ;
2024-02-09 13:22:22 -05:00
}
2024-06-18 09:19:30 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/copy.js
/ * *
* WordPress dependencies
* /
const copy = /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , {
fillRule : "evenodd" ,
clipRule : "evenodd" ,
d : "M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"
} )
} ) ;
/* harmony default export */ const library _copy = ( copy ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/components/pattern-overrides-block-controls.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
const {
useBlockDisplayTitle
} = unlock ( external _wp _blockEditor _namespaceObject . privateApis ) ;
function PatternOverridesToolbarIndicator ( {
clientIds
} ) {
const isSingleBlockSelected = clientIds . length === 1 ;
const {
icon ,
firstBlockName
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getBlockAttributes ,
getBlockNamesByClientId
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
const {
getBlockType ,
getActiveBlockVariation
} = select ( external _wp _blocks _namespaceObject . store ) ;
const blockTypeNames = getBlockNamesByClientId ( clientIds ) ;
const _firstBlockTypeName = blockTypeNames [ 0 ] ;
const firstBlockType = getBlockType ( _firstBlockTypeName ) ;
let _icon ;
if ( isSingleBlockSelected ) {
const match = getActiveBlockVariation ( _firstBlockTypeName , getBlockAttributes ( clientIds [ 0 ] ) ) ;
// Take into account active block variations.
_icon = match ? . icon || firstBlockType . icon ;
} else {
const isSelectionOfSameType = new Set ( blockTypeNames ) . size === 1 ;
// When selection consists of blocks of multiple types, display an
// appropriate icon to communicate the non-uniformity.
_icon = isSelectionOfSameType ? firstBlockType . icon : library _copy ;
}
return {
icon : _icon ,
firstBlockName : getBlockAttributes ( clientIds [ 0 ] ) . metadata . name
} ;
} , [ clientIds , isSingleBlockSelected ] ) ;
const firstBlockTitle = useBlockDisplayTitle ( {
clientId : clientIds [ 0 ] ,
maximumLength : 35
} ) ;
2024-10-31 00:09:28 -04:00
const blockDescription = isSingleBlockSelected ? ( 0 , external _wp _i18n _namespaceObject . sprintf ) ( /* translators: 1: The block type's name. 2: The block's user-provided name (the same as the override name). */
2024-06-18 09:19:30 -04:00
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'This %1$s is editable using the "%2$s" override.' ) , firstBlockTitle . toLowerCase ( ) , firstBlockName ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'These blocks are editable using overrides.' ) ;
const descriptionId = ( 0 , external _wp _element _namespaceObject . useId ) ( ) ;
return /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . ToolbarItem , {
children : toggleProps => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . DropdownMenu , {
className : "patterns-pattern-overrides-toolbar-indicator" ,
label : firstBlockTitle ,
popoverProps : {
placement : 'bottom-start' ,
className : 'patterns-pattern-overrides-toolbar-indicator__popover'
} ,
icon : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _ReactJSXRuntime _namespaceObject . Fragment , {
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockIcon , {
icon : icon ,
className : "patterns-pattern-overrides-toolbar-indicator-icon" ,
showColors : true
} )
} ) ,
toggleProps : {
2024-09-19 21:55:35 -04:00
description : blockDescription ,
2024-06-18 09:19:30 -04:00
... toggleProps
} ,
menuProps : {
orientation : 'both' ,
'aria-describedby' : descriptionId
} ,
children : ( ) => /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . _ _experimentalText , {
id : descriptionId ,
children : blockDescription
} )
} )
} ) ;
}
function PatternOverridesBlockControls ( ) {
const {
clientIds ,
hasPatternOverrides ,
hasParentPattern
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getBlockAttributes ,
getSelectedBlockClientIds ,
getBlockParentsByBlockName
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
const selectedClientIds = getSelectedBlockClientIds ( ) ;
const _hasPatternOverrides = selectedClientIds . every ( clientId => {
var _getBlockAttributes$m ;
return Object . values ( ( _getBlockAttributes$m = getBlockAttributes ( clientId ) ? . metadata ? . bindings ) !== null && _getBlockAttributes$m !== void 0 ? _getBlockAttributes$m : { } ) . some ( binding => binding ? . source === PATTERN _OVERRIDES _BINDING _SOURCE ) ;
} ) ;
const _hasParentPattern = selectedClientIds . every ( clientId => getBlockParentsByBlockName ( clientId , 'core/block' , true ) . length > 0 ) ;
return {
clientIds : selectedClientIds ,
hasPatternOverrides : _hasPatternOverrides ,
hasParentPattern : _hasParentPattern
} ;
} , [ ] ) ;
return hasPatternOverrides && hasParentPattern ? /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockControls , {
group : "parent" ,
children : /*#__PURE__*/ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( PatternOverridesToolbarIndicator , {
clientIds : clientIds
} )
} ) : null ;
}
2023-09-26 10:23:26 -04:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/private-apis.js
/ * *
* Internal dependencies
* /
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-02-09 13:22:22 -05:00
2024-02-20 10:41:18 -05:00
2024-05-23 15:39:28 -04:00
2024-06-18 09:19:30 -04:00
2023-09-26 10:23:26 -04:00
const privateApis = { } ;
lock ( privateApis , {
2024-05-23 15:39:28 -04:00
OverridesPanel : OverridesPanel ,
2023-09-26 10:23:26 -04:00
CreatePatternModal : CreatePatternModal ,
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
CreatePatternModalContents : CreatePatternModalContents ,
DuplicatePatternModal : DuplicatePatternModal ,
2024-05-23 15:39:28 -04:00
isOverridableBlock : isOverridableBlock ,
2024-05-31 14:59:00 -04:00
hasOverridableBlocks : hasOverridableBlocks ,
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
useDuplicatePatternProps : useDuplicatePatternProps ,
RenamePatternModal : RenamePatternModal ,
2023-09-26 10:23:26 -04:00
PatternsMenuItems : PatternsMenuItems ,
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
RenamePatternCategoryModal : RenamePatternCategoryModal ,
2024-05-23 15:39:28 -04:00
PatternOverridesControls : pattern _overrides _controls ,
2024-02-09 13:22:22 -05:00
ResetOverridesControl : ResetOverridesControl ,
2024-06-18 09:19:30 -04:00
PatternOverridesBlockControls : PatternOverridesBlockControls ,
2024-02-20 10:41:18 -05:00
useAddPatternCategory : useAddPatternCategory ,
2023-09-26 10:23:26 -04:00
PATTERN _TYPES : PATTERN _TYPES ,
PATTERN _DEFAULT _CATEGORY : PATTERN _DEFAULT _CATEGORY ,
PATTERN _USER _CATEGORY : PATTERN _USER _CATEGORY ,
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
EXCLUDED _PATTERN _SOURCES : EXCLUDED _PATTERN _SOURCES ,
PATTERN _SYNC _TYPES : PATTERN _SYNC _TYPES ,
PARTIAL _SYNCING _SUPPORTED _BLOCKS : PARTIAL _SYNCING _SUPPORTED _BLOCKS
2023-09-26 10:23:26 -04:00
} ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/index.js
/ * *
* Internal dependencies
* /
( window . wp = window . wp || { } ) . patterns = _ _webpack _exports _ _ ;
/******/ } ) ( )
;