@visulima/dev-toolbar 1.0.0-alpha.3 → 1.0.0-alpha.30

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 (172) hide show
  1. package/CHANGELOG.md +266 -0
  2. package/LICENSE.md +137 -5
  3. package/README.md +11 -1
  4. package/bin/mcp.js +29 -0
  5. package/dist/apps/a11y/index.d.ts +3 -2
  6. package/dist/apps/a11y/index.js +3 -3
  7. package/dist/apps/annotations/index.d.ts +4 -0
  8. package/dist/apps/annotations/index.js +18 -0
  9. package/dist/apps/assets/index.d.ts +4 -0
  10. package/dist/apps/assets/index.js +16 -0
  11. package/dist/apps/inspector/index.d.ts +3 -2
  12. package/dist/apps/inspector/index.js +15 -2
  13. package/dist/apps/module-graph/index.d.ts +3 -2
  14. package/dist/apps/module-graph/index.js +2 -2
  15. package/dist/apps/performance/index.d.ts +3 -2
  16. package/dist/apps/performance/index.js +2 -2
  17. package/dist/apps/seo/index.d.ts +3 -2
  18. package/dist/apps/seo/index.js +2 -2
  19. package/dist/apps/settings/index.d.ts +3 -2
  20. package/dist/apps/settings/index.js +2 -2
  21. package/dist/apps/tailwind/index.d.ts +3 -2
  22. package/dist/apps/tailwind/index.js +6 -6
  23. package/dist/apps/timeline/index.d.ts +3 -2
  24. package/dist/apps/timeline/index.js +2 -2
  25. package/dist/apps/vite-config/index.d.ts +3 -2
  26. package/dist/apps/vite-config/index.js +2 -2
  27. package/dist/client/overlay.d.ts +1 -1
  28. package/dist/client/overlay.js +1 -1
  29. package/dist/index.d.ts +143 -7
  30. package/dist/index.js +1 -1
  31. package/dist/mcp/server.d.ts +2 -0
  32. package/dist/mcp/server.js +1 -0
  33. package/dist/packem_chunks/inject-source.js +9 -1
  34. package/dist/packem_shared/Alert-D2CvX4fw.js +1 -0
  35. package/dist/packem_shared/Badge-BEgU04nl.js +1 -0
  36. package/dist/packem_shared/Button-Bkx66Co7.js +1 -0
  37. package/dist/packem_shared/Card-CJa4vHVc.js +1 -0
  38. package/dist/packem_shared/Icon-B6UHkC0o.js +1 -0
  39. package/dist/packem_shared/Input-Cs6aduTi.js +1 -0
  40. package/dist/packem_shared/Label-DyCng4Cp.js +1 -0
  41. package/dist/packem_shared/Popover-BtFVaZYg.js +1 -0
  42. package/dist/packem_shared/Progress-DN6zn-0l.js +1 -0
  43. package/dist/packem_shared/Select-DgQ4ss-s.js +1 -0
  44. package/dist/packem_shared/Separator-D38mKeZv.js +1 -0
  45. package/dist/packem_shared/Skeleton-Dv-tcA1P.js +1 -0
  46. package/dist/packem_shared/Switch-C3NTpeoR.js +1 -0
  47. package/dist/packem_shared/Tabs-DKWMiawt.js +1 -0
  48. package/dist/packem_shared/Textarea-Yfg3dLZi.js +1 -0
  49. package/dist/packem_shared/Tooltip-CioncSXj.js +1 -0
  50. package/dist/packem_shared/annotation-settings-Bv0TH4WI.js +1 -0
  51. package/dist/packem_shared/annotation-store-bLQRYMaI.js +1 -0
  52. package/dist/packem_shared/app.d-SmKEDxsI.d.ts +229 -0
  53. package/dist/packem_shared/clsx-wGlvpUfw.js +1 -0
  54. package/dist/packem_shared/createClientRPCContext-DgRxrllw.js +1 -0
  55. package/dist/packem_shared/createDevToolbarHook-4bZZiHPI.js +1 -0
  56. package/dist/packem_shared/createServerRPCContext-D-yZrEjs.js +1 -0
  57. package/dist/packem_shared/getTimelineStore-B1cfjWV8.js +1 -0
  58. package/dist/packem_shared/global-api.d-BLfn-OUA.d.ts +547 -0
  59. package/dist/packem_shared/{setupGlobalHook-CFuxsCyl.js → setupGlobalHook-CCf9Logv.js} +1 -1
  60. package/dist/packem_shared/sharedToolbarStylesheet-pA-B0Jt2.js +2 -0
  61. package/dist/packem_shared/store-DaUtLjf3.js +1 -0
  62. package/dist/packem_shared/use-frame-state-CxrlPUM5.js +1 -0
  63. package/dist/packem_shared/use-theme-zpm4zmqP.js +1 -0
  64. package/dist/toolbar/index.d.ts +152 -55
  65. package/dist/toolbar/index.js +3 -3
  66. package/dist/ui/index.d.ts +382 -17
  67. package/dist/ui/index.js +1 -1
  68. package/dist/vite-plugin.d.ts +155 -141
  69. package/dist/vite-plugin.js +5 -2
  70. package/package.json +39 -19
  71. package/dist/apps/a11y/a11y-app.d.ts +0 -5
  72. package/dist/apps/a11y/a11y-store.d.ts +0 -46
  73. package/dist/apps/a11y/a11y-tooltip.d.ts +0 -11
  74. package/dist/apps/inspector/inspector-app.d.ts +0 -12
  75. package/dist/apps/module-graph/module-graph-app.d.ts +0 -5
  76. package/dist/apps/more/index.d.ts +0 -3
  77. package/dist/apps/more/index.js +0 -19
  78. package/dist/apps/more/more-app.d.ts +0 -5
  79. package/dist/apps/performance/performance-app.d.ts +0 -5
  80. package/dist/apps/performance/performance-tooltip.d.ts +0 -5
  81. package/dist/apps/seo/seo-app.d.ts +0 -5
  82. package/dist/apps/settings/settings-app.d.ts +0 -4
  83. package/dist/apps/tailwind/tailwind-app.d.ts +0 -5
  84. package/dist/apps/timeline/timeline-app.d.ts +0 -5
  85. package/dist/apps/vite-config/vite-config-app.d.ts +0 -5
  86. package/dist/hooks/create-hook.d.ts +0 -10
  87. package/dist/hooks/events.d.ts +0 -5
  88. package/dist/hooks/global-hook.d.ts +0 -15
  89. package/dist/hooks/index.d.ts +0 -6
  90. package/dist/packem_shared/Alert-H-x1JuZ0.js +0 -1
  91. package/dist/packem_shared/Badge-C30mDKKG.js +0 -1
  92. package/dist/packem_shared/Button-DODNCTPZ.js +0 -1
  93. package/dist/packem_shared/Card-DdI7Wn3t.js +0 -1
  94. package/dist/packem_shared/Icon-DWFLZkwW.js +0 -1
  95. package/dist/packem_shared/Input-GfbOwAkK.js +0 -1
  96. package/dist/packem_shared/Label-Bzi47aUf.js +0 -1
  97. package/dist/packem_shared/Popover-o3Vkvndp.js +0 -1
  98. package/dist/packem_shared/Progress-vGfFpxRn.js +0 -1
  99. package/dist/packem_shared/Separator-DQGeJPQg.js +0 -1
  100. package/dist/packem_shared/Skeleton-BYXau6jM.js +0 -1
  101. package/dist/packem_shared/Switch-BeC78S_T.js +0 -1
  102. package/dist/packem_shared/Tabs-BBc4S-2T.js +0 -1
  103. package/dist/packem_shared/Textarea-DvbSX13V.js +0 -1
  104. package/dist/packem_shared/TimelineStore-BgBrirKd.js +0 -1
  105. package/dist/packem_shared/Tooltip-BwK-2I9P.js +0 -1
  106. package/dist/packem_shared/cn-DWLJYh3h.js +0 -1
  107. package/dist/packem_shared/createClientRPCContext-DzKQpKTk.js +0 -1
  108. package/dist/packem_shared/createDevToolbarHook-DGNxqk8N.js +0 -1
  109. package/dist/packem_shared/createServerRPCContext-CRd6VAWp.js +0 -1
  110. package/dist/packem_shared/sharedToolbarStylesheet-DHHoFz2-.js +0 -2
  111. package/dist/packem_shared/store-BxE0w51s.js +0 -1
  112. package/dist/packem_shared/use-theme-CX1gG6Sv.js +0 -1
  113. package/dist/performance/monitor.d.ts +0 -115
  114. package/dist/rpc/client.d.ts +0 -7
  115. package/dist/rpc/functions/module-graph.d.ts +0 -17
  116. package/dist/rpc/functions/open-in-editor.d.ts +0 -14
  117. package/dist/rpc/functions/tailwind-config.d.ts +0 -12
  118. package/dist/rpc/functions/vite-config.d.ts +0 -7
  119. package/dist/rpc/server.d.ts +0 -12
  120. package/dist/timeline/capture.d.ts +0 -6
  121. package/dist/timeline/index.d.ts +0 -7
  122. package/dist/timeline/store.d.ts +0 -52
  123. package/dist/toolbar/app-manager.d.ts +0 -102
  124. package/dist/toolbar/components/app-button.d.ts +0 -19
  125. package/dist/toolbar/components/app-canvas.d.ts +0 -12
  126. package/dist/toolbar/components/app-tooltip-overlay.d.ts +0 -12
  127. package/dist/toolbar/components/first-visit-hint.d.ts +0 -16
  128. package/dist/toolbar/components/index.d.ts +0 -4
  129. package/dist/toolbar/components/pinned-tooltip-card.d.ts +0 -22
  130. package/dist/toolbar/components/toolbar-bar.d.ts +0 -14
  131. package/dist/toolbar/components/toolbar-container.d.ts +0 -55
  132. package/dist/toolbar/components/vite-overlay-button.d.ts +0 -14
  133. package/dist/toolbar/context/index.d.ts +0 -2
  134. package/dist/toolbar/context/toolbar-context.d.ts +0 -106
  135. package/dist/toolbar/global-api.d.ts +0 -24
  136. package/dist/toolbar/helpers.d.ts +0 -6
  137. package/dist/toolbar/hooks/index.d.ts +0 -10
  138. package/dist/toolbar/hooks/use-apps.d.ts +0 -13
  139. package/dist/toolbar/hooks/use-frame-state.d.ts +0 -94
  140. package/dist/toolbar/hooks/use-panel-visible.d.ts +0 -21
  141. package/dist/toolbar/hooks/use-position.d.ts +0 -22
  142. package/dist/toolbar/hooks/use-theme.d.ts +0 -13
  143. package/dist/toolbar/hooks/use-toolbar.d.ts +0 -14
  144. package/dist/toolbar/settings.d.ts +0 -17
  145. package/dist/toolbar/stylesheet.d.ts +0 -1
  146. package/dist/toolbar/utils/index.d.ts +0 -12
  147. package/dist/types/app.d.ts +0 -175
  148. package/dist/types/global-api.d.ts +0 -102
  149. package/dist/types/hooks.d.ts +0 -88
  150. package/dist/types/index.d.ts +0 -12
  151. package/dist/types/messaging.d.ts +0 -43
  152. package/dist/types/rpc.d.ts +0 -100
  153. package/dist/types/timeline.d.ts +0 -62
  154. package/dist/types/toolbar.d.ts +0 -56
  155. package/dist/ui/components/alert.d.ts +0 -20
  156. package/dist/ui/components/badge.d.ts +0 -10
  157. package/dist/ui/components/button.d.ts +0 -12
  158. package/dist/ui/components/card.d.ts +0 -17
  159. package/dist/ui/components/icon.d.ts +0 -21
  160. package/dist/ui/components/input.d.ts +0 -8
  161. package/dist/ui/components/label.d.ts +0 -8
  162. package/dist/ui/components/popover.d.ts +0 -27
  163. package/dist/ui/components/progress.d.ts +0 -8
  164. package/dist/ui/components/separator.d.ts +0 -9
  165. package/dist/ui/components/skeleton.d.ts +0 -7
  166. package/dist/ui/components/switch.d.ts +0 -12
  167. package/dist/ui/components/tabs.d.ts +0 -29
  168. package/dist/ui/components/textarea.d.ts +0 -8
  169. package/dist/ui/components/tooltip.d.ts +0 -19
  170. package/dist/utils/cn.d.ts +0 -8
  171. package/dist/vite/inject-source.d.ts +0 -25
  172. package/dist/vite/matcher.d.ts +0 -5
