REBUILDING
This commit is contained in:
parent
3520d637dc
commit
ecc664ad61
|
|
@ -1,16 +1 @@
|
|||
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/audio-player/editor.scss ***!
|
||||
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* Styles for the block editor
|
||||
*/
|
||||
.wp-block-create-block-audio-player .audio-player-preview {
|
||||
padding: 16px;
|
||||
background: #f0f0f0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.wp-block-create-block-audio-player .audio-player-preview .plyr {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
.wp-block-create-block-audio-player .audio-player-preview{background:#f0f0f0;border-radius:8px;padding:16px}.wp-block-create-block-audio-player .audio-player-preview .plyr{max-width:100%}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"audio-player/index.css","mappings":";;;AAAA;;EAAA;AAIC;EACC;EACA;EACA;AAAF;AAGE;EACC;AADH,C","sources":["webpack://carhop-blocks/./src/audio-player/editor.scss"],"sourcesContent":["/**\n * Styles for the block editor\n */\n.wp-block-create-block-audio-player {\n\t.audio-player-preview {\n\t\tpadding: 16px;\n\t\tbackground: #f0f0f0;\n\t\tborder-radius: 8px;\n\t\t\n\t\t// Ensure Plyr player has appropriate styling in the editor\n\t\t.plyr {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,589 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/audio-player/block.json":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/audio-player/block.json ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/audio-player","version":"0.1.0","title":"Lecteur audio","category":"carhop-blocks","icon":{"src":"format-audio","foreground":"#136f63"},"description":"Lecteur audio pour intégrer un fichier audio dans votre contenu","example":{},"attributes":{"audioUrl":{"type":"string","default":""},"audioId":{"type":"number","default":0},"title":{"type":"string","default":"Titre du bloc audio"},"description":{"type":"string","default":""},"caption":{"type":"string","default":""}},"supports":{"html":false},"keywords":["audio","player","lecteur audio"],"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/audio-player/edit.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/audio-player/edit.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _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 _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
||||
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data");
|
||||
/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editor.scss */ "./src/audio-player/editor.scss");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
const {
|
||||
audioUrl,
|
||||
audioId,
|
||||
title,
|
||||
caption
|
||||
} = attributes;
|
||||
const audioRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
|
||||
const plyrInstance = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
|
||||
const {
|
||||
saveEntityRecord
|
||||
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.store);
|
||||
const [isSavingCaption, setIsSavingCaption] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(false);
|
||||
const [saveMessage, setSaveMessage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)("");
|
||||
const saveCaptionToMedia = async newCaption => {
|
||||
if (!audioId) return;
|
||||
try {
|
||||
setIsSavingCaption(true);
|
||||
setSaveMessage("");
|
||||
await saveEntityRecord("postType", "attachment", {
|
||||
id: audioId,
|
||||
caption: newCaption
|
||||
});
|
||||
setSaveMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Légende mise à jour dans la médiathèque.", "carhop-blocks"));
|
||||
} catch (e) {
|
||||
setSaveMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Erreur lors de la mise à jour dans la médiathèque.", "carhop-blocks"));
|
||||
} finally {
|
||||
setIsSavingCaption(false);
|
||||
}
|
||||
};
|
||||
const handleCaptionChange = value => {
|
||||
setAttributes({
|
||||
caption: value
|
||||
});
|
||||
if (audioId) {
|
||||
void saveCaptionToMedia(value);
|
||||
}
|
||||
};
|
||||
const onSelectAudio = media => {
|
||||
setAttributes({
|
||||
audioUrl: media.url,
|
||||
audioId: media.id,
|
||||
// Récupérer les métadonnées depuis la médiathèque
|
||||
caption: media.caption || ""
|
||||
});
|
||||
};
|
||||
const onSelectURL = url => {
|
||||
setAttributes({
|
||||
audioUrl: url,
|
||||
audioId: 0
|
||||
});
|
||||
};
|
||||
const onRemoveAudio = () => {
|
||||
setAttributes({
|
||||
audioUrl: "",
|
||||
audioId: 0,
|
||||
caption: ""
|
||||
});
|
||||
};
|
||||
|
||||
// Initialize Plyr in the editor
|
||||
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
|
||||
// Wait for Plyr to be loaded (via PHP)
|
||||
if (!audioUrl || !audioRef.current || typeof window.Plyr === "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Destroy previous instance if it exists
|
||||
if (plyrInstance.current) {
|
||||
plyrInstance.current.destroy();
|
||||
}
|
||||
|
||||
// Create new Plyr instance
|
||||
plyrInstance.current = new window.Plyr(audioRef.current, {
|
||||
controls: ["play-large", "play", "progress", "current-time", "mute", "volume", "settings"],
|
||||
settings: ["speed"],
|
||||
speed: {
|
||||
selected: 1,
|
||||
options: [0.5, 0.75, 1, 1.25, 1.5, 2]
|
||||
}
|
||||
});
|
||||
|
||||
// Cleanup on unmount
|
||||
return () => {
|
||||
if (plyrInstance.current) {
|
||||
plyrInstance.current.destroy();
|
||||
plyrInstance.current = null;
|
||||
}
|
||||
};
|
||||
}, [audioUrl]);
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: "audio-player"
|
||||
}),
|
||||
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, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Informations", "carhop-blocks"),
|
||||
initialOpen: true,
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
|
||||
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Titre", "carhop-blocks"),
|
||||
value: title,
|
||||
onChange: value => setAttributes({
|
||||
title: value
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
|
||||
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Légende", "carhop-blocks"),
|
||||
value: caption,
|
||||
onChange: handleCaptionChange
|
||||
}), audioId ? isSavingCaption ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
|
||||
status: "info",
|
||||
isDismissible: false,
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Sauvegarde…", "carhop-blocks")
|
||||
}) : saveMessage ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
|
||||
status: "success",
|
||||
isDismissible: false,
|
||||
children: saveMessage
|
||||
}) : null : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
|
||||
status: "info",
|
||||
isDismissible: false,
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Média externe : la légende n'est pas synchronisée dans la médiathèque.", "carhop-blocks")
|
||||
})]
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
|
||||
className: "audio-player__title",
|
||||
value: title,
|
||||
onChange: value => setAttributes({
|
||||
title: value
|
||||
}),
|
||||
tagName: "h4"
|
||||
}), !audioUrl ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaPlaceholder, {
|
||||
icon: "format-audio",
|
||||
onSelect: onSelectAudio,
|
||||
onSelectURL: onSelectURL,
|
||||
accept: "audio/*",
|
||||
allowedTypes: ["audio"],
|
||||
labels: {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Fichier audio", "carhop-blocks"),
|
||||
instructions: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Téléchargez un fichier audio, sélectionnez-en un depuis la médiathèque ou insérez-en un depuis une URL.", "carhop-blocks")
|
||||
}
|
||||
}) : /*#__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__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaReplaceFlow, {
|
||||
mediaId: audioId,
|
||||
mediaURL: audioUrl,
|
||||
allowedTypes: ["audio"],
|
||||
accept: "audio/*",
|
||||
onSelectURL: onSelectURL,
|
||||
onSelect: onSelectAudio
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarButton, {
|
||||
onClick: onRemoveAudio,
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Retirer", "carhop-blocks")
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
|
||||
className: "audio-player-preview",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("audio", {
|
||||
ref: audioRef,
|
||||
className: "js-plyr",
|
||||
src: audioUrl,
|
||||
preload: "metadata",
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Votre navigateur ne supporte pas l'élément audio.", "carhop-blocks")
|
||||
})
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("p", {
|
||||
className: "audio-player__details",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("span", {
|
||||
className: "audio-player__details__label",
|
||||
children: "Audio"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
|
||||
className: "audio-player__details__caption",
|
||||
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Renseignez ici la légende de l'audio", "carhop-blocks"),
|
||||
value: caption,
|
||||
onChange: value => handleCaptionChange(value),
|
||||
tagName: "span"
|
||||
})]
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/audio-player/editor.scss":
|
||||
/*!**************************************!*\
|
||||
!*** ./src/audio-player/editor.scss ***!
|
||||
\**************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/audio-player/index.js":
|
||||
/*!***********************************!*\
|
||||
!*** ./src/audio-player/index.js ***!
|
||||
\***********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/audio-player/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/audio-player/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/audio-player/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/audio-player/block.json");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
/**
|
||||
* @see ./edit.js
|
||||
*/
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
/**
|
||||
* @see ./save.js
|
||||
*/
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/audio-player/save.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/audio-player/save.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
|
||||
function save({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
audioUrl,
|
||||
title,
|
||||
caption
|
||||
} = attributes;
|
||||
if (!audioUrl) {
|
||||
return null;
|
||||
}
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||
className: "audio-player"
|
||||
}),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.RichText.Content, {
|
||||
value: title,
|
||||
className: "audio-player__title",
|
||||
tagName: "h4"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("audio", {
|
||||
className: "js-plyr",
|
||||
src: audioUrl,
|
||||
preload: "metadata",
|
||||
children: "Votre navigateur ne supporte pas l'\xE9l\xE9ment audio."
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p", {
|
||||
className: "audio-player__details",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||||
className: "audio-player__details__label",
|
||||
children: "Audio"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||||
className: "audio-player__details__caption",
|
||||
children: caption !== null && caption !== void 0 ? caption : ""
|
||||
})]
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/audio-player/style.scss":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/audio-player/style.scss ***!
|
||||
\*************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/components":
|
||||
/*!************************************!*\
|
||||
!*** external ["wp","components"] ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/core-data":
|
||||
/*!**********************************!*\
|
||||
!*** external ["wp","coreData"] ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["coreData"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/data":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","data"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["data"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/element":
|
||||
/*!*********************************!*\
|
||||
!*** external ["wp","element"] ***!
|
||||
\*********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["element"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "audio-player/index": 0,
|
||||
/******/ "audio-player/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["audio-player/style-index"], () => (__webpack_require__("./src/audio-player/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var e,a={9650:()=>{const e=window.wp.blocks,a=window.wp.i18n,s=window.wp.blockEditor,i=window.wp.components,o=window.wp.element,l=window.wp.data,r=window.wp.coreData,t=window.ReactJSXRuntime,n=JSON.parse('{"UU":"carhop-blocks/audio-player"}');(0,e.registerBlockType)(n.UU,{edit:function({attributes:e,setAttributes:n}){const{audioUrl:c,audioId:d,title:u,caption:p}=e,h=(0,o.useRef)(null),_=(0,o.useRef)(null),{saveEntityRecord:m}=(0,l.useDispatch)(r.store),[b,w]=(0,o.useState)(!1),[x,y]=(0,o.useState)(""),v=e=>{n({caption:e}),d&&(async e=>{if(d)try{w(!0),y(""),await m("postType","attachment",{id:d,caption:e}),y((0,a.__)("Légende mise à jour dans la médiathèque.","carhop-blocks"))}catch(e){y((0,a.__)("Erreur lors de la mise à jour dans la médiathèque.","carhop-blocks"))}finally{w(!1)}})(e)},j=e=>{n({audioUrl:e.url,audioId:e.id,caption:e.caption||""})},g=e=>{n({audioUrl:e,audioId:0})};return(0,o.useEffect)(()=>{if(c&&h.current&&void 0!==window.Plyr)return _.current&&_.current.destroy(),_.current=new window.Plyr(h.current,{controls:["play-large","play","progress","current-time","mute","volume","settings"],settings:["speed"],speed:{selected:1,options:[.5,.75,1,1.25,1.5,2]}}),()=>{_.current&&(_.current.destroy(),_.current=null)}},[c]),(0,t.jsxs)("div",{...(0,s.useBlockProps)({className:"audio-player"}),children:[(0,t.jsx)(s.InspectorControls,{children:(0,t.jsxs)(i.PanelBody,{title:(0,a.__)("Informations","carhop-blocks"),initialOpen:!0,children:[(0,t.jsx)(i.TextControl,{label:(0,a.__)("Titre","carhop-blocks"),value:u,onChange:e=>n({title:e})}),(0,t.jsx)(i.TextControl,{label:(0,a.__)("Légende","carhop-blocks"),value:p,onChange:v}),d?b?(0,t.jsx)(i.Notice,{status:"info",isDismissible:!1,children:(0,a.__)("Sauvegarde…","carhop-blocks")}):x?(0,t.jsx)(i.Notice,{status:"success",isDismissible:!1,children:x}):null:(0,t.jsx)(i.Notice,{status:"info",isDismissible:!1,children:(0,a.__)("Média externe : la légende n'est pas synchronisée dans la médiathèque.","carhop-blocks")})]})}),(0,t.jsx)(s.RichText,{className:"audio-player__title",value:u,onChange:e=>n({title:e}),tagName:"h4"}),c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.BlockControls,{children:[(0,t.jsx)(s.MediaReplaceFlow,{mediaId:d,mediaURL:c,allowedTypes:["audio"],accept:"audio/*",onSelectURL:g,onSelect:j}),(0,t.jsx)(i.ToolbarButton,{onClick:()=>{n({audioUrl:"",audioId:0,caption:""})},children:(0,a.__)("Retirer","carhop-blocks")})]}),(0,t.jsx)("div",{className:"audio-player-preview",children:(0,t.jsx)("audio",{ref:h,className:"js-plyr",src:c,preload:"metadata",children:(0,a.__)("Votre navigateur ne supporte pas l'élément audio.","carhop-blocks")})})]}):(0,t.jsx)(s.MediaPlaceholder,{icon:"format-audio",onSelect:j,onSelectURL:g,accept:"audio/*",allowedTypes:["audio"],labels:{title:(0,a.__)("Fichier audio","carhop-blocks"),instructions:(0,a.__)("Téléchargez un fichier audio, sélectionnez-en un depuis la médiathèque ou insérez-en un depuis une URL.","carhop-blocks")}}),(0,t.jsxs)("p",{className:"audio-player__details",children:[(0,t.jsx)("span",{className:"audio-player__details__label",children:"Audio"}),(0,t.jsx)(s.RichText,{className:"audio-player__details__caption",placeholder:(0,a.__)("Renseignez ici la légende de l'audio","carhop-blocks"),value:p,onChange:e=>v(e),tagName:"span"})]})]})},save:function({attributes:e}){const{audioUrl:a,title:i,caption:o}=e;return a?(0,t.jsxs)("div",{...s.useBlockProps.save({className:"audio-player"}),children:[(0,t.jsx)(s.RichText.Content,{value:i,className:"audio-player__title",tagName:"h4"}),(0,t.jsx)("audio",{className:"js-plyr",src:a,preload:"metadata",children:"Votre navigateur ne supporte pas l'élément audio."}),(0,t.jsxs)("p",{className:"audio-player__details",children:[(0,t.jsx)("span",{className:"audio-player__details__label",children:"Audio"}),(0,t.jsx)("span",{className:"audio-player__details__caption",children:null!=o?o:""})]})]}):null}})}},s={};function i(e){var o=s[e];if(void 0!==o)return o.exports;var l=s[e]={exports:{}};return a[e](l,l.exports,i),l.exports}i.m=a,e=[],i.O=(a,s,o,l)=>{if(!s){var r=1/0;for(d=0;d<e.length;d++){for(var[s,o,l]=e[d],t=!0,n=0;n<s.length;n++)(!1&l||r>=l)&&Object.keys(i.O).every(e=>i.O[e](s[n]))?s.splice(n--,1):(t=!1,l<r&&(r=l));if(t){e.splice(d--,1);var c=o();void 0!==c&&(a=c)}}return a}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[s,o,l]},i.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={7962:0,7710:0};i.O.j=a=>0===e[a];var a=(a,s)=>{var o,l,[r,t,n]=s,c=0;if(r.some(a=>0!==e[a])){for(o in t)i.o(t,o)&&(i.m[o]=t[o]);if(n)var d=n(i)}for(a&&a(s);c<r.length;c++)l=r[c],i.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return i.O(d)},s=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];s.forEach(a.bind(null,0)),s.push=a.bind(null,s.push.bind(s))})();var o=i.O(void 0,[7710],()=>i(9650));o=i.O(o)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,44 +1 @@
|
|||
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/audio-player/style.scss ***!
|
||||
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* Styles for Plyr audio player block
|
||||
* These styles are applied both in the editor and on the front-end
|
||||
*/
|
||||
.wp-block-carhop-blocks-audio-player .plyr__controls {
|
||||
padding: 2rem 0 !important;
|
||||
}
|
||||
.wp-block-carhop-blocks-audio-player {
|
||||
--plyr-color-main: var(--wp--preset--color--primary);
|
||||
--plyr-menu-border-color: var(--wp--preset--color--carhop-green);
|
||||
--plyr-menu-border-shadow-color: var(--wp--preset--color--carhop-green);
|
||||
--plyr-control-icon-size: 20px;
|
||||
--plyr-audio-control-color: var(--wp--preset--color--primary);
|
||||
--plyr-audio-range-track-background: var(
|
||||
--wp--preset--color--carhop-green--200
|
||||
);
|
||||
border: 1px solid var(--wp--preset--color--primary);
|
||||
padding: 2rem;
|
||||
}
|
||||
.wp-block-carhop-blocks-audio-player button[data-plyr=play],
|
||||
.wp-block-carhop-blocks-audio-player button[data-plyr=mute] {
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--wp--preset--color--primary);
|
||||
padding: 2rem;
|
||||
}
|
||||
.wp-block-carhop-blocks-audio-player button[data-plyr=mute] {
|
||||
padding: 1rem;
|
||||
}
|
||||
.wp-block-carhop-blocks-audio-player .audio-player__title {
|
||||
text-transform: uppercase;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
color: var(--wp--preset--color--primary);
|
||||
margin: 0;
|
||||
}
|
||||
.wp-block-carhop-blocks-audio-player .audio-player__details__label {
|
||||
margin-right: 0.5rem;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.wp-block-carhop-blocks-audio-player .plyr__controls{padding:2rem 0!important}.wp-block-carhop-blocks-audio-player{--plyr-color-main:var(--wp--preset--color--primary);--plyr-menu-border-color:var(--wp--preset--color--carhop-green);--plyr-menu-border-shadow-color:var(--wp--preset--color--carhop-green);--plyr-control-icon-size:20px;--plyr-audio-control-color:var(--wp--preset--color--primary);--plyr-audio-range-track-background:var( --wp--preset--color--carhop-green--200 );border:1px solid var(--wp--preset--color--primary);padding:2rem}.wp-block-carhop-blocks-audio-player button[data-plyr=mute],.wp-block-carhop-blocks-audio-player button[data-plyr=play]{border:1px solid var(--wp--preset--color--primary);border-radius:50%;padding:2rem}.wp-block-carhop-blocks-audio-player button[data-plyr=mute]{padding:1rem}.wp-block-carhop-blocks-audio-player .audio-player__title{color:var(--wp--preset--color--primary);font-size:1.5rem;font-weight:600;margin:0;text-transform:uppercase}.wp-block-carhop-blocks-audio-player .audio-player__details__label{margin-right:.5rem;text-transform:uppercase}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"audio-player/style-index.css","mappings":";;;AAAA;;;EAAA;AAMC;EACC;AADF;AADA;EAIC;EACA;EACA;EAGA;EACA;EAGA;;GAAA;EAGA;EACA;AAJD;AAMC;;EAEC;EACA;EACA;AAJF;AAOC;EACC;AALF;AAQC;EACC;EACA;EACA;EACA;EACA;AANF;AAUE;EACC;EACA;AARH,C","sources":["webpack://carhop-blocks/./src/audio-player/style.scss"],"sourcesContent":["/**\n * Styles for Plyr audio player block\n * These styles are applied both in the editor and on the front-end\n */\n\n.wp-block-carhop-blocks-audio-player {\n\t.plyr__controls {\n\t\tpadding: 2rem 0 !important;\n\t}\n\t--plyr-color-main: var(--wp--preset--color--primary);\n\t--plyr-menu-border-color: var(--wp--preset--color--carhop-green);\n\t--plyr-menu-border-shadow-color: var(--wp--preset--color--carhop-green);\n\t// --plyr-control-radius: 50%;\n\n\t--plyr-control-icon-size: 20px;\n\t--plyr-audio-control-color: var(--wp--preset--color--primary);\n\t// Utiliser la couleur directement depuis tailwind.config.js ligne 32\n\t// --plyr-audio-range-track-background: #9df2de;\n\t--plyr-audio-range-track-background: var(\n\t\t--wp--preset--color--carhop-green--200\n\t);\n\tborder: 1px solid var(--wp--preset--color--primary);\n\tpadding: 2rem;\n\n\tbutton[data-plyr=\"play\"],\n\tbutton[data-plyr=\"mute\"] {\n\t\tborder-radius: 50%;\n\t\tborder: 1px solid var(--wp--preset--color--primary);\n\t\tpadding: 2rem;\n\t}\n\n\tbutton[data-plyr=\"mute\"] {\n\t\tpadding: 1rem;\n\t}\n\n\t.audio-player__title {\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1.5rem;\n\t\tfont-weight: 600;\n\t\tcolor: var(--wp--preset--color--primary);\n\t\tmargin: 0;\n\t}\n\n\t.audio-player__details {\n\t\t&__label {\n\t\t\tmargin-right: 0.5rem;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\t}\n\n\t// Plyr container styles\n\t// .plyr {\n\t// \tborder-radius: 8px;\n\t// }\n\n\t// // Customize Plyr colors if needed\n\t// .plyr--audio .plyr__control.plyr__tab-focus,\n\t// .plyr--audio .plyr__control:hover,\n\t// .plyr--audio .plyr__control[aria-expanded=\"true\"] {\n\t// \tbackground: #21759b;\n\t// }\n\n\t// .plyr__control--overlaid {\n\t// \tbackground: rgba(33, 117, 155, 0.8);\n\t// }\n}\n\n// .plyr--full-ui input[type=\"range\"] {\n// \tcolor: red;\n// }\n\n// .plyr__control--overlaid {\n// \tbackground: rgba(red, 0.8);\n// }\n\n// .plyr--video .plyr__control.plyr__tab-focus,\n// .plyr--video .plyr__control:hover,\n// .plyr--video .plyr__control[aria-expanded=\"true\"] {\n// \tbackground: red;\n// }\n\n// .plyr__control.plyr__tab-focus {\n// \tbox-shadow: 0 0 0 5px rgba(red, 0.5);\n// }\n\n// .plyr__menu__container\n// \t.plyr__control[role=\"menuitemradio\"][aria-checked=\"true\"]::before {\n// \tbackground: red;\n// }\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,37 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!**********************************!*\
|
||||
!*** ./src/audio-player/view.js ***!
|
||||
\**********************************/
|
||||
/**
|
||||
* Initializes Plyr audio player on the front-end
|
||||
* Note: Plyr is loaded as a dependency via PHP (see audio-player.php)
|
||||
*/
|
||||
|
||||
// Initialize Plyr on all audio elements with the js-plyr class
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
// Check if Plyr is available (loaded via PHP)
|
||||
if (typeof Plyr === "undefined") {
|
||||
/* eslint-disable no-console */
|
||||
console.error("Plyr library not loaded");
|
||||
/* eslint-enable no-console */
|
||||
return;
|
||||
}
|
||||
const players = Array.from(document.querySelectorAll(".js-plyr")).map(element => new Plyr(element, {
|
||||
controls: ["play-large", "play", "progress", "current-time", "duration", "mute", "volume", "settings"],
|
||||
settings: ["speed"],
|
||||
speed: {
|
||||
selected: 1,
|
||||
options: [0.5, 0.75, 1, 1.25, 1.5, 2]
|
||||
}
|
||||
}));
|
||||
|
||||
// Optional: Log players for debugging
|
||||
if (players.length > 0) {
|
||||
/* eslint-disable no-console */
|
||||
console.log("Plyr audio players initialized:", players.length);
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
});
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=view.js.map
|
||||
document.addEventListener("DOMContentLoaded",()=>{if("undefined"==typeof Plyr)return void console.error("Plyr library not loaded");const e=Array.from(document.querySelectorAll(".js-plyr")).map(e=>new Plyr(e,{controls:["play-large","play","progress","current-time","duration","mute","volume","settings"],settings:["speed"],speed:{selected:1,options:[.5,.75,1,1.25,1.5,2]}}));e.length>0&&console.log("Plyr audio players initialized:",e.length)});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"audio-player/view.js","mappings":";;;;AAAA;AACA;AACA;AACA;;AAEA;AACAA,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,EAAE,MAAM;EACnD;EACA,IAAI,OAAOC,IAAI,KAAK,WAAW,EAAE;IAChC;IACAC,OAAO,CAACC,KAAK,CAAC,yBAAyB,CAAC;IACxC;IACA;EACD;EAEA,MAAMC,OAAO,GAAGC,KAAK,CAACC,IAAI,CAACP,QAAQ,CAACQ,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAACC,GAAG,CACnEC,OAAO,IACP,IAAIR,IAAI,CAACQ,OAAO,EAAE;IACjBC,QAAQ,EAAE,CACT,YAAY,EACZ,MAAM,EACN,UAAU,EACV,cAAc,EACd,UAAU,EACV,MAAM,EACN,QAAQ,EACR,UAAU,CACV;IACDC,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnBC,KAAK,EAAE;MAAEC,QAAQ,EAAE,CAAC;MAAEC,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAAE;EAC7D,CAAC,CACH,CAAC;;EAED;EACA,IAAIV,OAAO,CAACW,MAAM,GAAG,CAAC,EAAE;IACvB;IACAb,OAAO,CAACc,GAAG,CAAC,iCAAiC,EAAEZ,OAAO,CAACW,MAAM,CAAC;IAC9D;EACD;AACD,CAAC,CAAC,C","sources":["webpack://carhop-blocks/./src/audio-player/view.js"],"sourcesContent":["/**\n * Initializes Plyr audio player on the front-end\n * Note: Plyr is loaded as a dependency via PHP (see audio-player.php)\n */\n\n// Initialize Plyr on all audio elements with the js-plyr class\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n\t// Check if Plyr is available (loaded via PHP)\n\tif (typeof Plyr === \"undefined\") {\n\t\t/* eslint-disable no-console */\n\t\tconsole.error(\"Plyr library not loaded\");\n\t\t/* eslint-enable no-console */\n\t\treturn;\n\t}\n\n\tconst players = Array.from(document.querySelectorAll(\".js-plyr\")).map(\n\t\t(element) =>\n\t\t\tnew Plyr(element, {\n\t\t\t\tcontrols: [\n\t\t\t\t\t\"play-large\",\n\t\t\t\t\t\"play\",\n\t\t\t\t\t\"progress\",\n\t\t\t\t\t\"current-time\",\n\t\t\t\t\t\"duration\",\n\t\t\t\t\t\"mute\",\n\t\t\t\t\t\"volume\",\n\t\t\t\t\t\"settings\",\n\t\t\t\t],\n\t\t\t\tsettings: [\"speed\"],\n\t\t\t\tspeed: { selected: 1, options: [0.5, 0.75, 1, 1.25, 1.5, 2] },\n\t\t\t})\n\t);\n\n\t// Optional: Log players for debugging\n\tif (players.length > 0) {\n\t\t/* eslint-disable no-console */\n\t\tconsole.log(\"Plyr audio players initialized:\", players.length);\n\t\t/* eslint-enable no-console */\n\t}\n});\n"],"names":["document","addEventListener","Plyr","console","error","players","Array","from","querySelectorAll","map","element","controls","settings","speed","selected","options","length","log"],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -361,7 +361,13 @@ return array(
|
|||
),
|
||||
'blockVariant' => array(
|
||||
'type' => 'string',
|
||||
'default' => 'framed'
|
||||
'default' => 'backgrounded',
|
||||
'enum' => array(
|
||||
'nude',
|
||||
'framed',
|
||||
'framed-backgrounded',
|
||||
'backgrounded'
|
||||
)
|
||||
),
|
||||
'shapeType' => array(
|
||||
'type' => 'string',
|
||||
|
|
|
|||
|
|
@ -1,35 +1 @@
|
|||
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/card-grid/editor.scss ***!
|
||||
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.card-grid__innerblocks {
|
||||
display: block;
|
||||
}
|
||||
.card-grid .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
.card-grid--columns-2 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
.card-grid--columns-3 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
.card-grid--columns-4 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
.card-grid--columns-5 .card-grid__innerblocks > .block-editor-inner-blocks > .block-editor-block-list__layout {
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
}
|
||||
.card-grid.alignwide {
|
||||
max-width: var(--wp--style--global--wide-size, 1200px);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.card-grid.alignfull {
|
||||
max-width: none;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
.card-grid__innerblocks{display:block}.card-grid .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{display:grid;gap:1rem}.card-grid--columns-2 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(2,1fr)}.card-grid--columns-3 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(3,1fr)}.card-grid--columns-4 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(4,1fr)}.card-grid--columns-5 .card-grid__innerblocks>.block-editor-inner-blocks>.block-editor-block-list__layout{grid-template-columns:repeat(5,1fr)}.card-grid.alignwide{margin-left:auto;margin-right:auto;max-width:var(--wp--style--global--wide-size,1200px)}.card-grid.alignfull{margin-left:0;margin-right:0;max-width:none;width:100%}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"card-grid/index.css","mappings":";;;AACC;EACC;AAAF;AAGC;EAGC;EACA;AAHF;AAKC;EAIC;AANF;AAQC;EAIC;AATF;AAWC;EAIC;AAZF;AAcC;EAIC;AAfF;AAoBA;EACC;EACA;EACA;AAjBD;AAoBA;EACC;EACA;EACA;EACA;AAjBD,C","sources":["webpack://carhop-blocks/./src/card-grid/editor.scss"],"sourcesContent":[".card-grid {\n\t&__innerblocks {\n\t\tdisplay: block;\n\t}\n\n\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tdisplay: grid;\n\t\tgap: 1rem;\n\t}\n\t&--columns-2\n\t\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tgrid-template-columns: repeat(2, 1fr);\n\t}\n\t&--columns-3\n\t\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tgrid-template-columns: repeat(3, 1fr);\n\t}\n\t&--columns-4\n\t\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tgrid-template-columns: repeat(4, 1fr);\n\t}\n\t&--columns-5\n\t\t.card-grid__innerblocks\n\t\t> .block-editor-inner-blocks\n\t\t> .block-editor-block-list__layout {\n\t\tgrid-template-columns: repeat(5, 1fr);\n\t}\n}\n\n// Styles pour les alignements dans l'éditeur\n.card-grid.alignwide {\n\tmax-width: var(--wp--style--global--wide-size, 1200px);\n\tmargin-left: auto;\n\tmargin-right: auto;\n}\n\n.card-grid.alignfull {\n\tmax-width: none;\n\tmargin-left: 0;\n\tmargin-right: 0;\n\twidth: 100%;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,412 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/card-grid/block.json":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/card-grid/block.json ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/card-grid","version":"0.1.0","title":"Card Grid","category":"carhop-blocks","icon":"smiley","description":"Boite de contenu pour la mise en forme d\'éléments de contenu","example":{},"supports":{"html":false,"align":["wide","full"],"alignWide":true},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"align":{"type":"string","default":""},"columns":{"type":"number","default":3},"cardsWithBorder":{"type":"boolean","default":true}}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/card-grid/edit.js":
|
||||
/*!*******************************!*\
|
||||
!*** ./src/card-grid/edit.js ***!
|
||||
\*******************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/card-grid/editor.scss");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* 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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes,
|
||||
...props
|
||||
}) {
|
||||
const {
|
||||
columns,
|
||||
cardsWithBorder
|
||||
} = attributes;
|
||||
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__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Nombre de colonnes", "carhop-blocks"),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
|
||||
__next40pxDefaultSize: true,
|
||||
__nextHasNoMarginBottom: true,
|
||||
initialPosition: 3,
|
||||
label: "Nombre de colonnes",
|
||||
max: 4,
|
||||
min: 2,
|
||||
onChange: value => setAttributes({
|
||||
columns: value
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Bordure des cartes", "carhop-blocks"),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.CheckboxControl, {
|
||||
label: "Avec bordure",
|
||||
checked: cardsWithBorder,
|
||||
onChange: value => setAttributes({
|
||||
cardsWithBorder: value
|
||||
})
|
||||
})
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("section", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: `card-grid card-grid--columns-${columns} card-grid--cards-${cardsWithBorder ? "with-border" : "without-border"}`
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||
className: "card-grid__innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||
template: [["carhop-blocks/content-card", {
|
||||
placeholder: "Ajouter ici le texte"
|
||||
}]],
|
||||
allowedBlocks: ["carhop-blocks/content-card"]
|
||||
})
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/card-grid/editor.scss":
|
||||
/*!***********************************!*\
|
||||
!*** ./src/card-grid/editor.scss ***!
|
||||
\***********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/card-grid/index.js":
|
||||
/*!********************************!*\
|
||||
!*** ./src/card-grid/index.js ***!
|
||||
\********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/card-grid/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/card-grid/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/card-grid/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/card-grid/block.json");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
icon: {
|
||||
foreground: "#136f63",
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||
width: "40",
|
||||
height: "40",
|
||||
viewBox: "0 0 100 100",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("g", {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
d: "m50,99.84988l-43.14852,-24.92494l0,-49.84988l43.14852,-24.92494l43.14852,24.92494l0,49.84988l-43.14852,24.92494zm-40.75518,-26.32675l40.75518,23.52312l40.75518,-23.52312l0,-47.04625l-40.75518,-23.55731l-40.75518,23.55731l0,47.04625z"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
d: "m50,86.13945l-31.28439,-18.05263l0,-36.13945l31.28439,-18.05263l31.28439,18.05263l0,36.13945l-31.28439,18.05263zm-13.50528,-28.344l13.50528,7.79545l13.50528,-7.79545l0,-15.59091l-13.50528,-7.79545l-13.50528,7.79545l0,15.59091z"
|
||||
})]
|
||||
})
|
||||
})
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/card-grid/save.js":
|
||||
/*!*******************************!*\
|
||||
!*** ./src/card-grid/save.js ***!
|
||||
\*******************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
function save({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
columns,
|
||||
cardsWithBorder,
|
||||
align
|
||||
} = attributes;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("section", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||
className: `card-grid card-grid--columns-${columns} card-grid--cards-${cardsWithBorder ? "with-border" : "without-border"}${align ? ` align${align}` : ""}`
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "card-grid__innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/card-grid/style.scss":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/card-grid/style.scss ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/components":
|
||||
/*!************************************!*\
|
||||
!*** external ["wp","components"] ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "card-grid/index": 0,
|
||||
/******/ "card-grid/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["card-grid/style-index"], () => (__webpack_require__("./src/card-grid/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var r,e={6120:()=>{const r=window.wp.blocks,e=window.wp.i18n,o=window.wp.blockEditor,l=window.wp.components,n=window.ReactJSXRuntime,s=JSON.parse('{"UU":"carhop-blocks/card-grid"}');(0,r.registerBlockType)(s.UU,{icon:{foreground:"#136f63",src:(0,n.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 100 100",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"m50,99.84988l-43.14852,-24.92494l0,-49.84988l43.14852,-24.92494l43.14852,24.92494l0,49.84988l-43.14852,24.92494zm-40.75518,-26.32675l40.75518,23.52312l40.75518,-23.52312l0,-47.04625l-40.75518,-23.55731l-40.75518,23.55731l0,47.04625z"}),(0,n.jsx)("path",{d:"m50,86.13945l-31.28439,-18.05263l0,-36.13945l31.28439,-18.05263l31.28439,18.05263l0,36.13945l-31.28439,18.05263zm-13.50528,-28.344l13.50528,7.79545l13.50528,-7.79545l0,-15.59091l-13.50528,-7.79545l-13.50528,7.79545l0,15.59091z"})]})})},edit:function({attributes:r,setAttributes:s,...c}){const{columns:t,cardsWithBorder:i}=r;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.InspectorControls,{children:[(0,n.jsx)(l.PanelBody,{title:(0,e.__)("Nombre de colonnes","carhop-blocks"),children:(0,n.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,initialPosition:3,label:"Nombre de colonnes",max:4,min:2,onChange:r=>s({columns:r})})}),(0,n.jsx)(l.PanelBody,{title:(0,e.__)("Bordure des cartes","carhop-blocks"),children:(0,n.jsx)(l.CheckboxControl,{label:"Avec bordure",checked:i,onChange:r=>s({cardsWithBorder:r})})})]}),(0,n.jsx)("section",{...(0,o.useBlockProps)({className:`card-grid card-grid--columns-${t} card-grid--cards-${i?"with-border":"without-border"}`}),children:(0,n.jsx)("div",{className:"card-grid__innerblocks",children:(0,n.jsx)(o.InnerBlocks,{template:[["carhop-blocks/content-card",{placeholder:"Ajouter ici le texte"}]],allowedBlocks:["carhop-blocks/content-card"]})})})]})},save:function({attributes:r}){const{columns:e,cardsWithBorder:l,align:s}=r;return(0,n.jsx)("section",{...o.useBlockProps.save({className:`card-grid card-grid--columns-${e} card-grid--cards-${l?"with-border":"without-border"}${s?` align${s}`:""}`}),children:(0,n.jsx)("div",{className:"card-grid__innerblocks",children:(0,n.jsx)(o.InnerBlocks.Content,{})})})}})}},o={};function l(r){var n=o[r];if(void 0!==n)return n.exports;var s=o[r]={exports:{}};return e[r](s,s.exports,l),s.exports}l.m=e,r=[],l.O=(e,o,n,s)=>{if(!o){var c=1/0;for(d=0;d<r.length;d++){for(var[o,n,s]=r[d],t=!0,i=0;i<o.length;i++)(!1&s||c>=s)&&Object.keys(l.O).every(r=>l.O[r](o[i]))?o.splice(i--,1):(t=!1,s<c&&(c=s));if(t){r.splice(d--,1);var a=n();void 0!==a&&(e=a)}}return e}s=s||0;for(var d=r.length;d>0&&r[d-1][2]>s;d--)r[d]=r[d-1];r[d]=[o,n,s]},l.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={7227:0,5235:0};l.O.j=e=>0===r[e];var e=(e,o)=>{var n,s,[c,t,i]=o,a=0;if(c.some(e=>0!==r[e])){for(n in t)l.o(t,n)&&(l.m[n]=t[n]);if(i)var d=i(l)}for(e&&e(o);a<c.length;a++)s=c[a],l.o(r,s)&&r[s]&&r[s][0](),r[s]=0;return l.O(d)},o=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var n=l.O(void 0,[5235],()=>l(6120));n=l.O(n)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,27 +1 @@
|
|||
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/card-grid/style.scss ***!
|
||||
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.card-grid__innerblocks {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
.card-grid--cards-with-border .content-card {
|
||||
border: 1px solid var(--wp--preset--color--primary);
|
||||
padding: 2rem;
|
||||
}
|
||||
.card-grid--cards-without-border .content-card {
|
||||
border: none;
|
||||
}
|
||||
.card-grid.alignwide {
|
||||
max-width: var(--wp--style--global--wide-size, 1200px);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.card-grid.alignfull {
|
||||
max-width: none;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.card-grid__innerblocks{display:grid;gap:1rem}.card-grid--cards-with-border .content-card{border:1px solid var(--wp--preset--color--primary);padding:2rem}.card-grid--cards-without-border .content-card{border:none}.card-grid.alignwide{margin-left:auto;margin-right:auto;max-width:var(--wp--style--global--wide-size,1200px)}.card-grid.alignfull{margin-left:0;margin-right:0;max-width:none;width:100%}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"card-grid/style-index.css","mappings":";;;AACC;EACC;EACA;AAAF;AAIE;EACC;EACA;AAFH;AAME;EACC;AAJH;AAUA;EACC;EACA;EACA;AAPD;AAUA;EACC;EACA;EACA;EACA;AAPD,C","sources":["webpack://carhop-blocks/./src/card-grid/style.scss"],"sourcesContent":[".card-grid {\r\n\t&__innerblocks {\r\n\t\tdisplay: grid;\r\n\t\tgap: 1rem;\r\n\t}\r\n\r\n\t&--cards-with-border {\r\n\t\t.content-card {\r\n\t\t\tborder: 1px solid var(--wp--preset--color--primary);\r\n\t\t\tpadding: 2rem;\r\n\t\t}\r\n\t}\r\n\t&--cards-without-border {\r\n\t\t.content-card {\r\n\t\t\tborder: none;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Styles pour les alignements\r\n.card-grid.alignwide {\r\n\tmax-width: var(--wp--style--global--wide-size, 1200px);\r\n\tmargin-left: auto;\r\n\tmargin-right: auto;\r\n}\r\n\r\n.card-grid.alignfull {\r\n\tmax-width: none;\r\n\tmargin-left: 0;\r\n\tmargin-right: 0;\r\n\twidth: 100%;\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!*******************************!*\
|
||||
!*** ./src/card-grid/view.js ***!
|
||||
\*******************************/
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
|
|
@ -1,13 +1 @@
|
|||
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/chapo/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-chapo {
|
||||
border: 1px dotted #f00;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
.wp-block-create-block-chapo{border:1px dotted red}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"chapo/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://carhop-blocks/./src/chapo/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-chapo {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,364 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/chapo/block.json":
|
||||
/*!******************************!*\
|
||||
!*** ./src/chapo/block.json ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/chapo","version":"0.1.0","title":"Chapo","category":"carhop-blocks","icon":"smiley","description":"Chapo pour la mise en forme supérieure d\'éléments de contenu","example":{},"supports":{"html":false,"color":{"text":true,"background":false,"link":false}},"textdomain":"chapo","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"content":{"type":"string","source":"html","selector":"p"}}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/chapo/edit.js":
|
||||
/*!***************************!*\
|
||||
!*** ./src/chapo/edit.js ***!
|
||||
\***************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/chapo/editor.scss");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
const {
|
||||
content
|
||||
} = attributes;
|
||||
const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: "block-chapo"
|
||||
});
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
|
||||
...blockProps,
|
||||
tagName: "p",
|
||||
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Un bien beau chapo", "chapo"),
|
||||
value: content,
|
||||
onChange: content => setAttributes({
|
||||
content
|
||||
})
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/chapo/editor.scss":
|
||||
/*!*******************************!*\
|
||||
!*** ./src/chapo/editor.scss ***!
|
||||
\*******************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/chapo/index.js":
|
||||
/*!****************************!*\
|
||||
!*** ./src/chapo/index.js ***!
|
||||
\****************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/chapo/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/chapo/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/chapo/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/chapo/block.json");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
icon: {
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||
width: "32",
|
||||
height: "32",
|
||||
viewBox: "0 0 32 32",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
d: "M16 24L8 16L16 8L24 16L16 24Z"
|
||||
})
|
||||
})
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/chapo/save.js":
|
||||
/*!***************************!*\
|
||||
!*** ./src/chapo/save.js ***!
|
||||
\***************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
|
||||
function save({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
content
|
||||
} = attributes;
|
||||
const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||
className: "block-chapo"
|
||||
});
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.RichText.Content, {
|
||||
...blockProps,
|
||||
value: content,
|
||||
tagName: "p"
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/chapo/style.scss":
|
||||
/*!******************************!*\
|
||||
!*** ./src/chapo/style.scss ***!
|
||||
\******************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "chapo/index": 0,
|
||||
/******/ "chapo/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["chapo/style-index"], () => (__webpack_require__("./src/chapo/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var e,o={3118:()=>{const e=window.wp.blocks,o=window.wp.i18n,t=window.wp.blockEditor,r=window.ReactJSXRuntime,n=JSON.parse('{"UU":"carhop-blocks/chapo"}');(0,e.registerBlockType)(n.UU,{icon:{src:(0,r.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",children:(0,r.jsx)("path",{d:"M16 24L8 16L16 8L24 16L16 24Z"})})},edit:function({attributes:e,setAttributes:n}){const{content:a}=e,c=(0,t.useBlockProps)({className:"block-chapo"});return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(t.RichText,{...c,tagName:"p",placeholder:(0,o.__)("Un bien beau chapo","chapo"),value:a,onChange:e=>n({content:e})})})},save:function({attributes:e}){const{content:o}=e,n=t.useBlockProps.save({className:"block-chapo"});return(0,r.jsx)(t.RichText.Content,{...n,value:o,tagName:"p"})}})}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var a=t[e]={exports:{}};return o[e](a,a.exports,r),a.exports}r.m=o,e=[],r.O=(o,t,n,a)=>{if(!t){var c=1/0;for(p=0;p<e.length;p++){for(var[t,n,a]=e[p],s=!0,i=0;i<t.length;i++)(!1&a||c>=a)&&Object.keys(r.O).every(e=>r.O[e](t[i]))?t.splice(i--,1):(s=!1,a<c&&(c=a));if(s){e.splice(p--,1);var l=n();void 0!==l&&(o=l)}}return o}a=a||0;for(var p=e.length;p>0&&e[p-1][2]>a;p--)e[p]=e[p-1];e[p]=[t,n,a]},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={7505:0,5029:0};r.O.j=o=>0===e[o];var o=(o,t)=>{var n,a,[c,s,i]=t,l=0;if(c.some(o=>0!==e[o])){for(n in s)r.o(s,n)&&(r.m[n]=s[n]);if(i)var p=i(r)}for(o&&o(t);l<c.length;l++)a=c[l],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(p)},t=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var n=r.O(void 0,[5029],()=>r(3118));n=r.O(n)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,16 +1 @@
|
|||
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/chapo/style.scss ***!
|
||||
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied both on the front of your site
|
||||
* and in the editor.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
.wp-block-create-block-chapo {
|
||||
background-color: #21759b;
|
||||
color: #fff;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.wp-block-create-block-chapo{background-color:#21759b;color:#fff;padding:2px}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"chapo/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://carhop-blocks/./src/chapo/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-chapo {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,32 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!***************************!*\
|
||||
!*** ./src/chapo/view.js ***!
|
||||
\***************************/
|
||||
/**
|
||||
* Use this file for JavaScript code that you want to run in the front-end
|
||||
* on posts/pages that contain this block.
|
||||
*
|
||||
* When this file is defined as the value of the `viewScript` property
|
||||
* in `block.json` it will be enqueued on the front end of the site.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```js
|
||||
* {
|
||||
* "viewScript": "file:./view.js"
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* If you're not making any changes to this file because your project doesn't need any
|
||||
* JavaScript running in the front-end, then you should delete this file and remove
|
||||
* the `viewScript` property from `block.json`.
|
||||
*
|
||||
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script
|
||||
*/
|
||||
|
||||
/* eslint-disable no-console */
|
||||
console.log('Hello World! (from create-block-chapo block)');
|
||||
/* eslint-enable no-console */
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=view.js.map
|
||||
console.log("Hello World! (from create-block-chapo block)");
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"chapo/view.js","mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACAA,OAAO,CAACC,GAAG,CAAE,8CAA+C,CAAC;AAC7D,8B","sources":["webpack://carhop-blocks/./src/chapo/view.js"],"sourcesContent":["/**\n * Use this file for JavaScript code that you want to run in the front-end\n * on posts/pages that contain this block.\n *\n * When this file is defined as the value of the `viewScript` property\n * in `block.json` it will be enqueued on the front end of the site.\n *\n * Example:\n *\n * ```js\n * {\n * \"viewScript\": \"file:./view.js\"\n * }\n * ```\n *\n * If you're not making any changes to this file because your project doesn't need any\n * JavaScript running in the front-end, then you should delete this file and remove\n * the `viewScript` property from `block.json`.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script\n */\n\n/* eslint-disable no-console */\nconsole.log( 'Hello World! (from create-block-chapo block)' );\n/* eslint-enable no-console */\n"],"names":["console","log"],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,30 +1 @@
|
|||
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/company-timeline/editor.scss ***!
|
||||
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied inside the editor only.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
.wp-block-telex-company-timeline .timeline-entry-content .timeline-title:focus,
|
||||
.wp-block-telex-company-timeline .timeline-entry-content .timeline-description:focus {
|
||||
outline: 2px solid #3b82f6;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-entry-content .timeline-media button {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.components-panel__body .components-card {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.components-panel__body .components-card .components-card__header {
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
.components-panel__body .components-card .components-card__body .components-base-control {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.components-panel__body .components-card .components-card__body .components-base-control:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
.wp-block-telex-company-timeline .timeline-entry-content .timeline-description:focus,.wp-block-telex-company-timeline .timeline-entry-content .timeline-title:focus{outline:2px solid #3b82f6;outline-offset:2px}.wp-block-telex-company-timeline .timeline-entry-content .timeline-media button{margin-top:12px}.components-panel__body .components-card{margin-bottom:12px}.components-panel__body .components-card .components-card__header{border-bottom:1px solid #e2e8f0}.components-panel__body .components-card .components-card__body .components-base-control{margin-bottom:16px}.components-panel__body .components-card .components-card__body .components-base-control:last-child{margin-bottom:0}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"company-timeline/index.css","mappings":";;;AAAA;;;;EAAA;AAUG;;EACC;EACA;AAHJ;AAQG;EACC;AANJ;AAaC;EACC;AAVF;AAYE;EACC;AAVH;AAcG;EACC;AAZJ;AAcI;EACC;AAZL,C","sources":["webpack://carhop-blocks/./src/company-timeline/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-telex-company-timeline {\n\t.timeline-entry-content {\n\t\t.timeline-title,\n\t\t.timeline-description {\n\t\t\t&:focus {\n\t\t\t\toutline: 2px solid #3b82f6;\n\t\t\t\toutline-offset: 2px;\n\t\t\t}\n\t\t}\n\n\t\t.timeline-media {\n\t\t\tbutton {\n\t\t\t\tmargin-top: 12px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.components-panel__body {\n\t.components-card {\n\t\tmargin-bottom: 12px;\n\n\t\t.components-card__header {\n\t\t\tborder-bottom: 1px solid #e2e8f0;\n\t\t}\n\n\t\t.components-card__body {\n\t\t\t.components-base-control {\n\t\t\t\tmargin-bottom: 16px;\n\n\t\t\t\t&:last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,174 +1 @@
|
|||
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/company-timeline/style.scss ***!
|
||||
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied both on the front of your site
|
||||
* and in the editor.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
.wp-block-telex-company-timeline {
|
||||
display: flex;
|
||||
gap: 60px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 40px 20px;
|
||||
position: relative;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar {
|
||||
flex: 0 0 200px;
|
||||
position: sticky;
|
||||
top: 100px;
|
||||
height: -moz-fit-content;
|
||||
height: fit-content;
|
||||
align-self: flex-start;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years {
|
||||
background: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
padding: 24px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3 {
|
||||
margin: 0 0 20px 0;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: #1e293b;
|
||||
border-bottom: 2px solid #e2e8f0;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link {
|
||||
display: block;
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 8px;
|
||||
text-decoration: none;
|
||||
color: #64748b;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
border-radius: 6px;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: none;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link:hover {
|
||||
background: #e2e8f0;
|
||||
color: #1e293b;
|
||||
transform: translateX(4px);
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link.active {
|
||||
background: #3b82f6;
|
||||
color: white;
|
||||
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry {
|
||||
margin-bottom: 80px;
|
||||
scroll-margin-top: 100px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker {
|
||||
margin-bottom: 24px;
|
||||
position: relative;
|
||||
padding-left: 40px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: #3b82f6;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2 {
|
||||
margin: 0;
|
||||
font-size: 32px;
|
||||
font-weight: 800;
|
||||
color: #1e293b;
|
||||
line-height: 1;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 32px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
|
||||
border-left: 4px solid #3b82f6;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title {
|
||||
margin: 0 0 16px 0;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: #1e293b;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description {
|
||||
margin: 0 0 24px 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.8;
|
||||
color: #475569;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media {
|
||||
margin-top: 24px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.wp-block-telex-company-timeline {
|
||||
flex-direction: column;
|
||||
gap: 30px;
|
||||
padding: 20px 15px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar {
|
||||
position: static;
|
||||
flex: 1;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years {
|
||||
padding: 16px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3 {
|
||||
font-size: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link {
|
||||
padding: 10px 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker::before {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content {
|
||||
padding: 20px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title {
|
||||
font-size: 20px;
|
||||
}
|
||||
.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.wp-block-telex-company-timeline{display:flex;gap:60px;margin:0 auto;max-width:1200px;padding:40px 20px;position:relative}.wp-block-telex-company-timeline .timeline-sidebar{align-self:flex-start;flex:0 0 200px;height:-moz-fit-content;height:fit-content;position:sticky;top:100px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years{background:#f8f9fa;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.08);padding:24px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3{border-bottom:2px solid #e2e8f0;color:#1e293b;font-size:18px;font-weight:700;margin:0 0 20px;padding-bottom:12px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link{background:transparent;border:none;border-radius:6px;color:#64748b;cursor:pointer;display:block;font-size:16px;font-weight:600;margin-bottom:8px;padding:12px 16px;text-align:left;text-decoration:none;transition:all .3s ease;width:100%}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link:hover{background:#e2e8f0;color:#1e293b;transform:translateX(4px)}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link.active{background:#3b82f6;box-shadow:0 4px 12px rgba(59,130,246,.3);color:#fff}.wp-block-telex-company-timeline .timeline-content{flex:1;min-width:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry{margin-bottom:80px;scroll-margin-top:100px}.wp-block-telex-company-timeline .timeline-content .timeline-entry:last-child{margin-bottom:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker{margin-bottom:24px;padding-left:40px;position:relative}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker:before{background:#3b82f6;border-radius:50%;box-shadow:0 0 0 4px rgba(59,130,246,.2);content:"";height:24px;left:0;position:absolute;top:50%;transform:translateY(-50%);width:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2{color:#1e293b;font-size:32px;font-weight:800;line-height:1;margin:0}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content{background:#fff;border-left:4px solid #3b82f6;border-radius:12px;box-shadow:0 4px 16px rgba(0,0,0,.1);padding:32px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title{color:#1e293b;font-size:24px;font-weight:700;margin:0 0 16px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description{color:#475569;font-size:16px;line-height:1.8;margin:0 0 24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media{margin-top:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-media img{border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);height:auto;width:100%}@media(max-width:768px){.wp-block-telex-company-timeline{flex-direction:column;gap:30px;padding:20px 15px}.wp-block-telex-company-timeline .timeline-sidebar{flex:1;position:static}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years{padding:16px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years h3{font-size:16px;margin-bottom:12px}.wp-block-telex-company-timeline .timeline-sidebar .timeline-years .year-link{font-size:14px;padding:10px 12px}.wp-block-telex-company-timeline .timeline-content .timeline-entry{margin-bottom:50px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker{padding-left:30px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker:before{height:18px;width:18px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-year-marker h2{font-size:24px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content{padding:20px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-title{font-size:20px}.wp-block-telex-company-timeline .timeline-content .timeline-entry .timeline-entry-content .timeline-description{font-size:15px}}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,68 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!**************************************!*\
|
||||
!*** ./src/company-timeline/view.js ***!
|
||||
\**************************************/
|
||||
/**
|
||||
* Use this file for JavaScript code that you want to run in the front-end
|
||||
* on posts/pages that contain this block.
|
||||
*/
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const timeline = document.querySelector('.wp-block-telex-company-timeline');
|
||||
if (!timeline) {
|
||||
return;
|
||||
}
|
||||
const sidebar = timeline.querySelector('.timeline-sidebar');
|
||||
const yearLinks = timeline.querySelectorAll('.year-link');
|
||||
const entries = timeline.querySelectorAll('.timeline-entry');
|
||||
if (!sidebar || yearLinks.length === 0 || entries.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Smooth scroll to year when clicking sidebar link
|
||||
yearLinks.forEach(link => {
|
||||
link.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
const year = this.getAttribute('data-year') || this.getAttribute('href').replace('#year-', '');
|
||||
const targetEntry = timeline.querySelector(`[data-year="${year}"]`);
|
||||
if (targetEntry) {
|
||||
targetEntry.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Update active year on scroll
|
||||
const observerOptions = {
|
||||
root: null,
|
||||
rootMargin: '-20% 0px -70% 0px',
|
||||
threshold: 0
|
||||
};
|
||||
const observerCallback = entries => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
const year = entry.target.getAttribute('data-year');
|
||||
|
||||
// Remove active class from all links
|
||||
yearLinks.forEach(link => link.classList.remove('active'));
|
||||
|
||||
// Add active class to current year
|
||||
const activeLink = timeline.querySelector(`.year-link[data-year="${year}"]`);
|
||||
if (activeLink) {
|
||||
activeLink.classList.add('active');
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const observer = new IntersectionObserver(observerCallback, observerOptions);
|
||||
|
||||
// Observe all timeline entries
|
||||
entries.forEach(entry => {
|
||||
observer.observe(entry);
|
||||
});
|
||||
});
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=view.js.map
|
||||
document.addEventListener("DOMContentLoaded",function(){const e=document.querySelector(".wp-block-telex-company-timeline");if(!e)return;const t=e.querySelector(".timeline-sidebar"),r=e.querySelectorAll(".year-link"),n=e.querySelectorAll(".timeline-entry");if(!t||0===r.length||0===n.length)return;r.forEach(t=>{t.addEventListener("click",function(t){t.preventDefault();const r=this.getAttribute("data-year")||this.getAttribute("href").replace("#year-",""),n=e.querySelector(`[data-year="${r}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})});const o=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=t.target.getAttribute("data-year");r.forEach(e=>e.classList.remove("active"));const o=e.querySelector(`.year-link[data-year="${n}"]`);o&&o.classList.add("active")}})},{root:null,rootMargin:"-20% 0px -70% 0px",threshold:0});n.forEach(e=>{o.observe(e)})});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"company-timeline/view.js","mappings":";;;;AAAA;AACA;AACA;AACA;;AAEAA,QAAQ,CAACC,gBAAgB,CAAE,kBAAkB,EAAE,YAAW;EACzD,MAAMC,QAAQ,GAAGF,QAAQ,CAACG,aAAa,CAAE,kCAAmC,CAAC;EAE7E,IAAK,CAAED,QAAQ,EAAG;IACjB;EACD;EAEA,MAAME,OAAO,GAAGF,QAAQ,CAACC,aAAa,CAAE,mBAAoB,CAAC;EAC7D,MAAME,SAAS,GAAGH,QAAQ,CAACI,gBAAgB,CAAE,YAAa,CAAC;EAC3D,MAAMC,OAAO,GAAGL,QAAQ,CAACI,gBAAgB,CAAE,iBAAkB,CAAC;EAE9D,IAAK,CAAEF,OAAO,IAAIC,SAAS,CAACG,MAAM,KAAK,CAAC,IAAID,OAAO,CAACC,MAAM,KAAK,CAAC,EAAG;IAClE;EACD;;EAEA;EACAH,SAAS,CAACI,OAAO,CAAEC,IAAI,IAAI;IAC1BA,IAAI,CAACT,gBAAgB,CAAE,OAAO,EAAE,UAAUU,CAAC,EAAG;MAC7CA,CAAC,CAACC,cAAc,CAAC,CAAC;MAClB,MAAMC,IAAI,GAAG,IAAI,CAACC,YAAY,CAAE,WAAY,CAAC,IAAI,IAAI,CAACA,YAAY,CAAE,MAAO,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;MACpG,MAAMC,WAAW,GAAGd,QAAQ,CAACC,aAAa,CAAE,eAAgBU,IAAI,IAAM,CAAC;MAEvE,IAAKG,WAAW,EAAG;QAClBA,WAAW,CAACC,cAAc,CAAE;UAC3BC,QAAQ,EAAE,QAAQ;UAClBC,KAAK,EAAE;QACR,CAAE,CAAC;MACJ;IACD,CAAE,CAAC;EACJ,CAAE,CAAC;;EAEH;EACA,MAAMC,eAAe,GAAG;IACvBC,IAAI,EAAE,IAAI;IACVC,UAAU,EAAE,mBAAmB;IAC/BC,SAAS,EAAE;EACZ,CAAC;EAED,MAAMC,gBAAgB,GAAKjB,OAAO,IAAM;IACvCA,OAAO,CAACE,OAAO,CAAEgB,KAAK,IAAI;MACzB,IAAKA,KAAK,CAACC,cAAc,EAAG;QAC3B,MAAMb,IAAI,GAAGY,KAAK,CAACE,MAAM,CAACb,YAAY,CAAE,WAAY,CAAC;;QAErD;QACAT,SAAS,CAACI,OAAO,CAAEC,IAAI,IAAIA,IAAI,CAACkB,SAAS,CAACC,MAAM,CAAE,QAAS,CAAE,CAAC;;QAE9D;QACA,MAAMC,UAAU,GAAG5B,QAAQ,CAACC,aAAa,CAAE,yBAA0BU,IAAI,IAAM,CAAC;QAChF,IAAKiB,UAAU,EAAG;UACjBA,UAAU,CAACF,SAAS,CAACG,GAAG,CAAE,QAAS,CAAC;QACrC;MACD;IACD,CAAE,CAAC;EACJ,CAAC;EAED,MAAMC,QAAQ,GAAG,IAAIC,oBAAoB,CAAET,gBAAgB,EAAEJ,eAAgB,CAAC;;EAE9E;EACAb,OAAO,CAACE,OAAO,CAAEgB,KAAK,IAAI;IACzBO,QAAQ,CAACE,OAAO,CAAET,KAAM,CAAC;EAC1B,CAAE,CAAC;AACJ,CAAE,CAAC,C","sources":["webpack://carhop-blocks/./src/company-timeline/view.js"],"sourcesContent":["/**\n * Use this file for JavaScript code that you want to run in the front-end\n * on posts/pages that contain this block.\n */\n\ndocument.addEventListener( 'DOMContentLoaded', function() {\n\tconst timeline = document.querySelector( '.wp-block-telex-company-timeline' );\n\t\n\tif ( ! timeline ) {\n\t\treturn;\n\t}\n\n\tconst sidebar = timeline.querySelector( '.timeline-sidebar' );\n\tconst yearLinks = timeline.querySelectorAll( '.year-link' );\n\tconst entries = timeline.querySelectorAll( '.timeline-entry' );\n\n\tif ( ! sidebar || yearLinks.length === 0 || entries.length === 0 ) {\n\t\treturn;\n\t}\n\n\t// Smooth scroll to year when clicking sidebar link\n\tyearLinks.forEach( link => {\n\t\tlink.addEventListener( 'click', function( e ) {\n\t\t\te.preventDefault();\n\t\t\tconst year = this.getAttribute( 'data-year' ) || this.getAttribute( 'href' ).replace( '#year-', '' );\n\t\t\tconst targetEntry = timeline.querySelector( `[data-year=\"${ year }\"]` );\n\t\t\t\n\t\t\tif ( targetEntry ) {\n\t\t\t\ttargetEntry.scrollIntoView( { \n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\tblock: 'start'\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t} );\n\n\t// Update active year on scroll\n\tconst observerOptions = {\n\t\troot: null,\n\t\trootMargin: '-20% 0px -70% 0px',\n\t\tthreshold: 0\n\t};\n\n\tconst observerCallback = ( entries ) => {\n\t\tentries.forEach( entry => {\n\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\tconst year = entry.target.getAttribute( 'data-year' );\n\t\t\t\t\n\t\t\t\t// Remove active class from all links\n\t\t\t\tyearLinks.forEach( link => link.classList.remove( 'active' ) );\n\t\t\t\t\n\t\t\t\t// Add active class to current year\n\t\t\t\tconst activeLink = timeline.querySelector( `.year-link[data-year=\"${ year }\"]` );\n\t\t\t\tif ( activeLink ) {\n\t\t\t\t\tactiveLink.classList.add( 'active' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t};\n\n\tconst observer = new IntersectionObserver( observerCallback, observerOptions );\n\n\t// Observe all timeline entries\n\tentries.forEach( entry => {\n\t\tobserver.observe( entry );\n\t} );\n} );\n"],"names":["document","addEventListener","timeline","querySelector","sidebar","yearLinks","querySelectorAll","entries","length","forEach","link","e","preventDefault","year","getAttribute","replace","targetEntry","scrollIntoView","behavior","block","observerOptions","root","rootMargin","threshold","observerCallback","entry","isIntersecting","target","classList","remove","activeLink","add","observer","IntersectionObserver","observe"],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,4 +1 @@
|
|||
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/content-card/editor.scss ***!
|
||||
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,493 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./_utilities/utilities.js":
|
||||
/*!*********************************!*\
|
||||
!*** ./_utilities/utilities.js ***!
|
||||
\*********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ isColorLight: () => (/* binding */ isColorLight)
|
||||
/* harmony export */ });
|
||||
// Fonction pour déterminer si une couleur est claire ou sombre
|
||||
function isColorLight(color) {
|
||||
// Si pas de couleur, considérer comme claire
|
||||
if (!color) return true;
|
||||
|
||||
// Convertir hex en RGB
|
||||
let hex = color.replace("#", "");
|
||||
if (hex.length === 3) {
|
||||
hex = hex.split("").map(char => char + char).join("");
|
||||
}
|
||||
const r = parseInt(hex.substr(0, 2), 16);
|
||||
const g = parseInt(hex.substr(2, 2), 16);
|
||||
const b = parseInt(hex.substr(4, 2), 16);
|
||||
|
||||
// Calculer la luminance relative (formule standard)
|
||||
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
||||
|
||||
// Si luminance > 0.5, la couleur est claire
|
||||
return luminance > 0.5;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/content-card/block.json":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/content-card/block.json ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/content-card","version":"0.1.0","title":"Content Card","category":"carhop-blocks","icon":"smiley","description":"Carte de contenu pour la mise en forme d\'éléments de contenu","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":{"hasBackgroundColor":{"type":"boolean","default":false},"backgroundColor":{"type":"string","default":"#136f63"},"hasLightBackground":{"type":"boolean","default":true},"textColor":{"type":"string","default":"#136f63"}}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/content-card/edit.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/content-card/edit.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/content-card/editor.scss");
|
||||
/* harmony import */ var _utilities_utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../_utilities/utilities */ "./_utilities/utilities.js");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* 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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes,
|
||||
...props
|
||||
}) {
|
||||
const colors = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useSetting)("color.palette.theme");
|
||||
const {
|
||||
hasBackgroundColor,
|
||||
backgroundColor,
|
||||
textColor,
|
||||
hasLightBackground
|
||||
} = attributes;
|
||||
function onBackgroundColorChange(value) {
|
||||
if (value === undefined) {
|
||||
setAttributes({
|
||||
hasBackgroundColor: false
|
||||
});
|
||||
setAttributes({
|
||||
backgroundColor: "transparent"
|
||||
});
|
||||
}
|
||||
const isLightBackgroundColor = (0,_utilities_utilities__WEBPACK_IMPORTED_MODULE_3__.isColorLight)(backgroundColor);
|
||||
setAttributes({
|
||||
hasLightBackground: isLightBackgroundColor
|
||||
});
|
||||
setAttributes({
|
||||
backgroundColor: value
|
||||
});
|
||||
}
|
||||
function onHasBackgroundColorChange(value) {
|
||||
setAttributes({
|
||||
hasBackgroundColor: value
|
||||
});
|
||||
if (!value) {
|
||||
setAttributes({
|
||||
backgroundColor: null
|
||||
});
|
||||
}
|
||||
}
|
||||
function onTextColorChange(value) {
|
||||
setAttributes({
|
||||
textColor: 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__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
|
||||
className: "deligraph-blocks-components-image__panel-body",
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Arrière plan", "deligraph-blocks"),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.CheckboxControl, {
|
||||
label: "Arri\xE8re plan color\xE9",
|
||||
checked: hasBackgroundColor,
|
||||
onChange: onHasBackgroundColorChange
|
||||
}), hasBackgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ColorPalette, {
|
||||
colors: colors,
|
||||
value: backgroundColor,
|
||||
onChange: onBackgroundColorChange
|
||||
})
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
|
||||
className: "deligraph-blocks-components-image__panel-body",
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Couleur du texte", "deligraph-blocks"),
|
||||
children: hasBackgroundColor && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ColorPalette, {
|
||||
colors: colors,
|
||||
value: textColor,
|
||||
onChange: onTextColorChange
|
||||
})
|
||||
})
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: `content-card ${hasLightBackground ? "content-card--bg-light" : "content-card--bg-dark"}`,
|
||||
style: {
|
||||
"--content-card-text-color": textColor !== null && textColor !== void 0 ? textColor : "inherit",
|
||||
"--content-card-background-color": hasBackgroundColor ? backgroundColor : "transparent"
|
||||
}
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
className: "content-card__innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||
template: [["core/paragraph", {
|
||||
placeholder: "Ajouter ici le texte"
|
||||
}]],
|
||||
allowedBlocks: ["core/heading", "core/paragraph", "core/group", "core/list", "core/button", "core/buttons", "carhop-blocks/heading", "carhop-blocks/cta-group"]
|
||||
})
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/content-card/editor.scss":
|
||||
/*!**************************************!*\
|
||||
!*** ./src/content-card/editor.scss ***!
|
||||
\**************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/content-card/index.js":
|
||||
/*!***********************************!*\
|
||||
!*** ./src/content-card/index.js ***!
|
||||
\***********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/content-card/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/content-card/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/content-card/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/content-card/block.json");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
icon: {
|
||||
foreground: "#136f63",
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||
width: "18",
|
||||
height: "18",
|
||||
viewBox: "0 0 18 18",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("g", {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
d: "M1,5c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM3,0H1C.4,0,0,.4,0,1v2c0,.6.4,1,1,1s1-.4,1-1v-1h1c.6,0,1-.4,1-1s-.4-1-1-1ZM6,2h2c.6,0,1-.4,1-1s-.4-1-1-1h-2c-.6,0-1,.4-1,1s.4,1,1,1ZM1,10c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM6,7v4c0,.6.4,1,1,1h4c.6,0,1-.4,1-1v-4c0-.6-.4-1-1-1h-4c-.6,0-1,.4-1,1ZM12,16h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1ZM17,9c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM17,4c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM17,14c-.6,0-1,.4-1,1v1h-1c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1v-2c0-.6-.4-1-1-1ZM7,16h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1ZM13,0h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1Z"
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/content-card/save.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/content-card/save.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _utilities_utilities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_utilities/utilities */ "./_utilities/utilities.js");
|
||||
/* 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({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
backgroundColor,
|
||||
textColor,
|
||||
hasLightBackground,
|
||||
hasBackgroundColor
|
||||
} = attributes;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||
className: `content-card ${hasLightBackground ? "content-card--bg-light" : "content-card--bg-dark"}`,
|
||||
style: {
|
||||
"--content-card-text-color": textColor !== null && textColor !== void 0 ? textColor : "inherit",
|
||||
"--content-card-background-color": hasBackgroundColor ? backgroundColor : "transparent"
|
||||
}
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
|
||||
className: "content-card__innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/content-card/style.scss":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/content-card/style.scss ***!
|
||||
\*************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/components":
|
||||
/*!************************************!*\
|
||||
!*** external ["wp","components"] ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "content-card/index": 0,
|
||||
/******/ "content-card/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["content-card/style-index"], () => (__webpack_require__("./src/content-card/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var o,r={2921:()=>{const o=window.wp.blocks,r=window.wp.i18n,e=window.wp.blockEditor,c=window.wp.components,n=window.ReactJSXRuntime,t=JSON.parse('{"UU":"carhop-blocks/content-card"}');(0,o.registerBlockType)(t.UU,{icon:{foreground:"#136f63",src:(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M1,5c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM3,0H1C.4,0,0,.4,0,1v2c0,.6.4,1,1,1s1-.4,1-1v-1h1c.6,0,1-.4,1-1s-.4-1-1-1ZM6,2h2c.6,0,1-.4,1-1s-.4-1-1-1h-2c-.6,0-1,.4-1,1s.4,1,1,1ZM1,10c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM6,7v4c0,.6.4,1,1,1h4c.6,0,1-.4,1-1v-4c0-.6-.4-1-1-1h-4c-.6,0-1,.4-1,1ZM12,16h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1ZM17,9c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM17,4c-.6,0-1,.4-1,1v2c0,.6.4,1,1,1s1-.4,1-1v-2c0-.6-.4-1-1-1ZM17,14c-.6,0-1,.4-1,1v1h-1c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1v-2c0-.6-.4-1-1-1ZM7,16h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1ZM13,0h-2c-.6,0-1,.4-1,1s.4,1,1,1h2c.6,0,1-.4,1-1s-.4-1-1-1Z"})})})},edit:function({attributes:o,setAttributes:t,...s}){const a=(0,e.useSetting)("color.palette.theme"),{hasBackgroundColor:l,backgroundColor:i,textColor:d,hasLightBackground:h}=o;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.InspectorControls,{children:[(0,n.jsxs)(c.PanelBody,{className:"deligraph-blocks-components-image__panel-body",title:(0,r.__)("Arrière plan","deligraph-blocks"),children:[(0,n.jsx)(c.CheckboxControl,{label:"Arrière plan coloré",checked:l,onChange:function(o){t({hasBackgroundColor:o}),o||t({backgroundColor:null})}}),l&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(c.ColorPalette,{colors:a,value:i,onChange:function(o){void 0===o&&(t({hasBackgroundColor:!1}),t({backgroundColor:"transparent"}));const r=function(o){if(!o)return!0;let r=o.replace("#","");return 3===r.length&&(r=r.split("").map(o=>o+o).join("")),(.299*parseInt(r.substr(0,2),16)+.587*parseInt(r.substr(2,2),16)+.114*parseInt(r.substr(4,2),16))/255>.5}(i);t({hasLightBackground:r}),t({backgroundColor:o})}})})]}),(0,n.jsx)(c.PanelBody,{className:"deligraph-blocks-components-image__panel-body",title:(0,r.__)("Couleur du texte","deligraph-blocks"),children:l&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(c.ColorPalette,{colors:a,value:d,onChange:function(o){t({textColor:o})}})})})]}),(0,n.jsx)("div",{...(0,e.useBlockProps)({className:"content-card "+(h?"content-card--bg-light":"content-card--bg-dark"),style:{"--content-card-text-color":null!=d?d:"inherit","--content-card-background-color":l?i:"transparent"}}),children:(0,n.jsx)("div",{className:"content-card__innerblocks",children:(0,n.jsx)(e.InnerBlocks,{template:[["core/paragraph",{placeholder:"Ajouter ici le texte"}]],allowedBlocks:["core/heading","core/paragraph","core/group","core/list","core/button","core/buttons","carhop-blocks/heading","carhop-blocks/cta-group"]})})})]})},save:function({attributes:o}){const{backgroundColor:r,textColor:c,hasLightBackground:t,hasBackgroundColor:s}=o;return(0,n.jsx)("div",{...e.useBlockProps.save({className:"content-card "+(t?"content-card--bg-light":"content-card--bg-dark"),style:{"--content-card-text-color":null!=c?c:"inherit","--content-card-background-color":s?r:"transparent"}}),children:(0,n.jsx)("div",{className:"content-card__innerblocks",children:(0,n.jsx)(e.InnerBlocks.Content,{})})})}})}},e={};function c(o){var n=e[o];if(void 0!==n)return n.exports;var t=e[o]={exports:{}};return r[o](t,t.exports,c),t.exports}c.m=r,o=[],c.O=(r,e,n,t)=>{if(!e){var s=1/0;for(d=0;d<o.length;d++){for(var[e,n,t]=o[d],a=!0,l=0;l<e.length;l++)(!1&t||s>=t)&&Object.keys(c.O).every(o=>c.O[o](e[l]))?e.splice(l--,1):(a=!1,t<s&&(s=t));if(a){o.splice(d--,1);var i=n();void 0!==i&&(r=i)}}return r}t=t||0;for(var d=o.length;d>0&&o[d-1][2]>t;d--)o[d]=o[d-1];o[d]=[e,n,t]},c.o=(o,r)=>Object.prototype.hasOwnProperty.call(o,r),(()=>{var o={892:0,7684:0};c.O.j=r=>0===o[r];var r=(r,e)=>{var n,t,[s,a,l]=e,i=0;if(s.some(r=>0!==o[r])){for(n in a)c.o(a,n)&&(c.m[n]=a[n]);if(l)var d=l(c)}for(r&&r(e);i<s.length;i++)t=s[i],c.o(o,t)&&o[t]&&o[t][0](),o[t]=0;return c.O(d)},e=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];e.forEach(r.bind(null,0)),e.push=r.bind(null,e.push.bind(e))})();var n=c.O(void 0,[7684],()=>c(2921));n=c.O(n)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,31 +1 @@
|
|||
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/content-card/style.scss ***!
|
||||
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.content-card {
|
||||
word-break: break-word;
|
||||
}
|
||||
.content-card h1.wp-block-heading,
|
||||
.content-card h2.wp-block-heading,
|
||||
.content-card h3.wp-block-heading,
|
||||
.content-card h4.wp-block-heading,
|
||||
.content-card h5.wp-block-heading,
|
||||
.content-card h6.wp-block-heading {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 1.25rem;
|
||||
text-transform: uppercase;
|
||||
font-weight: 700;
|
||||
color: var(--content-card-text-color);
|
||||
}
|
||||
.content-card *,
|
||||
.content-card p {
|
||||
color: var(--content-card-text-color);
|
||||
}
|
||||
.content-card li {
|
||||
list-style: disc;
|
||||
margin-left: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.content-card{word-break:break-word}.content-card h1.wp-block-heading,.content-card h2.wp-block-heading,.content-card h3.wp-block-heading,.content-card h4.wp-block-heading,.content-card h5.wp-block-heading,.content-card h6.wp-block-heading{color:var(--content-card-text-color);font-size:1.25rem;font-weight:700;margin-bottom:0;margin-top:0;text-transform:uppercase}.content-card *,.content-card p{color:var(--content-card-text-color)}.content-card li{font-weight:300;list-style:disc;margin-bottom:.5rem;margin-left:1rem}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"content-card/style-index.css","mappings":";;;AAAA;EACC;AACD;AACC;;;;;;EAMC;EACA;EACA;EACA;EACA;EACA;AACF;AACC;;EAEC;AACF;AAEC;EACC;EACA;EACA;EACA;AAAF,C","sources":["webpack://carhop-blocks/./src/content-card/style.scss"],"sourcesContent":[".content-card {\r\n\tword-break: break-word;\r\n\r\n\th1.wp-block-heading,\r\n\th2.wp-block-heading,\r\n\th3.wp-block-heading,\r\n\th4.wp-block-heading,\r\n\th5.wp-block-heading,\r\n\th6.wp-block-heading {\r\n\t\tmargin-top: 0;\r\n\t\tmargin-bottom: 0;\r\n\t\tfont-size: 1.25rem;\r\n\t\ttext-transform: uppercase;\r\n\t\tfont-weight: 700;\r\n\t\tcolor: var(--content-card-text-color);\r\n\t}\r\n\t*,\r\n\tp {\r\n\t\tcolor: var(--content-card-text-color);\r\n\t}\r\n\r\n\tli {\r\n\t\tlist-style: disc;\r\n\t\tmargin-left: 1rem;\r\n\t\tmargin-bottom: 0.5rem;\r\n\t\tfont-weight: 300;\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!**********************************!*\
|
||||
!*** ./src/content-card/view.js ***!
|
||||
\**********************************/
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
|
|
@ -1,4 +1 @@
|
|||
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/decorative-shapes/editor.scss ***!
|
||||
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,526 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/decorative-shapes/Shapes.jsx":
|
||||
/*!******************************************!*\
|
||||
!*** ./src/decorative-shapes/Shapes.jsx ***!
|
||||
\******************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Shapes)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
function Shapes() {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "decorative-shapes__shape circle",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
||||
width: "24.177",
|
||||
height: "24.177",
|
||||
viewBox: "-0.088 -0.088 24.177 24.177",
|
||||
fill: "none",
|
||||
version: "1.1",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ellipse", {
|
||||
cx: "11.999999999999773",
|
||||
cy: "11.999999999999261",
|
||||
rx: "11.999999999999773",
|
||||
ry: "11.999999999999261",
|
||||
style: {
|
||||
fill: "rgb(255, 166, 48)",
|
||||
fillOpacity: 1,
|
||||
stroke: "none"
|
||||
}
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "decorative-shapes__shape losange",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
||||
width: "30.998",
|
||||
height: "30.996",
|
||||
id: "screenshot-a2556a6c-3214-8099-8006-165931dde038",
|
||||
viewBox: "-4.54 -4.539 30.998 30.996",
|
||||
fill: "none",
|
||||
version: "1.1",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||||
width: "21.9185463932713",
|
||||
height: "21.918546393260385",
|
||||
className: "cls-1",
|
||||
x: "0",
|
||||
transform: "matrix(0.701889, 0.712286, -0.712333, 0.701842, 11.073723, -4.538540)",
|
||||
style: {
|
||||
fill: "rgb(10, 211, 255)",
|
||||
fillOpacity: 1,
|
||||
stroke: "none"
|
||||
},
|
||||
ry: "0",
|
||||
rx: "0",
|
||||
y: "0"
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "decorative-shapes__shape rectangle-vertical",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
||||
width: "20.236",
|
||||
height: "32.147",
|
||||
id: "screenshot-a2556a6c-3214-8099-8006-165931dde043",
|
||||
viewBox: "-0.118 -0.073 20.236 32.147",
|
||||
fill: "none",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||||
width: "19.99999999999875",
|
||||
height: "31.99999999999534",
|
||||
className: "cls-1",
|
||||
x: "0",
|
||||
transform: "matrix(0.999973, 0.007385, -0.007385, 0.999973, 0.118427, -0.073410)",
|
||||
style: {
|
||||
fill: "rgb(174, 33, 84)",
|
||||
fillOpacity: 1,
|
||||
stroke: "none"
|
||||
},
|
||||
ry: "0",
|
||||
rx: "0",
|
||||
y: "0"
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "decorative-shapes__shape rectangle-rotated",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
||||
width: "33.243",
|
||||
height: "33.243",
|
||||
viewBox: "-0.121 -0.121 33.243 33.243",
|
||||
fill: "none",
|
||||
version: "1.1",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||||
width: "28.870975068950884",
|
||||
height: "17.792708437504757",
|
||||
className: "cls-1",
|
||||
x: "2.0645861314221747",
|
||||
transform: "matrix(0.712339, -0.701836, 0.701896, 0.712280, -6.833029, 16.326982)",
|
||||
style: {
|
||||
fill: "rgb(214, 195, 255)",
|
||||
fillOpacity: 1,
|
||||
stroke: "none"
|
||||
},
|
||||
ry: "0",
|
||||
rx: "0",
|
||||
y: "7.601056546915743"
|
||||
})
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decorative-shapes/block.json":
|
||||
/*!******************************************!*\
|
||||
!*** ./src/decorative-shapes/block.json ***!
|
||||
\******************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/decorative-shapes","version":"0.1.0","title":"Formes décoratives ","category":"carhop-blocks","icon":"smiley","description":"Formes décoratives du carhop","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":{"variant":{"type":"string","default":"medium"}}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decorative-shapes/edit.js":
|
||||
/*!***************************************!*\
|
||||
!*** ./src/decorative-shapes/edit.js ***!
|
||||
\***************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/decorative-shapes/editor.scss");
|
||||
/* harmony import */ var _Shapes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Shapes */ "./src/decorative-shapes/Shapes.jsx");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* 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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
const {
|
||||
variant
|
||||
} = attributes;
|
||||
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__.InspectorControls, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Shapes", "carhop-blocks"),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalToggleGroupControl, {
|
||||
className: "deligraph-blocks__variant",
|
||||
isBlock: true,
|
||||
label: "Variante",
|
||||
onChange: value => setAttributes({
|
||||
variant: value
|
||||
}),
|
||||
value: variant,
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalToggleGroupControlOption, {
|
||||
label: "Medium",
|
||||
value: "medium"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalToggleGroupControlOption, {
|
||||
label: "Big",
|
||||
value: "big"
|
||||
})]
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: `carhop-decorative-shapes decorative-shapes decorative-shapes--${variant}`
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_Shapes__WEBPACK_IMPORTED_MODULE_3__["default"], {})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decorative-shapes/editor.scss":
|
||||
/*!*******************************************!*\
|
||||
!*** ./src/decorative-shapes/editor.scss ***!
|
||||
\*******************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decorative-shapes/index.js":
|
||||
/*!****************************************!*\
|
||||
!*** ./src/decorative-shapes/index.js ***!
|
||||
\****************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/decorative-shapes/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/decorative-shapes/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/decorative-shapes/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/decorative-shapes/block.json");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
icon: {
|
||||
foreground: "#136f63",
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||
width: "100",
|
||||
height: "100",
|
||||
viewBox: "0 0 100 100",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("g", {
|
||||
stroke: "null",
|
||||
id: "svg_10",
|
||||
class: "fills",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
stroke: "null",
|
||||
d: "m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decorative-shapes/save.js":
|
||||
/*!***************************************!*\
|
||||
!*** ./src/decorative-shapes/save.js ***!
|
||||
\***************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _Shapes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Shapes */ "./src/decorative-shapes/Shapes.jsx");
|
||||
/* 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({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
variant
|
||||
} = attributes;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||
className: `carhop-decorative-shapes decorative-shapes decorative-shapes--${variant} ${variant === "big" ? "alignfull" : ""}`
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Shapes__WEBPACK_IMPORTED_MODULE_1__["default"], {})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decorative-shapes/style.scss":
|
||||
/*!******************************************!*\
|
||||
!*** ./src/decorative-shapes/style.scss ***!
|
||||
\******************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/components":
|
||||
/*!************************************!*\
|
||||
!*** external ["wp","components"] ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react":
|
||||
/*!************************!*\
|
||||
!*** external "React" ***!
|
||||
\************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["React"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "decorative-shapes/index": 0,
|
||||
/******/ "decorative-shapes/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["decorative-shapes/style-index"], () => (__webpack_require__("./src/decorative-shapes/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var e,s={7552:()=>{const e=window.wp.blocks,s=window.wp.i18n,r=window.wp.blockEditor,i=(window.React,window.ReactJSXRuntime);function l(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"decorative-shapes__shape circle",children:(0,i.jsx)("svg",{width:"24.177",height:"24.177",viewBox:"-0.088 -0.088 24.177 24.177",fill:"none",version:"1.1",children:(0,i.jsx)("ellipse",{cx:"11.999999999999773",cy:"11.999999999999261",rx:"11.999999999999773",ry:"11.999999999999261",style:{fill:"rgb(255, 166, 48)",fillOpacity:1,stroke:"none"}})})}),(0,i.jsx)("div",{className:"decorative-shapes__shape losange",children:(0,i.jsx)("svg",{width:"30.998",height:"30.996",id:"screenshot-a2556a6c-3214-8099-8006-165931dde038",viewBox:"-4.54 -4.539 30.998 30.996",fill:"none",version:"1.1",children:(0,i.jsx)("rect",{width:"21.9185463932713",height:"21.918546393260385",className:"cls-1",x:"0",transform:"matrix(0.701889, 0.712286, -0.712333, 0.701842, 11.073723, -4.538540)",style:{fill:"rgb(10, 211, 255)",fillOpacity:1,stroke:"none"},ry:"0",rx:"0",y:"0"})})}),(0,i.jsx)("div",{className:"decorative-shapes__shape rectangle-vertical",children:(0,i.jsx)("svg",{width:"20.236",height:"32.147",id:"screenshot-a2556a6c-3214-8099-8006-165931dde043",viewBox:"-0.118 -0.073 20.236 32.147",fill:"none",children:(0,i.jsx)("rect",{width:"19.99999999999875",height:"31.99999999999534",className:"cls-1",x:"0",transform:"matrix(0.999973, 0.007385, -0.007385, 0.999973, 0.118427, -0.073410)",style:{fill:"rgb(174, 33, 84)",fillOpacity:1,stroke:"none"},ry:"0",rx:"0",y:"0"})})}),(0,i.jsx)("div",{className:"decorative-shapes__shape rectangle-rotated",children:(0,i.jsx)("svg",{width:"33.243",height:"33.243",viewBox:"-0.121 -0.121 33.243 33.243",fill:"none",version:"1.1",children:(0,i.jsx)("rect",{width:"28.870975068950884",height:"17.792708437504757",className:"cls-1",x:"2.0645861314221747",transform:"matrix(0.712339, -0.701836, 0.701896, 0.712280, -6.833029, 16.326982)",style:{fill:"rgb(214, 195, 255)",fillOpacity:1,stroke:"none"},ry:"0",rx:"0",y:"7.601056546915743"})})})]})}const a=window.wp.components,t=JSON.parse('{"UU":"carhop-blocks/decorative-shapes"}');(0,e.registerBlockType)(t.UU,{icon:{foreground:"#136f63",src:(0,i.jsx)("svg",{width:"100",height:"100",viewBox:"0 0 100 100",children:(0,i.jsx)("g",{stroke:"null",id:"svg_10",class:"fills",children:(0,i.jsx)("path",{stroke:"null",d:"m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"})})})},edit:function({attributes:e,setAttributes:t}){const{variant:o}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.InspectorControls,{children:(0,i.jsx)(a.PanelBody,{title:(0,s.__)("Shapes","carhop-blocks"),children:(0,i.jsxs)(a.__experimentalToggleGroupControl,{className:"deligraph-blocks__variant",isBlock:!0,label:"Variante",onChange:e=>t({variant:e}),value:o,children:[(0,i.jsx)(a.__experimentalToggleGroupControlOption,{label:"Medium",value:"medium"}),(0,i.jsx)(a.__experimentalToggleGroupControlOption,{label:"Big",value:"big"})]})})}),(0,i.jsx)("div",{...(0,r.useBlockProps)({className:`carhop-decorative-shapes decorative-shapes decorative-shapes--${o}`}),children:(0,i.jsx)(l,{})})]})},save:function({attributes:e}){const{variant:s}=e;return(0,i.jsx)("div",{...r.useBlockProps.save({className:`carhop-decorative-shapes decorative-shapes decorative-shapes--${s} ${"big"===s?"alignfull":""}`}),children:(0,i.jsx)(l,{})})}})}},r={};function i(e){var l=r[e];if(void 0!==l)return l.exports;var a=r[e]={exports:{}};return s[e](a,a.exports,i),a.exports}i.m=s,e=[],i.O=(s,r,l,a)=>{if(!r){var t=1/0;for(h=0;h<e.length;h++){for(var[r,l,a]=e[h],o=!0,n=0;n<r.length;n++)(!1&a||t>=a)&&Object.keys(i.O).every(e=>i.O[e](r[n]))?r.splice(n--,1):(o=!1,a<t&&(t=a));if(o){e.splice(h--,1);var c=l();void 0!==c&&(s=c)}}return s}a=a||0;for(var h=e.length;h>0&&e[h-1][2]>a;h--)e[h]=e[h-1];e[h]=[r,l,a]},i.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={7709:0,2401:0};i.O.j=s=>0===e[s];var s=(s,r)=>{var l,a,[t,o,n]=r,c=0;if(t.some(s=>0!==e[s])){for(l in o)i.o(o,l)&&(i.m[l]=o[l]);if(n)var h=n(i)}for(s&&s(r);c<t.length;c++)a=t[c],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return i.O(h)},r=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];r.forEach(s.bind(null,0)),r.push=s.bind(null,r.push.bind(r))})();var l=i.O(void 0,[2401],()=>i(7552));l=i.O(l)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,35 +1 @@
|
|||
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/decorative-shapes/style.scss ***!
|
||||
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.decorative-shapes {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
justify-content: center;
|
||||
gap: 10rem;
|
||||
}
|
||||
.decorative-shapes__shape svg {
|
||||
width: 100%;
|
||||
max-width: 200px;
|
||||
height: auto;
|
||||
aspect-ratio: 1/1;
|
||||
-o-object-fit: contain;
|
||||
object-fit: contain;
|
||||
}
|
||||
.decorative-shapes--big {
|
||||
padding: 0rem 2rem;
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6rem;
|
||||
}
|
||||
.decorative-shapes--big .decorative-shapes__shape {
|
||||
display: block;
|
||||
width: 100vw;
|
||||
max-width: 250px;
|
||||
}
|
||||
.decorative-shapes--big .decorative-shapes__shape svg {
|
||||
max-width: 800px;
|
||||
max-height: 800px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.decorative-shapes{display:grid;gap:10rem;grid-template-columns:repeat(4,1fr);justify-content:center}.decorative-shapes__shape svg{aspect-ratio:1/1;height:auto;max-width:200px;-o-object-fit:contain;object-fit:contain;width:100%}.decorative-shapes--big{align-items:center;display:flex!important;gap:6rem;justify-content:center;padding:0 2rem}.decorative-shapes--big .decorative-shapes__shape{display:block;max-width:250px;width:100vw}.decorative-shapes--big .decorative-shapes__shape svg{max-height:800px;max-width:800px}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"decorative-shapes/style-index.css","mappings":";;;AAAA;EACC;EACA;EACA;EACA;AACD;AAME;EAEC;EACA;EACA;EACA;EACA;KAAA;AALH;AASC;EACC;EACA;EACA;EACA;EACA;AAPF;AASE;EACC;EACA;EACA;AAPH;AAQG;EACC;EACA;AANJ,C","sources":["webpack://carhop-blocks/./src/decorative-shapes/style.scss"],"sourcesContent":[".decorative-shapes {\r\n\tdisplay: grid;\r\n\tgrid-template-columns: repeat(4, 1fr);\r\n\tjustify-content: center;\r\n\tgap: 10rem;\r\n\r\n\t&__shape {\r\n\t\t// background-color: red;\r\n\t\t// display: flex;\r\n\t\t// align-items: center;\r\n\t\t// justify-content: center;\r\n\t\tsvg {\r\n\t\t\t// background-color: blue;\r\n\t\t\twidth: 100%;\r\n\t\t\tmax-width: 200px;\r\n\t\t\theight: auto;\r\n\t\t\taspect-ratio: 1/1;\r\n\t\t\tobject-fit: contain;\r\n\t\t}\r\n\t}\r\n\r\n\t&--big {\r\n\t\tpadding: 0rem 2rem;\r\n\t\tdisplay: flex !important;\r\n\t\talign-items: center;\r\n\t\tjustify-content: center;\r\n\t\tgap: 6rem;\r\n\r\n\t\t.decorative-shapes__shape {\r\n\t\t\tdisplay: block;\r\n\t\t\twidth: 100vw;\r\n\t\t\tmax-width: 250px;\r\n\t\t\tsvg {\r\n\t\t\t\tmax-width: 800px;\r\n\t\t\t\tmax-height: 800px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!***************************************!*\
|
||||
!*** ./src/decorative-shapes/view.js ***!
|
||||
\***************************************/
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
|
|
@ -1,286 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/decouvrez-prochainement/src/decouvrez-prochainement/block.json":
|
||||
/*!****************************************************************************!*\
|
||||
!*** ./src/decouvrez-prochainement/src/decouvrez-prochainement/block.json ***!
|
||||
\****************************************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/decouvrez-prochainement","version":"0.1.0","title":"Découvrez Prochainement","category":"carhop-blocks","icon":"smiley","description":"Découvrez les prochaines parutions de la revue Dynamiques.","example":{},"supports":{"html":false},"textdomain":"localisation-map","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php"}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decouvrez-prochainement/src/decouvrez-prochainement/edit.js":
|
||||
/*!*************************************************************************!*\
|
||||
!*** ./src/decouvrez-prochainement/src/decouvrez-prochainement/edit.js ***!
|
||||
\*************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
|
||||
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var 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 Edit(props) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)(),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_0___default()), {
|
||||
block: "carhop-blocks/decouvrez-prochainement",
|
||||
attributes: props.attributes
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decouvrez-prochainement/src/decouvrez-prochainement/index.js":
|
||||
/*!**************************************************************************!*\
|
||||
!*** ./src/decouvrez-prochainement/src/decouvrez-prochainement/index.js ***!
|
||||
\**************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/decouvrez-prochainement/src/decouvrez-prochainement/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/decouvrez-prochainement/src/decouvrez-prochainement/edit.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/decouvrez-prochainement/src/decouvrez-prochainement/block.json");
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, {
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/decouvrez-prochainement/src/decouvrez-prochainement/style.scss":
|
||||
/*!****************************************************************************!*\
|
||||
!*** ./src/decouvrez-prochainement/src/decouvrez-prochainement/style.scss ***!
|
||||
\****************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/server-side-render":
|
||||
/*!******************************************!*\
|
||||
!*** external ["wp","serverSideRender"] ***!
|
||||
\******************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["serverSideRender"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "decouvrez-prochainement/src/decouvrez-prochainement/index": 0,
|
||||
/******/ "decouvrez-prochainement/src/decouvrez-prochainement/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["decouvrez-prochainement/src/decouvrez-prochainement/style-index"], () => (__webpack_require__("./src/decouvrez-prochainement/src/decouvrez-prochainement/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var r,e={2242:(r,e,o)=>{const t=window.wp.blocks,n=window.wp.serverSideRender;var i=o.n(n);const a=window.wp.blockEditor,c=window.ReactJSXRuntime,s=JSON.parse('{"UU":"carhop-blocks/decouvrez-prochainement"}');(0,t.registerBlockType)(s.UU,{edit:function(r){return(0,c.jsx)("div",{...(0,a.useBlockProps)(),children:(0,c.jsx)(i(),{block:"carhop-blocks/decouvrez-prochainement",attributes:r.attributes})})}})}},o={};function t(r){var n=o[r];if(void 0!==n)return n.exports;var i=o[r]={exports:{}};return e[r](i,i.exports,t),i.exports}t.m=e,r=[],t.O=(e,o,n,i)=>{if(!o){var a=1/0;for(p=0;p<r.length;p++){for(var[o,n,i]=r[p],c=!0,s=0;s<o.length;s++)(!1&i||a>=i)&&Object.keys(t.O).every(r=>t.O[r](o[s]))?o.splice(s--,1):(c=!1,i<a&&(a=i));if(c){r.splice(p--,1);var l=n();void 0!==l&&(e=l)}}return e}i=i||0;for(var p=r.length;p>0&&r[p-1][2]>i;p--)r[p]=r[p-1];r[p]=[o,n,i]},t.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return t.d(e,{a:e}),e},t.d=(r,e)=>{for(var o in e)t.o(e,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={9394:0,7638:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var n,i,[a,c,s]=o,l=0;if(a.some(e=>0!==r[e])){for(n in c)t.o(c,n)&&(t.m[n]=c[n]);if(s)var p=s(t)}for(e&&e(o);l<a.length;l++)i=a[l],t.o(r,i)&&r[i]&&r[i][0](),r[i]=0;return t.O(p)},o=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var n=t.O(void 0,[7638],()=>t(2242));n=t.O(n)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,25 +1 @@
|
|||
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/decouvrez-prochainement/src/decouvrez-prochainement/style.scss ***!
|
||||
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.carhop-localisation-map .map-container a:after {
|
||||
content: none !important;
|
||||
}
|
||||
.carhop-localisation-map .map-container {
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
background-color: var(--wp--preset--color--primary);
|
||||
overflow: hidden;
|
||||
}
|
||||
.carhop-localisation-map .map-container:not([data-initialized=true]) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
}
|
||||
.carhop-localisation-map .map-container:not([data-initialized=true])::before {
|
||||
content: "Chargement de la carte...";
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.carhop-localisation-map .map-container a:after{content:none!important}.carhop-localisation-map .map-container{background-color:var(--wp--preset--color--primary);height:500px;margin:0 auto;max-width:1200px;overflow:hidden;width:100%}.carhop-localisation-map .map-container:not([data-initialized=true]){align-items:center;color:#fff;display:flex;justify-content:center}.carhop-localisation-map .map-container:not([data-initialized=true]):before{content:"Chargement de la carte..."}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"decouvrez-prochainement/src/decouvrez-prochainement/style-index.css","mappings":";;;AAEE;EACC;AADH;AADC;EAIC;EACA;EACA;EACA;EACA;EACA;AAAF;AAGE;EACC;EACA;EACA;EACA;AADH;AAGG;EACC;AADJ,C","sources":["webpack://carhop-blocks/./src/decouvrez-prochainement/src/decouvrez-prochainement/style.scss"],"sourcesContent":[".carhop-localisation-map {\n\t.map-container {\n\t\ta:after {\n\t\t\tcontent: none !important;\n\t\t}\n\t\tmargin: 0 auto;\n\t\tmax-width: 1200px;\n\t\twidth: 100%;\n\t\theight: 500px;\n\t\tbackground-color: var(--wp--preset--color--primary);\n\t\toverflow: hidden;\n\n\t\t// Loading state\n\t\t&:not([data-initialized=\"true\"]) {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tcolor: white;\n\n\t\t\t&::before {\n\t\t\t\tcontent: \"Chargement de la carte...\";\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,4 +1 @@
|
|||
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/document-card/editor.scss ***!
|
||||
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1 @@
|
|||
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/document-card/style.scss ***!
|
||||
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1 @@
|
|||
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/explore-tags/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-explore-tags {
|
||||
border: 1px dotted #f00;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
.wp-block-create-block-explore-tags{border:1px dotted red}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"explore-tags/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://carhop-blocks/./src/explore-tags/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-explore-tags {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,358 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/explore-tags/block.json":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/explore-tags/block.json ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/explore-tags","version":"0.1.0","title":"Explore Tags","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php"}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/explore-tags/edit.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/explore-tags/edit.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
|
||||
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/explore-tags/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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit(props) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: "alignfull"
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2___default()), {
|
||||
block: "carhop-blocks/explore-tags",
|
||||
attributes: props.attributes
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/explore-tags/editor.scss":
|
||||
/*!**************************************!*\
|
||||
!*** ./src/explore-tags/editor.scss ***!
|
||||
\**************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/explore-tags/index.js":
|
||||
/*!***********************************!*\
|
||||
!*** ./src/explore-tags/index.js ***!
|
||||
\***********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/explore-tags/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/explore-tags/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/explore-tags/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/explore-tags/block.json");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
icon: {
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||
width: "100",
|
||||
height: "100",
|
||||
viewBox: "0 0 100 100",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("g", {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
d: "m93.4586,23.83625l1.57497,18.94503l0,0.00408c0.24482,2.87252 -0.79157,5.71244 -2.83168,7.75256l-41.89592,41.89592c-0.13057,0.13057 -0.2693,0.26114 -0.40802,0.38355l8.20548,4.73307c3.51721,2.02789 8.00962,0.82421 10.04159,-2.68888l29.6308,-51.32613c1.08539,-1.86881 1.28532,-4.12514 0.55492,-6.16118l-4.87213,-13.53802z"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
d: "m89.93323,10.8859c-0.2897,-3.58657 -3.13365,-6.43047 -6.71615,-6.71615l-32.10325,-2.67666c-0.20401,-0.01633 -0.40802,-0.02448 -0.61204,-0.02448l0,-0.00407c-1.94631,0 -3.81502,0.77526 -5.19017,2.15439l-41.91263,41.90428l-0.00408,0c-1.37912,1.37912 -2.15846,3.252 -2.15846,5.20239c0,1.95039 0.77933,3.82327 2.15846,5.20239l34.77626,34.7679c2.87252,2.87252 7.53216,2.87252 10.40467,0l41.9001,-41.9001c1.53006,-1.53006 2.3094,-3.65186 2.12587,-5.80624l-2.66857,-32.10363zm-10.6492,13.01616c-2.36654,2.35839 -6.06738,2.72565 -8.8461,0.8691s-3.85586,-5.41861 -2.57879,-8.50735c1.28125,-3.08467 4.56177,-4.8392 7.83821,-4.18635c3.27645,0.65284 5.63483,3.52944 5.63483,6.86709l0,0.00408c0.00816,1.85648 -0.73037,3.63964 -2.04826,4.95347l0.0001,-0.00004z"
|
||||
})]
|
||||
})
|
||||
}),
|
||||
foreground: "#136f63"
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/explore-tags/save.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/explore-tags/save.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
function save() {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, {});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/explore-tags/style.scss":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/explore-tags/style.scss ***!
|
||||
\*************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/server-side-render":
|
||||
/*!******************************************!*\
|
||||
!*** external ["wp","serverSideRender"] ***!
|
||||
\******************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["serverSideRender"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "explore-tags/index": 0,
|
||||
/******/ "explore-tags/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["explore-tags/style-index"], () => (__webpack_require__("./src/explore-tags/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var r,e={7701:(r,e,o)=>{const l=window.wp.blocks,c=(window.wp.i18n,window.wp.blockEditor),t=window.wp.serverSideRender;var n=o.n(t);const s=window.ReactJSXRuntime,i=JSON.parse('{"UU":"carhop-blocks/explore-tags"}');(0,l.registerBlockType)(i.UU,{icon:{src:(0,s.jsx)("svg",{width:"100",height:"100",viewBox:"0 0 100 100",children:(0,s.jsxs)("g",{children:[(0,s.jsx)("path",{d:"m93.4586,23.83625l1.57497,18.94503l0,0.00408c0.24482,2.87252 -0.79157,5.71244 -2.83168,7.75256l-41.89592,41.89592c-0.13057,0.13057 -0.2693,0.26114 -0.40802,0.38355l8.20548,4.73307c3.51721,2.02789 8.00962,0.82421 10.04159,-2.68888l29.6308,-51.32613c1.08539,-1.86881 1.28532,-4.12514 0.55492,-6.16118l-4.87213,-13.53802z"}),(0,s.jsx)("path",{d:"m89.93323,10.8859c-0.2897,-3.58657 -3.13365,-6.43047 -6.71615,-6.71615l-32.10325,-2.67666c-0.20401,-0.01633 -0.40802,-0.02448 -0.61204,-0.02448l0,-0.00407c-1.94631,0 -3.81502,0.77526 -5.19017,2.15439l-41.91263,41.90428l-0.00408,0c-1.37912,1.37912 -2.15846,3.252 -2.15846,5.20239c0,1.95039 0.77933,3.82327 2.15846,5.20239l34.77626,34.7679c2.87252,2.87252 7.53216,2.87252 10.40467,0l41.9001,-41.9001c1.53006,-1.53006 2.3094,-3.65186 2.12587,-5.80624l-2.66857,-32.10363zm-10.6492,13.01616c-2.36654,2.35839 -6.06738,2.72565 -8.8461,0.8691s-3.85586,-5.41861 -2.57879,-8.50735c1.28125,-3.08467 4.56177,-4.8392 7.83821,-4.18635c3.27645,0.65284 5.63483,3.52944 5.63483,6.86709l0,0.00408c0.00816,1.85648 -0.73037,3.63964 -2.04826,4.95347l0.0001,-0.00004z"})]})}),foreground:"#136f63"},edit:function(r){return(0,s.jsx)("div",{...(0,c.useBlockProps)({className:"alignfull"}),children:(0,s.jsx)(n(),{block:"carhop-blocks/explore-tags",attributes:r.attributes})})},save:function(){return(0,s.jsx)(s.Fragment,{})}})}},o={};function l(r){var c=o[r];if(void 0!==c)return c.exports;var t=o[r]={exports:{}};return e[r](t,t.exports,l),t.exports}l.m=e,r=[],l.O=(e,o,c,t)=>{if(!o){var n=1/0;for(p=0;p<r.length;p++){for(var[o,c,t]=r[p],s=!0,i=0;i<o.length;i++)(!1&t||n>=t)&&Object.keys(l.O).every(r=>l.O[r](o[i]))?o.splice(i--,1):(s=!1,t<n&&(n=t));if(s){r.splice(p--,1);var a=c();void 0!==a&&(e=a)}}return e}t=t||0;for(var p=r.length;p>0&&r[p-1][2]>t;p--)r[p]=r[p-1];r[p]=[o,c,t]},l.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return l.d(e,{a:e}),e},l.d=(r,e)=>{for(var o in e)l.o(e,o)&&!l.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},l.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={5939:0,7723:0};l.O.j=e=>0===r[e];var e=(e,o)=>{var c,t,[n,s,i]=o,a=0;if(n.some(e=>0!==r[e])){for(c in s)l.o(s,c)&&(l.m[c]=s[c]);if(i)var p=i(l)}for(e&&e(o);a<n.length;a++)t=n[a],l.o(r,t)&&r[t]&&r[t][0](),r[t]=0;return l.O(p)},o=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var c=l.O(void 0,[7723],()=>l(7701));c=l.O(c)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,16 +1 @@
|
|||
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/explore-tags/style.scss ***!
|
||||
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied both on the front of your site
|
||||
* and in the editor.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
.wp-block-create-block-explore-tags {
|
||||
background-color: #21759b;
|
||||
color: #fff;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.wp-block-create-block-explore-tags{background-color:#21759b;color:#fff;padding:2px}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"explore-tags/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://carhop-blocks/./src/explore-tags/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-explore-tags {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!**********************************!*\
|
||||
!*** ./src/explore-tags/view.js ***!
|
||||
\**********************************/
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
|
|
@ -1,4 +1 @@
|
|||
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/heading/editor.scss ***!
|
||||
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,416 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/heading/block.json":
|
||||
/*!********************************!*\
|
||||
!*** ./src/heading/block.json ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/heading","version":"0.1.0","title":"Titrage","category":"carhop-blocks","icon":"smiley","description":"Boite de titrage pour la mise en forme d\'éléments de contenu","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","styles":[{"name":"stroked-after","label":"Titre + trait "}],"attributes":{"hierarchy":{"type":"string","enum":["classic","inverted"],"default":"classic"}}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/heading/edit.js":
|
||||
/*!*****************************!*\
|
||||
!*** ./src/heading/edit.js ***!
|
||||
\*****************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/heading/editor.scss");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* 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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes,
|
||||
...props
|
||||
}) {
|
||||
const {
|
||||
hierarchy
|
||||
} = attributes;
|
||||
function onHierarchyChange(value) {
|
||||
setAttributes({
|
||||
hierarchy: value
|
||||
});
|
||||
}
|
||||
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__.InspectorControls, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Aspect", "carhop-blocks"),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControl, {
|
||||
label: "Hi\xE9rarchie",
|
||||
value: hierarchy,
|
||||
onChange: onHierarchyChange,
|
||||
isBlock: true,
|
||||
__nextHasNoMarginBottom: true,
|
||||
__next40pxDefaultSize: true,
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
||||
value: "classic",
|
||||
label: "Classique"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalToggleGroupControlOption, {
|
||||
value: "inverted",
|
||||
label: "Invers\xE9"
|
||||
})]
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: `carhop-heading carhop-heading--hierarchy-${hierarchy}`
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||
className: "carhop-heading__innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||
template: [["core/heading", {
|
||||
placeholder: "Saisir le titre",
|
||||
content: "Titre"
|
||||
}], ["core/paragraph", {
|
||||
placeholder: "Saisir le sous-titre supérieur",
|
||||
content: "Sous-titre"
|
||||
}]],
|
||||
allowedBlocks: ["core/heading", "core/paragraph", "core/post-title"]
|
||||
})
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/heading/editor.scss":
|
||||
/*!*********************************!*\
|
||||
!*** ./src/heading/editor.scss ***!
|
||||
\*********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/heading/index.js":
|
||||
/*!******************************!*\
|
||||
!*** ./src/heading/index.js ***!
|
||||
\******************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/heading/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/heading/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/heading/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/heading/block.json");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
icon: {
|
||||
foreground: "#136f63",
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||
width: "100",
|
||||
height: "100",
|
||||
viewBox: "0 0 100 100",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("g", {
|
||||
stroke: "null",
|
||||
id: "svg_10",
|
||||
class: "fills",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
stroke: "null",
|
||||
d: "m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/heading/save.js":
|
||||
/*!*****************************!*\
|
||||
!*** ./src/heading/save.js ***!
|
||||
\*****************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
function save({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
hierarchy
|
||||
} = attributes;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||
className: `carhop-heading carhop-heading--hierarchy-${hierarchy}`
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "carhop-heading__innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/heading/style.scss":
|
||||
/*!********************************!*\
|
||||
!*** ./src/heading/style.scss ***!
|
||||
\********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/components":
|
||||
/*!************************************!*\
|
||||
!*** external ["wp","components"] ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "heading/index": 0,
|
||||
/******/ "heading/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["heading/style-index"], () => (__webpack_require__("./src/heading/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var e,r={2397:()=>{const e=window.wp.blocks,r=window.wp.i18n,o=window.wp.blockEditor,l=window.wp.components,n=window.ReactJSXRuntime,i=JSON.parse('{"UU":"carhop-blocks/heading"}');(0,e.registerBlockType)(i.UU,{icon:{foreground:"#136f63",src:(0,n.jsx)("svg",{width:"100",height:"100",viewBox:"0 0 100 100",children:(0,n.jsx)("g",{stroke:"null",id:"svg_10",class:"fills",children:(0,n.jsx)("path",{stroke:"null",d:"m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"})})})},edit:function({attributes:e,setAttributes:i,...s}){const{hierarchy:a}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.InspectorControls,{children:(0,n.jsx)(l.PanelBody,{title:(0,r.__)("Aspect","carhop-blocks"),children:(0,n.jsxs)(l.__experimentalToggleGroupControl,{label:"Hiérarchie",value:a,onChange:function(e){i({hierarchy:e})},isBlock:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,children:[(0,n.jsx)(l.__experimentalToggleGroupControlOption,{value:"classic",label:"Classique"}),(0,n.jsx)(l.__experimentalToggleGroupControlOption,{value:"inverted",label:"Inversé"})]})})}),(0,n.jsx)("div",{...(0,o.useBlockProps)({className:`carhop-heading carhop-heading--hierarchy-${a}`}),children:(0,n.jsx)("div",{className:"carhop-heading__innerblocks",children:(0,n.jsx)(o.InnerBlocks,{template:[["core/heading",{placeholder:"Saisir le titre",content:"Titre"}],["core/paragraph",{placeholder:"Saisir le sous-titre supérieur",content:"Sous-titre"}]],allowedBlocks:["core/heading","core/paragraph","core/post-title"]})})})]})},save:function({attributes:e}){const{hierarchy:r}=e;return(0,n.jsx)("div",{...o.useBlockProps.save({className:`carhop-heading carhop-heading--hierarchy-${r}`}),children:(0,n.jsx)("div",{className:"carhop-heading__innerblocks",children:(0,n.jsx)(o.InnerBlocks.Content,{})})})}})}},o={};function l(e){var n=o[e];if(void 0!==n)return n.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,l),i.exports}l.m=r,e=[],l.O=(r,o,n,i)=>{if(!o){var s=1/0;for(h=0;h<e.length;h++){for(var[o,n,i]=e[h],a=!0,t=0;t<o.length;t++)(!1&i||s>=i)&&Object.keys(l.O).every(e=>l.O[e](o[t]))?o.splice(t--,1):(a=!1,i<s&&(s=i));if(a){e.splice(h--,1);var c=n();void 0!==c&&(r=c)}}return r}i=i||0;for(var h=e.length;h>0&&e[h-1][2]>i;h--)e[h]=e[h-1];e[h]=[o,n,i]},l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={5430:0,6778:0};l.O.j=r=>0===e[r];var r=(r,o)=>{var n,i,[s,a,t]=o,c=0;if(s.some(r=>0!==e[r])){for(n in a)l.o(a,n)&&(l.m[n]=a[n]);if(t)var h=t(l)}for(r&&r(o);c<s.length;c++)i=s[c],l.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return l.O(h)},o=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})();var n=l.O(void 0,[6778],()=>l(2397));n=l.O(n)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1 @@
|
|||
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/heading/style.scss ***!
|
||||
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!*****************************!*\
|
||||
!*** ./src/heading/view.js ***!
|
||||
\*****************************/
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
|
|
@ -1 +1 @@
|
|||
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '06b28d02530a4fded8fe');
|
||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '7ce3ac49451a0aa713b0');
|
||||
|
|
|
|||
|
|
@ -1,4 +1 @@
|
|||
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/highlight-timeline-step/editor.scss ***!
|
||||
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,464 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/highlight-timeline-step/block.json":
|
||||
/*!************************************************!*\
|
||||
!*** ./src/highlight-timeline-step/block.json ***!
|
||||
\************************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/highlight-timeline-step","version":"0.1.0","title":"Étape de timeline","category":"carhop-blocks","icon":"calendar","description":"Étape de timeline pour la mise en forme d\'une étape de timeline","example":{},"parent":["carhop-blocks/highlight-timeline"],"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"year":{"type":"number","default":2025}}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/highlight-timeline-step/edit.js":
|
||||
/*!*********************************************!*\
|
||||
!*** ./src/highlight-timeline-step/edit.js ***!
|
||||
\*********************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/highlight-timeline-step/editor.scss");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _timelineYearBackground__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./timelineYearBackground */ "./src/highlight-timeline-step/timelineYearBackground.jsx");
|
||||
/* 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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes,
|
||||
...props
|
||||
}) {
|
||||
const {
|
||||
year
|
||||
} = attributes;
|
||||
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__.InspectorControls, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Étape de timeline", "carhop-blocks"),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalNumberControl, {
|
||||
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Année", "carhop-blocks"),
|
||||
value: year,
|
||||
onChange: value => {
|
||||
const n = parseInt(value, 10);
|
||||
setAttributes({
|
||||
year: Number.isFinite(n) ? n : undefined
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: `highlight-timeline-step`,
|
||||
id: `year-${year}`
|
||||
}),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
|
||||
className: "highlight-timeline-step__year",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("p", {
|
||||
className: "highlight-timeline-step__year-text",
|
||||
children: year
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_timelineYearBackground__WEBPACK_IMPORTED_MODULE_4__["default"], {})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
className: "highlight-timeline-step__innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||
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/image-stack", "carhop-blocks/heading", "carhop-blocks/decorative-shapes", "carhop-blocks/scroll-highlight-block", "carhop-blocks/cta-group", "carhop-blocks/audio-player", "carhop-blocks/localisation-map", "carhop-blocks/notice-panel", "acf/statistics-datas", "ninja-forms/form", "gravityforms/form", "dynamiques-blocks/sitemap", "mailpoet/subscription-form-block", "shortcode"]
|
||||
})
|
||||
})]
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/highlight-timeline-step/editor.scss":
|
||||
/*!*************************************************!*\
|
||||
!*** ./src/highlight-timeline-step/editor.scss ***!
|
||||
\*************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/highlight-timeline-step/index.js":
|
||||
/*!**********************************************!*\
|
||||
!*** ./src/highlight-timeline-step/index.js ***!
|
||||
\**********************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/highlight-timeline-step/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/highlight-timeline-step/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/highlight-timeline-step/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/highlight-timeline-step/block.json");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
icon: {
|
||||
foreground: "#136f63",
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||
width: "100",
|
||||
height: "100",
|
||||
viewBox: "0 0 100 100",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("g", {
|
||||
stroke: "null",
|
||||
id: "svg_10",
|
||||
class: "fills",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
stroke: "null",
|
||||
d: "m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/highlight-timeline-step/save.js":
|
||||
/*!*********************************************!*\
|
||||
!*** ./src/highlight-timeline-step/save.js ***!
|
||||
\*********************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _timelineYearBackground__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timelineYearBackground */ "./src/highlight-timeline-step/timelineYearBackground.jsx");
|
||||
/* 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({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
year
|
||||
} = attributes;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||
className: `highlight-timeline-step swiper-slide`,
|
||||
id: `year-${year}`
|
||||
}),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
|
||||
className: "highlight-timeline-step__year",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p", {
|
||||
className: "highlight-timeline-step__year-text",
|
||||
children: year
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_timelineYearBackground__WEBPACK_IMPORTED_MODULE_1__["default"], {})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
|
||||
className: "highlight-timeline-step__innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/highlight-timeline-step/style.scss":
|
||||
/*!************************************************!*\
|
||||
!*** ./src/highlight-timeline-step/style.scss ***!
|
||||
\************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/highlight-timeline-step/timelineYearBackground.jsx":
|
||||
/*!****************************************************************!*\
|
||||
!*** ./src/highlight-timeline-step/timelineYearBackground.jsx ***!
|
||||
\****************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ ShapeA)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
function ShapeA({}) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "highlight-timeline-step__year-background",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
width: "772.1",
|
||||
height: "653.3",
|
||||
viewBox: "0 0 772.1 653.3",
|
||||
preserveAspectRatio: "none",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("polygon", {
|
||||
preserveAspectRatio: "none",
|
||||
points: "14.2 10.6 762.1 53.5 757.9 642.7 10.1 599.8 14.2 10.6",
|
||||
vectorEffect: "non-scaling-stroke"
|
||||
})
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/components":
|
||||
/*!************************************!*\
|
||||
!*** external ["wp","components"] ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react":
|
||||
/*!************************!*\
|
||||
!*** external "React" ***!
|
||||
\************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["React"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "highlight-timeline-step/index": 0,
|
||||
/******/ "highlight-timeline-step/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["highlight-timeline-step/style-index"], () => (__webpack_require__("./src/highlight-timeline-step/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var e,i={2172:()=>{const e=window.wp.blocks,i=window.wp.i18n,o=window.wp.blockEditor,s=window.wp.components,r=window.ReactJSXRuntime,l=JSON.parse('{"UU":"carhop-blocks/highlight-timeline-step"}');(0,e.registerBlockType)(l.UU,{icon:{foreground:"#136f63",src:(0,r.jsx)("svg",{width:"100",height:"100",viewBox:"0 0 100 100",children:(0,r.jsx)("g",{stroke:"null",id:"svg_10",class:"fills",children:(0,r.jsx)("path",{stroke:"null",d:"m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"})})})},edit:function({attributes:e,setAttributes:l,...t}){const{year:c}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.InspectorControls,{children:(0,r.jsx)(s.PanelBody,{title:(0,i.__)("Étape de timeline","carhop-blocks"),children:(0,r.jsx)(s.__experimentalNumberControl,{label:(0,i.__)("Année","carhop-blocks"),value:c,onChange:e=>{const i=parseInt(e,10);l({year:Number.isFinite(i)?i:void 0})}})})}),(0,r.jsxs)("div",{...(0,o.useBlockProps)({className:"highlight-timeline-step",id:`year-${c}`}),children:[(0,r.jsx)("div",{className:"highlight-timeline-step__year",children:(0,r.jsx)("p",{className:"highlight-timeline-step__year-text",children:c})}),(0,r.jsx)("div",{className:"highlight-timeline-step__innerblocks",children:(0,r.jsx)(o.InnerBlocks,{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/image-stack","carhop-blocks/heading","carhop-blocks/decorative-shapes","carhop-blocks/scroll-highlight-block","carhop-blocks/cta-group","carhop-blocks/audio-player","carhop-blocks/localisation-map","carhop-blocks/notice-panel","acf/statistics-datas","ninja-forms/form","gravityforms/form","dynamiques-blocks/sitemap","mailpoet/subscription-form-block","shortcode"]})})]})]})},save:function({attributes:e}){const{year:i}=e;return(0,r.jsxs)("div",{...o.useBlockProps.save({className:"highlight-timeline-step swiper-slide",id:`year-${i}`}),children:[(0,r.jsx)("div",{className:"highlight-timeline-step__year",children:(0,r.jsx)("p",{className:"highlight-timeline-step__year-text",children:i})}),(0,r.jsx)("div",{className:"highlight-timeline-step__innerblocks",children:(0,r.jsx)(o.InnerBlocks.Content,{})})]})}})}},o={};function s(e){var r=o[e];if(void 0!==r)return r.exports;var l=o[e]={exports:{}};return i[e](l,l.exports,s),l.exports}s.m=i,e=[],s.O=(i,o,r,l)=>{if(!o){var t=1/0;for(h=0;h<e.length;h++){for(var[o,r,l]=e[h],c=!0,a=0;a<o.length;a++)(!1&l||t>=l)&&Object.keys(s.O).every(e=>s.O[e](o[a]))?o.splice(a--,1):(c=!1,l<t&&(t=l));if(c){e.splice(h--,1);var n=r();void 0!==n&&(i=n)}}return i}l=l||0;for(var h=e.length;h>0&&e[h-1][2]>l;h--)e[h]=e[h-1];e[h]=[o,r,l]},s.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={8319:0,7511:0};s.O.j=i=>0===e[i];var i=(i,o)=>{var r,l,[t,c,a]=o,n=0;if(t.some(i=>0!==e[i])){for(r in c)s.o(c,r)&&(s.m[r]=c[r]);if(a)var h=a(s)}for(i&&i(o);n<t.length;n++)l=t[n],s.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return s.O(h)},o=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];o.forEach(i.bind(null,0)),o.push=i.bind(null,o.push.bind(o))})();var r=s.O(void 0,[7511],()=>s(2172));r=s.O(r)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,35 +1 @@
|
|||
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/highlight-timeline-step/style.scss ***!
|
||||
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.highlight-timeline-step__year {
|
||||
position: relative;
|
||||
}
|
||||
.highlight-timeline-step__year > * {
|
||||
z-index: 1;
|
||||
}
|
||||
.highlight-timeline-step__year .highlight-timeline-step__year-background {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
z-index: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
.highlight-timeline-step__year .highlight-timeline-step__year-background svg {
|
||||
overflow: visible;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.highlight-timeline-step__year .highlight-timeline-step__year-background svg polygon {
|
||||
overflow: visible;
|
||||
fill: #efe8ff;
|
||||
stroke: white;
|
||||
stroke-width: 20px;
|
||||
vector-effect: non-scaling-stroke;
|
||||
}
|
||||
.highlight-timeline-step__year .highlight-timeline-step__year-text {
|
||||
line-height: 1 !important;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.highlight-timeline-step__year{position:relative}.highlight-timeline-step__year>*{z-index:1}.highlight-timeline-step__year .highlight-timeline-step__year-background{bottom:10px;left:10px;overflow:visible;position:absolute;right:10px;top:10px;z-index:0}.highlight-timeline-step__year .highlight-timeline-step__year-background svg{height:100%;overflow:visible;width:100%}.highlight-timeline-step__year .highlight-timeline-step__year-background svg polygon{fill:#efe8ff;overflow:visible;stroke:#fff;stroke-width:20px;vector-effect:non-scaling-stroke}.highlight-timeline-step__year .highlight-timeline-step__year-text{line-height:1!important}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"highlight-timeline-step/style-index.css","mappings":";;;AAAA;EACC;AACD;AACC;EACC;AACF;AACC;EACC;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AACE;EACC;EACA;EACA;AACH;AACG;EACC;EACA;EACA;EACA;EACA;AACJ;AAIC;EACC;AAFF,C","sources":["webpack://carhop-blocks/./src/highlight-timeline-step/style.scss"],"sourcesContent":[".highlight-timeline-step__year {\r\n\tposition: relative;\r\n\r\n\t> * {\r\n\t\tz-index: 1;\r\n\t}\r\n\t.highlight-timeline-step__year-background {\r\n\t\tposition: absolute;\r\n\t\ttop: 10px;\r\n\t\tright: 10px;\r\n\t\tbottom: 10px;\r\n\t\tleft: 10px;\r\n\t\tz-index: 0;\r\n\t\toverflow: visible;\r\n\r\n\t\tsvg {\r\n\t\t\toverflow: visible;\r\n\t\t\twidth: 100%;\r\n\t\t\theight: 100%;\r\n\r\n\t\t\tpolygon {\r\n\t\t\t\toverflow: visible;\r\n\t\t\t\tfill: #efe8ff;\r\n\t\t\t\tstroke: white;\r\n\t\t\t\tstroke-width: 20px;\r\n\t\t\t\tvector-effect: non-scaling-stroke;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.highlight-timeline-step__year-text {\r\n\t\tline-height: 1 !important;\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!*********************************************!*\
|
||||
!*** ./src/highlight-timeline-step/view.js ***!
|
||||
\*********************************************/
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
|
|
@ -1,53 +1 @@
|
|||
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/image-stack/editor.scss ***!
|
||||
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied inside the editor only.
|
||||
*/
|
||||
.wp-block-carhop-blocks-image-stack {
|
||||
overflow: visible;
|
||||
}
|
||||
.wp-block-carhop-blocks-image-stack .image-stack-placeholder {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(240, 240, 240, 0.5);
|
||||
background-color: red;
|
||||
border: 2px dashed #ccc;
|
||||
}
|
||||
.wp-block-carhop-blocks-image-stack .image-stack-item {
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
.wp-block-carhop-blocks-image-stack .image-stack-item:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.wp-block-carhop-blocks-image-stack .image-stack-item.is-selected {
|
||||
outline: 3px solid #007cba;
|
||||
outline-offset: -3px;
|
||||
z-index: 10;
|
||||
}
|
||||
.image-stack-image-preview {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.image-stack-image-preview img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.image-stack-image-controls {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.image-stack-image-controls .components-button {
|
||||
flex: 1;
|
||||
min-width: 80px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
.wp-block-carhop-blocks-image-stack{overflow:visible}.wp-block-carhop-blocks-image-stack .image-stack-placeholder{align-items:center;background-color:hsla(0,0%,94%,.5);background-color:red;border:2px dashed #ccc;display:flex;height:100%;justify-content:center;width:100%}.wp-block-carhop-blocks-image-stack .image-stack-item{cursor:pointer;transition:opacity .2s ease}.wp-block-carhop-blocks-image-stack .image-stack-item:hover{opacity:.9}.wp-block-carhop-blocks-image-stack .image-stack-item.is-selected{outline:3px solid #007cba;outline-offset:-3px;z-index:10}.image-stack-image-preview{margin-bottom:16px}.image-stack-image-preview img{border-radius:4px;display:block;height:auto;width:100%}.image-stack-image-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.image-stack-image-controls .components-button{flex:1;justify-content:center;min-width:80px}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"image-stack/index.css","mappings":";;;AAAA;;EAAA;AAIA;EACC;AAAD;AACC;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AAEC;EACC;EACA;AAAF;AAEE;EACC;AAAH;AAGE;EACC;EACA;EACA;AADH;AAMA;EACC;AAHD;AAKC;EACC;EACA;EACA;EACA;AAHF;AAOA;EACC;EACA;EACA;EACA;AAJD;AAMC;EACC;EACA;EACA;AAJF,C","sources":["webpack://carhop-blocks/./src/image-stack/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n */\n\n.wp-block-carhop-blocks-image-stack {\n\toverflow: visible;\n\t.image-stack-placeholder {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground-color: rgba(240, 240, 240, 0.5);\n\t\tbackground-color: red;\n\t\tborder: 2px dashed #ccc;\n\t}\n\n\t.image-stack-item {\n\t\tcursor: pointer;\n\t\ttransition: opacity 0.2s ease;\n\n\t\t&:hover {\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&.is-selected {\n\t\t\toutline: 3px solid #007cba;\n\t\t\toutline-offset: -3px;\n\t\t\tz-index: 10;\n\t\t}\n\t}\n}\n\n.image-stack-image-preview {\n\tmargin-bottom: 16px;\n\n\timg {\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tdisplay: block;\n\t\tborder-radius: 4px;\n\t}\n}\n\n.image-stack-image-controls {\n\tdisplay: flex;\n\tgap: 8px;\n\tmargin-top: 16px;\n\tflex-wrap: wrap;\n\n\t.components-button {\n\t\tflex: 1;\n\t\tmin-width: 80px;\n\t\tjustify-content: center;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,602 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/image-stack/block.json":
|
||||
/*!************************************!*\
|
||||
!*** ./src/image-stack/block.json ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/image-stack","version":"0.1.0","title":"Image Stack (Focal Point)","category":"carhop-blocks","icon":"images-alt2","description":"Layer multiple images with individual focal point positioning.","example":{"attributes":{"images":[{"id":1,"url":"https://images.unsplash.com/photo-1506905925346-21bda4d32df4","alt":"Mountain landscape","focalPoint":{"x":0.5,"y":0.3},"scale":0.8},{"id":2,"url":"https://images.unsplash.com/photo-1511884642898-4c92249e20b6","alt":"Forest scene","focalPoint":{"x":0.7,"y":0.6},"scale":0.6}],"height":400}},"attributes":{"images":{"type":"array","default":[],"items":{"type":"object"}},"height":{"type":"number","default":400}},"supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true}},"textdomain":"image-stack","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/image-stack/edit.js":
|
||||
/*!*********************************!*\
|
||||
!*** ./src/image-stack/edit.js ***!
|
||||
\*********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _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 _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/image-stack/editor.scss");
|
||||
/* 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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
const {
|
||||
images,
|
||||
height
|
||||
} = attributes;
|
||||
const [selectedImageIndex, setSelectedImageIndex] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(null);
|
||||
const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)();
|
||||
const onSelectImages = media => {
|
||||
const newImages = media.map(img => ({
|
||||
id: img.id,
|
||||
url: img.url,
|
||||
alt: img.alt || "",
|
||||
focalPoint: {
|
||||
x: 0.5,
|
||||
y: 0.5
|
||||
},
|
||||
scale: 0.8,
|
||||
rotation: 0
|
||||
}));
|
||||
setAttributes({
|
||||
images: [...images, ...newImages]
|
||||
});
|
||||
};
|
||||
const updateImageFocalPoint = (index, focalPoint) => {
|
||||
const newImages = [...images];
|
||||
newImages[index] = {
|
||||
...newImages[index],
|
||||
focalPoint
|
||||
};
|
||||
setAttributes({
|
||||
images: newImages
|
||||
});
|
||||
};
|
||||
const updateImageScale = (index, scale) => {
|
||||
const newImages = [...images];
|
||||
newImages[index] = {
|
||||
...newImages[index],
|
||||
scale
|
||||
};
|
||||
setAttributes({
|
||||
images: newImages
|
||||
});
|
||||
};
|
||||
const updateImageRotation = (index, rotation) => {
|
||||
const newImages = [...images];
|
||||
newImages[index] = {
|
||||
...newImages[index],
|
||||
rotation
|
||||
};
|
||||
setAttributes({
|
||||
images: newImages
|
||||
});
|
||||
};
|
||||
const removeImage = index => {
|
||||
const newImages = images.filter((_, i) => i !== index);
|
||||
setAttributes({
|
||||
images: newImages
|
||||
});
|
||||
if (selectedImageIndex === index) {
|
||||
setSelectedImageIndex(null);
|
||||
}
|
||||
};
|
||||
const moveImage = (index, direction) => {
|
||||
const newImages = [...images];
|
||||
const newIndex = index + direction;
|
||||
if (newIndex >= 0 && newIndex < images.length) {
|
||||
[newImages[index], newImages[newIndex]] = [newImages[newIndex], newImages[index]];
|
||||
setAttributes({
|
||||
images: newImages
|
||||
});
|
||||
setSelectedImageIndex(newIndex);
|
||||
}
|
||||
};
|
||||
const getImageStyle = image => {
|
||||
const focalPoint = image.focalPoint || {
|
||||
x: 0.5,
|
||||
y: 0.5
|
||||
};
|
||||
const scale = image.scale || 0.8;
|
||||
const rotation = image.rotation || 0;
|
||||
return {
|
||||
left: `${focalPoint.x * 100}%`,
|
||||
top: `${focalPoint.y * 100}%`,
|
||||
transform: ` rotate(${rotation}deg) scale(${scale})`
|
||||
};
|
||||
};
|
||||
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_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarGroup, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUploadCheck, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUpload, {
|
||||
onSelect: onSelectImages,
|
||||
allowedTypes: ["image"],
|
||||
multiple: true,
|
||||
gallery: true,
|
||||
value: images.map(img => img.id),
|
||||
render: ({
|
||||
open
|
||||
}) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarButton, {
|
||||
onClick: open,
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Add Images", "image-stack")
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Container Settings", "image-stack"),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
|
||||
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Container Height", "image-stack"),
|
||||
value: height,
|
||||
onChange: value => setAttributes({
|
||||
height: value
|
||||
}),
|
||||
min: 200,
|
||||
max: 800,
|
||||
step: 10
|
||||
})
|
||||
}), images.length > 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Images", "image-stack"),
|
||||
initialOpen: true,
|
||||
children: images.map((image, index) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
|
||||
title: `${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Image", "image-stack")} ${index + 1}`,
|
||||
initialOpen: selectedImageIndex === index,
|
||||
onToggle: () => setSelectedImageIndex(selectedImageIndex === index ? null : index),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
className: "image-stack-image-preview",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("img", {
|
||||
src: image.url,
|
||||
alt: image.alt
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FocalPointPicker, {
|
||||
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Focal Point", "image-stack"),
|
||||
url: image.url,
|
||||
value: image.focalPoint || {
|
||||
x: 0.5,
|
||||
y: 0.5
|
||||
},
|
||||
onChange: focalPoint => updateImageFocalPoint(index, focalPoint)
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
|
||||
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Scale", "image-stack"),
|
||||
value: image.scale || 0.8,
|
||||
onChange: scale => updateImageScale(index, scale),
|
||||
min: 0.1,
|
||||
max: 3,
|
||||
step: 0.05
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
|
||||
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Rotation (deg)", "image-stack"),
|
||||
value: image.rotation || 0,
|
||||
onChange: rotation => updateImageRotation(index, rotation),
|
||||
min: -180,
|
||||
max: 180,
|
||||
step: 1
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
|
||||
className: "image-stack-image-controls",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
|
||||
isSecondary: true,
|
||||
isSmall: true,
|
||||
disabled: index === 0,
|
||||
onClick: () => moveImage(index, -1),
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("↑ Move Up", "image-stack")
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
|
||||
isSecondary: true,
|
||||
isSmall: true,
|
||||
disabled: index === images.length - 1,
|
||||
onClick: () => moveImage(index, 1),
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("↓ Move Down", "image-stack")
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
|
||||
isDestructive: true,
|
||||
isSmall: true,
|
||||
onClick: () => removeImage(index),
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Remove", "image-stack")
|
||||
})]
|
||||
})]
|
||||
}, image.id))
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
...blockProps,
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
|
||||
className: "image-stack-container",
|
||||
style: {
|
||||
height: `${height}px`
|
||||
},
|
||||
children: [images.length === 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
className: "image-stack-placeholder",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUploadCheck, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaUpload, {
|
||||
onSelect: onSelectImages,
|
||||
allowedTypes: ["image"],
|
||||
multiple: true,
|
||||
gallery: true,
|
||||
render: ({
|
||||
open
|
||||
}) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
|
||||
variant: "primary",
|
||||
onClick: open,
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Ajouter une Image", "image-stack")
|
||||
})
|
||||
})
|
||||
})
|
||||
}), images.map((image, index) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
className: `image-stack-item ${selectedImageIndex === index ? "is-selected" : ""}`,
|
||||
onClick: () => setSelectedImageIndex(index),
|
||||
role: "button",
|
||||
tabIndex: 0,
|
||||
onKeyDown: e => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
setSelectedImageIndex(index);
|
||||
}
|
||||
},
|
||||
style: getImageStyle(image),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("img", {
|
||||
src: image.url,
|
||||
alt: image.alt
|
||||
})
|
||||
}, image.id))]
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/image-stack/editor.scss":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/image-stack/editor.scss ***!
|
||||
\*************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/image-stack/index.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/image-stack/index.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/image-stack/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/image-stack/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/image-stack/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/image-stack/block.json");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/image-stack/save.js":
|
||||
/*!*********************************!*\
|
||||
!*** ./src/image-stack/save.js ***!
|
||||
\*********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
function save({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
images,
|
||||
height
|
||||
} = attributes;
|
||||
const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save();
|
||||
const getImageStyle = image => {
|
||||
const focalPoint = image.focalPoint || {
|
||||
x: 0.5,
|
||||
y: 0.5
|
||||
};
|
||||
const scale = image.scale || 0.8;
|
||||
const rotation = image.rotation || 0;
|
||||
return {
|
||||
left: `${focalPoint.x * 100}%`,
|
||||
top: `${focalPoint.y * 100}%`,
|
||||
transform: `rotate(${rotation}deg) scale(${scale})`
|
||||
};
|
||||
};
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
...blockProps,
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "image-stack-container",
|
||||
style: {
|
||||
height: `${height}px`
|
||||
},
|
||||
children: images.map(image => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "image-stack-item",
|
||||
style: getImageStyle(image),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", {
|
||||
src: image.url,
|
||||
alt: image.alt
|
||||
})
|
||||
}, image.id))
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/image-stack/style.scss":
|
||||
/*!************************************!*\
|
||||
!*** ./src/image-stack/style.scss ***!
|
||||
\************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/components":
|
||||
/*!************************************!*\
|
||||
!*** external ["wp","components"] ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/element":
|
||||
/*!*********************************!*\
|
||||
!*** external ["wp","element"] ***!
|
||||
\*********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["element"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "image-stack/index": 0,
|
||||
/******/ "image-stack/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["image-stack/style-index"], () => (__webpack_require__("./src/image-stack/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var e,a={4864:()=>{const e=window.wp.blocks,a=window.wp.i18n,t=window.wp.blockEditor,i=window.wp.components,l=window.wp.element,s=window.ReactJSXRuntime,n=JSON.parse('{"UU":"carhop-blocks/image-stack"}');(0,e.registerBlockType)(n.UU,{edit:function({attributes:e,setAttributes:n}){const{images:o,height:r}=e,[c,d]=(0,l.useState)(null),m=(0,t.useBlockProps)(),g=e=>{const a=e.map(e=>({id:e.id,url:e.url,alt:e.alt||"",focalPoint:{x:.5,y:.5},scale:.8,rotation:0}));n({images:[...o,...a]})},h=(e,a)=>{const t=[...o],i=e+a;i>=0&&i<o.length&&([t[e],t[i]]=[t[i],t[e]],n({images:t}),d(i))},p=e=>{const a=e.focalPoint||{x:.5,y:.5},t=e.scale||.8,i=e.rotation||0;return{left:100*a.x+"%",top:100*a.y+"%",transform:` rotate(${i}deg) scale(${t})`}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.BlockControls,{children:(0,s.jsx)(i.ToolbarGroup,{children:(0,s.jsx)(t.MediaUploadCheck,{children:(0,s.jsx)(t.MediaUpload,{onSelect:g,allowedTypes:["image"],multiple:!0,gallery:!0,value:o.map(e=>e.id),render:({open:e})=>(0,s.jsx)(i.ToolbarButton,{onClick:e,children:(0,a.__)("Add Images","image-stack")})})})})}),(0,s.jsxs)(t.InspectorControls,{children:[(0,s.jsx)(i.PanelBody,{title:(0,a.__)("Container Settings","image-stack"),children:(0,s.jsx)(i.RangeControl,{label:(0,a.__)("Container Height","image-stack"),value:r,onChange:e=>n({height:e}),min:200,max:800,step:10})}),o.length>0&&(0,s.jsx)(i.PanelBody,{title:(0,a.__)("Images","image-stack"),initialOpen:!0,children:o.map((e,t)=>(0,s.jsxs)(i.PanelBody,{title:`${(0,a.__)("Image","image-stack")} ${t+1}`,initialOpen:c===t,onToggle:()=>d(c===t?null:t),children:[(0,s.jsx)("div",{className:"image-stack-image-preview",children:(0,s.jsx)("img",{src:e.url,alt:e.alt})}),(0,s.jsx)(i.FocalPointPicker,{label:(0,a.__)("Focal Point","image-stack"),url:e.url,value:e.focalPoint||{x:.5,y:.5},onChange:e=>((e,a)=>{const t=[...o];t[e]={...t[e],focalPoint:a},n({images:t})})(t,e)}),(0,s.jsx)(i.RangeControl,{label:(0,a.__)("Scale","image-stack"),value:e.scale||.8,onChange:e=>((e,a)=>{const t=[...o];t[e]={...t[e],scale:a},n({images:t})})(t,e),min:.1,max:3,step:.05}),(0,s.jsx)(i.RangeControl,{label:(0,a.__)("Rotation (deg)","image-stack"),value:e.rotation||0,onChange:e=>((e,a)=>{const t=[...o];t[e]={...t[e],rotation:a},n({images:t})})(t,e),min:-180,max:180,step:1}),(0,s.jsxs)("div",{className:"image-stack-image-controls",children:[(0,s.jsx)(i.Button,{isSecondary:!0,isSmall:!0,disabled:0===t,onClick:()=>h(t,-1),children:(0,a.__)("↑ Move Up","image-stack")}),(0,s.jsx)(i.Button,{isSecondary:!0,isSmall:!0,disabled:t===o.length-1,onClick:()=>h(t,1),children:(0,a.__)("↓ Move Down","image-stack")}),(0,s.jsx)(i.Button,{isDestructive:!0,isSmall:!0,onClick:()=>(e=>{const a=o.filter((a,t)=>t!==e);n({images:a}),c===e&&d(null)})(t),children:(0,a.__)("Remove","image-stack")})]})]},e.id))})]}),(0,s.jsx)("div",{...m,children:(0,s.jsxs)("div",{className:"image-stack-container",style:{height:`${r}px`},children:[0===o.length&&(0,s.jsx)("div",{className:"image-stack-placeholder",children:(0,s.jsx)(t.MediaUploadCheck,{children:(0,s.jsx)(t.MediaUpload,{onSelect:g,allowedTypes:["image"],multiple:!0,gallery:!0,render:({open:e})=>(0,s.jsx)(i.Button,{variant:"primary",onClick:e,children:(0,a.__)("Ajouter une Image","image-stack")})})})}),o.map((e,a)=>(0,s.jsx)("div",{className:"image-stack-item "+(c===a?"is-selected":""),onClick:()=>d(a),role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||d(a)},style:p(e),children:(0,s.jsx)("img",{src:e.url,alt:e.alt})},e.id))]})})]})},save:function({attributes:e}){const{images:a,height:i}=e,l=t.useBlockProps.save(),n=e=>{const a=e.focalPoint||{x:.5,y:.5},t=e.scale||.8,i=e.rotation||0;return{left:100*a.x+"%",top:100*a.y+"%",transform:`rotate(${i}deg) scale(${t})`}};return(0,s.jsx)("div",{...l,children:(0,s.jsx)("div",{className:"image-stack-container",style:{height:`${i}px`},children:a.map(e=>(0,s.jsx)("div",{className:"image-stack-item",style:n(e),children:(0,s.jsx)("img",{src:e.url,alt:e.alt})},e.id))})})}})}},t={};function i(e){var l=t[e];if(void 0!==l)return l.exports;var s=t[e]={exports:{}};return a[e](s,s.exports,i),s.exports}i.m=a,e=[],i.O=(a,t,l,s)=>{if(!t){var n=1/0;for(d=0;d<e.length;d++){for(var[t,l,s]=e[d],o=!0,r=0;r<t.length;r++)(!1&s||n>=s)&&Object.keys(i.O).every(e=>i.O[e](t[r]))?t.splice(r--,1):(o=!1,s<n&&(n=s));if(o){e.splice(d--,1);var c=l();void 0!==c&&(a=c)}}return a}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[t,l,s]},i.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={6788:0,7020:0};i.O.j=a=>0===e[a];var a=(a,t)=>{var l,s,[n,o,r]=t,c=0;if(n.some(a=>0!==e[a])){for(l in o)i.o(o,l)&&(i.m[l]=o[l]);if(r)var d=r(i)}for(a&&a(t);c<n.length;c++)s=n[c],i.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return i.O(d)},t=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];t.forEach(a.bind(null,0)),t.push=a.bind(null,t.push.bind(t))})();var l=i.O(void 0,[7020],()=>i(4864));l=i.O(l)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,24 +1 @@
|
|||
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/image-stack/style.scss ***!
|
||||
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied both on the front of your site
|
||||
* and in the editor.
|
||||
*/
|
||||
.wp-block-carhop-blocks-image-stack .image-stack-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: visible;
|
||||
}
|
||||
.wp-block-carhop-blocks-image-stack .image-stack-item {
|
||||
position: absolute;
|
||||
}
|
||||
.wp-block-carhop-blocks-image-stack .image-stack-item img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-o-object-fit: contain;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.wp-block-carhop-blocks-image-stack .image-stack-container{overflow:visible;position:relative;width:100%}.wp-block-carhop-blocks-image-stack .image-stack-item{position:absolute}.wp-block-carhop-blocks-image-stack .image-stack-item img{display:block;height:100%;-o-object-fit:contain;object-fit:contain;width:100%}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"image-stack/style-index.css","mappings":";;;AAAA;;;EAAA;AAMC;EACC;EACA;EACA;AADF;AAIC;EACC;AAFF;AAIE;EACC;EACA;EACA;KAAA;EACA;AAFH,C","sources":["webpack://carhop-blocks/./src/image-stack/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n */\n\n.wp-block-carhop-blocks-image-stack {\n\t.image-stack-container {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t}\n\n\t.image-stack-item {\n\t\tposition: absolute;\n\n\t\timg {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tobject-fit: contain;\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,13 +1 @@
|
|||
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/latest-news/editor.scss ***!
|
||||
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/**
|
||||
* The following styles get applied inside the editor only.
|
||||
*
|
||||
* Replace them with your own styles or remove the file completely.
|
||||
*/
|
||||
.wp-block-carhop-plugin-latest-news {
|
||||
border: 1px dotted #f00;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=index.css.map*/
|
||||
.wp-block-carhop-plugin-latest-news{border:1px dotted red}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"latest-news/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://carhop-blocks/./src/latest-news/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-carhop-plugin-latest-news {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,315 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/latest-news/block.json":
|
||||
/*!************************************!*\
|
||||
!*** ./src/latest-news/block.json ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-plugin/latest-news","version":"0.1.0","title":"Dernières actualités","category":"carhop-blocks","icon":"smiley","description":"Example block scaffolded with Create Block tool.","example":{},"supports":{"html":false},"textdomain":"latest-news","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","viewScript":"file:./view.js"}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/latest-news/edit.js":
|
||||
/*!*********************************!*\
|
||||
!*** ./src/latest-news/edit.js ***!
|
||||
\*********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/latest-news/editor.scss");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit() {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)(),
|
||||
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Dernières actualités – hello from the editor!", "latest-news")
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/latest-news/editor.scss":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/latest-news/editor.scss ***!
|
||||
\*************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/latest-news/index.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/latest-news/index.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/latest-news/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/latest-news/edit.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/latest-news/block.json");
|
||||
/* 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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, {
|
||||
icon: {
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("svg", {
|
||||
width: "40",
|
||||
height: "40",
|
||||
viewBox: "0 0 40 40",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("g", {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("path", {
|
||||
d: "m13.6069,24.44496l-12.82407,12.82407a1.40154,1.40154 0 1 0 1.97617,1.97617l12.82407,-12.82407l-1.97617,-1.97617z"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("path", {
|
||||
d: "m39.19898,9.93905l-9.10999,-9.10999a3.01331,3.01331 0 0 0 -4.20461,4.20461a0.23826,0.23826 0 0 1 0,0.29432l-5.03152,5.03152a3.62998,3.62998 0 0 1 -4.54098,0.60266a6.40503,6.40503 0 0 0 -8.18498,0.74281l-1.62578,1.65381a1.40154,1.40154 0 0 0 0,1.94814l18.21999,18.21999a1.40154,1.40154 0 0 0 1.97617,0l1.65381,-1.65381a6.40503,6.40503 0 0 0 0.71478,-8.15695a3.62998,3.62998 0 0 1 0.60266,-4.54098l4.97546,-4.97546a0.23826,0.23826 0 0 1 0.29432,0a3.01331,3.01331 0 0 0 4.20461,-4.20461l0.05606,-0.05606z"
|
||||
})]
|
||||
})
|
||||
}),
|
||||
foreground: "#136f63"
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/latest-news/style.scss":
|
||||
/*!************************************!*\
|
||||
!*** ./src/latest-news/style.scss ***!
|
||||
\************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "latest-news/index": 0,
|
||||
/******/ "latest-news/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["latest-news/style-index"], () => (__webpack_require__("./src/latest-news/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var r,e={8878:()=>{const r=window.wp.blocks,e=window.wp.i18n,o=window.wp.blockEditor,a=window.ReactJSXRuntime,l=JSON.parse('{"UU":"carhop-plugin/latest-news"}');(0,r.registerBlockType)(l.UU,{icon:{src:(0,a.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:(0,a.jsxs)("g",{children:[(0,a.jsx)("path",{d:"m13.6069,24.44496l-12.82407,12.82407a1.40154,1.40154 0 1 0 1.97617,1.97617l12.82407,-12.82407l-1.97617,-1.97617z"}),(0,a.jsx)("path",{d:"m39.19898,9.93905l-9.10999,-9.10999a3.01331,3.01331 0 0 0 -4.20461,4.20461a0.23826,0.23826 0 0 1 0,0.29432l-5.03152,5.03152a3.62998,3.62998 0 0 1 -4.54098,0.60266a6.40503,6.40503 0 0 0 -8.18498,0.74281l-1.62578,1.65381a1.40154,1.40154 0 0 0 0,1.94814l18.21999,18.21999a1.40154,1.40154 0 0 0 1.97617,0l1.65381,-1.65381a6.40503,6.40503 0 0 0 0.71478,-8.15695a3.62998,3.62998 0 0 1 0.60266,-4.54098l4.97546,-4.97546a0.23826,0.23826 0 0 1 0.29432,0a3.01331,3.01331 0 0 0 4.20461,-4.20461l0.05606,-0.05606z"})]})}),foreground:"#136f63"},edit:function(){return(0,a.jsx)("p",{...(0,o.useBlockProps)(),children:(0,e.__)("Dernières actualités – hello from the editor!","latest-news")})}})}},o={};function a(r){var l=o[r];if(void 0!==l)return l.exports;var t=o[r]={exports:{}};return e[r](t,t.exports,a),t.exports}a.m=e,r=[],a.O=(e,o,l,t)=>{if(!o){var i=1/0;for(p=0;p<r.length;p++){for(var[o,l,t]=r[p],n=!0,s=0;s<o.length;s++)(!1&t||i>=t)&&Object.keys(a.O).every(r=>a.O[r](o[s]))?o.splice(s--,1):(n=!1,t<i&&(i=t));if(n){r.splice(p--,1);var c=l();void 0!==c&&(e=c)}}return e}t=t||0;for(var p=r.length;p>0&&r[p-1][2]>t;p--)r[p]=r[p-1];r[p]=[o,l,t]},a.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={2639:0,2183:0};a.O.j=e=>0===r[e];var e=(e,o)=>{var l,t,[i,n,s]=o,c=0;if(i.some(e=>0!==r[e])){for(l in n)a.o(n,l)&&(a.m[l]=n[l]);if(s)var p=s(a)}for(e&&e(o);c<i.length;c++)t=i[c],a.o(r,t)&&r[t]&&r[t][0](),r[t]=0;return a.O(p)},o=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var l=a.O(void 0,[2183],()=>a(8878));l=a.O(l)})();
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1 @@
|
|||
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/latest-news/style.scss ***!
|
||||
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!*********************************!*\
|
||||
!*** ./src/latest-news/view.js ***!
|
||||
\*********************************/
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
new Swiper(".latest-news-swiper", {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 30,
|
||||
pagination: {
|
||||
el: ".swiper-pagination",
|
||||
clickable: true
|
||||
},
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev"
|
||||
},
|
||||
breakpoints: {
|
||||
640: {
|
||||
slidesPerView: 2
|
||||
},
|
||||
1024: {
|
||||
slidesPerView: 3
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=view.js.map
|
||||
document.addEventListener("DOMContentLoaded",function(){new Swiper(".latest-news-swiper",{slidesPerView:1,spaceBetween:30,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},breakpoints:{640:{slidesPerView:2},1024:{slidesPerView:3}}})});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"latest-news/view.js","mappings":";;;;AAAAA,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,EAAE,YAAY;EACzD,IAAIC,MAAM,CAAC,qBAAqB,EAAE;IACjCC,aAAa,EAAE,CAAC;IAChBC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;MACXC,EAAE,EAAE,oBAAoB;MACxBC,SAAS,EAAE;IACZ,CAAC;IACDC,UAAU,EAAE;MACXC,MAAM,EAAE,qBAAqB;MAC7BC,MAAM,EAAE;IACT,CAAC;IACDC,WAAW,EAAE;MACZ,GAAG,EAAE;QACJR,aAAa,EAAE;MAChB,CAAC;MACD,IAAI,EAAE;QACLA,aAAa,EAAE;MAChB;IACD;EACD,CAAC,CAAC;AACH,CAAC,CAAC,C","sources":["webpack://carhop-blocks/./src/latest-news/view.js"],"sourcesContent":["document.addEventListener(\"DOMContentLoaded\", function () {\n\tnew Swiper(\".latest-news-swiper\", {\n\t\tslidesPerView: 1,\n\t\tspaceBetween: 30,\n\t\tpagination: {\n\t\t\tel: \".swiper-pagination\",\n\t\t\tclickable: true,\n\t\t},\n\t\tnavigation: {\n\t\t\tnextEl: \".swiper-button-next\",\n\t\t\tprevEl: \".swiper-button-prev\",\n\t\t},\n\t\tbreakpoints: {\n\t\t\t640: {\n\t\t\t\tslidesPerView: 2,\n\t\t\t},\n\t\t\t1024: {\n\t\t\t\tslidesPerView: 3,\n\t\t\t},\n\t\t},\n\t});\n});\n"],"names":["document","addEventListener","Swiper","slidesPerView","spaceBetween","pagination","el","clickable","navigation","nextEl","prevEl","breakpoints"],"ignoreList":[],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,25 +1 @@
|
|||
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/localisation-map/style.scss ***!
|
||||
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.carhop-localisation-map .map-container a:after {
|
||||
content: none !important;
|
||||
}
|
||||
.carhop-localisation-map .map-container {
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
background-color: var(--wp--preset--color--primary);
|
||||
overflow: hidden;
|
||||
}
|
||||
.carhop-localisation-map .map-container:not([data-initialized=true]) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
}
|
||||
.carhop-localisation-map .map-container:not([data-initialized=true])::before {
|
||||
content: "Chargement de la carte...";
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style-index.css.map*/
|
||||
.carhop-localisation-map .map-container a:after{content:none!important}.carhop-localisation-map .map-container{background-color:var(--wp--preset--color--primary);height:500px;margin:0 auto;max-width:1200px;overflow:hidden;width:100%}.carhop-localisation-map .map-container:not([data-initialized=true]){align-items:center;color:#fff;display:flex;justify-content:center}.carhop-localisation-map .map-container:not([data-initialized=true]):before{content:"Chargement de la carte..."}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"localisation-map/style-index.css","mappings":";;;AAEE;EACC;AADH;AADC;EAIC;EACA;EACA;EACA;EACA;EACA;AAAF;AAGE;EACC;EACA;EACA;EACA;AADH;AAGG;EACC;AADJ,C","sources":["webpack://carhop-blocks/./src/localisation-map/style.scss"],"sourcesContent":[".carhop-localisation-map {\n\t.map-container {\n\t\ta:after {\n\t\t\tcontent: none !important;\n\t\t}\n\t\tmargin: 0 auto;\n\t\tmax-width: 1200px;\n\t\twidth: 100%;\n\t\theight: 500px;\n\t\tbackground-color: var(--wp--preset--color--primary);\n\t\toverflow: hidden;\n\n\t\t// Loading state\n\t\t&:not([data-initialized=\"true\"]) {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tcolor: white;\n\n\t\t\t&::before {\n\t\t\t\tcontent: \"Chargement de la carte...\";\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,34 +1 @@
|
|||
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/narrative-card/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*/
|
||||
.wp-block-carhop-blocks-cta{align-items:center;color:var(--cta-current-color);display:block;display:flex;gap:10px;line-height:normal;padding:2px;width:-moz-fit-content;width:fit-content}.wp-block-carhop-blocks-cta .icon svg{height:30px;width:30px}.wp-block-carhop-blocks-cta .icon svg circle,.wp-block-carhop-blocks-cta .icon svg path{stroke:var(--cta-current-color)}.wp-block-carhop-blocks-cta.align--left{margin-left:0}.wp-block-carhop-blocks-cta.align--right{margin-left:auto;margin-right:0}.wp-block-carhop-blocks-cta.align--center{margin:0 auto}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"narrative-card/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://carhop-blocks/./src/narrative-card/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":[],"ignoreList":[],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,39 +1 @@
|
|||
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/narrative-card/style.scss ***!
|
||||
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.wp-block-carhop-blocks-cta {
|
||||
margin-top: 20px;
|
||||
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;
|
||||
font-weight: 700;
|
||||
}
|
||||
.wp-block-carhop-blocks-cta a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.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=style-index.css.map*/
|
||||
.wp-block-carhop-blocks-cta{align-items:center;color:var(--cta-current-color);display:block;display:flex;font-weight:700;gap:10px;line-height:normal;margin-top:20px;padding:2px;width:-moz-fit-content;width:fit-content}.wp-block-carhop-blocks-cta a{text-decoration:none}.wp-block-carhop-blocks-cta .icon svg{height:30px;width:30px}.wp-block-carhop-blocks-cta .icon svg circle,.wp-block-carhop-blocks-cta .icon svg path{stroke:var(--cta-current-color)}.wp-block-carhop-blocks-cta.align--left{margin-left:0}.wp-block-carhop-blocks-cta.align--right{margin-left:auto;margin-right:0}.wp-block-carhop-blocks-cta.align--center{margin:0 auto}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"narrative-card/style-index.css","mappings":";;;AAAA;EACC;EACA;EAEA;EACA;EACA;EAAA;EACA;EACA;EACA;EACA;EAEA;AADD;AAGC;EACC;AADF;AAIE;EACC;EACA;AAFH;AAIE;;EAEC;AAFH;AAMC;EACC;AAJF;AAMC;EACC;EACA;AAJF;AAMC;EACC;AAJF,C","sources":["webpack://carhop-blocks/./src/narrative-card/style.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\tmargin-top: 20px;\n\tcolor: var(--cta-current-color);\n\n\tpadding: 2px;\n\tdisplay: block;\n\twidth: fit-content;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\tfont-weight: 700;\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":[],"ignoreList":[],"sourceRoot":""}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/*!************************************!*\
|
||||
!*** ./src/narrative-card/view.js ***!
|
||||
\************************************/
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
|
|
@ -1,4 +1 @@
|
|||
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/notice-panel/editor.scss ***!
|
||||
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,401 +1 @@
|
|||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/notice-panel/block.json":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/notice-panel/block.json ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/notice-panel","version":"0.1.0","title":"Encart d\'information","category":"carhop-blocks","icon":"smiley","description":"Encart d\'information pour la mise en avant d\'éléments informatifs","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":{"hasIcon":{"type":"boolean","default":true}}}');
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/notice-panel/edit.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/notice-panel/edit.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ Edit)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
||||
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/notice-panel/editor.scss");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* 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__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Edit({
|
||||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
const {
|
||||
hasIcon
|
||||
} = attributes;
|
||||
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__.InspectorControls, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
|
||||
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Icone", "carhop-blocks"),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.CheckboxControl, {
|
||||
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Afficher une icône", "carhop-blocks"),
|
||||
checked: hasIcon,
|
||||
onChange: value => setAttributes({
|
||||
hasIcon: value
|
||||
})
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
||||
className: "notice-panel"
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
|
||||
className: `notice-panel__content has-icon-${hasIcon}`,
|
||||
children: [hasIcon && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||
className: "icon"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||
className: "innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, {
|
||||
template: [["core/paragraph", {
|
||||
placeholder: "Ajouter ici le texte"
|
||||
}]]
|
||||
})
|
||||
})]
|
||||
})
|
||||
})]
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/notice-panel/editor.scss":
|
||||
/*!**************************************!*\
|
||||
!*** ./src/notice-panel/editor.scss ***!
|
||||
\**************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/notice-panel/index.js":
|
||||
/*!***********************************!*\
|
||||
!*** ./src/notice-panel/index.js ***!
|
||||
\***********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
||||
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/notice-panel/style.scss");
|
||||
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/notice-panel/edit.js");
|
||||
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/notice-panel/save.js");
|
||||
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/notice-panel/block.json");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
||||
icon: {
|
||||
src: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("svg", {
|
||||
width: "32",
|
||||
height: "32",
|
||||
viewBox: "0 0 32 32",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("path", {
|
||||
d: "M16 24L8 16L16 8L24 16L16 24Z"
|
||||
})
|
||||
})
|
||||
},
|
||||
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
||||
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/notice-panel/save.js":
|
||||
/*!**********************************!*\
|
||||
!*** ./src/notice-panel/save.js ***!
|
||||
\**********************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (/* binding */ save)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
||||
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
||||
|
||||
|
||||
|
||||
|
||||
function save({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
hasIcon
|
||||
} = attributes;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
||||
className: "notice-panel"
|
||||
}),
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||||
className: `notice-panel__content has-icon-${hasIcon}`,
|
||||
children: [hasIcon && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "icon"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||||
className: "innerblocks",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})
|
||||
})]
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/notice-panel/style.scss":
|
||||
/*!*************************************!*\
|
||||
!*** ./src/notice-panel/style.scss ***!
|
||||
\*************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/block-editor":
|
||||
/*!*************************************!*\
|
||||
!*** external ["wp","blockEditor"] ***!
|
||||
\*************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blockEditor"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/blocks":
|
||||
/*!********************************!*\
|
||||
!*** external ["wp","blocks"] ***!
|
||||
\********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["blocks"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/components":
|
||||
/*!************************************!*\
|
||||
!*** external ["wp","components"] ***!
|
||||
\************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "@wordpress/i18n":
|
||||
/*!******************************!*\
|
||||
!*** external ["wp","i18n"] ***!
|
||||
\******************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react/jsx-runtime":
|
||||
/*!**********************************!*\
|
||||
!*** external "ReactJSXRuntime" ***!
|
||||
\**********************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = window["ReactJSXRuntime"];
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = __webpack_modules__;
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/chunk loaded */
|
||||
/******/ (() => {
|
||||
/******/ var deferred = [];
|
||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
||||
/******/ if(chunkIds) {
|
||||
/******/ priority = priority || 0;
|
||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
||||
/******/ return;
|
||||
/******/ }
|
||||
/******/ var notFulfilled = Infinity;
|
||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
||||
/******/ chunkIds.splice(j--, 1);
|
||||
/******/ } else {
|
||||
/******/ fulfilled = false;
|
||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferred.splice(i--, 1)
|
||||
/******/ var r = fn();
|
||||
/******/ if (r !== undefined) result = r;
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ return result;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
/******/ (() => {
|
||||
/******/ // no baseURI
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "notice-panel/index": 0,
|
||||
/******/ "notice-panel/style-index": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // no chunk on demand loading
|
||||
/******/
|
||||
/******/ // no prefetching
|
||||
/******/
|
||||
/******/ // no preloaded
|
||||
/******/
|
||||
/******/ // no HMR
|
||||
/******/
|
||||
/******/ // no HMR manifest
|
||||
/******/
|
||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
||||
/******/
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0;
|
||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
||||
/******/ }
|
||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ installedChunks[chunkId][0]();
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ return __webpack_require__.O(result);
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["notice-panel/style-index"], () => (__webpack_require__("./src/notice-panel/index.js")))
|
||||
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=index.js.map
|
||||
(()=>{"use strict";var e,n={8198:()=>{const e=window.wp.blocks,n=window.wp.i18n,o=window.wp.blockEditor,s=window.wp.components,c=window.ReactJSXRuntime,r=JSON.parse('{"UU":"carhop-blocks/notice-panel"}');(0,e.registerBlockType)(r.UU,{icon:{src:(0,c.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",children:(0,c.jsx)("path",{d:"M16 24L8 16L16 8L24 16L16 24Z"})})},edit:function({attributes:e,setAttributes:r}){const{hasIcon:i}=e;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.InspectorControls,{children:(0,c.jsx)(s.PanelBody,{title:(0,n.__)("Icone","carhop-blocks"),children:(0,c.jsx)(s.CheckboxControl,{label:(0,n.__)("Afficher une icône","carhop-blocks"),checked:i,onChange:e=>r({hasIcon:e})})})}),(0,c.jsx)("div",{...(0,o.useBlockProps)({className:"notice-panel"}),children:(0,c.jsxs)("div",{className:`notice-panel__content has-icon-${i}`,children:[i&&(0,c.jsx)("div",{className:"icon"}),(0,c.jsx)("div",{className:"innerblocks",children:(0,c.jsx)(o.InnerBlocks,{template:[["core/paragraph",{placeholder:"Ajouter ici le texte"}]]})})]})})]})},save:function({attributes:e}){const{hasIcon:n}=e;return(0,c.jsx)("div",{...o.useBlockProps.save({className:"notice-panel"}),children:(0,c.jsxs)("div",{className:`notice-panel__content has-icon-${n}`,children:[n&&(0,c.jsx)("div",{className:"icon"}),(0,c.jsx)("div",{className:"innerblocks",children:(0,c.jsx)(o.InnerBlocks.Content,{})})]})})}})}},o={};function s(e){var c=o[e];if(void 0!==c)return c.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.m=n,e=[],s.O=(n,o,c,r)=>{if(!o){var i=1/0;for(h=0;h<e.length;h++){for(var[o,c,r]=e[h],t=!0,a=0;a<o.length;a++)(!1&r||i>=r)&&Object.keys(s.O).every(e=>s.O[e](o[a]))?o.splice(a--,1):(t=!1,r<i&&(i=r));if(t){e.splice(h--,1);var l=c();void 0!==l&&(n=l)}}return n}r=r||0;for(var h=e.length;h>0&&e[h-1][2]>r;h--)e[h]=e[h-1];e[h]=[o,c,r]},s.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={4247:0,5871:0};s.O.j=n=>0===e[n];var n=(n,o)=>{var c,r,[i,t,a]=o,l=0;if(i.some(n=>0!==e[n])){for(c in t)s.o(t,c)&&(s.m[c]=t[c]);if(a)var h=a(s)}for(n&&n(o);l<i.length;l++)r=i[l],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return s.O(h)},o=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];o.forEach(n.bind(null,0)),o.push=n.bind(null,o.push.bind(o))})();var c=s.O(void 0,[5871],()=>s(8198));c=s.O(c)})();
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user