@buoy-gg/shared-ui 7.0.39 → 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 (377) 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/ignoredPatternsCore.js +8 -1
  24. package/lib/commonjs/stores/ignoredPatternsStore.js +10 -199
  25. package/lib/commonjs/stores/ignoredPatternsStore.shared.js +205 -0
  26. package/lib/commonjs/stores/ignoredPatternsStore.web.js +10 -230
  27. package/lib/commonjs/ui/backgrounds/backgroundStore.js +1 -1
  28. package/lib/commonjs/ui/backgrounds/variants/wormhole.js +3 -0
  29. package/lib/commonjs/ui/components/CopyButton.js +1 -1
  30. package/lib/commonjs/ui/components/EventStepperFooter.js +1 -1
  31. package/lib/commonjs/ui/components/ToolFooter.js +1 -1
  32. package/lib/commonjs/ui/floating/FloatingTool.web.js +12 -2
  33. package/lib/commonjs/ui/night/primitives.js +10 -3
  34. package/lib/commonjs/ui/otto/OttoSprite.js +1 -1
  35. package/lib/commonjs/utils/browserAsyncStorage.js +157 -0
  36. package/lib/commonjs/utils/browserNavigation.js +116 -0
  37. package/lib/commonjs/utils/devServer.js +8 -4
  38. package/lib/commonjs/utils/devServer.web.js +10 -0
  39. package/lib/commonjs/utils/domRuntime.js +143 -0
  40. package/lib/commonjs/utils/expoRouterModule.js +51 -0
  41. package/lib/commonjs/utils/expoRouterModule.web.js +14 -0
  42. package/lib/commonjs/utils/getSafeAreaInsets.web.js +35 -0
  43. package/lib/commonjs/utils/index.js +111 -4
  44. package/lib/commonjs/utils/loadToolModule.js +46 -0
  45. package/lib/commonjs/utils/loadToolModule.web.js +12 -0
  46. package/lib/commonjs/utils/modalStorage.js +42 -0
  47. package/lib/commonjs/utils/nativeWeb.js +454 -0
  48. package/lib/commonjs/utils/persistentStorage.web.js +78 -0
  49. package/lib/commonjs/utils/reloadApp.js +18 -57
  50. package/lib/commonjs/utils/reloadPlatform.js +37 -0
  51. package/lib/commonjs/utils/reloadPlatform.web.js +17 -0
  52. package/lib/commonjs/utils/safeExpoRouter.js +3 -53
  53. package/lib/commonjs/utils/safeExpoRouter.web.js +48 -0
  54. package/lib/commonjs/utils/toolModules.js +25 -0
  55. package/lib/module/JsModal.js +11 -59
  56. package/lib/module/JsModal.web.js +28 -91
  57. package/lib/module/clipboard/autoDetectClipboard.js +2 -2
  58. package/lib/module/clipboard/clipboard-impl.web.js +14 -0
  59. package/lib/module/dataViewer/tree/TreeDiffViewer.js +4 -2
  60. package/lib/module/hooks/index.js +2 -2
  61. package/lib/module/hooks/safe-area-impl.js +1 -1
  62. package/lib/module/hooks/usePersistedState.js +1 -1
  63. package/lib/module/hooks/useSafeAreaInsets.web.js +30 -0
  64. package/lib/module/icons/index.js +2 -1
  65. package/lib/module/index.js +3 -0
  66. package/lib/module/license/AccountSetup.js +5 -26
  67. package/lib/module/license/AccountSetup.web.js +79 -65
  68. package/lib/module/license/AccountSetupContent.js +476 -0
  69. package/lib/module/license/FreeAccountPrompt.js +27 -176
  70. package/lib/module/license/LicenseEntryModal.js +6 -13
  71. package/lib/module/license/accountRuntime.js +3 -0
  72. package/lib/module/license/accountRuntime.web.js +4 -0
  73. package/lib/module/license/licenseModule.js +2 -0
  74. package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
  75. package/lib/module/storage/definePersistedSetting.js +1 -1
  76. package/lib/module/stores/ignoredPatternsCore.js +8 -1
  77. package/lib/module/stores/ignoredPatternsStore.js +1 -187
  78. package/lib/module/stores/ignoredPatternsStore.shared.js +189 -0
  79. package/lib/module/stores/ignoredPatternsStore.web.js +1 -219
  80. package/lib/module/ui/backgrounds/backgroundStore.js +1 -1
  81. package/lib/module/ui/backgrounds/variants/wormhole.js +3 -0
  82. package/lib/module/ui/components/CopyButton.js +1 -1
  83. package/lib/module/ui/components/EventStepperFooter.js +1 -1
  84. package/lib/module/ui/components/ToolFooter.js +1 -1
  85. package/lib/module/ui/floating/FloatingTool.web.js +12 -2
  86. package/lib/module/ui/night/primitives.js +11 -4
  87. package/lib/module/ui/otto/OttoSprite.js +1 -1
  88. package/lib/module/utils/browserAsyncStorage.js +151 -0
  89. package/lib/module/utils/browserNavigation.js +108 -0
  90. package/lib/module/utils/devServer.js +8 -4
  91. package/lib/module/utils/devServer.web.js +6 -0
  92. package/lib/module/utils/domRuntime.js +134 -0
  93. package/lib/module/utils/expoRouterModule.js +46 -0
  94. package/lib/module/utils/expoRouterModule.web.js +9 -0
  95. package/lib/module/utils/getSafeAreaInsets.web.js +31 -0
  96. package/lib/module/utils/index.js +9 -4
  97. package/lib/module/utils/loadToolModule.js +42 -0
  98. package/lib/module/utils/loadToolModule.web.js +8 -0
  99. package/lib/module/utils/modalStorage.js +37 -0
  100. package/lib/module/utils/nativeWeb.js +107 -0
  101. package/lib/module/utils/persistentStorage.web.js +72 -0
  102. package/lib/module/utils/reloadApp.js +13 -51
  103. package/lib/module/utils/reloadPlatform.js +31 -0
  104. package/lib/module/utils/reloadPlatform.web.js +11 -0
  105. package/lib/module/utils/safeExpoRouter.js +3 -53
  106. package/lib/module/utils/safeExpoRouter.web.js +37 -0
  107. package/lib/module/utils/toolModules.js +19 -0
  108. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/JsModal.web.d.ts +7 -18
  110. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts +5 -0
  112. package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  115. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts +6 -0
  116. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/icons/index.d.ts +1 -0
  118. package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/index.d.ts +2 -0
  120. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
  123. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/license/AccountSetupContent.d.ts +11 -0
  125. package/lib/typescript/commonjs/license/AccountSetupContent.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +3 -15
  127. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/license/accountRuntime.d.ts +2 -0
  130. package/lib/typescript/commonjs/license/accountRuntime.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/license/accountRuntime.web.d.ts +2 -0
  132. package/lib/typescript/commonjs/license/accountRuntime.web.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/license/licenseModule.d.ts +3 -1
  134. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/stores/ignoredPatternsCore.d.ts +5 -1
  136. package/lib/typescript/commonjs/stores/ignoredPatternsCore.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts +1 -59
  138. package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +60 -0
  140. package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts +1 -71
  142. package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +1 -1
  144. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
  146. package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts +25 -0
  147. package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/utils/browserNavigation.d.ts +31 -0
  149. package/lib/typescript/commonjs/utils/browserNavigation.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/utils/devServer.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/utils/devServer.web.d.ts +2 -0
  152. package/lib/typescript/commonjs/utils/devServer.web.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/utils/domRuntime.d.ts +27 -0
  154. package/lib/typescript/commonjs/utils/domRuntime.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/utils/expoRouterModule.d.ts +3 -0
  156. package/lib/typescript/commonjs/utils/expoRouterModule.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts +3 -0
  158. package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts +8 -0
  160. package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/utils/index.d.ts +5 -0
  162. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
  163. package/lib/typescript/commonjs/utils/loadToolModule.d.ts +3 -0
  164. package/lib/typescript/commonjs/utils/loadToolModule.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts +2 -0
  166. package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/utils/modalStorage.d.ts +21 -0
  168. package/lib/typescript/commonjs/utils/modalStorage.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/utils/nativeWeb.d.ts +22 -0
  170. package/lib/typescript/commonjs/utils/nativeWeb.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts +6 -0
  172. package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/utils/reloadApp.d.ts +7 -25
  174. package/lib/typescript/commonjs/utils/reloadApp.d.ts.map +1 -1
  175. package/lib/typescript/commonjs/utils/reloadPlatform.d.ts +8 -0
  176. package/lib/typescript/commonjs/utils/reloadPlatform.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts +4 -0
  178. package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts +43 -0
  181. package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/utils/toolModules.d.ts +5 -0
  183. package/lib/typescript/commonjs/utils/toolModules.d.ts.map +1 -0
  184. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  185. package/lib/typescript/module/JsModal.web.d.ts +7 -18
  186. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  187. package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts +5 -0
  188. package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts.map +1 -0
  189. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  190. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  191. package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts +6 -0
  192. package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts.map +1 -0
  193. package/lib/typescript/module/icons/index.d.ts +1 -0
  194. package/lib/typescript/module/icons/index.d.ts.map +1 -1
  195. package/lib/typescript/module/index.d.ts +2 -0
  196. package/lib/typescript/module/index.d.ts.map +1 -1
  197. package/lib/typescript/module/license/AccountSetup.d.ts.map +1 -1
  198. package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
  199. package/lib/typescript/module/license/AccountSetup.web.d.ts.map +1 -1
  200. package/lib/typescript/module/license/AccountSetupContent.d.ts +11 -0
  201. package/lib/typescript/module/license/AccountSetupContent.d.ts.map +1 -0
  202. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +3 -15
  203. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
  204. package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
  205. package/lib/typescript/module/license/accountRuntime.d.ts +2 -0
  206. package/lib/typescript/module/license/accountRuntime.d.ts.map +1 -0
  207. package/lib/typescript/module/license/accountRuntime.web.d.ts +2 -0
  208. package/lib/typescript/module/license/accountRuntime.web.d.ts.map +1 -0
  209. package/lib/typescript/module/license/licenseModule.d.ts +3 -1
  210. package/lib/typescript/module/license/licenseModule.d.ts.map +1 -1
  211. package/lib/typescript/module/stores/ignoredPatternsCore.d.ts +5 -1
  212. package/lib/typescript/module/stores/ignoredPatternsCore.d.ts.map +1 -1
  213. package/lib/typescript/module/stores/ignoredPatternsStore.d.ts +1 -59
  214. package/lib/typescript/module/stores/ignoredPatternsStore.d.ts.map +1 -1
  215. package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +60 -0
  216. package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts.map +1 -0
  217. package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts +1 -71
  218. package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts.map +1 -1
  219. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +1 -1
  220. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
  221. package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
  222. package/lib/typescript/module/utils/browserAsyncStorage.d.ts +25 -0
  223. package/lib/typescript/module/utils/browserAsyncStorage.d.ts.map +1 -0
  224. package/lib/typescript/module/utils/browserNavigation.d.ts +31 -0
  225. package/lib/typescript/module/utils/browserNavigation.d.ts.map +1 -0
  226. package/lib/typescript/module/utils/devServer.d.ts.map +1 -1
  227. package/lib/typescript/module/utils/devServer.web.d.ts +2 -0
  228. package/lib/typescript/module/utils/devServer.web.d.ts.map +1 -0
  229. package/lib/typescript/module/utils/domRuntime.d.ts +27 -0
  230. package/lib/typescript/module/utils/domRuntime.d.ts.map +1 -0
  231. package/lib/typescript/module/utils/expoRouterModule.d.ts +3 -0
  232. package/lib/typescript/module/utils/expoRouterModule.d.ts.map +1 -0
  233. package/lib/typescript/module/utils/expoRouterModule.web.d.ts +3 -0
  234. package/lib/typescript/module/utils/expoRouterModule.web.d.ts.map +1 -0
  235. package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts +8 -0
  236. package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts.map +1 -0
  237. package/lib/typescript/module/utils/index.d.ts +5 -0
  238. package/lib/typescript/module/utils/index.d.ts.map +1 -1
  239. package/lib/typescript/module/utils/loadToolModule.d.ts +3 -0
  240. package/lib/typescript/module/utils/loadToolModule.d.ts.map +1 -0
  241. package/lib/typescript/module/utils/loadToolModule.web.d.ts +2 -0
  242. package/lib/typescript/module/utils/loadToolModule.web.d.ts.map +1 -0
  243. package/lib/typescript/module/utils/modalStorage.d.ts +21 -0
  244. package/lib/typescript/module/utils/modalStorage.d.ts.map +1 -0
  245. package/lib/typescript/module/utils/nativeWeb.d.ts +22 -0
  246. package/lib/typescript/module/utils/nativeWeb.d.ts.map +1 -0
  247. package/lib/typescript/module/utils/persistentStorage.web.d.ts +6 -0
  248. package/lib/typescript/module/utils/persistentStorage.web.d.ts.map +1 -0
  249. package/lib/typescript/module/utils/reloadApp.d.ts +7 -25
  250. package/lib/typescript/module/utils/reloadApp.d.ts.map +1 -1
  251. package/lib/typescript/module/utils/reloadPlatform.d.ts +8 -0
  252. package/lib/typescript/module/utils/reloadPlatform.d.ts.map +1 -0
  253. package/lib/typescript/module/utils/reloadPlatform.web.d.ts +4 -0
  254. package/lib/typescript/module/utils/reloadPlatform.web.d.ts.map +1 -0
  255. package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +1 -1
  256. package/lib/typescript/module/utils/safeExpoRouter.web.d.ts +43 -0
  257. package/lib/typescript/module/utils/safeExpoRouter.web.d.ts.map +1 -0
  258. package/lib/typescript/module/utils/toolModules.d.ts +5 -0
  259. package/lib/typescript/module/utils/toolModules.d.ts.map +1 -0
  260. package/lib/web/asyncStorage.mjs +2 -0
  261. package/lib/web/chunks/chunk-2MHKRRQW.mjs +8 -0
  262. package/lib/web/chunks/chunk-2Q3SDPH2.mjs +14 -0
  263. package/lib/web/chunks/chunk-34YQ42KI.mjs +2 -0
  264. package/lib/web/chunks/chunk-3NNNCQYP.mjs +14 -0
  265. package/lib/web/chunks/chunk-3UTMGIUG.mjs +2 -0
  266. package/lib/web/chunks/chunk-46CXXOQB.mjs +2 -0
  267. package/lib/web/chunks/chunk-475BSDCB.mjs +2 -0
  268. package/lib/web/chunks/chunk-53J2FMUD.mjs +2 -0
  269. package/lib/web/chunks/chunk-552W4COI.mjs +2 -0
  270. package/lib/web/chunks/chunk-56TTTMX4.mjs +6145 -0
  271. package/lib/web/chunks/chunk-5LOQZINQ.mjs +14 -0
  272. package/lib/web/chunks/chunk-5NOIO6ZM.mjs +16 -0
  273. package/lib/web/chunks/chunk-5NZOQR6Q.mjs +2 -0
  274. package/lib/web/chunks/chunk-6CCRCSA2.mjs +2 -0
  275. package/lib/web/chunks/chunk-6Q52HRBL.mjs +2 -0
  276. package/lib/web/chunks/chunk-6TEDFSNM.mjs +655 -0
  277. package/lib/web/chunks/chunk-7BMRSMHN.mjs +2 -0
  278. package/lib/web/chunks/chunk-A2SOFE47.mjs +24 -0
  279. package/lib/web/chunks/chunk-A7KJCK4R.mjs +14 -0
  280. package/lib/web/chunks/chunk-AEXGGXS7.mjs +2 -0
  281. package/lib/web/chunks/chunk-AGD7ZT6O.mjs +15 -0
  282. package/lib/web/chunks/chunk-AIEOQWNG.mjs +2 -0
  283. package/lib/web/chunks/chunk-ASTM35HG.mjs +16 -0
  284. package/lib/web/chunks/chunk-AZBMFPMX.mjs +1421 -0
  285. package/lib/web/chunks/chunk-B2V2UDCU.mjs +16 -0
  286. package/lib/web/chunks/chunk-BFGKGTAC.mjs +2 -0
  287. package/lib/web/chunks/chunk-BHW6AFO6.mjs +2 -0
  288. package/lib/web/chunks/chunk-BWRW3NJ2.mjs +16 -0
  289. package/lib/web/chunks/chunk-CBM2IZAK.mjs +2 -0
  290. package/lib/web/chunks/chunk-CDLCFF44.mjs +2 -0
  291. package/lib/web/chunks/chunk-CE5U3CSQ.mjs +2 -0
  292. package/lib/web/chunks/chunk-CI5CO7FQ.mjs +2 -0
  293. package/lib/web/chunks/chunk-CIB4U2YK.mjs +2 -0
  294. package/lib/web/chunks/chunk-CLLTZQGD.mjs +596 -0
  295. package/lib/web/chunks/chunk-D5HQLRFW.mjs +655 -0
  296. package/lib/web/chunks/chunk-DZDTNXXK.mjs +2 -0
  297. package/lib/web/chunks/chunk-FDOZ6YSS.mjs +2 -0
  298. package/lib/web/chunks/chunk-FMEWNGQO.mjs +2 -0
  299. package/lib/web/chunks/chunk-G4DH7GMT.mjs +2 -0
  300. package/lib/web/chunks/chunk-GBUZCZE4.mjs +2 -0
  301. package/lib/web/chunks/chunk-GF5C5DVX.mjs +2 -0
  302. package/lib/web/chunks/chunk-GLMS5ZLJ.mjs +445 -0
  303. package/lib/web/chunks/chunk-GNGMIA7V.mjs +2 -0
  304. package/lib/web/chunks/chunk-GTYIS7H7.mjs +15 -0
  305. package/lib/web/chunks/chunk-HJ36IONA.mjs +15 -0
  306. package/lib/web/chunks/chunk-HXPTZMAZ.mjs +2 -0
  307. package/lib/web/chunks/chunk-I27M4JCS.mjs +2 -0
  308. package/lib/web/chunks/chunk-IVCT27JB.mjs +2 -0
  309. package/lib/web/chunks/chunk-JG4QSK5B.mjs +2 -0
  310. package/lib/web/chunks/chunk-JR7BJW6B.mjs +389 -0
  311. package/lib/web/chunks/chunk-K46ZJUXJ.mjs +90 -0
  312. package/lib/web/chunks/chunk-K4LXMO4D.mjs +2 -0
  313. package/lib/web/chunks/chunk-K7CGIEFU.mjs +2 -0
  314. package/lib/web/chunks/chunk-KBTYK5YE.mjs +662 -0
  315. package/lib/web/chunks/chunk-KHP6CSSM.mjs +2 -0
  316. package/lib/web/chunks/chunk-KRDRIW7T.mjs +14 -0
  317. package/lib/web/chunks/chunk-L2DTKDER.mjs +2 -0
  318. package/lib/web/chunks/chunk-LFDFDGHY.mjs +655 -0
  319. package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +2 -0
  320. package/lib/web/chunks/chunk-MAIUUK4E.mjs +2 -0
  321. package/lib/web/chunks/chunk-MKJKS3IG.mjs +275 -0
  322. package/lib/web/chunks/chunk-MRQKVLXG.mjs +2 -0
  323. package/lib/web/chunks/chunk-NK3OISOL.mjs +14 -0
  324. package/lib/web/chunks/chunk-NLJDDIXW.mjs +2 -0
  325. package/lib/web/chunks/chunk-OENR3XFI.mjs +11 -0
  326. package/lib/web/chunks/chunk-OZB3VKZE.mjs +2 -0
  327. package/lib/web/chunks/chunk-P64PFJT3.mjs +17618 -0
  328. package/lib/web/chunks/chunk-PACPGYH7.mjs +2 -0
  329. package/lib/web/chunks/chunk-PART6HOE.mjs +14 -0
  330. package/lib/web/chunks/chunk-PMRXUQRH.mjs +2 -0
  331. package/lib/web/chunks/chunk-PTK5FO6C.mjs +2 -0
  332. package/lib/web/chunks/chunk-PZ45TQ55.mjs +14 -0
  333. package/lib/web/chunks/chunk-Q5LN7GET.mjs +17624 -0
  334. package/lib/web/chunks/chunk-QCD6T6L4.mjs +297 -0
  335. package/lib/web/chunks/chunk-QD5EUANU.mjs +2 -0
  336. package/lib/web/chunks/chunk-QJTECJCO.mjs +2 -0
  337. package/lib/web/chunks/chunk-QPIZURPZ.mjs +2 -0
  338. package/lib/web/chunks/chunk-QPY45R5F.mjs +274 -0
  339. package/lib/web/chunks/chunk-R2SGZIG5.mjs +2 -0
  340. package/lib/web/chunks/chunk-S3GYQYVJ.mjs +16 -0
  341. package/lib/web/chunks/chunk-SCCXVTDM.mjs +2 -0
  342. package/lib/web/chunks/chunk-SHJHD646.mjs +2 -0
  343. package/lib/web/chunks/chunk-TCRVZ55E.mjs +2 -0
  344. package/lib/web/chunks/chunk-TJ6ZVV2L.mjs +15 -0
  345. package/lib/web/chunks/chunk-TPSY4RC3.mjs +14 -0
  346. package/lib/web/chunks/chunk-U5KNX5O6.mjs +17624 -0
  347. package/lib/web/chunks/chunk-UCKELQSM.mjs +2 -0
  348. package/lib/web/chunks/chunk-UGGCYHRH.mjs +15 -0
  349. package/lib/web/chunks/chunk-UNYQJZET.mjs +16 -0
  350. package/lib/web/chunks/chunk-VE72SWLV.mjs +15 -0
  351. package/lib/web/chunks/chunk-VKONO6MI.mjs +2 -0
  352. package/lib/web/chunks/chunk-W4BGMPJO.mjs +2 -0
  353. package/lib/web/chunks/chunk-WHNEEKLR.mjs +2 -0
  354. package/lib/web/chunks/chunk-WLGUP3KY.mjs +16 -0
  355. package/lib/web/chunks/chunk-WY7D4WBZ.mjs +2 -0
  356. package/lib/web/chunks/chunk-XRNB2MHO.mjs +107 -0
  357. package/lib/web/chunks/chunk-XXTIAXQY.mjs +2 -0
  358. package/lib/web/chunks/chunk-XYUAUO57.mjs +2 -0
  359. package/lib/web/chunks/chunk-YG6DIKQD.mjs +2 -0
  360. package/lib/web/chunks/chunk-YIZFMU66.mjs +2 -0
  361. package/lib/web/chunks/chunk-YOGAPOGC.mjs +2 -0
  362. package/lib/web/chunks/chunk-Z7373DS5.mjs +2 -0
  363. package/lib/web/chunks/chunk-Z76GRN66.mjs +17627 -0
  364. package/lib/web/chunks/persistentStorage.web-4FBAOYJ4.mjs +12 -0
  365. package/lib/web/chunks/persistentStorage.web-7W3Y6Q24.mjs +12 -0
  366. package/lib/web/chunks/persistentStorage.web-GOWNFMVT.mjs +2 -0
  367. package/lib/web/chunks/persistentStorage.web-RF47FXIK.mjs +12 -0
  368. package/lib/web/colors.mjs +2 -0
  369. package/lib/web/dataViewer.mjs +3 -0
  370. package/lib/web/floating.mjs +2 -0
  371. package/lib/web/history.mjs +2 -0
  372. package/lib/web/hooks.mjs +2 -0
  373. package/lib/web/index.mjs +15 -0
  374. package/lib/web/native.mjs +2 -0
  375. package/lib/web/ui.mjs +2 -0
  376. package/lib/web/utils.mjs +2 -0
  377. package/package.json +118 -36
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+
3
+ const listeners = new Set();
4
+ let detach;
5
+ export function getBrowserStorage(area = 'localStorage') {
6
+ if (typeof window === 'undefined') throw new Error('Browser storage is unavailable during server rendering.');
7
+ return window[area];
8
+ }
9
+ function entries(storage) {
10
+ return Array.from({
11
+ length: storage.length
12
+ }, (_, index) => storage.key(index)).filter(key => key !== null).map(key => [key, storage.getItem(key)]);
13
+ }
14
+ function emit(change) {
15
+ for (const listener of [...listeners]) {
16
+ try {
17
+ listener(change);
18
+ } catch {/* Observers cannot change storage behavior. */}
19
+ }
20
+ }
21
+ function attach() {
22
+ if (typeof window === 'undefined' || typeof Storage === 'undefined') return;
23
+ const proto = Storage.prototype;
24
+ const set = proto.setItem;
25
+ const remove = proto.removeItem;
26
+ const clear = proto.clear;
27
+ const areaOf = storage => {
28
+ for (const area of ['localStorage', 'sessionStorage']) {
29
+ try {
30
+ if (storage === window[area]) return area;
31
+ } catch {/* Storage may be blocked. */}
32
+ }
33
+ return undefined;
34
+ };
35
+ const wrappedSet = function (key, value) {
36
+ const area = areaOf(this);
37
+ const name = String(key);
38
+ const text = String(value);
39
+ const prevValue = area ? this.getItem(name) : null;
40
+ Reflect.apply(set, this, [name, text]);
41
+ if (area) emit({
42
+ area,
43
+ action: 'setItem',
44
+ key: name,
45
+ value: text,
46
+ prevValue
47
+ });
48
+ };
49
+ const wrappedRemove = function (key) {
50
+ const area = areaOf(this);
51
+ const name = String(key);
52
+ const prevValue = area ? this.getItem(name) : null;
53
+ Reflect.apply(remove, this, [name]);
54
+ if (area) emit({
55
+ area,
56
+ action: 'removeItem',
57
+ key: name,
58
+ prevValue
59
+ });
60
+ };
61
+ const wrappedClear = function () {
62
+ const area = areaOf(this);
63
+ const prevPairs = area ? entries(this) : undefined;
64
+ Reflect.apply(clear, this, []);
65
+ if (area) emit({
66
+ area,
67
+ action: 'clear',
68
+ prevPairs
69
+ });
70
+ };
71
+ proto.setItem = wrappedSet;
72
+ proto.removeItem = wrappedRemove;
73
+ proto.clear = wrappedClear;
74
+ const crossDocument = event => {
75
+ const area = event.storageArea && areaOf(event.storageArea);
76
+ if (area) emit({
77
+ area,
78
+ action: event.key === null ? 'clear' : event.newValue === null ? 'removeItem' : 'setItem',
79
+ key: event.key ?? undefined,
80
+ value: event.newValue ?? undefined,
81
+ prevValue: event.oldValue
82
+ });
83
+ };
84
+ window.addEventListener('storage', crossDocument);
85
+ detach = () => {
86
+ if (proto.setItem === wrappedSet) proto.setItem = set;
87
+ if (proto.removeItem === wrappedRemove) proto.removeItem = remove;
88
+ if (proto.clear === wrappedClear) proto.clear = clear;
89
+ window.removeEventListener('storage', crossDocument);
90
+ detach = undefined;
91
+ };
92
+ }
93
+ export function subscribeToBrowserStorage(listener) {
94
+ if (!listeners.size) attach();
95
+ listeners.add(listener);
96
+ return () => {
97
+ listeners.delete(listener);
98
+ if (!listeners.size) detach?.();
99
+ };
100
+ }
101
+ function merge(previous, next) {
102
+ if (!previous || !next || typeof previous !== 'object' || typeof next !== 'object' || Array.isArray(previous) || Array.isArray(next)) return next;
103
+ const result = {
104
+ ...previous
105
+ };
106
+ for (const [key, value] of Object.entries(next)) {
107
+ Object.defineProperty(result, key, {
108
+ value: merge(result[key], value),
109
+ enumerable: true,
110
+ writable: true,
111
+ configurable: true
112
+ });
113
+ }
114
+ return result;
115
+ }
116
+
117
+ // The shared storage editor and snapshot providers use this asynchronous contract.
118
+ const browserAsyncStorage = {
119
+ async getItem(key) {
120
+ return getBrowserStorage().getItem(key);
121
+ },
122
+ async setItem(key, value) {
123
+ getBrowserStorage().setItem(key, value);
124
+ },
125
+ async removeItem(key) {
126
+ getBrowserStorage().removeItem(key);
127
+ },
128
+ async clear() {
129
+ getBrowserStorage().clear();
130
+ },
131
+ async getAllKeys() {
132
+ return entries(getBrowserStorage()).map(([key]) => key);
133
+ },
134
+ async multiGet(keys) {
135
+ return keys.map(key => [key, getBrowserStorage().getItem(key)]);
136
+ },
137
+ async multiSet(pairs) {
138
+ for (const [key, value] of pairs) getBrowserStorage().setItem(key, value);
139
+ },
140
+ async multiRemove(keys) {
141
+ for (const key of keys) getBrowserStorage().removeItem(key);
142
+ },
143
+ async mergeItem(key, value) {
144
+ const storage = getBrowserStorage();
145
+ storage.setItem(key, JSON.stringify(merge(JSON.parse(storage.getItem(key) ?? 'null'), JSON.parse(value))));
146
+ },
147
+ async multiMerge(pairs) {
148
+ for (const [key, value] of pairs) await browserAsyncStorage.mergeItem(key, value);
149
+ }
150
+ };
151
+ export default browserAsyncStorage;
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+
3
+ let adapter;
4
+ const listeners = new Set();
5
+ let detach;
6
+ export function registerBrowserRouter(router) {
7
+ adapter = router;
8
+ return () => {
9
+ if (adapter === router) adapter = undefined;
10
+ };
11
+ }
12
+ export function getBrowserHref() {
13
+ return typeof location === 'undefined' ? '/' : location.href;
14
+ }
15
+ export function getBrowserRouteURL(href = getBrowserHref()) {
16
+ const url = new URL(href, 'http://localhost');
17
+ return url.hash.startsWith('#/') ? new URL(url.hash.slice(1), url.origin) : url;
18
+ }
19
+ export function subscribeBrowserNavigation(listener) {
20
+ if (!listeners.size && typeof window !== 'undefined') {
21
+ const history = window.history;
22
+ const push = history.pushState;
23
+ const replace = history.replaceState;
24
+ const emit = kind => {
25
+ for (const callback of [...listeners]) {
26
+ try {
27
+ callback({
28
+ href: getBrowserHref(),
29
+ kind
30
+ });
31
+ } catch {/* Keep host navigation intact. */}
32
+ }
33
+ };
34
+ const wrappedPush = function (...args) {
35
+ const result = Reflect.apply(push, this, args);
36
+ emit('push');
37
+ return result;
38
+ };
39
+ const wrappedReplace = function (...args) {
40
+ const result = Reflect.apply(replace, this, args);
41
+ emit('replace');
42
+ return result;
43
+ };
44
+ history.pushState = wrappedPush;
45
+ history.replaceState = wrappedReplace;
46
+ const pop = () => emit('pop');
47
+ window.addEventListener('popstate', pop);
48
+ window.addEventListener('hashchange', pop);
49
+ detach = () => {
50
+ if (history.pushState === wrappedPush) history.pushState = push;
51
+ if (history.replaceState === wrappedReplace) history.replaceState = replace;
52
+ window.removeEventListener('popstate', pop);
53
+ window.removeEventListener('hashchange', pop);
54
+ detach = undefined;
55
+ };
56
+ }
57
+ listeners.add(listener);
58
+ return () => {
59
+ listeners.delete(listener);
60
+ if (!listeners.size) detach?.();
61
+ };
62
+ }
63
+ function pathFor(path) {
64
+ const target = typeof path === 'string' ? path : path.pathname;
65
+ const url = new URL(target, getBrowserHref());
66
+ if (url.origin !== window.location.origin) throw new Error('Tool navigation must stay on the current origin.');
67
+ if (typeof path !== 'string') for (const [key, value] of Object.entries(path.params ?? {})) url.searchParams.set(key, String(value));
68
+ return `${url.pathname}${url.search}${url.hash}`;
69
+ }
70
+ export const browserRouter = {
71
+ push(path) {
72
+ const target = pathFor(path);
73
+ if (adapter) return adapter.push(target);
74
+ window.history.pushState(null, '', window.location.hash.startsWith('#/') ? `#${target}` : target);
75
+ window.dispatchEvent(new PopStateEvent('popstate', {
76
+ state: window.history.state
77
+ }));
78
+ },
79
+ replace(path) {
80
+ const target = pathFor(path);
81
+ if (adapter) return adapter.replace(target);
82
+ window.history.replaceState(window.history.state, '', window.location.hash.startsWith('#/') ? `#${target}` : target);
83
+ window.dispatchEvent(new PopStateEvent('popstate', {
84
+ state: window.history.state
85
+ }));
86
+ },
87
+ back() {
88
+ if (adapter) adapter.back();else window.history.back();
89
+ },
90
+ canGoBack() {
91
+ return adapter?.canGoBack?.() ?? (typeof window !== 'undefined' && window.history.length > 1);
92
+ },
93
+ navigate(path) {
94
+ browserRouter.push(path);
95
+ },
96
+ setParams(params) {
97
+ browserRouter.replace({
98
+ pathname: getBrowserHref(),
99
+ params
100
+ });
101
+ },
102
+ dismiss(count = 1) {
103
+ window.history.go(-count);
104
+ },
105
+ dismissAll() {
106
+ throw new Error('Use the captured browser history to select a destination.');
107
+ }
108
+ };
@@ -23,11 +23,15 @@ const ORIGIN_RE = /^(https?:\/\/[^/]+)/;
23
23
  /** Bundle URL this JS realm was loaded from, or null off React Native. */
