@spicenet-io/spiceflow-ui 3.2.1 → 3.2.3

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.
Files changed (96) hide show
  1. package/README.md +7 -7
  2. package/dist/Button-B1aDv3aK.js +2 -0
  3. package/dist/Button-Hm-OAnzQ.js +2 -0
  4. package/dist/auth-dynamic.cjs.js +1 -1
  5. package/dist/auth-dynamic.js +1 -1
  6. package/dist/auth-privy.cjs.js +1 -1
  7. package/dist/auth-privy.js +1 -1
  8. package/dist/components/AssetSelector/AssetDropdown.d.ts +1 -12
  9. package/dist/components/AssetSelector/ChainIcon.d.ts +1 -7
  10. package/dist/components/AssetSelector/TokenIcon.d.ts +1 -7
  11. package/dist/components/AssetSelector/index.d.ts +1 -3
  12. package/dist/components/ExportWallet/ExportWalletButton.d.ts +2 -7
  13. package/dist/components/ProviderLogins/DynamicLogin.d.ts +2 -8
  14. package/dist/components/ProviderLogins/PrivyLogin.d.ts +2 -8
  15. package/dist/components/ProviderLogins/ProviderLogin.d.ts +2 -8
  16. package/dist/components/SpiceDeposit/DepositRecoveryPrompt.d.ts +1 -14
  17. package/dist/components/SpiceDeposit/DepositStatusModal.d.ts +4 -37
  18. package/dist/components/SpiceDeposit/SelectTokenModal.d.ts +1 -16
  19. package/dist/components/SpiceDeposit/SpiceDeposit.d.ts +2 -35
  20. package/dist/components/SpiceLockModal/LockSubComponents.d.ts +2 -45
  21. package/dist/components/SpicePay/SpicePay.d.ts +2 -29
  22. package/dist/components/SpiceSupply/SupplyEstimate.d.ts +2 -13
  23. package/dist/components/SpiceWithdraw/SelectPopover.d.ts +2 -7
  24. package/dist/components/SpiceWithdraw/SpiceWithdraw.d.ts +2 -26
  25. package/dist/components/StatusDisplay/StatusIcon.d.ts +1 -7
  26. package/dist/components/StatusDisplay/StatusPanel.d.ts +2 -31
  27. package/dist/components/StatusDisplay/StepItem.d.ts +1 -8
  28. package/dist/components/StatusDisplay/index.d.ts +1 -2
  29. package/dist/components/index.d.ts +0 -2
  30. package/dist/components/ui/AddFundsLink.d.ts +3 -0
  31. package/dist/components/ui/Button.d.ts +1 -11
  32. package/dist/components/ui/CloseIcon.d.ts +1 -6
  33. package/dist/components/ui/DetailRow.d.ts +3 -0
  34. package/dist/components/ui/FeeBreakdownCard.d.ts +2 -11
  35. package/dist/components/ui/Input.d.ts +1 -10
  36. package/dist/components/ui/Modal.d.ts +1 -10
  37. package/dist/components/ui/SearchInput.d.ts +15 -0
  38. package/dist/components/ui/SpiceModalShell.d.ts +1 -17
  39. package/dist/components/ui/Spinner.d.ts +1 -6
  40. package/dist/components/ui/StatusBanner.d.ts +1 -10
  41. package/dist/components/ui/icons.d.ts +13 -0
  42. package/dist/components/ui/index.d.ts +7 -8
  43. package/dist/index.cjs.js +29 -40
  44. package/dist/index.d.ts +12 -12
  45. package/dist/index.js +31 -42
  46. package/dist/providerWallet-Ca-gOLIW.js +2 -0
  47. package/dist/providerWallet-uz6t-bDC.js +2 -0
  48. package/dist/providers/custom.css +1 -1
  49. package/dist/types/assets.d.ts +22 -0
  50. package/dist/types/authorization.d.ts +5 -2
  51. package/dist/types/deposit.d.ts +94 -27
  52. package/dist/types/index.d.ts +2 -0
  53. package/dist/types/lock.d.ts +44 -0
  54. package/dist/types/pay.d.ts +30 -0
  55. package/dist/types/status.d.ts +41 -1
  56. package/dist/types/supply.d.ts +15 -1
  57. package/dist/types/ui.d.ts +95 -0
  58. package/dist/types/wallet.d.ts +31 -0
  59. package/dist/types/withdraw.d.ts +30 -0
  60. package/dist/utils/abis/spicenet.d.ts +66 -0
  61. package/dist/utils/loadFonts.d.ts +1 -0
  62. package/dist/utils/rebalancing/index.d.ts +70 -0
  63. package/dist/utils/relayer/index.d.ts +5 -20
  64. package/dist/utils/tokenResolution.d.ts +1 -1
  65. package/dist/utils/tokens.d.ts +43 -0
  66. package/package.json +46 -63
  67. package/dist/Button-D5zwqrrP.js +0 -2
  68. package/dist/Button-KtHGKIo6.js +0 -2
  69. package/dist/auth-starknet.cjs.js +0 -2
  70. package/dist/auth-starknet.d.ts +0 -6
  71. package/dist/auth-starknet.js +0 -2
  72. package/dist/components/Airdrop/Airdrop.d.ts +0 -28
  73. package/dist/components/Airdrop/index.d.ts +0 -2
  74. package/dist/components/DepositWidget/AssetInput.d.ts +0 -23
  75. package/dist/components/DepositWidget/CrossChainDepositModal.d.ts +0 -42
  76. package/dist/components/DepositWidget/DepositWidget.d.ts +0 -3
  77. package/dist/components/DepositWidget/DepositWidgetModal.d.ts +0 -11
  78. package/dist/components/DepositWidget/index.d.ts +0 -8
  79. package/dist/components/LpModal/AmountCard.d.ts +0 -11
  80. package/dist/components/LpModal/CompactAssetSelector.d.ts +0 -11
  81. package/dist/components/LpModal/LpModal.d.ts +0 -3
  82. package/dist/components/LpModal/PairInfoCard.d.ts +0 -14
  83. package/dist/components/LpModal/ProgressIndicators.d.ts +0 -4
  84. package/dist/components/LpModal/index.d.ts +0 -1
  85. package/dist/components/StarknetWallet/StarknetWalletButton.d.ts +0 -9
  86. package/dist/components/StarknetWallet/index.d.ts +0 -2
  87. package/dist/components/ui/Toast.d.ts +0 -10
  88. package/dist/hooks/useStarknetWallet.d.ts +0 -13
  89. package/dist/index-DJQ17ocQ.js +0 -2
  90. package/dist/index-WLbJouQ7.js +0 -2
  91. package/dist/providerWallet-DeNDXTJA.js +0 -2
  92. package/dist/providerWallet-DrwSLBof.js +0 -2
  93. package/dist/providers/StarknetWalletProvider.d.ts +0 -8
  94. package/dist/types/lp.d.ts +0 -43
  95. package/dist/useSpiceBrand-BBtUTOno.js +0 -2
  96. package/dist/useSpiceBrand-D-06ludX.js +0 -2
