@koine/next 2.0.0-beta.2 → 2.0.0-beta.200
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/12/AnalyticsGoogle.cjs.js +20 -0
- package/12/AnalyticsGoogle.d.ts +1 -1
- package/12/AnalyticsGoogle.esm.js +15 -0
- package/12/DisableErrorOverlay.cjs.js +11 -0
- package/12/DisableErrorOverlay.d.ts +1 -1
- package/12/DisableErrorOverlay.esm.js +6 -0
- package/12/Seo.d.ts +11 -3
- package/12/SeoDefaults.d.ts +7 -2
- package/12/seoBuildTags.d.ts +1 -2
- package/12/types.d.ts +5 -0
- package/12.cjs.default.js +1 -0
- package/12.cjs.js +9 -0
- package/12.cjs.mjs +2 -0
- package/12.d.ts +3 -0
- package/12.esm.js +2 -0
- package/README.md +0 -12
- package/ThemeContext.cjs.default.js +1 -0
- package/ThemeContext.cjs.js +10 -0
- package/ThemeContext.cjs.mjs +2 -0
- package/{12/ThemeContext.d.ts → ThemeContext.d.ts} +0 -1
- package/ThemeContext.esm.js +5 -0
- package/ThemeProvider.cjs.default.js +1 -0
- package/ThemeProvider.cjs.js +14 -0
- package/ThemeProvider.cjs.mjs +2 -0
- package/{12/ThemeProvider.d.ts → ThemeProvider.d.ts} +0 -1
- package/ThemeProvider.esm.js +9 -0
- package/config.cjs.default.js +1 -0
- package/config.cjs.js +8 -0
- package/config.cjs.mjs +2 -0
- package/config.d.ts +33 -0
- package/config.esm.js +6 -0
- package/index.cjs.default.js +1 -0
- package/index.cjs.js +13 -0
- package/index.cjs.mjs +2 -0
- package/index.d.ts +3 -1
- package/index.esm.js +4 -0
- package/load.cjs.default.js +1 -0
- package/load.cjs.js +8 -0
- package/load.cjs.mjs +2 -0
- package/load.d.ts +0 -0
- package/load.esm.js +3 -0
- package/package.json +61 -91
- package/typings.d.ts +39 -50
- package/useTheme.cjs.default.js +1 -0
- package/useTheme.cjs.js +11 -0
- package/useTheme.cjs.mjs +2 -0
- package/{12/useTheme.d.ts → useTheme.d.ts} +1 -1
- package/useTheme.esm.js +6 -0
- package/vite.config.d.ts +2 -0
- package/12/AnalyticsGoogle.js +0 -39
- package/12/AnalyticsGoogle.mjs +0 -34
- package/12/DisableErrorOverlay.js +0 -18
- package/12/DisableErrorOverlay.mjs +0 -13
- package/12/DynamicNamespaces.d.ts +0 -13
- package/12/DynamicNamespaces.js +0 -13
- package/12/DynamicNamespaces.mjs +0 -9
- package/12/Favicon.d.ts +0 -4
- package/12/Favicon.js +0 -10
- package/12/Favicon.mjs +0 -6
- package/12/Link.d.ts +0 -10
- package/12/Link.js +0 -15
- package/12/Link.mjs +0 -12
- package/12/NextProgress.d.ts +0 -25
- package/12/NextProgress.js +0 -46
- package/12/NextProgress.mjs +0 -42
- package/12/Seo.js +0 -34
- package/12/Seo.mjs +0 -29
- package/12/SeoDefaults.js +0 -17
- package/12/SeoDefaults.mjs +0 -12
- package/12/T.d.ts +0 -16
- package/12/T.js +0 -17
- package/12/T.mjs +0 -13
- package/12/ThemeContext.js +0 -10
- package/12/ThemeContext.mjs +0 -7
- package/12/ThemeProvider.js +0 -239
- package/12/ThemeProvider.mjs +0 -235
- package/12/TransText.d.ts +0 -3
- package/12/TransText.js +0 -8
- package/12/TransText.mjs +0 -4
- package/12/app/AppHead.d.ts +0 -3
- package/12/app/AppHead.js +0 -11
- package/12/app/AppHead.mjs +0 -6
- package/12/app/AppMain.d.ts +0 -35
- package/12/app/AppMain.js +0 -2
- package/12/app/AppMain.mjs +0 -1
- package/12/app/css/AppMain.d.ts +0 -9
- package/12/app/css/AppMain.js +0 -18
- package/12/app/css/AppMain.mjs +0 -14
- package/12/app/css/AppTheme.d.ts +0 -11
- package/12/app/css/AppTheme.js +0 -18
- package/12/app/css/AppTheme.mjs +0 -14
- package/12/app/css/auth/index.d.ts +0 -11
- package/12/app/css/auth/index.js +0 -17
- package/12/app/css/auth/index.mjs +0 -13
- package/12/app/css/auth/package.json +0 -6
- package/12/app/css/index.d.ts +0 -54
- package/12/app/css/index.js +0 -61
- package/12/app/css/index.mjs +0 -57
- package/12/app/css/package.json +0 -6
- package/12/app/index.d.ts +0 -2
- package/12/app/index.js +0 -5
- package/12/app/index.mjs +0 -2
- package/12/app/package.json +0 -6
- package/12/app/sc/AppMain.d.ts +0 -11
- package/12/app/sc/AppMain.js +0 -29
- package/12/app/sc/AppMain.mjs +0 -25
- package/12/app/sc/AppTheme.d.ts +0 -14
- package/12/app/sc/AppTheme.js +0 -15
- package/12/app/sc/AppTheme.mjs +0 -11
- package/12/app/sc/auth/index.d.ts +0 -11
- package/12/app/sc/auth/index.js +0 -17
- package/12/app/sc/auth/index.mjs +0 -13
- package/12/app/sc/auth/package.json +0 -6
- package/12/app/sc/index.d.ts +0 -56
- package/12/app/sc/index.js +0 -63
- package/12/app/sc/index.mjs +0 -59
- package/12/app/sc/package.json +0 -6
- package/12/document/Document.d.ts +0 -15
- package/12/document/Document.js +0 -31
- package/12/document/Document.mjs +0 -28
- package/12/document/css/index.d.ts +0 -17
- package/12/document/css/index.js +0 -45
- package/12/document/css/index.mjs +0 -45
- package/12/document/css/package.json +0 -6
- package/12/document/index.d.ts +0 -2
- package/12/document/index.js +0 -7
- package/12/document/index.mjs +0 -2
- package/12/document/package.json +0 -6
- package/12/document/sc/index.d.ts +0 -19
- package/12/document/sc/index.js +0 -67
- package/12/document/sc/index.mjs +0 -64
- package/12/document/sc/package.json +0 -6
- package/12/getT.d.ts +0 -9
- package/12/getT.js +0 -14
- package/12/getT.mjs +0 -10
- package/12/index.d.ts +0 -24
- package/12/index.js +0 -52
- package/12/index.mjs +0 -27
- package/12/package.json +0 -6
- package/12/seoBuildTags.js +0 -121
- package/12/seoBuildTags.mjs +0 -117
- package/12/to.d.ts +0 -24
- package/12/to.js +0 -29
- package/12/to.mjs +0 -25
- package/12/translationAsOptions.d.ts +0 -3
- package/12/translationAsOptions.js +0 -13
- package/12/translationAsOptions.mjs +0 -9
- package/12/types-i18n.d.ts +0 -118
- package/12/types-i18n.js +0 -14
- package/12/types-i18n.mjs +0 -13
- package/12/types-seo.d.ts +0 -7
- package/12/types-seo.js +0 -2
- package/12/types-seo.mjs +0 -1
- package/12/useBackUrl.d.ts +0 -2
- package/12/useBackUrl.js +0 -33
- package/12/useBackUrl.mjs +0 -28
- package/12/useDateFormat.d.ts +0 -7
- package/12/useDateFormat.js +0 -43
- package/12/useDateFormat.mjs +0 -39
- package/12/useForm.d.ts +0 -27
- package/12/useForm.js +0 -39
- package/12/useForm.mjs +0 -35
- package/12/useLocale.d.ts +0 -2
- package/12/useLocale.js +0 -11
- package/12/useLocale.mjs +0 -6
- package/12/useT.d.ts +0 -4
- package/12/useT.js +0 -44
- package/12/useT.mjs +0 -21
- package/12/useTheme.js +0 -12
- package/12/useTheme.mjs +0 -8
- package/12/useTo.d.ts +0 -3
- package/12/useTo.js +0 -19
- package/12/useTo.mjs +0 -15
- package/config/index.d.ts +0 -160
- package/config/index.js +0 -343
- package/config/index.mjs +0 -332
- package/config/package.json +0 -6
- package/getSiteUrl.d.ts +0 -8
- package/getSiteUrl.js +0 -17
- package/getSiteUrl.mjs +0 -12
- package/index.js +0 -7
- package/index.mjs +0 -2
- package/load.js +0 -18
- package/load.mjs +0 -14
package/typings.d.ts
CHANGED
|
@@ -12,61 +12,50 @@ declare module "*.svg" {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* [`next.js` pages router](https://nextjs.org/docs/pages) utility type
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
17
|
+
type NextGetStaticPathsResult<Params extends { [key: string]: any }> = Omit<
|
|
18
|
+
import("next").GetStaticPathsResult,
|
|
19
|
+
"paths"
|
|
20
|
+
> & {
|
|
21
|
+
paths: Array<string | { params: Params; locale?: string }>;
|
|
22
|
+
};
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
-
* namespace `Koine`. Most of the types here should be prefixed by `Next`, e.g.
|
|
26
|
-
* `NextSomeFeature` accessible anywhere from `Koine.NextSomeFeature`
|
|
25
|
+
* [`next.js` pages router](https://nextjs.org/docs/pages) utility type
|
|
27
26
|
*/
|
|
28
|
-
declare
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
declare type NextPageDataStaticPaths<Params extends { [key: string]: any }> = (
|
|
28
|
+
context: import("next").GetStaticPathsContext,
|
|
29
|
+
) =>
|
|
30
|
+
| Promise<NextGetStaticPathsResult<Params>>
|
|
31
|
+
| NextGetStaticPathsResult<Params>;
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* interface Translations {
|
|
41
|
-
* "~": typeof import("./locales/en/~.json");
|
|
42
|
-
* "_": typeof import("./locales/en/_.json");
|
|
43
|
-
* "$team": typeof import("./locales/en/$team.json");
|
|
44
|
-
* "home": typeof import("./locales/en/home.json");
|
|
45
|
-
* "Header": typeof import("./locales/en/Header.json");
|
|
46
|
-
* }
|
|
47
|
-
* }
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* Best to follow a convention to name the files which become the namespaces:
|
|
51
|
-
*
|
|
52
|
-
* - `~`: for app wide **urls** translated definitions
|
|
53
|
-
* - `_`: for app wide **common** translations
|
|
54
|
-
* - `${data}`: dollar prefix for static **data** like arrays, objects, .etc
|
|
55
|
-
* - `{route-name}`: lower cased for **route** specific data
|
|
56
|
-
* - `{ComponentName}`: pascal cased for **components** specific data
|
|
57
|
-
*
|
|
58
|
-
* This works through using [type augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)
|
|
59
|
-
* and [merging interfaces](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces).
|
|
60
|
-
*/
|
|
61
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
62
|
-
interface Translations {}
|
|
63
|
-
}
|
|
33
|
+
/**
|
|
34
|
+
* [`next.js` pages router](https://nextjs.org/docs/pages) utility type
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
declare type NextPageDataStatic<P extends { [key: string]: any }> =
|
|
38
|
+
import("next").GetStaticProps<P, import("querystring").ParsedUrlQuery>;
|
|
64
39
|
|
|
65
40
|
/**
|
|
66
|
-
*
|
|
67
|
-
* the `koine` ecosystem. For instance Google Analytics globally available
|
|
68
|
-
* variables.
|
|
41
|
+
* [`next.js` pages router](https://nextjs.org/docs/pages) utility type
|
|
69
42
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
43
|
+
|
|
44
|
+
declare type NextPageDataServer<P extends { [key: string]: any }> =
|
|
45
|
+
import("next").GetServerSideProps<P, import("querystring").ParsedUrlQuery>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Workaround to re-create the type `RouteProperties` that is not exported by
|
|
49
|
+
* `next.js`
|
|
50
|
+
*/
|
|
51
|
+
declare type NextRouteProperties = Parameters<
|
|
52
|
+
import("next/router").Router["getRouteInfo"]
|
|
53
|
+
>[0]["routeProps"];
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Extend NodeJS `process.env` with variables used by @koine
|
|
57
|
+
*/
|
|
58
|
+
// declare namespace NodeJS {
|
|
59
|
+
// interface ProcessEnv {
|
|
60
|
+
// }
|
|
61
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports._default = require('./useTheme.cjs.js').default;
|
package/useTheme.cjs.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var ThemeContext = require('./ThemeContext.cjs.js');
|
|
7
|
+
|
|
8
|
+
const useTheme=()=>react.useContext(ThemeContext.ThemeContext);
|
|
9
|
+
|
|
10
|
+
exports.default = useTheme;
|
|
11
|
+
exports.useTheme = useTheme;
|
package/useTheme.cjs.mjs
ADDED
package/useTheme.esm.js
ADDED
package/vite.config.d.ts
ADDED
package/12/AnalyticsGoogle.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.AnalyticsGoogle = void 0;
|
|
5
|
-
var tslib_1 = require("tslib");
|
|
6
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
var react_1 = require("react");
|
|
8
|
-
var router_1 = require("next/router");
|
|
9
|
-
var script_1 = tslib_1.__importDefault(require("next/script"));
|
|
10
|
-
var gtagPageview_1 = tslib_1.__importDefault(require("@koine/browser/gtagPageview"));
|
|
11
|
-
var AnalyticsGoogle = function (_a) {
|
|
12
|
-
var id = _a.id;
|
|
13
|
-
var uid = id || process.env["NEXT_PUBLIC_GTM_ID"];
|
|
14
|
-
var _b = (0, router_1.useRouter)(), events = _b.events, asPath = _b.asPath, query = _b.query;
|
|
15
|
-
var _c = (0, react_1.useState)(false), ready = _c[0], setReady = _c[1];
|
|
16
|
-
var _d = (0, react_1.useState)(false), routed = _d[0], setRouted = _d[1];
|
|
17
|
-
// const [url, setUrl] = useState("");
|
|
18
|
-
(0, react_1.useEffect)(function () {
|
|
19
|
-
var handleRouteChange = function () {
|
|
20
|
-
setRouted(true);
|
|
21
|
-
};
|
|
22
|
-
events.on("routeChangeComplete", handleRouteChange);
|
|
23
|
-
return function () {
|
|
24
|
-
events.off("routeChangeComplete", handleRouteChange);
|
|
25
|
-
};
|
|
26
|
-
}, [events]);
|
|
27
|
-
(0, react_1.useEffect)(function () {
|
|
28
|
-
if (routed && ready && asPath) {
|
|
29
|
-
// const search = query;
|
|
30
|
-
(0, gtagPageview_1.default)(asPath);
|
|
31
|
-
}
|
|
32
|
-
}, [asPath, query, routed, ready]);
|
|
33
|
-
if (!uid) {
|
|
34
|
-
return null;
|
|
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, { 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
|
-
};
|
|
38
|
-
exports.AnalyticsGoogle = AnalyticsGoogle;
|
|
39
|
-
exports.default = exports.AnalyticsGoogle;
|
package/12/AnalyticsGoogle.mjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useEffect } from "react";
|
|
4
|
-
import { useRouter } from "next/router";
|
|
5
|
-
import Script from "next/script";
|
|
6
|
-
import gtagPageview from "@koine/browser/gtagPageview";
|
|
7
|
-
export var AnalyticsGoogle = function (_a) {
|
|
8
|
-
var id = _a.id;
|
|
9
|
-
var uid = id || process.env["NEXT_PUBLIC_GTM_ID"];
|
|
10
|
-
var _b = useRouter(), events = _b.events, asPath = _b.asPath, query = _b.query;
|
|
11
|
-
var _c = useState(false), ready = _c[0], setReady = _c[1];
|
|
12
|
-
var _d = useState(false), routed = _d[0], setRouted = _d[1];
|
|
13
|
-
// const [url, setUrl] = useState("");
|
|
14
|
-
useEffect(function () {
|
|
15
|
-
var handleRouteChange = function () {
|
|
16
|
-
setRouted(true);
|
|
17
|
-
};
|
|
18
|
-
events.on("routeChangeComplete", handleRouteChange);
|
|
19
|
-
return function () {
|
|
20
|
-
events.off("routeChangeComplete", handleRouteChange);
|
|
21
|
-
};
|
|
22
|
-
}, [events]);
|
|
23
|
-
useEffect(function () {
|
|
24
|
-
if (routed && ready && asPath) {
|
|
25
|
-
// const search = query;
|
|
26
|
-
gtagPageview(asPath);
|
|
27
|
-
}
|
|
28
|
-
}, [asPath, query, routed, ready]);
|
|
29
|
-
if (!uid) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
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 ") })] }));
|
|
33
|
-
};
|
|
34
|
-
export default AnalyticsGoogle;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DisableErrorOverlay = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var head_1 = tslib_1.__importDefault(require("next/head"));
|
|
7
|
-
/**
|
|
8
|
-
* Disable error overlay during `dev`
|
|
9
|
-
*
|
|
10
|
-
* @see https://github.com/vercel/next.js/discussions/13387#discussioncomment-101564
|
|
11
|
-
*/
|
|
12
|
-
var DisableErrorOverlay = function () {
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(head_1.default, { children: process.env["NODE_ENV"] !== "production" && ((0, jsx_runtime_1.jsx)("script", { dangerouslySetInnerHTML: {
|
|
14
|
-
__html: "window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});",
|
|
15
|
-
} })) }));
|
|
16
|
-
};
|
|
17
|
-
exports.DisableErrorOverlay = DisableErrorOverlay;
|
|
18
|
-
exports.default = exports.DisableErrorOverlay;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import Head from "next/head";
|
|
3
|
-
/**
|
|
4
|
-
* Disable error overlay during `dev`
|
|
5
|
-
*
|
|
6
|
-
* @see https://github.com/vercel/next.js/discussions/13387#discussioncomment-101564
|
|
7
|
-
*/
|
|
8
|
-
export var DisableErrorOverlay = function () {
|
|
9
|
-
return (_jsx(Head, { children: process.env["NODE_ENV"] !== "production" && (_jsx("script", { dangerouslySetInnerHTML: {
|
|
10
|
-
__html: "window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});",
|
|
11
|
-
} })) }));
|
|
12
|
-
};
|
|
13
|
-
export default DisableErrorOverlay;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
|
|
2
|
-
import type { DynamicNamespacesProps as BaseDynamicNamespacesProps } from "next-translate";
|
|
3
|
-
import type { TranslateNamespace } from "./types-i18n";
|
|
4
|
-
export type DynamicNamespacesProps = Omit<BaseDynamicNamespacesProps, "namespaces"> & {
|
|
5
|
-
namespaces: TranslateNamespace[];
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* **NOTE**: To make typescript work nicely here make sure to enable
|
|
9
|
-
* [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
|
|
10
|
-
* in your `tsconfig.json` file.
|
|
11
|
-
*/
|
|
12
|
-
export declare const DynamicNamespaces: (props: DynamicNamespacesProps) => ReturnType<typeof BaseDynamicNamespaces>;
|
|
13
|
-
export default DynamicNamespaces;
|
package/12/DynamicNamespaces.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.DynamicNamespaces = void 0;
|
|
5
|
-
var tslib_1 = require("tslib");
|
|
6
|
-
var DynamicNamespaces_1 = tslib_1.__importDefault(require("next-translate/DynamicNamespaces"));
|
|
7
|
-
/**
|
|
8
|
-
* **NOTE**: To make typescript work nicely here make sure to enable
|
|
9
|
-
* [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
|
|
10
|
-
* in your `tsconfig.json` file.
|
|
11
|
-
*/
|
|
12
|
-
exports.DynamicNamespaces = DynamicNamespaces_1.default;
|
|
13
|
-
exports.default = exports.DynamicNamespaces;
|
package/12/DynamicNamespaces.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
|
|
3
|
-
/**
|
|
4
|
-
* **NOTE**: To make typescript work nicely here make sure to enable
|
|
5
|
-
* [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
|
|
6
|
-
* in your `tsconfig.json` file.
|
|
7
|
-
*/
|
|
8
|
-
export var DynamicNamespaces = BaseDynamicNamespaces;
|
|
9
|
-
export default DynamicNamespaces;
|
package/12/Favicon.d.ts
DELETED
package/12/Favicon.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Favicon = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var head_1 = tslib_1.__importDefault(require("next/head"));
|
|
7
|
-
var FaviconTags_1 = tslib_1.__importDefault(require("@koine/react/FaviconTags"));
|
|
8
|
-
var Favicon = function (props) { return ((0, jsx_runtime_1.jsx)(head_1.default, { children: (0, jsx_runtime_1.jsx)(FaviconTags_1.default, tslib_1.__assign({}, props)) })); };
|
|
9
|
-
exports.Favicon = Favicon;
|
|
10
|
-
exports.default = exports.Favicon;
|
package/12/Favicon.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import Head from "next/head";
|
|
4
|
-
import FaviconTags from "@koine/react/FaviconTags";
|
|
5
|
-
export var Favicon = function (props) { return (_jsx(Head, { children: _jsx(FaviconTags, __assign({}, props)) })); };
|
|
6
|
-
export default Favicon;
|
package/12/Link.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { LinkProps as NextLinkProps } from "next/link";
|
|
3
|
-
export type LinkProps = Omit<React.ComponentPropsWithRef<"a">, "href"> & Omit<NextLinkProps, "as" | "passHref" | "children"> & {
|
|
4
|
-
Link?: React.ComponentType<any>;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* @see https://next.js.org/docs/api-reference/next/link
|
|
8
|
-
*/
|
|
9
|
-
export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
-
export default Link;
|
package/12/Link.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Link = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 = require("react");
|
|
7
|
-
var link_1 = tslib_1.__importDefault(require("next/link"));
|
|
8
|
-
/**
|
|
9
|
-
* @see https://next.js.org/docs/api-reference/next/link
|
|
10
|
-
*/
|
|
11
|
-
exports.Link = (0, react_1.forwardRef)(function Link(_a, ref) {
|
|
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, { 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
|
-
});
|
|
15
|
-
exports.default = exports.Link;
|
package/12/Link.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __assign, __rest } from "tslib";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
import NextLink from "next/link";
|
|
5
|
-
/**
|
|
6
|
-
* @see https://next.js.org/docs/api-reference/next/link
|
|
7
|
-
*/
|
|
8
|
-
export var Link = forwardRef(function Link(_a, ref) {
|
|
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, { href: href, replace: replace, scroll: scroll, shallow: shallow, locale: locale, passHref: true, children: _jsx(Link, __assign({ ref: ref }, props)) }));
|
|
11
|
-
});
|
|
12
|
-
export default Link;
|
package/12/NextProgress.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Simplify } from "@koine/utils";
|
|
2
|
-
import type { WithComponents } from "@koine/react/helpers";
|
|
3
|
-
type OwnProps = {
|
|
4
|
-
/** @default 0.3 */
|
|
5
|
-
startAt?: number;
|
|
6
|
-
/** @default true */
|
|
7
|
-
showOnShallow?: boolean;
|
|
8
|
-
/** @default 200 */
|
|
9
|
-
stopDelayMs?: number;
|
|
10
|
-
};
|
|
11
|
-
export type Components = {
|
|
12
|
-
Overlay: {
|
|
13
|
-
type: "div";
|
|
14
|
-
props: {
|
|
15
|
-
running?: boolean;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export type ComponentsProps = {
|
|
20
|
-
[Name in keyof Components]: Components[Name]["props"];
|
|
21
|
-
};
|
|
22
|
-
type Props = Simplify<WithComponents<OwnProps, Components>>;
|
|
23
|
-
export type NextProgressProps = Props;
|
|
24
|
-
export declare const NextProgress: ({ startAt, showOnShallow, stopDelayMs, Overlay, }: NextProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export default NextProgress;
|
package/12/NextProgress.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.NextProgress = void 0;
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 = require("react");
|
|
7
|
-
var router_1 = require("next/router");
|
|
8
|
-
var NextProgress = function (_a) {
|
|
9
|
-
var _b = _a.startAt, startAt = _b === void 0 ? 0.3 : _b, _c = _a.showOnShallow, showOnShallow = _c === void 0 ? true : _c, _d = _a.stopDelayMs, stopDelayMs = _d === void 0 ? 200 : _d, _e = _a.Overlay, Overlay = _e === void 0 ? "div" : _e;
|
|
10
|
-
var events = (0, router_1.useRouter)().events;
|
|
11
|
-
// const [progress, setProgress] = useState(0);
|
|
12
|
-
var _f = (0, react_1.useState)(false), running = _f[0], setRunning = _f[1];
|
|
13
|
-
var timer = (0, react_1.useRef)(null);
|
|
14
|
-
var routeChangeStart = (0, react_1.useCallback)(function (_, _a) {
|
|
15
|
-
var shallow = _a.shallow;
|
|
16
|
-
if (!shallow || showOnShallow) {
|
|
17
|
-
// setProgress(startAt);
|
|
18
|
-
setRunning(true);
|
|
19
|
-
}
|
|
20
|
-
}, [showOnShallow]);
|
|
21
|
-
var routeChangeEnd = (0, react_1.useCallback)(function (_, _a) {
|
|
22
|
-
var shallow = _a.shallow;
|
|
23
|
-
if (!shallow || showOnShallow) {
|
|
24
|
-
if (timer.current) {
|
|
25
|
-
clearTimeout(timer.current);
|
|
26
|
-
}
|
|
27
|
-
timer.current = setTimeout(function () {
|
|
28
|
-
// setProgress(100);
|
|
29
|
-
setRunning(false);
|
|
30
|
-
}, stopDelayMs);
|
|
31
|
-
}
|
|
32
|
-
}, [showOnShallow, stopDelayMs, timer]);
|
|
33
|
-
(0, react_1.useEffect)(function () {
|
|
34
|
-
events.on("routeChangeStart", routeChangeStart);
|
|
35
|
-
events.on("routeChangeComplete", routeChangeEnd);
|
|
36
|
-
events.on("routeChangeError", routeChangeEnd);
|
|
37
|
-
return function () {
|
|
38
|
-
events.off("routeChangeStart", routeChangeStart);
|
|
39
|
-
events.off("routeChangeComplete", routeChangeEnd);
|
|
40
|
-
events.off("routeChangeError", routeChangeEnd);
|
|
41
|
-
};
|
|
42
|
-
}, [events, routeChangeStart, routeChangeEnd]);
|
|
43
|
-
return (0, jsx_runtime_1.jsx)(Overlay, { running: running });
|
|
44
|
-
};
|
|
45
|
-
exports.NextProgress = NextProgress;
|
|
46
|
-
exports.default = exports.NextProgress;
|
package/12/NextProgress.mjs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
-
import { useRouter } from "next/router";
|
|
5
|
-
export var NextProgress = function (_a) {
|
|
6
|
-
var _b = _a.startAt, startAt = _b === void 0 ? 0.3 : _b, _c = _a.showOnShallow, showOnShallow = _c === void 0 ? true : _c, _d = _a.stopDelayMs, stopDelayMs = _d === void 0 ? 200 : _d, _e = _a.Overlay, Overlay = _e === void 0 ? "div" : _e;
|
|
7
|
-
var events = useRouter().events;
|
|
8
|
-
// const [progress, setProgress] = useState(0);
|
|
9
|
-
var _f = useState(false), running = _f[0], setRunning = _f[1];
|
|
10
|
-
var timer = useRef(null);
|
|
11
|
-
var routeChangeStart = useCallback(function (_, _a) {
|
|
12
|
-
var shallow = _a.shallow;
|
|
13
|
-
if (!shallow || showOnShallow) {
|
|
14
|
-
// setProgress(startAt);
|
|
15
|
-
setRunning(true);
|
|
16
|
-
}
|
|
17
|
-
}, [showOnShallow]);
|
|
18
|
-
var routeChangeEnd = useCallback(function (_, _a) {
|
|
19
|
-
var shallow = _a.shallow;
|
|
20
|
-
if (!shallow || showOnShallow) {
|
|
21
|
-
if (timer.current) {
|
|
22
|
-
clearTimeout(timer.current);
|
|
23
|
-
}
|
|
24
|
-
timer.current = setTimeout(function () {
|
|
25
|
-
// setProgress(100);
|
|
26
|
-
setRunning(false);
|
|
27
|
-
}, stopDelayMs);
|
|
28
|
-
}
|
|
29
|
-
}, [showOnShallow, stopDelayMs, timer]);
|
|
30
|
-
useEffect(function () {
|
|
31
|
-
events.on("routeChangeStart", routeChangeStart);
|
|
32
|
-
events.on("routeChangeComplete", routeChangeEnd);
|
|
33
|
-
events.on("routeChangeError", routeChangeEnd);
|
|
34
|
-
return function () {
|
|
35
|
-
events.off("routeChangeStart", routeChangeStart);
|
|
36
|
-
events.off("routeChangeComplete", routeChangeEnd);
|
|
37
|
-
events.off("routeChangeError", routeChangeEnd);
|
|
38
|
-
};
|
|
39
|
-
}, [events, routeChangeStart, routeChangeEnd]);
|
|
40
|
-
return _jsx(Overlay, { running: running });
|
|
41
|
-
};
|
|
42
|
-
export default NextProgress;
|
package/12/Seo.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Seo = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
// import { memo } from "react";
|
|
7
|
-
var head_1 = tslib_1.__importDefault(require("next/head"));
|
|
8
|
-
var seoBuildTags_1 = require("./seoBuildTags");
|
|
9
|
-
/**
|
|
10
|
-
* Adapted from [garmeeh/next-seo](https://github.com/garmeeh/next-seo)
|
|
11
|
-
*
|
|
12
|
-
* See also:
|
|
13
|
-
* - https://github.com/catnose99/next-head-seo
|
|
14
|
-
* - https://nextjs.org/docs/api-reference/next/head
|
|
15
|
-
*
|
|
16
|
-
* NB: on the homepage you usually want to customize the `titleTemplate` to avoid
|
|
17
|
-
* doubled app name. Assuming your default seo configuration is something like:
|
|
18
|
-
*
|
|
19
|
-
* ```js
|
|
20
|
-
* {
|
|
21
|
-
* titleTemplate: "%s | MyApp"
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* On the homepage you migh want to override it, e.g.:
|
|
26
|
-
* ```js
|
|
27
|
-
* <Seo title="MyApp | Some description" titleTemplate="%s" />
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
var Seo = function (props) {
|
|
31
|
-
return (0, jsx_runtime_1.jsx)(head_1.default, { children: (0, seoBuildTags_1.seoBuildTags)(props) });
|
|
32
|
-
};
|
|
33
|
-
exports.Seo = Seo;
|
|
34
|
-
exports.default = exports.Seo;
|
package/12/Seo.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// import { memo } from "react";
|
|
3
|
-
import Head from "next/head";
|
|
4
|
-
import { seoBuildTags } from "./seoBuildTags";
|
|
5
|
-
/**
|
|
6
|
-
* Adapted from [garmeeh/next-seo](https://github.com/garmeeh/next-seo)
|
|
7
|
-
*
|
|
8
|
-
* See also:
|
|
9
|
-
* - https://github.com/catnose99/next-head-seo
|
|
10
|
-
* - https://nextjs.org/docs/api-reference/next/head
|
|
11
|
-
*
|
|
12
|
-
* NB: on the homepage you usually want to customize the `titleTemplate` to avoid
|
|
13
|
-
* doubled app name. Assuming your default seo configuration is something like:
|
|
14
|
-
*
|
|
15
|
-
* ```js
|
|
16
|
-
* {
|
|
17
|
-
* titleTemplate: "%s | MyApp"
|
|
18
|
-
* }
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* On the homepage you migh want to override it, e.g.:
|
|
22
|
-
* ```js
|
|
23
|
-
* <Seo title="MyApp | Some description" titleTemplate="%s" />
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export var Seo = function (props) {
|
|
27
|
-
return _jsx(Head, { children: seoBuildTags(props) });
|
|
28
|
-
};
|
|
29
|
-
export default Seo;
|
package/12/SeoDefaults.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SeoDefaults = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
// import { memo } from "react";
|
|
7
|
-
var head_1 = tslib_1.__importDefault(require("next/head"));
|
|
8
|
-
// import { useRouter } from "next/router";
|
|
9
|
-
// import { getSiteUrl } from "../utils";
|
|
10
|
-
var seoBuildTags_1 = require("./seoBuildTags");
|
|
11
|
-
var SeoDefaults = function (props) {
|
|
12
|
-
// const router = useRouter();
|
|
13
|
-
// props.openGraph.url = getSiteUrl(router.asPath);
|
|
14
|
-
return (0, jsx_runtime_1.jsx)(head_1.default, { children: (0, seoBuildTags_1.seoBuildTags)(props) });
|
|
15
|
-
};
|
|
16
|
-
exports.SeoDefaults = SeoDefaults;
|
|
17
|
-
exports.default = exports.SeoDefaults;
|
package/12/SeoDefaults.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// import { memo } from "react";
|
|
3
|
-
import Head from "next/head";
|
|
4
|
-
// import { useRouter } from "next/router";
|
|
5
|
-
// import { getSiteUrl } from "../utils";
|
|
6
|
-
import { seoBuildTags } from "./seoBuildTags";
|
|
7
|
-
export var SeoDefaults = function (props) {
|
|
8
|
-
// const router = useRouter();
|
|
9
|
-
// props.openGraph.url = getSiteUrl(router.asPath);
|
|
10
|
-
return _jsx(Head, { children: seoBuildTags(props) });
|
|
11
|
-
};
|
|
12
|
-
export default SeoDefaults;
|
package/12/T.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { TransProps } from "next-translate";
|
|
3
|
-
import type { TranslateNamespace, TranslationsPaths, TranslationsAllPaths } from "./types-i18n";
|
|
4
|
-
export type TProps<TNamespace extends TranslateNamespace | undefined = undefined> = (Omit<TransProps, "i18nKey" | "ns"> & {
|
|
5
|
-
i18nKey: TranslationsAllPaths;
|
|
6
|
-
}) | (Omit<TransProps, "i18nKey" | "ns"> & {
|
|
7
|
-
ns: TNamespace;
|
|
8
|
-
i18nKey: TranslationsPaths<TNamespace>;
|
|
9
|
-
});
|
|
10
|
-
/**
|
|
11
|
-
* **NOTE**: To make typescript work nicely here make sure to enable
|
|
12
|
-
* [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
|
|
13
|
-
* in your `tsconfig.json` file.
|
|
14
|
-
*/
|
|
15
|
-
export declare const T: <TNamespace extends "~" | undefined = undefined>(props: TProps<TNamespace>) => import("react").ReactElement<TProps<TNamespace>, string | import("react").JSXElementConstructor<any>>;
|
|
16
|
-
export default T;
|
package/12/T.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.T = void 0;
|
|
5
|
-
var tslib_1 = require("tslib");
|
|
6
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
var Trans_1 = tslib_1.__importDefault(require("next-translate/Trans"));
|
|
8
|
-
/**
|
|
9
|
-
* **NOTE**: To make typescript work nicely here make sure to enable
|
|
10
|
-
* [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
|
|
11
|
-
* in your `tsconfig.json` file.
|
|
12
|
-
*/
|
|
13
|
-
var T = function (props) {
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(Trans_1.default, tslib_1.__assign({}, props)));
|
|
15
|
-
};
|
|
16
|
-
exports.T = T;
|
|
17
|
-
exports.default = exports.T;
|
package/12/T.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { __assign } from "tslib";
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
import Trans from "next-translate/Trans";
|
|
5
|
-
/**
|
|
6
|
-
* **NOTE**: To make typescript work nicely here make sure to enable
|
|
7
|
-
* [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
|
|
8
|
-
* in your `tsconfig.json` file.
|
|
9
|
-
*/
|
|
10
|
-
export var T = function (props) {
|
|
11
|
-
return (_jsx(Trans, __assign({}, props)));
|
|
12
|
-
};
|
|
13
|
-
export default T;
|
package/12/ThemeContext.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ThemeContext = void 0;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
exports.ThemeContext = (0, react_1.createContext)({
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
7
|
-
setTheme: function (_) { },
|
|
8
|
-
themes: [],
|
|
9
|
-
});
|
|
10
|
-
exports.default = exports.ThemeContext;
|