@buoy-gg/shared-ui 7.0.36 → 7.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/README.md +33 -26
  2. package/floating.d.ts +1 -0
  3. package/floating.js +2 -0
  4. package/lib/commonjs/JsModal.js +16 -1
  5. package/lib/commonjs/JsModal.web.js +16 -1
  6. package/lib/commonjs/dataViewer/CyberpunkInput.js +6 -1
  7. package/lib/commonjs/dataViewer/LiveExplorer.js +28 -16
  8. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  9. package/lib/commonjs/icons/ReactQueryIcon.js +9 -161
  10. package/lib/commonjs/icons/SentryBugIcon.js +9 -171
  11. package/lib/commonjs/index.js +57 -6
  12. package/lib/commonjs/license/AccountSetup.js +56 -0
  13. package/lib/commonjs/license/AccountSetup.web.js +81 -0
  14. package/lib/commonjs/license/FeatureGate.js +10 -43
  15. package/lib/commonjs/license/FreeAccountPrompt.js +35 -12
  16. package/lib/commonjs/license/index.js +0 -6
  17. package/lib/commonjs/license/licenseModule.js +56 -36
  18. package/lib/commonjs/license/tierLimits.js +12 -63
  19. package/lib/commonjs/storage/devToolsStorageKeys.js +8 -1
  20. package/lib/commonjs/stores/BaseEventStore.js +21 -5
  21. package/lib/commonjs/stores/createToolStore.js +21 -3
  22. package/lib/commonjs/stores/floatingToolStore.js +71 -0
  23. package/lib/commonjs/stores/floatingToolStore.test.js +112 -0
  24. package/lib/commonjs/sync/toolActionRegistry.js +85 -2
  25. package/lib/commonjs/ui/backgrounds/README.md +52 -0
  26. package/lib/commonjs/ui/backgrounds/ToolBackground.js +4 -2
  27. package/lib/commonjs/ui/backgrounds/index.js +8 -1
  28. package/lib/commonjs/ui/backgrounds/registry.js +8 -0
  29. package/lib/commonjs/ui/backgrounds/variants/wormhole/motion.js +48 -0
  30. package/lib/commonjs/ui/backgrounds/variants/wormhole/textures.js +3 -0
  31. package/lib/commonjs/ui/backgrounds/variants/wormhole.js +133 -0
  32. package/lib/commonjs/ui/components/ClipboardHintBanner.js +5 -6
  33. package/lib/commonjs/ui/components/CompactRow.js +94 -74
  34. package/lib/commonjs/ui/components/DraggableHeader.js +16 -1
  35. package/lib/commonjs/ui/components/HeaderSearchButton.js +17 -4
  36. package/lib/commonjs/ui/floating/FloatingTool.js +1010 -0
  37. package/lib/commonjs/ui/floating/FloatingTool.web.js +591 -0
  38. package/lib/commonjs/ui/floating/FloatingToolHost.js +32 -0
  39. package/lib/commonjs/ui/floating/FloatingToolHost.web.js +28 -0
  40. package/lib/commonjs/ui/floating/index.js +105 -0
  41. package/lib/commonjs/ui/floating/index.web.js +105 -0
  42. package/lib/commonjs/ui/floating/onboardingConstants.js +70 -0
  43. package/lib/commonjs/ui/floating/onboardingConstants.web.js +34 -0
  44. package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +3 -1
  45. package/lib/commonjs/ui/index.js +118 -2
  46. package/lib/commonjs/ui/night/nightTheme.js +10 -0
  47. package/lib/commonjs/ui/night/primitives.js +22 -5
  48. package/lib/commonjs/ui/otto/OttoSceneView.js +69 -0
  49. package/lib/commonjs/ui/otto/index.js +22 -0
  50. package/lib/commonjs/ui/otto/ottoEngine.js +10 -7
  51. package/lib/commonjs/ui/otto/ottoScenes.js +949 -0
  52. package/lib/commonjs/utils/minimalSuperJSON.js +13 -3
  53. package/lib/module/JsModal.js +16 -1
  54. package/lib/module/JsModal.web.js +16 -1
  55. package/lib/module/dataViewer/CyberpunkInput.js +6 -1
  56. package/lib/module/dataViewer/LiveExplorer.js +28 -16
  57. package/lib/module/hooks/safe-area-impl.js +1 -1
  58. package/lib/module/icons/ReactQueryIcon.js +9 -161
  59. package/lib/module/icons/SentryBugIcon.js +9 -171
  60. package/lib/module/index.js +4 -1
  61. package/lib/module/license/AccountSetup.js +52 -0
  62. package/lib/module/license/AccountSetup.web.js +77 -0
  63. package/lib/module/license/FeatureGate.js +10 -43
  64. package/lib/module/license/FreeAccountPrompt.js +35 -12
  65. package/lib/module/license/index.js +1 -1
  66. package/lib/module/license/licenseModule.js +50 -35
  67. package/lib/module/license/tierLimits.js +13 -63
  68. package/lib/module/storage/devToolsStorageKeys.js +8 -1
  69. package/lib/module/stores/BaseEventStore.js +21 -5
  70. package/lib/module/stores/createToolStore.js +21 -3
  71. package/lib/module/stores/floatingToolStore.js +61 -0
  72. package/lib/module/stores/floatingToolStore.test.js +111 -0
  73. package/lib/module/sync/toolActionRegistry.js +84 -2
  74. package/lib/module/ui/backgrounds/README.md +52 -0
  75. package/lib/module/ui/backgrounds/ToolBackground.js +4 -2
  76. package/lib/module/ui/backgrounds/index.js +2 -1
  77. package/lib/module/ui/backgrounds/registry.js +8 -0
  78. package/lib/module/ui/backgrounds/variants/wormhole/motion.js +44 -0
  79. package/lib/module/ui/backgrounds/variants/wormhole/textures.js +3 -0
  80. package/lib/module/ui/backgrounds/variants/wormhole.js +129 -0
  81. package/lib/module/ui/components/ClipboardHintBanner.js +5 -6
  82. package/lib/module/ui/components/CompactRow.js +94 -74
  83. package/lib/module/ui/components/DraggableHeader.js +16 -1
  84. package/lib/module/ui/components/HeaderSearchButton.js +17 -4
  85. package/lib/module/ui/floating/FloatingTool.js +1003 -0
  86. package/lib/module/ui/floating/FloatingTool.web.js +590 -0
  87. package/lib/module/ui/floating/FloatingToolHost.js +29 -0
  88. package/lib/module/ui/floating/FloatingToolHost.web.js +25 -0
  89. package/lib/module/ui/floating/index.js +6 -0
  90. package/lib/module/ui/floating/index.web.js +6 -0
  91. package/lib/module/ui/floating/onboardingConstants.js +64 -0
  92. package/lib/module/ui/floating/onboardingConstants.web.js +27 -0
  93. package/lib/module/ui/gameUI/constants/gameUIColors.js +3 -1
  94. package/lib/module/ui/index.js +5 -1
  95. package/lib/module/ui/night/nightTheme.js +10 -0
  96. package/lib/module/ui/night/primitives.js +22 -5
  97. package/lib/module/ui/otto/OttoSceneView.js +64 -0
  98. package/lib/module/ui/otto/index.js +3 -1
  99. package/lib/module/ui/otto/ottoEngine.js +10 -7
  100. package/lib/module/ui/otto/ottoScenes.js +942 -0
  101. package/lib/module/utils/minimalSuperJSON.js +13 -3
  102. package/lib/typescript/commonjs/JsModal.d.ts +43 -2
  103. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/JsModal.web.d.ts +5 -2
  105. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  109. package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts +1 -2
  110. package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts +1 -2
  112. package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/index.d.ts +4 -1
  114. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/license/AccountSetup.d.ts +4 -0
  116. package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +2 -0
  118. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/license/FeatureGate.d.ts +3 -19
  120. package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +8 -11
  122. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/license/index.d.ts +1 -1
  124. package/lib/typescript/commonjs/license/index.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/license/licenseModule.d.ts +18 -31
  126. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/license/tierLimits.d.ts +9 -52
  128. package/lib/typescript/commonjs/license/tierLimits.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +6 -0
  130. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/stores/BaseEventStore.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/stores/createToolStore.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/stores/floatingToolStore.d.ts +27 -0
  134. package/lib/typescript/commonjs/stores/floatingToolStore.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/stores/floatingToolStore.test.d.ts +2 -0
  136. package/lib/typescript/commonjs/stores/floatingToolStore.test.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts +4 -32
  138. package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts +7 -1
  140. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +2 -1
  142. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
  144. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +11 -1
  145. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/motion.d.ts +24 -0
  147. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/motion.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/textures.d.ts +13 -0
  149. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/textures.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole.d.ts +3 -0
  151. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +8 -1
  154. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts +4 -1
  156. package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts.map +1 -1
  157. package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts +7 -1
  158. package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts.map +1 -1
  159. package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts +79 -0
  160. package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts +64 -0
  162. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.d.ts +3 -0
  164. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.web.d.ts +3 -0
  166. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.web.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/ui/floating/index.d.ts +7 -0
  168. package/lib/typescript/commonjs/ui/floating/index.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/ui/floating/index.web.d.ts +7 -0
  170. package/lib/typescript/commonjs/ui/floating/index.web.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/ui/floating/onboardingConstants.d.ts +30 -0
  172. package/lib/typescript/commonjs/ui/floating/onboardingConstants.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/ui/floating/onboardingConstants.web.d.ts +13 -0
  174. package/lib/typescript/commonjs/ui/floating/onboardingConstants.web.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +2 -0
  176. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/ui/index.d.ts +6 -0
  178. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  179. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +10 -0
  180. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -1
  181. package/lib/typescript/commonjs/ui/night/primitives.d.ts +10 -3
  182. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/ui/otto/OttoSceneView.d.ts +30 -0
  184. package/lib/typescript/commonjs/ui/otto/OttoSceneView.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/ui/otto/index.d.ts +2 -0
  186. package/lib/typescript/commonjs/ui/otto/index.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
  188. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/ui/otto/ottoScenes.d.ts +75 -0
  190. package/lib/typescript/commonjs/ui/otto/ottoScenes.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts.map +1 -1
  192. package/lib/typescript/module/JsModal.d.ts +43 -2
  193. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  194. package/lib/typescript/module/JsModal.web.d.ts +5 -2
  195. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  196. package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts.map +1 -1
  197. package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +1 -1
  198. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  199. package/lib/typescript/module/icons/ReactQueryIcon.d.ts +1 -2
  200. package/lib/typescript/module/icons/ReactQueryIcon.d.ts.map +1 -1
  201. package/lib/typescript/module/icons/SentryBugIcon.d.ts +1 -2
  202. package/lib/typescript/module/icons/SentryBugIcon.d.ts.map +1 -1
  203. package/lib/typescript/module/index.d.ts +4 -1
  204. package/lib/typescript/module/index.d.ts.map +1 -1
  205. package/lib/typescript/module/license/AccountSetup.d.ts +4 -0
  206. package/lib/typescript/module/license/AccountSetup.d.ts.map +1 -0
  207. package/lib/typescript/module/license/AccountSetup.web.d.ts +2 -0
  208. package/lib/typescript/module/license/AccountSetup.web.d.ts.map +1 -0
  209. package/lib/typescript/module/license/FeatureGate.d.ts +3 -19
  210. package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
  211. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +8 -11
  212. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
  213. package/lib/typescript/module/license/index.d.ts +1 -1
  214. package/lib/typescript/module/license/index.d.ts.map +1 -1
  215. package/lib/typescript/module/license/licenseModule.d.ts +18 -31
  216. package/lib/typescript/module/license/licenseModule.d.ts.map +1 -1
  217. package/lib/typescript/module/license/tierLimits.d.ts +9 -52
  218. package/lib/typescript/module/license/tierLimits.d.ts.map +1 -1
  219. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +6 -0
  220. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
  221. package/lib/typescript/module/stores/BaseEventStore.d.ts.map +1 -1
  222. package/lib/typescript/module/stores/createToolStore.d.ts.map +1 -1
  223. package/lib/typescript/module/stores/floatingToolStore.d.ts +27 -0
  224. package/lib/typescript/module/stores/floatingToolStore.d.ts.map +1 -0
  225. package/lib/typescript/module/stores/floatingToolStore.test.d.ts +2 -0
  226. package/lib/typescript/module/stores/floatingToolStore.test.d.ts.map +1 -0
  227. package/lib/typescript/module/sync/toolActionRegistry.d.ts +4 -32
  228. package/lib/typescript/module/sync/toolActionRegistry.d.ts.map +1 -1
  229. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts +7 -1
  230. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts.map +1 -1
  231. package/lib/typescript/module/ui/backgrounds/index.d.ts +2 -1
  232. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
  233. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
  234. package/lib/typescript/module/ui/backgrounds/types.d.ts +11 -1
  235. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
  236. package/lib/typescript/module/ui/backgrounds/variants/wormhole/motion.d.ts +24 -0
  237. package/lib/typescript/module/ui/backgrounds/variants/wormhole/motion.d.ts.map +1 -0
  238. package/lib/typescript/module/ui/backgrounds/variants/wormhole/textures.d.ts +13 -0
  239. package/lib/typescript/module/ui/backgrounds/variants/wormhole/textures.d.ts.map +1 -0
  240. package/lib/typescript/module/ui/backgrounds/variants/wormhole.d.ts +3 -0
  241. package/lib/typescript/module/ui/backgrounds/variants/wormhole.d.ts.map +1 -0
  242. package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts.map +1 -1
  243. package/lib/typescript/module/ui/components/CompactRow.d.ts +8 -1
  244. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
  245. package/lib/typescript/module/ui/components/DraggableHeader.d.ts +4 -1
  246. package/lib/typescript/module/ui/components/DraggableHeader.d.ts.map +1 -1
  247. package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts +7 -1
  248. package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts.map +1 -1
  249. package/lib/typescript/module/ui/floating/FloatingTool.d.ts +79 -0
  250. package/lib/typescript/module/ui/floating/FloatingTool.d.ts.map +1 -0
  251. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts +64 -0
  252. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +1 -0
  253. package/lib/typescript/module/ui/floating/FloatingToolHost.d.ts +3 -0
  254. package/lib/typescript/module/ui/floating/FloatingToolHost.d.ts.map +1 -0
  255. package/lib/typescript/module/ui/floating/FloatingToolHost.web.d.ts +3 -0
  256. package/lib/typescript/module/ui/floating/FloatingToolHost.web.d.ts.map +1 -0
  257. package/lib/typescript/module/ui/floating/index.d.ts +7 -0
  258. package/lib/typescript/module/ui/floating/index.d.ts.map +1 -0
  259. package/lib/typescript/module/ui/floating/index.web.d.ts +7 -0
  260. package/lib/typescript/module/ui/floating/index.web.d.ts.map +1 -0
  261. package/lib/typescript/module/ui/floating/onboardingConstants.d.ts +30 -0
  262. package/lib/typescript/module/ui/floating/onboardingConstants.d.ts.map +1 -0
  263. package/lib/typescript/module/ui/floating/onboardingConstants.web.d.ts +13 -0
  264. package/lib/typescript/module/ui/floating/onboardingConstants.web.d.ts.map +1 -0
  265. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +2 -0
  266. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  267. package/lib/typescript/module/ui/index.d.ts +6 -0
  268. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  269. package/lib/typescript/module/ui/night/nightTheme.d.ts +10 -0
  270. package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -1
  271. package/lib/typescript/module/ui/night/primitives.d.ts +10 -3
  272. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
  273. package/lib/typescript/module/ui/otto/OttoSceneView.d.ts +30 -0
  274. package/lib/typescript/module/ui/otto/OttoSceneView.d.ts.map +1 -0
  275. package/lib/typescript/module/ui/otto/index.d.ts +2 -0
  276. package/lib/typescript/module/ui/otto/index.d.ts.map +1 -1
  277. package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
  278. package/lib/typescript/module/ui/otto/ottoEngine.d.ts.map +1 -1
  279. package/lib/typescript/module/ui/otto/ottoScenes.d.ts +75 -0
  280. package/lib/typescript/module/ui/otto/ottoScenes.d.ts.map +1 -0
  281. package/lib/typescript/module/utils/minimalSuperJSON.d.ts.map +1 -1
  282. package/package.json +25 -5
  283. package/scripts/generate-wormhole-textures.cjs +261 -0
  284. package/scripts/test-wormhole-motion.cjs +59 -0
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
+ guardToolAdapter: true,
7
8
  absoluteFill: true,
