@buoy-gg/shared-ui 7.0.22 → 7.0.24

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 (154) 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 +50 -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/module/JsModal.js +39 -16
  29. package/lib/module/dataViewer/JsonStringNotice.js +54 -0
  30. package/lib/module/dataViewer/ThemedSplitView.js +20 -1
  31. package/lib/module/dataViewer/TimestampDeltaBar.js +91 -0
  32. package/lib/module/dataViewer/index.js +4 -0
  33. package/lib/module/dataViewer/jsonStringValue.js +89 -0
  34. package/lib/module/dataViewer/timestampDiff.js +139 -0
  35. package/lib/module/hooks/safe-area-impl.js +1 -1
  36. package/lib/module/index.js +1 -1
  37. package/lib/module/license/FeatureGate.js +43 -10
  38. package/lib/module/license/FreeAccountPrompt.js +176 -0
  39. package/lib/module/license/index.js +5 -40
  40. package/lib/module/license/licenseModule.js +92 -0
  41. package/lib/module/license/tierLimits.js +158 -0
  42. package/lib/module/ui/backgrounds/BackgroundSwitcher.js +176 -0
  43. package/lib/module/ui/backgrounds/README.md +115 -0
  44. package/lib/module/ui/backgrounds/ToolBackground.js +70 -0
  45. package/lib/module/ui/backgrounds/backgroundStore.js +111 -0
  46. package/lib/module/ui/backgrounds/index.js +9 -0
  47. package/lib/module/ui/backgrounds/primitives.js +328 -0
  48. package/lib/module/ui/backgrounds/registry.js +105 -0
  49. package/lib/module/ui/backgrounds/rng.js +65 -0
  50. package/lib/module/ui/backgrounds/types.js +1 -0
  51. package/lib/module/ui/backgrounds/variants/deepField.js +347 -0
  52. package/lib/module/ui/backgrounds/variants/lattice.js +575 -0
  53. package/lib/module/ui/backgrounds/variants/starfield.js +206 -0
  54. package/lib/module/ui/index.js +3 -0
  55. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  56. package/lib/typescript/commonjs/dataViewer/JsonStringNotice.d.ts +6 -0
  57. package/lib/typescript/commonjs/dataViewer/JsonStringNotice.d.ts.map +1 -0
  58. package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts.map +1 -1
  59. package/lib/typescript/commonjs/dataViewer/TimestampDeltaBar.d.ts +7 -0
  60. package/lib/typescript/commonjs/dataViewer/TimestampDeltaBar.d.ts.map +1 -0
  61. package/lib/typescript/commonjs/dataViewer/index.d.ts +6 -0
  62. package/lib/typescript/commonjs/dataViewer/index.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/dataViewer/jsonStringValue.d.ts +25 -0
  64. package/lib/typescript/commonjs/dataViewer/jsonStringValue.d.ts.map +1 -0
  65. package/lib/typescript/commonjs/dataViewer/timestampDiff.d.ts +55 -0
  66. package/lib/typescript/commonjs/dataViewer/timestampDiff.d.ts.map +1 -0
  67. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  68. package/lib/typescript/commonjs/index.d.ts +2 -2
  69. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  70. package/lib/typescript/commonjs/license/FeatureGate.d.ts +19 -3
  71. package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
  72. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +23 -0
  73. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -0
  74. package/lib/typescript/commonjs/license/index.d.ts +6 -15
  75. package/lib/typescript/commonjs/license/index.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/license/licenseModule.d.ts +55 -0
  77. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -0
  78. package/lib/typescript/commonjs/license/tierLimits.d.ts +143 -0
  79. package/lib/typescript/commonjs/license/tierLimits.d.ts.map +1 -0
  80. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +13 -0
  81. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts +30 -0
  83. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts.map +1 -0
  84. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +43 -0
  85. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -0
  87. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +106 -0
  89. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -0
  90. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +28 -0
  91. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +27 -0
  93. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +14 -0
  95. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +65 -0
  97. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +33 -0
  99. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +12 -0
  101. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/ui/index.d.ts +1 -0
  103. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  104. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  105. package/lib/typescript/module/dataViewer/JsonStringNotice.d.ts +6 -0
  106. package/lib/typescript/module/dataViewer/JsonStringNotice.d.ts.map +1 -0
  107. package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts.map +1 -1
  108. package/lib/typescript/module/dataViewer/TimestampDeltaBar.d.ts +7 -0
  109. package/lib/typescript/module/dataViewer/TimestampDeltaBar.d.ts.map +1 -0
  110. package/lib/typescript/module/dataViewer/index.d.ts +6 -0
  111. package/lib/typescript/module/dataViewer/index.d.ts.map +1 -1
  112. package/lib/typescript/module/dataViewer/jsonStringValue.d.ts +25 -0
  113. package/lib/typescript/module/dataViewer/jsonStringValue.d.ts.map +1 -0
  114. package/lib/typescript/module/dataViewer/timestampDiff.d.ts +55 -0
  115. package/lib/typescript/module/dataViewer/timestampDiff.d.ts.map +1 -0
  116. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  117. package/lib/typescript/module/index.d.ts +2 -2
  118. package/lib/typescript/module/index.d.ts.map +1 -1
  119. package/lib/typescript/module/license/FeatureGate.d.ts +19 -3
  120. package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
  121. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +23 -0
  122. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -0
  123. package/lib/typescript/module/license/index.d.ts +6 -15
  124. package/lib/typescript/module/license/index.d.ts.map +1 -1
  125. package/lib/typescript/module/license/licenseModule.d.ts +55 -0
  126. package/lib/typescript/module/license/licenseModule.d.ts.map +1 -0
  127. package/lib/typescript/module/license/tierLimits.d.ts +143 -0
  128. package/lib/typescript/module/license/tierLimits.d.ts.map +1 -0
  129. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +13 -0
  130. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -0
  131. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts +30 -0
  132. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts.map +1 -0
  133. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +43 -0
  134. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -0
  135. package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -0
  136. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -0
  137. package/lib/typescript/module/ui/backgrounds/primitives.d.ts +106 -0
  138. package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -0
  139. package/lib/typescript/module/ui/backgrounds/registry.d.ts +28 -0
  140. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -0
  141. package/lib/typescript/module/ui/backgrounds/rng.d.ts +27 -0
  142. package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -0
  143. package/lib/typescript/module/ui/backgrounds/types.d.ts +14 -0
  144. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -0
  145. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +65 -0
  146. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -0
  147. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +33 -0
  148. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +1 -0
  149. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +12 -0
  150. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +1 -0
  151. package/lib/typescript/module/ui/index.d.ts +1 -0
  152. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  153. package/package.json +4 -4
  154. package/scripts/detect-safe-area.js +0 -20
