@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,241 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Badge = Badge;
|
|
7
|
-
exports.DiffViewer = DiffViewer;
|
|
8
|
-
exports.InfoRow = InfoRow;
|
|
9
|
-
exports.StatusDot = StatusDot;
|
|
10
|
-
exports.methodColor = methodColor;
|
|
11
|
-
exports.statusColor = statusColor;
|
|
12
|
-
exports.typeColor = typeColor;
|
|
13
|
-
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
var _reactNative = require("react-native");
|
|
15
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
16
|
-
var _dataViewer = require("@buoy-gg/shared-ui/dataViewer");
|
|
17
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
-
/**
|
|
20
|
-
* Facade primitives for the public custom-tools toolkit (see toolkit.ts).
|
|
21
|
-
*
|
|
22
|
-
* shared-ui grew several overlapping treatments of the same jobs (seven badge
|
|
23
|
-
* variants, four copy buttons, two diff viewers...). The public surface merges
|
|
24
|
-
* each job into ONE component with variants, implemented here on toolTheme —
|
|
25
|
-
* shared-ui's internals stay unchanged for first-party tools.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
// ---------------------------------------------------------------------------
|
|
29
|
-
// Semantic color helpers — pair with <Badge>/<StatusDot> instead of exporting
|
|
30
|
-
// a preset component per domain.
|
|
31
|
-
// ---------------------------------------------------------------------------
|
|
32
|
-
const STATUS_COLORS = {
|
|
33
|
-
success: _sharedUi.toolTheme.colors.success,
|
|
34
|
-
active: _sharedUi.toolTheme.colors.success,
|
|
35
|
-
connected: _sharedUi.toolTheme.colors.success,
|
|
36
|
-
error: _sharedUi.toolTheme.colors.error,
|
|
37
|
-
failed: _sharedUi.toolTheme.colors.error,
|
|
38
|
-
warning: _sharedUi.toolTheme.colors.warning,
|
|
39
|
-
stale: _sharedUi.toolTheme.colors.warning,
|
|
40
|
-
pending: _sharedUi.toolTheme.colors.info,
|
|
41
|
-
loading: _sharedUi.toolTheme.colors.info,
|
|
42
|
-
fetching: _sharedUi.toolTheme.colors.info,
|
|
43
|
-
info: _sharedUi.toolTheme.colors.info,
|
|
44
|
-
inactive: _sharedUi.toolTheme.colors.textMuted,
|
|
45
|
-
idle: _sharedUi.toolTheme.colors.textMuted
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/** Map a status word ("success", "pending", "stale"...) to a semantic color. */
|
|
49
|
-
function statusColor(status) {
|
|
50
|
-
return STATUS_COLORS[status.toLowerCase()] ?? _sharedUi.toolTheme.colors.textMuted;
|
|
51
|
-
}
|
|
52
|
-
const METHOD_COLORS = {
|
|
53
|
-
GET: _sharedUi.toolTheme.colors.info,
|
|
54
|
-
POST: _sharedUi.toolTheme.colors.success,
|
|
55
|
-
PUT: _sharedUi.toolTheme.colors.warning,
|
|
56
|
-
PATCH: _sharedUi.toolTheme.colors.warning,
|
|
57
|
-
DELETE: _sharedUi.toolTheme.colors.error
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/** Map an HTTP method to its conventional color. */
|
|
61
|
-
function methodColor(method) {
|
|
62
|
-
return METHOD_COLORS[method.toUpperCase()] ?? _sharedUi.toolTheme.colors.textSecondary;
|
|
63
|
-
}
|
|
64
|
-
const TYPE_COLORS = {
|
|
65
|
-
string: _sharedUi.toolTheme.colors.success,
|
|
66
|
-
number: _sharedUi.toolTheme.colors.info,
|
|
67
|
-
boolean: _sharedUi.toolTheme.colors.warning,
|
|
68
|
-
object: _sharedUi.toolTheme.colors.accent,
|
|
69
|
-
array: _sharedUi.toolTheme.colors.accent,
|
|
70
|
-
function: _sharedUi.toolTheme.colors.error,
|
|
71
|
-
null: _sharedUi.toolTheme.colors.textMuted,
|
|
72
|
-
undefined: _sharedUi.toolTheme.colors.textMuted
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/** Map a JS value-type name to its display color. */
|
|
76
|
-
function typeColor(type) {
|
|
77
|
-
return TYPE_COLORS[type.toLowerCase()] ?? _sharedUi.toolTheme.colors.textSecondary;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// ---------------------------------------------------------------------------
|
|
81
|
-
// Badge — the one chip. Color it with statusColor()/methodColor()/typeColor()
|
|
82
|
-
// (or any hex); shape/typography are props, not sibling components.
|
|
83
|
-
// ---------------------------------------------------------------------------
|
|
84
|
-
|
|
85
|
-
function Badge({
|
|
86
|
-
children,
|
|
87
|
-
color = _sharedUi.toolTheme.colors.textSecondary,
|
|
88
|
-
icon,
|
|
89
|
-
size = "small",
|
|
90
|
-
pill = false,
|
|
91
|
-
mono = false,
|
|
92
|
-
style
|
|
93
|
-
}) {
|
|
94
|
-
const isText = typeof children === "string" || typeof children === "number";
|
|
95
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
96
|
-
style: [badgeStyles.base, size === "medium" && badgeStyles.medium, pill && badgeStyles.pill, {
|
|
97
|
-
backgroundColor: color + "1A",
|
|
98
|
-
borderColor: color + "40"
|
|
99
|
-
}, style],
|
|
100
|
-
children: [icon, isText ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
101
|
-
style: [badgeStyles.text, size === "medium" && badgeStyles.textMedium, mono && badgeStyles.textMono, {
|
|
102
|
-
color
|
|
103
|
-
}],
|
|
104
|
-
numberOfLines: 1,
|
|
105
|
-
children: children
|
|
106
|
-
}) : children]
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
const badgeStyles = _reactNative.StyleSheet.create({
|
|
110
|
-
base: {
|
|
111
|
-
flexDirection: "row",
|
|
112
|
-
alignItems: "center",
|
|
113
|
-
alignSelf: "flex-start",
|
|
114
|
-
gap: 4,
|
|
115
|
-
borderWidth: 1,
|
|
116
|
-
borderRadius: _sharedUi.toolTheme.radius.sm,
|
|
117
|
-
paddingHorizontal: 6,
|
|
118
|
-
paddingVertical: 2
|
|
119
|
-
},
|
|
120
|
-
medium: {
|
|
121
|
-
paddingHorizontal: 8,
|
|
122
|
-
paddingVertical: 3
|
|
123
|
-
},
|
|
124
|
-
pill: {
|
|
125
|
-
borderRadius: _sharedUi.toolTheme.radius.pill,
|
|
126
|
-
minWidth: 20,
|
|
127
|
-
justifyContent: "center"
|
|
128
|
-
},
|
|
129
|
-
text: {
|
|
130
|
-
fontSize: 10,
|
|
131
|
-
fontWeight: "600",
|
|
132
|
-
letterSpacing: 0.3
|
|
133
|
-
},
|
|
134
|
-
textMedium: {
|
|
135
|
-
fontSize: 12
|
|
136
|
-
},
|
|
137
|
-
textMono: {
|
|
138
|
-
fontFamily: _sharedUi.toolTheme.text.mono.fontFamily
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
// ---------------------------------------------------------------------------
|
|
143
|
-
// StatusDot — the bare status circle (list rows, connection indicators).
|
|
144
|
-
// ---------------------------------------------------------------------------
|
|
145
|
-
|
|
146
|
-
function StatusDot({
|
|
147
|
-
status,
|
|
148
|
-
color,
|
|
149
|
-
size = 8,
|
|
150
|
-
style
|
|
151
|
-
}) {
|
|
152
|
-
const dotColor = color ?? (status ? statusColor(status) : _sharedUi.toolTheme.colors.textMuted);
|
|
153
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
154
|
-
style: [{
|
|
155
|
-
width: size,
|
|
156
|
-
height: size,
|
|
157
|
-
borderRadius: size / 2,
|
|
158
|
-
backgroundColor: dotColor
|
|
159
|
-
}, style]
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// ---------------------------------------------------------------------------
|
|
164
|
-
// InfoRow — the label/value line of every detail screen, with optional copy.
|
|
165
|
-
// ---------------------------------------------------------------------------
|
|
166
|
-
|
|
167
|
-
function InfoRow({
|
|
168
|
-
label,
|
|
169
|
-
value,
|
|
170
|
-
copyable = false,
|
|
171
|
-
style
|
|
172
|
-
}) {
|
|
173
|
-
const isText = typeof value === "string" || typeof value === "number";
|
|
174
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
175
|
-
style: [infoRowStyles.row, style],
|
|
176
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
177
|
-
style: infoRowStyles.label,
|
|
178
|
-
numberOfLines: 1,
|
|
179
|
-
children: label
|
|
180
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
181
|
-
style: infoRowStyles.value,
|
|
182
|
-
children: isText ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
183
|
-
style: infoRowStyles.valueText,
|
|
184
|
-
numberOfLines: 2,
|
|
185
|
-
children: String(value)
|
|
186
|
-
}) : value
|
|
187
|
-
}), copyable && value != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.CopyButton, {
|
|
188
|
-
value: value,
|
|
189
|
-
size: 12
|
|
190
|
-
})]
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
const infoRowStyles = _reactNative.StyleSheet.create({
|
|
194
|
-
row: {
|
|
195
|
-
flexDirection: "row",
|
|
196
|
-
alignItems: "center",
|
|
197
|
-
gap: _sharedUi.toolTheme.spacing.sm,
|
|
198
|
-
paddingVertical: 3
|
|
199
|
-
},
|
|
200
|
-
label: {
|
|
201
|
-
..._sharedUi.toolTheme.text.label,
|
|
202
|
-
color: _sharedUi.toolTheme.colors.textMuted,
|
|
203
|
-
minWidth: 72
|
|
204
|
-
},
|
|
205
|
-
value: {
|
|
206
|
-
flex: 1,
|
|
207
|
-
flexDirection: "row",
|
|
208
|
-
alignItems: "center"
|
|
209
|
-
},
|
|
210
|
-
valueText: {
|
|
211
|
-
..._sharedUi.toolTheme.text.mono,
|
|
212
|
-
color: _sharedUi.toolTheme.colors.text
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
// ---------------------------------------------------------------------------
|
|
217
|
-
// DiffViewer — one before/after component; the rendering strategy is a mode.
|
|
218
|
-
// ---------------------------------------------------------------------------
|
|
219
|
-
|
|
220
|
-
function DiffViewer({
|
|
221
|
-
oldValue,
|
|
222
|
-
newValue,
|
|
223
|
-
mode = "tree",
|
|
224
|
-
showUnchanged = true,
|
|
225
|
-
scrollEnabled = false,
|
|
226
|
-
height = 220
|
|
227
|
-
}) {
|
|
228
|
-
if (mode === "text") {
|
|
229
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.SplitDiffViewer, {
|
|
230
|
-
oldValue: oldValue,
|
|
231
|
-
newValue: newValue,
|
|
232
|
-
height: height
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.TreeDiffViewer, {
|
|
236
|
-
oldValue: oldValue,
|
|
237
|
-
newValue: newValue,
|
|
238
|
-
showUnchanged: showUnchanged,
|
|
239
|
-
scrollEnabled: scrollEnabled
|
|
240
|
-
});
|
|
241
|
-
}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Badge=Badge;exports.DiffViewer=DiffViewer;exports.InfoRow=InfoRow;exports.StatusDot=StatusDot;exports.methodColor=methodColor;exports.statusColor=statusColor;exports.typeColor=typeColor;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const STATUS_COLORS={success:_sharedUi.toolTheme.colors.success,active:_sharedUi.toolTheme.colors.success,connected:_sharedUi.toolTheme.colors.success,error:_sharedUi.toolTheme.colors.error,failed:_sharedUi.toolTheme.colors.error,warning:_sharedUi.toolTheme.colors.warning,stale:_sharedUi.toolTheme.colors.warning,pending:_sharedUi.toolTheme.colors.info,loading:_sharedUi.toolTheme.colors.info,fetching:_sharedUi.toolTheme.colors.info,info:_sharedUi.toolTheme.colors.info,inactive:_sharedUi.toolTheme.colors.textMuted,idle:_sharedUi.toolTheme.colors.textMuted};function statusColor(e){return STATUS_COLORS[e.toLowerCase()]??_sharedUi.toolTheme.colors.textMuted}const METHOD_COLORS={GET:_sharedUi.toolTheme.colors.info,POST:_sharedUi.toolTheme.colors.success,PUT:_sharedUi.toolTheme.colors.warning,PATCH:_sharedUi.toolTheme.colors.warning,DELETE:_sharedUi.toolTheme.colors.error};function methodColor(e){return METHOD_COLORS[e.toUpperCase()]??_sharedUi.toolTheme.colors.textSecondary}const TYPE_COLORS={string:_sharedUi.toolTheme.colors.success,number:_sharedUi.toolTheme.colors.info,boolean:_sharedUi.toolTheme.colors.warning,object:_sharedUi.toolTheme.colors.accent,array:_sharedUi.toolTheme.colors.accent,function:_sharedUi.toolTheme.colors.error,null:_sharedUi.toolTheme.colors.textMuted,undefined:_sharedUi.toolTheme.colors.textMuted};function typeColor(e){return TYPE_COLORS[e.toLowerCase()]??_sharedUi.toolTheme.colors.textSecondary}function Badge({children:e,color:o=_sharedUi.toolTheme.colors.textSecondary,icon:t,size:r="small",pill:l=false,mono:n=false,style:s}){const i=typeof e==="string"||typeof e==="number";return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[badgeStyles.base,r==="medium"&&badgeStyles.medium,l&&badgeStyles.pill,{backgroundColor:o+"1A",borderColor:o+"40"},s],children:[t,i?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[badgeStyles.text,r==="medium"&&badgeStyles.textMedium,n&&badgeStyles.textMono,{color:o}],numberOfLines:1,children:e}):e]})}const badgeStyles=_reactNative.StyleSheet.create({base:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:4,borderWidth:1,borderRadius:_sharedUi.toolTheme.radius.sm,paddingHorizontal:6,paddingVertical:2},medium:{paddingHorizontal:8,paddingVertical:3},pill:{borderRadius:_sharedUi.toolTheme.radius.pill,minWidth:20,justifyContent:"center"},text:{fontSize:10,fontWeight:"600",letterSpacing:.3},textMedium:{fontSize:12},textMono:{fontFamily:_sharedUi.toolTheme.text.mono.fontFamily}});function StatusDot({status:e,color:o,size:t=8,style:r}){const l=o??(e?statusColor(e):_sharedUi.toolTheme.colors.textMuted);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{width:t,height:t,borderRadius:t/2,backgroundColor:l},r]})}function InfoRow({label:e,value:o,copyable:t=false,style:r}){const l=typeof o==="string"||typeof o==="number";return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[infoRowStyles.row,r],children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:infoRowStyles.label,numberOfLines:1,children:e}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:infoRowStyles.value,children:l?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:infoRowStyles.valueText,numberOfLines:2,children:String(o)}):o}),t&&o!=null&&(0,_jsxRuntime.jsx)(_sharedUi.CopyButton,{value:o,size:12})]})}const infoRowStyles=_reactNative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:_sharedUi.toolTheme.spacing.sm,paddingVertical:3},label:{..._sharedUi.toolTheme.text.label,color:_sharedUi.toolTheme.colors.textMuted,minWidth:72},value:{flex:1,flexDirection:"row",alignItems:"center"},valueText:{..._sharedUi.toolTheme.text.mono,color:_sharedUi.toolTheme.colors.text}});function DiffViewer({oldValue:e,newValue:o,mode:t="tree",showUnchanged:r=true,scrollEnabled:l=false,height:n=220}){if(t==="text"){return(0,_jsxRuntime.jsx)(_dataViewer.SplitDiffViewer,{oldValue:e,newValue:o,height:n})}return(0,_jsxRuntime.jsx)(_dataViewer.TreeDiffViewer,{oldValue:e,newValue:o,showUnchanged:r,scrollEnabled:l})}
|
|
@@ -1,219 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.autoDiscoverWebPresets = autoDiscoverWebPresets;
|
|
7
|
-
exports.autoDiscoverWithCustom = autoDiscoverWithCustom;
|
|
8
|
-
exports.defaultToolPresets = void 0;
|
|
9
|
-
exports.getEnabledTools = getEnabledTools;
|
|
10
|
-
exports.getToolsBySlot = getToolsBySlot;
|
|
11
|
-
var _floatingToolsCore = require("@buoy-gg/floating-tools-core");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
/**
|
|
14
|
-
* Auto-discovery utility for React DOM Web.
|
|
15
|
-
*
|
|
16
|
-
* Uses Vite's import.meta.glob to discover installed @buoy-gg/* packages
|
|
17
|
-
* at build time. This provides Metro-like auto-discovery behavior for web.
|
|
18
|
-
*
|
|
19
|
-
* How it works:
|
|
20
|
-
* 1. import.meta.glob scans node_modules at build time
|
|
21
|
-
* 2. Only packages that are actually installed are included
|
|
22
|
-
* 3. Missing packages don't cause errors (like Metro's try-catch)
|
|
23
|
-
* 4. Custom tools can override discovered ones by ID
|
|
24
|
-
*
|
|
25
|
-
* @platform React DOM Web (Vite, CRA, Next.js, Electron)
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Dashed-square glyph for debug-borders (no BIF brand icon exists for it
|
|
30
|
-
* yet). Plain SVG so it renders identically everywhere — emoji icons are
|
|
31
|
-
* banned here: WKWebView (Capacitor/Tauri) renders them as tofu boxes.
|
|
32
|
-
*/function DebugBordersGlyph({
|
|
33
|
-
size
|
|
34
|
-
}) {
|
|
35
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
36
|
-
width: size,
|
|
37
|
-
height: size,
|
|
38
|
-
viewBox: "0 0 24 24",
|
|
39
|
-
"aria-hidden": "true",
|
|
40
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
41
|
-
x: "3",
|
|
42
|
-
y: "3",
|
|
43
|
-
width: "18",
|
|
44
|
-
height: "18",
|
|
45
|
-
rx: "2",
|
|
46
|
-
fill: "none",
|
|
47
|
-
stroke: "#10b981",
|
|
48
|
-
strokeWidth: "2",
|
|
49
|
-
strokeDasharray: "4 3"
|
|
50
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
51
|
-
x: "8",
|
|
52
|
-
y: "8",
|
|
53
|
-
width: "8",
|
|
54
|
-
height: "8",
|
|
55
|
-
rx: "1",
|
|
56
|
-
fill: "#10b98155"
|
|
57
|
-
})]
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// =============================
|
|
62
|
-
// Default Tool Presets (Fallback)
|
|
63
|
-
// =============================
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Default tool presets for when packages don't export web presets yet.
|
|
67
|
-
* These will be used until each @buoy-gg/* package exports its own preset.
|
|
68
|
-
* Icons are the BIF brand icon components (same artwork as native) —
|
|
69
|
-
* never emoji strings (tofu in WKWebView).
|
|
70
|
-
*/
|
|
71
|
-
const defaultToolPresets = exports.defaultToolPresets = [{
|
|
72
|
-
id: 'env',
|
|
73
|
-
name: 'ENV',
|
|
74
|
-
description: 'Environment variables debugger',
|
|
75
|
-
slot: 'both',
|
|
76
|
-
icon: size => /*#__PURE__*/(0, _jsxRuntime.jsx)(_floatingToolsCore.EnvIcon, {
|
|
77
|
-
size: size
|
|
78
|
-
}),
|
|
79
|
-
color: '#4AFF9F'
|
|
80
|
-
}, {
|
|
81
|
-
id: 'storage',
|
|
82
|
-
name: 'STORAGE',
|
|
83
|
-
description: 'AsyncStorage browser',
|
|
84
|
-
slot: 'both',
|
|
85
|
-
icon: size => /*#__PURE__*/(0, _jsxRuntime.jsx)(_floatingToolsCore.StorageIcon, {
|
|
86
|
-
size: size
|
|
87
|
-
}),
|
|
88
|
-
color: '#BA68C8'
|
|
89
|
-
}, {
|
|
90
|
-
id: 'network',
|
|
91
|
-
name: 'NET',
|
|
92
|
-
description: 'Network request logger',
|
|
93
|
-
slot: 'both',
|
|
94
|
-
icon: size => /*#__PURE__*/(0, _jsxRuntime.jsx)(_floatingToolsCore.NetworkIcon, {
|
|
95
|
-
size: size
|
|
96
|
-
}),
|
|
97
|
-
color: '#4AFF9F'
|
|
98
|
-
}, {
|
|
99
|
-
id: 'query',
|
|
100
|
-
name: 'QUERY',
|
|
101
|
-
description: 'React Query inspector',
|
|
102
|
-
slot: 'both',
|
|
103
|
-
icon: size => /*#__PURE__*/(0, _jsxRuntime.jsx)(_floatingToolsCore.QueryIcon, {
|
|
104
|
-
size: size
|
|
105
|
-
}),
|
|
106
|
-
color: '#FF4154'
|
|
107
|
-
}, {
|
|
108
|
-
id: 'route-events',
|
|
109
|
-
name: 'ROUTES',
|
|
110
|
-
description: 'Route tracking & navigation inspector',
|
|
111
|
-
slot: 'both',
|
|
112
|
-
icon: size => /*#__PURE__*/(0, _jsxRuntime.jsx)(_floatingToolsCore.RoutesIcon, {
|
|
113
|
-
size: size
|
|
114
|
-
}),
|
|
115
|
-
color: '#FF9F1C'
|
|
116
|
-
}, {
|
|
117
|
-
id: 'highlight-updates',
|
|
118
|
-
name: 'RENDERS',
|
|
119
|
-
description: 'View component render tracking',
|
|
120
|
-
slot: 'dial',
|
|
121
|
-
icon: size => /*#__PURE__*/(0, _jsxRuntime.jsx)(_floatingToolsCore.RendersIcon, {
|
|
122
|
-
size: size
|
|
123
|
-
}),
|
|
124
|
-
color: '#10b981'
|
|
125
|
-
}, {
|
|
126
|
-
id: 'debug-borders',
|
|
127
|
-
name: 'DEBUG BORDERS',
|
|
128
|
-
description: 'Component layout borders',
|
|
129
|
-
slot: 'dial',
|
|
130
|
-
icon: size => /*#__PURE__*/(0, _jsxRuntime.jsx)(DebugBordersGlyph, {
|
|
131
|
-
size: size
|
|
132
|
-
}),
|
|
133
|
-
color: '#10b981'
|
|
134
|
-
}];
|
|
135
|
-
|
|
136
|
-
// =============================
|
|
137
|
-
// Auto-Discovery Functions
|
|
138
|
-
// =============================
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Auto-discover installed @buoy-gg/* tool packages.
|
|
142
|
-
*
|
|
143
|
-
* Uses Vite's import.meta.glob to find packages at build time.
|
|
144
|
-
* Only installed packages are included (no errors for missing ones).
|
|
145
|
-
*
|
|
146
|
-
* Note: Until packages export web presets, this returns default presets.
|
|
147
|
-
*
|
|
148
|
-
* @returns Array of discovered tool configurations
|
|
149
|
-
*/
|
|
150
|
-
function autoDiscoverWebPresets() {
|
|
151
|
-
// TODO: When @buoy-gg/* packages export web presets, use import.meta.glob:
|
|
152
|
-
//
|
|
153
|
-
// const modules = import.meta.glob(
|
|
154
|
-
// '/node_modules/@buoy-gg/*/dist/preset.{js,mjs}',
|
|
155
|
-
// { eager: true, import: 'default' }
|
|
156
|
-
// );
|
|
157
|
-
//
|
|
158
|
-
// const presets: WebToolConfig[] = [];
|
|
159
|
-
// for (const [path, preset] of Object.entries(modules)) {
|
|
160
|
-
// if (preset && typeof preset === 'object' && 'id' in preset) {
|
|
161
|
-
// presets.push(preset as WebToolConfig);
|
|
162
|
-
// }
|
|
163
|
-
// }
|
|
164
|
-
// return presets;
|
|
165
|
-
|
|
166
|
-
// For now, return default presets
|
|
167
|
-
return [...defaultToolPresets];
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Merge custom tools with auto-discovered ones.
|
|
172
|
-
*
|
|
173
|
-
* Custom tools take precedence - if a custom tool has the same ID as
|
|
174
|
-
* a discovered tool, the custom one is used (same behavior as mobile).
|
|
175
|
-
*
|
|
176
|
-
* @param customTools - Custom tools to merge (optional)
|
|
177
|
-
* @returns Merged array with custom tools taking precedence
|
|
178
|
-
*/
|
|
179
|
-
function autoDiscoverWithCustom(customTools = []) {
|
|
180
|
-
const discovered = autoDiscoverWebPresets();
|
|
181
|
-
if (customTools.length === 0) {
|
|
182
|
-
return discovered;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// Create set of custom tool IDs for quick lookup
|
|
186
|
-
const customIds = new Set(customTools.map(t => t.id));
|
|
187
|
-
|
|
188
|
-
// Filter out discovered tools that have custom overrides
|
|
189
|
-
const filteredDiscovered = discovered.filter(t => !customIds.has(t.id));
|
|
190
|
-
|
|
191
|
-
// Custom tools first, then remaining discovered
|
|
192
|
-
return [...customTools, ...filteredDiscovered];
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Get tools filtered by slot.
|
|
197
|
-
*
|
|
198
|
-
* @param tools - Array of tool configurations
|
|
199
|
-
* @param slot - Slot to filter by ('dial' or 'row')
|
|
200
|
-
* @returns Filtered array of tools that can appear in the specified slot
|
|
201
|
-
*/
|
|
202
|
-
function getToolsBySlot(tools, slot) {
|
|
203
|
-
return tools.filter(tool => {
|
|
204
|
-
const toolSlot = tool.slot || 'both';
|
|
205
|
-
return toolSlot === 'both' || toolSlot === slot;
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Get enabled tools based on settings.
|
|
211
|
-
*
|
|
212
|
-
* @param tools - Array of all tool configurations
|
|
213
|
-
* @param enabledIds - Set or array of enabled tool IDs
|
|
214
|
-
* @returns Filtered array of enabled tools
|
|
215
|
-
*/
|
|
216
|
-
function getEnabledTools(tools, enabledIds) {
|
|
217
|
-
const idSet = enabledIds instanceof Set ? enabledIds : new Set(enabledIds);
|
|
218
|
-
return tools.filter(tool => idSet.has(tool.id));
|
|
219
|
-
}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.autoDiscoverWebPresets=autoDiscoverWebPresets;exports.autoDiscoverWithCustom=autoDiscoverWithCustom;exports.defaultToolPresets=void 0;exports.getEnabledTools=getEnabledTools;exports.getToolsBySlot=getToolsBySlot;const defaultToolPresets=exports.defaultToolPresets=[];function autoDiscoverWebPresets(){return[]}function autoDiscoverWithCustom(e=[]){return[...new Map(e.map(t=>[t.id,t])).values()]}function getToolsBySlot(e,t){return e.filter(s=>{const o=s.slot||"both";return o==="both"||o===t})}function getEnabledTools(e,t){const s=t instanceof Set?t:new Set(t);return e.filter(o=>s.has(o.id))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createWebTool=createWebTool;var _react=require("react");function createWebTool(o){const e=o.icon;return{...o,icon:typeof e==="function"?t=>(0,_react.createElement)(e,{size:t,slot:o.slot??"both",color:o.color}):()=>e}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createWebTools=createWebTools;var _sharedUi=_interopRequireWildcard(require("@buoy-gg/shared-ui"));var shared=_sharedUi;var _createWebTool=require("./createWebTool.js");var _DevToolsVisibilityContext=require("../floatingMenu/DevToolsVisibilityContext.js");var license=_interopRequireWildcard(require("@buoy-gg/license"));var dataViewer=_interopRequireWildcard(require("@buoy-gg/shared-ui/dataViewer"));function _interopRequireWildcard(o,n){if("function"==typeof WeakMap)var a=new WeakMap,u=new WeakMap;return(_interopRequireWildcard=function(e,l){if(!l&&e&&e.__esModule)return e;var r,s,i={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return i;if(r=l?u:a){if(r.has(e))return r.get(e);r.set(e,i)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(i,t,s):i[t]=e[t]);return i})(o,n)}function createWebTools(o){(0,_sharedUi.registerToolModules)({core:{useDevToolsVisibility:_DevToolsVisibilityContext.useDevToolsVisibility},license,"shared-ui":shared,"shared-ui/dataViewer":dataViewer,...o});const n=new Set;return Object.values(o).flatMap(a=>Object.entries(a).flatMap(([u,e])=>{if(!u.endsWith("Preset")||!e||typeof e.id!=="string"||!e.component||n.has(e.id))return[];n.add(e.id);return[(0,_createWebTool.createWebTool)(e)]}))}
|
package/lib/commonjs/version.js
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SDK_VERSION = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* This package's published version.
|
|
9
|
-
*
|
|
10
|
-
* Hardcoded rather than read from package.json: `require("../package.json")`
|
|
11
|
-
* resolves to a different depth from `src/` than from the built `lib/`, and
|
|
12
|
-
* react-native-builder-bob (babel) has no build-time `define` the way tsup does
|
|
13
|
-
* for @buoy-gg/mcp.
|
|
14
|
-
*
|
|
15
|
-
* Drift is prevented by a test that fails when this disagrees with
|
|
16
|
-
* package.json, so a version bump that forgets this file cannot ship.
|
|
17
|
-
*/
|
|
18
|
-
const SDK_VERSION = exports.SDK_VERSION = "7.0.40";
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;const SDK_VERSION=exports.SDK_VERSION="7.0.42";
|
package/lib/module/Buoy.js
CHANGED
|
@@ -1,102 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Buoy SDK - Main entry point for React Buoy configuration
|
|
5
|
-
*
|
|
6
|
-
* Initialize once at app startup, before rendering any components:
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* import { Buoy } from '@buoy-gg/core';
|
|
11
|
-
*
|
|
12
|
-
* Buoy.init({
|
|
13
|
-
* licenseKey: 'YOUR_LICENSE_KEY',
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { LicenseManager } from "@buoy-gg/license";
|
|
19
|
-
/**
|
|
20
|
-
* Telemetry stays on unless an app explicitly opts out. Read at ping time
|
|
21
|
-
* rather than captured, so `Buoy.init()` still wins if it runs after mount.
|
|
22
|
-
*/
|
|
23
|
-
let telemetryEnabled = true;
|
|
24
|
-
|
|
25
|
-
/** Whether the anonymous install ping is allowed to fire. */
|
|
26
|
-
export function isTelemetryEnabled() {
|
|
27
|
-
return telemetryEnabled;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Buoy SDK namespace
|
|
32
|
-
*
|
|
33
|
-
* Use `Buoy.init()` to configure your license key at app startup.
|
|
34
|
-
*/
|
|
35
|
-
export const Buoy = {
|
|
36
|
-
/**
|
|
37
|
-
* Initialize Buoy with your license key
|
|
38
|
-
*
|
|
39
|
-
* Call this once at app startup, before rendering FloatingDevTools.
|
|
40
|
-
* Typically placed in App.tsx or index.js.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```tsx
|
|
44
|
-
* import { Buoy } from '@buoy-gg/core';
|
|
45
|
-
*
|
|
46
|
-
* // With hardcoded key
|
|
47
|
-
* Buoy.init({
|
|
48
|
-
* licenseKey: '36063C-27282E-8E73F5-55488F-2213DF-V3',
|
|
49
|
-
* });
|
|
50
|
-
*
|
|
51
|
-
* // With environment variable
|
|
52
|
-
* Buoy.init({
|
|
53
|
-
* licenseKey: process.env.BUOY_LICENSE_KEY!,
|
|
54
|
-
* });
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
init(config) {
|
|
58
|
-
if (config.telemetry === false) telemetryEnabled = false;
|
|
59
|
-
void LicenseManager.configure(config.licenseKey).catch(error => {
|
|
60
|
-
console.warn("[Buoy] License initialization failed:", error);
|
|
61
|
-
});
|
|
62
|
-
},
|
|
63
|
-
/**
|
|
64
|
-
* Initialize Buoy asynchronously
|
|
65
|
-
*
|
|
66
|
-
* Use this if you need to wait for initialization to complete.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```tsx
|
|
70
|
-
* await Buoy.initAsync({
|
|
71
|
-
* licenseKey: 'YOUR_LICENSE_KEY',
|
|
72
|
-
* });
|
|
73
|
-
* console.log('Buoy is ready!');
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
async initAsync(config) {
|
|
77
|
-
if (config.telemetry === false) telemetryEnabled = false;
|
|
78
|
-
return LicenseManager.configure(config.licenseKey);
|
|
79
|
-
},
|
|
80
|
-
/**
|
|
81
|
-
* Check if Buoy Pro is active
|
|
82
|
-
*/
|
|
83
|
-
isPro() {
|
|
84
|
-
return LicenseManager.isPro();
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* Get the current license state
|
|
88
|
-
*/
|
|
89
|
-
getState() {
|
|
90
|
-
return LicenseManager.getState();
|
|
91
|
-
},
|
|
92
|
-
/**
|
|
93
|
-
* Force device re-registration (debugging helper)
|
|
94
|
-
* Clears cached fingerprint so next init will register device again
|
|
95
|
-
*/
|
|
96
|
-
async forceReregister() {
|
|
97
|
-
await LicenseManager.forceReregister();
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
// Also export as default for flexibility
|
|
102
|
-
export default Buoy;
|
|
1
|
+
"use strict";import{LicenseManager as t}from"@buoy-gg/license";let r=true;export function isTelemetryEnabled(){return r}export const Buoy={init(e){if(e.telemetry===false)r=false;void t.configure(e.licenseKey).catch(i=>{console.warn("[Buoy] License initialization failed:",i)})},async initAsync(e){if(e.telemetry===false)r=false;return t.configure(e.licenseKey)},isPro(){return t.isPro()},getState(){return t.getState()},async forceReregister(){await t.forceReregister()}};export default Buoy;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import*as l from"react-devtools-core";import{installEarlyNetworkRecorder as m}from"./earlyNetwork.js";import{hasReleaseOptIn as A}from"./releaseOptIn.js";export{earlyHookScript}from"./earlyHookScript.js";const d=["onScheduleFiberRoot","onCommitFiberRoot","onPostCommitFiberRoot","onCommitFiberUnmount","setStrictMode"];export function registerBrowserDevTools(u={}){if(typeof window==="undefined"||typeof document==="undefined")return false;const p=typeof __DEV__!=="undefined"?__DEV__:process.env.NODE_ENV!=="production";if(!p&&!u.enableInRelease&&!A())return false;m();const n=window;const o=n.__REACT_DEVTOOLS_GLOBAL_HOOK__;const f=o&&o.supportsFiber&&!o.getFiberRoots&&!o.sub&&Object.getOwnPropertyDescriptor(n,"__REACT_DEVTOOLS_GLOBAL_HOOK__")?.configurable;if(f)delete n.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n.__REACT_DEVTOOLS_GLOBAL_HOOK__){const L=l.initialize??l.default?.initialize;L({appendComponentStack:false,breakOnConsoleErrors:false,showInlineWarningsAndErrors:false,hideConsoleLogsInStrictMode:false});if(f){const i=n.__REACT_DEVTOOLS_GLOBAL_HOOK__;const O=i.inject;const _=new Map;i.inject=e=>{const t=O(e);_.set(t,o.inject(e));return t};for(const e of d){const t=i[e];if(typeof t!=="function")continue;i[e]=(r,...s)=>{if(_.has(r))o[e]?.(_.get(r),...s);return t(r,...s)}}const c=new Map;o.renderers?.forEach?.((e,t)=>c.set(t,O(e)));if(c.size){for(const e of d){const t=o[e];o[e]=function(r,...s){const E=t?.call(this,r,...s);const a=c.get(r);if(a!==void 0)i[e]?.(a,...s);return E}}}}}return Boolean(n.__REACT_DEVTOOLS_GLOBAL_HOOK__)}registerBrowserDevTools();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export{earlyHookScript}from"./earlyHookScript.js";export function registerBrowserDevTools(r={}){return false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const earlyHookScript="(function(){var w=window;if(w.__REACT_DEVTOOLS_GLOBAL_HOOK__)return;var n=0,r=new Map(),f=function(){};w.__REACT_DEVTOOLS_GLOBAL_HOOK__={renderers:r,supportsFiber:true,inject:function(x){var i=++n;r.set(i,x);return i},onScheduleFiberRoot:f,onCommitFiberRoot:f,onPostCommitFiberRoot:f,onCommitFiberUnmount:f,setStrictMode:f,checkDCE:f}})();";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=100;export function installEarlyNetworkRecorder(){if(typeof window==="undefined")return;const u=window;if(u.__BUOY_EARLY_NETWORK__)return;const d=Date.now;let f=true;const a=[];const y=c=>{a.push(c);if(a.length>p){const t=a.shift();if(t?.kind==="fetch")void t.settled.then(r=>r.clone?.body?.cancel()).catch(()=>{})}};const l=typeof window.fetch==="function"?window.fetch:void 0;if(l){window.fetch=function c(t,r){if(!f)return l.call(window,t,r);let h;try{if(t instanceof Request&&t.body&&!t.bodyUsed&&r?.body===void 0)h=t.clone()}catch{}const i=d();const o=l.call(window,t,r);const n=o.then(e=>{const s=d();const _=/event-stream|ndjson/.test(e.headers.get("content-type")??"");let w;try{if(!_)w=e.clone()}catch{}return{response:e,clone:w,headersAt:s}},e=>({error:e,headersAt:d()}));y({kind:"fetch",input:t,init:r,requestCopy:h,start:i,settled:n});return o}}if(typeof XMLHttpRequest!=="undefined"){const c=XMLHttpRequest.prototype;const{open:t,send:r,setRequestHeader:h}=c;const i=new WeakMap;c.open=function(o,n,...e){if(f)i.set(this,{method:o,url:String(n),headers:{}});return t.call(this,o,n,...e)};c.setRequestHeader=function(o,n){const e=i.get(this);if(e)e.headers[o]=n;return h.call(this,o,n)};c.send=function(o){const n=i.get(this);if(f&&n){i.delete(this);const e=d();const s=this;s.addEventListener("readystatechange",()=>{if(s.readyState===2&&s._buoyTtfb===void 0)s._buoyTtfb=d()-e;if(s.readyState===4)s._buoyEarlyEnd=d()});y({kind:"xhr",xhr:s,method:n.method,url:n.url,headers:n.headers,body:o,start:e})}return r.call(this,o)}}u.__BUOY_EARLY_NETWORK__={version:1,records:a,adopt(){f=false;return a.splice(0)}}}
|