@visulima/dev-toolbar 1.0.0-alpha.32 → 1.0.0-alpha.33

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +64 -17
  3. package/dist/apps/a11y/index.js +3 -3
  4. package/dist/apps/annotations/index.js +2 -2
  5. package/dist/apps/assets/index.js +2 -2
  6. package/dist/apps/inspector/index.js +11 -11
  7. package/dist/apps/module-graph/index.js +2 -2
  8. package/dist/apps/performance/index.js +2 -2
  9. package/dist/apps/seo/index.js +2 -2
  10. package/dist/apps/settings/index.js +2 -2
  11. package/dist/apps/tailwind/index.js +5 -5
  12. package/dist/apps/timeline/index.js +2 -2
  13. package/dist/apps/vite-config/index.js +2 -2
  14. package/dist/client/overlay.js +1 -1
  15. package/dist/index.d.ts +49 -59
  16. package/dist/index.js +1 -1
  17. package/dist/mcp/server.js +1 -1
  18. package/dist/packem_chunks/inject-source.js +9 -9
  19. package/dist/packem_shared/Alert-CZq7C43v.js +1 -0
  20. package/dist/packem_shared/Badge-PpblpNWg.js +1 -0
  21. package/dist/packem_shared/Button-CAKvtfij.js +1 -0
  22. package/dist/packem_shared/Card-BSy2oRiS.js +1 -0
  23. package/dist/packem_shared/Icon-0XYV-4AL.js +1 -0
  24. package/dist/packem_shared/{Input-Cs6aduTi.js → Input-Dc1WiT01.js} +1 -1
  25. package/dist/packem_shared/Label-BZh8XxUb.js +1 -0
  26. package/dist/packem_shared/Popover-DuiU8EPg.js +1 -0
  27. package/dist/packem_shared/Progress-C90LC--2.js +1 -0
  28. package/dist/packem_shared/Select-CwD-d0pi.js +1 -0
  29. package/dist/packem_shared/Separator-PSjfhX_W.js +1 -0
  30. package/dist/packem_shared/Skeleton-BAFrGUR1.js +1 -0
  31. package/dist/packem_shared/Switch-Wpsp5M3p.js +1 -0
  32. package/dist/packem_shared/Tabs-BdNFQd3c.js +1 -0
  33. package/dist/packem_shared/{Textarea-Yfg3dLZi.js → Textarea-DP9gpte-.js} +1 -1
  34. package/dist/packem_shared/Tooltip-DVeuszoY.js +1 -0
  35. package/dist/packem_shared/annotation-settings-DlLZO5Zp.js +1 -0
  36. package/dist/packem_shared/annotation-store-CXMIg0dM.js +1 -0
  37. package/dist/packem_shared/clsx-CtZWcPHt.js +1 -0
  38. package/dist/packem_shared/createClientRPCContext-80V9c3Qu.js +1 -0
  39. package/dist/packem_shared/createDevToolbarHook-CzejbqD2.js +1 -0
  40. package/dist/packem_shared/createServerRPCContext-C30tqEfQ.js +1 -0
  41. package/dist/packem_shared/getGlobalHook-GRSqUNJ3.js +1 -0
  42. package/dist/packem_shared/getTimelineStore-BT5sImVb.js +1 -0
  43. package/dist/packem_shared/{global-api.d-BgSWkF5h.d.ts → global-api.d-DeaCvII9.d.ts} +158 -158
  44. package/dist/packem_shared/loadSettings-C0pUyx9j.js +1 -0
  45. package/dist/packem_shared/server.d-ZkcY0pge.d.ts +39 -0
  46. package/dist/packem_shared/sharedToolbarStylesheet-DNABzHAf.js +2 -0
  47. package/dist/packem_shared/store-Dqy0FbGw.js +1 -0
  48. package/dist/packem_shared/use-theme-DIqZkPAe.js +1 -0
  49. package/dist/toolbar/index.d.ts +1 -1
  50. package/dist/toolbar/index.js +3 -3
  51. package/dist/ui/index.js +1 -1
  52. package/dist/vite-plugin.d.ts +29 -1
  53. package/dist/vite-plugin.js +4 -4
  54. package/package.json +6 -6
  55. package/dist/packem_shared/Alert-D2CvX4fw.js +0 -1
  56. package/dist/packem_shared/Badge-BEgU04nl.js +0 -1
  57. package/dist/packem_shared/Button-Bkx66Co7.js +0 -1
  58. package/dist/packem_shared/Card-CJa4vHVc.js +0 -1
  59. package/dist/packem_shared/Icon-B6UHkC0o.js +0 -1
  60. package/dist/packem_shared/Label-DyCng4Cp.js +0 -1
  61. package/dist/packem_shared/Popover-BtFVaZYg.js +0 -1
  62. package/dist/packem_shared/Progress-DN6zn-0l.js +0 -1
  63. package/dist/packem_shared/Select-DgQ4ss-s.js +0 -1
  64. package/dist/packem_shared/Separator-D38mKeZv.js +0 -1
  65. package/dist/packem_shared/Skeleton-Dv-tcA1P.js +0 -1
  66. package/dist/packem_shared/Switch-C3NTpeoR.js +0 -1
  67. package/dist/packem_shared/Tabs-DKWMiawt.js +0 -1
  68. package/dist/packem_shared/Tooltip-CioncSXj.js +0 -1
  69. package/dist/packem_shared/annotation-settings-Bv0TH4WI.js +0 -1
  70. package/dist/packem_shared/annotation-store-bLQRYMaI.js +0 -1
  71. package/dist/packem_shared/clsx-wGlvpUfw.js +0 -1
  72. package/dist/packem_shared/createClientRPCContext-DgRxrllw.js +0 -1
  73. package/dist/packem_shared/createDevToolbarHook-4bZZiHPI.js +0 -1
  74. package/dist/packem_shared/createServerRPCContext-DoUxFMox.js +0 -1
  75. package/dist/packem_shared/getTimelineStore-B1cfjWV8.js +0 -1
  76. package/dist/packem_shared/loadSettings-hvjR4fcS.js +0 -1
  77. package/dist/packem_shared/setupGlobalHook-CCf9Logv.js +0 -1
  78. package/dist/packem_shared/sharedToolbarStylesheet-pA-B0Jt2.js +0 -2
  79. package/dist/packem_shared/store-DaUtLjf3.js +0 -1
  80. package/dist/packem_shared/use-theme-Dm1M0rKT.js +0 -1
