Commit Graph

5 Commits

Author SHA1 Message Date
sandevistan
d6fcf63fe6
feat(studio): import .avatar.json definitions into the library
The studio could only write runtime definitions: createAvatarDefinition is
one-way, and the sole file picker fed everything to parseImportedStudioDocument,
which rejects a definition for lacking version/library/expressions/sequences.
There was no way to bring an exported avatar back in.

Add the inverse mapping and wire it into the avatar library:

- studioAvatarFromDefinition() rebuilds a StudioAvatar, its expressions and its
  sequences from a definition. `neutral` is deliberately not restored as an
  expression: it is a reserved semantic key that lives on the avatar as eye
  defaults and is re-emitted on export.
- The import picker now sniffs the format. A definition adds one avatar and
  keeps the rest of the library; a studio project still replaces the document.
- Avatars tab: the "+" card opens a menu offering a new avatar or an import.
- Avatar editor: an Exporter button beside Dupliquer downloads the avatar as
  .avatar.json, disabled with the validation error as a tooltip when the
  definition would not validate.
- Menu primitive built on the existing @base-ui/react dependency, matching
  context-menu.tsx. No new packages.

The round-trip test imports the repo's strobi.avatar.json fixture and exports it
again, asserting identical body, colors, expressions and ordering, so the two
directions cannot drift.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 23:11:43 +02:00
smontlouis
e205c57687 feat(avatar): add pixel rendering across studio
Persist the avatar render style and apply it consistently to previews, snapshots, animations, and standalone exports.
2026-08-15 11:41:30 +02:00
smontlouis
398c7f53e2 feat(studio): refine responsive workspace navigation
Add a resizable stacked layout and move avatar selection into a dedicated grid page.
2026-08-13 22:47:52 +02:00
smontlouis
3c5f5cb41e feat(app): prepare Vercel deployment
Add production metadata, social assets, Vercel observability, repository links, and final navigation and drawer polish.
2026-08-13 20:08:26 +02:00
smontlouis
94bc5223e6 feat(studio): redesign responsive navigation
Add a unified bottom navigation, avatar drawer, and responsive preview and inspector layout across desktop and mobile.
2026-08-13 19:55:20 +02:00