@koine/next 2.0.0-beta.2 → 2.0.0-beta.21
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 +0 -1
- package/12/AnalyticsGoogle.js +15 -21
- package/12/DisableErrorOverlay.d.ts +0 -5
- package/12/DisableErrorOverlay.js +5 -15
- package/12/DynamicNamespaces.d.ts +2 -7
- package/12/DynamicNamespaces.js +3 -12
- package/12/Favicon.d.ts +0 -0
- package/12/Favicon.js +6 -10
- package/12/Link.d.ts +1 -4
- package/12/Link.js +8 -14
- package/12/NextProgress.d.ts +1 -4
- package/12/NextProgress.js +13 -19
- package/12/Seo.d.ts +2 -26
- package/12/Seo.js +6 -33
- package/12/SeoDefaults.d.ts +1 -4
- package/12/SeoDefaults.js +6 -16
- package/12/T.d.ts +1 -7
- package/12/T.js +6 -15
- package/12/TransText.d.ts +0 -0
- package/12/TransText.js +3 -7
- package/12/app/AppHead.d.ts +0 -0
- package/12/app/AppHead.js +5 -10
- package/12/app/AppMain.d.ts +4 -22
- package/12/app/AppMain.js +1 -2
- package/12/app/css/AppMain.d.ts +1 -6
- package/12/app/css/AppMain.js +7 -16
- package/12/app/css/AppTheme.d.ts +2 -5
- package/12/app/css/AppTheme.js +5 -16
- package/12/app/css/auth/index.d.ts +2 -5
- package/12/app/css/auth/index.js +9 -16
- package/12/app/css/index.d.ts +2 -50
- package/12/app/css/index.js +8 -60
- package/12/app/index.d.ts +2 -2
- package/12/app/index.js +2 -5
- package/12/app/sc/AppMain.d.ts +1 -8
- package/12/app/sc/AppMain.js +12 -23
- package/12/app/sc/AppTheme.d.ts +1 -7
- package/12/app/sc/AppTheme.js +6 -13
- package/12/app/sc/auth/index.d.ts +2 -5
- package/12/app/sc/auth/index.js +9 -16
- package/12/app/sc/index.d.ts +2 -52
- package/12/app/sc/index.js +8 -62
- package/12/document/Document.d.ts +0 -10
- package/12/document/Document.js +11 -24
- package/12/document/css/index.d.ts +0 -12
- package/12/document/css/index.js +11 -38
- package/12/document/index.d.ts +2 -2
- package/12/document/index.js +2 -7
- package/12/document/sc/index.d.ts +0 -13
- package/12/document/sc/index.js +21 -38
- package/12/getT.d.ts +1 -6
- package/12/getT.js +3 -13
- package/12/index.d.ts +3 -24
- package/12/index.js +3 -52
- package/12/seoBuildTags.d.ts +2 -17
- package/12/seoBuildTags.js +15 -43
- package/12/to.d.ts +1 -11
- package/12/to.js +4 -14
- package/12/translationAsOptions.d.ts +2 -1
- package/12/translationAsOptions.js +2 -5
- package/12/types-i18n.d.ts +0 -87
- package/12/types-i18n.js +1 -14
- package/12/types-seo.d.ts +0 -0
- package/12/types-seo.js +1 -2
- package/12/types.d.ts +7 -0
- package/12/types.js +2 -0
- package/12/useBackUrl.d.ts +0 -0
- package/12/useBackUrl.js +11 -20
- package/12/useDateFormat.d.ts +0 -4
- package/12/useDateFormat.js +15 -23
- package/12/useForm.d.ts +2 -2
- package/12/useForm.js +9 -33
- package/12/useLocale.d.ts +0 -0
- package/12/useLocale.js +4 -9
- package/12/useT.d.ts +1 -1
- package/12/useT.js +6 -33
- package/12/useTo.d.ts +1 -1
- package/12/useTo.js +7 -11
- package/ThemeContext.d.ts +11 -0
- package/{12/ThemeContext.mjs → ThemeContext.js} +0 -1
- package/ThemeProvider.d.ts +17 -0
- package/{12/ThemeProvider.mjs → ThemeProvider.js} +11 -42
- package/config-i18n.d.ts +52 -0
- package/config-i18n.js +251 -0
- package/config.d.ts +109 -0
- package/config.js +118 -0
- package/getSiteUrl.d.ts +0 -6
- package/getSiteUrl.js +4 -15
- package/index.d.ts +5 -2
- package/index.js +5 -7
- package/load.d.ts +0 -8
- package/load.js +2 -14
- package/package.json +159 -39
- package/useTheme.d.ts +4 -0
- package/{12/useTheme.mjs → useTheme.js} +1 -4
- package/12/AnalyticsGoogle.mjs +0 -34
- package/12/DisableErrorOverlay.mjs +0 -13
- package/12/DynamicNamespaces.mjs +0 -9
- package/12/Favicon.mjs +0 -6
- package/12/Link.mjs +0 -12
- package/12/NextProgress.mjs +0 -42
- package/12/Seo.mjs +0 -29
- package/12/SeoDefaults.mjs +0 -12
- package/12/T.mjs +0 -13
- package/12/ThemeContext.d.ts +0 -17
- package/12/ThemeContext.js +0 -10
- package/12/ThemeProvider.d.ts +0 -35
- package/12/ThemeProvider.js +0 -239
- package/12/TransText.mjs +0 -4
- package/12/app/AppHead.mjs +0 -6
- package/12/app/AppMain.mjs +0 -1
- package/12/app/css/AppMain.mjs +0 -14
- package/12/app/css/AppTheme.mjs +0 -14
- package/12/app/css/auth/index.mjs +0 -13
- package/12/app/css/auth/package.json +0 -6
- package/12/app/css/index.mjs +0 -57
- package/12/app/css/package.json +0 -6
- package/12/app/index.mjs +0 -2
- package/12/app/package.json +0 -6
- package/12/app/sc/AppMain.mjs +0 -25
- package/12/app/sc/AppTheme.mjs +0 -11
- package/12/app/sc/auth/index.mjs +0 -13
- package/12/app/sc/auth/package.json +0 -6
- package/12/app/sc/index.mjs +0 -59
- package/12/app/sc/package.json +0 -6
- package/12/document/Document.mjs +0 -28
- package/12/document/css/index.mjs +0 -45
- package/12/document/css/package.json +0 -6
- package/12/document/index.mjs +0 -2
- package/12/document/package.json +0 -6
- package/12/document/sc/index.mjs +0 -64
- package/12/document/sc/package.json +0 -6
- package/12/getT.mjs +0 -10
- package/12/index.mjs +0 -27
- package/12/package.json +0 -6
- package/12/seoBuildTags.mjs +0 -117
- package/12/to.mjs +0 -25
- package/12/translationAsOptions.mjs +0 -9
- package/12/types-i18n.mjs +0 -13
- package/12/types-seo.mjs +0 -1
- package/12/useBackUrl.mjs +0 -28
- package/12/useDateFormat.mjs +0 -39
- package/12/useForm.mjs +0 -35
- package/12/useLocale.mjs +0 -6
- package/12/useT.mjs +0 -21
- package/12/useTheme.d.ts +0 -7
- package/12/useTheme.js +0 -12
- package/12/useTo.mjs +0 -15
- package/README.md +0 -13
- 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.mjs +0 -12
- package/index.mjs +0 -2
- package/load.mjs +0 -14
package/12/app/css/auth/index.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var AppMain_1 = require("../AppMain");
|
|
10
|
-
/**
|
|
11
|
-
* App with authentication provided by `next-auth`
|
|
12
|
-
*/
|
|
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, { 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)) })) })] }));
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { SessionProvider } from "next-auth/react";
|
|
4
|
+
import { AppHead } from "../../AppHead.js";
|
|
5
|
+
import { AppMain } from "../AppMain.js";
|
|
6
|
+
import { AppTheme } from "../AppTheme.js";
|
|
7
|
+
export var NextApp = function (props) {
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, { session: props.pageProps.session, children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) })] }));
|
|
15
9
|
};
|
|
16
|
-
|
|
17
|
-
exports.default = exports.NextApp;
|
|
10
|
+
export default NextApp;
|
package/12/app/css/index.d.ts
CHANGED
|
@@ -1,54 +1,6 @@
|
|
|
1
1
|
import { AppProps } from "next/app";
|
|
2
|
-
import { type
|
|
3
|
-
import { type
|
|
2
|
+
import { type AppMainProps } from "./AppMain.js";
|
|
3
|
+
import { type AppThemeProps } from "./AppTheme.js";
|
|
4
4
|
export type NextAppProps = AppProps & AppThemeProps & AppMainProps;
|
|
5
|
-
/**
|
|
6
|
-
* App
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
*
|
|
10
|
-
* ```tsx
|
|
11
|
-
* import { NextApp, NextAppProps } from "@koine/next/app/css/auth";
|
|
12
|
-
* import { Favicon, AnalyticsGoogle } from "@koine/next";
|
|
13
|
-
* import { theme } from "src/helpers/theme";
|
|
14
|
-
* import { Layout } from "src/components/Layout";
|
|
15
|
-
* // import "@fontsource/myfont/800.css";
|
|
16
|
-
* // import "src/helpers/theme.css";
|
|
17
|
-
*
|
|
18
|
-
* const motion = () => import("@koine/react/m/max").then((m) => m.default);
|
|
19
|
-
*
|
|
20
|
-
* export default function App(props: NextAppProps) {
|
|
21
|
-
* return (
|
|
22
|
-
* <NextApp
|
|
23
|
-
* {...props}
|
|
24
|
-
* Layout={Layout}
|
|
25
|
-
* theme={theme}
|
|
26
|
-
* seo={{
|
|
27
|
-
* titleTemplate: "%s | MyApp",
|
|
28
|
-
* defaultTitle: "MyApp",
|
|
29
|
-
* openGraph: {
|
|
30
|
-
* type: "website",
|
|
31
|
-
* locale: "en_US",
|
|
32
|
-
* url: "https://myapp.com/",
|
|
33
|
-
* site_name: "MyApp",
|
|
34
|
-
* },
|
|
35
|
-
* twitter: {
|
|
36
|
-
* handle: "@MklrNl",
|
|
37
|
-
* site: "@MyApp",
|
|
38
|
-
* cardType: "summary_large_image",
|
|
39
|
-
* },
|
|
40
|
-
* }}
|
|
41
|
-
* pre={
|
|
42
|
-
* <>
|
|
43
|
-
* <AnalyticsGoogle id="UA-xxxxxxxx-x" />
|
|
44
|
-
* <Favicon name="MyApp" color="#000000" />
|
|
45
|
-
* </>
|
|
46
|
-
* }
|
|
47
|
-
* />
|
|
48
|
-
* );
|
|
49
|
-
* }
|
|
50
|
-
*
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
5
|
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
6
|
export default NextApp;
|
package/12/app/css/index.js
CHANGED
|
@@ -1,61 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var AppMain_1 = require("./AppMain");
|
|
9
|
-
/**
|
|
10
|
-
* App
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
*
|
|
14
|
-
* ```tsx
|
|
15
|
-
* import { NextApp, NextAppProps } from "@koine/next/app/css/auth";
|
|
16
|
-
* import { Favicon, AnalyticsGoogle } from "@koine/next";
|
|
17
|
-
* import { theme } from "src/helpers/theme";
|
|
18
|
-
* import { Layout } from "src/components/Layout";
|
|
19
|
-
* // import "@fontsource/myfont/800.css";
|
|
20
|
-
* // import "src/helpers/theme.css";
|
|
21
|
-
*
|
|
22
|
-
* const motion = () => import("@koine/react/m/max").then((m) => m.default);
|
|
23
|
-
*
|
|
24
|
-
* export default function App(props: NextAppProps) {
|
|
25
|
-
* return (
|
|
26
|
-
* <NextApp
|
|
27
|
-
* {...props}
|
|
28
|
-
* Layout={Layout}
|
|
29
|
-
* theme={theme}
|
|
30
|
-
* seo={{
|
|
31
|
-
* titleTemplate: "%s | MyApp",
|
|
32
|
-
* defaultTitle: "MyApp",
|
|
33
|
-
* openGraph: {
|
|
34
|
-
* type: "website",
|
|
35
|
-
* locale: "en_US",
|
|
36
|
-
* url: "https://myapp.com/",
|
|
37
|
-
* site_name: "MyApp",
|
|
38
|
-
* },
|
|
39
|
-
* twitter: {
|
|
40
|
-
* handle: "@MklrNl",
|
|
41
|
-
* site: "@MyApp",
|
|
42
|
-
* cardType: "summary_large_image",
|
|
43
|
-
* },
|
|
44
|
-
* }}
|
|
45
|
-
* pre={
|
|
46
|
-
* <>
|
|
47
|
-
* <AnalyticsGoogle id="UA-xxxxxxxx-x" />
|
|
48
|
-
* <Favicon name="MyApp" color="#000000" />
|
|
49
|
-
* </>
|
|
50
|
-
* }
|
|
51
|
-
* />
|
|
52
|
-
* );
|
|
53
|
-
* }
|
|
54
|
-
*
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
var NextApp = function (props) {
|
|
58
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (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)) }))] }));
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AppHead } from "../AppHead.js";
|
|
4
|
+
import { AppMain } from "./AppMain.js";
|
|
5
|
+
import { AppTheme } from "./AppTheme.js";
|
|
6
|
+
export var NextApp = function (props) {
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) }))] }));
|
|
59
8
|
};
|
|
60
|
-
|
|
61
|
-
exports.default = exports.NextApp;
|
|
9
|
+
export default NextApp;
|
package/12/app/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./AppHead";
|
|
2
|
-
export * from "./AppMain";
|
|
1
|
+
export * from "./AppHead.js";
|
|
2
|
+
export * from "./AppMain.js";
|
package/12/app/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./AppHead"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./AppMain"), exports);
|
|
1
|
+
export * from "./AppHead.js";
|
|
2
|
+
export * from "./AppMain.js";
|
package/12/app/sc/AppMain.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type { AppMainBaseProps, AppMainFramerProps } from "../AppMain";
|
|
1
|
+
import type { AppMainBaseProps, AppMainFramerProps } from "../AppMain.js";
|
|
2
2
|
export type AppMainProps = AppMainBaseProps & AppMainFramerProps;
|
|
3
|
-
/**
|
|
4
|
-
* App main
|
|
5
|
-
*
|
|
6
|
-
* It implies a setup for `styled-components` and `framer-motion` libraries.
|
|
7
|
-
*
|
|
8
|
-
* About the page transition [wallis' blog post](https://wallis.dev/blog/nextjs-page-transitions-with-framer-motion)
|
|
9
|
-
*/
|
|
10
3
|
export declare const AppMain: ({ Component, pageProps, Layout, ProgressOverlay, seo, motion, transition, pre, post, }: AppMainProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
4
|
export default AppMain;
|
package/12/app/sc/AppMain.js
CHANGED
|
@@ -1,29 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
var SeoDefaults_1 = require("../../SeoDefaults");
|
|
11
|
-
var NextProgress_1 = require("../../NextProgress");
|
|
12
|
-
/**
|
|
13
|
-
* App main
|
|
14
|
-
*
|
|
15
|
-
* It implies a setup for `styled-components` and `framer-motion` libraries.
|
|
16
|
-
*
|
|
17
|
-
* About the page transition [wallis' blog post](https://wallis.dev/blog/nextjs-page-transitions-with-framer-motion)
|
|
18
|
-
*/
|
|
19
|
-
var AppMain = function (_a) {
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { createElement as _createElement } from "react";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
import { AnimatePresence, m } from "framer-motion";
|
|
5
|
+
import { useRouter } from "next/router";
|
|
6
|
+
import { MotionProvider } from "@koine/react/m";
|
|
7
|
+
import { NextProgress } from "../../NextProgress.js";
|
|
8
|
+
import { SeoDefaults } from "../../SeoDefaults.js";
|
|
9
|
+
export var AppMain = function (_a) {
|
|
20
10
|
var Component = _a.Component, pageProps = _a.pageProps, Layout = _a.Layout, ProgressOverlay = _a.ProgressOverlay, seo = _a.seo, motion = _a.motion, _b = _a.transition, transition = _b === void 0 ? {
|
|
21
11
|
initial: { opacity: 0 },
|
|
22
12
|
animate: { opacity: 1 },
|
|
23
13
|
exit: { opacity: 0 },
|
|
24
14
|
} : _b, pre = _a.pre, post = _a.post;
|
|
25
|
-
var pathname =
|
|
26
|
-
return ((
|
|
15
|
+
var pathname = useRouter().pathname;
|
|
16
|
+
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] }));
|
|
27
17
|
};
|
|
28
|
-
|
|
29
|
-
exports.default = exports.AppMain;
|
|
18
|
+
export default AppMain;
|
package/12/app/sc/AppTheme.d.ts
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { type AppProps as NextAppProps } from "next/app";
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { Theme } from "@koine/react/sc";
|
|
4
4
|
export type AppThemeProps = React.PropsWithChildren<NextAppProps & {
|
|
5
|
-
/**
|
|
6
|
-
* A theme object
|
|
7
|
-
*/
|
|
8
5
|
theme: Theme;
|
|
9
6
|
}>;
|
|
10
|
-
/**
|
|
11
|
-
* App theme with `styled-components`
|
|
12
|
-
*/
|
|
13
7
|
export declare const AppTheme: ({ theme, children }: AppThemeProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
8
|
export default AppTheme;
|
package/12/app/sc/AppTheme.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
var styled_components_1 = require("styled-components");
|
|
6
|
-
var sc_1 = require("@koine/react/sc");
|
|
7
|
-
/**
|
|
8
|
-
* App theme with `styled-components`
|
|
9
|
-
*/
|
|
10
|
-
var AppTheme = function (_a) {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider } from "styled-components";
|
|
3
|
+
import { StylesGlobal } from "@koine/react/sc";
|
|
4
|
+
export var AppTheme = function (_a) {
|
|
11
5
|
var theme = _a.theme, children = _a.children;
|
|
12
|
-
return ((
|
|
6
|
+
return (_jsxs(ThemeProvider, { theme: theme, children: [_jsx(StylesGlobal, {}), children] }));
|
|
13
7
|
};
|
|
14
|
-
|
|
15
|
-
exports.default = exports.AppTheme;
|
|
8
|
+
export default AppTheme;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { AppProps } from "next/app";
|
|
2
|
-
import { type
|
|
3
|
-
import { type
|
|
2
|
+
import { type AppMainProps } from "../AppMain.js";
|
|
3
|
+
import { type AppThemeProps } from "../AppTheme.js";
|
|
4
4
|
export type NextAppProps = AppProps<{
|
|
5
5
|
session: any;
|
|
6
6
|
}> & AppThemeProps & AppMainProps;
|
|
7
|
-
/**
|
|
8
|
-
* App with authentication provided by `next-auth`
|
|
9
|
-
*/
|
|
10
7
|
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
8
|
export default NextApp;
|
package/12/app/sc/auth/index.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var AppMain_1 = require("../AppMain");
|
|
10
|
-
/**
|
|
11
|
-
* App with authentication provided by `next-auth`
|
|
12
|
-
*/
|
|
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, { 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)) })) })] }));
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { SessionProvider } from "next-auth/react";
|
|
4
|
+
import { AppHead } from "../../AppHead.js";
|
|
5
|
+
import { AppMain } from "../AppMain.js";
|
|
6
|
+
import { AppTheme } from "../AppTheme.js";
|
|
7
|
+
export var NextApp = function (props) {
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, { session: props.pageProps.session, children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) })] }));
|
|
15
9
|
};
|
|
16
|
-
|
|
17
|
-
exports.default = exports.NextApp;
|
|
10
|
+
export default NextApp;
|
package/12/app/sc/index.d.ts
CHANGED
|
@@ -1,56 +1,6 @@
|
|
|
1
1
|
import type { AppProps } from "next/app";
|
|
2
|
-
import { type
|
|
3
|
-
import { type
|
|
2
|
+
import { type AppMainProps } from "./AppMain.js";
|
|
3
|
+
import { type AppThemeProps } from "./AppTheme.js";
|
|
4
4
|
export type NextAppProps = AppProps & AppThemeProps & AppMainProps;
|
|
5
|
-
/**
|
|
6
|
-
* App
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
*
|
|
10
|
-
* ```tsx
|
|
11
|
-
* import { NextApp, NextAppProps } from "@koine/next/app/sc/auth";
|
|
12
|
-
* import { Favicon, AnalyticsGoogle } from "@koine/next";
|
|
13
|
-
* import { theme } from "src/helpers/theme";
|
|
14
|
-
* import { Layout, ProgressOverlay } from "src/components/Layout";
|
|
15
|
-
* // import "@fontsource/myfont/800.css";
|
|
16
|
-
* // import "src/helpers/theme.css";
|
|
17
|
-
*
|
|
18
|
-
* const motion = () => import("@koine/react/m/max").then((m) => m.default);
|
|
19
|
-
*
|
|
20
|
-
* export default function App(props: NextAppProps) {
|
|
21
|
-
* return (
|
|
22
|
-
* <NextApp
|
|
23
|
-
* {...props}
|
|
24
|
-
* Layout={Layout}
|
|
25
|
-
* ProgressOverlay={ProgressOverlay}
|
|
26
|
-
* theme={theme}
|
|
27
|
-
* motion={motion}
|
|
28
|
-
* seo={{
|
|
29
|
-
* titleTemplate: "%s | MyApp",
|
|
30
|
-
* defaultTitle: "MyApp",
|
|
31
|
-
* openGraph: {
|
|
32
|
-
* type: "website",
|
|
33
|
-
* locale: "en_US",
|
|
34
|
-
* url: "https://myapp.com/",
|
|
35
|
-
* site_name: "MyApp",
|
|
36
|
-
* },
|
|
37
|
-
* twitter: {
|
|
38
|
-
* handle: "@MklrNl",
|
|
39
|
-
* site: "@MyApp",
|
|
40
|
-
* cardType: "summary_large_image",
|
|
41
|
-
* },
|
|
42
|
-
* }}
|
|
43
|
-
* pre={
|
|
44
|
-
* <>
|
|
45
|
-
* <AnalyticsGoogle id="UA-xxxxxxxx-x" />
|
|
46
|
-
* <Favicon name="MyApp" color="#000000" />
|
|
47
|
-
* </>
|
|
48
|
-
* }
|
|
49
|
-
* />
|
|
50
|
-
* );
|
|
51
|
-
* }
|
|
52
|
-
*
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
5
|
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
6
|
export default NextApp;
|
package/12/app/sc/index.js
CHANGED
|
@@ -1,63 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var AppMain_1 = require("./AppMain");
|
|
9
|
-
/**
|
|
10
|
-
* App
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
*
|
|
14
|
-
* ```tsx
|
|
15
|
-
* import { NextApp, NextAppProps } from "@koine/next/app/sc/auth";
|
|
16
|
-
* import { Favicon, AnalyticsGoogle } from "@koine/next";
|
|
17
|
-
* import { theme } from "src/helpers/theme";
|
|
18
|
-
* import { Layout, ProgressOverlay } from "src/components/Layout";
|
|
19
|
-
* // import "@fontsource/myfont/800.css";
|
|
20
|
-
* // import "src/helpers/theme.css";
|
|
21
|
-
*
|
|
22
|
-
* const motion = () => import("@koine/react/m/max").then((m) => m.default);
|
|
23
|
-
*
|
|
24
|
-
* export default function App(props: NextAppProps) {
|
|
25
|
-
* return (
|
|
26
|
-
* <NextApp
|
|
27
|
-
* {...props}
|
|
28
|
-
* Layout={Layout}
|
|
29
|
-
* ProgressOverlay={ProgressOverlay}
|
|
30
|
-
* theme={theme}
|
|
31
|
-
* motion={motion}
|
|
32
|
-
* seo={{
|
|
33
|
-
* titleTemplate: "%s | MyApp",
|
|
34
|
-
* defaultTitle: "MyApp",
|
|
35
|
-
* openGraph: {
|
|
36
|
-
* type: "website",
|
|
37
|
-
* locale: "en_US",
|
|
38
|
-
* url: "https://myapp.com/",
|
|
39
|
-
* site_name: "MyApp",
|
|
40
|
-
* },
|
|
41
|
-
* twitter: {
|
|
42
|
-
* handle: "@MklrNl",
|
|
43
|
-
* site: "@MyApp",
|
|
44
|
-
* cardType: "summary_large_image",
|
|
45
|
-
* },
|
|
46
|
-
* }}
|
|
47
|
-
* pre={
|
|
48
|
-
* <>
|
|
49
|
-
* <AnalyticsGoogle id="UA-xxxxxxxx-x" />
|
|
50
|
-
* <Favicon name="MyApp" color="#000000" />
|
|
51
|
-
* </>
|
|
52
|
-
* }
|
|
53
|
-
* />
|
|
54
|
-
* );
|
|
55
|
-
* }
|
|
56
|
-
*
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
var NextApp = function (props) {
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(AppHead_1.AppHead, {}), (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)) }))] }));
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AppHead } from "../AppHead.js";
|
|
4
|
+
import { AppMain } from "./AppMain.js";
|
|
5
|
+
import { AppTheme } from "./AppTheme.js";
|
|
6
|
+
export var NextApp = function (props) {
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) }))] }));
|
|
61
8
|
};
|
|
62
|
-
|
|
63
|
-
exports.default = exports.NextApp;
|
|
9
|
+
export default NextApp;
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import NextDocument from "next/document";
|
|
2
|
-
/**
|
|
3
|
-
* Next Document wrapper for bare projects
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
*
|
|
7
|
-
* in your `myapp/pages/_document.tsx`:
|
|
8
|
-
* ```tsx
|
|
9
|
-
* export { Document as default } from "@koine/next/document";
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
2
|
export declare class Document extends NextDocument {
|
|
13
3
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
14
4
|
}
|
package/12/document/Document.js
CHANGED
|
@@ -1,31 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var NoJs_1 = tslib_1.__importDefault(require("@koine/react/NoJs"));
|
|
9
|
-
/**
|
|
10
|
-
* Next Document wrapper for bare projects
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
*
|
|
14
|
-
* in your `myapp/pages/_document.tsx`:
|
|
15
|
-
* ```tsx
|
|
16
|
-
* export { Document as default } from "@koine/next/document";
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
var Document = /** @class */ (function (_super) {
|
|
20
|
-
tslib_1.__extends(Document, _super);
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import NextDocument, { Head, Html, Main, NextScript } from "next/document";
|
|
4
|
+
import Meta from "@koine/react/Meta";
|
|
5
|
+
import NoJs from "@koine/react/NoJs";
|
|
6
|
+
var Document = (function (_super) {
|
|
7
|
+
__extends(Document, _super);
|
|
21
8
|
function Document() {
|
|
22
9
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
23
10
|
}
|
|
24
11
|
Document.prototype.render = function () {
|
|
25
12
|
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
26
|
-
return ((
|
|
13
|
+
return (_jsxs(Html, { lang: locale || defaultLocale, className: "no-js", children: [_jsxs(Head, { children: [_jsx(Meta, {}), _jsx(NoJs, {})] }), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] }));
|
|
27
14
|
};
|
|
28
15
|
return Document;
|
|
29
|
-
}(
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
}(NextDocument));
|
|
17
|
+
export { Document };
|
|
18
|
+
export default Document;
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import NextDocument from "next/document";
|
|
2
|
-
/**
|
|
3
|
-
* Next Document wrapper for `css/tailwind` based projects
|
|
4
|
-
*
|
|
5
|
-
* Uses cookie to manage the current theme
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
*
|
|
9
|
-
* in your `myapp/pages/_document.tsx`:
|
|
10
|
-
* ```tsx
|
|
11
|
-
* export { Document as default } from "@koine/next/document/css";
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
2
|
export declare class Document extends NextDocument {
|
|
15
3
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
16
4
|
}
|
package/12/document/css/index.js
CHANGED
|
@@ -1,45 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var NoJs_1 = tslib_1.__importDefault(require("@koine/react/NoJs"));
|
|
9
|
-
// import { getInitialThemeFromRequest, ThemeVanillaValue } from "@koine/react/sc"; // FIXME: this should be imported from another entrypoint
|
|
10
|
-
/**
|
|
11
|
-
* Next Document wrapper for `css/tailwind` based projects
|
|
12
|
-
*
|
|
13
|
-
* Uses cookie to manage the current theme
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
*
|
|
17
|
-
* in your `myapp/pages/_document.tsx`:
|
|
18
|
-
* ```tsx
|
|
19
|
-
* export { Document as default } from "@koine/next/document/css";
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
var Document = /** @class */ (function (_super) {
|
|
23
|
-
tslib_1.__extends(Document, _super);
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import NextDocument, { Head, Html, Main, NextScript, } from "next/document";
|
|
4
|
+
import Meta from "@koine/react/Meta";
|
|
5
|
+
import NoJs from "@koine/react/NoJs";
|
|
6
|
+
var Document = (function (_super) {
|
|
7
|
+
__extends(Document, _super);
|
|
24
8
|
function Document() {
|
|
25
9
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
10
|
}
|
|
27
|
-
// static override async getInitialProps(
|
|
28
|
-
// ctx: DocumentContext
|
|
29
|
-
// ): Promise<DocumentInitialProps & { theme: ThemeVanillaValue }> {
|
|
30
|
-
// const initialProps = await NextDocument.getInitialProps(ctx);
|
|
31
|
-
// return {
|
|
32
|
-
// ...initialProps,
|
|
33
|
-
// theme: getInitialThemeFromRequest(
|
|
34
|
-
// ctx.req?.headers.cookie /* || document?.cookie */ || ""
|
|
35
|
-
// ),
|
|
36
|
-
// };
|
|
37
|
-
// }
|
|
38
11
|
Document.prototype.render = function () {
|
|
39
12
|
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
40
|
-
return ((
|
|
13
|
+
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
14
|
};
|
|
42
15
|
return Document;
|
|
43
|
-
}(
|
|
44
|
-
|
|
45
|
-
|
|
16
|
+
}(NextDocument));
|
|
17
|
+
export { Document };
|
|
18
|
+
export default Document;
|
package/12/document/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Document } from "./Document";
|
|
2
|
-
export { Document as default } from "./Document";
|
|
1
|
+
export { Document } from "./Document.js";
|
|
2
|
+
export { Document as default } from "./Document.js";
|
package/12/document/index.js
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.default = exports.Document = void 0;
|
|
4
|
-
var Document_1 = require("./Document");
|
|
5
|
-
Object.defineProperty(exports, "Document", { enumerable: true, get: function () { return Document_1.Document; } });
|
|
6
|
-
var Document_2 = require("./Document");
|
|
7
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return Document_2.Document; } });
|
|
1
|
+
export { Document } from "./Document.js";
|
|
2
|
+
export { Document as default } from "./Document.js";
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import NextDocument, { DocumentContext, type DocumentInitialProps } from "next/document";
|
|
2
|
-
/**
|
|
3
|
-
* Next Document wrapper for `styled-components` based projects
|
|
4
|
-
*
|
|
5
|
-
* For typescript safety of this component
|
|
6
|
-
* @see https://bit.ly/3ceuF8m
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
*
|
|
10
|
-
* in your `myapp/pages/_document.tsx`:
|
|
11
|
-
* ```tsx
|
|
12
|
-
* export { Document as default } from "@koine/next/document/sc";
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
2
|
export declare class Document extends NextDocument {
|
|
16
3
|
static getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps>;
|
|
17
4
|
render(): import("react/jsx-runtime").JSX.Element;
|