@visulima/dev-toolbar 1.0.0-alpha.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/CHANGELOG.md +471 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +64 -17
  4. package/bin/mcp.js +1 -1
  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 +3 -2
  8. package/dist/apps/annotations/index.js +2 -2
  9. package/dist/apps/assets/index.d.ts +3 -2
  10. package/dist/apps/assets/index.js +2 -2
  11. package/dist/apps/inspector/index.d.ts +3 -2
  12. package/dist/apps/inspector/index.js +11 -11
  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 +5 -5
  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 +133 -8
  30. package/dist/index.js +1 -1
  31. package/dist/mcp/server.d.ts +2 -12
  32. package/dist/mcp/server.js +1 -1
  33. package/dist/packem_chunks/inject-source.js +7 -9
  34. package/dist/packem_shared/Alert-CZq7C43v.js +1 -0
  35. package/dist/packem_shared/Badge-PpblpNWg.js +1 -0
  36. package/dist/packem_shared/Button-CAKvtfij.js +1 -0
  37. package/dist/packem_shared/Card-BSy2oRiS.js +1 -0
  38. package/dist/packem_shared/Icon-0XYV-4AL.js +1 -0
  39. package/dist/packem_shared/{Input-Cs6aduTi.js → Input-Dc1WiT01.js} +1 -1
  40. package/dist/packem_shared/Label-BZh8XxUb.js +1 -0
  41. package/dist/packem_shared/Popover-DuiU8EPg.js +1 -0
  42. package/dist/packem_shared/Progress-C90LC--2.js +1 -0
  43. package/dist/packem_shared/Select-CwD-d0pi.js +1 -0
  44. package/dist/packem_shared/Separator-PSjfhX_W.js +1 -0
  45. package/dist/packem_shared/Skeleton-BAFrGUR1.js +1 -0
  46. package/dist/packem_shared/Switch-Wpsp5M3p.js +1 -0
  47. package/dist/packem_shared/Tabs-BdNFQd3c.js +1 -0
  48. package/dist/packem_shared/{Textarea-Yfg3dLZi.js → Textarea-DP9gpte-.js} +1 -1
  49. package/dist/packem_shared/Tooltip-DVeuszoY.js +1 -0
  50. package/dist/packem_shared/annotation-settings-DlLZO5Zp.js +1 -0
  51. package/dist/packem_shared/annotation-store-CXMIg0dM.js +1 -0
  52. package/dist/packem_shared/app.d-SmKEDxsI.d.ts +229 -0
  53. package/dist/packem_shared/clsx-CtZWcPHt.js +1 -0
  54. package/dist/packem_shared/createClientRPCContext-5Bh0Q7ai.js +1 -0
  55. package/dist/packem_shared/createDevToolbarHook-C_TF-RyL.js +1 -0
  56. package/dist/packem_shared/createServerRPCContext-2MNcj-v3.js +1 -0
  57. package/dist/packem_shared/getGlobalHook-D6jRtv7N.js +1 -0
  58. package/dist/packem_shared/getTimelineStore-BT5sImVb.js +1 -0
  59. package/dist/packem_shared/global-api.d-DeaCvII9.d.ts +546 -0
  60. package/dist/packem_shared/loadSettings-C0pUyx9j.js +1 -0
  61. package/dist/packem_shared/server.d-ZkcY0pge.d.ts +39 -0
  62. package/dist/packem_shared/sharedToolbarStylesheet-DCndH0A0.js +2 -0
  63. package/dist/packem_shared/store-Dqy0FbGw.js +1 -0
  64. package/dist/packem_shared/use-theme-DIqZkPAe.js +1 -0
  65. package/dist/toolbar/index.d.ts +152 -48
  66. package/dist/toolbar/index.js +3 -3
  67. package/dist/ui/index.d.ts +382 -18
  68. package/dist/ui/index.js +1 -1
  69. package/dist/vite-plugin.d.ts +183 -146
  70. package/dist/vite-plugin.js +4 -4
  71. package/package.json +14 -16
  72. package/dist/apps/a11y/a11y-app.d.ts +0 -4
  73. package/dist/apps/a11y/a11y-store.d.ts +0 -42
  74. package/dist/apps/a11y/a11y-tooltip.d.ts +0 -10
  75. package/dist/apps/annotations/annotations-app.d.ts +0 -4
  76. package/dist/apps/assets/assets-app.d.ts +0 -4
  77. package/dist/apps/inspector/a11y-capture.d.ts +0 -12
  78. package/dist/apps/inspector/annotation-overlay.d.ts +0 -55
  79. package/dist/apps/inspector/annotation-settings.d.ts +0 -33
  80. package/dist/apps/inspector/element-utils.d.ts +0 -115
  81. package/dist/apps/inspector/freeze-animations.d.ts +0 -22
  82. package/dist/apps/inspector/inspector-app.d.ts +0 -14
  83. package/dist/apps/inspector/rulers.d.ts +0 -14
  84. package/dist/apps/inspector/theme-palette.d.ts +0 -34
  85. package/dist/apps/module-graph/module-graph-app.d.ts +0 -4
  86. package/dist/apps/performance/performance-app.d.ts +0 -4
  87. package/dist/apps/performance/performance-tooltip.d.ts +0 -4
  88. package/dist/apps/seo/seo-app.d.ts +0 -4
  89. package/dist/apps/settings/settings-app.d.ts +0 -4
  90. package/dist/apps/tailwind/tailwind-app.d.ts +0 -4
  91. package/dist/apps/timeline/timeline-app.d.ts +0 -4
  92. package/dist/apps/vite-config/vite-config-app.d.ts +0 -4
  93. package/dist/hooks/create-hook.d.ts +0 -12
  94. package/dist/hooks/events.d.ts +0 -7
  95. package/dist/hooks/global-hook.d.ts +0 -15
  96. package/dist/hooks/index.d.ts +0 -6
  97. package/dist/packem_shared/Alert-D2CvX4fw.js +0 -1
  98. package/dist/packem_shared/Badge-BEgU04nl.js +0 -1
  99. package/dist/packem_shared/Button-Bkx66Co7.js +0 -1
  100. package/dist/packem_shared/Card-CJa4vHVc.js +0 -1
  101. package/dist/packem_shared/Icon-B6UHkC0o.js +0 -1
  102. package/dist/packem_shared/Label-DyCng4Cp.js +0 -1
  103. package/dist/packem_shared/Popover-BtFVaZYg.js +0 -1
  104. package/dist/packem_shared/Progress-DN6zn-0l.js +0 -1
  105. package/dist/packem_shared/Select-DgQ4ss-s.js +0 -1
  106. package/dist/packem_shared/Separator-D38mKeZv.js +0 -1
  107. package/dist/packem_shared/Skeleton-Dv-tcA1P.js +0 -1
  108. package/dist/packem_shared/Switch-C3NTpeoR.js +0 -1
  109. package/dist/packem_shared/Tabs-DKWMiawt.js +0 -1
  110. package/dist/packem_shared/Tooltip-CioncSXj.js +0 -1
  111. package/dist/packem_shared/annotation-settings-Bv0TH4WI.js +0 -1
  112. package/dist/packem_shared/annotation-store-bLQRYMaI.js +0 -1
  113. package/dist/packem_shared/clsx-wGlvpUfw.js +0 -1
  114. package/dist/packem_shared/createClientRPCContext-DgRxrllw.js +0 -1
  115. package/dist/packem_shared/createDevToolbarHook-4bZZiHPI.js +0 -1
  116. package/dist/packem_shared/createServerRPCContext-CJ6F87o_.js +0 -1
  117. package/dist/packem_shared/getTimelineStore-B1cfjWV8.js +0 -1
  118. package/dist/packem_shared/loadSettings-hvjR4fcS.js +0 -1
  119. package/dist/packem_shared/setupGlobalHook-CCf9Logv.js +0 -1
  120. package/dist/packem_shared/sharedToolbarStylesheet-CaTdYhVe.js +0 -2
  121. package/dist/packem_shared/store-DaUtLjf3.js +0 -1
  122. package/dist/packem_shared/use-frame-state-CxrlPUM5.js +0 -1
  123. package/dist/packem_shared/use-theme-zpm4zmqP.js +0 -1
  124. package/dist/performance/monitor.d.ts +0 -116
  125. package/dist/rpc/client.d.ts +0 -9
  126. package/dist/rpc/functions/annotations.d.ts +0 -28
  127. package/dist/rpc/functions/assets.d.ts +0 -16
  128. package/dist/rpc/functions/module-graph.d.ts +0 -17
  129. package/dist/rpc/functions/open-in-editor.d.ts +0 -16
  130. package/dist/rpc/functions/tailwind-config.d.ts +0 -15
  131. package/dist/rpc/functions/vite-config.d.ts +0 -83
  132. package/dist/rpc/server.d.ts +0 -15
  133. package/dist/store/annotation-store.d.ts +0 -41
  134. package/dist/timeline/capture.d.ts +0 -8
  135. package/dist/timeline/index.d.ts +0 -8
  136. package/dist/timeline/store.d.ts +0 -42
  137. package/dist/toolbar/app-manager.d.ts +0 -104
  138. package/dist/toolbar/components/app-button.d.ts +0 -18
  139. package/dist/toolbar/components/app-canvas.d.ts +0 -12
  140. package/dist/toolbar/components/app-tooltip-overlay.d.ts +0 -12
  141. package/dist/toolbar/components/first-visit-hint.d.ts +0 -15
  142. package/dist/toolbar/components/index.d.ts +0 -4
  143. package/dist/toolbar/components/pinned-tooltip-card.d.ts +0 -22
  144. package/dist/toolbar/components/toolbar-bar.d.ts +0 -9
  145. package/dist/toolbar/components/toolbar-container.d.ts +0 -49
  146. package/dist/toolbar/components/vite-overlay-button.d.ts +0 -14
  147. package/dist/toolbar/context/index.d.ts +0 -2
  148. package/dist/toolbar/context/toolbar-context.d.ts +0 -107
  149. package/dist/toolbar/global-api.d.ts +0 -24
  150. package/dist/toolbar/helpers.d.ts +0 -8
  151. package/dist/toolbar/hooks/index.d.ts +0 -10
  152. package/dist/toolbar/hooks/use-apps.d.ts +0 -15
  153. package/dist/toolbar/hooks/use-frame-state.d.ts +0 -110
  154. package/dist/toolbar/hooks/use-panel-visible.d.ts +0 -23
  155. package/dist/toolbar/hooks/use-position.d.ts +0 -24
  156. package/dist/toolbar/hooks/use-theme.d.ts +0 -15
  157. package/dist/toolbar/hooks/use-toolbar.d.ts +0 -16
  158. package/dist/toolbar/settings.d.ts +0 -17
  159. package/dist/toolbar/stylesheet.d.ts +0 -3
  160. package/dist/toolbar/utils/index.d.ts +0 -12
  161. package/dist/types/annotations.d.ts +0 -156
  162. package/dist/types/app.d.ts +0 -175
  163. package/dist/types/global-api.d.ts +0 -91
  164. package/dist/types/hooks.d.ts +0 -86
  165. package/dist/types/index.d.ts +0 -13
  166. package/dist/types/messaging.d.ts +0 -43
  167. package/dist/types/rpc.d.ts +0 -137
  168. package/dist/types/timeline.d.ts +0 -62
  169. package/dist/types/toolbar.d.ts +0 -56
  170. package/dist/ui/components/alert.d.ts +0 -19
  171. package/dist/ui/components/badge.d.ts +0 -9
  172. package/dist/ui/components/button.d.ts +0 -11
  173. package/dist/ui/components/card.d.ts +0 -16
  174. package/dist/ui/components/icon.d.ts +0 -19
  175. package/dist/ui/components/input.d.ts +0 -7
  176. package/dist/ui/components/label.d.ts +0 -7
  177. package/dist/ui/components/popover.d.ts +0 -27
  178. package/dist/ui/components/progress.d.ts +0 -7
  179. package/dist/ui/components/select.d.ts +0 -54
  180. package/dist/ui/components/separator.d.ts +0 -8
  181. package/dist/ui/components/skeleton.d.ts +0 -6
  182. package/dist/ui/components/switch.d.ts +0 -11
  183. package/dist/ui/components/tabs.d.ts +0 -28
  184. package/dist/ui/components/textarea.d.ts +0 -7
  185. package/dist/ui/components/tooltip.d.ts +0 -19
  186. package/dist/vite/inject-source.d.ts +0 -24
  187. package/dist/vite/matcher.d.ts +0 -6
