@ytspar/devbar 1.0.0-canary.3007fc6 → 1.0.0-canary.3c85c90

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 { DevBarSettings, DevBarPosition, MetricsVisibility } from './settings.js';
14
+ export { DEFAULT_SETTINGS, ACCENT_COLOR_PRESETS, 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,6 +52,8 @@ 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;
51
58
  private lastDotPosition;
52
59
  private reconnectTimeout;
@@ -60,8 +67,16 @@ export declare class GlobalDevBar {
60
67
  private keydownHandler;
61
68
  private fcpObserver;
62
69
  private lcpObserver;
70
+ private clsObserver;
71
+ private inpObserver;
63
72
  private destroyed;
73
+ private themeMode;
74
+ private themeMediaQuery;
75
+ private themeMediaHandler;
76
+ private compactMode;
77
+ private showSettingsPopover;
64
78
  private overlayElement;
79
+ private settingsManager;
65
80
  constructor(options?: GlobalDevBarOptions);
66
81
  /**
67
82
  * Get tooltip class name(s) if tooltips are enabled, otherwise empty string
@@ -106,6 +121,14 @@ export declare class GlobalDevBar {
106
121
  private injectStyles;
107
122
  private connectWebSocket;
108
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;
109
132
  /**
110
133
  * Handle notification state updates with auto-clear timeout
111
134
  */
@@ -113,6 +136,28 @@ export declare class GlobalDevBar {
113
136
  private setupBreakpointDetection;
114
137
  private setupPerformanceMonitoring;
115
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;
116
161
  private copyPathToClipboard;
117
162
  private handleScreenshot;
118
163
  private handleDesignReview;
@@ -177,6 +222,31 @@ export declare class GlobalDevBar {
177
222
  * Render key-value pairs as rows with ellipsis overflow and hover tooltip
178
223
  */
179
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 a settings section with title
236
+ */
237
+ private createSettingsSection;
238
+ /**
239
+ * Create a toggle switch row
240
+ */
241
+ private createToggleRow;
242
+ /**
243
+ * Render the settings popover
244
+ */
245
+ private renderSettingsPopover;
246
+ /**
247
+ * Reset all settings to defaults
248
+ */
249
+ private resetToDefaults;
180
250
  private renderCollapsed;
181
251
  private renderExpanded;
182
252
  /**