@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.
Files changed (156) hide show
  1. package/12/AnalyticsGoogle.d.ts +0 -1
  2. package/12/AnalyticsGoogle.js +15 -21
  3. package/12/DisableErrorOverlay.d.ts +0 -5
  4. package/12/DisableErrorOverlay.js +5 -15
  5. package/12/DynamicNamespaces.d.ts +2 -7
  6. package/12/DynamicNamespaces.js +3 -12
  7. package/12/Favicon.d.ts +0 -0
  8. package/12/Favicon.js +6 -10
  9. package/12/Link.d.ts +1 -4
  10. package/12/Link.js +8 -14
  11. package/12/NextProgress.d.ts +1 -4
  12. package/12/NextProgress.js +13 -19
  13. package/12/Seo.d.ts +2 -26
  14. package/12/Seo.js +6 -33
  15. package/12/SeoDefaults.d.ts +1 -4
  16. package/12/SeoDefaults.js +6 -16
  17. package/12/T.d.ts +1 -7
  18. package/12/T.js +6 -15
  19. package/12/TransText.d.ts +0 -0
  20. package/12/TransText.js +3 -7
  21. package/12/app/AppHead.d.ts +0 -0
  22. package/12/app/AppHead.js +5 -10
  23. package/12/app/AppMain.d.ts +4 -22
  24. package/12/app/AppMain.js +1 -2
  25. package/12/app/css/AppMain.d.ts +1 -6
  26. package/12/app/css/AppMain.js +7 -16
  27. package/12/app/css/AppTheme.d.ts +2 -5
  28. package/12/app/css/AppTheme.js +5 -16
  29. package/12/app/css/auth/index.d.ts +2 -5
  30. package/12/app/css/auth/index.js +9 -16
  31. package/12/app/css/index.d.ts +2 -50
  32. package/12/app/css/index.js +8 -60
  33. package/12/app/index.d.ts +2 -2
  34. package/12/app/index.js +2 -5
  35. package/12/app/sc/AppMain.d.ts +1 -8
  36. package/12/app/sc/AppMain.js +12 -23
  37. package/12/app/sc/AppTheme.d.ts +1 -7
  38. package/12/app/sc/AppTheme.js +6 -13
  39. package/12/app/sc/auth/index.d.ts +2 -5
  40. package/12/app/sc/auth/index.js +9 -16
  41. package/12/app/sc/index.d.ts +2 -52
  42. package/12/app/sc/index.js +8 -62
  43. package/12/document/Document.d.ts +0 -10
  44. package/12/document/Document.js +11 -24
  45. package/12/document/css/index.d.ts +0 -12
  46. package/12/document/css/index.js +11 -38
  47. package/12/document/index.d.ts +2 -2
  48. package/12/document/index.js +2 -7
  49. package/12/document/sc/index.d.ts +0 -13
  50. package/12/document/sc/index.js +21 -38
  51. package/12/getT.d.ts +1 -6
  52. package/12/getT.js +3 -13
  53. package/12/index.d.ts +3 -24
  54. package/12/index.js +3 -52
  55. package/12/seoBuildTags.d.ts +2 -17
  56. package/12/seoBuildTags.js +15 -43
  57. package/12/to.d.ts +1 -11
  58. package/12/to.js +4 -14
  59. package/12/translationAsOptions.d.ts +2 -1
  60. package/12/translationAsOptions.js +2 -5
  61. package/12/types-i18n.d.ts +0 -87
  62. package/12/types-i18n.js +1 -14
  63. package/12/types-seo.d.ts +0 -0
  64. package/12/types-seo.js +1 -2
  65. package/12/types.d.ts +7 -0
  66. package/12/types.js +2 -0
  67. package/12/useBackUrl.d.ts +0 -0
  68. package/12/useBackUrl.js +11 -20
  69. package/12/useDateFormat.d.ts +0 -4
  70. package/12/useDateFormat.js +15 -23
  71. package/12/useForm.d.ts +2 -2
  72. package/12/useForm.js +9 -33
  73. package/12/useLocale.d.ts +0 -0
  74. package/12/useLocale.js +4 -9
  75. package/12/useT.d.ts +1 -1
  76. package/12/useT.js +6 -33
  77. package/12/useTo.d.ts +1 -1
  78. package/12/useTo.js +7 -11
  79. package/ThemeContext.d.ts +11 -0
  80. package/{12/ThemeContext.mjs → ThemeContext.js} +0 -1
  81. package/ThemeProvider.d.ts +17 -0
  82. package/{12/ThemeProvider.mjs → ThemeProvider.js} +11 -42
  83. package/config-i18n.d.ts +52 -0
  84. package/config-i18n.js +251 -0
  85. package/config.d.ts +109 -0
  86. package/config.js +118 -0
  87. package/getSiteUrl.d.ts +0 -6
  88. package/getSiteUrl.js +4 -15
  89. package/index.d.ts +5 -2
  90. package/index.js +5 -7
  91. package/load.d.ts +0 -8
  92. package/load.js +2 -14
  93. package/package.json +159 -39
  94. package/useTheme.d.ts +4 -0
  95. package/{12/useTheme.mjs → useTheme.js} +1 -4
  96. package/12/AnalyticsGoogle.mjs +0 -34
  97. package/12/DisableErrorOverlay.mjs +0 -13
  98. package/12/DynamicNamespaces.mjs +0 -9
  99. package/12/Favicon.mjs +0 -6
  100. package/12/Link.mjs +0 -12
  101. package/12/NextProgress.mjs +0 -42
  102. package/12/Seo.mjs +0 -29
  103. package/12/SeoDefaults.mjs +0 -12
  104. package/12/T.mjs +0 -13
  105. package/12/ThemeContext.d.ts +0 -17
  106. package/12/ThemeContext.js +0 -10
  107. package/12/ThemeProvider.d.ts +0 -35
  108. package/12/ThemeProvider.js +0 -239
  109. package/12/TransText.mjs +0 -4
  110. package/12/app/AppHead.mjs +0 -6
  111. package/12/app/AppMain.mjs +0 -1
  112. package/12/app/css/AppMain.mjs +0 -14
  113. package/12/app/css/AppTheme.mjs +0 -14
  114. package/12/app/css/auth/index.mjs +0 -13
  115. package/12/app/css/auth/package.json +0 -6
  116. package/12/app/css/index.mjs +0 -57
  117. package/12/app/css/package.json +0 -6
  118. package/12/app/index.mjs +0 -2
  119. package/12/app/package.json +0 -6
  120. package/12/app/sc/AppMain.mjs +0 -25
  121. package/12/app/sc/AppTheme.mjs +0 -11
  122. package/12/app/sc/auth/index.mjs +0 -13
  123. package/12/app/sc/auth/package.json +0 -6
  124. package/12/app/sc/index.mjs +0 -59
  125. package/12/app/sc/package.json +0 -6
  126. package/12/document/Document.mjs +0 -28
  127. package/12/document/css/index.mjs +0 -45
  128. package/12/document/css/package.json +0 -6
  129. package/12/document/index.mjs +0 -2
  130. package/12/document/package.json +0 -6
  131. package/12/document/sc/index.mjs +0 -64
  132. package/12/document/sc/package.json +0 -6
  133. package/12/getT.mjs +0 -10
  134. package/12/index.mjs +0 -27
  135. package/12/package.json +0 -6
  136. package/12/seoBuildTags.mjs +0 -117
  137. package/12/to.mjs +0 -25
  138. package/12/translationAsOptions.mjs +0 -9
  139. package/12/types-i18n.mjs +0 -13
  140. package/12/types-seo.mjs +0 -1
  141. package/12/useBackUrl.mjs +0 -28
  142. package/12/useDateFormat.mjs +0 -39
  143. package/12/useForm.mjs +0 -35
  144. package/12/useLocale.mjs +0 -6
  145. package/12/useT.mjs +0 -21
  146. package/12/useTheme.d.ts +0 -7
  147. package/12/useTheme.js +0 -12
  148. package/12/useTo.mjs +0 -15
  149. package/README.md +0 -13
  150. package/config/index.d.ts +0 -160
  151. package/config/index.js +0 -343
  152. package/config/index.mjs +0 -332
  153. package/config/package.json +0 -6
  154. package/getSiteUrl.mjs +0 -12
  155. package/index.mjs +0 -2
  156. package/load.mjs +0 -14
