@koine/next 2.0.0-beta.1 → 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 (187) hide show
  1. package/12/AnalyticsGoogle.d.ts +1 -2
  2. package/12/DisableErrorOverlay.d.ts +1 -6
  3. package/12/Seo.d.ts +9 -27
  4. package/12/SeoDefaults.d.ts +4 -5
  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.mjs → load.cjs.js} +8 -7
  41. package/load.cjs.mjs +2 -0
  42. package/load.d.ts +0 -8
  43. package/{load.js → load.esm.js} +3 -11
  44. package/package.json +50 -83
  45. package/typings.d.ts +49 -0
  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 -39
  53. package/12/AnalyticsGoogle.mjs +0 -34
  54. package/12/DisableErrorOverlay.js +0 -18
  55. package/12/DisableErrorOverlay.mjs +0 -13
  56. package/12/DynamicNamespaces.d.ts +0 -13
  57. package/12/DynamicNamespaces.js +0 -13
  58. package/12/DynamicNamespaces.mjs +0 -9
  59. package/12/Favicon.d.ts +0 -4
  60. package/12/Favicon.js +0 -10
  61. package/12/Favicon.mjs +0 -6
  62. package/12/Link.d.ts +0 -10
  63. package/12/Link.js +0 -15
  64. package/12/Link.mjs +0 -12
  65. package/12/NextProgress.d.ts +0 -25
  66. package/12/NextProgress.js +0 -46
  67. package/12/NextProgress.mjs +0 -42
  68. package/12/Seo.js +0 -34
  69. package/12/Seo.mjs +0 -29
  70. package/12/SeoDefaults.js +0 -17
  71. package/12/SeoDefaults.mjs +0 -12
  72. package/12/T.d.ts +0 -16
  73. package/12/T.js +0 -17
  74. package/12/T.mjs +0 -13
  75. package/12/ThemeContext.d.ts +0 -17
  76. package/12/ThemeContext.js +0 -10
  77. package/12/ThemeContext.mjs +0 -7
  78. package/12/ThemeProvider.d.ts +0 -35
  79. package/12/ThemeProvider.js +0 -239
  80. package/12/ThemeProvider.mjs +0 -235
  81. package/12/TransText.d.ts +0 -3
  82. package/12/TransText.js +0 -8
  83. package/12/TransText.mjs +0 -4
  84. package/12/app/AppHead.d.ts +0 -3
  85. package/12/app/AppHead.js +0 -11
  86. package/12/app/AppHead.mjs +0 -6
  87. package/12/app/AppMain.d.ts +0 -35
  88. package/12/app/AppMain.js +0 -2
  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 -18
  92. package/12/app/css/AppMain.mjs +0 -14
  93. package/12/app/css/AppTheme.d.ts +0 -11
  94. package/12/app/css/AppTheme.js +0 -18
  95. package/12/app/css/AppTheme.mjs +0 -14
  96. package/12/app/css/auth/index.d.ts +0 -11
  97. package/12/app/css/auth/index.js +0 -17
  98. package/12/app/css/auth/index.mjs +0 -13
  99. package/12/app/css/auth/package.json +0 -6
  100. package/12/app/css/index.d.ts +0 -54
  101. package/12/app/css/index.js +0 -61
  102. package/12/app/css/index.mjs +0 -57
  103. package/12/app/css/package.json +0 -6
  104. package/12/app/index.d.ts +0 -2
  105. package/12/app/index.js +0 -5
  106. package/12/app/index.mjs +0 -2
  107. package/12/app/package.json +0 -6
  108. package/12/app/sc/AppMain.d.ts +0 -11
  109. package/12/app/sc/AppMain.js +0 -29
  110. package/12/app/sc/AppMain.mjs +0 -25
  111. package/12/app/sc/AppTheme.d.ts +0 -14
  112. package/12/app/sc/AppTheme.js +0 -15
  113. package/12/app/sc/AppTheme.mjs +0 -11
  114. package/12/app/sc/auth/index.d.ts +0 -11
  115. package/12/app/sc/auth/index.js +0 -17
  116. package/12/app/sc/auth/index.mjs +0 -13
  117. package/12/app/sc/auth/package.json +0 -6
  118. package/12/app/sc/index.d.ts +0 -56
  119. package/12/app/sc/index.js +0 -63
  120. package/12/app/sc/index.mjs +0 -59
  121. package/12/app/sc/package.json +0 -6
  122. package/12/document/Document.d.ts +0 -15
  123. package/12/document/Document.js +0 -31
  124. package/12/document/Document.mjs +0 -28
  125. package/12/document/css/index.d.ts +0 -17
  126. package/12/document/css/index.js +0 -45
  127. package/12/document/css/index.mjs +0 -45
  128. package/12/document/css/package.json +0 -6
  129. package/12/document/index.d.ts +0 -2
  130. package/12/document/index.js +0 -7
  131. package/12/document/index.mjs +0 -2
  132. package/12/document/package.json +0 -6
  133. package/12/document/sc/index.d.ts +0 -19
  134. package/12/document/sc/index.js +0 -67
  135. package/12/document/sc/index.mjs +0 -64
  136. package/12/document/sc/package.json +0 -6
  137. package/12/getT.d.ts +0 -9
  138. package/12/getT.js +0 -14
  139. package/12/getT.mjs +0 -10
  140. package/12/index.d.ts +0 -24
  141. package/12/index.js +0 -52
  142. package/12/index.mjs +0 -27
  143. package/12/package.json +0 -6
  144. package/12/seoBuildTags.js +0 -121
  145. package/12/seoBuildTags.mjs +0 -117
  146. package/12/to.d.ts +0 -24
  147. package/12/to.js +0 -29
  148. package/12/to.mjs +0 -25
  149. package/12/translationAsOptions.d.ts +0 -3
  150. package/12/translationAsOptions.js +0 -13
  151. package/12/translationAsOptions.mjs +0 -9
  152. package/12/types-i18n.d.ts +0 -118
  153. package/12/types-i18n.js +0 -14
  154. package/12/types-i18n.mjs +0 -13
  155. package/12/types-seo.d.ts +0 -7
  156. package/12/types-seo.js +0 -2
  157. package/12/types-seo.mjs +0 -1
  158. package/12/useBackUrl.d.ts +0 -2
  159. package/12/useBackUrl.js +0 -33
  160. package/12/useBackUrl.mjs +0 -28
  161. package/12/useDateFormat.d.ts +0 -7
  162. package/12/useDateFormat.js +0 -43
  163. package/12/useDateFormat.mjs +0 -39
  164. package/12/useForm.d.ts +0 -27
  165. package/12/useForm.js +0 -39
  166. package/12/useForm.mjs +0 -35
  167. package/12/useLocale.d.ts +0 -2
  168. package/12/useLocale.js +0 -11
  169. package/12/useLocale.mjs +0 -6
  170. package/12/useT.d.ts +0 -4
  171. package/12/useT.js +0 -44
  172. package/12/useT.mjs +0 -21
  173. package/12/useTheme.d.ts +0 -7
  174. package/12/useTheme.js +0 -12
  175. package/12/useTheme.mjs +0 -8
  176. package/12/useTo.d.ts +0 -3
  177. package/12/useTo.js +0 -19
  178. package/12/useTo.mjs +0 -15
  179. package/config/index.d.ts +0 -160
  180. package/config/index.js +0 -343
  181. package/config/index.mjs +0 -332
  182. package/config/package.json +0 -6
  183. package/getSiteUrl.d.ts +0 -8
  184. package/getSiteUrl.js +0 -17
  185. package/getSiteUrl.mjs +0 -12
  186. package/index.js +0 -7
  187. package/index.mjs +0 -2
