@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.
Files changed (112) hide show
  1. package/12/AnalyticsGoogle.js +65 -25
  2. package/12/AnalyticsGoogle.mjs +41 -15
  3. package/12/DisableErrorOverlay.js +29 -16
  4. package/12/DisableErrorOverlay.mjs +8 -5
  5. package/12/DynamicNamespaces.d.ts +1 -1
  6. package/12/DynamicNamespaces.js +22 -12
  7. package/12/DynamicNamespaces.mjs +1 -2
  8. package/12/Favicon.js +28 -9
  9. package/12/Favicon.mjs +6 -2
  10. package/12/Link.d.ts +1 -1
  11. package/12/Link.js +36 -13
  12. package/12/Link.mjs +14 -6
  13. package/12/NextProgress.js +47 -24
  14. package/12/NextProgress.mjs +26 -17
  15. package/12/Seo.d.ts +1 -1
  16. package/12/Seo.js +27 -32
  17. package/12/Seo.mjs +5 -4
  18. package/12/SeoDefaults.d.ts +1 -1
  19. package/12/SeoDefaults.js +27 -13
  20. package/12/SeoDefaults.mjs +5 -3
  21. package/12/T.d.ts +1 -1
  22. package/12/T.js +42 -16
  23. package/12/T.mjs +20 -6
  24. package/12/ThemeContext.js +22 -7
  25. package/12/ThemeContext.mjs +3 -3
  26. package/12/ThemeProvider.js +164 -147
  27. package/12/ThemeProvider.mjs +139 -129
  28. package/12/TransText.js +22 -7
  29. package/12/TransText.mjs +1 -1
  30. package/12/app/AppHead.js +29 -9
  31. package/12/app/AppHead.mjs +8 -2
  32. package/12/app/AppMain.d.ts +4 -4
  33. package/12/app/AppMain.js +5 -1
  34. package/12/app/AppMain.mjs +1 -1
  35. package/12/app/css/AppMain.js +37 -16
  36. package/12/app/css/AppMain.mjs +15 -5
  37. package/12/app/css/AppTheme.d.ts +1 -1
  38. package/12/app/css/AppTheme.js +28 -13
  39. package/12/app/css/AppTheme.mjs +7 -4
  40. package/12/app/css/auth/index.d.ts +1 -1
  41. package/12/app/css/auth/index.js +38 -15
  42. package/12/app/css/auth/index.mjs +17 -6
  43. package/12/app/css/index.d.ts +1 -1
  44. package/12/app/css/index.js +34 -59
  45. package/12/app/css/index.mjs +14 -6
  46. package/12/app/index.js +6 -4
  47. package/12/app/sc/AppMain.js +68 -27
  48. package/12/app/sc/AppMain.mjs +46 -13
  49. package/12/app/sc/AppTheme.d.ts +1 -1
  50. package/12/app/sc/AppTheme.js +31 -13
  51. package/12/app/sc/AppTheme.mjs +9 -4
  52. package/12/app/sc/auth/index.d.ts +1 -1
  53. package/12/app/sc/auth/index.js +38 -15
  54. package/12/app/sc/auth/index.mjs +17 -6
  55. package/12/app/sc/index.d.ts +1 -1
  56. package/12/app/sc/index.js +34 -61
  57. package/12/app/sc/index.mjs +14 -6
  58. package/12/document/Document.js +47 -29
  59. package/12/document/Document.mjs +24 -14
  60. package/12/document/css/index.js +47 -32
  61. package/12/document/css/index.mjs +26 -18
  62. package/12/document/index.js +18 -6
  63. package/12/document/sc/index.js +71 -65
  64. package/12/document/sc/index.mjs +46 -45
  65. package/12/getT.js +22 -13
  66. package/12/getT.mjs +2 -4
  67. package/12/index.js +99 -51
  68. package/12/index.mjs +2 -2
  69. package/12/seoBuildTags.js +81 -76
  70. package/12/seoBuildTags.mjs +59 -55
  71. package/12/to.js +21 -19
  72. package/12/to.mjs +4 -10
  73. package/12/translationAsOptions.js +15 -9
  74. package/12/translationAsOptions.mjs +6 -6
  75. package/12/types-i18n.js +4 -3
  76. package/12/types-i18n.mjs +1 -2
  77. package/12/types-seo.js +3 -1
  78. package/12/types-seo.mjs +1 -1
  79. package/12/useBackUrl.js +30 -16
  80. package/12/useBackUrl.mjs +8 -8
  81. package/12/useDateFormat.js +37 -38
  82. package/12/useDateFormat.mjs +15 -28
  83. package/12/useForm.d.ts +1 -1
  84. package/12/useForm.js +46 -20
  85. package/12/useForm.mjs +25 -13
  86. package/12/useLocale.js +22 -8
  87. package/12/useT.d.ts +1 -1
  88. package/12/useT.js +53 -39
  89. package/12/useT.mjs +32 -14
  90. package/12/useTheme.js +22 -11
  91. package/12/useTheme.mjs +1 -2
  92. package/12/useTo.js +23 -16
  93. package/12/useTo.mjs +3 -10
  94. package/README.md +1 -1
  95. package/config/index.js +225 -251
  96. package/config/index.mjs +187 -204
  97. package/getSiteUrl.js +22 -15
  98. package/getSiteUrl.mjs +2 -4
  99. package/index.js +19 -6
  100. package/load.js +21 -8
  101. package/load.mjs +3 -4
  102. package/package.json +19 -17
  103. package/12/app/css/auth/package.json +0 -6
  104. package/12/app/css/package.json +0 -6
  105. package/12/app/package.json +0 -6
  106. package/12/app/sc/auth/package.json +0 -6
  107. package/12/app/sc/package.json +0 -6
  108. package/12/document/css/package.json +0 -6
  109. package/12/document/package.json +0 -6
  110. package/12/document/sc/package.json +0 -6
  111. package/12/package.json +0 -6
  112. package/config/package.json +0 -6
