diff --git a/plugins/carhop-blocks/blocks/cta/build/blocks-manifest.php b/plugins/carhop-blocks/blocks/cta/build/blocks-manifest.php index 30e1027..ccf5b44 100644 --- a/plugins/carhop-blocks/blocks/cta/build/blocks-manifest.php +++ b/plugins/carhop-blocks/blocks/cta/build/blocks-manifest.php @@ -32,6 +32,10 @@ return array( 'align' => array( 'type' => 'string', 'default' => 'left' + ), + 'color' => array( + 'type' => 'string', + 'default' => '#136F63' ) ) ) diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/block.json b/plugins/carhop-blocks/blocks/cta/build/cta/block.json index e90e9cf..08d9440 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/block.json +++ b/plugins/carhop-blocks/blocks/cta/build/cta/block.json @@ -27,6 +27,10 @@ "align": { "type": "string", "default": "left" + }, + "color": { + "type": "string", + "default": "#136F63" } } } \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index-rtl.css b/plugins/carhop-blocks/blocks/cta/build/cta/index-rtl.css index 95ade27..da4f3a1 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index-rtl.css +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index-rtl.css @@ -1,11 +1,32 @@ -/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.99.7/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.99.7/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.87.0_webpack@5.99.7/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/editor.scss ***! - \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/** - * The following styles get applied inside the editor only. - * - * Replace them with your own styles or remove the file completely. - */ -.wp-block-create-block-cta { - border: 1px dotted #f00; +/*!********************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/editor.scss ***! + \********************************************************************************************************************************************************************************************************************************************/ +.wp-block-carhop-blocks-cta { + color: var(--cta-current-color); + padding: 2px; + display: block; + width: -moz-fit-content; + width: fit-content; + display: flex; + align-items: center; + gap: 10px; + line-height: normal; +} +.wp-block-carhop-blocks-cta .icon svg { + width: 30px; + height: 30px; +} +.wp-block-carhop-blocks-cta .icon svg path, +.wp-block-carhop-blocks-cta .icon svg circle { + stroke: var(--cta-current-color); +} +.wp-block-carhop-blocks-cta.align--left { + margin-right: 0; +} +.wp-block-carhop-blocks-cta.align--right { + margin-left: 0; + margin-right: auto; +} +.wp-block-carhop-blocks-cta.align--center { + margin: 0 auto; } diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.asset.php b/plugins/carhop-blocks/blocks/cta/build/cta/index.asset.php index 5be76e1..734004a 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.asset.php +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '39dc17506c212a97723f'); + array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '66d7a6d613074de1e159'); diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.css b/plugins/carhop-blocks/blocks/cta/build/cta/index.css index 2b74b58..9577e6e 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.css +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.css @@ -1,13 +1,34 @@ -/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.99.7/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.99.7/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.87.0_webpack@5.99.7/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/editor.scss ***! - \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/** - * The following styles get applied inside the editor only. - * - * Replace them with your own styles or remove the file completely. - */ -.wp-block-create-block-cta { - border: 1px dotted #f00; +/*!********************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/editor.scss ***! + \********************************************************************************************************************************************************************************************************************************************/ +.wp-block-carhop-blocks-cta { + color: var(--cta-current-color); + padding: 2px; + display: block; + width: -moz-fit-content; + width: fit-content; + display: flex; + align-items: center; + gap: 10px; + line-height: normal; +} +.wp-block-carhop-blocks-cta .icon svg { + width: 30px; + height: 30px; +} +.wp-block-carhop-blocks-cta .icon svg path, +.wp-block-carhop-blocks-cta .icon svg circle { + stroke: var(--cta-current-color); +} +.wp-block-carhop-blocks-cta.align--left { + margin-left: 0; +} +.wp-block-carhop-blocks-cta.align--right { + margin-right: 0; + margin-left: auto; +} +.wp-block-carhop-blocks-cta.align--center { + margin: 0 auto; } /*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.css.map b/plugins/carhop-blocks/blocks/cta/build/cta/index.css.map index 938a3f5..1a711ba 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.css.map +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.css.map @@ -1 +1 @@ -{"version":3,"file":"cta/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://cta/./src/cta/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-cta {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"cta/index.css","mappings":";;;AAAA;EACC;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AAAD;AAGE;EACC;EACA;AADH;AAGE;;EAEC;AADH;AAKC;EACC;AAHF;AAKC;EACC;EACA;AAHF;AAKC;EACC;AAHF,C","sources":["webpack://cta/./src/cta/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tcolor: var(--cta-current-color);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.js b/plugins/carhop-blocks/blocks/cta/build/cta/index.js index a13cf6f..dd6334e 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.js +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.js @@ -8,7 +8,7 @@ \****************************/ /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/cta","version":"0.1.0","title":"Cta","category":"carhop-blocks","icon":"smiley","description":"Un bouton de lien","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"text":{"type":"string","default":"Call to action"},"link":{"type":"object"},"align":{"type":"string","default":"left"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/cta","version":"0.1.0","title":"Cta","category":"carhop-blocks","icon":"smiley","description":"Un bouton de lien","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"text":{"type":"string","default":"Call to action"},"link":{"type":"object"},"align":{"type":"string","default":"left"},"color":{"type":"string","default":"#136F63"}}}'); /***/ }), @@ -29,8 +29,11 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/cta/editor.scss"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../img/carhop-fleche-lien-externe-full.svg */ "./src/img/carhop-fleche-lien-externe-full.svg"); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); + + @@ -42,20 +45,29 @@ function Edit({ attributes, setAttributes }) { - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, { - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, { - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.AlignmentToolbar, { + const { + color + } = attributes; + const colors = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useSetting)("color.palette.theme"); + function handleColorChange(value) { + setAttributes({ + color: value + }); + } + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { + children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.AlignmentToolbar, { value: attributes.align, onChange: value => setAttributes({ align: value }) }) - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, { - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { title: "Lien", initialOpen: true, - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.__experimentalLinkControl, { + children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.__experimentalLinkControl, { value: attributes.link, onChange: value => { setAttributes({ @@ -63,19 +75,45 @@ function Edit({ }); } }) - }) + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { + title: "Couleur", + initialOpen: true, + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorPalette, { + value: color, + onChange: value => { + console.log(value); + handleColorChange(value); + }, + colors: colors, + disableCustomColors: true + }) + }) + })] }) - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, { + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", { ...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({ - className: `cta align--${attributes.align}` + className: `cta align--${attributes.align}`, + style: { + "--cta-current-color": color + } }), - tagName: "a", - placeholder: "Ajouter un lien", - value: attributes.text, - onChange: text => setAttributes({ - text - }), - allowedFormats: [] + children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, { + tagName: "a", + placeholder: "Ajouter un lien", + value: attributes.text, + onChange: text => setAttributes({ + text + }), + allowedFormats: [] + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { + className: "icon", + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_4__.ReactComponent, { + style: { + "--cta-current-color": color + } + }) + })] })] }); } @@ -160,8 +198,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ }); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../img/carhop-fleche-lien-externe-full.svg */ "./src/img/carhop-fleche-lien-externe-full.svg"); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); + function save({ @@ -170,14 +210,26 @@ function save({ const { align, link, - text + text, + color } = attributes; - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a", { + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("a", { href: link?.url, ..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({ - className: `align--${align}` + className: `align--${align}`, + style: { + color: color, + "--cta-current-color": color + } }), - children: text + children: [text, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { + className: "icon", + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_img_carhop_fleche_lien_externe_full_svg__WEBPACK_IMPORTED_MODULE_1__.ReactComponent, { + style: { + "--cta-current-color": color + } + }) + })] }); } @@ -193,6 +245,42 @@ __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin +/***/ }), + +/***/ "./src/img/carhop-fleche-lien-externe-full.svg": +/*!*****************************************************!*\ + !*** ./src/img/carhop-fleche-lien-externe-full.svg ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ReactComponent: () => (/* binding */ SvgCarhopFlecheLienExterneFull), +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +var _defs, _path, _circle; +function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } + +var SvgCarhopFlecheLienExterneFull = function SvgCarhopFlecheLienExterneFull(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({ + xmlns: "http://www.w3.org/2000/svg", + id: "carhop-fleche-lien-externe-full_svg__fleche-lien-externe-full", + viewBox: "0 0 32 32" + }, props), _defs || (_defs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("style", null, ".carhop-fleche-lien-externe-full_svg__cls-1{fill:none;stroke:#000;stroke-width:2px}"))), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", { + d: "m21.15 10.59-9.38 10.02M21.15 21.4V10.59H10.83", + className: "carhop-fleche-lien-externe-full_svg__cls-1" + })), _circle || (_circle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("circle", { + cx: 16, + cy: 16, + r: 15, + className: "carhop-fleche-lien-externe-full_svg__cls-1" + }))); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg=="); + /***/ }), /***/ "@wordpress/block-editor": @@ -235,6 +323,16 @@ module.exports = window["wp"]["i18n"]; /***/ }), +/***/ "react": +/*!************************!*\ + !*** external "React" ***! + \************************/ +/***/ ((module) => { + +module.exports = window["React"]; + +/***/ }), + /***/ "react/jsx-runtime": /*!**********************************!*\ !*** external "ReactJSXRuntime" ***! diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/index.js.map b/plugins/carhop-blocks/blocks/cta/build/cta/index.js.map index 9efd14c..4fefb97 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/index.js.map +++ b/plugins/carhop-blocks/blocks/cta/build/cta/index.js.map @@ -1 +1 @@ -{"version":3,"file":"cta/index.js","mappings":"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","sources":["webpack://cta/./src/cta/edit.js","webpack://cta/./src/cta/editor.scss?8b88","webpack://cta/./src/cta/index.js","webpack://cta/./src/cta/save.js","webpack://cta/./src/cta/style.scss?bb7c","webpack://cta/external window [\"wp\",\"blockEditor\"]","webpack://cta/external window [\"wp\",\"blocks\"]","webpack://cta/external window [\"wp\",\"components\"]","webpack://cta/external window [\"wp\",\"i18n\"]","webpack://cta/external window \"ReactJSXRuntime\"","webpack://cta/webpack/bootstrap","webpack://cta/webpack/runtime/chunk loaded","webpack://cta/webpack/runtime/compat get default export","webpack://cta/webpack/runtime/define property getters","webpack://cta/webpack/runtime/hasOwnProperty shorthand","webpack://cta/webpack/runtime/make namespace object","webpack://cta/webpack/runtime/jsonp chunk loading","webpack://cta/webpack/before-startup","webpack://cta/webpack/startup","webpack://cta/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n} from \"@wordpress/block-editor\";\nimport { PanelBody } from \"@wordpress/components\";\nimport \"./editor.scss\";\nimport { BlockControls, AlignmentToolbar } from \"@wordpress/block-editor\";\n\nimport { Tip } from \"@wordpress/components\";\nexport default function Edit({ attributes, setAttributes }) {\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t setAttributes({ align: value })}\n\t\t\t\t/>\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetAttributes({ link: value });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t setAttributes({ text })}\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","/**\n * Registers a new block provided a unique name and an object defining its behavior.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nimport { registerBlockType } from '@wordpress/blocks';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * All files containing `style` keyword are bundled together. The code used\n * gets applied both to the front of your site and to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './style.scss';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport save from './save';\nimport metadata from './block.json';\n\n/**\n * Every block starts by registering a new block type definition.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nregisterBlockType( metadata.name, {\n\t/**\n\t * @see ./edit.js\n\t */\n\tedit: Edit,\n\n\t/**\n\t * @see ./save.js\n\t */\n\tsave,\n} );\n","import { useBlockProps } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { align, link, text } = attributes;\n\treturn (\n\t\t\n\t\t\t{text}\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"cta/index\": 0,\n\t\"cta/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkcta\"] = globalThis[\"webpackChunkcta\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"cta/style-index\"], () => (__webpack_require__(\"./src/cta/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","InspectorControls","__experimentalLinkControl","LinkControl","PanelBody","BlockControls","AlignmentToolbar","Tip","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Edit","attributes","setAttributes","children","value","align","onChange","title","initialOpen","link","className","tagName","placeholder","text","allowedFormats","registerBlockType","save","metadata","name","edit","href","url"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"cta/index.js","mappings":"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","sources":["webpack://cta/./src/cta/edit.js","webpack://cta/./src/cta/editor.scss","webpack://cta/./src/cta/index.js","webpack://cta/./src/cta/save.js","webpack://cta/./src/cta/style.scss?8ec7","webpack://cta/./src/img/carhop-fleche-lien-externe-full.svg","webpack://cta/external window [\"wp\",\"blockEditor\"]","webpack://cta/external window [\"wp\",\"blocks\"]","webpack://cta/external window [\"wp\",\"components\"]","webpack://cta/external window [\"wp\",\"i18n\"]","webpack://cta/external window \"React\"","webpack://cta/external window \"ReactJSXRuntime\"","webpack://cta/webpack/bootstrap","webpack://cta/webpack/runtime/chunk loaded","webpack://cta/webpack/runtime/compat get default export","webpack://cta/webpack/runtime/define property getters","webpack://cta/webpack/runtime/hasOwnProperty shorthand","webpack://cta/webpack/runtime/make namespace object","webpack://cta/webpack/runtime/jsonp chunk loading","webpack://cta/webpack/before-startup","webpack://cta/webpack/startup","webpack://cta/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n\tuseSetting,\n} from \"@wordpress/block-editor\";\nimport { PanelBody } from \"@wordpress/components\";\nimport \"./editor.scss\";\nimport { BlockControls, AlignmentToolbar } from \"@wordpress/block-editor\";\nimport { ColorPalette, PanelRow } from \"@wordpress/components\";\nimport { Tip } from \"@wordpress/components\";\nimport { ReactComponent as ArrowIcon } from \"../img/carhop-fleche-lien-externe-full.svg\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { color } = attributes;\n\tconst colors = useSetting(\"color.palette.theme\");\n\n\tfunction handleColorChange(value) {\n\t\tsetAttributes({ color: value });\n\t}\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t setAttributes({ align: value })}\n\t\t\t\t/>\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetAttributes({ link: value });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
\n\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t\t\t\thandleColorChange(value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tcolors={colors}\n\t\t\t\t\t\t\t\tdisableCustomColors={true}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t\t\t setAttributes({ text })}\n\t\t\t\t\tallowedFormats={[]}\n\t\t\t\t/>\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","/**\n * Registers a new block provided a unique name and an object defining its behavior.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nimport { registerBlockType } from '@wordpress/blocks';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * All files containing `style` keyword are bundled together. The code used\n * gets applied both to the front of your site and to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './style.scss';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport save from './save';\nimport metadata from './block.json';\n\n/**\n * Every block starts by registering a new block type definition.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nregisterBlockType( metadata.name, {\n\t/**\n\t * @see ./edit.js\n\t */\n\tedit: Edit,\n\n\t/**\n\t * @see ./save.js\n\t */\n\tsave,\n} );\n","import { useBlockProps } from \"@wordpress/block-editor\";\nimport { ReactComponent as ArrowIcon } from \"../img/carhop-fleche-lien-externe-full.svg\";\n\nexport default function save({ attributes }) {\n\tconst { align, link, text, color } = attributes;\n\treturn (\n\t\t\n\t\t\t{text}\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","var _defs, _path, _circle;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgCarhopFlecheLienExterneFull = function SvgCarhopFlecheLienExterneFull(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n id: \"carhop-fleche-lien-externe-full_svg__fleche-lien-externe-full\",\n viewBox: \"0 0 32 32\"\n }, props), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".carhop-fleche-lien-externe-full_svg__cls-1{fill:none;stroke:#000;stroke-width:2px}\"))), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m21.15 10.59-9.38 10.02M21.15 21.4V10.59H10.83\",\n className: \"carhop-fleche-lien-externe-full_svg__cls-1\"\n })), _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 16,\n cy: 16,\n r: 15,\n className: \"carhop-fleche-lien-externe-full_svg__cls-1\"\n })));\n};\nexport { SvgCarhopFlecheLienExterneFull as ReactComponent };\nexport default \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg==\";","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"React\"];","module.exports = window[\"ReactJSXRuntime\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"cta/index\": 0,\n\t\"cta/style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkcta\"] = globalThis[\"webpackChunkcta\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"cta/style-index\"], () => (__webpack_require__(\"./src/cta/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","InspectorControls","__experimentalLinkControl","LinkControl","useSetting","PanelBody","BlockControls","AlignmentToolbar","ColorPalette","PanelRow","Tip","ReactComponent","ArrowIcon","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","color","colors","handleColorChange","value","children","align","onChange","title","initialOpen","link","console","log","disableCustomColors","className","style","tagName","placeholder","text","allowedFormats","registerBlockType","save","metadata","name","edit","href","url"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/style-index-rtl.css b/plugins/carhop-blocks/blocks/cta/build/cta/style-index-rtl.css index 2d2ed1c..0aa81a8 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/style-index-rtl.css +++ b/plugins/carhop-blocks/blocks/cta/build/cta/style-index-rtl.css @@ -1,8 +1,9 @@ -/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.99.7/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.99.7/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.87.0_webpack@5.99.7/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/style.scss ***! - \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*!*******************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/style.scss ***! + \*******************************************************************************************************************************************************************************************************************************************/ .wp-block-carhop-blocks-cta { - color: #fff; + margin-top: 20px; + color: var(--cta-current-color); padding: 2px; display: block; width: -moz-fit-content; @@ -12,17 +13,16 @@ gap: 10px; line-height: normal; } -.wp-block-carhop-blocks-cta:after { - margin-top: -2px; - content: ""; - filter: invert(1); +.wp-block-carhop-blocks-cta a { + text-decoration: none; +} +.wp-block-carhop-blocks-cta .icon svg { width: 30px; height: 30px; - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg==); - background-size: cover; - background-position: center; - background-repeat: no-repeat; - display: block; +} +.wp-block-carhop-blocks-cta .icon svg path, +.wp-block-carhop-blocks-cta .icon svg circle { + stroke: var(--cta-current-color); } .wp-block-carhop-blocks-cta.align--left { margin-right: 0; diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css b/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css index 8df435f..519067a 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css +++ b/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css @@ -1,8 +1,9 @@ -/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.99.7/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.3_webpack@5.99.7/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.5_sass@1.87.0_webpack@5.99.7/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/style.scss ***! - \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*!*******************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/style.scss ***! + \*******************************************************************************************************************************************************************************************************************************************/ .wp-block-carhop-blocks-cta { - color: #fff; + margin-top: 20px; + color: var(--cta-current-color); padding: 2px; display: block; width: -moz-fit-content; @@ -12,17 +13,16 @@ gap: 10px; line-height: normal; } -.wp-block-carhop-blocks-cta:after { - margin-top: -2px; - content: ""; - filter: invert(1); +.wp-block-carhop-blocks-cta a { + text-decoration: none; +} +.wp-block-carhop-blocks-cta .icon svg { width: 30px; height: 30px; - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iZmxlY2hlLWxpZW4tZXh0ZXJuZS1mdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnPgogICAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjEuMTUsMTAuNTlsLTkuMzgsMTAuMDIiLz4KICAgIDxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIxLjE1LDIxLjR2LTEwLjgxaC0xMC4zMiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+Cjwvc3ZnPg==); - background-size: cover; - background-position: center; - background-repeat: no-repeat; - display: block; +} +.wp-block-carhop-blocks-cta .icon svg path, +.wp-block-carhop-blocks-cta .icon svg circle { + stroke: var(--cta-current-color); } .wp-block-carhop-blocks-cta.align--left { margin-left: 0; diff --git a/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css.map b/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css.map index 93df68d..0dd88fd 100644 --- a/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css.map +++ b/plugins/carhop-blocks/blocks/cta/build/cta/style-index.css.map @@ -1 +1 @@ -{"version":3,"file":"cta/style-index.css","mappings":";;;AAAA;EACC;EACA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AACD;AACC;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AACC;EACC;AACF;AACC;EACC;EACA;AACF;AACC;EACC;AACF,C","sources":["webpack://cta/./src/cta/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tcolor: #fff;\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t&:after {\n\t\tmargin-top: -2px;\n\t\tcontent: \"\";\n\t\tfilter: invert(1);\n\t\twidth: 30px;\n\t\theight: 30px;\n\t\tbackground-image: url(../img/carhop-fleche-lien-externe-full.svg);\n\t\tbackground-size: cover;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tdisplay: block;\n\t}\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"cta/style-index.css","mappings":";;;AAAA;EACC;EACA;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;AAAD;AAEC;EACC;AAAF;AAGE;EACC;EACA;AADH;AAGE;;EAEC;AADH;AAKC;EACC;AAHF;AAKC;EACC;EACA;AAHF;AAKC;EACC;AAHF,C","sources":["webpack://cta/./src/cta/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tmargin-top: 20px;\n\tcolor: var(--cta-current-color);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\ta {\n\t\ttext-decoration: none;\n\t}\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/package-lock.json b/plugins/carhop-blocks/blocks/cta/package-lock.json index 8d62a36..9023bef 100644 --- a/plugins/carhop-blocks/blocks/cta/package-lock.json +++ b/plugins/carhop-blocks/blocks/cta/package-lock.json @@ -8,6 +8,9 @@ "name": "cta", "version": "0.1.0", "license": "GPL-2.0-or-later", + "dependencies": { + "url-loader": "^4.1.1" + }, "devDependencies": { "@wordpress/scripts": "^30.15.0" } @@ -2703,7 +2706,6 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -2718,7 +2720,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2728,7 +2729,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2738,7 +2738,6 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -2749,14 +2748,12 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -3851,7 +3848,6 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", - "dev": true, "license": "MIT", "dependencies": { "@types/estree": "*", @@ -3862,7 +3858,6 @@ "version": "3.7.7", "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, "license": "MIT", "dependencies": { "@types/eslint": "*", @@ -3873,7 +3868,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", - "dev": true, "license": "MIT" }, "node_modules/@types/express": { @@ -3996,7 +3990,6 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, "license": "MIT" }, "node_modules/@types/json5": { @@ -4031,7 +4024,6 @@ "version": "22.15.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", - "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.21.0" @@ -4516,7 +4508,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", - "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/helper-numbers": "1.13.2", @@ -4527,28 +4518,24 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", - "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", - "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", - "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", - "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.13.2", @@ -4560,14 +4547,12 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", - "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", - "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.14.1", @@ -4580,7 +4565,6 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", - "dev": true, "license": "MIT", "dependencies": { "@xtuc/ieee754": "^1.2.0" @@ -4590,7 +4574,6 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", - "dev": true, "license": "Apache-2.0", "dependencies": { "@xtuc/long": "4.2.2" @@ -4600,14 +4583,12 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", - "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", - "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.14.1", @@ -4624,7 +4605,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", - "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.14.1", @@ -4638,7 +4618,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", - "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.14.1", @@ -4651,7 +4630,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", - "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.14.1", @@ -4666,7 +4644,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", - "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.14.1", @@ -5279,14 +5256,12 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, "license": "BSD-3-Clause" }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, "license": "Apache-2.0" }, "node_modules/abab": { @@ -5325,7 +5300,6 @@ "version": "8.14.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -5395,7 +5369,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -5422,7 +5395,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, "license": "MIT", "dependencies": { "ajv": "^8.0.0" @@ -5440,7 +5412,6 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -5457,14 +5428,12 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, "license": "MIT" }, "node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, "license": "MIT", "peerDependencies": { "ajv": "^6.9.1" @@ -6222,7 +6191,6 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, "license": "MIT", "engines": { "node": "*" @@ -6341,7 +6309,6 @@ "version": "4.24.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", - "dev": true, "funding": [ { "type": "opencollective", @@ -6419,7 +6386,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, "license": "MIT" }, "node_modules/builtin-modules": { @@ -6595,7 +6561,6 @@ "version": "1.0.30001716", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001716.tgz", "integrity": "sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==", - "dev": true, "funding": [ { "type": "opencollective", @@ -6746,7 +6711,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0" @@ -8196,7 +8160,6 @@ "version": "1.5.145", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.145.tgz", "integrity": "sha512-pZ5EcTWRq/055MvSBgoFEyKf2i4apwfoqJbK/ak2jnFq8oHjZ+vzc3AhRcz37Xn+ZJfL58R666FLJx0YOK9yTw==", - "dev": true, "license": "ISC" }, "node_modules/emittery": { @@ -8223,7 +8186,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -8253,7 +8215,6 @@ "version": "5.18.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", - "dev": true, "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", @@ -8451,7 +8412,6 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", - "dev": true, "license": "MIT" }, "node_modules/es-object-atoms": { @@ -8518,7 +8478,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -9178,7 +9137,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -9192,7 +9150,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -9422,7 +9379,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" @@ -9435,7 +9391,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -9472,7 +9427,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.8.x" @@ -9653,7 +9607,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, "license": "MIT" }, "node_modules/fast-diff": { @@ -9704,7 +9657,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, "license": "MIT" }, "node_modules/fast-levenshtein": { @@ -9718,7 +9670,6 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", - "dev": true, "funding": [ { "type": "github", @@ -10373,7 +10324,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, "license": "BSD-2-Clause" }, "node_modules/glob/node_modules/brace-expansion": { @@ -10515,7 +10465,6 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, "license": "ISC" }, "node_modules/graphemer": { @@ -10575,7 +10524,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -12740,14 +12688,12 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { @@ -12768,7 +12714,6 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, "license": "MIT", "bin": { "json5": "lib/cli.js" @@ -13184,7 +13129,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.11.5" @@ -13194,7 +13138,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, "license": "MIT", "dependencies": { "big.js": "^5.2.2", @@ -13694,7 +13637,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, "license": "MIT" }, "node_modules/merge2": { @@ -13755,7 +13697,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -13765,7 +13706,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "license": "MIT", "dependencies": { "mime-db": "1.52.0" @@ -13985,7 +13925,6 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, "license": "MIT" }, "node_modules/netmask": { @@ -14038,7 +13977,6 @@ "version": "2.0.19", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true, "license": "MIT" }, "node_modules/normalize-package-data": { @@ -14825,7 +14763,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -16005,7 +15942,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -16111,7 +16047,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" @@ -16487,7 +16422,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -16736,7 +16670,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -16885,7 +16818,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", - "dev": true, "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", @@ -16905,7 +16837,6 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -16922,7 +16853,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3" @@ -16935,7 +16865,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, "license": "MIT" }, "node_modules/select-hose": { @@ -17050,7 +16979,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" @@ -18587,7 +18515,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -18624,7 +18551,6 @@ "version": "5.39.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -18643,7 +18569,6 @@ "version": "5.3.14", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz", "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", @@ -18678,7 +18603,6 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", @@ -18693,7 +18617,6 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -18709,14 +18632,12 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, "license": "MIT" }, "node_modules/terser/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -18726,7 +18647,6 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", @@ -19219,7 +19139,6 @@ "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -19303,7 +19222,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", - "dev": true, "funding": [ { "type": "opencollective", @@ -19354,7 +19272,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" @@ -19364,7 +19281,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", - "dev": true, "license": "MIT", "dependencies": { "loader-utils": "^2.0.0", @@ -19392,7 +19308,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", @@ -19549,7 +19464,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, "license": "MIT", "dependencies": { "glob-to-regexp": "^0.4.1", @@ -19590,7 +19504,6 @@ "version": "5.99.7", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.7.tgz", "integrity": "sha512-CNqKBRMQjwcmKR0idID5va1qlhrqVUKpovi+Ec79ksW8ux7iS1+A6VqzfZXgVYCFRKl7XL5ap3ZoMpwBJxcg0w==", - "dev": true, "license": "MIT", "dependencies": { "@types/eslint-scope": "^3.7.7", @@ -19971,7 +19884,6 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, "license": "MIT", "engines": { "node": ">=10.13.0" diff --git a/plugins/carhop-blocks/blocks/cta/package.json b/plugins/carhop-blocks/blocks/cta/package.json index 754dc8f..570404f 100644 --- a/plugins/carhop-blocks/blocks/cta/package.json +++ b/plugins/carhop-blocks/blocks/cta/package.json @@ -17,5 +17,8 @@ "devDependencies": { "@wordpress/scripts": "^30.15.0" }, - "packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39" + "packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39", + "dependencies": { + "url-loader": "^4.1.1" + } } diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/block.json b/plugins/carhop-blocks/blocks/cta/src/cta/block.json index 571d1d8..8ad8eed 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/block.json +++ b/plugins/carhop-blocks/blocks/cta/src/cta/block.json @@ -27,6 +27,10 @@ "align": { "type": "string", "default": "left" + }, + "color": { + "type": "string", + "default": "#136F63" } } } \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/edit.js b/plugins/carhop-blocks/blocks/cta/src/cta/edit.js index 4fcef0f..41445a4 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/edit.js +++ b/plugins/carhop-blocks/blocks/cta/src/cta/edit.js @@ -4,13 +4,22 @@ import { RichText, InspectorControls, __experimentalLinkControl as LinkControl, + useSetting, } from "@wordpress/block-editor"; import { PanelBody } from "@wordpress/components"; import "./editor.scss"; import { BlockControls, AlignmentToolbar } from "@wordpress/block-editor"; - +import { ColorPalette, PanelRow } from "@wordpress/components"; import { Tip } from "@wordpress/components"; +import { ReactComponent as ArrowIcon } from "../img/carhop-fleche-lien-externe-full.svg"; + export default function Edit({ attributes, setAttributes }) { + const { color } = attributes; + const colors = useSetting("color.palette.theme"); + + function handleColorChange(value) { + setAttributes({ color: value }); + } return ( <> @@ -29,18 +38,41 @@ export default function Edit({ attributes, setAttributes }) { }} /> + + + + { + console.log(value); + handleColorChange(value); + }} + colors={colors} + disableCustomColors={true} + /> + + - setAttributes({ text })} - allowedFormats={[]} - /> + > + setAttributes({ text })} + allowedFormats={[]} + /> +
+ +
+ ); } diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/editor.scss b/plugins/carhop-blocks/blocks/cta/src/cta/editor.scss index 965d2c9..9f1539e 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/editor.scss +++ b/plugins/carhop-blocks/blocks/cta/src/cta/editor.scss @@ -1,9 +1,33 @@ -/** - * The following styles get applied inside the editor only. - * - * Replace them with your own styles or remove the file completely. - */ +.wp-block-carhop-blocks-cta { + color: var(--cta-current-color); -.wp-block-create-block-cta { - border: 1px dotted #f00; + padding: 2px; + display: block; + width: fit-content; + display: flex; + align-items: center; + gap: 10px; + line-height: normal; + + .icon { + svg { + width: 30px; + height: 30px; + } + svg path, + svg circle { + stroke: var(--cta-current-color); + } + } + + &.align--left { + margin-left: 0; + } + &.align--right { + margin-right: 0; + margin-left: auto; + } + &.align--center { + margin: 0 auto; + } } diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/save.js b/plugins/carhop-blocks/blocks/cta/src/cta/save.js index f36895c..1d49214 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/save.js +++ b/plugins/carhop-blocks/blocks/cta/src/cta/save.js @@ -1,15 +1,23 @@ import { useBlockProps } from "@wordpress/block-editor"; +import { ReactComponent as ArrowIcon } from "../img/carhop-fleche-lien-externe-full.svg"; export default function save({ attributes }) { - const { align, link, text } = attributes; + const { align, link, text, color } = attributes; return ( {text} +
+ +
); } diff --git a/plugins/carhop-blocks/blocks/cta/src/cta/style.scss b/plugins/carhop-blocks/blocks/cta/src/cta/style.scss index a5ef136..7933f88 100644 --- a/plugins/carhop-blocks/blocks/cta/src/cta/style.scss +++ b/plugins/carhop-blocks/blocks/cta/src/cta/style.scss @@ -1,5 +1,7 @@ .wp-block-carhop-blocks-cta { - color: #fff; + margin-top: 20px; + color: var(--cta-current-color); + padding: 2px; display: block; width: fit-content; @@ -8,18 +10,20 @@ gap: 10px; line-height: normal; - &:after { - margin-top: -2px; - content: ""; - filter: invert(1); - width: 30px; - height: 30px; - background-image: url(../img/carhop-fleche-lien-externe-full.svg); - background-size: cover; - background-position: center; - background-repeat: no-repeat; - display: block; + a { + text-decoration: none; } + .icon { + svg { + width: 30px; + height: 30px; + } + svg path, + svg circle { + stroke: var(--cta-current-color); + } + } + &.align--left { margin-left: 0; }