@buoy-gg/shared-ui 7.0.16 → 7.0.17
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/hooks/index.js +7 -0
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/hooks/usePersistedState.js +71 -0
- package/lib/commonjs/icons/index.js +14 -0
- package/lib/commonjs/index.js +42 -0
- package/lib/commonjs/storage/devToolsStorageKeys.js +22 -0
- package/lib/commonjs/ui/components/ModalHeader.js +69 -0
- package/lib/commonjs/ui/components/ToolButton.js +90 -0
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/index.js +8 -0
- package/lib/commonjs/ui/toolTheme.js +96 -0
- package/lib/commonjs/utils/index.js +38 -0
- package/lib/commonjs/utils/stateSnapshotRegistry.js +62 -0
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/hooks/usePersistedState.js +68 -0
- package/lib/module/icons/index.js +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/storage/devToolsStorageKeys.js +22 -0
- package/lib/module/ui/components/ModalHeader.js +70 -2
- package/lib/module/ui/components/ToolButton.js +86 -0
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/index.js +3 -0
- package/lib/module/ui/toolTheme.js +93 -0
- package/lib/module/utils/index.js +2 -0
- package/lib/module/utils/stateSnapshotRegistry.js +55 -0
- package/lib/typescript/commonjs/hooks/index.d.ts +1 -0
- package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/hooks/usePersistedState.d.ts +16 -0
- package/lib/typescript/commonjs/hooks/usePersistedState.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +19 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts +13 -1
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ToolButton.d.ts +24 -0
- package/lib/typescript/commonjs/ui/components/ToolButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts +4 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/toolTheme.d.ts +68 -0
- package/lib/typescript/commonjs/ui/toolTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts +2 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/stateSnapshotRegistry.d.ts +67 -0
- package/lib/typescript/commonjs/utils/stateSnapshotRegistry.d.ts.map +1 -0
- package/lib/typescript/module/hooks/index.d.ts +1 -0
- package/lib/typescript/module/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/hooks/usePersistedState.d.ts +16 -0
- package/lib/typescript/module/hooks/usePersistedState.d.ts.map +1 -0
- package/lib/typescript/module/icons/index.d.ts +1 -0
- package/lib/typescript/module/icons/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +19 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ModalHeader.d.ts +13 -1
- package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ToolButton.d.ts +24 -0
- package/lib/typescript/module/ui/components/ToolButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/index.d.ts +4 -0
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +1 -0
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/toolTheme.d.ts +68 -0
- package/lib/typescript/module/ui/toolTheme.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts +2 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/stateSnapshotRegistry.d.ts +67 -0
- package/lib/typescript/module/utils/stateSnapshotRegistry.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getStateSnapshotProvider = getStateSnapshotProvider;
|
|
7
|
+
exports.getStateSnapshotProviders = getStateSnapshotProviders;
|
|
8
|
+
exports.registerStateSnapshotProvider = registerStateSnapshotProvider;
|
|
9
|
+
exports.subscribeToStateSnapshotProviders = subscribeToStateSnapshotProviders;
|
|
10
|
+
/**
|
|
11
|
+
* Cross-package bridge for app-state snapshot & restore (Time Machine).
|
|
12
|
+
*
|
|
13
|
+
* Each state tool (`@buoy-gg/storage`, `@buoy-gg/redux`, `@buoy-gg/zustand`,
|
|
14
|
+
* `@buoy-gg/jotai`, `@buoy-gg/react-query`) registers a provider here at
|
|
15
|
+
* module init (or from its app-lifetime sync hook); `@buoy-gg/time-machine`
|
|
16
|
+
* consumes the registry. Neither side imports the other — same
|
|
17
|
+
* optional-capability pattern as renderCaptureRegistry.
|
|
18
|
+
*
|
|
19
|
+
* Apps can also register custom providers for state Buoy doesn't know about.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const providers = new Map();
|
|
23
|
+
const listeners = new Set();
|
|
24
|
+
function notify() {
|
|
25
|
+
listeners.forEach(l => {
|
|
26
|
+
try {
|
|
27
|
+
l();
|
|
28
|
+
} catch {
|
|
29
|
+
// listener errors must not break registration
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Register a provider. Last registration wins for a given id.
|
|
36
|
+
* Returns an unregister function (only removes the provider if it is still
|
|
37
|
+
* the registered one for that id).
|
|
38
|
+
*/
|
|
39
|
+
function registerStateSnapshotProvider(provider) {
|
|
40
|
+
providers.set(provider.id, provider);
|
|
41
|
+
notify();
|
|
42
|
+
return () => {
|
|
43
|
+
if (providers.get(provider.id) === provider) {
|
|
44
|
+
providers.delete(provider.id);
|
|
45
|
+
notify();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function getStateSnapshotProviders() {
|
|
50
|
+
return Array.from(providers.values());
|
|
51
|
+
}
|
|
52
|
+
function getStateSnapshotProvider(id) {
|
|
53
|
+
return providers.get(id) ?? null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Notifies when providers register/unregister (query registers late). */
|
|
57
|
+
function subscribeToStateSnapshotProviders(listener) {
|
|
58
|
+
listeners.add(listener);
|
|
59
|
+
return () => {
|
|
60
|
+
listeners.delete(listener);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
export { useFilterManager } from "./useFilterManager.js";
|
|
4
|
+
export { usePersistedState } from "./usePersistedState.js";
|
|
4
5
|
export { useSafeAreaInsets } from "./useSafeAreaInsets.js";
|
|
5
6
|
export { getSafeAreaInsets } from "./useSafeAreaInsets.js";
|
|
6
7
|
export { useDeviceInfo, getDeviceInfo, logDeviceInfo } from "./useDeviceInfo.js";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { persistentStorage } from "../utils/persistentStorage.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Per-key cache so remounts (and multiple consumers of the same key) render
|
|
8
|
+
* the last-known value immediately instead of flashing the default while the
|
|
9
|
+
* async backend loads again.
|
|
10
|
+
*/
|
|
11
|
+
const hydratedCache = new Map();
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* `useState` persisted through `persistentStorage` (FileSystem → AsyncStorage
|
|
15
|
+
* → memory). Replaces the load-then-`hasLoaded`-guard `useEffect` pattern
|
|
16
|
+
* every tool used to hand-roll.
|
|
17
|
+
*
|
|
18
|
+
* Values are JSON-serialized; the default is returned until hydration
|
|
19
|
+
* completes (subsequent mounts of the same key hydrate synchronously from an
|
|
20
|
+
* in-memory cache). The third tuple element reports hydration so callers can
|
|
21
|
+
* defer writes that must not clobber a not-yet-loaded value.
|
|
22
|
+
*
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const [tab, setTab, tabHydrated] = usePersistedState("@react_buoy_custom_flags_tab", "flags");
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function usePersistedState(key, defaultValue) {
|
|
28
|
+
const [value, setValue] = useState(() => hydratedCache.has(key) ? hydratedCache.get(key) : defaultValue);
|
|
29
|
+
const [hydrated, setHydrated] = useState(() => hydratedCache.has(key));
|
|
30
|
+
const keyRef = useRef(key);
|
|
31
|
+
keyRef.current = key;
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (hydratedCache.has(key)) {
|
|
34
|
+
setValue(hydratedCache.get(key));
|
|
35
|
+
setHydrated(true);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
let cancelled = false;
|
|
39
|
+
persistentStorage.getItem(key).then(raw => {
|
|
40
|
+
if (cancelled) return;
|
|
41
|
+
if (raw != null) {
|
|
42
|
+
try {
|
|
43
|
+
const parsed = JSON.parse(raw);
|
|
44
|
+
hydratedCache.set(key, parsed);
|
|
45
|
+
setValue(parsed);
|
|
46
|
+
} catch {
|
|
47
|
+
// Corrupt payload — fall back to the default and let the next
|
|
48
|
+
// write repair it.
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
setHydrated(true);
|
|
52
|
+
}).catch(() => {
|
|
53
|
+
if (!cancelled) setHydrated(true);
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
cancelled = true;
|
|
57
|
+
};
|
|
58
|
+
}, [key]);
|
|
59
|
+
const set = useCallback(next => {
|
|
60
|
+
setValue(prev => {
|
|
61
|
+
const resolved = typeof next === "function" ? next(prev) : next;
|
|
62
|
+
hydratedCache.set(keyRef.current, resolved);
|
|
63
|
+
persistentStorage.setItem(keyRef.current, JSON.stringify(resolved)).catch(() => {});
|
|
64
|
+
return resolved;
|
|
65
|
+
});
|
|
66
|
+
}, []);
|
|
67
|
+
return [value, set, hydrated];
|
|
68
|
+
}
|
|
@@ -11,6 +11,7 @@ export { EnvIcon, ENV_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
|
11
11
|
// into core, so these are the same artwork the Flutter build renders. Tool
|
|
12
12
|
// packages re-export from here rather than drawing their own copies.
|
|
13
13
|
export { ConsoleIcon, CONSOLE_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
14
|
+
export { TimeMachineIcon, TIME_MACHINE_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
14
15
|
export { ImagesIcon, IMAGES_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
15
16
|
export { AssetsIcon, ASSETS_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
16
17
|
export { ImpersonateIcon, IMPERSONATE_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
package/lib/module/index.js
CHANGED
|
@@ -26,6 +26,10 @@ parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath,
|
|
|
26
26
|
loadOptionalModule, getCachedOptionalModule,
|
|
27
27
|
// Render-commit capture bridge (provider: highlight-updates, consumer: perf-monitor)
|
|
28
28
|
setRenderCaptureProvider, getRenderCaptureProvider,
|
|
29
|
+
// State snapshot bridge (providers: storage/redux/zustand/jotai/react-query, consumer: time-machine)
|
|
30
|
+
registerStateSnapshotProvider, getStateSnapshotProviders, getStateSnapshotProvider, subscribeToStateSnapshotProviders,
|
|
31
|
+
// Minimal superjson (Date/Map/Set/BigInt-safe round-trip) for snapshot payloads
|
|
32
|
+
superJsonSerialize, superJsonDeserialize,
|
|
29
33
|
// JS-bundle reload (core's `app` adapter + perf-monitor's batch runner)
|
|
30
34
|
reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS,
|
|
31
35
|
// Subscribable base class for self-managing listeners
|
|
@@ -31,6 +31,28 @@ export const devToolsStorageKeys = {
|
|
|
31
31
|
dimensions: () => `${devToolsStorageKeys.modal.root()}_dimensions`,
|
|
32
32
|
hintAcknowledged: () => `${devToolsStorageKeys.modal.root()}_hint_acknowledged`
|
|
33
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* Namespace factory for third-party custom tools. Keys share the
|
|
36
|
+
* `@react_buoy` prefix, so `isDevToolsStorageKey` filtering (and the Storage
|
|
37
|
+
* tool's internal-key handling) covers custom-tool persistence for free.
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* const keys = devToolsStorageKeys.custom("feature-flags");
|
|
41
|
+
* keys.modal(); // "@react_buoy_custom_feature-flags_modal"
|
|
42
|
+
* keys.key("overrides"); // "@react_buoy_custom_feature-flags_overrides"
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
custom: toolId => {
|
|
46
|
+
const root = `${devToolsStorageKeys.base}_custom_${toolId}`;
|
|
47
|
+
return {
|
|
48
|
+
root: () => root,
|
|
49
|
+
/** JsModal `persistenceKey` for this tool's window dimensions. */
|
|
50
|
+
modal: () => `${root}_modal`,
|
|
51
|
+
settings: () => `${root}_settings`,
|
|
52
|
+
/** Arbitrary tool-scoped key. */
|
|
53
|
+
key: suffix => `${root}_${suffix}`
|
|
54
|
+
};
|
|
55
|
+
},
|
|
34
56
|
/**
|
|
35
57
|
* Settings-related storage keys
|
|
36
58
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
|
|
4
|
-
import {
|
|
3
|
+
import { View, Text, TextInput, TouchableOpacity, StyleSheet } from "react-native";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import { ChevronLeft, Search as SearchIcon, X } from "../../icons/index.js";
|
|
5
6
|
import { buoyColors } from "../gameUI/constants/gameUIColors.js";
|
|
6
7
|
|
|
7
8
|
// Base ModalHeader container component
|
|
@@ -111,10 +112,51 @@ export function Actions({
|
|
|
111
112
|
}
|
|
112
113
|
Actions.displayName = "ModalHeaderActions";
|
|
113
114
|
|
|
115
|
+
// Expanding search input for the header. Render this IN PLACE OF
|
|
116
|
+
// `ModalHeader.Content` while search is active — it fills the same flex slot.
|
|
117
|
+
// Extracts the idiom env/network/storage each hand-rolled (~50 lines apiece).
|
|
118
|
+
|
|
119
|
+
export function HeaderSearch({
|
|
120
|
+
value,
|
|
121
|
+
onChangeText,
|
|
122
|
+
onCancel,
|
|
123
|
+
placeholder = "Search...",
|
|
124
|
+
autoFocus = true
|
|
125
|
+
}) {
|
|
126
|
+
const inputRef = useRef(null);
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
if (autoFocus) inputRef.current?.focus();
|
|
129
|
+
}, [autoFocus]);
|
|
130
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
131
|
+
style: styles.searchContainer,
|
|
132
|
+
children: [/*#__PURE__*/_jsx(SearchIcon, {
|
|
133
|
+
size: 12,
|
|
134
|
+
color: buoyColors.textSecondary
|
|
135
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
136
|
+
ref: inputRef,
|
|
137
|
+
style: styles.searchInput,
|
|
138
|
+
placeholder: placeholder,
|
|
139
|
+
placeholderTextColor: buoyColors.textMuted,
|
|
140
|
+
value: value,
|
|
141
|
+
onChangeText: onChangeText,
|
|
142
|
+
autoCorrect: false,
|
|
143
|
+
autoCapitalize: "none"
|
|
144
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
145
|
+
onPress: onCancel,
|
|
146
|
+
style: styles.searchCancelButton,
|
|
147
|
+
children: /*#__PURE__*/_jsx(X, {
|
|
148
|
+
size: 12,
|
|
149
|
+
color: buoyColors.textSecondary
|
|
150
|
+
})
|
|
151
|
+
})]
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
114
155
|
// Attach sub-components to the main component
|
|
115
156
|
ModalHeader.Navigation = Navigation;
|
|
116
157
|
ModalHeader.Content = Content;
|
|
117
158
|
ModalHeader.Actions = Actions;
|
|
159
|
+
ModalHeader.Search = HeaderSearch;
|
|
118
160
|
const styles = StyleSheet.create({
|
|
119
161
|
headerContainer: {
|
|
120
162
|
flexDirection: "row",
|
|
@@ -162,5 +204,31 @@ const styles = StyleSheet.create({
|
|
|
162
204
|
},
|
|
163
205
|
headerContentNoMargin: {
|
|
164
206
|
marginHorizontal: 0
|
|
207
|
+
},
|
|
208
|
+
searchContainer: {
|
|
209
|
+
flexDirection: "row",
|
|
210
|
+
alignItems: "center",
|
|
211
|
+
flex: 1,
|
|
212
|
+
backgroundColor: buoyColors.input,
|
|
213
|
+
borderRadius: 6,
|
|
214
|
+
paddingHorizontal: 10,
|
|
215
|
+
paddingVertical: 4,
|
|
216
|
+
marginHorizontal: 12,
|
|
217
|
+
marginVertical: 4,
|
|
218
|
+
height: 32,
|
|
219
|
+
borderWidth: 1,
|
|
220
|
+
borderColor: buoyColors.border
|
|
221
|
+
},
|
|
222
|
+
searchInput: {
|
|
223
|
+
flex: 1,
|
|
224
|
+
marginLeft: 8,
|
|
225
|
+
fontSize: 13,
|
|
226
|
+
color: buoyColors.text,
|
|
227
|
+
padding: 0,
|
|
228
|
+
height: "100%"
|
|
229
|
+
},
|
|
230
|
+
searchCancelButton: {
|
|
231
|
+
padding: 4,
|
|
232
|
+
marginLeft: 4
|
|
165
233
|
}
|
|
166
234
|
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet, Text, TouchableOpacity } from "react-native";
|
|
4
|
+
import { buoyColors, gameUIColors } from "../gameUI/constants/gameUIColors.js";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
/**
|
|
7
|
+
* The shared action button for dev-tool surfaces. Fills the gap where every
|
|
8
|
+
* tool hand-styled its own TouchableOpacity for "Clear", "Apply", "Reset".
|
|
9
|
+
*/
|
|
10
|
+
export function ToolButton({
|
|
11
|
+
label,
|
|
12
|
+
onPress,
|
|
13
|
+
variant = "primary",
|
|
14
|
+
size = "medium",
|
|
15
|
+
disabled = false,
|
|
16
|
+
icon,
|
|
17
|
+
style
|
|
18
|
+
}) {
|
|
19
|
+
const palette = VARIANTS[variant];
|
|
20
|
+
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
21
|
+
accessibilityRole: "button",
|
|
22
|
+
accessibilityLabel: label,
|
|
23
|
+
onPress: onPress,
|
|
24
|
+
disabled: disabled,
|
|
25
|
+
style: [styles.base, size === "small" ? styles.small : styles.medium, {
|
|
26
|
+
backgroundColor: palette.background,
|
|
27
|
+
borderColor: palette.border,
|
|
28
|
+
borderWidth: variant === "ghost" ? 0 : 1
|
|
29
|
+
}, disabled && styles.disabled, style],
|
|
30
|
+
children: [icon, /*#__PURE__*/_jsx(Text, {
|
|
31
|
+
style: [styles.label, size === "small" && styles.labelSmall, {
|
|
32
|
+
color: palette.text
|
|
33
|
+
}],
|
|
34
|
+
children: label
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const VARIANTS = {
|
|
39
|
+
primary: {
|
|
40
|
+
background: buoyColors.primary + "22",
|
|
41
|
+
border: buoyColors.primary + "66",
|
|
42
|
+
text: buoyColors.primary
|
|
43
|
+
},
|
|
44
|
+
danger: {
|
|
45
|
+
background: gameUIColors.error + "15",
|
|
46
|
+
border: gameUIColors.error + "60",
|
|
47
|
+
text: gameUIColors.error
|
|
48
|
+
},
|
|
49
|
+
warning: {
|
|
50
|
+
background: gameUIColors.warning + "15",
|
|
51
|
+
border: gameUIColors.warning + "60",
|
|
52
|
+
text: gameUIColors.warning
|
|
53
|
+
},
|
|
54
|
+
ghost: {
|
|
55
|
+
background: "transparent",
|
|
56
|
+
border: "transparent",
|
|
57
|
+
text: buoyColors.textSecondary
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const styles = StyleSheet.create({
|
|
61
|
+
base: {
|
|
62
|
+
flexDirection: "row",
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
justifyContent: "center",
|
|
65
|
+
gap: 6,
|
|
66
|
+
borderRadius: 8
|
|
67
|
+
},
|
|
68
|
+
medium: {
|
|
69
|
+
paddingVertical: 8,
|
|
70
|
+
paddingHorizontal: 14
|
|
71
|
+
},
|
|
72
|
+
small: {
|
|
73
|
+
paddingVertical: 5,
|
|
74
|
+
paddingHorizontal: 10
|
|
75
|
+
},
|
|
76
|
+
disabled: {
|
|
77
|
+
opacity: 0.4
|
|
78
|
+
},
|
|
79
|
+
label: {
|
|
80
|
+
fontSize: 12,
|
|
81
|
+
fontWeight: "600"
|
|
82
|
+
},
|
|
83
|
+
labelSmall: {
|
|
84
|
+
fontSize: 11
|
|
85
|
+
}
|
|
86
|
+
});
|
|
@@ -13,6 +13,7 @@ export { FilterSection, FilterBadge, AddFilterInput, AddFilterButton, FilterList
|
|
|
13
13
|
export { CompactFilterChips } from "./CompactFilterChips.js";
|
|
14
14
|
export { Badge, StatusBadge, CountBadge, TypeBadge, MethodBadge } from "./Badge.js";
|
|
15
15
|
export { TabSelector } from "./TabSelector.js";
|
|
16
|
+
export { ToolButton } from "./ToolButton.js";
|
|
16
17
|
export { EventListItem } from "./EventListItem.js";
|
|
17
18
|
export { StatsCard } from "./StatsCard.js";
|
|
18
19
|
export { CompactRow } from "./CompactRow.js";
|
package/lib/module/ui/index.js
CHANGED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { buoyColors, gameUIColors } from "./gameUI/constants/gameUIColors.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Semantic design tokens for dev-tool surfaces — the single documented entry
|
|
7
|
+
* point for custom-tool authors (and, over time, internal tools).
|
|
8
|
+
*
|
|
9
|
+
* Buoy historically grew three color systems (`buoyColors`, `gameUIColors`,
|
|
10
|
+
* `macOSColors`) with tribal knowledge about which to use where. `toolTheme`
|
|
11
|
+
* encodes that knowledge: surfaces/text come from the brand palette, semantic
|
|
12
|
+
* status colors from the gameUI palette. Consumers should not need to know
|
|
13
|
+
* that split exists.
|
|
14
|
+
*/
|
|
15
|
+
export const toolTheme = {
|
|
16
|
+
colors: {
|
|
17
|
+
/** Modal/page background. */
|
|
18
|
+
surface: buoyColors.base,
|
|
19
|
+
/** Card / row background, one step above surface. */
|
|
20
|
+
card: buoyColors.card,
|
|
21
|
+
/** Pressed/hover background. */
|
|
22
|
+
hover: buoyColors.hover,
|
|
23
|
+
/** Text-input background. */
|
|
24
|
+
input: buoyColors.input,
|
|
25
|
+
border: buoyColors.border,
|
|
26
|
+
borderStrong: buoyColors.borderStrong,
|
|
27
|
+
text: buoyColors.text,
|
|
28
|
+
textSecondary: buoyColors.textSecondary,
|
|
29
|
+
textMuted: buoyColors.textMuted,
|
|
30
|
+
/** Buoy teal — primary accent. */
|
|
31
|
+
accent: buoyColors.primary,
|
|
32
|
+
success: gameUIColors.success,
|
|
33
|
+
warning: gameUIColors.warning,
|
|
34
|
+
error: gameUIColors.error,
|
|
35
|
+
info: gameUIColors.info
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* Text presets matching the styles internal tools re-declare per file.
|
|
39
|
+
* Spread into a style: `style={[toolTheme.text.label, { color: ... }]}`.
|
|
40
|
+
*/
|
|
41
|
+
text: {
|
|
42
|
+
/** Modal/section titles. */
|
|
43
|
+
title: {
|
|
44
|
+
fontSize: 14,
|
|
45
|
+
fontWeight: "600",
|
|
46
|
+
color: buoyColors.text
|
|
47
|
+
},
|
|
48
|
+
/** Default body copy. */
|
|
49
|
+
body: {
|
|
50
|
+
fontSize: 13,
|
|
51
|
+
color: buoyColors.text
|
|
52
|
+
},
|
|
53
|
+
/** Secondary copy under a primary line. */
|
|
54
|
+
subtitle: {
|
|
55
|
+
fontSize: 12,
|
|
56
|
+
color: buoyColors.textSecondary
|
|
57
|
+
},
|
|
58
|
+
/** ALL-CAPS section labels ("LOCAL OVERRIDES"). */
|
|
59
|
+
label: {
|
|
60
|
+
fontSize: 10,
|
|
61
|
+
fontWeight: "700",
|
|
62
|
+
color: buoyColors.textMuted,
|
|
63
|
+
letterSpacing: 1.2,
|
|
64
|
+
fontFamily: "monospace"
|
|
65
|
+
},
|
|
66
|
+
/** Monospace values (keys, ids, payload snippets). */
|
|
67
|
+
mono: {
|
|
68
|
+
fontSize: 11,
|
|
69
|
+
color: buoyColors.textSecondary,
|
|
70
|
+
fontFamily: "monospace"
|
|
71
|
+
},
|
|
72
|
+
/** Timestamps and fine print. */
|
|
73
|
+
small: {
|
|
74
|
+
fontSize: 9,
|
|
75
|
+
color: buoyColors.textMuted,
|
|
76
|
+
fontFamily: "monospace"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
/** 4-based spacing scale used across tool surfaces. */
|
|
80
|
+
spacing: {
|
|
81
|
+
xs: 4,
|
|
82
|
+
sm: 8,
|
|
83
|
+
md: 12,
|
|
84
|
+
lg: 16,
|
|
85
|
+
xl: 24
|
|
86
|
+
},
|
|
87
|
+
radius: {
|
|
88
|
+
sm: 6,
|
|
89
|
+
md: 8,
|
|
90
|
+
lg: 12,
|
|
91
|
+
pill: 9999
|
|
92
|
+
}
|
|
93
|
+
};
|
|
@@ -9,6 +9,8 @@ export { getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstruc
|
|
|
9
9
|
export { parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath } from "./valueFormatting.js";
|
|
10
10
|
export { loadOptionalModule, getCachedOptionalModule } from "./loadOptionalModule.js";
|
|
11
11
|
export { setRenderCaptureProvider, getRenderCaptureProvider } from "./renderCaptureRegistry.js";
|
|
12
|
+
export { registerStateSnapshotProvider, getStateSnapshotProviders, getStateSnapshotProvider, subscribeToStateSnapshotProviders } from "./stateSnapshotRegistry.js";
|
|
13
|
+
export { serialize as superJsonSerialize, deserialize as superJsonDeserialize } from "./minimalSuperJSON.js";
|
|
12
14
|
export { reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS } from "./reloadApp.js";
|
|
13
15
|
export { Subscribable } from "./subscribable.js";
|
|
14
16
|
export { subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange } from "./subscriberCountNotifier.js";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Cross-package bridge for app-state snapshot & restore (Time Machine).
|
|
5
|
+
*
|
|
6
|
+
* Each state tool (`@buoy-gg/storage`, `@buoy-gg/redux`, `@buoy-gg/zustand`,
|
|
7
|
+
* `@buoy-gg/jotai`, `@buoy-gg/react-query`) registers a provider here at
|
|
8
|
+
* module init (or from its app-lifetime sync hook); `@buoy-gg/time-machine`
|
|
9
|
+
* consumes the registry. Neither side imports the other — same
|
|
10
|
+
* optional-capability pattern as renderCaptureRegistry.
|
|
11
|
+
*
|
|
12
|
+
* Apps can also register custom providers for state Buoy doesn't know about.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const providers = new Map();
|
|
16
|
+
const listeners = new Set();
|
|
17
|
+
function notify() {
|
|
18
|
+
listeners.forEach(l => {
|
|
19
|
+
try {
|
|
20
|
+
l();
|
|
21
|
+
} catch {
|
|
22
|
+
// listener errors must not break registration
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Register a provider. Last registration wins for a given id.
|
|
29
|
+
* Returns an unregister function (only removes the provider if it is still
|
|
30
|
+
* the registered one for that id).
|
|
31
|
+
*/
|
|
32
|
+
export function registerStateSnapshotProvider(provider) {
|
|
33
|
+
providers.set(provider.id, provider);
|
|
34
|
+
notify();
|
|
35
|
+
return () => {
|
|
36
|
+
if (providers.get(provider.id) === provider) {
|
|
37
|
+
providers.delete(provider.id);
|
|
38
|
+
notify();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function getStateSnapshotProviders() {
|
|
43
|
+
return Array.from(providers.values());
|
|
44
|
+
}
|
|
45
|
+
export function getStateSnapshotProvider(id) {
|
|
46
|
+
return providers.get(id) ?? null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Notifies when providers register/unregister (query registers late). */
|
|
50
|
+
export function subscribeToStateSnapshotProviders(listener) {
|
|
51
|
+
listeners.add(listener);
|
|
52
|
+
return () => {
|
|
53
|
+
listeners.delete(listener);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { useFilterManager } from "./useFilterManager";
|
|
2
|
+
export { usePersistedState } from "./usePersistedState";
|
|
2
3
|
export { useSafeAreaInsets } from "./useSafeAreaInsets";
|
|
3
4
|
export { getSafeAreaInsets } from "./useSafeAreaInsets";
|
|
4
5
|
export { useDeviceInfo, getDeviceInfo, logDeviceInfo, type DeviceInfo, type PlatformInfo, type DisplayInfo, type AccessibilitySettings, type AppearanceInfo, type LocaleInfo, type StatusBarInfo, type KeyboardInfo, type AppStateInfo, type UniqueIdentifiers, type SettingsInfo, } from "./useDeviceInfo";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useState` persisted through `persistentStorage` (FileSystem → AsyncStorage
|
|
3
|
+
* → memory). Replaces the load-then-`hasLoaded`-guard `useEffect` pattern
|
|
4
|
+
* every tool used to hand-roll.
|
|
5
|
+
*
|
|
6
|
+
* Values are JSON-serialized; the default is returned until hydration
|
|
7
|
+
* completes (subsequent mounts of the same key hydrate synchronously from an
|
|
8
|
+
* in-memory cache). The third tuple element reports hydration so callers can
|
|
9
|
+
* defer writes that must not clobber a not-yet-loaded value.
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const [tab, setTab, tabHydrated] = usePersistedState("@react_buoy_custom_flags_tab", "flags");
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function usePersistedState<T>(key: string, defaultValue: T): [T, (next: T | ((prev: T) => T)) => void, boolean];
|
|
16
|
+
//# sourceMappingURL=usePersistedState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePersistedState.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePersistedState.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,GACd,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,CAoDpD"}
|
|
@@ -2,6 +2,7 @@ export * from "./primitives";
|
|
|
2
2
|
export { NetworkIcon, NETWORK_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
3
3
|
export { EnvIcon, ENV_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
4
4
|
export { ConsoleIcon, CONSOLE_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
5
|
+
export { TimeMachineIcon, TIME_MACHINE_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
5
6
|
export { ImagesIcon, IMAGES_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
6
7
|
export { AssetsIcon, ASSETS_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
7
8
|
export { ImpersonateIcon, IMPERSONATE_ICON_COLOR } from "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cAAc,EACd,eAAe,EACf,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./ui";
|
|
2
2
|
export * from "./stores";
|
|
3
|
-
export { absoluteFill, displayValue, parseDisplayValue, getSafeAreaInsets, persistentStorage, isUsingPersistentStorage, getStorageBackendType, safeStringify, getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstructorName, isEmpty, getValueSize, parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath, loadOptionalModule, getCachedOptionalModule, setRenderCaptureProvider, getRenderCaptureProvider, type RenderCaptureProvider, type RenderCaptureSummary, type RenderCaptureTopComponent, reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS, type ReloadStrategy, type ResolvedReloadStrategy, Subscribable, type SubscribableListener, subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange, useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, isExpoRouterAvailable, } from "./utils";
|
|
3
|
+
export { absoluteFill, displayValue, parseDisplayValue, getSafeAreaInsets, persistentStorage, isUsingPersistentStorage, getStorageBackendType, safeStringify, getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstructorName, isEmpty, getValueSize, parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath, loadOptionalModule, getCachedOptionalModule, setRenderCaptureProvider, getRenderCaptureProvider, type RenderCaptureProvider, type RenderCaptureSummary, type RenderCaptureTopComponent, registerStateSnapshotProvider, getStateSnapshotProviders, getStateSnapshotProvider, subscribeToStateSnapshotProviders, type StateSnapshotProvider, type StateSnapshotProviderStatus, type StateSnapshotCapture, type StateSnapshotRestoreResult, superJsonSerialize, superJsonDeserialize, type SuperJSONResult, reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS, type ReloadStrategy, type ResolvedReloadStrategy, Subscribable, type SubscribableListener, subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange, useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, isExpoRouterAvailable, } from "./utils";
|
|
4
4
|
export * from "./utils/formatting";
|
|
5
5
|
export * from "./utils/time";
|
|
6
6
|
export { isPlainObject as isPlainObjectUtil } from "./utils/typeHelpers";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,MAAM,CAAC;AAGrB,cAAc,UAAU,CAAC;AAGzB,OAAO,EAEL,YAAY,EAEZ,YAAY,EACZ,iBAAiB,EAEjB,iBAAiB,EAEjB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EAErB,aAAa,EAEb,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,YAAY,EAEZ,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,EAEV,kBAAkB,EAClB,uBAAuB,EAEvB,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAE9B,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAE3B,YAAY,EACZ,KAAK,oBAAoB,EAEzB,uBAAuB,EACvB,iCAAiC,EACjC,2BAA2B,EAE3B,aAAa,EACb,eAAe,EACf,eAAe,EACf,yBAAyB,EACzB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAA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