@buoy-gg/shared-ui 7.0.36 → 7.0.38

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 (284) hide show
  1. package/README.md +33 -26
  2. package/floating.d.ts +1 -0
  3. package/floating.js +2 -0
  4. package/lib/commonjs/JsModal.js +16 -1
  5. package/lib/commonjs/JsModal.web.js +16 -1
  6. package/lib/commonjs/dataViewer/CyberpunkInput.js +6 -1
  7. package/lib/commonjs/dataViewer/LiveExplorer.js +28 -16
  8. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  9. package/lib/commonjs/icons/ReactQueryIcon.js +9 -161
  10. package/lib/commonjs/icons/SentryBugIcon.js +9 -171
  11. package/lib/commonjs/index.js +57 -6
  12. package/lib/commonjs/license/AccountSetup.js +56 -0
  13. package/lib/commonjs/license/AccountSetup.web.js +81 -0
  14. package/lib/commonjs/license/FeatureGate.js +10 -43
  15. package/lib/commonjs/license/FreeAccountPrompt.js +35 -12
  16. package/lib/commonjs/license/index.js +0 -6
  17. package/lib/commonjs/license/licenseModule.js +56 -36
  18. package/lib/commonjs/license/tierLimits.js +12 -63
  19. package/lib/commonjs/storage/devToolsStorageKeys.js +8 -1
  20. package/lib/commonjs/stores/BaseEventStore.js +21 -5
  21. package/lib/commonjs/stores/createToolStore.js +21 -3
  22. package/lib/commonjs/stores/floatingToolStore.js +71 -0
  23. package/lib/commonjs/stores/floatingToolStore.test.js +112 -0
  24. package/lib/commonjs/sync/toolActionRegistry.js +85 -2
  25. package/lib/commonjs/ui/backgrounds/README.md +52 -0
  26. package/lib/commonjs/ui/backgrounds/ToolBackground.js +4 -2
  27. package/lib/commonjs/ui/backgrounds/index.js +8 -1
  28. package/lib/commonjs/ui/backgrounds/registry.js +8 -0
  29. package/lib/commonjs/ui/backgrounds/variants/wormhole/motion.js +48 -0
  30. package/lib/commonjs/ui/backgrounds/variants/wormhole/textures.js +3 -0
  31. package/lib/commonjs/ui/backgrounds/variants/wormhole.js +133 -0
  32. package/lib/commonjs/ui/components/ClipboardHintBanner.js +5 -6
  33. package/lib/commonjs/ui/components/CompactRow.js +94 -74
  34. package/lib/commonjs/ui/components/DraggableHeader.js +16 -1
  35. package/lib/commonjs/ui/components/HeaderSearchButton.js +17 -4
  36. package/lib/commonjs/ui/floating/FloatingTool.js +1010 -0
  37. package/lib/commonjs/ui/floating/FloatingTool.web.js +591 -0
  38. package/lib/commonjs/ui/floating/FloatingToolHost.js +32 -0
  39. package/lib/commonjs/ui/floating/FloatingToolHost.web.js +28 -0
  40. package/lib/commonjs/ui/floating/index.js +105 -0
  41. package/lib/commonjs/ui/floating/index.web.js +105 -0
  42. package/lib/commonjs/ui/floating/onboardingConstants.js +70 -0
  43. package/lib/commonjs/ui/floating/onboardingConstants.web.js +34 -0
  44. package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +3 -1
  45. package/lib/commonjs/ui/index.js +118 -2
  46. package/lib/commonjs/ui/night/nightTheme.js +10 -0
  47. package/lib/commonjs/ui/night/primitives.js +22 -5
  48. package/lib/commonjs/ui/otto/OttoSceneView.js +69 -0
  49. package/lib/commonjs/ui/otto/index.js +22 -0
  50. package/lib/commonjs/ui/otto/ottoEngine.js +10 -7
  51. package/lib/commonjs/ui/otto/ottoScenes.js +949 -0
  52. package/lib/commonjs/utils/minimalSuperJSON.js +13 -3
  53. package/lib/module/JsModal.js +16 -1
  54. package/lib/module/JsModal.web.js +16 -1
  55. package/lib/module/dataViewer/CyberpunkInput.js +6 -1
  56. package/lib/module/dataViewer/LiveExplorer.js +28 -16
  57. package/lib/module/hooks/safe-area-impl.js +1 -1
  58. package/lib/module/icons/ReactQueryIcon.js +9 -161
  59. package/lib/module/icons/SentryBugIcon.js +9 -171
  60. package/lib/module/index.js +4 -1
  61. package/lib/module/license/AccountSetup.js +52 -0
  62. package/lib/module/license/AccountSetup.web.js +77 -0
  63. package/lib/module/license/FeatureGate.js +10 -43
  64. package/lib/module/license/FreeAccountPrompt.js +35 -12
  65. package/lib/module/license/index.js +1 -1
  66. package/lib/module/license/licenseModule.js +50 -35
  67. package/lib/module/license/tierLimits.js +13 -63
  68. package/lib/module/storage/devToolsStorageKeys.js +8 -1
  69. package/lib/module/stores/BaseEventStore.js +21 -5
  70. package/lib/module/stores/createToolStore.js +21 -3
  71. package/lib/module/stores/floatingToolStore.js +61 -0
  72. package/lib/module/stores/floatingToolStore.test.js +111 -0
  73. package/lib/module/sync/toolActionRegistry.js +84 -2
  74. package/lib/module/ui/backgrounds/README.md +52 -0
  75. package/lib/module/ui/backgrounds/ToolBackground.js +4 -2
  76. package/lib/module/ui/backgrounds/index.js +2 -1
  77. package/lib/module/ui/backgrounds/registry.js +8 -0
  78. package/lib/module/ui/backgrounds/variants/wormhole/motion.js +44 -0
  79. package/lib/module/ui/backgrounds/variants/wormhole/textures.js +3 -0
  80. package/lib/module/ui/backgrounds/variants/wormhole.js +129 -0
  81. package/lib/module/ui/components/ClipboardHintBanner.js +5 -6
  82. package/lib/module/ui/components/CompactRow.js +94 -74
  83. package/lib/module/ui/components/DraggableHeader.js +16 -1
  84. package/lib/module/ui/components/HeaderSearchButton.js +17 -4
  85. package/lib/module/ui/floating/FloatingTool.js +1003 -0
  86. package/lib/module/ui/floating/FloatingTool.web.js +590 -0
  87. package/lib/module/ui/floating/FloatingToolHost.js +29 -0
  88. package/lib/module/ui/floating/FloatingToolHost.web.js +25 -0
  89. package/lib/module/ui/floating/index.js +6 -0
  90. package/lib/module/ui/floating/index.web.js +6 -0
  91. package/lib/module/ui/floating/onboardingConstants.js +64 -0
  92. package/lib/module/ui/floating/onboardingConstants.web.js +27 -0
  93. package/lib/module/ui/gameUI/constants/gameUIColors.js +3 -1
  94. package/lib/module/ui/index.js +5 -1
  95. package/lib/module/ui/night/nightTheme.js +10 -0
  96. package/lib/module/ui/night/primitives.js +22 -5
  97. package/lib/module/ui/otto/OttoSceneView.js +64 -0
  98. package/lib/module/ui/otto/index.js +3 -1
  99. package/lib/module/ui/otto/ottoEngine.js +10 -7
  100. package/lib/module/ui/otto/ottoScenes.js +942 -0
  101. package/lib/module/utils/minimalSuperJSON.js +13 -3
  102. package/lib/typescript/commonjs/JsModal.d.ts +43 -2
  103. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/JsModal.web.d.ts +5 -2
  105. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  109. package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts +1 -2
  110. package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts +1 -2
  112. package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/index.d.ts +4 -1
  114. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/license/AccountSetup.d.ts +4 -0
  116. package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +2 -0
  118. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/license/FeatureGate.d.ts +3 -19
  120. package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +8 -11
  122. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/license/index.d.ts +1 -1
  124. package/lib/typescript/commonjs/license/index.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/license/licenseModule.d.ts +18 -31
  126. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/license/tierLimits.d.ts +9 -52
  128. package/lib/typescript/commonjs/license/tierLimits.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +6 -0
  130. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/stores/BaseEventStore.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/stores/createToolStore.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/stores/floatingToolStore.d.ts +27 -0
  134. package/lib/typescript/commonjs/stores/floatingToolStore.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/stores/floatingToolStore.test.d.ts +2 -0
  136. package/lib/typescript/commonjs/stores/floatingToolStore.test.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts +4 -32
  138. package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts +7 -1
  140. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +2 -1
  142. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
  144. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +11 -1
  145. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/motion.d.ts +24 -0
  147. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/motion.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/textures.d.ts +13 -0
  149. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/textures.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole.d.ts +3 -0
  151. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +8 -1
  154. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts +4 -1
  156. package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts.map +1 -1
  157. package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts +7 -1
  158. package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts.map +1 -1
  159. package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts +79 -0
  160. package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts +64 -0
  162. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.d.ts +3 -0
  164. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.web.d.ts +3 -0
  166. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.web.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/ui/floating/index.d.ts +7 -0
  168. package/lib/typescript/commonjs/ui/floating/index.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/ui/floating/index.web.d.ts +7 -0
  170. package/lib/typescript/commonjs/ui/floating/index.web.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/ui/floating/onboardingConstants.d.ts +30 -0
  172. package/lib/typescript/commonjs/ui/floating/onboardingConstants.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/ui/floating/onboardingConstants.web.d.ts +13 -0
  174. package/lib/typescript/commonjs/ui/floating/onboardingConstants.web.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +2 -0
  176. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/ui/index.d.ts +6 -0
  178. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  179. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +10 -0
  180. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -1
  181. package/lib/typescript/commonjs/ui/night/primitives.d.ts +10 -3
  182. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/ui/otto/OttoSceneView.d.ts +30 -0
  184. package/lib/typescript/commonjs/ui/otto/OttoSceneView.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/ui/otto/index.d.ts +2 -0
  186. package/lib/typescript/commonjs/ui/otto/index.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
  188. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/ui/otto/ottoScenes.d.ts +75 -0
  190. package/lib/typescript/commonjs/ui/otto/ottoScenes.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts.map +1 -1
  192. package/lib/typescript/module/JsModal.d.ts +43 -2
  193. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  194. package/lib/typescript/module/JsModal.web.d.ts +5 -2
  195. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  196. package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts.map +1 -1
  197. package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +1 -1
  198. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  199. package/lib/typescript/module/icons/ReactQueryIcon.d.ts +1 -2
  200. package/lib/typescript/module/icons/ReactQueryIcon.d.ts.map +1 -1
  201. package/lib/typescript/module/icons/SentryBugIcon.d.ts +1 -2
  202. package/lib/typescript/module/icons/SentryBugIcon.d.ts.map +1 -1
  203. package/lib/typescript/module/index.d.ts +4 -1
  204. package/lib/typescript/module/index.d.ts.map +1 -1
  205. package/lib/typescript/module/license/AccountSetup.d.ts +4 -0
  206. package/lib/typescript/module/license/AccountSetup.d.ts.map +1 -0
  207. package/lib/typescript/module/license/AccountSetup.web.d.ts +2 -0
  208. package/lib/typescript/module/license/AccountSetup.web.d.ts.map +1 -0
  209. package/lib/typescript/module/license/FeatureGate.d.ts +3 -19
  210. package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
  211. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +8 -11
  212. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
  213. package/lib/typescript/module/license/index.d.ts +1 -1
  214. package/lib/typescript/module/license/index.d.ts.map +1 -1
  215. package/lib/typescript/module/license/licenseModule.d.ts +18 -31
  216. package/lib/typescript/module/license/licenseModule.d.ts.map +1 -1
  217. package/lib/typescript/module/license/tierLimits.d.ts +9 -52
  218. package/lib/typescript/module/license/tierLimits.d.ts.map +1 -1
  219. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +6 -0
  220. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
  221. package/lib/typescript/module/stores/BaseEventStore.d.ts.map +1 -1
  222. package/lib/typescript/module/stores/createToolStore.d.ts.map +1 -1
  223. package/lib/typescript/module/stores/floatingToolStore.d.ts +27 -0
  224. package/lib/typescript/module/stores/floatingToolStore.d.ts.map +1 -0
  225. package/lib/typescript/module/stores/floatingToolStore.test.d.ts +2 -0
  226. package/lib/typescript/module/stores/floatingToolStore.test.d.ts.map +1 -0
  227. package/lib/typescript/module/sync/toolActionRegistry.d.ts +4 -32
  228. package/lib/typescript/module/sync/toolActionRegistry.d.ts.map +1 -1
  229. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts +7 -1
  230. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts.map +1 -1
  231. package/lib/typescript/module/ui/backgrounds/index.d.ts +2 -1
  232. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
  233. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
  234. package/lib/typescript/module/ui/backgrounds/types.d.ts +11 -1
  235. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
  236. package/lib/typescript/module/ui/backgrounds/variants/wormhole/motion.d.ts +24 -0
  237. package/lib/typescript/module/ui/backgrounds/variants/wormhole/motion.d.ts.map +1 -0
  238. package/lib/typescript/module/ui/backgrounds/variants/wormhole/textures.d.ts +13 -0
  239. package/lib/typescript/module/ui/backgrounds/variants/wormhole/textures.d.ts.map +1 -0
  240. package/lib/typescript/module/ui/backgrounds/variants/wormhole.d.ts +3 -0
  241. package/lib/typescript/module/ui/backgrounds/variants/wormhole.d.ts.map +1 -0
  242. package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts.map +1 -1
  243. package/lib/typescript/module/ui/components/CompactRow.d.ts +8 -1
  244. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
  245. package/lib/typescript/module/ui/components/DraggableHeader.d.ts +4 -1
  246. package/lib/typescript/module/ui/components/DraggableHeader.d.ts.map +1 -1
  247. package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts +7 -1
  248. package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts.map +1 -1
  249. package/lib/typescript/module/ui/floating/FloatingTool.d.ts +79 -0
  250. package/lib/typescript/module/ui/floating/FloatingTool.d.ts.map +1 -0
  251. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts +64 -0
  252. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +1 -0
  253. package/lib/typescript/module/ui/floating/FloatingToolHost.d.ts +3 -0
  254. package/lib/typescript/module/ui/floating/FloatingToolHost.d.ts.map +1 -0
  255. package/lib/typescript/module/ui/floating/FloatingToolHost.web.d.ts +3 -0
  256. package/lib/typescript/module/ui/floating/FloatingToolHost.web.d.ts.map +1 -0
  257. package/lib/typescript/module/ui/floating/index.d.ts +7 -0
  258. package/lib/typescript/module/ui/floating/index.d.ts.map +1 -0
  259. package/lib/typescript/module/ui/floating/index.web.d.ts +7 -0
  260. package/lib/typescript/module/ui/floating/index.web.d.ts.map +1 -0
  261. package/lib/typescript/module/ui/floating/onboardingConstants.d.ts +30 -0
  262. package/lib/typescript/module/ui/floating/onboardingConstants.d.ts.map +1 -0
  263. package/lib/typescript/module/ui/floating/onboardingConstants.web.d.ts +13 -0
  264. package/lib/typescript/module/ui/floating/onboardingConstants.web.d.ts.map +1 -0
  265. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +2 -0
  266. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  267. package/lib/typescript/module/ui/index.d.ts +6 -0
  268. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  269. package/lib/typescript/module/ui/night/nightTheme.d.ts +10 -0
  270. package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -1
  271. package/lib/typescript/module/ui/night/primitives.d.ts +10 -3
  272. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
  273. package/lib/typescript/module/ui/otto/OttoSceneView.d.ts +30 -0
  274. package/lib/typescript/module/ui/otto/OttoSceneView.d.ts.map +1 -0
  275. package/lib/typescript/module/ui/otto/index.d.ts +2 -0
  276. package/lib/typescript/module/ui/otto/index.d.ts.map +1 -1
  277. package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
  278. package/lib/typescript/module/ui/otto/ottoEngine.d.ts.map +1 -1
  279. package/lib/typescript/module/ui/otto/ottoScenes.d.ts +75 -0
  280. package/lib/typescript/module/ui/otto/ottoScenes.d.ts.map +1 -0
  281. package/lib/typescript/module/utils/minimalSuperJSON.d.ts.map +1 -1
  282. package/package.json +25 -5
  283. package/scripts/generate-wormhole-textures.cjs +261 -0
  284. package/scripts/test-wormhole-motion.cjs +59 -0
