@buoy-gg/core 7.0.41 → 7.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +6 -9
  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,412 +1 @@
1
- "use strict";
2
-
3
- import { FloatingToolHost } from "@buoy-gg/shared-ui/floating";
4
- import { LicenseManager, useLicense } from "@buoy-gg/license";
5
- import { AccountSetup } from "@buoy-gg/shared-ui";
6
- import { useState, useMemo, useCallback, useEffect, useRef } from 'react';
7
- import { useSettings, getToolLabel, getToolDescription, getToolColor } from '@buoy-gg/floating-tools-react';
8
- import { persistentStorage, devToolsStorageKeys, EnvironmentIndicator, EnvironmentSelectorInline } from '@buoy-gg/shared-ui';
9
- import { autoDiscoverWithCustom, getToolsBySlot } from "../utils/autoDiscoverPresets.web.js";
10
- import { FloatingTools, UserStatus } from "./floatingTools.web.js";
11
- import { DialMenu } from "./dial/DialDevTools.web.js";
12
- import { getRankedToolIds, recordToolUsage } from "./dial/dialUsageStore.js";
13
- import { OnboardingTooltip } from "./dial/OnboardingTooltip.web.js";
14
- import { SettingsModal } from "./DevToolsSettingsModal.web.js";
15
- import { AppHostProvider, AppOverlay, useAppHost } from "./AppHost.web.js";
16
- import { MinimizedToolsStack } from "./MinimizedToolsStack.web.js";
17
- import { createWebTools } from "../utils/createWebTools.js";
18
- import { BrowserToolRuntime } from "./BrowserToolRuntime.js";
19
- import { DevToolsVisibilityProvider, useDevToolsVisibility } from "./DevToolsVisibilityContext.js";
20
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
- const EMPTY_MODULES = {};
22
-
23
- // native FloatingMenu.tsx TOOLTIP_SHOWN_KEY
24
- const MENU_TOOLTIP_KEY = '@react_buoy_floating_menu_tooltip_shown';
25
- const webSettingsStorage = persistentStorage;
26
-
27
- // =============================
28
- // Types
29
- // =============================
30
-
31
- // =============================
32
- // MenuLauncherIcon — native FloatingMenu.tsx:446-478: 3×3 dot grid rendered
33
- // when no userRole is set, so the dial/settings stay reachable.
34
- // =============================
35
- function MenuLauncherIcon({
36
- size = 14,
37
- color = '#20C997'
38
- }) {
39
- const dot = Math.max(2, size / 4);
40
- const gap = Math.max(1, size / 16);
41
- return /*#__PURE__*/_jsx("div", {
42
- style: {
43
- display: 'grid',
44
- gridTemplateColumns: `repeat(3, ${dot}px)`,
45
- gap,
46
- width: size,
47
- height: size,
48
- alignContent: 'center',
49
- justifyContent: 'center'
50
- },
51
- children: Array.from({
52
- length: 9
53
- }).map((_, i) => /*#__PURE__*/_jsx("div", {
54
- style: {
55
- width: dot,
56
- height: dot,
57
- borderRadius: dot / 2,
58
- backgroundColor: color
59
- }
60
- }, i))
61
- });
62
- }
63
-
64
- // =============================
65
- // Main Component
66
- // =============================
67
-
68
- function AdmittedFloatingDevTools(props) {
69
- // The tool host wraps everything so dial presses can open tool components
70
- // into the AppOverlay (web twin of the native AppHostProvider/AppOverlay).
71
- return /*#__PURE__*/_jsx(DevToolsVisibilityProvider, {
72
- children: /*#__PURE__*/_jsx(AppHostProvider, {
73
- children: /*#__PURE__*/_jsx(FloatingDevToolsInner, {
74
- ...props
75
- })
76
- })
77
- });
78
- }
79
- function FloatingDevToolsInner({
80
- environment,
81
- userRole,
82
- availableEnvironments,
83
- onEnvironmentSwitch,
84
- apps,
85
- modules = EMPTY_MODULES,
86
- externalSync,
87
- requiredEnvVars,
88
- sentryGetClient,
89
- disableHints = false,
90
- headless = false
91
- }) {
92
- // Internal state for dial and settings
93
- const [isDialOpen, setIsDialOpen] = useState(false);
94
- const [isSettingsOpen, setIsSettingsOpen] = useState(false);
95
- const stateRestoredRef = useRef(false);
96
- const appHost = useAppHost();
97
-
98
- // Auto-discover tools and merge with custom apps
99
- const tools = useMemo(() => autoDiscoverWithCustom([...createWebTools(modules), ...(apps ?? [])]), [apps, modules]);
100
- const visibility = useDevToolsVisibility();
101
- const toolVisible = appHost.openApps.some(app => !app.minimized);
102
- useEffect(() => {
103
- visibility.setDialOpen(isDialOpen);
104
- }, [isDialOpen, visibility.setDialOpen]);
105
- useEffect(() => {
106
- visibility.setToolOpen(toolVisible || isSettingsOpen);
107
- }, [toolVisible, isSettingsOpen, visibility.setToolOpen]);
108
-
109
- // Let the host restore `@react_buoy_open_apps` from the previous session
110
- // once it knows which tools exist (native registerApps parity).
111
- const {
112
- registerApps
113
- } = appHost;
114
- useEffect(() => {
115
- registerApps(tools.map(tool => {
116
- const icon = tool.icon;
117
- return {
118
- ...tool,
119
- icon: typeof icon === 'function' ? ({
120
- size
121
- }) => icon(size) : icon
122
- };
123
- }));
124
- }, [registerApps, tools]);
125
-
126
- // Convert to available tools config for settings
127
- const availableToolsConfig = useMemo(() => tools.map(tool => ({
128
- id: tool.id,
129
- name: tool.name,
130
- description: tool.description,
131
- slot: tool.slot
132
- })), [tools]);
133
-
134
- // Register available tools with the shared settings hook (used by the
135
- // settings modal and the bubble-row visibility gating).
136
- const {
137
- settings
138
- } = useSettings({
139
- availableTools: availableToolsConfig,
140
- storage: webSettingsStorage
141
- });
142
-
143
- // Dial/settings open-state persistence — native FloatingMenu.tsx:95-122 and
144
- // DialDevTools.tsx:136-164 restore these across reloads.
145
- useEffect(() => {
146
- let cancelled = false;
147
- const restore = async () => {
148
- const [dialOpen, settingsOpen] = await Promise.all([persistentStorage.getItem(devToolsStorageKeys.dial.isOpen()), persistentStorage.getItem(devToolsStorageKeys.settings.modalOpen())]);
149
- if (cancelled) return;
150
- if (dialOpen === 'true') setIsDialOpen(true);
151
- if (settingsOpen === 'true') {
152
- setIsDialOpen(true); // settings lives above the dial (native structure)
153
- setIsSettingsOpen(true);
154
- }
155
- stateRestoredRef.current = true;
156
- };
157
- void restore();
158
- return () => {
159
- cancelled = true;
160
- };
161
- }, []);
162
- useEffect(() => {
163
- if (!stateRestoredRef.current) return;
164
- void persistentStorage.setItem(devToolsStorageKeys.dial.isOpen(), isDialOpen ? 'true' : 'false');
165
- }, [isDialOpen]);
166
- useEffect(() => {
167
- if (!stateRestoredRef.current) return;
168
- void persistentStorage.setItem(devToolsStorageKeys.settings.modalOpen(), isSettingsOpen ? 'true' : 'false');
169
- }, [isSettingsOpen]);
170
-
171
- // Shared open path for dial + bubble-row tools.
172
- const openTool = useCallback(tool => {
173
- void recordToolUsage(tool.id);
174
- if (tool.launchMode === 'toggle-only') {
175
- tool.onPress?.();
176
- return;
177
- }
178
- if (tool.component) {
179
- const dockIcon = typeof tool.icon === 'function' ? tool.icon(20) : tool.icon;
180
- appHost.open({
181
- id: tool.id,
182
- title: tool.name || getToolLabel(tool.id),
183
- component: tool.component,
184
- props: tool.props,
185
- modal: tool.modal,
186
- launchMode: tool.launchMode || 'self-modal',
187
- singleton: tool.singleton ?? true,
188
- icon: dockIcon,
189
- color: tool.color || getToolColor(tool.id)
190
- });
191
- } else {
192
- tool.onPress?.();
193
- }
194
- }, [appHost]);
195
-
196
- // Build dial icons for every dial-eligible tool. The dial paginates and
197
- // ranks them by usage, so there is no per-tool show/hide setting.
198
- const dialIcons = useMemo(() => {
199
- const dialTools = getToolsBySlot(tools, 'dial');
200
- return dialTools.map(tool => {
201
- const color = tool.color || getToolColor(tool.id);
202
- // Handle icon - can be string (emoji) or function (size) => ReactNode
203
- let icon;
204
- if (typeof tool.icon === 'string') {
205
- icon = tool.icon;
206
- } else if (typeof tool.icon === 'function') {
207
- // It's a render function - call it with size
208
- icon = tool.icon(32);
209
- } else {
210
- icon = null;
211
- }
212
- return {
213
- id: tool.id,
214
- // The tool's own name wins (native parity); the registry label is
215
- // the fallback for preset tools that don't set one.
216
- name: tool.name || getToolLabel(tool.id),
217
- icon,
218
- // Preset tools with no component and no onPress can't do anything on
219
- // web — render them like native's uninstalled tools ("Unavailable"
220
- // caption, non-interactive) instead of a tile that silently no-ops.
221
- unavailable: !tool.component && !tool.onPress,
222
- color,
223
- onPress: () => {
224
- openTool(tool);
225
- setIsDialOpen(false);
226
- }
227
- };
228
- });
229
- }, [tools, openTool]);
230
-
231
- // Snapshot the usage-ranked order each time the dial opens. It stays stable
232
- // while open so icons don't jump positions mid-interaction.
233
- const rankedDialIcons = useMemo(() => {
234
- if (!isDialOpen) return dialIcons;
235
- const byId = new Map(dialIcons.map(i => [i.id, i]));
236
- return getRankedToolIds(dialIcons.map(i => i.id)).map(id => byId.get(id)).filter(i => Boolean(i));
237
- }, [isDialOpen, dialIcons]);
238
-
239
- // Bubble-row tools — native FloatingMenu.tsx:349-386: slot !== 'dial',
240
- // explicitly enabled in settings, rendered as small icon buttons.
241
- const rowTools = useMemo(() => getToolsBySlot(tools, 'row').filter(tool => settings.floatingTools[tool.id] === true && (tool.component || tool.onPress)), [tools, settings.floatingTools]);
242
-
243
- // Build available tools for settings modal
244
- const availableTools = useMemo(() => tools.map(tool => ({
245
- id: tool.id,
246
- name: tool.name || getToolLabel(tool.id),
247
- description: tool.description || getToolDescription(tool.id),
248
- slot: tool.slot,
249
- // Settings rows fall back to the tool's own icon when the modal has
250
- // no hardcoded glyph for it (mirrors native DialDevTools).
251
- icon: tool.icon,
252
- color: tool.color
253
- })), [tools]);
254
-
255
- // Welcome tooltip — native FloatingMenu.tsx:134-157: 1000ms after mount,
256
- // once ever, only while nothing else is open; the bubble centers under the
257
- // arrow while it shows.
258
- const [showWelcomeTooltip, setShowWelcomeTooltip] = useState(false);
259
- const isAnyToolOpen = appHost.openApps.some(app => !app.minimized);
260
- useEffect(() => {
261
- if (disableHints) return;
262
- let cancelled = false;
263
- const timer = setTimeout(async () => {
264
- const seen = await persistentStorage.getItem(MENU_TOOLTIP_KEY);
265
- if (!cancelled && !seen) setShowWelcomeTooltip(true);
266
- }, 1000);
267
- return () => {
268
- cancelled = true;
269
- clearTimeout(timer);
270
- };
271
- }, [disableHints]);
272
- const dismissWelcomeTooltip = useCallback(() => {
273
- setShowWelcomeTooltip(false);
274
- void persistentStorage.setItem(MENU_TOOLTIP_KEY, 'true');
275
- }, []);
276
-
277
- // Callbacks
278
- const handleOpenDial = useCallback(() => {
279
- // Opening the dial dismisses the welcome tooltip (native handleDialOpen).
280
- dismissWelcomeTooltip();
281
- setIsDialOpen(true);
282
- }, [dismissWelcomeTooltip]);
283
- const handleCloseDial = useCallback(() => {
284
- setIsDialOpen(false);
285
- setIsSettingsOpen(false); // settings lives above the dial
286
- }, []);
287
- // Center press toggles settings while the dial STAYS OPEN underneath —
288
- // the center label flips to CLOSE/SETTINGS (native DialDevTools behavior).
289
- const handleCenterPress = useCallback(() => {
290
- setIsSettingsOpen(open => !open);
291
- }, []);
292
- const handleCloseSettings = useCallback(() => setIsSettingsOpen(false), []);
293
- const showEnvironmentSelector = Boolean(availableEnvironments?.length && onEnvironmentSwitch);
294
- const environmentEnabled = settings.floatingTools.environment !== false;
295
- const welcomeActive = showWelcomeTooltip && !isDialOpen && !isAnyToolOpen;
296
- const hasMinimizedTools = appHost.openApps.some(app => app.minimized && app.launchMode !== 'toggle-only');
297
- const runtime = /*#__PURE__*/_jsx(BrowserToolRuntime, {
298
- modules: modules,
299
- apps: apps,
300
- requiredEnvVars: requiredEnvVars,
301
- externalSync: externalSync,
302
- headless: headless,
303
- sentryGetClient: sentryGetClient
304
- });
305
- if (headless) return runtime;
306
- return /*#__PURE__*/_jsxs("div", {
307
- "data-buoy-root": "",
308
- style: {
309
- display: 'contents'
310
- },
311
- children: [runtime, welcomeActive && /*#__PURE__*/_jsx("div", {
312
- style: {
313
- position: 'fixed',
314
- inset: 0,
315
- backgroundColor: 'rgba(0,0,0,0.85)',
316
- zIndex: 10000
317
- }
318
- }), /*#__PURE__*/_jsxs(FloatingTools, {
319
- enablePositionPersistence: !welcomeActive,
320
- pushToSide: isDialOpen || isAnyToolOpen,
321
- suspendPointerEvents: isDialOpen,
322
- centerOnboarding: welcomeActive,
323
- minimizedStack: hasMinimizedTools ? /*#__PURE__*/_jsx(MinimizedToolsStack, {}) : undefined,
324
- hasMinimizedStack: hasMinimizedTools,
325
- children: [environment && environmentEnabled && !showEnvironmentSelector && /*#__PURE__*/_jsx(EnvironmentIndicator, {
326
- environment: environment
327
- }), showEnvironmentSelector && environmentEnabled && /*#__PURE__*/_jsx(EnvironmentSelectorInline, {
328
- currentEnvironment: environment ?? 'local',
329
- availableEnvironments: availableEnvironments,
330
- onSelect: onEnvironmentSwitch
331
- }), userRole ? /*#__PURE__*/_jsx(UserStatus, {
332
- userRole: userRole,
333
- onPress: handleOpenDial
334
- }) :
335
- /*#__PURE__*/
336
- // native MenuLauncherIcon fallback: dial stays reachable without a
337
- // userRole pill.
338
- _jsx("button", {
339
- "aria-label": "Open dev tools",
340
- onClick: handleOpenDial,
341
- style: {
342
- display: 'flex',
343
- alignItems: 'center',
344
- justifyContent: 'center',
345
- padding: '6px 8px',
346
- background: 'none',
347
- border: 'none',
348
- cursor: 'pointer'
349
- },
350
- children: /*#__PURE__*/_jsx(MenuLauncherIcon, {})
351
- }), rowTools.map(tool =>
352
- /*#__PURE__*/
353
- // native FloatingMenu fab: paddingH 6, paddingV 4, r6, transparent
354
- _jsx("button", {
355
- "aria-label": tool.name || getToolLabel(tool.id),
356
- title: tool.description,
357
- onClick: () => openTool(tool),
358
- style: {
359
- display: 'flex',
360
- alignItems: 'center',
361
- justifyContent: 'center',
362
- padding: '4px 6px',
363
- borderRadius: 6,
364
- background: 'none',
365
- border: 'none',
366
- cursor: 'pointer'
367
- },
368
- children: typeof tool.icon === 'function' ? tool.icon(16) : tool.icon
369
- }, tool.id))]
370
- }), welcomeActive && /*#__PURE__*/_jsx(OnboardingTooltip, {
371
- title: "Welcome to Buoy!",
372
- message: "Grab and position this menu wherever you want, then tap the icon to open your tools.",
373
- onDismiss: dismissWelcomeTooltip
374
- }), isDialOpen && /*#__PURE__*/_jsx(DialMenu, {
375
- icons: rankedDialIcons,
376
- onClose: handleCloseDial,
377
- centerLabel: "BUOY",
378
- onCenterPress: handleCenterPress,
379
- settingsOpen: isSettingsOpen,
380
- hintsDisabled: disableHints
381
- }), /*#__PURE__*/_jsx(SettingsModal, {
382
- visible: isSettingsOpen,
383
- onClose: handleCloseSettings,
384
- availableTools: availableTools,
385
- onSettingsChange: _newSettings => {
386
- // Settings are already saved by the hook
387
- }
388
- }), /*#__PURE__*/_jsx(AppOverlay, {}), /*#__PURE__*/_jsx(FloatingToolHost, {})]
389
- });
390
- }
391
-
392
- // =============================
393
- // Re-exports for convenience
394
- // =============================
395
-
396
- export function FloatingDevTools(props) {
397
- const {
398
- access,
399
- isPro,
400
- licenseKey
401
- } = useLicense();
402
- useEffect(() => {
403
- void LicenseManager.configure(props.licenseKey);
404
- }, [props.licenseKey]);
405
- const matches = props.licenseKey === undefined || props.licenseKey.trim().toUpperCase() === (licenseKey ?? "");
406
- const dev = typeof __DEV__ !== "undefined" ? __DEV__ : process.env.NODE_ENV !== "production";
407
- if (!dev && !isPro) return null;
408
- if (!matches || access.status !== "admitted") return props.headless ? null : /*#__PURE__*/_jsx(AccountSetup, {});
409
- return /*#__PURE__*/_jsx(AdmittedFloatingDevTools, {
410
- ...props
411
- });
412
- }
1
+ "use strict";import{FloatingToolHost as oe}from"@buoy-gg/shared-ui/floating";import{LicenseManager as ie,useLicense as se}from"@buoy-gg/license";import{AccountSetup as re}from"@buoy-gg/shared-ui";import{useState as x,useMemo as h,useCallback as b,useEffect as c,useRef as ae}from"react";import{useSettings as ce,getToolLabel as E,getToolDescription as le,getToolColor as F}from"@buoy-gg/floating-tools-react";import{persistentStorage as d,devToolsStorageKeys as I,EnvironmentIndicator as de,EnvironmentSelectorInline as me}from"@buoy-gg/shared-ui";import{autoDiscoverWithCustom as pe,getToolsBySlot as N}from"../utils/autoDiscoverPresets.web.js";import{FloatingTools as ue,UserStatus as fe}from"./floatingTools.web.js";import{DialMenu as ge}from"./dial/DialDevTools.web.js";import{getRankedToolIds as ye,recordToolUsage as ve}from"./dial/dialUsageStore.js";import{OnboardingTooltip as Te}from"./dial/OnboardingTooltip.web.js";import{SettingsModal as he}from"./DevToolsSettingsModal.web.js";import{AppHostProvider as be,AppOverlay as Oe,useAppHost as Se}from"./AppHost.web.js";import{MinimizedToolsStack as Ce}from"./MinimizedToolsStack.web.js";import{createWebTools as De}from"../utils/createWebTools.js";import{BrowserToolRuntime as we}from"./BrowserToolRuntime.js";import{markReleaseOptIn as Ee}from"../releaseOptIn.js";import{DevToolsVisibilityProvider as Ie,useDevToolsVisibility as _e}from"./DevToolsVisibilityContext.js";import{jsx as t,jsxs as Y}from"react/jsx-runtime";const Me={};const G="@react_buoy_floating_menu_tooltip_shown";const Pe=d;function ke({size:o=14,color:m="#20C997"}){const s=Math.max(2,o/4);const p=Math.max(1,o/16);return t("div",{style:{display:"grid",gridTemplateColumns:`repeat(3, ${s}px)`,gap:p,width:o,height:o,alignContent:"center",justifyContent:"center"},children:Array.from({length:9}).map((u,l)=>t("div",{style:{width:s,height:s,borderRadius:s/2,backgroundColor:m}},l))})}function xe(o){return t(Ie,{children:t(be,{children:t(Ae,{...o})})})}function Ae({environment:o,userRole:m,availableEnvironments:s,onEnvironmentSwitch:p,apps:u,modules:l=Me,externalSync:O,requiredEnvVars:H,sentryGetClient:q,disableHints:_=false,headless:A=false}){const[r,S]=x(false);const[f,C]=x(false);const M=ae(false);const g=Se();const a=h(()=>pe([...De(l),...u??[]]),[u,l]);const D=_e();const L=g.openApps.some(e=>!e.minimized);c(()=>{D.setDialOpen(r)},[r,D.setDialOpen]);c(()=>{D.setToolOpen(L||f)},[L,f,D.setToolOpen]);const{registerApps:K}=g;c(()=>{K(a.map(e=>{const n=e.icon;return{...e,icon:typeof n==="function"?({size:i})=>n(i):n}}))},[K,a]);const $=h(()=>a.map(e=>({id:e.id,name:e.name,description:e.description,slot:e.slot})),[a]);const{settings:P}=ce({availableTools:$,storage:Pe});c(()=>{let e=false;const n=async()=>{const[i,T]=await Promise.all([d.getItem(I.dial.isOpen()),d.getItem(I.settings.modalOpen())]);if(e)return;if(i==="true")S(true);if(T==="true"){S(true);C(true)}M.current=true};void n();return()=>{e=true}},[]);c(()=>{if(!M.current)return;void d.setItem(I.dial.isOpen(),r?"true":"false")},[r]);c(()=>{if(!M.current)return;void d.setItem(I.settings.modalOpen(),f?"true":"false")},[f]);const k=b(e=>{void ve(e.id);if(e.launchMode==="toggle-only"){e.onPress?.();return}if(e.component){const n=typeof e.icon==="function"?e.icon(20):e.icon;g.open({id:e.id,title:e.name||E(e.id),component:e.component,props:e.props,modal:e.modal,launchMode:e.launchMode||"self-modal",singleton:e.singleton??true,icon:n,color:e.color||F(e.id)})}else{e.onPress?.()}},[g]);const w=h(()=>{const e=N(a,"dial");return e.map(n=>{const i=n.color||F(n.id);let T;if(typeof n.icon==="string"){T=n.icon}else if(typeof n.icon==="function"){T=n.icon(32)}else{T=null}return{id:n.id,name:n.name||E(n.id),icon:T,unavailable:!n.component&&!n.onPress,color:i,onPress:()=>{k(n);S(false)}}})},[a,k]);const J=h(()=>{if(!r)return w;const e=new Map(w.map(n=>[n.id,n]));return ye(w.map(n=>n.id)).map(n=>e.get(n)).filter(n=>Boolean(n))},[r,w]);const Q=h(()=>N(a,"row").filter(e=>P.floatingTools[e.id]===true&&(e.component||e.onPress)),[a,P.floatingTools]);const X=h(()=>a.map(e=>({id:e.id,name:e.name||E(e.id),description:e.description||le(e.id),slot:e.slot,icon:e.icon,color:e.color})),[a]);const[Z,R]=x(false);const j=g.openApps.some(e=>!e.minimized);c(()=>{if(_)return;let e=false;const n=setTimeout(async()=>{const i=await d.getItem(G);if(!e&&!i)R(true)},1e3);return()=>{e=true;clearTimeout(n)}},[_]);const y=b(()=>{R(false);void d.setItem(G,"true")},[]);const V=b(()=>{y();S(true)},[y]);const ee=b(()=>{S(false);C(false)},[]);const ne=b(()=>{C(e=>!e)},[]);const te=b(()=>C(false),[]);const B=Boolean(s?.length&&p);const U=P.floatingTools.environment!==false;const v=Z&&!r&&!j;c(()=>{if(!v)return;const e=i=>{if(!(i.target instanceof Element)||!i.target.closest("[data-buoy-root]"))y()};const n=i=>{if(i.key==="Escape")y()};document.addEventListener("pointerdown",e,true);document.addEventListener("keydown",n);return()=>{document.removeEventListener("pointerdown",e,true);document.removeEventListener("keydown",n)}},[v,y]);const W=g.openApps.some(e=>e.minimized&&e.launchMode!=="toggle-only");const z=t(we,{modules:l,apps:u,requiredEnvVars:H,externalSync:O,headless:A,sentryGetClient:q});if(A)return z;return Y("div",{"data-buoy-root":"",style:{display:"contents"},children:[z,v&&t("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.85)",zIndex:1e4,pointerEvents:"none"}}),Y(ue,{enablePositionPersistence:!v,pushToSide:r||j,suspendPointerEvents:r,centerOnboarding:v,minimizedStack:W?t(Ce,{}):void 0,hasMinimizedStack:W,children:[o&&U&&!B&&t(de,{environment:o}),B&&U&&t(me,{currentEnvironment:o??"local",availableEnvironments:s,onSelect:p}),m?t(fe,{userRole:m,onPress:V}):t("button",{"aria-label":"Open dev tools",onClick:V,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",background:"none",border:"none",cursor:"pointer"},children:t(ke,{})}),Q.map(e=>t("button",{"aria-label":e.name||E(e.id),title:e.description,onClick:()=>k(e),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"4px 6px",borderRadius:6,background:"none",border:"none",cursor:"pointer"},children:typeof e.icon==="function"?e.icon(16):e.icon},e.id))]}),v&&t(Te,{title:"Welcome to Buoy!",message:"Grab and position this menu wherever you want, then tap the icon to open your tools.",onDismiss:y}),r&&t(ge,{icons:J,onClose:ee,centerLabel:"BUOY",onCenterPress:ne,settingsOpen:f,hintsDisabled:_}),t(he,{visible:f,onClose:te,availableTools:X,onSettingsChange:e=>{}}),t(Oe,{}),t(oe,{})]})}export function FloatingDevTools(o){const{access:m,isPro:s,licenseKey:p}=se();c(()=>{void ie.configure(o.licenseKey)},[o.licenseKey]);const u=o.licenseKey===void 0||o.licenseKey.trim().toUpperCase()===(p??"");const l=typeof __DEV__!=="undefined"?__DEV__:process.env.NODE_ENV!=="production";const O=u&&m.status==="admitted";c(()=>{if(!l&&s&&O)Ee()},[l,s,O]);if(!l&&!s)return null;if(!O)return o.headless?null:t(re,{});return t(xe,{...o})}