24
24
  function scriptURL() {
25
25
  try {
26
- // Requires stay lexically inside try{} so Metro treats them as optional —
27
- // react-native-web has neither path and falls through to null.
28
- const NativeSourceCode =
26
+ // The public route to the SourceCode TurboModule that
27
+ // react-native/Libraries/NativeModules/specs/NativeSourceCode wraps. Deep
28
+ // imports warn on RN 0.80+; react-native-web has no registry and falls
29
+ // through to null.
29
30
  // eslint-disable-next-line @typescript-eslint/no-var-requires
30
- require("react-native/Libraries/NativeModules/specs/NativeSourceCode").default;
31
+ const {
32
+ TurboModuleRegistry
33
+ } = require("react-native");
34
+ const NativeSourceCode = TurboModuleRegistry?.get?.("SourceCode");
31
35
  const url = NativeSourceCode?.getConstants?.().scriptURL;
32
36
  if (url) return url;
33
37
  } catch {
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ // A browser origin does not imply the presence of Metro's reload socket.
4
+ export function getDevServerOrigin() {
5
+ return null;
6
+ }
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+
3
+ const handles = new WeakMap();
4
+ let nextHandle = 1;
5
+ export function isDOMElement(value) {
6
+ return !!value && typeof value === 'object' && value.nodeType === 1 && typeof value.getBoundingClientRect === 'function';
7
+ }
8
+ export function getDOMNodeHandle(value) {
9
+ if (!isDOMElement(value)) return null;
10
+ let handle = handles.get(value);
11
+ if (handle === undefined) {
12
+ handle = nextHandle++;
13
+ handles.set(value, handle);
14
+ }
15
+ return handle;
16
+ }
17
+ export function getDOMFiber(value) {
18
+ if (!isDOMElement(value)) return null;
19
+ const key = Object.keys(value).find(name => name.startsWith('__reactFiber$'));
20
+ return key ? value[key] : null;
21
+ }
22
+
23
+ /** Map DOM controls onto the shared screen automation contract. */
24
+ export function getDOMControlProps(value, props) {
25
+ if (!isDOMElement(value) || !props) return props;
26
+ const input = value;
27
+ const tag = value.tagName.toLowerCase();
28
+ const toggle = tag === 'input' && (input.type === 'checkbox' || input.type === 'radio');
29
+ const range = tag === 'input' && input.type === 'range';
30
+ const text = tag === 'textarea' || tag === 'select' || tag === 'input' && !toggle && !range && !['button', 'submit', 'reset', 'file', 'hidden'].includes(input.type);
31
+ const setValue = next => {
32
+ if (toggle) {
33
+ if (input.checked !== Boolean(next)) input.click();
34
+ return;
35
+ }
36
+ const setter = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(input), 'value')?.set;
37
+ if (setter) setter.call(input, String(next));else input.value = String(next);
38
+ input.dispatchEvent(new Event('input', {
39
+ bubbles: true
40
+ }));
41
+ input.dispatchEvent(new Event('change', {
42
+ bubbles: true
43
+ }));
44
+ };
45
+ return {
46
+ ...props,
47
+ __buoyDevToolsRoot: props.__buoyDevToolsRoot || props['data-buoy-root'] !== undefined,
48
+ testID: props.testID ?? props['data-testid'],
49
+ nativeID: props.nativeID ?? props.id,
50
+ accessibilityLabel: props.accessibilityLabel ?? props['aria-label'],
51
+ accessibilityRole: props.accessibilityRole ?? props.role ?? (tag === 'button' ? 'button' : tag === 'a' ? 'link' : toggle ? input.type : text ? 'textbox' : range ? 'slider' : undefined),
52
+ onPress: props.onPress ?? (typeof props.onClick === 'function' || tag === 'button' || tag === 'a' ? () => input.click() : undefined),
53
+ ...(toggle || range ? {
54
+ onValueChange: setValue,
55
+ value: toggle ? input.checked : Number(input.value),
56
+ ...(range ? {
57
+ minimumValue: Number(input.min || 0),
58
+ maximumValue: Number(input.max || 100)
59
+ } : {})
60
+ } : {}),
61
+ ...(text ? {
62
+ onChangeText: setValue,
63
+ value: input.value
64
+ } : {})
65
+ };
66
+ }
67
+ export function getDOMPublicInstance(value) {
68
+ if (!isDOMElement(value)) return null;
69
+ return {
70
+ __nativeTag: getDOMNodeHandle(value),
71
+ measure(callback) {
72
+ const rect = value.getBoundingClientRect();
73
+ callback(rect.x, rect.y, rect.width, rect.height, rect.x, rect.y);
74
+ },
75
+ measureInWindow(callback) {
76
+ const rect = value.getBoundingClientRect();
77
+ callback(rect.x, rect.y, rect.width, rect.height);
78
+ },
79
+ requestTVFocus() {
80
+ value.focus();
81
+ },
82
+ focus() {
83
+ value.focus();
84
+ }
85
+ };
86
+ }
87
+ const eventNames = {
88
+ topFocus: 'focus',
89
+ topBlur: 'blur',
90
+ topTouchStart: 'pointerdown',
91
+ topTouchMove: 'pointermove',
92
+ topTouchEnd: 'pointerup',
93
+ topTouchCancel: 'pointercancel',
94
+ topChange: 'input',
95
+ topValueChange: 'input',
96
+ topSlidingComplete: 'change'
97
+ };
98
+ export function resolveDOMEventEmitter() {
99
+ if (typeof document === 'undefined') return {
100
+ emitter: null,
101
+ reason: 'DOM events are unavailable during server rendering.'
102
+ };
103
+ return {
104
+ reason: null,
105
+ emitter: {
106
+ addListener(name, listener) {
107
+ const type = eventNames[name];
108
+ if (!type) throw new Error(`Unsupported DOM event: ${name}`);
109
+ const callback = event => {
110
+ const element = event.composedPath()[0] ?? event.target;
111
+ if (!isDOMElement(element)) return;
112
+ const input = element;
113
+ const pointer = event;
114
+ const nativeEvent = {
115
+ target: getDOMNodeHandle(element),
116
+ pageX: pointer.clientX,
117
+ pageY: pointer.clientY
118
+ };
119
+ if (type === 'input' || type === 'change') {
120
+ if (input.type === 'checkbox' || input.type === 'radio') nativeEvent.value = input.checked;else if (input.type === 'range') nativeEvent.value = Number(input.value);else nativeEvent.text = input.value ?? element.textContent ?? '';
121
+ }
122
+ listener({
123
+ eventName: name,
124
+ nativeEvent
125
+ });
126
+ };
127
+ document.addEventListener(type, callback, true);
128
+ return {
129
+ remove: () => document.removeEventListener(type, callback, true)
130
+ };
131
+ }
132
+ }
133
+ };
134
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ import { NativeModules } from "react-native";
4
+ function hasExpoNativeRuntime() {
5
+ // Modern Expo (SDK 50+, both Old and New Architecture): expo-modules-core
6
+ // installs a global `expo` object — the Expo Modules API runtime — via JSI
7
+ // when the native runtime is actually present. This is the most reliable
8
+ // signal and, crucially, the ONLY one of these checks that fires on SDK 54+ /
9
+ // New Architecture dev builds, where the legacy NativeModules entries below
10
+ // are no longer registered (ExpoLinking is gone, NativeUnimoduleProxy isn't
11
+ // on the bridge). It stays absent on bare RN CLI, so there's no false
12
+ // positive there. Without this, navigation-dependent tools (route sitemap,
13
+ // remote navigate, perf-monitor automation) silently no-op on modern builds.
14
+ const expoGlobal = globalThis.expo;
15
+ if (expoGlobal != null && (expoGlobal.modules != null || expoGlobal.EventEmitter != null || expoGlobal.NativeModule != null)) {
16
+ return true;
17
+ }
18
+
19
+ // Check legacy NativeModules bridge (Expo SDK < 54)
20
+ if (NativeModules.ExpoLinking) {
21
+ return true;
22
+ }
23
+
24
+ // Check for Expo Modules Core native bridge (older SDKs / Old Architecture)
25
+ if (NativeModules.NativeUnimoduleProxy || NativeModules.ExpoModulesCore) {
26
+ return true;
27
+ }
28
+
29
+ // Check for Expo Go app
30
+ if (NativeModules.ExpoGoModule || NativeModules.ExpoUpdates) {
31
+ return true;
32
+ }
33
+
34
+ // No Expo native runtime detected (e.g. bare RN CLI).
35
+ // NOTE: We intentionally do NOT try require("expo-modules-core") here because
36
+ // on RN CLI it may be bundled as a transitive dep but the native modules
37
+ // (requireOptionalNativeModule etc.) are undefined, causing crashes.
38
+ return false;
39
+ }
40
+ export function loadExpoRouter() {
41
+ if (!hasExpoNativeRuntime()) return null;
42
+ return require("expo-router");
43
+ }
44
+ export function loadExpoRouterStore() {
45
+ return require("expo-router/build/global-state/router-store")?.store ?? null;
46
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ // Automatic Expo Router discovery is not supported by the browser entry.
4
+ export function loadExpoRouter() {
5
+ return null;
6
+ }
7
+ export function loadExpoRouterStore() {
8
+ return null;
9
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ export function getSafeAreaInsets() {
4
+ const empty = {
5
+ top: 0,
6
+ bottom: 0,
7
+ left: 0,
8
+ right: 0,
9
+ hasNotch: false
10
+ };
11
+ if (typeof document === "undefined" || !document.body) return empty;
12
+ const probe = document.createElement("div");
13
+ probe.style.cssText = "position:fixed;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)";
14
+ document.body.appendChild(probe);
15
+ try {
16
+ const style = getComputedStyle(probe);
17
+ const top = parseFloat(style.paddingTop) || 0;
18
+ const bottom = parseFloat(style.paddingBottom) || 0;
19
+ const left = parseFloat(style.paddingLeft) || 0;
20
+ const right = parseFloat(style.paddingRight) || 0;
21
+ return {
22
+ top,
23
+ bottom,
24
+ left,
25
+ right,
26
+ hasNotch: top > 0 || bottom > 0 || left > 0 || right > 0
27
+ };
28
+ } finally {
29
+ probe.remove();
30
+ }
31
+ }
@@ -2,8 +2,8 @@
2
2
 
3
3
  export { absoluteFill } from "./absoluteFill.js";
4
4
  export { displayValue, parseDisplayValue } from "./displayValue.js";
5
- export { getSafeAreaInsets } from "./getSafeAreaInsets.js";
6
- export { persistentStorage, isUsingPersistentStorage, getStorageBackendType } from "./persistentStorage.js";
5
+ export { getSafeAreaInsets } from "./getSafeAreaInsets";
6
+ export { persistentStorage, isUsingPersistentStorage, getStorageBackendType } from "./persistentStorage";
7
7
  export { safeStringify } from "./safeStringify.js";
8
8
  export { getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstructorName, isEmpty, getValueSize } from "./typeHelpers.js";
9
9
  export { parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath } from "./valueFormatting.js";
@@ -12,7 +12,12 @@ export { setRenderCaptureProvider, getRenderCaptureProvider } from "./renderCapt
12
12
  export { registerStateSnapshotProvider, getStateSnapshotProviders, getStateSnapshotProvider, subscribeToStateSnapshotProviders } from "./stateSnapshotRegistry.js";
13
13
  export { serialize as superJsonSerialize, deserialize as superJsonDeserialize } from "./minimalSuperJSON.js";
14
14
  export { reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS } from "./reloadApp.js";
15
- export { getDevServerOrigin } from "./devServer.js";
15
+ export { getDevServerOrigin } from "./devServer";
16
16
  export { Subscribable } from "./subscribable.js";
17
17
  export { subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange } from "./subscriberCountNotifier.js";
18
- export { useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, getSafeCurrentRoute, isExpoRouterAvailable } from "./safeExpoRouter.js";
18
+ export { useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, getSafeCurrentRoute, isExpoRouterAvailable } from "./safeExpoRouter";
19
+ export { getBrowserStorage, subscribeToBrowserStorage } from "./browserAsyncStorage.js";
20
+ export { browserRouter, getBrowserHref, getBrowserRouteURL, registerBrowserRouter, subscribeBrowserNavigation } from "./browserNavigation.js";
21
+ export { isDOMElement, getDOMControlProps, getDOMFiber, getDOMNodeHandle, getDOMPublicInstance, resolveDOMEventEmitter } from "./domRuntime.js";
22
+ export { registerToolModules, getRegisteredToolModule, getToolModuleVersion } from "./toolModules.js";
23
+ export { loadToolModule } from "./loadToolModule";
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ import { getRegisteredToolModule } from "./toolModules.js";
4
+ export function loadToolModule(name) {
5
+ const registered = getRegisteredToolModule(name);
6
+ if (registered) return registered;
7
+ // Metro only treats a require() inside try/catch as optional, so this
8
+ // rethrowing wrapper keeps an uninstalled tool from failing the bundle.
9
+ // eslint-disable-next-line no-useless-catch
10
+ try {
11
+ switch (name) {
12
+ case '@buoy-gg/license':
13
+ return require('@buoy-gg/license');
14
+ case '@buoy-gg/storage':
15
+ return require('@buoy-gg/storage');
16
+ case '@buoy-gg/network':
17
+ return require('@buoy-gg/network');
18
+ case '@buoy-gg/redux':
19
+ return require('@buoy-gg/redux');
20
+ case '@buoy-gg/zustand':
21
+ return require('@buoy-gg/zustand');
22
+ case '@buoy-gg/jotai':
23
+ return require('@buoy-gg/jotai');
24
+ case '@buoy-gg/react-query':
25
+ return require('@buoy-gg/react-query');
26
+ case '@buoy-gg/route-events':
27
+ return require('@buoy-gg/route-events');
28
+ case '@buoy-gg/highlight-updates':
29
+ return require('@buoy-gg/highlight-updates');
30
+ case '@buoy-gg/core':
31
+ return require('@buoy-gg/core');
32
+ case '@buoy-gg/shared-ui':
33
+ return require('../index');
34
+ case '@buoy-gg/shared-ui/dataViewer':
35
+ return require('../dataViewer');
36
+ default:
37
+ throw new Error(`Unknown tool module: ${name}`);
38
+ }
39
+ } catch (error) {
40
+ throw error;
41
+ }
42
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ import { getRegisteredToolModule } from "./toolModules.js";
4
+ export function loadToolModule(name) {
5
+ const module = getRegisteredToolModule(name);
6
+ if (!module) throw new Error(`Register ${name} with createWebTools before opening tools that use it.`);
7
+ return module;
8
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ import { persistentStorage } from "./persistentStorage";
4
+ /** Shared modal persistence, including state saved before a tool unmounts. */
5
+ export class ModalStorage {
6
+ static cache = new Map();
7
+ static async save(key, value) {
8
+ this.cache.set(key, value);
9
+ try {
10
+ await persistentStorage.setItem(key, JSON.stringify(value));
11
+ } catch {/* The cached value remains available for this session. */}
12
+ }
13
+ static async load(key) {
14
+ if (this.cache.has(key)) return this.cache.get(key);
15
+ try {
16
+ const stored = await persistentStorage.getItem(key);
17
+ if (stored) {
18
+ const value = JSON.parse(stored);
19
+ this.cache.set(key, value);
20
+ return value;
21
+ }
22
+ } catch {/* Use the modal's defaults if the saved state is unavailable. */}
23
+ return null;
24
+ }
25
+ static saveMinimized(key, state) {
26
+ return this.save(key, {
27
+ mode: state.mode,
28
+ panelHeight: state.panelHeight,
29
+ dimensions: state.floatingDimensions && state.floatingPosition ? {
30
+ ...state.floatingDimensions,
31
+ top: state.floatingPosition.y,
32
+ left: state.floatingPosition.x
33
+ } : undefined,
34
+ isVisible: false
35
+ });
36
+ }
37
+ }