{
  "id": "story-prompt",
  "name": "Story Prompt",
  "category": "creative",
  "tags": ["story", "writing", "prompt", "creative", "fiction", "narrative"],
  "description": "Random story prompts with genre, character, setting, and conflict generators.",
  "triggers": ["story prompt", "writing prompt", "story idea", "creative writing", "fiction prompt"],
  "defaultSize": { "w": 5, "h": 5 },
  "source": "function StoryPrompt() {\n  const genres = ['Sci-Fi','Fantasy','Mystery','Romance','Horror','Thriller','Comedy','Drama'];\n  const characters = ['a retired spy','a time-traveling barista','an alien archaeologist','a ghostwriter for the dead','a robot learning to paint','a chef who can taste memories','a librarian with a secret','a musician who hears colors'];\n  const settings = ['a city built inside a giant tree','a space station at the edge of a black hole','a small town where no one sleeps','a library containing every book never written','a submarine in a methane ocean','a marketplace between dimensions','a house that rearranges itself','a train that stops at different decades'];\n  const conflicts = ['must deliver a message that could start a war','discovers their reflection is plotting against them','has 24 hours to solve a murder they will commit','finds a door in their basement that leads to yesterday','inherits a curse that makes everyone tell them the truth','must choose between saving one person or a million','realizes they are a character in someone else's dream','has to teach an AI what it means to be human'];\n\n  const [prompt, setPrompt] = React.useState('');\n\n  const generate = ()=>{\n    const g = genres[Math.floor(Math.random()*genres.length)];\n    const c = characters[Math.floor(Math.random()*characters.length)];\n    const s = settings[Math.floor(Math.random()*settings.length)];\n    const x = conflicts[Math.floor(Math.random()*conflicts.length)];\n    setPrompt(`<strong>Genre:</strong> ${g}<br/><strong>Character:</strong> ${c}<br/><strong>Setting:</strong> ${s}<br/><strong>Conflict:</strong> ${x}`);\n  };\n\n  React.useEffect(()=>generate(),[]);\n\n  return (\n    <div style={{padding:20,fontFamily:'system-ui',height:'100%',display:'flex',flexDirection:'column'}}>\n      <div style={{fontSize:18,fontWeight:700,marginBottom:12}}>Story Prompt</div>\n      <div style={{flex:1,padding:16,background:'#f8f8f8',borderRadius:12,marginBottom:12,lineHeight:1.6,fontSize:14,overflow:'auto'}}\n        dangerouslySetInnerHTML={{__html:prompt}}/>\n      <button onClick={generate}\n        style={{padding:'10px',borderRadius:8,background:'#AF52DE',color:'#fff',border:'none',cursor:'pointer',fontSize:14,fontWeight:600}}>\n        New Prompt\n      </button>\n    </div>\n  );\n}\nrender(<StoryPrompt/>);",
  "placeholders": []
}
