@buoy-gg/floating-tools-core 2.1.9 → 2.1.11
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/lib/commonjs/FloatingToolsStore.js +501 -1
- package/lib/commonjs/colors.js +54 -1
- package/lib/commonjs/constants.js +31 -1
- package/lib/commonjs/devToolsState.js +325 -1
- package/lib/commonjs/dial.js +617 -1
- package/lib/commonjs/easing.js +69 -1
- package/lib/commonjs/icons/benchmark-icon.js +24 -1
- package/lib/commonjs/icons/env-icon.js +24 -1
- package/lib/commonjs/icons/events-icon.js +24 -1
- package/lib/commonjs/icons/highlight-icon.js +24 -1
- package/lib/commonjs/icons/icon-data.js +2268 -1
- package/lib/commonjs/icons/icon-factories.js +173 -1
- package/lib/commonjs/icons/icon-primitives.js +559 -1
- package/lib/commonjs/icons/icon-primitives.native.js +779 -1
- package/lib/commonjs/icons/icon-renderer.js +260 -1
- package/lib/commonjs/icons/network-icon.js +24 -1
- package/lib/commonjs/icons/query-icon.js +24 -1
- package/lib/commonjs/icons/redux-icon.js +85 -1
- package/lib/commonjs/icons/renders-icon.js +33 -1
- package/lib/commonjs/icons/routes-icon.js +49 -1
- package/lib/commonjs/icons/sentry-icon.js +24 -1
- package/lib/commonjs/icons/storage-icon.js +24 -1
- package/lib/commonjs/icons/wifi-icon.js +24 -1
- package/lib/commonjs/index.js +723 -1
- package/lib/commonjs/settings.js +599 -1
- package/lib/commonjs/utils.js +72 -1
- package/lib/module/FloatingToolsStore.js +496 -1
- package/lib/module/colors.js +49 -1
- package/lib/module/constants.js +27 -1
- package/lib/module/devToolsState.js +318 -1
- package/lib/module/dial.js +603 -1
- package/lib/module/easing.js +62 -1
- package/lib/module/icons/benchmark-icon.js +15 -1
- package/lib/module/icons/env-icon.js +15 -1
- package/lib/module/icons/events-icon.js +15 -1
- package/lib/module/icons/highlight-icon.js +15 -1
- package/lib/module/icons/icon-data.js +2264 -1
- package/lib/module/icons/icon-factories.js +163 -1
- package/lib/module/icons/icon-primitives.js +547 -1
- package/lib/module/icons/icon-primitives.native.js +767 -1
- package/lib/module/icons/icon-renderer.js +255 -1
- package/lib/module/icons/network-icon.js +15 -1
- package/lib/module/icons/query-icon.js +15 -1
- package/lib/module/icons/redux-icon.js +81 -1
- package/lib/module/icons/renders-icon.js +17 -1
- package/lib/module/icons/routes-icon.js +41 -1
- package/lib/module/icons/sentry-icon.js +15 -1
- package/lib/module/icons/storage-icon.js +15 -1
- package/lib/module/icons/wifi-icon.js +15 -1
- package/lib/module/index.js +103 -1
- package/lib/module/settings.js +587 -1
- package/lib/module/utils.js +66 -1
- package/lib/typescript/commonjs/FloatingToolsStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/devToolsState.d.ts.map +1 -0
- package/lib/typescript/commonjs/dial.d.ts.map +1 -0
- package/lib/typescript/commonjs/easing.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/benchmark-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/env-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/events-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/highlight-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-data.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-factories.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-primitives.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-primitives.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/icon-renderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/network-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/query-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/redux-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/renders-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/routes-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/sentry-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/storage-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/wifi-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/settings.d.ts +5 -0
- package/lib/typescript/commonjs/settings.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils.d.ts.map +1 -0
- package/lib/typescript/module/FloatingToolsStore.d.ts.map +1 -0
- package/lib/typescript/module/colors.d.ts.map +1 -0
- package/lib/typescript/module/constants.d.ts.map +1 -0
- package/lib/typescript/module/devToolsState.d.ts.map +1 -0
- package/lib/typescript/module/dial.d.ts.map +1 -0
- package/lib/typescript/module/easing.d.ts.map +1 -0
- package/lib/typescript/module/icons/benchmark-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/env-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/events-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/highlight-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-data.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-factories.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-primitives.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-primitives.native.d.ts.map +1 -0
- package/lib/typescript/module/icons/icon-renderer.d.ts.map +1 -0
- package/lib/typescript/module/icons/network-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/query-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/redux-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/renders-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/routes-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/sentry-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/storage-icon.d.ts.map +1 -0
- package/lib/typescript/module/icons/wifi-icon.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/settings.d.ts +5 -0
- package/lib/typescript/module/settings.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/lib/typescript/module/utils.d.ts.map +1 -0
- package/package.json +8 -8
- package/LICENSE +0 -58
package/lib/module/settings.js
CHANGED
|
@@ -1 +1,587 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Settings - Shared settings types, constants, and utilities.
|
|
5
|
+
*
|
|
6
|
+
* Pure configuration and logic functions for dev tools settings.
|
|
7
|
+
* No React or platform-specific code.
|
|
8
|
+
*
|
|
9
|
+
* This module provides:
|
|
10
|
+
* - Storage keys and constants
|
|
11
|
+
* - Tab configuration
|
|
12
|
+
* - Tool colors, labels, descriptions
|
|
13
|
+
* - Styling constants for cards and toggles
|
|
14
|
+
* - Settings logic (enforce limits, merge, etc.)
|
|
15
|
+
* - Event bus for cross-component sync
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { withAlpha } from "./colors.js";
|
|
19
|
+
|
|
20
|
+
// =============================
|
|
21
|
+
// Constants
|
|
22
|
+
// =============================
|
|
23
|
+
|
|
24
|
+
/** Storage key for dev tools settings */
|
|
25
|
+
export const SETTINGS_STORAGE_KEY = '@react_buoy_dev_tools_settings';
|
|
26
|
+
|
|
27
|
+
/** Maximum number of tools in the dial menu */
|
|
28
|
+
export const MAX_SETTINGS_DIAL_SLOTS = 6;
|
|
29
|
+
|
|
30
|
+
// =============================
|
|
31
|
+
// Tab Configuration
|
|
32
|
+
// =============================
|
|
33
|
+
|
|
34
|
+
/** Tab configuration - shared across mobile and web */
|
|
35
|
+
export const settingsTabs = [{
|
|
36
|
+
key: 'dial',
|
|
37
|
+
label: 'DIAL'
|
|
38
|
+
}, {
|
|
39
|
+
key: 'floating',
|
|
40
|
+
label: 'FLOATING'
|
|
41
|
+
}, {
|
|
42
|
+
key: 'settings',
|
|
43
|
+
label: 'SETTINGS'
|
|
44
|
+
}, {
|
|
45
|
+
key: 'pro',
|
|
46
|
+
label: 'PRO'
|
|
47
|
+
}];
|
|
48
|
+
|
|
49
|
+
// =============================
|
|
50
|
+
// Settings Colors
|
|
51
|
+
// =============================
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Color palette for the settings modal.
|
|
55
|
+
* Matches the mobile implementation for consistency.
|
|
56
|
+
*/
|
|
57
|
+
export const settingsColors = {
|
|
58
|
+
// Base colors
|
|
59
|
+
background: 'rgba(8, 12, 21, 0.98)',
|
|
60
|
+
panel: 'rgba(16, 22, 35, 0.98)',
|
|
61
|
+
backdrop: 'rgba(0, 0, 0, 0.85)',
|
|
62
|
+
// Card colors
|
|
63
|
+
cardBackground: '#0F172A',
|
|
64
|
+
cardBorder: '#25324A',
|
|
65
|
+
cardBorderHover: '#3b4c6b',
|
|
66
|
+
// Text colors
|
|
67
|
+
text: '#E6EEFF',
|
|
68
|
+
textSecondary: '#B8BFC9',
|
|
69
|
+
textMuted: '#7F91B2',
|
|
70
|
+
textDim: '#7A8599',
|
|
71
|
+
// Status colors
|
|
72
|
+
success: '#4AFF9F',
|
|
73
|
+
warning: '#FFEB3B',
|
|
74
|
+
error: '#FF5252',
|
|
75
|
+
info: '#00B8E6',
|
|
76
|
+
// Toggle states
|
|
77
|
+
toggleOnBg: color => withAlpha(color, '33'),
|
|
78
|
+
toggleOnBorder: color => withAlpha(color, '88'),
|
|
79
|
+
toggleOffBg: '#1b2334',
|
|
80
|
+
toggleOffBorder: '#2a3550',
|
|
81
|
+
toggleOffText: '#8CA2C8',
|
|
82
|
+
// Tab colors
|
|
83
|
+
tabActiveBg: 'rgba(0, 184, 230, 0.13)',
|
|
84
|
+
tabActiveBorder: '#00B8E6',
|
|
85
|
+
tabInactiveBg: 'transparent',
|
|
86
|
+
tabInactiveText: '#7A8599'
|
|
87
|
+
};
|
|
88
|
+
// =============================
|
|
89
|
+
// Tool Colors
|
|
90
|
+
// =============================
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Color mapping for each tool type.
|
|
94
|
+
* Used for card accents, toggle states, and icons.
|
|
95
|
+
*/
|
|
96
|
+
export const toolColors = {
|
|
97
|
+
// Core tools
|
|
98
|
+
query: '#FF4154',
|
|
99
|
+
// React Query red
|
|
100
|
+
env: '#4AFF9F',
|
|
101
|
+
// Green
|
|
102
|
+
sentry: '#FF5252',
|
|
103
|
+
// Red
|
|
104
|
+
storage: '#BA68C8',
|
|
105
|
+
// Purple
|
|
106
|
+
network: '#4AFF9F',
|
|
107
|
+
// Green (matches NETWORK_ICON_COLOR in shared-ui)
|
|
108
|
+
wifi: '#4AFF9F',
|
|
109
|
+
// Green
|
|
110
|
+
|
|
111
|
+
// Display tools
|
|
112
|
+
environment: '#4AFF9F',
|
|
113
|
+
// Green
|
|
114
|
+
'debug-borders': '#10b981',
|
|
115
|
+
// Emerald
|
|
116
|
+
'highlight-updates': '#10b981',
|
|
117
|
+
// Emerald
|
|
118
|
+
'highlight-updates-modal': '#10b981',
|
|
119
|
+
// Emerald
|
|
120
|
+
|
|
121
|
+
// Performance
|
|
122
|
+
benchmark: '#F59E0B',
|
|
123
|
+
// Amber
|
|
124
|
+
|
|
125
|
+
// Navigation
|
|
126
|
+
'route-events': '#FF9F1C',
|
|
127
|
+
// Orange
|
|
128
|
+
routes: '#FF9F1C',
|
|
129
|
+
// Orange
|
|
130
|
+
|
|
131
|
+
// Render tracking
|
|
132
|
+
renders: '#10b981' // Emerald
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Get the color for a specific tool.
|
|
137
|
+
*
|
|
138
|
+
* @param toolId - Tool identifier
|
|
139
|
+
* @returns Color string for the tool
|
|
140
|
+
*/
|
|
141
|
+
export const getToolColor = toolId => {
|
|
142
|
+
return toolColors[toolId] || settingsColors.info;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// =============================
|
|
146
|
+
// Tool Labels
|
|
147
|
+
// =============================
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Display labels for each tool.
|
|
151
|
+
* These are shown in the settings card headers.
|
|
152
|
+
*/
|
|
153
|
+
export const toolLabels = {
|
|
154
|
+
query: 'QUERY',
|
|
155
|
+
env: 'ENV',
|
|
156
|
+
sentry: 'SENTRY',
|
|
157
|
+
storage: 'STORAGE',
|
|
158
|
+
network: 'NET',
|
|
159
|
+
wifi: 'WIFI',
|
|
160
|
+
environment: 'ENV BADGE',
|
|
161
|
+
'debug-borders': 'DEBUG BORDERS',
|
|
162
|
+
'highlight-updates': 'HIGHLIGHT',
|
|
163
|
+
'highlight-updates-modal': 'HIGHLIGHT MODAL',
|
|
164
|
+
benchmark: 'BENCHMARK',
|
|
165
|
+
'route-events': 'ROUTES',
|
|
166
|
+
routes: 'ROUTES',
|
|
167
|
+
renders: 'HIGHLIGHT'
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Get the display label for a tool.
|
|
172
|
+
*
|
|
173
|
+
* @param toolId - Tool identifier
|
|
174
|
+
* @param availableApps - Optional list of available apps to check for custom names
|
|
175
|
+
* @returns Display label for the tool
|
|
176
|
+
*/
|
|
177
|
+
export const getToolLabel = (toolId, availableApps) => {
|
|
178
|
+
// Check available apps first for custom names
|
|
179
|
+
if (availableApps) {
|
|
180
|
+
const app = availableApps.find(a => a.id === toolId);
|
|
181
|
+
if (app?.name) return app.name;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Use predefined label or format from ID
|
|
185
|
+
return toolLabels[toolId] || toolId.toUpperCase().replace(/_/g, ' ').replace(/-/g, ' ');
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// =============================
|
|
189
|
+
// Tool Descriptions
|
|
190
|
+
// =============================
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Descriptions for each tool.
|
|
194
|
+
* These are shown in the settings card subtitles.
|
|
195
|
+
*/
|
|
196
|
+
export const toolDescriptions = {
|
|
197
|
+
query: 'React Query inspector',
|
|
198
|
+
env: 'Environment variables debugger',
|
|
199
|
+
sentry: 'Error tracking & monitoring',
|
|
200
|
+
storage: 'AsyncStorage browser',
|
|
201
|
+
network: 'Network request logger',
|
|
202
|
+
wifi: 'Network status toggle',
|
|
203
|
+
environment: 'Environment badge indicator',
|
|
204
|
+
'debug-borders': 'Component layout borders',
|
|
205
|
+
'highlight-updates': 'View component render tracking',
|
|
206
|
+
'highlight-updates-modal': 'Render count inspector',
|
|
207
|
+
benchmark: 'Performance benchmarks',
|
|
208
|
+
'route-events': 'Route tracking & navigation inspector',
|
|
209
|
+
routes: 'Route tracking & navigation inspector',
|
|
210
|
+
renders: 'View component render tracking modal'
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Get the description for a tool.
|
|
215
|
+
*
|
|
216
|
+
* @param toolId - Tool identifier
|
|
217
|
+
* @param availableApps - Optional list of available apps to check for custom descriptions
|
|
218
|
+
* @returns Description for the tool
|
|
219
|
+
*/
|
|
220
|
+
export const getToolDescription = (toolId, availableApps) => {
|
|
221
|
+
// Check available apps first for custom descriptions
|
|
222
|
+
if (availableApps) {
|
|
223
|
+
const app = availableApps.find(a => a.id === toolId);
|
|
224
|
+
if (app?.description) return app.description;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Use predefined description
|
|
228
|
+
return toolDescriptions[toolId] || '';
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
// =============================
|
|
232
|
+
// Settings Styling
|
|
233
|
+
// =============================
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Styling configuration for settings UI elements.
|
|
237
|
+
* All numeric values that affect appearance.
|
|
238
|
+
*/
|
|
239
|
+
export const settingsStyles = {
|
|
240
|
+
// Card styling
|
|
241
|
+
card: {
|
|
242
|
+
borderRadius: 999,
|
|
243
|
+
// Pill shape
|
|
244
|
+
paddingVertical: 10,
|
|
245
|
+
paddingHorizontal: 14,
|
|
246
|
+
marginBottom: 10,
|
|
247
|
+
borderWidth: 1
|
|
248
|
+
},
|
|
249
|
+
// Card inner layout
|
|
250
|
+
cardInner: {
|
|
251
|
+
gap: 10
|
|
252
|
+
},
|
|
253
|
+
// Icon container
|
|
254
|
+
iconContainer: {
|
|
255
|
+
width: 28,
|
|
256
|
+
height: 28
|
|
257
|
+
},
|
|
258
|
+
// Tool name text
|
|
259
|
+
toolName: {
|
|
260
|
+
fontSize: 13,
|
|
261
|
+
fontWeight: '800'
|
|
262
|
+
},
|
|
263
|
+
// Tool description text
|
|
264
|
+
toolDescription: {
|
|
265
|
+
fontSize: 11
|
|
266
|
+
},
|
|
267
|
+
// Toggle pill button
|
|
268
|
+
toggle: {
|
|
269
|
+
paddingHorizontal: 12,
|
|
270
|
+
paddingVertical: 6,
|
|
271
|
+
borderRadius: 999,
|
|
272
|
+
borderWidth: 1,
|
|
273
|
+
fontSize: 11,
|
|
274
|
+
fontWeight: '700'
|
|
275
|
+
},
|
|
276
|
+
// Tab styling
|
|
277
|
+
tab: {
|
|
278
|
+
paddingHorizontal: 8,
|
|
279
|
+
paddingVertical: 5,
|
|
280
|
+
borderRadius: 4,
|
|
281
|
+
fontSize: 12,
|
|
282
|
+
fontWeight: '600',
|
|
283
|
+
letterSpacing: 0.5
|
|
284
|
+
},
|
|
285
|
+
// Section header
|
|
286
|
+
sectionHeader: {
|
|
287
|
+
marginBottom: 12,
|
|
288
|
+
paddingHorizontal: 4
|
|
289
|
+
},
|
|
290
|
+
// Section title
|
|
291
|
+
sectionTitle: {
|
|
292
|
+
fontSize: 10,
|
|
293
|
+
fontWeight: '700',
|
|
294
|
+
letterSpacing: 1,
|
|
295
|
+
textTransform: 'uppercase'
|
|
296
|
+
},
|
|
297
|
+
// Scroll content
|
|
298
|
+
scrollContent: {
|
|
299
|
+
paddingTop: 16,
|
|
300
|
+
paddingBottom: 24
|
|
301
|
+
},
|
|
302
|
+
// Section margins
|
|
303
|
+
section: {
|
|
304
|
+
marginHorizontal: 16,
|
|
305
|
+
marginBottom: 24
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
// =============================
|
|
310
|
+
// Global Settings Configuration
|
|
311
|
+
// =============================
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Configuration for global settings cards.
|
|
315
|
+
*/
|
|
316
|
+
export const globalSettingsConfig = [{
|
|
317
|
+
key: 'enableSharedModalDimensions',
|
|
318
|
+
label: 'SHARED MODAL SIZE',
|
|
319
|
+
category: 'MODAL',
|
|
320
|
+
shortDescription: 'Sync dimensions across all tools',
|
|
321
|
+
fullDescription: 'When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.',
|
|
322
|
+
recommendation: 'Keep OFF for the best experience. This allows you to customize each tool\'s modal size separately. Enable only if you prefer uniform modal sizes across all dev tools.'
|
|
323
|
+
}, {
|
|
324
|
+
key: 'expandableWindowControls',
|
|
325
|
+
label: 'EXPAND CONTROLS',
|
|
326
|
+
category: 'MODAL',
|
|
327
|
+
shortDescription: 'iPad-style expandable window buttons',
|
|
328
|
+
fullDescription: 'When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed — similar to iPad window controls. When disabled, buttons are directly tappable at their small size.',
|
|
329
|
+
recommendation: 'Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access (e.g. when using a mouse or simulator).'
|
|
330
|
+
}];
|
|
331
|
+
|
|
332
|
+
// =============================
|
|
333
|
+
// Types
|
|
334
|
+
// =============================
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Global settings that apply to all dev tools.
|
|
338
|
+
* These settings override individual tool configurations.
|
|
339
|
+
*/
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Serialized preferences that power the floating dev tools UI.
|
|
343
|
+
* Values persist across sessions via storage so teams can tailor
|
|
344
|
+
* which tools appear in the dial or floating row.
|
|
345
|
+
*/
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Configuration for an available tool/app.
|
|
349
|
+
* Note: name and description are optional - if not provided,
|
|
350
|
+
* getToolLabel() and getToolDescription() will use shared defaults.
|
|
351
|
+
*/
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Tool metadata for display in settings.
|
|
355
|
+
*/
|
|
356
|
+
|
|
357
|
+
// =============================
|
|
358
|
+
// Utility Functions
|
|
359
|
+
// =============================
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Enforces the dial slot limit by enabling only the first N tools.
|
|
363
|
+
* Tools are processed in order, so tools appearing first in the Record
|
|
364
|
+
* have priority when the limit is reached.
|
|
365
|
+
*
|
|
366
|
+
* @param dialTools - Map of tool ids to enabled state
|
|
367
|
+
* @param maxSlots - Maximum number of enabled tools (default: MAX_SETTINGS_DIAL_SLOTS)
|
|
368
|
+
* @returns New record with limit enforced
|
|
369
|
+
*/
|
|
370
|
+
export const enforceDialLimit = (dialTools, maxSlots = MAX_SETTINGS_DIAL_SLOTS) => {
|
|
371
|
+
let remaining = maxSlots;
|
|
372
|
+
const limited = {};
|
|
373
|
+
for (const [id, enabled] of Object.entries(dialTools)) {
|
|
374
|
+
if (enabled && remaining > 0) {
|
|
375
|
+
limited[id] = true;
|
|
376
|
+
remaining -= 1;
|
|
377
|
+
} else {
|
|
378
|
+
limited[id] = false;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return limited;
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Sanitizes floating tools settings by removing unknown keys and ensuring
|
|
386
|
+
* the environment field is always present.
|
|
387
|
+
*
|
|
388
|
+
* @param floating - Floating tools settings object
|
|
389
|
+
* @param allowedKeys - Optional list of allowed tool keys (environment is always allowed)
|
|
390
|
+
* @returns Sanitized floating tools settings
|
|
391
|
+
*/
|
|
392
|
+
export const sanitizeFloatingSettings = (floating, allowedKeys) => {
|
|
393
|
+
const {
|
|
394
|
+
userStatus,
|
|
395
|
+
environment,
|
|
396
|
+
...rest
|
|
397
|
+
} = floating;
|
|
398
|
+
const filteredEntries = allowedKeys ? Object.entries(rest).filter(([key]) => allowedKeys.includes(key)) : Object.entries(rest);
|
|
399
|
+
return {
|
|
400
|
+
...Object.fromEntries(filteredEntries),
|
|
401
|
+
environment: environment ?? false
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Options for merging settings with defaults.
|
|
407
|
+
*/
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Merges stored settings with defaults, ensuring all required fields exist
|
|
411
|
+
* and limits are enforced.
|
|
412
|
+
*
|
|
413
|
+
* @param defaults - Default settings to use as base
|
|
414
|
+
* @param stored - Stored settings to merge (optional)
|
|
415
|
+
* @param options - Optional filtering options
|
|
416
|
+
* @returns Merged settings with all fields and limits enforced
|
|
417
|
+
*/
|
|
418
|
+
export const mergeSettingsWithDefaults = (defaults, stored, options) => {
|
|
419
|
+
if (!stored) return defaults;
|
|
420
|
+
const combinedDial = {
|
|
421
|
+
...defaults.dialTools,
|
|
422
|
+
...(stored.dialTools ?? {})
|
|
423
|
+
};
|
|
424
|
+
const dialEntries = options?.allowedDialKeys ? Object.entries(combinedDial).filter(([key]) => options.allowedDialKeys?.includes(key)) : Object.entries(combinedDial);
|
|
425
|
+
const mergedDial = enforceDialLimit(Object.fromEntries(dialEntries));
|
|
426
|
+
return {
|
|
427
|
+
dialTools: mergedDial,
|
|
428
|
+
floatingTools: sanitizeFloatingSettings({
|
|
429
|
+
...defaults.floatingTools,
|
|
430
|
+
...(stored.floatingTools ?? {})
|
|
431
|
+
}, options?.allowedFloatingKeys),
|
|
432
|
+
globalSettings: {
|
|
433
|
+
enableSharedModalDimensions: false,
|
|
434
|
+
// Default to false
|
|
435
|
+
expandableWindowControls: true,
|
|
436
|
+
// Default to true - expandable on touch devices
|
|
437
|
+
...(stored.globalSettings ?? {})
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Generates default settings based on available tools and optional team defaults.
|
|
444
|
+
*
|
|
445
|
+
* @param availableTools - List of available tools from auto-discovery
|
|
446
|
+
* @param defaultFloatingTools - Optional array of tool IDs to enable by default in floating bubble
|
|
447
|
+
* @param defaultDialTools - Optional array of tool IDs to enable by default in dial menu
|
|
448
|
+
* @returns Default settings with specified tools enabled
|
|
449
|
+
*/
|
|
450
|
+
export const generateDefaultSettings = (availableTools = [], defaultFloatingTools, defaultDialTools) => {
|
|
451
|
+
const dialDefaults = {};
|
|
452
|
+
const floatingDefaults = {};
|
|
453
|
+
|
|
454
|
+
// Create sets for quick lookup of default-enabled tools
|
|
455
|
+
const enabledFloatingSet = new Set(defaultFloatingTools ?? []);
|
|
456
|
+
const enabledDialSet = new Set(defaultDialTools ?? []);
|
|
457
|
+
for (const tool of availableTools) {
|
|
458
|
+
const {
|
|
459
|
+
id,
|
|
460
|
+
slot = 'both'
|
|
461
|
+
} = tool;
|
|
462
|
+
if (slot === 'dial' || slot === 'both') {
|
|
463
|
+
// Enable if in defaultDialTools, otherwise false
|
|
464
|
+
dialDefaults[id] = enabledDialSet.has(id);
|
|
465
|
+
}
|
|
466
|
+
if (slot === 'row' || slot === 'both') {
|
|
467
|
+
// Enable if in defaultFloatingTools, otherwise false
|
|
468
|
+
floatingDefaults[id] = enabledFloatingSet.has(id);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return {
|
|
472
|
+
dialTools: enforceDialLimit(dialDefaults),
|
|
473
|
+
floatingTools: {
|
|
474
|
+
...floatingDefaults,
|
|
475
|
+
// Special: environment badge - check if 'environment' is in the floating defaults
|
|
476
|
+
environment: enabledFloatingSet.has('environment')
|
|
477
|
+
},
|
|
478
|
+
globalSettings: {
|
|
479
|
+
enableSharedModalDimensions: false,
|
|
480
|
+
// Default to false - each modal has its own persistence
|
|
481
|
+
expandableWindowControls: true // Default to true - expandable on touch devices
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Counts the number of enabled tools in a settings record.
|
|
488
|
+
*
|
|
489
|
+
* @param tools - Record of tool ids to enabled state
|
|
490
|
+
* @returns Count of enabled tools
|
|
491
|
+
*/
|
|
492
|
+
export const countEnabledTools = tools => {
|
|
493
|
+
return Object.values(tools).filter(Boolean).length;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Checks if a dial tool can be enabled (respects slot limit).
|
|
498
|
+
*
|
|
499
|
+
* @param dialTools - Current dial tools settings
|
|
500
|
+
* @param toolId - ID of the tool to check
|
|
501
|
+
* @param maxSlots - Maximum number of slots (default: MAX_SETTINGS_DIAL_SLOTS)
|
|
502
|
+
* @returns true if the tool can be enabled
|
|
503
|
+
*/
|
|
504
|
+
export const canEnableDialTool = (dialTools, toolId, maxSlots = MAX_SETTINGS_DIAL_SLOTS) => {
|
|
505
|
+
const currentEnabled = countEnabledTools(dialTools);
|
|
506
|
+
const isCurrentlyEnabled = dialTools[toolId];
|
|
507
|
+
|
|
508
|
+
// If already enabled, it can stay enabled
|
|
509
|
+
if (isCurrentlyEnabled) return true;
|
|
510
|
+
|
|
511
|
+
// If not enabled and at limit, cannot enable
|
|
512
|
+
return currentEnabled < maxSlots;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Extracts enabled tool IDs from a settings record.
|
|
517
|
+
*
|
|
518
|
+
* @param settings - DevTools settings
|
|
519
|
+
* @returns Object with arrays of enabled floating and dial tool IDs
|
|
520
|
+
*/
|
|
521
|
+
export const getEnabledToolIds = settings => {
|
|
522
|
+
const enabledFloating = Object.entries(settings.floatingTools).filter(([_, enabled]) => enabled).map(([id]) => id);
|
|
523
|
+
const enabledDial = Object.entries(settings.dialTools).filter(([_, enabled]) => enabled).map(([id]) => id);
|
|
524
|
+
return {
|
|
525
|
+
floating: enabledFloating,
|
|
526
|
+
dial: enabledDial
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
// =============================
|
|
531
|
+
// Settings Event Bus
|
|
532
|
+
// =============================
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Generic event bus for broadcasting settings changes.
|
|
536
|
+
* Platform-agnostic implementation for synchronizing settings
|
|
537
|
+
* across components.
|
|
538
|
+
*/
|
|
539
|
+
export class SettingsEventBus {
|
|
540
|
+
listeners = new Set();
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Emit a settings change to all listeners.
|
|
544
|
+
*
|
|
545
|
+
* @param payload - The new settings value
|
|
546
|
+
*/
|
|
547
|
+
emit(payload) {
|
|
548
|
+
this.listeners.forEach(listener => {
|
|
549
|
+
try {
|
|
550
|
+
listener(payload);
|
|
551
|
+
} catch (e) {
|
|
552
|
+
console.error('Error emitting settings event:', e);
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Add a listener for settings changes.
|
|
559
|
+
*
|
|
560
|
+
* @param listener - Callback function to invoke on changes
|
|
561
|
+
* @returns Unsubscribe function
|
|
562
|
+
*/
|
|
563
|
+
addListener(listener) {
|
|
564
|
+
this.listeners.add(listener);
|
|
565
|
+
return () => this.listeners.delete(listener);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Remove all listeners.
|
|
570
|
+
*/
|
|
571
|
+
clear() {
|
|
572
|
+
this.listeners.clear();
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Get the number of active listeners.
|
|
577
|
+
*/
|
|
578
|
+
get listenerCount() {
|
|
579
|
+
return this.listeners.size;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Default settings event bus instance.
|
|
585
|
+
* Use this for broadcasting settings changes across the app.
|
|
586
|
+
*/
|
|
587
|
+
export const settingsEventBus = new SettingsEventBus();
|
package/lib/module/utils.js
CHANGED
|
@@ -1 +1,66 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared utility functions for floating tools.
|
|
5
|
+
* Platform-agnostic - no React or DOM dependencies.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// =============================
|
|
9
|
+
// User Status Configuration
|
|
10
|
+
// =============================
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Get display configuration for a user role.
|
|
14
|
+
* Used by both web and mobile renderers.
|
|
15
|
+
*/
|
|
16
|
+
export function getUserStatusConfig(userRole, colors) {
|
|
17
|
+
switch (userRole) {
|
|
18
|
+
case 'admin':
|
|
19
|
+
return {
|
|
20
|
+
label: 'Admin',
|
|
21
|
+
dotColor: colors.success,
|
|
22
|
+
textColor: colors.success
|
|
23
|
+
};
|
|
24
|
+
case 'internal':
|
|
25
|
+
return {
|
|
26
|
+
label: 'Internal',
|
|
27
|
+
dotColor: colors.optional,
|
|
28
|
+
textColor: colors.optional
|
|
29
|
+
};
|
|
30
|
+
case 'user':
|
|
31
|
+
default:
|
|
32
|
+
return {
|
|
33
|
+
label: 'User',
|
|
34
|
+
dotColor: colors.muted,
|
|
35
|
+
textColor: colors.secondary
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// =============================
|
|
41
|
+
// Grip Icon Layout
|
|
42
|
+
// =============================
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Calculate grip icon layout dimensions based on size.
|
|
46
|
+
* Creates a 2x3 dot grid pattern.
|
|
47
|
+
*/
|
|
48
|
+
export function getGripIconLayout(size) {
|
|
49
|
+
return {
|
|
50
|
+
dotSize: Math.max(2, Math.round(size / 6)),
|
|
51
|
+
columnGap: Math.max(2, Math.round(size / 12)),
|
|
52
|
+
rowGap: Math.max(2, Math.round(size / 12))
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// =============================
|
|
57
|
+
// Children Utilities
|
|
58
|
+
// =============================
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Filter valid React children (removes null, undefined, false).
|
|
62
|
+
* Works with both web and React Native.
|
|
63
|
+
*/
|
|
64
|
+
export function filterValidChildren(children) {
|
|
65
|
+
return children.filter(child => child != null && child !== false);
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingToolsStore.d.ts","sourceRoot":"","sources":["../../../src/FloatingToolsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,MAAM,EAEN,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,aAAa,EACd,MAAM,SAAS,CAAC;AAUjB,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B,qBAAa,kBAAkB;IAE7B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAO;IAGzB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,WAAW,CAAW;IAC9B,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,yBAAyB,CAAU;IAC3C,OAAO,CAAC,OAAO,CAAC,CAAiB;IAGjC,OAAO,CAAC,gBAAgB,CAAC,CAA+B;IACxD,OAAO,CAAC,cAAc,CAAC,CAA4B;IACnD,OAAO,CAAC,gBAAgB,CAAC,CAA8B;IAGvD,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAyB;IAG9C,OAAO,CAAC,WAAW,CAA8C;IACjE,OAAO,CAAC,a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G;IACH,cAAc,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI;IAUnC,OAAO,IAAI,IAAI;CAOhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B,4BAA4B;;IAG5B,wCAAwC;;IAGxC,yBAAyB;;IAGzB,0CAA0C;;IAG1C,sCAAsC;;IAGtC,2CAA2C;;IAG3C,6BAA6B;;IAG7B,uCAAuC;;IAGvC,8DAA8D;;CAEtD,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAErE;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CASvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,6DAA6D;AAC7D,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,yCAAyC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,4CAA4C;AAC5C,eAAO,MAAM,YAAY;;;CAGf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devToolsState.d.ts","sourceRoot":"","sources":["../../../src/devToolsState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD;;GAEG;AACH,MA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