@embarkai/ui-kit 0.4.120 → 0.4.122

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/index.js CHANGED
@@ -21589,7 +21589,7 @@ var init_SumsubIframe = __esm({
21589
21589
  src: iframeUrl,
21590
21590
  title: "Sumsub KYC Verification",
21591
21591
  className: "noScrollbars w-full border-0 rounded-[10px]",
21592
- sandbox: "allow-scripts allow-same-origin allow-forms allow-popups",
21592
+ sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
21593
21593
  allow: "camera; microphone; geolocation; clipboard-write",
21594
21594
  style: { height: isLoading || error ? 0 : height }
21595
21595
  },
@@ -22835,32 +22835,98 @@ var init_onboarding_setup5 = __esm({
22835
22835
  }
22836
22836
  });
22837
22837
 
22838
+ // src/internal/components/MainMenu/constants.ts
22839
+ import { ArrowRightLeftIcon, ChevronLeft, ChevronRight as ChevronRight4, DollarSign as DollarSign2 } from "lucide-react";
22840
+ var MAIN_MENU_BUTTONS;
22841
+ var init_constants7 = __esm({
22842
+ "src/internal/components/MainMenu/constants.ts"() {
22843
+ MAIN_MENU_BUTTONS = [
22844
+ {
22845
+ id: "send",
22846
+ page: "send" /* SEND */,
22847
+ onboardingId: "mainmenu-send-button" /* sendButton */,
22848
+ label: "passport:main.send",
22849
+ icon: ChevronRight4,
22850
+ pageParams: { sendFlow: "send" }
22851
+ },
22852
+ {
22853
+ id: "bridge",
22854
+ page: "send" /* SEND */,
22855
+ onboardingId: "mainmenu-bridge-button" /* bridgeButton */,
22856
+ label: "passport:main.bridge",
22857
+ icon: ArrowRightLeftIcon,
22858
+ pageParams: { sendFlow: "bridge" }
22859
+ },
22860
+ {
22861
+ id: "receive",
22862
+ page: "receive" /* RECEIVE */,
22863
+ onboardingId: "mainmenu-receive-button" /* receiveButton */,
22864
+ label: "passport:main.receive",
22865
+ icon: ChevronLeft,
22866
+ pageParams: {}
22867
+ },
22868
+ {
22869
+ id: "buy",
22870
+ page: "buy" /* BUY */,
22871
+ onboardingId: "mainmenu-buy-button" /* buyButton */,
22872
+ label: "passport:main.buy",
22873
+ icon: DollarSign2,
22874
+ pageParams: {}
22875
+ }
22876
+ ];
22877
+ }
22878
+ });
22879
+
22838
22880
  // src/internal/components/MainMenu/MainMenu.tsx
22839
- import { ArrowRightLeftIcon, ChevronLeft, ChevronRight as ChevronRight4, DollarSign as DollarSign2, ListIcon } from "lucide-react";
22881
+ import { ListIcon } from "lucide-react";
22840
22882
  import { jsx as jsx97, jsxs as jsxs88 } from "react/jsx-runtime";
