@lukso/up-connector 0.7.8 → 0.7.10-dev.2b7df2e

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.
@@ -483,6 +483,7 @@ var EoaConnectionView = class extends _mixins.withTheme.call(void 0,
483
483
  return _keyedjs.keyed.call(void 0,
484
484
  wallet.slug,
485
485
  _lit.html`<lukso-button
486
+ .theme=${this.theme}
486
487
  variant="secondary"
487
488
  size=${_optionalChain([this, 'access', _36 => _36.device, 'optionalAccess', _37 => _37.isMobile]) ? "medium" : "large"}
488
489
  is-full-width
@@ -498,9 +499,10 @@ var EoaConnectionView = class extends _mixins.withTheme.call(void 0,
498
499
  <div class="truncate">${wallet.name}</div>
499
500
  <div class="flex items-center">
500
501
  ${isInstalled ? _lit.html`<lukso-tag
501
- size="x-small"
502
+ size="${_optionalChain([this, 'access', _38 => _38.device, 'optionalAccess', _39 => _39.isMobile]) ? "x-small" : "small"}"
502
503
  text-color="green-45"
503
- background-color="green-85"
504
+ background-color="${this.theme === "dark" ? "neutral-20" : "neutral-100"}"
505
+ border-color="green-45"
504
506
  >
505
507
  ${this.formatMessage("connect_modal_installed")}
506
508
  </lukso-tag>` : _lit.nothing}
@@ -512,7 +514,7 @@ var EoaConnectionView = class extends _mixins.withTheme.call(void 0,
512
514
  // Loading state
513
515
  pending: () => _lit.html`${this.supportedWalletIds().map(
514
516
  () => renderPlaceholder(
515
- `w-full ${_optionalChain([this, 'access', _38 => _38.device, 'optionalAccess', _39 => _39.isMobile]) ? "h-10 !rounded-10" : "h-12 !rounded-12"}`
517
+ `w-full ${_optionalChain([this, 'access', _40 => _40.device, 'optionalAccess', _41 => _41.isMobile]) ? "h-10 !rounded-10" : "h-12 !rounded-12"}`
516
518
  )
517
519
  )}`,
518
520
  // Error state
@@ -584,7 +586,7 @@ var walletConnectDeepLinkUrl = (data, options) => {
584
586
  return "";
585
587
  }
586
588
  const dataUrl = new URL(data);
587
- if (_optionalChain([options, 'optionalAccess', _40 => _40.withRedirectUrl])) {
589
+ if (_optionalChain([options, 'optionalAccess', _42 => _42.withRedirectUrl])) {
588
590
  const redirectUrl = new URL(location.href);
589
591
  redirectUrl.searchParams.delete("modalTemplate");
590
592
  redirectUrl.searchParams.delete("modalSize");
@@ -618,7 +620,7 @@ var ConnectionView = class extends _mixins.withTheme.call(void 0,
618
620
  const connector = this.embeddedWalletConnector;
619
621
  try {
620
622
  logInfo3("Connecting via connector:", connector);
621
- await _optionalChain([connector, 'optionalAccess', _41 => _41.connect, 'call', _42 => _42()]);
623
+ await _optionalChain([connector, 'optionalAccess', _43 => _43.connect, 'call', _44 => _44()]);
622
624
  this.dispatchEvent(
623
625
  new CustomEvent("on-connect", {
624
626
  detail: { connector },
@@ -651,7 +653,7 @@ var ConnectionView = class extends _mixins.withTheme.call(void 0,
651
653
  this.isConnecting = true;
652
654
  this.connectingRdns = connector.rdns;
653
655
  const setup = getWagmiSetup();
654
- await _optionalChain([connector, 'access', _43 => _43.switchChain, 'optionalCall', _44 => _44({ chainId: _optionalChain([setup, 'optionalAccess', _45 => _45.chainId]) })]);
656
+ await _optionalChain([connector, 'access', _45 => _45.switchChain, 'optionalCall', _46 => _46({ chainId: _optionalChain([setup, 'optionalAccess', _47 => _47.chainId]) })]);
655
657
  await connector.connect();
656
658
  this.dispatchEvent(
657
659
  new CustomEvent("on-connect", {
@@ -685,13 +687,13 @@ var ConnectionView = class extends _mixins.withTheme.call(void 0,
685
687
  this.isConnecting = true;
686
688
  this.connectingRdns = connector.rdns;
687
689
  const connectPromise = connector.connect();
688
- const provider = await _optionalChain([connector, 'access', _46 => _46.getProvider, 'optionalCall', _47 => _47()]);
690
+ const provider = await _optionalChain([connector, 'access', _48 => _48.getProvider, 'optionalCall', _49 => _49()]);
689
691
  if (provider) {
690
692
  const handleDisplayUri = (displayUri) => {
691
693
  logInfo3("WalletConnect original URI:", displayUri);
692
694
  const deepLink = walletConnectDeepLinkUrl(displayUri);
693
695
  logInfo3("Mobile App Deep Link:", deepLink);
694
- if (_optionalChain([this, 'access', _48 => _48.device, 'optionalAccess', _49 => _49.isMobile])) {
696
+ if (_optionalChain([this, 'access', _50 => _50.device, 'optionalAccess', _51 => _51.isMobile])) {
695
697
  window.open(deepLink, "_blank");
696
698
  } else {
697
699
  this.handleShowQrCode(deepLink);
@@ -805,7 +807,7 @@ var ConnectionView = class extends _mixins.withTheme.call(void 0,
805
807
  <lukso-button
806
808
  variant="secondary"
807
809
  .theme=${this.theme}
808
- size=${_optionalChain([this, 'access', _50 => _50.device, 'optionalAccess', _51 => _51.isMobile]) ? "medium" : "large"}
810
+ size=${_optionalChain([this, 'access', _52 => _52.device, 'optionalAccess', _53 => _53.isMobile]) ? "medium" : "large"}
809
811
  is-full-width
810
812
  ?disabled=${isDisabled}
811
813
  ?is-loading=${isLoading}
@@ -814,8 +816,9 @@ var ConnectionView = class extends _mixins.withTheme.call(void 0,
814
816
  >
815
817
  <lukso-icon
816
818
  name=${iconName}
817
- size=${_optionalChain([this, 'access', _52 => _52.device, 'optionalAccess', _53 => _53.isMobile]) ? "small" : "medium"}
819
+ size=${_optionalChain([this, 'access', _54 => _54.device, 'optionalAccess', _55 => _55.isMobile]) ? "small" : "medium"}
818
820
  class="mr-2"
821
+ color="${this.theme === "dark" ? "neutral-100" : "neutral-20"}"
819
822
  secondary-color="${this.theme === "dark" ? "neutral-20" : "neutral-100"}"
820
823
  ></lukso-icon>
821
824
  ${label}
@@ -840,8 +843,8 @@ var ConnectionView = class extends _mixins.withTheme.call(void 0,
840
843
  this.extensionStore.icon,
841
844
  this.formatMessage("connect_modal_connectors_up_browser_extension"),
842
845
  this.handleConnectExtension,
843
- this.isConnecting && this.connectingRdns === _optionalChain([this, 'access', _54 => _54.upExtensionConnector, 'optionalAccess', _55 => _55.rdns]),
844
- this.isConnecting || _optionalChain([this, 'access', _56 => _56.device, 'optionalAccess', _57 => _57.isMobile]) || !this.browserSupportExtension
846
+ this.isConnecting && this.connectingRdns === _optionalChain([this, 'access', _56 => _56.upExtensionConnector, 'optionalAccess', _57 => _57.rdns]),
847
+ this.isConnecting || _optionalChain([this, 'access', _58 => _58.device, 'optionalAccess', _59 => _59.isMobile]) || !this.browserSupportExtension
845
848
  )
846
849
  );
847
850
  if (this.walletConnectConnector) {
@@ -888,13 +891,13 @@ var ConnectionView = class extends _mixins.withTheme.call(void 0,
888
891
  <p class="mb-6 paragraph-inter-16-regular text-neutral-20 dark:text-neutral-100">
889
892
  ${this.formatMessage("connect_modal_description")}
890
893
  </p>
891
- <div class="${_tools.cn.call(void 0, "flex w-full gap-2 mb-4", _optionalChain([this, 'access', _58 => _58.device, 'optionalAccess', _59 => _59.isMobile]) ? "flex-col-reverse" : "flex-col")}">
894
+ <div class="${_tools.cn.call(void 0, "flex w-full gap-2 mb-4", _optionalChain([this, 'access', _60 => _60.device, 'optionalAccess', _61 => _61.isMobile]) ? "flex-col-reverse" : "flex-col")}">
892
895
  ${this.renderConnectors()}
893
896
  </div>
894
897
  ${this.renderDivider()}
895
898
  <lukso-button
896
899
  variant="secondary"
897
- size=${_optionalChain([this, 'access', _60 => _60.device, 'optionalAccess', _61 => _61.isMobile]) ? "medium" : "large"}
900
+ size=${_optionalChain([this, 'access', _62 => _62.device, 'optionalAccess', _63 => _63.isMobile]) ? "medium" : "large"}
898
901
  is-full-width
899
902
  .theme=${this.theme}
900
903
  ?disabled=${this.isConnecting}
@@ -902,7 +905,7 @@ var ConnectionView = class extends _mixins.withTheme.call(void 0,
902
905
  >
903
906
  <lukso-icon
904
907
  name="wallet-outline"
905
- size=${_optionalChain([this, 'access', _62 => _62.device, 'optionalAccess', _63 => _63.isMobile]) ? "small" : "medium"}
908
+ size=${_optionalChain([this, 'access', _64 => _64.device, 'optionalAccess', _65 => _65.isMobile]) ? "small" : "medium"}
906
909
  class="mr-2"
907
910
  color="${this.theme === "dark" ? "neutral-100" : "neutral-20"}"
908
911
  ></lukso-icon>
@@ -1036,7 +1039,7 @@ var ConnectModal = class extends _mixins.withTheme.call(void 0,
1036
1039
  }
1037
1040
  try {
1038
1041
  const { wagmiConfig, chainId, embeddedWalletId } = globalWagmiSetup;
1039
- const wagmiConnectors = _optionalChain([wagmiConfig, 'optionalAccess', _64 => _64.connectors]) || [];
1042
+ const wagmiConnectors = _optionalChain([wagmiConfig, 'optionalAccess', _66 => _66.connectors]) || [];
1040
1043
  logInfo4("Initial connectors:", wagmiConnectors);
1041
1044
  const wagmiCore = await Promise.resolve().then(() => _interopRequireWildcard(require("@wagmi/core"))).catch((error) => {
1042
1045
  throw new Error("@wagmi/core is required when using wagmi connectors", {
@@ -1142,7 +1145,7 @@ var ConnectModal = class extends _mixins.withTheme.call(void 0,
1142
1145
  return _lit.html`
1143
1146
  <lukso-modal
1144
1147
  ?is-open=${this.open}
1145
- ?has-bottom-padding=${!!(_optionalChain([this, 'access', _65 => _65.device, 'optionalAccess', _66 => _66.isIOS]) && _optionalChain([this, 'access', _67 => _67.device, 'optionalAccess', _68 => _68.isSafari]))}
1148
+ ?has-bottom-padding=${!!(_optionalChain([this, 'access', _67 => _67.device, 'optionalAccess', _68 => _68.isIOS]) && _optionalChain([this, 'access', _69 => _69.device, 'optionalAccess', _70 => _70.isSafari]))}
1146
1149
  size="auto"
1147
1150
  .theme=${this.theme}
1148
1151
  @on-backdrop-click=${this.handleClose}
@@ -1180,4 +1183,4 @@ customElements.define("connect-modal", ConnectModal);
1180
1183
 
1181
1184
 
1182
1185
  exports.ConnectModalBase = ConnectModalBase; exports.wagmiService = wagmiService; exports.fromWagmiConnector = fromWagmiConnector; exports.fromWagmiConnectors = fromWagmiConnectors; exports.setupWagmi = setupWagmi; exports.getWagmiSetup = getWagmiSetup; exports.getConnection = getConnection; exports.watchConnection = watchConnection; exports.disconnect = disconnect; exports.ConnectModal = ConnectModal;
1183
- //# sourceMappingURL=chunk-SH4GXMHF.cjs.map
1186
+ //# sourceMappingURL=chunk-Z66UKTZO.cjs.map