From bf2e7e7888b7ecb76c39d5d7891971bea15cdb33 Mon Sep 17 00:00:00 2001 From: Antoine BERNIER Date: Mon, 18 Nov 2024 00:56:00 +0100 Subject: [PATCH] build-storybook based on built package --- .storybook/main.ts | 13 +++++++++++++ .storybook/stories/AccumulativeShadows.stories.tsx | 2 +- .storybook/stories/Adaptive.stories.tsx | 2 +- .storybook/stories/ArcballControls.stories.tsx | 2 +- .storybook/stories/BBAnchor.stories.tsx | 2 +- .storybook/stories/Billboard.stories.tsx | 2 +- .storybook/stories/Bvh.stories.tsx | 2 +- .storybook/stories/CameraControls.stories.tsx | 2 +- .storybook/stories/CameraShake.stories.tsx | 2 +- .storybook/stories/Center.stories.tsx | 2 +- .storybook/stories/Cloud.stories.tsx | 2 +- .storybook/stories/ContactShadows.stories.tsx | 2 +- .storybook/stories/CubeCamera.stories.tsx | 2 +- .storybook/stories/CubeTexture.stories.tsx | 2 +- .storybook/stories/CurveModifier.stories.tsx | 2 +- .storybook/stories/Decal.stories.tsx | 2 +- .storybook/stories/Detailed.stories.tsx | 2 +- .storybook/stories/DetectGPU.stories.tsx | 2 +- .../stories/DeviceOrientationControls.stories.tsx | 2 +- .storybook/stories/DragControls.stories.tsx | 2 +- .storybook/stories/Environment.stories.tsx | 2 +- .storybook/stories/Example.stories.tsx | 2 +- .storybook/stories/Extrude.stories.tsx | 2 +- .storybook/stories/FaceControls.stories.tsx | 2 +- .storybook/stories/Facemesh.stories.tsx | 2 +- .storybook/stories/Fbo.stories.tsx | 2 +- .storybook/stories/Fbx.stories.tsx | 2 +- .storybook/stories/FirstPersonControls.stories.tsx | 2 +- .storybook/stories/Float.stories.tsx | 2 +- .storybook/stories/FlyControls.stories.tsx | 2 +- .storybook/stories/GizmoHelper.stories.tsx | 2 +- .storybook/stories/Gltf.stories.tsx | 2 +- .storybook/stories/Grid.stories.tsx | 2 +- .storybook/stories/HTML.stories.tsx | 2 +- .storybook/stories/Helper.stories.tsx | 2 +- .storybook/stories/Image.stories.tsx | 2 +- .storybook/stories/Instances.stories.tsx | 2 +- .storybook/stories/KeyboardControls.stories.tsx | 2 +- .storybook/stories/Ktx2.stories.tsx | 2 +- .storybook/stories/Lathe.stories.tsx | 2 +- .storybook/stories/Line.stories.tsx | 2 +- .storybook/stories/Loader.stories.tsx | 2 +- .storybook/stories/MapControls.stories.tsx | 2 +- .storybook/stories/MarchingCubes.stories.tsx | 2 +- .storybook/stories/MatcapTexture.stories.tsx | 2 +- .storybook/stories/MeshDistortMaterial.stories.tsx | 2 +- .../stories/MeshRefractionMaterial.stories.tsx | 2 +- .../stories/MeshTransmissionMaterial.stories.tsx | 2 +- .storybook/stories/MeshWobbleMaterial.stories.tsx | 2 +- .storybook/stories/NormalTexture.stories.tsx | 2 +- .storybook/stories/OrbitControls.stories.tsx | 2 +- .storybook/stories/OrthographicCamera.stories.tsx | 2 +- .storybook/stories/Outlines.stories.tsx | 2 +- .storybook/stories/PerspectiveCamera.stories.tsx | 2 +- .storybook/stories/PivotControls.stories.tsx | 2 +- .storybook/stories/PointerLockControls.stories.tsx | 2 +- .storybook/stories/Points.stories.tsx | 2 +- .storybook/stories/PositionalAudio.stories.tsx | 2 +- .storybook/stories/PresentationControls.stories.tsx | 2 +- .storybook/stories/Progress.stories.tsx | 2 +- .storybook/stories/Reflector.stories.tsx | 2 +- .storybook/stories/Resize.stories.tsx | 2 +- .storybook/stories/RoundedBox.stories.tsx | 2 +- .storybook/stories/Sampler.stories.tsx | 2 +- .storybook/stories/ScreenQuad.stories.tsx | 2 +- .storybook/stories/ScreenSizer.stories.tsx | 2 +- .storybook/stories/ScreenSpace.stories.tsx | 2 +- .storybook/stories/ScrollControls.stories.tsx | 2 +- .storybook/stories/Segments.stories.tsx | 2 +- .storybook/stories/Shadow.stories.tsx | 2 +- .storybook/stories/ShadowAlpha.stories.tsx | 2 +- .storybook/stories/Sky.stories.tsx | 2 +- .storybook/stories/Sparkles.stories.tsx | 2 +- .storybook/stories/Spotlight.stories.tsx | 2 +- .storybook/stories/SpriteAnimator.stories.tsx | 2 +- .storybook/stories/Stage.stories.tsx | 2 +- .storybook/stories/Stars.stories.tsx | 2 +- .storybook/stories/Stats.stories.tsx | 2 +- .storybook/stories/StatsGl.stories.tsx | 2 +- .storybook/stories/Svg.stories.tsx | 2 +- .storybook/stories/Text.stories.tsx | 2 +- .storybook/stories/Text3D.stories.tsx | 2 +- .storybook/stories/Texture.stories.tsx | 2 +- .storybook/stories/TrackballControls.stories.tsx | 2 +- .storybook/stories/Trail.stories.tsx | 2 +- .storybook/stories/TrailTexture.stories.tsx | 2 +- .storybook/stories/TransformControls.stories.tsx | 2 +- .storybook/stories/Tube.stories.tsx | 2 +- .storybook/stories/VideoTexture.stories.tsx | 2 +- .storybook/stories/Wireframe.stories.tsx | 2 +- .storybook/stories/meshBounds.stories.tsx | 2 +- .storybook/stories/shaderMaterial.stories.tsx | 2 +- .storybook/stories/useAnimations.stories.tsx | 2 +- .storybook/stories/useAspect.stories.tsx | 2 +- .storybook/stories/useCamera.stories.tsx | 2 +- .storybook/stories/useContextBridge.stories.tsx | 2 +- package.json | 2 +- 97 files changed, 109 insertions(+), 96 deletions(-) diff --git a/.storybook/main.ts b/.storybook/main.ts index a4a92fdfe..37b16365e 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,5 +1,6 @@ import type { StorybookConfig } from '@storybook/react-vite' import { svg } from './favicon' +import path from 'path' const config: StorybookConfig = { staticDirs: ['./public'], @@ -32,6 +33,18 @@ const config: StorybookConfig = { }, }, }, + + viteFinal: async (config) => { + config.resolve ??= {} + config.resolve.alias = { + ...(config.resolve.alias || {}), + '@react-three/drei': + process.env.STORYBOOK_ENV === 'production' + ? path.resolve(__dirname, '../dist') + : path.resolve(__dirname, '../src'), + } + return config + }, } export default config diff --git a/.storybook/stories/AccumulativeShadows.stories.tsx b/.storybook/stories/AccumulativeShadows.stories.tsx index eb71abacc..a2d11fe7c 100644 --- a/.storybook/stories/AccumulativeShadows.stories.tsx +++ b/.storybook/stories/AccumulativeShadows.stories.tsx @@ -6,7 +6,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { useGLTF, AccumulativeShadows, RandomizedLight, OrbitControls, Environment } from '../../src' +import { useGLTF, AccumulativeShadows, RandomizedLight, OrbitControls, Environment } from '@react-three/drei' export default { title: 'Staging/AccumulativeShadows', diff --git a/.storybook/stories/Adaptive.stories.tsx b/.storybook/stories/Adaptive.stories.tsx index 3b12db54f..2614b070a 100644 --- a/.storybook/stories/Adaptive.stories.tsx +++ b/.storybook/stories/Adaptive.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { useGLTF, AdaptiveDpr, AdaptiveEvents, OrbitControls } from '../../src' +import { useGLTF, AdaptiveDpr, AdaptiveEvents, OrbitControls } from '@react-three/drei' import type { GLTF } from 'three-stdlib' diff --git a/.storybook/stories/ArcballControls.stories.tsx b/.storybook/stories/ArcballControls.stories.tsx index 10b61c250..e58fe4afc 100644 --- a/.storybook/stories/ArcballControls.stories.tsx +++ b/.storybook/stories/ArcballControls.stories.tsx @@ -3,7 +3,7 @@ import React, { ComponentProps, useRef, useState } from 'react' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { ArcballControls, Box, PerspectiveCamera, Plane, useFBO } from '../../src' +import { ArcballControls, Box, PerspectiveCamera, Plane, useFBO } from '@react-three/drei' import { Scene, type OrthographicCamera, type PerspectiveCamera as PerspectiveCameraType } from 'three' diff --git a/.storybook/stories/BBAnchor.stories.tsx b/.storybook/stories/BBAnchor.stories.tsx index c2ceb5e01..f16500bb4 100644 --- a/.storybook/stories/BBAnchor.stories.tsx +++ b/.storybook/stories/BBAnchor.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Icosahedron, Sphere, Html, BBAnchor, OrbitControls, useHelper } from '../../src' +import { Icosahedron, Sphere, Html, BBAnchor, OrbitControls, useHelper } from '@react-three/drei' import { BoxHelper } from 'three' export default { diff --git a/.storybook/stories/Billboard.stories.tsx b/.storybook/stories/Billboard.stories.tsx index 42ad46d88..799a7a05e 100644 --- a/.storybook/stories/Billboard.stories.tsx +++ b/.storybook/stories/Billboard.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Billboard, Plane, Box, Cone, OrbitControls, Text } from '../../src' +import { Billboard, Plane, Box, Cone, OrbitControls, Text } from '@react-three/drei' import { ComponentProps } from 'react' export default { diff --git a/.storybook/stories/Bvh.stories.tsx b/.storybook/stories/Bvh.stories.tsx index 57d793278..1c6e9cdfd 100644 --- a/.storybook/stories/Bvh.stories.tsx +++ b/.storybook/stories/Bvh.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' import { MeshBVHHelper } from 'three-mesh-bvh' -import { useHelper, Bvh, TorusKnot, OrbitControls } from '../../src' +import { useHelper, Bvh, TorusKnot, OrbitControls } from '@react-three/drei' import { useFrame, useThree } from '@react-three/fiber' import { Group, Mesh, Raycaster, Vector3 } from 'three' diff --git a/.storybook/stories/CameraControls.stories.tsx b/.storybook/stories/CameraControls.stories.tsx index c093e8c78..5666d5060 100644 --- a/.storybook/stories/CameraControls.stories.tsx +++ b/.storybook/stories/CameraControls.stories.tsx @@ -4,7 +4,7 @@ import { Scene } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, CameraControls, PerspectiveCamera, Plane, useFBO } from '../../src' +import { Box, CameraControls, PerspectiveCamera, Plane, useFBO } from '@react-three/drei' export default { title: 'Controls/CameraControls', diff --git a/.storybook/stories/CameraShake.stories.tsx b/.storybook/stories/CameraShake.stories.tsx index 92c3bd93b..fd9656c7e 100644 --- a/.storybook/stories/CameraShake.stories.tsx +++ b/.storybook/stories/CameraShake.stories.tsx @@ -6,7 +6,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { CameraShake, OrbitControls } from '../../src' +import { CameraShake, OrbitControls } from '@react-three/drei' import { ComponentProps } from 'react' export default { diff --git a/.storybook/stories/Center.stories.tsx b/.storybook/stories/Center.stories.tsx index 103af80e2..007a8eeee 100644 --- a/.storybook/stories/Center.stories.tsx +++ b/.storybook/stories/Center.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' import { useTurntable } from '../useTurntable' -import { Box, Center, useGLTF } from '../../src' +import { Box, Center, useGLTF } from '@react-three/drei' import { ComponentProps } from 'react' export default { diff --git a/.storybook/stories/Cloud.stories.tsx b/.storybook/stories/Cloud.stories.tsx index 27d041e0c..7cd0db140 100644 --- a/.storybook/stories/Cloud.stories.tsx +++ b/.storybook/stories/Cloud.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Cloud, OrbitControls } from '../../src' +import { Cloud, OrbitControls } from '@react-three/drei' import { ComponentProps } from 'react' export default { diff --git a/.storybook/stories/ContactShadows.stories.tsx b/.storybook/stories/ContactShadows.stories.tsx index 6598f137e..0a2ae69e6 100644 --- a/.storybook/stories/ContactShadows.stories.tsx +++ b/.storybook/stories/ContactShadows.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { ContactShadows, Sphere, Plane } from '../../src' +import { ContactShadows, Sphere, Plane } from '@react-three/drei' import { ComponentProps } from 'react' export default { diff --git a/.storybook/stories/CubeCamera.stories.tsx b/.storybook/stories/CubeCamera.stories.tsx index 55537eaa8..6f127d533 100644 --- a/.storybook/stories/CubeCamera.stories.tsx +++ b/.storybook/stories/CubeCamera.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, CubeCamera } from '../../src' +import { Box, CubeCamera } from '@react-three/drei' import { ComponentProps } from 'react' export default { diff --git a/.storybook/stories/CubeTexture.stories.tsx b/.storybook/stories/CubeTexture.stories.tsx index 492b4d1b8..5dde21c12 100644 --- a/.storybook/stories/CubeTexture.stories.tsx +++ b/.storybook/stories/CubeTexture.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { CubeTexture, Icosahedron } from '../../src' +import { CubeTexture, Icosahedron } from '@react-three/drei' export default { title: 'Abstractions/CubeTexture', diff --git a/.storybook/stories/CurveModifier.stories.tsx b/.storybook/stories/CurveModifier.stories.tsx index 78bc8ec4b..05c5fed69 100644 --- a/.storybook/stories/CurveModifier.stories.tsx +++ b/.storybook/stories/CurveModifier.stories.tsx @@ -5,7 +5,7 @@ import { extend, useFrame, useLoader } from '@react-three/fiber' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { CurveModifier, CurveModifierRef } from '../../src' +import { CurveModifier, CurveModifierRef } from '@react-three/drei' extend({ StdText: TextGeometry }) diff --git a/.storybook/stories/Decal.stories.tsx b/.storybook/stories/Decal.stories.tsx index e794c21c6..003e0632c 100644 --- a/.storybook/stories/Decal.stories.tsx +++ b/.storybook/stories/Decal.stories.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Sampler, Decal, useTexture, useSurfaceSampler, PerspectiveCamera, OrbitControls } from '../../src' +import { Sampler, Decal, useTexture, useSurfaceSampler, PerspectiveCamera, OrbitControls } from '@react-three/drei' import { Euler, InstancedBufferAttribute, Matrix4, Quaternion, Vector3 } from 'three' import { ComponentProps } from 'react' diff --git a/.storybook/stories/Detailed.stories.tsx b/.storybook/stories/Detailed.stories.tsx index 312904b01..ce940068d 100644 --- a/.storybook/stories/Detailed.stories.tsx +++ b/.storybook/stories/Detailed.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Detailed, Icosahedron, OrbitControls } from '../../src' +import { Detailed, Icosahedron, OrbitControls } from '@react-three/drei' import { ComponentProps } from 'react' export default { diff --git a/.storybook/stories/DetectGPU.stories.tsx b/.storybook/stories/DetectGPU.stories.tsx index 5c02a4bd7..28dd68205 100644 --- a/.storybook/stories/DetectGPU.stories.tsx +++ b/.storybook/stories/DetectGPU.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { DetectGPU, Text } from '../../src' +import { DetectGPU, Text } from '@react-three/drei' export default { title: 'Misc/DetectGPU', diff --git a/.storybook/stories/DeviceOrientationControls.stories.tsx b/.storybook/stories/DeviceOrientationControls.stories.tsx index f4b85d4ec..60c9b246d 100644 --- a/.storybook/stories/DeviceOrientationControls.stories.tsx +++ b/.storybook/stories/DeviceOrientationControls.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { DeviceOrientationControls, Box } from '../../src' +import { DeviceOrientationControls, Box } from '@react-three/drei' export default { title: 'Controls/DeviceOrientationControls', diff --git a/.storybook/stories/DragControls.stories.tsx b/.storybook/stories/DragControls.stories.tsx index c696489cf..529c4b194 100644 --- a/.storybook/stories/DragControls.stories.tsx +++ b/.storybook/stories/DragControls.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react' import * as THREE from 'three' -import { Box } from '../../src' +import { Box } from '@react-three/drei' import { Setup } from '../Setup' import { DragControls } from '../../src/web/DragControls' import { Meta, StoryObj } from '@storybook/react' diff --git a/.storybook/stories/Environment.stories.tsx b/.storybook/stories/Environment.stories.tsx index e65389eba..cfb7fbb0a 100644 --- a/.storybook/stories/Environment.stories.tsx +++ b/.storybook/stories/Environment.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Environment, ContactShadows, PerspectiveCamera, OrbitControls } from '../../src' +import { Environment, ContactShadows, PerspectiveCamera, OrbitControls } from '@react-three/drei' import { presetsObj } from '../../src/helpers/environment-assets' import { ComponentProps } from 'react' diff --git a/.storybook/stories/Example.stories.tsx b/.storybook/stories/Example.stories.tsx index f2708e542..7f4913e08 100644 --- a/.storybook/stories/Example.stories.tsx +++ b/.storybook/stories/Example.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Example, ExampleApi } from '../../src' +import { Example, ExampleApi } from '@react-three/drei' export default { title: 'Misc/Example', diff --git a/.storybook/stories/Extrude.stories.tsx b/.storybook/stories/Extrude.stories.tsx index a13488d5a..a53c736f4 100644 --- a/.storybook/stories/Extrude.stories.tsx +++ b/.storybook/stories/Extrude.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' import { useTurntable } from '../useTurntable' -import { Extrude } from '../../src' +import { Extrude } from '@react-three/drei' export default { title: 'Shapes/Extrude', diff --git a/.storybook/stories/FaceControls.stories.tsx b/.storybook/stories/FaceControls.stories.tsx index 0037aa5f1..5ae93e0f1 100644 --- a/.storybook/stories/FaceControls.stories.tsx +++ b/.storybook/stories/FaceControls.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { FaceLandmarker, FaceControls, Box } from '../../src' +import { FaceLandmarker, FaceControls, Box } from '@react-three/drei' import { ComponentProps } from 'react' export default { diff --git a/.storybook/stories/Facemesh.stories.tsx b/.storybook/stories/Facemesh.stories.tsx index 9c011b0b1..492855d11 100644 --- a/.storybook/stories/Facemesh.stories.tsx +++ b/.storybook/stories/Facemesh.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Facemesh, FacemeshDatas } from '../../src' +import { Facemesh, FacemeshDatas } from '@react-three/drei' export default { title: 'Shapes/Facemesh', diff --git a/.storybook/stories/Fbo.stories.tsx b/.storybook/stories/Fbo.stories.tsx index d49cb8ee2..906a3d452 100644 --- a/.storybook/stories/Fbo.stories.tsx +++ b/.storybook/stories/Fbo.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Fbo, TorusKnot, Box, PerspectiveCamera } from '../../src' +import { Fbo, TorusKnot, Box, PerspectiveCamera } from '@react-three/drei' export default { title: 'Misc/Fbo', diff --git a/.storybook/stories/Fbx.stories.tsx b/.storybook/stories/Fbx.stories.tsx index e11d3cf35..23492044a 100644 --- a/.storybook/stories/Fbx.stories.tsx +++ b/.storybook/stories/Fbx.stories.tsx @@ -3,7 +3,7 @@ import { Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Fbx, useCubeTexture } from '../../src' +import { Fbx, useCubeTexture } from '@react-three/drei' export default { title: 'Loaders/Fbx', diff --git a/.storybook/stories/FirstPersonControls.stories.tsx b/.storybook/stories/FirstPersonControls.stories.tsx index 1f90788ba..081bd2da6 100644 --- a/.storybook/stories/FirstPersonControls.stories.tsx +++ b/.storybook/stories/FirstPersonControls.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, FirstPersonControls } from '../../src' +import { Box, FirstPersonControls } from '@react-three/drei' export default { title: 'Controls/FirstPersonControls', diff --git a/.storybook/stories/Float.stories.tsx b/.storybook/stories/Float.stories.tsx index 0e5c54f77..a2af6826d 100644 --- a/.storybook/stories/Float.stories.tsx +++ b/.storybook/stories/Float.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Float } from '../../src' +import { Float } from '@react-three/drei' export default { title: 'Staging/Float', diff --git a/.storybook/stories/FlyControls.stories.tsx b/.storybook/stories/FlyControls.stories.tsx index a8f4000fe..8241555a5 100644 --- a/.storybook/stories/FlyControls.stories.tsx +++ b/.storybook/stories/FlyControls.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, FlyControls } from '../../src' +import { Box, FlyControls } from '@react-three/drei' export default { title: 'Controls/FlyControls', diff --git a/.storybook/stories/GizmoHelper.stories.tsx b/.storybook/stories/GizmoHelper.stories.tsx index d23665fed..e187e8c5f 100644 --- a/.storybook/stories/GizmoHelper.stories.tsx +++ b/.storybook/stories/GizmoHelper.stories.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' -import { GizmoHelper, OrbitControls, useGLTF, GizmoViewcube, GizmoViewport } from '../../src' +import { GizmoHelper, OrbitControls, useGLTF, GizmoViewcube, GizmoViewport } from '@react-three/drei' import { Setup } from '../Setup' import { ComponentProps } from 'react' diff --git a/.storybook/stories/Gltf.stories.tsx b/.storybook/stories/Gltf.stories.tsx index c3d938fb0..2fa0664f7 100644 --- a/.storybook/stories/Gltf.stories.tsx +++ b/.storybook/stories/Gltf.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Gltf } from '../../src' +import { Gltf } from '@react-three/drei' export default { title: 'Loaders/Gltf', diff --git a/.storybook/stories/Grid.stories.tsx b/.storybook/stories/Grid.stories.tsx index 240e6ff3e..c74dde49f 100644 --- a/.storybook/stories/Grid.stories.tsx +++ b/.storybook/stories/Grid.stories.tsx @@ -3,7 +3,7 @@ import { Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Grid, Box } from '../../src' +import { Grid, Box } from '@react-three/drei' export default { title: 'Gizmos/Grid', diff --git a/.storybook/stories/HTML.stories.tsx b/.storybook/stories/HTML.stories.tsx index 348f016d2..27d82225c 100644 --- a/.storybook/stories/HTML.stories.tsx +++ b/.storybook/stories/HTML.stories.tsx @@ -4,7 +4,7 @@ import * as THREE from 'three' import { Setup } from '../Setup' import { useTurntable } from '../useTurntable' -import { Icosahedron, Html, OrthographicCamera } from '../../src' +import { Icosahedron, Html, OrthographicCamera } from '@react-three/drei' import { HtmlProps, CalculatePosition } from '../../src/web/Html' import { useFrame, useThree } from '@react-three/fiber' import { Meta, StoryObj } from '@storybook/react' diff --git a/.storybook/stories/Helper.stories.tsx b/.storybook/stories/Helper.stories.tsx index c8f9428e0..f4361eb6b 100644 --- a/.storybook/stories/Helper.stories.tsx +++ b/.storybook/stories/Helper.stories.tsx @@ -5,7 +5,7 @@ import { BoxHelper, CameraHelper } from 'three' import { VertexNormalsHelper } from 'three-stdlib' import { Meta, StoryObj } from '@storybook/react' -import { Helper, PerspectiveCamera, Sphere } from '../../src' +import { Helper, PerspectiveCamera, Sphere } from '@react-three/drei' import { Setup } from '../Setup' import { ComponentProps } from 'react' diff --git a/.storybook/stories/Image.stories.tsx b/.storybook/stories/Image.stories.tsx index 4704e3cc7..a6053bc53 100644 --- a/.storybook/stories/Image.stories.tsx +++ b/.storybook/stories/Image.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Image, useTexture } from '../../src' +import { Image, useTexture } from '@react-three/drei' export default { title: 'Abstractions/Image', diff --git a/.storybook/stories/Instances.stories.tsx b/.storybook/stories/Instances.stories.tsx index 766f5c944..0f4a64a1f 100644 --- a/.storybook/stories/Instances.stories.tsx +++ b/.storybook/stories/Instances.stories.tsx @@ -3,7 +3,7 @@ import { Euler, MathUtils, Mesh, ShaderMaterial, Vector3 } from 'three' // import { StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { useGLTF, Instances, Instance, createInstances, InstancedAttribute } from '../../src' +import { useGLTF, Instances, Instance, createInstances, InstancedAttribute } from '@react-three/drei' import { useFrame } from '@react-three/fiber' import { clamp } from 'maath/misc' diff --git a/.storybook/stories/KeyboardControls.stories.tsx b/.storybook/stories/KeyboardControls.stories.tsx index 0399c4bb9..27cb0d7c4 100644 --- a/.storybook/stories/KeyboardControls.stories.tsx +++ b/.storybook/stories/KeyboardControls.stories.tsx @@ -2,7 +2,7 @@ import { useFrame } from '@react-three/fiber' import * as React from 'react' import { useRef } from 'react' import { MathUtils, Mesh, Vector3 } from 'three' -import { Cone, KeyboardControls, useKeyboardControls } from '../../src' +import { Cone, KeyboardControls, useKeyboardControls } from '@react-three/drei' import { Setup } from '../Setup' import { Meta, StoryObj } from '@storybook/react' diff --git a/.storybook/stories/Ktx2.stories.tsx b/.storybook/stories/Ktx2.stories.tsx index 698eb4e20..0a48bc360 100644 --- a/.storybook/stories/Ktx2.stories.tsx +++ b/.storybook/stories/Ktx2.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, Ktx2 } from '../../src' +import { Box, Ktx2 } from '@react-three/drei' export default { title: 'Loaders/Ktx2', diff --git a/.storybook/stories/Lathe.stories.tsx b/.storybook/stories/Lathe.stories.tsx index 762cb5020..be8df1ce7 100644 --- a/.storybook/stories/Lathe.stories.tsx +++ b/.storybook/stories/Lathe.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' import { useTurntable } from '../useTurntable' -import { Lathe } from '../../src' +import { Lathe } from '@react-three/drei' export default { title: 'Shapes/Lathe', diff --git a/.storybook/stories/Line.stories.tsx b/.storybook/stories/Line.stories.tsx index ee328fafb..404f0f095 100644 --- a/.storybook/stories/Line.stories.tsx +++ b/.storybook/stories/Line.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Line, OrbitControls, QuadraticBezierLine, CubicBezierLine, CatmullRomLine } from '../../src' +import { Line, OrbitControls, QuadraticBezierLine, CubicBezierLine, CatmullRomLine } from '@react-three/drei' const points = GeometryUtils.hilbert3D(new Vector3(0), 5).map((p) => [p.x, p.y, p.z]) as [number, number, number][] diff --git a/.storybook/stories/Loader.stories.tsx b/.storybook/stories/Loader.stories.tsx index 379374f1f..3e9c33577 100644 --- a/.storybook/stories/Loader.stories.tsx +++ b/.storybook/stories/Loader.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Html, useGLTF, Loader } from '../../src' +import { Html, useGLTF, Loader } from '@react-three/drei' export default { title: 'Misc/Loader', diff --git a/.storybook/stories/MapControls.stories.tsx b/.storybook/stories/MapControls.stories.tsx index 88ff5153b..97a99870a 100644 --- a/.storybook/stories/MapControls.stories.tsx +++ b/.storybook/stories/MapControls.stories.tsx @@ -4,7 +4,7 @@ import { Box3, Sphere, Vector3 } from 'three' import { useLoader } from '@react-three/fiber' import { Meta, StoryObj } from '@storybook/react' -import { MapControls } from '../../src' +import { MapControls } from '@react-three/drei' import { Setup } from '../Setup' diff --git a/.storybook/stories/MarchingCubes.stories.tsx b/.storybook/stories/MarchingCubes.stories.tsx index be0d03add..59b9ac7a6 100644 --- a/.storybook/stories/MarchingCubes.stories.tsx +++ b/.storybook/stories/MarchingCubes.stories.tsx @@ -3,7 +3,7 @@ import { Color, Vector3 } from 'three' import { Setup } from '../Setup' -import { MarchingCube, MarchingCubes, MarchingPlane, OrbitControls } from '../../src' +import { MarchingCube, MarchingCubes, MarchingPlane, OrbitControls } from '@react-three/drei' import { useFrame } from '@react-three/fiber' import { Meta, StoryObj } from '@storybook/react' diff --git a/.storybook/stories/MatcapTexture.stories.tsx b/.storybook/stories/MatcapTexture.stories.tsx index 6f797d502..2c186d908 100644 --- a/.storybook/stories/MatcapTexture.stories.tsx +++ b/.storybook/stories/MatcapTexture.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { useGLTF, MatcapTexture } from '../../src' +import { useGLTF, MatcapTexture } from '@react-three/drei' export default { title: 'Staging/MatcapTexture', diff --git a/.storybook/stories/MeshDistortMaterial.stories.tsx b/.storybook/stories/MeshDistortMaterial.stories.tsx index ddd8db5cd..fae6a4647 100644 --- a/.storybook/stories/MeshDistortMaterial.stories.tsx +++ b/.storybook/stories/MeshDistortMaterial.stories.tsx @@ -3,7 +3,7 @@ import { useFrame } from '@react-three/fiber' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { MeshDistortMaterial, Icosahedron } from '../../src' +import { MeshDistortMaterial, Icosahedron } from '@react-three/drei' export default { title: 'Shaders/MeshDistortMaterial', diff --git a/.storybook/stories/MeshRefractionMaterial.stories.tsx b/.storybook/stories/MeshRefractionMaterial.stories.tsx index 5c5982c74..e19f7e0aa 100644 --- a/.storybook/stories/MeshRefractionMaterial.stories.tsx +++ b/.storybook/stories/MeshRefractionMaterial.stories.tsx @@ -15,7 +15,7 @@ import { RandomizedLight, AccumulativeShadows, MeshTransmissionMaterial, -} from '../../src' +} from '@react-three/drei' export default { title: 'Shaders/MeshRefractionMaterial', diff --git a/.storybook/stories/MeshTransmissionMaterial.stories.tsx b/.storybook/stories/MeshTransmissionMaterial.stories.tsx index df6968d2b..59c00b30a 100644 --- a/.storybook/stories/MeshTransmissionMaterial.stories.tsx +++ b/.storybook/stories/MeshTransmissionMaterial.stories.tsx @@ -11,7 +11,7 @@ import { Environment, OrbitControls, Center, -} from '../../src' +} from '@react-three/drei' export default { title: 'Shaders/MeshTransmissionMaterial', diff --git a/.storybook/stories/MeshWobbleMaterial.stories.tsx b/.storybook/stories/MeshWobbleMaterial.stories.tsx index af1de9481..dc3edfec5 100644 --- a/.storybook/stories/MeshWobbleMaterial.stories.tsx +++ b/.storybook/stories/MeshWobbleMaterial.stories.tsx @@ -3,7 +3,7 @@ import { useFrame } from '@react-three/fiber' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { MeshWobbleMaterial, Torus } from '../../src' +import { MeshWobbleMaterial, Torus } from '@react-three/drei' export default { title: 'Shaders/MeshWobbleMaterial', diff --git a/.storybook/stories/NormalTexture.stories.tsx b/.storybook/stories/NormalTexture.stories.tsx index 633a613da..49ec68203 100644 --- a/.storybook/stories/NormalTexture.stories.tsx +++ b/.storybook/stories/NormalTexture.stories.tsx @@ -3,7 +3,7 @@ import * as React from 'react' import { Mesh, Vector2, Vector3 } from 'three' import { Setup } from '../Setup' -import { useGLTF, NormalTexture } from '../../src' +import { useGLTF, NormalTexture } from '@react-three/drei' import { Meta, StoryObj } from '@storybook/react' export default { diff --git a/.storybook/stories/OrbitControls.stories.tsx b/.storybook/stories/OrbitControls.stories.tsx index 32158e07f..df7ccbcfb 100644 --- a/.storybook/stories/OrbitControls.stories.tsx +++ b/.storybook/stories/OrbitControls.stories.tsx @@ -4,7 +4,7 @@ import { Scene } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, OrbitControls, PerspectiveCamera, Plane, useFBO, type OrbitControlsProps } from '../../src' +import { Box, OrbitControls, PerspectiveCamera, Plane, useFBO, type OrbitControlsProps } from '@react-three/drei' export default { title: 'Controls/OrbitControls', diff --git a/.storybook/stories/OrthographicCamera.stories.tsx b/.storybook/stories/OrthographicCamera.stories.tsx index 86c5d59e3..e0256674c 100644 --- a/.storybook/stories/OrthographicCamera.stories.tsx +++ b/.storybook/stories/OrthographicCamera.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { Meta, StoryObj } from '@storybook/react' -import { Icosahedron, OrthographicCamera } from '../../src' +import { Icosahedron, OrthographicCamera } from '@react-three/drei' import { Setup } from '../Setup' export default { diff --git a/.storybook/stories/Outlines.stories.tsx b/.storybook/stories/Outlines.stories.tsx index 9d8ae9414..d72ee68bc 100644 --- a/.storybook/stories/Outlines.stories.tsx +++ b/.storybook/stories/Outlines.stories.tsx @@ -3,7 +3,7 @@ import * as THREE from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Outlines } from '../../src' +import { Outlines } from '@react-three/drei' export default { title: 'Abstractions/Outlines', diff --git a/.storybook/stories/PerspectiveCamera.stories.tsx b/.storybook/stories/PerspectiveCamera.stories.tsx index ae762cc25..4737d12b0 100644 --- a/.storybook/stories/PerspectiveCamera.stories.tsx +++ b/.storybook/stories/PerspectiveCamera.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { Meta, StoryObj } from '@storybook/react' -import { Icosahedron, PerspectiveCamera } from '../../src' +import { Icosahedron, PerspectiveCamera } from '@react-three/drei' import { Setup } from '../Setup' export default { diff --git a/.storybook/stories/PivotControls.stories.tsx b/.storybook/stories/PivotControls.stories.tsx index 25a950690..1aee3525e 100644 --- a/.storybook/stories/PivotControls.stories.tsx +++ b/.storybook/stories/PivotControls.stories.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { Vector3 } from 'three' import { Setup } from '../Setup' -import { PivotControls, Box } from '../../src' +import { PivotControls, Box } from '@react-three/drei' import { Meta, StoryObj } from '@storybook/react' export default { diff --git a/.storybook/stories/PointerLockControls.stories.tsx b/.storybook/stories/PointerLockControls.stories.tsx index 0fc586115..a68a065a3 100644 --- a/.storybook/stories/PointerLockControls.stories.tsx +++ b/.storybook/stories/PointerLockControls.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { PointerLockControls, Icosahedron } from '../../src' +import { PointerLockControls, Icosahedron } from '@react-three/drei' export default { title: 'Controls/PointerLockControls', diff --git a/.storybook/stories/Points.stories.tsx b/.storybook/stories/Points.stories.tsx index 872dd05f2..b1ed2ebf6 100644 --- a/.storybook/stories/Points.stories.tsx +++ b/.storybook/stories/Points.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Point, Points, PointMaterial, shaderMaterial } from '../../src' +import { Point, Points, PointMaterial, shaderMaterial } from '@react-three/drei' import { extend, useFrame, useThree } from '@react-three/fiber' import * as buffer from 'maath/buffer' diff --git a/.storybook/stories/PositionalAudio.stories.tsx b/.storybook/stories/PositionalAudio.stories.tsx index 91ffa086e..292dcf952 100644 --- a/.storybook/stories/PositionalAudio.stories.tsx +++ b/.storybook/stories/PositionalAudio.stories.tsx @@ -3,7 +3,7 @@ import { Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { PositionalAudio } from '../../src' +import { PositionalAudio } from '@react-three/drei' export default { title: 'Abstractions/PositionalAudio', diff --git a/.storybook/stories/PresentationControls.stories.tsx b/.storybook/stories/PresentationControls.stories.tsx index 991053c29..32d2eead1 100644 --- a/.storybook/stories/PresentationControls.stories.tsx +++ b/.storybook/stories/PresentationControls.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, PresentationControls } from '../../src' +import { Box, PresentationControls } from '@react-three/drei' export default { title: 'Controls/PresentationControls', diff --git a/.storybook/stories/Progress.stories.tsx b/.storybook/stories/Progress.stories.tsx index b6e2b2398..34a204c9f 100644 --- a/.storybook/stories/Progress.stories.tsx +++ b/.storybook/stories/Progress.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Html, useGLTF, Progress } from '../../src' +import { Html, useGLTF, Progress } from '@react-three/drei' export default { title: 'Misc/Progress', diff --git a/.storybook/stories/Reflector.stories.tsx b/.storybook/stories/Reflector.stories.tsx index 4788aef36..d63206d96 100644 --- a/.storybook/stories/Reflector.stories.tsx +++ b/.storybook/stories/Reflector.stories.tsx @@ -4,7 +4,7 @@ import { Vector3, RepeatWrapping, Vector2 } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { MeshReflectorMaterial, useTexture, TorusKnot, Box, Environment } from '../../src' +import { MeshReflectorMaterial, useTexture, TorusKnot, Box, Environment } from '@react-three/drei' export default { title: 'Shaders/MeshReflectorMaterial', diff --git a/.storybook/stories/Resize.stories.tsx b/.storybook/stories/Resize.stories.tsx index e90fe5434..e639911b4 100644 --- a/.storybook/stories/Resize.stories.tsx +++ b/.storybook/stories/Resize.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, Resize } from '../../src' +import { Box, Resize } from '@react-three/drei' export default { title: 'Staging/Resize', diff --git a/.storybook/stories/RoundedBox.stories.tsx b/.storybook/stories/RoundedBox.stories.tsx index 83bbb55cf..fa14ed3a6 100644 --- a/.storybook/stories/RoundedBox.stories.tsx +++ b/.storybook/stories/RoundedBox.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' import { useTurntable } from '../useTurntable' -import { RoundedBox } from '../../src' +import { RoundedBox } from '@react-three/drei' export default { title: 'Shapes/RoundedBox', diff --git a/.storybook/stories/Sampler.stories.tsx b/.storybook/stories/Sampler.stories.tsx index 1d22a9776..69523b995 100644 --- a/.storybook/stories/Sampler.stories.tsx +++ b/.storybook/stories/Sampler.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Sampler, ComputedAttribute, TransformFn } from '../../src' +import { Sampler, ComputedAttribute, TransformFn } from '@react-three/drei' import { BufferAttribute, Vector3 } from 'three' export default { diff --git a/.storybook/stories/ScreenQuad.stories.tsx b/.storybook/stories/ScreenQuad.stories.tsx index c2b837920..14ed977e1 100644 --- a/.storybook/stories/ScreenQuad.stories.tsx +++ b/.storybook/stories/ScreenQuad.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { ScreenQuad, shaderMaterial } from '../../src' +import { ScreenQuad, shaderMaterial } from '@react-three/drei' export default { title: 'Shapes/ScreenQuad', diff --git a/.storybook/stories/ScreenSizer.stories.tsx b/.storybook/stories/ScreenSizer.stories.tsx index 3ce8fab55..c9cc6ab3e 100644 --- a/.storybook/stories/ScreenSizer.stories.tsx +++ b/.storybook/stories/ScreenSizer.stories.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' -import { Box, Html, ScreenSizer } from '../../src' +import { Box, Html, ScreenSizer } from '@react-three/drei' import { Setup } from '../Setup' diff --git a/.storybook/stories/ScreenSpace.stories.tsx b/.storybook/stories/ScreenSpace.stories.tsx index 0fcb8dc83..fb4af25eb 100644 --- a/.storybook/stories/ScreenSpace.stories.tsx +++ b/.storybook/stories/ScreenSpace.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { Box, OrbitControls, Html, ScreenSpace } from '../../src' +import { Box, OrbitControls, Html, ScreenSpace } from '@react-three/drei' import { Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' diff --git a/.storybook/stories/ScrollControls.stories.tsx b/.storybook/stories/ScrollControls.stories.tsx index 7ac869869..e760c958b 100644 --- a/.storybook/stories/ScrollControls.stories.tsx +++ b/.storybook/stories/ScrollControls.stories.tsx @@ -4,7 +4,7 @@ import { useFrame, useThree } from '@react-three/fiber' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { useGLTF, ScrollControls, Scroll, useCursor, useIntersect } from '../../src' +import { useGLTF, ScrollControls, Scroll, useCursor, useIntersect } from '@react-three/drei' export default { title: 'Controls/ScrollControls', diff --git a/.storybook/stories/Segments.stories.tsx b/.storybook/stories/Segments.stories.tsx index 49578d292..9c1097c0a 100644 --- a/.storybook/stories/Segments.stories.tsx +++ b/.storybook/stories/Segments.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Segment, Segments, OrbitControls } from '../../src' +import { Segment, Segments, OrbitControls } from '@react-three/drei' export default { title: 'Performance/Segments', diff --git a/.storybook/stories/Shadow.stories.tsx b/.storybook/stories/Shadow.stories.tsx index d306af4a8..02c919ccc 100644 --- a/.storybook/stories/Shadow.stories.tsx +++ b/.storybook/stories/Shadow.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Shadow, Icosahedron, Plane } from '../../src' +import { Shadow, Icosahedron, Plane } from '@react-three/drei' export default { title: 'Misc/Shadow', diff --git a/.storybook/stories/ShadowAlpha.stories.tsx b/.storybook/stories/ShadowAlpha.stories.tsx index 5b645827a..39cfe5c35 100644 --- a/.storybook/stories/ShadowAlpha.stories.tsx +++ b/.storybook/stories/ShadowAlpha.stories.tsx @@ -5,7 +5,7 @@ import { Setup } from '../Setup' import { useFrame } from '@react-three/fiber' import { BufferGeometry, MeshStandardMaterial, type Mesh } from 'three' -import { Icosahedron, Plane, ShadowAlpha } from '../../src' +import { Icosahedron, Plane, ShadowAlpha } from '@react-three/drei' export default { title: 'Misc/ShadowAlpha', diff --git a/.storybook/stories/Sky.stories.tsx b/.storybook/stories/Sky.stories.tsx index 794fdfa68..eccd09622 100644 --- a/.storybook/stories/Sky.stories.tsx +++ b/.storybook/stories/Sky.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Sky, Plane } from '../../src' +import { Sky, Plane } from '@react-three/drei' export default { title: 'Staging/Sky', diff --git a/.storybook/stories/Sparkles.stories.tsx b/.storybook/stories/Sparkles.stories.tsx index 023e9e402..7b1caf106 100644 --- a/.storybook/stories/Sparkles.stories.tsx +++ b/.storybook/stories/Sparkles.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Sparkles, PerspectiveCamera, OrbitControls } from '../../src' +import { Sparkles, PerspectiveCamera, OrbitControls } from '@react-three/drei' export default { title: 'Staging/Sparkles', diff --git a/.storybook/stories/Spotlight.stories.tsx b/.storybook/stories/Spotlight.stories.tsx index cfc41708d..b4e89ccd8 100644 --- a/.storybook/stories/Spotlight.stories.tsx +++ b/.storybook/stories/Spotlight.stories.tsx @@ -12,7 +12,7 @@ import { SpotLightShadow, useDepthBuffer, useTexture, -} from '../../src' +} from '@react-three/drei' import { Setup } from '../Setup' export default { diff --git a/.storybook/stories/SpriteAnimator.stories.tsx b/.storybook/stories/SpriteAnimator.stories.tsx index ce9d25d6f..0ba2424fd 100644 --- a/.storybook/stories/SpriteAnimator.stories.tsx +++ b/.storybook/stories/SpriteAnimator.stories.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { SpriteAnimator, useSpriteLoader } from '../../src' +import { SpriteAnimator, useSpriteLoader } from '@react-three/drei' const SPRITE_IMAGE = 'story.png' const SPRITE_DATA = 'story.json' diff --git a/.storybook/stories/Stage.stories.tsx b/.storybook/stories/Stage.stories.tsx index 15212dec0..708a16f62 100644 --- a/.storybook/stories/Stage.stories.tsx +++ b/.storybook/stories/Stage.stories.tsx @@ -3,7 +3,7 @@ import { Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Stage, Sphere } from '../../src' +import { Stage, Sphere } from '@react-three/drei' import { presetsObj, PresetsType } from '../../src/helpers/environment-assets' const environments = Object.keys(presetsObj) as Array diff --git a/.storybook/stories/Stars.stories.tsx b/.storybook/stories/Stars.stories.tsx index 3dec57eab..2eb6f691e 100644 --- a/.storybook/stories/Stars.stories.tsx +++ b/.storybook/stories/Stars.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Stars, Plane } from '../../src' +import { Stars, Plane } from '@react-three/drei' export default { title: 'Staging/Stars', diff --git a/.storybook/stories/Stats.stories.tsx b/.storybook/stories/Stats.stories.tsx index 5483f80e8..4f291ea93 100644 --- a/.storybook/stories/Stats.stories.tsx +++ b/.storybook/stories/Stats.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Stats } from '../../src' +import { Stats } from '@react-three/drei' export default { title: 'Misc/Stats', diff --git a/.storybook/stories/StatsGl.stories.tsx b/.storybook/stories/StatsGl.stories.tsx index b2412bb8d..688df1df4 100644 --- a/.storybook/stories/StatsGl.stories.tsx +++ b/.storybook/stories/StatsGl.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { StatsGl } from '../../src' +import { StatsGl } from '@react-three/drei' export default { title: 'Misc/StatsGl', diff --git a/.storybook/stories/Svg.stories.tsx b/.storybook/stories/Svg.stories.tsx index d4d13cc17..e8e1f7ab3 100644 --- a/.storybook/stories/Svg.stories.tsx +++ b/.storybook/stories/Svg.stories.tsx @@ -4,7 +4,7 @@ import { MathUtils, NoToneMapping, Vector3 } from 'three' import { Setup } from '../Setup' -import { Svg } from '../../src' +import { Svg } from '@react-three/drei' export default { title: 'Abstractions/Svg', diff --git a/.storybook/stories/Text.stories.tsx b/.storybook/stories/Text.stories.tsx index b3b7b0c6f..21fe85bdf 100644 --- a/.storybook/stories/Text.stories.tsx +++ b/.storybook/stories/Text.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' import { useTurntable } from '../useTurntable' -import { Text } from '../../src' +import { Text } from '@react-three/drei' export default { title: 'Abstractions/Text', diff --git a/.storybook/stories/Text3D.stories.tsx b/.storybook/stories/Text3D.stories.tsx index e0e2d7645..8693995f7 100644 --- a/.storybook/stories/Text3D.stories.tsx +++ b/.storybook/stories/Text3D.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Text3D, Float, Center } from '../../src' +import { Text3D, Float, Center } from '@react-three/drei' export default { title: 'Abstractions/Text3D', diff --git a/.storybook/stories/Texture.stories.tsx b/.storybook/stories/Texture.stories.tsx index 62f6c4225..251d2f84d 100644 --- a/.storybook/stories/Texture.stories.tsx +++ b/.storybook/stories/Texture.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Icosahedron, Texture } from '../../src' +import { Icosahedron, Texture } from '@react-three/drei' export default { title: 'Loaders/Texture', diff --git a/.storybook/stories/TrackballControls.stories.tsx b/.storybook/stories/TrackballControls.stories.tsx index 7d656949d..9a23d03db 100644 --- a/.storybook/stories/TrackballControls.stories.tsx +++ b/.storybook/stories/TrackballControls.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Icosahedron, TrackballControls } from '../../src' +import { Icosahedron, TrackballControls } from '@react-three/drei' export default { title: 'Controls/TrackballControls', diff --git a/.storybook/stories/Trail.stories.tsx b/.storybook/stories/Trail.stories.tsx index dae85d615..71779e35c 100644 --- a/.storybook/stories/Trail.stories.tsx +++ b/.storybook/stories/Trail.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Sphere, Trail, useTrail, Float, PerspectiveCamera } from '../../src' +import { Sphere, Trail, useTrail, Float, PerspectiveCamera } from '@react-three/drei' import { useFrame } from '@react-three/fiber' import { Group, InstancedMesh, Mesh, Object3D, Vector3 } from 'three' diff --git a/.storybook/stories/TrailTexture.stories.tsx b/.storybook/stories/TrailTexture.stories.tsx index 67f68d592..6a4421402 100644 --- a/.storybook/stories/TrailTexture.stories.tsx +++ b/.storybook/stories/TrailTexture.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { TrailTexture } from '../../src' +import { TrailTexture } from '@react-three/drei' export default { title: 'misc/TrailTexture', diff --git a/.storybook/stories/TransformControls.stories.tsx b/.storybook/stories/TransformControls.stories.tsx index 42ddf6d45..06ece390c 100644 --- a/.storybook/stories/TransformControls.stories.tsx +++ b/.storybook/stories/TransformControls.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, OrbitControls, Select, TransformControls } from '../../src' +import { Box, OrbitControls, Select, TransformControls } from '@react-three/drei' export default { title: 'Gizmos/TransformControls', diff --git a/.storybook/stories/Tube.stories.tsx b/.storybook/stories/Tube.stories.tsx index 7d8edf404..45c44f25a 100644 --- a/.storybook/stories/Tube.stories.tsx +++ b/.storybook/stories/Tube.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' import { useTurntable } from '../useTurntable' -import { Tube } from '../../src' +import { Tube } from '@react-three/drei' export default { title: 'Shapes/Tube', diff --git a/.storybook/stories/VideoTexture.stories.tsx b/.storybook/stories/VideoTexture.stories.tsx index a3c46a307..f1b7eb61f 100644 --- a/.storybook/stories/VideoTexture.stories.tsx +++ b/.storybook/stories/VideoTexture.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Plane, VideoTexture, useTexture } from '../../src' +import { Plane, VideoTexture, useTexture } from '@react-three/drei' export default { title: 'Misc/VideoTexture', diff --git a/.storybook/stories/Wireframe.stories.tsx b/.storybook/stories/Wireframe.stories.tsx index 914721ae3..276165ac7 100644 --- a/.storybook/stories/Wireframe.stories.tsx +++ b/.storybook/stories/Wireframe.stories.tsx @@ -3,7 +3,7 @@ import { IcosahedronGeometry, Vector3 } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Environment, Wireframe } from '../../src' +import { Environment, Wireframe } from '@react-three/drei' export default { title: 'Staging/Wireframe', diff --git a/.storybook/stories/meshBounds.stories.tsx b/.storybook/stories/meshBounds.stories.tsx index b854f4fbf..48ffbeef5 100644 --- a/.storybook/stories/meshBounds.stories.tsx +++ b/.storybook/stories/meshBounds.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' import { useTurntable } from '../useTurntable' -import { meshBounds } from '../../src' +import { meshBounds } from '@react-three/drei' function MeshBounds(props: React.ComponentProps<'mesh'>) { const mesh = useTurntable>() diff --git a/.storybook/stories/shaderMaterial.stories.tsx b/.storybook/stories/shaderMaterial.stories.tsx index 95325b873..9f066f157 100644 --- a/.storybook/stories/shaderMaterial.stories.tsx +++ b/.storybook/stories/shaderMaterial.stories.tsx @@ -4,7 +4,7 @@ import { Texture } from 'three' import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { Box, shaderMaterial, useTexture } from '../../src' +import { Box, shaderMaterial, useTexture } from '@react-three/drei' const MyMaterial = shaderMaterial( { map: new Texture(), repeats: 1 }, diff --git a/.storybook/stories/useAnimations.stories.tsx b/.storybook/stories/useAnimations.stories.tsx index 05c45a216..497b2c601 100644 --- a/.storybook/stories/useAnimations.stories.tsx +++ b/.storybook/stories/useAnimations.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { useAnimations, useGLTF, useMatcapTexture } from '../../src' +import { useAnimations, useGLTF, useMatcapTexture } from '@react-three/drei' type UseAnimationHook = Parameters type UseAnimationProps = { diff --git a/.storybook/stories/useAspect.stories.tsx b/.storybook/stories/useAspect.stories.tsx index 7eca2241c..df9a9f5fd 100644 --- a/.storybook/stories/useAspect.stories.tsx +++ b/.storybook/stories/useAspect.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { useAspect, Plane } from '../../src' +import { useAspect, Plane } from '@react-three/drei' function UseAspect({ width, diff --git a/.storybook/stories/useCamera.stories.tsx b/.storybook/stories/useCamera.stories.tsx index 2b800cc14..e9e4b92e1 100644 --- a/.storybook/stories/useCamera.stories.tsx +++ b/.storybook/stories/useCamera.stories.tsx @@ -5,7 +5,7 @@ import { Meta, StoryObj } from '@storybook/react' import { Setup } from '../Setup' -import { useCamera, OrthographicCamera } from '../../src' +import { useCamera, OrthographicCamera } from '@react-three/drei' export default { title: 'Misc/useCamera', diff --git a/.storybook/stories/useContextBridge.stories.tsx b/.storybook/stories/useContextBridge.stories.tsx index f2a4c63e7..0cb0409cb 100644 --- a/.storybook/stories/useContextBridge.stories.tsx +++ b/.storybook/stories/useContextBridge.stories.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { Canvas } from '@react-three/fiber' import { Meta, StoryObj } from '@storybook/react' -import { OrbitControls, Box, useContextBridge, Text } from '../../src' +import { OrbitControls, Box, useContextBridge, Text } from '@react-three/drei' function ContextBridge({ contexts, diff --git a/package.json b/package.json index b82cdf7d8..33656a6d2 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "typecheck": "tsc --noEmit --emitDeclarationOnly false --strict --jsx react", "typegen": "tsc --emitDeclarationOnly", "storybook": "cross-env NODE_OPTIONS=\"--openssl-legacy-provider\" storybook dev -p 6006", - "build-storybook": "cross-env NODE_OPTIONS=\"--openssl-legacy-provider\" storybook build", + "build-storybook": "cross-env NODE_OPTIONS=\"--openssl-legacy-provider\" STORYBOOK_ENV=production storybook build", "copy": "copyfiles package.json README.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.husky=undefined; this.prettier=undefined; this.jest=undefined; this['lint-staged']=undefined;\"", "release": "semantic-release" },