@use-glyph/sdk-react 1.1.3 → 1.1.5

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 (38) hide show
  1. package/dist/glyph-widget.es.js +19218 -30
  2. package/dist/glyph-widget.es.js.map +1 -0
  3. package/dist/glyph-widget.umd.js +44 -43
  4. package/dist/glyph-widget.umd.js.map +1 -0
  5. package/dist/types/components/GlyphWidget.d.ts +1 -2
  6. package/dist/types/components/GlyphWidgetButton.d.ts +1 -2
  7. package/dist/types/components/LoginButton.d.ts +1 -2
  8. package/dist/types/components/LogoutButton.d.ts +1 -2
  9. package/dist/types/components/NativeGlyphConnectButton.d.ts +1 -2
  10. package/dist/types/components/SignUpButton.d.ts +1 -2
  11. package/dist/types/components/shared/CopyButton.d.ts +1 -2
  12. package/dist/types/components/shared/UserAvatar.d.ts +1 -2
  13. package/dist/types/components/shared/WalletViewFooterNav.d.ts +1 -2
  14. package/dist/types/components/shared/WalletViewHeader.d.ts +1 -2
  15. package/dist/types/components/ui/accordion.d.ts +4 -5
  16. package/dist/types/components/ui/button.d.ts +3 -3
  17. package/dist/types/components/ui/drawer.d.ts +17 -24
  18. package/dist/types/components/ui/input.d.ts +5 -5
  19. package/dist/types/components/ui/popover.d.ts +3 -4
  20. package/dist/types/components/ui/tooltip-element.d.ts +2 -2
  21. package/dist/types/components/ui/tooltip.d.ts +6 -7
  22. package/dist/types/components/widget/WalletFundFailedView.d.ts +1 -2
  23. package/dist/types/components/widget/WalletFundPendingView.d.ts +1 -2
  24. package/dist/types/components/widget/WalletFundSuccessView.d.ts +1 -2
  25. package/dist/types/components/widget/WalletSendFundEnterAddressView.d.ts +1 -2
  26. package/dist/types/components/widget/WalletSendFundFailedView.d.ts +1 -2
  27. package/dist/types/components/widget/WalletSendFundPendingView.d.ts +1 -2
  28. package/dist/types/components/widget/WalletSendFundSuccessView.d.ts +1 -2
  29. package/dist/types/context/GlyphProvider.d.ts +1 -2
  30. package/dist/types/context/strategies/LoadingStrategy.d.ts +2 -3
  31. package/dist/types/index.d.ts +4 -4
  32. package/dist/types/lib/eip1193/GlyphWalletProvider.d.ts +0 -1
  33. package/dist/types/lib/privy/GlyphPrivyProvider.d.ts +3 -3
  34. package/dist/types/lib/privy/InjectWagmiConnector.d.ts +0 -1
  35. package/package.json +3 -3
  36. package/dist/EIP1193Strategy.js +0 -148
  37. package/dist/PrivyStrategy.js +0 -108
  38. package/dist/index.js +0 -19490
@@ -1,3 +1,2 @@
1
1
  import { GlyphWidgetProps } from '../types';
