@buoy-gg/shared-ui 7.0.36 → 7.0.38
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/README.md +33 -26
- package/floating.d.ts +1 -0
- package/floating.js +2 -0
- package/lib/commonjs/JsModal.js +16 -1
- package/lib/commonjs/JsModal.web.js +16 -1
- package/lib/commonjs/dataViewer/CyberpunkInput.js +6 -1
- package/lib/commonjs/dataViewer/LiveExplorer.js +28 -16
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/icons/ReactQueryIcon.js +9 -161
- package/lib/commonjs/icons/SentryBugIcon.js +9 -171
- package/lib/commonjs/index.js +57 -6
- package/lib/commonjs/license/AccountSetup.js +56 -0
- package/lib/commonjs/license/AccountSetup.web.js +81 -0
- package/lib/commonjs/license/FeatureGate.js +10 -43
- package/lib/commonjs/license/FreeAccountPrompt.js +35 -12
- package/lib/commonjs/license/index.js +0 -6
- package/lib/commonjs/license/licenseModule.js +56 -36
- package/lib/commonjs/license/tierLimits.js +12 -63
- package/lib/commonjs/storage/devToolsStorageKeys.js +8 -1
- package/lib/commonjs/stores/BaseEventStore.js +21 -5
- package/lib/commonjs/stores/createToolStore.js +21 -3
- package/lib/commonjs/stores/floatingToolStore.js +71 -0
- package/lib/commonjs/stores/floatingToolStore.test.js +112 -0
- package/lib/commonjs/sync/toolActionRegistry.js +85 -2
- package/lib/commonjs/ui/backgrounds/README.md +52 -0
- package/lib/commonjs/ui/backgrounds/ToolBackground.js +4 -2
- package/lib/commonjs/ui/backgrounds/index.js +8 -1
- package/lib/commonjs/ui/backgrounds/registry.js +8 -0
- package/lib/commonjs/ui/backgrounds/variants/wormhole/motion.js +48 -0
- package/lib/commonjs/ui/backgrounds/variants/wormhole/textures.js +3 -0
- package/lib/commonjs/ui/backgrounds/variants/wormhole.js +133 -0
- package/lib/commonjs/ui/components/ClipboardHintBanner.js +5 -6
- package/lib/commonjs/ui/components/CompactRow.js +94 -74
- package/lib/commonjs/ui/components/DraggableHeader.js +16 -1
- package/lib/commonjs/ui/components/HeaderSearchButton.js +17 -4
- package/lib/commonjs/ui/floating/FloatingTool.js +1010 -0
- package/lib/commonjs/ui/floating/FloatingTool.web.js +591 -0
- package/lib/commonjs/ui/floating/FloatingToolHost.js +32 -0
- package/lib/commonjs/ui/floating/FloatingToolHost.web.js +28 -0
- package/lib/commonjs/ui/floating/index.js +105 -0
- package/lib/commonjs/ui/floating/index.web.js +105 -0
- package/lib/commonjs/ui/floating/onboardingConstants.js +70 -0
- package/lib/commonjs/ui/floating/onboardingConstants.web.js +34 -0
- package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +3 -1
- package/lib/commonjs/ui/index.js +118 -2
- package/lib/commonjs/ui/night/nightTheme.js +10 -0
- package/lib/commonjs/ui/night/primitives.js +22 -5
- package/lib/commonjs/ui/otto/OttoSceneView.js +69 -0
- package/lib/commonjs/ui/otto/index.js +22 -0
- package/lib/commonjs/ui/otto/ottoEngine.js +10 -7
- package/lib/commonjs/ui/otto/ottoScenes.js +949 -0
- package/lib/commonjs/utils/minimalSuperJSON.js +13 -3
- package/lib/module/JsModal.js +16 -1
- package/lib/module/JsModal.web.js +16 -1
- package/lib/module/dataViewer/CyberpunkInput.js +6 -1
- package/lib/module/dataViewer/LiveExplorer.js +28 -16
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/icons/ReactQueryIcon.js +9 -161
- package/lib/module/icons/SentryBugIcon.js +9 -171
- package/lib/module/index.js +4 -1
- package/lib/module/license/AccountSetup.js +52 -0
- package/lib/module/license/AccountSetup.web.js +77 -0
- package/lib/module/license/FeatureGate.js +10 -43
- package/lib/module/license/FreeAccountPrompt.js +35 -12
- package/lib/module/license/index.js +1 -1
- package/lib/module/license/licenseModule.js +50 -35
- package/lib/module/license/tierLimits.js +13 -63
- package/lib/module/storage/devToolsStorageKeys.js +8 -1
- package/lib/module/stores/BaseEventStore.js +21 -5
- package/lib/module/stores/createToolStore.js +21 -3
- package/lib/module/stores/floatingToolStore.js +61 -0
- package/lib/module/stores/floatingToolStore.test.js +111 -0
- package/lib/module/sync/toolActionRegistry.js +84 -2
- package/lib/module/ui/backgrounds/README.md +52 -0
- package/lib/module/ui/backgrounds/ToolBackground.js +4 -2
- package/lib/module/ui/backgrounds/index.js +2 -1
- package/lib/module/ui/backgrounds/registry.js +8 -0
- package/lib/module/ui/backgrounds/variants/wormhole/motion.js +44 -0
- package/lib/module/ui/backgrounds/variants/wormhole/textures.js +3 -0
- package/lib/module/ui/backgrounds/variants/wormhole.js +129 -0
- package/lib/module/ui/components/ClipboardHintBanner.js +5 -6
- package/lib/module/ui/components/CompactRow.js +94 -74
- package/lib/module/ui/components/DraggableHeader.js +16 -1
- package/lib/module/ui/components/HeaderSearchButton.js +17 -4
- package/lib/module/ui/floating/FloatingTool.js +1003 -0
- package/lib/module/ui/floating/FloatingTool.web.js +590 -0
- package/lib/module/ui/floating/FloatingToolHost.js +29 -0
- package/lib/module/ui/floating/FloatingToolHost.web.js +25 -0
- package/lib/module/ui/floating/index.js +6 -0
- package/lib/module/ui/floating/index.web.js +6 -0
- package/lib/module/ui/floating/onboardingConstants.js +64 -0
- package/lib/module/ui/floating/onboardingConstants.web.js +27 -0
- package/lib/module/ui/gameUI/constants/gameUIColors.js +3 -1
- package/lib/module/ui/index.js +5 -1
- package/lib/module/ui/night/nightTheme.js +10 -0
- package/lib/module/ui/night/primitives.js +22 -5
- package/lib/module/ui/otto/OttoSceneView.js +64 -0
- package/lib/module/ui/otto/index.js +3 -1
- package/lib/module/ui/otto/ottoEngine.js +10 -7
- package/lib/module/ui/otto/ottoScenes.js +942 -0
- package/lib/module/utils/minimalSuperJSON.js +13 -3
- package/lib/typescript/commonjs/JsModal.d.ts +43 -2
- package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/JsModal.web.d.ts +5 -2
- package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts +1 -2
- package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts +1 -2
- package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +4 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/AccountSetup.d.ts +4 -0
- package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +2 -0
- package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/FeatureGate.d.ts +3 -19
- package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +8 -11
- package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/index.d.ts +1 -1
- package/lib/typescript/commonjs/license/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/licenseModule.d.ts +18 -31
- package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/tierLimits.d.ts +9 -52
- package/lib/typescript/commonjs/license/tierLimits.d.ts.map +1 -1
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +6 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/stores/BaseEventStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/stores/createToolStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/stores/floatingToolStore.d.ts +27 -0
- package/lib/typescript/commonjs/stores/floatingToolStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/stores/floatingToolStore.test.d.ts +2 -0
- package/lib/typescript/commonjs/stores/floatingToolStore.test.d.ts.map +1 -0
- package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts +4 -32
- package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts +7 -1
- package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +2 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +11 -1
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/motion.d.ts +24 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/motion.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/textures.d.ts +13 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/textures.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole.d.ts +3 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +8 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts +4 -1
- package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts +7 -1
- package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts +79 -0
- package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts +64 -0
- package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/floating/FloatingToolHost.d.ts +3 -0
- package/lib/typescript/commonjs/ui/floating/FloatingToolHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/floating/FloatingToolHost.web.d.ts +3 -0
- package/lib/typescript/commonjs/ui/floating/FloatingToolHost.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/floating/index.d.ts +7 -0
- package/lib/typescript/commonjs/ui/floating/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/floating/index.web.d.ts +7 -0
- package/lib/typescript/commonjs/ui/floating/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/floating/onboardingConstants.d.ts +30 -0
- package/lib/typescript/commonjs/ui/floating/onboardingConstants.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/floating/onboardingConstants.web.d.ts +13 -0
- package/lib/typescript/commonjs/ui/floating/onboardingConstants.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +2 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +6 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +10 -0
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/night/primitives.d.ts +10 -3
- package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/otto/OttoSceneView.d.ts +30 -0
- package/lib/typescript/commonjs/ui/otto/OttoSceneView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/otto/index.d.ts +2 -0
- package/lib/typescript/commonjs/ui/otto/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
- package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/otto/ottoScenes.d.ts +75 -0
- package/lib/typescript/commonjs/ui/otto/ottoScenes.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts.map +1 -1
- package/lib/typescript/module/JsModal.d.ts +43 -2
- package/lib/typescript/module/JsModal.d.ts.map +1 -1
- package/lib/typescript/module/JsModal.web.d.ts +5 -2
- package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/icons/ReactQueryIcon.d.ts +1 -2
- package/lib/typescript/module/icons/ReactQueryIcon.d.ts.map +1 -1
- package/lib/typescript/module/icons/SentryBugIcon.d.ts +1 -2
- package/lib/typescript/module/icons/SentryBugIcon.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +4 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/license/AccountSetup.d.ts +4 -0
- package/lib/typescript/module/license/AccountSetup.d.ts.map +1 -0
- package/lib/typescript/module/license/AccountSetup.web.d.ts +2 -0
- package/lib/typescript/module/license/AccountSetup.web.d.ts.map +1 -0
- package/lib/typescript/module/license/FeatureGate.d.ts +3 -19
- package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
- package/lib/typescript/module/license/FreeAccountPrompt.d.ts +8 -11
- package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
- package/lib/typescript/module/license/index.d.ts +1 -1
- package/lib/typescript/module/license/index.d.ts.map +1 -1
- package/lib/typescript/module/license/licenseModule.d.ts +18 -31
- package/lib/typescript/module/license/licenseModule.d.ts.map +1 -1
- package/lib/typescript/module/license/tierLimits.d.ts +9 -52
- package/lib/typescript/module/license/tierLimits.d.ts.map +1 -1
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +6 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/module/stores/BaseEventStore.d.ts.map +1 -1
- package/lib/typescript/module/stores/createToolStore.d.ts.map +1 -1
- package/lib/typescript/module/stores/floatingToolStore.d.ts +27 -0
- package/lib/typescript/module/stores/floatingToolStore.d.ts.map +1 -0
- package/lib/typescript/module/stores/floatingToolStore.test.d.ts +2 -0
- package/lib/typescript/module/stores/floatingToolStore.test.d.ts.map +1 -0
- package/lib/typescript/module/sync/toolActionRegistry.d.ts +4 -32
- package/lib/typescript/module/sync/toolActionRegistry.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts +7 -1
- package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts +2 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/types.d.ts +11 -1
- package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/variants/wormhole/motion.d.ts +24 -0
- package/lib/typescript/module/ui/backgrounds/variants/wormhole/motion.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/wormhole/textures.d.ts +13 -0
- package/lib/typescript/module/ui/backgrounds/variants/wormhole/textures.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/wormhole.d.ts +3 -0
- package/lib/typescript/module/ui/backgrounds/variants/wormhole.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts +8 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DraggableHeader.d.ts +4 -1
- package/lib/typescript/module/ui/components/DraggableHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts +7 -1
- package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/floating/FloatingTool.d.ts +79 -0
- package/lib/typescript/module/ui/floating/FloatingTool.d.ts.map +1 -0
- package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts +64 -0
- package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +1 -0
- package/lib/typescript/module/ui/floating/FloatingToolHost.d.ts +3 -0
- package/lib/typescript/module/ui/floating/FloatingToolHost.d.ts.map +1 -0
- package/lib/typescript/module/ui/floating/FloatingToolHost.web.d.ts +3 -0
- package/lib/typescript/module/ui/floating/FloatingToolHost.web.d.ts.map +1 -0
- package/lib/typescript/module/ui/floating/index.d.ts +7 -0
- package/lib/typescript/module/ui/floating/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/floating/index.web.d.ts +7 -0
- package/lib/typescript/module/ui/floating/index.web.d.ts.map +1 -0
- package/lib/typescript/module/ui/floating/onboardingConstants.d.ts +30 -0
- package/lib/typescript/module/ui/floating/onboardingConstants.d.ts.map +1 -0
- package/lib/typescript/module/ui/floating/onboardingConstants.web.d.ts +13 -0
- package/lib/typescript/module/ui/floating/onboardingConstants.web.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +2 -0
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +6 -0
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/night/nightTheme.d.ts +10 -0
- package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -1
- package/lib/typescript/module/ui/night/primitives.d.ts +10 -3
- package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/otto/OttoSceneView.d.ts +30 -0
- package/lib/typescript/module/ui/otto/OttoSceneView.d.ts.map +1 -0
- package/lib/typescript/module/ui/otto/index.d.ts +2 -0
- package/lib/typescript/module/ui/otto/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
- package/lib/typescript/module/ui/otto/ottoEngine.d.ts.map +1 -1
- package/lib/typescript/module/ui/otto/ottoScenes.d.ts +75 -0
- package/lib/typescript/module/ui/otto/ottoScenes.d.ts.map +1 -0
- package/lib/typescript/module/utils/minimalSuperJSON.d.ts.map +1 -1
- package/package.json +25 -5
- package/scripts/generate-wormhole-textures.cjs +261 -0
- package/scripts/test-wormhole-motion.cjs +59 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo, useEffect, useState } from "react";
|
|
4
|
+
import { AccessibilityInfo, Animated, Image, View, useWindowDimensions } from "react-native";
|
|
5
|
+
import { absoluteFill } from "../../../utils/absoluteFill.js";
|
|
6
|
+
import { useLoop } from "../primitives.js";
|
|
7
|
+
import { WORMHOLE_STILL, WORMHOLE_SHEET, WORMHOLE_CORE } from "./wormhole/textures.js";
|
|
8
|
+
import { WORMHOLE_CYCLE_MS, WORMHOLE_INPUT, WORMHOLE_SHELLS, WORMHOLE_CAMERA_ROTATION } from "./wormhole/motion.js";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const fill = {
|
|
11
|
+
width: "100%",
|
|
12
|
+
height: "100%"
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** Dependency-free mobile preview, textured from the production GLSL wormhole.
|
|
16
|
+
* This is a native-composited approximation, not a live volumetric shader.
|
|
17
|
+
* One Animated clock, no JS frame callbacks, no third-party native renderer.
|
|
18
|
+
*
|
|
19
|
+
* Two copies of a self-similar cloud sheet zoom toward the viewer one period
|
|
20
|
+
* apart; because the sheet is the same picture at ×2 and +21°, the copies are
|
|
21
|
+
* pixel-identical wherever they overlap and their crossfade is invisible (see
|
|
22
|
+
* motion.ts). The destination never zooms: it is a static cut of the same
|
|
23
|
+
* frame, drawn above the sheets. Geometry follows the window; resizing a tool
|
|
24
|
+
* crops rather than stretches it. The eye lands on `focus` (the dial pins it
|
|
25
|
+
* to the hub); the plane is always bigger than any surface, so moving the
|
|
26
|
+
* eye only changes which part of the tunnel is in view.
|
|
27
|
+
*/
|
|
28
|
+
/** Where the eye sits when the host doesn't pin it: a little right and above centre. */
|
|
29
|
+
const DEFAULT_FOCUS = {
|
|
30
|
+
x: 0.54,
|
|
31
|
+
y: 0.46
|
|
32
|
+
};
|
|
33
|
+
export const Wormhole = /*#__PURE__*/memo(function Wormhole({
|
|
34
|
+
width,
|
|
35
|
+
height,
|
|
36
|
+
animated,
|
|
37
|
+
focus = DEFAULT_FOCUS
|
|
38
|
+
}) {
|
|
39
|
+
const window = useWindowDimensions();
|
|
40
|
+
// Default to still until the accessibility preference is known.
|
|
41
|
+
const [reduced, setReduced] = useState(true);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
let live = true;
|
|
44
|
+
let changed = false;
|
|
45
|
+
const subscription = AccessibilityInfo.addEventListener("reduceMotionChanged", value => {
|
|
46
|
+
changed = true;
|
|
47
|
+
setReduced(value);
|
|
48
|
+
});
|
|
49
|
+
void AccessibilityInfo.isReduceMotionEnabled().then(value => {
|
|
50
|
+
if (live && !changed) setReduced(value);
|
|
51
|
+
}).catch(() => {/* Keep the still scene when the preference is unavailable. */});
|
|
52
|
+
return () => {
|
|
53
|
+
live = false;
|
|
54
|
+
subscription.remove();
|
|
55
|
+
};
|
|
56
|
+
}, []);
|
|
57
|
+
const moving = animated && !reduced;
|
|
58
|
+
const clock = useLoop(WORMHOLE_CYCLE_MS, moving);
|
|
59
|
+
const diameter = Math.ceil(Math.hypot(window.width, window.height) * 1.08);
|
|
60
|
+
const plane = {
|
|
61
|
+
position: "absolute",
|
|
62
|
+
left: width * focus.x - diameter / 2,
|
|
63
|
+
top: height * focus.y - diameter / 2,
|
|
64
|
+
width: diameter,
|
|
65
|
+
height: diameter
|
|
66
|
+
};
|
|
67
|
+
const camera = {
|
|
68
|
+
transform: [{
|
|
69
|
+
rotate: clock.interpolate({
|
|
70
|
+
inputRange: WORMHOLE_INPUT,
|
|
71
|
+
outputRange: WORMHOLE_CAMERA_ROTATION
|
|
72
|
+
})
|
|
73
|
+
}]
|
|
74
|
+
};
|
|
75
|
+
return /*#__PURE__*/_jsx(View, {
|
|
76
|
+
pointerEvents: "none",
|
|
77
|
+
style: [absoluteFill, {
|
|
78
|
+
overflow: "hidden",
|
|
79
|
+
backgroundColor: "#030a1c"
|
|
80
|
+
}],
|
|
81
|
+
children: moving ? /*#__PURE__*/_jsxs(Animated.View, {
|
|
82
|
+
style: [plane, camera],
|
|
83
|
+
children: [WORMHOLE_SHELLS.map((shell, i) => /*#__PURE__*/_jsx(Animated.View, {
|
|
84
|
+
style: [absoluteFill, {
|
|
85
|
+
opacity: clock.interpolate({
|
|
86
|
+
inputRange: WORMHOLE_INPUT,
|
|
87
|
+
outputRange: shell.opacity
|
|
88
|
+
}),
|
|
89
|
+
transform: [{
|
|
90
|
+
scale: clock.interpolate({
|
|
91
|
+
inputRange: WORMHOLE_INPUT,
|
|
92
|
+
outputRange: shell.scale
|
|
93
|
+
})
|
|
94
|
+
}, {
|
|
95
|
+
rotate: clock.interpolate({
|
|
96
|
+
inputRange: WORMHOLE_INPUT,
|
|
97
|
+
outputRange: shell.rotate
|
|
98
|
+
})
|
|
99
|
+
}]
|
|
100
|
+
}],
|
|
101
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
102
|
+
source: WORMHOLE_SHEET,
|
|
103
|
+
resizeMode: "stretch",
|
|
104
|
+
fadeDuration: 0,
|
|
105
|
+
style: fill
|
|
106
|
+
})
|
|
107
|
+
}, i)), /*#__PURE__*/_jsx(Image, {
|
|
108
|
+
source: WORMHOLE_CORE,
|
|
109
|
+
resizeMode: "stretch",
|
|
110
|
+
fadeDuration: 0,
|
|
111
|
+
style: {
|
|
112
|
+
position: "absolute",
|
|
113
|
+
left: diameter / 4,
|
|
114
|
+
top: diameter / 4,
|
|
115
|
+
width: diameter / 2,
|
|
116
|
+
height: diameter / 2
|
|
117
|
+
}
|
|
118
|
+
})]
|
|
119
|
+
}) : /*#__PURE__*/_jsx(Animated.View, {
|
|
120
|
+
style: [plane, camera],
|
|
121
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
122
|
+
source: WORMHOLE_STILL,
|
|
123
|
+
resizeMode: "stretch",
|
|
124
|
+
fadeDuration: 0,
|
|
125
|
+
style: fill
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
});
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { memo, useCallback } from "react";
|
|
12
12
|
import { View, Text, TouchableOpacity, StyleSheet, Modal, Pressable } from "react-native";
|
|
13
13
|
import { gameUIColors } from "../gameUI/index.js";
|
|
14
|
+
import { Copy } from "../../icons/lucide-icons.js";
|
|
14
15
|
import { monoFont } from "../fonts.js";
|
|
15
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
/**
|
|
@@ -39,9 +40,10 @@ export const ClipboardHintBanner = /*#__PURE__*/memo(function ClipboardHintBanne
|
|
|
39
40
|
style: styles.inner,
|
|
40
41
|
children: [/*#__PURE__*/_jsx(View, {
|
|
41
42
|
style: styles.iconContainer,
|
|
42
|
-
children: /*#__PURE__*/_jsx(
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
children: /*#__PURE__*/_jsx(Copy, {
|
|
44
|
+
size: 22,
|
|
45
|
+
color: gameUIColors.info,
|
|
46
|
+
strokeWidth: 2
|
|
45
47
|
})
|
|
46
48
|
}), /*#__PURE__*/_jsxs(View, {
|
|
47
49
|
style: styles.messageContainer,
|
|
@@ -106,9 +108,6 @@ const styles = StyleSheet.create({
|
|
|
106
108
|
justifyContent: "center",
|
|
107
109
|
alignItems: "center"
|
|
108
110
|
},
|
|
109
|
-
iconText: {
|
|
110
|
-
fontSize: 24
|
|
111
|
-
},
|
|
112
111
|
messageContainer: {
|
|
113
112
|
gap: 8
|
|
114
113
|
},
|
|
@@ -28,7 +28,8 @@ export function CompactRow({
|
|
|
28
28
|
statusSublabelTestID,
|
|
29
29
|
primaryTestID,
|
|
30
30
|
secondaryTestID,
|
|
31
|
-
accessibilityLabel
|
|
31
|
+
accessibilityLabel,
|
|
32
|
+
trailingAction
|
|
32
33
|
}) {
|
|
33
34
|
return /*#__PURE__*/_jsx(View, {
|
|
34
35
|
style: [styles.rowWrapper, isExpanded && styles.rowWrapperExpanded],
|
|
@@ -41,83 +42,90 @@ export function CompactRow({
|
|
|
41
42
|
borderBottomColor: expandedGlowColor || night.color.accent,
|
|
42
43
|
shadowColor: expandedGlowColor || night.color.accent
|
|
43
44
|
}]],
|
|
44
|
-
children: [/*#__PURE__*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
46
|
+
style: styles.headerRow,
|
|
47
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
48
|
+
style: styles.headerPress,
|
|
49
|
+
onPress: onPress,
|
|
50
|
+
activeOpacity: 0.8,
|
|
51
|
+
disabled: disabled || !onPress,
|
|
52
|
+
testID: testID,
|
|
53
|
+
accessibilityLabel: accessibilityLabel
|
|
54
|
+
// Label alone is not enough on Fabric: a row that announces text but
|
|
55
|
+
// no role reads to VoiceOver as static content, so the fact that it
|
|
56
|
+
// opens something is only discoverable by tapping it.
|
|
57
|
+
,
|
|
58
|
+
accessibilityRole: onPress ? "button" : undefined,
|
|
59
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
60
|
+
style: styles.rowContent,
|
|
61
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
62
|
+
style: styles.statusSection,
|
|
63
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
64
|
+
style: [styles.statusDot, {
|
|
65
|
+
backgroundColor: statusDotColor
|
|
66
|
+
}]
|
|
67
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
68
|
+
style: styles.statusInfo,
|
|
69
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
70
|
+
style: [styles.statusLabel, {
|
|
71
|
+
color: statusDotColor
|
|
72
|
+
}],
|
|
73
|
+
numberOfLines: 1,
|
|
74
|
+
testID: statusTestID,
|
|
75
|
+
children: statusLabel
|
|
76
|
+
}), statusSublabel ? /*#__PURE__*/_jsx(Text, {
|
|
77
|
+
style: styles.observerText,
|
|
78
|
+
numberOfLines: 1,
|
|
79
|
+
testID: statusSublabelTestID,
|
|
80
|
+
children: statusSublabel
|
|
81
|
+
}) : null]
|
|
82
|
+
})]
|
|
63
83
|
}), /*#__PURE__*/_jsxs(View, {
|
|
64
|
-
style: styles.
|
|
84
|
+
style: styles.querySection,
|
|
65
85
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
66
|
-
style:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
style: styles.queryHash,
|
|
87
|
+
numberOfLines: isExpanded ? undefined : 2,
|
|
88
|
+
testID: primaryTestID,
|
|
89
|
+
children: primaryText
|
|
90
|
+
}), !isExpanded && (secondaryText || secondaryAccessory) ? /*#__PURE__*/_jsxs(View, {
|
|
91
|
+
style: styles.secondaryRow,
|
|
92
|
+
children: [secondaryText ? /*#__PURE__*/_jsx(Text, {
|
|
93
|
+
style: styles.secondaryText,
|
|
94
|
+
numberOfLines: 1,
|
|
95
|
+
testID: secondaryTestID,
|
|
96
|
+
children: secondaryText
|
|
97
|
+
}) : null, secondaryAccessory]
|
|
77
98
|
}) : null]
|
|
99
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
100
|
+
style: styles.rightSection,
|
|
101
|
+
children: [(customBadge || badgeText !== undefined || !isExpanded && bottomRightText) && /*#__PURE__*/_jsxs(View, {
|
|
102
|
+
style: styles.badgeContainer,
|
|
103
|
+
children: [customBadge ? customBadge : badgeText !== undefined ? /*#__PURE__*/_jsx(Text, {
|
|
104
|
+
style: [styles.statusBadge, {
|
|
105
|
+
color: badgeColor || statusDotColor
|
|
106
|
+
}],
|
|
107
|
+
children: badgeText
|
|
108
|
+
}) : null, !isExpanded && bottomRightText ? /*#__PURE__*/_jsx(Text, {
|
|
109
|
+
style: styles.bottomRightText,
|
|
110
|
+
numberOfLines: 1,
|
|
111
|
+
children: bottomRightText
|
|
112
|
+
}) : null]
|
|
113
|
+
}), showChevron && /*#__PURE__*/_jsx(View, {
|
|
114
|
+
style: styles.chevronContainer,
|
|
115
|
+
children: isExpanded ? /*#__PURE__*/_jsx(ChevronDown, {
|
|
116
|
+
size: 14,
|
|
117
|
+
color: night.color.textTertiary
|
|
118
|
+
}) : /*#__PURE__*/_jsx(ChevronRight, {
|
|
119
|
+
size: 14,
|
|
120
|
+
color: night.color.textTertiary
|
|
121
|
+
})
|
|
122
|
+
})]
|
|
78
123
|
})]
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
testID: primaryTestID,
|
|
85
|
-
children: primaryText
|
|
86
|
-
}), !isExpanded && (secondaryText || secondaryAccessory) ? /*#__PURE__*/_jsxs(View, {
|
|
87
|
-
style: styles.secondaryRow,
|
|
88
|
-
children: [secondaryText ? /*#__PURE__*/_jsx(Text, {
|
|
89
|
-
style: styles.secondaryText,
|
|
90
|
-
numberOfLines: 1,
|
|
91
|
-
testID: secondaryTestID,
|
|
92
|
-
children: secondaryText
|
|
93
|
-
}) : null, secondaryAccessory]
|
|
94
|
-
}) : null]
|
|
95
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
96
|
-
style: styles.rightSection,
|
|
97
|
-
children: [(customBadge || badgeText !== undefined || !isExpanded && bottomRightText) && /*#__PURE__*/_jsxs(View, {
|
|
98
|
-
style: styles.badgeContainer,
|
|
99
|
-
children: [customBadge ? customBadge : badgeText !== undefined ? /*#__PURE__*/_jsx(Text, {
|
|
100
|
-
style: [styles.statusBadge, {
|
|
101
|
-
color: badgeColor || statusDotColor
|
|
102
|
-
}],
|
|
103
|
-
children: badgeText
|
|
104
|
-
}) : null, !isExpanded && bottomRightText ? /*#__PURE__*/_jsx(Text, {
|
|
105
|
-
style: styles.bottomRightText,
|
|
106
|
-
numberOfLines: 1,
|
|
107
|
-
children: bottomRightText
|
|
108
|
-
}) : null]
|
|
109
|
-
}), showChevron && /*#__PURE__*/_jsx(View, {
|
|
110
|
-
style: styles.chevronContainer,
|
|
111
|
-
children: isExpanded ? /*#__PURE__*/_jsx(ChevronDown, {
|
|
112
|
-
size: 14,
|
|
113
|
-
color: night.color.textTertiary
|
|
114
|
-
}) : /*#__PURE__*/_jsx(ChevronRight, {
|
|
115
|
-
size: 14,
|
|
116
|
-
color: night.color.textTertiary
|
|
117
|
-
})
|
|
118
|
-
})]
|
|
119
|
-
})]
|
|
120
|
-
})
|
|
124
|
+
})
|
|
125
|
+
}), trailingAction ? /*#__PURE__*/_jsx(View, {
|
|
126
|
+
style: styles.trailingAction,
|
|
127
|
+
children: trailingAction
|
|
128
|
+
}) : null]
|
|
121
129
|
}), isExpanded && expandedContent && /*#__PURE__*/_jsx(View, {
|
|
122
130
|
style: styles.expandedContent,
|
|
123
131
|
children: expandedContent
|
|
@@ -185,6 +193,18 @@ const styles = StyleSheet.create({
|
|
|
185
193
|
shadowRadius: 20,
|
|
186
194
|
elevation: 10
|
|
187
195
|
},
|
|
196
|
+
headerRow: {
|
|
197
|
+
flexDirection: "row",
|
|
198
|
+
alignItems: "center"
|
|
199
|
+
},
|
|
200
|
+
headerPress: {
|
|
201
|
+
flex: 1,
|
|
202
|
+
minWidth: 0
|
|
203
|
+
},
|
|
204
|
+
trailingAction: {
|
|
205
|
+
marginLeft: 8,
|
|
206
|
+
justifyContent: "center"
|
|
207
|
+
},
|
|
188
208
|
rowContent: {
|
|
189
209
|
flexDirection: "row",
|
|
190
210
|
alignItems: "center",
|
|
@@ -36,6 +36,9 @@ export const DraggableHeader = /*#__PURE__*/memo(function DraggableHeader({
|
|
|
36
36
|
},
|
|
37
37
|
style,
|
|
38
38
|
enabled = true,
|
|
39
|
+
claimOnMove = true,
|
|
40
|
+
onLayout,
|
|
41
|
+
hitSlop,
|
|
39
42
|
maxOverflowX = 0,
|
|
40
43
|
testID,
|
|
41
44
|
accessibilityLabel
|
|
@@ -72,6 +75,7 @@ export const DraggableHeader = /*#__PURE__*/memo(function DraggableHeader({
|
|
|
72
75
|
elementSize,
|
|
73
76
|
minPosition,
|
|
74
77
|
enabled,
|
|
78
|
+
claimOnMove,
|
|
75
79
|
maxOverflowX
|
|
76
80
|
});
|
|
77
81
|
propsRef.current = {
|
|
@@ -84,6 +88,7 @@ export const DraggableHeader = /*#__PURE__*/memo(function DraggableHeader({
|
|
|
84
88
|
elementSize,
|
|
85
89
|
minPosition,
|
|
86
90
|
enabled,
|
|
91
|
+
claimOnMove,
|
|
87
92
|
maxOverflowX
|
|
88
93
|
};
|
|
89
94
|
const panResponder = useMemo(() => {
|
|
@@ -95,7 +100,7 @@ export const DraggableHeader = /*#__PURE__*/memo(function DraggableHeader({
|
|
|
95
100
|
};
|
|
96
101
|
return PanResponder.create({
|
|
97
102
|
onStartShouldSetPanResponder: () => propsRef.current.enabled,
|
|
98
|
-
onMoveShouldSetPanResponder: (_, g) => propsRef.current.enabled && (Math.abs(g.dx) > 1 || Math.abs(g.dy) > 1),
|
|
103
|
+
onMoveShouldSetPanResponder: (_, g) => propsRef.current.enabled && propsRef.current.claimOnMove && (Math.abs(g.dx) > 1 || Math.abs(g.dy) > 1),
|
|
99
104
|
onPanResponderTerminationRequest: () => false,
|
|
100
105
|
onPanResponderGrant: () => {
|
|
101
106
|
isDraggingRef.current = false;
|
|
@@ -188,8 +193,18 @@ export const DraggableHeader = /*#__PURE__*/memo(function DraggableHeader({
|
|
|
188
193
|
}, [position]);
|
|
189
194
|
return /*#__PURE__*/_jsx(View, {
|
|
190
195
|
style: style,
|
|
196
|
+
onLayout: onLayout,
|
|
197
|
+
hitSlop: hitSlop,
|
|
191
198
|
testID: testID,
|
|
192
199
|
accessibilityLabel: accessibilityLabel,
|
|
200
|
+
accessibilityRole: onTap ? "button" : undefined,
|
|
201
|
+
accessibilityActions: onTap ? [{
|
|
202
|
+
name: "activate",
|
|
203
|
+
label: "Hide or show"
|
|
204
|
+
}] : undefined,
|
|
205
|
+
onAccessibilityAction: event => {
|
|
206
|
+
if (event.nativeEvent.actionName === "activate") propsRef.current.onTap?.();
|
|
207
|
+
},
|
|
193
208
|
...panResponder.panHandlers,
|
|
194
209
|
children: children
|
|
195
210
|
});
|
|
@@ -3,25 +3,28 @@
|
|
|
3
3
|
import { TouchableOpacity, StyleSheet } from "react-native";
|
|
4
4
|
import { Search } from "../../icons/index.js";
|
|
5
5
|
import { gameUIColors } from "../gameUI/index.js";
|
|
6
|
+
import { night } from "../night/nightTheme.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export function HeaderSearchButton({
|
|
8
9
|
onPress,
|
|
9
10
|
size = 14,
|
|
10
|
-
color
|
|
11
|
+
color,
|
|
11
12
|
style,
|
|
12
13
|
accessibilityLabel = "Search",
|
|
13
|
-
testID
|
|
14
|
+
testID,
|
|
15
|
+
variant = "plain"
|
|
14
16
|
}) {
|
|
17
|
+
const chip = variant === "chip";
|
|
15
18
|
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
16
19
|
onPress: onPress,
|
|
17
|
-
style: [styles.button, style],
|
|
20
|
+
style: [chip ? styles.chip : styles.button, style],
|
|
18
21
|
activeOpacity: 0.7,
|
|
19
22
|
accessibilityRole: "button",
|
|
20
23
|
accessibilityLabel: accessibilityLabel,
|
|
21
24
|
testID: testID,
|
|
22
25
|
children: /*#__PURE__*/_jsx(Search, {
|
|
23
26
|
size: size,
|
|
24
|
-
color: color
|
|
27
|
+
color: color ?? (chip ? night.color.textSecondary : gameUIColors.secondary)
|
|
25
28
|
})
|
|
26
29
|
});
|
|
27
30
|
}
|
|
@@ -29,5 +32,15 @@ const styles = StyleSheet.create({
|
|
|
29
32
|
button: {
|
|
30
33
|
padding: 8,
|
|
31
34
|
borderRadius: 4
|
|
35
|
+
},
|
|
36
|
+
chip: {
|
|
37
|
+
width: 32,
|
|
38
|
+
height: 32,
|
|
39
|
+
borderRadius: 8,
|
|
40
|
+
backgroundColor: night.color.buttonSurface,
|
|
41
|
+
borderWidth: 1,
|
|
42
|
+
borderColor: night.color.border,
|
|
43
|
+
alignItems: "center",
|
|
44
|
+
justifyContent: "center"
|
|
32
45
|
}
|
|
33
46
|
});
|