@wordpress/block-directory 5.57.0 → 6.0.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/downloadable-block-list-item/index.jsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Spinner, Composite } from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { VisuallyHidden, Tooltip } from '@wordpress/ui';\nimport BlockRatings from '../block-ratings';\nimport DownloadableBlockIcon from '../downloadable-block-icon';\nimport DownloadableBlockNotice from '../downloadable-block-notice';\nimport { store as blockDirectoryStore } from '../../store';\n\n// Return the appropriate block item label, given the block data and status.\nfunction getDownloadableBlockLabel(\n\t{ title, rating, ratingCount },\n\t{ hasNotice, isInstalled, isInstalling }\n) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tif ( ! isInstalled && hasNotice ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Retry installing %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\tif ( isInstalled ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Add %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\tif ( isInstalling ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Installing %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\t// No ratings yet, just use the title.\n\tif ( ratingCount < 1 ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Install %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\treturn sprintf(\n\t\t/* translators: 1: block title, 2: average rating, 3: total ratings count. */\n\t\t_n(\n\t\t\t'Install %1$s. %2$s stars with %3$s review.',\n\t\t\t'Install %1$s. %2$s stars with %3$s reviews.',\n\t\t\tratingCount\n\t\t),\n\t\tdecodeEntities( title ),\n\t\tstars,\n\t\tratingCount\n\t);\n}\n\nfunction DownloadableBlockListItem( { item, onClick } ) {\n\tconst { author, description, icon, rating, title } = item;\n\t// getBlockType returns a block object if this block exists, or null if not.\n\tconst isInstalled = !! getBlockType( item.name );\n\n\tconst { hasNotice, isInstalling, isInstallable } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getErrorNoticeForBlock, isInstalling: isBlockInstalling } =\n\t\t\t\tselect( blockDirectoryStore );\n\t\t\tconst notice = getErrorNoticeForBlock( item.id );\n\t\t\tconst hasFatal = notice && notice.isFatal;\n\t\t\treturn {\n\t\t\t\thasNotice: !! notice,\n\t\t\t\tisInstalling: isBlockInstalling( item.id ),\n\t\t\t\tisInstallable: ! hasFatal,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\n\tlet statusText = '';\n\tif ( isInstalled ) {\n\t\tstatusText = __( 'Installed!' );\n\t} else if ( isInstalling ) {\n\t\tstatusText = __( 'Installing…' );\n\t}\n\n\tconst itemLabel = getDownloadableBlockLabel( item, {\n\t\thasNotice,\n\t\tisInstalled,\n\t\tisInstalling,\n\t} );\n\n\treturn (\n\t\t<Tooltip.Root>\n\t\t\t<Tooltip.Trigger\n\t\t\t\trender={\n\t\t\t\t\t<Composite.Item\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'block-directory-downloadable-block-list-item',\n\t\t\t\t\t\t\tisInstalling && 'is-installing'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tdisabled={ isInstalling || ! isInstallable }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-label={ itemLabel }\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-directory-downloadable-block-list-item__icon\">\n\t\t\t\t\t\t\t<DownloadableBlockIcon\n\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isInstalling ? (\n\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__spinner\">\n\t\t\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<BlockRatings rating={ rating } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__details\">\n\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__title\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: 1: block title. 2: author name. */\n\t\t\t\t\t\t\t\t\t\t__( '%1$s <span>by %2$s</span>' ),\n\t\t\t\t\t\t\t\t\t\tdecodeEntities( title ),\n\t\t\t\t\t\t\t\t\t\tauthor\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tspan: (\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__author\" />\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ hasNotice ? (\n\t\t\t\t\t\t\t\t<DownloadableBlockNotice block={ item } />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__desc\">\n\t\t\t\t\t\t\t\t\t\t{ !! statusText\n\t\t\t\t\t\t\t\t\t\t\t? statusText\n\t\t\t\t\t\t\t\t\t\t\t: decodeEntities( description ) }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isInstallable &&\n\t\t\t\t\t\t\t\t\t\t! ( isInstalled || isInstalling ) && (\n\t\t\t\t\t\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Install block' ) }\n\t\t\t\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Composite.Item>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<Tooltip.Popup>{ itemLabel }</Tooltip.Popup>\n\t\t</Tooltip.Root>\n\t);\n}\n\nexport default DownloadableBlockListItem;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAgC;AAChC,wBAAmC;AACnC,qBAAyC;AACzC,2BAA+B;AAC/B,oBAA6B;AAC7B,kBAA0B;AAC1B,gBAAwC;AACxC,2BAAyB;AACzB,qCAAkC;AAClC,uCAAoC;AACpC,mBAA6C;AA2GvC;AAxGN,SAAS,0BACR,EAAE,OAAO,QAAQ,YAAY,GAC7B,EAAE,WAAW,aAAa,aAAa,GACtC;AACD,QAAM,QAAQ,KAAK,MAAO,SAAS,GAAI,IAAI;AAE3C,MAAK,CAAE,eAAe,WAAY;AACjC,eAAO;AAAA;AAAA,UAEN,gBAAI,sBAAuB;AAAA,UAC3B,qCAAgB,KAAM;AAAA,IACvB;AAAA,EACD;AAEA,MAAK,aAAc;AAClB,eAAO;AAAA;AAAA,UAEN,gBAAI,SAAU;AAAA,UACd,qCAAg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AAU;AAAA,UAAV;AAAA,YACA,eAAY,YAAAC;AAAA,cACX;AAAA,cACA,gBAAgB;AAAA,YACjB;AAAA,YACA,wBAAsB;AAAA,YACtB,UAAW,gBAAgB,CAAE;AAAA,YAC7B,SAAU,CAAE,UAAW;AACtB,oBAAM,eAAe;AACrB,sBAAQ;AAAA,YACT;AAAA,YACA,cAAa;AAAA,YACb,MAAK;AAAA,YACL,MAAK;AAAA,YAEL;AAAA,2DAAC,SAAI,WAAU,sDACd;AAAA;AAAA,kBAAC,+BAAAC;AAAA,kBAAA;AAAA,oBACA;AAAA,oBACA;AAAA;AAAA,gBACD;AAAA,gBACE,eACD,4CAAC,UAAK,WAAU,yDACf,sDAAC,6BAAQ,GACV,IAEA,4CAAC,qBAAAC,SAAA,EAAa,QAAkB;AAAA,iBAElC;AAAA,cACA,6CAAC,UAAK,WAAU,yDACf;AAAA,4DAAC,UAAK,WAAU,uDACb;AAAA,sBACD;AAAA;AAAA,wBAEC,gBAAI,2BAA4B;AAAA,wBAChC,qCAAgB,KAAM;AAAA,oBACtB;AAAA,kBACD;AAAA,kBACA;AAAA,oBACC,MACC,4CAAC,UAAK,WAAU,wDAAuD;AAAA,kBAEzE;AAAA,gBACD,GACD;AAAA,gBACE,YACD,4CAAC,iCAAAC,SAAA,EAAwB,OAAQ,MAAO,IAExC,4EACC;AAAA,8DAAC,UAAK,WAAU,sDACb,WAAC,CAAE,aACF,iBACA,qCAAgB,WAAY,GAChC;AAAA,kBACE,iBACD,EAAI,eAAe,iBAClB,4CAAC,4BACE,8BAAI,eAAgB,GACvB;AAAA,mBAEH;AAAA,iBAEF;AAAA;AAAA;AAAA,QACD;AAAA;AAAA,IAEF;AAAA,IACA,4CAAC,kBAAQ,OAAR,EAAgB,qBAAW;AAAA,KAC7B;AAEF;AAEA,IAAO,uCAAQ;",
6
- "names": ["blockDirectoryStore", "clsx", "DownloadableBlockIcon", "BlockRatings", "DownloadableBlockNotice"]
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Spinner as WCSpinner, Composite } from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { VisuallyHidden, Tooltip } from '@wordpress/ui';\nimport BlockRatings from '../block-ratings';\nimport DownloadableBlockIcon from '../downloadable-block-icon';\nimport DownloadableBlockNotice from '../downloadable-block-notice';\nimport { store as blockDirectoryStore } from '../../store';\n\n// Return the appropriate block item label, given the block data and status.\nfunction getDownloadableBlockLabel(\n\t{ title, rating, ratingCount },\n\t{ hasNotice, isInstalled, isInstalling }\n) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tif ( ! isInstalled && hasNotice ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Retry installing %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\tif ( isInstalled ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Add %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\tif ( isInstalling ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Installing %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\t// No ratings yet, just use the title.\n\tif ( ratingCount < 1 ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Install %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\treturn sprintf(\n\t\t/* translators: 1: block title, 2: average rating, 3: total ratings count. */\n\t\t_n(\n\t\t\t'Install %1$s. %2$s stars with %3$s review.',\n\t\t\t'Install %1$s. %2$s stars with %3$s reviews.',\n\t\t\tratingCount\n\t\t),\n\t\tdecodeEntities( title ),\n\t\tstars,\n\t\tratingCount\n\t);\n}\n\nfunction DownloadableBlockListItem( { item, onClick } ) {\n\tconst { author, description, icon, rating, title } = item;\n\t// getBlockType returns a block object if this block exists, or null if not.\n\tconst isInstalled = !! getBlockType( item.name );\n\n\tconst { hasNotice, isInstalling, isInstallable } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getErrorNoticeForBlock, isInstalling: isBlockInstalling } =\n\t\t\t\tselect( blockDirectoryStore );\n\t\t\tconst notice = getErrorNoticeForBlock( item.id );\n\t\t\tconst hasFatal = notice && notice.isFatal;\n\t\t\treturn {\n\t\t\t\thasNotice: !! notice,\n\t\t\t\tisInstalling: isBlockInstalling( item.id ),\n\t\t\t\tisInstallable: ! hasFatal,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\n\tlet statusText = '';\n\tif ( isInstalled ) {\n\t\tstatusText = __( 'Installed!' );\n\t} else if ( isInstalling ) {\n\t\tstatusText = __( 'Installing…' );\n\t}\n\n\tconst itemLabel = getDownloadableBlockLabel( item, {\n\t\thasNotice,\n\t\tisInstalled,\n\t\tisInstalling,\n\t} );\n\n\treturn (\n\t\t<Tooltip.Root>\n\t\t\t<Tooltip.Trigger\n\t\t\t\trender={\n\t\t\t\t\t<Composite.Item\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'block-directory-downloadable-block-list-item',\n\t\t\t\t\t\t\tisInstalling && 'is-installing'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tdisabled={ isInstalling || ! isInstallable }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-label={ itemLabel }\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-directory-downloadable-block-list-item__icon\">\n\t\t\t\t\t\t\t<DownloadableBlockIcon\n\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isInstalling ? (\n\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__spinner\">\n\t\t\t\t\t\t\t\t\t<WCSpinner />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<BlockRatings rating={ rating } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__details\">\n\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__title\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: 1: block title. 2: author name. */\n\t\t\t\t\t\t\t\t\t\t__( '%1$s <span>by %2$s</span>' ),\n\t\t\t\t\t\t\t\t\t\tdecodeEntities( title ),\n\t\t\t\t\t\t\t\t\t\tauthor\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tspan: (\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__author\" />\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ hasNotice ? (\n\t\t\t\t\t\t\t\t<DownloadableBlockNotice block={ item } />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__desc\">\n\t\t\t\t\t\t\t\t\t\t{ !! statusText\n\t\t\t\t\t\t\t\t\t\t\t? statusText\n\t\t\t\t\t\t\t\t\t\t\t: decodeEntities( description ) }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isInstallable &&\n\t\t\t\t\t\t\t\t\t\t! ( isInstalled || isInstalling ) && (\n\t\t\t\t\t\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Install block' ) }\n\t\t\t\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Composite.Item>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<Tooltip.Popup>{ itemLabel }</Tooltip.Popup>\n\t\t</Tooltip.Root>\n\t);\n}\n\nexport default DownloadableBlockListItem;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAgC;AAChC,wBAAgD;AAChD,qBAAyC;AACzC,2BAA+B;AAC/B,oBAA6B;AAC7B,kBAA0B;AAC1B,gBAAwC;AACxC,2BAAyB;AACzB,qCAAkC;AAClC,uCAAoC;AACpC,mBAA6C;AA2GvC;AAxGN,SAAS,0BACR,EAAE,OAAO,QAAQ,YAAY,GAC7B,EAAE,WAAW,aAAa,aAAa,GACtC;AACD,QAAM,QAAQ,KAAK,MAAO,SAAS,GAAI,IAAI;AAE3C,MAAK,CAAE,eAAe,WAAY;AACjC,eAAO;AAAA;AAAA,UAEN,gBAAI,sBAAuB;AAAA,UAC3B,qCAAgB,KAAM;AAAA,IACvB;AAAA,EACD;AAEA,MAAK,aAAc;AAClB,eAAO;AAAA;AAAA,UAEN,gBAAI,SAAU;AAAA,UACd,qCAAgB,KAAM;AAAA,IACvB;AAAA,EACD;AAEA,MAAK,cAAe;AACnB,eAAO;AAAA;AAAA,UAEN,gBAAI,gBAAiB;AAAA,UACrB,qCAAgB,KAAM;AAAA,IACvB;AAAA,EACD;AAGA,MAAK,cAAc,GAAI;AACtB,eAAO;AAAA;AAAA,UAEN,gBAAI,aAAc;AAA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,YACA,cAAa;AAAA,YACb,MAAK;AAAA,YACL,MAAK;AAAA,YAEL;AAAA,2DAAC,SAAI,WAAU,sDACd;AAAA;AAAA,kBAAC,+BAAAC;AAAA,kBAAA;AAAA,oBACA;AAAA,oBACA;AAAA;AAAA,gBACD;AAAA,gBACE,eACD,4CAAC,UAAK,WAAU,yDACf,sDAAC,kBAAAC,SAAA,EAAU,GACZ,IAEA,4CAAC,qBAAAC,SAAA,EAAa,QAAkB;AAAA,iBAElC;AAAA,cACA,6CAAC,UAAK,WAAU,yDACf;AAAA,4DAAC,UAAK,WAAU,uDACb;AAAA,sBACD;AAAA;AAAA,wBAEC,gBAAI,2BAA4B;AAAA,wBAChC,qCAAgB,KAAM;AAAA,oBACtB;AAAA,kBACD;AAAA,kBACA;AAAA,oBACC,MACC,4CAAC,UAAK,WAAU,wDAAuD;AAAA,kBAEzE;AAAA,gBACD,GACD;AAAA,gBACE,YACD,4CAAC,iCAAAC,SAAA,EAAwB,OAAQ,MAAO,IAExC,4EACC;AAAA,8DAAC,UAAK,WAAU,sDACb,WAAC,CAAE,aACF,iBACA,qCAAgB,WAAY,GAChC;AAAA,kBACE,iBACD,EAAI,eAAe,iBAClB,4CAAC,4BACE,8BAAI,eAAgB,GACvB;AAAA,mBAEH;AAAA,iBAEF;AAAA;AAAA;AAAA,QACD;AAAA;AAAA,IAEF;AAAA,IACA,4CAAC,kBAAQ,OAAR,EAAgB,qBAAW;AAAA,KAC7B;AAEF;AAEA,IAAO,uCAAQ;",
6
+ "names": ["blockDirectoryStore", "clsx", "DownloadableBlockIcon", "WCSpinner", "BlockRatings", "DownloadableBlockNotice"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/downloadable-blocks-panel/index.jsx"],
4
- "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { Spinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\nimport DownloadableBlocksList from '../downloadable-blocks-list';\nimport DownloadableBlocksInserterPanel from './inserter-panel';\nimport DownloadableBlocksNoResults from './no-results';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst EMPTY_ARRAY = [];\n\nconst useDownloadableBlocks = ( filterValue ) =>\n\tuseSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetDownloadableBlocks,\n\t\t\t\tisRequestingDownloadableBlocks,\n\t\t\t\tgetInstalledBlockTypes,\n\t\t\t} = select( blockDirectoryStore );\n\n\t\t\tconst hasPermission = select( coreStore ).canUser(\n\t\t\t\t'read',\n\t\t\t\t'block-directory/search'\n\t\t\t);\n\n\t\t\tlet downloadableBlocks = EMPTY_ARRAY;\n\t\t\tif ( hasPermission ) {\n\t\t\t\tdownloadableBlocks = getDownloadableBlocks( filterValue );\n\n\t\t\t\t// Filter out blocks that are already installed.\n\t\t\t\tconst installedBlockTypes = getInstalledBlockTypes();\n\t\t\t\tconst installableBlocks = downloadableBlocks.filter(\n\t\t\t\t\t( { name } ) => {\n\t\t\t\t\t\t// Check if the block has just been installed, in which case it\n\t\t\t\t\t\t// should still show in the list to avoid suddenly disappearing.\n\t\t\t\t\t\t// `installedBlockTypes` only returns blocks stored in state\n\t\t\t\t\t\t// immediately after installation, not all installed blocks.\n\t\t\t\t\t\tconst isJustInstalled = installedBlockTypes.some(\n\t\t\t\t\t\t\t( blockType ) => blockType.name === name\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst isPreviouslyInstalled = getBlockType( name );\n\t\t\t\t\t\treturn isJustInstalled || ! isPreviouslyInstalled;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Keep identity of the `downloadableBlocks` array if nothing was filtered out\n\t\t\t\tif ( installableBlocks.length !== downloadableBlocks.length ) {\n\t\t\t\t\tdownloadableBlocks = installableBlocks;\n\t\t\t\t}\n\n\t\t\t\t// Return identical empty array when there are no blocks\n\t\t\t\tif ( downloadableBlocks.length === 0 ) {\n\t\t\t\t\tdownloadableBlocks = EMPTY_ARRAY;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\thasPermission,\n\t\t\t\tdownloadableBlocks,\n\t\t\t\tisLoading: isRequestingDownloadableBlocks( filterValue ),\n\t\t\t};\n\t\t},\n\t\t[ filterValue ]\n\t);\n\nexport default function DownloadableBlocksPanel( {\n\tonSelect,\n\tonHover,\n\thasLocalBlocks,\n\tisTyping,\n\tfilterValue,\n} ) {\n\tconst { hasPermission, downloadableBlocks, isLoading } =\n\t\tuseDownloadableBlocks( filterValue );\n\n\tif ( hasPermission === undefined || isLoading || isTyping ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ hasPermission && ! hasLocalBlocks && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'No results available from your installed blocks.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel has-blocks-loading\">\n\t\t\t\t\t<Spinner />\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( false === hasPermission ) {\n\t\tif ( ! hasLocalBlocks ) {\n\t\t\treturn <DownloadableBlocksNoResults />;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( downloadableBlocks.length === 0 ) {\n\t\treturn hasLocalBlocks ? null : <DownloadableBlocksNoResults />;\n\t}\n\n\treturn (\n\t\t<DownloadableBlocksInserterPanel\n\t\t\tdownloadableItems={ downloadableBlocks }\n\t\t\thasLocalBlocks={ hasLocalBlocks }\n\t\t>\n\t\t\t<DownloadableBlocksList\n\t\t\t\titems={ downloadableBlocks }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tonH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AU,IACpD,sBAAuB,WAAY;AAEpC,MAAK,kBAAkB,UAAa,aAAa,UAAW;AAC3D,WACC,4EACG;AAAA,uBAAiB,CAAE,kBACpB,4EACC;AAAA,oDAAC,OAAE,WAAU,uDACV;AAAA,UACD;AAAA,QACD,GACD;AAAA,QACA,4CAAC,SAAI,WAAU,mDAAkD;AAAA,SAClE;AAAA,MAED,4CAAC,SAAI,WAAU,gEACd,sDAAC,6BAAQ,GACV;AAAA,OACD;AAAA,EAEF;AAEA,MAAK,UAAU,eAAgB;AAC9B,QAAK,CAAE,gBAAiB;AACvB,aAAO,4CAAC,kBAAAC,SAAA,EAA4B;AAAA,IACrC;AAEA,WAAO;AAAA,EACR;AAEA,MAAK,mBAAmB,WAAW,GAAI;AACtC,WAAO,iBAAiB,OAAO,4CAAC,kBAAAA,SAAA,EAA4B;AAAA,EAC7D;AAEA,SACC;AAAA,IAAC,sBAAAC;AAAA,IAAA;AAAA,MACA,mBAAoB;AAAA,MACpB;AAAA,MAEA;AAAA,QAAC,gCAAAC;AAAA,QAAA;AAAA,UACA,OAAQ;AAAA,UACR;AAAA,UACA;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
6
- "names": ["blockDirectoryStore", "coreStore", "DownloadableBlocksNoResults", "DownloadableBlocksInserterPanel", "DownloadableBlocksList"]
4
+ "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { Spinner as WCSpinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\nimport DownloadableBlocksList from '../downloadable-blocks-list';\nimport DownloadableBlocksInserterPanel from './inserter-panel';\nimport DownloadableBlocksNoResults from './no-results';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst EMPTY_ARRAY = [];\n\nconst useDownloadableBlocks = ( filterValue ) =>\n\tuseSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetDownloadableBlocks,\n\t\t\t\tisRequestingDownloadableBlocks,\n\t\t\t\tgetInstalledBlockTypes,\n\t\t\t} = select( blockDirectoryStore );\n\n\t\t\tconst hasPermission = select( coreStore ).canUser(\n\t\t\t\t'read',\n\t\t\t\t'block-directory/search'\n\t\t\t);\n\n\t\t\tlet downloadableBlocks = EMPTY_ARRAY;\n\t\t\tif ( hasPermission ) {\n\t\t\t\tdownloadableBlocks = getDownloadableBlocks( filterValue );\n\n\t\t\t\t// Filter out blocks that are already installed.\n\t\t\t\tconst installedBlockTypes = getInstalledBlockTypes();\n\t\t\t\tconst installableBlocks = downloadableBlocks.filter(\n\t\t\t\t\t( { name } ) => {\n\t\t\t\t\t\t// Check if the block has just been installed, in which case it\n\t\t\t\t\t\t// should still show in the list to avoid suddenly disappearing.\n\t\t\t\t\t\t// `installedBlockTypes` only returns blocks stored in state\n\t\t\t\t\t\t// immediately after installation, not all installed blocks.\n\t\t\t\t\t\tconst isJustInstalled = installedBlockTypes.some(\n\t\t\t\t\t\t\t( blockType ) => blockType.name === name\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst isPreviouslyInstalled = getBlockType( name );\n\t\t\t\t\t\treturn isJustInstalled || ! isPreviouslyInstalled;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Keep identity of the `downloadableBlocks` array if nothing was filtered out\n\t\t\t\tif ( installableBlocks.length !== downloadableBlocks.length ) {\n\t\t\t\t\tdownloadableBlocks = installableBlocks;\n\t\t\t\t}\n\n\t\t\t\t// Return identical empty array when there are no blocks\n\t\t\t\tif ( downloadableBlocks.length === 0 ) {\n\t\t\t\t\tdownloadableBlocks = EMPTY_ARRAY;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\thasPermission,\n\t\t\t\tdownloadableBlocks,\n\t\t\t\tisLoading: isRequestingDownloadableBlocks( filterValue ),\n\t\t\t};\n\t\t},\n\t\t[ filterValue ]\n\t);\n\nexport default function DownloadableBlocksPanel( {\n\tonSelect,\n\tonHover,\n\thasLocalBlocks,\n\tisTyping,\n\tfilterValue,\n} ) {\n\tconst { hasPermission, downloadableBlocks, isLoading } =\n\t\tuseDownloadableBlocks( filterValue );\n\n\tif ( hasPermission === undefined || isLoading || isTyping ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ hasPermission && ! hasLocalBlocks && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'No results available from your installed blocks.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel has-blocks-loading\">\n\t\t\t\t\t<WCSpinner />\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( false === hasPermission ) {\n\t\tif ( ! hasLocalBlocks ) {\n\t\t\treturn <DownloadableBlocksNoResults />;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( downloadableBlocks.length === 0 ) {\n\t\treturn hasLocalBlocks ? null : <DownloadableBlocksNoResults />;\n\t}\n\n\treturn (\n\t\t<DownloadableBlocksInserterPanel\n\t\t\tdownloadableItems={ downloadableBlocks }\n\t\t\thasLocalBlocks={ hasLocalBlocks }\n\t\t>\n\t\t\t<DownloadableBlocksList\n\t\t\t\titems={ downloadableBlocks }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tonHover={ onHover }\n\t\t\t/>\n\t\t</DownloadableBlocksInserterPanel>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,wBAAqC;AACrC,uBAAmC;AACnC,kBAA0B;AAC1B,oBAA6B;AAC7B,sCAAmC;AACnC,4BAA4C;AAC5C,wBAAwC;AACxC,mBAA6C;AAw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AAA,EAAU,GACZ;AAAA,OACD;AAAA,EAEF;AAEA,MAAK,UAAU,eAAgB;AAC9B,QAAK,CAAE,gBAAiB;AACvB,aAAO,4CAAC,kBAAAC,SAAA,EAA4B;AAAA,IACrC;AAEA,WAAO;AAAA,EACR;AAEA,MAAK,mBAAmB,WAAW,GAAI;AACtC,WAAO,iBAAiB,OAAO,4CAAC,kBAAAA,SAAA,EAA4B;AAAA,EAC7D;AAEA,SACC;AAAA,IAAC,sBAAAC;AAAA,IAAA;AAAA,MACA,mBAAoB;AAAA,MACpB;AAAA,MAEA;AAAA,QAAC,gCAAAC;AAAA,QAAA;AAAA,UACA,OAAQ;AAAA,UACR;AAAA,UACA;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
6
+ "names": ["blockDirectoryStore", "coreStore", "WCSpinner", "DownloadableBlocksNoResults", "DownloadableBlocksInserterPanel", "DownloadableBlocksList"]
7
7
  }
