@spicenet-io/spiceflow-ui 4.0.13 → 4.0.14

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.
@@ -1,3 +1,2 @@
1
1
  import { Theme, ThemeMode } from "../types/theme";
2
2
  export declare const createTheme: (mode?: ThemeMode) => Theme;
3
- export declare const defaultTheme: Theme;
@@ -20,7 +20,3 @@ export interface ChainBatch {
20
20
  calls: Call[];
21
21
  tokenTransfers?: TokenTransferConfig[];
22
22
  }
23
- export interface IntentAuthorization {
24
- signature: string;
25
- chainBatches: ChainBatch[];
26
- }
@@ -16,23 +16,6 @@ export interface PostDepositContext {
16
16
  destinationAmount?: bigint;
17
17
  destinationTokenDecimals?: number;
18
18
  }
19
- export interface SpiceDepositRequest {
20
- user: string;
21
- txHash: string;
22
- sender: string;
23
- tokenAddress: string;
24
- chainId: number;
25
- amount: string;
26
- }
27
- export interface SpiceDepositResponse {
28
- success: boolean;
29
- data?: {
30
- creditedAmount?: string;
31
- };
32
- error?: {
33
- message: string;
34
- };
35
- }
36
19
  export interface DepositModalProps {
37
20
  isOpen: boolean;
38
21
  onClose: () => void;
@@ -41,8 +24,6 @@ export interface DepositModalProps {
41
24
  title?: string;
42
25
  depositBatches?: ChainBatch[] | ((context: PostDepositContext) => Promise<ChainBatch[]>) | ((depositAmount: string, depositTokenAddress: string) => Promise<ChainBatch[]>);
43
26
  supportedChains: number[];
44
- selectedSourceChainId?: number;
45
- skipChainSwitch?: boolean;
46
27
  styles?: CustomStyles;
47
28
  className?: string;
48
29
  onDepositAssetChange?: (asset: Asset | null) => void;
@@ -3,6 +3,6 @@ export * from "./withdraw";
3
3
  export * from "./assets";
4
4
  export * from "./theme";
5
5
  export * from "./status";
6
- export type { Authorization, ChainBatch, IntentAuthorization, } from "./authorization";
6
+ export type { Authorization, ChainBatch } from "./authorization";
7
7
  export * from "./wallet";
8
8
  export * from "./ui";
@@ -42,7 +42,6 @@ export interface SpiceLockModalProps {
42
42
  onLockError?: (error: string) => void;
43
43
  onLockExecute?: (ctx: LockExecuteContext) => Promise<string | void>;
44
44
  sourceToDestinationConversionRate?: number;
45
- estimatedOutputAmount?: string;
46
45
  onAddFunds?: () => void;
47
46
  includeWalletAssets?: boolean;
48
47
  destinationTokenAddress?: Address;
@@ -20,15 +20,6 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
20
20
  endAdornment?: React.ReactNode;
21
21
  theme?: Theme;
22
22
  }
23
- export interface ModalProps {
24
- isOpen: boolean;
25
- onClose: () => void;
26
- title?: string;
27
- children: React.ReactNode;
28
- maxWidth?: string;
29
- className?: string;
30
- theme?: Theme;
31
- }
32
23
  export interface SpinnerProps {
33
24
  size?: number;
34
25
  borderWidth?: number;
@@ -1,27 +1,5 @@
1
- import { Address } from "viem";
2
- import { Authorization } from "./authorization";
3
1
  import type { WalletProvider } from "../providers/SpiceFlowProvider";
4
2
  export type { WalletProvider };
5
- export interface WalletState {
6
- isReady: boolean;
7
- isAuthenticated: boolean;
8
- isConnected: boolean;
9
- address?: Address;
10
- provider: WalletProvider | null;
11
- }
12
- export interface WalletActions {
13
- signAuthorization: (params: {
14
- contractAddress: Address;
15
- chainId: number;
16
- nonce: number;
17
- }) => Promise<Authorization>;
18
- signMessage: (message: string) => Promise<{
19
- signature: string;
20
- }>;
21
- }
22
- export interface UseWalletReturn extends WalletState {
23
- actions: WalletActions;
24
- }
25
3
  export interface ProviderConfig {
26
4
  privy?: {
27
5
  appId: string;
@@ -30,12 +8,6 @@ export interface ProviderConfig {
30
8
  };
31
9
  };
32
10
  }
33
- export interface WalletProviderProps {
34
- children: React.ReactNode;
35
- provider: WalletProvider;
36
- defaultChain?: any;
37
- supportedChains?: any[];
38
- }
39
11
  export interface LoginProps {
40
12
  onAuthSuccess?: (address: string) => void;
41
13
  onAuthError?: (error: string) => void;
@@ -19,14 +19,12 @@ export interface SpiceWithdrawProps {
19
19
  closeOnBackdropClick?: boolean;
20
20
  styles?: CustomStyles;
21
21
  onWithdrawExecute?: (withdrawnAmount: string) => Promise<void> | void;
22
- withdrawActionLabel?: string;
23
22
  onWithdrawSuccess?: (data: {
24
23
  token: string;
25
24
  amount: string;
26
25
  chainId: number;
27
26
  }) => void;
28
27
  onWithdrawError?: (error: string) => void;
29
- autoCloseDelay?: number;
30
28
  availableTokens?: Record<number, DestinationToken[]>;
31
29
  buildSpicenetBatch?: (params: {
32
30
  destinationChainId: number;
@@ -4,9 +4,7 @@ import phantomLogo from "../assets/icons/phantom.png";
4
4
  import spicenetLogo from "../assets/icons/spicenet-mark.svg";
5
5
  export { metamaskLogo, rabbyLogo, phantomLogo };
6
6
  export declare const ethLogo: string;
7
- export declare const arbLogo: string;
8
7
  export declare const usdcLogo: string;
9
- export declare const wbtcLogo: string;
10
8
  export { spicenetLogo };
11
9
  export declare const chainLogoMap: {
12
10
  [key: number]: string;
@@ -14,4 +14,3 @@ export declare const PENDING_DEPOSIT_STORAGE_EVENT = "spiceflow:pendingDepositCh
14
14
  export declare function savePendingDeposit(record: PendingDepositRecord): void;
15
15
  export declare function getPendingDeposits(embeddedWalletAddress: string): PendingDepositRecord[];
16
16
  export declare function clearPendingDeposit(embeddedWalletAddress: string, chainId: number, tokenAddress: string): void;
17
- export declare function clearAllPendingDeposits(embeddedWalletAddress: string): void;
@@ -13,4 +13,3 @@ export interface RollupBalanceEntry {
13
13
  }
14
14
  export declare function getRollupBalanceForChainToken(entries: RollupBalanceEntry[], chainId: number, tokenAddress: Address, fallbackNames?: Array<string | undefined>): bigint;
15
15
  export declare function parseRollupBalanceEntry(token: RollupBalanceEntry, supportedChains?: number[]): Asset | null;
16
- export declare function fallbackRollupChainName(chainId: number): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicenet-io/spiceflow-ui",
3
- "version": "4.0.13",
3
+ "version": "4.0.14",
4
4
  "description": "Spiceflow UI SDK",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.13",
@@ -35,7 +35,9 @@
35
35
  "dev": "rollup -c rollup.config.mjs --watch",
36
36
  "dev:link": "bun run build && bun link && echo 'SDK linked globally. Run: bun link @spicenet-io/spiceflow-ui in your project'",
37
37
  "clean": "rm -rf dist",
38
- "prepublishOnly": "bun run build"
38
+ "format": "prettier --write . --ignore-unknown",
39
+ "prepublishOnly": "bun run build",
40
+ "prepare": "husky || true"
39
41
  },
40
42
  "keywords": [
41
43
  "react",
@@ -91,10 +93,10 @@
91
93
  "eslint-plugin-react-hooks": "4.6.2",
92
94
  "husky": "9.1.7",
93
95
  "jest": "29.7.0",
94
- "lint-staged": "16.2.6",
96
+ "lint-staged": "17.0.8",
95
97
  "postcss": "8.5.6",
96
98
  "postcss-import": "16.1.1",
97
- "prettier": "3.6.2",
99
+ "prettier": "3.9.5",
98
100
  "react": "18.3.1",
99
101
  "react-dom": "18.3.1",
100
102
  "rollup": "4.53.2",
@@ -109,6 +111,6 @@
109
111
  "wagmi": "2.19.5"
110
112
  },
111
113
  "lint-staged": {
112
- "*.{ts,tsx,js,jsx,json,md}": "prettier --write"
114
+ "**/*": "prettier --write --ignore-unknown"
113
115
  }
114
116
  }
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- export declare const ModalHeader: React.FC<{
3
- title: string;
4
- onClose: () => void;
5
- }>;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import type { SupplyEstimateProps } from "../../../types/supply";
3
- export type { SupplyEstimateProps };
4
- export declare const SupplyEstimate: React.FC<SupplyEstimateProps>;
@@ -1,5 +0,0 @@
1
- export * from "./AssetSelector";
2
- export * from "./StatusDisplay";
3
- export * from "./ProviderLogins";
4
- export * from "./SpiceWithdraw";
5
- export * from "./ui";
@@ -1,2 +0,0 @@
1
- export type { UIChainConfig as ChainConfig } from "../utils/chains/chainData";
2
- export type { Network } from "@spicenet-io/spiceflow-core";
File without changes