mindexec-ai 0.2.385
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +354 -0
- package/codex-runtime.js +1339 -0
- package/launch-bridge.cjs +236 -0
- package/package.json +77 -0
- package/port-guard.cjs +232 -0
- package/remote-fast/osx-arm64/mindexec-remote-fast +0 -0
- package/remote-fast/osx-arm64/mindexec-remote-fast.deps.json +24 -0
- package/remote-fast/osx-arm64/mindexec-remote-fast.dll +0 -0
- package/remote-fast/osx-arm64/mindexec-remote-fast.runtimeconfig.json +13 -0
- package/remote-fast/osx-x64/mindexec-remote-fast +0 -0
- package/remote-fast/osx-x64/mindexec-remote-fast.deps.json +24 -0
- package/remote-fast/osx-x64/mindexec-remote-fast.dll +0 -0
- package/remote-fast/osx-x64/mindexec-remote-fast.runtimeconfig.json +13 -0
- package/remote-fast/win-x64/mindexec-remote-fast.deps.json +24 -0
- package/remote-fast/win-x64/mindexec-remote-fast.dll +0 -0
- package/remote-fast/win-x64/mindexec-remote-fast.exe +0 -0
- package/remote-fast/win-x64/mindexec-remote-fast.runtimeconfig.json +20 -0
- package/remote-hub.js +3106 -0
- package/scripts/auth-session-smoke.mjs +262 -0
- package/scripts/remote-agent-managed-smoke.mjs +291 -0
- package/scripts/remote-agent-package-smoke.mjs +64 -0
- package/scripts/remote-agent-ws-smoke.mjs +202 -0
- package/scripts/remote-fast-live-rate-smoke.mjs +355 -0
- package/scripts/remote-fast-mdm-browser-smoke.mjs +476 -0
- package/scripts/remote-fleet-render-smoke.mjs +1491 -0
- package/scripts/remote-frame-ws-smoke.mjs +234 -0
- package/scripts/remote-http-smoke.mjs +592 -0
- package/scripts/remote-hub-identity-smoke.mjs +146 -0
- package/scripts/remote-hub-scale-smoke.mjs +124 -0
- package/scripts/remote-hub-smoke.mjs +631 -0
- package/scripts/remote-input-ws-smoke.mjs +263 -0
- package/scripts/remote-registry-follower-smoke.mjs +752 -0
- package/scripts/setup-tree-sitter-grammars.mjs +80 -0
- package/server.js +15709 -0
- package/start-bridge.bat +32 -0
- package/start-bridge.sh +81 -0
- package/tree-sitter-grammars/README.md +18 -0
- package/tree-sitter-grammars/tree-sitter-c_sharp.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-go.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-java.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-javascript.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-python.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-rust.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-tsx.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-typescript.wasm +0 -0
- package/wwwroot/_headers +73 -0
- package/wwwroot/_redirects +1 -0
- package/wwwroot/appsettings.json +83 -0
- package/wwwroot/assets/AdminDashboardPage-B2vz2Px9.css +1 -0
- package/wwwroot/assets/AdminDashboardPage-DnuCHywn.js +1 -0
- package/wwwroot/assets/AppSidebar-DU2OgSiv.js +2 -0
- package/wwwroot/assets/AuthPages-BrH6kRcv.css +1 -0
- package/wwwroot/assets/AuthPages-Dgezl7Vj.js +1 -0
- package/wwwroot/assets/CodePage-7kgZlB3O.js +87 -0
- package/wwwroot/assets/CodePage-Bncc352E.css +1 -0
- package/wwwroot/assets/CompanyCorePage-ChBnq1ve.css +1 -0
- package/wwwroot/assets/CompanyCorePage-CzIZIIU_.js +13 -0
- package/wwwroot/assets/ExecutionModePage-B-etp_mc.js +18 -0
- package/wwwroot/assets/ExecutionModePage-TLuld9l3.css +1 -0
- package/wwwroot/assets/LaunchLeadCapture-Bx9LM0IX.js +1 -0
- package/wwwroot/assets/LaunchLeadCapture-CiRI1shz.css +1 -0
- package/wwwroot/assets/MarketingHome-BsyerRpe.js +1 -0
- package/wwwroot/assets/MarketingHome-DPzaYzA_.css +1 -0
- package/wwwroot/assets/MindCanvas-DtqOZnoW.css +1 -0
- package/wwwroot/assets/MindCanvas-zEDXzaxW.js +49 -0
- package/wwwroot/assets/PlanMasterPage-CJ36rep-.css +1 -0
- package/wwwroot/assets/PlanMasterPage-NZ_mPvaE.js +4 -0
- package/wwwroot/assets/PricingPage-Cg_0i_ZR.css +1 -0
- package/wwwroot/assets/PricingPage-Ylrn8l2g.js +1 -0
- package/wwwroot/assets/ToolPages-3M2KqA9k.js +28 -0
- package/wwwroot/assets/ToolPages-DIB187pZ.css +1 -0
- package/wwwroot/assets/YouTubeSearchPage-COv1oAA7.js +4 -0
- package/wwwroot/assets/YouTubeSearchPage-IPPa_BIH.css +1 -0
- package/wwwroot/assets/app-runtime-xD2Z3NdN.js +1 -0
- package/wwwroot/assets/canvas-runtime-BbicBcOj.js +44 -0
- package/wwwroot/assets/code-agent-runtime-B5PPZd1t.js +74 -0
- package/wwwroot/assets/executionModeSettings-NJqurj-o.js +1 -0
- package/wwwroot/assets/index-CQMKCp-t.js +2 -0
- package/wwwroot/assets/index-yNpEK-gp.css +1 -0
- package/wwwroot/assets/marketingTools-DN_rnHeB.js +4 -0
- package/wwwroot/assets/mindCanvasSearchWorker-BzPMsHOB.js +1 -0
- package/wwwroot/assets/mindexecution-mindcanvas.png +0 -0
- package/wwwroot/assets/mindexecution-prod-home-current.png +0 -0
- package/wwwroot/assets/mindexecution-prod-pricing-current.png +0 -0
- package/wwwroot/assets/pricingCheckoutShell-O-DnwmbU.js +1 -0
- package/wwwroot/assets/productionAdapterConfig-C5jfk6oG.js +1 -0
- package/wwwroot/assets/runtimeSettingsPersistenceProjection-BoNWmYjU.js +1 -0
- package/wwwroot/assets/storage-TM3YrWaj.js +1 -0
- package/wwwroot/assets/supabaseAuthAdapter-DA43DeSY.js +44 -0
- package/wwwroot/assets/toolHandoff-D5e5f7t5.js +4 -0
- package/wwwroot/assets/vendor-icons-DE3gIReG.js +681 -0
- package/wwwroot/assets/vendor-msgpack-BE8aAsr3.js +1 -0
- package/wwwroot/assets/vendor-react-BXzpOyCS.js +40 -0
- package/wwwroot/favicon.svg +7 -0
- package/wwwroot/index.html +22 -0
- package/wwwroot/manifest.webmanifest +19 -0
- package/wwwroot/robots.txt +4 -0
- package/wwwroot/service-worker.js +7 -0
- package/wwwroot/sitemap.xml +39 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.planmaster-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.planmaster-hero h1{margin:12px 0 0;max-width:900px;font-size:clamp(34px,5vw,60px);line-height:1;letter-spacing:0}.planmaster-hero p{max-width:820px;margin:16px 0 0;color:#334155;font-size:17px;line-height:1.7}.planmaster-hero-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}.planmaster-layout{display:grid;grid-template-columns:310px minmax(0,1fr) 330px;gap:16px;margin-top:26px;align-items:start}.planmaster-control-panel,.planmaster-board,.planmaster-bridge-panel,.planmaster-tool-panel,.planmaster-memory-panel{border:1px solid rgba(203,213,225,.76);border-radius:10px;background:#ffffffeb;box-shadow:var(--soft-shadow)}.planmaster-control-panel,.planmaster-board,.planmaster-bridge-panel,.planmaster-tool-panel,.planmaster-memory-panel{padding:14px}.planmaster-panel-head{display:flex;align-items:center;gap:8px;min-height:32px;color:#0f172a}.planmaster-panel-head button{width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;margin-left:auto;border-radius:8px;color:#64748b;background:#f8fafc;cursor:pointer}.planmaster-field{display:grid;gap:7px;margin-top:14px;color:#334155;font-size:13px;font-weight:800}.planmaster-field textarea,.planmaster-field input,.planmaster-memory-search input{width:100%;border:1px solid rgba(203,213,225,.92);border-radius:8px;color:#1e293b;background:#fff}.planmaster-field textarea{min-height:122px;padding:12px;resize:vertical}.planmaster-field input{min-height:40px;padding:0 10px}.planmaster-field--compact{max-width:150px}.planmaster-check{display:grid;grid-template-columns:18px minmax(0,1fr);gap:9px;margin-top:12px;color:#475569;font-size:13px;line-height:1.45}.planmaster-check input{margin-top:2px}.planmaster-command-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.planmaster-command-grid .btn{min-height:40px;padding:0 12px}.planmaster-agent-status{min-height:42px;display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:8px;margin-top:14px;padding:0 12px;border-radius:9px;color:#475569;background:#f1f5f9;font-size:13px}.planmaster-agent-status.is-running{color:#0f766e;background:#ecfdf5}.planmaster-board-head{display:flex;justify-content:space-between;gap:18px}.planmaster-board-head h2{margin:4px 0 0;color:#0f172a;font-size:24px;line-height:1.2}.planmaster-progress{min-width:96px;align-self:start;padding:10px;border-radius:9px;color:#0f766e;background:#ecfdf5;text-align:right}.planmaster-progress strong,.planmaster-progress span{display:block}.planmaster-progress strong{font-size:26px;line-height:1}.planmaster-progress span{margin-top:4px;font-size:12px;font-weight:800}.planmaster-metric-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.planmaster-metric{display:grid;grid-template-columns:20px minmax(0,1fr);gap:4px 8px;align-items:center;min-height:62px;padding:10px;border:1px solid rgba(203,213,225,.72);border-radius:9px;background:#f8fafc}.planmaster-metric span{color:#64748b;font-size:12px;font-weight:800}.planmaster-metric strong{grid-column:1 / -1;color:#0f172a;font-size:18px}.planmaster-lanes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.planmaster-lane{min-width:0;display:grid;align-content:start;gap:10px;padding:10px;border:1px solid rgba(203,213,225,.76);border-radius:9px;background:#f8fafc}.planmaster-lane-head{display:flex;justify-content:space-between;color:#0f172a;font-size:13px}.planmaster-lane-head span{color:#64748b}.plan-step-card{display:grid;gap:8px;padding:10px;border:1px solid rgba(203,213,225,.82);border-radius:8px;background:#fff}.plan-step-card--running{border-color:#2563eb5c;background:#eff6ff}.plan-step-card--done{border-color:#0f766e47;background:#f0fdfa}.plan-step-card--blocked{border-color:#ef444452;background:#fef2f2}.plan-step-card--failed{border-color:#dc26265c;background:#fff1f2}.plan-step-top,.plan-step-footer,.plan-step-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.plan-step-top>span,.plan-step-footer{color:#64748b;font-size:11px;font-weight:800}.plan-step-card h3{margin:0;color:#0f172a;font-size:15px;line-height:1.3}.plan-step-card p,.plan-step-note{margin:0;color:#475569;font-size:12px;line-height:1.5}.plan-step-note{padding:8px;border-radius:8px;background:#ffffffb8}.plan-step-actions{justify-content:flex-start}.plan-step-actions button{min-height:28px;padding:0 8px;border-radius:7px;color:#334155;background:#f1f5f9;cursor:pointer;font-size:12px;font-weight:800}.plan-status-pill{min-height:24px;display:inline-flex;align-items:center;gap:5px;padding:0 8px;border-radius:999px;font-size:11px;font-weight:850}.plan-status-pill--pending{color:#475569;background:#e2e8f0}.plan-status-pill--running{color:#1d4ed8;background:#dbeafe}.plan-status-pill--done{color:#0f766e;background:#ccfbf1}.plan-status-pill--blocked{color:#b91c1c;background:#fee2e2}.plan-status-pill--failed{color:#9f1239;background:#ffe4e6}.planmaster-side{display:grid;gap:14px}.planmaster-tool-panel p{margin:8px 0 0;color:#64748b;font-size:12px;line-height:1.45}.planmaster-tool-grid{display:grid;gap:8px;margin-top:12px}.planmaster-tool-grid button,.planmaster-tool-form input,.planmaster-tool-form select,.planmaster-tool-note textarea{width:100%;border:1px solid rgba(203,213,225,.92);border-radius:8px;color:#1e293b;background:#fff}.planmaster-tool-grid button{min-height:34px;padding:0 9px;cursor:pointer;overflow-wrap:anywhere;font-size:12px;font-weight:850;text-align:left}.planmaster-tool-grid button:hover{color:#1d4ed8;border-color:#2563eb57;background:#eff6ff}.planmaster-tool-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:12px}.planmaster-tool-form label,.planmaster-tool-note{display:grid;gap:6px;color:#475569;font-size:11px;font-weight:850}.planmaster-tool-form input,.planmaster-tool-form select{min-height:34px;padding:0 9px;font:inherit}.planmaster-tool-note{margin-top:10px}.planmaster-tool-note textarea{min-height:72px;padding:9px;resize:vertical;font:inherit}.planmaster-tool-output{max-height:210px;margin:12px 0 0;padding:10px;overflow:auto;border:1px solid rgba(203,213,225,.82);border-radius:8px;color:#334155;background:#f8fafc;font-size:11px;line-height:1.45;white-space:pre-wrap}.planmaster-bridge-status{min-height:34px;display:flex;align-items:center;gap:8px;margin-top:10px;padding:0 10px;border-radius:8px;color:#475569;background:#f1f5f9;font-size:12px;font-weight:800}.planmaster-feed-list,.planmaster-memory-list{display:grid;gap:8px;margin-top:10px}.planmaster-feed-item,.execution-memory-item{display:grid;gap:6px;padding:10px;border:1px solid rgba(203,213,225,.78);border-radius:8px;background:#fff}.planmaster-feed-item div,.execution-memory-item-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.planmaster-feed-item strong,.execution-memory-item-top span{color:#1d4ed8;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.planmaster-feed-item span,.execution-memory-item-top time{color:#64748b;font-size:11px}.planmaster-feed-item p,.execution-memory-item p{margin:0;color:#334155;font-size:12px;line-height:1.45}.planmaster-memory-filters{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.planmaster-memory-filters button{min-height:28px;padding:0 9px;border:1px solid rgba(203,213,225,.78);border-radius:999px;color:#475569;background:#fff;cursor:pointer;font-size:11px;font-weight:800;text-transform:capitalize}.planmaster-memory-filters button.is-selected{color:#fff;background:#0f172a;border-color:#0f172a}.planmaster-memory-search{min-height:38px;display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:8px;margin-top:10px;padding:0 10px;border:1px solid rgba(203,213,225,.92);border-radius:8px;background:#fff}.planmaster-memory-search input{min-height:34px;padding:0;border:0}.execution-memory-item strong{color:#0f172a;font-size:13px}.execution-memory-item small{color:#64748b;font-size:11px}.execution-memory-item--blocker{border-color:#ef444452;background:#fef2f2}.execution-memory-item--next-action{border-color:#0f766e3d;background:#f0fdfa}.execution-memory-item--evidence,.execution-memory-item--decision{border-color:#2563eb3d;background:#eff6ff}.planmaster-empty-lane{padding:10px;border:1px dashed rgba(148,163,184,.62);border-radius:8px;color:#64748b;background:#ffffff9e;font-size:12px}@media(max-width:960px){.planmaster-layout,.planmaster-lanes{grid-template-columns:1fr}.planmaster-hero,.planmaster-board-head{align-items:stretch;flex-direction:column}.planmaster-metric-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.planmaster-hero-actions{justify-content:flex-start}}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{r,j as e}from"./vendor-react-BXzpOyCS.js";import{l as Le,i as Re}from"./storage-TM3YrWaj.js";import{ah as ee,s as Y,ai as Te,c as q,aj as $e}from"./canvas-runtime-BbicBcOj.js";import{R as j}from"./app-runtime-xD2Z3NdN.js";import{aH as Ee,E as te,g as ze,aJ as V,ad as se,aK as De,an as ae,aL as Ie,aM as Be,D as re,aN as Fe,aO as ne,R as Oe,c as Ue,F as Ge,T as _e,h as He,aA as Je,aP as Ke}from"./vendor-icons-DE3gIReG.js";import"./runtimeSettingsPersistenceProjection-BoNWmYjU.js";const ie="mindexec-react-planmaster-v1",le=["Planning","Product","Marketing","Monetization","Ops","Growth"],oe=["Pending","Running","Done","Blocked","Failed"],Ye=["Canvas.ListMindMapNodes","Plan.ListSteps","Plan.SetStepStatus","Plan.CreateNote"],qe=["Pending","Running","Done","Failed"],ce=["all","artifact","reflection","next_action","blocker","evidence","decision"],S="Launch MindExec React with a clear global USD path and one proof-producing user workflow.";function L(a){return typeof crypto<"u"&&"randomUUID"in crypto?`${a}-${crypto.randomUUID()}`:`${a}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function p(){return new Date().toISOString()}function I(){const a=p();return{goal:S,steps:de(S,0),notes:[{id:L("note"),kind:"reflection",agentName:"PlanMaster Local Planner",title:"Initial plan restored",body:"This React PlanMaster keeps the original planning habit alive without loading the Blazor PlanAgent surface.",metrics:"6 steps / local state",updatedAt:a}],updatedAt:a}}function Ve(){try{const a=window.localStorage.getItem(ie);if(!a)return I();const n=JSON.parse(a);return!Array.isArray(n.steps)||!Array.isArray(n.notes)?I():{goal:String(n.goal||S),steps:Xe(n.steps),notes:Qe(n.notes),updatedAt:String(n.updatedAt||p())}}catch{return I()}}function Xe(a){return a.map((n,o)=>{const i=n,R=le.includes(i.category)?i.category:"Planning",m=oe.includes(i.status)?i.status:"Pending",f=i.priority==="High"||i.priority==="Medium"||i.priority==="Low"?i.priority:"Medium";return{id:String(i.id||L("step")),stepNumber:Number(i.stepNumber||o+1),category:R,title:String(i.title||`Step ${o+1}`),detail:String(i.detail||""),status:m,note:i.note?String(i.note):void 0,priority:f,updatedAt:String(i.updatedAt||p())}}).sort((n,o)=>n.stepNumber-o.stepNumber)}function Qe(a){return a.map(n=>{const o=n,i=ce.includes(o.kind)?o.kind:"reflection";return{id:String(o.id||L("note")),kind:i,agentName:String(o.agentName||"PlanMaster Local Planner"),title:String(o.title||"Untitled note"),body:String(o.body||""),metrics:String(o.metrics||""),updatedAt:String(o.updatedAt||p())}}).sort((n,o)=>Date.parse(o.updatedAt)-Date.parse(n.updatedAt))}function We(a){window.localStorage.setItem(ie,JSON.stringify(a))}function Ze(a){const n=a.toLowerCase();return n.includes("talkagent")?"TalkAgent":n.includes("code")?"CodeGraph":n.includes("pricing")||n.includes("revenue")||n.includes("usd")?"USD offer":n.includes("tool")?"free-tool funnel":"MindExec"}function de(a,n){const o=Ze(a),i=p();return[{category:"Planning",title:"Define the success contract",detail:`Turn "${a.trim()||S}" into a measurable launch contract with proof, channel, risk, and finish criteria.`,priority:"High"},{category:"Product",title:`Ship the smallest useful ${o} workflow`,detail:"Keep the first workflow complete enough to prove value, but narrow enough to verify in one browser session.",priority:"High"},{category:"Marketing",title:"Publish one English-first proof asset",detail:"Create a short public artifact that shows before/after value and links directly to the working product surface.",priority:"High"},{category:"Monetization",title:"Connect the proof to a USD offer",detail:"Make the next paid step visible without blocking free utility value or local-first trust.",priority:"Medium"},{category:"Ops",title:"Verify runtime and rollback evidence",detail:"Run build, hosted route checks, console checks, and record the exact deployed bundle evidence.",priority:"Medium"},{category:"Growth",title:"Reuse the result as the next launch input",detail:"Capture learnings, customer language, and next actions back into MindCanvas or PlanMaster memory.",priority:"Low"}].map((m,f)=>({...m,id:L("step"),stepNumber:n+f+1,status:"Pending",updatedAt:i}))}function et(a,n,o){return["You are the MindExec PlanMaster local planner.",q(n),"Create categorized execution steps, concise evidence notes, and next actions.",o?"Use the current MindCanvas board context when it is available.":"Plan from the goal only; do not assume MindCanvas board context.","",`Goal: ${a.trim()||S}`].join(`
|
|
2
|
+
`)}function z(a,n,o,i=""){return{id:L("note"),kind:a,agentName:"PlanMaster Local Planner",title:n,body:o,metrics:i,updatedAt:p()}}function B(a){if(!a)return"-";const n=new Date(a);return Number.isNaN(n.getTime())?"-":n.toLocaleString(void 0,{month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function tt(a){return a==="Running"?"next_action":a==="Done"?"evidence":a==="Blocked"||a==="Failed"?"blocker":"reflection"}function at(a){return a.timestamp||a.timestamp===""?a.timestamp:void 0}function pt({navigate:a}){const[n,o]=r.useState(()=>Ve()),[i,R]=r.useState(()=>ee()),[m,f]=r.useState(()=>n.goal),[v,ue]=r.useState(!0),[F,pe]=r.useState(!0),[b,me]=r.useState(!0),[y,k]=r.useState(!1),[O,T]=r.useState(0),[N,he]=r.useState(10),[U,ge]=r.useState(!0),[$,xe]=r.useState("all"),[G,be]=r.useState(""),[C,je]=r.useState(1),[M,fe]=r.useState("Running"),[E,ye]=r.useState("Local PlanMaster tool contract run."),[Ne,P]=r.useState("Run a PlanMaster tool to inspect the local contract output."),[X,_]=r.useState([]),[Se,H]=r.useState(()=>Y()?"Not refreshed yet":"Access gated"),[Q,W]=r.useState(!1),J=r.useRef(),w=r.useMemo(()=>Te(i),[i]);r.useEffect(()=>{const t=()=>R(ee());return window.addEventListener("storage",t),window.addEventListener("focus",t),()=>{window.removeEventListener("storage",t),window.removeEventListener("focus",t)}},[]),r.useEffect(()=>(window.clearTimeout(J.current),J.current=window.setTimeout(()=>We(n),250),()=>window.clearTimeout(J.current)),[n]);const h=r.useCallback(t=>{o(s=>({...t(s),updatedAt:p()}))},[]),A=r.useMemo(()=>{const t=new Map;for(const l of oe)t.set(l,0);for(const l of n.steps)t.set(l.status,(t.get(l.status)||0)+1);const s=t.get("Done")||0,c=n.steps.length||1;return{total:n.steps.length,done:s,running:t.get("Running")||0,blocked:t.get("Blocked")||0,progress:Math.round(s/c*100)}},[n.steps]),ve=r.useMemo(()=>le.map(t=>({category:t,steps:n.steps.filter(s=>s.category===t)})),[n.steps]),Z=r.useMemo(()=>{const t=G.trim().toLowerCase();return n.notes.filter(s=>$!=="all"&&s.kind!==$?!1:t?`${s.title} ${s.body} ${s.metrics} ${s.agentName}`.toLowerCase().includes(t):!0)},[$,G,n.notes]),K=r.useCallback(()=>{const t=m.trim()||S,s=et(t,i,v),c=q(i);h(l=>{const u=b?l.steps.length:0,d=de(t,u),x=z("decision",b?"Appended a new plan session":"Generated a fresh plan",[`Goal: ${t}`,c].join(`
|
|
3
|
+
`),[`${d.length} steps`,v?"MindCanvas context enabled":"Standalone plan",`Language ${w.label}`].join(" / "));return j.emit("planmaster.plan.generated",{append:b,stepCount:d.length,appLanguage:i,promptChars:s.length}),{goal:t,steps:b?[...l.steps,...d]:d,notes:[x,...b?l.notes:[]],updatedAt:p()}}),T(0),k(!1)},[i,w.label,m,b,h,v]),g=r.useCallback((t,s,c)=>{h(l=>{const u=l.steps.find(x=>x.id===t);if(!u)return l;const d=z(tt(s),`Step ${u.stepNumber} marked ${s}`,c||u.detail,`${u.category} / ${u.priority}`);return j.emit("planmaster.step.status",{stepNumber:u.stepNumber,status:s}),j.emit("planmaster.execution.note",{kind:d.kind,title:d.title}),{...l,steps:l.steps.map(x=>x.id===t?{...x,status:s,note:c||x.note,updatedAt:p()}:x),notes:[d,...l.notes]}})},[h]),ke=r.useCallback(t=>{const s=q(i);if(j.emit("planmaster.tool.run",{toolName:t,appLanguage:i}),t==="Canvas.ListMindMapNodes"){const l=Le(Re),u=l.nodes.slice(0,60).map(d=>({id:d.id,contentType:d.kind,prompt:d.title,response:String(d.result||d.body||"").slice(0,500),isAiEnabled:d.aiEnabled!==!1}));P(JSON.stringify({boardId:l.id,boardTitle:l.name,appLanguage:i,languageInstruction:s,count:u.length,nodes:u},null,2));return}if(t==="Plan.ListSteps"){P(JSON.stringify({appLanguage:i,languageInstruction:s,steps:n.steps.map(l=>({stepNumber:l.stepNumber,category:l.category,title:l.title,status:l.status,note:l.note||""}))},null,2));return}if(t==="Plan.SetStepStatus"){const l=n.steps.find(u=>u.stepNumber===C);if(!l){P(`Error: stepNumber ${C} was not found.`);return}g(l.id,M,E.trim()||`Plan.SetStepStatus -> ${M}`),P(`Updated step ${C} status to '${M}'.`);return}const c=z("artifact","Plan.CreateNote local artifact",[E.trim()||"Created by the local PlanMaster tool contract panel.",s].join(`
|
|
4
|
+
`),`Plan.CreateNote / local shell / Language ${w.label}`);h(l=>({...l,notes:[c,...l.notes]})),j.emit("planmaster.execution.note",{kind:c.kind,title:c.title,source:"Plan.CreateNote"}),P(`Created PlanMaster note node: ${c.id}`)},[i,w.label,g,n.steps,E,M,C,h]),Ce=r.useCallback(()=>{if(F&&n.steps.length===0){K();return}const t=n.steps.find(s=>s.status==="Pending")||n.steps.find(s=>s.status==="Blocked");t&&(k(!0),T(s=>Math.min(N,s+1)),g(t.id,"Running","Local PlanMaster run selected this as the next active step."))},[F,K,N,g,n.steps]),Me=r.useCallback(()=>{const t=n.steps.find(c=>c.status==="Running");t&&g(t.id,"Done","Completed in the local PlanMaster run.");const s=n.steps.find(c=>c.status==="Pending");s&&O<N?(T(c=>c+1),g(s.id,"Running","Advanced to the next local execution step.")):k(!1)},[O,N,g,n.steps]),Pe=r.useCallback(()=>{k(!1),h(t=>({...t,notes:[z("reflection","Stopped local PlanMaster run","The local execution loop was stopped by the user."),...t.notes]}))},[h]),we=r.useCallback(()=>{const t=I();o(t),f(t.goal),k(!1),T(0),j.emit("planmaster.plan.generated",{reset:!0,stepCount:t.steps.length})},[]),Ae=r.useCallback(async()=>{if(!Y()){H("Access gated"),_([]);return}W(!0);try{const s=((await $e()).items||[]).slice(-12).reverse();_(s),H(s.length>0?`Updated ${new Date().toLocaleTimeString()}`:"No change feed items yet"),j.emit("planmaster.bridgeFeed.refreshed",{count:s.length})}catch(t){H(t instanceof Error?t.message:String(t)),_([])}finally{W(!1)}},[]);return e.jsxs("div",{className:"page planmaster-page","data-testid":"planmaster-app-language","data-app-language":i,"data-app-language-label":w.label,children:[e.jsxs("section",{className:"planmaster-hero",children:[e.jsxs("div",{children:[e.jsx("div",{className:"eyebrow",children:"PlanAgent / PlanMaster"}),e.jsx("h1",{children:"Turn a goal into an executable plan board."}),e.jsx("p",{children:"A React replacement for the original PlanMaster surface: goal intake, categorized steps, execution memory, and bridge feed visibility without loading the Blazor 3D agent canvas."})]}),e.jsxs("div",{className:"planmaster-hero-actions",children:[e.jsx("button",{className:"btn btn-secondary",type:"button",onClick:()=>a("/mindcanvas"),children:"Open MindCanvas"}),e.jsxs("button",{className:"btn btn-ghost",type:"button",onClick:we,children:[e.jsx(Ee,{size:16}),"Reset"]})]})]}),e.jsxs("section",{className:"planmaster-layout",children:[e.jsxs("aside",{className:"planmaster-control-panel",children:[e.jsxs("div",{className:"planmaster-panel-head",children:[e.jsx(te,{size:18}),e.jsx("strong",{children:"Agent control"})]}),e.jsxs("label",{className:"planmaster-field",children:[e.jsx("span",{children:"Goal"}),e.jsx("textarea",{"data-testid":"planmaster-goal-input",value:m,onChange:t=>f(t.target.value),placeholder:"Enter the agent goal..."})]}),e.jsxs("label",{className:"planmaster-check",children:[e.jsx("input",{type:"checkbox",checked:v,onChange:t=>ue(t.target.checked)}),e.jsx("span",{children:"Use current MindCanvas board as context"})]}),e.jsxs("label",{className:"planmaster-check",children:[e.jsx("input",{type:"checkbox",checked:F,disabled:!v,onChange:t=>pe(t.target.checked)}),e.jsx("span",{children:"Generate or update a plan before running"})]}),e.jsxs("label",{className:"planmaster-check",children:[e.jsx("input",{type:"checkbox",checked:b,onChange:t=>me(t.target.checked)}),e.jsx("span",{children:"Preserve canvas memory and append this run"})]}),e.jsxs("label",{className:"planmaster-field planmaster-field--compact",children:[e.jsx("span",{children:"Max iterations"}),e.jsx("input",{type:"number",min:1,max:30,value:N,onChange:t=>he(Math.max(1,Math.min(30,Number(t.target.value)||1)))})]}),e.jsxs("div",{className:"planmaster-command-grid",children:[e.jsxs("button",{className:"btn btn-primary",type:"button","data-testid":"planmaster-generate-plan",onClick:K,disabled:!m.trim(),children:[e.jsx(ze,{size:16}),"Generate plan"]}),e.jsxs("button",{className:"btn btn-secondary",type:"button",onClick:Ce,disabled:n.steps.length===0||y,children:[e.jsx(V,{size:16}),"Start"]}),e.jsxs("button",{className:"btn btn-secondary",type:"button",onClick:Me,disabled:!y,children:[e.jsx(se,{size:16}),"Advance"]}),e.jsxs("button",{className:"btn btn-ghost",type:"button",onClick:Pe,disabled:!y,children:[e.jsx(De,{size:16}),"Stop"]})]}),e.jsxs("div",{className:`planmaster-agent-status ${y?"is-running":""}`,children:[y?e.jsx(ae,{size:17,className:"spin-icon"}):e.jsx(Ie,{size:17}),e.jsx("span",{children:y?"Running local plan loop":"Idle"}),e.jsxs("b",{children:[O," / ",N]})]})]}),e.jsxs("main",{className:"planmaster-board",children:[e.jsxs("div",{className:"planmaster-board-head",children:[e.jsxs("div",{children:[e.jsx("span",{className:"card-label",children:"Plan canvas"}),e.jsx("h2",{"data-testid":"planmaster-board-goal",children:n.goal})]}),e.jsxs("div",{className:"planmaster-progress",children:[e.jsxs("strong",{children:[A.progress,"%"]}),e.jsxs("span",{children:[A.done," done"]})]})]}),e.jsxs("div",{className:"planmaster-metric-strip",children:[e.jsx(D,{icon:Be,label:"Steps",value:String(A.total)}),e.jsx(D,{icon:V,label:"Running",value:String(A.running)}),e.jsx(D,{icon:re,label:"Blocked",value:String(A.blocked)}),e.jsx(D,{icon:Fe,label:"Updated",value:B(n.updatedAt)})]}),e.jsx("div",{className:"planmaster-lanes",children:ve.map(t=>e.jsxs("section",{className:"planmaster-lane",children:[e.jsxs("div",{className:"planmaster-lane-head",children:[e.jsx("strong",{children:t.category}),e.jsx("span",{children:t.steps.length})]}),t.steps.length>0?t.steps.map(s=>e.jsx(nt,{step:s,onStatus:g},s.id)):e.jsx("div",{className:"planmaster-empty-lane",children:"No step yet"})]},t.category))})]}),e.jsxs("aside",{className:"planmaster-side",children:[e.jsxs("section",{className:"planmaster-tool-panel",children:[e.jsxs("div",{className:"planmaster-panel-head",children:[e.jsx(te,{size:18}),e.jsx("strong",{children:"Tool Contract"})]}),e.jsx("p",{children:"Original PlanMaster agent tools, simulated against local React state."}),e.jsx("div",{className:"planmaster-tool-grid",children:Ye.map(t=>e.jsx("button",{type:"button","data-tool-name":t,onClick:()=>ke(t),children:t},t))}),e.jsxs("div",{className:"planmaster-tool-form",children:[e.jsxs("label",{children:[e.jsx("span",{children:"stepNumber"}),e.jsx("input",{"data-testid":"planmaster-tool-step-number",type:"number",min:1,value:C,onChange:t=>je(Math.max(1,Number(t.target.value)||1))})]}),e.jsxs("label",{children:[e.jsx("span",{children:"status"}),e.jsx("select",{"data-testid":"planmaster-tool-status",value:M,onChange:t=>fe(t.target.value),children:qe.map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),e.jsxs("label",{className:"planmaster-tool-note",children:[e.jsx("span",{children:"note/content"}),e.jsx("textarea",{"data-testid":"planmaster-tool-note",value:E,onChange:t=>ye(t.target.value)})]}),e.jsx("pre",{className:"planmaster-tool-output","data-testid":"planmaster-tool-output",children:Ne})]}),e.jsxs("section",{className:"planmaster-bridge-panel",children:[e.jsxs("div",{className:"planmaster-panel-head",children:[e.jsx(ne,{size:18}),e.jsx("strong",{children:"Bridge Feed"}),e.jsx("button",{type:"button",title:"Refresh bridge feed",onClick:Ae,disabled:Q,children:Q?e.jsx(ae,{size:15,className:"spin-icon"}):e.jsx(Oe,{size:15})})]}),e.jsxs("div",{className:"planmaster-bridge-status",children:[Y()?e.jsx(ne,{size:15}):e.jsx(Ue,{size:15}),Se]}),e.jsx("div",{className:"planmaster-feed-list",children:X.length>0?X.map((t,s)=>e.jsxs("article",{className:"planmaster-feed-item",children:[e.jsxs("div",{children:[e.jsx("strong",{children:t.changeType||"change"}),e.jsx("span",{children:B(at(t))})]}),e.jsx("p",{children:t.message||t.path||"(no details)"})]},`${t.timestamp||s}-${t.path||t.message||""}`)):e.jsx("div",{className:"planmaster-empty-lane",children:"No bridge feed items loaded."})})]}),e.jsxs("section",{className:`planmaster-memory-panel ${U?"":"is-collapsed"}`,children:[e.jsxs("div",{className:"planmaster-panel-head",children:[e.jsx(Ge,{size:18}),e.jsx("strong",{children:"Execution Memory"}),e.jsx("button",{type:"button",onClick:()=>ge(t=>!t),children:U?e.jsx(_e,{size:15}):e.jsx(He,{size:15})})]}),U&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"planmaster-memory-filters",children:ce.map(t=>e.jsx("button",{className:$===t?"is-selected":"",type:"button",onClick:()=>xe(t),children:t.replace("_"," ")},t))}),e.jsxs("label",{className:"planmaster-memory-search",children:[e.jsx(Je,{size:15}),e.jsx("input",{value:G,onChange:t=>be(t.target.value),placeholder:"Search memory notes..."})]}),e.jsx("div",{className:"planmaster-memory-list","data-testid":"planmaster-memory-list",children:Z.length>0?Z.map(t=>e.jsx(rt,{note:t},t.id)):e.jsx("div",{className:"planmaster-empty-lane",children:"No execution memory notes match the current filter."})})]})]})]})]})]})}function D({icon:a,label:n,value:o}){return e.jsxs("article",{className:"planmaster-metric",children:[e.jsx(a,{size:17}),e.jsx("span",{children:n}),e.jsx("strong",{children:o})]})}function nt({step:a,onStatus:n}){return e.jsxs("article",{className:`plan-step-card plan-step-card--${a.status.toLowerCase()}`,"data-testid":"planmaster-step-card","data-step-number":a.stepNumber,"data-step-status":a.status,children:[e.jsxs("div",{className:"plan-step-top",children:[e.jsxs("span",{children:["Step ",a.stepNumber]}),e.jsx(st,{status:a.status})]}),e.jsx("h3",{children:a.title}),e.jsx("p",{children:a.detail}),a.note&&e.jsx("div",{className:"plan-step-note",children:a.note}),e.jsxs("div",{className:"plan-step-footer",children:[e.jsx("span",{children:a.priority}),e.jsx("span",{children:B(a.updatedAt)})]}),e.jsxs("div",{className:"plan-step-actions",children:[e.jsx("button",{type:"button",onClick:()=>n(a.id,"Running"),children:"Run"}),e.jsx("button",{type:"button",onClick:()=>n(a.id,"Done"),children:"Done"}),e.jsx("button",{type:"button",onClick:()=>n(a.id,"Blocked"),children:"Block"}),e.jsx("button",{type:"button",onClick:()=>n(a.id,"Failed"),children:"Fail"})]})]})}function st({status:a}){const n=a==="Done"?se:a==="Blocked"||a==="Failed"?re:a==="Running"?V:Ke;return e.jsxs("span",{className:`plan-status-pill plan-status-pill--${a.toLowerCase()}`,children:[e.jsx(n,{size:13}),a]})}function rt({note:a}){return e.jsxs("article",{className:`execution-memory-item execution-memory-item--${a.kind.replace("_","-")}`,children:[e.jsxs("div",{className:"execution-memory-item-top",children:[e.jsx("span",{children:a.kind.replace("_"," ")}),e.jsx("time",{children:B(a.updatedAt)})]}),e.jsx("strong",{children:a.title}),a.metrics&&e.jsx("small",{children:a.metrics}),e.jsx("p",{children:a.body})]})}export{pt as PlanMasterPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pricing-page{background:radial-gradient(circle at top left,rgba(8,145,178,.14),transparent 30%),radial-gradient(circle at top right,rgba(245,158,11,.12),transparent 28%),linear-gradient(180deg,#f8fafc,#eef6ff 54%,#f8fafc)}.pricing-hero,.pricing-grid{width:min(1180px,calc(100% - 40px));margin-inline:auto}.pricing-hero{padding-top:12px}.pricing-hero h1{margin:12px 0 0;max-width:900px;font-size:clamp(40px,7vw,76px);line-height:.98;font-weight:920;letter-spacing:0}.pricing-hero p{max-width:780px;margin:20px 0 0;color:var(--copy);font-size:18px;line-height:1.8}.pricing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:28px}.pricing-card{padding:24px;border:1px solid rgba(203,213,225,.76);border-radius:9px;background:#ffffffdb;box-shadow:var(--soft-shadow)}.pricing-card p{color:#475569;line-height:1.65}.pricing-card h2{margin:14px 0 10px;font-size:clamp(38px,4vw,54px);line-height:1}.pricing-card ul{margin:20px 0 0;padding-left:20px;color:#334155;line-height:1.65}.pricing-grid--detailed{align-items:stretch}.pricing-card--detailed{display:flex;flex-direction:column}.pricing-card--detailed h2 span{margin-left:6px;color:#64748b;font-size:16px;font-weight:760}.pricing-note{margin-top:12px;color:#0f766e;font-size:14px;font-weight:800}.pricing-card-action{width:100%;margin-top:auto}.pricing-status{margin:12px 0 0;color:#475569;font-size:13px;font-weight:720}.pricing-compare{width:min(1180px,calc(100% - 40px));margin:34px auto 0}.pricing-compare{display:grid;grid-template-columns:minmax(0,.92fr) minmax(320px,1.08fr);gap:18px;align-items:stretch}.pricing-compare h2{margin:12px 0 0;font-size:clamp(28px,4vw,42px);line-height:1.08;letter-spacing:0}.pricing-compare p{color:#334155;line-height:1.7}.pricing-compare-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.pricing-compare-grid article{border:1px solid rgba(203,213,225,.76);border-radius:9px;background:#ffffffe0;box-shadow:var(--soft-shadow)}.pricing-compare-grid article{padding:20px}.pricing-compare-grid h3{margin:12px 0 8px}@media(max-width:960px){.pricing-grid,.pricing-compare,.pricing-compare-grid{grid-template-columns:1fr}}@media(max-width:640px){.pricing-hero h1{font-size:36px;line-height:1.04}.pricing-hero p{font-size:15px}.pricing-compare{width:min(100%,calc(100% - 20px))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as g,j as t}from"./vendor-react-BXzpOyCS.js";import{L as M}from"./LaunchLeadCapture-Bx9LM0IX.js";import{g as C,a as P}from"./index-CQMKCp-t.js";import{p as E,P as N,r as _,c as x}from"./pricingCheckoutShell-O-DnwmbU.js";import{r as A}from"./productionAdapterConfig-C5jfk6oG.js";import{R as m}from"./app-runtime-xD2Z3NdN.js";import{getSupabaseBrowserClient as U}from"./supabaseAuthAdapter-DA43DeSY.js";import{an as I,aQ as L,c as D,ad as $}from"./vendor-icons-DE3gIReG.js";import"./canvas-runtime-BbicBcOj.js";function f(e){return typeof e=="string"&&e.trim()?e.trim():null}function B(e){const o=Number(e);return Number.isFinite(o)?Math.max(1,Math.round(o)):1}function T(e){const o=B(e.quantity);return{price_id:e.priceId,return_url:e.returnUrl,email:e.email,quantity:o,source:"mindexec-react",sale_kind:"first_party",entitlement_kind:e.planKey,package_kind:e.planKey==="ltd"?"ltd":"subscription",plan_key:e.planKey,plan_code:e.planCode,price_stage:e.priceStage,metadata:{source:"mindexec-react",price_stage:e.priceStage,plan_key:e.planKey,plan_code:e.planCode,checkout_surface:"pricing"}}}async function O(e,o){var s;const u=A(e);if(!u.checkout.canAttempt)throw m.emit("pricing.checkout.provider.skipped",{mode:u.checkout.mode}),new Error(`Secure checkout adapter is not ready: ${u.checkout.mode}`);const l=U(e);if(!l)throw m.emit("pricing.checkout.provider.skipped",{mode:"config-missing"}),new Error("Supabase browser client is not available for checkout.");const{data:n,error:c}=await l.auth.getSession();if(c)throw m.emit("pricing.checkout.provider.sessionFailed",{message:c.message}),c;if(!((s=n.session)!=null&&s.access_token))throw m.emit("pricing.checkout.provider.sessionMissing"),new Error("Secure checkout requires a Supabase-authenticated session.");const p=T(o);m.emit("pricing.checkout.provider.started",{provider:"dodo",functionName:"dodo-create-checkout",priceStage:o.priceStage,priceId:o.priceId});const{data:r,error:a}=await l.functions.invoke("dodo-create-checkout",{body:p});if(a)throw m.emit("pricing.checkout.provider.failed",{provider:"dodo",message:a.message}),a;const h=f(r==null?void 0:r.checkout_url);if(!h){const i=f(r==null?void 0:r.reason)??f(r==null?void 0:r.error)??"checkout-url-missing";throw m.emit("pricing.checkout.provider.failed",{provider:"dodo",message:i}),new Error(`Dodo checkout did not return a checkout URL: ${i}`)}return m.emit("pricing.checkout.provider.ready",{provider:"dodo",hasSessionId:!!f(r==null?void 0:r.session_id)}),{mode:u.checkout.mode,canAttempt:!0,provider:"dodo",sessionId:f(r==null?void 0:r.session_id),checkoutUrl:h,userId:f(r==null?void 0:r.user_id)}}const d={currentStage:"STANDARD",ltdLimit:100,ltdSold:0,ltdRemaining:100,isLtdAvailable:!1,isClosed:!1,freeCloudBoardLimit:2,proMonthlyIncludedCredits:1e4,proMonthlyPriceUsd:12,proAnnualPriceUsd:96,ltdPriceUsd:149,managedAiMarkupMultiplier:1.7,localModeFreeEnabled:!0,byokFreeEnabled:!0};function b(e){return`$${e.toLocaleString("en-US",{maximumFractionDigits:2})}`}function R(e){return e?"Start Pro":"Sign in to continue"}function F(){return`${b(d.proMonthlyPriceUsd)} starting point`}function K(){return"Standard paid access should feel like a continuation of the free workflow, not a forced first step."}function z(){return[`Monthly Pro starts at ${b(d.proMonthlyPriceUsd)}`,`Annual target pricing is ${b(d.proAnnualPriceUsd)} per year`,`${d.freeCloudBoardLimit} cloud boards are available before paid limits matter`]}function H(){return A(P())}function Y(e){return"dodo_pro_monthly_v1"}function G(e){return"pro"}function k(e,o,u){const l=document.head.querySelector(e),n=l??o(),c=n.getAttribute("content"),p=!l;return p&&document.head.appendChild(n),n.setAttribute("content",u),()=>{p?n.remove():c===null?n.removeAttribute("content"):n.setAttribute("content",c)}}function j(e){const o=document.createElement("meta");return o.setAttribute("name",e),o}function w(e){const o=document.createElement("meta");return o.setAttribute("property",e),o}function J(){const e=document.title,o="MindExec Pricing",u="MindExec pricing for free local tools and MindCanvas projects. Start free with local tools, then upgrade when saved boards, cloud workflows, and AI support become important.",l="https://mindexec.pages.dev/pricing",n=document.head.querySelector('link[rel="canonical"]')??document.createElement("link"),c=!n.parentElement,p=n.getAttribute("href");n.setAttribute("rel","canonical"),n.setAttribute("href",l),c&&document.head.appendChild(n);const r={"@context":"https://schema.org","@type":"SoftwareApplication",name:"MindExec",applicationCategory:"ProductivityApplication",operatingSystem:"Web",description:"Local-first visual workspace with free markdown tools and paid MindCanvas project workflows.",url:l,offers:[{"@type":"Offer",name:"Free local tools",price:"0",priceCurrency:"USD"},{"@type":"Offer",name:"MindCanvas Pro",price:String(d.proMonthlyPriceUsd),priceCurrency:"USD"}]},a=document.head.querySelector("#pricing-structured-data")??document.createElement("script"),h=!a.parentElement,s=a.textContent;a.id="pricing-structured-data",a.type="application/ld+json",a.setAttribute("data-testid","pricing-structured-data"),a.textContent=JSON.stringify(r),h&&document.head.appendChild(a),document.title=o;const i=[k('meta[name="description"]',()=>j("description"),u),k('meta[name="robots"]',()=>j("robots"),"index,follow"),k('meta[property="og:title"]',()=>w("og:title"),o),k('meta[property="og:description"]',()=>w("og:description"),"Compare free local tools, MindCanvas Pro, and the current checkout offer."),k('meta[property="og:type"]',()=>w("og:type"),"website"),k('meta[property="og:url"]',()=>w("og:url"),l)];return()=>{document.title=e,i.forEach(y=>y()),c?n.remove():p===null?n.removeAttribute("href"):n.setAttribute("href",p),h?a.remove():a.textContent=s}}function oe({navigate:e}){const[o,u]=g.useState(()=>C()),[l,n]=g.useState(!1),c=g.useMemo(()=>H(),[]),[p,r]=g.useState(()=>{const s=C(),i=E();return s&&i?`Signed in as ${s.email}. Continue checkout when ready; payment remains adapter-gated.`:""}),a=g.useMemo(()=>z(),[]);g.useEffect(()=>J(),[]);const h=async()=>{const s=C();if(u(s),m.emit("pricing.checkout.requested",{stage:d.currentStage,signedIn:!!s}),!s){_(d.currentStage,"/pricing"),r("Sign in first to continue to secure checkout."),e("/login");return}if(n(!0),c.checkout.canAttempt)try{const i=G(d.currentStage),y=await O(P(),{priceId:Y(d.currentStage),priceStage:d.currentStage,planKey:i,planCode:i.toUpperCase(),email:s.email,returnUrl:new URL("/pricing?checkout=return",window.location.origin).toString()});x("pricing-checkout-provider-started"),r("Opening secure Dodo checkout..."),window.location.assign(y.checkoutUrl);return}catch(i){n(!1),r(`Secure checkout could not start: ${i instanceof Error?i.message:String(i)}`),m.emit("pricing.checkout.provider.failed",{stage:d.currentStage,message:i instanceof Error?i.message:String(i)});return}window.setTimeout(()=>{x("pricing-checkout-adapter-gated"),n(!1),r(`Checkout policy is ready for ${s.email}; secure payment adapter wiring is the remaining backend step.`),m.emit("pricing.checkout.adapter.gated",{stage:d.currentStage,signedIn:!0})},650)};return t.jsxs("div",{className:"page pricing-page","data-testid":"pricing-shell","data-pricing-stage":d.currentStage,"data-pricing-checkout-intent-key":N,"data-production-adapter-state":c.overallState,"data-pricing-checkout-provider-mode":c.checkout.mode,"data-pricing-checkout-provider-ready":c.checkout.canAttempt?"true":"false","data-client-secret-blocked":c.forbiddenClientSecretKeys.length>0?"true":"false",children:[t.jsxs("section",{className:"pricing-hero",children:[t.jsx("div",{className:"eyebrow",children:"Pricing"}),t.jsx("h1",{children:"Start free. Pay when the work becomes worth keeping."}),t.jsx("p",{children:"Free tools stay fast and local. MindCanvas becomes valuable when saved projects, cloud workflows, and AI-supported organization matter across larger boards."}),t.jsxs("div",{className:"action-row",children:[t.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>e("/tools"),"data-testid":"pricing-browse-tools",children:"Browse free tools"}),t.jsx("button",{className:"btn btn-secondary",type:"button",onClick:()=>e("/mindcanvas"),"data-testid":"pricing-open-mindcanvas",children:"Open MindCanvas"})]})]}),t.jsxs("section",{className:"pricing-grid pricing-grid--detailed",children:[t.jsx(v,{label:"Free local tools",price:"$0",body:"Best for quick markdown, notes, clipboard work, and no-login utility tasks.",lines:["Markdown preview, outline, and README tools","Browser notepad and clipboard board","Local-first use with no required upload","Great for one-off jobs before a project exists"],action:"Use the free tools",onAction:()=>e("/tools")}),t.jsx(v,{label:"MindCanvas Pro",price:b(d.proMonthlyPriceUsd),suffix:"/month",body:"For saved boards, cloud projects, and AI-assisted organization once the work grows beyond a disposable tool session.",note:`Annual planning target: ${b(d.proAnnualPriceUsd)} per year`,lines:["Saved project workflows instead of one-off tool output","Cloud access when local-only is no longer enough",`${d.proMonthlyIncludedCredits.toLocaleString()} included monthly credits`,"Better fit for repeat work, larger docs, and visual organization"],action:R(o==null?void 0:o.email),icon:l?I:L,actionClass:"btn-primary",busy:l,onAction:h,status:p,testId:"pricing-pro-checkout"}),t.jsx(v,{label:"Current offer",price:F(),body:K(),lines:a,action:"Open MindCanvas first",onAction:()=>e("/mindcanvas")})]}),t.jsxs("section",{className:"pricing-compare",children:[t.jsxs("div",{children:[t.jsx("div",{className:"eyebrow",children:"Why pay later"}),t.jsx("h2",{children:"The free entry point should stay frictionless."}),t.jsx("p",{children:"Pricing works when it appears after the user already understands value. Public tools are for instant utility. Pro is for keeping the work alive after it becomes important."})]}),t.jsxs("div",{className:"pricing-compare-grid",children:[t.jsxs("article",{children:[t.jsx(D,{size:20}),t.jsx("h3",{children:"Stay free when"}),t.jsx("p",{children:"You only need a quick preview, outline, conversion, note, or snippet board with no ongoing project state."})]}),t.jsxs("article",{children:[t.jsx($,{size:20}),t.jsx("h3",{children:"Upgrade when"}),t.jsx("p",{children:"You want saved boards, repeat workflows, cloud access, or AI-assisted organization across bigger visual projects."})]})]})]}),t.jsx(M,{compact:!0,eyebrow:"Launch list",headline:"Not ready to buy today?",body:"Join the English launch list for checkout openings, launch offers, and short examples of serious MindCanvas workflows.",buttonText:"Notify me",sourceTag:"pricing"})]})}function v({label:e,price:o,suffix:u,body:l,note:n,lines:c,action:p,icon:r,actionClass:a,busy:h,status:s,testId:i,onAction:y}){return t.jsxs("article",{className:"pricing-card pricing-card--detailed",children:[t.jsx("div",{className:"card-label",children:e}),t.jsxs("h2",{children:[o,u&&t.jsx("span",{children:u})]}),t.jsx("p",{children:l}),n&&t.jsx("div",{className:"pricing-note",children:n}),t.jsx("ul",{children:c.map(S=>t.jsx("li",{children:S},S))}),t.jsxs("button",{className:`btn pricing-card-action ${a||"btn-secondary"}`,type:"button",disabled:h,onClick:y,"data-testid":i,children:[r&&t.jsx(r,{size:16,className:h?"spin-icon":void 0}),p]}),s&&t.jsx("p",{className:"pricing-status","data-testid":i?`${i}-status`:void 0,children:s})]})}export{oe as PricingPage};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{j as t,r as m}from"./vendor-react-BXzpOyCS.js";import{g as te,a as q,d as ne,b as se,c as re}from"./marketingTools-DN_rnHeB.js";import{a0 as oe}from"./canvas-runtime-BbicBcOj.js";import{R as f}from"./app-runtime-xD2Z3NdN.js";import{b as ie}from"./toolHandoff-D5e5f7t5.js";import{u as ae,aU as Q,aV as le,aW as ce,aX as de,F as ue,aY as pe,Q as R,ab as he,aZ as me,T as Y,i as K,g as fe,f as U,aj as xe}from"./vendor-icons-DE3gIReG.js";const W=2*1024*1024,ke=".md,.markdown,.txt,text/markdown,text/plain",G={"markdown-preview":ue,"markdown-outline":de,"markdown-table":ce,"markdown-links":le,notepad:Q,clipboard:ae};function $(e,n,r){const s=document.head.querySelector(e),o=s??n(),l=o.getAttribute("content"),i=!s;return i&&document.head.appendChild(o),o.setAttribute("content",r),()=>{i?o.remove():l===null?o.removeAttribute("content"):o.setAttribute("content",l)}}function je(e){const n=document.createElement("meta");return n.setAttribute("name",e),n}function M(e){const n=document.createElement("meta");return n.setAttribute("property",e),n}function be(e,n){const r=document.title,s=n?e.liveUrl:`https://mindexec.pages.dev/tools/${e.key}`,o=n?`${e.title} - Free local browser tool`:`${e.title} | MindExec`,l=n?e.heroSubtitle:e.description,i=document.head.querySelector('link[rel="canonical"]')??document.createElement("link"),c=!i.parentElement,d=i.getAttribute("href");i.setAttribute("rel","canonical"),i.setAttribute("href",s),c&&document.head.appendChild(i),document.title=o;const p=[$('meta[name="description"]',()=>je("description"),l),$('meta[property="og:title"]',()=>M("og:title"),o),$('meta[property="og:description"]',()=>M("og:description"),l),$('meta[property="og:url"]',()=>M("og:url"),s)];return()=>{document.title=r,p.forEach(h=>h()),c?i.remove():d===null?i.removeAttribute("href"):i.setAttribute("href",d)}}function _e({navigate:e}){const n=te();return t.jsxs("div",{className:"page tools-directory-page",children:[t.jsxs("section",{className:"section-head",children:[t.jsx("div",{className:"eyebrow",children:"Free local-first tools"}),t.jsx("h1",{children:"Markdown, notes, and clipboard tools from MindExec"}),t.jsx("p",{children:"Use lightweight browser tools with no login and no database save. When the work gets bigger, move into MindCanvas for saved projects, AI workflows, and visual organization."})]}),t.jsx("div",{className:"tools-directory-groups",children:n.map(r=>t.jsxs("section",{className:"tools-directory-section",children:[t.jsxs("div",{className:"tools-directory-head",children:[t.jsx("h2",{children:r.title}),t.jsx("p",{children:r.description})]}),t.jsx("div",{className:"tools-directory-grid",children:r.entries.map(s=>{const o=G[s.kind];return t.jsxs("article",{className:"tools-directory-card","data-testid":"tool-directory-card","data-tool-key":s.key,children:[t.jsxs("div",{className:"tool-card-topline",children:[t.jsx("span",{children:s.label}),t.jsx(o,{size:18})]}),t.jsx("h3",{children:s.title}),t.jsx("p",{children:s.description}),t.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>e(`/tools/${s.key}`),children:["Open tool",t.jsx(pe,{size:16})]}),t.jsxs("a",{className:"tool-live-link",href:s.liveUrl,target:"_blank",rel:"noreferrer",children:[t.jsx(R,{size:14}),"Standalone"]})]},s.key)})})]},r.id))}),t.jsxs("section",{className:"tools-directory-cta",children:[t.jsxs("div",{children:[t.jsx("h2",{children:"Need a bigger workspace?"}),t.jsx("p",{children:"MindCanvas is where these small tasks turn into saved canvases, larger document sets, AI workflows, and cloud projects inside MindExec."})]}),t.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>e("/mindcanvas"),children:"Open MindCanvas"})]})]})}function De({toolKey:e,navigate:n,miniHost:r=!1}){const s=q(e);return s?t.jsx(ge,{tool:s,navigate:n,miniHost:r}):t.jsx("div",{className:"page tools-directory-page",children:t.jsxs("section",{className:"section-head",children:[t.jsx("div",{className:"eyebrow",children:"Tool not found"}),t.jsx("h1",{children:"This local tool is not enabled."}),t.jsx("p",{children:"Open the tools directory and pick one of the current MindExec browser tools."}),t.jsx("div",{className:"action-row",children:t.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>n("/tools"),children:"Back to tools"})})]})})}function ge({tool:e,navigate:n,miniHost:r}){const[s,o]=m.useState(()=>S(e.kind)),[l,i]=m.useState(""),[c,d]=m.useState(["Pricing proof from a user conversation","Demo clip idea for English-first launch","Competitor headline worth comparing"]),[p,h]=m.useState(null),[B,y]=m.useState(""),T=m.useRef(null),C=m.useRef(null),b=m.useMemo(()=>Ne(e,s,c),[c,s,e]),V=G[e.kind],X=e.relatedKeys.map(a=>q(a)).filter(a=>!!a),z=ve(e.kind),w=e.key==="bulk-markdown-viewer";m.useEffect(()=>{const a=be(e,r);return f.emit("tool.meta.applied",{toolKey:e.key,host:window.location.hostname,miniHost:r,canonical:r?e.liveUrl:`https://mindexec.pages.dev/tools/${e.key}`}),r&&f.emit("tool.hostProfile.applied",{toolKey:e.key,host:window.location.hostname}),a},[r,e]),m.useEffect(()=>{o(S(e.kind)),y(""),h(null)},[e.key,e.kind]);const P=async(a,x,k)=>{try{const u=await oe(x);h(a),f.emit("tool.copy",{toolKey:e.key,ok:!0,method:u,chars:x.length}),window.setTimeout(()=>h(null),1400)}catch(u){const j=k==="source"?T.current:C.current;if(j){j.focus(),j.select(),h(k==="source"?"Source selected":"Output selected"),f.emit("tool.copy",{toolKey:e.key,ok:!1,selected:!0,target:k,message:u instanceof Error?u.message:String(u)});return}h("Copy failed"),f.emit("tool.copy",{toolKey:e.key,ok:!1,target:k,message:u instanceof Error?u.message:String(u)})}},Z=()=>{o(S(e.kind)),y("Sample loaded."),f.emit("tool.sample.loaded",{toolKey:e.key})},J=()=>{o(""),y(""),f.emit("tool.source.cleared",{toolKey:e.key})},O=()=>{ie({toolKey:e.key,toolTitle:e.title,sourceTitle:`${e.label} source`,sourceBody:e.kind==="clipboard"?c.join(`
|
|
2
|
+
|
|
3
|
+
`):s,resultTitle:b.title,resultBody:b.text,taskBody:`Review this ${e.title} output and propose the next concrete step for a global MindExec launch workflow.`}),n("/mindcanvas")},ee=async a=>{const x=Array.from(a.currentTarget.files??[]);if(a.currentTarget.value="",!z||x.length===0)return;const k=x.slice(0,w?12:1),u=k.filter(g=>g.size>W),j=k.filter(g=>g.size<=W);if(j.length===0){y("Selected file is over the 2 MB local preview limit."),f.emit("tool.file.rejected",{toolKey:e.key,reason:"size-limit",count:k.length});return}try{const v=(await Promise.all(j.map(async F=>{const I=(await F.text()).trim();return w?[`# ${F.name}`,"",I].join(`
|
|
4
|
+
`):I}))).filter(Boolean).join(`
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
`).trim();o(v),y([`Opened ${j.length} local file${j.length===1?"":"s"}.`,u.length>0?`${u.length} skipped over 2 MB.`:""].filter(Boolean).join(" ")),f.emit("tool.file.opened",{toolKey:e.key,fileCount:j.length,skippedCount:u.length,textLength:v.length,mode:w?"multi":"single"})}catch(g){const v=g instanceof Error?g.message:String(g);y(`Could not open the local file: ${v}`),f.emit("tool.file.failed",{toolKey:e.key,message:v})}};return t.jsxs("div",{className:"page tool-home-page",children:[t.jsxs("section",{className:"tool-home-hero",children:[r?t.jsxs("a",{className:"tool-back-button",href:"https://mindexec.pages.dev/tools",children:[t.jsx(R,{size:16}),"MindExec tools"]}):t.jsxs("button",{className:"tool-back-button",type:"button",onClick:()=>n("/tools"),children:[t.jsx(he,{size:16}),"Tools"]}),t.jsx("div",{className:"eyebrow",children:e.heroEyebrow}),t.jsx("h1",{children:e.heroTitle}),t.jsx("p",{children:e.heroSubtitle}),t.jsxs("div",{className:"tool-hero-meta",children:[t.jsx("div",{className:"tool-privacy-note",children:e.privacyNote}),t.jsxs("a",{className:"tool-live-pill",href:e.liveUrl,target:"_blank",rel:"noreferrer",children:[t.jsx(R,{size:14}),new URL(e.liveUrl).hostname]})]})]}),t.jsxs("section",{className:`tool-mini-canvas tool-mini-canvas--${e.kind}`,"data-testid":"tool-workbench","data-tool-key":e.key,children:[t.jsxs("div",{className:"tool-mini-head",children:[t.jsxs("div",{children:[t.jsx("div",{className:"eyebrow",children:"Mini canvas mode"}),t.jsx("h2",{children:e.canvasTitle}),t.jsx("p",{children:e.canvasSubtitle})]}),t.jsx("div",{className:"tool-mini-badges",children:e.badges.map(a=>t.jsx("span",{children:a},a))})]}),t.jsxs("div",{className:"tool-mini-surface",children:[t.jsxs("div",{className:"tool-mini-toolbar",children:[t.jsxs("div",{children:[t.jsx("strong",{children:e.toolbarTitle}),t.jsx("span",{children:e.toolbarBody})]}),t.jsxs("div",{className:"tool-mini-actions",children:[t.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>{var a;return(a=T.current)==null?void 0:a.focus()},children:"Source"}),t.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>{var a;return(a=C.current)==null?void 0:a.focus()},children:"Result"}),t.jsx("button",{className:"btn btn-secondary",type:"button",onClick:Z,children:"Sample"})]})]}),t.jsxs("div",{className:"tool-canvas-grid",children:[t.jsxs("article",{className:"tool-canvas-node tool-canvas-node--source",children:[t.jsx(N,{icon:V,eyebrow:"Source node",title:we(e)}),e.kind==="clipboard"?t.jsx(ye,{draft:l,snippets:c,onDraft:i,onAdd:()=>{const a=l.trim();a&&(d(x=>[a,...x].slice(0,18)),i(""))},onDelete:a=>d(x=>x.filter((k,u)=>u!==a))}):t.jsxs(t.Fragment,{children:[z&&t.jsxs("label",{className:"tool-file-open",children:[t.jsx("input",{"data-testid":"tool-file-input",type:"file",accept:ke,multiple:w,onChange:ee}),t.jsx(me,{size:15}),t.jsx("span",{children:w?"Open local markdown files":"Open a local markdown file"})]}),B&&t.jsx("div",{className:"tool-file-status",children:B}),t.jsx("textarea",{"data-testid":"tool-source",ref:T,value:s,onChange:a=>o(a.target.value),spellCheck:!1})]}),t.jsxs("div",{className:"tool-node-actions",children:[t.jsxs("button",{type:"button",className:"btn btn-ghost",onClick:J,children:[t.jsx(Y,{size:15}),"Clear"]}),t.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>P("Source copied",s,"source"),children:[t.jsx(K,{size:15}),"Copy source"]})]})]}),t.jsxs("article",{className:"tool-canvas-node tool-canvas-node--result",children:[t.jsx(N,{icon:fe,eyebrow:"Result node",title:b.title}),b.kind==="preview"?t.jsx("div",{className:"tool-rendered-preview","data-testid":"tool-rendered-preview",children:Ae(s)}):t.jsx("textarea",{"data-testid":"tool-result",ref:C,value:b.text,readOnly:!0,spellCheck:!1}),t.jsxs("div",{className:"tool-node-actions",children:[t.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>P("Result copied",b.text,"result"),children:[t.jsx(K,{size:15}),"Copy output"]}),t.jsxs("button",{type:"button",className:"btn btn-primary","data-testid":"tool-send-to-mindcanvas",onClick:O,children:[t.jsx(U,{size:15}),"Send to MindCanvas"]})]}),p&&t.jsx("div",{className:"tool-copy-feedback",children:p})]}),t.jsxs("article",{className:"tool-canvas-node tool-canvas-node--readout",children:[t.jsx(N,{icon:xe,eyebrow:"Readouts",title:b.summaryTitle}),t.jsx("ul",{children:b.readouts.map(a=>t.jsx("li",{children:a},a))})]}),t.jsxs("article",{className:"tool-canvas-node tool-canvas-node--lesson",children:[t.jsx(N,{icon:Q,eyebrow:"Mini canvas lesson",title:e.learningTitle}),t.jsx("p",{children:e.learningBody}),t.jsx("ul",{children:e.learningBullets.map(a=>t.jsx("li",{children:a},a))})]}),t.jsxs("article",{className:"tool-canvas-node tool-canvas-node--next",children:[t.jsx(N,{icon:U,eyebrow:"Next step",title:e.ctaTitle}),t.jsx("p",{children:e.ctaBody}),t.jsxs("div",{className:"tool-node-actions",children:[t.jsx("button",{type:"button",className:"btn btn-primary",onClick:O,children:"Send to MindCanvas"}),t.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>n("/pricing"),children:"Pricing"})]})]})]})]})]}),t.jsxs("section",{className:"tool-related",children:[t.jsxs("div",{className:"tools-directory-head",children:[t.jsx("h2",{children:"Related local tools"}),t.jsx("p",{children:"Keep the session lightweight until the work deserves a saved board."})]}),t.jsx("div",{className:"tools-directory-grid",children:X.map(a=>t.jsxs("button",{className:"related-tool-card",type:"button",onClick:()=>n(`/tools/${a.key}`),children:[t.jsx("span",{children:a.label}),t.jsx("strong",{children:a.title}),t.jsx("small",{children:a.description})]},a.key))})]})]})}function N({icon:e,eyebrow:n,title:r}){return t.jsxs("div",{className:"tool-node-title",children:[t.jsxs("div",{children:[t.jsx("span",{children:n}),t.jsx("h3",{children:r})]}),t.jsx(e,{size:18})]})}function ye({draft:e,snippets:n,onDraft:r,onAdd:s,onDelete:o}){return t.jsxs("div",{className:"clipboard-tool",children:[t.jsx("textarea",{value:e,onChange:l=>r(l.target.value),placeholder:"Paste a snippet, quote, idea, or tiny task..."}),t.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Add snippet"}),t.jsx("div",{className:"snippet-list",children:n.map((l,i)=>t.jsxs("article",{className:"snippet-item",children:[t.jsx("p",{children:l}),t.jsx("button",{type:"button",title:"Delete snippet",onClick:()=>o(i),children:t.jsx(Y,{size:14})})]},`${l}-${i}`))})]})}function S(e){return e==="markdown-table"?ne:e==="markdown-links"?se:e==="notepad"?["Raw launch thought:","","I need one English-first proof post that shows why MindCanvas is useful before asking for paid conversion.","","Next action: turn this into a small execution checklist."].join(`
|
|
9
|
+
`):re}function we(e){return e.kind==="markdown-table"?"Messy table source":e.kind==="markdown-links"?"Markdown links source":e.kind==="notepad"?"Quick note":e.kind==="clipboard"?"Snippet source":e.key==="bulk-markdown-viewer"?"Markdown stack":"Markdown source"}function ve(e){return e==="markdown-preview"||e==="markdown-outline"||e==="markdown-table"||e==="markdown-links"}function Ne(e,n,r){if(e.key==="markdown-to-html"){const s=Le(n);return{kind:"text",title:"HTML output",summaryTitle:"Conversion readout",text:s||"<!-- Paste markdown to convert it locally. -->",readouts:Ce(n,s)}}if(e.kind==="markdown-outline"){const s=L(n);return{kind:"text",title:"Outline",summaryTitle:"Hierarchy preview",text:s||"No headings found.",readouts:_(n,s)}}if(e.kind==="markdown-table"){const s=Be(n);return{kind:"text",title:"Formatted table",summaryTitle:"Table readout",text:s||"Paste a markdown table to format it.",readouts:$e(n,s)}}if(e.kind==="markdown-links"){const s=ze(n);return{kind:"text",title:"Link report",summaryTitle:"Link scan",text:Pe(s),readouts:Te(s)}}if(e.kind==="notepad")return{kind:"text",title:"Note readout",summaryTitle:"Quick scan lane",text:Se(n),readouts:Me(n)};if(e.kind==="clipboard"){const s=r.map((o,l)=>`${l+1}. ${o}`).join(`
|
|
10
|
+
|
|
11
|
+
`);return{kind:"text",title:"Snippet pile",summaryTitle:"Clipboard readout",text:s||"No snippets yet.",readouts:[`${r.length} snippets`,`${A(s)} words`,"Promote when patterns appear."]}}return{kind:"preview",title:"Rendered preview",summaryTitle:"Quick scan lane",text:Ee(n),readouts:_(n,L(n))}}function A(e){return e.trim()?e.trim().split(/\s+/).length:0}function _(e,n){const r=n?n.split(`
|
|
12
|
+
`).length:0;return[`${e.length} characters`,`${A(e)} words`,`${r} headings`,"Private browser session only."]}function $e(e,n){var o;const r=e.split(`
|
|
13
|
+
`).filter(l=>l.includes("|")).length,s=((o=H(e)[0])==null?void 0:o.length)||0;return[`${r} table rows detected`,`${s} columns`,n?"Copy-ready output":"Waiting for valid table input"]}function Te(e){const n=e.reduce((r,s)=>r+s.warnings.length,0);return[`${e.length} links detected`,`${n} warnings`,"No external crawling or network checks."]}function Ce(e,n){return[`${e.length} source characters`,`${n.length} HTML characters`,"Escaped local conversion output"]}function Me(e){const n=e.split(`
|
|
14
|
+
`).filter(r=>r.trim()).length;return[`${e.length} characters`,`${A(e)} words`,`${n} filled lines`,"Move when the note starts branching."]}function Se(e){const n=e.split(`
|
|
15
|
+
`).map(r=>r.trim()).filter(Boolean).slice(0,6);return n.length===0?"Write a quick note first.":["Quick note summary","",...n.map(r=>`- ${r}`)].join(`
|
|
16
|
+
`)}function L(e){return e.split(`
|
|
17
|
+
`).map(n=>/^(#{1,6})\s+(.+)$/.exec(n.trim())).filter(n=>!!n).map(n=>`${" ".repeat(n[1].length-1)}- ${n[2].trim()}`).join(`
|
|
18
|
+
`)}function Ee(e){const n=L(e);return["Rendered markdown preview","",e.split(`
|
|
19
|
+
`).filter(r=>r.trim()).slice(0,16).join(`
|
|
20
|
+
`),n?["","Outline",n].join(`
|
|
21
|
+
`):""].filter(Boolean).join(`
|
|
22
|
+
`)}function Re(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function E(e){return Re(e).replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>')}function Le(e){const n=e.split(`
|
|
23
|
+
`),r=[];let s=[];const o=()=>{s.length!==0&&(r.push("<ul>"),r.push(...s.map(l=>` <li>${E(l)}</li>`)),r.push("</ul>"),s=[])};return n.forEach(l=>{const i=l.trim();if(!i){o();return}if(i==="---"){o(),r.push("<hr>");return}const c=/^(#{1,6})\s+(.+)$/.exec(i);if(c){o();const d=c[1].length;r.push(`<h${d}>${E(c[2])}</h${d}>`);return}if(/^[-*]\s+/.test(i)){s.push(i.replace(/^[-*]\s+/,""));return}o(),r.push(`<p>${E(i)}</p>`)}),o(),r.join(`
|
|
24
|
+
`)}function Ae(e){const n=e.split(`
|
|
25
|
+
`),r=[];let s=[];const o=l=>{s.length!==0&&(r.push(t.jsx("ul",{children:s.map(i=>t.jsx("li",{children:i},i))},l)),s=[])};return n.forEach((l,i)=>{const c=l.trim();if(!c){o(`list-${i}`);return}const d=/^(#{1,4})\s+(.+)$/.exec(c);if(d){o(`list-${i}`);const p=d[1].length,h=d[2];p===1?r.push(t.jsx("h2",{children:h},i)):p===2?r.push(t.jsx("h3",{children:h},i)):r.push(t.jsx("h4",{children:h},i));return}if(/^[-*]\s+/.test(c)){s.push(c.replace(/^[-*]\s+/,""));return}o(`list-${i}`),r.push(t.jsx("p",{children:c},i))}),o("list-end"),r.length>0?r:t.jsx("p",{children:"Paste markdown to preview it locally."})}function H(e){return e.split(`
|
|
26
|
+
`).map(n=>n.trim()).filter(n=>n.includes("|")).map(n=>n.replace(/^\|/,"").replace(/\|$/,"").split("|").map(r=>r.trim())).filter(n=>n.some(r=>r.length>0))}function Be(e){const n=H(e).filter(c=>!c.every(d=>/^:?-{1,}:?$/.test(d)));if(n.length===0)return"";const r=Math.max(...n.map(c=>c.length)),s=n.map(c=>Array.from({length:r},(d,p)=>c[p]||"")),o=Array.from({length:r},(c,d)=>Math.max(...s.map(p=>p[d].length),3)),l=c=>`| ${c.map((d,p)=>d.padEnd(o[p]," ")).join(" | ")} |`,i=`| ${o.map(c=>"-".repeat(c)).join(" | ")} |`;return[l(s[0]),i,...s.slice(1).map(l)].join(`
|
|
27
|
+
`)}function ze(e){const n=[],r=/\[([^\]]*)\]\(([^)]*)\)/g;let s;for(;(s=r.exec(e))!==null;){const l=s[1].trim()||"(no label)",i=s[2].trim();n.push(D(l,i))}const o=/(^|\s)(https?:\/\/[^\s)]+)/g;for(;(s=o.exec(e))!==null;){const l=s[2].trim();n.some(i=>i.target===l)||n.push(D(l,l))}return n}function D(e,n){const r=[],s=n.toLowerCase();let o="relative";return n?s.startsWith("javascript:")?(r.push("Unsafe javascript target"),o="unsafe"):s.includes("localhost")||s.includes("127.0.0.1")?(r.push("Local development target"),o="local"):s.startsWith("http://")?(r.push("Insecure http target"),o="external"):s.startsWith("https://")?o="external":s.startsWith("#")&&(o="anchor"):(r.push("Empty target"),o="empty"),{label:e,target:n,kind:o,warnings:r}}function Pe(e){return e.length===0?"No markdown links found.":["Markdown link report","",...e.map((n,r)=>{const s=n.warnings.length>0?` warnings: ${n.warnings.join(", ")}`:" ok";return`${r+1}. [${n.kind}] ${n.label} -> ${n.target||"(empty)"}${s}`})].join(`
|
|
28
|
+
`)}export{De as MarketingToolPage,_e as ToolsDirectoryPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tools-directory-groups,.tool-related{display:grid;gap:30px;margin-top:30px}.tools-directory-section,.tools-directory-cta,.tool-mini-canvas,.tool-related{border:1px solid rgba(203,213,225,.76);border-radius:10px;background:#ffffffe6;box-shadow:var(--soft-shadow)}.tools-directory-section,.tool-related{padding:20px}.tools-directory-head h2,.tool-home-hero h1,.tool-mini-head h2{margin:0;color:#0f172a;font-weight:900;letter-spacing:0}.tools-directory-head p,.tool-mini-head p{margin:8px 0 0;color:#475569;line-height:1.65}.tools-directory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-top:18px}.tools-directory-card,.related-tool-card{min-height:210px;display:grid;align-content:start;gap:12px;padding:16px;border:1px solid rgba(203,213,225,.78);border-radius:9px;background:#fff;color:#1e293b;text-align:left}.tools-directory-card h3,.related-tool-card strong{margin:0;color:#0f172a;font-size:18px;line-height:1.25}.tools-directory-card p,.related-tool-card small{margin:0;color:#475569;line-height:1.6}.tools-directory-card .btn{width:fit-content;margin-top:auto}.tool-live-link{width:fit-content;min-height:30px;display:inline-flex;align-items:center;gap:6px;padding:0 9px;border:1px solid rgba(15,118,110,.18);border-radius:8px;color:#0f766e;background:#f0fdfa;font-size:12px;font-weight:850;text-decoration:none}.tool-card-topline,.related-tool-card span{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#0f766e;font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.tools-directory-cta{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:32px;padding:22px;color:#fff;background:#0f172a}.tools-directory-cta h2{margin:0;font-size:24px}.tools-directory-cta p{max-width:760px;margin:8px 0 0;color:#cbd5e1;line-height:1.65}.tools-directory-cta .btn{flex:0 0 auto;color:#0f172a;background:#fff}.tool-home-hero{display:grid;gap:12px;padding-top:4px}.tool-home-hero h1{max-width:900px;font-size:clamp(34px,5vw,62px);line-height:1}.tool-home-hero p{max-width:800px;margin:0;color:#334155;font-size:18px;line-height:1.75}.tool-back-button{width:fit-content;min-height:36px;display:inline-flex;align-items:center;gap:8px;padding:0 12px;border:1px solid rgba(203,213,225,.8);border-radius:9px;color:#334155;background:#fff;cursor:pointer;font-weight:800;text-decoration:none}.tool-privacy-note{width:fit-content;padding:8px 12px;border:1px solid rgba(15,118,110,.18);border-radius:9px;color:#0f766e;background:#f0fdfae0;font-size:13px;font-weight:800}.tool-hero-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.tool-live-pill{width:fit-content;min-height:35px;display:inline-flex;align-items:center;gap:7px;padding:0 12px;border:1px solid rgba(37,99,235,.2);border-radius:9px;color:#1d4ed8;background:#eff6ff;font-size:13px;font-weight:850;text-decoration:none}.tool-mini-canvas{margin-top:28px;padding:18px}.tool-mini-head,.tool-mini-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.tool-mini-badges,.tool-mini-actions,.tool-node-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.tool-mini-badges span{min-height:30px;display:inline-flex;align-items:center;padding:0 10px;border:1px solid rgba(37,99,235,.18);border-radius:999px;color:#1d4ed8;background:#eff6ff;font-size:12px;font-weight:850}.tool-mini-surface{margin-top:18px;padding:14px;border:1px solid rgba(148,163,184,.34);border-radius:10px;background:linear-gradient(rgba(148,163,184,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(148,163,184,.12) 1px,transparent 1px),#f8fafc;background-size:28px 28px}.tool-mini-toolbar{align-items:center;padding:12px;border:1px solid rgba(203,213,225,.78);border-radius:9px;background:#fffffff0}.tool-mini-toolbar strong,.tool-mini-toolbar span{display:block}.tool-mini-toolbar strong{color:#0f172a}.tool-mini-toolbar span{margin-top:3px;color:#64748b;font-size:13px}.tool-canvas-grid{display:grid;grid-template-columns:minmax(280px,.95fr) minmax(320px,1.15fr);grid-template-areas:"source result" "readout result" "lesson next";gap:14px;margin-top:14px}.tool-canvas-node{min-width:0;display:grid;gap:12px;padding:14px;border:1px solid rgba(203,213,225,.82);border-radius:9px;background:#fffffff5;box-shadow:0 12px 28px #0f172a12}.tool-canvas-node--source{grid-area:source}.tool-canvas-node--result{grid-area:result}.tool-canvas-node--readout{grid-area:readout}.tool-canvas-node--lesson{grid-area:lesson}.tool-canvas-node--next{grid-area:next}.tool-node-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.tool-node-title span{color:#0f766e;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.tool-node-title h3{margin:4px 0 0;color:#0f172a;font-size:18px;line-height:1.25}.tool-canvas-node textarea,.tool-rendered-preview,.clipboard-tool textarea{width:100%;min-height:250px;padding:14px;border:1px solid rgba(203,213,225,.92);border-radius:8px;color:#1e293b;background:#fff;resize:vertical}.tool-file-open{min-height:38px;width:fit-content;max-width:100%;display:inline-flex;align-items:center;gap:8px;padding:0 12px;border:1px solid rgba(59,130,246,.24);border-radius:8px;color:#1d4ed8;background:#eff6ff;font-size:13px;font-weight:850;cursor:pointer}.tool-file-open input{display:none}.tool-file-open span{overflow-wrap:anywhere}.tool-file-status{min-height:28px;display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:0 10px;border-radius:999px;color:#334155;background:#f1f5f9;font-size:12px;font-weight:750}.tool-canvas-node--result textarea,.tool-rendered-preview{min-height:460px}.tool-canvas-node ul{margin:0;padding-left:19px;color:#334155;line-height:1.65}.tool-canvas-node p{margin:0;color:#475569;line-height:1.65}.tool-rendered-preview{overflow:auto}.tool-rendered-preview h2,.tool-rendered-preview h3,.tool-rendered-preview h4,.tool-rendered-preview p{margin:0 0 12px}.tool-rendered-preview h2{font-size:28px;line-height:1.15}.tool-rendered-preview h3{font-size:21px}.tool-copy-feedback{min-height:30px;display:inline-flex;align-items:center;width:fit-content;padding:0 10px;border-radius:999px;color:#166534;background:#dcfce7;font-size:12px;font-weight:850}.spin-icon{animation:spinIcon .8s linear infinite}@keyframes spinIcon{to{transform:rotate(360deg)}}@media(max-width:960px){.tool-canvas-grid{grid-template-columns:1fr;grid-template-areas:"source" "result" "readout" "lesson" "next"}.tool-mini-head,.tool-mini-toolbar,.tools-directory-cta{align-items:stretch;flex-direction:column}}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{r as i,j as e}from"./vendor-react-BXzpOyCS.js";import{g as H,j as fe,s as M,z as xe,ap as Se,E as we}from"./canvas-runtime-BbicBcOj.js";import{R as d}from"./app-runtime-xD2Z3NdN.js";import{b as je}from"./toolHandoff-D5e5f7t5.js";import{an as ke,aA as Ce,a_ as te,f as Le,a$ as Te,au as $e,Q as Ne}from"./vendor-icons-DE3gIReG.js";const ae=[{id:"yt-ai-workflow-1",videoId:"mexecAI0001",title:"AI workflow systems for solo founders",channel:"Indie Build Lab",publishedAt:"2026-06-18",duration:"12:34",views:"42,180",url:"https://www.youtube.com/watch?v=mexecAI0001",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"A practical breakdown of capture, planning, execution, and proof loops for one-person products."},{id:"yt-canvas-ops-2",videoId:"mexecRC0002",title:"Building a visual operating system with React canvas",channel:"Product Runtime",publishedAt:"2026-06-14",duration:"18:09",views:"31,904",url:"https://www.youtube.com/watch?v=mexecRC0002",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Covers node layout, local persistence, keyboard workflows, and avoiding heavy runtimes in the browser."},{id:"yt-launch-3",videoId:"mexecLN0003",title:"From prototype to paid users in seven days",channel:"Global SaaS Notes",publishedAt:"2026-06-11",duration:"09:52",views:"88,430",url:"https://www.youtube.com/watch?v=mexecLN0003",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Launch checklist focused on proof assets, lead capture, pricing pressure, and distribution sequencing."},{id:"yt-local-first-4",videoId:"mexecLF0004",title:"Local-first web apps that feel instant",channel:"Frontend Engine Room",publishedAt:"2026-06-07",duration:"22:18",views:"17,609",url:"https://www.youtube.com/watch?v=mexecLF0004",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Explains local state, cache boundaries, browser storage, and sync contracts for fast product surfaces."},{id:"yt-agent-5",videoId:"mexecAD0005",title:"Agent dashboards for real business execution",channel:"Ops With AI",publishedAt:"2026-06-01",duration:"15:21",views:"56,112",url:"https://www.youtube.com/watch?v=mexecAD0005",thumbnailUrl:"/assets/mindexecution-mindcanvas.png",summary:"Maps agent tasks to approvals, artifacts, execution evidence, and human-gated external actions."}],Be=["relevance","date","viewCount","rating","title"],Ae=["any","day","week","month","year"],Ie=["any","short","medium","long"],Re=["any","live","upcoming","completed"],Ue=["moderate","none","strict"];function qe(a,t){const c=t.toLowerCase(),g=`${a.title} ${a.channel} ${a.summary}`.toLowerCase();return c?c.split(/\s+/).filter(n=>g.includes(n)).length+1:1}function se(a,t,c){return ae.map(n=>({...n,title:a.trim()?`${n.title}: ${a.trim()}`:n.title,score:qe(n,a)})).sort((n,u)=>t==="date"?u.publishedAt.localeCompare(n.publishedAt):t==="viewCount"?Number(u.views.replace(/,/g,""))-Number(n.views.replace(/,/g,"")):t==="title"?n.title.localeCompare(u.title):u.score-n.score).slice(0,c).map(({score:n,...u})=>({...u,source:"sample"}))}function Pe(a){return a.map((t,c)=>[`${c+1}. ${t.title}`,` - Channel: ${t.channel}`,` - Published: ${t.publishedAt}`,` - Duration: ${t.duration}`,` - Views: ${t.views}`,` - URL: ${t.url}`,t.thumbnailUrl?` - Thumbnail: ${t.thumbnailUrl}`:"",` - Note: ${t.summary}`].filter(Boolean).join(`
|
|
2
|
+
`)).join(`
|
|
3
|
+
|
|
4
|
+
`)}function De(a){return a.map(t=>({id:t.id,kind:"youtube-video",title:t.title,url:t.url,videoId:t.videoId,thumbnailUrl:t.thumbnailUrl,summary:t.summary,channel:t.channel,publishedAt:t.publishedAt,duration:t.duration,views:t.views,source:t.source||"sample"}))}function Ye(a){if(!a)return"-";const t=Date.parse(a);return Number.isFinite(t)?new Date(t).toISOString().slice(0,10):a}function Ee(a){return typeof a!="number"||!Number.isFinite(a)?"-":a.toLocaleString("en-US")}function ze(a){const t=String(a.videoId||"").trim(),c=String(a.title||"").trim();if(!t||!c)return null;const g=String(a.url||"").trim()||`https://www.youtube.com/watch?v=${t}`,n=String(a.channelTitle||"").trim()||"Unknown channel",u=String(a.durationText||a.duration||"").trim()||"-",y=Ye(a.publishedAt),C=Ee(a.viewCount);return{id:t,videoId:t,title:c,channel:n,publishedAt:y,duration:u,views:C,url:g,thumbnailUrl:String(a.thumbnailUrl||"").trim()||void 0,summary:`Live YouTube result from ${n}. Published ${y}; duration ${u}; views ${C}.`,source:"bridge"}}function Fe(){return{state:M()?"idle":"blocked",baseUrl:H(),message:M()?"LocalBridge not checked yet.":"Hosted LocalBridge access is gated."}}function Qe({navigate:a}){const t=i.useRef(0),[c,g]=i.useState(()=>H()),[n,u]=i.useState(()=>Fe()),[y,C]=i.useState("AI workflow for solo founders"),[L,ne]=i.useState("relevance"),[$,re]=i.useState("any"),[N,oe]=i.useState("any"),[B,ie]=i.useState("any"),[A,le]=i.useState("moderate"),[I,ce]=i.useState("en"),[R,ue]=i.useState("US"),[U,de]=i.useState(10),[m,O]=i.useState(()=>se("AI workflow for solo founders","relevance",5)),[q,v]=i.useState(()=>new Set(["yt-ai-workflow-1"])),[be,f]=i.useState("Local sample results loaded. Search will use LocalBridge /api/youtube/search on loopback or after enabling local bridge access."),[T,P]=i.useState(!1),[w,W]=i.useState("sample"),[V,Q]=i.useState(""),[_,G]=i.useState(""),[K,J]=i.useState(!1),[X,Z]=i.useState(""),D=i.useMemo(()=>m.filter(s=>q.has(s.id)),[m,q]),Y=(s,l="fallback",r)=>{const b=(r==null?void 0:r.query)??y,x=(r==null?void 0:r.order)??L,o=(r==null?void 0:r.maxResults)??U,S=se(b,x,Math.min(o,ae.length));O(S),v(new Set),W(l),Q(""),G(""),J(!1),Z(""),f(s)},E=async(s,l="")=>{s==null||s.preventDefault();const r=y.trim();if(!r){f("Enter a query before searching.");return}const b=t.current+1;t.current=b;const x=()=>t.current===b,o={query:r,order:L,publishedWithin:$,videoDuration:N,eventType:B,safeSearch:A,language:I.trim(),region:R.trim(),maxResults:U};P(!0);const S=H();if(g(S),d.emit("youtube.search.local",{requestSeq:b,q:o.query,order:o.order,pageToken:!!l}),!M()){u({state:"blocked",baseUrl:S,message:"Hosted LocalBridge access is gated."}),Y("Hosted LocalBridge access is gated. Showing local sample results only.","blocked",o),d.emit("youtube.search.fallback",{requestSeq:b,reason:"hosted-localbridge-gated",order:o.order,publishedWithin:o.publishedWithin,videoDuration:o.videoDuration,eventType:o.eventType,safeSearch:o.safeSearch,language:o.language,region:o.region}),P(!1);return}try{const p=await xe(S);if(!x()){d.emit("youtube.search.staleIgnored",{requestSeq:b,stage:"bridge-status"});return}if(u(p),p.state!=="connected"){Y(`${p.message||"LocalBridge is unavailable."} Showing local sample results.`,"fallback",o),d.emit("youtube.search.fallback",{requestSeq:b,reason:"localbridge-unavailable",state:p.state});return}const h=await Se({q:o.query,order:o.order,publishedWithin:o.publishedWithin,videoDuration:o.videoDuration,eventType:o.eventType,safeSearch:o.safeSearch,relevanceLanguage:o.language,regionCode:o.region,maxResults:o.maxResults,pageToken:l},S);if(!x()){d.emit("youtube.search.staleIgnored",{requestSeq:b,stage:"bridge-results"});return}const j=(h.items||[]).map(ze).filter(z=>!!z);O(j),v(l?z=>new Set(j.filter(F=>z.has(F.id)).map(F=>F.id)):new Set),Q(String(h.nextPageToken||"")),G(String(h.prevPageToken||"")),J(h.fromCache===!0),Z(h.fetchedAt||new Date().toISOString()),W("bridge"),f(j.length>0?`Live YouTube search complete: ${j.length} results${h.fromCache?" from cache":""}.`:"Live YouTube search returned no videos."),d.emit("youtube.search.bridge",{requestSeq:b,count:j.length,fromCache:h.fromCache===!0,hasNext:!!h.nextPageToken,hasPrevious:!!h.prevPageToken})}catch(p){if(!x()){d.emit("youtube.search.staleIgnored",{requestSeq:b,stage:"bridge-error"});return}const h=p instanceof Error?p.message:String(p);Y(`${h} Showing local sample results.`,"fallback",o),d.emit("youtube.search.fallback",{requestSeq:b,reason:"bridge-search-error",message:h})}finally{x()&&P(!1)}},he=()=>{we(!0),u({state:"idle",baseUrl:c,message:"Hosted LocalBridge access enabled. Search again to use the live adapter."}),f("Hosted LocalBridge access enabled. Search again to use LocalBridge /api/youtube/search."),d.emit("youtube.bridge.hostedAccess.enabled")},ge=s=>{v(l=>{const r=new Set(l);return r.has(s)?r.delete(s):r.add(s),d.emit("youtube.selection.changed",{count:r.size}),r})},me=()=>{v(new Set(m.map(s=>s.id))),d.emit("youtube.selection.all",{count:m.length})},pe=()=>{v(new Set),d.emit("youtube.selection.clear")},ee=s=>{const l=s==="selected"?D:m;if(l.length===0){f("Select at least one video before creating MindCanvas nodes.");return}const r=Pe(l);je({toolKey:"youtube-search",toolTitle:"YouTube Search",sourceTitle:`YouTube search: ${y.trim()}`,sourceBody:`Filters: order=${L}, period=${$}, duration=${N}, event=${B}, safe=${A}, lang=${I}, region=${R}`,resultTitle:`${l.length} YouTube candidates`,resultBody:r,taskBody:"Turn these YouTube candidates into a MindExec content or research plan. Extract buyer pain, proof angles, and next launch asset ideas.",resultItems:De(l)}),d.emit("youtube.nodes.created",{mode:s,count:l.length}),f(`${l.length} video records prepared for MindCanvas handoff.`),a("/mindcanvas")},ye=n.state==="connected"?"live adapter":n.state==="blocked"?"bridge gated":n.state==="unavailable"?"bridge unavailable":"local bridge ready",ve=w==="bridge"?K?"live cache":"live":w==="blocked"?"gated sample":w==="fallback"?"fallback sample":"sample";return e.jsxs("div",{className:"page youtube-page","data-youtube-bridge-state":n.state,"data-youtube-result-source":w,children:[e.jsxs("section",{className:"youtube-hero",children:[e.jsxs("div",{children:[e.jsx("div",{className:"eyebrow",children:"Content Capture"}),e.jsx("h1",{children:"YouTube Search"}),e.jsx("p",{children:"Search, filter, select, and send video candidates into MindCanvas as research nodes. Live search runs through the LocalBridge YouTube proxy when local bridge access is available."})]}),e.jsx("span",{className:`youtube-badge youtube-badge--${w}`,"data-testid":"youtube-result-source",children:ve})]}),e.jsxs("form",{className:"youtube-search-panel","data-testid":"youtube-search-form",onSubmit:s=>void E(s),children:[e.jsxs("div",{className:"youtube-query-row",children:[e.jsx("input",{"data-testid":"youtube-query-input","aria-label":"YouTube query",value:y,onChange:s=>C(s.target.value),placeholder:"Search terms"}),e.jsxs("button",{className:"btn btn-primary","data-testid":"youtube-search-submit",type:"submit",disabled:T,children:[T?e.jsx(ke,{size:16,className:"spin-icon"}):e.jsx(Ce,{size:16}),"Search"]})]}),e.jsxs("div",{className:"youtube-filter-grid",children:[e.jsx(k,{label:"Order",value:L,options:Be,onChange:ne}),e.jsx(k,{label:"Period",value:$,options:Ae,onChange:re}),e.jsx(k,{label:"Duration",value:N,options:Ie,onChange:oe}),e.jsx(k,{label:"Live",value:B,options:Re,onChange:ie}),e.jsx(k,{label:"Safe search",value:A,options:Ue,onChange:le}),e.jsxs("label",{children:["Language",e.jsx("input",{maxLength:8,value:I,onChange:s=>ce(s.target.value)})]}),e.jsxs("label",{children:["Region",e.jsx("input",{maxLength:4,value:R,onChange:s=>ue(s.target.value)})]}),e.jsxs("label",{children:["Count",e.jsxs("select",{value:U,onChange:s=>de(Number(s.target.value)),children:[e.jsx("option",{value:"5",children:"5"}),e.jsx("option",{value:"10",children:"10"}),e.jsx("option",{value:"25",children:"25"})]})]})]})]}),e.jsxs("section",{className:"youtube-banner","data-testid":"youtube-status-banner",children:[e.jsx(te,{size:18}),e.jsxs("span",{children:[be,e.jsxs("small",{children:[ye,X?`, fetched ${new Date(X).toLocaleTimeString()}`:""]})]}),n.state==="blocked"&&!fe()&&e.jsx("button",{className:"btn btn-secondary","data-testid":"youtube-enable-local-bridge",type:"button",onClick:he,children:"Enable local bridge"})]}),e.jsxs("section",{className:"youtube-actions-row",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:[m.length," results"]}),e.jsxs("span",{children:[D.length," selected",K?" (cache)":""]})]}),e.jsxs("div",{className:"youtube-actions",children:[e.jsx("button",{className:"btn btn-secondary","data-testid":"youtube-select-visible",type:"button",onClick:me,children:"Select visible"}),e.jsx("button",{className:"btn btn-secondary","data-testid":"youtube-clear-selection",type:"button",onClick:pe,children:"Clear"}),e.jsxs("button",{className:"btn btn-primary","data-testid":"youtube-send-selected",type:"button",onClick:()=>ee("selected"),disabled:D.length===0,children:[e.jsx(Le,{size:15}),"Send selected"]}),e.jsx("button",{className:"btn btn-primary","data-testid":"youtube-send-all",type:"button",onClick:()=>ee("all"),disabled:m.length===0,children:"Send all"})]})]}),e.jsxs("section",{className:"youtube-pagination","aria-label":"YouTube result pages",children:[e.jsx("button",{className:"btn btn-secondary",type:"button",onClick:()=>void E(void 0,_),disabled:T||!_,children:"Previous"}),e.jsx("button",{className:"btn btn-secondary",type:"button",onClick:()=>void E(void 0,V),disabled:T||!V,children:"Next"})]}),e.jsx("section",{className:"youtube-results-grid",children:m.map((s,l)=>{const r=q.has(s.id);return e.jsxs("article",{className:`youtube-card ${r?"is-selected":""}`,"data-testid":"youtube-result-card","data-video-id":s.videoId||"",children:[e.jsxs("div",{className:"youtube-card-top",children:[e.jsxs("button",{className:"youtube-select-button","data-testid":"youtube-result-select",type:"button",onClick:()=>ge(s.id),"aria-label":`${r?"Unselect":"Select"} ${s.title}`,children:[r?e.jsx(Te,{size:17}):e.jsx($e,{size:17}),r?"Selected":"Select"]}),e.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer",children:[e.jsx(Ne,{size:15}),"YouTube"]})]}),e.jsxs("div",{className:"youtube-thumb",children:[s.thumbnailUrl?e.jsx("img",{src:s.thumbnailUrl,alt:"",loading:"lazy"}):e.jsx(te,{size:34}),e.jsx("span",{children:String(l+1).padStart(2,"0")})]}),e.jsx("h2",{children:s.title}),e.jsx("p",{children:s.summary}),e.jsxs("div",{className:"youtube-meta",children:[e.jsx("span",{children:s.channel}),e.jsx("span",{children:s.publishedAt}),e.jsx("span",{children:s.duration}),e.jsxs("span",{children:[s.views," views"]})]})]},s.id)})})]})}function k({label:a,value:t,options:c,onChange:g}){return e.jsxs("label",{children:[a,e.jsx("select",{value:t,onChange:n=>g(n.target.value),children:c.map(n=>e.jsx("option",{value:n,children:n},n))})]})}export{Qe as YouTubeSearchPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.youtube-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding-top:10px}.youtube-hero h1{margin:12px 0 0;max-width:760px;font-size:clamp(38px,5vw,62px);line-height:1;font-weight:920;letter-spacing:0}.youtube-hero p{max-width:760px;margin:18px 0 0;color:var(--copy);font-size:17px;line-height:1.75}.youtube-badge{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border:1px solid rgba(220,38,38,.22);border-radius:999px;color:#b91c1c;background:#fff;font-size:12px;font-weight:850}.youtube-badge--bridge{border-color:#14b8a647;color:#0f766e;background:#f0fdfa}.youtube-badge--fallback,.youtube-badge--blocked{border-color:#f59e0b52;color:#92400e;background:#fffbeb}.youtube-search-panel,.youtube-banner,.youtube-actions-row,.youtube-pagination,.youtube-card{border:1px solid rgba(203,213,225,.82);border-radius:9px;background:#ffffffe6;box-shadow:var(--soft-shadow)}.youtube-search-panel{display:grid;gap:14px;margin-top:22px;padding:18px}.youtube-query-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.youtube-query-row input,.youtube-filter-grid input,.youtube-filter-grid select{width:100%;min-height:42px;border:1px solid rgba(148,163,184,.46);border-radius:9px;padding:10px 12px;color:#0f172a;background:#fff;outline:none}.youtube-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.youtube-filter-grid label{display:grid;gap:7px;color:#475569;font-size:12px;font-weight:830;text-transform:uppercase;letter-spacing:.06em}.youtube-banner{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-top:14px;padding:13px 16px;color:#991b1b;background:#fff7f7}.youtube-banner>svg{flex:0 0 auto}.youtube-banner>span{flex:1 1 auto}.youtube-banner small{display:block;margin-top:3px;color:#64748b;font-size:12px}.youtube-actions-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px;padding:14px 16px}.youtube-actions-row>div:first-child{display:flex;align-items:center;gap:12px;color:#64748b}.youtube-actions-row strong{color:#0f172a}.youtube-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}.youtube-pagination{display:flex;justify-content:flex-end;gap:10px;margin-top:10px;padding:10px 12px}.youtube-results-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:16px;padding-bottom:16px}.youtube-card{min-width:0;display:grid;gap:12px;padding:14px}.youtube-card.is-selected{border-color:#dc26265c;background:snow}.youtube-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.youtube-card-top a,.youtube-select-button{min-height:32px;display:inline-flex;align-items:center;gap:6px;padding:0 9px;border-radius:9px;color:#475569;background:#f8fafc;font-size:12px;font-weight:820;text-decoration:none;cursor:pointer}.youtube-select-button{border:1px solid rgba(203,213,225,.86)}.youtube-thumb{position:relative;overflow:hidden;min-height:150px;display:flex;align-items:center;justify-content:space-between;padding:18px;border-radius:9px;color:#fff;background:linear-gradient(135deg,#b91c1cf2,#0f172aeb),#991b1b}.youtube-thumb img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover}.youtube-thumb img+span{position:relative;z-index:1;align-self:flex-end;margin-left:auto;padding:3px 8px;border-radius:999px;color:#fff;background:#0f172ab8;font-size:14px}.youtube-thumb span{font-size:42px;font-weight:920}.youtube-thumb img+span{font-size:14px}.youtube-card h2{margin:0;color:#0f172a;font-size:18px;line-height:1.25}.youtube-card p{margin:0;color:#475569;line-height:1.6}.youtube-meta{display:flex;flex-wrap:wrap;gap:8px}.youtube-meta span{min-height:26px;display:inline-flex;align-items:center;padding:0 8px;border-radius:999px;color:#475569;background:#f1f5f9;font-size:12px;font-weight:760}@media(max-width:960px){.youtube-filter-grid,.youtube-results-grid{grid-template-columns:1fr}.youtube-hero,.youtube-query-row,.youtube-actions-row{align-items:stretch;flex-direction:column}.youtube-query-row,.youtube-actions-row{grid-template-columns:1fr}.youtube-actions{justify-content:flex-start}}@media(max-width:640px){.youtube-page>*{width:min(100%,calc(100% - 20px))}.youtube-hero h1{font-size:36px;line-height:1.04}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=Object.defineProperty;var l=(i,e,n)=>e in i?a(i,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[e]=n;var d=(i,e,n)=>l(i,typeof e!="symbol"?e+"":e,n);const c={booting:["board-file-loading","disposed"],"board-file-loading":["resident-building","interactive-resident","interactive-fullres","board-switching","disposed"],"resident-building":["interactive-resident","fullres-handoff","interactive-fullres","board-switching","disposed"],"interactive-resident":["fullres-handoff","board-switching","disposed"],"fullres-handoff":["interactive-fullres","interactive-resident","board-switching","disposed"],"interactive-fullres":["interactive-resident","board-switching","disposed"],"board-switching":["board-file-loading","resident-building","interactive-resident","interactive-fullres","disposed"],disposed:[]};class u{constructor(){d(this,"events",[]);d(this,"maxEvents",3e3);d(this,"phase","booting")}emit(e,n={}){const t={t:performance.now(),type:e,...n};this.events.push(t),this.events.length>this.maxEvents&&this.events.shift(),typeof document<"u"&&(document.documentElement.dataset.runtimeTraceCount=String(this.events.length),document.documentElement.dataset.runtimeTraceLast=e),window.RUNTIME_TRACE_CONSOLE===!0&&console.info("[RuntimeTrace]",t)}transitionTo(e,n){const t=this.phase,s=c[t].includes(e);r(s,"phase-transition-not-allowed",{from:t,to:e,reason:n}),s&&(this.phase=e,this.emit("runtime.phase",{from:t,to:e,reason:n}))}dump(){return[...this.events]}clear(){this.events=[],typeof document<"u"&&(document.documentElement.dataset.runtimeTraceCount="0",delete document.documentElement.dataset.runtimeTraceLast)}}const f=typeof window>"u"?void 0:window.RuntimeTrace,o=f??new u;typeof window<"u"&&(window.RuntimeTrace=o);function r(i,e,n={}){const t=window.RuntimeDevGuards;if(t&&t.enabled===!1||i)return;const s={name:e,...n};if(console.error(`[Invariant failed] ${e}`,s),o.emit("invariant.failed",s),t!=null&&t.failFast)throw new Error(`[Invariant failed] ${e}`)}function h(){const i=window;i.RuntimeTrace=o,i.RuntimeDevGuards={enabled:!0,failFast:!1,assert:r}}export{o as R,h as i};
|