@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
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AppProps } from "next/app";
|
|
2
|
-
import { type AppThemeProps } from "../AppTheme";
|
|
3
|
-
import { type AppMainProps } from "../AppMain";
|
|
4
|
-
export type NextAppProps = AppProps<{
|
|
5
|
-
session: any;
|
|
6
|
-
}> & AppThemeProps & AppMainProps;
|
|
7
|
-
/**
|
|
8
|
-
* App with authentication provided by `next-auth`
|
|
9
|
-
*/
|
|
10
|
-
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default NextApp;
|
package/12/app/css/auth/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NextApp = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 = require("next-auth/react");
|
|
7
|
-
var AppHead_1 = require("../../AppHead");
|
|
8
|
-
var AppTheme_1 = require("../AppTheme");
|
|
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)) })) })] }));
|
|
15
|
-
};
|
|
16
|
-
exports.NextApp = NextApp;
|
|
17
|
-
exports.default = exports.NextApp;
|
|
@@ -1,13 +0,0 @@
|
|
|
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";
|
|
5
|
-
import { AppTheme } from "../AppTheme";
|
|
6
|
-
import { AppMain } from "../AppMain";
|
|
7
|
-
/**
|
|
8
|
-
* App with authentication provided by `next-auth`
|
|
9
|
-
*/
|
|
10
|
-
export var NextApp = function (props) {
|
|
11
|
-
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, { session: props.pageProps.session, children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) })] }));
|
|
12
|
-
};
|
|
13
|
-
export default NextApp;
|
package/12/app/css/index.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { AppProps } from "next/app";
|
|
2
|
-
import { type AppThemeProps } from "./AppTheme";
|
|
3
|
-
import { type AppMainProps } from "./AppMain";
|
|
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
|
-
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
export default NextApp;
|
package/12/app/css/index.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NextApp = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var AppHead_1 = require("../AppHead");
|
|
7
|
-
var AppTheme_1 = require("./AppTheme");
|
|
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)) }))] }));
|
|
59
|
-
};
|
|
60
|
-
exports.NextApp = NextApp;
|
|
61
|
-
exports.default = exports.NextApp;
|
package/12/app/css/index.mjs
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
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";
|
|
4
|
-
import { AppTheme } from "./AppTheme";
|
|
5
|
-
import { AppMain } from "./AppMain";
|
|
6
|
-
/**
|
|
7
|
-
* App
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
*
|
|
11
|
-
* ```tsx
|
|
12
|
-
* import { NextApp, NextAppProps } from "@koine/next/app/css/auth";
|
|
13
|
-
* import { Favicon, AnalyticsGoogle } from "@koine/next";
|
|
14
|
-
* import { theme } from "src/helpers/theme";
|
|
15
|
-
* import { Layout } from "src/components/Layout";
|
|
16
|
-
* // import "@fontsource/myfont/800.css";
|
|
17
|
-
* // import "src/helpers/theme.css";
|
|
18
|
-
*
|
|
19
|
-
* const motion = () => import("@koine/react/m/max").then((m) => m.default);
|
|
20
|
-
*
|
|
21
|
-
* export default function App(props: NextAppProps) {
|
|
22
|
-
* return (
|
|
23
|
-
* <NextApp
|
|
24
|
-
* {...props}
|
|
25
|
-
* Layout={Layout}
|
|
26
|
-
* theme={theme}
|
|
27
|
-
* seo={{
|
|
28
|
-
* titleTemplate: "%s | MyApp",
|
|
29
|
-
* defaultTitle: "MyApp",
|
|
30
|
-
* openGraph: {
|
|
31
|
-
* type: "website",
|
|
32
|
-
* locale: "en_US",
|
|
33
|
-
* url: "https://myapp.com/",
|
|
34
|
-
* site_name: "MyApp",
|
|
35
|
-
* },
|
|
36
|
-
* twitter: {
|
|
37
|
-
* handle: "@MklrNl",
|
|
38
|
-
* site: "@MyApp",
|
|
39
|
-
* cardType: "summary_large_image",
|
|
40
|
-
* },
|
|
41
|
-
* }}
|
|
42
|
-
* pre={
|
|
43
|
-
* <>
|
|
44
|
-
* <AnalyticsGoogle id="UA-xxxxxxxx-x" />
|
|
45
|
-
* <Favicon name="MyApp" color="#000000" />
|
|
46
|
-
* </>
|
|
47
|
-
* }
|
|
48
|
-
* />
|
|
49
|
-
* );
|
|
50
|
-
* }
|
|
51
|
-
*
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export var NextApp = function (props) {
|
|
55
|
-
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) }))] }));
|
|
56
|
-
};
|
|
57
|
-
export default NextApp;
|
package/12/app/css/package.json
DELETED
package/12/app/index.d.ts
DELETED
package/12/app/index.js
DELETED
package/12/app/index.mjs
DELETED
package/12/app/package.json
DELETED
package/12/app/sc/AppMain.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AppMainBaseProps, AppMainFramerProps } from "../AppMain";
|
|
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
|
-
export declare const AppMain: ({ Component, pageProps, Layout, ProgressOverlay, seo, motion, transition, pre, post, }: AppMainProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default AppMain;
|
package/12/app/sc/AppMain.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppMain = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var react_1 = require("react");
|
|
6
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
var router_1 = require("next/router");
|
|
8
|
-
var framer_motion_1 = require("framer-motion");
|
|
9
|
-
var m_1 = require("@koine/react/m");
|
|
10
|
-
var SeoDefaults_1 = require("../../SeoDefaults");
|
|
11
|
-
var NextProgress_1 = require("../../NextProgress");
|
|
12
|
-
/**
|
|
13
|
-
* App main
|
|
14
|
-
*
|
|
15
|
-
* It implies a setup for `styled-components` and `framer-motion` libraries.
|
|
16
|
-
*
|
|
17
|
-
* About the page transition [wallis' blog post](https://wallis.dev/blog/nextjs-page-transitions-with-framer-motion)
|
|
18
|
-
*/
|
|
19
|
-
var AppMain = function (_a) {
|
|
20
|
-
var Component = _a.Component, pageProps = _a.pageProps, Layout = _a.Layout, ProgressOverlay = _a.ProgressOverlay, seo = _a.seo, motion = _a.motion, _b = _a.transition, transition = _b === void 0 ? {
|
|
21
|
-
initial: { opacity: 0 },
|
|
22
|
-
animate: { opacity: 1 },
|
|
23
|
-
exit: { opacity: 0 },
|
|
24
|
-
} : _b, pre = _a.pre, post = _a.post;
|
|
25
|
-
var pathname = (0, router_1.useRouter)().pathname;
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SeoDefaults_1.SeoDefaults, tslib_1.__assign({}, seo)), pre, (0, jsx_runtime_1.jsxs)(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
|
-
};
|
|
28
|
-
exports.AppMain = AppMain;
|
|
29
|
-
exports.default = exports.AppMain;
|
package/12/app/sc/AppMain.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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 { useRouter } from "next/router";
|
|
5
|
-
import { AnimatePresence, m } from "framer-motion";
|
|
6
|
-
import { MotionProvider } from "@koine/react/m";
|
|
7
|
-
import { SeoDefaults } from "../../SeoDefaults";
|
|
8
|
-
import { NextProgress } from "../../NextProgress";
|
|
9
|
-
/**
|
|
10
|
-
* App main
|
|
11
|
-
*
|
|
12
|
-
* It implies a setup for `styled-components` and `framer-motion` libraries.
|
|
13
|
-
*
|
|
14
|
-
* About the page transition [wallis' blog post](https://wallis.dev/blog/nextjs-page-transitions-with-framer-motion)
|
|
15
|
-
*/
|
|
16
|
-
export var AppMain = function (_a) {
|
|
17
|
-
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 ? {
|
|
18
|
-
initial: { opacity: 0 },
|
|
19
|
-
animate: { opacity: 1 },
|
|
20
|
-
exit: { opacity: 0 },
|
|
21
|
-
} : _b, pre = _a.pre, post = _a.post;
|
|
22
|
-
var pathname = useRouter().pathname;
|
|
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
|
-
};
|
|
25
|
-
export default AppMain;
|
package/12/app/sc/AppTheme.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type AppProps as NextAppProps } from "next/app";
|
|
3
|
-
import { Theme } from "@koine/react/sc";
|
|
4
|
-
export type AppThemeProps = React.PropsWithChildren<NextAppProps & {
|
|
5
|
-
/**
|
|
6
|
-
* A theme object
|
|
7
|
-
*/
|
|
8
|
-
theme: Theme;
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* App theme with `styled-components`
|
|
12
|
-
*/
|
|
13
|
-
export declare const AppTheme: ({ theme, children }: AppThemeProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export default AppTheme;
|
package/12/app/sc/AppTheme.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppTheme = void 0;
|
|
4
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
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) {
|
|
11
|
-
var theme = _a.theme, children = _a.children;
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)(styled_components_1.ThemeProvider, { theme: theme, children: [(0, jsx_runtime_1.jsx)(sc_1.StylesGlobal, {}), children] }));
|
|
13
|
-
};
|
|
14
|
-
exports.AppTheme = AppTheme;
|
|
15
|
-
exports.default = exports.AppTheme;
|
package/12/app/sc/AppTheme.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
/**
|
|
5
|
-
* App theme with `styled-components`
|
|
6
|
-
*/
|
|
7
|
-
export var AppTheme = function (_a) {
|
|
8
|
-
var theme = _a.theme, children = _a.children;
|
|
9
|
-
return (_jsxs(ThemeProvider, { theme: theme, children: [_jsx(StylesGlobal, {}), children] }));
|
|
10
|
-
};
|
|
11
|
-
export default AppTheme;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AppProps } from "next/app";
|
|
2
|
-
import { type AppThemeProps } from "../AppTheme";
|
|
3
|
-
import { type AppMainProps } from "../AppMain";
|
|
4
|
-
export type NextAppProps = AppProps<{
|
|
5
|
-
session: any;
|
|
6
|
-
}> & AppThemeProps & AppMainProps;
|
|
7
|
-
/**
|
|
8
|
-
* App with authentication provided by `next-auth`
|
|
9
|
-
*/
|
|
10
|
-
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default NextApp;
|
package/12/app/sc/auth/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NextApp = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var react_1 = require("next-auth/react");
|
|
7
|
-
var AppHead_1 = require("../../AppHead");
|
|
8
|
-
var AppTheme_1 = require("../AppTheme");
|
|
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)) })) })] }));
|
|
15
|
-
};
|
|
16
|
-
exports.NextApp = NextApp;
|
|
17
|
-
exports.default = exports.NextApp;
|
package/12/app/sc/auth/index.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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";
|
|
5
|
-
import { AppTheme } from "../AppTheme";
|
|
6
|
-
import { AppMain } from "../AppMain";
|
|
7
|
-
/**
|
|
8
|
-
* App with authentication provided by `next-auth`
|
|
9
|
-
*/
|
|
10
|
-
export var NextApp = function (props) {
|
|
11
|
-
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(SessionProvider, { session: props.pageProps.session, children: _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) })) })] }));
|
|
12
|
-
};
|
|
13
|
-
export default NextApp;
|
package/12/app/sc/index.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { AppProps } from "next/app";
|
|
2
|
-
import { type AppThemeProps } from "./AppTheme";
|
|
3
|
-
import { type AppMainProps } from "./AppMain";
|
|
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
|
-
export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
export default NextApp;
|
package/12/app/sc/index.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NextApp = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var AppHead_1 = require("../AppHead");
|
|
7
|
-
var AppTheme_1 = require("./AppTheme");
|
|
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)) }))] }));
|
|
61
|
-
};
|
|
62
|
-
exports.NextApp = NextApp;
|
|
63
|
-
exports.default = exports.NextApp;
|
package/12/app/sc/index.mjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
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";
|
|
4
|
-
import { AppTheme } from "./AppTheme";
|
|
5
|
-
import { AppMain } from "./AppMain";
|
|
6
|
-
/**
|
|
7
|
-
* App
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
*
|
|
11
|
-
* ```tsx
|
|
12
|
-
* import { NextApp, NextAppProps } from "@koine/next/app/sc/auth";
|
|
13
|
-
* import { Favicon, AnalyticsGoogle } from "@koine/next";
|
|
14
|
-
* import { theme } from "src/helpers/theme";
|
|
15
|
-
* import { Layout, ProgressOverlay } from "src/components/Layout";
|
|
16
|
-
* // import "@fontsource/myfont/800.css";
|
|
17
|
-
* // import "src/helpers/theme.css";
|
|
18
|
-
*
|
|
19
|
-
* const motion = () => import("@koine/react/m/max").then((m) => m.default);
|
|
20
|
-
*
|
|
21
|
-
* export default function App(props: NextAppProps) {
|
|
22
|
-
* return (
|
|
23
|
-
* <NextApp
|
|
24
|
-
* {...props}
|
|
25
|
-
* Layout={Layout}
|
|
26
|
-
* ProgressOverlay={ProgressOverlay}
|
|
27
|
-
* theme={theme}
|
|
28
|
-
* motion={motion}
|
|
29
|
-
* seo={{
|
|
30
|
-
* titleTemplate: "%s | MyApp",
|
|
31
|
-
* defaultTitle: "MyApp",
|
|
32
|
-
* openGraph: {
|
|
33
|
-
* type: "website",
|
|
34
|
-
* locale: "en_US",
|
|
35
|
-
* url: "https://myapp.com/",
|
|
36
|
-
* site_name: "MyApp",
|
|
37
|
-
* },
|
|
38
|
-
* twitter: {
|
|
39
|
-
* handle: "@MklrNl",
|
|
40
|
-
* site: "@MyApp",
|
|
41
|
-
* cardType: "summary_large_image",
|
|
42
|
-
* },
|
|
43
|
-
* }}
|
|
44
|
-
* pre={
|
|
45
|
-
* <>
|
|
46
|
-
* <AnalyticsGoogle id="UA-xxxxxxxx-x" />
|
|
47
|
-
* <Favicon name="MyApp" color="#000000" />
|
|
48
|
-
* </>
|
|
49
|
-
* }
|
|
50
|
-
* />
|
|
51
|
-
* );
|
|
52
|
-
* }
|
|
53
|
-
*
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
export var NextApp = function (props) {
|
|
57
|
-
return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) }))] }));
|
|
58
|
-
};
|
|
59
|
-
export default NextApp;
|
package/12/app/sc/package.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
export declare class Document extends NextDocument {
|
|
13
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
}
|
|
15
|
-
export default Document;
|
package/12/document/Document.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Document = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var document_1 = tslib_1.__importStar(require("next/document"));
|
|
7
|
-
var Meta_1 = tslib_1.__importDefault(require("@koine/react/Meta"));
|
|
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);
|
|
21
|
-
function Document() {
|
|
22
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
23
|
-
}
|
|
24
|
-
Document.prototype.render = function () {
|
|
25
|
-
var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
|
|
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
|
-
};
|
|
28
|
-
return Document;
|
|
29
|
-
}(document_1.default));
|
|
30
|
-
exports.Document = Document;
|
|
31
|
-
exports.default = Document;
|