@buoy-gg/shared-ui 7.0.40 → 7.0.41

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 (371) hide show
  1. package/README.md +6 -0
  2. package/lib/commonjs/JsModal.js +13 -61
  3. package/lib/commonjs/JsModal.web.js +32 -95
  4. package/lib/commonjs/clipboard/autoDetectClipboard.js +1 -1
  5. package/lib/commonjs/clipboard/clipboard-impl.web.js +21 -0
  6. package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +4 -2
  7. package/lib/commonjs/hooks/index.js +1 -1
  8. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  9. package/lib/commonjs/hooks/usePersistedState.js +1 -1
  10. package/lib/commonjs/hooks/useSafeAreaInsets.web.js +41 -0
  11. package/lib/commonjs/icons/index.js +14 -0
  12. package/lib/commonjs/index.js +34 -0
  13. package/lib/commonjs/license/AccountSetup.js +4 -25
  14. package/lib/commonjs/license/AccountSetup.web.js +78 -64
  15. package/lib/commonjs/license/AccountSetupContent.js +482 -0
  16. package/lib/commonjs/license/FreeAccountPrompt.js +32 -178
  17. package/lib/commonjs/license/LicenseEntryModal.js +5 -12
  18. package/lib/commonjs/license/accountRuntime.js +8 -0
  19. package/lib/commonjs/license/accountRuntime.web.js +9 -0
  20. package/lib/commonjs/license/licenseModule.js +2 -0
  21. package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
  22. package/lib/commonjs/storage/definePersistedSetting.js +1 -1
  23. package/lib/commonjs/stores/ignoredPatternsStore.js +10 -199
  24. package/lib/commonjs/stores/ignoredPatternsStore.shared.js +205 -0
  25. package/lib/commonjs/stores/ignoredPatternsStore.web.js +10 -230
  26. package/lib/commonjs/ui/backgrounds/backgroundStore.js +1 -1
  27. package/lib/commonjs/ui/backgrounds/variants/wormhole.js +3 -0
  28. package/lib/commonjs/ui/components/CopyButton.js +1 -1
  29. package/lib/commonjs/ui/components/EventStepperFooter.js +1 -1
  30. package/lib/commonjs/ui/components/ToolFooter.js +1 -1
  31. package/lib/commonjs/ui/floating/FloatingTool.web.js +12 -2
  32. package/lib/commonjs/ui/night/primitives.js +10 -3
  33. package/lib/commonjs/ui/otto/OttoSprite.js +1 -1
  34. package/lib/commonjs/utils/browserAsyncStorage.js +157 -0
  35. package/lib/commonjs/utils/browserNavigation.js +116 -0
  36. package/lib/commonjs/utils/devServer.js +8 -4
  37. package/lib/commonjs/utils/devServer.web.js +10 -0
  38. package/lib/commonjs/utils/domRuntime.js +143 -0
  39. package/lib/commonjs/utils/expoRouterModule.js +51 -0
  40. package/lib/commonjs/utils/expoRouterModule.web.js +14 -0
  41. package/lib/commonjs/utils/getSafeAreaInsets.web.js +35 -0
  42. package/lib/commonjs/utils/index.js +111 -4
  43. package/lib/commonjs/utils/loadToolModule.js +46 -0
  44. package/lib/commonjs/utils/loadToolModule.web.js +12 -0
  45. package/lib/commonjs/utils/modalStorage.js +42 -0
  46. package/lib/commonjs/utils/nativeWeb.js +454 -0
  47. package/lib/commonjs/utils/persistentStorage.web.js +78 -0
  48. package/lib/commonjs/utils/reloadApp.js +18 -57
  49. package/lib/commonjs/utils/reloadPlatform.js +37 -0
  50. package/lib/commonjs/utils/reloadPlatform.web.js +17 -0
  51. package/lib/commonjs/utils/safeExpoRouter.js +3 -53
  52. package/lib/commonjs/utils/safeExpoRouter.web.js +48 -0
  53. package/lib/commonjs/utils/toolModules.js +25 -0
  54. package/lib/module/JsModal.js +11 -59
  55. package/lib/module/JsModal.web.js +28 -91
  56. package/lib/module/clipboard/autoDetectClipboard.js +2 -2
  57. package/lib/module/clipboard/clipboard-impl.web.js +14 -0
  58. package/lib/module/dataViewer/tree/TreeDiffViewer.js +4 -2
  59. package/lib/module/hooks/index.js +2 -2
  60. package/lib/module/hooks/safe-area-impl.js +1 -1
  61. package/lib/module/hooks/usePersistedState.js +1 -1
  62. package/lib/module/hooks/useSafeAreaInsets.web.js +30 -0
  63. package/lib/module/icons/index.js +2 -1
  64. package/lib/module/index.js +3 -0
  65. package/lib/module/license/AccountSetup.js +5 -26
  66. package/lib/module/license/AccountSetup.web.js +79 -65
  67. package/lib/module/license/AccountSetupContent.js +476 -0
  68. package/lib/module/license/FreeAccountPrompt.js +27 -176
  69. package/lib/module/license/LicenseEntryModal.js +6 -13
  70. package/lib/module/license/accountRuntime.js +3 -0
  71. package/lib/module/license/accountRuntime.web.js +4 -0
  72. package/lib/module/license/licenseModule.js +2 -0
  73. package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
  74. package/lib/module/storage/definePersistedSetting.js +1 -1
  75. package/lib/module/stores/ignoredPatternsStore.js +1 -187
  76. package/lib/module/stores/ignoredPatternsStore.shared.js +189 -0
  77. package/lib/module/stores/ignoredPatternsStore.web.js +1 -219
  78. package/lib/module/ui/backgrounds/backgroundStore.js +1 -1
  79. package/lib/module/ui/backgrounds/variants/wormhole.js +3 -0
  80. package/lib/module/ui/components/CopyButton.js +1 -1
  81. package/lib/module/ui/components/EventStepperFooter.js +1 -1
  82. package/lib/module/ui/components/ToolFooter.js +1 -1
  83. package/lib/module/ui/floating/FloatingTool.web.js +12 -2
  84. package/lib/module/ui/night/primitives.js +11 -4
  85. package/lib/module/ui/otto/OttoSprite.js +1 -1
  86. package/lib/module/utils/browserAsyncStorage.js +151 -0
  87. package/lib/module/utils/browserNavigation.js +108 -0
  88. package/lib/module/utils/devServer.js +8 -4
  89. package/lib/module/utils/devServer.web.js +6 -0
  90. package/lib/module/utils/domRuntime.js +134 -0
  91. package/lib/module/utils/expoRouterModule.js +46 -0
  92. package/lib/module/utils/expoRouterModule.web.js +9 -0
  93. package/lib/module/utils/getSafeAreaInsets.web.js +31 -0
  94. package/lib/module/utils/index.js +9 -4
  95. package/lib/module/utils/loadToolModule.js +42 -0
  96. package/lib/module/utils/loadToolModule.web.js +8 -0
  97. package/lib/module/utils/modalStorage.js +37 -0
  98. package/lib/module/utils/nativeWeb.js +107 -0
  99. package/lib/module/utils/persistentStorage.web.js +72 -0
  100. package/lib/module/utils/reloadApp.js +13 -51
  101. package/lib/module/utils/reloadPlatform.js +31 -0
  102. package/lib/module/utils/reloadPlatform.web.js +11 -0
  103. package/lib/module/utils/safeExpoRouter.js +3 -53
  104. package/lib/module/utils/safeExpoRouter.web.js +37 -0
  105. package/lib/module/utils/toolModules.js +19 -0
  106. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/JsModal.web.d.ts +7 -18
  108. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts +5 -0
  110. package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  113. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts +6 -0
  114. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/icons/index.d.ts +1 -0
  116. package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/index.d.ts +2 -0
  118. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +1 -1
  120. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
  121. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/license/AccountSetupContent.d.ts +11 -0
  123. package/lib/typescript/commonjs/license/AccountSetupContent.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +3 -15
  125. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/license/accountRuntime.d.ts +2 -0
  128. package/lib/typescript/commonjs/license/accountRuntime.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/license/accountRuntime.web.d.ts +2 -0
  130. package/lib/typescript/commonjs/license/accountRuntime.web.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/license/licenseModule.d.ts +3 -1
  132. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts +1 -59
  134. package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +60 -0
  136. package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts +1 -71
  138. package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
  142. package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts +25 -0
  143. package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts.map +1 -0
  144. package/lib/typescript/commonjs/utils/browserNavigation.d.ts +31 -0
  145. package/lib/typescript/commonjs/utils/browserNavigation.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/utils/devServer.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/utils/devServer.web.d.ts +2 -0
  148. package/lib/typescript/commonjs/utils/devServer.web.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/utils/domRuntime.d.ts +27 -0
  150. package/lib/typescript/commonjs/utils/domRuntime.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/utils/expoRouterModule.d.ts +3 -0
  152. package/lib/typescript/commonjs/utils/expoRouterModule.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts +3 -0
  154. package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts +8 -0
  156. package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/utils/index.d.ts +5 -0
  158. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
  159. package/lib/typescript/commonjs/utils/loadToolModule.d.ts +3 -0
  160. package/lib/typescript/commonjs/utils/loadToolModule.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts +2 -0
  162. package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/utils/modalStorage.d.ts +21 -0
  164. package/lib/typescript/commonjs/utils/modalStorage.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/utils/nativeWeb.d.ts +22 -0
  166. package/lib/typescript/commonjs/utils/nativeWeb.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts +6 -0
  168. package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/utils/reloadApp.d.ts +7 -25
  170. package/lib/typescript/commonjs/utils/reloadApp.d.ts.map +1 -1
  171. package/lib/typescript/commonjs/utils/reloadPlatform.d.ts +8 -0
  172. package/lib/typescript/commonjs/utils/reloadPlatform.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts +4 -0
  174. package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +1 -1
  176. package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts +43 -0
  177. package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/utils/toolModules.d.ts +5 -0
  179. package/lib/typescript/commonjs/utils/toolModules.d.ts.map +1 -0
  180. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  181. package/lib/typescript/module/JsModal.web.d.ts +7 -18
  182. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  183. package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts +5 -0
  184. package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts.map +1 -0
  185. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  186. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  187. package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts +6 -0
  188. package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts.map +1 -0
  189. package/lib/typescript/module/icons/index.d.ts +1 -0
  190. package/lib/typescript/module/icons/index.d.ts.map +1 -1
  191. package/lib/typescript/module/index.d.ts +2 -0
  192. package/lib/typescript/module/index.d.ts.map +1 -1
  193. package/lib/typescript/module/license/AccountSetup.d.ts.map +1 -1
  194. package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
  195. package/lib/typescript/module/license/AccountSetup.web.d.ts.map +1 -1
  196. package/lib/typescript/module/license/AccountSetupContent.d.ts +11 -0
  197. package/lib/typescript/module/license/AccountSetupContent.d.ts.map +1 -0
  198. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +3 -15
  199. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
  200. package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
  201. package/lib/typescript/module/license/accountRuntime.d.ts +2 -0
  202. package/lib/typescript/module/license/accountRuntime.d.ts.map +1 -0
  203. package/lib/typescript/module/license/accountRuntime.web.d.ts +2 -0
  204. package/lib/typescript/module/license/accountRuntime.web.d.ts.map +1 -0
  205. package/lib/typescript/module/license/licenseModule.d.ts +3 -1
  206. package/lib/typescript/module/license/licenseModule.d.ts.map +1 -1
  207. package/lib/typescript/module/stores/ignoredPatternsStore.d.ts +1 -59
  208. package/lib/typescript/module/stores/ignoredPatternsStore.d.ts.map +1 -1
  209. package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +60 -0
  210. package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts.map +1 -0
  211. package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts +1 -71
  212. package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts.map +1 -1
  213. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +1 -1
  214. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
  215. package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
  216. package/lib/typescript/module/utils/browserAsyncStorage.d.ts +25 -0
  217. package/lib/typescript/module/utils/browserAsyncStorage.d.ts.map +1 -0
  218. package/lib/typescript/module/utils/browserNavigation.d.ts +31 -0
  219. package/lib/typescript/module/utils/browserNavigation.d.ts.map +1 -0
  220. package/lib/typescript/module/utils/devServer.d.ts.map +1 -1
  221. package/lib/typescript/module/utils/devServer.web.d.ts +2 -0
  222. package/lib/typescript/module/utils/devServer.web.d.ts.map +1 -0
  223. package/lib/typescript/module/utils/domRuntime.d.ts +27 -0
  224. package/lib/typescript/module/utils/domRuntime.d.ts.map +1 -0
  225. package/lib/typescript/module/utils/expoRouterModule.d.ts +3 -0
  226. package/lib/typescript/module/utils/expoRouterModule.d.ts.map +1 -0
  227. package/lib/typescript/module/utils/expoRouterModule.web.d.ts +3 -0
  228. package/lib/typescript/module/utils/expoRouterModule.web.d.ts.map +1 -0
  229. package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts +8 -0
  230. package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts.map +1 -0
  231. package/lib/typescript/module/utils/index.d.ts +5 -0
  232. package/lib/typescript/module/utils/index.d.ts.map +1 -1
  233. package/lib/typescript/module/utils/loadToolModule.d.ts +3 -0
  234. package/lib/typescript/module/utils/loadToolModule.d.ts.map +1 -0
  235. package/lib/typescript/module/utils/loadToolModule.web.d.ts +2 -0
  236. package/lib/typescript/module/utils/loadToolModule.web.d.ts.map +1 -0
  237. package/lib/typescript/module/utils/modalStorage.d.ts +21 -0
  238. package/lib/typescript/module/utils/modalStorage.d.ts.map +1 -0
  239. package/lib/typescript/module/utils/nativeWeb.d.ts +22 -0
  240. package/lib/typescript/module/utils/nativeWeb.d.ts.map +1 -0
  241. package/lib/typescript/module/utils/persistentStorage.web.d.ts +6 -0
  242. package/lib/typescript/module/utils/persistentStorage.web.d.ts.map +1 -0
  243. package/lib/typescript/module/utils/reloadApp.d.ts +7 -25
  244. package/lib/typescript/module/utils/reloadApp.d.ts.map +1 -1
  245. package/lib/typescript/module/utils/reloadPlatform.d.ts +8 -0
  246. package/lib/typescript/module/utils/reloadPlatform.d.ts.map +1 -0
  247. package/lib/typescript/module/utils/reloadPlatform.web.d.ts +4 -0
  248. package/lib/typescript/module/utils/reloadPlatform.web.d.ts.map +1 -0
  249. package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +1 -1
  250. package/lib/typescript/module/utils/safeExpoRouter.web.d.ts +43 -0
  251. package/lib/typescript/module/utils/safeExpoRouter.web.d.ts.map +1 -0
  252. package/lib/typescript/module/utils/toolModules.d.ts +5 -0
  253. package/lib/typescript/module/utils/toolModules.d.ts.map +1 -0
  254. package/lib/web/asyncStorage.mjs +2 -0
  255. package/lib/web/chunks/chunk-2MHKRRQW.mjs +8 -0
  256. package/lib/web/chunks/chunk-2Q3SDPH2.mjs +14 -0
  257. package/lib/web/chunks/chunk-34YQ42KI.mjs +2 -0
  258. package/lib/web/chunks/chunk-3NNNCQYP.mjs +14 -0
  259. package/lib/web/chunks/chunk-3UTMGIUG.mjs +2 -0
  260. package/lib/web/chunks/chunk-46CXXOQB.mjs +2 -0
  261. package/lib/web/chunks/chunk-475BSDCB.mjs +2 -0
  262. package/lib/web/chunks/chunk-53J2FMUD.mjs +2 -0
  263. package/lib/web/chunks/chunk-552W4COI.mjs +2 -0
  264. package/lib/web/chunks/chunk-56TTTMX4.mjs +6145 -0
  265. package/lib/web/chunks/chunk-5LOQZINQ.mjs +14 -0
  266. package/lib/web/chunks/chunk-5NOIO6ZM.mjs +16 -0
  267. package/lib/web/chunks/chunk-5NZOQR6Q.mjs +2 -0
  268. package/lib/web/chunks/chunk-6CCRCSA2.mjs +2 -0
  269. package/lib/web/chunks/chunk-6Q52HRBL.mjs +2 -0
  270. package/lib/web/chunks/chunk-6TEDFSNM.mjs +655 -0
  271. package/lib/web/chunks/chunk-7BMRSMHN.mjs +2 -0
  272. package/lib/web/chunks/chunk-A2SOFE47.mjs +24 -0
  273. package/lib/web/chunks/chunk-A7KJCK4R.mjs +14 -0
  274. package/lib/web/chunks/chunk-AEXGGXS7.mjs +2 -0
  275. package/lib/web/chunks/chunk-AGD7ZT6O.mjs +15 -0
  276. package/lib/web/chunks/chunk-AIEOQWNG.mjs +2 -0
  277. package/lib/web/chunks/chunk-ASTM35HG.mjs +16 -0
  278. package/lib/web/chunks/chunk-AZBMFPMX.mjs +1421 -0
  279. package/lib/web/chunks/chunk-B2V2UDCU.mjs +16 -0
  280. package/lib/web/chunks/chunk-BFGKGTAC.mjs +2 -0
  281. package/lib/web/chunks/chunk-BHW6AFO6.mjs +2 -0
  282. package/lib/web/chunks/chunk-BWRW3NJ2.mjs +16 -0
  283. package/lib/web/chunks/chunk-CBM2IZAK.mjs +2 -0
  284. package/lib/web/chunks/chunk-CDLCFF44.mjs +2 -0
  285. package/lib/web/chunks/chunk-CE5U3CSQ.mjs +2 -0
  286. package/lib/web/chunks/chunk-CI5CO7FQ.mjs +2 -0
  287. package/lib/web/chunks/chunk-CIB4U2YK.mjs +2 -0
  288. package/lib/web/chunks/chunk-CLLTZQGD.mjs +596 -0
  289. package/lib/web/chunks/chunk-D5HQLRFW.mjs +655 -0
  290. package/lib/web/chunks/chunk-DZDTNXXK.mjs +2 -0
  291. package/lib/web/chunks/chunk-FDOZ6YSS.mjs +2 -0
  292. package/lib/web/chunks/chunk-FMEWNGQO.mjs +2 -0
  293. package/lib/web/chunks/chunk-G4DH7GMT.mjs +2 -0
  294. package/lib/web/chunks/chunk-GBUZCZE4.mjs +2 -0
  295. package/lib/web/chunks/chunk-GF5C5DVX.mjs +2 -0
  296. package/lib/web/chunks/chunk-GLMS5ZLJ.mjs +445 -0
  297. package/lib/web/chunks/chunk-GNGMIA7V.mjs +2 -0
  298. package/lib/web/chunks/chunk-GTYIS7H7.mjs +15 -0
  299. package/lib/web/chunks/chunk-HJ36IONA.mjs +15 -0
  300. package/lib/web/chunks/chunk-HXPTZMAZ.mjs +2 -0
  301. package/lib/web/chunks/chunk-I27M4JCS.mjs +2 -0
  302. package/lib/web/chunks/chunk-IVCT27JB.mjs +2 -0
  303. package/lib/web/chunks/chunk-JG4QSK5B.mjs +2 -0
  304. package/lib/web/chunks/chunk-JR7BJW6B.mjs +389 -0
  305. package/lib/web/chunks/chunk-K46ZJUXJ.mjs +90 -0
  306. package/lib/web/chunks/chunk-K4LXMO4D.mjs +2 -0
  307. package/lib/web/chunks/chunk-K7CGIEFU.mjs +2 -0
  308. package/lib/web/chunks/chunk-KBTYK5YE.mjs +662 -0
  309. package/lib/web/chunks/chunk-KHP6CSSM.mjs +2 -0
  310. package/lib/web/chunks/chunk-KRDRIW7T.mjs +14 -0
  311. package/lib/web/chunks/chunk-L2DTKDER.mjs +2 -0
  312. package/lib/web/chunks/chunk-LFDFDGHY.mjs +655 -0
  313. package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +2 -0
  314. package/lib/web/chunks/chunk-MAIUUK4E.mjs +2 -0
  315. package/lib/web/chunks/chunk-MKJKS3IG.mjs +275 -0
  316. package/lib/web/chunks/chunk-MRQKVLXG.mjs +2 -0
  317. package/lib/web/chunks/chunk-NK3OISOL.mjs +14 -0
  318. package/lib/web/chunks/chunk-NLJDDIXW.mjs +2 -0
  319. package/lib/web/chunks/chunk-OENR3XFI.mjs +11 -0
  320. package/lib/web/chunks/chunk-OZB3VKZE.mjs +2 -0
  321. package/lib/web/chunks/chunk-P64PFJT3.mjs +17618 -0
  322. package/lib/web/chunks/chunk-PACPGYH7.mjs +2 -0
  323. package/lib/web/chunks/chunk-PART6HOE.mjs +14 -0
  324. package/lib/web/chunks/chunk-PMRXUQRH.mjs +2 -0
  325. package/lib/web/chunks/chunk-PTK5FO6C.mjs +2 -0
  326. package/lib/web/chunks/chunk-PZ45TQ55.mjs +14 -0
  327. package/lib/web/chunks/chunk-Q5LN7GET.mjs +17624 -0
  328. package/lib/web/chunks/chunk-QCD6T6L4.mjs +297 -0
  329. package/lib/web/chunks/chunk-QD5EUANU.mjs +2 -0
  330. package/lib/web/chunks/chunk-QJTECJCO.mjs +2 -0
  331. package/lib/web/chunks/chunk-QPIZURPZ.mjs +2 -0
  332. package/lib/web/chunks/chunk-QPY45R5F.mjs +274 -0
  333. package/lib/web/chunks/chunk-R2SGZIG5.mjs +2 -0
  334. package/lib/web/chunks/chunk-S3GYQYVJ.mjs +16 -0
  335. package/lib/web/chunks/chunk-SCCXVTDM.mjs +2 -0
  336. package/lib/web/chunks/chunk-SHJHD646.mjs +2 -0
  337. package/lib/web/chunks/chunk-TCRVZ55E.mjs +2 -0
  338. package/lib/web/chunks/chunk-TJ6ZVV2L.mjs +15 -0
  339. package/lib/web/chunks/chunk-TPSY4RC3.mjs +14 -0
  340. package/lib/web/chunks/chunk-U5KNX5O6.mjs +17624 -0
  341. package/lib/web/chunks/chunk-UCKELQSM.mjs +2 -0
  342. package/lib/web/chunks/chunk-UGGCYHRH.mjs +15 -0
  343. package/lib/web/chunks/chunk-UNYQJZET.mjs +16 -0
  344. package/lib/web/chunks/chunk-VE72SWLV.mjs +15 -0
  345. package/lib/web/chunks/chunk-VKONO6MI.mjs +2 -0
  346. package/lib/web/chunks/chunk-W4BGMPJO.mjs +2 -0
  347. package/lib/web/chunks/chunk-WHNEEKLR.mjs +2 -0
  348. package/lib/web/chunks/chunk-WLGUP3KY.mjs +16 -0
  349. package/lib/web/chunks/chunk-WY7D4WBZ.mjs +2 -0
  350. package/lib/web/chunks/chunk-XRNB2MHO.mjs +107 -0
  351. package/lib/web/chunks/chunk-XXTIAXQY.mjs +2 -0
  352. package/lib/web/chunks/chunk-XYUAUO57.mjs +2 -0
  353. package/lib/web/chunks/chunk-YG6DIKQD.mjs +2 -0
  354. package/lib/web/chunks/chunk-YIZFMU66.mjs +2 -0
  355. package/lib/web/chunks/chunk-YOGAPOGC.mjs +2 -0
  356. package/lib/web/chunks/chunk-Z7373DS5.mjs +2 -0
  357. package/lib/web/chunks/chunk-Z76GRN66.mjs +17627 -0
  358. package/lib/web/chunks/persistentStorage.web-4FBAOYJ4.mjs +12 -0
  359. package/lib/web/chunks/persistentStorage.web-7W3Y6Q24.mjs +12 -0
  360. package/lib/web/chunks/persistentStorage.web-GOWNFMVT.mjs +2 -0
  361. package/lib/web/chunks/persistentStorage.web-RF47FXIK.mjs +12 -0
  362. package/lib/web/colors.mjs +2 -0
  363. package/lib/web/dataViewer.mjs +3 -0
  364. package/lib/web/floating.mjs +2 -0
  365. package/lib/web/history.mjs +2 -0
  366. package/lib/web/hooks.mjs +2 -0
  367. package/lib/web/index.mjs +15 -0
  368. package/lib/web/native.mjs +2 -0
  369. package/lib/web/ui.mjs +2 -0
  370. package/lib/web/utils.mjs +2 -0
  371. package/package.json +118 -36
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ignoredPatternsStore = void 0;
7
+ Object.defineProperty(exports, "isUrlIgnored", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _ignoredPatternsCore.isUrlIgnored;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, "urlMatchesIgnoredPattern", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _ignoredPatternsCore.urlMatchesIgnoredPattern;
17
+ }
18
+ });
19
+ exports.useIgnoredPatterns = useIgnoredPatterns;
20
+ var _react = require("react");
21
+ var _persistentStorage = require("../utils/persistentStorage");
22
+ var _devToolsStorageKeys = require("../storage/devToolsStorageKeys.js");
23
+ var _ignoredPatternsCore = require("./ignoredPatternsCore.js");
24
+ /**
25
+ * Shared "ignored patterns" store for network-style URL filtering.
26
+ *
27
+ * This is the SINGLE source of truth for the domains/URL patterns that the
28
+ * Network tool (and now the Events tool) hide from their lists. Both tools read
29
+ * and mutate this one singleton, so an ignore toggled in either place is shared
30
+ * everywhere and persisted to the same storage key.
31
+ *
32
+ * Lives in @buoy-gg/shared-ui (a hard dependency of both @buoy-gg/network and
33
+ * @buoy-gg/events) so the filter logic can be shared without @buoy-gg/events
34
+ * having to take a hard dependency on @buoy-gg/network (which is optional).
35
+ */
36
+
37
+ // Pure matching types/helpers live in ignoredPatternsCore.ts (web-shim-safe);
38
+ // re-exported here so the shared-ui barrel surface is unchanged.
39
+
40
+ const DEFAULT_PATTERNS = _ignoredPatternsCore.DEFAULT_IGNORED_PATTERNS;
41
+
42
+ /** Tolerate the legacy `string[]` persisted format and stray junk. */
43
+ function migratePatterns(raw) {
44
+ if (!Array.isArray(raw)) return [];
45
+ const migrated = [];
46
+ for (const entry of raw) {
47
+ if (typeof entry === "string" && entry.trim()) {
48
+ migrated.push({
49
+ value: entry,
50
+ mode: "contains"
51
+ });
52
+ } else if (entry && typeof entry === "object" && typeof entry.value === "string") {
53
+ const e = entry;
54
+ migrated.push({
55
+ value: e.value,
56
+ mode: e.mode === "exact" ? "exact" : "contains"
57
+ });
58
+ }
59
+ }
60
+ return migrated;
61
+ }
62
+
63
+ /** Always keep the default patterns present (e.g. Buoy's license API). */
64
+ function ensureDefaults(patterns) {
65
+ const result = [...patterns];
66
+ for (const def of DEFAULT_PATTERNS) {
67
+ if (!result.some(p => p.value === def.value)) {
68
+ result.push({
69
+ ...def
70
+ });
71
+ }
72
+ }
73
+ return result;
74
+ }
75
+ /**
76
+ * Singleton store. One instance per JS runtime, so every consumer (Network tool,
77
+ * Events tool, on mobile or on the desktop dashboard) shares the same patterns.
78
+ */
79
+ class IgnoredPatternsStore {
80
+ patterns = ensureDefaults(DEFAULT_PATTERNS.map(p => ({
81
+ ...p
82
+ })));
83
+ listeners = new Set();
84
+ loaded = false;
85
+ loadPromise = null;
86
+ /** Set once a mutation happens so a slow initial load can't clobber it. */
87
+ dirty = false;
88
+
89
+ /** Current patterns (stable reference until a mutation occurs). */
90
+ getPatterns() {
91
+ return this.patterns;
92
+ }
93
+ subscribe(listener) {
94
+ this.listeners.add(listener);
95
+ // Lazily hydrate from storage the first time anyone cares.
96
+ void this.ensureLoaded();
97
+ return () => {
98
+ this.listeners.delete(listener);
99
+ };
100
+ }
101
+ emit() {
102
+ this.listeners.forEach(l => l());
103
+ }
104
+ ensureLoaded() {
105
+ if (this.loaded) return Promise.resolve();
106
+ if (this.loadPromise) return this.loadPromise;
107
+ this.loadPromise = (async () => {
108
+ try {
109
+ const stored = await _persistentStorage.persistentStorage.getItem(_devToolsStorageKeys.devToolsStorageKeys.network.ignoredDomains());
110
+ // A mutation may have raced this read — never overwrite user intent.
111
+ if (stored && !this.dirty) {
112
+ const migrated = ensureDefaults(migratePatterns(JSON.parse(stored)));
113
+ this.patterns = migrated;
114
+ }
115
+ } catch {
116
+ // Silently fall back to defaults.
117
+ } finally {
118
+ this.loaded = true;
119
+ this.emit();
120
+ }
121
+ })();
122
+ return this.loadPromise;
123
+ }
124
+ persist() {
125
+ _persistentStorage.persistentStorage.setItem(_devToolsStorageKeys.devToolsStorageKeys.network.ignoredDomains(), JSON.stringify(this.patterns)).catch(() => {
126
+ // Silently fail — patterns remain in memory.
127
+ });
128
+ }
129
+ commit(next) {
130
+ this.dirty = true;
131
+ this.patterns = next;
132
+ this.emit();
133
+ this.persist();
134
+ }
135
+
136
+ /** Add a pattern (no-op if its value already exists). */
137
+ add(pattern) {
138
+ const value = pattern.value.trim();
139
+ if (!value) return;
140
+ if (this.patterns.some(p => p.value === value)) return;
141
+ this.commit([...this.patterns, {
142
+ value,
143
+ mode: pattern.mode
144
+ }]);
145
+ }
146
+
147
+ /** Remove a pattern by value. */
148
+ remove(value) {
149
+ if (!this.patterns.some(p => p.value === value)) return;
150
+ this.commit(this.patterns.filter(p => p.value !== value));
151
+ }
152
+
153
+ /** Add as `contains` if absent, otherwise remove (used by detail-view chips). */
154
+ toggle(value) {
155
+ const trimmed = value.trim();
156
+ if (!trimmed) return;
157
+ this.commit(this.patterns.some(p => p.value === trimmed) ? this.patterns.filter(p => p.value !== trimmed) : [...this.patterns, {
158
+ value: trimmed,
159
+ mode: "contains"
160
+ }]);
161
+ }
162
+
163
+ /** Flip an existing pattern between `contains` and `exact`. */
164
+ toggleMode(value) {
165
+ if (!this.patterns.some(p => p.value === value)) return;
166
+ this.commit(this.patterns.map(p => p.value === value ? {
167
+ ...p,
168
+ mode: p.mode === "contains" ? "exact" : "contains"
169
+ } : p));
170
+ }
171
+ }
172
+ const ignoredPatternsStore = exports.ignoredPatternsStore = new IgnoredPatternsStore();
173
+ /**
174
+ * Mutations live at module scope so they keep a STABLE identity across
175
+ * renders. They used to be inline arrows in the return object, which handed
176
+ * every consumer a fresh `toggle` on each render and defeated `memo` on
177
+ * anything they were passed down to — measured on the network detail view,
178
+ * where it forced a full re-render of the inspector per step.
179
+ */
180
+ const addPattern = pattern => ignoredPatternsStore.add(pattern);
181
+ const removePattern = value => ignoredPatternsStore.remove(value);
182
+ const togglePattern = value => ignoredPatternsStore.toggle(value);
183
+ const togglePatternMode = value => ignoredPatternsStore.toggleMode(value);
184
+
185
+ /**
186
+ * Subscribe to the shared ignored-patterns store. All consumers in a runtime
187
+ * see the same patterns and the same mutations.
188
+ */
189
+ function useIgnoredPatterns() {
190
+ const [patterns, setPatterns] = (0, _react.useState)(() => ignoredPatternsStore.getPatterns());
191
+ (0, _react.useEffect)(() => {
192
+ return ignoredPatternsStore.subscribe(() => {
193
+ setPatterns(ignoredPatternsStore.getPatterns());
194
+ });
195
+ }, []);
196
+ const values = (0, _react.useMemo)(() => new Set(patterns.map(p => p.value)), [patterns]);
197
+ return {
198
+ patterns,
199
+ values,
200
+ add: addPattern,
201
+ remove: removePattern,
202
+ toggle: togglePattern,
203
+ toggleMode: togglePatternMode
204
+ };
205
+ }
@@ -3,234 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ignoredPatternsStore = void 0;
7
- Object.defineProperty(exports, "isUrlIgnored", {
8
- enumerable: true,
9
- get: function () {
10
- return _ignoredPatternsCore.isUrlIgnored;
11
- }
12
- });
13
- Object.defineProperty(exports, "urlMatchesIgnoredPattern", {
14
- enumerable: true,
15
- get: function () {
16
- return _ignoredPatternsCore.urlMatchesIgnoredPattern;
17
- }
18
- });
19
- exports.useIgnoredPatterns = useIgnoredPatterns;
20
- var _react = require("react");
21
- var _devToolsStorageKeys = require("../storage/devToolsStorageKeys.js");
22
- var _ignoredPatternsCore = require("./ignoredPatternsCore.js");
23
- /**
24
- * ignoredPatternsStore.web — web twin of ignoredPatternsStore.ts (the shared
25
- * persisted "ignored patterns" singleton for network-style URL filtering).
26
- *
27
- * The native store imports shared's RN `persistentStorage` (whose module graph
28
- * carries guarded expo-file-system / async-storage requires), which is why the
29
- * web shims never re-exported it. This twin keeps the ENTIRE store class, hook
30
- * and persistence contract identical — same class shape, same
31
- * `devToolsStorageKeys.network.ignoredDomains()` storage key, same persisted
32
- * JSON shape (`IgnoredPattern[]`, with the legacy `string[]` migration) — and
33
- * swaps only the storage backing: a file-local localStorage adapter that
34
- * matches the `persistentStorage` API (async getItem/setItem, best-effort,
35
- * provenance: example-tauri/src/shims/shared-ui.web.ts's adapter — web Buoy
36
- * chrome persistence lives in webview localStorage).
37
- *
38
- * Everything else — pure matching (`ignoredPatternsCore`), the migration +
39
- * ensure-defaults logic, the dirty-flag load race guard, the module-scope
40
- * stable mutation identities — is the native code, not a fork of its
41
- * semantics. Web consumers get the same shared, persisted pattern list the
42
- * phone has, keyed identically, so a DOM port and a react-native-web port of
43
- * the same app read/write the same entry.
44
- *
45
- * @platform React DOM Web
46
- */
47
-
48
- // Pure matching types/helpers live in ignoredPatternsCore.ts (web-shim-safe);
49
- // re-exported here so this module's surface twins the native store's.
50
-
51
- /**
52
- * localStorage-backed implementation of the shared `persistentStorage` API
53
- * (getItem/setItem returning promises, silent best-effort failure) — the same
54
- * adapter recipe the web shared-ui shims use for Buoy chrome persistence.
55
- * Local to this file so the web store pulls zero RN/expo modules.
56
- */
57
- const persistentStorage = {
58
- async getItem(key) {
59
- try {
60
- return window.localStorage.getItem(key);
61
- } catch {
62
- return null;
6
+ var _ignoredPatternsStoreShared = require("./ignoredPatternsStore.shared.js");
7
+ Object.keys(_ignoredPatternsStoreShared).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _ignoredPatternsStoreShared[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _ignoredPatternsStoreShared[key];
63
14
  }
64
- },
65
- async setItem(key, value) {
66
- try {
67
- window.localStorage.setItem(key, value);
68
- } catch {
69
- // Ignore quota/availability errors — callers treat this as best-effort.
70
- }
71
- }
72
- };
73
- const DEFAULT_PATTERNS = _ignoredPatternsCore.DEFAULT_IGNORED_PATTERNS;
74
-
75
- /** Tolerate the legacy `string[]` persisted format and stray junk. */
76
- function migratePatterns(raw) {
77
- if (!Array.isArray(raw)) return [];
78
- const migrated = [];
79
- for (const entry of raw) {
80
- if (typeof entry === "string" && entry.trim()) {
81
- migrated.push({
82
- value: entry,
83
- mode: "contains"
84
- });
85
- } else if (entry && typeof entry === "object" && typeof entry.value === "string") {
86
- const e = entry;
87
- migrated.push({
88
- value: e.value,
89
- mode: e.mode === "exact" ? "exact" : "contains"
90
- });
91
- }
92
- }
93
- return migrated;
94
- }
95
-
96
- /** Always keep the default patterns present (e.g. Buoy's license API). */
97
- function ensureDefaults(patterns) {
98
- const result = [...patterns];
99
- for (const def of DEFAULT_PATTERNS) {
100
- if (!result.some(p => p.value === def.value)) {
101
- result.push({
102
- ...def
103
- });
104
- }
105
- }
106
- return result;
107
- }
108
- /**
109
- * Singleton store. One instance per JS runtime, so every consumer (Network
110
- * tool, Events tool, any web panel) shares the same patterns.
111
- */
112
- class IgnoredPatternsStore {
113
- patterns = ensureDefaults(DEFAULT_PATTERNS.map(p => ({
114
- ...p
115
- })));
116
- listeners = new Set();
117
- loaded = false;
118
- loadPromise = null;
119
- /** Set once a mutation happens so a slow initial load can't clobber it. */
120
- dirty = false;
121
-
122
- /** Current patterns (stable reference until a mutation occurs). */
123
- getPatterns() {
124
- return this.patterns;
125
- }
126
- subscribe(listener) {
127
- this.listeners.add(listener);
128
- // Lazily hydrate from storage the first time anyone cares.
129
- void this.ensureLoaded();
130
- return () => {
131
- this.listeners.delete(listener);
132
- };
133
- }
134
- emit() {
135
- this.listeners.forEach(l => l());
136
- }
137
- ensureLoaded() {
138
- if (this.loaded) return Promise.resolve();
139
- if (this.loadPromise) return this.loadPromise;
140
- this.loadPromise = (async () => {
141
- try {
142
- const stored = await persistentStorage.getItem(_devToolsStorageKeys.devToolsStorageKeys.network.ignoredDomains());
143
- // A mutation may have raced this read — never overwrite user intent.
144
- if (stored && !this.dirty) {
145
- const migrated = ensureDefaults(migratePatterns(JSON.parse(stored)));
146
- this.patterns = migrated;
147
- }
148
- } catch {
149
- // Silently fall back to defaults.
150
- } finally {
151
- this.loaded = true;
152
- this.emit();
153
- }
154
- })();
155
- return this.loadPromise;
156
- }
157
- persist() {
158
- persistentStorage.setItem(_devToolsStorageKeys.devToolsStorageKeys.network.ignoredDomains(), JSON.stringify(this.patterns)).catch(() => {
159
- // Silently fail — patterns remain in memory.
160
- });
161
- }
162
- commit(next) {
163
- this.dirty = true;
164
- this.patterns = next;
165
- this.emit();
166
- this.persist();
167
- }
168
-
169
- /** Add a pattern (no-op if its value already exists). */
170
- add(pattern) {
171
- const value = pattern.value.trim();
172
- if (!value) return;
173
- if (this.patterns.some(p => p.value === value)) return;
174
- this.commit([...this.patterns, {
175
- value,
176
- mode: pattern.mode
177
- }]);
178
- }
179
-
180
- /** Remove a pattern by value. */
181
- remove(value) {
182
- if (!this.patterns.some(p => p.value === value)) return;
183
- this.commit(this.patterns.filter(p => p.value !== value));
184
- }
185
-
186
- /** Add as `contains` if absent, otherwise remove (used by detail-view chips). */
187
- toggle(value) {
188
- const trimmed = value.trim();
189
- if (!trimmed) return;
190
- this.commit(this.patterns.some(p => p.value === trimmed) ? this.patterns.filter(p => p.value !== trimmed) : [...this.patterns, {
191
- value: trimmed,
192
- mode: "contains"
193
- }]);
194
- }
195
-
196
- /** Flip an existing pattern between `contains` and `exact`. */
197
- toggleMode(value) {
198
- if (!this.patterns.some(p => p.value === value)) return;
199
- this.commit(this.patterns.map(p => p.value === value ? {
200
- ...p,
201
- mode: p.mode === "contains" ? "exact" : "contains"
202
- } : p));
203
- }
204
- }
205
- const ignoredPatternsStore = exports.ignoredPatternsStore = new IgnoredPatternsStore();
206
- /**
207
- * Mutations live at module scope so they keep a STABLE identity across
208
- * renders (same rationale as native: inline arrows handed every consumer a
209
- * fresh `toggle` per render and defeated `memo` downstream).
210
- */
211
- const addPattern = pattern => ignoredPatternsStore.add(pattern);
212
- const removePattern = value => ignoredPatternsStore.remove(value);
213
- const togglePattern = value => ignoredPatternsStore.toggle(value);
214
- const togglePatternMode = value => ignoredPatternsStore.toggleMode(value);
215
-
216
- /**
217
- * Subscribe to the shared ignored-patterns store. All consumers in a runtime
218
- * see the same patterns and the same mutations.
219
- */
220
- function useIgnoredPatterns() {
221
- const [patterns, setPatterns] = (0, _react.useState)(() => ignoredPatternsStore.getPatterns());
222
- (0, _react.useEffect)(() => {
223
- return ignoredPatternsStore.subscribe(() => {
224
- setPatterns(ignoredPatternsStore.getPatterns());
225
- });
226
- }, []);
227
- const values = (0, _react.useMemo)(() => new Set(patterns.map(p => p.value)), [patterns]);
228
- return {
229
- patterns,
230
- values,
231
- add: addPattern,
232
- remove: removePattern,
233
- toggle: togglePattern,
234
- toggleMode: togglePatternMode
235
- };
236
- }
15
+ });
16
+ });
@@ -7,7 +7,7 @@ exports.backgroundStore = exports.BACKGROUND_STORAGE_KEY = void 0;
7
7
  exports.useToolBackground = useToolBackground;
