@buoy-gg/core 7.0.40 → 7.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/README.md +14 -85
  2. package/bin/buoy.js +20 -347
  3. package/lib/commonjs/Buoy.js +1 -107
  4. package/lib/commonjs/browserRegister.js +1 -0
  5. package/lib/commonjs/browserRegister.server.js +1 -0
  6. package/lib/commonjs/earlyHookScript.js +1 -0
  7. package/lib/commonjs/earlyNetwork.js +1 -0
  8. package/lib/commonjs/floatingMenu/AppHost.js +1 -460
  9. package/lib/commonjs/floatingMenu/AppHost.web.js +1 -364
  10. package/lib/commonjs/floatingMenu/AppHostLogic.js +1 -50
  11. package/lib/commonjs/floatingMenu/AppIcon.js +1 -91
  12. package/lib/commonjs/floatingMenu/AppIcon.web.js +1 -53
  13. package/lib/commonjs/floatingMenu/BrowserToolRuntime.js +1 -0
  14. package/lib/commonjs/floatingMenu/DefaultConfigContext.js +1 -45
  15. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.js +1 -1119
  16. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.shared.js +1 -0
  17. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.web.js +1 -1048
  18. package/lib/commonjs/floatingMenu/DevToolsVisibilityContext.js +1 -49
  19. package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -554
  20. package/lib/commonjs/floatingMenu/FloatingDevTools.web.js +1 -401
  21. package/lib/commonjs/floatingMenu/FloatingMenu.js +1 -371
  22. package/lib/commonjs/floatingMenu/MinimizedToolsContext.js +1 -274
  23. package/lib/commonjs/floatingMenu/MinimizedToolsStack.js +1 -288
  24. package/lib/commonjs/floatingMenu/MinimizedToolsStack.web.js +1 -371
  25. package/lib/commonjs/floatingMenu/ToggleStateManager.js +1 -36
  26. package/lib/commonjs/floatingMenu/ToolHost.js +1 -281
  27. package/lib/commonjs/floatingMenu/ToolOpenerBridge.js +1 -41
  28. package/lib/commonjs/floatingMenu/autoDiscoverPresets.js +1 -461
  29. package/lib/commonjs/floatingMenu/autoExternalSync.js +1 -434
  30. package/lib/commonjs/floatingMenu/defaultConfig.js +1 -167
  31. package/lib/commonjs/floatingMenu/deviceIdentity.js +1 -173
  32. package/lib/commonjs/floatingMenu/dial/DialDevTools.js +1 -904
  33. package/lib/commonjs/floatingMenu/dial/DialDevTools.web.js +1 -821
  34. package/lib/commonjs/floatingMenu/dial/DialHyperspace.js +1 -177
  35. package/lib/commonjs/floatingMenu/dial/DialIcon.js +1 -302
  36. package/lib/commonjs/floatingMenu/dial/DialPagination.js +1 -165
  37. package/lib/commonjs/floatingMenu/dial/DialSnow.js +1 -92
  38. package/lib/commonjs/floatingMenu/dial/OnboardingTooltip.js +1 -246
  39. package/lib/commonjs/floatingMenu/dial/OnboardingTooltip.web.js +2 -147
  40. package/lib/commonjs/floatingMenu/dial/dialUsageStore.js +1 -93
  41. package/lib/commonjs/floatingMenu/dial/onboardingConstants.js +1 -42
  42. package/lib/commonjs/floatingMenu/dial/onboardingConstants.web.js +1 -42
  43. package/lib/commonjs/floatingMenu/externalSyncGate.js +1 -49
  44. package/lib/commonjs/floatingMenu/floatingTools.js +1 -42
  45. package/lib/commonjs/floatingMenu/floatingTools.web.js +1 -30
  46. package/lib/commonjs/floatingMenu/optionalRequire.js +1 -37
  47. package/lib/commonjs/floatingMenu/settingsBus.js +1 -23
  48. package/lib/commonjs/floatingMenu/sync/appSyncAdapter.js +1 -115
  49. package/lib/commonjs/floatingMenu/types.js +1 -5
  50. package/lib/commonjs/floatingMenu/useDesktopSyncStatus.js +1 -28
  51. package/lib/commonjs/floatingMenu/useDesktopSyncStatus.web.js +1 -0
  52. package/lib/commonjs/index.js +1 -291
  53. package/lib/commonjs/index.web.js +1 -150
  54. package/lib/commonjs/reactDevtoolsTypes.js +1 -0
  55. package/lib/commonjs/releaseOptIn.js +1 -0
  56. package/lib/commonjs/telemetry/installPing.js +1 -131
  57. package/lib/commonjs/toolkit.js +1 -584
  58. package/lib/commonjs/toolkitComponents.js +1 -241
  59. package/lib/commonjs/utils/autoDiscoverPresets.web.js +1 -219
  60. package/lib/commonjs/utils/createWebTool.js +1 -0
  61. package/lib/commonjs/utils/createWebTools.js +1 -0
  62. package/lib/commonjs/version.js +1 -18
  63. package/lib/module/Buoy.js +1 -102
  64. package/lib/module/browserRegister.js +1 -0
  65. package/lib/module/browserRegister.server.js +1 -0
  66. package/lib/module/earlyHookScript.js +1 -0
  67. package/lib/module/earlyNetwork.js +1 -0
  68. package/lib/module/floatingMenu/AppHost.js +1 -452
  69. package/lib/module/floatingMenu/AppHost.web.js +1 -356
  70. package/lib/module/floatingMenu/AppHostLogic.js +1 -45
  71. package/lib/module/floatingMenu/AppIcon.js +1 -84
  72. package/lib/module/floatingMenu/AppIcon.web.js +1 -47
  73. package/lib/module/floatingMenu/BrowserToolRuntime.js +1 -0
  74. package/lib/module/floatingMenu/DefaultConfigContext.js +1 -39
  75. package/lib/module/floatingMenu/DevToolsSettingsModal.js +1 -1115
  76. package/lib/module/floatingMenu/DevToolsSettingsModal.shared.js +1 -0
  77. package/lib/module/floatingMenu/DevToolsSettingsModal.web.js +1 -1055
  78. package/lib/module/floatingMenu/DevToolsVisibilityContext.js +1 -44
  79. package/lib/module/floatingMenu/FloatingDevTools.js +1 -551
  80. package/lib/module/floatingMenu/FloatingDevTools.web.js +1 -399
  81. package/lib/module/floatingMenu/FloatingMenu.js +1 -366
  82. package/lib/module/floatingMenu/MinimizedToolsContext.js +1 -266
  83. package/lib/module/floatingMenu/MinimizedToolsStack.js +1 -285
  84. package/lib/module/floatingMenu/MinimizedToolsStack.web.js +1 -368
  85. package/lib/module/floatingMenu/ToggleStateManager.js +1 -32
  86. package/lib/module/floatingMenu/ToolHost.js +1 -273
  87. package/lib/module/floatingMenu/ToolOpenerBridge.js +1 -37
  88. package/lib/module/floatingMenu/autoDiscoverPresets.js +1 -457
  89. package/lib/module/floatingMenu/autoExternalSync.js +1 -427
  90. package/lib/module/floatingMenu/defaultConfig.js +1 -158
  91. package/lib/module/floatingMenu/deviceIdentity.js +1 -163
  92. package/lib/module/floatingMenu/dial/DialDevTools.js +1 -900
  93. package/lib/module/floatingMenu/dial/DialDevTools.web.js +1 -818
  94. package/lib/module/floatingMenu/dial/DialHyperspace.js +1 -173
  95. package/lib/module/floatingMenu/dial/DialIcon.js +1 -299
  96. package/lib/module/floatingMenu/dial/DialPagination.js +1 -160
  97. package/lib/module/floatingMenu/dial/DialSnow.js +1 -90
  98. package/lib/module/floatingMenu/dial/OnboardingTooltip.js +1 -240
  99. package/lib/module/floatingMenu/dial/OnboardingTooltip.web.js +2 -142
  100. package/lib/module/floatingMenu/dial/dialUsageStore.js +1 -85
  101. package/lib/module/floatingMenu/dial/onboardingConstants.js +1 -3
  102. package/lib/module/floatingMenu/dial/onboardingConstants.web.js +1 -3
  103. package/lib/module/floatingMenu/externalSyncGate.js +1 -44
  104. package/lib/module/floatingMenu/floatingTools.js +1 -27
  105. package/lib/module/floatingMenu/floatingTools.web.js +1 -3
  106. package/lib/module/floatingMenu/optionalRequire.js +1 -33
  107. package/lib/module/floatingMenu/settingsBus.js +1 -19
  108. package/lib/module/floatingMenu/sync/appSyncAdapter.js +1 -112
  109. package/lib/module/floatingMenu/types.js +1 -3
  110. package/lib/module/floatingMenu/useDesktopSyncStatus.js +1 -25
  111. package/lib/module/floatingMenu/useDesktopSyncStatus.web.js +1 -0
  112. package/lib/module/index.js +1 -41
  113. package/lib/module/index.web.js +1 -29
  114. package/lib/module/reactDevtoolsTypes.js +1 -0
  115. package/lib/module/releaseOptIn.js +1 -0
  116. package/lib/module/telemetry/installPing.js +1 -127
  117. package/lib/module/toolkit.js +1 -62
  118. package/lib/module/toolkitComponents.js +1 -230
  119. package/lib/module/utils/autoDiscoverPresets.web.js +1 -213
  120. package/lib/module/utils/createWebTool.js +1 -0
  121. package/lib/module/utils/createWebTools.js +1 -0
  122. package/lib/module/version.js +1 -14
  123. package/lib/typescript/commonjs/browserRegister.d.ts +13 -0
  124. package/lib/typescript/commonjs/browserRegister.server.d.ts +6 -0
  125. package/lib/typescript/commonjs/earlyHookScript.d.ts +12 -0
  126. package/lib/typescript/commonjs/earlyNetwork.d.ts +52 -0
  127. package/lib/typescript/commonjs/floatingMenu/AppHost.web.d.ts +3 -3
  128. package/lib/typescript/commonjs/floatingMenu/BrowserToolRuntime.d.ts +14 -0
  129. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts +2 -67
  130. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.shared.d.ts +71 -0
  131. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.web.d.ts +3 -16
  132. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.web.d.ts +12 -6
  133. package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts +1 -1
  134. package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts +1 -9
  135. package/lib/typescript/commonjs/floatingMenu/useDesktopSyncStatus.web.d.ts +3 -0
  136. package/lib/typescript/commonjs/index.web.d.ts +7 -0
  137. package/lib/typescript/commonjs/reactDevtoolsTypes.d.ts +8 -0
  138. package/lib/typescript/commonjs/releaseOptIn.d.ts +4 -0
  139. package/lib/typescript/commonjs/utils/autoDiscoverPresets.web.d.ts +3 -40
  140. package/lib/typescript/commonjs/utils/createWebTool.d.ts +6 -0
  141. package/lib/typescript/commonjs/utils/createWebTools.d.ts +4 -0
  142. package/lib/typescript/commonjs/version.d.ts +1 -1
  143. package/lib/typescript/module/browserRegister.d.ts +13 -0
  144. package/lib/typescript/module/browserRegister.server.d.ts +6 -0
  145. package/lib/typescript/module/earlyHookScript.d.ts +12 -0
  146. package/lib/typescript/module/earlyNetwork.d.ts +52 -0
  147. package/lib/typescript/module/floatingMenu/AppHost.web.d.ts +3 -3
  148. package/lib/typescript/module/floatingMenu/BrowserToolRuntime.d.ts +14 -0
  149. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts +2 -67
  150. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.shared.d.ts +71 -0
  151. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.web.d.ts +3 -16
  152. package/lib/typescript/module/floatingMenu/FloatingDevTools.web.d.ts +12 -6
  153. package/lib/typescript/module/floatingMenu/defaultConfig.d.ts +1 -1
  154. package/lib/typescript/module/floatingMenu/settingsBus.d.ts +1 -9
  155. package/lib/typescript/module/floatingMenu/useDesktopSyncStatus.web.d.ts +3 -0
  156. package/lib/typescript/module/index.web.d.ts +7 -0
  157. package/lib/typescript/module/reactDevtoolsTypes.d.ts +8 -0
  158. package/lib/typescript/module/releaseOptIn.d.ts +4 -0
  159. package/lib/typescript/module/utils/autoDiscoverPresets.web.d.ts +3 -40
  160. package/lib/typescript/module/utils/createWebTool.d.ts +6 -0
  161. package/lib/typescript/module/utils/createWebTools.d.ts +4 -0
  162. package/lib/typescript/module/version.d.ts +1 -1
  163. package/lib/web/chunks/chunk-5SGL6QL4.mjs +1 -0
  164. package/lib/web/chunks/chunk-FROELTJH.mjs +1 -0
  165. package/lib/web/chunks/chunk-QZDVCMCT.mjs +1 -0
  166. package/lib/web/chunks/chunk-R7RGRTY5.mjs +1 -0
  167. package/lib/web/index.mjs +10 -0
  168. package/lib/web/register-server.mjs +1 -0
  169. package/lib/web/register.mjs +1 -0
  170. package/lib/web/toolkit.mjs +1 -0
  171. package/package.json +50 -12
  172. package/lib/typescript/commonjs/Buoy.d.ts.map +0 -1
  173. package/lib/typescript/commonjs/floatingMenu/AppHost.d.ts.map +0 -1
  174. package/lib/typescript/commonjs/floatingMenu/AppHost.web.d.ts.map +0 -1
  175. package/lib/typescript/commonjs/floatingMenu/AppHostLogic.d.ts.map +0 -1
  176. package/lib/typescript/commonjs/floatingMenu/AppIcon.d.ts.map +0 -1
  177. package/lib/typescript/commonjs/floatingMenu/AppIcon.web.d.ts.map +0 -1
  178. package/lib/typescript/commonjs/floatingMenu/DefaultConfigContext.d.ts.map +0 -1
  179. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts.map +0 -1
  180. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.web.d.ts.map +0 -1
  181. package/lib/typescript/commonjs/floatingMenu/DevToolsVisibilityContext.d.ts.map +0 -1
  182. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts.map +0 -1
  183. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.web.d.ts.map +0 -1
  184. package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts.map +0 -1
  185. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsContext.d.ts.map +0 -1
  186. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.d.ts.map +0 -1
  187. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.web.d.ts.map +0 -1
  188. package/lib/typescript/commonjs/floatingMenu/ToggleStateManager.d.ts.map +0 -1
  189. package/lib/typescript/commonjs/floatingMenu/ToolHost.d.ts.map +0 -1
  190. package/lib/typescript/commonjs/floatingMenu/ToolOpenerBridge.d.ts.map +0 -1
  191. package/lib/typescript/commonjs/floatingMenu/autoDiscoverPresets.d.ts.map +0 -1
  192. package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts.map +0 -1
  193. package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts.map +0 -1
  194. package/lib/typescript/commonjs/floatingMenu/deviceIdentity.d.ts.map +0 -1
  195. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts.map +0 -1
  196. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.web.d.ts.map +0 -1
  197. package/lib/typescript/commonjs/floatingMenu/dial/DialHyperspace.d.ts.map +0 -1
  198. package/lib/typescript/commonjs/floatingMenu/dial/DialIcon.d.ts.map +0 -1
  199. package/lib/typescript/commonjs/floatingMenu/dial/DialPagination.d.ts.map +0 -1
  200. package/lib/typescript/commonjs/floatingMenu/dial/DialSnow.d.ts.map +0 -1
  201. package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.d.ts.map +0 -1
  202. package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.web.d.ts.map +0 -1
  203. package/lib/typescript/commonjs/floatingMenu/dial/dialUsageStore.d.ts.map +0 -1
  204. package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.d.ts.map +0 -1
  205. package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.web.d.ts.map +0 -1
  206. package/lib/typescript/commonjs/floatingMenu/externalSyncGate.d.ts.map +0 -1
  207. package/lib/typescript/commonjs/floatingMenu/floatingTools.d.ts.map +0 -1
  208. package/lib/typescript/commonjs/floatingMenu/floatingTools.web.d.ts.map +0 -1
  209. package/lib/typescript/commonjs/floatingMenu/optionalRequire.d.ts.map +0 -1
  210. package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts.map +0 -1
  211. package/lib/typescript/commonjs/floatingMenu/sync/appSyncAdapter.d.ts.map +0 -1
  212. package/lib/typescript/commonjs/floatingMenu/types.d.ts.map +0 -1
  213. package/lib/typescript/commonjs/floatingMenu/useDesktopSyncStatus.d.ts.map +0 -1
  214. package/lib/typescript/commonjs/index.d.ts.map +0 -1
  215. package/lib/typescript/commonjs/index.web.d.ts.map +0 -1
  216. package/lib/typescript/commonjs/telemetry/installPing.d.ts.map +0 -1
  217. package/lib/typescript/commonjs/toolkit.d.ts.map +0 -1
  218. package/lib/typescript/commonjs/toolkitComponents.d.ts.map +0 -1
  219. package/lib/typescript/commonjs/utils/autoDiscoverPresets.web.d.ts.map +0 -1
  220. package/lib/typescript/commonjs/version.d.ts.map +0 -1
  221. package/lib/typescript/module/Buoy.d.ts.map +0 -1
  222. package/lib/typescript/module/floatingMenu/AppHost.d.ts.map +0 -1
  223. package/lib/typescript/module/floatingMenu/AppHost.web.d.ts.map +0 -1
  224. package/lib/typescript/module/floatingMenu/AppHostLogic.d.ts.map +0 -1
  225. package/lib/typescript/module/floatingMenu/AppIcon.d.ts.map +0 -1
  226. package/lib/typescript/module/floatingMenu/AppIcon.web.d.ts.map +0 -1
  227. package/lib/typescript/module/floatingMenu/DefaultConfigContext.d.ts.map +0 -1
  228. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts.map +0 -1
  229. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.web.d.ts.map +0 -1
  230. package/lib/typescript/module/floatingMenu/DevToolsVisibilityContext.d.ts.map +0 -1
  231. package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts.map +0 -1
  232. package/lib/typescript/module/floatingMenu/FloatingDevTools.web.d.ts.map +0 -1
  233. package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts.map +0 -1
  234. package/lib/typescript/module/floatingMenu/MinimizedToolsContext.d.ts.map +0 -1
  235. package/lib/typescript/module/floatingMenu/MinimizedToolsStack.d.ts.map +0 -1
  236. package/lib/typescript/module/floatingMenu/MinimizedToolsStack.web.d.ts.map +0 -1
  237. package/lib/typescript/module/floatingMenu/ToggleStateManager.d.ts.map +0 -1
  238. package/lib/typescript/module/floatingMenu/ToolHost.d.ts.map +0 -1
  239. package/lib/typescript/module/floatingMenu/ToolOpenerBridge.d.ts.map +0 -1
  240. package/lib/typescript/module/floatingMenu/autoDiscoverPresets.d.ts.map +0 -1
  241. package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts.map +0 -1
  242. package/lib/typescript/module/floatingMenu/defaultConfig.d.ts.map +0 -1
  243. package/lib/typescript/module/floatingMenu/deviceIdentity.d.ts.map +0 -1
  244. package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts.map +0 -1
  245. package/lib/typescript/module/floatingMenu/dial/DialDevTools.web.d.ts.map +0 -1
  246. package/lib/typescript/module/floatingMenu/dial/DialHyperspace.d.ts.map +0 -1
  247. package/lib/typescript/module/floatingMenu/dial/DialIcon.d.ts.map +0 -1
  248. package/lib/typescript/module/floatingMenu/dial/DialPagination.d.ts.map +0 -1
  249. package/lib/typescript/module/floatingMenu/dial/DialSnow.d.ts.map +0 -1
  250. package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.d.ts.map +0 -1
  251. package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.web.d.ts.map +0 -1
  252. package/lib/typescript/module/floatingMenu/dial/dialUsageStore.d.ts.map +0 -1
  253. package/lib/typescript/module/floatingMenu/dial/onboardingConstants.d.ts.map +0 -1
  254. package/lib/typescript/module/floatingMenu/dial/onboardingConstants.web.d.ts.map +0 -1
  255. package/lib/typescript/module/floatingMenu/externalSyncGate.d.ts.map +0 -1
  256. package/lib/typescript/module/floatingMenu/floatingTools.d.ts.map +0 -1
  257. package/lib/typescript/module/floatingMenu/floatingTools.web.d.ts.map +0 -1
  258. package/lib/typescript/module/floatingMenu/optionalRequire.d.ts.map +0 -1
  259. package/lib/typescript/module/floatingMenu/settingsBus.d.ts.map +0 -1
  260. package/lib/typescript/module/floatingMenu/sync/appSyncAdapter.d.ts.map +0 -1
  261. package/lib/typescript/module/floatingMenu/types.d.ts.map +0 -1
  262. package/lib/typescript/module/floatingMenu/useDesktopSyncStatus.d.ts.map +0 -1
  263. package/lib/typescript/module/index.d.ts.map +0 -1
  264. package/lib/typescript/module/index.web.d.ts.map +0 -1
  265. package/lib/typescript/module/telemetry/installPing.d.ts.map +0 -1
  266. package/lib/typescript/module/toolkit.d.ts.map +0 -1
  267. package/lib/typescript/module/toolkitComponents.d.ts.map +0 -1
  268. package/lib/typescript/module/utils/autoDiscoverPresets.web.d.ts.map +0 -1
  269. package/lib/typescript/module/version.d.ts.map +0 -1
