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