@@ -1,149 +1,186 @@
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 { R as ReadFileOptions } from "./packem_shared/server.d-ZkcY0pge.js";
3
+ import { D as DevToolbarApp, S as ServerFunctions } from "./packem_shared/app.d-SmKEDxsI.js";
4
+ import "./packem_shared/global-api.d-DeaCvII9.js";
5
+ import '@babel/generator';
6
+ import 'preact';
7
+ interface InjectSourceIgnore {
8
+ /** Component names or patterns to skip. */
9
+ components?: (RegExp | string)[];
10
+ /** File paths or patterns to skip. */
11
+ files?: (RegExp | string)[];
12
+ }
4
13
  /**
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 Empty string (disabled).
14
- */
15
- appendTo?: string | RegExp;
16
- /**
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 }
21
- */
22
- apps?: {
23
- [key: string]: boolean | undefined;
24
- a11y?: boolean;
25
- annotations?: boolean;
26
- assets?: boolean;
27
- inspector?: boolean;
28
- moduleGraph?: boolean;
29
- performance?: boolean;
30
- seo?: boolean;
31
- settings?: boolean;
32
- tailwind?: boolean;
33
- timeline?: boolean;
34
- viteConfig?: boolean;
35
- };
36
- /**
37
- * Whether clicking outside the DevTools panel closes it.
38
- * @default true
39
- */
40
- closeOnOutsideClick?: boolean;
41
- /**
42
- * Custom apps to register
43
- */
44
- customApps?: DevToolbarApp[];
45
- /**
46
- * Whether toolbar is visible by default
47
- */
48
- defaultVisible?: boolean;
49
- /**
50
- * The editor to open when clicking "Open in editor" in the inspector.
51
- * Accepts any value supported by `launch-editor` — an editor name/alias
52
- * (e.g. `"code"`, `"webstorm"`, `"vim"`, `"atom"`) or the full path to
53
- * the editor executable.
54
- *
55
- * If omitted, `launch-editor` auto-detects the editor from the `EDITOR`
56
- * / `VISUAL` environment variables or from the currently running IDE
57
- * process detected on the OS process list.
58
- * @example "webstorm"
59
- * @example "code"
60
- */
61
- editor?: string;
62
- /**
63
- * Initial panel height as a percentage of the viewport height (20–95).
64
- * @default 60
65
- */
66
- height?: number;
67
- /**
68
- * Inject `data-vdt-source="<file>:<line>:<col>"` attributes into every JSX
69
- * opening element during development. This lets the inspector jump directly
70
- * to the source file when an element is clicked.
71
- *
72
- * Only active when `mode === 'development'`. Set `enabled: false` to opt out.
73
- * Use `ignore.files` / `ignore.components` to exclude specific paths or
74
- * component names (strings are treated as glob patterns).
75
- * @default { enabled: true }
76
- */
77
- injectSource?: {
78
- enabled?: boolean;
79
- ignore?: InjectSourceIgnore;
80
- };
81
- /**
82
- * Keyboard shortcut bindings.
83
- * These are project-level defaults; users can still override them via the
84
- * Settings app (stored in localStorage).
85
- */
86
- keybindings?: {
87
- /** Close active app / panel. \@default "Escape" */
88
- close?: string;
89
- /** Toggle the DevTools panel open/closed. \@default "Alt+Shift+D" */
90
- toggle?: string;
91
- };
92
- /**
93
- * Auto-hide the toolbar pill after this many milliseconds of inactivity.
94
- * Set to -1 to never auto-hide.
95
- * @default 5000
96
- */
97
- minimizePanelInactive?: number;
98
- /**
99
- * Toolbar placement (coarse shorthand — sets the edge and rough horizontal
100
- * alignment of the toolbar pill).
101
- * @default "bottom-center"
102
- */
103
- placement?: "bottom-left" | "bottom-center" | "bottom-right";
104
- /**
105
- * Which edge of the viewport the toolbar pill is anchored to.
106
- * Takes precedence over the edge implied by `placement`.
107
- * @default "bottom"
108
- */
109
- position?: "bottom" | "left" | "right" | "top";
110
- /**
111
- * Reduce motion for accessibility (disables all CSS animations).
112
- * @default false
113
- */
114
- reduceMotion?: boolean;
115
- /**
116
- * Strip all \@visulima/dev-toolbar imports and virtual modules when building
117
- * for production (i.e. when `command !== 'serve'` or `mode === 'production'`).
118
- * This guarantees the toolbar never ends up in a production bundle even if the
119
- * user accidentally imports our package in application code.
120
- * @default true
121
- */
122
- removeDevtoolsOnBuild?: boolean;
123
- /**
124
- * Only activate the toolbar when the URL contains a specific query parameter.
125
- * Useful for staging/production environments where you want opt-in debugging.
126
- * @example requireUrlFlag: true, urlFlagName: 'debug' toolbar only shows when URL has ?debug=true
127
- * @default false
128
- */
129
- requireUrlFlag?: boolean;
130
- /**
131
- * Custom server RPC functions
132
- */
133
- serverFunctions?: Partial<ServerFunctions>;
134
- /**
135
- * The URL query parameter name used when requireUrlFlag is true.
136
- * @default 'devtools'
137
- */
138
- urlFlagName?: string;
139
- /**
140
- * Initial panel width as a percentage of the viewport width (20–95).
141
- * Applies when position is "left" or "right".
142
- * @default 80
143
- */
144
- width?: number;
14
+ * Dev toolbar plugin options
15
+ */
16
+ interface DevToolbarOptions {
17
+ /**
18
+ * append an import to the module id ending with `appendTo` instead of adding a script into body
19
+ * useful for projects that do not use html file as an entry
20
+ *
21
+ * WARNING: only set this if you know exactly what it does.
22
+ * @default Empty string (disabled).
23
+ */
24
+ appendTo?: string | RegExp;
25
+ /**
26
+ * Built-in apps to enable. All apps are disabled by default — only
27
+ * `viteConfig`, `settings`, and the "more" drawer are shown out of the box.
28
+ * Explicitly set an app to `true` to enable it.
29
+ * @example { inspector: true, seo: true }
30
+ */
31
+ apps?: {
32
+ [key: string]: boolean | undefined;
33
+ a11y?: boolean;
34
+ annotations?: boolean;
35
+ assets?: boolean;
36
+ inspector?: boolean;
37
+ moduleGraph?: boolean;
38
+ performance?: boolean;
39
+ seo?: boolean;
40
+ settings?: boolean;
41
+ tailwind?: boolean;
42
+ timeline?: boolean;
43
+ viteConfig?: boolean;
44
+ };
45
+ /**
46
+ * Whether clicking outside the DevTools panel closes it.
47
+ * @default true
48
+ */
49
+ closeOnOutsideClick?: boolean;
50
+ /**
51
+ * Custom apps to register
52
+ */
53
+ customApps?: DevToolbarApp[];
54
+ /**
55
+ * Whether toolbar is visible by default
56
+ */
57
+ defaultVisible?: boolean;
58
+ /**
59
+ * The editor to open when clicking "Open in editor" in the inspector.
60
+ * Accepts any value supported by `launch-editor` — an editor name/alias
61
+ * (e.g. `"code"`, `"webstorm"`, `"vim"`, `"atom"`) or the full path to
62
+ * the editor executable.
63
+ *
64
+ * If omitted, `launch-editor` auto-detects the editor from the `EDITOR`
65
+ * / `VISUAL` environment variables or from the currently running IDE
66
+ * process detected on the OS process list.
67
+ * @example "webstorm"
68
+ * @example "code"
69
+ */
70
+ editor?: string;
71
+ /**
72
+ * Master switch for the whole plugin. When `false`, `devToolbar()` returns an
73
+ * empty plugin array, so no virtual modules, RPC server, or client overlay are
74
+ * registered — the equivalent of removing the plugin from `vite.config.ts`
75
+ * without editing the config.
76
+ *
77
+ * Handy for CI/preview environments:
78
+ * `devToolbar({ enabled: !process.env.CI })`.
79
+ * @default true
80
+ */
81
+ enabled?: boolean;
82
+ /**
83
+ * Initial panel height as a percentage of the viewport height (20–95).
84
+ * @default 60
85
+ */
86
+ height?: number;
87
+ /**
88
+ * Inject `data-vdt-source="&lt;file>:&lt;line>:&lt;col>"` attributes into every JSX
89
+ * opening element during development. This lets the inspector jump directly
90
+ * to the source file when an element is clicked.
91
+ *
92
+ * Only active when `mode === 'development'`. Set `enabled: false` to opt out.
93
+ * Use `ignore.files` / `ignore.components` to exclude specific paths or
94
+ * component names (strings are treated as glob patterns).
95
+ * @default { enabled: true }
96
+ */
97
+ injectSource?: {
98
+ enabled?: boolean;
99
+ ignore?: InjectSourceIgnore;
100
+ };
101
+ /**
102
+ * Keyboard shortcut bindings.
103
+ * These are project-level defaults; users can still override them via the
104
+ * Settings app (stored in localStorage).
105
+ */
106
+ keybindings?: {
107
+ /** Close active app / panel. \@default "Escape" */
108
+ close?: string;
109
+ /** Toggle the DevTools panel open/closed. \@default "Alt+Shift+D" */
110
+ toggle?: string;
111
+ };
112
+ /**
113
+ * Auto-hide the toolbar pill after this many milliseconds of inactivity.
114
+ * Set to -1 to never auto-hide.
115
+ * @default 5000
116
+ */
117
+ minimizePanelInactive?: number;
118
+ /**
119
+ * Toolbar placement (coarse shorthand — sets the edge and rough horizontal
120
+ * alignment of the toolbar pill).
121
+ * @default "bottom-center"
122
+ */
123
+ placement?: "bottom-left" | "bottom-center" | "bottom-right";
124
+ /**
125
+ * Which edge of the viewport the toolbar pill is anchored to.
126
+ * Takes precedence over the edge implied by `placement`.
127
+ * @default "bottom"
128
+ */
129
+ position?: "bottom" | "left" | "right" | "top";
130
+ /**
131
+ * Policy for the built-in `readFile` RPC endpoint, which lets toolbar apps read
132
+ * text files under the project root.
133
+ *
134
+ * Set to `false` to remove the endpoint entirely — recommended when the dev
135
+ * server is exposed on the network (`vite --host`), since any device on the LAN
136
+ * can then call RPC methods. Pass an object to override the allowed extensions.
137
+ *
138
+ * By default the endpoint is restricted to a curated allowlist of source/markup/
139
+ * text extensions, so `.env`, lockfiles, and key material are never served.
140
+ * @default { extensions: curated source/text list }
141
+ */
142
+ readFile?: ReadFileOptions | false;
143
+ /**
144
+ * Reduce motion for accessibility (disables all CSS animations).
145
+ * @default false
146
+ */
147
+ reduceMotion?: boolean;
148
+ /**
149
+ * Strip all \@visulima/dev-toolbar imports and virtual modules when building
150
+ * for production (i.e. when `command !== 'serve'` or `mode === 'production'`).
151
+ * This guarantees the toolbar never ends up in a production bundle even if the
152
+ * user accidentally imports our package in application code.
153
+ * @default true
154
+ */
155
+ removeDevtoolsOnBuild?: boolean;
156
+ /**
157
+ * Only activate the toolbar when the URL contains a specific query parameter.
158
+ * Useful for staging/production environments where you want opt-in debugging.
159
+ * @example requireUrlFlag: true, urlFlagName: 'debug' → toolbar only shows when URL has ?debug=true
160
+ * @default false
161
+ */
162
+ requireUrlFlag?: boolean;
163
+ /**
164
+ * Custom server RPC functions
165
+ */
166
+ serverFunctions?: Partial<ServerFunctions>;
167
+ /**
168
+ * The URL query parameter name used when requireUrlFlag is true.
169
+ * @default 'devtools'
170
+ */
171
+ urlFlagName?: string;
172
+ /**
173
+ * Initial panel width as a percentage of the viewport width (20–95).
174
+ * Applies when position is "left" or "right".
175
+ * @default 80
176
+ */
177
+ width?: number;
145
178
  }
