@lifi/widget 4.10.1 → 4.10.2

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 (46) hide show
  1. package/dist/esm/components/ActionRow/ActionRow.d.ts +1 -0
  2. package/dist/esm/components/ExecutionStatusCard/ExecutionStatusCard.d.ts +1 -0
  3. package/dist/esm/components/ExecutionStatusCard/StatusIcon.d.ts +1 -0
  4. package/dist/esm/components/FeeBreakdownTooltip.d.ts +1 -0
  5. package/dist/esm/components/IconCircle/IconCircle.d.ts +1 -0
  6. package/dist/esm/components/Messages/WarningMessages.d.ts +1 -0
  7. package/dist/esm/components/RouteCard/RouteDetails.d.ts +1 -0
  8. package/dist/esm/components/Search/SearchInput.d.ts +1 -0
  9. package/dist/esm/components/StepActions/SentToWalletRow.d.ts +1 -0
  10. package/dist/esm/components/StepActions/StepActionsList.d.ts +1 -0
  11. package/dist/esm/components/TokenRate/TokenRate.d.ts +1 -0
  12. package/dist/esm/config/version.d.ts +1 -1
  13. package/dist/esm/config/version.js +1 -1
  14. package/dist/esm/config/version.js.map +1 -1
  15. package/dist/esm/hooks/useAddressActivity.d.ts +1 -0
  16. package/dist/esm/hooks/useAddressValidation.d.ts +1 -0
  17. package/dist/esm/hooks/useAvailableChains.d.ts +1 -0
  18. package/dist/esm/hooks/useExplorer.d.ts +1 -0
  19. package/dist/esm/hooks/useListHeight.d.ts +1 -0
  20. package/dist/esm/hooks/useRouteExecution.d.ts +1 -0
  21. package/dist/esm/hooks/useRoutes.d.ts +1 -0
  22. package/dist/esm/pages/MainPage/MainWarningMessages.d.ts +1 -0
  23. package/dist/esm/pages/SelectTokenPage/SearchTokenInput.d.ts +1 -0
  24. package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.d.ts +1 -0
  25. package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.d.ts +1 -0
  26. package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.d.ts +1 -0
  27. package/dist/esm/pages/TransactionPage/ExecutionDoneCard.d.ts +1 -0
  28. package/dist/esm/pages/TransactionPage/RouteTracker.d.ts +1 -0
  29. package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.d.ts +1 -0
  30. package/dist/esm/pages/TransactionPage/TransactionDoneButtons.d.ts +1 -0
  31. package/dist/esm/providers/I18nProvider/I18nProvider.js +2 -2
  32. package/dist/esm/providers/I18nProvider/I18nProvider.js.map +1 -1
  33. package/dist/esm/providers/I18nProvider/enResource.d.ts +2 -2
  34. package/dist/esm/providers/I18nProvider/enResource.js +1 -2
  35. package/dist/esm/providers/I18nProvider/types.d.ts +2 -2
  36. package/dist/esm/providers/I18nProvider/types.d.ts.map +1 -1
  37. package/dist/esm/providers/WalletProvider/WalletProvider.d.ts +1 -0
  38. package/dist/esm/stores/chains/types.d.ts +1 -0
  39. package/dist/esm/stores/form/types.d.ts +1 -0
  40. package/dist/esm/stores/header/types.d.ts +1 -0
  41. package/dist/esm/stores/inputMode/useInputModeStore.d.ts +1 -0
  42. package/dist/esm/utils/getPriceImpact.d.ts +1 -0
  43. package/dist/esm/utils/navigationRoutes.d.ts +1 -0
  44. package/dist/esm/utils/scopeKeys.d.ts +1 -0
  45. package/package.json +11 -11
  46. package/src/config/version.ts +1 -1
@@ -9,4 +9,5 @@ interface ActionRowProps {
9
9
  }
10
10
  export declare const ActionRow: FC<ActionRowProps>;
11
11
  //#endregion
12
+ export {};
12
13
  //# sourceMappingURL=ActionRow.d.ts.map
