@buoy-gg/shared-ui 7.0.21 → 7.0.23

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