@buoy-gg/shared-ui 7.0.25 → 7.0.27

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 (209) hide show
  1. package/lib/commonjs/JsModal.js +156 -20
  2. package/lib/commonjs/JsModal.web.js +85 -39
  3. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +14 -4
  4. package/lib/commonjs/dataViewer/diffThemes.js +20 -18
  5. package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +8 -8
  6. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  7. package/lib/commonjs/icons/lucide-icons.js +74 -15
  8. package/lib/commonjs/index.js +86 -0
  9. package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +248 -74
  10. package/lib/commonjs/ui/backgrounds/README.md +102 -20
  11. package/lib/commonjs/ui/backgrounds/backgroundStore.js +20 -6
  12. package/lib/commonjs/ui/backgrounds/index.js +91 -1
  13. package/lib/commonjs/ui/backgrounds/primitives.js +50 -14
  14. package/lib/commonjs/ui/backgrounds/registry.js +41 -64
  15. package/lib/commonjs/ui/backgrounds/rng.js +21 -0
  16. package/lib/commonjs/ui/backgrounds/skyClock.js +45 -0
  17. package/lib/commonjs/ui/backgrounds/variants/daylight.js +453 -0
  18. package/lib/commonjs/ui/backgrounds/variants/deepField.js +60 -30
  19. package/lib/commonjs/ui/backgrounds/variants/hyperspace.js +218 -0
  20. package/lib/commonjs/ui/backgrounds/variants/liveSky.js +898 -0
  21. package/lib/commonjs/ui/backgrounds/variants/meteors.js +257 -0
  22. package/lib/commonjs/ui/backgrounds/variants/moonlight.js +472 -0
  23. package/lib/commonjs/ui/backgrounds/variants/underwater.js +757 -0
  24. package/lib/commonjs/ui/components/Badge.js +11 -10
  25. package/lib/commonjs/ui/components/CompactRow.js +30 -17
  26. package/lib/commonjs/ui/components/DevToolsCard.js +12 -8
  27. package/lib/commonjs/ui/components/DynamicFilterView.js +43 -41
  28. package/lib/commonjs/ui/components/EventStepperFooter.js +38 -10
  29. package/lib/commonjs/ui/components/FilterComponents.js +11 -11
  30. package/lib/commonjs/ui/components/ModalHeader.js +13 -13
  31. package/lib/commonjs/ui/components/SectionHeader.js +3 -1
  32. package/lib/commonjs/ui/components/StorageTypeBadge.js +3 -2
  33. package/lib/commonjs/ui/components/TabSelector.js +56 -38
  34. package/lib/commonjs/ui/components/ValueTypeBadge.js +7 -6
  35. package/lib/commonjs/ui/components/WindowControls.js +37 -10
  36. package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +8 -0
  37. package/lib/commonjs/ui/night/nightTheme.js +120 -0
  38. package/lib/commonjs/ui/night/primitives.js +498 -0
  39. package/lib/module/JsModal.js +156 -20
  40. package/lib/module/JsModal.web.js +83 -39
  41. package/lib/module/dataViewer/VirtualizedDataExplorer.js +14 -4
  42. package/lib/module/dataViewer/diffThemes.js +20 -18
  43. package/lib/module/dataViewer/tree/TreeDiffViewer.js +9 -9
  44. package/lib/module/hooks/safe-area-impl.js +1 -1
  45. package/lib/module/icons/lucide-icons.js +74 -15
  46. package/lib/module/index.js +4 -0
  47. package/lib/module/ui/backgrounds/BackgroundSwitcher.js +250 -76
  48. package/lib/module/ui/backgrounds/README.md +102 -20
  49. package/lib/module/ui/backgrounds/backgroundStore.js +19 -5
  50. package/lib/module/ui/backgrounds/index.js +11 -2
  51. package/lib/module/ui/backgrounds/primitives.js +53 -16
  52. package/lib/module/ui/backgrounds/registry.js +41 -64
  53. package/lib/module/ui/backgrounds/rng.js +20 -0
  54. package/lib/module/ui/backgrounds/skyClock.js +39 -0
  55. package/lib/module/ui/backgrounds/variants/daylight.js +449 -0
  56. package/lib/module/ui/backgrounds/variants/deepField.js +62 -31
  57. package/lib/module/ui/backgrounds/variants/hyperspace.js +214 -0
  58. package/lib/module/ui/backgrounds/variants/liveSky.js +893 -0
  59. package/lib/module/ui/backgrounds/variants/meteors.js +253 -0
  60. package/lib/module/ui/backgrounds/variants/moonlight.js +468 -0
  61. package/lib/module/ui/backgrounds/variants/underwater.js +753 -0
  62. package/lib/module/ui/components/Badge.js +11 -10
  63. package/lib/module/ui/components/CompactRow.js +30 -17
  64. package/lib/module/ui/components/DevToolsCard.js +12 -8
  65. package/lib/module/ui/components/DynamicFilterView.js +43 -41
  66. package/lib/module/ui/components/EventStepperFooter.js +38 -10
  67. package/lib/module/ui/components/FilterComponents.js +11 -11
  68. package/lib/module/ui/components/ModalHeader.js +13 -13
  69. package/lib/module/ui/components/SectionHeader.js +3 -1
  70. package/lib/module/ui/components/StorageTypeBadge.js +3 -2
  71. package/lib/module/ui/components/TabSelector.js +57 -39
  72. package/lib/module/ui/components/ValueTypeBadge.js +7 -6
  73. package/lib/module/ui/components/WindowControls.js +37 -10
  74. package/lib/module/ui/gameUI/constants/gameUIColors.js +8 -0
  75. package/lib/module/ui/night/nightTheme.js +116 -0
  76. package/lib/module/ui/night/primitives.js +485 -0
  77. package/lib/typescript/commonjs/JsModal.d.ts +18 -0
  78. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/JsModal.web.d.ts +13 -0
  80. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +3 -1
  83. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  86. package/lib/typescript/commonjs/icons/lucide-icons.d.ts +12 -1
  87. package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/index.d.ts +3 -0
  89. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
  91. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +3 -0
  93. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -1
  94. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -1
  95. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +18 -3
  97. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +8 -0
  99. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +6 -0
  101. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts +17 -0
  103. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +1 -1
  105. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts +30 -0
  107. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +1 -0
  108. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +19 -4
  109. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -1
  110. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts +39 -0
  111. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
  112. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts +41 -0
  113. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts +26 -0
  115. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts +35 -0
  117. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts +51 -0
  119. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts +2 -0
  124. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts +9 -0
  127. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts +4 -2
  130. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +8 -0
  132. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +113 -0
  134. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/ui/night/primitives.d.ts +111 -0
  136. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -0
  137. package/lib/typescript/module/JsModal.d.ts +18 -0
  138. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  139. package/lib/typescript/module/JsModal.web.d.ts +13 -0
  140. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  141. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  142. package/lib/typescript/module/dataViewer/diffThemes.d.ts +3 -1
  143. package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -1
  144. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  145. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  146. package/lib/typescript/module/icons/lucide-icons.d.ts +12 -1
  147. package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
  148. package/lib/typescript/module/index.d.ts +3 -0
  149. package/lib/typescript/module/index.d.ts.map +1 -1
  150. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
  151. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
  152. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +3 -0
  153. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -1
  154. package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -1
  155. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
  156. package/lib/typescript/module/ui/backgrounds/primitives.d.ts +18 -3
  157. package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -1
  158. package/lib/typescript/module/ui/backgrounds/registry.d.ts +8 -0
  159. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
  160. package/lib/typescript/module/ui/backgrounds/rng.d.ts +6 -0
  161. package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -1
  162. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts +17 -0
  163. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +1 -0
  164. package/lib/typescript/module/ui/backgrounds/types.d.ts +1 -1
  165. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
  166. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts +30 -0
  167. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +1 -0
  168. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +19 -4
  169. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -1
  170. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts +39 -0
  171. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
  172. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts +41 -0
  173. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
  174. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts +26 -0
  175. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +1 -0
  176. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts +35 -0
  177. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
  178. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts +51 -0
  179. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +1 -0
  180. package/lib/typescript/module/ui/components/Badge.d.ts.map +1 -1
  181. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
  182. package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
  183. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts +2 -0
  184. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
  185. package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +1 -1
  186. package/lib/typescript/module/ui/components/TabSelector.d.ts +9 -0
  187. package/lib/typescript/module/ui/components/TabSelector.d.ts.map +1 -1
  188. package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +1 -1
  189. package/lib/typescript/module/ui/components/WindowControls.d.ts +4 -2
  190. package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -1
  191. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +8 -0
  192. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  193. package/lib/typescript/module/ui/night/nightTheme.d.ts +113 -0
  194. package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -0
  195. package/lib/typescript/module/ui/night/primitives.d.ts +111 -0
  196. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -0
  197. package/package.json +4 -4
  198. package/lib/commonjs/ui/backgrounds/variants/lattice.js +0 -579
  199. package/lib/commonjs/ui/backgrounds/variants/starfield.js +0 -210
  200. package/lib/module/ui/backgrounds/variants/lattice.js +0 -575
  201. package/lib/module/ui/backgrounds/variants/starfield.js +0 -206
  202. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +0 -33
  203. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +0 -1
  204. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +0 -12
  205. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +0 -1
  206. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +0 -33
  207. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +0 -1
  208. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +0 -12
  209. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +0 -1
