@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,454 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ View: true,
8
+ Text: true,
9
+ TextInput: true,
10
+ TouchableOpacity: true,
11
+ TouchableHighlight: true,
12
+ TouchableWithoutFeedback: true,
13
+ Pressable: true,
14
+ ScrollView: true,
15
+ Modal: true,
16
+ Switch: true,
17
+ ActivityIndicator: true,
18
+ Button: true,
19
+ findNodeHandle: true,
20
+ Alert: true,
21
+ unstable_createElement: true,
22
+ NativeModules: true,
23
+ AccessibilityInfo: true,
24
+ Animated: true,
25
+ Appearance: true,
26
+ AppRegistry: true,
27
+ AppState: true,
28
+ BackHandler: true,
29
+ Clipboard: true,
30
+ Dimensions: true,
31
+ Easing: true,
32
+ I18nManager: true,
33
+ Keyboard: true,
34
+ InteractionManager: true,
35
+ LayoutAnimation: true,
36
+ Linking: true,
37
+ NativeEventEmitter: true,
38
+ PanResponder: true,
39
+ PixelRatio: true,
40
+ Platform: true,
41
+ Share: true,
42
+ StyleSheet: true,
43
+ UIManager: true,
44
+ Vibration: true,
45
+ CheckBox: true,
46
+ FlatList: true,
47
+ Image: true,
48
+ ImageBackground: true,
49
+ KeyboardAvoidingView: true,
50
+ Picker: true,
51
+ ProgressBar: true,
52
+ RefreshControl: true,
53
+ SafeAreaView: true,
54
+ SectionList: true,
55
+ StatusBar: true,
56
+ Touchable: true,
57
+ TouchableNativeFeedback: true,
58
+ VirtualizedList: true,
59
+ YellowBox: true,
60
+ LogBox: true,
61
+ DeviceEventEmitter: true,
62
+ useColorScheme: true,
63
+ useLocaleContext: true,
64
+ useWindowDimensions: true
65
+ };
66
+ Object.defineProperty(exports, "AccessibilityInfo", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return nativeWeb.AccessibilityInfo;
70
+ }
71
+ });
72
+ exports.Alert = exports.ActivityIndicator = void 0;
73
+ Object.defineProperty(exports, "Animated", {
74
+ enumerable: true,
75
+ get: function () {
76
+ return nativeWeb.Animated;
77
+ }
78
+ });
79
+ Object.defineProperty(exports, "AppRegistry", {
80
+ enumerable: true,
81
+ get: function () {
82
+ return nativeWeb.AppRegistry;
83
+ }
84
+ });
85
+ Object.defineProperty(exports, "AppState", {
86
+ enumerable: true,
87
+ get: function () {
88
+ return nativeWeb.AppState;
89
+ }
90
+ });
91
+ Object.defineProperty(exports, "Appearance", {
92
+ enumerable: true,
93
+ get: function () {
94
+ return nativeWeb.Appearance;
95
+ }
96
+ });
97
+ Object.defineProperty(exports, "BackHandler", {
98
+ enumerable: true,
99
+ get: function () {
100
+ return nativeWeb.BackHandler;
101
+ }
102
+ });
103
+ exports.Button = void 0;
104
+ Object.defineProperty(exports, "CheckBox", {
105
+ enumerable: true,
106
+ get: function () {
107
+ return nativeWeb.CheckBox;
108
+ }
109
+ });
110
+ Object.defineProperty(exports, "Clipboard", {
111
+ enumerable: true,
112
+ get: function () {
113
+ return nativeWeb.Clipboard;
114
+ }
115
+ });
116
+ Object.defineProperty(exports, "DeviceEventEmitter", {
117
+ enumerable: true,
118
+ get: function () {
119
+ return nativeWeb.DeviceEventEmitter;
120
+ }
121
+ });
122
+ Object.defineProperty(exports, "Dimensions", {
123
+ enumerable: true,
124
+ get: function () {
125
+ return nativeWeb.Dimensions;
126
+ }
127
+ });
128
+ Object.defineProperty(exports, "Easing", {
129
+ enumerable: true,
130
+ get: function () {
131
+ return nativeWeb.Easing;
132
+ }
133
+ });
134
+ Object.defineProperty(exports, "FlatList", {
135
+ enumerable: true,
136
+ get: function () {
137
+ return nativeWeb.FlatList;
138
+ }
139
+ });
140
+ Object.defineProperty(exports, "I18nManager", {
141
+ enumerable: true,
142
+ get: function () {
143
+ return nativeWeb.I18nManager;
144
+ }
145
+ });
146
+ Object.defineProperty(exports, "Image", {
147
+ enumerable: true,
148
+ get: function () {
149
+ return nativeWeb.Image;
150
+ }
151
+ });
152
+ Object.defineProperty(exports, "ImageBackground", {
153
+ enumerable: true,
154
+ get: function () {
155
+ return nativeWeb.ImageBackground;
156
+ }
157
+ });
158
+ Object.defineProperty(exports, "InteractionManager", {
159
+ enumerable: true,
160
+ get: function () {
161
+ return nativeWeb.InteractionManager;
162
+ }
163
+ });
164
+ Object.defineProperty(exports, "Keyboard", {
165
+ enumerable: true,
166
+ get: function () {
167
+ return nativeWeb.Keyboard;
168
+ }
169
+ });
170
+ Object.defineProperty(exports, "KeyboardAvoidingView", {
171
+ enumerable: true,
172
+ get: function () {
173
+ return nativeWeb.KeyboardAvoidingView;
174
+ }
175
+ });
176
+ Object.defineProperty(exports, "LayoutAnimation", {
177
+ enumerable: true,
178
+ get: function () {
179
+ return nativeWeb.LayoutAnimation;
180
+ }
181
+ });
182
+ Object.defineProperty(exports, "Linking", {
183
+ enumerable: true,
184
+ get: function () {
185
+ return nativeWeb.Linking;
186
+ }
187
+ });
188
+ Object.defineProperty(exports, "LogBox", {
189
+ enumerable: true,
190
+ get: function () {
191
+ return nativeWeb.LogBox;
192
+ }
193
+ });
194
+ exports.Modal = void 0;
195
+ Object.defineProperty(exports, "NativeEventEmitter", {
196
+ enumerable: true,
197
+ get: function () {
198
+ return nativeWeb.NativeEventEmitter;
199
+ }
200
+ });
201
+ Object.defineProperty(exports, "NativeModules", {
202
+ enumerable: true,
203
+ get: function () {
204
+ return nativeWeb.NativeModules;
205
+ }
206
+ });
207
+ Object.defineProperty(exports, "PanResponder", {
208
+ enumerable: true,
209
+ get: function () {
210
+ return nativeWeb.PanResponder;
211
+ }
212
+ });
213
+ Object.defineProperty(exports, "Picker", {
214
+ enumerable: true,
215
+ get: function () {
216
+ return nativeWeb.Picker;
217
+ }
218
+ });
219
+ Object.defineProperty(exports, "PixelRatio", {
220
+ enumerable: true,
221
+ get: function () {
222
+ return nativeWeb.PixelRatio;
223
+ }
224
+ });
225
+ Object.defineProperty(exports, "Platform", {
226
+ enumerable: true,
227
+ get: function () {
228
+ return nativeWeb.Platform;
229
+ }
230
+ });
231
+ exports.Pressable = void 0;
232
+ Object.defineProperty(exports, "ProgressBar", {
233
+ enumerable: true,
234
+ get: function () {
235
+ return nativeWeb.ProgressBar;
236
+ }
237
+ });
238
+ Object.defineProperty(exports, "RefreshControl", {
239
+ enumerable: true,
240
+ get: function () {
241
+ return nativeWeb.RefreshControl;
242
+ }
243
+ });
244
+ Object.defineProperty(exports, "SafeAreaView", {
245
+ enumerable: true,
246
+ get: function () {
247
+ return nativeWeb.SafeAreaView;
248
+ }
249
+ });
250
+ exports.ScrollView = void 0;
251
+ Object.defineProperty(exports, "SectionList", {
252
+ enumerable: true,
253
+ get: function () {
254
+ return nativeWeb.SectionList;
255
+ }
256
+ });
257
+ Object.defineProperty(exports, "Share", {
258
+ enumerable: true,
259
+ get: function () {
260
+ return nativeWeb.Share;
261
+ }
262
+ });
263
+ Object.defineProperty(exports, "StatusBar", {
264
+ enumerable: true,
265
+ get: function () {
266
+ return nativeWeb.StatusBar;
267
+ }
268
+ });
269
+ Object.defineProperty(exports, "StyleSheet", {
270
+ enumerable: true,
271
+ get: function () {
272
+ return nativeWeb.StyleSheet;
273
+ }
274
+ });
275
+ exports.TextInput = exports.Text = exports.Switch = void 0;
276
+ Object.defineProperty(exports, "Touchable", {
277
+ enumerable: true,
278
+ get: function () {
279
+ return nativeWeb.Touchable;
280
+ }
281
+ });
282
+ exports.TouchableHighlight = void 0;
283
+ Object.defineProperty(exports, "TouchableNativeFeedback", {
284
+ enumerable: true,
285
+ get: function () {
286
+ return nativeWeb.TouchableNativeFeedback;
287
+ }
288
+ });
289
+ exports.TouchableWithoutFeedback = exports.TouchableOpacity = void 0;
290
+ Object.defineProperty(exports, "UIManager", {
291
+ enumerable: true,
292
+ get: function () {
293
+ return nativeWeb.UIManager;
294
+ }
295
+ });
296
+ Object.defineProperty(exports, "Vibration", {
297
+ enumerable: true,
298
+ get: function () {
299
+ return nativeWeb.Vibration;
300
+ }
301
+ });
302
+ exports.View = void 0;
303
+ Object.defineProperty(exports, "VirtualizedList", {
304
+ enumerable: true,
305
+ get: function () {
306
+ return nativeWeb.VirtualizedList;
307
+ }
308
+ });
309
+ Object.defineProperty(exports, "YellowBox", {
310
+ enumerable: true,
311
+ get: function () {
312
+ return nativeWeb.YellowBox;
313
+ }
314
+ });
315
+ exports.findNodeHandle = void 0;
316
+ Object.defineProperty(exports, "unstable_createElement", {
317
+ enumerable: true,
318
+ get: function () {
319
+ return nativeWeb.unstable_createElement;
320
+ }
321
+ });
322
+ Object.defineProperty(exports, "useColorScheme", {
323
+ enumerable: true,
324
+ get: function () {
325
+ return nativeWeb.useColorScheme;
326
+ }
327
+ });
328
+ Object.defineProperty(exports, "useLocaleContext", {
329
+ enumerable: true,
330
+ get: function () {
331
+ return nativeWeb.useLocaleContext;
332
+ }
333
+ });
334
+ Object.defineProperty(exports, "useWindowDimensions", {
335
+ enumerable: true,
336
+ get: function () {
337
+ return nativeWeb.useWindowDimensions;
338
+ }
339
+ });
340
+ var nativeWeb = _interopRequireWildcard(require("react-native-web"));
341
+ Object.keys(nativeWeb).forEach(function (key) {
342
+ if (key === "default" || key === "__esModule") return;
343
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
344
+ if (key in exports && exports[key] === nativeWeb[key]) return;
345
+ Object.defineProperty(exports, key, {
346
+ enumerable: true,
347
+ get: function () {
348
+ return nativeWeb[key];
349
+ }
350
+ });
351
+ });
352
+ var _react = require("react");
353
+ 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); }
354
+ // Explicit exports also support the package's split ESM entry points.
355
+
356
+ // React Native groups these values; React Native Web expects individual ARIA props.
357
+ function withAccessibility(component) {
358
+ const wrapped = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
359
+ const {
360
+ accessibilityState,
361
+ accessibilityValue,
362
+ ...rest
363
+ } = props;
364
+ for (const key of ['busy', 'checked', 'disabled', 'expanded', 'selected']) {
365
+ if (accessibilityState?.[key] !== undefined && rest[`aria-${key}`] === undefined) {
366
+ rest[`aria-${key}`] = accessibilityState[key];
367
+ }
368
+ }
369
+ for (const [key, aria] of Object.entries({
370
+ min: 'valuemin',
371
+ max: 'valuemax',
372
+ now: 'valuenow',
373
+ text: 'valuetext'
374
+ })) {
375
+ if (accessibilityValue?.[key] !== undefined && rest[`aria-${aria}`] === undefined) {
376
+ rest[`aria-${aria}`] = accessibilityValue[key];
377
+ }
378
+ }
379
+ return /*#__PURE__*/(0, _react.createElement)(component, {
380
+ ...rest,
381
+ ref
382
+ });
383
+ });
384
+ const state = component.State;
385
+ if (state) Object.assign(wrapped, {
386
+ State: state
387
+ });
388
+ wrapped.displayName = component.displayName ?? component.name ?? 'NativeWebView';
389
+ return wrapped;
390
+ }
391
+ const View = exports.View = withAccessibility(nativeWeb.View);
392
+ const Text = exports.Text = withAccessibility(nativeWeb.Text);
393
+ const TextInput = exports.TextInput = withAccessibility(nativeWeb.TextInput);
394
+ const TouchableOpacity = exports.TouchableOpacity = withAccessibility(nativeWeb.TouchableOpacity);
395
+ const TouchableHighlight = exports.TouchableHighlight = withAccessibility(nativeWeb.TouchableHighlight);
396
+ const TouchableWithoutFeedback = exports.TouchableWithoutFeedback = withAccessibility(nativeWeb.TouchableWithoutFeedback);
397
+ const Pressable = exports.Pressable = withAccessibility(nativeWeb.Pressable);
398
+ const ScrollView = exports.ScrollView = withAccessibility(nativeWeb.ScrollView);
399
+ const Modal = exports.Modal = withAccessibility(nativeWeb.Modal);
400
+ const Switch = exports.Switch = withAccessibility(nativeWeb.Switch);
401
+ const ActivityIndicator = exports.ActivityIndicator = withAccessibility(nativeWeb.ActivityIndicator);
402
+ const Button = exports.Button = withAccessibility(nativeWeb.Button);
403
+
404
+ // RNW implements this API, but its community types omit it.
405
+ const findNodeHandle = exports.findNodeHandle = nativeWeb.findNodeHandle;
406
+ /** Browser confirmation dialogs for the shared React Native tool panels. */
407
+ const Alert = exports.Alert = {
408
+ alert(title, message, buttons, options) {
409
+ if (typeof document === 'undefined') return;
410
+ const dialog = document.createElement('dialog');
411
+ dialog.dataset.buoyRoot = '';
412
+ dialog.setAttribute('aria-label', title);
413
+ dialog.style.cssText = 'position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647';
414
+ const heading = document.createElement('h2');
415
+ heading.textContent = title;
416
+ heading.style.cssText = 'font-size:18px;margin:0 0 12px';
417
+ dialog.appendChild(heading);
418
+ if (message) {
419
+ const body = document.createElement('p');
420
+ body.textContent = message;
421
+ body.style.cssText = 'line-height:1.5;white-space:pre-wrap;margin:0 0 20px';
422
+ dialog.appendChild(body);
423
+ }
424
+ const row = document.createElement('div');
425
+ row.style.cssText = 'display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px';
426
+ const choices = buttons?.length ? buttons : [{
427
+ text: 'OK'
428
+ }];
429
+ const close = () => {
430
+ dialog.close?.();
431
+ dialog.remove();
432
+ };
433
+ for (const choice of choices) {
434
+ const button = document.createElement('button');
435
+ button.type = 'button';
436
+ button.textContent = choice.text ?? 'OK';
437
+ button.style.cssText = `padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${choice.style === 'destructive' ? '#a52b38' : '#283a4d'};cursor:pointer;font:inherit`;
438
+ button.onclick = () => {
439
+ close();
440
+ choice.onPress?.();
441
+ };
442
+ row.appendChild(button);
443
+ }
444
+ dialog.addEventListener('cancel', event => {
445
+ event.preventDefault();
446
+ if (options?.cancelable === false) return;
447
+ close();
448
+ options?.onDismiss?.();
449
+ });
450
+ dialog.appendChild(row);
451
+ document.body.appendChild(dialog);
452
+ if (dialog.showModal) dialog.showModal();else dialog.setAttribute('open', '');
453
+ }
454
+ };
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getStorageBackendType = getStorageBackendType;
7
+ exports.isUsingPersistentStorage = isUsingPersistentStorage;
8
+ exports.persistentStorage = void 0;
9
+ var _devToolsStorageKeys = require("../storage/devToolsStorageKeys.js");
10
+ // Retain writes if storage is blocked or full. Null entries mask failed removals.
11
+ const pending = new Map();
12
+ function storage() {
13
+ try {
14
+ return typeof window === "undefined" ? null : window.localStorage;
15
+ } catch {
16
+ return null;
17
+ }
18
+ }
19
+ const persistentStorage = exports.persistentStorage = {
20
+ async getItem(key) {
21
+ if (pending.has(key)) return pending.get(key) ?? null;
22
+ try {
23
+ return storage()?.getItem(key) ?? null;
24
+ } catch {
25
+ return null;
26
+ }
27
+ },
28
+ async setItem(key, value) {
29
+ pending.set(key, value);
30
+ try {
31
+ const backend = storage();
32
+ if (backend) {
33
+ backend.setItem(key, value);
34
+ pending.delete(key);
35
+ }
36
+ } catch {/* Keep the value for this session. */}
37
+ },
38
+ async removeItem(key) {
39
+ pending.set(key, null);
40
+ try {
41
+ const backend = storage();
42
+ if (backend) {
43
+ backend.removeItem(key);
44
+ pending.delete(key);
45
+ }
46
+ } catch {/* Keep the removal for this session. */}
47
+ },
48
+ async getAllKeys() {
49
+ const keys = new Set();
50
+ try {
51
+ const backend = storage();
52
+ if (backend) for (let i = 0; i < backend.length; i++) {
53
+ const key = backend.key(i);
54
+ if (key?.startsWith(_devToolsStorageKeys.devToolsStorageKeys.base)) keys.add(key);
55
+ }
56
+ } catch {/* Pending entries remain available. */}
57
+ for (const [key, value] of pending) {
58
+ if (!key.startsWith(_devToolsStorageKeys.devToolsStorageKeys.base)) continue;
59
+ if (value === null) keys.delete(key);else keys.add(key);
60
+ }
61
+ return [...keys];
62
+ },
63
+ async multiGet(keys) {
64
+ return Promise.all(keys.map(async key => [key, await persistentStorage.getItem(key)]));
65
+ },
66
+ async multiRemove(keys) {
67
+ await Promise.all(keys.map(key => persistentStorage.removeItem(key)));
68
+ },
69
+ async clear() {
70
+ await persistentStorage.multiRemove(await persistentStorage.getAllKeys());
71
+ }
72
+ };
73
+ async function isUsingPersistentStorage() {
74
+ return storage() !== null;
75
+ }
76
+ async function getStorageBackendType() {
77
+ return storage() ? "localstorage" : "memory";
78
+ }
@@ -7,62 +7,18 @@ exports.REMOTE_RELOAD_DELAY_MS = void 0;
7
7
  exports.reloadApp = reloadApp;