2
- declare const _default: import('react').NamedExoticComponent<GlyphWidgetProps>;
3
- export default _default;
2
+ export declare const GlyphWidget: ({ buttonProps }: GlyphWidgetProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { GlyphWidgetButtonProps } from '../types';
2
- declare const _default: import('react').NamedExoticComponent<GlyphWidgetButtonProps>;
3
- export default _default;
2
+ export declare const GlyphWidgetButton: ({ showAvatar, showBalance, showUsername }: GlyphWidgetButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- declare const _default: import('react').NamedExoticComponent<{}>;
2
- export default _default;
1
+ export declare const LoginButton: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- declare const _default: import('react').NamedExoticComponent<{}>;
2
- export default _default;
1
+ export declare const LogoutButton: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- import { FC } from 'react';
2
- export declare const NativeGlyphConnectButton: FC;
1
+ export declare const NativeGlyphConnectButton: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
- declare const _default: import('react').NamedExoticComponent<{}>;
2
- export default _default;
1
+ export declare const SignUpButton: () => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  interface CopyButtonProps {
3
2
  text: string;
4
3
  textToCopy?: string;
@@ -6,5 +5,5 @@ interface CopyButtonProps {
6
5
  textClassName?: string;
7
6
  iconClassName?: string;
8
7
  }
9
- declare const _default: React.NamedExoticComponent<CopyButtonProps>;
8
+ declare const _default: import('react').MemoExoticComponent<({ text, textToCopy, className, textClassName, iconClassName }: CopyButtonProps) => import("react/jsx-runtime").JSX.Element>;
10
9
  export default _default;
@@ -1,8 +1,7 @@
1
- import { default as React } from 'react';
2
1
  interface UserAvatarProps {
3
2
  className?: string;
4
3
  overrideUrl?: string;
5
4
  overrideAlt?: string;
6
5
  }
7
- declare const _default: React.NamedExoticComponent<UserAvatarProps>;
6
+ declare const _default: import('react').NamedExoticComponent<UserAvatarProps>;
8
7
  export default _default;
@@ -1,8 +1,7 @@
1
- import { default as React } from 'react';
2
1
  import { WalletMainViewTab } from '../../lib/constants';
3
2
  interface WalletViewFooterNavProps {
4
3
  tab: WalletMainViewTab;
5
4
  setTab: (tab: WalletMainViewTab) => void;
6
5
  }
7
- declare const _default: React.NamedExoticComponent<WalletViewFooterNavProps>;
6
+ declare const _default: import('react').NamedExoticComponent<WalletViewFooterNavProps>;
8
7
  export default _default;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  interface WalletViewHeaderProps {
3
2
  fullScreenHeader?: {
4
3
  title?: string;
@@ -7,5 +6,5 @@ interface WalletViewHeaderProps {
7
6
  };
8
7
  onProfileClick?: () => void;
9
8
  }
10
- declare const _default: React.NamedExoticComponent<WalletViewHeaderProps>;
9
+ declare const _default: import('react').MemoExoticComponent<({ fullScreenHeader, onProfileClick }: WalletViewHeaderProps) => import("react/jsx-runtime").JSX.Element>;
11
10
  export default _default;
@@ -1,7 +1,6 @@
1
1
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
2
- import * as React from "react";
3
- declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
- declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
- declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
- declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
2
+ declare const Accordion: import('react').ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & import('react').RefAttributes<HTMLDivElement>>;
3
+ declare const AccordionItem: import('react').ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
4
+ declare const AccordionTrigger: import('react').ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
5
+ declare const AccordionContent: import('react').ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
7
6
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -1,15 +1,15 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import * as React from "react";
2
+ import { ButtonHTMLAttributes } from 'react';
3
3
  declare const buttonVariantsClasses: (props?: ({
4
4
  variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "tertiary" | "ghost" | "link-inline" | "cube" | null | undefined;
5
5
  size?: "icon" | "default" | "login" | "cube" | "xs" | "xs-inline" | "sm" | "lg" | null | undefined;
6
6
  shadow?: boolean | null | undefined;
7
7
  scale?: boolean | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariantsClasses> {
9
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariantsClasses> {
10
10
  asChild?: boolean;
11
11
  shadow?: boolean;
12
12
  scale?: boolean;
13
13
  }
14
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
14
+ declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
15
15
  export { Button, buttonVariantsClasses as buttonVariants };
@@ -1,27 +1,20 @@
1
+ import { ComponentProps, FC, HTMLAttributes } from 'react';
1
2
  import { Drawer as DrawerPrimitive } from 'vaul';
2
- import * as React from "react";
3
- declare const Drawer: {
4
- ({ shouldScaleBackground, repositionInputs, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
- displayName: string;
6
- };
7
- declare const DrawerTrigger: React.ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
8
- declare const DrawerPortal: typeof import('vaul').Portal;
9
- declare const DrawerClose: React.ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
10
- declare const DrawerHandle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ declare const Drawer: ({ shouldScaleBackground, repositionInputs, ...props }: ComponentProps<typeof DrawerPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const DrawerTrigger: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
5
+ declare const DrawerPortal: FC<{
6
+ children: React.ReactNode;
7
+ }>;
8
+ declare const DrawerClose: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
9
+ declare const DrawerHandle: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
10
  preventCycle?: boolean | undefined;
12
- } & React.RefAttributes<HTMLDivElement>>;
13
- declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
- declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
11
+ } & import('react').RefAttributes<HTMLDivElement>>;
12
+ declare const DrawerOverlay: import('react').ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogOverlayProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
13
+ declare const DrawerContent: import('react').ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
15
14
  childrenWrapperClassName?: string;
16
- } & React.RefAttributes<HTMLDivElement>>;
17
- declare const DrawerHeader: {
18
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
19
- displayName: string;
20
- };
21
- declare const DrawerFooter: {
22
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
23
- displayName: string;
24
- };
25
- declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
26
- declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
27
- export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DrawerHandle };
15
+ } & import('react').RefAttributes<HTMLDivElement>>;
16
+ declare const DrawerHeader: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
17
+ declare const DrawerFooter: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
18
+ declare const DrawerTitle: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogTitleProps & import('react').RefAttributes<HTMLHeadingElement>, "ref"> & import('react').RefAttributes<HTMLHeadingElement>>;
19
+ declare const DrawerDescription: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>, "ref"> & import('react').RefAttributes<HTMLParagraphElement>>;
20
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
3
3
  label?: {
4
4
  value: string;
5
5
  htmlFor: string;
@@ -7,11 +7,11 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
7
7
  floatingLabel?: boolean;
8
8
  };
9
9
  leadingIcon?: {
10
- element: React.ReactNode;
10
+ element: ReactNode;
11
11
  className?: string;
12
12
  };
13
13
  trailingIcon?: {
14
- element: React.ReactNode;
14
+ element: ReactNode;
15
15
  className?: string;
16
16
  };
17
17
  parentClassName?: string;
@@ -22,5 +22,5 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
22
22
  className?: string;
23
23
  };
24
24
  }
25
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
25
+ declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
26
26
  export { Input };
@@ -1,6 +1,5 @@
1
1
  import * as PopoverPrimitive from "@radix-ui/react-popover";
2
- import * as React from "react";
3
- declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
- declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
2
+ declare const Popover: import('react').FC<PopoverPrimitive.PopoverProps>;
3
+ declare const PopoverTrigger: import('react').ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
4
+ declare const PopoverContent: import('react').ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
6
5
  export { Popover, PopoverContent, PopoverTrigger };
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { ReactElement } from 'react';
2
2
  declare function TooltipElement({ contentClassName, triggerClassName, description, children, side, align, defaultOpen, open, onOpenChange, stopPropagation }: {
3
3
  contentClassName?: string;
4
4
  triggerClassName?: string;
@@ -10,5 +10,5 @@ declare function TooltipElement({ contentClassName, triggerClassName, descriptio
10
10
  defaultOpen?: boolean;
11
11
  open?: boolean | null;
12
12
  onOpenChange?: ((open: boolean) => void) | undefined;
13
- }): React.ReactElement;
13
+ }): ReactElement;
14
14
  export default TooltipElement;
@@ -1,8 +1,7 @@
1
1
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
2
- import * as React from "react";
3
- declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
4
- declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
5
- declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
- declare const TooltipArrow: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipArrowProps & React.RefAttributes<SVGSVGElement>>;
7
- declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TooltipArrow };
2
+ declare const TooltipProvider: import('react').FC<TooltipPrimitive.TooltipProviderProps>;
3
+ declare const Tooltip: import('react').FC<TooltipPrimitive.TooltipProps>;
4
+ declare const TooltipTrigger: import('react').ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
5
+ declare const TooltipArrow: import('react').ForwardRefExoticComponent<TooltipPrimitive.TooltipArrowProps & import('react').RefAttributes<SVGSVGElement>>;
6
+ declare const TooltipContent: import('react').ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
7
+ export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -1,8 +1,7 @@
1
- import { default as React } from 'react';
2
1
  interface WalletFundFailedViewProps {
3
2
  onEnd: () => void;
4
3
  onShowActivity: () => void;
5
4
  id: string;
6
5
  }
7
- declare const _default: React.NamedExoticComponent<WalletFundFailedViewProps>;
6
+ declare const _default: import('react').NamedExoticComponent<WalletFundFailedViewProps>;
8
7
  export default _default;
@@ -1,8 +1,7 @@
1
- import { default as React } from 'react';
2
1
  interface WalletFundPendingViewProps {
3
2
  onBack: () => void;
4
3
  id: string;
5
4
  value: number;
6
5
  }
7
- declare const _default: React.NamedExoticComponent<WalletFundPendingViewProps>;
6
+ declare const _default: import('react').NamedExoticComponent<WalletFundPendingViewProps>;
8
7
  export default _default;
@@ -1,8 +1,7 @@
1
- import { default as React } from 'react';
2
1
  interface WalletFundSuccessViewProps {
3
2
  onEnd: () => void;
4
3
  onShowActivity: () => void;
5
4
  value: number;
6
5
  }
7
- declare const _default: React.NamedExoticComponent<WalletFundSuccessViewProps>;
6
+ declare const _default: import('react').NamedExoticComponent<WalletFundSuccessViewProps>;
8
7
  export default _default;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { SendView } from '../../lib/constants';
3
2
  interface WalletSendFundEnterAddressViewProps {
4
3
  onBack: () => void;
@@ -8,5 +7,5 @@ interface WalletSendFundEnterAddressViewProps {
8
7
  recipientAddress: string;
9
8
  recipientAddressError: string | null;
10
9
  }
11
- declare const _default: React.NamedExoticComponent<WalletSendFundEnterAddressViewProps>;
10
+ declare const _default: import('react').MemoExoticComponent<({ onBack, setView, setRecipientAddress, setRecipientAddressError, recipientAddress, recipientAddressError }: WalletSendFundEnterAddressViewProps) => import("react/jsx-runtime").JSX.Element>;
12
11
  export default _default;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  interface WalletSendFundFailedViewProps {
3
2
  onEnd: () => void;
4
3
  onShowActivity: () => void;
@@ -6,5 +5,5 @@ interface WalletSendFundFailedViewProps {
6
5
  txBlockExplorerUrl: string | undefined;
7
6
  txBlockExplorerName: string | undefined;
8
7
  }
9
- declare const _default: React.NamedExoticComponent<WalletSendFundFailedViewProps>;
8
+ declare const _default: import('react').NamedExoticComponent<WalletSendFundFailedViewProps>;
10
9
  export default _default;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { SendFundQuote } from './WalletSendFundView';
3
2
  interface WalletSendFundPendingViewProps {
4
3
  onBack: () => void;
@@ -9,5 +8,5 @@ interface WalletSendFundPendingViewProps {
9
8
  tokenSymbol: string;
10
9
  TokenIcon: React.FC<React.SVGProps<SVGSVGElement>>;
11
10
  }
12
- declare const _default: React.NamedExoticComponent<WalletSendFundPendingViewProps>;
11
+ declare const _default: import('react').NamedExoticComponent<WalletSendFundPendingViewProps>;
13
12
  export default _default;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  import { SendFundQuote } from './WalletSendFundView';
3
2
  interface WalletSendFundSuccessViewProps {
4
3
  onEnd: () => void;
@@ -6,5 +5,5 @@ interface WalletSendFundSuccessViewProps {
6
5
  quote: SendFundQuote;
7
6
  tokenSymbol: string;
8
7
  }
9
- declare const _default: React.NamedExoticComponent<WalletSendFundSuccessViewProps>;
8
+ declare const _default: import('react').NamedExoticComponent<WalletSendFundSuccessViewProps>;
10
9
  export default _default;
@@ -1,8 +1,7 @@
1
- import { FC } from 'react';
2
1
  import { GlyphProviderOptions } from '../types';
3
2
  /**
4
3
  * A react provider that provides the GlyphContext to its children.
5
4
  *
6
5
  * See more at: {@link https://docs.useglyph.io/reference/components/GlyphProvider/}
7
6
  */
8
- export declare const GlyphProvider: FC<GlyphProviderOptions>;
7
+ export declare const GlyphProvider: ({ children, strategy, glyphUrl, useStagingTenant, ...props }: GlyphProviderOptions) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- import { default as React, FC } from 'react';
2
- declare const LoadingStrategy: FC<{
1
+ declare const LoadingStrategy: ({ children }: {
3
2
  children: React.ReactNode;
4
- }>;
3
+ }) => import("react/jsx-runtime").JSX.Element;
5
4
  export default LoadingStrategy;
@@ -1,7 +1,7 @@
1
- import { default as GlyphWidget } from './components/GlyphWidget';
2
- import { default as LoginButton } from './components/LoginButton';
3
- import { default as LogoutButton } from './components/LogoutButton';
4
- import { default as SignUpButton } from './components/SignUpButton';
1
+ import { GlyphWidget } from './components/GlyphWidget';
2
+ import { LoginButton } from './components/LoginButton';
3
+ import { LogoutButton } from './components/LogoutButton';
4
+ import { SignUpButton } from './components/SignUpButton';
5
5
  import { GlyphProvider } from './context/GlyphProvider';
6
6
  export { useBalances } from './hooks/useBalances';
7
7
  export { useGlyph } from './hooks/useGlyph';
@@ -1,5 +1,4 @@
1
1
  import { QueryClient } from '@tanstack/react-query';
2
- import { default as React } from 'react';
3
2
  import { Chain, Transport } from 'viem';
4
3
  import { BaseGlyphProviderOptionsWithSignature } from '../../types';
5
4
  /**
@@ -1,7 +1,6 @@
1
1
  import { LoginMethodOrderOption, PrivyProviderProps } from '@privy-io/react-auth';
2
2
  import { QueryClient } from '@tanstack/react-query';
3
3
  import { Chain, Transport } from 'viem';
4
- import { default as React } from 'react';
5
4
  import { BaseGlyphProviderOptions } from '../../types/GlyphWidgetTypes.js';
6
5
  export declare const GLYPH_APP_LOGIN_METHOD: LoginMethodOrderOption;
7
6
  export declare const STAGING_GLYPH_APP_LOGIN_METHOD: LoginMethodOrderOption;
@@ -16,13 +15,14 @@ export declare const STAGING_GLYPH_APP_LOGIN_METHOD: LoginMethodOrderOption;
16
15
  * @property {Function} onLogin - Optional onLogin function to use, defaults to a noop.
17
16
  * @property {Function} onLogout - Optional onLogout function to use, defaults to a noop.
18
17
  */
19
- interface GlyphPrivyProviderProps extends PrivyProviderProps, BaseGlyphProviderOptions {
18
+ interface GlyphPrivyProviderProps extends Omit<PrivyProviderProps, "children">, BaseGlyphProviderOptions {
20
19
  chains: [Chain, ...Chain[]];
21
20
  transports?: Record<number, Transport>;
22
21
  queryClient?: QueryClient;
23
22
  glyphUrl?: string;
24
23
  useStagingTenant?: boolean;
25
24
  ssr?: boolean;
25
+ children: React.ReactNode;
26
26
  }
27
- export declare const GlyphPrivyProvider: React.MemoExoticComponent<({ chains, transports, queryClient, glyphUrl, useStagingTenant, ssr, onLogin, onLogout, ...props }: GlyphPrivyProviderProps) => import("react/jsx-runtime").JSX.Element>;
27
+ export declare const GlyphPrivyProvider: ({ chains, transports, queryClient, glyphUrl, useStagingTenant, ssr, onLogin, onLogout, ...props }: GlyphPrivyProviderProps) => import("react/jsx-runtime").JSX.Element;
28
28
  export {};
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  export declare const InjectWagmiConnector: ({ children, useStagingTenant }: {
3
2
  children: React.ReactNode;
4
3
  useStagingTenant?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@use-glyph/sdk-react",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
5
  "license": "GLYPH-1.0",
6
6
  "sideEffects": false,
@@ -45,6 +45,8 @@
45
45
  "rimraf": "^6.0.1",
46
46
  "tailwind-scrollbar": "3.1.0",
47
47
  "tailwindcss": "^3.4.17",
48
+ "tailwind-merge": "^2.6.0",
49
+ "tailwindcss-animate": "^1.0.7",
48
50
  "typescript": "~5.9.2",
49
51
  "typescript-eslint": "^8.41.0",
50
52
  "vite": "7.1.3",
@@ -75,8 +77,6 @@
75
77
  "lucide-react": "^0.542.0",
76
78
  "qrcode.react": "^4.2.0",
77
79
  "sonner": "2.0.7",
78
- "tailwind-merge": "^3.3.1",
79
- "tailwindcss-animate": "^1.0.7",
80
80
  "throttle-debounce": "5.0.2",
81
81
  "truncate-eth-address": "1.0.2",
82
82
  "vaul": "1.1.2"
@@ -1,148 +0,0 @@
1
- import { c as R, W as S, b as Y, d as B, j as J, a as q } from "./index.js";
2
- import { useState as g, useEffect as y, useCallback as l } from "react";
3
- import { useAccount as z, useDisconnect as H, useSignMessage as Q, useSendTransaction as V, useAccountEffect as X } from "wagmi";
4
- const A = "__glyph-widget-token__", I = "__glyph-widget-nonce__", r = R("EIP1193Strategy"), Z = ({
5
- children: P,
6
- glyphUrl: a,
7
- onLogin: j,
8
- onLogout: M,
9
- askForSignature: h = !0
10
- }) => {
11
- const [W, c] = g(!1), [L, d] = g(null), { address: t, isConnected: o, chainId: _ } = z(), { disconnectAsync: v } = H(), { signMessageAsync: f } = Q(), { sendTransactionAsync: C } = V();
12
- r.log({ address: t, isConnected: o });
13
- const [i, m] = g(() => {
14
- if (typeof window > "u")
15
- return null;
16
- try {
17
- return localStorage.getItem(A);
18
- } catch (e) {
19
- return r.warn("Error reading session token", e), null;
20
- }
21
- }), [u, O] = g(null), [n, w] = g(() => {
22
- if (typeof window > "u")
23
- return null;
24
- try {
25
- return localStorage.getItem(I);
26
- } catch (e) {
27
- return r.warn("Error reading session nonce", e), null;
28
- }
29
- });
30
- y(() => {
31
- try {
32
- !i || !n ? (localStorage.removeItem(A), localStorage.removeItem(I)) : (localStorage.setItem(A, i), localStorage.setItem(I, n));
33
- } catch (e) {
34
- r.error("Error saving session token", e);
35
- }
36
- }, [n, i]);
37
- const T = l(
38
- async (e) => {
39
- try {
40
- return await fetch(
41
- `${a || S}/api/widget/auth/message/${e}`
42
- ).then((E) => E.json());
43
- } catch (s) {
44
- throw r.error("Can't fetch message to sign", s), new Error("Failed to fetch the message to sign.");
45
- }
46
- },
47
- [a]
48
- ), k = l(
49
- async (e, s, E) => {
50
- try {
51
- return await fetch(`${a || S}/api/widget/auth/verify/${e}`, {
52
- method: "POST",
53
- body: JSON.stringify({ signature: s, nonce: E })
54
- }).then((G) => G.json());
55
- } catch (N) {
56
- throw r.error("Can't verify signature", N), new Error("Signature verification failed.");
57
- }
58
- },
59
- [a]
60
- );
61
- y(() => {
62
- !t || !o || n || (c(!0), T(t).then(({ message: e, nonce: s }) => {
63
- O(e), w(s), c(!1);
64
- }).finally(() => {
65
- c(!1);
66
- }));
67
- }, [t, o, T, n]), y(() => {
68
- if (!i || !n) return;
69
- const e = Y(a || S, async () => i, {
70
- "x-evm-address": t,
71
- "x-glyph-nonce": n
72
- });
73
- d(() => e);
74
- }, [i, t, a, n]);
75
- const $ = l(async () => {
76
- await v();
77
- }, [v]), p = l(async () => {
78
- if (r.log("authenticate"), !t) {
79
- r.error("no wallet connected.");
80
- return;
81
- }
82
- try {
83
- if (!t || !o || !u || !n) {
84
- d(null), c(!1);
85
- return;
86
- }
87
- c(!0);
88
- const e = await f({ account: t, message: u });
89
- console.log(n, u, e);
90
- const s = (await k(t, e, n))?.token;
91
- m(s);
92
- } catch (e) {
93
- r.error("Authentication failed", e), e?.message?.toLowerCase?.().includes?.("user rejected") || await alert(
94
- "Authentication failed - your browser could be blocking the popups. Allow popups or try to manually click sign in."
95
- ), d(null), m(null), w(null);
96
- } finally {
97
- c(!1), j?.();
98
- }
99
- }, [t, o, u, n, f, k]), D = l(async () => {
100
- w(null), m(null), c(!1), d(null), M?.();
101
- }, []), F = l(
102
- async ({ message: e }) => {
103
- if (!t || !o)
104
- throw new Error("Wallet not connected");
105
- return f({ account: t, message: e });
106
- },
107
- [t, o, f]
108
- ), K = l(
109
- async ({ transaction: e }) => {
110
- if (!t || !o) throw new Error("Wallet not connected");
111
- return C({ ...e, chainId: _ || B.id });
112
- },
113
- [t, o, C, _]
114
- ), [b, x] = g(!1);
115
- return X({
116
- onConnect: () => {
117
- h && x(!0);
118
- },
119
- onDisconnect: () => {
120
- D();
121
- }
122
- }), y(() => {
123
- h && o && t && b && n && u && (p(), x(!1));
124
- }, [o, t, p, b, n, u, h]), /* @__PURE__ */ J.jsx(
125
- q.Provider,
126
- {
127
- value: {
128
- ready: !W && !!n,
129
- authenticated: o && !!t && i !== null,
130
- symbol: "APE",
131
- glyphUrl: a,
132
- // Pass as string to avoid type error (we are passing fallback value in useGlyph hook at a common place)
133
- hideWidget: !o || !t,
134
- login: p,
135
- logout: $,
136
- // on disconnect, logoutSideEffect is called and clears states
137
- signMessage: F,
138
- sendTransaction: K,
139
- apiFetch: L
140
- },
141
- children: P
142
- }
143
- );
144
- };
145
- Z.displayName = "EIP1193Strategy";
146
- export {
147
- Z as default
148
- };