fix: TypeScript errors, shadow deprecations, and build configuration

- Fix shadow style deprecation warnings across components (boxShadow)
- Add type declaration files (codec.d.ts, modules.d.ts)
- Update metro.config.cjs for proper asset extensions
- Update tsconfig.json with module resolution settings
- Fix TypeScript errors in shared/lib files
- Update app icons (optimized PNG files)
This commit is contained in:
2026-01-15 09:37:37 +03:00
parent 0cac4023ff
commit ba74fe4298
28 changed files with 225 additions and 75 deletions
+65
View File
@@ -0,0 +1,65 @@
/**
* Type augmentations for Polkadot.js Codec type
* These extend the base Codec type with Option-like methods
*/
import '@pezkuwi/types';
declare module '@pezkuwi/types/types/codec' {
interface Codec {
// Option methods
isNone: boolean;
isSome: boolean;
isEmpty: boolean;
unwrap(): any;
unwrapOr<T>(defaultValue: T): any;
unwrapOrDefault(): any;
// Primitive conversions
toNumber(): number;
toBigInt(): bigint;
toJSON(): any;
toString(): string;
toHex(): string;
// Common properties
data?: any;
free?: any;
balance?: any;
commission?: any;
keys?: any;
// Delegation checks
isDelegating?: boolean;
asDelegating?: any;
// Iterator support
[Symbol.iterator]?(): Iterator<any>;
map?<T>(fn: (value: any) => T): T[];
}
}
declare module '@pezkuwi/types-codec' {
interface Codec {
isNone: boolean;
isSome: boolean;
isEmpty: boolean;
unwrap(): any;
unwrapOr<T>(defaultValue: T): any;
unwrapOrDefault(): any;
toNumber(): number;
toBigInt(): bigint;
toJSON(): any;
toString(): string;
toHex(): string;
data?: any;
free?: any;
balance?: any;
commission?: any;
keys?: any;
isDelegating?: boolean;
asDelegating?: any;
[Symbol.iterator]?(): Iterator<any>;
map?<T>(fn: (value: any) => T): T[];
}
}
+58
View File
@@ -0,0 +1,58 @@
/**
* Type declarations for external modules
*/
// Pezkuwi extension types
declare module '@pezkuwi/extension-inject/types' {
import type { Signer } from '@pezkuwi/api/types';
export interface InjectedAccountWithMeta {
address: string;
meta: {
name?: string;
source: string;
genesisHash?: string;
};
}
export interface InjectedExtension {
name: string;
version: string;
accounts: {
get: () => Promise<InjectedAccountWithMeta[]>;
subscribe: (cb: (accounts: InjectedAccountWithMeta[]) => void) => () => void;
};
signer: Signer;
}
}
declare module '@pezkuwi/extension-dapp' {
import type { InjectedAccountWithMeta } from '@pezkuwi/extension-inject/types';
interface InjectedWeb3 {
signer: any;
name: string;
version: string;
}
export function web3Enable(appName: string): Promise<InjectedWeb3[]>;
export function web3Accounts(): Promise<InjectedAccountWithMeta[]>;
export function web3FromAddress(address: string): Promise<InjectedWeb3>;
export function web3FromSource(source: string): Promise<InjectedWeb3>;
}
// Path alias for shared lib - used in web context
declare module '@/lib/supabase' {
export const supabase: any;
}
// Import.meta.env for Vite-like environments
interface ImportMetaEnv {
readonly VITE_PINATA_API_KEY?: string;
readonly VITE_PINATA_SECRET_KEY?: string;
[key: string]: string | undefined;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}