@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.
Files changed (269) hide show
  1. package/README.md +14 -85
  2. package/bin/buoy.js +20 -347
  3. package/lib/commonjs/Buoy.js +1 -107
  4. package/lib/commonjs/browserRegister.js +1 -0
  5. package/lib/commonjs/browserRegister.server.js +1 -0
  6. package/lib/commonjs/earlyHookScript.js +1 -0
  7. package/lib/commonjs/earlyNetwork.js +1 -0
  8. package/lib/commonjs/floatingMenu/AppHost.js +1 -460
  9. package/lib/commonjs/floatingMenu/AppHost.web.js +1 -364
  10. package/lib/commonjs/floatingMenu/AppHostLogic.js +1 -50
  11. package/lib/commonjs/floatingMenu/AppIcon.js +1 -91
  12. package/lib/commonjs/floatingMenu/AppIcon.web.js +1 -53
  13. package/lib/commonjs/floatingMenu/BrowserToolRuntime.js +1 -0
  14. package/lib/commonjs/floatingMenu/DefaultConfigContext.js +1 -45
  15. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.js +1 -1119
  16. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.shared.js +1 -0
  17. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.web.js +1 -1048
  18. package/lib/commonjs/floatingMenu/DevToolsVisibilityContext.js +1 -49
  19. package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -554
  20. package/lib/commonjs/floatingMenu/FloatingDevTools.web.js +1 -401
  21. package/lib/commonjs/floatingMenu/FloatingMenu.js +1 -371
  22. package/lib/commonjs/floatingMenu/MinimizedToolsContext.js +1 -274
  23. package/lib/commonjs/floatingMenu/MinimizedToolsStack.js +1 -288
  24. package/lib/commonjs/floatingMenu/MinimizedToolsStack.web.js +1 -371
  25. package/lib/commonjs/floatingMenu/ToggleStateManager.js +1 -36
  26. package/lib/commonjs/floatingMenu/ToolHost.js +1 -281
  27. package/lib/commonjs/floatingMenu/ToolOpenerBridge.js +1 -41
  28. package/lib/commonjs/floatingMenu/autoDiscoverPresets.js +1 -461
  29. package/lib/commonjs/floatingMenu/autoExternalSync.js +1 -434
  30. package/lib/commonjs/floatingMenu/defaultConfig.js +1 -167
  31. package/lib/commonjs/floatingMenu/deviceIdentity.js +1 -173
  32. package/lib/commonjs/floatingMenu/dial/DialDevTools.js +1 -904
  33. package/lib/commonjs/floatingMenu/dial/DialDevTools.web.js +1 -821
  34. package/lib/commonjs/floatingMenu/dial/DialHyperspace.js +1 -177
  35. package/lib/commonjs/floatingMenu/dial/DialIcon.js +1 -302
  36. package/lib/commonjs/floatingMenu/dial/DialPagination.js +1 -165
  37. package/lib/commonjs/floatingMenu/dial/DialSnow.js +1 -92
  38. package/lib/commonjs/floatingMenu/dial/OnboardingTooltip.js +1 -246
  39. package/lib/commonjs/floatingMenu/dial/OnboardingTooltip.web.js +2 -147
  40. package/lib/commonjs/floatingMenu/dial/dialUsageStore.js +1 -93
  41. package/lib/commonjs/floatingMenu/dial/onboardingConstants.js +1 -42
  42. package/lib/commonjs/floatingMenu/dial/onboardingConstants.web.js +1 -42
  43. package/lib/commonjs/floatingMenu/externalSyncGate.js +1 -49
  44. package/lib/commonjs/floatingMenu/floatingTools.js +1 -42
  45. package/lib/commonjs/floatingMenu/floatingTools.web.js +1 -30
  46. package/lib/commonjs/floatingMenu/optionalRequire.js +1 -37
  47. package/lib/commonjs/floatingMenu/settingsBus.js +1 -23
  48. package/lib/commonjs/floatingMenu/sync/appSyncAdapter.js +1 -115
  49. package/lib/commonjs/floatingMenu/types.js +1 -5
  50. package/lib/commonjs/floatingMenu/useDesktopSyncStatus.js +1 -28
  51. package/lib/commonjs/floatingMenu/useDesktopSyncStatus.web.js +1 -0
  52. package/lib/commonjs/index.js +1 -291
  53. package/lib/commonjs/index.web.js +1 -150
  54. package/lib/commonjs/reactDevtoolsTypes.js +1 -0
  55. package/lib/commonjs/releaseOptIn.js +1 -0
  56. package/lib/commonjs/telemetry/installPing.js +1 -131
  57. package/lib/commonjs/toolkit.js +1 -584
  58. package/lib/commonjs/toolkitComponents.js +1 -241
  59. package/lib/commonjs/utils/autoDiscoverPresets.web.js +1 -219
  60. package/lib/commonjs/utils/createWebTool.js +1 -0
  61. package/lib/commonjs/utils/createWebTools.js +1 -0
  62. package/lib/commonjs/version.js +1 -18
  63. package/lib/module/Buoy.js +1 -102
  64. package/lib/module/browserRegister.js +1 -0
  65. package/lib/module/browserRegister.server.js +1 -0
  66. package/lib/module/earlyHookScript.js +1 -0
  67. package/lib/module/earlyNetwork.js +1 -0
  68. package/lib/module/floatingMenu/AppHost.js +1 -452
  69. package/lib/module/floatingMenu/AppHost.web.js +1 -356
  70. package/lib/module/floatingMenu/AppHostLogic.js +1 -45
  71. package/lib/module/floatingMenu/AppIcon.js +1 -84
  72. package/lib/module/floatingMenu/AppIcon.web.js +1 -47
  73. package/lib/module/floatingMenu/BrowserToolRuntime.js +1 -0
  74. package/lib/module/floatingMenu/DefaultConfigContext.js +1 -39
  75. package/lib/module/floatingMenu/DevToolsSettingsModal.js +1 -1115
  76. package/lib/module/floatingMenu/DevToolsSettingsModal.shared.js +1 -0
  77. package/lib/module/floatingMenu/DevToolsSettingsModal.web.js +1 -1055
  78. package/lib/module/floatingMenu/DevToolsVisibilityContext.js +1 -44
  79. package/lib/module/floatingMenu/FloatingDevTools.js +1 -551
  80. package/lib/module/floatingMenu/FloatingDevTools.web.js +1 -399
  81. package/lib/module/floatingMenu/FloatingMenu.js +1 -366
  82. package/lib/module/floatingMenu/MinimizedToolsContext.js +1 -266
  83. package/lib/module/floatingMenu/MinimizedToolsStack.js +1 -285
  84. package/lib/module/floatingMenu/MinimizedToolsStack.web.js +1 -368
  85. package/lib/module/floatingMenu/ToggleStateManager.js +1 -32
  86. package/lib/module/floatingMenu/ToolHost.js +1 -273
  87. package/lib/module/floatingMenu/ToolOpenerBridge.js +1 -37
  88. package/lib/module/floatingMenu/autoDiscoverPresets.js +1 -457
  89. package/lib/module/floatingMenu/autoExternalSync.js +1 -427
  90. package/lib/module/floatingMenu/defaultConfig.js +1 -158
  91. package/lib/module/floatingMenu/deviceIdentity.js +1 -163
  92. package/lib/module/floatingMenu/dial/DialDevTools.js +1 -900
  93. package/lib/module/floatingMenu/dial/DialDevTools.web.js +1 -818
  94. package/lib/module/floatingMenu/dial/DialHyperspace.js +1 -173
  95. package/lib/module/floatingMenu/dial/DialIcon.js +1 -299
  96. package/lib/module/floatingMenu/dial/DialPagination.js +1 -160
  97. package/lib/module/floatingMenu/dial/DialSnow.js +1 -90
  98. package/lib/module/floatingMenu/dial/OnboardingTooltip.js +1 -240
  99. package/lib/module/floatingMenu/dial/OnboardingTooltip.web.js +2 -142
  100. package/lib/module/floatingMenu/dial/dialUsageStore.js +1 -85
  101. package/lib/module/floatingMenu/dial/onboardingConstants.js +1 -3
  102. package/lib/module/floatingMenu/dial/onboardingConstants.web.js +1 -3
  103. package/lib/module/floatingMenu/externalSyncGate.js +1 -44
  104. package/lib/module/floatingMenu/floatingTools.js +1 -27
  105. package/lib/module/floatingMenu/floatingTools.web.js +1 -3
  106. package/lib/module/floatingMenu/optionalRequire.js +1 -33
  107. package/lib/module/floatingMenu/settingsBus.js +1 -19
  108. package/lib/module/floatingMenu/sync/appSyncAdapter.js +1 -112
  109. package/lib/module/floatingMenu/types.js +1 -3
  110. package/lib/module/floatingMenu/useDesktopSyncStatus.js +1 -25
  111. package/lib/module/floatingMenu/useDesktopSyncStatus.web.js +1 -0
  112. package/lib/module/index.js +1 -41
  113. package/lib/module/index.web.js +1 -29
  114. package/lib/module/reactDevtoolsTypes.js +1 -0
  115. package/lib/module/releaseOptIn.js +1 -0
  116. package/lib/module/telemetry/installPing.js +1 -127
  117. package/lib/module/toolkit.js +1 -62
  118. package/lib/module/toolkitComponents.js +1 -230
  119. package/lib/module/utils/autoDiscoverPresets.web.js +1 -213
  120. package/lib/module/utils/createWebTool.js +1 -0
  121. package/lib/module/utils/createWebTools.js +1 -0
  122. package/lib/module/version.js +1 -14
  123. package/lib/typescript/commonjs/browserRegister.d.ts +13 -0
  124. package/lib/typescript/commonjs/browserRegister.server.d.ts +6 -0
  125. package/lib/typescript/commonjs/earlyHookScript.d.ts +12 -0
  126. package/lib/typescript/commonjs/earlyNetwork.d.ts +52 -0
  127. package/lib/typescript/commonjs/floatingMenu/AppHost.web.d.ts +3 -3
  128. package/lib/typescript/commonjs/floatingMenu/BrowserToolRuntime.d.ts +14 -0
  129. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts +2 -67
  130. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.shared.d.ts +71 -0
  131. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.web.d.ts +3 -16
  132. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.web.d.ts +12 -6
  133. package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts +1 -1
  134. package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts +1 -9
  135. package/lib/typescript/commonjs/floatingMenu/useDesktopSyncStatus.web.d.ts +3 -0
  136. package/lib/typescript/commonjs/index.web.d.ts +7 -0
  137. package/lib/typescript/commonjs/reactDevtoolsTypes.d.ts +8 -0
  138. package/lib/typescript/commonjs/releaseOptIn.d.ts +4 -0
  139. package/lib/typescript/commonjs/utils/autoDiscoverPresets.web.d.ts +3 -40
  140. package/lib/typescript/commonjs/utils/createWebTool.d.ts +6 -0
  141. package/lib/typescript/commonjs/utils/createWebTools.d.ts +4 -0
  142. package/lib/typescript/commonjs/version.d.ts +1 -1
  143. package/lib/typescript/module/browserRegister.d.ts +13 -0
  144. package/lib/typescript/module/browserRegister.server.d.ts +6 -0
  145. package/lib/typescript/module/earlyHookScript.d.ts +12 -0
  146. package/lib/typescript/module/earlyNetwork.d.ts +52 -0
  147. package/lib/typescript/module/floatingMenu/AppHost.web.d.ts +3 -3
  148. package/lib/typescript/module/floatingMenu/BrowserToolRuntime.d.ts +14 -0
  149. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts +2 -67
  150. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.shared.d.ts +71 -0
  151. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.web.d.ts +3 -16
  152. package/lib/typescript/module/floatingMenu/FloatingDevTools.web.d.ts +12 -6
  153. package/lib/typescript/module/floatingMenu/defaultConfig.d.ts +1 -1
  154. package/lib/typescript/module/floatingMenu/settingsBus.d.ts +1 -9
  155. package/lib/typescript/module/floatingMenu/useDesktopSyncStatus.web.d.ts +3 -0
  156. package/lib/typescript/module/index.web.d.ts +7 -0
  157. package/lib/typescript/module/reactDevtoolsTypes.d.ts +8 -0
  158. package/lib/typescript/module/releaseOptIn.d.ts +4 -0
  159. package/lib/typescript/module/utils/autoDiscoverPresets.web.d.ts +3 -40
  160. package/lib/typescript/module/utils/createWebTool.d.ts +6 -0
  161. package/lib/typescript/module/utils/createWebTools.d.ts +4 -0
  162. package/lib/typescript/module/version.d.ts +1 -1
  163. package/lib/web/chunks/chunk-5SGL6QL4.mjs +1 -0
  164. package/lib/web/chunks/chunk-FROELTJH.mjs +1 -0
  165. package/lib/web/chunks/chunk-QZDVCMCT.mjs +1 -0
  166. package/lib/web/chunks/chunk-R7RGRTY5.mjs +1 -0
  167. package/lib/web/index.mjs +10 -0
  168. package/lib/web/register-server.mjs +1 -0
  169. package/lib/web/register.mjs +1 -0
  170. package/lib/web/toolkit.mjs +1 -0
  171. package/package.json +50 -12
  172. package/lib/typescript/commonjs/Buoy.d.ts.map +0 -1
  173. package/lib/typescript/commonjs/floatingMenu/AppHost.d.ts.map +0 -1
  174. package/lib/typescript/commonjs/floatingMenu/AppHost.web.d.ts.map +0 -1
  175. package/lib/typescript/commonjs/floatingMenu/AppHostLogic.d.ts.map +0 -1
  176. package/lib/typescript/commonjs/floatingMenu/AppIcon.d.ts.map +0 -1
  177. package/lib/typescript/commonjs/floatingMenu/AppIcon.web.d.ts.map +0 -1
  178. package/lib/typescript/commonjs/floatingMenu/DefaultConfigContext.d.ts.map +0 -1
  179. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts.map +0 -1
  180. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.web.d.ts.map +0 -1
  181. package/lib/typescript/commonjs/floatingMenu/DevToolsVisibilityContext.d.ts.map +0 -1
  182. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts.map +0 -1
  183. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.web.d.ts.map +0 -1
  184. package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts.map +0 -1
  185. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsContext.d.ts.map +0 -1
  186. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.d.ts.map +0 -1
  187. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.web.d.ts.map +0 -1
  188. package/lib/typescript/commonjs/floatingMenu/ToggleStateManager.d.ts.map +0 -1
  189. package/lib/typescript/commonjs/floatingMenu/ToolHost.d.ts.map +0 -1
  190. package/lib/typescript/commonjs/floatingMenu/ToolOpenerBridge.d.ts.map +0 -1
  191. package/lib/typescript/commonjs/floatingMenu/autoDiscoverPresets.d.ts.map +0 -1
  192. package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts.map +0 -1
  193. package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts.map +0 -1
  194. package/lib/typescript/commonjs/floatingMenu/deviceIdentity.d.ts.map +0 -1
  195. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts.map +0 -1
  196. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.web.d.ts.map +0 -1
  197. package/lib/typescript/commonjs/floatingMenu/dial/DialHyperspace.d.ts.map +0 -1
  198. package/lib/typescript/commonjs/floatingMenu/dial/DialIcon.d.ts.map +0 -1
  199. package/lib/typescript/commonjs/floatingMenu/dial/DialPagination.d.ts.map +0 -1
  200. package/lib/typescript/commonjs/floatingMenu/dial/DialSnow.d.ts.map +0 -1
  201. package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.d.ts.map +0 -1
  202. package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.web.d.ts.map +0 -1
  203. package/lib/typescript/commonjs/floatingMenu/dial/dialUsageStore.d.ts.map +0 -1
  204. package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.d.ts.map +0 -1
  205. package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.web.d.ts.map +0 -1
  206. package/lib/typescript/commonjs/floatingMenu/externalSyncGate.d.ts.map +0 -1
  207. package/lib/typescript/commonjs/floatingMenu/floatingTools.d.ts.map +0 -1
  208. package/lib/typescript/commonjs/floatingMenu/floatingTools.web.d.ts.map +0 -1
  209. package/lib/typescript/commonjs/floatingMenu/optionalRequire.d.ts.map +0 -1
  210. package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts.map +0 -1
  211. package/lib/typescript/commonjs/floatingMenu/sync/appSyncAdapter.d.ts.map +0 -1
  212. package/lib/typescript/commonjs/floatingMenu/types.d.ts.map +0 -1
  213. package/lib/typescript/commonjs/floatingMenu/useDesktopSyncStatus.d.ts.map +0 -1
  214. package/lib/typescript/commonjs/index.d.ts.map +0 -1
  215. package/lib/typescript/commonjs/index.web.d.ts.map +0 -1
  216. package/lib/typescript/commonjs/telemetry/installPing.d.ts.map +0 -1
  217. package/lib/typescript/commonjs/toolkit.d.ts.map +0 -1
  218. package/lib/typescript/commonjs/toolkitComponents.d.ts.map +0 -1
  219. package/lib/typescript/commonjs/utils/autoDiscoverPresets.web.d.ts.map +0 -1
  220. package/lib/typescript/commonjs/version.d.ts.map +0 -1
  221. package/lib/typescript/module/Buoy.d.ts.map +0 -1
  222. package/lib/typescript/module/floatingMenu/AppHost.d.ts.map +0 -1
  223. package/lib/typescript/module/floatingMenu/AppHost.web.d.ts.map +0 -1
  224. package/lib/typescript/module/floatingMenu/AppHostLogic.d.ts.map +0 -1
  225. package/lib/typescript/module/floatingMenu/AppIcon.d.ts.map +0 -1
  226. package/lib/typescript/module/floatingMenu/AppIcon.web.d.ts.map +0 -1
  227. package/lib/typescript/module/floatingMenu/DefaultConfigContext.d.ts.map +0 -1
  228. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts.map +0 -1
  229. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.web.d.ts.map +0 -1
  230. package/lib/typescript/module/floatingMenu/DevToolsVisibilityContext.d.ts.map +0 -1
  231. package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts.map +0 -1
  232. package/lib/typescript/module/floatingMenu/FloatingDevTools.web.d.ts.map +0 -1
  233. package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts.map +0 -1
  234. package/lib/typescript/module/floatingMenu/MinimizedToolsContext.d.ts.map +0 -1
  235. package/lib/typescript/module/floatingMenu/MinimizedToolsStack.d.ts.map +0 -1
  236. package/lib/typescript/module/floatingMenu/MinimizedToolsStack.web.d.ts.map +0 -1
  237. package/lib/typescript/module/floatingMenu/ToggleStateManager.d.ts.map +0 -1
  238. package/lib/typescript/module/floatingMenu/ToolHost.d.ts.map +0 -1
  239. package/lib/typescript/module/floatingMenu/ToolOpenerBridge.d.ts.map +0 -1
  240. package/lib/typescript/module/floatingMenu/autoDiscoverPresets.d.ts.map +0 -1
  241. package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts.map +0 -1
  242. package/lib/typescript/module/floatingMenu/defaultConfig.d.ts.map +0 -1
  243. package/lib/typescript/module/floatingMenu/deviceIdentity.d.ts.map +0 -1
  244. package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts.map +0 -1
  245. package/lib/typescript/module/floatingMenu/dial/DialDevTools.web.d.ts.map +0 -1
  246. package/lib/typescript/module/floatingMenu/dial/DialHyperspace.d.ts.map +0 -1
  247. package/lib/typescript/module/floatingMenu/dial/DialIcon.d.ts.map +0 -1
  248. package/lib/typescript/module/floatingMenu/dial/DialPagination.d.ts.map +0 -1
  249. package/lib/typescript/module/floatingMenu/dial/DialSnow.d.ts.map +0 -1
  250. package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.d.ts.map +0 -1
  251. package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.web.d.ts.map +0 -1
  252. package/lib/typescript/module/floatingMenu/dial/dialUsageStore.d.ts.map +0 -1
  253. package/lib/typescript/module/floatingMenu/dial/onboardingConstants.d.ts.map +0 -1
  254. package/lib/typescript/module/floatingMenu/dial/onboardingConstants.web.d.ts.map +0 -1
  255. package/lib/typescript/module/floatingMenu/externalSyncGate.d.ts.map +0 -1
  256. package/lib/typescript/module/floatingMenu/floatingTools.d.ts.map +0 -1
  257. package/lib/typescript/module/floatingMenu/floatingTools.web.d.ts.map +0 -1
  258. package/lib/typescript/module/floatingMenu/optionalRequire.d.ts.map +0 -1
  259. package/lib/typescript/module/floatingMenu/settingsBus.d.ts.map +0 -1
  260. package/lib/typescript/module/floatingMenu/sync/appSyncAdapter.d.ts.map +0 -1
  261. package/lib/typescript/module/floatingMenu/types.d.ts.map +0 -1
  262. package/lib/typescript/module/floatingMenu/useDesktopSyncStatus.d.ts.map +0 -1
  263. package/lib/typescript/module/index.d.ts.map +0 -1
  264. package/lib/typescript/module/index.web.d.ts.map +0 -1
  265. package/lib/typescript/module/telemetry/installPing.d.ts.map +0 -1
  266. package/lib/typescript/module/toolkit.d.ts.map +0 -1
  267. package/lib/typescript/module/toolkitComponents.d.ts.map +0 -1
  268. package/lib/typescript/module/utils/autoDiscoverPresets.web.d.ts.map +0 -1
  269. package/lib/typescript/module/version.d.ts.map +0 -1