@@ -1,44 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * DevToolsVisibilityContext
5
- *
6
- * Tracks when DevTools UI is visible (dial menu, modals, etc.)
7
- * Used by other tools (like debug borders) to hide when DevTools are active
8
- */
9
-
10
- import { createContext, useContext, useState, useMemo } from "react";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- const DevToolsVisibilityContext = /*#__PURE__*/createContext(null);
13
- export function DevToolsVisibilityProvider({
14
- children
15
- }) {
16
- const [isDialOpen, setDialOpen] = useState(false);
17
- const [isToolOpen, setToolOpen] = useState(false);
18
- const isDevToolsActive = useMemo(() => isDialOpen || isToolOpen, [isDialOpen, isToolOpen]);
19
- const value = useMemo(() => ({
20
- isDialOpen,
21
- isToolOpen,
22
- isDevToolsActive,
23
- setDialOpen,
24
- setToolOpen
25
- }), [isDialOpen, isToolOpen, isDevToolsActive]);
26
- return /*#__PURE__*/_jsx(DevToolsVisibilityContext.Provider, {
27
- value: value,
28
- children: children
29
- });
30
- }
31
- export function useDevToolsVisibility() {
32
- const context = useContext(DevToolsVisibilityContext);
33
- if (!context) {
34
- // Return safe defaults if not within provider
35
- return {
36
- isDialOpen: false,
37
- isToolOpen: false,
38
- isDevToolsActive: false,
39
- setDialOpen: () => {},
40
- setToolOpen: () => {}
41
- };
42
- }
43
- return context;
44
- }
1
+ "use strict";import{createContext as u,useContext as p,useState as i,useMemo as n}from"react";import{jsx as v}from"react/jsx-runtime";const l=u(null);export function DevToolsVisibilityProvider({children:e}){const[o,r]=i(false);const[s,a]=i(false);const t=n(()=>o||s,[o,s]);const c=n(()=>({isDialOpen:o,isToolOpen:s,isDevToolsActive:t,setDialOpen:r,setToolOpen:a}),[o,s,t]);return v(l.Provider,{value:c,children:e})}export function useDevToolsVisibility(){const e=p(l);if(!e){return{isDialOpen:false,isToolOpen:false,isDevToolsActive:false,setDialOpen:()=>{},setToolOpen:()=>{}}}return e}
@@ -1,551 +1 @@
1
- "use strict";
2
-
3
- import { FloatingToolHost } from "@buoy-gg/shared-ui";
4
- import { AccountSetup } from "@buoy-gg/shared-ui";
5
- import React, { useMemo, useCallback, useEffect } from "react";
6
- import { View, StyleSheet } from "react-native";
7
- import { AppHostProvider } from "./AppHost";
8
- import { FloatingMenu } from "./FloatingMenu.js";
9
- import { AppOverlay } from "./AppHost";
10
- import { ToolOpenerBridge } from "./ToolOpenerBridge.js";
11
- import { autoDiscoverPresets, autoDiscoverPresetsWithCustom } from "./autoDiscoverPresets.js";
12
- import { sendInstallPing } from "../telemetry/installPing.js";
13
- import { isTelemetryEnabled } from "../Buoy.js";
14
- import { renderAppIcon } from "./AppIcon";
15
- import { DevToolsVisibilityProvider } from "./DevToolsVisibilityContext.js";
16
- import { reportOptionalRequireError } from "./optionalRequire.js";
17
- import { HintsProvider, normalizeEnvironment } from "@buoy-gg/shared-ui";
18
- import { MinimizedToolsProvider } from "./MinimizedToolsContext.js";
19
- import { validateDialConfig } from "./defaultConfig.js";
20
- import { DefaultConfigProvider } from "./DefaultConfigContext.js";
21
- import { LicenseManager, useProAccess, useLicense } from "@buoy-gg/license";
22
- import { AutoExternalSync, ToolRegistryPublisher, isExternalSyncAvailable } from "./autoExternalSync.js";
23
- import { externalSyncOptions, shouldMountExternalSync } from "./externalSyncGate.js";
24
-
25
- /**
26
- * Environment variable configuration
27
- *
28
- * This type is compatible with RequiredEnvVar from @buoy-gg/env
29
- *
30
- * @example
31
- * ```tsx
32
- * // Simple string (just check existence)
33
- * "API_URL"
34
- *
35
- * // Check for specific type
36
- * { key: "DEBUG_MODE", expectedType: "boolean" }
37
- *
38
- * // Check for specific value
39
- * { key: "ENVIRONMENT", expectedValue: "development" }
40
- * ```
41
- */
42
-
43
- /**
44
- * Storage key configuration for monitoring
45
- */
46
-
47
- /**
48
- * Ask Buoy's config, mirrored structurally so core never depends on the
49
- * optional `@buoy-gg/ask-buoy` package (it is required lazily, like every other
50
- * tool). The object is handed to `createAskBuoyTool` untouched, so any field
51
- * that package accepts passes through — the index signature is the seam.
52
- */
53
-
54
- /**
55
- * Props for FloatingDevTools component.
56
- *
57
- * ZERO-CONFIG: All @buoy-gg/* tools are auto-discovered when installed.
58
- * You don't need to pass anything to use network, storage, redux, etc. tools!
59
- * Just install the package and it works automatically.
60
- */
61
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
62
- /**
63
- * Unified floating development tools component with automatic preset discovery.
64
- *
65
- * This component combines AppHostProvider, FloatingMenu, and AppOverlay
66
- * into a single component for simplified setup and better developer experience.
67
- *
68
- * **Zero-Config Usage:**
69
- * ```tsx
70
- * <FloatingDevTools environment="local" userRole="admin" />
71
- * // All installed dev tools automatically appear!
72
- * ```
73
- *
74
- * **With Team Default Configuration (Type-Safe!):**
75
- * ```tsx
76
- * // Set which tools are enabled by default for your team
77
- * <FloatingDevTools
78
- * // Floating bubble: ENV badge + WiFi toggle
79
- * defaultFloatingTools={['env', 'environment', 'query-wifi-toggle']}
80
- * // Dial menu: your team's 6 favorite tools (max 6!)
81
- * defaultDialTools={['env', 'network', 'storage', 'query', 'route-events', 'debug-borders']}
82
- * environment="local"
83
- * userRole="admin"
84
- * />
85
- * ```
86
- *
87
- * **With Validation (Super Simple!):**
88
- * ```tsx
89
- * <FloatingDevTools
90
- * requiredEnvVars={[
91
- * "API_URL", // Just check existence
92
- * { key: "DEBUG_MODE", expectedType: "boolean" },
93
- * ]}
94
- * requiredStorageKeys={[
95
- * { key: "@app/session", storageType: "async" },
96
- * ]}
97
- * environment="local"
98
- * userRole="admin"
99
- * />
100
- * ```
101
- *
102
- * **With Custom Tools:**
103
- * ```tsx
104
- * <FloatingDevTools
105
- * apps={[myCustomTool]}
106
- * environment="local"
107
- * userRole="admin"
108
- * />
109
- * ```
110
- *
111
- * The component is absolutely positioned to float on top of your application
112
- * regardless of where it's placed in the component tree.
113
- *
114
- * @param props - FloatingDevTools props
115
- */
116
- export const FloatingDevTools = ({
117
- apps,
118
- requiredEnvVars,
119
- requiredStorageKeys,
120
- askBuoy,
121
- children,
122
- disableHints = false,
123
- defaultFloatingTools,
124
- defaultDialTools,
125
- requireLicense: _requireLicense,
126
- licenseKey: licenseKeyProp,
127
- zustandStores,
128
- environment,
129
- externalSync = true,
130
- headless = false,
131
- ...props
132
- }) => {
133
- const resolvedEnvironment = environment ?? normalizeEnvironment(process.env.NODE_ENV ?? "dev");
134
- // Production gating + the device→dashboard license handshake must use a REAL
135
- // license only — NOT the free Weekend Pass. Otherwise shipping Buoy would
136
- // expose the devtools to end users every weekend, and the dashboard would try
137
- // to adopt a non-existent key. (Feature unlocks inside the tools still honor
138
- // the Weekend Pass via their own useIsPro().)
139
- const {
140
- isLicensed
141
- } = useProAccess();
142
-
143
- // Account admission is mandatory; paid feature gates remain separate.
144
- const {
145
- licenseKey,
146
- isInitialized,
147
- tier,
148
- access
149
- } = useLicense();
150
- const configuredMatches = licenseKeyProp === undefined || licenseKeyProp.trim().toUpperCase() === (licenseKey ?? "");
151
- const accountAdmitted = configuredMatches && access.status === "admitted";
152
-
153
- // Anonymous install ping — dev-only, once a day, no project or tool data.
154
- // Deliberately waits for admission to resolve so what it reports is the
155
- // real outcome (the account's tier, or "locked") rather than the manager's
156
- // starting state.
157
- useEffect(() => {
158
- if (!isInitialized || access.status === "initializing") return;
159
- void sendInstallPing({
160
- tier: access.status === "admitted" ? tier : "locked",
161
- enabled: isTelemetryEnabled()
162
- });
163
- }, [isInitialized, access.status, tier]);
164
-
165
- // Initialize license manager on mount, and set/clear license key when prop changes.
166
- // The `licenseKey` prop is the source of truth WHEN PROVIDED:
167
- // - non-empty → validate + activate that key
168
- // - "" (blank) → EXPLICITLY clear the cached license (key was removed)
169
- // - undefined → don't touch it (the app may set a key via Buoy.init())
170
- useEffect(() => {
171
- void LicenseManager.configure(licenseKeyProp).catch(() => {});
172
- }, [licenseKeyProp]);
173
-
174
- // Register zustand stores once on mount if provided
175
- useEffect(() => {
176
- if (!zustandStores || access.status === "locked") return;
177
- try {
178
- const {
179
- watchStores
180
- } = require("@buoy-gg/zustand");
181
- return watchStores(zustandStores);
182
- } catch (e) {
183
- reportOptionalRequireError("@buoy-gg/zustand", e);
184
- }
185
- }, [zustandStores, access.status]);
186
-
187
- // Normalize dial tools configuration (truncates to max 6 with warning if needed)
188
- const normalizedDialTools = useMemo(() => {
189
- if (defaultDialTools) {
190
- return validateDialConfig(defaultDialTools);
191
- }
192
- return defaultDialTools;
193
- }, [defaultDialTools]);
194
-
195
- // Build config overrides if requiredEnvVars or requiredStorageKeys are provided
196
- const configOverrides = useMemo(() => {
197
- const overrides = [];
198
-
199
- // If requiredEnvVars provided, create ENV tool config
200
- if (requiredEnvVars && requiredEnvVars.length > 0) {
201
- try {
202
- const {
203
- createEnvTool,
204
- createEnvVarConfig
205
- } = require("@buoy-gg/env");
206
- // Convert simple format to the internal format
207
- overrides.push(createEnvTool({
208
- requiredEnvVars: createEnvVarConfig(requiredEnvVars)
209
- }));
210
- } catch (error) {
211
- reportOptionalRequireError("@buoy-gg/env", error);
212
- }
213
- }
214
-
215
- // If requiredStorageKeys provided, create Storage tool config
216
- if (requiredStorageKeys && requiredStorageKeys.length > 0) {
217
- try {
218
- const {
219
- createStorageTool
220
- } = require("@buoy-gg/storage");
221
- overrides.push(createStorageTool({
222
- requiredStorageKeys
223
- }));
224
- } catch (error) {
225
- reportOptionalRequireError("@buoy-gg/storage", error);
226
- }
227
- }
228
-
229
- // The documented one-prop Ask Buoy setup. Same lazy-require shape as env
230
- // and storage above: the configured tool replaces the bare auto-discovered
231
- // preset by id, and an app without @buoy-gg/ask-buoy installed gets the
232
- // usual optional-require report instead of a crash.
233
- if (askBuoy) {
234
- try {
235
- const {
236
- createAskBuoyTool
237
- } = require("@buoy-gg/ask-buoy");
238
- overrides.push(createAskBuoyTool(askBuoy));
239
- } catch (error) {
240
- reportOptionalRequireError("@buoy-gg/ask-buoy", error);
241
- }
242
- }
243
- return overrides;
244
- }, [requiredEnvVars, requiredStorageKeys, askBuoy]);
245
-
246
- // Combine user apps with config overrides
247
- const userApps = useMemo(() => {
248
- if (!apps && configOverrides.length === 0) return undefined;
249
- return [...(apps || []), ...configOverrides];
250
- }, [apps, configOverrides]);
251
-
252
- // Always auto-discover, then merge with any user-provided apps or config overrides
253
- // User-provided apps and config overrides take precedence (by ID)
254
- // Memoized: rebuilding this array every render churned getToolIcon's
255
- // identity (and re-ran discovery) on every parent render.
256
- const finalApps = useMemo(() => userApps ? autoDiscoverPresetsWithCustom(userApps) : autoDiscoverPresets(), [userApps]);
257
-
258
- // Custom tools that declared a sync adapter — registered with the broker as
259
- // `custom:<id>` by AutoExternalSync. Memoized so the sync tools map (keyed
260
- // by identity) doesn't rebuild every render.
261
- const syncApps = useMemo(() => finalApps.filter(app => app.sync), [finalApps]);
262
-
263
- // Check if debug-borders is installed and auto-render the overlay
264
- const DebugBordersOverlay = useMemo(() => {
265
- try {
266
- // @ts-ignore - Dynamic import that may not exist
267
- const {
268
- DebugBordersStandaloneOverlay
269
- } = require("@buoy-gg/debug-borders");
270
- return DebugBordersStandaloneOverlay;
271
- } catch (e) {
272
- reportOptionalRequireError("@buoy-gg/debug-borders", e);
273
- return null;
274
- }
275
- }, []);
276
-
277
- // Check if highlight-updates is installed and auto-render the overlay
278
- const HighlightUpdatesOverlay = useMemo(() => {
279
- try {
280
- // @ts-ignore - Dynamic import that may not exist
281
- const {
282
- HighlightUpdatesOverlay: Overlay
283
- } = require("@buoy-gg/highlight-updates");
284
- return Overlay;
285
- } catch (e) {
286
- reportOptionalRequireError("@buoy-gg/highlight-updates", e);
287
- return null;
288
- }
289
- }, []);
290
-
291
- // Check if image-overlay is installed and auto-render the standalone overlay
292
- const ImageOverlayOverlay = useMemo(() => {
293
- try {
294
- // @ts-ignore - Dynamic import that may not exist
295
- const {
296
- ImageOverlayStandalone
297
- } = require("@buoy-gg/image-overlay");
298
- return ImageOverlayStandalone;
299
- } catch (e) {
300
- reportOptionalRequireError("@buoy-gg/image-overlay", e);
301
- return null;
302
- }
303
- }, []);
304
-
305
- // Check if perf-monitor is installed and auto-render the floating HUD
306
- const PerfMonitorOverlay = useMemo(() => {
307
- try {
308
- // @ts-ignore - Dynamic import that may not exist
309
- const {
310
- PerfMonitorOverlay: Overlay
311
- } = require("@buoy-gg/perf-monitor");
312
- return Overlay;
313
- } catch (e) {
314
- reportOptionalRequireError("@buoy-gg/perf-monitor", e);
315
- return null;
316
- }
317
- }, []);
318
-
319
- // Check if js-top is installed and auto-render the floating busy pill
320
- const JsTopOverlay = useMemo(() => {
321
- try {
322
- // @ts-ignore - Dynamic import that may not exist
323
- const {
324
- JsTopHudOverlay: Overlay
325
- } = require("@buoy-gg/js-top");
326
- return Overlay;
327
- } catch (e) {
328
- reportOptionalRequireError("@buoy-gg/js-top", e);
329
- return null;
330
- }
331
- }, []);
332
-
333
- // Check if route-events is installed and auto-render the RouteTracker
334
- // This enables automatic route tracking without requiring users to add <RouteTracker /> manually
335
- const RouteTracker = useMemo(() => {
336
- try {
337
- // @ts-ignore - Dynamic import that may not exist
338
- const {
339
- RouteTracker: Tracker
340
- } = require("@buoy-gg/route-events");
341
- return Tracker;
342
- } catch (e) {
343
- reportOptionalRequireError("@buoy-gg/route-events", e);
344
- return null;
345
- }
346
- }, []);
347
-
348
- // Check if react-query is installed and auto-render the ReactQueryTracker.
349
- // Without it the event store has no QueryClient unless someone opens the
350
- // React Query TOOL, so every other consumer of those events — the Events
351
- // timeline most visibly — sits at a confident zero forever.
352
- const ReactQueryTracker = useMemo(() => {
353
- try {
354
- // @ts-ignore - Dynamic import that may not exist
355
- const {
356
- ReactQueryTracker: Tracker
357
- } = require("@buoy-gg/react-query");
358
- return Tracker;
359
- } catch (e) {
360
- reportOptionalRequireError("@buoy-gg/react-query", e);
361
- return null;
362
- }
363
- }, []);
364
-
365
- // Check if impersonate is installed and auto-render the floating banner
366
- const ImpersonateOverlay = useMemo(() => {
367
- try {
368
- // @ts-ignore - Dynamic import that may not exist
369
- const {
370
- ImpersonateOverlay: Overlay
371
- } = require("@buoy-gg/impersonate");
372
- return Overlay;
373
- } catch (e) {
374
- reportOptionalRequireError("@buoy-gg/impersonate", e);
375
- return null;
376
- }
377
- }, []);
378
-
379
- // Check if scenarios is installed and auto-render the SIMULATED banner.
380
- // Not optional and not suppressible: while a scenario is active the app is
381
- // showing state that isn't real, and the banner is what stops that reaching
382
- // a bug report or a screenshot as if it were.
383
- const ScenariosOverlay = useMemo(() => {
384
- try {
385
- // @ts-ignore - Dynamic import that may not exist
386
- const {
387
- ScenariosOverlay: Overlay
388
- } = require("@buoy-gg/scenarios");
389
- return Overlay;
390
- } catch (e) {
391
- reportOptionalRequireError("@buoy-gg/scenarios", e);
392
- return null;
393
- }
394
- }, []);
395
-
396
- // Check if redux is installed and auto-mount startup instrumentation.
397
- // Binds the store from app mount (renders nothing) so the action log, MCP
398
- // getState/dispatch, and desktop sync work WITHOUT the Redux tool ever
399
- // being opened — previously instrumentation only started on modal open.
400
- const ReduxAutoInstrument = useMemo(() => {
401
- try {
402
- // @ts-ignore - Dynamic import that may not exist
403
- const {
404
- ReduxAutoInstrument: Instrument
405
- } = require("@buoy-gg/redux");
406
- return Instrument ?? null;
407
- } catch (e) {
408
- reportOptionalRequireError("@buoy-gg/redux", e);
409
- return null;
410
- }
411
- }, []);
412
-
413
- // Check if console is installed and auto-mount capture (renders nothing).
414
- // Starts console.* capture at app mount so logs emitted before the Console
415
- // tool is opened are retained — no manual <ConsoleRoot /> needed anymore.
416
- const ConsoleRoot = useMemo(() => {
417
- try {
418
- // @ts-ignore - Dynamic import that may not exist
419
- const {
420
- ConsoleRoot: Root
421
- } = require("@buoy-gg/console");
422
- return Root ?? null;
423
- } catch (e) {
424
- reportOptionalRequireError("@buoy-gg/console", e);
425
- return null;
426
- }
427
- }, []);
428
-
429
- // Get tool icon helper for the MinimizedToolsProvider
430
- const getToolIcon = useCallback(id => {
431
- const tool = finalApps.find(app => app.id === id);
432
- if (!tool) return null;
433
- return renderAppIcon(tool.icon, {
434
- slot: "dial",
435
- size: 20,
436
- color: tool.color
437
- });
438
- }, [finalApps]);
439
-
440
- // Gate: only a PAID license works outside development.
441
- //
442
- // A free key (and, of course, no key at all) stays dev-only. `isLicensed` is
443
- // safe to gate on because `isPro` is a strict mirror of `tier === "pro"`, so
444
- // a free key reports false here even though it validates perfectly well.
445
- //
446
- // When Business on-device login lands, this becomes the boundary that a
447
- // logged-in QA/support seat crosses WITHOUT a key in the build — i.e.
448
- // `isLicensed || tierSource === "session"`. Nothing else should.
449
- const isDevelopment = typeof __DEV__ !== "undefined" && __DEV__;
450
- if (!isDevelopment && !isLicensed) {
451
- // Free or unadmitted user in production - don't render DevTools.
452
- // NOTE for whoever relaxes this for the free tier: desktop sync does NOT
453
- // ride on this check. It re-tests `isLicensed` itself (externalSyncGate),
454
- // so opening this door does not open a broker socket. Keep it that way.
455
- return null;
456
- }
457
-
458
- // Zero-config in dev; in a release bundle the app must opt in explicitly
459
- // (externalSync.enableInRelease) AND hold a real Pro license — see
460
- // externalSyncGate.ts for why both halves are required.
461
- const syncEnabled = shouldMountExternalSync({
462
- isDevelopment,
463
- isLicensed,
464
- externalSync,
465
- isAvailable: isExternalSyncAvailable()
466
- });
467
-
468
- // The on-device action registry is published unconditionally, separately
469
- // from the broker socket. They used to be the same mount: `registerToolAdapters`
470
- // lived inside AutoExternalSync, so anything driving tools from INSIDE the
471
- // app (the Scenarios runner, Ask Buoy) got an empty registry in exactly the
472
- // builds where sync was off, and every dispatch threw `Unknown tool`.
473
- // Publishing the map opens no socket and contacts nothing.
474
- const toolRegistry = /*#__PURE__*/_jsx(ToolRegistryPublisher, {
475
- requiredEnvVars: requiredEnvVars,
476
- customApps: syncApps
477
- });
478
- if (!accountAdmitted) {
479
- return /*#__PURE__*/_jsxs(_Fragment, {
480
- children: [access.status === "initializing" && /*#__PURE__*/_jsxs(_Fragment, {
481
- children: [ReduxAutoInstrument && /*#__PURE__*/_jsx(ReduxAutoInstrument, {}), ConsoleRoot && /*#__PURE__*/_jsx(ConsoleRoot, {}), RouteTracker && /*#__PURE__*/_jsx(RouteTracker, {}), ReactQueryTracker && /*#__PURE__*/_jsx(ReactQueryTracker, {})]
482
- }), !headless && /*#__PURE__*/_jsx(AccountSetup, {})]
483
- });
484
- }
485
-
486
- // Headless (sync-only): tool adapters + route tracking + desktop sync, no
487
- // on-device UI. Account admission above applies to this path too. All hooks above already ran, so hook order is preserved, and
488
- // AutoExternalSync still obeys `syncEnabled` (the broker must never be
489
- // contacted from a shipped build that didn't ask for it).
490
- if (headless) {
491
- return /*#__PURE__*/_jsxs(_Fragment, {
492
- children: [ReduxAutoInstrument && /*#__PURE__*/_jsx(ReduxAutoInstrument, {}), ConsoleRoot && /*#__PURE__*/_jsx(ConsoleRoot, {}), RouteTracker && /*#__PURE__*/_jsx(RouteTracker, {}), ReactQueryTracker && /*#__PURE__*/_jsx(ReactQueryTracker, {}), toolRegistry, syncEnabled && /*#__PURE__*/_jsx(AutoExternalSync, {
493
- options: externalSyncOptions(externalSync),
494
- requiredEnvVars: requiredEnvVars,
495
- isPro: isLicensed,
496
- tier: tier,
497
- licenseKey: licenseKey,
498
- customApps: syncApps
499
- })]
500
- });
501
- }
502
-
503
- // Session blocking is handled inline by JsModal's SessionBlockedOverlay
504
- // No need to replace the entire UI - tools still render, but content is blocked
505
-
506
- return /*#__PURE__*/_jsx(DefaultConfigProvider, {
507
- defaultFloatingTools: defaultFloatingTools,
508
- defaultDialTools: normalizedDialTools,
509
- children: /*#__PURE__*/_jsx(HintsProvider, {
510
- disableHints: disableHints,
511
- children: /*#__PURE__*/_jsx(View, {
512
- style: styles.container,
513
- pointerEvents: "box-none"
514
- // @ts-expect-error — deliberate marker prop, not part of ViewProps.
515
- ,
516
- __buoyDevToolsRoot: true,
517
- children: /*#__PURE__*/_jsxs(DevToolsVisibilityProvider, {
518
- children: [/*#__PURE__*/_jsx(AppHostProvider, {
519
- children: /*#__PURE__*/_jsxs(MinimizedToolsProvider, {
520
- getToolIcon: getToolIcon,
521
- children: [/*#__PURE__*/_jsx(FloatingMenu, {
522
- ...props,
523
- apps: finalApps,
524
- environment: resolvedEnvironment
525
- }), props.hidden ? null : /*#__PURE__*/_jsxs(_Fragment, {
526
- children: [/*#__PURE__*/_jsx(AppOverlay, {}), /*#__PURE__*/_jsx(FloatingToolHost, {})]
527
- }), /*#__PURE__*/_jsx(ToolOpenerBridge, {})]
528
- })
529
- }), children, DebugBordersOverlay && /*#__PURE__*/_jsx(DebugBordersOverlay, {}), HighlightUpdatesOverlay && /*#__PURE__*/_jsx(HighlightUpdatesOverlay, {}), ImageOverlayOverlay && /*#__PURE__*/_jsx(ImageOverlayOverlay, {}), PerfMonitorOverlay && /*#__PURE__*/_jsx(PerfMonitorOverlay, {}), JsTopOverlay && /*#__PURE__*/_jsx(JsTopOverlay, {}), ImpersonateOverlay && /*#__PURE__*/_jsx(ImpersonateOverlay, {}), ScenariosOverlay && /*#__PURE__*/_jsx(ScenariosOverlay, {}), ReduxAutoInstrument && /*#__PURE__*/_jsx(ReduxAutoInstrument, {}), ConsoleRoot && /*#__PURE__*/_jsx(ConsoleRoot, {}), RouteTracker && /*#__PURE__*/_jsx(RouteTracker, {}), ReactQueryTracker && /*#__PURE__*/_jsx(ReactQueryTracker, {}), toolRegistry, syncEnabled && /*#__PURE__*/_jsx(AutoExternalSync, {
530
- options: externalSyncOptions(externalSync),
531
- requiredEnvVars: requiredEnvVars,
532
- isPro: isLicensed,
533
- tier: tier,
534
- licenseKey: licenseKey,
535
- customApps: syncApps
536
- })]
537
- })
538
- })
539
- })
540
- });
541
- };
542
- const styles = StyleSheet.create({
543
- container: {
544
- position: "absolute",
545
- top: 0,
546
- left: 0,
547
- right: 0,
548
- bottom: 0,
549
- zIndex: 9999
550
- }
551
- });
1
+ "use strict";import{FloatingToolHost as re}from"@buoy-gg/shared-ui";import{AccountSetup as te}from"@buoy-gg/shared-ui";import Pe,{useMemo as t,useCallback as oe,useEffect as I}from"react";import{View as w,StyleSheet as B}from"react-native";import{AppHostProvider as ne}from"./AppHost";import{FloatingMenu as ie}from"./FloatingMenu.js";import{AppOverlay as se}from"./AppHost";import{ToolOpenerBridge as ue}from"./ToolOpenerBridge.js";import{autoDiscoverPresets as ce,autoDiscoverPresetsWithCustom as le}from"./autoDiscoverPresets.js";import{sendInstallPing as ae}from"../telemetry/installPing.js";import{isTelemetryEnabled as ge}from"../Buoy.js";import{renderAppIcon as ye}from"./AppIcon";import{DevToolsVisibilityProvider as me}from"./DevToolsVisibilityContext.js";import{reportOptionalRequireError as n}from"./optionalRequire.js";import{HintsProvider as pe,normalizeEnvironment as de}from"@buoy-gg/shared-ui";import{MinimizedToolsProvider as fe}from"./MinimizedToolsContext.js";import{validateDialConfig as be}from"./defaultConfig.js";import{DefaultConfigProvider as ve}from"./DefaultConfigContext.js";import{LicenseManager as he,useProAccess as Oe,useLicense as Te}from"@buoy-gg/license";import{AutoExternalSync as J,ToolRegistryPublisher as Ae,isExternalSyncAvailable as qe}from"./autoExternalSync.js";import{externalSyncOptions as N,shouldMountExternalSync as Ee}from"./externalSyncGate.js";import{jsx as r,Fragment as v,jsxs as g}from"react/jsx-runtime";export const FloatingDevTools=({apps:h,requiredEnvVars:i,requiredStorageKeys:m,askBuoy:O,children:Q,disableHints:W=false,defaultFloatingTools:G,defaultDialTools:p,requireLicense:xe,licenseKey:d,zustandStores:T,environment:X,externalSync:A=true,headless:D=false,...P})=>{const Y=X??de(process.env.NODE_ENV??"dev");const{isLicensed:f}=Oe();const{licenseKey:q,isInitialized:k,tier:b,access:s}=Te();const Z=d===void 0||d.trim().toUpperCase()===(q??"");const $=Z&&s.status==="admitted";I(()=>{if(!k||s.status==="initializing")return;void ae({tier:s.status==="admitted"?b:"locked",enabled:ge()})},[k,s.status,b]);I(()=>{void he.configure(d).catch(()=>{})},[d]);I(()=>{if(!T||s.status==="locked")return;try{const{watchStores:e}=require("@buoy-gg/zustand");return e(T)}catch(e){n("@buoy-gg/zustand",e)}},[T,s.status]);const K=t(()=>{if(p){return be(p)}return p},[p]);const E=t(()=>{const e=[];if(i&&i.length>0){try{const{createEnvTool:o,createEnvVarConfig:R}=require("@buoy-gg/env");e.push(o({requiredEnvVars:R(i)}))}catch(o){n("@buoy-gg/env",o)}}if(m&&m.length>0){try{const{createStorageTool:o}=require("@buoy-gg/storage");e.push(o({requiredStorageKeys:m}))}catch(o){n("@buoy-gg/storage",o)}}if(O){try{const{createAskBuoyTool:o}=require("@buoy-gg/ask-buoy");e.push(o(O))}catch(o){n("@buoy-gg/ask-buoy",o)}}return e},[i,m,O]);const _=t(()=>{if(!h&&E.length===0)return void 0;return[...h||[],...E]},[h,E]);const y=t(()=>_?le(_):ce(),[_]);const x=t(()=>y.filter(e=>e.sync),[y]);const z=t(()=>{try{const{DebugBordersStandaloneOverlay:e}=require("@buoy-gg/debug-borders");return e}catch(e){n("@buoy-gg/debug-borders",e);return null}},[]);const C=t(()=>{try{const{HighlightUpdatesOverlay:e}=require("@buoy-gg/highlight-updates");return e}catch(e){n("@buoy-gg/highlight-updates",e);return null}},[]);const M=t(()=>{try{const{ImageOverlayStandalone:e}=require("@buoy-gg/image-overlay");return e}catch(e){n("@buoy-gg/image-overlay",e);return null}},[]);const F=t(()=>{try{const{PerfMonitorOverlay:e}=require("@buoy-gg/perf-monitor");return e}catch(e){n("@buoy-gg/perf-monitor",e);return null}},[]);const H=t(()=>{try{const{JsTopHudOverlay:e}=require("@buoy-gg/js-top");return e}catch(e){n("@buoy-gg/js-top",e);return null}},[]);const u=t(()=>{try{const{RouteTracker:e}=require("@buoy-gg/route-events");return e}catch(e){n("@buoy-gg/route-events",e);return null}},[]);const c=t(()=>{try{const{ReactQueryTracker:e}=require("@buoy-gg/react-query");return e}catch(e){n("@buoy-gg/react-query",e);return null}},[]);const j=t(()=>{try{const{ImpersonateOverlay:e}=require("@buoy-gg/impersonate");return e}catch(e){n("@buoy-gg/impersonate",e);return null}},[]);const S=t(()=>{try{const{ScenariosOverlay:e}=require("@buoy-gg/scenarios");return e}catch(e){n("@buoy-gg/scenarios",e);return null}},[]);const l=t(()=>{try{const{ReduxAutoInstrument:e}=require("@buoy-gg/redux");return e??null}catch(e){n("@buoy-gg/redux",e);return null}},[]);const a=t(()=>{try{const{ConsoleRoot:e}=require("@buoy-gg/console");return e??null}catch(e){n("@buoy-gg/console",e);return null}},[]);const ee=oe(e=>{const o=y.find(R=>R.id===e);if(!o)return null;return ye(o.icon,{slot:"dial",size:20,color:o.color})},[y]);const L=typeof __DEV__!=="undefined"&&__DEV__;if(!L&&!f){return null}const V=Ee({isDevelopment:L,isLicensed:f,externalSync:A,isAvailable:qe()});const U=r(Ae,{requiredEnvVars:i,customApps:x});if(!$){return g(v,{children:[s.status==="initializing"&&g(v,{children:[l&&r(l,{}),a&&r(a,{}),u&&r(u,{}),c&&r(c,{})]}),!D&&r(te,{})]})}if(D){return g(v,{children:[l&&r(l,{}),a&&r(a,{}),u&&r(u,{}),c&&r(c,{}),U,V&&r(J,{options:N(A),requiredEnvVars:i,isPro:f,tier:b,licenseKey:q,customApps:x})]})}return r(ve,{defaultFloatingTools:G,defaultDialTools:K,children:r(pe,{disableHints:W,children:r(w,{style:_e.container,pointerEvents:"box-none",__buoyDevToolsRoot:true,children:g(me,{children:[M&&r(w,{style:B.absoluteFill,pointerEvents:"box-none",collapsable:false,children:r(M,{})}),r(ne,{children:g(fe,{getToolIcon:ee,children:[r(ie,{...P,apps:y,environment:Y}),P.hidden?null:g(v,{children:[r(se,{}),r(re,{})]}),r(ue,{})]})}),Q,z&&r(z,{}),C&&r(C,{}),F&&r(F,{}),H&&r(H,{}),j&&r(j,{}),S&&r(S,{}),l&&r(l,{}),a&&r(a,{}),u&&r(u,{}),c&&r(c,{}),U,V&&r(J,{options:N(A),requiredEnvVars:i,isPro:f,tier:b,licenseKey:q,customApps:x})]})})})})};const _e=B.create({container:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:9999}});