@ytspar/devbar 1.0.0-canary.c37df82 → 1.0.0-canary.c511f13
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 +96 -2
- package/dist/GlobalDevBar.js +1203 -114
- package/dist/accessibility.d.ts +84 -0
- package/dist/accessibility.js +155 -0
- package/dist/constants.d.ts +102 -1
- package/dist/constants.js +113 -13
- 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.d.ts +4 -0
- package/dist/ui/modals.js +53 -7
- 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;
|
|
@@ -41,13 +46,23 @@ export declare class GlobalDevBar {
|
|
|
41
46
|
private apiKeyStatus;
|
|
42
47
|
private lastOutline;
|
|
43
48
|
private lastSchema;
|
|
49
|
+
private savingOutline;
|
|
50
|
+
private savingSchema;
|
|
44
51
|
private consoleFilter;
|
|
45
52
|
private showOutlineModal;
|
|
46
53
|
private showSchemaModal;
|
|
47
54
|
private breakpointInfo;
|
|
48
55
|
private perfStats;
|
|
49
56
|
private lcpValue;
|
|
57
|
+
private clsValue;
|
|
58
|
+
private inpValue;
|
|
50
59
|
private reconnectAttempts;
|
|
60
|
+
private readonly currentAppPort;
|
|
61
|
+
private readonly baseWsPort;
|
|
62
|
+
private wsVerified;
|
|
63
|
+
private serverProjectDir;
|
|
64
|
+
private verificationTimeout;
|
|
65
|
+
private lastDotPosition;
|
|
51
66
|
private reconnectTimeout;
|
|
52
67
|
private screenshotTimeout;
|
|
53
68
|
private copiedPathTimeout;
|
|
@@ -59,8 +74,16 @@ export declare class GlobalDevBar {
|
|
|
59
74
|
private keydownHandler;
|
|
60
75
|
private fcpObserver;
|
|
61
76
|
private lcpObserver;
|
|
77
|
+
private clsObserver;
|
|
78
|
+
private inpObserver;
|
|
62
79
|
private destroyed;
|
|
80
|
+
private themeMode;
|
|
81
|
+
private themeMediaQuery;
|
|
82
|
+
private themeMediaHandler;
|
|
83
|
+
private compactMode;
|
|
84
|
+
private showSettingsPopover;
|
|
63
85
|
private overlayElement;
|
|
86
|
+
private settingsManager;
|
|
64
87
|
constructor(options?: GlobalDevBarOptions);
|
|
65
88
|
/**
|
|
66
89
|
* Get tooltip class name(s) if tooltips are enabled, otherwise empty string
|
|
@@ -94,6 +117,10 @@ export declare class GlobalDevBar {
|
|
|
94
117
|
* Initialize and mount the devbar
|
|
95
118
|
*/
|
|
96
119
|
init(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Get the current position
|
|
122
|
+
*/
|
|
123
|
+
getPosition(): string;
|
|
97
124
|
/**
|
|
98
125
|
* Destroy the devbar and cleanup
|
|
99
126
|
*/
|
|
@@ -101,6 +128,14 @@ export declare class GlobalDevBar {
|
|
|
101
128
|
private injectStyles;
|
|
102
129
|
private connectWebSocket;
|
|
103
130
|
private handleSweetlinkCommand;
|
|
131
|
+
/**
|
|
132
|
+
* Handle settings loaded from server
|
|
133
|
+
*/
|
|
134
|
+
private handleSettingsLoaded;
|
|
135
|
+
/**
|
|
136
|
+
* Apply settings to the DevBar state and options
|
|
137
|
+
*/
|
|
138
|
+
private applySettings;
|
|
104
139
|
/**
|
|
105
140
|
* Handle notification state updates with auto-clear timeout
|
|
106
141
|
*/
|
|
@@ -108,6 +143,28 @@ export declare class GlobalDevBar {
|
|
|
108
143
|
private setupBreakpointDetection;
|
|
109
144
|
private setupPerformanceMonitoring;
|
|
110
145
|
private setupKeyboardShortcuts;
|
|
146
|
+
private setupTheme;
|
|
147
|
+
private loadCompactMode;
|
|
148
|
+
/**
|
|
149
|
+
* Get the current theme mode
|
|
150
|
+
*/
|
|
151
|
+
getThemeMode(): ThemeMode;
|
|
152
|
+
/**
|
|
153
|
+
* Set the theme mode
|
|
154
|
+
*/
|
|
155
|
+
setThemeMode(mode: ThemeMode): void;
|
|
156
|
+
/**
|
|
157
|
+
* Get the current effective theme colors
|
|
158
|
+
*/
|
|
159
|
+
getColors(): ReturnType<typeof getThemeColors>;
|
|
160
|
+
/**
|
|
161
|
+
* Toggle compact mode
|
|
162
|
+
*/
|
|
163
|
+
toggleCompactMode(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Check if compact mode is enabled
|
|
166
|
+
*/
|
|
167
|
+
isCompactMode(): boolean;
|
|
111
168
|
private copyPathToClipboard;
|
|
112
169
|
private handleScreenshot;
|
|
113
170
|
private handleDesignReview;
|
|
@@ -172,6 +229,35 @@ export declare class GlobalDevBar {
|
|
|
172
229
|
* Render key-value pairs as rows with ellipsis overflow and hover tooltip
|
|
173
230
|
*/
|
|
174
231
|
private renderKeyValueItems;
|
|
232
|
+
/**
|
|
233
|
+
* Render compact mode - single row with essential controls only
|
|
234
|
+
* Shows: connection dot, error/warn badges, screenshot button, settings gear
|
|
235
|
+
*/
|
|
236
|
+
private renderCompact;
|
|
237
|
+
/**
|
|
238
|
+
* Create the settings gear button
|
|
239
|
+
*/
|
|
240
|
+
private createSettingsButton;
|
|
241
|
+
/**
|
|
242
|
+
* Create the compact mode toggle button with chevron icon
|
|
243
|
+
*/
|
|
244
|
+
private createCompactToggleButton;
|
|
245
|
+
/**
|
|
246
|
+
* Create a settings section with title
|
|
247
|
+
*/
|
|
248
|
+
private createSettingsSection;
|
|
249
|
+
/**
|
|
250
|
+
* Create a toggle switch row
|
|
251
|
+
*/
|
|
252
|
+
private createToggleRow;
|
|
253
|
+
/**
|
|
254
|
+
* Render the settings popover
|
|
255
|
+
*/
|
|
256
|
+
private renderSettingsPopover;
|
|
257
|
+
/**
|
|
258
|
+
* Reset all settings to defaults
|
|
259
|
+
*/
|
|
260
|
+
private resetToDefaults;
|
|
175
261
|
private renderCollapsed;
|
|
176
262
|
private renderExpanded;
|
|
177
263
|
/**
|
|
@@ -179,6 +265,14 @@ export declare class GlobalDevBar {
|
|
|
179
265
|
*/
|
|
180
266
|
private createConsoleBadge;
|
|
181
267
|
private createScreenshotButton;
|
|
268
|
+
/**
|
|
269
|
+
* Get the tooltip text for the screenshot button based on current state
|
|
270
|
+
*/
|
|
271
|
+
private getScreenshotTooltip;
|
|
272
|
+
/**
|
|
273
|
+
* Get the tooltip text for the AI review button based on current state
|
|
274
|
+
*/
|
|
275
|
+
private getAIReviewTooltip;
|
|
182
276
|
private createAIReviewButton;
|
|
183
277
|
private createOutlineButton;
|
|
184
278
|
private createSchemaButton;
|