package/package.json CHANGED
@@ -1,93 +1,60 @@
1
1
  {
2
2
  "name": "@koine/next",
3
3
  "sideEffects": false,
4
+ "dependencies": {
5
+ "@koine/browser": "2.0.0-beta.100",
6
+ "@koine/utils": "2.0.0-beta.100",
7
+ "@koine/i18n": "2.0.0-beta.100"
8
+ },
9
+ "peerDependencies": {
10
+ "next": "^14.0.4",
11
+ "next-seo": "^6.4.0",
12
+ "react": "^18.2.0"
13
+ },
4
14
  "peerDependenciesMeta": {
5
- "@emotion/react": {
6
- "optional": true
7
- },
8
- "@emotion/server": {
9
- "optional": true
10
- },
11
- "@emotion/styled": {
12
- "optional": true
13
- },
14
- "@hookform/resolvers": {
15
- "optional": true
16
- },
17
- "@kuus/yup": {
18
- "optional": true
19
- },
20
- "@mui/base": {
21
- "optional": true
22
- },
23
- "@mui/material": {
24
- "optional": true
25
- },
26
- "@tiptap/react": {
27
- "optional": true
28
- },
29
- "@tiptap/starter-kit": {
30
- "optional": true
31
- },
32
- "date-fns": {
33
- "optional": true
34
- },
35
- "framer-motion": {
36
- "optional": true
37
- },
38
- "next-auth": {
39
- "optional": true
40
- },
41
15
  "next-seo": {
42
16
  "optional": true
43
- },
44
- "next-translate": {
45
- "optional": true
46
- },
47
- "react-hook-form": {
48
- "optional": true
49
- },
50
- "react-icons": {
51
- "optional": true
52
- },
53
- "react-is": {
54
- "optional": true
55
- },
56
- "react-popper": {
57
- "optional": true
58
- },
59
- "react-swipeable": {
60
- "optional": true
61
- },
62
- "styled-components": {
63
- "optional": true
64
- },
65
- "tailwindcss": {
66
- "optional": true
67
17
  }
68
18
  },
69
- "dependencies": {
70
- "@hookform/resolvers": "^3.1.0",
71
- "@kuus/yup": "1.0.0-beta.7",
72
- "clsx": "1.2.1",
73
- "date-fns": "^2.30.0",
74
- "framer-motion": "^10.12.16",
75
- "next": "^13.4.4",
76
- "next-auth": "^4.22.1",
77
- "next-seo": "^6.0.0",
78
- "next-translate": "^2.0.6",
79
- "react": "^18.2.0",
80
- "react-hook-form": "^7.44.3",
81
- "styled-components": "^5.3.11",
82
- "ts-debounce": "^4.0.0",
83
- "type-fest": "^3.11.1"
84
- },
85
- "peerDependencies": {
86
- "@koine/utils": "2.0.0-beta.1",
87
- "tslib": "2.5.3"
19
+ "exports": {
20
+ "./package.json": "./package.json",
21
+ ".": {
22
+ "module": "./index.esm.js",
23
+ "import": "./index.cjs.mjs",
24
+ "default": "./index.cjs.js"
25
+ },
26
+ "./12": {
27
+ "module": "./12.esm.js",
28
+ "import": "./12.cjs.mjs",
29
+ "default": "./12.cjs.js"
30
+ },
31
+ "./config": {
32
+ "module": "./config.esm.js",
33
+ "import": "./config.cjs.mjs",
34
+ "default": "./config.cjs.js"
35
+ },
36
+ "./load": {
37
+ "module": "./load.esm.js",
38
+ "import": "./load.cjs.mjs",
39
+ "default": "./load.cjs.js"
40
+ },
41
+ "./ThemeContext": {
42
+ "module": "./ThemeContext.esm.js",
43
+ "import": "./ThemeContext.cjs.mjs",
44
+ "default": "./ThemeContext.cjs.js"
45
+ },
46
+ "./ThemeProvider": {
47
+ "module": "./ThemeProvider.esm.js",
48
+ "import": "./ThemeProvider.cjs.mjs",
49
+ "default": "./ThemeProvider.cjs.js"
50
+ },
51
+ "./useTheme": {
52
+ "module": "./useTheme.esm.js",
53
+ "import": "./useTheme.cjs.mjs",
54
+ "default": "./useTheme.cjs.js"
55
+ }
88
56
  },
89
- "main": "./index.js",
90
- "types": "./index.d.ts",
91
- "version": "2.0.0-beta.1",
92
- "module": "./index.mjs"
57
+ "module": "./index.esm.js",
58
+ "main": "./index.cjs.js",
59
+ "version": "2.0.0-beta.100"
93
60
  }
package/typings.d.ts CHANGED
@@ -10,3 +10,52 @@ declare module "*.svg" {
10
10
  >;
11
11
  export default content;
12
12
  }
13
+
14
+ /**
15
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
16
+ */
17
+ type NextGetStaticPathsResult<Params extends { [key: string]: any }> = Omit<
18
+ import("next").GetStaticPathsResult,
19
+ "paths"
20
+ > & {
21
+ paths: Array<string | { params: Params; locale?: string }>;
22
+ };
23
+
24
+ /**
25
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
26
+ */
27
+ declare type NextPageDataStaticPaths<Params extends { [key: string]: any }> = (
28
+ context: import("next").GetStaticPathsContext,
29
+ ) =>
30
+ | Promise<NextGetStaticPathsResult<Params>>
31
+ | NextGetStaticPathsResult<Params>;
32
+
33
+ /**
34
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
35
+ */
36
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
+ declare type NextPageDataStatic<P extends { [key: string]: any }> =
38
+ import("next").GetStaticProps<P, import("querystring").ParsedUrlQuery>;
39
+
40
+ /**
41
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
42
+ */
43
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
+ declare type NextPageDataServer<P extends { [key: string]: any }> =
45
+ import("next").GetServerSideProps<P, import("querystring").ParsedUrlQuery>;
46
+
47
+ /**
48
+ * Workaround to re-create the type `RouteProperties` that is not exported by
49
+ * `next.js`
50
+ */
51
+ declare type NextRouteProperties = Parameters<
52
+ import("next/router").Router["getRouteInfo"]
53
+ >[0]["routeProps"];
54
+
55
+ /**
56
+ * Extend NodeJS `process.env` with variables used by @koine
57
+ */
58
+ // declare namespace NodeJS {
59
+ // interface ProcessEnv {
60
+ // }
61
+ // }
@@ -0,0 +1,2 @@
1
+ export * from "./useTheme";
2
+ export { default } from "./useTheme";
@@ -0,0 +1 @@
1
+ exports._default = require('./useTheme.cjs.js').default;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var react = require('react');
6
+ var ThemeContext = require('./ThemeContext.cjs.js');
7
+
8
+ /**
9
+ * @borrows [next-themes](https://github.com/pacocoursey/next-themes)
10
+ */const useTheme=()=>react.useContext(ThemeContext.ThemeContext);
11
+
12
+ exports["default"] = useTheme;
13
+ exports.useTheme = useTheme;
@@ -0,0 +1,2 @@
1
+ export * from './useTheme.cjs.js';
2
+ export { _default as default } from './useTheme.cjs.default.js';
package/useTheme.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { type ThemeContextProps } from "./ThemeContext";
2
+ export type UseThemeProps = ThemeContextProps;
3
+ export declare const useTheme: () => ThemeContextProps;
4
+ export default useTheme;
@@ -0,0 +1,8 @@
1
+ import { useContext } from 'react';
2
+ import { ThemeContext } from './ThemeContext.esm.js';
3
+
4
+ /**
5
+ * @borrows [next-themes](https://github.com/pacocoursey/next-themes)
6
+ */const useTheme=()=>useContext(ThemeContext);
7
+
8
+ export { useTheme as default, useTheme };
@@ -1,39 +0,0 @@
1
- "use strict";
2
- "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AnalyticsGoogle = void 0;
5
- var tslib_1 = require("tslib");
6
- var jsx_runtime_1 = require("react/jsx-runtime");
7
- var react_1 = require("react");
8
- var router_1 = require("next/router");
9
- var script_1 = tslib_1.__importDefault(require("next/script"));
10
- var gtagPageview_1 = tslib_1.__importDefault(require("@koine/browser/gtagPageview"));
11
- var AnalyticsGoogle = function (_a) {
12
- var id = _a.id;
13
- var uid = id || process.env["NEXT_PUBLIC_GTM_ID"];
14
- var _b = (0, router_1.useRouter)(), events = _b.events, asPath = _b.asPath, query = _b.query;
15
- var _c = (0, react_1.useState)(false), ready = _c[0], setReady = _c[1];
16
- var _d = (0, react_1.useState)(false), routed = _d[0], setRouted = _d[1];
17
- // const [url, setUrl] = useState("");
18
- (0, react_1.useEffect)(function () {
19
- var handleRouteChange = function () {
20
- setRouted(true);
21
- };
22
- events.on("routeChangeComplete", handleRouteChange);
23
- return function () {
24
- events.off("routeChangeComplete", handleRouteChange);
25
- };
26
- }, [events]);
27
- (0, react_1.useEffect)(function () {
28
- if (routed && ready && asPath) {
29
- // const search = query;
30
- (0, gtagPageview_1.default)(asPath);
31
- }
32
- }, [asPath, query, routed, ready]);
33
- if (!uid) {
34
- return null;
35
- }
36
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(script_1.default, { id: "google-tagmanager", src: "https://www.googletagmanager.com/gtag/js?id=".concat(id), strategy: "afterInteractive", onLoad: function () { return setReady(true); } }), (0, jsx_runtime_1.jsx)(script_1.default, { id: "google-analytics", strategy: "afterInteractive", children: "\n window.dataLayer = window.dataLayer || [];\n function gtag(){window.dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', '".concat(id, "', { 'send_page_view': false });\n ") })] }));
37
- };
38
- exports.AnalyticsGoogle = AnalyticsGoogle;
39
- exports.default = exports.AnalyticsGoogle;
@@ -1,34 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState, useEffect } from "react";
4
- import { useRouter } from "next/router";
5
- import Script from "next/script";
6
- import gtagPageview from "@koine/browser/gtagPageview";
7
- export var AnalyticsGoogle = function (_a) {
8
- var id = _a.id;
9
- var uid = id || process.env["NEXT_PUBLIC_GTM_ID"];
10
- var _b = useRouter(), events = _b.events, asPath = _b.asPath, query = _b.query;
11
- var _c = useState(false), ready = _c[0], setReady = _c[1];
12
- var _d = useState(false), routed = _d[0], setRouted = _d[1];
13
- // const [url, setUrl] = useState("");
14
- useEffect(function () {
15
- var handleRouteChange = function () {
16
- setRouted(true);
17
- };
18
- events.on("routeChangeComplete", handleRouteChange);
19
- return function () {
20
- events.off("routeChangeComplete", handleRouteChange);
21
- };
22
- }, [events]);
23
- useEffect(function () {
24
- if (routed && ready && asPath) {
25
- // const search = query;
26
- gtagPageview(asPath);
27
- }
28
- }, [asPath, query, routed, ready]);
29
- if (!uid) {
30
- return null;
31
- }
32
- return (_jsxs(_Fragment, { children: [_jsx(Script, { id: "google-tagmanager", src: "https://www.googletagmanager.com/gtag/js?id=".concat(id), strategy: "afterInteractive", onLoad: function () { return setReady(true); } }), _jsx(Script, { id: "google-analytics", strategy: "afterInteractive", children: "\n window.dataLayer = window.dataLayer || [];\n function gtag(){window.dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', '".concat(id, "', { 'send_page_view': false });\n ") })] }));
33
- };
34
- export default AnalyticsGoogle;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DisableErrorOverlay = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var head_1 = tslib_1.__importDefault(require("next/head"));
7
- /**
8
- * Disable error overlay during `dev`
9
- *
10
- * @see https://github.com/vercel/next.js/discussions/13387#discussioncomment-101564
11
- */
12
- var DisableErrorOverlay = function () {
13
- return ((0, jsx_runtime_1.jsx)(head_1.default, { children: process.env["NODE_ENV"] !== "production" && ((0, jsx_runtime_1.jsx)("script", { dangerouslySetInnerHTML: {
14
- __html: "window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});",
15
- } })) }));
16
- };
17
- exports.DisableErrorOverlay = DisableErrorOverlay;
18
- exports.default = exports.DisableErrorOverlay;
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Head from "next/head";
3
- /**
4
- * Disable error overlay during `dev`
5
- *
6
- * @see https://github.com/vercel/next.js/discussions/13387#discussioncomment-101564
7
- */
8
- export var DisableErrorOverlay = function () {
9
- return (_jsx(Head, { children: process.env["NODE_ENV"] !== "production" && (_jsx("script", { dangerouslySetInnerHTML: {
10
- __html: "window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});",
11
- } })) }));
12
- };
13
- export default DisableErrorOverlay;
@@ -1,13 +0,0 @@
1
- import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
2
- import type { DynamicNamespacesProps as BaseDynamicNamespacesProps } from "next-translate";
3
- import type { TranslateNamespace } from "./types-i18n";
4
- export type DynamicNamespacesProps = Omit<BaseDynamicNamespacesProps, "namespaces"> & {
5
- namespaces: TranslateNamespace[];
6
- };
7
- /**
8
- * **NOTE**: To make typescript work nicely here make sure to enable
9
- * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
10
- * in your `tsconfig.json` file.
11
- */
12
- export declare const DynamicNamespaces: (props: DynamicNamespacesProps) => ReturnType<typeof BaseDynamicNamespaces>;
13
- export default DynamicNamespaces;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DynamicNamespaces = void 0;
5
- var tslib_1 = require("tslib");
6
- var DynamicNamespaces_1 = tslib_1.__importDefault(require("next-translate/DynamicNamespaces"));
7
- /**
8
- * **NOTE**: To make typescript work nicely here make sure to enable
9
- * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
10
- * in your `tsconfig.json` file.
11
- */
12
- exports.DynamicNamespaces = DynamicNamespaces_1.default;
13
- exports.default = exports.DynamicNamespaces;
@@ -1,9 +0,0 @@
1
- "use client";
2
- import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
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 var DynamicNamespaces = BaseDynamicNamespaces;
9
- export default DynamicNamespaces;
package/12/Favicon.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { type FaviconTagsProps } from "@koine/react/FaviconTags";
2
- export type FaviconProps = FaviconTagsProps;
3
- export declare const Favicon: (props: FaviconTagsProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Favicon;
package/12/Favicon.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Favicon = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var head_1 = tslib_1.__importDefault(require("next/head"));
7
- var FaviconTags_1 = tslib_1.__importDefault(require("@koine/react/FaviconTags"));
8
- var Favicon = function (props) { return ((0, jsx_runtime_1.jsx)(head_1.default, { children: (0, jsx_runtime_1.jsx)(FaviconTags_1.default, tslib_1.__assign({}, props)) })); };
9
- exports.Favicon = Favicon;
10
- exports.default = exports.Favicon;
package/12/Favicon.mjs DELETED
@@ -1,6 +0,0 @@
1
- import { __assign } from "tslib";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import Head from "next/head";
4
- import FaviconTags from "@koine/react/FaviconTags";
5
- export var Favicon = function (props) { return (_jsx(Head, { children: _jsx(FaviconTags, __assign({}, props)) })); };
6
- export default Favicon;
package/12/Link.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import { LinkProps as NextLinkProps } from "next/link";
3
- export type LinkProps = Omit<React.ComponentPropsWithRef<"a">, "href"> & Omit<NextLinkProps, "as" | "passHref" | "children"> & {
4
- Link?: React.ComponentType<any>;
5
- };
6
- /**
7
- * @see https://next.js.org/docs/api-reference/next/link
8
- */
9
- export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
10
- export default Link;
package/12/Link.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Link = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var link_1 = tslib_1.__importDefault(require("next/link"));
8
- /**
9
- * @see https://next.js.org/docs/api-reference/next/link
10
- */
11
- exports.Link = (0, react_1.forwardRef)(function Link(_a, ref) {
12
- var href = _a.href, prefetch = _a.prefetch, replace = _a.replace, scroll = _a.scroll, shallow = _a.shallow, locale = _a.locale, _b = _a.Link, Link = _b === void 0 ? "span" : _b, props = tslib_1.__rest(_a, ["href", "prefetch", "replace", "scroll", "shallow", "locale", "Link"]);
13
- return ((0, jsx_runtime_1.jsx)(link_1.default, { href: href, replace: replace, scroll: scroll, shallow: shallow, locale: locale, passHref: true, children: (0, jsx_runtime_1.jsx)(Link, tslib_1.__assign({ ref: ref }, props)) }));
14
- });
15
- exports.default = exports.Link;
package/12/Link.mjs DELETED
@@ -1,12 +0,0 @@
1
- import { __assign, __rest } from "tslib";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
- import NextLink from "next/link";
5
- /**
6
- * @see https://next.js.org/docs/api-reference/next/link
7
- */
8
- export var Link = forwardRef(function Link(_a, ref) {
9
- var href = _a.href, prefetch = _a.prefetch, replace = _a.replace, scroll = _a.scroll, shallow = _a.shallow, locale = _a.locale, _b = _a.Link, Link = _b === void 0 ? "span" : _b, props = __rest(_a, ["href", "prefetch", "replace", "scroll", "shallow", "locale", "Link"]);
10
- return (_jsx(NextLink, { href: href, replace: replace, scroll: scroll, shallow: shallow, locale: locale, passHref: true, children: _jsx(Link, __assign({ ref: ref }, props)) }));
11
- });
12
- export default Link;
@@ -1,25 +0,0 @@
1
- import type { Simplify } from "@koine/utils";
2
- import type { WithComponents } from "@koine/react/helpers";
3
- type OwnProps = {
4
- /** @default 0.3 */
5
- startAt?: number;
6
- /** @default true */
7
- showOnShallow?: boolean;
8
- /** @default 200 */
9
- stopDelayMs?: number;
10
- };
11
- export type Components = {
12
- Overlay: {
13
- type: "div";
14
- props: {
15
- running?: boolean;
16
- };
17
- };
18
- };
19
- export type ComponentsProps = {
20
- [Name in keyof Components]: Components[Name]["props"];
21
- };
22
- type Props = Simplify<WithComponents<OwnProps, Components>>;
23
- export type NextProgressProps = Props;
24
- export declare const NextProgress: ({ startAt, showOnShallow, stopDelayMs, Overlay, }: NextProgressProps) => import("react/jsx-runtime").JSX.Element;
25
- export default NextProgress;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.NextProgress = void 0;
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var router_1 = require("next/router");
8
- var NextProgress = function (_a) {
9
- var _b = _a.startAt, startAt = _b === void 0 ? 0.3 : _b, _c = _a.showOnShallow, showOnShallow = _c === void 0 ? true : _c, _d = _a.stopDelayMs, stopDelayMs = _d === void 0 ? 200 : _d, _e = _a.Overlay, Overlay = _e === void 0 ? "div" : _e;
10
- var events = (0, router_1.useRouter)().events;
11
- // const [progress, setProgress] = useState(0);
12
- var _f = (0, react_1.useState)(false), running = _f[0], setRunning = _f[1];
13
- var timer = (0, react_1.useRef)(null);
14
- var routeChangeStart = (0, react_1.useCallback)(function (_, _a) {
15
- var shallow = _a.shallow;
16
- if (!shallow || showOnShallow) {
17
- // setProgress(startAt);
18
- setRunning(true);
19
- }
20
- }, [showOnShallow]);
21
- var routeChangeEnd = (0, react_1.useCallback)(function (_, _a) {
22
- var shallow = _a.shallow;
23
- if (!shallow || showOnShallow) {
24
- if (timer.current) {
25
- clearTimeout(timer.current);
26
- }
27
- timer.current = setTimeout(function () {
28
- // setProgress(100);
29
- setRunning(false);
30
- }, stopDelayMs);
31
- }
32
- }, [showOnShallow, stopDelayMs, timer]);
33
- (0, react_1.useEffect)(function () {
34
- events.on("routeChangeStart", routeChangeStart);
35
- events.on("routeChangeComplete", routeChangeEnd);
36
- events.on("routeChangeError", routeChangeEnd);
37
- return function () {
38
- events.off("routeChangeStart", routeChangeStart);
39
- events.off("routeChangeComplete", routeChangeEnd);
40
- events.off("routeChangeError", routeChangeEnd);
41
- };
42
- }, [events, routeChangeStart, routeChangeEnd]);
43
- return (0, jsx_runtime_1.jsx)(Overlay, { running: running });
44
- };
45
- exports.NextProgress = NextProgress;
46
- exports.default = exports.NextProgress;
@@ -1,42 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useCallback, useEffect, useRef, useState } from "react";
4
- import { useRouter } from "next/router";
5
- export var NextProgress = function (_a) {
6
- var _b = _a.startAt, startAt = _b === void 0 ? 0.3 : _b, _c = _a.showOnShallow, showOnShallow = _c === void 0 ? true : _c, _d = _a.stopDelayMs, stopDelayMs = _d === void 0 ? 200 : _d, _e = _a.Overlay, Overlay = _e === void 0 ? "div" : _e;
7
- var events = useRouter().events;
8
- // const [progress, setProgress] = useState(0);
9
- var _f = useState(false), running = _f[0], setRunning = _f[1];
10
- var timer = useRef(null);
11
- var routeChangeStart = useCallback(function (_, _a) {
12
- var shallow = _a.shallow;
13
- if (!shallow || showOnShallow) {
14
- // setProgress(startAt);
15
- setRunning(true);
16
- }
17
- }, [showOnShallow]);
18
- var routeChangeEnd = useCallback(function (_, _a) {
19
- var shallow = _a.shallow;
20
- if (!shallow || showOnShallow) {
21
- if (timer.current) {
22
- clearTimeout(timer.current);
23
- }
24
- timer.current = setTimeout(function () {
25
- // setProgress(100);
26
- setRunning(false);
27
- }, stopDelayMs);
28
- }
29
- }, [showOnShallow, stopDelayMs, timer]);
30
- useEffect(function () {
31
- events.on("routeChangeStart", routeChangeStart);
32
- events.on("routeChangeComplete", routeChangeEnd);
33
- events.on("routeChangeError", routeChangeEnd);
34
- return function () {
35
- events.off("routeChangeStart", routeChangeStart);
36
- events.off("routeChangeComplete", routeChangeEnd);
37
- events.off("routeChangeError", routeChangeEnd);
38
- };
39
- }, [events, routeChangeStart, routeChangeEnd]);
40
- return _jsx(Overlay, { running: running });
41
- };
42
- export default NextProgress;
package/12/Seo.js DELETED
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Seo = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- // import { memo } from "react";
7
- var head_1 = tslib_1.__importDefault(require("next/head"));
8
- var seoBuildTags_1 = require("./seoBuildTags");
9
- /**
10
- * Adapted from [garmeeh/next-seo](https://github.com/garmeeh/next-seo)
11
- *
12
- * See also:
13
- * - https://github.com/catnose99/next-head-seo
14
- * - https://nextjs.org/docs/api-reference/next/head
15
- *
16
- * NB: on the homepage you usually want to customize the `titleTemplate` to avoid
17
- * doubled app name. Assuming your default seo configuration is something like:
18
- *
19
- * ```js
20
- * {
21
- * titleTemplate: "%s | MyApp"
22
- * }
23
- * ```
24
- *
25
- * On the homepage you migh want to override it, e.g.:
26
- * ```js
27
- * <Seo title="MyApp | Some description" titleTemplate="%s" />
28
- * ```
29
- */
30
- var Seo = function (props) {
31
- return (0, jsx_runtime_1.jsx)(head_1.default, { children: (0, seoBuildTags_1.seoBuildTags)(props) });
32
- };
33
- exports.Seo = Seo;
34
- exports.default = exports.Seo;
package/12/Seo.mjs DELETED
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- // import { memo } from "react";
3
- import Head from "next/head";
4
- import { seoBuildTags } from "./seoBuildTags";
5
- /**
6
- * Adapted from [garmeeh/next-seo](https://github.com/garmeeh/next-seo)
7
- *
8
- * See also:
9
- * - https://github.com/catnose99/next-head-seo
10
- * - https://nextjs.org/docs/api-reference/next/head
11
- *
12
- * NB: on the homepage you usually want to customize the `titleTemplate` to avoid
13
- * doubled app name. Assuming your default seo configuration is something like:
14
- *
15
- * ```js
16
- * {
17
- * titleTemplate: "%s | MyApp"
18
- * }
19
- * ```
20
- *
21
- * On the homepage you migh want to override it, e.g.:
22
- * ```js
23
- * <Seo title="MyApp | Some description" titleTemplate="%s" />
24
- * ```
25
- */
26
- export var Seo = function (props) {
27
- return _jsx(Head, { children: seoBuildTags(props) });
28
- };
29
- export default Seo;