@buoy-gg/shared-ui 7.0.21 → 7.0.23

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 (178) hide show
  1. package/lib/commonjs/JsModal.js +39 -16
  2. package/lib/commonjs/dataViewer/JsonStringNotice.js +59 -0
  3. package/lib/commonjs/dataViewer/ThemedSplitView.js +20 -1
  4. package/lib/commonjs/dataViewer/TimestampDeltaBar.js +96 -0
  5. package/lib/commonjs/dataViewer/index.js +52 -0
  6. package/lib/commonjs/dataViewer/jsonStringValue.js +94 -0
  7. package/lib/commonjs/dataViewer/timestampDiff.js +146 -0
  8. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  9. package/lib/commonjs/index.js +64 -1
  10. package/lib/commonjs/license/FeatureGate.js +43 -10
  11. package/lib/commonjs/license/FreeAccountPrompt.js +181 -0
  12. package/lib/commonjs/license/index.js +57 -42
  13. package/lib/commonjs/license/licenseModule.js +99 -0
  14. package/lib/commonjs/license/tierLimits.js +165 -0
  15. package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +180 -0
  16. package/lib/commonjs/ui/backgrounds/README.md +115 -0
  17. package/lib/commonjs/ui/backgrounds/ToolBackground.js +74 -0
  18. package/lib/commonjs/ui/backgrounds/backgroundStore.js +116 -0
  19. package/lib/commonjs/ui/backgrounds/index.js +70 -0
  20. package/lib/commonjs/ui/backgrounds/primitives.js +333 -0
  21. package/lib/commonjs/ui/backgrounds/registry.js +112 -0
  22. package/lib/commonjs/ui/backgrounds/rng.js +72 -0
  23. package/lib/commonjs/ui/backgrounds/types.js +1 -0
  24. package/lib/commonjs/ui/backgrounds/variants/deepField.js +351 -0
  25. package/lib/commonjs/ui/backgrounds/variants/lattice.js +579 -0
  26. package/lib/commonjs/ui/backgrounds/variants/starfield.js +210 -0
  27. package/lib/commonjs/ui/index.js +15 -3
  28. package/lib/commonjs/utils/devServer.js +62 -0
  29. package/lib/commonjs/utils/index.js +13 -0
  30. package/lib/commonjs/utils/renderCaptureRegistry.js +32 -3
  31. package/lib/commonjs/utils/safeExpoRouter.js +27 -2
  32. package/lib/module/JsModal.js +39 -16
  33. package/lib/module/dataViewer/JsonStringNotice.js +54 -0
  34. package/lib/module/dataViewer/ThemedSplitView.js +20 -1
  35. package/lib/module/dataViewer/TimestampDeltaBar.js +91 -0
  36. package/lib/module/dataViewer/index.js +4 -0
  37. package/lib/module/dataViewer/jsonStringValue.js +89 -0
  38. package/lib/module/dataViewer/timestampDiff.js +139 -0
  39. package/lib/module/hooks/safe-area-impl.js +1 -1
  40. package/lib/module/index.js +5 -3
  41. package/lib/module/license/FeatureGate.js +43 -10
  42. package/lib/module/license/FreeAccountPrompt.js +176 -0
  43. package/lib/module/license/index.js +5 -40
  44. package/lib/module/license/licenseModule.js +92 -0
  45. package/lib/module/license/tierLimits.js +158 -0
  46. package/lib/module/ui/backgrounds/BackgroundSwitcher.js +176 -0
  47. package/lib/module/ui/backgrounds/README.md +115 -0
  48. package/lib/module/ui/backgrounds/ToolBackground.js +70 -0
  49. package/lib/module/ui/backgrounds/backgroundStore.js +111 -0
  50. package/lib/module/ui/backgrounds/index.js +9 -0
  51. package/lib/module/ui/backgrounds/primitives.js +328 -0
  52. package/lib/module/ui/backgrounds/registry.js +105 -0
  53. package/lib/module/ui/backgrounds/rng.js +65 -0
  54. package/lib/module/ui/backgrounds/types.js +1 -0
  55. package/lib/module/ui/backgrounds/variants/deepField.js +347 -0
  56. package/lib/module/ui/backgrounds/variants/lattice.js +575 -0
  57. package/lib/module/ui/backgrounds/variants/starfield.js +206 -0
  58. package/lib/module/ui/index.js +3 -0
  59. package/lib/module/utils/devServer.js +58 -0
  60. package/lib/module/utils/index.js +2 -1
  61. package/lib/module/utils/renderCaptureRegistry.js +32 -3
  62. package/lib/module/utils/safeExpoRouter.js +26 -2
  63. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  64. package/lib/typescript/commonjs/dataViewer/JsonStringNotice.d.ts +6 -0
  65. package/lib/typescript/commonjs/dataViewer/JsonStringNotice.d.ts.map +1 -0
  66. package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/dataViewer/TimestampDeltaBar.d.ts +7 -0
  68. package/lib/typescript/commonjs/dataViewer/TimestampDeltaBar.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/dataViewer/index.d.ts +6 -0
  70. package/lib/typescript/commonjs/dataViewer/index.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/dataViewer/jsonStringValue.d.ts +25 -0
  72. package/lib/typescript/commonjs/dataViewer/jsonStringValue.d.ts.map +1 -0
  73. package/lib/typescript/commonjs/dataViewer/timestampDiff.d.ts +55 -0
  74. package/lib/typescript/commonjs/dataViewer/timestampDiff.d.ts.map +1 -0
  75. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  76. package/lib/typescript/commonjs/index.d.ts +4 -3
  77. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/license/FeatureGate.d.ts +19 -3
  79. package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +23 -0
  81. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/license/index.d.ts +6 -15
  83. package/lib/typescript/commonjs/license/index.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/license/licenseModule.d.ts +55 -0
  85. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/license/tierLimits.d.ts +143 -0
  87. package/lib/typescript/commonjs/license/tierLimits.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +13 -0
  89. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -0
  90. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts +30 -0
  91. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +43 -0
  93. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -0
  95. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +106 -0
  97. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +28 -0
  99. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +27 -0
  101. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +14 -0
  103. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +65 -0
  105. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +33 -0
  107. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +1 -0
  108. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +12 -0
  109. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/ui/index.d.ts +1 -0
  111. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/utils/devServer.d.ts +24 -0
  113. package/lib/typescript/commonjs/utils/devServer.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/utils/index.d.ts +3 -2
  115. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/utils/renderCaptureRegistry.d.ts +52 -2
  117. package/lib/typescript/commonjs/utils/renderCaptureRegistry.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts +23 -0
  119. package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +1 -1
  120. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  121. package/lib/typescript/module/dataViewer/JsonStringNotice.d.ts +6 -0
  122. package/lib/typescript/module/dataViewer/JsonStringNotice.d.ts.map +1 -0
  123. package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts.map +1 -1
  124. package/lib/typescript/module/dataViewer/TimestampDeltaBar.d.ts +7 -0
  125. package/lib/typescript/module/dataViewer/TimestampDeltaBar.d.ts.map +1 -0
  126. package/lib/typescript/module/dataViewer/index.d.ts +6 -0
  127. package/lib/typescript/module/dataViewer/index.d.ts.map +1 -1
  128. package/lib/typescript/module/dataViewer/jsonStringValue.d.ts +25 -0
  129. package/lib/typescript/module/dataViewer/jsonStringValue.d.ts.map +1 -0
  130. package/lib/typescript/module/dataViewer/timestampDiff.d.ts +55 -0
  131. package/lib/typescript/module/dataViewer/timestampDiff.d.ts.map +1 -0
  132. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  133. package/lib/typescript/module/index.d.ts +4 -3
  134. package/lib/typescript/module/index.d.ts.map +1 -1
  135. package/lib/typescript/module/license/FeatureGate.d.ts +19 -3
  136. package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
  137. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +23 -0
  138. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -0
  139. package/lib/typescript/module/license/index.d.ts +6 -15
  140. package/lib/typescript/module/license/index.d.ts.map +1 -1
  141. package/lib/typescript/module/license/licenseModule.d.ts +55 -0
  142. package/lib/typescript/module/license/licenseModule.d.ts.map +1 -0
  143. package/lib/typescript/module/license/tierLimits.d.ts +143 -0
  144. package/lib/typescript/module/license/tierLimits.d.ts.map +1 -0
  145. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +13 -0
  146. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -0
  147. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts +30 -0
  148. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts.map +1 -0
  149. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +43 -0
  150. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -0
  151. package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -0
  152. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -0
  153. package/lib/typescript/module/ui/backgrounds/primitives.d.ts +106 -0
  154. package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -0
  155. package/lib/typescript/module/ui/backgrounds/registry.d.ts +28 -0
  156. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -0
  157. package/lib/typescript/module/ui/backgrounds/rng.d.ts +27 -0
  158. package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -0
  159. package/lib/typescript/module/ui/backgrounds/types.d.ts +14 -0
  160. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -0
  161. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +65 -0
  162. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -0
  163. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +33 -0
  164. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +1 -0
  165. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +12 -0
  166. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +1 -0
  167. package/lib/typescript/module/ui/index.d.ts +1 -0
  168. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  169. package/lib/typescript/module/utils/devServer.d.ts +24 -0
  170. package/lib/typescript/module/utils/devServer.d.ts.map +1 -0
  171. package/lib/typescript/module/utils/index.d.ts +3 -2
  172. package/lib/typescript/module/utils/index.d.ts.map +1 -1
  173. package/lib/typescript/module/utils/renderCaptureRegistry.d.ts +52 -2
  174. package/lib/typescript/module/utils/renderCaptureRegistry.d.ts.map +1 -1
  175. package/lib/typescript/module/utils/safeExpoRouter.d.ts +23 -0
  176. package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +1 -1
  177. package/package.json +4 -4
  178. package/scripts/detect-safe-area.js +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureGate.d.ts","sourceRoot":"","sources":["../../../../src/license/FeatureGate.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AAOhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKxD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAGjD;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,sBAUrD,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,GAAI,oCAI7B,oBAAoB,sBAUtB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,2CAI3B;IACD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,sBAiEA,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAI,mEAMzB,gBAAgB,sBAiClB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,IAAI;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,2DAA2D;IAC3D,UAAU,EAAE,OAAO,CAAC;IACpB,iEAAiE;IACjE,aAAa,EAAE,OAAO,CAAC;IACvB,4DAA4D;IAC5D,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAeA;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,GAAI,yCAI9B,qBAAqB,sBA+DvB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,GAAI,2DAM1B,iBAAiB,6BAuHnB,CAAC"}