@@ -1,144 +1,158 @@
1
- import type { Plugin } from "vite";
2
- import type { DevToolbarApp, ServerFunctions } from "./types/index.d.ts";
3
- import type { InjectSourceIgnore } from "./vite/inject-source.d.ts";
1
+ import { Plugin } from 'vite';
2
+ import { D as DevToolbarApp, S as ServerFunctions } from "./packem_shared/app.d-SmKEDxsI.js";
3
+ import "./packem_shared/global-api.d-BLfn-OUA.js";
4
+ import '@babel/generator';
5
+ import 'preact';
6
+ interface InjectSourceIgnore {
7
+ /** Component names or patterns to skip. */
8
+ components?: (RegExp | string)[];
9
+ /** File paths or patterns to skip. */
10
+ files?: (RegExp | string)[];
11
+ }
4
12
  /**
5
- * Dev toolbar plugin options
6
- */
7
- export interface DevToolbarOptions {
8
- /**
9
- * append an import to the module id ending with `appendTo` instead of adding a script into body
10
- * useful for projects that do not use html file as an entry
11
- *
12
- * WARNING: only set this if you know exactly what it does.
13
- * @default ''
14
- */
15
- appendTo?: string | RegExp;
16
- /**
17
- * Built-in apps to enable
18
- */
19
- apps?: {
20
- [key: string]: boolean | undefined;
21
- a11y?: boolean;
22
- inspector?: boolean;
23
- moduleGraph?: boolean;
24
- performance?: boolean;
25
- seo?: boolean;
26
- settings?: boolean;
27
- tailwind?: boolean;
28
- timeline?: boolean;
29
- viteConfig?: boolean;
30
- };
31
- /**
32
- * Whether clicking outside the DevTools panel closes it.
33
- * @default true
34
- */
35
- closeOnOutsideClick?: boolean;
36
- /**
37
- * Custom apps to register
38
- */
39
- customApps?: DevToolbarApp[];
40
- /**
41
- * Whether toolbar is visible by default
42
- */
43
- defaultVisible?: boolean;
44
- /**
45
- * The editor to open when clicking "Open in editor" in the inspector.
46
- * Accepts any value supported by `launch-editor` — an editor name/alias
47
- * (e.g. `"code"`, `"webstorm"`, `"vim"`, `"atom"`) or the full path to
48
- * the editor executable.
49
- *
50
- * If omitted, `launch-editor` auto-detects the editor from the `EDITOR`
51
- * / `VISUAL` environment variables or from the currently running IDE
52
- * process detected on the OS process list.
53
- * @example "webstorm"
54
- * @example "code"
55
- */
56
- editor?: string;
57
- /**
58
- * Initial panel height as a percentage of the viewport height (20–95).
59
- * @default 60
60
- */
61
- height?: number;
62
- /**
63
- * Inject `data-vdt-source="<file>:<line>:<col>"` attributes into every JSX
64
- * opening element during development. This lets the inspector jump directly
65
- * to the source file when an element is clicked.
66
- *
67
- * Only active when `mode === 'development'`. Set `enabled: false` to opt out.
68
- * Use `ignore.files` / `ignore.components` to exclude specific paths or
69
- * component names (strings are treated as glob patterns).
70
- * @default { enabled: true }
71
- */
72
- injectSource?: {
73
- enabled?: boolean;
74
- ignore?: InjectSourceIgnore;
75
- };
76
- /**
77
- * Keyboard shortcut bindings.
78
- * These are project-level defaults; users can still override them via the
79
- * Settings app (stored in localStorage).
80
- */
81
- keybindings?: {
82
- /** Close active app / panel. @default "Escape" */
83
- close?: string;
84
- /** Toggle the DevTools panel open/closed. @default "Alt+Shift+D" */
85
- toggle?: string;
86
- };
87
- /**
88
- * Auto-hide the toolbar pill after this many milliseconds of inactivity.
89
- * Set to -1 to never auto-hide.
90
- * @default 5000
91
- */
92
- minimizePanelInactive?: number;
93
- /**
94
- * Toolbar placement (coarse shorthand sets the edge and rough horizontal
95
- * alignment of the toolbar pill).
96
- * @default "bottom-center"
97
- */
98
- placement?: "bottom-left" | "bottom-center" | "bottom-right";
99
- /**
100
- * Which edge of the viewport the toolbar pill is anchored to.
101
- * Takes precedence over the edge implied by `placement`.
102
- * @default "bottom"
103
- */
104
- position?: "bottom" | "left" | "right" | "top";
105
- /**
106
- * Reduce motion for accessibility (disables all CSS animations).
107
- * @default false
108
- */
109
- reduceMotion?: boolean;
110
- /**
111
- * Strip all @visulima/dev-toolbar imports and virtual modules when building
112
- * for production (i.e. when `command !== 'serve'` or `mode === 'production'`).
113
- * This guarantees the toolbar never ends up in a production bundle even if the
114
- * user accidentally imports our package in application code.
115
- * @default true
116
- */
117
- removeDevtoolsOnBuild?: boolean;
118
- /**
119
- * Only activate the toolbar when the URL contains a specific query parameter.
120
- * Useful for staging/production environments where you want opt-in debugging.
121
- * @example requireUrlFlag: true, urlFlagName: 'debug' → toolbar only shows when URL has ?debug=true
122
- * @default false
123
- */
124
- requireUrlFlag?: boolean;
125
- /**
126
- * Custom server RPC functions
127
- */
128
- serverFunctions?: Partial<ServerFunctions>;
129
- /**
130
- * The URL query parameter name used when requireUrlFlag is true.
131
- * @default 'devtools'
132
- */
133
- urlFlagName?: string;
134
- /**
135
- * Initial panel width as a percentage of the viewport width (20–95).
136
- * Applies when position is "left" or "right".
137
- * @default 80
138
- */
139
- width?: number;
13
+ * Dev toolbar plugin options
14
+ */
15
+ interface DevToolbarOptions {
16
+ /**
17
+ * append an import to the module id ending with `appendTo` instead of adding a script into body
18
+ * useful for projects that do not use html file as an entry
19
+ *
20
+ * WARNING: only set this if you know exactly what it does.
21
+ * @default Empty string (disabled).
22
+ */
23
+ appendTo?: string | RegExp;
24
+ /**
25
+ * Built-in apps to enable. All apps are disabled by default — only
26
+ * `viteConfig`, `settings`, and the "more" drawer are shown out of the box.
27
+ * Explicitly set an app to `true` to enable it.
28
+ * @example { inspector: true, seo: true }
29
+ */
30
+ apps?: {
31
+ [key: string]: boolean | undefined;
32
+ a11y?: boolean;
33
+ annotations?: boolean;
34
+ assets?: boolean;
35
+ inspector?: boolean;
36
+ moduleGraph?: boolean;
37
+ performance?: boolean;
38
+ seo?: boolean;
39
+ settings?: boolean;
40
+ tailwind?: boolean;
41
+ timeline?: boolean;
42
+ viteConfig?: boolean;
43
+ };
44
+ /**
45
+ * Whether clicking outside the DevTools panel closes it.
46
+ * @default true
47
+ */
48
+ closeOnOutsideClick?: boolean;
49
+ /**
50
+ * Custom apps to register
51
+ */
52
+ customApps?: DevToolbarApp[];
53
+ /**
54
+ * Whether toolbar is visible by default
55
+ */
56
+ defaultVisible?: boolean;
57
+ /**
58
+ * The editor to open when clicking "Open in editor" in the inspector.
59
+ * Accepts any value supported by `launch-editor` an editor name/alias
60
+ * (e.g. `"code"`, `"webstorm"`, `"vim"`, `"atom"`) or the full path to
61
+ * the editor executable.
62
+ *
63
+ * If omitted, `launch-editor` auto-detects the editor from the `EDITOR`
64
+ * / `VISUAL` environment variables or from the currently running IDE
65
+ * process detected on the OS process list.
66
+ * @example "webstorm"
67
+ * @example "code"
68
+ */
69
+ editor?: string;
70
+ /**
71
+ * Initial panel height as a percentage of the viewport height (20–95).
72
+ * @default 60
73
+ */
74
+ height?: number;
75
+ /**
76
+ * Inject `data-vdt-source="&lt;file>:&lt;line>:&lt;col>"` attributes into every JSX
77
+ * opening element during development. This lets the inspector jump directly
78
+ * to the source file when an element is clicked.
79
+ *
80
+ * Only active when `mode === 'development'`. Set `enabled: false` to opt out.
81
+ * Use `ignore.files` / `ignore.components` to exclude specific paths or
82
+ * component names (strings are treated as glob patterns).
83
+ * @default { enabled: true }
84
+ */
85
+ injectSource?: {
86
+ enabled?: boolean;
87
+ ignore?: InjectSourceIgnore;
88
+ };
89
+ /**
90
+ * Keyboard shortcut bindings.
91
+ * These are project-level defaults; users can still override them via the
92
+ * Settings app (stored in localStorage).
93
+ */
94
+ keybindings?: {
95
+ /** Close active app / panel. \@default "Escape" */
96
+ close?: string;
97
+ /** Toggle the DevTools panel open/closed. \@default "Alt+Shift+D" */
98
+ toggle?: string;
99
+ };
100
+ /**
101
+ * Auto-hide the toolbar pill after this many milliseconds of inactivity.
102
+ * Set to -1 to never auto-hide.
103
+ * @default 5000
104
+ */
105
+ minimizePanelInactive?: number;
106
+ /**
107
+ * Toolbar placement (coarse shorthand — sets the edge and rough horizontal
108
+ * alignment of the toolbar pill).
109
+ * @default "bottom-center"
110
+ */
111
+ placement?: "bottom-left" | "bottom-center" | "bottom-right";
112
+ /**
113
+ * Which edge of the viewport the toolbar pill is anchored to.
114
+ * Takes precedence over the edge implied by `placement`.
115
+ * @default "bottom"
116
+ */
117
+ position?: "bottom" | "left" | "right" | "top";
118
+ /**
119
+ * Reduce motion for accessibility (disables all CSS animations).
120
+ * @default false
121
+ */
122
+ reduceMotion?: boolean;
123
+ /**
124
+ * Strip all \@visulima/dev-toolbar imports and virtual modules when building
125
+ * for production (i.e. when `command !== 'serve'` or `mode === 'production'`).
126
+ * This guarantees the toolbar never ends up in a production bundle even if the
127
+ * user accidentally imports our package in application code.
128
+ * @default true
129
+ */
130
+ removeDevtoolsOnBuild?: boolean;
131
+ /**
132
+ * Only activate the toolbar when the URL contains a specific query parameter.
133
+ * Useful for staging/production environments where you want opt-in debugging.
134
+ * @example requireUrlFlag: true, urlFlagName: 'debug' → toolbar only shows when URL has ?debug=true
135
+ * @default false
136
+ */
137
+ requireUrlFlag?: boolean;
138
+ /**
139
+ * Custom server RPC functions
140
+ */
141
+ serverFunctions?: Partial<ServerFunctions>;
142
+ /**
143
+ * The URL query parameter name used when requireUrlFlag is true.
144
+ * @default 'devtools'
145
+ */
146
+ urlFlagName?: string;
147
+ /**
148
+ * Initial panel width as a percentage of the viewport width (20–95).
149
+ * Applies when position is "left" or "right".
150
+ * @default 80
151
+ */
152
+ width?: number;
140
153
  }
141
154
  /**
142
- * Dev toolbar Vite plugin
143
- */
144
- export declare const devToolbar: (options?: DevToolbarOptions) => Plugin[];
155
+ * Returns the Vite plugin array for the dev toolbar.
156
+ */
157
+ declare const devToolbar: (options?: DevToolbarOptions) => Plugin[];
158
+ export { DevToolbarOptions, devToolbar };
@@ -1,2 +1,5 @@
1
- var j=Object.defineProperty;var c=(e,o)=>j(e,"name",{value:o,configurable:!0});import{createRequire as w}from"node:module";import{normalizePath as F}from"vite";import{createServerRPCContext as C}from"./packem_shared/createServerRPCContext-CRd6VAWp.js";const T=w(import.meta.url),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=c(e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[o,u]=a.versions.node.split(".").map(Number);if(o>22||o===22&&u>=3||o===20&&u>=16)return a.getBuiltinModule(e)}return T(e)},"__cjs_getBuiltinModule"),$=v("node:fs"),P=v("node:path"),{fileURLToPath:x}=v("node:url");var O=Object.defineProperty,f=c((e,o)=>O(e,"name",{value:o,configurable:!0}),"s");const I=f(()=>F(P.dirname(x(import.meta.url))),"getDevToolbarPath"),R=f(e=>e.replace(/\?.*$/,""),"removeUrlQuery"),g="?__visulima-dev-toolbar-resource",m="virtual:visulima-dev-toolbar-options",h=`\0${m}`,l="virtual:visulima-dev-toolbar-path:",y="\0__visulima-dev-toolbar-empty",M=f((e={})=>{const o=I(),u=e.removeDevtoolsOnBuild??!0,_=e.injectSource?.enabled??!0;let d;return[{apply:"serve",configResolved(t){d=t},configureServer(t){C(t,e.serverFunctions,{editor:e.editor}),t.ws.on("connection",()=>{t.ws.send({event:"dev-toolbar:init",type:"custom"})})},enforce:"pre",async load(t){if(t===h)return`export default ${JSON.stringify({apps:{a11y:e.apps?.a11y??!0,inspector:e.apps?.inspector??!0,moduleGraph:e.apps?.moduleGraph??!0,performance:e.apps?.performance??!0,seo:e.apps?.seo??!0,settings:e.apps?.settings??!0,tailwind:e.apps?.tailwind??!0,timeline:e.apps?.timeline??!0,viteConfig:e.apps?.viteConfig??!0},base:d.base,closeOnOutsideClick:e.closeOnOutsideClick??!0,defaultVisible:e.defaultVisible??!0,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(g)){const r=R(t);return this.addWatchFile(r),await $.promises.readFile(r,"utf8")}},name:"@visulima/dev-toolbar",resolveId(t){if(t===m)return h;if(t.startsWith(l))return`${t.replace(l,`${o}/`)}${g}`},transform(t,r,s){if(s?.ssr)return;const{appendTo:i}=e,n=r.split("?",2)[0];if(i&&n&&(typeof i=="string"&&n.endsWith(i)||i instanceof RegExp&&i.test(n)))return`import '${l}client/overlay.js';
2
- ${t}`},transformIndexHtml(){return e.appendTo?void 0:{html:"",tags:[{attrs:{src:`${d.base||"/"}@id/${l}client/overlay.js`,type:"module"},injectTo:"head-prepend",tag:"script"}]}}},{enforce:"pre",name:"@visulima/dev-toolbar:inject-source",async transform(t,r){if(!_||d.mode!=="development"||r.includes("node_modules")||r.includes("?raw")||/\/dist\/|\/build\//.test(r)||!/\.[jt]sx$/.test(r.split("?")[0]??""))return;const{readFile:s}=await import("node:fs/promises");let i;try{const b=await s(r.split("?")[0]??r,"utf-8");b!==t&&(i=b)}catch{}const{addSourceToJsx:n}=await import("./packem_chunks/inject-source.js"),p=n(t,r,e.injectSource?.ignore,i);if(p)return{code:p.code??t,map:p.map??null}}},{apply(t,{command:r,mode:s}){return u&&(r!=="serve"||s==="production")},load(t){if(t===y)return"export default {};"},name:"@visulima/dev-toolbar:remove-on-build",resolveId(t){if(t===m||t.startsWith(l))return y}}]},"devToolbar");export{M as devToolbar};
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-D-yZrEjs.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,15 +1,13 @@
1
1
  {
2
2
  "name": "@visulima/dev-toolbar",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.30",
4
4
  "description": "Devtools is a set of tools for building advanced devtools for your application",
5
5
  "keywords": [
6
- "visulima",
7
- "dev-toolbar"
6
+ "dev-toolbar",
7
+ "visulima"
8
8
  ],
9
9
  "homepage": "https://visulima.com/packages/dev-toolbar",
10
- "bugs": {
11
- "url": "https://github.com/visulima/visulima/issues"
12
- },
10
+ "bugs": "https://github.com/visulima/visulima/issues",
13
11
  "repository": {
14
12
  "type": "git",
15
13
  "url": "git+https://github.com/visulima/visulima.git",
@@ -49,6 +47,10 @@
49
47
  "types": "./dist/apps/a11y/index.d.ts",
50
48
  "default": "./dist/apps/a11y/index.js"
51
49
  },
50
+ "./apps/assets": {
51
+ "types": "./dist/apps/assets/index.d.ts",
52
+ "default": "./dist/apps/assets/index.js"
53
+ },
52
54
  "./apps/inspector": {
53
55
  "types": "./dist/apps/inspector/index.d.ts",
54
56
  "default": "./dist/apps/inspector/index.js"
@@ -61,10 +63,6 @@
61
63
  "types": "./dist/apps/module-graph/index.d.ts",
62
64
  "default": "./dist/apps/module-graph/index.js"
63
65
  },
64
- "./apps/more": {
65
- "types": "./dist/apps/more/index.d.ts",
66
- "default": "./dist/apps/more/index.js"
67
- },
68
66
  "./apps/performance": {
69
67
  "types": "./dist/apps/performance/index.d.ts",
70
68
  "default": "./dist/apps/performance/index.js"
@@ -81,10 +79,18 @@
81
79
  "types": "./dist/apps/timeline/index.d.ts",
82
80
  "default": "./dist/apps/timeline/index.js"
83
81
  },
82
+ "./apps/annotations": {
83
+ "types": "./dist/apps/annotations/index.d.ts",
84
+ "default": "./dist/apps/annotations/index.js"
85
+ },
84
86
  "./apps/vite-config": {
85
87
  "types": "./dist/apps/vite-config/index.d.ts",
86
88
  "default": "./dist/apps/vite-config/index.js"
87
89
  },
90
+ "./mcp": {
91
+ "types": "./dist/mcp/server.d.ts",
92
+ "default": "./dist/mcp/server.js"
93
+ },
88
94
  "./toolbar": {
89
95
  "types": "./dist/toolbar/index.d.ts",
90
96
  "default": "./dist/toolbar/index.js"
@@ -95,28 +101,42 @@
95
101
  },
96
102
  "./package.json": "./package.json"
97
103
  },
104
+ "bin": {
105
+ "visulima-dev-toolbar-mcp": "./bin/mcp.js"
106
+ },
98
107
  "files": [
108
+ "bin",
99
109
  "dist",
100
110
  "README.md",
101
111
  "CHANGELOG.md"
102
112
  ],
103
113
  "dependencies": {
104
114
  "@babel/generator": "^7.29.1",
105
- "@babel/parser": "^7.29.0",
115
+ "@babel/parser": "7.29.3",
106
116
  "@babel/traverse": "^7.29.0",
107
- "@babel/types": "^7.29.0",
108
117
  "@floating-ui/dom": "^1.7.6",
109
- "axe-core": "^4.11.1",
110
- "clsx": "^2.1.1",
111
- "launch-editor": "^2.13.1",
112
- "preact": "^10.28.4",
113
- "tailwind-merge": "^3.5.0"
118
+ "launch-editor": "2.13.2",
119
+ "preact": "^10.29.2"
114
120
  },
115
121
  "peerDependencies": {
116
- "vite": "^6 || ^7"
122
+ "@modelcontextprotocol/sdk": "^1.29.0",
123
+ "axe-core": "4.11.4",
124
+ "vite": "^8.0.11",
125
+ "zod": "^3.25.0 || ^4.0.0"
126
+ },
127
+ "peerDependenciesMeta": {
128
+ "@modelcontextprotocol/sdk": {
129
+ "optional": true
130
+ },
131
+ "axe-core": {
132
+ "optional": true
133
+ },
134
+ "zod": {
135
+ "optional": true
136
+ }
117
137
  },
118
138
  "engines": {
119
- "node": ">=22.21 <26"
139
+ "node": "^22.14.0 || >=24.10.0"
120
140
  },
121
141
  "publishConfig": {
122
142
  "access": "public",
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppComponentProps } from "../../types/app.d.ts";
4
- declare const A11yApp: (_props: AppComponentProps) => ComponentChildren;
5
- export default A11yApp;
@@ -1,46 +0,0 @@
1
- export type Severity = "critical" | "minor" | "moderate" | "serious";
2
- export type Standard = "best-practice" | "wcag21aa" | "wcag22aa" | "wcag2a";
3
- export interface A11yNode {
4
- html: string;
5
- selector: string;
6
- }
7
- export interface A11yIssue {
8
- helpUrl: string;
9
- id: string;
10
- impact: Severity;
11
- message: string;
12
- nodes: A11yNode[];
13
- wcagTags: string[];
14
- }
15
- export interface A11yStoreState {
16
- isScanning: boolean;
17
- issues: A11yIssue[];
18
- lastScan: null | string;
19
- scanError: null | string;
20
- showOverlays: boolean;
21
- standard: Standard;
22
- }
23
- export declare const SEVERITY_ORDER: Severity[];
24
- type Listener = () => void;
25
- declare class A11yStore {
26
- private listeners;
27
- private state;
28
- constructor();
29
- /** Remove all outline highlights from the page */
30
- clearHighlights(): void;
31
- getState(): Readonly<A11yStoreState>;
32
- /** Scroll to and outline a single issue's elements */
33
- highlightIssue(issue: A11yIssue): void;
34
- /** Run an axe-core scan and persist results */
35
- scan(disabledRules?: string[]): Promise<void>;
36
- /** Toggle overlay highlights on all affected elements */
37
- setShowOverlays(show: boolean): void;
38
- /** Change the WCAG standard used for future scans */
39
- setStandard(standard: Standard): void;
40
- subscribe(function_: Listener): () => void;
41
- private notify;
42
- private persist;
43
- private update;
44
- }
45
- export declare const a11yStore: A11yStore;
46
- export {};
@@ -1,11 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppTooltipProps } from "../../types/app.d.ts";
4
- /**
5
- * Hover tooltip for the Accessibility app button.
6
- * Shows a summary of scan results and quick action buttons.
7
- * @param _props Tooltip props (unused; reads from a11yStore directly)
8
- * @returns Rendered tooltip component
9
- */
10
- declare const A11yTooltip: (_props: AppTooltipProps) => ComponentChildren;
11
- export default A11yTooltip;
@@ -1,12 +0,0 @@
1
- /**
2
- * Start element inspection mode.
3
- * Attaches crosshair cursor, hover highlight overlay, and a floating badge.
4
- * Survives component unmounts — state lives at module level.
5
- * @param onComplete Called when the user clicks an element (after cleanup).
6
- * @param onCancel Called when the user cancels via badge button or Escape.
7
- */
8
- export declare const startGlobalInspection: (onComplete: () => void, onCancel: () => void) => void;
9
- /**
10
- * Cancel any in-progress inspection and clean up all DOM side-effects.
11
- */
12
- export declare const stopGlobalInspection: () => void;
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppComponentProps } from "../../types/app.d.ts";
4
- declare const ModuleGraphApp: ({ helpers }: AppComponentProps) => ComponentChildren;
5
- export default ModuleGraphApp;
@@ -1,3 +0,0 @@
1
- import type { DevToolbarApp } from "../../types/app.d.ts";
2
- declare const moreApp: DevToolbarApp;
3
- export default moreApp;
@@ -1,19 +0,0 @@
1
- var p=Object.defineProperty;var s=(n,t)=>p(n,"name",{value:t,configurable:!0});import{addHookName as m}from"preact/devtools";import{useState as u,useEffect as f}from"preact/hooks";import g from"../../packem_shared/cn-DWLJYh3h.js";import{jsxs as o,jsx as r}from"preact/jsx-runtime";const h=`<!-- @license lucide-static v0.576.0 - ISC -->
2
- <svg
3
- class="lucide lucide-more-horizontal"
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="24"
6
- height="24"
7
- viewBox="0 0 24 24"
8
- fill="none"
9
- stroke="currentColor"
10
- stroke-width="2"
11
- stroke-linecap="round"
12
- stroke-linejoin="round"
13
- >
14
- <circle cx="12" cy="12" r="1" />
15
- <circle cx="19" cy="12" r="1" />
16
- <circle cx="5" cy="12" r="1" />
17
- </svg>
18
- `;var x=Object.defineProperty,i=s((n,t)=>x(n,"name",{value:t,configurable:!0}),"s");const b=i(n=>{const[t,c]=m(u([]),"apps");f(()=>{const e=globalThis.__VISULIMA_DEVTOOLS__;if(!e)return;const a=(e.getApps()??[]).filter(d=>!["dev-toolbar:a11y","dev-toolbar:module-graph","dev-toolbar:more","dev-toolbar:performance","dev-toolbar:seo","dev-toolbar:settings","dev-toolbar:timeline","dev-toolbar:vite-config"].includes(d.id));c(a)},[]);const l=i(e=>{globalThis.__VISULIMA_DEVTOOLS__?.openApp(e).catch(console.error)},"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__
19
- .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:i(()=>l(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"),A={component:b,icon:h,id:"dev-toolbar:more",name:"More"};export{A as default};
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppComponentProps } from "../../types/app.d.ts";
4
- declare const MoreApp: (_props: AppComponentProps) => ComponentChildren;
5
- export default MoreApp;
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppComponentProps } from "../../types/app.d.ts";
4
- declare const PerformanceApp: (_props: AppComponentProps) => ComponentChildren;
5
- export default PerformanceApp;
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppTooltipProps } from "../../types/app.d.ts";
4
- declare const PerformanceTooltip: (_props: AppTooltipProps) => ComponentChildren;
5
- export default PerformanceTooltip;
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppComponentProps } from "../../types/app.d.ts";
4
- declare const SeoApp: (_props: AppComponentProps) => ComponentChildren;
5
- export default SeoApp;
@@ -1,4 +0,0 @@
1
- import type { ComponentChildren } from "preact";
2
- import type { AppComponentProps } from "../../types/app.d.ts";
3
- declare const SettingsApp: (_props: AppComponentProps) => ComponentChildren;
4
- export default SettingsApp;
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppComponentProps } from "../../types/app.d.ts";
4
- declare const TailwindApp: ({ helpers }: AppComponentProps) => ComponentChildren;
5
- export default TailwindApp;
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppComponentProps } from "../../types/app.d.ts";
4
- declare const TimelineApp: (_props: AppComponentProps) => ComponentChildren;
5
- export default TimelineApp;
@@ -1,5 +0,0 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren } from "preact";
3
- import type { AppComponentProps } from "../../types/app.d.ts";
4
- declare const ViteConfigApp: ({ helpers }: AppComponentProps) => ComponentChildren;
5
- export default ViteConfigApp;
@@ -1,10 +0,0 @@
1
- import type { DevToolbarApp } from "../types/app.d.ts";
2
- import type { DevToolbarHook } from "../types/hooks.d.ts";
3
- import type { TimelineEvent } from "../types/timeline.d.ts";
4
- /**
5
- * Creates a dev toolbar hook instance
6
- * @param onRegisterApp Callback when app is registered
7
- * @param onTimelineEvent Callback when timeline event is added
8
- * @returns Hook instance
9
- */
10
- export declare const createDevToolbarHook: (onRegisterApp?: (app: DevToolbarApp) => void, onTimelineEvent?: (groupId: string, event: TimelineEvent) => void) => DevToolbarHook;