@@ -0,0 +1,753 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The underwater family — the Abyss feeling, explored.
5
+ *
6
+ * Abyss set the register: lit from the surface, near-black at the bottom,
7
+ * everything moving in tens of seconds. The other three stay inside it and
8
+ * change what lives in the water: bubbles rising through the light, a bloom
9
+ * of glowing jellyfish — big bells up front, small dim ones behind — pulsing
10
+ * past on the current.
11
+ *
12
+ * Same contract as ../README.md: native-driven loops only, static geometry
13
+ * rasterized, scatter tables at module load. Vertical travel tiles the way
14
+ * Starfield tiles horizontally — a two-height layer, everything drawn twice
15
+ * one height apart, translated a full height per loop so the seam never
16
+ * shows. Wobble and sway are multi-stop interpolates on the SAME loop value —
17
+ * never `Animated.sequence([timing, loop])`, which silently fails to drive
18
+ * natively.
19
+ */
20
+
21
+ import { memo } from "react";
22
+ import { Animated, Dimensions, View } from "react-native";
23
+ import { absoluteFill } from "../../../utils/absoluteFill.js";
24
+ import { Base, LinearFade, RadialGlow, RasterLayer, Vignette, useLoop, usePulse } from "../primitives.js";
25
+ import { scatter, withAlpha } from "../rng.js";
26
+
27
+ // ============================================================================
28
+ // Shared water: surface light, god rays, drifting particles
29
+ // ============================================================================
30
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
+ /**
32
+ * God rays: elongated squashed `RadialGlow`s hanging from above the surface.
33
+ * Squashed glows are circles under a scale, and circles antialias cleanly at
34
+ * any angle — the reason these aren't rotated strip stacks, which band.
35
+ * The shimmer is ONE node over the whole fan.
36
+ */
37
+ const Rays = /*#__PURE__*/memo(function Rays({
38
+ width,
39
+ rays,
40
+ animated
41
+ }) {
42
+ const shimmer = usePulse(9000, animated);
43
+ const opacity = shimmer.interpolate({
44
+ inputRange: [0, 1],
45
+ outputRange: [0.6, 1]
46
+ });
47
+ // Geometry is sized from the WINDOW, not the modal — resizing the modal
48
+ // must reveal more or less water, never stretch the light. Only each ray's
49
+ // POSITION distributes across the live width.
50
+ const refW = Dimensions.get("window").width;
51
+ return /*#__PURE__*/_jsx(Animated.View, {
52
+ style: [absoluteFill, {
53
+ opacity
54
+ }],
55
+ pointerEvents: "none",
56
+ children: rays.map((ray, i) => {
57
+ const size = refW * ray.size;
58
+ return /*#__PURE__*/_jsx(View, {
59
+ style: {
60
+ position: "absolute",
61
+ left: width * ray.at - size / 2,
62
+ top: -size * 0.35,
63
+ width: size,
64
+ height: size,
65
+ transform: [{
66
+ rotate: `${ray.tilt}deg`
67
+ }, {
68
+ scaleX: 0.2
69
+ }, {
70
+ scaleY: 1.15
71
+ }]
72
+ },
73
+ children: /*#__PURE__*/_jsx(RadialGlow, {
74
+ size: size,
75
+ color: "#2C6373",
76
+ alpha: ray.alpha,
77
+ rings: 7,
78
+ falloff: 1.6
79
+ })
80
+ }, i);
81
+ })
82
+ });
83
+ });
84
+
85
+ /**
86
+ * A band of particles travelling a full surface-height per loop — direction
87
+ * "down" is marine snow, "up" is anything buoyant. `render` draws one
88
+ * particle so each preset owns its look; `sway` (px) adds a whole-layer
89
+ * side-to-side wobble keyframed onto the same node.
90
+ */
91
+ export const DriftBand = /*#__PURE__*/memo(function DriftBand({
92
+ table,
93
+ count,
94
+ travelS,
95
+ direction,
96
+ sway = 0,
97
+ width,
98
+ height,
99
+ animated,
100
+ render
101
+ }) {
102
+ const t = useLoop(travelS * 1000, animated);
103
+ const translateY = t.interpolate({
104
+ inputRange: [0, 1],
105
+ outputRange: direction === "down" ? [0, height] : [0, -height]
106
+ });
107
+ const translateX = t.interpolate({
108
+ inputRange: [0, 0.25, 0.5, 0.75, 1],
109
+ outputRange: [0, sway, 0, -sway, 0]
110
+ });
111
+ const parts = [];
112
+ for (let i = 0; i < count; i++) {
113
+ const x = table[i * 3] * width;
114
+ const y = table[i * 3 + 1] * height;
115
+ const size = table[i * 3 + 2];
116
+ for (let copy = 0; copy < 2; copy++) {
117
+ parts.push(render(x, y + copy * height, size, `${i}-${copy}`));
118
+ }
119
+ }
120
+ return /*#__PURE__*/_jsx(Animated.View, {
121
+ style: [{
122
+ position: "absolute",
123
+ left: 0,
124
+ top: direction === "down" ? -height : 0,
125
+ width,
126
+ height: height * 2
127
+ }, {
128
+ transform: [{
129
+ translateY
130
+ }, {
131
+ translateX
132
+ }]
133
+ }],
134
+ pointerEvents: "none",
135
+ children: /*#__PURE__*/_jsx(RasterLayer, {
136
+ style: {
137
+ width,
138
+ height: height * 2
139
+ },
140
+ children: parts
141
+ })
142
+ });
143
+ });
144
+
145
+ /** The shared floor: base coat + surface light. */
146
+ export const Water = /*#__PURE__*/memo(function Water({
147
+ height,
148
+ vignette = 0.5,
149
+ base = "#030608",
150
+ wash = "#102833",
151
+ washAlpha = 0.5,
152
+ children
153
+ }) {
154
+ return (
155
+ /*#__PURE__*/
156
+ // Clips: geometry is window-sized now, so a small modal is a crop into
157
+ // the scene rather than a scaled-down copy of it.
158
+ _jsxs(View, {
159
+ style: [absoluteFill, {
160
+ overflow: "hidden"
161
+ }],
162
+ pointerEvents: "none",
163
+ children: [/*#__PURE__*/_jsx(Base, {
164
+ color: base
165
+ }), /*#__PURE__*/_jsx(View, {
166
+ style: {
167
+ position: "absolute",
168
+ left: 0,
169
+ right: 0,
170
+ top: 0,
171
+ height: height * 0.55
172
+ },
173
+ children: /*#__PURE__*/_jsx(LinearFade, {
174
+ color: wash,
175
+ from: washAlpha,
176
+ to: 0,
177
+ direction: "down",
178
+ bands: 20,
179
+ flattenBase: base
180
+ })
181
+ }), children, /*#__PURE__*/_jsx(Vignette, {
182
+ color: "#010304",
183
+ alpha: vignette,
184
+ spread: 0.36
185
+ })]
186
+ })
187
+ );
188
+ });
189
+
190
+ // ============================================================================
191
+ // Abyss — a surface light fanning into the deep
192
+ // ============================================================================
193
+
194
+ const ABYSS_BASE = "#04080F";
195
+
196
+ /**
197
+ * The whole scene radiates from ONE bright point at the top-centre surface:
198
+ * a hot bloom, and a fan of beams pivoting from it — each beam is the
199
+ * Lighthouse construction (a squashed `RadialGlow` in the right half of an
200
+ * end-pivot container; never rotated strips, which band). The beams' dim
201
+ * near-ends hide under the source bloom, so the composite is brightest at
202
+ * the surface and dies into the dark, like the reference.
203
+ *
204
+ * Beams: [angle° (90 = straight down), squash, alpha, color] — brightest
205
+ * near vertical, dimming toward the fan's edges.
206
+ */
207
+ const ABYSS_BEAMS = [[46, 0.05, 0.08, "#35598F"], [64, 0.07, 0.12, "#466FA8"], [81, 0.09, 0.16, "#5580BE"], [97, 0.08, 0.15, "#5580BE"], [114, 0.06, 0.11, "#466FA8"], [133, 0.05, 0.07, "#35598F"]];
208
+ const RayFan = /*#__PURE__*/memo(function RayFan({
209
+ width,
210
+ animated
211
+ }) {
212
+ const shimmer = usePulse(9000, animated);
213
+ const opacity = shimmer.interpolate({
214
+ inputRange: [0, 1],
215
+ outputRange: [0.65, 1]
216
+ });
217
+ // Window-sized geometry (the fixed-geometry contract): the source's
218
+ // POSITION follows the modal's top-centre, nothing rescales.
219
+ const ref = Dimensions.get("window");
220
+ const reach = ref.height * 0.62;
221
+ const bloom = Math.min(Math.min(ref.width, ref.height) * 0.42, 360);
222
+ const sx = width * 0.5;
223
+ const sy = -10;
224
+ return /*#__PURE__*/_jsxs(Animated.View, {
225
+ style: [absoluteFill, {
226
+ opacity
227
+ }],
228
+ pointerEvents: "none",
229
+ children: [ABYSS_BEAMS.map(([deg, squash, alpha, color], i) => /*#__PURE__*/_jsx(View, {
230
+ style: {
231
+ position: "absolute",
232
+ left: sx - reach,
233
+ top: sy - reach / 2,
234
+ width: reach * 2,
235
+ height: reach,
236
+ transform: [{
237
+ rotate: `${deg}deg`
238
+ }]
239
+ },
240
+ children: /*#__PURE__*/_jsx(View, {
241
+ style: {
242
+ position: "absolute",
243
+ left: reach,
244
+ top: 0,
245
+ width: reach,
246
+ height: reach,
247
+ transform: [{
248
+ scaleY: squash
249
+ }]
250
+ },
251
+ children: /*#__PURE__*/_jsx(RadialGlow, {
252
+ size: reach,
253
+ color: color,
254
+ alpha: alpha,
255
+ rings: 8,
256
+ falloff: 1.5
257
+ })
258
+ })
259
+ }, i)), /*#__PURE__*/_jsx(RadialGlow, {
260
+ size: bloom,
261
+ color: "#BFD9F5",
262
+ alpha: 0.16,
263
+ rings: 24,
264
+ falloff: 1.9,
265
+ style: {
266
+ position: "absolute",
267
+ left: sx - bloom / 2,
268
+ top: sy - bloom / 2
269
+ }
270
+ }), /*#__PURE__*/_jsx(RadialGlow, {
271
+ size: 72,
272
+ color: "#E8F2FC",
273
+ alpha: 0.3,
274
+ rings: 12,
275
+ falloff: 1.5,
276
+ style: {
277
+ position: "absolute",
278
+ left: sx - 36,
279
+ top: sy - 36
280
+ }
281
+ })]
282
+ });
283
+ });
284
+
285
+ /** Stride 3: x, y, size-draw. Nearer bands are sparser and faster. */
286
+ const SNOW_BANDS = [{
287
+ count: 22,
288
+ travelS: 30,
289
+ seed: 0x61f3
290
+ }, {
291
+ count: 14,
292
+ travelS: 21,
293
+ seed: 0x8d2b
294
+ }, {
295
+ count: 8,
296
+ travelS: 14,
297
+ seed: 0xc55d
298
+ }];
299
+ const SNOW_TABLES = SNOW_BANDS.map(b => scatter(b.seed, b.count * 3));
300
+ function snowFlake(dia, alpha, color = "#A8D8E0") {
301
+ return (x, y, _size, key) => /*#__PURE__*/_jsx(View, {
302
+ style: {
303
+ position: "absolute",
304
+ left: x - dia / 2,
305
+ top: y - dia / 2,
306
+ width: dia,
307
+ height: dia,
308
+ borderRadius: dia / 2,
309
+ backgroundColor: withAlpha(color, alpha)
310
+ }
311
+ }, key);
312
+ }
313
+
314
+ /**
315
+ * The bigger motes in the reference are little PLUS sparkles, not dots —
316
+ * two crossed bars, size varied per flake off the scatter stream.
317
+ */
318
+ function sparkleFlake(alpha, color = "#D8E6F8") {
319
+ return (x, y, size, key) => {
320
+ const s = 5 + size * 4;
321
+ return /*#__PURE__*/_jsxs(View, {
322
+ style: {
323
+ position: "absolute",
324
+ left: x - s / 2,
325
+ top: y - s / 2,
326
+ width: s,
327
+ height: s
328
+ },
329
+ children: [/*#__PURE__*/_jsx(View, {
330
+ style: {
331
+ position: "absolute",
332
+ left: 0,
333
+ top: s / 2 - 0.75,
334
+ width: s,
335
+ height: 1.5,
336
+ borderRadius: 0.75,
337
+ backgroundColor: withAlpha(color, alpha)
338
+ }
339
+ }), /*#__PURE__*/_jsx(View, {
340
+ style: {
341
+ position: "absolute",
342
+ left: s / 2 - 0.75,
343
+ top: 0,
344
+ width: 1.5,
345
+ height: s,
346
+ borderRadius: 0.75,
347
+ backgroundColor: withAlpha(color, alpha)
348
+ }
349
+ })]
350
+ }, key);
351
+ };
352
+ }
353
+
354
+ /** The original marine snow: plain dots, nearer bands bigger and brighter. */
355
+ const ABYSS_RENDERS = [snowFlake(1.3, 0.26), snowFlake(1.9, 0.38), snowFlake(2.6, 0.5)];
356
+ export const Abyss = /*#__PURE__*/memo(function Abyss(props) {
357
+ const {
358
+ width,
359
+ height,
360
+ animated
361
+ } = props;
362
+ return /*#__PURE__*/_jsxs(Water, {
363
+ height: height,
364
+ base: ABYSS_BASE,
365
+ wash: "#12264A",
366
+ washAlpha: 0.55,
367
+ children: [/*#__PURE__*/_jsx(RayFan, {
368
+ width: width,
369
+ animated: animated
370
+ }), SNOW_BANDS.map((band, i) => /*#__PURE__*/_jsx(DriftBand, {
371
+ table: SNOW_TABLES[i],
372
+ count: band.count,
373
+ travelS: band.travelS,
374
+ direction: "down",
375
+ width: width,
376
+ height: height,
377
+ animated: animated,
378
+ render: ABYSS_RENDERS[i]
379
+ }, i))]
380
+ });
381
+ });
382
+
383
+ // ============================================================================
384
+ // Bubbles — rising through the light
385
+ // ============================================================================
386
+
387
+ const BUBBLE_RAYS = [{
388
+ at: 0.3,
389
+ tilt: -10,
390
+ size: 0.95,
391
+ alpha: 0.2
392
+ }, {
393
+ at: 0.68,
394
+ tilt: 6,
395
+ size: 0.8,
396
+ alpha: 0.16
397
+ }];
398
+
399
+ // Alpha lesson from round 2 applies underwater too: anything fainter than
400
+ // ~0.3 vanishes under the vignette and the rows' own translucency.
401
+ const BUBBLE_BANDS = [{
402
+ count: 14,
403
+ dia: 3,
404
+ alpha: 0.3,
405
+ travelS: 26,
406
+ sway: 4,
407
+ seed: 0x71a9
408
+ }, {
409
+ count: 10,
410
+ dia: 5,
411
+ alpha: 0.42,
412
+ travelS: 18,
413
+ sway: -6,
414
+ seed: 0x93cd
415
+ }, {
416
+ count: 7,
417
+ dia: 8,
418
+ alpha: 0.54,
419
+ travelS: 12,
420
+ sway: 8,
421
+ seed: 0xb5ef
422
+ }];
423
+ const BUBBLE_TABLES = BUBBLE_BANDS.map(b => scatter(b.seed, b.count * 3));
424
+
425
+ /**
426
+ * A bubble is a RING with an off-centre highlight — the highlight is the
427
+ * entire difference between "dot" and "bubble".
428
+ */
429
+ function bubble(dia, alpha) {
430
+ return (x, y, size, key) => {
431
+ const d = dia * (0.7 + size * 0.6);
432
+ const hi = Math.max(1.2, d * 0.22);
433
+ return /*#__PURE__*/_jsxs(View, {
434
+ style: {
435
+ position: "absolute",
436
+ left: x - d / 2,
437
+ top: y - d / 2,
438
+ width: d,
439
+ height: d
440
+ },
441
+ children: [/*#__PURE__*/_jsx(View, {
442
+ style: {
443
+ position: "absolute",
444
+ left: 0,
445
+ top: 0,
446
+ width: d,
447
+ height: d,
448
+ borderRadius: d / 2,
449
+ borderWidth: 1,
450
+ borderColor: withAlpha("#9FE5F2", alpha)
451
+ }
452
+ }), /*#__PURE__*/_jsx(View, {
453
+ style: {
454
+ position: "absolute",
455
+ left: d * 0.24,
456
+ top: d * 0.18,
457
+ width: hi,
458
+ height: hi,
459
+ borderRadius: hi / 2,
460
+ backgroundColor: withAlpha("#D8F5FB", alpha + 0.18)
461
+ }
462
+ })]
463
+ }, key);
464
+ };
465
+ }
466
+ export const Bubbles = /*#__PURE__*/memo(function Bubbles(props) {
467
+ const {
468
+ width,
469
+ height,
470
+ animated
471
+ } = props;
472
+ return /*#__PURE__*/_jsxs(Water, {
473
+ height: height,
474
+ children: [/*#__PURE__*/_jsx(Rays, {
475
+ width: width,
476
+ rays: BUBBLE_RAYS,
477
+ animated: animated
478
+ }), BUBBLE_BANDS.map((band, i) => /*#__PURE__*/_jsx(DriftBand, {
479
+ table: BUBBLE_TABLES[i],
480
+ count: band.count,
481
+ travelS: band.travelS,
482
+ direction: "up",
483
+ sway: band.sway,
484
+ width: width,
485
+ height: height,
486
+ animated: animated,
487
+ render: bubble(band.dia, band.alpha)
488
+ }, i))]
489
+ });
490
+ });
491
+
492
+ // ============================================================================
493
+ // Jellyfish — pulsing past on the current
494
+ // ============================================================================
495
+
496
+ const JELLY_RAYS = [{
497
+ at: 0.25,
498
+ tilt: -12,
499
+ size: 0.9,
500
+ alpha: 0.18
501
+ }, {
502
+ at: 0.62,
503
+ tilt: 5,
504
+ size: 0.85,
505
+ alpha: 0.15
506
+ }];
507
+
508
+ /**
509
+ * `phase` staggers where each jelly is in its climb at mount, so the water is
510
+ * never empty while they all wait at the bottom. The offset is baked into the
511
+ * translateY interpolate as a piecewise ramp: the wrap-around jump lands
512
+ * off-screen at BOTH ends (above the top → below the bottom), so the loop
513
+ * seam is never visible.
514
+ */
515
+ const JELLIES = [
516
+ // Mount order is paint order: small dim jellies first — they read as
517
+ // distance (slower, no pulse) and the big ones drift over them.
518
+ {
519
+ x: 0.5,
520
+ w: 18,
521
+ travelS: 60,
522
+ pulseMs: 3000,
523
+ pulses: false,
524
+ sway: 8,
525
+ dim: true,
526
+ phase: 0.78
527
+ }, {
528
+ x: 0.78,
529
+ w: 16,
530
+ travelS: 64,
531
+ pulseMs: 3000,
532
+ pulses: false,
533
+ sway: 7,
534
+ dim: true,
535
+ phase: 0.62
536
+ }, {
537
+ x: 0.2,
538
+ w: 14,
539
+ travelS: 70,
540
+ pulseMs: 3000,
541
+ pulses: false,
542
+ sway: -6,
543
+ dim: true,
544
+ phase: 0.3
545
+ },
546
+ // The stars: big bells up front, each pulsing on its own clock.
547
+ {
548
+ x: 0.12,
549
+ w: 54,
550
+ travelS: 40,
551
+ pulseMs: 3000,
552
+ pulses: true,
553
+ sway: -18,
554
+ dim: false,
555
+ phase: 0.85
556
+ }, {
557
+ x: 0.28,
558
+ w: 46,
559
+ travelS: 34,
560
+ pulseMs: 2600,
561
+ pulses: true,
562
+ sway: 16,
563
+ dim: false,
564
+ phase: 0.55
565
+ }, {
566
+ x: 0.45,
567
+ w: 40,
568
+ travelS: 38,
569
+ pulseMs: 3150,
570
+ pulses: true,
571
+ sway: 14,
572
+ dim: false,
573
+ phase: 0.35
574
+ }, {
575
+ x: 0.68,
576
+ w: 36,
577
+ travelS: 46,
578
+ pulseMs: 3400,
579
+ pulses: true,
580
+ sway: -12,
581
+ dim: false,
582
+ phase: 0.2
583
+ }, {
584
+ x: 0.88,
585
+ w: 28,
586
+ travelS: 52,
587
+ pulseMs: 2850,
588
+ pulses: true,
589
+ sway: 10,
590
+ dim: false,
591
+ phase: 0.05
592
+ }];
593
+
594
+ /** Tentacles as fractions of the bell width: [dx, length, thick, tilt]. */
595
+ const TENTACLES = [[-0.32, 1.1, 1, -5], [-0.1, 1.35, 1, -2], [0.14, 1.2, 1, 3], [0.34, 0.95, 1, 6], [-0.22, 0.6, 1.5, -3], [0.24, 0.55, 1.5, 4]];
596
+ const Jelly = /*#__PURE__*/memo(function Jelly({
597
+ index,
598
+ width,
599
+ height,
600
+ animated
601
+ }) {
602
+ const j = JELLIES[index];
603
+ const rise = useLoop(j.travelS * 1000, animated);
604
+ const squish = usePulse(j.pulseMs, animated && j.pulses);
605
+ const w = j.w;
606
+ const bellH = w * 0.78;
607
+ const jellyH = w * 2.2;
608
+ const travel = height + jellyH * 1.5;
609
+ // Piecewise phase offset: same climb speed on both segments, with the
610
+ // (invisible) top→bottom teleport at t = 1 - phase.
611
+ const wrap = 1 - j.phase;
612
+ const translateY = rise.interpolate({
613
+ inputRange: [0, wrap, Math.min(wrap + 0.0001, 0.9999), 1],
614
+ outputRange: [-travel * j.phase, -travel, 0, -travel * j.phase]
615
+ });
616
+ const translateX = rise.interpolate({
617
+ inputRange: [0, 0.2, 0.45, 0.7, 1],
618
+ outputRange: [0, j.sway, -j.sway * 0.6, j.sway * 0.8, 0]
619
+ });
620
+ const scaleX = squish.interpolate({
621
+ inputRange: [0, 1],
622
+ outputRange: [1, 1.07]
623
+ });
624
+ const scaleY = squish.interpolate({
625
+ inputRange: [0, 1],
626
+ outputRange: [1, 0.9]
627
+ });
628
+ const stroke = j.dim ? 0.16 : 0.3;
629
+ return /*#__PURE__*/_jsxs(Animated.View, {
630
+ style: {
631
+ position: "absolute",
632
+ left: width * j.x - w,
633
+ // Starts just below the surface's bottom edge and exits above the
634
+ // top, so the loop's snap back happens entirely off-screen.
635
+ top: height,
636
+ width: w * 2,
637
+ height: jellyH,
638
+ transform: [{
639
+ translateY
640
+ }, {
641
+ translateX
642
+ }]
643
+ },
644
+ pointerEvents: "none",
645
+ children: [/*#__PURE__*/_jsx(RadialGlow, {
646
+ size: w * 1.8,
647
+ color: "#7DEBF7",
648
+ alpha: j.dim ? 0.08 : 0.14,
649
+ rings: 6,
650
+ falloff: 1.8,
651
+ style: {
652
+ position: "absolute",
653
+ left: w - w * 0.9,
654
+ top: bellH / 2 - w * 0.9
655
+ }
656
+ }), /*#__PURE__*/_jsx(Animated.View, {
657
+ style: {
658
+ position: "absolute",
659
+ left: w / 2,
660
+ top: 0,
661
+ width: w,
662
+ height: bellH,
663
+ transform: [{
664
+ scaleX
665
+ }, {
666
+ scaleY
667
+ }]
668
+ },
669
+ pointerEvents: "none",
670
+ children: /*#__PURE__*/_jsxs(View, {
671
+ style: {
672
+ position: "absolute",
673
+ left: 0,
674
+ top: 0,
675
+ width: w,
676
+ height: bellH,
677
+ borderTopLeftRadius: w / 2,
678
+ borderTopRightRadius: w / 2,
679
+ borderBottomLeftRadius: w * 0.18,
680
+ borderBottomRightRadius: w * 0.18,
681
+ backgroundColor: withAlpha("#67E8F9", 0.09),
682
+ borderWidth: 1,
683
+ borderColor: withAlpha("#8FE9F7", stroke),
684
+ overflow: "hidden"
685
+ },
686
+ children: [/*#__PURE__*/_jsx(RadialGlow, {
687
+ size: w * 0.9,
688
+ color: "#7DEBF7",
689
+ alpha: j.dim ? 0.2 : 0.38,
690
+ rings: 6,
691
+ falloff: 1.6,
692
+ style: {
693
+ position: "absolute",
694
+ left: w * 0.05,
695
+ top: -w * 0.12
696
+ }
697
+ }), !j.dim && /*#__PURE__*/_jsx(RadialGlow, {
698
+ size: w * 0.5,
699
+ color: "#D9FBFF",
700
+ alpha: 0.28,
701
+ rings: 5,
702
+ falloff: 1.4,
703
+ style: {
704
+ position: "absolute",
705
+ left: w * 0.25,
706
+ top: w * 0.06
707
+ }
708
+ })]
709
+ })
710
+ }), TENTACLES.map(([dx, len, thick, tilt], i) => /*#__PURE__*/_jsx(View, {
711
+ style: {
712
+ position: "absolute",
713
+ left: w + dx * w,
714
+ top: bellH - 2,
715
+ width: thick,
716
+ height: w * len,
717
+ borderRadius: thick,
718
+ backgroundColor: withAlpha("#8FE9F7", j.dim ? 0.12 : 0.2),
719
+ transform: [{
720
+ rotate: `${tilt}deg`
721
+ }]
722
+ }
723
+ }, i))]
724
+ });
725
+ });
726
+ const JELLY_SNOW = scatter(0xd7a3, 14 * 3);
727
+ export const Jellyfish = /*#__PURE__*/memo(function Jellyfish(props) {
728
+ const {
729
+ width,
730
+ height,
731
+ animated
732
+ } = props;
733
+ return /*#__PURE__*/_jsxs(Water, {
734
+ height: height,
735
+ children: [/*#__PURE__*/_jsx(Rays, {
736
+ width: width,
737
+ rays: JELLY_RAYS,
738
+ animated: animated
739
+ }), /*#__PURE__*/_jsx(DriftBand, {
740
+ table: JELLY_SNOW,
741
+ count: 14,
742
+ travelS: 32,
743
+ direction: "down",
744
+ width: width,
745
+ height: height,
746
+ animated: animated,
747
+ render: snowFlake(1.4, 0.3)
748
+ }), JELLIES.map((_, i) => /*#__PURE__*/_jsx(Jelly, {
749
+ index: i,
750
+ ...props
751
+ }, i))]
752
+ });
753
+ });