@qwanyx/ai-editor 1.7.0 → 1.7.2
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.
- package/dist/components/SectionOptionsModal.d.ts.map +1 -1
- package/dist/components/SectionOptionsModal.js +7 -5
- package/dist/layouts/ColumnsLayout.d.ts.map +1 -1
- package/dist/layouts/ColumnsLayout.js +3 -2
- package/dist/layouts/OgilvyLayout.d.ts.map +1 -1
- package/dist/layouts/OgilvyLayout.js +3 -2
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnsLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/ColumnsLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAkB,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAQ9D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,CAAC,GAAG,CAAC,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,aAAa,CAAA;CACvB;AAcD,wBAAgB,2BAA2B,IAAI,cAAc,CAM5D;AAMD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,eAAe,GAChB,EAAE,oBAAoB,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"ColumnsLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/ColumnsLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAkB,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAQ9D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,CAAC,GAAG,CAAC,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,aAAa,CAAA;CACvB;AAcD,wBAAgB,2BAA2B,IAAI,cAAc,CAM5D;AAMD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,eAAe,GAChB,EAAE,oBAAoB,CAAC,cAAc,CAAC,2CA4DtC"}
|
|
@@ -38,12 +38,13 @@ function ColumnsLayout({ section, isEditing, onContentChange, }) {
|
|
|
38
38
|
}, [content, onContentChange]);
|
|
39
39
|
return ((0, jsx_runtime_1.jsx)("div", { style: styles.container, children: (0, jsx_runtime_1.jsxs)("div", { className: content.dropCap.enabled ? 'columns-drop-cap' : '', style: {
|
|
40
40
|
['--drop-cap-size']: `${content.dropCap.fontSize || 3}em`,
|
|
41
|
+
['--drop-cap-lines']: `${Math.round(content.dropCap.fontSize || 3)}`,
|
|
41
42
|
['--drop-cap-color']: content.dropCap.color || 'inherit',
|
|
42
43
|
['--drop-cap-font']: content.dropCap.fontFamily || 'inherit',
|
|
43
44
|
}, children: [(0, jsx_runtime_1.jsx)("style", { children: `
|
|
44
45
|
.columns-drop-cap .editor-paragraph:first-of-type::first-letter {
|
|
45
|
-
-webkit-initial-letter: 3;
|
|
46
|
-
initial-letter: 3;
|
|
46
|
+
-webkit-initial-letter: var(--drop-cap-lines, 3);
|
|
47
|
+
initial-letter: var(--drop-cap-lines, 3);
|
|
47
48
|
font-size: var(--drop-cap-size, 3em);
|
|
48
49
|
font-family: var(--drop-cap-font, inherit);
|
|
49
50
|
color: var(--drop-cap-color, inherit);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OgilvyLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/OgilvyLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAGd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAkB,oBAAoB,EAAE,MAAM,SAAS,CAAA;AA6F9D,wBAAgB,0BAA0B,IAAI,aAAa,CAmB1D;AAyED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,eAAe,GAChB,EAAE,oBAAoB,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"OgilvyLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/OgilvyLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAGd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAkB,oBAAoB,EAAE,MAAM,SAAS,CAAA;AA6F9D,wBAAgB,0BAA0B,IAAI,aAAa,CAmB1D;AAyED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,eAAe,GAChB,EAAE,oBAAoB,CAAC,aAAa,CAAC,2CA6HrC"}
|
|
@@ -155,12 +155,13 @@ function OgilvyLayout({ section, isEditing, onContentChange, }) {
|
|
|
155
155
|
};
|
|
156
156
|
return ((0, jsx_runtime_1.jsxs)("div", { style: styles.container, children: [(0, jsx_runtime_1.jsxs)("div", { style: styles.titleContainer, children: [(0, jsx_runtime_1.jsx)(EditableText, { value: content.title, onChange: (v) => updateField('title', v), isEditing: isEditing, placeholder: "Titre", style: styles.title, inputStyle: styles.titleInput, as: "h1" }), (0, jsx_runtime_1.jsx)(EditableText, { value: content.subtitle, onChange: (v) => updateField('subtitle', v), isEditing: isEditing, placeholder: "Sous-titre", style: styles.subtitle, inputStyle: styles.subtitleInput, as: "h2" })] }), (0, jsx_runtime_1.jsxs)("div", { className: content.dropCap.enabled ? 'ogilvy-drop-cap' : '', style: {
|
|
157
157
|
['--drop-cap-size']: `${content.dropCap.fontSize || 3}em`,
|
|
158
|
+
['--drop-cap-lines']: `${Math.round(content.dropCap.fontSize || 3)}`,
|
|
158
159
|
['--drop-cap-color']: content.dropCap.color || 'inherit',
|
|
159
160
|
['--drop-cap-font']: content.dropCap.fontFamily || 'inherit',
|
|
160
161
|
}, children: [(0, jsx_runtime_1.jsx)("style", { children: `
|
|
161
162
|
.ogilvy-drop-cap .editor-paragraph:first-of-type::first-letter {
|
|
162
|
-
-webkit-initial-letter: 3;
|
|
163
|
-
initial-letter: 3;
|
|
163
|
+
-webkit-initial-letter: var(--drop-cap-lines, 3);
|
|
164
|
+
initial-letter: var(--drop-cap-lines, 3);
|
|
164
165
|
font-size: var(--drop-cap-size, 3em);
|
|
165
166
|
font-family: var(--drop-cap-font, inherit);
|
|
166
167
|
color: var(--drop-cap-color, inherit);
|