@wordpress/block-editor 12.18.1 → 12.18.2
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/global-styles/hooks.js +2 -3
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +14 -31
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/rich-text/index.js +1 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +55 -34
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js +3 -1
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js +2 -1
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer.js +2 -1
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/hooks/index.js +0 -6
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js +0 -6
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +2 -2
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-shadow-props.js +0 -15
- package/build/hooks/use-shadow-props.js.map +1 -1
- package/build/hooks/utils.js +3 -6
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +0 -7
- package/build/index.js.map +1 -1
- package/build/utils/object.js +0 -17
- package/build/utils/object.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +2 -3
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +15 -32
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/rich-text/index.js +1 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +57 -36
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +3 -1
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +2 -1
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +2 -1
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/hooks/index.js +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +2 -2
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-shadow-props.js +0 -14
- package/build-module/hooks/use-shadow-props.js.map +1 -1
- package/build-module/hooks/utils.js +3 -6
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/utils/object.js +0 -16
- package/build-module/utils/object.js.map +1 -1
- package/build-style/style-rtl.css +48 -31
- package/build-style/style.css +48 -31
- package/package.json +2 -2
- package/src/components/block-canvas/style.scss +2 -2
- package/src/components/global-styles/hooks.js +0 -2
- package/src/components/global-styles/typography-panel.js +13 -45
- package/src/components/media-replace-flow/style.scss +1 -1
- package/src/components/rich-text/index.js +1 -2
- package/src/components/url-popover/image-url-input-ui.js +86 -37
- package/src/components/url-popover/index.js +2 -0
- package/src/components/url-popover/link-editor.js +1 -0
- package/src/components/url-popover/link-viewer.js +1 -0
- package/src/components/url-popover/style.scss +51 -31
- package/src/hooks/index.js +1 -1
- package/src/hooks/index.native.js +1 -1
- package/src/hooks/use-bindings-attributes.js +2 -5
- package/src/hooks/use-shadow-props.js +0 -14
- package/src/hooks/utils.js +4 -16
- package/src/index.js +0 -1
- package/src/utils/object.js +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","useState","Button","Popover","privateApis","componentsPrivateApis","chevronDown","deprecated","LinkViewer","LinkEditor","unlock","__experimentalPopoverLegacyPositionToPlacement","DEFAULT_PLACEMENT","URLPopover","additionalControls","children","renderSettings","placement","focusOnMount","position","popoverProps","undefined","since","alternative","computedPlacement","isSettingsExpanded","setIsSettingsExpanded","showSettings","toggleSettingsVisibility","createElement","className","shift","icon","label","onClick"],"sources":["@wordpress/block-editor/src/components/url-popover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPopover,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { chevronDown } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport LinkViewer from './link-viewer';\nimport LinkEditor from './link-editor';\nimport { unlock } from '../../lock-unlock';\n\nconst { __experimentalPopoverLegacyPositionToPlacement } = unlock(\n\tcomponentsPrivateApis\n);\n\nconst DEFAULT_PLACEMENT = 'bottom';\n\nfunction URLPopover( {\n\tadditionalControls,\n\tchildren,\n\trenderSettings,\n\t// The DEFAULT_PLACEMENT value is assigned inside the function's body\n\tplacement,\n\tfocusOnMount = 'firstElement',\n\t// Deprecated\n\tposition,\n\t// Rest\n\t...popoverProps\n} ) {\n\tif ( position !== undefined ) {\n\t\tdeprecated( '`position` prop in wp.blockEditor.URLPopover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: '`placement` prop',\n\t\t} );\n\t}\n\n\t// Compute popover's placement:\n\t// - give priority to `placement` prop, if defined\n\t// - otherwise, compute it from the legacy `position` prop (if defined)\n\t// - finally, fallback to the DEFAULT_PLACEMENT.\n\tlet computedPlacement;\n\tif ( placement !== undefined ) {\n\t\tcomputedPlacement = placement;\n\t} else if ( position !== undefined ) {\n\t\tcomputedPlacement =\n\t\t\t__experimentalPopoverLegacyPositionToPlacement( position );\n\t}\n\tcomputedPlacement = computedPlacement || DEFAULT_PLACEMENT;\n\n\tconst [ isSettingsExpanded, setIsSettingsExpanded ] = useState( false );\n\n\tconst showSettings = !! renderSettings && isSettingsExpanded;\n\n\tconst toggleSettingsVisibility = () => {\n\t\tsetIsSettingsExpanded( ! isSettingsExpanded );\n\t};\n\n\treturn (\n\t\t<Popover\n\t\t\tclassName=\"block-editor-url-popover\"\n\t\t\tfocusOnMount={ focusOnMount }\n\t\t\tplacement={ computedPlacement }\n\t\t\tshift\n\t\t\t{ ...popoverProps }\n\t\t>\n\t\t\t<div className=\"block-editor-url-popover__input-container\">\n\t\t\t\t<div className=\"block-editor-url-popover__row\">\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ !! renderSettings && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"block-editor-url-popover__settings-toggle\"\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tlabel={ __( 'Link settings' ) }\n\t\t\t\t\t\t\tonClick={ toggleSettingsVisibility }\n\t\t\t\t\t\t\taria-expanded={ isSettingsExpanded }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t{ showSettings && (\n\t\t\t\t\t<div className=\"block-editor-url-popover__row block-editor-url-popover__settings\">\n\t\t\t\t\t\t{ renderSettings() }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ additionalControls && ! showSettings && (\n\t\t\t\t<div className=\"block-editor-url-popover__additional-controls\">\n\t\t\t\t\t{ additionalControls }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Popover>\n\t);\n}\n\nURLPopover.LinkEditor = LinkEditor;\n\nURLPopover.LinkViewer = LinkViewer;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-popover/README.md\n */\nexport default URLPopover;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SACCC,MAAM,EACNC,OAAO,EACPC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,UAAU,MAAM,eAAe;AACtC,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAA+C,CAAC,GAAGD,MAAM,CAChEL,qBACD,CAAC;AAED,MAAMO,iBAAiB,GAAG,QAAQ;AAElC,SAASC,UAAUA,CAAE;EACpBC,kBAAkB;EAClBC,QAAQ;EACRC,cAAc;EACd;EACAC,SAAS;EACTC,YAAY,GAAG,cAAc;EAC7B;EACAC,QAAQ;EACR;EACA,GAAGC;AACJ,CAAC,EAAG;EACH,IAAKD,QAAQ,KAAKE,SAAS,EAAG;IAC7Bd,UAAU,CAAE,8CAA8C,EAAE;MAC3De,KAAK,EAAE,KAAK;MACZC,WAAW,EAAE;IACd,CAAE,CAAC;EACJ;;EAEA;EACA;EACA;EACA;EACA,IAAIC,iBAAiB;EACrB,IAAKP,SAAS,KAAKI,SAAS,EAAG;IAC9BG,iBAAiB,GAAGP,SAAS;EAC9B,CAAC,MAAM,IAAKE,QAAQ,KAAKE,SAAS,EAAG;IACpCG,iBAAiB,GAChBb,8CAA8C,CAAEQ,QAAS,CAAC;EAC5D;EACAK,iBAAiB,GAAGA,iBAAiB,IAAIZ,iBAAiB;EAE1D,MAAM,CAAEa,kBAAkB,EAAEC,qBAAqB,CAAE,GAAGzB,QAAQ,CAAE,KAAM,CAAC;EAEvE,MAAM0B,YAAY,GAAG,CAAC,CAAEX,cAAc,IAAIS,kBAAkB;EAE5D,MAAMG,wBAAwB,GAAGA,CAAA,KAAM;IACtCF,qBAAqB,CAAE,CAAED,kBAAmB,CAAC;EAC9C,CAAC;EAED,OACCI,aAAA,CAAC1B,OAAO;IACP2B,SAAS,EAAC,0BAA0B;IACpCZ,YAAY,EAAGA,YAAc;IAC7BD,SAAS,EAAGO,iBAAmB;IAC/BO,KAAK;IAAA,
|
|
1
|
+
{"version":3,"names":["__","useState","Button","Popover","privateApis","componentsPrivateApis","chevronDown","deprecated","LinkViewer","LinkEditor","unlock","__experimentalPopoverLegacyPositionToPlacement","DEFAULT_PLACEMENT","URLPopover","additionalControls","children","renderSettings","placement","focusOnMount","position","popoverProps","undefined","since","alternative","computedPlacement","isSettingsExpanded","setIsSettingsExpanded","showSettings","toggleSettingsVisibility","createElement","className","shift","variant","icon","label","onClick","size"],"sources":["@wordpress/block-editor/src/components/url-popover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPopover,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { chevronDown } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport LinkViewer from './link-viewer';\nimport LinkEditor from './link-editor';\nimport { unlock } from '../../lock-unlock';\n\nconst { __experimentalPopoverLegacyPositionToPlacement } = unlock(\n\tcomponentsPrivateApis\n);\n\nconst DEFAULT_PLACEMENT = 'bottom';\n\nfunction URLPopover( {\n\tadditionalControls,\n\tchildren,\n\trenderSettings,\n\t// The DEFAULT_PLACEMENT value is assigned inside the function's body\n\tplacement,\n\tfocusOnMount = 'firstElement',\n\t// Deprecated\n\tposition,\n\t// Rest\n\t...popoverProps\n} ) {\n\tif ( position !== undefined ) {\n\t\tdeprecated( '`position` prop in wp.blockEditor.URLPopover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: '`placement` prop',\n\t\t} );\n\t}\n\n\t// Compute popover's placement:\n\t// - give priority to `placement` prop, if defined\n\t// - otherwise, compute it from the legacy `position` prop (if defined)\n\t// - finally, fallback to the DEFAULT_PLACEMENT.\n\tlet computedPlacement;\n\tif ( placement !== undefined ) {\n\t\tcomputedPlacement = placement;\n\t} else if ( position !== undefined ) {\n\t\tcomputedPlacement =\n\t\t\t__experimentalPopoverLegacyPositionToPlacement( position );\n\t}\n\tcomputedPlacement = computedPlacement || DEFAULT_PLACEMENT;\n\n\tconst [ isSettingsExpanded, setIsSettingsExpanded ] = useState( false );\n\n\tconst showSettings = !! renderSettings && isSettingsExpanded;\n\n\tconst toggleSettingsVisibility = () => {\n\t\tsetIsSettingsExpanded( ! isSettingsExpanded );\n\t};\n\n\treturn (\n\t\t<Popover\n\t\t\tclassName=\"block-editor-url-popover\"\n\t\t\tfocusOnMount={ focusOnMount }\n\t\t\tplacement={ computedPlacement }\n\t\t\tshift\n\t\t\tvariant=\"toolbar\"\n\t\t\t{ ...popoverProps }\n\t\t>\n\t\t\t<div className=\"block-editor-url-popover__input-container\">\n\t\t\t\t<div className=\"block-editor-url-popover__row\">\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ !! renderSettings && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"block-editor-url-popover__settings-toggle\"\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tlabel={ __( 'Link settings' ) }\n\t\t\t\t\t\t\tonClick={ toggleSettingsVisibility }\n\t\t\t\t\t\t\taria-expanded={ isSettingsExpanded }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t{ showSettings && (\n\t\t\t\t\t<div className=\"block-editor-url-popover__row block-editor-url-popover__settings\">\n\t\t\t\t\t\t{ renderSettings() }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ additionalControls && ! showSettings && (\n\t\t\t\t<div className=\"block-editor-url-popover__additional-controls\">\n\t\t\t\t\t{ additionalControls }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Popover>\n\t);\n}\n\nURLPopover.LinkEditor = LinkEditor;\n\nURLPopover.LinkViewer = LinkViewer;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-popover/README.md\n */\nexport default URLPopover;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SACCC,MAAM,EACNC,OAAO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IAC7BD,SAAS,EAAGO,iBAAmB;IAC/BO,KAAK;IACLC,OAAO,EAAC,SAAS;IAAA,GACZZ;EAAY,GAEjBS,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACzDD,aAAA;IAAKC,SAAS,EAAC;EAA+B,GAC3Cf,QAAQ,EACR,CAAC,CAAEC,cAAc,IAClBa,aAAA,CAAC3B,MAAM;IACN4B,SAAS,EAAC,2CAA2C;IACrDG,IAAI,EAAG3B,WAAa;IACpB4B,KAAK,EAAGlC,EAAE,CAAE,eAAgB,CAAG;IAC/BmC,OAAO,EAAGP,wBAA0B;IACpC,iBAAgBH,kBAAoB;IACpCW,IAAI,EAAC;EAAS,CACd,CAEE,CAAC,EACJT,YAAY,IACbE,aAAA;IAAKC,SAAS,EAAC;EAAkE,GAC9Ed,cAAc,CAAC,CACb,CAEF,CAAC,EACJF,kBAAkB,IAAI,CAAEa,YAAY,IACrCE,aAAA;IAAKC,SAAS,EAAC;EAA+C,GAC3DhB,kBACE,CAEE,CAAC;AAEZ;AAEAD,UAAU,CAACJ,UAAU,GAAGA,UAAU;AAElCI,UAAU,CAACL,UAAU,GAAGA,UAAU;;AAElC;AACA;AACA;AACA,eAAeK,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","__","Button","keyboardReturn","URLInput","LinkEditor","autocompleteRef","className","onChangeInputValue","value","props","createElement","__nextHasNoMarginBottom","onChange","icon","label","type"],"sources":["@wordpress/block-editor/src/components/url-popover/link-editor.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport URLInput from '../url-input';\n\nexport default function LinkEditor( {\n\tautocompleteRef,\n\tclassName,\n\tonChangeInputValue,\n\tvalue,\n\t...props\n} ) {\n\treturn (\n\t\t<form\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-url-popover__link-editor',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<URLInput\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeInputValue }\n\t\t\t\tautocompleteRef={ autocompleteRef }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\ticon={ keyboardReturn }\n\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\ttype=\"submit\"\n\t\t\t/>\n\t\t</form>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,cAAc,QAAQ,kBAAkB;;AAEjD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,cAAc;AAEnC,eAAe,SAASC,UAAUA,CAAE;EACnCC,eAAe;EACfC,SAAS;EACTC,kBAAkB;EAClBC,KAAK;EACL,GAAGC;AACJ,CAAC,EAAG;EACH,OACCC,aAAA;IACCJ,SAAS,EAAGP,UAAU,CACrB,uCAAuC,EACvCO,SACD,CAAG;IAAA,GACEG;EAAK,GAEVC,aAAA,CAACP,QAAQ;IACRQ,uBAAuB;IACvBH,KAAK,EAAGA,KAAO;IACfI,QAAQ,EAAGL,kBAAoB;IAC/BF,eAAe,EAAGA;EAAiB,CACnC,CAAC,EACFK,aAAA,CAACT,MAAM;IACNY,IAAI,EAAGX,cAAgB;IACvBY,KAAK,EAAGd,EAAE,CAAE,OAAQ,CAAG;IACvBe,IAAI,EAAC;
|
|
1
|
+
{"version":3,"names":["classnames","__","Button","keyboardReturn","URLInput","LinkEditor","autocompleteRef","className","onChangeInputValue","value","props","createElement","__nextHasNoMarginBottom","onChange","icon","label","type","size"],"sources":["@wordpress/block-editor/src/components/url-popover/link-editor.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport URLInput from '../url-input';\n\nexport default function LinkEditor( {\n\tautocompleteRef,\n\tclassName,\n\tonChangeInputValue,\n\tvalue,\n\t...props\n} ) {\n\treturn (\n\t\t<form\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-url-popover__link-editor',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<URLInput\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeInputValue }\n\t\t\t\tautocompleteRef={ autocompleteRef }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\ticon={ keyboardReturn }\n\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\ttype=\"submit\"\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t</form>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,cAAc,QAAQ,kBAAkB;;AAEjD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,cAAc;AAEnC,eAAe,SAASC,UAAUA,CAAE;EACnCC,eAAe;EACfC,SAAS;EACTC,kBAAkB;EAClBC,KAAK;EACL,GAAGC;AACJ,CAAC,EAAG;EACH,OACCC,aAAA;IACCJ,SAAS,EAAGP,UAAU,CACrB,uCAAuC,EACvCO,SACD,CAAG;IAAA,GACEG;EAAK,GAEVC,aAAA,CAACP,QAAQ;IACRQ,uBAAuB;IACvBH,KAAK,EAAGA,KAAO;IACfI,QAAQ,EAAGL,kBAAoB;IAC/BF,eAAe,EAAGA;EAAiB,CACnC,CAAC,EACFK,aAAA,CAACT,MAAM;IACNY,IAAI,EAAGX,cAAgB;IACvBY,KAAK,EAAGd,EAAE,CAAE,OAAQ,CAAG;IACvBe,IAAI,EAAC,QAAQ;IACbC,IAAI,EAAC;EAAS,CACd,CACI,CAAC;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","__","Button","edit","LinkViewerURL","LinkViewer","className","linkClassName","onEditLinkClick","url","urlLabel","props","createElement","icon","label","onClick"],"sources":["@wordpress/block-editor/src/components/url-popover/link-viewer.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { edit } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkViewerURL from './link-viewer-url';\n\nexport default function LinkViewer( {\n\tclassName,\n\tlinkClassName,\n\tonEditLinkClick,\n\turl,\n\turlLabel,\n\t...props\n} ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-url-popover__link-viewer',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<LinkViewerURL\n\t\t\t\turl={ url }\n\t\t\t\turlLabel={ urlLabel }\n\t\t\t\tclassName={ linkClassName }\n\t\t\t/>\n\t\t\t{ onEditLinkClick && (\n\t\t\t\t<Button\n\t\t\t\t\ticon={ edit }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\tonClick={ onEditLinkClick }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,IAAI,QAAQ,kBAAkB;;AAEvC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAE7C,eAAe,SAASC,UAAUA,CAAE;EACnCC,SAAS;EACTC,aAAa;EACbC,eAAe;EACfC,GAAG;EACHC,QAAQ;EACR,GAAGC;AACJ,CAAC,EAAG;EACH,OACCC,aAAA;IACCN,SAAS,EAAGN,UAAU,CACrB,uCAAuC,EACvCM,SACD,CAAG;IAAA,GACEK;EAAK,GAEVC,aAAA,CAACR,aAAa;IACbK,GAAG,EAAGA,GAAK;IACXC,QAAQ,EAAGA,QAAU;IACrBJ,SAAS,EAAGC;EAAe,CAC3B,CAAC,EACAC,eAAe,IAChBI,aAAA,CAACV,MAAM;IACNW,IAAI,EAAGV,IAAM;IACbW,KAAK,EAAGb,EAAE,CAAE,MAAO,CAAG;IACtBc,OAAO,EAAGP;
|
|
1
|
+
{"version":3,"names":["classnames","__","Button","edit","LinkViewerURL","LinkViewer","className","linkClassName","onEditLinkClick","url","urlLabel","props","createElement","icon","label","onClick","size"],"sources":["@wordpress/block-editor/src/components/url-popover/link-viewer.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { edit } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkViewerURL from './link-viewer-url';\n\nexport default function LinkViewer( {\n\tclassName,\n\tlinkClassName,\n\tonEditLinkClick,\n\turl,\n\turlLabel,\n\t...props\n} ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-url-popover__link-viewer',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<LinkViewerURL\n\t\t\t\turl={ url }\n\t\t\t\turlLabel={ urlLabel }\n\t\t\t\tclassName={ linkClassName }\n\t\t\t/>\n\t\t\t{ onEditLinkClick && (\n\t\t\t\t<Button\n\t\t\t\t\ticon={ edit }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\tonClick={ onEditLinkClick }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,IAAI,QAAQ,kBAAkB;;AAEvC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAE7C,eAAe,SAASC,UAAUA,CAAE;EACnCC,SAAS;EACTC,aAAa;EACbC,eAAe;EACfC,GAAG;EACHC,QAAQ;EACR,GAAGC;AACJ,CAAC,EAAG;EACH,OACCC,aAAA;IACCN,SAAS,EAAGN,UAAU,CACrB,uCAAuC,EACvCM,SACD,CAAG;IAAA,GACEK;EAAK,GAEVC,aAAA,CAACR,aAAa;IACbK,GAAG,EAAGA,GAAK;IACXC,QAAQ,EAAGA,QAAU;IACrBJ,SAAS,EAAGC;EAAe,CAC3B,CAAC,EACAC,eAAe,IAChBI,aAAA,CAACV,MAAM;IACNW,IAAI,EAAGV,IAAM;IACbW,KAAK,EAAGb,EAAE,CAAE,MAAO,CAAG;IACtBc,OAAO,EAAGP,eAAiB;IAC3BQ,IAAI,EAAC;EAAS,CACd,CAEE,CAAC;AAER"}
|
|
@@ -31,7 +31,7 @@ createBlockSaveFilter([align, anchor, ariaLabel, customClassName, border, color,
|
|
|
31
31
|
export { useCustomSides } from './dimensions';
|
|
32
32
|
export { useLayoutClasses, useLayoutStyles } from './layout';
|
|
33
33
|
export { getBorderClassesAndStyles, useBorderProps } from './use-border-props';
|
|
34
|
-
export { getShadowClassesAndStyles
|
|
34
|
+
export { getShadowClassesAndStyles } from './use-shadow-props';
|
|
35
35
|
export { getColorClassesAndStyles, useColorProps } from './use-color-props';
|
|
36
36
|
export { getSpacingClassesAndStyles } from './use-spacing-props';
|
|
37
37
|
export { getTypographyClassesAndStyles } from './use-typography-props';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createBlockEditFilter","createBlockListBlockFilter","createBlockSaveFilter","align","anchor","ariaLabel","customClassName","style","color","dimensions","duotone","fontFamily","fontSize","border","position","layout","childLayout","contentLockUI","blockHooks","blockRenaming","filter","Boolean","useCustomSides","useLayoutClasses","useLayoutStyles","getBorderClassesAndStyles","useBorderProps","getShadowClassesAndStyles","
|
|
1
|
+
{"version":3,"names":["createBlockEditFilter","createBlockListBlockFilter","createBlockSaveFilter","align","anchor","ariaLabel","customClassName","style","color","dimensions","duotone","fontFamily","fontSize","border","position","layout","childLayout","contentLockUI","blockHooks","blockRenaming","filter","Boolean","useCustomSides","useLayoutClasses","useLayoutStyles","getBorderClassesAndStyles","useBorderProps","getShadowClassesAndStyles","getColorClassesAndStyles","useColorProps","getSpacingClassesAndStyles","getTypographyClassesAndStyles","getGapCSSValue","useCachedTruthy"],"sources":["@wordpress/block-editor/src/hooks/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateBlockEditFilter,\n\tcreateBlockListBlockFilter,\n\tcreateBlockSaveFilter,\n} from './utils';\nimport './compat';\nimport align from './align';\nimport './lock';\nimport anchor from './anchor';\nimport ariaLabel from './aria-label';\nimport customClassName from './custom-class-name';\nimport './generated-class-name';\nimport style from './style';\nimport './settings';\nimport color from './color';\nimport dimensions from './dimensions';\nimport duotone from './duotone';\nimport fontFamily from './font-family';\nimport fontSize from './font-size';\nimport border from './border';\nimport position from './position';\nimport layout from './layout';\nimport childLayout from './layout-child';\nimport contentLockUI from './content-lock-ui';\nimport './metadata';\nimport blockHooks from './block-hooks';\nimport blockRenaming from './block-renaming';\nimport './use-bindings-attributes';\n\ncreateBlockEditFilter(\n\t[\n\t\talign,\n\t\tanchor,\n\t\tcustomClassName,\n\t\tstyle,\n\t\tduotone,\n\t\tposition,\n\t\tlayout,\n\t\tcontentLockUI,\n\t\tblockHooks,\n\t\tblockRenaming,\n\t].filter( Boolean )\n);\ncreateBlockListBlockFilter( [\n\talign,\n\tstyle,\n\tcolor,\n\tdimensions,\n\tduotone,\n\tfontFamily,\n\tfontSize,\n\tborder,\n\tposition,\n\tchildLayout,\n] );\ncreateBlockSaveFilter( [\n\talign,\n\tanchor,\n\tariaLabel,\n\tcustomClassName,\n\tborder,\n\tcolor,\n\tstyle,\n\tfontFamily,\n\tfontSize,\n] );\n\nexport { useCustomSides } from './dimensions';\nexport { useLayoutClasses, useLayoutStyles } from './layout';\nexport { getBorderClassesAndStyles, useBorderProps } from './use-border-props';\nexport { getShadowClassesAndStyles } from './use-shadow-props';\nexport { getColorClassesAndStyles, useColorProps } from './use-color-props';\nexport { getSpacingClassesAndStyles } from './use-spacing-props';\nexport { getTypographyClassesAndStyles } from './use-typography-props';\nexport { getGapCSSValue } from './gap';\nexport { useCachedTruthy } from './use-cached-truthy';\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,qBAAqB,EACrBC,0BAA0B,EAC1BC,qBAAqB,QACf,SAAS;AAChB,OAAO,UAAU;AACjB,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAO,QAAQ;AACf,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,SAAS,MAAM,cAAc;AACpC,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAO,wBAAwB;AAC/B,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAO,YAAY;AACnB,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAO,YAAY;AACnB,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAO,2BAA2B;AAElCnB,qBAAqB,CACpB,CACCG,KAAK,EACLC,MAAM,EACNE,eAAe,EACfC,KAAK,EACLG,OAAO,EACPI,QAAQ,EACRC,MAAM,EACNE,aAAa,EACbC,UAAU,EACVC,aAAa,CACb,CAACC,MAAM,CAAEC,OAAQ,CACnB,CAAC;AACDpB,0BAA0B,CAAE,CAC3BE,KAAK,EACLI,KAAK,EACLC,KAAK,EACLC,UAAU,EACVC,OAAO,EACPC,UAAU,EACVC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRE,WAAW,CACV,CAAC;AACHd,qBAAqB,CAAE,CACtBC,KAAK,EACLC,MAAM,EACNC,SAAS,EACTC,eAAe,EACfO,MAAM,EACNL,KAAK,EACLD,KAAK,EACLI,UAAU,EACVC,QAAQ,CACP,CAAC;AAEH,SAASU,cAAc,QAAQ,cAAc;AAC7C,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,UAAU;AAC5D,SAASC,yBAAyB,EAAEC,cAAc,QAAQ,oBAAoB;AAC9E,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,mBAAmB;AAC3E,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,cAAc,QAAQ,OAAO;AACtC,SAASC,eAAe,QAAQ,qBAAqB"}
|
|
@@ -15,7 +15,7 @@ createBlockEditFilter([align, anchor, style]);
|
|
|
15
15
|
createBlockListBlockFilter([align, style, color, fontSize]);
|
|
16
16
|
createBlockSaveFilter([align, anchor, customClassName, color, style, fontSize]);
|
|
17
17
|
export { getBorderClassesAndStyles, useBorderProps } from './use-border-props';
|
|
18
|
-
export { getShadowClassesAndStyles
|
|
18
|
+
export { getShadowClassesAndStyles } from './use-shadow-props';
|
|
19
19
|
export { getColorClassesAndStyles, useColorProps } from './use-color-props';
|
|
20
20
|
export { getSpacingClassesAndStyles } from './use-spacing-props';
|
|
21
21
|
export { useCachedTruthy } from './use-cached-truthy';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createBlockEditFilter","createBlockListBlockFilter","createBlockSaveFilter","align","anchor","customClassName","style","color","fontSize","getBorderClassesAndStyles","useBorderProps","getShadowClassesAndStyles","
|
|
1
|
+
{"version":3,"names":["createBlockEditFilter","createBlockListBlockFilter","createBlockSaveFilter","align","anchor","customClassName","style","color","fontSize","getBorderClassesAndStyles","useBorderProps","getShadowClassesAndStyles","getColorClassesAndStyles","useColorProps","getSpacingClassesAndStyles","useCachedTruthy","useEditorWrapperStyles"],"sources":["@wordpress/block-editor/src/hooks/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateBlockEditFilter,\n\tcreateBlockListBlockFilter,\n\tcreateBlockSaveFilter,\n} from './utils';\nimport './compat';\nimport align from './align';\nimport anchor from './anchor';\nimport customClassName from './custom-class-name';\nimport './generated-class-name';\nimport style from './style';\nimport color from './color';\nimport fontSize from './font-size';\nimport './layout';\n\ncreateBlockEditFilter( [ align, anchor, style ] );\ncreateBlockListBlockFilter( [ align, style, color, fontSize ] );\ncreateBlockSaveFilter( [\n\talign,\n\tanchor,\n\tcustomClassName,\n\tcolor,\n\tstyle,\n\tfontSize,\n] );\n\nexport { getBorderClassesAndStyles, useBorderProps } from './use-border-props';\nexport { getShadowClassesAndStyles } from './use-shadow-props';\nexport { getColorClassesAndStyles, useColorProps } from './use-color-props';\nexport { getSpacingClassesAndStyles } from './use-spacing-props';\nexport { useCachedTruthy } from './use-cached-truthy';\nexport { useEditorWrapperStyles } from './use-editor-wrapper-styles';\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,qBAAqB,EACrBC,0BAA0B,EAC1BC,qBAAqB,QACf,SAAS;AAChB,OAAO,UAAU;AACjB,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAO,wBAAwB;AAC/B,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAO,UAAU;AAEjBR,qBAAqB,CAAE,CAAEG,KAAK,EAAEC,MAAM,EAAEE,KAAK,CAAG,CAAC;AACjDL,0BAA0B,CAAE,CAAEE,KAAK,EAAEG,KAAK,EAAEC,KAAK,EAAEC,QAAQ,CAAG,CAAC;AAC/DN,qBAAqB,CAAE,CACtBC,KAAK,EACLC,MAAM,EACNC,eAAe,EACfE,KAAK,EACLD,KAAK,EACLE,QAAQ,CACP,CAAC;AAEH,SAASC,yBAAyB,EAAEC,cAAc,QAAQ,oBAAoB;AAC9E,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,mBAAmB;AAC3E,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,sBAAsB,QAAQ,6BAA6B"}
|
|
@@ -44,13 +44,13 @@ const createEditFunctionWithBindingsAttribute = () => createHigherOrderComponent
|
|
|
44
44
|
const updatedAttributes = getBlockAttributes(clientId);
|
|
45
45
|
if (updatedAttributes?.metadata?.bindings) {
|
|
46
46
|
Object.entries(updatedAttributes.metadata.bindings).forEach(([attributeName, settings]) => {
|
|
47
|
-
const source = getBlockBindingsSource(settings.source
|
|
47
|
+
const source = getBlockBindingsSource(settings.source);
|
|
48
48
|
if (source) {
|
|
49
49
|
// Second argument (`updateMetaValue`) will be used to update the value in the future.
|
|
50
50
|
const {
|
|
51
51
|
placeholder,
|
|
52
52
|
useValue: [metaValue = null] = []
|
|
53
|
-
} = source.useSource(props, settings.
|
|
53
|
+
} = source.useSource(props, settings.args);
|
|
54
54
|
if (placeholder && !metaValue) {
|
|
55
55
|
// If the attribute is `src` or `href`, a placeholder can't be used because it is not a valid url.
|
|
56
56
|
// Adding this workaround until attributes and metadata fields types are improved and include `url`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getBlockType","createHigherOrderComponent","useRegistry","useSelect","addFilter","store","blockEditorStore","useBlockEditContext","unlock","BLOCK_BINDINGS_ALLOWED_BLOCKS","createEditFunctionWithBindingsAttribute","BlockEdit","props","clientId","name","blockName","getBlockBindingsSource","getBlockAttributes","updateBlockAttributes","updatedAttributes","metadata","bindings","Object","entries","forEach","attributeName","settings","source","placeholder","useValue","metaValue","useSource","
|
|
1
|
+
{"version":3,"names":["getBlockType","createHigherOrderComponent","useRegistry","useSelect","addFilter","store","blockEditorStore","useBlockEditContext","unlock","BLOCK_BINDINGS_ALLOWED_BLOCKS","createEditFunctionWithBindingsAttribute","BlockEdit","props","clientId","name","blockName","getBlockBindingsSource","getBlockAttributes","updateBlockAttributes","updatedAttributes","metadata","bindings","Object","entries","forEach","attributeName","settings","source","placeholder","useValue","metaValue","useSource","args","htmlAttribute","attributes","attribute","registry","createElement","Fragment","key","setAttributes","newAttributes","blockId","batch","shimAttributeSource","edit","contextItems","usesContextArray","usesContext","oldUsesContextArray","Set","item","has","push"],"sources":["@wordpress/block-editor/src/hooks/use-bindings-attributes.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { addFilter } from '@wordpress/hooks';\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit/context';\nimport { unlock } from '../lock-unlock';\n\n/** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\n/**\n * Given a binding of block attributes, returns a higher order component that\n * overrides its `attributes` and `setAttributes` props to sync any changes needed.\n *\n * @return {WPHigherOrderComponent} Higher-order component.\n */\n\nconst BLOCK_BINDINGS_ALLOWED_BLOCKS = {\n\t'core/paragraph': [ 'content' ],\n\t'core/heading': [ 'content' ],\n\t'core/image': [ 'url', 'title', 'alt' ],\n\t'core/button': [ 'url', 'text', 'linkTarget' ],\n};\n\nconst createEditFunctionWithBindingsAttribute = () =>\n\tcreateHigherOrderComponent(\n\t\t( BlockEdit ) => ( props ) => {\n\t\t\tconst { clientId, name: blockName } = useBlockEditContext();\n\t\t\tconst { getBlockBindingsSource } = unlock(\n\t\t\t\tuseSelect( blockEditorStore )\n\t\t\t);\n\t\t\tconst { getBlockAttributes, updateBlockAttributes } =\n\t\t\t\tuseSelect( blockEditorStore );\n\n\t\t\tconst updatedAttributes = getBlockAttributes( clientId );\n\t\t\tif ( updatedAttributes?.metadata?.bindings ) {\n\t\t\t\tObject.entries( updatedAttributes.metadata.bindings ).forEach(\n\t\t\t\t\t( [ attributeName, settings ] ) => {\n\t\t\t\t\t\tconst source = getBlockBindingsSource(\n\t\t\t\t\t\t\tsettings.source\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( source ) {\n\t\t\t\t\t\t\t// Second argument (`updateMetaValue`) will be used to update the value in the future.\n\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\tplaceholder,\n\t\t\t\t\t\t\t\tuseValue: [ metaValue = null ] = [],\n\t\t\t\t\t\t\t} = source.useSource( props, settings.args );\n\n\t\t\t\t\t\t\tif ( placeholder && ! metaValue ) {\n\t\t\t\t\t\t\t\t// If the attribute is `src` or `href`, a placeholder can't be used because it is not a valid url.\n\t\t\t\t\t\t\t\t// Adding this workaround until attributes and metadata fields types are improved and include `url`.\n\t\t\t\t\t\t\t\tconst htmlAttribute =\n\t\t\t\t\t\t\t\t\tgetBlockType( blockName ).attributes[\n\t\t\t\t\t\t\t\t\t\tattributeName\n\t\t\t\t\t\t\t\t\t].attribute;\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\thtmlAttribute === 'src' ||\n\t\t\t\t\t\t\t\t\thtmlAttribute === 'href'\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tupdatedAttributes[ attributeName ] = null;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tupdatedAttributes[ attributeName ] =\n\t\t\t\t\t\t\t\t\t\tplaceholder;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( metaValue ) {\n\t\t\t\t\t\t\t\tupdatedAttributes[ attributeName ] = metaValue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst registry = useRegistry();\n\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<BlockEdit\n\t\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t\tattributes={ updatedAttributes }\n\t\t\t\t\t\tsetAttributes={ ( newAttributes, blockId ) =>\n\t\t\t\t\t\t\tregistry.batch( () =>\n\t\t\t\t\t\t\t\tupdateBlockAttributes( blockId, newAttributes )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t);\n\t\t},\n\t\t'useBoundAttributes'\n\t);\n\n/**\n * Filters a registered block's settings to enhance a block's `edit` component\n * to upgrade bound attributes.\n *\n * @param {WPBlockSettings} settings Registered block settings.\n *\n * @return {WPBlockSettings} Filtered block settings.\n */\nfunction shimAttributeSource( settings ) {\n\tif ( ! ( settings.name in BLOCK_BINDINGS_ALLOWED_BLOCKS ) ) {\n\t\treturn settings;\n\t}\n\tsettings.edit = createEditFunctionWithBindingsAttribute()( settings.edit );\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/custom-sources-backwards-compatibility/shim-attribute-source',\n\tshimAttributeSource\n);\n\n// Add the context to all blocks.\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/block-bindings-ui',\n\t( settings, name ) => {\n\t\tif ( ! ( name in BLOCK_BINDINGS_ALLOWED_BLOCKS ) ) {\n\t\t\treturn settings;\n\t\t}\n\t\tconst contextItems = [ 'postId', 'postType', 'queryId' ];\n\t\tconst usesContextArray = settings.usesContext;\n\t\tconst oldUsesContextArray = new Set( usesContextArray );\n\t\tcontextItems.forEach( ( item ) => {\n\t\t\tif ( ! oldUsesContextArray.has( item ) ) {\n\t\t\t\tusesContextArray.push( item );\n\t\t\t}\n\t\t} );\n\t\tsettings.usesContext = usesContextArray;\n\t\treturn settings;\n\t}\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,SAAS,QAAQ,kBAAkB;AAC5C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,6BAA6B,GAAG;EACrC,gBAAgB,EAAE,CAAE,SAAS,CAAE;EAC/B,cAAc,EAAE,CAAE,SAAS,CAAE;EAC7B,YAAY,EAAE,CAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAE;EACvC,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,YAAY;AAC7C,CAAC;AAED,MAAMC,uCAAuC,GAAGA,CAAA,KAC/CT,0BAA0B,CACvBU,SAAS,IAAQC,KAAK,IAAM;EAC7B,MAAM;IAAEC,QAAQ;IAAEC,IAAI,EAAEC;EAAU,CAAC,GAAGR,mBAAmB,CAAC,CAAC;EAC3D,MAAM;IAAES;EAAuB,CAAC,GAAGR,MAAM,CACxCL,SAAS,CAAEG,gBAAiB,CAC7B,CAAC;EACD,MAAM;IAAEW,kBAAkB;IAAEC;E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AAK,CAAE,MACfzB,qBAAqB,CAAEwB,OAAO,EAAED,aAAc,CAC/C,CACA;IAAA,GACI7B;EAAK,CACV,CACA,CAAC;AAEL,CAAC,EACD,oBACD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASgC,mBAAmBA,CAAElB,QAAQ,EAAG;EACxC,IAAK,EAAIA,QAAQ,CAACZ,IAAI,IAAIL,6BAA6B,CAAE,EAAG;IAC3D,OAAOiB,QAAQ;EAChB;EACAA,QAAQ,CAACmB,IAAI,GAAGnC,uCAAuC,CAAC,CAAC,CAAEgB,QAAQ,CAACmB,IAAK,CAAC;EAE1E,OAAOnB,QAAQ;AAChB;AAEAtB,SAAS,CACR,0BAA0B,EAC1B,0EAA0E,EAC1EwC,mBACD,CAAC;;AAED;AACAxC,SAAS,CACR,0BAA0B,EAC1B,wBAAwB,EACxB,CAAEsB,QAAQ,EAAEZ,IAAI,KAAM;EACrB,IAAK,EAAIA,IAAI,IAAIL,6BAA6B,CAAE,EAAG;IAClD,OAAOiB,QAAQ;EAChB;EACA,MAAMoB,YAAY,GAAG,CAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAE;EACxD,MAAMC,gBAAgB,GAAGrB,QAAQ,CAACsB,WAAW;EAC7C,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAEH,gBAAiB,CAAC;EACvDD,YAAY,CAACtB,OAAO,CAAI2B,IAAI,IAAM;IACjC,IAAK,CAAEF,mBAAmB,CAACG,GAAG,CAAED,IAAK,CAAC,EAAG;MACxCJ,gBAAgB,CAACM,IAAI,CAAEF,IAAK,CAAC;IAC9B;EACD,CAAE,CAAC;EACHzB,QAAQ,CAACsB,WAAW,GAAGD,gBAAgB;EACvC,OAAOrB,QAAQ;AAChB,CACD,CAAC"}
|
|
@@ -17,23 +17,9 @@ import { getInlineStyles } from './style';
|
|
|
17
17
|
export function getShadowClassesAndStyles(attributes) {
|
|
18
18
|
const shadow = attributes.style?.shadow || '';
|
|
19
19
|
return {
|
|
20
|
-
className: undefined,
|
|
21
20
|
style: getInlineStyles({
|
|
22
21
|
shadow
|
|
23
22
|
})
|
|
24
23
|
};
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Derives the shadow related props for a block from its shadow block support
|
|
29
|
-
* attributes.
|
|
30
|
-
*
|
|
31
|
-
* @param {Object} attributes Block attributes.
|
|
32
|
-
*
|
|
33
|
-
* @return {Object} ClassName & style props from shadow block support.
|
|
34
|
-
*/
|
|
35
|
-
export function useShadowProps(attributes) {
|
|
36
|
-
const shadowProps = getShadowClassesAndStyles(attributes);
|
|
37
|
-
return shadowProps;
|
|
38
|
-
}
|
|
39
25
|
//# sourceMappingURL=use-shadow-props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getInlineStyles","getShadowClassesAndStyles","attributes","shadow","style"
|
|
1
|
+
{"version":3,"names":["getInlineStyles","getShadowClassesAndStyles","attributes","shadow","style"],"sources":["@wordpress/block-editor/src/hooks/use-shadow-props.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\n\n// This utility is intended to assist where the serialization of the shadow\n// block support is being skipped for a block but the shadow related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's shadow support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Shadow block support derived CSS classes & styles.\n */\nexport function getShadowClassesAndStyles( attributes ) {\n\tconst shadow = attributes.style?.shadow || '';\n\n\treturn {\n\t\tstyle: getInlineStyles( { shadow } ),\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,SAAS;;AAEzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CAAEC,UAAU,EAAG;EACvD,MAAMC,MAAM,GAAGD,UAAU,CAACE,KAAK,EAAED,MAAM,IAAI,EAAE;EAE7C,OAAO;IACNC,KAAK,EAAEJ,eAAe,CAAE;MAAEG;IAAO,CAAE;EACpC,CAAC;AACF"}
|
|
@@ -133,7 +133,7 @@ export function useStyleOverride({
|
|
|
133
133
|
* @return {Object} Settings object.
|
|
134
134
|
*/
|
|
135
135
|
export function useBlockSettings(name, parentLayout) {
|
|
136
|
-
const [backgroundImage, backgroundSize, fontFamilies,
|
|
136
|
+
const [backgroundImage, backgroundSize, fontFamilies, fontSizes, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, writingMode, textTransform, letterSpacing, padding, margin, blockGap, spacingSizes, units, aspectRatio, minHeight, layout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled, shadow] = useSettings('background.backgroundImage', 'background.backgroundSize', 'typography.fontFamilies', 'typography.fontSizes', 'typography.customFontSize', 'typography.fontStyle', 'typography.fontWeight', 'typography.lineHeight', 'typography.textColumns', 'typography.textDecoration', 'typography.writingMode', 'typography.textTransform', 'typography.letterSpacing', 'spacing.padding', 'spacing.margin', 'spacing.blockGap', 'spacing.spacingSizes', 'spacing.units', 'dimensions.aspectRatio', 'dimensions.minHeight', 'layout', 'border.color', 'border.radius', 'border.style', 'border.width', 'color.custom', 'color.palette.custom', 'color.customDuotone', 'color.palette.theme', 'color.palette.default', 'color.defaultPalette', 'color.defaultDuotone', 'color.duotone.custom', 'color.duotone.theme', 'color.duotone.default', 'color.gradients.custom', 'color.gradients.theme', 'color.gradients.default', 'color.defaultGradients', 'color.customGradient', 'color.background', 'color.link', 'color.text', 'color.heading', 'color.button', 'shadow');
|
|
137
137
|
const rawSettings = useMemo(() => {
|
|
138
138
|
return {
|
|
139
139
|
background: {
|
|
@@ -173,12 +173,9 @@ export function useBlockSettings(name, parentLayout) {
|
|
|
173
173
|
custom: fontFamilies
|
|
174
174
|
},
|
|
175
175
|
fontSizes: {
|
|
176
|
-
custom:
|
|
177
|
-
theme: themeFontSizes,
|
|
178
|
-
default: defaultFontSizes
|
|
176
|
+
custom: fontSizes
|
|
179
177
|
},
|
|
180
178
|
customFontSize,
|
|
181
|
-
defaultFontSizes: defaultFontSizesEnabled,
|
|
182
179
|
fontStyle,
|
|
183
180
|
fontWeight,
|
|
184
181
|
lineHeight,
|
|
@@ -211,7 +208,7 @@ export function useBlockSettings(name, parentLayout) {
|
|
|
211
208
|
parentLayout,
|
|
212
209
|
shadow
|
|
213
210
|
};
|
|
214
|
-
}, [backgroundImage, backgroundSize, fontFamilies,
|
|
211
|
+
}, [backgroundImage, backgroundSize, fontFamilies, fontSizes, customFontSize, fontStyle, fontWeight, lineHeight, textColumns, textDecoration, textTransform, letterSpacing, writingMode, padding, margin, blockGap, spacingSizes, units, aspectRatio, minHeight, layout, parentLayout, borderColor, borderRadius, borderStyle, borderWidth, customColorsEnabled, customColors, customDuotone, themeColors, defaultColors, defaultPalette, defaultDuotone, userDuotonePalette, themeDuotonePalette, defaultDuotonePalette, userGradientPalette, themeGradientPalette, defaultGradientPalette, defaultGradients, areCustomGradientsEnabled, isBackgroundEnabled, isLinkEnabled, isTextEnabled, isHeadingEnabled, isButtonEnabled, shadow]);
|
|
215
212
|
return useSettingsForBlockElement(rawSettings, name);
|
|
216
213
|
}
|
|
217
214
|
export function createBlockEditFilter(features) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getBlockSupport","memo","useMemo","useEffect","useId","useState","useDispatch","createHigherOrderComponent","addFilter","useBlockEditContext","mayDisplayControlsKey","mayDisplayParentControlsKey","useSettings","useSettingsForBlockElement","getValueFromObjectPath","setImmutably","store","blockEditorStore","unlock","classnames","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","shouldSkipSerialization","blockNameOrType","featureSet","feature","skipSerialization","__experimentalSkipSerialization","includes","useStyleOverride","id","css","assets","__unstableType","setStyleOverride","deleteStyleOverride","fallbackId","_id","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","fontFamilies","userFontSizes","themeFontSizes","defaultFontSizes","defaultFontSizesEnabled","customFontSize","fontStyle","fontWeight","lineHeight","textColumns","textDecoration","writingMode","textTransform","letterSpacing","padding","margin","blockGap","spacingSizes","units","aspectRatio","minHeight","layout","borderColor","borderRadius","borderStyle","borderWidth","customColorsEnabled","customColors","customDuotone","themeColors","defaultColors","defaultPalette","defaultDuotone","userDuotonePalette","themeDuotonePalette","defaultDuotonePalette","userGradientPalette","themeGradientPalette","defaultGradientPalette","defaultGradients","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","isHeadingEnabled","isButtonEnabled","shadow","rawSettings","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","fontSizes","spacing","border","radius","style","width","dimensions","createBlockEditFilter","features","settings","Edit","edit","withBlockEditHooks","OriginalBlockEdit","props","context","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","neededProps","createElement","isSelected","clientId","setAttributes","__unstableParentLayout","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","fill","keys","Boolean","reduce","acc","className","createBlockSaveFilter","extraPropsFromHooks","accu","addSaveProps","neededAttributes","hasOwnProperty"],"sources":["@wordpress/block-editor/src/hooks/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { memo, useMemo, useEffect, useId, useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n} from '../components/block-edit/context';\nimport { useSettings } from '../components';\nimport { useSettingsForBlockElement } from '../components/global-styles/hooks';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\n\tconst cleanedNestedObjects = Object.entries( object )\n\t\t.map( ( [ key, value ] ) => [ key, cleanEmptyObject( value ) ] )\n\t\t.filter( ( [ , value ] ) => value !== undefined );\n\treturn ! cleanedNestedObjects.length\n\t\t? undefined\n\t\t: Object.fromEntries( cleanedNestedObjects );\n};\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif (\n\t\tObject.values( activeSupports ?? {} ).every(\n\t\t\t( isActive ) => ! isActive\n\t\t)\n\t) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\t\treferenceBlockAttributes,\n\t\t\t\t\tpath\n\t\t\t\t);\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: setImmutably(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockNameOrType Block name or block type object.\n * @param {string} featureSet Name of block support feature set.\n * @param {string} feature Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization(\n\tblockNameOrType,\n\tfeatureSet,\n\tfeature\n) {\n\tconst support = getBlockSupport( blockNameOrType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n\nexport function useStyleOverride( { id, css, assets, __unstableType } = {} ) {\n\tconst { setStyleOverride, deleteStyleOverride } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst fallbackId = useId();\n\tuseEffect( () => {\n\t\t// Unmount if there is CSS and assets are empty.\n\t\tif ( ! css && ! assets ) return;\n\t\tconst _id = id || fallbackId;\n\t\tsetStyleOverride( _id, {\n\t\t\tid,\n\t\t\tcss,\n\t\t\tassets,\n\t\t\t__unstableType,\n\t\t} );\n\t\treturn () => {\n\t\t\tdeleteStyleOverride( _id );\n\t\t};\n\t}, [\n\t\tid,\n\t\tcss,\n\t\tassets,\n\t\t__unstableType,\n\t\tfallbackId,\n\t\tsetStyleOverride,\n\t\tdeleteStyleOverride,\n\t] );\n}\n\n/**\n * Based on the block and its context, returns an object of all the block settings.\n * This object can be passed as a prop to all the Styles UI components\n * (TypographyPanel, DimensionsPanel...).\n *\n * @param {string} name Block name.\n * @param {*} parentLayout Parent layout.\n *\n * @return {Object} Settings object.\n */\nexport function useBlockSettings( name, parentLayout ) {\n\tconst [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tuserFontSizes,\n\t\tthemeFontSizes,\n\t\tdefaultFontSizes,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\twritingMode,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] = useSettings(\n\t\t'background.backgroundImage',\n\t\t'background.backgroundSize',\n\t\t'typography.fontFamilies',\n\t\t'typography.fontSizes.custom',\n\t\t'typography.fontSizes.theme',\n\t\t'typography.fontSizes.default',\n\t\t'typography.defaultFontSizes',\n\t\t'typography.customFontSize',\n\t\t'typography.fontStyle',\n\t\t'typography.fontWeight',\n\t\t'typography.lineHeight',\n\t\t'typography.textColumns',\n\t\t'typography.textDecoration',\n\t\t'typography.writingMode',\n\t\t'typography.textTransform',\n\t\t'typography.letterSpacing',\n\t\t'spacing.padding',\n\t\t'spacing.margin',\n\t\t'spacing.blockGap',\n\t\t'spacing.spacingSizes',\n\t\t'spacing.units',\n\t\t'dimensions.aspectRatio',\n\t\t'dimensions.minHeight',\n\t\t'layout',\n\t\t'border.color',\n\t\t'border.radius',\n\t\t'border.style',\n\t\t'border.width',\n\t\t'color.custom',\n\t\t'color.palette.custom',\n\t\t'color.customDuotone',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.defaultPalette',\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default',\n\t\t'color.defaultGradients',\n\t\t'color.customGradient',\n\t\t'color.background',\n\t\t'color.link',\n\t\t'color.text',\n\t\t'color.heading',\n\t\t'color.button',\n\t\t'shadow'\n\t);\n\n\tconst rawSettings = useMemo( () => {\n\t\treturn {\n\t\t\tbackground: {\n\t\t\t\tbackgroundImage,\n\t\t\t\tbackgroundSize,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tpalette: {\n\t\t\t\t\tcustom: customColors,\n\t\t\t\t\ttheme: themeColors,\n\t\t\t\t\tdefault: defaultColors,\n\t\t\t\t},\n\t\t\t\tgradients: {\n\t\t\t\t\tcustom: userGradientPalette,\n\t\t\t\t\ttheme: themeGradientPalette,\n\t\t\t\t\tdefault: defaultGradientPalette,\n\t\t\t\t},\n\t\t\t\tduotone: {\n\t\t\t\t\tcustom: userDuotonePalette,\n\t\t\t\t\ttheme: themeDuotonePalette,\n\t\t\t\t\tdefault: defaultDuotonePalette,\n\t\t\t\t},\n\t\t\t\tdefaultGradients,\n\t\t\t\tdefaultPalette,\n\t\t\t\tdefaultDuotone,\n\t\t\t\tcustom: customColorsEnabled,\n\t\t\t\tcustomGradient: areCustomGradientsEnabled,\n\t\t\t\tcustomDuotone,\n\t\t\t\tbackground: isBackgroundEnabled,\n\t\t\t\tlink: isLinkEnabled,\n\t\t\t\theading: isHeadingEnabled,\n\t\t\t\tbutton: isButtonEnabled,\n\t\t\t\ttext: isTextEnabled,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontFamilies: {\n\t\t\t\t\tcustom: fontFamilies,\n\t\t\t\t},\n\t\t\t\tfontSizes: {\n\t\t\t\t\tcustom: userFontSizes,\n\t\t\t\t\ttheme: themeFontSizes,\n\t\t\t\t\tdefault: defaultFontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\n\t\t\t\tdefaultFontSizes: defaultFontSizesEnabled,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tlineHeight,\n\t\t\t\ttextColumns,\n\t\t\t\ttextDecoration,\n\t\t\t\ttextTransform,\n\t\t\t\tletterSpacing,\n\t\t\t\twritingMode,\n\t\t\t},\n\t\t\tspacing: {\n\t\t\t\tspacingSizes: {\n\t\t\t\t\tcustom: spacingSizes,\n\t\t\t\t},\n\t\t\t\tpadding,\n\t\t\t\tmargin,\n\t\t\t\tblockGap,\n\t\t\t\tunits,\n\t\t\t},\n\t\t\tborder: {\n\t\t\t\tcolor: borderColor,\n\t\t\t\tradius: borderRadius,\n\t\t\t\tstyle: borderStyle,\n\t\t\t\twidth: borderWidth,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\taspectRatio,\n\t\t\t\tminHeight,\n\t\t\t},\n\t\t\tlayout,\n\t\t\tparentLayout,\n\t\t\tshadow,\n\t\t};\n\t}, [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tuserFontSizes,\n\t\tthemeFontSizes,\n\t\tdefaultFontSizes,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\twritingMode,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tparentLayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] );\n\n\treturn useSettingsForBlockElement( rawSettings, name );\n}\n\nexport function createBlockEditFilter( features ) {\n\t// We don't want block controls to re-render when typing inside a block.\n\t// `memo` will prevent re-renders unless props change, so only pass the\n\t// needed props and not the whole attributes object.\n\tfeatures = features.map( ( settings ) => {\n\t\treturn { ...settings, Edit: memo( settings.edit ) };\n\t} );\n\tconst withBlockEditHooks = createHigherOrderComponent(\n\t\t( OriginalBlockEdit ) => ( props ) => {\n\t\t\tconst context = useBlockEditContext();\n\t\t\t// CAUTION: code added before this line will be executed for all\n\t\t\t// blocks, not just those that support the feature! Code added\n\t\t\t// above this line should be carefully evaluated for its impact on\n\t\t\t// performance.\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tEdit,\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tshareWithChildBlocks,\n\t\t\t\t\t} = feature;\n\t\t\t\t\tconst shouldDisplayControls =\n\t\t\t\t\t\tcontext[ mayDisplayControlsKey ] ||\n\t\t\t\t\t\t( context[ mayDisplayParentControlsKey ] &&\n\t\t\t\t\t\t\tshareWithChildBlocks );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! shouldDisplayControls ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Edit\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\tsetAttributes={ props.setAttributes }\n\t\t\t\t\t\t\t__unstableParentLayout={\n\t\t\t\t\t\t\t\tprops.__unstableParentLayout\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<OriginalBlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t},\n\t\t'withBlockEditHooks'\n\t);\n\taddFilter( 'editor.BlockEdit', 'core/editor/hooks', withBlockEditHooks );\n}\n\nfunction BlockProps( { index, useBlockProps, setAllWrapperProps, ...props } ) {\n\tconst wrapperProps = useBlockProps( props );\n\tconst setWrapperProps = ( next ) =>\n\t\tsetAllWrapperProps( ( prev ) => {\n\t\t\tconst nextAll = [ ...prev ];\n\t\t\tnextAll[ index ] = next;\n\t\t\treturn nextAll;\n\t\t} );\n\t// Setting state after every render is fine because this component is\n\t// pure and will only re-render when needed props change.\n\tuseEffect( () => {\n\t\t// We could shallow compare the props, but since this component only\n\t\t// changes when needed attributes change, the benefit is probably small.\n\t\tsetWrapperProps( wrapperProps );\n\t\treturn () => {\n\t\t\tsetWrapperProps( undefined );\n\t\t};\n\t} );\n\treturn null;\n}\n\nconst BlockPropsPure = memo( BlockProps );\n\nexport function createBlockListBlockFilter( features ) {\n\tconst withBlockListBlockHooks = createHigherOrderComponent(\n\t\t( BlockListBlock ) => ( props ) => {\n\t\t\tconst [ allWrapperProps, setAllWrapperProps ] = useState(\n\t\t\t\tArray( features.length ).fill( undefined )\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tuseBlockProps,\n\t\t\t\t\t} = feature;\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t\t\t// set.\n\t\t\t\t\t\t! Object.keys( neededProps ).length ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BlockPropsPure\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tindex={ i }\n\t\t\t\t\t\t\tuseBlockProps={ useBlockProps }\n\t\t\t\t\t\t\t// This component is pure, so we must pass a stable\n\t\t\t\t\t\t\t// function reference.\n\t\t\t\t\t\t\tsetAllWrapperProps={ setAllWrapperProps }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t{ ...props }\n\t\t\t\t\twrapperProps={ allWrapperProps\n\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t.reduce( ( acc, wrapperProps ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\tacc.className,\n\t\t\t\t\t\t\t\t\twrapperProps.className\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t...acc.style,\n\t\t\t\t\t\t\t\t\t...wrapperProps.style,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, props.wrapperProps || {} ) }\n\t\t\t\t/>,\n\t\t\t];\n\t\t},\n\t\t'withBlockListBlockHooks'\n\t);\n\taddFilter(\n\t\t'editor.BlockListBlock',\n\t\t'core/editor/hooks',\n\t\twithBlockListBlockHooks\n\t);\n}\n\nexport function createBlockSaveFilter( features ) {\n\tfunction extraPropsFromHooks( props, name, attributes ) {\n\t\treturn features.reduce( ( accu, feature ) => {\n\t\t\tconst { hasSupport, attributeKeys = [], addSaveProps } = feature;\n\n\t\t\tconst neededAttributes = {};\n\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\tif ( attributes[ key ] ) {\n\t\t\t\t\tneededAttributes[ key ] = attributes[ key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t// set.\n\t\t\t\t! Object.keys( neededAttributes ).length ||\n\t\t\t\t! hasSupport( name )\n\t\t\t) {\n\t\t\t\treturn accu;\n\t\t\t}\n\n\t\t\treturn addSaveProps( accu, name, neededAttributes );\n\t\t}, props );\n\t}\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\textraPropsFromHooks,\n\t\t0\n\t);\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\t( props ) => {\n\t\t\t// Previously we had a filter deleting the className if it was an empty\n\t\t\t// string. That filter is no longer running, so now we need to delete it\n\t\t\t// here.\n\t\t\tif ( props.hasOwnProperty( 'className' ) && ! props.className ) {\n\t\t\t\tdelete props.className;\n\t\t\t}\n\n\t\t\treturn props;\n\t\t}\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,oBAAoB;AAC9E,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,SAAS,QAAQ,kBAAkB;;AAE5C;AACA;AACA;AACA,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,2BAA2B,QACrB,kCAAkC;AACzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,0BAA0B,QAAQ,mCAAmC;AAC9E,SAASC,sBAAsB,EAAEC,YAAY,QAAQ,iBAAiB;AACtE,SAASC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AC,CAACzJ,MAAM,IACxC,CAAEwH,UAAU,CAAEnF,IAAK,CAAC,EACnB;QACD,OAAOkH,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAElH,IAAI,EAAEoH,gBAAiB,CAAC;IACpD,CAAC,EAAEpC,KAAM,CAAC;EACX;EACA7I,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACnB8K,mBAAmB,EACnB,CACD,CAAC;EACD9K,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACjB6I,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAACqC,cAAc,CAAE,WAAY,CAAC,IAAI,CAAErC,KAAK,CAAC+B,SAAS,EAAG;MAC/D,OAAO/B,KAAK,CAAC+B,SAAS;IACvB;IAEA,OAAO/B,KAAK;EACb,CACD,CAAC;AACF"}
|
|
1
|
+
{"version":3,"names":["getBlockSupport","memo","useMemo","useEffect","useId","useState","useDispatch","createHigherOrderComponent","addFilter","useBlockEditContext","mayDisplayControlsKey","mayDisplayParentControlsKey","useSettings","useSettingsForBlockElement","getValueFromObjectPath","setImmutably","store","blockEditorStore","unlock","classnames","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","shouldSkipSerialization","blockNameOrType","featureSet","feature","skipSerialization","__experimentalSkipSerialization","includes","useStyleOverride","id","css","assets","__unstableType","setStyleOverride","deleteStyleOverride","fallbackId","_id","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","fontFamilies","fontSizes","customFontSize","fontStyle","fontWeight","lineHeight","textColumns","textDecoration","writingMode","textTransform","letterSpacing","padding","margin","blockGap","spacingSizes","units","aspectRatio","minHeight","layout","borderColor","borderRadius","borderStyle","borderWidth","customColorsEnabled","customColors","customDuotone","themeColors","defaultColors","defaultPalette","defaultDuotone","userDuotonePalette","themeDuotonePalette","defaultDuotonePalette","userGradientPalette","themeGradientPalette","defaultGradientPalette","defaultGradients","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","isHeadingEnabled","isButtonEnabled","shadow","rawSettings","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","spacing","border","radius","style","width","dimensions","createBlockEditFilter","features","settings","Edit","edit","withBlockEditHooks","OriginalBlockEdit","props","context","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","neededProps","createElement","isSelected","clientId","setAttributes","__unstableParentLayout","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","fill","keys","Boolean","reduce","acc","className","createBlockSaveFilter","extraPropsFromHooks","accu","addSaveProps","neededAttributes","hasOwnProperty"],"sources":["@wordpress/block-editor/src/hooks/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { memo, useMemo, useEffect, useId, useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n} from '../components/block-edit/context';\nimport { useSettings } from '../components';\nimport { useSettingsForBlockElement } from '../components/global-styles/hooks';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\n\tconst cleanedNestedObjects = Object.entries( object )\n\t\t.map( ( [ key, value ] ) => [ key, cleanEmptyObject( value ) ] )\n\t\t.filter( ( [ , value ] ) => value !== undefined );\n\treturn ! cleanedNestedObjects.length\n\t\t? undefined\n\t\t: Object.fromEntries( cleanedNestedObjects );\n};\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif (\n\t\tObject.values( activeSupports ?? {} ).every(\n\t\t\t( isActive ) => ! isActive\n\t\t)\n\t) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\t\treferenceBlockAttributes,\n\t\t\t\t\tpath\n\t\t\t\t);\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: setImmutably(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockNameOrType Block name or block type object.\n * @param {string} featureSet Name of block support feature set.\n * @param {string} feature Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization(\n\tblockNameOrType,\n\tfeatureSet,\n\tfeature\n) {\n\tconst support = getBlockSupport( blockNameOrType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n\nexport function useStyleOverride( { id, css, assets, __unstableType } = {} ) {\n\tconst { setStyleOverride, deleteStyleOverride } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst fallbackId = useId();\n\tuseEffect( () => {\n\t\t// Unmount if there is CSS and assets are empty.\n\t\tif ( ! css && ! assets ) return;\n\t\tconst _id = id || fallbackId;\n\t\tsetStyleOverride( _id, {\n\t\t\tid,\n\t\t\tcss,\n\t\t\tassets,\n\t\t\t__unstableType,\n\t\t} );\n\t\treturn () => {\n\t\t\tdeleteStyleOverride( _id );\n\t\t};\n\t}, [\n\t\tid,\n\t\tcss,\n\t\tassets,\n\t\t__unstableType,\n\t\tfallbackId,\n\t\tsetStyleOverride,\n\t\tdeleteStyleOverride,\n\t] );\n}\n\n/**\n * Based on the block and its context, returns an object of all the block settings.\n * This object can be passed as a prop to all the Styles UI components\n * (TypographyPanel, DimensionsPanel...).\n *\n * @param {string} name Block name.\n * @param {*} parentLayout Parent layout.\n *\n * @return {Object} Settings object.\n */\nexport function useBlockSettings( name, parentLayout ) {\n\tconst [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tfontSizes,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\twritingMode,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] = useSettings(\n\t\t'background.backgroundImage',\n\t\t'background.backgroundSize',\n\t\t'typography.fontFamilies',\n\t\t'typography.fontSizes',\n\t\t'typography.customFontSize',\n\t\t'typography.fontStyle',\n\t\t'typography.fontWeight',\n\t\t'typography.lineHeight',\n\t\t'typography.textColumns',\n\t\t'typography.textDecoration',\n\t\t'typography.writingMode',\n\t\t'typography.textTransform',\n\t\t'typography.letterSpacing',\n\t\t'spacing.padding',\n\t\t'spacing.margin',\n\t\t'spacing.blockGap',\n\t\t'spacing.spacingSizes',\n\t\t'spacing.units',\n\t\t'dimensions.aspectRatio',\n\t\t'dimensions.minHeight',\n\t\t'layout',\n\t\t'border.color',\n\t\t'border.radius',\n\t\t'border.style',\n\t\t'border.width',\n\t\t'color.custom',\n\t\t'color.palette.custom',\n\t\t'color.customDuotone',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.defaultPalette',\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default',\n\t\t'color.defaultGradients',\n\t\t'color.customGradient',\n\t\t'color.background',\n\t\t'color.link',\n\t\t'color.text',\n\t\t'color.heading',\n\t\t'color.button',\n\t\t'shadow'\n\t);\n\n\tconst rawSettings = useMemo( () => {\n\t\treturn {\n\t\t\tbackground: {\n\t\t\t\tbackgroundImage,\n\t\t\t\tbackgroundSize,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tpalette: {\n\t\t\t\t\tcustom: customColors,\n\t\t\t\t\ttheme: themeColors,\n\t\t\t\t\tdefault: defaultColors,\n\t\t\t\t},\n\t\t\t\tgradients: {\n\t\t\t\t\tcustom: userGradientPalette,\n\t\t\t\t\ttheme: themeGradientPalette,\n\t\t\t\t\tdefault: defaultGradientPalette,\n\t\t\t\t},\n\t\t\t\tduotone: {\n\t\t\t\t\tcustom: userDuotonePalette,\n\t\t\t\t\ttheme: themeDuotonePalette,\n\t\t\t\t\tdefault: defaultDuotonePalette,\n\t\t\t\t},\n\t\t\t\tdefaultGradients,\n\t\t\t\tdefaultPalette,\n\t\t\t\tdefaultDuotone,\n\t\t\t\tcustom: customColorsEnabled,\n\t\t\t\tcustomGradient: areCustomGradientsEnabled,\n\t\t\t\tcustomDuotone,\n\t\t\t\tbackground: isBackgroundEnabled,\n\t\t\t\tlink: isLinkEnabled,\n\t\t\t\theading: isHeadingEnabled,\n\t\t\t\tbutton: isButtonEnabled,\n\t\t\t\ttext: isTextEnabled,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontFamilies: {\n\t\t\t\t\tcustom: fontFamilies,\n\t\t\t\t},\n\t\t\t\tfontSizes: {\n\t\t\t\t\tcustom: fontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tlineHeight,\n\t\t\t\ttextColumns,\n\t\t\t\ttextDecoration,\n\t\t\t\ttextTransform,\n\t\t\t\tletterSpacing,\n\t\t\t\twritingMode,\n\t\t\t},\n\t\t\tspacing: {\n\t\t\t\tspacingSizes: {\n\t\t\t\t\tcustom: spacingSizes,\n\t\t\t\t},\n\t\t\t\tpadding,\n\t\t\t\tmargin,\n\t\t\t\tblockGap,\n\t\t\t\tunits,\n\t\t\t},\n\t\t\tborder: {\n\t\t\t\tcolor: borderColor,\n\t\t\t\tradius: borderRadius,\n\t\t\t\tstyle: borderStyle,\n\t\t\t\twidth: borderWidth,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\taspectRatio,\n\t\t\t\tminHeight,\n\t\t\t},\n\t\t\tlayout,\n\t\t\tparentLayout,\n\t\t\tshadow,\n\t\t};\n\t}, [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tfontSizes,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\twritingMode,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tparentLayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] );\n\n\treturn useSettingsForBlockElement( rawSettings, name );\n}\n\nexport function createBlockEditFilter( features ) {\n\t// We don't want block controls to re-render when typing inside a block.\n\t// `memo` will prevent re-renders unless props change, so only pass the\n\t// needed props and not the whole attributes object.\n\tfeatures = features.map( ( settings ) => {\n\t\treturn { ...settings, Edit: memo( settings.edit ) };\n\t} );\n\tconst withBlockEditHooks = createHigherOrderComponent(\n\t\t( OriginalBlockEdit ) => ( props ) => {\n\t\t\tconst context = useBlockEditContext();\n\t\t\t// CAUTION: code added before this line will be executed for all\n\t\t\t// blocks, not just those that support the feature! Code added\n\t\t\t// above this line should be carefully evaluated for its impact on\n\t\t\t// performance.\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tEdit,\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tshareWithChildBlocks,\n\t\t\t\t\t} = feature;\n\t\t\t\t\tconst shouldDisplayControls =\n\t\t\t\t\t\tcontext[ mayDisplayControlsKey ] ||\n\t\t\t\t\t\t( context[ mayDisplayParentControlsKey ] &&\n\t\t\t\t\t\t\tshareWithChildBlocks );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! shouldDisplayControls ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Edit\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\tsetAttributes={ props.setAttributes }\n\t\t\t\t\t\t\t__unstableParentLayout={\n\t\t\t\t\t\t\t\tprops.__unstableParentLayout\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<OriginalBlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t},\n\t\t'withBlockEditHooks'\n\t);\n\taddFilter( 'editor.BlockEdit', 'core/editor/hooks', withBlockEditHooks );\n}\n\nfunction BlockProps( { index, useBlockProps, setAllWrapperProps, ...props } ) {\n\tconst wrapperProps = useBlockProps( props );\n\tconst setWrapperProps = ( next ) =>\n\t\tsetAllWrapperProps( ( prev ) => {\n\t\t\tconst nextAll = [ ...prev ];\n\t\t\tnextAll[ index ] = next;\n\t\t\treturn nextAll;\n\t\t} );\n\t// Setting state after every render is fine because this component is\n\t// pure and will only re-render when needed props change.\n\tuseEffect( () => {\n\t\t// We could shallow compare the props, but since this component only\n\t\t// changes when needed attributes change, the benefit is probably small.\n\t\tsetWrapperProps( wrapperProps );\n\t\treturn () => {\n\t\t\tsetWrapperProps( undefined );\n\t\t};\n\t} );\n\treturn null;\n}\n\nconst BlockPropsPure = memo( BlockProps );\n\nexport function createBlockListBlockFilter( features ) {\n\tconst withBlockListBlockHooks = createHigherOrderComponent(\n\t\t( BlockListBlock ) => ( props ) => {\n\t\t\tconst [ allWrapperProps, setAllWrapperProps ] = useState(\n\t\t\t\tArray( features.length ).fill( undefined )\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tuseBlockProps,\n\t\t\t\t\t} = feature;\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t\t\t// set.\n\t\t\t\t\t\t! Object.keys( neededProps ).length ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BlockPropsPure\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tindex={ i }\n\t\t\t\t\t\t\tuseBlockProps={ useBlockProps }\n\t\t\t\t\t\t\t// This component is pure, so we must pass a stable\n\t\t\t\t\t\t\t// function reference.\n\t\t\t\t\t\t\tsetAllWrapperProps={ setAllWrapperProps }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t{ ...props }\n\t\t\t\t\twrapperProps={ allWrapperProps\n\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t.reduce( ( acc, wrapperProps ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\tacc.className,\n\t\t\t\t\t\t\t\t\twrapperProps.className\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t...acc.style,\n\t\t\t\t\t\t\t\t\t...wrapperProps.style,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, props.wrapperProps || {} ) }\n\t\t\t\t/>,\n\t\t\t];\n\t\t},\n\t\t'withBlockListBlockHooks'\n\t);\n\taddFilter(\n\t\t'editor.BlockListBlock',\n\t\t'core/editor/hooks',\n\t\twithBlockListBlockHooks\n\t);\n}\n\nexport function createBlockSaveFilter( features ) {\n\tfunction extraPropsFromHooks( props, name, attributes ) {\n\t\treturn features.reduce( ( accu, feature ) => {\n\t\t\tconst { hasSupport, attributeKeys = [], addSaveProps } = feature;\n\n\t\t\tconst neededAttributes = {};\n\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\tif ( attributes[ key ] ) {\n\t\t\t\t\tneededAttributes[ key ] = attributes[ key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t// set.\n\t\t\t\t! Object.keys( neededAttributes ).length ||\n\t\t\t\t! hasSupport( name )\n\t\t\t) {\n\t\t\t\treturn accu;\n\t\t\t}\n\n\t\t\treturn addSaveProps( accu, name, neededAttributes );\n\t\t}, props );\n\t}\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\textraPropsFromHooks,\n\t\t0\n\t);\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\t( props ) => {\n\t\t\t// Previously we had a filter deleting the className if it was an empty\n\t\t\t// string. That filter is no longer running, so now we need to delete it\n\t\t\t// here.\n\t\t\tif ( props.hasOwnProperty( 'className' ) && ! props.className ) {\n\t\t\t\tdelete props.className;\n\t\t\t}\n\n\t\t\treturn props;\n\t\t}\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA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,IAAIyH,aAAa,EAAG;QAClC,IAAKvG,UAAU,CAAElB,GAAG,CAAE,EAAG;UACxByJ,gBAAgB,CAAEzJ,GAAG,CAAE,GAAGkB,UAAU,CAAElB,GAAG,CAAE;QAC5C;MACD;MAEA;MACC;MACA;MACA,CAAEH,MAAM,CAACmJ,IAAI,CAAES,gBAAiB,CAAC,CAACrJ,MAAM,IACxC,CAAEoH,UAAU,CAAE/E,IAAK,CAAC,EACnB;QACD,OAAO8G,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAE9G,IAAI,EAAEgH,gBAAiB,CAAC;IACpD,CAAC,EAAEpC,KAAM,CAAC;EACX;EACAzI,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACnB0K,mBAAmB,EACnB,CACD,CAAC;EACD1K,SAAS,CACR,kCAAkC,EAClC,mBAAmB,EACjByI,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAACqC,cAAc,CAAE,WAAY,CAAC,IAAI,CAAErC,KAAK,CAAC+B,SAAS,EAAG;MAC/D,OAAO/B,KAAK,CAAC+B,SAAS;IACvB;IAEA,OAAO/B,KAAK;EACb,CACD,CAAC;AACF"}
|
package/build-module/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import './hooks';
|
|
5
|
-
export { getBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles, useBorderProps as __experimentalUseBorderProps, getColorClassesAndStyles as __experimentalGetColorClassesAndStyles, getTypographyClassesAndStyles, useColorProps as __experimentalUseColorProps, useCustomSides as __experimentalUseCustomSides, getSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles, getGapCSSValue as __experimentalGetGapCSSValue, getShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles,
|
|
5
|
+
export { getBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles, useBorderProps as __experimentalUseBorderProps, getColorClassesAndStyles as __experimentalGetColorClassesAndStyles, getTypographyClassesAndStyles, useColorProps as __experimentalUseColorProps, useCustomSides as __experimentalUseCustomSides, getSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles, getGapCSSValue as __experimentalGetGapCSSValue, getShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles, useCachedTruthy } from './hooks';
|
|
6
6
|
export * from './components';
|
|
7
7
|
export * from './elements';
|
|
8
8
|
export * from './utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getBorderClassesAndStyles","__experimentalGetBorderClassesAndStyles","useBorderProps","__experimentalUseBorderProps","getColorClassesAndStyles","__experimentalGetColorClassesAndStyles","getTypographyClassesAndStyles","useColorProps","__experimentalUseColorProps","useCustomSides","__experimentalUseCustomSides","getSpacingClassesAndStyles","__experimentalGetSpacingClassesAndStyles","getGapCSSValue","__experimentalGetGapCSSValue","getShadowClassesAndStyles","__experimentalGetShadowClassesAndStyles","
|
|
1
|
+
{"version":3,"names":["getBorderClassesAndStyles","__experimentalGetBorderClassesAndStyles","useBorderProps","__experimentalUseBorderProps","getColorClassesAndStyles","__experimentalGetColorClassesAndStyles","getTypographyClassesAndStyles","useColorProps","__experimentalUseColorProps","useCustomSides","__experimentalUseCustomSides","getSpacingClassesAndStyles","__experimentalGetSpacingClassesAndStyles","getGapCSSValue","__experimentalGetGapCSSValue","getShadowClassesAndStyles","__experimentalGetShadowClassesAndStyles","useCachedTruthy","storeConfig","store","SETTINGS_DEFAULTS","privateApis"],"sources":["@wordpress/block-editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './hooks';\nexport {\n\tgetBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles,\n\tuseBorderProps as __experimentalUseBorderProps,\n\tgetColorClassesAndStyles as __experimentalGetColorClassesAndStyles,\n\tgetTypographyClassesAndStyles,\n\tuseColorProps as __experimentalUseColorProps,\n\tuseCustomSides as __experimentalUseCustomSides,\n\tgetSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles,\n\tgetGapCSSValue as __experimentalGetGapCSSValue,\n\tgetShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles,\n\tuseCachedTruthy,\n} from './hooks';\nexport * from './components';\nexport * from './elements';\nexport * from './utils';\nexport { storeConfig, store } from './store';\nexport { SETTINGS_DEFAULTS } from './store/defaults';\nexport { privateApis } from './private-apis';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,SAAS;AAChB,SACCA,yBAAyB,IAAIC,uCAAuC,EACpEC,cAAc,IAAIC,4BAA4B,EAC9CC,wBAAwB,IAAIC,sCAAsC,EAClEC,6BAA6B,EAC7BC,aAAa,IAAIC,2BAA2B,EAC5CC,cAAc,IAAIC,4BAA4B,EAC9CC,0BAA0B,IAAIC,wCAAwC,EACtEC,cAAc,IAAIC,4BAA4B,EAC9CC,yBAAyB,IAAIC,uCAAuC,EACpEC,eAAe,QACT,SAAS;AAChB,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,SAASC,WAAW,EAAEC,KAAK,QAAQ,SAAS;AAC5C,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,SAASC,WAAW,QAAQ,gBAAgB"}
|
|
@@ -51,20 +51,4 @@ export const getValueFromObjectPath = (object, path, defaultValue) => {
|
|
|
51
51
|
});
|
|
52
52
|
return (_value = value) !== null && _value !== void 0 ? _value : defaultValue;
|
|
53
53
|
};
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Helper util to filter out objects with duplicate values for a given property.
|
|
57
|
-
*
|
|
58
|
-
* @param {Object[]} array Array of objects to filter.
|
|
59
|
-
* @param {string} property Property to filter unique values by.
|
|
60
|
-
*
|
|
61
|
-
* @return {Object[]} Array of objects with unique values for the specified property.
|
|
62
|
-
*/
|
|
63
|
-
export function uniqByProperty(array, property) {
|
|
64
|
-
const seen = new Set();
|
|
65
|
-
return array.filter(item => {
|
|
66
|
-
const value = item[property];
|
|
67
|
-
return seen.has(value) ? false : seen.add(value);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
54
|
//# sourceMappingURL=object.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["setImmutably","object","path","value","Array","isArray","leaf","pop","prev","key","lvl","getValueFromObjectPath","defaultValue","_value","arrayPath","split","forEach","fieldName"
|
|
1
|
+
{"version":3,"names":["setImmutably","object","path","value","Array","isArray","leaf","pop","prev","key","lvl","getValueFromObjectPath","defaultValue","_value","arrayPath","split","forEach","fieldName"],"sources":["@wordpress/block-editor/src/utils/object.js"],"sourcesContent":["/**\n * Immutably sets a value inside an object. Like `lodash#set`, but returning a\n * new object. Treats nullish initial values as empty objects. Clones any\n * nested objects. Supports arrays, too.\n *\n * @param {Object} object Object to set a value in.\n * @param {number|string|Array} path Path in the object to modify.\n * @param {*} value New value to set.\n * @return {Object} Cloned object with the new value set.\n */\nexport function setImmutably( object, path, value ) {\n\t// Normalize path\n\tpath = Array.isArray( path ) ? [ ...path ] : [ path ];\n\n\t// Shallowly clone the base of the object\n\tobject = Array.isArray( object ) ? [ ...object ] : { ...object };\n\n\tconst leaf = path.pop();\n\n\t// Traverse object from root to leaf, shallowly cloning at each level\n\tlet prev = object;\n\tfor ( const key of path ) {\n\t\tconst lvl = prev[ key ];\n\t\tprev = prev[ key ] = Array.isArray( lvl ) ? [ ...lvl ] : { ...lvl };\n\t}\n\n\tprev[ leaf ] = value;\n\n\treturn object;\n}\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as either:\n * - a string of properties, separated by dots, for example: \"x.y\".\n * - an array of properties, for example `[ 'x', 'y' ]`.\n * You can also specify a default value in case the result is nullish.\n *\n * @param {Object} object Input object.\n * @param {string|Array} path Path to the object property.\n * @param {*} defaultValue Default value if the value at the specified path is nullish.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path, defaultValue ) => {\n\tconst arrayPath = Array.isArray( path ) ? path : path.split( '.' );\n\tlet value = object;\n\tarrayPath.forEach( ( fieldName ) =>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