talking-head-studio 0.2.9 → 0.3.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.
Files changed (35) hide show
  1. package/dist/TalkingHead.js +30 -2
  2. package/dist/TalkingHeadVisualization.d.ts +35 -0
  3. package/dist/TalkingHeadVisualization.js +277 -0
  4. package/dist/api/index.d.ts +2 -0
  5. package/dist/api/index.js +18 -0
  6. package/dist/api/studioApi.d.ts +38 -0
  7. package/dist/api/studioApi.js +235 -0
  8. package/dist/api/types.d.ts +87 -0
  9. package/dist/api/types.js +5 -0
  10. package/dist/assets/face-squeeze-local.glb +0 -0
  11. package/dist/filament/FilamentAvatar.d.ts +41 -0
  12. package/dist/filament/FilamentAvatar.js +737 -0
  13. package/dist/filament/faceSqueezeAssets.d.ts +1 -0
  14. package/dist/filament/faceSqueezeAssets.js +5 -0
  15. package/dist/filament/index.d.ts +6 -0
  16. package/dist/filament/index.js +24 -0
  17. package/dist/filament/morphTables.d.ts +5 -0
  18. package/dist/filament/morphTables.js +93 -0
  19. package/dist/filament/useAuthedFilamentUri.d.ts +11 -0
  20. package/dist/filament/useAuthedFilamentUri.js +126 -0
  21. package/dist/index.d.ts +10 -1
  22. package/dist/index.js +15 -2
  23. package/dist/index.web.d.ts +5 -1
  24. package/dist/index.web.js +10 -2
  25. package/dist/tts/useDirectVisemeStream.d.ts +21 -0
  26. package/dist/tts/useDirectVisemeStream.js +119 -0
  27. package/dist/utils/avatarUtils.d.ts +13 -0
  28. package/dist/utils/avatarUtils.js +56 -0
  29. package/dist/wardrobe/index.d.ts +2 -0
  30. package/dist/wardrobe/index.js +20 -0
  31. package/dist/wardrobe/useAvatarWardrobeHydration.d.ts +7 -0
  32. package/dist/wardrobe/useAvatarWardrobeHydration.js +34 -0
  33. package/dist/wardrobe/wardrobeStore.d.ts +30 -0
  34. package/dist/wardrobe/wardrobeStore.js +106 -0
  35. package/package.json +34 -2
@@ -0,0 +1,87 @@
1
+ export interface EquippedAccessory {
2
+ asset_id: string;
3
+ bone: string;
4
+ position: [number, number, number];
5
+ rotation: [number, number, number];
6
+ scale: number;
7
+ }
8
+ export interface AvatarAppearance {
9
+ version: 1;
10
+ hairColor?: string;
11
+ skinColor?: string;
12
+ eyeColor?: string;
13
+ equippedAccessories?: EquippedAccessory[];
14
+ }
15
+ export interface Avatar {
16
+ id: string;
17
+ name: string;
18
+ description: string | null;
19
+ url: string;
20
+ thumbnail_url: string | null;
21
+ animated_thumbnail_url: string | null;
22
+ is_public: boolean;
23
+ restricted: boolean;
24
+ file_size: number;
25
+ default_voice_profile_id: string | null;
26
+ appearance: AvatarAppearance | null;
27
+ created_at: string;
28
+ updated_at: string;
29
+ }
30
+ export interface PublicAvatar {
31
+ id: string;
32
+ name: string;
33
+ description: string | null;
34
+ thumbnail_url: string | null;
35
+ animated_thumbnail_url: string | null;
36
+ owner_user_id: string;
37
+ voice_name: string | null;
38
+ voice_language: string | null;
39
+ created_at: string;
40
+ }
41
+ export interface ProfileSample {
42
+ id: string;
43
+ profile_id: string;
44
+ audio_path: string;
45
+ reference_text: string;
46
+ }
47
+ export interface VoiceProfile {
48
+ id: string;
49
+ name: string;
50
+ description: string | null;
51
+ language: string;
52
+ avatar_path: string | null;
53
+ avatar_model_id: string | null;
54
+ created_at: string;
55
+ updated_at: string;
56
+ }
57
+ export interface AvatarUpdate {
58
+ name?: string;
59
+ description?: string;
60
+ is_public?: boolean;
61
+ appearance?: AvatarAppearance | null;
62
+ }
63
+ export interface WearableAsset {
64
+ id: string;
65
+ name: string;
66
+ category: string;
67
+ type: string;
68
+ slot: string;
69
+ storage_key: string;
70
+ file_size: number;
71
+ url: string;
72
+ attach_bone: string | null;
73
+ offset_position: number[] | null;
74
+ offset_rotation: number[] | null;
75
+ hides_body_parts: string[] | null;
76
+ triangle_count: number | null;
77
+ created_at: string;
78
+ updated_at: string;
79
+ }
80
+ export interface PlacementSuggestion {
81
+ bone: string;
82
+ position: [number, number, number];
83
+ rotation: [number, number, number];
84
+ confidence: number;
85
+ reasoning: string;
86
+ }
87
+ export type AssetType = 'skinned' | 'rigid';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // ---------------------------------------------------------------------------
3
+ // Avatar API types — moved from siteclaw/lib/studioApi.ts
4
+ // ---------------------------------------------------------------------------
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,41 @@
1
+ /**
2
+ * FilamentAvatar — native Filament-based avatar renderer.
3
+ *
4
+ * Replaces the TalkingHead WebView on iOS/Android with direct Filament
5
+ * morph target writes — no WebView bridge, no JS→native→JS roundtrip,
6
+ * visemes applied at 60fps in React Native JS.
7
+ *
8
+ * Implements the full TalkingHeadRef interface so it can be swapped in
9
+ * transparently for the WebView renderer.
10
+ */
11
+ import React from 'react';
12
+ import { ViewStyle, StyleProp } from 'react-native';
13
+ import type { TalkingHeadViseme, TalkingHeadVisemeSchedule, TalkingHeadAccessory, TalkingHeadMood } from '../TalkingHead';
14
+ export declare const CAMERA_FOCAL_FULL = 28;
15
+ export declare const CAMERA_FOCAL_PIP = 50;
16
+ export interface FilamentAvatarRef {
17
+ sendViseme: (viseme: TalkingHeadViseme, weight?: number) => void;
18
+ scheduleVisemes: (schedule: TalkingHeadVisemeSchedule) => void;
19
+ clearVisemes: () => void;
20
+ sendAmplitude: (amplitude: number) => void;
21
+ setMood: (mood: TalkingHeadMood) => void;
22
+ setHairColor: (color: string) => void;
23
+ setSkinColor: (color: string) => void;
24
+ setEyeColor: (color: string) => void;
25
+ setAccessories: (accessories: TalkingHeadAccessory[]) => void;
26
+ }
27
+ interface FilamentAvatarProps {
28
+ style?: StyleProp<ViewStyle>;
29
+ avatarUrl: string | null;
30
+ aspect?: number;
31
+ focalLength?: number;
32
+ mood?: TalkingHeadMood;
33
+ hairColor?: string;
34
+ skinColor?: string;
35
+ eyeColor?: string;
36
+ accessories?: TalkingHeadAccessory[];
37
+ onReady?: () => void;
38
+ onError?: (message: string) => void;
39
+ }
40
+ export declare const FilamentAvatar: React.ForwardRefExoticComponent<FilamentAvatarProps & React.RefAttributes<FilamentAvatarRef>>;
41
+ export {};