@@ -1,177 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DialHyperspace = 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
- * DialHyperspace — the Hyperspace backdrop's lightspeed starfield, scaled
13
- * down to live inside the open dial's face. Replaces DialSnow (kept next
14
- * door for an easy swap back) so the dial matches the tool background.
15
- *
16
- * Same construction as the full preset (shared-ui
17
- * `backgrounds/variants/hyperspace.tsx`, see its header for the derivation):
18
- * the Skia original's per-frame `screen = plane/z` projection becomes scale
19
- * keyframes on phase-offset shells — a layer scaled by 1/z moves every star
20
- * outward on the true hyperbolic curve — with each shell's wrap snap hidden
21
- * inside the fade the original applies to the first/last 6% of a star's
22
- * life. Dial tuning: fewer stars, a slightly gentler cycle and lower alpha
23
- * so the field reads behind the icons instead of competing with them.
24
- * Stars are round crisp points, as in the original — never streaks.
25
- *
26
- * Cost while the dial is open: 1 animated node, ~48 static views — the same
27
- * budget DialSnow ran. The dial is fixed-size (never user-resized), so
28
- * sizing geometry from the passed circle size is correct here, and the
29
- * circle's `overflow: "hidden"` clips the streaks.
30
- */
31
-
32
- const Z_SPAN = 0.94;
33
- const MAX_SCALE = 6;
34
- const CYCLE_MS = 2400;
35
- const SHELLS = 3;
36
- const STARS_PER_SHELL = 16;
37
- /** Stride 4: angle, radius, size jitter, palette pick — fixed seeds so the
38
- * field is identical every open. */
39
- const SHELL_TABLES = Array.from({
40
- length: SHELLS
41
- }, (_, k) => (0, _sharedUi.scatter)(0x5747 ^ k * 0x9e37, STARS_PER_SHELL * 4));
42
- const STAR_COLORS = ["#FFFFFF", "#B3D9FF", "#8CB3FF"];
43
-
44
- /** The dial face draws 6 grid spokes, one every 60° starting at 0°. Star
45
- * motion is radial (uniform scale about the centre), so a star whose angle
46
- * sits near a spoke rides that line for its entire life. Remap the uniform
47
- * angle pick into the clear wedge between spokes, leaving `SPOKE_GAP` of
48
- * clearance centred on each line. */
49
- const SPOKE_STEP = Math.PI / 3;
50
- const SPOKE_GAP = 14 * Math.PI / 180;
51
- function spokeClearAngle(u) {
52
- const sector = Math.min(5, Math.floor(u * 6));
53
- const t = u * 6 - sector;
54
- return sector * SPOKE_STEP + SPOKE_GAP / 2 + t * (SPOKE_STEP - SPOKE_GAP);
55
- }
56
- function scaleAt(p) {
57
- return Math.min(MAX_SCALE, 1 / (1 - p * Z_SPAN));
58
- }
59
- function opacityAt(p) {
60
- let bright = 0.15 + 0.85 * p * p;
61
- // The original's 6% fade at both ends of a star's life.
62
- if (p < 0.06) bright *= p / 0.06;else if (p > 0.94) bright *= (1 - p) / 0.06;
63
- // Dial tuning: never brighter than 0.7 — the icons own the foreground.
64
- return Math.min(0.7, bright);
65
- }
66
-
67
- /** Interpolate stops for shell k (phase = (v + k/K) mod 1), the wrap point
68
- * double-sampled 1e-4 apart inside the zero-opacity sliver. */
69
- function shellStops(k) {
70
- const offset = k / SHELLS;
71
- const vs = [];
72
- const SEGMENTS = 12;
73
- for (let i = 0; i <= SEGMENTS; i++) vs.push(i / SEGMENTS);
74
- const vWrap = (1 - offset) % 1;
75
- if (vWrap > 1e-3 && vWrap < 1 - 1e-3) vs.push(vWrap - 1e-4, vWrap + 1e-4);
76
- vs.sort((a, b) => a - b);
77
- const input = [];
78
- const scale = [];
79
- const opacity = [];
80
- for (const v of vs) {
81
- // At the loop boundary the offset-0 shell's phase must read as END of
82
- // life (p=1, max scale, zero opacity), not wrap to 0 — otherwise the
83
- // last segment lerps scale 6→1 at visible opacity and the stars
84
- // retract to the centre once per cycle.
85
- const p = offset === 0 && v === 1 ? 1 : (v + offset) % 1;
86
- input.push(v);
87
- scale.push(scaleAt(p));
88
- opacity.push(opacityAt(p));
89
- }
90
- return {
91
- input,
92
- scale,
93
- opacity
94
- };
95
- }
96
- const SHELL_STOPS = Array.from({
97
- length: SHELLS
98
- }, (_, k) => shellStops(k));
99
- const DialHyperspace = exports.DialHyperspace = /*#__PURE__*/(0, _react.memo)(function DialHyperspace({
100
- size
101
- }) {
102
- const drive = (0, _sharedUi.useLoop)(CYCLE_MS);
103
- const c = size / 2;
104
- const shells = [];
105
- for (let k = 0; k < SHELLS; k++) {
106
- const table = SHELL_TABLES[k];
107
- const stops = SHELL_STOPS[k];
108
- const stars = [];
109
- for (let i = 0; i < STARS_PER_SHELL; i++) {
110
- const ang = spokeClearAngle(table[i * 4]);
111
- // sqrt-biased outward, inner 15% clear of the vanishing point. Offsets
112
- // scale with the HALF-extent, as in the original's projection.
113
- const rad = (0.15 + 0.85 * Math.sqrt(table[i * 4 + 1])) * 0.5 * c;
114
- const color = STAR_COLORS[Math.floor(table[i * 4 + 3] * STAR_COLORS.length) % 3];
115
- const x = c + Math.cos(ang) * rad;
116
- const y = c + Math.sin(ang) * rad;
117
- // Round crisp points, as in the original — the visible star is the
118
- // sprite's lit core (~12.5% of the stamp), so it starts sub-pixel and
119
- // only reaches ~2-3px before the fade-out kills it. A soft halo disc
120
- // at α0.3 stands in for the sprite's blur.
121
- const core = 0.6;
122
- const halo = core * 2.4;
123
- stars.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
124
- style: {
125
- position: "absolute",
126
- left: x - halo / 2,
127
- top: y - halo / 2,
128
- width: halo,
129
- height: halo,
130
- borderRadius: halo / 2,
131
- backgroundColor: (0, _sharedUi.withBgAlpha)(color, 0.3)
132
- }
133
- }, `${i}-h`), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
134
- style: {
135
- position: "absolute",
136
- left: x - core / 2,
137
- top: y - core / 2,
138
- width: core,
139
- height: core,
140
- borderRadius: core / 2,
141
- backgroundColor: color
142
- }
143
- }, i));
144
- }
145
- shells.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
146
- style: {
147
- position: "absolute",
148
- left: 0,
149
- top: 0,
150
- width: size,
151
- height: size,
152
- opacity: drive.interpolate({
153
- inputRange: stops.input,
154
- outputRange: stops.opacity
155
- }),
156
- transform: [{
157
- scale: drive.interpolate({
158
- inputRange: stops.input,
159
- outputRange: stops.scale
160
- })
161
- }]
162
- },
163
- pointerEvents: "none",
164
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.RasterLayer, {
165
- style: {
166
- width: size,
167
- height: size
168
- },
169
- raster: false,
170
- children: stars
171
- })
172
- }, k));
173
- }
174
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
175
- children: shells
176
- });
177
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DialHyperspace=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 Z_SPAN=.94;const MAX_SCALE=6;const CYCLE_MS=2400;const SHELLS=3;const STARS_PER_SHELL=16;const SHELL_TABLES=Array.from({length:SHELLS},(e,t)=>(0,_sharedUi.scatter)(22343^t*40503,STARS_PER_SHELL*4));const STAR_COLORS=["#FFFFFF","#B3D9FF","#8CB3FF"];const SPOKE_STEP=Math.PI/3;const SPOKE_GAP=14*Math.PI/180;function spokeClearAngle(e){const t=Math.min(5,Math.floor(e*6));const n=e*6-t;return t*SPOKE_STEP+SPOKE_GAP/2+n*(SPOKE_STEP-SPOKE_GAP)}function scaleAt(e){return Math.min(MAX_SCALE,1/(1-e*Z_SPAN))}function opacityAt(e){let t=.15+.85*e*e;if(e<.06)t*=e/.06;else if(e>.94)t*=(1-e)/.06;return Math.min(.7,t)}function shellStops(e){const t=e/SHELLS;const n=[];const i=12;for(let o=0;o<=i;o++)n.push(o/i);const a=(1-t)%1;if(a>.001&&a<1-.001)n.push(a-1e-4,a+1e-4);n.sort((o,s)=>o-s);const r=[];const l=[];const c=[];for(const o of n){const s=t===0&&o===1?1:(o+t)%1;r.push(o);l.push(scaleAt(s));c.push(opacityAt(s))}return{input:r,scale:l,opacity:c}}const SHELL_STOPS=Array.from({length:SHELLS},(e,t)=>shellStops(t));const DialHyperspace=exports.DialHyperspace=(0,_react.memo)(function e({size:t}){const n=(0,_sharedUi.useLoop)(CYCLE_MS);const i=t/2;const a=[];for(let r=0;r<SHELLS;r++){const l=SHELL_TABLES[r];const c=SHELL_STOPS[r];const o=[];for(let s=0;s<STARS_PER_SHELL;s++){const p=spokeClearAngle(l[s*4]);const f=(.15+.85*Math.sqrt(l[s*4+1]))*.5*i;const d=STAR_COLORS[Math.floor(l[s*4+3]*STAR_COLORS.length)%3];const S=i+Math.cos(p)*f;const g=i+Math.sin(p)*f;const u=.6;const h=u*2.4;o.push((0,_jsxRuntime.jsx)(_reactNative.View,{style:{position:"absolute",left:S-h/2,top:g-h/2,width:h,height:h,borderRadius:h/2,backgroundColor:(0,_sharedUi.withBgAlpha)(d,.3)}},`${s}-h`),(0,_jsxRuntime.jsx)(_reactNative.View,{style:{position:"absolute",left:S-u/2,top:g-u/2,width:u,height:u,borderRadius:u/2,backgroundColor:d}},s))}a.push((0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{position:"absolute",left:0,top:0,width:t,height:t,opacity:n.interpolate({inputRange:c.input,outputRange:c.opacity}),transform:[{scale:n.interpolate({inputRange:c.input,outputRange:c.scale})}]},pointerEvents:"none",children:(0,_jsxRuntime.jsx)(_sharedUi.RasterLayer,{style:{width:t,height:t},raster:false,children:o})},r))}return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:a})});
@@ -1,302 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DialIcon = void 0;
7
- var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _floatingToolsCore = require("@buoy-gg/floating-tools-core");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- /** Full names agents wait for (`waitFor: "Network"`), not the truncated glyph. */const DIAL_A11Y = {
12
- network: "Network",
13
- images: "Images",
14
- "image-overlay": "Image Overlay",
15
- assets: "Assets",
16
- query: "React Query",
17
- storage: "Storage",
18
- env: "Env",
19
- console: "Console",
20
- events: "Events",
21
- redux: "Redux",
22
- zustand: "Zustand",
23
- jotai: "Jotai",
24
- "route-events": "Routes",
25
- "time-machine": "Time Machine",
26
- "highlight-updates": "Highlight Updates",
27
- "debug-borders": "Debug Borders",
28
- "perf-monitor": "Perf Monitor",
29
- "js-top": "JS Top",
30
- "js-top-modal": "JS Top",
31
- impersonate: "Impersonate",
32
- "perf-monitor-modal": "Perf Monitor"
33
- };
34
- function dialAccessibilityLabel(id, name) {
35
- if (id && DIAL_A11Y[id]) return DIAL_A11Y[id];
36
- return name;
37
- }
38
-
39
- // The circle radius depends on the live window width and is computed inside
40
- // the component (must match DialDevTools' circle, which does the same).
41
- const VIEW_SIZE = _floatingToolsCore.DIAL_ICON_SIZE;
42
- const DialIcon = ({
43
- index,
44
- icon,
45
- iconsProgress,
46
- onPress,
47
- totalIcons,
48
- active
49
- }) => {
50
- // Animation values - using interpolation for better performance
51
- const scale = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
52
- const {
53
- width: screenWidth
54
- } = (0, _reactNative.useWindowDimensions)();
55
- const layout = (0, _react.useMemo)(() => (0, _floatingToolsCore.getDialLayout)({
56
- screenWidth
57
- }), [screenWidth]);
58
-
59
- // Hover animation on press in/out - using shared config
60
- // Fallback values in case dialAnimationConfig hasn't loaded yet
61
- const iconAnimConfig = _floatingToolsCore.dialAnimationConfig?.icons ?? {
62
- pressIn: {
63
- scale: 0.95,
64
- damping: 15,
65
- stiffness: 400
66
- },
67
- pressOut: {
68
- scale: 1,
69
- damping: 15,
70
- stiffness: 400
71
- }
72
- };
73
- const {
74
- pressIn,
75
- pressOut
76
- } = iconAnimConfig;
77
- const handlePressIn = () => {
78
- _reactNative.Animated.spring(scale, {
79
- toValue: pressIn.scale,
80
- damping: pressIn.damping,
81
- stiffness: pressIn.stiffness,
82
- useNativeDriver: true
83
- }).start();
84
- };
85
- const handlePressOut = () => {
86
- _reactNative.Animated.spring(scale, {
87
- toValue: pressOut.scale,
88
- damping: pressOut.damping,
89
- stiffness: pressOut.stiffness,
90
- useNativeDriver: true
91
- }).start();
92
- };
93
-
94
- // Position + spiral-entrance interpolations depend only on the (fixed) slot
95
- // index, so compute them once. This keeps re-renders — which happen on every
96
- // page change as `active` toggles — cheap.
97
- const motion = (0, _react.useMemo)(() => {
98
- const iconPosition = (0, _floatingToolsCore.getIconPosition)(index, totalIcons, layout.iconRadius, _floatingToolsCore.DIAL_START_ANGLE);
99
- const {
100
- x: finalX,
101
- y: finalY,
102
- angle
103
- } = iconPosition;
104
- const radius = layout.iconRadius;
105
- const staggerInputRange = (0, _floatingToolsCore.getIconStaggerInputRange)(index, totalIcons);
106
-
107
- // Use interpolation for smooth animation that works both directions
108
- const staggeredProgress = iconsProgress.interpolate({
109
- inputRange: staggerInputRange,
110
- outputRange: [0, 0, 1, 1],
111
- extrapolate: "clamp"
112
- });
113
-
114
- // Spiral animation with interpolation
115
- const spiralRotation = staggeredProgress.interpolate({
116
- inputRange: [0, 1],
117
- outputRange: [Math.PI * 2, 0] // Spiral from 2π to 0
118
- });
119
-
120
- // Distance from center
121
- const distance = staggeredProgress.interpolate({
122
- inputRange: [0, 1],
123
- outputRange: [0, radius]
124
- });
125
-
126
- // Calculate X and Y positions using Animated operations
127
- const translateX = _reactNative.Animated.add(_reactNative.Animated.multiply(distance, spiralRotation.interpolate({
128
- inputRange: [0, Math.PI * 2],
129
- outputRange: [Math.cos(angle), Math.cos(angle + Math.PI * 2)]
130
- })), staggeredProgress.interpolate({
131
- inputRange: [0, 1],
132
- outputRange: [0, finalX - radius * Math.cos(angle + Math.PI * 2)]
133
- }));
134
- const translateY = _reactNative.Animated.add(_reactNative.Animated.multiply(distance, spiralRotation.interpolate({
135
- inputRange: [0, Math.PI * 2],
136
- outputRange: [Math.sin(angle), Math.sin(angle + Math.PI * 2)]
137
- })), staggeredProgress.interpolate({
138
- inputRange: [0, 1],
139
- outputRange: [0, finalY - radius * Math.sin(angle + Math.PI * 2)]
140
- }));
141
-
142
- // Opacity animation
143
- const itemOpacity = staggeredProgress.interpolate({
144
- inputRange: [0, 0.3, 1],
145
- outputRange: [0, 0.3, 1]
146
- });
147
- return {
148
- translateX,
149
- translateY,
150
- itemOpacity,
151
- progressScale: staggeredProgress
152
- };
153
- }, [index, totalIcons, iconsProgress, layout]);
154
-
155
- // Main animated style for position and appearance
156
- const animatedStyle = {
157
- position: "absolute",
158
- left: layout.circleRadius - VIEW_SIZE / 2,
159
- // Center position
160
- top: layout.circleRadius - VIEW_SIZE / 2,
161
- // Center position
162
- opacity: motion.itemOpacity,
163
- transform: [{
164
- translateX: motion.translateX
165
- },
166
- // Apply translation from center
167
- {
168
- translateY: motion.translateY
169
- },
170
- // Apply translation from center
171
- {
172
- scale: _reactNative.Animated.multiply(scale, motion.progressScale)
173
- }]
174
- };
175
-
176
- // Check if this is an empty spot (no icon and no iconComponent)
177
- const isEmpty = icon.icon === null && !icon.iconComponent;
178
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
179
- style: [styles.view, animatedStyle, !active && styles.hidden],
180
- children: isEmpty ?
181
- /*#__PURE__*/
182
- // Empty spot - just show a subtle circle
183
- (0, _jsxRuntime.jsx)(_reactNative.View, {
184
- style: styles.emptySpot,
185
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
186
- style: styles.emptyDot
187
- })
188
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
189
- onPress: () => onPress(icon),
190
- onPressIn: handlePressIn,
191
- onPressOut: handlePressOut,
192
- style: styles.pressable,
193
- testID: icon.id ? `buoy-dial-${icon.id}` : undefined,
194
- accessibilityLabel: dialAccessibilityLabel(icon.id, icon.name),
195
- accessibilityRole: "button",
196
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
197
- style: [styles.iconGradientBg, {
198
- backgroundColor: "rgba(0, 0, 0, 0.2)"
199
- }]
200
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
201
- style: [styles.iconInnerGlow, {
202
- backgroundColor: "rgba(255, 255, 255, 0.02)"
203
- }]
204
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
205
- style: styles.iconWrapper,
206
- children: icon.iconComponent ? (() => {
207
- const IconComp = icon.iconComponent;
208
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComp, {
209
- slot: "dial",
210
- size: _floatingToolsCore.DIAL_ICON_GLYPH_SIZE
211
- });
212
- })() : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
213
- style: styles.iconClamp,
214
- children: icon.icon
215
- })
216
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
217
- style: styles.label,
218
- numberOfLines: 1,
219
- adjustsFontSizeToFit: true,
220
- minimumFontScale: 0.7,
221
- children: icon.name.toUpperCase()
222
- })]
223
- })
224
- });
225
- };
226
- exports.DialIcon = DialIcon;
227
- const styles = _reactNative.StyleSheet.create({
228
- view: {
229
- width: VIEW_SIZE,
230
- height: VIEW_SIZE,
231
- justifyContent: "center",
232
- alignItems: "center"
233
- },
234
- hidden: {
235
- display: "none"
236
- },
237
- pressable: {
238
- width: "100%",
239
- height: "100%",
240
- justifyContent: "center",
241
- alignItems: "center",
242
- padding: 4,
243
- backgroundColor: "transparent"
244
- },
245
- iconGradientBg: {
246
- position: "absolute",
247
- width: "85%",
248
- height: "85%",
249
- borderRadius: 12,
250
- opacity: 0.3
251
- },
252
- iconInnerGlow: {
253
- position: "absolute",
254
- width: "70%",
255
- height: "70%",
256
- borderRadius: 10,
257
- opacity: 0.5
258
- },
259
- iconWrapper: {
260
- marginBottom: 4,
261
- alignItems: "center",
262
- justifyContent: "center"
263
- },
264
- /**
265
- * Hard clamp for PRE-RENDERED icon nodes (icon.icon) — the path where the
266
- * glyph's size is baked in by whoever created the node (consumer custom
267
- * tools) rather than controlled here. The
268
- * fixed overflow-hidden box guarantees an oversized node can never blow past
269
- * its slot and dwarf neighboring icons — worst case it center-crops. The
270
- * iconComponent path stays unclipped: we render it at DIAL_ICON_GLYPH_SIZE
271
- * ourselves, and clipping would shave off the icons' glow shadows.
272
- */
273
- iconClamp: {
274
- width: _floatingToolsCore.DIAL_ICON_GLYPH_SIZE,
275
- height: _floatingToolsCore.DIAL_ICON_GLYPH_SIZE,
276
- alignItems: "center",
277
- justifyContent: "center",
278
- overflow: "hidden"
279
- },
280
- label: {
281
- fontSize: _floatingToolsCore.dialStyles.icon.label.fontSize,
282
- fontWeight: _floatingToolsCore.dialStyles.icon.label.fontWeight,
283
- letterSpacing: _floatingToolsCore.dialStyles.icon.label.letterSpacing,
284
- fontFamily: _floatingToolsCore.dialStyles.icon.label.fontFamily,
285
- marginTop: _floatingToolsCore.dialStyles.icon.label.marginTop,
286
- color: _floatingToolsCore.dialColors.iconLabel
287
- },
288
- emptySpot: {
289
- width: "100%",
290
- height: "100%",
291
- justifyContent: "center",
292
- alignItems: "center"
293
- },
294
- emptyDot: {
295
- width: _floatingToolsCore.dialStyles.emptySlot.dotSize,
296
- height: _floatingToolsCore.dialStyles.emptySlot.dotSize,
297
- borderRadius: _floatingToolsCore.dialStyles.emptySlot.dotSize / 2,
298
- backgroundColor: _floatingToolsCore.dialColors.emptyDotBackground,
299
- borderWidth: _floatingToolsCore.dialStyles.emptySlot.borderWidth,
300
- borderColor: _floatingToolsCore.dialColors.emptyDotBorder
301
- }
302
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DialIcon=void 0;var _react=require("react");var _reactNative=require("react-native");var _floatingToolsCore=require("@buoy-gg/floating-tools-core");var _jsxRuntime=require("react/jsx-runtime");const DIAL_A11Y={network:"Network",images:"Images","image-overlay":"Image Overlay",assets:"Assets",query:"React Query",storage:"Storage",env:"Env",console:"Console",events:"Events",redux:"Redux",zustand:"Zustand",jotai:"Jotai","route-events":"Routes","time-machine":"Time Machine",clock:"Clock","highlight-updates":"Highlight Updates","debug-borders":"Debug Borders","perf-monitor":"Bench HUD","js-top":"JS Top","js-top-modal":"JS Top",impersonate:"Impersonate","perf-monitor-modal":"Bench"};function dialAccessibilityLabel(t,e){if(t&&DIAL_A11Y[t])return DIAL_A11Y[t];return e}const VIEW_SIZE=_floatingToolsCore.DIAL_ICON_SIZE;const DialIcon=({index:t,icon:e,iconsProgress:p,onPress:y,totalIcons:s,active:I})=>{const r=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;const{width:g}=(0,_reactNative.useWindowDimensions)();const a=(0,_react.useMemo)(()=>(0,_floatingToolsCore.getDialLayout)({screenWidth:g}),[g]);const f=_floatingToolsCore.dialAnimationConfig?.icons??{pressIn:{scale:.95,damping:15,stiffness:400},pressOut:{scale:1,damping:15,stiffness:400}};const{pressIn:l,pressOut:c}=f;const b=()=>{_reactNative.Animated.spring(r,{toValue:l.scale,damping:l.damping,stiffness:l.stiffness,useNativeDriver:true}).start()};const S=()=>{_reactNative.Animated.spring(r,{toValue:c.scale,damping:c.damping,stiffness:c.stiffness,useNativeDriver:true}).start()};const o=(0,_react.useMemo)(()=>{const d=(0,_floatingToolsCore.getIconPosition)(t,s,a.iconRadius,_floatingToolsCore.DIAL_START_ANGLE);const{x:w,y:j,angle:n}=d;const u=a.iconRadius;const v=(0,_floatingToolsCore.getIconStaggerInputRange)(t,s);const i=p.interpolate({inputRange:v,outputRange:[0,0,1,1],extrapolate:"clamp"});const m=i.interpolate({inputRange:[0,1],outputRange:[Math.PI*2,0]});const h=i.interpolate({inputRange:[0,1],outputRange:[0,u]});const A=_reactNative.Animated.add(_reactNative.Animated.multiply(h,m.interpolate({inputRange:[0,Math.PI*2],outputRange:[Math.cos(n),Math.cos(n+Math.PI*2)]})),i.interpolate({inputRange:[0,1],outputRange:[0,w-u*Math.cos(n+Math.PI*2)]}));const _=_reactNative.Animated.add(_reactNative.Animated.multiply(h,m.interpolate({inputRange:[0,Math.PI*2],outputRange:[Math.sin(n),Math.sin(n+Math.PI*2)]})),i.interpolate({inputRange:[0,1],outputRange:[0,j-u*Math.sin(n+Math.PI*2)]}));const D=i.interpolate({inputRange:[0,.3,1],outputRange:[0,.3,1]});return{translateX:A,translateY:_,itemOpacity:D,progressScale:i}},[t,s,p,a]);const R={position:"absolute",left:a.circleRadius-VIEW_SIZE/2,top:a.circleRadius-VIEW_SIZE/2,opacity:o.itemOpacity,transform:[{translateX:o.translateX},{translateY:o.translateY},{scale:_reactNative.Animated.multiply(r,o.progressScale)}]};const C=e.icon===null&&!e.iconComponent;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.view,R,!I&&styles.hidden],children:C?(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.emptySpot,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.emptyDot})}):(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:()=>y(e),onPressIn:b,onPressOut:S,style:styles.pressable,testID:e.id?`buoy-dial-${e.id}`:void 0,accessibilityLabel:dialAccessibilityLabel(e.id,e.name),accessibilityRole:"button",children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.iconGradientBg,{backgroundColor:"rgba(0, 0, 0, 0.2)"}]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.iconInnerGlow,{backgroundColor:"rgba(255, 255, 255, 0.02)"}]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.iconWrapper,children:e.iconComponent?(()=>{const d=e.iconComponent;return(0,_jsxRuntime.jsx)(d,{slot:"dial",size:_floatingToolsCore.DIAL_ICON_GLYPH_SIZE})})():(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.iconClamp,children:e.icon})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.label,numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.7,children:e.name.toUpperCase()})]})})};exports.DialIcon=DialIcon;const styles=_reactNative.StyleSheet.create({view:{width:VIEW_SIZE,height:VIEW_SIZE,justifyContent:"center",alignItems:"center"},hidden:{display:"none"},pressable:{width:"100%",height:"100%",justifyContent:"center",alignItems:"center",padding:4,backgroundColor:"transparent"},iconGradientBg:{position:"absolute",width:"85%",height:"85%",borderRadius:12,opacity:.3},iconInnerGlow:{position:"absolute",width:"70%",height:"70%",borderRadius:10,opacity:.5},iconWrapper:{marginBottom:4,alignItems:"center",justifyContent:"center"},iconClamp:{width:_floatingToolsCore.DIAL_ICON_GLYPH_SIZE,height:_floatingToolsCore.DIAL_ICON_GLYPH_SIZE,alignItems:"center",justifyContent:"center",overflow:"hidden"},label:{fontSize:_floatingToolsCore.dialStyles.icon.label.fontSize,fontWeight:_floatingToolsCore.dialStyles.icon.label.fontWeight,letterSpacing:_floatingToolsCore.dialStyles.icon.label.letterSpacing,fontFamily:_floatingToolsCore.dialStyles.icon.label.fontFamily,marginTop:_floatingToolsCore.dialStyles.icon.label.marginTop,color:_floatingToolsCore.dialColors.iconLabel},emptySpot:{width:"100%",height:"100%",justifyContent:"center",alignItems:"center"},emptyDot:{width:_floatingToolsCore.dialStyles.emptySlot.dotSize,height:_floatingToolsCore.dialStyles.emptySlot.dotSize,borderRadius:_floatingToolsCore.dialStyles.emptySlot.dotSize/2,backgroundColor:_floatingToolsCore.dialColors.emptyDotBackground,borderWidth:_floatingToolsCore.dialStyles.emptySlot.borderWidth,borderColor:_floatingToolsCore.dialColors.emptyDotBorder}});
@@ -1,165 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DialPagination = 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 _jsxRuntime = require("react/jsx-runtime");
12
- /** Pad a 1-based page number to two digits, e.g. 3 -> "03". */
13
- const pad = n => String(n).padStart(2, "0");
14
- /**
15
- * A single pager button. Press feedback is driven by a native-driver
16
- * `Animated` value via `onPressIn`/`onPressOut` — so the scale reacts
17
- * instantly on the UI thread, with no JS re-render in the press path.
18
- */
19
- const PagerButton = ({
20
- side,
21
- label,
22
- disabled,
23
- onPress
24
- }) => {
25
- const scale = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
26
- const springTo = toValue => {
27
- _reactNative.Animated.spring(scale, {
28
- toValue,
29
- damping: 15,
30
- stiffness: 400,
31
- useNativeDriver: true
32
- }).start();
33
- };
34
- const accent = disabled ? _floatingToolsCore.dialColors.emptyDotBorder : _floatingToolsCore.dialColors.accent;
35
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
36
- style: {
37
- transform: [{
38
- scale
39
- }]
40
- },
41
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
42
- testID: `buoy-dial-${side}`,
43
- accessibilityRole: "button",
44
- accessibilityLabel: `${side === "prev" ? "Previous" : "Next"} dial page`,
45
- accessibilityState: {
46
- disabled
47
- },
48
- disabled: disabled,
49
- onPress: onPress,
50
- onPressIn: () => !disabled && springTo(0.92),
51
- onPressOut: () => springTo(1),
52
- style: [styles.button, disabled && styles.buttonDisabled],
53
- children: [side === "prev" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronLeft, {
54
- size: 18,
55
- color: accent
56
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
57
- style: [styles.buttonText, disabled && styles.buttonTextDisabled],
58
- children: label
59
- }), side === "next" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronRight, {
60
- size: 18,
61
- color: accent
62
- })]
63
- })
64
- });
65
- };
66
-
67
- /**
68
- * Prev/Next pager shown below the dial when there are more dial tools than
69
- * fit on a single page. Tools are ranked by usage, so paging walks from the
70
- * most-used tools toward the least-used.
71
- */
72
- const DialPagination = ({
73
- page,
74
- pageCount,
75
- onPrev,
76
- onNext,
77
- animatedStyle
78
- }) => {
79
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
80
- style: [styles.container, animatedStyle],
81
- pointerEvents: "box-none",
82
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(PagerButton, {
83
- side: "prev",
84
- label: "PREV",
85
- disabled: page <= 0,
86
- onPress: onPrev
87
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
88
- style: styles.indicator,
89
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
90
- style: styles.indicatorText,
91
- testID: "buoy-dial-page",
92
- children: [pad(page + 1), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
93
- style: styles.indicatorTextDim,
94
- children: [" / ", pad(pageCount)]
95
- })]
96
- })
97
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(PagerButton, {
98
- side: "next",
99
- label: "NEXT",
100
- disabled: page >= pageCount - 1,
101
- onPress: onNext
102
- })]
103
- });
104
- };
105
- exports.DialPagination = DialPagination;
106
- const styles = _reactNative.StyleSheet.create({
107
- container: {
108
- flexDirection: "row",
109
- alignItems: "center",
110
- justifyContent: "space-between"
111
- },
112
- button: {
113
- flexDirection: "row",
114
- alignItems: "center",
115
- gap: 4,
116
- paddingHorizontal: 16,
117
- paddingVertical: 10,
118
- borderRadius: 10,
119
- borderWidth: 1,
120
- borderColor: _floatingToolsCore.dialColors.dialBorder,
121
- backgroundColor: _floatingToolsCore.dialColors.dialBackground,
122
- shadowColor: _floatingToolsCore.dialColors.dialShadow,
123
- shadowOffset: {
124
- width: 0,
125
- height: 0
126
- },
127
- shadowOpacity: 0.4,
128
- shadowRadius: 8,
129
- elevation: 6
130
- },
131
- buttonDisabled: {
132
- opacity: 0.4
133
- },
134
- buttonText: {
135
- color: _floatingToolsCore.dialColors.centerText,
136
- fontSize: 12,
137
- fontWeight: "900",
138
- fontFamily: _sharedUi.monoFont,
139
- letterSpacing: 1.5
140
- },
141
- buttonTextDisabled: {
142
- color: _floatingToolsCore.dialColors.iconLabelMuted
143
- },
144
- indicator: {
145
- paddingHorizontal: 12,
146
- paddingVertical: 6
147
- },
148
- indicatorText: {
149
- color: _floatingToolsCore.dialColors.centerText,
150
- fontSize: 13,
151
- fontWeight: "900",
152
- fontFamily: _sharedUi.monoFont,
153
- letterSpacing: 2,
154
- textShadowColor: _floatingToolsCore.dialColors.centerTextGlow,
155
- textShadowOffset: {
156
- width: 0,
157
- height: 0
158
- },
159
- textShadowRadius: 6
160
- },
161
- indicatorTextDim: {
162
- color: _floatingToolsCore.dialColors.iconLabelMuted,
163
- textShadowRadius: 0
164
- }
165
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DialPagination=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 _jsxRuntime=require("react/jsx-runtime");const pad=e=>String(e).padStart(2,"0");const PagerButton=({side:e,label:o,disabled:t,onPress:r})=>{const i=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;const a=s=>{_reactNative.Animated.spring(i,{toValue:s,damping:15,stiffness:400,useNativeDriver:true}).start()};const n=t?_floatingToolsCore.dialColors.emptyDotBorder:_floatingToolsCore.dialColors.accent;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{transform:[{scale:i}]},children:(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{testID:`buoy-dial-${e}`,accessibilityRole:"button",accessibilityLabel:`${e==="prev"?"Previous":"Next"} dial page`,accessibilityState:{disabled:t},disabled:t,onPress:r,onPressIn:()=>!t&&a(.92),onPressOut:()=>a(1),style:[styles.button,t&&styles.buttonDisabled],children:[e==="prev"&&(0,_jsxRuntime.jsx)(_sharedUi.ChevronLeft,{size:18,color:n}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.buttonText,t&&styles.buttonTextDisabled],children:o}),e==="next"&&(0,_jsxRuntime.jsx)(_sharedUi.ChevronRight,{size:18,color:n})]})})};const DialPagination=({page:e,pageCount:o,onPrev:t,onNext:r,animatedStyle:i})=>{return(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.container,i],pointerEvents:"box-none",children:[(0,_jsxRuntime.jsx)(PagerButton,{side:"prev",label:"PREV",disabled:e<=0,onPress:t}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.indicator,children:(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.indicatorText,testID:"buoy-dial-page",children:[pad(e+1),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.indicatorTextDim,children:[" / ",pad(o)]})]})}),(0,_jsxRuntime.jsx)(PagerButton,{side:"next",label:"NEXT",disabled:e>=o-1,onPress:r})]})};exports.DialPagination=DialPagination;const styles=_reactNative.StyleSheet.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},button:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:16,paddingVertical:10,borderRadius:10,borderWidth:1,borderColor:_floatingToolsCore.dialColors.dialBorder,backgroundColor:_floatingToolsCore.dialColors.dialBackground,shadowColor:_floatingToolsCore.dialColors.dialShadow,shadowOffset:{width:0,height:0},shadowOpacity:.4,shadowRadius:8,elevation:6},buttonDisabled:{opacity:.4},buttonText:{color:_floatingToolsCore.dialColors.centerText,fontSize:12,fontWeight:"900",fontFamily:_sharedUi.monoFont,letterSpacing:1.5},buttonTextDisabled:{color:_floatingToolsCore.dialColors.iconLabelMuted},indicator:{paddingHorizontal:12,paddingVertical:6},indicatorText:{color:_floatingToolsCore.dialColors.centerText,fontSize:13,fontWeight:"900",fontFamily:_sharedUi.monoFont,letterSpacing:2,textShadowColor:_floatingToolsCore.dialColors.centerTextGlow,textShadowOffset:{width:0,height:0},textShadowRadius:6},indicatorTextDim:{color:_floatingToolsCore.dialColors.iconLabelMuted,textShadowRadius:0}});