@@ -1,29 +1,5 @@
1
1
  import React from "react";
2
- import { Address } from "viem";
3
- import { CustomStyles } from "../../types/theme";
4
- import { ChainBatch } from "../../types/authorization";
5
- import { DestinationToken } from "../../types/withdraw";
6
- export interface SpiceWithdrawProps {
7
- isOpen: boolean;
8
- onClose: () => void;
9
- styles?: CustomStyles;
10
- onWithdrawExecute?: (withdrawnAmount: string) => Promise<void> | void;
11
- withdrawActionLabel?: string;
12
- onWithdrawSuccess?: (data: {
13
- token: string;
14
- amount: string;
15
- chainId: number;
16
- }) => void;
17
- onWithdrawError?: (error: string) => void;
18
- autoCloseDelay?: number;
19
- supportedChains?: number[];
20
- availableTokens?: Record<number, DestinationToken[]>;
21
- buildSpicenetBatch?: (params: {
22
- destinationChainId: number;
23
- deliveryToken: Address;
24
- deliveryAmount: bigint;
25
- deliveryRecipient: Address;
26
- }) => ChainBatch | null;
27
- }
2
+ import type { SpiceWithdrawProps } from "../../types/withdraw";
3
+ export type { SpiceWithdrawProps };
28
4
  export declare const SpiceWithdrawFlow: React.FC<SpiceWithdrawProps>;
29
5
  export declare const SpiceWithdraw: React.FC<SpiceWithdrawProps>;
@@ -1,9 +1,3 @@
1
1
  import React from "react";
2
- import { Theme } from "../../types/theme";
3
- import { StepStatus, OverallStatus } from "../../types/status";
4
- export interface StatusIconProps {
5
- status: StepStatus | OverallStatus;
6
- size?: number;
7
- theme?: Theme;
8
- }
2
+ import type { StatusIconProps } from "../../types/status";
9
3
  export declare const StatusIcon: React.FC<StatusIconProps>;
@@ -1,33 +1,4 @@
1
1
  import React from "react";
