mtxuilib 0.1.289 → 0.1.291

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.
@@ -1,4 +1,4 @@
1
- import { TOptions } from 'i18next';
1
+ import type { TOptions } from "i18next";
2
2
  export declare function i18nSetupLocalization(): void;
3
3
  type TranslatorProps = {
4
4
  path: string | string[];
package/dist/i18n/i18n.js CHANGED
@@ -1,22 +1,21 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Skeleton } from '@mui/material';
3
- import { useTranslation as usei18nextTranslation } from 'react-i18next';
4
- import i18n from 'i18next';
5
- import { initReactI18next } from 'react-i18next';
2
+ import { useTranslation as usei18nextTranslation } from "react-i18next";
3
+ import i18n from "i18next";
4
+ import { initReactI18next } from "react-i18next";
6
5
  const i18nConfig = {
7
- fallbackLng: 'en-US',
8
- defaultNS: 'translation'
6
+ fallbackLng: "en-US",
7
+ defaultNS: "translation",
9
8
  };
10
9
  export function i18nSetupLocalization() {
11
10
  i18n
12
11
  .use(initReactI18next)
13
12
  .init(i18nConfig)
14
- .catch((err) => console.error('[i18n] Failed to setup localization.', err));
13
+ .catch((err) => console.error("[i18n] Failed to setup localization.", err));
15
14
  }
16
15
  export const Translator = ({ path, options, suffix }) => {
17
16
  const { t, i18n } = usei18nextTranslation();
18
17
  if (!i18n.exists(path, options)) {
19
- return _jsx(Skeleton, { variant: "text", width: 20 });
18
+ return _jsx("div", {});
20
19
  }
21
20
  return (_jsxs("span", { children: [t(path, options), suffix] }));
22
21
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mtxuilib",
3
3
  "private": false,
4
- "version": "0.1.289",
4
+ "version": "0.1.291",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },