@embarkai/ui-kit 0.4.106 → 0.4.107
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 +20 -10
- package/dist/index.js +20 -10
- 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.107</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.107";
|
|
6346
6346
|
var IframeWallet = class {
|
|
6347
6347
|
// private finchpay: FinchPayRampAPI
|
|
6348
6348
|
// private rampnow: RampnowOnrampAPI
|
package/dist/index.cjs
CHANGED
|
@@ -16816,9 +16816,12 @@ function ProviderCard(props) {
|
|
|
16816
16816
|
isPending: isConnectingExternalWallet,
|
|
16817
16817
|
variables: pendingConnectVariables,
|
|
16818
16818
|
isAvailable: isConnectExternalWalletAvailable
|
|
16819
|
-
} = useExternalWalletConnnect(
|
|
16820
|
-
|
|
16821
|
-
|
|
16819
|
+
} = useExternalWalletConnnect({
|
|
16820
|
+
// onSuccess: undefined,
|
|
16821
|
+
onError: ({ connector, error }) => {
|
|
16822
|
+
console.warn("[useExternalWalletConnect]", connector, error);
|
|
16823
|
+
}
|
|
16824
|
+
});
|
|
16822
16825
|
const { data: providers = [] } = useProvidersList();
|
|
16823
16826
|
if (!provider) {
|
|
16824
16827
|
console.warn("[ProviderCard] Received undefined provider");
|
|
@@ -16909,8 +16912,8 @@ function ProviderCard(props) {
|
|
|
16909
16912
|
disabled: disabled || isConnectingExternalWallet,
|
|
16910
16913
|
title: t("passport:common.delete"),
|
|
16911
16914
|
onClick: () => {
|
|
16912
|
-
setConfirmUnlink({ provider, providerName: info.name, externalId });
|
|
16913
|
-
setPage("unlink-provider" /* UNLINK_PROVIDER */);
|
|
16915
|
+
useManageWalletStore.getState().setConfirmUnlink({ provider, providerName: info.name, externalId });
|
|
16916
|
+
useLayoutDataStore.getState().setPage("unlink-provider" /* UNLINK_PROVIDER */);
|
|
16914
16917
|
},
|
|
16915
16918
|
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react30.Trash2Icon, { className: "w-4 h-4 text-[var(--ui-kit-bg-error)]" })
|
|
16916
16919
|
}
|
|
@@ -17403,7 +17406,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17403
17406
|
}
|
|
17404
17407
|
};
|
|
17405
17408
|
const completeExternalConnect = (connector, address, chainId) => {
|
|
17406
|
-
useLayoutDataStore.getState().setPage(walletMenuOpenedFrom || "
|
|
17409
|
+
useLayoutDataStore.getState().setPage(walletMenuOpenedFrom || "manage-wallet" /* MANAGE_WALLET */);
|
|
17407
17410
|
keepOrReleaseExternalWallet(connector, address, chainId);
|
|
17408
17411
|
};
|
|
17409
17412
|
const { mutateAsync: loginOrLinkWallet, isPending: isLoginOrLinkWallet } = (0, import_react_query25.useMutation)({
|
|
@@ -17570,7 +17573,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17570
17573
|
size: "icon",
|
|
17571
17574
|
title: t("passport:common.back"),
|
|
17572
17575
|
disabled: isConnectingExternalWallet || isLoginOrLinkWallet,
|
|
17573
|
-
onClick: () => useLayoutDataStore.getState().setPage(walletMenuOpenedFrom ?? "
|
|
17576
|
+
onClick: () => useLayoutDataStore.getState().setPage(walletMenuOpenedFrom ?? "manage-wallet" /* MANAGE_WALLET */),
|
|
17574
17577
|
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react33.ArrowLeft, { className: "h-4 w-4" })
|
|
17575
17578
|
}
|
|
17576
17579
|
),
|
|
@@ -17697,7 +17700,8 @@ var init_ConnectExternalWalletMenu = __esm({
|
|
|
17697
17700
|
});
|
|
17698
17701
|
|
|
17699
17702
|
// src/internal/components/ConnectExternalWalletMenu/useExternalWalletConnect.ts
|
|
17700
|
-
function useExternalWalletConnnect() {
|
|
17703
|
+
function useExternalWalletConnnect(options) {
|
|
17704
|
+
const { onSuccess, onError } = options || {};
|
|
17701
17705
|
const { config } = useProviderConfig();
|
|
17702
17706
|
const walletMode = config.current?.wallet?.mode;
|
|
17703
17707
|
const connectors = (0, import_wagmi4.useConnectors)();
|
|
@@ -17712,9 +17716,15 @@ function useExternalWalletConnnect() {
|
|
|
17712
17716
|
chainId,
|
|
17713
17717
|
connectorName: connector.name || "Unknown Wallet"
|
|
17714
17718
|
});
|
|
17719
|
+
onSuccess?.({ connected: true, address: signingWalletAddress });
|
|
17715
17720
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
17716
17721
|
},
|
|
17717
|
-
onError: (error,
|
|
17722
|
+
onError: (error, { connector }) => {
|
|
17723
|
+
onError?.({
|
|
17724
|
+
connected: false,
|
|
17725
|
+
connector: connector?.name || "Unknown Wallet",
|
|
17726
|
+
error
|
|
17727
|
+
});
|
|
17718
17728
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
17719
17729
|
}
|
|
17720
17730
|
}
|
|
@@ -30011,7 +30021,7 @@ var init_package = __esm({
|
|
|
30011
30021
|
"package.json"() {
|
|
30012
30022
|
package_default = {
|
|
30013
30023
|
name: "@embarkai/ui-kit",
|
|
30014
|
-
version: "0.4.
|
|
30024
|
+
version: "0.4.107",
|
|
30015
30025
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
30016
30026
|
type: "module",
|
|
30017
30027
|
main: "./dist/index.cjs",
|
package/dist/index.js
CHANGED
|
@@ -16770,9 +16770,12 @@ function ProviderCard(props) {
|
|
|
16770
16770
|
isPending: isConnectingExternalWallet,
|
|
16771
16771
|
variables: pendingConnectVariables,
|
|
16772
16772
|
isAvailable: isConnectExternalWalletAvailable
|
|
16773
|
-
} = useExternalWalletConnnect(
|
|
16774
|
-
|
|
16775
|
-
|
|
16773
|
+
} = useExternalWalletConnnect({
|
|
16774
|
+
// onSuccess: undefined,
|
|
16775
|
+
onError: ({ connector, error }) => {
|
|
16776
|
+
console.warn("[useExternalWalletConnect]", connector, error);
|
|
16777
|
+
}
|
|
16778
|
+
});
|
|
16776
16779
|
const { data: providers = [] } = useProvidersList();
|
|
16777
16780
|
if (!provider) {
|
|
16778
16781
|
console.warn("[ProviderCard] Received undefined provider");
|
|
@@ -16863,8 +16866,8 @@ function ProviderCard(props) {
|
|
|
16863
16866
|
disabled: disabled || isConnectingExternalWallet,
|
|
16864
16867
|
title: t("passport:common.delete"),
|
|
16865
16868
|
onClick: () => {
|
|
16866
|
-
setConfirmUnlink({ provider, providerName: info.name, externalId });
|
|
16867
|
-
setPage("unlink-provider" /* UNLINK_PROVIDER */);
|
|
16869
|
+
useManageWalletStore.getState().setConfirmUnlink({ provider, providerName: info.name, externalId });
|
|
16870
|
+
useLayoutDataStore.getState().setPage("unlink-provider" /* UNLINK_PROVIDER */);
|
|
16868
16871
|
},
|
|
16869
16872
|
children: /* @__PURE__ */ jsx71(Trash2Icon, { className: "w-4 h-4 text-[var(--ui-kit-bg-error)]" })
|
|
16870
16873
|
}
|
|
@@ -17366,7 +17369,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17366
17369
|
}
|
|
17367
17370
|
};
|
|
17368
17371
|
const completeExternalConnect = (connector, address, chainId) => {
|
|
17369
|
-
useLayoutDataStore.getState().setPage(walletMenuOpenedFrom || "
|
|
17372
|
+
useLayoutDataStore.getState().setPage(walletMenuOpenedFrom || "manage-wallet" /* MANAGE_WALLET */);
|
|
17370
17373
|
keepOrReleaseExternalWallet(connector, address, chainId);
|
|
17371
17374
|
};
|
|
17372
17375
|
const { mutateAsync: loginOrLinkWallet, isPending: isLoginOrLinkWallet } = useMutation10({
|
|
@@ -17533,7 +17536,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17533
17536
|
size: "icon",
|
|
17534
17537
|
title: t("passport:common.back"),
|
|
17535
17538
|
disabled: isConnectingExternalWallet || isLoginOrLinkWallet,
|
|
17536
|
-
onClick: () => useLayoutDataStore.getState().setPage(walletMenuOpenedFrom ?? "
|
|
17539
|
+
onClick: () => useLayoutDataStore.getState().setPage(walletMenuOpenedFrom ?? "manage-wallet" /* MANAGE_WALLET */),
|
|
17537
17540
|
children: /* @__PURE__ */ jsx74(ArrowLeft8, { className: "h-4 w-4" })
|
|
17538
17541
|
}
|
|
17539
17542
|
),
|
|
@@ -17656,7 +17659,8 @@ var init_ConnectExternalWalletMenu = __esm({
|
|
|
17656
17659
|
// src/internal/components/ConnectExternalWalletMenu/useExternalWalletConnect.ts
|
|
17657
17660
|
import { useCallback as useCallback18 } from "react";
|
|
17658
17661
|
import { useConnect as useConnect2, useConnectors as useConnectors2, useDisconnect as useDisconnect3 } from "wagmi";
|
|
17659
|
-
function useExternalWalletConnnect() {
|
|
17662
|
+
function useExternalWalletConnnect(options) {
|
|
17663
|
+
const { onSuccess, onError } = options || {};
|
|
17660
17664
|
const { config } = useProviderConfig();
|
|
17661
17665
|
const walletMode = config.current?.wallet?.mode;
|
|
17662
17666
|
const connectors = useConnectors2();
|
|
@@ -17671,9 +17675,15 @@ function useExternalWalletConnnect() {
|
|
|
17671
17675
|
chainId,
|
|
17672
17676
|
connectorName: connector.name || "Unknown Wallet"
|
|
17673
17677
|
});
|
|
17678
|
+
onSuccess?.({ connected: true, address: signingWalletAddress });
|
|
17674
17679
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
17675
17680
|
},
|
|
17676
|
-
onError: (error,
|
|
17681
|
+
onError: (error, { connector }) => {
|
|
17682
|
+
onError?.({
|
|
17683
|
+
connected: false,
|
|
17684
|
+
connector: connector?.name || "Unknown Wallet",
|
|
17685
|
+
error
|
|
17686
|
+
});
|
|
17677
17687
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
17678
17688
|
}
|
|
17679
17689
|
}
|
|
@@ -29912,7 +29922,7 @@ var init_package = __esm({
|
|
|
29912
29922
|
"package.json"() {
|
|
29913
29923
|
package_default = {
|
|
29914
29924
|
name: "@embarkai/ui-kit",
|
|
29915
|
-
version: "0.4.
|
|
29925
|
+
version: "0.4.107",
|
|
29916
29926
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
29917
29927
|
type: "module",
|
|
29918
29928
|
main: "./dist/index.cjs",
|