@buoy-gg/core 7.0.40 → 7.0.42
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/README.md +14 -85
- package/bin/buoy.js +20 -347
- package/lib/commonjs/Buoy.js +1 -107
- package/lib/commonjs/browserRegister.js +1 -0
- package/lib/commonjs/browserRegister.server.js +1 -0
- package/lib/commonjs/earlyHookScript.js +1 -0
- package/lib/commonjs/earlyNetwork.js +1 -0
- package/lib/commonjs/floatingMenu/AppHost.js +1 -460
- package/lib/commonjs/floatingMenu/AppHost.web.js +1 -364
- package/lib/commonjs/floatingMenu/AppHostLogic.js +1 -50
- package/lib/commonjs/floatingMenu/AppIcon.js +1 -91
- package/lib/commonjs/floatingMenu/AppIcon.web.js +1 -53
- package/lib/commonjs/floatingMenu/BrowserToolRuntime.js +1 -0
- package/lib/commonjs/floatingMenu/DefaultConfigContext.js +1 -45
- package/lib/commonjs/floatingMenu/DevToolsSettingsModal.js +1 -1119
- package/lib/commonjs/floatingMenu/DevToolsSettingsModal.shared.js +1 -0
- package/lib/commonjs/floatingMenu/DevToolsSettingsModal.web.js +1 -1048
- package/lib/commonjs/floatingMenu/DevToolsVisibilityContext.js +1 -49
- package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -554
- package/lib/commonjs/floatingMenu/FloatingDevTools.web.js +1 -401
- package/lib/commonjs/floatingMenu/FloatingMenu.js +1 -371
- package/lib/commonjs/floatingMenu/MinimizedToolsContext.js +1 -274
- package/lib/commonjs/floatingMenu/MinimizedToolsStack.js +1 -288
- package/lib/commonjs/floatingMenu/MinimizedToolsStack.web.js +1 -371
- package/lib/commonjs/floatingMenu/ToggleStateManager.js +1 -36
- package/lib/commonjs/floatingMenu/ToolHost.js +1 -281
- package/lib/commonjs/floatingMenu/ToolOpenerBridge.js +1 -41
- package/lib/commonjs/floatingMenu/autoDiscoverPresets.js +1 -461
- package/lib/commonjs/floatingMenu/autoExternalSync.js +1 -434
- package/lib/commonjs/floatingMenu/defaultConfig.js +1 -167
- package/lib/commonjs/floatingMenu/deviceIdentity.js +1 -173
- package/lib/commonjs/floatingMenu/dial/DialDevTools.js +1 -904
- package/lib/commonjs/floatingMenu/dial/DialDevTools.web.js +1 -821
- package/lib/commonjs/floatingMenu/dial/DialHyperspace.js +1 -177
- package/lib/commonjs/floatingMenu/dial/DialIcon.js +1 -302
- package/lib/commonjs/floatingMenu/dial/DialPagination.js +1 -165
- package/lib/commonjs/floatingMenu/dial/DialSnow.js +1 -92
- package/lib/commonjs/floatingMenu/dial/OnboardingTooltip.js +1 -246
- package/lib/commonjs/floatingMenu/dial/OnboardingTooltip.web.js +2 -147
- package/lib/commonjs/floatingMenu/dial/dialUsageStore.js +1 -93
- package/lib/commonjs/floatingMenu/dial/onboardingConstants.js +1 -42
- package/lib/commonjs/floatingMenu/dial/onboardingConstants.web.js +1 -42
- package/lib/commonjs/floatingMenu/externalSyncGate.js +1 -49
- package/lib/commonjs/floatingMenu/floatingTools.js +1 -42
- package/lib/commonjs/floatingMenu/floatingTools.web.js +1 -30
- package/lib/commonjs/floatingMenu/optionalRequire.js +1 -37
- package/lib/commonjs/floatingMenu/settingsBus.js +1 -23
- package/lib/commonjs/floatingMenu/sync/appSyncAdapter.js +1 -115
- package/lib/commonjs/floatingMenu/types.js +1 -5
- package/lib/commonjs/floatingMenu/useDesktopSyncStatus.js +1 -28
- package/lib/commonjs/floatingMenu/useDesktopSyncStatus.web.js +1 -0
- package/lib/commonjs/index.js +1 -291
- package/lib/commonjs/index.web.js +1 -150
- package/lib/commonjs/reactDevtoolsTypes.js +1 -0
- package/lib/commonjs/releaseOptIn.js +1 -0
- package/lib/commonjs/telemetry/installPing.js +1 -131
- package/lib/commonjs/toolkit.js +1 -584
- package/lib/commonjs/toolkitComponents.js +1 -241
- package/lib/commonjs/utils/autoDiscoverPresets.web.js +1 -219
- package/lib/commonjs/utils/createWebTool.js +1 -0
- package/lib/commonjs/utils/createWebTools.js +1 -0
- package/lib/commonjs/version.js +1 -18
- package/lib/module/Buoy.js +1 -102
- package/lib/module/browserRegister.js +1 -0
- package/lib/module/browserRegister.server.js +1 -0
- package/lib/module/earlyHookScript.js +1 -0
- package/lib/module/earlyNetwork.js +1 -0
- package/lib/module/floatingMenu/AppHost.js +1 -452
- package/lib/module/floatingMenu/AppHost.web.js +1 -356
- package/lib/module/floatingMenu/AppHostLogic.js +1 -45
- package/lib/module/floatingMenu/AppIcon.js +1 -84
- package/lib/module/floatingMenu/AppIcon.web.js +1 -47
- package/lib/module/floatingMenu/BrowserToolRuntime.js +1 -0
- package/lib/module/floatingMenu/DefaultConfigContext.js +1 -39
- package/lib/module/floatingMenu/DevToolsSettingsModal.js +1 -1115
- package/lib/module/floatingMenu/DevToolsSettingsModal.shared.js +1 -0
- package/lib/module/floatingMenu/DevToolsSettingsModal.web.js +1 -1055
- package/lib/module/floatingMenu/DevToolsVisibilityContext.js +1 -44
- package/lib/module/floatingMenu/FloatingDevTools.js +1 -551
- package/lib/module/floatingMenu/FloatingDevTools.web.js +1 -399
- package/lib/module/floatingMenu/FloatingMenu.js +1 -366
- package/lib/module/floatingMenu/MinimizedToolsContext.js +1 -266
- package/lib/module/floatingMenu/MinimizedToolsStack.js +1 -285
- package/lib/module/floatingMenu/MinimizedToolsStack.web.js +1 -368
- package/lib/module/floatingMenu/ToggleStateManager.js +1 -32
- package/lib/module/floatingMenu/ToolHost.js +1 -273
- package/lib/module/floatingMenu/ToolOpenerBridge.js +1 -37
- package/lib/module/floatingMenu/autoDiscoverPresets.js +1 -457
- package/lib/module/floatingMenu/autoExternalSync.js +1 -427
- package/lib/module/floatingMenu/defaultConfig.js +1 -158
- package/lib/module/floatingMenu/deviceIdentity.js +1 -163
- package/lib/module/floatingMenu/dial/DialDevTools.js +1 -900
- package/lib/module/floatingMenu/dial/DialDevTools.web.js +1 -818
- package/lib/module/floatingMenu/dial/DialHyperspace.js +1 -173
- package/lib/module/floatingMenu/dial/DialIcon.js +1 -299
- package/lib/module/floatingMenu/dial/DialPagination.js +1 -160
- package/lib/module/floatingMenu/dial/DialSnow.js +1 -90
- package/lib/module/floatingMenu/dial/OnboardingTooltip.js +1 -240
- package/lib/module/floatingMenu/dial/OnboardingTooltip.web.js +2 -142
- package/lib/module/floatingMenu/dial/dialUsageStore.js +1 -85
- package/lib/module/floatingMenu/dial/onboardingConstants.js +1 -3
- package/lib/module/floatingMenu/dial/onboardingConstants.web.js +1 -3
- package/lib/module/floatingMenu/externalSyncGate.js +1 -44
- package/lib/module/floatingMenu/floatingTools.js +1 -27
- package/lib/module/floatingMenu/floatingTools.web.js +1 -3
- package/lib/module/floatingMenu/optionalRequire.js +1 -33
- package/lib/module/floatingMenu/settingsBus.js +1 -19
- package/lib/module/floatingMenu/sync/appSyncAdapter.js +1 -112
- package/lib/module/floatingMenu/types.js +1 -3
- package/lib/module/floatingMenu/useDesktopSyncStatus.js +1 -25
- package/lib/module/floatingMenu/useDesktopSyncStatus.web.js +1 -0
- package/lib/module/index.js +1 -41
- package/lib/module/index.web.js +1 -29
- package/lib/module/reactDevtoolsTypes.js +1 -0
- package/lib/module/releaseOptIn.js +1 -0
- package/lib/module/telemetry/installPing.js +1 -127
- package/lib/module/toolkit.js +1 -62
- package/lib/module/toolkitComponents.js +1 -230
- package/lib/module/utils/autoDiscoverPresets.web.js +1 -213
- package/lib/module/utils/createWebTool.js +1 -0
- package/lib/module/utils/createWebTools.js +1 -0
- package/lib/module/version.js +1 -14
- package/lib/typescript/commonjs/browserRegister.d.ts +13 -0
- package/lib/typescript/commonjs/browserRegister.server.d.ts +6 -0
- package/lib/typescript/commonjs/earlyHookScript.d.ts +12 -0
- package/lib/typescript/commonjs/earlyNetwork.d.ts +52 -0
- package/lib/typescript/commonjs/floatingMenu/AppHost.web.d.ts +3 -3
- package/lib/typescript/commonjs/floatingMenu/BrowserToolRuntime.d.ts +14 -0
- package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts +2 -67
- package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.shared.d.ts +71 -0
- package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.web.d.ts +3 -16
- package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.web.d.ts +12 -6
- package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts +1 -1
- package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts +1 -9
- package/lib/typescript/commonjs/floatingMenu/useDesktopSyncStatus.web.d.ts +3 -0
- package/lib/typescript/commonjs/index.web.d.ts +7 -0
- package/lib/typescript/commonjs/reactDevtoolsTypes.d.ts +8 -0
- package/lib/typescript/commonjs/releaseOptIn.d.ts +4 -0
- package/lib/typescript/commonjs/utils/autoDiscoverPresets.web.d.ts +3 -40
- package/lib/typescript/commonjs/utils/createWebTool.d.ts +6 -0
- package/lib/typescript/commonjs/utils/createWebTools.d.ts +4 -0
- package/lib/typescript/commonjs/version.d.ts +1 -1
- package/lib/typescript/module/browserRegister.d.ts +13 -0
- package/lib/typescript/module/browserRegister.server.d.ts +6 -0
- package/lib/typescript/module/earlyHookScript.d.ts +12 -0
- package/lib/typescript/module/earlyNetwork.d.ts +52 -0
- package/lib/typescript/module/floatingMenu/AppHost.web.d.ts +3 -3
- package/lib/typescript/module/floatingMenu/BrowserToolRuntime.d.ts +14 -0
- package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts +2 -67
- package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.shared.d.ts +71 -0
- package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.web.d.ts +3 -16
- package/lib/typescript/module/floatingMenu/FloatingDevTools.web.d.ts +12 -6
- package/lib/typescript/module/floatingMenu/defaultConfig.d.ts +1 -1
- package/lib/typescript/module/floatingMenu/settingsBus.d.ts +1 -9
- package/lib/typescript/module/floatingMenu/useDesktopSyncStatus.web.d.ts +3 -0
- package/lib/typescript/module/index.web.d.ts +7 -0
- package/lib/typescript/module/reactDevtoolsTypes.d.ts +8 -0
- package/lib/typescript/module/releaseOptIn.d.ts +4 -0
- package/lib/typescript/module/utils/autoDiscoverPresets.web.d.ts +3 -40
- package/lib/typescript/module/utils/createWebTool.d.ts +6 -0
- package/lib/typescript/module/utils/createWebTools.d.ts +4 -0
- package/lib/typescript/module/version.d.ts +1 -1
- package/lib/web/chunks/chunk-5SGL6QL4.mjs +1 -0
- package/lib/web/chunks/chunk-FROELTJH.mjs +1 -0
- package/lib/web/chunks/chunk-QZDVCMCT.mjs +1 -0
- package/lib/web/chunks/chunk-R7RGRTY5.mjs +1 -0
- package/lib/web/index.mjs +10 -0
- package/lib/web/register-server.mjs +1 -0
- package/lib/web/register.mjs +1 -0
- package/lib/web/toolkit.mjs +1 -0
- package/package.json +50 -12
- package/lib/typescript/commonjs/Buoy.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/AppHost.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/AppHost.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/AppHostLogic.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/AppIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/AppIcon.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/DefaultConfigContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/DevToolsVisibilityContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/MinimizedToolsContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/ToggleStateManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/ToolHost.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/ToolOpenerBridge.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/autoDiscoverPresets.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/deviceIdentity.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/DialHyperspace.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/DialIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/DialPagination.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/DialSnow.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/dialUsageStore.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/externalSyncGate.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/floatingTools.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/floatingTools.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/optionalRequire.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/sync/appSyncAdapter.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/floatingMenu/useDesktopSyncStatus.d.ts.map +0 -1
- package/lib/typescript/commonjs/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/index.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/telemetry/installPing.d.ts.map +0 -1
- package/lib/typescript/commonjs/toolkit.d.ts.map +0 -1
- package/lib/typescript/commonjs/toolkitComponents.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/autoDiscoverPresets.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/version.d.ts.map +0 -1
- package/lib/typescript/module/Buoy.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/AppHost.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/AppHost.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/AppHostLogic.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/AppIcon.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/AppIcon.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/DefaultConfigContext.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/DevToolsVisibilityContext.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/FloatingDevTools.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/MinimizedToolsContext.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/MinimizedToolsStack.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/MinimizedToolsStack.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/ToggleStateManager.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/ToolHost.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/ToolOpenerBridge.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/autoDiscoverPresets.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/defaultConfig.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/deviceIdentity.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/DialDevTools.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/DialHyperspace.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/DialIcon.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/DialPagination.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/DialSnow.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/dialUsageStore.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/onboardingConstants.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/dial/onboardingConstants.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/externalSyncGate.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/floatingTools.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/floatingTools.web.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/optionalRequire.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/settingsBus.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/sync/appSyncAdapter.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/types.d.ts.map +0 -1
- package/lib/typescript/module/floatingMenu/useDesktopSyncStatus.d.ts.map +0 -1
- package/lib/typescript/module/index.d.ts.map +0 -1
- package/lib/typescript/module/index.web.d.ts.map +0 -1
- package/lib/typescript/module/telemetry/installPing.d.ts.map +0 -1
- package/lib/typescript/module/toolkit.d.ts.map +0 -1
- package/lib/typescript/module/toolkitComponents.d.ts.map +0 -1
- package/lib/typescript/module/utils/autoDiscoverPresets.web.d.ts.map +0 -1
- package/lib/typescript/module/version.d.ts.map +0 -1
|
@@ -1,230 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Facade primitives for the public custom-tools toolkit (see toolkit.ts).
|
|
5
|
-
*
|
|
6
|
-
* shared-ui grew several overlapping treatments of the same jobs (seven badge
|
|
7
|
-
* variants, four copy buttons, two diff viewers...). The public surface merges
|
|
8
|
-
* each job into ONE component with variants, implemented here on toolTheme —
|
|
9
|
-
* shared-ui's internals stay unchanged for first-party tools.
|
|
10
|
-
*/
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { StyleSheet, Text, View } from "react-native";
|
|
13
|
-
import { CopyButton, toolTheme } from "@buoy-gg/shared-ui";
|
|
14
|
-
import { TreeDiffViewer, SplitDiffViewer } from "@buoy-gg/shared-ui/dataViewer";
|
|
15
|
-
|
|
16
|
-
// ---------------------------------------------------------------------------
|
|
17
|
-
// Semantic color helpers — pair with <Badge>/<StatusDot> instead of exporting
|
|
18
|
-
// a preset component per domain.
|
|
19
|
-
// ---------------------------------------------------------------------------
|
|
20
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
-
const STATUS_COLORS = {
|
|
22
|
-
success: toolTheme.colors.success,
|
|
23
|
-
active: toolTheme.colors.success,
|
|
24
|
-
connected: toolTheme.colors.success,
|
|
25
|
-
error: toolTheme.colors.error,
|
|
26
|
-
failed: toolTheme.colors.error,
|
|
27
|
-
warning: toolTheme.colors.warning,
|
|
28
|
-
stale: toolTheme.colors.warning,
|
|
29
|
-
pending: toolTheme.colors.info,
|
|
30
|
-
loading: toolTheme.colors.info,
|
|
31
|
-
fetching: toolTheme.colors.info,
|
|
32
|
-
info: toolTheme.colors.info,
|
|
33
|
-
inactive: toolTheme.colors.textMuted,
|
|
34
|
-
idle: toolTheme.colors.textMuted
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/** Map a status word ("success", "pending", "stale"...) to a semantic color. */
|
|
38
|
-
export function statusColor(status) {
|
|
39
|
-
return STATUS_COLORS[status.toLowerCase()] ?? toolTheme.colors.textMuted;
|
|
40
|
-
}
|
|
41
|
-
const METHOD_COLORS = {
|
|
42
|
-
GET: toolTheme.colors.info,
|
|
43
|
-
POST: toolTheme.colors.success,
|
|
44
|
-
PUT: toolTheme.colors.warning,
|
|
45
|
-
PATCH: toolTheme.colors.warning,
|
|
46
|
-
DELETE: toolTheme.colors.error
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/** Map an HTTP method to its conventional color. */
|
|
50
|
-
export function methodColor(method) {
|
|
51
|
-
return METHOD_COLORS[method.toUpperCase()] ?? toolTheme.colors.textSecondary;
|
|
52
|
-
}
|
|
53
|
-
const TYPE_COLORS = {
|
|
54
|
-
string: toolTheme.colors.success,
|
|
55
|
-
number: toolTheme.colors.info,
|
|
56
|
-
boolean: toolTheme.colors.warning,
|
|
57
|
-
object: toolTheme.colors.accent,
|
|
58
|
-
array: toolTheme.colors.accent,
|
|
59
|
-
function: toolTheme.colors.error,
|
|
60
|
-
null: toolTheme.colors.textMuted,
|
|
61
|
-
undefined: toolTheme.colors.textMuted
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/** Map a JS value-type name to its display color. */
|
|
65
|
-
export function typeColor(type) {
|
|
66
|
-
return TYPE_COLORS[type.toLowerCase()] ?? toolTheme.colors.textSecondary;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// ---------------------------------------------------------------------------
|
|
70
|
-
// Badge — the one chip. Color it with statusColor()/methodColor()/typeColor()
|
|
71
|
-
// (or any hex); shape/typography are props, not sibling components.
|
|
72
|
-
// ---------------------------------------------------------------------------
|
|
73
|
-
|
|
74
|
-
export function Badge({
|
|
75
|
-
children,
|
|
76
|
-
color = toolTheme.colors.textSecondary,
|
|
77
|
-
icon,
|
|
78
|
-
size = "small",
|
|
79
|
-
pill = false,
|
|
80
|
-
mono = false,
|
|
81
|
-
style
|
|
82
|
-
}) {
|
|
83
|
-
const isText = typeof children === "string" || typeof children === "number";
|
|
84
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
85
|
-
style: [badgeStyles.base, size === "medium" && badgeStyles.medium, pill && badgeStyles.pill, {
|
|
86
|
-
backgroundColor: color + "1A",
|
|
87
|
-
borderColor: color + "40"
|
|
88
|
-
}, style],
|
|
89
|
-
children: [icon, isText ? /*#__PURE__*/_jsx(Text, {
|
|
90
|
-
style: [badgeStyles.text, size === "medium" && badgeStyles.textMedium, mono && badgeStyles.textMono, {
|
|
91
|
-
color
|
|
92
|
-
}],
|
|
93
|
-
numberOfLines: 1,
|
|
94
|
-
children: children
|
|
95
|
-
}) : children]
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
const badgeStyles = StyleSheet.create({
|
|
99
|
-
base: {
|
|
100
|
-
flexDirection: "row",
|
|
101
|
-
alignItems: "center",
|
|
102
|
-
alignSelf: "flex-start",
|
|
103
|
-
gap: 4,
|
|
104
|
-
borderWidth: 1,
|
|
105
|
-
borderRadius: toolTheme.radius.sm,
|
|
106
|
-
paddingHorizontal: 6,
|
|
107
|
-
paddingVertical: 2
|
|
108
|
-
},
|
|
109
|
-
medium: {
|
|
110
|
-
paddingHorizontal: 8,
|
|
111
|
-
paddingVertical: 3
|
|
112
|
-
},
|
|
113
|
-
pill: {
|
|
114
|
-
borderRadius: toolTheme.radius.pill,
|
|
115
|
-
minWidth: 20,
|
|
116
|
-
justifyContent: "center"
|
|
117
|
-
},
|
|
118
|
-
text: {
|
|
119
|
-
fontSize: 10,
|
|
120
|
-
fontWeight: "600",
|
|
121
|
-
letterSpacing: 0.3
|
|
122
|
-
},
|
|
123
|
-
textMedium: {
|
|
124
|
-
fontSize: 12
|
|
125
|
-
},
|
|
126
|
-
textMono: {
|
|
127
|
-
fontFamily: toolTheme.text.mono.fontFamily
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
// ---------------------------------------------------------------------------
|
|
132
|
-
// StatusDot — the bare status circle (list rows, connection indicators).
|
|
133
|
-
// ---------------------------------------------------------------------------
|
|
134
|
-
|
|
135
|
-
export function StatusDot({
|
|
136
|
-
status,
|
|
137
|
-
color,
|
|
138
|
-
size = 8,
|
|
139
|
-
style
|
|
140
|
-
}) {
|
|
141
|
-
const dotColor = color ?? (status ? statusColor(status) : toolTheme.colors.textMuted);
|
|
142
|
-
return /*#__PURE__*/_jsx(View, {
|
|
143
|
-
style: [{
|
|
144
|
-
width: size,
|
|
145
|
-
height: size,
|
|
146
|
-
borderRadius: size / 2,
|
|
147
|
-
backgroundColor: dotColor
|
|
148
|
-
}, style]
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// ---------------------------------------------------------------------------
|
|
153
|
-
// InfoRow — the label/value line of every detail screen, with optional copy.
|
|
154
|
-
// ---------------------------------------------------------------------------
|
|
155
|
-
|
|
156
|
-
export function InfoRow({
|
|
157
|
-
label,
|
|
158
|
-
value,
|
|
159
|
-
copyable = false,
|
|
160
|
-
style
|
|
161
|
-
}) {
|
|
162
|
-
const isText = typeof value === "string" || typeof value === "number";
|
|
163
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
164
|
-
style: [infoRowStyles.row, style],
|
|
165
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
166
|
-
style: infoRowStyles.label,
|
|
167
|
-
numberOfLines: 1,
|
|
168
|
-
children: label
|
|
169
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
170
|
-
style: infoRowStyles.value,
|
|
171
|
-
children: isText ? /*#__PURE__*/_jsx(Text, {
|
|
172
|
-
style: infoRowStyles.valueText,
|
|
173
|
-
numberOfLines: 2,
|
|
174
|
-
children: String(value)
|
|
175
|
-
}) : value
|
|
176
|
-
}), copyable && value != null && /*#__PURE__*/_jsx(CopyButton, {
|
|
177
|
-
value: value,
|
|
178
|
-
size: 12
|
|
179
|
-
})]
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
const infoRowStyles = StyleSheet.create({
|
|
183
|
-
row: {
|
|
184
|
-
flexDirection: "row",
|
|
185
|
-
alignItems: "center",
|
|
186
|
-
gap: toolTheme.spacing.sm,
|
|
187
|
-
paddingVertical: 3
|
|
188
|
-
},
|
|
189
|
-
label: {
|
|
190
|
-
...toolTheme.text.label,
|
|
191
|
-
color: toolTheme.colors.textMuted,
|
|
192
|
-
minWidth: 72
|
|
193
|
-
},
|
|
194
|
-
value: {
|
|
195
|
-
flex: 1,
|
|
196
|
-
flexDirection: "row",
|
|
197
|
-
alignItems: "center"
|
|
198
|
-
},
|
|
199
|
-
valueText: {
|
|
200
|
-
...toolTheme.text.mono,
|
|
201
|
-
color: toolTheme.colors.text
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
// ---------------------------------------------------------------------------
|
|
206
|
-
// DiffViewer — one before/after component; the rendering strategy is a mode.
|
|
207
|
-
// ---------------------------------------------------------------------------
|
|
208
|
-
|
|
209
|
-
export function DiffViewer({
|
|
210
|
-
oldValue,
|
|
211
|
-
newValue,
|
|
212
|
-
mode = "tree",
|
|
213
|
-
showUnchanged = true,
|
|
214
|
-
scrollEnabled = false,
|
|
215
|
-
height = 220
|
|
216
|
-
}) {
|
|
217
|
-
if (mode === "text") {
|
|
218
|
-
return /*#__PURE__*/_jsx(SplitDiffViewer, {
|
|
219
|
-
oldValue: oldValue,
|
|
220
|
-
newValue: newValue,
|
|
221
|
-
height: height
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
return /*#__PURE__*/_jsx(TreeDiffViewer, {
|
|
225
|
-
oldValue: oldValue,
|
|
226
|
-
newValue: newValue,
|
|
227
|
-
showUnchanged: showUnchanged,
|
|
228
|
-
scrollEnabled: scrollEnabled
|
|
229
|
-
});
|
|
230
|
-
}
|
|
1
|
+
"use strict";import T from"react";import{StyleSheet as f,Text as u,View as c}from"react-native";import{CopyButton as p,toolTheme as e}from"@buoy-gg/shared-ui";import{TreeDiffViewer as y,SplitDiffViewer as b}from"@buoy-gg/shared-ui/dataViewer";import{jsx as s,jsxs as x}from"react/jsx-runtime";const w={success:e.colors.success,active:e.colors.success,connected:e.colors.success,error:e.colors.error,failed:e.colors.error,warning:e.colors.warning,stale:e.colors.warning,pending:e.colors.info,loading:e.colors.info,fetching:e.colors.info,info:e.colors.info,inactive:e.colors.textMuted,idle:e.colors.textMuted};export function statusColor(o){return w[o.toLowerCase()]??e.colors.textMuted}const S={GET:e.colors.info,POST:e.colors.success,PUT:e.colors.warning,PATCH:e.colors.warning,DELETE:e.colors.error};export function methodColor(o){return S[o.toUpperCase()]??e.colors.textSecondary}const h={string:e.colors.success,number:e.colors.info,boolean:e.colors.warning,object:e.colors.accent,array:e.colors.accent,function:e.colors.error,null:e.colors.textMuted,undefined:e.colors.textMuted};export function typeColor(o){return h[o.toLowerCase()]??e.colors.textSecondary}export function Badge({children:o,color:t=e.colors.textSecondary,icon:r,size:n="small",pill:i=false,mono:d=false,style:m}){const g=typeof o==="string"||typeof o==="number";return x(c,{style:[l.base,n==="medium"&&l.medium,i&&l.pill,{backgroundColor:t+"1A",borderColor:t+"40"},m],children:[r,g?s(u,{style:[l.text,n==="medium"&&l.textMedium,d&&l.textMono,{color:t}],numberOfLines:1,children:o}):o]})}const l=f.create({base:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:4,borderWidth:1,borderRadius:e.radius.sm,paddingHorizontal:6,paddingVertical:2},medium:{paddingHorizontal:8,paddingVertical:3},pill:{borderRadius:e.radius.pill,minWidth:20,justifyContent:"center"},text:{fontSize:10,fontWeight:"600",letterSpacing:.3},textMedium:{fontSize:12},textMono:{fontFamily:e.text.mono.fontFamily}});export function StatusDot({status:o,color:t,size:r=8,style:n}){const i=t??(o?statusColor(o):e.colors.textMuted);return s(c,{style:[{width:r,height:r,borderRadius:r/2,backgroundColor:i},n]})}export function InfoRow({label:o,value:t,copyable:r=false,style:n}){const i=typeof t==="string"||typeof t==="number";return x(c,{style:[a.row,n],children:[s(u,{style:a.label,numberOfLines:1,children:o}),s(c,{style:a.value,children:i?s(u,{style:a.valueText,numberOfLines:2,children:String(t)}):t}),r&&t!=null&&s(p,{value:t,size:12})]})}const a=f.create({row:{flexDirection:"row",alignItems:"center",gap:e.spacing.sm,paddingVertical:3},label:{...e.text.label,color:e.colors.textMuted,minWidth:72},value:{flex:1,flexDirection:"row",alignItems:"center"},valueText:{...e.text.mono,color:e.colors.text}});export function DiffViewer({oldValue:o,newValue:t,mode:r="tree",showUnchanged:n=true,scrollEnabled:i=false,height:d=220}){if(r==="text"){return s(b,{oldValue:o,newValue:t,height:d})}return s(y,{oldValue:o,newValue:t,showUnchanged:n,scrollEnabled:i})}
|
|
@@ -1,213 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Auto-discovery utility for React DOM Web.
|
|
5
|
-
*
|
|
6
|
-
* Uses Vite's import.meta.glob to discover installed @buoy-gg/* packages
|
|
7
|
-
* at build time. This provides Metro-like auto-discovery behavior for web.
|
|
8
|
-
*
|
|
9
|
-
* How it works:
|
|
10
|
-
* 1. import.meta.glob scans node_modules at build time
|
|
11
|
-
* 2. Only packages that are actually installed are included
|
|
12
|
-
* 3. Missing packages don't cause errors (like Metro's try-catch)
|
|
13
|
-
* 4. Custom tools can override discovered ones by ID
|
|
14
|
-
*
|
|
15
|
-
* @platform React DOM Web (Vite, CRA, Next.js, Electron)
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { NetworkIcon, EnvIcon, StorageIcon, QueryIcon, RoutesIcon, RendersIcon } from '@buoy-gg/floating-tools-core';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Dashed-square glyph for debug-borders (no BIF brand icon exists for it
|
|
22
|
-
* yet). Plain SVG so it renders identically everywhere — emoji icons are
|
|
23
|
-
* banned here: WKWebView (Capacitor/Tauri) renders them as tofu boxes.
|
|
24
|
-
*/
|
|
25
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
-
function DebugBordersGlyph({
|
|
27
|
-
size
|
|
28
|
-
}) {
|
|
29
|
-
return /*#__PURE__*/_jsxs("svg", {
|
|
30
|
-
width: size,
|
|
31
|
-
height: size,
|
|
32
|
-
viewBox: "0 0 24 24",
|
|
33
|
-
"aria-hidden": "true",
|
|
34
|
-
children: [/*#__PURE__*/_jsx("rect", {
|
|
35
|
-
x: "3",
|
|
36
|
-
y: "3",
|
|
37
|
-
width: "18",
|
|
38
|
-
height: "18",
|
|
39
|
-
rx: "2",
|
|
40
|
-
fill: "none",
|
|
41
|
-
stroke: "#10b981",
|
|
42
|
-
strokeWidth: "2",
|
|
43
|
-
strokeDasharray: "4 3"
|
|
44
|
-
}), /*#__PURE__*/_jsx("rect", {
|
|
45
|
-
x: "8",
|
|
46
|
-
y: "8",
|
|
47
|
-
width: "8",
|
|
48
|
-
height: "8",
|
|
49
|
-
rx: "1",
|
|
50
|
-
fill: "#10b98155"
|
|
51
|
-
})]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// =============================
|
|
56
|
-
// Default Tool Presets (Fallback)
|
|
57
|
-
// =============================
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Default tool presets for when packages don't export web presets yet.
|
|
61
|
-
* These will be used until each @buoy-gg/* package exports its own preset.
|
|
62
|
-
* Icons are the BIF brand icon components (same artwork as native) —
|
|
63
|
-
* never emoji strings (tofu in WKWebView).
|
|
64
|
-
*/
|
|
65
|
-
export const defaultToolPresets = [{
|
|
66
|
-
id: 'env',
|
|
67
|
-
name: 'ENV',
|
|
68
|
-
description: 'Environment variables debugger',
|
|
69
|
-
slot: 'both',
|
|
70
|
-
icon: size => /*#__PURE__*/_jsx(EnvIcon, {
|
|
71
|
-
size: size
|
|
72
|
-
}),
|
|
73
|
-
color: '#4AFF9F'
|
|
74
|
-
}, {
|
|
75
|
-
id: 'storage',
|
|
76
|
-
name: 'STORAGE',
|
|
77
|
-
description: 'AsyncStorage browser',
|
|
78
|
-
slot: 'both',
|
|
79
|
-
icon: size => /*#__PURE__*/_jsx(StorageIcon, {
|
|
80
|
-
size: size
|
|
81
|
-
}),
|
|
82
|
-
color: '#BA68C8'
|
|
83
|
-
}, {
|
|
84
|
-
id: 'network',
|
|
85
|
-
name: 'NET',
|
|
86
|
-
description: 'Network request logger',
|
|
87
|
-
slot: 'both',
|
|
88
|
-
icon: size => /*#__PURE__*/_jsx(NetworkIcon, {
|
|
89
|
-
size: size
|
|
90
|
-
}),
|
|
91
|
-
color: '#4AFF9F'
|
|
92
|
-
}, {
|
|
93
|
-
id: 'query',
|
|
94
|
-
name: 'QUERY',
|
|
95
|
-
description: 'React Query inspector',
|
|
96
|
-
slot: 'both',
|
|
97
|
-
icon: size => /*#__PURE__*/_jsx(QueryIcon, {
|
|
98
|
-
size: size
|
|
99
|
-
}),
|
|
100
|
-
color: '#FF4154'
|
|
101
|
-
}, {
|
|
102
|
-
id: 'route-events',
|
|
103
|
-
name: 'ROUTES',
|
|
104
|
-
description: 'Route tracking & navigation inspector',
|
|
105
|
-
slot: 'both',
|
|
106
|
-
icon: size => /*#__PURE__*/_jsx(RoutesIcon, {
|
|
107
|
-
size: size
|
|
108
|
-
}),
|
|
109
|
-
color: '#FF9F1C'
|
|
110
|
-
}, {
|
|
111
|
-
id: 'highlight-updates',
|
|
112
|
-
name: 'RENDERS',
|
|
113
|
-
description: 'View component render tracking',
|
|
114
|
-
slot: 'dial',
|
|
115
|
-
icon: size => /*#__PURE__*/_jsx(RendersIcon, {
|
|
116
|
-
size: size
|
|
117
|
-
}),
|
|
118
|
-
color: '#10b981'
|
|
119
|
-
}, {
|
|
120
|
-
id: 'debug-borders',
|
|
121
|
-
name: 'DEBUG BORDERS',
|
|
122
|
-
description: 'Component layout borders',
|
|
123
|
-
slot: 'dial',
|
|
124
|
-
icon: size => /*#__PURE__*/_jsx(DebugBordersGlyph, {
|
|
125
|
-
size: size
|
|
126
|
-
}),
|
|
127
|
-
color: '#10b981'
|
|
128
|
-
}];
|
|
129
|
-
|
|
130
|
-
// =============================
|
|
131
|
-
// Auto-Discovery Functions
|
|
132
|
-
// =============================
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Auto-discover installed @buoy-gg/* tool packages.
|
|
136
|
-
*
|
|
137
|
-
* Uses Vite's import.meta.glob to find packages at build time.
|
|
138
|
-
* Only installed packages are included (no errors for missing ones).
|
|
139
|
-
*
|
|
140
|
-
* Note: Until packages export web presets, this returns default presets.
|
|
141
|
-
*
|
|
142
|
-
* @returns Array of discovered tool configurations
|
|
143
|
-
*/
|
|
144
|
-
export function autoDiscoverWebPresets() {
|
|
145
|
-
// TODO: When @buoy-gg/* packages export web presets, use import.meta.glob:
|
|
146
|
-
//
|
|
147
|
-
// const modules = import.meta.glob(
|
|
148
|
-
// '/node_modules/@buoy-gg/*/dist/preset.{js,mjs}',
|
|
149
|
-
// { eager: true, import: 'default' }
|
|
150
|
-
// );
|
|
151
|
-
//
|
|
152
|
-
// const presets: WebToolConfig[] = [];
|
|
153
|
-
// for (const [path, preset] of Object.entries(modules)) {
|
|
154
|
-
// if (preset && typeof preset === 'object' && 'id' in preset) {
|
|
155
|
-
// presets.push(preset as WebToolConfig);
|
|
156
|
-
// }
|
|
157
|
-
// }
|
|
158
|
-
// return presets;
|
|
159
|
-
|
|
160
|
-
// For now, return default presets
|
|
161
|
-
return [...defaultToolPresets];
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Merge custom tools with auto-discovered ones.
|
|
166
|
-
*
|
|
167
|
-
* Custom tools take precedence - if a custom tool has the same ID as
|
|
168
|
-
* a discovered tool, the custom one is used (same behavior as mobile).
|
|
169
|
-
*
|
|
170
|
-
* @param customTools - Custom tools to merge (optional)
|
|
171
|
-
* @returns Merged array with custom tools taking precedence
|
|
172
|
-
*/
|
|
173
|
-
export function autoDiscoverWithCustom(customTools = []) {
|
|
174
|
-
const discovered = autoDiscoverWebPresets();
|
|
175
|
-
if (customTools.length === 0) {
|
|
176
|
-
return discovered;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Create set of custom tool IDs for quick lookup
|
|
180
|
-
const customIds = new Set(customTools.map(t => t.id));
|
|
181
|
-
|
|
182
|
-
// Filter out discovered tools that have custom overrides
|
|
183
|
-
const filteredDiscovered = discovered.filter(t => !customIds.has(t.id));
|
|
184
|
-
|
|
185
|
-
// Custom tools first, then remaining discovered
|
|
186
|
-
return [...customTools, ...filteredDiscovered];
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Get tools filtered by slot.
|
|
191
|
-
*
|
|
192
|
-
* @param tools - Array of tool configurations
|
|
193
|
-
* @param slot - Slot to filter by ('dial' or 'row')
|
|
194
|
-
* @returns Filtered array of tools that can appear in the specified slot
|
|
195
|
-
*/
|
|
196
|
-
export function getToolsBySlot(tools, slot) {
|
|
197
|
-
return tools.filter(tool => {
|
|
198
|
-
const toolSlot = tool.slot || 'both';
|
|
199
|
-
return toolSlot === 'both' || toolSlot === slot;
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Get enabled tools based on settings.
|
|
205
|
-
*
|
|
206
|
-
* @param tools - Array of all tool configurations
|
|
207
|
-
* @param enabledIds - Set or array of enabled tool IDs
|
|
208
|
-
* @returns Filtered array of enabled tools
|
|
209
|
-
*/
|
|
210
|
-
export function getEnabledTools(tools, enabledIds) {
|
|
211
|
-
const idSet = enabledIds instanceof Set ? enabledIds : new Set(enabledIds);
|
|
212
|
-
return tools.filter(tool => idSet.has(tool.id));
|
|
213
|
-
}
|
|
1
|
+
"use strict";export const defaultToolPresets=[];export function autoDiscoverWebPresets(){return[]}export function autoDiscoverWithCustom(o=[]){return[...new Map(o.map(t=>[t.id,t])).values()]}export function getToolsBySlot(o,t){return o.filter(r=>{const e=r.slot||"both";return e==="both"||e===t})}export function getEnabledTools(o,t){const r=t instanceof Set?t:new Set(t);return o.filter(e=>r.has(e.id))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{createElement as n}from"react";export function createWebTool(o){const t=o.icon;return{...o,icon:typeof t==="function"?c=>n(t,{size:c,slot:o.slot??"both",color:o.color}):()=>t}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{registerToolModules as s}from"@buoy-gg/shared-ui";import{createWebTool as a}from"./createWebTool.js";import{useDevToolsVisibility as n}from"../floatingMenu/DevToolsVisibilityContext.js";import*as m from"@buoy-gg/license";import*as d from"@buoy-gg/shared-ui";import*as f from"@buoy-gg/shared-ui/dataViewer";export function createWebTools(r){s({core:{useDevToolsVisibility:n},license:m,"shared-ui":d,"shared-ui/dataViewer":f,...r});const t=new Set;return Object.values(r).flatMap(o=>Object.entries(o).flatMap(([i,e])=>{if(!i.endsWith("Preset")||!e||typeof e.id!=="string"||!e.component||t.has(e.id))return[];t.add(e.id);return[a(e)]}))}
|
package/lib/module/version.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This package's published version.
|
|
5
|
-
*
|
|
6
|
-
* Hardcoded rather than read from package.json: `require("../package.json")`
|
|
7
|
-
* resolves to a different depth from `src/` than from the built `lib/`, and
|
|
8
|
-
* react-native-builder-bob (babel) has no build-time `define` the way tsup does
|
|
9
|
-
* for @buoy-gg/mcp.
|
|
10
|
-
*
|
|
11
|
-
* Drift is prevented by a test that fails when this disagrees with
|
|
12
|
-
* package.json, so a version bump that forgets this file cannot ship.
|
|
13
|
-
*/
|
|
14
|
-
export const SDK_VERSION = "7.0.40";
|
|
1
|
+
"use strict";export const SDK_VERSION="7.0.42";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { earlyHookScript } from './earlyHookScript';
|
|
2
|
+
/**
|
|
3
|
+
* Call before importing React DOM so render and element inspectors can see app
|
|
4
|
+
* roots. It also starts recording fetch and XHR calls, so the Network tool shows
|
|
5
|
+
* the requests the page made before Buoy loaded.
|
|
6
|
+
*
|
|
7
|
+
* In a production build it runs only in a browser where Buoy has recently
|
|
8
|
+
* rendered (see releaseOptIn.ts), or with `enableInRelease`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerBrowserDevTools(options?: {
|
|
11
|
+
enableInRelease?: boolean;
|
|
12
|
+
}): boolean;
|
|
13
|
+
//# sourceMappingURL=browserRegister.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { earlyHookScript } from './earlyHookScript';
|
|
2
|
+
/** The server entry does not load the browser's React DevTools backend. */
|
|
3
|
+
export declare function registerBrowserDevTools(_options?: {
|
|
4
|
+
enableInRelease?: boolean;
|
|
5
|
+
}): boolean;
|
|
6
|
+
//# sourceMappingURL=browserRegister.server.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline script for pages where React DOM loads before any app code, such as
|
|
3
|
+
* the Next.js Pages Router.
|
|
4
|
+
*
|
|
5
|
+
* Put it in the page's `<head>`, ahead of every bundle. It holds on to the
|
|
6
|
+
* renderer React DOM registers, and `@buoy-gg/core/web/register` later hands
|
|
7
|
+
* that renderer to the full React DevTools backend. Without it, React DOM
|
|
8
|
+
* registers with Fast Refresh's placeholder hook, which keeps nothing, and
|
|
9
|
+
* Highlight Updates sees no renders.
|
|
10
|
+
*/
|
|
11
|
+
export declare const earlyHookScript: string;
|
|
12
|
+
//# sourceMappingURL=earlyHookScript.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records the page's fetch and XHR calls from the first line of the app, before
|
|
3
|
+
* the Network tool has loaded.
|
|
4
|
+
*
|
|
5
|
+
* Buoy is usually loaded lazily, after the app has hydrated, so the requests a
|
|
6
|
+
* page makes while it loads (the session check, the first queries) used to be
|
|
7
|
+
* missed. `@buoy-gg/core/web/register` already has to run before React DOM, so
|
|
8
|
+
* it installs this recorder too. When Network capture starts, the tool calls
|
|
9
|
+
* `adopt` and turns each record into a normal request row, including requests
|
|
10
|
+
* that are still in flight. After that the recorder only passes calls through.
|
|
11
|
+
*
|
|
12
|
+
* It has no dependencies because it loads before everything else. The shape
|
|
13
|
+
* of `window.__BUOY_EARLY_NETWORK__` is shared with @buoy-gg/network
|
|
14
|
+
* (network/utils/adoptEarlyNetwork.ts); change both together.
|
|
15
|
+
*/
|
|
16
|
+
export interface EarlyFetchRecord {
|
|
17
|
+
kind: 'fetch';
|
|
18
|
+
input: RequestInfo | URL;
|
|
19
|
+
init?: RequestInit;
|
|
20
|
+
/** A copy of a `Request` body, taken before the app's request consumed it. */
|
|
21
|
+
requestCopy?: Request;
|
|
22
|
+
/** Real `Date.now()` when the call was made. */
|
|
23
|
+
start: number;
|
|
24
|
+
/**
|
|
25
|
+
* Settles when the headers arrive, with the app's response and a clone to
|
|
26
|
+
* read the body from (none for a stream), or with the error the app saw.
|
|
27
|
+
*/
|
|
28
|
+
settled: Promise<{
|
|
29
|
+
response?: Response;
|
|
30
|
+
clone?: Response;
|
|
31
|
+
error?: unknown;
|
|
32
|
+
headersAt: number;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
export interface EarlyXhrRecord {
|
|
36
|
+
kind: 'xhr';
|
|
37
|
+
xhr: XMLHttpRequest;
|
|
38
|
+
method: string;
|
|
39
|
+
url: string;
|
|
40
|
+
headers: Record<string, string>;
|
|
41
|
+
body: unknown;
|
|
42
|
+
start: number;
|
|
43
|
+
}
|
|
44
|
+
export type EarlyNetworkRecord = EarlyFetchRecord | EarlyXhrRecord;
|
|
45
|
+
export interface EarlyNetworkRecorder {
|
|
46
|
+
version: 1;
|
|
47
|
+
records: EarlyNetworkRecord[];
|
|
48
|
+
/** Hand every record to the Network tool and stop recording. Returns them once. */
|
|
49
|
+
adopt(): EarlyNetworkRecord[];
|
|
50
|
+
}
|
|
51
|
+
export declare function installEarlyNetworkRecorder(): void;
|
|
52
|
+
//# sourceMappingURL=earlyNetwork.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { AppInstance, OpenDefinition } from "./AppHostLogic";
|
|
2
|
+
import { AppInstance, OpenDefinition, type ModalRestoreState } from "./AppHostLogic";
|
|
3
3
|
type AppHostContextValue = {
|
|
4
4
|
openApps: AppInstance[];
|
|
5
5
|
isAnyOpen: boolean;
|
|
@@ -8,9 +8,9 @@ type AppHostContextValue = {
|
|
|
8
8
|
closeAll: () => void;
|
|
9
9
|
registerApps: (apps: any[]) => void;
|
|
10
10
|
/** Minimize a tool - hides the modal but keeps state */
|
|
11
|
-
minimize: (instanceId: string) => void;
|
|
11
|
+
minimize: (instanceId: string, restoreState?: ModalRestoreState) => void;
|
|
12
12
|
/** Restore a minimized tool to visible state */
|
|
13
|
-
restore: (instanceId: string) => void;
|
|
13
|
+
restore: (instanceId: string, restoreState?: ModalRestoreState) => void;
|
|
14
14
|
/** Check if a specific tool is minimized */
|
|
15
15
|
isMinimized: (instanceId: string) => boolean;
|
|
16
16
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BrowserToolModules } from '../utils/createWebTools';
|
|
2
|
+
import type { BrowserToolConfig } from '../utils/createWebTool';
|
|
3
|
+
import type { ExternalSyncOptions } from './autoExternalSync';
|
|
4
|
+
import type { EnvVarConfig } from './FloatingDevTools';
|
|
5
|
+
export interface BrowserToolRuntimeProps {
|
|
6
|
+
modules: BrowserToolModules;
|
|
7
|
+
apps?: BrowserToolConfig[];
|
|
8
|
+
requiredEnvVars?: EnvVarConfig[];
|
|
9
|
+
externalSync?: boolean | ExternalSyncOptions;
|
|
10
|
+
headless?: boolean;
|
|
11
|
+
sentryGetClient?: () => unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function BrowserToolRuntime(props: BrowserToolRuntimeProps): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=BrowserToolRuntime.d.ts.map
|
|
@@ -1,68 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Global settings that apply to all dev tools.
|
|
5
|
-
* These settings override individual tool configurations.
|
|
6
|
-
*/
|
|
7
|
-
export interface GlobalDevToolsSettings {
|
|
8
|
-
/**
|
|
9
|
-
* When true, all modals share the same dimensions/position.
|
|
10
|
-
* When false (default), each modal has its own independent persistence.
|
|
11
|
-
* Priority: Settings UI > Prop override > Default (false)
|
|
12
|
-
*/
|
|
13
|
-
enableSharedModalDimensions?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* When true (default), window control buttons expand on tap for easier pressing.
|
|
16
|
-
* When false, buttons are directly tappable at small size.
|
|
17
|
-
*/
|
|
18
|
-
expandableWindowControls?: boolean;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Serialized preferences that power the floating dev tools UI. Values persist across sessions
|
|
22
|
-
* via AsyncStorage so teams can tailor which tools appear in the dial or floating row.
|
|
23
|
-
*/
|
|
24
|
-
export interface DevToolsSettings {
|
|
25
|
-
/** Map of dial tool ids to enabled state (max slots enforced elsewhere). */
|
|
26
|
-
dialTools: Record<string, boolean>;
|
|
27
|
-
/** Map of floating tool ids to enabled state plus the environment indicator toggle. */
|
|
28
|
-
floatingTools: Record<string, boolean> & {
|
|
29
|
-
environment: boolean;
|
|
30
|
-
};
|
|
31
|
-
/** Global settings that apply to all dev tools */
|
|
32
|
-
globalSettings?: GlobalDevToolsSettings;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The subset of InstalledApp the settings modal needs per tool. `icon`/`color`
|
|
36
|
-
* let rows fall back to the tool's own glyph when getToolIcon() has no
|
|
37
|
-
* night-tuned override for it.
|
|
38
|
-
*/
|
|
39
|
-
interface SettingsToolInfo {
|
|
40
|
-
id: string;
|
|
41
|
-
name: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
slot?: "dial" | "row" | "both";
|
|
44
|
-
icon?: InstalledApp["icon"];
|
|
45
|
-
color?: string;
|
|
46
|
-
}
|
|
47
|
-
interface DevToolsSettingsModalProps {
|
|
48
|
-
visible: boolean;
|
|
49
|
-
onClose: () => void;
|
|
50
|
-
onSettingsChange?: (settings: DevToolsSettings) => void;
|
|
51
|
-
initialSettings?: DevToolsSettings;
|
|
52
|
-
availableApps?: SettingsToolInfo[];
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Configurable modal surface that lets engineers pick which dev tools appear in the dial and
|
|
56
|
-
* floating row. Persists preferences and enforces slot limits for a consistent UX.
|
|
57
|
-
*
|
|
58
|
-
* Styled in the "night" language (Everlights port — see shared-ui's
|
|
59
|
-
* ui/night): section labels outside near-black cards, hairline-separated
|
|
60
|
-
* rows, real switches, and a transparent header the star field runs through.
|
|
61
|
-
*/
|
|
62
|
-
export declare const DevToolsSettingsModal: FC<DevToolsSettingsModalProps>;
|
|
63
|
-
export declare const useDevToolsSettings: () => {
|
|
64
|
-
settings: DevToolsSettings;
|
|
65
|
-
refreshSettings: () => void;
|
|
66
|
-
};
|
|
67
|
-
export {};
|
|
1
|
+
export { DevToolsSettingsModal, useDevToolsSettings } from "./DevToolsSettingsModal.shared";
|
|
2
|
+
export type { DevToolsSettings, GlobalDevToolsSettings } from "./DevToolsSettingsModal.shared";
|
|
68
3
|
//# sourceMappingURL=DevToolsSettingsModal.d.ts.map
|