Files
plume/.next/static/chunks/a56b0a8519201145.js

1 line
10 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54956,e=>{"use strict";let s=(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",()=>s],54956)},62200,e=>{"use strict";let s=(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",()=>s],62200)},82546,e=>{"use strict";let s=(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",()=>s],82546)},78424,e=>{"use strict";var s=e.i(30064),t=e.i(59760),l=e.i(71143),r=e.i(46553),a=e.i(43331),n=e.i(82546),i=e.i(78445);let o=(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"}]]),x={genre:"",subGenre:"",targetAudience:"",tone:"",pov:"",tense:"",synopsis:"",themes:""},b=({project:e,onUpdate:i,onDeleteProject:b})=>{let[g,m]=(0,t.useState)(e.settings||x),[h,p]=(0,t.useState)(!1);(0,t.useEffect)(()=>{e.settings&&m(e.settings)},[e.settings]);let f=(s,t)=>{let l={...g,[s]:t};m(l),i({...e,settings:l})};return(0,s.jsx)("div",{className:"h-full bg-[#eef2ff] p-8 overflow-y-auto",children:(0,s.jsxs)("div",{className:"max-w-4xl mx-auto bg-white rounded-xl shadow-lg border border-slate-200 overflow-hidden",children:[(0,s.jsxs)("div",{className:"bg-slate-900 text-white p-6 border-b border-slate-800 flex items-center gap-4",children:[(0,s.jsx)("div",{className:"bg-blue-600 p-3 rounded-lg",children:(0,s.jsx)(r.Settings,{size:24})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-2xl font-bold",children:"Paramètres Généraux du Roman"}),(0,s.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,s.jsxs)("div",{className:"p-8 space-y-8",children:[(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsxs)("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2 border-b border-slate-100 pb-2",children:[(0,s.jsx)(a.Book,{size:18,className:"text-blue-600"})," Informations de Base"]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Titre du Roman"}),(0,s.jsx)("input",{type:"text",value:e.title,onChange:s=>i({...e,title:s.target.value}),className:"w-full p-2.5 bg-[#eef2ff] border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none font-serif font-bold text-lg"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Nom d'Auteur"}),(0,s.jsx)("input",{type:"text",value:e.author,onChange:s=>i({...e,author:s.target.value}),className:"w-full p-2.5 bg-[#eef2ff] border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Synopsis Global"}),(0,s.jsx)("textarea",{value:g.synopsis,onChange:e=>f("synopsis",e.target.value),className:"w-full p-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none h-24 text-sm bg-[#eef2ff]",placeholder:"De quoi parle votre histoire dans les grandes lignes ?"})]})]}),(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsxs)("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2 border-b border-slate-100 pb-2",children:[(0,s.jsx)(c.Target,{size:18,className:"text-red-500"})," Genre & Public"]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Genre Principal"}),(0,s.jsx)("input",{type:"text",list:"genre-suggestions",value:g.genre,onChange:e=>f("genre",e.target.value),className:"w-full p-2.5 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none bg-[#eef2ff]",placeholder:"Ex: Fantasy"}),(0,s.jsx)("datalist",{id:"genre-suggestions",children:l.GENRES.map(e=>(0,s.jsx)("option",{value:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Sous-Genre"}),(0,s.jsx)("input",{type:"text",value:g.subGenre||"",onChange:e=>f("subGenre",e.target.value),className:"w-full p-2.5 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none bg-[#eef2ff]",placeholder:"Ex: Dark Fantasy"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Public Cible"}),(0,s.jsx)("input",{type:"text",value:g.targetAudience,onChange:e=>f("targetAudience",e.target.value),className:"w-full p-2.5 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none bg-[#eef2ff]",placeholder:"Ex: Jeune Adulte, Adulte..."})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Thèmes Clés"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(u,{size:14,className:"absolute left-3 top-3 text-slate-400"}),(0,s.jsx)("input",{type:"text",value:g.themes,onChange:e=>f("themes",e.target.value),className:"w-full pl-9 p-2.5 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none bg-[#eef2ff]",placeholder:"Ex: Vengeance, Rédemption, Voyage initiatique..."})]})]})]}),(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsxs)("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2 border-b border-slate-100 pb-2",children:[(0,s.jsx)(n.Feather,{size:18,className:"text-purple-600"})," Narration & Style"]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-semibold text-slate-600 mb-1 flex items-center gap-1",children:[(0,s.jsx)(o,{size:14})," Point de Vue (POV)"]}),(0,s.jsxs)("select",{value:g.pov,onChange:e=>f("pov",e.target.value),className:"w-full p-2.5 bg-[#eef2ff] border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none",children:[(0,s.jsx)("option",{value:"",children:"Sélectionner..."}),l.POV_OPTIONS.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-semibold text-slate-600 mb-1 flex items-center gap-1",children:[(0,s.jsx)(d.Clock,{size:14})," Temps du récit"]}),(0,s.jsxs)("select",{value:g.tense,onChange:e=>f("tense",e.target.value),className:"w-full p-2.5 bg-[#eef2ff] border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none",children:[(0,s.jsx)("option",{value:"",children:"Sélectionner..."}),l.TENSE_OPTIONS.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Ton Général"}),(0,s.jsx)("input",{type:"text",list:"tone-suggestions",value:g.tone,onChange:e=>f("tone",e.target.value),className:"w-full p-2.5 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 outline-none bg-[#eef2ff]",placeholder:"Ex: Sombre, Ironique..."}),(0,s.jsx)("datalist",{id:"tone-suggestions",children:l.TONES.map(e=>(0,s.jsx)("option",{value:e},e))})]})]}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-slate-600 mb-1",children:"Guide de Style & Instructions IA (Prompt Système)"}),(0,s.jsx)("p",{className:"text-xs text-slate-400 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,s.jsx)("textarea",{value:e.styleGuide||"",onChange:s=>{var t;return t=s.target.value,void i({...e,styleGuide:t})},className:"w-full p-3 border border-indigo-100 bg-[#eef2ff] rounded-lg focus:ring-2 focus:ring-indigo-500 outline-none h-32 text-sm font-mono text-slate-700",placeholder:"Ex: Utilise un style descriptif et sensoriel. Évite les adverbes. Le narrateur est cynique."})]})]}),(0,s.jsxs)("section",{className:"space-y-4 pt-8 border-t border-red-200",children:[(0,s.jsxs)("h3",{className:"text-lg font-bold text-red-600 flex items-center gap-2 pb-2",children:[(0,s.jsx)("span",{className:"bg-red-100 p-1 rounded",children:"⚠️"})," Zone de Danger"]}),(0,s.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:[(0,s.jsx)("h4",{className:"font-bold text-red-900 mb-2",children:"Supprimer le projet"}),(0,s.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."}),h?(0,s.jsxs)("div",{className:"flex items-center gap-4 bg-white p-4 rounded border border-red-200",children:[(0,s.jsx)("span",{className:"text-sm font-bold text-slate-700",children:"Êtes-vous sûr ?"}),(0,s.jsx)("button",{onClick:b,className:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 text-sm font-bold",children:"Oui, supprimer définitivement"}),(0,s.jsx)("button",{onClick:()=>p(!1),className:"px-4 py-2 bg-slate-200 text-slate-700 rounded hover:bg-slate-300 text-sm",children:"Annuler"})]}):(0,s.jsx)("button",{onClick:()=>p(!0),className:"px-4 py-2 bg-white border border-red-300 text-red-600 rounded hover:bg-red-50 text-sm font-bold",children:"Supprimer ce projet"})]})]})]})]})})};var g=e.i(12856),m=e.i(18404),h=e.i(8011);function p(e){let{project:t,updateProject:l}=e,r=(0,g.useParams)(),a=(0,g.useRouter)(),n=r.id,{user:i}=(0,m.useAuthContext)(),{deleteProject:o}=(0,h.useProjects)(i);return t?(0,s.jsx)(b,{project:t,onUpdate:e=>l?.(e),onDeleteProject:async()=>{await o(n),a.push("/dashboard")}}):null}e.s(["default",()=>p],78424)}]);