@ytspar/devbar 0.0.1 → 1.0.0-canary.92db425

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.
@@ -0,0 +1,202 @@
1
+ /**
2
+ * DevBar Constants
3
+ *
4
+ * Shared constants used by the DevBar components.
5
+ */
6
+ export { MAX_CONSOLE_LOGS } from '@ytspar/sweetlink/browser/consoleCapture';
7
+ export { DEVBAR_SCREENSHOT_QUALITY } from '@ytspar/sweetlink/browser/screenshotUtils';
8
+ /** Maximum reconnection attempts before giving up */
9
+ export declare const MAX_RECONNECT_ATTEMPTS = 10;
10
+ /** Base delay for exponential backoff (ms) */
11
+ export declare const BASE_RECONNECT_DELAY_MS = 1000;
12
+ /** Maximum delay between reconnection attempts (ms) */
13
+ export declare const MAX_RECONNECT_DELAY_MS = 30000;
14
+ /** Default WebSocket port for Sweetlink connection */
15
+ export declare const WS_PORT = 9223;
16
+ /** Duration to show screenshot notification (ms) */
17
+ export declare const SCREENSHOT_NOTIFICATION_MS = 3000;
18
+ /** Duration to show clipboard notification (ms) */
19
+ export declare const CLIPBOARD_NOTIFICATION_MS = 2000;
20
+ /** Duration to show design review notification (ms) */
21
+ export declare const DESIGN_REVIEW_NOTIFICATION_MS = 5000;
22
+ /** Delay after blur before capturing screenshot (ms) */
23
+ export declare const SCREENSHOT_BLUR_DELAY_MS = 50;
24
+ /** Scale factor for screenshots (0.75 = 75% of original) */
25
+ export declare const SCREENSHOT_SCALE = 0.75;
26
+ /** Tailwind CSS breakpoint definitions */
27
+ export declare const TAILWIND_BREAKPOINTS: {
28
+ readonly base: {
29
+ readonly min: 0;
30
+ readonly label: "Tailwind base: <640px";
31
+ };
32
+ readonly sm: {
33
+ readonly min: 640;
34
+ readonly label: "Tailwind sm: >=640px";
35
+ };
36
+ readonly md: {
37
+ readonly min: 768;
38
+ readonly label: "Tailwind md: >=768px";
39
+ };
40
+ readonly lg: {
41
+ readonly min: 1024;
42
+ readonly label: "Tailwind lg: >=1024px";
43
+ };
44
+ readonly xl: {
45
+ readonly min: 1280;
46
+ readonly label: "Tailwind xl: >=1280px";
47
+ };
48
+ readonly '2xl': {
49
+ readonly min: 1536;
50
+ readonly label: "Tailwind 2xl: >=1536px";
51
+ };
52
+ };
53
+ export type TailwindBreakpoint = keyof typeof TAILWIND_BREAKPOINTS;
54
+ /** Button colors for devbar toolbar buttons */
55
+ export declare const BUTTON_COLORS: {
56
+ readonly screenshot: "#10b981";
57
+ readonly review: "#a855f7";
58
+ readonly outline: "#06b6d4";
59
+ readonly schema: "#f59e0b";
60
+ readonly error: "#ef4444";
61
+ readonly warning: "#f59e0b";
62
+ };
63
+ /** Category colors for outline display */
64
+ export declare const CATEGORY_COLORS: Record<string, string>;
65
+ /** Complete DevBar design system theme */
66
+ export declare const DEVBAR_THEME: {
67
+ readonly colors: {
68
+ readonly primary: "#10b981";
69
+ readonly primaryHover: "#059669";
70
+ readonly primaryGlow: "rgba(16, 185, 129, 0.4)";
71
+ readonly error: "#ef4444";
72
+ readonly warning: "#f59e0b";
73
+ readonly info: "#3b82f6";
74
+ readonly purple: "#a855f7";
75
+ readonly cyan: "#06b6d4";
76
+ readonly pink: "#ec4899";
77
+ readonly lime: "#84cc16";
78
+ readonly bg: "#0a0f1a";
79
+ readonly bgCard: "rgba(17, 24, 39, 0.95)";
80
+ readonly bgElevated: "rgba(17, 24, 39, 0.98)";
81
+ readonly bgInput: "rgba(10, 15, 26, 0.8)";
82
+ readonly text: "#f1f5f9";
83
+ readonly textSecondary: "#94a3b8";
84
+ readonly textMuted: "#6b7280";
85
+ readonly border: "rgba(16, 185, 129, 0.2)";
86
+ readonly borderSubtle: "rgba(255, 255, 255, 0.05)";
87
+ };
88
+ readonly fonts: {
89
+ readonly mono: "'Departure Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace";
90
+ };
91
+ readonly typography: {
92
+ readonly sizeXs: "0.625rem";
93
+ readonly sizeSm: "0.6875rem";
94
+ readonly sizeBase: "0.75rem";
95
+ readonly sizeMd: "0.8125rem";
96
+ readonly sizeLg: "0.875rem";
97
+ readonly sizeXl: "1rem";
98
+ readonly size2xl: "1.5rem";
99
+ readonly leadingTight: "1rem";
100
+ readonly leadingNormal: "1.5";
101
+ readonly leadingRelaxed: "1.6";
102
+ readonly weightNormal: "400";
103
+ readonly weightMedium: "500";
104
+ readonly weightSemibold: "600";
105
+ readonly trackingTight: "-0.02em";
106
+ readonly trackingNormal: "0";
107
+ readonly trackingWide: "0.05em";
108
+ readonly trackingWider: "0.1em";
109
+ };
110
+ readonly radius: {
111
+ readonly sm: "4px";
112
+ readonly md: "6px";
113
+ readonly lg: "12px";
114
+ };
115
+ readonly shadows: {
116
+ readonly sm: "0 1px 2px rgba(0, 0, 0, 0.4)";
117
+ readonly md: "0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(16, 185, 129, 0.1)";
118
+ readonly lg: "0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(16, 185, 129, 0.15)";
119
+ readonly glow: "0 0 20px rgba(16, 185, 129, 0.15)";
120
+ };
121
+ readonly transitions: {
122
+ readonly fast: "150ms";
123
+ };
124
+ };
125
+ export type DevBarTheme = typeof DEVBAR_THEME;
126
+ /** Shorthand for common colors */
127
+ export declare const COLORS: {
128
+ readonly primary: "#10b981";
129
+ readonly primaryHover: "#059669";
130
+ readonly primaryGlow: "rgba(16, 185, 129, 0.4)";
131
+ readonly error: "#ef4444";
132
+ readonly warning: "#f59e0b";
133
+ readonly info: "#3b82f6";
134
+ readonly purple: "#a855f7";
135
+ readonly cyan: "#06b6d4";
136
+ readonly pink: "#ec4899";
137
+ readonly lime: "#84cc16";
138
+ readonly bg: "#0a0f1a";
139
+ readonly bgCard: "rgba(17, 24, 39, 0.95)";
140
+ readonly bgElevated: "rgba(17, 24, 39, 0.98)";
141
+ readonly bgInput: "rgba(10, 15, 26, 0.8)";
142
+ readonly text: "#f1f5f9";
143
+ readonly textSecondary: "#94a3b8";
144
+ readonly textMuted: "#6b7280";
145
+ readonly border: "rgba(16, 185, 129, 0.2)";
146
+ readonly borderSubtle: "rgba(255, 255, 255, 0.05)";
147
+ };
148
+ /** Shorthand for font stack */
149
+ export declare const FONT_MONO: "'Departure Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace";
150
+ /** Flexible input type for theme customization */
151
+ export type DevBarThemeInput = {
152
+ colors: {
153
+ [K in keyof DevBarTheme['colors']]: string;
154
+ };
155
+ fonts: {
156
+ [K in keyof DevBarTheme['fonts']]: string;
157
+ };
158
+ typography: {
159
+ [K in keyof DevBarTheme['typography']]: string;
160
+ };
161
+ radius: {
162
+ [K in keyof DevBarTheme['radius']]: string;
163
+ };
164
+ shadows: {
165
+ [K in keyof DevBarTheme['shadows']]: string;
166
+ };
167
+ transitions: {
168
+ [K in keyof DevBarTheme['transitions']]: string;
169
+ };
170
+ };
171
+ /**
172
+ * Generate CSS custom properties from the theme
173
+ */
174
+ export declare function generateThemeCSSVars(theme?: DevBarThemeInput): string;
175
+ /**
176
+ * Inject theme CSS variables into the document
177
+ */
178
+ export declare function injectThemeCSS(theme?: DevBarThemeInput): void;
179
+ /**
180
+ * Generate CSS for breakpoint media queries
181
+ */
182
+ export declare function generateBreakpointCSS(selector: string, property: string, values: Record<TailwindBreakpoint, string>): string;
183
+ /** Base styles for toolbar action buttons */
184
+ export declare const ACTION_BUTTON_BASE_STYLES: {
185
+ readonly display: "flex";
186
+ readonly alignItems: "center";
187
+ readonly justifyContent: "center";
188
+ readonly width: "22px";
189
+ readonly height: "22px";
190
+ readonly minWidth: "22px";
191
+ readonly minHeight: "22px";
192
+ readonly flexShrink: "0";
193
+ readonly borderRadius: "50%";
194
+ readonly border: "1px solid";
195
+ readonly transition: "all 150ms";
196
+ };
197
+ /** Common modal overlay styles */
198
+ export declare const MODAL_OVERLAY_STYLES: Record<string, string>;
199
+ /** Common modal box styles */
200
+ export declare const MODAL_BOX_BASE_STYLES: Record<string, string>;
201
+ /** Tooltip and animation CSS styles */
202
+ export declare const TOOLTIP_STYLES: string;