@buoy-gg/core 3.0.0 → 3.0.2
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/floatingMenu/FloatingDevTools.js +6 -1
- package/lib/commonjs/floatingMenu/FloatingMenu.js +3 -3
- package/lib/commonjs/floatingMenu/autoExternalSync.js +215 -0
- package/lib/commonjs/floatingMenu/dial/DialDevTools.js +11 -11
- package/lib/commonjs/floatingMenu/dial/OnboardingTooltip.js +1 -1
- package/lib/module/floatingMenu/FloatingDevTools.js +6 -1
- package/lib/module/floatingMenu/FloatingMenu.js +3 -2
- package/lib/module/floatingMenu/autoExternalSync.js +209 -0
- package/lib/module/floatingMenu/dial/DialDevTools.js +11 -10
- package/lib/module/floatingMenu/dial/OnboardingTooltip.js +2 -1
- package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts +19 -1
- package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts +21 -0
- package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts.map +1 -0
- package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts +19 -1
- package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts +21 -0
- package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts.map +1 -0
- package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -15,6 +15,7 @@ var _MinimizedToolsContext = require("./MinimizedToolsContext.js");
|
|
|
15
15
|
var _defaultConfig = require("./defaultConfig.js");
|
|
16
16
|
var _DefaultConfigContext = require("./DefaultConfigContext.js");
|
|
17
17
|
var _license = require("@buoy-gg/license");
|
|
18
|
+
var _autoExternalSync = require("./autoExternalSync.js");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
20
21
|
/**
|
|
@@ -113,6 +114,7 @@ const FloatingDevTools = ({
|
|
|
113
114
|
licenseKey: licenseKeyProp,
|
|
114
115
|
zustandStores,
|
|
115
116
|
environment,
|
|
117
|
+
externalSync = true,
|
|
116
118
|
...props
|
|
117
119
|
}) => {
|
|
118
120
|
const resolvedEnvironment = environment ?? (0, _sharedUi.normalizeEnvironment)(process.env.NODE_ENV ?? "dev");
|
|
@@ -342,7 +344,10 @@ const FloatingDevTools = ({
|
|
|
342
344
|
environment: resolvedEnvironment
|
|
343
345
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppHost.AppOverlay, {})]
|
|
344
346
|
})
|
|
345
|
-
}), children, DebugBordersOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(DebugBordersOverlay, {}), HighlightUpdatesOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(HighlightUpdatesOverlay, {}), ImageOverlayOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageOverlayOverlay, {}), PerfMonitorOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(PerfMonitorOverlay, {}), ImpersonateOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(ImpersonateOverlay, {}), RouteTracker && /*#__PURE__*/(0, _jsxRuntime.jsx)(RouteTracker, {})
|
|
347
|
+
}), children, DebugBordersOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(DebugBordersOverlay, {}), HighlightUpdatesOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(HighlightUpdatesOverlay, {}), ImageOverlayOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageOverlayOverlay, {}), PerfMonitorOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(PerfMonitorOverlay, {}), ImpersonateOverlay && /*#__PURE__*/(0, _jsxRuntime.jsx)(ImpersonateOverlay, {}), RouteTracker && /*#__PURE__*/(0, _jsxRuntime.jsx)(RouteTracker, {}), isDevelopment && externalSync !== false && (0, _autoExternalSync.isExternalSyncAvailable)() && /*#__PURE__*/(0, _jsxRuntime.jsx)(_autoExternalSync.AutoExternalSync, {
|
|
348
|
+
options: typeof externalSync === "object" ? externalSync : undefined,
|
|
349
|
+
requiredEnvVars: requiredEnvVars
|
|
350
|
+
})]
|
|
346
351
|
})
|
|
347
352
|
})
|
|
348
353
|
})
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.FloatingMenu = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
10
|
var _floatingTools = require("./floatingTools");
|
|
10
11
|
var _DialDevTools = require("./dial/DialDevTools");
|
|
11
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
12
12
|
var _DevToolsSettingsModal = require("./DevToolsSettingsModal");
|
|
13
13
|
var _AppHost = require("./AppHost.js");
|
|
14
14
|
var _DevToolsVisibilityContext = require("./DevToolsVisibilityContext.js");
|
|
@@ -324,11 +324,11 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
324
324
|
fontWeight: "900"
|
|
325
325
|
},
|
|
326
326
|
onboardingContainer: {
|
|
327
|
-
...
|
|
327
|
+
..._sharedUi.absoluteFill,
|
|
328
328
|
zIndex: 10000
|
|
329
329
|
},
|
|
330
330
|
onboardingBackdrop: {
|
|
331
|
-
...
|
|
331
|
+
..._sharedUi.absoluteFill,
|
|
332
332
|
backgroundColor: "rgba(0, 0, 0, 0.85)"
|
|
333
333
|
}
|
|
334
334
|
});
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AutoExternalSync = AutoExternalSync;
|
|
7
|
+
exports.isExternalSyncAvailable = isExternalSyncAvailable;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
/**
|
|
11
|
+
* Zero-config device→desktop sync for FloatingDevTools.
|
|
12
|
+
*
|
|
13
|
+
* When @buoy-gg/external-sync is installed, FloatingDevTools renders
|
|
14
|
+
* <AutoExternalSync /> in dev builds: it connects to the Buoy Desktop broker
|
|
15
|
+
* (localhost:42831 — a silent no-op when the desktop app isn't running) and
|
|
16
|
+
* registers a sync adapter for every installed tool package, discovered with
|
|
17
|
+
* the same guarded-require pattern as autoDiscoverPresets. No <DevToolsSync>
|
|
18
|
+
* wiring needed in the app.
|
|
19
|
+
*
|
|
20
|
+
* Identity defaults come from expo-constants when available (app name →
|
|
21
|
+
* "MyApp (ios)" / "myapp-ios"), overridable via the `externalSync` prop.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
25
|
+
|
|
26
|
+
// Module-level guarded requires: presence is constant for the app lifetime,
|
|
27
|
+
// so hooks pulled from these modules keep a stable call order.
|
|
28
|
+
//
|
|
29
|
+
// IMPORTANT: each require() must sit LEXICALLY inside its own try block
|
|
30
|
+
// (same pattern as autoDiscoverPresets) — Metro only marks a dependency as
|
|
31
|
+
// optional when the require is directly inside a try statement. Wrapping it
|
|
32
|
+
// in a helper/arrow makes Metro hard-fail the bundle for apps that don't
|
|
33
|
+
// install that package.
|
|
34
|
+
let externalSyncModule = null;
|
|
35
|
+
let storageModule = null;
|
|
36
|
+
let networkModule = null;
|
|
37
|
+
let reactQueryModule = null;
|
|
38
|
+
let routeEventsModule = null;
|
|
39
|
+
let reduxModule = null;
|
|
40
|
+
let zustandModule = null;
|
|
41
|
+
let jotaiModule = null;
|
|
42
|
+
let eventsModule = null;
|
|
43
|
+
let envModule = null;
|
|
44
|
+
let highlightUpdatesModule = null;
|
|
45
|
+
let debugBordersModule = null;
|
|
46
|
+
let impersonateModule = null;
|
|
47
|
+
let perfMonitorModule = null;
|
|
48
|
+
let expoConstantsModule = null;
|
|
49
|
+
try {
|
|
50
|
+
externalSyncModule = require("@buoy-gg/external-sync");
|
|
51
|
+
} catch {
|
|
52
|
+
// not installed
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
storageModule = require("@buoy-gg/storage");
|
|
56
|
+
} catch {
|
|
57
|
+
// not installed
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
networkModule = require("@buoy-gg/network");
|
|
61
|
+
} catch {
|
|
62
|
+
// not installed
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
reactQueryModule = require("@buoy-gg/react-query");
|
|
66
|
+
} catch {
|
|
67
|
+
// not installed
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
routeEventsModule = require("@buoy-gg/route-events");
|
|
71
|
+
} catch {
|
|
72
|
+
// not installed
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
reduxModule = require("@buoy-gg/redux");
|
|
76
|
+
} catch {
|
|
77
|
+
// not installed
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
zustandModule = require("@buoy-gg/zustand");
|
|
81
|
+
} catch {
|
|
82
|
+
// not installed
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
jotaiModule = require("@buoy-gg/jotai");
|
|
86
|
+
} catch {
|
|
87
|
+
// not installed
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
eventsModule = require("@buoy-gg/events");
|
|
91
|
+
} catch {
|
|
92
|
+
// not installed
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
envModule = require("@buoy-gg/env");
|
|
96
|
+
} catch {
|
|
97
|
+
// not installed
|
|
98
|
+
}
|
|
99
|
+
try {
|
|
100
|
+
highlightUpdatesModule = require("@buoy-gg/highlight-updates");
|
|
101
|
+
} catch {
|
|
102
|
+
// not installed
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
debugBordersModule = require("@buoy-gg/debug-borders");
|
|
106
|
+
} catch {
|
|
107
|
+
// not installed
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
impersonateModule = require("@buoy-gg/impersonate");
|
|
111
|
+
} catch {
|
|
112
|
+
// not installed
|
|
113
|
+
}
|
|
114
|
+
try {
|
|
115
|
+
perfMonitorModule = require("@buoy-gg/perf-monitor");
|
|
116
|
+
} catch {
|
|
117
|
+
// not installed
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
expoConstantsModule = require("expo-constants");
|
|
121
|
+
} catch {
|
|
122
|
+
// not installed (RN CLI apps)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** Whether zero-config sync can run (the external-sync package is installed). */
|
|
126
|
+
function isExternalSyncAvailable() {
|
|
127
|
+
return !!externalSyncModule?.useExternalSyncSocket;
|
|
128
|
+
}
|
|
129
|
+
function getAppName() {
|
|
130
|
+
const constants = expoConstantsModule?.default ?? expoConstantsModule;
|
|
131
|
+
return constants?.expoConfig?.name ?? constants?.manifest2?.extra?.expoClient?.name ?? null;
|
|
132
|
+
}
|
|
133
|
+
function defaultIdentity() {
|
|
134
|
+
const appName = getAppName();
|
|
135
|
+
const slug = (appName ?? "buoy").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
|
|
136
|
+
return {
|
|
137
|
+
deviceName: `${appName ?? "Buoy Device"} (${_reactNative.Platform.OS})`,
|
|
138
|
+
deviceId: `${slug || "buoy"}-${_reactNative.Platform.OS}`
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function AutoExternalSync({
|
|
142
|
+
options,
|
|
143
|
+
requiredEnvVars
|
|
144
|
+
}) {
|
|
145
|
+
const {
|
|
146
|
+
useExternalSyncSocket,
|
|
147
|
+
useExternalSync
|
|
148
|
+
} = externalSyncModule;
|
|
149
|
+
|
|
150
|
+
// Context-based query adapter; null when there is no QueryClientProvider
|
|
151
|
+
// above FloatingDevTools (or the installed @buoy-gg/react-query predates
|
|
152
|
+
// the hook).
|
|
153
|
+
const queryAdapter = reactQueryModule?.useReactQuerySyncAdapter ? reactQueryModule.useReactQuerySyncAdapter() : null;
|
|
154
|
+
const identity = (0, _react.useMemo)(defaultIdentity, []);
|
|
155
|
+
const deviceId = options?.deviceId ?? identity.deviceId;
|
|
156
|
+
const {
|
|
157
|
+
socket
|
|
158
|
+
} = useExternalSyncSocket({
|
|
159
|
+
deviceName: options?.deviceName ?? identity.deviceName,
|
|
160
|
+
socketURL: options?.socketURL ?? "http://localhost:42831",
|
|
161
|
+
persistentDeviceId: deviceId,
|
|
162
|
+
platform: _reactNative.Platform.OS,
|
|
163
|
+
enableLogs: options?.enableLogs
|
|
164
|
+
});
|
|
165
|
+
const tools = (0, _react.useMemo)(() => {
|
|
166
|
+
const map = {};
|
|
167
|
+
if (storageModule?.storageSyncAdapter) {
|
|
168
|
+
map.storage = storageModule.storageSyncAdapter;
|
|
169
|
+
}
|
|
170
|
+
if (networkModule?.networkSyncAdapter) {
|
|
171
|
+
map.network = networkModule.networkSyncAdapter;
|
|
172
|
+
}
|
|
173
|
+
if (queryAdapter) {
|
|
174
|
+
map.query = queryAdapter;
|
|
175
|
+
}
|
|
176
|
+
if (routeEventsModule?.routeEventsSyncAdapter) {
|
|
177
|
+
map["route-events"] = routeEventsModule.routeEventsSyncAdapter;
|
|
178
|
+
}
|
|
179
|
+
if (reduxModule?.reduxSyncAdapter) {
|
|
180
|
+
map.redux = reduxModule.reduxSyncAdapter;
|
|
181
|
+
}
|
|
182
|
+
if (zustandModule?.zustandSyncAdapter) {
|
|
183
|
+
map.zustand = zustandModule.zustandSyncAdapter;
|
|
184
|
+
}
|
|
185
|
+
if (jotaiModule?.jotaiSyncAdapter) {
|
|
186
|
+
map.jotai = jotaiModule.jotaiSyncAdapter;
|
|
187
|
+
}
|
|
188
|
+
if (eventsModule?.eventsSyncAdapter) {
|
|
189
|
+
map.events = eventsModule.eventsSyncAdapter;
|
|
190
|
+
}
|
|
191
|
+
if (envModule?.createEnvSyncAdapter) {
|
|
192
|
+
map.env = envModule.createEnvSyncAdapter(requiredEnvVars ?? []);
|
|
193
|
+
}
|
|
194
|
+
if (highlightUpdatesModule?.highlightUpdatesSyncAdapter) {
|
|
195
|
+
map["highlight-updates"] = highlightUpdatesModule.highlightUpdatesSyncAdapter;
|
|
196
|
+
}
|
|
197
|
+
if (debugBordersModule?.debugBordersSyncAdapter) {
|
|
198
|
+
map["debug-borders"] = debugBordersModule.debugBordersSyncAdapter;
|
|
199
|
+
}
|
|
200
|
+
if (impersonateModule?.impersonateSyncAdapter) {
|
|
201
|
+
map.impersonate = impersonateModule.impersonateSyncAdapter;
|
|
202
|
+
}
|
|
203
|
+
if (perfMonitorModule?.perfMonitorSyncAdapter) {
|
|
204
|
+
map["perf-monitor"] = perfMonitorModule.perfMonitorSyncAdapter;
|
|
205
|
+
}
|
|
206
|
+
return map;
|
|
207
|
+
}, [queryAdapter, requiredEnvVars]);
|
|
208
|
+
useExternalSync({
|
|
209
|
+
tools,
|
|
210
|
+
socket,
|
|
211
|
+
deviceId,
|
|
212
|
+
enableLogs: options?.enableLogs
|
|
213
|
+
});
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.DialDevTools = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
10
|
var _DialIcon = require("./DialIcon.js");
|
|
10
11
|
var _DialPagination = require("./DialPagination.js");
|
|
11
12
|
var _dialUsageStore = require("./dialUsageStore.js");
|
|
12
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
13
13
|
var _DevToolsSettingsModal = require("../DevToolsSettingsModal");
|
|
14
14
|
var _license = require("@buoy-gg/license");
|
|
15
15
|
var _AppHost = require("../AppHost.js");
|
|
@@ -505,7 +505,7 @@ const DialDevTools = ({
|
|
|
505
505
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
506
506
|
style: [styles.backdrop, backdropAnimatedStyle],
|
|
507
507
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
508
|
-
style:
|
|
508
|
+
style: _sharedUi.absoluteFill,
|
|
509
509
|
onPress: handleClose
|
|
510
510
|
})
|
|
511
511
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
|
|
@@ -654,11 +654,11 @@ const DialDevTools = ({
|
|
|
654
654
|
exports.DialDevTools = DialDevTools;
|
|
655
655
|
const styles = _reactNative.StyleSheet.create({
|
|
656
656
|
container: {
|
|
657
|
-
...
|
|
657
|
+
..._sharedUi.absoluteFill,
|
|
658
658
|
zIndex: 9999
|
|
659
659
|
},
|
|
660
660
|
backdrop: {
|
|
661
|
-
...
|
|
661
|
+
..._sharedUi.absoluteFill,
|
|
662
662
|
backgroundColor: _floatingToolsCore.dialColors.dialBackdrop
|
|
663
663
|
},
|
|
664
664
|
// width/height/borderRadius for the circle pieces come from sizeStyles —
|
|
@@ -689,26 +689,26 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
689
689
|
overflow: "hidden"
|
|
690
690
|
},
|
|
691
691
|
gradientLayer1: {
|
|
692
|
-
...
|
|
692
|
+
..._sharedUi.absoluteFill,
|
|
693
693
|
backgroundColor: _floatingToolsCore.dialColors.dialGradient1,
|
|
694
694
|
opacity: 0.6
|
|
695
695
|
},
|
|
696
696
|
gradientLayer2: {
|
|
697
|
-
...
|
|
697
|
+
..._sharedUi.absoluteFill,
|
|
698
698
|
backgroundColor: _floatingToolsCore.dialColors.dialGradient2,
|
|
699
699
|
opacity: 0.4,
|
|
700
700
|
top: "30%",
|
|
701
701
|
left: "30%"
|
|
702
702
|
},
|
|
703
703
|
gradientLayer3: {
|
|
704
|
-
...
|
|
704
|
+
..._sharedUi.absoluteFill,
|
|
705
705
|
backgroundColor: _floatingToolsCore.dialColors.dialGradient3,
|
|
706
706
|
opacity: 0.3,
|
|
707
707
|
top: "50%",
|
|
708
708
|
left: "50%"
|
|
709
709
|
},
|
|
710
710
|
gridPattern: {
|
|
711
|
-
...
|
|
711
|
+
..._sharedUi.absoluteFill,
|
|
712
712
|
alignItems: "center",
|
|
713
713
|
justifyContent: "center"
|
|
714
714
|
},
|
|
@@ -739,13 +739,13 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
739
739
|
overflow: "hidden"
|
|
740
740
|
},
|
|
741
741
|
buttonGradientLayer1: {
|
|
742
|
-
...
|
|
742
|
+
..._sharedUi.absoluteFill,
|
|
743
743
|
backgroundColor: _floatingToolsCore.dialColors.dialGradient1,
|
|
744
744
|
opacity: 0.5,
|
|
745
745
|
borderRadius: BUTTON_SIZE
|
|
746
746
|
},
|
|
747
747
|
buttonGradientLayer2: {
|
|
748
|
-
...
|
|
748
|
+
..._sharedUi.absoluteFill,
|
|
749
749
|
backgroundColor: _floatingToolsCore.dialColors.dialGradient2,
|
|
750
750
|
opacity: 0.3,
|
|
751
751
|
top: "20%",
|
|
@@ -753,7 +753,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
753
753
|
borderRadius: BUTTON_SIZE
|
|
754
754
|
},
|
|
755
755
|
buttonGradientLayer3: {
|
|
756
|
-
...
|
|
756
|
+
..._sharedUi.absoluteFill,
|
|
757
757
|
backgroundColor: _floatingToolsCore.dialColors.dialGradient3,
|
|
758
758
|
opacity: 0.2,
|
|
759
759
|
top: "40%",
|
|
@@ -133,7 +133,7 @@ const OnboardingTooltip = ({
|
|
|
133
133
|
exports.OnboardingTooltip = OnboardingTooltip;
|
|
134
134
|
const styles = _reactNative.StyleSheet.create({
|
|
135
135
|
container: {
|
|
136
|
-
...
|
|
136
|
+
..._sharedUi.absoluteFill,
|
|
137
137
|
alignItems: "center",
|
|
138
138
|
justifyContent: "center",
|
|
139
139
|
pointerEvents: "box-none"
|
|
@@ -12,6 +12,7 @@ import { MinimizedToolsProvider } from "./MinimizedToolsContext.js";
|
|
|
12
12
|
import { validateDialConfig } from "./defaultConfig.js";
|
|
13
13
|
import { DefaultConfigProvider } from "./DefaultConfigContext.js";
|
|
14
14
|
import { LicenseManager, useIsPro, useLicense } from "@buoy-gg/license";
|
|
15
|
+
import { AutoExternalSync, isExternalSyncAvailable } from "./autoExternalSync.js";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Environment variable configuration
|
|
@@ -109,6 +110,7 @@ export const FloatingDevTools = ({
|
|
|
109
110
|
licenseKey: licenseKeyProp,
|
|
110
111
|
zustandStores,
|
|
111
112
|
environment,
|
|
113
|
+
externalSync = true,
|
|
112
114
|
...props
|
|
113
115
|
}) => {
|
|
114
116
|
const resolvedEnvironment = environment ?? normalizeEnvironment(process.env.NODE_ENV ?? "dev");
|
|
@@ -338,7 +340,10 @@ export const FloatingDevTools = ({
|
|
|
338
340
|
environment: resolvedEnvironment
|
|
339
341
|
}), /*#__PURE__*/_jsx(AppOverlay, {})]
|
|
340
342
|
})
|
|
341
|
-
}), children, DebugBordersOverlay && /*#__PURE__*/_jsx(DebugBordersOverlay, {}), HighlightUpdatesOverlay && /*#__PURE__*/_jsx(HighlightUpdatesOverlay, {}), ImageOverlayOverlay && /*#__PURE__*/_jsx(ImageOverlayOverlay, {}), PerfMonitorOverlay && /*#__PURE__*/_jsx(PerfMonitorOverlay, {}), ImpersonateOverlay && /*#__PURE__*/_jsx(ImpersonateOverlay, {}), RouteTracker && /*#__PURE__*/_jsx(RouteTracker, {})
|
|
343
|
+
}), children, DebugBordersOverlay && /*#__PURE__*/_jsx(DebugBordersOverlay, {}), HighlightUpdatesOverlay && /*#__PURE__*/_jsx(HighlightUpdatesOverlay, {}), ImageOverlayOverlay && /*#__PURE__*/_jsx(ImageOverlayOverlay, {}), PerfMonitorOverlay && /*#__PURE__*/_jsx(PerfMonitorOverlay, {}), ImpersonateOverlay && /*#__PURE__*/_jsx(ImpersonateOverlay, {}), RouteTracker && /*#__PURE__*/_jsx(RouteTracker, {}), isDevelopment && externalSync !== false && isExternalSyncAvailable() && /*#__PURE__*/_jsx(AutoExternalSync, {
|
|
344
|
+
options: typeof externalSync === "object" ? externalSync : undefined,
|
|
345
|
+
requiredEnvVars: requiredEnvVars
|
|
346
|
+
})]
|
|
342
347
|
})
|
|
343
348
|
})
|
|
344
349
|
})
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { TouchableOpacity, StyleSheet, View } from "react-native";
|
|
5
|
+
import { absoluteFill } from "@buoy-gg/shared-ui";
|
|
5
6
|
import { FloatingTools, UserStatus } from "./floatingTools";
|
|
6
7
|
import { DialDevTools } from "./dial/DialDevTools";
|
|
7
8
|
import { EnvironmentIndicator, persistentStorage, useHintsDisabled, devToolsStorageKeys, buoyColors } from "@buoy-gg/shared-ui";
|
|
@@ -318,11 +319,11 @@ const styles = StyleSheet.create({
|
|
|
318
319
|
fontWeight: "900"
|
|
319
320
|
},
|
|
320
321
|
onboardingContainer: {
|
|
321
|
-
...
|
|
322
|
+
...absoluteFill,
|
|
322
323
|
zIndex: 10000
|
|
323
324
|
},
|
|
324
325
|
onboardingBackdrop: {
|
|
325
|
-
...
|
|
326
|
+
...absoluteFill,
|
|
326
327
|
backgroundColor: "rgba(0, 0, 0, 0.85)"
|
|
327
328
|
}
|
|
328
329
|
});
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Zero-config device→desktop sync for FloatingDevTools.
|
|
5
|
+
*
|
|
6
|
+
* When @buoy-gg/external-sync is installed, FloatingDevTools renders
|
|
7
|
+
* <AutoExternalSync /> in dev builds: it connects to the Buoy Desktop broker
|
|
8
|
+
* (localhost:42831 — a silent no-op when the desktop app isn't running) and
|
|
9
|
+
* registers a sync adapter for every installed tool package, discovered with
|
|
10
|
+
* the same guarded-require pattern as autoDiscoverPresets. No <DevToolsSync>
|
|
11
|
+
* wiring needed in the app.
|
|
12
|
+
*
|
|
13
|
+
* Identity defaults come from expo-constants when available (app name →
|
|
14
|
+
* "MyApp (ios)" / "myapp-ios"), overridable via the `externalSync` prop.
|
|
15
|
+
*/
|
|
16
|
+
import { useMemo } from "react";
|
|
17
|
+
import { Platform } from "react-native";
|
|
18
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
19
|
+
|
|
20
|
+
// Module-level guarded requires: presence is constant for the app lifetime,
|
|
21
|
+
// so hooks pulled from these modules keep a stable call order.
|
|
22
|
+
//
|
|
23
|
+
// IMPORTANT: each require() must sit LEXICALLY inside its own try block
|
|
24
|
+
// (same pattern as autoDiscoverPresets) — Metro only marks a dependency as
|
|
25
|
+
// optional when the require is directly inside a try statement. Wrapping it
|
|
26
|
+
// in a helper/arrow makes Metro hard-fail the bundle for apps that don't
|
|
27
|
+
// install that package.
|
|
28
|
+
let externalSyncModule = null;
|
|
29
|
+
let storageModule = null;
|
|
30
|
+
let networkModule = null;
|
|
31
|
+
let reactQueryModule = null;
|
|
32
|
+
let routeEventsModule = null;
|
|
33
|
+
let reduxModule = null;
|
|
34
|
+
let zustandModule = null;
|
|
35
|
+
let jotaiModule = null;
|
|
36
|
+
let eventsModule = null;
|
|
37
|
+
let envModule = null;
|
|
38
|
+
let highlightUpdatesModule = null;
|
|
39
|
+
let debugBordersModule = null;
|
|
40
|
+
let impersonateModule = null;
|
|
41
|
+
let perfMonitorModule = null;
|
|
42
|
+
let expoConstantsModule = null;
|
|
43
|
+
try {
|
|
44
|
+
externalSyncModule = require("@buoy-gg/external-sync");
|
|
45
|
+
} catch {
|
|
46
|
+
// not installed
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
storageModule = require("@buoy-gg/storage");
|
|
50
|
+
} catch {
|
|
51
|
+
// not installed
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
networkModule = require("@buoy-gg/network");
|
|
55
|
+
} catch {
|
|
56
|
+
// not installed
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
reactQueryModule = require("@buoy-gg/react-query");
|
|
60
|
+
} catch {
|
|
61
|
+
// not installed
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
routeEventsModule = require("@buoy-gg/route-events");
|
|
65
|
+
} catch {
|
|
66
|
+
// not installed
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
reduxModule = require("@buoy-gg/redux");
|
|
70
|
+
} catch {
|
|
71
|
+
// not installed
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
zustandModule = require("@buoy-gg/zustand");
|
|
75
|
+
} catch {
|
|
76
|
+
// not installed
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
jotaiModule = require("@buoy-gg/jotai");
|
|
80
|
+
} catch {
|
|
81
|
+
// not installed
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
eventsModule = require("@buoy-gg/events");
|
|
85
|
+
} catch {
|
|
86
|
+
// not installed
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
envModule = require("@buoy-gg/env");
|
|
90
|
+
} catch {
|
|
91
|
+
// not installed
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
highlightUpdatesModule = require("@buoy-gg/highlight-updates");
|
|
95
|
+
} catch {
|
|
96
|
+
// not installed
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
debugBordersModule = require("@buoy-gg/debug-borders");
|
|
100
|
+
} catch {
|
|
101
|
+
// not installed
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
impersonateModule = require("@buoy-gg/impersonate");
|
|
105
|
+
} catch {
|
|
106
|
+
// not installed
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
perfMonitorModule = require("@buoy-gg/perf-monitor");
|
|
110
|
+
} catch {
|
|
111
|
+
// not installed
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
expoConstantsModule = require("expo-constants");
|
|
115
|
+
} catch {
|
|
116
|
+
// not installed (RN CLI apps)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** Whether zero-config sync can run (the external-sync package is installed). */
|
|
120
|
+
export function isExternalSyncAvailable() {
|
|
121
|
+
return !!externalSyncModule?.useExternalSyncSocket;
|
|
122
|
+
}
|
|
123
|
+
function getAppName() {
|
|
124
|
+
const constants = expoConstantsModule?.default ?? expoConstantsModule;
|
|
125
|
+
return constants?.expoConfig?.name ?? constants?.manifest2?.extra?.expoClient?.name ?? null;
|
|
126
|
+
}
|
|
127
|
+
function defaultIdentity() {
|
|
128
|
+
const appName = getAppName();
|
|
129
|
+
const slug = (appName ?? "buoy").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
|
|
130
|
+
return {
|
|
131
|
+
deviceName: `${appName ?? "Buoy Device"} (${Platform.OS})`,
|
|
132
|
+
deviceId: `${slug || "buoy"}-${Platform.OS}`
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export function AutoExternalSync({
|
|
136
|
+
options,
|
|
137
|
+
requiredEnvVars
|
|
138
|
+
}) {
|
|
139
|
+
const {
|
|
140
|
+
useExternalSyncSocket,
|
|
141
|
+
useExternalSync
|
|
142
|
+
} = externalSyncModule;
|
|
143
|
+
|
|
144
|
+
// Context-based query adapter; null when there is no QueryClientProvider
|
|
145
|
+
// above FloatingDevTools (or the installed @buoy-gg/react-query predates
|
|
146
|
+
// the hook).
|
|
147
|
+
const queryAdapter = reactQueryModule?.useReactQuerySyncAdapter ? reactQueryModule.useReactQuerySyncAdapter() : null;
|
|
148
|
+
const identity = useMemo(defaultIdentity, []);
|
|
149
|
+
const deviceId = options?.deviceId ?? identity.deviceId;
|
|
150
|
+
const {
|
|
151
|
+
socket
|
|
152
|
+
} = useExternalSyncSocket({
|
|
153
|
+
deviceName: options?.deviceName ?? identity.deviceName,
|
|
154
|
+
socketURL: options?.socketURL ?? "http://localhost:42831",
|
|
155
|
+
persistentDeviceId: deviceId,
|
|
156
|
+
platform: Platform.OS,
|
|
157
|
+
enableLogs: options?.enableLogs
|
|
158
|
+
});
|
|
159
|
+
const tools = useMemo(() => {
|
|
160
|
+
const map = {};
|
|
161
|
+
if (storageModule?.storageSyncAdapter) {
|
|
162
|
+
map.storage = storageModule.storageSyncAdapter;
|
|
163
|
+
}
|
|
164
|
+
if (networkModule?.networkSyncAdapter) {
|
|
165
|
+
map.network = networkModule.networkSyncAdapter;
|
|
166
|
+
}
|
|
167
|
+
if (queryAdapter) {
|
|
168
|
+
map.query = queryAdapter;
|
|
169
|
+
}
|
|
170
|
+
if (routeEventsModule?.routeEventsSyncAdapter) {
|
|
171
|
+
map["route-events"] = routeEventsModule.routeEventsSyncAdapter;
|
|
172
|
+
}
|
|
173
|
+
if (reduxModule?.reduxSyncAdapter) {
|
|
174
|
+
map.redux = reduxModule.reduxSyncAdapter;
|
|
175
|
+
}
|
|
176
|
+
if (zustandModule?.zustandSyncAdapter) {
|
|
177
|
+
map.zustand = zustandModule.zustandSyncAdapter;
|
|
178
|
+
}
|
|
179
|
+
if (jotaiModule?.jotaiSyncAdapter) {
|
|
180
|
+
map.jotai = jotaiModule.jotaiSyncAdapter;
|
|
181
|
+
}
|
|
182
|
+
if (eventsModule?.eventsSyncAdapter) {
|
|
183
|
+
map.events = eventsModule.eventsSyncAdapter;
|
|
184
|
+
}
|
|
185
|
+
if (envModule?.createEnvSyncAdapter) {
|
|
186
|
+
map.env = envModule.createEnvSyncAdapter(requiredEnvVars ?? []);
|
|
187
|
+
}
|
|
188
|
+
if (highlightUpdatesModule?.highlightUpdatesSyncAdapter) {
|
|
189
|
+
map["highlight-updates"] = highlightUpdatesModule.highlightUpdatesSyncAdapter;
|
|
190
|
+
}
|
|
191
|
+
if (debugBordersModule?.debugBordersSyncAdapter) {
|
|
192
|
+
map["debug-borders"] = debugBordersModule.debugBordersSyncAdapter;
|
|
193
|
+
}
|
|
194
|
+
if (impersonateModule?.impersonateSyncAdapter) {
|
|
195
|
+
map.impersonate = impersonateModule.impersonateSyncAdapter;
|
|
196
|
+
}
|
|
197
|
+
if (perfMonitorModule?.perfMonitorSyncAdapter) {
|
|
198
|
+
map["perf-monitor"] = perfMonitorModule.perfMonitorSyncAdapter;
|
|
199
|
+
}
|
|
200
|
+
return map;
|
|
201
|
+
}, [queryAdapter, requiredEnvVars]);
|
|
202
|
+
useExternalSync({
|
|
203
|
+
tools,
|
|
204
|
+
socket,
|
|
205
|
+
deviceId,
|
|
206
|
+
enableLogs: options?.enableLogs
|
|
207
|
+
});
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { Pressable, StyleSheet, View, useWindowDimensions, Text, Animated, Easing } from "react-native";
|
|
5
|
+
import { absoluteFill } from "@buoy-gg/shared-ui";
|
|
5
6
|
// Icons are provided by installedApps; no direct icon imports here.
|
|
6
7
|
import { DialIcon } from "./DialIcon.js";
|
|
7
8
|
import { DialPagination } from "./DialPagination.js";
|
|
@@ -501,7 +502,7 @@ export const DialDevTools = ({
|
|
|
501
502
|
children: [/*#__PURE__*/_jsx(Animated.View, {
|
|
502
503
|
style: [styles.backdrop, backdropAnimatedStyle],
|
|
503
504
|
children: /*#__PURE__*/_jsx(Pressable, {
|
|
504
|
-
style:
|
|
505
|
+
style: absoluteFill,
|
|
505
506
|
onPress: handleClose
|
|
506
507
|
})
|
|
507
508
|
}), /*#__PURE__*/_jsxs(Animated.View, {
|
|
@@ -649,11 +650,11 @@ export const DialDevTools = ({
|
|
|
649
650
|
};
|
|
650
651
|
const styles = StyleSheet.create({
|
|
651
652
|
container: {
|
|
652
|
-
...
|
|
653
|
+
...absoluteFill,
|
|
653
654
|
zIndex: 9999
|
|
654
655
|
},
|
|
655
656
|
backdrop: {
|
|
656
|
-
...
|
|
657
|
+
...absoluteFill,
|
|
657
658
|
backgroundColor: dialColors.dialBackdrop
|
|
658
659
|
},
|
|
659
660
|
// width/height/borderRadius for the circle pieces come from sizeStyles —
|
|
@@ -684,26 +685,26 @@ const styles = StyleSheet.create({
|
|
|
684
685
|
overflow: "hidden"
|
|
685
686
|
},
|
|
686
687
|
gradientLayer1: {
|
|
687
|
-
...
|
|
688
|
+
...absoluteFill,
|
|
688
689
|
backgroundColor: dialColors.dialGradient1,
|
|
689
690
|
opacity: 0.6
|
|
690
691
|
},
|
|
691
692
|
gradientLayer2: {
|
|
692
|
-
...
|
|
693
|
+
...absoluteFill,
|
|
693
694
|
backgroundColor: dialColors.dialGradient2,
|
|
694
695
|
opacity: 0.4,
|
|
695
696
|
top: "30%",
|
|
696
697
|
left: "30%"
|
|
697
698
|
},
|
|
698
699
|
gradientLayer3: {
|
|
699
|
-
...
|
|
700
|
+
...absoluteFill,
|
|
700
701
|
backgroundColor: dialColors.dialGradient3,
|
|
701
702
|
opacity: 0.3,
|
|
702
703
|
top: "50%",
|
|
703
704
|
left: "50%"
|
|
704
705
|
},
|
|
705
706
|
gridPattern: {
|
|
706
|
-
...
|
|
707
|
+
...absoluteFill,
|
|
707
708
|
alignItems: "center",
|
|
708
709
|
justifyContent: "center"
|
|
709
710
|
},
|
|
@@ -734,13 +735,13 @@ const styles = StyleSheet.create({
|
|
|
734
735
|
overflow: "hidden"
|
|
735
736
|
},
|
|
736
737
|
buttonGradientLayer1: {
|
|
737
|
-
...
|
|
738
|
+
...absoluteFill,
|
|
738
739
|
backgroundColor: dialColors.dialGradient1,
|
|
739
740
|
opacity: 0.5,
|
|
740
741
|
borderRadius: BUTTON_SIZE
|
|
741
742
|
},
|
|
742
743
|
buttonGradientLayer2: {
|
|
743
|
-
...
|
|
744
|
+
...absoluteFill,
|
|
744
745
|
backgroundColor: dialColors.dialGradient2,
|
|
745
746
|
opacity: 0.3,
|
|
746
747
|
top: "20%",
|
|
@@ -748,7 +749,7 @@ const styles = StyleSheet.create({
|
|
|
748
749
|
borderRadius: BUTTON_SIZE
|
|
749
750
|
},
|
|
750
751
|
buttonGradientLayer3: {
|
|
751
|
-
...
|
|
752
|
+
...absoluteFill,
|
|
752
753
|
backgroundColor: dialColors.dialGradient3,
|
|
753
754
|
opacity: 0.2,
|
|
754
755
|
top: "40%",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
import { Animated, Pressable, StyleSheet, Text, View, Easing } from "react-native";
|
|
5
|
+
import { absoluteFill } from "@buoy-gg/shared-ui";
|
|
5
6
|
import { dialColors, buoyColors } from "@buoy-gg/shared-ui";
|
|
6
7
|
import { calculateTooltipPosition, ARROW_BOTTOM_OFFSET, ARROW_HEIGHT } from "./onboardingConstants.js";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -128,7 +129,7 @@ export const OnboardingTooltip = ({
|
|
|
128
129
|
};
|
|
129
130
|
const styles = StyleSheet.create({
|
|
130
131
|
container: {
|
|
131
|
-
...
|
|
132
|
+
...absoluteFill,
|
|
132
133
|
alignItems: "center",
|
|
133
134
|
justifyContent: "center",
|
|
134
135
|
pointerEvents: "box-none"
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { type FloatingMenuProps } from "./FloatingMenu";
|
|
3
3
|
import type { InstalledApp } from "./types";
|
|
4
4
|
import { type DefaultFloatingConfig, type DefaultDialConfig } from "./defaultConfig";
|
|
5
|
+
import { type ExternalSyncOptions } from "./autoExternalSync";
|
|
5
6
|
/**
|
|
6
7
|
* Environment variable configuration
|
|
7
8
|
*
|
|
@@ -229,6 +230,23 @@ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
|
|
|
229
230
|
* ```
|
|
230
231
|
*/
|
|
231
232
|
zustandStores?: Record<string, any>;
|
|
233
|
+
/**
|
|
234
|
+
* Zero-config sync to the Buoy Desktop dashboard.
|
|
235
|
+
*
|
|
236
|
+
* Enabled by default in dev builds whenever @buoy-gg/external-sync is
|
|
237
|
+
* installed: connects to the desktop broker (localhost:42831 — a silent
|
|
238
|
+
* no-op when the desktop app isn't running) and registers a sync adapter
|
|
239
|
+
* for every installed tool automatically. Nothing else to render.
|
|
240
|
+
*
|
|
241
|
+
* Pass `false` to disable, or options to customize the device identity /
|
|
242
|
+
* broker URL:
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```tsx
|
|
246
|
+
* <FloatingDevTools externalSync={{ deviceName: "My App (ios)" }} />
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
externalSync?: boolean | ExternalSyncOptions;
|
|
232
250
|
}
|
|
233
251
|
/**
|
|
234
252
|
* Unified floating development tools component with automatic preset discovery.
|
|
@@ -284,5 +302,5 @@ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
|
|
|
284
302
|
*
|
|
285
303
|
* @param props - FloatingDevTools props
|
|
286
304
|
*/
|
|
287
|
-
export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, children, disableHints, defaultFloatingTools, defaultDialTools, requireLicense, licenseKey: licenseKeyProp, zustandStores, environment, ...props }: FloatingDevToolsProps) => React.JSX.Element | null;
|
|
305
|
+
export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, children, disableHints, defaultFloatingTools, defaultDialTools, requireLicense, licenseKey: licenseKeyProp, zustandStores, environment, externalSync, ...props }: FloatingDevToolsProps) => React.JSX.Element | null;
|
|
288
306
|
//# sourceMappingURL=FloatingDevTools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingDevTools.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"FloatingDevTools.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN;IACE,GAAG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OAaG;IACH,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,oBAAoB,EAAE,WAAW,KAAK,IAAI,CAAC;IAEtF;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEpC;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,mBAAmB,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,gBAAgB,GAAI,gNAc9B,qBAAqB,6BAqPvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingMenu.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingMenu.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FloatingMenu.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingMenu.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AASrF,OAAO,EAAiB,QAAQ,EAAc,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AActD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,sFAAsF;IACtF,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;IAC7C,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,WAAW,EAAE,CAAC;IACtC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1D;AAWD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAwU9C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { EnvVarConfig } from "./FloatingDevTools";
|
|
2
|
+
/** Whether zero-config sync can run (the external-sync package is installed). */
|
|
3
|
+
export declare function isExternalSyncAvailable(): boolean;
|
|
4
|
+
export interface ExternalSyncOptions {
|
|
5
|
+
/** Broker URL. @default "http://localhost:42831" (the Buoy Desktop app) */
|
|
6
|
+
socketURL?: string;
|
|
7
|
+
/** Shown in the desktop device list. @default "<app name> (<platform>)" */
|
|
8
|
+
deviceName?: string;
|
|
9
|
+
/** Stable device identity across restarts. @default "<app-slug>-<platform>" */
|
|
10
|
+
deviceId?: string;
|
|
11
|
+
/** @default false */
|
|
12
|
+
enableLogs?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface AutoExternalSyncProps {
|
|
15
|
+
options?: ExternalSyncOptions;
|
|
16
|
+
/** FloatingDevTools' requiredEnvVars — reused for the env tool's adapter. */
|
|
17
|
+
requiredEnvVars?: EnvVarConfig[];
|
|
18
|
+
}
|
|
19
|
+
export declare function AutoExternalSync({ options, requiredEnvVars, }: AutoExternalSyncProps): null;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=autoExternalSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoExternalSync.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/autoExternalSync.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAwGvD,iFAAiF;AACjF,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED,MAAM,WAAW,mBAAmB;IAClC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAuBD,UAAU,qBAAqB;IAC7B,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,6EAA6E;IAC7E,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,eAAe,GAChB,EAAE,qBAAqB,QA4EvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialDevTools.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/DialDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,SAAS,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DialDevTools.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/DialDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,SAAS,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA+B5E,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAoBlB,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;QAAC,OAAO,CAAC,EAAE,mBAAmB,CAAA;KAAE,KAAK,SAAS,CAAC;IAC/H,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAWF,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA4nB9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingTooltip.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/OnboardingTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OnboardingTooltip.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/OnboardingTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;AAa9C,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAiJxD,CAAC"}
|
|
@@ -2,6 +2,7 @@ export { Buoy, default as BuoyDefault } from "./Buoy";
|
|
|
2
2
|
export type { BuoyConfig } from "./Buoy";
|
|
3
3
|
export { FloatingDevTools } from "./floatingMenu/FloatingDevTools";
|
|
4
4
|
export type { FloatingDevToolsProps, EnvVarConfig, StorageKeyConfig, } from "./floatingMenu/FloatingDevTools";
|
|
5
|
+
export type { ExternalSyncOptions } from "./floatingMenu/autoExternalSync";
|
|
5
6
|
export { autoDiscoverPresets, autoDiscoverPresetsWithCustom, } from "./floatingMenu/autoDiscoverPresets";
|
|
6
7
|
export { createDefaultConfig, validateDialConfig, isFloatingToolId, isDialToolId, MAX_DIAL_TOOLS, } from "./floatingMenu/defaultConfig";
|
|
7
8
|
export type { BuiltInToolId, FloatingToolId, FloatingOnlyToolId, DialToolId, DefaultFloatingConfig, DefaultDialConfig, } from "./floatingMenu/defaultConfig";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGzC,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YAAY,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { type FloatingMenuProps } from "./FloatingMenu";
|
|
3
3
|
import type { InstalledApp } from "./types";
|
|
4
4
|
import { type DefaultFloatingConfig, type DefaultDialConfig } from "./defaultConfig";
|
|
5
|
+
import { type ExternalSyncOptions } from "./autoExternalSync";
|
|
5
6
|
/**
|
|
6
7
|
* Environment variable configuration
|
|
7
8
|
*
|
|
@@ -229,6 +230,23 @@ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
|
|
|
229
230
|
* ```
|
|
230
231
|
*/
|
|
231
232
|
zustandStores?: Record<string, any>;
|
|
233
|
+
/**
|
|
234
|
+
* Zero-config sync to the Buoy Desktop dashboard.
|
|
235
|
+
*
|
|
236
|
+
* Enabled by default in dev builds whenever @buoy-gg/external-sync is
|
|
237
|
+
* installed: connects to the desktop broker (localhost:42831 — a silent
|
|
238
|
+
* no-op when the desktop app isn't running) and registers a sync adapter
|
|
239
|
+
* for every installed tool automatically. Nothing else to render.
|
|
240
|
+
*
|
|
241
|
+
* Pass `false` to disable, or options to customize the device identity /
|
|
242
|
+
* broker URL:
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```tsx
|
|
246
|
+
* <FloatingDevTools externalSync={{ deviceName: "My App (ios)" }} />
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
externalSync?: boolean | ExternalSyncOptions;
|
|
232
250
|
}
|
|
233
251
|
/**
|
|
234
252
|
* Unified floating development tools component with automatic preset discovery.
|
|
@@ -284,5 +302,5 @@ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
|
|
|
284
302
|
*
|
|
285
303
|
* @param props - FloatingDevTools props
|
|
286
304
|
*/
|
|
287
|
-
export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, children, disableHints, defaultFloatingTools, defaultDialTools, requireLicense, licenseKey: licenseKeyProp, zustandStores, environment, ...props }: FloatingDevToolsProps) => React.JSX.Element | null;
|
|
305
|
+
export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, children, disableHints, defaultFloatingTools, defaultDialTools, requireLicense, licenseKey: licenseKeyProp, zustandStores, environment, externalSync, ...props }: FloatingDevToolsProps) => React.JSX.Element | null;
|
|
288
306
|
//# sourceMappingURL=FloatingDevTools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingDevTools.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"FloatingDevTools.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EA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WAAW,KAAK,IAAI,CAAC;IAEtF;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEpC;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,mBAAmB,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,gBAAgB,GAAI,gNAc9B,qBAAqB,6BAqPvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingMenu.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingMenu.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FloatingMenu.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingMenu.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AASrF,OAAO,EAAiB,QAAQ,EAAc,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AActD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,sFAAsF;IACtF,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;IAC7C,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,WAAW,EAAE,CAAC;IACtC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1D;AAWD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAwU9C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { EnvVarConfig } from "./FloatingDevTools";
|
|
2
|
+
/** Whether zero-config sync can run (the external-sync package is installed). */
|
|
3
|
+
export declare function isExternalSyncAvailable(): boolean;
|
|
4
|
+
export interface ExternalSyncOptions {
|
|
5
|
+
/** Broker URL. @default "http://localhost:42831" (the Buoy Desktop app) */
|
|
6
|
+
socketURL?: string;
|
|
7
|
+
/** Shown in the desktop device list. @default "<app name> (<platform>)" */
|
|
8
|
+
deviceName?: string;
|
|
9
|
+
/** Stable device identity across restarts. @default "<app-slug>-<platform>" */
|
|
10
|
+
deviceId?: string;
|
|
11
|
+
/** @default false */
|
|
12
|
+
enableLogs?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface AutoExternalSyncProps {
|
|
15
|
+
options?: ExternalSyncOptions;
|
|
16
|
+
/** FloatingDevTools' requiredEnvVars — reused for the env tool's adapter. */
|
|
17
|
+
requiredEnvVars?: EnvVarConfig[];
|
|
18
|
+
}
|
|
19
|
+
export declare function AutoExternalSync({ options, requiredEnvVars, }: AutoExternalSyncProps): null;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=autoExternalSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoExternalSync.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/autoExternalSync.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAwGvD,iFAAiF;AACjF,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED,MAAM,WAAW,mBAAmB;IAClC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAuBD,UAAU,qBAAqB;IAC7B,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,6EAA6E;IAC7E,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,eAAe,GAChB,EAAE,qBAAqB,QA4EvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialDevTools.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/DialDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,SAAS,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DialDevTools.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/DialDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,SAAS,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA+B5E,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAoBlB,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;QAAC,OAAO,CAAC,EAAE,mBAAmB,CAAA;KAAE,KAAK,SAAS,CAAC;IAC/H,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAWF,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA4nB9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingTooltip.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/OnboardingTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OnboardingTooltip.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/OnboardingTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;AAa9C,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAiJxD,CAAC"}
|
|
@@ -2,6 +2,7 @@ export { Buoy, default as BuoyDefault } from "./Buoy";
|
|
|
2
2
|
export type { BuoyConfig } from "./Buoy";
|
|
3
3
|
export { FloatingDevTools } from "./floatingMenu/FloatingDevTools";
|
|
4
4
|
export type { FloatingDevToolsProps, EnvVarConfig, StorageKeyConfig, } from "./floatingMenu/FloatingDevTools";
|
|
5
|
+
export type { ExternalSyncOptions } from "./floatingMenu/autoExternalSync";
|
|
5
6
|
export { autoDiscoverPresets, autoDiscoverPresetsWithCustom, } from "./floatingMenu/autoDiscoverPresets";
|
|
6
7
|
export { createDefaultConfig, validateDialConfig, isFloatingToolId, isDialToolId, MAX_DIAL_TOOLS, } from "./floatingMenu/defaultConfig";
|
|
7
8
|
export type { BuiltInToolId, FloatingToolId, FloatingOnlyToolId, DialToolId, DefaultFloatingConfig, DefaultDialConfig, } from "./floatingMenu/defaultConfig";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,qBAAq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AC3B,MAAM,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Floating dev tools launcher and AppHost",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
],
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@buoy-gg/shared-ui": "3.0.
|
|
26
|
-
"@buoy-gg/
|
|
27
|
-
"@buoy-gg/
|
|
28
|
-
"@buoy-gg/floating-tools-
|
|
25
|
+
"@buoy-gg/shared-ui": "3.0.2",
|
|
26
|
+
"@buoy-gg/floating-tools-react": "3.0.2",
|
|
27
|
+
"@buoy-gg/license": "3.0.2",
|
|
28
|
+
"@buoy-gg/floating-tools-core": "3.0.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "*",
|