@@ -19,6 +19,12 @@ export { SplitDiffViewer } from "./SplitDiffViewer";
19
19
  export type { SplitDiffViewerProps, SplitDiffViewerOptions } from "./SplitDiffViewer";
20
20
  export { DiffSummary } from "./DiffSummary";
21
21
  export type { DiffSummaryProps } from "./DiffSummary";
22
+ export { TimestampDeltaBar } from "./TimestampDeltaBar";
23
+ export { JsonStringNotice } from "./JsonStringNotice";
24
+ export { decodeJsonStringPair, parseJsonContainer } from "./jsonStringValue";
25
+ export type { DecodedJsonPair } from "./jsonStringValue";
26
+ export { detectTimestamp, describeTimestampDeltas, formatDuration, formatInstant, } from "./timestampDiff";
27
+ export type { DetectedTimestamp, TimestampDelta, TimestampKind, } from "./timestampDiff";
22
28
  export { computeLineDiff, DiffType, ABSENT_VALUE, isAbsent, type LineDiffInfo, type WordDiff, type DiffComputeOptions, } from "./lineDiff";
23
29
  export { diffThemes, gitClassicTheme, devToolsDefaultTheme, type DiffTheme, type DiffThemeKey, } from "./diffThemes";
24
30
  export { objectDiff, boundedDeepEqual, toDiffable, jsonLikelyLargerThan, type ObjectDiffOptions, type ObjectDiffResult, } from "./objectDiff";
