@buoy-gg/core 7.0.41 → 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 (270) hide show
  1. package/README.md +14 -95
  2. package/bin/buoy.js +19 -340
  3. package/lib/commonjs/Buoy.js +1 -107
  4. package/lib/commonjs/browserRegister.js +1 -48
  5. package/lib/commonjs/browserRegister.server.js +1 -10
  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 -376
  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 -150
  14. package/lib/commonjs/floatingMenu/DefaultConfigContext.js +1 -45
  15. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.js +1 -18
  16. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.shared.js +1 -1114
  17. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.web.js +1 -48
  18. package/lib/commonjs/floatingMenu/DevToolsVisibilityContext.js +1 -49
  19. package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -559
  20. package/lib/commonjs/floatingMenu/FloatingDevTools.web.js +1 -415
  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 -377
  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 -471
  29. package/lib/commonjs/floatingMenu/autoExternalSync.js +1 -443
  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 -895
  34. package/lib/commonjs/floatingMenu/dial/DialHyperspace.js +1 -177
  35. package/lib/commonjs/floatingMenu/dial/DialIcon.js +1 -304
  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 -12
  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 -14
  52. package/lib/commonjs/index.js +1 -291
  53. package/lib/commonjs/index.web.js +1 -241
  54. package/lib/commonjs/reactDevtoolsTypes.js +1 -1
  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 -46
  60. package/lib/commonjs/utils/createWebTool.js +1 -20
  61. package/lib/commonjs/utils/createWebTools.js +1 -30
  62. package/lib/commonjs/version.js +1 -18
  63. package/lib/module/Buoy.js +1 -102
  64. package/lib/module/browserRegister.js +1 -44
  65. package/lib/module/browserRegister.server.js +1 -6
  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 -368
  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 -146
  74. package/lib/module/floatingMenu/DefaultConfigContext.js +1 -39
  75. package/lib/module/floatingMenu/DevToolsSettingsModal.js +1 -3
  76. package/lib/module/floatingMenu/DevToolsSettingsModal.shared.js +1 -1110
  77. package/lib/module/floatingMenu/DevToolsSettingsModal.web.js +1 -44
  78. package/lib/module/floatingMenu/DevToolsVisibilityContext.js +1 -44
  79. package/lib/module/floatingMenu/FloatingDevTools.js +1 -556
  80. package/lib/module/floatingMenu/FloatingDevTools.web.js +1 -412
  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 -374
  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 -467
  89. package/lib/module/floatingMenu/autoExternalSync.js +1 -436
  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 -891
  94. package/lib/module/floatingMenu/dial/DialHyperspace.js +1 -173
  95. package/lib/module/floatingMenu/dial/DialIcon.js +1 -301
  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 -3
  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 -10
  112. package/lib/module/index.js +1 -41
  113. package/lib/module/index.web.js +1 -36
  114. package/lib/module/reactDevtoolsTypes.js +1 -1
  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 -38
  120. package/lib/module/utils/createWebTool.js +1 -17
  121. package/lib/module/utils/createWebTools.js +1 -25
  122. package/lib/module/version.js +1 -14
  123. package/lib/typescript/commonjs/browserRegister.d.ts +9 -1
  124. package/lib/typescript/commonjs/browserRegister.server.d.ts +1 -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/defaultConfig.d.ts +1 -1
  128. package/lib/typescript/commonjs/index.web.d.ts +1 -0
  129. package/lib/typescript/commonjs/releaseOptIn.d.ts +4 -0
  130. package/lib/typescript/commonjs/version.d.ts +1 -1
  131. package/lib/typescript/module/browserRegister.d.ts +9 -1
  132. package/lib/typescript/module/browserRegister.server.d.ts +1 -0
  133. package/lib/typescript/module/earlyHookScript.d.ts +12 -0
  134. package/lib/typescript/module/earlyNetwork.d.ts +52 -0
  135. package/lib/typescript/module/floatingMenu/defaultConfig.d.ts +1 -1
  136. package/lib/typescript/module/index.web.d.ts +1 -0
  137. package/lib/typescript/module/releaseOptIn.d.ts +4 -0
  138. package/lib/typescript/module/version.d.ts +1 -1
  139. package/lib/web/chunks/chunk-5SGL6QL4.mjs +1 -0
  140. package/lib/web/chunks/chunk-FROELTJH.mjs +1 -0
  141. package/lib/web/chunks/chunk-QZDVCMCT.mjs +1 -2
  142. package/lib/web/chunks/chunk-R7RGRTY5.mjs +1 -2
  143. package/lib/web/index.mjs +2 -3
  144. package/lib/web/register-server.mjs +1 -2
  145. package/lib/web/register.mjs +1 -2
  146. package/lib/web/toolkit.mjs +1 -2
  147. package/package.json +5 -5
  148. package/lib/typescript/commonjs/Buoy.d.ts.map +0 -1
  149. package/lib/typescript/commonjs/browserRegister.d.ts.map +0 -1
  150. package/lib/typescript/commonjs/browserRegister.server.d.ts.map +0 -1
  151. package/lib/typescript/commonjs/floatingMenu/AppHost.d.ts.map +0 -1
  152. package/lib/typescript/commonjs/floatingMenu/AppHost.web.d.ts.map +0 -1
  153. package/lib/typescript/commonjs/floatingMenu/AppHostLogic.d.ts.map +0 -1
  154. package/lib/typescript/commonjs/floatingMenu/AppIcon.d.ts.map +0 -1
  155. package/lib/typescript/commonjs/floatingMenu/AppIcon.web.d.ts.map +0 -1
  156. package/lib/typescript/commonjs/floatingMenu/BrowserToolRuntime.d.ts.map +0 -1
  157. package/lib/typescript/commonjs/floatingMenu/DefaultConfigContext.d.ts.map +0 -1
  158. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts.map +0 -1
  159. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.shared.d.ts.map +0 -1
  160. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.web.d.ts.map +0 -1
  161. package/lib/typescript/commonjs/floatingMenu/DevToolsVisibilityContext.d.ts.map +0 -1
  162. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts.map +0 -1
  163. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.web.d.ts.map +0 -1
  164. package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts.map +0 -1
  165. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsContext.d.ts.map +0 -1
  166. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.d.ts.map +0 -1
  167. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.web.d.ts.map +0 -1
  168. package/lib/typescript/commonjs/floatingMenu/ToggleStateManager.d.ts.map +0 -1
  169. package/lib/typescript/commonjs/floatingMenu/ToolHost.d.ts.map +0 -1
  170. package/lib/typescript/commonjs/floatingMenu/ToolOpenerBridge.d.ts.map +0 -1
  171. package/lib/typescript/commonjs/floatingMenu/autoDiscoverPresets.d.ts.map +0 -1
  172. package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts.map +0 -1
  173. package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts.map +0 -1
  174. package/lib/typescript/commonjs/floatingMenu/deviceIdentity.d.ts.map +0 -1
  175. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts.map +0 -1
  176. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.web.d.ts.map +0 -1
  177. package/lib/typescript/commonjs/floatingMenu/dial/DialHyperspace.d.ts.map +0 -1
  178. package/lib/typescript/commonjs/floatingMenu/dial/DialIcon.d.ts.map +0 -1
  179. package/lib/typescript/commonjs/floatingMenu/dial/DialPagination.d.ts.map +0 -1
  180. package/lib/typescript/commonjs/floatingMenu/dial/DialSnow.d.ts.map +0 -1
  181. package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.d.ts.map +0 -1
  182. package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.web.d.ts.map +0 -1
  183. package/lib/typescript/commonjs/floatingMenu/dial/dialUsageStore.d.ts.map +0 -1
  184. package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.d.ts.map +0 -1
  185. package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.web.d.ts.map +0 -1
  186. package/lib/typescript/commonjs/floatingMenu/externalSyncGate.d.ts.map +0 -1
  187. package/lib/typescript/commonjs/floatingMenu/floatingTools.d.ts.map +0 -1
  188. package/lib/typescript/commonjs/floatingMenu/floatingTools.web.d.ts.map +0 -1
  189. package/lib/typescript/commonjs/floatingMenu/optionalRequire.d.ts.map +0 -1
  190. package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts.map +0 -1
  191. package/lib/typescript/commonjs/floatingMenu/sync/appSyncAdapter.d.ts.map +0 -1
  192. package/lib/typescript/commonjs/floatingMenu/types.d.ts.map +0 -1
  193. package/lib/typescript/commonjs/floatingMenu/useDesktopSyncStatus.d.ts.map +0 -1
  194. package/lib/typescript/commonjs/floatingMenu/useDesktopSyncStatus.web.d.ts.map +0 -1
  195. package/lib/typescript/commonjs/index.d.ts.map +0 -1
  196. package/lib/typescript/commonjs/index.web.d.ts.map +0 -1
  197. package/lib/typescript/commonjs/reactDevtoolsTypes.d.ts.map +0 -1
  198. package/lib/typescript/commonjs/telemetry/installPing.d.ts.map +0 -1
  199. package/lib/typescript/commonjs/toolkit.d.ts.map +0 -1
  200. package/lib/typescript/commonjs/toolkitComponents.d.ts.map +0 -1
  201. package/lib/typescript/commonjs/utils/autoDiscoverPresets.web.d.ts.map +0 -1
  202. package/lib/typescript/commonjs/utils/createWebTool.d.ts.map +0 -1
  203. package/lib/typescript/commonjs/utils/createWebTools.d.ts.map +0 -1
  204. package/lib/typescript/commonjs/version.d.ts.map +0 -1
  205. package/lib/typescript/module/Buoy.d.ts.map +0 -1
  206. package/lib/typescript/module/browserRegister.d.ts.map +0 -1
  207. package/lib/typescript/module/browserRegister.server.d.ts.map +0 -1
  208. package/lib/typescript/module/floatingMenu/AppHost.d.ts.map +0 -1
  209. package/lib/typescript/module/floatingMenu/AppHost.web.d.ts.map +0 -1
  210. package/lib/typescript/module/floatingMenu/AppHostLogic.d.ts.map +0 -1
  211. package/lib/typescript/module/floatingMenu/AppIcon.d.ts.map +0 -1
  212. package/lib/typescript/module/floatingMenu/AppIcon.web.d.ts.map +0 -1
  213. package/lib/typescript/module/floatingMenu/BrowserToolRuntime.d.ts.map +0 -1
  214. package/lib/typescript/module/floatingMenu/DefaultConfigContext.d.ts.map +0 -1
  215. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts.map +0 -1
  216. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.shared.d.ts.map +0 -1
  217. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.web.d.ts.map +0 -1
  218. package/lib/typescript/module/floatingMenu/DevToolsVisibilityContext.d.ts.map +0 -1
  219. package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts.map +0 -1
  220. package/lib/typescript/module/floatingMenu/FloatingDevTools.web.d.ts.map +0 -1
  221. package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts.map +0 -1
  222. package/lib/typescript/module/floatingMenu/MinimizedToolsContext.d.ts.map +0 -1
  223. package/lib/typescript/module/floatingMenu/MinimizedToolsStack.d.ts.map +0 -1
  224. package/lib/typescript/module/floatingMenu/MinimizedToolsStack.web.d.ts.map +0 -1
  225. package/lib/typescript/module/floatingMenu/ToggleStateManager.d.ts.map +0 -1
  226. package/lib/typescript/module/floatingMenu/ToolHost.d.ts.map +0 -1
  227. package/lib/typescript/module/floatingMenu/ToolOpenerBridge.d.ts.map +0 -1
  228. package/lib/typescript/module/floatingMenu/autoDiscoverPresets.d.ts.map +0 -1
  229. package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts.map +0 -1
  230. package/lib/typescript/module/floatingMenu/defaultConfig.d.ts.map +0 -1
  231. package/lib/typescript/module/floatingMenu/deviceIdentity.d.ts.map +0 -1
  232. package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts.map +0 -1
  233. package/lib/typescript/module/floatingMenu/dial/DialDevTools.web.d.ts.map +0 -1
  234. package/lib/typescript/module/floatingMenu/dial/DialHyperspace.d.ts.map +0 -1
  235. package/lib/typescript/module/floatingMenu/dial/DialIcon.d.ts.map +0 -1
  236. package/lib/typescript/module/floatingMenu/dial/DialPagination.d.ts.map +0 -1
  237. package/lib/typescript/module/floatingMenu/dial/DialSnow.d.ts.map +0 -1
  238. package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.d.ts.map +0 -1
  239. package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.web.d.ts.map +0 -1
  240. package/lib/typescript/module/floatingMenu/dial/dialUsageStore.d.ts.map +0 -1
  241. package/lib/typescript/module/floatingMenu/dial/onboardingConstants.d.ts.map +0 -1
  242. package/lib/typescript/module/floatingMenu/dial/onboardingConstants.web.d.ts.map +0 -1
  243. package/lib/typescript/module/floatingMenu/externalSyncGate.d.ts.map +0 -1
  244. package/lib/typescript/module/floatingMenu/floatingTools.d.ts.map +0 -1
  245. package/lib/typescript/module/floatingMenu/floatingTools.web.d.ts.map +0 -1
  246. package/lib/typescript/module/floatingMenu/optionalRequire.d.ts.map +0 -1
  247. package/lib/typescript/module/floatingMenu/settingsBus.d.ts.map +0 -1
  248. package/lib/typescript/module/floatingMenu/sync/appSyncAdapter.d.ts.map +0 -1
  249. package/lib/typescript/module/floatingMenu/types.d.ts.map +0 -1
  250. package/lib/typescript/module/floatingMenu/useDesktopSyncStatus.d.ts.map +0 -1
  251. package/lib/typescript/module/floatingMenu/useDesktopSyncStatus.web.d.ts.map +0 -1
  252. package/lib/typescript/module/index.d.ts.map +0 -1
  253. package/lib/typescript/module/index.web.d.ts.map +0 -1
  254. package/lib/typescript/module/reactDevtoolsTypes.d.ts.map +0 -1
  255. package/lib/typescript/module/telemetry/installPing.d.ts.map +0 -1
  256. package/lib/typescript/module/toolkit.d.ts.map +0 -1
  257. package/lib/typescript/module/toolkitComponents.d.ts.map +0 -1
  258. package/lib/typescript/module/utils/autoDiscoverPresets.web.d.ts.map +0 -1
  259. package/lib/typescript/module/utils/createWebTool.d.ts.map +0 -1
  260. package/lib/typescript/module/utils/createWebTools.d.ts.map +0 -1
  261. package/lib/typescript/module/version.d.ts.map +0 -1
  262. package/lib/web/chunks/chunk-5NZOQR6Q.mjs +0 -2
  263. package/lib/web/chunks/chunk-CGDSLLZF.mjs +0 -2
  264. package/lib/web/chunks/chunk-DCJDUSNR.mjs +0 -2
  265. package/lib/web/chunks/chunk-IDSHFS6G.mjs +0 -2
  266. package/lib/web/chunks/chunk-JOAMJGCS.mjs +0 -2
  267. package/lib/web/chunks/chunk-KYKZ2N52.mjs +0 -2
  268. package/lib/web/chunks/chunk-NGM7JGGS.mjs +0 -2
  269. package/lib/web/chunks/chunk-Z3XWDDIO.mjs +0 -2
  270. package/lib/web/chunks/chunk-ZTGQ6TTY.mjs +0 -2