8
9
  displayValue: true,
9
10
  parseDisplayValue: true,
@@ -115,8 +116,20 @@ var _exportNames = {
115
116
  TIER_LIMITS: true,
116
117
  useLimit: true,
117
118
  resolveEffectiveTier: true,
118
- freeKeyRaises: true
119
+ getAccountAccess: true,
120
+ hasAccountAccess: true,
121
+ assertAccountAccess: true,
122
+ subscribeAccountAccess: true,
123
+ getUseAccountAccess: true,
124
+ retryAccountAccess: true,
125
+ AccountSetup: true
119
126
  };
127
+ Object.defineProperty(exports, "AccountSetup", {
128
+ enumerable: true,
129
+ get: function () {
130
+ return _AccountSetup.AccountSetup;
131
+ }
132
+ });
120
133
  Object.defineProperty(exports, "EnvironmentIndicator", {
121
134
  enumerable: true,
122
135
  get: function () {
@@ -297,6 +310,12 @@ Object.defineProperty(exports, "absoluteFill", {
297
310
  return _index3.absoluteFill;
298
311
  }
299
312
  });
313
+ Object.defineProperty(exports, "assertAccountAccess", {
314
+ enumerable: true,
315
+ get: function () {
316
+ return _licenseModule.assertAccountAccess;
317
+ }
318
+ });
300
319
  Object.defineProperty(exports, "buoyColors", {
301
320
  enumerable: true,
302
321
  get: function () {
@@ -369,16 +388,16 @@ Object.defineProperty(exports, "formatValuePreview", {
369
388
  return _stateTools.formatValuePreview;
370
389
  }
371
390
  });
372
- Object.defineProperty(exports, "freeKeyRaises", {
391
+ Object.defineProperty(exports, "gameUIColors", {
373
392
  enumerable: true,
374
393
  get: function () {
375
- return _index12.freeKeyRaises;
394
+ return _gameUIColors.gameUIColors;
376
395
  }
377
396
  });
378
- Object.defineProperty(exports, "gameUIColors", {
397
+ Object.defineProperty(exports, "getAccountAccess", {
379
398
  enumerable: true,
380
399
  get: function () {
381
- return _gameUIColors.gameUIColors;
400
+ return _licenseModule.getAccountAccess;
382
401
  }
383
402
  });
384
403
  Object.defineProperty(exports, "getCachedOptionalModule", {
@@ -459,6 +478,12 @@ Object.defineProperty(exports, "getTypeColor", {
459
478
  return _index3.getTypeColor;
460
479
  }
461
480
  });
481
+ Object.defineProperty(exports, "getUseAccountAccess", {
482
+ enumerable: true,
483
+ get: function () {
484
+ return _licenseModule.getUseAccountAccess;
485
+ }
486
+ });
462
487
  Object.defineProperty(exports, "getUseIsPro", {
463
488
  enumerable: true,
464
489
  get: function () {
@@ -489,6 +514,18 @@ Object.defineProperty(exports, "getValueType", {
489
514
  return _index3.getValueType;
490
515
  }
491
516
  });
517
+ Object.defineProperty(exports, "guardToolAdapter", {
518
+ enumerable: true,
519
+ get: function () {
520
+ return _toolActionRegistry.guardToolAdapter;
521
+ }
522
+ });
523
+ Object.defineProperty(exports, "hasAccountAccess", {
524
+ enumerable: true,
525
+ get: function () {
526
+ return _licenseModule.hasAccountAccess;
527
+ }
528
+ });
492
529
  Object.defineProperty(exports, "isEmpty", {
493
530
  enumerable: true,
494
531
  get: function () {
@@ -621,6 +658,12 @@ Object.defineProperty(exports, "resolveReloadStrategy", {
621
658
  return _index3.resolveReloadStrategy;
622
659
  }
623
660
  });
661
+ Object.defineProperty(exports, "retryAccountAccess", {
662
+ enumerable: true,
663
+ get: function () {
664
+ return _licenseModule.retryAccountAccess;
665
+ }
666
+ });
624
667
  Object.defineProperty(exports, "safeStringify", {
625
668
  enumerable: true,
626
669
  get: function () {
@@ -651,6 +694,12 @@ Object.defineProperty(exports, "skippedRestore", {
651
694
  return _snapshotProviderKit.skippedRestore;
652
695
  }
653
696
  });
697
+ Object.defineProperty(exports, "subscribeAccountAccess", {
698
+ enumerable: true,
699
+ get: function () {
700
+ return _licenseModule.subscribeAccountAccess;
701
+ }
702
+ });
654
703
  Object.defineProperty(exports, "subscribeToStateSnapshotProviders", {
655
704
  enumerable: true,
656
705
  get: function () {
@@ -1044,4 +1093,6 @@ Object.keys(_index11).forEach(function (key) {
1044
1093
  }
1045
1094
  });
1046
1095
  });
1047
- var _index12 = require("./license/index.js");
1096
+ var _index12 = require("./license/index.js");
1097
+ var _licenseModule = require("./license/licenseModule.js");
1098
+ var _AccountSetup = require("./license/AccountSetup");
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AccountSetup = AccountSetup;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _FreeAccountPrompt = require("./FreeAccountPrompt.js");
10
+ var _licenseModule = require("./licenseModule.js");
11
+ var _gameUIColors = require("../ui/gameUI/constants/gameUIColors.js");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ 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); }
14
+ /** The host app remains usable; only the Buoy launcher opens setup. */
15
+ function AccountSetup() {
16
+ const access = (0, _licenseModule.getUseAccountAccess)()();
17
+ const [open, setOpen] = (0, _react.useState)(false);
18
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
19
+ pointerEvents: "box-none",
20
+ style: styles.root,
21
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
22
+ accessibilityRole: "button",
23
+ accessibilityLabel: "Set up Buoy account",
24
+ onPress: () => setOpen(true),
25
+ style: styles.button,
26
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
27
+ style: styles.text,
28
+ children: access.status === "initializing" ? "BUOY · Checking…" : "BUOY · Sign in"
29
+ })
30
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FreeAccountPrompt.FreeAccountPrompt, {
31
+ visible: open,
32
+ onClose: () => setOpen(false)
33
+ })]
34
+ });
35
+ }
36
+ const styles = _reactNative.StyleSheet.create({
37
+ root: {
38
+ position: "absolute",
39
+ bottom: 30,
40
+ right: 16,
41
+ zIndex: 99999
42
+ },
43
+ button: {
44
+ backgroundColor: _gameUIColors.buoyColors.card,
45
+ borderWidth: 1,
46
+ borderColor: _gameUIColors.buoyColors.primary,
47
+ borderRadius: 24,
48
+ paddingVertical: 12,
49
+ paddingHorizontal: 16
50
+ },
51
+ text: {
52
+ color: _gameUIColors.buoyColors.primary,
53
+ fontWeight: "700",
54
+ fontSize: 12
55
+ }
56
+ });
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AccountSetup = AccountSetup;
7
+ var _react = require("react");
8
+ var _license = require("@buoy-gg/license");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function AccountSetup() {
11
+ const access = (0, _license.useAccountAccess)();
12
+ const [open, setOpen] = (0, _react.useState)(false);
13
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
14
+ style: {
15
+ position: "fixed",
16
+ right: 16,
17
+ bottom: 30,
18
+ zIndex: 99999,
19
+ color: "#e2e8f0",
20
+ fontFamily: "system-ui"
21
+ },
22
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
23
+ onClick: () => setOpen(!open),
24
+ style: {
25
+ background: "#080a0b",
26
+ color: "#20C997",
27
+ border: "1px solid #20C997",
28
+ borderRadius: 24,
29
+ padding: "12px 16px"
30
+ },
31
+ children: access.status === "initializing" ? "BUOY · Checking…" : "BUOY · Sign in"
32
+ }), open && /*#__PURE__*/(0, _jsxRuntime.jsxs)("section", {
33
+ "aria-label": "Buoy account setup",
34
+ style: {
35
+ position: "absolute",
36
+ right: 0,
37
+ bottom: 55,
38
+ width: 300,
39
+ maxWidth: "85vw",
40
+ background: "#080a0b",
41
+ border: "1px solid #20C997",
42
+ borderRadius: 12,
43
+ padding: 20
44
+ },
45
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
46
+ children: "Sign in to use Buoy"
47
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
48
+ children: "A Free or Pro account is required. Run this command in your project, then reload the app."
49
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("pre", {
50
+ children: "npx buoy login"
51
+ }), _license.LicenseManager.getState().error && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
52
+ role: "status",
53
+ children: _license.LicenseManager.getState().error
54
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
55
+ onClick: () => {
56
+ const key = _license.LicenseManager.getState().licenseKey;
57
+ if (key) void _license.LicenseManager.setLicenseKey(key, {
58
+ force: true
59
+ });
60
+ },
61
+ children: "Retry verification"
62
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
63
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
64
+ style: {
65
+ color: "#20C997"
66
+ },
67
+ href: "https://github.com/Buoy-gg/buoy/issues/new/choose",
68
+ target: "_blank",
69
+ rel: "noreferrer",
70
+ children: "Contact support on GitHub"
71
+ })
72
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
73
+ style: {
74
+ color: "#20C997"
75
+ },
76
+ href: "mailto:support@buoy.gg",
77
+ children: "support@buoy.gg"
78
+ })]
79
+ })]
80
+ });
81
+ }
@@ -11,9 +11,6 @@ var _gameUIColors = require("../ui/gameUI/constants/gameUIColors.js");
11
11
  var _lucideIcons = require("../icons/lucide-icons.js");