2
- import { Theme, CustomStyles } from "../../types/theme";
3
- import { IntentStatus } from "../../types/status";
4
- export interface StatusResultItem {
5
- asset: {
6
- symbol: string;
7
- address: string;
8
- };
9
- txHash: string;
10
- success: boolean;
11
- error?: string;
12
- amount?: string;
13
- }
14
- export interface StatusPanelProps {
15
- isOpen?: boolean;
16
- onClose: () => void;
17
- onComplete?: () => void;
18
- closeOnComplete?: boolean;
19
- type: "deposit" | "withdraw" | "payment";
20
- results?: StatusResultItem[];
21
- chainName?: string;
22
- explorerUrl?: string;
23
- theme?: Theme;
24
- styles?: CustomStyles;
25
- dark?: boolean;
26
- intentStatus?: IntentStatus | null;
27
- onRetry?: () => void;
28
- onNewTx?: () => void;
29
- onRetryTx?: () => void;
30
- asOverlay?: boolean;
31
- isProcessing?: boolean;
32
- }
2
+ import type { StatusResultItem, StatusPanelProps } from "../../types/status";
3
+ export type { StatusResultItem, StatusPanelProps };
33
4
  export declare const StatusPanel: React.FC<StatusPanelProps>;
@@ -1,10 +1,3 @@
1
1
  import React from "react";
2
- import { Theme } from "../../types/theme";
3
- import { SwapStep } from "../../types/status";
4
- export interface StepItemProps {
5
- step: SwapStep;
6
- explorerUrlBuilder?: (chainId: number, txHash: string) => string;
7
- animationDelay?: number;
8
- theme?: Theme;
9
- }
2
+ import type { StepItemProps } from "../../types/status";
10
3
  export declare const StepItem: React.FC<StepItemProps>;
@@ -1,5 +1,4 @@
1
1
  export { StatusDisplay } from "./StatusDisplay";
2
2
  export { StatusIcon } from "./StatusIcon";
3
3
  export { StepItem } from "./StepItem";
4
- export type { StatusIconProps } from "./StatusIcon";
5
- export type { StepItemProps } from "./StepItem";
4
+ export type { StatusIconProps, StepItemProps } from "../../types/status";
@@ -4,5 +4,3 @@ export * from "./ProviderLogins";
4
4
  export * from "./SpiceBalance";
5
5
  export * from "./SpiceWithdraw";
6
6
  export * from "./ui";
7
- export * from "./LpModal";
8
- export * from "./DepositWidget";
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { AddFundsLinkProps } from "../../types/ui";
3
+ export declare const AddFundsLink: React.FC<AddFundsLinkProps>;
@@ -1,13 +1,3 @@
1
1
  import React from "react";
2
- import { Theme, CustomStyles } from "../../types/theme";
3
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
- variant?: "primary" | "secondary" | "success" | "error" | "ghost" | "outline";
5
- size?: "sm" | "md" | "lg";
6
- loading?: boolean;
7
- fullWidth?: boolean;
8
- children: React.ReactNode;
9
- theme?: Theme;
10
- styles?: CustomStyles;
11
- dark?: boolean;
12
- }
2
+ import type { ButtonProps } from "../../types/ui";
13
3
  export declare const Button: React.FC<ButtonProps>;
@@ -1,8 +1,3 @@
1
1
  import React from "react";
2
- export interface CloseIconProps {
3
- size?: number;
4
- strokeWidth?: number;
5
- color?: string;
6
- style?: React.CSSProperties;
7
- }
2
+ import type { CloseIconProps } from "../../types/ui";
8
3
  export declare const CloseIcon: React.FC<CloseIconProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { DetailRowProps } from "../../types/ui";
3
+ export declare const DetailRow: React.FC<DetailRowProps>;
@@ -1,14 +1,6 @@
1
1
  import React from "react";
2
- export type FeePreview = {
3
- symbol: string;
4
- decimals: number;
5
- grossAmount: bigint;
6
- netAmount: bigint;
7
- totalFee?: bigint;
8
- gasFee: bigint;
9
- spicenetFee: bigint;
10
- gasQuoteSource: "estimated" | "configured_fallback" | "static_zero";
11
- };
2
+ import type { FeePreview } from "../../types/ui";
3
+ export type { FeePreview };
12
4
  type FeeBreakdownCardProps = {
13
5
  fontFamily: string;
14
6
  textPrimary: string;
@@ -24,4 +16,3 @@ type FeeBreakdownCardProps = {
24
16
  directExecutionFeeNote?: boolean;
25
17
  };
26
18
  export declare const FeeBreakdownCard: React.FC<FeeBreakdownCardProps>;
27
- export {};
@@ -1,12 +1,3 @@
1
1
  import React from "react";
2
- import { Theme } from "../../types/theme";
3
- export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
- label?: string;
5
- error?: string;
6
- helper?: string;
7
- fullWidth?: boolean;
8
- startAdornment?: React.ReactNode;
9
- endAdornment?: React.ReactNode;
10
- theme?: Theme;
11
- }
2
+ import type { InputProps } from "../../types/ui";
12
3
  export declare const Input: React.FC<InputProps>;
