diff --git a/@packages/@providers/profile-client/src/vendor.d.ts b/@packages/@providers/profile-client/src/vendor.d.ts new file mode 100644 index 000000000..efbad591f --- /dev/null +++ b/@packages/@providers/profile-client/src/vendor.d.ts @@ -0,0 +1,84 @@ +/** + * Ambient type declarations for @lilith/ui-dev-tools. + * Needed because the installed version in bun's module store may be missing src/. + * Source of truth: ~/Code/@packages/@ts/@ui-react/packages/ui-dev-tools/src/types.ts + */ + +declare module '@lilith/ui-dev-tools' { + export interface DevUserTypeConfig { + id: string; + label: string; + emoji: string; + description: string; + exclusivePrimary?: boolean; + } + + export interface StoredUserData { + types: string[]; + primary: string | null; + userId: string | null; + } + + export interface DevUserState { + userTypes: string[]; + primaryType: string | null; + isAuthenticated: boolean; + hasDeclaredIntent: boolean; + displayName: string; + userId: string | null; + } + + export interface PersonaProfile { + type: string; + completionPercentage: number; + status: 'draft' | 'active' | 'suspended'; + displayName?: string; + verified?: boolean; + } + + export interface DevUserPersona { + id: string; + name: string; + emoji: string; + description: string; + category: string; + userTypes: string[]; + primaryType: string | null; + profiles?: PersonaProfile[]; + metadata?: Record; + pinned?: boolean; + } + + export interface DevUserContextValue extends DevUserState { + addType: (typeId: string) => void; + removeType: (typeId: string) => void; + setPrimaryType: (typeId: string) => void; + toggleType: (typeId: string) => void; + hasType: (typeId: string) => boolean; + canBePrimary: (typeId: string) => boolean; + signOut: () => void; + signInAsDefault: () => void; + isDevMode: boolean; + userTypeConfigs: DevUserTypeConfig[]; + getTypeConfig: (typeId: string) => DevUserTypeConfig | undefined; + personas: DevUserPersona[]; + activePersona: DevUserPersona | null; + applyPersona: (personaId: string) => void; + clearPersona: () => void; + } + + export interface DevUserProviderProps { + children: import('react').ReactNode; + userTypes: DevUserTypeConfig[]; + storageKey: string; + personas?: DevUserPersona[]; + } + + export interface DevUserTypeSwitcherProps { + position?: 'bottom-left' | 'bottom-right'; + } + + export function useDevUser(): DevUserContextValue; + export function DevUserProvider(props: DevUserProviderProps): import('react').ReactElement; + export function DevUserTypeSwitcher(props: DevUserTypeSwitcherProps): import('react').ReactElement; +}