12
12
  var _LicenseEntryModal = require("./LicenseEntryModal.js");
13
13
  var _openPricing = require("./openPricing.js");
14
- var _FreeAccountPrompt = require("./FreeAccountPrompt.js");
15
- var _licenseModule = require("./licenseModule.js");
16
- var _tierLimits = require("./tierLimits.js");
17
14
  var _license = require("@buoy-gg/license");
18
15
  var _jsxRuntime = require("react/jsx-runtime");
19
16
  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); }
@@ -58,19 +55,14 @@ exports.ProBadge = ProBadge;
58
55
  const ProUpgradeModal = ({
59
56
  visible,
60
57
  onClose,
61
- featureName = "This feature",
62
- limitKey
58
+ featureName = "This feature"
63
59
  }) => {
64
60
  // Simple wrapper around UpgradeModal with minimal description and no benefits
65
61
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(UpgradeModal, {
66
62
  visible: visible,
67
63
  onClose: onClose,
68
- featureName: featureName
69
- // Only meaningful when this upsell is about a LIMIT; without it the
70
- // description below (which promises Pro) is the accurate message.
71
- ,
72
- limitKey: limitKey,
73
- description: limitKey ? undefined : `${featureName} requires a Pro subscription.`
64
+ featureName: featureName,
65
+ description: `${featureName} requires a Pro subscription.`
74
66
  });
75
67
  };
