@txnlab/use-wallet-ui-react 1.0.0 → 1.1.0

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 (75) hide show
  1. package/README.md +20 -0
  2. package/dist/cjs/chunks/floating-ui.react-Hg8yTXAw.cjs +5 -0
  3. package/dist/cjs/chunks/floating-ui.react-Hg8yTXAw.cjs.map +1 -0
  4. package/dist/cjs/index.cjs +15 -18
  5. package/dist/cjs/index.cjs.map +1 -1
  6. package/dist/cjs/plugins/export-key.cjs +9 -0
  7. package/dist/cjs/plugins/export-key.cjs.map +1 -0
  8. package/dist/esm/chunks/floating-ui.react-BBJf3vGf.js +2599 -0
  9. package/dist/esm/chunks/floating-ui.react-BBJf3vGf.js.map +1 -0
  10. package/dist/esm/index.js +4780 -7744
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/plugins/export-key.js +3030 -0
  13. package/dist/esm/plugins/export-key.js.map +1 -0
  14. package/dist/style.css +112 -1
  15. package/dist/types/components/AlgoSymbol.d.ts +11 -0
  16. package/dist/types/components/AlgoSymbol.d.ts.map +1 -0
  17. package/dist/types/components/ConnectWalletButton.d.ts +9 -0
  18. package/dist/types/components/ConnectWalletButton.d.ts.map +1 -0
  19. package/dist/types/components/ConnectWalletMenu.d.ts +10 -0
  20. package/dist/types/components/ConnectWalletMenu.d.ts.map +1 -0
  21. package/dist/types/components/ConnectedWalletButton.d.ts +9 -0
  22. package/dist/types/components/ConnectedWalletButton.d.ts.map +1 -0
  23. package/dist/types/components/ConnectedWalletMenu.d.ts +10 -0
  24. package/dist/types/components/ConnectedWalletMenu.d.ts.map +1 -0
  25. package/dist/types/components/NfdAvatar.d.ts +24 -0
  26. package/dist/types/components/NfdAvatar.d.ts.map +1 -0
  27. package/dist/types/components/WalletButton.d.ts +12 -0
  28. package/dist/types/components/WalletButton.d.ts.map +1 -0
  29. package/dist/types/components/WalletList.d.ts +7 -0
  30. package/dist/types/components/WalletList.d.ts.map +1 -0
  31. package/dist/types/hooks/useAccountInfo.d.ts +12 -0
  32. package/dist/types/hooks/useAccountInfo.d.ts.map +1 -0
  33. package/dist/types/hooks/useNfd.d.ts +32 -0
  34. package/dist/types/hooks/useNfd.d.ts.map +1 -0
  35. package/dist/types/hooks/useResolvedTheme.d.ts +11 -0
  36. package/dist/types/hooks/useResolvedTheme.d.ts.map +1 -0
  37. package/dist/types/index.d.cts +17 -197
  38. package/dist/types/index.d.ts +17 -197
  39. package/dist/types/index.d.ts.map +1 -0
  40. package/dist/types/plugins/PluginContext.d.ts +29 -0
  41. package/dist/types/plugins/PluginContext.d.ts.map +1 -0
  42. package/dist/types/plugins/PluginDialogRenderer.d.ts +10 -0
  43. package/dist/types/plugins/PluginDialogRenderer.d.ts.map +1 -0
  44. package/dist/types/plugins/PluginLifecycleManager.d.ts +9 -0
  45. package/dist/types/plugins/PluginLifecycleManager.d.ts.map +1 -0
  46. package/dist/types/plugins/PluginSlot.d.ts +10 -0
  47. package/dist/types/plugins/PluginSlot.d.ts.map +1 -0
  48. package/dist/types/plugins/export-key/ExportKeyDialog.d.ts +6 -0
  49. package/dist/types/plugins/export-key/ExportKeyDialog.d.ts.map +1 -0
  50. package/dist/types/plugins/export-key/ExportKeyMenuButton.d.ts +5 -0
  51. package/dist/types/plugins/export-key/ExportKeyMenuButton.d.ts.map +1 -0
  52. package/dist/types/plugins/export-key/constants.d.ts +2 -0
  53. package/dist/types/plugins/export-key/constants.d.ts.map +1 -0
  54. package/dist/types/plugins/export-key/index.d.cts +12 -0
  55. package/dist/types/plugins/export-key/index.d.ts +12 -0
  56. package/dist/types/plugins/export-key/index.d.ts.map +1 -0
  57. package/dist/types/plugins/index.d.ts +6 -0
  58. package/dist/types/plugins/index.d.ts.map +1 -0
  59. package/dist/types/plugins/types.d.ts +109 -0
  60. package/dist/types/plugins/types.d.ts.map +1 -0
  61. package/dist/types/providers/WalletUIProvider.d.ts +58 -0
  62. package/dist/types/providers/WalletUIProvider.d.ts.map +1 -0
  63. package/dist/types/test/setup.d.ts +2 -0
  64. package/dist/types/test/setup.d.ts.map +1 -0
  65. package/dist/types/utils/cn.d.ts +16 -0
  66. package/dist/types/utils/cn.d.ts.map +1 -0
  67. package/dist/types/utils/fontLoader.d.ts +8 -0
  68. package/dist/types/utils/fontLoader.d.ts.map +1 -0
  69. package/dist/types/utils/index.d.ts +3 -0
  70. package/dist/types/utils/index.d.ts.map +1 -0
  71. package/dist/types/utils/ipfs.d.ts +10 -0
  72. package/dist/types/utils/ipfs.d.ts.map +1 -0
  73. package/dist/types/utils/ipfs.test.d.ts +2 -0
  74. package/dist/types/utils/ipfs.test.d.ts.map +1 -0
  75. package/package.json +21 -11
