@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
@@ -1,575 +0,0 @@
1
- "use strict";
2
-
3
- /**
4
- * The lattice family — quiet technical geometry.
5
- *
6
- * All eight share one register, set by Hex Mesh: a near-black base, one soft
7
- * off-centre glow for depth, a rasterized hairline pattern at low alpha, a slow
8
- * breath, and a vignette. They read as instrument panels and drafting paper
9
- * rather than scenery, which is what keeps them legible under dense tool UI —
10
- * the pattern never competes with the text on top of it.
11
- *
12
- * Cost follows from that: the geometry is static, so it rasterizes into ONE
13
- * texture and the only animated node is the shared breath. See
14
- * `../README.md` for the contract.
15
- */
16
-
17
- import { memo } from "react";
18
- import { Animated, View } from "react-native";
19
- import { absoluteFill } from "../../../utils/absoluteFill.js";
20
- import { Base, RadialGlow, RasterLayer, Vignette, hairline, useLoop, usePulse } from "../primitives.js";
21
- import { withAlpha } from "../rng.js";
22
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
- // ============================================================================
24
- // Shared shell
25
- // ============================================================================
26
-
27
- const BASE_COLOR = "#08090C";
28
- const VIGNETTE_COLOR = "#030405";
29
-
30
- /**
31
- * Base + glow + the rasterized pattern + breath + vignette. Every preset below
32
- * is just its geometry handed to this, which is what makes the family a family
33
- * instead of eight things that happen to be grey.
34
- */
35
- const LatticeShell = /*#__PURE__*/memo(function LatticeShell({
36
- width,
37
- height,
38
- animated,
39
- glow,
40
- glowAt,
41
- breatheMs = 6000,
42
- floor = 0.6,
43
- children
44
- }) {
45
- const breathe = usePulse(breatheMs, animated);
46
- const opacity = breathe.interpolate({
47
- inputRange: [0, 1],
48
- outputRange: [floor, 1]
49
- });
50
- const size = width * 1.5;
51
- return /*#__PURE__*/_jsxs(View, {
52
- style: absoluteFill,
53
- pointerEvents: "none",
54
- children: [/*#__PURE__*/_jsx(Base, {
55
- color: BASE_COLOR
56
- }), /*#__PURE__*/_jsx(RadialGlow, {
57
- size: size,
58
- color: glow,
59
- alpha: 0.3,
60
- rings: 8,
61
- falloff: 2,
62
- style: {
63
- position: "absolute",
64
- left: width * glowAt[0] - size / 2,
65
- top: height * glowAt[1] - size / 2
66
- }
67
- }), /*#__PURE__*/_jsx(Animated.View, {
68
- style: [absoluteFill, {
69
- opacity
70
- }],
71
- pointerEvents: "none",
72
- children: /*#__PURE__*/_jsx(RasterLayer, {
73
- style: absoluteFill,
74
- children: children
75
- })
76
- }), /*#__PURE__*/_jsx(Vignette, {
77
- color: VIGNETTE_COLOR,
78
- alpha: 0.55,
79
- spread: 0.36
80
- })]
81
- });
82
- });
83
-
84
- /**
85
- * One family of parallel hairlines at an arbitrary angle.
86
- *
87
- * Rather than rotating each line, the whole family is laid out horizontally in
88
- * a square big enough to cover the diagonal and the SQUARE is rotated — one
89
- * transform for N lines, and no trigonometry to get the spacing right.
90
- */
91
- const LineFamily = /*#__PURE__*/memo(function LineFamily({
92
- width,
93
- height,
94
- angle,
95
- step,
96
- color,
97
- alpha,
98
- thickness = hairline
99
- }) {
100
- const diag = Math.ceil(Math.hypot(width, height));
101
- const count = Math.ceil(diag / step) + 1;
102
- const lines = [];
103
- for (let i = 0; i < count; i++) {
104
- lines.push(/*#__PURE__*/_jsx(View, {
105
- style: {
106
- position: "absolute",
107
- left: 0,
108
- width: diag,
109
- top: i * step,
110
- height: thickness,
111
- backgroundColor: withAlpha(color, alpha)
112
- }
113
- }, i));
114
- }
115
- return /*#__PURE__*/_jsx(View, {
116
- style: {
117
- position: "absolute",
118
- left: (width - diag) / 2,
119
- top: (height - diag) / 2,
120
- width: diag,
121
- height: diag,
122
- transform: [{
123
- rotate: `${angle}deg`
124
- }]
125
- },
126
- children: lines
127
- });
128
- });
129
-
130
- // ============================================================================
131
- // Hex Mesh — diamond lattice
132
- // ============================================================================
133
-
134
- const MESH_STEP = 46;
135
-
136
- /**
137
- * Squares rotated 45°, odd rows offset by half a step. RN has no polygon
138
- * primitive, so this is the honest way to get a technical mesh out of bordered
139
- * views; at this scale it reads the same as a hex grid.
140
- */
141
- export const HexMesh = /*#__PURE__*/memo(function HexMesh({
142
- width,
143
- height,
144
- animated
145
- }) {
146
- const cols = Math.ceil(width / MESH_STEP) + 1;
147
- const rows = Math.ceil(height / MESH_STEP) + 1;
148
- const size = MESH_STEP * 0.66;
149
- const cells = [];
150
- for (let r = 0; r < rows; r++) {
151
- for (let c = 0; c < cols; c++) {
152
- const offset = r % 2 === 0 ? 0 : MESH_STEP / 2;
153
- // Fade the lattice out toward the bottom so content there stays crisp.
154
- const depth = 1 - r / rows * 0.6;
155
- cells.push(/*#__PURE__*/_jsx(View, {
156
- style: {
157
- position: "absolute",
158
- left: c * MESH_STEP + offset - size / 2,
159
- top: r * MESH_STEP - size / 2,
160
- width: size,
161
- height: size,
162
- borderWidth: 1,
163
- borderColor: withAlpha("#64748B", 0.16 * depth),
164
- transform: [{
165
- rotate: "45deg"
166
- }]
167
- }
168
- }, `${r}-${c}`));
169
- }
170
- }
171
- return /*#__PURE__*/_jsx(LatticeShell, {
172
- width: width,
173
- height: height,
174
- animated: animated,
175
- glow: "#334155",
176
- glowAt: [0.25, 0.35],
177
- children: cells
178
- });
179
- });
180
-
181
- // ============================================================================
182
- // Iso Grid — three-axis isometric lattice
183
- // ============================================================================
184
-
185
- export const IsoGrid = /*#__PURE__*/memo(function IsoGrid({
186
- width,
187
- height,
188
- animated
189
- }) {
190
- const common = {
191
- width,
192
- height,
193
- step: 38,
194
- color: "#7C8CA3"
195
- };
196
- return /*#__PURE__*/_jsxs(LatticeShell, {
197
- width: width,
198
- height: height,
199
- animated: animated,
200
- glow: "#2C4257",
201
- glowAt: [0.7, 0.2],
202
- children: [/*#__PURE__*/_jsx(LineFamily, {
203
- ...common,
204
- angle: 0,
205
- alpha: 0.1
206
- }), /*#__PURE__*/_jsx(LineFamily, {
207
- ...common,
208
- angle: 60,
209
- alpha: 0.16
210
- }), /*#__PURE__*/_jsx(LineFamily, {
211
- ...common,
212
- angle: -60,
213
- alpha: 0.16
214
- })]
215
- });
216
- });
217
-
218
- // ============================================================================
219
- // Crosshatch — fine 45° weave
220
- // ============================================================================
221
-
222
- export const Crosshatch = /*#__PURE__*/memo(function Crosshatch({
223
- width,
224
- height,
225
- animated
226
- }) {
227
- const common = {
228
- width,
229
- height,
230
- step: 26,
231
- color: "#5E6B7E",
232
- alpha: 0.19
233
- };
234
- return /*#__PURE__*/_jsxs(LatticeShell, {
235
- width: width,
236
- height: height,
237
- animated: animated,
238
- glow: "#334155",
239
- glowAt: [0.5, 0.55],
240
- breatheMs: 7200,
241
- children: [/*#__PURE__*/_jsx(LineFamily, {
242
- ...common,
243
- angle: 45
244
- }), /*#__PURE__*/_jsx(LineFamily, {
245
- ...common,
246
- angle: -45
247
- })]
248
- });
249
- });
250
-
251
- // ============================================================================
252
- // Perf Board — solder-pad matrix
253
- // ============================================================================
254
-
255
- const PAD_STEP = 44;
256
- export const PerfBoard = /*#__PURE__*/memo(function PerfBoard({
257
- width,
258
- height,
259
- animated
260
- }) {
261
- const cols = Math.ceil(width / PAD_STEP) + 1;
262
- const rows = Math.ceil(height / PAD_STEP) + 1;
263
- const parts = [];
264
- const pad = 7;
265
- for (let r = 0; r < rows; r++) {
266
- for (let c = 0; c < cols; c++) {
267
- const major = r % 4 === 0 && c % 4 === 0;
268
- parts.push(/*#__PURE__*/_jsx(View, {
269
- style: {
270
- position: "absolute",
271
- left: c * PAD_STEP - pad / 2,
272
- top: r * PAD_STEP - pad / 2,
273
- width: pad,
274
- height: pad,
275
- borderRadius: pad / 2,
276
- borderWidth: 1,
277
- // Every fourth pad in both axes is a datum, so the eye can count
278
- // the grid instead of just seeing texture.
279
- borderColor: withAlpha("#78909C", major ? 0.34 : 0.15)
280
- }
281
- }, `p${r}-${c}`));
282
- }
283
- }
284
- return /*#__PURE__*/_jsx(LatticeShell, {
285
- width: width,
286
- height: height,
287
- animated: animated,
288
- glow: "#2A3F4D",
289
- glowAt: [0.2, 0.75],
290
- children: parts
291
- });
292
- });
293
-
294
- // ============================================================================
295
- // Halftone — dot grid with a light falloff
296
- // ============================================================================
297
-
298
- const HALFTONE_STEP = 40;
299
-
300
- /**
301
- * The only preset in the family with a gradient in it, and it's made of dot
302
- * SIZE rather than colour: dots swell toward the light and shrink away from it.
303
- * Cheaper than a real gradient and it survives any background colour.
304
- */
305
- export const Halftone = /*#__PURE__*/memo(function Halftone({
306
- width,
307
- height,
308
- animated
309
- }) {
310
- const cols = Math.ceil(width / HALFTONE_STEP) + 1;
311
- const rows = Math.ceil(height / HALFTONE_STEP) + 1;
312
- const lx = width * 0.3;
313
- const ly = height * 0.25;
314
- const maxDist = Math.hypot(width, height);
315
- const dots = [];
316
- for (let r = 0; r < rows; r++) {
317
- for (let c = 0; c < cols; c++) {
318
- const x = c * HALFTONE_STEP;
319
- const y = r * HALFTONE_STEP;
320
- const t = 1 - Math.min(1, Math.hypot(x - lx, y - ly) / (maxDist * 0.7));
321
- const d = 1.2 + t * t * 5;
322
- dots.push(/*#__PURE__*/_jsx(View, {
323
- style: {
324
- position: "absolute",
325
- left: x - d / 2,
326
- top: y - d / 2,
327
- width: d,
328
- height: d,
329
- borderRadius: d / 2,
330
- backgroundColor: withAlpha("#8FA3B8", 0.14 + t * 0.4)
331
- }
332
- }, `${r}-${c}`));
333
- }
334
- }
335
- return /*#__PURE__*/_jsx(LatticeShell, {
336
- width: width,
337
- height: height,
338
- animated: animated,
339
- glow: "#31465C",
340
- glowAt: [0.3, 0.25],
341
- floor: 0.72,
342
- children: dots
343
- });
344
- });
345
-
346
- // ============================================================================
347
- // Waffle — machined panel
348
- // ============================================================================
349
-
350
- const WAFFLE_STEP = 58;
351
- export const Waffle = /*#__PURE__*/memo(function Waffle({
352
- width,
353
- height,
354
- animated
355
- }) {
356
- const cols = Math.ceil(width / WAFFLE_STEP) + 1;
357
- const rows = Math.ceil(height / WAFFLE_STEP) + 1;
358
- const size = WAFFLE_STEP - 10;
359
- const cells = [];
360
- for (let r = 0; r < rows; r++) {
361
- for (let c = 0; c < cols; c++) {
362
- cells.push(/*#__PURE__*/_jsx(View, {
363
- style: {
364
- position: "absolute",
365
- left: c * WAFFLE_STEP + 5,
366
- top: r * WAFFLE_STEP + 5,
367
- width: size,
368
- height: size,
369
- borderRadius: 10,
370
- borderWidth: 1,
371
- borderColor: withAlpha("#6B7A8D", 0.15)
372
- }
373
- }, `${r}-${c}`));
374
- }
375
- }
376
- return /*#__PURE__*/_jsx(LatticeShell, {
377
- width: width,
378
- height: height,
379
- animated: animated,
380
- glow: "#2E4152",
381
- glowAt: [0.75, 0.65],
382
- children: cells
383
- });
384
- });
385
-
386
- // ============================================================================
387
- // Instrument — ruled scales with tick marks
388
- // ============================================================================
389
-
390
- export const Instrument = /*#__PURE__*/memo(function Instrument({
391
- width,
392
- height,
393
- animated
394
- }) {
395
- const rules = 5;
396
- const gap = width / rules;
397
- const tickStep = 32;
398
- const ticks = Math.ceil(height / tickStep) + 1;
399
- const parts = [];
400
- for (let i = 0; i < rules; i++) {
401
- const x = gap * i + gap / 2;
402
- parts.push(/*#__PURE__*/_jsx(View, {
403
- style: {
404
- position: "absolute",
405
- left: x,
406
- top: 0,
407
- bottom: 0,
408
- width: hairline,
409
- backgroundColor: withAlpha("#7C8CA3", 0.22)
410
- }
411
- }, `r${i}`));
412
- for (let t = 0; t < ticks; t++) {
413
- // Every fifth tick is a major graduation — the thing that makes a scale
414
- // read as a scale rather than a dotted line.
415
- const major = t % 5 === 0;
416
- const len = major ? 11 : 5;
417
- parts.push(/*#__PURE__*/_jsx(View, {
418
- style: {
419
- position: "absolute",
420
- left: x,
421
- top: t * tickStep,
422
- width: len,
423
- // A hairline tick is invisible under the vignette — 1px minimum,
424
- // 2px on the graduations.
425
- height: major ? 2 : 1,
426
- backgroundColor: withAlpha("#8FA3B8", major ? 0.5 : 0.26)
427
- }
428
- }, `t${i}-${t}`));
429
- }
430
- }
431
- return /*#__PURE__*/_jsx(LatticeShell, {
432
- width: width,
433
- height: height,
434
- animated: animated,
435
- glow: "#2B3F51",
436
- glowAt: [0.5, 0.15],
437
- breatheMs: 8000,
438
- children: parts
439
- });
440
- });
441
-
442
- // ============================================================================
443
- // Radar — concentric rings, spokes, and a sweep
444
- // ============================================================================
445
-
446
- const GLOW = 26;
447
-
448
- /**
449
- * The one preset in the family with real motion: a sweep line rotating once
450
- * every 8s. It costs a second animated node and ~30 static views — still the
451
- * cheapest geometry here, because rings and spokes cover the surface with
452
- * almost nothing in them.
453
- */
454
- const RadarSweep = /*#__PURE__*/memo(function RadarSweep({
455
- cx,
456
- cy,
457
- radius,
458
- animated
459
- }) {
460
- const t = useLoop(8000, animated);
461
- const rotate = t.interpolate({
462
- inputRange: [0, 1],
463
- outputRange: ["0deg", "360deg"]
464
- });
465
- if (!animated) return null;
466
- // Rotating about one END rather than the middle is what makes this a sweeping
467
- // hand instead of a propeller. `transformOrigin` would say that directly, but
468
- // it needs RN 0.74+ and these packages peer-depend on `react-native: "*"` — so
469
- // the pivot is built out of layout instead: a container twice the radius wide,
470
- // centred on the origin, with the line living in its right half only.
471
- const span = radius * 2;
472
- return /*#__PURE__*/_jsxs(Animated.View, {
473
- style: {
474
- position: "absolute",
475
- left: cx - radius,
476
- top: cy - GLOW / 2,
477
- width: span,
478
- height: GLOW,
479
- transform: [{
480
- rotate
481
- }]
482
- },
483
- pointerEvents: "none",
484
- children: [/*#__PURE__*/_jsx(View, {
485
- style: {
486
- position: "absolute",
487
- left: radius,
488
- top: GLOW / 2,
489
- width: radius,
490
- height: 1,
491
- backgroundColor: withAlpha("#7DD3FC", 0.36)
492
- }
493
- }), /*#__PURE__*/_jsx(RadialGlow, {
494
- size: GLOW,
495
- color: "#7DD3FC",
496
- alpha: 0.4,
497
- rings: 5,
498
- style: {
499
- position: "absolute",
500
- left: span - GLOW,
501
- top: 0
502
- }
503
- })]
504
- });
505
- });
506
- export const Radar = /*#__PURE__*/memo(function Radar({
507
- width,
508
- height,
509
- animated
510
- }) {
511
- const cx = width * 0.5;
512
- const cy = height * 0.42;
513
- const maxR = Math.hypot(width, height) * 0.62;
514
- const rings = 9;
515
- const parts = [];
516
- for (let i = 1; i <= rings; i++) {
517
- const d = maxR * 2 * i / rings;
518
- parts.push(/*#__PURE__*/_jsx(View, {
519
- style: {
520
- position: "absolute",
521
- left: cx - d / 2,
522
- top: cy - d / 2,
523
- width: d,
524
- height: d,
525
- borderRadius: d / 2,
526
- borderWidth: 1,
527
- borderColor: withAlpha("#5B7A94", 0.34 * (1 - i / rings * 0.5))
528
- }
529
- }, `ring${i}`));
530
- }
531
- for (let i = 0; i < 8; i++) {
532
- // Same end-pivot trick as the sweep: a full-diameter container rotated
533
- // about its centre, carrying a half-width line.
534
- parts.push(/*#__PURE__*/_jsx(View, {
535
- style: {
536
- position: "absolute",
537
- left: cx - maxR,
538
- top: cy,
539
- width: maxR * 2,
540
- height: hairline,
541
- transform: [{
542
- rotate: `${i * 45}deg`
543
- }]
544
- },
545
- children: /*#__PURE__*/_jsx(View, {
546
- style: {
547
- position: "absolute",
548
- left: maxR,
549
- top: 0,
550
- width: maxR,
551
- height: hairline,
552
- backgroundColor: withAlpha("#5B7A94", 0.22)
553
- }
554
- })
555
- }, `spoke${i}`));
556
- }
557
- return /*#__PURE__*/_jsxs(View, {
558
- style: absoluteFill,
559
- pointerEvents: "none",
560
- children: [/*#__PURE__*/_jsx(LatticeShell, {
561
- width: width,
562
- height: height,
563
- animated: animated,
564
- glow: "#1F3A4D",
565
- glowAt: [0.5, 0.42],
566
- floor: 0.75,
567
- children: parts
568
- }), /*#__PURE__*/_jsx(RadarSweep, {
569
- cx: cx,
570
- cy: cy,
571
- radius: maxR,
572
- animated: animated
573
- })]
574
- });
575
- });