@@ -1,12 +1,3 @@
1
1
  import React from "react";
2
- import { Theme } from "../../types/theme";
3
- export interface ModalProps {
4
- isOpen: boolean;
5
- onClose: () => void;
6
- title?: string;
7
- children: React.ReactNode;
8
- maxWidth?: string;
9
- className?: string;
10
- theme?: Theme;
11
- }
2
+ import type { ModalProps } from "../../types/ui";
12
3
  export declare const Modal: React.FC<ModalProps>;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import type { CustomStyles } from "../../types/theme";
3
+ export interface SearchInputProps {
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ ariaLabel: string;
7
+ placeholder?: string;
8
+ endAdornment?: React.ReactNode;
9
+ size?: "md" | "lg";
10
+ dark?: boolean;
11
+ styles?: CustomStyles;
12
+ inputRef?: React.Ref<HTMLInputElement>;
13
+ autoFocus?: boolean;
14
+ }
15
+ export declare const SearchInput: React.FC<SearchInputProps>;
@@ -1,19 +1,3 @@
1
1
  import React from "react";
2
- import { Theme, CustomStyles } from "../../types/theme";
3
- export interface SpiceModalShellProps {
4
- isOpen: boolean;
5
- onClose: () => void;
6
- title: string;
7
- subtitle?: React.ReactNode;
8
- children: React.ReactNode;
9
- overlayContent?: React.ReactNode;
10
- overlayDimmed?: boolean;
11
- styles?: CustomStyles;
12
- theme?: Theme;
13
- maxWidth?: string;
14
- dark?: boolean;
15
- footerLinkText?: string;
16
- bannerSrc?: string;
17
- bannerAlt?: string;
18
- }
2
+ import type { SpiceModalShellProps } from "../../types/ui";
19
3
  export declare const SpiceModalShell: React.FC<SpiceModalShellProps>;
@@ -1,8 +1,3 @@
1
1
  import React from "react";
2
- export interface SpinnerProps {
3
- size?: number;
4
- borderWidth?: number;
5
- color?: string;
6
- style?: React.CSSProperties;
7
- }
2
+ import type { SpinnerProps } from "../../types/ui";
8
3
  export declare const Spinner: React.FC<SpinnerProps>;
@@ -1,12 +1,3 @@
1
1
  import React from "react";
2
- import type { ResolvedDarkPalette } from "../../utils/resolveTheme";
3
- export type StatusVariant = "success" | "warning" | "error" | "info";
4
- export interface StatusBannerProps {
5
- variant: StatusVariant;
6
- palette: ResolvedDarkPalette;
7
- children: React.ReactNode;
8
- icon?: React.ReactNode;
9
- style?: React.CSSProperties;
10
- fontFamily?: string;
11
- }
2
+ import type { StatusBannerProps } from "../../types/ui";
12
3
  export declare const StatusBanner: React.FC<StatusBannerProps>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export interface IconProps {
3
+ size?: number;
4
+ color?: string;
5
+ strokeWidth?: number;
6
+ style?: React.CSSProperties;
7
+ className?: string;
8
+ "aria-hidden"?: boolean;
9
+ }
10
+ export declare const ChevronIcon: React.FC<IconProps & {
11
+ direction?: "down" | "up";
12
+ }>;
13
+ export declare const CheckIcon: React.FC<IconProps>;
@@ -2,13 +2,12 @@ export { Button } from "./Button";
2
2
  export { Input } from "./Input";
3
3
  export { Modal } from "./Modal";
4
4
  export { Spinner } from "./Spinner";
5
- export { Toast } from "./Toast";
6
5
  export { StatusBanner } from "./StatusBanner";
6
+ export { DetailRow } from "./DetailRow";
7
+ export { AddFundsLink } from "./AddFundsLink";
7
8
  export { CloseIcon } from "./CloseIcon";
8
- export type { ButtonProps } from "./Button";
9
- export type { InputProps } from "./Input";
10
- export type { ModalProps } from "./Modal";
11
- export type { SpinnerProps } from "./Spinner";
12
- export type { ToastProps } from "./Toast";
13
- export type { StatusBannerProps, StatusVariant } from "./StatusBanner";
14
- export type { CloseIconProps } from "./CloseIcon";
9
+ export { SearchInput } from "./SearchInput";
10
+ export type { SearchInputProps } from "./SearchInput";
11
+ export { ChevronIcon, CheckIcon } from "./icons";
12
+ export type { IconProps } from "./icons";
13
+ export type { ButtonProps, InputProps, ModalProps, SpinnerProps, StatusBannerProps, StatusBannerSize, StatusVariant, CloseIconProps, DetailRowProps, AddFundsLinkProps, } from "../../types/ui";