22841
22883
  function MainMenu() {
22884
+ const { config } = useProviderConfig();
22842
22885
  const { t } = useT();
22843
22886
  const { open: openEmbarkAI } = useOpenPage();
22844
22887
  const address = useSession((st) => st.address);
22845
22888
  useOnboardingTourAvailable(true);
22846
22889
  useProvidersList();
22890
+ const menuButtons = MAIN_MENU_BUTTONS.filter(({ id }) => {
22891
+ switch (id) {
22892
+ case "bridge":
22893
+ return !!config.current?.features?.showAssetBridge;
22894
+ default:
22895
+ return true;
22896
+ }
22897
+ });
22847
22898
  return /* @__PURE__ */ jsxs88(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
22848
- /* @__PURE__ */ jsx97("div", { className: "w-full grid grid-cols-4 gap-0 md:gap-[var(--ui-kit-gap)] py-[10px] md:py-1", children: MAIN_MENU_BUTTONS.map(({ page, onboardingId, label, icon: Icon2, pageParams }, btnIdx) => /* @__PURE__ */ jsxs88(
22849
- Button,
22899
+ /* @__PURE__ */ jsx97(
22900
+ "div",
22850
22901
  {
22851
- ref: (inst) => onboarder.registerElement(onboardingId, inst),
22852
- size: "large",
22853
- variant: "ghost",
22854
- disabled: !address,
22855
- className: "flex-col w-full h-fit p-0",
22856
- onClick: () => openEmbarkAI(page, pageParams),
22857
- children: [
22858
- /* @__PURE__ */ jsx97(Icon2, { className: "w-5 h-5 md:w-8 md:h-8" }),
22859
- /* @__PURE__ */ jsx97("span", { className: "text-xs font-semibold", children: t(label) })
22860
- ]
22861
- },
22862
- `${page}-${btnIdx}`
22863
- )) }),
22902
+ className: cn(
22903
+ //
22904
+ "grid w-full",
22905
+ "gap-0 md:gap-[var(--ui-kit-gap)]",
22906
+ "py-[10px] md:py-1",
22907
+ {
22908
+ "grid-cols-4": menuButtons.length === 4,
22909
+ "grid-cols-3": menuButtons.length < 4
22910
+ }
22911
+ ),
22912
+ children: menuButtons.map(({ page, onboardingId, label, icon: Icon2, pageParams }, btnIdx) => /* @__PURE__ */ jsxs88(
22913
+ Button,
22914
+ {
22915
+ ref: (inst) => onboarder.registerElement(onboardingId, inst),
22916
+ size: "large",
22917
+ variant: "ghost",
22918
+ disabled: !address,
22919
+ className: cn("flex-col w-full h-fit p-0"),
22920
+ onClick: () => openEmbarkAI(page, pageParams),
22921
+ children: [
22922
+ /* @__PURE__ */ jsx97(Icon2, { className: "w-5 h-5 md:w-8 md:h-8" }),
22923
+ /* @__PURE__ */ jsx97("span", { className: "text-xs font-semibold", children: t(label) })
22924
+ ]
22925
+ },
22926
+ `${page}-${btnIdx}`
22927
+ ))
22928
+ }
22929
+ ),
22864
22930
  /* @__PURE__ */ jsx97("div", { className: "w-full border-b border-[var(--ui-kit-bd)]" }),
22865
22931
  /* @__PURE__ */ jsxs88("div", { className: "w-full flex justify-between items-center", children: [
22866
22932
  /* @__PURE__ */ jsx97("span", { className: "pl-[var(--ui-kit-pd)] text-xl font-semibold", children: t("passport:main.assets") }),
@@ -22881,54 +22947,20 @@ function MainMenu() {
22881
22947
  /* @__PURE__ */ jsx97("div", { ref: (inst) => onboarder.registerElement("mainmenu-portfolio-section" /* portfolioSection */, inst), className: "w-full", children: /* @__PURE__ */ jsx97(PortfolioList, {}) })
22882
22948
  ] });
22883
22949
  }
22884
- var MAIN_MENU_BUTTONS;
22885
22950
  var init_MainMenu = __esm({
22886
22951
  "src/internal/components/MainMenu/MainMenu.tsx"() {
22952
+ init_ProviderContext();
22887
22953
  init_SessionContext();
22888
22954
  init_useOpenPage();
22889
22955
  init_useT();
22890
22956
  init_useLayoutDataStore();
22957
+ init_cn();
22891
22958
  init_Expandable2();
22892
22959
  init_ManageWalletMenu();
22893
22960
  init_Onboarding();
22894
22961
  init_PortfolioMenu2();
22895
22962
  init_button();
22896
- MAIN_MENU_BUTTONS = [
22897
- {
22898
- page: "send" /* SEND */,
22899
- onboardingId: "mainmenu-send-button" /* sendButton */,
22900
- label: "passport:main.send",
22901
- icon: ChevronRight4,
22902
- pageParams: { sendFlow: "send" }
22903
- },
22904
- {
22905
- page: "send" /* SEND */,
22906
- onboardingId: "mainmenu-bridge-button" /* bridgeButton */,
22907
- label: "passport:main.bridge",
22908
- icon: ArrowRightLeftIcon,
22909
- pageParams: { sendFlow: "bridge" }
22910
- },
22911
- {
22912
- page: "receive" /* RECEIVE */,
22913
- onboardingId: "mainmenu-receive-button" /* receiveButton */,
22914
- label: "passport:main.receive",
22915
- icon: ChevronLeft,
22916
- pageParams: {}
22917
- },
22918
- {
22919
- page: "buy" /* BUY */,
22920
- onboardingId: "mainmenu-buy-button" /* buyButton */,
22921
- label: "passport:main.buy",
22922
- icon: DollarSign2,
22923
- pageParams: {}
22924
- }
22925
- // {
22926
- // page: PageKey.ASSETS,
22927
- // onboardingId: MainMenuOnboardingID.portfolioButton,
22928
- // label: 'passport:main.assets',
22929
- // icon: Wallet2
22930
- // }
22931
- ];
22963
+ init_constants7();
22932
22964
  }
22933
22965
  });
22934
22966
 
@@ -23483,7 +23515,7 @@ var init_nickname_fingerprint = __esm({
23483
23515
 
23484
23516
  // src/internal/components/ReceiveMenu/ReceiveMenu.tsx
23485
23517
  import { useQuery as useQuery21 } from "@tanstack/react-query";
23486
- import { ArrowLeft as ArrowLeft19, AtSignIcon as AtSignIcon2, CheckCircle2 as CheckCircle24, Copy as Copy2, FingerprintIcon, LoaderIcon as LoaderIcon13, Wallet2Icon as Wallet2Icon4 } from "lucide-react";
23518
+ import { ArrowLeft as ArrowLeft19, AtSignIcon as AtSignIcon2, CheckCircle2 as CheckCircle24, Copy as Copy2, FingerprintIcon, LoaderIcon as LoaderIcon13, Wallet2Icon as Wallet2Icon3 } from "lucide-react";
23487
23519
  import QRCode from "qrcode";
23488
23520
  import { useEffect as useEffect40, useMemo as useMemo15, useState as useState24 } from "react";
23489
23521
  import { Fragment as Fragment35, jsx as jsx100, jsxs as jsxs91 } from "react/jsx-runtime";
@@ -23554,7 +23586,7 @@ function ReceiveMenu() {
23554
23586
  setTimeout(() => setAddressCopied(false), 2e3);
23555
23587
  },
23556
23588
  children: [
23557
- /* @__PURE__ */ jsx100(Wallet2Icon4, { className: "h-4 w-4 flex-none" }),
23589
+ /* @__PURE__ */ jsx100(Wallet2Icon3, { className: "h-4 w-4 flex-none" }),
23558
23590
  /* @__PURE__ */ jsxs91("span", { className: cn2("text-[10px] flex-1 block", { "text-[var(--ui-kit-bg-success)]": isAddressCopied }), children: [
23559
23591
  address.slice(0, 10),
23560
23592
  "...",
@@ -23720,7 +23752,7 @@ var init_useSecurityStore = __esm({
23720
23752
 
23721
23753
  // src/internal/components/SecurityMenu/constants.ts
23722
23754
  var KEYSHARE_RECOVERY_STATS_QUERY, CONNECTED_TRUSTED_APPS_QUERY;
23723
- var init_constants7 = __esm({
23755
+ var init_constants8 = __esm({
23724
23756
  "src/internal/components/SecurityMenu/constants.ts"() {
23725
23757
  KEYSHARE_RECOVERY_STATS_QUERY = "keyshare-recovery-stats-query";
23726
23758
  CONNECTED_TRUSTED_APPS_QUERY = "connected-trusted-apps-query";
@@ -23749,7 +23781,7 @@ var init_useConnectedApps = __esm({
23749
23781
  "src/internal/components/SecurityMenu/ConnectedApps/useConnectedApps.ts"() {
23750
23782
  init_SessionContext();
23751
23783
  init_httpClient();
23752
- init_constants7();
23784
+ init_constants8();
23753
23785
  }
23754
23786
  });
23755
23787
 
@@ -23974,7 +24006,7 @@ var init_UntrustApplication = __esm({
23974
24006
  init_iframe_manager();
23975
24007
  init_button();
23976
24008
  init_highlight();
23977
- init_constants7();
24009
+ init_constants8();
23978
24010
  init_useSecurityStore();
23979
24011
  }
23980
24012
  });
@@ -24130,7 +24162,7 @@ var init_useKeyshareRecoveryStats = __esm({
24130
24162
  init_keyshare();
24131
24163
  init_iframe_manager();
24132
24164
  init_vaultClient();
24133
- init_constants7();
24165
+ init_constants8();
24134
24166
  }
24135
24167
  });
24136
24168
 
@@ -24646,7 +24678,7 @@ var init_PolicyForm = __esm({
24646
24678
 
24647
24679
  // src/internal/components/SecurityMenu/UserPolicies/constants.ts
24648
24680
  var DEFAULT_POLICY_RULES;
24649
- var init_constants8 = __esm({
24681
+ var init_constants9 = __esm({
24650
24682
  "src/internal/components/SecurityMenu/UserPolicies/constants.ts"() {
24651
24683
  DEFAULT_POLICY_RULES = {
24652
24684
  destinations: { allow: [], deny: [] },
@@ -24839,7 +24871,7 @@ var init_UserPolicies = __esm({
24839
24871
  init_button();
24840
24872
  init_highlight();
24841
24873
  init_api4();
24842
- init_constants8();
24874
+ init_constants9();
24843
24875
  init_usePolicyForm();
24844
24876
  init_useUserAssetsPolicies();
24845
24877
  }
@@ -24853,7 +24885,7 @@ var init_UserPolicies2 = __esm({
24853
24885
  init_useUserAssetsPolicies();
24854
24886
  init_usePolicyForm();
24855
24887
  init_api4();
24856
- init_constants8();
24888
+ init_constants9();
24857
24889
  }
24858
24890
  });
24859
24891
 
@@ -26348,7 +26380,7 @@ var init_useBridgeBalance = __esm({
26348
26380
  });
26349
26381
 
26350
26382
  // src/internal/components/SendMenu/hyperbridge/steps/SelectStep.tsx
26351
- import { ArrowLeftRightIcon, ArrowRightLeftIcon as ArrowRightLeftIcon2, LoaderIcon as LoaderIcon18, Wallet2Icon as Wallet2Icon5, XIcon as XIcon2 } from "lucide-react";
26383
+ import { ArrowLeftRightIcon, ArrowRightLeftIcon as ArrowRightLeftIcon2, LoaderIcon as LoaderIcon18, Wallet2Icon as Wallet2Icon4, XIcon as XIcon2 } from "lucide-react";
26352
26384
  import { Fragment as Fragment39 } from "react";
26353
26385
  import { Fragment as Fragment40, jsx as jsx111, jsxs as jsxs101 } from "react/jsx-runtime";
26354
26386
  function SelectStep(props) {
@@ -26567,7 +26599,7 @@ function SelectStep(props) {
26567
26599
  disabled: isQuoteEstimating || !originChain || !destinationChain || !hyperRoute,
26568
26600
  placeholder: t("passport:bridgeMenu.labels.optionalRecipient") + " (ex: 0x...)",
26569
26601
  value: recipient || "",
26570
- Icon: Wallet2Icon5,
26602
+ Icon: Wallet2Icon4,
26571
26603
  onChange: (e) => {
26572
26604
  useFlowSelectorStore.getState().setError(null);
26573
26605
  useBridgeStore.getState().setRecipient(e.target.value);
@@ -29836,7 +29868,7 @@ var init_TransactionsMenu2 = __esm({
29836
29868
  // src/internal/components/SettingsMenu/constants.ts
29837
29869
  import { ActivityIcon, ArrowLeftRight, AtSign as AtSign4, DatabaseBackup as DatabaseBackup2, Link2, LockKeyhole, UsersRound } from "lucide-react";
29838
29870
  var NAV_BUTTONS;
29839
- var init_constants9 = __esm({
29871
+ var init_constants10 = __esm({
29840
29872
  "src/internal/components/SettingsMenu/constants.ts"() {
29841
29873
  init_icons();
29842
29874
  NAV_BUTTONS = [
@@ -29932,7 +29964,7 @@ var init_SettingsMenu = __esm({
29932
29964
  init_Onboarding();
29933
29965
  init_TransactionsMenu2();
29934
29966
  init_button();
29935
- init_constants9();
29967
+ init_constants10();
29936
29968
  }
29937
29969
  });
29938
29970
 
@@ -30294,7 +30326,7 @@ var init_package = __esm({
30294
30326
  "package.json"() {
30295
30327
  package_default = {
30296
30328
  name: "@embarkai/ui-kit",
30297
- version: "0.4.120",
30329
+ version: "0.4.122",
30298
30330
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
30299
30331
  type: "module",
30300
30332
  main: "./dist/index.cjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embarkai/ui-kit",
3
- "version": "0.4.120",
3
+ "version": "0.4.122",
4
4
  "description": "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",