@@ -17,4 +17,5 @@ interface ExecutionStatusCardProps {
17
17
  }
18
18
  export declare function ExecutionStatusCard({ title, description, rows, iconSlot, footerSlot, vcSlot }: ExecutionStatusCardProps): JSX.Element;
19
19
  //#endregion
20
+ export {};
20
21
  //# sourceMappingURL=ExecutionStatusCard.d.ts.map
@@ -12,4 +12,5 @@ interface StatusIconProps {
12
12
  */
13
13
  export declare function StatusIcon({ route, status }: StatusIconProps): JSX.Element;
14
14
  //#endregion
15
+ export {};
15
16
  //# sourceMappingURL=StatusIcon.d.ts.map
@@ -9,4 +9,5 @@ interface FeeBreakdownTooltipProps {
9
9
  }
10
10
  export declare const FeeBreakdownTooltip: React.FC<FeeBreakdownTooltipProps>;
11
11
  //#endregion
12
+ export {};
12
13
  //# sourceMappingURL=FeeBreakdownTooltip.d.ts.map
@@ -7,4 +7,5 @@ interface IconCircleProps extends Omit<BoxProps, "color"> {
7
7
  }
8
8
  export declare const IconCircle: React.FC<IconCircleProps>;
9
9
  //#endregion
10
+ export {};
10
11
  //# sourceMappingURL=IconCircle.d.ts.map
@@ -7,4 +7,5 @@ type WarningMessagesProps = BoxProps & {
7
7
  };
8
8
  export declare const WarningMessages: React.FC<WarningMessagesProps>;
9
9
  //#endregion
10
+ export {};
10
11
  //# sourceMappingURL=WarningMessages.d.ts.map
@@ -6,4 +6,5 @@ interface RouteDetailsProps {
6
6
  }
7
7
  export declare const RouteDetails: ({ route }: RouteDetailsProps) => JSX.Element;
8
8
  //#endregion
9
+ export {};
9
10
  //# sourceMappingURL=RouteDetails.d.ts.map
@@ -13,4 +13,5 @@ interface SearchInputProps {
13
13
  }
14
14
  export declare const SearchInput: ({ inputRef, name, placeholder, onChange, onBlur, onClear, value, autoFocus, size }: SearchInputProps) => JSX.Element;
15
15
  //#endregion
16
+ export {};
16
17
  //# sourceMappingURL=SearchInput.d.ts.map
@@ -5,4 +5,5 @@ interface SentToWalletRowProps {
5
5
  }
6
6
  export declare const SentToWalletRow: React.FC<SentToWalletRowProps>;
7
7
  //#endregion
8
+ export {};
8
9
  //# sourceMappingURL=SentToWalletRow.d.ts.map
@@ -8,4 +8,5 @@ interface StepActionsListProps {
8
8
  /** Non-animated list of completed execution step rows (transaction details view). */
9
9
  export declare const StepActionsList: React.FC<StepActionsListProps>;
10
10
  //#endregion
11
+ export {};
11
12
  //# sourceMappingURL=StepActionsList.d.ts.map
@@ -6,4 +6,5 @@ interface TokenRateProps extends TypographyProps {
6
6
  }
7
7
  export declare const TokenRate: React.FC<TokenRateProps>;
8
8
  //#endregion
9
+ export {};
9
10
  //# sourceMappingURL=TokenRate.d.ts.map
@@ -1,5 +1,5 @@
1
1
  //#region src/config/version.d.ts
2
2
  export declare const name = "@lifi/widget";
3
- export declare const version = "4.10.1";
3
+ export declare const version = "4.10.2";
4
4
  //#endregion
5
5
  //# sourceMappingURL=version.d.ts.map
@@ -1,6 +1,6 @@
1
1
  //#region src/config/version.ts
2
2
  const name = "@lifi/widget";
3
- const version = "4.10.1";
3
+ const version = "4.10.2";
4
4
  //#endregion
5
5
  export { name, version };
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":[],"sources":["../../../src/config/version.ts"],"sourcesContent":["export const name = '@lifi/widget'\nexport const version = '4.10.1'\n"],"mappings":";AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../../../src/config/version.ts"],"sourcesContent":["export const name = '@lifi/widget'\nexport const version = '4.10.2'\n"],"mappings":";AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
@@ -7,4 +7,5 @@ interface AddressActivity {
7
7
  }
8
8
  export declare const useAddressActivity: (chainId?: number) => AddressActivity;
9
9
  //#endregion
10
+ export {};
10
11
  //# sourceMappingURL=useAddressActivity.d.ts.map
@@ -25,4 +25,5 @@ export declare const useAddressValidation: () => {
25
25
  isValidating: boolean;
26
26
  };
27
27
  //#endregion
28
+ export {};
28
29
  //# sourceMappingURL=useAddressValidation.d.ts.map
@@ -8,4 +8,5 @@ export declare const useAvailableChains: (chainTypes?: ChainType[], widgetConfig
8
8
  isLoading: boolean;
9
9
  };
10
10
  //#endregion
11
+ export {};
11
12
  //# sourceMappingURL=useAvailableChains.d.ts.map
@@ -10,4 +10,5 @@ export declare const useExplorer: () => {
10
10
  getAddressLink: (address: string, chain?: Chain | number) => string | undefined;
11
11
  };
12
12
  //#endregion
13
+ export {};
13
14
  //# sourceMappingURL=useExplorer.d.ts.map
@@ -8,4 +8,5 @@ export declare const useListHeight: ({ listParentRef, headerRef }: UseContentHei
8
8
  listHeight: number;
9
9
  };
10
10
  //#endregion
11
+ export {};
11
12
  //# sourceMappingURL=useListHeight.d.ts.map
@@ -14,4 +14,5 @@ export declare const useRouteExecution: ({ routeId, executeInBackground, onAccep
14
14
  status: RouteExecutionStatus | undefined;
15
15
  };
16
16
  //#endregion
17
+ export {};
17
18
  //# sourceMappingURL=useRouteExecution.d.ts.map
@@ -28,4 +28,5 @@ export declare const useRoutes: ({ observableRoute, quoteFromAddress, keepPrevio
28
28
  setReviewableRoute: (route: Route) => void;
29
29
  };
30
30
  //#endregion
31
+ export {};
31
32
  //# sourceMappingURL=useRoutes.d.ts.map
@@ -6,4 +6,5 @@ interface MainWarningMessagesProps extends BoxProps {
6
6
  }
7
7
  export declare const MainWarningMessages: React.FC<MainWarningMessagesProps>;
8
8
  //#endregion
9
+ export {};
9
10
  //# sourceMappingURL=MainWarningMessages.d.ts.map
@@ -6,4 +6,5 @@ interface SearchTokenInputProps {
6
6
  }
7
7
  export declare const SearchTokenInput: ({ formType }: SearchTokenInputProps) => JSX.Element;
8
8
  //#endregion
9
+ export {};
9
10
  //# sourceMappingURL=SearchTokenInput.d.ts.map
@@ -5,4 +5,5 @@ interface ContactSupportButtonProps {
5
5
  }
6
6
  export declare const ContactSupportButton: ({ supportId }: ContactSupportButtonProps) => JSX.Element;
7
7
  //#endregion
8
+ export {};
8
9
  //# sourceMappingURL=ContactSupportButton.d.ts.map
@@ -10,4 +10,5 @@ export declare const ConfirmToAddressSheet: ({ ref, ...props }: ConfirmToAddress
10
10
  ref?: Ref<BottomSheetBase>;
11
11
  }) => JSX.Element;
12
12
  //#endregion
13
+ export {};
13
14
  //# sourceMappingURL=ConfirmToAddressSheet.d.ts.map
@@ -15,4 +15,5 @@ export declare const ExchangeRateBottomSheet: ({ onContinue, onCancel, ref }: Ex
15
15
  ref?: Ref<ExchangeRateBottomSheetBase>;
16
16
  }) => JSX.Element;
17
17
  //#endregion
18
+ export {};
18
19
  //# sourceMappingURL=ExchangeRateBottomSheet.d.ts.map
@@ -8,4 +8,5 @@ interface ExecutionDoneCardProps {
8
8
  }
9
9
  export declare const ExecutionDoneCard: React.FC<ExecutionDoneCardProps>;
10
10
  //#endregion
11
+ export {};
11
12
  //# sourceMappingURL=ExecutionDoneCard.d.ts.map
@@ -7,4 +7,5 @@ interface RouteTrackerProps {
7
7
  }
8
8
  export declare const RouteTracker: ({ observableRouteId, onChange, onFetching }: RouteTrackerProps) => JSX.Element;
9
9
  //#endregion
10
+ export {};
10
11
  //# sourceMappingURL=RouteTracker.d.ts.map
@@ -11,4 +11,5 @@ export declare const TokenValueBottomSheet: ({ route, onContinue, onCancel, ref
11
11
  ref?: Ref<BottomSheetBase>;
12
12
  }) => JSX.Element;
13
13
  //#endregion
14
+ export {};
14
15
  //# sourceMappingURL=TokenValueBottomSheet.d.ts.map
@@ -8,4 +8,5 @@ interface TransactionDoneButtonsProps {
8
8
  }
9
9
  export declare const TransactionDoneButtons: React.FC<TransactionDoneButtonsProps>;
10
10
  //#endregion
11
+ export {};
11
12
  //# sourceMappingURL=TransactionDoneButtons.d.ts.map
@@ -7,7 +7,7 @@ import { useLanguages } from "../../hooks/useLanguages.js";
7
7
  import { compactNumberFormatter } from "../../utils/compactNumberFormatter.js";
8
8
  import { currencyExtendedFormatter } from "../../utils/currencyExtendedFormatter.js";
9
9
  import { percentFormatter } from "../../utils/percentFormatter.js";
10
- import { enResource as en } from "./enResource.js";
10
+ import { enResource } from "./enResource.js";
11
11
  import { useEffect, useMemo, useRef } from "react";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  import { I18nextProvider } from "react-i18next";
@@ -30,7 +30,7 @@ const I18nProvider = ({ children }) => {
30
30
  lowerCaseLng: true,
31
31
  interpolation: { escapeValue: false },
32
32
  resources: {
33
- en: { translation: mergeWithLanguageResources(en, languageResources?.en) },
33
+ en: { translation: mergeWithLanguageResources(enResource, languageResources?.en) },
34
34
  ...initialLanguage && initialLanguage !== "en" && languageCache && { [initialLanguage]: { translation: languageCache } },
35
35
  ...customLanguageKeys.reduce((acc, key) => {
36
36
  const customResource = languageResources?.[key];
@@ -1 +1 @@
1
- {"version":3,"file":"I18nProvider.js","names":["enResource"],"sources":["../../../../src/providers/I18nProvider/I18nProvider.tsx"],"sourcesContent":["import { createInstance, type i18n } from 'i18next'\nimport { useEffect, useMemo, useRef } from 'react'\nimport { I18nextProvider } from 'react-i18next'\nimport { useLanguages } from '../../hooks/useLanguages.js'\nimport { useSettingsStore } from '../../stores/settings/SettingsStore.js'\nimport { useSettings } from '../../stores/settings/useSettings.js'\nimport { compactNumberFormatter } from '../../utils/compactNumberFormatter.js'\nimport { currencyExtendedFormatter } from '../../utils/currencyExtendedFormatter.js'\nimport { percentFormatter } from '../../utils/percentFormatter.js'\nimport { useWidgetConfig } from '../WidgetProvider/WidgetProvider.js'\nimport { allLanguages } from './constants.js'\nimport { enResource } from './enResource.js'\nimport { mergeWithLanguageResources } from './i18n.js'\nimport type { LanguageKey, LanguageResource, PartialResource } from './types.js'\n\nexport const I18nProvider: React.FC<React.PropsWithChildren> = ({\n children,\n}) => {\n const { languages, languageResources } = useWidgetConfig()\n const { language, languageCache } = useSettings(['language', 'languageCache'])\n const i18nInstanceRef = useRef<i18n | null>(null)\n\n const i18nInstance = useMemo(() => {\n if (i18nInstanceRef.current) {\n // Update i18n instance with language and language cache updates\n if (language && languageCache && language !== 'en') {\n i18nInstanceRef.current.addResourceBundle(\n language,\n 'translation',\n languageCache,\n true,\n true\n )\n }\n return i18nInstanceRef.current\n }\n\n // Custom language resources (of non-default languages) are added statically.\n // If custom language resources extend existing languages, they are merged with dynamically loaded resources.\n const customLanguageKeys = languageResources\n ? Object.keys(languageResources).filter(\n (key: string) => !allLanguages.includes(key as LanguageKey)\n )\n : []\n const initialLanguage = language || languages?.default\n const i18n = createInstance({\n lng: initialLanguage,\n fallbackLng: 'en',\n lowerCaseLng: true,\n interpolation: { escapeValue: false },\n resources: {\n en: {\n translation: mergeWithLanguageResources(\n enResource,\n languageResources?.en\n ),\n },\n ...(initialLanguage &&\n initialLanguage !== 'en' &&\n languageCache && {\n [initialLanguage]: {\n translation: languageCache,\n },\n }),\n // Add non-existing custom language resources\n ...customLanguageKeys.reduce(\n (acc, key) => {\n const customResource = languageResources?.[key as LanguageKey]\n if (customResource) {\n acc[key] = {\n translation: customResource,\n }\n }\n return acc\n },\n {} as Record<\n string,\n { translation: PartialResource<LanguageResource> }\n >\n ),\n },\n detection: {\n caches: [],\n },\n returnEmptyString: false,\n })\n\n i18n.init()\n\n i18n.services.formatter?.addCached('numberExt', compactNumberFormatter)\n i18n.services.formatter?.addCached('currencyExt', currencyExtendedFormatter)\n i18n.services.formatter?.addCached('percent', percentFormatter)\n i18nInstanceRef.current = i18n\n return i18n\n }, [language, languageResources, languages?.default, languageCache])\n\n return (\n <I18nextProvider i18n={i18nInstance}>\n {children}\n <DefaultLanguageHandler />\n </I18nextProvider>\n )\n}\n\n// Sync language settings internally when config.languages.default changes externally\nconst DefaultLanguageHandler: React.FC = () => {\n const { languages } = useWidgetConfig()\n const [lastDefaultLanguage, setValue] = useSettingsStore((state) => [\n state.lastDefaultLanguage,\n state.setValue,\n ])\n const { setLanguageWithCode: setLanguage } = useLanguages()\n\n useEffect(() => {\n const currentDefaultLanguage = languages?.default\n\n const defaultLanguageChanged =\n currentDefaultLanguage && currentDefaultLanguage !== lastDefaultLanguage\n\n if (!defaultLanguageChanged) {\n return\n }\n\n const updateLanguage = async () => {\n await setLanguage(currentDefaultLanguage)\n setValue('lastDefaultLanguage', currentDefaultLanguage)\n }\n\n updateLanguage()\n }, [languages?.default, setValue, lastDefaultLanguage, setLanguage])\n\n return null\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,gBAAmD,EAC9D,eACI;CACJ,MAAM,EAAE,WAAW,sBAAsB,gBAAgB;CACzD,MAAM,EAAE,UAAU,kBAAkB,YAAY,CAAC,YAAY,eAAe,CAAC;CAC7E,MAAM,kBAAkB,OAAoB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QACR,CAAC;CACD,MAAM,EAAE,qBAAqB,gBAAgB,aAAa;CAE1D,gBAAgB;EACd,MAAM,yBAAyB,WAAW;EAK1C,IAAI,EAFF,0BAA0B,2BAA2B,sBAGrD;EAGF,MAAM,iBAAiB,YAAY;GACjC,MAAM,YAAY,sBAAsB;GACxC,SAAS,uBAAuB,sBAAsB;EACxD;EAEA,eAAe;CACjB,GAAG;EAAC,WAAW;EAAS;EAAU;EAAqB;CAAW,CAAC;CAEnE,OAAO;AACT"}
1
+ {"version":3,"file":"I18nProvider.js","names":[],"sources":["../../../../src/providers/I18nProvider/I18nProvider.tsx"],"sourcesContent":["import { createInstance, type i18n } from 'i18next'\nimport { useEffect, useMemo, useRef } from 'react'\nimport { I18nextProvider } from 'react-i18next'\nimport { useLanguages } from '../../hooks/useLanguages.js'\nimport { useSettingsStore } from '../../stores/settings/SettingsStore.js'\nimport { useSettings } from '../../stores/settings/useSettings.js'\nimport { compactNumberFormatter } from '../../utils/compactNumberFormatter.js'\nimport { currencyExtendedFormatter } from '../../utils/currencyExtendedFormatter.js'\nimport { percentFormatter } from '../../utils/percentFormatter.js'\nimport { useWidgetConfig } from '../WidgetProvider/WidgetProvider.js'\nimport { allLanguages } from './constants.js'\nimport { enResource } from './enResource.js'\nimport { mergeWithLanguageResources } from './i18n.js'\nimport type { LanguageKey, LanguageResource, PartialResource } from './types.js'\n\nexport const I18nProvider: React.FC<React.PropsWithChildren> = ({\n children,\n}) => {\n const { languages, languageResources } = useWidgetConfig()\n const { language, languageCache } = useSettings(['language', 'languageCache'])\n const i18nInstanceRef = useRef<i18n | null>(null)\n\n const i18nInstance = useMemo(() => {\n if (i18nInstanceRef.current) {\n // Update i18n instance with language and language cache updates\n if (language && languageCache && language !== 'en') {\n i18nInstanceRef.current.addResourceBundle(\n language,\n 'translation',\n languageCache,\n true,\n true\n )\n }\n return i18nInstanceRef.current\n }\n\n // Custom language resources (of non-default languages) are added statically.\n // If custom language resources extend existing languages, they are merged with dynamically loaded resources.\n const customLanguageKeys = languageResources\n ? Object.keys(languageResources).filter(\n (key: string) => !allLanguages.includes(key as LanguageKey)\n )\n : []\n const initialLanguage = language || languages?.default\n const i18n = createInstance({\n lng: initialLanguage,\n fallbackLng: 'en',\n lowerCaseLng: true,\n interpolation: { escapeValue: false },\n resources: {\n en: {\n translation: mergeWithLanguageResources(\n enResource,\n languageResources?.en\n ),\n },\n ...(initialLanguage &&\n initialLanguage !== 'en' &&\n languageCache && {\n [initialLanguage]: {\n translation: languageCache,\n },\n }),\n // Add non-existing custom language resources\n ...customLanguageKeys.reduce(\n (acc, key) => {\n const customResource = languageResources?.[key as LanguageKey]\n if (customResource) {\n acc[key] = {\n translation: customResource,\n }\n }\n return acc\n },\n {} as Record<\n string,\n { translation: PartialResource<LanguageResource> }\n >\n ),\n },\n detection: {\n caches: [],\n },\n returnEmptyString: false,\n })\n\n i18n.init()\n\n i18n.services.formatter?.addCached('numberExt', compactNumberFormatter)\n i18n.services.formatter?.addCached('currencyExt', currencyExtendedFormatter)\n i18n.services.formatter?.addCached('percent', percentFormatter)\n i18nInstanceRef.current = i18n\n return i18n\n }, [language, languageResources, languages?.default, languageCache])\n\n return (\n <I18nextProvider i18n={i18nInstance}>\n {children}\n <DefaultLanguageHandler />\n </I18nextProvider>\n )\n}\n\n// Sync language settings internally when config.languages.default changes externally\nconst DefaultLanguageHandler: React.FC = () => {\n const { languages } = useWidgetConfig()\n const [lastDefaultLanguage, setValue] = useSettingsStore((state) => [\n state.lastDefaultLanguage,\n state.setValue,\n ])\n const { setLanguageWithCode: setLanguage } = useLanguages()\n\n useEffect(() => {\n const currentDefaultLanguage = languages?.default\n\n const defaultLanguageChanged =\n currentDefaultLanguage && currentDefaultLanguage !== lastDefaultLanguage\n\n if (!defaultLanguageChanged) {\n return\n }\n\n const updateLanguage = async () => {\n await setLanguage(currentDefaultLanguage)\n setValue('lastDefaultLanguage', currentDefaultLanguage)\n }\n\n updateLanguage()\n }, [languages?.default, setValue, lastDefaultLanguage,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,iBAAD;EAAiB,MAAM;EAAvB,UAAA,CACG,UACD,oBAAC,wBAAD,CAAyB,CAAA,CACV;;AAErB;AAGA,MAAM,+BAAyC;CAC7C,MAAM,EAAE,cAAc,gBAAgB;CACtC,MAAM,CAAC,qBAAqB,YAAY,kBAAkB,UAAU,CAClE,MAAM,qBACN,MAAM,QACR,CAAC;CACD,MAAM,EAAE,qBAAqB,gBAAgB,aAAa;CAE1D,gBAAgB;EACd,MAAM,yBAAyB,WAAW;EAK1C,IAAI,EAFF,0BAA0B,2BAA2B,sBAGrD;EAGF,MAAM,iBAAiB,YAAY;GACjC,MAAM,YAAY,sBAAsB;GACxC,SAAS,uBAAuB,sBAAsB;EACxD;EAEA,eAAe;CACjB,GAAG;EAAC,WAAW;EAAS;EAAU;EAAqB;CAAW,CAAC;CAEnE,OAAO;AACT"}
@@ -1,2 +1,2 @@
1
- import en from "../../i18n/en.json" with { type: "json" };
2
- export { en as enResource };
1
+ import enResource from "../../i18n/en.json" with { type: "json" };
2
+ export { enResource };
@@ -1,2 +1 @@
1
- import en from "../../i18n/en.json" with { type: "json" };
2
- export { en as enResource };
1
+ export { default as enResource } from "../../i18n/en.json" with { type: "json" };
@@ -1,8 +1,8 @@
1
- import { enResource as en } from "./enResource.js";
1
+ import { enResource } from "./enResource.js";
2
2
  //#region src/providers/I18nProvider/types.d.ts
3
3
  export type PartialResource<T> = T extends object ? { [P in keyof T]?: PartialResource<T[P]>; } : T;
4
4
  export type LanguageKey = "en" | "es" | "fr" | "de" | "it" | "pt" | "ja" | "ko" | "zh" | "hi" | "bn" | "th" | "vi" | "tr" | "uk" | "id" | "pl";
5
- export type LanguageResource = typeof en;
5
+ export type LanguageResource = typeof enResource;
6
6
  export type LanguageResources = { [K in LanguageKey]?: PartialResource<LanguageResource>; } | {
7
7
  [language: string]: PartialResource<LanguageResource>;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":["enResource"],"sources":["../../../../src/providers/I18nProvider/types.ts"],"mappings":";;YAEY,gBAAgB,KAAK,sBAE1B,WAAW,KAAK,gBAAgB,EAAE,SAErC;YAEQ;YAmBA,0BAA0BA;YAE1B,uBAEL,KAAK,eAAe,gBAAgB;GAGjB,mBAAA,gBAAgB"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/providers/I18nProvider/types.ts"],"mappings":";;YAEY,gBAAgB,KAAK,sBAE1B,WAAW,KAAK,gBAAgB,EAAE,SAErC;YAEQ;YAmBA,0BAA0B;YAE1B,uBAEL,KAAK,eAAe,gBAAgB;GAGjB,mBAAA,gBAAgB"}
@@ -6,4 +6,5 @@ interface WalletProviderProps extends PropsWithChildren {
6
6
  }
7
7
  export declare const WalletProvider: ({ children, providers }: PropsWithChildren<WalletProviderProps>) => JSX.Element;
8
8
  //#endregion
9
+ export {};
9
10
  //# sourceMappingURL=WalletProvider.d.ts.map
@@ -23,4 +23,5 @@ export interface ChainOrderState extends ChainOrderProps {
23
23
  setPinnedChain(chainId: number): void;
24
24
  }
25
25
  //#endregion
26
+ export {};
26
27
  //# sourceMappingURL=types.d.ts.map
@@ -80,4 +80,5 @@ export declare const FormKeyHelper: {
80
80
  getAmountKey: (formType: FormType) => "fromAmount" | "toAmount";
81
81
  };
82
82
  //#endregion
83
+ export {};
83
84
  //# sourceMappingURL=types.d.ts.map
@@ -16,4 +16,5 @@ export interface HeaderState extends HeaderStateBase {
16
16
  executeBackAction(): void;
17
17
  }
18
18
  //#endregion
19
+ export {};
19
20
  //# sourceMappingURL=types.d.ts.map
@@ -9,4 +9,5 @@ interface InputModeState {
9
9
  }
10
10
  export declare const useInputModeStore: UseBoundStore<StoreApi<InputModeState>>;
11
11
  //#endregion
12
+ export {};
12
13
  //# sourceMappingURL=useInputModeStore.d.ts.map
@@ -8,4 +8,5 @@ interface GetPriceImpactProps {
8
8
  }
9
9
  export declare const getPriceImpact: ({ fromToken, toToken, fromAmount, toAmount }: GetPriceImpactProps) => number;
10
10
  //#endregion
11
+ export {};
11
12
  //# sourceMappingURL=getPriceImpact.d.ts.map
@@ -25,4 +25,5 @@ export declare const navigationRoutes: {
25
25
  type NavigationRouteTypeKeys = keyof typeof navigationRoutes;
26
26
  export type NavigationRouteType = (typeof navigationRoutes)[NavigationRouteTypeKeys];
27
27
  //#endregion
28
+ export {};
28
29
  //# sourceMappingURL=navigationRoutes.d.ts.map
@@ -3,4 +3,5 @@ import { WidgetConfig } from "../types/widget.js";
3
3
  type ScopeKeyConfig = Pick<WidgetConfig, "storageScopeKey" | "queryScopeKey" | "keyPrefix">;
4
4
  export declare const resolveStorageScopeKey: (config: Partial<ScopeKeyConfig> | undefined) => string | undefined;
5
5
  //#endregion
6
+ export {};
6
7
  //# sourceMappingURL=scopeKeys.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/widget",
3
- "version": "4.10.1",
3
+ "version": "4.10.2",
4
4
  "description": "LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
@@ -57,18 +57,18 @@
57
57
  "dependencies": {
58
58
  "@emotion/react": "^11.14.0",
59
59
  "@emotion/styled": "^11.14.1",
60
- "@lifi/sdk": "^4.12.0",
61
- "@lifi/wallet-management": "4.3.3",
62
- "@lifi/widget-provider": "4.6.1",
63
- "@mui/icons-material": "^9.4.0",
64
- "@mui/material": "^9.4.0",
65
- "@mui/system": "^9.4.0",
66
- "@tanstack/react-router": "^1.170.41",
67
- "@tanstack/react-virtual": "^3.14.13",
60
+ "@lifi/sdk": "^4.12.1",
61
+ "@lifi/wallet-management": "4.3.4",
62
+ "@lifi/widget-provider": "4.6.2",
63
+ "@mui/icons-material": "^9.5.0",
64
+ "@mui/material": "^9.5.0",
65
+ "@mui/system": "^9.5.0",
66
+ "@tanstack/react-router": "^1.170.42",
67
+ "@tanstack/react-virtual": "^3.14.17",
68
68
  "eventemitter3": "^5.0.4",
69
- "i18next": "^26.4.2",
69
+ "i18next": "^26.4.4",
70
70
  "microdiff": "^1.6.0",
71
- "motion": "^14.0.0",
71
+ "motion": "^14.1.0",
72
72
  "react-i18next": "^17.0.16",
73
73
  "react-intersection-observer": "^11.0.1",
74
74
  "react-transition-group": "^4.4.5",
@@ -1,2 +1,2 @@
1
1
  export const name = '@lifi/widget'
2
- export const version = '4.10.1'
2
+ export const version = '4.10.2'