@@ -23,18 +23,25 @@ __export(no_results_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(no_results_exports);
25
25
  var import_i18n = require("@wordpress/i18n");
26
- var import_components = require("@wordpress/components");
26
+ var import_icons = require("@wordpress/icons");
27
+ var import_ui = require("@wordpress/ui");
27
28
  var import_jsx_runtime = require("react/jsx-runtime");
28
29
  function DownloadableBlocksNoResults() {
29
30
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
30
31
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-editor-inserter__no-results", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: (0, import_i18n.__)("No results found.") }) }),
31
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-editor-inserter__tips", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.Tip, { children: [
32
- (0, import_i18n.__)("Interested in creating your own block?"),
33
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
34
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.ExternalLink, { href: "https://developer.wordpress.org/block-editor/", children: [
35
- (0, import_i18n.__)("Get started here"),
36
- "."
37
- ] })
32
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-editor-inserter__tips", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Notice.Root, { intent: "info", icon: import_icons.tip, children: [
33
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Notice.Description, { children: (0, import_i18n.__)("Interested in creating your own block?") }),
34
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Notice.Actions, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
35
+ import_ui.Notice.ActionLink,
36
+ {
37
+ href: "https://developer.wordpress.org/block-editor/",
38
+ openInNewTab: true,
39
+ children: [
40
+ (0, import_i18n.__)("Get started here"),
41
+ "."
42
+ ]
43
+ }
44
+ ) })
38
45
  ] }) })
