@koine/next 2.0.0-beta.8 → 2.0.0-beta.80

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 (179) hide show
  1. package/12/AnalyticsGoogle.d.ts +1 -2
  2. package/12/DisableErrorOverlay.d.ts +1 -6
  3. package/12/Seo.d.ts +8 -26
  4. package/12/SeoDefaults.d.ts +3 -4
  5. package/12/seoBuildTags.d.ts +2 -17
  6. package/12/types.d.ts +2 -0
  7. package/12.cjs.d.ts +1 -0
  8. package/12.cjs.default.js +1 -0
  9. package/12.cjs.js +53 -0
  10. package/12.cjs.mjs +2 -0
  11. package/12.d.ts +3 -0
  12. package/12.esm.js +43 -0
  13. package/README.md +0 -12
  14. package/ThemeContext.cjs.d.ts +2 -0
  15. package/ThemeContext.cjs.default.js +1 -0
  16. package/ThemeContext.cjs.js +13 -0
  17. package/ThemeContext.cjs.mjs +2 -0
  18. package/ThemeContext.d.ts +11 -0
  19. package/ThemeContext.esm.js +8 -0
  20. package/ThemeProvider.cjs.d.ts +2 -0
  21. package/ThemeProvider.cjs.default.js +1 -0
  22. package/ThemeProvider.cjs.js +214 -0
  23. package/ThemeProvider.cjs.mjs +2 -0
  24. package/ThemeProvider.d.ts +17 -0
  25. package/ThemeProvider.esm.js +205 -0
  26. package/config.cjs.d.ts +1 -0
  27. package/config.cjs.default.js +1 -0
  28. package/config.cjs.js +84 -0
  29. package/config.cjs.mjs +2 -0
  30. package/config.d.ts +7 -0
  31. package/config.esm.js +80 -0
  32. package/index.cjs.d.ts +1 -0
  33. package/index.cjs.default.js +1 -0
  34. package/index.cjs.js +19 -0
  35. package/index.cjs.mjs +2 -0
  36. package/index.d.ts +3 -1
  37. package/index.esm.js +8 -0
  38. package/load.cjs.d.ts +2 -0
  39. package/load.cjs.default.js +1 -0
  40. package/load.cjs.js +12 -0
  41. package/load.cjs.mjs +2 -0
  42. package/load.d.ts +0 -8
  43. package/load.esm.js +7 -0
  44. package/package.json +49 -89
  45. package/typings.d.ts +39 -50
  46. package/useTheme.cjs.d.ts +2 -0
  47. package/useTheme.cjs.default.js +1 -0
  48. package/useTheme.cjs.js +11 -0
  49. package/useTheme.cjs.mjs +2 -0
  50. package/useTheme.d.ts +4 -0
  51. package/useTheme.esm.js +6 -0
  52. package/12/AnalyticsGoogle.js +0 -79
  53. package/12/AnalyticsGoogle.mjs +0 -60
  54. package/12/DisableErrorOverlay.js +0 -31
  55. package/12/DisableErrorOverlay.mjs +0 -16
  56. package/12/DynamicNamespaces.d.ts +0 -13
  57. package/12/DynamicNamespaces.js +0 -23
  58. package/12/DynamicNamespaces.mjs +0 -8
  59. package/12/Favicon.d.ts +0 -4
  60. package/12/Favicon.js +0 -29
  61. package/12/Favicon.mjs +0 -10
  62. package/12/Link.d.ts +0 -10
  63. package/12/Link.js +0 -38
  64. package/12/Link.mjs +0 -20
  65. package/12/NextProgress.d.ts +0 -25
  66. package/12/NextProgress.js +0 -69
  67. package/12/NextProgress.mjs +0 -51
  68. package/12/Seo.js +0 -29
  69. package/12/Seo.mjs +0 -30
  70. package/12/SeoDefaults.js +0 -31
  71. package/12/SeoDefaults.mjs +0 -14
  72. package/12/T.d.ts +0 -16
  73. package/12/T.js +0 -43
  74. package/12/T.mjs +0 -27
  75. package/12/ThemeContext.d.ts +0 -17
  76. package/12/ThemeContext.js +0 -25
  77. package/12/ThemeContext.mjs +0 -7
  78. package/12/ThemeProvider.d.ts +0 -35
  79. package/12/ThemeProvider.js +0 -256
  80. package/12/ThemeProvider.mjs +0 -245
  81. package/12/TransText.d.ts +0 -3
  82. package/12/TransText.js +0 -23
  83. package/12/TransText.mjs +0 -4
  84. package/12/app/AppHead.d.ts +0 -3
  85. package/12/app/AppHead.js +0 -31
  86. package/12/app/AppHead.mjs +0 -12
  87. package/12/app/AppMain.d.ts +0 -35
  88. package/12/app/AppMain.js +0 -6
  89. package/12/app/AppMain.mjs +0 -1
  90. package/12/app/css/AppMain.d.ts +0 -9
  91. package/12/app/css/AppMain.js +0 -39
  92. package/12/app/css/AppMain.mjs +0 -24
  93. package/12/app/css/AppTheme.d.ts +0 -11
  94. package/12/app/css/AppTheme.js +0 -33
  95. package/12/app/css/AppTheme.mjs +0 -17
  96. package/12/app/css/auth/index.d.ts +0 -11
  97. package/12/app/css/auth/index.js +0 -40
  98. package/12/app/css/auth/index.mjs +0 -24
  99. package/12/app/css/index.d.ts +0 -54
  100. package/12/app/css/index.js +0 -36
  101. package/12/app/css/index.mjs +0 -65
  102. package/12/app/index.d.ts +0 -2
  103. package/12/app/index.js +0 -7
  104. package/12/app/index.mjs +0 -2
  105. package/12/app/sc/AppMain.d.ts +0 -11
  106. package/12/app/sc/AppMain.js +0 -70
  107. package/12/app/sc/AppMain.mjs +0 -58
  108. package/12/app/sc/AppTheme.d.ts +0 -14
  109. package/12/app/sc/AppTheme.js +0 -33
  110. package/12/app/sc/AppTheme.mjs +0 -16
  111. package/12/app/sc/auth/index.d.ts +0 -11
  112. package/12/app/sc/auth/index.js +0 -40
  113. package/12/app/sc/auth/index.mjs +0 -24
  114. package/12/app/sc/index.d.ts +0 -56
  115. package/12/app/sc/index.js +0 -36
  116. package/12/app/sc/index.mjs +0 -67
  117. package/12/document/Document.d.ts +0 -15
  118. package/12/document/Document.js +0 -49
  119. package/12/document/Document.mjs +0 -38
  120. package/12/document/css/index.d.ts +0 -17
  121. package/12/document/css/index.js +0 -60
  122. package/12/document/css/index.mjs +0 -53
  123. package/12/document/index.d.ts +0 -2
  124. package/12/document/index.js +0 -19
  125. package/12/document/index.mjs +0 -2
  126. package/12/document/sc/index.d.ts +0 -19
  127. package/12/document/sc/index.js +0 -73
  128. package/12/document/sc/index.mjs +0 -65
  129. package/12/getT.d.ts +0 -9
  130. package/12/getT.js +0 -23
  131. package/12/getT.mjs +0 -8
  132. package/12/index.d.ts +0 -24
  133. package/12/index.js +0 -100
  134. package/12/index.mjs +0 -27
  135. package/12/seoBuildTags.js +0 -126
  136. package/12/seoBuildTags.mjs +0 -121
  137. package/12/to.d.ts +0 -24
  138. package/12/to.js +0 -31
  139. package/12/to.mjs +0 -19
  140. package/12/translationAsOptions.d.ts +0 -3
  141. package/12/translationAsOptions.js +0 -19
  142. package/12/translationAsOptions.mjs +0 -9
  143. package/12/types-i18n.d.ts +0 -118
  144. package/12/types-i18n.js +0 -15
  145. package/12/types-i18n.mjs +0 -12
  146. package/12/types-seo.d.ts +0 -7
  147. package/12/types-seo.js +0 -4
  148. package/12/types-seo.mjs +0 -1
  149. package/12/useBackUrl.d.ts +0 -2
  150. package/12/useBackUrl.js +0 -47
  151. package/12/useBackUrl.mjs +0 -28
  152. package/12/useDateFormat.d.ts +0 -7
  153. package/12/useDateFormat.js +0 -42
  154. package/12/useDateFormat.mjs +0 -26
  155. package/12/useForm.d.ts +0 -27
  156. package/12/useForm.js +0 -65
  157. package/12/useForm.mjs +0 -47
  158. package/12/useLocale.d.ts +0 -2
  159. package/12/useLocale.js +0 -25
  160. package/12/useLocale.mjs +0 -6
  161. package/12/useT.d.ts +0 -4
  162. package/12/useT.js +0 -58
  163. package/12/useT.mjs +0 -39
  164. package/12/useTheme.d.ts +0 -7
  165. package/12/useTheme.js +0 -23
  166. package/12/useTheme.mjs +0 -7
  167. package/12/useTo.d.ts +0 -3
  168. package/12/useTo.js +0 -26
  169. package/12/useTo.mjs +0 -8
  170. package/config/index.d.ts +0 -160
  171. package/config/index.js +0 -317
  172. package/config/index.mjs +0 -315
  173. package/getSiteUrl.d.ts +0 -8
  174. package/getSiteUrl.js +0 -24
  175. package/getSiteUrl.mjs +0 -10
  176. package/index.js +0 -20
  177. package/index.mjs +0 -2
  178. package/load.js +0 -31
  179. package/load.mjs +0 -13
