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