146
179
  /**
147
- * Returns the Vite plugin array for the dev toolbar.
148
- */
149
- export declare const devToolbar: (options?: DevToolbarOptions) => Plugin[];
180
+ * Returns the Vite plugin array for the dev toolbar.
181
+ *
182
+ * Returns an empty array when `options.enabled === false`, so the plugin can be
183
+ * gated for CI/preview builds without removing it from `vite.config.ts`.
184
+ */
185
+ declare const devToolbar: (options?: DevToolbarOptions) => Plugin[];
186
+ export { DevToolbarOptions, devToolbar };
@@ -1,5 +1,5 @@
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)}
1
+ import{createRequire as O}from"node:module";import{normalizePath as R}from"vite";import{createServerRPCContext as N}from"./packem_shared/createServerRPCContext-2MNcj-v3.js";const M=O(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,y=e=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[p,f]=u.versions.node.split(".").map(Number);if(p>22||p===22&&f>=3||p===20&&f>=16)return u.getBuiltinModule(e)}return M(e)},S=y("node:fs"),x=y("node:path"),{fileURLToPath:I}=y("node:url"),P=()=>R(x.dirname(I(import.meta.url))),q=/\?.+$/,D=/\/dist\/|\/build\//,W=/\.[jt]sx$/,B=e=>e.replace(q,""),_="?__visulima-dev-toolbar-resource",b="virtual:visulima-dev-toolbar-options",j=`\0${b}`,m="virtual:visulima-dev-toolbar-path:",$="\0__visulima-dev-toolbar-empty",T=(e,p)=>typeof e!="number"||!Number.isFinite(e)?p:Math.min(95,Math.max(20,e)),U=(e={})=>{if(e.enabled===!1)return[];const p=P(),f=e.removeDevtoolsOnBuild??!0,C=e.injectSource?.enabled??!0;let v;const F={apply:"serve",config(){return{server:{watch:{ignored:["**/.devtoolbar/**"]}}}},configResolved(t){if(v=t,!e.appendTo){const o=new Set(t.plugins.map(i=>i.name));(o.has("tanstack-start-core:config")||o.has("tanstack-react-start:config"))&&(e.appendTo=/router\.tsx$/)}const n=/dev-toolbar[\\/]dist[\\/]|__visulima-dev-toolbar-resource/;for(const o of t.plugins){if(!o.name.includes("babel"))continue;const i=o.transform;if(!i)continue;const a=typeof i=="function"?i:typeof i=="object"&&"handler"in i?i.handler:void 0;if(typeof a!="function")continue;const s=function(c,r,...l){if(!n.test(r))return a.call(this,c,r,...l)};typeof i=="function"?o.transform=s:i.handler=s}},configureServer(t){N(t,e.serverFunctions,{editor:e.editor,readFile:e.readFile}),t.ws.on("connection",()=>{t.ws.send({event:"dev-toolbar:init",type:"custom"})}),t.middlewares.use("/__devtoolbar/events",async(n,o)=>{o.writeHead(200,{"Cache-Control":"no-cache",Connection:"keep-alive","Content-Type":"text/event-stream","X-Accel-Buffering":"no"});const i=(r,l)=>{o.write(`event: ${r}
2
+ data: ${JSON.stringify(l)}
3
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};
4
+ `)};i("connected",{timestamp:Date.now()});const{watch:a}=await import("node:fs"),s=x.join(t.config.root,".devtoolbar","annotations.json");let c;try{c=a(s,{persistent:!1},r=>{r==="change"&&i("annotations.changed",{timestamp:Date.now()})}),c.on("error",()=>{})}catch{const{stat:r}=await import("node:fs/promises");let l=0;const h=setInterval(async()=>{try{const d=(await r(s)).mtimeMs;d!==l&&(l=d,i("annotations.changed",{timestamp:Date.now()}))}catch{}},2e3);n.on("close",()=>{clearInterval(h)});return}n.on("close",()=>{c?.close()})})},enforce:"pre",async load(t){if(t===j){const n=(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:n,defaultVisible:e.defaultVisible??!0,editor:e.editor??"",height:T(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:T(e.width,80)})};`}if(t.endsWith(_)){const n=B(t);return this.addWatchFile(n),await S.promises.readFile(n,"utf8")}},name:"@visulima/dev-toolbar",resolveId(t){if(t===b)return j;if(t.startsWith(m))return`${t.replace(m,`${p}/`)}${_}`},transform(t,n,o){if(o?.ssr)return;const{appendTo:i}=e,a=n.split("?",2)[0];if(i&&a&&(typeof i=="string"&&a.endsWith(i)||i instanceof RegExp&&i.test(a)))return`import '${m}client/overlay.js';
5
+ ${t}`},transformIndexHtml(){return e.appendTo?void 0:{html:"",tags:[{attrs:{src:`${v.base||"/"}@id/${m}client/overlay.js`,type:"module"},injectTo:"head-prepend",tag:"script"}]}}},k={apply(t,{command:n,mode:o}){return f&&(n!=="serve"||o==="production")},load(t){if(t===$)return"export default {};"},name:"@visulima/dev-toolbar:remove-on-build",resolveId(t){if(t===b||t.startsWith(m))return $}},w=new Map;return[F,{enforce:"pre",name:"@visulima/dev-toolbar:inject-source",async transform(t,n){if(!C||v.mode!=="development"||n.includes("node_modules")||n.includes("?raw")||D.test(n)||!W.test(n.split("?")[0]??""))return;const o=n.split("?")[0]??n,{readFile:i,stat:a}=await import("node:fs/promises");let s;try{const{mtimeMs:d}=await a(o);s=`${t.length}:${d}`;const g=w.get(n);if(g&&g.key===s)return g.result}catch{}let c;try{const d=await i(o,"utf8");d!==t&&(c=d)}catch{}const{addSourceToJsx:r}=await import("./packem_chunks/inject-source.js"),l=r(t,n,e.injectSource?.ignore,c),h=l?{code:l.code??t,map:l.map??void 0}:void 0;return s!==void 0&&w.set(n,{key:s,result:h}),h}},k]};export{U as devToolbar};
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "@visulima/dev-toolbar",
3
- "version": "1.0.0-alpha.9",
3
+ "version": "1.0.0",
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",
@@ -113,18 +111,18 @@
113
111
  "CHANGELOG.md"