@@ -0,0 +1,109 @@
1
+ import { Theme, ResolvedTheme } from '../hooks/useResolvedTheme';
2
+ import { Wallet } from '@txnlab/use-wallet-react';
3
+ import { ComponentType, ReactNode } from 'react';
4
+ /** Context available to all plugin render functions */
5
+ export interface PluginRenderContext {
6
+ activeAddress: string | null;
7
+ activeWallet: Wallet | null;
8
+ theme: Theme;
9
+ resolvedTheme: ResolvedTheme;
10
+ /** Open a plugin dialog by key */
11
+ openDialog: (key: string) => void;
12
+ /** Close a plugin dialog by key */
13
+ closeDialog: (key: string) => void;
14
+ }
15
+ /** Extended context available to menu items rendered inside ConnectedWalletMenu */
16
+ export interface MenuRenderContext extends PluginRenderContext {
17
+ /** Close the ConnectedWalletMenu dropdown */
18
+ closeMenu: () => void;
19
+ /** Navigate to a plugin panel by key, or null to return to main view */
20
+ setActivePanel: (key: string | null) => void;
21
+ /** Currently active panel key, or null if showing main view */
22
+ activePanel: string | null;
23
+ }
24
+ /**
25
+ * Named slots in ConnectedWalletMenu where plugins can inject UI.
26
+ * Ordered from top to bottom of the menu layout.
27
+ */
28
+ export type MenuSlot = 'after-balance' | 'after-accounts' | 'after-wallet-info' | 'before-actions' | 'actions';
29
+ /** A menu item contributed by a plugin to a named slot */
30
+ export interface PluginMenuItem {
31
+ /** Unique key for React rendering */
32
+ key: string;
33
+ /** Which slot to render in */
34
+ slot: MenuSlot;
35
+ /** Ordering weight within the slot. Lower = earlier. Default: 100. */
36
+ order?: number;
37
+ /** Return false to hide this item */
38
+ enabled?: (ctx: MenuRenderContext) => boolean;
39
+ /** The React element to render */
40
+ render: (ctx: MenuRenderContext) => ReactNode;
41
+ }
42
+ /** A dialog contributed by a plugin, rendered via FloatingPortal */
43
+ export interface PluginDialog {
44
+ /** Unique key for React rendering and dialog open/close control */
45
+ key: string;
46
+ /** The dialog component */
47
+ render: (props: {
48
+ isOpen: boolean;
49
+ onClose: () => void;
50
+ ctx: PluginRenderContext;
51
+ }) => ReactNode;
52
+ }
53
+ /** A full panel view contributed by a plugin to ConnectedWalletMenu */
54
+ export interface PluginPanel {
55
+ /** Unique key for this panel */
56
+ key: string;
57
+ /** Label shown on the navigation trigger (e.g., "Manage", "Bridge") */
58
+ label: string;
59
+ /** Optional icon component rendered alongside the label */
60
+ icon?: (props: {
61
+ className?: string;
62
+ }) => ReactNode;
63
+ /** Return false to hide this panel's trigger */
64
+ enabled?: (ctx: MenuRenderContext) => boolean;
65
+ /** Ordering weight in the panel trigger list. Lower = earlier. Default: 100. */
66
+ order?: number;
67
+ /** The panel content renderer. Receives a `goBack` function to return to main view. */
68
+ render: (props: {
69
+ ctx: MenuRenderContext;
70
+ goBack: () => void;
71
+ }) => ReactNode;
72
+ }
73
+ /** Wallet lifecycle event hooks */
74
+ export interface PluginLifecycleHooks {
75
+ /** Called after a wallet connects */
76
+ onConnect?: (ctx: PluginRenderContext) => void | Promise<void>;
77
+ /** Called after a wallet disconnects */
78
+ onDisconnect?: () => void | Promise<void>;
79
+ /** Called when the active account changes */
80
+ onAccountChange?: (newAddress: string, prevAddress: string | null, ctx: PluginRenderContext) => void;
81
+ }
82
+ /**
83
+ * The main plugin interface. Every field except `id` is optional.
84
+ * A plugin declares what it contributes; the core system
85
+ * collects and renders those contributions.
86
+ */
87
+ export interface WalletUIPlugin {
88
+ /** Unique identifier for the plugin */
89
+ id: string;
90
+ /** Human-readable name (for debugging) */
91
+ name?: string;
92
+ /** Menu items to inject into ConnectedWalletMenu slots */
93
+ menuItems?: PluginMenuItem[];
94
+ /** Dialogs that the plugin manages */
95
+ dialogs?: PluginDialog[];
96
+ /** Panels that replace ConnectedWalletMenu content when navigated to */
97
+ panels?: PluginPanel[];
98
+ /** Wallet lifecycle event hooks */
99
+ lifecycle?: PluginLifecycleHooks;
100
+ /**
101
+ * Optional React component that wraps the provider's children.
102
+ * Used by plugins that need to provide their own React context.
103
+ */
104
+ Provider?: ComponentType<{
105
+ children: ReactNode;
106
+ ctx: PluginRenderContext;
107
+ }>;
108
+ }
109
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,58 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ import { ReactNode } from 'react';
3
+ import { Theme, ResolvedTheme } from '../hooks/useResolvedTheme';
4
+ import { NfdView } from '../hooks/useNfd';
5
+ import { WalletUIPlugin } from '../plugins/types';
6
+ interface WalletUIContextType {
7
+ queryClient: QueryClient;
8
+ theme: Theme;
9
+ resolvedTheme: ResolvedTheme;
10
+ }
11
+ interface WalletUIProviderProps {
12
+ children: ReactNode;
13
+ queryClient?: QueryClient;
14
+ /**
15
+ * Whether to automatically prefetch data for all accounts in connected wallets (defaults to true)
16
+ */
17
+ enablePrefetching?: boolean;
18
+ /**
19
+ * NFD view type for prefetching (defaults to 'thumbnail')
20
+ */
21
+ prefetchNfdView?: NfdView;
22
+ /**
23
+ * Theme setting for wallet UI components.
24
+ * - 'light': Always use light mode
25
+ * - 'dark': Always use dark mode
26
+ * - 'system': Follow the user's OS/browser preference (default)
27
+ *
28
+ * The library also respects the `.dark` class on ancestor elements (Tailwind convention),
29
+ * which will enable dark mode unless explicitly overridden with theme="light".
30
+ */
31
+ theme?: Theme;
32
+ /**
33
+ * Plugins to register. Each plugin can contribute menu items, dialogs,
34
+ * lifecycle hooks, and context providers.
35
+ */
36
+ plugins?: WalletUIPlugin[];
37
+ }
38
+ /**
39
+ * Provider that enables wallet UI components to work with TanStack Query.
40
+ * It can use an existing QueryClient from the parent application or create its own.
41
+ * Also creates a QueryClientProvider if none exists in the parent tree.
42
+ *
43
+ * Automatically prefetches data for all accounts in connected wallets for smoother
44
+ * account switching experience.
45
+ *
46
+ * Supports theme configuration via the `theme` prop:
47
+ * - 'light': Always use light mode
48
+ * - 'dark': Always use dark mode
49
+ * - 'system': Follow the user's OS/browser preference (default)
50
+ */
51
+ export declare function WalletUIProvider({ children, queryClient: externalQueryClient, enablePrefetching, prefetchNfdView, theme, plugins, }: WalletUIProviderProps): import("react/jsx-runtime").JSX.Element;
52
+ /**
53
+ * Hook to access the WalletUI context
54
+ * @throws Error if used outside of WalletUIProvider
55
+ */
56
+ export declare function useWalletUI(): WalletUIContextType;
57
+ export {};
58
+ //# sourceMappingURL=WalletUIProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletUIProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/WalletUIProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAGZ,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAEL,SAAS,EAKV,MAAM,OAAO,CAAA;AAEd,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAA;AAKlC,OAAO,KAAK,EAAqB,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,KAAK,EAAuB,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAoF3E,UAAU,mBAAmB;IAC3B,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;IACZ,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;CAC3B;AA0KD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,WAAW,EAAE,mBAAmB,EAChC,iBAAwB,EACxB,eAA6B,EAC7B,KAAgB,EAChB,OAAY,GACb,EAAE,qBAAqB,2CAmDvB;AA2CD;;;GAGG;AACH,wBAAgB,WAAW,IAAI,mBAAmB,CAMjD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/test/setup.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { ClassValue } from 'clsx';
2
+ /**
3
+ * Uses clsx and tailwind-merge to construct className strings conditionally.
4
+ * @param {ClassValue[]} inputs - Any number of arguments, can be Object, Array, Boolean, or String
5
+ * @returns {string} The combined class names, merged without style conflicts
6
+ * @see {@link https://github.com/lukeed/clsx#usage}
7
+ * @see {@link https://github.com/dcastil/tailwind-merge}
8
+ * @example
9
+ * ```jsx
10
+ * <p className={cn('text-center', { 'text-blue-500': isBlue })}>
11
+ * Hello, world!
12
+ * </p>
13
+ * ```
14
+ */
15
+ export declare function cn(...inputs: ClassValue[]): string;
16
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;;;GAYG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Initializes font loading for the UI components.
3
+ * Safe to use in any environment (SSR, CSR, Next.js, etc).
4
+ * Will automatically inject the Aeonik font for components using the 'wallet-custom-font' class.
5
+ * Falls back gracefully to system fonts if loading fails.
6
+ */
7
+ export declare const initializeFonts: () => void;
8
+ //# sourceMappingURL=fontLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fontLoader.d.ts","sourceRoot":"","sources":["../../../src/utils/fontLoader.ts"],"names":[],"mappings":"AAsEA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAO,IAIlC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { cn } from './cn';
2
+ export * from './fontLoader';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,cAAc,cAAc,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Check availability of an IPFS resource and return appropriate URL
3
+ * Tries images.nf.domains first, falls back to IPFS gateway
4
+ * Only returns URLs for image content types
5
+ *
6
+ * @param url - IPFS URL to check
7
+ * @returns URL to use (either images.nf.domains or fallback gateway)
8
+ */
9
+ export declare const checkIpfsAvailability: (url: string) => Promise<string>;
10
+ //# sourceMappingURL=ipfs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipfs.d.ts","sourceRoot":"","sources":["../../../src/utils/ipfs.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,MAAM,CAgGvE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ipfs.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipfs.test.d.ts","sourceRoot":"","sources":["../../../src/utils/ipfs.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@txnlab/use-wallet-ui-react",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "React components for use-wallet UI",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.cjs",
@@ -17,6 +17,16 @@
17
17
  "default": "./dist/cjs/index.cjs"
