@visulima/dev-toolbar 1.0.0-alpha.8 → 1.0.0-alpha.9
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 +8 -0
- package/dist/apps/a11y/index.js +1 -1
- package/dist/apps/annotations/index.js +1 -1
- package/dist/apps/assets/index.js +1 -1
- package/dist/apps/inspector/index.js +1 -1
- package/dist/apps/module-graph/index.js +1 -1
- package/dist/apps/performance/index.js +1 -1
- package/dist/apps/seo/index.js +1 -1
- package/dist/apps/settings/index.js +1 -1
- package/dist/apps/timeline/index.js +1 -1
- package/dist/apps/vite-config/index.js +1 -1
- package/dist/packem_shared/Select-DgQ4ss-s.js +1 -0
- package/dist/ui/index.js +1 -1
- package/package.json +1 -2
- package/dist/packem_shared/Select-eaUIfvFb.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## @visulima/dev-toolbar [1.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.0-alpha.8...@visulima/dev-toolbar@1.0.0-alpha.9) (2026-04-15)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **dev-toolbar:** add missing DOM property types and tighten getOptionValue fallback ([55326d0](https://github.com/visulima/visulima/commit/55326d02b173211608aefa994aa0e5f54705120d))
|
|
6
|
+
* **dev-toolbar:** replace bogus .toBe(true) assertions with proper matchers ([e672ca4](https://github.com/visulima/visulima/commit/e672ca459bf8d3e9141e277755bc35f2b59dac07))
|
|
7
|
+
* **error-debugging:** resolve eslint and type-safety issues ([886dbff](https://github.com/visulima/visulima/commit/886dbffe3f744c9493fcc54e781de3fd21eebf78))
|
|
8
|
+
|
|
1
9
|
## @visulima/dev-toolbar [1.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.0-alpha.7...@visulima/dev-toolbar@1.0.0-alpha.8) (2026-04-08)
|
|
2
10
|
|
|
3
11
|
### Bug Fixes
|
package/dist/apps/a11y/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var X=Object.defineProperty;var O=(a,e)=>X(a,"name",{value:e,configurable:!0});import{addHookName as k}from"preact/devtools";import{clsx as d}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as C,useEffect as L}from"preact/hooks";import{jsxs as i,jsx as t,Fragment as W}from"preact/jsx-runtime";import w from"../../packem_shared/Button-Bkx66Co7.js";import{Alert as Y,AlertDescription as Z}from"../../packem_shared/Alert-D2CvX4fw.js";const ee=`<!-- @license lucide-static v1.
|
|
1
|
+
var X=Object.defineProperty;var O=(a,e)=>X(a,"name",{value:e,configurable:!0});import{addHookName as k}from"preact/devtools";import{clsx as d}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as C,useEffect as L}from"preact/hooks";import{jsxs as i,jsx as t,Fragment as W}from"preact/jsx-runtime";import w from"../../packem_shared/Button-Bkx66Co7.js";import{Alert as Y,AlertDescription as Z}from"../../packem_shared/Alert-D2CvX4fw.js";const ee=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-accessibility"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var j=Object.defineProperty;var z=(t,s)=>j(t,"name",{value:s,configurable:!0});import{addHookName as c}from"preact/devtools";import{clsx as h}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as p,useCallback as S,useEffect as q}from"preact/hooks";import{s as Q,M as H,l as K}from"../../packem_shared/annotation-settings-Bv0TH4WI.js";import{jsx as e,jsxs as r}from"preact/jsx-runtime";import g from"../../packem_shared/Button-Bkx66Co7.js";import U from"../../packem_shared/Textarea-Yfg3dLZi.js";const V=`<!-- @license lucide-static v1.
|
|
1
|
+
var j=Object.defineProperty;var z=(t,s)=>j(t,"name",{value:s,configurable:!0});import{addHookName as c}from"preact/devtools";import{clsx as h}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as p,useCallback as S,useEffect as q}from"preact/hooks";import{s as Q,M as H,l as K}from"../../packem_shared/annotation-settings-Bv0TH4WI.js";import{jsx as e,jsxs as r}from"preact/jsx-runtime";import g from"../../packem_shared/Button-Bkx66Co7.js";import U from"../../packem_shared/Textarea-Yfg3dLZi.js";const V=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-message-square-plus"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var B=Object.defineProperty;var P=(t,i)=>B(t,"name",{value:i,configurable:!0});import{addHookName as a}from"preact/devtools";import{clsx as u}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as s,useRef as N,useEffect as C}from"preact/hooks";import{jsx as e,jsxs as l}from"preact/jsx-runtime";import c from"../../packem_shared/Button-Bkx66Co7.js";import E from"../../packem_shared/Input-Cs6aduTi.js";const H=`<!-- @license lucide-static v1.
|
|
1
|
+
var B=Object.defineProperty;var P=(t,i)=>B(t,"name",{value:i,configurable:!0});import{addHookName as a}from"preact/devtools";import{clsx as u}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as s,useRef as N,useEffect as C}from"preact/hooks";import{jsx as e,jsxs as l}from"preact/jsx-runtime";import c from"../../packem_shared/Button-Bkx66Co7.js";import E from"../../packem_shared/Input-Cs6aduTi.js";const H=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-folder-open"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Bn=Object.defineProperty;var ae=(e,t)=>Bn(e,"name",{value:t,configurable:!0});import{l as _t,g as Gt}from"../../packem_shared/annotation-settings-Bv0TH4WI.js";import{b as Mn}from"../../packem_shared/use-frame-state-CxrlPUM5.js";const zn=`<!-- @license lucide-static v1.
|
|
1
|
+
var Bn=Object.defineProperty;var ae=(e,t)=>Bn(e,"name",{value:t,configurable:!0});import{l as _t,g as Gt}from"../../packem_shared/annotation-settings-Bv0TH4WI.js";import{b as Mn}from"../../packem_shared/use-frame-state-CxrlPUM5.js";const zn=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-inspect"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var U=Object.defineProperty;var k=(o,d)=>U(o,"name",{value:d,configurable:!0});import{addHookName as i}from"preact/devtools";import{clsx as j}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as s,useRef as E,useEffect as S}from"preact/hooks";import{jsx as r,jsxs as t}from"preact/jsx-runtime";import b from"../../packem_shared/Button-Bkx66Co7.js";import A from"../../packem_shared/Input-Cs6aduTi.js";const G=`<!-- @license lucide-static v1.
|
|
1
|
+
var U=Object.defineProperty;var k=(o,d)=>U(o,"name",{value:d,configurable:!0});import{addHookName as i}from"preact/devtools";import{clsx as j}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as s,useRef as E,useEffect as S}from"preact/hooks";import{jsx as r,jsxs as t}from"preact/jsx-runtime";import b from"../../packem_shared/Button-Bkx66Co7.js";import A from"../../packem_shared/Input-Cs6aduTi.js";const G=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-network"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var j=Object.defineProperty;var f=(t,e)=>j(t,"name",{value:e,configurable:!0});import{addHookName as w}from"preact/devtools";import{clsx as c}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as C,useRef as F,useEffect as H}from"preact/hooks";import{jsx as r,jsxs as i}from"preact/jsx-runtime";const L=`<!-- @license lucide-static v1.
|
|
1
|
+
var j=Object.defineProperty;var f=(t,e)=>j(t,"name",{value:e,configurable:!0});import{addHookName as w}from"preact/devtools";import{clsx as c}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as C,useRef as F,useEffect as H}from"preact/hooks";import{jsx as r,jsxs as i}from"preact/jsx-runtime";const L=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-gauge"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
package/dist/apps/seo/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var G=Object.defineProperty;var P=(r,e)=>G(r,"name",{value:e,configurable:!0});import{addHookName as b}from"preact/devtools";import{clsx as y}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as v,useRef as H,useEffect as W}from"preact/hooks";import{jsxs as n,jsx as t,Fragment as E}from"preact/jsx-runtime";import B from"../../packem_shared/Button-Bkx66Co7.js";import K from"../../packem_shared/Badge-BEgU04nl.js";const Q=`<!-- @license lucide-static v1.
|
|
1
|
+
var G=Object.defineProperty;var P=(r,e)=>G(r,"name",{value:e,configurable:!0});import{addHookName as b}from"preact/devtools";import{clsx as y}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as v,useRef as H,useEffect as W}from"preact/hooks";import{jsxs as n,jsx as t,Fragment as E}from"preact/jsx-runtime";import B from"../../packem_shared/Button-Bkx66Co7.js";import K from"../../packem_shared/Badge-BEgU04nl.js";const Q=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-search"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var A=Object.defineProperty;var C=(t,l)=>A(t,"name",{value:l,configurable:!0});import{addHookName as x}from"preact/devtools";import{clsx as g}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as T,useRef as M,useEffect as j}from"preact/hooks";import{h as O,r as c}from"../../packem_shared/use-frame-state-CxrlPUM5.js";import{_ as P}from"../../packem_shared/use-theme-zpm4zmqP.js";import v from"../../packem_shared/Icon-B6UHkC0o.js";import{Select as y,SelectTrigger as w,SelectValue as E,SelectContent as F,SelectItem as S,useSelectContext as I}from"../../packem_shared/Select-
|
|
1
|
+
var A=Object.defineProperty;var C=(t,l)=>A(t,"name",{value:l,configurable:!0});import{addHookName as x}from"preact/devtools";import{clsx as g}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as T,useRef as M,useEffect as j}from"preact/hooks";import{h as O,r as c}from"../../packem_shared/use-frame-state-CxrlPUM5.js";import{_ as P}from"../../packem_shared/use-theme-zpm4zmqP.js";import v from"../../packem_shared/Icon-B6UHkC0o.js";import{Select as y,SelectTrigger as w,SelectValue as E,SelectContent as F,SelectItem as S,useSelectContext as I}from"../../packem_shared/Select-DgQ4ss-s.js";import{jsxs as r,jsx as e,Fragment as N}from"preact/jsx-runtime";import p from"../../packem_shared/Button-Bkx66Co7.js";const R=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-settings"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var R=Object.defineProperty;var x=(e,t)=>R(e,"name",{value:t,configurable:!0});import{m as y,D as L}from"../../packem_shared/store-DaUtLjf3.js";import{addHookName as b}from"preact/devtools";import{clsx as C}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as w,useRef as z,useEffect as I}from"preact/hooks";import{jsx as i,jsxs as l}from"preact/jsx-runtime";import A from"../../packem_shared/Badge-BEgU04nl.js";import D from"../../packem_shared/Button-Bkx66Co7.js";var N=Object.defineProperty,T=x((e,t)=>N(e,"name",{value:t,configurable:!0}),"d");const j="__visulima_timeline_capture__",f=T(e=>`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,"generateId"),O=T(e=>e.startsWith("/@")||e.includes("/__vite")||e.includes("__visulima-dev-toolbar")||e.startsWith("data:")||e.startsWith("blob:"),"isViteInternalUrl"),P=T(()=>{if(globalThis[j])return;globalThis[j]=!0;const e=y();if(import.meta.hot&&(import.meta.hot.on("vite:beforeUpdate",t=>{const n=t,o=n.updates?.map(h=>h.path).join(", ")??"";e.addEvent("hmr",{data:{updates:n.updates},id:f("hmr"),level:"info",subtitle:o||void 0,time:Date.now(),title:"HMR Update"})}),import.meta.hot.on("vite:beforeFullReload",t=>{const n=t;e.addEvent("hmr",{id:f("hmr-reload"),level:"warning",subtitle:n.path??void 0,time:Date.now(),title:"Full Reload"})}),import.meta.hot.on("vite:error",t=>{const n=t,{err:o}=n;e.addEvent("errors",{data:o?{loc:o.loc,message:o.message,plugin:o.plugin,stack:o.stack}:void 0,id:f("vite-err"),level:"error",subtitle:o?.message??"Unknown error",time:Date.now(),title:"Vite Error"})})),globalThis.window!==void 0&&typeof globalThis.fetch=="function"){const t=globalThis.fetch.bind(globalThis);globalThis.fetch=async(...n)=>{const o=n[0],h=n[1],v=o instanceof URL?o.href:o.url,s=typeof o=="string"?o:v,c=(h?.method??(o instanceof Request?o.method:"GET")).toUpperCase();if(O(s))return t(...n);const u=Date.now();try{const a=await t(...n),p=Date.now()-u;return e.addEvent("network",{data:{method:c,status:a.status,statusText:a.statusText,url:s},duration:p,id:f("net"),level:a.ok?"info":"warning",subtitle:`${a.status} ${a.statusText}`,time:u,title:`${c} ${s}`}),a}catch(a){const p=Date.now()-u,g=a instanceof Error?a.message:"Network error";throw e.addEvent("network",{data:{error:g,method:c,url:s},duration:p,id:f("net-err"),level:"error",subtitle:g,time:u,title:`${c} ${s}`}),a}}}globalThis.window!==void 0&&(globalThis.addEventListener("error",t=>{t.filename?.includes("visulima-dev-toolbar")||e.addEvent("errors",{data:{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message},id:f("err"),level:"error",subtitle:t.filename?`${t.filename}:${t.lineno}:${t.colno}`:void 0,time:Date.now(),title:t.message||"JavaScript Error"})}),globalThis.addEventListener("unhandledrejection",t=>{const{reason:n}=t,o=n instanceof Error?n.message:String(n??"Unhandled promise rejection");e.addEvent("errors",{data:{reason:String(n)},id:f("rej"),level:"error",subtitle:o,time:Date.now(),title:"Unhandled Promise Rejection"})}))},"startTimelineCapture"),B=`<!-- @license lucide-static v1.
|
|
1
|
+
var R=Object.defineProperty;var x=(e,t)=>R(e,"name",{value:t,configurable:!0});import{m as y,D as L}from"../../packem_shared/store-DaUtLjf3.js";import{addHookName as b}from"preact/devtools";import{clsx as C}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as w,useRef as z,useEffect as I}from"preact/hooks";import{jsx as i,jsxs as l}from"preact/jsx-runtime";import A from"../../packem_shared/Badge-BEgU04nl.js";import D from"../../packem_shared/Button-Bkx66Co7.js";var N=Object.defineProperty,T=x((e,t)=>N(e,"name",{value:t,configurable:!0}),"d");const j="__visulima_timeline_capture__",f=T(e=>`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,"generateId"),O=T(e=>e.startsWith("/@")||e.includes("/__vite")||e.includes("__visulima-dev-toolbar")||e.startsWith("data:")||e.startsWith("blob:"),"isViteInternalUrl"),P=T(()=>{if(globalThis[j])return;globalThis[j]=!0;const e=y();if(import.meta.hot&&(import.meta.hot.on("vite:beforeUpdate",t=>{const n=t,o=n.updates?.map(h=>h.path).join(", ")??"";e.addEvent("hmr",{data:{updates:n.updates},id:f("hmr"),level:"info",subtitle:o||void 0,time:Date.now(),title:"HMR Update"})}),import.meta.hot.on("vite:beforeFullReload",t=>{const n=t;e.addEvent("hmr",{id:f("hmr-reload"),level:"warning",subtitle:n.path??void 0,time:Date.now(),title:"Full Reload"})}),import.meta.hot.on("vite:error",t=>{const n=t,{err:o}=n;e.addEvent("errors",{data:o?{loc:o.loc,message:o.message,plugin:o.plugin,stack:o.stack}:void 0,id:f("vite-err"),level:"error",subtitle:o?.message??"Unknown error",time:Date.now(),title:"Vite Error"})})),globalThis.window!==void 0&&typeof globalThis.fetch=="function"){const t=globalThis.fetch.bind(globalThis);globalThis.fetch=async(...n)=>{const o=n[0],h=n[1],v=o instanceof URL?o.href:o.url,s=typeof o=="string"?o:v,c=(h?.method??(o instanceof Request?o.method:"GET")).toUpperCase();if(O(s))return t(...n);const u=Date.now();try{const a=await t(...n),p=Date.now()-u;return e.addEvent("network",{data:{method:c,status:a.status,statusText:a.statusText,url:s},duration:p,id:f("net"),level:a.ok?"info":"warning",subtitle:`${a.status} ${a.statusText}`,time:u,title:`${c} ${s}`}),a}catch(a){const p=Date.now()-u,g=a instanceof Error?a.message:"Network error";throw e.addEvent("network",{data:{error:g,method:c,url:s},duration:p,id:f("net-err"),level:"error",subtitle:g,time:u,title:`${c} ${s}`}),a}}}globalThis.window!==void 0&&(globalThis.addEventListener("error",t=>{t.filename?.includes("visulima-dev-toolbar")||e.addEvent("errors",{data:{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message},id:f("err"),level:"error",subtitle:t.filename?`${t.filename}:${t.lineno}:${t.colno}`:void 0,time:Date.now(),title:t.message||"JavaScript Error"})}),globalThis.addEventListener("unhandledrejection",t=>{const{reason:n}=t,o=n instanceof Error?n.message:String(n??"Unhandled promise rejection");e.addEvent("errors",{data:{reason:String(n)},id:f("rej"),level:"error",subtitle:o,time:Date.now(),title:"Unhandled Promise Rejection"})}))},"startTimelineCapture"),B=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-gantt-chart"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var O=Object.defineProperty;var F=(t,e)=>O(t,"name",{value:e,configurable:!0});import{addHookName as p}from"preact/devtools";import{clsx as m}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as x,useRef as $,useEffect as P}from"preact/hooks";import k from"../../packem_shared/Icon-B6UHkC0o.js";import{jsxs as l,jsx as r}from"preact/jsx-runtime";import R from"../../packem_shared/Button-Bkx66Co7.js";import L from"../../packem_shared/Input-Cs6aduTi.js";import{Tooltip as B,TooltipTrigger as M,TooltipContent as I}from"../../packem_shared/Tooltip-CioncSXj.js";import D from"../../packem_shared/Badge-BEgU04nl.js";import{Tabs as N,TabsList as H,TabsTrigger as J,TabsContent as v}from"../../packem_shared/Tabs-DKWMiawt.js";const K=`<!-- @license lucide-static v1.
|
|
1
|
+
var O=Object.defineProperty;var F=(t,e)=>O(t,"name",{value:e,configurable:!0});import{addHookName as p}from"preact/devtools";import{clsx as m}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as x,useRef as $,useEffect as P}from"preact/hooks";import k from"../../packem_shared/Icon-B6UHkC0o.js";import{jsxs as l,jsx as r}from"preact/jsx-runtime";import R from"../../packem_shared/Button-Bkx66Co7.js";import L from"../../packem_shared/Input-Cs6aduTi.js";import{Tooltip as B,TooltipTrigger as M,TooltipContent as I}from"../../packem_shared/Tooltip-CioncSXj.js";import D from"../../packem_shared/Badge-BEgU04nl.js";import{Tabs as N,TabsList as H,TabsTrigger as J,TabsContent as v}from"../../packem_shared/Tabs-DKWMiawt.js";const K=`<!-- @license lucide-static v1.8.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-zap"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var X=Object.defineProperty;var q=(e,l)=>X(e,"name",{value:l,configurable:!0});import{addHookName as u}from"preact/devtools";import{computePosition as F,offset as G,flip as Q,shift as Y}from"@floating-ui/dom";import{clsx as k}from"./clsx-wGlvpUfw.js";import{createContext as Z}from"preact";import{useState as w,useRef as S,useCallback as _,useEffect as C,useMemo as ee,useContext as te}from"preact/hooks";import{jsx as f,jsxs as T}from"preact/jsx-runtime";var re=Object.defineProperty,n=q((e,l)=>re(e,"name",{value:l,configurable:!0}),"r");const U=Z(void 0),D=n(()=>{const e=te(U);if(!e)throw new Error("Select subcomponent must be used within <Select>");return e},"useSelectContext");let K=0;const de=n(({children:e,onValueChange:l,value:o=""})=>{const[t,a]=u(w(!1),"open"),[d,c]=u(w(""),"search"),[g,r]=u(w(null),"highlightedValue"),x=u(S(null),"triggerRef"),[m]=u(w(()=>(K+=1,`select-${K}`)),"instanceId"),v=_(i=>{l?.(i),a(!1),c("")},[l]);C(()=>{t||(c(""),r(null))},[t]);const R=u(ee(()=>({highlightedValue:g,instanceId:m,onSelect:v,open:t,search:d,setHighlightedValue:r,setOpen:a,setSearch:c,triggerRef:x,value:o}),[g,m,v,t,d,o]),"contextValue");return f(U.Provider,{value:R,children:f("span",{style:{display:"contents"},children:e})})},"Select"),fe=n(({children:e,class:l,...o})=>{const{open:t,setOpen:a,triggerRef:d}=D();return T("button",{"aria-expanded":t,"aria-haspopup":"listbox",class:k("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",l),onClick:n(()=>{a(!t)},"onClick"),ref:n(c=>{d.current=c},"ref"),type:"button",...o,children:[e,f("svg",{"aria-hidden":"true",class:k("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:f("path",{d:"m6 9 6 6 6-6"})})]})},"SelectTrigger"),pe=n(({class:e,options:l,placeholder:o="Select…"})=>{const{value:t}=D(),a=l.find(d=>d.value===t);return f("span",{class:k("truncate",!a&&"text-muted-foreground",e),children:a?a.label:o})},"SelectValue"),ne=n(e=>[...e.querySelectorAll("[role='option']:not([aria-disabled='true'])")],"getOptionElements"),N=n(e=>e.dataset.value??null,"getOptionValue"),he=n(({align:e="start",children:l,class:o,searchable:t=!1,side:a="bottom",sideOffset:d=4})=>{const{highlightedValue:c,instanceId:g,open:r,search:x,setHighlightedValue:m,setOpen:v,setSearch:R,triggerRef:i}=D(),y=u(S(null),"contentRef"),O=u(S(null),"searchInputRef"),I=u(S(null),"listRef"),[j,J]=u(w({x:0,y:0}),"position"),[W,L]=u(w(!1),"ready"),A=u(S(c),"highlightedRef");if(A.current=c,C(()=>{if(!r||!i.current||!y.current){L(!1);return}let p=!1;const s=e==="center"?a:`${a}-${e}`;return F(i.current,y.current,{middleware:[G(d),Q(),Y({padding:4})],placement:s}).then(h=>(p||(J({x:h.x,y:h.y}),L(!0)),h)).catch(()=>{}),()=>{p=!0}},[r,a,d,e,i]),C(()=>{r&&(t&&O.current?O.current.focus():I.current&&I.current.focus())},[r,t]),C(()=>{if(!r)return;const p=n(s=>{if(y.current&&!y.current.contains(s.target)){const h=i.current;if(h&&h.contains(s.target))return;v(!1)}},"handleMouseDown");return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[r,v,i]),C(()=>{if(!r)return;const p=n(s=>{const h=I.current;if(!h)return;const E=ne(h),V=E.length;if(V===0){s.key==="Escape"&&(s.preventDefault(),v(!1),i.current?.focus());return}const z=A.current,b=z===null?-1:E.findIndex(M=>N(M)===z),$=n(M=>{const H=E[M];if(H){const P=N(H);P!==null&&m(P),H.scrollIntoView?.({block:"nearest"})}},"highlightByIndex");switch(s.key){case"ArrowDown":{s.preventDefault(),$(b<V-1?b+1:0);break}case"ArrowUp":{s.preventDefault(),$(b>0?b-1:V-1);break}case"End":{s.preventDefault(),$(V-1);break}case"Enter":{s.preventDefault(),b>=0&&E[b]?.click();break}case"Escape":case"Tab":{s.preventDefault(),v(!1),i.current?.focus();break}case"Home":{s.preventDefault(),$(0);break}}},"handleKeyDown");return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r,m,v,i]),!r)return;const B=c===null?void 0:`${g}-option-${c}`;return T("div",{class:k("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",!W&&"invisible",o),ref:y,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&&f("div",{class:"border-b border-border p-1.5",children:f("input",{"aria-activedescendant":B,"aria-controls":`${g}-listbox`,"aria-label":"Search options",class:k("w-full bg-transparent text-[0.75rem] text-foreground placeholder:text-muted-foreground","px-1.5 py-1 border-0 outline-none"),onInput:n(p=>{R(p.currentTarget.value),m(null)},"onInput"),placeholder:"Search…",ref:O,role:"combobox",type:"text",value:x})}),f("div",{...!t&&{"aria-activedescendant":B,tabIndex:0},class:"max-h-[min(300px,var(--available-height,300px))] overflow-y-auto scrollbar-thin-border p-1",id:`${g}-listbox`,ref:I,role:"listbox",children:l})]})},"SelectContent"),ge=n(({children:e,class:l,value:o})=>{const{highlightedValue:t,instanceId:a,onSelect:d,setHighlightedValue:c,value:g}=D(),r=g===o,x=t===o,m=`${a}-option-${o}`;return T("div",{"aria-selected":r,class:k("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",l),"data-value":o,id:m,onClick:n(()=>{d(o)},"onClick"),onMouseEnter:n(()=>{c(o)},"onMouseEnter"),role:"option",children:[f("span",{class:"flex-1 truncate",children:e}),r&&f("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:f("path",{d:"M20 6 9 17l-5-5"})})]})},"SelectItem");export{de as Select,he as SelectContent,ge as SelectItem,fe as SelectTrigger,pe as SelectValue,D as useSelectContext};
|
package/dist/ui/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Alert as o,AlertDescription as r,AlertTitle as a}from"../packem_shared/Alert-D2CvX4fw.js";import{default as p}from"../packem_shared/Badge-BEgU04nl.js";import{default as s}from"../packem_shared/Button-Bkx66Co7.js";import{Card as d,CardContent as m,CardDescription as n,CardFooter as i,CardHeader as u,CardTitle as T}from"../packem_shared/Card-CJa4vHVc.js";import{default as c}from"../packem_shared/Icon-B6UHkC0o.js";import{default as S}from"../packem_shared/Input-Cs6aduTi.js";import{default as P}from"../packem_shared/Label-DyCng4Cp.js";import{Popover as A,PopoverClose as I,PopoverContent as B,PopoverTrigger as D}from"../packem_shared/Popover-BtFVaZYg.js";import{default as h}from"../packem_shared/Progress-DN6zn-0l.js";import{Select as w,SelectContent as F,SelectItem as H,SelectTrigger as V,SelectValue as j,useSelectContext as q}from"../packem_shared/Select-
|
|
1
|
+
import{Alert as o,AlertDescription as r,AlertTitle as a}from"../packem_shared/Alert-D2CvX4fw.js";import{default as p}from"../packem_shared/Badge-BEgU04nl.js";import{default as s}from"../packem_shared/Button-Bkx66Co7.js";import{Card as d,CardContent as m,CardDescription as n,CardFooter as i,CardHeader as u,CardTitle as T}from"../packem_shared/Card-CJa4vHVc.js";import{default as c}from"../packem_shared/Icon-B6UHkC0o.js";import{default as S}from"../packem_shared/Input-Cs6aduTi.js";import{default as P}from"../packem_shared/Label-DyCng4Cp.js";import{Popover as A,PopoverClose as I,PopoverContent as B,PopoverTrigger as D}from"../packem_shared/Popover-BtFVaZYg.js";import{default as h}from"../packem_shared/Progress-DN6zn-0l.js";import{Select as w,SelectContent as F,SelectItem as H,SelectTrigger as V,SelectValue as j,useSelectContext as q}from"../packem_shared/Select-DgQ4ss-s.js";import{default as z}from"../packem_shared/Separator-D38mKeZv.js";import{default as G}from"../packem_shared/Skeleton-Dv-tcA1P.js";import{default as K}from"../packem_shared/Switch-C3NTpeoR.js";import{Tabs as N,TabsContent as O,TabsList as Q,TabsTrigger as R}from"../packem_shared/Tabs-DKWMiawt.js";import{default as W}from"../packem_shared/Textarea-Yfg3dLZi.js";import{Tooltip as Y,TooltipContent as Z,TooltipTrigger as _}from"../packem_shared/Tooltip-CioncSXj.js";import{clsx as ee}from"../packem_shared/clsx-wGlvpUfw.js";export{o as Alert,r as AlertDescription,a as AlertTitle,p as Badge,s as Button,d as Card,m as CardContent,n as CardDescription,i as CardFooter,u as CardHeader,T as CardTitle,c as Icon,S as Input,P as Label,A as Popover,I as PopoverClose,B as PopoverContent,D as PopoverTrigger,h as Progress,w as Select,F as SelectContent,H as SelectItem,V as SelectTrigger,j as SelectValue,z as Separator,G as Skeleton,K as Switch,N as Tabs,O as TabsContent,Q as TabsList,R as TabsTrigger,W as Textarea,Y as Tooltip,Z as TooltipContent,_ as TooltipTrigger,ee as clsx,q as useSelectContext};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/dev-toolbar",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.9",
|
|
4
4
|
"description": "Devtools is a set of tools for building advanced devtools for your application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visulima",
|
|
@@ -137,7 +137,6 @@
|
|
|
137
137
|
"optional": true
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
|
-
"optionalDependencies": {},
|
|
141
140
|
"engines": {
|
|
142
141
|
"node": ">=22.21"
|
|
143
142
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var X=Object.defineProperty;var q=(e,a)=>X(e,"name",{value:a,configurable:!0});import{addHookName as u}from"preact/devtools";import{computePosition as F,offset as G,flip as Q,shift as Y}from"@floating-ui/dom";import{clsx as k}from"./clsx-wGlvpUfw.js";import{createContext as Z}from"preact";import{useState as w,useRef as S,useCallback as _,useEffect as C,useMemo as ee,useContext as te}from"preact/hooks";import{jsx as f,jsxs as T}from"preact/jsx-runtime";var re=Object.defineProperty,n=q((e,a)=>re(e,"name",{value:a,configurable:!0}),"r");const U=Z(void 0),D=n(()=>{const e=te(U);if(!e)throw new Error("Select subcomponent must be used within <Select>");return e},"useSelectContext");let K=0;const de=n(({children:e,onValueChange:a,value:o=""})=>{const[t,l]=u(w(!1),"open"),[d,c]=u(w(""),"search"),[g,r]=u(w(null),"highlightedValue"),x=u(S(null),"triggerRef"),[m]=u(w(()=>(K+=1,`select-${K}`)),"instanceId"),v=_(i=>{a?.(i),l(!1),c("")},[a]);C(()=>{t||(c(""),r(null))},[t]);const R=u(ee(()=>({highlightedValue:g,instanceId:m,onSelect:v,open:t,search:d,setHighlightedValue:r,setOpen:l,setSearch:c,triggerRef:x,value:o}),[g,m,v,t,d,o]),"contextValue");return f(U.Provider,{value:R,children:f("span",{style:{display:"contents"},children:e})})},"Select"),fe=n(({children:e,class:a,...o})=>{const{open:t,setOpen:l,triggerRef:d}=D();return T("button",{"aria-expanded":t,"aria-haspopup":"listbox",class:k("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",a),onClick:n(()=>{l(!t)},"onClick"),ref:n(c=>{d.current=c},"ref"),type:"button",...o,children:[e,f("svg",{"aria-hidden":"true",class:k("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:f("path",{d:"m6 9 6 6 6-6"})})]})},"SelectTrigger"),pe=n(({class:e,options:a,placeholder:o="Select…"})=>{const{value:t}=D(),l=a.find(d=>d.value===t);return f("span",{class:k("truncate",!l&&"text-muted-foreground",e),children:l?l.label:o})},"SelectValue"),ne=n(e=>[...e.querySelectorAll("[role='option']:not([aria-disabled='true'])")],"getOptionElements"),N=n(e=>e.dataset.value,"getOptionValue"),he=n(({align:e="start",children:a,class:o,searchable:t=!1,side:l="bottom",sideOffset:d=4})=>{const{highlightedValue:c,instanceId:g,open:r,search:x,setHighlightedValue:m,setOpen:v,setSearch:R,triggerRef:i}=D(),y=u(S(null),"contentRef"),O=u(S(null),"searchInputRef"),I=u(S(null),"listRef"),[j,J]=u(w({x:0,y:0}),"position"),[W,L]=u(w(!1),"ready"),A=u(S(c),"highlightedRef");if(A.current=c,C(()=>{if(!r||!i.current||!y.current){L(!1);return}let p=!1;const s=e==="center"?l:`${l}-${e}`;return F(i.current,y.current,{middleware:[G(d),Q(),Y({padding:4})],placement:s}).then(h=>(p||(J({x:h.x,y:h.y}),L(!0)),h)).catch(()=>{}),()=>{p=!0}},[r,l,d,e,i]),C(()=>{r&&(t&&O.current?O.current.focus():I.current&&I.current.focus())},[r,t]),C(()=>{if(!r)return;const p=n(s=>{if(y.current&&!y.current.contains(s.target)){const h=i.current;if(h&&h.contains(s.target))return;v(!1)}},"handleMouseDown");return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[r,v,i]),C(()=>{if(!r)return;const p=n(s=>{const h=I.current;if(!h)return;const E=ne(h),V=E.length;if(V===0){s.key==="Escape"&&(s.preventDefault(),v(!1),i.current?.focus());return}const z=A.current,b=z===null?-1:E.findIndex(M=>N(M)===z),$=n(M=>{const H=E[M];if(H){const P=N(H);P!==null&&m(P),H.scrollIntoView?.({block:"nearest"})}},"highlightByIndex");switch(s.key){case"ArrowDown":{s.preventDefault(),$(b<V-1?b+1:0);break}case"ArrowUp":{s.preventDefault(),$(b>0?b-1:V-1);break}case"End":{s.preventDefault(),$(V-1);break}case"Enter":{s.preventDefault(),b>=0&&E[b]?.click();break}case"Escape":case"Tab":{s.preventDefault(),v(!1),i.current?.focus();break}case"Home":{s.preventDefault(),$(0);break}}},"handleKeyDown");return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r,m,v,i]),!r)return;const B=c===null?void 0:`${g}-option-${c}`;return T("div",{class:k("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",!W&&"invisible",o),ref:y,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&&f("div",{class:"border-b border-border p-1.5",children:f("input",{"aria-activedescendant":B,"aria-controls":`${g}-listbox`,"aria-label":"Search options",class:k("w-full bg-transparent text-[0.75rem] text-foreground placeholder:text-muted-foreground","px-1.5 py-1 border-0 outline-none"),onInput:n(p=>{R(p.currentTarget.value),m(null)},"onInput"),placeholder:"Search…",ref:O,role:"combobox",type:"text",value:x})}),f("div",{...!t&&{"aria-activedescendant":B,tabIndex:0},class:"max-h-[min(300px,var(--available-height,300px))] overflow-y-auto scrollbar-thin-border p-1",id:`${g}-listbox`,ref:I,role:"listbox",children:a})]})},"SelectContent"),ge=n(({children:e,class:a,value:o})=>{const{highlightedValue:t,instanceId:l,onSelect:d,setHighlightedValue:c,value:g}=D(),r=g===o,x=t===o,m=`${l}-option-${o}`;return T("div",{"aria-selected":r,class:k("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",a),"data-value":o,id:m,onClick:n(()=>{d(o)},"onClick"),onMouseEnter:n(()=>{c(o)},"onMouseEnter"),role:"option",children:[f("span",{class:"flex-1 truncate",children:e}),r&&f("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:f("path",{d:"M20 6 9 17l-5-5"})})]})},"SelectItem");export{de as Select,he as SelectContent,ge as SelectItem,fe as SelectTrigger,pe as SelectValue,D as useSelectContext};
|