8
8
  exports.resolveReloadStrategy = resolveReloadStrategy;
9
9
  exports.scheduleReloadApp = scheduleReloadApp;
10
+ var _reloadPlatform = require("./reloadPlatform");
10
11
  /**
11
- * reloadApp
12
+ * Reload the app after callers persist any state they need to keep.
12
13
  *
13
- * Programmatic JS-bundle reload primitive. Two strategies, picked at runtime:
14
- *
15
- * - `dev-settings`: React Native core's `DevSettings.reload()`. Works in
16
- * __DEV__ builds (including Expo Go) with zero deps, but throws in
17
- * release.
18
- * - `expo-updates`: `Updates.reloadAsync()` from the `expo-updates`
19
- * package. Works in dev clients and production, but fails in Expo Go
20
- * and is not bundled with any Buoy package — host apps opt in by
21
- * installing `expo-updates` separately.
22
- *
23
- * "auto" prefers `dev-settings` in __DEV__ and falls back to
24
- * `expo-updates` otherwise. The dynamic `require` keeps `expo-updates` an
25
- * optional peer — Expo Go users never load it.
26
- *
27
- * Lives in shared (not in a tool package) because BOTH the always-installed
28
- * core — whose `app` sync adapter exposes reload to remote drivers like the
29
- * MCP server — and perf-monitor's batch runner (reload between cases) need it,
30
- * and reloading must not require a tool with native peer deps.
31
- *
32
- * IMPORTANT: callers must persist any state they need to survive BEFORE
33
- * invoking this. Once the reload fires, the JS realm is gone — there is
34
- * no "after" code path.
14
+ * Native auto mode uses DevSettings in development, then falls back to the
15
+ * optional expo-updates package. Browser auto mode uses location.reload().
16
+ * A successful reload tears down the JS realm, so reloadApp never resolves.
17
+ * scheduleReloadApp delays the reload so a remote caller can receive its reply.
35
18
  */