76
68
  exports.ProUpgradeModal = ProUpgradeModal;
@@ -81,13 +73,9 @@ exports.ProUpgradeModal = ProUpgradeModal;
81
73
  const UpgradePrompt = ({
82
74
  featureName,
83
75
  onUpgradePress,
84
- compact = false,
85
- limitKey
76
+ compact = false
86
77
  }) => {
87
78
  const [showLicenseModal, setShowLicenseModal] = (0, _react.useState)(false);
88
- // Only offer the free key when it would actually raise this limit — see
89
- // UpgradeModalProps.limitKey.
90
- const isAnonymous = (0, _licenseModule.getUseTier)()() === "anonymous" && limitKey != null && (0, _tierLimits.freeKeyRaises)(limitKey);
91
79
  const handlePress = (0, _react.useCallback)(() => {
92
80
  if (onUpgradePress) {
93
81
  onUpgradePress();
@@ -115,11 +103,7 @@ const UpgradePrompt = ({
115
103
  style: styles.compactText,
116
104
  children: "PRO"
117
105
  })]
118
- }), isAnonymous ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_FreeAccountPrompt.FreeAccountPrompt, {
119
- visible: showLicenseModal,
120
- onClose: handleCloseModal,
121
- featureName: featureName
122
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_LicenseEntryModal.LicenseEntryModal, {
106
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LicenseEntryModal.LicenseEntryModal, {
123
107
  visible: showLicenseModal,
124
108
  onClose: handleCloseModal
125
109
  })]
@@ -136,27 +120,23 @@ const UpgradePrompt = ({
136
120
  })
137
121
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
138
122
  style: styles.title,
139
- children: isAnonymous ? "Get a free key" : "Pro Feature"
123
+ children: "Pro Feature"
140
124
  }), featureName && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
