@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.
- package/lib/commonjs/JsModal.js +156 -20
- package/lib/commonjs/JsModal.web.js +85 -39
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +14 -4
- package/lib/commonjs/dataViewer/diffThemes.js +20 -18
- package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +8 -8
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/icons/lucide-icons.js +74 -15
- package/lib/commonjs/index.js +86 -0
- package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +248 -74
- package/lib/commonjs/ui/backgrounds/README.md +102 -20
- package/lib/commonjs/ui/backgrounds/backgroundStore.js +20 -6
- package/lib/commonjs/ui/backgrounds/index.js +91 -1
- package/lib/commonjs/ui/backgrounds/primitives.js +50 -14
- package/lib/commonjs/ui/backgrounds/registry.js +41 -64
- package/lib/commonjs/ui/backgrounds/rng.js +21 -0
- package/lib/commonjs/ui/backgrounds/skyClock.js +45 -0
- package/lib/commonjs/ui/backgrounds/variants/daylight.js +453 -0
- package/lib/commonjs/ui/backgrounds/variants/deepField.js +60 -30
- package/lib/commonjs/ui/backgrounds/variants/hyperspace.js +218 -0
- package/lib/commonjs/ui/backgrounds/variants/liveSky.js +898 -0
- package/lib/commonjs/ui/backgrounds/variants/meteors.js +257 -0
- package/lib/commonjs/ui/backgrounds/variants/moonlight.js +472 -0
- package/lib/commonjs/ui/backgrounds/variants/underwater.js +757 -0
- package/lib/commonjs/ui/components/Badge.js +11 -10
- package/lib/commonjs/ui/components/CompactRow.js +30 -17
- package/lib/commonjs/ui/components/DevToolsCard.js +12 -8
- package/lib/commonjs/ui/components/DynamicFilterView.js +43 -41
- package/lib/commonjs/ui/components/EventStepperFooter.js +38 -10
- package/lib/commonjs/ui/components/FilterComponents.js +11 -11
- package/lib/commonjs/ui/components/ModalHeader.js +13 -13
- package/lib/commonjs/ui/components/SectionHeader.js +3 -1
- package/lib/commonjs/ui/components/StorageTypeBadge.js +3 -2
- package/lib/commonjs/ui/components/TabSelector.js +56 -38
- package/lib/commonjs/ui/components/ValueTypeBadge.js +7 -6
- package/lib/commonjs/ui/components/WindowControls.js +37 -10
- package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +8 -0
- package/lib/commonjs/ui/night/nightTheme.js +120 -0
- package/lib/commonjs/ui/night/primitives.js +498 -0
- package/lib/module/JsModal.js +156 -20
- package/lib/module/JsModal.web.js +83 -39
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +14 -4
- package/lib/module/dataViewer/diffThemes.js +20 -18
- package/lib/module/dataViewer/tree/TreeDiffViewer.js +9 -9
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/icons/lucide-icons.js +74 -15
- package/lib/module/index.js +4 -0
- package/lib/module/ui/backgrounds/BackgroundSwitcher.js +250 -76
- package/lib/module/ui/backgrounds/README.md +102 -20
- package/lib/module/ui/backgrounds/backgroundStore.js +19 -5
- package/lib/module/ui/backgrounds/index.js +11 -2
- package/lib/module/ui/backgrounds/primitives.js +53 -16
- package/lib/module/ui/backgrounds/registry.js +41 -64
- package/lib/module/ui/backgrounds/rng.js +20 -0
- package/lib/module/ui/backgrounds/skyClock.js +39 -0
- package/lib/module/ui/backgrounds/variants/daylight.js +449 -0
- package/lib/module/ui/backgrounds/variants/deepField.js +62 -31
- package/lib/module/ui/backgrounds/variants/hyperspace.js +214 -0
- package/lib/module/ui/backgrounds/variants/liveSky.js +893 -0
- package/lib/module/ui/backgrounds/variants/meteors.js +253 -0
- package/lib/module/ui/backgrounds/variants/moonlight.js +468 -0
- package/lib/module/ui/backgrounds/variants/underwater.js +753 -0
- package/lib/module/ui/components/Badge.js +11 -10
- package/lib/module/ui/components/CompactRow.js +30 -17
- package/lib/module/ui/components/DevToolsCard.js +12 -8
- package/lib/module/ui/components/DynamicFilterView.js +43 -41
- package/lib/module/ui/components/EventStepperFooter.js +38 -10
- package/lib/module/ui/components/FilterComponents.js +11 -11
- package/lib/module/ui/components/ModalHeader.js +13 -13
- package/lib/module/ui/components/SectionHeader.js +3 -1
- package/lib/module/ui/components/StorageTypeBadge.js +3 -2
- package/lib/module/ui/components/TabSelector.js +57 -39
- package/lib/module/ui/components/ValueTypeBadge.js +7 -6
- package/lib/module/ui/components/WindowControls.js +37 -10
- package/lib/module/ui/gameUI/constants/gameUIColors.js +8 -0
- package/lib/module/ui/night/nightTheme.js +116 -0
- package/lib/module/ui/night/primitives.js +485 -0
- package/lib/typescript/commonjs/JsModal.d.ts +18 -0
- package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/JsModal.web.d.ts +13 -0
- package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +3 -1
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts +12 -1
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
- package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +3 -0
- package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +18 -3
- package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +8 -0
- package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +6 -0
- package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts +17 -0
- package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts +30 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +19 -4
- package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts +39 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts +41 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts +26 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts +35 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts +51 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts +2 -0
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts +9 -0
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts +4 -2
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +8 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +113 -0
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/night/primitives.d.ts +111 -0
- package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -0
- package/lib/typescript/module/JsModal.d.ts +18 -0
- package/lib/typescript/module/JsModal.d.ts.map +1 -1
- package/lib/typescript/module/JsModal.web.d.ts +13 -0
- package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/diffThemes.d.ts +3 -1
- package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/icons/lucide-icons.d.ts +12 -1
- package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
- package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +3 -0
- package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/primitives.d.ts +18 -3
- package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/registry.d.ts +8 -0
- package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/rng.d.ts +6 -0
- package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/skyClock.d.ts +17 -0
- package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/types.d.ts +1 -1
- package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts +30 -0
- package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +19 -4
- package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts +39 -0
- package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts +41 -0
- package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts +26 -0
- package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts +35 -0
- package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts +51 -0
- package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Badge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts +2 -0
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TabSelector.d.ts +9 -0
- package/lib/typescript/module/ui/components/TabSelector.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/WindowControls.d.ts +4 -2
- package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -1
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +8 -0
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
- package/lib/typescript/module/ui/night/nightTheme.d.ts +113 -0
- package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -0
- package/lib/typescript/module/ui/night/primitives.d.ts +111 -0
- package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -0
- package/package.json +4 -4
- package/lib/commonjs/ui/backgrounds/variants/lattice.js +0 -579
- package/lib/commonjs/ui/backgrounds/variants/starfield.js +0 -210
- package/lib/module/ui/backgrounds/variants/lattice.js +0 -575
- package/lib/module/ui/backgrounds/variants/starfield.js +0 -206
- package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +0 -33
- package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +0 -12
- package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +0 -33
- package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +0 -12
- package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +0 -1
|
@@ -1,579 +0,0 @@
|
|
|
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
|
-
});
|