36
19
 
37
20
  /** The concrete mechanism a `ReloadStrategy` resolves to at runtime. */
38
21
 
39
- function loadDevSettings() {
40
- try {
41
- // Prefer the core RN module; cast to unknown first so TS doesn't try
42
- // to follow into RN's typings (the package may not be in the type
43
- // graph in some build setups).
44
- const rn = require("react-native");
45
- const ds = rn?.DevSettings;
46
- if (ds && typeof ds.reload === "function") {
47
- return ds;
48
- }
49
- } catch {
50
- // fall through
51
- }
52
- return null;
53
- }
54
- function loadExpoUpdates() {
55
- try {
56
- const mod = require("expo-updates");
57
- if (mod && typeof mod.reloadAsync === "function") {
58
- return mod;
59
- }
60
- } catch {
61
- // expo-updates not installed
62
- }
63
- return null;
64
- }
65
-
66
22
  /**
67
23
  * Which mechanism `strategy` would actually use right now, or null when none
68
24
  * is available. Lets a caller check reloadability BEFORE committing (e.g. a
@@ -70,18 +26,21 @@ function loadExpoUpdates() {
70
26
  * the reload fires there is no code path left to answer from).
71
27
  */
72
28
  function resolveReloadStrategy(strategy = "auto") {
29
+ if (strategy === "browser") return (0, _reloadPlatform.loadBrowserReload)() ? "browser" : null;
30
+ if (strategy === "auto" && (0, _reloadPlatform.loadBrowserReload)()) return "browser";
73
31
  if (strategy === "dev-settings") {
74
- return loadDevSettings() ? "dev-settings" : null;
32
+ return (0, _reloadPlatform.loadDevSettings)() ? "dev-settings" : null;
75
33
  }
76
34
  if (strategy === "expo-updates") {
77
- return loadExpoUpdates() ? "expo-updates" : null;
35
+ return (0, _reloadPlatform.loadExpoUpdates)() ? "expo-updates" : null;
78
36
  }
79
- if (__DEV__ && loadDevSettings()) return "dev-settings";
80
- return loadExpoUpdates() ? "expo-updates" : null;
37
+ if (__DEV__ && (0, _reloadPlatform.loadDevSettings)()) return "dev-settings";
38
+ return (0, _reloadPlatform.loadExpoUpdates)() ? "expo-updates" : null;
81
39
  }
