@koine/next 2.0.0-beta.10 → 2.0.0-beta.100

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 (178) 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 +34 -0
  10. package/12.cjs.mjs +2 -0
  11. package/12.d.ts +3 -0
  12. package/12.esm.js +24 -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 +11 -0
  17. package/ThemeContext.cjs.mjs +2 -0
  18. package/ThemeContext.d.ts +11 -0
  19. package/ThemeContext.esm.js +6 -0
  20. package/ThemeProvider.cjs.d.ts +2 -0
  21. package/ThemeProvider.cjs.default.js +1 -0
  22. package/ThemeProvider.cjs.js +47 -0
  23. package/ThemeProvider.cjs.mjs +2 -0
  24. package/ThemeProvider.d.ts +17 -0
  25. package/ThemeProvider.esm.js +38 -0
  26. package/config.cjs.d.ts +1 -0
  27. package/config.cjs.default.js +1 -0
  28. package/config.cjs.js +29 -0
  29. package/config.cjs.mjs +2 -0
  30. package/config.d.ts +8 -0
  31. package/config.esm.js +25 -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 +15 -0
  41. package/load.cjs.mjs +2 -0
  42. package/load.d.ts +0 -8
  43. package/{load.mjs → load.esm.js} +3 -6
  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 +13 -0
  49. package/useTheme.cjs.mjs +2 -0
  50. package/useTheme.d.ts +4 -0
  51. package/useTheme.esm.js +8 -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
