@embarkai/ui-kit 0.2.3 → 0.2.5
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 +5 -5
- package/dist/iframe/main.js.map +1 -1
- package/dist/index.cjs +10 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7710,7 +7710,7 @@ async function linkPasskeyWithWebAuthn(optionsOverride) {
|
|
|
7710
7710
|
const challenge = new Uint8Array(32);
|
|
7711
7711
|
crypto.getRandomValues(challenge);
|
|
7712
7712
|
publicKeyOptions = {
|
|
7713
|
-
rp: { name: window.location.hostname || "
|
|
7713
|
+
rp: { name: window.location.hostname || "EmbarkAI Wallet" },
|
|
7714
7714
|
user: {
|
|
7715
7715
|
id: new TextEncoder().encode(userId),
|
|
7716
7716
|
name: userId,
|
|
@@ -7725,7 +7725,7 @@ async function linkPasskeyWithWebAuthn(optionsOverride) {
|
|
|
7725
7725
|
}
|
|
7726
7726
|
try {
|
|
7727
7727
|
const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
7728
|
-
const friendlyDisplay = `
|
|
7728
|
+
const friendlyDisplay = `EmbarkAI Wallet (${ts})`;
|
|
7729
7729
|
const friendlyName = `lumia-passport.${ts}`;
|
|
7730
7730
|
const originalUser = publicKeyOptions.user;
|
|
7731
7731
|
publicKeyOptions = {
|
|
@@ -7915,7 +7915,7 @@ var init_cloudStorage = __esm({
|
|
|
7915
7915
|
return this.performUpload(metadata, content);
|
|
7916
7916
|
}
|
|
7917
7917
|
async uploadToAppFolder(fileName, content) {
|
|
7918
|
-
const folderName = "
|
|
7918
|
+
const folderName = "EmbarkAI Wallet Backups";
|
|
7919
7919
|
const folderId = await this.findOrCreateFolder(folderName);
|
|
7920
7920
|
const metadata = {
|
|
7921
7921
|
name: fileName,
|
|
@@ -15544,7 +15544,7 @@ var init_package = __esm({
|
|
|
15544
15544
|
"package.json"() {
|
|
15545
15545
|
package_default = {
|
|
15546
15546
|
name: "@embarkai/ui-kit",
|
|
15547
|
-
version: "0.2.
|
|
15547
|
+
version: "0.2.5",
|
|
15548
15548
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
15549
15549
|
type: "module",
|
|
15550
15550
|
main: "./dist/index.cjs",
|
|
@@ -15698,7 +15698,7 @@ function Footer() {
|
|
|
15698
15698
|
onClick: () => address && window.open(`${getExplorerUrl()}/address/${address}`, "_blank"),
|
|
15699
15699
|
children: [
|
|
15700
15700
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ChainIcon, { className: "flex-none w-6 h-6" }),
|
|
15701
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-xs font-bold", children: chainConfig.name || "
|
|
15701
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-xs font-bold", children: chainConfig.name || "EmbarkAI Wallet" })
|
|
15702
15702
|
]
|
|
15703
15703
|
}
|
|
15704
15704
|
),
|
|
@@ -15827,7 +15827,7 @@ function Header() {
|
|
|
15827
15827
|
"text-[14px] leading-4 truncate max-w-[144px] font-medium",
|
|
15828
15828
|
"text-ellipsis overflow-hidden whitespace-nowrap"
|
|
15829
15829
|
),
|
|
15830
|
-
children: displayName || config.current?.ui?.title || "
|
|
15830
|
+
children: displayName || config.current?.ui?.title || "EmbarkAI"
|
|
15831
15831
|
}
|
|
15832
15832
|
),
|
|
15833
15833
|
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(KYCStatus, {})
|
|
@@ -18987,7 +18987,7 @@ var init_iframe_manager = __esm({
|
|
|
18987
18987
|
});
|
|
18988
18988
|
|
|
18989
18989
|
// src/config/rainbowkit.ts
|
|
18990
|
-
var import_read13, import_rainbowkit2, import_wallets, import_chains, getProjectId, WALLET_MAP, createRainbowConfig,
|
|
18990
|
+
var import_read13, import_rainbowkit2, import_wallets, import_chains, getProjectId, WALLET_MAP, createRainbowConfig, rainbowTheme;
|
|
18991
18991
|
var init_rainbowkit = __esm({
|
|
18992
18992
|
"src/config/rainbowkit.ts"() {
|
|
18993
18993
|
import_read13 = require("@embarkai/core/read");
|
|
@@ -19010,7 +19010,7 @@ var init_rainbowkit = __esm({
|
|
|
19010
19010
|
createRainbowConfig = (options) => {
|
|
19011
19011
|
const opts = typeof options === "string" ? { projectId: options } : options || {};
|
|
19012
19012
|
const config = {
|
|
19013
|
-
appName: "
|
|
19013
|
+
appName: "EmbarkAI Wallet",
|
|
19014
19014
|
projectId: getProjectId(opts.projectId),
|
|
19015
19015
|
chains: [import_read13.lumiaMainnetChain, import_read13.lumiaTestnetChain, import_chains.mainnet, import_chains.polygon, import_chains.bsc, import_chains.arbitrum, import_chains.optimism, import_chains.avalanche, import_chains.base, import_chains.zora],
|
|
19016
19016
|
ssr: false
|
|
@@ -19024,7 +19024,6 @@ var init_rainbowkit = __esm({
|
|
|
19024
19024
|
}
|
|
19025
19025
|
return (0, import_rainbowkit2.getDefaultConfig)(config);
|
|
19026
19026
|
};
|
|
19027
|
-
rainbowConfig = createRainbowConfig();
|
|
19028
19027
|
rainbowTheme = {
|
|
19029
19028
|
lightMode: {
|
|
19030
19029
|
colors: {
|
|
@@ -19220,7 +19219,7 @@ var init_rainbowkit = __esm({
|
|
|
19220
19219
|
function RainbowKitProvider({ children }) {
|
|
19221
19220
|
const config = useProviderConfig().config;
|
|
19222
19221
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
19223
|
-
const
|
|
19222
|
+
const rainbowConfig = (0, import_react66.useMemo)(
|
|
19224
19223
|
() => createRainbowConfig({
|
|
19225
19224
|
projectId: config.current?.wallet?.walletConnectProjectId,
|
|
19226
19225
|
allowedWallets: config.current?.wallet?.allowedWallets
|
|
@@ -19242,7 +19241,7 @@ function RainbowKitProvider({ children }) {
|
|
|
19242
19241
|
};
|
|
19243
19242
|
}, [colorMode]);
|
|
19244
19243
|
if (!config.current?.wallet?.enabled) return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_jsx_runtime94.Fragment, { children });
|
|
19245
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_wagmi4.WagmiProvider, { config:
|
|
19244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_wagmi4.WagmiProvider, { config: rainbowConfig, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_rainbowkit3.RainbowKitProvider, { theme: customTheme, modalSize: "compact", showRecentTransactions: true, children }) });
|
|
19246
19245
|
}
|
|
19247
19246
|
var import_rainbowkit3, import_react66, import_wagmi4, import_styles, import_jsx_runtime94;
|
|
19248
19247
|
var init_RainbowKitContext = __esm({
|
|
@@ -19325,9 +19324,6 @@ var init_WagmiContext = __esm({
|
|
|
19325
19324
|
function Provider(props) {
|
|
19326
19325
|
const { children, projectId, initialConfig = {}, callbacks } = props;
|
|
19327
19326
|
const callbacksRef = (0, import_react67.useRef)(callbacks);
|
|
19328
|
-
(0, import_react67.useEffect)(() => {
|
|
19329
|
-
callbacksRef.current = callbacks;
|
|
19330
|
-
}, [callbacks]);
|
|
19331
19327
|
(0, import_react67.useEffect)(() => notifyNoProjetctId(projectId), [projectId]);
|
|
19332
19328
|
const config = (0, import_react67.useRef)((0, import_lodash_es6.merge)({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
|
|
19333
19329
|
const updateConfig = (0, import_react67.useCallback)((updates) => {
|