@buoy-gg/shared-ui 7.0.26 → 7.0.28

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 (221) 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 +35 -18
  26. package/lib/commonjs/ui/components/CopyButton.js +6 -4
  27. package/lib/commonjs/ui/components/DevToolsCard.js +16 -9
  28. package/lib/commonjs/ui/components/DynamicFilterView.js +43 -41
  29. package/lib/commonjs/ui/components/EventStepperFooter.js +38 -10
  30. package/lib/commonjs/ui/components/FilterComponents.js +11 -11
  31. package/lib/commonjs/ui/components/ModalHeader.js +28 -15
  32. package/lib/commonjs/ui/components/SectionHeader.js +3 -1
  33. package/lib/commonjs/ui/components/StorageTypeBadge.js +3 -2
  34. package/lib/commonjs/ui/components/TabSelector.js +56 -38
  35. package/lib/commonjs/ui/components/ValueTypeBadge.js +7 -6
  36. package/lib/commonjs/ui/components/WindowControls.js +37 -10
  37. package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +8 -0
  38. package/lib/commonjs/ui/night/nightTheme.js +120 -0
  39. package/lib/commonjs/ui/night/primitives.js +498 -0
  40. package/lib/module/JsModal.js +156 -20
  41. package/lib/module/JsModal.web.js +83 -39
  42. package/lib/module/dataViewer/VirtualizedDataExplorer.js +14 -4
  43. package/lib/module/dataViewer/diffThemes.js +20 -18
  44. package/lib/module/dataViewer/tree/TreeDiffViewer.js +9 -9
  45. package/lib/module/hooks/safe-area-impl.js +1 -1
  46. package/lib/module/icons/lucide-icons.js +74 -15
  47. package/lib/module/index.js +4 -0
  48. package/lib/module/ui/backgrounds/BackgroundSwitcher.js +250 -76
  49. package/lib/module/ui/backgrounds/README.md +102 -20
  50. package/lib/module/ui/backgrounds/backgroundStore.js +19 -5
  51. package/lib/module/ui/backgrounds/index.js +11 -2
  52. package/lib/module/ui/backgrounds/primitives.js +53 -16
  53. package/lib/module/ui/backgrounds/registry.js +41 -64
  54. package/lib/module/ui/backgrounds/rng.js +20 -0
  55. package/lib/module/ui/backgrounds/skyClock.js +39 -0
  56. package/lib/module/ui/backgrounds/variants/daylight.js +449 -0
  57. package/lib/module/ui/backgrounds/variants/deepField.js +62 -31
  58. package/lib/module/ui/backgrounds/variants/hyperspace.js +214 -0
  59. package/lib/module/ui/backgrounds/variants/liveSky.js +893 -0
  60. package/lib/module/ui/backgrounds/variants/meteors.js +253 -0
  61. package/lib/module/ui/backgrounds/variants/moonlight.js +468 -0
  62. package/lib/module/ui/backgrounds/variants/underwater.js +753 -0
  63. package/lib/module/ui/components/Badge.js +11 -10
  64. package/lib/module/ui/components/CompactRow.js +35 -18
  65. package/lib/module/ui/components/CopyButton.js +6 -4
  66. package/lib/module/ui/components/DevToolsCard.js +16 -9
  67. package/lib/module/ui/components/DynamicFilterView.js +43 -41
  68. package/lib/module/ui/components/EventStepperFooter.js +38 -10
  69. package/lib/module/ui/components/FilterComponents.js +11 -11
  70. package/lib/module/ui/components/ModalHeader.js +28 -15
  71. package/lib/module/ui/components/SectionHeader.js +3 -1
  72. package/lib/module/ui/components/StorageTypeBadge.js +3 -2
  73. package/lib/module/ui/components/TabSelector.js +57 -39
  74. package/lib/module/ui/components/ValueTypeBadge.js +7 -6
  75. package/lib/module/ui/components/WindowControls.js +37 -10
  76. package/lib/module/ui/gameUI/constants/gameUIColors.js +8 -0
  77. package/lib/module/ui/night/nightTheme.js +116 -0
  78. package/lib/module/ui/night/primitives.js +485 -0
  79. package/lib/typescript/commonjs/JsModal.d.ts +18 -0
  80. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/JsModal.web.d.ts +13 -0
  82. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  83. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +3 -1
  85. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  88. package/lib/typescript/commonjs/icons/lucide-icons.d.ts +12 -1
  89. package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/index.d.ts +3 -0
  91. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
  93. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
  94. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +3 -0
  95. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -1
  97. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +18 -3
  99. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +8 -0
  101. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +6 -0
  103. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts +17 -0
  105. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +1 -1
  107. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts +30 -0
  109. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +19 -4
  111. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts +39 -0
  113. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts +41 -0
  115. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts +26 -0
  117. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts +35 -0
  119. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts +51 -0
  121. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +3 -1
  124. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts +3 -1
  127. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts +2 -0
  130. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts +9 -0
  134. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts +4 -2
  137. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +8 -0
  139. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +113 -0
  141. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -0
  142. package/lib/typescript/commonjs/ui/night/primitives.d.ts +111 -0
  143. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -0
  144. package/lib/typescript/module/JsModal.d.ts +18 -0
  145. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  146. package/lib/typescript/module/JsModal.web.d.ts +13 -0
  147. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  148. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  149. package/lib/typescript/module/dataViewer/diffThemes.d.ts +3 -1
  150. package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -1
  151. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  152. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  153. package/lib/typescript/module/icons/lucide-icons.d.ts +12 -1
  154. package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
  155. package/lib/typescript/module/index.d.ts +3 -0
  156. package/lib/typescript/module/index.d.ts.map +1 -1
  157. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
  158. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
  159. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +3 -0
  160. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -1
  161. package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -1
  162. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
  163. package/lib/typescript/module/ui/backgrounds/primitives.d.ts +18 -3
  164. package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -1
  165. package/lib/typescript/module/ui/backgrounds/registry.d.ts +8 -0
  166. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
  167. package/lib/typescript/module/ui/backgrounds/rng.d.ts +6 -0
  168. package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -1
  169. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts +17 -0
  170. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +1 -0
  171. package/lib/typescript/module/ui/backgrounds/types.d.ts +1 -1
  172. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
  173. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts +30 -0
  174. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +1 -0
  175. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +19 -4
  176. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -1
  177. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts +39 -0
  178. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
  179. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts +41 -0
  180. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
  181. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts +26 -0
  182. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +1 -0
  183. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts +35 -0
  184. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
  185. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts +51 -0
  186. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +1 -0
  187. package/lib/typescript/module/ui/components/Badge.d.ts.map +1 -1
  188. package/lib/typescript/module/ui/components/CompactRow.d.ts +3 -1
  189. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
  190. package/lib/typescript/module/ui/components/CopyButton.d.ts.map +1 -1
  191. package/lib/typescript/module/ui/components/DevToolsCard.d.ts +3 -1
  192. package/lib/typescript/module/ui/components/DevToolsCard.d.ts.map +1 -1
  193. package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
  194. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts +2 -0
  195. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
  196. package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -1
  197. package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +1 -1
  198. package/lib/typescript/module/ui/components/TabSelector.d.ts +9 -0
  199. package/lib/typescript/module/ui/components/TabSelector.d.ts.map +1 -1
  200. package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +1 -1
  201. package/lib/typescript/module/ui/components/WindowControls.d.ts +4 -2
  202. package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -1
  203. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +8 -0
  204. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  205. package/lib/typescript/module/ui/night/nightTheme.d.ts +113 -0
  206. package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -0
  207. package/lib/typescript/module/ui/night/primitives.d.ts +111 -0
  208. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -0
  209. package/package.json +4 -4
  210. package/lib/commonjs/ui/backgrounds/variants/lattice.js +0 -579
  211. package/lib/commonjs/ui/backgrounds/variants/starfield.js +0 -210
  212. package/lib/module/ui/backgrounds/variants/lattice.js +0 -575
  213. package/lib/module/ui/backgrounds/variants/starfield.js +0 -206
  214. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +0 -33
  215. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +0 -1
  216. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +0 -12
  217. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +0 -1
  218. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +0 -33
  219. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +0 -1
  220. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +0 -12
  221. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +0 -1