39
46
  ] });
40
47
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/downloadable-blocks-panel/no-results.jsx"],
4
- "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { Tip, ExternalLink } from '@wordpress/components';\n\nfunction DownloadableBlocksNoResults() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t<Tip>\n\t\t\t\t\t{ __( 'Interested in creating your own block?' ) }\n\t\t\t\t\t<br />\n\t\t\t\t\t<ExternalLink href=\"https://developer.wordpress.org/block-editor/\">\n\t\t\t\t\t\t{ __( 'Get started here' ) }.\n\t\t\t\t\t</ExternalLink>\n\t\t\t\t</Tip>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksNoResults;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,wBAAkC;AAIhC;AAFF,SAAS,8BAA8B;AACtC,SACC,4EACC;AAAA,gDAAC,SAAI,WAAU,qCACd,sDAAC,OAAI,8BAAI,mBAAoB,GAAG,GACjC;AAAA,IACA,4CAAC,SAAI,WAAU,+BACd,uDAAC,yBACE;AAAA,0BAAI,wCAAyC;AAAA,MAC/C,4CAAC,QAAG;AAAA,MACJ,6CAAC,kCAAa,MAAK,iDAChB;AAAA,4BAAI,kBAAmB;AAAA,QAAG;AAAA,SAC7B;AAAA,OACD,GACD;AAAA,KACD;AAEF;AAEA,IAAO,qBAAQ;",
4
+ "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { tip } from '@wordpress/icons';\nimport { Notice } from '@wordpress/ui';\n\nfunction DownloadableBlocksNoResults() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t<Notice.Root intent=\"info\" icon={ tip }>\n\t\t\t\t\t<Notice.Description>\n\t\t\t\t\t\t{ __( 'Interested in creating your own block?' ) }\n\t\t\t\t\t</Notice.Description>\n\t\t\t\t\t<Notice.Actions>\n\t\t\t\t\t\t<Notice.ActionLink\n\t\t\t\t\t\t\thref=\"https://developer.wordpress.org/block-editor/\"\n\t\t\t\t\t\t\topenInNewTab\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Get started here' ) }.\n\t\t\t\t\t\t</Notice.ActionLink>\n\t\t\t\t\t</Notice.Actions>\n\t\t\t\t</Notice.Root>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksNoResults;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,mBAAoB;AACpB,gBAAuB;AAIrB;AAFF,SAAS,8BAA8B;AACtC,SACC,4EACC;AAAA,gDAAC,SAAI,WAAU,qCACd,sDAAC,OAAI,8BAAI,mBAAoB,GAAG,GACjC;AAAA,IACA,4CAAC,SAAI,WAAU,+BACd,uDAAC,iBAAO,MAAP,EAAY,QAAO,QAAO,MAAO,kBACjC;AAAA,kDAAC,iBAAO,aAAP,EACE,8BAAI,wCAAyC,GAChD;AAAA,MACA,4CAAC,iBAAO,SAAP,EACA;AAAA,QAAC,iBAAO;AAAA,QAAP;AAAA,UACA,MAAK;AAAA,UACL,cAAY;AAAA,UAEV;AAAA,gCAAI,kBAAmB;AAAA,YAAG;AAAA;AAAA;AAAA,MAC7B,GACD;AAAA,OACD,GACD;AAAA,KACD;AAEF;AAEA,IAAO,qBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  // packages/block-directory/src/components/downloadable-block-list-item/index.jsx
2
2
  import clsx from "clsx";