@@ -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 (_jsx(ThemeProvider, { defaultTheme: theme, attribute: "class", children: children }));
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;
@@ -1,17 +1,40 @@
1
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)) })) })] }));
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
- exports.NextApp = NextApp;
17
- exports.default = exports.NextApp;
40
+ const _default = NextApp;
@@ -1,13 +1,24 @@
1
- import { __assign } from "tslib";
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
- 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)) })) })] }));
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;
@@ -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
@@ -1,61 +1,36 @@
1
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)) }))] }));
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
- exports.NextApp = NextApp;
61
- exports.default = exports.NextApp;
36
+ const _default = NextApp;
@@ -1,8 +1,7 @@
1
- import { __assign } from "tslib";
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
- export var NextApp = function (props) {
55
- return (_jsxs(_Fragment, { children: [_jsx(AppHead, {}), _jsx(AppTheme, __assign({}, props, { children: _jsx(AppMain, __assign({}, props)) }))] }));
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", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./AppHead"), exports);
5
- tslib_1.__exportStar(require("./AppMain"), exports);
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);
@@ -1,29 +1,70 @@
1
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] }));
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
- exports.AppMain = AppMain;
29
- exports.default = exports.AppMain;
70
+ const _default = AppMain;
@@ -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 { useRouter } from "next/router";
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
- 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] }));
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;
@@ -1,5 +1,5 @@
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
5
  /**
@@ -1,15 +1,33 @@
1
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] }));
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
- exports.AppTheme = AppTheme;
15
- exports.default = exports.AppTheme;
33
+ const _default = AppTheme;
@@ -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
- export var AppTheme = function (_a) {
8
- var theme = _a.theme, children = _a.children;
9
- return (_jsxs(ThemeProvider, { theme: theme, children: [_jsx(StylesGlobal, {}), children] }));
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;
@@ -1,17 +1,40 @@
1
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)) })) })] }));
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
- exports.NextApp = NextApp;
17
- exports.default = exports.NextApp;
40
+ const _default = NextApp;
@@ -1,13 +1,24 @@
1
- import { __assign } from "tslib";
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
- 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)) })) })] }));
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;
@@ -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