@@ -1 +1 @@
1
- {"version":3,"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jB,KAAK,QAAQ,EACb,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,KAAK,SAAS,EACd,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C;;;;GAIG;AACH,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAIlE,OAAO,EACL,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,MAAM,GACZ,MAAM,WAAW,CAAC;AAInB,OAAO,EACL,cAAc,EACd,aAAa,EACb,UAAU,EACV,SAAS,EACT,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACvB,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,sBAAsB,GAC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
+ * successfully decoded `null`-ish payload is still distinguishable from "not
4
+ * decodable" (the prefix check makes that unreachable today, but callers
5
+ * shouldn't have to know that).
6
+ */
7
+ export declare function parseJsonContainer(value: unknown): {
8
+ value: unknown;
9
+ } | null;
10
+ export interface DecodedJsonPair {
11
+ left: unknown;
12
+ right: unknown;
13
+ /** True when the pair was unwrapped and the UI must say so. */
14
+ decoded: boolean;
15
+ }
16
+ /**
17
+ * Decode both sides of a diff when they are JSON-encoded containers.
18
+ *
19
+ * One side alone is decoded ONLY when the other side is missing entirely
20
+ * (a key being added or removed). A JSON string on one side and an ordinary
21
+ * value on the other is a change of shape, and decoding just one half would
22
+ * present it as something it isn't.
23
+ */
24
+ export declare function decodeJsonStringPair(left: unknown, right: unknown): DecodedJsonPair;
25
+ //# sourceMappingURL=jsonStringValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonStringValue.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/jsonStringValue.ts"],"names":[],"mappings":"AAsBA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAa5E;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,+DAA+D;IAC/D,OAAO,EAAE,OAAO,CAAC;CAClB;AAOD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,OAAO,GACb,eAAe,CAcjB"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Timestamp detection for diff views.
3
+ *
4
+ * `1787085897165 → 1787012175875` is unreadable. It is also the single most
5
+ * common diff in a devtool: `lastSyncTimestamp`, `expiresAt`, `updatedAt`,
6
+ * every cache stamp. This turns that pair into "20h 29m earlier" plus both
7
+ * instants spelled out, WITHOUT hiding the raw values — a devtool that
8
+ * silently reinterprets what is stored is worse than one that says nothing.
9
+ *
10
+ * DETECTION IS DELIBERATELY NARROW, because the failure mode is confidently
11
+ * mislabelling an id or a counter as a date:
12
+ * - Epoch milliseconds only in [2001-09-09, 2100), i.e. 13 digits.
13
+ * - Epoch seconds only in the same window, i.e. 10 digits.
14
+ * The two ranges cannot overlap, so a value is never ambiguous.
15
+ * - ISO 8601 strings that both match the shape AND parse.
16
+ * - BOTH sides must be the same kind. An ISO string against an epoch number
17
+ * is a representation change, not a time delta, and reporting a gap there
18
+ * would bury the more interesting fact.
19
+ */
20
+ /** Units we recognize. A pair must agree on one of them. */
21
+ export type TimestampKind = "epoch-ms" | "epoch-s" | "iso";
22
+ export interface DetectedTimestamp {
23
+ kind: TimestampKind;
24
+ epochMs: number;
25
+ }
26
+ export interface TimestampDelta {
27
+ /** Object key this pair came from; absent when the value itself is a time. */
28
+ path?: string;
29
+ kind: TimestampKind;
30
+ /** Signed: new − old. Negative means the new value is earlier. */
31
+ deltaMs: number;
32
+ /** "20h 29m earlier" · "4s later" · "same instant". */
33
+ deltaLabel: string;
34
+ /** Both sides as local wall-clock, e.g. "2026-08-18 18:31:37". */
35
+ fromLabel: string;
36
+ toLabel: string;
37
+ }
38
+ /**
39
+ * Read one value as an instant, or null when it isn't confidently a time.
40
+ * Numeric strings count: storage backends hand back everything as strings.
41
+ */
42
+ export declare function detectTimestamp(value: unknown): DetectedTimestamp | null;
43
+ /** Local wall-clock, fixed format — a devtool wants it sortable, not chatty. */
44
+ export declare function formatInstant(epochMs: number): string;
45
+ /** Coarsest two units that still carry the magnitude: "3d 4h", "5m 30s". */
46
+ export declare function formatDuration(ms: number): string;
47
+ /**
48
+ * Every timestamp pair worth explaining in a diff of these two values.
49
+ *
50
+ * Scalars give at most one entry. Plain objects are inspected ONE level deep
51
+ * — enough for the `{ updatedAt, expiresAt }` shape that dominates, without
52
+ * walking a whole document to hunt for dates.
53
+ */
54
+ export declare function describeTimestampDeltas(oldValue: unknown, newValue: unknown): TimestampDelta[];
55
+ //# sourceMappingURL=timestampDiff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestampDiff.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/timestampDiff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,4DAA4D;AAC5D,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,KAAK,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;IACpB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAoBD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,GAAG,IAAI,CAcxE;AAMD,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAejD;AAqCD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,OAAO,GAChB,cAAc,EAAE,CAgBlB"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated safe area implementation
3
3
  * Detected: none
4
- * Generated at: 2026-08-18T00:32:52.026Z
4
+ * Generated at: 2026-08-19T20:50:51.001Z
5
5
  *
6
6
  * DO NOT EDIT - This file is generated by scripts/detect-safe-area.js
7
7
  *
@@ -29,6 +29,6 @@ export type { Environment } from "./types/types";
29
29
  export { normalizeEnvironment } from "./types/types";
30
30
  export { HintsProvider, useHintsDisabled, useHintsContext } from "./context";
31
31
  export * from "./history";
32
- export { FeatureGate, UpgradePrompt, useFeatureGate, ProFeatureBanner, UpgradeModal, LicenseEntryModal, ProBadge, ProUpgradeModal, getUseIsPro, getUseLicense } from "./license";
33
- export type { FeatureGateProps, ProFeatureBannerProps, UpgradeModalProps, LicenseEntryModalProps, ProUpgradeModalProps } from "./license";
32
+ export { FeatureGate, UpgradePrompt, useFeatureGate, ProFeatureBanner, UpgradeModal, LicenseEntryModal, ProBadge, ProUpgradeModal, FreeAccountPrompt, LOGIN_COMMAND, getUseIsPro, getUseLicense, getUseTier, TIER_LIMITS, useLimit, resolveEffectiveTier, freeKeyRaises } from "./license";
33
+ export type { FeatureGateProps, ProFeatureBannerProps, UpgradeModalProps, LicenseEntryModalProps, ProUpgradeModalProps, FreeAccountPromptProps, BuoyTier, TierLimitKey } from "./license";
34
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,MAAM,CAAC;AAGrB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAEL,YAAY,EAEZ,YAAY,EACZ,iBAAiB,EAEjB,iBAAiB,EAEjB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EAErB,aAAa,EAEb,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,YAAY,EAEZ,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,EAEV,kBAAkB,EAClB,uBAAuB,EAEvB,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EAEtB,6BAA6B,EAC7B,yBAAyB,EACzB,wBAAwB,E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,MAAM,WAAW,CAAC;AAG7E,cAAc,WAAW,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAAE,QAAQ,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC3R,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -4,6 +4,7 @@
4
4
  * Wraps premium features and shows an upgrade prompt for free users.
5
5
  */
6
6
  import React, { ReactNode } from "react";
7
+ import { type TierLimitKey } from "./tierLimits";
7
8
  import type { ProAccessReason } from "@buoy-gg/license";
8
9
  export declare const WEEKEND_PASS_LABEL = "WEEKEND PASS";
9
10
  /**
@@ -24,8 +25,10 @@ export interface ProUpgradeModalProps {
24
25
  visible: boolean;
25
26
  onClose: () => void;
26
27
  featureName?: string;
28
+ /** See {@link UpgradeModalProps.limitKey}. */
29
+ limitKey?: TierLimitKey;
27
30
  }
