@ytspar/devbar 1.0.0-canary.3007fc6 → 1.0.0-canary.4b73445

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.
@@ -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 type { ConsoleLog, DevBarControl, GlobalDevBarOptions, OutlineNode, PageSchema, SweetlinkCommand } from './types.js';
11
- export type { ConsoleLog, SweetlinkCommand, OutlineNode, PageSchema, GlobalDevBarOptions, DevBarControl, };
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,61 @@ 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
+ /** Base styles for tooltip containers */
263
+ private readonly TOOLTIP_BASE_STYLES;
264
+ /** Create a tooltip container element */
265
+ private createTooltipContainer;
266
+ /** Add a bold title to tooltip (metric name, feature name, etc.) */
267
+ private addTooltipTitle;
268
+ /** Add a description paragraph to tooltip */
269
+ private addTooltipDescription;
270
+ /** Add a muted uppercase section header to tooltip */
271
+ private addTooltipSectionHeader;
272
+ /** Add a colored row with dot + label + value (for thresholds) */
273
+ private addTooltipColoredRow;
274
+ /** Add an info row with label + value (for breakpoint details) */
275
+ private addTooltipInfoRow;
276
+ /** Position tooltip above the anchor element, adjusting for screen edges */
277
+ private positionTooltip;
278
+ /** Attach an HTML tooltip to an element with custom content builder */
279
+ private attachHtmlTooltip;
280
+ /** Attach a metric tooltip with title, description, and colored thresholds */
281
+ private attachMetricTooltip;
282
+ /** Attach a breakpoint tooltip showing current breakpoint and all breakpoint ranges */
283
+ private attachBreakpointTooltip;
284
+ /** Attach a simple info tooltip with title and description */
285
+ private attachInfoTooltip;
182
286
  /**
183
287
  * Create a console badge for error/warning counts
184
288
  */