141
125
  style: styles.featureName,
142
126
  children: featureName
143
127
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
144
128
  style: styles.description,
145
- children: isAnonymous ? "Buoy works without an account, with a small slice of each tool. A free key opens it up." : "Upgrade to React Buoy Pro to unlock this feature and more."
129
+ children: "Upgrade to React Buoy Pro to unlock this feature and more."
146
130
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
147
131
  style: styles.upgradeButton,
148
132
  onPress: handlePress,
149
133
  activeOpacity: 0.8,
150
134
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
151
135
  style: styles.upgradeButtonText,
152
- children: isAnonymous ? "Get a free key" : "Upgrade to Pro"
136
+ children: "Upgrade to Pro"
153
137
  })
154
138
  })]
155
- }), isAnonymous ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_FreeAccountPrompt.FreeAccountPrompt, {
156
- visible: showLicenseModal,
157
- onClose: handleCloseModal,
158
- featureName: featureName
159
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_LicenseEntryModal.LicenseEntryModal, {
139
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LicenseEntryModal.LicenseEntryModal, {
160
140
  visible: showLicenseModal,
161
141
  onClose: handleCloseModal
162
142
  })]
@@ -337,14 +317,8 @@ const UpgradeModal = ({
337
317
  onClose,
338
318
  featureName = "This Feature",
339
319
  description,
340
- benefits,
341
- limitKey
320
+ benefits
342
321
  }) => {
343
- // Anonymous users get a different ask — but ONLY when a free key would
344
- // actually fix what they just hit. Everything else here is Pro-exclusive,
345
- // where a free key changes nothing and offering one would be dishonest.
346
- const tier = (0, _licenseModule.getUseTier)()();
347
- const offerFreeKey = tier === "anonymous" && limitKey != null && (0, _tierLimits.freeKeyRaises)(limitKey);
348
322
  const hasBenefits = benefits && benefits.length > 0;
349
323
  const [showLicenseModal, setShowLicenseModal] = (0, _react.useState)(false);
350
324
  const license = (0, _license.useLicense)();
@@ -367,13 +341,6 @@ const UpgradeModal = ({
367
341
  onClose();
368
342
  }, [onClose]);
369
343
  if (!visible) return null;
370
- if (offerFreeKey) {
371
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FreeAccountPrompt.FreeAccountPrompt, {
372
- visible: visible,
373
- onClose: onClose,
374
- featureName: featureName === "This Feature" ? undefined : featureName
375
- });
376
- }
377
344
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
378
345
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
379
346
  visible: visible && !showLicenseModal,
