diff --git a/plugins/carhop-blocks/build/blocks-manifest.php b/plugins/carhop-blocks/build/blocks-manifest.php index b04669a..150d6cd 100644 --- a/plugins/carhop-blocks/build/blocks-manifest.php +++ b/plugins/carhop-blocks/build/blocks-manifest.php @@ -327,7 +327,11 @@ return array( ), 'supports' => array( 'html' => false, - 'anchor' => true + 'anchor' => true, + 'align' => array( + 'wide', + 'full' + ) ), 'textdomain' => 'carhop-blocks', 'editorScript' => 'file:./index.js', @@ -359,8 +363,9 @@ return array( 'type' => 'string', 'default' => 'full', 'enum' => array( - 'full', - 'contained' + 'contained', + 'wide', + 'full' ) ) ) diff --git a/plugins/carhop-blocks/build/content-box/block.json b/plugins/carhop-blocks/build/content-box/block.json index 472c27c..d236c18 100644 --- a/plugins/carhop-blocks/build/content-box/block.json +++ b/plugins/carhop-blocks/build/content-box/block.json @@ -10,7 +10,11 @@ "example": {}, "supports": { "html": false, - "anchor": true + "anchor": true, + "align": [ + "wide", + "full" + ] }, "textdomain": "carhop-blocks", "editorScript": "file:./index.js", @@ -42,8 +46,9 @@ "type": "string", "default": "full", "enum": [ - "full", - "contained" + "contained", + "wide", + "full" ] } } diff --git a/plugins/carhop-blocks/build/content-box/index.asset.php b/plugins/carhop-blocks/build/content-box/index.asset.php index b629e63..8d50836 100644 --- a/plugins/carhop-blocks/build/content-box/index.asset.php +++ b/plugins/carhop-blocks/build/content-box/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '2abc1cc8d49f9b6ba159'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '556735b9b4ff7e33f0e1'); diff --git a/plugins/carhop-blocks/build/content-box/index.js b/plugins/carhop-blocks/build/content-box/index.js index 17dd190..14a16b9 100644 --- a/plugins/carhop-blocks/build/content-box/index.js +++ b/plugins/carhop-blocks/build/content-box/index.js @@ -41,7 +41,7 @@ function isColorLight(color) { \************************************/ /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/content-box","version":"0.1.0","title":"Boite de contenu","category":"carhop-blocks","icon":"smiley","description":"Boite de contenu pour la mise en forme d\'éléments de contenu","example":{},"supports":{"html":false,"anchor":true},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"hasBackgroundColor":{"type":"boolean","default":false},"backgroundColor":{"type":"string","default":"#f1fcf9"},"hasLightBackground":{"type":"boolean","default":true},"textColor":{"type":"string","default":"inherit"},"blockVariant":{"type":"string","default":"framed"},"blockWidth":{"type":"string","default":"full","enum":["full","contained"]}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/content-box","version":"0.1.0","title":"Boite de contenu","category":"carhop-blocks","icon":"smiley","description":"Boite de contenu pour la mise en forme d\'éléments de contenu","example":{},"supports":{"html":false,"anchor":true,"align":["wide","full"]},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"hasBackgroundColor":{"type":"boolean","default":false},"backgroundColor":{"type":"string","default":"#f1fcf9"},"hasLightBackground":{"type":"boolean","default":true},"textColor":{"type":"string","default":"inherit"},"blockVariant":{"type":"string","default":"framed"},"blockWidth":{"type":"string","default":"full","enum":["contained","wide","full"]}}}'); /***/ }), @@ -152,6 +152,7 @@ function Edit({ }); } } + console.log(blockWidth); return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment, { children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, { children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { @@ -183,11 +184,14 @@ function Edit({ __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { - value: "full", - label: "Pleine largeur" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { value: "contained", label: "Contenue" + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { + value: "wide", + label: "Large" + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { + value: "full", + label: "Pleine largeur" })] }), blockVariant === "backgrounded" && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Card, { children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CardHeader, { @@ -220,7 +224,7 @@ function Edit({ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("section", { ...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({ className: `${postType !== "articles" && "alignfull"} content-box content-box--variant-${blockVariant} ${hasLightBackground ? "content-box--bg-light" : "content-box--bg-dark"} - ${blockWidth === "contained" ? "alignwide" : "alignfull"}`, + ${blockWidth === "contained" ? "aligncontained" : blockWidth === "wide" ? "alignwide" : "alignfull"}`, style: { "--content-box-text-color": textColor !== null && textColor !== void 0 ? textColor : "inherit", "--content-box-background-color": blockVariant === "backgrounded" ? backgroundColor : "transparent" @@ -232,7 +236,7 @@ function Edit({ template: [["core/paragraph", { placeholder: "Ajouter ici le texte" }]], - allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/image", "core/buttons", "core/columns", "core/post-title", "core/embed", "core/quote", "core/pullquote", "core/media-text", "core/table", "carhop-blocks/chapter-section", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "carhop-blocks/scroll-story-block", "carhop-blocks/cta", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "carhop-blocks/localisation-map", "carhop-blocks/notice-panel", "carhop-blocks/story-timeline", "carhop-blocks/highlight-timeline", "acf/statistics-datas", "ninja-forms/form", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"] + allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/image", "core/buttons", "core/columns", "core/post-title", "core/embed", "core/quote", "core/pullquote", "core/media-text", "core/table", "carhop-blocks/chapter-section", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "carhop-blocks/scroll-story-block", "carhop-blocks/cta", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "carhop-blocks/content-box", "carhop-blocks/localisation-map", "carhop-blocks/notice-panel", "carhop-blocks/story-timeline", "carhop-blocks/highlight-timeline", "acf/statistics-datas", "ninja-forms/form", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"] }) }) })] @@ -328,7 +332,7 @@ function save({ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("section", { ..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({ className: `content-box content-box--variant-${blockVariant} ${hasLightBackground ? "content-box--bg-light" : "content-box--bg-dark"} - ${blockWidth === "contained" ? "alignwide" : "alignfull"}`, + ${blockWidth === "contained" ? "aligncontained" : blockWidth === "wide" ? "alignwide" : "alignfull"}`, style: { "--content-box-text-color": textColor !== null && textColor !== void 0 ? textColor : "inherit", "--content-box-background-color": blockVariant === "backgrounded" ? backgroundColor : "transparent" diff --git a/plugins/carhop-blocks/build/content-box/index.js.map b/plugins/carhop-blocks/build/content-box/index.js.map index ee68626..01e1faa 100644 --- a/plugins/carhop-blocks/build/content-box/index.js.map +++ b/plugins/carhop-blocks/build/content-box/index.js.map @@ -1 +1 @@ -{"version":3,"file":"content-box/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,OA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tC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,E;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./_utilities/utilities.js","webpack://carhop-blocks/./src/content-box/edit.js","webpack://carhop-blocks/./src/content-box/editor.scss?3831","webpack://carhop-blocks/./src/content-box/index.js","webpack://carhop-blocks/./src/content-box/save.js","webpack://carhop-blocks/./src/content-box/style.scss","webpack://carhop-blocks/./src/content-box/utilities.js","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"data\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["// Fonction pour déterminer si une couleur est claire ou sombre\r\nexport function isColorLight(color) {\r\n\t// Si pas de couleur, considérer comme claire\r\n\tif (!color) return true;\r\n\r\n\t// Convertir hex en RGB\r\n\tlet hex = color.replace(\"#\", \"\");\r\n\tif (hex.length === 3) {\r\n\t\thex = hex\r\n\t\t\t.split(\"\")\r\n\t\t\t.map((char) => char + char)\r\n\t\t\t.join(\"\");\r\n\t}\r\n\r\n\tconst r = parseInt(hex.substr(0, 2), 16);\r\n\tconst g = parseInt(hex.substr(2, 2), 16);\r\n\tconst b = parseInt(hex.substr(4, 2), 16);\r\n\r\n\t// Calculer la luminance relative (formule standard)\r\n\tconst luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n\r\n\t// Si luminance > 0.5, la couleur est claire\r\n\treturn luminance > 0.5;\r\n}\r\n","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\tblockWidth,\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\n\t\tif (value === \"framed\" || value === \"nude\") {\n\t\t\tsetAttributes({ backgroundColor: \"#fff\" });\n\t\t\tsetAttributes({ hasLightBackground: true });\n\t\t}\n\t}\n\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\t\n\t\t\t\t\t\n\t\t\t\t\t setAttributes({ blockWidth: value })}\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\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\tblockWidth,\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\"content-box/index\": 0,\n\t\"content-box/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"content-box/style-index\"], () => (__webpack_require__(\"./src/content-box/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","blockWidth","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"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"content-box/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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,QAAQ,EAAE,OAAOP,MAAM,IAAI,EAAE;EAClC,IAAIO,QAAQ,KAAK,MAAM,IAAI,CAACvD,kEAAY,CAACkD,eAAe,CAAC,EAAE;IAC1D;IACA,OAAO,CACN;MACCkC,IAAI,EAAE,OAAO;MACba,IAAI,EAAE,OAAO;MACbhG,KAAK,EAAE;IACR,CAAC,CACD;EACF;EAEA,OAAO+C,MAAM,IAAI,EAAE;AACpB,CAAC,C;;;;;;;;;;ACtCD,6C;;;;;;;;;;ACAA,wC;;;;;;;;;;ACAA,4C;;;;;;;;;;ACAA,sC;;;;;;;;;;ACAA,sC;;;;;;;;;;ACAA,2C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,E;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./_utilities/utilities.js","webpack://carhop-blocks/./src/content-box/edit.js","webpack://carhop-blocks/./src/content-box/editor.scss?3831","webpack://carhop-blocks/./src/content-box/index.js","webpack://carhop-blocks/./src/content-box/save.js","webpack://carhop-blocks/./src/content-box/style.scss","webpack://carhop-blocks/./src/content-box/utilities.js","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"data\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["// Fonction pour déterminer si une couleur est claire ou sombre\r\nexport function isColorLight(color) {\r\n\t// Si pas de couleur, considérer comme claire\r\n\tif (!color) return true;\r\n\r\n\t// Convertir hex en RGB\r\n\tlet hex = color.replace(\"#\", \"\");\r\n\tif (hex.length === 3) {\r\n\t\thex = hex\r\n\t\t\t.split(\"\")\r\n\t\t\t.map((char) => char + char)\r\n\t\t\t.join(\"\");\r\n\t}\r\n\r\n\tconst r = parseInt(hex.substr(0, 2), 16);\r\n\tconst g = parseInt(hex.substr(2, 2), 16);\r\n\tconst b = parseInt(hex.substr(4, 2), 16);\r\n\r\n\t// Calculer la luminance relative (formule standard)\r\n\tconst luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n\r\n\t// Si luminance > 0.5, la couleur est claire\r\n\treturn luminance > 0.5;\r\n}\r\n","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\tblockWidth,\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\n\t\tif (value === \"framed\" || value === \"nude\") {\n\t\t\tsetAttributes({ backgroundColor: \"#fff\" });\n\t\t\tsetAttributes({ hasLightBackground: true });\n\t\t}\n\t}\n\tconsole.log(blockWidth);\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\t\n\t\t\t\t\t\n\t\t\t\t\t setAttributes({ blockWidth: value })}\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\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\tblockWidth,\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\"content-box/index\": 0,\n\t\"content-box/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"content-box/style-index\"], () => (__webpack_require__(\"./src/content-box/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","blockWidth","postType","select","getCurrentPostType","filteredBgColors","filteredTextColors","onBackgroundColorChange","value","undefined","isLightBackgroundColor","onHasBackgroundColorChange","onTextColorChange","onBlockVariantChange","console","log","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"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/narrative-card/index.js.map b/plugins/carhop-blocks/build/narrative-card/index.js.map index 1046c7c..d3ca7bc 100644 --- a/plugins/carhop-blocks/build/narrative-card/index.js.map +++ b/plugins/carhop-blocks/build/narrative-card/index.js.map @@ -1 +1 @@ -{"version":3,"file":"narrative-card/index.js","mappings":";;;;;;;;;;;;;;;;;;AAAA;AACkD;AACV;AACxC,oCAAoC,sDAAG,CAAC,sDAAG,IAAI,qFAAqF,sDAAG;AACvI,EAAE,uDAAI;AACN;AACA;AACA;AACA;AACA;AACA,GAAG;AAGD;AACF;;;;;;;;;;;;;;;;;;;ACd2D;AAAA;AAE5C,SAASK,KAAKA,CAAC;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAE;EAC5E,MAAMC,UAAU,GACfD,WAAW,IAAIA,WAAW,KAAK,MAAM,GAClC,iCAAiCE,MAAM,CAACF,WAAW,CAAC,CAACG,OAAO,CAC5D,OAAO,EACP,GACA,CAAC,EAAE,GACH,EAAE;EACN,oBACCR,uDAAA;IAAKS,SAAS,EAAE,wBAAwBH,UAAU,EAAG;IAAAI,QAAA,GACnDR,QAAQ,iBAAIJ,sDAAA;MAAKa,GAAG,EAAET,QAAS;MAACU,GAAG,EAAET;IAAS,CAAE,CAAC,EACjD,CAACD,QAAQ,iBACTJ,sDAAA,CAACF,qEAAgB;MAChBiB,MAAM,EAAC,SAAS;MAChBC,YAAY,EAAE,CAAC,OAAO,CAAE;MACxBV,QAAQ,EAAEA,QAAS;MACnBW,QAAQ,EAAE,KAAM;MAChBC,YAAY,EAAE;IAAK,CACnB,CACD;EAAA,CACG,CAAC;AAER,C;;;;;;;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+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,E;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./node_modules/.pnpm/@wordpress+icons@11.2.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js","webpack://carhop-blocks/./src/narrative-card/Cover.jsx","webpack://carhop-blocks/./src/narrative-card/edit.js","webpack://carhop-blocks/./src/narrative-card/editor.scss","webpack://carhop-blocks/./src/narrative-card/index.js","webpack://carhop-blocks/./src/narrative-card/save.js","webpack://carhop-blocks/./src/narrative-card/style.scss","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window [\"wp\",\"primitives\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["// packages/icons/src/library/trash.tsx\nimport { Path, SVG } from \"@wordpress/primitives\";\nimport { jsx } from \"react/jsx-runtime\";\nvar trash_default = /* @__PURE__ */ jsx(SVG, { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", children: /* @__PURE__ */ jsx(\n Path,\n {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z\"\n }\n) });\nexport {\n trash_default as default\n};\n//# sourceMappingURL=trash.js.map\n","import { MediaPlaceholder } from \"@wordpress/block-editor\";\r\n\r\nexport default function Cover({ coverUrl, coverAlt, onSelect, aspectRatio }) {\r\n\tconst ratioClass =\r\n\t\taspectRatio && aspectRatio !== \"auto\"\r\n\t\t\t? ` narrative-card__cover--ratio-${String(aspectRatio).replace(\r\n\t\t\t\t\t/[/:]/g,\r\n\t\t\t\t\t\"-\"\r\n\t\t\t )}`\r\n\t\t\t: \"\";\r\n\treturn (\r\n\t\t
\r\n\t\t\t{coverUrl && {coverAlt}}\r\n\t\t\t{!coverUrl && (\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t
\r\n\t);\r\n}\r\n","import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tMediaReplaceFlow,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n\tuseSetting,\n\tInnerBlocks,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tButton,\n\tCheckboxControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport \"./editor.scss\";\nimport { lock, trash } from \"@wordpress/icons\";\nimport CoverImage from \"./Cover\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst {\n\t\tcoverId,\n\t\tcoverUrl,\n\t\tcoverAlt,\n\t\tcoverPosition,\n\t\thasCover,\n\t\tblackWhiteCoverFilter,\n\t\taspectRatio,\n\t} = attributes;\n\tconst colors = useSetting(\"color.palette.theme\");\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\n\t// Déterminer l'ordre des éléments basé sur la position\n\tconst shouldShowCoverLeft = hasCover && coverPosition === \"left\";\n\tconst shouldShowCoverRight = hasCover && coverPosition === \"right\";\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t setAttributes({ hasCover: value })}\n\t\t\t\t\t/>\n\t\t\t\t\t{coverUrl && {coverAlt}}\n\n\t\t\t\t\t{hasCover && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{coverUrl && (\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\n\t\t\t\t\t\t\t setAttributes({ coverPosition: value })}\n\t\t\t\t\t\t\t\tvalue={coverPosition}\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\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t setAttributes({ aspectRatio: value })}\n\t\t\t\t\t\t\t\thelp={__(\n\t\t\t\t\t\t\t\t\t\"Sélectionnez la proportion d'affichage de la carte.\",\n\t\t\t\t\t\t\t\t\t\"carhop-blocks\"\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tsetAttributes({ blackWhiteCoverFilter: value === \"true\" });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvalue={blackWhiteCoverFilter ? \"true\" : \"false\"}\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\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\n\t\t\t\t{shouldShowCoverLeft && (\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
\n\n\t\t\t\t{shouldShowCoverRight && (\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\n\t\t),\n\t\tforeground: \"#136f63\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps } from \"@wordpress/block-editor\";\nimport { InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\thasCover,\n\t\tcoverUrl,\n\t\tcoverAlt,\n\t\tcoverPosition,\n\t\tblackWhiteCoverFilter,\n\t\taspectRatio,\n\t} = attributes;\n\n\treturn ;\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\"narrative-card/index\": 0,\n\t\"narrative-card/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"narrative-card/style-index\"], () => (__webpack_require__(\"./src/narrative-card/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["MediaPlaceholder","jsx","_jsx","jsxs","_jsxs","Cover","coverUrl","coverAlt","onSelect","aspectRatio","ratioClass","String","replace","className","children","src","alt","accept","allowedTypes","multiple","handleUpload","__","useBlockProps","RichText","MediaReplaceFlow","InspectorControls","__experimentalLinkControl","LinkControl","useSetting","InnerBlocks","PanelBody","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Button","CheckboxControl","SelectControl","lock","trash","CoverImage","Fragment","_Fragment","Edit","attributes","setAttributes","coverId","coverPosition","hasCover","blackWhiteCoverFilter","colors","setCoverAttributes","cover","id","url","removeCoverAttributes","shouldShowCoverLeft","shouldShowCoverRight","title","label","checked","onChange","value","mediaId","mediaUrl","name","variant","icon","onClick","isBlock","options","help","viewBox","fill","xmlns","preserveAspectRatio","d","stroke","strokeWidth","vectorEffect","allowedBlocks","template","content","registerBlockType","save","metadata","foreground","edit","Content"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"narrative-card/index.js","mappings":";;;;;;;;;;;;;;;;;;AAAA;AACkD;AACV;AACxC,oCAAoC,sDAAG,CAAC,sDAAG,IAAI,qFAAqF,sDAAG;AACvI,EAAE,uDAAI;AACN;AACA;AACA;AACA;AACA;AACA,GAAG;AAGD;AACF;;;;;;;;;;;;;;;;;;;ACd2D;AAAA;AAE5C,SAASK,KAAKA,CAAC;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAE;EAC5E,MAAMC,UAAU,GACfD,WAAW,IAAIA,WAAW,KAAK,MAAM,GAClC,iCAAiCE,MAAM,CAACF,WAAW,CAAC,CAACG,OAAO,CAC5D,OAAO,EACP,GACA,CAAC,EAAE,GACH,EAAE;EACN,oBACCR,uDAAA;IAAKS,SAAS,EAAE,wBAAwBH,UAAU,EAAG;IAAAI,QAAA,GACnDR,QAAQ,iBAAIJ,sDAAA;MAAKa,GAAG,EAAET,QAAS;MAACU,GAAG,EAAET;IAAS,CAAE,CAAC,EACjD,CAACD,QAAQ,iBACTJ,sDAAA,CAACF,qEAAgB;MAChBiB,MAAM,EAAC,SAAS;MAChBC,YAAY,EAAE,CAAC,OAAO,CAAE;MACxBV,QAAQ,EAAEA,QAAS;MACnBW,QAAQ,EAAE,KAAM;MAChBC,YAAY,EAAE;IAAK,CACnB,CACD;EAAA,CACG,CAAC;AAER,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxBqC;AAUJ;AAQF;AACR;AACwB;AACd;AAAA;AAElB,SAASuB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IACLC,OAAO;IACPxC,QAAQ;IACRC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ACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./node_modules/.pnpm/@wordpress+icons@11.2.0_react@18.3.1/node_modules/@wordpress/icons/build-module/library/trash.js","webpack://carhop-blocks/./src/narrative-card/Cover.jsx","webpack://carhop-blocks/./src/narrative-card/edit.js","webpack://carhop-blocks/./src/narrative-card/editor.scss?240b","webpack://carhop-blocks/./src/narrative-card/index.js","webpack://carhop-blocks/./src/narrative-card/save.js","webpack://carhop-blocks/./src/narrative-card/style.scss?7d5f","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window [\"wp\",\"primitives\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["// packages/icons/src/library/trash.tsx\nimport { Path, SVG } from \"@wordpress/primitives\";\nimport { jsx } from \"react/jsx-runtime\";\nvar trash_default = /* @__PURE__ */ jsx(SVG, { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", children: /* @__PURE__ */ jsx(\n Path,\n {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z\"\n }\n) });\nexport {\n trash_default as default\n};\n//# sourceMappingURL=trash.js.map\n","import { MediaPlaceholder } from \"@wordpress/block-editor\";\r\n\r\nexport default function Cover({ coverUrl, coverAlt, onSelect, aspectRatio }) {\r\n\tconst ratioClass =\r\n\t\taspectRatio && aspectRatio !== \"auto\"\r\n\t\t\t? ` narrative-card__cover--ratio-${String(aspectRatio).replace(\r\n\t\t\t\t\t/[/:]/g,\r\n\t\t\t\t\t\"-\"\r\n\t\t\t )}`\r\n\t\t\t: \"\";\r\n\treturn (\r\n\t\t
\r\n\t\t\t{coverUrl && {coverAlt}}\r\n\t\t\t{!coverUrl && (\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t
\r\n\t);\r\n}\r\n","import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tMediaReplaceFlow,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n\tuseSetting,\n\tInnerBlocks,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\tButton,\n\tCheckboxControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport \"./editor.scss\";\nimport { lock, trash } from \"@wordpress/icons\";\nimport CoverImage from \"./Cover\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst {\n\t\tcoverId,\n\t\tcoverUrl,\n\t\tcoverAlt,\n\t\tcoverPosition,\n\t\thasCover,\n\t\tblackWhiteCoverFilter,\n\t\taspectRatio,\n\t} = attributes;\n\tconst colors = useSetting(\"color.palette.theme\");\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\n\t// Déterminer l'ordre des éléments basé sur la position\n\tconst shouldShowCoverLeft = hasCover && coverPosition === \"left\";\n\tconst shouldShowCoverRight = hasCover && coverPosition === \"right\";\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t setAttributes({ hasCover: value })}\n\t\t\t\t\t/>\n\t\t\t\t\t{coverUrl && {coverAlt}}\n\n\t\t\t\t\t{hasCover && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{coverUrl && (\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\n\t\t\t\t\t\t\t setAttributes({ coverPosition: value })}\n\t\t\t\t\t\t\t\tvalue={coverPosition}\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\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t setAttributes({ aspectRatio: value })}\n\t\t\t\t\t\t\t\thelp={__(\n\t\t\t\t\t\t\t\t\t\"Sélectionnez la proportion d'affichage de la carte.\",\n\t\t\t\t\t\t\t\t\t\"carhop-blocks\"\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tsetAttributes({ blackWhiteCoverFilter: value === \"true\" });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tvalue={blackWhiteCoverFilter ? \"true\" : \"false\"}\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\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\n\t\t\t\t{shouldShowCoverLeft && (\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
\n\n\t\t\t\t{shouldShowCoverRight && (\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\n\t\t),\n\t\tforeground: \"#136f63\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps } from \"@wordpress/block-editor\";\nimport { InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\thasCover,\n\t\tcoverUrl,\n\t\tcoverAlt,\n\t\tcoverPosition,\n\t\tblackWhiteCoverFilter,\n\t\taspectRatio,\n\t} = attributes;\n\n\treturn ;\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\"narrative-card/index\": 0,\n\t\"narrative-card/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"narrative-card/style-index\"], () => (__webpack_require__(\"./src/narrative-card/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["MediaPlaceholder","jsx","_jsx","jsxs","_jsxs","Cover","coverUrl","coverAlt","onSelect","aspectRatio","ratioClass","String","replace","className","children","src","alt","accept","allowedTypes","multiple","handleUpload","__","useBlockProps","RichText","MediaReplaceFlow","InspectorControls","__experimentalLinkControl","LinkControl","useSetting","InnerBlocks","PanelBody","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","Button","CheckboxControl","SelectControl","lock","trash","CoverImage","Fragment","_Fragment","Edit","attributes","setAttributes","coverId","coverPosition","hasCover","blackWhiteCoverFilter","colors","setCoverAttributes","cover","id","url","removeCoverAttributes","shouldShowCoverLeft","shouldShowCoverRight","title","label","checked","onChange","value","mediaId","mediaUrl","name","variant","icon","onClick","isBlock","options","help","viewBox","fill","xmlns","preserveAspectRatio","d","stroke","strokeWidth","vectorEffect","allowedBlocks","template","content","registerBlockType","save","metadata","foreground","edit","Content"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/variations-rtl.css b/plugins/carhop-blocks/build/variations-rtl.css index 4acf629..7e9cd39 100644 --- a/plugins/carhop-blocks/build/variations-rtl.css +++ b/plugins/carhop-blocks/build/variations-rtl.css @@ -5,19 +5,20 @@ display: block; } .wp-block-list.is-iconed-list li.has-custom-icon { - padding-right: 0; - margin-bottom: 10px; - display: flex; - align-items: center; + padding-right: 48px; + margin-bottom: 20px; gap: 20px; + position: relative; } .wp-block-list.is-iconed-list li.has-custom-icon::before { content: " "; - position: static; + position: absolute; + top: 0; + right: 0; display: inline-block; - padding: 20px; - width: 40px; - height: 40px; + padding: 6px; + width: 36px; + height: 36px; background-color: var(--wp--preset--color--primary); background-size: 20px auto; background-repeat: no-repeat; diff --git a/plugins/carhop-blocks/build/variations.asset.php b/plugins/carhop-blocks/build/variations.asset.php index 18c4158..2184a18 100644 --- a/plugins/carhop-blocks/build/variations.asset.php +++ b/plugins/carhop-blocks/build/variations.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'cb68829c713b83a15dea'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '0a4c9870b88afed9dfe3'); diff --git a/plugins/carhop-blocks/build/variations.css b/plugins/carhop-blocks/build/variations.css index 4c5da97..72984f3 100644 --- a/plugins/carhop-blocks/build/variations.css +++ b/plugins/carhop-blocks/build/variations.css @@ -5,19 +5,20 @@ display: block; } .wp-block-list.is-iconed-list li.has-custom-icon { - padding-left: 0; - margin-bottom: 10px; - display: flex; - align-items: center; + padding-left: 48px; + margin-bottom: 20px; gap: 20px; + position: relative; } .wp-block-list.is-iconed-list li.has-custom-icon::before { content: " "; - position: static; + position: absolute; + top: 0; + left: 0; display: inline-block; - padding: 20px; - width: 40px; - height: 40px; + padding: 6px; + width: 36px; + height: 36px; background-color: var(--wp--preset--color--primary); background-size: 20px auto; background-repeat: no-repeat; diff --git a/plugins/carhop-blocks/build/variations.css.map b/plugins/carhop-blocks/build/variations.css.map index 2c4af8c..281f84b 100644 --- a/plugins/carhop-blocks/build/variations.css.map +++ b/plugins/carhop-blocks/build/variations.css.map @@ -1 +1 @@ -{"version":3,"file":"variations.css","mappings":";;;AAAA;EACC;AACD;AACC;EACC;EACA;EACA;EACA;EACA;AACF;AACE;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACH;AACE;EACC;AACH;AACE;EACC;AACH;AACE;EACC;AACH;AACE;EACC;AACH;AACE;EACC;AACH;AACE;EACC;AACH;AAOA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAJD;AAKC;EACC;AAHF;AAKC;EACC;AAHF;AAKC;EACC;AAHF;AAKC;EACC;AAHF;AAKC;EACC;AAHF;AAKC;EACC;AAHF,C","sources":["webpack://carhop-blocks/./src/core-variants/variants.scss"],"sourcesContent":[".wp-block-list.is-iconed-list {\r\n\tdisplay: block;\r\n\r\n\tli.has-custom-icon {\r\n\t\tpadding-left: 0;\r\n\t\tmargin-bottom: 10px;\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tgap: 20px;\r\n\r\n\t\t&::before {\r\n\t\t\tcontent: \" \";\r\n\t\t\tposition: static;\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tpadding: 20px;\r\n\t\t\twidth: 40px;\r\n\t\t\theight: 40px;\r\n\t\t\tbackground-color: var(--wp--preset--color--primary);\r\n\t\t\tbackground-size: 20px auto;\r\n\t\t\tbackground-repeat: no-repeat;\r\n\t\t\tbackground-position: center;\r\n\t\t}\r\n\t\t&--sablier::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-sablier.svg\");\r\n\t\t}\r\n\t\t&--loupe::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe.svg\");\r\n\t\t}\r\n\t\t&--cadenas::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-cadenas.svg\");\r\n\t\t}\r\n\t\t&--check::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-check.svg\");\r\n\t\t}\r\n\t\t&--loupe-alt::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe-alt.svg\");\r\n\t\t}\r\n\t\t&--pendule::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-pendule.svg\");\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.iconed-list-item-icon-dropdown {\r\n}\r\n\r\n.iconed-list-item-backend-icon-square {\r\n\tdisplay: inline-block;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tbackground-size: contain;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: center;\r\n\tcolor: currentColor;\r\n\tfilter: invert(1);\r\n\t&--sablier {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-sablier.svg\");\r\n\t}\r\n\t&--loupe {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe.svg\");\r\n\t}\r\n\t&--cadenas {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-cadenas.svg\");\r\n\t}\r\n\t&--check {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-check.svg\");\r\n\t}\r\n\t&--loupe-alt {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe-alt.svg\");\r\n\t}\r\n\t&--pendule {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-pendule.svg\");\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"variations.css","mappings":";;;AAAA;EACC;AACD;AACC;EACC;EACA;EACA;EACA;AACF;AAIE;EACC;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAQA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AALD;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF,C","sources":["webpack://carhop-blocks/./src/core-variants/variants.scss"],"sourcesContent":[".wp-block-list.is-iconed-list {\r\n\tdisplay: block;\r\n\r\n\tli.has-custom-icon {\r\n\t\tpadding-left: 48px;\r\n\t\tmargin-bottom: 20px;\r\n\t\tgap: 20px;\r\n\t\tposition: relative;\r\n\r\n\t\t// display: flex;\r\n\t\t// align-items: center;\r\n\r\n\t\t&::before {\r\n\t\t\tcontent: \" \";\r\n\t\t\t// position: static;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\tleft: 0;\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tpadding: 6px;\r\n\t\t\twidth: 36px;\r\n\t\t\theight: 36px;\r\n\t\t\tbackground-color: var(--wp--preset--color--primary);\r\n\t\t\tbackground-size: 20px auto;\r\n\t\t\tbackground-repeat: no-repeat;\r\n\t\t\tbackground-position: center;\r\n\t\t}\r\n\t\t&--sablier::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-sablier.svg\");\r\n\t\t}\r\n\t\t&--loupe::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe.svg\");\r\n\t\t}\r\n\t\t&--cadenas::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-cadenas.svg\");\r\n\t\t}\r\n\t\t&--check::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-check.svg\");\r\n\t\t}\r\n\t\t&--loupe-alt::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe-alt.svg\");\r\n\t\t}\r\n\t\t&--pendule::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-pendule.svg\");\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.iconed-list-item-backend-icon-square {\r\n\tdisplay: inline-block;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tbackground-size: contain;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: center;\r\n\tcolor: currentColor;\r\n\tfilter: invert(1);\r\n\t&--sablier {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-sablier.svg\");\r\n\t}\r\n\t&--loupe {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe.svg\");\r\n\t}\r\n\t&--cadenas {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-cadenas.svg\");\r\n\t}\r\n\t&--check {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-check.svg\");\r\n\t}\r\n\t&--loupe-alt {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe-alt.svg\");\r\n\t}\r\n\t&--pendule {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-pendule.svg\");\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/variations.js b/plugins/carhop-blocks/build/variations.js index 2cce989..d675adc 100644 --- a/plugins/carhop-blocks/build/variations.js +++ b/plugins/carhop-blocks/build/variations.js @@ -1,6 +1,19 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ +/***/ "./src/core-variants/core-buttons/editor.js": +/*!**************************************************!*\ + !*** ./src/core-variants/core-buttons/editor.js ***! + \**************************************************/ +/***/ (() => { + +wp.blocks.registerBlockStyle("core/buttons", { + name: "big-buttons", + label: "Grands boutons " +}); + +/***/ }), + /***/ "./src/core-variants/core-embed-variant/editor.js": /*!********************************************************!*\ !*** ./src/core-variants/core-embed-variant/editor.js ***! @@ -407,7 +420,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _core_embed_variant_editor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core-embed-variant/editor.js */ "./src/core-variants/core-embed-variant/editor.js"); /* harmony import */ var _core_embed_variant_editor_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_core_embed_variant_editor_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _core_list_variant_editor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core-list-variant/editor.js */ "./src/core-variants/core-list-variant/editor.js"); -/* harmony import */ var _variants_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./variants.scss */ "./src/core-variants/variants.scss"); +/* harmony import */ var _core_buttons_editor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./core-buttons/editor.js */ "./src/core-variants/core-buttons/editor.js"); +/* harmony import */ var _core_buttons_editor_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_core_buttons_editor_js__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _variants_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./variants.scss */ "./src/core-variants/variants.scss"); + diff --git a/plugins/carhop-blocks/build/variations.js.map b/plugins/carhop-blocks/build/variations.js.map index 6f61bcb..59ef3cd 100644 --- a/plugins/carhop-blocks/build/variations.js.map +++ b/plugins/carhop-blocks/build/variations.js.map @@ -1 +1 @@ -{"version":3,"file":"variations.js","mappings":";;;;;;;;;AAAAA,EAAE,CAACC,MAAM,CAACC,kBAAkB,CAAC,YAAY,EAAE;EAC1CC,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE;AACR,CAAC,CAAC,C;;;;;;;;;;ACHFJ,EAAE,CAACC,MAAM,CAACC,kBAAkB,CAAC,cAAc,EAAE;EAC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sDAAA,CAAC8B,cAAc;QAAA,GAAKZ;MAAK,CAAG,CAAC;IACrC;IACA,MAAMa,IAAI,GAAGb,KAAK,CAACb,UAAU,EAAES,IAAI,IAAI,EAAE;IACzC,MAAMR,SAAS,GAAG,CACjBY,KAAK,CAACZ,SAAS,IAAI,EAAE,EACrByB,IAAI,GAAG,iBAAiB,GAAG,EAAE,EAC7BA,IAAI,GAAG,oBAAoBA,IAAI,EAAE,GAAG,EAAE,CACtC,CACCC,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC;IAEX,oBAAOlC,sDAAA,CAAC8B,cAAc;MAAA,GAAKZ,KAAK;MAAEZ,SAAS,EAAEA;IAAU,CAAE,CAAC;EAC3D,CAAC;AACF,CAAC,EAAE,iCAAiC,CACrC,CAAC,C;;;;;;;;;;;;ACvKD;;;;;;;;;;;;ACAA,6C;;;;;;;;;;;ACAA,wC;;;;;;;;;;;ACAA,4C;;;;;;;;;;;ACAA,yC;;;;;;;;;;;ACAA,yC;;;;;;;;;;;ACAA,uC;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,2C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;;ACN0C;AACF;AACA;AACD","sources":["webpack://carhop-blocks/./src/core-variants/core-embed-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-heading-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-image-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-list-variant/editor.js","webpack://carhop-blocks/./src/core-variants/variants.scss?f090","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"compose\"]","webpack://carhop-blocks/external window [\"wp\",\"element\"]","webpack://carhop-blocks/external window [\"wp\",\"hooks\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/./src/core-variants/variants.js"],"sourcesContent":["wp.blocks.registerBlockStyle(\"core/embed\", {\r\n\tname: \"stacked-background\",\r\n\tlabel: \"Fond empilé\",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/heading\", {\r\n\tname: \"stroked-after\",\r\n\tlabel: \"Titre + trait \",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/image\", {\r\n\tname: \"framed\",\r\n\tlabel: \"Encadré\",\r\n\tisDefault: true,\r\n});\r\nwp.blocks.registerBlockStyle(\"core/image\", {\r\n\tname: \"stacked\",\r\n\tlabel: \"Empilé\",\r\n\tisDefault: false,\r\n});\r\n","import { registerBlockVariation } from \"@wordpress/blocks\";\r\nimport { __ } from \"@wordpress/i18n\";\r\nimport {\r\n\tInspectorControls,\r\n\tBlockControls,\r\n\tAlignmentToolbar,\r\n} from \"@wordpress/block-editor\";\r\nimport { ToolbarGroup, ToolbarDropdownMenu } from \"@wordpress/components\";\r\nimport { Fragment } from \"@wordpress/element\";\r\nimport { addFilter } from \"@wordpress/hooks\";\r\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\r\n\r\nimport { check, arrowRight, starFilled } from \"@wordpress/icons\";\r\n\r\n// Variation du bloc \"Liste\" pour ajouter une classe spéciale\r\nregisterBlockVariation(\"core/list\", {\r\n\tname: \"iconed-list\",\r\n\ttitle: \"Liste avec icônes\",\r\n\tdescription: \"Liste dont chaque élément peut avoir une icône personnalisée.\",\r\n\tattributes: {\r\n\t\tclassName: \"is-iconed-list\",\r\n\t},\r\n\tscope: [\"inserter\", \"transform\"],\r\n\tisActive: (blockAttributes) => {\r\n\t\tconst cls = (blockAttributes && blockAttributes.className) || \"\";\r\n\t\treturn cls.split(\" \").includes(\"is-iconed-list\");\r\n\t},\r\n});\r\n\r\n// -----------------------------\r\n// 1. On étend les attributs de core/list-item\r\n// -----------------------------\r\n\r\naddFilter(\r\n\t\"blocks.registerBlockType\",\r\n\t\"am/iconed-list-item-attributes\",\r\n\t(settings, name) => {\r\n\t\tif (name !== \"core/list-item\") {\r\n\t\t\treturn settings;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\t...settings,\r\n\t\t\tattributes: {\r\n\t\t\t\t...settings.attributes,\r\n\t\t\t\ticon: {\r\n\t\t\t\t\ttype: \"string\",\r\n\t\t\t\t\tdefault: \"\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t};\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 2. On ajoute un panneau de réglages pour choisir l'icône\r\n// -----------------------------\r\n\r\naddFilter(\r\n\t\"editor.BlockEdit\",\r\n\t\"am/iconed-list-item-controls\",\r\n\t(BlockEdit) => (props) => {\r\n\t\tif (props.name !== \"core/list-item\") {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tconst { attributes, setAttributes } = props;\r\n\t\tconst { icon } = attributes;\r\n\r\n\t\tconst ICONS = [\r\n\t\t\t{\r\n\t\t\t\ttitle: __(\"Loupe\"),\r\n\t\t\t\tvalue: \"loupe\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: __(\"Sablier\"),\r\n\t\t\t\tvalue: \"sablier\",\r\n\t\t\t},\r\n\t\t\t{ title: __(\"Cadenas\"), value: \"cadenas\" },\r\n\t\t\t{ title: __(\"Check\"), value: \"check\" },\r\n\t\t\t{ title: __(\"Loupe Alt\"), value: \"loupe-alt\" },\r\n\t\t\t{ title: __(\"Pendule\"), value: \"pendule\" },\r\n\t\t];\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcontrols={ICONS.map(({ title, value }) => ({\r\n\t\t\t\t\t\t\t\ttitle,\r\n\t\t\t\t\t\t\t\ticon: (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t),\r\n\r\n\t\t\t\t\t\t\t\tisActive: icon === value,\r\n\t\t\t\t\t\t\t\tonClick: () => setAttributes({ icon: value }),\r\n\t\t\t\t\t\t\t}))}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t setAttributes({ align: value })}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 3. On ajoute des props au HTML sauvegardé pour chaque
  • \r\n// -----------------------------\r\naddFilter(\r\n\t\"blocks.getSaveContent.extraProps\",\r\n\t\"carhop/iconed-list-item-save-props\",\r\n\t(extraProps, blockType, attributes) => {\r\n\t\tif (blockType.name !== \"core/list-item\" || !attributes.icon) {\r\n\t\t\treturn extraProps;\r\n\t\t}\r\n\r\n\t\tif (attributes.icon) {\r\n\t\t\textraProps = {\r\n\t\t\t\t...extraProps,\r\n\t\t\t\tclassName:\r\n\t\t\t\t\t(extraProps.className || \"\") +\r\n\t\t\t\t\t\" has-custom-icon has-custom-icon--\" +\r\n\t\t\t\t\tattributes.icon,\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn extraProps;\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 4. Applique les mêmes classes en mode éditeur (BlockListBlock)\r\n// -----------------------------\r\naddFilter(\r\n\t\"editor.BlockListBlock\",\r\n\t\"carhop/iconed-list-item-editor-classes\",\r\n\tcreateHigherOrderComponent((BlockListBlock) => {\r\n\t\treturn (props) => {\r\n\t\t\tif (props.name !== \"core/list-item\") {\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\tconst slug = props.attributes?.icon || \"\";\r\n\t\t\tconst className = [\r\n\t\t\t\tprops.className || \"\",\r\n\t\t\t\tslug ? \"has-custom-icon\" : \"\",\r\n\t\t\t\tslug ? `has-custom-icon--${slug}` : \"\",\r\n\t\t\t]\r\n\t\t\t\t.filter(Boolean)\r\n\t\t\t\t.join(\" \");\r\n\r\n\t\t\treturn ;\r\n\t\t};\r\n\t}, \"withIconedListItemEditorClasses\")\r\n);\r\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"compose\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"hooks\"];","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","// 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};","import \"./core-heading-variant/editor.js\";\r\nimport \"./core-image-variant/editor.js\";\r\nimport \"./core-embed-variant/editor.js\";\r\nimport \"./core-list-variant/editor.js\";\r\n\r\nimport \"./variants.scss\";\r\n"],"names":["wp","blocks","registerBlockStyle","name","label","isDefault","registerBlockVariation","__","InspectorControls","BlockControls","AlignmentToolbar","ToolbarGroup","ToolbarDropdownMenu","Fragment","addFilter","createHigherOrderComponent","check","arrowRight","starFilled","jsx","_jsx","jsxs","_jsxs","title","description","attributes","className","scope","isActive","blockAttributes","cls","split","includes","settings","icon","type","default","BlockEdit","props","setAttributes","ICONS","value","children","controls","map","onClick","align","onChange","extraProps","blockType","BlockListBlock","slug","filter","Boolean","join"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"variations.js","mappings":";;;;;;;;;AAAAA,EAAE,CAACC,MAAM,CAACC,kBAAkB,CAAC,cAAc,EAAE;EAC5CC,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE;AACR,CAAC,CAAC,C;;;;;;;;;;ACHFJ,EAAE,CAACC,MAAM,CAACC,kBAAkB,CAAC,YAAY,EAAE;EAC1CC,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE;AACR,CAAC,CAAC,C;;;;;;;;;;ACHFJ,EAAE,CAACC,MAAM,CAACC,kBAAkB,CAAC,cAAc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,oBAAOiB,sDAAA,CAAC8B,cAAc;QAAA,GAAKZ;MAAK,CAAG,CAAC;IACrC;IACA,MAAMa,IAAI,GAAGb,KAAK,CAACb,UAAU,EAAES,IAAI,IAAI,EAAE;IACzC,MAAMR,SAAS,GAAG,CACjBY,KAAK,CAACZ,SAAS,IAAI,EAAE,EACrByB,IAAI,GAAG,iBAAiB,GAAG,EAAE,EAC7BA,IAAI,GAAG,oBAAoBA,IAAI,EAAE,GAAG,EAAE,CACtC,CACCC,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC;IAEX,oBAAOlC,sDAAA,CAAC8B,cAAc;MAAA,GAAKZ,KAAK;MAAEZ,SAAS,EAAEA;IAAU,CAAE,CAAC;EAC3D,CAAC;AACF,CAAC,EAAE,iCAAiC,CACrC,CAAC,C;;;;;;;;;;;;ACvKD;;;;;;;;;;;;ACAA,6C;;;;;;;;;;;ACAA,wC;;;;;;;;;;;ACAA,4C;;;;;;;;;;;ACAA,yC;;;;;;;;;;;ACAA,yC;;;;;;;;;;;ACAA,uC;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,2C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;;;;ACN0C;AACF;AACA;AACD;AACL","sources":["webpack://carhop-blocks/./src/core-variants/core-buttons/editor.js","webpack://carhop-blocks/./src/core-variants/core-embed-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-heading-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-image-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-list-variant/editor.js","webpack://carhop-blocks/./src/core-variants/variants.scss?f090","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"compose\"]","webpack://carhop-blocks/external window [\"wp\",\"element\"]","webpack://carhop-blocks/external window [\"wp\",\"hooks\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/./src/core-variants/variants.js"],"sourcesContent":["wp.blocks.registerBlockStyle(\"core/buttons\", {\r\n\tname: \"big-buttons\",\r\n\tlabel: \"Grands boutons \",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/embed\", {\r\n\tname: \"stacked-background\",\r\n\tlabel: \"Fond empilé\",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/heading\", {\r\n\tname: \"stroked-after\",\r\n\tlabel: \"Titre + trait \",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/image\", {\r\n\tname: \"framed\",\r\n\tlabel: \"Encadré\",\r\n\tisDefault: true,\r\n});\r\nwp.blocks.registerBlockStyle(\"core/image\", {\r\n\tname: \"stacked\",\r\n\tlabel: \"Empilé\",\r\n\tisDefault: false,\r\n});\r\n","import { registerBlockVariation } from \"@wordpress/blocks\";\r\nimport { __ } from \"@wordpress/i18n\";\r\nimport {\r\n\tInspectorControls,\r\n\tBlockControls,\r\n\tAlignmentToolbar,\r\n} from \"@wordpress/block-editor\";\r\nimport { ToolbarGroup, ToolbarDropdownMenu } from \"@wordpress/components\";\r\nimport { Fragment } from \"@wordpress/element\";\r\nimport { addFilter } from \"@wordpress/hooks\";\r\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\r\n\r\nimport { check, arrowRight, starFilled } from \"@wordpress/icons\";\r\n\r\n// Variation du bloc \"Liste\" pour ajouter une classe spéciale\r\nregisterBlockVariation(\"core/list\", {\r\n\tname: \"iconed-list\",\r\n\ttitle: \"Liste avec icônes\",\r\n\tdescription: \"Liste dont chaque élément peut avoir une icône personnalisée.\",\r\n\tattributes: {\r\n\t\tclassName: \"is-iconed-list\",\r\n\t},\r\n\tscope: [\"inserter\", \"transform\"],\r\n\tisActive: (blockAttributes) => {\r\n\t\tconst cls = (blockAttributes && blockAttributes.className) || \"\";\r\n\t\treturn cls.split(\" \").includes(\"is-iconed-list\");\r\n\t},\r\n});\r\n\r\n// -----------------------------\r\n// 1. On étend les attributs de core/list-item\r\n// -----------------------------\r\n\r\naddFilter(\r\n\t\"blocks.registerBlockType\",\r\n\t\"am/iconed-list-item-attributes\",\r\n\t(settings, name) => {\r\n\t\tif (name !== \"core/list-item\") {\r\n\t\t\treturn settings;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\t...settings,\r\n\t\t\tattributes: {\r\n\t\t\t\t...settings.attributes,\r\n\t\t\t\ticon: {\r\n\t\t\t\t\ttype: \"string\",\r\n\t\t\t\t\tdefault: \"\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t};\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 2. On ajoute un panneau de réglages pour choisir l'icône\r\n// -----------------------------\r\n\r\naddFilter(\r\n\t\"editor.BlockEdit\",\r\n\t\"am/iconed-list-item-controls\",\r\n\t(BlockEdit) => (props) => {\r\n\t\tif (props.name !== \"core/list-item\") {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tconst { attributes, setAttributes } = props;\r\n\t\tconst { icon } = attributes;\r\n\r\n\t\tconst ICONS = [\r\n\t\t\t{\r\n\t\t\t\ttitle: __(\"Loupe\"),\r\n\t\t\t\tvalue: \"loupe\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: __(\"Sablier\"),\r\n\t\t\t\tvalue: \"sablier\",\r\n\t\t\t},\r\n\t\t\t{ title: __(\"Cadenas\"), value: \"cadenas\" },\r\n\t\t\t{ title: __(\"Check\"), value: \"check\" },\r\n\t\t\t{ title: __(\"Loupe Alt\"), value: \"loupe-alt\" },\r\n\t\t\t{ title: __(\"Pendule\"), value: \"pendule\" },\r\n\t\t];\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcontrols={ICONS.map(({ title, value }) => ({\r\n\t\t\t\t\t\t\t\ttitle,\r\n\t\t\t\t\t\t\t\ticon: (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t),\r\n\r\n\t\t\t\t\t\t\t\tisActive: icon === value,\r\n\t\t\t\t\t\t\t\tonClick: () => setAttributes({ icon: value }),\r\n\t\t\t\t\t\t\t}))}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t setAttributes({ align: value })}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 3. On ajoute des props au HTML sauvegardé pour chaque
  • \r\n// -----------------------------\r\naddFilter(\r\n\t\"blocks.getSaveContent.extraProps\",\r\n\t\"carhop/iconed-list-item-save-props\",\r\n\t(extraProps, blockType, attributes) => {\r\n\t\tif (blockType.name !== \"core/list-item\" || !attributes.icon) {\r\n\t\t\treturn extraProps;\r\n\t\t}\r\n\r\n\t\tif (attributes.icon) {\r\n\t\t\textraProps = {\r\n\t\t\t\t...extraProps,\r\n\t\t\t\tclassName:\r\n\t\t\t\t\t(extraProps.className || \"\") +\r\n\t\t\t\t\t\" has-custom-icon has-custom-icon--\" +\r\n\t\t\t\t\tattributes.icon,\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn extraProps;\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 4. Applique les mêmes classes en mode éditeur (BlockListBlock)\r\n// -----------------------------\r\naddFilter(\r\n\t\"editor.BlockListBlock\",\r\n\t\"carhop/iconed-list-item-editor-classes\",\r\n\tcreateHigherOrderComponent((BlockListBlock) => {\r\n\t\treturn (props) => {\r\n\t\t\tif (props.name !== \"core/list-item\") {\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\tconst slug = props.attributes?.icon || \"\";\r\n\t\t\tconst className = [\r\n\t\t\t\tprops.className || \"\",\r\n\t\t\t\tslug ? \"has-custom-icon\" : \"\",\r\n\t\t\t\tslug ? `has-custom-icon--${slug}` : \"\",\r\n\t\t\t]\r\n\t\t\t\t.filter(Boolean)\r\n\t\t\t\t.join(\" \");\r\n\r\n\t\t\treturn ;\r\n\t\t};\r\n\t}, \"withIconedListItemEditorClasses\")\r\n);\r\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"compose\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"hooks\"];","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","// 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};","import \"./core-heading-variant/editor.js\";\r\nimport \"./core-image-variant/editor.js\";\r\nimport \"./core-embed-variant/editor.js\";\r\nimport \"./core-list-variant/editor.js\";\r\nimport \"./core-buttons/editor.js\";\r\n\r\nimport \"./variants.scss\";\r\n"],"names":["wp","blocks","registerBlockStyle","name","label","isDefault","registerBlockVariation","__","InspectorControls","BlockControls","AlignmentToolbar","ToolbarGroup","ToolbarDropdownMenu","Fragment","addFilter","createHigherOrderComponent","check","arrowRight","starFilled","jsx","_jsx","jsxs","_jsxs","title","description","attributes","className","scope","isActive","blockAttributes","cls","split","includes","settings","icon","type","default","BlockEdit","props","setAttributes","ICONS","value","children","controls","map","onClick","align","onChange","extraProps","blockType","BlockListBlock","slug","filter","Boolean","join"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file