@@ -1,904 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DialDevTools = void 0;
7
- var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _sharedUi = require("@buoy-gg/shared-ui");
10
- var _DialIcon = require("./DialIcon.js");
11
- var _DialHyperspace = require("./DialHyperspace.js");
12
- var _DialPagination = require("./DialPagination.js");
13
- var _dialUsageStore = require("./dialUsageStore.js");
14
- var _DevToolsSettingsModal = require("../DevToolsSettingsModal");
15
- var _license = require("@buoy-gg/license");
16
- var _AppIcon = require("../AppIcon");
17
- var _AppHost = require("../AppHost");
18
- var _OnboardingTooltip = require("./OnboardingTooltip");
19
- var _floatingToolsCore = require("@buoy-gg/floating-tools-core");
20
- var _jsxRuntime = require("react/jsx-runtime");
21
- // Icons are provided by installedApps; no direct icon imports here.
22
-
23
- // The circle size depends on the live window width, so it's computed inside
24
- // the component via useWindowDimensions — a module-scope Dimensions.get
25
- // snapshot goes stale when the window resizes after load (web/desktop).
26
- const BUTTON_SIZE = _floatingToolsCore.DIAL_BUTTON_SIZE;
27
- /** The dial face is a circle, so its centre is the middle of the measured square. */
28
- const DIAL_BACKGROUND_FOCUS = {
29
- x: 0.5,
30
- y: 0.5
31
- };
32
- // Radius kept clear of grid spokes around the glass hub (its outer disc is
33
- // 0.75 × BUTTON_SIZE, plus a breath).
34
- const HUB_CLEARANCE = BUTTON_SIZE * 0.75 + 6;
35
-
36
- /**
37
- * The centre button's idle pulse, off by design.
38
- *
39
- * It is built as `Animated.loop(Animated.sequence([...]))`, and that pairing is
40
- * NOT handed to the native driver even though every child sets
41
- * `useNativeDriver: true` — so it ticked on the JS thread for as long as the
42
- * dial stayed open, taxing every interaction launched from the dial.
43
- *
44
- * Re-enabling it means rewriting the loop so it genuinely runs natively;
45
- * flipping this alone just puts the JS-thread cost back.
46
- */
47
- const DIAL_IDLE_PULSE = false;
48
- const ONBOARDING_STORAGE_KEY = "@react_buoy_settings_tooltip_shown";
49
- /** A non-interactive placeholder used to fill out the last dial page. */
50
- const createEmptySlot = slotIndex => ({
51
- id: `empty-${slotIndex}`,
52
- name: `empty-${slotIndex}`,
53
- icon: null,
54
- color: "transparent",
55
- onPress: () => {}
56
- });
57
- const DialDevTools = ({
58
- onClose,
59
- onSettingsPress,
60
- autoOpenSettings = false,
61
- apps,
62
- state,
63
- actions
64
- }) => {
65
- const [selectedIcon, setSelectedIcon] = (0, _react.useState)(-1);
66
- const [isSettingsModalOpen, setIsSettingsModalOpen] = (0, _react.useState)(false);
67
- const [settingsModalStateLoaded, setSettingsModalStateLoaded] = (0, _react.useState)(false);
68
- const [showOnboardingTooltip, setShowOnboardingTooltip] = (0, _react.useState)(false);
69
- const onboardingDismissedRef = (0, _react.useRef)(false); // Track if onboarding was dismissed
70
- const hintsDisabled = (0, _sharedUi.useHintsDisabled)();
71
- const {
72
- refreshSettings
73
- } = (0, _DevToolsSettingsModal.useDevToolsSettings)();
74
- const {
75
- open
76
- } = (0, _AppHost.useAppHost)();
77
- const {
78
- isPro,
79
- isWeekendFree
80
- } = (0, _license.useProAccess)();
81
-
82
- // Live window size — keeps the dial centered and sized correctly when the
83
- // window resizes (Electron/web) or the device rotates.
84
- const {
85
- width: screenWidth,
86
- height: screenHeight
87
- } = (0, _reactNative.useWindowDimensions)();
88
- const circleSize = (0, _floatingToolsCore.getDialLayout)({
89
- screenWidth
90
- }).circleSize;
91
- // The dial face shows the same backdrop the tools use (persisted shared
92
- // selection). Hyperspace keeps its hand-tuned dial port below.
93
- const {
94
- id: backgroundId
95
- } = (0, _sharedUi.useToolBackground)();
96
- const sizeStyles = (0, _react.useMemo)(() => ({
97
- parent: {
98
- width: circleSize,
99
- height: circleSize
100
- },
101
- circle: {
102
- width: circleSize,
103
- height: circleSize,
104
- borderRadius: circleSize / 2
105
- },
106
- rounded: {
107
- borderRadius: circleSize / 2
108
- },
109
- gridLine: {
110
- width: circleSize
111
- },
112
- // Each spoke is two segments that stop short of the glass hub, so the
113
- // six lines never meet in the middle where the background shows through.
114
- spoke: {
115
- width: circleSize / 2 - HUB_CLEARANCE
116
- }
117
- }), [circleSize]);
118
-
119
- // Load persisted settings modal state on mount
120
- (0, _react.useEffect)(() => {
121
- const loadSettingsModalState = async () => {
122
- try {
123
- const savedModalOpen = await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.settings.modalOpen());
124
- if (savedModalOpen === "true") {
125
- setIsSettingsModalOpen(true);
126
- }
127
- } catch (error) {
128
- // Failed to load settings modal state - use default (closed)
129
- } finally {
130
- setSettingsModalStateLoaded(true);
131
- }
132
- };
133
- loadSettingsModalState();
134
- }, []);
135
-
136
- // Persist settings modal state when it changes
137
- (0, _react.useEffect)(() => {
138
- // Only persist after initial state is loaded to avoid overwriting with default
139
- if (!settingsModalStateLoaded) return;
140
- _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.settings.modalOpen(), isSettingsModalOpen ? "true" : "false").catch(error => {
141
- // Failed to save settings modal state - continue without persistence
142
- console.warn("Failed to save settings modal state:", error);
143
- });
144
- }, [isSettingsModalOpen, settingsModalStateLoaded]);
145
-
146
- // Auto-open settings modal when prop is true
147
- (0, _react.useEffect)(() => {
148
- if (autoOpenSettings && !isSettingsModalOpen) {
149
- setIsSettingsModalOpen(true);
150
- }
151
- }, [autoOpenSettings, isSettingsModalOpen]);
152
-
153
- // Check if we should show the onboarding tooltip
154
- (0, _react.useEffect)(() => {
155
- // Skip onboarding if hints are disabled
156
- if (hintsDisabled) {
157
- return;
158
- }
159
- const checkOnboarding = async () => {
160
- try {
161
- const hasSeenTooltip = await _sharedUi.persistentStorage.getItem(ONBOARDING_STORAGE_KEY);
162
- if (!hasSeenTooltip) {
163
- // Small delay to let the entrance animations play first
164
- setTimeout(() => {
165
- setShowOnboardingTooltip(true);
166
- }, 1200);
167
- }
168
- } catch (error) {
169
- // If there's an error reading storage, don't show the tooltip
170
- // to avoid annoying the user repeatedly
171
- }
172
- };
173
- checkOnboarding();
174
- }, [hintsDisabled]);
175
-
176
- // React Native Animated values
177
- const backdropOpacity = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
178
- const dialScale = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
179
- const dialRotation = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
180
- const centerButtonScale = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
181
- const iconsProgress = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
182
- const pulseScale = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
183
- const availableApps = (0, _react.useMemo)(() => apps.map(({
184
- id,
185
- name,
186
- slot,
187
- description,
188
- icon,
189
- color
190
- }) => ({
191
- id,
192
- name,
193
- slot,
194
- description,
195
- // Settings rows fall back to the app's own icon when the modal has no
196
- // hardcoded glyph for the tool.
197
- icon,
198
- color
199
- })), [apps]);
200
-
201
- // Animation tracking refs
202
- const pulseAnimationRef = (0, _react.useRef)(null);
203
- const toggleSettingsModal = () => {
204
- if (isSettingsModalOpen) {
205
- setIsSettingsModalOpen(false);
206
- return;
207
- }
208
- setIsSettingsModalOpen(true);
209
- // Dismiss onboarding tooltip when user opens settings
210
- if (showOnboardingTooltip && !onboardingDismissedRef.current) {
211
- handleOnboardingDismiss();
212
- }
213
- // Also call external handler if provided
214
- onSettingsPress?.();
215
- };
216
-
217
- // Dial-eligible apps: everything except row-only tools. All of them are
218
- // shown — paginated across pages of MAX_DIAL_SLOTS — so there is no longer
219
- // a per-tool show/hide setting.
220
- const dialApps = (0, _react.useMemo)(() => apps.filter(a => (a.slot ?? "both") !== "row"), [apps]);
221
-
222
- // Build a stable IconType for every dial-eligible app, keyed by id.
223
- const iconsById = (0, _react.useMemo)(() => {
224
- const map = new Map();
225
- for (const app of dialApps) {
226
- map.set(app.id, {
227
- id: app.id,
228
- name: app.name,
229
- // Pass both the pre-rendered icon (for non-function icons; strings
230
- // resolve to auto-fitting text icons) and the component (for dynamic
231
- // rendering).
232
- icon: typeof app.icon === "function" ? null : (0, _AppIcon.renderAppIcon)(app.icon, {
233
- slot: "dial",
234
- size: 20,
235
- color: app.color
236
- }),
237
- // Cast to the expected type - the signature is compatible at runtime.
238
- iconComponent: typeof app.icon === "function" ? app.icon : undefined,
239
- color: app.color ?? _sharedUi.buoyColors.primary,
240
- onPress: () => {
241
- // Put this tool first the next time the dial opens.
242
- void (0, _dialUsageStore.recordToolUsage)(app.id);
243
-
244
- // Call the app's onPress callback if provided, passing actions for
245
- // toggle tools.
246
- app?.onPress?.(actions);
247
-
248
- // Only open modal if not a toggle-only tool.
249
- if (app.launchMode !== "toggle-only") {
250
- const resolvedIcon = (0, _AppIcon.renderAppIcon)(app.icon, {
251
- slot: "dial",
252
- size: 20,
253
- color: app.color
254
- });
255
- open({
256
- id: app.id,
257
- title: app.name,
258
- component: app.component,
259
- props: app.props,
260
- launchMode: app.launchMode ?? "self-modal",
261
- singleton: app.singleton ?? true,
262
- icon: resolvedIcon,
263
- color: app.color,
264
- modal: app.modal
265
- });
266
- }
267
-
268
- // Close the dial.
269
- onClose?.();
270
- }
271
- });
272
- }
273
- return map;
274
- }, [dialApps, actions, open, onClose]);
275
-
276
- // Snapshot the usage-ranked order when the dial opens. It stays stable while
277
- // open so icons don't jump positions mid-interaction.
278
- const [rankedIds, setRankedIds] = (0, _react.useState)(() => (0, _dialUsageStore.getRankedToolIds)(dialApps.map(a => a.id)));
279
- (0, _react.useEffect)(() => {
280
- const ids = dialApps.map(a => a.id);
281
- if ((0, _dialUsageStore.isDialUsageLoaded)()) {
282
- setRankedIds((0, _dialUsageStore.getRankedToolIds)(ids));
283
- return;
284
- }
285
- // Usage data not loaded yet — show default order, then re-rank once ready.
286
- let cancelled = false;
287
- (0, _dialUsageStore.loadDialUsage)().then(() => {
288
- if (!cancelled) setRankedIds((0, _dialUsageStore.getRankedToolIds)(ids));
289
- });
290
- return () => {
291
- cancelled = true;
292
- };
293
- }, [dialApps]);
294
-
295
- // Page count spans the installed tools (usage-ranked). Only tools the app
296
- // actually has appear in the dial — nothing is shown for uninstalled ones.
297
- const pageCount = Math.max(1, Math.ceil(rankedIds.length / _floatingToolsCore.MAX_DIAL_SLOTS));
298
- const [currentPage, setCurrentPage] = (0, _react.useState)(0);
299
- const safePage = Math.min(currentPage, pageCount - 1);
300
-
301
- // Every dial-eligible icon, with the page/slot it occupies. The ranking is
302
- // snapshotted on open, so each icon's page and slot are fixed for the
303
- // session — which lets us mount all icons once and paginate purely by
304
- // toggling visibility (no remounts on page change).
305
- const allDialIcons = (0, _react.useMemo)(() => {
306
- return rankedIds.map(id => iconsById.get(id)).filter(icon => Boolean(icon)).map((icon, i) => ({
307
- icon,
308
- page: Math.floor(i / _floatingToolsCore.MAX_DIAL_SLOTS),
309
- slot: i % _floatingToolsCore.MAX_DIAL_SLOTS
310
- }));
311
- }, [rankedIds, iconsById]);
312
-
313
- // Empty slot indices for the current page (only the last page can be
314
- // partial). These are cheap placeholder dots.
315
- const emptySlots = (0, _react.useMemo)(() => {
316
- const onThisPage = allDialIcons.filter(d => d.page === safePage).length;
317
- const slots = [];
318
- for (let s = onThisPage; s < _floatingToolsCore.MAX_DIAL_SLOTS; s += 1) slots.push(s);
319
- return slots;
320
- }, [allDialIcons, safePage]);
321
-
322
- // Swap to another page. Every icon is already mounted, so this only toggles
323
- // which ones are visible — no remount, no re-animation — keeping page
324
- // changes instant.
325
- const handlePageChange = next => {
326
- const clamped = Math.max(0, Math.min(next, pageCount - 1));
327
- if (clamped !== safePage) setCurrentPage(clamped);
328
- };
329
-
330
- // Initialize animations on mount - using shared config from core
331
- (0, _react.useEffect)(() => {
332
- // Fallback config in case dialAnimationConfig hasn't loaded
333
- const config = _floatingToolsCore.dialAnimationConfig ?? {
334
- entrance: {
335
- backdrop: {
336
- duration: 400
337
- },
338
- dial: {
339
- scale: {
340
- damping: 15,
341
- stiffness: 150,
342
- mass: 1
343
- },
344
- rotation: {
345
- duration: 800
346
- }
347
- },
348
- centerButton: {
349
- delay: 150,
350
- damping: 10,
351
- stiffness: 200
352
- },
353
- icons: {
354
- delay: 200,
355
- duration: 400
356
- },
357
- circuitTraces: {
358
- delay: 600,
359
- duration: 1000
360
- }
361
- },
362
- continuous: {
363
- glitch: {
364
- interval: 3000,
365
- offset: 2,
366
- stepDuration: 50
367
- },
368
- pulse: {
369
- maxScale: 1.02,
370
- minScale: 0.98,
371
- duration: 1000
372
- },
373
- floating: {
374
- maxY: -8,
375
- minY: 0,
376
- duration: 3000
377
- },
378
- breathing: {
379
- maxScale: 1.05,
380
- minScale: 0.98,
381
- duration: 2500
382
- }
383
- }
384
- };
385
- const {
386
- entrance,
387
- continuous
388
- } = config;
389
-
390
- // Entrance animation sequence
391
- _reactNative.Animated.timing(backdropOpacity, {
392
- toValue: 1,
393
- duration: entrance.backdrop.duration,
394
- useNativeDriver: true
395
- }).start();
396
- _reactNative.Animated.spring(dialScale, {
397
- toValue: 1,
398
- damping: entrance.dial.scale.damping,
399
- stiffness: entrance.dial.scale.stiffness,
400
- mass: entrance.dial.scale.mass,
401
- useNativeDriver: true
402
- }).start();
403
- _reactNative.Animated.sequence([_reactNative.Animated.timing(dialRotation, {
404
- toValue: 1,
405
- duration: entrance.dial.rotation.duration,
406
- easing: _reactNative.Easing.out(_reactNative.Easing.cubic),
407
- useNativeDriver: true
408
- }), _reactNative.Animated.timing(dialRotation, {
409
- toValue: 0,
410
- duration: 0,
411
- useNativeDriver: true
412
- })]).start();
413
- _reactNative.Animated.sequence([_reactNative.Animated.delay(entrance.centerButton.delay), _reactNative.Animated.spring(centerButtonScale, {
414
- toValue: 1,
415
- damping: entrance.centerButton.damping,
416
- stiffness: entrance.centerButton.stiffness,
417
- useNativeDriver: true
418
- })]).start();
419
- _reactNative.Animated.sequence([_reactNative.Animated.delay(entrance.icons.delay), _reactNative.Animated.timing(iconsProgress, {
420
- toValue: 1,
421
- duration: entrance.icons.duration,
422
- easing: _reactNative.Easing.out(_reactNative.Easing.cubic),
423
- useNativeDriver: true
424
- })]).start();
425
-
426
- // Pulse animation - only continuous effect kept for performance
427
- if (!DIAL_IDLE_PULSE) return;
428
- pulseAnimationRef.current = _reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(pulseScale, {
429
- toValue: continuous.pulse.maxScale,
430
- duration: continuous.pulse.duration,
431
- easing: _reactNative.Easing.inOut(_reactNative.Easing.ease),
432
- useNativeDriver: true
433
- }), _reactNative.Animated.timing(pulseScale, {
434
- toValue: continuous.pulse.minScale,
435
- duration: continuous.pulse.duration,
436
- easing: _reactNative.Easing.inOut(_reactNative.Easing.ease),
437
- useNativeDriver: true
438
- })]));
439
- pulseAnimationRef.current.start();
440
- return () => {
441
- pulseAnimationRef.current?.stop();
442
- };
443
- }, []);
444
- const handleOnboardingDismiss = () => {
445
- // Mark as dismissed immediately in ref (synchronous, no re-render needed)
446
- onboardingDismissedRef.current = true;
447
-
448
- // Hide the tooltip
449
- setShowOnboardingTooltip(false);
450
-
451
- // Save to storage asynchronously in the background
452
- _sharedUi.persistentStorage.setItem(ONBOARDING_STORAGE_KEY, "true").catch(error => {
453
- // Silently fail - user already saw onboarding, just won't persist
454
- console.warn("Failed to save dial onboarding state:", error);
455
- });
456
- };
457
- const handleClose = () => {
458
- // Stop any ongoing animations first
459
- if (pulseAnimationRef.current) {
460
- pulseAnimationRef.current.stop();
461
- }
462
- const exit = _floatingToolsCore.dialAnimationConfig?.exit ?? {
463
- icons: {
464
- duration: 300
465
- },
466
- centerButton: {
467
- duration: 200
468
- },
469
- dialScale: {
470
- duration: 250
471
- },
472
- backdrop: {
473
- duration: 200
474
- }
475
- };
476
-
477
- // Exit animation sequence - reverse order of entrance, using shared config
478
- _reactNative.Animated.sequence([
479
- // First animate icons back to center
480
- _reactNative.Animated.timing(iconsProgress, {
481
- toValue: 0,
482
- duration: exit.icons.duration,
483
- easing: _reactNative.Easing.in(_reactNative.Easing.cubic),
484
- useNativeDriver: true
485
- }),
486
- // Then scale down center button and dial
487
- _reactNative.Animated.parallel([_reactNative.Animated.timing(centerButtonScale, {
488
- toValue: 0,
489
- duration: exit.centerButton.duration,
490
- easing: _reactNative.Easing.in(_reactNative.Easing.cubic),
491
- useNativeDriver: true
492
- }), _reactNative.Animated.timing(dialScale, {
493
- toValue: 0,
494
- duration: exit.dialScale.duration,
495
- easing: _reactNative.Easing.in(_reactNative.Easing.cubic),
496
- useNativeDriver: true
497
- })]),
498
- // Finally fade out backdrop
499
- _reactNative.Animated.timing(backdropOpacity, {
500
- toValue: 0,
501
- duration: exit.backdrop.duration,
502
- useNativeDriver: true
503
- })]).start(() => {
504
- // Use setTimeout to defer the state update to the next tick
505
- // This avoids the useInsertionEffect warning
506
- if (onClose) {
507
- setTimeout(() => {
508
- onClose();
509
- }, 0);
510
- }
511
- });
512
- };
513
- const handleIconPress = icon => {
514
- setSelectedIcon(1);
515
- const interaction = _floatingToolsCore.dialAnimationConfig?.interaction ?? {
516
- iconSelect: {
517
- pulse: [{
518
- scale: 0.9,
519
- damping: 15,
520
- stiffness: 500
521
- }, {
522
- scale: 1,
523
- damping: 10,
524
- stiffness: 200
525
- }],
526
- actionDelay: 50
527
- }
528
- };
529
- const [pulseIn, pulseOut] = interaction.iconSelect.pulse;
530
-
531
- // Pulse animation on selection - using shared config
532
- _reactNative.Animated.sequence([_reactNative.Animated.spring(centerButtonScale, {
533
- toValue: pulseIn.scale,
534
- damping: pulseIn.damping,
535
- stiffness: pulseIn.stiffness,
536
- useNativeDriver: true
537
- }), _reactNative.Animated.spring(centerButtonScale, {
538
- toValue: pulseOut.scale,
539
- damping: pulseOut.damping,
540
- stiffness: pulseOut.stiffness,
541
- useNativeDriver: true
542
- })]).start();
543
-
544
- // Trigger action - using shared delay
545
- setTimeout(() => {
546
- icon.onPress();
547
- // Only close if it's not the WiFi toggle (by id)
548
- if (icon.id !== "wifi") {
549
- handleClose();
550
- }
551
- }, interaction.iconSelect.actionDelay);
552
- };
553
-
554
- // Animated styles
555
- const backdropAnimatedStyle = {
556
- opacity: backdropOpacity
557
- };
558
- const centerButtonAnimatedStyle = {
559
- transform: [{
560
- scale: centerButtonScale
561
- }]
562
- };
563
- const pulseAnimatedStyle = {
564
- transform: [{
565
- scale: selectedIcon >= 0 ? 1 : pulseScale
566
- }]
567
- };
568
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
569
- style: styles.container,
570
- nativeID: "dial-devtools-root",
571
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
572
- style: [styles.backdrop, backdropAnimatedStyle],
573
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
574
- style: _sharedUi.absoluteFill,
575
- onPress: handleClose
576
- })
577
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
578
- style: [styles.parent, sizeStyles.parent, {
579
- position: "absolute",
580
- left: (screenWidth - circleSize) / 2,
581
- bottom: 80,
582
- transform: [{
583
- scale: dialScale
584
- }, {
585
- rotate: dialRotation.interpolate({
586
- inputRange: [0, 1],
587
- outputRange: ["0deg", "360deg"]
588
- })
589
- }]
590
- }],
591
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
592
- style: [styles.circle, sizeStyles.circle],
593
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
594
- style: [styles.gradientBackground, sizeStyles.rounded],
595
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
596
- style: [styles.gradientLayer1, sizeStyles.rounded]
597
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
598
- style: [styles.gradientLayer2, sizeStyles.rounded]
599
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
600
- style: [styles.gradientLayer3, sizeStyles.rounded]
601
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
602
- style: styles.gridPattern,
603
- children: Array.from({
604
- length: 6
605
- }).map((_, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
606
- style: [styles.gridLine, sizeStyles.gridLine, {
607
- transform: [{
608
- rotate: `${i * 60}deg`
609
- }]
610
- }],
611
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
612
- style: [styles.spoke, sizeStyles.spoke, styles.spokeLeft]
613
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
614
- style: [styles.spoke, sizeStyles.spoke, styles.spokeRight]
615
- })]
616
- }, i))
617
- }), backgroundId === "hyperspace" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_DialHyperspace.DialHyperspace, {
618
- size: circleSize
619
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolBackground, {
620
- focus: DIAL_BACKGROUND_FOCUS
621
- })]
622
- }), allDialIcons.filter(({
623
- page
624
- }) => page === safePage).map(({
625
- icon,
626
- slot
627
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_DialIcon.DialIcon, {
628
- onPress: handleIconPress,
629
- iconsProgress: iconsProgress,
630
- icon: icon,
631
- index: slot,
632
- totalIcons: _floatingToolsCore.MAX_DIAL_SLOTS,
633
- active: true
634
- }, icon.id ?? `page${safePage}-${slot}`)), emptySlots.map(slot => /*#__PURE__*/(0, _jsxRuntime.jsx)(_DialIcon.DialIcon, {
635
- onPress: handleIconPress,
636
- iconsProgress: iconsProgress,
637
- icon: createEmptySlot(slot),
638
- index: slot,
639
- totalIcons: _floatingToolsCore.MAX_DIAL_SLOTS,
640
- active: true
641
- }, `empty-${slot}`))]
642
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
643
- style: [styles.buttonContainer, centerButtonAnimatedStyle],
644
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
645
- style: styles.buttonGradient,
646
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
647
- style: styles.buttonGradientLayer1
648
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
649
- style: styles.buttonGradientLayer2
650
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
651
- style: styles.buttonGradientLayer3
652
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
653
- style: styles.buttonBorder,
654
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
655
- style: [styles.button, pulseAnimatedStyle],
656
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
657
- accessibilityRole: "button",
658
- accessibilityLabel: isSettingsModalOpen ? "Close Settings" : "Open Dev Tools Settings",
659
- onPress: toggleSettingsModal
660
- // Dims on touch-down so the press registers visually straight
661
- // away, even though the panel only opens on release.
662
- ,
663
- activeOpacity: 0.5,
664
- style: styles.buttonPressable,
665
- children: isSettingsModalOpen ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
666
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
667
- style: [styles.centerText, styles.closeTextTop],
668
- children: "CLOSE"
669
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
670
- style: [styles.centerText, styles.closeTextBottom],
671
- children: "SETTINGS"
672
- })]
673
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
674
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
675
- style: styles.centerText,
676
- children: "BUOY"
677
- }), isPro && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
678
- style: [styles.proText, isWeekendFree && styles.weekendText],
679
- children: isWeekendFree ? "WEEKEND" : "PRO"
680
- })]
681
- })
682
- })
683
- })
684
- })]
685
- })
686
- })]
687
- }), pageCount > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DialPagination.DialPagination, {
688
- page: safePage,
689
- pageCount: pageCount,
690
- onPrev: () => handlePageChange(safePage - 1),
691
- onNext: () => handlePageChange(safePage + 1),
692
- animatedStyle: {
693
- position: "absolute",
694
- left: (screenWidth - circleSize) / 2,
695
- // Circle's bottom edge sits at bottom: 80 -> screenHeight - 80
696
- // from the top. Place the pager 16px below that edge.
697
- top: screenHeight - 80 + 16,
698
- width: circleSize,
699
- opacity: dialScale,
700
- transform: [{
701
- scale: dialScale
702
- }]
703
- }
704
- }), isSettingsModalOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DevToolsSettingsModal.DevToolsSettingsModal, {
705
- visible: true,
706
- onClose: () => {
707
- setIsSettingsModalOpen(false);
708
- refreshSettings(); // Refresh from storage
709
- },
710
- availableApps: availableApps
711
- }), showOnboardingTooltip && !isSettingsModalOpen && !onboardingDismissedRef.current && /*#__PURE__*/(0, _jsxRuntime.jsx)(_OnboardingTooltip.OnboardingTooltip, {
712
- visible: true,
713
- onDismiss: handleOnboardingDismiss
714
- })]
715
- });
716
- };
717
- exports.DialDevTools = DialDevTools;
718
- const styles = _reactNative.StyleSheet.create({
719
- container: {
720
- ..._sharedUi.absoluteFill,
721
- zIndex: 9999
722
- },
723
- backdrop: {
724
- ..._sharedUi.absoluteFill,
725
- backgroundColor: _floatingToolsCore.dialColors.dialBackdrop
726
- },
727
- // width/height/borderRadius for the circle pieces come from sizeStyles —
728
- // they track the live window width.
729
- parent: {
730
- alignItems: "center",
731
- justifyContent: "center"
732
- },
733
- circle: {
734
- position: "absolute",
735
- backgroundColor: "transparent",
736
- borderWidth: 1,
737
- borderColor: _floatingToolsCore.dialColors.dialBorder,
738
- shadowColor: _floatingToolsCore.dialColors.dialShadow,
739
- shadowOffset: {
740
- width: 0,
741
- height: 0
742
- },
743
- shadowOpacity: 0.5,
744
- shadowRadius: 20,
745
- elevation: 10
746
- },
747
- gradientBackground: {
748
- width: "100%",
749
- height: "100%",
750
- position: "relative",
751
- backgroundColor: _floatingToolsCore.dialColors.dialBackground,
752
- overflow: "hidden"
753
- },
754
- gradientLayer1: {
755
- ..._sharedUi.absoluteFill,
756
- backgroundColor: _floatingToolsCore.dialColors.dialGradient1,
757
- opacity: 0.6
758
- },
759
- gradientLayer2: {
760
- ..._sharedUi.absoluteFill,
761
- backgroundColor: _floatingToolsCore.dialColors.dialGradient2,
762
- opacity: 0.4,
763
- top: "30%",
764
- left: "30%"
765
- },
766
- gradientLayer3: {
767
- ..._sharedUi.absoluteFill,
768
- backgroundColor: _floatingToolsCore.dialColors.dialGradient3,
769
- opacity: 0.3,
770
- top: "50%",
771
- left: "50%"
772
- },
773
- gridPattern: {
774
- ..._sharedUi.absoluteFill,
775
- alignItems: "center",
776
- justifyContent: "center"
777
- },
778
- gridLine: {
779
- position: "absolute",
780
- height: 1
781
- },
782
- spoke: {
783
- position: "absolute",
784
- top: 0,
785
- height: 1,
786
- backgroundColor: _floatingToolsCore.dialColors.dialGridLine
787
- },
788
- spokeLeft: {
789
- left: 0
790
- },
791
- spokeRight: {
792
- right: 0
793
- },
794
- buttonContainer: {
795
- zIndex: 1,
796
- backgroundColor: "transparent",
797
- alignItems: "center",
798
- justifyContent: "center",
799
- position: "absolute",
800
- width: BUTTON_SIZE * 1.5,
801
- height: BUTTON_SIZE * 1.5,
802
- borderRadius: BUTTON_SIZE
803
- },
804
- // The hub is glass: no rings, no opaque fill. The outer disc is a barely-
805
- // there shade and the inner button a soft puck, so the tool background runs
806
- // through the middle of the dial while BUOY / PRO stay legible. The spokes
807
- // stop at HUB_CLEARANCE so nothing draws under it.
808
- buttonGradient: {
809
- width: "100%",
810
- height: "100%",
811
- borderRadius: BUTTON_SIZE,
812
- alignItems: "center",
813
- justifyContent: "center",
814
- padding: 4,
815
- backgroundColor: _floatingToolsCore.dialColors.hubHalo,
816
- position: "relative",
817
- overflow: "hidden"
818
- },
819
- buttonGradientLayer1: {
820
- ..._sharedUi.absoluteFill,
821
- backgroundColor: _floatingToolsCore.dialColors.dialGradient1,
822
- opacity: 0.5,
823
- borderRadius: BUTTON_SIZE
824
- },
825
- buttonGradientLayer2: {
826
- ..._sharedUi.absoluteFill,
827
- backgroundColor: _floatingToolsCore.dialColors.dialGradient2,
828
- opacity: 0.3,
829
- top: "20%",
830
- left: "20%",
831
- borderRadius: BUTTON_SIZE
832
- },
833
- buttonGradientLayer3: {
834
- ..._sharedUi.absoluteFill,
835
- backgroundColor: _floatingToolsCore.dialColors.dialGradient3,
836
- opacity: 0.2,
837
- top: "40%",
838
- left: "40%",
839
- borderRadius: BUTTON_SIZE
840
- },
841
- buttonBorder: {
842
- backgroundColor: _floatingToolsCore.dialColors.hubFill,
843
- alignItems: "center",
844
- justifyContent: "center",
845
- width: BUTTON_SIZE * 1.2,
846
- height: BUTTON_SIZE * 1.2,
847
- borderRadius: BUTTON_SIZE * 0.6
848
- },
849
- button: {
850
- width: BUTTON_SIZE,
851
- height: BUTTON_SIZE,
852
- borderRadius: BUTTON_SIZE / 2,
853
- justifyContent: "center",
854
- alignItems: "center",
855
- position: "relative",
856
- overflow: "hidden"
857
- },
858
- buttonPressable: {
859
- width: "100%",
860
- height: "100%",
861
- justifyContent: "center",
862
- alignItems: "center"
863
- },
864
- centerText: {
865
- color: _floatingToolsCore.dialColors.centerText,
866
- fontSize: 10,
867
- fontWeight: "900",
868
- fontFamily: _sharedUi.monoFont,
869
- letterSpacing: 1,
870
- textAlign: "center",
871
- textTransform: "uppercase",
872
- textShadowColor: _floatingToolsCore.dialColors.centerTextGlow,
873
- textShadowOffset: {
874
- width: 0,
875
- height: 0
876
- },
877
- textShadowRadius: 4
878
- },
879
- closeTextTop: {
880
- marginBottom: -2
881
- },
882
- closeTextBottom: {
883
- marginTop: -2
884
- },
885
- proText: {
886
- color: _sharedUi.buoyColors.warning,
887
- fontSize: 8,
888
- fontWeight: "900",
889
- fontFamily: _sharedUi.monoFont,
890
- letterSpacing: 2,
891
- textAlign: "center",
892
- textShadowColor: _floatingToolsCore.dialColors.centerTextGlow,
893
- textShadowOffset: {
894
- width: 0,
895
- height: 0
896
- },
897
- textShadowRadius: 4
898
- },
899
- // Weekend Pass variant — violet, tighter spacing so "WEEKEND" fits the dial.
900
- weekendText: {
901
- color: "#BF5AF2",
902
- letterSpacing: 1
903
- }
904
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DialDevTools=void 0;var _react=require("react");var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _DialIcon=require("./DialIcon.js");var _DialHyperspace=require("./DialHyperspace.js");var _DialPagination=require("./DialPagination.js");var _dialUsageStore=require("./dialUsageStore.js");var _DevToolsSettingsModal=require("../DevToolsSettingsModal");var _license=require("@buoy-gg/license");var _AppIcon=require("../AppIcon");var _AppHost=require("../AppHost");var _OnboardingTooltip=require("./OnboardingTooltip");var _floatingToolsCore=require("@buoy-gg/floating-tools-core");var _jsxRuntime=require("react/jsx-runtime");const BUTTON_SIZE=_floatingToolsCore.DIAL_BUTTON_SIZE;const DIAL_BACKGROUND_FOCUS={x:.5,y:.5};const HUB_CLEARANCE=BUTTON_SIZE*.75+6;const DIAL_IDLE_PULSE=false;const ONBOARDING_STORAGE_KEY="@react_buoy_settings_tooltip_shown";const createEmptySlot=r=>({id:`empty-${r}`,name:`empty-${r}`,icon:null,color:"transparent",onPress:()=>{}});const DialDevTools=({onClose:r,onSettingsPress:B,autoOpenSettings:T=false,apps:m,state:ie,actions:D})=>{const[N,F]=(0,_react.useState)(-1);const[n,l]=(0,_react.useState)(false);const[C,G]=(0,_react.useState)(false);const[I,j]=(0,_react.useState)(false);const y=(0,_react.useRef)(false);const k=(0,_sharedUi.useHintsDisabled)();const{refreshSettings:q}=(0,_DevToolsSettingsModal.useDevToolsSettings)();const{open:L}=(0,_AppHost.useAppHost)();const{isPro:U,isWeekendFree:_}=(0,_license.useProAccess)();const{width:b,height:z}=(0,_reactNative.useWindowDimensions)();const o=(0,_floatingToolsCore.getDialLayout)({screenWidth:b}).circleSize;const{id:H}=(0,_sharedUi.useToolBackground)();const a=(0,_react.useMemo)(()=>({parent:{width:o,height:o},circle:{width:o,height:o,borderRadius:o/2},rounded:{borderRadius:o/2},gridLine:{width:o},spoke:{width:o/2-HUB_CLEARANCE}}),[o]);(0,_react.useEffect)(()=>{const t=async()=>{try{const e=await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.settings.modalOpen());if(e==="true"){l(true)}}catch(e){}finally{G(true)}};t()},[]);(0,_react.useEffect)(()=>{if(!C)return;_sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.settings.modalOpen(),n?"true":"false").catch(t=>{console.warn("Failed to save settings modal state:",t)})},[n,C]);(0,_react.useEffect)(()=>{if(T&&!n){l(true)}},[T,n]);(0,_react.useEffect)(()=>{if(k){return}const t=async()=>{try{const e=await _sharedUi.persistentStorage.getItem(ONBOARDING_STORAGE_KEY);if(!e){setTimeout(()=>{j(true)},1200)}}catch(e){}};t()},[k]);const S=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;const d=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;const x=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;const c=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;const f=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;const v=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;const W=(0,_react.useMemo)(()=>m.map(({id:t,name:e,slot:i,description:p,icon:ee,color:te})=>({id:t,name:e,slot:i,description:p,icon:ee,color:te})),[m]);const u=(0,_react.useRef)(null);const X=()=>{if(n){l(false);return}l(true);if(I&&!y.current){E()}B?.()};const g=(0,_react.useMemo)(()=>m.filter(t=>(t.slot??"both")!=="row"),[m]);const O=(0,_react.useMemo)(()=>{const t=new Map;for(const e of g){t.set(e.id,{id:e.id,name:e.name,icon:typeof e.icon==="function"?null:(0,_AppIcon.renderAppIcon)(e.icon,{slot:"dial",size:20,color:e.color}),iconComponent:typeof e.icon==="function"?e.icon:void 0,color:e.color??_sharedUi.buoyColors.primary,onPress:()=>{void(0,_dialUsageStore.recordToolUsage)(e.id);e?.onPress?.(D);if(e.launchMode!=="toggle-only"){const i=(0,_AppIcon.renderAppIcon)(e.icon,{slot:"dial",size:20,color:e.color});L({id:e.id,title:e.name,component:e.component,props:e.props,launchMode:e.launchMode??"self-modal",singleton:e.singleton??true,icon:i,color:e.color,modal:e.modal})}r?.()}})}return t},[g,D,L,r]);const[A,V]=(0,_react.useState)(()=>(0,_dialUsageStore.getRankedToolIds)(g.map(t=>t.id)));(0,_react.useEffect)(()=>{const t=g.map(i=>i.id);if((0,_dialUsageStore.isDialUsageLoaded)()){V((0,_dialUsageStore.getRankedToolIds)(t));return}let e=false;(0,_dialUsageStore.loadDialUsage)().then(()=>{if(!e)V((0,_dialUsageStore.getRankedToolIds)(t))});return()=>{e=true}},[g]);const h=Math.max(1,Math.ceil(A.length/_floatingToolsCore.MAX_DIAL_SLOTS));const[$,K]=(0,_react.useState)(0);const s=Math.min($,h-1);const w=(0,_react.useMemo)(()=>{return A.map(t=>O.get(t)).filter(t=>Boolean(t)).map((t,e)=>({icon:t,page:Math.floor(e/_floatingToolsCore.MAX_DIAL_SLOTS),slot:e%_floatingToolsCore.MAX_DIAL_SLOTS}))},[A,O]);const Y=(0,_react.useMemo)(()=>{const t=w.filter(i=>i.page===s).length;const e=[];for(let i=t;i<_floatingToolsCore.MAX_DIAL_SLOTS;i+=1)e.push(i);return e},[w,s]);const R=t=>{const e=Math.max(0,Math.min(t,h-1));if(e!==s)K(e)};(0,_react.useEffect)(()=>{const t=_floatingToolsCore.dialAnimationConfig??{entrance:{backdrop:{duration:400},dial:{scale:{damping:15,stiffness:150,mass:1},rotation:{duration:800}},centerButton:{delay:150,damping:10,stiffness:200},icons:{delay:200,duration:400},circuitTraces:{delay:600,duration:1e3}},continuous:{glitch:{interval:3e3,offset:2,stepDuration:50},pulse:{maxScale:1.02,minScale:.98,duration:1e3},floating:{maxY:-8,minY:0,duration:3e3},breathing:{maxScale:1.05,minScale:.98,duration:2500}}};const{entrance:e,continuous:i}=t;_reactNative.Animated.timing(S,{toValue:1,duration:e.backdrop.duration,useNativeDriver:true}).start();_reactNative.Animated.spring(d,{toValue:1,damping:e.dial.scale.damping,stiffness:e.dial.scale.stiffness,mass:e.dial.scale.mass,useNativeDriver:true}).start();_reactNative.Animated.sequence([_reactNative.Animated.timing(x,{toValue:1,duration:e.dial.rotation.duration,easing:_reactNative.Easing.out(_reactNative.Easing.cubic),useNativeDriver:true}),_reactNative.Animated.timing(x,{toValue:0,duration:0,useNativeDriver:true})]).start();_reactNative.Animated.sequence([_reactNative.Animated.delay(e.centerButton.delay),_reactNative.Animated.spring(c,{toValue:1,damping:e.centerButton.damping,stiffness:e.centerButton.stiffness,useNativeDriver:true})]).start();_reactNative.Animated.sequence([_reactNative.Animated.delay(e.icons.delay),_reactNative.Animated.timing(f,{toValue:1,duration:e.icons.duration,easing:_reactNative.Easing.out(_reactNative.Easing.cubic),useNativeDriver:true})]).start();if(!DIAL_IDLE_PULSE)return;u.current=_reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(v,{toValue:i.pulse.maxScale,duration:i.pulse.duration,easing:_reactNative.Easing.inOut(_reactNative.Easing.ease),useNativeDriver:true}),_reactNative.Animated.timing(v,{toValue:i.pulse.minScale,duration:i.pulse.duration,easing:_reactNative.Easing.inOut(_reactNative.Easing.ease),useNativeDriver:true})]));u.current.start();return()=>{u.current?.stop()}},[]);const E=()=>{y.current=true;j(false);_sharedUi.persistentStorage.setItem(ONBOARDING_STORAGE_KEY,"true").catch(t=>{console.warn("Failed to save dial onboarding state:",t)})};const M=()=>{if(u.current){u.current.stop()}const t=_floatingToolsCore.dialAnimationConfig?.exit??{icons:{duration:300},centerButton:{duration:200},dialScale:{duration:250},backdrop:{duration:200}};_reactNative.Animated.sequence([_reactNative.Animated.timing(f,{toValue:0,duration:t.icons.duration,easing:_reactNative.Easing.in(_reactNative.Easing.cubic),useNativeDriver:true}),_reactNative.Animated.parallel([_reactNative.Animated.timing(c,{toValue:0,duration:t.centerButton.duration,easing:_reactNative.Easing.in(_reactNative.Easing.cubic),useNativeDriver:true}),_reactNative.Animated.timing(d,{toValue:0,duration:t.dialScale.duration,easing:_reactNative.Easing.in(_reactNative.Easing.cubic),useNativeDriver:true})]),_reactNative.Animated.timing(S,{toValue:0,duration:t.backdrop.duration,useNativeDriver:true})]).start(()=>{if(r){setTimeout(()=>{r()},0)}})};const P=t=>{F(1);const e=_floatingToolsCore.dialAnimationConfig?.interaction??{iconSelect:{pulse:[{scale:.9,damping:15,stiffness:500},{scale:1,damping:10,stiffness:200}],actionDelay:50}};const[i,p]=e.iconSelect.pulse;_reactNative.Animated.sequence([_reactNative.Animated.spring(c,{toValue:i.scale,damping:i.damping,stiffness:i.stiffness,useNativeDriver:true}),_reactNative.Animated.spring(c,{toValue:p.scale,damping:p.damping,stiffness:p.stiffness,useNativeDriver:true})]).start();setTimeout(()=>{t.onPress();if(t.id!=="wifi"){M()}},e.iconSelect.actionDelay)};const Z={opacity:S};const J={transform:[{scale:c}]};const Q={transform:[{scale:N>=0?1:v}]};return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,nativeID:"dial-devtools-root",children:[(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.backdrop,Z],children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{style:_sharedUi.absoluteFill,onPress:M})}),(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.parent,a.parent,{position:"absolute",left:(b-o)/2,bottom:80,transform:[{scale:d},{rotate:x.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]})}]}],children:[(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.circle,a.circle],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.gradientBackground,a.rounded],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.gradientLayer1,a.rounded]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.gradientLayer2,a.rounded]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.gradientLayer3,a.rounded]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.gridPattern,children:Array.from({length:6}).map((t,e)=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.gridLine,a.gridLine,{transform:[{rotate:`${e*60}deg`}]}],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.spoke,a.spoke,styles.spokeLeft]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.spoke,a.spoke,styles.spokeRight]})]},e))}),H==="hyperspace"?(0,_jsxRuntime.jsx)(_DialHyperspace.DialHyperspace,{size:o}):(0,_jsxRuntime.jsx)(_sharedUi.ToolBackground,{focus:DIAL_BACKGROUND_FOCUS})]}),w.filter(({page:t})=>t===s).map(({icon:t,slot:e})=>(0,_jsxRuntime.jsx)(_DialIcon.DialIcon,{onPress:P,iconsProgress:f,icon:t,index:e,totalIcons:_floatingToolsCore.MAX_DIAL_SLOTS,active:true},t.id??`page${s}-${e}`)),Y.map(t=>(0,_jsxRuntime.jsx)(_DialIcon.DialIcon,{onPress:P,iconsProgress:f,icon:createEmptySlot(t),index:t,totalIcons:_floatingToolsCore.MAX_DIAL_SLOTS,active:true},`empty-${t}`))]}),(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.buttonContainer,J],children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.buttonGradient,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.buttonGradientLayer1}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.buttonGradientLayer2}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.buttonGradientLayer3}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.buttonBorder,children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.button,Q],children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{accessibilityRole:"button",accessibilityLabel:n?"Close Settings":"Open Dev Tools Settings",onPress:X,activeOpacity:.5,style:styles.buttonPressable,children:n?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.centerText,styles.closeTextTop],children:"CLOSE"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.centerText,styles.closeTextBottom],children:"SETTINGS"})]}):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.centerText,children:"BUOY"}),U&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.proText,_&&styles.weekendText],children:_?"WEEKEND":"PRO"})]})})})})]})})]}),h>1&&(0,_jsxRuntime.jsx)(_DialPagination.DialPagination,{page:s,pageCount:h,onPrev:()=>R(s-1),onNext:()=>R(s+1),animatedStyle:{position:"absolute",left:(b-o)/2,top:z-80+16,width:o,opacity:d,transform:[{scale:d}]}}),n&&(0,_jsxRuntime.jsx)(_DevToolsSettingsModal.DevToolsSettingsModal,{visible:true,onClose:()=>{l(false);q()},availableApps:W}),I&&!n&&!y.current&&(0,_jsxRuntime.jsx)(_OnboardingTooltip.OnboardingTooltip,{visible:true,onDismiss:E})]})};exports.DialDevTools=DialDevTools;const styles=_reactNative.StyleSheet.create({container:{..._sharedUi.absoluteFill,zIndex:9999},backdrop:{..._sharedUi.absoluteFill,backgroundColor:_floatingToolsCore.dialColors.dialBackdrop},parent:{alignItems:"center",justifyContent:"center"},circle:{position:"absolute",backgroundColor:"transparent",borderWidth:1,borderColor:_floatingToolsCore.dialColors.dialBorder,shadowColor:_floatingToolsCore.dialColors.dialShadow,shadowOffset:{width:0,height:0},shadowOpacity:.5,shadowRadius:20,elevation:10},gradientBackground:{width:"100%",height:"100%",position:"relative",backgroundColor:_floatingToolsCore.dialColors.dialBackground,overflow:"hidden"},gradientLayer1:{..._sharedUi.absoluteFill,backgroundColor:_floatingToolsCore.dialColors.dialGradient1,opacity:.6},gradientLayer2:{..._sharedUi.absoluteFill,backgroundColor:_floatingToolsCore.dialColors.dialGradient2,opacity:.4,top:"30%",left:"30%"},gradientLayer3:{..._sharedUi.absoluteFill,backgroundColor:_floatingToolsCore.dialColors.dialGradient3,opacity:.3,top:"50%",left:"50%"},gridPattern:{..._sharedUi.absoluteFill,alignItems:"center",justifyContent:"center"},gridLine:{position:"absolute",height:1},spoke:{position:"absolute",top:0,height:1,backgroundColor:_floatingToolsCore.dialColors.dialGridLine},spokeLeft:{left:0},spokeRight:{right:0},buttonContainer:{zIndex:1,backgroundColor:"transparent",alignItems:"center",justifyContent:"center",position:"absolute",width:BUTTON_SIZE*1.5,height:BUTTON_SIZE*1.5,borderRadius:BUTTON_SIZE},buttonGradient:{width:"100%",height:"100%",borderRadius:BUTTON_SIZE,alignItems:"center",justifyContent:"center",padding:4,backgroundColor:_floatingToolsCore.dialColors.hubHalo,position:"relative",overflow:"hidden"},buttonGradientLayer1:{..._sharedUi.absoluteFill,backgroundColor:_floatingToolsCore.dialColors.dialGradient1,opacity:.5,borderRadius:BUTTON_SIZE},buttonGradientLayer2:{..._sharedUi.absoluteFill,backgroundColor:_floatingToolsCore.dialColors.dialGradient2,opacity:.3,top:"20%",left:"20%",borderRadius:BUTTON_SIZE},buttonGradientLayer3:{..._sharedUi.absoluteFill,backgroundColor:_floatingToolsCore.dialColors.dialGradient3,opacity:.2,top:"40%",left:"40%",borderRadius:BUTTON_SIZE},buttonBorder:{backgroundColor:_floatingToolsCore.dialColors.hubFill,alignItems:"center",justifyContent:"center",width:BUTTON_SIZE*1.2,height:BUTTON_SIZE*1.2,borderRadius:BUTTON_SIZE*.6},button:{width:BUTTON_SIZE,height:BUTTON_SIZE,borderRadius:BUTTON_SIZE/2,justifyContent:"center",alignItems:"center",position:"relative",overflow:"hidden"},buttonPressable:{width:"100%",height:"100%",justifyContent:"center",alignItems:"center"},centerText:{color:_floatingToolsCore.dialColors.centerText,fontSize:10,fontWeight:"900",fontFamily:_sharedUi.monoFont,letterSpacing:1,textAlign:"center",textTransform:"uppercase",textShadowColor:_floatingToolsCore.dialColors.centerTextGlow,textShadowOffset:{width:0,height:0},textShadowRadius:4},closeTextTop:{marginBottom:-2},closeTextBottom:{marginTop:-2},proText:{color:_sharedUi.buoyColors.warning,fontSize:8,fontWeight:"900",fontFamily:_sharedUi.monoFont,letterSpacing:2,textAlign:"center",textShadowColor:_floatingToolsCore.dialColors.centerTextGlow,textShadowOffset:{width:0,height:0},textShadowRadius:4},weekendText:{color:"#BF5AF2",letterSpacing:1}});