@@ -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;
@@ -1,17 +0,0 @@
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
- export declare class Document extends NextDocument {
15
- render(): import("react/jsx-runtime").JSX.Element;
16
- }
17
- export default Document;
@@ -1,60 +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
- // 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
- render() {
39
- const { locale, defaultLocale } = this.props.__NEXT_DATA__;
40
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_document.Html, {
41
- lang: locale || defaultLocale,
42
- className: "no-js",
43
- children: [
44
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_document.Head, {
45
- children: [
46
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_Meta.default, {}),
47
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_NoJs.default, {})
48
- ]
49
- }),
50
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("body", {
51
- children: [
52
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_document.Main, {}),
53
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_document.NextScript, {})
54
- ]
55
- })
56
- ]
57
- });
58
- }
59
- };
60
- const _default = Document;
@@ -1,53 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import NextDocument, { Head, // type DocumentInitialProps,
3
- Html, Main, NextScript } from "next/document";
4
- import React from "react";
5
- import Meta from "@koine/react/Meta";
6
- import NoJs from "@koine/react/NoJs";
7
- // import { getInitialThemeFromRequest, ThemeVanillaValue } from "@koine/react/sc"; // FIXME: this should be imported from another entrypoint
8
- /**
9
- * Next Document wrapper for `css/tailwind` based projects
10
- *
11
- * Uses cookie to manage the current theme
12
- *
13
- * @example
14
- *
15
- * in your `myapp/pages/_document.tsx`:
16
- * ```tsx
17
- * export { Document as default } from "@koine/next/document/css";
18
- * ```
19
- */ export class Document extends NextDocument {
20
- // static override async getInitialProps(
21
- // ctx: DocumentContext
22
- // ): Promise<DocumentInitialProps & { theme: ThemeVanillaValue }> {
23
- // const initialProps = await NextDocument.getInitialProps(ctx);
24
- // return {
25
- // ...initialProps,
26
- // theme: getInitialThemeFromRequest(
27
- // ctx.req?.headers.cookie /* || document?.cookie */ || ""
28
- // ),
29
- // };
30
- // }
31
- render() {
32
- const { locale, defaultLocale } = this.props.__NEXT_DATA__;
33
- return /*#__PURE__*/ _jsxs(Html, {
34
- lang: locale || defaultLocale,
35
- className: "no-js",
36
- children: [
37
- /*#__PURE__*/ _jsxs(Head, {
38
- children: [
39
- /*#__PURE__*/ _jsx(Meta, {}),
40
- /*#__PURE__*/ _jsx(NoJs, {})
41
- ]
42
- }),
43
- /*#__PURE__*/ _jsxs("body", {
44
- children: [
45
- /*#__PURE__*/ _jsx(Main, {}),
46
- /*#__PURE__*/ _jsx(NextScript, {})
47
- ]
48
- })
49
- ]
50
- });
51
- }
52
- }
53
- export default Document;
@@ -1,2 +0,0 @@
1
- export { Document } from "./Document";
2
- export { Document as default } from "./Document";
@@ -1,19 +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.Document;
14
- },
15
- default: function() {
16
- return _Document.Document;
17
- }
18
- });
19
- const _Document = require("./Document");
@@ -1,2 +0,0 @@
1
- export { Document } from "./Document";
2
- export { Document as default } from "./Document";
@@ -1,19 +0,0 @@
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
- export declare class Document extends NextDocument {
16
- static getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps>;
17
- render(): import("react/jsx-runtime").JSX.Element;
18
- }
19
- export default Document;
@@ -1,73 +0,0 @@
1
- /* ? eslint-disable @next/next/no-document-import-in-page */ "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 _styledcomponents = require("styled-components");
25
- const _Meta = /*#__PURE__*/ _interop_require_default._(require("@koine/react/Meta"));
26
- const _NoJs = /*#__PURE__*/ _interop_require_default._(require("@koine/react/NoJs"));
27
- let Document = class Document extends _document.default {
28
- static async getInitialProps(ctx) {
29
- const sheet = new _styledcomponents.ServerStyleSheet();
30
- const originalRenderPage = ctx.renderPage;
31
- try {
32
- ctx.renderPage = ()=>originalRenderPage({
33
- enhanceApp: (App)=>(props)=>sheet.collectStyles(/*#__PURE__*/ (0, _jsxruntime.jsx)(App, {
34
- ...props
35
- }))
36
- });
37
- const initialProps = await _document.default.getInitialProps(ctx);
38
- return {
39
- ...initialProps,
40
- styles: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.default.Fragment, {
41
- children: [
42
- initialProps.styles,
43
- sheet.getStyleElement()
44
- ]
45
- })
46
- };
47
- } finally{
48
- sheet.seal();
49
- }
50
- }
51
- render() {
52
- const { locale, defaultLocale } = this.props.__NEXT_DATA__;
53
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_document.Html, {
54
- lang: locale || defaultLocale,
55
- className: "no-js",
56
- children: [
57
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_document.Head, {
58
- children: [
59
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_Meta.default, {}),
60
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_NoJs.default, {})
61
- ]
62
- }),
63
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("body", {
64
- children: [
65
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_document.Main, {}),
66
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_document.NextScript, {})
67
- ]
68
- })
69
- ]
70
- });
71
- }
72
- };
73
- const _default = Document;
@@ -1,65 +0,0 @@
1
- /* ? eslint-disable @next/next/no-document-import-in-page */ 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 { ServerStyleSheet } from "styled-components";
5
- import Meta from "@koine/react/Meta";
6
- import NoJs from "@koine/react/NoJs";
7
- /**
8
- * Next Document wrapper for `styled-components` based projects
9
- *
10
- * For typescript safety of this component
11
- * @see https://bit.ly/3ceuF8m
12
- *
13
- * @example
14
- *
15
- * in your `myapp/pages/_document.tsx`:
16
- * ```tsx
17
- * export { Document as default } from "@koine/next/document/sc";
18
- * ```
19
- */ export class Document extends NextDocument {
20
- static async getInitialProps(ctx) {
21
- const sheet = new ServerStyleSheet();
22
- const originalRenderPage = ctx.renderPage;
23
- try {
24
- ctx.renderPage = ()=>originalRenderPage({
25
- enhanceApp: (App)=>(props)=>sheet.collectStyles(/*#__PURE__*/ _jsx(App, {
26
- ...props
27
- }))
28
- });
29
- const initialProps = await NextDocument.getInitialProps(ctx);
30
- return {
31
- ...initialProps,
32
- styles: /*#__PURE__*/ _jsxs(React.Fragment, {
33
- children: [
34
- initialProps.styles,
35
- sheet.getStyleElement()
36
- ]
37
- })
38
- };
39
- } finally{
40
- sheet.seal();
41
- }
42
- }
43
- render() {
44
- const { locale, defaultLocale } = this.props.__NEXT_DATA__;
45
- return /*#__PURE__*/ _jsxs(Html, {
46
- lang: locale || defaultLocale,
47
- className: "no-js",
48
- children: [
49
- /*#__PURE__*/ _jsxs(Head, {
50
- children: [
51
- /*#__PURE__*/ _jsx(Meta, {}),
52
- /*#__PURE__*/ _jsx(NoJs, {})
53
- ]
54
- }),
55
- /*#__PURE__*/ _jsxs("body", {
56
- children: [
57
- /*#__PURE__*/ _jsx(Main, {}),
58
- /*#__PURE__*/ _jsx(NextScript, {})
59
- ]
60
- })
61
- ]
62
- });
63
- }
64
- }
65
- export default Document;
package/12/getT.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import type { Translate, TranslateNamespace } from "./types-i18n";
2
- export type GetT = <TNamespace extends TranslateNamespace | undefined = undefined>(locale?: string, namespace?: TNamespace) => Promise<Translate<TNamespace>>;
3
- /**
4
- * **NOTE**: To make typescript work nicely here make sure to enable
5
- * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
6
- * in your `tsconfig.json` file.
7
- */
8
- export declare const getT: GetT;
9
- export default getT;
package/12/getT.js DELETED
@@ -1,23 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- function _export(target, all) {
7
- for(var name in all)Object.defineProperty(target, name, {
8
- enumerable: true,
9
- get: all[name]
10
- });
11
- }
12
- _export(exports, {
13
- getT: function() {
14
- return getT;
15
- },
16
- default: function() {
17
- return _default;
18
- }
19
- });
20
- const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
21
- const _getT = /*#__PURE__*/ _interop_require_default._(require("next-translate/getT"));
22
- const getT = _getT.default;
23
- const _default = getT;
package/12/getT.mjs DELETED
@@ -1,8 +0,0 @@
1
- "use client";
2
- /* eslint-disable @typescript-eslint/no-unnecessary-type-constraint */ import getTranslation from "next-translate/getT";
3
- /**
4
- * **NOTE**: To make typescript work nicely here make sure to enable
5
- * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
6
- * in your `tsconfig.json` file.
7
- */ export const getT = getTranslation;
8
- export default getT;
package/12/index.d.ts DELETED
@@ -1,24 +0,0 @@
1
- export { AnalyticsGoogle, type AnalyticsGoogleProps } from "./AnalyticsGoogle";
2
- export { DisableErrorOverlay } from "./DisableErrorOverlay";
3
- export { DynamicNamespaces, type DynamicNamespacesProps, } from "./DynamicNamespaces";
4
- export { Favicon, type FaviconProps } from "./Favicon";
5
- export { getT, type GetT } from "./getT";
6
- export { Link, type LinkProps } from "./Link";
7
- export { NextProgress, type NextProgressProps } from "./NextProgress";
8
- export { Seo, type SeoProps } from "./Seo";
9
- export { SeoDefaults, type SeoDefaultsProps } from "./SeoDefaults";
10
- export { T, type TProps } from "./T";
11
- export { ThemeContext, type ThemeContextProps } from "./ThemeContext";
12
- export { ThemeProvider, type ThemeProviderProps } from "./ThemeProvider";
13
- export { to, type ToArgs, type ToTranslate, type ToDynamicRoute, type ToStaticRoute, } from "./to";
14
- export { translationAsOptions } from "./translationAsOptions";
15
- export { TransText } from "./TransText";
16
- export type { Translate, TranslateDefault, TranslateLoose, TranslateNamespace, TranslateNamespaced, TranslatedRoute, TranslatedRoutesChildrenOf, TranslationOptions, TranslationQuery, TranslationShortcut, TranslationsAllPaths, TranslationsDictionary, TranslationsDictionaryDefault, TranslationsPaths, } from "./types-i18n";
17
- export type { SeoData } from "./types-seo";
18
- export { useBackUrl } from "./useBackUrl";
19
- export { useDateFormat } from "./useDateFormat";
20
- export { useForm } from "./useForm";
21
- export { useLocale } from "./useLocale";
22
- export { useT } from "./useT";
23
- export { useTheme, type UseThemeProps } from "./useTheme";
24
- export { useTo } from "./useTo";