114
112
  ],
115
113
  "dependencies": {
116
- "@babel/generator": "^7.29.1",
117
- "@babel/parser": "7.29.2",
118
- "@babel/traverse": "^7.29.0",
114
+ "@babel/generator": "^8.0.0",
115
+ "@babel/parser": "^8.0.0",
116
+ "@babel/traverse": "^8.0.0",
119
117
  "@floating-ui/dom": "^1.7.6",
120
- "launch-editor": "2.13.2",
121
- "preact": "^10.29.1"
118
+ "launch-editor": "2.14.1",
119
+ "preact": "^10.29.2"
122
120
  },
123
121
  "peerDependencies": {
124
- "@modelcontextprotocol/sdk": "^1.0.0",
125
- "axe-core": "4.11.2",
126
- "vite": "^6 || ^7 || ^8",
127
- "zod": "^3.0.0"
122
+ "@modelcontextprotocol/sdk": "^1.29.0",
123
+ "axe-core": ">=4.12.1",
124
+ "vite": "^8.0.11",
125
+ "zod": "^3.25.0 || ^4.0.0"
128
126
  },
129
127
  "peerDependenciesMeta": {
130
128
  "@modelcontextprotocol/sdk": {
@@ -138,7 +136,7 @@
138
136
  }
139
137
  },
