@wordpress/edit-widgets 6.18.0 → 6.19.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 6.19.0 (2025-02-28)
6
+
5
7
  ## 6.18.0 (2025-02-12)
6
8
 
7
9
  ## 6.17.0 (2025-01-29)
@@ -29,7 +29,9 @@ function WidgetAreas({
29
29
  const selectedWidgetArea = (0, _element.useMemo)(() => selectedWidgetAreaId && widgetAreas?.find(widgetArea => widgetArea.id === selectedWidgetAreaId), [selectedWidgetAreaId, widgetAreas]);
30
30
  let description;
31
31
  if (!selectedWidgetArea) {
32
- description = (0, _i18n.__)('Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.');
32
+ description = (0, _i18n.__)(
33
+ // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
34
+ 'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.');
33
35
  } else if (selectedWidgetAreaId === 'wp_inactive_widgets') {
34
36
  description = (0, _i18n.__)('Blocks in this Widget Area will not be displayed in your site.');
35
37
  } else {
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_element","_icons","_blockEditor","_components","_i18n","_url","_dom","_store","_jsxRuntime","WidgetAreas","selectedWidgetAreaId","widgetAreas","useSelect","select","editWidgetsStore","getWidgetAreas","selectedWidgetArea","useMemo","find","widgetArea","id","description","__","jsx","className","children","jsxs","BlockIcon","icon","blockDefault","dangerouslySetInnerHTML","__html","safeHTML","length","Button","__next40pxDefaultSize","href","addQueryArgs","return","window","location","pathname","variant"],"sources":["@wordpress/edit-widgets/src/components/sidebar/widget-areas.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'\n\t\t);\n\t} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {\n\t\tdescription = __(\n\t\t\t'Blocks in this Widget Area will not be displayed in your site.'\n\t\t);\n\t} else {\n\t\tdescription = selectedWidgetArea.description;\n\t}\n\n\treturn (\n\t\t<div className=\"edit-widgets-widget-areas\">\n\t\t\t<div className=\"edit-widgets-widget-areas__top-container\">\n\t\t\t\t<BlockIcon icon={ blockDefault } />\n\t\t\t\t<div>\n\t\t\t\t\t<p\n\t\t\t\t\t\t// Use `dangerouslySetInnerHTML` to keep backwards\n\t\t\t\t\t\t// compatibility. Basic markup in the description is an\n\t\t\t\t\t\t// established feature of WordPress.\n\t\t\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/33106\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: safeHTML( description ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ widgetAreas?.length === 0 && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Your theme does not contain any Widget Areas.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! selectedWidgetArea && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\thref={ addQueryArgs( 'customize.php', {\n\t\t\t\t\t\t\t\t'autofocus[panel]': 'widgets',\n\t\t\t\t\t\t\t\treturn: window.location.pathname,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage with live preview' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,IAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAR,OAAA;AAAwD,IAAAS,WAAA,GAAAT,OAAA;AAfxD;AACA;AACA;;AAUA;AACA;AACA;;AAGe,SAASU,WAAWA,CAAE;EAAEC;AAAqB,CAAC,EAAG;EAC/D,MAAMC,WAAW,GAAG,IAAAC,eAAS,EAC1BC,MAAM,IAAMA,MAAM,CAAEC,YAAiB,CAAC,CAACC,cAAc,CAAC,CAAC,EACzD,EACD,CAAC;EAED,MAAMC,kBAAkB,GAAG,IAAAC,gBAAO,EACjC,MACCP,oBAAoB,IACpBC,WAAW,EAAEO,IAAI,CACdC,UAAU,IAAMA,UAAU,CAACC,EAAE,KAAKV,oBACrC,CAAC,EACF,C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C;IAAA,CACF;EAAC,CACF,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_element","_icons","_blockEditor","_components","_i18n","_url","_dom","_store","_jsxRuntime","WidgetAreas","selectedWidgetAreaId","widgetAreas","useSelect","select","editWidgetsStore","getWidgetAreas","selectedWidgetArea","useMemo","find","widgetArea","id","description","__","jsx","className","children","jsxs","BlockIcon","icon","blockDefault","dangerouslySetInnerHTML","__html","safeHTML","length","Button","__next40pxDefaultSize","href","addQueryArgs","return","window","location","pathname","variant"],"sources":["@wordpress/edit-widgets/src/components/sidebar/widget-areas.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'\n\t\t);\n\t} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {\n\t\tdescription = __(\n\t\t\t'Blocks in this Widget Area will not be displayed in your site.'\n\t\t);\n\t} else {\n\t\tdescription = selectedWidgetArea.description;\n\t}\n\n\treturn (\n\t\t<div className=\"edit-widgets-widget-areas\">\n\t\t\t<div className=\"edit-widgets-widget-areas__top-container\">\n\t\t\t\t<BlockIcon icon={ blockDefault } />\n\t\t\t\t<div>\n\t\t\t\t\t<p\n\t\t\t\t\t\t// Use `dangerouslySetInnerHTML` to keep backwards\n\t\t\t\t\t\t// compatibility. Basic markup in the description is an\n\t\t\t\t\t\t// established feature of WordPress.\n\t\t\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/33106\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: safeHTML( description ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ widgetAreas?.length === 0 && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Your theme does not contain any Widget Areas.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! selectedWidgetArea && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\thref={ addQueryArgs( 'customize.php', {\n\t\t\t\t\t\t\t\t'autofocus[panel]': 'widgets',\n\t\t\t\t\t\t\t\treturn: window.location.pathname,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage with live preview' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;A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E,IAAAC,aAAQ,EAAEX,WAAY;UAC/B;QAAG,CACH,CAAC,EACAV,WAAW,EAAEsB,MAAM,KAAK,CAAC,iBAC1B,IAAAzB,WAAA,CAAAe,GAAA;UAAAE,QAAA,EACG,IAAAH,QAAE,EACH,+CACD;QAAC,CACC,CACH,EACC,CAAEN,kBAAkB,iBACrB,IAAAR,WAAA,CAAAe,GAAA,EAACpB,WAAA,CAAA+B,MAAM;UACNC,qBAAqB;UACrBC,IAAI,EAAG,IAAAC,iBAAY,EAAE,eAAe,EAAE;YACrC,kBAAkB,EAAE,SAAS;YAC7BC,MAAM,EAAEC,MAAM,CAACC,QAAQ,CAACC;UACzB,CAAE,CAAG;UACLC,OAAO,EAAC,UAAU;UAAAjB,QAAA,EAEhB,IAAAH,QAAE,EAAE,0BAA2B;QAAC,CAC3B,CACR;MAAA,CACG,CAAC;IAAA,CACF;EAAC,CACF,CAAC;AAER","ignoreList":[]}
@@ -22,7 +22,9 @@ export default function WidgetAreas({
22
22
  const selectedWidgetArea = useMemo(() => selectedWidgetAreaId && widgetAreas?.find(widgetArea => widgetArea.id === selectedWidgetAreaId), [selectedWidgetAreaId, widgetAreas]);
23
23
  let description;
24
24
  if (!selectedWidgetArea) {
25
- description = __('Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.');
25
+ description = __(
26
+ // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
27
+ 'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.');
26
28
  } else if (selectedWidgetAreaId === 'wp_inactive_widgets') {
27
29
  description = __('Blocks in this Widget Area will not be displayed in your site.');
28
30
  } else {
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useMemo","blockDefault","BlockIcon","Button","__","addQueryArgs","safeHTML","store","editWidgetsStore","jsx","_jsx","jsxs","_jsxs","WidgetAreas","selectedWidgetAreaId","widgetAreas","select","getWidgetAreas","selectedWidgetArea","find","widgetArea","id","description","className","children","icon","dangerouslySetInnerHTML","__html","length","__next40pxDefaultSize","href","return","window","location","pathname","variant"],"sources":["@wordpress/edit-widgets/src/components/sidebar/widget-areas.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'\n\t\t);\n\t} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {\n\t\tdescription = __(\n\t\t\t'Blocks in this Widget Area will not be displayed in your site.'\n\t\t);\n\t} else {\n\t\tdescription = selectedWidgetArea.description;\n\t}\n\n\treturn (\n\t\t<div className=\"edit-widgets-widget-areas\">\n\t\t\t<div className=\"edit-widgets-widget-areas__top-container\">\n\t\t\t\t<BlockIcon icon={ blockDefault } />\n\t\t\t\t<div>\n\t\t\t\t\t<p\n\t\t\t\t\t\t// Use `dangerouslySetInnerHTML` to keep backwards\n\t\t\t\t\t\t// compatibility. Basic markup in the description is an\n\t\t\t\t\t\t// established feature of WordPress.\n\t\t\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/33106\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: safeHTML( description ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ widgetAreas?.length === 0 && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Your theme does not contain any Widget Areas.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! selectedWidgetArea && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\thref={ addQueryArgs( 'customize.php', {\n\t\t\t\t\t\t\t\t'autofocus[panel]': 'widgets',\n\t\t\t\t\t\t\t\treturn: window.location.pathname,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage with live preview' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,SAAS,QAAQ,yBAAyB;AACnD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,QAAQ,QAAQ,gBAAgB;;AAEzC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExD,eAAe,SAASC,WAAWA,CAAE;EAAEC;AAAqB,CAAC,EAAG;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AU;UAAAX,QAAA,EAEhBpB,EAAE,CAAE,0BAA2B;QAAC,CAC3B,CACR;MAAA,CACG,CAAC;IAAA,CACF;EAAC,CACF,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","useMemo","blockDefault","BlockIcon","Button","__","addQueryArgs","safeHTML","store","editWidgetsStore","jsx","_jsx","jsxs","_jsxs","WidgetAreas","selectedWidgetAreaId","widgetAreas","select","getWidgetAreas","selectedWidgetArea","find","widgetArea","id","description","className","children","icon","dangerouslySetInnerHTML","__html","length","__next40pxDefaultSize","href","return","window","location","pathname","variant"],"sources":["@wordpress/edit-widgets/src/components/sidebar/widget-areas.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'\n\t\t);\n\t} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {\n\t\tdescription = __(\n\t\t\t'Blocks in this Widget Area will not be displayed in your site.'\n\t\t);\n\t} else {\n\t\tdescription = selectedWidgetArea.description;\n\t}\n\n\treturn (\n\t\t<div className=\"edit-widgets-widget-areas\">\n\t\t\t<div className=\"edit-widgets-widget-areas__top-container\">\n\t\t\t\t<BlockIcon icon={ blockDefault } />\n\t\t\t\t<div>\n\t\t\t\t\t<p\n\t\t\t\t\t\t// Use `dangerouslySetInnerHTML` to keep backwards\n\t\t\t\t\t\t// compatibility. Basic markup in the description is an\n\t\t\t\t\t\t// established feature of WordPress.\n\t\t\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/33106\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: safeHTML( description ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ widgetAreas?.length === 0 && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Your theme does not contain any Widget Areas.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! selectedWidgetArea && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\thref={ addQueryArgs( 'customize.php', {\n\t\t\t\t\t\t\t\t'autofocus[panel]': 'widgets',\n\t\t\t\t\t\t\t\treturn: window.location.pathname,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage with live preview' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,S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C/B;QAAG,CACH,CAAC,EACAP,WAAW,EAAEa,MAAM,KAAK,CAAC,iBAC1BlB,IAAA;UAAAc,QAAA,EACGpB,EAAE,CACH,+CACD;QAAC,CACC,CACH,EACC,CAAEc,kBAAkB,iBACrBR,IAAA,CAACP,MAAM;UACN0B,qBAAqB;UACrBC,IAAI,EAAGzB,YAAY,CAAE,eAAe,EAAE;YACrC,kBAAkB,EAAE,SAAS;YAC7B0B,MAAM,EAAEC,MAAM,CAACC,QAAQ,CAACC;UACzB,CAAE,CAAG;UACLC,OAAO,EAAC,UAAU;UAAAX,QAAA,EAEhBpB,EAAE,CAAE,0BAA2B;QAAC,CAC3B,CACR;MAAA,CACG,CAAC;IAAA,CACF;EAAC,CACF,CAAC;AAER","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-widgets",
3
- "version": "6.18.0",
3
+ "version": "6.19.0",
4
4
  "description": "Widgets Page module for WordPress..",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,32 +29,32 @@
29
29
  "wpScript": true,
30
30
  "dependencies": {
31
31
  "@babel/runtime": "7.25.7",
32
- "@wordpress/api-fetch": "^7.18.0",
33
- "@wordpress/block-editor": "^14.13.0",
34
- "@wordpress/block-library": "^9.18.0",
35
- "@wordpress/blocks": "^14.7.0",
36
- "@wordpress/components": "^29.4.0",
37
- "@wordpress/compose": "^7.18.0",
38
- "@wordpress/core-data": "^7.18.0",
39
- "@wordpress/data": "^10.18.0",
40
- "@wordpress/deprecated": "^4.18.0",
41
- "@wordpress/dom": "^4.18.0",
42
- "@wordpress/element": "^6.18.0",
43
- "@wordpress/hooks": "^4.18.0",
44
- "@wordpress/i18n": "^5.18.0",
45
- "@wordpress/icons": "^10.18.0",
46
- "@wordpress/interface": "^9.3.0",
47
- "@wordpress/keyboard-shortcuts": "^5.18.0",
48
- "@wordpress/keycodes": "^4.18.0",
49
- "@wordpress/media-utils": "^5.18.0",
50
- "@wordpress/notices": "^5.18.0",
51
- "@wordpress/patterns": "^2.18.0",
52
- "@wordpress/plugins": "^7.18.0",
53
- "@wordpress/preferences": "^4.18.0",
54
- "@wordpress/private-apis": "^1.18.0",
55
- "@wordpress/reusable-blocks": "^5.18.0",
56
- "@wordpress/url": "^4.18.0",
57
- "@wordpress/widgets": "^4.18.0",
32
+ "@wordpress/api-fetch": "^7.19.0",
33
+ "@wordpress/block-editor": "^14.14.0",
34
+ "@wordpress/block-library": "^9.19.0",
35
+ "@wordpress/blocks": "^14.8.0",
36
+ "@wordpress/components": "^29.5.0",
37
+ "@wordpress/compose": "^7.19.0",
38
+ "@wordpress/core-data": "^7.19.0",
39
+ "@wordpress/data": "^10.19.0",
40
+ "@wordpress/deprecated": "^4.19.0",
41
+ "@wordpress/dom": "^4.19.0",
42
+ "@wordpress/element": "^6.19.0",
43
+ "@wordpress/hooks": "^4.19.0",
44
+ "@wordpress/i18n": "^5.19.0",
45
+ "@wordpress/icons": "^10.19.0",
46
+ "@wordpress/interface": "^9.4.0",
47
+ "@wordpress/keyboard-shortcuts": "^5.19.0",
48
+ "@wordpress/keycodes": "^4.19.0",
49
+ "@wordpress/media-utils": "^5.19.0",
50
+ "@wordpress/notices": "^5.19.0",
51
+ "@wordpress/patterns": "^2.19.0",
52
+ "@wordpress/plugins": "^7.19.0",
53
+ "@wordpress/preferences": "^4.19.0",
54
+ "@wordpress/private-apis": "^1.19.0",
55
+ "@wordpress/reusable-blocks": "^5.19.0",
56
+ "@wordpress/url": "^4.19.0",
57
+ "@wordpress/widgets": "^4.19.0",
58
58
  "clsx": "^2.1.1"
59
59
  },
60
60
  "peerDependencies": {
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "afe4fb333177642180ac020f1030c5685eab7183"
67
+ "gitHead": "d6b0b20fa927b110140dc7fdd906a7e0bf662004"
68
68
  }
@@ -33,6 +33,7 @@ export default function WidgetAreas( { selectedWidgetAreaId } ) {
33
33
  let description;
34
34
  if ( ! selectedWidgetArea ) {
35
35
  description = __(
36
+ // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
36
37
  'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'
37
38
  );
38
39
  } else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {