143 metadata: () => (metadata), |
143 metadata: () => (metadata), |
144 name: () => (widget_area_name), |
144 name: () => (widget_area_name), |
145 settings: () => (settings) |
145 settings: () => (settings) |
146 }); |
146 }); |
147 |
147 |
148 ;// CONCATENATED MODULE: external ["wp","blocks"] |
148 ;// external ["wp","blocks"] |
149 const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; |
149 const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; |
150 ;// CONCATENATED MODULE: external ["wp","data"] |
150 ;// external ["wp","data"] |
151 const external_wp_data_namespaceObject = window["wp"]["data"]; |
151 const external_wp_data_namespaceObject = window["wp"]["data"]; |
152 ;// CONCATENATED MODULE: external ["wp","deprecated"] |
152 ;// external ["wp","deprecated"] |
153 const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; |
153 const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; |
154 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); |
154 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); |
155 ;// CONCATENATED MODULE: external ["wp","element"] |
155 ;// external ["wp","element"] |
156 const external_wp_element_namespaceObject = window["wp"]["element"]; |
156 const external_wp_element_namespaceObject = window["wp"]["element"]; |
157 ;// CONCATENATED MODULE: external ["wp","blockLibrary"] |
157 ;// external ["wp","blockLibrary"] |
158 const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"]; |
158 const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"]; |
159 ;// CONCATENATED MODULE: external ["wp","coreData"] |
159 ;// external ["wp","coreData"] |
160 const external_wp_coreData_namespaceObject = window["wp"]["coreData"]; |
160 const external_wp_coreData_namespaceObject = window["wp"]["coreData"]; |
161 ;// CONCATENATED MODULE: external ["wp","widgets"] |
161 ;// external ["wp","widgets"] |
162 const external_wp_widgets_namespaceObject = window["wp"]["widgets"]; |
162 const external_wp_widgets_namespaceObject = window["wp"]["widgets"]; |
163 ;// CONCATENATED MODULE: external ["wp","preferences"] |
163 ;// external ["wp","preferences"] |
164 const external_wp_preferences_namespaceObject = window["wp"]["preferences"]; |
164 const external_wp_preferences_namespaceObject = window["wp"]["preferences"]; |
165 ;// CONCATENATED MODULE: external ["wp","apiFetch"] |
165 ;// external ["wp","apiFetch"] |
166 const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; |
166 const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; |
167 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); |
167 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); |
168 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/reducer.js |
168 ;// ./node_modules/@wordpress/edit-widgets/build-module/store/reducer.js |
169 /** |
169 /** |
170 * WordPress dependencies |
170 * WordPress dependencies |
171 */ |
171 */ |
172 |
172 |
173 |
173 |
275 listViewPanel, |
275 listViewPanel, |
276 listViewToggleRef, |
276 listViewToggleRef, |
277 widgetAreasOpenState |
277 widgetAreasOpenState |
278 })); |
278 })); |
279 |
279 |
280 ;// CONCATENATED MODULE: external ["wp","i18n"] |
280 ;// external ["wp","i18n"] |
281 const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
281 const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
282 ;// CONCATENATED MODULE: external ["wp","notices"] |
282 ;// external ["wp","notices"] |
283 const external_wp_notices_namespaceObject = window["wp"]["notices"]; |
283 const external_wp_notices_namespaceObject = window["wp"]["notices"]; |
284 ;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs |
284 ;// ./node_modules/clsx/dist/clsx.mjs |
285 function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx); |
285 function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx); |
286 ;// CONCATENATED MODULE: external ["wp","components"] |
286 ;// external ["wp","components"] |
287 const external_wp_components_namespaceObject = window["wp"]["components"]; |
287 const external_wp_components_namespaceObject = window["wp"]["components"]; |
288 ;// CONCATENATED MODULE: external ["wp","primitives"] |
288 ;// external ["wp","primitives"] |
289 const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; |
289 const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; |
290 ;// CONCATENATED MODULE: external "ReactJSXRuntime" |
290 ;// external "ReactJSXRuntime" |
291 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; |
291 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; |
292 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js |
292 ;// ./node_modules/@wordpress/icons/build-module/library/check.js |
293 /** |
293 /** |
294 * WordPress dependencies |
294 * WordPress dependencies |
295 */ |
295 */ |
296 |
296 |
297 |
297 |
786 |
788 |
787 // Once we build a more generic persistence plugin that works across types of stores |
789 // Once we build a more generic persistence plugin that works across types of stores |
788 // we'd be able to replace this with a register call. |
790 // we'd be able to replace this with a register call. |
789 (0,external_wp_data_namespaceObject.register)(store); |
791 (0,external_wp_data_namespaceObject.register)(store); |
790 |
792 |
791 ;// CONCATENATED MODULE: external ["wp","plugins"] |
793 ;// ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js |
792 const external_wp_plugins_namespaceObject = window["wp"]["plugins"]; |
794 /** |
793 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js |
795 * WordPress dependencies |
794 /** |
796 */ |
795 * WordPress dependencies |
797 |
796 */ |
|
797 |
|
798 /* harmony default export */ const complementary_area_context = ((0,external_wp_plugins_namespaceObject.withPluginContext)((context, ownProps) => { |
|
799 return { |
|
800 icon: ownProps.icon || context.icon, |
|
801 identifier: ownProps.identifier || `${context.name}/${ownProps.name}` |
|
802 }; |
|
803 })); |
|
804 |
|
805 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js |
|
806 /** |
|
807 * WordPress dependencies |
|
808 */ |
|
809 |
798 |
810 |
799 |
811 |
800 |
812 /** |
801 /** |
813 * Internal dependencies |
802 * Internal dependencies |
814 */ |
803 */ |
815 |
804 |
816 |
805 |
817 |
806 /** |
|
807 * Whether the role supports checked state. |
|
808 * |
|
809 * @see https://www.w3.org/TR/wai-aria-1.1/#aria-checked |
|
810 * @param {import('react').AriaRole} role Role. |
|
811 * @return {boolean} Whether the role supports checked state. |
|
812 */ |
|
813 |
|
814 function roleSupportsCheckedState(role) { |
|
815 return ['checkbox', 'option', 'radio', 'switch', 'menuitemcheckbox', 'menuitemradio', 'treeitem'].includes(role); |
|
816 } |
818 function ComplementaryAreaToggle({ |
817 function ComplementaryAreaToggle({ |
819 as = external_wp_components_namespaceObject.Button, |
818 as = external_wp_components_namespaceObject.Button, |
820 scope, |
819 scope, |
821 identifier, |
820 identifier: identifierProp, |
822 icon, |
821 icon: iconProp, |
823 selectedIcon, |
822 selectedIcon, |
824 name, |
823 name, |
|
824 shortcut, |
825 ...props |
825 ...props |
826 }) { |
826 }) { |
827 const ComponentToUse = as; |
827 const ComponentToUse = as; |
|
828 const context = (0,external_wp_plugins_namespaceObject.usePluginContext)(); |
|
829 const icon = iconProp || context.icon; |
|
830 const identifier = identifierProp || `${context.name}/${name}`; |
828 const isSelected = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier, scope]); |
831 const isSelected = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier, scope]); |
829 const { |
832 const { |
830 enableComplementaryArea, |
833 enableComplementaryArea, |
831 disableComplementaryArea |
834 disableComplementaryArea |
832 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
835 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
833 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComponentToUse, { |
836 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComponentToUse, { |
834 icon: selectedIcon && isSelected ? selectedIcon : icon, |
837 icon: selectedIcon && isSelected ? selectedIcon : icon, |
835 "aria-controls": identifier.replace('/', ':'), |
838 "aria-controls": identifier.replace('/', ':') |
|
839 // Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked |
|
840 , |
|
841 "aria-checked": roleSupportsCheckedState(props.role) ? isSelected : undefined, |
836 onClick: () => { |
842 onClick: () => { |
837 if (isSelected) { |
843 if (isSelected) { |
838 disableComplementaryArea(scope); |
844 disableComplementaryArea(scope); |
839 } else { |
845 } else { |
840 enableComplementaryArea(scope, identifier); |
846 enableComplementaryArea(scope, identifier); |
841 } |
847 } |
842 }, |
848 }, |
|
849 shortcut: shortcut, |
843 ...props |
850 ...props |
844 }); |
851 }); |
845 } |
852 } |
846 /* harmony default export */ const complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle)); |
853 |
847 |
854 ;// ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js |
848 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js |
|
849 /** |
855 /** |
850 * External dependencies |
856 * External dependencies |
851 */ |
857 */ |
852 |
858 |
853 |
859 |
859 /** |
865 /** |
860 * Internal dependencies |
866 * Internal dependencies |
861 */ |
867 */ |
862 |
868 |
863 |
869 |
864 |
|
865 |
|
866 const ComplementaryAreaHeader = ({ |
870 const ComplementaryAreaHeader = ({ |
867 smallScreenTitle, |
|
868 children, |
871 children, |
869 className, |
872 className, |
870 toggleButtonProps |
873 toggleButtonProps |
871 }) => { |
874 }) => { |
872 const toggleButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, { |
875 const toggleButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryAreaToggle, { |
873 icon: close_small, |
876 icon: close_small, |
874 ...toggleButtonProps |
877 ...toggleButtonProps |
875 }); |
878 }); |
876 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
879 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
877 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
880 className: dist_clsx('components-panel__header', 'interface-complementary-area-header', className), |
878 className: "components-panel__header interface-complementary-area-header__small", |
881 tabIndex: -1, |
879 children: [smallScreenTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { |
882 children: [children, toggleButton] |
880 className: "interface-complementary-area-header__small-title", |
|
881 children: smallScreenTitle |
|
882 }), toggleButton] |
|
883 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
|
884 className: dist_clsx('components-panel__header', 'interface-complementary-area-header', className), |
|
885 tabIndex: -1, |
|
886 children: [children, toggleButton] |
|
887 })] |
|
888 }); |
883 }); |
889 }; |
884 }; |
890 /* harmony default export */ const complementary_area_header = (ComplementaryAreaHeader); |
885 /* harmony default export */ const complementary_area_header = (ComplementaryAreaHeader); |
891 |
886 |
892 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js |
887 ;// ./node_modules/@wordpress/interface/build-module/components/action-item/index.js |
893 /** |
888 /** |
894 * WordPress dependencies |
889 * WordPress dependencies |
895 */ |
890 */ |
896 |
891 |
897 |
892 |
898 |
893 |
899 const noop = () => {}; |
894 const noop = () => {}; |
900 function ActionItemSlot({ |
895 function ActionItemSlot({ |
901 name, |
896 name, |
902 as: Component = external_wp_components_namespaceObject.ButtonGroup, |
897 as: Component = external_wp_components_namespaceObject.MenuGroup, |
903 fillProps = {}, |
898 fillProps = {}, |
904 bubblesVirtually, |
899 bubblesVirtually, |
905 ...props |
900 ...props |
906 }) { |
901 }) { |
907 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, { |
902 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, { |
1149 }) |
1142 }) |
1150 }) |
1143 }) |
1151 }); |
1144 }); |
1152 } |
1145 } |
1153 function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) { |
1146 function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) { |
1154 const previousIsSmall = (0,external_wp_element_namespaceObject.useRef)(false); |
1147 const previousIsSmallRef = (0,external_wp_element_namespaceObject.useRef)(false); |
1155 const shouldOpenWhenNotSmall = (0,external_wp_element_namespaceObject.useRef)(false); |
1148 const shouldOpenWhenNotSmallRef = (0,external_wp_element_namespaceObject.useRef)(false); |
1156 const { |
1149 const { |
1157 enableComplementaryArea, |
1150 enableComplementaryArea, |
1158 disableComplementaryArea |
1151 disableComplementaryArea |
1159 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
1152 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
1160 (0,external_wp_element_namespaceObject.useEffect)(() => { |
1153 (0,external_wp_element_namespaceObject.useEffect)(() => { |
1161 // If the complementary area is active and the editor is switching from |
1154 // If the complementary area is active and the editor is switching from |
1162 // a big to a small window size. |
1155 // a big to a small window size. |
1163 if (isActive && isSmall && !previousIsSmall.current) { |
1156 if (isActive && isSmall && !previousIsSmallRef.current) { |
1164 disableComplementaryArea(scope); |
1157 disableComplementaryArea(scope); |
1165 // Flag the complementary area to be reopened when the window size |
1158 // Flag the complementary area to be reopened when the window size |
1166 // goes from small to big. |
1159 // goes from small to big. |
1167 shouldOpenWhenNotSmall.current = true; |
1160 shouldOpenWhenNotSmallRef.current = true; |
1168 } else if ( |
1161 } else if ( |
1169 // If there is a flag indicating the complementary area should be |
1162 // If there is a flag indicating the complementary area should be |
1170 // enabled when we go from small to big window size and we are going |
1163 // enabled when we go from small to big window size and we are going |
1171 // from a small to big window size. |
1164 // from a small to big window size. |
1172 shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) { |
1165 shouldOpenWhenNotSmallRef.current && !isSmall && previousIsSmallRef.current) { |
1173 // Remove the flag indicating the complementary area should be |
1166 // Remove the flag indicating the complementary area should be |
1174 // enabled. |
1167 // enabled. |
1175 shouldOpenWhenNotSmall.current = false; |
1168 shouldOpenWhenNotSmallRef.current = false; |
1176 enableComplementaryArea(scope, identifier); |
1169 enableComplementaryArea(scope, identifier); |
1177 } else if ( |
1170 } else if ( |
1178 // If the flag is indicating the current complementary should be |
1171 // If the flag is indicating the current complementary should be |
1179 // reopened but another complementary area becomes active, remove |
1172 // reopened but another complementary area becomes active, remove |
1180 // the flag. |
1173 // the flag. |
1181 shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) { |
1174 shouldOpenWhenNotSmallRef.current && activeArea && activeArea !== identifier) { |
1182 shouldOpenWhenNotSmall.current = false; |
1175 shouldOpenWhenNotSmallRef.current = false; |
1183 } |
1176 } |
1184 if (isSmall !== previousIsSmall.current) { |
1177 if (isSmall !== previousIsSmallRef.current) { |
1185 previousIsSmall.current = isSmall; |
1178 previousIsSmallRef.current = isSmall; |
1186 } |
1179 } |
1187 }, [isActive, isSmall, scope, identifier, activeArea, disableComplementaryArea, enableComplementaryArea]); |
1180 }, [isActive, isSmall, scope, identifier, activeArea, disableComplementaryArea, enableComplementaryArea]); |
1188 } |
1181 } |
1189 function ComplementaryArea({ |
1182 function ComplementaryArea({ |
1190 children, |
1183 children, |
1191 className, |
1184 className, |
1192 closeLabel = (0,external_wp_i18n_namespaceObject.__)('Close plugin'), |
1185 closeLabel = (0,external_wp_i18n_namespaceObject.__)('Close plugin'), |
1193 identifier, |
1186 identifier: identifierProp, |
1194 header, |
1187 header, |
1195 headerClassName, |
1188 headerClassName, |
1196 icon, |
1189 icon: iconProp, |
1197 isPinnable = true, |
1190 isPinnable = true, |
1198 panelClassName, |
1191 panelClassName, |
1199 scope, |
1192 scope, |
1200 name, |
1193 name, |
1201 smallScreenTitle, |
|
1202 title, |
1194 title, |
1203 toggleShortcut, |
1195 toggleShortcut, |
1204 isActiveByDefault |
1196 isActiveByDefault |
1205 }) { |
1197 }) { |
|
1198 const context = (0,external_wp_plugins_namespaceObject.usePluginContext)(); |
|
1199 const icon = iconProp || context.icon; |
|
1200 const identifier = identifierProp || `${context.name}/${name}`; |
|
1201 |
1206 // This state is used to delay the rendering of the Fill |
1202 // This state is used to delay the rendering of the Fill |
1207 // until the initial effect runs. |
1203 // until the initial effect runs. |
1208 // This prevents the animation from running on mount if |
1204 // This prevents the animation from running on mount if |
1209 // the complementary area is active by default. |
1205 // the complementary area is active by default. |
1210 const [isReady, setIsReady] = (0,external_wp_element_namespaceObject.useState)(false); |
1206 const [isReady, setIsReady] = (0,external_wp_element_namespaceObject.useState)(false); |
1257 return; |
1254 return; |
1258 } |
1255 } |
1259 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
1256 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
1260 children: [isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pinned_items, { |
1257 children: [isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pinned_items, { |
1261 scope: scope, |
1258 scope: scope, |
1262 children: isPinned && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, { |
1259 children: isPinned && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryAreaToggle, { |
1263 scope: scope, |
1260 scope: scope, |
1264 identifier: identifier, |
1261 identifier: identifier, |
1265 isPressed: isActive && (!showIconLabels || isLarge), |
1262 isPressed: isActive && (!showIconLabels || isLarge), |
1266 "aria-expanded": isActive, |
1263 "aria-expanded": isActive, |
1267 "aria-disabled": isLoading, |
1264 "aria-disabled": isLoading, |
1268 label: title, |
1265 label: title, |
1269 icon: showIconLabels ? library_check : icon, |
1266 icon: showIconLabels ? library_check : icon, |
1270 showTooltip: !showIconLabels, |
1267 showTooltip: !showIconLabels, |
1271 variant: showIconLabels ? 'tertiary' : undefined, |
1268 variant: showIconLabels ? 'tertiary' : undefined, |
1272 size: "compact" |
1269 size: "compact", |
|
1270 shortcut: toggleShortcut |
1273 }) |
1271 }) |
1274 }), name && isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryAreaMoreMenuItem, { |
1272 }), name && isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryAreaMoreMenuItem, { |
1275 target: name, |
1273 target: name, |
1276 scope: scope, |
1274 scope: scope, |
1277 icon: icon, |
1275 icon: icon, |
1284 id: identifier.replace('/', ':'), |
1282 id: identifier.replace('/', ':'), |
1285 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_header, { |
1283 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_header, { |
1286 className: headerClassName, |
1284 className: headerClassName, |
1287 closeLabel: closeLabel, |
1285 closeLabel: closeLabel, |
1288 onClose: () => disableComplementaryArea(scope), |
1286 onClose: () => disableComplementaryArea(scope), |
1289 smallScreenTitle: smallScreenTitle, |
|
1290 toggleButtonProps: { |
1287 toggleButtonProps: { |
1291 label: closeLabel, |
1288 label: closeLabel, |
1292 size: 'small', |
1289 size: 'compact', |
1293 shortcut: toggleShortcut, |
1290 shortcut: toggleShortcut, |
1294 scope, |
1291 scope, |
1295 identifier |
1292 identifier |
1296 }, |
1293 }, |
1297 children: header || /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
1294 children: header || /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
1298 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { |
1295 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { |
1299 className: "interface-complementary-area-header__title", |
1296 className: "interface-complementary-area-header__title", |
1300 children: title |
1297 children: title |
1301 }), isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
1298 }), isPinnable && !isMobileViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
1302 className: "interface-complementary-area__pin-unpin-item", |
1299 className: "interface-complementary-area__pin-unpin-item", |
1303 icon: isPinned ? star_filled : star_empty, |
1300 icon: isPinned ? star_filled : star_empty, |
1304 label: isPinned ? (0,external_wp_i18n_namespaceObject.__)('Unpin from toolbar') : (0,external_wp_i18n_namespaceObject.__)('Pin to toolbar'), |
1301 label: isPinned ? (0,external_wp_i18n_namespaceObject.__)('Unpin from toolbar') : (0,external_wp_i18n_namespaceObject.__)('Pin to toolbar'), |
1305 onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier), |
1302 onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier), |
1306 isPressed: isPinned, |
1303 isPressed: isPinned, |
1313 children: children |
1310 children: children |
1314 })] |
1311 })] |
1315 })] |
1312 })] |
1316 }); |
1313 }); |
1317 } |
1314 } |
1318 const ComplementaryAreaWrapped = complementary_area_context(ComplementaryArea); |
1315 ComplementaryArea.Slot = ComplementaryAreaSlot; |
1319 ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot; |
1316 /* harmony default export */ const complementary_area = (ComplementaryArea); |
1320 /* harmony default export */ const complementary_area = (ComplementaryAreaWrapped); |
1317 |
1321 |
1318 ;// ./node_modules/@wordpress/interface/build-module/components/navigable-region/index.js |
1322 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/navigable-region/index.js |
1319 /** |
|
1320 * WordPress dependencies |
|
1321 */ |
|
1322 |
|
1323 |
1323 /** |
1324 /** |
1324 * External dependencies |
1325 * External dependencies |
1325 */ |
1326 */ |
1326 |
1327 |
1327 |
1328 |
1328 function NavigableRegion({ |
1329 const NavigableRegion = (0,external_wp_element_namespaceObject.forwardRef)(({ |
1329 children, |
1330 children, |
1330 className, |
1331 className, |
1331 ariaLabel, |
1332 ariaLabel, |
1332 as: Tag = 'div', |
1333 as: Tag = 'div', |
1333 ...props |
1334 ...props |
1334 }) { |
1335 }, ref) => { |
1335 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { |
1336 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { |
|
1337 ref: ref, |
1336 className: dist_clsx('interface-navigable-region', className), |
1338 className: dist_clsx('interface-navigable-region', className), |
1337 "aria-label": ariaLabel, |
1339 "aria-label": ariaLabel, |
1338 role: "region", |
1340 role: "region", |
1339 tabIndex: "-1", |
1341 tabIndex: "-1", |
1340 ...props, |
1342 ...props, |
1341 children: children |
1343 children: children |
1342 }); |
1344 }); |
1343 } |
1345 }); |
1344 |
1346 NavigableRegion.displayName = 'NavigableRegion'; |
1345 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js |
1347 /* harmony default export */ const navigable_region = (NavigableRegion); |
|
1348 |
|
1349 ;// ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js |
1346 /** |
1350 /** |
1347 * External dependencies |
1351 * External dependencies |
1348 */ |
1352 */ |
1349 |
1353 |
1350 |
1354 |
1420 sidebar, |
1423 sidebar, |
1421 secondarySidebar, |
1424 secondarySidebar, |
1422 content, |
1425 content, |
1423 actions, |
1426 actions, |
1424 labels, |
1427 labels, |
1425 className, |
1428 className |
1426 enableRegionNavigation = true, |
|
1427 // Todo: does this need to be a prop. |
|
1428 // Can we use a dependency to keyboard-shortcuts directly? |
|
1429 shortcuts |
|
1430 }, ref) { |
1429 }, ref) { |
1431 const [secondarySidebarResizeListener, secondarySidebarSize] = (0,external_wp_compose_namespaceObject.useResizeObserver)(); |
1430 const [secondarySidebarResizeListener, secondarySidebarSize] = (0,external_wp_compose_namespaceObject.useResizeObserver)(); |
1432 const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<'); |
1431 const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<'); |
1433 const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)(); |
1432 const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)(); |
1434 const defaultTransition = { |
1433 const defaultTransition = { |
1435 type: 'tween', |
1434 type: 'tween', |
1436 duration: disableMotion ? 0 : interface_skeleton_ANIMATION_DURATION, |
1435 duration: disableMotion ? 0 : interface_skeleton_ANIMATION_DURATION, |
1437 ease: [0.6, 0, 0.4, 1] |
1436 ease: [0.6, 0, 0.4, 1] |
1438 }; |
1437 }; |
1439 const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)(shortcuts); |
|
1440 useHTMLClass('interface-interface-skeleton__html-container'); |
1438 useHTMLClass('interface-interface-skeleton__html-container'); |
1441 const defaultLabels = { |
1439 const defaultLabels = { |
1442 /* translators: accessibility text for the top bar landmark region. */ |
1440 /* translators: accessibility text for the top bar landmark region. */ |
1443 header: (0,external_wp_i18n_namespaceObject._x)('Header', 'header landmark area'), |
1441 header: (0,external_wp_i18n_namespaceObject._x)('Header', 'header landmark area'), |
1444 /* translators: accessibility text for the content landmark region. */ |
1442 /* translators: accessibility text for the content landmark region. */ |
1445 body: (0,external_wp_i18n_namespaceObject.__)('Content'), |
1443 body: (0,external_wp_i18n_namespaceObject.__)('Content'), |
1446 /* translators: accessibility text for the secondary sidebar landmark region. */ |
1444 /* translators: accessibility text for the secondary sidebar landmark region. */ |
1447 secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'), |
1445 secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'), |
1448 /* translators: accessibility text for the settings landmark region. */ |
1446 /* translators: accessibility text for the settings landmark region. */ |
1449 sidebar: (0,external_wp_i18n_namespaceObject.__)('Settings'), |
1447 sidebar: (0,external_wp_i18n_namespaceObject._x)('Settings', 'settings landmark area'), |
1450 /* translators: accessibility text for the publish landmark region. */ |
1448 /* translators: accessibility text for the publish landmark region. */ |
1451 actions: (0,external_wp_i18n_namespaceObject.__)('Publish'), |
1449 actions: (0,external_wp_i18n_namespaceObject.__)('Publish'), |
1452 /* translators: accessibility text for the footer landmark region. */ |
1450 /* translators: accessibility text for the footer landmark region. */ |
1453 footer: (0,external_wp_i18n_namespaceObject.__)('Footer') |
1451 footer: (0,external_wp_i18n_namespaceObject.__)('Footer') |
1454 }; |
1452 }; |
1455 const mergedLabels = { |
1453 const mergedLabels = { |
1456 ...defaultLabels, |
1454 ...defaultLabels, |
1457 ...labels |
1455 ...labels |
1458 }; |
1456 }; |
1459 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
1457 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
1460 ...(enableRegionNavigation ? navigateRegionsProps : {}), |
1458 ref: ref, |
1461 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, enableRegionNavigation ? navigateRegionsProps.ref : undefined]), |
1459 className: dist_clsx(className, 'interface-interface-skeleton', !!footer && 'has-footer'), |
1462 className: dist_clsx(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer'), |
|
1463 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
1460 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
1464 className: "interface-interface-skeleton__editor", |
1461 className: "interface-interface-skeleton__editor", |
1465 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, { |
1462 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, { |
1466 initial: false, |
1463 initial: false, |
1467 children: !!header && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, { |
1464 children: !!header && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(navigable_region, { |
1468 as: external_wp_components_namespaceObject.__unstableMotion.div, |
1465 as: external_wp_components_namespaceObject.__unstableMotion.div, |
1469 className: "interface-interface-skeleton__header", |
1466 className: "interface-interface-skeleton__header", |
1470 "aria-label": mergedLabels.header, |
1467 "aria-label": mergedLabels.header, |
1471 initial: isDistractionFree ? 'distractionFreeHidden' : 'hidden', |
1468 initial: isDistractionFree && !isMobileViewport ? 'distractionFreeHidden' : 'hidden', |
1472 whileHover: isDistractionFree ? 'distractionFreeHover' : 'visible', |
1469 whileHover: isDistractionFree && !isMobileViewport ? 'distractionFreeHover' : 'visible', |
1473 animate: isDistractionFree ? 'distractionFreeDisabled' : 'visible', |
1470 animate: isDistractionFree && !isMobileViewport ? 'distractionFreeDisabled' : 'visible', |
1474 exit: isDistractionFree ? 'distractionFreeHidden' : 'hidden', |
1471 exit: isDistractionFree && !isMobileViewport ? 'distractionFreeHidden' : 'hidden', |
1475 variants: headerVariants, |
1472 variants: headerVariants, |
1476 transition: defaultTransition, |
1473 transition: defaultTransition, |
1477 children: header |
1474 children: header |
1478 }) |
1475 }) |
1479 }), isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
1476 }), isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
1481 children: editorNotices |
1478 children: editorNotices |
1482 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
1479 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
1483 className: "interface-interface-skeleton__body", |
1480 className: "interface-interface-skeleton__body", |
1484 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, { |
1481 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, { |
1485 initial: false, |
1482 initial: false, |
1486 children: !!secondarySidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, { |
1483 children: !!secondarySidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(navigable_region, { |
1487 className: "interface-interface-skeleton__secondary-sidebar", |
1484 className: "interface-interface-skeleton__secondary-sidebar", |
1488 ariaLabel: mergedLabels.secondarySidebar, |
1485 ariaLabel: mergedLabels.secondarySidebar, |
1489 as: external_wp_components_namespaceObject.__unstableMotion.div, |
1486 as: external_wp_components_namespaceObject.__unstableMotion.div, |
1490 initial: "closed", |
1487 initial: "closed", |
1491 animate: isMobileViewport ? 'mobileOpen' : 'open', |
1488 animate: "open", |
1492 exit: "closed", |
1489 exit: "closed", |
1493 variants: { |
1490 variants: { |
1494 open: { |
1491 open: { |
1495 width: secondarySidebarSize.width |
1492 width: secondarySidebarSize.width |
1496 }, |
1493 }, |
1497 closed: { |
1494 closed: { |
1498 width: 0 |
1495 width: 0 |
1499 }, |
|
1500 mobileOpen: { |
|
1501 width: '100vw' |
|
1502 } |
1496 } |
1503 }, |
1497 }, |
1504 transition: defaultTransition, |
1498 transition: defaultTransition, |
1505 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
1499 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__unstableMotion.div, { |
1506 style: { |
1500 style: { |
1507 position: 'absolute', |
1501 position: 'absolute', |
1508 width: isMobileViewport ? '100vw' : 'fit-content', |
1502 width: isMobileViewport ? '100vw' : 'fit-content', |
1509 height: '100%', |
1503 height: '100%', |
1510 right: 0 |
1504 left: 0 |
1511 }, |
1505 }, |
|
1506 variants: { |
|
1507 open: { |
|
1508 x: 0 |
|
1509 }, |
|
1510 closed: { |
|
1511 x: '-100%' |
|
1512 } |
|
1513 }, |
|
1514 transition: defaultTransition, |
1512 children: [secondarySidebarResizeListener, secondarySidebar] |
1515 children: [secondarySidebarResizeListener, secondarySidebar] |
1513 }) |
1516 }) |
1514 }) |
1517 }) |
1515 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, { |
1518 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(navigable_region, { |
1516 className: "interface-interface-skeleton__content", |
1519 className: "interface-interface-skeleton__content", |
1517 ariaLabel: mergedLabels.body, |
1520 ariaLabel: mergedLabels.body, |
1518 children: content |
1521 children: content |
1519 }), !!sidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, { |
1522 }), !!sidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(navigable_region, { |
1520 className: "interface-interface-skeleton__sidebar", |
1523 className: "interface-interface-skeleton__sidebar", |
1521 ariaLabel: mergedLabels.sidebar, |
1524 ariaLabel: mergedLabels.sidebar, |
1522 children: sidebar |
1525 children: sidebar |
1523 }), !!actions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, { |
1526 }), !!actions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(navigable_region, { |
1524 className: "interface-interface-skeleton__actions", |
1527 className: "interface-interface-skeleton__actions", |
1525 ariaLabel: mergedLabels.actions, |
1528 ariaLabel: mergedLabels.actions, |
1526 children: actions |
1529 children: actions |
1527 })] |
1530 })] |
1528 })] |
1531 })] |
1529 }), !!footer && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, { |
1532 }), !!footer && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(navigable_region, { |
1530 className: "interface-interface-skeleton__footer", |
1533 className: "interface-interface-skeleton__footer", |
1531 ariaLabel: mergedLabels.footer, |
1534 ariaLabel: mergedLabels.footer, |
1532 children: footer |
1535 children: footer |
1533 })] |
1536 })] |
1534 }); |
1537 }); |
1535 } |
1538 } |
1536 /* harmony default export */ const interface_skeleton = ((0,external_wp_element_namespaceObject.forwardRef)(InterfaceSkeleton)); |
1539 /* harmony default export */ const interface_skeleton = ((0,external_wp_element_namespaceObject.forwardRef)(InterfaceSkeleton)); |
1537 |
1540 |
1538 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js |
1541 ;// ./node_modules/@wordpress/interface/build-module/components/index.js |
1539 |
1542 |
1540 |
1543 |
1541 |
1544 |
1542 |
1545 |
1543 |
1546 |
1544 |
1547 |
1545 |
1548 |
1546 |
1549 |
1547 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js |
1550 ;// ./node_modules/@wordpress/interface/build-module/index.js |
1548 |
1551 |
1549 |
1552 |
1550 |
1553 |
1551 ;// CONCATENATED MODULE: external ["wp","blockEditor"] |
1554 ;// external ["wp","blockEditor"] |
1552 const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; |
1555 const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; |
1553 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/transformers.js |
1556 ;// ./node_modules/@wordpress/edit-widgets/build-module/store/transformers.js |
1554 /** |
1557 /** |
1555 * WordPress dependencies |
1558 * WordPress dependencies |
1556 */ |
1559 */ |
1557 |
1560 |
1558 |
1561 |
2374 */ |
2377 */ |
2375 function isListViewOpened(state) { |
2378 function isListViewOpened(state) { |
2376 return state.listViewPanel; |
2379 return state.listViewPanel; |
2377 } |
2380 } |
2378 |
2381 |
2379 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/private-selectors.js |
2382 ;// ./node_modules/@wordpress/edit-widgets/build-module/store/private-selectors.js |
2380 function getListViewToggleRef(state) { |
2383 function getListViewToggleRef(state) { |
2381 return state.listViewToggleRef; |
2384 return state.listViewToggleRef; |
2382 } |
2385 } |
2383 function getInserterSidebarToggleRef(state) { |
2386 function getInserterSidebarToggleRef(state) { |
2384 return state.inserterSidebarToggleRef; |
2387 return state.inserterSidebarToggleRef; |
2385 } |
2388 } |
2386 |
2389 |
2387 ;// CONCATENATED MODULE: external ["wp","privateApis"] |
2390 ;// external ["wp","privateApis"] |
2388 const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; |
2391 const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; |
2389 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/lock-unlock.js |
2392 ;// ./node_modules/@wordpress/edit-widgets/build-module/lock-unlock.js |
2390 /** |
2393 /** |
2391 * WordPress dependencies |
2394 * WordPress dependencies |
2392 */ |
2395 */ |
2393 |
2396 |
2394 const { |
2397 const { |
2395 lock, |
2398 lock, |
2396 unlock |
2399 unlock |
2397 } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/edit-widgets'); |
2400 } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/edit-widgets'); |
2398 |
2401 |
2399 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/index.js |
2402 ;// ./node_modules/@wordpress/edit-widgets/build-module/store/index.js |
2400 /** |
2403 /** |
2401 * WordPress dependencies |
2404 * WordPress dependencies |
2402 */ |
2405 */ |
2403 |
2406 |
2404 |
2407 |
2497 const hasMultipleWidgetAreas = widgetAreas?.length > 1; |
2498 const hasMultipleWidgetAreas = widgetAreas?.length > 1; |
2498 const isMoveToWidgetAreaVisible = blockName !== 'core/widget-area' && hasMultipleWidgetAreas && canInsertBlockInWidgetArea; |
2499 const isMoveToWidgetAreaVisible = blockName !== 'core/widget-area' && hasMultipleWidgetAreas && canInsertBlockInWidgetArea; |
2499 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
2500 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
2500 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, { |
2501 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, { |
2501 ...props |
2502 ...props |
2502 }), isMoveToWidgetAreaVisible && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { |
2503 }, "edit"), isMoveToWidgetAreaVisible && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { |
2503 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_widgets_namespaceObject.MoveToWidgetArea, { |
2504 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_widgets_namespaceObject.MoveToWidgetArea, { |
2504 widgetAreas: widgetAreas, |
2505 widgetAreas: widgetAreas, |
2505 currentWidgetAreaId: currentWidgetAreaId, |
2506 currentWidgetAreaId: currentWidgetAreaId, |
2506 onSelect: widgetAreaId => { |
2507 onSelect: widgetAreaId => { |
2507 moveBlockToWidgetArea(props.clientId, widgetAreaId); |
2508 moveBlockToWidgetArea(props.clientId, widgetAreaId); |
2510 })] |
2511 })] |
2511 }); |
2512 }); |
2512 }, 'withMoveToWidgetAreaToolbarItem'); |
2513 }, 'withMoveToWidgetAreaToolbarItem'); |
2513 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/edit-widgets/block-edit', withMoveToWidgetAreaToolbarItem); |
2514 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/edit-widgets/block-edit', withMoveToWidgetAreaToolbarItem); |
2514 |
2515 |
2515 ;// CONCATENATED MODULE: external ["wp","mediaUtils"] |
2516 ;// external ["wp","mediaUtils"] |
2516 const external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"]; |
2517 const external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"]; |
2517 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/replace-media-upload.js |
2518 ;// ./node_modules/@wordpress/edit-widgets/build-module/filters/replace-media-upload.js |
2518 /** |
2519 /** |
2519 * WordPress dependencies |
2520 * WordPress dependencies |
2520 */ |
2521 */ |
2521 |
2522 |
2522 |
2523 |
2523 const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpload; |
2524 const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpload; |
2524 (0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-widgets/replace-media-upload', replaceMediaUpload); |
2525 (0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-widgets/replace-media-upload', replaceMediaUpload); |
2525 |
2526 |
2526 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/index.js |
2527 ;// ./node_modules/@wordpress/edit-widgets/build-module/filters/index.js |
2527 /** |
2528 /** |
2528 * Internal dependencies |
2529 * Internal dependencies |
2529 */ |
2530 */ |
2530 |
2531 |
2531 |
2532 |
2532 |
2533 |
2533 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/use-is-dragging-within.js |
2534 ;// ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/use-is-dragging-within.js |
2534 /** |
2535 /** |
2535 * WordPress dependencies |
2536 * WordPress dependencies |
2536 */ |
2537 */ |
2537 |
2538 |
2538 |
2539 |
3065 PatternsMenuItems |
3066 PatternsMenuItems |
3066 } = unlock(external_wp_patterns_namespaceObject.privateApis); |
3067 } = unlock(external_wp_patterns_namespaceObject.privateApis); |
3067 const { |
3068 const { |
3068 BlockKeyboardShortcuts |
3069 BlockKeyboardShortcuts |
3069 } = unlock(external_wp_blockLibrary_namespaceObject.privateApis); |
3070 } = unlock(external_wp_blockLibrary_namespaceObject.privateApis); |
|
3071 const EMPTY_ARRAY = []; |
3070 function WidgetAreasBlockEditorProvider({ |
3072 function WidgetAreasBlockEditorProvider({ |
3071 blockEditorSettings, |
3073 blockEditorSettings, |
3072 children, |
3074 children, |
3073 ...props |
3075 ...props |
3074 }) { |
3076 }) { |
3075 const mediaPermissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)('media'); |
|
3076 const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium'); |
3077 const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium'); |
3077 const { |
3078 const { |
|
3079 hasUploadPermissions, |
3078 reusableBlocks, |
3080 reusableBlocks, |
3079 isFixedToolbarActive, |
3081 isFixedToolbarActive, |
3080 keepCaretInsideBlock, |
3082 keepCaretInsideBlock, |
3081 pageOnFront, |
3083 pageOnFront, |
3082 pageForPosts |
3084 pageForPosts |
3083 } = (0,external_wp_data_namespaceObject.useSelect)(select => { |
3085 } = (0,external_wp_data_namespaceObject.useSelect)(select => { |
|
3086 var _canUser; |
3084 const { |
3087 const { |
3085 canUser, |
3088 canUser, |
3086 getEntityRecord, |
3089 getEntityRecord, |
3087 getEntityRecords |
3090 getEntityRecords |
3088 } = select(external_wp_coreData_namespaceObject.store); |
3091 } = select(external_wp_coreData_namespaceObject.store); |
3089 const siteSettings = canUser('read', 'settings') ? getEntityRecord('root', 'site') : undefined; |
3092 const siteSettings = canUser('read', { |
|
3093 kind: 'root', |
|
3094 name: 'site' |
|
3095 }) ? getEntityRecord('root', 'site') : undefined; |
3090 return { |
3096 return { |
3091 widgetAreas: select(store_store).getWidgetAreas(), |
3097 hasUploadPermissions: (_canUser = canUser('create', { |
3092 widgets: select(store_store).getWidgets(), |
3098 kind: 'root', |
3093 reusableBlocks: ALLOW_REUSABLE_BLOCKS ? getEntityRecords('postType', 'wp_block') : [], |
3099 name: 'media' |
|
3100 })) !== null && _canUser !== void 0 ? _canUser : true, |
|
3101 reusableBlocks: ALLOW_REUSABLE_BLOCKS ? getEntityRecords('postType', 'wp_block') : EMPTY_ARRAY, |
3094 isFixedToolbarActive: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'fixedToolbar'), |
3102 isFixedToolbarActive: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'fixedToolbar'), |
3095 keepCaretInsideBlock: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'keepCaretInsideBlock'), |
3103 keepCaretInsideBlock: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'keepCaretInsideBlock'), |
3096 pageOnFront: siteSettings?.page_on_front, |
3104 pageOnFront: siteSettings?.page_on_front, |
3097 pageForPosts: siteSettings?.page_for_posts |
3105 pageForPosts: siteSettings?.page_for_posts |
3098 }; |
3106 }; |
3123 keepCaretInsideBlock, |
3131 keepCaretInsideBlock, |
3124 mediaUpload: mediaUploadBlockEditor, |
3132 mediaUpload: mediaUploadBlockEditor, |
3125 templateLock: 'all', |
3133 templateLock: 'all', |
3126 __experimentalSetIsInserterOpened: setIsInserterOpened, |
3134 __experimentalSetIsInserterOpened: setIsInserterOpened, |
3127 pageOnFront, |
3135 pageOnFront, |
3128 pageForPosts |
3136 pageForPosts, |
|
3137 editorTool: 'edit' |
3129 }; |
3138 }; |
3130 }, [blockEditorSettings, isFixedToolbarActive, isLargeViewport, keepCaretInsideBlock, mediaPermissions.canCreate, reusableBlocks, setIsInserterOpened, pageOnFront, pageForPosts]); |
3139 }, [hasUploadPermissions, blockEditorSettings, isFixedToolbarActive, isLargeViewport, keepCaretInsideBlock, reusableBlocks, setIsInserterOpened, pageOnFront, pageForPosts]); |
3131 const widgetAreaId = use_last_selected_widget_area(); |
3140 const widgetAreaId = use_last_selected_widget_area(); |
3132 const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(KIND, POST_TYPE, { |
3141 const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(KIND, POST_TYPE, { |
3133 id: buildWidgetAreasPostId() |
3142 id: buildWidgetAreasPostId() |
3134 }); |
3143 }); |
3135 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SlotFillProvider, { |
3144 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SlotFillProvider, { |
3218 |
3227 |
3219 |
3228 |
3220 /** |
3229 /** |
3221 * Internal dependencies |
3230 * Internal dependencies |
3222 */ |
3231 */ |
3223 |
|
3224 |
3232 |
3225 |
3233 |
3226 function WidgetAreas({ |
3234 function WidgetAreas({ |
3227 selectedWidgetAreaId |
3235 selectedWidgetAreaId |
3228 }) { |
3236 }) { |
3229 const widgetAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getWidgetAreas(), []); |
3237 const widgetAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getWidgetAreas(), []); |
3230 const selectedWidgetArea = (0,external_wp_element_namespaceObject.useMemo)(() => selectedWidgetAreaId && widgetAreas?.find(widgetArea => widgetArea.id === selectedWidgetAreaId), [selectedWidgetAreaId, widgetAreas]); |
3238 const selectedWidgetArea = (0,external_wp_element_namespaceObject.useMemo)(() => selectedWidgetAreaId && widgetAreas?.find(widgetArea => widgetArea.id === selectedWidgetAreaId), [selectedWidgetAreaId, widgetAreas]); |
3231 let description; |
3239 let description; |
3232 if (!selectedWidgetArea) { |
3240 if (!selectedWidgetArea) { |
3233 description = (0,external_wp_i18n_namespaceObject.__)('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.'); |
3241 description = (0,external_wp_i18n_namespaceObject.__)( |
|
3242 // eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts |
|
3243 '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.'); |
3234 } else if (selectedWidgetAreaId === 'wp_inactive_widgets') { |
3244 } else if (selectedWidgetAreaId === 'wp_inactive_widgets') { |
3235 description = (0,external_wp_i18n_namespaceObject.__)('Blocks in this Widget Area will not be displayed in your site.'); |
3245 description = (0,external_wp_i18n_namespaceObject.__)('Blocks in this Widget Area will not be displayed in your site.'); |
3236 } else { |
3246 } else { |
3237 description = selectedWidgetArea.description; |
3247 description = selectedWidgetArea.description; |
3238 } |
3248 } |
3252 __html: (0,external_wp_dom_namespaceObject.safeHTML)(description) |
3262 __html: (0,external_wp_dom_namespaceObject.safeHTML)(description) |
3253 } |
3263 } |
3254 }), widgetAreas?.length === 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
3264 }), widgetAreas?.length === 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
3255 children: (0,external_wp_i18n_namespaceObject.__)('Your theme does not contain any Widget Areas.') |
3265 children: (0,external_wp_i18n_namespaceObject.__)('Your theme does not contain any Widget Areas.') |
3256 }), !selectedWidgetArea && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
3266 }), !selectedWidgetArea && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
|
3267 __next40pxDefaultSize: true, |
3257 href: (0,external_wp_url_namespaceObject.addQueryArgs)('customize.php', { |
3268 href: (0,external_wp_url_namespaceObject.addQueryArgs)('customize.php', { |
3258 'autofocus[panel]': 'widgets', |
3269 'autofocus[panel]': 'widgets', |
3259 return: window.location.pathname |
3270 return: window.location.pathname |
3260 }), |
3271 }), |
3261 variant: "tertiary", |
3272 variant: "tertiary", |
3328 enableComplementaryArea('core/edit-widgets', WIDGET_AREAS_IDENTIFIER); |
3338 enableComplementaryArea('core/edit-widgets', WIDGET_AREAS_IDENTIFIER); |
3329 } |
3339 } |
3330 // We're intentionally leaving `currentArea` and `isGeneralSidebarOpen` |
3340 // We're intentionally leaving `currentArea` and `isGeneralSidebarOpen` |
3331 // out of the dep array because we want this effect to run based on |
3341 // out of the dep array because we want this effect to run based on |
3332 // block selection changes, not sidebar state changes. |
3342 // block selection changes, not sidebar state changes. |
3333 // eslint-disable-next-line react-hooks/exhaustive-deps |
|
3334 }, [hasSelectedNonAreaBlock, enableComplementaryArea]); |
3343 }, [hasSelectedNonAreaBlock, enableComplementaryArea]); |
3335 const tabsContextValue = (0,external_wp_element_namespaceObject.useContext)(Tabs.Context); |
3344 const tabsContextValue = (0,external_wp_element_namespaceObject.useContext)(Tabs.Context); |
3336 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area, { |
3345 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area, { |
3337 className: "edit-widgets-sidebar", |
3346 className: "edit-widgets-sidebar", |
3338 header: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Context.Provider, { |
3347 header: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Context.Provider, { |
3637 }, |
3644 }, |
3638 onClick: toggleInserterSidebar, |
3645 onClick: toggleInserterSidebar, |
3639 icon: library_plus |
3646 icon: library_plus |
3640 /* translators: button label text should, if possible, be under 16 |
3647 /* translators: button label text should, if possible, be under 16 |
3641 characters. */, |
3648 characters. */, |
3642 label: (0,external_wp_i18n_namespaceObject._x)('Toggle block inserter', 'Generic label for block inserter button'), |
3649 label: (0,external_wp_i18n_namespaceObject._x)('Block Inserter', 'Generic label for block inserter button'), |
3643 size: "compact" |
3650 size: "compact" |
3644 }), isMediumViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
3651 }), isMediumViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
3645 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, { |
3652 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, { |
3646 as: undo_redo_undo |
3653 as: undo_redo_undo |
3647 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, { |
3654 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, { |
4201 name: "block-toolbar" |
4201 name: "block-toolbar" |
4202 })] |
4202 })] |
4203 })] |
4203 })] |
4204 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
4204 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
4205 className: "edit-widgets-header__actions", |
4205 className: "edit-widgets-header__actions", |
4206 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(save_button, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pinned_items.Slot, { |
4206 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pinned_items.Slot, { |
4207 scope: "core/edit-widgets" |
4207 scope: "core/edit-widgets" |
4208 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MoreMenu, {})] |
4208 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(save_button, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MoreMenu, {})] |
4209 })] |
4209 })] |
4210 }) |
4210 }) |
4211 }); |
4211 }); |
4212 } |
4212 } |
4213 /* harmony default export */ const header = (Header); |
4213 /* harmony default export */ const header = (Header); |
4214 |
4214 |
4215 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/notices/index.js |
4215 ;// ./node_modules/@wordpress/edit-widgets/build-module/components/notices/index.js |
4216 /** |
4216 /** |
4217 * WordPress dependencies |
4217 * WordPress dependencies |
4218 */ |
4218 */ |
4219 |
4219 |
4220 |
4220 |
4221 |
4221 |
4222 |
4222 |
4223 // Last three notices. Slices from the tail end of the list. |
4223 // Last three notices. Slices from the tail end of the list. |
4224 |
|
4225 |
|
4226 |
4224 |
4227 const MAX_VISIBLE_NOTICES = -3; |
4225 const MAX_VISIBLE_NOTICES = -3; |
4228 function Notices() { |
4226 function Notices() { |
4229 const { |
4227 const { |
4230 removeNotice |
4228 removeNotice |
4294 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(notices, {}), !isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockToolbar, { |
4291 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(notices, {}), !isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockToolbar, { |
4295 hideDragHandle: true |
4292 hideDragHandle: true |
4296 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockTools, { |
4293 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockTools, { |
4297 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, { |
4294 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, { |
4298 styles: styles, |
4295 styles: styles, |
4299 scope: ".editor-styles-wrapper" |
4296 scope: ":where(.editor-styles-wrapper)" |
4300 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSelectionClearer, { |
4297 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSelectionClearer, { |
4301 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.WritingFlow, { |
4298 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.WritingFlow, { |
4302 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, { |
4299 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, { |
4303 className: "edit-widgets-main-block-list" |
4300 className: "edit-widgets-main-block-list" |
4304 }) |
4301 }) |
4408 setIsInserterOpened |
4386 setIsInserterOpened |
4409 } = (0,external_wp_data_namespaceObject.useDispatch)(store_store); |
4387 } = (0,external_wp_data_namespaceObject.useDispatch)(store_store); |
4410 const closeInserter = (0,external_wp_element_namespaceObject.useCallback)(() => { |
4388 const closeInserter = (0,external_wp_element_namespaceObject.useCallback)(() => { |
4411 return setIsInserterOpened(false); |
4389 return setIsInserterOpened(false); |
4412 }, [setIsInserterOpened]); |
4390 }, [setIsInserterOpened]); |
4413 const TagName = !isMobileViewport ? external_wp_components_namespaceObject.VisuallyHidden : 'div'; |
|
4414 const [inserterDialogRef, inserterDialogProps] = (0,external_wp_compose_namespaceObject.__experimentalUseDialog)({ |
4391 const [inserterDialogRef, inserterDialogProps] = (0,external_wp_compose_namespaceObject.__experimentalUseDialog)({ |
4415 onClose: closeInserter, |
4392 onClose: closeInserter, |
4416 focusOnMount: true |
4393 focusOnMount: true |
4417 }); |
4394 }); |
4418 const libraryRef = (0,external_wp_element_namespaceObject.useRef)(); |
4395 const libraryRef = (0,external_wp_element_namespaceObject.useRef)(); |
4419 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
4396 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
4420 ref: inserterDialogRef, |
4397 ref: inserterDialogRef, |
4421 ...inserterDialogProps, |
4398 ...inserterDialogProps, |
4422 className: "edit-widgets-layout__inserter-panel", |
4399 className: "edit-widgets-layout__inserter-panel", |
4423 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { |
4400 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
4424 className: "edit-widgets-layout__inserter-panel-header", |
|
4425 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
|
4426 icon: library_close, |
|
4427 onClick: closeInserter, |
|
4428 label: (0,external_wp_i18n_namespaceObject.__)('Close block inserter') |
|
4429 }) |
|
4430 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
|
4431 className: "edit-widgets-layout__inserter-panel-content", |
4401 className: "edit-widgets-layout__inserter-panel-content", |
4432 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, { |
4402 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, { |
4433 showInserterHelpPanel: true, |
4403 showInserterHelpPanel: true, |
4434 shouldFocusBlock: isMobileViewport, |
4404 shouldFocusBlock: isMobileViewport, |
4435 rootClientId: rootClientId, |
4405 rootClientId: rootClientId, |
4436 __experimentalInsertionIndex: insertionIndex, |
4406 __experimentalInsertionIndex: insertionIndex, |
4437 ref: libraryRef |
4407 ref: libraryRef, |
|
4408 onClose: closeInserter |
4438 }) |
4409 }) |
4439 })] |
4410 }) |
4440 }); |
4411 }); |
4441 } |
4412 } |
4442 |
4413 |
4443 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.js |
4414 ;// ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.js |
4444 /** |
4415 /** |
4445 * WordPress dependencies |
4416 * WordPress dependencies |
4446 */ |
4417 */ |
4447 |
4418 |
4448 |
4419 |
4495 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("strong", { |
4465 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("strong", { |
4496 children: (0,external_wp_i18n_namespaceObject.__)('List View') |
4466 children: (0,external_wp_i18n_namespaceObject.__)('List View') |
4497 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
4467 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { |
4498 icon: close_small, |
4468 icon: close_small, |
4499 label: (0,external_wp_i18n_namespaceObject.__)('Close'), |
4469 label: (0,external_wp_i18n_namespaceObject.__)('Close'), |
4500 onClick: closeListView |
4470 onClick: closeListView, |
|
4471 size: "compact" |
4501 })] |
4472 })] |
4502 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
4473 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
4503 className: "edit-widgets-editor__list-view-panel-content", |
4474 className: "edit-widgets-editor__list-view-panel-content", |
4504 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([focusOnMountRef, setDropZoneElement]), |
4475 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([focusOnMountRef, setDropZoneElement]), |
4505 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalListView, { |
4476 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalListView, { |
4593 } = (0,external_wp_data_namespaceObject.useDispatch)(store_store); |
4562 } = (0,external_wp_data_namespaceObject.useDispatch)(store_store); |
4594 const { |
4563 const { |
4595 hasBlockBreadCrumbsEnabled, |
4564 hasBlockBreadCrumbsEnabled, |
4596 hasSidebarEnabled, |
4565 hasSidebarEnabled, |
4597 isInserterOpened, |
4566 isInserterOpened, |
4598 isListViewOpened, |
4567 isListViewOpened |
4599 previousShortcut, |
|
4600 nextShortcut |
|
4601 } = (0,external_wp_data_namespaceObject.useSelect)(select => ({ |
4568 } = (0,external_wp_data_namespaceObject.useSelect)(select => ({ |
4602 hasSidebarEnabled: !!select(store).getActiveComplementaryArea(store_store.name), |
4569 hasSidebarEnabled: !!select(store).getActiveComplementaryArea(store_store.name), |
4603 isInserterOpened: !!select(store_store).isInserterOpened(), |
4570 isInserterOpened: !!select(store_store).isInserterOpened(), |
4604 isListViewOpened: !!select(store_store).isListViewOpened(), |
4571 isListViewOpened: !!select(store_store).isListViewOpened(), |
4605 hasBlockBreadCrumbsEnabled: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'showBlockBreadcrumbs'), |
4572 hasBlockBreadCrumbsEnabled: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'showBlockBreadcrumbs') |
4606 previousShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-widgets/previous-region'), |
|
4607 nextShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-widgets/next-region') |
|
4608 }), []); |
4573 }), []); |
4609 |
4574 |
4610 // Inserter and Sidebars are mutually exclusive |
4575 // Inserter and Sidebars are mutually exclusive |
4611 (0,external_wp_element_namespaceObject.useEffect)(() => { |
4576 (0,external_wp_element_namespaceObject.useEffect)(() => { |
4612 if (hasSidebarEnabled && !isHugeViewport) { |
4577 if (hasSidebarEnabled && !isHugeViewport) { |
4774 animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif" |
4733 animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif" |
4775 }), |
4734 }), |
4776 content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
4735 content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
4777 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { |
4736 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { |
4778 className: "edit-widgets-welcome-guide__heading", |
4737 className: "edit-widgets-welcome-guide__heading", |
4779 children: (0,external_wp_i18n_namespaceObject.__)('Make each block your own') |
4738 children: (0,external_wp_i18n_namespaceObject.__)('Customize each block') |
4780 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
4739 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
4781 className: "edit-widgets-welcome-guide__text", |
4740 className: "edit-widgets-welcome-guide__text", |
4782 children: (0,external_wp_i18n_namespaceObject.__)('Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.') |
4741 children: (0,external_wp_i18n_namespaceObject.__)('Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.') |
4783 })] |
4742 })] |
4784 }) |
4743 }) |
4788 animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif" |
4747 animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif" |
4789 }), |
4748 }), |
4790 content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
4749 content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
4791 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { |
4750 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { |
4792 className: "edit-widgets-welcome-guide__heading", |
4751 className: "edit-widgets-welcome-guide__heading", |
4793 children: (0,external_wp_i18n_namespaceObject.__)('Get to know the block library') |
4752 children: (0,external_wp_i18n_namespaceObject.__)('Explore all blocks') |
4794 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
4753 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
4795 className: "edit-widgets-welcome-guide__text", |
4754 className: "edit-widgets-welcome-guide__text", |
4796 children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'), { |
4755 children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'), { |
4797 InserterIconImage: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { |
4756 InserterIconImage: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { |
4798 className: "edit-widgets-welcome-guide__inserter-icon", |
4757 className: "edit-widgets-welcome-guide__inserter-icon", |
4808 animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif" |
4767 animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif" |
4809 }), |
4768 }), |
4810 content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
4769 content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
4811 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { |
4770 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { |
4812 className: "edit-widgets-welcome-guide__heading", |
4771 className: "edit-widgets-welcome-guide__heading", |
4813 children: (0,external_wp_i18n_namespaceObject.__)('Learn how to use the block editor') |
4772 children: (0,external_wp_i18n_namespaceObject.__)('Learn more') |
4814 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { |
4773 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { |
4815 className: "edit-widgets-welcome-guide__text", |
4774 className: "edit-widgets-welcome-guide__text", |
4816 children: [(0,external_wp_i18n_namespaceObject.__)('New to the block editor? Want to learn more about using it? '), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { |
4775 children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)("New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"), { |
4817 href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/'), |
4776 a: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { |
4818 children: (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.") |
4777 href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/') |
4819 })] |
4778 }) |
|
4779 }) |
4820 })] |
4780 })] |
4821 }) |
4781 }) |
4822 }] |
4782 }] |
4823 }); |
4783 }); |
4824 } |
4784 } |
4865 }) { |
4825 }) { |
4866 const { |
4826 const { |
4867 createErrorNotice |
4827 createErrorNotice |
4868 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store); |
4828 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store); |
4869 function onPluginAreaError(name) { |
4829 function onPluginAreaError(name) { |
4870 createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: plugin name */ |
4830 createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: plugin name */ |
4871 (0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name)); |
4831 (0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name)); |
4872 } |
4832 } |
|
4833 const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)(); |
4873 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundary, { |
4834 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundary, { |
4874 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(WidgetAreasBlockEditorProvider, { |
4835 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
4875 blockEditorSettings: blockEditorSettings, |
4836 className: navigateRegionsProps.className, |
4876 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(layout_interface, { |
4837 ...navigateRegionsProps, |
4877 blockEditorSettings: blockEditorSettings |
4838 ref: navigateRegionsProps.ref, |
4878 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Sidebar, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_plugins_namespaceObject.PluginArea, { |
4839 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(WidgetAreasBlockEditorProvider, { |
4879 onError: onPluginAreaError |
4840 blockEditorSettings: blockEditorSettings, |
4880 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UnsavedChangesWarning, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {})] |
4841 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(layout_interface, { |
|
4842 blockEditorSettings: blockEditorSettings |
|
4843 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Sidebar, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_plugins_namespaceObject.PluginArea, { |
|
4844 onError: onPluginAreaError |
|
4845 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UnsavedChangesWarning, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {})] |
|
4846 }) |
4881 }) |
4847 }) |
4882 }); |
4848 }); |
4883 } |
4849 } |
4884 /* harmony default export */ const layout = (Layout); |
4850 /* harmony default export */ const layout = (Layout); |
4885 |
4851 |
4886 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/index.js |
4852 ;// ./node_modules/@wordpress/edit-widgets/build-module/index.js |
4887 /** |
4853 /** |
4888 * WordPress dependencies |
4854 * WordPress dependencies |
4889 */ |
4855 */ |
4890 |
4856 |
4891 |
4857 |