@@ -1,17 +1,10 @@
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)) })) })] }));
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
- exports.NextApp = NextApp;
17
- exports.default = exports.NextApp;
10
+ export default NextApp;
@@ -1,54 +1,6 @@
1
1
  import { AppProps } from "next/app";
2
- import { type AppThemeProps } from "./AppTheme";
3
- import { type AppMainProps } from "./AppMain";
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;
@@ -1,61 +1,9 @@
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)) }))] }));
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
- exports.NextApp = NextApp;
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
- "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);
1
+ export * from "./AppHead.js";
2
+ export * from "./AppMain.js";
@@ -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;
@@ -1,29 +1,18 @@
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) {
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 = (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] }));
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
- exports.AppMain = AppMain;
29
- exports.default = exports.AppMain;
18
+ export default AppMain;
@@ -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;
@@ -1,15 +1,8 @@
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) {
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 ((0, jsx_runtime_1.jsxs)(styled_components_1.ThemeProvider, { theme: theme, children: [(0, jsx_runtime_1.jsx)(sc_1.StylesGlobal, {}), children] }));
6
+ return (_jsxs(ThemeProvider, { theme: theme, children: [_jsx(StylesGlobal, {}), children] }));
13
7
  };
14
- exports.AppTheme = AppTheme;
15
- exports.default = exports.AppTheme;
8
+ export default AppTheme;
@@ -1,11 +1,8 @@
1
1
  import type { AppProps } from "next/app";
2
- import { type AppThemeProps } from "../AppTheme";
3
- import { type AppMainProps } from "../AppMain";
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;
@@ -1,17 +1,10 @@
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)) })) })] }));
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
- exports.NextApp = NextApp;
17
- exports.default = exports.NextApp;
10
+ export default NextApp;
@@ -1,56 +1,6 @@
1
1
  import type { AppProps } from "next/app";
2
- import { type AppThemeProps } from "./AppTheme";
3
- import { type AppMainProps } from "./AppMain";
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;
@@ -1,63 +1,9 @@
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)) }))] }));
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
- exports.NextApp = NextApp;
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
  }
@@ -1,31 +1,18 @@
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);
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 ((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, {})] })] }));
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
- }(document_1.default));
30
- exports.Document = Document;
31
- exports.default = Document;
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
  }
@@ -1,45 +1,18 @@
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
- // 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 ((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, {})] })] }));
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
- }(document_1.default));
44
- exports.Document = Document;
45
- exports.default = Document;
16
+ }(NextDocument));
17
+ export { Document };
18
+ export default Document;
@@ -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";
@@ -1,7 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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;