diff --git a/src/features/studio/components/StudioInspector.tsx b/src/features/studio/components/StudioInspector.tsx index 06e6b56..7a20b51 100644 --- a/src/features/studio/components/StudioInspector.tsx +++ b/src/features/studio/components/StudioInspector.tsx @@ -16,8 +16,8 @@ import { TriangleAlert, Upload, } from 'lucide-react' -import { AnimatePresence, motion } from 'motion/react' -import { type CSSProperties, useRef, useState } from 'react' +import { AnimatePresence, animate, motion, useMotionValue, useTransform } from 'motion/react' +import { type CSSProperties, useLayoutEffect, useRef, useState } from 'react' import { Avatar as RuntimeAvatar, @@ -74,7 +74,7 @@ import { import { defaultExpression } from '@/features/avatar/presets' import { surfaceLabels, surfacePresets } from '@/features/avatar/surfaces' import { type SnapshotBackground } from '@/features/export/snapshotExporter' -import { AvatarDrawer } from '@/features/studio/components/AvatarDrawer' +import { AvatarPage } from '@/features/studio/components/AvatarDrawer' import { StudioIdentity } from '@/features/studio/components/StudioIdentity' import type { StudioController } from '@/features/studio/useStudioController' @@ -116,7 +116,6 @@ const highlightedCode = (source: string) => }) export function StudioInspector({ controller }: { controller: StudioController }) { - const [avatarDrawerOpen, setAvatarDrawerOpen] = useState(false) const [runtimeExampleOpen, setRuntimeExampleOpen] = useState(false) const runtimeExampleRef = useRef(null) const { @@ -328,7 +327,7 @@ export function StudioInspector({ controller }: { controller: StudioController } }) } return ( - +
@@ -448,18 +447,33 @@ export function StudioInspector({ controller }: { controller: StudioController } > {!editorPageOpen && (
-

{activeAvatar.name}

-

- {t( - mode === 'manual' - ? 'Pose' - : mode === 'expressions' - ? 'Expressions' - : mode === 'states' - ? 'Animations' - : 'Exporter' - )} -

+
+

{activeAvatar.name}

+

+ {t( + mode === 'manual' + ? 'Pose' + : mode === 'avatars' + ? 'Avatars' + : mode === 'expressions' + ? 'Expressions' + : mode === 'states' + ? 'Animations' + : 'Exporter' + )} +

+
+ {mode === 'manual' && ( + + )}
)} @@ -1394,20 +1408,13 @@ export function StudioInspector({ controller }: { controller: StudioController } aria-label={t('Afficher le maillage')} /> - )} )} + {!editorPageOpen && mode === 'avatars' && } {!sequenceEditing && !editing && bodyEditing && (
)