@qwanyx/ai-editor 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionOptionsModal.d.ts","sourceRoot":"","sources":["../../src/components/SectionOptionsModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAOvC,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;IACtD,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC5C;AAgMD,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,eAAe,GAChB,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"SectionOptionsModal.d.ts","sourceRoot":"","sources":["../../src/components/SectionOptionsModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAOvC,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;IACtD,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC5C;AAgMD,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,eAAe,GAChB,EAAE,wBAAwB,kDAgnB1B;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -211,7 +211,8 @@ function SectionOptionsModal({ isOpen, onClose, section, onUpdateSettings, onUpd
|
|
|
211
211
|
const content = section.content;
|
|
212
212
|
const [columns, setColumns] = (0, react_1.useState)(content.columns || 2);
|
|
213
213
|
const [columnLines, setColumnLines] = (0, react_1.useState)(content.columnLines || 0);
|
|
214
|
-
const [dropCapEnabled, setDropCapEnabled] = (0, react_1.useState)(content.dropCap?.enabled
|
|
214
|
+
const [dropCapEnabled, setDropCapEnabled] = (0, react_1.useState)(content.dropCap?.enabled ?? true);
|
|
215
|
+
const [dropCapSize, setDropCapSize] = (0, react_1.useState)(content.dropCap?.fontSize || 3);
|
|
215
216
|
// Ogilvy end comment options
|
|
216
217
|
const [endCommentFontSize, setEndCommentFontSize] = (0, react_1.useState)(content.endCommentFontSize || 14);
|
|
217
218
|
const [endCommentItalic, setEndCommentItalic] = (0, react_1.useState)(content.endCommentItalic || false);
|
|
@@ -239,7 +240,8 @@ function SectionOptionsModal({ isOpen, onClose, section, onUpdateSettings, onUpd
|
|
|
239
240
|
const content = section.content;
|
|
240
241
|
setColumns(content.columns || 2);
|
|
241
242
|
setColumnLines(content.columnLines || 0);
|
|
242
|
-
setDropCapEnabled(content.dropCap?.enabled
|
|
243
|
+
setDropCapEnabled(content.dropCap?.enabled ?? true);
|
|
244
|
+
setDropCapSize(content.dropCap?.fontSize || 3);
|
|
243
245
|
// Ogilvy end comment options
|
|
244
246
|
setEndCommentFontSize(content.endCommentFontSize || 14);
|
|
245
247
|
setEndCommentItalic(content.endCommentItalic || false);
|
|
@@ -276,7 +278,7 @@ function SectionOptionsModal({ isOpen, onClose, section, onUpdateSettings, onUpd
|
|
|
276
278
|
...content,
|
|
277
279
|
columns,
|
|
278
280
|
columnLines: columnLines > 0 ? columnLines : undefined,
|
|
279
|
-
dropCap: { ...(content.dropCap || {}), enabled: dropCapEnabled },
|
|
281
|
+
dropCap: { ...(content.dropCap || {}), enabled: dropCapEnabled, fontSize: dropCapSize },
|
|
280
282
|
endCommentFontSize,
|
|
281
283
|
endCommentItalic,
|
|
282
284
|
});
|
|
@@ -286,7 +288,7 @@ function SectionOptionsModal({ isOpen, onClose, section, onUpdateSettings, onUpd
|
|
|
286
288
|
...content,
|
|
287
289
|
columns,
|
|
288
290
|
columnLines: columnLines > 0 ? columnLines : undefined,
|
|
289
|
-
dropCap: { ...(content.dropCap || {}), enabled: dropCapEnabled },
|
|
291
|
+
dropCap: { ...(content.dropCap || {}), enabled: dropCapEnabled, fontSize: dropCapSize },
|
|
290
292
|
});
|
|
291
293
|
}
|
|
292
294
|
else if (section.layoutType === 'gallery') {
|
|
@@ -310,6 +312,6 @@ function SectionOptionsModal({ isOpen, onClose, section, onUpdateSettings, onUpd
|
|
|
310
312
|
};
|
|
311
313
|
if (!isOpen)
|
|
312
314
|
return null;
|
|
313
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: styles.overlay, onClick: onClose, children: (0, jsx_runtime_1.jsxs)("div", { style: styles.dialog, onClick: (e) => e.stopPropagation(), children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.header, children: [(0, jsx_runtime_1.jsxs)("h3", { style: styles.headerTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '20px' }, children: "tune" }), "Options de la section", (0, jsx_runtime_1.jsx)("span", { style: styles.layoutBadge, children: section.layoutType })] }), (0, jsx_runtime_1.jsx)("button", { style: styles.closeButton, onClick: onClose, children: (0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '20px' }, children: "close" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.content, children: [section.layoutType === 'ogilvy' && ((0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "view_column" }), "Options Ogilvy"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Colonnes" }), (0, jsx_runtime_1.jsxs)("select", { value: columns, onChange: (e) => setColumns(Number(e.target.value)), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: 2, children: "2 colonnes" }), (0, jsx_runtime_1.jsx)("option", { value: 3, children: "3 colonnes" })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Hauteur (lignes)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: columnLines || '', onChange: (e) => setColumnLines(Number(e.target.value) || 0), placeholder: "auto", min: 5, max: 100, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsx)("div", { style: styles.field, children: (0, jsx_runtime_1.jsxs)("label", { style: styles.checkbox, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: dropCapEnabled, onChange: (e) => setDropCapEnabled(e.target.checked) }), "Lettrine"] }) }), (0, jsx_runtime_1.jsx)("hr", { style: styles.separator }), (0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "comment" }), "Commentaire de fin"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Taille de la fonte (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: endCommentFontSize, onChange: (e) => setEndCommentFontSize(Number(e.target.value)), min: 8, max: 32, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsx)("div", { style: styles.field, children: (0, jsx_runtime_1.jsxs)("label", { style: styles.checkbox, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: endCommentItalic, onChange: (e) => setEndCommentItalic(e.target.checked) }), "Italique"] }) })] })), section.layoutType === 'columns' && ((0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "view_column" }), "Options Colonnes"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Colonnes" }), (0, jsx_runtime_1.jsxs)("select", { value: columns, onChange: (e) => setColumns(Number(e.target.value)), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: 2, children: "2 colonnes" }), (0, jsx_runtime_1.jsx)("option", { value: 3, children: "3 colonnes" })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Hauteur (lignes)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: columnLines || '', onChange: (e) => setColumnLines(Number(e.target.value) || 0), placeholder: "auto", min: 5, max: 100, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsx)("div", { style: styles.field, children: (0, jsx_runtime_1.jsxs)("label", { style: styles.checkbox, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: dropCapEnabled, onChange: (e) => setDropCapEnabled(e.target.checked) }), "Lettrine"] }) })] })), section.layoutType === 'gallery' && ((0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "collections" }), "Options Galerie"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Mode d'affichage" }), (0, jsx_runtime_1.jsxs)("select", { value: galleryLayout, onChange: (e) => setGalleryLayout(e.target.value), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: "grid", children: "Grille (hauteur fixe)" }), (0, jsx_runtime_1.jsx)("option", { value: "masonry", children: "Masonry (largeur fixe)" })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Hauteur des images (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: imageHeight, onChange: (e) => setImageHeight(Number(e.target.value)), min: 50, max: 800, step: 10, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Alignement" }), (0, jsx_runtime_1.jsxs)("select", { value: galleryAlignment, onChange: (e) => setGalleryAlignment(e.target.value), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: "left", children: "Gauche" }), (0, jsx_runtime_1.jsx)("option", { value: "center", children: "Centre" }), (0, jsx_runtime_1.jsx)("option", { value: "right", children: "Droite" }), (0, jsx_runtime_1.jsx)("option", { value: "distribute", children: "Distribuer" })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Espacement (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: galleryGap, onChange: (e) => setGalleryGap(Number(e.target.value)), min: 0, max: 50, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsx)("div", { style: styles.field, children: (0, jsx_runtime_1.jsxs)("label", { style: styles.checkbox, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: showCaptions, onChange: (e) => setShowCaptions(e.target.checked) }), "Afficher les legendes"] }) }), showCaptions && ((0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Alignement des legendes" }), (0, jsx_runtime_1.jsxs)("select", { value: captionAlign, onChange: (e) => setCaptionAlign(e.target.value), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: "left", children: "Gauche" }), (0, jsx_runtime_1.jsx)("option", { value: "right", children: "Droite" })] })] }))] })), (0, jsx_runtime_1.jsx)("hr", { style: styles.separator }), (0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "palette" }), "Apparence"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Couleur de fond" }), (0, jsx_runtime_1.jsxs)("div", { style: styles.colorRow, children: [(0, jsx_runtime_1.jsx)("input", { type: "color", value: backgroundColor || '#ffffff', onChange: (e) => setBackgroundColor(e.target.value), style: styles.colorInput }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: backgroundColor, onChange: (e) => setBackgroundColor(e.target.value), placeholder: "transparent", style: { ...styles.input, flex: 1 }, onFocus: handleInputFocus, onBlur: handleInputBlur }), (0, jsx_runtime_1.jsx)("button", { style: styles.resetButton, onClick: () => setBackgroundColor(''), children: "Reset" })] })] }), (0, jsx_runtime_1.jsx)(PaddingEditor_1.PaddingEditor, { value: padding, onChange: setPadding, label: "Padding" })] }), (0, jsx_runtime_1.jsx)("hr", { style: styles.separator }), (0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "rounded_corner" }), "Bordure"] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '12px', marginBottom: '16px' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "\u00C9paisseur (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: borderWidth, onChange: (e) => setBorderWidth(Number(e.target.value)), min: 0, max: 20, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Coins arrondis (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: borderRadius, onChange: (e) => setBorderRadius(Number(e.target.value)), min: 0, max: 100, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] }), borderWidth > 0 && ((0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Couleur de bordure" }), (0, jsx_runtime_1.jsxs)("div", { style: styles.colorRow, children: [(0, jsx_runtime_1.jsx)("input", { type: "color", value: borderColor, onChange: (e) => setBorderColor(e.target.value), style: styles.colorInput }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: borderColor, onChange: (e) => setBorderColor(e.target.value), style: { ...styles.input, flex: 1 }, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] }))] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "blur_on" }), "Ombre port\u00E9e"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Flou (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: shadowBlur, onChange: (e) => setShadowBlur(Number(e.target.value)), min: 0, max: 100, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), shadowBlur > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '12px', marginBottom: '16px' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "D\u00E9calage X (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: shadowOffsetX, onChange: (e) => setShadowOffsetX(Number(e.target.value)), min: -50, max: 50, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "D\u00E9calage Y (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: shadowOffsetY, onChange: (e) => setShadowOffsetY(Number(e.target.value)), min: -50, max: 50, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Couleur de l'ombre" }), (0, jsx_runtime_1.jsxs)("div", { style: styles.colorRow, children: [(0, jsx_runtime_1.jsx)("input", { type: "color", value: shadowColor.startsWith('rgba') ? '#000000' : shadowColor, onChange: (e) => setShadowColor(e.target.value), style: styles.colorInput }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: shadowColor, onChange: (e) => setShadowColor(e.target.value), placeholder: "rgba(0,0,0,0.15)", style: { ...styles.input, flex: 1 }, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] })] }))] }), (0, jsx_runtime_1.jsx)("hr", { style: styles.separator }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsxs)("label", { style: styles.label, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: styles.labelIcon, children: "code" }), "Classe CSS"] }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: className, onChange: (e) => setClassName(e.target.value), placeholder: "ex: my-custom-class", style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.footer, children: [(0, jsx_runtime_1.jsx)("button", { style: { ...styles.button, ...styles.cancelButton }, onClick: onClose, children: "Annuler" }), (0, jsx_runtime_1.jsx)("button", { style: { ...styles.button, ...styles.saveButton }, onClick: handleSave, children: "Enregistrer" })] })] }) }));
|
|
315
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: styles.overlay, onClick: onClose, children: (0, jsx_runtime_1.jsxs)("div", { style: styles.dialog, onClick: (e) => e.stopPropagation(), children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.header, children: [(0, jsx_runtime_1.jsxs)("h3", { style: styles.headerTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '20px' }, children: "tune" }), "Options de la section", (0, jsx_runtime_1.jsx)("span", { style: styles.layoutBadge, children: section.layoutType })] }), (0, jsx_runtime_1.jsx)("button", { style: styles.closeButton, onClick: onClose, children: (0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '20px' }, children: "close" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.content, children: [section.layoutType === 'ogilvy' && ((0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "view_column" }), "Options Ogilvy"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Colonnes" }), (0, jsx_runtime_1.jsxs)("select", { value: columns, onChange: (e) => setColumns(Number(e.target.value)), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: 2, children: "2 colonnes" }), (0, jsx_runtime_1.jsx)("option", { value: 3, children: "3 colonnes" })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Hauteur (lignes)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: columnLines || '', onChange: (e) => setColumnLines(Number(e.target.value) || 0), placeholder: "auto", min: 5, max: 100, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '12px', alignItems: 'flex-end', marginBottom: '16px' }, children: [(0, jsx_runtime_1.jsx)("div", { style: { flex: 1 }, children: (0, jsx_runtime_1.jsxs)("label", { style: styles.checkbox, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: dropCapEnabled, onChange: (e) => setDropCapEnabled(e.target.checked) }), "Lettrine"] }) }), dropCapEnabled && ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Taille (em)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: dropCapSize, onChange: (e) => setDropCapSize(Number(e.target.value)), min: 2, max: 10, step: 0.5, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }))] }), (0, jsx_runtime_1.jsx)("hr", { style: styles.separator }), (0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "comment" }), "Commentaire de fin"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Taille de la fonte (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: endCommentFontSize, onChange: (e) => setEndCommentFontSize(Number(e.target.value)), min: 8, max: 32, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsx)("div", { style: styles.field, children: (0, jsx_runtime_1.jsxs)("label", { style: styles.checkbox, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: endCommentItalic, onChange: (e) => setEndCommentItalic(e.target.checked) }), "Italique"] }) })] })), section.layoutType === 'columns' && ((0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "view_column" }), "Options Colonnes"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Colonnes" }), (0, jsx_runtime_1.jsxs)("select", { value: columns, onChange: (e) => setColumns(Number(e.target.value)), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: 2, children: "2 colonnes" }), (0, jsx_runtime_1.jsx)("option", { value: 3, children: "3 colonnes" })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Hauteur (lignes)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: columnLines || '', onChange: (e) => setColumnLines(Number(e.target.value) || 0), placeholder: "auto", min: 5, max: 100, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '12px', alignItems: 'flex-end', marginBottom: '16px' }, children: [(0, jsx_runtime_1.jsx)("div", { style: { flex: 1 }, children: (0, jsx_runtime_1.jsxs)("label", { style: styles.checkbox, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: dropCapEnabled, onChange: (e) => setDropCapEnabled(e.target.checked) }), "Lettrine"] }) }), dropCapEnabled && ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Taille (em)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: dropCapSize, onChange: (e) => setDropCapSize(Number(e.target.value)), min: 2, max: 10, step: 0.5, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }))] })] })), section.layoutType === 'gallery' && ((0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "collections" }), "Options Galerie"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Mode d'affichage" }), (0, jsx_runtime_1.jsxs)("select", { value: galleryLayout, onChange: (e) => setGalleryLayout(e.target.value), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: "grid", children: "Grille (hauteur fixe)" }), (0, jsx_runtime_1.jsx)("option", { value: "masonry", children: "Masonry (largeur fixe)" })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Hauteur des images (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: imageHeight, onChange: (e) => setImageHeight(Number(e.target.value)), min: 50, max: 800, step: 10, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Alignement" }), (0, jsx_runtime_1.jsxs)("select", { value: galleryAlignment, onChange: (e) => setGalleryAlignment(e.target.value), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: "left", children: "Gauche" }), (0, jsx_runtime_1.jsx)("option", { value: "center", children: "Centre" }), (0, jsx_runtime_1.jsx)("option", { value: "right", children: "Droite" }), (0, jsx_runtime_1.jsx)("option", { value: "distribute", children: "Distribuer" })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Espacement (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: galleryGap, onChange: (e) => setGalleryGap(Number(e.target.value)), min: 0, max: 50, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsx)("div", { style: styles.field, children: (0, jsx_runtime_1.jsxs)("label", { style: styles.checkbox, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: showCaptions, onChange: (e) => setShowCaptions(e.target.checked) }), "Afficher les legendes"] }) }), showCaptions && ((0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Alignement des legendes" }), (0, jsx_runtime_1.jsxs)("select", { value: captionAlign, onChange: (e) => setCaptionAlign(e.target.value), style: styles.select, onFocus: handleInputFocus, onBlur: handleInputBlur, children: [(0, jsx_runtime_1.jsx)("option", { value: "left", children: "Gauche" }), (0, jsx_runtime_1.jsx)("option", { value: "right", children: "Droite" })] })] }))] })), (0, jsx_runtime_1.jsx)("hr", { style: styles.separator }), (0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "palette" }), "Apparence"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Couleur de fond" }), (0, jsx_runtime_1.jsxs)("div", { style: styles.colorRow, children: [(0, jsx_runtime_1.jsx)("input", { type: "color", value: backgroundColor || '#ffffff', onChange: (e) => setBackgroundColor(e.target.value), style: styles.colorInput }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: backgroundColor, onChange: (e) => setBackgroundColor(e.target.value), placeholder: "transparent", style: { ...styles.input, flex: 1 }, onFocus: handleInputFocus, onBlur: handleInputBlur }), (0, jsx_runtime_1.jsx)("button", { style: styles.resetButton, onClick: () => setBackgroundColor(''), children: "Reset" })] })] }), (0, jsx_runtime_1.jsx)(PaddingEditor_1.PaddingEditor, { value: padding, onChange: setPadding, label: "Padding" })] }), (0, jsx_runtime_1.jsx)("hr", { style: styles.separator }), (0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "rounded_corner" }), "Bordure"] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '12px', marginBottom: '16px' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "\u00C9paisseur (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: borderWidth, onChange: (e) => setBorderWidth(Number(e.target.value)), min: 0, max: 20, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Coins arrondis (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: borderRadius, onChange: (e) => setBorderRadius(Number(e.target.value)), min: 0, max: 100, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] }), borderWidth > 0 && ((0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Couleur de bordure" }), (0, jsx_runtime_1.jsxs)("div", { style: styles.colorRow, children: [(0, jsx_runtime_1.jsx)("input", { type: "color", value: borderColor, onChange: (e) => setBorderColor(e.target.value), style: styles.colorInput }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: borderColor, onChange: (e) => setBorderColor(e.target.value), style: { ...styles.input, flex: 1 }, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] }))] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.section, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.sectionTitle, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: { fontSize: '18px' }, children: "blur_on" }), "Ombre port\u00E9e"] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Flou (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: shadowBlur, onChange: (e) => setShadowBlur(Number(e.target.value)), min: 0, max: 100, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), shadowBlur > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', gap: '12px', marginBottom: '16px' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "D\u00E9calage X (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: shadowOffsetX, onChange: (e) => setShadowOffsetX(Number(e.target.value)), min: -50, max: 50, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] }), (0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "D\u00E9calage Y (px)" }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: shadowOffsetY, onChange: (e) => setShadowOffsetY(Number(e.target.value)), min: -50, max: 50, style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsx)("label", { style: styles.label, children: "Couleur de l'ombre" }), (0, jsx_runtime_1.jsxs)("div", { style: styles.colorRow, children: [(0, jsx_runtime_1.jsx)("input", { type: "color", value: shadowColor.startsWith('rgba') ? '#000000' : shadowColor, onChange: (e) => setShadowColor(e.target.value), style: styles.colorInput }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: shadowColor, onChange: (e) => setShadowColor(e.target.value), placeholder: "rgba(0,0,0,0.15)", style: { ...styles.input, flex: 1 }, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] })] }))] }), (0, jsx_runtime_1.jsx)("hr", { style: styles.separator }), (0, jsx_runtime_1.jsxs)("div", { style: styles.field, children: [(0, jsx_runtime_1.jsxs)("label", { style: styles.label, children: [(0, jsx_runtime_1.jsx)("span", { className: "material-icons", style: styles.labelIcon, children: "code" }), "Classe CSS"] }), (0, jsx_runtime_1.jsx)("input", { type: "text", value: className, onChange: (e) => setClassName(e.target.value), placeholder: "ex: my-custom-class", style: styles.input, onFocus: handleInputFocus, onBlur: handleInputBlur })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: styles.footer, children: [(0, jsx_runtime_1.jsx)("button", { style: { ...styles.button, ...styles.cancelButton }, onClick: onClose, children: "Annuler" }), (0, jsx_runtime_1.jsx)("button", { style: { ...styles.button, ...styles.saveButton }, onClick: handleSave, children: "Enregistrer" })] })] }) }));
|
|
314
316
|
}
|
|
315
317
|
exports.default = SectionOptionsModal;
|