@embarkai/ui-kit 0.4.122 → 0.4.123
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/index.cjs +18 -11
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -11
- package/package.json +1 -1
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>EmbarkAI Secure Wallet - iframe version 0.4.
|
|
18
|
+
<title>EmbarkAI Secure Wallet - iframe version 0.4.123</title>
|
|
19
19
|
|
|
20
20
|
<!-- Styles will be injected by build process -->
|
|
21
21
|
<style>
|
package/dist/iframe/main.js
CHANGED
|
@@ -6342,7 +6342,7 @@ var SigningManager = class extends TokenRefreshApiClient {
|
|
|
6342
6342
|
};
|
|
6343
6343
|
|
|
6344
6344
|
// src/iframe/main.ts
|
|
6345
|
-
var IFRAME_VERSION = "0.4.
|
|
6345
|
+
var IFRAME_VERSION = "0.4.123";
|
|
6346
6346
|
var IframeWallet = class {
|
|
6347
6347
|
// private finchpay: FinchPayRampAPI
|
|
6348
6348
|
// private rampnow: RampnowOnrampAPI
|
package/dist/index.cjs
CHANGED
|
@@ -11780,9 +11780,9 @@ var init_useOnboardingStore = __esm({
|
|
|
11780
11780
|
useOnboardingStore = (0, import_zustand6.create)((set) => ({
|
|
11781
11781
|
isTourAvailable: false,
|
|
11782
11782
|
setIsTourAvailable: (isTourAvailable) => set({ isTourAvailable }),
|
|
11783
|
-
elRect: { x:
|
|
11783
|
+
elRect: { x: 0, y: 0, width: 0, height: 0 },
|
|
11784
11784
|
setElRect: (elRect) => set({ elRect }),
|
|
11785
|
-
mountIntoNode:
|
|
11785
|
+
mountIntoNode: null,
|
|
11786
11786
|
setMountIntoNode: (mountIntoNode) => set({ mountIntoNode })
|
|
11787
11787
|
}));
|
|
11788
11788
|
}
|
|
@@ -11802,7 +11802,8 @@ var init_onboarder = __esm({
|
|
|
11802
11802
|
elements = /* @__PURE__ */ new Map();
|
|
11803
11803
|
/** deferred DOM observer */
|
|
11804
11804
|
domObserverTimer = null;
|
|
11805
|
-
domObserver =
|
|
11805
|
+
domObserver = null;
|
|
11806
|
+
onDomMutation = ([domMutation]) => {
|
|
11806
11807
|
if (this.domObserverTimer) clearTimeout(this.domObserverTimer);
|
|
11807
11808
|
this.domObserverTimer = setTimeout(() => {
|
|
11808
11809
|
const elId = this.tour[this.tourPointer]?.elId;
|
|
@@ -11812,10 +11813,11 @@ var init_onboarder = __esm({
|
|
|
11812
11813
|
elementRef.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
11813
11814
|
useOnboardingStore.getState().setElRect({ x, y, width, height });
|
|
11814
11815
|
}, 200);
|
|
11815
|
-
}
|
|
11816
|
+
};
|
|
11816
11817
|
/** deferred resize observer */
|
|
11817
11818
|
resizeObserverTimer = null;
|
|
11818
|
-
resizeObserver =
|
|
11819
|
+
resizeObserver = null;
|
|
11820
|
+
onResize = (entries) => {
|
|
11819
11821
|
if (this.resizeObserverTimer) clearTimeout(this.resizeObserverTimer);
|
|
11820
11822
|
this.resizeObserverTimer = setTimeout(() => {
|
|
11821
11823
|
for (const entry of entries) {
|
|
@@ -11832,16 +11834,19 @@ var init_onboarder = __esm({
|
|
|
11832
11834
|
useOnboardingStore.getState().setElRect(elRectData);
|
|
11833
11835
|
}
|
|
11834
11836
|
}, 200);
|
|
11835
|
-
}
|
|
11837
|
+
};
|
|
11836
11838
|
/** TOUR */
|
|
11837
11839
|
startTour(tour) {
|
|
11838
11840
|
if (!tour || tour.length === 0) return;
|
|
11839
11841
|
this.tourPointer = 0;
|
|
11840
11842
|
this.tour = tour;
|
|
11843
|
+
useOnboardingStore.getState().setElRect({ x: window.innerWidth / 2, y: window.innerHeight / 2, width: 0, height: 0 });
|
|
11841
11844
|
useLayoutDataStore.getInitialState().setIsOnboarding(true);
|
|
11842
11845
|
useLayoutStore.getInitialState().setIsDialogForced(true);
|
|
11843
11846
|
const startElRef = this.elements.get(tour[0].elId)?.deref();
|
|
11844
11847
|
if (!!startElRef) {
|
|
11848
|
+
this.domObserver ??= new MutationObserver(this.onDomMutation);
|
|
11849
|
+
this.resizeObserver ??= new ResizeObserver(this.onResize);
|
|
11845
11850
|
this.domObserver.observe(startElRef, { childList: true, subtree: true });
|
|
11846
11851
|
this.resizeObserver.observe(startElRef);
|
|
11847
11852
|
this.resizeObserver.observe(document.body);
|
|
@@ -11850,8 +11855,8 @@ var init_onboarder = __esm({
|
|
|
11850
11855
|
endTour() {
|
|
11851
11856
|
this.tour = null;
|
|
11852
11857
|
this.tourPointer = 0;
|
|
11853
|
-
this.domObserver
|
|
11854
|
-
this.resizeObserver
|
|
11858
|
+
this.domObserver?.disconnect();
|
|
11859
|
+
this.resizeObserver?.disconnect();
|
|
11855
11860
|
useOnboardingStore.getState().setElRect({ x: window.innerWidth / 2, y: window.innerHeight / 2, width: 0, height: 0 });
|
|
11856
11861
|
setTimeout(() => {
|
|
11857
11862
|
useLayoutDataStore.getInitialState().setIsOnboarding(false);
|
|
@@ -11863,14 +11868,16 @@ var init_onboarder = __esm({
|
|
|
11863
11868
|
const curStep = this.tour[this.tourPointer];
|
|
11864
11869
|
curStep?.onNext?.();
|
|
11865
11870
|
if (this.tourPointer === this.tour.length - 1) return this.endTour();
|
|
11866
|
-
this.resizeObserver
|
|
11867
|
-
this.domObserver
|
|
11871
|
+
this.resizeObserver?.disconnect();
|
|
11872
|
+
this.domObserver?.disconnect();
|
|
11868
11873
|
setTimeout(() => {
|
|
11869
11874
|
const nextStepPointer = this.tourPointer + 1;
|
|
11870
11875
|
this.tourPointer = nextStepPointer;
|
|
11871
11876
|
const nextStep = this.tour[nextStepPointer];
|
|
11872
11877
|
const nextElRef = this.elements.get(nextStep.elId)?.deref();
|
|
11873
11878
|
if (!!nextElRef) {
|
|
11879
|
+
this.domObserver ??= new MutationObserver(this.onDomMutation);
|
|
11880
|
+
this.resizeObserver ??= new ResizeObserver(this.onResize);
|
|
11874
11881
|
this.domObserver.observe(nextElRef, { childList: true, subtree: true });
|
|
11875
11882
|
this.resizeObserver.observe(nextElRef);
|
|
11876
11883
|
this.resizeObserver.observe(document.body);
|
|
@@ -30423,7 +30430,7 @@ var init_package = __esm({
|
|
|
30423
30430
|
"package.json"() {
|
|
30424
30431
|
package_default = {
|
|
30425
30432
|
name: "@embarkai/ui-kit",
|
|
30426
|
-
version: "0.4.
|
|
30433
|
+
version: "0.4.123",
|
|
30427
30434
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
30428
30435
|
type: "module",
|
|
30429
30436
|
main: "./dist/index.cjs",
|
package/dist/index.d.cts
CHANGED
|
@@ -1256,9 +1256,11 @@ declare class Onboarder {
|
|
|
1256
1256
|
/** deferred DOM observer */
|
|
1257
1257
|
private domObserverTimer;
|
|
1258
1258
|
private domObserver;
|
|
1259
|
+
private onDomMutation;
|
|
1259
1260
|
/** deferred resize observer */
|
|
1260
1261
|
private resizeObserverTimer;
|
|
1261
1262
|
private resizeObserver;
|
|
1263
|
+
private onResize;
|
|
1262
1264
|
/** TOUR */
|
|
1263
1265
|
startTour(tour: TourStep[]): void;
|
|
1264
1266
|
endTour(): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1256,9 +1256,11 @@ declare class Onboarder {
|
|
|
1256
1256
|
/** deferred DOM observer */
|
|
1257
1257
|
private domObserverTimer;
|
|
1258
1258
|
private domObserver;
|
|
1259
|
+
private onDomMutation;
|
|
1259
1260
|
/** deferred resize observer */
|
|
1260
1261
|
private resizeObserverTimer;
|
|
1261
1262
|
private resizeObserver;
|
|
1263
|
+
private onResize;
|
|
1262
1264
|
/** TOUR */
|
|
1263
1265
|
startTour(tour: TourStep[]): void;
|
|
1264
1266
|
endTour(): void;
|
package/dist/index.js
CHANGED
|
@@ -11745,9 +11745,9 @@ var init_useOnboardingStore = __esm({
|
|
|
11745
11745
|
useOnboardingStore = create6((set) => ({
|
|
11746
11746
|
isTourAvailable: false,
|
|
11747
11747
|
setIsTourAvailable: (isTourAvailable) => set({ isTourAvailable }),
|
|
11748
|
-
elRect: { x:
|
|
11748
|
+
elRect: { x: 0, y: 0, width: 0, height: 0 },
|
|
11749
11749
|
setElRect: (elRect) => set({ elRect }),
|
|
11750
|
-
mountIntoNode:
|
|
11750
|
+
mountIntoNode: null,
|
|
11751
11751
|
setMountIntoNode: (mountIntoNode) => set({ mountIntoNode })
|
|
11752
11752
|
}));
|
|
11753
11753
|
}
|
|
@@ -11767,7 +11767,8 @@ var init_onboarder = __esm({
|
|
|
11767
11767
|
elements = /* @__PURE__ */ new Map();
|
|
11768
11768
|
/** deferred DOM observer */
|
|
11769
11769
|
domObserverTimer = null;
|
|
11770
|
-
domObserver =
|
|
11770
|
+
domObserver = null;
|
|
11771
|
+
onDomMutation = ([domMutation]) => {
|
|
11771
11772
|
if (this.domObserverTimer) clearTimeout(this.domObserverTimer);
|
|
11772
11773
|
this.domObserverTimer = setTimeout(() => {
|
|
11773
11774
|
const elId = this.tour[this.tourPointer]?.elId;
|
|
@@ -11777,10 +11778,11 @@ var init_onboarder = __esm({
|
|
|
11777
11778
|
elementRef.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
11778
11779
|
useOnboardingStore.getState().setElRect({ x, y, width, height });
|
|
11779
11780
|
}, 200);
|
|
11780
|
-
}
|
|
11781
|
+
};
|
|
11781
11782
|
/** deferred resize observer */
|
|
11782
11783
|
resizeObserverTimer = null;
|
|
11783
|
-
resizeObserver =
|
|
11784
|
+
resizeObserver = null;
|
|
11785
|
+
onResize = (entries) => {
|
|
11784
11786
|
if (this.resizeObserverTimer) clearTimeout(this.resizeObserverTimer);
|
|
11785
11787
|
this.resizeObserverTimer = setTimeout(() => {
|
|
11786
11788
|
for (const entry of entries) {
|
|
@@ -11797,16 +11799,19 @@ var init_onboarder = __esm({
|
|
|
11797
11799
|
useOnboardingStore.getState().setElRect(elRectData);
|
|
11798
11800
|
}
|
|
11799
11801
|
}, 200);
|
|
11800
|
-
}
|
|
11802
|
+
};
|
|
11801
11803
|
/** TOUR */
|
|
11802
11804
|
startTour(tour) {
|
|
11803
11805
|
if (!tour || tour.length === 0) return;
|
|
11804
11806
|
this.tourPointer = 0;
|
|
11805
11807
|
this.tour = tour;
|
|
11808
|
+
useOnboardingStore.getState().setElRect({ x: window.innerWidth / 2, y: window.innerHeight / 2, width: 0, height: 0 });
|
|
11806
11809
|
useLayoutDataStore.getInitialState().setIsOnboarding(true);
|
|
11807
11810
|
useLayoutStore.getInitialState().setIsDialogForced(true);
|
|
11808
11811
|
const startElRef = this.elements.get(tour[0].elId)?.deref();
|
|
11809
11812
|
if (!!startElRef) {
|
|
11813
|
+
this.domObserver ??= new MutationObserver(this.onDomMutation);
|
|
11814
|
+
this.resizeObserver ??= new ResizeObserver(this.onResize);
|
|
11810
11815
|
this.domObserver.observe(startElRef, { childList: true, subtree: true });
|
|
11811
11816
|
this.resizeObserver.observe(startElRef);
|
|
11812
11817
|
this.resizeObserver.observe(document.body);
|
|
@@ -11815,8 +11820,8 @@ var init_onboarder = __esm({
|
|
|
11815
11820
|
endTour() {
|
|
11816
11821
|
this.tour = null;
|
|
11817
11822
|
this.tourPointer = 0;
|
|
11818
|
-
this.domObserver
|
|
11819
|
-
this.resizeObserver
|
|
11823
|
+
this.domObserver?.disconnect();
|
|
11824
|
+
this.resizeObserver?.disconnect();
|
|
11820
11825
|
useOnboardingStore.getState().setElRect({ x: window.innerWidth / 2, y: window.innerHeight / 2, width: 0, height: 0 });
|
|
11821
11826
|
setTimeout(() => {
|
|
11822
11827
|
useLayoutDataStore.getInitialState().setIsOnboarding(false);
|
|
@@ -11828,14 +11833,16 @@ var init_onboarder = __esm({
|
|
|
11828
11833
|
const curStep = this.tour[this.tourPointer];
|
|
11829
11834
|
curStep?.onNext?.();
|
|
11830
11835
|
if (this.tourPointer === this.tour.length - 1) return this.endTour();
|
|
11831
|
-
this.resizeObserver
|
|
11832
|
-
this.domObserver
|
|
11836
|
+
this.resizeObserver?.disconnect();
|
|
11837
|
+
this.domObserver?.disconnect();
|
|
11833
11838
|
setTimeout(() => {
|
|
11834
11839
|
const nextStepPointer = this.tourPointer + 1;
|
|
11835
11840
|
this.tourPointer = nextStepPointer;
|
|
11836
11841
|
const nextStep = this.tour[nextStepPointer];
|
|
11837
11842
|
const nextElRef = this.elements.get(nextStep.elId)?.deref();
|
|
11838
11843
|
if (!!nextElRef) {
|
|
11844
|
+
this.domObserver ??= new MutationObserver(this.onDomMutation);
|
|
11845
|
+
this.resizeObserver ??= new ResizeObserver(this.onResize);
|
|
11839
11846
|
this.domObserver.observe(nextElRef, { childList: true, subtree: true });
|
|
11840
11847
|
this.resizeObserver.observe(nextElRef);
|
|
11841
11848
|
this.resizeObserver.observe(document.body);
|
|
@@ -30326,7 +30333,7 @@ var init_package = __esm({
|
|
|
30326
30333
|
"package.json"() {
|
|
30327
30334
|
package_default = {
|
|
30328
30335
|
name: "@embarkai/ui-kit",
|
|
30329
|
-
version: "0.4.
|
|
30336
|
+
version: "0.4.123",
|
|
30330
30337
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
30331
30338
|
type: "module",
|
|
30332
30339
|
main: "./dist/index.cjs",
|