@@ -10,29 +10,29 @@ var _gameUIColors = require("../ui/gameUI/constants/gameUIColors.js");
10
10
  var _lucideIcons = require("../icons/lucide-icons.js");
11
11
  var _index = require("../clipboard/index.js");
12
12
  var _openPricing = require("./openPricing.js");
13
+ var _licenseModule = require("./licenseModule.js");
13
14
  var _fonts = require("../ui/fonts.js");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
16
  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); }
16
17
  /**
17
- * The upsell an ANONYMOUS user sees — someone with no key at all.
18
+ * The account setup sheet — what a locked manager shows instead of the tools.
18
19
  *
19
- * Deliberately not the Pro modal. Their next step is free and takes about
20
- * thirty seconds, so asking them for money would be asking the wrong question
21
- * at the wrong moment, and would suppress exactly the signup this exists to
22
- * produce. Pro is still offered, as a secondary action.
20
+ * Deliberately not the Pro modal. The next step is a free account and takes
21
+ * about thirty seconds, so asking for money here would be asking the wrong
22
+ * question at the wrong moment. Pro is still offered, as a secondary action.
23
23
  *
24
- * The command is shown inline and copyable rather than linked, because there is
25
- * no grace period: someone who just watched their limits shrink needs the fix
26
- * in front of them, not a link to a page that has a link to a command.
24
+ * The command is shown inline and copyable rather than linked, because
25
+ * someone who cannot open the tools needs the fix in front of them, not a link
26
+ * to a page that has a link to a command.
27
27
  */
