@visulima/dev-toolbar 1.0.0-alpha.9 → 1.0.1
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 +473 -0
- package/LICENSE.md +21 -0
- package/README.md +64 -17
- package/bin/mcp.js +1 -1
- package/dist/apps/a11y/index.d.ts +3 -2
- package/dist/apps/a11y/index.js +3 -3
- package/dist/apps/annotations/index.d.ts +3 -2
- package/dist/apps/annotations/index.js +2 -2
- package/dist/apps/assets/index.d.ts +3 -2
- package/dist/apps/assets/index.js +2 -2
- package/dist/apps/inspector/index.d.ts +3 -2
- package/dist/apps/inspector/index.js +11 -11
- package/dist/apps/module-graph/index.d.ts +3 -2
- package/dist/apps/module-graph/index.js +2 -2
- package/dist/apps/performance/index.d.ts +3 -2
- package/dist/apps/performance/index.js +2 -2
- package/dist/apps/seo/index.d.ts +3 -2
- package/dist/apps/seo/index.js +2 -2
- package/dist/apps/settings/index.d.ts +3 -2
- package/dist/apps/settings/index.js +2 -2
- package/dist/apps/tailwind/index.d.ts +3 -2
- package/dist/apps/tailwind/index.js +5 -5
- package/dist/apps/timeline/index.d.ts +3 -2
- package/dist/apps/timeline/index.js +2 -2
- package/dist/apps/vite-config/index.d.ts +3 -2
- package/dist/apps/vite-config/index.js +2 -2
- package/dist/client/overlay.d.ts +1 -1
- package/dist/client/overlay.js +1 -1
- package/dist/index.d.ts +133 -8
- package/dist/index.js +1 -1
- package/dist/mcp/server.d.ts +2 -12
- package/dist/mcp/server.js +1 -1
- package/dist/packem_chunks/inject-source.js +7 -9
- package/dist/packem_shared/Alert-CZq7C43v.js +1 -0
- package/dist/packem_shared/Badge-PpblpNWg.js +1 -0
- package/dist/packem_shared/Button-CAKvtfij.js +1 -0
- package/dist/packem_shared/Card-BSy2oRiS.js +1 -0
- package/dist/packem_shared/Icon-0XYV-4AL.js +1 -0
- package/dist/packem_shared/{Input-Cs6aduTi.js → Input-Dc1WiT01.js} +1 -1
- package/dist/packem_shared/Label-BZh8XxUb.js +1 -0
- package/dist/packem_shared/Popover-DuiU8EPg.js +1 -0
- package/dist/packem_shared/Progress-C90LC--2.js +1 -0
- package/dist/packem_shared/Select-CwD-d0pi.js +1 -0
- package/dist/packem_shared/Separator-PSjfhX_W.js +1 -0
- package/dist/packem_shared/Skeleton-BAFrGUR1.js +1 -0
- package/dist/packem_shared/Switch-Wpsp5M3p.js +1 -0
- package/dist/packem_shared/Tabs-BdNFQd3c.js +1 -0
- package/dist/packem_shared/{Textarea-Yfg3dLZi.js → Textarea-DP9gpte-.js} +1 -1
- package/dist/packem_shared/Tooltip-DVeuszoY.js +1 -0
- package/dist/packem_shared/annotation-settings-DlLZO5Zp.js +1 -0
- package/dist/packem_shared/annotation-store-WIJhHG5y.js +1 -0
- package/dist/packem_shared/app.d-SmKEDxsI.d.ts +229 -0
- package/dist/packem_shared/clsx-CtZWcPHt.js +1 -0
- package/dist/packem_shared/createClientRPCContext-5Bh0Q7ai.js +1 -0
- package/dist/packem_shared/createDevToolbarHook-C_TF-RyL.js +1 -0
- package/dist/packem_shared/createServerRPCContext-0Fs78uvP.js +1 -0
- package/dist/packem_shared/getGlobalHook-D6jRtv7N.js +1 -0
- package/dist/packem_shared/getTimelineStore-BT5sImVb.js +1 -0
- package/dist/packem_shared/global-api.d-DeaCvII9.d.ts +546 -0
- package/dist/packem_shared/loadSettings-C0pUyx9j.js +1 -0
- package/dist/packem_shared/server.d-ZkcY0pge.d.ts +39 -0
- package/dist/packem_shared/sharedToolbarStylesheet-BRJrLf-_.js +2 -0
- package/dist/packem_shared/store-Dqy0FbGw.js +1 -0
- package/dist/packem_shared/use-theme-DIqZkPAe.js +1 -0
- package/dist/toolbar/index.d.ts +152 -48
- package/dist/toolbar/index.js +3 -3
- package/dist/ui/index.d.ts +382 -18
- package/dist/ui/index.js +1 -1
- package/dist/vite-plugin.d.ts +183 -146
- package/dist/vite-plugin.js +4 -4
- package/package.json +30 -32
- 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/packem_shared/Alert-D2CvX4fw.js +0 -1
- package/dist/packem_shared/Badge-BEgU04nl.js +0 -1
- package/dist/packem_shared/Button-Bkx66Co7.js +0 -1
- package/dist/packem_shared/Card-CJa4vHVc.js +0 -1
- package/dist/packem_shared/Icon-B6UHkC0o.js +0 -1
- package/dist/packem_shared/Label-DyCng4Cp.js +0 -1
- package/dist/packem_shared/Popover-BtFVaZYg.js +0 -1
- package/dist/packem_shared/Progress-DN6zn-0l.js +0 -1
- package/dist/packem_shared/Select-DgQ4ss-s.js +0 -1
- package/dist/packem_shared/Separator-D38mKeZv.js +0 -1
- package/dist/packem_shared/Skeleton-Dv-tcA1P.js +0 -1
- package/dist/packem_shared/Switch-C3NTpeoR.js +0 -1
- package/dist/packem_shared/Tabs-DKWMiawt.js +0 -1
- package/dist/packem_shared/Tooltip-CioncSXj.js +0 -1
- package/dist/packem_shared/annotation-settings-Bv0TH4WI.js +0 -1
- package/dist/packem_shared/annotation-store-bLQRYMaI.js +0 -1
- package/dist/packem_shared/clsx-wGlvpUfw.js +0 -1
- package/dist/packem_shared/createClientRPCContext-DgRxrllw.js +0 -1
- package/dist/packem_shared/createDevToolbarHook-4bZZiHPI.js +0 -1
- package/dist/packem_shared/createServerRPCContext-CJ6F87o_.js +0 -1
- package/dist/packem_shared/getTimelineStore-B1cfjWV8.js +0 -1
- package/dist/packem_shared/loadSettings-hvjR4fcS.js +0 -1
- package/dist/packem_shared/setupGlobalHook-CCf9Logv.js +0 -1
- package/dist/packem_shared/sharedToolbarStylesheet-CaTdYhVe.js +0 -2
- package/dist/packem_shared/store-DaUtLjf3.js +0 -1
- package/dist/packem_shared/use-frame-state-CxrlPUM5.js +0 -1
- package/dist/packem_shared/use-theme-zpm4zmqP.js +0 -1
- 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
|
@@ -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;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Element utility functions for annotation — shadow DOM piercing, CSS selector
|
|
3
|
-
* generation, smart naming, text extraction, a11y capture, computed styles,
|
|
4
|
-
* framework detection, screenshot, freeze, markdown export.
|
|
5
|
-
*/
|
|
6
|
-
import type { AccessibilityInfo, BoundingBox, FrameworkContext } from "../../types/annotations.d.ts";
|
|
7
|
-
export declare const deepElementFromPoint: (x: number, y: number) => Element | null;
|
|
8
|
-
/**
|
|
9
|
-
* Get the viewport-relative bounding rect for an element, accounting for
|
|
10
|
-
* it potentially being inside nested iframes.
|
|
11
|
-
*/
|
|
12
|
-
export declare const getViewportRect: (element: Element) => DOMRect;
|
|
13
|
-
/**
|
|
14
|
-
* Pierce mode: Cmd+hover to find the actual element underneath invisible
|
|
15
|
-
* overlays, animation wrappers, and empty container divs.
|
|
16
|
-
*
|
|
17
|
-
* Two-pass approach:
|
|
18
|
-
* 1. Find elements with direct text content (skips empty wrappers)
|
|
19
|
-
* 2. If no text found, return the smallest visible element (catches
|
|
20
|
-
* visual-only elements like timeline bars, chart segments, swatches)
|
|
21
|
-
*/
|
|
22
|
-
export declare const pierceElementFromPoint: (x: number, y: number) => Element | null;
|
|
23
|
-
export declare const getParentElement: (element: Element) => Element | null;
|
|
24
|
-
/**
|
|
25
|
-
* Check if element or any ancestor has fixed or sticky positioning.
|
|
26
|
-
*/
|
|
27
|
-
export declare const isElementFixed: (element: Element) => boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Generate a human-readable element label like agentation:
|
|
30
|
-
* button "Submit", link to /page, image "alt text", input[type=email]
|
|
31
|
-
*/
|
|
32
|
-
export declare const getElementLabel: (element: Element) => string;
|
|
33
|
-
/**
|
|
34
|
-
* Generate a unique CSS selector for an element.
|
|
35
|
-
* Strategy: ID → unique class combo → nth-of-type fallback.
|
|
36
|
-
*/
|
|
37
|
-
export declare const generateSelector: (element: Element) => string;
|
|
38
|
-
/**
|
|
39
|
-
* Clean CSS classes by stripping module hash suffixes.
|
|
40
|
-
*/
|
|
41
|
-
export declare const cleanCssClasses: (classes: DOMTokenList) => string;
|
|
42
|
-
/**
|
|
43
|
-
* Build full DOM ancestry path (body > main > article > section > p).
|
|
44
|
-
* Marks shadow DOM boundary crossings with ⟨shadow⟩.
|
|
45
|
-
*/
|
|
46
|
-
export declare const getFullDomPath: (element: Element) => string;
|
|
47
|
-
/**
|
|
48
|
-
* Get sibling elements as context (up to 5 siblings).
|
|
49
|
-
*/
|
|
50
|
-
export declare const getNearbyElements: (element: Element) => string;
|
|
51
|
-
/**
|
|
52
|
-
* Extract nearby text content from an element (up to maxLength chars).
|
|
53
|
-
*/
|
|
54
|
-
export declare const getNearbyText: (element: Element, maxLength?: number) => string;
|
|
55
|
-
/**
|
|
56
|
-
* Capture currently selected text (up to maxLength chars).
|
|
57
|
-
*/
|
|
58
|
-
export declare const getSelectedText: (maxLength?: number) => string;
|
|
59
|
-
/**
|
|
60
|
-
* Capture accessibility attributes from an element.
|
|
61
|
-
*/
|
|
62
|
-
export declare const captureAccessibility: (element: Element) => AccessibilityInfo;
|
|
63
|
-
/**
|
|
64
|
-
* Capture key computed styles for forensic context.
|
|
65
|
-
*/
|
|
66
|
-
export declare const captureComputedStyles: (element: Element) => string;
|
|
67
|
-
/**
|
|
68
|
-
* Detect framework component for an element.
|
|
69
|
-
*/
|
|
70
|
-
export declare const detectFrameworkComponent: (element: Element) => FrameworkContext | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* Capture a screenshot of an element's bounding area.
|
|
73
|
-
*
|
|
74
|
-
* Uses the Screen Capture API (getDisplayMedia) to capture a frame from the
|
|
75
|
-
* screen, then crops to the element's bounding rect. This is the most reliable
|
|
76
|
-
* approach — works with external CSS, images, shadow DOM, and canvas content.
|
|
77
|
-
*
|
|
78
|
-
* Falls back to null if the user denies permission or the API is unavailable.
|
|
79
|
-
*/
|
|
80
|
-
export declare const captureElementScreenshot: (element: Element) => Promise<string | null>;
|
|
81
|
-
/**
|
|
82
|
-
* Get all elements within a rectangular region.
|
|
83
|
-
* Searches across shadow DOM and same-origin iframes.
|
|
84
|
-
*/
|
|
85
|
-
export declare const getElementsInRect: (rect: DOMRect) => Element[];
|
|
86
|
-
/**
|
|
87
|
-
* Get bounding boxes from a list of elements (iframe-aware).
|
|
88
|
-
*/
|
|
89
|
-
export declare const getElementBoundingBoxes: (elements: Element[]) => BoundingBox[];
|
|
90
|
-
/**
|
|
91
|
-
* Output detail levels:
|
|
92
|
-
* - compact: "Element: comment (re: "selected text...")"
|
|
93
|
-
* - standard: Element + location + component + feedback
|
|
94
|
-
* - detailed: + classes, position, context text
|
|
95
|
-
* - forensic: + full DOM path, styles, accessibility, nearby elements
|
|
96
|
-
*/
|
|
97
|
-
export declare const annotationsToMarkdown: (annotations: {
|
|
98
|
-
accessibility?: AccessibilityInfo;
|
|
99
|
-
comment: string;
|
|
100
|
-
computedStyles?: string;
|
|
101
|
-
cssClasses?: string;
|
|
102
|
-
elementLabel?: string;
|
|
103
|
-
elementPath?: string;
|
|
104
|
-
elementTag: string;
|
|
105
|
-
frameworkContext?: FrameworkContext;
|
|
106
|
-
fullPath?: string;
|
|
107
|
-
intent: string;
|
|
108
|
-
nearbyElements?: string;
|
|
109
|
-
nearbyText?: string;
|
|
110
|
-
selectedText?: string;
|
|
111
|
-
severity: string;
|
|
112
|
-
source?: string;
|
|
113
|
-
status: string;
|
|
114
|
-
url: string;
|
|
115
|
-
}[], detail?: "compact" | "detailed" | "forensic" | "standard") => string;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Freeze Animations — comprehensive animation/timer freeze system.
|
|
3
|
-
*
|
|
4
|
-
* Monkey-patches setTimeout, setInterval, and requestAnimationFrame so that
|
|
5
|
-
* callbacks are silently queued while frozen. Also injects CSS to pause
|
|
6
|
-
* CSS animations/transitions, pauses WAAPI animations, and pauses videos.
|
|
7
|
-
*
|
|
8
|
-
* Patches are installed as a side effect of importing this module.
|
|
9
|
-
* Toolbar/popup code must import `originalSetTimeout` to bypass the patch.
|
|
10
|
-
*
|
|
11
|
-
* Based on agentation's freeze-animations.ts pattern.
|
|
12
|
-
*/
|
|
13
|
-
/** Original (unpatched) setTimeout — use for toolbar/popup animations */
|
|
14
|
-
export declare const originalSetTimeout: typeof setTimeout;
|
|
15
|
-
/** Whether animations are currently frozen */
|
|
16
|
-
export declare const isFrozen: () => boolean;
|
|
17
|
-
/** Freeze all animations, timers, and videos */
|
|
18
|
-
export declare const freezeAll: () => void;
|
|
19
|
-
/** Unfreeze — resume everything and replay queued callbacks */
|
|
20
|
-
export declare const unfreezeAll: () => void;
|
|
21
|
-
/** Toggle freeze state */
|
|
22
|
-
export declare const toggleFreeze: () => boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Start element inspection mode.
|
|
3
|
-
* Attaches crosshair cursor, hover highlight overlay, and a floating badge.
|
|
4
|
-
* Inspection stays active after each click so the user can inspect multiple
|
|
5
|
-
* elements without re-activating. Only stops on explicit cancel (Escape,
|
|
6
|
-
* badge Cancel button) or via {@link stopGlobalInspection}.
|
|
7
|
-
* Survives component unmounts — state lives at module level.
|
|
8
|
-
* @param onCancel Called when the user cancels via badge button or Escape.
|
|
9
|
-
*/
|
|
10
|
-
export declare const startGlobalInspection: (onCancel: () => void) => void;
|
|
11
|
-
/**
|
|
12
|
-
* Cancel any in-progress inspection and clean up all DOM side-effects.
|
|
13
|
-
*/
|
|
14
|
-
export declare const stopGlobalInspection: () => void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Viewport rulers & draggable guidelines for the inspector.
|
|
3
|
-
*
|
|
4
|
-
* Rulers are rendered with Canvas 2D (DPR-aware) along the top and left
|
|
5
|
-
* viewport edges. Users can drag from a ruler to spawn a guideline — a
|
|
6
|
-
* reference line that snaps to nearby element edges. Dragging a guideline
|
|
7
|
-
* back onto the ruler removes it.
|
|
8
|
-
*/
|
|
9
|
-
import type { InspectorPalette } from "./theme-palette.d.ts";
|
|
10
|
-
export declare const createRulers: (palette: InspectorPalette) => void;
|
|
11
|
-
export declare const removeRulers: () => void;
|
|
12
|
-
export declare const areRulersVisible: () => boolean;
|
|
13
|
-
/** Check if an element is part of the ruler/guideline system. */
|
|
14
|
-
export declare const isRulerElement: (element: Element) => boolean;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared theme palette for inspector and annotation overlay.
|
|
3
|
-
* Both run in document.body (outside Shadow DOM) so CSS variables
|
|
4
|
-
* from the toolbar's :host are not available. We resolve the theme
|
|
5
|
-
* from the same localStorage key used by use-theme.ts.
|
|
6
|
-
*/
|
|
7
|
-
export interface BasePalette {
|
|
8
|
-
bg: string;
|
|
9
|
-
btnBg: string;
|
|
10
|
-
btnBgHover: string;
|
|
11
|
-
btnBorder: string;
|
|
12
|
-
btnBorderHover: string;
|
|
13
|
-
fg: string;
|
|
14
|
-
muted: string;
|
|
15
|
-
primary: string;
|
|
16
|
-
shadow: string;
|
|
17
|
-
}
|
|
18
|
-
export interface InspectorPalette extends BasePalette {
|
|
19
|
-
overlayBg: string;
|
|
20
|
-
overlayBorder: string;
|
|
21
|
-
}
|
|
22
|
-
export interface AnnotationPalette extends BasePalette {
|
|
23
|
-
danger: string;
|
|
24
|
-
success: string;
|
|
25
|
-
}
|
|
26
|
-
export declare const INSPECTOR_DARK: InspectorPalette;
|
|
27
|
-
export declare const INSPECTOR_LIGHT: InspectorPalette;
|
|
28
|
-
export declare const ANNOTATION_DARK: AnnotationPalette;
|
|
29
|
-
export declare const ANNOTATION_LIGHT: AnnotationPalette;
|
|
30
|
-
export declare const isDarkTheme: () => boolean;
|
|
31
|
-
export declare const getInspectorPalette: () => InspectorPalette;
|
|
32
|
-
export declare const getAnnotationPalette: () => AnnotationPalette;
|
|
33
|
-
/** Reset cache (e.g. when theme changes). */
|
|
34
|
-
export declare const resetPaletteCache: () => void;
|
|
@@ -1,12 +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
|
-
declare const createDevToolbarHook: (onRegisterApp?: (app: DevToolbarApp) => void, onTimelineEvent?: (groupId: string, event: TimelineEvent) => void) => DevToolbarHook;
|
|
11
|
-
export { createDevToolbarHook };
|
|
12
|
-
export default createDevToolbarHook;
|
package/dist/hooks/events.d.ts
DELETED
|
@@ -1,15 +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
|
-
* Setup global hook on window object.
|
|
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 setupGlobalHook: (onRegisterApp?: (app: DevToolbarApp) => void, onTimelineEvent?: (groupId: string, event: TimelineEvent) => void) => DevToolbarHook;
|
|
11
|
-
/**
|
|
12
|
-
* Get the global hook instance.
|
|
13
|
-
* @returns Hook instance or undefined.
|
|
14
|
-
*/
|
|
15
|
-
export declare const getGlobalHook: () => DevToolbarHook | undefined;
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var c=Object.defineProperty;var n=(e,r)=>c(e,"name",{value:r,configurable:!0});import{clsx as s}from"./clsx-wGlvpUfw.js";import{jsx as l}from"preact/jsx-runtime";var d=Object.defineProperty,i=n((e,r)=>d(e,"name",{value:r,configurable:!0}),"s");const o={default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive",info:"border-info/50 text-info",success:"border-success/50 text-success",warning:"border-warning/50 text-warning"},f=i(({children:e,class:r,variant:t="default",...a})=>l("div",{class:s("relative w-full rounded-none border p-4 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7",o[t],r),role:"alert",...a,children:e}),"Alert"),p=i(({children:e,class:r,...t})=>l("h5",{class:s("mb-1 font-medium leading-none tracking-tight",r),...t,children:e}),"AlertTitle"),b=i(({children:e,class:r,...t})=>l("div",{class:s("text-sm [&_p]:leading-relaxed",r),...t,children:e}),"AlertDescription");export{f as Alert,b as AlertDescription,p as AlertTitle};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var t=(r,e)=>a(r,"name",{value:e,configurable:!0});import{clsx as s}from"./clsx-wGlvpUfw.js";import{jsx as d}from"preact/jsx-runtime";var i=Object.defineProperty,c=t((r,e)=>i(r,"name",{value:e,configurable:!0}),"t");const u={default:"border-transparent bg-primary text-primary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",info:"border-transparent bg-info text-info-foreground",outline:"text-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",success:"border-transparent bg-success text-success-foreground",warning:"border-transparent bg-warning text-warning-foreground"},l=c(({children:r,class:e,variant:n="default",...o})=>d("div",{class:s("inline-flex items-center rounded-none border px-2.5 py-0.5 text-xs font-semibold transition-colors",u[n],e),...o,children:r}),"Badge");export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var d=Object.defineProperty;var t=(e,r)=>d(e,"name",{value:r,configurable:!0});import{clsx as s}from"./clsx-wGlvpUfw.js";import{jsx as a}from"preact/jsx-runtime";var c=Object.defineProperty,l=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"r");const g={default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"text-muted-foreground hover:bg-foreground/8 hover:text-foreground",link:"text-primary underline-offset-4 hover:underline",outline:"border border-input bg-background text-foreground hover:bg-foreground/8",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},f={default:"h-9 px-4 py-2",icon:"h-9 w-9",lg:"h-10 px-8",sm:"h-8 px-3 text-xs"},x=l(({children:e,class:r,size:o="default",type:n="button",variant:i="default",...u})=>a("button",{class:s("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-none text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",g[i],f[o],r),type:n,...u,children:e}),"Button");export{x as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var l=(e,r)=>i(e,"name",{value:r,configurable:!0});import{clsx as d}from"./clsx-wGlvpUfw.js";import{jsx as s}from"preact/jsx-runtime";var n=Object.defineProperty,c=l((e,r)=>n(e,"name",{value:r,configurable:!0}),"t");const C=c(({children:e,class:r,...a})=>s("div",{class:d("bg-card text-card-foreground rounded-none border shadow",r),...a,children:e}),"Card"),p=c(({children:e,class:r,...a})=>s("div",{class:d("flex flex-col space-y-1.5 p-6",r),...a,children:e}),"CardHeader"),f=c(({children:e,class:r,...a})=>s("h3",{class:d("font-semibold leading-none tracking-tight",r),...a,children:e}),"CardTitle"),m=c(({children:e,class:r,...a})=>s("div",{class:d("text-sm text-muted-foreground",r),...a,children:e}),"CardDescription"),x=c(({children:e,class:r,...a})=>s("div",{class:d("p-6 pt-0",r),...a,children:e}),"CardContent"),v=c(({children:e,class:r,...a})=>s("div",{class:d("flex items-center p-6 pt-0",r),...a,children:e}),"CardFooter");export{C as Card,x as CardContent,m as CardDescription,v as CardFooter,p as CardHeader,f as CardTitle};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var t=(a,e)=>o(a,"name",{value:e,configurable:!0});import{clsx as s}from"./clsx-wGlvpUfw.js";import{jsx as i}from"preact/jsx-runtime";var n=Object.defineProperty,c=t((a,e)=>n(a,"name",{value:e,configurable:!0}),"r");const p=c(({class:a,size:e=13,src:r})=>i("span",{class:s("inline-block shrink-0",a),style:{backgroundColor:"currentColor",height:e,maskImage:`url(${r})`,maskRepeat:"no-repeat",maskSize:"contain",WebkitMaskImage:`url(${r})`,WebkitMaskRepeat:"no-repeat",WebkitMaskSize:"contain",width:e}}),"Icon");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var l=(e,a)=>o(e,"name",{value:a,configurable:!0});import{clsx as t}from"./clsx-wGlvpUfw.js";import{jsx as s}from"preact/jsx-runtime";var d=Object.defineProperty,i=l((e,a)=>d(e,"name",{value:a,configurable:!0}),"l");const p=i(({children:e,class:a,...r})=>s("label",{class:t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",a),...r,children:e}),"Label");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var R=Object.defineProperty;var P=(e,o)=>R(e,"name",{value:o,configurable:!0});import{addHookName as v}from"preact/devtools";import{computePosition as k,offset as E,flip as $,shift as j}from"@floating-ui/dom";import{clsx as g}from"./clsx-wGlvpUfw.js";import{createContext as z}from"preact";import{useState as b,useRef as y,useEffect as C,useContext as H}from"preact/hooks";import{jsx as f}from"preact/jsx-runtime";var L=Object.defineProperty,r=P((e,o)=>L(e,"name",{value:o,configurable:!0}),"o");const O=z(void 0),h=r(()=>{const e=H(O);if(!e)throw new Error("Popover subcomponent must be used within <Popover>");return e},"usePopoverContext"),q=r(({children:e,defaultOpen:o,onOpenChange:i,open:n})=>{const s=n!==void 0,[u,t]=v(b(o??!1),"internalOpen"),a=s?n:u,c=v(y(null),"triggerRef"),p=r(d=>{s||t(d),i?.(d)},"setOpen");return f(O.Provider,{value:{open:a,setOpen:p,triggerRef:c},children:f("span",{style:{display:"contents"},children:e})})},"Popover"),A=r(({children:e,class:o,...i})=>{const{open:n,setOpen:s,triggerRef:u}=h(),t=r(a=>{u.current=a},"handleRef");return f("button",{"aria-expanded":n,class:g("",o),onClick:r(()=>{i.disabled||s(!n)},"onClick"),ref:t,type:"button",...i,children:e})},"PopoverTrigger"),B=r(({align:e="center",children:o,class:i,side:n="bottom",sideOffset:s=4,...u})=>{const{open:t,setOpen:a,triggerRef:c}=h(),p=v(y(null),"contentRef"),[d,w]=v(b({x:0,y:0}),"position");if(C(()=>{if(!t||!c.current||!p.current)return;const m=e==="center"?n:`${n}-${e}`;k(c.current,p.current,{middleware:[E(s),$(),j({padding:4})],placement:m}).then(l=>(w({x:l.x,y:l.y}),l)).catch(()=>{})},[t,n,s,e,c]),C(()=>{if(!t)return;const m=r(l=>{if(p.current&&!p.current.contains(l.target)){const x=c.current;if(x&&x.contains(l.target))return;a(!1)}},"handleMouseDown");return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[t,a,c]),!!t)return f("div",{class:g("z-50 w-72 rounded-none border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",i),ref:p,role:"dialog",style:{left:`${d.x}px`,position:"fixed",top:`${d.y}px`},...u,children:o})},"PopoverContent"),F=r(({children:e,class:o,...i})=>{const{setOpen:n}=h();return f("button",{class:g("",o),onClick:r(()=>{n(!1)},"onClick"),type:"button",...i,children:e})},"PopoverClose");export{q as Popover,F as PopoverClose,B as PopoverContent,A as PopoverTrigger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var e=(a,r)=>i(a,"name",{value:r,configurable:!0});import{clsx as o}from"./clsx-wGlvpUfw.js";import{jsx as l}from"preact/jsx-runtime";var t=Object.defineProperty,n=e((a,r)=>t(a,"name",{value:r,configurable:!0}),"s");const m=n(({class:a,value:r,...s})=>l("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":r??0,class:o("relative h-2 w-full overflow-hidden rounded-none bg-primary/20",a),role:"progressbar",...s,children:l("div",{class:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(r??0)}%)`}})}),"Progress");export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var X=Object.defineProperty;var q=(e,l)=>X(e,"name",{value:l,configurable:!0});import{addHookName as u}from"preact/devtools";import{computePosition as F,offset as G,flip as Q,shift as Y}from"@floating-ui/dom";import{clsx as k}from"./clsx-wGlvpUfw.js";import{createContext as Z}from"preact";import{useState as w,useRef as S,useCallback as _,useEffect as C,useMemo as ee,useContext as te}from"preact/hooks";import{jsx as f,jsxs as T}from"preact/jsx-runtime";var re=Object.defineProperty,n=q((e,l)=>re(e,"name",{value:l,configurable:!0}),"r");const U=Z(void 0),D=n(()=>{const e=te(U);if(!e)throw new Error("Select subcomponent must be used within <Select>");return e},"useSelectContext");let K=0;const de=n(({children:e,onValueChange:l,value:o=""})=>{const[t,a]=u(w(!1),"open"),[d,c]=u(w(""),"search"),[g,r]=u(w(null),"highlightedValue"),x=u(S(null),"triggerRef"),[m]=u(w(()=>(K+=1,`select-${K}`)),"instanceId"),v=_(i=>{l?.(i),a(!1),c("")},[l]);C(()=>{t||(c(""),r(null))},[t]);const R=u(ee(()=>({highlightedValue:g,instanceId:m,onSelect:v,open:t,search:d,setHighlightedValue:r,setOpen:a,setSearch:c,triggerRef:x,value:o}),[g,m,v,t,d,o]),"contextValue");return f(U.Provider,{value:R,children:f("span",{style:{display:"contents"},children:e})})},"Select"),fe=n(({children:e,class:l,...o})=>{const{open:t,setOpen:a,triggerRef:d}=D();return T("button",{"aria-expanded":t,"aria-haspopup":"listbox",class:k("inline-flex items-center justify-between gap-2","bg-foreground/6 border border-border","text-[0.775rem] font-medium text-foreground","px-2.5 py-1.5 cursor-pointer","focus:outline-none focus:ring-1 focus:ring-ring","transition-colors duration-150",l),onClick:n(()=>{a(!t)},"onClick"),ref:n(c=>{d.current=c},"ref"),type:"button",...o,children:[e,f("svg",{"aria-hidden":"true",class:k("h-3 w-3 shrink-0 opacity-60 transition-transform duration-150",t&&"rotate-180"),fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24",children:f("path",{d:"m6 9 6 6 6-6"})})]})},"SelectTrigger"),pe=n(({class:e,options:l,placeholder:o="Select…"})=>{const{value:t}=D(),a=l.find(d=>d.value===t);return f("span",{class:k("truncate",!a&&"text-muted-foreground",e),children:a?a.label:o})},"SelectValue"),ne=n(e=>[...e.querySelectorAll("[role='option']:not([aria-disabled='true'])")],"getOptionElements"),N=n(e=>e.dataset.value??null,"getOptionValue"),he=n(({align:e="start",children:l,class:o,searchable:t=!1,side:a="bottom",sideOffset:d=4})=>{const{highlightedValue:c,instanceId:g,open:r,search:x,setHighlightedValue:m,setOpen:v,setSearch:R,triggerRef:i}=D(),y=u(S(null),"contentRef"),O=u(S(null),"searchInputRef"),I=u(S(null),"listRef"),[j,J]=u(w({x:0,y:0}),"position"),[W,L]=u(w(!1),"ready"),A=u(S(c),"highlightedRef");if(A.current=c,C(()=>{if(!r||!i.current||!y.current){L(!1);return}let p=!1;const s=e==="center"?a:`${a}-${e}`;return F(i.current,y.current,{middleware:[G(d),Q(),Y({padding:4})],placement:s}).then(h=>(p||(J({x:h.x,y:h.y}),L(!0)),h)).catch(()=>{}),()=>{p=!0}},[r,a,d,e,i]),C(()=>{r&&(t&&O.current?O.current.focus():I.current&&I.current.focus())},[r,t]),C(()=>{if(!r)return;const p=n(s=>{if(y.current&&!y.current.contains(s.target)){const h=i.current;if(h&&h.contains(s.target))return;v(!1)}},"handleMouseDown");return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[r,v,i]),C(()=>{if(!r)return;const p=n(s=>{const h=I.current;if(!h)return;const E=ne(h),V=E.length;if(V===0){s.key==="Escape"&&(s.preventDefault(),v(!1),i.current?.focus());return}const z=A.current,b=z===null?-1:E.findIndex(M=>N(M)===z),$=n(M=>{const H=E[M];if(H){const P=N(H);P!==null&&m(P),H.scrollIntoView?.({block:"nearest"})}},"highlightByIndex");switch(s.key){case"ArrowDown":{s.preventDefault(),$(b<V-1?b+1:0);break}case"ArrowUp":{s.preventDefault(),$(b>0?b-1:V-1);break}case"End":{s.preventDefault(),$(V-1);break}case"Enter":{s.preventDefault(),b>=0&&E[b]?.click();break}case"Escape":case"Tab":{s.preventDefault(),v(!1),i.current?.focus();break}case"Home":{s.preventDefault(),$(0);break}}},"handleKeyDown");return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r,m,v,i]),!r)return;const B=c===null?void 0:`${g}-option-${c}`;return T("div",{class:k("z-50 min-w-[8rem] overflow-hidden border border-border bg-popover text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95",!W&&"invisible",o),ref:y,style:{left:`${j.x}px`,position:"fixed",top:`${j.y}px`,width:i.current?`${Math.max(i.current.offsetWidth,128)}px`:void 0},children:[t&&f("div",{class:"border-b border-border p-1.5",children:f("input",{"aria-activedescendant":B,"aria-controls":`${g}-listbox`,"aria-label":"Search options",class:k("w-full bg-transparent text-[0.75rem] text-foreground placeholder:text-muted-foreground","px-1.5 py-1 border-0 outline-none"),onInput:n(p=>{R(p.currentTarget.value),m(null)},"onInput"),placeholder:"Search…",ref:O,role:"combobox",type:"text",value:x})}),f("div",{...!t&&{"aria-activedescendant":B,tabIndex:0},class:"max-h-[min(300px,var(--available-height,300px))] overflow-y-auto scrollbar-thin-border p-1",id:`${g}-listbox`,ref:I,role:"listbox",children:l})]})},"SelectContent"),ge=n(({children:e,class:l,value:o})=>{const{highlightedValue:t,instanceId:a,onSelect:d,setHighlightedValue:c,value:g}=D(),r=g===o,x=t===o,m=`${a}-option-${o}`;return T("div",{"aria-selected":r,class:k("relative flex cursor-pointer select-none items-center gap-2","text-[0.775rem] py-1.5 px-2","transition-colors duration-75",x&&"bg-accent text-accent-foreground",r&&"font-medium",!x&&!r&&"text-foreground",!x&&"hover:bg-accent/50",l),"data-value":o,id:m,onClick:n(()=>{d(o)},"onClick"),onMouseEnter:n(()=>{c(o)},"onMouseEnter"),role:"option",children:[f("span",{class:"flex-1 truncate",children:e}),r&&f("svg",{"aria-hidden":"true",class:"h-3.5 w-3.5 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2.5",viewBox:"0 0 24 24",children:f("path",{d:"M20 6 9 17l-5-5"})})]})},"SelectItem");export{de as Select,he as SelectContent,ge as SelectItem,fe as SelectTrigger,pe as SelectValue,D as useSelectContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var a=(r,o)=>i(r,"name",{value:o,configurable:!0});import{clsx as l}from"./clsx-wGlvpUfw.js";import{jsx as s}from"preact/jsx-runtime";var p=Object.defineProperty,c=a((r,o)=>p(r,"name",{value:o,configurable:!0}),"a");const h=c(({class:r,decorative:o=!0,orientation:e="horizontal",...t})=>{const n=o?{role:"none"}:{"aria-orientation":e,role:"separator"};return s("div",{class:l("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",r),...n,...t})},"Separator");export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var a=(e,r)=>o(e,"name",{value:r,configurable:!0});import{clsx as s}from"./clsx-wGlvpUfw.js";import{jsx as t}from"preact/jsx-runtime";var l=Object.defineProperty,n=a((e,r)=>l(e,"name",{value:r,configurable:!0}),"s");const p=n(({class:e,...r})=>t("div",{class:s("animate-pulse rounded-none bg-primary/10",e),...r}),"Skeleton");export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var m=Object.defineProperty;var a=(e,r)=>m(e,"name",{value:r,configurable:!0});import{addHookName as g}from"preact/devtools";import{clsx as s}from"./clsx-wGlvpUfw.js";import{useState as v}from"preact/hooks";import{jsx as c}from"preact/jsx-runtime";var C=Object.defineProperty,d=a((e,r)=>C(e,"name",{value:r,configurable:!0}),"o");const H=d(({checked:e,class:r,defaultChecked:l,disabled:o,id:u,onCheckedChange:b,...f})=>{const t=e!==void 0,[h,k]=g(v(l??!1),"internalChecked"),n=t?e:h,p=d(()=>{if(o)return;const i=!n;t||k(i),b?.(i)},"handleClick");return c("button",{"aria-checked":n,class:s("inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-none border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n?"bg-primary":"bg-input",r),"data-state":n?"checked":"unchecked",disabled:o,id:u,onClick:p,role:"switch",type:"button",...f,children:c("span",{class:s("pointer-events-none block h-4 w-4 rounded-none bg-background shadow-lg ring-0 transition-transform",n?"translate-x-4":"translate-x-0"),"data-state":n?"checked":"unchecked"})})},"Switch");export{H as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var b=(e,n)=>p(e,"name",{value:n,configurable:!0});import{addHookName as T}from"preact/devtools";import{clsx as u}from"./clsx-wGlvpUfw.js";import{createContext as x}from"preact";import{useState as C,useContext as k}from"preact/hooks";import{jsx as a}from"preact/jsx-runtime";var V=Object.defineProperty,s=b((e,n)=>V(e,"name",{value:n,configurable:!0}),"s");const f=x(void 0),g=s(()=>{const e=k(f);if(!e)throw new Error("Tabs subcomponent must be used within <Tabs>");return e},"useTabsContext"),E=s(({children:e,class:n,defaultValue:i,onValueChange:t,value:r,...c})=>{const l=r!==void 0,[o,v]=T(C(i??""),"internalValue"),m=l?r:o,h=s(d=>{l||v(d),t?.(d)},"handleValueChange");return a(f.Provider,{value:{onValueChange:h,value:m},children:a("div",{class:u("",n),...c,children:e})})},"Tabs"),H=s(({children:e,class:n,...i})=>a("div",{class:u("inline-flex h-9 items-center justify-center rounded-none bg-muted p-1 text-muted-foreground",n),role:"tablist",...i,children:e}),"TabsList"),J=s(({children:e,class:n,disabled:i,value:t,...r})=>{const{onValueChange:c,value:l}=g(),o=l===t;return a("button",{"aria-selected":o,class:u("inline-flex items-center justify-center whitespace-nowrap rounded-none px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",o?"bg-background text-foreground shadow":"hover:bg-background/50",n),"data-state":o?"active":"inactive",disabled:i,onClick:s(()=>!i&&c(t),"onClick"),role:"tab",type:"button",...r,children:e})},"TabsTrigger"),N=s(({children:e,class:n,value:i,...t})=>{const{value:r}=g();if(r===i)return a("div",{class:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),role:"tabpanel",...t,children:e})},"TabsContent");export{E as Tabs,N as TabsContent,H as TabsList,J as TabsTrigger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var T=Object.defineProperty;var d=(e,t)=>T(e,"name",{value:t,configurable:!0});import{addHookName as l}from"preact/devtools";import{computePosition as v,offset as R,flip as b,shift as C}from"@floating-ui/dom";import{clsx as w}from"./clsx-wGlvpUfw.js";import{createContext as E}from"preact";import{useState as m,useRef as x,useEffect as M,useContext as O}from"preact/hooks";import{jsx as p}from"preact/jsx-runtime";var L=Object.defineProperty,r=d((e,t)=>L(e,"name",{value:t,configurable:!0}),"t");const g=E(void 0),h=r(()=>{const e=O(g);if(!e)throw new Error("Tooltip subcomponent must be used within <Tooltip>");return e},"useTooltipContext"),D=r(({children:e,delayDuration:t=0})=>{const[n,o]=l(m(!1),"open"),i=l(x(null),"triggerRef");return p(g.Provider,{value:{open:n,setOpen:o,triggerRef:i},children:p("span",{style:{display:"contents"},children:e})})},"Tooltip"),N=r(({children:e,class:t,...n})=>{const{setOpen:o,triggerRef:i}=h();return p("span",{class:t,onMouseEnter:r(()=>{o(!0)},"onMouseEnter"),onMouseLeave:r(()=>{o(!1)},"onMouseLeave"),ref:r(s=>{i.current=s},"handleRef"),...n,children:e})},"TooltipTrigger"),q=r(({children:e,class:t,side:n="top",sideOffset:o=4,...i})=>{const{open:s,triggerRef:a}=h(),c=l(x(null),"contentRef"),[u,y]=l(m({x:0,y:0}),"position");if(M(()=>{!s||!a.current||!c.current||v(a.current,c.current,{middleware:[R(o),b(),C({padding:4})],placement:n}).then(f=>(y({x:f.x,y:f.y}),f)).catch(()=>{})},[s,n,o,a]),!!s)return p("div",{class:w("z-50 rounded-none bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95",t),ref:c,role:"tooltip",style:{left:`${u.x}px`,position:"fixed",top:`${u.y}px`},...i,children:e})},"TooltipContent");export{D as Tooltip,q as TooltipContent,N as TooltipTrigger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(e,a)=>i(e,"name",{value:a,configurable:!0});var f=Object.defineProperty,g=t((e,a)=>f(e,"name",{value:a,configurable:!0}),"a");const o="__vdt_annotation_settings",l=[{bg:"#6366f1",border:"#4f46e5",fg:"#fff",highlightBg:"rgba(99,102,241,0.12)",label:"Indigo",name:"indigo"},{bg:"#3b82f6",border:"#2563eb",fg:"#fff",highlightBg:"rgba(59,130,246,0.12)",label:"Blue",name:"blue"},{bg:"#06b6d4",border:"#0891b2",fg:"#fff",highlightBg:"rgba(6,182,212,0.12)",label:"Cyan",name:"cyan"},{bg:"#22c55e",border:"#16a34a",fg:"#fff",highlightBg:"rgba(34,197,94,0.12)",label:"Green",name:"green"},{bg:"#eab308",border:"#ca8a04",fg:"#1a1a1a",highlightBg:"rgba(234,179,8,0.12)",label:"Yellow",name:"yellow"},{bg:"#f97316",border:"#ea580c",fg:"#fff",highlightBg:"rgba(249,115,22,0.12)",label:"Orange",name:"orange"},{bg:"#ef4444",border:"#dc2626",fg:"#fff",highlightBg:"rgba(239,68,68,0.12)",label:"Red",name:"red"}],n={blockInteractions:!0,markerClickBehavior:"detail",markerColorName:"indigo",outputDetail:"standard"};let r;const h=g(()=>{if(r)return r;try{const e=localStorage.getItem(o);if(e){const a=JSON.parse(e);return r={...n,...a},r}}catch{}return r={...n},r},"loadSettings"),c=g(e=>{r=e;try{localStorage.setItem(o,JSON.stringify(e))}catch{}},"saveSettings"),d=g(e=>{const a=e??h();return l.find(b=>b.name===a.markerColorName)??l[0]},"getMarkerColor");export{l as M,d as g,h as l,c as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var l=(s,e)=>h(s,"name",{value:e,configurable:!0});import{createRequire as p}from"node:module";const y=p(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=l(s=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[e,t]=i.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return i.getBuiltinModule(s)}return y(s)},"__cjs_getBuiltinModule"),a=d("node:fs/promises"),o=d("node:path");var _=Object.defineProperty,r=l((s,e)=>_(s,"name",{value:e,configurable:!0}),"e");const v=".devtoolbar",w="annotations.json",f="screenshots",c=r(s=>{const e=o.join(s,v);return{annotationsFile:o.join(e,w),base:e,screenshotsDir:o.join(e,f)}},"resolvePaths"),m=r((s,e)=>{const t=o.resolve(s),n=o.resolve(e);return t.startsWith(n+o.sep)||t===n},"isPathInsideBase"),g=r(s=>s.replaceAll(/[^a-z0-9-]/gi,""),"sanitizeId"),S=r(async s=>{const{screenshotsDir:e}=c(s);await a.mkdir(e,{recursive:!0})},"ensureStoreDir");let u=Promise.resolve();const A=r(async s=>{const e=u;let t;u=new Promise(n=>{t=n}),await e;try{return await s()}finally{t()}},"withLock"),F=r(async s=>{const{annotationsFile:e}=c(s);try{const t=await a.readFile(e,"utf8"),n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}},"readAnnotations"),I=r(async(s,e)=>{await S(s);const{annotationsFile:t}=c(s);await a.writeFile(t,JSON.stringify(e,void 0,2),"utf8")},"writeAnnotations"),P=r(async(s,e)=>{if(!e.startsWith(`${f}/`))return;const{base:t}=c(s),n=o.join(t,e);if(m(n,t))try{await a.unlink(n)}catch{}},"deleteScreenshotFile");export{f as S,c as a,I as b,P as d,S as e,m as i,F as r,g as s,A as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=Object.defineProperty;var n=(e,t)=>u(e,"name",{value:t,configurable:!0});var l=Object.defineProperty,i=n((e,t)=>l(e,"name",{value:t,configurable:!0}),"a");function o(e){var t,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var f=e.length;for(t=0;t<f;t++)e[t]&&(a=o(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}n(o,"e");i(o,"r");function s(){for(var e,t,a=0,r="",f=arguments.length;a<f;a++)(e=arguments[a])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r}n(s,"clsx");i(s,"clsx");export{s as clsx,s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var c=(a,n)=>s(a,"name",{value:n,configurable:!0});var m=Object.defineProperty,d=c((a,n)=>m(a,"name",{value:n,configurable:!0}),"o");const p=d(a=>{const n={onConfigChange:d(()=>{},"onConfigChange"),onHMRUpdate:d(()=>{},"onHMRUpdate"),onModuleUpdate:d(()=>{},"onModuleUpdate"),...a},o=new Map;return globalThis.window!==void 0&&import.meta.hot&&(import.meta.hot.on("dev-toolbar:rpc:response",e=>{const t=o.get(e.id);t&&(o.delete(e.id),t.resolve(e.result))}),import.meta.hot.on("dev-toolbar:rpc:error",e=>{const t=o.get(e.id);t&&(o.delete(e.id),t.reject(new Error(e.error)))}),import.meta.hot.on("dev-toolbar:client",e=>{const{args:t,method:r}=e,i=n[r];if(i)try{i(...t)}catch(l){console.error(`[dev-toolbar] Error calling client function ${r}:`,l)}})),{async callServer(e,...t){if(globalThis.window===void 0||!import.meta.hot)throw new Error("RPC calls can only be made in browser environment with HMR");const r=`${Date.now()}-${Math.random().toString(36).slice(7)}`;return new Promise((i,l)=>{o.set(r,{reject:l,resolve:i}),setTimeout(()=>{o.has(r)&&(o.delete(r),l(new Error(`RPC call timeout: ${e}`)))},3e4),import.meta.hot.send("dev-toolbar:rpc",{args:t,id:r,method:e})})},registerFunction(e,t){n[e]=t}}},"createClientRPCContext");export{p as createClientRPCContext,p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var d=Object.defineProperty;var l=(n,a)=>d(n,"name",{value:a,configurable:!0});var f=Object.defineProperty,s=l((n,a)=>f(n,"name",{value:a,configurable:!0}),"d");const g=s((n,a)=>{const r=new Map;return{addTimelineEvent(e,t){a&&a(e,t),this.emit("timeline:event",t)},emit(e,...t){const o=r.get(e);if(o)for(const i of o)try{i(...t)}catch(c){console.error(`[dev-toolbar] Error in hook handler for ${String(e)}:`,c)}},off(e,t){const o=r.get(e);o&&(t?(o.delete(t),o.size===0&&r.delete(e)):r.delete(e))},on(e,t){return r.has(e)||r.set(e,new Set),r.get(e).add(t),()=>{const o=r.get(e);o&&(o.delete(t),o.size===0&&r.delete(e))}},once(e,t){const o=s(((...i)=>{t(...i),this.off(e,o)}),"onceHandler");this.on(e,o)},registerApp(e){n&&n(e)}}},"createDevToolbarHook");export{g as createDevToolbarHook,g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var B=Object.defineProperty;var f=(r,e)=>B(r,"name",{value:e,configurable:!0});import{createRequire as _}from"node:module";import{r as b,w as j,b as A,d as F,e as R,a as E,s as W,i as I,S as O}from"./annotation-store-bLQRYMaI.js";import{normalizePath as $}from"vite";const L=_(import.meta.url),v=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,x=f(r=>{if(typeof v<"u"&&v.versions&&v.versions.node){const[e,t]=v.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return v.getBuiltinModule(r)}return L(r)},"__cjs_getBuiltinModule"),p=x("node:fs/promises"),m=x("node:path"),{createRequire:U}=x("node:module");var q=Object.defineProperty,h=f((r,e)=>q(r,"name",{value:e,configurable:!0}),"l$1");const G=h(async r=>b(r.config.root),"getAnnotations"),N=h(async(r,e)=>j(async()=>{const{root:t}=r.config,s=new Date().toISOString(),a={accessibility:e.accessibility,boundingBox:e.boundingBox,comment:e.comment,computedStyles:e.computedStyles,createdAt:s,cssClasses:e.cssClasses,elementBoundingBoxes:e.elementBoundingBoxes,elementLabel:e.elementLabel,elementPath:e.elementPath,elementTag:e.elementTag,frameworkContext:e.frameworkContext,fullPath:e.fullPath,id:crypto.randomUUID(),intent:e.intent,isFixed:e.isFixed,isMultiSelect:e.isMultiSelect,nearbyElements:e.nearbyElements,nearbyText:e.nearbyText,screenshot:e.screenshot,selectedText:e.selectedText,severity:e.severity,source:e.source,status:"pending",updatedAt:s,url:e.url,x:e.x,y:e.y},n=await b(t);return n.push(a),await A(t,n),a}),"createAnnotation"),V=h(async(r,e,t)=>j(async()=>{const{root:s}=r.config,a=await b(s),n=a.findIndex(c=>c.id===e);if(n===-1)return null;const i=a[n],o=new Date().toISOString();return t.comment!==void 0&&(i.comment=t.comment),t.intent!==void 0&&(i.intent=t.intent),t.severity!==void 0&&(i.severity=t.severity),t.status!==void 0&&(i.status=t.status,(t.status==="resolved"||t.status==="dismissed")&&(i.resolvedBy=t.resolvedBy??"human",i.resolvedAt=o,i.screenshot&&(await F(s,i.screenshot),i.screenshot=void 0))),t.threadMessage&&(i.thread||(i.thread=[]),i.thread.push({...t.threadMessage,id:crypto.randomUUID(),timestamp:o})),i.updatedAt=o,a[n]=i,await A(s,a),i}),"updateAnnotation"),H=h(async(r,e)=>j(async()=>{const{root:t}=r.config,s=await b(t),a=s.findIndex(i=>i.id===e);if(a===-1)return!1;const n=s[a];return n.screenshot&&await F(t,n.screenshot),s.splice(a,1),await A(t,s),!0}),"deleteAnnotation"),J=h(async(r,e,t)=>{const{root:s}=r.config;await R(s);const{base:a,screenshotsDir:n}=E(s),i=W(e);if(!i)throw new Error("Invalid annotation ID");let o,c;if(t.startsWith("data:image/png;base64,"))o="png",c=Buffer.from(t.slice(22),"base64");else if(t.startsWith("data:image/jpeg;base64,"))o="jpg",c=Buffer.from(t.slice(23),"base64");else if(t.startsWith("data:image/webp;base64,"))o="webp",c=Buffer.from(t.slice(23),"base64");else throw new Error("Unsupported screenshot format. Expected PNG, JPEG, or WebP data URL.");const l=`${i}.${o}`,d=m.join(n,l);if(!I(d,a))throw new Error("Invalid screenshot path");return await p.writeFile(d,c),`${O}/${l}`},"saveScreenshot"),X=h(async(r,e)=>{const{root:t}=r.config,s=(await b(t)).find(i=>i.id===e);if(!s?.screenshot||!s.screenshot.startsWith(`${O}/`))return null;const{base:a}=E(t),n=m.join(a,s.screenshot);if(!I(n,a))return null;try{const i=await p.readFile(n),o=m.extname(n).slice(1);return o==="svg"?`data:image/svg+xml,${encodeURIComponent(i.toString("utf8"))}`:`data:${o==="jpg"?"image/jpeg":`image/${o}`};base64,${i.toString("base64")}`}catch{return null}},"getScreenshot");var K=Object.defineProperty,g=f((r,e)=>K(r,"name",{value:e,configurable:!0}),"r");const Q=new Set(["apng","avif","bmp","gif","ico","jpeg","jpg","png","svg","tiff","webp"]),Y=new Set(["avi","mkv","mov","mp4","ogv","webm"]),Z=new Set(["aac","flac","m4a","mp3","ogg","opus","wav"]),ee=new Set(["eot","otf","ttf","woff","woff2"]),te=new Set(["css","csv","html","js","json","md","txt","xml"]),w=5e3,D=g(r=>{const e=r.toLowerCase();return Q.has(e)?"image":Y.has(e)?"video":Z.has(e)?"audio":ee.has(e)?"font":te.has(e)?"text":"other"},"classifyExtension"),re=g(r=>{let e=0;const t=[];return{acquire:g(()=>new Promise(s=>{e<r?(e+=1,s()):t.push(()=>{e+=1,s()})}),"acquire"),release:g(()=>{e-=1,t.shift()?.()},"release")}},"createSemaphore"),T=g(async(r,e,t,s)=>{if(s.length>=w)return;let a;await t.acquire();try{a=await p.readdir(r,{withFileTypes:!0})}catch{return}finally{t.release()}await Promise.all(a.map(async n=>{if(s.length>=w)return;const i=m.join(r,n.name);if(n.isDirectory())await T(i,e,t,s);else if(n.isFile()||n.isSymbolicLink()){await t.acquire();try{const o=await p.lstat(i);if(o.isSymbolicLink()){let c;try{c=await p.realpath(i)}catch{return}if(!c.startsWith(e+m.sep)&&c!==e)return;const l=await p.stat(i),d=m.relative(e,i),M=`/${$(d)}`,z=m.extname(n.name).slice(1);s.length<w&&s.push({mtime:l.mtimeMs,publicPath:M,size:l.size,type:D(z)})}else if(o.isFile()){const c=m.relative(e,i),l=`/${$(c)}`,d=m.extname(n.name).slice(1);s.length<w&&s.push({mtime:o.mtimeMs,publicPath:l,size:o.size,type:D(d)})}}catch{}finally{t.release()}}}))},"walkDirectory"),se=g(async r=>{const{publicDir:e}=r.config;if(!e)return[];let t;try{t=await p.realpath(e)}catch{return[]}const s=[],a=re(20);return await T(t,t,a,s),s.sort((n,i)=>n.publicPath.localeCompare(i.publicPath)),s},"getStaticAssets");var ne=Object.defineProperty,ie=f((r,e)=>ne(r,"name",{value:e,configurable:!0}),"u$2");const ae=ie(async r=>{const{moduleGraph:e}=r,t=[];return e.idToModuleMap.forEach(s=>{const a=[];s.importers.forEach(o=>{const c=o.url??o.id;c&&a.push(c)});const n=s.id??s.url,i=s.url??s.id;!n||!i||t.push({id:n,importerCount:s.importers.size,importerUrls:a,url:i})}),t},"getModuleGraph");var oe=Object.defineProperty,ce=f((r,e)=>oe(r,"name",{value:e,configurable:!0}),"n");const le=ce(async(r,e,t,s,a)=>{const n=e.startsWith("/")?e:m.join(r.config.root,e),i=s===void 0?"":`:${s}`,o=t===void 0?"":`:${t}${i}`,c=`${n}${o}`,{default:l}=await import("launch-editor");l(c,a)},"openInEditor");var de=Object.defineProperty,y=f((r,e)=>de(r,"name",{value:e,configurable:!0}),"f$1");const ue=/\/\*[\s\S]*?\*\//g,me=/\s+/g,C=/@theme\s+default[^{]*\{[\s\S]*?\}/g,S=/(--[\w-]+)\s*:\s*([\s\S]*?);/g,k=y(r=>{const e={},t=r.replaceAll(ue,"");let s=0;for(;s<t.length;){const a=t.indexOf("@theme",s);if(a===-1)break;const n=t.indexOf("{",a);if(n===-1)break;let i=1,o=n+1;for(;o<t.length&&i>0;)t[o]==="{"?i+=1:t[o]==="}"&&(i-=1),o+=1;const c=t.slice(n+1,o-1);S.lastIndex=0;let l=S.exec(c);for(;l!==null;){const d=l[2].replaceAll(me," ").trim();d&&!e[l[1]]&&(e[l[1]]=d),l=S.exec(c)}s=o}return e},"parseThemeVariables"),pe=y(async r=>{const e=[],t=y(async(s,a)=>{if(a>4)return;let n;try{n=await p.readdir(s,{encoding:"utf8",withFileTypes:!0})}catch{return}for(const i of n){const o=m.join(s,i.name);if(i.isDirectory()){if(i.name==="node_modules"||i.name===".git"||i.name==="dist")continue;await t(o,a+1)}else if(i.name.endsWith(".css"))try{const c=await p.readFile(o,"utf8");c.includes("@import")&&(c.includes('"tailwindcss"')||c.includes("'tailwindcss'"))&&e.push(o)}catch{}}},"walk");return await t(r,0),e},"findTailwindCSSFiles"),fe=y(async r=>{const e={};for(const t of r)try{const s=await p.readFile(t,"utf8");C.lastIndex=0;const a=s.replaceAll(C,""),n=k(a);Object.assign(e,n)}catch{}return e},"extractUserTheme"),ge=y(async r=>{const{root:e}=r.config;let t="unknown",s={};const a=["tailwind.config.js","tailwind.config.ts","tailwind.config.mjs","tailwind.config.cjs"];for(const o of a)try{await p.access(m.join(e,o)),t="v3";break}catch{}try{const o=U(import.meta.url).resolve("tailwindcss/theme.css"),c=await p.readFile(o,"utf8");s=k(c),Object.keys(s).length>0&&t!=="v3"&&(t="v4")}catch{}const n=await pe(e),i=await fe(n);return{cssFiles:n.map(o=>m.relative(e,o)),customTheme:i,defaultTheme:s,version:t}},"getTailwindConfig");var he=Object.defineProperty,P=f((r,e)=>he(r,"name",{value:e,configurable:!0}),"s");const ve=P(r=>{if(Array.isArray(r))return r.filter(e=>e!=null&&(e.find!==void 0||e.replacement!==void 0)).map(e=>({find:e.find instanceof RegExp?e.find.toString():String(e.find??""),replacement:String(e.replacement??"")}));if(r!=null&&typeof r=="object")return Object.fromEntries(Object.entries(r).map(([e,t])=>[e,String(t)]))},"normalizeAlias"),ye=P(r=>{if(typeof r=="boolean"||Array.isArray(r))return r},"normalizeSsrNoExternal"),be=P(async r=>{const{config:e}=r,t=[];for(const l of e.plugins.filter(d=>!!d?.name))t.push({enforce:l?.enforce,name:l.name});const s=ve(e.resolve?.alias),a=e.server?.proxy?Object.keys(e.server.proxy):void 0,n=e.server?.hmr,i=n!==!1,o=typeof n=="object"&&n!==null?n.port:void 0,c=ye(e.ssr?.noExternal);return{base:e.base,build:{assetsDir:e.build?.assetsDir,assetsInlineLimit:typeof e.build?.assetsInlineLimit=="number"?e.build.assetsInlineLimit:void 0,chunkSizeWarningLimit:e.build?.chunkSizeWarningLimit,cssCodeSplit:e.build?.cssCodeSplit,emptyOutDir:e.build?.emptyOutDir,minify:e.build?.minify,outDir:e.build?.outDir,reportCompressedSize:e.build?.reportCompressedSize,sourcemap:e.build?.sourcemap,target:e.build?.target},cacheDir:e.cacheDir,css:{devSourcemap:e.css?.devSourcemap,preprocessors:e.css?.preprocessorOptions?Object.keys(e.css.preprocessorOptions):[]},define:e.define,env:e.env,envDir:typeof e.envDir=="string"?e.envDir:void 0,envPrefix:e.envPrefix,esbuild:e.esbuild?{jsx:e.esbuild.jsx,jsxFactory:e.esbuild.jsxFactory,jsxFragment:e.esbuild.jsxFragment,jsxImportSource:e.esbuild.jsxImportSource,target:e.esbuild.target}:void 0,mode:e.mode,optimizeDeps:{exclude:e.optimizeDeps?.exclude,include:e.optimizeDeps?.include},plugins:t,publicDir:e.publicDir,resolve:{alias:s,conditions:e.resolve?.conditions,dedupe:e.resolve?.dedupe,extensions:e.resolve?.extensions,mainFields:e.resolve?.mainFields,preserveSymlinks:e.resolve?.preserveSymlinks},root:e.root,server:{cors:e.server?.cors===void 0?void 0:!!e.server.cors,hmrEnabled:i,hmrPort:o,host:e.server?.host,https:e.server?.https!==void 0,middlewareMode:(()=>{if(e.server?.middlewareMode!==void 0)return typeof e.server.middlewareMode=="object"?!0:!!e.server.middlewareMode})(),open:e.server?.open,origin:e.server?.origin,port:e.server?.port,proxy:a,strictPort:e.server?.strictPort},ssr:e.ssr===void 0?void 0:{external:Array.isArray(e.ssr?.external)?e.ssr.external:void 0,noExternal:c,target:e.ssr?.target}}},"getViteConfig");var we=Object.defineProperty,u=f((r,e)=>we(r,"name",{value:e,configurable:!0}),"e");const Se=u((r,e={})=>({createAnnotation:u(async t=>N(r,t),"createAnnotation"),deleteAnnotation:u(async t=>H(r,t),"deleteAnnotation"),getAnnotations:u(async()=>G(r),"getAnnotations"),getModuleGraph:u(async()=>ae(r),"getModuleGraph"),getScreenshot:u(async t=>X(r,t),"getScreenshot"),getStaticAssets:u(async()=>se(r),"getStaticAssets"),getTailwindConfig:u(async()=>ge(r),"getTailwindConfig"),getViteConfig:u(async()=>be(r),"getViteConfig"),openInEditor:u(async(t,s,a,n)=>le(r,t,s,a,n||e.editor),"openInEditor"),readFile:u(async t=>{const{readFile:s}=await import("node:fs/promises"),a=t.startsWith("/")?t:`${r.config.root}/${t}`;return s(a,"utf8")},"readFile"),saveScreenshot:u(async(t,s)=>J(r,t,s),"saveScreenshot"),updateAnnotation:u(async(t,s)=>V(r,t,s),"updateAnnotation")}),"createDefaultServerFunctions"),$e=u((r,e,t={})=>{const s={...Se(r,t),...e};return r.ws.on("dev-toolbar:rpc",async(a,n)=>{const{args:i,id:o,method:c}=a,l=s[c];if(!l){n.send("dev-toolbar:rpc:error",{error:`Unknown RPC method: ${c}`,id:o});return}try{const d=await l(...i);n.send("dev-toolbar:rpc:response",{id:o,result:d})}catch(d){n.send("dev-toolbar:rpc:error",{error:d instanceof Error?d.message:String(d),id:o})}}),{callClient(a,...n){r.ws.send({data:{args:n,method:a},event:"dev-toolbar:client",type:"custom"})},registerFunction(a,n){s[a]=n},server:r}},"createServerRPCContext");export{$e as createServerRPCContext,$e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as m,m as o}from"./store-DaUtLjf3.js";export{m as TimelineStore,o as getTimelineStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var a=(t,e)=>i(t,"name",{value:e,configurable:!0});const o={defaultVisible:!0,placement:"bottom-center",showNotifications:!0};var r=Object.defineProperty,n=a((t,e)=>r(t,"name",{value:e,configurable:!0}),"e");const s="__v_dt__settings",l=n(()=>{if(globalThis.window===void 0)return{...o};try{const t=localStorage.getItem(s);if(t){const e=JSON.parse(t);return{...o,...e}}}catch(t){console.warn("[dev-toolbar] Failed to load settings:",t)}return{...o}},"loadSettings"),c=n(t=>{if(globalThis.window!==void 0)try{localStorage.setItem(s,JSON.stringify(t))}catch(e){console.warn("[dev-toolbar] Failed to save settings:",e)}},"saveSettings"),g=n(t=>{const e={...l(),...t};return c(e),e},"updateSettings");export{l as loadSettings,c as saveSettings,g as updateSettings};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r=Object.defineProperty;var _=(o,l)=>r(o,"name",{value:l,configurable:!0});import{createDevToolbarHook as t}from"./createDevToolbarHook-4bZZiHPI.js";var O=Object.defineProperty,a=_((o,l)=>O(o,"name",{value:l,configurable:!0}),"n");let e;const n=a((o,l)=>e||(e=t(o,l),globalThis.window!==void 0&&(globalThis.__DEV_TOOLBAR_HOOK__=e),e),"setupGlobalHook"),s=a(()=>{const o=globalThis;return globalThis.window!==void 0&&o.__DEV_TOOLBAR_HOOK__?o.__DEV_TOOLBAR_HOOK__:e},"getGlobalHook");export{s as getGlobalHook,n as setupGlobalHook};
|