@ytspar/devbar 1.0.0-canary.c37df82 → 1.0.0-canary.cdf7fa2
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/dist/GlobalDevBar.d.ts +89 -2
- package/dist/GlobalDevBar.js +1090 -102
- package/dist/accessibility.d.ts +84 -0
- package/dist/accessibility.js +155 -0
- package/dist/constants.d.ts +91 -0
- package/dist/constants.js +102 -12
- package/dist/debug.d.ts +39 -0
- package/dist/debug.js +92 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.js +19 -7
- package/dist/lazy/index.d.ts +6 -0
- package/dist/lazy/index.js +6 -0
- package/dist/lazy/lazyHtml2Canvas.d.ts +29 -0
- package/dist/lazy/lazyHtml2Canvas.js +37 -0
- package/dist/network.d.ts +92 -0
- package/dist/network.js +176 -0
- package/dist/outline.js +43 -10
- package/dist/presets.d.ts +57 -0
- package/dist/presets.js +133 -0
- package/dist/schema.js +4 -3
- package/dist/settings.d.ts +150 -0
- package/dist/settings.js +292 -0
- package/dist/storage.d.ts +83 -0
- package/dist/storage.js +182 -0
- package/dist/types.d.ts +26 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +2 -2
- package/dist/ui/modals.js +5 -3
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
package/dist/GlobalDevBar.d.ts
CHANGED
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
* This is a vanilla JS replacement for the React-based GlobalDevBar component
|
|
8
8
|
* to avoid React dependency conflicts in host applications.
|
|
9
9
|
*/
|
|
10
|
-
import
|
|
11
|
-
|
|
10
|
+
import { getThemeColors } from './constants.js';
|
|
11
|
+
import type { ConsoleLog, DebugConfig, DevBarControl, GlobalDevBarOptions, OutlineNode, PageSchema, SweetlinkCommand, ThemeMode } from './types.js';
|
|
12
|
+
export type { ConsoleLog, DebugConfig, SweetlinkCommand, OutlineNode, PageSchema, GlobalDevBarOptions, DevBarControl, ThemeMode, };
|
|
13
|
+
export type { DevBarPosition, DevBarSettings, MetricsVisibility } from './settings.js';
|
|
14
|
+
export { ACCENT_COLOR_PRESETS, DEFAULT_SETTINGS, getSettingsManager } from './settings.js';
|
|
12
15
|
interface EarlyConsoleCapture {
|
|
13
16
|
errorCount: number;
|
|
14
17
|
warningCount: number;
|
|
@@ -25,6 +28,8 @@ declare const earlyConsoleCapture: EarlyConsoleCapture;
|
|
|
25
28
|
export declare class GlobalDevBar {
|
|
26
29
|
private static customControls;
|
|
27
30
|
private options;
|
|
31
|
+
private debugConfig;
|
|
32
|
+
private debug;
|
|
28
33
|
private container;
|
|
29
34
|
private ws;
|
|
30
35
|
private consoleLogs;
|
|
@@ -47,7 +52,10 @@ export declare class GlobalDevBar {
|
|
|
47
52
|
private breakpointInfo;
|
|
48
53
|
private perfStats;
|
|
49
54
|
private lcpValue;
|
|
55
|
+
private clsValue;
|
|
56
|
+
private inpValue;
|
|
50
57
|
private reconnectAttempts;
|
|
58
|
+
private lastDotPosition;
|
|
51
59
|
private reconnectTimeout;
|
|
52
60
|
private screenshotTimeout;
|
|
53
61
|
private copiedPathTimeout;
|
|
@@ -59,8 +67,16 @@ export declare class GlobalDevBar {
|
|
|
59
67
|
private keydownHandler;
|
|
60
68
|
private fcpObserver;
|
|
61
69
|
private lcpObserver;
|
|
70
|
+
private clsObserver;
|
|
71
|
+
private inpObserver;
|
|
62
72
|
private destroyed;
|
|
73
|
+
private themeMode;
|
|
74
|
+
private themeMediaQuery;
|
|
75
|
+
private themeMediaHandler;
|
|
76
|
+
private compactMode;
|
|
77
|
+
private showSettingsPopover;
|
|
63
78
|
private overlayElement;
|
|
79
|
+
private settingsManager;
|
|
64
80
|
constructor(options?: GlobalDevBarOptions);
|
|
65
81
|
/**
|
|
66
82
|
* Get tooltip class name(s) if tooltips are enabled, otherwise empty string
|
|
@@ -94,6 +110,10 @@ export declare class GlobalDevBar {
|
|
|
94
110
|
* Initialize and mount the devbar
|
|
95
111
|
*/
|
|
96
112
|
init(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Get the current position
|
|
115
|
+
*/
|
|
116
|
+
getPosition(): string;
|
|
97
117
|
/**
|
|
98
118
|
* Destroy the devbar and cleanup
|
|
99
119
|
*/
|
|
@@ -101,6 +121,14 @@ export declare class GlobalDevBar {
|
|
|
101
121
|
private injectStyles;
|
|
102
122
|
private connectWebSocket;
|
|
103
123
|
private handleSweetlinkCommand;
|
|
124
|
+
/**
|
|
125
|
+
* Handle settings loaded from server
|
|
126
|
+
*/
|
|
127
|
+
private handleSettingsLoaded;
|
|
128
|
+
/**
|
|
129
|
+
* Apply settings to the DevBar state and options
|
|
130
|
+
*/
|
|
131
|
+
private applySettings;
|
|
104
132
|
/**
|
|
105
133
|
* Handle notification state updates with auto-clear timeout
|
|
106
134
|
*/
|
|
@@ -108,6 +136,28 @@ export declare class GlobalDevBar {
|
|
|
108
136
|
private setupBreakpointDetection;
|
|
109
137
|
private setupPerformanceMonitoring;
|
|
110
138
|
private setupKeyboardShortcuts;
|
|
139
|
+
private setupTheme;
|
|
140
|
+
private loadCompactMode;
|
|
141
|
+
/**
|
|
142
|
+
* Get the current theme mode
|
|
143
|
+
*/
|
|
144
|
+
getThemeMode(): ThemeMode;
|
|
145
|
+
/**
|
|
146
|
+
* Set the theme mode
|
|
147
|
+
*/
|
|
148
|
+
setThemeMode(mode: ThemeMode): void;
|
|
149
|
+
/**
|
|
150
|
+
* Get the current effective theme colors
|
|
151
|
+
*/
|
|
152
|
+
getColors(): ReturnType<typeof getThemeColors>;
|
|
153
|
+
/**
|
|
154
|
+
* Toggle compact mode
|
|
155
|
+
*/
|
|
156
|
+
toggleCompactMode(): void;
|
|
157
|
+
/**
|
|
158
|
+
* Check if compact mode is enabled
|
|
159
|
+
*/
|
|
160
|
+
isCompactMode(): boolean;
|
|
111
161
|
private copyPathToClipboard;
|
|
112
162
|
private handleScreenshot;
|
|
113
163
|
private handleDesignReview;
|
|
@@ -172,6 +222,35 @@ export declare class GlobalDevBar {
|
|
|
172
222
|
* Render key-value pairs as rows with ellipsis overflow and hover tooltip
|
|
173
223
|
*/
|
|
174
224
|
private renderKeyValueItems;
|
|
225
|
+
/**
|
|
226
|
+
* Render compact mode - single row with essential controls only
|
|
227
|
+
* Shows: connection dot, error/warn badges, screenshot button, settings gear
|
|
228
|
+
*/
|
|
229
|
+
private renderCompact;
|
|
230
|
+
/**
|
|
231
|
+
* Create the settings gear button
|
|
232
|
+
*/
|
|
233
|
+
private createSettingsButton;
|
|
234
|
+
/**
|
|
235
|
+
* Create the compact mode toggle button with chevron icon
|
|
236
|
+
*/
|
|
237
|
+
private createCompactToggleButton;
|
|
238
|
+
/**
|
|
239
|
+
* Create a settings section with title
|
|
240
|
+
*/
|
|
241
|
+
private createSettingsSection;
|
|
242
|
+
/**
|
|
243
|
+
* Create a toggle switch row
|
|
244
|
+
*/
|
|
245
|
+
private createToggleRow;
|
|
246
|
+
/**
|
|
247
|
+
* Render the settings popover
|
|
248
|
+
*/
|
|
249
|
+
private renderSettingsPopover;
|
|
250
|
+
/**
|
|
251
|
+
* Reset all settings to defaults
|
|
252
|
+
*/
|
|
253
|
+
private resetToDefaults;
|
|
175
254
|
private renderCollapsed;
|
|
176
255
|
private renderExpanded;
|
|
177
256
|
/**
|
|
@@ -179,6 +258,14 @@ export declare class GlobalDevBar {
|
|
|
179
258
|
*/
|
|
180
259
|
private createConsoleBadge;
|
|
181
260
|
private createScreenshotButton;
|
|
261
|
+
/**
|
|
262
|
+
* Get the tooltip text for the screenshot button based on current state
|
|
263
|
+
*/
|
|
264
|
+
private getScreenshotTooltip;
|
|
265
|
+
/**
|
|
266
|
+
* Get the tooltip text for the AI review button based on current state
|
|
267
|
+
*/
|
|
268
|
+
private getAIReviewTooltip;
|
|
182
269
|
private createAIReviewButton;
|
|
183
270
|
private createOutlineButton;
|
|
184
271
|
private createSchemaButton;
|