From d2d06f04e2c0b1b9353e47551ee3bdba9f42f78c Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 8 Apr 2026 16:04:48 +0200 Subject: [PATCH] FEATURE Refining color prop drealing --- .../build/chapter-section/index-rtl.css | 14 + .../build/chapter-section/index.asset.php | 2 +- .../build/chapter-section/index.css | 9 +- .../build/chapter-section/index.css.map | 1 - .../build/chapter-section/index.js | 878 +----------------- .../build/chapter-section/index.js.map | 1 - .../build/chapter-section/style-index.css | 9 +- .../build/chapter-section/style-index.css.map | 1 - .../build/chapter-section/view.js | 7 - .../carhop-blocks/src/chapter-section/edit.js | 1 - .../src/chapter-section/editor.scss | 13 + .../carhop-blocks/src/chapter-section/save.js | 6 +- 12 files changed, 35 insertions(+), 907 deletions(-) delete mode 100644 plugins/carhop-blocks/build/chapter-section/index.css.map delete mode 100644 plugins/carhop-blocks/build/chapter-section/index.js.map delete mode 100644 plugins/carhop-blocks/build/chapter-section/style-index.css.map diff --git a/plugins/carhop-blocks/build/chapter-section/index-rtl.css b/plugins/carhop-blocks/build/chapter-section/index-rtl.css index bb7dc51..4b157a4 100644 --- a/plugins/carhop-blocks/build/chapter-section/index-rtl.css +++ b/plugins/carhop-blocks/build/chapter-section/index-rtl.css @@ -4,3 +4,17 @@ .wp-block-carhop-blocks-chapter-section { margin: 2rem calc(50% - 50vw); } + +.chapter-section--bg-light { + --cta-current-color: var(--wp--preset--color--carhop-green, inherit); +} + +.chapter-section--bg-light .wp-block-carhop-blocks-cta { + --cta-current-color: var(--wp--preset--color--carhop-green, inherit); +} + +.chapter-section--bg-light .wp-block-carhop-blocks-cta svg, +.chapter-section--bg-light .wp-block-carhop-blocks-cta path, +.chapter-section--bg-light .wp-block-carhop-blocks-cta circle { + stroke: var(--wp--preset--color--carhop-green, inherit); +} diff --git a/plugins/carhop-blocks/build/chapter-section/index.asset.php b/plugins/carhop-blocks/build/chapter-section/index.asset.php index ac055dc..95ff44f 100644 --- a/plugins/carhop-blocks/build/chapter-section/index.asset.php +++ b/plugins/carhop-blocks/build/chapter-section/index.asset.php @@ -1 +1 @@ - array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '9272ca653d58c468069b'); + array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '214b3911267e4d3bf438'); diff --git a/plugins/carhop-blocks/build/chapter-section/index.css b/plugins/carhop-blocks/build/chapter-section/index.css index a664a21..79d091c 100644 --- a/plugins/carhop-blocks/build/chapter-section/index.css +++ b/plugins/carhop-blocks/build/chapter-section/index.css @@ -1,8 +1 @@ -/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/chapter-section/editor.scss ***! - \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -.wp-block-carhop-blocks-chapter-section { - margin: 2rem calc(50% - 50vw); -} - -/*# sourceMappingURL=index.css.map*/ \ No newline at end of file +.wp-block-carhop-blocks-chapter-section{margin:2rem calc(50% - 50vw)}.chapter-section--bg-light,.chapter-section--bg-light .wp-block-carhop-blocks-cta{--cta-current-color:var(--wp--preset--color--carhop-green,inherit)}.chapter-section--bg-light .wp-block-carhop-blocks-cta circle,.chapter-section--bg-light .wp-block-carhop-blocks-cta path,.chapter-section--bg-light .wp-block-carhop-blocks-cta svg{stroke:var(--wp--preset--color--carhop-green,inherit)} diff --git a/plugins/carhop-blocks/build/chapter-section/index.css.map b/plugins/carhop-blocks/build/chapter-section/index.css.map deleted file mode 100644 index 8dd140e..0000000 --- a/plugins/carhop-blocks/build/chapter-section/index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chapter-section/index.css","mappings":";;;AAAA;EACC;AACD,C","sources":["webpack://carhop-blocks/./src/chapter-section/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-chapter-section {\n\tmargin: 2rem calc(50% - 50vw);\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/chapter-section/index.js b/plugins/carhop-blocks/build/chapter-section/index.js index 37ab6fd..ececa11 100644 --- a/plugins/carhop-blocks/build/chapter-section/index.js +++ b/plugins/carhop-blocks/build/chapter-section/index.js @@ -1,877 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "./_utilities/utilities.js": -/*!*********************************!*\ - !*** ./_utilities/utilities.js ***! - \*********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ isColorLight: () => (/* binding */ isColorLight) -/* harmony export */ }); -// Fonction pour déterminer si une couleur est claire ou sombre -function isColorLight(color) { - // Si pas de couleur, considérer comme claire - if (!color) return true; - - // Convertir hex en RGB - let hex = color.replace("#", ""); - if (hex.length === 3) { - hex = hex.split("").map(char => char + char).join(""); - } - const r = parseInt(hex.substr(0, 2), 16); - const g = parseInt(hex.substr(2, 2), 16); - const b = parseInt(hex.substr(4, 2), 16); - - // Calculer la luminance relative (formule standard) - const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255; - - // Si luminance > 0.5, la couleur est claire - return luminance > 0.5; -} - -/***/ }), - -/***/ "./node_modules/.pnpm/@wordpress+icons@11.2.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js": -/*!*****************************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+icons@11.2.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js ***! - \*****************************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ trash_default) -/* harmony export */ }); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); -// packages/icons/src/library/trash.tsx - - -var trash_default = /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)( - _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, - { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z" - } -) }); - -//# sourceMappingURL=trash.js.map - - -/***/ }), - -/***/ "./src/chapter-section/block.json": -/*!****************************************!*\ - !*** ./src/chapter-section/block.json ***! - \****************************************/ -/***/ ((module) => { - -module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/chapter-section","version":"0.1.0","title":" Section Chapitre","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false,"border":{"color":true,"style":true,"width":true}},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"align":{"type":"string","default":"full"},"blockWidth":{"type":"string","default":"full","enum":["full","contained"]},"coverType":{"type":"string","default":"image","enum":["classic","photoframe"]},"coverUrl":{"type":"string"},"coverAlt":{"type":"string"},"coverId":{"type":"number"},"coverSize":{"type":"string","default":"large","enum":["small","medium","grande","large"]},"disposition":{"type":"string","default":"left","enum":["left","right"]},"hasBorder":{"type":"boolean","default":false},"blockVariant":{"type":"string","default":"framed","enum":["framed","backgrounded","nude"]},"borderColor":{"type":"string","default":"#136f63"},"backgroundColor":{"type":"string","default":"#ffffff"},"hasLightBackground":{"type":"boolean","default":true},"textColor":{"type":"string","default":"#136f63"},"shapeType":{"type":"string","default":"variationA","enum":["variationA","variationB"]}},"usesContext":["postType","postId"]}'); - -/***/ }), - -/***/ "./src/chapter-section/edit.js": -/*!*************************************!*\ - !*** ./src/chapter-section/edit.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Edit) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _shapeA_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shapeA.jsx */ "./src/chapter-section/shapeA.jsx"); -/* harmony import */ var _shapeB_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shapeB.jsx */ "./src/chapter-section/shapeB.jsx"); -/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/.pnpm/@wordpress+icons@11.2.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editor.scss */ "./src/chapter-section/editor.scss"); -/* harmony import */ var _utilities_utilities__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../_utilities/utilities */ "./_utilities/utilities.js"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__); - - - - - - - - - - - - -function Edit({ - attributes, - setAttributes, - ...props -}) { - const colors = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useSetting)("color.palette.theme"); - const { - hasLightBackground, - disposition, - coverType, - coverUrl, - coverAlt, - coverId, - coverSize, - backgroundColor, - blockWidth, - textColor, - shapeType, - blockVariant, - borderColor - } = attributes; - function onDispositionChange(disposition) { - setAttributes({ - disposition - }); - } - function setCoverAttributes(cover) { - setAttributes({ - coverId: cover.id, - coverAlt: cover.alt, - coverUrl: cover.url - }); - } - function removeCoverAttributes() { - setAttributes({ - coverId: null, - coverAlt: null, - coverUrl: null - }); - } - function onBackgroundColorChange(value) { - if (!value) return; - setAttributes({ - backgroundColor: value - }); - setHasLightBackground(value); - } - function onCoverTypeChange(value) { - setAttributes({ - coverType: value - }); - } - function onBlockVariantChange(value) { - setAttributes({ - blockVariant: value - }); - if (value === "framed" || value === "nude") { - setAttributes({ - backgroundColor: "#fff" - }); - setAttributes({ - hasLightBackground: true - }); - } - } - function setHasLightBackground(backgroundColor) { - if (!backgroundColor) return; - const isLightBackgroundColor = (0,_utilities_utilities__WEBPACK_IMPORTED_MODULE_7__.isColorLight)(backgroundColor); - setAttributes({ - hasLightBackground: isLightBackgroundColor - }); - } - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment, { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { - className: "deligraph-blocks-components-image__panel-body", - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Aspect & Variante de bloc", "deligraph-blocks"), - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, { - className: "deligraph-blocks__variant", - isBlock: true, - label: "Largeur du bloc", - onChange: value => setAttributes({ - blockWidth: value - }), - value: blockWidth, - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Contenue", - value: "contained" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Pleine largeur", - value: "full" - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, { - className: "deligraph-blocks__variant", - isBlock: true, - label: "Mod\xE8le de bloc", - onChange: onBlockVariantChange, - value: blockVariant, - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Nu", - value: "nude" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Encadr\xE9", - value: "framed" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Fond Color\xE9", - value: "backgrounded" - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, { - className: "deligraph-blocks__variant", - isBlock: true, - label: "Disposition", - onChange: onDispositionChange, - value: disposition, - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Gauche", - value: "left" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Droite", - value: "right" - })] - })] - }), blockVariant === "backgrounded" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { - className: "deligraph-blocks-components-image__panel-body", - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Arrière plan", "deligraph-blocks"), - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, { - className: "deligraph-blocks__variant", - isBlock: true, - label: "Type de forme", - onChange: value => setAttributes({ - shapeType: value - }), - value: shapeType, - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Variation A", - value: "variationA" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Variation B", - value: "variationB" - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ColorPalette, { - colors: colors, - value: backgroundColor, - onChange: onBackgroundColorChange - })] - }), blockVariant === "framed" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { - className: "deligraph-blocks-components-image__panel-body", - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Bordure", "deligraph-blocks"), - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, { - className: "deligraph-blocks__variant", - isBlock: true, - label: "Type de forme", - onChange: value => setAttributes({ - shapeType: value - }), - value: shapeType, - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Variation A", - value: "variationA" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Variation B", - value: "variationB" - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ColorPalette, { - colors: colors, - value: borderColor, - onChange: value => setAttributes({ - borderColor: value - }) - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { - className: "deligraph-blocks-components-image__panel-body", - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Image d'accompagnement", "deligraph-blocks"), - initialOpen: false, - children: [coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", { - src: coverUrl, - alt: coverAlt - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", { - className: "media-replace-container", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaReplaceFlow, { - mediaId: coverId, - mediaUrl: coverUrl, - allowedTypes: ["image"], - accept: "image/*", - onSelect: setCoverAttributes, - name: !coverUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Ajouter votre image manuellement", "homegrade-blocks") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Remplacer", "homegrade-blocks") - }), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment, { - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.Button, { - className: "custom-flow-button", - variant: "primary", - icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], - label: "Supprimer", - onClick: removeCoverAttributes - }) - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, { - className: "deligraph-blocks__variant", - isBlock: true, - label: "Type d'image", - onChange: onCoverTypeChange, - value: coverType, - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Classique", - value: "classic" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Encadr\xE9e", - value: "photoframe" - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControl, { - className: "deligraph-blocks__variant", - isBlock: true, - label: "Taille de l'image", - onChange: coverSize => setAttributes({ - coverSize - }), - value: coverSize, - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Big", - value: "large" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Grande", - value: "grande" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Moyenne", - value: "medium" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalToggleGroupControlOption, { - label: "Petite", - value: "small" - })] - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { - className: "deligraph-blocks-components-image__panel-body", - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Couleur du texte", "deligraph-blocks"), - initialOpen: false, - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ColorPalette, { - colors: colors, - value: textColor, - onChange: value => setAttributes({ - textColor: value - }) - }) - })] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("section", { - ...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({ - className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} chapter-section--${blockVariant} - ${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"} - - ${hasLightBackground ? "chapter-section--bg-light" : "chapter-section--bg-dark"}`, - style: { - "--chapter-section-text-color": textColor ? textColor : "#136f63", - "--cta-current-color": blockVariant === "backgrounded" ? "inherit" : "var(--wp--preset--color--primary) !important" - } - }), - children: [blockVariant === "backgrounded" && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_shapeA_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], { - backgroundColor: backgroundColor, - borderColor: "none" - }), blockVariant === "backgrounded" && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_shapeB_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], { - backgroundColor: backgroundColor, - borderColor: "none" - }), blockVariant === "framed" && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_shapeA_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], { - backgroundColor: "none", - borderColor: borderColor - }), blockVariant === "framed" && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_shapeB_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], { - backgroundColor: "none", - borderColor: borderColor - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", { - className: "chapter-section__content", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", { - className: "chapter-section__innerblocks", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, { - template: [["carhop-blocks/heading", { - innerBlocks: [["core/heading", { - content: "Un titre précis " - }]] - }], ["core/paragraph", { - className: "chapter-section__title", - placeholder: "Chapter Title", - content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue augue, sagittis quis mauris in, consequat vehicula est. Aliquam quis nulla ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum eget lorem eget aliquet. Fusce vel consequat neque. " - }]], - allowedBlocks: ["core/heading", "core/paragraph", "core/list", "core/file", "core/button", "core/buttons", "carhop-blocks/heading", "carhop-blocks/cta", "carhop-blocks/cta-group"] - }) - }) - }), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", { - className: `chapter-section__cover chapter-section__cover--${coverSize} chapter-section__cover--${coverType}`, - src: coverUrl, - alt: coverAlt - }), !coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaPlaceholder, { - accept: "image/*", - allowedTypes: ["image"], - onSelect: setCoverAttributes, - multiple: false, - handleUpload: true - })] - })] - }); -} - -/***/ }), - -/***/ "./src/chapter-section/editor.scss": -/*!*****************************************!*\ - !*** ./src/chapter-section/editor.scss ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -// extracted by mini-css-extract-plugin - - -/***/ }), - -/***/ "./src/chapter-section/index.js": -/*!**************************************!*\ - !*** ./src/chapter-section/index.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/chapter-section/style.scss"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/chapter-section/edit.js"); -/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/chapter-section/save.js"); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/chapter-section/block.json"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); - - - - - - -(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, { - icon: { - src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", { - d: "M21,7H3V4A1,1,0,0,1,4,3H20a1,1,0,0,1,1,1ZM3,20V9H21V20a1,1,0,0,1-1,1H4A1,1,0,0,1,3,20Zm3-6H18V12H6Zm0,4h6V16H6Z" - }) - }), - foreground: "#136f63" - }, - edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"], - save: _save__WEBPACK_IMPORTED_MODULE_3__["default"] -}); - -/***/ }), - -/***/ "./src/chapter-section/save.js": -/*!*************************************!*\ - !*** ./src/chapter-section/save.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ save) -/* harmony export */ }); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _shapeA_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shapeA.jsx */ "./src/chapter-section/shapeA.jsx"); -/* harmony import */ var _shapeB_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shapeB.jsx */ "./src/chapter-section/shapeB.jsx"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); - - - - -function save({ - attributes -}) { - const { - hasLightBackground, - disposition, - coverUrl, - coverAlt, - coverSize, - coverType, - backgroundColor, - blockWidth, - textColor, - shapeType, - blockVariant, - borderColor - } = attributes; - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", { - ..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({ - className: `deligraph-blocks-chapter-section chapter-section chapter-section--${disposition} chapter-section--${blockVariant} - ${blockWidth === "full" ? "chapter-section--width-full" : "chapter-section--width-contained"} - - ${hasLightBackground ? "chapter-section--bg-light" : " "}`, - style: { - "--chapter-section-text-color": textColor ? textColor : "#136f63", - "--cta-current-color": blockVariant === "backgrounded" ? "inherit" : "var(--wp--preset--color--primary) !important" - } - }), - children: [blockVariant === "backgrounded" && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_shapeA_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], { - backgroundColor: backgroundColor, - borderColor: "none" - }), blockVariant === "backgrounded" && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_shapeB_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], { - backgroundColor: backgroundColor, - borderColor: "none" - }), blockVariant === "framed" && backgroundColor && shapeType === "variationA" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_shapeA_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], { - backgroundColor: "none", - borderColor: borderColor - }), blockVariant === "framed" && backgroundColor && shapeType === "variationB" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_shapeB_jsx__WEBPACK_IMPORTED_MODULE_2__["default"], { - backgroundColor: "none", - borderColor: borderColor - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { - className: "chapter-section__content", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { - className: "chapter-section__innerblocks", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {}) - }) - }), coverUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", { - className: `chapter-section__cover chapter-section__cover--${coverSize} chapter-section__cover--${coverType}`, - src: coverUrl, - alt: coverAlt - })] - }); -} - -/***/ }), - -/***/ "./src/chapter-section/shapeA.jsx": -/*!****************************************!*\ - !*** ./src/chapter-section/shapeA.jsx ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ShapeA) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); - - -function ShapeA({ - backgroundOrientation, - backgroundColor, - borderColor -}) { - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", { - width: "1440", - height: "744", - viewBox: "0 0 1440 744", - fill: "none", - xmlns: "http://www.w3.org/2000/svg", - className: `chapter-section__background chapter-section__background--${backgroundOrientation}`, - preserveAspectRatio: "none", - vectorEffect: "non-scaling-stroke", - overflow: "visible", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { - d: "M0 0H1440V686.701L0 744V0Z", - fill: backgroundColor, - stroke: borderColor, - strokeWidth: borderColor ? "2px" : "0", - style: { - strokeLinejoin: "round", - vectorEffect: "non-scaling-stroke" - } - }) - }); -} - -/***/ }), - -/***/ "./src/chapter-section/shapeB.jsx": -/*!****************************************!*\ - !*** ./src/chapter-section/shapeB.jsx ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ShapeB) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); - - -function ShapeB({ - backgroundOrientation, - backgroundColor, - borderColor -}) { - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", { - className: `chapter-section__background chapter-section__background--${backgroundOrientation}`, - width: "1302", - height: "654", - viewBox: "0 0 1302 654", - preserveAspectRatio: "none", - vectorEffect: "non-scaling-stroke", - overflow: "visible", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { - d: "M1302 0L0 15.8281V654L1302 642.633L1302 0Z", - fill: backgroundColor, - stroke: borderColor, - strokeWidth: borderColor ? "2px" : "0", - style: { - strokeLinejoin: "round", - vectorEffect: "non-scaling-stroke" - } - }) - }); -} - -/***/ }), - -/***/ "./src/chapter-section/style.scss": -/*!****************************************!*\ - !*** ./src/chapter-section/style.scss ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -// extracted by mini-css-extract-plugin - - -/***/ }), - -/***/ "@wordpress/block-editor": -/*!*************************************!*\ - !*** external ["wp","blockEditor"] ***! - \*************************************/ -/***/ ((module) => { - -module.exports = window["wp"]["blockEditor"]; - -/***/ }), - -/***/ "@wordpress/blocks": -/*!********************************!*\ - !*** external ["wp","blocks"] ***! - \********************************/ -/***/ ((module) => { - -module.exports = window["wp"]["blocks"]; - -/***/ }), - -/***/ "@wordpress/components": -/*!************************************!*\ - !*** external ["wp","components"] ***! - \************************************/ -/***/ ((module) => { - -module.exports = window["wp"]["components"]; - -/***/ }), - -/***/ "@wordpress/i18n": -/*!******************************!*\ - !*** external ["wp","i18n"] ***! - \******************************/ -/***/ ((module) => { - -module.exports = window["wp"]["i18n"]; - -/***/ }), - -/***/ "@wordpress/primitives": -/*!************************************!*\ - !*** external ["wp","primitives"] ***! - \************************************/ -/***/ ((module) => { - -module.exports = window["wp"]["primitives"]; - -/***/ }), - -/***/ "react": -/*!************************!*\ - !*** external "React" ***! - \************************/ -/***/ ((module) => { - -module.exports = window["React"]; - -/***/ }), - -/***/ "react/jsx-runtime": -/*!**********************************!*\ - !*** external "ReactJSXRuntime" ***! - \**********************************/ -/***/ ((module) => { - -module.exports = window["ReactJSXRuntime"]; - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // 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; -/******/ } -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = __webpack_modules__; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/chunk loaded */ -/******/ (() => { -/******/ var deferred = []; -/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { -/******/ if(chunkIds) { -/******/ priority = priority || 0; -/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; -/******/ deferred[i] = [chunkIds, fn, priority]; -/******/ return; -/******/ } -/******/ var notFulfilled = Infinity; -/******/ for (var i = 0; i < deferred.length; i++) { -/******/ var [chunkIds, fn, priority] = deferred[i]; -/******/ var fulfilled = true; -/******/ for (var j = 0; j < chunkIds.length; j++) { -/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { -/******/ chunkIds.splice(j--, 1); -/******/ } else { -/******/ fulfilled = false; -/******/ if(priority < notFulfilled) notFulfilled = priority; -/******/ } -/******/ } -/******/ if(fulfilled) { -/******/ deferred.splice(i--, 1) -/******/ var r = fn(); -/******/ if (r !== undefined) result = r; -/******/ } -/******/ } -/******/ return result; -/******/ }; -/******/ })(); -/******/ -/******/ /* 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 }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/jsonp chunk loading */ -/******/ (() => { -/******/ // no baseURI -/******/ -/******/ // object to store loaded and loading chunks -/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched -/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded -/******/ var installedChunks = { -/******/ "chapter-section/index": 0, -/******/ "chapter-section/style-index": 0 -/******/ }; -/******/ -/******/ // no chunk on demand loading -/******/ -/******/ // no prefetching -/******/ -/******/ // no preloaded -/******/ -/******/ // no HMR -/******/ -/******/ // no HMR manifest -/******/ -/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); -/******/ -/******/ // install a JSONP callback for chunk loading -/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { -/******/ var [chunkIds, moreModules, runtime] = data; -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0; -/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { -/******/ for(moduleId in moreModules) { -/******/ if(__webpack_require__.o(moreModules, moduleId)) { -/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(runtime) var result = runtime(__webpack_require__); -/******/ } -/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { -/******/ installedChunks[chunkId][0](); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ return __webpack_require__.O(result); -/******/ } -/******/ -/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || []; -/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); -/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); -/******/ })(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module depends on other loaded chunks and execution need to be delayed -/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["chapter-section/style-index"], () => (__webpack_require__("./src/chapter-section/index.js"))) -/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); -/******/ -/******/ })() -; -//# sourceMappingURL=index.js.map \ No newline at end of file +(()=>{"use strict";var e,o={3603:()=>{const e=window.wp.blocks,o=window.wp.i18n,r=window.wp.blockEditor,l=(window.React,window.ReactJSXRuntime);function a({backgroundOrientation:e,backgroundColor:o,borderColor:r}){return(0,l.jsx)("svg",{width:"1440",height:"744",viewBox:"0 0 1440 744",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`chapter-section__background chapter-section__background--${e}`,preserveAspectRatio:"none",vectorEffect:"non-scaling-stroke",overflow:"visible",children:(0,l.jsx)("path",{d:"M0 0H1440V686.701L0 744V0Z",fill:o,stroke:r,strokeWidth:r?"2px":"0",style:{strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}})})}function t({backgroundOrientation:e,backgroundColor:o,borderColor:r}){return(0,l.jsx)("svg",{className:`chapter-section__background chapter-section__background--${e}`,width:"1302",height:"654",viewBox:"0 0 1302 654",preserveAspectRatio:"none",vectorEffect:"non-scaling-stroke",overflow:"visible",children:(0,l.jsx)("path",{d:"M1302 0L0 15.8281V654L1302 642.633L1302 0Z",fill:o,stroke:r,strokeWidth:r?"2px":"0",style:{strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}})})}const n=window.wp.primitives;var i=(0,l.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});const c=window.wp.components,s=JSON.parse('{"UU":"carhop-blocks/chapter-section"}');(0,e.registerBlockType)(s.UU,{icon:{src:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M21,7H3V4A1,1,0,0,1,4,3H20a1,1,0,0,1,1,1ZM3,20V9H21V20a1,1,0,0,1-1,1H4A1,1,0,0,1,3,20Zm3-6H18V12H6Zm0,4h6V16H6Z"})}),foreground:"#136f63"},edit:function({attributes:e,setAttributes:n,...s}){const p=(0,r.useSetting)("color.palette.theme"),{hasLightBackground:d,disposition:g,coverType:u,coverUrl:h,coverAlt:b,coverId:m,coverSize:v,backgroundColor:_,blockWidth:x,textColor:k,shapeType:C,blockVariant:j,borderColor:f}=e;function w(e){n({coverId:e.id,coverAlt:e.alt,coverUrl:e.url})}return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.InspectorControls,{children:[(0,l.jsxs)(c.PanelBody,{className:"deligraph-blocks-components-image__panel-body",title:(0,o.__)("Aspect & Variante de bloc","deligraph-blocks"),children:[(0,l.jsxs)(c.__experimentalToggleGroupControl,{className:"deligraph-blocks__variant",isBlock:!0,label:"Largeur du bloc",onChange:e=>n({blockWidth:e}),value:x,children:[(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Contenue",value:"contained"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Pleine largeur",value:"full"})]}),(0,l.jsxs)(c.__experimentalToggleGroupControl,{className:"deligraph-blocks__variant",isBlock:!0,label:"Modèle de bloc",onChange:function(e){n({blockVariant:e}),"framed"!==e&&"nude"!==e||(n({backgroundColor:"#fff"}),n({hasLightBackground:!0}))},value:j,children:[(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Nu",value:"nude"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Encadré",value:"framed"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Fond Coloré",value:"backgrounded"})]}),(0,l.jsxs)(c.__experimentalToggleGroupControl,{className:"deligraph-blocks__variant",isBlock:!0,label:"Disposition",onChange:function(e){n({disposition:e})},value:g,children:[(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Gauche",value:"left"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Droite",value:"right"})]})]}),"backgrounded"===j&&(0,l.jsxs)(c.PanelBody,{className:"deligraph-blocks-components-image__panel-body",title:(0,o.__)("Arrière plan","deligraph-blocks"),children:[(0,l.jsxs)(c.__experimentalToggleGroupControl,{className:"deligraph-blocks__variant",isBlock:!0,label:"Type de forme",onChange:e=>n({shapeType:e}),value:C,children:[(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Variation A",value:"variationA"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Variation B",value:"variationB"})]}),(0,l.jsx)(c.ColorPalette,{colors:p,value:_,onChange:function(e){e&&(n({backgroundColor:e}),function(e){if(!e)return;const o=function(e){if(!e)return!0;let o=e.replace("#","");return 3===o.length&&(o=o.split("").map(e=>e+e).join("")),(.299*parseInt(o.substr(0,2),16)+.587*parseInt(o.substr(2,2),16)+.114*parseInt(o.substr(4,2),16))/255>.5}(e);n({hasLightBackground:o})}(e))}})]}),"framed"===j&&(0,l.jsxs)(c.PanelBody,{className:"deligraph-blocks-components-image__panel-body",title:(0,o.__)("Bordure","deligraph-blocks"),children:[(0,l.jsxs)(c.__experimentalToggleGroupControl,{className:"deligraph-blocks__variant",isBlock:!0,label:"Type de forme",onChange:e=>n({shapeType:e}),value:C,children:[(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Variation A",value:"variationA"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Variation B",value:"variationB"})]}),(0,l.jsx)(c.ColorPalette,{colors:p,value:f,onChange:e=>n({borderColor:e})})]}),(0,l.jsxs)(c.PanelBody,{className:"deligraph-blocks-components-image__panel-body",title:(0,o.__)("Image d'accompagnement","deligraph-blocks"),initialOpen:!1,children:[h&&(0,l.jsx)("img",{src:h,alt:b}),(0,l.jsxs)("div",{className:"media-replace-container",children:[(0,l.jsx)(r.MediaReplaceFlow,{mediaId:m,mediaUrl:h,allowedTypes:["image"],accept:"image/*",onSelect:w,name:h?(0,o.__)("Remplacer","homegrade-blocks"):(0,o.__)("Ajouter votre image manuellement","homegrade-blocks")}),h&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(c.Button,{className:"custom-flow-button",variant:"primary",icon:i,label:"Supprimer",onClick:function(){n({coverId:null,coverAlt:null,coverUrl:null})}})})]}),(0,l.jsxs)(c.__experimentalToggleGroupControl,{className:"deligraph-blocks__variant",isBlock:!0,label:"Type d'image",onChange:function(e){n({coverType:e})},value:u,children:[(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Classique",value:"classic"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Encadrée",value:"photoframe"})]}),(0,l.jsxs)(c.__experimentalToggleGroupControl,{className:"deligraph-blocks__variant",isBlock:!0,label:"Taille de l'image",onChange:e=>n({coverSize:e}),value:v,children:[(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Big",value:"large"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Grande",value:"grande"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Moyenne",value:"medium"}),(0,l.jsx)(c.__experimentalToggleGroupControlOption,{label:"Petite",value:"small"})]})]}),(0,l.jsx)(c.PanelBody,{className:"deligraph-blocks-components-image__panel-body",title:(0,o.__)("Couleur du texte","deligraph-blocks"),initialOpen:!1,children:(0,l.jsx)(c.ColorPalette,{colors:p,value:k,onChange:e=>n({textColor:e})})})]}),(0,l.jsxs)("section",{...(0,r.useBlockProps)({className:`deligraph-blocks-chapter-section chapter-section chapter-section--${g} chapter-section--${j}\n\t\t\t\t\t\t${"full"===x?"chapter-section--width-full":"chapter-section--width-contained"}\n\t\t\t\n\t\t\t\t\t\t${d?"chapter-section--bg-light":"chapter-section--bg-dark"}`,style:{"--chapter-section-text-color":k||"#136f63","--cta-current-color":"backgrounded"===j?"inherit":"var(--wp--preset--color--primary) !important"}}),children:["backgrounded"===j&&_&&"variationA"===C&&(0,l.jsx)(a,{backgroundColor:_,borderColor:"none"}),"backgrounded"===j&&_&&"variationB"===C&&(0,l.jsx)(t,{backgroundColor:_,borderColor:"none"}),"framed"===j&&_&&"variationA"===C&&(0,l.jsx)(a,{backgroundColor:"none",borderColor:f}),"framed"===j&&_&&"variationB"===C&&(0,l.jsx)(t,{backgroundColor:"none",borderColor:f}),(0,l.jsx)("div",{className:"chapter-section__content",children:(0,l.jsx)("div",{className:"chapter-section__innerblocks",children:(0,l.jsx)(r.InnerBlocks,{template:[["carhop-blocks/heading",{innerBlocks:[["core/heading",{content:"Un titre précis "}]]}],["core/paragraph",{className:"chapter-section__title",placeholder:"Chapter Title",content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue augue, sagittis quis mauris in, consequat vehicula est. Aliquam quis nulla ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum eget lorem eget aliquet. Fusce vel consequat neque. "}]],allowedBlocks:["core/heading","core/paragraph","core/list","core/file","core/button","core/buttons","carhop-blocks/heading","carhop-blocks/cta","carhop-blocks/cta-group"]})})}),h&&(0,l.jsx)("img",{className:`chapter-section__cover chapter-section__cover--${v} chapter-section__cover--${u}`,src:h,alt:b}),!h&&(0,l.jsx)(r.MediaPlaceholder,{accept:"image/*",allowedTypes:["image"],onSelect:w,multiple:!1,handleUpload:!0})]})]})},save:function({attributes:e}){const{hasLightBackground:o,disposition:n,coverUrl:i,coverAlt:c,coverSize:s,coverType:p,backgroundColor:d,blockWidth:g,textColor:u,shapeType:h,blockVariant:b,borderColor:m}=e;return(0,l.jsxs)("section",{...r.useBlockProps.save({className:`deligraph-blocks-chapter-section chapter-section chapter-section--${n} chapter-section--${b}\n\t\t\t${"full"===g?"chapter-section--width-full":"chapter-section--width-contained"}\n\t\t\t\n\t\t\t\t\t${o?"chapter-section--bg-light":"chapter-section--bg-dark"}`,style:{"--chapter-section-text-color":u||"var(--advised-text-color)","--cta-current-color":"backgrounded"===b?"inherit":"var(--wp--preset--color--primary) !important"}}),children:["backgrounded"===b&&d&&"variationA"===h&&(0,l.jsx)(a,{backgroundColor:d,borderColor:"none"}),"backgrounded"===b&&d&&"variationB"===h&&(0,l.jsx)(t,{backgroundColor:d,borderColor:"none"}),"framed"===b&&d&&"variationA"===h&&(0,l.jsx)(a,{backgroundColor:"none",borderColor:m}),"framed"===b&&d&&"variationB"===h&&(0,l.jsx)(t,{backgroundColor:"none",borderColor:m}),(0,l.jsx)("div",{className:"chapter-section__content",children:(0,l.jsx)("div",{className:"chapter-section__innerblocks",children:(0,l.jsx)(r.InnerBlocks.Content,{})})}),i&&(0,l.jsx)("img",{className:`chapter-section__cover chapter-section__cover--${s} chapter-section__cover--${p}`,src:i,alt:c})]})}})}},r={};function l(e){var a=r[e];if(void 0!==a)return a.exports;var t=r[e]={exports:{}};return o[e](t,t.exports,l),t.exports}l.m=o,e=[],l.O=(o,r,a,t)=>{if(!r){var n=1/0;for(p=0;p=t)&&Object.keys(l.O).every(e=>l.O[e](r[c]))?r.splice(c--,1):(i=!1,t0&&e[p-1][2]>t;p--)e[p]=e[p-1];e[p]=[r,a,t]},l.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={1509:0,6969:0};l.O.j=o=>0===e[o];var o=(o,r)=>{var a,t,[n,i,c]=r,s=0;if(n.some(o=>0!==e[o])){for(a in i)l.o(i,a)&&(l.m[a]=i[a]);if(c)var p=c(l)}for(o&&o(r);sl(3603));a=l.O(a)})(); \ No newline at end of file diff --git a/plugins/carhop-blocks/build/chapter-section/index.js.map b/plugins/carhop-blocks/build/chapter-section/index.js.map deleted file mode 100644 index faac69b..0000000 --- a/plugins/carhop-blocks/build/chapter-section/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chapter-section/index.js","mappings":";;;;;;;;;;;;;;AAAA;AACO,SAASA,YAAYA,CAACC,KAAK,EAAE;EACnC;EACA,IAAI,CAACA,KAAK,EAAE,OAAO,IAAI;;EAEvB;EACA,IAAIC,GAAG,GAAGD,KAAK,CAACE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;EAChC,IAAID,GAAG,CAACE,MAAM,KAAK,CAAC,EAAE;IACrBF,GAAG,GAAGA,GAAG,CACPG,KAAK,CAAC,EAAE,CAAC,CACTC,GAAG,CAAEC,IAAI,IAAKA,IAAI,GAAGA,IAAI,CAAC,CAC1BC,IAAI,CAAC,EAAE,CAAC;EACX;EAEA,MAAMC,CAAC,GAAGC,QAAQ,CAACR,GAAG,CAACS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;EACxC,MAAMC,CAAC,GAAGF,QAAQ,CAACR,GAAG,CAACS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;EACxC,MAAME,CAAC,GAAGH,QAAQ,CAACR,GAAG,CAACS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;;EAExC;EACA,MAAMG,SAAS,GAAG,CAAC,KAAK,GAAGL,CAAC,GAAG,KAAK,GAAGG,CAAC,GAAG,KAAK,GAAGC,CAAC,IAAI,GAAG;;EAE3D;EACA,OAAOC,SAAS,GAAG,GAAG;AACvB,C;;;;;;;;;;;;;;;;;;ACvBA;AACkD;AACV;AACxC,oCAAoC,sDAAG,CAAC,sDAAG,IAAI,qFAAqF,sDAAG;AACvI,EAAE,uDAAI;AACN;AACA;AACA;AACA;AACA;AACA,GAAG;AAGD;AACF;;;;;;;;;;;;;;;;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E,CAAC;AAER,C;;;;;;;;;;;AC7BA;;;;;;;;;;;ACAA,6C;;;;;;;;;;ACAA,wC;;;;;;;;;;ACAA,4C;;;;;;;;;;ACAA,sC;;;;;;;;;;ACAA,4C;;;;;;;;;;ACAA,iC;;;;;;;;;;ACAA,2C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,E;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./_utilities/utilities.js","webpack://carhop-blocks/./node_modules/.pnpm/@wordpress+icons@11.2.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js","webpack://carhop-blocks/./src/chapter-section/edit.js","webpack://carhop-blocks/./src/chapter-section/editor.scss?4f3a","webpack://carhop-blocks/./src/chapter-section/index.js","webpack://carhop-blocks/./src/chapter-section/save.js","webpack://carhop-blocks/./src/chapter-section/shapeA.jsx","webpack://carhop-blocks/./src/chapter-section/shapeB.jsx","webpack://carhop-blocks/./src/chapter-section/style.scss?ef55","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window [\"wp\",\"primitives\"]","webpack://carhop-blocks/external window \"React\"","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["// Fonction pour déterminer si une couleur est claire ou sombre\r\nexport function isColorLight(color) {\r\n\t// Si pas de couleur, considérer comme claire\r\n\tif (!color) return true;\r\n\r\n\t// Convertir hex en RGB\r\n\tlet hex = color.replace(\"#\", \"\");\r\n\tif (hex.length === 3) {\r\n\t\thex = hex\r\n\t\t\t.split(\"\")\r\n\t\t\t.map((char) => char + char)\r\n\t\t\t.join(\"\");\r\n\t}\r\n\r\n\tconst r = parseInt(hex.substr(0, 2), 16);\r\n\tconst g = parseInt(hex.substr(2, 2), 16);\r\n\tconst b = parseInt(hex.substr(4, 2), 16);\r\n\r\n\t// Calculer la luminance relative (formule standard)\r\n\tconst luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n\r\n\t// Si luminance > 0.5, la couleur est claire\r\n\treturn luminance > 0.5;\r\n}\r\n","// packages/icons/src/library/trash.tsx\nimport { Path, SVG } from \"@wordpress/primitives\";\nimport { jsx } from \"react/jsx-runtime\";\nvar trash_default = /* @__PURE__ */ jsx(SVG, { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", children: /* @__PURE__ */ jsx(\n Path,\n {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z\"\n }\n) });\nexport {\n trash_default as default\n};\n//# sourceMappingURL=trash.js.map\n","import { __ } from \"@wordpress/i18n\";\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tInspectorControls,\n\tMediaReplaceFlow,\n\tMediaPlaceholder,\n\tuseSetting,\n} from \"@wordpress/block-editor\";\nimport shapeA from \"./shapeA.jsx\";\nimport shapeB from \"./shapeB.jsx\";\nimport { lock, trash } from \"@wordpress/icons\";\nimport { ColorPalette } from \"@wordpress/components\";\nimport {\n\tPanelBody,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tButton,\n\tCheckboxControl,\n} from \"@wordpress/components\";\n\nimport \"./editor.scss\";\nimport { isColorLight } from \"../../_utilities/utilities\";\nimport ShapeA from \"./shapeA.jsx\";\nimport ShapeB from \"./shapeB.jsx\";\n\nexport default function Edit({ attributes, setAttributes, ...props }) {\n\tconst colors = useSetting(\"color.palette.theme\");\n\tconst {\n\t\thasLightBackground,\n\t\tdisposition,\n\t\tcoverType,\n\t\tcoverUrl,\n\t\tcoverAlt,\n\t\tcoverId,\n\t\tcoverSize,\n\t\tbackgroundColor,\n\n\t\tblockWidth,\n\t\ttextColor,\n\t\tshapeType,\n\t\tblockVariant,\n\t\tborderColor,\n\t} = attributes;\n\n\tfunction onDispositionChange(disposition) {\n\t\tsetAttributes({ disposition });\n\t}\n\n\tfunction setCoverAttributes(cover) {\n\t\tsetAttributes({\n\t\t\tcoverId: cover.id,\n\t\t\tcoverAlt: cover.alt,\n\t\t\tcoverUrl: cover.url,\n\t\t});\n\t}\n\tfunction removeCoverAttributes() {\n\t\tsetAttributes({\n\t\t\tcoverId: null,\n\t\t\tcoverAlt: null,\n\t\t\tcoverUrl: null,\n\t\t});\n\t}\n\tfunction onBackgroundColorChange(value) {\n\t\tif (!value) return;\n\t\tsetAttributes({ backgroundColor: value });\n\t\tsetHasLightBackground(value);\n\t}\n\n\tfunction onCoverTypeChange(value) {\n\t\tsetAttributes({ coverType: value });\n\t}\n\n\tfunction onBlockVariantChange(value) {\n\t\tsetAttributes({ blockVariant: value });\n\n\t\tif (value === \"framed\" || value === \"nude\") {\n\t\t\tsetAttributes({ backgroundColor: \"#fff\" });\n\t\t\tsetAttributes({ hasLightBackground: true });\n\t\t}\n\t}\n\n\tfunction setHasLightBackground(backgroundColor) {\n\t\tif (!backgroundColor) return;\n\n\t\tconst isLightBackgroundColor = isColorLight(backgroundColor);\n\t\tsetAttributes({ hasLightBackground: isLightBackgroundColor });\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{/* Largeur du bloc */}\n\t\t\t\t\t setAttributes({ blockWidth: value })}\n\t\t\t\t\t\tvalue={blockWidth}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{/* Modèle de bloc */}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{/* Disposition */}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t{blockVariant === \"backgrounded\" && (\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes({ shapeType: value })}\n\t\t\t\t\t\t\tvalue={shapeType}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{blockVariant === \"framed\" && (\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes({ shapeType: value })}\n\t\t\t\t\t\t\tvalue={shapeType}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t setAttributes({ borderColor: value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t)}\n\n\t\t\t\t\n\t\t\t\t\t{coverUrl && {coverAlt}}\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t{coverUrl && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t setAttributes({ coverSize })}\n\t\t\t\t\t\tvalue={coverSize}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t setAttributes({ textColor: value })}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t\t{blockVariant === \"backgrounded\" &&\n\t\t\t\t\tbackgroundColor &&\n\t\t\t\t\tshapeType === \"variationA\" && (\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t{blockVariant === \"backgrounded\" &&\n\t\t\t\t\tbackgroundColor &&\n\t\t\t\t\tshapeType === \"variationB\" && (\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t{blockVariant === \"framed\" &&\n\t\t\t\t\tbackgroundColor &&\n\t\t\t\t\tshapeType === \"variationA\" && (\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t{blockVariant === \"framed\" &&\n\t\t\t\t\tbackgroundColor &&\n\t\t\t\t\tshapeType === \"variationB\" && (\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t{coverUrl && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{!coverUrl && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t\tforeground: \"#136f63\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\nimport ShapeA from \"./shapeA.jsx\";\nimport ShapeB from \"./shapeB.jsx\";\nexport default function save({ attributes }) {\n\tconst {\n\t\thasLightBackground,\n\t\tdisposition,\n\t\tcoverUrl,\n\t\tcoverAlt,\n\t\tcoverSize,\n\t\tcoverType,\n\t\tbackgroundColor,\n\t\tblockWidth,\n\t\ttextColor,\n\t\tshapeType,\n\t\tblockVariant,\n\t\tborderColor,\n\t} = attributes;\n\n\treturn (\n\t\t\n\t\t\t{blockVariant === \"backgrounded\" &&\n\t\t\t\tbackgroundColor &&\n\t\t\t\tshapeType === \"variationA\" && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t{blockVariant === \"backgrounded\" &&\n\t\t\t\tbackgroundColor &&\n\t\t\t\tshapeType === \"variationB\" && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t{blockVariant === \"framed\" &&\n\t\t\t\tbackgroundColor &&\n\t\t\t\tshapeType === \"variationA\" && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t{blockVariant === \"framed\" &&\n\t\t\t\tbackgroundColor &&\n\t\t\t\tshapeType === \"variationB\" && (\n\t\t\t\t\t\n\t\t\t\t)}\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t{coverUrl && (\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n}\n","import React from \"react\";\r\n\r\nexport default function ShapeA({\r\n\tbackgroundOrientation,\r\n\tbackgroundColor,\r\n\tborderColor,\r\n}) {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n}\r\n","import React from \"react\";\r\n\r\nexport default function ShapeB({\r\n\tbackgroundOrientation,\r\n\tbackgroundColor,\r\n\tborderColor,\r\n}) {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"primitives\"];","module.exports = window[\"React\"];","module.exports = window[\"ReactJSXRuntime\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"chapter-section/index\": 0,\n\t\"chapter-section/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"chapter-section/style-index\"], () => (__webpack_require__(\"./src/chapter-section/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["isColorLight","color","hex","replace","length","split","map","char","join","r","parseInt","substr","g","b","luminance","__","InnerBlocks","useBlockProps","InspectorControls","MediaReplaceFlow","MediaPlaceholder","useSetting","shapeA","shapeB","lock","trash","ColorPalette","PanelBody","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Button","CheckboxControl","ShapeA","ShapeB","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","props","colors","hasLightBackground","disposition","coverType","coverUrl","coverAlt","coverId","coverSize","backgroundColor","blockWidth","textColor","shapeType","blockVariant","borderColor","onDispositionChange","setCoverAttributes","cover","id","alt","url","removeCoverAttributes","onBackgroundColorChange","value","setHasLightBackground","onCoverTypeChange","onBlockVariantChange","isLightBackgroundColor","children","className","title","isBlock","label","onChange","initialOpen","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","style","template","innerBlocks","content","placeholder","allowedBlocks","multiple","handleUpload","registerBlockType","save","metadata","xmlns","viewBox","d","foreground","edit","RichText","Content","React","backgroundOrientation","width","height","fill","preserveAspectRatio","vectorEffect","overflow","stroke","strokeWidth","strokeLinejoin"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/chapter-section/style-index.css b/plugins/carhop-blocks/build/chapter-section/style-index.css index bdc8226..c2943d1 100644 --- a/plugins/carhop-blocks/build/chapter-section/style-index.css +++ b/plugins/carhop-blocks/build/chapter-section/style-index.css @@ -1,8 +1 @@ -/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/chapter-section/style.scss ***! - \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -.wp-block-carhop-blocks-chapter-section { - margin: 2rem calc(50% - 50vw); -} - -/*# sourceMappingURL=style-index.css.map*/ \ No newline at end of file +.wp-block-carhop-blocks-chapter-section{margin:2rem calc(50% - 50vw)} diff --git a/plugins/carhop-blocks/build/chapter-section/style-index.css.map b/plugins/carhop-blocks/build/chapter-section/style-index.css.map deleted file mode 100644 index fa9dadd..0000000 --- a/plugins/carhop-blocks/build/chapter-section/style-index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chapter-section/style-index.css","mappings":";;;AAAA;EACC;AACD,C","sources":["webpack://carhop-blocks/./src/chapter-section/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-chapter-section {\r\n\tmargin: 2rem calc(50% - 50vw);\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/chapter-section/view.js b/plugins/carhop-blocks/build/chapter-section/view.js index 7f20901..e69de29 100644 --- a/plugins/carhop-blocks/build/chapter-section/view.js +++ b/plugins/carhop-blocks/build/chapter-section/view.js @@ -1,7 +0,0 @@ -/******/ (() => { // webpackBootstrap -/*!*************************************!*\ - !*** ./src/chapter-section/view.js ***! - \*************************************/ - -/******/ })() -; \ No newline at end of file diff --git a/plugins/carhop-blocks/src/chapter-section/edit.js b/plugins/carhop-blocks/src/chapter-section/edit.js index 44ad00f..2f073e8 100644 --- a/plugins/carhop-blocks/src/chapter-section/edit.js +++ b/plugins/carhop-blocks/src/chapter-section/edit.js @@ -35,7 +35,6 @@ export default function Edit({ attributes, setAttributes, ...props }) { coverId, coverSize, backgroundColor, - blockWidth, textColor, shapeType, diff --git a/plugins/carhop-blocks/src/chapter-section/editor.scss b/plugins/carhop-blocks/src/chapter-section/editor.scss index bb7eeb9..6867d3b 100644 --- a/plugins/carhop-blocks/src/chapter-section/editor.scss +++ b/plugins/carhop-blocks/src/chapter-section/editor.scss @@ -1,3 +1,16 @@ .wp-block-carhop-blocks-chapter-section { margin: 2rem calc(50% - 50vw); } + +.chapter-section--bg-light { + --cta-current-color: var(--wp--preset--color--carhop-green, inherit); + + .wp-block-carhop-blocks-cta { + --cta-current-color: var(--wp--preset--color--carhop-green, inherit); + svg, + path, + circle { + stroke: var(--wp--preset--color--carhop-green, inherit); + } + } +} diff --git a/plugins/carhop-blocks/src/chapter-section/save.js b/plugins/carhop-blocks/src/chapter-section/save.js index 287d21f..4c45bb9 100644 --- a/plugins/carhop-blocks/src/chapter-section/save.js +++ b/plugins/carhop-blocks/src/chapter-section/save.js @@ -30,10 +30,12 @@ export default function save({ attributes }) { ${ hasLightBackground ? "chapter-section--bg-light" - : " " + : "chapter-section--bg-dark" }`, style: { - "--chapter-section-text-color": textColor ? textColor : "#136f63", + "--chapter-section-text-color": textColor + ? textColor + : "var(--advised-text-color)", "--cta-current-color": blockVariant === "backgrounded" ? "inherit"