{"version":3,"file":"PromptBlock.DIyoPrBA.mjs","names":["useState","useRef","startTransition","__esmMin","init_npm_react_18_3_1","te","navigator","window","init_ssg_sandbox_shims","_e","de","c","ce","init_framer_BkYB2Gqq","addPropertyControls","ControlType","PromptBlock","props","copied","setCopied","timer","onCopy","prompt","SURF","LINE","style","MONO","BLUE","label","INK","__FramerMetadata__","init_PromptBlock","init_jsx_runtime","\"exports\"","\"default\"","\"type\"","\"name\"","\"slots\"","\"annotations\"","\"framerContractVersion\"","\"framerSupportedLayoutWidth\"","\"framerSupportedLayoutHeight\"","\"framerIntrinsicWidth\"","\"__FramerMetadata__\""],"sources":["https:/framerusercontent.com/modules/MZsunJsZ3BpDLmwB8jvN/9i3AjmxdAPymr5dSBbDl/PromptBlock.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useRef,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const INK=\"#001122\";const BLUE=\"#0265DE\";const LINE=\"#D5DDE8\";const SURF=\"#F4F7FB\";const MONO=\"'IBM Plex Mono', ui-monospace, Menlo, monospace\";/**\n * Prompt Block: a copyable, wrapping prompt box for blog posts (CMS rich text embed).\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 640\n */export default function PromptBlock(props){const{prompt=\"Paste a prompt here.\",label=\"Prompt\",style}=props;const[copied,setCopied]=useState(false);const timer=useRef(0);useEffect(()=>()=>window.clearTimeout(timer.current),[]);const onCopy=()=>{if(typeof navigator!==\"undefined\"&&navigator.clipboard){navigator.clipboard.writeText(prompt).catch(()=>{});}startTransition(()=>setCopied(true));window.clearTimeout(timer.current);timer.current=window.setTimeout(()=>startTransition(()=>setCopied(false)),1600);};return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",boxSizing:\"border-box\",background:SURF,border:`1px solid ${LINE}`,borderRadius:12,padding:\"11px 16px 13px\",margin:\"8px 0\",...style},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:12,marginBottom:6},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:MONO,fontSize:12,lineHeight:\"16px\",letterSpacing:\"0.06em\",textTransform:\"uppercase\",color:BLUE},children:label}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:onCopy,\"aria-label\":\"Copy prompt\",style:{fontFamily:MONO,fontSize:12,lineHeight:\"16px\",color:BLUE,background:\"#FFFFFF\",border:`1px solid ${LINE}`,borderRadius:8,padding:\"4px 10px\",cursor:\"pointer\"},children:copied?\"Copied\":\"Copy\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:MONO,fontSize:13,lineHeight:\"1.55em\",color:INK,whiteSpace:\"pre-wrap\",overflowWrap:\"anywhere\"},children:prompt})]});}addPropertyControls(PromptBlock,{prompt:{type:ControlType.String,title:\"Prompt\",defaultValue:\"Paste a prompt here.\",displayTextArea:true},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Prompt\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PromptBlock\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"640\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PromptBlock.map"],"mappings":"A,iNAMG,SAAwBgB,EAAY,EAAM,CAAC,GAAK,CAAC,SAAO,uBAAuB,QAAM,SAAS,SAAOC,EAAW,CAACC,EAAOC,GAAWnB,EAAS,EAAK,EAAQoB,EAAMnB,EAAO,CAAC,EAAEW,UAAkBL,EAAO,aAAaa,EAAM,OAAO,EAAE,CAAC,CAAC,EAAE,IAAMC,MAAW,CAAWf,IAAY,QAAaA,EAAU,WAAWA,EAAU,UAAU,UAAUgB,CAAM,CAAC,CAAC,UAAU,CAAC,CAAC,E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