astra-sdk-web 1.1.12 → 1.1.14
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/README.md +179 -179
- package/dist/astra-sdk.cjs.js +2 -2
- package/dist/astra-sdk.cjs.js.map +1 -1
- package/dist/astra-sdk.css +42 -0
- package/dist/astra-sdk.css.map +1 -1
- package/dist/astra-sdk.es.js +2 -2
- package/dist/astra-sdk.es.js.map +1 -1
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.css +42 -0
- package/dist/components.css.map +1 -1
- package/dist/components.es.js +2 -2
- package/dist/components.es.js.map +1 -1
- package/package.json +74 -74
- package/src/App.tsx +17 -17
- package/src/components/KycFlow.tsx +1 -1
- package/src/components/MobileKycPage.tsx +1122 -0
- package/src/components/kycModal.tsx +551 -0
- package/src/index.css +22 -18
- package/src/main.tsx +10 -10
- package/src/pages/QRCodePage.tsx +1 -1
- package/dist/.htaccess +0 -9
package/package.json
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "astra-sdk-web",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Official Astra SDK for JavaScript/TypeScript",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/astra-sdk.cjs.js",
|
|
7
|
-
"module": "./dist/astra-sdk.es.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/astra-sdk.es.js",
|
|
13
|
-
"require": "./dist/astra-sdk.cjs.js"
|
|
14
|
-
},
|
|
15
|
-
"./components": {
|
|
16
|
-
"types": "./dist/components.d.ts",
|
|
17
|
-
"import": "./dist/components.es.js",
|
|
18
|
-
"require": "./dist/components.cjs.js"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"dist",
|
|
23
|
-
"src"
|
|
24
|
-
],
|
|
25
|
-
"keywords": [
|
|
26
|
-
"astra",
|
|
27
|
-
"sdk",
|
|
28
|
-
"api",
|
|
29
|
-
"client"
|
|
30
|
-
],
|
|
31
|
-
"author": "",
|
|
32
|
-
"license": "MIT",
|
|
33
|
-
"scripts": {
|
|
34
|
-
"dev": "vite",
|
|
35
|
-
"build": "tsc && vite build",
|
|
36
|
-
"build:lib": "tsup && node scripts/copy-assets.mjs",
|
|
37
|
-
"lint": "eslint .",
|
|
38
|
-
"preview": "vite preview",
|
|
39
|
-
"type-check": "tsc --noEmit"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@eslint/js": "^9.39.1",
|
|
43
|
-
"@types/node": "^24.10.1",
|
|
44
|
-
"@types/react": "^19.2.5",
|
|
45
|
-
"@types/react-dom": "^19.2.3",
|
|
46
|
-
"@vitejs/plugin-react": "^5.1.1",
|
|
47
|
-
"autoprefixer": "^10.4.23",
|
|
48
|
-
"cross-env": "^10.1.0",
|
|
49
|
-
"eslint": "^9.39.1",
|
|
50
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
51
|
-
"eslint-plugin-react-refresh": "^0.4.24",
|
|
52
|
-
"globals": "^16.5.0",
|
|
53
|
-
"postcss": "^8.5.6",
|
|
54
|
-
"tailwindcss": "^3.4.19",
|
|
55
|
-
"terser": "^5.44.1",
|
|
56
|
-
"tsup": "^8.5.1",
|
|
57
|
-
"typescript": "~5.9.3",
|
|
58
|
-
"typescript-eslint": "^8.46.4",
|
|
59
|
-
"vite": "^7.2.4",
|
|
60
|
-
"vite-plugin-dts": "^4.3.0"
|
|
61
|
-
},
|
|
62
|
-
"dependencies": {
|
|
63
|
-
"@mediapipe/camera_utils": "^0.3.1675466862",
|
|
64
|
-
"@mediapipe/drawing_utils": "^0.3.1675466124",
|
|
65
|
-
"@mediapipe/face_detection": "^0.4.1646425229",
|
|
66
|
-
"@mediapipe/face_mesh": "^0.4.1633559619",
|
|
67
|
-
"qrcode.react": "^4.2.0",
|
|
68
|
-
"react-router-dom": "^7.11.0"
|
|
69
|
-
},
|
|
70
|
-
"peerDependencies": {
|
|
71
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
72
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "astra-sdk-web",
|
|
3
|
+
"version": "1.1.14",
|
|
4
|
+
"description": "Official Astra SDK for JavaScript/TypeScript",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/astra-sdk.cjs.js",
|
|
7
|
+
"module": "./dist/astra-sdk.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/astra-sdk.es.js",
|
|
13
|
+
"require": "./dist/astra-sdk.cjs.js"
|
|
14
|
+
},
|
|
15
|
+
"./components": {
|
|
16
|
+
"types": "./dist/components.d.ts",
|
|
17
|
+
"import": "./dist/components.es.js",
|
|
18
|
+
"require": "./dist/components.cjs.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"src"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"astra",
|
|
27
|
+
"sdk",
|
|
28
|
+
"api",
|
|
29
|
+
"client"
|
|
30
|
+
],
|
|
31
|
+
"author": "",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"scripts": {
|
|
34
|
+
"dev": "vite",
|
|
35
|
+
"build": "tsc && vite build",
|
|
36
|
+
"build:lib": "tsup && node scripts/copy-assets.mjs",
|
|
37
|
+
"lint": "eslint .",
|
|
38
|
+
"preview": "vite preview",
|
|
39
|
+
"type-check": "tsc --noEmit"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@eslint/js": "^9.39.1",
|
|
43
|
+
"@types/node": "^24.10.1",
|
|
44
|
+
"@types/react": "^19.2.5",
|
|
45
|
+
"@types/react-dom": "^19.2.3",
|
|
46
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
47
|
+
"autoprefixer": "^10.4.23",
|
|
48
|
+
"cross-env": "^10.1.0",
|
|
49
|
+
"eslint": "^9.39.1",
|
|
50
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
51
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
52
|
+
"globals": "^16.5.0",
|
|
53
|
+
"postcss": "^8.5.6",
|
|
54
|
+
"tailwindcss": "^3.4.19",
|
|
55
|
+
"terser": "^5.44.1",
|
|
56
|
+
"tsup": "^8.5.1",
|
|
57
|
+
"typescript": "~5.9.3",
|
|
58
|
+
"typescript-eslint": "^8.46.4",
|
|
59
|
+
"vite": "^7.2.4",
|
|
60
|
+
"vite-plugin-dts": "^4.3.0"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@mediapipe/camera_utils": "^0.3.1675466862",
|
|
64
|
+
"@mediapipe/drawing_utils": "^0.3.1675466124",
|
|
65
|
+
"@mediapipe/face_detection": "^0.4.1646425229",
|
|
66
|
+
"@mediapipe/face_mesh": "^0.4.1633559619",
|
|
67
|
+
"qrcode.react": "^4.2.0",
|
|
68
|
+
"react-router-dom": "^7.11.0"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
72
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/App.tsx
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
|
2
|
-
import QRCodePage from './pages/QRCodePage';
|
|
3
|
-
import MobileRoute from './pages/MobileRoute';
|
|
4
|
-
|
|
5
|
-
function App() {
|
|
6
|
-
return (
|
|
7
|
-
<BrowserRouter>
|
|
8
|
-
<Routes>
|
|
9
|
-
<Route path="/" element={<Navigate to="/qr" replace />} />
|
|
10
|
-
<Route path="/qr" element={<QRCodePage />} />
|
|
11
|
-
<Route path="/mobileroute" element={<MobileRoute />} />
|
|
12
|
-
</Routes>
|
|
13
|
-
</BrowserRouter>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default App;
|
|
1
|
+
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
|
2
|
+
import QRCodePage from './pages/QRCodePage';
|
|
3
|
+
import MobileRoute from './pages/MobileRoute';
|
|
4
|
+
|
|
5
|
+
function App() {
|
|
6
|
+
return (
|
|
7
|
+
<BrowserRouter>
|
|
8
|
+
<Routes>
|
|
9
|
+
<Route path="/" element={<Navigate to="/qr" replace />} />
|
|
10
|
+
<Route path="/qr" element={<QRCodePage />} />
|
|
11
|
+
<Route path="/mobileroute" element={<MobileRoute />} />
|
|
12
|
+
</Routes>
|
|
13
|
+
</BrowserRouter>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default App;
|
|
@@ -22,7 +22,7 @@ export const KycFlow: React.FC<KycFlowProps> = ({
|
|
|
22
22
|
deviceType,
|
|
23
23
|
startAtQr = true,
|
|
24
24
|
onClose,
|
|
25
|
-
mobileBaseUrl = 'https://
|
|
25
|
+
mobileBaseUrl = 'https://kyc-sdk.astraprotocol.com',
|
|
26
26
|
}) => {
|
|
27
27
|
const [currentView, setCurrentView] = useState<KycFlowView>(startAtQr ? 'qr' : 'mobileroute');
|
|
28
28
|
|