3
3
  import { __, _n, sprintf } from "@wordpress/i18n";
4
- import { Spinner, Composite } from "@wordpress/components";
4
+ import { Spinner as WCSpinner, Composite } from "@wordpress/components";
5
5
  import { createInterpolateElement } from "@wordpress/element";
6
6
  import { decodeEntities } from "@wordpress/html-entities";
7
7
  import { getBlockType } from "@wordpress/blocks";
@@ -110,7 +110,7 @@ function DownloadableBlockListItem({ item, onClick }) {
110
110
  title
111
111
  }
112
112
  ),
113
- isInstalling ? /* @__PURE__ */ jsx("span", { className: "block-directory-downloadable-block-list-item__spinner", children: /* @__PURE__ */ jsx(Spinner, {}) }) : /* @__PURE__ */ jsx(BlockRatings, { rating })
113
+ isInstalling ? /* @__PURE__ */ jsx("span", { className: "block-directory-downloadable-block-list-item__spinner", children: /* @__PURE__ */ jsx(WCSpinner, {}) }) : /* @__PURE__ */ jsx(BlockRatings, { rating })
114
114
  ] }),
115
115
  /* @__PURE__ */ jsxs("span", { className: "block-directory-downloadable-block-list-item__details", children: [
116
116
  /* @__PURE__ */ jsx("span", { className: "block-directory-downloadable-block-list-item__title", children: createInterpolateElement(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/downloadable-block-list-item/index.jsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Spinner, Composite } from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { VisuallyHidden, Tooltip } from '@wordpress/ui';\nimport BlockRatings from '../block-ratings';\nimport DownloadableBlockIcon from '../downloadable-block-icon';\nimport DownloadableBlockNotice from '../downloadable-block-notice';\nimport { store as blockDirectoryStore } from '../../store';\n\n// Return the appropriate block item label, given the block data and status.\nfunction getDownloadableBlockLabel(\n\t{ title, rating, ratingCount },\n\t{ hasNotice, isInstalled, isInstalling }\n) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tif ( ! isInstalled && hasNotice ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Retry installing %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\tif ( isInstalled ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Add %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\tif ( isInstalling ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Installing %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\t// No ratings yet, just use the title.\n\tif ( ratingCount < 1 ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Install %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\treturn sprintf(\n\t\t/* translators: 1: block title, 2: average rating, 3: total ratings count. */\n\t\t_n(\n\t\t\t'Install %1$s. %2$s stars with %3$s review.',\n\t\t\t'Install %1$s. %2$s stars with %3$s reviews.',\n\t\t\tratingCount\n\t\t),\n\t\tdecodeEntities( title ),\n\t\tstars,\n\t\tratingCount\n\t);\n}\n\nfunction DownloadableBlockListItem( { item, onClick } ) {\n\tconst { author, description, icon, rating, title } = item;\n\t// getBlockType returns a block object if this block exists, or null if not.\n\tconst isInstalled = !! getBlockType( item.name );\n\n\tconst { hasNotice, isInstalling, isInstallable } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getErrorNoticeForBlock, isInstalling: isBlockInstalling } =\n\t\t\t\tselect( blockDirectoryStore );\n\t\t\tconst notice = getErrorNoticeForBlock( item.id );\n\t\t\tconst hasFatal = notice && notice.isFatal;\n\t\t\treturn {\n\t\t\t\thasNotice: !! notice,\n\t\t\t\tisInstalling: isBlockInstalling( item.id ),\n\t\t\t\tisInstallable: ! hasFatal,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\n\tlet statusText = '';\n\tif ( isInstalled ) {\n\t\tstatusText = __( 'Installed!' );\n\t} else if ( isInstalling ) {\n\t\tstatusText = __( 'Installing…' );\n\t}\n\n\tconst itemLabel = getDownloadableBlockLabel( item, {\n\t\thasNotice,\n\t\tisInstalled,\n\t\tisInstalling,\n\t} );\n\n\treturn (\n\t\t<Tooltip.Root>\n\t\t\t<Tooltip.Trigger\n\t\t\t\trender={\n\t\t\t\t\t<Composite.Item\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'block-directory-downloadable-block-list-item',\n\t\t\t\t\t\t\tisInstalling && 'is-installing'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tdisabled={ isInstalling || ! isInstallable }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-label={ itemLabel }\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-directory-downloadable-block-list-item__icon\">\n\t\t\t\t\t\t\t<DownloadableBlockIcon\n\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isInstalling ? (\n\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__spinner\">\n\t\t\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<BlockRatings rating={ rating } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__details\">\n\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__title\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: 1: block title. 2: author name. */\n\t\t\t\t\t\t\t\t\t\t__( '%1$s <span>by %2$s</span>' ),\n\t\t\t\t\t\t\t\t\t\tdecodeEntities( title ),\n\t\t\t\t\t\t\t\t\t\tauthor\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tspan: (\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__author\" />\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ hasNotice ? (\n\t\t\t\t\t\t\t\t<DownloadableBlockNotice block={ item } />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__desc\">\n\t\t\t\t\t\t\t\t\t\t{ !! statusText\n\t\t\t\t\t\t\t\t\t\t\t? statusText\n\t\t\t\t\t\t\t\t\t\t\t: decodeEntities( description ) }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isInstallable &&\n\t\t\t\t\t\t\t\t\t\t! ( isInstalled || isInstalling ) && (\n\t\t\t\t\t\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Install block' ) }\n\t\t\t\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Composite.Item>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<Tooltip.Popup>{ itemLabel }</Tooltip.Popup>\n\t\t</Tooltip.Root>\n\t);\n}\n\nexport default DownloadableBlockListItem;\n"],
5
- "mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,IAAI,IAAI,eAAe;AAChC,SAAS,SAAS,iBAAiB;AACnC,SAAS,gCAAgC;AACzC,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB,eAAe;AACxC,OAAO,kBAAkB;AACzB,OAAO,2BAA2B;AAClC,OAAO,6BAA6B;AACpC,SAAS,SAAS,2BAA2B;AA2GvC,SAgCE,UA/BD,KADD;AAxGN,SAAS,0BACR,EAAE,OAAO,QAAQ,YAAY,GAC7B,EAAE,WAAW,aAAa,aAAa,GACtC;AACD,QAAM,QAAQ,KAAK,MAAO,SAAS,GAAI,IAAI;AAE3C,MAAK,CAAE,eAAe,WAAY;AACjC,WAAO;AAAA;AAAA,MAEN,GAAI,sBAAuB;AAAA,MAC3B,eAAgB,KAAM;AAAA,IACvB;AAAA,EACD;AAEA,MAAK,aAAc;AAClB,WAAO;AAAA;AAAA,MAEN,GAAI,SAAU;AAAA,MACd,eAAgB,KAAM;AAAA,IACvB;AAAA,EACD;AAEA,MAAK,cAA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AA,YACjB;AAAA,YACA,wBAAsB;AAAA,YACtB,UAAW,gBAAgB,CAAE;AAAA,YAC7B,SAAU,CAAE,UAAW;AACtB,oBAAM,eAAe;AACrB,sBAAQ;AAAA,YACT;AAAA,YACA,cAAa;AAAA,YACb,MAAK;AAAA,YACL,MAAK;AAAA,YAEL;AAAA,mCAAC,SAAI,WAAU,sDACd;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACA;AAAA,oBACA;AAAA;AAAA,gBACD;AAAA,gBACE,eACD,oBAAC,UAAK,WAAU,yDACf,8BAAC,WAAQ,GACV,IAEA,oBAAC,gBAAa,QAAkB;AAAA,iBAElC;AAAA,cACA,qBAAC,UAAK,WAAU,yDACf;AAAA,oCAAC,UAAK,WAAU,uDACb;AAAA,kBACD;AAAA;AAAA,oBAEC,GAAI,2BAA4B;AAAA,oBAChC,eAAgB,KAAM;AAAA,oBACtB;AAAA,kBACD;AAAA,kBACA;AAAA,oBACC,MACC,oBAAC,UAAK,WAAU,wDAAuD;AAAA,kBAEzE;AAAA,gBACD,GACD;AAAA,gBACE,YACD,oBAAC,2BAAwB,OAAQ,MAAO,IAExC,iCACC;AAAA,sCAAC,UAAK,WAAU,sDACb,WAAC,CAAE,aACF,aACA,eAAgB,WAAY,GAChC;AAAA,kBACE,iBACD,EAAI,eAAe,iBAClB,oBAAC,kBACE,aAAI,eAAgB,GACvB;AAAA,mBAEH;AAAA,iBAEF;AAAA;AAAA;AAAA,QACD;AAAA;AAAA,IAEF;AAAA,IACA,oBAAC,QAAQ,OAAR,EAAgB,qBAAW;AAAA,KAC7B;AAEF;AAEA,IAAO,uCAAQ;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Spinner as WCSpinner, Composite } from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { VisuallyHidden, Tooltip } from '@wordpress/ui';\nimport BlockRatings from '../block-ratings';\nimport DownloadableBlockIcon from '../downloadable-block-icon';\nimport DownloadableBlockNotice from '../downloadable-block-notice';\nimport { store as blockDirectoryStore } from '../../store';\n\n// Return the appropriate block item label, given the block data and status.\nfunction getDownloadableBlockLabel(\n\t{ title, rating, ratingCount },\n\t{ hasNotice, isInstalled, isInstalling }\n) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tif ( ! isInstalled && hasNotice ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Retry installing %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\tif ( isInstalled ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Add %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\tif ( isInstalling ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Installing %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\t// No ratings yet, just use the title.\n\tif ( ratingCount < 1 ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: block title */\n\t\t\t__( 'Install %s.' ),\n\t\t\tdecodeEntities( title )\n\t\t);\n\t}\n\n\treturn sprintf(\n\t\t/* translators: 1: block title, 2: average rating, 3: total ratings count. */\n\t\t_n(\n\t\t\t'Install %1$s. %2$s stars with %3$s review.',\n\t\t\t'Install %1$s. %2$s stars with %3$s reviews.',\n\t\t\tratingCount\n\t\t),\n\t\tdecodeEntities( title ),\n\t\tstars,\n\t\tratingCount\n\t);\n}\n\nfunction DownloadableBlockListItem( { item, onClick } ) {\n\tconst { author, description, icon, rating, title } = item;\n\t// getBlockType returns a block object if this block exists, or null if not.\n\tconst isInstalled = !! getBlockType( item.name );\n\n\tconst { hasNotice, isInstalling, isInstallable } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getErrorNoticeForBlock, isInstalling: isBlockInstalling } =\n\t\t\t\tselect( blockDirectoryStore );\n\t\t\tconst notice = getErrorNoticeForBlock( item.id );\n\t\t\tconst hasFatal = notice && notice.isFatal;\n\t\t\treturn {\n\t\t\t\thasNotice: !! notice,\n\t\t\t\tisInstalling: isBlockInstalling( item.id ),\n\t\t\t\tisInstallable: ! hasFatal,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\n\tlet statusText = '';\n\tif ( isInstalled ) {\n\t\tstatusText = __( 'Installed!' );\n\t} else if ( isInstalling ) {\n\t\tstatusText = __( 'Installing…' );\n\t}\n\n\tconst itemLabel = getDownloadableBlockLabel( item, {\n\t\thasNotice,\n\t\tisInstalled,\n\t\tisInstalling,\n\t} );\n\n\treturn (\n\t\t<Tooltip.Root>\n\t\t\t<Tooltip.Trigger\n\t\t\t\trender={\n\t\t\t\t\t<Composite.Item\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'block-directory-downloadable-block-list-item',\n\t\t\t\t\t\t\tisInstalling && 'is-installing'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tdisabled={ isInstalling || ! isInstallable }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-label={ itemLabel }\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-directory-downloadable-block-list-item__icon\">\n\t\t\t\t\t\t\t<DownloadableBlockIcon\n\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isInstalling ? (\n\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__spinner\">\n\t\t\t\t\t\t\t\t\t<WCSpinner />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<BlockRatings rating={ rating } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__details\">\n\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__title\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: 1: block title. 2: author name. */\n\t\t\t\t\t\t\t\t\t\t__( '%1$s <span>by %2$s</span>' ),\n\t\t\t\t\t\t\t\t\t\tdecodeEntities( title ),\n\t\t\t\t\t\t\t\t\t\tauthor\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tspan: (\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__author\" />\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ hasNotice ? (\n\t\t\t\t\t\t\t\t<DownloadableBlockNotice block={ item } />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__desc\">\n\t\t\t\t\t\t\t\t\t\t{ !! statusText\n\t\t\t\t\t\t\t\t\t\t\t? statusText\n\t\t\t\t\t\t\t\t\t\t\t: decodeEntities( description ) }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isInstallable &&\n\t\t\t\t\t\t\t\t\t\t! ( isInstalled || isInstalling ) && (\n\t\t\t\t\t\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Install block' ) }\n\t\t\t\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t\t\t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,eACD,oBAAC,UAAK,WAAU,yDACf,8BAAC,aAAU,GACZ,IAEA,oBAAC,gBAAa,QAAkB;AAAA,iBAElC;AAAA,cACA,qBAAC,UAAK,WAAU,yDACf;AAAA,oCAAC,UAAK,WAAU,uDACb;AAAA,kBACD;AAAA;AAAA,oBAEC,GAAI,2BAA4B;AAAA,oBAChC,eAAgB,KAAM;AAAA,oBACtB;AAAA,kBACD;AAAA,kBACA;AAAA,oBACC,MACC,oBAAC,UAAK,WAAU,wDAAuD;AAAA,kBAEzE;AAAA,gBACD,GACD;AAAA,gBACE,YACD,oBAAC,2BAAwB,OAAQ,MAAO,IAExC,iCACC;AAAA,sCAAC,UAAK,WAAU,sDACb,WAAC,CAAE,aACF,aACA,eAAgB,WAAY,GAChC;AAAA,kBACE,iBACD,EAAI,eAAe,iBAClB,oBAAC,kBACE,aAAI,eAAgB,GACvB;AAAA,mBAEH;AAAA,iBAEF;AAAA;AAAA;AAAA,QACD;AAAA;AAAA,IAEF;AAAA,IACA,oBAAC,QAAQ,OAAR,EAAgB,qBAAW;AAAA,KAC7B;AAEF;AAEA,IAAO,uCAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  // packages/block-directory/src/components/downloadable-blocks-panel/index.jsx
2
2
  import { __ } from "@wordpress/i18n";
3
- import { Spinner } from "@wordpress/components";
3
+ import { Spinner as WCSpinner } from "@wordpress/components";
4
4
  import { store as coreStore } from "@wordpress/core-data";
5
5
  import { useSelect } from "@wordpress/data";
6
6
  import { getBlockType } from "@wordpress/blocks";
@@ -65,7 +65,7 @@ function DownloadableBlocksPanel({
65
65
  ) }),
66
66
  /* @__PURE__ */ jsx("div", { className: "block-editor-inserter__quick-inserter-separator" })
67
67
  ] }),
68
- /* @__PURE__ */ jsx("div", { className: "block-directory-downloadable-blocks-panel has-blocks-loading", children: /* @__PURE__ */ jsx(Spinner, {}) })
68
+ /* @__PURE__ */ jsx("div", { className: "block-directory-downloadable-blocks-panel has-blocks-loading", children: /* @__PURE__ */ jsx(WCSpinner, {}) })
69
69
  ] });