28
28
 
29
29
  /** The one thing a reader has to be able to act on. */
30
30
  const LOGIN_COMMAND = exports.LOGIN_COMMAND = "npx buoy login";
31
31
  const FreeAccountPrompt = ({
32
32
  visible,
33
- onClose,
34
- featureName
33
+ onClose
35
34
  }) => {
35
+ const access = (0, _licenseModule.getUseAccountAccess)()();
36
36
  const [copied, setCopied] = (0, _react.useState)(false);
37
37
  const resetTimer = (0, _react.useRef)(null);
38
38
  (0, _react.useEffect)(() => () => {
@@ -70,10 +70,10 @@ const FreeAccountPrompt = ({
70
70
  })
71
71
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
72
72
  style: styles.title,
73
- children: featureName ? `More ${featureName}` : "See more"
73
+ children: access.status === "initializing" ? "Checking your account…" : "Sign in to use Buoy"
74
74
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
75
75
  style: styles.subtitle,
76
- children: "Buoy runs without an account \u2014 you just get a small slice of each tool. A free key opens it up."
76
+ children: "A Free or Pro account is required. Run this command in your project, then reload the app to use your account key."
77
77
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
78
78
  style: styles.command,
79
79
  onPress: handleCopy,
@@ -89,9 +89,32 @@ const FreeAccountPrompt = ({
89
89
  size: 14,
90
90
  color: _gameUIColors.buoyColors.textMuted
91
91
  })]
92
+ }), access.status !== "admitted" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
93
+ style: styles.secondary,
94
+ onPress: () => {
95
+ void (0, _licenseModule.retryAccountAccess)();
96
+ },
97
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
98
+ style: styles.secondaryText,
99
+ children: "Retry verification"
100
+ })
92
101
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
93
102
  style: styles.reassure,
94
103
  children: "Free forever. No card. About thirty seconds."
104
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
105
+ style: styles.secondary,
106
+ onPress: () => (0, _openPricing.openPricing)("https://github.com/Buoy-gg/buoy/issues/new/choose"),
107
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
108
+ style: styles.secondaryText,
109
+ children: "Contact support on GitHub"
110
+ })
111
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
112
+ style: styles.secondary,
113
+ onPress: () => (0, _openPricing.openPricing)("mailto:support@buoy.gg"),
114
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
115
+ style: styles.secondaryText,
116
+ children: "Email support@buoy.gg"
117
+ })
95
118
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
96
119
  style: styles.secondary,
97
120
  onPress: () => (0, _openPricing.openPricing)(),
@@ -63,12 +63,6 @@ Object.defineProperty(exports, "UpgradePrompt", {
63
63
  return _FeatureGate.UpgradePrompt;
64
64
  }
65
65
  });
