@embarkai/ui-kit 0.4.128 → 0.6.9
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 +6 -7
- package/dist/iframe/_headers +7 -11
- package/dist/iframe/index.html +1 -1
- package/dist/iframe/kyc/sumsub.html +1 -1
- package/dist/iframe/main.js +3200 -646
- package/dist/iframe/oauth/telegram.html +1 -1
- package/dist/iframe/oauth/telegram.js +19 -3
- package/dist/iframe/oauth/x.html +1 -1
- package/dist/iframe/oauth/x.js +60 -0
- package/dist/index.cjs +33671 -31717
- package/dist/index.d.cts +810 -293
- package/dist/index.d.ts +810 -293
- package/dist/index.js +33538 -31572
- package/dist/styles.css +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @embarkai/ui-kit
|
|
2
2
|
|
|
3
|
-
React UI components and hooks for
|
|
3
|
+
React UI components and hooks for embarkAI - a secure, user-friendly authentication and Account Abstraction wallet solution with MPC (Multi-Party Computation) key management.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -165,7 +165,7 @@ function Root() {
|
|
|
165
165
|
return (
|
|
166
166
|
<QueryClientProvider client={queryClient}>
|
|
167
167
|
<Provider
|
|
168
|
-
projectId="your-project-id" // Get from
|
|
168
|
+
projectId="your-project-id" // Get from embarkAI Dashboard
|
|
169
169
|
>
|
|
170
170
|
<YourDapp />
|
|
171
171
|
</Provider>
|
|
@@ -297,7 +297,6 @@ The SDK uses the following priority for determining the active chain:
|
|
|
297
297
|
mpcSecurity: true,
|
|
298
298
|
strictMode: false,
|
|
299
299
|
requestDeduplication: true,
|
|
300
|
-
kycNeeded: false,
|
|
301
300
|
displayNameNeeded: false,
|
|
302
301
|
showActiveBalanceAsFiat: false,
|
|
303
302
|
},
|
|
@@ -357,7 +356,7 @@ The SDK uses the following priority for determining the active chain:
|
|
|
357
356
|
|
|
358
357
|
## Using Hooks
|
|
359
358
|
|
|
360
|
-
> **Note:** The `useSession` hook is based on pure Zustand store so if you're already using useSession hook please consider 2 options: 1) refactor state extarction so it uses zustand state extraction feature. 2) consider using dedicated
|
|
359
|
+
> **Note:** The `useSession` hook is based on pure Zustand store so if you're already using useSession hook please consider 2 options: 1) refactor state extarction so it uses zustand state extraction feature. 2) consider using dedicated embarkAI shared store values hooks: `useAccountSession`, `useAddress` etc. Otherwise you might experience excessive re-rendering issues as embarkAI shares its internal store and might update some state values which should not affect app render.
|
|
361
360
|
|
|
362
361
|
```tsx
|
|
363
362
|
import { useAccountSession, useLoadingStatus } from '@embarkai/ui-kit'
|
|
@@ -384,7 +383,7 @@ function MyComponent() {
|
|
|
384
383
|
}
|
|
385
384
|
```
|
|
386
385
|
|
|
387
|
-
###
|
|
386
|
+
### embarkAI hared store values hooks
|
|
388
387
|
|
|
389
388
|
- **useActiveChainId** - Returns current ChainID
|
|
390
389
|
- **useIsMobileView** - Returns boolean indicating if UI is in mobile view mode
|
|
@@ -786,9 +785,9 @@ function PrepareBatchExample() {
|
|
|
786
785
|
}
|
|
787
786
|
```
|
|
788
787
|
|
|
789
|
-
### useOpenPage - Programmatic
|
|
788
|
+
### useOpenPage - Programmatic embarkAI Dialog Control
|
|
790
789
|
|
|
791
|
-
Control the
|
|
790
|
+
Control the embarkAI dialog programmatically.
|
|
792
791
|
|
|
793
792
|
```tsx
|
|
794
793
|
import { PageKey, useOpenPage } from '@embarkai/ui-kit'
|
package/dist/iframe/_headers
CHANGED
|
@@ -32,18 +32,14 @@
|
|
|
32
32
|
Access-Control-Allow-Methods: GET, OPTIONS
|
|
33
33
|
Access-Control-Allow-Headers: Content-Type
|
|
34
34
|
|
|
35
|
-
#
|
|
35
|
+
# Every iframe asset (main.js, oauth/*.js, kyc/sumsub.js, dkls23_wasm_bg.wasm) is
|
|
36
|
+
# served under a fixed, unhashed name, so it must be revalidated on each load.
|
|
37
|
+
# A long-lived immutable cache keeps the previous build on auth.* after a deploy
|
|
38
|
+
# until someone purges the zone cache. Revalidation is cheap: Pages answers
|
|
39
|
+
# 304 Not Modified via ETag when the file has not changed.
|
|
40
|
+
# Do not add a second Cache-Control for a narrower path (e.g. /*.js): Pages
|
|
41
|
+
# appends it to this one and the edge then honours the longer max-age.
|
|
36
42
|
Cache-Control: public, max-age=0, must-revalidate
|
|
37
43
|
|
|
38
|
-
/*.js
|
|
39
|
-
# Cache JavaScript files for 1 year
|
|
40
|
-
Cache-Control: public, max-age=31536000, immutable
|
|
41
|
-
|
|
42
|
-
/*.css
|
|
43
|
-
# Cache CSS files for 1 year
|
|
44
|
-
Cache-Control: public, max-age=31536000, immutable
|
|
45
|
-
|
|
46
44
|
/*.wasm
|
|
47
|
-
# Cache WASM files for 1 year
|
|
48
|
-
Cache-Control: public, max-age=31536000, immutable
|
|
49
45
|
Content-Type: application/wasm
|
package/dist/iframe/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<meta http-equiv="X-Content-Type-Options" content="nosniff" />
|
|
16
16
|
<meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
|
|
17
17
|
|
|
18
|
-
<title>
|
|
18
|
+
<title>embarkAI Secure Wallet - iframe version 0.6.9</title>
|
|
19
19
|
|
|
20
20
|
<!-- Styles will be injected by build process -->
|
|
21
21
|
<style>
|