From 47e9eda8f338152d941ba2eee6081998978f0127 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 14 Oct 2025 11:35:06 +0200 Subject: [PATCH] STYLE TWEAKS on cta color --- .../blocks/chapter-section/build/index.asset.php | 2 +- .../blocks/chapter-section/build/index.js | 1 + .../blocks/chapter-section/build/index.js.map | 2 +- .../blocks/chapter-section/src/edit.js | 1 + .../blocks/content-box/build/index-rtl.css | 4 +++- .../blocks/content-box/build/index.asset.php | 2 +- .../blocks/content-box/build/index.css | 4 ++++ .../blocks/content-box/build/index.css.map | 1 + .../blocks/content-box/build/index.js.map | 2 +- .../blocks/content-box/src/editor.scss | 6 +++++- .../blocks/cta/build/blocks-manifest.php | 2 +- .../carhop-blocks/blocks/cta/build/cta/block.json | 2 +- .../blocks/cta/build/cta/index-rtl.css | 3 +++ .../blocks/cta/build/cta/index.asset.php | 2 +- .../carhop-blocks/blocks/cta/build/cta/index.css | 3 +++ .../blocks/cta/build/cta/index.css.map | 2 +- .../carhop-blocks/blocks/cta/build/cta/index.js | 3 ++- .../blocks/cta/build/cta/index.js.map | 2 +- .../carhop-blocks/blocks/cta/build/cta/render.php | 14 ++++++++------ .../blocks/cta/build/cta/style-index-rtl.css | 2 +- .../blocks/cta/build/cta/style-index.css | 2 +- .../blocks/cta/build/cta/style-index.css.map | 2 +- .../carhop-blocks/blocks/cta/src/cta/block.json | 2 +- plugins/carhop-blocks/blocks/cta/src/cta/edit.js | 4 ++++ .../carhop-blocks/blocks/cta/src/cta/editor.scss | 4 ++++ .../carhop-blocks/blocks/cta/src/cta/render.php | 14 ++++++++------ .../carhop-blocks/blocks/cta/src/cta/style.scss | 2 +- 27 files changed, 61 insertions(+), 29 deletions(-) create mode 100644 plugins/carhop-blocks/blocks/content-box/build/index.css.map diff --git a/plugins/carhop-blocks/blocks/chapter-section/build/index.asset.php b/plugins/carhop-blocks/blocks/chapter-section/build/index.asset.php index 31083db..4f1cd5c 100644 --- a/plugins/carhop-blocks/blocks/chapter-section/build/index.asset.php +++ b/plugins/carhop-blocks/blocks/chapter-section/build/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '7a32b34d94d6ec867f7f'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '3ccca3f8d10e538e399c'); diff --git a/plugins/carhop-blocks/blocks/chapter-section/build/index.js b/plugins/carhop-blocks/blocks/chapter-section/build/index.js index 10ed3d8..aafe8b2 100644 --- a/plugins/carhop-blocks/blocks/chapter-section/build/index.js +++ b/plugins/carhop-blocks/blocks/chapter-section/build/index.js @@ -181,6 +181,7 @@ function Edit({ hasLightBackground: isLightBackgroundColor }); } + console.log(hasLightBackground); return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, { children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { diff --git a/plugins/carhop-blocks/blocks/chapter-section/build/index.js.map b/plugins/carhop-blocks/blocks/chapter-section/build/index.js.map index 6b49af3..7f320fb 100644 --- a/plugins/carhop-blocks/blocks/chapter-section/build/index.js.map +++ b/plugins/carhop-blocks/blocks/chapter-section/build/index.js.map @@ -1 +1 @@ -{"version":3,"file":"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,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EA;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;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;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;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://portfolio-header/../_utilities/utilities.js","webpack://portfolio-header/./node_modules/.pnpm/@wordpress+icons@10.19.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js","webpack://portfolio-header/./src/edit.js","webpack://portfolio-header/./src/editor.scss","webpack://portfolio-header/./src/index.js","webpack://portfolio-header/./src/save.js","webpack://portfolio-header/./src/style.scss","webpack://portfolio-header/external window [\"wp\",\"blockEditor\"]","webpack://portfolio-header/external window [\"wp\",\"blocks\"]","webpack://portfolio-header/external window [\"wp\",\"components\"]","webpack://portfolio-header/external window [\"wp\",\"i18n\"]","webpack://portfolio-header/external window [\"wp\",\"primitives\"]","webpack://portfolio-header/external window \"ReactJSXRuntime\"","webpack://portfolio-header/webpack/bootstrap","webpack://portfolio-header/webpack/runtime/chunk loaded","webpack://portfolio-header/webpack/runtime/compat get default export","webpack://portfolio-header/webpack/runtime/define property getters","webpack://portfolio-header/webpack/runtime/hasOwnProperty shorthand","webpack://portfolio-header/webpack/runtime/make namespace object","webpack://portfolio-header/webpack/runtime/jsonp chunk loading","webpack://portfolio-header/webpack/before-startup","webpack://portfolio-header/webpack/startup","webpack://portfolio-header/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","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst trash = /*#__PURE__*/_jsx(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n children: /*#__PURE__*/_jsx(Path, {\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 default trash;\n//# sourceMappingURL=trash.js.map","import { __ } from \"@wordpress/i18n\";\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tInspectorControls,\n\tMediaReplaceFlow,\n\tMediaPlaceholder,\n\tuseSetting,\n} from \"@wordpress/block-editor\";\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\";\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\thasBackgroundColor,\n\t\tbackgroundColor,\n\t\tbackgroundOrientation,\n\t\tblockWidth,\n\t\ttextColor,\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\tfunction onHasBackgroundColorChange(value) {\n\t\tsetAttributes({ hasBackgroundColor: value });\n\t\tif (!value) {\n\t\t\tsetAttributes({ backgroundColor: null });\n\t\t}\n\t}\n\tfunction onCoverTypeChange(value) {\n\t\tsetAttributes({ coverType: value });\n\t}\n\n\tfunction onBackgroundOrientationChange(value) {\n\t\tsetAttributes({ backgroundOrientation: value });\n\t}\n\tfunction setHasLightBackground(backgroundColor) {\n\t\tif (!backgroundColor) return;\n\n\t\tconst isLightBackgroundColor = isColorLight(backgroundColor);\n\t\tconsole.log(isLightBackgroundColor);\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 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\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\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 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\n\t\t\t\t\t{hasBackgroundColor && (\n\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\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{hasBackgroundColor && backgroundColor && (\n\t\t\t\t\t<>\n\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\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\";\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\thasBackgroundColor,\n\t\tbackgroundOrientation,\n\t\tblockWidth,\n\t\ttextColor,\n\t} = attributes;\n\n\treturn (\n\t\t\n\t\t\t{hasBackgroundColor && backgroundColor && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\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","// 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[\"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\"index\": 0,\n\t\"./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[\"webpackChunkportfolio_header\"] = globalThis[\"webpackChunkportfolio_header\"] || [];\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, [\"./style-index\"], () => (__webpack_require__(\"./src/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","lock","trash","ColorPalette","PanelBody","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Button","CheckboxControl","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","props","colors","hasLightBackground","disposition","coverType","coverUrl","coverAlt","coverId","coverSize","hasBackgroundColor","backgroundColor","backgroundOrientation","blockWidth","textColor","onDispositionChange","setCoverAttributes","cover","id","alt","url","removeCoverAttributes","onBackgroundColorChange","value","setHasLightBackground","onHasBackgroundColorChange","onCoverTypeChange","onBackgroundOrientationChange","isLightBackgroundColor","console","log","children","className","title","isBlock","label","onChange","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","checked","style","width","height","viewBox","preserveAspectRatio","d","fill","template","innerBlocks","content","placeholder","allowedBlocks","multiple","handleUpload","registerBlockType","save","metadata","xmlns","foreground","edit","RichText","Content"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;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AAE/B,QAAS;MACda,GAAG,EAAEZ;IAAS,CACd,CACD;EAAA,CACO,CAAC;AAEZ;;;;;;;;;;;AChEA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;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;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;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;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://portfolio-header/../_utilities/utilities.js","webpack://portfolio-header/./node_modules/.pnpm/@wordpress+icons@10.19.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js","webpack://portfolio-header/./src/edit.js","webpack://portfolio-header/./src/editor.scss?10e8","webpack://portfolio-header/./src/index.js","webpack://portfolio-header/./src/save.js","webpack://portfolio-header/./src/style.scss?9bd0","webpack://portfolio-header/external window [\"wp\",\"blockEditor\"]","webpack://portfolio-header/external window [\"wp\",\"blocks\"]","webpack://portfolio-header/external window [\"wp\",\"components\"]","webpack://portfolio-header/external window [\"wp\",\"i18n\"]","webpack://portfolio-header/external window [\"wp\",\"primitives\"]","webpack://portfolio-header/external window \"ReactJSXRuntime\"","webpack://portfolio-header/webpack/bootstrap","webpack://portfolio-header/webpack/runtime/chunk loaded","webpack://portfolio-header/webpack/runtime/compat get default export","webpack://portfolio-header/webpack/runtime/define property getters","webpack://portfolio-header/webpack/runtime/hasOwnProperty shorthand","webpack://portfolio-header/webpack/runtime/make namespace object","webpack://portfolio-header/webpack/runtime/jsonp chunk loading","webpack://portfolio-header/webpack/before-startup","webpack://portfolio-header/webpack/startup","webpack://portfolio-header/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","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst trash = /*#__PURE__*/_jsx(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n children: /*#__PURE__*/_jsx(Path, {\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 default trash;\n//# sourceMappingURL=trash.js.map","import { __ } from \"@wordpress/i18n\";\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tInspectorControls,\n\tMediaReplaceFlow,\n\tMediaPlaceholder,\n\tuseSetting,\n} from \"@wordpress/block-editor\";\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\";\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\thasBackgroundColor,\n\t\tbackgroundColor,\n\t\tbackgroundOrientation,\n\t\tblockWidth,\n\t\ttextColor,\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\tfunction onHasBackgroundColorChange(value) {\n\t\tsetAttributes({ hasBackgroundColor: value });\n\t\tif (!value) {\n\t\t\tsetAttributes({ backgroundColor: null });\n\t\t}\n\t}\n\tfunction onCoverTypeChange(value) {\n\t\tsetAttributes({ coverType: value });\n\t}\n\n\tfunction onBackgroundOrientationChange(value) {\n\t\tsetAttributes({ backgroundOrientation: value });\n\t}\n\tfunction setHasLightBackground(backgroundColor) {\n\t\tif (!backgroundColor) return;\n\n\t\tconst isLightBackgroundColor = isColorLight(backgroundColor);\n\t\tconsole.log(isLightBackgroundColor);\n\t\tsetAttributes({ hasLightBackground: isLightBackgroundColor });\n\t}\n\n\tconsole.log(hasLightBackground);\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\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\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\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 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\n\t\t\t\t\t{hasBackgroundColor && (\n\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\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{hasBackgroundColor && backgroundColor && (\n\t\t\t\t\t<>\n\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\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\";\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\thasBackgroundColor,\n\t\tbackgroundOrientation,\n\t\tblockWidth,\n\t\ttextColor,\n\t} = attributes;\n\n\treturn (\n\t\t\n\t\t\t{hasBackgroundColor && backgroundColor && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\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","// 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[\"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\"index\": 0,\n\t\"./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[\"webpackChunkportfolio_header\"] = globalThis[\"webpackChunkportfolio_header\"] || [];\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, [\"./style-index\"], () => (__webpack_require__(\"./src/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","lock","trash","ColorPalette","PanelBody","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Button","CheckboxControl","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","props","colors","hasLightBackground","disposition","coverType","coverUrl","coverAlt","coverId","coverSize","hasBackgroundColor","backgroundColor","backgroundOrientation","blockWidth","textColor","onDispositionChange","setCoverAttributes","cover","id","alt","url","removeCoverAttributes","onBackgroundColorChange","value","setHasLightBackground","onHasBackgroundColorChange","onCoverTypeChange","onBackgroundOrientationChange","isLightBackgroundColor","console","log","children","className","title","isBlock","label","onChange","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","checked","style","width","height","viewBox","preserveAspectRatio","d","fill","template","innerBlocks","content","placeholder","allowedBlocks","multiple","handleUpload","registerBlockType","save","metadata","xmlns","foreground","edit","RichText","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/chapter-section/src/edit.js b/plugins/carhop-blocks/blocks/chapter-section/src/edit.js index fd63934..a78186b 100644 --- a/plugins/carhop-blocks/blocks/chapter-section/src/edit.js +++ b/plugins/carhop-blocks/blocks/chapter-section/src/edit.js @@ -80,6 +80,7 @@ export default function Edit({ attributes, setAttributes, ...props }) { console.log(isLightBackgroundColor); setAttributes({ hasLightBackground: isLightBackgroundColor }); } + return ( <> diff --git a/plugins/carhop-blocks/blocks/content-box/build/index-rtl.css b/plugins/carhop-blocks/blocks/content-box/build/index-rtl.css index 6badb3b..424d827 100644 --- a/plugins/carhop-blocks/blocks/content-box/build/index-rtl.css +++ b/plugins/carhop-blocks/blocks/content-box/build/index-rtl.css @@ -1,4 +1,6 @@ /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.98.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.98.0_webpack-cli@5.1.4_/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.85.1_webpack@5.98.0_webpack-cli@5.1.4_/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***! \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ - +.content-box a { + color: var(--content-box-text-color) !important; +} diff --git a/plugins/carhop-blocks/blocks/content-box/build/index.asset.php b/plugins/carhop-blocks/blocks/content-box/build/index.asset.php index e970689..bb6d71b 100644 --- a/plugins/carhop-blocks/blocks/content-box/build/index.asset.php +++ b/plugins/carhop-blocks/blocks/content-box/build/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '0bbbf9b24775768b56fa'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'e360d0dfc45f49116fd0'); diff --git a/plugins/carhop-blocks/blocks/content-box/build/index.css b/plugins/carhop-blocks/blocks/content-box/build/index.css index 6badb3b..87f4cf7 100644 --- a/plugins/carhop-blocks/blocks/content-box/build/index.css +++ b/plugins/carhop-blocks/blocks/content-box/build/index.css @@ -1,4 +1,8 @@ /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.98.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.98.0_webpack-cli@5.1.4_/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.85.1_webpack@5.98.0_webpack-cli@5.1.4_/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***! \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +.content-box a { + color: var(--content-box-text-color) !important; +} +/*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/content-box/build/index.css.map b/plugins/carhop-blocks/blocks/content-box/build/index.css.map new file mode 100644 index 0000000..d6625ad --- /dev/null +++ b/plugins/carhop-blocks/blocks/content-box/build/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"index.css","mappings":";;;AACC;EACC;AAAF,C","sources":["webpack://front-header/./src/editor.scss"],"sourcesContent":[".content-box {\n\ta {\n\t\tcolor: var(--content-box-text-color) !important;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/content-box/build/index.js.map b/plugins/carhop-blocks/blocks/content-box/build/index.js.map index bcd176f..cb319da 100644 --- a/plugins/carhop-blocks/blocks/content-box/build/index.js.map +++ b/plugins/carhop-blocks/blocks/content-box/build/index.js.map @@ -1 +1 @@ -{"version":3,"file":"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;;;;;;;;;;;;;;;;;;;;;;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;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;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;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;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://front-header/../_utilities/utilities.js","webpack://front-header/./src/edit.js","webpack://front-header/./src/editor.scss","webpack://front-header/./src/index.js","webpack://front-header/./src/save.js","webpack://front-header/./src/style.scss","webpack://front-header/./src/utilities.js","webpack://front-header/external window [\"wp\",\"blockEditor\"]","webpack://front-header/external window [\"wp\",\"blocks\"]","webpack://front-header/external window [\"wp\",\"components\"]","webpack://front-header/external window [\"wp\",\"data\"]","webpack://front-header/external window [\"wp\",\"i18n\"]","webpack://front-header/external window \"ReactJSXRuntime\"","webpack://front-header/webpack/bootstrap","webpack://front-header/webpack/runtime/chunk loaded","webpack://front-header/webpack/runtime/compat get default export","webpack://front-header/webpack/runtime/define property getters","webpack://front-header/webpack/runtime/hasOwnProperty shorthand","webpack://front-header/webpack/runtime/make namespace object","webpack://front-header/webpack/runtime/jsonp chunk loading","webpack://front-header/webpack/before-startup","webpack://front-header/webpack/startup","webpack://front-header/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","import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tuseSetting,\n\tInspectorControls,\n\tMediaReplaceFlow,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\nimport {\n\tCard,\n\tCardHeader,\n\tCardBody,\n\tHeading,\n\tText,\n} from \"@wordpress/components\";\nimport { useSelect } from \"@wordpress/data\";\nimport \"./editor.scss\";\nimport { isColorLight } from \"../../_utilities/utilities\";\nimport {\n\tPanelBody,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tButton,\n\tCheckboxControl,\n\tColorPalette,\n} from \"@wordpress/components\";\n\nimport { filterBgColors, filterTextColors } from \"./utilities\";\n\nexport default function Edit({ attributes, setAttributes, ...props }) {\n\tconst colors = useSetting(\"color.palette.theme\");\n\n\tconst {\n\t\thasBackgroundColor,\n\t\tbackgroundColor,\n\t\ttextColor,\n\t\thasLightBackground,\n\t\tblockVariant,\n\t} = attributes;\n\n\t// Détecter le type de post actuel\n\tconst postType = useSelect((select) => {\n\t\treturn select(\"core/editor\").getCurrentPostType();\n\t}, []);\n\n\tconst filteredBgColors = filterBgColors(colors, postType);\n\tconst filteredTextColors = filterTextColors(\n\t\tcolors,\n\t\tpostType,\n\t\tbackgroundColor,\n\t);\n\n\tfunction onBackgroundColorChange(value) {\n\t\tif (value === undefined) {\n\t\t\tsetAttributes({ hasBackgroundColor: false });\n\t\t\tsetAttributes({ backgroundColor: \"transparent\" });\n\t\t}\n\t\tconst isLightBackgroundColor = isColorLight(value);\n\t\tsetAttributes({ hasLightBackground: isLightBackgroundColor });\n\t\tsetAttributes({ backgroundColor: value });\n\n\t\tif (!isLightBackgroundColor) {\n\t\t\tsetAttributes({ textColor: \"#fff\" });\n\t\t} else {\n\t\t\tsetAttributes({ textColor: \"inherit\" });\n\t\t}\n\t}\n\tfunction onHasBackgroundColorChange(value) {\n\t\tsetAttributes({ hasBackgroundColor: value });\n\t\tif (!value) {\n\t\t\tsetAttributes({ backgroundColor: null });\n\t\t}\n\t}\n\tfunction onTextColorChange(value) {\n\t\tsetAttributes({ textColor: value });\n\t}\n\tfunction onBlockVariantChange(value) {\n\t\tsetAttributes({ blockVariant: value });\n\t}\n\treturn (\n\t\t<>\n\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\t\n\t\t\t\t\t\n\n\t\t\t\t\t{blockVariant === \"backgrounded\" && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

Couleur de fond

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\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{blockVariant === \"backgrounded\" && postType !== \"articles\" && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

Couleur du texte

\n\t\t\t\t\t\t\t
\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\t\t\t\t
\n\t\t\t
\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\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tforeground: \"#136f63\",\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, InnerBlocks } from \"@wordpress/block-editor\";\nimport { isColorLight } from \"../../_utilities/utilities\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\tbackgroundColor,\n\t\ttextColor,\n\t\thasLightBackground,\n\t\thasBackgroundColor,\n\t\tblockVariant,\n\t} = attributes;\n\treturn (\n\t\t\n\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 { isColorLight } from \"../../_utilities/utilities\";\r\n\r\nexport const filterBgColors = (colors, postType) => {\r\n\tif (!postType) return colors || [];\r\n\r\n\tif (postType === \"articles\") {\r\n\t\treturn (\r\n\t\t\tcolors?.filter((color) => {\r\n\t\t\t\t// Garder seulement certaines couleurs pour les articles\r\n\t\t\t\tconst allowedColors = [\r\n\t\t\t\t\t\"carhop-green-light\",\r\n\t\t\t\t\t\"carhop-blue-light\",\r\n\t\t\t\t\t\"carhop-orange-light\",\r\n\t\t\t\t\t\"carhop-red-light\",\r\n\t\t\t\t\t\"carhop-purple-light\",\r\n\t\t\t\t];\r\n\t\t\t\treturn allowedColors.includes(color.slug);\r\n\t\t\t}) || []\r\n\t\t);\r\n\t}\r\n\r\n\treturn colors || [];\r\n};\r\n\r\nexport const filterTextColors = (colors, postType, backgroundColor) => {\r\n\tif (!postType) return colors || [];\r\n\tif (postType === \"page\" && !isColorLight(backgroundColor)) {\r\n\t\t// Retourner seulement du blanc pour les pages avec arrière-plan sombre\r\n\t\treturn [\r\n\t\t\t{\r\n\t\t\t\tname: \"White\",\r\n\t\t\t\tslug: \"white\",\r\n\t\t\t\tcolor: \"#ffffff\",\r\n\t\t\t},\r\n\t\t];\r\n\t}\r\n\r\n\treturn colors || [];\r\n};\r\n","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"i18n\"];","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\"index\": 0,\n\t\"./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[\"webpackChunkfront_header\"] = globalThis[\"webpackChunkfront_header\"] || [];\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, [\"./style-index\"], () => (__webpack_require__(\"./src/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","__","useBlockProps","InnerBlocks","useSetting","InspectorControls","MediaReplaceFlow","MediaPlaceholder","Card","CardHeader","CardBody","Heading","Text","useSelect","PanelBody","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Button","CheckboxControl","ColorPalette","filterBgColors","filterTextColors","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","props","colors","hasBackgroundColor","backgroundColor","textColor","hasLightBackground","blockVariant","postType","select","getCurrentPostType","filteredBgColors","filteredTextColors","onBackgroundColorChange","value","undefined","isLightBackgroundColor","onHasBackgroundColorChange","onTextColorChange","onBlockVariantChange","children","title","label","onChange","isBlock","__nextHasNoMarginBottom","__next40pxDefaultSize","className","style","template","placeholder","allowedBlocks","registerBlockType","save","metadata","name","icon","foreground","src","width","height","viewBox","d","edit","Content","filter","allowedColors","includes","slug"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvBqC;AAQJ;AAOF;AACa;AACrB;AACmC;A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,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;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;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://front-header/../_utilities/utilities.js","webpack://front-header/./src/edit.js","webpack://front-header/./src/editor.scss?d0c2","webpack://front-header/./src/index.js","webpack://front-header/./src/save.js","webpack://front-header/./src/style.scss","webpack://front-header/./src/utilities.js","webpack://front-header/external window [\"wp\",\"blockEditor\"]","webpack://front-header/external window [\"wp\",\"blocks\"]","webpack://front-header/external window [\"wp\",\"components\"]","webpack://front-header/external window [\"wp\",\"data\"]","webpack://front-header/external window [\"wp\",\"i18n\"]","webpack://front-header/external window \"ReactJSXRuntime\"","webpack://front-header/webpack/bootstrap","webpack://front-header/webpack/runtime/chunk loaded","webpack://front-header/webpack/runtime/compat get default export","webpack://front-header/webpack/runtime/define property getters","webpack://front-header/webpack/runtime/hasOwnProperty shorthand","webpack://front-header/webpack/runtime/make namespace object","webpack://front-header/webpack/runtime/jsonp chunk loading","webpack://front-header/webpack/before-startup","webpack://front-header/webpack/startup","webpack://front-header/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","import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tuseSetting,\n\tInspectorControls,\n\tMediaReplaceFlow,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\nimport {\n\tCard,\n\tCardHeader,\n\tCardBody,\n\tHeading,\n\tText,\n} from \"@wordpress/components\";\nimport { useSelect } from \"@wordpress/data\";\nimport \"./editor.scss\";\nimport { isColorLight } from \"../../_utilities/utilities\";\nimport {\n\tPanelBody,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tButton,\n\tCheckboxControl,\n\tColorPalette,\n} from \"@wordpress/components\";\n\nimport { filterBgColors, filterTextColors } from \"./utilities\";\n\nexport default function Edit({ attributes, setAttributes, ...props }) {\n\tconst colors = useSetting(\"color.palette.theme\");\n\n\tconst {\n\t\thasBackgroundColor,\n\t\tbackgroundColor,\n\t\ttextColor,\n\t\thasLightBackground,\n\t\tblockVariant,\n\t} = attributes;\n\n\t// Détecter le type de post actuel\n\tconst postType = useSelect((select) => {\n\t\treturn select(\"core/editor\").getCurrentPostType();\n\t}, []);\n\n\tconst filteredBgColors = filterBgColors(colors, postType);\n\tconst filteredTextColors = filterTextColors(\n\t\tcolors,\n\t\tpostType,\n\t\tbackgroundColor,\n\t);\n\n\tfunction onBackgroundColorChange(value) {\n\t\tif (value === undefined) {\n\t\t\tsetAttributes({ hasBackgroundColor: false });\n\t\t\tsetAttributes({ backgroundColor: \"transparent\" });\n\t\t}\n\t\tconst isLightBackgroundColor = isColorLight(value);\n\t\tsetAttributes({ hasLightBackground: isLightBackgroundColor });\n\t\tsetAttributes({ backgroundColor: value });\n\n\t\tif (!isLightBackgroundColor) {\n\t\t\tsetAttributes({ textColor: \"#fff\" });\n\t\t} else {\n\t\t\tsetAttributes({ textColor: \"inherit\" });\n\t\t}\n\t}\n\tfunction onHasBackgroundColorChange(value) {\n\t\tsetAttributes({ hasBackgroundColor: value });\n\t\tif (!value) {\n\t\t\tsetAttributes({ backgroundColor: null });\n\t\t}\n\t}\n\tfunction onTextColorChange(value) {\n\t\tsetAttributes({ textColor: value });\n\t}\n\tfunction onBlockVariantChange(value) {\n\t\tsetAttributes({ blockVariant: value });\n\t}\n\treturn (\n\t\t<>\n\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\t\n\t\t\t\t\t\n\n\t\t\t\t\t{blockVariant === \"backgrounded\" && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

Couleur de fond

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\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{blockVariant === \"backgrounded\" && postType !== \"articles\" && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

Couleur du texte

\n\t\t\t\t\t\t\t
\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\t\t\t\t
\n\t\t\t
\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\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tforeground: \"#136f63\",\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, InnerBlocks } from \"@wordpress/block-editor\";\nimport { isColorLight } from \"../../_utilities/utilities\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\tbackgroundColor,\n\t\ttextColor,\n\t\thasLightBackground,\n\t\thasBackgroundColor,\n\t\tblockVariant,\n\t} = attributes;\n\treturn (\n\t\t\n\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 { isColorLight } from \"../../_utilities/utilities\";\r\n\r\nexport const filterBgColors = (colors, postType) => {\r\n\tif (!postType) return colors || [];\r\n\r\n\tif (postType === \"articles\") {\r\n\t\treturn (\r\n\t\t\tcolors?.filter((color) => {\r\n\t\t\t\t// Garder seulement certaines couleurs pour les articles\r\n\t\t\t\tconst allowedColors = [\r\n\t\t\t\t\t\"carhop-green-light\",\r\n\t\t\t\t\t\"carhop-blue-light\",\r\n\t\t\t\t\t\"carhop-orange-light\",\r\n\t\t\t\t\t\"carhop-red-light\",\r\n\t\t\t\t\t\"carhop-purple-light\",\r\n\t\t\t\t];\r\n\t\t\t\treturn allowedColors.includes(color.slug);\r\n\t\t\t}) || []\r\n\t\t);\r\n\t}\r\n\r\n\treturn colors || [];\r\n};\r\n\r\nexport const filterTextColors = (colors, postType, backgroundColor) => {\r\n\tif (!postType) return colors || [];\r\n\tif (postType === \"page\" && !isColorLight(backgroundColor)) {\r\n\t\t// Retourner seulement du blanc pour les pages avec arrière-plan sombre\r\n\t\treturn [\r\n\t\t\t{\r\n\t\t\t\tname: \"White\",\r\n\t\t\t\tslug: \"white\",\r\n\t\t\t\tcolor: \"#ffffff\",\r\n\t\t\t},\r\n\t\t];\r\n\t}\r\n\r\n\treturn colors || [];\r\n};\r\n","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"i18n\"];","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\"index\": 0,\n\t\"./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[\"webpackChunkfront_header\"] = globalThis[\"webpackChunkfront_header\"] || [];\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, [\"./style-index\"], () => (__webpack_require__(\"./src/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","__","useBlockProps","InnerBlocks","useSetting","InspectorControls","MediaReplaceFlow","MediaPlaceholder","Card","CardHeader","CardBody","Heading","Text","useSelect","PanelBody","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Button","CheckboxControl","ColorPalette","filterBgColors","filterTextColors","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","props","colors","hasBackgroundColor","backgroundColor","textColor","hasLightBackground","blockVariant","postType","select","getCurrentPostType","filteredBgColors","filteredTextColors","onBackgroundColorChange","value","undefined","isLightBackgroundColor","onHasBackgroundColorChange","onTextColorChange","onBlockVariantChange","children","title","label","onChange","isBlock","__nextHasNoMarginBottom","__next40pxDefaultSize","className","style","template","placeholder","allowedBlocks","registerBlockType","save","metadata","name","icon","foreground","src","width","height","viewBox","d","edit","Content","filter","allowedColors","includes","slug"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/content-box/src/editor.scss b/plugins/carhop-blocks/blocks/content-box/src/editor.scss index 8b13789..a13115a 100644 --- a/plugins/carhop-blocks/blocks/content-box/src/editor.scss +++ b/plugins/carhop-blocks/blocks/content-box/src/editor.scss @@ -1 +1,5 @@ - +.content-box { + a { + color: var(--content-box-text-color) !important; + } +} diff --git a/plugins/carhop-blocks/blocks/cta/build/blocks-manifest.php b/plugins/carhop-blocks/blocks/cta/build/blocks-manifest.php index 7efc256..b62722e 100644 --- a/plugins/carhop-blocks/blocks/cta/build/blocks-manifest.php +++ b/plugins/carhop-blocks/blocks/cta/build/blocks-manifest.php @@ -36,7 +36,7 @@ return array( ), 'color' => array( 'type' => 'string', - 'default' => '#136F63' + 'default' => null ) ) ) diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/block.json b/plugins/carhop-blocks/blocks/cta/build/cta/block.json index 5090ab2..f2086de 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/block.json +++ b/plugins/carhop-blocks/blocks/cta/build/cta/block.json @@ -31,7 +31,7 @@ }, "color": { "type": "string", - "default": "#136F63" + "default": null } } } \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index-rtl.css b/plugins/carhop-blocks/blocks/cta/build/cta/index-rtl.css index da4f3a1..fa9f807 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index-rtl.css +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index-rtl.css @@ -12,6 +12,9 @@ gap: 10px; line-height: normal; } +.wp-block-carhop-blocks-cta a { + color: var(--cta-current-color) !important; +} .wp-block-carhop-blocks-cta .icon svg { width: 30px; height: 30px; diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.asset.php b/plugins/carhop-blocks/blocks/cta/build/cta/index.asset.php index 9133b65..a177e06 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.asset.php +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.asset.php @@ -1 +1 @@ - array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => 'a525998fbdc557e3c6f8'); + array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '06290776c2a9d6693436'); diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.css b/plugins/carhop-blocks/blocks/cta/build/cta/index.css index 9577e6e..a37187b 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.css +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.css @@ -12,6 +12,9 @@ gap: 10px; line-height: normal; } +.wp-block-carhop-blocks-cta a { + color: var(--cta-current-color) !important; +} .wp-block-carhop-blocks-cta .icon svg { width: 30px; height: 30px; diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.css.map b/plugins/carhop-blocks/blocks/cta/build/cta/index.css.map index 1a711ba..41af104 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.css.map +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.css.map @@ -1 +1 @@ -{"version":3,"file":"cta/index.css","mappings":";;;AAAA;EACC;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AAAD;AAGE;EACC;EACA;AADH;AAGE;;EAEC;AADH;AAKC;EACC;AAHF;AAKC;EACC;EACA;AAHF;AAKC;EACC;AAHF,C","sources":["webpack://cta/./src/cta/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tcolor: var(--cta-current-color);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"cta/index.css","mappings":";;;AAAA;EACC;EAMA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AAJD;AAPC;EACC;AASF;AAIE;EACC;EACA;AAFH;AAIE;;EAEC;AAFH;AAMC;EACC;AAJF;AAMC;EACC;EACA;AAJF;AAMC;EACC;AAJF,C","sources":["webpack://cta/./src/cta/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tcolor: var(--cta-current-color);\n\ta {\n\t\tcolor: var(--cta-current-color) !important;\n\n\t\t&:after{}\n\t}\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.js b/plugins/carhop-blocks/blocks/cta/build/cta/index.js index 77626eb..6ad08d3 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.js +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.js @@ -8,7 +8,7 @@ \****************************/ /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/cta","version":"0.1.0","title":"Cta","category":"carhop-blocks","icon":"smiley","description":"Un bouton de lien","example":{},"supports":{"html":false},"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":{"text":{"type":"string","default":"Call to action"},"link":{"type":"object"},"align":{"type":"string","default":"left"},"color":{"type":"string","default":"#136F63"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/cta","version":"0.1.0","title":"Cta","category":"carhop-blocks","icon":"smiley","description":"Un bouton de lien","example":{},"supports":{"html":false},"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":{"text":{"type":"string","default":"Call to action"},"link":{"type":"object"},"align":{"type":"string","default":"left"},"color":{"type":"string","default":null}}}'); /***/ }), @@ -54,6 +54,7 @@ function Edit({ color: value }); } + console.log(color); return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, { children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.AlignmentToolbar, { diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.js.map b/plugins/carhop-blocks/blocks/cta/build/cta/index.js.map index c711ba6..d2a014f 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.js.map +++ b/plugins/carhop-bl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A,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;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;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://cta/./src/cta/edit.js","webpack://cta/./src/cta/editor.scss?affa","webpack://cta/./src/cta/index.js","webpack://cta/./src/cta/save.js","webpack://cta/./src/cta/style.scss?8ec7","webpack://cta/./src/img/carhop-fleche-lien-externe-full.svg","webpack://cta/external window [\"wp\",\"blockEditor\"]","webpack://cta/external window [\"wp\",\"blocks\"]","webpack://cta/external window [\"wp\",\"components\"]","webpack://cta/external window [\"wp\",\"i18n\"]","webpack://cta/external window \"React\"","webpack://cta/external window \"ReactJSXRuntime\"","webpack://cta/webpack/bootstrap","webpack://cta/webpack/runtime/chunk loaded","webpack://cta/webpack/runtime/compat get default export","webpack://cta/webpack/runtime/define property getters","webpack://cta/webpack/runtime/hasOwnProperty shorthand","webpack://cta/webpack/runtime/make namespace object","webpack://cta/webpack/runtime/jsonp chunk loading","webpack://cta/webpack/before-startup","webpack://cta/webpack/startup","webpack://cta/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n\tuseSetting,\n} from \"@wordpress/block-editor\";\nimport { PanelBody } from \"@wordpress/components\";\nimport \"./editor.scss\";\nimport { BlockControls, AlignmentToolbar } from \"@wordpress/block-editor\";\nimport { ColorPalette, PanelRow } from \"@wordpress/components\";\nimport { Tip } from \"@wordpress/components\";\nimport { ReactComponent as ArrowIcon } from \"../img/carhop-fleche-lien-externe-full.svg\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { color } = attributes;\n\tconst colors = useSetting(\"color.palette.theme\");\n\n\tfunction handleColorChange(value) {\n\t\tsetAttributes({ color: value });\n\t}\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t setAttributes({ align: value })}\n\t\t\t\t/>\n\t\t\t\n\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\t\t\tsetAttributes({ link: value });\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\t {\n\t\t\t\t\t\t\t\t\thandleColorChange(value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tcolors={colors}\n\t\t\t\t\t\t\t\tdisableCustomColors={true}\n\t\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
\n\t\t\t\n\t\t\t\t setAttributes({ text })}\n\t\t\t\t\tallowedFormats={[]}\n\t\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\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\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\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps } from \"@wordpress/block-editor\";\nimport { ReactComponent as ArrowIcon } from \"../img/carhop-fleche-lien-externe-full.svg\";\n\nexport default function save({ attributes }) {\n\tconst { align, link, text, color } = attributes;\n\treturn (\n\t\t<>\n\t\t// \n\t\t// \t{text}\n\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 {};","var _defs, _path, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgCarhopFlecheLienExterneFull = function SvgCarhopFlecheLienExterneFull(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n id: \"carhop-fleche-lien-externe-full_svg__fleche-lien-externe-full\",\n viewBox: \"0 0 32 32\"\n }, props), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".carhop-fleche-lien-externe-full_svg__cls-1{fill:none;stroke:#000;stroke-width:2px}\"))), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m21.15 10.59-9.38 10.02M21.15 21.4V10.59H10.83\",\n className: \"carhop-fleche-lien-externe-full_svg__cls-1\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 16,\n cy: 16,\n r: 15,\n className: \"carhop-fleche-lien-externe-full_svg__cls-1\"\n })));\n};\nexport { SvgCarhopFlecheLienExterneFull as ReactComponent };\nexport default \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg==\";","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"i18n\"];","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\"cta/index\": 0,\n\t\"cta/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[\"webpackChunkcta\"] = globalThis[\"webpackChunkcta\"] || [];\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, [\"cta/style-index\"], () => (__webpack_require__(\"./src/cta/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","InspectorControls","__experimentalLinkControl","LinkControl","useSetting","PanelBody","BlockControls","AlignmentToolbar","ColorPalette","PanelRow","Tip","ReactComponent","ArrowIcon","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","color","colors","handleColorChange","value","children","align","onChange","title","initialOpen","link","disableCustomColors","className","style","tagName","placeholder","text","allowedFormats","registerBlockType","save","metadata","name","icon","src","width","height","viewBox","d","stroke","fill","strokeWidth","cx","cy","r","edit"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"cta/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAOJ;AACiB;AAC3B;AACmD;AACX;AACnB;AAC6C;AAAA;AAE1E,SAASqB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAM,CAAC,GAAGF,UAAU;EAC5B,MAAMG,MAAM,GAAGnB,mEAAU,CAAC,qBAAqB,CAAC;EAEhD,SAASoB,iBAAiBA,CAACC,KAAK,EAAE;IACjCJ,aAAa,CAAC;MAAEC,KAAK,EAAEG;IAAM,CAAC,CAAC;EAChC;EACAC,OAAO,CAACC,GAAG,CAACL,KAAK,CAAC;EAIlB,oBACCN,uDAAA,CAAAE,uDAAA;IAAAU,QAAA,gBACCd,sDAAA,CAACR,kEAAa;MAAAsB,QAAA,eACbd,sDAAA,CAACP,qEAAgB;QAChBkB,KAAK,EAAEL,UAAU,CAACS,KAAM;QACxBC,QAAQ,EAAGL,KAAK,IAAKJ,aAAa,CAAC;UAAEQ,KAAK,EAAEJ;QAAM,CAAC;MAAE,CACrD;IAAC,CACY,CAAC,eAChBX,sDAAA,CAACb,sEAAiB;MAAA2B,QAAA,eACjBZ,uDAAA,CAACX,4DAAS;QAAC0B,KAAK,EAAC,MAAM;QAACC,WAAW,EAAE,IAAK;QAAAJ,QAAA,gBACzCd,sDAAA;UAAAc,QAAA,eACCd,sDAAA,CAACX,8EAAW;YACXsB,KAAK,EAAEL,UAAU,CA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;;;;;;;;;;ACnB/nB;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;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;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;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;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://cta/./src/cta/edit.js","webpack://cta/./src/cta/editor.scss","webpack://cta/./src/cta/index.js","webpack://cta/./src/cta/save.js","webpack://cta/./src/cta/style.scss","webpack://cta/./src/img/carhop-fleche-lien-externe-full.svg","webpack://cta/external window [\"wp\",\"blockEditor\"]","webpack://cta/external window [\"wp\",\"blocks\"]","webpack://cta/external window [\"wp\",\"components\"]","webpack://cta/external window [\"wp\",\"i18n\"]","webpack://cta/external window \"React\"","webpack://cta/external window \"ReactJSXRuntime\"","webpack://cta/webpack/bootstrap","webpack://cta/webpack/runtime/chunk loaded","webpack://cta/webpack/runtime/compat get default export","webpack://cta/webpack/runtime/define property getters","webpack://cta/webpack/runtime/hasOwnProperty shorthand","webpack://cta/webpack/runtime/make namespace object","webpack://cta/webpack/runtime/jsonp chunk loading","webpack://cta/webpack/before-startup","webpack://cta/webpack/startup","webpack://cta/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n\tuseSetting,\n} from \"@wordpress/block-editor\";\nimport { PanelBody } from \"@wordpress/components\";\nimport \"./editor.scss\";\nimport { BlockControls, AlignmentToolbar } from \"@wordpress/block-editor\";\nimport { ColorPalette, PanelRow } from \"@wordpress/components\";\nimport { Tip } from \"@wordpress/components\";\nimport { ReactComponent as ArrowIcon } from \"../img/carhop-fleche-lien-externe-full.svg\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { color } = attributes;\n\tconst colors = useSetting(\"color.palette.theme\");\n\n\tfunction handleColorChange(value) {\n\t\tsetAttributes({ color: value });\n\t}\n\tconsole.log(color);\n\n\t\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t setAttributes({ align: value })}\n\t\t\t\t/>\n\t\t\t\n\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\t\t\tsetAttributes({ link: value });\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\t {\n\t\t\t\t\t\t\t\t\thandleColorChange(value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tcolors={colors}\n\t\t\t\t\t\t\t\tdisableCustomColors={true}\n\t\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
\n\t\t\t\n\t\t\t\t setAttributes({ text })}\n\t\t\t\t\tallowedFormats={[]}\n\t\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\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\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\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps } from \"@wordpress/block-editor\";\nimport { ReactComponent as ArrowIcon } from \"../img/carhop-fleche-lien-externe-full.svg\";\n\nexport default function save({ attributes }) {\n\tconst { align, link, text, color } = attributes;\n\treturn (\n\t\t<>\n\t\t// \n\t\t// \t{text}\n\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 {};","var _defs, _path, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgCarhopFlecheLienExterneFull = function SvgCarhopFlecheLienExterneFull(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n id: \"carhop-fleche-lien-externe-full_svg__fleche-lien-externe-full\",\n viewBox: \"0 0 32 32\"\n }, props), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".carhop-fleche-lien-externe-full_svg__cls-1{fill:none;stroke:#000;stroke-width:2px}\"))), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m21.15 10.59-9.38 10.02M21.15 21.4V10.59H10.83\",\n className: \"carhop-fleche-lien-externe-full_svg__cls-1\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 16,\n cy: 16,\n r: 15,\n className: \"carhop-fleche-lien-externe-full_svg__cls-1\"\n })));\n};\nexport { SvgCarhopFlecheLienExterneFull as ReactComponent };\nexport default \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg==\";","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"i18n\"];","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\"cta/index\": 0,\n\t\"cta/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[\"webpackChunkcta\"] = globalThis[\"webpackChunkcta\"] || [];\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, [\"cta/style-index\"], () => (__webpack_require__(\"./src/cta/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","InspectorControls","__experimentalLinkControl","LinkControl","useSetting","PanelBody","BlockControls","AlignmentToolbar","ColorPalette","PanelRow","Tip","ReactComponent","ArrowIcon","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","color","colors","handleColorChange","value","console","log","children","align","onChange","title","initialOpen","link","disableCustomColors","className","style","tagName","placeholder","text","allowedFormats","registerBlockType","save","metadata","name","icon","src","width","height","viewBox","d","stroke","fill","strokeWidth","cx","cy","r","edit"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/render.php b/plugins/carhop-blocks/blocks/cta/build/cta/render.php index f9e1658..95cb1aa 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/render.php +++ b/plugins/carhop-blocks/blocks/cta/build/cta/render.php @@ -2,18 +2,20 @@ $align = isset($attributes['align']) ? $attributes['align'] : ''; $link = isset($attributes['link']) ? $attributes['link'] : []; $text = isset($attributes['text']) ? $attributes['text'] : ''; -$color = isset($attributes['color']) ? $attributes['color'] : 'red'; +$color = isset($attributes['color']) ? $attributes['color'] : ''; +$styles = []; +if ($color) { + $styles[] = 'color: ' . esc_attr($color); + $styles[] = '--cta-current-color: ' . esc_attr($color); +} + $wrapper_attributes = get_block_wrapper_attributes([ 'class' => 'align--' . esc_attr($align), - 'style' => sprintf( - 'color: %s; --cta-current-color: %s;', - esc_attr($color), - esc_attr($color) - ) + 'style' => implode('; ', $styles) ]); $link_url = isset($link['url']) ? esc_url($link['url']) : '#'; diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/style-index-rtl.css b/plugins/carhop-blocks/blocks/cta/build/cta/style-index-rtl.css index 3a6baee..a6be10a 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/style-index-rtl.css +++ b/plugins/carhop-blocks/blocks/cta/build/cta/style-index-rtl.css @@ -3,7 +3,7 @@ \*******************************************************************************************************************************************************************************************************************************************/ .wp-block-carhop-blocks-cta { margin-top: 20px; - color: var(--cta-current-color); + color: var(--cta-current-color, currentColor); padding: 2px; display: block; width: -moz-fit-content; diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css b/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css index 012f51a..48dd39a 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css +++ b/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css @@ -3,7 +3,7 @@ \*******************************************************************************************************************************************************************************************************************************************/ .wp-block-carhop-blocks-cta { margin-top: 20px; - color: var(--cta-current-color); + color: var(--cta-current-color, currentColor); padding: 2px; display: block; width: -moz-fit-content; diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css.map b/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css.map index 7a58af9..b8920dd 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css.map +++ b/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css.map @@ -1 +1 @@ -{"version":3,"file":"cta/style-index.css","mappings":";;;AAAA;EACC;EACA;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;EAEA;AADD;AAGC;EACC;AADF;AAIE;EACC;EACA;AAFH;AAIE;;EAEC;EACA;EACA;AAFH;AAMC;EACC;AAJF;AAMC;EACC;EACA;AAJF;AAMC;EACC;AAJF,C","sources":["webpack://cta/./src/cta/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tmargin-top: 20px;\n\tcolor: var(--cta-current-color);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\tfont-weight: 600;\n\n\ta {\n\t\ttext-decoration: none;\n\t}\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tfill: transparent;\n\t\t\tstroke: var(--cta-current-color);\n\t\t\tstroke-width: 2;\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"cta/style-index.css","mappings":";;;AAAA;EACC;EACA;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;EAEA;AADD;AAGC;EACC;AADF;AAIE;EACC;EACA;AAFH;AAIE;;EAEC;EACA;EACA;AAFH;AAMC;EACC;AAJF;AAMC;EACC;EACA;AAJF;AAMC;EACC;AAJF,C","sources":["webpack://cta/./src/cta/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tmargin-top: 20px;\n\tcolor: var(--cta-current-color, currentColor);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\tfont-weight: 600;\n\n\ta {\n\t\ttext-decoration: none;\n\t}\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tfill: transparent;\n\t\t\tstroke: var(--cta-current-color);\n\t\t\tstroke-width: 2;\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/block.json b/plugins/carhop-blocks/blocks/cta/src/cta/block.json index d65b050..3bae6e8 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/block.json +++ b/plugins/carhop-blocks/blocks/cta/src/cta/block.json @@ -31,7 +31,7 @@ }, "color": { "type": "string", - "default": "#136F63" + "default": null } } } \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/edit.js b/plugins/carhop-blocks/blocks/cta/src/cta/edit.js index 3a6f41e..da007ed 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/edit.js +++ b/plugins/carhop-blocks/blocks/cta/src/cta/edit.js @@ -20,6 +20,10 @@ export default function Edit({ attributes, setAttributes }) { function handleColorChange(value) { setAttributes({ color: value }); } + console.log(color); + + + return ( <> diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/editor.scss b/plugins/carhop-blocks/blocks/cta/src/cta/editor.scss index 9f1539e..01d6e06 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/editor.scss +++ b/plugins/carhop-blocks/blocks/cta/src/cta/editor.scss @@ -1,6 +1,10 @@ .wp-block-carhop-blocks-cta { color: var(--cta-current-color); + a { + color: var(--cta-current-color) !important; + &:after{} + } padding: 2px; display: block; width: fit-content; diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/render.php b/plugins/carhop-blocks/blocks/cta/src/cta/render.php index f9e1658..95cb1aa 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/render.php +++ b/plugins/carhop-blocks/blocks/cta/src/cta/render.php @@ -2,18 +2,20 @@ $align = isset($attributes['align']) ? $attributes['align'] : ''; $link = isset($attributes['link']) ? $attributes['link'] : []; $text = isset($attributes['text']) ? $attributes['text'] : ''; -$color = isset($attributes['color']) ? $attributes['color'] : 'red'; +$color = isset($attributes['color']) ? $attributes['color'] : ''; +$styles = []; +if ($color) { + $styles[] = 'color: ' . esc_attr($color); + $styles[] = '--cta-current-color: ' . esc_attr($color); +} + $wrapper_attributes = get_block_wrapper_attributes([ 'class' => 'align--' . esc_attr($align), - 'style' => sprintf( - 'color: %s; --cta-current-color: %s;', - esc_attr($color), - esc_attr($color) - ) + 'style' => implode('; ', $styles) ]); $link_url = isset($link['url']) ? esc_url($link['url']) : '#'; diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/style.scss b/plugins/carhop-blocks/blocks/cta/src/cta/style.scss index 855a313..afb443b 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/style.scss +++ b/plugins/carhop-blocks/blocks/cta/src/cta/style.scss @@ -1,6 +1,6 @@ .wp-block-carhop-blocks-cta { margin-top: 20px; - color: var(--cta-current-color); + color: var(--cta-current-color, currentColor); padding: 2px; display: block;