66
- Object.defineProperty(exports, "freeKeyRaises", {
67
- enumerable: true,
68
- get: function () {
69
- return _tierLimits.freeKeyRaises;
70
- }
71
- });
72
66
  Object.defineProperty(exports, "getUseIsPro", {
73
67
  enumerable: true,
74
68
  get: function () {
@@ -3,35 +3,40 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.assertAccountAccess = assertAccountAccess;
7
+ exports.getAccountAccess = getAccountAccess;
8
+ exports.getUseAccountAccess = getUseAccountAccess;
6
9
  exports.getUseIsPro = getUseIsPro;
7
10
  exports.getUseLicense = getUseLicense;
8
11
  exports.getUseTier = getUseTier;
9
- exports.isAnonymousTierEnabled = isAnonymousTierEnabled;
12
+ exports.hasAccountAccess = hasAccountAccess;
13
+ exports.retryAccountAccess = retryAccountAccess;
14
+ exports.subscribeAccountAccess = subscribeAccountAccess;
15
+ var licenseModule = _interopRequireWildcard(require("@buoy-gg/license"));
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
17
  /**
11
- * Centralized lazy loading of `@buoy-gg/license`.
18
+ * Centralized access of `@buoy-gg/license`.
12
19
  *
13
20
  * This is the SINGLE place any package resolves license hooks — tools must not
14
- * `require("@buoy-gg/license")` themselves. Lives in its own module (rather
21
+ * resolve the license module themselves. Lives in its own module (rather
15
22
  * than `./index`) so `tierLimits` can consume it without an import cycle.
16
23
  */
17
24
 
18
- /** Access tier. Mirrors BuoyTier in @buoy-gg/license. */
25
+ /** Tier. Mirrors BuoyTier in @buoy-gg/license. */
19
26
 
20
27
  let _useIsPro = null;
21
28
  let _useLicense = null;
22
29
  let _useTier = null;
23
- let _anonymousTierEnabled = null;
24
30
  let _licenseLoadAttempted = false;
25
31
  function loadLicenseModuleCentral() {
26
32
  if (_licenseLoadAttempted) return;
27
33
  _licenseLoadAttempted = true;
28
34
  try {
29
- const mod = require("@buoy-gg/license");
35
+ const mod = licenseModule;
30
36
  if (mod) {
31
37
  _useIsPro = mod.useIsPro ?? null;
32
38
  _useLicense = mod.useLicense ?? null;
33
39
  _useTier = mod.useTier ?? null;
34
- _anonymousTierEnabled = typeof mod.ANONYMOUS_TIER_ENABLED === "boolean" ? mod.ANONYMOUS_TIER_ENABLED : null;
35
40
  }
36
41
  } catch {
37
42
  // License package not available - will use fallback
@@ -61,39 +66,54 @@ function getUseLicense() {
61
66
  }
62
67
 
63
68
  /**
64
- * Get the useTier hook from @buoy-gg/license.
65
- *
66
- * Falls back to `"free"` — NOT `"anonymous"` — when the license package can't
67
- * be resolved. That deliberately matches the existing `getUseIsPro()` fallback,
68
- * which yields free-tier behavior today, and it picks the safer failure:
69
- *
70
- * - falling back to "anonymous" would let one bundler quirk silently cut every
71
- * legitimate user's limits by ~80%;
72
- * - falling back to "free" costs no revenue, because Pro still requires a key
73
- * that a live license server validated — this path can never grant Pro.
74
- *
75
- * Reaching it at all requires `@buoy-gg/license` to be missing, and it is a
76
- * hard dependency of `@buoy-gg/core`.
69
+ * Falls back to "free" without the license package. That grants nothing: a
70
+ * missing license module also means no account admission, and nothing is
71
+ * exposed without it.
77
72
  */
78
73
  function getUseTier() {
79
74
  loadLicenseModuleCentral();
80
75
  return _useTier ?? (() => "free");
81
76
  }
77
+ const LOCKED = {
78
+ status: "locked",
79
+ reason: "account_required",
80
+ validUntil: null
81
+ };
82
82
 
83
- /**
84
- * Whether the anonymous tier is switched on.
85
- *
86
- * The switch itself lives in @buoy-gg/license (see its config.ts) because the
87
- * Weekend Pass change has to flip at the same moment as the reduced limits, and
88
- * those live in different packages. Read through the same lazy loader as the
89
- * hooks so a missing license package degrades gracefully rather than throwing
90
- * at module load.
91
- *
92
- * Falls back to `false` — the anonymous tier off, everyone on free limits —
93
- * which matches the `getUseTier()` fallback of "free". A build that cannot
94
- * resolve the license package must never take limits AWAY from someone.
95
- */
96
- function isAnonymousTierEnabled() {
97
- loadLicenseModuleCentral();
98
- return _anonymousTierEnabled ?? false;
83
+ // Resolve at the boundary, after module initialization. Do not cache an absent
84
+ // manager during a circular import or grant access for older package versions.
85
+ function accountManager() {
86
+ try {
87
+ const manager = licenseModule.LicenseManager;
88
+ void manager?.initialize?.();
89
+ return manager;
90
+ } catch {
91
+ return null;
92
+ }
93
+ }
94
+ function getAccountAccess() {
95
+ return accountManager()?.getAccountAccess?.() ?? LOCKED;
96
+ }
97
+ function hasAccountAccess() {
98
+ return getAccountAccess().status === "admitted";
99
+ }
100
+ function assertAccountAccess() {
101
+ if (!hasAccountAccess()) throw new Error("A verified Buoy account is required. Run npx buoy login, then reload your app.");
102
+ }
103
+ function subscribeAccountAccess(listener) {
104
+ return accountManager()?.subscribe?.(listener) ?? (() => {});
105
+ }
106
+ function getUseAccountAccess() {
107
+ try {
108
+ return licenseModule.useAccountAccess ?? (() => LOCKED);
109
+ } catch {
110
+ return () => LOCKED;
111
+ }
112
+ }
113
+ async function retryAccountAccess() {
114
+ const manager = accountManager();
115
+ const key = manager?.getState?.().licenseKey;
116
+ if (key) await manager.setLicenseKey(key, {
117
+ force: true
118
+ });else await manager?.initialize?.();
99
119
  }