@@ -0,0 +1,449 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Daylight — the Moonlight cove at midday.
5
+ *
6
+ * The same composition as ../variants/moonlight.tsx translated to day: the sun
7
+ * where the moon sat, in a warm bloom (no craters — an opaque disc with a hot
8
+ * inner glow), white clouds whose sunlit tops use the same rim-then-body
9
+ * occlusion trick, HAZY blue mountains instead of black silhouettes (daylight
10
+ * scatters — far ridges go pale, they don't go dark), gulls where the stars
11
+ * were, tiny sails where the shore lights were, and the glade re-cut as golden
12
+ * sun glitter. The sky inverts too: deep blue at the zenith paling into haze at
13
+ * the horizon, where night dies out the opposite way.
14
+ *
15
+ * Same contract as ../README.md: native-driven loops only, static geometry
16
+ * rasterized, scatter tables at module load, light geometry sized from the
17
+ * WINDOW (never the modal — resizing crops, it doesn't stretch).
18
+ */
19
+
20
+ import { memo } from "react";
21
+ import { Animated, Dimensions, View } from "react-native";
22
+ import { absoluteFill } from "../../../utils/absoluteFill.js";
23
+ import { Base, LinearFade, RadialGlow, RasterLayer, Vignette, usePulse } from "../primitives.js";
24
+ import { scatter, withAlpha } from "../rng.js";
25
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
26
+ /** Zenith blue — the base coat IS the top of the sky. */
27
+ const BASE_COLOR = "#1C4E74";
28
+ const SEA_COLOR = "#16405E";
29
+ const HORIZON = 0.46;
30
+ const SUN_X = 0.72;
31
+ const SUN_Y = 0.17;
32
+ const SUN_DIA = 50;
33
+
34
+ // ============================================================================
35
+ // Clouds — white banks with a sunlit top edge
36
+ // ============================================================================
37
+
38
+ /** Same shape as Moonlight's CloudSpec; see there for the rim/body trick. */
39
+
40
+ const CLOUDS = [{
41
+ at: [0.16, 0.3],
42
+ puffs: [[-62, 4, 150, 20], [-44, -8, 62, 24], [-4, -14, 74, 30], [38, -4, 54, 20]],
43
+ rim: [4, -3.5],
44
+ bodyAlpha: 0.88
45
+ }, {
46
+ at: [0.84, 0.37],
47
+ puffs: [[-55, 3, 130, 18], [-30, -8, 56, 22], [8, -13, 64, 27], [42, -3, 44, 17]],
48
+ rim: [-2, -4],
49
+ bodyAlpha: 0.88
50
+ }, {
51
+ at: [0.46, 0.425],
52
+ puffs: [[-40, 2, 96, 13], [-12, -6, 48, 16], [22, -2, 38, 12]],
53
+ rim: [3, -3],
54
+ bodyAlpha: 0.84
55
+ }];
56
+ function cloudPuffs(cloud, cx, cy, key) {
57
+ const parts = [];
58
+ // Pass 1: the sunlit rim — pure white, mostly occluded by the body.
59
+ for (let i = 0; i < cloud.puffs.length; i++) {
60
+ const [dx, dy, w, h] = cloud.puffs[i];
61
+ parts.push(/*#__PURE__*/_jsx(View, {
62
+ style: {
63
+ position: "absolute",
64
+ left: cx + dx + cloud.rim[0] - w / 2,
65
+ top: cy + dy + cloud.rim[1] - h / 2,
66
+ width: w,
67
+ height: h,
68
+ borderRadius: h / 2,
69
+ backgroundColor: withAlpha("#FFFFFF", 0.6)
70
+ }
71
+ }, `${key}-r${i}`));
72
+ }
73
+ // Pass 2: the body — soft blue-white, shadowed relative to the rim.
74
+ for (let i = 0; i < cloud.puffs.length; i++) {
75
+ const [dx, dy, w, h] = cloud.puffs[i];
76
+ parts.push(/*#__PURE__*/_jsx(View, {
77
+ style: {
78
+ position: "absolute",
79
+ left: cx + dx - w / 2,
80
+ top: cy + dy - h / 2,
81
+ width: w,
82
+ height: h,
83
+ borderRadius: h / 2,
84
+ backgroundColor: withAlpha("#C7DCEC", cloud.bodyAlpha)
85
+ }
86
+ }, `${key}-b${i}`));
87
+ }
88
+ return parts;
89
+ }
90
+
91
+ // ============================================================================
92
+ // Gulls — where Moonlight's stars were
93
+ // ============================================================================
94
+
95
+ /** [xFrac, yFrac (of the horizon), wing length] — kept clear of the sun. */
96
+ const GULLS = [[0.2, 0.42, 6], [0.3, 0.28, 5], [0.42, 0.52, 4]];
97
+
98
+ /** Two rotated bars in a shallow V read as a distant gull. */
99
+ function gullWings(x, y, len, key) {
100
+ const wing = {
101
+ position: "absolute",
102
+ top: y,
103
+ width: len,
104
+ height: 1.4,
105
+ borderRadius: 0.7,
106
+ backgroundColor: withAlpha("#123049", 0.75)
107
+ };
108
+ return [/*#__PURE__*/_jsx(View, {
109
+ style: [wing, {
110
+ left: x - len,
111
+ transform: [{
112
+ rotate: "18deg"
113
+ }]
114
+ }]
115
+ }, `${key}-l`), /*#__PURE__*/_jsx(View, {
116
+ style: [wing, {
117
+ left: x,
118
+ transform: [{
119
+ rotate: "-18deg"
120
+ }]
121
+ }]
122
+ }, `${key}-r`)];
123
+ }
124
+
125
+ // ============================================================================
126
+ // Mountains — hazy blue range on the horizon
127
+ // ============================================================================
128
+
129
+ /** [xFrac, base width, height, color] — daylight haze, not silhouette black. */
130
+ const PEAKS = [[0.03, 120, 24, "#2E5E80"], [0.11, 96, 36, "#27516F"], [0.2, 140, 24, "#2E5E80"], [0.29, 76, 15, "#27516F"], [0.9, 96, 18, "#2E5E80"], [0.98, 130, 27, "#27516F"]];
131
+
132
+ /** Tiny sails on the horizon where the night version had shore lights. */
133
+ const SAILS = [[0.07, 6], [0.14, 4.5], [0.23, 5.5]];
134
+
135
+ // ============================================================================
136
+ // Water blocks — the glitter path
137
+ // ============================================================================
138
+
139
+ /** Stride 4: depth, x jitter, width jitter, alpha jitter. New seeds — a new
140
+ * day gets its own water. */
141
+ const GLADE_LAYERS = [{
142
+ count: 44,
143
+ seed: 0x5d41
144
+ }, {
145
+ count: 34,
146
+ seed: 0x91c3
147
+ }, {
148
+ count: 26,
149
+ seed: 0xc7f5
150
+ }];
151
+ const GLADE_TABLES = GLADE_LAYERS.map(l => scatter(l.seed, l.count * 4));
152
+ const ROW_STEP = 7;
153
+ const GlitterLayer = /*#__PURE__*/memo(function GlitterLayer({
154
+ indices,
155
+ drive,
156
+ scale,
157
+ raster,
158
+ width,
159
+ height,
160
+ animated
161
+ }) {
162
+ const sway = usePulse(drive === "swayA" ? 9000 : 12500, animated && drive !== "breathe");
163
+ const breathe = usePulse(6200, animated && drive === "breathe");
164
+ const sunX = width * SUN_X;
165
+ const horizonY = height * HORIZON;
166
+ const blocks = [];
167
+ for (const li of indices) {
168
+ const layer = GLADE_LAYERS[li];
169
+ const count = Math.round(layer.count * scale);
170
+ const table = scale === 1 ? GLADE_TABLES[li] : scatter(layer.seed, count * 4);
171
+ for (let i = 0; i < count; i++) {
172
+ const d = table[i * 4];
173
+ const jx = table[i * 4 + 1];
174
+ const jw = table[i * 4 + 2];
175
+ const ja = table[i * 4 + 3];
176
+ const y = horizonY + 4 + d * (height - horizonY) * 0.94;
177
+ const halfSpread = width * (0.03 + d * 0.16);
178
+ const x = sunX + (jx - 0.5) * 2 * halfSpread;
179
+ const blockW = 6 + d * 26 + jw * 10;
180
+ const blockH = d < 0.3 ? 1 : d < 0.62 ? 2 : 3;
181
+ const arc = Math.sin(Math.PI * (0.12 + d * 0.82));
182
+ const centered = Math.max(0.25, 1 - Math.abs(jx - 0.5) * 1.4);
183
+ const alpha = (0.2 + arc * 0.5) * centered * (0.75 + ja * 0.25);
184
+ blocks.push(/*#__PURE__*/_jsx(View, {
185
+ style: {
186
+ position: "absolute",
187
+ left: x - blockW / 2,
188
+ top: Math.round(y / ROW_STEP) * ROW_STEP,
189
+ width: blockW,
190
+ height: blockH,
191
+ borderRadius: 0.5,
192
+ backgroundColor: withAlpha("#FFE9B0", alpha)
193
+ }
194
+ }, `${li}-${i}`));
195
+ }
196
+ }
197
+ const style = drive === "breathe" ? {
198
+ opacity: breathe.interpolate({
199
+ inputRange: [0, 1],
200
+ outputRange: [0.55, 1]
201
+ })
202
+ } : {
203
+ transform: [{
204
+ translateX: sway.interpolate({
205
+ inputRange: [0, 1],
206
+ outputRange: drive === "swayA" ? [-7, 7] : [6, -6]
207
+ })
208
+ }]
209
+ };
210
+ return /*#__PURE__*/_jsx(Animated.View, {
211
+ style: [absoluteFill, style],
212
+ pointerEvents: "none",
213
+ children: /*#__PURE__*/_jsx(RasterLayer, {
214
+ style: absoluteFill,
215
+ raster: raster,
216
+ children: blocks
217
+ })
218
+ });
219
+ });
220
+
221
+ // ============================================================================
222
+ // The scene
223
+ // ============================================================================
224
+
225
+ export const DaylightTunable = /*#__PURE__*/memo(function DaylightTunable({
226
+ gladeScale = 1,
227
+ fusedGlade = false,
228
+ raster = true,
229
+ chrome = true,
230
+ ...props
231
+ }) {
232
+ const {
233
+ width,
234
+ height,
235
+ animated
236
+ } = props;
237
+ const cloudDrift = usePulse(26000, animated);
238
+ const cloudX = cloudDrift.interpolate({
239
+ inputRange: [0, 1],
240
+ outputRange: [-8, 8]
241
+ });
242
+ const sunX = width * SUN_X;
243
+ const sunY = height * SUN_Y;
244
+ const horizonY = height * HORIZON;
245
+ // Light geometry is sized from the WINDOW so resizing the modal never
246
+ // swells or shrinks the sun's bloom — only positions follow the modal.
247
+ const refW = Dimensions.get("window").width;
248
+ const gulls = GULLS.flatMap(([xf, yf, len], i) => gullWings(width * xf, horizonY * yf, len, `g${i}`));
249
+ const clouds = CLOUDS.flatMap((cloud, i) => cloudPuffs(cloud, width * cloud.at[0], height * cloud.at[1], `c${i}`));
250
+ const mountains = PEAKS.map(([xf, wBase, h, color], i) => /*#__PURE__*/_jsx(View, {
251
+ style: {
252
+ position: "absolute",
253
+ left: width * xf - wBase / 2,
254
+ top: horizonY - h,
255
+ width: 0,
256
+ height: 0,
257
+ borderLeftWidth: wBase / 2,
258
+ borderRightWidth: wBase / 2,
259
+ borderBottomWidth: h,
260
+ borderLeftColor: "transparent",
261
+ borderRightColor: "transparent",
262
+ borderBottomColor: color
263
+ }
264
+ }, `m${i}`));
265
+ const sails = SAILS.map(([xf, h], i) => /*#__PURE__*/_jsx(View, {
266
+ style: {
267
+ position: "absolute",
268
+ left: width * xf,
269
+ top: horizonY - h,
270
+ width: 0,
271
+ height: 0,
272
+ borderLeftWidth: 2,
273
+ borderRightWidth: 2,
274
+ borderBottomWidth: h,
275
+ borderLeftColor: "transparent",
276
+ borderRightColor: "transparent",
277
+ borderBottomColor: withAlpha("#F2F8FC", 0.85)
278
+ }
279
+ }, `s${i}`));
280
+ return (
281
+ /*#__PURE__*/
282
+ // Clips: the blooms are window-sized, so a small modal crops the scene.
283
+ _jsxs(View, {
284
+ style: [absoluteFill, {
285
+ overflow: "hidden"
286
+ }],
287
+ pointerEvents: "none",
288
+ children: [/*#__PURE__*/_jsx(Base, {
289
+ color: BASE_COLOR
290
+ }), /*#__PURE__*/_jsx(View, {
291
+ style: {
292
+ position: "absolute",
293
+ left: 0,
294
+ right: 0,
295
+ top: 0,
296
+ height: horizonY
297
+ },
298
+ children: /*#__PURE__*/_jsx(LinearFade, {
299
+ color: "#A9CDE6",
300
+ from: 0,
301
+ to: 0.42,
302
+ direction: "down",
303
+ bands: 20,
304
+ flattenBase: BASE_COLOR
305
+ })
306
+ }), /*#__PURE__*/_jsx(View, {
307
+ style: {
308
+ position: "absolute",
309
+ left: 0,
310
+ right: 0,
311
+ top: horizonY,
312
+ bottom: 0,
313
+ backgroundColor: SEA_COLOR
314
+ }
315
+ }), /*#__PURE__*/_jsx(Animated.View, {
316
+ style: [absoluteFill, {
317
+ transform: [{
318
+ translateX: cloudX
319
+ }]
320
+ }],
321
+ pointerEvents: "none",
322
+ children: /*#__PURE__*/_jsxs(RasterLayer, {
323
+ style: absoluteFill,
324
+ children: [clouds, gulls]
325
+ })
326
+ }), /*#__PURE__*/_jsx(RadialGlow, {
327
+ size: refW * 0.5,
328
+ color: "#FFE9B0",
329
+ alpha: 0.18,
330
+ rings: 20,
331
+ falloff: 1.9,
332
+ style: {
333
+ position: "absolute",
334
+ left: sunX - refW * 0.25,
335
+ top: sunY - refW * 0.25
336
+ }
337
+ }), /*#__PURE__*/_jsx(RadialGlow, {
338
+ size: 120,
339
+ color: "#FFF4D2",
340
+ alpha: 0.42,
341
+ rings: 10,
342
+ falloff: 1.6,
343
+ style: {
344
+ position: "absolute",
345
+ left: sunX - 60,
346
+ top: sunY - 60
347
+ }
348
+ }), /*#__PURE__*/_jsx(View, {
349
+ style: {
350
+ position: "absolute",
351
+ left: sunX - SUN_DIA / 2,
352
+ top: sunY - SUN_DIA / 2,
353
+ width: SUN_DIA,
354
+ height: SUN_DIA,
355
+ borderRadius: SUN_DIA / 2,
356
+ // Fully opaque: any translucency lets the app behind the modal
357
+ // bleed through the brightest surface in the scene.
358
+ backgroundColor: "#FFF9E6"
359
+ }
360
+ }), chrome ? /*#__PURE__*/_jsx(View, {
361
+ style: {
362
+ position: "absolute",
363
+ left: 0,
364
+ right: 0,
365
+ top: horizonY - 76,
366
+ height: 76
367
+ },
368
+ children: /*#__PURE__*/_jsx(LinearFade, {
369
+ color: "#CFE3F1",
370
+ from: 0,
371
+ to: 0.3,
372
+ direction: "down",
373
+ bands: 12
374
+ })
375
+ }) : null, /*#__PURE__*/_jsxs(RasterLayer, {
376
+ style: absoluteFill,
377
+ children: [mountains, sails]
378
+ }), /*#__PURE__*/_jsx(View, {
379
+ style: {
380
+ position: "absolute",
381
+ left: 0,
382
+ right: 0,
383
+ top: horizonY,
384
+ height: 1,
385
+ backgroundColor: withAlpha("#E4F0F8", 0.2)
386
+ }
387
+ }), /*#__PURE__*/_jsx(View, {
388
+ style: {
389
+ position: "absolute",
390
+ left: sunX - width * 0.16,
391
+ top: horizonY,
392
+ width: width * 0.32,
393
+ height: 1,
394
+ backgroundColor: withAlpha("#FFEFC2", 0.42)
395
+ }
396
+ }), chrome ? /*#__PURE__*/_jsx(View, {
397
+ style: {
398
+ position: "absolute",
399
+ left: 0,
400
+ right: 0,
401
+ top: horizonY,
402
+ bottom: 0
403
+ },
404
+ children: /*#__PURE__*/_jsx(LinearFade, {
405
+ color: "#06192B",
406
+ from: 0,
407
+ to: 0.55,
408
+ direction: "down",
409
+ bands: 12
410
+ })
411
+ }) : null, fusedGlade ? /*#__PURE__*/_jsx(GlitterLayer, {
412
+ indices: [0, 1, 2],
413
+ drive: "swayA",
414
+ scale: gladeScale,
415
+ raster: raster,
416
+ ...props
417
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
418
+ children: [/*#__PURE__*/_jsx(GlitterLayer, {
419
+ indices: [0],
420
+ drive: "swayA",
421
+ scale: gladeScale,
422
+ raster: raster,
423
+ ...props
424
+ }), /*#__PURE__*/_jsx(GlitterLayer, {
425
+ indices: [1],
426
+ drive: "swayB",
427
+ scale: gladeScale,
428
+ raster: raster,
429
+ ...props
430
+ }), /*#__PURE__*/_jsx(GlitterLayer, {
431
+ indices: [2],
432
+ drive: "breathe",
433
+ scale: gladeScale,
434
+ raster: raster,
435
+ ...props
436
+ })]
437
+ }), chrome ? /*#__PURE__*/_jsx(Vignette, {
438
+ color: "#0A2033",
439
+ alpha: 0.4,
440
+ spread: 0.34
441
+ }) : null]
442
+ })
443
+ );
444
+ });
445
+ export const Daylight = /*#__PURE__*/memo(function Daylight(props) {
446
+ return /*#__PURE__*/_jsx(DaylightTunable, {
447
+ ...props
448
+ });
449
+ });
@@ -22,11 +22,13 @@
22
22
  *
23
23
  * - **The soft bulb sprite.** The original bakes one 64px sprite (blurred halo
24
24
  * at r=6/α.30 over a blurred core at r=4/α1) and stamps it at `dia`. That is
25
- * why stars stay fine points even at dia=20 — the lit core is only ~13% of
25
+ * why stars stay fine points even at dia=20 — the lit core is only 12.5% of
26
26
  * the stamp. There is no blur primitive here, so each star is a small solid
27
- * core at that same 13%, and the nearer ones get one or two concentric
28
- * discs standing in for the halo. Far stars end up a single ~1px dot, which
29
- * is what the sprite renders them as anyway.
27
+ * core at that same 12.5%, and the nearer ones get one or two concentric
28
+ * discs standing in for the halo, graded DOWN in alpha toward the blur's
29
+ * outer extent (~0.24·dia) so the glow fades out rather than ending in a
30
+ * hard rim. Far stars end up a single ~1px dot, which is what the sprite
31
+ * renders them as anyway.
30
32
  *
31
33
  * - **Additive blending.** `blendMode="plus"` becomes ordinary alpha
32
34
  * compositing. Over a near-black base the two agree except where stars
@@ -41,10 +43,12 @@ import { Animated, View } from "react-native";
41
43
  import { absoluteFill } from "../../../utils/absoluteFill.js";
42
44
  import { Base, RadialGlow, RasterLayer, useLoop, usePulse } from "../primitives.js";
43
45
  import { flattenOver, mulberry32, withAlpha } from "../rng.js";
44
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
46
+ import { MeteorShower } from "./meteors.js";
47
+
45
48
  // ---------------------------------------------------------------------------
46
49
  // The original's shipping constants, verbatim.
47
50
  // ---------------------------------------------------------------------------
51
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
48
52
  const COUNT = 160;
49
53
  const DRIFT = 0.016; // horizontal travel/sec at z=1, as a fraction of width
50
54
  const BASE_DIA = 5; // sprite diameter px at z=1
@@ -98,10 +102,13 @@ function buildField(count) {
98
102
  fy,
99
103
  z,
100
104
  tw,
101
- // 0.15·dia ≈ the sprite's lit core (r=4 of 64, blurred), with a 1.1px
102
- // floor so the farthest stars still land on a pixel.
103
- core: Math.max(1.1, dia * 0.15),
104
- halo: dia * 0.3,
105
+ // 0.125·dia = the sprite's lit core (r=4 of 64), with a 1px floor so
106
+ // the farthest stars still land on a pixel.
107
+ core: Math.max(1, dia * 0.125),
108
+ // Outer extent of the sprite's blurred halo (r=6 + blur 2.5 of 64 is
109
+ // ~gone by 0.24·dia). The discs grade DOWN in alpha toward this edge —
110
+ // see DeepBand — so it fades out instead of ending in a hard rim.
111
+ halo: dia * 0.24,
105
112
  haloDiscs: z < 0.45 ? 2 : z < 0.7 ? 1 : 0,
106
113
  alpha: 0.2 + 0.8 * near,
107
114
  color: PALETTE[Math.floor((tw * 0.5 + 0.5) * PALETTE.length) % PALETTE.length]
@@ -197,7 +204,13 @@ const DeepBand = /*#__PURE__*/memo(function DeepBand({
197
204
  const x = star.fx * width + copy * width;
198
205
  const key = `${i}-${copy}`;
199
206
  for (let h = 0; h < discs; h++) {
200
- const d = star.halo * (h === 0 ? 1 : 0.6);
207
+ // Disc 0 is the inner/brighter one so single-disc stars keep a tight
208
+ // bump; disc 1 adds the faint outer skirt. The alphas approximate the
209
+ // sprite's blurred α.30 halo (≈0.27 near the core → ~0 at the edge):
210
+ // stacked they composite to ~0.24 inside, 0.10 outside — a falloff,
211
+ // not the old hard 0.3/0.51 rim that read as a fat blob.
212
+ const outer = h === 1;
213
+ const d = star.halo * (outer ? 1 : 0.65);
201
214
  parts.push(/*#__PURE__*/_jsx(View, {
202
215
  style: {
203
216
  position: "absolute",
@@ -206,9 +219,7 @@ const DeepBand = /*#__PURE__*/memo(function DeepBand({
206
219
  width: d,
207
220
  height: d,
208
221
  borderRadius: d / 2,
209
- // The sprite's halo is α.30 of the core; scaled by the star's own
210
- // depth brightness like everything else.
211
- backgroundColor: paint(star.color, star.alpha * 0.3)
222
+ backgroundColor: paint(star.color, star.alpha * (outer ? 0.1 : 0.16))
212
223
  }
213
224
  }, `${key}-h${h}`));
214
225
  }
@@ -270,9 +281,13 @@ function useTwinkles(animated, enabled) {
270
281
  const b = usePulse(TWINKLE_MS[1], animated && enabled);
271
282
  const c = usePulse(TWINKLE_MS[2], animated && enabled);
272
283
  const d = usePulse(TWINKLE_MS[3], animated && enabled);
284
+ // Full ±8%, like the original's `1 + 0.08·sin`. The top half exceeds 1 and
285
+ // the compositor clamps it — the original does the same (`if (a > 1) a = 1`),
286
+ // so bright stars flatten at the peak there too; dimmer-than-1 layers just
287
+ // never get the boost, which is the remaining (invisible) approximation.
273
288
  const range = {
274
289
  inputRange: [0, 1],
275
- outputRange: [1 - TWINKLE, 1]
290
+ outputRange: [1 - TWINKLE, 1 + TWINKLE]
276
291
  };
277
292
  return [a.interpolate(range), b.interpolate(range), c.interpolate(range), d.interpolate(range)];
278
293
  }
@@ -291,7 +306,8 @@ export const DeepFieldTunable = /*#__PURE__*/memo(function DeepFieldTunable({
291
306
  halo = "full",
292
307
  opaque = false,
293
308
  drift = true,
294
- starCount = COUNT
309
+ starCount = COUNT,
310
+ chrome = true
295
311
  }) {
296
312
  const bands = buildBands(bandCount, starCount);
297
313
  const twinkles = useTwinkles(animated, twinkle !== "off");
@@ -313,20 +329,22 @@ export const DeepFieldTunable = /*#__PURE__*/memo(function DeepFieldTunable({
313
329
  return /*#__PURE__*/_jsxs(View, {
314
330
  style: absoluteFill,
315
331
  pointerEvents: "none",
316
- children: [/*#__PURE__*/_jsx(Base, {
317
- color: BASE_COLOR
318
- }), /*#__PURE__*/_jsx(RadialGlow, {
319
- size: width * 1.7,
320
- color: "#1E3A8A",
321
- alpha: 0.16,
322
- rings: 8,
323
- falloff: 2.1,
324
- style: {
325
- position: "absolute",
326
- left: -width * 0.35,
327
- top: -width
328
- }
329
- }), twinkle === "group" ?
332
+ children: [chrome ? /*#__PURE__*/_jsxs(_Fragment, {
333
+ children: [/*#__PURE__*/_jsx(Base, {
334
+ color: BASE_COLOR
335
+ }), /*#__PURE__*/_jsx(RadialGlow, {
336
+ size: width * 1.7,
337
+ color: "#1E3A8A",
338
+ alpha: 0.16,
339
+ rings: 8,
340
+ falloff: 2.1,
341
+ style: {
342
+ position: "absolute",
343
+ left: -width * 0.35,
344
+ top: -width
345
+ }
346
+ })]
347
+ }) : null, twinkle === "group" ?
330
348
  // Group mode: one full-screen Animated.View per pulse, each wrapping
331
349
  // its share of the bands. Costs four extra composited surfaces.
332
350
  Array.from({
@@ -340,8 +358,21 @@ export const DeepFieldTunable = /*#__PURE__*/memo(function DeepFieldTunable({
340
358
  }, g)) : bandViews]
341
359
  });
342
360
  });
361
+
362
+ /**
363
+ * The shipping preset: the Everlights field with the meteor layer on top —
364
+ * the old standalone "Meteors" preset was folded in here (its own 40-star sky
365
+ * dropped; this field is the better one). `DeepFieldTunable` stays meteor-free
366
+ * so the bench route keeps measuring the field itself.
367
+ */
343
368
  export const DeepField = /*#__PURE__*/memo(function DeepField(props) {
344
- return /*#__PURE__*/_jsx(DeepFieldTunable, {
345
- ...props
369
+ return /*#__PURE__*/_jsxs(View, {
370
+ style: absoluteFill,
371
+ pointerEvents: "none",
372
+ children: [/*#__PURE__*/_jsx(DeepFieldTunable, {
373
+ ...props
374
+ }), /*#__PURE__*/_jsx(MeteorShower, {
375
+ ...props
376
+ })]
346
377
  });
347
378
  });