@@ -1,36 +0,0 @@
1
- "use strict";
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
- });
35
- };
36
- const _default = NextApp;
@@ -1,65 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { AppHead } from "../AppHead";
3
- import { AppMain } from "./AppMain";
4
- import { AppTheme } from "./AppTheme";
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
- */ 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
- });
64
- };
65
- export default NextApp;
package/12/app/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./AppHead";
2
- export * from "./AppMain";
package/12/app/index.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
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/index.mjs DELETED
@@ -1,2 +0,0 @@
1
- export * from "./AppHead";
2
- export * from "./AppMain";
@@ -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;
@@ -1,70 +0,0 @@
1
- "use strict";
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
- });
69
- };
70
- const _default = AppMain;
@@ -1,58 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { createElement as _createElement } from "react";
3
- import { AnimatePresence, m } from "framer-motion";
4
- import { useRouter } from "next/router";
5
- import React from "react";
6
- import { MotionProvider } from "@koine/react/m";
7
- import { NextProgress } from "../../NextProgress";
8
- import { SeoDefaults } from "../../SeoDefaults";
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
- */ 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
- });
57
- };
58
- export default AppMain;
@@ -1,14 +0,0 @@
1
- import { type AppProps as NextAppProps } from "next/app";
2
- import React from "react";
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;
@@ -1,33 +0,0 @@
1
- "use strict";
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
- });
32
- };
33
- const _default = AppTheme;
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from "react";
3
- import { ThemeProvider } from "styled-components";
4
- import { StylesGlobal } from "@koine/react/sc";
5
- /**
6
- * App theme with `styled-components`
7
- */ export const AppTheme = ({ theme, children })=>{
8
- return /*#__PURE__*/ _jsxs(ThemeProvider, {
9
- theme: theme,
10
- children: [
11
- /*#__PURE__*/ _jsx(StylesGlobal, {}),
12
- children
13
- ]
14
- });
15
- };
16
- export default AppTheme;
@@ -1,11 +0,0 @@
1
- import type { AppProps } from "next/app";
2
- import { type AppMainProps } from "../AppMain";
3
- import { type AppThemeProps } from "../AppTheme";
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;
@@ -1,40 +0,0 @@
1
- "use strict";
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
- });
39
- };
40
- const _default = NextApp;
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { SessionProvider } from "next-auth/react";
3
- import { AppHead } from "../../AppHead";
4
- import { AppMain } from "../AppMain";
5
- import { AppTheme } from "../AppTheme";
6
- /**
7
- * App with authentication provided by `next-auth`
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
- });
23
- };
24
- export default NextApp;
@@ -1,56 +0,0 @@
1
- import type { AppProps } from "next/app";
2
- import { type AppMainProps } from "./AppMain";
3
- import { type AppThemeProps } from "./AppTheme";
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;
@@ -1,36 +0,0 @@
1
- "use strict";
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
- });
35
- };
36
- const _default = NextApp;
@@ -1,67 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { AppHead } from "../AppHead";
3
- import { AppMain } from "./AppMain";
4
- import { AppTheme } from "./AppTheme";
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
- */ export const NextApp = (props)=>{
55
- return /*#__PURE__*/ _jsxs(_Fragment, {
56
- children: [
57
- /*#__PURE__*/ _jsx(AppHead, {}),
58
- /*#__PURE__*/ _jsx(AppTheme, {
59
- ...props,
60
- children: /*#__PURE__*/ _jsx(AppMain, {
61
- ...props
62
- })
63
- })
64
- ]
65
- });
66
- };
67
- export default NextApp;
@@ -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;
@@ -1,49 +0,0 @@
1
- "use strict";
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
- Document: function() {
13
- return Document;
14
- },
15
- default: function() {
16
- return _default;
17
- }
18
- });
19
- const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
21
- const _jsxruntime = require("react/jsx-runtime");
22
- const _document = /*#__PURE__*/ _interop_require_wildcard._(require("next/document"));
23
- const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
24
- const _Meta = /*#__PURE__*/ _interop_require_default._(require("@koine/react/Meta"));
25
- const _NoJs = /*#__PURE__*/ _interop_require_default._(require("@koine/react/NoJs"));
26
- let Document = class Document extends _document.default {
27
- render() {
28
- const { locale, defaultLocale } = this.props.__NEXT_DATA__;
29
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_document.Html, {
30
- lang: locale || defaultLocale,
31
- className: "no-js",
32
- children: [
33
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_document.Head, {
34
- children: [
35
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_Meta.default, {}),
36
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_NoJs.default, {})
37
- ]
38
- }),
39
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("body", {
40
- children: [
41
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_document.Main, {}),
42
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_document.NextScript, {})
43
- ]
44
- })
45
- ]
46
- });
47
- }
48
- };
49
- const _default = Document;
@@ -1,38 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import NextDocument, { Head, Html, Main, NextScript } from "next/document";
3
- import React from "react";
4
- import Meta from "@koine/react/Meta";
5
- import NoJs from "@koine/react/NoJs";
6
- /**
7
- * Next Document wrapper for bare projects
8
- *
9
- * @example
10
- *
11
- * in your `myapp/pages/_document.tsx`:
12
- * ```tsx
13
- * export { Document as default } from "@koine/next/document";
14
- * ```
15
- */ export class Document extends NextDocument {
16
- render() {
17
- const { locale, defaultLocale } = this.props.__NEXT_DATA__;
18
- return /*#__PURE__*/ _jsxs(Html, {
19
- lang: locale || defaultLocale,
20
- className: "no-js",
21
- children: [
22
- /*#__PURE__*/ _jsxs(Head, {
23
- children: [
24
- /*#__PURE__*/ _jsx(Meta, {}),
25
- /*#__PURE__*/ _jsx(NoJs, {})
26
- ]
27
- }),
28
- /*#__PURE__*/ _jsxs("body", {
29
- children: [
30
- /*#__PURE__*/ _jsx(Main, {}),
31
- /*#__PURE__*/ _jsx(NextScript, {})
32
- ]
33
- })
34
- ]
35
- });
36
- }
37
- }
38
- export default Document;