@wordpress/patterns 2.8.3 → 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/pattern-overrides-controls.js +1 -5
- package/build/components/pattern-overrides-controls.js.map +1 -1
- package/build-module/components/pattern-overrides-controls.js +1 -5
- package/build-module/components/pattern-overrides-controls.js.map +1 -1
- package/package.json +6 -6
- package/src/components/pattern-overrides-controls.js +1 -4
|
@@ -10,7 +10,6 @@ var _components = require("@wordpress/components");
|
|
|
10
10
|
var _i18n = require("@wordpress/i18n");
|
|
11
11
|
var _constants = require("../constants");
|
|
12
12
|
var _allowOverridesModal = require("./allow-overrides-modal");
|
|
13
|
-
var _lockUnlock = require("../lock-unlock");
|
|
14
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
14
|
/**
|
|
16
15
|
* WordPress dependencies
|
|
@@ -20,9 +19,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
20
19
|
* Internal dependencies
|
|
21
20
|
*/
|
|
22
21
|
|
|
23
|
-
const {
|
|
24
|
-
useBlockBindingsUtils
|
|
25
|
-
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
|
|
26
22
|
function PatternOverridesControls({
|
|
27
23
|
attributes,
|
|
28
24
|
setAttributes,
|
|
@@ -37,7 +33,7 @@ function PatternOverridesControls({
|
|
|
37
33
|
const isConnectedToOtherSources = defaultBindings?.source && defaultBindings.source !== _constants.PATTERN_OVERRIDES_BINDING_SOURCE;
|
|
38
34
|
const {
|
|
39
35
|
updateBlockBindings
|
|
40
|
-
} = useBlockBindingsUtils();
|
|
36
|
+
} = (0, _blockEditor.useBlockBindingsUtils)();
|
|
41
37
|
function updateBindings(isChecked, customName) {
|
|
42
38
|
if (customName) {
|
|
43
39
|
setAttributes({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_blockEditor","_components","_i18n","_constants","_allowOverridesModal","
|
|
1
|
+
{"version":3,"names":["_element","require","_blockEditor","_components","_i18n","_constants","_allowOverridesModal","_jsxRuntime","PatternOverridesControls","attributes","setAttributes","name","blockName","controlId","useId","showAllowOverridesModal","setShowAllowOverridesModal","useState","showDisallowOverridesModal","setShowDisallowOverridesModal","hasName","metadata","defaultBindings","bindings","__default","hasOverrides","source","PATTERN_OVERRIDES_BINDING_SOURCE","isConnectedToOtherSources","updateBlockBindings","useBlockBindingsUtils","updateBindings","isChecked","customName","undefined","hasUnsupportedImageAttributes","caption","length","href","helpText","__","jsxs","Fragment","children","jsx","InspectorControls","group","BaseControl","__nextHasNoMarginBottom","id","label","help","Button","__next40pxDefaultSize","className","variant","onClick","disabled","accessibleWhenDisabled","AllowOverridesModal","initialName","onClose","onSave","newName","DisallowOverridesModal","_default","exports","default"],"sources":["@wordpress/patterns/src/components/pattern-overrides-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useId } from '@wordpress/element';\nimport {\n\tInspectorControls,\n\tuseBlockBindingsUtils,\n} from '@wordpress/block-editor';\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { PATTERN_OVERRIDES_BINDING_SOURCE } from '../constants';\nimport {\n\tAllowOverridesModal,\n\tDisallowOverridesModal,\n} from './allow-overrides-modal';\n\nfunction PatternOverridesControls( {\n\tattributes,\n\tsetAttributes,\n\tname: blockName,\n} ) {\n\tconst controlId = useId();\n\tconst [ showAllowOverridesModal, setShowAllowOverridesModal ] =\n\t\tuseState( false );\n\tconst [ showDisallowOverridesModal, setShowDisallowOverridesModal ] =\n\t\tuseState( false );\n\n\tconst hasName = !! attributes.metadata?.name;\n\tconst defaultBindings = attributes.metadata?.bindings?.__default;\n\tconst hasOverrides =\n\t\thasName && defaultBindings?.source === PATTERN_OVERRIDES_BINDING_SOURCE;\n\tconst isConnectedToOtherSources =\n\t\tdefaultBindings?.source &&\n\t\tdefaultBindings.source !== PATTERN_OVERRIDES_BINDING_SOURCE;\n\tconst { updateBlockBindings } = useBlockBindingsUtils();\n\n\tfunction updateBindings( isChecked, customName ) {\n\t\tif ( customName ) {\n\t\t\tsetAttributes( {\n\t\t\t\tmetadata: {\n\t\t\t\t\t...attributes.metadata,\n\t\t\t\t\tname: customName,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tupdateBlockBindings( {\n\t\t\t__default: isChecked\n\t\t\t\t? { source: PATTERN_OVERRIDES_BINDING_SOURCE }\n\t\t\t\t: undefined,\n\t\t} );\n\t}\n\n\t// Avoid overwriting other (e.g. meta) bindings.\n\tif ( isConnectedToOtherSources ) {\n\t\treturn null;\n\t}\n\n\tconst hasUnsupportedImageAttributes =\n\t\tblockName === 'core/image' &&\n\t\t( !! attributes.caption?.length || !! attributes.href?.length );\n\n\tconst helpText =\n\t\t! hasOverrides && hasUnsupportedImageAttributes\n\t\t\t? __(\n\t\t\t\t\t`Overrides currently don't support image captions or links. Remove the caption or link first before enabling overrides.`\n\t\t\t )\n\t\t\t: __(\n\t\t\t\t\t'Allow changes to this block throughout instances of this pattern.'\n\t\t\t );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<BaseControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ controlId }\n\t\t\t\t\tlabel={ __( 'Overrides' ) }\n\t\t\t\t\thelp={ helpText }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tclassName=\"pattern-overrides-control__allow-overrides-button\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( hasOverrides ) {\n\t\t\t\t\t\t\t\tsetShowDisallowOverridesModal( true );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsetShowAllowOverridesModal( true );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t! hasOverrides && hasUnsupportedImageAttributes\n\t\t\t\t\t\t}\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ hasOverrides\n\t\t\t\t\t\t\t? __( 'Disable overrides' )\n\t\t\t\t\t\t\t: __( 'Enable overrides' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</BaseControl>\n\t\t\t</InspectorControls>\n\n\t\t\t{ showAllowOverridesModal && (\n\t\t\t\t<AllowOverridesModal\n\t\t\t\t\tinitialName={ attributes.metadata?.name }\n\t\t\t\t\tonClose={ () => setShowAllowOverridesModal( false ) }\n\t\t\t\t\tonSave={ ( newName ) => {\n\t\t\t\t\t\tupdateBindings( true, newName );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showDisallowOverridesModal && (\n\t\t\t\t<DisallowOverridesModal\n\t\t\t\t\tonClose={ () => setShowDisallowOverridesModal( false ) }\n\t\t\t\t\tonSave={ () => updateBindings( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default PatternOverridesControls;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AAGiC,IAAAM,WAAA,GAAAN,OAAA;AAlBjC;AACA;AACA;;AASA;AACA;AACA;;AAOA,SAASO,wBAAwBA,CAAE;EAClCC,UAAU;EACVC,aAAa;EACbC,IAAI,EAAEC;AACP,CAAC,EAAG;EACH,MAAMC,SAAS,GAAG,IAAAC,cAAK,EAAC,CAAC;EACzB,MAAM,CAAEC,uBAAuB,EAAEC,0BAA0B,CAAE,GAC5D,IAAAC,iBAAQ,EAAE,KAA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AA6B,CAAE,KAAM,CAAG;MACxD2C,MAAM,EAAGA,CAAA,KAAM/B,cAAc,CAAE,KAAM;IAAG,CACxC,CACD;EAAA,CACA,CAAC;AAEL;AAAC,IAAAkC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc3D,wBAAwB","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useState, useId } from '@wordpress/element';
|
|
5
|
-
import { InspectorControls,
|
|
5
|
+
import { InspectorControls, useBlockBindingsUtils } from '@wordpress/block-editor';
|
|
6
6
|
import { BaseControl, Button } from '@wordpress/components';
|
|
7
7
|
import { __ } from '@wordpress/i18n';
|
|
8
8
|
|
|
@@ -11,13 +11,9 @@ import { __ } from '@wordpress/i18n';
|
|
|
11
11
|
*/
|
|
12
12
|
import { PATTERN_OVERRIDES_BINDING_SOURCE } from '../constants';
|
|
13
13
|
import { AllowOverridesModal, DisallowOverridesModal } from './allow-overrides-modal';
|
|
14
|
-
import { unlock } from '../lock-unlock';
|
|
15
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
15
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
const {
|
|
19
|
-
useBlockBindingsUtils
|
|
20
|
-
} = unlock(blockEditorPrivateApis);
|
|
21
17
|
function PatternOverridesControls({
|
|
22
18
|
attributes,
|
|
23
19
|
setAttributes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","useId","InspectorControls","
|
|
1
|
+
{"version":3,"names":["useState","useId","InspectorControls","useBlockBindingsUtils","BaseControl","Button","__","PATTERN_OVERRIDES_BINDING_SOURCE","AllowOverridesModal","DisallowOverridesModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PatternOverridesControls","attributes","setAttributes","name","blockName","controlId","showAllowOverridesModal","setShowAllowOverridesModal","showDisallowOverridesModal","setShowDisallowOverridesModal","hasName","metadata","defaultBindings","bindings","__default","hasOverrides","source","isConnectedToOtherSources","updateBlockBindings","updateBindings","isChecked","customName","undefined","hasUnsupportedImageAttributes","caption","length","href","helpText","children","group","__nextHasNoMarginBottom","id","label","help","__next40pxDefaultSize","className","variant","onClick","disabled","accessibleWhenDisabled","initialName","onClose","onSave","newName"],"sources":["@wordpress/patterns/src/components/pattern-overrides-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useId } from '@wordpress/element';\nimport {\n\tInspectorControls,\n\tuseBlockBindingsUtils,\n} from '@wordpress/block-editor';\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { PATTERN_OVERRIDES_BINDING_SOURCE } from '../constants';\nimport {\n\tAllowOverridesModal,\n\tDisallowOverridesModal,\n} from './allow-overrides-modal';\n\nfunction PatternOverridesControls( {\n\tattributes,\n\tsetAttributes,\n\tname: blockName,\n} ) {\n\tconst controlId = useId();\n\tconst [ showAllowOverridesModal, setShowAllowOverridesModal ] =\n\t\tuseState( false );\n\tconst [ showDisallowOverridesModal, setShowDisallowOverridesModal ] =\n\t\tuseState( false );\n\n\tconst hasName = !! attributes.metadata?.name;\n\tconst defaultBindings = attributes.metadata?.bindings?.__default;\n\tconst hasOverrides =\n\t\thasName && defaultBindings?.source === PATTERN_OVERRIDES_BINDING_SOURCE;\n\tconst isConnectedToOtherSources =\n\t\tdefaultBindings?.source &&\n\t\tdefaultBindings.source !== PATTERN_OVERRIDES_BINDING_SOURCE;\n\tconst { updateBlockBindings } = useBlockBindingsUtils();\n\n\tfunction updateBindings( isChecked, customName ) {\n\t\tif ( customName ) {\n\t\t\tsetAttributes( {\n\t\t\t\tmetadata: {\n\t\t\t\t\t...attributes.metadata,\n\t\t\t\t\tname: customName,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tupdateBlockBindings( {\n\t\t\t__default: isChecked\n\t\t\t\t? { source: PATTERN_OVERRIDES_BINDING_SOURCE }\n\t\t\t\t: undefined,\n\t\t} );\n\t}\n\n\t// Avoid overwriting other (e.g. meta) bindings.\n\tif ( isConnectedToOtherSources ) {\n\t\treturn null;\n\t}\n\n\tconst hasUnsupportedImageAttributes =\n\t\tblockName === 'core/image' &&\n\t\t( !! attributes.caption?.length || !! attributes.href?.length );\n\n\tconst helpText =\n\t\t! hasOverrides && hasUnsupportedImageAttributes\n\t\t\t? __(\n\t\t\t\t\t`Overrides currently don't support image captions or links. Remove the caption or link first before enabling overrides.`\n\t\t\t )\n\t\t\t: __(\n\t\t\t\t\t'Allow changes to this block throughout instances of this pattern.'\n\t\t\t );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<BaseControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ controlId }\n\t\t\t\t\tlabel={ __( 'Overrides' ) }\n\t\t\t\t\thelp={ helpText }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tclassName=\"pattern-overrides-control__allow-overrides-button\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( hasOverrides ) {\n\t\t\t\t\t\t\t\tsetShowDisallowOverridesModal( true );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsetShowAllowOverridesModal( true );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t! hasOverrides && hasUnsupportedImageAttributes\n\t\t\t\t\t\t}\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ hasOverrides\n\t\t\t\t\t\t\t? __( 'Disable overrides' )\n\t\t\t\t\t\t\t: __( 'Enable overrides' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</BaseControl>\n\t\t\t</InspectorControls>\n\n\t\t\t{ showAllowOverridesModal && (\n\t\t\t\t<AllowOverridesModal\n\t\t\t\t\tinitialName={ attributes.metadata?.name }\n\t\t\t\t\tonClose={ () => setShowAllowOverridesModal( false ) }\n\t\t\t\t\tonSave={ ( newName ) => {\n\t\t\t\t\t\tupdateBindings( true, newName );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showDisallowOverridesModal && (\n\t\t\t\t<DisallowOverridesModal\n\t\t\t\t\tonClose={ () => setShowDisallowOverridesModal( false ) }\n\t\t\t\t\tonSave={ () => updateBindings( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default PatternOverridesControls;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,KAAK,QAAQ,oBAAoB;AACpD,SACCC,iBAAiB,EACjBC,qBAAqB,QACf,yBAAyB;AAChC,SAASC,WAAW,EAAEC,MAAM,QAAQ,uBAAuB;AAC3D,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,gCAAgC,QAAQ,cAAc;AAC/D,SACCC,mBAAmB,EACnBC,sBAAsB,QAChB,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEjC,SAASC,wBAAwBA,CAAE;EAClCC,UAAU;EACVC,aAAa;EACbC,IAAI,EAAEC;AACP,CAAC,EAAG;EACH,MAAMC,SAAS,GAAGpB,KAAK,CAAC,CAAC;EACzB,MAAM,CAAEqB,uBAAuB,EAAEC,0BAA0B,CAAE,GAC5DvB,QAAQ,CAAE,KAAM,CAAC;EAClB,MAAM,CAAEwB,0BAA0B,EAAEC,6BAA6B,CAAE,GAClEzB,QAAQ,CAAE,KAAM,CAAC;EAElB,MAAM0B,OAAO,GAAG,CAAC,CAAET,UAAU,CAAC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I,EAAGN,QAAU;QAAAC,QAAA,eAEjBjC,IAAA,CAACN,MAAM;UACN6C,qBAAqB;UACrBC,SAAS,EAAC,mDAAmD;UAC7DC,OAAO,EAAC,WAAW;UACnB,iBAAc,QAAQ;UACtBC,OAAO,EAAGA,CAAA,KAAM;YACf,IAAKtB,YAAY,EAAG;cACnBN,6BAA6B,CAAE,IAAK,CAAC;YACtC,CAAC,MAAM;cACNF,0BAA0B,CAAE,IAAK,CAAC;YACnC;UACD,CAAG;UACH+B,QAAQ,EACP,CAAEvB,YAAY,IAAIQ,6BAClB;UACDgB,sBAAsB;UAAAX,QAAA,EAEpBb,YAAY,GACXzB,EAAE,CAAE,mBAAoB,CAAC,GACzBA,EAAE,CAAE,kBAAmB;QAAC,CACpB;MAAC,CACG;IAAC,CACI,CAAC,EAElBgB,uBAAuB,iBACxBX,IAAA,CAACH,mBAAmB;MACnBgD,WAAW,EAAGvC,UAAU,CAACU,QAAQ,EAAER,IAAM;MACzCsC,OAAO,EAAGA,CAAA,KAAMlC,0BAA0B,CAAE,KAAM,CAAG;MACrDmC,MAAM,EAAKC,OAAO,IAAM;QACvBxB,cAAc,CAAE,IAAI,EAAEwB,OAAQ,CAAC;MAChC;IAAG,CACH,CACD,EACCnC,0BAA0B,iBAC3Bb,IAAA,CAACF,sBAAsB;MACtBgD,OAAO,EAAGA,CAAA,KAAMhC,6BAA6B,CAAE,KAAM,CAAG;MACxDiC,MAAM,EAAGA,CAAA,KAAMvB,cAAc,CAAE,KAAM;IAAG,CACxC,CACD;EAAA,CACA,CAAC;AAEL;AAEA,eAAenB,wBAAwB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/patterns",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.4",
|
|
4
4
|
"description": "Management of user pattern editing.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
35
|
"@wordpress/a11y": "^4.8.2",
|
|
36
|
-
"@wordpress/block-editor": "^14.3.
|
|
37
|
-
"@wordpress/blocks": "^13.8.
|
|
38
|
-
"@wordpress/components": "^28.8.
|
|
36
|
+
"@wordpress/block-editor": "^14.3.4",
|
|
37
|
+
"@wordpress/blocks": "^13.8.4",
|
|
38
|
+
"@wordpress/components": "^28.8.4",
|
|
39
39
|
"@wordpress/compose": "^7.8.3",
|
|
40
|
-
"@wordpress/core-data": "^7.8.
|
|
40
|
+
"@wordpress/core-data": "^7.8.4",
|
|
41
41
|
"@wordpress/data": "^10.8.3",
|
|
42
42
|
"@wordpress/element": "^6.8.1",
|
|
43
43
|
"@wordpress/html-entities": "^4.8.1",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "07c75154341d1e5a1b8aaa1c226029b6666a52a9"
|
|
58
58
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useState, useId } from '@wordpress/element';
|
|
5
5
|
import {
|
|
6
6
|
InspectorControls,
|
|
7
|
-
|
|
7
|
+
useBlockBindingsUtils,
|
|
8
8
|
} from '@wordpress/block-editor';
|
|
9
9
|
import { BaseControl, Button } from '@wordpress/components';
|
|
10
10
|
import { __ } from '@wordpress/i18n';
|
|
@@ -17,9 +17,6 @@ import {
|
|
|
17
17
|
AllowOverridesModal,
|
|
18
18
|
DisallowOverridesModal,
|
|
19
19
|
} from './allow-overrides-modal';
|
|
20
|
-
import { unlock } from '../lock-unlock';
|
|
21
|
-
|
|
22
|
-
const { useBlockBindingsUtils } = unlock( blockEditorPrivateApis );
|
|
23
20
|
|
|
24
21
|
function PatternOverridesControls( {
|
|
25
22
|
attributes,
|