@koine/next 2.0.0-beta.9 → 2.0.0-beta.91
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.d.ts +1 -2
- package/12/DisableErrorOverlay.d.ts +1 -6
- package/12/Seo.d.ts +8 -26
- package/12/SeoDefaults.d.ts +3 -4
- package/12/seoBuildTags.d.ts +2 -17
- package/12/types.d.ts +2 -0
- package/12.cjs.d.ts +1 -0
- package/12.cjs.default.js +1 -0
- package/12.cjs.js +34 -0
- package/12.cjs.mjs +2 -0
- package/12.d.ts +3 -0
- package/12.esm.js +24 -0
- package/README.md +0 -12
- package/ThemeContext.cjs.d.ts +2 -0
- package/ThemeContext.cjs.default.js +1 -0
- package/ThemeContext.cjs.js +11 -0
- package/ThemeContext.cjs.mjs +2 -0
- package/ThemeContext.d.ts +11 -0
- package/ThemeContext.esm.js +6 -0
- package/ThemeProvider.cjs.d.ts +2 -0
- package/ThemeProvider.cjs.default.js +1 -0
- package/ThemeProvider.cjs.js +47 -0
- package/ThemeProvider.cjs.mjs +2 -0
- package/ThemeProvider.d.ts +17 -0
- package/ThemeProvider.esm.js +38 -0
- package/config.cjs.d.ts +1 -0
- package/config.cjs.default.js +1 -0
- package/config.cjs.js +29 -0
- package/config.cjs.mjs +2 -0
- package/config.d.ts +8 -0
- package/config.esm.js +25 -0
- package/index.cjs.d.ts +1 -0
- package/index.cjs.default.js +1 -0
- package/index.cjs.js +19 -0
- package/index.cjs.mjs +2 -0
- package/index.d.ts +3 -1
- package/index.esm.js +8 -0
- package/load.cjs.d.ts +2 -0
- package/load.cjs.default.js +1 -0
- package/load.cjs.js +15 -0
- package/load.cjs.mjs +2 -0
- package/load.d.ts +0 -8
- package/{load.mjs → load.esm.js} +3 -6
- package/package.json +49 -89
- package/typings.d.ts +39 -50
- package/useTheme.cjs.d.ts +2 -0
- package/useTheme.cjs.default.js +1 -0
- package/useTheme.cjs.js +13 -0
- package/useTheme.cjs.mjs +2 -0
- package/useTheme.d.ts +4 -0
- package/useTheme.esm.js +8 -0
- package/12/AnalyticsGoogle.js +0 -79
- package/12/AnalyticsGoogle.mjs +0 -60
- package/12/DisableErrorOverlay.js +0 -31
- package/12/DisableErrorOverlay.mjs +0 -16
- package/12/DynamicNamespaces.d.ts +0 -13
- package/12/DynamicNamespaces.js +0 -23
- package/12/DynamicNamespaces.mjs +0 -8
- package/12/Favicon.d.ts +0 -4
- package/12/Favicon.js +0 -29
- package/12/Favicon.mjs +0 -10
- package/12/Link.d.ts +0 -10
- package/12/Link.js +0 -38
- package/12/Link.mjs +0 -20
- package/12/NextProgress.d.ts +0 -25
- package/12/NextProgress.js +0 -69
- package/12/NextProgress.mjs +0 -51
- package/12/Seo.js +0 -29
- package/12/Seo.mjs +0 -30
- package/12/SeoDefaults.js +0 -31
- package/12/SeoDefaults.mjs +0 -14
- package/12/T.d.ts +0 -16
- package/12/T.js +0 -43
- package/12/T.mjs +0 -27
- package/12/ThemeContext.d.ts +0 -17
- package/12/ThemeContext.js +0 -25
- package/12/ThemeContext.mjs +0 -7
- package/12/ThemeProvider.d.ts +0 -35
- package/12/ThemeProvider.js +0 -256
- package/12/ThemeProvider.mjs +0 -245
- package/12/TransText.d.ts +0 -3
- package/12/TransText.js +0 -23
- package/12/TransText.mjs +0 -4
- package/12/app/AppHead.d.ts +0 -3
- package/12/app/AppHead.js +0 -31
- package/12/app/AppHead.mjs +0 -12
- package/12/app/AppMain.d.ts +0 -35
- package/12/app/AppMain.js +0 -6
- package/12/app/AppMain.mjs +0 -1
- package/12/app/css/AppMain.d.ts +0 -9
- package/12/app/css/AppMain.js +0 -39
- package/12/app/css/AppMain.mjs +0 -24
- package/12/app/css/AppTheme.d.ts +0 -11
- package/12/app/css/AppTheme.js +0 -33
- package/12/app/css/AppTheme.mjs +0 -17
- package/12/app/css/auth/index.d.ts +0 -11
- package/12/app/css/auth/index.js +0 -40
- package/12/app/css/auth/index.mjs +0 -24
- package/12/app/css/index.d.ts +0 -54
- package/12/app/css/index.js +0 -36
- package/12/app/css/index.mjs +0 -65
- package/12/app/index.d.ts +0 -2
- package/12/app/index.js +0 -7
- package/12/app/index.mjs +0 -2
- package/12/app/sc/AppMain.d.ts +0 -11
- package/12/app/sc/AppMain.js +0 -70
- package/12/app/sc/AppMain.mjs +0 -58
- package/12/app/sc/AppTheme.d.ts +0 -14
- package/12/app/sc/AppTheme.js +0 -33
- package/12/app/sc/AppTheme.mjs +0 -16
- package/12/app/sc/auth/index.d.ts +0 -11
- package/12/app/sc/auth/index.js +0 -40
- package/12/app/sc/auth/index.mjs +0 -24
- package/12/app/sc/index.d.ts +0 -56
- package/12/app/sc/index.js +0 -36
- package/12/app/sc/index.mjs +0 -67
- package/12/document/Document.d.ts +0 -15
- package/12/document/Document.js +0 -49
- package/12/document/Document.mjs +0 -38
- package/12/document/css/index.d.ts +0 -17
- package/12/document/css/index.js +0 -60
- package/12/document/css/index.mjs +0 -53
- package/12/document/index.d.ts +0 -2
- package/12/document/index.js +0 -19
- package/12/document/index.mjs +0 -2
- package/12/document/sc/index.d.ts +0 -19
- package/12/document/sc/index.js +0 -73
- package/12/document/sc/index.mjs +0 -65
- package/12/getT.d.ts +0 -9
- package/12/getT.js +0 -23
- package/12/getT.mjs +0 -8
- package/12/index.d.ts +0 -24
- package/12/index.js +0 -100
- package/12/index.mjs +0 -27
- package/12/seoBuildTags.js +0 -126
- package/12/seoBuildTags.mjs +0 -121
- package/12/to.d.ts +0 -24
- package/12/to.js +0 -31
- package/12/to.mjs +0 -19
- package/12/translationAsOptions.d.ts +0 -3
- package/12/translationAsOptions.js +0 -19
- package/12/translationAsOptions.mjs +0 -9
- package/12/types-i18n.d.ts +0 -118
- package/12/types-i18n.js +0 -15
- package/12/types-i18n.mjs +0 -12
- package/12/types-seo.d.ts +0 -7
- package/12/types-seo.js +0 -4
- package/12/types-seo.mjs +0 -1
- package/12/useBackUrl.d.ts +0 -2
- package/12/useBackUrl.js +0 -47
- package/12/useBackUrl.mjs +0 -28
- package/12/useDateFormat.d.ts +0 -7
- package/12/useDateFormat.js +0 -42
- package/12/useDateFormat.mjs +0 -26
- package/12/useForm.d.ts +0 -27
- package/12/useForm.js +0 -65
- package/12/useForm.mjs +0 -47
- package/12/useLocale.d.ts +0 -2
- package/12/useLocale.js +0 -25
- package/12/useLocale.mjs +0 -6
- package/12/useT.d.ts +0 -4
- package/12/useT.js +0 -58
- package/12/useT.mjs +0 -39
- package/12/useTheme.d.ts +0 -7
- package/12/useTheme.js +0 -23
- package/12/useTheme.mjs +0 -7
- package/12/useTo.d.ts +0 -3
- package/12/useTo.js +0 -26
- package/12/useTo.mjs +0 -8
- package/config/index.d.ts +0 -160
- package/config/index.js +0 -317
- package/config/index.mjs +0 -315
- package/getSiteUrl.d.ts +0 -8
- package/getSiteUrl.js +0 -24
- package/getSiteUrl.mjs +0 -10
- package/index.js +0 -20
- package/index.mjs +0 -2
- package/load.js +0 -31
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,69 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
function _export(target, all) {
|
|
7
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: all[name]
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
_export(exports, {
|
|
13
|
-
NextProgress: function() {
|
|
14
|
-
return NextProgress;
|
|
15
|
-
},
|
|
16
|
-
default: function() {
|
|
17
|
-
return _default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
21
|
-
const _router = require("next/router");
|
|
22
|
-
const _react = require("react");
|
|
23
|
-
const NextProgress = ({ startAt = 0.3, showOnShallow = true, stopDelayMs = 200, Overlay = "div" })=>{
|
|
24
|
-
const { events } = (0, _router.useRouter)();
|
|
25
|
-
// const [progress, setProgress] = useState(0);
|
|
26
|
-
const [running, setRunning] = (0, _react.useState)(false);
|
|
27
|
-
const timer = (0, _react.useRef)(null);
|
|
28
|
-
const routeChangeStart = (0, _react.useCallback)((_, { shallow })=>{
|
|
29
|
-
if (!shallow || showOnShallow) {
|
|
30
|
-
// setProgress(startAt);
|
|
31
|
-
setRunning(true);
|
|
32
|
-
}
|
|
33
|
-
}, [
|
|
34
|
-
showOnShallow
|
|
35
|
-
]);
|
|
36
|
-
const routeChangeEnd = (0, _react.useCallback)((_, { shallow })=>{
|
|
37
|
-
if (!shallow || showOnShallow) {
|
|
38
|
-
if (timer.current) {
|
|
39
|
-
clearTimeout(timer.current);
|
|
40
|
-
}
|
|
41
|
-
timer.current = setTimeout(()=>{
|
|
42
|
-
// setProgress(100);
|
|
43
|
-
setRunning(false);
|
|
44
|
-
}, stopDelayMs);
|
|
45
|
-
}
|
|
46
|
-
}, [
|
|
47
|
-
showOnShallow,
|
|
48
|
-
stopDelayMs,
|
|
49
|
-
timer
|
|
50
|
-
]);
|
|
51
|
-
(0, _react.useEffect)(()=>{
|
|
52
|
-
events.on("routeChangeStart", routeChangeStart);
|
|
53
|
-
events.on("routeChangeComplete", routeChangeEnd);
|
|
54
|
-
events.on("routeChangeError", routeChangeEnd);
|
|
55
|
-
return ()=>{
|
|
56
|
-
events.off("routeChangeStart", routeChangeStart);
|
|
57
|
-
events.off("routeChangeComplete", routeChangeEnd);
|
|
58
|
-
events.off("routeChangeError", routeChangeEnd);
|
|
59
|
-
};
|
|
60
|
-
}, [
|
|
61
|
-
events,
|
|
62
|
-
routeChangeStart,
|
|
63
|
-
routeChangeEnd
|
|
64
|
-
]);
|
|
65
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Overlay, {
|
|
66
|
-
running: running
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
const _default = NextProgress;
|
package/12/NextProgress.mjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useRouter } from "next/router";
|
|
4
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
5
|
-
export const NextProgress = ({ startAt = 0.3, showOnShallow = true, stopDelayMs = 200, Overlay = "div" })=>{
|
|
6
|
-
const { events } = useRouter();
|
|
7
|
-
// const [progress, setProgress] = useState(0);
|
|
8
|
-
const [running, setRunning] = useState(false);
|
|
9
|
-
const timer = useRef(null);
|
|
10
|
-
const routeChangeStart = useCallback((_, { shallow })=>{
|
|
11
|
-
if (!shallow || showOnShallow) {
|
|
12
|
-
// setProgress(startAt);
|
|
13
|
-
setRunning(true);
|
|
14
|
-
}
|
|
15
|
-
}, [
|
|
16
|
-
showOnShallow
|
|
17
|
-
]);
|
|
18
|
-
const routeChangeEnd = useCallback((_, { shallow })=>{
|
|
19
|
-
if (!shallow || showOnShallow) {
|
|
20
|
-
if (timer.current) {
|
|
21
|
-
clearTimeout(timer.current);
|
|
22
|
-
}
|
|
23
|
-
timer.current = setTimeout(()=>{
|
|
24
|
-
// setProgress(100);
|
|
25
|
-
setRunning(false);
|
|
26
|
-
}, stopDelayMs);
|
|
27
|
-
}
|
|
28
|
-
}, [
|
|
29
|
-
showOnShallow,
|
|
30
|
-
stopDelayMs,
|
|
31
|
-
timer
|
|
32
|
-
]);
|
|
33
|
-
useEffect(()=>{
|
|
34
|
-
events.on("routeChangeStart", routeChangeStart);
|
|
35
|
-
events.on("routeChangeComplete", routeChangeEnd);
|
|
36
|
-
events.on("routeChangeError", routeChangeEnd);
|
|
37
|
-
return ()=>{
|
|
38
|
-
events.off("routeChangeStart", routeChangeStart);
|
|
39
|
-
events.off("routeChangeComplete", routeChangeEnd);
|
|
40
|
-
events.off("routeChangeError", routeChangeEnd);
|
|
41
|
-
};
|
|
42
|
-
}, [
|
|
43
|
-
events,
|
|
44
|
-
routeChangeStart,
|
|
45
|
-
routeChangeEnd
|
|
46
|
-
]);
|
|
47
|
-
return /*#__PURE__*/ _jsx(Overlay, {
|
|
48
|
-
running: running
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
export default NextProgress;
|
package/12/Seo.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// import { memo } from "react";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
function _export(target, all) {
|
|
7
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: all[name]
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
_export(exports, {
|
|
13
|
-
Seo: function() {
|
|
14
|
-
return Seo;
|
|
15
|
-
},
|
|
16
|
-
default: function() {
|
|
17
|
-
return _default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
21
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
22
|
-
const _head = /*#__PURE__*/ _interop_require_default._(require("next/head"));
|
|
23
|
-
const _seoBuildTags = require("./seoBuildTags");
|
|
24
|
-
const Seo = (props)=>{
|
|
25
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_head.default, {
|
|
26
|
-
children: (0, _seoBuildTags.seoBuildTags)(props)
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
const _default = Seo;
|
package/12/Seo.mjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// import { memo } from "react";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
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
|
-
*/ export const Seo = (props)=>{
|
|
26
|
-
return /*#__PURE__*/ _jsx(Head, {
|
|
27
|
-
children: seoBuildTags(props)
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
export default Seo;
|
package/12/SeoDefaults.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// import { memo } from "react";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
function _export(target, all) {
|
|
7
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: all[name]
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
_export(exports, {
|
|
13
|
-
SeoDefaults: function() {
|
|
14
|
-
return SeoDefaults;
|
|
15
|
-
},
|
|
16
|
-
default: function() {
|
|
17
|
-
return _default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
21
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
22
|
-
const _head = /*#__PURE__*/ _interop_require_default._(require("next/head"));
|
|
23
|
-
const _seoBuildTags = require("./seoBuildTags");
|
|
24
|
-
const SeoDefaults = (props)=>{
|
|
25
|
-
// const router = useRouter();
|
|
26
|
-
// props.openGraph.url = getSiteUrl(router.asPath);
|
|
27
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_head.default, {
|
|
28
|
-
children: (0, _seoBuildTags.seoBuildTags)(props)
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
const _default = SeoDefaults;
|
package/12/SeoDefaults.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// import { memo } from "react";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import Head from "next/head";
|
|
4
|
-
// import { useRouter } from "next/router";
|
|
5
|
-
// import { getSiteUrl } from "../utils";
|
|
6
|
-
import { seoBuildTags } from "./seoBuildTags";
|
|
7
|
-
export const SeoDefaults = (props)=>{
|
|
8
|
-
// const router = useRouter();
|
|
9
|
-
// props.openGraph.url = getSiteUrl(router.asPath);
|
|
10
|
-
return /*#__PURE__*/ _jsx(Head, {
|
|
11
|
-
children: seoBuildTags(props)
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
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, TranslationsAllPaths, TranslationsPaths } 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,43 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
function _export(target, all) {
|
|
7
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: all[name]
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
_export(exports, {
|
|
13
|
-
T: function() {
|
|
14
|
-
return T;
|
|
15
|
-
},
|
|
16
|
-
default: function() {
|
|
17
|
-
return _default // export type TProps = Omit<TransProps, "i18nKey" | "ns"> & {
|
|
18
|
-
// i18nKey: TranslationsAllPaths;
|
|
19
|
-
// };
|
|
20
|
-
// export type TPropsNamespaced<
|
|
21
|
-
// TNamespace extends TranslateNamespace
|
|
22
|
-
// > = Omit<TransProps, "i18nKey" | "ns"> & {
|
|
23
|
-
// i18nKey: TranslationsPaths<Translations[TNamespace]>;
|
|
24
|
-
// ns?: TNamespace;
|
|
25
|
-
// };
|
|
26
|
-
// export function T(props: TProps): JSX.Element;
|
|
27
|
-
// export function T<TNamespace extends TranslateNamespace>(props: TPropsNamespaced<TNamespace>): JSX.Element;
|
|
28
|
-
// export function T<TNamespace extends TranslateNamespace>(
|
|
29
|
-
// props: TProps<TNamespace>
|
|
30
|
-
// ) {
|
|
31
|
-
// return <Trans {...props} />;
|
|
32
|
-
// }
|
|
33
|
-
// export { default as T } from "next-translate/Trans";
|
|
34
|
-
;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
38
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
39
|
-
const _Trans = /*#__PURE__*/ _interop_require_default._(require("next-translate/Trans"));
|
|
40
|
-
const T = (props)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_Trans.default, {
|
|
41
|
-
...props
|
|
42
|
-
});
|
|
43
|
-
const _default = T;
|
package/12/T.mjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import Trans from "next-translate/Trans";
|
|
4
|
-
/**
|
|
5
|
-
* **NOTE**: To make typescript work nicely here make sure to enable
|
|
6
|
-
* [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
|
|
7
|
-
* in your `tsconfig.json` file.
|
|
8
|
-
*/ export const T = (props)=>/*#__PURE__*/ _jsx(Trans, {
|
|
9
|
-
...props
|
|
10
|
-
});
|
|
11
|
-
export default T; // export type TProps = Omit<TransProps, "i18nKey" | "ns"> & {
|
|
12
|
-
// i18nKey: TranslationsAllPaths;
|
|
13
|
-
// };
|
|
14
|
-
// export type TPropsNamespaced<
|
|
15
|
-
// TNamespace extends TranslateNamespace
|
|
16
|
-
// > = Omit<TransProps, "i18nKey" | "ns"> & {
|
|
17
|
-
// i18nKey: TranslationsPaths<Translations[TNamespace]>;
|
|
18
|
-
// ns?: TNamespace;
|
|
19
|
-
// };
|
|
20
|
-
// export function T(props: TProps): JSX.Element;
|
|
21
|
-
// export function T<TNamespace extends TranslateNamespace>(props: TPropsNamespaced<TNamespace>): JSX.Element;
|
|
22
|
-
// export function T<TNamespace extends TranslateNamespace>(
|
|
23
|
-
// props: TProps<TNamespace>
|
|
24
|
-
// ) {
|
|
25
|
-
// return <Trans {...props} />;
|
|
26
|
-
// }
|
|
27
|
-
// export { default as T } from "next-translate/Trans";
|
package/12/ThemeContext.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export type ThemeContextProps = {
|
|
3
|
-
/** List of all available theme names */
|
|
4
|
-
themes: string[];
|
|
5
|
-
/** Forced theme name for the current page */
|
|
6
|
-
forcedTheme?: string;
|
|
7
|
-
/** Update the theme */
|
|
8
|
-
setTheme: (theme: string) => void;
|
|
9
|
-
/** Active theme name */
|
|
10
|
-
theme?: string;
|
|
11
|
-
/** If `enableSystem` is true and the active theme is "system", this returns whether the system preference resolved to "dark" or "light". Otherwise, identical to `theme` */
|
|
12
|
-
resolvedTheme?: string;
|
|
13
|
-
/** If enableSystem is true, returns the System theme preference ("dark" or "light"), regardless what the active theme is */
|
|
14
|
-
systemTheme?: "dark" | "light";
|
|
15
|
-
};
|
|
16
|
-
export declare const ThemeContext: import("react").Context<ThemeContextProps>;
|
|
17
|
-
export default ThemeContext;
|
package/12/ThemeContext.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
ThemeContext: function() {
|
|
13
|
-
return ThemeContext;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _react = require("react");
|
|
20
|
-
const ThemeContext = /*#__PURE__*/ (0, _react.createContext)({
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
22
|
-
setTheme: (_)=>{},
|
|
23
|
-
themes: []
|
|
24
|
-
});
|
|
25
|
-
const _default = ThemeContext;
|
package/12/ThemeContext.mjs
DELETED
package/12/ThemeProvider.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type ValueObject = {
|
|
3
|
-
[themeName: string]: string;
|
|
4
|
-
};
|
|
5
|
-
export type ThemeProviderProps = React.PropsWithChildren<{
|
|
6
|
-
/** List of all available theme names */
|
|
7
|
-
themes?: string[];
|
|
8
|
-
/** Forced theme name for the current page */
|
|
9
|
-
forcedTheme?: string;
|
|
10
|
-
/** Whether to switch between dark and light themes based on prefers-color-scheme */
|
|
11
|
-
enableSystem?: boolean;
|
|
12
|
-
/** Disable all CSS transitions when switching themes */
|
|
13
|
-
disableTransitionOnChange?: boolean;
|
|
14
|
-
/** Whether to indicate to browsers which color scheme is used (dark or light) for built-in UI like inputs and buttons */
|
|
15
|
-
enableColorScheme?: boolean;
|
|
16
|
-
/** Default theme name (for v0.0.12 and lower the default was light). If `enableSystem` is false, the default theme is light */
|
|
17
|
-
defaultTheme?: string;
|
|
18
|
-
/** HTML attribute modified based on the active theme. Accepts `class` and `data-*` (meaning any data attribute, `data-mode`, `data-color`, etc.) */
|
|
19
|
-
attribute?: string | "class";
|
|
20
|
-
/** Mapping of theme name to HTML attribute value. Object where key is the theme name and value is the attribute value */
|
|
21
|
-
value?: ValueObject;
|
|
22
|
-
/** Nonce string to pass to the inline script for CSP headers */
|
|
23
|
-
nonce?: string;
|
|
24
|
-
}>;
|
|
25
|
-
/**
|
|
26
|
-
* @borrows [next-themes](https://github.com/pacocoursey/next-themes)
|
|
27
|
-
*
|
|
28
|
-
* Differences:
|
|
29
|
-
*
|
|
30
|
-
* - enableColorScheme: `false` by default (instead of `true`), this plays more
|
|
31
|
-
* nicely with tailwind `dark` class mode as dark theme is supposed to be only
|
|
32
|
-
* controlled by tailwind modifiers
|
|
33
|
-
*/
|
|
34
|
-
export declare const ThemeProvider: ({ forcedTheme, disableTransitionOnChange, enableSystem, enableColorScheme, themes, defaultTheme, attribute, value, children, nonce, }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export default ThemeProvider;
|