@wordpress/block-editor 8.1.0 → 8.1.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/CHANGELOG.md +6 -0
- package/README.md +7 -5
- package/build/components/block-inspector/index.js +7 -0
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-preview/auto.js +3 -1
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/colors-gradients/tools-panel-color-dropdown.js +89 -0
- package/build/components/colors-gradients/tools-panel-color-dropdown.js.map +1 -0
- package/build/components/contrast-checker/index.js +75 -64
- package/build/components/contrast-checker/index.js.map +1 -1
- package/build/components/index.js +9 -9
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +9 -0
- package/build/components/index.native.js.map +1 -1
- package/build/components/inserter/search-items.js +3 -1
- package/build/components/inserter/search-items.js.map +1 -1
- package/build/components/inspector-controls/block-support-tools-panel.js +3 -1
- package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build/components/inspector-controls/groups.js +2 -0
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/line-height-control/index.native.js +3 -2
- package/build/components/line-height-control/index.native.js.map +1 -1
- package/build/components/link-control/link-preview.js +5 -2
- package/build/components/link-control/link-preview.js.map +1 -1
- package/build/components/list-view/block-contents.js +3 -1
- package/build/components/list-view/block-contents.js.map +1 -1
- package/build/components/list-view/block-select-button.js +4 -2
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/list-view/block.js +2 -1
- package/build/components/list-view/block.js.map +1 -1
- package/build/components/media-placeholder/index.js +1 -11
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-replace-flow/index.native.js +13 -0
- package/build/components/media-replace-flow/index.native.js.map +1 -0
- package/build/components/rich-text/index.js +2 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/rich-text/index.native.js +2 -1
- package/build/components/rich-text/index.native.js.map +1 -1
- package/build/components/rich-text/use-paste-handler.js +14 -5
- package/build/components/rich-text/use-paste-handler.js.map +1 -1
- package/build/components/rich-text/utils.js +2 -1
- package/build/components/rich-text/utils.js.map +1 -1
- package/build/hooks/border-color.js +1 -1
- package/build/hooks/border-color.js.map +1 -1
- package/build/hooks/color-panel.js +23 -17
- package/build/hooks/color-panel.js.map +1 -1
- package/build/hooks/color.js +176 -10
- package/build/hooks/color.js.map +1 -1
- package/build/hooks/font-size.js +14 -0
- package/build/hooks/font-size.js.map +1 -1
- package/build/hooks/typography.native.js +2 -4
- package/build/hooks/typography.native.js.map +1 -1
- package/build/hooks/utils.js +55 -0
- package/build/hooks/utils.js.map +1 -1
- package/build-module/components/block-inspector/index.js +7 -0
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +3 -1
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/colors-gradients/tools-panel-color-dropdown.js +75 -0
- package/build-module/components/colors-gradients/tools-panel-color-dropdown.js.map +1 -0
- package/build-module/components/contrast-checker/index.js +75 -65
- package/build-module/components/contrast-checker/index.js.map +1 -1
- package/build-module/components/index.js +1 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js +1 -0
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inserter/search-items.js +3 -1
- package/build-module/components/inserter/search-items.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js +3 -1
- package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js +2 -0
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/line-height-control/index.native.js +3 -2
- package/build-module/components/line-height-control/index.native.js.map +1 -1
- package/build-module/components/link-control/link-preview.js +5 -2
- package/build-module/components/link-control/link-preview.js.map +1 -1
- package/build-module/components/list-view/block-contents.js +3 -1
- package/build-module/components/list-view/block-contents.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +4 -2
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/list-view/block.js +2 -1
- package/build-module/components/list-view/block.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +1 -10
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.native.js +4 -0
- package/build-module/components/media-replace-flow/index.native.js.map +1 -0
- package/build-module/components/rich-text/index.js +2 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/rich-text/index.native.js +2 -1
- package/build-module/components/rich-text/index.native.js.map +1 -1
- package/build-module/components/rich-text/use-paste-handler.js +14 -5
- package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/utils.js +2 -1
- package/build-module/components/rich-text/utils.js.map +1 -1
- package/build-module/hooks/border-color.js +1 -1
- package/build-module/hooks/border-color.js.map +1 -1
- package/build-module/hooks/color-panel.js +22 -15
- package/build-module/hooks/color-panel.js.map +1 -1
- package/build-module/hooks/color.js +174 -11
- package/build-module/hooks/color.js.map +1 -1
- package/build-module/hooks/font-size.js +12 -1
- package/build-module/hooks/font-size.js.map +1 -1
- package/build-module/hooks/typography.native.js +2 -4
- package/build-module/hooks/typography.native.js.map +1 -1
- package/build-module/hooks/utils.js +52 -1
- package/build-module/hooks/utils.js.map +1 -1
- package/build-style/style-rtl.css +71 -9
- package/build-style/style.css +71 -9
- package/package.json +26 -30
- package/src/components/block-inspector/index.js +9 -0
- package/src/components/block-preview/auto.js +3 -0
- package/src/components/color-palette/test/__snapshots__/control.js.snap +0 -1
- package/src/components/colors-gradients/tools-panel-color-dropdown.js +85 -0
- package/src/components/contrast-checker/index.js +102 -87
- package/src/components/contrast-checker/test/index.js +176 -7
- package/src/components/index.js +1 -1
- package/src/components/index.native.js +1 -0
- package/src/components/inserter/search-items.js +3 -1
- package/src/components/inspector-controls/block-support-tools-panel.js +2 -0
- package/src/components/inspector-controls/groups.js +2 -0
- package/src/components/line-height-control/index.native.js +2 -1
- package/src/components/link-control/link-preview.js +2 -1
- package/src/components/link-control/style.scss +3 -9
- package/src/components/list-view/block-contents.js +2 -0
- package/src/components/list-view/block-select-button.js +2 -0
- package/src/components/list-view/block.js +1 -0
- package/src/components/media-placeholder/index.js +1 -10
- package/src/components/media-replace-flow/index.native.js +3 -0
- package/src/components/rich-text/index.js +1 -0
- package/src/components/rich-text/index.native.js +1 -0
- package/src/components/rich-text/use-paste-handler.js +16 -3
- package/src/components/rich-text/utils.js +1 -0
- package/src/hooks/border-color.js +1 -1
- package/src/hooks/color-panel.js +24 -21
- package/src/hooks/color.js +177 -8
- package/src/hooks/color.scss +85 -0
- package/src/hooks/font-size.js +29 -1
- package/src/hooks/typography.native.js +1 -3
- package/src/hooks/utils.js +69 -1
- package/src/style.scss +1 -0
- package/build/components/preserve-scroll-in-reorder/index.js +0 -22
- package/build/components/preserve-scroll-in-reorder/index.js.map +0 -1
- package/build-module/components/preserve-scroll-in-reorder/index.js +0 -12
- package/build-module/components/preserve-scroll-in-reorder/index.js.map +0 -1
- package/src/components/preserve-scroll-in-reorder/index.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 8.1.1 (2022-02-10)
|
|
6
|
+
|
|
7
|
+
### Bug Fix
|
|
8
|
+
|
|
9
|
+
- Removed unused `@wordpress/block-serialization-default-parser`, `css-mediaquery`, `memize` and `redux-multi` dependencies ([#38388](https://github.com/WordPress/gutenberg/pull/38388)).
|
|
10
|
+
|
|
5
11
|
## 8.1.0 (2022-01-27)
|
|
6
12
|
|
|
7
13
|
## 8.0.0 (2021-11-07)
|
package/README.md
CHANGED
|
@@ -524,10 +524,6 @@ _Related_
|
|
|
524
524
|
|
|
525
525
|
- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/plain-text/README.md>
|
|
526
526
|
|
|
527
|
-
### PreserveScrollInReorder
|
|
528
|
-
|
|
529
|
-
Undocumented declaration.
|
|
530
|
-
|
|
531
527
|
### RichText
|
|
532
528
|
|
|
533
529
|
_Related_
|
|
@@ -823,4 +819,10 @@ _Parameters_
|
|
|
823
819
|
|
|
824
820
|
<!-- END TOKEN(Autogenerated API docs) -->
|
|
825
821
|
|
|
826
|
-
|
|
822
|
+
## Contributing to this package
|
|
823
|
+
|
|
824
|
+
This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
|
|
825
|
+
|
|
826
|
+
To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).
|
|
827
|
+
|
|
828
|
+
<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
|
|
@@ -87,6 +87,9 @@ const BlockInspector = _ref => {
|
|
|
87
87
|
return (0, _element.createElement)("div", {
|
|
88
88
|
className: "block-editor-block-inspector"
|
|
89
89
|
}, (0, _element.createElement)(_multiSelectionInspector.default, null), (0, _element.createElement)(_inspectorControls.default.Slot, null), (0, _element.createElement)(_inspectorControls.default.Slot, {
|
|
90
|
+
__experimentalGroup: "color",
|
|
91
|
+
label: (0, _i18n.__)('Color')
|
|
92
|
+
}), (0, _element.createElement)(_inspectorControls.default.Slot, {
|
|
90
93
|
__experimentalGroup: "typography",
|
|
91
94
|
label: (0, _i18n.__)('Typography')
|
|
92
95
|
}), (0, _element.createElement)(_inspectorControls.default.Slot, {
|
|
@@ -140,6 +143,10 @@ const BlockInspectorSingleBlock = _ref2 => {
|
|
|
140
143
|
}), (0, _blocks.hasBlockSupport)(blockName, 'defaultStylePicker', true) && (0, _element.createElement)(_defaultStylePicker.default, {
|
|
141
144
|
blockName: blockName
|
|
142
145
|
}))), (0, _element.createElement)(_inspectorControls.default.Slot, null), (0, _element.createElement)(_inspectorControls.default.Slot, {
|
|
146
|
+
__experimentalGroup: "color",
|
|
147
|
+
label: (0, _i18n.__)('Color'),
|
|
148
|
+
className: "color-block-support-panel__inner-wrapper"
|
|
149
|
+
}), (0, _element.createElement)(_inspectorControls.default.Slot, {
|
|
143
150
|
__experimentalGroup: "typography",
|
|
144
151
|
label: (0, _i18n.__)('Typography')
|
|
145
152
|
}), (0, _element.createElement)(_inspectorControls.default.Slot, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/block-inspector/index.js"],"names":["BlockInspector","showNoBlockSelectedMessage","count","hasBlockStyles","selectedBlockName","selectedBlockClientId","blockType","select","getSelectedBlockClientId","getSelectedBlockCount","getBlockName","blockEditorStore","getBlockStyles","blocksStore","_selectedBlockClientId","_selectedBlockName","_blockType","blockStyles","length","isSelectedBlockUnregistered","name","BlockInspectorSingleBlock","clientId","blockName","blockInformation","AdvancedControls","slot","InspectorAdvancedControls","slotName","hasFills","Boolean","fills"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAMA;;AAIA;;AAKA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AA9BA;AACA;AACA;;AAcA;AACA;AACA;AAcA,MAAMA,cAAc,GAAG,QAA6C;AAAA,MAA3C;AAAEC,IAAAA,0BAA0B,GAAG;AAA/B,GAA2C;AACnE,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,cAFK;AAGLC,IAAAA,iBAHK;AAILC,IAAAA,qBAJK;AAKLC,IAAAA;AALK,MAMF,qBAAaC,MAAF,IAAc;AAC5B,UAAM;AACLC,MAAAA,wBADK;AAELC,MAAAA,qBAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEI,YAAF,CAJV;AAKA,UAAM;AAAEC,MAAAA;AAAF,QAAqBL,MAAM,CAAEM,aAAF,CAAjC;;AAEA,UAAMC,sBAAsB,GAAGN,wBAAwB,EAAvD;;AACA,UAAMO,kBAAkB,GACvBD,sBAAsB,IAAIJ,YAAY,CAAEI,sBAAF,CADvC;;AAEA,UAAME,UAAU,GACfD,kBAAkB,IAAI,0BAAcA,kBAAd,CADvB;;AAEA,UAAME,WAAW,GAChBF,kBAAkB,IAAIH,cAAc,CAAEG,kBAAF,CADrC;;AAGA,WAAO;AACNb,MAAAA,KAAK,EAAEO,qBAAqB,EADtB;AAENJ,MAAAA,qBAAqB,EAAES,sBAFjB;AAGNV,MAAAA,iBAAiB,EAAEW,kBAHb;AAINT,MAAAA,SAAS,EAAEU,UAJL;AAKNb,MAAAA,cAAc,EAAEc,WAAW,IAAIA,WAAW,CAACC,MAAZ,GAAqB;AAL9C,KAAP;AAOA,GAvBG,EAuBD,EAvBC,CANJ;;AA+BA,MAAKhB,KAAK,GAAG,CAAb,EAAiB;AAChB,WACC;AAAK,MAAA,SAAS,EAAC;AAAf,OACC,4BAAC,gCAAD,OADD,EAEC,4BAAC,0BAAD,CAAmB,IAAnB,OAFD,EAGC,4BAAC,0BAAD,CAAmB,IAAnB;AACC,MAAA,mBAAmB,EAAC,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/components/block-inspector/index.js"],"names":["BlockInspector","showNoBlockSelectedMessage","count","hasBlockStyles","selectedBlockName","selectedBlockClientId","blockType","select","getSelectedBlockClientId","getSelectedBlockCount","getBlockName","blockEditorStore","getBlockStyles","blocksStore","_selectedBlockClientId","_selectedBlockName","_blockType","blockStyles","length","isSelectedBlockUnregistered","name","BlockInspectorSingleBlock","clientId","blockName","blockInformation","AdvancedControls","slot","InspectorAdvancedControls","slotName","hasFills","Boolean","fills"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAMA;;AAIA;;AAKA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AA9BA;AACA;AACA;;AAcA;AACA;AACA;AAcA,MAAMA,cAAc,GAAG,QAA6C;AAAA,MAA3C;AAAEC,IAAAA,0BAA0B,GAAG;AAA/B,GAA2C;AACnE,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,cAFK;AA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,EAmBC,4BAAC,0BAAD,CAAmB,IAAnB;AACC,IAAA,mBAAmB,EAAC,OADrB;AAEC,IAAA,KAAK,EAAG,cAAI,OAAJ,CAFT;AAGC,IAAA,SAAS,EAAC;AAHX,IAnBD,EAwBC,4BAAC,0BAAD,CAAmB,IAAnB;AACC,IAAA,mBAAmB,EAAC,YADrB;AAEC,IAAA,KAAK,EAAG,cAAI,YAAJ;AAFT,IAxBD,EA4BC,4BAAC,0BAAD,CAAmB,IAAnB;AACC,IAAA,mBAAmB,EAAC,YADrB;AAEC,IAAA,KAAK,EAAG,cAAI,YAAJ;AAFT,IA5BD,EAgCC,4BAAC,0BAAD,CAAmB,IAAnB;AACC,IAAA,mBAAmB,EAAC,QADrB;AAEC,IAAA,KAAK,EAAG,cAAI,QAAJ;AAFT,IAhCD,EAoCC,yCACC,4BAAC,gBAAD,OADD,CApCD,EAuCC,4BAAC,4BAAD;AAAqB,IAAA,GAAG,EAAC;AAAzB,IAvCD,CADD;AA2CA,CAjDD;;AAmDA,MAAME,gBAAgB,GAAG,MAAM;AAC9B,QAAMC,IAAI,GAAG,uCAASC,6CAA0BC,QAAnC,CAAb;AACA,QAAMC,QAAQ,GAAGC,OAAO,CAAEJ,IAAI,CAACK,KAAL,IAAcL,IAAI,CAACK,KAAL,CAAWb,MAA3B,CAAxB;;AAEA,MAAK,CAAEW,QAAP,EAAkB;AACjB,WAAO,IAAP;AACA;;AAED,SACC,4BAAC,qBAAD;AACC,IAAA,SAAS,EAAC,wCADX;AAEC,IAAA,KAAK,EAAG,cAAI,UAAJ,CAFT;AAGC,IAAA,WAAW,EAAG;AAHf,KAKC,4BAAC,0BAAD,CAAmB,IAAnB;AAAwB,IAAA,mBAAmB,EAAC;AAA5C,IALD,CADD;AASA,CAjBD;;eAmBe7B,c","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetUnregisteredTypeHandlerName,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\tPanelBody,\n\t__experimentalUseSlot as useSlot,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport SkipToSelectedBlock from '../skip-to-selected-block';\nimport BlockCard from '../block-card';\nimport {\n\tdefault as InspectorControls,\n\tInspectorAdvancedControls,\n} from '../inspector-controls';\nimport BlockStyles from '../block-styles';\nimport MultiSelectionInspector from '../multi-selection-inspector';\nimport DefaultStylePicker from '../default-style-picker';\nimport BlockVariationTransforms from '../block-variation-transforms';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\n\nconst BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {\n\tconst {\n\t\tcount,\n\t\thasBlockStyles,\n\t\tselectedBlockName,\n\t\tselectedBlockClientId,\n\t\tblockType,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetSelectedBlockCount,\n\t\t\tgetBlockName,\n\t\t} = select( blockEditorStore );\n\t\tconst { getBlockStyles } = select( blocksStore );\n\n\t\tconst _selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst _selectedBlockName =\n\t\t\t_selectedBlockClientId && getBlockName( _selectedBlockClientId );\n\t\tconst _blockType =\n\t\t\t_selectedBlockName && getBlockType( _selectedBlockName );\n\t\tconst blockStyles =\n\t\t\t_selectedBlockName && getBlockStyles( _selectedBlockName );\n\n\t\treturn {\n\t\t\tcount: getSelectedBlockCount(),\n\t\t\tselectedBlockClientId: _selectedBlockClientId,\n\t\t\tselectedBlockName: _selectedBlockName,\n\t\t\tblockType: _blockType,\n\t\t\thasBlockStyles: blockStyles && blockStyles.length > 0,\n\t\t};\n\t}, [] );\n\n\tif ( count > 1 ) {\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t\t<MultiSelectionInspector />\n\t\t\t\t<InspectorControls.Slot />\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t__experimentalGroup=\"color\"\n\t\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\t/>\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t__experimentalGroup=\"typography\"\n\t\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t\t/>\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t__experimentalGroup=\"dimensions\"\n\t\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t\t/>\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t__experimentalGroup=\"border\"\n\t\t\t\t\tlabel={ __( 'Border' ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst isSelectedBlockUnregistered =\n\t\tselectedBlockName === getUnregisteredTypeHandlerName();\n\n\t/*\n\t * If the selected block is of an unregistered type, avoid showing it as an actual selection\n\t * because we want the user to focus on the unregistered block warning, not block settings.\n\t */\n\tif (\n\t\t! blockType ||\n\t\t! selectedBlockClientId ||\n\t\tisSelectedBlockUnregistered\n\t) {\n\t\tif ( showNoBlockSelectedMessage ) {\n\t\t\treturn (\n\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\treturn (\n\t\t<BlockInspectorSingleBlock\n\t\t\tclientId={ selectedBlockClientId }\n\t\t\tblockName={ blockType.name }\n\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t/>\n\t);\n};\n\nconst BlockInspectorSingleBlock = ( {\n\tclientId,\n\tblockName,\n\thasBlockStyles,\n} ) => {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\treturn (\n\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t<BlockCard { ...blockInformation } />\n\t\t\t<BlockVariationTransforms blockClientId={ clientId } />\n\t\t\t{ hasBlockStyles && (\n\t\t\t\t<div>\n\t\t\t\t\t<PanelBody title={ __( 'Styles' ) }>\n\t\t\t\t\t\t<BlockStyles\n\t\t\t\t\t\t\tscope=\"core/block-inspector\"\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ hasBlockSupport(\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\t'defaultStylePicker',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t) && <DefaultStylePicker blockName={ blockName } /> }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<InspectorControls.Slot />\n\t\t\t<InspectorControls.Slot\n\t\t\t\t__experimentalGroup=\"color\"\n\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\t__experimentalGroup=\"typography\"\n\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\t__experimentalGroup=\"dimensions\"\n\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\t__experimentalGroup=\"border\"\n\t\t\t\tlabel={ __( 'Border' ) }\n\t\t\t/>\n\t\t\t<div>\n\t\t\t\t<AdvancedControls />\n\t\t\t</div>\n\t\t\t<SkipToSelectedBlock key=\"back\" />\n\t\t</div>\n\t);\n};\n\nconst AdvancedControls = () => {\n\tconst slot = useSlot( InspectorAdvancedControls.slotName );\n\tconst hasFills = Boolean( slot.fills && slot.fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\tclassName=\"block-editor-block-inspector__advanced\"\n\t\t\ttitle={ __( 'Advanced' ) }\n\t\t\tinitialOpen={ false }\n\t\t>\n\t\t\t<InspectorControls.Slot __experimentalGroup=\"advanced\" />\n\t\t</PanelBody>\n\t);\n};\n\nexport default BlockInspector;\n"]}
|
|
@@ -92,7 +92,9 @@ function AutoBlockPreview(_ref) {
|
|
|
92
92
|
documentElement.classList.add('block-editor-block-preview__content-iframe');
|
|
93
93
|
documentElement.style.position = 'absolute';
|
|
94
94
|
documentElement.style.width = '100%';
|
|
95
|
-
bodyElement.style.padding = __experimentalPadding + 'px';
|
|
95
|
+
bodyElement.style.padding = __experimentalPadding + 'px'; // necessary for contentResizeListener to work.
|
|
96
|
+
|
|
97
|
+
bodyElement.style.position = 'relative';
|
|
96
98
|
}, []),
|
|
97
99
|
"aria-hidden": true,
|
|
98
100
|
tabIndex: -1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/block-preview/auto.js"],"names":["MemoizedBlockList","MAX_HEIGHT","AutoBlockPreview","viewportWidth","__experimentalPadding","containerResizeListener","width","containerWidth","contentResizeListener","height","contentHeight","styles","assets","select","settings","store","getSettings","__unstableResolvedAssets","editorStyles","css","__unstableType","BlockList","scale","transform","maxHeight","undefined","bodyElement","ownerDocument","documentElement","classList","add","style","position","padding","pointerEvents"],"mappings":";;;;;;;;;AAMA;;AAHA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AAdA;AACA;AACA;;AAMA;AACA;AACA;AAMA;AACA,IAAIA,iBAAJ;AAEA,MAAMC,UAAU,GAAG,IAAnB;;AAEA,SAASC,gBAAT,OAAsE;AAAA,MAA3C;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,GAA2C;AACrE,QAAM,CACLC,uBADK,EAEL;AAAEC,IAAAA,KAAK,EAAEC;AAAT,GAFK,IAGF,iCAHJ;AAIA,QAAM,CACLC,qBADK,EAEL;AAAEC,IAAAA,MAAM,EAAEC;AAAV,GAFK,IAGF,iCAHJ;AAIA,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,MAAqB,qBAAaC,MAAF,IAAc;AACnD,UAAMC,QAAQ,GAAGD,MAAM,CAAEE,YAAF,CAAN,CAAgBC,WAAhB,EAAjB;A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eAAe,CAACG,KAAhB,CAAsBzB,KAAtB,GAA8B,MAA9B;AACAoB,MAAAA,WAAW,CAACK,KAAZ,CAAkBE,OAAlB,GACC7B,qBAAqB,GAAG,IADzB;
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/components/block-preview/auto.js"],"names":["MemoizedBlockList","MAX_HEIGHT","AutoBlockPreview","viewportWidth","__experimentalPadding","containerResizeListener","width","containerWidth","contentResizeListener","height","contentHeight","styles","assets","select","settings","store","getSettings","__unstableResolvedAssets","editorStyles","css","__unstableType","BlockList","scale","transform","maxHeight","undefined","bodyElement","ownerDocument","documentElement","classList","add","style","position","padding","pointerEvents"],"mappings":";;;;;;;;;AAMA;;AAHA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AAdA;AACA;AACA;;AAMA;AACA;AACA;AAMA;AACA,IAAIA,iBAAJ;AAEA,MAAMC,UAAU,GAAG,IAAnB;;AAEA,SAASC,gBAAT,OAAsE;AAAA,MAA3C;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,GAA2C;AACrE,QAAM,CACLC,uBADK,EAEL;AAAEC,IAAAA,KAAK,EAAEC;AAAT,GAFK,IAGF,iCAHJ;AAIA,QAAM,CACLC,qBADK,EAEL;AAAEC,IAAAA,MAAM,EAAEC;AAAV,GAFK,IAGF,iCAHJ;AAIA,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,MAAqB,qBAAaC,MAAF,IAAc;AACnD,UAAMC,QAAQ,GAAGD,MAAM,CAAEE,YAAF,CAAN,CAAgBC,WAAhB,EAAjB;AACA,WAAO;AACNL,MAAAA,MAAM,EAAEG,QAAQ,CAACH,MADX;AAENC,MAAAA,MAAM,EAAEE,QAAQ,CAACG;AAFX,KAAP;AAIA,GAN0B,EAMxB,EANwB,CAA3B,CATqE,CAiBrE;;AACA,QAAMC,YAAY,GAAG,sBAAS,MAAM;AACnC,QAAKP,MAAL,EAAc;AACb,aAAO,CACN,GAAGA,MADG,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AlBD;AAmBC,IAAA,QAAQ,EAAG,CAAC,CAnBb;AAoBC,IAAA,KAAK,EAAG;AACPA,MAAAA,QAAQ,EAAE,UADH;AAEP1B,MAAAA,KAAK,EAAEH,aAFA;AAGPM,MAAAA,MAAM,EAAEC,aAHD;AAIPwB,MAAAA,aAAa,EAAE,MAJR;AAKP;AACA;AACAV,MAAAA,SAAS,EAAEvB;AAPJ;AApBT,KA8BGO,qBA9BH,EA+BC,4BAAC,iBAAD;AAAmB,IAAA,cAAc,EAAG;AAApC,IA/BD,CAXD,CAFD,CADD;AAkDA;;eAEcN,gB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Disabled } from '@wordpress/components';\nimport { useResizeObserver, pure, useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../block-list';\nimport Iframe from '../iframe';\nimport EditorStyles from '../editor-styles';\nimport { store } from '../../store';\n\n// This is used to avoid rendering the block list if the sizes change.\nlet MemoizedBlockList;\n\nconst MAX_HEIGHT = 2000;\n\nfunction AutoBlockPreview( { viewportWidth, __experimentalPadding } ) {\n\tconst [\n\t\tcontainerResizeListener,\n\t\t{ width: containerWidth },\n\t] = useResizeObserver();\n\tconst [\n\t\tcontentResizeListener,\n\t\t{ height: contentHeight },\n\t] = useResizeObserver();\n\tconst { styles, assets } = useSelect( ( select ) => {\n\t\tconst settings = select( store ).getSettings();\n\t\treturn {\n\t\t\tstyles: settings.styles,\n\t\t\tassets: settings.__unstableResolvedAssets,\n\t\t};\n\t}, [] );\n\n\t// Avoid scrollbars for pattern previews.\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'body{height:auto;overflow:hidden;}',\n\t\t\t\t\t__unstableType: 'presets',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles ] );\n\n\t// Initialize on render instead of module top level, to avoid circular dependency issues.\n\tMemoizedBlockList = MemoizedBlockList || pure( BlockList );\n\n\tconst scale = containerWidth / viewportWidth;\n\n\treturn (\n\t\t<div className=\"block-editor-block-preview__container\">\n\t\t\t{ containerResizeListener }\n\t\t\t<Disabled\n\t\t\t\tclassName=\"block-editor-block-preview__content\"\n\t\t\t\tstyle={ {\n\t\t\t\t\ttransform: `scale(${ scale })`,\n\t\t\t\t\theight: contentHeight * scale,\n\t\t\t\t\tmaxHeight:\n\t\t\t\t\t\tcontentHeight > MAX_HEIGHT\n\t\t\t\t\t\t\t? MAX_HEIGHT * scale\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<Iframe\n\t\t\t\t\thead={ <EditorStyles styles={ editorStyles } /> }\n\t\t\t\t\tassets={ assets }\n\t\t\t\t\tcontentRef={ useRefEffect( ( bodyElement ) => {\n\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\townerDocument: { documentElement },\n\t\t\t\t\t\t} = bodyElement;\n\t\t\t\t\t\tdocumentElement.classList.add(\n\t\t\t\t\t\t\t'block-editor-block-preview__content-iframe'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdocumentElement.style.position = 'absolute';\n\t\t\t\t\t\tdocumentElement.style.width = '100%';\n\t\t\t\t\t\tbodyElement.style.padding =\n\t\t\t\t\t\t\t__experimentalPadding + 'px';\n\n\t\t\t\t\t\t// necessary for contentResizeListener to work.\n\t\t\t\t\t\tbodyElement.style.position = 'relative';\n\t\t\t\t\t}, [] ) }\n\t\t\t\t\taria-hidden\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\twidth: viewportWidth,\n\t\t\t\t\t\theight: contentHeight,\n\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t// This is a catch-all max-height for patterns.\n\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/38175.\n\t\t\t\t\t\tmaxHeight: MAX_HEIGHT,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ contentResizeListener }\n\t\t\t\t\t<MemoizedBlockList renderAppender={ false } />\n\t\t\t\t</Iframe>\n\t\t\t</Disabled>\n\t\t</div>\n\t);\n}\n\nexport default AutoBlockPreview;\n"]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = ToolsPanelColorDropdown;
|
|
9
|
+
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _components = require("@wordpress/components");
|
|
17
|
+
|
|
18
|
+
var _control = _interopRequireDefault(require("./control"));
|
|
19
|
+
|
|
20
|
+
var _useMultipleOriginColorsAndGradients = _interopRequireDefault(require("./use-multiple-origin-colors-and-gradients"));
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* External dependencies
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* WordPress dependencies
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Internal dependencies
|
|
32
|
+
*/
|
|
33
|
+
function ToolsPanelColorDropdown(_ref) {
|
|
34
|
+
var _settings$gradientVal;
|
|
35
|
+
|
|
36
|
+
let {
|
|
37
|
+
settings,
|
|
38
|
+
enableAlpha,
|
|
39
|
+
...otherProps
|
|
40
|
+
} = _ref;
|
|
41
|
+
const colorGradientSettings = (0, _useMultipleOriginColorsAndGradients.default)();
|
|
42
|
+
const controlSettings = { ...colorGradientSettings,
|
|
43
|
+
clearable: false,
|
|
44
|
+
enableAlpha,
|
|
45
|
+
label: settings.label,
|
|
46
|
+
onColorChange: settings.onColorChange,
|
|
47
|
+
onGradientChange: settings.onGradientChange,
|
|
48
|
+
colorValue: settings.colorValue,
|
|
49
|
+
gradientValue: settings.gradientValue
|
|
50
|
+
};
|
|
51
|
+
const selectedColor = (_settings$gradientVal = settings.gradientValue) !== null && _settings$gradientVal !== void 0 ? _settings$gradientVal : settings.colorValue;
|
|
52
|
+
return (0, _element.createElement)(_components.__experimentalToolsPanelItem, (0, _extends2.default)({
|
|
53
|
+
hasValue: settings.hasValue,
|
|
54
|
+
label: settings.label,
|
|
55
|
+
onDeselect: settings.onDeselect,
|
|
56
|
+
isShownByDefault: settings.isShownByDefault,
|
|
57
|
+
resetAllFilter: settings.resetAllFilter
|
|
58
|
+
}, otherProps, {
|
|
59
|
+
className: "block-editor-tools-panel-color-gradient-settings__item"
|
|
60
|
+
}), (0, _element.createElement)(_components.Dropdown, {
|
|
61
|
+
className: "block-editor-tools-panel-color-dropdown",
|
|
62
|
+
contentClassName: "block-editor-panel-color-gradient-settings__dropdown-content",
|
|
63
|
+
renderToggle: _ref2 => {
|
|
64
|
+
let {
|
|
65
|
+
isOpen,
|
|
66
|
+
onToggle
|
|
67
|
+
} = _ref2;
|
|
68
|
+
return (0, _element.createElement)(_components.Button, {
|
|
69
|
+
onClick: onToggle,
|
|
70
|
+
"aria-expanded": isOpen,
|
|
71
|
+
className: (0, _classnames.default)('block-editor-panel-color-gradient-settings__dropdown', {
|
|
72
|
+
'is-open': isOpen
|
|
73
|
+
})
|
|
74
|
+
}, (0, _element.createElement)(_components.__experimentalHStack, {
|
|
75
|
+
justify: "flex-start"
|
|
76
|
+
}, (0, _element.createElement)(_components.ColorIndicator, {
|
|
77
|
+
className: "block-editor-panel-color-gradient-settings__color-indicator",
|
|
78
|
+
colorValue: selectedColor
|
|
79
|
+
}), (0, _element.createElement)(_components.FlexItem, null, settings.label)));
|
|
80
|
+
},
|
|
81
|
+
renderContent: () => (0, _element.createElement)(_control.default, (0, _extends2.default)({
|
|
82
|
+
showTitle: false,
|
|
83
|
+
__experimentalHasMultipleOrigins: true,
|
|
84
|
+
__experimentalIsRenderedInSidebar: true,
|
|
85
|
+
enableAlpha: true
|
|
86
|
+
}, controlSettings))
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=tools-panel-color-dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/components/colors-gradients/tools-panel-color-dropdown.js"],"names":["ToolsPanelColorDropdown","settings","enableAlpha","otherProps","colorGradientSettings","controlSettings","clearable","label","onColorChange","onGradientChange","colorValue","gradientValue","selectedColor","hasValue","onDeselect","isShownByDefault","resetAllFilter","isOpen","onToggle"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AAYA;;AACA;;AArBA;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;AAIe,SAASA,uBAAT,OAIX;AAAA;;AAAA,MAJ6C;AAChDC,IAAAA,QADgD;AAEhDC,IAAAA,WAFgD;AAGhD,OAAGC;AAH6C,GAI7C;AACH,QAAMC,qBAAqB,GAAG,mDAA9B;AACA,QAAMC,eAAe,GAAG,EACvB,GAAGD,qBADoB;AAEvBE,IAAAA,SAAS,EAAE,KAFY;AAGvBJ,IAAAA,WAHuB;AAIvBK,IAAAA,KAAK,EAAEN,QAAQ,CAACM,KAJO;AAKvBC,IAAAA,aAAa,EAAEP,QAAQ,CAACO,aALD;AAMvBC,IAAAA,gBAAgB,EAAER,QAAQ,CAACQ,gBANJ;AAOvBC,IAAAA,UAAU,EAAET,QAAQ,CAACS,UAPE;AAQvBC,IAAAA,aAAa,EAAEV,QAAQ,CAACU;AARD,GAAxB;AAUA,QAAMC,aAAa,4BAAGX,QAAQ,CAACU,aAAZ,yEAA6BV,QAAQ,CAACS,UAAzD;AAEA,SACC,4BAAC,wCAAD;AACC,IAAA,QAAQ,EAAGT,QAAQ,CAACY,QADrB;AAEC,IAAA,KAAK,EAAGZ,QAAQ,CAACM,KAFlB;AAGC,IAAA,UAAU,EAAGN,QAAQ,CAACa,UAHvB;AAIC,IAAA,gBAAgB,EAAGb,QAAQ,CAACc,gBAJ7B;AAKC,IAAA,cAAc,EAAGd,QAAQ,CAACe;AAL3B,KAMMb,UANN;AAOC,IAAA,SAAS,EAAC;AAPX,MASC,4BAAC,oBAAD;AACC,IAAA,SAAS,EAAC,yCADX;AAEC,IAAA,gBAAgB,EAAC,8DAFlB;AAGC,IAAA,YAAY,EAAG;AAAA,UAAE;AAAEc,QAAAA,MAAF;AAAUC,QAAAA;AAAV,OAAF;AAAA,aACd,4BAAC,kBAAD;AACC,QAAA,OAAO,EAAGA,QADX;AAEC,yBAAgBD,MAFjB;AAGC,QAAA,SAAS,EAAG,yBACX,sDADW,EAEX;AAAE,qBAAWA;AAAb,SAFW;AAHb,SAQC,4BAAC,gCAAD;AAAQ,QAAA,OAAO,EAAC;AAAhB,SACC,4BAAC,0BAAD;AACC,QAAA,SAAS,EAAC,6DADX;AAEC,QAAA,UAAU,EAAGL;AAFd,QADD,EAKC,4BAAC,oBAAD,QAAYX,QAAQ,CAACM,KAArB,CALD,CARD,CADc;AAAA,KAHhB;AAqBC,IAAA,aAAa,EAAG,MACf,4BAAC,gBAAD;AACC,MAAA,SAAS,EAAG,KADb;AAEC,MAAA,gCAAgC,MAFjC;AAGC,MAAA,iCAAiC,MAHlC;AAIC,MAAA,WAAW;AAJZ,OAKMF,eALN;AAtBF,IATD,CADD;AA2CA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tColorIndicator,\n\tDropdown,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorGradientControl from './control';\nimport useMultipleOriginColorsAndGradients from './use-multiple-origin-colors-and-gradients';\n\nexport default function ToolsPanelColorDropdown( {\n\tsettings,\n\tenableAlpha,\n\t...otherProps\n} ) {\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\tconst controlSettings = {\n\t\t...colorGradientSettings,\n\t\tclearable: false,\n\t\tenableAlpha,\n\t\tlabel: settings.label,\n\t\tonColorChange: settings.onColorChange,\n\t\tonGradientChange: settings.onGradientChange,\n\t\tcolorValue: settings.colorValue,\n\t\tgradientValue: settings.gradientValue,\n\t};\n\tconst selectedColor = settings.gradientValue ?? settings.colorValue;\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={ settings.hasValue }\n\t\t\tlabel={ settings.label }\n\t\t\tonDeselect={ settings.onDeselect }\n\t\t\tisShownByDefault={ settings.isShownByDefault }\n\t\t\tresetAllFilter={ settings.resetAllFilter }\n\t\t\t{ ...otherProps }\n\t\t\tclassName=\"block-editor-tools-panel-color-gradient-settings__item\"\n\t\t>\n\t\t\t<Dropdown\n\t\t\t\tclassName=\"block-editor-tools-panel-color-dropdown\"\n\t\t\t\tcontentClassName=\"block-editor-panel-color-gradient-settings__dropdown-content\"\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-panel-color-gradient-settings__dropdown',\n\t\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\t\tclassName=\"block-editor-panel-color-gradient-settings__color-indicator\"\n\t\t\t\t\t\t\t\tcolorValue={ selectedColor }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<FlexItem>{ settings.label }</FlexItem>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ () => (\n\t\t\t\t\t<ColorGradientControl\n\t\t\t\t\t\tshowTitle={ false }\n\t\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tenableAlpha\n\t\t\t\t\t\t{ ...controlSettings }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n"]}
|
|
@@ -9,18 +9,18 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _a11y = _interopRequireDefault(require("colord/plugins/a11y"));
|
|
13
13
|
|
|
14
14
|
var _names = _interopRequireDefault(require("colord/plugins/names"));
|
|
15
15
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _a11y2 = require("@wordpress/a11y");
|
|
16
|
+
var _colord = require("colord");
|
|
19
17
|
|
|
20
18
|
var _i18n = require("@wordpress/i18n");
|
|
21
19
|
|
|
22
20
|
var _components = require("@wordpress/components");
|
|
23
21
|
|
|
22
|
+
var _a11y2 = require("@wordpress/a11y");
|
|
23
|
+
|
|
24
24
|
/**
|
|
25
25
|
* External dependencies
|
|
26
26
|
*/
|
|
@@ -30,87 +30,98 @@ var _components = require("@wordpress/components");
|
|
|
30
30
|
*/
|
|
31
31
|
(0, _colord.extend)([_names.default, _a11y.default]);
|
|
32
32
|
|
|
33
|
-
function
|
|
34
|
-
let {
|
|
35
|
-
colordBackgroundColor,
|
|
36
|
-
colordTextColor,
|
|
37
|
-
backgroundColor,
|
|
38
|
-
textColor,
|
|
39
|
-
shouldShowTransparencyWarning
|
|
40
|
-
} = _ref;
|
|
41
|
-
let msg = '';
|
|
42
|
-
|
|
43
|
-
if (shouldShowTransparencyWarning) {
|
|
44
|
-
msg = (0, _i18n.__)('Transparent text may be hard for people to read.');
|
|
45
|
-
} else {
|
|
46
|
-
msg = colordBackgroundColor.brightness() < colordTextColor.brightness() ? (0, _i18n.__)('This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color.') : (0, _i18n.__)('This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.');
|
|
47
|
-
} // Note: The `Notice` component can speak messages via its `spokenMessage`
|
|
48
|
-
// prop, but the contrast checker requires granular control over when the
|
|
49
|
-
// announcements are made. Notably, the message will be re-announced if a
|
|
50
|
-
// new color combination is selected and the contrast is still insufficient.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
(0, _element.useEffect)(() => {
|
|
54
|
-
const speakMsg = shouldShowTransparencyWarning ? (0, _i18n.__)('Transparent text may be hard for people to read.') : (0, _i18n.__)('This color combination may be hard for people to read.');
|
|
55
|
-
(0, _a11y2.speak)(speakMsg);
|
|
56
|
-
}, [backgroundColor, textColor]);
|
|
57
|
-
return (0, _element.createElement)("div", {
|
|
58
|
-
className: "block-editor-contrast-checker"
|
|
59
|
-
}, (0, _element.createElement)(_components.Notice, {
|
|
60
|
-
spokenMessage: null,
|
|
61
|
-
status: "warning",
|
|
62
|
-
isDismissible: false
|
|
63
|
-
}, msg));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function ContrastChecker(_ref2) {
|
|
33
|
+
function ContrastChecker(_ref) {
|
|
67
34
|
let {
|
|
68
35
|
backgroundColor,
|
|
69
36
|
fallbackBackgroundColor,
|
|
70
37
|
fallbackTextColor,
|
|
38
|
+
fallbackLinkColor,
|
|
71
39
|
fontSize,
|
|
72
40
|
// font size value in pixels
|
|
73
41
|
isLargeText,
|
|
74
42
|
textColor,
|
|
43
|
+
linkColor,
|
|
75
44
|
enableAlphaChecker = false
|
|
76
|
-
} =
|
|
45
|
+
} = _ref;
|
|
46
|
+
const currentBackgroundColor = backgroundColor || fallbackBackgroundColor; // Must have a background color.
|
|
77
47
|
|
|
78
|
-
if (!
|
|
48
|
+
if (!currentBackgroundColor) {
|
|
79
49
|
return null;
|
|
80
50
|
}
|
|
81
51
|
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
|
|
52
|
+
const currentTextColor = textColor || fallbackTextColor;
|
|
53
|
+
const currentLinkColor = linkColor || fallbackLinkColor; // Must have at least one text color.
|
|
54
|
+
|
|
55
|
+
if (!currentTextColor && !currentLinkColor) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const textColors = [{
|
|
60
|
+
color: currentTextColor,
|
|
61
|
+
description: (0, _i18n.__)('text color')
|
|
62
|
+
}, {
|
|
63
|
+
color: currentLinkColor,
|
|
64
|
+
description: (0, _i18n.__)('link color')
|
|
65
|
+
}];
|
|
66
|
+
const colordBackgroundColor = (0, _colord.colord)(currentBackgroundColor);
|
|
85
67
|
const backgroundColorHasTransparency = colordBackgroundColor.alpha() < 1;
|
|
86
|
-
const
|
|
87
|
-
const
|
|
68
|
+
const backgroundColorBrightness = colordBackgroundColor.brightness();
|
|
69
|
+
const isReadableOptions = {
|
|
88
70
|
level: 'AA',
|
|
89
71
|
size: isLargeText || isLargeText !== false && fontSize >= 24 ? 'large' : 'small'
|
|
90
|
-
}
|
|
91
|
-
|
|
72
|
+
};
|
|
73
|
+
let message = '';
|
|
74
|
+
let speakMessage = '';
|
|
75
|
+
|
|
76
|
+
for (const item of textColors) {
|
|
77
|
+
// If there is no color, go no further.
|
|
78
|
+
if (!item.color) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const colordTextColor = (0, _colord.colord)(item.color);
|
|
83
|
+
const isColordTextReadable = colordTextColor.isReadable(colordBackgroundColor, isReadableOptions);
|
|
84
|
+
const textHasTransparency = colordTextColor.alpha() < 1; // If the contrast is not readable.
|
|
85
|
+
|
|
86
|
+
if (!isColordTextReadable) {
|
|
87
|
+
// Don't show the message if the background or text is transparent.
|
|
88
|
+
if (backgroundColorHasTransparency || textHasTransparency) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message = backgroundColorBrightness < colordTextColor.brightness() ? (0, _i18n.sprintf)( // translators: %s is a type of text color, e.g., "text color" or "link color"
|
|
93
|
+
(0, _i18n.__)('This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s.'), item.description) : (0, _i18n.sprintf)( // translators: %s is a type of text color, e.g., "text color" or "link color"
|
|
94
|
+
(0, _i18n.__)('This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s.'), item.description);
|
|
95
|
+
speakMessage = (0, _i18n.__)('This color combination may be hard for people to read.'); // Break from the loop when we have a contrast warning.
|
|
96
|
+
// These messages take priority over the transparency warning.
|
|
97
|
+
|
|
98
|
+
break;
|
|
99
|
+
} // If there is no contrast warning and the text is transparent,
|
|
100
|
+
// show the transparent warning if alpha check is enabled.
|
|
92
101
|
|
|
93
|
-
if (isReadable && !hasTransparency) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
102
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
isReadable && !textColorHasTransparency) {
|
|
101
|
-
return null;
|
|
103
|
+
if (textHasTransparency && enableAlphaChecker) {
|
|
104
|
+
message = (0, _i18n.__)('Transparent text may be hard for people to read.');
|
|
105
|
+
speakMessage = (0, _i18n.__)('Transparent text may be hard for people to read.');
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
108
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
if (!message) {
|
|
110
|
+
return null;
|
|
111
|
+
} // Note: The `Notice` component can speak messages via its `spokenMessage`
|
|
112
|
+
// prop, but the contrast checker requires granular control over when the
|
|
113
|
+
// announcements are made. Notably, the message will be re-announced if a
|
|
114
|
+
// new color combination is selected and the contrast is still insufficient.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
(0, _a11y2.speak)(speakMessage);
|
|
118
|
+
return (0, _element.createElement)("div", {
|
|
119
|
+
className: "block-editor-contrast-checker"
|
|
120
|
+
}, (0, _element.createElement)(_components.Notice, {
|
|
121
|
+
spokenMessage: null,
|
|
122
|
+
status: "warning",
|
|
123
|
+
isDismissible: false
|
|
124
|
+
}, message));
|
|
114
125
|
}
|
|
115
126
|
|
|
116
127
|
var _default = ContrastChecker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/contrast-checker/index.js"],"names":["namesPlugin","a11yPlugin","
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/components/contrast-checker/index.js"],"names":["namesPlugin","a11yPlugin","ContrastChecker","backgroundColor","fallbackBackgroundColor","fallbackTextColor","fallbackLinkColor","fontSize","isLargeText","textColor","linkColor","enableAlphaChecker","currentBackgroundColor","currentTextColor","currentLinkColor","textColors","color","description","colordBackgroundColor","backgroundColorHasTransparency","alpha","backgroundColorBrightness","brightness","isReadableOptions","level","size","message","speakMessage","item","colordTextColor","isColordTextReadable","isReadable","textHasTransparency"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAZA;AACA;AACA;;AAKA;AACA;AACA;AAKA,oBAAQ,CAAEA,cAAF,EAAeC,aAAf,CAAR;;AAEA,SAASC,eAAT,OAUI;AAAA,MAVsB;AACzBC,IAAAA,eADyB;AAEzBC,IAAAA,uBAFyB;AAGzBC,IAAAA,iBAHyB;AAIzBC,IAAAA,iBAJyB;AAKzBC,IAAAA,QALyB;AAKf;AACVC,IAAAA,WANyB;AAOzBC,IAAAA,SAPyB;AAQzBC,IAAAA,SARyB;AASzBC,IAAAA,kBAAkB,GAAG;AATI,GAUtB;AACH,QAAMC,sBAAsB,GAAGT,eAAe,IAAIC,uBAAlD,CADG,CAGH;;AACA,MAAK,CAAEQ,sBAAP,EAAgC;AAC/B,WAAO,IAAP;AACA;;AAED,QAAMC,gBAAgB,GAAGJ,SAAS,IAAIJ,i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,yBAAyB,GAAGQ,eAAe,CAACP,UAAhB,EAA5B,GACG,oBACA;AACA,oBACC,kHADD,CAFA,EAKAM,IAAI,CAACX,WALL,CADH,GAQG,oBACA;AACA,oBACC,kHADD,CAFA,EAKAW,IAAI,CAACX,WALL,CATJ;AAgBAU,MAAAA,YAAY,GAAG,cACd,wDADc,CAAf,CArB6B,CAwB7B;AACA;;AACA;AACA,KAxC+B,CA0ChC;AACA;;;AACA,QAAKK,mBAAmB,IAAIrB,kBAA5B,EAAiD;AAChDe,MAAAA,OAAO,GAAG,cAAI,kDAAJ,CAAV;AACAC,MAAAA,YAAY,GAAG,cACd,kDADc,CAAf;AAGA;AACD;;AAED,MAAK,CAAED,OAAP,EAAiB;AAChB,WAAO,IAAP;AACA,GA7FE,CA+FH;AACA;AACA;AACA;;;AACA,oBAAOC,YAAP;AAEA,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,4BAAC,kBAAD;AACC,IAAA,aAAa,EAAG,IADjB;AAEC,IAAA,MAAM,EAAC,SAFR;AAGC,IAAA,aAAa,EAAG;AAHjB,KAKGD,OALH,CADD,CADD;AAWA;;eAEcxB,e","sourcesContent":["/**\n * External dependencies\n */\nimport a11yPlugin from 'colord/plugins/a11y';\nimport namesPlugin from 'colord/plugins/names';\nimport { colord, extend } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Notice } from '@wordpress/components';\nimport { speak } from '@wordpress/a11y';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nfunction ContrastChecker( {\n\tbackgroundColor,\n\tfallbackBackgroundColor,\n\tfallbackTextColor,\n\tfallbackLinkColor,\n\tfontSize, // font size value in pixels\n\tisLargeText,\n\ttextColor,\n\tlinkColor,\n\tenableAlphaChecker = false,\n} ) {\n\tconst currentBackgroundColor = backgroundColor || fallbackBackgroundColor;\n\n\t// Must have a background color.\n\tif ( ! currentBackgroundColor ) {\n\t\treturn null;\n\t}\n\n\tconst currentTextColor = textColor || fallbackTextColor;\n\tconst currentLinkColor = linkColor || fallbackLinkColor;\n\n\t// Must have at least one text color.\n\tif ( ! currentTextColor && ! currentLinkColor ) {\n\t\treturn null;\n\t}\n\n\tconst textColors = [\n\t\t{\n\t\t\tcolor: currentTextColor,\n\t\t\tdescription: __( 'text color' ),\n\t\t},\n\t\t{\n\t\t\tcolor: currentLinkColor,\n\t\t\tdescription: __( 'link color' ),\n\t\t},\n\t];\n\tconst colordBackgroundColor = colord( currentBackgroundColor );\n\tconst backgroundColorHasTransparency = colordBackgroundColor.alpha() < 1;\n\tconst backgroundColorBrightness = colordBackgroundColor.brightness();\n\tconst isReadableOptions = {\n\t\tlevel: 'AA',\n\t\tsize:\n\t\t\tisLargeText || ( isLargeText !== false && fontSize >= 24 )\n\t\t\t\t? 'large'\n\t\t\t\t: 'small',\n\t};\n\n\tlet message = '';\n\tlet speakMessage = '';\n\tfor ( const item of textColors ) {\n\t\t// If there is no color, go no further.\n\t\tif ( ! item.color ) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst colordTextColor = colord( item.color );\n\t\tconst isColordTextReadable = colordTextColor.isReadable(\n\t\t\tcolordBackgroundColor,\n\t\t\tisReadableOptions\n\t\t);\n\t\tconst textHasTransparency = colordTextColor.alpha() < 1;\n\n\t\t// If the contrast is not readable.\n\t\tif ( ! isColordTextReadable ) {\n\t\t\t// Don't show the message if the background or text is transparent.\n\t\t\tif ( backgroundColorHasTransparency || textHasTransparency ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmessage =\n\t\t\t\tbackgroundColorBrightness < colordTextColor.brightness()\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: %s is a type of text color, e.g., \"text color\" or \"link color\"\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\titem.description\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: %s is a type of text color, e.g., \"text color\" or \"link color\"\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\titem.description\n\t\t\t\t\t );\n\t\t\tspeakMessage = __(\n\t\t\t\t'This color combination may be hard for people to read.'\n\t\t\t);\n\t\t\t// Break from the loop when we have a contrast warning.\n\t\t\t// These messages take priority over the transparency warning.\n\t\t\tbreak;\n\t\t}\n\n\t\t// If there is no contrast warning and the text is transparent,\n\t\t// show the transparent warning if alpha check is enabled.\n\t\tif ( textHasTransparency && enableAlphaChecker ) {\n\t\t\tmessage = __( 'Transparent text may be hard for people to read.' );\n\t\t\tspeakMessage = __(\n\t\t\t\t'Transparent text may be hard for people to read.'\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( ! message ) {\n\t\treturn null;\n\t}\n\n\t// Note: The `Notice` component can speak messages via its `spokenMessage`\n\t// prop, but the contrast checker requires granular control over when the\n\t// announcements are made. Notably, the message will be re-announced if a\n\t// new color combination is selected and the contrast is still insufficient.\n\tspeak( speakMessage );\n\n\treturn (\n\t\t<div className=\"block-editor-contrast-checker\">\n\t\t\t<Notice\n\t\t\t\tspokenMessage={ null }\n\t\t\t\tstatus=\"warning\"\n\t\t\t\tisDismissible={ false }\n\t\t\t>\n\t\t\t\t{ message }\n\t\t\t</Notice>\n\t\t</div>\n\t);\n}\n\nexport default ContrastChecker;\n"]}
|
|
@@ -45,6 +45,7 @@ var _exportNames = {
|
|
|
45
45
|
__experimentalColorGradientControl: true,
|
|
46
46
|
__experimentalColorGradientSettingsDropdown: true,
|
|
47
47
|
__experimentalPanelColorGradientSettings: true,
|
|
48
|
+
__experimentalToolsPanelColorDropdown: true,
|
|
48
49
|
__experimentalImageEditor: true,
|
|
49
50
|
__experimentalImageEditingProvider: true,
|
|
50
51
|
__experimentalImageSizeControl: true,
|
|
@@ -108,7 +109,6 @@ var _exportNames = {
|
|
|
108
109
|
ObserveTyping: true,
|
|
109
110
|
__unstableUseTypingObserver: true,
|
|
110
111
|
__unstableUseMouseMoveTypingReset: true,
|
|
111
|
-
PreserveScrollInReorder: true,
|
|
112
112
|
SkipToSelectedBlock: true,
|
|
113
113
|
Typewriter: true,
|
|
114
114
|
__unstableUseTypewriter: true,
|
|
@@ -426,12 +426,6 @@ Object.defineProperty(exports, "PlainText", {
|
|
|
426
426
|
return _plainText.default;
|
|
427
427
|
}
|
|
428
428
|
});
|
|
429
|
-
Object.defineProperty(exports, "PreserveScrollInReorder", {
|
|
430
|
-
enumerable: true,
|
|
431
|
-
get: function () {
|
|
432
|
-
return _preserveScrollInReorder.default;
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
429
|
Object.defineProperty(exports, "RichText", {
|
|
436
430
|
enumerable: true,
|
|
437
431
|
get: function () {
|
|
@@ -678,6 +672,12 @@ Object.defineProperty(exports, "__experimentalTextTransformControl", {
|
|
|
678
672
|
return _textTransformControl.default;
|
|
679
673
|
}
|
|
680
674
|
});
|
|
675
|
+
Object.defineProperty(exports, "__experimentalToolsPanelColorDropdown", {
|
|
676
|
+
enumerable: true,
|
|
677
|
+
get: function () {
|
|
678
|
+
return _toolsPanelColorDropdown.default;
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
681
|
Object.defineProperty(exports, "__experimentalUnitControl", {
|
|
682
682
|
enumerable: true,
|
|
683
683
|
get: function () {
|
|
@@ -907,6 +907,8 @@ var _dropdown2 = _interopRequireDefault(require("./colors-gradients/dropdown"));
|
|
|
907
907
|
|
|
908
908
|
var _panelColorGradientSettings = _interopRequireDefault(require("./colors-gradients/panel-color-gradient-settings"));
|
|
909
909
|
|
|
910
|
+
var _toolsPanelColorDropdown = _interopRequireDefault(require("./colors-gradients/tools-panel-color-dropdown"));
|
|
911
|
+
|
|
910
912
|
var _imageEditor = _interopRequireWildcard(require("./image-editor"));
|
|
911
913
|
|
|
912
914
|
var _imageSizeControl = _interopRequireDefault(require("./image-size-control"));
|
|
@@ -1009,8 +1011,6 @@ var _navigableToolbar = _interopRequireDefault(require("./navigable-toolbar"));
|
|
|
1009
1011
|
|
|
1010
1012
|
var _observeTyping = _interopRequireWildcard(require("./observe-typing"));
|
|
1011
1013
|
|
|
1012
|
-
var _preserveScrollInReorder = _interopRequireDefault(require("./preserve-scroll-in-reorder"));
|
|
1013
|
-
|
|
1014
1014
|
var _skipToSelectedBlock = _interopRequireDefault(require("./skip-to-selected-block"));
|
|
1015
1015
|
|
|
1016
1016
|
var _typewriter = _interopRequireWildcard(require("./typewriter"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/components/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AAIA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/components/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA","sourcesContent":["/*\n * Block Creation Components\n */\n\nexport * from './colors';\nexport * from './gradients';\nexport * from './font-sizes';\nexport { AlignmentControl, AlignmentToolbar } from './alignment-control';\nexport { default as Autocomplete } from './autocomplete';\nexport {\n\tBlockAlignmentControl,\n\tBlockAlignmentToolbar,\n} from './block-alignment-control';\nexport { default as __experimentalBlockFullHeightAligmentControl } from './block-full-height-alignment-control';\nexport { default as __experimentalBlockAlignmentMatrixControl } from './block-alignment-matrix-control';\nexport { default as BlockBreadcrumb } from './block-breadcrumb';\nexport { default as __experimentalBlockContentOverlay } from './block-content-overlay';\nexport { BlockContextProvider } from './block-context';\nexport {\n\tdefault as BlockControls,\n\tBlockFormatControls,\n} from './block-controls';\nexport { default as BlockColorsStyleSelector } from './color-style-selector';\nexport { default as BlockEdit, useBlockEditContext } from './block-edit';\nexport { default as BlockIcon } from './block-icon';\nexport { default as BlockNavigationDropdown } from './block-navigation/dropdown';\nexport { default as BlockStyles } from './block-styles';\nexport { default as __experimentalBlockVariationPicker } from './block-variation-picker';\nexport { default as __experimentalBlockPatternSetup } from './block-pattern-setup';\nexport { default as __experimentalBlockVariationTransforms } from './block-variation-transforms';\nexport {\n\tBlockVerticalAlignmentToolbar,\n\tBlockVerticalAlignmentControl,\n} from './block-vertical-alignment-control';\nexport { default as __experimentalBorderRadiusControl } from './border-radius-control';\nexport { default as __experimentalBorderStyleControl } from './border-style-control';\nexport {\n\t// This is a typo, but kept here for back-compat.\n\tButtonBlockerAppender,\n\tdefault as ButtonBlockAppender,\n} from './button-block-appender';\nexport { default as ColorPalette } from './color-palette';\nexport { default as ColorPaletteControl } from './color-palette/control';\nexport { default as ContrastChecker } from './contrast-checker';\nexport { default as __experimentalDuotoneControl } from './duotone-control';\nexport { default as __experimentalFontAppearanceControl } from './font-appearance-control';\nexport { default as __experimentalFontFamilyControl } from './font-family';\nexport { default as __experimentalLetterSpacingControl } from './letter-spacing-control';\nexport { default as __experimentalTextDecorationControl } from './text-decoration-control';\nexport { default as __experimentalTextTransformControl } from './text-transform-control';\nexport { default as __experimentalColorGradientControl } from './colors-gradients/control';\nexport { default as __experimentalColorGradientSettingsDropdown } from './colors-gradients/dropdown';\nexport { default as __experimentalPanelColorGradientSettings } from './colors-gradients/panel-color-gradient-settings';\nexport { default as __experimentalToolsPanelColorDropdown } from './colors-gradients/tools-panel-color-dropdown';\nexport {\n\tdefault as __experimentalImageEditor,\n\tImageEditingProvider as __experimentalImageEditingProvider,\n} from './image-editor';\nexport { default as __experimentalImageSizeControl } from './image-size-control';\nexport { default as InnerBlocks, useInnerBlocksProps } from './inner-blocks';\nexport {\n\tdefault as InspectorControls,\n\tInspectorAdvancedControls,\n} from './inspector-controls';\nexport {\n\tJustifyToolbar,\n\tJustifyContentControl,\n} from './justify-content-control';\nexport { default as __experimentalLinkControl } from './link-control';\nexport { default as __experimentalLinkControlSearchInput } from './link-control/search-input';\nexport { default as __experimentalLinkControlSearchResults } from './link-control/search-results';\nexport { default as __experimentalLinkControlSearchItem } from './link-control/search-item';\nexport { default as LineHeightControl } from './line-height-control';\nexport { default as __experimentalListView } from './list-view';\nexport { default as MediaReplaceFlow } from './media-replace-flow';\nexport { default as MediaPlaceholder } from './media-placeholder';\nexport { default as MediaUpload } from './media-upload';\nexport { default as MediaUploadCheck } from './media-upload/check';\nexport { default as PanelColorSettings } from './panel-color-settings';\nexport { default as PlainText } from './plain-text';\nexport { default as __experimentalResponsiveBlockControl } from './responsive-block-control';\nexport {\n\tdefault as RichText,\n\tRichTextShortcut,\n\tRichTextToolbarButton,\n\t__unstableRichTextInputEvent,\n} from './rich-text';\nexport { default as ToolSelector } from './tool-selector';\nexport { default as __experimentalUnitControl } from './unit-control';\nexport { default as URLInput } from './url-input';\nexport { default as URLInputButton } from './url-input/button';\nexport { default as URLPopover } from './url-popover';\nexport { __experimentalImageURLInputUI } from './url-popover/image-url-input-ui';\nexport { default as withColorContext } from './color-palette/with-color-context';\n\n/*\n * Content Related Components\n */\n\nexport { default as __unstableBlockSettingsMenuFirstItem } from './block-settings-menu/block-settings-menu-first-item';\nexport { default as __unstableInserterMenuExtension } from './inserter-menu-extension';\nexport { default as __experimentalPreviewOptions } from './preview-options';\nexport { default as __experimentalUseResizeCanvas } from './use-resize-canvas';\nexport { default as BlockInspector } from './block-inspector';\nexport { default as BlockList } from './block-list';\nexport { useBlockProps } from './block-list/use-block-props';\nexport { LayoutStyle as __experimentalLayoutStyle } from './block-list/layout';\nexport { default as BlockMover } from './block-mover';\nexport {\n\tdefault as BlockPreview,\n\tuseBlockPreview as __experimentalUseBlockPreview,\n} from './block-preview';\nexport {\n\tdefault as BlockSelectionClearer,\n\tuseBlockSelectionClearer as __unstableUseBlockSelectionClearer,\n} from './block-selection-clearer';\nexport { default as BlockSettingsMenu } from './block-settings-menu';\nexport { default as BlockSettingsMenuControls } from './block-settings-menu-controls';\nexport { default as BlockTitle } from './block-title';\nexport { default as BlockToolbar } from './block-toolbar';\nexport { default as BlockTools } from './block-tools';\nexport {\n\tdefault as CopyHandler,\n\tuseClipboardHandler as __unstableUseClipboardHandler,\n} from './copy-handler';\nexport { default as DefaultBlockAppender } from './default-block-appender';\nexport { default as __unstableEditorStyles } from './editor-styles';\nexport { default as Inserter } from './inserter';\nexport { default as __experimentalLibrary } from './inserter/library';\nexport { default as BlockEditorKeyboardShortcuts } from './keyboard-shortcuts';\nexport { MultiSelectScrollIntoView } from './selection-scroll-into-view';\nexport { default as NavigableToolbar } from './navigable-toolbar';\nexport {\n\tdefault as ObserveTyping,\n\tuseTypingObserver as __unstableUseTypingObserver,\n\tuseMouseMoveTypingReset as __unstableUseMouseMoveTypingReset,\n} from './observe-typing';\nexport { default as SkipToSelectedBlock } from './skip-to-selected-block';\nexport {\n\tdefault as Typewriter,\n\tuseTypewriter as __unstableUseTypewriter,\n} from './typewriter';\nexport { default as Warning } from './warning';\nexport { default as WritingFlow } from './writing-flow';\nexport { default as useBlockDisplayInformation } from './use-block-display-information';\nexport { default as __unstableIframe } from './iframe';\nexport { default as __experimentalUseNoRecursiveRenders } from './use-no-recursive-renders';\n\n/*\n * State Related Components\n */\n\nexport { default as BlockEditorProvider } from './provider';\nexport { default as useSetting } from './use-setting';\n"]}
|