velloo 0.0.0 → 0.2.0
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/BUN-LICENSE.md +91 -0
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +288 -2
- package/THIRD-PARTY-NOTICES.md +467 -0
- package/assets/elsewhere-alps-9fqhv029.jpg +0 -0
- package/assets/elsewhere-bali-vp60g115.jpg +0 -0
- package/assets/elsewhere-forest-xgn23zrj.jpg +0 -0
- package/assets/elsewhere-japan-qs7qkbr2.jpg +0 -0
- package/assets/elsewhere-kyoto-map-n2bvkrya.svg +1 -0
- package/assets/elsewhere-kyoto-qemtn6nk.jpg +0 -0
- package/assets/elsewhere-room-g1gaw7cs.jpg +0 -0
- package/canvas/apple-touch-icon.png +0 -0
- package/canvas/assets/index-BCvDZiBo.css +2 -0
- package/canvas/assets/index-ClaBqcaS.js +28 -0
- package/canvas/assets/lucide-all-iIF-pmzN.js +1 -0
- package/canvas/assets/radix-C3HaOB-d.js +41 -0
- package/canvas/assets/react-D0Ec-185.js +9 -0
- package/canvas/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/canvas/assets/vendor-CKmQ-Zst.js +53 -0
- package/canvas/favicon.ico +0 -0
- package/canvas/favicon.svg +12 -0
- package/canvas/fonts/OFL-1.1.txt +93 -0
- package/canvas/fonts/poppins-700.woff2 +0 -0
- package/canvas/icon-192.png +0 -0
- package/canvas/icon-512.png +0 -0
- package/canvas/index.html +22 -0
- package/canvas/site.webmanifest +11 -0
- package/chunk-08sv3k41.js +4 -0
- package/chunk-0fe83yzt.js +2 -0
- package/chunk-0t68szgr.js +3 -0
- package/chunk-1h55s5he.js +2 -0
- package/chunk-2c7jbx46.js +2 -0
- package/chunk-2smsg2ct.js +7 -0
- package/chunk-308ynsxd.js +2 -0
- package/chunk-3e8vez4d.js +1229 -0
- package/chunk-40xgcth8.js +63 -0
- package/chunk-4dn75m6t.js +3 -0
- package/chunk-4fj5tahv.js +3 -0
- package/chunk-6nqghjda.js +3 -0
- package/chunk-6tx68d90.js +3 -0
- package/chunk-6w6ch4ce.js +2 -0
- package/chunk-735ezz23.js +86 -0
- package/chunk-7eq7nx37.js +7 -0
- package/chunk-7eyb8yrf.js +6 -0
- package/chunk-80fjfyha.js +86 -0
- package/chunk-80r93t2e.js +4 -0
- package/chunk-94vx1yb0.js +3 -0
- package/chunk-9vg3yafz.js +3 -0
- package/chunk-a84n72m2.js +4 -0
- package/chunk-ampmdzz4.js +10 -0
- package/chunk-avns4dbf.js +2 -0
- package/chunk-ayrb3qnm.js +3 -0
- package/chunk-bwnvcncx.js +3 -0
- package/chunk-ccszg02q.js +5 -0
- package/chunk-cvn689d5.js +3 -0
- package/chunk-cxe6jjwj.js +3 -0
- package/chunk-dg6z4vdd.js +3 -0
- package/chunk-dgwjpbp9.js +3 -0
- package/chunk-dy41n60j.js +52 -0
- package/chunk-ek71z2fv.js +226 -0
- package/chunk-er1fxb7d.js +2 -0
- package/chunk-eyr8hrzf.js +2 -0
- package/chunk-fjbzk4sw.js +3 -0
- package/chunk-fsbsksga.js +3 -0
- package/chunk-h6gchare.js +3 -0
- package/chunk-hcb68zt7.js +85 -0
- package/chunk-hggap8fq.js +3 -0
- package/chunk-j11fyeqh.js +2 -0
- package/chunk-jb21jkp1.js +8 -0
- package/chunk-jfx9xjmr.js +18 -0
- package/chunk-jr0ss0mm.js +303 -0
- package/chunk-jrsknzjt.js +3 -0
- package/chunk-jv0xggh0.js +2 -0
- package/chunk-k17gfwq3.js +2 -0
- package/chunk-mh2pr7cq.js +5 -0
- package/chunk-mnapdp1y.js +2 -0
- package/chunk-mzhdrawd.js +3 -0
- package/chunk-n9gs6yx9.js +2 -0
- package/chunk-ngnymg2q.js +3 -0
- package/chunk-nwx5700b.js +3 -0
- package/chunk-pjtg3wnm.js +4 -0
- package/chunk-pp86v6m6.js +3 -0
- package/chunk-r22epxz2.js +3 -0
- package/chunk-rgasy862.js +5 -0
- package/chunk-rpwpeph5.js +3 -0
- package/chunk-s23gtejf.js +3 -0
- package/chunk-sjgqnykd.js +6 -0
- package/chunk-sn3x2m0m.js +6 -0
- package/chunk-t448rrfr.js +2 -0
- package/chunk-tdsk5wxa.js +451 -0
- package/chunk-v40fn08f.js +442 -0
- package/chunk-vbk1qhdz.js +3 -0
- package/chunk-vdkrbzh1.js +2 -0
- package/chunk-vgmr98cv.js +40 -0
- package/chunk-vsv8z729.js +6 -0
- package/chunk-x4f4k9pp.js +26 -0
- package/chunk-xt5ayg7g.js +4 -0
- package/chunk-ydhwv29b.js +244 -0
- package/chunk-zb6hc1y0.js +2 -0
- package/cli.js +3 -0
- package/launcher.cjs +97 -0
- package/package.json +58 -5
- package/pkgs/helpers/src/box.tsx +21 -0
- package/pkgs/helpers/src/cn.ts +32 -0
- package/pkgs/helpers/src/descriptors.ts +270 -0
- package/pkgs/helpers/src/divider.tsx +123 -0
- package/pkgs/helpers/src/gradient.tsx +90 -0
- package/pkgs/helpers/src/heading.tsx +20 -0
- package/pkgs/helpers/src/icon-data.ts +8009 -0
- package/pkgs/helpers/src/icon.tsx +53 -0
- package/pkgs/helpers/src/image.tsx +111 -0
- package/pkgs/helpers/src/index.ts +29 -0
- package/pkgs/helpers/src/layer.tsx +61 -0
- package/pkgs/helpers/src/lowering.ts +53 -0
- package/pkgs/helpers/src/paths.ts +47 -0
- package/pkgs/helpers/src/placeholder.tsx +88 -0
- package/pkgs/helpers/src/prose.tsx +42 -0
- package/pkgs/helpers/src/registry.ts +41 -0
- package/pkgs/helpers/src/svg.tsx +62 -0
- package/pkgs/helpers/src/text.tsx +16 -0
- package/pkgs/provider-antd/src/index.ts +78 -0
- package/pkgs/provider-antd/src/intro.ts +14 -0
- package/pkgs/provider-antd/src/manifest.ts +439 -0
- package/pkgs/provider-antd/src/overlays.ts +176 -0
- package/pkgs/provider-antd/src/registry.ts +104 -0
- package/pkgs/provider-antd/src/render-pass.ts +43 -0
- package/pkgs/provider-antd/src/tailwind-entry.css +21 -0
- package/pkgs/provider-antd/src/theme.ts +132 -0
- package/pkgs/provider-antd/src/version.ts +8 -0
- package/pkgs/provider-chakra/src/index.ts +80 -0
- package/pkgs/provider-chakra/src/intro.ts +14 -0
- package/pkgs/provider-chakra/src/manifest.ts +421 -0
- package/pkgs/provider-chakra/src/overlays.ts +246 -0
- package/pkgs/provider-chakra/src/registry.ts +227 -0
- package/pkgs/provider-chakra/src/render-pass.ts +55 -0
- package/pkgs/provider-chakra/src/tailwind-entry.css +21 -0
- package/pkgs/provider-chakra/src/theme.ts +180 -0
- package/pkgs/provider-chakra/src/version.ts +8 -0
- package/pkgs/provider-mui/src/index.ts +117 -0
- package/pkgs/provider-mui/src/intro.ts +12 -0
- package/pkgs/provider-mui/src/manifest.ts +263 -0
- package/pkgs/provider-mui/src/overlays.ts +124 -0
- package/pkgs/provider-mui/src/registry.ts +120 -0
- package/pkgs/provider-mui/src/render-pass.ts +36 -0
- package/pkgs/provider-mui/src/tailwind-entry.css +21 -0
- package/pkgs/provider-mui/src/theme.ts +129 -0
- package/pkgs/provider-mui/src/version.ts +8 -0
- package/pkgs/provider-none/src/components-inline.tsx +204 -0
- package/pkgs/provider-none/src/components.tsx +155 -0
- package/pkgs/provider-none/src/index.ts +57 -0
- package/pkgs/provider-none/src/intro.ts +18 -0
- package/pkgs/provider-none/src/manifest.ts +163 -0
- package/pkgs/provider-none/src/registry-inline.ts +36 -0
- package/pkgs/provider-none/src/registry.ts +39 -0
- package/pkgs/provider-none/src/tailwind-entry.css +57 -0
- package/pkgs/provider-none/src/version.ts +10 -0
- package/pkgs/schema/src/annotation.ts +120 -0
- package/pkgs/schema/src/asset.ts +66 -0
- package/pkgs/schema/src/board.ts +71 -0
- package/pkgs/schema/src/comment.ts +107 -0
- package/pkgs/schema/src/config.ts +185 -0
- package/pkgs/schema/src/css-sanitize.ts +56 -0
- package/pkgs/schema/src/extension.ts +105 -0
- package/pkgs/schema/src/fonts.ts +690 -0
- package/pkgs/schema/src/frame.ts +40 -0
- package/pkgs/schema/src/icon-name.ts +21 -0
- package/pkgs/schema/src/ids.ts +14 -0
- package/pkgs/schema/src/index.ts +169 -0
- package/pkgs/schema/src/migrate.ts +297 -0
- package/pkgs/schema/src/node.ts +229 -0
- package/pkgs/schema/src/paths.ts +28 -0
- package/pkgs/schema/src/repo.ts +134 -0
- package/pkgs/schema/src/screen.ts +30 -0
- package/pkgs/schema/src/snippet-resolve.ts +193 -0
- package/pkgs/schema/src/snippet.ts +104 -0
- package/pkgs/schema/src/svg-sanitize.ts +487 -0
- package/pkgs/schema/src/theme.ts +218 -0
- package/pkgs/schema/src/typeset.ts +693 -0
- package/pkgs/schema/src/validate-ids.ts +46 -0
- package/pkgs/schema/src/viewport.ts +8 -0
- package/pkgs/shadcn-snapshot/dist/manifest.json +8109 -0
- package/pkgs/shadcn-snapshot/src/components/canvas-portal.tsx +55 -0
- package/pkgs/shadcn-snapshot/src/components/ui/accordion.tsx +122 -0
- package/pkgs/shadcn-snapshot/src/components/ui/alert-dialog.tsx +164 -0
- package/pkgs/shadcn-snapshot/src/components/ui/alert.tsx +74 -0
- package/pkgs/shadcn-snapshot/src/components/ui/aspect-ratio.tsx +13 -0
- package/pkgs/shadcn-snapshot/src/components/ui/attachment.tsx +197 -0
- package/pkgs/shadcn-snapshot/src/components/ui/avatar.tsx +100 -0
- package/pkgs/shadcn-snapshot/src/components/ui/badge.tsx +50 -0
- package/pkgs/shadcn-snapshot/src/components/ui/breadcrumb.tsx +109 -0
- package/pkgs/shadcn-snapshot/src/components/ui/bubble.tsx +130 -0
- package/pkgs/shadcn-snapshot/src/components/ui/button-group.tsx +82 -0
- package/pkgs/shadcn-snapshot/src/components/ui/button.tsx +72 -0
- package/pkgs/shadcn-snapshot/src/components/ui/calendar.tsx +229 -0
- package/pkgs/shadcn-snapshot/src/components/ui/card.tsx +92 -0
- package/pkgs/shadcn-snapshot/src/components/ui/carousel.tsx +235 -0
- package/pkgs/shadcn-snapshot/src/components/ui/chart-option.ts +250 -0
- package/pkgs/shadcn-snapshot/src/components/ui/chart.tsx +177 -0
- package/pkgs/shadcn-snapshot/src/components/ui/checkbox.tsx +41 -0
- package/pkgs/shadcn-snapshot/src/components/ui/collapsible.tsx +32 -0
- package/pkgs/shadcn-snapshot/src/components/ui/combobox.tsx +196 -0
- package/pkgs/shadcn-snapshot/src/components/ui/context-menu.tsx +227 -0
- package/pkgs/shadcn-snapshot/src/components/ui/dialog.tsx +131 -0
- package/pkgs/shadcn-snapshot/src/components/ui/direction.tsx +24 -0
- package/pkgs/shadcn-snapshot/src/components/ui/drawer.tsx +112 -0
- package/pkgs/shadcn-snapshot/src/components/ui/dropdown-menu.tsx +205 -0
- package/pkgs/shadcn-snapshot/src/components/ui/empty.tsx +98 -0
- package/pkgs/shadcn-snapshot/src/components/ui/field.tsx +228 -0
- package/pkgs/shadcn-snapshot/src/components/ui/hover-card.tsx +51 -0
- package/pkgs/shadcn-snapshot/src/components/ui/input-group.tsx +148 -0
- package/pkgs/shadcn-snapshot/src/components/ui/input.tsx +43 -0
- package/pkgs/shadcn-snapshot/src/components/ui/item.tsx +187 -0
- package/pkgs/shadcn-snapshot/src/components/ui/kbd.tsx +30 -0
- package/pkgs/shadcn-snapshot/src/components/ui/label.tsx +25 -0
- package/pkgs/shadcn-snapshot/src/components/ui/marker.tsx +71 -0
- package/pkgs/shadcn-snapshot/src/components/ui/menubar.tsx +243 -0
- package/pkgs/shadcn-snapshot/src/components/ui/message.tsx +89 -0
- package/pkgs/shadcn-snapshot/src/components/ui/native-select.tsx +60 -0
- package/pkgs/shadcn-snapshot/src/components/ui/navigation-menu.tsx +165 -0
- package/pkgs/shadcn-snapshot/src/components/ui/pagination.tsx +117 -0
- package/pkgs/shadcn-snapshot/src/components/ui/popover.tsx +66 -0
- package/pkgs/shadcn-snapshot/src/components/ui/progress.tsx +35 -0
- package/pkgs/shadcn-snapshot/src/components/ui/radio-group.tsx +48 -0
- package/pkgs/shadcn-snapshot/src/components/ui/scroll-area.tsx +59 -0
- package/pkgs/shadcn-snapshot/src/components/ui/select.tsx +180 -0
- package/pkgs/shadcn-snapshot/src/components/ui/separator.tsx +32 -0
- package/pkgs/shadcn-snapshot/src/components/ui/sheet.tsx +107 -0
- package/pkgs/shadcn-snapshot/src/components/ui/skeleton.tsx +17 -0
- package/pkgs/shadcn-snapshot/src/components/ui/slider.tsx +68 -0
- package/pkgs/shadcn-snapshot/src/components/ui/sonner.tsx +91 -0
- package/pkgs/shadcn-snapshot/src/components/ui/spinner.tsx +21 -0
- package/pkgs/shadcn-snapshot/src/components/ui/switch.tsx +41 -0
- package/pkgs/shadcn-snapshot/src/components/ui/table.tsx +93 -0
- package/pkgs/shadcn-snapshot/src/components/ui/tabs.tsx +84 -0
- package/pkgs/shadcn-snapshot/src/components/ui/textarea.tsx +24 -0
- package/pkgs/shadcn-snapshot/src/components/ui/toggle-group.tsx +94 -0
- package/pkgs/shadcn-snapshot/src/components/ui/toggle.tsx +50 -0
- package/pkgs/shadcn-snapshot/src/components/ui/tooltip.tsx +47 -0
- package/pkgs/shadcn-snapshot/src/examples.ts +36 -0
- package/pkgs/shadcn-snapshot/src/groups.ts +87 -0
- package/pkgs/shadcn-snapshot/src/index.ts +43 -0
- package/pkgs/shadcn-snapshot/src/lib/utils.ts +4 -0
- package/pkgs/shadcn-snapshot/src/manifest.ts +12 -0
- package/pkgs/shadcn-snapshot/src/notes.ts +97 -0
- package/pkgs/shadcn-snapshot/src/paths.ts +47 -0
- package/pkgs/shadcn-snapshot/src/registry-files.ts +293 -0
- package/pkgs/shadcn-snapshot/src/registry.ts +631 -0
- package/pkgs/shadcn-snapshot/src/shadcn-tailwind.css +632 -0
- package/pkgs/shadcn-snapshot/src/tailwind-entry.css +159 -0
- package/pkgs/shadcn-snapshot/src/version.ts +8 -0
- package/plugins/claude/velloo/.claude-plugin/plugin.json +6 -0
- package/plugins/claude/velloo/agents/velloo-design-reviewer.md +33 -0
- package/plugins/claude/velloo/agents/velloo-designer.md +39 -0
- package/plugins/claude/velloo/commands/design.md +11 -0
- package/plugins/claude/velloo/commands/implement.md +10 -0
- package/plugins/claude/velloo/commands/review.md +8 -0
- package/plugins/gemini/GEMINI.md +31 -0
- package/plugins/gemini/commands/velloo/design.toml +10 -0
- package/plugins/gemini/commands/velloo/implement.toml +9 -0
- package/plugins/gemini/gemini-extension.json +9 -0
- package/skills/velloo-brand/SKILL.md +124 -0
- package/skills/velloo-design/SKILL.md +144 -0
- package/skills/velloo-design-system/SKILL.md +90 -0
- package/skills/velloo-implement/SKILL.md +101 -0
- package/skills/velloo-logo/SKILL.md +93 -0
- package/skills/velloo-setup/SKILL.md +156 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-80fjfyha.js";import{string,number,boolean,unknown,array,object}from"./chunk-40xgcth8.js";import"./chunk-tdsk5wxa.js";import"./chunk-t448rrfr.js";import"./chunk-3e8vez4d.js";import{fail}from"./chunk-s23gtejf.js";import{DESIGN_ARG_DESCRIPTION,resolveDesign}from"./chunk-vsv8z729.js";import{openUrl}from"./chunk-hggap8fq.js";import{defineCommand}from"./chunk-2smsg2ct.js";import{writeFileSync}from"fs";import{basename,join as join3,resolve as resolve2}from"path";import{readFileSync}from"fs";import{join,resolve,sep}from"path";var AssetRefSchema=object({file:string(),mimeType:string(),bytes:number()}),TapeRecordSchema=object({seq:number().optional(),ts:string().optional(),tool:string().optional(),durationMs:number().optional(),ok:boolean().optional(),params:unknown().optional(),text:string().optional(),images:array(AssetRefSchema).optional(),isError:boolean().optional(),error:object({name:string().optional(),message:string().optional(),stack:string().optional()}).optional(),sessionId:string().optional()}),TapeMetaSchema=object({tapeId:string().optional(),startedAt:string().optional(),folder:string().optional(),pid:number().optional()}),PendingCallSchema=object({seq:number().optional(),ts:string().optional(),tool:string().optional(),params:unknown().optional(),sessionId:string().optional()});function loadTape(dir){let meta={};try{let parsed=TapeMetaSchema.safeParse(JSON.parse(readFileSync(join(dir,"meta.json"),"utf8")));if(parsed.success)meta=parsed.data}catch{}let records=[],raw="";try{raw=readFileSync(join(dir,"tape.jsonl"),"utf8")}catch{}for(let line of raw.split(`
|
|
3
|
+
`)){let t=line.trim();if(!t)continue;try{let parsed=TapeRecordSchema.safeParse(JSON.parse(t));if(parsed.success)records.push(parsed.data)}catch{}}let pending=[];try{let raw=JSON.parse(readFileSync(join(dir,"pending.json"),"utf8"));if(Array.isArray(raw))pending=raw.flatMap((entry)=>{let parsed=PendingCallSchema.safeParse(entry);return parsed.success?[parsed.data]:[]})}catch{}let done=new Set(records.map((r)=>r.seq));return pending=pending.filter((p)=>!done.has(p.seq)),{dir,meta,records,pending}}var ESC={"&":"&","<":"<",">":">",'"':""","'":"'"};function esc(s){return s.replace(/[&<>"']/g,(c)=>ESC[c]??c)}function isBad(r){return r.ok===!1||r.isError===!0||Boolean(r.error)}function prettyJsonText(text){try{return JSON.stringify(JSON.parse(text),null,2)}catch{return text}}function fmtDuration(ms){if(ms===void 0)return"";return ms>=1000?`${(ms/1000).toFixed(2)}s`:`${ms}ms`}function fmtBytes(n){if(n>=1048576)return`${(n/1048576).toFixed(1)}MB`;if(n>=1024)return`${(n/1024).toFixed(0)}KB`;return`${n}B`}function timeOnly(iso){if(!iso)return"";let m=/T(\d{2}:\d{2}:\d{2})/.exec(iso);return m?m[1]:iso}function tapeStats(tape){let totalMs=tape.records.reduce((s,r)=>s+(r.durationMs??0),0);return{calls:tape.records.length,errors:tape.records.filter(isBad).length,totalLabel:fmtDuration(totalMs)}}function safeMimeType(mime){return/^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(mime)?mime:"application/octet-stream"}function inlineImage(dir,asset){let dataUri="";try{let abs=resolve(dir,asset.file);if(abs!==resolve(dir)&&!abs.startsWith(resolve(dir)+sep))return`<div class="missing">out-of-tree asset: ${esc(asset.file)}</div>`;let buf=readFileSync(abs);dataUri=`data:${safeMimeType(asset.mimeType)};base64,${buf.toString("base64")}`}catch{return`<div class="missing">missing asset: ${esc(asset.file)}</div>`}return`<img class="shot" loading="lazy" src="${dataUri}" alt="${esc(asset.file)}"/>`}function renderResult(dir,rec){if(rec.error){let head=esc([rec.error.name,rec.error.message].filter(Boolean).join(": ")||"error"),stack=rec.error.stack?`<pre class="stack">${esc(rec.error.stack)}</pre>`:"";return`<div class="err-box"><div class="err-head">${head}</div>${stack}</div>`}let parts=[];if(rec.text)parts.push(`<pre class="json">${esc(prettyJsonText(rec.text))}</pre>`);if(rec.images?.length){let imgs=rec.images.map((a)=>`<figure>${inlineImage(dir,a)}<figcaption>${esc(a.file.replace(/^assets\//,""))} \xB7 ${fmtBytes(a.bytes)}</figcaption></figure>`).join("");parts.push(`<div class="shots">${imgs}</div>`)}if(rec.isError)parts.unshift('<div class="flag">isError: true</div>');return parts.join("")||'<div class="muted">no output</div>'}function renderRow(dir,rec){let bad=isBad(rec),tool=esc(rec.tool??"?"),seq=rec.seq??"",params=esc(JSON.stringify(rec.params??null,null,2)),search=esc(`${rec.tool??""} ${rec.text??""} ${JSON.stringify(rec.params??"")}`.toLowerCase().slice(0,4000)),nShots=rec.images?.length?` \xB7 ${rec.images.length}\uD83D\uDCF7`:"";return`<details class="call${bad?" bad":""}" data-seq="${rec.seq??""}" data-error="${bad?1:0}" data-search="${search}">
|
|
4
|
+
<summary>
|
|
5
|
+
<span class="dot"></span>
|
|
6
|
+
<span class="seq">#${seq}</span>
|
|
7
|
+
<span class="tool">${tool}</span>
|
|
8
|
+
<span class="meta">${fmtDuration(rec.durationMs)}${nShots}</span>
|
|
9
|
+
<span class="ts">${esc(timeOnly(rec.ts))}</span>
|
|
10
|
+
</summary>
|
|
11
|
+
<div class="body">
|
|
12
|
+
<div class="col"><h4>params</h4><pre class="json">${params}</pre></div>
|
|
13
|
+
<div class="col"><h4>result</h4>${renderResult(dir,rec)}</div>
|
|
14
|
+
</div>
|
|
15
|
+
</details>`}function renderPendingRow(p){let tool=esc(p.tool??"?"),seq=p.seq??"",params=esc(JSON.stringify(p.params??null,null,2)),search=esc(`${p.tool??""} ${JSON.stringify(p.params??"")}`.toLowerCase().slice(0,4000));return`<details class="call pending" data-seq="${seq}" data-pending="1" data-error="0" data-search="${search}" open>
|
|
16
|
+
<summary>
|
|
17
|
+
<span class="dot"></span>
|
|
18
|
+
<span class="seq">#${seq}</span>
|
|
19
|
+
<span class="tool">${tool}</span>
|
|
20
|
+
<span class="meta">running\u2026</span>
|
|
21
|
+
<span class="ts">${esc(timeOnly(p.ts))}</span>
|
|
22
|
+
</summary>
|
|
23
|
+
<div class="body">
|
|
24
|
+
<div class="col"><h4>params</h4><pre class="json">${params}</pre></div>
|
|
25
|
+
<div class="col"><h4>result</h4><div class="muted">awaiting result \u2014 this call hasn't returned yet.</div></div>
|
|
26
|
+
</div>
|
|
27
|
+
</details>`}var STYLE=`
|
|
28
|
+
:root { color-scheme: dark; }
|
|
29
|
+
* { box-sizing: border-box; }
|
|
30
|
+
body { margin: 0; background: #0b0c0e; color: #d7dce3;
|
|
31
|
+
font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
|
|
32
|
+
code, pre, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
|
|
33
|
+
header { position: sticky; top: 0; z-index: 5; background: #111317; border-bottom: 1px solid #23262d;
|
|
34
|
+
padding: 14px 20px; }
|
|
35
|
+
header h1 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
|
|
36
|
+
header h1 .badge { color: #8b93a1; font-weight: 400; }
|
|
37
|
+
.live { color: #3fb950; font-size: 11px; font-weight: 600; margin-left: 8px;
|
|
38
|
+
animation: pulse 1.6s ease-in-out infinite; }
|
|
39
|
+
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
|
|
40
|
+
.stats { display: flex; gap: 18px; flex-wrap: wrap; color: #8b93a1; font-size: 12.5px; }
|
|
41
|
+
.stats b { color: #d7dce3; font-weight: 600; }
|
|
42
|
+
.stats .err { color: #ff6b6b; }
|
|
43
|
+
.bar { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
|
|
44
|
+
.bar input[type=search] { flex: 1; max-width: 360px; background: #0b0c0e; border: 1px solid #2b2f37;
|
|
45
|
+
color: #d7dce3; border-radius: 6px; padding: 6px 10px; font-size: 13px; }
|
|
46
|
+
.bar label { color: #8b93a1; font-size: 12.5px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
|
|
47
|
+
main { padding: 16px 20px 80px; max-width: 1200px; margin: 0 auto; }
|
|
48
|
+
.call { border: 1px solid #23262d; border-radius: 8px; margin-bottom: 8px; background: #111317; overflow: hidden; }
|
|
49
|
+
.call.bad { border-color: #5a2730; }
|
|
50
|
+
summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer;
|
|
51
|
+
list-style: none; user-select: none; }
|
|
52
|
+
summary::-webkit-details-marker { display: none; }
|
|
53
|
+
summary:hover { background: #15181d; }
|
|
54
|
+
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3fb950; flex: none; }
|
|
55
|
+
.call.bad .dot { background: #f85149; }
|
|
56
|
+
.call.pending { border-color: #5a4a1f; }
|
|
57
|
+
.call.pending .dot { background: #ffb86b; animation: pulse 1.2s ease-in-out infinite; }
|
|
58
|
+
.call.pending .meta { color: #ffb86b; }
|
|
59
|
+
.seq { color: #6b7280; font-variant-numeric: tabular-nums; font-size: 12px; min-width: 34px; }
|
|
60
|
+
.tool { font-weight: 600; font-family: ui-monospace, monospace; }
|
|
61
|
+
.meta { color: #8b93a1; font-size: 12px; }
|
|
62
|
+
.ts { margin-left: auto; color: #5b626d; font-size: 12px; font-variant-numeric: tabular-nums; }
|
|
63
|
+
.body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 4px 14px 16px; }
|
|
64
|
+
@media (max-width: 820px) { .body { grid-template-columns: 1fr; } }
|
|
65
|
+
h4 { margin: 8px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; }
|
|
66
|
+
pre.json { margin: 0; padding: 10px 12px; background: #0b0c0e; border: 1px solid #20242b; border-radius: 6px;
|
|
67
|
+
font-size: 12.5px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; max-height: 460px; }
|
|
68
|
+
.shots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
|
|
69
|
+
figure { margin: 0; }
|
|
70
|
+
figure img.shot { max-width: 320px; max-height: 360px; border: 1px solid #2b2f37; border-radius: 6px;
|
|
71
|
+
display: block; cursor: zoom-in; }
|
|
72
|
+
figcaption { color: #6b7280; font-size: 11px; margin-top: 4px; }
|
|
73
|
+
.err-box { background: #1c1011; border: 1px solid #5a2730; border-radius: 6px; padding: 10px 12px; }
|
|
74
|
+
.err-head { color: #ff8b8b; font-weight: 600; font-family: ui-monospace, monospace; font-size: 12.5px; }
|
|
75
|
+
pre.stack { margin: 8px 0 0; font-size: 11.5px; color: #c98b8b; white-space: pre-wrap; overflow-x: auto; }
|
|
76
|
+
.flag { color: #ffb86b; font-size: 12px; margin-bottom: 6px; }
|
|
77
|
+
.muted { color: #5b626d; font-size: 12.5px; }
|
|
78
|
+
.missing { color: #f85149; font-size: 12px; }
|
|
79
|
+
footer { color: #4b515b; font-size: 11.5px; text-align: center; padding: 24px; }
|
|
80
|
+
.lb { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center;
|
|
81
|
+
justify-content: center; z-index: 100; cursor: zoom-out; padding: 2vmin; }
|
|
82
|
+
.lb.open { display: flex; }
|
|
83
|
+
.lb img { max-width: 96vw; max-height: 96vh; border-radius: 4px; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
|
|
84
|
+
`;function pageScript(live,initialCount){if(!live)return`
|
|
85
|
+
var q = document.getElementById('q');
|
|
86
|
+
var eo = document.getElementById('errOnly');
|
|
87
|
+
function apply() {
|
|
88
|
+
var needle = q.value.trim().toLowerCase();
|
|
89
|
+
var errsOnly = eo.checked;
|
|
90
|
+
var rows = document.querySelectorAll('.call');
|
|
91
|
+
for (var i = 0; i < rows.length; i++) {
|
|
92
|
+
var r = rows[i];
|
|
93
|
+
var hit = !needle || (r.getAttribute('data-search') || '').indexOf(needle) !== -1;
|
|
94
|
+
var isErr = r.getAttribute('data-error') === '1';
|
|
95
|
+
r.style.display = (hit && (!errsOnly || isErr)) ? '' : 'none';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
q.addEventListener('input', apply);
|
|
99
|
+
eo.addEventListener('change', apply);
|
|
100
|
+
|
|
101
|
+
var lb = document.getElementById('lb'), lbimg = document.getElementById('lbimg');
|
|
102
|
+
document.addEventListener('click', function(e) {
|
|
103
|
+
var t = e.target;
|
|
104
|
+
if (t && t.classList && t.classList.contains('shot')) { lbimg.src = t.src; lb.classList.add('open'); }
|
|
105
|
+
else if (lb.classList.contains('open')) { lb.classList.remove('open'); lbimg.removeAttribute('src'); }
|
|
106
|
+
});
|
|
107
|
+
document.addEventListener('keydown', function(e) {
|
|
108
|
+
if (e.key === 'Escape') { lb.classList.remove('open'); lbimg.removeAttribute('src'); }
|
|
109
|
+
});`;return`${`
|
|
110
|
+
var q = document.getElementById('q');
|
|
111
|
+
var eo = document.getElementById('errOnly');
|
|
112
|
+
function apply() {
|
|
113
|
+
var needle = q.value.trim().toLowerCase();
|
|
114
|
+
var errsOnly = eo.checked;
|
|
115
|
+
var rows = document.querySelectorAll('.call');
|
|
116
|
+
for (var i = 0; i < rows.length; i++) {
|
|
117
|
+
var r = rows[i];
|
|
118
|
+
var hit = !needle || (r.getAttribute('data-search') || '').indexOf(needle) !== -1;
|
|
119
|
+
var isErr = r.getAttribute('data-error') === '1';
|
|
120
|
+
r.style.display = (hit && (!errsOnly || isErr)) ? '' : 'none';
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
q.addEventListener('input', apply);
|
|
124
|
+
eo.addEventListener('change', apply);
|
|
125
|
+
|
|
126
|
+
var lb = document.getElementById('lb'), lbimg = document.getElementById('lbimg');
|
|
127
|
+
document.addEventListener('click', function(e) {
|
|
128
|
+
var t = e.target;
|
|
129
|
+
if (t && t.classList && t.classList.contains('shot')) { lbimg.src = t.src; lb.classList.add('open'); }
|
|
130
|
+
else if (lb.classList.contains('open')) { lb.classList.remove('open'); lbimg.removeAttribute('src'); }
|
|
131
|
+
});
|
|
132
|
+
document.addEventListener('keydown', function(e) {
|
|
133
|
+
if (e.key === 'Escape') { lb.classList.remove('open'); lbimg.removeAttribute('src'); }
|
|
134
|
+
});`}
|
|
135
|
+
|
|
136
|
+
function setLive(on) {
|
|
137
|
+
var l = document.getElementById('liveDot');
|
|
138
|
+
if (!l) return;
|
|
139
|
+
if (on) { l.textContent = '\u25CF live'; l.style.color = '#3fb950'; l.style.animation = ''; }
|
|
140
|
+
else { l.textContent = '\u25CB disconnected'; l.style.color = '#f85149'; l.style.animation = 'none'; }
|
|
141
|
+
}
|
|
142
|
+
var main = document.querySelector('main');
|
|
143
|
+
// Upsert by call identity (seq): a row replaces any prior row with the same
|
|
144
|
+
// seq, so a completed call overwrites its "running" placeholder and a
|
|
145
|
+
// reconnect re-send can't duplicate.
|
|
146
|
+
function upsert(seq, html) {
|
|
147
|
+
var ph = document.getElementById('placeholder'); if (ph) ph.remove();
|
|
148
|
+
var ex = (seq != null) ? main.querySelector('.call[data-seq="' + seq + '"]') : null;
|
|
149
|
+
if (ex) ex.outerHTML = html; else main.insertAdjacentHTML('beforeend', html);
|
|
150
|
+
}
|
|
151
|
+
var es = new EventSource('/events?since=${initialCount}');
|
|
152
|
+
es.addEventListener('open', function() { setLive(true); });
|
|
153
|
+
es.addEventListener('call', function(ev) {
|
|
154
|
+
var d = JSON.parse(ev.data);
|
|
155
|
+
upsert(d.seq, d.html);
|
|
156
|
+
if (d.stats) {
|
|
157
|
+
document.getElementById('n-calls').textContent = d.stats.calls;
|
|
158
|
+
document.getElementById('n-errors').textContent = d.stats.errors;
|
|
159
|
+
document.getElementById('errstat').className = d.stats.errors ? 'err' : '';
|
|
160
|
+
document.getElementById('n-total').textContent = d.stats.totalLabel;
|
|
161
|
+
}
|
|
162
|
+
apply();
|
|
163
|
+
});
|
|
164
|
+
es.addEventListener('pending', function(ev) {
|
|
165
|
+
var list = JSON.parse(ev.data);
|
|
166
|
+
var want = {};
|
|
167
|
+
for (var i = 0; i < list.length; i++) want[list[i].seq] = 1;
|
|
168
|
+
var cur = main.querySelectorAll('.call[data-pending]');
|
|
169
|
+
for (var j = 0; j < cur.length; j++) {
|
|
170
|
+
if (!want[cur[j].getAttribute('data-seq')]) cur[j].remove();
|
|
171
|
+
}
|
|
172
|
+
for (var k = 0; k < list.length; k++) {
|
|
173
|
+
if (!main.querySelector('.call[data-seq="' + list[k].seq + '"]')) {
|
|
174
|
+
main.insertAdjacentHTML('beforeend', list[k].html);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
apply();
|
|
178
|
+
});
|
|
179
|
+
es.addEventListener('reload', function() { location.reload(); });
|
|
180
|
+
es.onerror = function() { setLive(false); };`}function renderReport(tape,opts={}){let{dir,meta,records,pending}=tape,live=opts.live===!0,stats=tapeStats(tape),title=`velloo trace \xB7 ${meta.tapeId??"session"}`,calls=[...records.map((r)=>renderRow(dir,r)),...pending.map((p)=>renderPendingRow(p))].join(`
|
|
181
|
+
`),placeholder=live?'<p class="muted" id="placeholder">Waiting for MCP calls\u2026 this view updates live.</p>':'<p class="muted">No calls recorded in this tape.</p>';return`<!doctype html>
|
|
182
|
+
<html lang="en">
|
|
183
|
+
<head>
|
|
184
|
+
<meta charset="utf-8"/>
|
|
185
|
+
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
186
|
+
<title>${esc(title)}</title>
|
|
187
|
+
<style>${STYLE}</style>
|
|
188
|
+
</head>
|
|
189
|
+
<body>
|
|
190
|
+
<header>
|
|
191
|
+
<h1>velloo trace <span class="badge">${esc(meta.tapeId??"")}</span>${live?'<span class="live" id="liveDot">\u25CF live</span>':""}</h1>
|
|
192
|
+
<div class="stats">
|
|
193
|
+
<span><b id="n-calls">${stats.calls}</b> calls</span>
|
|
194
|
+
<span id="errstat" class="${stats.errors?"err":""}"><b id="n-errors">${stats.errors}</b> errors</span>
|
|
195
|
+
<span><b id="n-total">${stats.totalLabel}</b> total</span>
|
|
196
|
+
${meta.startedAt?`<span>started <b>${esc(meta.startedAt)}</b></span>`:""}
|
|
197
|
+
${meta.folder?`<span class="mono">${esc(meta.folder)}</span>`:""}
|
|
198
|
+
</div>
|
|
199
|
+
<div class="bar">
|
|
200
|
+
<input id="q" type="search" placeholder="filter by tool, params, or result\u2026"/>
|
|
201
|
+
<label><input id="errOnly" type="checkbox"/> errors only</label>
|
|
202
|
+
</div>
|
|
203
|
+
</header>
|
|
204
|
+
<main>
|
|
205
|
+
${calls||placeholder}
|
|
206
|
+
</main>
|
|
207
|
+
<footer>Recorded MCP session \xB7 ${esc(meta.tapeId??"")}</footer>
|
|
208
|
+
<div class="lb" id="lb"><img id="lbimg" alt=""/></div>
|
|
209
|
+
<script>${pageScript(live,records.length)}</script>
|
|
210
|
+
</body>
|
|
211
|
+
</html>
|
|
212
|
+
`}import{existsSync,readdirSync,statSync}from"fs";import{join as join2}from"path";var TRACE_SUBDIR=join2(".velloo","trace");function isTapeDir(dir){return existsSync(join2(dir,"tape.jsonl"))}function findTapes(root){if(isTapeDir(root))return[root];let entries;try{entries=readdirSync(root)}catch{return[]}return entries.map((e)=>join2(root,e)).filter((p)=>{try{return statSync(p).isDirectory()&&isTapeDir(p)}catch{return!1}}).sort().reverse()}function newestTape(root){return findTapes(root)[0]??null}function resumeCursor(req,since){let last=req.headers.get("last-event-id");if(last&&Number.isFinite(Number(last)))return Number(last);return since}function sse(req,startDir,since,pollMs,pinned,root){let enc=new TextEncoder,timer,stream=new ReadableStream({start(controller){let curDir=startDir,sent=resumeCursor(req,since),pendingSig="",write=(s)=>controller.enqueue(enc.encode(s));write(`: connected
|
|
213
|
+
|
|
214
|
+
`),timer=setInterval(()=>{try{let newest=pinned?curDir:newestTape(root);if(!pinned&&newest&&newest!==curDir){curDir=newest,write(`event: reload
|
|
215
|
+
data: {}
|
|
216
|
+
|
|
217
|
+
`);return}let tape=curDir?loadTape(curDir):null,quiet=!0;if(tape&&tape.records.length>sent){let stats=tapeStats(tape);for(let i=sent;i<tape.records.length;i++){let rec=tape.records[i];if(!rec)continue;let data=JSON.stringify({html:renderRow(curDir,rec),stats,seq:rec.seq});write(`id: ${i+1}
|
|
218
|
+
event: call
|
|
219
|
+
data: ${data}
|
|
220
|
+
|
|
221
|
+
`)}sent=tape.records.length,quiet=!1}let pendingCalls=tape?.pending??[],sig=pendingCalls.map((p)=>p.seq).join(",");if(sig!==pendingSig){pendingSig=sig;let rows=pendingCalls.map((p)=>({seq:p.seq,html:renderPendingRow(p)}));write(`event: pending
|
|
222
|
+
data: ${JSON.stringify(rows)}
|
|
223
|
+
|
|
224
|
+
`),quiet=!1}if(quiet)write(`: ping
|
|
225
|
+
|
|
226
|
+
`)}catch{}},pollMs),req.signal.addEventListener("abort",()=>{if(timer)clearInterval(timer);try{controller.close()}catch{}})},cancel(){if(timer)clearInterval(timer)}});return new Response(stream,{headers:{"content-type":"text/event-stream","cache-control":"no-cache"}})}function serveLiveReport(opts){let pollMs=opts.pollMs??600,pinned=opts.session!==void 0,currentTape=()=>opts.session??newestTape(opts.root),server=Bun.serve({hostname:opts.hostname,port:opts.port,idleTimeout:0,fetch(req){let url=new URL(req.url);if(url.pathname==="/"){let dir=currentTape(),tape=dir?loadTape(dir):{dir:opts.root,meta:{},records:[],pending:[]};return new Response(renderReport(tape,{live:!0}),{headers:{"content-type":"text/html; charset=utf-8"}})}if(url.pathname==="/events"){let since=Number(url.searchParams.get("since")??"0")||0;return sse(req,currentTape(),since,pollMs,pinned,opts.root)}return new Response("not found",{status:404})}});return{url:`http://${opts.hostname==="0.0.0.0"?"127.0.0.1":opts.hostname}:${server.port}/`,stop:()=>server.stop(!0)}}var trace_default=defineCommand({meta:{name:"trace",description:"Render a recorded MCP session as a standalone offline HTML report"},args:{design:{type:"positional",required:!1,description:DESIGN_ARG_DESCRIPTION},dir:{type:"string",description:"Trace root or a single tape dir (default: the design folder's .velloo/trace)"},session:{type:"string",description:"Tape id to render (default: the most recent)"},watch:{type:"boolean",description:"Serve a live report that updates as calls happen (Ctrl-C to stop)"},port:{type:"string",description:"Port for --watch (default: an ephemeral one)"},out:{type:"string",description:"Output HTML path for the static report (default: <tape>/report.html)"},list:{type:"boolean",description:"List recorded sessions and exit"},open:{type:"boolean",default:!0,description:"Open the report in your browser (use --no-open to skip)"}},async run({args}){let root=args.dir?resolve2(args.dir):join3(await resolveDesign(args.design,"trace"),TRACE_SUBDIR);if(args.watch){let session;if(args.session){if(session=findTapes(root).find((t)=>basename(t)===args.session),!session)fail("trace",`session "${args.session}" not found in ${root}.`)}let server=serveLiveReport({root,hostname:"127.0.0.1",port:args.port?Number(args.port):0,session});if(console.log(`velloo trace: live at ${server.url} \u2014 Ctrl-C to stop`),args.open)await openUrl(server.url);await new Promise((done)=>{let stop=()=>{server.stop(),done()};process.on("SIGINT",stop),process.on("SIGTERM",stop)});return}let tapes=findTapes(root);if(tapes.length===0)fail("trace",`no recorded sessions found in ${root}.`);if(args.list){for(let dir of tapes){let{meta,records}=loadTape(dir);console.log(`${meta.tapeId??basename(dir)} ${records.length} calls ${meta.startedAt??""}`.trim())}return}let tapeDir=tapes[0];if(args.session){let match=tapes.find((t)=>basename(t)===args.session);if(!match)fail("trace",`session "${args.session}" not found in ${root}.`);tapeDir=match}let tape=loadTape(tapeDir),html=renderReport(tape),out=args.out?resolve2(args.out):join3(tapeDir,"report.html");if(writeFileSync(out,html),console.log(`velloo trace: wrote ${out} (${tape.records.length} calls)`),console.log("velloo trace: tip \u2014 add `--watch` for a live report that updates as the agent works."),args.open)await openUrl(`file://${out}`)}});export{trace_default as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{fail}from"./chunk-s23gtejf.js";import"./chunk-4fj5tahv.js";import{SHELLS,completionScript,commandSpecs,detectShell,installCompletions}from"./chunk-735ezz23.js";import{require_picocolors}from"./chunk-jrsknzjt.js";import{__toESM,defineCommand}from"./chunk-2smsg2ct.js";var import_picocolors=__toESM(require_picocolors(),1);var completions_default=defineCommand({meta:{name:"completions",description:"Shell TAB completions \u2014 print the script, or install it with --install"},args:{shell:{type:"positional",required:!1,description:`Shell: ${SHELLS.join(" | ")} (default: detected from $SHELL)`},install:{type:"boolean",default:!1,description:"Write the script + wire it into your shell (idempotent)"}},async run({args}){let shell=args.shell??detectShell();if(!shell||!SHELLS.includes(shell))fail("completions",`unsupported or undetected shell${args.shell?` "${args.shell}"`:""} \u2014 pass one of: ${SHELLS.join(", ")}.`);if(!args.install){console.log(completionScript(shell,await commandSpecs()));return}let r=await installCompletions(shell);if(console.log(""),console.log(import_picocolors.default.green(`\u2713 ${shell} completions installed.`)),console.log(` script ${import_picocolors.default.cyan(r.scriptPath)}`),r.rcPath)console.log(r.rcUpdated?` rc ${import_picocolors.default.cyan(r.rcPath)} ${import_picocolors.default.dim("(source line appended)")}`:` rc ${import_picocolors.default.cyan(r.rcPath)} ${import_picocolors.default.dim("(already wired)")}`);console.log(""),console.log(import_picocolors.default.dim(shell==="fish"?" New fish sessions pick it up automatically.":` Restart your shell (or \`source ${r.rcPath}\`) to activate TAB completion.`))}});export{completions_default as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{headingInlineStyle,textInlineStyle}from"./chunk-40xgcth8.js";import{clsx,helperDescriptors,require_react_jsx_dev_runtime_development,helpersRegistry,TAILWIND_CLASSNAME}from"./chunk-tdsk5wxa.js";import{resolveProviderSrcDir}from"./chunk-fjbzk4sw.js";import{require_react_development}from"./chunk-3e8vez4d.js";import{__toESM}from"./chunk-2smsg2ct.js";import{noLibVersion}from"./chunk-cxe6jjwj.js";import{dirname,join}from"path";import{fileURLToPath}from"url";var NONE_INTRO=["**This folder has no component library** \u2014 only bare primitives wrapping plain HTML: `Box`/`Stack`/`Container` for layout, `Card`, `Button`, `Input`, plus the velloo helpers (`Heading`/`Text`, `Image`, `Gradient`, `Layer`, `SVG`, `Divider`, `Placeholder`, `Icon`). There is no `Badge`/`Avatar`/`Tabs`/`Dialog` \u2014 build those from primitives or define snippets. Call `list_components` for the exact set. Styling is **Tailwind classes**.",""],NONE_INLINE_INTRO=["**This folder has no component library and no CSS framework** \u2014 bare primitives wrapping plain HTML (`Box`/`Stack`/`Container`, `Card`, `Button`, `Input`) plus the velloo helpers (`Heading`/`Text`, `Image`, `Icon`, `SVG`, `Divider`, `Gradient`, `Layer`, `Placeholder`). There is no `Badge`/`Avatar`/`Tabs`/`Dialog` \u2014 build those from primitives or snippets. Call `list_components` for the exact set.","",'**Style through inline `style` objects.** `update_props { style: { display: "flex", gap: "16px", padding: "24px", borderRadius: "8px", color: "var(--color-foreground)" } }` \u2014 a plain React style object (merges shallowly; an inner `null` drops a key, `style: null` clears). Reference theme tokens as CSS variables (`var(--color-primary)`, `var(--radius)`) from `get_theme` so the design stays themable. `emit_code` emits `style={{\u2026}}` on plain elements \u2014 no imports, no Tailwind. Tailwind utility diagnostics do not apply.',""];var React=__toESM(require_react_development(),1),jsx_dev_runtime=__toESM(require_react_jsx_dev_runtime_development(),1),Box=React.forwardRef(({className,...rest},ref)=>jsx_dev_runtime.jsxDEV("div",{ref,className:clsx(className),...rest},void 0,!1,void 0,this));Box.displayName="Box";var alignClass={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justifyClass={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around"},Stack=React.forwardRef(({direction="col",gap=4,align,justify,className,...rest},ref)=>jsx_dev_runtime.jsxDEV("div",{ref,className:clsx("flex",direction==="row"?"flex-row":"flex-col",`gap-${gap}`,align?alignClass[align]:void 0,justify?justifyClass[justify]:void 0,className),...rest},void 0,!1,void 0,this));Stack.displayName="Stack";var containerWidth={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl",full:"max-w-full"},Container=React.forwardRef(({size="md",className,...rest},ref)=>jsx_dev_runtime.jsxDEV("div",{ref,className:clsx("mx-auto w-full px-4",containerWidth[size],className),...rest},void 0,!1,void 0,this));Container.displayName="Container";var buttonVariant={default:"bg-foreground text-background hover:bg-foreground/90",ghost:"bg-transparent text-foreground hover:bg-muted",outline:"bg-transparent text-foreground border border-border hover:bg-muted"},Button=React.forwardRef(({variant="default",className,type,...rest},ref)=>jsx_dev_runtime.jsxDEV("button",{ref,type:type??"button",className:clsx("inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium","focus-visible:outline-2 focus-visible:outline-offset-2",buttonVariant[variant],className),...rest},void 0,!1,void 0,this));Button.displayName="Button";var Input=React.forwardRef(({className,type="text",value,onChange,...rest},ref)=>jsx_dev_runtime.jsxDEV("input",{ref,type,value,onChange,readOnly:value!==void 0&&onChange===void 0||rest.readOnly,className:clsx("block w-full rounded-md border border-input bg-background px-3 py-2 text-sm","placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2",className),...rest},void 0,!1,void 0,this));Input.displayName="Input";var Card=React.forwardRef(({className,...rest},ref)=>jsx_dev_runtime.jsxDEV("div",{ref,className:clsx("rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",className),...rest},void 0,!1,void 0,this));Card.displayName="Card";var REUSED_HELPER_IDS=["Heading","Text","Prose","Icon","SVG","Image","Layer","Divider","Gradient","Placeholder"],registry={Box,Stack,Container,Card,Button,Input,...helpersRegistry(REUSED_HELPER_IDS)};var PRIMITIVE_DESCRIPTORS=[{id:"Box",category:"ui",source:"velloo",props:[{name:"className",type:"string | undefined",optional:!0,control:"string"}]},{id:"Stack",category:"ui",source:"velloo",props:[{name:"direction",type:'"row" | "col" | undefined',optional:!0,control:"enum",enumValues:["row","col"],defaultValue:"col"},{name:"gap",type:"number | undefined",optional:!0,control:"number",defaultValue:"4"},{name:"align",type:'"start" | "center" | "end" | "stretch" | undefined',optional:!0,control:"enum",enumValues:["start","center","end","stretch"]},{name:"justify",type:'"start" | "center" | "end" | "between" | "around" | undefined',optional:!0,control:"enum",enumValues:["start","center","end","between","around"]},{name:"className",type:"string | undefined",optional:!0,control:"string"}]},{id:"Container",category:"ui",source:"velloo",props:[{name:"size",type:'"sm" | "md" | "lg" | "xl" | "full" | undefined',optional:!0,control:"enum",enumValues:["sm","md","lg","xl","full"],defaultValue:"md"},{name:"className",type:"string | undefined",optional:!0,control:"string"}]},{id:"Card",category:"ui",source:"velloo",props:[{name:"className",type:"string | undefined",optional:!0,control:"string"}]},{id:"Button",category:"ui",source:"velloo",props:[{name:"variant",type:'"default" | "ghost" | "outline" | undefined',optional:!0,control:"enum",enumValues:["default","ghost","outline"],defaultValue:"default"},{name:"className",type:"string | undefined",optional:!0,control:"string"}]},{id:"Input",category:"ui",source:"velloo",props:[{name:"placeholder",type:"string | undefined",optional:!0,control:"string"},{name:"value",type:"string | undefined",optional:!0,control:"string"},{name:"type",type:"string | undefined",optional:!0,control:"string",defaultValue:"text"},{name:"className",type:"string | undefined",optional:!0,control:"string"}]}],NONE_MANIFEST=[...PRIMITIVE_DESCRIPTORS,...helperDescriptors(REUSED_HELPER_IDS)];var React2=__toESM(require_react_development(),1),jsx_dev_runtime2=__toESM(require_react_jsx_dev_runtime_development(),1);function merge(defaults,authored){return authored?{...defaults,...authored}:defaults}var space=(n)=>`${n*0.25}rem`,Box2=React2.forwardRef(({style,...rest},ref)=>jsx_dev_runtime2.jsxDEV("div",{ref,style,...rest},void 0,!1,void 0,this));Box2.displayName="Box";var alignStyle={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},justifyStyle={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around"},Stack2=React2.forwardRef(({direction="col",gap=4,align,justify,style,...rest},ref)=>jsx_dev_runtime2.jsxDEV("div",{ref,style:merge({display:"flex",flexDirection:direction==="row"?"row":"column",gap:space(gap),...align?{alignItems:alignStyle[align]}:{},...justify?{justifyContent:justifyStyle[justify]}:{}},style),...rest},void 0,!1,void 0,this));Stack2.displayName="Stack";var containerMaxWidth={sm:"640px",md:"768px",lg:"1024px",xl:"1280px",full:"100%"},Container2=React2.forwardRef(({size="md",style,...rest},ref)=>jsx_dev_runtime2.jsxDEV("div",{ref,style:merge({marginInline:"auto",width:"100%",paddingInline:"1rem",maxWidth:containerMaxWidth[size]},style),...rest},void 0,!1,void 0,this));Container2.displayName="Container";var buttonVariantStyle={default:{background:"var(--color-foreground)",color:"var(--color-background)"},ghost:{background:"transparent",color:"var(--color-foreground)"},outline:{background:"transparent",color:"var(--color-foreground)",border:"1px solid var(--color-border)"}},Button2=React2.forwardRef(({variant="default",type,style,...rest},ref)=>jsx_dev_runtime2.jsxDEV("button",{ref,type:type??"button",style:merge({display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.5rem",borderRadius:"var(--radius)",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:500,cursor:"pointer",...buttonVariantStyle[variant]},style),...rest},void 0,!1,void 0,this));Button2.displayName="Button";var Input2=React2.forwardRef(({type="text",value,onChange,style,...rest},ref)=>jsx_dev_runtime2.jsxDEV("input",{ref,type,value,onChange,readOnly:value!==void 0&&onChange===void 0||rest.readOnly,style:merge({display:"block",width:"100%",borderRadius:"var(--radius)",border:"1px solid var(--color-input)",background:"var(--color-background)",padding:"0.5rem 0.75rem",fontSize:"0.875rem"},style),...rest},void 0,!1,void 0,this));Input2.displayName="Input";var Card2=React2.forwardRef(({style,...rest},ref)=>jsx_dev_runtime2.jsxDEV("div",{ref,style:merge({borderRadius:"var(--radius)",border:"1px solid var(--color-border)",background:"var(--color-card)",color:"var(--color-card-foreground)",padding:"1.5rem",boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"},style),...rest},void 0,!1,void 0,this));Card2.displayName="Card";var Heading=React2.forwardRef(({level=1,style,...rest},ref)=>{let Tag=`h${level}`;return jsx_dev_runtime2.jsxDEV(Tag,{ref,style:merge(headingInlineStyle(level),style),...rest},void 0,!1,void 0,this)});Heading.displayName="Heading";var Text=React2.forwardRef(({variant="default",style,...rest},ref)=>jsx_dev_runtime2.jsxDEV("p",{ref,style:merge(textInlineStyle(variant),style),...rest},void 0,!1,void 0,this));Text.displayName="Text";var REUSED_HELPER_IDS2=["Prose","Icon","SVG","Image","Layer","Divider","Gradient","Placeholder"],inlineRegistry={Box:Box2,Stack:Stack2,Container:Container2,Card:Card2,Button:Button2,Input:Input2,Heading,Text,...helpersRegistry(REUSED_HELPER_IDS2)};var here=dirname(fileURLToPath(import.meta.url)),srcDir=resolveProviderSrcDir(here,"provider-none",process.env.VELLOO_NOLIB_SRC),entryCssPath=join(srcDir,"tailwind-entry.css"),componentsDir=srcDir;async function loadManifest(){return NONE_MANIFEST}function createProvider(){return{id:"none",version:noLibVersion,componentsDir,styleEntryPath:entryCssPath,registry,loadManifest,label:`none ${noLibVersion}`,styleChannel:TAILWIND_CLASSNAME,styleChannels:["tailwind-classname","style"],mcpIntro:(channel)=>[...channel==="style"?NONE_INLINE_INTRO:NONE_INTRO],registryForChannel:(kind)=>kind==="style"?inlineRegistry:registry}}export{createProvider};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{existsSync}from"fs";import{join}from"path";function resolveProviderSrcDir(here,pkgName,envOverride){let dev=join(here,"..","src");return[envOverride,join(here,"pkgs",pkgName,"src"),dev].filter((p)=>Boolean(p)).find((d)=>existsSync(join(d,"tailwind-entry.css")))??dev}
|
|
3
|
+
export{resolveProviderSrcDir};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{detectTailwindMajor}from"./chunk-tdsk5wxa.js";import{existsSync,readFileSync}from"fs";import{join}from"path";function readJson(path){try{return JSON.parse(readFileSync(path,"utf8"))}catch{return null}}function depRange(deps,name){let v=deps[name];return typeof v==="string"?v:void 0}function detectHost(appRoot){let pkg=readJson(join(appRoot,"package.json"))??{},deps={...pkg.dependencies??{},...pkg.devDependencies??{}},tailwindMajor=detectTailwindMajor(appRoot),componentsJson=readJson(join(appRoot,"components.json")),shadcn=componentsJson!==null,shadcnStyle=typeof componentsJson?.style==="string"?componentsJson.style:void 0,uiLibrary=depRange(deps,"@mui/material")?"mui":depRange(deps,"antd")?"antd":depRange(deps,"@chakra-ui/react")?"chakra":shadcn?"shadcn":void 0,unsupportedUi=uiLibrary?void 0:detectUnsupportedUi(deps);return{shadcn,shadcnStyle,tailwindMajor,globalsCssPath:findGlobalsCss(appRoot,componentsJson),...uiLibrary?{uiLibrary}:{},...unsupportedUi?{unsupportedUi}:{}}}var COMPONENT_DIR_CANDIDATES=["src/components/ui","components/ui","app/components/ui","src/app/components/ui","src/components","components"];function findComponentsDir(appRoot){return COMPONENT_DIR_CANDIDATES.find((rel)=>existsSync(join(appRoot,rel)))}function detectUnsupportedUi(deps){let known=[["@mantine/core","Mantine"],["@nextui-org/react","NextUI"],["@heroui/react","HeroUI"],["react-bootstrap","React Bootstrap"],["@fluentui/react-components","Fluent UI"],["@untitledui/icons","Untitled UI"],["@untitledui/file-icons","Untitled UI"],["react-aria-components","React Aria"]];for(let[pkg,label]of known)if(depRange(deps,pkg))return label;return}function findGlobalsCss(appRoot,componentsJson){let candidates=[componentsJson&&typeof componentsJson.tailwind?.css==="string"?componentsJson.tailwind.css:void 0,"src/app/globals.css","app/globals.css","src/styles/globals.css","styles/globals.css","src/index.css","src/globals.css","src/app.css"].filter((c)=>Boolean(c));for(let rel of candidates){let abs=join(appRoot,rel);if(existsSync(abs))return abs}return}
|
|
3
|
+
export{detectHost,findComponentsDir};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function _objectWithoutPropertiesLoose(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _assertThisInitialized(e){if(e===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}
|
|
3
|
+
export{_objectWithoutPropertiesLoose,_extends,_assertThisInitialized,_setPrototypeOf};
|