@ytspar/devbar 1.0.0-canary.5aad4c9 → 1.0.0-canary.6349f79
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 +86 -2
- package/dist/GlobalDevBar.js +1055 -21
- package/dist/accessibility.d.ts +84 -0
- package/dist/accessibility.js +155 -0
- package/dist/constants.d.ts +100 -1
- package/dist/constants.js +105 -1
- 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,21 @@ 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;
|
|
51
64
|
private lastDotPosition;
|
|
52
65
|
private reconnectTimeout;
|
|
53
66
|
private screenshotTimeout;
|
|
@@ -60,8 +73,16 @@ export declare class GlobalDevBar {
|
|
|
60
73
|
private keydownHandler;
|
|
61
74
|
private fcpObserver;
|
|
62
75
|
private lcpObserver;
|
|
76
|
+
private clsObserver;
|
|
77
|
+
private inpObserver;
|
|
63
78
|
private destroyed;
|
|
79
|
+
private themeMode;
|
|
80
|
+
private themeMediaQuery;
|
|
81
|
+
private themeMediaHandler;
|
|
82
|
+
private compactMode;
|
|
83
|
+
private showSettingsPopover;
|
|
64
84
|
private overlayElement;
|
|
85
|
+
private settingsManager;
|
|
65
86
|
constructor(options?: GlobalDevBarOptions);
|
|
66
87
|
/**
|
|
67
88
|
* Get tooltip class name(s) if tooltips are enabled, otherwise empty string
|
|
@@ -106,6 +127,14 @@ export declare class GlobalDevBar {
|
|
|
106
127
|
private injectStyles;
|
|
107
128
|
private connectWebSocket;
|
|
108
129
|
private handleSweetlinkCommand;
|
|
130
|
+
/**
|
|
131
|
+
* Handle settings loaded from server
|
|
132
|
+
*/
|
|
133
|
+
private handleSettingsLoaded;
|
|
134
|
+
/**
|
|
135
|
+
* Apply settings to the DevBar state and options
|
|
136
|
+
*/
|
|
137
|
+
private applySettings;
|
|
109
138
|
/**
|
|
110
139
|
* Handle notification state updates with auto-clear timeout
|
|
111
140
|
*/
|
|
@@ -113,6 +142,28 @@ export declare class GlobalDevBar {
|
|
|
113
142
|
private setupBreakpointDetection;
|
|
114
143
|
private setupPerformanceMonitoring;
|
|
115
144
|
private setupKeyboardShortcuts;
|
|
145
|
+
private setupTheme;
|
|
146
|
+
private loadCompactMode;
|
|
147
|
+
/**
|
|
148
|
+
* Get the current theme mode
|
|
149
|
+
*/
|
|
150
|
+
getThemeMode(): ThemeMode;
|
|
151
|
+
/**
|
|
152
|
+
* Set the theme mode
|
|
153
|
+
*/
|
|
154
|
+
setThemeMode(mode: ThemeMode): void;
|
|
155
|
+
/**
|
|
156
|
+
* Get the current effective theme colors
|
|
157
|
+
*/
|
|
158
|
+
getColors(): ReturnType<typeof getThemeColors>;
|
|
159
|
+
/**
|
|
160
|
+
* Toggle compact mode
|
|
161
|
+
*/
|
|
162
|
+
toggleCompactMode(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Check if compact mode is enabled
|
|
165
|
+
*/
|
|
166
|
+
isCompactMode(): boolean;
|
|
116
167
|
private copyPathToClipboard;
|
|
117
168
|
private handleScreenshot;
|
|
118
169
|
private handleDesignReview;
|
|
@@ -177,8 +228,41 @@ export declare class GlobalDevBar {
|
|
|
177
228
|
* Render key-value pairs as rows with ellipsis overflow and hover tooltip
|
|
178
229
|
*/
|
|
179
230
|
private renderKeyValueItems;
|
|
231
|
+
/**
|
|
232
|
+
* Render compact mode - single row with essential controls only
|
|
233
|
+
* Shows: connection dot, error/warn badges, screenshot button, settings gear
|
|
234
|
+
*/
|
|
235
|
+
private renderCompact;
|
|
236
|
+
/**
|
|
237
|
+
* Create the settings gear button
|
|
238
|
+
*/
|
|
239
|
+
private createSettingsButton;
|
|
240
|
+
/**
|
|
241
|
+
* Create the compact mode toggle button with chevron icon
|
|
242
|
+
*/
|
|
243
|
+
private createCompactToggleButton;
|
|
244
|
+
/**
|
|
245
|
+
* Create a settings section with title
|
|
246
|
+
*/
|
|
247
|
+
private createSettingsSection;
|
|
248
|
+
/**
|
|
249
|
+
* Create a toggle switch row
|
|
250
|
+
*/
|
|
251
|
+
private createToggleRow;
|
|
252
|
+
/**
|
|
253
|
+
* Render the settings popover
|
|
254
|
+
*/
|
|
255
|
+
private renderSettingsPopover;
|
|
256
|
+
/**
|
|
257
|
+
* Reset all settings to defaults
|
|
258
|
+
*/
|
|
259
|
+
private resetToDefaults;
|
|
180
260
|
private renderCollapsed;
|
|
181
261
|
private renderExpanded;
|
|
262
|
+
/**
|
|
263
|
+
* Attach an HTML tooltip with colored threshold labels to a metric element
|
|
264
|
+
*/
|
|
265
|
+
private attachMetricTooltip;
|
|
182
266
|
/**
|
|
183
267
|
* Create a console badge for error/warning counts
|
|
184
268
|
*/
|