8
8
  var _react = require("react");
9
9
  var _devToolsStorageKeys = require("../../storage/devToolsStorageKeys.js");
10
- var _persistentStorage = require("../../utils/persistentStorage.js");
10
+ var _persistentStorage = require("../../utils/persistentStorage");
11
11
  var _registry = require("./registry.js");
12
12
  /**
13
13
  * The persisted background selection, shared by every tool.
@@ -103,12 +103,14 @@ const Wormhole = exports.Wormhole = /*#__PURE__*/(0, _react.memo)(function Wormh
103
103
  }]
104
104
  }],
105
105
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
106
+ testID: "buoy-internal-background",
106
107
  source: _textures.WORMHOLE_SHEET,
107
108
  resizeMode: "stretch",
108
109
  fadeDuration: 0,
109
110
  style: fill
110
111
  })
111
112
  }, i)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
113
+ testID: "buoy-internal-background",
112
114
  source: _textures.WORMHOLE_CORE,
113
115
  resizeMode: "stretch",
114
116
  fadeDuration: 0,
@@ -123,6 +125,7 @@ const Wormhole = exports.Wormhole = /*#__PURE__*/(0, _react.memo)(function Wormh
123
125
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
124
126
  style: [plane, camera],
125
127
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
128
+ testID: "buoy-internal-background",
126
129
  source: _textures.WORMHOLE_STILL,
127
130
  resizeMode: "stretch",
128
131
  fadeDuration: 0,
@@ -12,7 +12,7 @@ var _lucideIcons = require("../../icons/lucide-icons.js");
12
12
  var _macOSDesignSystemColors = require("../gameUI/constants/macOSDesignSystemColors.js");
13
13
  var _ClipboardHintBanner = require("./ClipboardHintBanner.js");
14
14
  var _devToolsStorageKeys = require("../../storage/devToolsStorageKeys.js");
15
- var _persistentStorage = require("../../utils/persistentStorage.js");
15
+ var _persistentStorage = require("../../utils/persistentStorage");
16
16
  var _index = require("../../context/index.js");
17
17
  var _index2 = require("../../license/index.js");
18
18
  var _license = require("@buoy-gg/license");
@@ -9,7 +9,7 @@ var _reactNative = require("react-native");
9
9
  var _lucideIcons = require("../../icons/lucide-icons.js");
10
10
  var _macOSDesignSystemColors = require("../gameUI/constants/macOSDesignSystemColors.js");
11
11
  var _nightTheme = require("../night/nightTheme.js");
12
- var _useSafeAreaInsets = require("../../hooks/useSafeAreaInsets.js");
12
+ var _useSafeAreaInsets = require("../../hooks/useSafeAreaInsets");
13
13
  var _fonts = require("../fonts.js");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  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); }
