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