1
+ {"version":3,"file":"FeatureGate.d.ts","sourceRoot":"","sources":["../../../../src/license/FeatureGate.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AAQhE,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKxD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAGjD;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,sBAUrD,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,GAAI,8CAK7B,oBAAoB,sBAiBtB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,qDAK3B;IACD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB,sBA6FA,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAI,mEAMzB,gBAAgB,sBAiClB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,IAAI;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,2DAA2D;IAC3D,UAAU,EAAE,OAAO,CAAC;IACpB,iEAAiE;IACjE,aAAa,EAAE,OAAO,CAAC;IACvB,4DAA4D;IAC5D,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAeA;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,GAAI,yCAI9B,qBAAqB,sBA+DvB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,GAAI,qEAO1B,iBAAiB,6BAwInB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The upsell an ANONYMOUS user sees — someone with no key at all.
3
+ *
4
+ * Deliberately not the Pro modal. Their next step is free and takes about
5
+ * thirty seconds, so asking them for money would be asking the wrong question
6
+ * at the wrong moment, and would suppress exactly the signup this exists to
7
+ * produce. Pro is still offered, as a secondary action.
8
+ *
9
+ * The command is shown inline and copyable rather than linked, because there is
10
+ * no grace period: someone who just watched their limits shrink needs the fix
11
+ * in front of them, not a link to a page that has a link to a command.
12
+ */
13
+ import React from "react";
14
+ /** The one thing a reader has to be able to act on. */
15
+ export declare const LOGIN_COMMAND = "npx buoy login";
16
+ export interface FreeAccountPromptProps {
17
+ visible: boolean;
18
+ onClose: () => void;
19
+ /** What the user just bumped into, e.g. "Network requests". */
20
+ featureName?: string;
21
+ }
22
+ export declare const FreeAccountPrompt: ({ visible, onClose, featureName, }: FreeAccountPromptProps) => React.JSX.Element | null;
23
+ //# sourceMappingURL=FreeAccountPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FreeAccountPrompt.d.ts","sourceRoot":"","sources":["../../../../src/license/FreeAccountPrompt.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAaxE,uDAAuD;AACvD,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAE9C,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,GAAI,oCAI/B,sBAAsB,6BAoFxB,CAAC"}
@@ -1,20 +1,11 @@
1
1
  export { FeatureGate, UpgradePrompt, useFeatureGate, ProFeatureBanner, UpgradeModal, ProBadge, ProUpgradeModal } from "./FeatureGate";
2
2
  export type { FeatureGateProps, ProFeatureBannerProps, UpgradeModalProps, ProUpgradeModalProps } from "./FeatureGate";
3
3
  export { LicenseEntryModal } from "./LicenseEntryModal";
4
+ export { FreeAccountPrompt, LOGIN_COMMAND } from "./FreeAccountPrompt";
5
+ export type { FreeAccountPromptProps } from "./FreeAccountPrompt";
4
6
  export type { LicenseEntryModalProps, LicenseState } from "./LicenseEntryModal";
5
- import type { LicenseState as LicenseStateType } from "./LicenseEntryModal";
6
- /**
7
- * Get the useIsPro hook from @buoy-gg/license
8
- * Falls back to () => false if license package is not available
9
- *
10
- * IMPORTANT: Use this instead of doing your own lazy loading in other packages
11
- */
12
- export declare function getUseIsPro(): () => boolean;
13
- /**
14
- * Get the useLicense hook from @buoy-gg/license
15
- * Returns null if license package is not available
16
- *
17
- * IMPORTANT: Use this instead of doing your own lazy loading in other packages
18
- */
19
- export declare function getUseLicense(): (() => LicenseStateType) | null;
7
+ export { getUseIsPro, getUseLicense, getUseTier, } from "./licenseModule";
8
+ export type { BuoyTier } from "./licenseModule";
9
+ export { TIER_LIMITS, useLimit, resolveEffectiveTier, freeKeyRaises } from "./tierLimits";
10
+ export type { TierLimitKey } from "./tierLimits";
20
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/license/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACtI,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEtH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAuB5E;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,OAAO,CAG3C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,CAAC,MAAM,gBAAgB,CAAC,GAAG,IAAI,CAG/D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/license/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACtI,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEtH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIhF,OAAO,EACL,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1F,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Centralized lazy loading of `@buoy-gg/license`.
3
+ *
4
+ * This is the SINGLE place any package resolves license hooks — tools must not
5
+ * `require("@buoy-gg/license")` themselves. Lives in its own module (rather
6
+ * than `./index`) so `tierLimits` can consume it without an import cycle.
7
+ */
8
+ import type { LicenseState as LicenseStateType } from "./LicenseEntryModal";
9
+ /** Access tier. Mirrors BuoyTier in @buoy-gg/license. */
10
+ export type BuoyTier = "anonymous" | "free" | "pro";
11
+ /**
12
+ * Get the useIsPro hook from @buoy-gg/license.
13
+ * Falls back to () => false if the license package is not available.
14
+ *
15
+ * IMPORTANT: Use this instead of doing your own lazy loading in other packages
16
+ */
17
+ export declare function getUseIsPro(): () => boolean;
18
+ /**
19
+ * Get the useLicense hook from @buoy-gg/license.
20
+ * Returns null if the license package is not available.
21
+ *
22
+ * IMPORTANT: Use this instead of doing your own lazy loading in other packages
23
+ */
24
+ export declare function getUseLicense(): (() => LicenseStateType) | null;
25
+ /**
26
+ * Get the useTier hook from @buoy-gg/license.
27
+ *
28
+ * Falls back to `"free"` — NOT `"anonymous"` — when the license package can't
29
+ * be resolved. That deliberately matches the existing `getUseIsPro()` fallback,
30
+ * which yields free-tier behavior today, and it picks the safer failure:
31
+ *
32
+ * - falling back to "anonymous" would let one bundler quirk silently cut every
33
+ * legitimate user's limits by ~80%;
34
+ * - falling back to "free" costs no revenue, because Pro still requires a key
35
+ * that a live license server validated — this path can never grant Pro.
36
+ *
37
+ * Reaching it at all requires `@buoy-gg/license` to be missing, and it is a
38
+ * hard dependency of `@buoy-gg/core`.
39
+ */
40
+ export declare function getUseTier(): () => BuoyTier;
41
+ /**
42
+ * Whether the anonymous tier is switched on.
43
+ *
44
+ * The switch itself lives in @buoy-gg/license (see its config.ts) because the
45
+ * Weekend Pass change has to flip at the same moment as the reduced limits, and
46
+ * those live in different packages. Read through the same lazy loader as the
47
+ * hooks so a missing license package degrades gracefully rather than throwing
48
+ * at module load.
49
+ *
50
+ * Falls back to `false` — the anonymous tier off, everyone on free limits —
51
+ * which matches the `getUseTier()` fallback of "free". A build that cannot
52
+ * resolve the license package must never take limits AWAY from someone.
53
+ */
54
+ export declare function isAnonymousTierEnabled(): boolean;
55
+ //# sourceMappingURL=licenseModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"licenseModule.d.ts","sourceRoot":"","sources":["../../../../src/license/licenseModule.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC;AA4BpD;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,OAAO,CAG3C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,CAAC,MAAM,gBAAgB,CAAC,GAAG,IAAI,CAG/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,IAAI,MAAM,QAAQ,CAG3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD"}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Per-tier numeric limits — the ONLY thing that separates anonymous from free.
3
+ *
4
+ * Every binary Pro gate (copy-to-clipboard, state editing, storage mutations,
5
+ * navigation) is identical for both: locked. That keeps the tier split to one
6
+ * table instead of scattered conditionals.
7
+ *
8
+ * The governing rule: **the free column never moves.** Anonymous is carved out
9
+ * BELOW today's free tier — nothing is ever added to free in exchange for an
10
+ * account, because that would come straight out of the Pro upgrade.
11
+ */
12
+ import { type BuoyTier } from "./licenseModule";
13
+ interface TierLimit {
14
+ /** No credential — a trial: every tool visible, much smaller caps. */
15
+ readonly anonymous: number;
16
+ /** A validated key on the Free policy. Today's free tier, unchanged. */
17
+ readonly free: number;
18
+ /** A validated key on the Solo or Business policy. */
19
+ readonly pro: number;
20
+ }
21
+ declare const LIMITS: {
22
+ "network.requests": {
23
+ anonymous: number;
24
+ free: number;
25
+ pro: number;
26
+ };
27
+ "network.saved": {
28
+ anonymous: number;
29
+ free: number;
30
+ pro: number;
31
+ };
32
+ "network.overrideRules": {
33
+ anonymous: number;
34
+ free: number;
35
+ pro: number;
36
+ };
37
+ "storage.events": {
38
+ anonymous: number;
39
+ free: number;
40
+ pro: number;
41
+ };
42
+ "storage.keys": {
43
+ anonymous: number;
44
+ free: number;
45
+ pro: number;
46
+ };
47
+ "storage.mmkvInstances": {
48
+ anonymous: number;
49
+ free: number;
50
+ pro: number;
51
+ };
52
+ "redux.actions": {
53
+ anonymous: number;
54
+ free: number;
55
+ pro: number;
56
+ };
57
+ "zustand.changes": {
58
+ anonymous: number;
59
+ free: number;
60
+ pro: number;
61
+ };
62
+ "jotai.changes": {
63
+ anonymous: number;
64
+ free: number;
65
+ pro: number;
66
+ };
67
+ "events.entries": {
68
+ anonymous: number;
69
+ free: number;
70
+ pro: number;
71
+ };
72
+ "highlightUpdates.components": {
73
+ anonymous: number;
74
+ free: number;
75
+ pro: number;
76
+ };
77
+ "highlightUpdates.historyEvents": {
78
+ anonymous: number;
79
+ free: number;
80
+ pro: number;
81
+ };
82
+ "highlightUpdates.detailEvents": {
83
+ anonymous: number;
84
+ free: number;
85
+ pro: number;
86
+ };
87
+ "routeEvents.entries": {
88
+ anonymous: number;
89
+ free: number;
90
+ pro: number;
91
+ };
92
+ "timeMachine.snapshots": {
93
+ anonymous: number;
94
+ free: number;
95
+ pro: number;
96
+ };
97
+ "perfMonitor.automationCases": {
98
+ anonymous: number;
99
+ free: number;
100
+ pro: number;
101
+ };
102
+ };
103
+ export type TierLimitKey = keyof typeof LIMITS;
104
+ export declare const TIER_LIMITS: Record<TierLimitKey, TierLimit>;
105
+ /**
106
+ * The tier whose limits actually apply.
107
+ *
108
+ * `hasProAccess` is `useIsPro()`, which is true for a real Pro license OR the
109
+ * free Weekend Pass. Routing the Weekend Pass through here is what keeps
110
+ * today's behavior intact: weekend users get Pro limits, exactly as they do
111
+ * now. When the Weekend Pass is later gated to key-holders, that change lands
112
+ * here for free — no limit call site has to know about it.
113
+ */
114
+ export declare function resolveEffectiveTier(tier: BuoyTier, hasProAccess: boolean): BuoyTier;
115
+ /**
116
+ * The limit for the current tier.
117
+ *
118
+ * Replaces the per-package `const FREE_TIER_X = 25` + `isPro ? Infinity : X`
119
+ * pattern. `Infinity` is returned for uncapped tiers and is safe to use
120
+ * directly in `slice(0, limit)` and `length >= limit` comparisons.
121
+ */
122
+ export declare function useLimit(key: TierLimitKey): number;
123
+ /**
124
+ * Whether claiming a FREE key would actually raise this limit right now.
125
+ *
126
+ * The anonymous upsell must never promise something a free key won't deliver.
127
+ * Two ways it could lie, and this closes both:
128
+ *
129
+ * - **Pro-exclusive features.** Copy-to-clipboard, state editing, storage
130
+ * mutations and navigation are locked for anonymous AND free alike. Telling
131
+ * an anonymous user a free key opens them would be false.
132
+ * - **Limits that are already equal.** Override rules and MMKV instances sit
133
+ * at 1 for both tiers, so a key changes nothing there either.
134
+ *
135
+ * It also respects `ANONYMOUS_TIER_ENABLED`: while the anonymous tier is off,
136
+ * an anonymous user is *already* getting the free limits, so there is nothing
137
+ * to claim and this correctly returns false everywhere. That falls out of
138
+ * asking `resolveEffectiveTier` rather than reading the table directly, so the
139
+ * switch and the copy can never disagree.
140
+ */
141
+ export declare function freeKeyRaises(key: TierLimitKey): boolean;
142
+ export {};
143
+ //# sourceMappingURL=tierLimits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tierLimits.d.ts","sourceRoot":"","sources":["../../../../src/license/tierLimits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,iBAAiB,CAAC;AAEzB,UAAU,SAAS;IACjB,sEAAsE;IACtE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BX,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,MAAM,CAAC;AAE/C,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,SAAS,CAAU,CAAC;AAEnE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,OAAO,GACpB,QAAQ,CAMV;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAIlD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAMxD"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The ‹ prev / next › strip for auditioning backgrounds.
3
+ *
4
+ * This is a REVIEW control, not shipped chrome: it exists so the whole
5
+ * catalogue can be walked without a rebuild, with the cost of each preset shown
6
+ * next to its name. Mount it at the top of a tool's body while evaluating, and
7
+ * pull it once a winner is picked (or keep it behind a setting).
8
+ *
9
+ * It writes to the shared `backgroundStore`, so stepping here changes the
10
+ * background in every tool at once.
11
+ */
12
+ export declare const BackgroundSwitcher: import("react").NamedExoticComponent<object>;
13
+ //# sourceMappingURL=BackgroundSwitcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackgroundSwitcher.d.ts","sourceRoot":"","sources":["../../../../../src/ui/backgrounds/BackgroundSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,eAAO,MAAM,kBAAkB,8CA6D7B,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Drop-in animated backdrop for a Buoy tool surface.
3
+ *
4
+ * Mount it as the FIRST child of a tool's body container and everything after
5
+ * it draws on top:
6
+ *
7
+ * <View style={styles.container}>
8
+ * <ToolBackground />
9
+ * ...screens...
10
+ * </View>
11
+ *
12
+ * It is `position: absolute` + `pointerEvents: "none"`, so it never affects
13
+ * layout and never eats a touch. The preset comes from the shared persisted
14
+ * selection (`backgroundStore`), so switching it in one tool switches it in all
15
+ * of them.
16
+ */
17
+ import type { BackgroundId } from "./types";
18
+ export interface ToolBackgroundProps {
19
+ /**
20
+ * Force a specific preset instead of following the shared selection. The
21
+ * switcher's live preview uses this; tools should omit it.
22
+ */
23
+ id?: BackgroundId;
24
+ /** Force motion off regardless of the shared setting. */
25
+ motion?: boolean;
26
+ /** Multiplied into the whole layer's opacity — dial it down per tool. */
27
+ opacity?: number;
28
+ }
29
+ export declare const ToolBackground: import("react").NamedExoticComponent<ToolBackgroundProps>;
30
+ //# sourceMappingURL=ToolBackground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolBackground.d.ts","sourceRoot":"","sources":["../../../../../src/ui/backgrounds/ToolBackground.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAU5C,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,yDAAyD;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,2DAgCzB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The persisted background selection, shared by every tool.
3
+ *
4
+ * A singleton rather than context so a tool anywhere in the tree — modal,
5
+ * inline desktop panel, bottom sheet — reads the same choice without a provider
6
+ * having to wrap it. Same shape as `ignoredPatternsStore`: subscribe/notify,
7
+ * best-effort persistence, a dirty flag so a slow initial read can't clobber a
8
+ * choice the user already made.
9
+ */
10
+ import type { BackgroundId } from "./types";
11
+ type Listener = () => void;
12
+ declare class BackgroundStore {
13
+ private id;
14
+ private motion;
15
+ private readonly listeners;
16
+ private loadPromise;
17
+ private dirty;
18
+ getId(): BackgroundId;
19
+ getMotion(): boolean;
20
+ subscribe(listener: Listener): () => void;
21
+ private notify;
22
+ private load;
23
+ private persist;
24
+ setId(id: BackgroundId): void;
25
+ /** Step through the catalogue; `delta` is +1 (next) or -1 (previous). */
26
+ step(delta: number): void;
27
+ setMotion(motion: boolean): void;
28
+ }
29
+ export declare const backgroundStore: BackgroundStore;
30
+ export interface UseToolBackgroundResult {
31
+ id: BackgroundId;
32
+ motion: boolean;
33
+ index: number;
34
+ count: number;
35
+ setId: (id: BackgroundId) => void;
36
+ next: () => void;
37
+ previous: () => void;
38
+ setMotion: (motion: boolean) => void;
39
+ }
40
+ /** Subscribe a component to the current background selection. */
41
+ export declare function useToolBackground(): UseToolBackgroundResult;
42
+ export {};
43
+ //# sourceMappingURL=backgroundStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backgroundStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/backgrounds/backgroundStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAS5C,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAQ3B,cAAM,eAAe;IACnB,OAAO,CAAC,EAAE,CAAoC;IAC9C,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuB;IACjD,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,KAAK,CAAS;IAEtB,KAAK,IAAI,YAAY;IAIrB,SAAS,IAAI,OAAO;IAIpB,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI;IAQzC,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,IAAI;IAiBZ,OAAO,CAAC,OAAO;IAMf,KAAK,CAAC,EAAE,EAAE,YAAY;IAOtB,yEAAyE;IACzE,IAAI,CAAC,KAAK,EAAE,MAAM;IAIlB,SAAS,CAAC,MAAM,EAAE,OAAO;CAM1B;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,YAAY,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,EAAE,YAAY,KAAK,IAAI,CAAC;IAClC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC;AAED,iEAAiE;AACjE,wBAAgB,iBAAiB,IAAI,uBAAuB,CAuB3D"}
@@ -0,0 +1,7 @@
1
+ export { ToolBackground, type ToolBackgroundProps } from "./ToolBackground";
2
+ export { BackgroundSwitcher } from "./BackgroundSwitcher";
3
+ export { backgroundStore, useToolBackground, type UseToolBackgroundResult, } from "./backgroundStore";
4
+ export { BACKGROUND_PRESETS, DEFAULT_BACKGROUND, getPreset, presetAt, presetIndex, type BackgroundPreset, } from "./registry";
5
+ export type { BackgroundId, BackgroundVariantProps } from "./types";
6
+ export { DeepFieldTunable, type DeepFieldTuning, type HaloMode, type TwinkleMode, } from "./variants/deepField";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/backgrounds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,KAAK,uBAAuB,GAC7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAGpE,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Drawing + animation primitives for the tool backgrounds.
3
+ *
4
+ * HARD CONSTRAINT: Buoy's packages peer-depend on nothing but `react` and
5
+ * `react-native`. No Skia, no Reanimated, no SVG, no gradient library — a
6
+ * devtool cannot force a native dependency into someone's app. So every
7
+ * background here is built out of plain `View`s plus `Animated`, and the
8
+ * gradients/glows below are *faked* by stacking translucent layers.
9
+ *
10
+ * That sounds expensive. It isn't, because of two rules every preset follows:
11
+ *
12
+ * 1. **Every animation is native-driven.** `useNativeDriver: true` on a
13
+ * looping `Animated.timing` means the whole loop is handed to the UI thread
14
+ * once and never touches JS again — no per-frame callback, no re-render, no
15
+ * bridge traffic while it runs. A preset animates a handful of *layers*
16
+ * (transform on one parent view), never per-particle.
17
+ *
18
+ * 2. **Every static layer is rasterized.** `shouldRasterizeIOS` /
19
+ * `renderToHardwareTextureAndroid` turn a layer of 40 dots into a single
20
+ * cached GPU texture, so sliding it is one composite — the same cost as
21
+ * sliding one view. See `RasterLayer`.
22
+ *
23
+ * The result: a preset costs a one-time mount of static views and then ~0
24
+ * JS-thread work per frame. See `packages/shared/src/ui/backgrounds/README.md`.
25
+ */
26
+ import { Animated, type ViewStyle } from "react-native";
27
+ /**
28
+ * A native-driven 0→1 loop.
29
+ *
30
+ * The returned value is only ever consumed by `interpolate` inside an
31
+ * `Animated.View` style, so React never re-renders while it runs. The loop is
32
+ * stopped when the app backgrounds (a background animation is pure battery
33
+ * burn) and restarted on foreground.
34
+ */
35
+ export declare function useLoop(durationMs: number, enabled?: boolean): Animated.Value;
36
+ /**
37
+ * A native-driven 0→1→0 breathe, for glows that pulse rather than travel.
38
+ * Same no-JS-per-frame guarantee as `useLoop`.
39
+ */
40
+ export declare function usePulse(durationMs: number, enabled?: boolean): Animated.Value;
41
+ /**
42
+ * A layer whose children are static and should be flattened into one GPU
43
+ * texture. Wrap anything that gets translated/scaled as a whole — this is what
44
+ * makes a 40-dot star band cost the same to move as a single view.
45
+ */
46
+ export declare const RasterLayer: import("react").NamedExoticComponent<{
47
+ style?: ViewStyle | ViewStyle[];
48
+ /**
49
+ * Off turns this into a plain `View`. Rasterizing is a win for a small,
50
+ * busy layer and a LOSS for a large one — the offscreen buffer has to be
51
+ * allocated and blitted every frame it moves. Presets with big travelling
52
+ * layers should measure both ways rather than assume.
53
+ */
54
+ raster?: boolean;
55
+ children: React.ReactNode;
56
+ }>;
57
+ /**
58
+ * Fake radial gradient: concentric rounded views, each a constant per-ring
59
+ * alpha, with radii shrinking on a curve. Alpha compositing of N equal layers
60
+ * gives `1 - (1-a)^N` at the centre, so `a` is solved from the requested peak
61
+ * alpha and the falloff comes from the radius curve.
62
+ *
63
+ * 8 rings is the sweet spot on a dark surface — below that you can see banding,
64
+ * above it you're paying for views nobody can distinguish.
65
+ */
66
+ export declare const RadialGlow: import("react").NamedExoticComponent<{
67
+ size: number;
68
+ color: string;
69
+ /** Peak (centre) alpha. */
70
+ alpha?: number;
71
+ rings?: number;
72
+ /** >1 concentrates the light in the middle; 1 is a linear cone. */
73
+ falloff?: number;
74
+ style?: ViewStyle;
75
+ }>;
76
+ /**
77
+ * Fake linear gradient: `bands` stacked strips with linearly interpolated
78
+ * alpha. Used for scrims (keep text readable over a busy field) and for
79
+ * horizon glows. 12–16 bands is invisible as banding at these alphas.
80
+ */
81
+ export declare const LinearFade: import("react").NamedExoticComponent<{
82
+ color: string;
83
+ /** Alpha at the start edge. */
84
+ from?: number;
85
+ /** Alpha at the end edge. */
86
+ to?: number;
87
+ bands?: number;
88
+ direction?: "down" | "up" | "left" | "right";
89
+ style?: ViewStyle;
90
+ }>;
91
+ /**
92
+ * Edge darkening. Four `LinearFade`s rather than a real radial vignette —
93
+ * cheaper, and at these alphas the corners read as round anyway.
94
+ */
95
+ export declare const Vignette: import("react").NamedExoticComponent<{
96
+ color?: string;
97
+ alpha?: number;
98
+ /** Fraction of each edge the fade covers. */
99
+ spread?: number;
100
+ }>;
101
+ /** Flat wash used as the base coat under every preset. */
102
+ export declare const Base: import("react").NamedExoticComponent<{
103
+ color: string;
104
+ }>;
105
+ export declare const hairline: number;
106
+ //# sourceMappingURL=primitives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../src/ui/backgrounds/primitives.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EACL,QAAQ,EAMR,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAQtB;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,UAAO,GAAG,QAAQ,CAAC,KAAK,CAsC1E;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,UAAO,GAAG,QAAQ,CAAC,KAAK,CA6C3E;AAMD;;;;GAIG;AACH,eAAO,MAAM,WAAW;YAKd,SAAS,GAAG,SAAS,EAAE;IAC/B;;;;;OAKG;aACM,OAAO;cACN,KAAK,CAAC,SAAS;EAezB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU;UAQf,MAAM;WACL,MAAM;IACb,2BAA2B;YACnB,MAAM;YACN,MAAM;IACd,mEAAmE;cACzD,MAAM;YACR,SAAS;EA+BjB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,UAAU;WAQd,MAAM;IACb,+BAA+B;WACxB,MAAM;IACb,6BAA6B;SACxB,MAAM;YACH,MAAM;gBACF,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO;YACpC,SAAS;EAuCjB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,QAAQ;YAKX,MAAM;YACN,MAAM;IACd,6CAA6C;aACpC,MAAM;EAqBf,CAAC;AAEH,0DAA0D;AAC1D,eAAO,MAAM,IAAI;WAA0C,MAAM;EAO/D,CAAC;AAEH,eAAO,MAAM,QAAQ,QAA2B,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The catalogue. Adding a preset means adding one entry here — the switcher,
3
+ * the persisted selection and every tool surface read from this list.
4
+ *
5
+ * `nodes` and `views` are not decoration: they are the number of native
6
+ * animated nodes the preset runs and the rough count of static views it mounts,
7
+ * so the switcher can show what each look costs while you compare them. Keep
8
+ * them honest.
9
+ */
10
+ import type { ComponentType } from "react";
11
+ import type { BackgroundId, BackgroundVariantProps } from "./types";
12
+ export interface BackgroundPreset {
13
+ id: BackgroundId;
14
+ label: string;
15
+ /** One line, shown under the name in the switcher. */
16
+ blurb: string;
17
+ /** Animated nodes running while visible (all native-driven). */
18
+ nodes: number;
19
+ /** Approximate static views mounted once, at a 380×620 surface. */
20
+ views: number;
21
+ Component: ComponentType<BackgroundVariantProps> | null;
22
+ }
23
+ export declare const BACKGROUND_PRESETS: BackgroundPreset[];
24
+ export declare const DEFAULT_BACKGROUND: BackgroundId;
25
+ export declare function presetIndex(id: BackgroundId): number;
26
+ export declare function presetAt(index: number): BackgroundPreset;
27
+ export declare function getPreset(id: BackgroundId): BackgroundPreset;
28
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../../src/ui/backgrounds/registry.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAa3C,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,aAAa,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC;CACzD;AAED,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAyFhD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAAwB,CAAC;AAE1D,wBAAgB,WAAW,CAAC,EAAE,EAAE,YAAY,GAAG,MAAM,CAGpD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAGxD;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,YAAY,GAAG,gBAAgB,CAE5D"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Deterministic scatter tables for the tool backgrounds.
3
+ *
4
+ * Every preset needs a pile of "random" positions, sizes and phases. Those are
5
+ * generated ONCE at module load from a fixed seed and frozen, so:
6
+ * - the same seed always paints the same field (screenshots are stable, and
7
+ * two tools showing the same background look identical),
8
+ * - no allocation happens on mount or on any re-render — the presets only
9
+ * read these arrays.
10
+ *
11
+ * Ported from the seeded field in the Everlights starfield (mulberry32).
12
+ */
13
+ export declare function mulberry32(seed: number): () => number;
14
+ /** `count` numbers in [0,1) from `seed`. */
15
+ export declare function scatter(seed: number, count: number): number[];
16
+ /** `#RRGGBB` (or `#RGB`) + alpha 0..1 → `rgba(...)`. */
17
+ export declare function withAlpha(hex: string, alpha: number): string;
18
+ /**
19
+ * `hex` at `alpha` composited over an opaque `base`, returned as an OPAQUE
20
+ * colour.
21
+ *
22
+ * Over a known backdrop this is pixel-identical to drawing the translucent
23
+ * colour — the GPU just doesn't have to blend it. Only valid where nothing
24
+ * else sits between the layer and `base`.
25
+ */
26
+ export declare function flattenOver(hex: string, alpha: number, base: string): string;
27
+ //# sourceMappingURL=rng.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../../../../src/ui/backgrounds/rng.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,MAAM,CAOrD;AAED,4CAA4C;AAC5C,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAK7D;AAED,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS5D;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAY5E"}
@@ -0,0 +1,14 @@
1
+ /** Shared contract for every background preset. */
2
+ export interface BackgroundVariantProps {
3
+ /** Measured surface size, in px. Presets are only mounted once this is > 0. */
4
+ width: number;
5
+ height: number;
6
+ /**
7
+ * False → paint the field but start no loops. Set when the user turns motion
8
+ * off, so a preset degrades to its (still good-looking) static form instead
9
+ * of disappearing.
10
+ */
11
+ animated: boolean;
12
+ }
13
+ export type BackgroundId = "off" | "starfield" | "deepfield" | "hexmesh" | "isogrid" | "crosshatch" | "perfboard" | "halftone" | "waffle" | "instrument" | "radar";
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/ui/backgrounds/types.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,WAAW,GACX,WAAW,GACX,SAAS,GACT,SAAS,GACT,YAAY,GACZ,WAAW,GACX,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC"}