From afb3a8316fc80c4cf8a46cb25190414684261038 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Fri, 20 Mar 2026 02:32:13 -0700 Subject: [PATCH] =?UTF-8?q?types(profile-client):=20=F0=9F=8F=B7=EF=B8=8F?= =?UTF-8?q?=20Extend=20type=20definitions=20in=20vendor.d.ts=20for=20vendo?= =?UTF-8?q?r/client=20APIs=20to=20improve=20type=20safety=20and=20support?= =?UTF-8?q?=20new=20endpoints?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../@providers/profile-client/src/vendor.d.ts | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 @packages/@providers/profile-client/src/vendor.d.ts 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; +}