82
40
 
83
41
  /** Why `strategy` can't run, phrased for the person who has to fix it. */
84
42
  function unavailableMessage(strategy) {
43
+ if (strategy === "browser") return "[buoy] Browser reload requires a browser window.";
85
44
  if (strategy === "dev-settings") {
86
45
  return "[buoy] DevSettings.reload() unavailable — strategy 'dev-settings' requires React Native dev mode.";
87
46
  }
@@ -99,10 +58,12 @@ function unavailableMessage(strategy) {
99
58
  async function reloadApp(strategy = "auto", reason = "buoy reload") {
100
59
  const resolved = resolveReloadStrategy(strategy);
101
60
  if (!resolved) throw new Error(unavailableMessage(strategy));
102
- if (resolved === "dev-settings") {
103
- loadDevSettings().reload(reason);
61
+ if (resolved === "browser") {
62
+ (0, _reloadPlatform.loadBrowserReload)()();
63
+ } else if (resolved === "dev-settings") {
64
+ (0, _reloadPlatform.loadDevSettings)().reload(reason);
104
65
  } else {
105
- await loadExpoUpdates().reloadAsync();
66
+ await (0, _reloadPlatform.loadExpoUpdates)().reloadAsync();
106
67
  }
107
68
  return await new Promise(() => {});
108
69
  }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.loadBrowserReload = loadBrowserReload;
7
+ exports.loadDevSettings = loadDevSettings;
8
+ exports.loadExpoUpdates = loadExpoUpdates;
9
+ function loadDevSettings() {
10
+ try {
11
+ // Prefer the core RN module; cast to unknown first so TS doesn't try
12
+ // to follow into RN's typings (the package may not be in the type
13
+ // graph in some build setups).
14
+ const rn = require("react-native");
15
+ const ds = rn?.DevSettings;
16
+ if (ds && typeof ds.reload === "function") {
17
+ return ds;
18
+ }
19
+ } catch {
20
+ // fall through
21
+ }
22
+ return null;
23
+ }
24
+ function loadExpoUpdates() {
25
+ try {
26
+ const mod = require("expo-updates");
27
+ if (mod && typeof mod.reloadAsync === "function") {
28
+ return mod;
29
+ }
30
+ } catch {
31
+ // expo-updates not installed
32
+ }
33
+ return null;
34
+ }
35
+ function loadBrowserReload() {
36
+ return null;
37
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.loadBrowserReload = loadBrowserReload;
7
+ exports.loadDevSettings = loadDevSettings;
8
+ exports.loadExpoUpdates = loadExpoUpdates;
9
+ function loadDevSettings() {
10
+ return null;
11
+ }
12
+ function loadExpoUpdates() {
13
+ return null;
14
+ }
15
+ function loadBrowserReload() {
16
+ return typeof window === "undefined" ? null : () => window.location.reload();
17
+ }