@vechain/vechain-kit 2.0.0-rc.10 → 2.0.0-rc.11

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.cjs CHANGED
@@ -198,6 +198,7 @@ var en_default = {
198
198
  "Connection Type": "Connection Type",
199
199
  "Connection details": "Connection details",
200
200
  Continue: "Continue",
201
+ "Continue with Github": "Continue with Github",
201
202
  "Continue with Google": "Continue with Google",
202
203
  "Cookie Policy": "Cookie Policy",
203
204
  "Cookie policy outlining the use of cookies and tracking technologies.": "Cookie policy outlining the use of cookies and tracking technologies.",
@@ -767,6 +768,7 @@ var de_default = {
767
768
  "Connection Type": "Verbindungstyp",
768
769
  "Connection details": "Verbindungsdetails",
769
770
  Continue: "Fortfahren",
771
+ "Continue with Github": "Weiter mit Github",
770
772
  "Continue with Google": "Mit Google fortfahren",
771
773
  "Cookie Policy": "Cookie-Richtlinie",
772
774
  "Cookie policy outlining the use of cookies and tracking technologies.": "Cookie-Richtlinie, die die Verwendung von Cookies und Tracking-Technologien beschreibt.",
@@ -1336,6 +1338,7 @@ var it_default = {
1336
1338
  "Connection Type": "Tipo di connessione",
1337
1339
  "Connection details": "Dettagli della connessione",
1338
1340
  Continue: "Continua",
1341
+ "Continue with Github": "Continua con Github",
1339
1342
  "Continue with Google": "Continua con Google",
1340
1343
  "Cookie Policy": "Politica sui cookie",
1341
1344
  "Cookie policy outlining the use of cookies and tracking technologies.": "Politica sui cookie che descrive l'uso di cookie e tecnologie di tracciamento.",
@@ -1905,6 +1908,7 @@ var fr_default = {
1905
1908
  "Connection Type": "Type de connexion",
1906
1909
  "Connection details": "D\xE9tails de la connexion",
1907
1910
  Continue: "Continuer",
1911
+ "Continue with Github": "Continuer avec Github",
1908
1912
  "Continue with Google": "Continuer avec Google",
1909
1913
  "Cookie Policy": "Politique de cookies",
1910
1914
  "Cookie policy outlining the use of cookies and tracking technologies.": "Politique de cookies d\xE9crivant l'utilisation des cookies et des technologies de suivi.",
@@ -2474,6 +2478,7 @@ var es_default = {
2474
2478
  "Connection Type": "Tipo de Conexi\xF3n",
2475
2479
  "Connection details": "Detalles de conexi\xF3n",
2476
2480
  Continue: "Continuar",
2481
+ "Continue with Github": "Continuar con Github",
2477
2482
  "Continue with Google": "Continuar con Google",
2478
2483
  "Cookie Policy": "Pol\xEDtica de Cookies",
2479
2484
  "Cookie policy outlining the use of cookies and tracking technologies.": "Pol\xEDtica de cookies que describe el uso de cookies y tecnolog\xEDas de seguimiento.",
@@ -3043,6 +3048,7 @@ var zh_default = {
3043
3048
  "Connection Type": "\u8FDE\u63A5\u7C7B\u578B",
3044
3049
  "Connection details": "\u8FDE\u63A5\u8BE6\u60C5",
3045
3050
  Continue: "\u7EE7\u7EED",
3051
+ "Continue with Github": "\u7EE7\u7EED\u4F7F\u7528 Github",
3046
3052
  "Continue with Google": "\u901A\u8FC7Google\u7EE7\u7EED",
3047
3053
  "Cookie Policy": "Cookie \u653F\u7B56",
3048
3054
  "Cookie policy outlining the use of cookies and tracking technologies.": "Cookie \u653F\u7B56\u8BE6\u8FF0\u4E86\u5BF9 cookies \u548C\u8FFD\u8E2A\u6280\u672F\u7684\u4F7F\u7528\u3002",
@@ -3612,6 +3618,7 @@ var ja_default = {
3612
3618
  "Connection Type": "\u63A5\u7D9A\u30BF\u30A4\u30D7",
3613
3619
  "Connection details": "\u63A5\u7D9A\u306E\u8A73\u7D30",
3614
3620
  Continue: "\u7D9A\u3051\u308B",
3621
+ "Continue with Github": "Github\u3067\u7D9A\u884C",
3615
3622
  "Continue with Google": "Google\u3067\u7D9A\u884C",
3616
3623
  "Cookie Policy": "\u30AF\u30C3\u30AD\u30FC\u30DD\u30EA\u30B7\u30FC",
3617
3624
  "Cookie policy outlining the use of cookies and tracking technologies.": "\u30AF\u30C3\u30AD\u30FC\u3068\u8FFD\u8DE1\u6280\u8853\u306E\u4F7F\u7528\u3092\u8AAC\u660E\u3059\u308B\u30AF\u30C3\u30AD\u30FC\u30DD\u30EA\u30B7\u30FC\u3002",
@@ -4851,7 +4858,7 @@ var AddressDisplay = ({
4851
4858
 
4852
4859
  // package.json
4853
4860
  var package_default = {
4854
- version: "2.0.0-rc.10"};
4861
+ version: "2.0.0-rc.11"};
4855
4862
  var VersionFooter = ({ ...props }) => {
4856
4863
  const { darkMode: isDark } = useVeChainKitConfig();
4857
4864
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -7588,6 +7595,25 @@ var LoginWithGoogleButton = ({ isDark, gridColumn }) => {
7588
7595
  }
7589
7596
  ) });
7590
7597
  };
7598
+ var LoginWithGithubButton = ({ isDark, gridColumn }) => {
7599
+ const { t } = reactI18next.useTranslation();
7600
+ const { initOAuth } = useLoginWithOAuth2();
7601
+ return /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: gridColumn ?? 4, w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(
7602
+ ConnectionButton,
7603
+ {
7604
+ isDark,
7605
+ onClick: async () => {
7606
+ Analytics.auth.flowStarted("github" /* GITHUB */);
7607
+ Analytics.auth.methodSelected("github" /* GITHUB */);
7608
+ await initOAuth({
7609
+ provider: "github"
7610
+ });
7611
+ },
7612
+ icon: fa.FaGithub,
7613
+ text: t("Continue with Github")
7614
+ }
7615
+ ) });
7616
+ };
7591
7617
  var VeChainWithPrivyLoginButton = ({ isDark, gridColumn }) => {
7592
7618
  const { t } = reactI18next.useTranslation();
7593
7619
  const { login: viewMoreLogin } = reactAuth.usePrivy();
@@ -7806,6 +7832,7 @@ var ConnectionOptionsStack = () => {
7806
7832
  showVeChainLogin,
7807
7833
  showDappKit,
7808
7834
  showMoreLogin,
7835
+ showGithubLogin,
7809
7836
  isOfficialVeChainApp
7810
7837
  } = useLoginModalContent();
7811
7838
  return /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { spacing: 4, w: "full", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(react.Grid, { templateColumns: "repeat(4, 1fr)", gap: 2, w: "full", children: loginMethods?.map(({ method: method7, gridColumn }) => {
@@ -7821,6 +7848,15 @@ var ConnectionOptionsStack = () => {
7821
7848
  },
7822
7849
  "google"
7823
7850
  );
7851
+ case "github":
7852
+ return showGithubLogin && /* @__PURE__ */ jsxRuntime.jsx(
7853
+ LoginWithGithubButton,
7854
+ {
7855
+ isDark,
7856
+ gridColumn
7857
+ },
7858
+ "github"
7859
+ );
7824
7860
  case "vechain":
7825
7861
  return showVeChainLogin && (isOfficialVeChainApp ? /* @__PURE__ */ jsxRuntime.jsx(
7826
7862
  VeChainWithPrivyLoginButton,
@@ -16785,6 +16821,10 @@ var useLoginModalContent = () => {
16785
16821
  () => isLoginMethodEnabled("more"),
16786
16822
  [loginMethods]
16787
16823
  );
16824
+ const showLoginWithGithub = React10.useMemo(
16825
+ () => isLoginMethodEnabled("github"),
16826
+ [loginMethods]
16827
+ );
16788
16828
  const baseConfig = {
16789
16829
  showGoogleLogin: showLoginWithGoogle,
16790
16830
  showEmailLogin: showLoginWithEmail,
@@ -16793,6 +16833,7 @@ var useLoginModalContent = () => {
16793
16833
  showDappKit: showLoginWithDappKit,
16794
16834
  showEcosystem: showEcosystemLogin,
16795
16835
  showMoreLogin,
16836
+ showGithubLogin: showLoginWithGithub,
16796
16837
  isOfficialVeChainApp: false
16797
16838
  };
16798
16839
  if (!privy) {
@@ -16983,12 +17024,6 @@ var useLoginWithPasskey = () => {
16983
17024
  };
16984
17025
  return { loginWithPasskey };
16985
17026
  };
16986
- var providerToSocialMethod = {
16987
- google: "email" /* EMAIL */,
16988
- twitter: "X" /* X */,
16989
- apple: "email" /* EMAIL */,
16990
- discord: "Discord" /* DISCORD */
16991
- };
16992
17027
  var useLoginWithOAuth2 = () => {
16993
17028
  const { createWallet } = reactAuth.useCreateWallet();
16994
17029
  const { initOAuth: privyInitOAuth } = reactAuth.useLoginWithOAuth({
@@ -17001,15 +17036,13 @@ var useLoginWithOAuth2 = () => {
17001
17036
  const { user } = reactAuth.usePrivy();
17002
17037
  const initOAuth = async ({ provider }) => {
17003
17038
  const loginMethod = "oauth" /* OAUTH */;
17004
- const socialMethod = providerToSocialMethod[provider];
17005
17039
  try {
17006
17040
  Analytics.auth.flowStarted(loginMethod);
17007
17041
  Analytics.auth.methodSelected(loginMethod);
17008
17042
  await privyInitOAuth({ provider });
17009
17043
  Analytics.auth.completed({
17010
17044
  userId: user?.id,
17011
- loginMethod,
17012
- platform: socialMethod
17045
+ loginMethod
17013
17046
  });
17014
17047
  } catch (error) {
17015
17048
  const errorMsg = error instanceof Error ? error.message : "Unknown error";
@@ -20449,6 +20482,7 @@ exports.LegalDocumentsModal = LegalDocumentsModal;
20449
20482
  exports.LegalDocumentsProvider = LegalDocumentsProvider;
20450
20483
  exports.LocalStorageKey = LocalStorageKey;
20451
20484
  exports.LoginLoadingModal = LoginLoadingModal;
20485
+ exports.LoginWithGithubButton = LoginWithGithubButton;
20452
20486
  exports.LoginWithGoogleButton = LoginWithGoogleButton;
20453
20487
  exports.MAX_IMAGE_SIZE = MAX_IMAGE_SIZE;
20454
20488
  exports.MainContent = MainContent;