18
18
  }
19
19
  },
20
+ "./plugins/export-key": {
21
+ "import": {
22
+ "types": "./dist/types/plugins/export-key/index.d.ts",
23
+ "default": "./dist/esm/plugins/export-key.js"
24
+ },
25
+ "require": {
26
+ "types": "./dist/types/plugins/export-key/index.d.cts",
27
+ "default": "./dist/cjs/plugins/export-key.cjs"
28
+ }
29
+ },
20
30
  "./dist/style.css": "./dist/style.css",
21
31
  "./theme.css": "./src/theme.css",
22
32
  "./package.json": "./package.json"
@@ -65,28 +75,28 @@
65
75
  "generate:css": "npx @tailwindcss/cli -c ./tailwind.config.js -i ./src/input.css -o ./dist/style.css && node ./scripts/post-process-css.js"
66
76
  },
67
77
  "peerDependencies": {
68
- "@txnlab/use-wallet-react": "^4.0.1",
78
+ "@txnlab/use-wallet-react": "^4.6.0",
69
79
  "react": "^18 || ^19",
70
80
  "react-dom": "^18 || ^19"
71
81
  },
72
82
  "dependencies": {
73
- "@floating-ui/react": "0.27.16",
83
+ "@floating-ui/react": "0.27.18",
74
84
  "@headlessui/react": "2.2.9",
75
- "@tanstack/react-query": "5.90.19",
85
+ "@tanstack/react-query": "5.90.21",
76
86
  "@txnlab/utils-ts": "0.1.0",
77
87
  "clsx": "2.1.1",
78
- "tailwind-merge": "3.4.0"
88
+ "tailwind-merge": "3.5.0"
79
89
  },
80
90
  "devDependencies": {
81
- "@tailwindcss/cli": "4.1.18",
82
- "@types/react": "19.2.8",
91
+ "@tailwindcss/cli": "4.2.1",
92
+ "@types/react": "19.2.14",
83
93
  "@types/react-dom": "19.2.3",
84
94
  "@vitest/coverage-v8": "3.2.4",
85
95
  "algosdk": "3.5.2",
86
- "publint": "0.3.16",
87
- "react": "19.2.3",
88
- "react-dom": "19.2.3",
89
- "tailwindcss": "4.1.18",
96
+ "publint": "0.3.17",
97
+ "react": "19.2.4",
98
+ "react-dom": "19.2.4",
99
+ "tailwindcss": "4.2.1",
90
100
  "tsx": "4.21.0",
91
101
  "vite": "6.4.1",
92
102
  "vite-plugin-dts": "4.5.4",