@@ -0,0 +1 @@
1
+ import{clsx as s}from"./clsx-CtZWcPHt.js";import{jsx as l}from"preact/jsx-runtime";const n={default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive",info:"border-info/50 text-info",success:"border-success/50 text-success",warning:"border-warning/50 text-warning"},d=({children:e,class:r,variant:t="default",...i})=>l("div",{class:s("relative w-full rounded-none border p-4 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7",n[t],r),role:"alert",...i,children:e}),o=({children:e,class:r,...t})=>l("h5",{class:s("mb-1 font-medium leading-none tracking-tight",r),...t,children:e}),g=({children:e,class:r,...t})=>l("div",{class:s("text-sm [&_p]:leading-relaxed",r),...t,children:e});export{d as Alert,g as AlertDescription,o as AlertTitle};
@@ -0,0 +1 @@
1
+ import{clsx as o}from"./clsx-CtZWcPHt.js";import{jsx as s}from"preact/jsx-runtime";const a={default:"border-transparent bg-primary text-primary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",info:"border-transparent bg-info text-info-foreground",outline:"text-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",success:"border-transparent bg-success text-success-foreground",warning:"border-transparent bg-warning text-warning-foreground"},c=({children:r,class:e,variant:t="default",...n})=>s("div",{class:o("inline-flex items-center rounded-none border px-2.5 py-0.5 text-xs font-semibold transition-colors",a[t],e),...n,children:r});export{c as default};
@@ -0,0 +1 @@
1
+ import{clsx as d}from"./clsx-CtZWcPHt.js";import{jsx as s}from"preact/jsx-runtime";const u={default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"text-muted-foreground hover:bg-foreground/8 hover:text-foreground",link:"text-primary underline-offset-4 hover:underline",outline:"border border-input bg-background text-foreground hover:bg-foreground/8",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},a={default:"h-9 px-4 py-2",icon:"h-9 w-9",lg:"h-10 px-8",sm:"h-8 px-3 text-xs"},l=({children:e,class:r,size:t="default",type:o="button",variant:n="default",...i})=>s("button",{class:d("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-none text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",u[n],a[t],r),type:o,...i,children:e});export{l as default};
@@ -0,0 +1 @@
1
+ import{clsx as d}from"./clsx-CtZWcPHt.js";import{jsx as c}from"preact/jsx-runtime";const i=({children:s,class:e,...r})=>c("div",{class:d("bg-card text-card-foreground rounded-none border shadow",e),...r,children:s}),n=({children:s,class:e,...r})=>c("div",{class:d("flex flex-col space-y-1.5 p-6",e),...r,children:s}),t=({children:s,class:e,...r})=>c("h3",{class:d("font-semibold leading-none tracking-tight",e),...r,children:s}),o=({children:s,class:e,...r})=>c("div",{class:d("text-sm text-muted-foreground",e),...r,children:s}),h=({children:s,class:e,...r})=>c("div",{class:d("p-6 pt-0",e),...r,children:s}),p=({children:s,class:e,...r})=>c("div",{class:d("flex items-center p-6 pt-0",e),...r,children:s});export{i as Card,h as CardContent,o as CardDescription,p as CardFooter,n as CardHeader,t as CardTitle};
@@ -0,0 +1 @@
1
+ import{clsx as t}from"./clsx-CtZWcPHt.js";import{jsx as r}from"preact/jsx-runtime";const n=({class:s,size:e=13,src:a})=>r("span",{class:t("inline-block shrink-0",s),style:{backgroundColor:"currentColor",height:e,maskImage:`url(${a})`,maskRepeat:"no-repeat",maskSize:"contain",WebkitMaskImage:`url(${a})`,WebkitMaskRepeat:"no-repeat",WebkitMaskSize:"contain",width:e}});export{n as default};
@@ -1 +1 @@
1
- import{clsx as s}from"./clsx-wGlvpUfw.js";import{forwardRef as i}from"preact/compat";import{jsx as l}from"preact/jsx-runtime";const n=i(({class:o,type:e="text",...r},t)=>l("input",{class:s("flex h-9 w-full rounded-none border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",o),ref:t,type:e,...r}));n.displayName="Input";export{n as default};
1
+ import{clsx as s}from"./clsx-CtZWcPHt.js";import{forwardRef as i}from"preact/compat";import{jsx as l}from"preact/jsx-runtime";const n=i(({class:o,type:e="text",...r},t)=>l("input",{class:s("flex h-9 w-full rounded-none border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",o),ref:t,type:e,...r}));n.displayName="Input";export{n as default};
@@ -0,0 +1 @@
1
+ import{clsx as o}from"./clsx-CtZWcPHt.js";import{jsx as r}from"preact/jsx-runtime";const t=({children:e,class:l,...s})=>r("label",{class:o("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",l),...s,children:e});export{t as default};
@@ -0,0 +1 @@
1
+ import{addHookName as m}from"preact/devtools";import{computePosition as O,offset as C,flip as R,shift as E}from"@floating-ui/dom";import{clsx as g}from"./clsx-CtZWcPHt.js";import{createContext as $}from"preact";import{useState as b,useRef as y,useEffect as x,useContext as k}from"preact/hooks";import{jsx as u}from"preact/jsx-runtime";const P=$(void 0),h=()=>{const e=k(P);if(!e)throw new Error("Popover subcomponent must be used within <Popover>");return e},N=({children:e,defaultOpen:r,onOpenChange:o,open:t})=>{const i=t!==void 0,[l,n]=m(b(r??!1),"internalOpen"),p=i?t:l,s=m(y(null),"triggerRef"),c=a=>{i||n(a),o?.(a)};return u(P.Provider,{value:{open:p,setOpen:c,triggerRef:s},children:u("span",{style:{display:"contents"},children:e})})},T=({children:e,class:r,...o})=>{const{open:t,setOpen:i,triggerRef:l}=h(),n=p=>{l.current=p};return u("button",{"aria-expanded":t,class:g("",r),onClick:()=>{o.disabled||i(!t)},ref:n,type:"button",...o,children:e})},q=({align:e="center",children:r,class:o,side:t="bottom",sideOffset:i=4,...l})=>{const{open:n,setOpen:p,triggerRef:s}=h(),c=m(y(null),"contentRef"),[a,w]=m(b({x:0,y:0}),"position");if(x(()=>{if(!n||!s.current||!c.current)return;const f=e==="center"?t:`${t}-${e}`;O(s.current,c.current,{middleware:[C(i),R(),E({padding:4})],placement:f}).then(d=>(w({x:d.x,y:d.y}),d)).catch(()=>{})},[n,t,i,e,s]),x(()=>{if(!n)return;const f=d=>{if(c.current&&!c.current.contains(d.target)){const v=s.current;if(v&&v.contains(d.target))return;p(!1)}};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[n,p,s]),!!n)return u("div",{class:g("z-50 w-72 rounded-none border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",o),ref:c,role:"dialog",style:{left:`${a.x}px`,position:"fixed",top:`${a.y}px`},...l,children:r})},A=({children:e,class:r,...o})=>{const{setOpen:t}=h();return u("button",{class:g("",r),onClick:()=>{t(!1)},type:"button",...o,children:e})};export{N as Popover,A as PopoverClose,q as PopoverContent,T as PopoverTrigger};
@@ -0,0 +1 @@
1
+ import{clsx as s}from"./clsx-CtZWcPHt.js";import{jsx as l}from"preact/jsx-runtime";const t=({class:r,value:a,...e})=>l("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a??0,class:s("relative h-2 w-full overflow-hidden rounded-none bg-primary/20",r),role:"progressbar",...e,children:l("div",{class:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(a??0)}%)`}})});export{t as default};
@@ -0,0 +1 @@
1
+ import{addHookName as s}from"preact/devtools";import{computePosition as U,offset as W,flip as X,shift as _}from"@floating-ui/dom";import{clsx as w}from"./clsx-CtZWcPHt.js";import{createContext as F}from"preact";import{useState as b,useRef as y,useCallback as G,useEffect as S,useMemo as Q,useContext as Y}from"preact/hooks";import{jsx as u,jsxs as O}from"preact/jsx-runtime";const q=F(void 0),I=()=>{const e=Y(q);if(!e)throw new Error("Select subcomponent must be used within <Select>");return e};let P=0;const le=({children:e,onValueChange:d,value:n=""})=>{const[t,o]=s(b(!1),"open"),[c,l]=s(b(""),"search"),[p,r]=s(b(null),"highlightedValue"),x=s(y(null),"triggerRef"),[g]=s(b(()=>(P+=1,`select-${P}`)),"instanceId"),m=G(i=>{d?.(i),o(!1),l("")},[d]);S(()=>{t||(l(""),r(null))},[t]);const R=s(Q(()=>({highlightedValue:p,instanceId:g,onSelect:m,open:t,search:c,setHighlightedValue:r,setOpen:o,setSearch:l,triggerRef:x,value:n}),[p,g,m,t,c,n]),"contextValue");return u(q.Provider,{value:R,children:u("span",{style:{display:"contents"},children:e})})},ie=({children:e,class:d,...n})=>{const{open:t,setOpen:o,triggerRef:c}=I();return O("button",{"aria-expanded":t,"aria-haspopup":"listbox",class:w("inline-flex items-center justify-between gap-2","bg-foreground/6 border border-border","text-[0.775rem] font-medium text-foreground","px-2.5 py-1.5 cursor-pointer","focus:outline-none focus:ring-1 focus:ring-ring","transition-colors duration-150",d),onClick:()=>{o(!t)},ref:l=>{c.current=l},type:"button",...n,children:[e,u("svg",{"aria-hidden":"true",class:w("h-3 w-3 shrink-0 opacity-60 transition-transform duration-150",t&&"rotate-180"),fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24",children:u("path",{d:"m6 9 6 6 6-6"})})]})},se=({class:e,options:d,placeholder:n="Select…"})=>{const{value:t}=I(),o=d.find(c=>c.value===t);return u("span",{class:w("truncate",!o&&"text-muted-foreground",e),children:o?o.label:n})},Z=e=>[...e.querySelectorAll("[role='option']:not([aria-disabled='true'])")],N=e=>e.dataset.value??null,ce=({align:e="start",children:d,class:n,searchable:t=!1,side:o="bottom",sideOffset:c=4})=>{const{highlightedValue:l,instanceId:p,open:r,search:x,setHighlightedValue:g,setOpen:m,setSearch:R,triggerRef:i}=I(),k=s(y(null),"contentRef"),D=s(y(null),"searchInputRef"),$=s(y(null),"listRef"),[j,J]=s(b({x:0,y:0}),"position"),[K,A]=s(b(!1),"ready"),L=s(y(l),"highlightedRef");if(L.current=l,S(()=>{if(!r||!i.current||!k.current){A(!1);return}let f=!1;const a=e==="center"?o:`${o}-${e}`;return U(i.current,k.current,{middleware:[W(c),X(),_({padding:4})],placement:a}).then(h=>(f||(J({x:h.x,y:h.y}),A(!0)),h)).catch(()=>{}),()=>{f=!0}},[r,o,c,e,i]),S(()=>{r&&(t&&D.current?D.current.focus():$.current&&$.current.focus())},[r,t]),S(()=>{if(!r)return;const f=a=>{if(k.current&&!k.current.contains(a.target)){const h=i.current;if(h&&h.contains(a.target))return;m(!1)}};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[r,m,i]),S(()=>{if(!r)return;const f=a=>{const h=$.current;if(!h)return;const V=Z(h),C=V.length;if(C===0){a.key==="Escape"&&(a.preventDefault(),m(!1),i.current?.focus());return}const z=L.current,v=z===null?-1:V.findIndex(H=>N(H)===z),E=H=>{const M=V[H];if(M){const B=N(M);B!==null&&g(B),M.scrollIntoView?.({block:"nearest"})}};switch(a.key){case"ArrowDown":{a.preventDefault(),E(v<C-1?v+1:0);break}case"ArrowUp":{a.preventDefault(),E(v>0?v-1:C-1);break}case"End":{a.preventDefault(),E(C-1);break}case"Enter":{a.preventDefault(),v>=0&&V[v]?.click();break}case"Escape":case"Tab":{a.preventDefault(),m(!1),i.current?.focus();break}case"Home":{a.preventDefault(),E(0);break}}};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r,g,m,i]),!r)return;const T=l===null?void 0:`${p}-option-${l}`;return O("div",{class:w("z-50 min-w-[8rem] overflow-hidden border border-border bg-popover text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95",!K&&"invisible",n),ref:k,style:{left:`${j.x}px`,position:"fixed",top:`${j.y}px`,width:i.current?`${Math.max(i.current.offsetWidth,128)}px`:void 0},children:[t&&u("div",{class:"border-b border-border p-1.5",children:u("input",{"aria-activedescendant":T,"aria-controls":`${p}-listbox`,"aria-label":"Search options",class:w("w-full bg-transparent text-[0.75rem] text-foreground placeholder:text-muted-foreground","px-1.5 py-1 border-0 outline-none"),onInput:f=>{R(f.currentTarget.value),g(null)},placeholder:"Search…",ref:D,role:"combobox",type:"text",value:x})}),u("div",{...!t&&{"aria-activedescendant":T,tabIndex:0},class:"max-h-[min(300px,var(--available-height,300px))] overflow-y-auto scrollbar-thin-border p-1",id:`${p}-listbox`,ref:$,role:"listbox",children:d})]})},ue=({children:e,class:d,value:n})=>{const{highlightedValue:t,instanceId:o,onSelect:c,setHighlightedValue:l,value:p}=I(),r=p===n,x=t===n,g=`${o}-option-${n}`;return O("div",{"aria-selected":r,class:w("relative flex cursor-pointer select-none items-center gap-2","text-[0.775rem] py-1.5 px-2","transition-colors duration-75",x&&"bg-accent text-accent-foreground",r&&"font-medium",!x&&!r&&"text-foreground",!x&&"hover:bg-accent/50",d),"data-value":n,id:g,onClick:()=>{c(n)},onMouseEnter:()=>{l(n)},role:"option",children:[u("span",{class:"flex-1 truncate",children:e}),r&&u("svg",{"aria-hidden":"true",class:"h-3.5 w-3.5 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2.5",viewBox:"0 0 24 24",children:u("path",{d:"M20 6 9 17l-5-5"})})]})};export{le as Select,ce as SelectContent,ue as SelectItem,ie as SelectTrigger,se as SelectValue,I as useSelectContext};
@@ -0,0 +1 @@
1
+ import{clsx as i}from"./clsx-CtZWcPHt.js";import{jsx as l}from"preact/jsx-runtime";const c=({class:r,decorative:t=!0,orientation:o="horizontal",...e})=>{const a=t?{role:"none"}:{"aria-orientation":o,role:"separator"};return l("div",{class:i("shrink-0 bg-border",o==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",r),...a,...e})};export{c as default};
@@ -0,0 +1 @@
1
+ import{clsx as r}from"./clsx-CtZWcPHt.js";import{jsx as a}from"preact/jsx-runtime";const t=({class:o,...s})=>a("div",{class:r("animate-pulse rounded-none bg-primary/10",o),...s});export{t as default};
@@ -0,0 +1 @@
1
+ import{addHookName as k}from"preact/devtools";import{clsx as i}from"./clsx-CtZWcPHt.js";import{useState as m}from"preact/hooks";import{jsx as s}from"preact/jsx-runtime";const w=({checked:n,class:a,defaultChecked:c,disabled:o,id:d,onCheckedChange:l,...u})=>{const r=n!==void 0,[b,f]=k(m(c??!1),"internalChecked"),e=r?n:b,h=()=>{if(o)return;const t=!e;r||f(t),l?.(t)};return s("button",{"aria-checked":e,class:i("inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-none border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e?"bg-primary":"bg-input",a),"data-state":e?"checked":"unchecked",disabled:o,id:d,onClick:h,role:"switch",type:"button",...u,children:s("span",{class:i("pointer-events-none block h-4 w-4 rounded-none bg-background shadow-lg ring-0 transition-transform",e?"translate-x-4":"translate-x-0"),"data-state":e?"checked":"unchecked"})})};export{w as default};
@@ -0,0 +1 @@
1
+ import{addHookName as m}from"preact/devtools";import{clsx as l}from"./clsx-CtZWcPHt.js";import{createContext as h}from"preact";import{useState as p,useContext as x}from"preact/hooks";import{jsx as r}from"preact/jsx-runtime";const d=h(void 0),b=()=>{const e=x(d);if(!e)throw new Error("Tabs subcomponent must be used within <Tabs>");return e},y=({children:e,class:i,defaultValue:n,onValueChange:t,value:o,...c})=>{const a=o!==void 0,[s,f]=m(p(n??""),"internalValue"),g=a?o:s,v=u=>{a||f(u),t?.(u)};return r(d.Provider,{value:{onValueChange:v,value:g},children:r("div",{class:l("",i),...c,children:e})})},j=({children:e,class:i,...n})=>r("div",{class:l("inline-flex h-9 items-center justify-center rounded-none bg-muted p-1 text-muted-foreground",i),role:"tablist",...n,children:e}),L=({children:e,class:i,disabled:n,value:t,...o})=>{const{onValueChange:c,value:a}=b(),s=a===t;return r("button",{"aria-selected":s,class:l("inline-flex items-center justify-center whitespace-nowrap rounded-none px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",s?"bg-background text-foreground shadow":"hover:bg-background/50",i),"data-state":s?"active":"inactive",disabled:n,onClick:()=>!n&&c(t),role:"tab",type:"button",...o,children:e})},E=({children:e,class:i,value:n,...t})=>{const{value:o}=b();if(o===n)return r("div",{class:l("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i),role:"tabpanel",...t,children:e})};export{y as Tabs,E as TabsContent,j as TabsList,L as TabsTrigger};
@@ -1 +1 @@
1
- import{clsx as s}from"./clsx-wGlvpUfw.js";import{forwardRef as t}from"preact/compat";import{jsx as a}from"preact/jsx-runtime";const i=t(({class:e,...r},o)=>a("textarea",{class:s("flex min-h-[60px] w-full rounded-none border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as default};
1
+ import{clsx as s}from"./clsx-CtZWcPHt.js";import{forwardRef as t}from"preact/compat";import{jsx as a}from"preact/jsx-runtime";const i=t(({class:e,...r},o)=>a("textarea",{class:s("flex min-h-[60px] w-full rounded-none border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as default};
@@ -0,0 +1 @@
1
+ import{addHookName as s}from"preact/devtools";import{computePosition as h,offset as y,flip as T,shift as R}from"@floating-ui/dom";import{clsx as v}from"./clsx-CtZWcPHt.js";import{createContext as w}from"preact";import{useState as u,useRef as d,useEffect as b,useContext as C}from"preact/hooks";import{jsx as p}from"preact/jsx-runtime";const m=w(void 0),x=()=>{const e=C(m);if(!e)throw new Error("Tooltip subcomponent must be used within <Tooltip>");return e},$=({children:e,delayDuration:i=0})=>{const[o,t]=s(u(!1),"open"),r=s(d(null),"triggerRef");return p(m.Provider,{value:{open:o,setOpen:t,triggerRef:r},children:p("span",{style:{display:"contents"},children:e})})},j=({children:e,class:i,...o})=>{const{setOpen:t,triggerRef:r}=x();return p("span",{class:i,onMouseEnter:()=>{t(!0)},onMouseLeave:()=>{t(!1)},ref:n=>{r.current=n},...o,children:e})},k=({children:e,class:i,side:o="top",sideOffset:t=4,...r})=>{const{open:n,triggerRef:l}=x(),c=s(d(null),"contentRef"),[a,g]=s(u({x:0,y:0}),"position");if(b(()=>{!n||!l.current||!c.current||h(l.current,c.current,{middleware:[y(t),T(),R({padding:4})],placement:o}).then(f=>(g({x:f.x,y:f.y}),f)).catch(()=>{})},[n,o,t,l]),!!n)return p("div",{class:v("z-50 rounded-none bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95",i),ref:c,role:"tooltip",style:{left:`${a.x}px`,position:"fixed",top:`${a.y}px`},...r,children:e})};export{$ as Tooltip,k as TooltipContent,j as TooltipTrigger};
@@ -0,0 +1 @@
1
+ const l="__vdt_annotation_settings",g=[{bg:"#6366f1",border:"#4f46e5",fg:"#fff",highlightBg:"rgba(99,102,241,0.12)",label:"Indigo",name:"indigo"},{bg:"#3b82f6",border:"#2563eb",fg:"#fff",highlightBg:"rgba(59,130,246,0.12)",label:"Blue",name:"blue"},{bg:"#06b6d4",border:"#0891b2",fg:"#fff",highlightBg:"rgba(6,182,212,0.12)",label:"Cyan",name:"cyan"},{bg:"#22c55e",border:"#16a34a",fg:"#fff",highlightBg:"rgba(34,197,94,0.12)",label:"Green",name:"green"},{bg:"#eab308",border:"#ca8a04",fg:"#1a1a1a",highlightBg:"rgba(234,179,8,0.12)",label:"Yellow",name:"yellow"},{bg:"#f97316",border:"#ea580c",fg:"#fff",highlightBg:"rgba(249,115,22,0.12)",label:"Orange",name:"orange"},{bg:"#ef4444",border:"#dc2626",fg:"#fff",highlightBg:"rgba(239,68,68,0.12)",label:"Red",name:"red"}],t={blockInteractions:!0,markerClickBehavior:"detail",markerColorName:"indigo",outputDetail:"standard"};let a;const o=()=>{if(a)return a;try{const e=localStorage.getItem(l);if(e){const r=JSON.parse(e);return a={...t,...r},a}}catch{}return a={...t},a},b=e=>{a=e;try{localStorage.setItem(l,JSON.stringify(e))}catch{}},f=e=>{const r=e??o();return g.find(n=>n.name===r.markerColorName)??g[0]};export{g as M,f as g,o as l,b as s};
@@ -0,0 +1 @@
1
+ import{createRequire as p}from"node:module";const f=p(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[s,t]=i.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return i.getBuiltinModule(e)}return f(e)},o=h("node:fs/promises"),n=h("node:path"),y=".devtoolbar",A="annotations.json",_="screenshots",m=1e3,l=500,d=1e5,g=e=>typeof e=="string"&&e.length>d?e.slice(0,d):e,c=e=>{const s=n.join(e,y);return{annotationsFile:n.join(s,A),base:s,screenshotsDir:n.join(s,_)}},S=(e,s)=>{const t=n.resolve(e),r=n.resolve(s);return t.startsWith(r+n.sep)||t===r},N=e=>e.replaceAll(/[^a-z0-9-]/gi,""),T=async e=>{const{screenshotsDir:s}=c(e);await o.mkdir(s,{recursive:!0})};let u=Promise.resolve();const j=async e=>{const s=u;let t;u=new Promise(r=>{t=r}),await s;try{return await e()}finally{t()}},v=async e=>{const{annotationsFile:s}=c(e);try{const t=await o.readFile(s,"utf8"),r=JSON.parse(t);return Array.isArray(r)?r.slice(0,m).map(a=>Array.isArray(a?.thread)&&a.thread.length>l?{...a,thread:a.thread.slice(0,l)}:a):[]}catch{return[]}},E=async(e,s)=>{await T(e);const{annotationsFile:t}=c(e);await o.writeFile(t,JSON.stringify(s,void 0,2),"utf8")},F=async(e,s)=>{if(!s.startsWith(`${_}/`))return;const{base:t}=c(e),r=n.join(t,s);if(S(r,t))try{await o.unlink(r)}catch{}};export{l as M,_ as S,c as a,E as b,g as c,F as d,T as e,m as f,S as i,v as r,N as s,j as w};
@@ -0,0 +1 @@
1
+ function o(e){var f,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(f=0;f<a;f++)e[f]&&(t=o(e[f]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function r(){for(var e,f,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(f=o(e))&&(n&&(n+=" "),n+=f);return n}export{r as clsx,r as default};
@@ -0,0 +1 @@
1
+ const s=l=>{const i={onConfigChange:()=>{},onHMRUpdate:()=>{},onModuleUpdate:()=>{},...l},t=new Map;return globalThis.window!==void 0&&import.meta.hot&&(import.meta.hot.on("dev-toolbar:rpc:response",e=>{const o=t.get(e.id);o&&(t.delete(e.id),o.resolve(e.result))}),import.meta.hot.on("dev-toolbar:rpc:error",e=>{const o=t.get(e.id);o&&(t.delete(e.id),o.reject(new Error(e.error)))}),import.meta.hot.on("dev-toolbar:client",e=>{const{args:o,method:r}=e,n=i[r];if(n)try{n(...o)}catch(a){console.error(`[dev-toolbar] Error calling client function ${r}:`,a)}})),{async callServer(e,...o){if(globalThis.window===void 0||!import.meta.hot)throw new Error("RPC calls can only be made in browser environment with HMR");const r=`${Date.now()}-${Math.random().toString(36).slice(7)}`;return new Promise((n,a)=>{t.set(r,{reject:a,resolve:n}),setTimeout(()=>{t.has(r)&&(t.delete(r),a(new Error(`RPC call timeout: ${e}`)))},3e4),import.meta.hot.send("dev-toolbar:rpc",{args:o,id:r,method:e})})},registerFunction(e,o){i[e]=o}}};export{s as createClientRPCContext,s as default};
@@ -0,0 +1 @@
1
+ const a=(s,i)=>{const n=new Map;return{addTimelineEvent(e,o){i&&i(e,o),this.emit("timeline:event",o)},emit(e,...o){const t=n.get(e);if(t)for(const r of t)try{r(...o)}catch(d){console.error(`[dev-toolbar] Error in hook handler for ${String(e)}:`,d)}},off(e,o){const t=n.get(e);t&&(o?(t.delete(o),t.size===0&&n.delete(e)):n.delete(e))},on(e,o){return n.has(e)||n.set(e,new Set),n.get(e).add(o),()=>{const t=n.get(e);t&&(t.delete(o),t.size===0&&n.delete(e))}},once(e,o){const t=((...r)=>{o(...r),this.off(e,t)});this.on(e,t)},registerApp(e){s&&s(e)}}};export{a as createDevToolbarHook,a as default};
@@ -0,0 +1 @@
1
+ import{createRequire as k}from"node:module";import{w as b,r as h,c as p,d as P,M as S,b as x,e as R,a as F,s as _,i as v,S as T,f as j}from"./annotation-store-CXMIg0dM.js";import{normalizePath as A}from"vite";const O=k(import.meta.url),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=r=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[e,t]=f.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return f.getBuiltinModule(r)}return O(r)},m=w("node:fs/promises"),u=w("node:path"),{createRequire:z}=w("node:module"),B=async r=>h(r.config.root),L=async(r,e)=>b(async()=>{const{root:t}=r.config,s=new Date().toISOString(),o=await h(t);if(o.length>=j)throw new Error(`Annotation limit reached (${j}). Resolve or delete existing annotations before creating new ones.`);const n={accessibility:e.accessibility,boundingBox:e.boundingBox,comment:p(e.comment),computedStyles:p(e.computedStyles),createdAt:s,cssClasses:p(e.cssClasses),elementBoundingBoxes:e.elementBoundingBoxes,elementLabel:p(e.elementLabel),elementPath:p(e.elementPath),elementTag:e.elementTag,frameworkContext:e.frameworkContext,fullPath:p(e.fullPath),id:crypto.randomUUID(),intent:e.intent,isFixed:e.isFixed,isMultiSelect:e.isMultiSelect,nearbyElements:p(e.nearbyElements),nearbyText:p(e.nearbyText),screenshot:e.screenshot,selectedText:p(e.selectedText),severity:e.severity,source:e.source,status:"pending",updatedAt:s,url:e.url,x:e.x,y:e.y};return o.push(n),await x(t,o),n}),W=async(r,e,t)=>b(async()=>{const{root:s}=r.config,o=await h(s),n=o.findIndex(c=>c.id===e);if(n===-1)return null;const i=o[n],a=new Date().toISOString();if(t.comment!==void 0&&(i.comment=p(t.comment)),t.intent!==void 0&&(i.intent=t.intent),t.severity!==void 0&&(i.severity=t.severity),t.status!==void 0&&(i.status=t.status,(t.status==="resolved"||t.status==="dismissed")&&(i.resolvedBy=t.resolvedBy??"human",i.resolvedAt=a,i.screenshot&&(await P(s,i.screenshot),i.screenshot=void 0))),t.threadMessage){if(i.thread||(i.thread=[]),i.thread.length>=S)throw new Error(`Thread message limit reached (${S}) for this annotation.`);i.thread.push({...t.threadMessage,content:p(t.threadMessage.content),id:crypto.randomUUID(),timestamp:a})}return i.updatedAt=a,o[n]=i,await x(s,o),i}),U=async(r,e)=>b(async()=>{const{root:t}=r.config,s=await h(t),o=s.findIndex(i=>i.id===e);if(o===-1)return!1;const n=s[o];return n.screenshot&&await P(t,n.screenshot),s.splice(o,1),await x(t,s),!0}),q=async(r,e,t)=>{const{root:s}=r.config;await R(s);const{base:o,screenshotsDir:n}=F(s),i=_(e);if(!i)throw new Error("Invalid annotation ID");let a,c;if(t.startsWith("data:image/png;base64,"))a="png",c=Buffer.from(t.slice(22),"base64");else if(t.startsWith("data:image/jpeg;base64,"))a="jpg",c=Buffer.from(t.slice(23),"base64");else if(t.startsWith("data:image/webp;base64,"))a="webp",c=Buffer.from(t.slice(23),"base64");else throw new Error("Unsupported screenshot format. Expected PNG, JPEG, or WebP data URL.");const l=`${i}.${a}`,d=u.join(n,l);if(!v(d,o))throw new Error("Invalid screenshot path");return await m.writeFile(d,c),`${T}/${l}`},G=async(r,e)=>{const{root:t}=r.config,s=(await h(t)).find(i=>i.id===e);if(!s?.screenshot||!s.screenshot.startsWith(`${T}/`))return null;const{base:o}=F(t),n=u.join(o,s.screenshot);if(!v(n,o))return null;try{const i=await m.readFile(n),a=u.extname(n).slice(1);return a==="svg"?`data:image/svg+xml,${encodeURIComponent(i.toString("utf8"))}`:`data:${a==="jpg"?"image/jpeg":`image/${a}`};base64,${i.toString("base64")}`}catch{return null}},N=new Set(["apng","avif","bmp","gif","ico","jpeg","jpg","png","svg","tiff","webp"]),H=new Set(["avi","mkv","mov","mp4","ogv","webm"]),X=new Set(["aac","flac","m4a","mp3","ogg","opus","wav"]),J=new Set(["eot","otf","ttf","woff","woff2"]),V=new Set(["css","csv","html","js","json","md","txt","xml"]),g=5e3,D=r=>{const e=r.toLowerCase();return N.has(e)?"image":H.has(e)?"video":X.has(e)?"audio":J.has(e)?"font":V.has(e)?"text":"other"},K=r=>{let e=0;const t=[];return{acquire:()=>new Promise(s=>{e<r?(e+=1,s()):t.push(()=>{e+=1,s()})}),release:()=>{e-=1,t.shift()?.()}}},I=async(r,e,t,s)=>{if(s.length>=g)return;let o;await t.acquire();try{o=await m.readdir(r,{withFileTypes:!0})}catch{return}finally{t.release()}await Promise.all(o.map(async n=>{if(s.length>=g)return;const i=u.join(r,n.name);if(n.isDirectory())await I(i,e,t,s);else if(n.isFile()||n.isSymbolicLink()){await t.acquire();try{const a=await m.lstat(i);if(a.isSymbolicLink()){let c;try{c=await m.realpath(i)}catch{return}if(!c.startsWith(e+u.sep)&&c!==e)return;const l=await m.stat(i),d=u.relative(e,i),M=`/${A(d)}`,$=u.extname(n.name).slice(1);s.length<g&&s.push({mtime:l.mtimeMs,publicPath:M,size:l.size,type:D($)})}else if(a.isFile()){const c=u.relative(e,i),l=`/${A(c)}`,d=u.extname(n.name).slice(1);s.length<g&&s.push({mtime:a.mtimeMs,publicPath:l,size:a.size,type:D(d)})}}catch{}finally{t.release()}}}))},Q=async r=>{const{publicDir:e}=r.config;if(!e)return[];let t;try{t=await m.realpath(e)}catch{return[]}const s=[],o=K(20);return await I(t,t,o,s),s.sort((n,i)=>n.publicPath.localeCompare(i.publicPath)),s},Y=async r=>{const{moduleGraph:e}=r,t=[];for(const s of e.idToModuleMap.values()){if(t.length>=5e3)break;const o=s.id??s.url,n=s.url??s.id;if(!o||!n||o.startsWith("/@"))continue;const i=[];s.importers.forEach(a=>{const c=a.url??a.id;c&&i.push(c)}),t.push({id:o,importerCount:s.importers.size,importerUrls:i,url:n})}return t},Z=async(r,e,t,s,o)=>{const n=u.resolve(r.config.root,e);if(!v(n,r.config.root))throw new Error(`Refusing to open file outside project root: ${e}`);const i=s===void 0?"":`:${s}`,a=t===void 0?"":`:${t}${i}`,c=`${n}${a}`,{default:l}=await import("launch-editor");l(c,o)},ee=/\/\*[\s\S]*?\*\//g,te=/\s+/g,E=/@theme\s+default[^{]*\{[\s\S]*?\}/g,y=/(--[\w-]+)\s*:\s*([\s\S]*?);/g,C=r=>{const e={},t=r.replaceAll(ee,"");let s=0;for(;s<t.length;){const o=t.indexOf("@theme",s);if(o===-1)break;const n=t.indexOf("{",o);if(n===-1)break;let i=1,a=n+1;for(;a<t.length&&i>0;)t[a]==="{"?i+=1:t[a]==="}"&&(i-=1),a+=1;const c=t.slice(n+1,a-1);y.lastIndex=0;let l=y.exec(c);for(;l!==null;){const d=l[2].replaceAll(te," ").trim();d&&!e[l[1]]&&(e[l[1]]=d),l=y.exec(c)}s=a}return e},se=async r=>{const e=[],t=async(s,o)=>{if(o>4)return;let n;try{n=await m.readdir(s,{encoding:"utf8",withFileTypes:!0})}catch{return}for(const i of n){const a=u.join(s,i.name);if(i.isDirectory()){if(i.name==="node_modules"||i.name===".git"||i.name==="dist")continue;await t(a,o+1)}else if(i.name.endsWith(".css"))try{const c=await m.readFile(a,"utf8");c.includes("@import")&&(c.includes('"tailwindcss"')||c.includes("'tailwindcss'"))&&e.push(a)}catch{}}};return await t(r,0),e},re=async r=>{const e={};for(const t of r)try{const s=await m.readFile(t,"utf8");E.lastIndex=0;const o=s.replaceAll(E,""),n=C(o);Object.assign(e,n)}catch{}return e},ne=async r=>{const{root:e}=r.config;let t="unknown",s={};const o=["tailwind.config.js","tailwind.config.ts","tailwind.config.mjs","tailwind.config.cjs"];for(const a of o)try{await m.access(u.join(e,a)),t="v3";break}catch{}try{const a=z(import.meta.url).resolve("tailwindcss/theme.css"),c=await m.readFile(a,"utf8");s=C(c),Object.keys(s).length>0&&t!=="v3"&&(t="v4")}catch{}const n=await se(e),i=await re(n);return{cssFiles:n.map(a=>u.relative(e,a)),customTheme:i,defaultTheme:s,version:t}},ie=r=>{if(Array.isArray(r))return r.filter(e=>e!=null&&(e.find!==void 0||e.replacement!==void 0)).map(e=>({find:e.find instanceof RegExp?e.find.toString():String(e.find??""),replacement:String(e.replacement??"")}));if(r!=null&&typeof r=="object")return Object.fromEntries(Object.entries(r).map(([e,t])=>[e,String(t)]))},oe=r=>{if(typeof r=="boolean"||Array.isArray(r))return r},ae=async r=>{const{config:e}=r,t=[];for(const l of e.plugins.filter(d=>!!d?.name))t.push({enforce:l?.enforce,name:l.name});const s=ie(e.resolve?.alias),o=e.server?.proxy?Object.keys(e.server.proxy):void 0,n=e.server?.hmr,i=n!==!1,a=typeof n=="object"&&n!==null?n.port:void 0,c=oe(e.ssr?.noExternal);return{base:e.base,build:{assetsDir:e.build?.assetsDir,assetsInlineLimit:typeof e.build?.assetsInlineLimit=="number"?e.build.assetsInlineLimit:void 0,chunkSizeWarningLimit:e.build?.chunkSizeWarningLimit,cssCodeSplit:e.build?.cssCodeSplit,emptyOutDir:e.build?.emptyOutDir,minify:e.build?.minify,outDir:e.build?.outDir,reportCompressedSize:e.build?.reportCompressedSize,sourcemap:e.build?.sourcemap,target:e.build?.target},cacheDir:e.cacheDir,css:{devSourcemap:e.css?.devSourcemap,preprocessors:e.css?.preprocessorOptions?Object.keys(e.css.preprocessorOptions):[]},define:e.define,env:e.env,envDir:typeof e.envDir=="string"?e.envDir:void 0,envPrefix:e.envPrefix,esbuild:e.esbuild?{jsx:e.esbuild.jsx,jsxFactory:e.esbuild.jsxFactory,jsxFragment:e.esbuild.jsxFragment,jsxImportSource:e.esbuild.jsxImportSource,target:e.esbuild.target}:void 0,mode:e.mode,optimizeDeps:{exclude:e.optimizeDeps?.exclude,include:e.optimizeDeps?.include},plugins:t,publicDir:e.publicDir,resolve:{alias:s,conditions:e.resolve?.conditions,dedupe:e.resolve?.dedupe,extensions:e.resolve?.extensions,mainFields:e.resolve?.mainFields,preserveSymlinks:e.resolve?.preserveSymlinks},root:e.root,server:{cors:e.server?.cors===void 0?void 0:!!e.server.cors,hmrEnabled:i,hmrPort:a,host:e.server?.host,https:e.server?.https!==void 0,middlewareMode:(()=>{if(e.server?.middlewareMode!==void 0)return typeof e.server.middlewareMode=="object"?!0:!!e.server.middlewareMode})(),open:e.server?.open,origin:e.server?.origin,port:e.server?.port,proxy:o,strictPort:e.server?.strictPort},ssr:e.ssr===void 0?void 0:{external:Array.isArray(e.ssr?.external)?e.ssr.external:void 0,noExternal:c,target:e.ssr?.target}}},ce=["astro","cjs","css","cts","html","js","json","jsx","less","md","mdx","mjs","mts","sass","scss","svelte","ts","tsx","txt","vue"],le=(r,e={})=>{const t={createAnnotation:async s=>L(r,s),deleteAnnotation:async s=>U(r,s),getAnnotations:async()=>B(r),getModuleGraph:async()=>Y(r),getScreenshot:async s=>G(r,s),getStaticAssets:async()=>Q(r),getTailwindConfig:async()=>ne(r),getViteConfig:async()=>ae(r),openInEditor:async(s,o,n)=>Z(r,s,o,n,e.editor),saveScreenshot:async(s,o)=>q(r,s,o),updateAnnotation:async(s,o)=>W(r,s,o)};if(e.readFile!==!1){const s=new Set((e.readFile?.extensions??ce).map(o=>o.toLowerCase().replace(/^\./,"")));t.readFile=async o=>{const{readFile:n}=await import("node:fs/promises"),{extname:i,resolve:a}=await import("node:path"),{root:c}=r.config,l=a(c,o);if(!v(l,c))throw new Error(`Refusing to read file outside project root: ${o}`);const d=i(l).slice(1).toLowerCase();if(!s.has(d))throw new Error(`Refusing to read file with disallowed extension ".${d}": ${o}`);return n(l,"utf8")}}return t},pe=(r,e,t={})=>{const s={...le(r,t),...e};return r.ws.on("dev-toolbar:rpc",async(o,n)=>{const{args:i,id:a,method:c}=o,l=s[c];if(!l){n.send("dev-toolbar:rpc:error",{error:`Unknown RPC method: ${c}`,id:a});return}try{const d=await l(...i);n.send("dev-toolbar:rpc:response",{id:a,result:d})}catch(d){n.send("dev-toolbar:rpc:error",{error:d instanceof Error?d.message:String(d),id:a})}}),{callClient(o,...n){r.ws.send({data:{args:n,method:o},event:"dev-toolbar:client",type:"custom"})},registerFunction(o,n){s[o]=n},server:r}};export{pe as createServerRPCContext,pe as default};
@@ -0,0 +1 @@
1
+ import{createDevToolbarHook as O}from"./createDevToolbarHook-CzejbqD2.js";let o;const e=(_,l)=>o||(o=O(_,l),globalThis.window!==void 0&&(globalThis.__DEV_TOOLBAR_HOOK__=o),o),i=()=>{const _=globalThis;return globalThis.window!==void 0&&_.__DEV_TOOLBAR_HOOK__?_.__DEV_TOOLBAR_HOOK__:o};export{i as getGlobalHook,e as setupGlobalHook};
@@ -0,0 +1 @@
1
+ import{r as i,u as o}from"./store-Dqy0FbGw.js";export{i as TimelineStore,o as getTimelineStore};
@@ -1,162 +1,6 @@
1
1
  import { D as DevToolbarApp, T as ToolbarSettings } from "./app.d-SmKEDxsI.js";
2
2
  import { ViteDevServer } from 'vite';
3
3
  /**
4
- * Annotation intent — describes what the user wants to communicate.
5
- */
6
- type AnnotationIntent = "approve" | "change" | "fix" | "question";
7
- /**
8
- * Annotation severity — how urgent or important the annotation is.
9
- */
10
- type AnnotationSeverity = "blocking" | "important" | "suggestion";
11
- /**
12
- * Annotation status — lifecycle state.
13
- */
14
- type AnnotationStatus = "acknowledged" | "dismissed" | "pending" | "resolved";
15
- /**
16
- * A single message in a conversation thread attached to an annotation.
17
- */
18
- interface ThreadMessage {
19
- /** Message text */
20
- content: string;
21
- /** Unique message identifier */
22
- id?: string;
23
- /** Who wrote it — e.g. "human", "agent", or a specific agent name */
24
- role: string;
25
- /** ISO 8601 timestamp */
26
- timestamp: string;
27
- }
28
- /**
29
- * Bounding box of the annotated element relative to the viewport.
30
- */
31
- interface BoundingBox {
32
- height: number;
33
- width: number;
34
- x: number;
35
- y: number;
36
- }
37
- /**
38
- * Detected framework component information.
39
- */
40
- interface FrameworkContext {
41
- /** Component name */
42
- componentName?: string;
43
- /** Full component stack (e.g. ["App", "Layout", "Header", "Button"]) */
44
- componentStack?: string[];
45
- /** Additional framework-specific data (e.g. props) */
46
- data?: Record<string, unknown>;
47
- /** Framework identifier (react, vue, svelte, etc.) */
48
- framework: string;
49
- /** Source file path */
50
- sourceFile?: string;
51
- /** Source line number */
52
- sourceLine?: number;
53
- }
54
- /**
55
- * Captured accessibility attributes for an element.
56
- */
57
- interface AccessibilityInfo {
58
- /** aria-describedby content */
59
- ariaDescribedBy?: string;
60
- /** aria-label value */
61
- ariaLabel?: string;
62
- /** Whether the element is focusable */
63
- focusable: boolean;
64
- /** ARIA role (explicit or implicit) */
65
- role?: string;
66
- /** tabindex value */
67
- tabindex?: number;
68
- }
69
- /**
70
- * A visual annotation placed on a page element during development.
71
- * Stored in `.devtoolbar/annotations.json`.
72
- */
73
- interface Annotation {
74
- /** Captured accessibility attributes */
75
- accessibility?: AccessibilityInfo;
76
- /** Element bounding box at annotation time */
77
- boundingBox?: BoundingBox;
78
- /** User feedback / description */
79
- comment: string;
80
- /** Key computed CSS properties for forensic context */
81
- computedStyles?: string;
82
- /** ISO 8601 creation timestamp */
83
- createdAt: string;
84
- /** CSS classes on the annotated element (module hashes cleaned) */
85
- cssClasses?: string;
86
- /** Bounding boxes for multi-select annotations */
87
- elementBoundingBoxes?: BoundingBox[];
88
- /** Human-readable element label (e.g. 'button "Submit"') */
89
- elementLabel?: string;
90
- /** CSS selector path to the element */
91
- elementPath?: string;
92
- /** HTML tag name of the annotated element */
93
- elementTag: string;
94
- /** Detected framework component context */
95
- frameworkContext?: FrameworkContext;
96
- /** Full DOM ancestry path (e.g. "body > main > article > p") */
97
- fullPath?: string;
98
- /** Unique identifier (crypto.randomUUID) */
99
- id: string;
100
- /** What the user wants — fix, change, question, or approve */
101
- intent: AnnotationIntent;
102
- /** Whether the element has fixed/sticky positioning */
103
- isFixed?: boolean;
104
- /** Whether this is a multi-select (drag) annotation */
105
- isMultiSelect?: boolean;
106
- /** Sibling elements for spatial context */
107
- nearbyElements?: string;
108
- /** Text near the annotated element for additional context */
109
- nearbyText?: string;
110
- /** ISO 8601 resolution timestamp */
111
- resolvedAt?: string;
112
- /** Who resolved it — "human" or "agent" (or a specific agent name) */
113
- resolvedBy?: string;
114
- /** Path to screenshot file relative to .devtoolbar/ (e.g. "screenshots/&lt;id>.png") */
115
- screenshot?: string;
116
- /** Text the user had selected when annotating */
117
- selectedText?: string;
118
- /** Severity level */
119
- severity: AnnotationSeverity;
120
- /** Source file location from data-vdt-source (file:line:col) */
121
- source?: string;
122
- /** Lifecycle status */
123
- status: AnnotationStatus;
124
- /** Conversation thread (human ↔ AI agent) */
125
- thread?: ThreadMessage[];
126
- /** ISO 8601 last-updated timestamp */
127
- updatedAt: string;
128
- /** Page URL where the annotation was created */
129
- url: string;
130
- /** Click X as percentage of viewport width (0-100) — survives resize */
131
- x: number;
132
- /**
133
- * Click Y as absolute page position (pixels from document top) — survives scroll.
134
- * For fixed/sticky elements, Y is viewport-relative instead.
135
- */
136
- y: number;
137
- }
138
- /**
139
- * Data required to create a new annotation (server-generated fields omitted).
140
- */
141
- type CreateAnnotationData = Omit<Annotation, "createdAt" | "id" | "resolvedAt" | "resolvedBy" | "status" | "thread" | "updatedAt">;
142
- /**
143
- * Fields that can be updated on an existing annotation.
144
- */
145
- interface UpdateAnnotationData {
146
- /** Updated comment text */
147
- comment?: string;
148
- /** Updated intent */
149
- intent?: AnnotationIntent;
150
- /** Who resolved the annotation */
151
- resolvedBy?: string;
152
- /** Updated severity */
153
- severity?: AnnotationSeverity;
154
- /** New status */
155
- status?: AnnotationStatus;
156
- /** Append a thread message */
157
- threadMessage?: ThreadMessage;
158
- }
159
- /**
160
4
  * Severity levels for timeline events.
161
5
  */
162
6
  type TimelineEventLevel = "info" | "warning" | "error";
@@ -293,7 +137,7 @@ interface DevToolbarHook {
293
137
  /**
294
138
  * Global hook declaration
295
139
  */
296
- declare global {
140
+ declare global$1 {
297
141
  interface Window {
298
142
  /**
299
143
  * Dev toolbar hook for library integrations.
@@ -328,6 +172,162 @@ interface TailwindConfigResult {
328
172
  version: "v3" | "v4" | "unknown";
329
173
  }
330
174
  /**
175
+ * Annotation intent — describes what the user wants to communicate.
176
+ */
177
+ type AnnotationIntent = "approve" | "change" | "fix" | "question";
178
+ /**
179
+ * Annotation severity — how urgent or important the annotation is.
180
+ */
181
+ type AnnotationSeverity = "blocking" | "important" | "suggestion";
182
+ /**
183
+ * Annotation status — lifecycle state.
184
+ */
185
+ type AnnotationStatus = "acknowledged" | "dismissed" | "pending" | "resolved";
186
+ /**
187
+ * A single message in a conversation thread attached to an annotation.
188
+ */
189
+ interface ThreadMessage {
190
+ /** Message text */
191
+ content: string;
192
+ /** Unique message identifier */
193
+ id?: string;
194
+ /** Who wrote it — e.g. "human", "agent", or a specific agent name */
195
+ role: string;
196
+ /** ISO 8601 timestamp */
197
+ timestamp: string;
198
+ }
199
+ /**
200
+ * Bounding box of the annotated element relative to the viewport.
201
+ */
202
+ interface BoundingBox {
203
+ height: number;
204
+ width: number;
205
+ x: number;
206
+ y: number;
207
+ }
208
+ /**
209
+ * Detected framework component information.
210
+ */
211
+ interface FrameworkContext {
212
+ /** Component name */
213
+ componentName?: string;
214
+ /** Full component stack (e.g. ["App", "Layout", "Header", "Button"]) */
215
+ componentStack?: string[];
216
+ /** Additional framework-specific data (e.g. props) */
217
+ data?: Record<string, unknown>;
218
+ /** Framework identifier (react, vue, svelte, etc.) */
219
+ framework: string;
220
+ /** Source file path */
221
+ sourceFile?: string;
222
+ /** Source line number */
223
+ sourceLine?: number;
224
+ }
225
+ /**
226
+ * Captured accessibility attributes for an element.
227
+ */
228
+ interface AccessibilityInfo {
229
+ /** aria-describedby content */
230
+ ariaDescribedBy?: string;
231
+ /** aria-label value */
232
+ ariaLabel?: string;
233
+ /** Whether the element is focusable */
234
+ focusable: boolean;
235
+ /** ARIA role (explicit or implicit) */
236
+ role?: string;
237
+ /** tabindex value */
238
+ tabindex?: number;
239
+ }
240
+ /**
241
+ * A visual annotation placed on a page element during development.
242
+ * Stored in `.devtoolbar/annotations.json`.
243
+ */
244
+ interface Annotation {
245
+ /** Captured accessibility attributes */
246
+ accessibility?: AccessibilityInfo;
247
+ /** Element bounding box at annotation time */
248
+ boundingBox?: BoundingBox;
249
+ /** User feedback / description */
250
+ comment: string;
251
+ /** Key computed CSS properties for forensic context */
252
+ computedStyles?: string;
253
+ /** ISO 8601 creation timestamp */
254
+ createdAt: string;
255
+ /** CSS classes on the annotated element (module hashes cleaned) */
256
+ cssClasses?: string;
257
+ /** Bounding boxes for multi-select annotations */
258
+ elementBoundingBoxes?: BoundingBox[];
259
+ /** Human-readable element label (e.g. 'button "Submit"') */
260
+ elementLabel?: string;
261
+ /** CSS selector path to the element */
262
+ elementPath?: string;
263
+ /** HTML tag name of the annotated element */
264
+ elementTag: string;
265
+ /** Detected framework component context */
266
+ frameworkContext?: FrameworkContext;
267
+ /** Full DOM ancestry path (e.g. "body > main > article > p") */
268
+ fullPath?: string;
269
+ /** Unique identifier (crypto.randomUUID) */
270
+ id: string;
271
+ /** What the user wants — fix, change, question, or approve */
272
+ intent: AnnotationIntent;
273
+ /** Whether the element has fixed/sticky positioning */
274
+ isFixed?: boolean;
275
+ /** Whether this is a multi-select (drag) annotation */
276
+ isMultiSelect?: boolean;
277
+ /** Sibling elements for spatial context */
278
+ nearbyElements?: string;
279
+ /** Text near the annotated element for additional context */
280
+ nearbyText?: string;
281
+ /** ISO 8601 resolution timestamp */
282
+ resolvedAt?: string;
283
+ /** Who resolved it — "human" or "agent" (or a specific agent name) */
284
+ resolvedBy?: string;
285
+ /** Path to screenshot file relative to .devtoolbar/ (e.g. "screenshots/&lt;id>.png") */
286
+ screenshot?: string;
287
+ /** Text the user had selected when annotating */
288
+ selectedText?: string;
289
+ /** Severity level */
290
+ severity: AnnotationSeverity;
291
+ /** Source file location from data-vdt-source (file:line:col) */
292
+ source?: string;
293
+ /** Lifecycle status */
294
+ status: AnnotationStatus;
295
+ /** Conversation thread (human ↔ AI agent) */
296
+ thread?: ThreadMessage[];
297
+ /** ISO 8601 last-updated timestamp */
298
+ updatedAt: string;
299
+ /** Page URL where the annotation was created */
300
+ url: string;
301
+ /** Click X as percentage of viewport width (0-100) — survives resize */
302
+ x: number;
303
+ /**
304
+ * Click Y as absolute page position (pixels from document top) — survives scroll.
305
+ * For fixed/sticky elements, Y is viewport-relative instead.
306
+ */
307
+ y: number;
308
+ }
309
+ /**
310
+ * Data required to create a new annotation (server-generated fields omitted).
311
+ */
312
+ type CreateAnnotationData = Omit<Annotation, "createdAt" | "id" | "resolvedAt" | "resolvedBy" | "status" | "thread" | "updatedAt">;
313
+ /**
314
+ * Fields that can be updated on an existing annotation.
315
+ */
316
+ interface UpdateAnnotationData {
317
+ /** Updated comment text */
318
+ comment?: string;
319
+ /** Updated intent */
320
+ intent?: AnnotationIntent;
321
+ /** Who resolved the annotation */
322
+ resolvedBy?: string;
323
+ /** Updated severity */
324
+ severity?: AnnotationSeverity;
325
+ /** New status */
326
+ status?: AnnotationStatus;
327
+ /** Append a thread message */
328
+ threadMessage?: ThreadMessage;
329
+ }
330
+ /**
331
331
  * Server-side RPC functions
332
332
  * These can be called from the client
333
333
  */
@@ -543,4 +543,4 @@ declare global {
543
543
  __VISULIMA_DEVTOOLS__?: VisulimaDevTools;
544
544
  }
545
545
  }
546
- export { AccessibilityInfo as A, BoundingBox as B, ClientFunctions as C, DevToolbarHook as D, FrameworkContext as F, HookEvents as H, ServerFunctions as S, TimelineEvent as T, UpdateAnnotationData as U, VisulimaDevTools as V, ClientRPCContext as a, ServerRPCContext as b, TimelineGroup as c, Annotation as d, AnnotationIntent as e, AnnotationSeverity as f, AnnotationStatus as g, CreateAnnotationData as h, DEFAULT_TIMELINE_GROUPS as i, ThreadMessage as j, TimelineEventLevel as k };
546
+ export { AccessibilityInfo as A, BoundingBox as B, ClientFunctions as C, DevToolbarHook as D, FrameworkContext as F, HookEvents as H, ServerFunctions as S, TimelineEvent as T, UpdateAnnotationData as U, VisulimaDevTools as V, ServerRPCContext as a, ClientRPCContext as b, TimelineGroup as c, Annotation as d, AnnotationIntent as e, AnnotationSeverity as f, AnnotationStatus as g, CreateAnnotationData as h, DEFAULT_TIMELINE_GROUPS as i, ThreadMessage as j, TimelineEventLevel as k };
@@ -0,0 +1 @@
1
+ const e={defaultVisible:!0,placement:"bottom-center",showNotifications:!0},n="__v_dt__settings",s=()=>{if(globalThis.window===void 0)return{...e};try{const t=localStorage.getItem(n);if(t){const o=JSON.parse(t);return{...e,...o}}}catch(t){console.warn("[dev-toolbar] Failed to load settings:",t)}return{...e}},i=t=>{if(globalThis.window!==void 0)try{localStorage.setItem(n,JSON.stringify(t))}catch(o){console.warn("[dev-toolbar] Failed to save settings:",o)}},a=t=>{const o={...s(),...t};return i(o),o};export{s as loadSettings,i as saveSettings,a as updateSettings};
@@ -0,0 +1,39 @@
1
+ import { ViteDevServer } from 'vite';
2
+ import { S as ServerFunctions, a as ServerRPCContext } from "./global-api.d-DeaCvII9.js";
3
+ /**
4
+ * Configuration for the `readFile` RPC endpoint.
5
+ */
6
+ interface ReadFileOptions {
7
+ /**
8
+ * Lower-cased file extensions (without the dot) the `readFile` RPC may return.
9
+ * Defaults to a curated list of source/markup/text formats — set this to widen
10
+ * or narrow the surface. Sensitive formats (`.env`, `.pem`, lockfiles) are not
11
+ * in the default list.
12
+ */
13
+ extensions?: string[];
14
+ }
15
+ /**
16
+ * Options accepted by {@link createServerRPCContext}.
17
+ */
18
+ interface ServerRPCOptions {
19
+ /** Editor to use for "open in editor" functionality. */
20
+ editor?: string;
21
+ /**
22
+ * `readFile` RPC behaviour. Set to `false` to remove the endpoint entirely,
23
+ * or pass an object to customise the allowed extensions.
24
+ * @default { extensions: curated source/text list }
25
+ */
26
+ readFile?: ReadFileOptions | false;
27
+ }
28
+ /**
29
+ * Creates server-side RPC context.
30
+ * @param server Vite dev server instance.
31
+ * @param customFunctions Custom server functions to register.
32
+ * @param options Additional options (e.g. which editor to launch, readFile policy).
33
+ * @param options.editor Editor to use for "open in editor" functionality.
34
+ * @param options.readFile `readFile` RPC policy — `false` disables it, or pass an
35
+ * object to override the allowed extension list.
36
+ * @returns Server RPC context.
37
+ */
38
+ declare const createServerRPCContext: (server: ViteDevServer, customFunctions?: Partial<ServerFunctions>, options?: ServerRPCOptions) => ServerRPCContext;
39
+ export { ReadFileOptions as R, ServerRPCOptions as S, createServerRPCContext as c };