{"version":3,"file":"RunLog.Bm2YCZwd.mjs","names":["useRef","useState","__esmMin","init_ssg_sandbox_shims","window","_e","de","p","init_npm_react_18_3_1","ce","addPropertyControls","init_framer_B6PCHH0A","useIsStaticRenderer","ControlType","RenderTarget","parseRows","rows","r","c","time","text","status","RunLog","SAMPLE","props","isStatic","onCanvas","list","ref","phase","setPhase","start","el","io","css","MONO","ink","panel","mute","ok","line","EASE","style","badge","title","last","i","note","init_RunLog","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/he7jRG97dJBIu88A41hF/QiuHDGXiyE0JtYLHtAeJ/RunLog.js"],"sourcesContent":["// Run Log: the template's one signature moment. A sample run of one automation, written line by line.\n// Rows: one per line, \"time | step | status\". The last row is the summary line (cursor + total time).\n// Motion: each line lands 260ms after the last (240ms, transform + opacity, cubic-bezier(0.23,1,0.32,1)).\n// It fails toward visible: on the canvas, in static renders, without JS, with no IntersectionObserver,\n// and 4s after the log is armed if the observer never reports, every line is shown. Reduced motion = a 200ms fade, no slide, no blinking cursor.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget,useIsStaticRenderer}from\"framer\";import{useEffect,useRef,useState}from\"react\";const EASE=\"cubic-bezier(0.23, 1, 0.32, 1)\";const MONO=`\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, monospace`;const SAMPLE=`09:14:02 | Trigger: signed proposal in PandaDoc | ok\n09:14:03 | Create client in HubSpot | ok\n09:14:05 | Open project + 14 tasks in Asana | ok\n09:14:06 | Create shared Drive folder | ok\n09:14:08 | Draft first invoice in Xero | ok\n09:14:09 | Send welcome email, from Dana's inbox | ok\n09:14:09 | Done. Dana gets a Slack note. | 7s`;export function parseRows(rows){return String(rows||\"\").split(/\\n+/).map(r=>r.split(\"|\").map(c=>c.trim())).filter(c=>c.join(\"\").length>0).map(([time=\"\",text=\"\",status=\"\"])=>({time,text,status}));}/**\n * Run Log\n *\n * @framerIntrinsicWidth 560\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function RunLog(props){const{title=\"run #0412 \\xb7 new-client-intake\",badge=\"sample run\",rows=SAMPLE,note=\"\",start=\"load\",ink=\"#0B0B0A\",mute=\"#5B5B55\",ok=\"#13804A\",line=\"#D9D8D0\",panel=\"#FFFFFF\",style}=props;const isStatic=useIsStaticRenderer();const onCanvas=RenderTarget.current()===RenderTarget.canvas;const list=parseRows(rows);const ref=useRef(null);// \"idle\" = server/no-JS: every line visible. \"armed\" = hidden, waiting. \"run\" = playing. \"done\" = all visible.\n// \"load\" plays from the first server-rendered paint with pure CSS, so no hydration flash and no JS needed.\nconst[phase,setPhase]=useState(start===\"load\"&&!isStatic&&!onCanvas?\"run\":\"idle\");useEffect(()=>{if(isStatic||onCanvas||typeof window===\"undefined\")return;const el=ref.current;if(!el)return;const rect=el.getBoundingClientRect();// Already scrolled past: never rewind what the reader has seen.\nif(rect.bottom<0){setPhase(\"done\");return;}if(start===\"load\")return;if(!(\"IntersectionObserver\"in window)){setPhase(\"run\");return;}setPhase(\"armed\");// The 4s fallback only fires if the observer never reports at all (a broken observer); a working one\n// reports once immediately, which cancels it, so a log further down still plays when it is reached.\nlet t=0;const io=new IntersectionObserver(([e])=>{window.clearTimeout(t);if(e.isIntersecting){io.disconnect();setPhase(\"run\");}},{threshold:.3});io.observe(el);t=window.setTimeout(()=>{io.disconnect();setPhase(p=>p===\"armed\"?\"done\":p);},4e3);return()=>{io.disconnect();window.clearTimeout(t);};},[isStatic,onCanvas,start]);const css=`\n.rl{font:400 13px/1.5 ${MONO};color:${ink};background:${panel};border:1px solid ${ink};box-sizing:border-box;width:100%}\n.rl *{box-sizing:border-box}\n.rl-hd{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-bottom:1px solid ${ink};font-size:12px;letter-spacing:.06em;text-transform:uppercase}\n.rl-hd span:first-child{min-width:0;overflow-wrap:anywhere}\n.rl ol{list-style:none;margin:0;padding:6px 0}\n.rl li{display:grid;grid-template-columns:64px 1fr auto;gap:10px;padding:7px 14px;align-items:baseline}\n.rl time{color:${mute};font-variant-numeric:tabular-nums}\n.rl .st{color:${ok};text-align:right}\n.rl li.last{border-top:1px dashed ${line};margin-top:4px;padding-top:12px;font-weight:500}\n.rl-cur{display:inline-block;width:8px;height:15px;background:${ink};vertical-align:-2px;margin-left:4px;animation:rl-bl 1s steps(1) infinite}\n.rl-note{font:400 12px/1.5 ${MONO};color:${mute};margin:10px 0 0}\n@keyframes rl-bl{50%{opacity:0}}\n@keyframes rl-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}\n@keyframes rl-fade{from{opacity:0}to{opacity:1}}\n.rl[data-phase=armed] li{opacity:0}\n.rl[data-phase=run] li{animation:rl-in 240ms ${EASE} both}\n@media (max-width:420px){.rl li{grid-template-columns:58px 1fr auto;gap:8px;padding:7px 12px;font-size:12.5px}.rl-hd{padding:10px 12px}}\n@media (prefers-reduced-motion:reduce){.rl[data-phase=run] li{animation:rl-fade 200ms linear both}.rl-cur{animation:none}}`;return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{...style,width:\"100%\"},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:css}}),/*#__PURE__*/_jsxs(\"div\",{className:\"rl\",\"data-phase\":phase,role:\"figure\",\"aria-label\":`${badge}: ${title}`,children:[/*#__PURE__*/_jsxs(\"div\",{className:\"rl-hd\",children:[/*#__PURE__*/_jsx(\"span\",{children:title}),/*#__PURE__*/_jsx(\"span\",{children:badge})]}),/*#__PURE__*/_jsx(\"ol\",{children:list.map((r,i)=>{const last=i===list.length-1&&list.length>1;return /*#__PURE__*/_jsxs(\"li\",{className:last?\"last\":undefined,style:{animationDelay:`${400+i*260}ms`},children:[/*#__PURE__*/_jsx(\"time\",{children:r.time}),/*#__PURE__*/_jsxs(\"span\",{children:[r.text,last?/*#__PURE__*/_jsx(\"span\",{className:\"rl-cur\",\"aria-hidden\":\"true\"}):null]}),/*#__PURE__*/_jsx(\"span\",{className:\"st\",children:r.status})]},i);})})]}),note?/*#__PURE__*/_jsx(\"p\",{className:\"rl-note\",children:note}):null]});}addPropertyControls(RunLog,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"run #0412 \\xb7 new-client-intake\"},badge:{type:ControlType.String,title:\"Badge\",defaultValue:\"sample run\"},rows:{type:ControlType.String,title:\"Rows\",displayTextArea:true,defaultValue:SAMPLE,description:\"One line per step: time | step | status. The last line is the summary.\"},note:{type:ControlType.String,title:\"Note\",defaultValue:\"\"},start:{type:ControlType.Enum,title:\"Start\",options:[\"load\",\"view\"],optionTitles:[\"On load\",\"In view\"],defaultValue:\"load\"},ink:{type:ControlType.Color,title:\"Ink\",defaultValue:\"#0B0B0A\"},mute:{type:ControlType.Color,title:\"Mute\",defaultValue:\"#5B5B55\"},ok:{type:ControlType.Color,title:\"OK\",defaultValue:\"#13804A\"},line:{type:ControlType.Color,title:\"Line\",defaultValue:\"#D9D8D0\"},panel:{type:ControlType.Color,title:\"Panel\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RunLog\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"560\",\"framerSupportedLayoutHeight\":\"auto\"}},\"parseRows\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RunLog.map"],"mappings":"A,mNAW+C,SAAgBe,EAAU,EAAK,CAAC,OAAO,OAAOC,GAAM,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,GAAGC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,GAAGC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,GAAGA,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK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