140
138
  "engines": {
141
- "node": ">=22.21"
139
+ "node": "^22.14.0 || >=24.10.0"
142
140
  },
143
141
  "publishConfig": {
144
142
  "access": "public",
@@ -1,4 +0,0 @@
1
- import type { ComponentChildren } from "preact";
2
- import type { AppComponentProps } from "../../types/app.d.ts";
3
- declare const A11yApp: (_props: AppComponentProps) => ComponentChildren;
4
- export default A11yApp;
@@ -1,42 +0,0 @@
1
- type Severity = "critical" | "minor" | "moderate" | "serious";
2
- type Standard = "best-practice" | "wcag21aa" | "wcag22aa" | "wcag2a";
3
- interface A11yNode {
4
- html: string;
5
- selector: string;
6
- }
7
- interface A11yIssue {
8
- helpUrl: string;
9
- id: string;
10
- impact: Severity;
11
- message: string;
12
- nodes: A11yNode[];
13
- wcagTags: string[];
14
- }
15
- interface A11yStoreState {
16
- isScanning: boolean;
17
- issues: A11yIssue[];
18
- lastScan: string | undefined;
19
- scanError: string | undefined;
20
- showOverlays: boolean;
21
- standard: Standard;
22
- }
23
- declare const SEVERITY_ORDER: Severity[];
24
- type Listener = () => void;
25
- declare class A11yStore {
26
- private listeners;
27
- private state;
28
- constructor();
29
- clearHighlights(): void;
30
- getState(): Readonly<A11yStoreState>;
31
- highlightIssue(issue: A11yIssue): void;
32
- scan(disabledRules?: string[]): Promise<void>;
33
- setShowOverlays(show: boolean): void;
34
- setStandard(standard: Standard): void;
35
- subscribe(listener: Listener): () => void;
36
- private notify;
37
- private persist;
38
- private update;
39
- }
40
- declare const a11yStore: A11yStore;
41
- export type { A11yIssue, A11yNode, A11yStoreState, Severity, Standard };
42
- export { a11yStore, SEVERITY_ORDER };
@@ -1,10 +0,0 @@
1
- import type { ComponentChildren } from "preact";
2
- import type { AppTooltipProps } from "../../types/app.d.ts";
3
- /**
4
- * Hover tooltip for the Accessibility app button.
5
- * Shows a summary of scan results and quick action buttons.
6
- * @param _props Tooltip props (unused; reads from a11yStore directly)
7
- * @returns Rendered tooltip component
8
- */
9
- declare const A11yTooltip: (_props: AppTooltipProps) => ComponentChildren;
10
- export default A11yTooltip;
@@ -1,4 +0,0 @@
1
- import type { ComponentChildren } from "preact";
2
- import type { AppComponentProps } from "../../types/app.d.ts";
3
- declare const AnnotationsApp: ({ helpers }: AppComponentProps) => ComponentChildren;
4
- export default AnnotationsApp;
@@ -1,4 +0,0 @@
1
- import type { ComponentChildren } from "preact";
2
- import type { AppComponentProps } from "../../types/app.d.ts";
3
- declare const AssetsApp: ({ helpers }: AppComponentProps) => ComponentChildren;
4
- export default AssetsApp;
@@ -1,12 +0,0 @@
1
- interface A11yInfo {
2
- ariaAttributes: Record<string, string>;
3
- focusable: boolean;
4
- role: string | null;
5
- tabindex: number | null;
6
- }
7
- /** Collect accessibility-relevant attributes from an element. */
8
- declare const captureA11yInfo: (element: Element) => A11yInfo;
9
- /** Format A11yInfo as a plain-text summary for clipboard. */
10
- declare const formatA11yText: (info: A11yInfo) => string;
11
- export { captureA11yInfo, formatA11yText };
12
- export type { A11yInfo };
@@ -1,55 +0,0 @@
1
- /**
2
- * Annotation overlay — renders annotation markers on the page canvas,
3
- * provides inline annotation form, detail popup, edit mode, screenshot capture,
4
- * freeze mode, markdown export, and SPA navigation persistence.
5
- *
6
- * All DOM elements are injected into document.body (outside Shadow DOM)
7
- * to match the inspector's rendering approach.
8
- */
9
- import type { Annotation } from "../../types/annotations.d.ts";
10
- /**
11
- * Returns true when the Annotations panel app is registered in the toolbar.
12
- */
13
- export declare const isAnnotationsAppEnabled: () => boolean;
14
- /**
15
- * Convert viewport click coords to page-absolute coords for storage.
16
- * x = percentage of viewport width, y = absolute page Y (scrollY + clientY).
17
- * For fixed elements, y stays as viewport-relative (no scrollY offset).
18
- */
19
- export declare const toPageCoords: (clientX: number, clientY: number, fixed?: boolean) => {
20
- x: number;
21
- y: number;
22
- };
23
- /** Load annotations from server and render markers. */
24
- export declare const loadAndShowMarkers: () => Promise<void>;
25
- /** Remove all annotation markers and detach listeners. */
26
- export declare const removeAllMarkers: () => void;
27
- /** Close all annotation popups (form, detail) and area outline, but keep markers. */
28
- export declare const closeAnnotationPopups: () => void;
29
- /** Whether the annotation form popup is currently open. */
30
- export declare const isAnnotationFormOpen: () => boolean;
31
- /** Shake the annotation form to draw attention. */
32
- export declare const shakeAnnotationForm: () => void;
33
- /**
34
- * Show annotation form popup. Captures selectedText, nearbyText, framework context,
35
- * and generates a smart CSS selector.
36
- */
37
- export declare const showAnnotationForm: (element: Element, rect: DOMRect, source: string | undefined, editAnnotation?: Annotation, clickPoint?: {
38
- x: number;
39
- y: number;
40
- }) => void;
41
- /**
42
- * Show annotation form for a multi-select (drag) region.
43
- * Creates a single annotation covering multiple elements.
44
- */
45
- export declare const showMultiSelectForm: (elements: Element[], selectionRect: DOMRect, boundingBoxes: import("../../types/annotations").BoundingBox[]) => void;
46
- /**
47
- * Show annotation form for an empty area selection (no elements found in drag region).
48
- * Like agentation: creates an "Area selection" annotation with the region as bounding box.
49
- * Shows a green dashed outline around the selected region.
50
- */
51
- export declare const showAreaSelectionForm: (selectionRect: DOMRect) => void;
52
- export declare const attachMarkdownShortcut: () => void;
53
- export declare const detachMarkdownShortcut: () => void;
54
- /** Check if a target is over an annotation overlay element. */
55
- export declare const isOverAnnotationOverlay: (target: Element | undefined) => boolean;
@@ -1,33 +0,0 @@
1
- /**
2
- * Annotation-specific settings — output detail level, marker appearance,
3
- * interaction behavior. Persisted in localStorage.
4
- */
5
- export type OutputDetailLevel = "compact" | "detailed" | "forensic" | "standard";
6
- export type MarkerClickBehavior = "delete" | "detail" | "edit";
7
- export interface MarkerColor {
8
- /** Solid background for the marker */
9
- bg: string;
10
- /** Slightly darker ring / shadow tint */
11
- border: string;
12
- /** Text color inside the marker (white or dark for contrast) */
13
- fg: string;
14
- /** Translucent version for hover highlight overlay on elements */
15
- highlightBg: string;
16
- label: string;
17
- name: string;
18
- }
19
- export declare const MARKER_COLORS: MarkerColor[];
20
- export interface AnnotationSettings {
21
- /** Block clicks on interactive elements (buttons, links, inputs) while active */
22
- blockInteractions: boolean;
23
- /** What happens when you click a marker */
24
- markerClickBehavior: MarkerClickBehavior;
25
- /** Marker color name (from MARKER_COLORS) */
26
- markerColorName: string;
27
- /** Output detail level for markdown export */
28
- outputDetail: OutputDetailLevel;
29
- }
30
- export declare const DEFAULT_SETTINGS: AnnotationSettings;
31
- export declare const loadSettings: () => AnnotationSettings;
32
- export declare const saveSettings: (settings: AnnotationSettings) => void;
33
- export declare const getMarkerColor: (settings?: AnnotationSettings) => MarkerColor;