@koine/next 1.2.3 → 2.0.0-alpha.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.
- package/{AnalyticsGoogle.d.ts → 12/AnalyticsGoogle.d.ts} +1 -1
- package/{AnalyticsGoogle.js → 12/AnalyticsGoogle.js} +2 -1
- package/{AnalyticsGoogle.mjs → 12/AnalyticsGoogle.mjs} +2 -2
- package/{DisableErrorOverlay.d.ts → 12/DisableErrorOverlay.d.ts} +1 -1
- package/{DynamicNamespaces.js → 12/DynamicNamespaces.js} +1 -0
- package/{DynamicNamespaces.mjs → 12/DynamicNamespaces.mjs} +1 -0
- package/{Favicon.d.ts → 12/Favicon.d.ts} +1 -1
- package/{Link.js → 12/Link.js} +1 -1
- package/{Link.mjs → 12/Link.mjs} +1 -1
- package/{NextProgress.d.ts → 12/NextProgress.d.ts} +1 -1
- package/{NextProgress.js → 12/NextProgress.js} +1 -0
- package/{NextProgress.mjs → 12/NextProgress.mjs} +1 -0
- package/{Seo.d.ts → 12/Seo.d.ts} +1 -1
- package/{SeoDefaults.d.ts → 12/SeoDefaults.d.ts} +1 -1
- package/{T.d.ts → 12/T.d.ts} +1 -0
- package/{T.js → 12/T.js} +1 -0
- package/{T.mjs → 12/T.mjs} +1 -0
- package/{ThemeProvider.d.ts → 12/ThemeProvider.d.ts} +1 -1
- package/{ThemeProvider.js → 12/ThemeProvider.js} +3 -14
- package/{ThemeProvider.mjs → 12/ThemeProvider.mjs} +4 -15
- package/{TransText.js → 12/TransText.js} +1 -0
- package/{TransText.mjs → 12/TransText.mjs} +1 -0
- package/12/app/AppHead.d.ts +3 -0
- package/{app → 12/app}/css/AppMain.d.ts +1 -1
- package/{app → 12/app}/css/AppTheme.d.ts +2 -2
- package/{app → 12/app}/css/AppTheme.js +1 -2
- package/{app → 12/app}/css/AppTheme.mjs +1 -2
- package/12/app/css/auth/index.d.ts +11 -0
- package/{app → 12/app}/css/auth/index.js +1 -1
- package/{app → 12/app}/css/auth/index.mjs +1 -1
- package/{app → 12/app}/css/index.d.ts +1 -1
- package/{app/em → 12/app/sc}/AppMain.d.ts +1 -1
- package/{app → 12/app}/sc/AppMain.js +1 -1
- package/{app → 12/app}/sc/AppMain.mjs +1 -1
- package/{app → 12/app}/sc/AppTheme.d.ts +2 -2
- package/{app → 12/app}/sc/AppTheme.js +1 -2
- package/{app → 12/app}/sc/AppTheme.mjs +1 -2
- package/12/app/sc/auth/index.d.ts +11 -0
- package/{app/em → 12/app/sc}/auth/index.js +1 -1
- package/{app/em → 12/app/sc}/auth/index.mjs +1 -1
- package/{app → 12/app}/sc/index.d.ts +4 -4
- package/{document → 12/document}/Document.d.ts +1 -2
- package/{document → 12/document}/Document.js +1 -1
- package/{document → 12/document}/Document.mjs +2 -2
- package/{document → 12/document}/css/index.d.ts +1 -2
- package/{document → 12/document}/css/index.js +1 -1
- package/{document → 12/document}/css/index.mjs +3 -3
- package/{document → 12/document}/sc/index.d.ts +2 -3
- package/{document → 12/document}/sc/index.js +1 -1
- package/{document → 12/document}/sc/index.mjs +1 -1
- package/{getT.js → 12/getT.js} +2 -1
- package/{getT.mjs → 12/getT.mjs} +1 -0
- package/12/index.d.ts +24 -0
- package/12/index.js +52 -0
- package/12/index.mjs +27 -0
- package/{types-i18n.d.ts → 12/types-i18n.d.ts} +1 -1
- package/{useBackUrl.js → 12/useBackUrl.js} +1 -0
- package/{useBackUrl.mjs → 12/useBackUrl.mjs} +1 -0
- package/{useDateFormat.js → 12/useDateFormat.js} +1 -0
- package/{useDateFormat.mjs → 12/useDateFormat.mjs} +1 -0
- package/{useForm.d.ts → 12/useForm.d.ts} +1 -1
- package/{useForm.js → 12/useForm.js} +1 -0
- package/{useForm.mjs → 12/useForm.mjs} +1 -0
- package/{useLocale.js → 12/useLocale.js} +1 -0
- package/{useLocale.mjs → 12/useLocale.mjs} +1 -0
- package/12/useT.d.ts +4 -0
- package/{useT.js → 12/useT.js} +21 -16
- package/12/useT.mjs +21 -0
- package/{useTheme.js → 12/useTheme.js} +1 -0
- package/{useTheme.mjs → 12/useTheme.mjs} +1 -0
- package/{useTo.js → 12/useTo.js} +1 -0
- package/{useTo.mjs → 12/useTo.mjs} +1 -0
- package/index.d.ts +2 -28
- package/index.js +5 -31
- package/index.mjs +2 -30
- package/package.json +13 -30
- package/typings.d.ts +0 -87
- package/Head.d.ts +0 -3
- package/Head.js +0 -7
- package/Head.mjs +0 -3
- package/app/AppHead.d.ts +0 -3
- package/app/css/auth/index.d.ts +0 -11
- package/app/em/AppMain.js +0 -29
- package/app/em/AppMain.mjs +0 -25
- package/app/em/AppTheme.d.ts +0 -16
- package/app/em/AppTheme.js +0 -23
- package/app/em/AppTheme.mjs +0 -19
- package/app/em/auth/index.d.ts +0 -11
- package/app/em/index.d.ts +0 -9
- package/app/em/index.js +0 -16
- package/app/em/index.mjs +0 -12
- package/app/sc/AppMain.d.ts +0 -11
- package/app/sc/auth/index.d.ts +0 -11
- package/app/sc/auth/index.js +0 -17
- package/app/sc/auth/index.mjs +0 -13
- package/auth/helpers.d.ts +0 -17
- package/auth/helpers.js +0 -28
- package/auth/helpers.mjs +0 -22
- package/auth/index.d.ts +0 -4
- package/auth/index.js +0 -7
- package/auth/index.mjs +0 -4
- package/auth/useLogin.d.ts +0 -8
- package/auth/useLogin.js +0 -54
- package/auth/useLogin.mjs +0 -50
- package/auth/useLoginUrl.d.ts +0 -2
- package/auth/useLoginUrl.js +0 -16
- package/auth/useLoginUrl.mjs +0 -12
- package/auth/useLogout.d.ts +0 -7
- package/auth/useLogout.js +0 -58
- package/auth/useLogout.mjs +0 -53
- package/createEmotionCache.d.ts +0 -6
- package/createEmotionCache.js +0 -14
- package/createEmotionCache.mjs +0 -9
- package/document/em/index.d.ts +0 -16
- package/document/em/index.js +0 -63
- package/document/em/index.mjs +0 -60
- package/document/em/package.json +0 -6
- package/document/package.json +0 -6
- package/document/sc/package.json +0 -6
- package/revalidate.d.ts +0 -5
- package/revalidate.js +0 -8
- package/revalidate.mjs +0 -5
- package/useT.d.ts +0 -17
- package/useT.mjs +0 -34
- /package/{DisableErrorOverlay.js → 12/DisableErrorOverlay.js} +0 -0
- /package/{DisableErrorOverlay.mjs → 12/DisableErrorOverlay.mjs} +0 -0
- /package/{DynamicNamespaces.d.ts → 12/DynamicNamespaces.d.ts} +0 -0
- /package/{Favicon.js → 12/Favicon.js} +0 -0
- /package/{Favicon.mjs → 12/Favicon.mjs} +0 -0
- /package/{Link.d.ts → 12/Link.d.ts} +0 -0
- /package/{Seo.js → 12/Seo.js} +0 -0
- /package/{Seo.mjs → 12/Seo.mjs} +0 -0
- /package/{SeoDefaults.js → 12/SeoDefaults.js} +0 -0
- /package/{SeoDefaults.mjs → 12/SeoDefaults.mjs} +0 -0
- /package/{ThemeContext.d.ts → 12/ThemeContext.d.ts} +0 -0
- /package/{ThemeContext.js → 12/ThemeContext.js} +0 -0
- /package/{ThemeContext.mjs → 12/ThemeContext.mjs} +0 -0
- /package/{TransText.d.ts → 12/TransText.d.ts} +0 -0
- /package/{app → 12/app}/AppHead.js +0 -0
- /package/{app → 12/app}/AppHead.mjs +0 -0
- /package/{app → 12/app}/AppMain.d.ts +0 -0
- /package/{app → 12/app}/AppMain.js +0 -0
- /package/{app → 12/app}/AppMain.mjs +0 -0
- /package/{app → 12/app}/css/AppMain.js +0 -0
- /package/{app → 12/app}/css/AppMain.mjs +0 -0
- /package/{app → 12/app}/css/auth/package.json +0 -0
- /package/{app → 12/app}/css/index.js +0 -0
- /package/{app → 12/app}/css/index.mjs +0 -0
- /package/{app → 12/app}/css/package.json +0 -0
- /package/{app → 12/app}/index.d.ts +0 -0
- /package/{app → 12/app}/index.js +0 -0
- /package/{app → 12/app}/index.mjs +0 -0
- /package/{app/em/auth → 12/app}/package.json +0 -0
- /package/{app/em → 12/app/sc/auth}/package.json +0 -0
- /package/{app → 12/app}/sc/index.js +0 -0
- /package/{app → 12/app}/sc/index.mjs +0 -0
- /package/{app → 12/app/sc}/package.json +0 -0
- /package/{app/sc/auth → 12/document/css}/package.json +0 -0
- /package/{document → 12/document}/index.d.ts +0 -0
- /package/{document → 12/document}/index.js +0 -0
- /package/{document → 12/document}/index.mjs +0 -0
- /package/{app/sc → 12/document}/package.json +0 -0
- /package/{auth → 12/document/sc}/package.json +0 -0
- /package/{getT.d.ts → 12/getT.d.ts} +0 -0
- /package/{document/css → 12}/package.json +0 -0
- /package/{seoBuildTags.d.ts → 12/seoBuildTags.d.ts} +0 -0
- /package/{seoBuildTags.js → 12/seoBuildTags.js} +0 -0
- /package/{seoBuildTags.mjs → 12/seoBuildTags.mjs} +0 -0
- /package/{to.d.ts → 12/to.d.ts} +0 -0
- /package/{to.js → 12/to.js} +0 -0
- /package/{to.mjs → 12/to.mjs} +0 -0
- /package/{translationAsOptions.d.ts → 12/translationAsOptions.d.ts} +0 -0
- /package/{translationAsOptions.js → 12/translationAsOptions.js} +0 -0
- /package/{translationAsOptions.mjs → 12/translationAsOptions.mjs} +0 -0
- /package/{types-i18n.js → 12/types-i18n.js} +0 -0
- /package/{types-i18n.mjs → 12/types-i18n.mjs} +0 -0
- /package/{types-seo.d.ts → 12/types-seo.d.ts} +0 -0
- /package/{types-seo.js → 12/types-seo.js} +0 -0
- /package/{types-seo.mjs → 12/types-seo.mjs} +0 -0
- /package/{useBackUrl.d.ts → 12/useBackUrl.d.ts} +0 -0
- /package/{useDateFormat.d.ts → 12/useDateFormat.d.ts} +0 -0
- /package/{useLocale.d.ts → 12/useLocale.d.ts} +0 -0
- /package/{useTheme.d.ts → 12/useTheme.d.ts} +0 -0
- /package/{useTo.d.ts → 12/useTo.d.ts} +0 -0
package/{getT.mjs → 12/getT.mjs}
RENAMED
package/12/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { AnalyticsGoogle, type AnalyticsGoogleProps } from "./AnalyticsGoogle";
|
|
2
|
+
export { DisableErrorOverlay } from "./DisableErrorOverlay";
|
|
3
|
+
export { DynamicNamespaces, type DynamicNamespacesProps, } from "./DynamicNamespaces";
|
|
4
|
+
export { Favicon, type FaviconProps } from "./Favicon";
|
|
5
|
+
export { getT, type GetT } from "./getT";
|
|
6
|
+
export { Link, type LinkProps } from "./Link";
|
|
7
|
+
export { NextProgress, type NextProgressProps } from "./NextProgress";
|
|
8
|
+
export { Seo, type SeoProps } from "./Seo";
|
|
9
|
+
export { SeoDefaults, type SeoDefaultsProps } from "./SeoDefaults";
|
|
10
|
+
export { T, type TProps } from "./T";
|
|
11
|
+
export { ThemeContext, type ThemeContextProps } from "./ThemeContext";
|
|
12
|
+
export { ThemeProvider, type ThemeProviderProps } from "./ThemeProvider";
|
|
13
|
+
export { to, type ToArgs, type ToTranslate, type ToDynamicRoute, type ToStaticRoute, } from "./to";
|
|
14
|
+
export { translationAsOptions } from "./translationAsOptions";
|
|
15
|
+
export { TransText } from "./TransText";
|
|
16
|
+
export type { Translate, TranslateDefault, TranslateLoose, TranslateNamespace, TranslateNamespaced, TranslatedRoute, TranslatedRoutesChildrenOf, TranslationOptions, TranslationQuery, TranslationShortcut, TranslationsAllPaths, TranslationsDictionary, TranslationsDictionaryDefault, TranslationsPaths, } from "./types-i18n";
|
|
17
|
+
export type { SeoData } from "./types-seo";
|
|
18
|
+
export { useBackUrl } from "./useBackUrl";
|
|
19
|
+
export { useDateFormat } from "./useDateFormat";
|
|
20
|
+
export { useForm } from "./useForm";
|
|
21
|
+
export { useLocale } from "./useLocale";
|
|
22
|
+
export { useT } from "./useT";
|
|
23
|
+
export { useTheme, type UseThemeProps } from "./useTheme";
|
|
24
|
+
export { useTo } from "./useTo";
|
package/12/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTo = exports.useTheme = exports.useT = exports.useLocale = exports.useForm = exports.useDateFormat = exports.useBackUrl = exports.TransText = exports.translationAsOptions = exports.to = exports.ThemeProvider = exports.ThemeContext = exports.T = exports.SeoDefaults = exports.Seo = exports.NextProgress = exports.Link = exports.getT = exports.Favicon = exports.DynamicNamespaces = exports.DisableErrorOverlay = exports.AnalyticsGoogle = void 0;
|
|
4
|
+
var AnalyticsGoogle_1 = require("./AnalyticsGoogle");
|
|
5
|
+
Object.defineProperty(exports, "AnalyticsGoogle", { enumerable: true, get: function () { return AnalyticsGoogle_1.AnalyticsGoogle; } });
|
|
6
|
+
var DisableErrorOverlay_1 = require("./DisableErrorOverlay");
|
|
7
|
+
Object.defineProperty(exports, "DisableErrorOverlay", { enumerable: true, get: function () { return DisableErrorOverlay_1.DisableErrorOverlay; } });
|
|
8
|
+
var DynamicNamespaces_1 = require("./DynamicNamespaces");
|
|
9
|
+
Object.defineProperty(exports, "DynamicNamespaces", { enumerable: true, get: function () { return DynamicNamespaces_1.DynamicNamespaces; } });
|
|
10
|
+
var Favicon_1 = require("./Favicon");
|
|
11
|
+
Object.defineProperty(exports, "Favicon", { enumerable: true, get: function () { return Favicon_1.Favicon; } });
|
|
12
|
+
var getT_1 = require("./getT");
|
|
13
|
+
Object.defineProperty(exports, "getT", { enumerable: true, get: function () { return getT_1.getT; } });
|
|
14
|
+
var Link_1 = require("./Link");
|
|
15
|
+
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return Link_1.Link; } });
|
|
16
|
+
var NextProgress_1 = require("./NextProgress");
|
|
17
|
+
Object.defineProperty(exports, "NextProgress", { enumerable: true, get: function () { return NextProgress_1.NextProgress; } });
|
|
18
|
+
var Seo_1 = require("./Seo");
|
|
19
|
+
Object.defineProperty(exports, "Seo", { enumerable: true, get: function () { return Seo_1.Seo; } });
|
|
20
|
+
// export {
|
|
21
|
+
// seoBuildTags,
|
|
22
|
+
// type LinkTag,
|
|
23
|
+
// type MetaTag
|
|
24
|
+
// } from "./seoBuildTags";
|
|
25
|
+
var SeoDefaults_1 = require("./SeoDefaults");
|
|
26
|
+
Object.defineProperty(exports, "SeoDefaults", { enumerable: true, get: function () { return SeoDefaults_1.SeoDefaults; } });
|
|
27
|
+
var T_1 = require("./T");
|
|
28
|
+
Object.defineProperty(exports, "T", { enumerable: true, get: function () { return T_1.T; } });
|
|
29
|
+
var ThemeContext_1 = require("./ThemeContext");
|
|
30
|
+
Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeContext; } });
|
|
31
|
+
var ThemeProvider_1 = require("./ThemeProvider");
|
|
32
|
+
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
|
|
33
|
+
var to_1 = require("./to");
|
|
34
|
+
Object.defineProperty(exports, "to", { enumerable: true, get: function () { return to_1.to; } });
|
|
35
|
+
var translationAsOptions_1 = require("./translationAsOptions");
|
|
36
|
+
Object.defineProperty(exports, "translationAsOptions", { enumerable: true, get: function () { return translationAsOptions_1.translationAsOptions; } });
|
|
37
|
+
var TransText_1 = require("./TransText");
|
|
38
|
+
Object.defineProperty(exports, "TransText", { enumerable: true, get: function () { return TransText_1.TransText; } });
|
|
39
|
+
var useBackUrl_1 = require("./useBackUrl");
|
|
40
|
+
Object.defineProperty(exports, "useBackUrl", { enumerable: true, get: function () { return useBackUrl_1.useBackUrl; } });
|
|
41
|
+
var useDateFormat_1 = require("./useDateFormat");
|
|
42
|
+
Object.defineProperty(exports, "useDateFormat", { enumerable: true, get: function () { return useDateFormat_1.useDateFormat; } });
|
|
43
|
+
var useForm_1 = require("./useForm");
|
|
44
|
+
Object.defineProperty(exports, "useForm", { enumerable: true, get: function () { return useForm_1.useForm; } });
|
|
45
|
+
var useLocale_1 = require("./useLocale");
|
|
46
|
+
Object.defineProperty(exports, "useLocale", { enumerable: true, get: function () { return useLocale_1.useLocale; } });
|
|
47
|
+
var useT_1 = require("./useT");
|
|
48
|
+
Object.defineProperty(exports, "useT", { enumerable: true, get: function () { return useT_1.useT; } });
|
|
49
|
+
var useTheme_1 = require("./useTheme");
|
|
50
|
+
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return useTheme_1.useTheme; } });
|
|
51
|
+
var useTo_1 = require("./useTo");
|
|
52
|
+
Object.defineProperty(exports, "useTo", { enumerable: true, get: function () { return useTo_1.useTo; } });
|
package/12/index.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { AnalyticsGoogle } from "./AnalyticsGoogle";
|
|
2
|
+
export { DisableErrorOverlay } from "./DisableErrorOverlay";
|
|
3
|
+
export { DynamicNamespaces, } from "./DynamicNamespaces";
|
|
4
|
+
export { Favicon } from "./Favicon";
|
|
5
|
+
export { getT } from "./getT";
|
|
6
|
+
export { Link } from "./Link";
|
|
7
|
+
export { NextProgress } from "./NextProgress";
|
|
8
|
+
export { Seo } from "./Seo";
|
|
9
|
+
// export {
|
|
10
|
+
// seoBuildTags,
|
|
11
|
+
// type LinkTag,
|
|
12
|
+
// type MetaTag
|
|
13
|
+
// } from "./seoBuildTags";
|
|
14
|
+
export { SeoDefaults } from "./SeoDefaults";
|
|
15
|
+
export { T } from "./T";
|
|
16
|
+
export { ThemeContext } from "./ThemeContext";
|
|
17
|
+
export { ThemeProvider } from "./ThemeProvider";
|
|
18
|
+
export { to, } from "./to";
|
|
19
|
+
export { translationAsOptions } from "./translationAsOptions";
|
|
20
|
+
export { TransText } from "./TransText";
|
|
21
|
+
export { useBackUrl } from "./useBackUrl";
|
|
22
|
+
export { useDateFormat } from "./useDateFormat";
|
|
23
|
+
export { useForm } from "./useForm";
|
|
24
|
+
export { useLocale } from "./useLocale";
|
|
25
|
+
export { useT } from "./useT";
|
|
26
|
+
export { useTheme } from "./useTheme";
|
|
27
|
+
export { useTo } from "./useTo";
|
|
@@ -80,7 +80,7 @@ export type TranslationOptions = undefined | TranslationShortcut | {
|
|
|
80
80
|
/**
|
|
81
81
|
* Translate function which optionally accept a namespace as first argument
|
|
82
82
|
*/
|
|
83
|
-
export type Translate<TNamespace extends TranslateNamespace | undefined> = TNamespace extends TranslateNamespace ? TranslateNamespaced<TNamespace> : TranslateDefault;
|
|
83
|
+
export type Translate<TNamespace extends TranslateNamespace | undefined = TranslateNamespace> = TNamespace extends TranslateNamespace ? TranslateNamespaced<TNamespace> : TranslateDefault;
|
|
84
84
|
/**
|
|
85
85
|
* Translate function **without** namespace, it allows to select any of the all
|
|
86
86
|
* available strings in all namespaces.
|
|
@@ -12,7 +12,7 @@ export declare function useForm<T extends FieldValues>(schema: ObjectSchema<any>
|
|
|
12
12
|
formState: import("react-hook-form").FormState<T>;
|
|
13
13
|
resetField: import("react-hook-form").UseFormResetField<T>;
|
|
14
14
|
reset: import("react-hook-form").UseFormReset<T>;
|
|
15
|
-
handleSubmit: import("react-hook-form").UseFormHandleSubmit<T>;
|
|
15
|
+
handleSubmit: import("react-hook-form").UseFormHandleSubmit<T, undefined>;
|
|
16
16
|
unregister: import("react-hook-form").UseFormUnregister<T>;
|
|
17
17
|
control: import("react-hook-form").Control<T, any>;
|
|
18
18
|
register: import("react-hook-form").UseFormRegister<T>;
|
package/12/useT.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TranslateNamespace, TranslateDefault, TranslateNamespaced } from "./types-i18n";
|
|
2
|
+
export declare function useT(): TranslateDefault;
|
|
3
|
+
export declare function useT<TNamespace extends TranslateNamespace>(namespace: TNamespace): TranslateNamespaced<TNamespace>;
|
|
4
|
+
export default useT;
|
package/{useT.js → 12/useT.js}
RENAMED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"use client";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.useT = void 0;
|
|
4
5
|
var tslib_1 = require("tslib");
|
|
5
6
|
var react_1 = require("react");
|
|
6
|
-
|
|
7
|
+
// import useTranslation from "next-translate/useTranslation";
|
|
8
|
+
var context_1 = tslib_1.__importDefault(require("next-translate/context"));
|
|
7
9
|
function useT(namespace) {
|
|
8
|
-
var t = (0,
|
|
10
|
+
var t = (0, react_1.useContext)(context_1.default).t;
|
|
11
|
+
// const t = useTranslation().t;
|
|
9
12
|
var tMemoized = (0, react_1.useMemo)(function () {
|
|
10
13
|
return function (s, q, o) {
|
|
11
14
|
return t(namespace ? "".concat(namespace, ":").concat(s) : "".concat(s), q === "obj" || q === "" ? null : q, q === "obj" || o === "obj"
|
|
12
15
|
? { returnObjects: true }
|
|
13
16
|
: q === "" || o === ""
|
|
14
17
|
? { fallback: "" }
|
|
15
|
-
: o
|
|
18
|
+
: o);
|
|
16
19
|
// ) as TReturn extends (undefined | never | unknown) ? TranslateReturn<TranslationQuery, TranslationOptions> : TReturn;
|
|
17
|
-
);
|
|
20
|
+
// );
|
|
18
21
|
};
|
|
19
22
|
}, [t, namespace]);
|
|
20
23
|
return tMemoized;
|
|
@@ -24,16 +27,18 @@ exports.default = useT;
|
|
|
24
27
|
// Instead of wrapping the `useTranslation` hook from [`next-translate`](https://github.com/vinissimus/next-translate/blob/master/src/useTranslation.tsx)
|
|
25
28
|
// we might just rewrite it with our custom implementation but the `_context`
|
|
26
29
|
// to use is not exposed by the library...
|
|
27
|
-
// import { useContext, useMemo } from "react"
|
|
28
|
-
// import wrapTWithDefaultNs from "next-translate
|
|
29
|
-
// import I18nContext from "next-translate/
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
// )
|
|
30
|
+
// import { useContext/* , useMemo */ } from "react"
|
|
31
|
+
// // import wrapTWithDefaultNs from "next-translate";
|
|
32
|
+
// import I18nContext from "next-translate/context";
|
|
33
|
+
// import type { Translate } from "./types-i18n";
|
|
34
|
+
// export default function useT(_defaultNS?: string) {
|
|
35
|
+
// const ctx = useContext(I18nContext);
|
|
36
|
+
// return ctx.t as Translate;
|
|
37
|
+
// // return useMemo(
|
|
38
|
+
// // () => ({
|
|
39
|
+
// // ...ctx,
|
|
40
|
+
// // t: wrapTWithDefaultNs(ctx.t, defaultNS),
|
|
41
|
+
// // }),
|
|
42
|
+
// // [ctx, defaultNS]
|
|
43
|
+
// // )
|
|
39
44
|
// }
|
package/12/useT.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useContext, useMemo } from "react";
|
|
3
|
+
// import useTranslation from "next-translate/useTranslation";
|
|
4
|
+
import I18nContext from "next-translate/context";
|
|
5
|
+
export function useT(namespace) {
|
|
6
|
+
var t = useContext(I18nContext).t;
|
|
7
|
+
// const t = useTranslation().t;
|
|
8
|
+
var tMemoized = useMemo(function () {
|
|
9
|
+
return function (s, q, o) {
|
|
10
|
+
return t(namespace ? "".concat(namespace, ":").concat(s) : "".concat(s), q === "obj" || q === "" ? null : q, q === "obj" || o === "obj"
|
|
11
|
+
? { returnObjects: true }
|
|
12
|
+
: q === "" || o === ""
|
|
13
|
+
? { fallback: "" }
|
|
14
|
+
: o);
|
|
15
|
+
// ) as TReturn extends (undefined | never | unknown) ? TranslateReturn<TranslationQuery, TranslationOptions> : TReturn;
|
|
16
|
+
// );
|
|
17
|
+
};
|
|
18
|
+
}, [t, namespace]);
|
|
19
|
+
return tMemoized;
|
|
20
|
+
}
|
|
21
|
+
export default useT;
|
package/{useTo.js → 12/useTo.js}
RENAMED
package/index.d.ts
CHANGED
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export * from "./DynamicNamespaces";
|
|
4
|
-
export * from "./Favicon";
|
|
5
|
-
export * from "./getSiteUrl";
|
|
6
|
-
export * from "./getT";
|
|
7
|
-
export * from "./Head";
|
|
8
|
-
export * from "./Link";
|
|
9
|
-
export * from "./load";
|
|
10
|
-
export * from "./NextProgress";
|
|
11
|
-
export * from "./revalidate";
|
|
12
|
-
export * from "./Seo";
|
|
13
|
-
export * from "./SeoDefaults";
|
|
14
|
-
export * from "./T";
|
|
15
|
-
export * from "./ThemeContext";
|
|
16
|
-
export * from "./ThemeProvider";
|
|
17
|
-
export * from "./to";
|
|
18
|
-
export * from "./translationAsOptions";
|
|
19
|
-
export * from "./TransText";
|
|
20
|
-
export * from "./types-i18n";
|
|
21
|
-
export * from "./types-seo";
|
|
22
|
-
export * from "./useBackUrl";
|
|
23
|
-
export * from "./useDateFormat";
|
|
24
|
-
export * from "./useForm";
|
|
25
|
-
export * from "./useLocale";
|
|
26
|
-
export * from "./useT";
|
|
27
|
-
export * from "./useTheme";
|
|
28
|
-
export * from "./useTo";
|
|
1
|
+
export { getSiteUrl } from "./getSiteUrl";
|
|
2
|
+
export { load } from "./load";
|
package/index.js
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
tslib_1.__exportStar(require("./Favicon"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./getSiteUrl"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./getT"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./Head"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./Link"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./load"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./NextProgress"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./revalidate"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./Seo"), exports);
|
|
17
|
-
// export * from "./seoBuildTags";
|
|
18
|
-
tslib_1.__exportStar(require("./SeoDefaults"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./T"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./ThemeContext"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./ThemeProvider"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("./to"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("./translationAsOptions"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("./TransText"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("./types-i18n"), exports);
|
|
26
|
-
tslib_1.__exportStar(require("./types-seo"), exports);
|
|
27
|
-
tslib_1.__exportStar(require("./useBackUrl"), exports);
|
|
28
|
-
tslib_1.__exportStar(require("./useDateFormat"), exports);
|
|
29
|
-
tslib_1.__exportStar(require("./useForm"), exports);
|
|
30
|
-
tslib_1.__exportStar(require("./useLocale"), exports);
|
|
31
|
-
tslib_1.__exportStar(require("./useT"), exports);
|
|
32
|
-
tslib_1.__exportStar(require("./useTheme"), exports);
|
|
33
|
-
tslib_1.__exportStar(require("./useTo"), exports);
|
|
3
|
+
exports.load = exports.getSiteUrl = void 0;
|
|
4
|
+
var getSiteUrl_1 = require("./getSiteUrl");
|
|
5
|
+
Object.defineProperty(exports, "getSiteUrl", { enumerable: true, get: function () { return getSiteUrl_1.getSiteUrl; } });
|
|
6
|
+
var load_1 = require("./load");
|
|
7
|
+
Object.defineProperty(exports, "load", { enumerable: true, get: function () { return load_1.load; } });
|
package/index.mjs
CHANGED
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export * from "./DisableErrorOverlay";
|
|
4
|
-
export * from "./DynamicNamespaces";
|
|
5
|
-
export * from "./Favicon";
|
|
6
|
-
export * from "./getSiteUrl";
|
|
7
|
-
export * from "./getT";
|
|
8
|
-
export * from "./Head";
|
|
9
|
-
export * from "./Link";
|
|
10
|
-
export * from "./load";
|
|
11
|
-
export * from "./NextProgress";
|
|
12
|
-
export * from "./revalidate";
|
|
13
|
-
export * from "./Seo";
|
|
14
|
-
// export * from "./seoBuildTags";
|
|
15
|
-
export * from "./SeoDefaults";
|
|
16
|
-
export * from "./T";
|
|
17
|
-
export * from "./ThemeContext";
|
|
18
|
-
export * from "./ThemeProvider";
|
|
19
|
-
export * from "./to";
|
|
20
|
-
export * from "./translationAsOptions";
|
|
21
|
-
export * from "./TransText";
|
|
22
|
-
export * from "./types-i18n";
|
|
23
|
-
export * from "./types-seo";
|
|
24
|
-
export * from "./useBackUrl";
|
|
25
|
-
export * from "./useDateFormat";
|
|
26
|
-
export * from "./useForm";
|
|
27
|
-
export * from "./useLocale";
|
|
28
|
-
export * from "./useT";
|
|
29
|
-
export * from "./useTheme";
|
|
30
|
-
export * from "./useTo";
|
|
1
|
+
export { getSiteUrl } from "./getSiteUrl";
|
|
2
|
+
export { load } from "./load";
|
package/package.json
CHANGED
|
@@ -67,44 +67,27 @@
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@
|
|
71
|
-
"@emotion/react": "^11.10.6",
|
|
72
|
-
"@emotion/server": "^11.10.0",
|
|
73
|
-
"@emotion/styled": "^11.10.6",
|
|
74
|
-
"@hookform/resolvers": "^2.9.11",
|
|
70
|
+
"@hookform/resolvers": "^3.1.0",
|
|
75
71
|
"@kuus/yup": "1.0.0-beta.7",
|
|
76
|
-
"@mui/base": "5.0.0-alpha.118",
|
|
77
|
-
"@mui/material": "^5.11.10",
|
|
78
|
-
"@mui/utils": "5.11.9",
|
|
79
|
-
"@tiptap/react": "2.0.0-beta.218",
|
|
80
|
-
"@tiptap/starter-kit": "2.0.0-beta.218",
|
|
81
72
|
"clsx": "1.2.1",
|
|
82
|
-
"date-fns": "^2.
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"next": "^
|
|
86
|
-
"next-
|
|
87
|
-
"next-
|
|
88
|
-
"next-translate": "^2.0.2",
|
|
73
|
+
"date-fns": "^2.30.0",
|
|
74
|
+
"framer-motion": "^10.12.16",
|
|
75
|
+
"next": "^13.4.4",
|
|
76
|
+
"next-auth": "^4.22.1",
|
|
77
|
+
"next-seo": "^6.0.0",
|
|
78
|
+
"next-translate": "^2.0.6",
|
|
89
79
|
"react": "^18.2.0",
|
|
90
|
-
"react-
|
|
91
|
-
"
|
|
92
|
-
"react-icons": "^4.7.1",
|
|
93
|
-
"react-is": "^18.2.0",
|
|
94
|
-
"react-swipeable": "^7.0.0",
|
|
95
|
-
"styled-components": "^5.3.6",
|
|
80
|
+
"react-hook-form": "^7.44.3",
|
|
81
|
+
"styled-components": "^5.3.11",
|
|
96
82
|
"ts-debounce": "^4.0.0",
|
|
97
|
-
"
|
|
98
|
-
"type-fest": "^3.6.0"
|
|
83
|
+
"type-fest": "^3.11.1"
|
|
99
84
|
},
|
|
100
85
|
"peerDependencies": {
|
|
101
|
-
"@koine/
|
|
102
|
-
"
|
|
103
|
-
"@koine/react": "1.2.3",
|
|
104
|
-
"@koine/utils": "1.2.3"
|
|
86
|
+
"@koine/utils": "2.0.0-alpha.1",
|
|
87
|
+
"tslib": "2.5.3"
|
|
105
88
|
},
|
|
106
89
|
"main": "./index.js",
|
|
107
90
|
"types": "./index.d.ts",
|
|
108
|
-
"version": "
|
|
91
|
+
"version": "2.0.0-alpha.2",
|
|
109
92
|
"module": "./index.mjs"
|
|
110
93
|
}
|
package/typings.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Next utility types
|
|
3
|
-
*/
|
|
4
|
-
declare type PageServer<P> = import("next").InferGetServerSidePropsType<P>;
|
|
5
|
-
declare type PageStatic<P> = import("next").InferGetStaticPropsType<P>;
|
|
6
|
-
declare type DataServer<P, Q, T> = import("next").GetServerSideProps<P, Q, T>;
|
|
7
|
-
declare type DataStatic<P, T> = import("next").GetStaticProps<P, T>;
|
|
8
|
-
declare type DataStaticPaths<P> = import("next").GetStaticPaths<P>;
|
|
9
|
-
declare type DataStaticPathsResult<P> = import("next").GetStaticPathsResult<P>;
|
|
10
|
-
|
|
11
1
|
/**
|
|
12
2
|
* Nx types
|
|
13
3
|
*
|
|
@@ -20,80 +10,3 @@ declare module "*.svg" {
|
|
|
20
10
|
>;
|
|
21
11
|
export default content;
|
|
22
12
|
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Extend NodeJS `process.env` with variables used by @koine
|
|
26
|
-
*/
|
|
27
|
-
declare namespace NodeJS {
|
|
28
|
-
interface ProcessEnv {
|
|
29
|
-
NEXT_PUBLIC_APP_URL: string;
|
|
30
|
-
AUTH_ROUTE_LOGIN: string;
|
|
31
|
-
AUTH_ROUTE_PROFILE: string;
|
|
32
|
-
AUTH_ROUTE_REGISTER: string;
|
|
33
|
-
AUTH_ROUTES_SECURED: string;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Types specifically related to `@koine/next` exposed on the global unique
|
|
39
|
-
* namespace `Koine`. Most of the types here should be prefixed by `Next`, e.g.
|
|
40
|
-
* `NextSomeFeature` accessible anywhere from `Koine.NextSomeFeature`
|
|
41
|
-
*/
|
|
42
|
-
declare namespace Koine {
|
|
43
|
-
/**
|
|
44
|
-
* Default SEO data structure expected by the `<Seo>` component's prop `seo`
|
|
45
|
-
*/
|
|
46
|
-
type NextSeo = import("./Seo").SeoData;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Next auth routes configurable map
|
|
50
|
-
*
|
|
51
|
-
* @see next/auth `pages` mapping: https://next-auth.js.org/configuration/pages`
|
|
52
|
-
*/
|
|
53
|
-
type NextAuthRoutesMap = {
|
|
54
|
-
login: string;
|
|
55
|
-
profile: string;
|
|
56
|
-
register: string;
|
|
57
|
-
/** Array of regexes to match pathnames of protected routes */
|
|
58
|
-
secured: RegExp[];
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Translations dictionary extracted from JSON files.
|
|
63
|
-
* You need to augment this type with something like:
|
|
64
|
-
*
|
|
65
|
-
* ```ts
|
|
66
|
-
* declare namespace Koine {
|
|
67
|
-
* interface Translations {
|
|
68
|
-
* "~": typeof import("./locales/en/~.json");
|
|
69
|
-
* "_": typeof import("./locales/en/_.json");
|
|
70
|
-
* "$team": typeof import("./locales/en/$team.json");
|
|
71
|
-
* "home": typeof import("./locales/en/home.json");
|
|
72
|
-
* "Header": typeof import("./locales/en/Header.json");
|
|
73
|
-
* }
|
|
74
|
-
* }
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* Best to follow a convention to name the files which become the namespaces:
|
|
78
|
-
*
|
|
79
|
-
* - `~`: for app wide **urls** translated definitions
|
|
80
|
-
* - `_`: for app wide **common** translations
|
|
81
|
-
* - `${data}`: dollar prefix for static **data** like arrays, objects, .etc
|
|
82
|
-
* - `{route-name}`: lower cased for **route** specific data
|
|
83
|
-
* - `{ComponentName}`: pascal cased for **components** specific data
|
|
84
|
-
*
|
|
85
|
-
* This works through using [type augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)
|
|
86
|
-
* and [merging interfaces](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces).
|
|
87
|
-
*/
|
|
88
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
89
|
-
interface Translations {}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* List here the global variables used by third party scripts supported within
|
|
94
|
-
* the `koine` ecosystem. For instance Google Analytics globally available
|
|
95
|
-
* variables.
|
|
96
|
-
*/
|
|
97
|
-
declare interface Window {
|
|
98
|
-
gtag: (...args: Record<string, unknown>[]) => Record<string, unknown>;
|
|
99
|
-
}
|
package/Head.d.ts
DELETED
package/Head.js
DELETED
package/Head.mjs
DELETED
package/app/AppHead.d.ts
DELETED
package/app/css/auth/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppProps } from "next/app";
|
|
2
|
-
import { AppThemeProps } from "../AppTheme";
|
|
3
|
-
import { AppMainProps } from "../AppMain";
|
|
4
|
-
export type NextAppProps = AppProps<{
|
|
5
|
-
session: any;
|
|
6
|
-
}> & AppThemeProps & AppMainProps;
|
|
7
|
-
/**
|
|
8
|
-
* App with authentication provided by `next-auth`
|
|
9
|
-
*/
|
|
10
|
-
export declare const NextApp: (props: NextAppProps) => JSX.Element;
|
|
11
|
-
export default NextApp;
|
package/app/em/AppMain.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppMain = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var react_1 = require("react");
|
|
6
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
var router_1 = require("next/router");
|
|
8
|
-
var framer_motion_1 = require("framer-motion");
|
|
9
|
-
var MotionProvider_1 = tslib_1.__importDefault(require("@koine/react/m/MotionProvider"));
|
|
10
|
-
var SeoDefaults_1 = require("../../SeoDefaults");
|
|
11
|
-
var NextProgress_1 = require("../../NextProgress");
|
|
12
|
-
/**
|
|
13
|
-
* App main
|
|
14
|
-
*
|
|
15
|
-
* It implies a setup for `styled-components` and `framer-motion` libraries.
|
|
16
|
-
*
|
|
17
|
-
* About the page transition [wallis' blog post](https://wallis.dev/blog/nextjs-page-transitions-with-framer-motion)
|
|
18
|
-
*/
|
|
19
|
-
var AppMain = function (_a) {
|
|
20
|
-
var Component = _a.Component, pageProps = _a.pageProps, Layout = _a.Layout, ProgressOverlay = _a.ProgressOverlay, seo = _a.seo, motion = _a.motion, _b = _a.transition, transition = _b === void 0 ? {
|
|
21
|
-
initial: { opacity: 0 },
|
|
22
|
-
animate: { opacity: 1 },
|
|
23
|
-
exit: { opacity: 0 },
|
|
24
|
-
} : _b, pre = _a.pre, post = _a.post;
|
|
25
|
-
var pathname = (0, router_1.useRouter)().pathname;
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SeoDefaults_1.SeoDefaults, tslib_1.__assign({}, seo)), pre, (0, jsx_runtime_1.jsxs)(MotionProvider_1.default, tslib_1.__assign({ features: motion }, { children: [ProgressOverlay && (0, jsx_runtime_1.jsx)(NextProgress_1.NextProgress, { Overlay: ProgressOverlay }), (0, jsx_runtime_1.jsx)(Layout, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, tslib_1.__assign({ exitBeforeEnter: true, initial: false }, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.m.div, tslib_1.__assign({}, transition, { children: (0, react_1.createElement)(Component, tslib_1.__assign({}, pageProps, { key: pathname })) }), pathname) })) })] })), post] }));
|
|
27
|
-
};
|
|
28
|
-
exports.AppMain = AppMain;
|
|
29
|
-
exports.default = exports.AppMain;
|