@@ -10,7 +10,7 @@ exports.FooterRow = FooterRow;
10
10
  exports.ToolFooter = ToolFooter;
11
11
  var _reactNative = require("react-native");
12
12
  var _nightTheme = require("../night/nightTheme.js");
13
- var _useSafeAreaInsets = require("../../hooks/useSafeAreaInsets.js");
13
+ var _useSafeAreaInsets = require("../../hooks/useSafeAreaInsets");
14
14
  var _fonts = require("../fonts.js");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  /**
@@ -127,6 +127,7 @@ function UserStatus({
127
127
  const handleClick = e => {
128
128
  if (!isDragging && onPress) {
129
129
  e.stopPropagation();
130
+ e.currentTarget.focus();
130
131
  onPress();
131
132
  }
132
133
  };
@@ -464,6 +465,8 @@ function FloatingTool({
464
465
  const spaceAbove = Math.max(0, animatedPosition.y - 8);
465
466
  const spaceBelow = Math.max(0, window.innerHeight - animatedPosition.y - state.bubbleSize.height - 8);
466
467
  const accessoryAbove = spaceAbove > spaceBelow;
468
+ // Keep the minimized stack above the handle unless even one row cannot fit.
469
+ const stackAbove = spaceAbove >= 48 || spaceAbove >= spaceBelow;
467
470
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
468
471
  ref: bubbleRef,
469
472
  "data-testid": id ?? "buoy-floating-tool",
@@ -474,7 +477,7 @@ function FloatingTool({
474
477
  position: 'fixed',
475
478
  left: animatedPosition.x,
476
479
  top: animatedPosition.y,
477
- zIndex: 9999,
480
+ zIndex: pushToSide ? 8999 : 9999,
478
481
  display: 'flex',
479
482
  flexDirection: 'row',
480
483
  alignItems: 'center',
@@ -508,7 +511,14 @@ function FloatingTool({
508
511
  children: [minimizedStack && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
509
512
  style: {
510
513
  position: 'absolute',
511
- bottom: '100%',
514
+ ...(stackAbove ? {
515
+ bottom: '100%'
516
+ } : {
517
+ top: '100%'
518
+ }),
519
+ '--buoy-stack-bottom': stackAbove ? '0px' : 'auto',
520
+ '--buoy-stack-top': stackAbove ? 'auto' : '0px',
521
+ '--buoy-stack-space': `${stackAbove ? spaceAbove : spaceBelow}px`,
512
522
  left: -1,
513
523
  // align with the bubble border edge
514
524
  width: _floating.VISIBLE_HANDLE_WIDTH,
@@ -55,8 +55,13 @@ function NightFootnote({
55
55
  tone = "tertiary",
56
56
  style
57
57
  }) {
58
+ // The inset is a marginLeft, and a marginLeft beats a caller's
59
+ // marginHorizontal or margin, so those were silently ignored on the left.
60
+ // A caller that sets either owns the horizontal margins.
61
+ const flat = _reactNative.StyleSheet.flatten(style);
62
+ const ownsMargin = !!flat && (flat.marginHorizontal != null || flat.margin != null);
58
63
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
59
- style: [styles.footnote, tone === "secondary" ? styles.footnoteSecondary : null, tone === "warning" ? styles.footnoteWarning : null, tone === "danger" ? styles.footnoteDanger : null, centered ? styles.footnoteCentered : null, style],
64
+ style: [styles.footnote, ownsMargin ? null : styles.footnoteInset, tone === "secondary" ? styles.footnoteSecondary : null, tone === "warning" ? styles.footnoteWarning : null, tone === "danger" ? styles.footnoteDanger : null, centered ? styles.footnoteCentered : null, style],
60
65
  children: children
61
66
  });
62
67
  }
@@ -131,7 +136,7 @@ function NightSwitch({
131
136
  _reactNative.Animated.timing(progress, {
132
137
  toValue: value ? 1 : 0,
133
138
  duration: 200,
134
- useNativeDriver: true
139
+ useNativeDriver: _reactNative.Platform.OS !== "web"
135
140
  }).start();
136
141
  }, [value, progress]);
137
142
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
@@ -284,7 +289,9 @@ const styles = _reactNative.StyleSheet.create({
284
289
  fontSize: _nightTheme.night.font.caption,
285
290
  fontWeight: "500",
286
291
  lineHeight: _nightTheme.night.font.caption * 1.4,
287
- marginTop: 8,
292
+ marginTop: 8
293
+ },
294
+ footnoteInset: {
288
295
  marginLeft: _nightTheme.night.labelInset
289
296
  },
290
297
  footnoteSecondary: {
@@ -230,7 +230,7 @@ function useOttoMotionClock(units, tickMs, active, restartKey) {
230
230
  toValue: units,
231
231
  duration: units * tickMs,
232
232
  easing: _reactNative.Easing.linear,
233
- useNativeDriver: true,
233
+ useNativeDriver: _reactNative.Platform.OS !== "web",
234
234
  isInteraction: false
235
235
  }), {
236
236
  resetBeforeIteration: true