@visulima/dev-toolbar 1.0.0-alpha.4 → 1.0.0-alpha.6
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 +89 -0
- package/LICENSE.md +109 -2
- package/bin/mcp.js +29 -0
- package/dist/apps/a11y/a11y-app.d.ts +0 -1
- package/dist/apps/a11y/a11y-tooltip.d.ts +0 -1
- package/dist/apps/a11y/index.js +21 -2
- package/dist/apps/annotations/annotations-app.d.ts +4 -0
- package/dist/apps/annotations/index.d.ts +3 -0
- package/dist/apps/annotations/index.js +18 -0
- package/dist/apps/assets/assets-app.d.ts +4 -0
- package/dist/apps/assets/index.d.ts +3 -0
- package/dist/apps/assets/index.js +16 -0
- package/dist/apps/inspector/a11y-capture.d.ts +12 -0
- package/dist/apps/inspector/annotation-overlay.d.ts +55 -0
- package/dist/apps/inspector/annotation-settings.d.ts +33 -0
- package/dist/apps/inspector/element-utils.d.ts +115 -0
- package/dist/apps/inspector/freeze-animations.d.ts +22 -0
- package/dist/apps/inspector/index.js +30 -1
- package/dist/apps/inspector/inspector-app.d.ts +4 -2
- package/dist/apps/inspector/rulers.d.ts +14 -0
- package/dist/apps/inspector/theme-palette.d.ts +34 -0
- package/dist/apps/module-graph/index.js +20 -1
- package/dist/apps/module-graph/module-graph-app.d.ts +0 -1
- package/dist/apps/performance/index.js +17 -1
- package/dist/apps/performance/performance-app.d.ts +0 -1
- package/dist/apps/performance/performance-tooltip.d.ts +0 -1
- package/dist/apps/seo/index.js +17 -1
- package/dist/apps/seo/seo-app.d.ts +0 -1
- package/dist/apps/settings/index.js +17 -1
- package/dist/apps/tailwind/index.js +2 -2
- package/dist/apps/tailwind/tailwind-app.d.ts +0 -1
- package/dist/apps/timeline/index.js +18 -1
- package/dist/apps/timeline/timeline-app.d.ts +0 -1
- package/dist/apps/vite-config/index.js +16 -1
- package/dist/apps/vite-config/vite-config-app.d.ts +0 -1
- package/dist/client/overlay.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.d.ts +12 -0
- package/dist/mcp/server.js +1 -0
- package/dist/packem_chunks/inject-source.js +9 -1
- package/dist/packem_shared/Alert-D2CvX4fw.js +1 -0
- package/dist/packem_shared/Badge-BEgU04nl.js +1 -0
- package/dist/packem_shared/Button-Bkx66Co7.js +1 -0
- package/dist/packem_shared/Card-CJa4vHVc.js +1 -0
- package/dist/packem_shared/Icon-B6UHkC0o.js +1 -0
- package/dist/packem_shared/Input-Cs6aduTi.js +1 -0
- package/dist/packem_shared/Label-CgCFOMDc.js +1 -0
- package/dist/packem_shared/Popover-DzH5lAc9.js +1 -0
- package/dist/packem_shared/Progress-DN6zn-0l.js +1 -0
- package/dist/packem_shared/Select-C0CQOOqZ.js +1 -0
- package/dist/packem_shared/Separator-D38mKeZv.js +1 -0
- package/dist/packem_shared/Skeleton-Dv-tcA1P.js +1 -0
- package/dist/packem_shared/Switch-C3NTpeoR.js +1 -0
- package/dist/packem_shared/Tabs-SuFWbB6d.js +1 -0
- package/dist/packem_shared/Textarea-Yfg3dLZi.js +1 -0
- package/dist/packem_shared/Tooltip-BHmzUaxu.js +1 -0
- package/dist/packem_shared/annotation-settings-DOyUbJ_T.js +1 -0
- package/dist/packem_shared/annotation-store-bLQRYMaI.js +1 -0
- package/dist/packem_shared/clsx-wGlvpUfw.js +1 -0
- package/dist/packem_shared/createServerRPCContext-CJ6F87o_.js +1 -0
- package/dist/packem_shared/sharedToolbarStylesheet-CaTdYhVe.js +2 -0
- package/dist/packem_shared/use-frame-state-CxrlPUM5.js +1 -0
- package/dist/packem_shared/use-theme-zpm4zmqP.js +1 -0
- package/dist/rpc/functions/annotations.d.ts +28 -0
- package/dist/rpc/functions/assets.d.ts +16 -0
- package/dist/rpc/functions/vite-config.d.ts +76 -2
- package/dist/store/annotation-store.d.ts +41 -0
- package/dist/toolbar/components/app-button.d.ts +0 -1
- package/dist/toolbar/components/first-visit-hint.d.ts +0 -1
- package/dist/toolbar/components/toolbar-bar.d.ts +2 -7
- package/dist/toolbar/components/toolbar-container.d.ts +1 -7
- package/dist/toolbar/hooks/use-frame-state.d.ts +11 -1
- package/dist/toolbar/index.d.ts +0 -1
- package/dist/toolbar/index.js +3 -3
- package/dist/types/annotations.d.ts +156 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/rpc.d.ts +41 -1
- package/dist/ui/components/alert.d.ts +0 -1
- package/dist/ui/components/badge.d.ts +0 -1
- package/dist/ui/components/button.d.ts +0 -1
- package/dist/ui/components/card.d.ts +0 -1
- package/dist/ui/components/icon.d.ts +0 -1
- package/dist/ui/components/input.d.ts +0 -1
- package/dist/ui/components/label.d.ts +0 -1
- package/dist/ui/components/progress.d.ts +0 -1
- package/dist/ui/components/select.d.ts +54 -0
- package/dist/ui/components/separator.d.ts +0 -1
- package/dist/ui/components/skeleton.d.ts +0 -1
- package/dist/ui/components/switch.d.ts +0 -1
- package/dist/ui/components/tabs.d.ts +0 -1
- package/dist/ui/components/textarea.d.ts +0 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/vite-plugin.d.ts +6 -1
- package/dist/vite-plugin.js +5 -2
- package/package.json +36 -14
- package/dist/apps/more/index.d.ts +0 -3
- package/dist/apps/more/index.js +0 -2
- package/dist/apps/more/more-app.d.ts +0 -5
- package/dist/packem_shared/Alert-H-x1JuZ0.js +0 -1
- package/dist/packem_shared/Badge-C30mDKKG.js +0 -1
- package/dist/packem_shared/Button-DODNCTPZ.js +0 -1
- package/dist/packem_shared/Card-DdI7Wn3t.js +0 -1
- package/dist/packem_shared/Icon-DWFLZkwW.js +0 -1
- package/dist/packem_shared/Input-GfbOwAkK.js +0 -1
- package/dist/packem_shared/Label-Bzi47aUf.js +0 -1
- package/dist/packem_shared/Popover-CLt7YhUF.js +0 -1
- package/dist/packem_shared/Progress-vGfFpxRn.js +0 -1
- package/dist/packem_shared/Separator-DQGeJPQg.js +0 -1
- package/dist/packem_shared/Skeleton-BYXau6jM.js +0 -1
- package/dist/packem_shared/Switch-BeC78S_T.js +0 -1
- package/dist/packem_shared/Tabs-CXERaeAp.js +0 -1
- package/dist/packem_shared/Textarea-DvbSX13V.js +0 -1
- package/dist/packem_shared/Tooltip-tlBN-NdK.js +0 -1
- package/dist/packem_shared/cn-DWLJYh3h.js +0 -1
- package/dist/packem_shared/createServerRPCContext-CEm1Ymkn.js +0 -1
- package/dist/packem_shared/sharedToolbarStylesheet-DOV-Jwcm.js +0 -2
- package/dist/packem_shared/use-theme-BOw3dPpY.js +0 -1
- package/dist/utils/cn.d.ts +0 -8
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ComponentChildren, JSX } from "preact";
|
|
2
|
+
interface SelectContextValue {
|
|
3
|
+
highlightedValue: string | null;
|
|
4
|
+
instanceId: string;
|
|
5
|
+
onSelect: (value: string) => void;
|
|
6
|
+
open: boolean;
|
|
7
|
+
search: string;
|
|
8
|
+
setHighlightedValue: (v: string | null) => void;
|
|
9
|
+
setOpen: (v: boolean) => void;
|
|
10
|
+
setSearch: (v: string) => void;
|
|
11
|
+
triggerRef: {
|
|
12
|
+
current: HTMLButtonElement | null;
|
|
13
|
+
};
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
declare const useSelectContext: () => SelectContextValue;
|
|
17
|
+
interface SelectOption {
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
interface SelectProps {
|
|
22
|
+
children: ComponentChildren;
|
|
23
|
+
onValueChange?: (value: string) => void;
|
|
24
|
+
value?: string;
|
|
25
|
+
}
|
|
26
|
+
interface SelectTriggerProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
27
|
+
children: ComponentChildren;
|
|
28
|
+
class?: string;
|
|
29
|
+
}
|
|
30
|
+
interface SelectContentProps {
|
|
31
|
+
align?: "center" | "end" | "start";
|
|
32
|
+
children: ComponentChildren;
|
|
33
|
+
class?: string;
|
|
34
|
+
searchable?: boolean;
|
|
35
|
+
side?: "bottom" | "top";
|
|
36
|
+
sideOffset?: number;
|
|
37
|
+
}
|
|
38
|
+
interface SelectItemProps {
|
|
39
|
+
children: ComponentChildren;
|
|
40
|
+
class?: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}
|
|
43
|
+
interface SelectValueProps {
|
|
44
|
+
class?: string;
|
|
45
|
+
options: SelectOption[];
|
|
46
|
+
placeholder?: string;
|
|
47
|
+
}
|
|
48
|
+
declare const Select: ({ children, onValueChange, value }: SelectProps) => JSX.Element;
|
|
49
|
+
declare const SelectTrigger: ({ children, class: className, ...rest }: SelectTriggerProps) => JSX.Element;
|
|
50
|
+
declare const SelectValue: ({ class: className, options, placeholder }: SelectValueProps) => JSX.Element;
|
|
51
|
+
declare const SelectContent: ({ align, children, class: className, searchable, side, sideOffset, }: SelectContentProps) => JSX.Element | undefined;
|
|
52
|
+
declare const SelectItem: ({ children, class: className, value: itemValue }: SelectItemProps) => JSX.Element;
|
|
53
|
+
export { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, useSelectContext };
|
|
54
|
+
export type { SelectOption };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { default as cn } from "../utils/cn.d.ts";
|
|
2
1
|
export { Alert, AlertDescription, AlertTitle } from "./components/alert.d.ts";
|
|
3
2
|
export { default as Badge } from "./components/badge.d.ts";
|
|
4
3
|
export { default as Button } from "./components/button.d.ts";
|
|
@@ -8,6 +7,8 @@ export { default as Input } from "./components/input.d.ts";
|
|
|
8
7
|
export { default as Label } from "./components/label.d.ts";
|
|
9
8
|
export { Popover, PopoverClose, PopoverContent, PopoverTrigger } from "./components/popover.d.ts";
|
|
10
9
|
export { default as Progress } from "./components/progress.d.ts";
|
|
10
|
+
export { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, useSelectContext } from "./components/select.d.ts";
|
|
11
|
+
export type { SelectOption } from "./components/select.d.ts";
|
|
11
12
|
export { default as Separator } from "./components/separator.d.ts";
|
|
12
13
|
export { default as Skeleton } from "./components/skeleton.d.ts";
|
|
13
14
|
export { default as Switch } from "./components/switch.d.ts";
|
package/dist/ui/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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-CgCFOMDc.js";import{Popover as A,PopoverClose as I,PopoverContent as B,PopoverTrigger as D}from"../packem_shared/Popover-DzH5lAc9.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-C0CQOOqZ.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-SuFWbB6d.js";import{default as W}from"../packem_shared/Textarea-Yfg3dLZi.js";import{Tooltip as Y,TooltipContent as Z,TooltipTrigger as _}from"../packem_shared/Tooltip-BHmzUaxu.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/dist/vite-plugin.d.ts
CHANGED
|
@@ -14,11 +14,16 @@ export interface DevToolbarOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
appendTo?: string | RegExp;
|
|
16
16
|
/**
|
|
17
|
-
* Built-in apps to enable
|
|
17
|
+
* Built-in apps to enable. All apps are disabled by default — only
|
|
18
|
+
* `viteConfig`, `settings`, and the "more" drawer are shown out of the box.
|
|
19
|
+
* Explicitly set an app to `true` to enable it.
|
|
20
|
+
* @example { inspector: true, seo: true }
|
|
18
21
|
*/
|
|
19
22
|
apps?: {
|
|
20
23
|
[key: string]: boolean | undefined;
|
|
21
24
|
a11y?: boolean;
|
|
25
|
+
annotations?: boolean;
|
|
26
|
+
assets?: boolean;
|
|
22
27
|
inspector?: boolean;
|
|
23
28
|
moduleGraph?: boolean;
|
|
24
29
|
performance?: boolean;
|
package/dist/vite-plugin.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
1
|
+
var O=Object.defineProperty;var g=(e,r)=>O(e,"name",{value:r,configurable:!0});import{createRequire as x}from"node:module";import{normalizePath as I}from"vite";import{createServerRPCContext as k}from"./packem_shared/createServerRPCContext-CJ6F87o_.js";const F=x(import.meta.url),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=g(e=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[r,f]=d.versions.node.split(".").map(Number);if(r>22||r===22&&f>=3||r===20&&f>=16)return d.getBuiltinModule(e)}return F(e)},"__cjs_getBuiltinModule"),P=b("node:fs"),T=b("node:path"),{fileURLToPath:S}=b("node:url");var R=Object.defineProperty,m=g((e,r)=>R(e,"name",{value:r,configurable:!0}),"u");const q=m(()=>I(T.dirname(S(import.meta.url))),"getDevToolbarPath"),D=/\?.+$/,M=/\/dist\/|\/build\//,N=/\.[jt]sx$/,W=m(e=>e.replace(D,""),"removeUrlQuery"),w="?__visulima-dev-toolbar-resource",h="virtual:visulima-dev-toolbar-options",_=`\0${h}`,u="virtual:visulima-dev-toolbar-path:",j="\0__visulima-dev-toolbar-empty",E=m((e={})=>{const r=q(),f=e.removeDevtoolsOnBuild??!0,$=e.injectSource?.enabled??!0;let v;return[{apply:"serve",config(){return{server:{watch:{ignored:["**/.devtoolbar/**"]}}}},configResolved(t){if(v=t,!e.appendTo){const o=new Set(t.plugins.map(n=>n.name));(o.has("tanstack-start-core:config")||o.has("tanstack-react-start:config"))&&(e.appendTo=/router\.tsx$/)}const a=/dev-toolbar[\\/]dist[\\/]|__visulima-dev-toolbar-resource/;for(const o of t.plugins){if(!o.name.includes("babel"))continue;const n=o.transform;if(!n)continue;const i=typeof n=="function"?n:typeof n=="object"&&"handler"in n?n.handler:void 0;if(typeof i!="function")continue;const s=m(function(l,c,...p){if(!a.test(c))return i.call(this,l,c,...p)},"wrapper");typeof n=="function"?o.transform=s:n.handler=s}},configureServer(t){k(t,e.serverFunctions,{editor:e.editor}),t.ws.on("connection",()=>{t.ws.send({event:"dev-toolbar:init",type:"custom"})}),t.middlewares.use("/__devtoolbar/events",async(a,o)=>{o.writeHead(200,{"Cache-Control":"no-cache",Connection:"keep-alive","Content-Type":"text/event-stream","X-Accel-Buffering":"no"});const n=m((c,p)=>{o.write(`event: ${c}
|
|
2
|
+
data: ${JSON.stringify(p)}
|
|
3
|
+
|
|
4
|
+
`)},"sendEvent");n("connected",{timestamp:Date.now()});const{watch:i}=await import("node:fs"),s=T.join(t.config.root,".devtoolbar","annotations.json");let l;try{l=i(s,{persistent:!1},c=>{c==="change"&&n("annotations.changed",{timestamp:Date.now()})}),l.on("error",()=>{})}catch{const{stat:c}=await import("node:fs/promises");let p=0;const C=setInterval(async()=>{try{const y=(await c(s)).mtimeMs;y!==p&&(p=y,n("annotations.changed",{timestamp:Date.now()}))}catch{}},2e3);a.on("close",()=>clearInterval(C));return}a.on("close",()=>{l?.close()})})},enforce:"pre",async load(t){if(t===_){const a=(e.customApps??[]).filter(o=>!o.component&&!o.init&&o.view?.type==="iframe").map(o=>({defaultOpen:o.defaultOpen,icon:o.icon,id:o.id,name:o.name,view:o.view}));return`export default ${JSON.stringify({apps:{a11y:e.apps?.a11y??!1,annotations:e.apps?.annotations??e.apps?.inspector??!1,assets:e.apps?.assets??!1,inspector:e.apps?.inspector??!1,moduleGraph:e.apps?.moduleGraph??!1,performance:e.apps?.performance??!1,seo:e.apps?.seo??!1,settings:e.apps?.settings??!0,tailwind:e.apps?.tailwind??!1,timeline:e.apps?.timeline??!1,viteConfig:e.apps?.viteConfig??!0},base:v.base,closeOnOutsideClick:e.closeOnOutsideClick??!0,customApps:a,defaultVisible:e.defaultVisible??!0,editor:e.editor??"",height:e.height??60,keybindings:e.keybindings??{},minimizePanelInactive:e.minimizePanelInactive??5e3,placement:e.placement??"bottom-center",position:e.position??"bottom",reduceMotion:e.reduceMotion??!1,requireUrlFlag:e.requireUrlFlag??!1,urlFlagName:e.urlFlagName??"devtools",width:e.width??80})};`}if(t.endsWith(w)){const a=W(t);return this.addWatchFile(a),await P.promises.readFile(a,"utf8")}},name:"@visulima/dev-toolbar",resolveId(t){if(t===h)return _;if(t.startsWith(u))return`${t.replace(u,`${r}/`)}${w}`},transform(t,a,o){if(o?.ssr)return;const{appendTo:n}=e,i=a.split("?",2)[0];if(n&&i&&(typeof n=="string"&&i.endsWith(n)||n instanceof RegExp&&n.test(i)))return`import '${u}client/overlay.js';
|
|
5
|
+
${t}`},transformIndexHtml(){return e.appendTo?void 0:{html:"",tags:[{attrs:{src:`${v.base||"/"}@id/${u}client/overlay.js`,type:"module"},injectTo:"head-prepend",tag:"script"}]}}},{enforce:"pre",name:"@visulima/dev-toolbar:inject-source",async transform(t,a){if(!$||v.mode!=="development"||a.includes("node_modules")||a.includes("?raw")||M.test(a)||!N.test(a.split("?")[0]??""))return;const{readFile:o}=await import("node:fs/promises");let n;try{const l=await o(a.split("?")[0]??a,"utf8");l!==t&&(n=l)}catch{}const{addSourceToJsx:i}=await import("./packem_chunks/inject-source.js"),s=i(t,a,e.injectSource?.ignore,n);if(s)return{code:s.code??t,map:s.map??void 0}}},{apply(t,{command:a,mode:o}){return f&&(a!=="serve"||o==="production")},load(t){if(t===j)return"export default {};"},name:"@visulima/dev-toolbar:remove-on-build",resolveId(t){if(t===h||t.startsWith(u))return j}}]},"devToolbar");export{E as devToolbar};
|
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.6",
|
|
4
4
|
"description": "Devtools is a set of tools for building advanced devtools for your application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visulima",
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
34
|
"type": "module",
|
|
35
|
+
"bin": {
|
|
36
|
+
"visulima-dev-toolbar-mcp": "./bin/mcp.js"
|
|
37
|
+
},
|
|
35
38
|
"exports": {
|
|
36
39
|
".": {
|
|
37
40
|
"types": "./dist/index.d.ts",
|
|
@@ -49,6 +52,10 @@
|
|
|
49
52
|
"types": "./dist/apps/a11y/index.d.ts",
|
|
50
53
|
"default": "./dist/apps/a11y/index.js"
|
|
51
54
|
},
|
|
55
|
+
"./apps/assets": {
|
|
56
|
+
"types": "./dist/apps/assets/index.d.ts",
|
|
57
|
+
"default": "./dist/apps/assets/index.js"
|
|
58
|
+
},
|
|
52
59
|
"./apps/inspector": {
|
|
53
60
|
"types": "./dist/apps/inspector/index.d.ts",
|
|
54
61
|
"default": "./dist/apps/inspector/index.js"
|
|
@@ -61,10 +68,6 @@
|
|
|
61
68
|
"types": "./dist/apps/module-graph/index.d.ts",
|
|
62
69
|
"default": "./dist/apps/module-graph/index.js"
|
|
63
70
|
},
|
|
64
|
-
"./apps/more": {
|
|
65
|
-
"types": "./dist/apps/more/index.d.ts",
|
|
66
|
-
"default": "./dist/apps/more/index.js"
|
|
67
|
-
},
|
|
68
71
|
"./apps/performance": {
|
|
69
72
|
"types": "./dist/apps/performance/index.d.ts",
|
|
70
73
|
"default": "./dist/apps/performance/index.js"
|
|
@@ -81,10 +84,18 @@
|
|
|
81
84
|
"types": "./dist/apps/timeline/index.d.ts",
|
|
82
85
|
"default": "./dist/apps/timeline/index.js"
|
|
83
86
|
},
|
|
87
|
+
"./apps/annotations": {
|
|
88
|
+
"types": "./dist/apps/annotations/index.d.ts",
|
|
89
|
+
"default": "./dist/apps/annotations/index.js"
|
|
90
|
+
},
|
|
84
91
|
"./apps/vite-config": {
|
|
85
92
|
"types": "./dist/apps/vite-config/index.d.ts",
|
|
86
93
|
"default": "./dist/apps/vite-config/index.js"
|
|
87
94
|
},
|
|
95
|
+
"./mcp": {
|
|
96
|
+
"types": "./dist/mcp/server.d.ts",
|
|
97
|
+
"default": "./dist/mcp/server.js"
|
|
98
|
+
},
|
|
88
99
|
"./toolbar": {
|
|
89
100
|
"types": "./dist/toolbar/index.d.ts",
|
|
90
101
|
"default": "./dist/toolbar/index.js"
|
|
@@ -96,26 +107,37 @@
|
|
|
96
107
|
"./package.json": "./package.json"
|
|
97
108
|
},
|
|
98
109
|
"files": [
|
|
110
|
+
"bin",
|
|
99
111
|
"dist",
|
|
100
112
|
"README.md",
|
|
101
113
|
"CHANGELOG.md"
|
|
102
114
|
],
|
|
103
115
|
"dependencies": {
|
|
104
116
|
"@babel/generator": "^7.29.1",
|
|
105
|
-
"@babel/parser": "
|
|
117
|
+
"@babel/parser": "7.29.2",
|
|
106
118
|
"@babel/traverse": "^7.29.0",
|
|
107
|
-
"@babel/types": "^7.29.0",
|
|
108
119
|
"@floating-ui/dom": "^1.7.6",
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"launch-editor": "^2.13.1",
|
|
112
|
-
"lucide-static": "^0.576.0",
|
|
113
|
-
"preact": "^10.28.4",
|
|
114
|
-
"tailwind-merge": "^3.5.0"
|
|
120
|
+
"launch-editor": "2.13.2",
|
|
121
|
+
"preact": "^10.29.0"
|
|
115
122
|
},
|
|
116
123
|
"peerDependencies": {
|
|
117
|
-
"
|
|
124
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
125
|
+
"axe-core": "4.11.1",
|
|
126
|
+
"vite": "^6 || ^7 || ^8",
|
|
127
|
+
"zod": "^3.0.0"
|
|
128
|
+
},
|
|
129
|
+
"peerDependenciesMeta": {
|
|
130
|
+
"@modelcontextprotocol/sdk": {
|
|
131
|
+
"optional": true
|
|
132
|
+
},
|
|
133
|
+
"axe-core": {
|
|
134
|
+
"optional": true
|
|
135
|
+
},
|
|
136
|
+
"zod": {
|
|
137
|
+
"optional": true
|
|
138
|
+
}
|
|
118
139
|
},
|
|
140
|
+
"optionalDependencies": {},
|
|
119
141
|
"engines": {
|
|
120
142
|
"node": ">=22.21"
|
|
121
143
|
},
|
package/dist/apps/more/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var s=(i,t)=>p(i,"name",{value:t,configurable:!0});import m from"lucide-static/icons/more-horizontal.svg?raw";import{addHookName as f}from"preact/devtools";import{useState as u,useEffect as b}from"preact/hooks";import g from"../../packem_shared/cn-DWLJYh3h.js";import{jsxs as o,jsx as r}from"preact/jsx-runtime";var h=Object.defineProperty,n=s((i,t)=>h(i,"name",{value:t,configurable:!0}),"n");const x=n(i=>{const[t,a]=f(u([]),"apps");b(()=>{const e=globalThis.__VISULIMA_DEVTOOLS__;if(!e)return;const l=(e.getApps()??[]).filter(c=>!["dev-toolbar:a11y","dev-toolbar:inspector","dev-toolbar:module-graph","dev-toolbar:more","dev-toolbar:performance","dev-toolbar:seo","dev-toolbar:settings","dev-toolbar:tailwind","dev-toolbar:timeline","dev-toolbar:vite-config"].includes(c.id));a(l)},[]);const d=n(e=>{globalThis.__VISULIMA_DEVTOOLS__?.openApp(e).catch(()=>{})},"openApp");return t.length===0?o("div",{class:"p-8 flex flex-col items-center justify-center min-h-48 gap-5 text-center select-none",children:[r("div",{class:"size-14 bg-primary/5 border border-primary/20 flex items-center justify-center",children:r("svg",{"aria-hidden":"true",class:"size-6 text-primary/40",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24",children:r("path",{d:"M12 6v6m0 0v6m0-6h6m-6 0H6","stroke-linecap":"round","stroke-linejoin":"round"})})}),o("div",{class:"space-y-1.5",children:[r("p",{class:"text-[0.8125rem] font-medium text-foreground/70",children:"No additional apps registered"}),r("p",{class:"text-[0.725rem] text-muted-foreground",children:"Register a custom app to see it here"}),r("pre",{class:"mt-3 text-[0.65rem] font-mono text-primary/70 bg-primary/5 border border-primary/15 px-3 py-2 text-left",children:`window.__VISULIMA_DEVTOOLS__
|
|
2
|
-
.registerApp({ id, name, icon })`})]})]}):o("div",{class:"p-5",children:[o("h2",{class:"text-[0.65rem] font-bold uppercase tracking-[0.1em] text-muted-foreground mb-3 flex items-center gap-1.5",children:[r("span",{"aria-hidden":"true",class:"text-primary/50",children:"//"}),"Additional Apps"]}),r("div",{class:"grid grid-cols-2 gap-2",children:t.map(e=>o("button",{class:g("flex items-center gap-3 p-3","border border-border bg-card hover:bg-foreground/4","text-left cursor-pointer transition-colors duration-150"),onClick:n(()=>d(e.id),"onClick"),title:e.name,type:"button",children:[r("span",{class:"size-5 shrink-0 flex items-center justify-center text-[0.65rem] font-bold uppercase bg-foreground/8 text-foreground/70",children:e.name.slice(0,2)}),r("span",{class:"text-[0.8125rem] font-medium text-foreground truncate",children:e.name})]},e.id))})]})},"MoreApp"),O={component:x,icon:m,id:"dev-toolbar:more",name:"More"};export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var c=Object.defineProperty;var n=(e,r)=>c(e,"name",{value:r,configurable:!0});import s from"./cn-DWLJYh3h.js";import{jsx as l}from"preact/jsx-runtime";var d=Object.defineProperty,i=n((e,r)=>d(e,"name",{value:r,configurable:!0}),"n");const o={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"},f=i(({children:e,class:r,variant:t="default",...a})=>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",o[t],r),role:"alert",...a,children:e}),"Alert"),p=i(({children:e,class:r,...t})=>l("h5",{class:s("mb-1 font-medium leading-none tracking-tight",r),...t,children:e}),"AlertTitle"),b=i(({children:e,class:r,...t})=>l("div",{class:s("text-sm [&_p]:leading-relaxed",r),...t,children:e}),"AlertDescription");export{f as Alert,b as AlertDescription,p as AlertTitle};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var t=(r,e)=>a(r,"name",{value:e,configurable:!0});import s from"./cn-DWLJYh3h.js";import{jsx as d}from"preact/jsx-runtime";var i=Object.defineProperty,c=t((r,e)=>i(r,"name",{value:e,configurable:!0}),"t");const u={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"},l=c(({children:r,class:e,variant:n="default",...o})=>d("div",{class:s("inline-flex items-center rounded-none border px-2.5 py-0.5 text-xs font-semibold transition-colors",u[n],e),...o,children:r}),"Badge");export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var d=Object.defineProperty;var t=(e,r)=>d(e,"name",{value:r,configurable:!0});import s from"./cn-DWLJYh3h.js";import{jsx as a}from"preact/jsx-runtime";var c=Object.defineProperty,g=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"r");const l={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"},f={default:"h-9 px-4 py-2",icon:"h-9 w-9",lg:"h-10 px-8",sm:"h-8 px-3 text-xs"},m=g(({children:e,class:r,size:o="default",type:n="button",variant:i="default",...u})=>a("button",{class:s("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",l[i],f[o],r),type:n,...u,children:e}),"Button");export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var l=(e,r)=>i(e,"name",{value:r,configurable:!0});import d from"./cn-DWLJYh3h.js";import{jsx as s}from"preact/jsx-runtime";var n=Object.defineProperty,c=l((e,r)=>n(e,"name",{value:r,configurable:!0}),"t");const C=c(({children:e,class:r,...a})=>s("div",{class:d("bg-card text-card-foreground rounded-none border shadow",r),...a,children:e}),"Card"),p=c(({children:e,class:r,...a})=>s("div",{class:d("flex flex-col space-y-1.5 p-6",r),...a,children:e}),"CardHeader"),m=c(({children:e,class:r,...a})=>s("h3",{class:d("font-semibold leading-none tracking-tight",r),...a,children:e}),"CardTitle"),f=c(({children:e,class:r,...a})=>s("div",{class:d("text-sm text-muted-foreground",r),...a,children:e}),"CardDescription"),v=c(({children:e,class:r,...a})=>s("div",{class:d("p-6 pt-0",r),...a,children:e}),"CardContent"),x=c(({children:e,class:r,...a})=>s("div",{class:d("flex items-center p-6 pt-0",r),...a,children:e}),"CardFooter");export{C as Card,v as CardContent,f as CardDescription,x as CardFooter,p as CardHeader,m as CardTitle};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(a,e)=>i(a,"name",{value:e,configurable:!0});import o from"./cn-DWLJYh3h.js";import{jsx as s}from"preact/jsx-runtime";var n=Object.defineProperty,c=t((a,e)=>n(a,"name",{value:e,configurable:!0}),"r");const p=c(({class:a,size:e=13,src:r})=>s("span",{class:o("inline-block shrink-0",a),style:{backgroundColor:"currentColor",height:e,maskImage:`url(${r})`,maskRepeat:"no-repeat",maskSize:"contain",WebkitMaskImage:`url(${r})`,WebkitMaskRepeat:"no-repeat",WebkitMaskSize:"contain",width:e}}),"Icon");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{forwardRef as s}from"preact/compat";import i from"./cn-DWLJYh3h.js";import{jsx as n}from"preact/jsx-runtime";const l=s(({class:o,type:e="text",...r},t)=>n("input",{class:i("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}));l.displayName="Input";export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var r=(e,a)=>o(e,"name",{value:a,configurable:!0});import t from"./cn-DWLJYh3h.js";import{jsx as n}from"preact/jsx-runtime";var d=Object.defineProperty,i=r((e,a)=>d(e,"name",{value:a,configurable:!0}),"l");const p=i(({children:e,class:a,...l})=>n("label",{class:t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",a),...l,children:e}),"Label");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var R=Object.defineProperty;var P=(e,n)=>R(e,"name",{value:n,configurable:!0});import{addHookName as v}from"preact/devtools";import{computePosition as k,offset as E,flip as $,shift as L}from"@floating-ui/dom";import{createContext as T}from"preact";import{useState as b,useRef as y,useEffect as C,useContext as j}from"preact/hooks";import g from"./cn-DWLJYh3h.js";import{jsx as f}from"preact/jsx-runtime";var z=Object.defineProperty,r=P((e,n)=>z(e,"name",{value:n,configurable:!0}),"t");const O=T(void 0),h=r(()=>{const e=j(O);if(!e)throw new Error("Popover subcomponent must be used within <Popover>");return e},"usePopoverContext"),X=r(({children:e,defaultOpen:n,onOpenChange:i,open:o})=>{const s=o!==void 0,[u,t]=v(b(n??!1),"internalOpen"),a=s?o:u,c=v(y(null),"triggerRef"),p=r(d=>{s||t(d),i?.(d)},"setOpen");return f(O.Provider,{value:{open:a,setOpen:p,triggerRef:c},children:f("span",{style:{display:"contents"},children:e})})},"Popover"),q=r(({children:e,class:n,...i})=>{const{open:o,setOpen:s,triggerRef:u}=h(),t=r(a=>{u.current=a},"handleRef");return f("button",{"aria-expanded":o,class:g("",n),onClick:r(()=>{i.disabled||s(!o)},"onClick"),ref:t,type:"button",...i,children:e})},"PopoverTrigger"),A=r(({align:e="center",children:n,class:i,side:o="bottom",sideOffset:s=4,...u})=>{const{open:t,setOpen:a,triggerRef:c}=h(),p=v(y(null),"contentRef"),[d,w]=v(b({x:0,y:0}),"position");if(C(()=>{if(!t||!c.current||!p.current)return;const m=e==="center"?o:`${o}-${e}`;k(c.current,p.current,{middleware:[E(s),$(),L({padding:4})],placement:m}).then(l=>(w({x:l.x,y:l.y}),l)).catch(()=>{})},[t,o,s,e,c]),C(()=>{if(!t)return;const m=r(l=>{if(p.current&&!p.current.contains(l.target)){const x=c.current;if(x&&x.contains(l.target))return;a(!1)}},"handleMouseDown");return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[t,a,c]),!!t)return f("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",i),ref:p,role:"dialog",style:{left:`${d.x}px`,position:"fixed",top:`${d.y}px`},...u,children:n})},"PopoverContent"),F=r(({children:e,class:n,...i})=>{const{setOpen:o}=h();return f("button",{class:g("",n),onClick:r(()=>o(!1),"onClick"),type:"button",...i,children:e})},"PopoverClose");export{X as Popover,F as PopoverClose,A as PopoverContent,q as PopoverTrigger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var e=(a,r)=>o(a,"name",{value:r,configurable:!0});import s from"./cn-DWLJYh3h.js";import{jsx as l}from"preact/jsx-runtime";var t=Object.defineProperty,n=e((a,r)=>t(a,"name",{value:r,configurable:!0}),"s");const v=n(({class:a,value:r,...i})=>l("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":r??0,class:s("relative h-2 w-full overflow-hidden rounded-none bg-primary/20",a),role:"progressbar",...i,children:l("div",{class:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(r??0)}%)`}})}),"Progress");export{v as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var a=(r,o)=>i(r,"name",{value:o,configurable:!0});import l from"./cn-DWLJYh3h.js";import{jsx as s}from"preact/jsx-runtime";var p=Object.defineProperty,u=a((r,o)=>p(r,"name",{value:o,configurable:!0}),"a");const d=u(({class:r,decorative:o=!0,orientation:e="horizontal",...t})=>{const n=o?{role:"none"}:{"aria-orientation":e,role:"separator"};return s("div",{class:l("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",r),...n,...t})},"Separator");export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var a=(e,r)=>o(e,"name",{value:r,configurable:!0});import t from"./cn-DWLJYh3h.js";import{jsx as n}from"preact/jsx-runtime";var s=Object.defineProperty,m=a((e,r)=>s(e,"name",{value:r,configurable:!0}),"r");const u=m(({class:e,...r})=>n("div",{class:t("animate-pulse rounded-none bg-primary/10",e),...r}),"Skeleton");export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var m=Object.defineProperty;var a=(e,r)=>m(e,"name",{value:r,configurable:!0});import{addHookName as g}from"preact/devtools";import{useState as v}from"preact/hooks";import s from"./cn-DWLJYh3h.js";import{jsx as c}from"preact/jsx-runtime";var C=Object.defineProperty,d=a((e,r)=>C(e,"name",{value:r,configurable:!0}),"o");const H=d(({checked:e,class:r,defaultChecked:l,disabled:o,id:u,onCheckedChange:b,...f})=>{const t=e!==void 0,[h,k]=g(v(l??!1),"internalChecked"),n=t?e:h,p=d(()=>{if(o)return;const i=!n;t||k(i),b?.(i)},"handleClick");return c("button",{"aria-checked":n,class:s("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",n?"bg-primary":"bg-input",r),"data-state":n?"checked":"unchecked",disabled:o,id:u,onClick:p,role:"switch",type:"button",...f,children:c("span",{class:s("pointer-events-none block h-4 w-4 rounded-none bg-background shadow-lg ring-0 transition-transform",n?"translate-x-4":"translate-x-0"),"data-state":n?"checked":"unchecked"})})},"Switch");export{H as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var b=(e,n)=>p(e,"name",{value:n,configurable:!0});import{addHookName as T}from"preact/devtools";import{createContext as x}from"preact";import{useState as C,useContext as k}from"preact/hooks";import u from"./cn-DWLJYh3h.js";import{jsx as a}from"preact/jsx-runtime";var V=Object.defineProperty,t=b((e,n)=>V(e,"name",{value:n,configurable:!0}),"s");const f=x(void 0),g=t(()=>{const e=k(f);if(!e)throw new Error("Tabs subcomponent must be used within <Tabs>");return e},"useTabsContext"),S=t(({children:e,class:n,defaultValue:i,onValueChange:s,value:r,...c})=>{const l=r!==void 0,[o,v]=T(C(i??""),"internalValue"),m=l?r:o,h=t(d=>{l||v(d),s?.(d)},"handleValueChange");return a(f.Provider,{value:{onValueChange:h,value:m},children:a("div",{class:u("",n),...c,children:e})})},"Tabs"),H=t(({children:e,class:n,...i})=>a("div",{class:u("inline-flex h-9 items-center justify-center rounded-none bg-muted p-1 text-muted-foreground",n),role:"tablist",...i,children:e}),"TabsList"),N=t(({children:e,class:n,disabled:i,value:s,...r})=>{const{onValueChange:c,value:l}=g(),o=l===s;return a("button",{"aria-selected":o,class:u("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",o?"bg-background text-foreground shadow":"hover:bg-background/50",n),"data-state":o?"active":"inactive",disabled:i,onClick:t(()=>!i&&c(s),"onClick"),role:"tab",type:"button",...r,children:e})},"TabsTrigger"),O=t(({children:e,class:n,value:i,...s})=>{const{value:r}=g();if(r===i)return a("div",{class:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),role:"tabpanel",...s,children:e})},"TabsContent");export{S as Tabs,O as TabsContent,H as TabsList,N as TabsTrigger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{forwardRef as s}from"preact/compat";import t from"./cn-DWLJYh3h.js";import{jsx as a}from"preact/jsx-runtime";const i=s(({class:e,...r},o)=>a("textarea",{class:t("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 +0,0 @@
|
|
|
1
|
-
var T=Object.defineProperty;var d=(e,t)=>T(e,"name",{value:t,configurable:!0});import{addHookName as l}from"preact/devtools";import{computePosition as v,offset as R,flip as b,shift as C}from"@floating-ui/dom";import{createContext as w}from"preact";import{useState as m,useRef as g,useEffect as E,useContext as M}from"preact/hooks";import O from"./cn-DWLJYh3h.js";import{jsx as p}from"preact/jsx-runtime";var L=Object.defineProperty,r=d((e,t)=>L(e,"name",{value:t,configurable:!0}),"t");const x=w(void 0),h=r(()=>{const e=M(x);if(!e)throw new Error("Tooltip subcomponent must be used within <Tooltip>");return e},"useTooltipContext"),D=r(({children:e,delayDuration:t=0})=>{const[n,o]=l(m(!1),"open"),i=l(g(null),"triggerRef");return p(x.Provider,{value:{open:n,setOpen:o,triggerRef:i},children:p("span",{style:{display:"contents"},children:e})})},"Tooltip"),N=r(({children:e,class:t,...n})=>{const{setOpen:o,triggerRef:i}=h();return p("span",{class:t,onMouseEnter:r(()=>o(!0),"onMouseEnter"),onMouseLeave:r(()=>o(!1),"onMouseLeave"),ref:r(s=>{i.current=s},"handleRef"),...n,children:e})},"TooltipTrigger"),q=r(({children:e,class:t,side:n="top",sideOffset:o=4,...i})=>{const{open:s,triggerRef:a}=h(),c=l(g(null),"contentRef"),[u,y]=l(m({x:0,y:0}),"position");if(E(()=>{!s||!a.current||!c.current||v(a.current,c.current,{middleware:[R(o),b(),C({padding:4})],placement:n}).then(f=>(y({x:f.x,y:f.y}),f)).catch(()=>{})},[s,n,o,a]),!!s)return p("div",{class:O("z-50 rounded-none bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95",t),ref:c,role:"tooltip",style:{left:`${u.x}px`,position:"fixed",top:`${u.y}px`},...i,children:e})},"TooltipContent");export{D as Tooltip,q as TooltipContent,N as TooltipTrigger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});import{clsx as a}from"clsx";import{twMerge as m}from"tailwind-merge";var c=Object.defineProperty,f=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"t");const p=f((...e)=>m(a(e)),"cn");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var j=Object.defineProperty;var u=(e,t)=>j(e,"name",{value:t,configurable:!0});import{createRequire as C}from"node:module";const T=C(import.meta.url),g=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=u(e=>{if(typeof g<"u"&&g.versions&&g.versions.node){const[t,r]=g.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return g.getBuiltinModule(e)}return T(e)},"__cjs_getBuiltinModule"),v=y("node:path"),p=y("node:fs/promises"),{createRequire:_}=y("node:module");var $=Object.defineProperty,F=u((e,t)=>$(e,"name",{value:t,configurable:!0}),"u$1");const x=F(async e=>{const{moduleGraph:t}=e,r=[];return t.idToModuleMap.forEach(n=>{const i=[];n.importers.forEach(o=>{const c=o.url??o.id;c&&i.push(c)});const s=n.id??n.url,a=n.url??n.id;!s||!a||r.push({id:s,importerCount:n.importers.size,importerUrls:i,url:a})}),r},"getModuleGraph");var O=Object.defineProperty,P=u((e,t)=>O(e,"name",{value:t,configurable:!0}),"n");const S=P(async(e,t,r,n,i)=>{const s=t.startsWith("/")?t:v.join(e.config.root,t),a=n===void 0?"":`:${n}`,o=r===void 0?"":`:${r}${a}`,c=`${s}${o}`,{default:l}=await import("launch-editor");l(c,i)},"openInEditor");var M=Object.defineProperty,m=u((e,t)=>M(e,"name",{value:t,configurable:!0}),"f$1");const k=/\/\*[\s\S]*?\*\//g,E=/\s+/g,w=/@theme\s+default[^{]*\{[\s\S]*?\}/g,h=/(--[\w-]+)\s*:\s*([\s\S]*?);/g,b=m(e=>{const t={},r=e.replaceAll(k,"");let n=0;for(;n<r.length;){const i=r.indexOf("@theme",n);if(i===-1)break;const s=r.indexOf("{",i);if(s===-1)break;let a=1,o=s+1;for(;o<r.length&&a>0;)r[o]==="{"?a+=1:r[o]==="}"&&(a-=1),o+=1;const c=r.slice(s+1,o-1);h.lastIndex=0;let l=h.exec(c);for(;l!==null;){const d=l[2].replaceAll(E," ").trim();d&&!t[l[1]]&&(t[l[1]]=d),l=h.exec(c)}n=o}return t},"parseThemeVariables"),R=m(async e=>{const t=[],r=m(async(n,i)=>{if(i>4)return;let s;try{s=await p.readdir(n,{encoding:"utf8",withFileTypes:!0})}catch{return}for(const a of s){const o=v.join(n,a.name);if(a.isDirectory()){if(a.name==="node_modules"||a.name===".git"||a.name==="dist")continue;await r(o,i+1)}else if(a.name.endsWith(".css"))try{const c=await p.readFile(o,"utf8");c.includes("@import")&&(c.includes('"tailwindcss"')||c.includes("'tailwindcss'"))&&t.push(o)}catch{}}},"walk");return await r(e,0),t},"findTailwindCSSFiles"),G=m(async e=>{const t={};for(const r of e)try{const n=await p.readFile(r,"utf8");w.lastIndex=0;const i=n.replaceAll(w,""),s=b(i);Object.assign(t,s)}catch{}return t},"extractUserTheme"),I=m(async e=>{const{root:t}=e.config;let r="unknown",n={};const i=["tailwind.config.js","tailwind.config.ts","tailwind.config.mjs","tailwind.config.cjs"];for(const o of i)try{await p.access(v.join(t,o)),r="v3";break}catch{}try{const o=_(import.meta.url).resolve("tailwindcss/theme.css"),c=await p.readFile(o,"utf8");n=b(c),Object.keys(n).length>0&&r!=="v3"&&(r="v4")}catch{}const s=await R(t),a=await G(s);return{cssFiles:s.map(o=>v.relative(t,o)),customTheme:a,defaultTheme:n,version:r}},"getTailwindConfig");var q=Object.defineProperty,D=u((e,t)=>q(e,"name",{value:t,configurable:!0}),"t");const V=D(async e=>({base:e.config.base,build:{outDir:e.config.build?.outDir},mode:e.config.mode,resolve:{alias:e.config.resolve.alias},root:e.config.root,server:{host:e.config.server?.host,https:e.config.server?.https,port:e.config.server?.port}}),"getViteConfig");var A=Object.defineProperty,f=u((e,t)=>A(e,"name",{value:t,configurable:!0}),"e");const U=f((e,t={})=>({getModuleGraph:f(async()=>x(e),"getModuleGraph"),getTailwindConfig:f(async()=>I(e),"getTailwindConfig"),getViteConfig:f(async()=>V(e),"getViteConfig"),openInEditor:f(async(r,n,i)=>S(e,r,n,i,t.editor),"openInEditor"),readFile:f(async r=>{const{readFile:n}=await import("node:fs/promises"),i=r.startsWith("/")?r:`${e.config.root}/${r}`;return n(i,"utf8")},"readFile")}),"createDefaultServerFunctions"),z=f((e,t,r={})=>{const n={...U(e,r),...t};return e.ws.on("dev-toolbar:rpc",async(i,s)=>{const{args:a,id:o,method:c}=i,l=n[c];if(!l){s.send("dev-toolbar:rpc:error",{error:`Unknown RPC method: ${c}`,id:o});return}try{const d=await l(...a);s.send("dev-toolbar:rpc:response",{id:o,result:d})}catch(d){s.send("dev-toolbar:rpc:error",{error:d instanceof Error?d.message:String(d),id:o})}}),{callClient(i,...s){e.ws.send({data:{args:s,method:i},event:"dev-toolbar:client",type:"custom"})},registerFunction(i,s){n[i]=s},server:e}},"createServerRPCContext");export{z as createServerRPCContext,z as default};
|