@argent/x-shared 1.66.3 → 1.66.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.
Files changed (30) hide show
  1. package/dist/node_modules/.pnpm/i18next@24.2.3_typescript@5.7.3/node_modules/i18next/dist/esm/i18next.cjs +1 -0
  2. package/dist/node_modules/.pnpm/i18next@24.2.3_typescript@5.7.3/node_modules/i18next/dist/esm/i18next.js +1393 -0
  3. package/dist/node_modules/.pnpm/react-i18next@15.4.1_i18next@24.2.3_typescript@5.7.3__react@19.1.0/node_modules/react-i18next/dist/es/defaults.cjs +1 -0
  4. package/dist/node_modules/.pnpm/react-i18next@15.4.1_i18next@24.2.3_typescript@5.7.3__react@19.1.0/node_modules/react-i18next/dist/es/defaults.js +20 -0
  5. package/dist/node_modules/.pnpm/react-i18next@15.4.1_i18next@24.2.3_typescript@5.7.3__react@19.1.0/node_modules/react-i18next/dist/es/initReactI18next.cjs +1 -0
  6. package/dist/node_modules/.pnpm/react-i18next@15.4.1_i18next@24.2.3_typescript@5.7.3__react@19.1.0/node_modules/react-i18next/dist/es/initReactI18next.js +10 -0
  7. package/dist/node_modules/.pnpm/react-i18next@15.4.1_i18next@24.2.3_typescript@5.7.3__react@19.1.0/node_modules/react-i18next/dist/es/unescape.cjs +1 -0
  8. package/dist/node_modules/.pnpm/react-i18next@15.4.1_i18next@24.2.3_typescript@5.7.3__react@19.1.0/node_modules/react-i18next/dist/es/unescape.js +25 -0
  9. package/dist/src/chains/starknet/address.cjs +1 -1
  10. package/dist/src/chains/starknet/address.js +48 -46
  11. package/dist/src/i18n/config.d.ts +7 -0
  12. package/dist/src/i18n/lokaliseApi.d.ts +4 -0
  13. package/dist/src/locales/en/translation.json.cjs +1 -0
  14. package/dist/src/locales/en/translation.json.js +7 -0
  15. package/dist/src/locales/ru/translation.json.cjs +1 -0
  16. package/dist/src/locales/ru/translation.json.js +7 -0
  17. package/dist/src/locales/tr/translation.json.cjs +1 -0
  18. package/dist/src/locales/tr/translation.json.js +7 -0
  19. package/dist/src/locales/uk/translation.json.cjs +1 -0
  20. package/dist/src/locales/uk/translation.json.js +7 -0
  21. package/dist/src/locales/vi/translation.json.cjs +1 -0
  22. package/dist/src/locales/vi/translation.json.js +7 -0
  23. package/dist/src/locales/zh_CN/translation.json.cjs +1 -0
  24. package/dist/src/locales/zh_CN/translation.json.js +7 -0
  25. package/dist/src/scripts/langchain-localize.d.ts +1 -0
  26. package/dist/src/scripts/upload-translation.d.ts +1 -0
  27. package/dist/src/utils/i18n.cjs +1 -0
  28. package/dist/src/utils/i18n.d.ts +2 -0
  29. package/dist/src/utils/i18n.js +41 -0
  30. package/package.json +18 -3
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./unescape.cjs");let e={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:s.unescape};const n=(t={})=>{e={...e,...t}};exports.setDefaults=n;
@@ -0,0 +1,20 @@
1
+ import { unescape as s } from "./unescape.js";
2
+ let e = {
3
+ bindI18n: "languageChanged",
4
+ bindI18nStore: "",
5
+ transEmptyNodeValue: "",
6
+ transSupportBasicHtmlNodes: !0,
7
+ transWrapTextNodes: "",
8
+ transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
9
+ useSuspense: !0,
10
+ unescape: s
11
+ };
12
+ const r = (t = {}) => {
13
+ e = {
14
+ ...e,
15
+ ...t
16
+ };
17
+ };
18
+ export {
19
+ r as setDefaults
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./defaults.cjs"),i={type:"3rdParty",init(t){e.setDefaults(t.options.react)}};exports.initReactI18next=i;
@@ -0,0 +1,10 @@
1
+ import { setDefaults as e } from "./defaults.js";
2
+ const o = {
3
+ type: "3rdParty",
4
+ init(t) {
5
+ e(t.options.react);
6
+ }
7
+ };
8
+ export {
9
+ o as initReactI18next
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,p={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},n=t=>p[t],o=t=>t.replace(e,n);exports.unescape=o;
@@ -0,0 +1,25 @@
1
+ const p = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, e = {
2
+ "&amp;": "&",
3
+ "&#38;": "&",
4
+ "&lt;": "<",
5
+ "&#60;": "<",
6
+ "&gt;": ">",
7
+ "&#62;": ">",
8
+ "&apos;": "'",
9
+ "&#39;": "'",
10
+ "&quot;": '"',
11
+ "&#34;": '"',
12
+ "&nbsp;": " ",
13
+ "&#160;": " ",
14
+ "&copy;": "©",
15
+ "&#169;": "©",
16
+ "&reg;": "®",
17
+ "&#174;": "®",
18
+ "&hellip;": "…",
19
+ "&#8230;": "…",
20
+ "&#x2F;": "/",
21
+ "&#47;": "/"
22
+ }, n = (t) => e[t], o = (t) => t.replace(p, n);
23
+ export {
24
+ o as unescape
25
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("lodash-es"),t=require("starknet"),c=require("zod"),S=require("../../utils/base58.cjs"),u=c.z.string().refine(e=>{if(e.toLowerCase()===e)return!0;try{return t.validateChecksumAddress(e)&&T(e)}catch{}return!1},"Invalid address (checksum error)"),g=c.z.string().refine(e=>{try{return t.validateAndParseAddress(e)}catch{}return!1},"Invalid address (validation error)"),n=c.z.string().regex(/^0x[0-9a-fA-F]+$/,"Invalid address"),l=n.min(50,"Addresses must at least be 50 characters long").max(66,"Addresses must at most be 66 characters long"),x=n.length(66,"Address must be 66 characters long"),o=l.pipe(u).transform(e=>`0x${(e.startsWith("0x")?e.slice(2):e).padStart(64,"0")}`),p=o.or(c.z.literal("")).transform(e=>e===""?void 0:e).optional(),$=n.transform(e=>`0x${e.replace(/^0x/,"").toLowerCase().padStart(64,"0")}`),h=e=>o.safeParse(e).success,f=h,i=e=>t.getChecksumAddress(e),z=e=>{if(!e)return!1;try{const s=S.decodeBase58(e);return f(s)}catch{return!1}},L=e=>{const s=i(e),r=s.slice(0,2),a=s.slice(2,6),d=s.slice(-4);return`${r}${a}…${d}`},B=e=>{const s=i(e),r=s.slice(0,2),d=s.slice(2).match(/.{1,4}/g)||[];return`${r} ${d.join(" ")}`},T=e=>!/^0x[0-9a-f]{63,64}$/.test(e),A=(e,s)=>{try{return!e||!s?!1:t.num.hexToDecimalString(e)===t.num.hexToDecimalString(s)}catch{}return!1},w=e=>{try{return t.num.toBigInt(n.parse(e))===t.constants.ZERO}catch{}return!1},C=(e,s)=>!!(s!=null&&s.some(r=>A(r,e))),E=m.memoize(e=>{const s=e.slice(0,6),r=e.slice(-4);return`${s}…${r}`}),P=m.memoize((e,s)=>{if(e.length<s)return e;const r=Math.floor((s-1)/2),a=e.slice(0,r),d=e.slice(-r);return`${a}…${d}`});exports.addressOrEmptyUndefinedSchema=p;exports.addressSchema=o;exports.addressSchemaArgentBackend=$;exports.addressSchemaBase=n;exports.addressSchemaLooseLength=l;exports.addressSchemaStrictLength=x;exports.formatFullAddress=B;exports.formatTruncatedAddress=L;exports.formatTruncatedSignerKey=E;exports.formatTruncatedString=P;exports.includesAddress=C;exports.isAddress=h;exports.isBase58Address=z;exports.isEqualAddress=A;exports.isValidAddress=f;exports.isZeroAddress=w;exports.normalizeAddress=i;exports.validChecksumAddressSchema=u;exports.validateAddressRangeSchema=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("lodash-es"),t=require("starknet"),c=require("zod"),g=require("../../utils/base58.cjs");require("../../utils/i18n.cjs");const d=require("../../../node_modules/.pnpm/i18next@24.2.3_typescript@5.7.3/node_modules/i18next/dist/esm/i18next.cjs"),m=c.z.string().refine(e=>{if(e.toLowerCase()===e)return!0;try{return t.validateChecksumAddress(e)&&T(e)}catch{}return!1},()=>({message:d.default.t("validation.address.invalidChecksum")})),x=c.z.string().refine(e=>{try{return t.validateAndParseAddress(e)}catch{}return!1},()=>({message:d.default.t("validation.address.validationError")})),n=c.z.string().regex(/^0x[0-9a-fA-F]+$/,d.default.t("validation.address.invalidFormat")),f=n.min(50,d.default.t("validation.address.tooShort")).max(66,d.default.t("validation.address.tooLong")),p=n.length(66,d.default.t("validation.address.exactLength")),i=f.pipe(m).transform(e=>`0x${(e.startsWith("0x")?e.slice(2):e).padStart(64,"0")}`),$=i.or(c.z.literal("")).transform(e=>e===""?void 0:e).optional(),L=n.transform(e=>`0x${e.replace(/^0x/,"").toLowerCase().padStart(64,"0")}`),h=e=>i.safeParse(e).success,A=h,l=e=>t.getChecksumAddress(e),v=e=>{if(!e)return!1;try{const s=g.decodeBase58(e);return A(s)}catch{return!1}},z=e=>{const s=l(e),r=s.slice(0,2),o=s.slice(2,6),a=s.slice(-4);return`${r}${o}…${a}`},B=e=>{const s=l(e),r=s.slice(0,2),a=s.slice(2).match(/.{1,4}/g)||[];return`${r} ${a.join(" ")}`},T=e=>!/^0x[0-9a-f]{63,64}$/.test(e),S=(e,s)=>{try{return!e||!s?!1:t.num.hexToDecimalString(e)===t.num.hexToDecimalString(s)}catch{}return!1},q=e=>{try{return t.num.toBigInt(n.parse(e))===t.constants.ZERO}catch{}return!1},w=(e,s)=>!!(s!=null&&s.some(r=>S(r,e))),C=u.memoize(e=>{const s=e.slice(0,6),r=e.slice(-4);return`${s}…${r}`}),E=u.memoize((e,s)=>{if(e.length<s)return e;const r=Math.floor((s-1)/2),o=e.slice(0,r),a=e.slice(-r);return`${o}…${a}`});exports.addressOrEmptyUndefinedSchema=$;exports.addressSchema=i;exports.addressSchemaArgentBackend=L;exports.addressSchemaBase=n;exports.addressSchemaLooseLength=f;exports.addressSchemaStrictLength=p;exports.formatFullAddress=B;exports.formatTruncatedAddress=z;exports.formatTruncatedSignerKey=C;exports.formatTruncatedString=E;exports.includesAddress=w;exports.isAddress=h;exports.isBase58Address=v;exports.isEqualAddress=S;exports.isValidAddress=A;exports.isZeroAddress=q;exports.normalizeAddress=l;exports.validChecksumAddressSchema=m;exports.validateAddressRangeSchema=x;
@@ -1,75 +1,77 @@
1
- import { memoize as a } from "lodash-es";
2
- import { validateChecksumAddress as l, validateAndParseAddress as u, getChecksumAddress as f, num as c, constants as h } from "starknet";
1
+ import { memoize as i } from "lodash-es";
2
+ import { validateChecksumAddress as u, validateAndParseAddress as f, getChecksumAddress as h, num as c, constants as p } from "starknet";
3
3
  import { z as d } from "zod";
4
- import { decodeBase58 as A } from "../../utils/base58.js";
5
- const p = d.string().refine((e) => {
4
+ import { decodeBase58 as x } from "../../utils/base58.js";
5
+ import "../../utils/i18n.js";
6
+ import r from "../../../node_modules/.pnpm/i18next@24.2.3_typescript@5.7.3/node_modules/i18next/dist/esm/i18next.js";
7
+ const A = d.string().refine((e) => {
6
8
  if (e.toLowerCase() === e)
7
9
  return !0;
8
10
  try {
9
- return l(e) && $(e);
11
+ return u(e) && L(e);
10
12
  } catch {
11
13
  }
12
14
  return !1;
13
- }, "Invalid address (checksum error)"), z = d.string().refine((e) => {
15
+ }, () => ({ message: r.t("validation.address.invalidChecksum") })), T = d.string().refine((e) => {
14
16
  try {
15
- return u(e);
17
+ return f(e);
16
18
  } catch {
17
19
  }
18
20
  return !1;
19
- }, "Invalid address (validation error)"), o = d.string().regex(/^0x[0-9a-fA-F]+$/, "Invalid address"), x = o.min(50, "Addresses must at least be 50 characters long").max(66, "Addresses must at most be 66 characters long"), T = o.length(66, "Address must be 66 characters long"), i = x.pipe(p).transform((e) => `0x${(e.startsWith("0x") ? e.slice(2) : e).padStart(64, "0")}`), E = i.or(d.literal("")).transform((e) => e === "" ? void 0 : e).optional(), I = o.transform((e) => `0x${e.replace(/^0x/, "").toLowerCase().padStart(64, "0")}`), S = (e) => i.safeParse(e).success, g = S, m = (e) => f(e), Z = (e) => {
21
+ }, () => ({ message: r.t("validation.address.validationError") })), a = d.string().regex(/^0x[0-9a-fA-F]+$/, r.t("validation.address.invalidFormat")), S = a.min(50, r.t("validation.address.tooShort")).max(66, r.t("validation.address.tooLong")), Z = a.length(66, r.t("validation.address.exactLength")), m = S.pipe(A).transform((e) => `0x${(e.startsWith("0x") ? e.slice(2) : e).padStart(64, "0")}`), F = m.or(d.literal("")).transform((e) => e === "" ? void 0 : e).optional(), k = a.transform((e) => `0x${e.replace(/^0x/, "").toLowerCase().padStart(64, "0")}`), g = (e) => m.safeParse(e).success, $ = g, l = (e) => h(e), y = (e) => {
20
22
  if (!e)
21
23
  return !1;
22
24
  try {
23
- const s = A(e);
24
- return g(s);
25
+ const t = x(e);
26
+ return $(t);
25
27
  } catch {
26
28
  return !1;
27
29
  }
28
- }, v = (e) => {
29
- const s = m(e), r = s.slice(0, 2), n = s.slice(2, 6), t = s.slice(-4);
30
- return `${r}${n}…${t}`;
31
- }, b = (e) => {
32
- const s = m(e), r = s.slice(0, 2), t = s.slice(2).match(/.{1,4}/g) || [];
33
- return `${r} ${t.join(" ")}`;
34
- }, $ = (e) => !/^0x[0-9a-f]{63,64}$/.test(e), w = (e, s) => {
30
+ }, D = (e) => {
31
+ const t = l(e), s = t.slice(0, 2), o = t.slice(2, 6), n = t.slice(-4);
32
+ return `${s}${o}…${n}`;
33
+ }, O = (e) => {
34
+ const t = l(e), s = t.slice(0, 2), n = t.slice(2).match(/.{1,4}/g) || [];
35
+ return `${s} ${n.join(" ")}`;
36
+ }, L = (e) => !/^0x[0-9a-f]{63,64}$/.test(e), v = (e, t) => {
35
37
  try {
36
- return !e || !s ? !1 : c.hexToDecimalString(e) === c.hexToDecimalString(s);
38
+ return !e || !t ? !1 : c.hexToDecimalString(e) === c.hexToDecimalString(t);
37
39
  } catch {
38
40
  }
39
41
  return !1;
40
- }, k = (e) => {
42
+ }, R = (e) => {
41
43
  try {
42
- return c.toBigInt(o.parse(e)) === h.ZERO;
44
+ return c.toBigInt(a.parse(e)) === p.ZERO;
43
45
  } catch {
44
46
  }
45
47
  return !1;
46
- }, y = (e, s) => !!(s != null && s.some((r) => w(r, e))), D = a((e) => {
47
- const s = e.slice(0, 6), r = e.slice(-4);
48
- return `${s}…${r}`;
49
- }), F = a((e, s) => {
50
- if (e.length < s)
48
+ }, j = (e, t) => !!(t != null && t.some((s) => v(s, e))), q = i((e) => {
49
+ const t = e.slice(0, 6), s = e.slice(-4);
50
+ return `${t}…${s}`;
51
+ }), I = i((e, t) => {
52
+ if (e.length < t)
51
53
  return e;
52
- const r = Math.floor((s - 1) / 2), n = e.slice(0, r), t = e.slice(-r);
53
- return `${n}…${t}`;
54
+ const s = Math.floor((t - 1) / 2), o = e.slice(0, s), n = e.slice(-s);
55
+ return `${o}…${n}`;
54
56
  });
55
57
  export {
56
- E as addressOrEmptyUndefinedSchema,
57
- i as addressSchema,
58
- I as addressSchemaArgentBackend,
59
- o as addressSchemaBase,
60
- x as addressSchemaLooseLength,
61
- T as addressSchemaStrictLength,
62
- b as formatFullAddress,
63
- v as formatTruncatedAddress,
64
- D as formatTruncatedSignerKey,
65
- F as formatTruncatedString,
66
- y as includesAddress,
67
- S as isAddress,
68
- Z as isBase58Address,
69
- w as isEqualAddress,
70
- g as isValidAddress,
71
- k as isZeroAddress,
72
- m as normalizeAddress,
73
- p as validChecksumAddressSchema,
74
- z as validateAddressRangeSchema
58
+ F as addressOrEmptyUndefinedSchema,
59
+ m as addressSchema,
60
+ k as addressSchemaArgentBackend,
61
+ a as addressSchemaBase,
62
+ S as addressSchemaLooseLength,
63
+ Z as addressSchemaStrictLength,
64
+ O as formatFullAddress,
65
+ D as formatTruncatedAddress,
66
+ q as formatTruncatedSignerKey,
67
+ I as formatTruncatedString,
68
+ j as includesAddress,
69
+ g as isAddress,
70
+ y as isBase58Address,
71
+ v as isEqualAddress,
72
+ $ as isValidAddress,
73
+ R as isZeroAddress,
74
+ l as normalizeAddress,
75
+ A as validChecksumAddressSchema,
76
+ T as validateAddressRangeSchema
75
77
  };
@@ -0,0 +1,7 @@
1
+ export declare const config: {
2
+ inputDir: string;
3
+ outputDir: string;
4
+ lng: string;
5
+ defaultNS: string;
6
+ };
7
+ export declare const defaultTranslationFilePath: string;
@@ -0,0 +1,4 @@
1
+ import { LokaliseApi } from '@lokalise/node-api';
2
+ declare const LOKALISE_API_TOKEN: string | undefined, LOKALISE_PROJECT_ID: string | undefined;
3
+ export declare const getLokaliseApi: () => LokaliseApi;
4
+ export { LOKALISE_API_TOKEN, LOKALISE_PROJECT_ID };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={address:{invalidChecksum:"Invalid address (checksum error)",validationError:"Invalid address (validation error)",invalidFormat:"Invalid address",tooShort:"Addresses must at least be 50 characters long",tooLong:"Addresses must at most be 66 characters long",exactLength:"Address must be 66 characters long"}},a={validation:e};exports.default=a;exports.validation=e;
@@ -0,0 +1,7 @@
1
+ const a = { address: { invalidChecksum: "Invalid address (checksum error)", validationError: "Invalid address (validation error)", invalidFormat: "Invalid address", tooShort: "Addresses must at least be 50 characters long", tooLong: "Addresses must at most be 66 characters long", exactLength: "Address must be 66 characters long" } }, s = {
2
+ validation: a
3
+ };
4
+ export {
5
+ s as default,
6
+ a as validation
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={address:{invalidChecksum:"Неверный адрес (ошибка контрольной суммы)",validationError:"Неверный адрес (ошибка валидации)",invalidFormat:"Неверный адрес",tooShort:"Адрес должен содержать не менее 50 символов",tooLong:"Адрес должен содержать не более 66 символов",exactLength:"Адрес должен содержать ровно 66 символов"}},o={validation:t};exports.default=o;exports.validation=t;
@@ -0,0 +1,7 @@
1
+ const o = { address: { invalidChecksum: "Неверный адрес (ошибка контрольной суммы)", validationError: "Неверный адрес (ошибка валидации)", invalidFormat: "Неверный адрес", tooShort: "Адрес должен содержать не менее 50 символов", tooLong: "Адрес должен содержать не более 66 символов", exactLength: "Адрес должен содержать ровно 66 символов" } }, a = {
2
+ validation: o
3
+ };
4
+ export {
5
+ a as default,
6
+ o as validation
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a={address:{invalidChecksum:"Geçersiz adres (sağlama toplamı hatası)",validationError:"Geçersiz adres (doğrulama hatası)",invalidFormat:"Geçersiz adres",tooShort:"Adresler en az 50 karakter uzunluğunda olmalıdır",tooLong:"Adresler en fazla 66 karakter uzunluğunda olmalıdır",exactLength:"Adres 66 karakter uzunluğunda olmalıdır"}},e={validation:a};exports.default=e;exports.validation=a;
@@ -0,0 +1,7 @@
1
+ const a = { address: { invalidChecksum: "Geçersiz adres (sağlama toplamı hatası)", validationError: "Geçersiz adres (doğrulama hatası)", invalidFormat: "Geçersiz adres", tooShort: "Adresler en az 50 karakter uzunluğunda olmalıdır", tooLong: "Adresler en fazla 66 karakter uzunluğunda olmalıdır", exactLength: "Adres 66 karakter uzunluğunda olmalıdır" } }, r = {
2
+ validation: a
3
+ };
4
+ export {
5
+ r as default,
6
+ a as validation
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={address:{invalidChecksum:"Недійсна адреса (помилка контрольної суми)",validationError:"Недійсна адреса (помилка валідації)",invalidFormat:"Недійсна адреса",tooShort:"Адреса повинна містити щонайменше 50 символів",tooLong:"Адреса повинна містити щонайбільше 66 символів",exactLength:"Адреса повинна містити рівно 66 символів"}},o={validation:t};exports.default=o;exports.validation=t;
@@ -0,0 +1,7 @@
1
+ const o = { address: { invalidChecksum: "Недійсна адреса (помилка контрольної суми)", validationError: "Недійсна адреса (помилка валідації)", invalidFormat: "Недійсна адреса", tooShort: "Адреса повинна містити щонайменше 50 символів", tooLong: "Адреса повинна містити щонайбільше 66 символів", exactLength: "Адреса повинна містити рівно 66 символів" } }, a = {
2
+ validation: o
3
+ };
4
+ export {
5
+ a as default,
6
+ o as validation
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={address:{invalidChecksum:"Địa chỉ không hợp lệ (lỗi checksum)",validationError:"Địa chỉ không hợp lệ (lỗi xác thực)",invalidFormat:"Địa chỉ không hợp lệ",tooShort:"Địa chỉ phải có ít nhất 50 ký tự",tooLong:"Địa chỉ tối đa 66 ký tự",exactLength:"Địa chỉ phải có 66 ký tự"}},a={validation:t};exports.default=a;exports.validation=t;
@@ -0,0 +1,7 @@
1
+ const a = { address: { invalidChecksum: "Địa chỉ không hợp lệ (lỗi checksum)", validationError: "Địa chỉ không hợp lệ (lỗi xác thực)", invalidFormat: "Địa chỉ không hợp lệ", tooShort: "Địa chỉ phải có ít nhất 50 ký tự", tooLong: "Địa chỉ tối đa 66 ký tự", exactLength: "Địa chỉ phải có 66 ký tự" } }, h = {
2
+ validation: a
3
+ };
4
+ export {
5
+ h as default,
6
+ a as validation
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={address:{invalidChecksum:"地址无效(校验和错误)",validationError:"地址无效(验证错误)",invalidFormat:"地址格式无效",tooShort:"地址长度至少为 50 个字符",tooLong:"地址长度至多为 66 个字符",exactLength:"地址长度必须为 66 个字符"}},o={validation:t};exports.default=o;exports.validation=t;
@@ -0,0 +1,7 @@
1
+ const o = { address: { invalidChecksum: "地址无效(校验和错误)", validationError: "地址无效(验证错误)", invalidFormat: "地址格式无效", tooShort: "地址长度至少为 50 个字符", tooLong: "地址长度至多为 66 个字符", exactLength: "地址长度必须为 66 个字符" } }, a = {
2
+ validation: o
3
+ };
4
+ export {
5
+ a as default,
6
+ o as validation
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare function uploadTranslation(): Promise<void>;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../node_modules/.pnpm/i18next@24.2.3_typescript@5.7.3/node_modules/i18next/dist/esm/i18next.cjs"),e=require("../locales/en/translation.json.cjs"),n=require("../locales/ru/translation.json.cjs"),a=require("../locales/tr/translation.json.cjs"),r=require("../locales/uk/translation.json.cjs"),i=require("../locales/vi/translation.json.cjs"),l=require("../locales/zh_CN/translation.json.cjs"),s=require("../../node_modules/.pnpm/react-i18next@15.4.1_i18next@24.2.3_typescript@5.7.3__react@19.1.0/node_modules/react-i18next/dist/es/initReactI18next.cjs"),o={en:{translation:e.default},vi:{translation:i.default},zh_CN:{translation:l.default},uk:{translation:r.default},ru:{translation:n.default},tr:{translation:a.default}};t.default.use(s.initReactI18next).init({resources:o,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});exports.default=t.default;
@@ -0,0 +1,2 @@
1
+ import { default as i18next } from 'i18next';
2
+ export default i18next;
@@ -0,0 +1,41 @@
1
+ import n from "../../node_modules/.pnpm/i18next@24.2.3_typescript@5.7.3/node_modules/i18next/dist/esm/i18next.js";
2
+ import t from "../locales/en/translation.json.js";
3
+ import r from "../locales/ru/translation.json.js";
4
+ import a from "../locales/tr/translation.json.js";
5
+ import o from "../locales/uk/translation.json.js";
6
+ import i from "../locales/vi/translation.json.js";
7
+ import s from "../locales/zh_CN/translation.json.js";
8
+ import { initReactI18next as l } from "../../node_modules/.pnpm/react-i18next@15.4.1_i18next@24.2.3_typescript@5.7.3__react@19.1.0/node_modules/react-i18next/dist/es/initReactI18next.js";
9
+ const e = {
10
+ en: {
11
+ translation: t
12
+ },
13
+ vi: {
14
+ translation: i
15
+ },
16
+ zh_CN: {
17
+ translation: s
18
+ },
19
+ uk: {
20
+ translation: o
21
+ },
22
+ ru: {
23
+ translation: r
24
+ },
25
+ tr: {
26
+ translation: a
27
+ }
28
+ };
29
+ n.use(l).init({
30
+ resources: e,
31
+ lng: "en",
32
+ // Default language
33
+ fallbackLng: "en",
34
+ interpolation: {
35
+ escapeValue: !1
36
+ // React already escapes values
37
+ }
38
+ });
39
+ export {
40
+ n as default
41
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.66.3",
3
+ "version": "1.66.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"
@@ -50,7 +50,9 @@
50
50
  "test": "vitest run",
51
51
  "test:watch": "vitest",
52
52
  "prepare": "husky",
53
- "format:fix": "prettier . --ignore-unknown --write"
53
+ "format:fix": "prettier . --ignore-unknown --write",
54
+ "i18n:langchain": "node --loader ts-node/esm --experimental-specifier-resolution=node --no-warnings src/scripts/langchain-localize.ts",
55
+ "i18n:upload": "node --loader ts-node/esm --experimental-specifier-resolution=node --no-warnings src/scripts/upload-translation.ts"
54
56
  },
55
57
  "devDependencies": {
56
58
  "@amplitude/analytics-types": "2.8.4",
@@ -64,6 +66,8 @@
64
66
  "@types/ua-parser-js": "0.7.39",
65
67
  "@typescript-eslint/eslint-plugin": "8.23.0",
66
68
  "@typescript-eslint/parser": "8.23.0",
69
+ "esbuild": "^0.20.0",
70
+ "esbuild-register": "^3.5.0",
67
71
  "eslint": "8.57.1",
68
72
  "eslint-config-prettier": "10.0.1",
69
73
  "eslint-plugin-import": "2.31.0",
@@ -72,7 +76,9 @@
72
76
  "msw": "2.7.0",
73
77
  "prettier": "3.4.2",
74
78
  "semantic-release": "24.2.1",
79
+ "ts-node": "^10.9.2",
75
80
  "ts-to-zod": "3.15.0",
81
+ "tsx": "^4.7.0",
76
82
  "typescript": "5.7.3",
77
83
  "vite": "6.0.11",
78
84
  "vite-plugin-dts": "4.5.0",
@@ -80,14 +86,23 @@
80
86
  },
81
87
  "dependencies": {
82
88
  "@argent/x-multicall": "^7.1.0",
89
+ "@langchain/core": "^0.3.43",
90
+ "@langchain/google-genai": "^0.2.2",
91
+ "@lokalise/node-api": "^14.2.1",
83
92
  "@noble/hashes": "^1.3.1",
84
93
  "@starknet-io/types-js": "^0.7.7",
94
+ "@types/fs-extra": "^11.0.4",
85
95
  "big-decimal-number": "npm:bignumber.js@^9.1.2",
96
+ "dotenv": "^16.4.7",
97
+ "fs-extra": "^11.3.0",
98
+ "i18next": "^24.2.3",
86
99
  "micro-starknet": "^0.2.3",
87
100
  "numeral": "2.0.6",
101
+ "react-i18next": "^15.4.1",
88
102
  "starknet": "6.21.1",
89
103
  "starknet4-deprecated": "npm:starknet@4.4.0",
90
- "starknet5": "npm:starknet@5.25.0"
104
+ "starknet5": "npm:starknet@5.25.0",
105
+ "zod-to-json-schema": "^3.24.5"
91
106
  },
92
107
  "peerDependencies": {
93
108
  "@scure/base": "^1.1.1",