@react-three/drei 10.7.6 → 10.8.0-alpha.1
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 +49 -758
- package/_chunks/hls.mjs +3 -0
- package/_chunks/libs/@mediapipe/tasks-vision.mjs +4781 -0
- package/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/_chunks/libs/camera-controls.mjs +2207 -0
- package/_chunks/libs/detect-gpu.mjs +515 -0
- package/_chunks/libs/hls.js.mjs +21925 -0
- package/_chunks/libs/maath.mjs +5200 -0
- package/_chunks/libs/stats-gl.mjs +301 -0
- package/_chunks/libs/stats.js.mjs +90 -0
- package/_chunks/libs/suspend-react.mjs +60 -0
- package/_chunks/libs/three.mjs +23169 -0
- package/_chunks/libs/tunnel-rat.mjs +458 -0
- package/_chunks/libs/zustand.mjs +104 -0
- package/_chunks/rolldown-runtime.mjs +47 -0
- package/_chunks/vision_bundle.mjs +3 -0
- package/core/_chunks/hls.mjs +3 -0
- package/core/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/core/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/core/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/core/_chunks/libs/detect-gpu.mjs +515 -0
- package/core/_chunks/libs/hls.js.mjs +21925 -0
- package/core/_chunks/libs/maath.mjs +5200 -0
- package/core/_chunks/libs/stats-gl.mjs +301 -0
- package/core/_chunks/libs/stats.js.mjs +90 -0
- package/core/_chunks/libs/suspend-react.mjs +60 -0
- package/core/_chunks/libs/three.mjs +22457 -0
- package/core/_chunks/libs/tunnel-rat.mjs +458 -0
- package/core/_chunks/libs/zustand.mjs +104 -0
- package/core/_chunks/rolldown-runtime.mjs +47 -0
- package/core/core/index.d.mts +2232 -0
- package/core/core/index.mjs +11082 -0
- package/experimental/_chunks/libs/three.mjs +15386 -0
- package/experimental/experimental/index.d.mts +253 -0
- package/experimental/experimental/index.mjs +434 -0
- package/external/_chunks/hls.mjs +3 -0
- package/external/_chunks/libs/@mediapipe/tasks-vision.mjs +4781 -0
- package/external/_chunks/libs/camera-controls.mjs +2207 -0
- package/external/_chunks/libs/hls.js.mjs +21925 -0
- package/external/_chunks/libs/maath.mjs +5200 -0
- package/external/_chunks/libs/suspend-react.mjs +58 -0
- package/external/_chunks/libs/three.mjs +15387 -0
- package/external/_chunks/rolldown-runtime.mjs +32 -0
- package/external/_chunks/vision_bundle.mjs +3 -0
- package/external/external/index.d.mts +499 -0
- package/external/external/index.mjs +9422 -0
- package/index.d.mts +2567 -0
- package/index.mjs +20571 -0
- package/legacy/_chunks/hls.mjs +3 -0
- package/legacy/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/legacy/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/legacy/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/legacy/_chunks/libs/bidi-js.mjs +675 -0
- package/legacy/_chunks/libs/detect-gpu.mjs +515 -0
- package/legacy/_chunks/libs/hls.js.mjs +21925 -0
- package/legacy/_chunks/libs/maath.mjs +5200 -0
- package/legacy/_chunks/libs/stats-gl.mjs +301 -0
- package/legacy/_chunks/libs/stats.js.mjs +90 -0
- package/legacy/_chunks/libs/suspend-react.mjs +60 -0
- package/legacy/_chunks/libs/three.mjs +26062 -0
- package/legacy/_chunks/libs/troika-three-text.mjs +6494 -0
- package/legacy/_chunks/libs/tunnel-rat.mjs +458 -0
- package/legacy/_chunks/libs/zustand.mjs +104 -0
- package/legacy/_chunks/rolldown-runtime.mjs +47 -0
- package/legacy/legacy/index.d.mts +2788 -0
- package/legacy/legacy/index.mjs +14984 -0
- package/native/_chunks/hls.mjs +3 -0
- package/native/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/native/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/native/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/native/_chunks/libs/detect-gpu.mjs +515 -0
- package/native/_chunks/libs/hls.js.mjs +21925 -0
- package/native/_chunks/libs/maath.mjs +5200 -0
- package/native/_chunks/libs/stats-gl.mjs +301 -0
- package/native/_chunks/libs/stats.js.mjs +90 -0
- package/native/_chunks/libs/suspend-react.mjs +60 -0
- package/native/_chunks/libs/three.mjs +22592 -0
- package/native/_chunks/libs/tunnel-rat.mjs +458 -0
- package/native/_chunks/libs/zustand.mjs +104 -0
- package/native/_chunks/rolldown-runtime.mjs +47 -0
- package/native/native/index.d.mts +3168 -0
- package/native/native/index.mjs +14863 -0
- package/package.json +41 -10
- package/webgpu/_chunks/hls.mjs +3 -0
- package/webgpu/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/webgpu/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/webgpu/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/webgpu/_chunks/libs/detect-gpu.mjs +515 -0
- package/webgpu/_chunks/libs/hls.js.mjs +21925 -0
- package/webgpu/_chunks/libs/maath.mjs +5200 -0
- package/webgpu/_chunks/libs/stats-gl.mjs +301 -0
- package/webgpu/_chunks/libs/stats.js.mjs +90 -0
- package/webgpu/_chunks/libs/suspend-react.mjs +60 -0
- package/webgpu/_chunks/libs/three.mjs +22592 -0
- package/webgpu/_chunks/libs/tunnel-rat.mjs +458 -0
- package/webgpu/_chunks/libs/zustand.mjs +104 -0
- package/webgpu/_chunks/rolldown-runtime.mjs +47 -0
- package/webgpu/webgpu/index.d.mts +3166 -0
- package/webgpu/webgpu/index.mjs +15015 -0
- package/core/AccumulativeShadows.cjs.js +0 -1
- package/core/AccumulativeShadows.d.ts +0 -59
- package/core/AccumulativeShadows.js +0 -310
- package/core/AdaptiveDpr.cjs.js +0 -1
- package/core/AdaptiveDpr.d.ts +0 -3
- package/core/AdaptiveDpr.js +0 -28
- package/core/AdaptiveEvents.cjs.js +0 -1
- package/core/AdaptiveEvents.d.ts +0 -1
- package/core/AdaptiveEvents.js +0 -20
- package/core/ArcballControls.cjs.js +0 -1
- package/core/ArcballControls.d.ts +0 -15
- package/core/ArcballControls.js +0 -67
- package/core/AsciiRenderer.cjs.js +0 -1
- package/core/AsciiRenderer.d.ts +0 -11
- package/core/AsciiRenderer.js +0 -66
- package/core/BBAnchor.cjs.js +0 -1
- package/core/BBAnchor.d.ts +0 -7
- package/core/BBAnchor.js +0 -37
- package/core/Backdrop.cjs.js +0 -1
- package/core/Backdrop.d.ts +0 -15
- package/core/Backdrop.js +0 -33
- package/core/BakeShadows.cjs.js +0 -1
- package/core/BakeShadows.d.ts +0 -1
- package/core/BakeShadows.js +0 -16
- package/core/Billboard.cjs.js +0 -1
- package/core/Billboard.d.ts +0 -10
- package/core/Billboard.js +0 -53
- package/core/Bounds.cjs.js +0 -1
- package/core/Bounds.d.ts +0 -36
- package/core/Bounds.js +0 -254
- package/core/Bvh.cjs.js +0 -1
- package/core/Bvh.d.ts +0 -19
- package/core/Bvh.js +0 -92
- package/core/CameraControls.cjs.js +0 -1
- package/core/CameraControls.d.ts +0 -48
- package/core/CameraControls.js +0 -151
- package/core/CameraShake.cjs.js +0 -1
- package/core/CameraShake.d.ts +0 -17
- package/core/CameraShake.js +0 -57
- package/core/CatmullRomLine.cjs.js +0 -1
- package/core/CatmullRomLine.d.ts +0 -10
- package/core/CatmullRomLine.js +0 -42
- package/core/Caustics.cjs.js +0 -1
- package/core/Caustics.d.ts +0 -32
- package/core/Caustics.js +0 -388
- package/core/Center.cjs.js +0 -1
- package/core/Center.d.ts +0 -33
- package/core/Center.js +0 -67
- package/core/Clone.cjs.js +0 -1
- package/core/Clone.d.ts +0 -15
- package/core/Clone.js +0 -100
- package/core/Cloud.cjs.js +0 -1
- package/core/Cloud.d.ts +0 -97
- package/core/Cloud.js +0 -231
- package/core/ComputedAttribute.cjs.js +0 -1
- package/core/ComputedAttribute.d.ts +0 -8
- package/core/ComputedAttribute.js +0 -33
- package/core/ContactShadows.cjs.js +0 -1
- package/core/ContactShadows.d.ts +0 -18
- package/core/ContactShadows.js +0 -114
- package/core/CubeCamera.cjs.js +0 -1
- package/core/CubeCamera.d.ts +0 -21
- package/core/CubeCamera.js +0 -86
- package/core/CubeTexture.cjs.js +0 -1
- package/core/CubeTexture.d.ts +0 -14
- package/core/CubeTexture.js +0 -25
- package/core/CubicBezierLine.cjs.js +0 -1
- package/core/CubicBezierLine.d.ts +0 -12
- package/core/CubicBezierLine.js +0 -28
- package/core/CurveModifier.cjs.js +0 -1
- package/core/CurveModifier.d.ts +0 -11
- package/core/CurveModifier.js +0 -27
- package/core/Decal.cjs.js +0 -1
- package/core/Decal.d.ts +0 -16
- package/core/Decal.js +0 -128
- package/core/Detailed.cjs.js +0 -1
- package/core/Detailed.d.ts +0 -10
- package/core/Detailed.js +0 -33
- package/core/DetectGPU.cjs.js +0 -1
- package/core/DetectGPU.d.ts +0 -7
- package/core/DetectGPU.js +0 -14
- package/core/DeviceOrientationControls.cjs.js +0 -1
- package/core/DeviceOrientationControls.d.ts +0 -10
- package/core/DeviceOrientationControls.js +0 -51
- package/core/Edges.cjs.js +0 -1
- package/core/Edges.d.ts +0 -13
- package/core/Edges.js +0 -38
- package/core/Effects.cjs.js +0 -1
- package/core/Effects.d.ts +0 -25
- package/core/Effects.js +0 -91
- package/core/Environment.cjs.js +0 -1
- package/core/Environment.d.ts +0 -37
- package/core/Environment.js +0 -189
- package/core/Example.cjs.js +0 -1
- package/core/Example.d.ts +0 -13
- package/core/Example.js +0 -46
- package/core/Fbo.cjs.js +0 -1
- package/core/Fbo.d.ts +0 -22
- package/core/Fbo.js +0 -63
- package/core/Fbx.cjs.js +0 -1
- package/core/Fbx.d.ts +0 -11
- package/core/Fbx.js +0 -23
- package/core/FirstPersonControls.cjs.js +0 -1
- package/core/FirstPersonControls.d.ts +0 -8
- package/core/FirstPersonControls.js +0 -38
- package/core/Fisheye.cjs.js +0 -1
- package/core/Fisheye.d.ts +0 -10
- package/core/Fisheye.js +0 -95
- package/core/Float.cjs.js +0 -1
- package/core/Float.d.ts +0 -14
- package/core/Float.js +0 -37
- package/core/FlyControls.cjs.js +0 -1
- package/core/FlyControls.d.ts +0 -10
- package/core/FlyControls.js +0 -55
- package/core/GizmoHelper.cjs.js +0 -1
- package/core/GizmoHelper.d.ts +0 -16
- package/core/GizmoHelper.js +0 -116
- package/core/GizmoViewcube.cjs.js +0 -1
- package/core/GizmoViewcube.d.ts +0 -14
- package/core/GizmoViewcube.js +0 -133
- package/core/GizmoViewport.cjs.js +0 -1
- package/core/GizmoViewport.d.ts +0 -16
- package/core/GizmoViewport.js +0 -140
- package/core/Gltf.cjs.js +0 -1
- package/core/Gltf.d.ts +0 -27
- package/core/Gltf.js +0 -52
- package/core/GradientTexture.cjs.js +0 -1
- package/core/GradientTexture.d.ts +0 -18
- package/core/GradientTexture.js +0 -54
- package/core/Grid.cjs.js +0 -1
- package/core/Grid.d.ts +0 -26
- package/core/Grid.js +0 -142
- package/core/Helper.cjs.js +0 -1
- package/core/Helper.d.ts +0 -16
- package/core/Helper.js +0 -47
- package/core/Hud.cjs.js +0 -1
- package/core/Hud.d.ts +0 -6
- package/core/Hud.js +0 -55
- package/core/Image.cjs.js +0 -1
- package/core/Image.d.ts +0 -38
- package/core/Image.js +0 -160
- package/core/Instances.cjs.js +0 -1
- package/core/Instances.d.ts +0 -64
- package/core/Instances.js +0 -313
- package/core/Ktx2.cjs.js +0 -1
- package/core/Ktx2.d.ts +0 -14
- package/core/Ktx2.js +0 -48
- package/core/Lightformer.cjs.js +0 -1
- package/core/Lightformer.d.ts +0 -15
- package/core/Lightformer.js +0 -63
- package/core/Line.cjs.js +0 -1
- package/core/Line.d.ts +0 -13
- package/core/Line.js +0 -73
- package/core/MapControls.cjs.js +0 -1
- package/core/MapControls.d.ts +0 -14
- package/core/MapControls.js +0 -63
- package/core/MarchingCubes.cjs.js +0 -1
- package/core/MarchingCubes.d.ts +0 -24
- package/core/MarchingCubes.js +0 -78
- package/core/Mask.cjs.js +0 -1
- package/core/Mask.d.ts +0 -17
- package/core/Mask.js +0 -42
- package/core/MatcapTexture.cjs.js +0 -1
- package/core/MatcapTexture.d.ts +0 -9
- package/core/MatcapTexture.js +0 -51
- package/core/MeshDiscardMaterial.cjs.js +0 -1
- package/core/MeshDiscardMaterial.d.ts +0 -10
- package/core/MeshDiscardMaterial.js +0 -15
- package/core/MeshDistortMaterial.cjs.js +0 -1
- package/core/MeshDistortMaterial.d.ts +0 -39
- package/core/MeshDistortMaterial.js +0 -72
- package/core/MeshPortalMaterial.cjs.js +0 -1
- package/core/MeshPortalMaterial.d.ts +0 -25
- package/core/MeshPortalMaterial.js +0 -467
- package/core/MeshReflectorMaterial.cjs.js +0 -1
- package/core/MeshReflectorMaterial.d.ts +0 -14
- package/core/MeshReflectorMaterial.js +0 -180
- package/core/MeshRefractionMaterial.cjs.js +0 -1
- package/core/MeshRefractionMaterial.d.ts +0 -19
- package/core/MeshRefractionMaterial.js +0 -73
- package/core/MeshTransmissionMaterial.cjs.js +0 -1
- package/core/MeshTransmissionMaterial.d.ts +0 -34
- package/core/MeshTransmissionMaterial.js +0 -402
- package/core/MeshWobbleMaterial.cjs.js +0 -1
- package/core/MeshWobbleMaterial.d.ts +0 -36
- package/core/MeshWobbleMaterial.js +0 -60
- package/core/MotionPathControls.cjs.js +0 -1
- package/core/MotionPathControls.d.ts +0 -33
- package/core/MotionPathControls.js +0 -121
- package/core/MultiMaterial.cjs.js +0 -1
- package/core/MultiMaterial.d.ts +0 -4
- package/core/MultiMaterial.js +0 -29
- package/core/NormalTexture.cjs.js +0 -1
- package/core/NormalTexture.d.ts +0 -14
- package/core/NormalTexture.js +0 -42
- package/core/OrbitControls.cjs.js +0 -1
- package/core/OrbitControls.d.ts +0 -22
- package/core/OrbitControls.js +0 -79
- package/core/OrthographicCamera.cjs.js +0 -1
- package/core/OrthographicCamera.d.ts +0 -14
- package/core/OrthographicCamera.js +0 -76
- package/core/Outlines.cjs.js +0 -1
- package/core/Outlines.d.ts +0 -17
- package/core/Outlines.js +0 -166
- package/core/PerformanceMonitor.cjs.js +0 -1
- package/core/PerformanceMonitor.d.ts +0 -36
- package/core/PerformanceMonitor.js +0 -116
- package/core/PerspectiveCamera.cjs.js +0 -1
- package/core/PerspectiveCamera.d.ts +0 -14
- package/core/PerspectiveCamera.js +0 -72
- package/core/PointMaterial.cjs.js +0 -1
- package/core/PointMaterial.d.ts +0 -8
- package/core/PointMaterial.js +0 -36
- package/core/PointerLockControls.cjs.js +0 -1
- package/core/PointerLockControls.d.ts +0 -15
- package/core/PointerLockControls.js +0 -89
- package/core/Points.cjs.js +0 -1
- package/core/Points.d.ts +0 -31
- package/core/Points.js +0 -202
- package/core/PositionalAudio.cjs.js +0 -1
- package/core/PositionalAudio.d.ts +0 -9
- package/core/PositionalAudio.js +0 -46
- package/core/Preload.cjs.js +0 -1
- package/core/Preload.d.ts +0 -7
- package/core/Preload.js +0 -44
- package/core/Progress.cjs.js +0 -1
- package/core/Progress.d.ts +0 -14
- package/core/Progress.js +0 -55
- package/core/QuadraticBezierLine.cjs.js +0 -1
- package/core/QuadraticBezierLine.d.ts +0 -14
- package/core/QuadraticBezierLine.js +0 -42
- package/core/RenderCubeTexture.cjs.js +0 -1
- package/core/RenderCubeTexture.d.ts +0 -30
- package/core/RenderCubeTexture.js +0 -96
- package/core/RenderTexture.cjs.js +0 -1
- package/core/RenderTexture.d.ts +0 -18
- package/core/RenderTexture.js +0 -105
- package/core/Resize.cjs.js +0 -1
- package/core/Resize.d.ts +0 -17
- package/core/Resize.js +0 -39
- package/core/RoundedBox.cjs.js +0 -1
- package/core/RoundedBox.d.ts +0 -14
- package/core/RoundedBox.js +0 -70
- package/core/Sampler.cjs.js +0 -1
- package/core/Sampler.d.ts +0 -28
- package/core/Sampler.js +0 -75
- package/core/ScreenQuad.cjs.js +0 -1
- package/core/ScreenQuad.d.ts +0 -5
- package/core/ScreenQuad.js +0 -25
- package/core/ScreenSizer.cjs.js +0 -1
- package/core/ScreenSizer.d.ts +0 -7
- package/core/ScreenSizer.js +0 -39
- package/core/ScreenSpace.cjs.js +0 -1
- package/core/ScreenSpace.d.ts +0 -7
- package/core/ScreenSpace.js +0 -25
- package/core/Segments.cjs.js +0 -1
- package/core/Segments.d.ts +0 -29
- package/core/Segments.js +0 -96
- package/core/Shadow.cjs.js +0 -1
- package/core/Shadow.d.ts +0 -12
- package/core/Shadow.js +0 -42
- package/core/ShadowAlpha.cjs.js +0 -1
- package/core/ShadowAlpha.d.ts +0 -7
- package/core/ShadowAlpha.js +0 -108
- package/core/Sky.cjs.js +0 -1
- package/core/Sky.d.ts +0 -16
- package/core/Sky.js +0 -39
- package/core/Sparkles.cjs.js +0 -1
- package/core/Sparkles.d.ts +0 -26
- package/core/Sparkles.js +0 -161
- package/core/Splat.cjs.js +0 -1
- package/core/Splat.d.ts +0 -56
- package/core/Splat.js +0 -506
- package/core/SpotLight.cjs.js +0 -1
- package/core/SpotLight.d.ts +0 -27
- package/core/SpotLight.js +0 -223
- package/core/SpriteAnimator.cjs.js +0 -1
- package/core/SpriteAnimator.d.ts +0 -88
- package/core/SpriteAnimator.js +0 -413
- package/core/Stage.cjs.js +0 -1
- package/core/Stage.d.ts +0 -27
- package/core/Stage.js +0 -133
- package/core/Stars.cjs.js +0 -1
- package/core/Stars.d.ts +0 -22
- package/core/Stars.js +0 -100
- package/core/Stats.cjs.js +0 -1
- package/core/Stats.d.ts +0 -7
- package/core/Stats.js +0 -32
- package/core/StatsGl.cjs.js +0 -1
- package/core/StatsGl.d.ts +0 -14
- package/core/StatsGl.js +0 -44
- package/core/Svg.cjs.js +0 -1
- package/core/Svg.d.ts +0 -13
- package/core/Svg.js +0 -62
- package/core/Text.cjs.js +0 -1
- package/core/Text.d.ts +0 -38
- package/core/Text.js +0 -57
- package/core/Text3D.cjs.js +0 -1
- package/core/Text3D.d.ts +0 -20
- package/core/Text3D.js +0 -74
- package/core/Texture.cjs.js +0 -1
- package/core/Texture.d.ts +0 -20
- package/core/Texture.js +0 -60
- package/core/TrackballControls.cjs.js +0 -1
- package/core/TrackballControls.d.ts +0 -15
- package/core/TrackballControls.js +0 -72
- package/core/Trail.cjs.js +0 -1
- package/core/Trail.d.ts +0 -21
- package/core/Trail.js +0 -150
- package/core/TrailTexture.cjs.js +0 -1
- package/core/TrailTexture.d.ts +0 -19
- package/core/TrailTexture.js +0 -159
- package/core/TransformControls.cjs.js +0 -1
- package/core/TransformControls.d.ts +0 -28
- package/core/TransformControls.js +0 -114
- package/core/VideoTexture.cjs.js +0 -1
- package/core/VideoTexture.d.ts +0 -26
- package/core/VideoTexture.js +0 -111
- package/core/Wireframe.cjs.js +0 -1
- package/core/Wireframe.d.ts +0 -15
- package/core/Wireframe.js +0 -157
- package/core/calculateScaleFactor.cjs.js +0 -1
- package/core/calculateScaleFactor.d.ts +0 -3
- package/core/calculateScaleFactor.js +0 -31
- package/core/index.cjs.js +0 -1
- package/core/index.d.ts +0 -122
- package/core/index.js +0 -150
- package/core/meshBounds.cjs.js +0 -1
- package/core/meshBounds.d.ts +0 -2
- package/core/meshBounds.js +0 -28
- package/core/shaderMaterial.cjs.js +0 -1
- package/core/shaderMaterial.d.ts +0 -9
- package/core/shaderMaterial.js +0 -29
- package/core/shapes.cjs.js +0 -1
- package/core/shapes.d.ts +0 -26
- package/core/shapes.js +0 -65
- package/core/softShadows.cjs.js +0 -1
- package/core/softShadows.d.ts +0 -6
- package/core/softShadows.js +0 -158
- package/core/useAnimations.cjs.js +0 -1
- package/core/useAnimations.d.ts +0 -13
- package/core/useAnimations.js +0 -52
- package/core/useAspect.cjs.js +0 -1
- package/core/useAspect.d.ts +0 -1
- package/core/useAspect.js +0 -10
- package/core/useBoxProjectedEnv.cjs.js +0 -1
- package/core/useBoxProjectedEnv.d.ts +0 -19
- package/core/useBoxProjectedEnv.js +0 -95
- package/core/useCamera.cjs.js +0 -1
- package/core/useCamera.d.ts +0 -3
- package/core/useCamera.js +0 -19
- package/core/useContextBridge.cjs.js +0 -1
- package/core/useContextBridge.d.ts +0 -4
- package/core/useContextBridge.js +0 -20
- package/core/useDepthBuffer.cjs.js +0 -1
- package/core/useDepthBuffer.d.ts +0 -6
- package/core/useDepthBuffer.js +0 -38
- package/core/useEnvironment.cjs.js +0 -1
- package/core/useEnvironment.d.ts +0 -17
- package/core/useEnvironment.js +0 -150
- package/core/useFont.cjs.js +0 -1
- package/core/useFont.d.ts +0 -24
- package/core/useFont.js +0 -24
- package/core/useIntersect.cjs.js +0 -1
- package/core/useIntersect.d.ts +0 -3
- package/core/useIntersect.js +0 -36
- package/core/useSpriteLoader.cjs.js +0 -1
- package/core/useSpriteLoader.d.ts +0 -57
- package/core/useSpriteLoader.js +0 -402
- package/helpers/constants.cjs.js +0 -1
- package/helpers/constants.d.ts +0 -1
- package/helpers/constants.js +0 -6
- package/helpers/deprecated.cjs.js +0 -1
- package/helpers/deprecated.d.ts +0 -5
- package/helpers/deprecated.js +0 -8
- package/helpers/environment-assets.cjs.js +0 -1
- package/helpers/environment-assets.d.ts +0 -13
- package/helpers/environment-assets.js +0 -14
- package/helpers/glsl/DefaultSpotlightShadowShadows.glsl.js +0 -3
- package/helpers/glsl/distort.vert.glsl.js +0 -3
- package/helpers/ts-utils.cjs.js +0 -1
- package/helpers/ts-utils.d.ts +0 -7
- package/helpers/ts-utils.js +0 -1
- package/helpers/useEffectfulState.cjs.js +0 -1
- package/helpers/useEffectfulState.d.ts +0 -4
- package/helpers/useEffectfulState.js +0 -17
- package/index.cjs.js +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -139
- package/materials/BlurPass.cjs.js +0 -1
- package/materials/BlurPass.d.ts +0 -23
- package/materials/BlurPass.js +0 -72
- package/materials/ConvolutionMaterial.cjs.js +0 -1
- package/materials/ConvolutionMaterial.d.ts +0 -7
- package/materials/ConvolutionMaterial.js +0 -97
- package/materials/DiscardMaterial.cjs.js +0 -1
- package/materials/DiscardMaterial.d.ts +0 -3
- package/materials/DiscardMaterial.js +0 -5
- package/materials/MeshReflectorMaterial.cjs.js +0 -1
- package/materials/MeshReflectorMaterial.d.ts +0 -50
- package/materials/MeshReflectorMaterial.js +0 -256
- package/materials/MeshRefractionMaterial.cjs.js +0 -1
- package/materials/MeshRefractionMaterial.d.ts +0 -18
- package/materials/MeshRefractionMaterial.js +0 -163
- package/materials/SpotLightMaterial.cjs.js +0 -1
- package/materials/SpotLightMaterial.d.ts +0 -4
- package/materials/SpotLightMaterial.js +0 -115
- package/materials/WireframeMaterial.cjs.js +0 -1
- package/materials/WireframeMaterial.d.ts +0 -64
- package/materials/WireframeMaterial.js +0 -217
- package/native/index.cjs.js +0 -1
- package/native/index.d.ts +0 -1
- package/native/index.js +0 -150
- package/web/CycleRaycast.cjs.js +0 -1
- package/web/CycleRaycast.d.ts +0 -10
- package/web/CycleRaycast.js +0 -93
- package/web/DragControls.cjs.js +0 -1
- package/web/DragControls.d.ts +0 -17
- package/web/DragControls.js +0 -127
- package/web/FaceControls.cjs.js +0 -1
- package/web/FaceControls.d.ts +0 -29
- package/web/FaceControls.js +0 -236
- package/web/FaceLandmarker.cjs.js +0 -1
- package/web/FaceLandmarker.d.ts +0 -14
- package/web/FaceLandmarker.js +0 -49
- package/web/Facemesh.cjs.js +0 -1
- package/web/Facemesh.d.ts +0 -118
- package/web/Facemesh.js +0 -4538
- package/web/Html.cjs.js +0 -1
- package/web/Html.d.ts +0 -34
- package/web/Html.js +0 -375
- package/web/KeyboardControls.cjs.js +0 -1
- package/web/KeyboardControls.d.ts +0 -37
- package/web/KeyboardControls.js +0 -104
- package/web/Loader.cjs.js +0 -1
- package/web/Loader.d.ts +0 -12
- package/web/Loader.js +0 -101
- package/web/PresentationControls.cjs.js +0 -1
- package/web/PresentationControls.d.ts +0 -16
- package/web/PresentationControls.js +0 -79
- package/web/ScreenVideoTexture.cjs.js +0 -1
- package/web/ScreenVideoTexture.d.ts +0 -17
- package/web/ScreenVideoTexture.js +0 -30
- package/web/ScrollControls.cjs.js +0 -1
- package/web/ScrollControls.d.ts +0 -45
- package/web/ScrollControls.js +0 -237
- package/web/Select.cjs.js +0 -1
- package/web/Select.d.ts +0 -14
- package/web/Select.js +0 -171
- package/web/View.cjs.js +0 -1
- package/web/View.d.ts +0 -34
- package/web/View.js +0 -259
- package/web/WebcamVideoTexture.cjs.js +0 -1
- package/web/WebcamVideoTexture.d.ts +0 -17
- package/web/WebcamVideoTexture.js +0 -33
- package/web/index.cjs.js +0 -1
- package/web/index.d.ts +0 -17
- package/web/index.js +0 -176
- package/web/pivotControls/AxisArrow.cjs.js +0 -1
- package/web/pivotControls/AxisArrow.d.ts +0 -7
- package/web/pivotControls/AxisArrow.js +0 -193
- package/web/pivotControls/AxisRotator.cjs.js +0 -1
- package/web/pivotControls/AxisRotator.d.ts +0 -7
- package/web/pivotControls/AxisRotator.js +0 -220
- package/web/pivotControls/PlaneSlider.cjs.js +0 -1
- package/web/pivotControls/PlaneSlider.d.ts +0 -7
- package/web/pivotControls/PlaneSlider.js +0 -202
- package/web/pivotControls/ScalingSphere.cjs.js +0 -1
- package/web/pivotControls/ScalingSphere.d.ts +0 -7
- package/web/pivotControls/ScalingSphere.js +0 -192
- package/web/pivotControls/context.cjs.js +0 -1
- package/web/pivotControls/context.d.ts +0 -33
- package/web/pivotControls/context.js +0 -5
- package/web/pivotControls/index.cjs.js +0 -1
- package/web/pivotControls/index.d.ts +0 -39
- package/web/pivotControls/index.js +0 -213
- package/web/useCursor.cjs.js +0 -1
- package/web/useCursor.d.ts +0 -1
- package/web/useCursor.js +0 -12
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __export, t as __commonJSMin } from "../rolldown-runtime.mjs";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region node_modules/tunnel-rat/node_modules/zustand/esm/vanilla.mjs
|
|
5
|
+
var createStoreImpl, createStore;
|
|
6
|
+
var init_vanilla = __esmMin((() => {
|
|
7
|
+
createStoreImpl = (createState) => {
|
|
8
|
+
let state;
|
|
9
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
10
|
+
const setState = (partial, replace) => {
|
|
11
|
+
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
12
|
+
if (!Object.is(nextState, state)) {
|
|
13
|
+
const previousState = state;
|
|
14
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
15
|
+
listeners.forEach((listener) => listener(state, previousState));
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const getState = () => state;
|
|
19
|
+
const subscribe = (listener) => {
|
|
20
|
+
listeners.add(listener);
|
|
21
|
+
return () => listeners.delete(listener);
|
|
22
|
+
};
|
|
23
|
+
const destroy = () => {
|
|
24
|
+
if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production") console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.");
|
|
25
|
+
listeners.clear();
|
|
26
|
+
};
|
|
27
|
+
const api = {
|
|
28
|
+
setState,
|
|
29
|
+
getState,
|
|
30
|
+
subscribe,
|
|
31
|
+
destroy
|
|
32
|
+
};
|
|
33
|
+
state = createState(setState, getState, api);
|
|
34
|
+
return api;
|
|
35
|
+
};
|
|
36
|
+
createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
37
|
+
}));
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region node_modules/tunnel-rat/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js
|
|
41
|
+
/**
|
|
42
|
+
* @license React
|
|
43
|
+
* use-sync-external-store-shim.production.min.js
|
|
44
|
+
*
|
|
45
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the MIT license found in the
|
|
48
|
+
* LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/
|
|
50
|
+
var require_use_sync_external_store_shim_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
51
|
+
var e = __require("react");
|
|
52
|
+
function h(a, b) {
|
|
53
|
+
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
54
|
+
}
|
|
55
|
+
var k = "function" === typeof Object.is ? Object.is : h, l = e.useState, m = e.useEffect, n = e.useLayoutEffect, p = e.useDebugValue;
|
|
56
|
+
function q(a, b) {
|
|
57
|
+
var d = b(), f = l({ inst: {
|
|
58
|
+
value: d,
|
|
59
|
+
getSnapshot: b
|
|
60
|
+
} }), c = f[0].inst, g = f[1];
|
|
61
|
+
n(function() {
|
|
62
|
+
c.value = d;
|
|
63
|
+
c.getSnapshot = b;
|
|
64
|
+
r(c) && g({ inst: c });
|
|
65
|
+
}, [
|
|
66
|
+
a,
|
|
67
|
+
d,
|
|
68
|
+
b
|
|
69
|
+
]);
|
|
70
|
+
m(function() {
|
|
71
|
+
r(c) && g({ inst: c });
|
|
72
|
+
return a(function() {
|
|
73
|
+
r(c) && g({ inst: c });
|
|
74
|
+
});
|
|
75
|
+
}, [a]);
|
|
76
|
+
p(d);
|
|
77
|
+
return d;
|
|
78
|
+
}
|
|
79
|
+
function r(a) {
|
|
80
|
+
var b = a.getSnapshot;
|
|
81
|
+
a = a.value;
|
|
82
|
+
try {
|
|
83
|
+
var d = b();
|
|
84
|
+
return !k(a, d);
|
|
85
|
+
} catch (f) {
|
|
86
|
+
return !0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function t(a, b) {
|
|
90
|
+
return b();
|
|
91
|
+
}
|
|
92
|
+
var u = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? t : q;
|
|
93
|
+
exports.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExternalStore : u;
|
|
94
|
+
}));
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region node_modules/tunnel-rat/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
98
|
+
/**
|
|
99
|
+
* @license React
|
|
100
|
+
* use-sync-external-store-shim.development.js
|
|
101
|
+
*
|
|
102
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the MIT license found in the
|
|
105
|
+
* LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/
|
|
107
|
+
var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
108
|
+
if (process.env.NODE_ENV !== "production") (function() {
|
|
109
|
+
"use strict";
|
|
110
|
+
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(/* @__PURE__ */ new Error());
|
|
111
|
+
var React$2 = __require("react");
|
|
112
|
+
var ReactSharedInternals = React$2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
113
|
+
function error(format) {
|
|
114
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
|
|
115
|
+
printWarning("error", format, args);
|
|
116
|
+
}
|
|
117
|
+
function printWarning(level, format, args) {
|
|
118
|
+
var stack = ReactSharedInternals.ReactDebugCurrentFrame.getStackAddendum();
|
|
119
|
+
if (stack !== "") {
|
|
120
|
+
format += "%s";
|
|
121
|
+
args = args.concat([stack]);
|
|
122
|
+
}
|
|
123
|
+
var argsWithFormat = args.map(function(item) {
|
|
124
|
+
return String(item);
|
|
125
|
+
});
|
|
126
|
+
argsWithFormat.unshift("Warning: " + format);
|
|
127
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
131
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
132
|
+
*/
|
|
133
|
+
function is(x, y) {
|
|
134
|
+
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
135
|
+
}
|
|
136
|
+
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
137
|
+
var useState$1 = React$2.useState, useEffect$1 = React$2.useEffect, useLayoutEffect$1 = React$2.useLayoutEffect, useDebugValue$1 = React$2.useDebugValue;
|
|
138
|
+
var didWarnOld18Alpha = false;
|
|
139
|
+
var didWarnUncachedGetSnapshot = false;
|
|
140
|
+
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
141
|
+
if (!didWarnOld18Alpha) {
|
|
142
|
+
if (React$2.startTransition !== void 0) {
|
|
143
|
+
didWarnOld18Alpha = true;
|
|
144
|
+
error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.");
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
var value = getSnapshot();
|
|
148
|
+
if (!didWarnUncachedGetSnapshot) {
|
|
149
|
+
if (!objectIs(value, getSnapshot())) {
|
|
150
|
+
error("The result of getSnapshot should be cached to avoid an infinite loop");
|
|
151
|
+
didWarnUncachedGetSnapshot = true;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
var _useState = useState$1({ inst: {
|
|
155
|
+
value,
|
|
156
|
+
getSnapshot
|
|
157
|
+
} }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
158
|
+
useLayoutEffect$1(function() {
|
|
159
|
+
inst.value = value;
|
|
160
|
+
inst.getSnapshot = getSnapshot;
|
|
161
|
+
if (checkIfSnapshotChanged(inst)) forceUpdate({ inst });
|
|
162
|
+
}, [
|
|
163
|
+
subscribe,
|
|
164
|
+
value,
|
|
165
|
+
getSnapshot
|
|
166
|
+
]);
|
|
167
|
+
useEffect$1(function() {
|
|
168
|
+
if (checkIfSnapshotChanged(inst)) forceUpdate({ inst });
|
|
169
|
+
var handleStoreChange = function() {
|
|
170
|
+
if (checkIfSnapshotChanged(inst)) forceUpdate({ inst });
|
|
171
|
+
};
|
|
172
|
+
return subscribe(handleStoreChange);
|
|
173
|
+
}, [subscribe]);
|
|
174
|
+
useDebugValue$1(value);
|
|
175
|
+
return value;
|
|
176
|
+
}
|
|
177
|
+
function checkIfSnapshotChanged(inst) {
|
|
178
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
179
|
+
var prevValue = inst.value;
|
|
180
|
+
try {
|
|
181
|
+
return !objectIs(prevValue, latestGetSnapshot());
|
|
182
|
+
} catch (error$1) {
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {
|
|
187
|
+
return getSnapshot();
|
|
188
|
+
}
|
|
189
|
+
var shim = !!!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined") ? useSyncExternalStore$1 : useSyncExternalStore;
|
|
190
|
+
var useSyncExternalStore$2 = React$2.useSyncExternalStore !== void 0 ? React$2.useSyncExternalStore : shim;
|
|
191
|
+
exports.useSyncExternalStore = useSyncExternalStore$2;
|
|
192
|
+
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(/* @__PURE__ */ new Error());
|
|
193
|
+
})();
|
|
194
|
+
}));
|
|
195
|
+
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region node_modules/tunnel-rat/node_modules/use-sync-external-store/shim/index.js
|
|
198
|
+
var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
199
|
+
if (process.env.NODE_ENV === "production") module.exports = require_use_sync_external_store_shim_production_min();
|
|
200
|
+
else module.exports = require_use_sync_external_store_shim_development();
|
|
201
|
+
}));
|
|
202
|
+
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region node_modules/tunnel-rat/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js
|
|
205
|
+
/**
|
|
206
|
+
* @license React
|
|
207
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
208
|
+
*
|
|
209
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the MIT license found in the
|
|
212
|
+
* LICENSE file in the root directory of this source tree.
|
|
213
|
+
*/
|
|
214
|
+
var require_with_selector_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
215
|
+
var h = __require("react"), n = require_shim();
|
|
216
|
+
function p(a, b) {
|
|
217
|
+
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
218
|
+
}
|
|
219
|
+
var q = "function" === typeof Object.is ? Object.is : p, r = n.useSyncExternalStore, t = h.useRef, u = h.useEffect, v = h.useMemo, w = h.useDebugValue;
|
|
220
|
+
exports.useSyncExternalStoreWithSelector = function(a, b, e$1, l, g) {
|
|
221
|
+
var c = t(null);
|
|
222
|
+
if (null === c.current) {
|
|
223
|
+
var f = {
|
|
224
|
+
hasValue: !1,
|
|
225
|
+
value: null
|
|
226
|
+
};
|
|
227
|
+
c.current = f;
|
|
228
|
+
} else f = c.current;
|
|
229
|
+
c = v(function() {
|
|
230
|
+
function a$1(a$2) {
|
|
231
|
+
if (!c$1) {
|
|
232
|
+
c$1 = !0;
|
|
233
|
+
d$1 = a$2;
|
|
234
|
+
a$2 = l(a$2);
|
|
235
|
+
if (void 0 !== g && f.hasValue) {
|
|
236
|
+
var b$1 = f.value;
|
|
237
|
+
if (g(b$1, a$2)) return k = b$1;
|
|
238
|
+
}
|
|
239
|
+
return k = a$2;
|
|
240
|
+
}
|
|
241
|
+
b$1 = k;
|
|
242
|
+
if (q(d$1, a$2)) return b$1;
|
|
243
|
+
var e$2 = l(a$2);
|
|
244
|
+
if (void 0 !== g && g(b$1, e$2)) return b$1;
|
|
245
|
+
d$1 = a$2;
|
|
246
|
+
return k = e$2;
|
|
247
|
+
}
|
|
248
|
+
var c$1 = !1, d$1, k, m = void 0 === e$1 ? null : e$1;
|
|
249
|
+
return [function() {
|
|
250
|
+
return a$1(b());
|
|
251
|
+
}, null === m ? void 0 : function() {
|
|
252
|
+
return a$1(m());
|
|
253
|
+
}];
|
|
254
|
+
}, [
|
|
255
|
+
b,
|
|
256
|
+
e$1,
|
|
257
|
+
l,
|
|
258
|
+
g
|
|
259
|
+
]);
|
|
260
|
+
var d = r(a, c[0], c[1]);
|
|
261
|
+
u(function() {
|
|
262
|
+
f.hasValue = !0;
|
|
263
|
+
f.value = d;
|
|
264
|
+
}, [d]);
|
|
265
|
+
w(d);
|
|
266
|
+
return d;
|
|
267
|
+
};
|
|
268
|
+
}));
|
|
269
|
+
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region node_modules/tunnel-rat/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
|
|
272
|
+
/**
|
|
273
|
+
* @license React
|
|
274
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
275
|
+
*
|
|
276
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the MIT license found in the
|
|
279
|
+
* LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/
|
|
281
|
+
var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
282
|
+
if (process.env.NODE_ENV !== "production") (function() {
|
|
283
|
+
"use strict";
|
|
284
|
+
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(/* @__PURE__ */ new Error());
|
|
285
|
+
var React$2 = __require("react");
|
|
286
|
+
var shim = require_shim();
|
|
287
|
+
/**
|
|
288
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
289
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
290
|
+
*/
|
|
291
|
+
function is(x, y) {
|
|
292
|
+
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
293
|
+
}
|
|
294
|
+
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
295
|
+
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
296
|
+
var useRef$1 = React$2.useRef, useEffect$1 = React$2.useEffect, useMemo$1 = React$2.useMemo, useDebugValue$1 = React$2.useDebugValue;
|
|
297
|
+
function useSyncExternalStoreWithSelector$1(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
298
|
+
var instRef = useRef$1(null);
|
|
299
|
+
var inst;
|
|
300
|
+
if (instRef.current === null) {
|
|
301
|
+
inst = {
|
|
302
|
+
hasValue: false,
|
|
303
|
+
value: null
|
|
304
|
+
};
|
|
305
|
+
instRef.current = inst;
|
|
306
|
+
} else inst = instRef.current;
|
|
307
|
+
var _useMemo = useMemo$1(function() {
|
|
308
|
+
var hasMemo = false;
|
|
309
|
+
var memoizedSnapshot;
|
|
310
|
+
var memoizedSelection;
|
|
311
|
+
var memoizedSelector = function(nextSnapshot) {
|
|
312
|
+
if (!hasMemo) {
|
|
313
|
+
hasMemo = true;
|
|
314
|
+
memoizedSnapshot = nextSnapshot;
|
|
315
|
+
var _nextSelection = selector(nextSnapshot);
|
|
316
|
+
if (isEqual !== void 0) {
|
|
317
|
+
if (inst.hasValue) {
|
|
318
|
+
var currentSelection = inst.value;
|
|
319
|
+
if (isEqual(currentSelection, _nextSelection)) {
|
|
320
|
+
memoizedSelection = currentSelection;
|
|
321
|
+
return currentSelection;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
memoizedSelection = _nextSelection;
|
|
326
|
+
return _nextSelection;
|
|
327
|
+
}
|
|
328
|
+
var prevSnapshot = memoizedSnapshot;
|
|
329
|
+
var prevSelection = memoizedSelection;
|
|
330
|
+
if (objectIs(prevSnapshot, nextSnapshot)) return prevSelection;
|
|
331
|
+
var nextSelection = selector(nextSnapshot);
|
|
332
|
+
if (isEqual !== void 0 && isEqual(prevSelection, nextSelection)) return prevSelection;
|
|
333
|
+
memoizedSnapshot = nextSnapshot;
|
|
334
|
+
memoizedSelection = nextSelection;
|
|
335
|
+
return nextSelection;
|
|
336
|
+
};
|
|
337
|
+
var maybeGetServerSnapshot = getServerSnapshot === void 0 ? null : getServerSnapshot;
|
|
338
|
+
var getSnapshotWithSelector = function() {
|
|
339
|
+
return memoizedSelector(getSnapshot());
|
|
340
|
+
};
|
|
341
|
+
return [getSnapshotWithSelector, maybeGetServerSnapshot === null ? void 0 : function() {
|
|
342
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
343
|
+
}];
|
|
344
|
+
}, [
|
|
345
|
+
getSnapshot,
|
|
346
|
+
getServerSnapshot,
|
|
347
|
+
selector,
|
|
348
|
+
isEqual
|
|
349
|
+
]), getSelection = _useMemo[0], getServerSelection = _useMemo[1];
|
|
350
|
+
var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
351
|
+
useEffect$1(function() {
|
|
352
|
+
inst.hasValue = true;
|
|
353
|
+
inst.value = value;
|
|
354
|
+
}, [value]);
|
|
355
|
+
useDebugValue$1(value);
|
|
356
|
+
return value;
|
|
357
|
+
}
|
|
358
|
+
exports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector$1;
|
|
359
|
+
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(/* @__PURE__ */ new Error());
|
|
360
|
+
})();
|
|
361
|
+
}));
|
|
362
|
+
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region node_modules/tunnel-rat/node_modules/use-sync-external-store/shim/with-selector.js
|
|
365
|
+
var require_with_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
366
|
+
if (process.env.NODE_ENV === "production") module.exports = require_with_selector_production_min();
|
|
367
|
+
else module.exports = require_with_selector_development();
|
|
368
|
+
}));
|
|
369
|
+
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region node_modules/tunnel-rat/node_modules/zustand/esm/index.js
|
|
372
|
+
var esm_exports = /* @__PURE__ */ __export({
|
|
373
|
+
create: () => create,
|
|
374
|
+
createStore: () => createStore,
|
|
375
|
+
default: () => react,
|
|
376
|
+
useStore: () => useStore
|
|
377
|
+
});
|
|
378
|
+
function useStore(api, selector = api.getState, equalityFn) {
|
|
379
|
+
if (process.env.NODE_ENV !== "production" && equalityFn && !didWarnAboutEqualityFn) {
|
|
380
|
+
console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937");
|
|
381
|
+
didWarnAboutEqualityFn = true;
|
|
382
|
+
}
|
|
383
|
+
const slice = useSyncExternalStoreWithSelector(api.subscribe, api.getState, api.getServerState || api.getState, selector, equalityFn);
|
|
384
|
+
useDebugValue(slice);
|
|
385
|
+
return slice;
|
|
386
|
+
}
|
|
387
|
+
var import_with_selector, useDebugValue, useSyncExternalStoreWithSelector, didWarnAboutEqualityFn, createImpl, create, react;
|
|
388
|
+
var init_esm = __esmMin((() => {
|
|
389
|
+
init_vanilla();
|
|
390
|
+
init_vanilla();
|
|
391
|
+
import_with_selector = /* @__PURE__ */ __toESM(require_with_selector());
|
|
392
|
+
({useDebugValue} = React);
|
|
393
|
+
({useSyncExternalStoreWithSelector} = import_with_selector.default);
|
|
394
|
+
didWarnAboutEqualityFn = false;
|
|
395
|
+
createImpl = (createState) => {
|
|
396
|
+
if (process.env.NODE_ENV !== "production" && typeof createState !== "function") console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");
|
|
397
|
+
const api = typeof createState === "function" ? createStore(createState) : createState;
|
|
398
|
+
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
|
|
399
|
+
Object.assign(useBoundStore, api);
|
|
400
|
+
return useBoundStore;
|
|
401
|
+
};
|
|
402
|
+
create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
403
|
+
react = (createState) => {
|
|
404
|
+
if (process.env.NODE_ENV !== "production") console.warn("[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`.");
|
|
405
|
+
return create(createState);
|
|
406
|
+
};
|
|
407
|
+
}));
|
|
408
|
+
|
|
409
|
+
//#endregion
|
|
410
|
+
//#region node_modules/tunnel-rat/dist/index.cjs.js
|
|
411
|
+
var require_index_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
412
|
+
var React$1 = __require("react");
|
|
413
|
+
var zustand = (init_esm(), __toCommonJS(esm_exports));
|
|
414
|
+
function _interopDefaultLegacy(e$1) {
|
|
415
|
+
return e$1 && typeof e$1 === "object" && "default" in e$1 ? e$1 : { "default": e$1 };
|
|
416
|
+
}
|
|
417
|
+
var React__default = /* @__PURE__ */ _interopDefaultLegacy(React$1);
|
|
418
|
+
var _window$document, _window$navigator;
|
|
419
|
+
/**
|
|
420
|
+
* An SSR-friendly useLayoutEffect.
|
|
421
|
+
*
|
|
422
|
+
* React currently throws a warning when using useLayoutEffect on the server.
|
|
423
|
+
* To get around it, we can conditionally useEffect on the server (no-op) and
|
|
424
|
+
* useLayoutEffect elsewhere.
|
|
425
|
+
*
|
|
426
|
+
* @see https://github.com/facebook/react/issues/14927
|
|
427
|
+
*/
|
|
428
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" && ((_window$document = window.document) != null && _window$document.createElement || ((_window$navigator = window.navigator) == null ? void 0 : _window$navigator.product) === "ReactNative") ? React__default["default"].useLayoutEffect : React__default["default"].useEffect;
|
|
429
|
+
function tunnel() {
|
|
430
|
+
const useStore$1 = zustand.create((set) => ({
|
|
431
|
+
current: new Array(),
|
|
432
|
+
version: 0,
|
|
433
|
+
set
|
|
434
|
+
}));
|
|
435
|
+
return {
|
|
436
|
+
In: ({ children }) => {
|
|
437
|
+
const set = useStore$1((state) => state.set);
|
|
438
|
+
const version = useStore$1((state) => state.version);
|
|
439
|
+
useIsomorphicLayoutEffect(() => {
|
|
440
|
+
set((state) => ({ version: state.version + 1 }));
|
|
441
|
+
}, []);
|
|
442
|
+
useIsomorphicLayoutEffect(() => {
|
|
443
|
+
set(({ current }) => ({ current: [...current, children] }));
|
|
444
|
+
return () => set(({ current }) => ({ current: current.filter((c) => c !== children) }));
|
|
445
|
+
}, [children, version]);
|
|
446
|
+
return null;
|
|
447
|
+
},
|
|
448
|
+
Out: () => {
|
|
449
|
+
const current = useStore$1((state) => state.current);
|
|
450
|
+
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, current);
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
module.exports = tunnel;
|
|
455
|
+
}));
|
|
456
|
+
|
|
457
|
+
//#endregion
|
|
458
|
+
export { require_index_cjs as t };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region node_modules/zustand/esm/vanilla.mjs
|
|
4
|
+
const createStoreImpl = (createState) => {
|
|
5
|
+
let state;
|
|
6
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
7
|
+
const setState = (partial, replace) => {
|
|
8
|
+
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
9
|
+
if (!Object.is(nextState, state)) {
|
|
10
|
+
const previousState = state;
|
|
11
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
12
|
+
listeners.forEach((listener) => listener(state, previousState));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const getState = () => state;
|
|
16
|
+
const getInitialState = () => initialState;
|
|
17
|
+
const subscribe = (listener) => {
|
|
18
|
+
listeners.add(listener);
|
|
19
|
+
return () => listeners.delete(listener);
|
|
20
|
+
};
|
|
21
|
+
const api = {
|
|
22
|
+
setState,
|
|
23
|
+
getState,
|
|
24
|
+
getInitialState,
|
|
25
|
+
subscribe
|
|
26
|
+
};
|
|
27
|
+
const initialState = state = createState(setState, getState, api);
|
|
28
|
+
return api;
|
|
29
|
+
};
|
|
30
|
+
const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region node_modules/zustand/esm/react.mjs
|
|
34
|
+
const identity = (arg) => arg;
|
|
35
|
+
function useStore(api, selector = identity) {
|
|
36
|
+
const slice = React.useSyncExternalStore(api.subscribe, () => selector(api.getState()), () => selector(api.getInitialState()));
|
|
37
|
+
React.useDebugValue(slice);
|
|
38
|
+
return slice;
|
|
39
|
+
}
|
|
40
|
+
const createImpl = (createState) => {
|
|
41
|
+
const api = createStore(createState);
|
|
42
|
+
const useBoundStore = (selector) => useStore(api, selector);
|
|
43
|
+
Object.assign(useBoundStore, api);
|
|
44
|
+
return useBoundStore;
|
|
45
|
+
};
|
|
46
|
+
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region node_modules/zustand/esm/middleware.mjs
|
|
50
|
+
const subscribeWithSelectorImpl = (fn) => (set, get, api) => {
|
|
51
|
+
const origSubscribe = api.subscribe;
|
|
52
|
+
api.subscribe = (selector, optListener, options) => {
|
|
53
|
+
let listener = selector;
|
|
54
|
+
if (optListener) {
|
|
55
|
+
const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;
|
|
56
|
+
let currentSlice = selector(api.getState());
|
|
57
|
+
listener = (state) => {
|
|
58
|
+
const nextSlice = selector(state);
|
|
59
|
+
if (!equalityFn(currentSlice, nextSlice)) {
|
|
60
|
+
const previousSlice = currentSlice;
|
|
61
|
+
optListener(currentSlice = nextSlice, previousSlice);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
if (options == null ? void 0 : options.fireImmediately) optListener(currentSlice, currentSlice);
|
|
65
|
+
}
|
|
66
|
+
return origSubscribe(listener);
|
|
67
|
+
};
|
|
68
|
+
return fn(set, get, api);
|
|
69
|
+
};
|
|
70
|
+
const subscribeWithSelector = subscribeWithSelectorImpl;
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region node_modules/zustand/esm/vanilla/shallow.mjs
|
|
74
|
+
const isIterable = (obj) => Symbol.iterator in obj;
|
|
75
|
+
const hasIterableEntries = (value) => "entries" in value;
|
|
76
|
+
const compareEntries = (valueA, valueB) => {
|
|
77
|
+
const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());
|
|
78
|
+
const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());
|
|
79
|
+
if (mapA.size !== mapB.size) return false;
|
|
80
|
+
for (const [key, value] of mapA) if (!Object.is(value, mapB.get(key))) return false;
|
|
81
|
+
return true;
|
|
82
|
+
};
|
|
83
|
+
const compareIterables = (valueA, valueB) => {
|
|
84
|
+
const iteratorA = valueA[Symbol.iterator]();
|
|
85
|
+
const iteratorB = valueB[Symbol.iterator]();
|
|
86
|
+
let nextA = iteratorA.next();
|
|
87
|
+
let nextB = iteratorB.next();
|
|
88
|
+
while (!nextA.done && !nextB.done) {
|
|
89
|
+
if (!Object.is(nextA.value, nextB.value)) return false;
|
|
90
|
+
nextA = iteratorA.next();
|
|
91
|
+
nextB = iteratorB.next();
|
|
92
|
+
}
|
|
93
|
+
return !!nextA.done && !!nextB.done;
|
|
94
|
+
};
|
|
95
|
+
function shallow(valueA, valueB) {
|
|
96
|
+
if (Object.is(valueA, valueB)) return true;
|
|
97
|
+
if (typeof valueA !== "object" || valueA === null || typeof valueB !== "object" || valueB === null) return false;
|
|
98
|
+
if (!isIterable(valueA) || !isIterable(valueB)) return compareEntries({ entries: () => Object.entries(valueA) }, { entries: () => Object.entries(valueB) });
|
|
99
|
+
if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) return compareEntries(valueA, valueB);
|
|
100
|
+
return compareIterables(valueA, valueB);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
export { subscribeWithSelector as n, create as r, shallow as t };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
11
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
12
|
+
var __export = (all, symbols) => {
|
|
13
|
+
let target = {};
|
|
14
|
+
for (var name in all) {
|
|
15
|
+
__defProp(target, name, {
|
|
16
|
+
get: all[name],
|
|
17
|
+
enumerable: true
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
if (symbols) {
|
|
21
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
22
|
+
}
|
|
23
|
+
return target;
|
|
24
|
+
};
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
28
|
+
key = keys[i];
|
|
29
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
30
|
+
__defProp(to, key, {
|
|
31
|
+
get: ((k) => from[k]).bind(null, key),
|
|
32
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return to;
|
|
38
|
+
};
|
|
39
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
40
|
+
value: mod,
|
|
41
|
+
enumerable: true
|
|
42
|
+
}) : target, mod));
|
|
43
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
44
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __export as r, __commonJSMin as t };
|