@visulima/dev-toolbar 1.0.0-alpha.13 → 1.0.0-alpha.15
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 +14 -0
- package/LICENSE.md +21 -0
- package/dist/apps/a11y/index.d.ts +3 -2
- package/dist/apps/a11y/index.js +1 -1
- package/dist/apps/annotations/index.d.ts +3 -2
- package/dist/apps/annotations/index.js +1 -1
- package/dist/apps/assets/index.d.ts +3 -2
- package/dist/apps/assets/index.js +1 -1
- package/dist/apps/inspector/index.d.ts +3 -2
- package/dist/apps/inspector/index.js +1 -1
- package/dist/apps/module-graph/index.d.ts +3 -2
- package/dist/apps/module-graph/index.js +1 -1
- package/dist/apps/performance/index.d.ts +3 -2
- package/dist/apps/performance/index.js +1 -1
- package/dist/apps/seo/index.d.ts +3 -2
- package/dist/apps/seo/index.js +1 -1
- package/dist/apps/settings/index.d.ts +3 -2
- package/dist/apps/settings/index.js +1 -1
- package/dist/apps/tailwind/index.d.ts +3 -2
- package/dist/apps/timeline/index.d.ts +3 -2
- package/dist/apps/timeline/index.js +1 -1
- package/dist/apps/vite-config/index.d.ts +3 -2
- package/dist/apps/vite-config/index.js +1 -1
- package/dist/client/overlay.d.ts +1 -1
- package/dist/index.d.ts +143 -8
- package/dist/mcp/server.d.ts +2 -12
- package/dist/packem_shared/app.d-SmKEDxsI.d.ts +229 -0
- package/dist/packem_shared/global-api.d-DG2WYakl.d.ts +547 -0
- package/dist/packem_shared/{sharedToolbarStylesheet-CaTdYhVe.js → sharedToolbarStylesheet-Bx1muJAh.js} +1 -1
- package/dist/toolbar/index.d.ts +152 -48
- package/dist/toolbar/index.js +1 -1
- package/dist/ui/index.d.ts +382 -18
- package/dist/vite-plugin.d.ts +155 -146
- package/package.json +6 -6
- package/dist/apps/a11y/a11y-app.d.ts +0 -4
- package/dist/apps/a11y/a11y-store.d.ts +0 -42
- package/dist/apps/a11y/a11y-tooltip.d.ts +0 -10
- package/dist/apps/annotations/annotations-app.d.ts +0 -4
- package/dist/apps/assets/assets-app.d.ts +0 -4
- package/dist/apps/inspector/a11y-capture.d.ts +0 -12
- package/dist/apps/inspector/annotation-overlay.d.ts +0 -55
- package/dist/apps/inspector/annotation-settings.d.ts +0 -33
- package/dist/apps/inspector/element-utils.d.ts +0 -115
- package/dist/apps/inspector/freeze-animations.d.ts +0 -22
- package/dist/apps/inspector/inspector-app.d.ts +0 -14
- package/dist/apps/inspector/rulers.d.ts +0 -14
- package/dist/apps/inspector/theme-palette.d.ts +0 -34
- package/dist/apps/module-graph/module-graph-app.d.ts +0 -4
- package/dist/apps/performance/performance-app.d.ts +0 -4
- package/dist/apps/performance/performance-tooltip.d.ts +0 -4
- package/dist/apps/seo/seo-app.d.ts +0 -4
- package/dist/apps/settings/settings-app.d.ts +0 -4
- package/dist/apps/tailwind/tailwind-app.d.ts +0 -4
- package/dist/apps/timeline/timeline-app.d.ts +0 -4
- package/dist/apps/vite-config/vite-config-app.d.ts +0 -4
- package/dist/hooks/create-hook.d.ts +0 -12
- package/dist/hooks/events.d.ts +0 -7
- package/dist/hooks/global-hook.d.ts +0 -15
- package/dist/hooks/index.d.ts +0 -6
- package/dist/performance/monitor.d.ts +0 -116
- package/dist/rpc/client.d.ts +0 -9
- package/dist/rpc/functions/annotations.d.ts +0 -28
- package/dist/rpc/functions/assets.d.ts +0 -16
- package/dist/rpc/functions/module-graph.d.ts +0 -17
- package/dist/rpc/functions/open-in-editor.d.ts +0 -16
- package/dist/rpc/functions/tailwind-config.d.ts +0 -15
- package/dist/rpc/functions/vite-config.d.ts +0 -83
- package/dist/rpc/server.d.ts +0 -15
- package/dist/store/annotation-store.d.ts +0 -41
- package/dist/timeline/capture.d.ts +0 -8
- package/dist/timeline/index.d.ts +0 -8
- package/dist/timeline/store.d.ts +0 -42
- package/dist/toolbar/app-manager.d.ts +0 -104
- package/dist/toolbar/components/app-button.d.ts +0 -18
- package/dist/toolbar/components/app-canvas.d.ts +0 -12
- package/dist/toolbar/components/app-tooltip-overlay.d.ts +0 -12
- package/dist/toolbar/components/first-visit-hint.d.ts +0 -15
- package/dist/toolbar/components/index.d.ts +0 -4
- package/dist/toolbar/components/pinned-tooltip-card.d.ts +0 -22
- package/dist/toolbar/components/toolbar-bar.d.ts +0 -9
- package/dist/toolbar/components/toolbar-container.d.ts +0 -49
- package/dist/toolbar/components/vite-overlay-button.d.ts +0 -14
- package/dist/toolbar/context/index.d.ts +0 -2
- package/dist/toolbar/context/toolbar-context.d.ts +0 -107
- package/dist/toolbar/global-api.d.ts +0 -24
- package/dist/toolbar/helpers.d.ts +0 -8
- package/dist/toolbar/hooks/index.d.ts +0 -10
- package/dist/toolbar/hooks/use-apps.d.ts +0 -15
- package/dist/toolbar/hooks/use-frame-state.d.ts +0 -110
- package/dist/toolbar/hooks/use-panel-visible.d.ts +0 -23
- package/dist/toolbar/hooks/use-position.d.ts +0 -24
- package/dist/toolbar/hooks/use-theme.d.ts +0 -15
- package/dist/toolbar/hooks/use-toolbar.d.ts +0 -16
- package/dist/toolbar/settings.d.ts +0 -17
- package/dist/toolbar/stylesheet.d.ts +0 -3
- package/dist/toolbar/utils/index.d.ts +0 -12
- package/dist/types/annotations.d.ts +0 -156
- package/dist/types/app.d.ts +0 -175
- package/dist/types/global-api.d.ts +0 -91
- package/dist/types/hooks.d.ts +0 -86
- package/dist/types/index.d.ts +0 -13
- package/dist/types/messaging.d.ts +0 -43
- package/dist/types/rpc.d.ts +0 -137
- package/dist/types/timeline.d.ts +0 -62
- package/dist/types/toolbar.d.ts +0 -56
- package/dist/ui/components/alert.d.ts +0 -19
- package/dist/ui/components/badge.d.ts +0 -9
- package/dist/ui/components/button.d.ts +0 -11
- package/dist/ui/components/card.d.ts +0 -16
- package/dist/ui/components/icon.d.ts +0 -19
- package/dist/ui/components/input.d.ts +0 -7
- package/dist/ui/components/label.d.ts +0 -7
- package/dist/ui/components/popover.d.ts +0 -27
- package/dist/ui/components/progress.d.ts +0 -7
- package/dist/ui/components/select.d.ts +0 -54
- package/dist/ui/components/separator.d.ts +0 -8
- package/dist/ui/components/skeleton.d.ts +0 -6
- package/dist/ui/components/switch.d.ts +0 -11
- package/dist/ui/components/tabs.d.ts +0 -28
- package/dist/ui/components/textarea.d.ts +0 -7
- package/dist/ui/components/tooltip.d.ts +0 -19
- package/dist/vite/inject-source.d.ts +0 -24
- package/dist/vite/matcher.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## @visulima/dev-toolbar [1.0.0-alpha.15](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.0-alpha.14...@visulima/dev-toolbar@1.0.0-alpha.15) (2026-05-04)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* **dev-toolbar:** allow zod v4 and align eslint-plugin-zod with catalog ([70733ad](https://github.com/visulima/visulima/commit/70733ad6155c3bc460d2bc0943f88af59b7b6725))
|
|
6
|
+
|
|
7
|
+
## @visulima/dev-toolbar [1.0.0-alpha.14](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.0-alpha.13...@visulima/dev-toolbar@1.0.0-alpha.14) (2026-04-30)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* **dev-toolbar:** upgrade packem to 2.0.0-alpha.76 ([4a496ed](https://github.com/visulima/visulima/commit/4a496edb863ecd414c34ff043d49ba3171538ccd))
|
|
12
|
+
* re-sort workspace package.json files via vis sort-package-json ([f625696](https://github.com/visulima/visulima/commit/f625696cfac974325774b3243e1a83c3d23acbd7))
|
|
13
|
+
* simplify pnpm-workspace packages list ([7cab221](https://github.com/visulima/visulima/commit/7cab221163632d9b7aa044a6f88c49083103a869))
|
|
14
|
+
|
|
1
15
|
## @visulima/dev-toolbar [1.0.0-alpha.13](https://github.com/visulima/visulima/compare/@visulima/dev-toolbar@1.0.0-alpha.12...@visulima/dev-toolbar@1.0.0-alpha.13) (2026-04-22)
|
|
2
16
|
|
|
3
17
|
### Bug Fixes
|
package/LICENSE.md
CHANGED
|
@@ -185,4 +185,25 @@ Repository: https://github.com/lucide-icons/lucide.git
|
|
|
185
185
|
<!-- /DEPENDENCIES -->
|
|
186
186
|
|
|
187
187
|
<!-- TYPE_DEPENDENCIES -->
|
|
188
|
+
|
|
189
|
+
# Licenses of bundled types
|
|
190
|
+
The published @visulima/dev-toolbar artifact additionally contains code with the following licenses:
|
|
191
|
+
MIT
|
|
192
|
+
|
|
193
|
+
# Bundled types:
|
|
194
|
+
## clsx
|
|
195
|
+
License: MIT
|
|
196
|
+
By: Luke Edwards
|
|
197
|
+
Repository: lukeed/clsx
|
|
198
|
+
|
|
199
|
+
> MIT License
|
|
200
|
+
>
|
|
201
|
+
> Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
202
|
+
>
|
|
203
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
204
|
+
>
|
|
205
|
+
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
206
|
+
>
|
|
207
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
208
|
+
|
|
188
209
|
<!-- /TYPE_DEPENDENCIES -->
|
package/dist/apps/a11y/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var X=Object.defineProperty;var O=(a,e)=>X(a,"name",{value:e,configurable:!0});import{addHookName as k}from"preact/devtools";import{clsx as d}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as C,useEffect as L}from"preact/hooks";import{jsxs as i,jsx as t,Fragment as W}from"preact/jsx-runtime";import w from"../../packem_shared/Button-Bkx66Co7.js";import{Alert as Y,AlertDescription as Z}from"../../packem_shared/Alert-D2CvX4fw.js";const ee=`<!-- @license lucide-static v1.
|
|
1
|
+
var X=Object.defineProperty;var O=(a,e)=>X(a,"name",{value:e,configurable:!0});import{addHookName as k}from"preact/devtools";import{clsx as d}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as C,useEffect as L}from"preact/hooks";import{jsxs as i,jsx as t,Fragment as W}from"preact/jsx-runtime";import w from"../../packem_shared/Button-Bkx66Co7.js";import{Alert as Y,AlertDescription as Z}from"../../packem_shared/Alert-D2CvX4fw.js";const ee=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-accessibility"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { D as DevToolbarApp } from "../../packem_shared/app.d-SmKEDxsI.js";
|
|
2
|
+
import 'preact';
|
|
2
3
|
declare const annotationsApp: DevToolbarApp;
|
|
3
|
-
export default
|
|
4
|
+
export { annotationsApp as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var j=Object.defineProperty;var z=(t,s)=>j(t,"name",{value:s,configurable:!0});import{addHookName as c}from"preact/devtools";import{clsx as h}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as p,useCallback as S,useEffect as q}from"preact/hooks";import{s as Q,M as H,l as K}from"../../packem_shared/annotation-settings-Bv0TH4WI.js";import{jsx as e,jsxs as r}from"preact/jsx-runtime";import g from"../../packem_shared/Button-Bkx66Co7.js";import U from"../../packem_shared/Textarea-Yfg3dLZi.js";const V=`<!-- @license lucide-static v1.
|
|
1
|
+
var j=Object.defineProperty;var z=(t,s)=>j(t,"name",{value:s,configurable:!0});import{addHookName as c}from"preact/devtools";import{clsx as h}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as p,useCallback as S,useEffect as q}from"preact/hooks";import{s as Q,M as H,l as K}from"../../packem_shared/annotation-settings-Bv0TH4WI.js";import{jsx as e,jsxs as r}from"preact/jsx-runtime";import g from"../../packem_shared/Button-Bkx66Co7.js";import U from"../../packem_shared/Textarea-Yfg3dLZi.js";const V=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-message-square-plus"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var B=Object.defineProperty;var P=(t,i)=>B(t,"name",{value:i,configurable:!0});import{addHookName as a}from"preact/devtools";import{clsx as u}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as s,useRef as N,useEffect as C}from"preact/hooks";import{jsx as e,jsxs as l}from"preact/jsx-runtime";import c from"../../packem_shared/Button-Bkx66Co7.js";import E from"../../packem_shared/Input-Cs6aduTi.js";const H=`<!-- @license lucide-static v1.
|
|
1
|
+
var B=Object.defineProperty;var P=(t,i)=>B(t,"name",{value:i,configurable:!0});import{addHookName as a}from"preact/devtools";import{clsx as u}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as s,useRef as N,useEffect as C}from"preact/hooks";import{jsx as e,jsxs as l}from"preact/jsx-runtime";import c from"../../packem_shared/Button-Bkx66Co7.js";import E from"../../packem_shared/Input-Cs6aduTi.js";const H=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-folder-open"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Bn=Object.defineProperty;var ae=(e,t)=>Bn(e,"name",{value:t,configurable:!0});import{l as _t,g as Gt}from"../../packem_shared/annotation-settings-Bv0TH4WI.js";import{b as Mn}from"../../packem_shared/use-frame-state-CxrlPUM5.js";const zn=`<!-- @license lucide-static v1.
|
|
1
|
+
var Bn=Object.defineProperty;var ae=(e,t)=>Bn(e,"name",{value:t,configurable:!0});import{l as _t,g as Gt}from"../../packem_shared/annotation-settings-Bv0TH4WI.js";import{b as Mn}from"../../packem_shared/use-frame-state-CxrlPUM5.js";const zn=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-inspect"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { D as DevToolbarApp } from "../../packem_shared/app.d-SmKEDxsI.js";
|
|
2
|
+
import 'preact';
|
|
2
3
|
declare const moduleGraphApp: DevToolbarApp;
|
|
3
|
-
export default
|
|
4
|
+
export { moduleGraphApp as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var U=Object.defineProperty;var k=(o,d)=>U(o,"name",{value:d,configurable:!0});import{addHookName as i}from"preact/devtools";import{clsx as j}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as s,useRef as E,useEffect as S}from"preact/hooks";import{jsx as r,jsxs as t}from"preact/jsx-runtime";import b from"../../packem_shared/Button-Bkx66Co7.js";import A from"../../packem_shared/Input-Cs6aduTi.js";const G=`<!-- @license lucide-static v1.
|
|
1
|
+
var U=Object.defineProperty;var k=(o,d)=>U(o,"name",{value:d,configurable:!0});import{addHookName as i}from"preact/devtools";import{clsx as j}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as s,useRef as E,useEffect as S}from"preact/hooks";import{jsx as r,jsxs as t}from"preact/jsx-runtime";import b from"../../packem_shared/Button-Bkx66Co7.js";import A from"../../packem_shared/Input-Cs6aduTi.js";const G=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-network"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { D as DevToolbarApp } from "../../packem_shared/app.d-SmKEDxsI.js";
|
|
2
|
+
import 'preact';
|
|
2
3
|
declare const performanceApp: DevToolbarApp;
|
|
3
|
-
export default
|
|
4
|
+
export { performanceApp as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var j=Object.defineProperty;var f=(t,e)=>j(t,"name",{value:e,configurable:!0});import{addHookName as w}from"preact/devtools";import{clsx as c}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as C,useRef as F,useEffect as H}from"preact/hooks";import{jsx as r,jsxs as i}from"preact/jsx-runtime";const L=`<!-- @license lucide-static v1.
|
|
1
|
+
var j=Object.defineProperty;var f=(t,e)=>j(t,"name",{value:e,configurable:!0});import{addHookName as w}from"preact/devtools";import{clsx as c}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as C,useRef as F,useEffect as H}from"preact/hooks";import{jsx as r,jsxs as i}from"preact/jsx-runtime";const L=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-gauge"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
package/dist/apps/seo/index.d.ts
CHANGED
package/dist/apps/seo/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var G=Object.defineProperty;var P=(r,e)=>G(r,"name",{value:e,configurable:!0});import{addHookName as b}from"preact/devtools";import{clsx as y}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as v,useRef as H,useEffect as W}from"preact/hooks";import{jsxs as n,jsx as t,Fragment as E}from"preact/jsx-runtime";import B from"../../packem_shared/Button-Bkx66Co7.js";import K from"../../packem_shared/Badge-BEgU04nl.js";const Q=`<!-- @license lucide-static v1.
|
|
1
|
+
var G=Object.defineProperty;var P=(r,e)=>G(r,"name",{value:e,configurable:!0});import{addHookName as b}from"preact/devtools";import{clsx as y}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as v,useRef as H,useEffect as W}from"preact/hooks";import{jsxs as n,jsx as t,Fragment as E}from"preact/jsx-runtime";import B from"../../packem_shared/Button-Bkx66Co7.js";import K from"../../packem_shared/Badge-BEgU04nl.js";const Q=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-search"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var A=Object.defineProperty;var C=(t,l)=>A(t,"name",{value:l,configurable:!0});import{addHookName as x}from"preact/devtools";import{clsx as g}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as T,useRef as M,useEffect as j}from"preact/hooks";import{h as O,r as c}from"../../packem_shared/use-frame-state-CxrlPUM5.js";import{_ as P}from"../../packem_shared/use-theme-zpm4zmqP.js";import v from"../../packem_shared/Icon-B6UHkC0o.js";import{Select as y,SelectTrigger as w,SelectValue as E,SelectContent as F,SelectItem as S,useSelectContext as I}from"../../packem_shared/Select-DgQ4ss-s.js";import{jsxs as r,jsx as e,Fragment as N}from"preact/jsx-runtime";import p from"../../packem_shared/Button-Bkx66Co7.js";const R=`<!-- @license lucide-static v1.
|
|
1
|
+
var A=Object.defineProperty;var C=(t,l)=>A(t,"name",{value:l,configurable:!0});import{addHookName as x}from"preact/devtools";import{clsx as g}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as T,useRef as M,useEffect as j}from"preact/hooks";import{h as O,r as c}from"../../packem_shared/use-frame-state-CxrlPUM5.js";import{_ as P}from"../../packem_shared/use-theme-zpm4zmqP.js";import v from"../../packem_shared/Icon-B6UHkC0o.js";import{Select as y,SelectTrigger as w,SelectValue as E,SelectContent as F,SelectItem as S,useSelectContext as I}from"../../packem_shared/Select-DgQ4ss-s.js";import{jsxs as r,jsx as e,Fragment as N}from"preact/jsx-runtime";import p from"../../packem_shared/Button-Bkx66Co7.js";const R=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-settings"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var R=Object.defineProperty;var x=(e,t)=>R(e,"name",{value:t,configurable:!0});import{m as y,D as L}from"../../packem_shared/store-DaUtLjf3.js";import{addHookName as b}from"preact/devtools";import{clsx as C}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as w,useRef as z,useEffect as I}from"preact/hooks";import{jsx as i,jsxs as l}from"preact/jsx-runtime";import A from"../../packem_shared/Badge-BEgU04nl.js";import D from"../../packem_shared/Button-Bkx66Co7.js";var N=Object.defineProperty,T=x((e,t)=>N(e,"name",{value:t,configurable:!0}),"d");const j="__visulima_timeline_capture__",f=T(e=>`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,"generateId"),O=T(e=>e.startsWith("/@")||e.includes("/__vite")||e.includes("__visulima-dev-toolbar")||e.startsWith("data:")||e.startsWith("blob:"),"isViteInternalUrl"),P=T(()=>{if(globalThis[j])return;globalThis[j]=!0;const e=y();if(import.meta.hot&&(import.meta.hot.on("vite:beforeUpdate",t=>{const n=t,o=n.updates?.map(h=>h.path).join(", ")??"";e.addEvent("hmr",{data:{updates:n.updates},id:f("hmr"),level:"info",subtitle:o||void 0,time:Date.now(),title:"HMR Update"})}),import.meta.hot.on("vite:beforeFullReload",t=>{const n=t;e.addEvent("hmr",{id:f("hmr-reload"),level:"warning",subtitle:n.path??void 0,time:Date.now(),title:"Full Reload"})}),import.meta.hot.on("vite:error",t=>{const n=t,{err:o}=n;e.addEvent("errors",{data:o?{loc:o.loc,message:o.message,plugin:o.plugin,stack:o.stack}:void 0,id:f("vite-err"),level:"error",subtitle:o?.message??"Unknown error",time:Date.now(),title:"Vite Error"})})),globalThis.window!==void 0&&typeof globalThis.fetch=="function"){const t=globalThis.fetch.bind(globalThis);globalThis.fetch=async(...n)=>{const o=n[0],h=n[1],v=o instanceof URL?o.href:o.url,s=typeof o=="string"?o:v,c=(h?.method??(o instanceof Request?o.method:"GET")).toUpperCase();if(O(s))return t(...n);const u=Date.now();try{const a=await t(...n),p=Date.now()-u;return e.addEvent("network",{data:{method:c,status:a.status,statusText:a.statusText,url:s},duration:p,id:f("net"),level:a.ok?"info":"warning",subtitle:`${a.status} ${a.statusText}`,time:u,title:`${c} ${s}`}),a}catch(a){const p=Date.now()-u,g=a instanceof Error?a.message:"Network error";throw e.addEvent("network",{data:{error:g,method:c,url:s},duration:p,id:f("net-err"),level:"error",subtitle:g,time:u,title:`${c} ${s}`}),a}}}globalThis.window!==void 0&&(globalThis.addEventListener("error",t=>{t.filename?.includes("visulima-dev-toolbar")||e.addEvent("errors",{data:{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message},id:f("err"),level:"error",subtitle:t.filename?`${t.filename}:${t.lineno}:${t.colno}`:void 0,time:Date.now(),title:t.message||"JavaScript Error"})}),globalThis.addEventListener("unhandledrejection",t=>{const{reason:n}=t,o=n instanceof Error?n.message:String(n??"Unhandled promise rejection");e.addEvent("errors",{data:{reason:String(n)},id:f("rej"),level:"error",subtitle:o,time:Date.now(),title:"Unhandled Promise Rejection"})}))},"startTimelineCapture"),B=`<!-- @license lucide-static v1.
|
|
1
|
+
var R=Object.defineProperty;var x=(e,t)=>R(e,"name",{value:t,configurable:!0});import{m as y,D as L}from"../../packem_shared/store-DaUtLjf3.js";import{addHookName as b}from"preact/devtools";import{clsx as C}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as w,useRef as z,useEffect as I}from"preact/hooks";import{jsx as i,jsxs as l}from"preact/jsx-runtime";import A from"../../packem_shared/Badge-BEgU04nl.js";import D from"../../packem_shared/Button-Bkx66Co7.js";var N=Object.defineProperty,T=x((e,t)=>N(e,"name",{value:t,configurable:!0}),"d");const j="__visulima_timeline_capture__",f=T(e=>`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,"generateId"),O=T(e=>e.startsWith("/@")||e.includes("/__vite")||e.includes("__visulima-dev-toolbar")||e.startsWith("data:")||e.startsWith("blob:"),"isViteInternalUrl"),P=T(()=>{if(globalThis[j])return;globalThis[j]=!0;const e=y();if(import.meta.hot&&(import.meta.hot.on("vite:beforeUpdate",t=>{const n=t,o=n.updates?.map(h=>h.path).join(", ")??"";e.addEvent("hmr",{data:{updates:n.updates},id:f("hmr"),level:"info",subtitle:o||void 0,time:Date.now(),title:"HMR Update"})}),import.meta.hot.on("vite:beforeFullReload",t=>{const n=t;e.addEvent("hmr",{id:f("hmr-reload"),level:"warning",subtitle:n.path??void 0,time:Date.now(),title:"Full Reload"})}),import.meta.hot.on("vite:error",t=>{const n=t,{err:o}=n;e.addEvent("errors",{data:o?{loc:o.loc,message:o.message,plugin:o.plugin,stack:o.stack}:void 0,id:f("vite-err"),level:"error",subtitle:o?.message??"Unknown error",time:Date.now(),title:"Vite Error"})})),globalThis.window!==void 0&&typeof globalThis.fetch=="function"){const t=globalThis.fetch.bind(globalThis);globalThis.fetch=async(...n)=>{const o=n[0],h=n[1],v=o instanceof URL?o.href:o.url,s=typeof o=="string"?o:v,c=(h?.method??(o instanceof Request?o.method:"GET")).toUpperCase();if(O(s))return t(...n);const u=Date.now();try{const a=await t(...n),p=Date.now()-u;return e.addEvent("network",{data:{method:c,status:a.status,statusText:a.statusText,url:s},duration:p,id:f("net"),level:a.ok?"info":"warning",subtitle:`${a.status} ${a.statusText}`,time:u,title:`${c} ${s}`}),a}catch(a){const p=Date.now()-u,g=a instanceof Error?a.message:"Network error";throw e.addEvent("network",{data:{error:g,method:c,url:s},duration:p,id:f("net-err"),level:"error",subtitle:g,time:u,title:`${c} ${s}`}),a}}}globalThis.window!==void 0&&(globalThis.addEventListener("error",t=>{t.filename?.includes("visulima-dev-toolbar")||e.addEvent("errors",{data:{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message},id:f("err"),level:"error",subtitle:t.filename?`${t.filename}:${t.lineno}:${t.colno}`:void 0,time:Date.now(),title:t.message||"JavaScript Error"})}),globalThis.addEventListener("unhandledrejection",t=>{const{reason:n}=t,o=n instanceof Error?n.message:String(n??"Unhandled promise rejection");e.addEvent("errors",{data:{reason:String(n)},id:f("rej"),level:"error",subtitle:o,time:Date.now(),title:"Unhandled Promise Rejection"})}))},"startTimelineCapture"),B=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-gantt-chart"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { D as DevToolbarApp } from "../../packem_shared/app.d-SmKEDxsI.js";
|
|
2
|
+
import 'preact';
|
|
2
3
|
declare const viteConfigApp: DevToolbarApp;
|
|
3
|
-
export default
|
|
4
|
+
export { viteConfigApp as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var O=Object.defineProperty;var F=(t,e)=>O(t,"name",{value:e,configurable:!0});import{addHookName as p}from"preact/devtools";import{clsx as m}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as x,useRef as $,useEffect as P}from"preact/hooks";import k from"../../packem_shared/Icon-B6UHkC0o.js";import{jsxs as l,jsx as r}from"preact/jsx-runtime";import R from"../../packem_shared/Button-Bkx66Co7.js";import L from"../../packem_shared/Input-Cs6aduTi.js";import{Tooltip as B,TooltipTrigger as M,TooltipContent as I}from"../../packem_shared/Tooltip-CioncSXj.js";import D from"../../packem_shared/Badge-BEgU04nl.js";import{Tabs as N,TabsList as H,TabsTrigger as J,TabsContent as v}from"../../packem_shared/Tabs-DKWMiawt.js";const K=`<!-- @license lucide-static v1.
|
|
1
|
+
var O=Object.defineProperty;var F=(t,e)=>O(t,"name",{value:e,configurable:!0});import{addHookName as p}from"preact/devtools";import{clsx as m}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as x,useRef as $,useEffect as P}from"preact/hooks";import k from"../../packem_shared/Icon-B6UHkC0o.js";import{jsxs as l,jsx as r}from"preact/jsx-runtime";import R from"../../packem_shared/Button-Bkx66Co7.js";import L from"../../packem_shared/Input-Cs6aduTi.js";import{Tooltip as B,TooltipTrigger as M,TooltipContent as I}from"../../packem_shared/Tooltip-CioncSXj.js";import D from"../../packem_shared/Badge-BEgU04nl.js";import{Tabs as N,TabsList as H,TabsTrigger as J,TabsContent as v}from"../../packem_shared/Tabs-DKWMiawt.js";const K=`<!-- @license lucide-static v1.14.0 - ISC -->
|
|
2
2
|
<svg
|
|
3
3
|
class="lucide lucide-zap"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
package/dist/client/overlay.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,143 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
export { DevToolbar } from "./toolbar/index.
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { D as DevToolbarApp, T as ToolbarSettings } from "./packem_shared/app.d-SmKEDxsI.js";
|
|
2
|
+
export { A as AppView, b as DEFAULT_TOOLBAR_SETTINGS, a as DevToolbarAppState, F as FrameState, N as NotificationLevel, P as PositionAnchor, S as ServerFunctions, c as ServerHelpers, d as ToolbarAppEventTarget, e as ToolbarPlacement } from "./packem_shared/app.d-SmKEDxsI.js";
|
|
3
|
+
import { T as TimelineEvent, D as DevToolbarHook, C as ClientFunctions, a as ClientRPCContext, S as ServerFunctions, b as ServerRPCContext, c as TimelineGroup } from "./packem_shared/global-api.d-DG2WYakl.js";
|
|
4
|
+
export { A as AccessibilityInfo, d as Annotation, e as AnnotationIntent, f as AnnotationSeverity, g as AnnotationStatus, B as BoundingBox, h as CreateAnnotationData, i as DEFAULT_TIMELINE_GROUPS, F as FrameworkContext, H as HookEvents, j as ThreadMessage, k as TimelineEventLevel, U as UpdateAnnotationData, V as VisulimaDevTools } from "./packem_shared/global-api.d-DG2WYakl.js";
|
|
5
|
+
import { ViteDevServer } from 'vite';
|
|
6
|
+
export { DevToolbar } from "./toolbar/index.js";
|
|
7
|
+
import 'preact';
|
|
8
|
+
/**
|
|
9
|
+
* Creates a dev toolbar hook instance.
|
|
10
|
+
* @param onRegisterApp Callback when app is registered.
|
|
11
|
+
* @param onTimelineEvent Callback when timeline event is added.
|
|
12
|
+
* @returns Hook instance.
|
|
13
|
+
*/
|
|
14
|
+
declare const createDevToolbarHook: (onRegisterApp?: (app: DevToolbarApp) => void, onTimelineEvent?: (groupId: string, event: TimelineEvent) => void) => DevToolbarHook;
|
|
15
|
+
/**
|
|
16
|
+
* Setup global hook on window object.
|
|
17
|
+
* @param onRegisterApp Callback when app is registered.
|
|
18
|
+
* @param onTimelineEvent Callback when timeline event is added.
|
|
19
|
+
* @returns Hook instance.
|
|
20
|
+
*/
|
|
21
|
+
declare const setupGlobalHook: (onRegisterApp?: (app: DevToolbarApp) => void, onTimelineEvent?: (groupId: string, event: TimelineEvent) => void) => DevToolbarHook;
|
|
22
|
+
/**
|
|
23
|
+
* Get the global hook instance.
|
|
24
|
+
* @returns Hook instance or undefined.
|
|
25
|
+
*/
|
|
26
|
+
declare const getGlobalHook: () => DevToolbarHook | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Creates client-side RPC context.
|
|
29
|
+
* @param customFunctions Custom client functions to register.
|
|
30
|
+
* @returns Client RPC context.
|
|
31
|
+
*/
|
|
32
|
+
declare const createClientRPCContext: (customFunctions?: Partial<ClientFunctions>) => ClientRPCContext;
|
|
33
|
+
/**
|
|
34
|
+
* Creates server-side RPC context.
|
|
35
|
+
* @param server Vite dev server instance.
|
|
36
|
+
* @param customFunctions Custom server functions to register.
|
|
37
|
+
* @param options Additional options (e.g. which editor to launch).
|
|
38
|
+
* @param options.editor Editor to use for "open in editor" functionality.
|
|
39
|
+
* @returns Server RPC context.
|
|
40
|
+
*/
|
|
41
|
+
declare const createServerRPCContext: (server: ViteDevServer, customFunctions?: Partial<ServerFunctions>, options?: {
|
|
42
|
+
editor?: string;
|
|
43
|
+
}) => ServerRPCContext;
|
|
44
|
+
/**
|
|
45
|
+
* Timeline store for managing timeline events.
|
|
46
|
+
*/
|
|
47
|
+
declare class TimelineStore {
|
|
48
|
+
private groups;
|
|
49
|
+
private maxEvents;
|
|
50
|
+
constructor(maxEvents?: number);
|
|
51
|
+
/**
|
|
52
|
+
* Adds an event to a group.
|
|
53
|
+
*/
|
|
54
|
+
addEvent(groupId: string, event: TimelineEvent): void;
|
|
55
|
+
/**
|
|
56
|
+
* Gets all timeline groups.
|
|
57
|
+
*/
|
|
58
|
+
getGroups(): TimelineGroup[];
|
|
59
|
+
/**
|
|
60
|
+
* Gets events for a specific group.
|
|
61
|
+
*/
|
|
62
|
+
getGroupEvents(groupId: string): TimelineEvent[];
|
|
63
|
+
/**
|
|
64
|
+
* Gets all events across all groups.
|
|
65
|
+
*/
|
|
66
|
+
getAllEvents(): TimelineEvent[];
|
|
67
|
+
/**
|
|
68
|
+
* Clears events for a specific group.
|
|
69
|
+
*/
|
|
70
|
+
clearGroup(groupId: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Clears all events from all groups.
|
|
73
|
+
*/
|
|
74
|
+
clearAll(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Gets events within a time range.
|
|
77
|
+
*/
|
|
78
|
+
getEventsInRange(startTime: number, endTime: number): TimelineEvent[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Gets or creates the timeline store singleton instance.
|
|
82
|
+
*/
|
|
83
|
+
declare const getTimelineStore: () => TimelineStore;
|
|
84
|
+
/**
|
|
85
|
+
* Message channel interface for bidirectional communication
|
|
86
|
+
*/
|
|
87
|
+
interface MessageChannel<TEvents extends Record<string, (...args: any[]) => void>> {
|
|
88
|
+
/**
|
|
89
|
+
* Unsubscribe from an event
|
|
90
|
+
* @param event Event name
|
|
91
|
+
* @param handler Optional specific handler to remove
|
|
92
|
+
*/
|
|
93
|
+
off: <K extends keyof TEvents>(event: K, handler?: TEvents[K]) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Subscribe to an event
|
|
96
|
+
* @param event Event name
|
|
97
|
+
* @param handler Event handler
|
|
98
|
+
* @returns Unsubscribe function
|
|
99
|
+
*/
|
|
100
|
+
on: <K extends keyof TEvents>(event: K, handler: TEvents[K]) => () => void;
|
|
101
|
+
/**
|
|
102
|
+
* Subscribe to an event once
|
|
103
|
+
* @param event Event name
|
|
104
|
+
* @param handler Event handler
|
|
105
|
+
*/
|
|
106
|
+
once: <K extends keyof TEvents>(event: K, handler: TEvents[K]) => void;
|
|
107
|
+
/**
|
|
108
|
+
* Send a message/event
|
|
109
|
+
* @param event Event name
|
|
110
|
+
* @param data Event data
|
|
111
|
+
*/
|
|
112
|
+
send: <K extends keyof TEvents>(event: K, ...args: Parameters<TEvents[K]>) => void;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Channel factory function
|
|
116
|
+
*/
|
|
117
|
+
type ChannelFactory<TEvents extends Record<string, (...args: any[]) => void>> = () => MessageChannel<TEvents>;
|
|
118
|
+
/**
|
|
119
|
+
* Factory result providing a method to instantiate named message channels.
|
|
120
|
+
*/
|
|
121
|
+
interface MessageChannelContext<TEvents extends Record<string, (...args: any[]) => void>> {
|
|
122
|
+
/**
|
|
123
|
+
* Creates and returns a new channel instance.
|
|
124
|
+
*/
|
|
125
|
+
createChannel: () => MessageChannel<TEvents>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Loads settings from localStorage, merging with defaults.
|
|
129
|
+
* @returns Toolbar settings.
|
|
130
|
+
*/
|
|
131
|
+
declare const loadSettings: () => ToolbarSettings;
|
|
132
|
+
/**
|
|
133
|
+
* Saves settings to localStorage.
|
|
134
|
+
* @param settings Toolbar settings to save.
|
|
135
|
+
*/
|
|
136
|
+
declare const saveSettings: (settings: ToolbarSettings) => void;
|
|
137
|
+
/**
|
|
138
|
+
* Merges partial updates into the current settings and persists them.
|
|
139
|
+
* @param updates Partial settings to update.
|
|
140
|
+
* @returns Updated settings.
|
|
141
|
+
*/
|
|
142
|
+
declare const updateSettings: (updates: Partial<ToolbarSettings>) => ToolbarSettings;
|
|
143
|
+
export { ChannelFactory, ClientRPCContext, DevToolbarApp, DevToolbarHook, MessageChannel, MessageChannelContext, ClientFunctions as RPCClientFunctions, ServerFunctions as RPCServerFunctions, ServerRPCContext, TimelineEvent, TimelineGroup, type TimelineStore, ToolbarSettings, createClientRPCContext, createDevToolbarHook, createServerRPCContext, getGlobalHook, getTimelineStore, loadSettings, saveSettings, setupGlobalHook, updateSettings };
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Provides tools for AI agents (e.g. Claude Code) to read, resolve, and
|
|
5
|
-
* interact with visual annotations created through the dev toolbar.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* npx visulima-dev-toolbar-mcp
|
|
9
|
-
*
|
|
10
|
-
* Requires: @modelcontextprotocol/sdk (optional peer dependency)
|
|
11
|
-
*/
|
|
12
|
-
export declare const startMcpServer: () => Promise<void>;
|
|
1
|
+
declare const startMcpServer: () => Promise<void>;
|
|
2
|
+
export { startMcpServer };
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { ComponentType } from 'preact';
|
|
2
|
+
/**
|
|
3
|
+
* Toolbar placement options (for backward compatibility)
|
|
4
|
+
*/
|
|
5
|
+
type ToolbarPlacement = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
6
|
+
/**
|
|
7
|
+
* Notification levels
|
|
8
|
+
*/
|
|
9
|
+
type NotificationLevel = "info" | "warning" | "error";
|
|
10
|
+
/**
|
|
11
|
+
* Position anchor (which edge the toolbar is attached to)
|
|
12
|
+
* Matches Vue DevTools positioning
|
|
13
|
+
*/
|
|
14
|
+
type PositionAnchor = "top" | "bottom" | "left" | "right";
|
|
15
|
+
/**
|
|
16
|
+
* Frame state - matches Vue DevTools DevToolsFrameState
|
|
17
|
+
* @see https://github.com/vuejs/devtools/blob/main/packages/overlay/src/composables/state.ts
|
|
18
|
+
*/
|
|
19
|
+
interface FrameState {
|
|
20
|
+
/**
|
|
21
|
+
* Horizontal position as percentage (0-100)
|
|
22
|
+
*/
|
|
23
|
+
left: number;
|
|
24
|
+
/**
|
|
25
|
+
* Whether panel is open
|
|
26
|
+
*/
|
|
27
|
+
open: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Which edge the toolbar is anchored to
|
|
30
|
+
*/
|
|
31
|
+
position: PositionAnchor;
|
|
32
|
+
/**
|
|
33
|
+
* Vertical position as percentage (0-100)
|
|
34
|
+
*/
|
|
35
|
+
top: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Configuration options controlling the toolbar's initial appearance.
|
|
39
|
+
*/
|
|
40
|
+
interface ToolbarSettings {
|
|
41
|
+
/**
|
|
42
|
+
* Whether toolbar is visible by default
|
|
43
|
+
*/
|
|
44
|
+
defaultVisible: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Toolbar placement on screen
|
|
47
|
+
*/
|
|
48
|
+
placement: ToolbarPlacement;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to show notifications
|
|
51
|
+
*/
|
|
52
|
+
showNotifications: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Default toolbar settings
|
|
56
|
+
*/
|
|
57
|
+
declare const DEFAULT_TOOLBAR_SETTINGS: ToolbarSettings;
|
|
58
|
+
/**
|
|
59
|
+
* Server helpers available to apps
|
|
60
|
+
*/
|
|
61
|
+
interface ServerHelpers {
|
|
62
|
+
/**
|
|
63
|
+
* RPC client for calling server functions
|
|
64
|
+
*/
|
|
65
|
+
rpc: { [K in keyof ServerFunctions]: ServerFunctions[K] };
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Props passed to app tooltip (hover mini-canvas) components.
|
|
69
|
+
* Keep compact — tooltip components should be lightweight.
|
|
70
|
+
*/
|
|
71
|
+
interface AppTooltipProps {
|
|
72
|
+
/**
|
|
73
|
+
* Server helpers (RPC, etc.)
|
|
74
|
+
*/
|
|
75
|
+
helpers: ServerHelpers;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Event target for app communication
|
|
79
|
+
*/
|
|
80
|
+
interface ToolbarAppEventTarget extends EventTarget {
|
|
81
|
+
/**
|
|
82
|
+
* Dispatch a custom event
|
|
83
|
+
*/
|
|
84
|
+
dispatchEvent: (event: Event) => boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* App view configuration
|
|
88
|
+
*/
|
|
89
|
+
type AppView = {
|
|
90
|
+
/**
|
|
91
|
+
* Render app inline in shadow DOM (default)
|
|
92
|
+
*/
|
|
93
|
+
type: "inline";
|
|
94
|
+
} | {
|
|
95
|
+
/**
|
|
96
|
+
* URL to load in iframe
|
|
97
|
+
*/
|
|
98
|
+
src: string;
|
|
99
|
+
/**
|
|
100
|
+
* Render app in iframe for isolation
|
|
101
|
+
*/
|
|
102
|
+
type: "iframe";
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Props passed to Preact component apps
|
|
106
|
+
*/
|
|
107
|
+
interface AppComponentProps {
|
|
108
|
+
/**
|
|
109
|
+
* Event target for app communication
|
|
110
|
+
*/
|
|
111
|
+
eventTarget: ToolbarAppEventTarget;
|
|
112
|
+
/**
|
|
113
|
+
* Server helpers (RPC, etc.)
|
|
114
|
+
*/
|
|
115
|
+
helpers: ServerHelpers;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Dev toolbar app definition
|
|
119
|
+
*/
|
|
120
|
+
interface DevToolbarApp {
|
|
121
|
+
/**
|
|
122
|
+
* Called before app is toggled off
|
|
123
|
+
* Return false to prevent closing
|
|
124
|
+
* @param canvas Shadow root of the app
|
|
125
|
+
* @returns Whether to allow closing
|
|
126
|
+
*/
|
|
127
|
+
beforeTogglingOff?: (canvas: ShadowRoot) => boolean | Promise<boolean>;
|
|
128
|
+
/**
|
|
129
|
+
* Preact component for rendering (alternative to init)
|
|
130
|
+
* If provided, this will be used instead of init
|
|
131
|
+
*/
|
|
132
|
+
component?: ComponentType<AppComponentProps>;
|
|
133
|
+
/**
|
|
134
|
+
* When true, this app is automatically activated when the toolbar opens for
|
|
135
|
+
* the first time (or when no other app has been activated yet).
|
|
136
|
+
* Only the first registered app with defaultOpen: true is used.
|
|
137
|
+
* @default false
|
|
138
|
+
*/
|
|
139
|
+
defaultOpen?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Called when the app is unregistered / removed from the toolbar.
|
|
142
|
+
* Use this for final cleanup (event listeners, timers, subscriptions).
|
|
143
|
+
* @param canvas Shadow root of the app
|
|
144
|
+
*/
|
|
145
|
+
destroy?: (canvas: ShadowRoot) => Promise<void> | void;
|
|
146
|
+
/**
|
|
147
|
+
* Icon HTML string (SVG)
|
|
148
|
+
*/
|
|
149
|
+
icon: string;
|
|
150
|
+
/**
|
|
151
|
+
* Unique identifier for the app
|
|
152
|
+
*/
|
|
153
|
+
id: string;
|
|
154
|
+
/**
|
|
155
|
+
* Initialize the app when opened (vanilla JS/CSS/HTML)
|
|
156
|
+
* @param canvas Shadow root to render into
|
|
157
|
+
* @param eventTarget Event target for app communication
|
|
158
|
+
* @param helpers Server helpers (RPC, etc.)
|
|
159
|
+
*/
|
|
160
|
+
init?: (canvas: ShadowRoot, eventTarget: ToolbarAppEventTarget, helpers: ServerHelpers) => void | Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Display name of the app
|
|
163
|
+
*/
|
|
164
|
+
name: string;
|
|
165
|
+
/**
|
|
166
|
+
* Action button callback — called when the button is activated (active: false → true).
|
|
167
|
+
* When present, clicking the toolbar button will NOT open a panel.
|
|
168
|
+
* Instead the button toggles its active state and calls onClick (activate)
|
|
169
|
+
* or onDeactivate (deactivate).
|
|
170
|
+
*/
|
|
171
|
+
onClick?: () => Promise<void> | void;
|
|
172
|
+
/**
|
|
173
|
+
* Called when the action button is deactivated (active: true → false).
|
|
174
|
+
* Only meaningful when onClick is also provided.
|
|
175
|
+
*/
|
|
176
|
+
onDeactivate?: () => Promise<void> | void;
|
|
177
|
+
/**
|
|
178
|
+
* Optional hover tooltip component — renders a compact live preview when the
|
|
179
|
+
* user hovers over this app's button in the toolbar pill.
|
|
180
|
+
* The component should be small (≤280px wide) and self-contained.
|
|
181
|
+
* If omitted, hovering shows the native title tooltip only.
|
|
182
|
+
*/
|
|
183
|
+
tooltip?: ComponentType<AppTooltipProps>;
|
|
184
|
+
/**
|
|
185
|
+
* App rendering mode
|
|
186
|
+
*/
|
|
187
|
+
view?: AppView;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Internal app state (extends DevToolbarApp)
|
|
191
|
+
*/
|
|
192
|
+
interface DevToolbarAppState extends DevToolbarApp {
|
|
193
|
+
/**
|
|
194
|
+
* Whether the app is currently active/open
|
|
195
|
+
*/
|
|
196
|
+
active: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Whether this is a built-in app
|
|
199
|
+
*/
|
|
200
|
+
builtIn: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Event target for this app
|
|
203
|
+
*/
|
|
204
|
+
eventTarget: ToolbarAppEventTarget;
|
|
205
|
+
/**
|
|
206
|
+
* Notification state
|
|
207
|
+
*/
|
|
208
|
+
notification: {
|
|
209
|
+
/**
|
|
210
|
+
* Notification level
|
|
211
|
+
*/
|
|
212
|
+
level?: NotificationLevel;
|
|
213
|
+
/**
|
|
214
|
+
* Whether notification is active
|
|
215
|
+
*/
|
|
216
|
+
state: boolean;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* App initialization status
|
|
220
|
+
*/
|
|
221
|
+
status: "ready" | "loading" | "pending" | "error";
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Placeholder for ServerFunctions (defined in rpc.ts)
|
|
225
|
+
*/
|
|
226
|
+
interface ServerFunctions {
|
|
227
|
+
[key: string]: (...args: any[]) => Promise<any>;
|
|
228
|
+
}
|
|
229
|
+
export { AppView as A, DevToolbarApp as D, FrameState as F, NotificationLevel as N, PositionAnchor as P, ServerFunctions as S, ToolbarSettings as T, DevToolbarAppState as a, DEFAULT_TOOLBAR_SETTINGS as b, ServerHelpers as c, ToolbarAppEventTarget as d, ToolbarPlacement as e };
|