28
- export declare const ProUpgradeModal: ({ visible, onClose, featureName, }: ProUpgradeModalProps) => React.JSX.Element;
31
+ export declare const ProUpgradeModal: ({ visible, onClose, featureName, limitKey, }: ProUpgradeModalProps) => React.JSX.Element;
29
32
  export interface FeatureGateProps {
30
33
  /**
31
34
  * Content to render when user has Pro access
@@ -55,10 +58,12 @@ export interface FeatureGateProps {
55
58
  * Default upgrade prompt shown when user doesn't have Pro access
56
59
  * Opens LicenseEntryModal when clicked (unless custom onUpgradePress provided)
57
60
  */
58
- export declare const UpgradePrompt: ({ featureName, onUpgradePress, compact, }: {
61
+ export declare const UpgradePrompt: ({ featureName, onUpgradePress, compact, limitKey, }: {
59
62
  featureName?: string;
60
63
  onUpgradePress?: () => void;
61
64
  compact?: boolean;
65
+ /** See {@link UpgradeModalProps.limitKey}. */
66
+ limitKey?: TierLimitKey;
62
67
  }) => React.JSX.Element;
63
68
  /**
64
69
  * Wraps content that requires Pro license.
@@ -131,6 +136,17 @@ export interface UpgradeModalProps {
131
136
  * List of Pro benefits to highlight
132
137
  */
133
138
  benefits?: string[];
139
+ /**
140
+ * The tier limit the user just hit, if this upsell is about a limit rather
141
+ * than a Pro-exclusive feature.
142
+ *
143
+ * Supplying it is what lets an anonymous user be offered a FREE key instead
144
+ * of a paid upgrade — but only when a free key would genuinely raise that
145
+ * limit. Omit it for Pro-only features (copy, state editing, storage
146
+ * mutations, navigation): those are locked for free users too, so promising
147
+ * a free key would be a lie.
148
+ */
149
+ limitKey?: TierLimitKey;
134
150
  }
135
- export declare const UpgradeModal: ({ visible, onClose, featureName, description, benefits, }: UpgradeModalProps) => React.JSX.Element | null;
151
+ export declare const UpgradeModal: ({ visible, onClose, featureName, description, benefits, limitKey, }: UpgradeModalProps) => React.JSX.Element | null;
136
152
  //# sourceMappingURL=FeatureGate.d.ts.map
@@ -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;CAC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zB;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"}