@visulima/dev-toolbar 1.0.20 → 1.1.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/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/dist/apps/assets/index.js +2 -2
- package/dist/apps/inspector/index.js +9 -9
- package/dist/apps/module-graph/index.js +2 -2
- package/dist/apps/performance/index.js +2 -2
- package/dist/apps/seo/index.js +2 -2
- package/dist/apps/tailwind/index.js +4 -4
- package/dist/apps/vite-config/index.js +2 -2
- package/dist/packem_shared/BoolValue-CKN2S4KV.js +1 -0
- package/dist/packem_shared/CodeBlock-DVDIfOgE.js +1 -0
- package/dist/packem_shared/CopyButton-_TtOAEvr.js +1 -0
- package/dist/packem_shared/DisclosureHeader-z3hDqnts.js +1 -0
- package/dist/packem_shared/EmptyState-DMT9PjPE.js +1 -0
- package/dist/packem_shared/HeaderBar-DPwJb8W_.js +1 -0
- package/dist/packem_shared/KeyValue-12PL9nf8.js +1 -0
- package/dist/packem_shared/LoadingState-DQzchtCU.js +1 -0
- package/dist/packem_shared/MessageList-CWE27CLz.js +1 -0
- package/dist/packem_shared/MetaRow-D3xz3WXV.js +1 -0
- package/dist/packem_shared/Note-DN-sxFDq.js +1 -0
- package/dist/packem_shared/PairTable-CIV3iFyG.js +1 -0
- package/dist/packem_shared/Row-BAdM4zwe.js +1 -0
- package/dist/packem_shared/Section-B9rL8rvP.js +1 -0
- package/dist/packem_shared/SerpSnippet-D7Etg0sj.js +1 -0
- package/dist/packem_shared/SocialCard-GEUteejR.js +1 -0
- package/dist/packem_shared/Stack-C_H0Unm4.js +1 -0
- package/dist/packem_shared/StatStrip-DQJPlsQ8.js +1 -0
- package/dist/packem_shared/TabView-BgRrdV2b.js +1 -0
- package/dist/packem_shared/TagCard--5HMFUc1.js +1 -0
- package/dist/packem_shared/Text-DLdg2mRx.js +1 -0
- package/dist/packem_shared/builder-CPG-rrRv.js +1 -0
- package/dist/packem_shared/index-DMbUhqea.js +1 -0
- package/dist/packem_shared/sharedToolbarStylesheet-D6f2SgkO.js +2 -0
- package/dist/packem_shared/useCopy-3LQUaNDI.js +1 -0
- package/dist/toolbar/index.js +3 -3
- package/dist/ui/index.d.ts +258 -3
- package/dist/ui/index.js +1 -1
- package/package.json +18 -18
- package/dist/packem_shared/sharedToolbarStylesheet-DN0y3B5k.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## @visulima/dev-toolbar [1.1.0](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.21...@visulima/dev-toolbar@1.1.0) (2026-09-21)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **dev-toolbar:** render panels from a spec, and test the logic behind them ([#880](https://github.com/visulima/visulima/issues/880)) ([daf8a14](https://github.com/visulima/visulima/commit/daf8a142cb5896203319ea64ba373ac40817481f))
|
|
6
|
+
|
|
7
|
+
## @visulima/dev-toolbar [1.0.21](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.20...@visulima/dev-toolbar@1.0.21) (2026-09-21)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* point every Discord link at the anolilab server ([#858](https://github.com/visulima/visulima/issues/858)) ([4002bfc](https://github.com/visulima/visulima/commit/4002bfcd8d3c748d7008efe208e6aaae7bd18753))
|
|
12
|
+
|
|
1
13
|
## @visulima/dev-toolbar [1.0.20](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.19...@visulima/dev-toolbar@1.0.20) (2026-09-07)
|
|
2
14
|
|
|
3
15
|
## @visulima/dev-toolbar [1.0.19](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.18...@visulima/dev-toolbar@1.0.19) (2026-09-06)
|
package/README.md
CHANGED
|
@@ -361,7 +361,7 @@ The visulima dev-toolbar is open-sourced software licensed under the [MIT][licen
|
|
|
361
361
|
[npm-downloads]: https://www.npmjs.com/package/@visulima/dev-toolbar
|
|
362
362
|
[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
|
|
363
363
|
[prs-welcome]: https://github.com/visulima/visulima/blob/main/.github/CONTRIBUTING.md
|
|
364
|
-
[chat-badge]: https://img.shields.io/discord/
|
|
365
|
-
[chat]: https://discord.gg/
|
|
364
|
+
[chat-badge]: https://img.shields.io/discord/902465130518949899.svg?style=for-the-badge
|
|
365
|
+
[chat]: https://discord.gg/eajEZvk2PG
|
|
366
366
|
[typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
367
367
|
[typescript-url]: https://www.typescriptlang.org/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{addHookName as i}from"preact/devtools";import{clsx as c}from"../../packem_shared/clsx-BGQISBxA.js";import{useState as s,
|
|
1
|
+
import{addHookName as i}from"preact/devtools";import{clsx as c}from"../../packem_shared/clsx-BGQISBxA.js";import{useState as s,useEffect as z}from"preact/hooks";import{f as y}from"../../packem_shared/index-DMbUhqea.js";import{jsx as e,jsxs as o}from"preact/jsx-runtime";import{useCopy as E}from"../../packem_shared/useCopy-3LQUaNDI.js";import I from"../../packem_shared/LoadingState-DQzchtCU.js";import d from"../../packem_shared/Button-C47WESqv.js";import B from"../../packem_shared/Input-ChP0V9d9.js";const R=`<!-- @license lucide-static v1.31.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-folder-open"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -13,4 +13,4 @@ import{addHookName as i}from"preact/devtools";import{clsx as c}from"../../packem
|
|
|
13
13
|
>
|
|
14
14
|
<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />
|
|
15
15
|
</svg>
|
|
16
|
-
`,
|
|
16
|
+
`,k=t=>{if(!t.startsWith("/"))return"#";try{return new URL(t,globalThis.location.origin).origin===globalThis.location.origin?t:"#"}catch{return"#"}},H=[{label:"All",value:"all"},{label:"Images",value:"image"},{label:"Videos",value:"video"},{label:"Audio",value:"audio"},{label:"Fonts",value:"font"},{label:"Text",value:"text"},{label:"Other",value:"other"}],N={audio:"bg-yellow-500/15 text-yellow-400 border-yellow-500/30",font:"bg-orange-500/15 text-orange-400 border-orange-500/30",image:"bg-blue-500/15 text-blue-400 border-blue-500/30",other:"bg-foreground/6 text-muted-foreground border-border",text:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",video:"bg-purple-500/15 text-purple-400 border-purple-500/30"},w=({type:t})=>e("span",{class:c("inline-flex px-1.5 py-0.5 text-[0.6rem] font-mono font-bold uppercase border",N[t]),children:t}),O=({asset:t})=>{const n=k(t.publicPath);if(n!=="#"){if(t.type==="image")return e("div",{class:"flex items-center justify-center bg-foreground/4 border border-border h-32 overflow-hidden",children:e("img",{alt:t.publicPath,class:"max-w-full max-h-full object-contain",onError:u=>{u.target.style.display="none"},src:n})});if(t.type==="video")return e("div",{class:"flex items-center justify-center bg-foreground/4 border border-border h-32 overflow-hidden",children:e("video",{class:"max-w-full max-h-full",preload:"metadata",src:n})});if(t.type==="audio")return e("div",{class:"flex items-center justify-center bg-foreground/4 border border-border h-14 px-2",children:e("audio",{class:"w-full",controls:!0,preload:"none",src:n})})}},_=({helpers:t})=>{const[n,u]=i(s([]),"assets"),[P,p]=i(s(!0),"loading"),[m,x]=i(s(void 0),"error"),[g,C]=i(s(""),"search"),[a,A]=i(s("all"),"typeFilter"),[l,f]=i(s(void 0),"selected"),{copied:j,copy:S}=E(),b=()=>{p(!0),x(void 0),f(void 0),t.rpc.getStaticAssets().then(r=>{u(r),p(!1)}).catch(r=>{x(r.message??"Failed to load assets"),p(!1)})};z(()=>{b()},[]);const h=n.filter(r=>{const v=g.toLowerCase(),L=!v||r.publicPath.toLowerCase().includes(v),F=a==="all"||r.type===a;return L&&F}),T=r=>{S(r.publicPath)};return P?e(I,{label:"Scanning assets…"}):m?o("div",{class:"flex flex-col items-center justify-center h-full gap-3 p-8 text-center",children:[e("p",{class:"text-[0.8rem] text-destructive",children:m}),e(d,{onClick:b,size:"sm",variant:"outline",children:"Retry"})]}):o("div",{class:"flex flex-col h-full",children:[o("div",{class:"flex items-center gap-2 px-4 py-2.5 border-b border-border shrink-0 flex-wrap",children:[e(B,{class:"flex-1 min-w-32 bg-foreground/4 font-mono text-[0.8rem] placeholder:text-muted-foreground/50 focus-visible:border-primary/50 border-border",onInput:r=>{C(r.target.value)},placeholder:"Filter assets…",type:"text",value:g}),o("span",{class:"text-[0.7rem] text-muted-foreground shrink-0",children:[h.length," / ",n.length]}),e(d,{onClick:b,size:"sm",variant:"outline",children:"Refresh"})]}),e("div",{"aria-label":"Filter by type",class:"flex items-center gap-1.5 px-4 py-2 border-b border-border shrink-0 flex-wrap",role:"group",children:H.map(r=>e("button",{"aria-pressed":a===r.value,class:c("px-2.5 py-0.5 text-[0.7rem] font-medium border cursor-pointer transition-colors duration-100",a===r.value?"bg-primary/15 text-primary border-primary/30":"bg-foreground/4 text-muted-foreground border-border hover:bg-foreground/8 hover:text-foreground"),onClick:()=>{A(r.value)},type:"button",children:r.label},r.value))}),o("div",{class:"flex flex-1 min-h-0 overflow-hidden",children:[e("div",{class:"flex-1 overflow-auto divide-y divide-border/30",role:"list",children:h.length===0?e("div",{class:"flex items-center justify-center p-8 text-[0.8rem] text-muted-foreground",children:n.length===0?"No assets found in public directory.":"No assets match the current filter."}):h.map(r=>o("button",{"aria-label":r.publicPath,"aria-selected":l?.publicPath===r.publicPath,class:c("w-full flex items-center gap-3 px-4 py-2.5 text-left border-0 bg-transparent cursor-pointer","hover:bg-foreground/4 transition-colors duration-100",l?.publicPath===r.publicPath&&"bg-primary/6"),onClick:()=>{f(l?.publicPath===r.publicPath?void 0:r)},role:"option",type:"button",children:[e(w,{type:r.type}),e("span",{class:"flex-1 text-[0.775rem] font-mono text-foreground/80 truncate min-w-0",children:r.publicPath}),e("span",{class:"shrink-0 text-[0.65rem] text-muted-foreground",children:y(r.size)})]},r.publicPath))}),l&&o("div",{class:"border-l border-border bg-background w-72 shrink-0 flex flex-col overflow-hidden",children:[o("div",{class:"flex items-center justify-between gap-2 px-4 py-3 border-b border-border shrink-0",children:[e("span",{class:"text-[0.7rem] font-semibold text-foreground uppercase tracking-wide",children:"Asset Info"}),e(d,{"aria-label":"Close",class:"h-6 w-6 text-xs",onClick:()=>{f(void 0)},size:"icon",variant:"ghost",children:"✕"})]}),o("div",{class:"flex-1 overflow-auto p-4 space-y-4",children:[e(O,{asset:l}),o("div",{children:[e("div",{class:"text-[0.6rem] uppercase tracking-wider text-muted-foreground mb-1",children:"Path"}),e("code",{class:"text-[0.7rem] font-mono text-foreground/80 break-all",children:l.publicPath})]}),o("div",{children:[e("div",{class:"text-[0.6rem] uppercase tracking-wider text-muted-foreground mb-1",children:"Type"}),e(w,{type:l.type})]}),o("div",{children:[e("div",{class:"text-[0.6rem] uppercase tracking-wider text-muted-foreground mb-1",children:"Size"}),e("span",{class:"text-[0.8rem] font-mono text-foreground",children:y(l.size)})]}),o("div",{children:[e("div",{class:"text-[0.6rem] uppercase tracking-wider text-muted-foreground mb-1",children:"Last Modified"}),e("span",{class:"text-[0.75rem] text-foreground/80",children:new Date(l.mtime).toLocaleString()})]}),o("div",{class:"flex flex-col gap-2 pt-1",children:[e(d,{class:"w-full text-[0.75rem]",onClick:()=>{T(l)},size:"sm",variant:"outline",children:j?"Copied!":"Copy URL"}),e("a",{class:c("w-full text-[0.75rem] inline-flex items-center justify-center","px-3 py-1.5 border border-border bg-transparent","text-foreground hover:bg-foreground/6 transition-colors duration-100"),href:k(l.publicPath),rel:"noopener noreferrer",target:"_blank",children:"Open in browser"})]})]})]})]})]})},K={component:_,icon:R,id:"dev-toolbar:assets",name:"Assets"};export{K as default};
|