@koine/next 1.0.18 → 1.0.20

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/i18n/T/index.d.ts CHANGED
@@ -1,8 +1,6 @@
1
- /// <reference types="react" />
2
1
  import type { TransProps } from "next-translate";
3
- import type { TranslationsPaths, TranslationsAllPaths } from "../useT";
4
- export declare type TProps<TNamespace extends keyof Koine.NextTranslations | undefined = undefined> = Omit<TransProps, "i18nKey" | "ns"> & {
5
- i18nKey: TNamespace extends keyof Koine.NextTranslations ? TranslationsPaths<Koine.NextTranslations[TNamespace]> : TranslationsAllPaths;
6
- ns?: TNamespace;
2
+ import type { /* TranslationsPaths, */ TranslationsAllPaths } from "../useT";
3
+ export declare type TProps = Omit<TransProps, "i18nKey" | "ns"> & {
4
+ i18nKey: TranslationsAllPaths;
7
5
  };
8
- export declare function T(props: TProps): JSX.Element;
6
+ export declare const T: (props: TProps) => JSX.Element;
package/i18n/T/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import { __assign } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import Trans from "next-translate/Trans";
4
- export function T(props) {
5
- return _jsx(Trans, __assign({}, props));
6
- }
4
+ export var T = function (props) { return _jsx(Trans, __assign({}, props)); };
@@ -1,11 +1,11 @@
1
1
  export declare type TranslateNamespace = Extract<keyof Koine.NextTranslations, string>;
2
2
  declare type Join<S1, S2> = S1 extends string ? S2 extends string ? `${S1}.${S2}` : S1 : never;
3
3
  export declare type TranslationsPaths<T, TAddRoot extends true | undefined = undefined> = {
4
- [K in keyof T]: T[K] extends Record<string, unknown> ? K extends string ? TAddRoot extends true ? `${K}` | Join<K, TranslationsPaths<T[K]>> : Join<K, TranslationsPaths<T[K]>> : K : K;
4
+ [K in keyof T]: T[K] extends Record<string, unknown> ? K extends string ? TAddRoot extends true ? `${K}` | Join<K, TranslationsPaths<T[K], TAddRoot>> : Join<K, TranslationsPaths<T[K], TAddRoot>> : K : K;
5
5
  }[keyof T];
6
6
  export declare type TranslationsAllPaths = {
7
7
  [N in Extract<keyof Koine.NextTranslations, string>]: {
8
- [K in Extract<keyof Koine.NextTranslations[N], string>]: Koine.NextTranslations[N][K] extends Array<Record<string, unknown>> ? `${N}:${K}` : Koine.NextTranslations[N][K] extends Record<string, unknown> ? Join<K extends string ? `${N}:${K}` : `${N}:`, TranslationsPaths<Koine.NextTranslations[N][K], true>> : Koine.NextTranslations[N][K] extends Array<string | number | boolean> ? `${N}:${K}` : Koine.NextTranslations[N][K] extends string | number | boolean ? K extends string ? `${N}:${K}` : `${N}:` : ``;
8
+ [K in Extract<keyof Koine.NextTranslations[N], string>]: Koine.NextTranslations[N][K] extends Array<Record<string, unknown>> ? `${N}:${K}` : Koine.NextTranslations[N][K] extends Record<string, unknown> ? `${N}:${K}` | Join<K extends string ? `${N}:${K}` : `${N}:`, TranslationsPaths<Koine.NextTranslations[N][K], true>> : Koine.NextTranslations[N][K] extends Array<string | number | boolean> ? `${N}:${K}` : Koine.NextTranslations[N][K] extends string | number | boolean ? K extends string ? `${N}:${K}` : `${N}:` : ``;
9
9
  }[Extract<keyof Koine.NextTranslations[N], string>];
10
10
  }[Extract<keyof Koine.NextTranslations, string>];
11
11
  /**
@@ -4,7 +4,5 @@ exports.T = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var jsx_runtime_1 = require("react/jsx-runtime");
6
6
  var Trans_1 = tslib_1.__importDefault(require("next-translate/Trans"));
7
- function T(props) {
8
- return (0, jsx_runtime_1.jsx)(Trans_1.default, tslib_1.__assign({}, props));
9
- }
7
+ var T = function (props) { return (0, jsx_runtime_1.jsx)(Trans_1.default, tslib_1.__assign({}, props)); };
10
8
  exports.T = T;
package/package.json CHANGED
@@ -6,9 +6,9 @@
6
6
  "dependencies": {
7
7
  "react": "^16.8 || ^17 || ^18",
8
8
  "next": "^12.1.6",
9
- "@koine/utils": "1.0.18",
9
+ "@koine/utils": "1.0.20",
10
10
  "framer-motion": "^6.3.4",
11
- "@koine/react": "1.0.18",
11
+ "@koine/react": "1.0.20",
12
12
  "styled-components": "^5.3.5",
13
13
  "@mui/base": "^5.0.0-alpha.82",
14
14
  "react-icons": "^4.3.1",
@@ -29,7 +29,7 @@
29
29
  "next-seo": "^5.4.0"
30
30
  },
31
31
  "peerDependencies": {},
32
- "version": "1.0.18",
32
+ "version": "1.0.20",
33
33
  "module": "./index.js",
34
34
  "types": "./index.d.ts"
35
35
  }