astra-sdk-web 1.1.25 → 1.1.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astra-sdk-web",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "description": "Official Astra SDK for JavaScript/TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/astra-sdk.cjs.js",
@@ -16,7 +16,7 @@ interface QRCodePageProps {
16
16
  serverKey?: string;
17
17
  }
18
18
 
19
- function QRCodePage({ onClose, mobileBaseUrl = 'https://kyc-sdk-stage.astraprotocol.com', sessionId, apiBaseUrl, serverKey }: QRCodePageProps = {}) {
19
+ function QRCodePage({ onClose, mobileBaseUrl = 'https://kyc-sdk.astraprotocol.com', sessionId, apiBaseUrl, serverKey }: QRCodePageProps = {}) {
20
20
  const [qrUrl, setQrUrl] = useState<string>('');
21
21
  const [copied, setCopied] = useState<boolean>(false);
22
22
 
@@ -54,15 +54,15 @@ function QRCodePage({ onClose, mobileBaseUrl = 'https://kyc-sdk-stage.astraproto
54
54
  }
55
55
  };
56
56
 
57
- const handleClose = () => {
58
- if (onClose) {
59
- onClose();
60
- }
61
- };
57
+ // const handleClose = () => {
58
+ // if (onClose) {
59
+ // onClose();
60
+ // }
61
+ // };
62
62
 
63
63
  const handleCheckResult = async () => {
64
64
  if (!apiBaseUrl || !sessionId || !serverKey) {
65
- toast.error('Missing configuration to check KYC result.');
65
+ toast.warn('Missing configuration to check KYC result.');
66
66
  return;
67
67
  }
68
68
 
@@ -94,6 +94,8 @@ function QRCodePage({ onClose, mobileBaseUrl = 'https://kyc-sdk-stage.astraproto
94
94
  };
95
95
 
96
96
  return (
97
+ <>
98
+
97
99
  <div className="fixed inset-0 flex items-center justify-center bg-gradient-to-br from-gray-900 via-gray-800 to-black p-4 sm:p-6 md:p-8 z-[1000]">
98
100
  <ToastContainer position="top-right" />
99
101
  {/* Background pattern overlay */}
@@ -102,8 +104,8 @@ function QRCodePage({ onClose, mobileBaseUrl = 'https://kyc-sdk-stage.astraproto
102
104
  backgroundSize: '40px 40px'
103
105
  }}></div>
104
106
 
105
- <div className="relative bg-[rgba(20,20,20,0.95)] backdrop-blur-sm rounded-2xl p-5 sm:p-6 md:p-7 max-w-[450px] w-full h-[80vh] flex flex-col text-center shadow-[0_8px_32px_rgba(0,0,0,0.5)] border border-white/10">
106
- <button
107
+ <div className="relative bg-[rgba(20,20,20,0.95)] backdrop-blur-sm rounded-2xl p-5 sm:p-6 md:p-7 max-w-[450px] w-full h-[80vh] flex flex-col text-center shadow-[0_8px_32px_rgba(0,0,0,0.5)]">
108
+ {/* <button
107
109
  className="absolute top-5 right-5 bg-transparent border-none text-white cursor-pointer p-2 flex items-center justify-center rounded transition-colors hover:bg-white/10 active:bg-white/20"
108
110
  onClick={handleClose}
109
111
  aria-label="Close"
@@ -112,7 +114,7 @@ function QRCodePage({ onClose, mobileBaseUrl = 'https://kyc-sdk-stage.astraproto
112
114
  <line x1="18" y1="6" x2="6" y2="18"></line>
113
115
  <line x1="6" y1="6" x2="18" y2="18"></line>
114
116
  </svg>
115
- </button>
117
+ </button> */}
116
118
 
117
119
  <div className="flex flex-col items-center gap-3 sm:gap-4 flex-1 overflow-y-auto custom__scrollbar">
118
120
  <h1 className="m-0 text-white text-xl sm:text-2xl font-semibold leading-tight">Continue on Mobile</h1>
@@ -136,7 +138,7 @@ function QRCodePage({ onClose, mobileBaseUrl = 'https://kyc-sdk-stage.astraproto
136
138
  <div className="w-full text-left mt-auto">
137
139
  <p className="m-0 mb-2 text-white text-xs sm:text-sm opacity-80">Or open:</p>
138
140
  <div className="flex flex-col sm:flex-row items-start sm:items-center gap-2 p-2 sm:p-3 bg-white/10 rounded-lg border border-white/20">
139
- <code className="flex-1 text-white text-xs sm:text-sm break-all text-left m-0 font-mono">{qrUrl}</code>
141
+ <code className="flex-1 text-white text-xs sm:text-sm break-all text-left m-0 font-mono line-clamp-1 ">{qrUrl}</code>
140
142
  <button
141
143
  className="bg-transparent border-none text-white cursor-pointer p-1.5 flex items-center justify-center rounded transition-colors flex-shrink-0 hover:bg-white/10 active:bg-white/20 self-end sm:self-auto"
142
144
  onClick={handleCopyUrl}
@@ -166,6 +168,8 @@ function QRCodePage({ onClose, mobileBaseUrl = 'https://kyc-sdk-stage.astraproto
166
168
  </div>
167
169
  </div>
168
170
  </div>
171
+ </>
172
+
169
173
  );
170
174
  }
171
175