@koine/next 2.0.0-beta.2 → 2.0.0-beta.4
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.js +65 -25
- package/12/AnalyticsGoogle.mjs +41 -15
- package/12/DisableErrorOverlay.js +29 -16
- package/12/DisableErrorOverlay.mjs +8 -5
- package/12/DynamicNamespaces.d.ts +1 -1
- package/12/DynamicNamespaces.js +22 -12
- package/12/DynamicNamespaces.mjs +1 -2
- package/12/Favicon.js +28 -9
- package/12/Favicon.mjs +6 -2
- package/12/Link.d.ts +1 -1
- package/12/Link.js +36 -13
- package/12/Link.mjs +14 -6
- package/12/NextProgress.js +47 -24
- package/12/NextProgress.mjs +26 -17
- package/12/Seo.d.ts +1 -1
- package/12/Seo.js +27 -32
- package/12/Seo.mjs +5 -4
- package/12/SeoDefaults.d.ts +1 -1
- package/12/SeoDefaults.js +27 -13
- package/12/SeoDefaults.mjs +5 -3
- package/12/T.d.ts +1 -1
- package/12/T.js +42 -16
- package/12/T.mjs +20 -6
- package/12/ThemeContext.js +22 -7
- package/12/ThemeContext.mjs +3 -3
- package/12/ThemeProvider.js +164 -147
- package/12/ThemeProvider.mjs +139 -129
- package/12/TransText.js +22 -7
- package/12/TransText.mjs +1 -1
- package/12/app/AppHead.js +29 -9
- package/12/app/AppHead.mjs +8 -2
- package/12/app/AppMain.d.ts +4 -4
- package/12/app/AppMain.js +5 -1
- package/12/app/AppMain.mjs +1 -1
- package/12/app/css/AppMain.js +37 -16
- package/12/app/css/AppMain.mjs +15 -5
- package/12/app/css/AppTheme.d.ts +1 -1
- package/12/app/css/AppTheme.js +28 -13
- package/12/app/css/AppTheme.mjs +7 -4
- package/12/app/css/auth/index.d.ts +1 -1
- package/12/app/css/auth/index.js +38 -15
- package/12/app/css/auth/index.mjs +17 -6
- package/12/app/css/index.d.ts +1 -1
- package/12/app/css/index.js +34 -59
- package/12/app/css/index.mjs +14 -6
- package/12/app/index.js +6 -4
- package/12/app/sc/AppMain.js +68 -27
- package/12/app/sc/AppMain.mjs +46 -13
- package/12/app/sc/AppTheme.d.ts +1 -1
- package/12/app/sc/AppTheme.js +31 -13
- package/12/app/sc/AppTheme.mjs +9 -4
- package/12/app/sc/auth/index.d.ts +1 -1
- package/12/app/sc/auth/index.js +38 -15
- package/12/app/sc/auth/index.mjs +17 -6
- package/12/app/sc/index.d.ts +1 -1
- package/12/app/sc/index.js +34 -61
- package/12/app/sc/index.mjs +14 -6
- package/12/document/Document.js +47 -29
- package/12/document/Document.mjs +24 -14
- package/12/document/css/index.js +47 -32
- package/12/document/css/index.mjs +26 -18
- package/12/document/index.js +18 -6
- package/12/document/sc/index.js +71 -65
- package/12/document/sc/index.mjs +46 -45
- package/12/getT.js +22 -13
- package/12/getT.mjs +2 -4
- package/12/index.js +99 -51
- package/12/index.mjs +2 -2
- package/12/seoBuildTags.js +81 -76
- package/12/seoBuildTags.mjs +59 -55
- package/12/to.js +21 -19
- package/12/to.mjs +4 -10
- package/12/translationAsOptions.js +15 -9
- package/12/translationAsOptions.mjs +6 -6
- package/12/types-i18n.js +4 -3
- package/12/types-i18n.mjs +1 -2
- package/12/types-seo.js +3 -1
- package/12/types-seo.mjs +1 -1
- package/12/useBackUrl.js +30 -16
- package/12/useBackUrl.mjs +8 -8
- package/12/useDateFormat.js +37 -38
- package/12/useDateFormat.mjs +15 -28
- package/12/useForm.d.ts +1 -1
- package/12/useForm.js +46 -20
- package/12/useForm.mjs +25 -13
- package/12/useLocale.js +22 -8
- package/12/useT.d.ts +1 -1
- package/12/useT.js +53 -39
- package/12/useT.mjs +32 -14
- package/12/useTheme.js +22 -11
- package/12/useTheme.mjs +1 -2
- package/12/useTo.js +23 -16
- package/12/useTo.mjs +3 -10
- package/README.md +1 -1
- package/config/index.js +225 -251
- package/config/index.mjs +187 -204
- package/getSiteUrl.js +22 -15
- package/getSiteUrl.mjs +2 -4
- package/index.js +19 -6
- package/load.js +21 -8
- package/load.mjs +3 -4
- package/package.json +19 -17
- package/12/app/css/auth/package.json +0 -6
- package/12/app/css/package.json +0 -6
- package/12/app/package.json +0 -6
- package/12/app/sc/auth/package.json +0 -6
- package/12/app/sc/package.json +0 -6
- package/12/document/css/package.json +0 -6
- package/12/document/package.json +0 -6
- package/12/document/sc/package.json +0 -6
- package/12/package.json +0 -6
- package/config/package.json +0 -6
package/12/app/css/AppTheme.mjs
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
2
3
|
// import { ThemeVanillaProvider, ThemeVanillaValue } from "@koine/react/styles";
|
|
3
4
|
import { ThemeProvider } from "../../ThemeProvider";
|
|
4
5
|
/**
|
|
5
6
|
* App theme with vanilla class based theme (good for `tailwindcss`)
|
|
6
|
-
*/
|
|
7
|
-
export var AppTheme = function (_a) {
|
|
8
|
-
var theme = _a.theme, children = _a.children;
|
|
7
|
+
*/ export const AppTheme = ({ theme, children })=>{
|
|
9
8
|
// return (
|
|
10
9
|
// <ThemeVanillaProvider initialTheme={theme}>{children}</ThemeVanillaProvider>
|
|
11
10
|
// );
|
|
12
|
-
return
|
|
11
|
+
return /*#__PURE__*/ _jsx(ThemeProvider, {
|
|
12
|
+
defaultTheme: theme,
|
|
13
|
+
attribute: "class",
|
|
14
|
+
children: children
|
|
15
|
+
});
|
|
13
16
|
};
|
|
14
17
|
export default AppTheme;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AppProps } from "next/app";
|
|
2
|
-
import { type AppThemeProps } from "../AppTheme";
|
|
3
2
|
import { type AppMainProps } from "../AppMain";
|
|
3
|
+
import { type AppThemeProps } from "../AppTheme";
|
|
4
4
|
export type NextAppProps = AppProps<{
|
|
5
5
|
session: any;
|
|
6
6
|
}> & AppThemeProps & AppMainProps;
|
package/12/app/css/auth/index.js
CHANGED
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
NextApp: function() {
|
|
13
|
+
return NextApp;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
+
const _react = require("next-auth/react");
|
|
21
|
+
const _AppHead = require("../../AppHead");
|
|
22
|
+
const _AppMain = require("../AppMain");
|
|
23
|
+
const _AppTheme = require("../AppTheme");
|
|
24
|
+
const NextApp = (props)=>{
|
|
25
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_AppHead.AppHead, {}),
|
|
28
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_react.SessionProvider, {
|
|
29
|
+
session: props.pageProps.session,
|
|
30
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_AppTheme.AppTheme, {
|
|
31
|
+
...props,
|
|
32
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_AppMain.AppMain, {
|
|
33
|
+
...props
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
});
|
|
15
39
|
};
|
|
16
|
-
|
|
17
|
-
exports.default = exports.NextApp;
|
|
40
|
+
const _default = NextApp;
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
2
|
import { SessionProvider } from "next-auth/react";
|
|
4
3
|
import { AppHead } from "../../AppHead";
|
|
5
|
-
import { AppTheme } from "../AppTheme";
|
|
6
4
|
import { AppMain } from "../AppMain";
|
|
5
|
+
import { AppTheme } from "../AppTheme";
|
|
7
6
|
/**
|
|
8
7
|
* App with authentication provided by `next-auth`
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
*/ export const NextApp = (props)=>{
|
|
9
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(AppHead, {}),
|
|
12
|
+
/*#__PURE__*/ _jsx(SessionProvider, {
|
|
13
|
+
session: props.pageProps.session,
|
|
14
|
+
children: /*#__PURE__*/ _jsx(AppTheme, {
|
|
15
|
+
...props,
|
|
16
|
+
children: /*#__PURE__*/ _jsx(AppMain, {
|
|
17
|
+
...props
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
});
|
|
12
23
|
};
|
|
13
24
|
export default NextApp;
|
package/12/app/css/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppProps } from "next/app";
|
|
2
|
-
import { type AppThemeProps } from "./AppTheme";
|
|
3
2
|
import { type AppMainProps } from "./AppMain";
|
|
3
|
+
import { type AppThemeProps } from "./AppTheme";
|
|
4
4
|
export type NextAppProps = AppProps & AppThemeProps & AppMainProps;
|
|
5
5
|
/**
|
|
6
6
|
* App
|
package/12/app/css/index.js
CHANGED
|
@@ -1,61 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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)) }))] }));
|
|
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
|
+
NextApp: function() {
|
|
13
|
+
return NextApp;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
+
const _AppHead = require("../AppHead");
|
|
21
|
+
const _AppMain = require("./AppMain");
|
|
22
|
+
const _AppTheme = require("./AppTheme");
|
|
23
|
+
const NextApp = (props)=>{
|
|
24
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_AppHead.AppHead, {}),
|
|
27
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_AppTheme.AppTheme, {
|
|
28
|
+
...props,
|
|
29
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_AppMain.AppMain, {
|
|
30
|
+
...props
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
59
35
|
};
|
|
60
|
-
|
|
61
|
-
exports.default = exports.NextApp;
|
|
36
|
+
const _default = NextApp;
|
package/12/app/css/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
2
|
import { AppHead } from "../AppHead";
|
|
4
|
-
import { AppTheme } from "./AppTheme";
|
|
5
3
|
import { AppMain } from "./AppMain";
|
|
4
|
+
import { AppTheme } from "./AppTheme";
|
|
6
5
|
/**
|
|
7
6
|
* App
|
|
8
7
|
*
|
|
@@ -50,8 +49,17 @@ import { AppMain } from "./AppMain";
|
|
|
50
49
|
* }
|
|
51
50
|
*
|
|
52
51
|
* ```
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
*/ export const NextApp = (props)=>{
|
|
53
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ _jsx(AppHead, {}),
|
|
56
|
+
/*#__PURE__*/ _jsx(AppTheme, {
|
|
57
|
+
...props,
|
|
58
|
+
children: /*#__PURE__*/ _jsx(AppMain, {
|
|
59
|
+
...props
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
56
64
|
};
|
|
57
65
|
export default NextApp;
|
package/12/app/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./AppHead"), exports);
|
|
7
|
+
_export_star._(require("./AppMain"), exports);
|
package/12/app/sc/AppMain.js
CHANGED
|
@@ -1,29 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
+
AppMain: function() {
|
|
13
|
+
return AppMain;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
20
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
21
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
22
|
+
const _framermotion = require("framer-motion");
|
|
23
|
+
const _router = require("next/router");
|
|
24
|
+
const _m = require("@koine/react/m");
|
|
25
|
+
const _NextProgress = require("../../NextProgress");
|
|
26
|
+
const _SeoDefaults = require("../../SeoDefaults");
|
|
27
|
+
const AppMain = ({ Component, pageProps, Layout, ProgressOverlay, seo, motion, transition = {
|
|
28
|
+
initial: {
|
|
29
|
+
opacity: 0
|
|
30
|
+
},
|
|
31
|
+
animate: {
|
|
32
|
+
opacity: 1
|
|
33
|
+
},
|
|
34
|
+
exit: {
|
|
35
|
+
opacity: 0
|
|
36
|
+
}
|
|
37
|
+
}, pre, post })=>{
|
|
38
|
+
const { pathname } = (0, _router.useRouter)();
|
|
39
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
40
|
+
children: [
|
|
41
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_SeoDefaults.SeoDefaults, {
|
|
42
|
+
...seo
|
|
43
|
+
}),
|
|
44
|
+
pre,
|
|
45
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_m.MotionProvider, {
|
|
46
|
+
features: motion,
|
|
47
|
+
children: [
|
|
48
|
+
ProgressOverlay && /*#__PURE__*/ (0, _jsxruntime.jsx)(_NextProgress.NextProgress, {
|
|
49
|
+
Overlay: ProgressOverlay
|
|
50
|
+
}),
|
|
51
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Layout, {
|
|
52
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.AnimatePresence, {
|
|
53
|
+
exitBeforeEnter: true,
|
|
54
|
+
initial: false,
|
|
55
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.m.div, {
|
|
56
|
+
...transition,
|
|
57
|
+
children: /*#__PURE__*/ (0, _react.createElement)(Component, {
|
|
58
|
+
...pageProps,
|
|
59
|
+
key: pathname
|
|
60
|
+
})
|
|
61
|
+
}, pathname)
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
}),
|
|
66
|
+
post
|
|
67
|
+
]
|
|
68
|
+
});
|
|
27
69
|
};
|
|
28
|
-
|
|
29
|
-
exports.default = exports.AppMain;
|
|
70
|
+
const _default = AppMain;
|
package/12/app/sc/AppMain.mjs
CHANGED
|
@@ -1,25 +1,58 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { createElement as _createElement } from "react";
|
|
3
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
2
|
+
import { createElement as _createElement } from "react";
|
|
5
3
|
import { AnimatePresence, m } from "framer-motion";
|
|
4
|
+
import { useRouter } from "next/router";
|
|
5
|
+
import React from "react";
|
|
6
6
|
import { MotionProvider } from "@koine/react/m";
|
|
7
|
-
import { SeoDefaults } from "../../SeoDefaults";
|
|
8
7
|
import { NextProgress } from "../../NextProgress";
|
|
8
|
+
import { SeoDefaults } from "../../SeoDefaults";
|
|
9
9
|
/**
|
|
10
10
|
* App main
|
|
11
11
|
*
|
|
12
12
|
* It implies a setup for `styled-components` and `framer-motion` libraries.
|
|
13
13
|
*
|
|
14
14
|
* About the page transition [wallis' blog post](https://wallis.dev/blog/nextjs-page-transitions-with-framer-motion)
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
*/ export const AppMain = ({ Component, pageProps, Layout, ProgressOverlay, seo, motion, transition = {
|
|
16
|
+
initial: {
|
|
17
|
+
opacity: 0
|
|
18
|
+
},
|
|
19
|
+
animate: {
|
|
20
|
+
opacity: 1
|
|
21
|
+
},
|
|
22
|
+
exit: {
|
|
23
|
+
opacity: 0
|
|
24
|
+
}
|
|
25
|
+
}, pre, post })=>{
|
|
26
|
+
const { pathname } = useRouter();
|
|
27
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ _jsx(SeoDefaults, {
|
|
30
|
+
...seo
|
|
31
|
+
}),
|
|
32
|
+
pre,
|
|
33
|
+
/*#__PURE__*/ _jsxs(MotionProvider, {
|
|
34
|
+
features: motion,
|
|
35
|
+
children: [
|
|
36
|
+
ProgressOverlay && /*#__PURE__*/ _jsx(NextProgress, {
|
|
37
|
+
Overlay: ProgressOverlay
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ _jsx(Layout, {
|
|
40
|
+
children: /*#__PURE__*/ _jsx(AnimatePresence, {
|
|
41
|
+
exitBeforeEnter: true,
|
|
42
|
+
initial: false,
|
|
43
|
+
children: /*#__PURE__*/ _jsx(m.div, {
|
|
44
|
+
...transition,
|
|
45
|
+
children: /*#__PURE__*/ _createElement(Component, {
|
|
46
|
+
...pageProps,
|
|
47
|
+
key: pathname
|
|
48
|
+
})
|
|
49
|
+
}, pathname)
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
}),
|
|
54
|
+
post
|
|
55
|
+
]
|
|
56
|
+
});
|
|
24
57
|
};
|
|
25
58
|
export default AppMain;
|
package/12/app/sc/AppTheme.d.ts
CHANGED
package/12/app/sc/AppTheme.js
CHANGED
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
AppTheme: function() {
|
|
13
|
+
return AppTheme;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
21
|
+
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
|
22
|
+
const _styledcomponents = require("styled-components");
|
|
23
|
+
const _sc = require("@koine/react/sc");
|
|
24
|
+
const AppTheme = ({ theme, children })=>{
|
|
25
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_styledcomponents.ThemeProvider, {
|
|
26
|
+
theme: theme,
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_sc.StylesGlobal, {}),
|
|
29
|
+
children
|
|
30
|
+
]
|
|
31
|
+
});
|
|
13
32
|
};
|
|
14
|
-
|
|
15
|
-
exports.default = exports.AppTheme;
|
|
33
|
+
const _default = AppTheme;
|
package/12/app/sc/AppTheme.mjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { ThemeProvider } from "styled-components";
|
|
3
4
|
import { StylesGlobal } from "@koine/react/sc";
|
|
4
5
|
/**
|
|
5
6
|
* App theme with `styled-components`
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
*/ export const AppTheme = ({ theme, children })=>{
|
|
8
|
+
return /*#__PURE__*/ _jsxs(ThemeProvider, {
|
|
9
|
+
theme: theme,
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(StylesGlobal, {}),
|
|
12
|
+
children
|
|
13
|
+
]
|
|
14
|
+
});
|
|
10
15
|
};
|
|
11
16
|
export default AppTheme;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AppProps } from "next/app";
|
|
2
|
-
import { type AppThemeProps } from "../AppTheme";
|
|
3
2
|
import { type AppMainProps } from "../AppMain";
|
|
3
|
+
import { type AppThemeProps } from "../AppTheme";
|
|
4
4
|
export type NextAppProps = AppProps<{
|
|
5
5
|
session: any;
|
|
6
6
|
}> & AppThemeProps & AppMainProps;
|
package/12/app/sc/auth/index.js
CHANGED
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
NextApp: function() {
|
|
13
|
+
return NextApp;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
+
const _react = require("next-auth/react");
|
|
21
|
+
const _AppHead = require("../../AppHead");
|
|
22
|
+
const _AppMain = require("../AppMain");
|
|
23
|
+
const _AppTheme = require("../AppTheme");
|
|
24
|
+
const NextApp = (props)=>{
|
|
25
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_AppHead.AppHead, {}),
|
|
28
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_react.SessionProvider, {
|
|
29
|
+
session: props.pageProps.session,
|
|
30
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_AppTheme.AppTheme, {
|
|
31
|
+
...props,
|
|
32
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_AppMain.AppMain, {
|
|
33
|
+
...props
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
});
|
|
15
39
|
};
|
|
16
|
-
|
|
17
|
-
exports.default = exports.NextApp;
|
|
40
|
+
const _default = NextApp;
|
package/12/app/sc/auth/index.mjs
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
2
|
import { SessionProvider } from "next-auth/react";
|
|
4
3
|
import { AppHead } from "../../AppHead";
|
|
5
|
-
import { AppTheme } from "../AppTheme";
|
|
6
4
|
import { AppMain } from "../AppMain";
|
|
5
|
+
import { AppTheme } from "../AppTheme";
|
|
7
6
|
/**
|
|
8
7
|
* App with authentication provided by `next-auth`
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
*/ export const NextApp = (props)=>{
|
|
9
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(AppHead, {}),
|
|
12
|
+
/*#__PURE__*/ _jsx(SessionProvider, {
|
|
13
|
+
session: props.pageProps.session,
|
|
14
|
+
children: /*#__PURE__*/ _jsx(AppTheme, {
|
|
15
|
+
...props,
|
|
16
|
+
children: /*#__PURE__*/ _jsx(AppMain, {
|
|
17
|
+
...props
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
});
|
|
12
23
|
};
|
|
13
24
|
export default NextApp;
|
package/12/app/sc/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AppProps } from "next/app";
|
|
2
|
-
import { type AppThemeProps } from "./AppTheme";
|
|
3
2
|
import { type AppMainProps } from "./AppMain";
|
|
3
|
+
import { type AppThemeProps } from "./AppTheme";
|
|
4
4
|
export type NextAppProps = AppProps & AppThemeProps & AppMainProps;
|
|
5
5
|
/**
|
|
6
6
|
* App
|