@koine/next 2.0.0-alpha.1 → 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} +1 -1
- package/{legacy → 12}/AnalyticsGoogle.mjs +1 -2
- package/{legacy → 12}/DisableErrorOverlay.d.ts +1 -1
- package/{Favicon.d.ts → 12/Favicon.d.ts} +1 -1
- package/{legacy → 12}/Link.js +1 -1
- package/{legacy → 12}/Link.mjs +1 -1
- package/{NextProgress.d.ts → 12/NextProgress.d.ts} +1 -1
- package/{legacy → 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/{legacy → 12}/ThemeProvider.d.ts +1 -1
- package/{ThemeProvider.js → 12/ThemeProvider.js} +2 -14
- package/{ThemeProvider.mjs → 12/ThemeProvider.mjs} +3 -15
- package/12/app/AppHead.d.ts +3 -0
- package/{legacy → 12}/app/css/AppMain.d.ts +1 -1
- package/{legacy → 12}/app/css/AppTheme.d.ts +1 -1
- package/{app → 12/app}/css/AppTheme.js +1 -2
- package/{app → 12/app}/css/AppTheme.mjs +1 -2
- package/{legacy/app/sc → 12/app/css}/auth/index.d.ts +1 -1
- 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/{legacy → 12}/app/sc/AppMain.d.ts +1 -1
- package/{legacy → 12}/app/sc/AppMain.js +1 -1
- package/{app → 12/app}/sc/AppMain.mjs +1 -1
- package/{legacy → 12}/app/sc/AppTheme.d.ts +1 -1
- package/{app → 12/app}/sc/AppTheme.js +1 -2
- package/{app → 12/app}/sc/AppTheme.mjs +1 -2
- package/{legacy/app/css → 12/app/sc}/auth/index.d.ts +1 -1
- package/{app/em → 12/app/sc}/auth/index.js +1 -1
- package/{legacy/app/css → 12/app/sc}/auth/index.mjs +1 -1
- package/{legacy → 12}/app/sc/index.d.ts +1 -1
- package/{document → 12/document}/Document.d.ts +1 -2
- package/{legacy → 12}/document/Document.js +1 -1
- package/{legacy → 12}/document/Document.mjs +2 -2
- package/{legacy → 12}/document/css/index.d.ts +1 -2
- package/{document → 12/document}/css/index.js +1 -1
- package/{legacy → 12}/document/css/index.mjs +2 -2
- package/{legacy → 12}/document/sc/index.d.ts +1 -2
- package/{legacy → 12}/document/sc/index.js +1 -1
- package/{legacy → 12}/document/sc/index.mjs +1 -1
- package/{legacy → 12}/types-i18n.d.ts +1 -1
- package/{legacy → 12}/useForm.d.ts +1 -1
- package/12/useT.d.ts +4 -0
- package/{useT.js → 12/useT.js} +20 -16
- package/{legacy → 12}/useT.mjs +7 -5
- package/package.json +13 -24
- package/AnalyticsGoogle.mjs +0 -35
- package/DisableErrorOverlay.d.ts +0 -7
- package/Head.d.ts +0 -3
- package/Head.js +0 -7
- package/Head.mjs +0 -3
- package/Link.js +0 -15
- package/Link.mjs +0 -12
- package/Seo.d.ts +0 -41
- package/ThemeProvider.d.ts +0 -35
- package/app/AppHead.d.ts +0 -3
- package/app/css/AppMain.d.ts +0 -9
- package/app/css/AppTheme.d.ts +0 -11
- package/app/css/auth/index.d.ts +0 -11
- package/app/em/AppMain.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/auth/index.mjs +0 -13
- 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/AppMain.js +0 -29
- package/app/sc/AppTheme.d.ts +0 -14
- 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/app/sc/index.d.ts +0 -56
- 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 -17
- package/auth/useLoginUrl.mjs +0 -13
- package/auth/useLogout.d.ts +0 -7
- package/auth/useLogout.js +0 -59
- package/auth/useLogout.mjs +0 -54
- package/createEmotionCache.d.ts +0 -6
- package/createEmotionCache.js +0 -14
- package/createEmotionCache.mjs +0 -9
- package/document/Document.js +0 -31
- package/document/Document.mjs +0 -28
- package/document/css/index.d.ts +0 -18
- package/document/css/index.mjs +0 -45
- 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/index.d.ts +0 -20
- package/document/sc/index.js +0 -67
- package/document/sc/index.mjs +0 -64
- package/document/sc/package.json +0 -6
- package/legacy/AnalyticsGoogle.d.ts +0 -6
- package/legacy/AnalyticsGoogle.js +0 -39
- package/legacy/DisableErrorOverlay.js +0 -18
- package/legacy/DisableErrorOverlay.mjs +0 -13
- package/legacy/DynamicNamespaces.d.ts +0 -13
- package/legacy/DynamicNamespaces.js +0 -13
- package/legacy/DynamicNamespaces.mjs +0 -9
- package/legacy/Favicon.d.ts +0 -4
- package/legacy/Favicon.js +0 -10
- package/legacy/Favicon.mjs +0 -6
- package/legacy/Link.d.ts +0 -10
- package/legacy/NextProgress.d.ts +0 -25
- package/legacy/NextProgress.js +0 -46
- package/legacy/NextProgress.mjs +0 -42
- package/legacy/Seo.js +0 -34
- package/legacy/Seo.mjs +0 -29
- package/legacy/SeoDefaults.d.ts +0 -11
- package/legacy/SeoDefaults.js +0 -17
- package/legacy/SeoDefaults.mjs +0 -12
- package/legacy/T.d.ts +0 -15
- package/legacy/T.js +0 -17
- package/legacy/T.mjs +0 -13
- package/legacy/ThemeContext.d.ts +0 -17
- package/legacy/ThemeContext.js +0 -10
- package/legacy/ThemeContext.mjs +0 -7
- package/legacy/ThemeProvider.js +0 -251
- package/legacy/ThemeProvider.mjs +0 -247
- package/legacy/TransText.d.ts +0 -3
- package/legacy/TransText.js +0 -8
- package/legacy/TransText.mjs +0 -4
- package/legacy/app/AppHead.d.ts +0 -3
- package/legacy/app/AppHead.js +0 -11
- package/legacy/app/AppHead.mjs +0 -6
- package/legacy/app/AppMain.d.ts +0 -35
- package/legacy/app/AppMain.js +0 -2
- package/legacy/app/AppMain.mjs +0 -1
- package/legacy/app/css/AppMain.js +0 -18
- package/legacy/app/css/AppMain.mjs +0 -14
- package/legacy/app/css/AppTheme.js +0 -19
- package/legacy/app/css/AppTheme.mjs +0 -15
- package/legacy/app/css/auth/index.js +0 -17
- package/legacy/app/css/auth/package.json +0 -6
- package/legacy/app/css/index.d.ts +0 -54
- package/legacy/app/css/index.js +0 -61
- package/legacy/app/css/index.mjs +0 -57
- package/legacy/app/css/package.json +0 -6
- package/legacy/app/index.d.ts +0 -2
- package/legacy/app/index.js +0 -5
- package/legacy/app/index.mjs +0 -2
- package/legacy/app/package.json +0 -6
- package/legacy/app/sc/AppMain.mjs +0 -25
- package/legacy/app/sc/AppTheme.js +0 -16
- package/legacy/app/sc/AppTheme.mjs +0 -12
- package/legacy/app/sc/auth/index.js +0 -17
- package/legacy/app/sc/auth/index.mjs +0 -13
- package/legacy/app/sc/auth/package.json +0 -6
- package/legacy/app/sc/index.js +0 -63
- package/legacy/app/sc/index.mjs +0 -59
- package/legacy/app/sc/package.json +0 -6
- package/legacy/document/Document.d.ts +0 -16
- package/legacy/document/css/index.js +0 -45
- package/legacy/document/css/package.json +0 -6
- package/legacy/document/index.d.ts +0 -2
- package/legacy/document/index.js +0 -7
- package/legacy/document/index.mjs +0 -2
- package/legacy/document/package.json +0 -6
- package/legacy/document/sc/package.json +0 -6
- package/legacy/getT.d.ts +0 -9
- package/legacy/getT.js +0 -14
- package/legacy/getT.mjs +0 -10
- package/legacy/package.json +0 -6
- package/legacy/useT.d.ts +0 -17
- package/legacy/useT.js +0 -40
- package/revalidate.d.ts +0 -5
- package/revalidate.js +0 -8
- package/revalidate.mjs +0 -5
- package/seoBuildTags.d.ts +0 -23
- package/seoBuildTags.js +0 -121
- package/seoBuildTags.mjs +0 -117
- package/to.d.ts +0 -24
- package/to.js +0 -29
- package/to.mjs +0 -25
- package/translationAsOptions.d.ts +0 -3
- package/translationAsOptions.js +0 -13
- package/translationAsOptions.mjs +0 -9
- package/types-i18n.d.ts +0 -118
- package/types-i18n.js +0 -14
- package/types-i18n.mjs +0 -13
- package/types-seo.d.ts +0 -7
- package/types-seo.js +0 -2
- package/types-seo.mjs +0 -1
- package/useBackUrl.d.ts +0 -2
- package/useBackUrl.js +0 -33
- package/useBackUrl.mjs +0 -28
- package/useDateFormat.d.ts +0 -7
- package/useDateFormat.js +0 -43
- package/useDateFormat.mjs +0 -39
- package/useForm.d.ts +0 -27
- package/useForm.js +0 -39
- package/useForm.mjs +0 -35
- package/useLocale.d.ts +0 -2
- package/useLocale.js +0 -11
- package/useLocale.mjs +0 -6
- package/useT.d.ts +0 -17
- package/useT.mjs +0 -19
- package/useTheme.d.ts +0 -7
- package/useTheme.js +0 -12
- package/useTheme.mjs +0 -8
- package/useTo.d.ts +0 -3
- package/useTo.js +0 -19
- package/useTo.mjs +0 -15
- /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/{DynamicNamespaces.js → 12/DynamicNamespaces.js} +0 -0
- /package/{DynamicNamespaces.mjs → 12/DynamicNamespaces.mjs} +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/{NextProgress.js → 12/NextProgress.js} +0 -0
- /package/{NextProgress.mjs → 12/NextProgress.mjs} +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/{T.js → 12/T.js} +0 -0
- /package/{T.mjs → 12/T.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/{TransText.js → 12/TransText.js} +0 -0
- /package/{TransText.mjs → 12/TransText.mjs} +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/{getT.js → 12/getT.js} +0 -0
- /package/{getT.mjs → 12/getT.mjs} +0 -0
- /package/{legacy → 12}/index.d.ts +0 -0
- /package/{legacy → 12}/index.js +0 -0
- /package/{legacy → 12}/index.mjs +0 -0
- /package/{document/css → 12}/package.json +0 -0
- /package/{legacy → 12}/seoBuildTags.d.ts +0 -0
- /package/{legacy → 12}/seoBuildTags.js +0 -0
- /package/{legacy → 12}/seoBuildTags.mjs +0 -0
- /package/{legacy → 12}/to.d.ts +0 -0
- /package/{legacy → 12}/to.js +0 -0
- /package/{legacy → 12}/to.mjs +0 -0
- /package/{legacy → 12}/translationAsOptions.d.ts +0 -0
- /package/{legacy → 12}/translationAsOptions.js +0 -0
- /package/{legacy → 12}/translationAsOptions.mjs +0 -0
- /package/{legacy → 12}/types-i18n.js +0 -0
- /package/{legacy → 12}/types-i18n.mjs +0 -0
- /package/{legacy → 12}/types-seo.d.ts +0 -0
- /package/{legacy → 12}/types-seo.js +0 -0
- /package/{legacy → 12}/types-seo.mjs +0 -0
- /package/{legacy → 12}/useBackUrl.d.ts +0 -0
- /package/{legacy → 12}/useBackUrl.js +0 -0
- /package/{legacy → 12}/useBackUrl.mjs +0 -0
- /package/{legacy → 12}/useDateFormat.d.ts +0 -0
- /package/{legacy → 12}/useDateFormat.js +0 -0
- /package/{legacy → 12}/useDateFormat.mjs +0 -0
- /package/{legacy → 12}/useForm.js +0 -0
- /package/{legacy → 12}/useForm.mjs +0 -0
- /package/{legacy → 12}/useLocale.d.ts +0 -0
- /package/{legacy → 12}/useLocale.js +0 -0
- /package/{legacy → 12}/useLocale.mjs +0 -0
- /package/{legacy → 12}/useTheme.d.ts +0 -0
- /package/{legacy → 12}/useTheme.js +0 -0
- /package/{legacy → 12}/useTheme.mjs +0 -0
- /package/{legacy → 12}/useTo.d.ts +0 -0
- /package/{legacy → 12}/useTo.js +0 -0
- /package/{legacy → 12}/useTo.mjs +0 -0
|
@@ -2,5 +2,5 @@ export type AnalyticsGoogleProps = {
|
|
|
2
2
|
/** Falls back to `.env` variable `NEXT_PUBLIC_GTM_ID` */
|
|
3
3
|
id?: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const AnalyticsGoogle: ({ id }: AnalyticsGoogleProps) => JSX.Element | null;
|
|
5
|
+
export declare const AnalyticsGoogle: ({ id }: AnalyticsGoogleProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
6
|
export default AnalyticsGoogle;
|
|
@@ -33,7 +33,7 @@ var AnalyticsGoogle = function (_a) {
|
|
|
33
33
|
if (!uid) {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(script_1.default, { id: "google-tagmanager", src: "https://www.googletagmanager.com/gtag/js?id=".concat(id), strategy: "afterInteractive", onLoad: function () { return setReady(true); } }), (0, jsx_runtime_1.jsx)(script_1.default,
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(script_1.default, { id: "google-tagmanager", src: "https://www.googletagmanager.com/gtag/js?id=".concat(id), strategy: "afterInteractive", onLoad: function () { return setReady(true); } }), (0, jsx_runtime_1.jsx)(script_1.default, { id: "google-analytics", strategy: "afterInteractive", children: "\n window.dataLayer = window.dataLayer || [];\n function gtag(){window.dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', '".concat(id, "', { 'send_page_view': false });\n ") })] }));
|
|
37
37
|
};
|
|
38
38
|
exports.AnalyticsGoogle = AnalyticsGoogle;
|
|
39
39
|
exports.default = exports.AnalyticsGoogle;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { __assign } from "tslib";
|
|
3
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { useState, useEffect } from "react";
|
|
5
4
|
import { useRouter } from "next/router";
|
|
@@ -30,6 +29,6 @@ export var AnalyticsGoogle = function (_a) {
|
|
|
30
29
|
if (!uid) {
|
|
31
30
|
return null;
|
|
32
31
|
}
|
|
33
|
-
return (_jsxs(_Fragment, { children: [_jsx(Script, { id: "google-tagmanager", src: "https://www.googletagmanager.com/gtag/js?id=".concat(id), strategy: "afterInteractive", onLoad: function () { return setReady(true); } }), _jsx(Script,
|
|
32
|
+
return (_jsxs(_Fragment, { children: [_jsx(Script, { id: "google-tagmanager", src: "https://www.googletagmanager.com/gtag/js?id=".concat(id), strategy: "afterInteractive", onLoad: function () { return setReady(true); } }), _jsx(Script, { id: "google-analytics", strategy: "afterInteractive", children: "\n window.dataLayer = window.dataLayer || [];\n function gtag(){window.dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', '".concat(id, "', { 'send_page_view': false });\n ") })] }));
|
|
34
33
|
};
|
|
35
34
|
export default AnalyticsGoogle;
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://github.com/vercel/next.js/discussions/13387#discussioncomment-101564
|
|
5
5
|
*/
|
|
6
|
-
export declare const DisableErrorOverlay: () => JSX.Element;
|
|
6
|
+
export declare const DisableErrorOverlay: () => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default DisableErrorOverlay;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FaviconTagsProps } from "@koine/react/FaviconTags";
|
|
2
2
|
export type FaviconProps = FaviconTagsProps;
|
|
3
|
-
export declare const Favicon: (props: FaviconTagsProps) => JSX.Element;
|
|
3
|
+
export declare const Favicon: (props: FaviconTagsProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default Favicon;
|
package/{legacy → 12}/Link.js
RENAMED
|
@@ -10,6 +10,6 @@ var link_1 = tslib_1.__importDefault(require("next/link"));
|
|
|
10
10
|
*/
|
|
11
11
|
exports.Link = (0, react_1.forwardRef)(function Link(_a, ref) {
|
|
12
12
|
var href = _a.href, prefetch = _a.prefetch, replace = _a.replace, scroll = _a.scroll, shallow = _a.shallow, locale = _a.locale, _b = _a.Link, Link = _b === void 0 ? "span" : _b, props = tslib_1.__rest(_a, ["href", "prefetch", "replace", "scroll", "shallow", "locale", "Link"]);
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(link_1.default,
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(link_1.default, { href: href, replace: replace, scroll: scroll, shallow: shallow, locale: locale, passHref: true, children: (0, jsx_runtime_1.jsx)(Link, tslib_1.__assign({ ref: ref }, props)) }));
|
|
14
14
|
});
|
|
15
15
|
exports.default = exports.Link;
|
package/{legacy → 12}/Link.mjs
RENAMED
|
@@ -7,6 +7,6 @@ import NextLink from "next/link";
|
|
|
7
7
|
*/
|
|
8
8
|
export var Link = forwardRef(function Link(_a, ref) {
|
|
9
9
|
var href = _a.href, prefetch = _a.prefetch, replace = _a.replace, scroll = _a.scroll, shallow = _a.shallow, locale = _a.locale, _b = _a.Link, Link = _b === void 0 ? "span" : _b, props = __rest(_a, ["href", "prefetch", "replace", "scroll", "shallow", "locale", "Link"]);
|
|
10
|
-
return (_jsx(NextLink,
|
|
10
|
+
return (_jsx(NextLink, { href: href, replace: replace, scroll: scroll, shallow: shallow, locale: locale, passHref: true, children: _jsx(Link, __assign({ ref: ref }, props)) }));
|
|
11
11
|
});
|
|
12
12
|
export default Link;
|
|
@@ -21,5 +21,5 @@ export type ComponentsProps = {
|
|
|
21
21
|
};
|
|
22
22
|
type Props = Simplify<WithComponents<OwnProps, Components>>;
|
|
23
23
|
export type NextProgressProps = Props;
|
|
24
|
-
export declare const NextProgress: ({ startAt, showOnShallow, stopDelayMs, Overlay, }: NextProgressProps) => JSX.Element;
|
|
24
|
+
export declare const NextProgress: ({ startAt, showOnShallow, stopDelayMs, Overlay, }: NextProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
export default NextProgress;
|
package/{legacy → 12}/Seo.d.ts
RENAMED
|
@@ -37,5 +37,5 @@ export type SeoProps = Omit<NextSeoProps, "additionalMetaTags" | "additionalLink
|
|
|
37
37
|
* <Seo title="MyApp | Some description" titleTemplate="%s" />
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
export declare const Seo: (props: SeoProps) => JSX.Element;
|
|
40
|
+
export declare const Seo: (props: SeoProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
export default Seo;
|
|
@@ -7,5 +7,5 @@ export type SeoDefaultsProps = Omit<DefaultSeoProps, "additionalMetaTags" | "add
|
|
|
7
7
|
metaTags?: ReadonlyArray<MetaTag>;
|
|
8
8
|
linkTags?: ReadonlyArray<LinkTag>;
|
|
9
9
|
};
|
|
10
|
-
export declare const SeoDefaults: (props: SeoDefaultsProps) => JSX.Element;
|
|
10
|
+
export declare const SeoDefaults: (props: SeoDefaultsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default SeoDefaults;
|
package/{T.d.ts → 12/T.d.ts}
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { TransProps } from "next-translate";
|
|
2
3
|
import type { TranslateNamespace, TranslationsPaths, TranslationsAllPaths } from "./types-i18n";
|
|
3
4
|
export type TProps<TNamespace extends TranslateNamespace | undefined = undefined> = (Omit<TransProps, "i18nKey" | "ns"> & {
|
|
@@ -31,5 +31,5 @@ export type ThemeProviderProps = React.PropsWithChildren<{
|
|
|
31
31
|
* nicely with tailwind `dark` class mode as dark theme is supposed to be only
|
|
32
32
|
* controlled by tailwind modifiers
|
|
33
33
|
*/
|
|
34
|
-
export declare const ThemeProvider: ({ forcedTheme, disableTransitionOnChange, enableSystem, enableColorScheme, themes, defaultTheme, attribute, value, children, nonce, }: ThemeProviderProps) => JSX.Element;
|
|
34
|
+
export declare const ThemeProvider: ({ forcedTheme, disableTransitionOnChange, enableSystem, enableColorScheme, themes, defaultTheme, attribute, value, children, nonce, }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
export default ThemeProvider;
|
|
@@ -115,26 +115,14 @@ var ThemeProvider = function (_a) {
|
|
|
115
115
|
(0, react_1.useEffect)(function () {
|
|
116
116
|
applyTheme(forcedTheme !== null && forcedTheme !== void 0 ? forcedTheme : theme);
|
|
117
117
|
}, [applyTheme, forcedTheme, theme]);
|
|
118
|
-
return ((0, jsx_runtime_1.jsxs)(ThemeContext_1.ThemeContext.Provider,
|
|
118
|
+
return ((0, jsx_runtime_1.jsxs)(ThemeContext_1.ThemeContext.Provider, { value: {
|
|
119
119
|
theme: theme,
|
|
120
120
|
setTheme: setTheme,
|
|
121
121
|
forcedTheme: forcedTheme,
|
|
122
122
|
resolvedTheme: theme === "system" ? resolvedTheme : theme,
|
|
123
123
|
themes: enableSystem ? tslib_1.__spreadArray(tslib_1.__spreadArray([], themes, true), ["system"], false) : themes,
|
|
124
124
|
systemTheme: (enableSystem ? resolvedTheme : undefined),
|
|
125
|
-
}
|
|
126
|
-
forcedTheme: forcedTheme,
|
|
127
|
-
disableTransitionOnChange: disableTransitionOnChange,
|
|
128
|
-
enableSystem: enableSystem,
|
|
129
|
-
enableColorScheme: enableColorScheme,
|
|
130
|
-
themes: themes,
|
|
131
|
-
defaultTheme: defaultTheme,
|
|
132
|
-
attribute: attribute,
|
|
133
|
-
value: value,
|
|
134
|
-
children: children,
|
|
135
|
-
attrs: attrs,
|
|
136
|
-
nonce: nonce,
|
|
137
|
-
})), children] })));
|
|
125
|
+
}, children: [(0, jsx_runtime_1.jsx)(ThemeScript, { forcedTheme: forcedTheme, disableTransitionOnChange: disableTransitionOnChange, enableSystem: enableSystem, enableColorScheme: enableColorScheme, themes: themes, defaultTheme: defaultTheme, attribute: attribute, value: value, children: children, attrs: attrs, nonce: nonce }), children] }));
|
|
138
126
|
};
|
|
139
127
|
exports.ThemeProvider = ThemeProvider;
|
|
140
128
|
var ThemeScript = (0, react_1.memo)(function (_a) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { __spreadArray } from "tslib";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { useCallback, useEffect, useState, memo } from "react";
|
|
5
5
|
import NextScript from "next/script";
|
|
@@ -112,26 +112,14 @@ export var ThemeProvider = function (_a) {
|
|
|
112
112
|
useEffect(function () {
|
|
113
113
|
applyTheme(forcedTheme !== null && forcedTheme !== void 0 ? forcedTheme : theme);
|
|
114
114
|
}, [applyTheme, forcedTheme, theme]);
|
|
115
|
-
return (_jsxs(ThemeContext.Provider,
|
|
115
|
+
return (_jsxs(ThemeContext.Provider, { value: {
|
|
116
116
|
theme: theme,
|
|
117
117
|
setTheme: setTheme,
|
|
118
118
|
forcedTheme: forcedTheme,
|
|
119
119
|
resolvedTheme: theme === "system" ? resolvedTheme : theme,
|
|
120
120
|
themes: enableSystem ? __spreadArray(__spreadArray([], themes, true), ["system"], false) : themes,
|
|
121
121
|
systemTheme: (enableSystem ? resolvedTheme : undefined),
|
|
122
|
-
}
|
|
123
|
-
forcedTheme: forcedTheme,
|
|
124
|
-
disableTransitionOnChange: disableTransitionOnChange,
|
|
125
|
-
enableSystem: enableSystem,
|
|
126
|
-
enableColorScheme: enableColorScheme,
|
|
127
|
-
themes: themes,
|
|
128
|
-
defaultTheme: defaultTheme,
|
|
129
|
-
attribute: attribute,
|
|
130
|
-
value: value,
|
|
131
|
-
children: children,
|
|
132
|
-
attrs: attrs,
|
|
133
|
-
nonce: nonce,
|
|
134
|
-
})), children] })));
|
|
122
|
+
}, children: [_jsx(ThemeScript, { forcedTheme: forcedTheme, disableTransitionOnChange: disableTransitionOnChange, enableSystem: enableSystem, enableColorScheme: enableColorScheme, themes: themes, defaultTheme: defaultTheme, attribute: attribute, value: value, children: children, attrs: attrs, nonce: nonce }), children] }));
|
|
135
123
|
};
|
|
136
124
|
var ThemeScript = memo(function (_a) {
|
|
137
125
|
var forcedTheme = _a.forcedTheme, attribute = _a.attribute, enableSystem = _a.enableSystem, enableColorScheme = _a.enableColorScheme, defaultTheme = _a.defaultTheme, value = _a.value, attrs = _a.attrs, nonce = _a.nonce;
|
|
@@ -5,5 +5,5 @@ export type AppMainProps = Omit<AppMainBaseProps, "ProgressOverlay">;
|
|
|
5
5
|
*
|
|
6
6
|
* It does not imply any specific styling or animation solution
|
|
7
7
|
*/
|
|
8
|
-
export declare const AppMain: ({ Component, pageProps, Layout, seo, pre, post, }: AppMainProps) => JSX.Element;
|
|
8
|
+
export declare const AppMain: ({ Component, pageProps, Layout, seo, pre, post, }: AppMainProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default AppMain;
|
|
@@ -7,5 +7,5 @@ export type AppThemeProps = React.PropsWithChildren<NextAppProps & {
|
|
|
7
7
|
/**
|
|
8
8
|
* App theme with vanilla class based theme (good for `tailwindcss`)
|
|
9
9
|
*/
|
|
10
|
-
export declare const AppTheme: ({ theme, children }: AppThemeProps) => JSX.Element;
|
|
10
|
+
export declare const AppTheme: ({ theme, children }: AppThemeProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default AppTheme;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AppTheme = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
5
|
// import { ThemeVanillaProvider, ThemeVanillaValue } from "@koine/react/styles";
|
|
7
6
|
var ThemeProvider_1 = require("../../ThemeProvider");
|
|
@@ -13,7 +12,7 @@ var AppTheme = function (_a) {
|
|
|
13
12
|
// return (
|
|
14
13
|
// <ThemeVanillaProvider initialTheme={theme}>{children}</ThemeVanillaProvider>
|
|
15
14
|
// );
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(ThemeProvider_1.ThemeProvider,
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(ThemeProvider_1.ThemeProvider, { defaultTheme: theme, attribute: "class", children: children }));
|
|
17
16
|
};
|
|
18
17
|
exports.AppTheme = AppTheme;
|
|
19
18
|
exports.default = exports.AppTheme;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
// import { ThemeVanillaProvider, ThemeVanillaValue } from "@koine/react/styles";
|
|
4
3
|
import { ThemeProvider } from "../../ThemeProvider";
|
|
@@ -10,6 +9,6 @@ export var AppTheme = function (_a) {
|
|
|
10
9
|
// return (
|
|
11
10
|
// <ThemeVanillaProvider initialTheme={theme}>{children}</ThemeVanillaProvider>
|
|
12
11
|
// );
|
|
13
|
-
return (_jsx(ThemeProvider,
|
|
12
|
+
return (_jsx(ThemeProvider, { defaultTheme: theme, attribute: "class", children: children }));
|
|
14
13
|
};
|
|
15
14
|
export default AppTheme;
|
|
@@ -7,5 +7,5 @@ export type NextAppProps = AppProps<{
|
|
|
7
7
|
/**
|
|
8
8
|
* App with authentication provided by `next-auth`
|
|
9
9
|
*/
|
|
10
|
-
export declare const NextApp: (props: NextAppProps) => JSX.Element;
|
|
10
|
+
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default NextApp;
|
|
@@ -11,7 +11,7 @@ var AppMain_1 = require("../AppMain");
|
|
|
11
11
|
* App with authentication provided by `next-auth`
|
|
12
12
|
*/
|
|
13
13
|
var NextApp = function (props) {
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(react_1.SessionProvider,
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(react_1.SessionProvider, { session: props.pageProps.session, children: (0, jsx_runtime_1.jsx)(AppTheme_1.AppTheme, tslib_1.__assign({}, props, { children: (0, jsx_runtime_1.jsx)(AppMain_1.AppMain, tslib_1.__assign({}, props)) })) })] }));
|
|
15
15
|
};
|
|
16
16
|
exports.NextApp = NextApp;
|
|
17
17
|
exports.default = exports.NextApp;
|
|
@@ -8,6 +8,6 @@ import { AppMain } from "../AppMain";
|
|
|
8
8
|
* App with authentication provided by `next-auth`
|
|
9
9
|
*/
|
|
10
10
|
export var NextApp = function (props) {
|
|
11
|
-
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider,
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, { session: props.pageProps.session, children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) })] }));
|
|
12
12
|
};
|
|
13
13
|
export default NextApp;
|
|
@@ -50,5 +50,5 @@ export type NextAppProps = AppProps & AppThemeProps & AppMainProps;
|
|
|
50
50
|
*
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
export declare const NextApp: (props: NextAppProps) => JSX.Element;
|
|
53
|
+
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
export default NextApp;
|
|
@@ -7,5 +7,5 @@ export type AppMainProps = AppMainBaseProps & AppMainFramerProps;
|
|
|
7
7
|
*
|
|
8
8
|
* About the page transition [wallis' blog post](https://wallis.dev/blog/nextjs-page-transitions-with-framer-motion)
|
|
9
9
|
*/
|
|
10
|
-
export declare const AppMain: ({ Component, pageProps, Layout, ProgressOverlay, seo, motion, transition, pre, post, }: AppMainProps) => JSX.Element;
|
|
10
|
+
export declare const AppMain: ({ Component, pageProps, Layout, ProgressOverlay, seo, motion, transition, pre, post, }: AppMainProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default AppMain;
|
|
@@ -23,7 +23,7 @@ var AppMain = function (_a) {
|
|
|
23
23
|
exit: { opacity: 0 },
|
|
24
24
|
} : _b, pre = _a.pre, post = _a.post;
|
|
25
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)(m_1.MotionProvider,
|
|
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)(m_1.MotionProvider, { 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, { 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
27
|
};
|
|
28
28
|
exports.AppMain = AppMain;
|
|
29
29
|
exports.default = exports.AppMain;
|
|
@@ -20,6 +20,6 @@ export var AppMain = function (_a) {
|
|
|
20
20
|
exit: { opacity: 0 },
|
|
21
21
|
} : _b, pre = _a.pre, post = _a.post;
|
|
22
22
|
var pathname = useRouter().pathname;
|
|
23
|
-
return (_jsxs(_Fragment, { children: [_jsx(SeoDefaults, __assign({}, seo)), pre, _jsxs(MotionProvider,
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsx(SeoDefaults, __assign({}, seo)), pre, _jsxs(MotionProvider, { features: motion, children: [ProgressOverlay && _jsx(NextProgress, { Overlay: ProgressOverlay }), _jsx(Layout, { children: _jsx(AnimatePresence, { exitBeforeEnter: true, initial: false, children: _jsx(m.div, __assign({}, transition, { children: _createElement(Component, __assign({}, pageProps, { key: pathname })) }), pathname) }) })] }), post] }));
|
|
24
24
|
};
|
|
25
25
|
export default AppMain;
|
|
@@ -10,5 +10,5 @@ export type AppThemeProps = React.PropsWithChildren<NextAppProps & {
|
|
|
10
10
|
/**
|
|
11
11
|
* App theme with `styled-components`
|
|
12
12
|
*/
|
|
13
|
-
export declare const AppTheme: ({ theme, children }: AppThemeProps) => JSX.Element;
|
|
13
|
+
export declare const AppTheme: ({ theme, children }: AppThemeProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export default AppTheme;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AppTheme = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
5
|
var styled_components_1 = require("styled-components");
|
|
7
6
|
var sc_1 = require("@koine/react/sc");
|
|
@@ -10,7 +9,7 @@ var sc_1 = require("@koine/react/sc");
|
|
|
10
9
|
*/
|
|
11
10
|
var AppTheme = function (_a) {
|
|
12
11
|
var theme = _a.theme, children = _a.children;
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)(styled_components_1.ThemeProvider,
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)(styled_components_1.ThemeProvider, { theme: theme, children: [(0, jsx_runtime_1.jsx)(sc_1.StylesGlobal, {}), children] }));
|
|
14
13
|
};
|
|
15
14
|
exports.AppTheme = AppTheme;
|
|
16
15
|
exports.default = exports.AppTheme;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { ThemeProvider } from "styled-components";
|
|
4
3
|
import { StylesGlobal } from "@koine/react/sc";
|
|
@@ -7,6 +6,6 @@ import { StylesGlobal } from "@koine/react/sc";
|
|
|
7
6
|
*/
|
|
8
7
|
export var AppTheme = function (_a) {
|
|
9
8
|
var theme = _a.theme, children = _a.children;
|
|
10
|
-
return (_jsxs(ThemeProvider,
|
|
9
|
+
return (_jsxs(ThemeProvider, { theme: theme, children: [_jsx(StylesGlobal, {}), children] }));
|
|
11
10
|
};
|
|
12
11
|
export default AppTheme;
|
|
@@ -7,5 +7,5 @@ export type NextAppProps = AppProps<{
|
|
|
7
7
|
/**
|
|
8
8
|
* App with authentication provided by `next-auth`
|
|
9
9
|
*/
|
|
10
|
-
export declare const NextApp: (props: NextAppProps) => JSX.Element;
|
|
10
|
+
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default NextApp;
|
|
@@ -11,7 +11,7 @@ var AppMain_1 = require("../AppMain");
|
|
|
11
11
|
* App with authentication provided by `next-auth`
|
|
12
12
|
*/
|
|
13
13
|
var NextApp = function (props) {
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(react_1.SessionProvider,
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (0, jsx_runtime_1.jsx)(react_1.SessionProvider, { session: props.pageProps.session, children: (0, jsx_runtime_1.jsx)(AppTheme_1.AppTheme, tslib_1.__assign({}, props, { children: (0, jsx_runtime_1.jsx)(AppMain_1.AppMain, tslib_1.__assign({}, props)) })) })] }));
|
|
15
15
|
};
|
|
16
16
|
exports.NextApp = NextApp;
|
|
17
17
|
exports.default = exports.NextApp;
|
|
@@ -8,6 +8,6 @@ import { AppMain } from "../AppMain";
|
|
|
8
8
|
* App with authentication provided by `next-auth`
|
|
9
9
|
*/
|
|
10
10
|
export var NextApp = function (props) {
|
|
11
|
-
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider,
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, { session: props.pageProps.session, children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) })] }));
|
|
12
12
|
};
|
|
13
13
|
export default NextApp;
|
|
@@ -52,5 +52,5 @@ export type NextAppProps = AppProps & AppThemeProps & AppMainProps;
|
|
|
52
52
|
*
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
|
-
export declare const NextApp: (props: NextAppProps) => JSX.Element;
|
|
55
|
+
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
56
|
export default NextApp;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import NextDocument from "next/document";
|
|
3
2
|
/**
|
|
4
3
|
* Next Document wrapper for bare projects
|
|
@@ -11,6 +10,6 @@ import NextDocument from "next/document";
|
|
|
11
10
|
* ```
|
|
12
11
|
*/
|
|
13
12
|
export declare class Document extends NextDocument {
|
|
14
|
-
render(): JSX.Element;
|
|
13
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
}
|
|
16
15
|
export default Document;
|
|
@@ -23,7 +23,7 @@ var Document = /** @class */ (function (_super) {
|
|
|
23
23
|
}
|
|
24
24
|
Document.prototype.render = function () {
|
|
25
25
|
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(document_1.Html,
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(document_1.Html, { lang: locale || defaultLocale, className: "no-js", children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(NoJs_1.default, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] }));
|
|
27
27
|
};
|
|
28
28
|
return Document;
|
|
29
29
|
}(document_1.default));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import NextDocument, { Html, Head, Main, NextScript } from "next/document";
|
|
4
4
|
import Meta from "@koine/react/Meta";
|
|
@@ -20,7 +20,7 @@ var Document = /** @class */ (function (_super) {
|
|
|
20
20
|
}
|
|
21
21
|
Document.prototype.render = function () {
|
|
22
22
|
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
23
|
-
return (_jsxs(Html,
|
|
23
|
+
return (_jsxs(Html, { lang: locale || defaultLocale, className: "no-js", children: [_jsxs(Head, { children: [_jsx(Meta, {}), _jsx(NoJs, {})] }), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] }));
|
|
24
24
|
};
|
|
25
25
|
return Document;
|
|
26
26
|
}(NextDocument));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import NextDocument from "next/document";
|
|
3
2
|
/**
|
|
4
3
|
* Next Document wrapper for `css/tailwind` based projects
|
|
@@ -13,6 +12,6 @@ import NextDocument from "next/document";
|
|
|
13
12
|
* ```
|
|
14
13
|
*/
|
|
15
14
|
export declare class Document extends NextDocument {
|
|
16
|
-
render(): JSX.Element;
|
|
15
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
}
|
|
18
17
|
export default Document;
|
|
@@ -37,7 +37,7 @@ var Document = /** @class */ (function (_super) {
|
|
|
37
37
|
// }
|
|
38
38
|
Document.prototype.render = function () {
|
|
39
39
|
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
40
|
-
return ((0, jsx_runtime_1.jsxs)(document_1.Html,
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)(document_1.Html, { lang: locale || defaultLocale, className: "no-js", children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(NoJs_1.default, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] }));
|
|
41
41
|
};
|
|
42
42
|
return Document;
|
|
43
43
|
}(document_1.default));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import NextDocument, {
|
|
4
4
|
// DocumentContext,
|
|
@@ -37,7 +37,7 @@ var Document = /** @class */ (function (_super) {
|
|
|
37
37
|
// }
|
|
38
38
|
Document.prototype.render = function () {
|
|
39
39
|
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
40
|
-
return (_jsxs(Html,
|
|
40
|
+
return (_jsxs(Html, { lang: locale || defaultLocale, className: "no-js", children: [_jsxs(Head, { children: [_jsx(Meta, {}), _jsx(NoJs, {})] }), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] }));
|
|
41
41
|
};
|
|
42
42
|
return Document;
|
|
43
43
|
}(NextDocument));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import NextDocument, { DocumentContext, type DocumentInitialProps } from "next/document";
|
|
3
2
|
/**
|
|
4
3
|
* Next Document wrapper for `styled-components` based projects
|
|
@@ -15,6 +14,6 @@ import NextDocument, { DocumentContext, type DocumentInitialProps } from "next/d
|
|
|
15
14
|
*/
|
|
16
15
|
export declare class Document extends NextDocument {
|
|
17
16
|
static getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps>;
|
|
18
|
-
render(): JSX.Element;
|
|
17
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
}
|
|
20
19
|
export default Document;
|
|
@@ -59,7 +59,7 @@ var Document = /** @class */ (function (_super) {
|
|
|
59
59
|
};
|
|
60
60
|
Document.prototype.render = function () {
|
|
61
61
|
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
62
|
-
return ((0, jsx_runtime_1.jsxs)(document_1.Html,
|
|
62
|
+
return ((0, jsx_runtime_1.jsxs)(document_1.Html, { lang: locale || defaultLocale, className: "no-js", children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(NoJs_1.default, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] }));
|
|
63
63
|
};
|
|
64
64
|
return Document;
|
|
65
65
|
}(document_1.default));
|
|
@@ -56,7 +56,7 @@ var Document = /** @class */ (function (_super) {
|
|
|
56
56
|
};
|
|
57
57
|
Document.prototype.render = function () {
|
|
58
58
|
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
59
|
-
return (_jsxs(Html,
|
|
59
|
+
return (_jsxs(Html, { lang: locale || defaultLocale, className: "no-js", children: [_jsxs(Head, { children: [_jsx(Meta, {}), _jsx(NoJs, {})] }), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] }));
|
|
60
60
|
};
|
|
61
61
|
return Document;
|
|
62
62
|
}(NextDocument));
|
|
@@ -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
|
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.useT = void 0;
|
|
5
5
|
var tslib_1 = require("tslib");
|
|
6
6
|
var react_1 = require("react");
|
|
7
|
-
|
|
7
|
+
// import useTranslation from "next-translate/useTranslation";
|
|
8
|
+
var context_1 = tslib_1.__importDefault(require("next-translate/context"));
|
|
8
9
|
function useT(namespace) {
|
|
9
|
-
var t = (0,
|
|
10
|
+
var t = (0, react_1.useContext)(context_1.default).t;
|
|
11
|
+
// const t = useTranslation().t;
|
|
10
12
|
var tMemoized = (0, react_1.useMemo)(function () {
|
|
11
13
|
return function (s, q, o) {
|
|
12
14
|
return t(namespace ? "".concat(namespace, ":").concat(s) : "".concat(s), q === "obj" || q === "" ? null : q, q === "obj" || o === "obj"
|
|
13
15
|
? { returnObjects: true }
|
|
14
16
|
: q === "" || o === ""
|
|
15
17
|
? { fallback: "" }
|
|
16
|
-
: o
|
|
18
|
+
: o);
|
|
17
19
|
// ) as TReturn extends (undefined | never | unknown) ? TranslateReturn<TranslationQuery, TranslationOptions> : TReturn;
|
|
18
|
-
);
|
|
20
|
+
// );
|
|
19
21
|
};
|
|
20
22
|
}, [t, namespace]);
|
|
21
23
|
return tMemoized;
|
|
@@ -25,16 +27,18 @@ exports.default = useT;
|
|
|
25
27
|
// Instead of wrapping the `useTranslation` hook from [`next-translate`](https://github.com/vinissimus/next-translate/blob/master/src/useTranslation.tsx)
|
|
26
28
|
// we might just rewrite it with our custom implementation but the `_context`
|
|
27
29
|
// to use is not exposed by the library...
|
|
28
|
-
// import { useContext, useMemo } from "react"
|
|
29
|
-
// import wrapTWithDefaultNs from "next-translate
|
|
30
|
-
// import I18nContext from "next-translate/
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
// )
|
|
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
|
+
// // )
|
|
40
44
|
// }
|
package/{legacy → 12}/useT.mjs
RENAMED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import useTranslation from "next-translate/useTranslation";
|
|
2
|
+
import { useContext, useMemo } from "react";
|
|
3
|
+
// import useTranslation from "next-translate/useTranslation";
|
|
4
|
+
import I18nContext from "next-translate/context";
|
|
4
5
|
export function useT(namespace) {
|
|
5
|
-
var t =
|
|
6
|
+
var t = useContext(I18nContext).t;
|
|
7
|
+
// const t = useTranslation().t;
|
|
6
8
|
var tMemoized = useMemo(function () {
|
|
7
9
|
return function (s, q, o) {
|
|
8
10
|
return t(namespace ? "".concat(namespace, ":").concat(s) : "".concat(s), q === "obj" || q === "" ? null : q, q === "obj" || o === "obj"
|
|
9
11
|
? { returnObjects: true }
|
|
10
12
|
: q === "" || o === ""
|
|
11
13
|
? { fallback: "" }
|
|
12
|
-
: o
|
|
14
|
+
: o);
|
|
13
15
|
// ) as TReturn extends (undefined | never | unknown) ? TranslateReturn<TranslationQuery, TranslationOptions> : TReturn;
|
|
14
|
-
);
|
|
16
|
+
// );
|
|
15
17
|
};
|
|
16
18
|
}, [t, namespace]);
|
|
17
19
|
return tMemoized;
|