homegrade_blocks_production/build/editorAdjustements.js
2025-08-05 15:35:23 +02:00

211 lines
10 KiB
JavaScript

/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "@wordpress/element":
/*!*********************************!*\
!*** external ["wp","element"] ***!
\*********************************/
/***/ ((module) => {
module.exports = window["wp"]["element"];
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
/*!*************************************!*\
!*** ./block_editor_adjustments.js ***!
\*************************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
wp.blocks.updateCategory("homegrade-blocks", {
icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
width: "48",
height: "59",
viewBox: "0 0 48 59",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M47.138 22.741L25.18 0.519C25.0197 0.355198 24.8284 0.224948 24.6172 0.135843C24.406 0.0467371 24.1792 0.000559018 23.95 1.09595e-07C23.4886 -0.000163339 23.046 0.182502 22.719 0.508L0.508003 22.73C0.34656 22.8917 0.218592 23.0837 0.131423 23.2949C0.0442547 23.5061 -0.000404165 23.7325 2.75595e-06 23.961V45.554C2.75595e-06 46.0149 0.183113 46.457 0.509051 46.783C0.834989 47.1089 1.27706 47.292 1.738 47.292H10.832V56.386C10.832 56.8469 11.0151 57.289 11.3411 57.615C11.667 57.9409 12.1091 58.124 12.57 58.124H45.9C46.361 58.124 46.803 57.9409 47.129 57.615C47.4549 57.289 47.638 56.8469 47.638 56.386V23.961C47.6392 23.5042 47.4595 23.0655 47.138 22.741ZM44.147 54.632H14.309V30.174L23.817 20.66L33.27 30.141V38.027C33.27 38.4881 33.4532 38.9303 33.7792 39.2563C34.1052 39.5823 34.5474 39.7655 35.0085 39.7655C35.4696 39.7655 35.9118 39.5823 36.2378 39.2563C36.5638 38.9303 36.747 38.4881 36.747 38.027V29.427C36.7471 28.9676 36.5647 28.527 36.24 28.202L25.048 16.974C24.7223 16.6496 24.2827 16.4655 23.823 16.461C23.3609 16.4622 22.9182 16.6467 22.592 16.974L11.34 28.226C11.015 28.5508 10.8322 28.9915 10.832 29.451V43.8H3.477V24.678L23.939 4.2L44.147 24.673V54.632Z",
fill: "#DF1E1E"
}))
});
wp.blocks.updateCategory("homegrade-pages", {
icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
width: "48",
height: "59",
viewBox: "0 0 48 59",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M47.138 22.741L25.18 0.519C25.0197 0.355198 24.8284 0.224948 24.6172 0.135843C24.406 0.0467371 24.1792 0.000559018 23.95 1.09595e-07C23.4886 -0.000163339 23.046 0.182502 22.719 0.508L0.508003 22.73C0.34656 22.8917 0.218592 23.0837 0.131423 23.2949C0.0442547 23.5061 -0.000404165 23.7325 2.75595e-06 23.961V45.554C2.75595e-06 46.0149 0.183113 46.457 0.509051 46.783C0.834989 47.1089 1.27706 47.292 1.738 47.292H10.832V56.386C10.832 56.8469 11.0151 57.289 11.3411 57.615C11.667 57.9409 12.1091 58.124 12.57 58.124H45.9C46.361 58.124 46.803 57.9409 47.129 57.615C47.4549 57.289 47.638 56.8469 47.638 56.386V23.961C47.6392 23.5042 47.4595 23.0655 47.138 22.741ZM44.147 54.632H14.309V30.174L23.817 20.66L33.27 30.141V38.027C33.27 38.4881 33.4532 38.9303 33.7792 39.2563C34.1052 39.5823 34.5474 39.7655 35.0085 39.7655C35.4696 39.7655 35.9118 39.5823 36.2378 39.2563C36.5638 38.9303 36.747 38.4881 36.747 38.027V29.427C36.7471 28.9676 36.5647 28.527 36.24 28.202L25.048 16.974C24.7223 16.6496 24.2827 16.4655 23.823 16.461C23.3609 16.4622 22.9182 16.6467 22.592 16.974L11.34 28.226C11.015 28.5508 10.8322 28.9915 10.832 29.451V43.8H3.477V24.678L23.939 4.2L44.147 24.673V54.632Z",
fill: "#DF1E1E"
}))
});
wp.blocks.updateCategory("homegrade-page-home", {
icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
width: "48",
height: "59",
viewBox: "0 0 48 59",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M47.138 22.741L25.18 0.519C25.0197 0.355198 24.8284 0.224948 24.6172 0.135843C24.406 0.0467371 24.1792 0.000559018 23.95 1.09595e-07C23.4886 -0.000163339 23.046 0.182502 22.719 0.508L0.508003 22.73C0.34656 22.8917 0.218592 23.0837 0.131423 23.2949C0.0442547 23.5061 -0.000404165 23.7325 2.75595e-06 23.961V45.554C2.75595e-06 46.0149 0.183113 46.457 0.509051 46.783C0.834989 47.1089 1.27706 47.292 1.738 47.292H10.832V56.386C10.832 56.8469 11.0151 57.289 11.3411 57.615C11.667 57.9409 12.1091 58.124 12.57 58.124H45.9C46.361 58.124 46.803 57.9409 47.129 57.615C47.4549 57.289 47.638 56.8469 47.638 56.386V23.961C47.6392 23.5042 47.4595 23.0655 47.138 22.741ZM44.147 54.632H14.309V30.174L23.817 20.66L33.27 30.141V38.027C33.27 38.4881 33.4532 38.9303 33.7792 39.2563C34.1052 39.5823 34.5474 39.7655 35.0085 39.7655C35.4696 39.7655 35.9118 39.5823 36.2378 39.2563C36.5638 38.9303 36.747 38.4881 36.747 38.027V29.427C36.7471 28.9676 36.5647 28.527 36.24 28.202L25.048 16.974C24.7223 16.6496 24.2827 16.4655 23.823 16.461C23.3609 16.4622 22.9182 16.6467 22.592 16.974L11.34 28.226C11.015 28.5508 10.8322 28.9915 10.832 29.451V43.8H3.477V24.678L23.939 4.2L44.147 24.673V54.632Z",
fill: "#DF1E1E"
}))
});
// Register our property at core/heading
// wp.hooks.addFilter(
// "blocks.registerBlockType",
// "homegrade-blocks/block_editor_adjustments", // our custom namespace
// function (settings, name) {
// if (name !== "core/button") {
// // skip other core blocks
// return settings;
// }
// settings.attributes = Object.assign(settings.attributes, {
// buttonVariant: {
// type: "boolean",
// default: false,
// },
// });
// return settings;
// }
// );
// Display the custom ToggleControl for every header; toggle the custom property
// wp.hooks.addFilter(
// "editor.BlockEdit",
// "homegrade-blocks/block_editor_adjustments",
// wp.compose.createHigherOrderComponent(function (BlockEdit) {
// return function (props) {
// if (props.name !== "core/button") {
// // skip other core blocks
// return wp.element.createElement(BlockEdit, props);
// }
// return wp.element.createElement(
// wp.element.Fragment,
// {},
// wp.element.createElement(
// wp.blockEditor.InspectorControls,
// {},
// wp.element.createElement(
// wp.components.PanelBody,
// {},
// wp.element.createElement(
// wp.components.ToggleControl,
// {
// label: "Show in Table of Contents",
// checked: props.attributes.buttonVariant,
// onChange: (value) => {
// props.setAttributes({
// buttonVariant: value,
// });
// },
// }
// )
// )
// ),
// wp.element.createElement(BlockEdit, props)
// );
// };
// })
// );
// Convert the custom property value into CSS class name on every save
// wp.hooks.addFilter(
// "blocks.getSaveContent.extraProps",
// "homegrade-blocks/block_editor_adjustments",
// function (extraProps, blockType, attributes) {
// if (blockType.name !== "core/button") {
// // skip other core blocks
// return extraProps;
// }
// if (attributes.buttonVariant) {
// extraProps.className = extraProps.className + " lol " + " extra-props-de-antoine";
// }
// return extraProps;
// }
// );
})();
/******/ })()
;
//# sourceMappingURL=editorAdjustements.js.map