70
70
  }
71
71
  if (false === hasPermission) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/downloadable-blocks-panel/index.jsx"],
4
- "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { Spinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\nimport DownloadableBlocksList from '../downloadable-blocks-list';\nimport DownloadableBlocksInserterPanel from './inserter-panel';\nimport DownloadableBlocksNoResults from './no-results';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst EMPTY_ARRAY = [];\n\nconst useDownloadableBlocks = ( filterValue ) =>\n\tuseSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetDownloadableBlocks,\n\t\t\t\tisRequestingDownloadableBlocks,\n\t\t\t\tgetInstalledBlockTypes,\n\t\t\t} = select( blockDirectoryStore );\n\n\t\t\tconst hasPermission = select( coreStore ).canUser(\n\t\t\t\t'read',\n\t\t\t\t'block-directory/search'\n\t\t\t);\n\n\t\t\tlet downloadableBlocks = EMPTY_ARRAY;\n\t\t\tif ( hasPermission ) {\n\t\t\t\tdownloadableBlocks = getDownloadableBlocks( filterValue );\n\n\t\t\t\t// Filter out blocks that are already installed.\n\t\t\t\tconst installedBlockTypes = getInstalledBlockTypes();\n\t\t\t\tconst installableBlocks = downloadableBlocks.filter(\n\t\t\t\t\t( { name } ) => {\n\t\t\t\t\t\t// Check if the block has just been installed, in which case it\n\t\t\t\t\t\t// should still show in the list to avoid suddenly disappearing.\n\t\t\t\t\t\t// `installedBlockTypes` only returns blocks stored in state\n\t\t\t\t\t\t// immediately after installation, not all installed blocks.\n\t\t\t\t\t\tconst isJustInstalled = installedBlockTypes.some(\n\t\t\t\t\t\t\t( blockType ) => blockType.name === name\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst isPreviouslyInstalled = getBlockType( name );\n\t\t\t\t\t\treturn isJustInstalled || ! isPreviouslyInstalled;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Keep identity of the `downloadableBlocks` array if nothing was filtered out\n\t\t\t\tif ( installableBlocks.length !== downloadableBlocks.length ) {\n\t\t\t\t\tdownloadableBlocks = installableBlocks;\n\t\t\t\t}\n\n\t\t\t\t// Return identical empty array when there are no blocks\n\t\t\t\tif ( downloadableBlocks.length === 0 ) {\n\t\t\t\t\tdownloadableBlocks = EMPTY_ARRAY;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\thasPermission,\n\t\t\t\tdownloadableBlocks,\n\t\t\t\tisLoading: isRequestingDownloadableBlocks( filterValue ),\n\t\t\t};\n\t\t},\n\t\t[ filterValue ]\n\t);\n\nexport default function DownloadableBlocksPanel( {\n\tonSelect,\n\tonHover,\n\thasLocalBlocks,\n\tisTyping,\n\tfilterValue,\n} ) {\n\tconst { hasPermission, downloadableBlocks, isLoading } =\n\t\tuseDownloadableBlocks( filterValue );\n\n\tif ( hasPermission === undefined || isLoading || isTyping ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ hasPermission && ! hasLocalBlocks && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'No results available from your installed blocks.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel has-blocks-loading\">\n\t\t\t\t\t<Spinner />\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( false === hasPermission ) {\n\t\tif ( ! hasLocalBlocks ) {\n\t\t\treturn <DownloadableBlocksNoResults />;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( downloadableBlocks.length === 0 ) {\n\t\treturn hasLocalBlocks ? null : <DownloadableBlocksNoResults />;\n\t}\n\n\treturn (\n\t\t<DownloadableBlocksInserterPanel\n\t\t\tdownloadableItems={ downloadableBlocks }\n\t\t\thasLocalBlocks={ hasLocalBlocks }\n\t\t>\n\t\t\t<DownloadableBlocksList\n\t\t\t\titems={ downloadableBlocks }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tonHover={ onHover }\n\t\t\t/>\n\t\t</DownloadableBlocksInserterPanel>\n\t);\n}\n"],
5
- "mappings": ";AAAA,SAAS,UAAU;AACnB,SAAS,eAAe;AACxB,SAAS,SAAS,iBAAiB;AACnC,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,OAAO,4BAA4B;AACnC,OAAO,qCAAqC;AAC5C,OAAO,iCAAiC;AACxC,SAAS,SAAS,2BAA2B;AAwExC,mBACC,KADD;AAtEL,IAAM,cAAc,CAAC;AAErB,IAAM,wBAAwB,CAAE,gBAC/B;AAAA,EACC,CAAE,WAAY;AACb,UAAM;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACD,IAAI,OAAQ,mBAAoB;AAEhC,UAAM,gBAAgB,OAAQ,SAAU,EAAE;AAAA,MACzC;AAAA,MACA;AAAA,IACD;AAEA,QAAI,qBAAqB;AACzB,QAAK,eAAgB;AACpB,2BAAqB,sBAAuB,WAAY;AAGxD,YAAM,sBAAsB,uBAAuB;AACnD,YAAM,oBAAoB,mBAAmB;AAAA,QAC5C,CAAE,EAAE,KAAK,MAAO;AAKf,gBAAM,kBAAkB,oBAAoB;AAAA,YAC3C,CAAE,cAAe,UAAU,SAAS;AAAA,UACrC;AACA,gBAAM,wBAAwB,aAAc,IAAK;AACjD,iBAAO,mBAAmB,CAAE;AAAA,QAC7B;AAAA,MACD;AAGA,UAAK,kBAAkB,WAAW,mBAAmB,QAAS;AAC7D,6BAAqB;AAAA,MACtB;AAGA,UAAK,mBAAmB,WAAW,GAAI;AACtC,6BAAqB;AAAA,MACtB;AAAA,IACD;AAEA,WAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,WAAW,+BAAgC,WAAY;AAAA,IACxD;AAAA,EACD;AAAA,EACA,CAAE,WAAY;AACf;AAEc,SAAR,wBAA0C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,eAAe,oBAAoB,UAAU,IACpD,sBAAuB,WAAY;AAEpC,MAAK,kBAAkB,UAAa,aAAa,UAAW;AAC3D,WACC,iCACG;AAAA,uBAAiB,CAAE,kBACpB,iCACC;AAAA,4BAAC,OAAE,WAAU,uDACV;AAAA,UACD;AAAA,QACD,GACD;AAAA,QACA,oBAAC,SAAI,WAAU,mDAAkD;AAAA,SAClE;AAAA,MAED,oBAAC,SAAI,WAAU,gEACd,8BAAC,WAAQ,GACV;AAAA,OACD;AAAA,EAEF;AAEA,MAAK,UAAU,eAAgB;AAC9B,QAAK,CAAE,gBAAiB;AACvB,aAAO,oBAAC,+BAA4B;AAAA,IACrC;AAEA,WAAO;AAAA,EACR;AAEA,MAAK,mBAAmB,WAAW,GAAI;AACtC,WAAO,iBAAiB,OAAO,oBAAC,+BAA4B;AAAA,EAC7D;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,mBAAoB;AAAA,MACpB;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACA,OAAQ;AAAA,UACR;AAAA,UACA;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
4
+ "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { Spinner as WCSpinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\nimport DownloadableBlocksList from '../downloadable-blocks-list';\nimport DownloadableBlocksInserterPanel from './inserter-panel';\nimport DownloadableBlocksNoResults from './no-results';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst EMPTY_ARRAY = [];\n\nconst useDownloadableBlocks = ( filterValue ) =>\n\tuseSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetDownloadableBlocks,\n\t\t\t\tisRequestingDownloadableBlocks,\n\t\t\t\tgetInstalledBlockTypes,\n\t\t\t} = select( blockDirectoryStore );\n\n\t\t\tconst hasPermission = select( coreStore ).canUser(\n\t\t\t\t'read',\n\t\t\t\t'block-directory/search'\n\t\t\t);\n\n\t\t\tlet downloadableBlocks = EMPTY_ARRAY;\n\t\t\tif ( hasPermission ) {\n\t\t\t\tdownloadableBlocks = getDownloadableBlocks( filterValue );\n\n\t\t\t\t// Filter out blocks that are already installed.\n\t\t\t\tconst installedBlockTypes = getInstalledBlockTypes();\n\t\t\t\tconst installableBlocks = downloadableBlocks.filter(\n\t\t\t\t\t( { name } ) => {\n\t\t\t\t\t\t// Check if the block has just been installed, in which case it\n\t\t\t\t\t\t// should still show in the list to avoid suddenly disappearing.\n\t\t\t\t\t\t// `installedBlockTypes` only returns blocks stored in state\n\t\t\t\t\t\t// immediately after installation, not all installed blocks.\n\t\t\t\t\t\tconst isJustInstalled = installedBlockTypes.some(\n\t\t\t\t\t\t\t( blockType ) => blockType.name === name\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst isPreviouslyInstalled = getBlockType( name );\n\t\t\t\t\t\treturn isJustInstalled || ! isPreviouslyInstalled;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Keep identity of the `downloadableBlocks` array if nothing was filtered out\n\t\t\t\tif ( installableBlocks.length !== downloadableBlocks.length ) {\n\t\t\t\t\tdownloadableBlocks = installableBlocks;\n\t\t\t\t}\n\n\t\t\t\t// Return identical empty array when there are no blocks\n\t\t\t\tif ( downloadableBlocks.length === 0 ) {\n\t\t\t\t\tdownloadableBlocks = EMPTY_ARRAY;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\thasPermission,\n\t\t\t\tdownloadableBlocks,\n\t\t\t\tisLoading: isRequestingDownloadableBlocks( filterValue ),\n\t\t\t};\n\t\t},\n\t\t[ filterValue ]\n\t);\n\nexport default function DownloadableBlocksPanel( {\n\tonSelect,\n\tonHover,\n\thasLocalBlocks,\n\tisTyping,\n\tfilterValue,\n} ) {\n\tconst { hasPermission, downloadableBlocks, isLoading } =\n\t\tuseDownloadableBlocks( filterValue );\n\n\tif ( hasPermission === undefined || isLoading || isTyping ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ hasPermission && ! hasLocalBlocks && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'No results available from your installed blocks.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel has-blocks-loading\">\n\t\t\t\t\t<WCSpinner />\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( false === hasPermission ) {\n\t\tif ( ! hasLocalBlocks ) {\n\t\t\treturn <DownloadableBlocksNoResults />;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( downloadableBlocks.length === 0 ) {\n\t\treturn hasLocalBlocks ? null : <DownloadableBlocksNoResults />;\n\t}\n\n\treturn (\n\t\t<DownloadableBlocksInserterPanel\n\t\t\tdownloadableItems={ downloadableBlocks }\n\t\t\thasLocalBlocks={ hasLocalBlocks }\n\t\t>\n\t\t\t<DownloadableBlocksList\n\t\t\t\titems={ downloadableBlocks }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tonHover={ onHover }\n\t\t\t/>\n\t\t</DownloadableBlocksInserterPanel>\n\t);\n}\n"],
5
+ "mappings": ";AAAA,SAAS,UAAU;AACnB,SAAS,WAAW,iBAAiB;AACrC,SAAS,SAAS,i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U,uDACV;AAAA,UACD;AAAA,QACD,GACD;AAAA,QACA,oBAAC,SAAI,WAAU,mDAAkD;AAAA,SAClE;AAAA,MAED,oBAAC,SAAI,WAAU,gEACd,8BAAC,aAAU,GACZ;AAAA,OACD;AAAA,EAEF;AAEA,MAAK,UAAU,eAAgB;AAC9B,QAAK,CAAE,gBAAiB;AACvB,aAAO,oBAAC,+BAA4B;AAAA,IACrC;AAEA,WAAO;AAAA,EACR;AAEA,MAAK,mBAAmB,WAAW,GAAI;AACtC,WAAO,iBAAiB,OAAO,oBAAC,+BAA4B;AAAA,EAC7D;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,mBAAoB;AAAA,MACpB;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACA,OAAQ;AAAA,UACR;AAAA,UACA;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,17 +1,24 @@
1
1
  // packages/block-directory/src/components/downloadable-blocks-panel/no-results.jsx
