otx-swap 1.2.12 → 1.2.13

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.
package/dist/index.d.ts CHANGED
@@ -10,6 +10,25 @@ export declare interface BitcoinTransactionRequest {
10
10
  };
11
11
  }
12
12
 
13
+ /**
14
+ * Border radius configuration for different component types
15
+ * All values should be valid CSS border-radius values (e.g., "6px", "1rem", "0.5rem")
16
+ */
17
+ declare interface BorderRadiusConfig {
18
+ /** Main widget container (default: "1.5rem" / 24px) */
19
+ container?: string;
20
+ /** Cards, modals, panels (default: "1rem" / 16px) */
21
+ card?: string;
22
+ /** Input fields, large panels (default: "0.75rem" / 12px) */
23
+ panel?: string;
24
+ /** Buttons, list items (default: "0.5rem" / 8px) */
25
+ button?: string;
26
+ /** Small buttons, tags (default: "0.375rem" / 6px) */
27
+ small?: string;
28
+ /** Pills, avatars, circular elements (default: "9999px") */
29
+ full?: string;
30
+ }
31
+
13
32
  /**
14
33
  * Chain information for connected wallet
15
34
  */
@@ -194,7 +213,9 @@ declare type OnRequestWallet = (networkId?: string) => void;
194
213
 
195
214
  export declare interface PartialThemeConfig {
196
215
  colors?: Partial<ThemeColors>;
197
- borderRadius?: "none" | "sm" | "md" | "lg" | "full";
216
+ borderRadius?: Partial<BorderRadiusConfig>;
217
+ /** Custom background for main container (CSS value, e.g., "linear-gradient(...)" or "#1a1a1a") */
218
+ containerBg?: string;
198
219
  fontFamily?: string;
199
220
  }
200
221
 
@@ -245,7 +266,7 @@ export declare interface SwapErrorCallbackData {
245
266
  * Does NOT include Reown/Wagmi dependencies
246
267
  * Partner must provide their own wallet client
247
268
  */
248
- export declare function SwapWidget({ apiBaseUrl, walletClient, onRequestWallet, theme, defaultFromToken, defaultToToken, affiliateFee, affiliateAddress, affiliateProvider, tradeTimeout, scriptTimeout, defaultSlippage, hideHistory, children, renderLoading, renderError, queryClient: externalQueryClient, onQuote, onWalletTx, onSubmitTx, onSwapComplete, onError, }: SwapWidgetProps): JSX.Element;
269
+ export declare function SwapWidget({ apiBaseUrl, walletClient, onRequestWallet, theme, defaultFromToken, defaultToToken, headerLeft, affiliateFee, affiliateAddress, affiliateProvider, tradeTimeout, scriptTimeout, defaultSlippage, hideHistory, children, renderLoading, renderError, queryClient: externalQueryClient, onQuote, onWalletTx, onSubmitTx, onSwapComplete, onError, }: SwapWidgetProps): JSX.Element;
249
270
 
250
271
  /**
251
272
  * Base props shared between full and lite widget
@@ -260,6 +281,8 @@ declare interface SwapWidgetBaseProps {
260
281
  theme?: PartialThemeConfig;
261
282
  defaultFromToken?: string;
262
283
  defaultToToken?: string;
284
+ /** Custom header left content - replaces default Optimex logo and title */
285
+ headerLeft?: React.ReactNode;
263
286
  affiliateFee?: number;
264
287
  affiliateAddress?: string;
265
288
  affiliateProvider?: string;
@@ -298,7 +321,9 @@ export declare interface ThemeColors {
298
321
 
299
322
  export declare interface ThemeConfig {
300
323
  colors: ThemeColors;
301
- borderRadius: "none" | "sm" | "md" | "lg" | "full";
324
+ borderRadius: BorderRadiusConfig;
325
+ /** Custom background for main container (CSS value, e.g., "linear-gradient(...)" or "#1a1a1a") */
326
+ containerBg?: string;
302
327
  fontFamily?: string;
303
328
  }
304
329