@buoy-gg/shared-ui 7.0.26 → 7.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "BACKGROUND_PRESETS", {
|
|
|
9
9
|
return _registry.BACKGROUND_PRESETS;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "BACKGROUND_STORAGE_KEY", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _backgroundStore.BACKGROUND_STORAGE_KEY;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "BackgroundSwitcher", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function () {
|
|
@@ -21,12 +27,48 @@ Object.defineProperty(exports, "DEFAULT_BACKGROUND", {
|
|
|
21
27
|
return _registry.DEFAULT_BACKGROUND;
|
|
22
28
|
}
|
|
23
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "DaylightTunable", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _daylight.DaylightTunable;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
24
36
|
Object.defineProperty(exports, "DeepFieldTunable", {
|
|
25
37
|
enumerable: true,
|
|
26
38
|
get: function () {
|
|
27
39
|
return _deepField.DeepFieldTunable;
|
|
28
40
|
}
|
|
29
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "LinearFade", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _primitives.LinearFade;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "LiveSkyTunable", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _liveSky.LiveSkyTunable;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "MoonlightTunable", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _moonlight.MoonlightTunable;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "RadialGlow", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _primitives.RadialGlow;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "RasterLayer", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _primitives.RasterLayer;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
30
72
|
Object.defineProperty(exports, "ToolBackground", {
|
|
31
73
|
enumerable: true,
|
|
32
74
|
get: function () {
|
|
@@ -45,6 +87,12 @@ Object.defineProperty(exports, "getPreset", {
|
|
|
45
87
|
return _registry.getPreset;
|
|
46
88
|
}
|
|
47
89
|
});
|
|
90
|
+
Object.defineProperty(exports, "getSkyScrub", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _skyClock.getSkyScrub;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
48
96
|
Object.defineProperty(exports, "presetAt", {
|
|
49
97
|
enumerable: true,
|
|
50
98
|
get: function () {
|
|
@@ -57,14 +105,56 @@ Object.defineProperty(exports, "presetIndex", {
|
|
|
57
105
|
return _registry.presetIndex;
|
|
58
106
|
}
|
|
59
107
|
});
|
|
108
|
+
Object.defineProperty(exports, "scatter", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _rng.scatter;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "setSkyScrub", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _skyClock.setSkyScrub;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "useLoop", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _primitives.useLoop;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "usePulse", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _primitives.usePulse;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "useSkyScrub", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _skyClock.useSkyScrub;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
60
138
|
Object.defineProperty(exports, "useToolBackground", {
|
|
61
139
|
enumerable: true,
|
|
62
140
|
get: function () {
|
|
63
141
|
return _backgroundStore.useToolBackground;
|
|
64
142
|
}
|
|
65
143
|
});
|
|
144
|
+
Object.defineProperty(exports, "withBgAlpha", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _rng.withAlpha;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
66
150
|
var _ToolBackground = require("./ToolBackground.js");
|
|
67
151
|
var _BackgroundSwitcher = require("./BackgroundSwitcher.js");
|
|
68
152
|
var _backgroundStore = require("./backgroundStore.js");
|
|
69
153
|
var _registry = require("./registry.js");
|
|
70
|
-
var
|
|
154
|
+
var _primitives = require("./primitives.js");
|
|
155
|
+
var _rng = require("./rng.js");
|
|
156
|
+
var _deepField = require("./variants/deepField.js");
|
|
157
|
+
var _moonlight = require("./variants/moonlight.js");
|
|
158
|
+
var _daylight = require("./variants/daylight.js");
|
|
159
|
+
var _liveSky = require("./variants/liveSky.js");
|
|
160
|
+
var _skyClock = require("./skyClock.js");
|
|
@@ -26,7 +26,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
26
26
|
* looping `Animated.timing` means the whole loop is handed to the UI thread
|
|
27
27
|
* once and never touches JS again — no per-frame callback, no re-render, no
|
|
28
28
|
* bridge traffic while it runs. A preset animates a handful of *layers*
|
|
29
|
-
* (transform on one parent view), never per-particle.
|
|
29
|
+
* (transform on one parent view), never per-particle. (On web there is no
|
|
30
|
+
* native driver and the JS driver must be requested explicitly — see
|
|
31
|
+
* NATIVE_DRIVER below for why the flag can't simply be left `true`.)
|
|
30
32
|
*
|
|
31
33
|
* 2. **Every static layer is rasterized.** `shouldRasterizeIOS` /
|
|
32
34
|
* `renderToHardwareTextureAndroid` turn a layer of 40 dots into a single
|
|
@@ -42,7 +44,20 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
42
44
|
// ============================================================================
|
|
43
45
|
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
47
|
+
* Ask for the native driver ONLY where the native animated module exists.
|
|
48
|
+
*
|
|
49
|
+
* On react-native-web (the desktop dashboard) `useNativeDriver: true` is
|
|
50
|
+
* demoted to the JS driver — but `Animated.loop` trusts the config flag, not
|
|
51
|
+
* the demotion: for a bare `loop(timing(...))` it takes its native-loop
|
|
52
|
+
* shortcut and starts ONE plain timing whose `iterations: -1` only the
|
|
53
|
+
* (absent) native module would honor. The loop plays a single pass and
|
|
54
|
+
* freezes — on desktop every background stopped seconds after opening.
|
|
55
|
+
* Requesting the JS driver honestly keeps loop's JS restart path in charge,
|
|
56
|
+
* which is the only driver web has anyway.
|
|
57
|
+
*/const NATIVE_DRIVER = _reactNative.Platform.OS !== "web";
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A native-driven 0→1 loop (JS-driven on web — see NATIVE_DRIVER).
|
|
46
61
|
*
|
|
47
62
|
* The returned value is only ever consumed by `interpolate` inside an
|
|
48
63
|
* `Animated.View` style, so React never re-renders while it runs. The loop is
|
|
@@ -61,7 +76,11 @@ function useLoop(durationMs, enabled = true) {
|
|
|
61
76
|
toValue: 1,
|
|
62
77
|
duration: durationMs,
|
|
63
78
|
easing: _reactNative.Easing.linear,
|
|
64
|
-
useNativeDriver:
|
|
79
|
+
useNativeDriver: NATIVE_DRIVER,
|
|
80
|
+
// A decorative endless loop must never register as an interaction —
|
|
81
|
+
// the default (true) would block InteractionManager callbacks in the
|
|
82
|
+
// host app for as long as the background is mounted.
|
|
83
|
+
isInteraction: false
|
|
65
84
|
}));
|
|
66
85
|
anim.start();
|
|
67
86
|
};
|
|
@@ -98,12 +117,16 @@ function usePulse(durationMs, enabled = true) {
|
|
|
98
117
|
toValue: 1,
|
|
99
118
|
duration: durationMs / 2,
|
|
100
119
|
easing: _reactNative.Easing.inOut(_reactNative.Easing.quad),
|
|
101
|
-
useNativeDriver:
|
|
120
|
+
useNativeDriver: NATIVE_DRIVER,
|
|
121
|
+
// See useLoop: endless decorative loops must not hold
|
|
122
|
+
// InteractionManager (isInteraction defaults to true).
|
|
123
|
+
isInteraction: false
|
|
102
124
|
}), _reactNative.Animated.timing(value, {
|
|
103
125
|
toValue: 0,
|
|
104
126
|
duration: durationMs / 2,
|
|
105
127
|
easing: _reactNative.Easing.inOut(_reactNative.Easing.quad),
|
|
106
|
-
useNativeDriver:
|
|
128
|
+
useNativeDriver: NATIVE_DRIVER,
|
|
129
|
+
isInteraction: false
|
|
107
130
|
})]));
|
|
108
131
|
anim.start();
|
|
109
132
|
};
|
|
@@ -198,7 +221,18 @@ const RadialGlow = exports.RadialGlow = /*#__PURE__*/(0, _react.memo)(function R
|
|
|
198
221
|
/**
|
|
199
222
|
* Fake linear gradient: `bands` stacked strips with linearly interpolated
|
|
200
223
|
* alpha. Used for scrims (keep text readable over a busy field) and for
|
|
201
|
-
* horizon glows.
|
|
224
|
+
* horizon glows.
|
|
225
|
+
*
|
|
226
|
+
* TRAP (found on the Abyss wash): translucent strips must NOT overlap. An
|
|
227
|
+
* overlap composites the same colour twice, doubling the alpha in a stripe at
|
|
228
|
+
* every band edge — on a dark surface that draws a visible line per band, and
|
|
229
|
+
* because the strips are %-sized the whole ruled pattern rescales as the
|
|
230
|
+
* modal resizes. Strips here butt exactly, with a 0.08% fudge (sub-pixel at
|
|
231
|
+
* any real size) so layout rounding can't open a hairline gap.
|
|
232
|
+
*
|
|
233
|
+
* `flattenBase`: when the fade sits DIRECTLY on a known opaque colour, pass
|
|
234
|
+
* that colour — each strip is then drawn opaque via `flattenOver`, which is
|
|
235
|
+
* pixel-identical, immune to seams entirely, and cheaper to composite.
|
|
202
236
|
*/
|
|
203
237
|
const LinearFade = exports.LinearFade = /*#__PURE__*/(0, _react.memo)(function LinearFade({
|
|
204
238
|
color,
|
|
@@ -206,6 +240,7 @@ const LinearFade = exports.LinearFade = /*#__PURE__*/(0, _react.memo)(function L
|
|
|
206
240
|
to = 1,
|
|
207
241
|
bands = 14,
|
|
208
242
|
direction = "down",
|
|
243
|
+
flattenBase,
|
|
209
244
|
style
|
|
210
245
|
}) {
|
|
211
246
|
const vertical = direction === "down" || direction === "up";
|
|
@@ -215,21 +250,22 @@ const LinearFade = exports.LinearFade = /*#__PURE__*/(0, _react.memo)(function L
|
|
|
215
250
|
for (let i = 0; i < bands; i++) {
|
|
216
251
|
const t = (i + 0.5) / bands;
|
|
217
252
|
const a = from + (to - from) * (reversed ? 1 - t : t);
|
|
253
|
+
const fill = flattenBase ? (0, _rng.flattenOver)(color, a, flattenBase) : (0, _rng.withAlpha)(color, a);
|
|
218
254
|
strips.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
219
255
|
style: vertical ? {
|
|
220
256
|
position: "absolute",
|
|
221
257
|
left: 0,
|
|
222
258
|
right: 0,
|
|
223
259
|
top: `${i * pct}%`,
|
|
224
|
-
height: `${pct +
|
|
225
|
-
backgroundColor:
|
|
260
|
+
height: `${pct + 0.08}%`,
|
|
261
|
+
backgroundColor: fill
|
|
226
262
|
} : {
|
|
227
263
|
position: "absolute",
|
|
228
264
|
top: 0,
|
|
229
265
|
bottom: 0,
|
|
230
266
|
left: `${i * pct}%`,
|
|
231
|
-
width: `${pct +
|
|
232
|
-
backgroundColor:
|
|
267
|
+
width: `${pct + 0.08}%`,
|
|
268
|
+
backgroundColor: fill
|
|
233
269
|
}
|
|
234
270
|
}, i));
|
|
235
271
|
}
|
|
@@ -268,7 +304,7 @@ const Vignette = exports.Vignette = /*#__PURE__*/(0, _react.memo)(function Vigne
|
|
|
268
304
|
from: alpha,
|
|
269
305
|
to: 0,
|
|
270
306
|
direction: "down",
|
|
271
|
-
bands:
|
|
307
|
+
bands: 14
|
|
272
308
|
})
|
|
273
309
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
274
310
|
style: {
|
|
@@ -283,7 +319,7 @@ const Vignette = exports.Vignette = /*#__PURE__*/(0, _react.memo)(function Vigne
|
|
|
283
319
|
from: 0,
|
|
284
320
|
to: alpha,
|
|
285
321
|
direction: "down",
|
|
286
|
-
bands:
|
|
322
|
+
bands: 14
|
|
287
323
|
})
|
|
288
324
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
289
325
|
style: {
|
|
@@ -298,7 +334,7 @@ const Vignette = exports.Vignette = /*#__PURE__*/(0, _react.memo)(function Vigne
|
|
|
298
334
|
from: alpha,
|
|
299
335
|
to: 0,
|
|
300
336
|
direction: "right",
|
|
301
|
-
bands:
|
|
337
|
+
bands: 10
|
|
302
338
|
})
|
|
303
339
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
304
340
|
style: {
|
|
@@ -313,7 +349,7 @@ const Vignette = exports.Vignette = /*#__PURE__*/(0, _react.memo)(function Vigne
|
|
|
313
349
|
from: 0,
|
|
314
350
|
to: alpha,
|
|
315
351
|
direction: "right",
|
|
316
|
-
bands:
|
|
352
|
+
bands: 10
|
|
317
353
|
})
|
|
318
354
|
})]
|
|
319
355
|
});
|
|
@@ -7,9 +7,10 @@ exports.DEFAULT_BACKGROUND = exports.BACKGROUND_PRESETS = void 0;
|
|
|
7
7
|
exports.getPreset = getPreset;
|
|
8
8
|
exports.presetAt = presetAt;
|
|
9
9
|
exports.presetIndex = presetIndex;
|
|
10
|
-
var _lattice = require("./variants/lattice.js");
|
|
11
10
|
var _deepField = require("./variants/deepField.js");
|
|
12
|
-
var
|
|
11
|
+
var _hyperspace = require("./variants/hyperspace.js");
|
|
12
|
+
var _liveSky = require("./variants/liveSky.js");
|
|
13
|
+
var _underwater = require("./variants/underwater.js");
|
|
13
14
|
/**
|
|
14
15
|
* The catalogue. Adding a preset means adding one entry here — the switcher,
|
|
15
16
|
* the persisted selection and every tool surface read from this list.
|
|
@@ -23,82 +24,58 @@ var _starfield = require("./variants/starfield.js");
|
|
|
23
24
|
const BACKGROUND_PRESETS = exports.BACKGROUND_PRESETS = [{
|
|
24
25
|
id: "off",
|
|
25
26
|
label: "Off",
|
|
26
|
-
blurb: "Plain black —
|
|
27
|
+
blurb: "Plain black — no backdrop at all",
|
|
27
28
|
nodes: 0,
|
|
28
29
|
views: 1,
|
|
29
30
|
Component: null
|
|
30
|
-
}, {
|
|
31
|
-
id: "starfield",
|
|
32
|
-
label: "Starfield",
|
|
33
|
-
blurb: "Five depth bands drifting at parallax speeds",
|
|
34
|
-
nodes: 6,
|
|
35
|
-
views: 222,
|
|
36
|
-
Component: _starfield.Starfield
|
|
37
31
|
}, {
|
|
38
32
|
id: "deepfield",
|
|
39
33
|
label: "Deep Field",
|
|
40
|
-
blurb: "The Everlights field
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
blurb: "The Everlights field — 160 stars, with meteors slamming the walls",
|
|
35
|
+
// The old standalone Meteors preset folded in: +2 meteor loops, ~50 views.
|
|
36
|
+
nodes: 24,
|
|
37
|
+
views: 510,
|
|
43
38
|
Component: _deepField.DeepField
|
|
44
39
|
}, {
|
|
45
|
-
id: "
|
|
46
|
-
label: "
|
|
47
|
-
blurb: "
|
|
48
|
-
nodes: 1,
|
|
49
|
-
views: 160,
|
|
50
|
-
Component: _lattice.HexMesh
|
|
51
|
-
}, {
|
|
52
|
-
id: "isogrid",
|
|
53
|
-
label: "Iso Grid",
|
|
54
|
-
blurb: "Three-axis isometric ruling",
|
|
40
|
+
id: "hyperspace",
|
|
41
|
+
label: "Hyperspace",
|
|
42
|
+
blurb: "Lightspeed — crisp points streaming from a centre vanishing point",
|
|
55
43
|
nodes: 1,
|
|
56
|
-
views:
|
|
57
|
-
Component:
|
|
44
|
+
views: 570,
|
|
45
|
+
Component: _hyperspace.Hyperspace
|
|
58
46
|
}, {
|
|
59
|
-
id: "
|
|
60
|
-
label: "
|
|
61
|
-
blurb: "
|
|
62
|
-
nodes:
|
|
63
|
-
views:
|
|
64
|
-
Component:
|
|
47
|
+
id: "livesky",
|
|
48
|
+
label: "Live Sky",
|
|
49
|
+
blurb: "The cove on your clock — dawn to dusk, for real",
|
|
50
|
+
nodes: 5,
|
|
51
|
+
views: 290,
|
|
52
|
+
Component: _liveSky.LiveSky
|
|
65
53
|
}, {
|
|
66
|
-
id: "
|
|
67
|
-
label: "
|
|
68
|
-
blurb: "
|
|
69
|
-
nodes:
|
|
70
|
-
views:
|
|
71
|
-
Component:
|
|
54
|
+
id: "abyss",
|
|
55
|
+
label: "Abyss",
|
|
56
|
+
blurb: "A surface light fanning into the deep",
|
|
57
|
+
nodes: 4,
|
|
58
|
+
views: 230,
|
|
59
|
+
Component: _underwater.Abyss
|
|
72
60
|
}, {
|
|
73
|
-
id: "
|
|
74
|
-
label: "
|
|
75
|
-
blurb: "
|
|
76
|
-
nodes:
|
|
77
|
-
views:
|
|
78
|
-
Component:
|
|
61
|
+
id: "bubbles",
|
|
62
|
+
label: "Bubbles",
|
|
63
|
+
blurb: "Bubbles wobbling up through the light",
|
|
64
|
+
nodes: 4,
|
|
65
|
+
views: 180,
|
|
66
|
+
Component: _underwater.Bubbles
|
|
79
67
|
}, {
|
|
80
|
-
id: "
|
|
81
|
-
label: "
|
|
82
|
-
blurb: "
|
|
83
|
-
nodes:
|
|
84
|
-
views:
|
|
85
|
-
Component:
|
|
86
|
-
}, {
|
|
87
|
-
id: "instrument",
|
|
88
|
-
label: "Instrument",
|
|
89
|
-
blurb: "Ruled scales with major graduations",
|
|
90
|
-
nodes: 1,
|
|
91
|
-
views: 110,
|
|
92
|
-
Component: _lattice.Instrument
|
|
93
|
-
}, {
|
|
94
|
-
id: "radar",
|
|
95
|
-
label: "Radar",
|
|
96
|
-
blurb: "Rings and spokes under a rotating sweep",
|
|
97
|
-
nodes: 2,
|
|
98
|
-
views: 40,
|
|
99
|
-
Component: _lattice.Radar
|
|
68
|
+
id: "jellyfish",
|
|
69
|
+
label: "Jellyfish",
|
|
70
|
+
blurb: "A bloom of glowing jellies, big and small, pulsing past",
|
|
71
|
+
nodes: 15,
|
|
72
|
+
views: 250,
|
|
73
|
+
Component: _underwater.Jellyfish
|
|
100
74
|
}];
|
|
101
|
-
|
|
75
|
+
|
|
76
|
+
// Ships OFF: a backdrop is an opt-in, so first load is plain black and the
|
|
77
|
+
// choice only persists once the user actually picks one in the switcher.
|
|
78
|
+
const DEFAULT_BACKGROUND = exports.DEFAULT_BACKGROUND = "off";
|
|
102
79
|
function presetIndex(id) {
|
|
103
80
|
const i = BACKGROUND_PRESETS.findIndex(p => p.id === id);
|
|
104
81
|
return i < 0 ? 0 : i;
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.flattenOver = flattenOver;
|
|
7
|
+
exports.lerpColor = lerpColor;
|
|
7
8
|
exports.mulberry32 = mulberry32;
|
|
8
9
|
exports.scatter = scatter;
|
|
9
10
|
exports.withAlpha = withAlpha;
|
|
@@ -49,6 +50,26 @@ function withAlpha(hex, alpha) {
|
|
|
49
50
|
return `rgba(${r},${g},${b},${a.toFixed(3)})`;
|
|
50
51
|
}
|
|
51
52
|
|
|
53
|
+
/**
|
|
54
|
+
* RGB lerp between two `#RRGGBB` (or `#RGB`) colours, returned as `#RRGGBB`.
|
|
55
|
+
* Used by Live Sky to blend palette keyframes; at minute-sized steps a plain
|
|
56
|
+
* RGB lerp is indistinguishable from anything fancier.
|
|
57
|
+
*/
|
|
58
|
+
function lerpColor(a, b, t) {
|
|
59
|
+
const parse = h => {
|
|
60
|
+
let v = h.replace("#", "");
|
|
61
|
+
if (v.length === 3) v = v[0] + v[0] + v[1] + v[1] + v[2] + v[2];
|
|
62
|
+
const n = parseInt(v, 16);
|
|
63
|
+
return [n >> 16 & 255, n >> 8 & 255, n & 255];
|
|
64
|
+
};
|
|
65
|
+
const [ar, ag, ab] = parse(a);
|
|
66
|
+
const [br, bg, bb] = parse(b);
|
|
67
|
+
const c = t < 0 ? 0 : t > 1 ? 1 : t;
|
|
68
|
+
const mix = (x, y) => Math.round(x + (y - x) * c);
|
|
69
|
+
const hex = n => n.toString(16).padStart(2, "0");
|
|
70
|
+
return `#${hex(mix(ar, br))}${hex(mix(ag, bg))}${hex(mix(ab, bb))}`;
|
|
71
|
+
}
|
|
72
|
+
|
|
52
73
|
/**
|
|
53
74
|
* `hex` at `alpha` composited over an opaque `base`, returned as an OPAQUE
|
|
54
75
|
* colour.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSkyScrub = getSkyScrub;
|
|
7
|
+
exports.setSkyScrub = setSkyScrub;
|
|
8
|
+
exports.useSkyScrub = useSkyScrub;
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
/**
|
|
11
|
+
* The Live Sky scrub clock.
|
|
12
|
+
*
|
|
13
|
+
* `null` means "live" — the Live Sky preset follows the real local clock. A
|
|
14
|
+
* number (minutes since midnight, quantized by the slider) freezes the scene
|
|
15
|
+
* at that time of day so the whole cycle can be scrubbed through by hand.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately NOT part of `backgroundStore`: the variant itself has to read
|
|
18
|
+
* this, and a variant importing the store would close an import cycle through
|
|
19
|
+
* the registry (store → registry → variant → store). It is also deliberately
|
|
20
|
+
* not persisted — a scrub is a preview gesture, not a setting.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
let scrub = null;
|
|
24
|
+
const listeners = new Set();
|
|
25
|
+
function getSkyScrub() {
|
|
26
|
+
return scrub;
|
|
27
|
+
}
|
|
28
|
+
function setSkyScrub(value) {
|
|
29
|
+
if (value === scrub) return;
|
|
30
|
+
scrub = value;
|
|
31
|
+
for (const listener of listeners) listener();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Subscribe a component to the scrub value. */
|
|
35
|
+
function useSkyScrub() {
|
|
36
|
+
const [value, setValue] = (0, _react.useState)(scrub);
|
|
37
|
+
(0, _react.useEffect)(() => {
|
|
38
|
+
const listener = () => setValue(scrub);
|
|
39
|
+
listeners.add(listener);
|
|
40
|
+
return () => {
|
|
41
|
+
listeners.delete(listener);
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
return value;
|
|
45
|
+
}
|