2
2
  import { __ } from "@wordpress/i18n";
3
- import { Tip, ExternalLink } from "@wordpress/components";
3
+ import { tip } from "@wordpress/icons";
4
+ import { Notice } from "@wordpress/ui";
4
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
6
  function DownloadableBlocksNoResults() {
6
7
  return /* @__PURE__ */ jsxs(Fragment, { children: [
7
8
  /* @__PURE__ */ jsx("div", { className: "block-editor-inserter__no-results", children: /* @__PURE__ */ jsx("p", { children: __("No results found.") }) }),
8
- /* @__PURE__ */ jsx("div", { className: "block-editor-inserter__tips", children: /* @__PURE__ */ jsxs(Tip, { children: [
9
- __("Interested in creating your own block?"),
10
- /* @__PURE__ */ jsx("br", {}),
11
- /* @__PURE__ */ jsxs(ExternalLink, { href: "https://developer.wordpress.org/block-editor/", children: [
12
- __("Get started here"),
13
- "."
14
- ] })
9
+ /* @__PURE__ */ jsx("div", { className: "block-editor-inserter__tips", children: /* @__PURE__ */ jsxs(Notice.Root, { intent: "info", icon: tip, children: [
10
+ /* @__PURE__ */ jsx(Notice.Description, { children: __("Interested in creating your own block?") }),
11
+ /* @__PURE__ */ jsx(Notice.Actions, { children: /* @__PURE__ */ jsxs(
12
+ Notice.ActionLink,
13
+ {
14
+ href: "https://developer.wordpress.org/block-editor/",
15
+ openInNewTab: true,
16
+ children: [
17
+ __("Get started here"),
18
+ "."
19
+ ]
20
+ }
21
+ ) })
15
22
  ] }) })
16
23
  ] });
17
24
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/downloadable-blocks-panel/no-results.jsx"],
4
- "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { Tip, ExternalLink } from '@wordpress/components';\n\nfunction DownloadableBlocksNoResults() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t<Tip>\n\t\t\t\t\t{ __( 'Interested in creating your own block?' ) }\n\t\t\t\t\t<br />\n\t\t\t\t\t<ExternalLink href=\"https://developer.wordpress.org/block-editor/\">\n\t\t\t\t\t\t{ __( 'Get started here' ) }.\n\t\t\t\t\t</ExternalLink>\n\t\t\t\t</Tip>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksNoResults;\n"],
5
- "mappings": ";AAAA,SAAS,UAAU;AACnB,SAAS,KAAK,oBAAoB;AAIhC,mBAEE,KAMC,YARH;AAFF,SAAS,8BAA8B;AACtC,SACC,iCACC;AAAA,wBAAC,SAAI,WAAU,qCACd,8BAAC,OAAI,aAAI,mBAAoB,GAAG,GACjC;AAAA,IACA,oBAAC,SAAI,WAAU,+BACd,+BAAC,OACE;AAAA,SAAI,wCAAyC;AAAA,MAC/C,oBAAC,QAAG;AAAA,MACJ,qBAAC,gBAAa,MAAK,iDAChB;AAAA,WAAI,kBAAmB;AAAA,QAAG;AAAA,SAC7B;AAAA,OACD,GACD;AAAA,KACD;AAEF;AAEA,IAAO,qBAAQ;",
4
+ "sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { tip } from '@wordpress/icons';\nimport { Notice } from '@wordpress/ui';\n\nfunction DownloadableBlocksNoResults() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t<Notice.Root intent=\"info\" icon={ tip }>\n\t\t\t\t\t<Notice.Description>\n\t\t\t\t\t\t{ __( 'Interested in creating your own block?' ) }\n\t\t\t\t\t</Notice.Description>\n\t\t\t\t\t<Notice.Actions>\n\t\t\t\t\t\t<Notice.ActionLink\n\t\t\t\t\t\t\thref=\"https://developer.wordpress.org/block-editor/\"\n\t\t\t\t\t\t\topenInNewTab\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Get started here' ) }.\n\t\t\t\t\t\t</Notice.ActionLink>\n\t\t\t\t\t</Notice.Actions>\n\t\t\t\t</Notice.Root>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksNoResults;\n"],
5
+ "mappings": ";AAAA,SAAS,UAAU;AACnB,SAAS,WAAW;AACpB,SAAS,cAAc;AAIrB,mBAEE,KAQE,YAVJ;AAFF,SAAS,8BAA8B;AACtC,SACC,iCACC;AAAA,wBAAC,SAAI,WAAU,qCACd,8BAAC,OAAI,aAAI,mBAAoB,GAAG,GACjC;AAAA,IACA,oBAAC,SAAI,WAAU,+BACd,+BAAC,OAAO,MAAP,EAAY,QAAO,QAAO,MAAO,KACjC;AAAA,0BAAC,OAAO,aAAP,EACE,aAAI,wCAAyC,GAChD;AAAA,MACA,oBAAC,OAAO,SAAP,EACA;AAAA,QAAC,OAAO;AAAA,QAAP;AAAA,UACA,MAAK;AAAA,UACL,cAAY;AAAA,UAEV;AAAA,eAAI,kBAAmB;AAAA,YAAG;AAAA;AAAA;AAAA,MAC7B,GACD;AAAA,OACD,GACD;AAAA,KACD;AAEF;AAEA,IAAO,qBAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-directory",
3
- "version": "5.57.0",
3
+ "version": "6.0.0",
4
4
  "description": "Extend editor with block directory features to search, download and install blocks.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -19,15 +19,14 @@
19
19
  "url": "https://github.com/WordPress/gutenberg/issues"
20
20
  },
21
21
  "engines": {
22
- "node": ">=18.12.0"
22
+ "node": ">=22.13.0"
23
23
  },
24
24
  "files": [
25
25
  "src",
26
26
  "build",
27
27
  "build-module",
28
28
  "build-style",
29
- "build-types",
30
- "*.md"
29
+ "build-types"
31
30
  ],
32
31
  "main": "build/index.cjs",
33
32
  "module": "build-module/index.mjs",
@@ -40,33 +39,33 @@
40
39
  },
41
40
  "wpScript": true,
42
41
  "dependencies": {
43
- "@wordpress/a11y": "^4.57.0",
44
- "@wordpress/api-fetch": "^7.57.0",
45
- "@wordpress/base-styles": "^13.3.0",
46
- "@wordpress/block-editor": "^18.1.0",
47
- "@wordpress/blocks": "^16.2.0",
48
- "@wordpress/components": "^42.0.0",
49
- "@wordpress/compose": "^8.10.0",
50
- "@wordpress/core-data": "^8.2.0",
51
- "@wordpress/data": "^10.57.0",
52
- "@wordpress/editor": "^15.2.0",
53
- "@wordpress/element": "^9.0.0",
54
- "@wordpress/hooks": "^4.57.0",
55
- "@wordpress/html-entities": "^4.57.0",
56
- "@wordpress/i18n": "^6.30.0",
57
- "@wordpress/icons": "^18.0.0",
58
- "@wordpress/notices": "^5.57.0",
59
- "@wordpress/plugins": "^7.57.0",
60
- "@wordpress/private-apis": "^2.0.0",
61
- "@wordpress/ui": "^0.24.0",
62
- "@wordpress/url": "^4.57.0",
42
+ "@wordpress/a11y": "^5.0.0",
43
+ "@wordpress/api-fetch": "^8.0.0",
44
+ "@wordpress/base-styles": "^14.0.0",
45
+ "@wordpress/block-editor": "^19.0.0",
46
+ "@wordpress/blocks": "^17.0.0",
47
+ "@wordpress/components": "^43.0.0",
48
+ "@wordpress/compose": "^9.0.0",
49
+ "@wordpress/core-data": "^9.0.0",
50
+ "@wordpress/data": "^11.0.0",
51
+ "@wordpress/editor": "^16.0.0",
52
+ "@wordpress/element": "^10.0.0",
53
+ "@wordpress/hooks": "^5.0.0",
54
+ "@wordpress/html-entities": "^5.0.0",
55
+ "@wordpress/i18n": "^7.0.0",
56
+ "@wordpress/icons": "^19.0.0",
57
+ "@wordpress/notices": "^6.0.0",
58
+ "@wordpress/plugins": "^8.0.0",
59
+ "@wordpress/private-apis": "^3.0.0",
60
+ "@wordpress/ui": "^0.25.0",
61
+ "@wordpress/url": "^5.0.0",
63
62
  "change-case": "^4.1.2",
64
63
  "clsx": "^2.1.1"
65
64
  },
66
65
  "devDependencies": {
67
66
  "@testing-library/dom": "^10.4.2",
68
67
  "@testing-library/react": "^16.3.3",
69
- "@testing-library/user-event": "^14.6.1",
68
+ "@testing-library/user-event": "^14.6.8",
70
69
  "deep-freeze": "^0.0.1",
71
70
  "vitest": "^5.0.3"
72
71
  },
@@ -77,5 +76,5 @@
77
76
  "publishConfig": {
78
77
  "access": "public"
79
78
  },
80
- "gitHead": "12441e2520c78b2254a792a8cba40c34110be060"
79
+ "gitHead": "8d30f92cbbde3ddf781c8799443c649befbbcb88"
81
80
  }
@@ -1,6 +1,6 @@
1
1
  import clsx from 'clsx';
2
2
  import { __, _n, sprintf } from '@wordpress/i18n';
3
- import { Spinner, Composite } from '@wordpress/components';
3
+ import { Spinner as WCSpinner, Composite } from '@wordpress/components';
4
4
  import { createInterpolateElement } from '@wordpress/element';
5
5
  import { decodeEntities } from '@wordpress/html-entities';
6
6
  import { getBlockType } from '@wordpress/blocks';
@@ -123,7 +123,7 @@ function DownloadableBlockListItem( { item, onClick } ) {
123
123
  />
124
124
  { isInstalling ? (
125
125
  <span className="block-directory-downloadable-block-list-item__spinner">
126
- <Spinner />
126
+ <WCSpinner />
127
127
  </span>
128
128
  ) : (
129
129
  <BlockRatings rating={ rating } />
@@ -1,5 +1,5 @@
1
1
  import { __ } from '@wordpress/i18n';
2
- import { Spinner } from '@wordpress/components';
2
+ import { Spinner as WCSpinner } from '@wordpress/components';
3
3
  import { store as coreStore } from '@wordpress/core-data';
4
4
  import { useSelect } from '@wordpress/data';
5
5
  import { getBlockType } from '@wordpress/blocks';
@@ -88,7 +88,7 @@ export default function DownloadableBlocksPanel( {
88
88
  </>
89
89
  ) }
90
90
  <div className="block-directory-downloadable-blocks-panel has-blocks-loading">
91
- <Spinner />
91
+ <WCSpinner />
92
92
  </div>
93
93
  </>
94
94
  );
@@ -1,5 +1,6 @@
1
1
  import { __ } from '@wordpress/i18n';
2
- import { Tip, ExternalLink } from '@wordpress/components';
2
+ import { tip } from '@wordpress/icons';
3
+ import { Notice } from '@wordpress/ui';
3
4
 
4
5
  function DownloadableBlocksNoResults() {
5
6
  return (
@@ -8,13 +9,19 @@ function DownloadableBlocksNoResults() {
8
9
  <p>{ __( 'No results found.' ) }</p>
9
10
  </div>
10
11
  <div className="block-editor-inserter__tips">
11
- <Tip>
12
- { __( 'Interested in creating your own block?' ) }
13
- <br />
14
- <ExternalLink href="https://developer.wordpress.org/block-editor/">
15
- { __( 'Get started here' ) }.
16
- </ExternalLink>
17
- </Tip>
12
+ <Notice.Root intent="info" icon={ tip }>
13
+ <Notice.Description>
14
+ { __( 'Interested in creating your own block?' ) }
15
+ </Notice.Description>
16
+ <Notice.Actions>
17
+ <Notice.ActionLink
18
+ href="https://developer.wordpress.org/block-editor/"
19
+ openInNewTab
20
+ >
21
+ { __( 'Get started here' ) }.
22
+ </Notice.ActionLink>
23
+ </Notice.Actions>
24
+ </Notice.Root>
18
25
  </div>
19
26
  </>
20
27
  );
package/CHANGELOG.md DELETED
@@ -1,295 +0,0 @@
1
- <!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. -->
2
-
3
- ## Unreleased
4
-
5
- ## 5.57.0 (2026-10-07)
6
-
7
- ## 5.56.0 (2026-09-23)
8
-
9
- ## 5.55.0 (2026-09-10)
10
-
11
- ### Bug Fixes
12
-
13
- - `BlockRatings`: Preserve full, half, and empty star colors after the icons became stroke-based. ([#78808](https://github.com/WordPress/gutenberg/pull/78808))
14
-
15
- ### Internal
16
-
17
- - Use the `.jsx` extension for JavaScript source files that contain JSX ([#80990](https://github.com/WordPress/gutenberg/pull/80990)).
18
-
19
- ## 5.54.0 (2026-08-26)
20
-
21
- ## 5.53.0 (2026-08-12)
22
-
23
- ### Bug Fixes
24
-
25
- - Wrap the downloadable block item labels in `__()` so they can be translated ([#81237](https://github.com/WordPress/gutenberg/pull/81237)).
26
-
27
- ## 5.52.0 (2026-07-29)
28
-
29
- ## 5.51.0 (2026-07-14)
30
-
31
- ### Enhancements
32
-
33
- - Use the emphasis font-weight token for UI emphasis ([#80093](https://github.com/WordPress/gutenberg/pull/80093)).
34
- - Widen React peer dependency ranges to `^18 || ^19` to support both React 18 and React 19 environments ([#80024](https://github.com/WordPress/gutenberg/pull/80024)).
35
-
36
- ## 5.50.0 (2026-07-01)
37
-
38
- ## 5.49.0 (2026-06-24)
39
-
40
- ## 5.48.1 (2026-06-16)
41
-
42
- ## 5.48.0 (2026-06-10)
43
-
44
- ## 5.47.0 (2026-05-27)
45
-
46
- ## 5.46.0 (2026-05-14)
47
-
48
- ## 5.45.0 (2026-04-29)
49
-
50
- ## 5.44.0 (2026-04-15)
51
-
52
- ### Enhancements
53
-
54
- - Use `--wpds-cursor-control` for interactive cursor styling and replace all instances ([#77330](https://github.com/WordPress/gutenberg/pull/77330)).
55
-
56
- ## 5.43.0 (2026-04-01)
57
-
58
- ## 5.42.0 (2026-03-18)
59
-
60
- ## 5.41.0 (2026-03-04)
61
-
62
- ## 5.40.0 (2026-02-18)
63
-
64
- ## 5.39.0 (2026-01-29)
65
-
66
- ## 5.38.0 (2026-01-16)
67
-
68
- ## 5.36.0 (2025-11-26)
69
-
70
- ## 5.35.0 (2025-11-12)
71
-
72
- ## 5.34.0 (2025-10-29)
73
-
74
- ## 5.33.0 (2025-10-17)
75
-
76
- ## 5.32.0 (2025-10-01)
77
-
78
- ## 5.31.0 (2025-09-17)
79
-
80
- ## 5.30.0 (2025-09-03)
81
-
82
- ## 5.29.0 (2025-08-20)
83
-
84
- ## 5.28.0 (2025-08-07)
85
-
86
- ## 5.27.0 (2025-07-23)
87
-
88
- ## 5.26.0 (2025-06-25)
89
-
90
- ## 5.25.0 (2025-06-04)
91
-
92
- ## 5.24.0 (2025-05-22)
93
-
94
- ## 5.23.0 (2025-05-07)
95
-
96
- ## 5.22.0 (2025-04-11)
97
-
98
- ## 5.21.0 (2025-03-27)
99
-
100
- ## 5.20.0 (2025-03-13)
101
-
102
- ## 5.19.0 (2025-02-28)
103
-
104
- ## 5.18.0 (2025-02-12)
105
-
106
- ## 5.17.0 (2025-01-29)
107
-
108
- ## 5.16.0 (2025-01-15)
109
-
110
- ## 5.15.0 (2025-01-02)
111
-
112
- ## 5.14.0 (2024-12-11)
113
-
114
- ## 5.13.0 (2024-11-27)
115
-
116
- ## 5.12.0 (2024-11-16)
117
-
118
- ## 5.11.0 (2024-10-30)
119
-
120
- ## 5.10.0 (2024-10-16)
121
-
122
- ## 5.9.0 (2024-10-03)
123
-
124
- ## 5.8.0 (2024-09-19)
125
-
126
- ## 5.7.0 (2024-09-05)
127
-
128
- ## 5.6.0 (2024-08-21)
129
-
130
- ## 5.5.0 (2024-08-07)
131
-
132
- ## 5.4.0 (2024-07-24)
133
-
134
- ## 5.3.0 (2024-07-10)
135
-
136
- ## 5.2.0 (2024-06-26)
137
-
138
- ## 5.1.0 (2024-06-15)
139
-
140
- ## 5.0.0 (2024-05-31)
141
-
142
- ### Breaking Changes
143
-
144
- - Increase the minimum required Node.js version to v18.12.0 matching long-term support releases ([#31270](https://github.com/WordPress/gutenberg/pull/61930)). Learn more about [Node.js releases](https://nodejs.org/en/about/previous-releases).
145
-
146
- ## 4.35.0 (2024-05-16)
147
-
148
- ## 4.34.0 (2024-05-02)
149
-
150
- ## 4.33.0 (2024-04-19)
151
-
152
- ## 4.32.0 (2024-04-03)
153
-
154
- ## 4.31.0 (2024-03-21)
155
-
156
- ## 4.30.0 (2024-03-06)
157
-
158
- ## 4.29.0 (2024-02-21)
159
-
160
- ## 4.28.0 (2024-02-09)
161
-
162
- ## 4.27.0 (2024-01-24)
163
-
164
- ## 4.26.0 (2024-01-10)
165
-
166
- ## 4.25.0 (2023-12-13)
167
-
168
- ## 4.24.0 (2023-11-29)
169
-
170
- ## 4.23.0 (2023-11-16)
171
-
172
- ## 4.22.0 (2023-11-02)
173
-
174
- ## 4.21.0 (2023-10-18)
175
-
176
- ## 4.20.0 (2023-10-05)
177
-
178
- ## 4.19.0 (2023-09-20)
179
-
180
- ## 4.18.0 (2023-08-31)
181
-
182
- ## 4.17.0 (2023-08-16)
183
-
184
- ## 4.16.0 (2023-08-10)
185
-
186
- ## 4.15.0 (2023-07-20)
187
-
188
- ## 4.14.0 (2023-07-05)
189
-
190
- ## 4.13.0 (2023-06-23)
191
-
192
- ## 4.12.0 (2023-06-07)
193
-
194
- ## 4.11.0 (2023-05-24)
195
-
196
- ## 4.10.0 (2023-05-10)
197
-
198
- ## 4.9.0 (2023-04-26)
199
-
200
- ## 4.8.0 (2023-04-12)
201
-
202
- ## 4.7.0 (2023-03-29)
203
-
204
- ## 4.6.0 (2023-03-15)
205
-
206
- ## 4.5.0 (2023-03-01)
207
-
208
- ## 4.4.0 (2023-02-15)
209
-
210
- ## 4.3.0 (2023-02-01)
211
-
212
- ## 4.2.0 (2023-01-11)
213
-
214
- ## 4.1.0 (2023-01-02)
215
-
216
- ## 4.0.0 (2022-12-14)
217
-
218
- ### Breaking Changes
219
-
220
- - Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235))
221
-
222
- ## 3.20.0 (2022-11-16)
223
-
224
- ## 3.19.0 (2022-11-02)
225
-
226
- ## 3.18.0 (2022-10-19)
227
-
228
- ## 3.17.0 (2022-10-05)
229
-
230
- ## 3.16.0 (2022-09-21)
231
-
232
- ## 3.15.0 (2022-09-13)
233
-
234
- ## 3.14.0 (2022-08-24)
235
-
236
- ## 3.13.0 (2022-08-10)
237
-
238
- ## 3.12.0 (2022-07-27)
239
-
240
- ## 3.11.0 (2022-07-13)
241
-
242
- ## 3.10.0 (2022-06-29)
243
-
244
- ## 3.9.0 (2022-06-15)
245
-
246
- ## 3.8.0 (2022-06-01)
247
-
248
- ## 3.7.0 (2022-05-18)
249
-
250
- ## 3.6.0 (2022-05-04)
251
-
252
- ## 3.5.0 (2022-04-21)
253
-
254
- ## 3.4.0 (2022-04-08)
255
-
256
- ## 3.3.0 (2022-03-23)
257
-
258
- ## 3.2.0 (2022-03-11)
259
-
260
- ## 3.1.1 (2022-02-10)
261
-
262
- ### Bug Fixes
263
-
264
- - Removed unused `@wordpress/url` dependency ([#38388](https://github.com/WordPress/gutenberg/pull/38388)).
265
-
266
- ## 3.1.0 (2022-01-27)
267
-
268
- ## 3.0.0 (2021-07-29)
269
-
270
- ### Breaking Changes
271
-
272
- - Upgraded React components to work with v17.0 ([#29118](https://github.com/WordPress/gutenberg/pull/29118)). There are no new features in React v17.0 as explained in the [blog post](https://reactjs.org/blog/2020/10/20/react-v17.html).
273
-
274
- ## 2.2.0 (2021-07-21)
275
-
276
- ## 2.1.0 (2021-05-20)
277
-
278
- ## 2.0.0 (2021-05-14)
279
-
280
- ### Breaking Changes
281
-
282
- - Drop support for Internet Explorer 11 ([#31110](https://github.com/WordPress/gutenberg/pull/31110)). Learn more at https://make.wordpress.org/core/2021/04/22/ie-11-support-phase-out-plan/.
283
- - Increase the minimum Node.js version to v12 matching Long Term Support releases ([#31270](https://github.com/WordPress/gutenberg/pull/31270)). Learn more at https://nodejs.org/en/about/releases/.
284
-
285
- ## 1.19.0 (2021-03-17)
286
-
287
- ## 1.18.0 (2020-12-17)
288
-
289
- ### New Features
290
-
291
- - Added a store definition `store` for the block directory namespace to use with `@wordpress/data` API ([#26655](https://github.com/WordPress/gutenberg/pull/26655)).
292
-
293
- ## 1.0.0 (2019-09-16)
294
-
295
- - Initial release.