Files
plume/.next/static/chunks/2fccc3238b861960.js
2026-02-28 08:42:15 +01:00

1 line
11 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54956,e=>{"use strict";let t=(0,e.i(78445).default)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);e.s(["Target",()=>t],54956)},62200,e=>{"use strict";let t=(0,e.i(78445).default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Clock",()=>t],62200)},82546,e=>{"use strict";let t=(0,e.i(78445).default)("feather",[["path",{d:"M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z",key:"18jl4k"}],["path",{d:"M16 8 2 22",key:"vp34q"}],["path",{d:"M17.5 15H9",key:"1oz8nu"}]]);e.s(["Feather",()=>t],82546)},78424,e=>{"use strict";var t=e.i(30064),s=e.i(59760),r=e.i(71143),l=e.i(46553),o=e.i(43331),n=e.i(82546),i=e.i(78445);let a=(0,i.default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);var d=e.i(62200),c=e.i(54956);let u=(0,i.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),m={genre:"",subGenre:"",targetAudience:"",tone:"",pov:"",tense:"",synopsis:"",themes:""},x=({project:e,onUpdate:i,onDeleteProject:x})=>{let[b,h]=(0,s.useState)(e.settings||m),[g,p]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e.settings&&h(e.settings)},[e.settings]);let f=(t,s)=>{let r={...b,[t]:s};h(r),i({...e,settings:r})};return(0,t.jsx)("div",{className:"h-full bg-theme-bg p-8 overflow-y-auto transition-colors duration-300",children:(0,t.jsxs)("div",{className:"max-w-4xl mx-auto bg-theme-panel rounded-xl shadow-lg border border-theme-border overflow-hidden transition-colors duration-300",children:[(0,t.jsxs)("div",{className:"bg-slate-900 text-white p-6 border-b border-slate-800 flex items-center gap-4",children:[(0,t.jsx)("div",{className:"bg-blue-600 p-3 rounded-lg",children:(0,t.jsx)(l.Settings,{size:24})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:"Paramètres Généraux du Roman"}),(0,t.jsx)("p",{className:"text-slate-400 text-sm",children:"Définissez l'identité, le ton et les règles de votre œuvre pour guider l'IA."})]})]}),(0,t.jsxs)("div",{className:"p-8 space-y-8",children:[(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsxs)("h3",{className:"text-lg font-bold text-theme-text flex items-center gap-2 border-b border-theme-border pb-2",children:[(0,t.jsx)(o.Book,{size:18,className:"text-blue-600"})," Informations de Base"]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Titre du Roman"}),(0,t.jsx)("input",{type:"text",value:e.title,onChange:t=>i({...e,title:t.target.value}),className:"w-full p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none font-serif font-bold text-lg transition-colors duration-300"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Nom d'Auteur"}),(0,t.jsx)("input",{type:"text",value:e.author,onChange:t=>i({...e,author:t.target.value}),className:"w-full p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none transition-colors duration-300"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Synopsis Global"}),(0,t.jsx)("textarea",{value:b.synopsis,onChange:e=>f("synopsis",e.target.value),className:"w-full p-3 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none h-24 text-sm transition-colors duration-300",placeholder:"De quoi parle votre histoire dans les grandes lignes ?"})]})]}),(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsxs)("h3",{className:"text-lg font-bold text-theme-text flex items-center gap-2 border-b border-theme-border pb-2",children:[(0,t.jsx)(c.Target,{size:18,className:"text-red-500"})," Genre & Public"]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Genre Principal"}),(0,t.jsx)("input",{type:"text",list:"genre-suggestions",value:b.genre,onChange:e=>f("genre",e.target.value),className:"w-full p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none transition-colors duration-300",placeholder:"Ex: Fantasy"}),(0,t.jsx)("datalist",{id:"genre-suggestions",children:r.GENRES.map(e=>(0,t.jsx)("option",{value:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Sous-Genre"}),(0,t.jsx)("input",{type:"text",value:b.subGenre||"",onChange:e=>f("subGenre",e.target.value),className:"w-full p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none transition-colors duration-300",placeholder:"Ex: Dark Fantasy"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Public Cible"}),(0,t.jsx)("input",{type:"text",value:b.targetAudience,onChange:e=>f("targetAudience",e.target.value),className:"w-full p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none transition-colors duration-300",placeholder:"Ex: Jeune Adulte, Adulte..."})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Thèmes Clés"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(u,{size:14,className:"absolute left-3 top-3 text-theme-muted"}),(0,t.jsx)("input",{type:"text",value:b.themes,onChange:e=>f("themes",e.target.value),className:"w-full pl-9 p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none transition-colors duration-300",placeholder:"Ex: Vengeance, Rédemption, Voyage initiatique..."})]})]})]}),(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsxs)("h3",{className:"text-lg font-bold text-theme-text flex items-center gap-2 border-b border-theme-border pb-2",children:[(0,t.jsx)(n.Feather,{size:18,className:"text-purple-600"})," Narration & Style"]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-theme-muted mb-1 flex items-center gap-1",children:[(0,t.jsx)(a,{size:14})," Point de Vue (POV)"]}),(0,t.jsxs)("select",{value:b.pov,onChange:e=>f("pov",e.target.value),className:"w-full p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none transition-colors duration-300",children:[(0,t.jsx)("option",{value:"",children:"Sélectionner..."}),r.POV_OPTIONS.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-theme-muted mb-1 flex items-center gap-1",children:[(0,t.jsx)(d.Clock,{size:14})," Temps du récit"]}),(0,t.jsxs)("select",{value:b.tense,onChange:e=>f("tense",e.target.value),className:"w-full p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none transition-colors duration-300",children:[(0,t.jsx)("option",{value:"",children:"Sélectionner..."}),r.TENSE_OPTIONS.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Ton Général"}),(0,t.jsx)("input",{type:"text",list:"tone-suggestions",value:b.tone,onChange:e=>f("tone",e.target.value),className:"w-full p-2.5 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none transition-colors duration-300",placeholder:"Ex: Sombre, Ironique..."}),(0,t.jsx)("datalist",{id:"tone-suggestions",children:r.TONES.map(e=>(0,t.jsx)("option",{value:e},e))})]})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-theme-muted mb-1",children:"Guide de Style & Instructions IA (Prompt Système)"}),(0,t.jsx)("p",{className:"text-xs text-theme-muted mb-2",children:'Ces instructions seront envoyées à l\'IA à chaque génération. Décrivez ici le style d\'écriture désiré (ex: "phrases courtes", "vocabulaire soutenu", "beaucoup de métaphores").'}),(0,t.jsx)("textarea",{value:e.styleGuide||"",onChange:t=>{var s;return s=t.target.value,void i({...e,styleGuide:s})},className:"w-full p-3 bg-theme-bg text-theme-text border border-theme-border rounded-lg focus:ring-2 focus:ring-indigo-500 outline-none h-32 text-sm font-mono transition-colors duration-300",placeholder:"Ex: Utilise un style descriptif et sensoriel. Évite les adverbes. Le narrateur est cynique."})]})]}),(0,t.jsxs)("section",{className:"space-y-4 pt-8 border-t border-red-200",children:[(0,t.jsxs)("h3",{className:"text-lg font-bold text-red-600 flex items-center gap-2 pb-2",children:[(0,t.jsx)("span",{className:"bg-red-100 p-1 rounded",children:"⚠️"})," Zone de Danger"]}),(0,t.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:[(0,t.jsx)("h4",{className:"font-bold text-red-900 mb-2",children:"Supprimer le projet"}),(0,t.jsx)("p",{className:"text-sm text-red-700 mb-4",children:"Cette action est irréversible. Toutes les données associées à ce projet (chapitres, entités, idées) seront définitivement effacées."}),g?(0,t.jsxs)("div",{className:"flex items-center gap-4 bg-theme-panel p-4 rounded border border-red-200",children:[(0,t.jsx)("span",{className:"text-sm font-bold text-theme-text",children:"Êtes-vous sûr ?"}),(0,t.jsx)("button",{onClick:x,className:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 text-sm font-bold opacity-90 transition-opacity",children:"Oui, supprimer définitivement"}),(0,t.jsx)("button",{onClick:()=>p(!1),className:"px-4 py-2 bg-theme-bg text-theme-text border border-theme-border rounded hover:opacity-80 text-sm transition-opacity",children:"Annuler"})]}):(0,t.jsx)("button",{onClick:()=>p(!0),className:"px-4 py-2 bg-theme-panel border border-red-300 text-red-600 rounded hover:bg-red-50 text-sm font-bold transition-colors duration-300",children:"Supprimer ce projet"})]})]})]})]})})};var b=e.i(24224),h=e.i(12856);function g(){let{project:e,updateProject:s,deleteProject:r}=(0,b.useProjectContext)(),l=(0,h.useRouter)();return(0,t.jsx)(x,{project:e,onUpdate:e=>s(e),onDeleteProject:async()=>{await r(),l.push("/dashboard")}})}e.s(["default",()=>g],78424)}]);