@@ -0,0 +1,590 @@
1
+ "use strict";
2
+
3
+ import { night } from "../night/nightTheme.js";
4
+ /**
5
+ * FloatingTools - Web renderer using shared React bindings.
6
+ *
7
+ * This file contains ONLY web-specific code (React DOM):
8
+ * - Pointer event handling (mouse + touch — WKWebView/Capacitor included)
9
+ * - requestAnimationFrame animation
10
+ * - Web JSX (div, span)
11
+ * - localStorage adapter
12
+ *
13
+ * All logic is shared via @buoy-gg/floating-tools-react
14
+ *
15
+ * @platform React DOM Web (Vite, CRA, Next.js, Electron)
16
+ */
17
+
18
+ import { useState, useRef, useCallback, useEffect, useMemo, Children } from 'react';
19
+ import { calculateTargetPosition } from "./onboardingConstants.web.js";
20
+ import {
21
+ // Hook and context
22
+ useFloatingTools, FloatingToolsProvider, useFloatingToolsContext, interleaveWithDividers,
23
+ // Utils from core (re-exported)
24
+ floatingToolsColors, withAlpha, getUserStatusConfig, getGripIconLayout, interpolatePosition, easing, VISIBLE_HANDLE_WIDTH, ANIMATION_DURATION
25
+ // Types
26
+ } from '@buoy-gg/floating-tools-react/floating';
27
+
28
+ // Re-export for consumers
29
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
+ // =============================
31
+ // Web Storage Adapter
32
+ // =============================
33
+ const webStorageAdapter = {
34
+ getItem: key => localStorage.getItem(key),
35
+ setItem: (key, value) => localStorage.setItem(key, value)
36
+ };
37
+
38
+ // =============================
39
+ // Native color values not present in floatingToolsColors
40
+ // (core's `secondary` is #E0E0E0 = buoyColors.text; the native bubble uses
41
+ // buoyColors.textSecondary #A0A0A0 for grip dots and "User" label text.
42
+ // Inlined here rather than changed in core because dial.ts also consumes
43
+ // floatingToolsColors.secondary for other surfaces.)
44
+ // =============================
45
+ // native shared-ui gameUIColors.ts: buoyColors.textSecondary = "#A0A0A0"
46
+ const NATIVE_TEXT_SECONDARY = '#A0A0A0';
47
+
48
+ // =============================
49
+ // GripVerticalIcon (web JSX)
50
+ // =============================
51
+ function GripVerticalIcon({
52
+ size = 24,
53
+ // native shared-ui GripVerticalIcon.tsx: buoyColors.textSecondary + "CC"
54
+ color = withAlpha(NATIVE_TEXT_SECONDARY, 'CC')
55
+ }) {
56
+ const layout = getGripIconLayout(size);
57
+ return /*#__PURE__*/_jsx("div", {
58
+ style: {
59
+ width: size,
60
+ height: size,
61
+ display: 'flex',
62
+ flexDirection: 'row',
63
+ alignItems: 'center',
64
+ justifyContent: 'center'
65
+ },
66
+ children: [0, 1].map(col => /*#__PURE__*/_jsx("div", {
67
+ style: {
68
+ display: 'flex',
69
+ flexDirection: 'column',
70
+ alignItems: 'center',
71
+ justifyContent: 'center',
72
+ // native GripVerticalIcon.tsx: marginHorizontal columnGap / 2
73
+ marginLeft: layout.columnGap / 2,
74
+ marginRight: layout.columnGap / 2
75
+ },
76
+ children: [0, 1, 2].map(row => /*#__PURE__*/_jsx("div", {
77
+ style: {
78
+ width: layout.dotSize,
79
+ height: layout.dotSize,
80
+ borderRadius: layout.dotSize / 2,
81
+ backgroundColor: color,
82
+ // native GripVerticalIcon.tsx: marginVertical rowGap / 2
83
+ marginTop: layout.rowGap / 2,
84
+ marginBottom: layout.rowGap / 2
85
+ }
86
+ }, row))
87
+ }, col))
88
+ });
89
+ }
90
+
91
+ // =============================
92
+ // Divider (web JSX)
93
+ // =============================
94
+ export function Divider() {
95
+ return /*#__PURE__*/_jsx("div", {
96
+ style: {
97
+ width: 1,
98
+ height: 12,
99
+ backgroundColor: withAlpha(floatingToolsColors.muted, '66'),
100
+ flexShrink: 0
101
+ }
102
+ });
103
+ }
104
+
105
+ // =============================
106
+ // UserStatus (web JSX)
107
+ // =============================
108
+ // Mirrors the native gameUIColorsCompat mapping in floatingTools.tsx:
109
+ // success/optional/muted come from the shared palette, but `secondary`
110
+ // (the "User" label text) is buoyColors.textSecondary, not core's secondary.
111
+ const userStatusColors = {
112
+ success: floatingToolsColors.success,
113
+ optional: floatingToolsColors.optional,
114
+ muted: floatingToolsColors.muted,
115
+ // native floatingTools.tsx: gameUIColorsCompat.secondary = buoyColors.textSecondary
116
+ secondary: NATIVE_TEXT_SECONDARY
117
+ };
118
+ export function UserStatus({
119
+ userRole,
120
+ onPress
121
+ }) {
122
+ const {
123
+ isDragging
124
+ } = useFloatingToolsContext();
125
+ const config = getUserStatusConfig(userRole, userStatusColors);
126
+ const handleClick = e => {
127
+ if (!isDragging && onPress) {
128
+ e.stopPropagation();
129
+ onPress();
130
+ }
131
+ };
132
+ return /*#__PURE__*/_jsxs("button", {
133
+ role: "button",
134
+ "aria-label": `User status: ${config.label}`,
135
+ onClick: handleClick,
136
+ style: {
137
+ display: 'flex',
138
+ flexDirection: 'row',
139
+ alignItems: 'center',
140
+ paddingTop: 6,
141
+ paddingBottom: 6,
142
+ paddingLeft: 8,
143
+ paddingRight: 8,
144
+ flexShrink: 0,
145
+ cursor: onPress && !isDragging ? 'pointer' : 'default',
146
+ background: 'none',
147
+ border: 'none',
148
+ margin: 0 // neutralize UA button margin (native View/Touchable has none)
149
+ },
150
+ children: [/*#__PURE__*/_jsx("div", {
151
+ style: {
152
+ width: 6,
153
+ height: 6,
154
+ borderRadius: 3,
155
+ backgroundColor: config.dotColor,
156
+ marginRight: 4
157
+ }
158
+ }), /*#__PURE__*/_jsx("span", {
159
+ style: {
160
+ fontSize: 10,
161
+ fontWeight: 500,
162
+ color: config.textColor,
163
+ letterSpacing: 0.3,
164
+ // native RN <Text> renders in the platform system font; buttons
165
+ // otherwise use the UA font on web
166
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
167
+ lineHeight: 'normal'
168
+ },
169
+ children: config.label
170
+ })]
171
+ });
172
+ }
173
+
174
+ // =============================
175
+ // Web Animation Hook
176
+ // =============================
177
+ function useWebAnimation() {
178
+ const animationRef = useRef(null);
179
+ const [position, setPosition] = useState({
180
+ x: 0,
181
+ y: 0
182
+ });
183
+ const animateTo = useCallback((from, to, onComplete) => {
184
+ if (animationRef.current) {
185
+ cancelAnimationFrame(animationRef.current);
186
+ }
187
+ const startTime = performance.now();
188
+ const animate = currentTime => {
189
+ const elapsed = currentTime - startTime;
190
+ const progress = Math.min(elapsed / ANIMATION_DURATION, 1);
191
+ const newPosition = interpolatePosition(from, to, progress, easing.easeOutCubic);
192
+ setPosition(newPosition);
193
+ if (progress < 1) {
194
+ animationRef.current = requestAnimationFrame(animate);
195
+ } else {
196
+ setPosition(to);
197
+ onComplete?.();
198
+ }
199
+ };
200
+ animationRef.current = requestAnimationFrame(animate);
201
+ }, []);
202
+ useEffect(() => {
203
+ return () => {
204
+ if (animationRef.current) {
205
+ cancelAnimationFrame(animationRef.current);
206
+ }
207
+ };
208
+ }, []);
209
+ return {
210
+ position,
211
+ setPosition,
212
+ animateTo
213
+ };
214
+ }
215
+
216
+ // =============================
217
+ // Main FloatingTools Component
218
+ // =============================
219
+
220
+ // Last known bubble position — the AppHost minimize animation targets this so
221
+ // tools shrink toward the stack instead of the old bottom-right dock.
222
+ let lastBubbleAnchor = null;
223
+ export function getBubbleAnchorPosition() {
224
+ return lastBubbleAnchor;
225
+ }
226
+ export function FloatingTool({
227
+ id,
228
+ revealToken,
229
+ variant = "bubble",
230
+ dragFromSurface = false,
231
+ accessibilityLabel = "Drag handle",
232
+ accessory,
233
+ handleAdornment,
234
+ enablePositionPersistence = true,
235
+ children,
236
+ pushToSide = false,
237
+ suspendPointerEvents = false,
238
+ centerOnboarding = false,
239
+ minimizedStack,
240
+ hasMinimizedStack = false
241
+ }) {
242
+ const bubbleRef = useRef(null);
243
+ const storage = useMemo(() => id ? {
244
+ getItem: key => webStorageAdapter.getItem(`@buoy/floating-tool/${id}/${key}`),
245
+ setItem: (key, value) => webStorageAdapter.setItem(`@buoy/floating-tool/${id}/${key}`, value)
246
+ } : webStorageAdapter, [id]);
247
+ // Use shared hook
248
+ const {
249
+ state,
250
+ actions,
251
+ isInitialized
252
+ } = useFloatingTools({
253
+ screenSize: {
254
+ width: window.innerWidth,
255
+ height: window.innerHeight
256
+ },
257
+ enablePositionPersistence,
258
+ storage
259
+ });
260
+
261
+ // Web-specific animation
262
+ const {
263
+ position: animatedPosition,
264
+ setPosition: setAnimatedPosition,
265
+ animateTo
266
+ } = useWebAnimation();
267
+
268
+ // Sync position when initialized
269
+ useEffect(() => {
270
+ if (isInitialized) {
271
+ setAnimatedPosition(state.position);
272
+ }
273
+ }, [isInitialized, state.position, setAnimatedPosition]);
274
+
275
+ // Publish the bubble anchor for the AppHost minimize-target (stack lives
276
+ // fused to the bubble now, not in a fixed dock).
277
+ useEffect(() => {
278
+ if (!id) lastBubbleAnchor = {
279
+ x: animatedPosition.x,
280
+ y: animatedPosition.y
281
+ };
282
+ }, [animatedPosition, id]);
283
+
284
+ // Measure the same surface for both the DevTools bubble and custom strips.
285
+ useEffect(() => {
286
+ if (!isInitialized) return;
287
+ const measure = () => {
288
+ const rect = bubbleRef.current?.getBoundingClientRect();
289
+ if (rect && rect.width > 0 && rect.height > 0) actions.setBubbleSize({
290
+ width: rect.width,
291
+ height: rect.height
292
+ });
293
+ };
294
+ const handleResize = () => {
295
+ actions.setScreenSize(window.innerWidth, window.innerHeight);
296
+ measure();
297
+ };
298
+ measure();
299
+ const observer = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(measure) : null;
300
+ if (bubbleRef.current) observer?.observe(bubbleRef.current);
301
+ window.addEventListener('resize', handleResize);
302
+ return () => {
303
+ observer?.disconnect();
304
+ window.removeEventListener('resize', handleResize);
305
+ };
306
+ }, [actions, isInitialized]);
307
+
308
+ // Keep the bubble below notches/status bars (WKWebView with viewport-fit=cover).
309
+ useEffect(() => {
310
+ const probe = document.createElement('div');
311
+ probe.style.cssText = 'position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);' + 'visibility:hidden;pointer-events:none';
312
+ document.body.appendChild(probe);
313
+ const rect = probe.getBoundingClientRect();
314
+ document.body.removeChild(probe);
315
+ if (rect.top > 0 || rect.left > 0) {
316
+ actions.setMinPosition({
317
+ x: Math.max(rect.left, 10),
318
+ y: Math.max(rect.top, 10)
319
+ });
320
+ }
321
+ }, [actions]);
322
+
323
+ // Web-specific: pointer event handling (mouse + touch).
324
+ // preventDefault on pointerdown suppresses the compatibility mouse events,
325
+ // and touchAction: 'none' on the bubble stops touch-drags from scrolling.
326
+ const [isPointerDown, setIsPointerDown] = useState(false);
327
+ const handlePointerDown = useCallback(e => {
328
+ e.stopPropagation();
329
+ e.preventDefault();
330
+ setIsPointerDown(true);
331
+ actions.handleDragStart({
332
+ clientX: e.clientX,
333
+ clientY: e.clientY
334
+ });
335
+ }, [actions]);
336
+ const surfaceGesture = useRef(false);
337
+ const handleSurfacePointerDown = event => {
338
+ if (event.button !== 0 || !(event.target instanceof Element)) return;
339
+ if (event.target.closest('button, a, input, select, textarea, [role="button"], [role="switch"], [role="slider"], [role="checkbox"], [role="radio"], [contenteditable="true"], [data-floating-accessory]')) return;
340
+ surfaceGesture.current = true;
341
+ handlePointerDown(event);
342
+ };
343
+ const handlePointerMove = useCallback(e => {
344
+ const result = actions.handleDragMove({
345
+ clientX: e.clientX,
346
+ clientY: e.clientY
347
+ });
348
+ if (result.isDragging) {
349
+ setAnimatedPosition(result.position);
350
+ }
351
+ }, [actions, setAnimatedPosition]);
352
+ const handlePointerUp = useCallback(e => {
353
+ setIsPointerDown(false);
354
+ const result = actions.handleDragEnd({
355
+ clientX: e.clientX,
356
+ clientY: e.clientY
357
+ });
358
+ const fromSurface = surfaceGesture.current;
359
+ surfaceGesture.current = false;
360
+ if (result.wasTap && !fromSurface) {
361
+ const toggleResult = actions.toggleHideShow();
362
+ animateTo(state.position, toggleResult.targetPosition, () => {
363
+ actions.commitPosition(toggleResult.targetPosition);
364
+ });
365
+ } else if (result.shouldHide) {
366
+ animateTo(state.position, result.position, () => {
367
+ actions.commitPosition(result.position);
368
+ });
369
+ }
370
+ }, [actions, animateTo, state.position]);
371
+ useEffect(() => {
372
+ if (isPointerDown) {
373
+ window.addEventListener('pointermove', handlePointerMove);
374
+ window.addEventListener('pointerup', handlePointerUp);
375
+ window.addEventListener('pointercancel', handlePointerUp);
376
+ return () => {
377
+ window.removeEventListener('pointermove', handlePointerMove);
378
+ window.removeEventListener('pointerup', handlePointerUp);
379
+ window.removeEventListener('pointercancel', handlePointerUp);
380
+ };
381
+ }
382
+ }, [isPointerDown, handlePointerMove, handlePointerUp]);
383
+
384
+ // Live refs so the pushToSide effect never animates from a stale closure
385
+ // (the from-position jump read as a "pop" when restoring).
386
+ const statePositionRef = useRef(state.position);
387
+ statePositionRef.current = state.position;
388
+ const isHiddenRef = useRef(state.isHidden);
389
+ isHiddenRef.current = state.isHidden;
390
+
391
+ // pushToSide: forceHide to the edge while a dial/tool is open; forceShow
392
+ // restores the saved position when it closes (200ms, native parity).
393
+ // Native semantics ported exactly (floatingTools.tsx:537-603):
394
+ // - push only when the bubble isn't already hidden (a user-hidden bubble
395
+ // is left alone, and we don't claim it as OUR push)
396
+ // - restore only when the bubble is STILL hidden from OUR push — if the
397
+ // user tapped/dragged it back out while a tool was open
398
+ // (userWantsVisibleRef), it stays exactly where they put it
399
+ const pushedRef = useRef(false);
400
+ useEffect(() => {
401
+ if (!isInitialized) return;
402
+ if (pushToSide && !pushedRef.current) {
403
+ if (isHiddenRef.current) return; // user hid it themselves — not our push
404
+ pushedRef.current = true;
405
+ const {
406
+ targetPosition
407
+ } = actions.forceHide();
408
+ animateTo(statePositionRef.current, targetPosition, () => {});
409
+ } else if (!pushToSide && pushedRef.current) {
410
+ pushedRef.current = false;
411
+ // User already showed it manually while the tool was open — leave it.
412
+ if (!isHiddenRef.current) return;
413
+ const {
414
+ targetPosition
415
+ } = actions.forceShow();
416
+ // The bubble may have grown while hidden (row tools/env badge toggled
417
+ // on) — clamp the restored position so it stays fully on-screen
418
+ // (native handles this via its width-change auto-reposition).
419
+ const width = bubbleRef.current?.getBoundingClientRect().width ?? 100;
420
+ const clamped = {
421
+ x: Math.max(10, Math.min(targetPosition.x, window.innerWidth - width - 10)),
422
+ y: targetPosition.y
423
+ };
424
+ animateTo(statePositionRef.current, clamped, () => {
425
+ actions.commitPosition(clamped);
426
+ });
427
+ }
428
+ }, [pushToSide, isInitialized]);
429
+
430
+ // centerOnboarding: park the bubble under the tooltip arrow while the
431
+ // welcome tooltip is up (native calculateTargetPosition math).
432
+ useEffect(() => {
433
+ if (!centerOnboarding || !isInitialized) return;
434
+ const bubbleWidth = bubbleRef.current?.getBoundingClientRect().width ?? 100;
435
+ const bubbleHeight = bubbleRef.current?.getBoundingClientRect().height ?? 32;
436
+ const fromBottom = calculateTargetPosition();
437
+ const target = {
438
+ x: (window.innerWidth - bubbleWidth) / 2,
439
+ y: window.innerHeight - fromBottom - bubbleHeight
440
+ };
441
+ animateTo(statePositionRef.current, target, () => {});
442
+ }, [centerOnboarding, isInitialized]);
443
+ const previousReveal = useRef(undefined);
444
+ useEffect(() => {
445
+ if (!isInitialized || previousReveal.current === revealToken) return;
446
+ previousReveal.current = revealToken;
447
+ if (revealToken !== undefined && revealToken > 0 && state.isHidden) {
448
+ const {
449
+ targetPosition
450
+ } = actions.forceShow();
451
+ animateTo(state.position, targetPosition, () => actions.commitPosition(targetPosition));
452
+ }
453
+ }, [revealToken, isInitialized, state.isHidden, state.position, actions, animateTo]);
454
+
455
+ // Interleave children with dividers
456
+ const actionsContent = useMemo(() => variant === "strip" ? Children.toArray(children) : interleaveWithDividers(Children.toArray(children), key => /*#__PURE__*/_jsx(Divider, {}, key)), [children, variant]);
457
+
458
+ // Suppress the first paint until the persisted position has loaded so the
459
+ // bubble doesn't flash at 0,0 (native floatingTools.tsx:935-937).
460
+ if (!isInitialized) {
461
+ return null;
462
+ }
463
+ const spaceAbove = Math.max(0, animatedPosition.y - 8);
464
+ const spaceBelow = Math.max(0, window.innerHeight - animatedPosition.y - state.bubbleSize.height - 8);
465
+ const accessoryAbove = spaceAbove > spaceBelow;
466
+ return /*#__PURE__*/_jsxs("div", {
467
+ ref: bubbleRef,
468
+ "data-testid": id ?? "buoy-floating-tool",
469
+ role: "toolbar",
470
+ "aria-label": "Floating Tools",
471
+ onPointerDown: dragFromSurface ? handleSurfacePointerDown : undefined,
472
+ style: {
473
+ position: 'fixed',
474
+ left: animatedPosition.x,
475
+ top: animatedPosition.y,
476
+ zIndex: 9999,
477
+ display: 'flex',
478
+ flexDirection: 'row',
479
+ alignItems: 'center',
480
+ backgroundColor: floatingToolsColors.panel,
481
+ // native: top-left corner + top border flatten when the minimized
482
+ // stack is fused above (floatingTools.tsx containerStyle)
483
+ borderTopLeftRadius: hasMinimizedStack ? 0 : 6,
484
+ borderTopRightRadius: 6,
485
+ borderBottomLeftRadius: 6,
486
+ borderBottomRightRadius: 6,
487
+ borderWidth: state.isDragging ? 2 : 1,
488
+ borderTopWidth: state.isDragging ? 2 : hasMinimizedStack ? 0 : 1,
489
+ borderStyle: 'solid',
490
+ borderColor: state.isDragging ? floatingToolsColors.dragActive : withAlpha(floatingToolsColors.muted, '66'),
491
+ // native floatingTools.tsx: shadowOffset {0, 6|4}, shadowRadius 12|8,
492
+ // shadowOpacity 0.6|0.3, shadowColor dragActive+"99"|"#000".
493
+ // Dragging color = 0x99 (0.6) alpha x 0.6 shadowOpacity = ~0.36 effective.
494
+ boxShadow: state.isDragging ? `0 6px 12px ${withAlpha(floatingToolsColors.dragActive, 0.36)}` : '0 4px 8px rgba(0, 0, 0, 0.3)',
495
+ cursor: dragFromSurface ? state.isDragging ? 'grabbing' : 'grab' : undefined,
496
+ userSelect: 'none',
497
+ touchAction: 'none',
498
+ pointerEvents: suspendPointerEvents ? 'none' : 'auto',
499
+ ...(variant === 'strip' ? {
500
+ borderRadius: night.radius.card,
501
+ minHeight: 48,
502
+ backgroundColor: night.color.surface,
503
+ borderColor: state.isDragging ? night.color.accentBorderStrong : night.color.separator,
504
+ boxShadow: "0 4px 16px rgba(0, 0, 0, 0.24)"
505
+ } : {})
506
+ },
507
+ children: [minimizedStack && /*#__PURE__*/_jsx("div", {
508
+ style: {
509
+ position: 'absolute',
510
+ bottom: '100%',
511
+ left: -1,
512
+ // align with the bubble border edge
513
+ width: VISIBLE_HANDLE_WIDTH,
514
+ overflow: 'visible',
515
+ zIndex: 1001
516
+ },
517
+ children: minimizedStack
518
+ }), /*#__PURE__*/_jsxs("div", {
519
+ role: "button",
520
+ "aria-label": accessibilityLabel,
521
+ "data-testid": id ? `${id}-grip` : "buoy-floating-grip",
522
+ tabIndex: 0,
523
+ onPointerDown: handlePointerDown,
524
+ onKeyDown: event => {
525
+ if (event.key !== "Enter" && event.key !== " ") return;
526
+ event.preventDefault();
527
+ const result = actions.toggleHideShow();
528
+ animateTo(state.position, result.targetPosition, () => actions.commitPosition(result.targetPosition));
529
+ },
530
+ style: {
531
+ touchAction: 'none',
532
+ paddingLeft: 6,
533
+ paddingRight: 6,
534
+ paddingTop: 6,
535
+ paddingBottom: 6,
536
+ backgroundColor: withAlpha(floatingToolsColors.muted, '1A'),
537
+ display: 'flex',
538
+ alignItems: 'center',
539
+ justifyContent: 'center',
540
+ width: VISIBLE_HANDLE_WIDTH,
541
+ boxSizing: 'border-box',
542
+ // RN width includes padding/border
543
+ borderRight: `1px solid ${withAlpha(floatingToolsColors.muted, '66')}`,
544
+ // native dragHandleStyle sets NO corner radius (container overflow is
545
+ // visible); the 10%-alpha bg square corner matches native rendering
546
+ cursor: state.isDragging ? 'grabbing' : 'grab',
547
+ ...(variant === 'strip' ? {
548
+ minHeight: 48,
549
+ backgroundColor: 'transparent',
550
+ borderRight: 'none',
551
+ flexDirection: 'column'
552
+ } : {})
553
+ },
554
+ children: [/*#__PURE__*/_jsx(GripVerticalIcon, {
555
+ size: variant === "strip" ? 20 : 12
556
+ }), handleAdornment]
557
+ }), /*#__PURE__*/_jsx(FloatingToolsProvider, {
558
+ value: {
559
+ isDragging: state.isDragging,
560
+ isHidden: state.isHidden
561
+ },
562
+ children: /*#__PURE__*/_jsx("div", {
563
+ style: {
564
+ display: 'flex',
565
+ flexDirection: 'row',
566
+ alignItems: 'center',
567
+ gap: 6,
568
+ paddingRight: 8
569
+ },
570
+ children: actionsContent
571
+ })
572
+ }), !state.isHidden && accessory && /*#__PURE__*/_jsx("div", {
573
+ "data-floating-accessory": true,
574
+ style: {
575
+ position: "absolute",
576
+ ...(accessoryAbove ? {
577
+ bottom: "100%"
578
+ } : {
579
+ top: "100%"
580
+ }),
581
+ left: 0,
582
+ width: "100%",
583
+ maxHeight: Math.max(spaceAbove, spaceBelow),
584
+ overflowY: "auto",
585
+ zIndex: 1002
586
+ },
587
+ children: accessory
588
+ })]
589
+ });
590
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ import { Fragment, useSyncExternalStore } from "react";
4
+ import { View } from "react-native";
5
+ import { dismissFloatingTool, getFloatingTools, subscribeFloatingTools } from "../../stores/floatingToolStore.js";
6
+
7
+ /** Mount once above navigation. The empty space around tools passes touches to the app. */
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ export function FloatingToolHost() {
10
+ const entries = useSyncExternalStore(subscribeFloatingTools, getFloatingTools, getFloatingTools);
11
+ return /*#__PURE__*/_jsx(View, {
12
+ pointerEvents: "box-none",
13
+ style: {
14
+ position: "absolute",
15
+ top: 0,
16
+ left: 0,
17
+ right: 0,
18
+ bottom: 0,
19
+ zIndex: 10000
20
+ },
21
+ children: entries.map(entry => /*#__PURE__*/_jsx(Fragment, {
22
+ children: entry.render({
23
+ id: entry.id,
24
+ revealToken: entry.revealToken,
25
+ dismiss: () => dismissFloatingTool(entry.id)
26
+ })
27
+ }, entry.id))
28
+ });
29
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ import { Fragment, useSyncExternalStore } from "react";
4
+ import { dismissFloatingTool, getFloatingTools, subscribeFloatingTools } from "../../stores/floatingToolStore.js";
5
+
6
+ /** The strip itself handles input; the rest of the viewport stays interactive. */
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export function FloatingToolHost() {
9
+ const entries = useSyncExternalStore(subscribeFloatingTools, getFloatingTools, getFloatingTools);
10
+ return /*#__PURE__*/_jsx("div", {
11
+ style: {
12
+ position: "fixed",
13
+ inset: 0,
14
+ pointerEvents: "none",
15
+ zIndex: 10000
16
+ },
17
+ children: entries.map(entry => /*#__PURE__*/_jsx(Fragment, {
18
+ children: entry.render({
19
+ id: entry.id,
20
+ revealToken: entry.revealToken,
21
+ dismiss: () => dismissFloatingTool(entry.id)
22
+ })
23
+ }, entry.id))
24
+ });
25
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export { FloatingTool, Divider as FloatingToolDivider, UserStatus as FloatingToolUserStatus, getBubbleAnchorPosition } from "./FloatingTool";
4
+ export { FloatingToolHost } from "./FloatingToolHost";
5
+ export { openFloatingTool, dismissFloatingTool, registerPersistentFloatingTool, getFloatingTools, subscribeFloatingTools } from "../../stores/floatingToolStore.js";
6
+ export { ARROW_BOTTOM_OFFSET, ARROW_HEIGHT, SPACING_GAP, getScreenCenterY, calculateTooltipPosition, calculateTargetPosition } from "./onboardingConstants";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export { FloatingTool, Divider as FloatingToolDivider, UserStatus as FloatingToolUserStatus, getBubbleAnchorPosition } from "./FloatingTool.web.js";
4
+ export { FloatingToolHost } from "./FloatingToolHost.web.js";
5
+ export { openFloatingTool, dismissFloatingTool, registerPersistentFloatingTool, getFloatingTools, subscribeFloatingTools } from "../../stores/floatingToolStore.js";
6
+ export { ARROW_BOTTOM_OFFSET, ARROW_HEIGHT, SPACING_GAP, getScreenCenterY, calculateTooltipPosition, calculateTargetPosition } from "./onboardingConstants.web.js";