@buoy-gg/core 7.0.41 → 7.0.43
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 -95
- package/bin/buoy.js +19 -340
- package/lib/commonjs/Buoy.js +1 -107
- package/lib/commonjs/browserRegister.js +1 -48
- package/lib/commonjs/browserRegister.server.js +1 -10
- 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 -376
- 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 -150
- package/lib/commonjs/floatingMenu/DefaultConfigContext.js +1 -45
- package/lib/commonjs/floatingMenu/DevToolsSettingsModal.js +1 -18
- package/lib/commonjs/floatingMenu/DevToolsSettingsModal.shared.js +1 -1114
- package/lib/commonjs/floatingMenu/DevToolsSettingsModal.web.js +1 -48
- package/lib/commonjs/floatingMenu/DevToolsVisibilityContext.js +1 -49
- package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -559
- package/lib/commonjs/floatingMenu/FloatingDevTools.web.js +1 -415
- 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 -377
- 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 -471
- package/lib/commonjs/floatingMenu/autoExternalSync.js +1 -443
- 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 -895
- package/lib/commonjs/floatingMenu/dial/DialHyperspace.js +1 -177
- package/lib/commonjs/floatingMenu/dial/DialIcon.js +1 -304
- 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 -12
- 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 -14
- package/lib/commonjs/index.js +1 -291
- package/lib/commonjs/index.web.js +1 -241
- package/lib/commonjs/reactDevtoolsTypes.js +1 -1
- 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 -46
- package/lib/commonjs/utils/createWebTool.js +1 -20
- package/lib/commonjs/utils/createWebTools.js +1 -30
- package/lib/commonjs/version.js +1 -18
- package/lib/module/Buoy.js +1 -102
- package/lib/module/browserRegister.js +1 -44
- package/lib/module/browserRegister.server.js +1 -6
- 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 -368
- 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 -146
- package/lib/module/floatingMenu/DefaultConfigContext.js +1 -39
- package/lib/module/floatingMenu/DevToolsSettingsModal.js +1 -3
- package/lib/module/floatingMenu/DevToolsSettingsModal.shared.js +1 -1110
- package/lib/module/floatingMenu/DevToolsSettingsModal.web.js +1 -44
- package/lib/module/floatingMenu/DevToolsVisibilityContext.js +1 -44
- package/lib/module/floatingMenu/FloatingDevTools.js +1 -556
- package/lib/module/floatingMenu/FloatingDevTools.web.js +1 -412
- 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 -374
- 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 -467
- package/lib/module/floatingMenu/autoExternalSync.js +1 -436
- 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 -891
- package/lib/module/floatingMenu/dial/DialHyperspace.js +1 -173
- package/lib/module/floatingMenu/dial/DialIcon.js +1 -301
- 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 -3
- 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 -10
- package/lib/module/index.js +1 -41
- package/lib/module/index.web.js +1 -36
- package/lib/module/reactDevtoolsTypes.js +1 -1
- 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 -38
- package/lib/module/utils/createWebTool.js +1 -17
- package/lib/module/utils/createWebTools.js +1 -25
- package/lib/module/version.js +1 -14
- package/lib/typescript/commonjs/browserRegister.d.ts +9 -1
- package/lib/typescript/commonjs/browserRegister.server.d.ts +1 -0
- package/lib/typescript/commonjs/earlyHookScript.d.ts +12 -0
- package/lib/typescript/commonjs/earlyNetwork.d.ts +52 -0
- package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/releaseOptIn.d.ts +4 -0
- package/lib/typescript/commonjs/version.d.ts +1 -1
- package/lib/typescript/module/browserRegister.d.ts +9 -1
- package/lib/typescript/module/browserRegister.server.d.ts +1 -0
- package/lib/typescript/module/earlyHookScript.d.ts +12 -0
- package/lib/typescript/module/earlyNetwork.d.ts +52 -0
- package/lib/typescript/module/floatingMenu/defaultConfig.d.ts +1 -1
- package/lib/typescript/module/index.web.d.ts +1 -0
- package/lib/typescript/module/releaseOptIn.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 -2
- package/lib/web/chunks/chunk-R7RGRTY5.mjs +1 -2
- package/lib/web/index.mjs +2 -3
- package/lib/web/register-server.mjs +1 -2
- package/lib/web/register.mjs +1 -2
- package/lib/web/toolkit.mjs +1 -2
- package/package.json +6 -9
- package/lib/typescript/commonjs/Buoy.d.ts.map +0 -1
- package/lib/typescript/commonjs/browserRegister.d.ts.map +0 -1
- package/lib/typescript/commonjs/browserRegister.server.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/BrowserToolRuntime.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.shared.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/floatingMenu/useDesktopSyncStatus.web.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/reactDevtoolsTypes.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/utils/createWebTool.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/createWebTools.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/browserRegister.d.ts.map +0 -1
- package/lib/typescript/module/browserRegister.server.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/BrowserToolRuntime.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.shared.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/floatingMenu/useDesktopSyncStatus.web.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/reactDevtoolsTypes.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/utils/createWebTool.d.ts.map +0 -1
- package/lib/typescript/module/utils/createWebTools.d.ts.map +0 -1
- package/lib/typescript/module/version.d.ts.map +0 -1
- package/lib/web/chunks/chunk-5NZOQR6Q.mjs +0 -2
- package/lib/web/chunks/chunk-CGDSLLZF.mjs +0 -2
- package/lib/web/chunks/chunk-DCJDUSNR.mjs +0 -2
- package/lib/web/chunks/chunk-IDSHFS6G.mjs +0 -2
- package/lib/web/chunks/chunk-JOAMJGCS.mjs +0 -2
- package/lib/web/chunks/chunk-KYKZ2N52.mjs +0 -2
- package/lib/web/chunks/chunk-NGM7JGGS.mjs +0 -2
- package/lib/web/chunks/chunk-Z3XWDDIO.mjs +0 -2
- package/lib/web/chunks/chunk-ZTGQ6TTY.mjs +0 -2
|
@@ -1,92 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.DialSnow = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
/**
|
|
12
|
-
* DialSnow — pale particles drifting down inside the open dial's face, built
|
|
13
|
-
* from the shared background primitives (packages/shared/src/ui/backgrounds).
|
|
14
|
-
*
|
|
15
|
-
* Same performance contract as the backgrounds: the loop is native-driven
|
|
16
|
-
* (useLoop hands the whole animation to the UI thread once — zero JS work per
|
|
17
|
-
* frame), the flakes are one rasterized texture, and the scatter table is
|
|
18
|
-
* generated at module load. Cost while the dial is open: 1 animated node and
|
|
19
|
-
* ~24 static views, mounted only for the dial's lifetime.
|
|
20
|
-
*
|
|
21
|
-
* Rendered inside the circle's `overflow: "hidden"` background. The dial is
|
|
22
|
-
* fixed-size (never user-resized), so sizing geometry from the passed circle
|
|
23
|
-
* size is correct here.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/** Pale mint-ice flake tint — sits quietly on the dial's dark face. */const SNOW_COLOR = "#A8E0D2";
|
|
27
|
-
|
|
28
|
-
/** Stride 3: x, y, size — fixed seed so the flurry is identical every open. */
|
|
29
|
-
const SNOW_COUNT = 12;
|
|
30
|
-
const SNOW_TABLE = (0, _sharedUi.scatter)(0x5ea1, SNOW_COUNT * 3);
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The two-copy tiling trick from the backdrops: everything drawn twice one
|
|
34
|
-
* height apart, translated a full height per loop, so the seam never shows.
|
|
35
|
-
* Sway is keyframed onto the SAME loop value.
|
|
36
|
-
*/
|
|
37
|
-
const DialSnow = exports.DialSnow = /*#__PURE__*/(0, _react.memo)(function DialSnow({
|
|
38
|
-
size
|
|
39
|
-
}) {
|
|
40
|
-
const t = (0, _sharedUi.useLoop)(26000);
|
|
41
|
-
const translateY = t.interpolate({
|
|
42
|
-
inputRange: [0, 1],
|
|
43
|
-
outputRange: [0, size]
|
|
44
|
-
});
|
|
45
|
-
const translateX = t.interpolate({
|
|
46
|
-
inputRange: [0, 0.25, 0.5, 0.75, 1],
|
|
47
|
-
outputRange: [0, 5, 0, -5, 0]
|
|
48
|
-
});
|
|
49
|
-
const flakes = [];
|
|
50
|
-
for (let i = 0; i < SNOW_COUNT; i++) {
|
|
51
|
-
const x = SNOW_TABLE[i * 3] * size;
|
|
52
|
-
const y = SNOW_TABLE[i * 3 + 1] * size;
|
|
53
|
-
// Bigger flakes read nearer, so they get more alpha too.
|
|
54
|
-
const dia = 1.4 + SNOW_TABLE[i * 3 + 2] * 1.2;
|
|
55
|
-
const alpha = 0.28 + SNOW_TABLE[i * 3 + 2] * 0.18;
|
|
56
|
-
for (let copy = 0; copy < 2; copy++) {
|
|
57
|
-
flakes.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
58
|
-
style: {
|
|
59
|
-
position: "absolute",
|
|
60
|
-
left: x - dia / 2,
|
|
61
|
-
top: y + copy * size - dia / 2,
|
|
62
|
-
width: dia,
|
|
63
|
-
height: dia,
|
|
64
|
-
borderRadius: dia / 2,
|
|
65
|
-
backgroundColor: (0, _sharedUi.withBgAlpha)(SNOW_COLOR, alpha)
|
|
66
|
-
}
|
|
67
|
-
}, `${i}-${copy}`));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
71
|
-
style: {
|
|
72
|
-
position: "absolute",
|
|
73
|
-
left: 0,
|
|
74
|
-
top: -size,
|
|
75
|
-
width: size,
|
|
76
|
-
height: size * 2,
|
|
77
|
-
transform: [{
|
|
78
|
-
translateY
|
|
79
|
-
}, {
|
|
80
|
-
translateX
|
|
81
|
-
}]
|
|
82
|
-
},
|
|
83
|
-
pointerEvents: "none",
|
|
84
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.RasterLayer, {
|
|
85
|
-
style: {
|
|
86
|
-
width: size,
|
|
87
|
-
height: size * 2
|
|
88
|
-
},
|
|
89
|
-
children: flakes
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DialSnow=void 0;var _react=require("react");var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");const SNOW_COLOR="#A8E0D2";const SNOW_COUNT=12;const SNOW_TABLE=(0,_sharedUi.scatter)(24225,SNOW_COUNT*3);const DialSnow=exports.DialSnow=(0,_react.memo)(function p({size:t}){const n=(0,_sharedUi.useLoop)(26e3);const i=n.interpolate({inputRange:[0,1],outputRange:[0,t]});const s=n.interpolate({inputRange:[0,.25,.5,.75,1],outputRange:[0,5,0,-5,0]});const a=[];for(let e=0;e<SNOW_COUNT;e++){const u=SNOW_TABLE[e*3]*t;const c=SNOW_TABLE[e*3+1]*t;const o=1.4+SNOW_TABLE[e*3+2]*1.2;const l=.28+SNOW_TABLE[e*3+2]*.18;for(let r=0;r<2;r++){a.push((0,_jsxRuntime.jsx)(_reactNative.View,{style:{position:"absolute",left:u-o/2,top:c+r*t-o/2,width:o,height:o,borderRadius:o/2,backgroundColor:(0,_sharedUi.withBgAlpha)(SNOW_COLOR,l)}},`${e}-${r}`))}}return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{position:"absolute",left:0,top:-t,width:t,height:t*2,transform:[{translateY:i},{translateX:s}]},pointerEvents:"none",children:(0,_jsxRuntime.jsx)(_sharedUi.RasterLayer,{style:{width:t,height:t*2},children:a})})});
|
|
@@ -1,246 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.OnboardingTooltip = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _floatingToolsCore = require("@buoy-gg/floating-tools-core");
|
|
11
|
-
var _onboardingConstants = require("./onboardingConstants");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
// dialColors comes from floating-tools-core — the shared-ui export of the same
|
|
14
|
-
// name is a stale legacy copy and must not be used here.
|
|
15
|
-
|
|
16
|
-
const OnboardingTooltip = ({
|
|
17
|
-
visible,
|
|
18
|
-
onDismiss,
|
|
19
|
-
title = "Welcome to Buoy!",
|
|
20
|
-
message = "Tap the center button to configure and add tools to your dial menu."
|
|
21
|
-
}) => {
|
|
22
|
-
const fadeAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
23
|
-
const scaleAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0.8)).current;
|
|
24
|
-
const pulseAnim = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
|
|
25
|
-
const arrowBounceAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
26
|
-
(0, _react.useEffect)(() => {
|
|
27
|
-
if (visible) {
|
|
28
|
-
// Entrance animation
|
|
29
|
-
_reactNative.Animated.parallel([_reactNative.Animated.timing(fadeAnim, {
|
|
30
|
-
toValue: 1,
|
|
31
|
-
duration: 300,
|
|
32
|
-
easing: _reactNative.Easing.out(_reactNative.Easing.ease),
|
|
33
|
-
useNativeDriver: true
|
|
34
|
-
}), _reactNative.Animated.spring(scaleAnim, {
|
|
35
|
-
toValue: 1,
|
|
36
|
-
damping: 12,
|
|
37
|
-
stiffness: 150,
|
|
38
|
-
useNativeDriver: true
|
|
39
|
-
})]).start();
|
|
40
|
-
|
|
41
|
-
// Continuous pulse animation for the tooltip
|
|
42
|
-
_reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(pulseAnim, {
|
|
43
|
-
toValue: 1.02,
|
|
44
|
-
duration: 1500,
|
|
45
|
-
easing: _reactNative.Easing.inOut(_reactNative.Easing.ease),
|
|
46
|
-
useNativeDriver: true
|
|
47
|
-
}), _reactNative.Animated.timing(pulseAnim, {
|
|
48
|
-
toValue: 1,
|
|
49
|
-
duration: 1500,
|
|
50
|
-
easing: _reactNative.Easing.inOut(_reactNative.Easing.ease),
|
|
51
|
-
useNativeDriver: true
|
|
52
|
-
})])).start();
|
|
53
|
-
|
|
54
|
-
// Bouncing arrow animation
|
|
55
|
-
_reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(arrowBounceAnim, {
|
|
56
|
-
toValue: -8,
|
|
57
|
-
duration: 800,
|
|
58
|
-
easing: _reactNative.Easing.inOut(_reactNative.Easing.ease),
|
|
59
|
-
useNativeDriver: true
|
|
60
|
-
}), _reactNative.Animated.timing(arrowBounceAnim, {
|
|
61
|
-
toValue: 0,
|
|
62
|
-
duration: 800,
|
|
63
|
-
easing: _reactNative.Easing.inOut(_reactNative.Easing.ease),
|
|
64
|
-
useNativeDriver: true
|
|
65
|
-
})])).start();
|
|
66
|
-
} else {
|
|
67
|
-
// Exit animation
|
|
68
|
-
_reactNative.Animated.parallel([_reactNative.Animated.timing(fadeAnim, {
|
|
69
|
-
toValue: 0,
|
|
70
|
-
duration: 200,
|
|
71
|
-
easing: _reactNative.Easing.in(_reactNative.Easing.ease),
|
|
72
|
-
useNativeDriver: true
|
|
73
|
-
}), _reactNative.Animated.timing(scaleAnim, {
|
|
74
|
-
toValue: 0.8,
|
|
75
|
-
duration: 200,
|
|
76
|
-
easing: _reactNative.Easing.in(_reactNative.Easing.ease),
|
|
77
|
-
useNativeDriver: true
|
|
78
|
-
})]).start();
|
|
79
|
-
}
|
|
80
|
-
}, [visible]);
|
|
81
|
-
if (!visible) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
85
|
-
style: [styles.container, {
|
|
86
|
-
opacity: fadeAnim,
|
|
87
|
-
transform: [{
|
|
88
|
-
scale: scaleAnim
|
|
89
|
-
}]
|
|
90
|
-
}],
|
|
91
|
-
pointerEvents: "box-none",
|
|
92
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
93
|
-
style: [styles.tooltipContainer, {
|
|
94
|
-
transform: [{
|
|
95
|
-
scale: pulseAnim
|
|
96
|
-
}]
|
|
97
|
-
}],
|
|
98
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
99
|
-
style: styles.tooltip,
|
|
100
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
101
|
-
style: styles.glowEffect
|
|
102
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
103
|
-
style: styles.content,
|
|
104
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
105
|
-
style: styles.title,
|
|
106
|
-
children: title
|
|
107
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
108
|
-
style: styles.message,
|
|
109
|
-
children: message
|
|
110
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
111
|
-
onPress: onDismiss,
|
|
112
|
-
style: ({
|
|
113
|
-
pressed
|
|
114
|
-
}) => [styles.button, pressed && styles.buttonPressed],
|
|
115
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
116
|
-
style: styles.buttonGradient,
|
|
117
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
118
|
-
style: styles.buttonText,
|
|
119
|
-
children: "Got it!"
|
|
120
|
-
})
|
|
121
|
-
})
|
|
122
|
-
})]
|
|
123
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
124
|
-
style: [styles.arrowContainer, {
|
|
125
|
-
transform: [{
|
|
126
|
-
translateY: arrowBounceAnim
|
|
127
|
-
}]
|
|
128
|
-
}],
|
|
129
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
130
|
-
style: styles.arrow
|
|
131
|
-
})
|
|
132
|
-
})]
|
|
133
|
-
})
|
|
134
|
-
})
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
|
-
exports.OnboardingTooltip = OnboardingTooltip;
|
|
138
|
-
const styles = _reactNative.StyleSheet.create({
|
|
139
|
-
container: {
|
|
140
|
-
..._sharedUi.absoluteFill,
|
|
141
|
-
alignItems: "center",
|
|
142
|
-
justifyContent: "center",
|
|
143
|
-
pointerEvents: "box-none"
|
|
144
|
-
},
|
|
145
|
-
tooltipContainer: {
|
|
146
|
-
position: "absolute",
|
|
147
|
-
bottom: (0, _onboardingConstants.calculateTooltipPosition)(),
|
|
148
|
-
alignItems: "center",
|
|
149
|
-
maxWidth: 280
|
|
150
|
-
},
|
|
151
|
-
tooltip: {
|
|
152
|
-
backgroundColor: _floatingToolsCore.dialColors.dialBackground,
|
|
153
|
-
borderRadius: 16,
|
|
154
|
-
borderWidth: 1,
|
|
155
|
-
borderColor: _floatingToolsCore.dialColors.dialBorder,
|
|
156
|
-
padding: 20,
|
|
157
|
-
shadowColor: _floatingToolsCore.dialColors.dialShadow,
|
|
158
|
-
shadowOffset: {
|
|
159
|
-
width: 0,
|
|
160
|
-
height: 0
|
|
161
|
-
},
|
|
162
|
-
shadowOpacity: 0.6,
|
|
163
|
-
shadowRadius: 20,
|
|
164
|
-
elevation: 10
|
|
165
|
-
},
|
|
166
|
-
glowEffect: {
|
|
167
|
-
position: "absolute",
|
|
168
|
-
top: -4,
|
|
169
|
-
left: -4,
|
|
170
|
-
right: -4,
|
|
171
|
-
bottom: -4,
|
|
172
|
-
borderRadius: 18,
|
|
173
|
-
backgroundColor: "#FFFFFF",
|
|
174
|
-
opacity: 0.06
|
|
175
|
-
},
|
|
176
|
-
content: {
|
|
177
|
-
alignItems: "center",
|
|
178
|
-
gap: 12
|
|
179
|
-
},
|
|
180
|
-
title: {
|
|
181
|
-
color: _floatingToolsCore.dialColors.accent,
|
|
182
|
-
fontSize: 16,
|
|
183
|
-
fontWeight: "900",
|
|
184
|
-
fontFamily: _sharedUi.monoFont,
|
|
185
|
-
letterSpacing: 1,
|
|
186
|
-
textAlign: "center",
|
|
187
|
-
textTransform: "uppercase"
|
|
188
|
-
},
|
|
189
|
-
message: {
|
|
190
|
-
color: _floatingToolsCore.dialColors.centerText,
|
|
191
|
-
fontSize: 13,
|
|
192
|
-
lineHeight: 20,
|
|
193
|
-
textAlign: "center",
|
|
194
|
-
fontFamily: _sharedUi.monoFont
|
|
195
|
-
},
|
|
196
|
-
button: {
|
|
197
|
-
marginTop: 8,
|
|
198
|
-
borderRadius: 8,
|
|
199
|
-
overflow: "hidden"
|
|
200
|
-
},
|
|
201
|
-
buttonPressed: {
|
|
202
|
-
opacity: 0.7,
|
|
203
|
-
transform: [{
|
|
204
|
-
scale: 0.96
|
|
205
|
-
}]
|
|
206
|
-
},
|
|
207
|
-
// Night primary button — accent fill takes dark ink.
|
|
208
|
-
buttonGradient: {
|
|
209
|
-
backgroundColor: _floatingToolsCore.dialColors.accent,
|
|
210
|
-
paddingHorizontal: 24,
|
|
211
|
-
paddingVertical: 10,
|
|
212
|
-
alignItems: "center"
|
|
213
|
-
},
|
|
214
|
-
buttonText: {
|
|
215
|
-
color: "#000000",
|
|
216
|
-
fontSize: 14,
|
|
217
|
-
fontWeight: "900",
|
|
218
|
-
fontFamily: _sharedUi.monoFont,
|
|
219
|
-
letterSpacing: 1.5,
|
|
220
|
-
textTransform: "uppercase"
|
|
221
|
-
},
|
|
222
|
-
arrowContainer: {
|
|
223
|
-
position: "absolute",
|
|
224
|
-
bottom: _onboardingConstants.ARROW_BOTTOM_OFFSET,
|
|
225
|
-
left: 0,
|
|
226
|
-
right: 0,
|
|
227
|
-
alignItems: "center"
|
|
228
|
-
},
|
|
229
|
-
arrow: {
|
|
230
|
-
width: 0,
|
|
231
|
-
height: 0,
|
|
232
|
-
borderLeftWidth: 12,
|
|
233
|
-
borderRightWidth: 12,
|
|
234
|
-
borderTopWidth: _onboardingConstants.ARROW_HEIGHT,
|
|
235
|
-
borderLeftColor: "transparent",
|
|
236
|
-
borderRightColor: "transparent",
|
|
237
|
-
borderTopColor: _floatingToolsCore.dialColors.accent,
|
|
238
|
-
shadowColor: _floatingToolsCore.dialColors.dialShadow,
|
|
239
|
-
shadowOffset: {
|
|
240
|
-
width: 0,
|
|
241
|
-
height: 0
|
|
242
|
-
},
|
|
243
|
-
shadowOpacity: 0.5,
|
|
244
|
-
shadowRadius: 10
|
|
245
|
-
}
|
|
246
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OnboardingTooltip=void 0;var _react=require("react");var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _floatingToolsCore=require("@buoy-gg/floating-tools-core");var _onboardingConstants=require("./onboardingConstants");var _jsxRuntime=require("react/jsx-runtime");const OnboardingTooltip=({visible:e,onDismiss:a,title:r="Welcome to Buoy!",message:s="Tap the center button to configure and add tools to your dial menu."})=>{const t=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;const o=(0,_react.useRef)(new _reactNative.Animated.Value(.8)).current;const i=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;const n=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;(0,_react.useEffect)(()=>{if(e){_reactNative.Animated.parallel([_reactNative.Animated.timing(t,{toValue:1,duration:300,easing:_reactNative.Easing.out(_reactNative.Easing.ease),useNativeDriver:true}),_reactNative.Animated.spring(o,{toValue:1,damping:12,stiffness:150,useNativeDriver:true})]).start();_reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(i,{toValue:1.02,duration:1500,easing:_reactNative.Easing.inOut(_reactNative.Easing.ease),useNativeDriver:true}),_reactNative.Animated.timing(i,{toValue:1,duration:1500,easing:_reactNative.Easing.inOut(_reactNative.Easing.ease),useNativeDriver:true})])).start();_reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(n,{toValue:-8,duration:800,easing:_reactNative.Easing.inOut(_reactNative.Easing.ease),useNativeDriver:true}),_reactNative.Animated.timing(n,{toValue:0,duration:800,easing:_reactNative.Easing.inOut(_reactNative.Easing.ease),useNativeDriver:true})])).start()}else{_reactNative.Animated.parallel([_reactNative.Animated.timing(t,{toValue:0,duration:200,easing:_reactNative.Easing.in(_reactNative.Easing.ease),useNativeDriver:true}),_reactNative.Animated.timing(o,{toValue:.8,duration:200,easing:_reactNative.Easing.in(_reactNative.Easing.ease),useNativeDriver:true})]).start()}},[e]);if(!e){return null}return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.container,{opacity:t,transform:[{scale:o}]}],pointerEvents:"box-none",children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.tooltipContainer,{transform:[{scale:i}]}],children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.tooltip,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.glowEffect}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.content,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:r}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.message,children:s}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:a,style:({pressed:l})=>[styles.button,l&&styles.buttonPressed],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.buttonGradient,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.buttonText,children:"Got it!"})})})]}),(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.arrowContainer,{transform:[{translateY:n}]}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.arrow})})]})})})};exports.OnboardingTooltip=OnboardingTooltip;const styles=_reactNative.StyleSheet.create({container:{..._sharedUi.absoluteFill,alignItems:"center",justifyContent:"center",pointerEvents:"box-none"},tooltipContainer:{position:"absolute",bottom:(0,_onboardingConstants.calculateTooltipPosition)(),alignItems:"center",maxWidth:280},tooltip:{backgroundColor:_floatingToolsCore.dialColors.dialBackground,borderRadius:16,borderWidth:1,borderColor:_floatingToolsCore.dialColors.dialBorder,padding:20,shadowColor:_floatingToolsCore.dialColors.dialShadow,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:20,elevation:10},glowEffect:{position:"absolute",top:-4,left:-4,right:-4,bottom:-4,borderRadius:18,backgroundColor:"#FFFFFF",opacity:.06},content:{alignItems:"center",gap:12},title:{color:_floatingToolsCore.dialColors.accent,fontSize:16,fontWeight:"900",fontFamily:_sharedUi.monoFont,letterSpacing:1,textAlign:"center",textTransform:"uppercase"},message:{color:_floatingToolsCore.dialColors.centerText,fontSize:13,lineHeight:20,textAlign:"center",fontFamily:_sharedUi.monoFont},button:{marginTop:8,borderRadius:8,overflow:"hidden"},buttonPressed:{opacity:.7,transform:[{scale:.96}]},buttonGradient:{backgroundColor:_floatingToolsCore.dialColors.accent,paddingHorizontal:24,paddingVertical:10,alignItems:"center"},buttonText:{color:"#000000",fontSize:14,fontWeight:"900",fontFamily:_sharedUi.monoFont,letterSpacing:1.5,textTransform:"uppercase"},arrowContainer:{position:"absolute",bottom:_onboardingConstants.ARROW_BOTTOM_OFFSET,left:0,right:0,alignItems:"center"},arrow:{width:0,height:0,borderLeftWidth:12,borderRightWidth:12,borderTopWidth:_onboardingConstants.ARROW_HEIGHT,borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:_floatingToolsCore.dialColors.accent,shadowColor:_floatingToolsCore.dialColors.dialShadow,shadowOffset:{width:0,height:0},shadowOpacity:.5,shadowRadius:10}});
|
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.OnboardingTooltip = OnboardingTooltip;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _floatingToolsReact = require("@buoy-gg/floating-tools-react");
|
|
9
|
-
var _onboardingConstantsWeb = require("./onboardingConstants.web.js");
|
|
10
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
/**
|
|
13
|
-
* OnboardingTooltip — Web twin of OnboardingTooltip.tsx.
|
|
14
|
-
* Centered glowing card with a down-pointing arrow, pulse loop, bouncing
|
|
15
|
-
* arrow, and a "Got it!" button. Rendered over a dark backdrop by callers.
|
|
16
|
-
* All values annotated with the native tokens they mirror.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
let onboardingKeyframesInjected = false;
|
|
20
|
-
function injectOnboardingKeyframes() {
|
|
21
|
-
if (onboardingKeyframesInjected || typeof document === 'undefined') return;
|
|
22
|
-
const style = document.createElement('style');
|
|
23
|
-
style.textContent = `
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.OnboardingTooltip=OnboardingTooltip;var _react=require("react");var _floatingToolsReact=require("@buoy-gg/floating-tools-react");var _onboardingConstantsWeb=require("./onboardingConstants.web.js");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");let onboardingKeyframesInjected=false;function injectOnboardingKeyframes(){if(onboardingKeyframesInjected||typeof document==="undefined")return;const e=document.createElement("style");e.textContent=`
|
|
24
2
|
@keyframes buoyOnboardPulse {
|
|
25
3
|
0%, 100% { transform: scale(1); }
|
|
26
4
|
50% { transform: scale(1.02); }
|
|
@@ -29,127 +7,4 @@ function injectOnboardingKeyframes() {
|
|
|
29
7
|
0%, 100% { transform: translateY(0); }
|
|
30
8
|
50% { transform: translateY(-8px); }
|
|
31
9
|
}
|
|
32
|
-
`;
|
|
33
|
-
document.head.appendChild(style);
|
|
34
|
-
onboardingKeyframesInjected = true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// The single brand accent (night accent, #20C997)
|
|
38
|
-
const PRIMARY = _floatingToolsReact.dialColors.accent;
|
|
39
|
-
function OnboardingTooltip({
|
|
40
|
-
title,
|
|
41
|
-
message,
|
|
42
|
-
onDismiss,
|
|
43
|
-
showArrow = true
|
|
44
|
-
}) {
|
|
45
|
-
const [entered, setEntered] = (0, _react.useState)(false);
|
|
46
|
-
const [buttonPressed, setButtonPressed] = (0, _react.useState)(false);
|
|
47
|
-
(0, _react.useEffect)(() => {
|
|
48
|
-
injectOnboardingKeyframes();
|
|
49
|
-
const raf = requestAnimationFrame(() => setEntered(true));
|
|
50
|
-
return () => cancelAnimationFrame(raf);
|
|
51
|
-
}, []);
|
|
52
|
-
const monoLabel = {
|
|
53
|
-
fontFamily: _sharedUi.monoFont,
|
|
54
|
-
textTransform: 'uppercase'
|
|
55
|
-
};
|
|
56
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
57
|
-
style: {
|
|
58
|
-
position: 'fixed',
|
|
59
|
-
left: '50%',
|
|
60
|
-
bottom: (0, _onboardingConstantsWeb.calculateTooltipPosition)(),
|
|
61
|
-
transform: `translateX(-50%) scale(${entered ? 1 : 0.8})`,
|
|
62
|
-
opacity: entered ? 1 : 0,
|
|
63
|
-
// native: fade 300ms + spring scale .8→1
|
|
64
|
-
transition: 'transform 300ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 300ms ease',
|
|
65
|
-
zIndex: 10002,
|
|
66
|
-
pointerEvents: 'auto'
|
|
67
|
-
},
|
|
68
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
69
|
-
style: {
|
|
70
|
-
position: 'relative',
|
|
71
|
-
animation: entered ? 'buoyOnboardPulse 3s ease-in-out infinite' : 'none'
|
|
72
|
-
},
|
|
73
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
74
|
-
style: {
|
|
75
|
-
position: 'absolute',
|
|
76
|
-
inset: -4,
|
|
77
|
-
borderRadius: 18,
|
|
78
|
-
backgroundColor: '#FFFFFF',
|
|
79
|
-
opacity: 0.06
|
|
80
|
-
}
|
|
81
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
82
|
-
style: {
|
|
83
|
-
position: 'relative',
|
|
84
|
-
maxWidth: 280,
|
|
85
|
-
backgroundColor: _floatingToolsReact.dialColors.dialBackground,
|
|
86
|
-
borderRadius: 16,
|
|
87
|
-
border: `1px solid ${_floatingToolsReact.dialColors.dialBorder}`,
|
|
88
|
-
padding: 20,
|
|
89
|
-
boxShadow: `0 0 20px ${(0, _floatingToolsReact.withAlpha)(_floatingToolsReact.dialColors.dialShadow, 0.6)}`,
|
|
90
|
-
display: 'flex',
|
|
91
|
-
flexDirection: 'column',
|
|
92
|
-
alignItems: 'center',
|
|
93
|
-
gap: 8
|
|
94
|
-
},
|
|
95
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
96
|
-
style: {
|
|
97
|
-
...monoLabel,
|
|
98
|
-
fontSize: 16,
|
|
99
|
-
fontWeight: 900,
|
|
100
|
-
letterSpacing: 1,
|
|
101
|
-
color: PRIMARY,
|
|
102
|
-
textAlign: 'center'
|
|
103
|
-
},
|
|
104
|
-
children: title
|
|
105
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
106
|
-
style: {
|
|
107
|
-
fontFamily: _sharedUi.monoFont,
|
|
108
|
-
fontSize: 13,
|
|
109
|
-
lineHeight: '20px',
|
|
110
|
-
color: _floatingToolsReact.dialColors.centerText,
|
|
111
|
-
textAlign: 'center'
|
|
112
|
-
},
|
|
113
|
-
children: message
|
|
114
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
115
|
-
onClick: onDismiss,
|
|
116
|
-
onMouseDown: () => setButtonPressed(true),
|
|
117
|
-
onMouseUp: () => setButtonPressed(false),
|
|
118
|
-
onMouseLeave: () => setButtonPressed(false),
|
|
119
|
-
style: {
|
|
120
|
-
...monoLabel,
|
|
121
|
-
marginTop: 8,
|
|
122
|
-
borderRadius: 8,
|
|
123
|
-
// night primary button — accent fill takes dark ink
|
|
124
|
-
border: 'none',
|
|
125
|
-
backgroundColor: PRIMARY,
|
|
126
|
-
padding: '10px 24px',
|
|
127
|
-
fontSize: 14,
|
|
128
|
-
fontWeight: 900,
|
|
129
|
-
letterSpacing: 1.5,
|
|
130
|
-
color: '#000000',
|
|
131
|
-
cursor: 'pointer',
|
|
132
|
-
opacity: buttonPressed ? 0.7 : 1,
|
|
133
|
-
transform: buttonPressed ? 'scale(0.96)' : 'scale(1)',
|
|
134
|
-
transition: 'transform 100ms ease, opacity 100ms ease'
|
|
135
|
-
},
|
|
136
|
-
children: "Got it!"
|
|
137
|
-
})]
|
|
138
|
-
}), showArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
139
|
-
style: {
|
|
140
|
-
position: 'absolute',
|
|
141
|
-
left: '50%',
|
|
142
|
-
bottom: _onboardingConstantsWeb.ARROW_BOTTOM_OFFSET,
|
|
143
|
-
marginLeft: -12,
|
|
144
|
-
width: 0,
|
|
145
|
-
height: 0,
|
|
146
|
-
borderLeft: '12px solid transparent',
|
|
147
|
-
borderRight: '12px solid transparent',
|
|
148
|
-
borderTop: `${_onboardingConstantsWeb.ARROW_HEIGHT}px solid ${PRIMARY}`,
|
|
149
|
-
filter: `drop-shadow(0 0 10px ${(0, _floatingToolsReact.withAlpha)(_floatingToolsReact.dialColors.dialShadow, 0.5)})`,
|
|
150
|
-
animation: entered ? 'buoyOnboardArrowBounce 1.6s ease-in-out infinite' : 'none'
|
|
151
|
-
}
|
|
152
|
-
})]
|
|
153
|
-
})
|
|
154
|
-
});
|
|
155
|
-
}
|
|
10
|
+
`;document.head.appendChild(e);onboardingKeyframesInjected=true}const PRIMARY=_floatingToolsReact.dialColors.accent;function OnboardingTooltip({title:e,message:a,onDismiss:i,showArrow:s=true}){const[o,l]=(0,_react.useState)(false);const[n,t]=(0,_react.useState)(false);(0,_react.useEffect)(()=>{injectOnboardingKeyframes();const d=requestAnimationFrame(()=>l(true));return()=>cancelAnimationFrame(d)},[]);const r={fontFamily:_sharedUi.monoFont,textTransform:"uppercase"};return(0,_jsxRuntime.jsx)("div",{style:{position:"fixed",left:"50%",bottom:(0,_onboardingConstantsWeb.calculateTooltipPosition)(),transform:`translateX(-50%) scale(${o?1:.8})`,opacity:o?1:0,transition:"transform 300ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 300ms ease",zIndex:10002,pointerEvents:"auto"},children:(0,_jsxRuntime.jsxs)("div",{style:{position:"relative",animation:o?"buoyOnboardPulse 3s ease-in-out infinite":"none"},children:[(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",inset:-4,borderRadius:18,backgroundColor:"#FFFFFF",opacity:.06}}),(0,_jsxRuntime.jsxs)("div",{style:{position:"relative",maxWidth:280,backgroundColor:_floatingToolsReact.dialColors.dialBackground,borderRadius:16,border:`1px solid ${_floatingToolsReact.dialColors.dialBorder}`,padding:20,boxShadow:`0 0 20px ${(0,_floatingToolsReact.withAlpha)(_floatingToolsReact.dialColors.dialShadow,.6)}`,display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[(0,_jsxRuntime.jsx)("span",{style:{...r,fontSize:16,fontWeight:900,letterSpacing:1,color:PRIMARY,textAlign:"center"},children:e}),(0,_jsxRuntime.jsx)("span",{style:{fontFamily:_sharedUi.monoFont,fontSize:13,lineHeight:"20px",color:_floatingToolsReact.dialColors.centerText,textAlign:"center"},children:a}),(0,_jsxRuntime.jsx)("button",{onClick:i,onMouseDown:()=>t(true),onMouseUp:()=>t(false),onMouseLeave:()=>t(false),style:{...r,marginTop:8,borderRadius:8,border:"none",backgroundColor:PRIMARY,padding:"10px 24px",fontSize:14,fontWeight:900,letterSpacing:1.5,color:"#000000",cursor:"pointer",opacity:n?.7:1,transform:n?"scale(0.96)":"scale(1)",transition:"transform 100ms ease, opacity 100ms ease"},children:"Got it!"})]}),s&&(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",left:"50%",bottom:_onboardingConstantsWeb.ARROW_BOTTOM_OFFSET,marginLeft:-12,width:0,height:0,borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderTop:`${_onboardingConstantsWeb.ARROW_HEIGHT}px solid ${PRIMARY}`,filter:`drop-shadow(0 0 10px ${(0,_floatingToolsReact.withAlpha)(_floatingToolsReact.dialColors.dialShadow,.5)})`,animation:o?"buoyOnboardArrowBounce 1.6s ease-in-out infinite":"none"}})]})})}
|
|
@@ -1,93 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getRankedToolIds = getRankedToolIds;
|
|
7
|
-
exports.isDialUsageLoaded = isDialUsageLoaded;
|
|
8
|
-
exports.loadDialUsage = loadDialUsage;
|
|
9
|
-
exports.recordToolUsage = recordToolUsage;
|
|
10
|
-
exports.resetDialUsage = resetDialUsage;
|
|
11
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
12
|
-
var _floatingToolsCore = require("@buoy-gg/floating-tools-core");
|
|
13
|
-
/**
|
|
14
|
-
* Persists dial usage and orders tools by their last launch.
|
|
15
|
-
* The cache loads on import so opening the dial can rank tools synchronously.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
const STORAGE_KEY = _sharedUi.devToolsStorageKeys.dial.usage();
|
|
19
|
-
let cache = {};
|
|
20
|
-
let loaded = false;
|
|
21
|
-
let loadPromise = null;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Load persisted usage data into the in-memory cache. Safe to call multiple
|
|
25
|
-
* times — the underlying read happens only once.
|
|
26
|
-
*/
|
|
27
|
-
function loadDialUsage() {
|
|
28
|
-
if (loadPromise) return loadPromise;
|
|
29
|
-
loadPromise = (async () => {
|
|
30
|
-
try {
|
|
31
|
-
const raw = await _sharedUi.persistentStorage.getItem(STORAGE_KEY);
|
|
32
|
-
if (raw) {
|
|
33
|
-
const parsed = JSON.parse(raw);
|
|
34
|
-
if (parsed && typeof parsed === "object") {
|
|
35
|
-
cache = parsed;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
} catch {
|
|
39
|
-
// Ignore — start with an empty usage map.
|
|
40
|
-
} finally {
|
|
41
|
-
loaded = true;
|
|
42
|
-
}
|
|
43
|
-
})();
|
|
44
|
-
return loadPromise;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Kick off the load as soon as this module is imported.
|
|
48
|
-
void loadDialUsage();
|
|
49
|
-
|
|
50
|
-
/** Whether the usage cache has finished loading from storage. */
|
|
51
|
-
function isDialUsageLoaded() {
|
|
52
|
-
return loaded;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** Most recently opened first; unused tools keep registration order. */
|
|
56
|
-
function getRankedToolIds(orderedIds) {
|
|
57
|
-
return orderedIds.map((id, index) => ({
|
|
58
|
-
id,
|
|
59
|
-
index,
|
|
60
|
-
lastUsed: cache[id]?.lastUsed ?? 0
|
|
61
|
-
})).sort((a, b) => b.lastUsed - a.lastUsed || a.index - b.index).map(({
|
|
62
|
-
id
|
|
63
|
-
}) => id);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Record a single press of a tool and persist the updated usage map.
|
|
68
|
-
*
|
|
69
|
-
* @param id - Tool id that was pressed
|
|
70
|
-
*/
|
|
71
|
-
async function recordToolUsage(id) {
|
|
72
|
-
if (!id) return;
|
|
73
|
-
if (!loaded) await loadDialUsage();
|
|
74
|
-
|
|
75
|
-
// Preserve launch order even when presses share a timestamp or the clock moves back.
|
|
76
|
-
const now = Math.max(Date.now(), ...Object.values(cache).map(entry => entry.lastUsed + 1));
|
|
77
|
-
cache = (0, _floatingToolsCore.pruneUsage)((0, _floatingToolsCore.recordUsage)(cache, id, now), now);
|
|
78
|
-
try {
|
|
79
|
-
await _sharedUi.persistentStorage.setItem(STORAGE_KEY, JSON.stringify(cache));
|
|
80
|
-
} catch {
|
|
81
|
-
// Ignore persistence failure — the in-memory cache is still updated.
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/** Clear all usage data (in-memory and persisted). */
|
|
86
|
-
async function resetDialUsage() {
|
|
87
|
-
cache = {};
|
|
88
|
-
try {
|
|
89
|
-
await _sharedUi.persistentStorage.removeItem(STORAGE_KEY);
|
|
90
|
-
} catch {
|
|
91
|
-
// Ignore — the in-memory cache is already cleared.
|
|
92
|
-
}
|
|
93
|
-
}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getRankedToolIds=getRankedToolIds;exports.isDialUsageLoaded=isDialUsageLoaded;exports.loadDialUsage=loadDialUsage;exports.recordToolUsage=recordToolUsage;exports.resetDialUsage=resetDialUsage;var _sharedUi=require("@buoy-gg/shared-ui");var _floatingToolsCore=require("@buoy-gg/floating-tools-core");const STORAGE_KEY=_sharedUi.devToolsStorageKeys.dial.usage();let cache={};let loaded=false;let loadPromise=null;function loadDialUsage(){if(loadPromise)return loadPromise;loadPromise=(async()=>{try{const t=await _sharedUi.persistentStorage.getItem(STORAGE_KEY);if(t){const e=JSON.parse(t);if(e&&typeof e==="object"){cache=e}}}catch{}finally{loaded=true}})();return loadPromise}void loadDialUsage();function isDialUsageLoaded(){return loaded}function getRankedToolIds(t){return t.map((e,a)=>({id:e,index:a,lastUsed:cache[e]?.lastUsed??0})).sort((e,a)=>a.lastUsed-e.lastUsed||e.index-a.index).map(({id:e})=>e)}async function recordToolUsage(t){if(!t)return;if(!loaded)await loadDialUsage();const e=Math.max(Date.now(),...Object.values(cache).map(a=>a.lastUsed+1));cache=(0,_floatingToolsCore.pruneUsage)((0,_floatingToolsCore.recordUsage)(cache,t,e),e);try{await _sharedUi.persistentStorage.setItem(STORAGE_KEY,JSON.stringify(cache))}catch{}}async function resetDialUsage(){cache={};try{await _sharedUi.persistentStorage.removeItem(STORAGE_KEY)}catch{}}
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "ARROW_BOTTOM_OFFSET", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _sharedUi.ARROW_BOTTOM_OFFSET;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ARROW_HEIGHT", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _sharedUi.ARROW_HEIGHT;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "SPACING_GAP", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _sharedUi.SPACING_GAP;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "calculateTargetPosition", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _sharedUi.calculateTargetPosition;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "calculateTooltipPosition", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _sharedUi.calculateTooltipPosition;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "getScreenCenterY", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _sharedUi.getScreenCenterY;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"ARROW_BOTTOM_OFFSET",{enumerable:true,get:function(){return _sharedUi.ARROW_BOTTOM_OFFSET}});Object.defineProperty(exports,"ARROW_HEIGHT",{enumerable:true,get:function(){return _sharedUi.ARROW_HEIGHT}});Object.defineProperty(exports,"SPACING_GAP",{enumerable:true,get:function(){return _sharedUi.SPACING_GAP}});Object.defineProperty(exports,"calculateTargetPosition",{enumerable:true,get:function(){return _sharedUi.calculateTargetPosition}});Object.defineProperty(exports,"calculateTooltipPosition",{enumerable:true,get:function(){return _sharedUi.calculateTooltipPosition}});Object.defineProperty(exports,"getScreenCenterY",{enumerable:true,get:function(){return _sharedUi.getScreenCenterY}});var _sharedUi=require("@buoy-gg/shared-ui");
|