@txnlab/use-wallet-ui-react 0.2.2 → 0.3.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.
- package/dist/cjs/index.cjs +22 -6
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +5540 -4024
- package/dist/esm/index.js.map +1 -1
- package/dist/style.css +12 -14
- package/dist/types/index.d.cts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/package.json +24 -20
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
:root, :host {
|
|
4
4
|
--font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
@@ -359,11 +359,14 @@
|
|
|
359
359
|
flex-shrink: 0;
|
|
360
360
|
}
|
|
361
361
|
[data-wallet-ui] .transform {
|
|
362
|
-
transform: var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z) var(--tw-skew-x) var(--tw-skew-y);
|
|
362
|
+
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
363
363
|
}
|
|
364
364
|
[data-wallet-ui] .cursor-default {
|
|
365
365
|
cursor: default;
|
|
366
366
|
}
|
|
367
|
+
[data-wallet-ui] .cursor-pointer {
|
|
368
|
+
cursor: pointer;
|
|
369
|
+
}
|
|
367
370
|
[data-wallet-ui] .grid-cols-1 {
|
|
368
371
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
369
372
|
}
|
|
@@ -649,7 +652,7 @@
|
|
|
649
652
|
}
|
|
650
653
|
}
|
|
651
654
|
[data-wallet-ui] .transition {
|
|
652
|
-
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
|
|
655
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;
|
|
653
656
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
654
657
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
655
658
|
}
|
|
@@ -785,7 +788,7 @@
|
|
|
785
788
|
}
|
|
786
789
|
[data-wallet-ui] .data-\[leave\]\:transition {
|
|
787
790
|
&[data-leave] {
|
|
788
|
-
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
|
|
791
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;
|
|
789
792
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
790
793
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
791
794
|
}
|
|
@@ -1055,27 +1058,22 @@
|
|
|
1055
1058
|
@property --tw-rotate-x {
|
|
1056
1059
|
syntax: "*";
|
|
1057
1060
|
inherits: false;
|
|
1058
|
-
initial-value: rotateX(0);
|
|
1059
1061
|
}
|
|
1060
1062
|
@property --tw-rotate-y {
|
|
1061
1063
|
syntax: "*";
|
|
1062
1064
|
inherits: false;
|
|
1063
|
-
initial-value: rotateY(0);
|
|
1064
1065
|
}
|
|
1065
1066
|
@property --tw-rotate-z {
|
|
1066
1067
|
syntax: "*";
|
|
1067
1068
|
inherits: false;
|
|
1068
|
-
initial-value: rotateZ(0);
|
|
1069
1069
|
}
|
|
1070
1070
|
@property --tw-skew-x {
|
|
1071
1071
|
syntax: "*";
|
|
1072
1072
|
inherits: false;
|
|
1073
|
-
initial-value: skewX(0);
|
|
1074
1073
|
}
|
|
1075
1074
|
@property --tw-skew-y {
|
|
1076
1075
|
syntax: "*";
|
|
1077
1076
|
inherits: false;
|
|
1078
|
-
initial-value: skewY(0);
|
|
1079
1077
|
}
|
|
1080
1078
|
@property --tw-space-y-reverse {
|
|
1081
1079
|
syntax: "*";
|
|
@@ -1182,11 +1180,11 @@
|
|
|
1182
1180
|
@layer properties {
|
|
1183
1181
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
1184
1182
|
*, ::before, ::after, ::backdrop {
|
|
1185
|
-
--tw-rotate-x:
|
|
1186
|
-
--tw-rotate-y:
|
|
1187
|
-
--tw-rotate-z:
|
|
1188
|
-
--tw-skew-x:
|
|
1189
|
-
--tw-skew-y:
|
|
1183
|
+
--tw-rotate-x: initial;
|
|
1184
|
+
--tw-rotate-y: initial;
|
|
1185
|
+
--tw-rotate-z: initial;
|
|
1186
|
+
--tw-skew-x: initial;
|
|
1187
|
+
--tw-skew-y: initial;
|
|
1190
1188
|
--tw-space-y-reverse: 0;
|
|
1191
1189
|
--tw-border-style: solid;
|
|
1192
1190
|
--tw-font-weight: initial;
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
import { default as default_3 } from 'algosdk';
|
|
3
|
-
import { JSX
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
4
|
import { QueryClient } from '@tanstack/react-query';
|
|
5
5
|
import { ReactElement } from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
@@ -14,7 +14,7 @@ declare interface ConnectedWalletButtonProps extends default_2.ButtonHTMLAttribu
|
|
|
14
14
|
style?: default_2.CSSProperties;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export declare function ConnectedWalletMenu(props: ConnectedWalletMenuProps):
|
|
17
|
+
export declare function ConnectedWalletMenu(props: ConnectedWalletMenuProps): JSX.Element;
|
|
18
18
|
|
|
19
19
|
declare interface ConnectedWalletMenuProps {
|
|
20
20
|
children?: RefableElement_2;
|
|
@@ -26,7 +26,7 @@ declare interface ConnectWalletButtonProps extends default_2.ButtonHTMLAttribute
|
|
|
26
26
|
style?: default_2.CSSProperties;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export declare function ConnectWalletMenu({ children }: ConnectWalletMenuProps):
|
|
29
|
+
export declare function ConnectWalletMenu({ children }: ConnectWalletMenuProps): JSX.Element;
|
|
30
30
|
|
|
31
31
|
declare interface ConnectWalletMenuProps {
|
|
32
32
|
children?: RefableElement;
|
|
@@ -38,7 +38,7 @@ declare interface ConnectWalletMenuProps {
|
|
|
38
38
|
* - Checks availability on images.nf.domains and falls back to IPFS gateway if needed
|
|
39
39
|
* - Caches results using TanStack Query
|
|
40
40
|
*/
|
|
41
|
-
export declare function NfdAvatar({ nfd, alt, className, size, fallback, lightOnly, }: NfdAvatarProps):
|
|
41
|
+
export declare function NfdAvatar({ nfd, alt, className, size, fallback, lightOnly, }: NfdAvatarProps): JSX.Element;
|
|
42
42
|
|
|
43
43
|
declare interface NfdAvatarProps {
|
|
44
44
|
/** NFD record containing avatar data */
|
|
@@ -113,9 +113,9 @@ export declare function useNfd(options?: {
|
|
|
113
113
|
*/
|
|
114
114
|
export declare function useWalletUI(): WalletUIContextType;
|
|
115
115
|
|
|
116
|
-
export declare function WalletButton():
|
|
116
|
+
export declare function WalletButton(): JSX.Element;
|
|
117
117
|
|
|
118
|
-
export declare function WalletList({ wallets, handleWalletClick }: WalletListProps):
|
|
118
|
+
export declare function WalletList({ wallets, handleWalletClick }: WalletListProps): JSX.Element;
|
|
119
119
|
|
|
120
120
|
declare interface WalletListProps {
|
|
121
121
|
wallets: Wallet[];
|
|
@@ -134,7 +134,7 @@ declare interface WalletUIContextType {
|
|
|
134
134
|
* Automatically prefetches data for all accounts in connected wallets for smoother
|
|
135
135
|
* account switching experience.
|
|
136
136
|
*/
|
|
137
|
-
export declare function WalletUIProvider({ children, queryClient: externalQueryClient, enablePrefetching, prefetchNfdView, }: WalletUIProviderProps):
|
|
137
|
+
export declare function WalletUIProvider({ children, queryClient: externalQueryClient, enablePrefetching, prefetchNfdView, }: WalletUIProviderProps): JSX.Element;
|
|
138
138
|
|
|
139
139
|
declare interface WalletUIProviderProps {
|
|
140
140
|
children: ReactNode;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
import { default as default_3 } from 'algosdk';
|
|
3
|
-
import { JSX
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
4
|
import { QueryClient } from '@tanstack/react-query';
|
|
5
5
|
import { ReactElement } from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
@@ -14,7 +14,7 @@ declare interface ConnectedWalletButtonProps extends default_2.ButtonHTMLAttribu
|
|
|
14
14
|
style?: default_2.CSSProperties;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export declare function ConnectedWalletMenu(props: ConnectedWalletMenuProps):
|
|
17
|
+
export declare function ConnectedWalletMenu(props: ConnectedWalletMenuProps): JSX.Element;
|
|
18
18
|
|
|
19
19
|
declare interface ConnectedWalletMenuProps {
|
|
20
20
|
children?: RefableElement_2;
|
|
@@ -26,7 +26,7 @@ declare interface ConnectWalletButtonProps extends default_2.ButtonHTMLAttribute
|
|
|
26
26
|
style?: default_2.CSSProperties;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export declare function ConnectWalletMenu({ children }: ConnectWalletMenuProps):
|
|
29
|
+
export declare function ConnectWalletMenu({ children }: ConnectWalletMenuProps): JSX.Element;
|
|
30
30
|
|
|
31
31
|
declare interface ConnectWalletMenuProps {
|
|
32
32
|
children?: RefableElement;
|
|
@@ -38,7 +38,7 @@ declare interface ConnectWalletMenuProps {
|
|
|
38
38
|
* - Checks availability on images.nf.domains and falls back to IPFS gateway if needed
|
|
39
39
|
* - Caches results using TanStack Query
|
|
40
40
|
*/
|
|
41
|
-
export declare function NfdAvatar({ nfd, alt, className, size, fallback, lightOnly, }: NfdAvatarProps):
|
|
41
|
+
export declare function NfdAvatar({ nfd, alt, className, size, fallback, lightOnly, }: NfdAvatarProps): JSX.Element;
|
|
42
42
|
|
|
43
43
|
declare interface NfdAvatarProps {
|
|
44
44
|
/** NFD record containing avatar data */
|
|
@@ -113,9 +113,9 @@ export declare function useNfd(options?: {
|
|
|
113
113
|
*/
|
|
114
114
|
export declare function useWalletUI(): WalletUIContextType;
|
|
115
115
|
|
|
116
|
-
export declare function WalletButton():
|
|
116
|
+
export declare function WalletButton(): JSX.Element;
|
|
117
117
|
|
|
118
|
-
export declare function WalletList({ wallets, handleWalletClick }: WalletListProps):
|
|
118
|
+
export declare function WalletList({ wallets, handleWalletClick }: WalletListProps): JSX.Element;
|
|
119
119
|
|
|
120
120
|
declare interface WalletListProps {
|
|
121
121
|
wallets: Wallet[];
|
|
@@ -134,7 +134,7 @@ declare interface WalletUIContextType {
|
|
|
134
134
|
* Automatically prefetches data for all accounts in connected wallets for smoother
|
|
135
135
|
* account switching experience.
|
|
136
136
|
*/
|
|
137
|
-
export declare function WalletUIProvider({ children, queryClient: externalQueryClient, enablePrefetching, prefetchNfdView, }: WalletUIProviderProps):
|
|
137
|
+
export declare function WalletUIProvider({ children, queryClient: externalQueryClient, enablePrefetching, prefetchNfdView, }: WalletUIProviderProps): JSX.Element;
|
|
138
138
|
|
|
139
139
|
declare interface WalletUIProviderProps {
|
|
140
140
|
children: ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@txnlab/use-wallet-ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "React components for use-wallet UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.cjs",
|
|
@@ -56,31 +56,35 @@
|
|
|
56
56
|
"react-dom": "^18 || ^19"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@floating-ui/react": "
|
|
60
|
-
"@headlessui/react": "
|
|
61
|
-
"@tanstack/react-query": "
|
|
62
|
-
"@txnlab/utils-ts": "
|
|
63
|
-
"clsx": "
|
|
64
|
-
"tailwind-merge": "
|
|
59
|
+
"@floating-ui/react": "0.27.13",
|
|
60
|
+
"@headlessui/react": "2.2.4",
|
|
61
|
+
"@tanstack/react-query": "5.81.5",
|
|
62
|
+
"@txnlab/utils-ts": "0.1.0",
|
|
63
|
+
"clsx": "2.1.1",
|
|
64
|
+
"tailwind-merge": "3.3.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@tailwindcss/cli": "
|
|
68
|
-
"@types/react": "
|
|
69
|
-
"@types/react-dom": "
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"react
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"vite
|
|
78
|
-
"vite-
|
|
67
|
+
"@tailwindcss/cli": "4.1.11",
|
|
68
|
+
"@types/react": "19.1.6",
|
|
69
|
+
"@types/react-dom": "19.1.6",
|
|
70
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
71
|
+
"algosdk": "3.3.1",
|
|
72
|
+
"publint": "0.3.12",
|
|
73
|
+
"react": "19.1.0",
|
|
74
|
+
"react-dom": "19.1.0",
|
|
75
|
+
"tailwindcss": "4.1.11",
|
|
76
|
+
"tsx": "4.20.3",
|
|
77
|
+
"vite": "6.3.5",
|
|
78
|
+
"vite-plugin-dts": "4.5.4",
|
|
79
|
+
"vite-tsconfig-paths": "5.1.4",
|
|
80
|
+
"vitest": "3.2.4"
|
|
79
81
|
},
|
|
80
82
|
"scripts": {
|
|
81
83
|
"build": "pnpm generate:css && vite build && publint --strict",
|
|
82
84
|
"dev": "vite build --watch",
|
|
83
|
-
"test": "
|
|
85
|
+
"test": "vitest run",
|
|
86
|
+
"test:watch": "vitest",
|
|
87
|
+
"test:coverage": "vitest run --coverage",
|
|
84
88
|
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
|
|
85
89
|
"format": "prettier --write .",
|
|
86
90
|
"typecheck": "tsc --noEmit",
|