@koine/next 2.0.0-beta.21 → 2.0.0-beta.210

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 (122) hide show
  1. package/README.md +1 -0
  2. package/ThemeContext.cjs.default.js +1 -0
  3. package/ThemeContext.cjs.js +10 -0
  4. package/ThemeContext.cjs.mjs +2 -0
  5. package/ThemeContext.d.ts +6 -1
  6. package/ThemeContext.esm.js +5 -0
  7. package/ThemeProvider.cjs.default.js +1 -0
  8. package/ThemeProvider.cjs.js +14 -0
  9. package/ThemeProvider.cjs.mjs +2 -0
  10. package/ThemeProvider.d.ts +18 -1
  11. package/ThemeProvider.esm.js +9 -0
  12. package/config.cjs.default.js +1 -0
  13. package/config.cjs.js +9 -0
  14. package/config.cjs.mjs +2 -0
  15. package/config.d.ts +42 -107
  16. package/config.esm.js +7 -0
  17. package/index.cjs.default.js +1 -0
  18. package/index.cjs.js +13 -0
  19. package/index.cjs.mjs +2 -0
  20. package/index.d.ts +4 -5
  21. package/index.esm.js +4 -0
  22. package/load.cjs.default.js +1 -0
  23. package/load.cjs.js +8 -0
  24. package/load.cjs.mjs +2 -0
  25. package/load.d.ts +8 -0
  26. package/load.esm.js +3 -0
  27. package/package.json +43 -206
  28. package/typings.d.ts +39 -50
  29. package/useTheme.cjs.default.js +1 -0
  30. package/useTheme.cjs.js +11 -0
  31. package/useTheme.cjs.mjs +2 -0
  32. package/useTheme.d.ts +4 -1
  33. package/useTheme.esm.js +6 -0
  34. package/vite.config.d.ts +2 -0
  35. package/12/AnalyticsGoogle.d.ts +0 -5
  36. package/12/AnalyticsGoogle.js +0 -33
  37. package/12/DisableErrorOverlay.d.ts +0 -2
  38. package/12/DisableErrorOverlay.js +0 -8
  39. package/12/DynamicNamespaces.d.ts +0 -8
  40. package/12/DynamicNamespaces.js +0 -4
  41. package/12/Favicon.d.ts +0 -4
  42. package/12/Favicon.js +0 -6
  43. package/12/Link.d.ts +0 -7
  44. package/12/Link.js +0 -9
  45. package/12/NextProgress.d.ts +0 -22
  46. package/12/NextProgress.js +0 -40
  47. package/12/Seo.d.ts +0 -17
  48. package/12/Seo.js +0 -7
  49. package/12/SeoDefaults.d.ts +0 -8
  50. package/12/SeoDefaults.js +0 -7
  51. package/12/T.d.ts +0 -10
  52. package/12/T.js +0 -8
  53. package/12/TransText.d.ts +0 -3
  54. package/12/TransText.js +0 -4
  55. package/12/app/AppHead.d.ts +0 -3
  56. package/12/app/AppHead.js +0 -6
  57. package/12/app/AppMain.d.ts +0 -17
  58. package/12/app/AppMain.js +0 -1
  59. package/12/app/css/AppMain.d.ts +0 -4
  60. package/12/app/css/AppMain.js +0 -9
  61. package/12/app/css/AppTheme.d.ts +0 -8
  62. package/12/app/css/AppTheme.js +0 -7
  63. package/12/app/css/auth/index.d.ts +0 -8
  64. package/12/app/css/auth/index.js +0 -10
  65. package/12/app/css/index.d.ts +0 -6
  66. package/12/app/css/index.js +0 -9
  67. package/12/app/index.d.ts +0 -2
  68. package/12/app/index.js +0 -2
  69. package/12/app/sc/AppMain.d.ts +0 -4
  70. package/12/app/sc/AppMain.js +0 -18
  71. package/12/app/sc/AppTheme.d.ts +0 -8
  72. package/12/app/sc/AppTheme.js +0 -8
  73. package/12/app/sc/auth/index.d.ts +0 -8
  74. package/12/app/sc/auth/index.js +0 -10
  75. package/12/app/sc/index.d.ts +0 -6
  76. package/12/app/sc/index.js +0 -9
  77. package/12/document/Document.d.ts +0 -5
  78. package/12/document/Document.js +0 -18
  79. package/12/document/css/index.d.ts +0 -5
  80. package/12/document/css/index.js +0 -18
  81. package/12/document/index.d.ts +0 -2
  82. package/12/document/index.js +0 -2
  83. package/12/document/sc/index.d.ts +0 -6
  84. package/12/document/sc/index.js +0 -50
  85. package/12/getT.d.ts +0 -4
  86. package/12/getT.js +0 -4
  87. package/12/index.d.ts +0 -3
  88. package/12/index.js +0 -3
  89. package/12/seoBuildTags.d.ts +0 -8
  90. package/12/seoBuildTags.js +0 -93
  91. package/12/to.d.ts +0 -14
  92. package/12/to.js +0 -19
  93. package/12/translationAsOptions.d.ts +0 -4
  94. package/12/translationAsOptions.js +0 -10
  95. package/12/types-i18n.d.ts +0 -31
  96. package/12/types-i18n.js +0 -1
  97. package/12/types-seo.d.ts +0 -7
  98. package/12/types-seo.js +0 -1
  99. package/12/types.d.ts +0 -7
  100. package/12/types.js +0 -2
  101. package/12/useBackUrl.d.ts +0 -2
  102. package/12/useBackUrl.js +0 -24
  103. package/12/useDateFormat.d.ts +0 -3
  104. package/12/useDateFormat.js +0 -35
  105. package/12/useForm.d.ts +0 -27
  106. package/12/useForm.js +0 -15
  107. package/12/useLocale.d.ts +0 -2
  108. package/12/useLocale.js +0 -6
  109. package/12/useT.d.ts +0 -4
  110. package/12/useT.js +0 -17
  111. package/12/useTo.d.ts +0 -3
  112. package/12/useTo.js +0 -15
  113. package/ThemeContext.js +0 -6
  114. package/ThemeProvider.js +0 -204
  115. package/config-i18n.d.ts +0 -52
  116. package/config-i18n.js +0 -251
  117. package/config.js +0 -118
  118. package/getSiteUrl.d.ts +0 -2
  119. package/getSiteUrl.js +0 -6
  120. package/index.js +0 -5
  121. package/load.js +0 -6
  122. package/useTheme.js +0 -5
package/package.json CHANGED
@@ -1,222 +1,59 @@
1
1
  {
2
2
  "name": "@koine/next",
3
3
  "sideEffects": false,
4
- "dependencies": {
5
- "@koine/browser": "2.0.0-beta.21",
6
- "@koine/react": "2.0.0-beta.21",
7
- "@koine/utils": "2.0.0-beta.21"
8
- },
9
- "peerDependenciesMeta": {
10
- "@hookform/resolvers": {
11
- "optional": true
12
- },
13
- "@kuus/yup": {
14
- "optional": true
15
- },
16
- "@mui/base": {
17
- "optional": true
18
- },
19
- "@mui/material": {
20
- "optional": true
21
- },
22
- "@emotion/react": {
23
- "optional": true
24
- },
25
- "@emotion/server": {
26
- "optional": true
27
- },
28
- "@emotion/styled": {
29
- "optional": true
30
- },
31
- "@tiptap/react": {
32
- "optional": true
33
- },
34
- "@tiptap/starter-kit": {
35
- "optional": true
36
- },
37
- "date-fns": {
38
- "optional": true
39
- },
40
- "framer-motion": {
41
- "optional": true
42
- },
43
- "next-auth": {
44
- "optional": true
45
- },
46
- "next-seo": {
47
- "optional": true
48
- },
49
- "next-translate": {
50
- "optional": true
51
- },
52
- "react-hook-form": {
53
- "optional": true
54
- },
55
- "react-icons": {
56
- "optional": true
57
- },
58
- "react-is": {
59
- "optional": true
60
- },
61
- "react-popper": {
62
- "optional": true
63
- },
64
- "react-swipeable": {
65
- "optional": true
66
- },
67
- "styled-components": {
68
- "optional": true
69
- },
70
- "tailwindcss": {
71
- "optional": true
72
- }
73
- },
74
- "types": "./index.d.ts",
75
- "type": "module",
76
- "module": "./index.js",
77
4
  "exports": {
78
- ".": {
79
- "import": "./index.js"
80
- },
81
- "./12/AnalyticsGoogle": {
82
- "import": "./12/AnalyticsGoogle.js"
83
- },
84
- "./12/DisableErrorOverlay": {
85
- "import": "./12/DisableErrorOverlay.js"
86
- },
87
- "./12/DynamicNamespaces": {
88
- "import": "./12/DynamicNamespaces.js"
89
- },
90
- "./12/Favicon": {
91
- "import": "./12/Favicon.js"
92
- },
93
- "./12/Link": {
94
- "import": "./12/Link.js"
95
- },
96
- "./12/NextProgress": {
97
- "import": "./12/NextProgress.js"
98
- },
99
- "./12/Seo": {
100
- "import": "./12/Seo.js"
101
- },
102
- "./12/SeoDefaults": {
103
- "import": "./12/SeoDefaults.js"
104
- },
105
- "./12/T": {
106
- "import": "./12/T.js"
107
- },
108
- "./12/TransText": {
109
- "import": "./12/TransText.js"
110
- },
111
- "./12/app/AppHead": {
112
- "import": "./12/app/AppHead.js"
113
- },
114
- "./12/app/AppMain": {
115
- "import": "./12/app/AppMain.js"
5
+ "./typings": {
6
+ "types": "./typings.d.ts"
116
7
  },
117
- "./12/app/css/AppMain": {
118
- "import": "./12/app/css/AppMain.js"
119
- },
120
- "./12/app/css/AppTheme": {
121
- "import": "./12/app/css/AppTheme.js"
122
- },
123
- "./12/app/css/auth": {
124
- "import": "./12/app/css/auth/index.js"
125
- },
126
- "./12/app/css": {
127
- "import": "./12/app/css/index.js"
128
- },
129
- "./12/app": {
130
- "import": "./12/app/index.js"
131
- },
132
- "./12/app/sc/AppMain": {
133
- "import": "./12/app/sc/AppMain.js"
134
- },
135
- "./12/app/sc/AppTheme": {
136
- "import": "./12/app/sc/AppTheme.js"
137
- },
138
- "./12/app/sc/auth": {
139
- "import": "./12/app/sc/auth/index.js"
140
- },
141
- "./12/app/sc": {
142
- "import": "./12/app/sc/index.js"
143
- },
144
- "./12/document/Document": {
145
- "import": "./12/document/Document.js"
146
- },
147
- "./12/document/css": {
148
- "import": "./12/document/css/index.js"
149
- },
150
- "./12/document": {
151
- "import": "./12/document/index.js"
152
- },
153
- "./12/document/sc": {
154
- "import": "./12/document/sc/index.js"
155
- },
156
- "./12/getT": {
157
- "import": "./12/getT.js"
158
- },
159
- "./12": {
160
- "import": "./12/index.js"
161
- },
162
- "./12/seoBuildTags": {
163
- "import": "./12/seoBuildTags.js"
164
- },
165
- "./12/to": {
166
- "import": "./12/to.js"
167
- },
168
- "./12/translationAsOptions": {
169
- "import": "./12/translationAsOptions.js"
170
- },
171
- "./12/types-i18n": {
172
- "import": "./12/types-i18n.js"
173
- },
174
- "./12/types-seo": {
175
- "import": "./12/types-seo.js"
176
- },
177
- "./12/types": {
178
- "import": "./12/types.js"
179
- },
180
- "./12/useBackUrl": {
181
- "import": "./12/useBackUrl.js"
182
- },
183
- "./12/useDateFormat": {
184
- "import": "./12/useDateFormat.js"
185
- },
186
- "./12/useForm": {
187
- "import": "./12/useForm.js"
188
- },
189
- "./12/useLocale": {
190
- "import": "./12/useLocale.js"
8
+ "./package.json": "./package.json",
9
+ ".": {
10
+ "module": "./index.esm.js",
11
+ "types": "./index.d.ts",
12
+ "import": "./index.cjs.mjs",
13
+ "default": "./index.cjs.js"
191
14
  },
192
- "./12/useT": {
193
- "import": "./12/useT.js"
15
+ "./config": {
16
+ "module": "./config.esm.js",
17
+ "types": "./config.d.ts",
18
+ "import": "./config.cjs.mjs",
19
+ "default": "./config.cjs.js"
194
20
  },
195
- "./12/useTo": {
196
- "import": "./12/useTo.js"
21
+ "./load": {
22
+ "module": "./load.esm.js",
23
+ "types": "./load.d.ts",
24
+ "import": "./load.cjs.mjs",
25
+ "default": "./load.cjs.js"
197
26
  },
198
27
  "./ThemeContext": {
199
- "import": "./ThemeContext.js"
28
+ "module": "./ThemeContext.esm.js",
29
+ "types": "./ThemeContext.d.ts",
30
+ "import": "./ThemeContext.cjs.mjs",
31
+ "default": "./ThemeContext.cjs.js"
200
32
  },
201
33
  "./ThemeProvider": {
202
- "import": "./ThemeProvider.js"
203
- },
204
- "./config-i18n": {
205
- "import": "./config-i18n.js"
206
- },
207
- "./config": {
208
- "import": "./config.js"
209
- },
210
- "./getSiteUrl": {
211
- "import": "./getSiteUrl.js"
212
- },
213
- "./load": {
214
- "import": "./load.js"
34
+ "module": "./ThemeProvider.esm.js",
35
+ "types": "./ThemeProvider.d.ts",
36
+ "import": "./ThemeProvider.cjs.mjs",
37
+ "default": "./ThemeProvider.cjs.js"
215
38
  },
216
39
  "./useTheme": {
217
- "import": "./useTheme.js"
40
+ "module": "./useTheme.esm.js",
41
+ "types": "./useTheme.d.ts",
42
+ "import": "./useTheme.cjs.mjs",
43
+ "default": "./useTheme.cjs.js"
218
44
  }
219
45
  },
220
- "peerDependencies": {},
221
- "version": "2.0.0-beta.21"
46
+ "dependencies": {
47
+ "@koine/i18n": "2.0.0-beta.210",
48
+ "@koine/node": "2.0.0-beta.210",
49
+ "@koine/utils": "2.0.0-beta.210"
50
+ },
51
+ "peerDependencies": {
52
+ "next": "^13 || ^14 || ^15 || ^16",
53
+ "react": "^18 || ^19"
54
+ },
55
+ "module": "./index.esm.js",
56
+ "main": "./index.cjs.js",
57
+ "types": "./index.d.ts",
58
+ "version": "2.0.0-beta.210"
222
59
  }
package/typings.d.ts CHANGED
@@ -12,61 +12,50 @@ declare module "*.svg" {
12
12
  }
13
13
 
14
14
  /**
15
- * Extend NodeJS `process.env` with variables used by @koine
15
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
16
16
  */
17
- declare namespace NodeJS {
18
- interface ProcessEnv {
19
- NEXT_PUBLIC_APP_URL: string;
20
- }
21
- }
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
+ };
22
23
 
23
24
  /**
24
- * Types specifically related to `@koine/next` exposed on the global unique
25
- * namespace `Koine`. Most of the types here should be prefixed by `Next`, e.g.
26
- * `NextSomeFeature` accessible anywhere from `Koine.NextSomeFeature`
25
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
27
26
  */
28
- declare namespace Koine {
29
- /**
30
- * Default SEO data structure expected by the `<Seo>` component's prop `seo`
31
- */
32
- type NextSeo = import("./12/types-seo").SeoData;
27
+ declare type NextPageDataStaticPaths<Params extends { [key: string]: any }> = (
28
+ context: import("next").GetStaticPathsContext,
29
+ ) =>
30
+ | Promise<NextGetStaticPathsResult<Params>>
31
+ | NextGetStaticPathsResult<Params>;
33
32
 
34
- /**
35
- * Translations dictionary extracted from JSON files.
36
- * You need to augment this type with something like:
37
- *
38
- * ```ts
39
- * declare namespace Koine {
40
- * interface Translations {
41
- * "~": typeof import("./locales/en/~.json");
42
- * "_": typeof import("./locales/en/_.json");
43
- * "$team": typeof import("./locales/en/$team.json");
44
- * "home": typeof import("./locales/en/home.json");
45
- * "Header": typeof import("./locales/en/Header.json");
46
- * }
47
- * }
48
- * ```
49
- *
50
- * Best to follow a convention to name the files which become the namespaces:
51
- *
52
- * - `~`: for app wide **urls** translated definitions
53
- * - `_`: for app wide **common** translations
54
- * - `${data}`: dollar prefix for static **data** like arrays, objects, .etc
55
- * - `{route-name}`: lower cased for **route** specific data
56
- * - `{ComponentName}`: pascal cased for **components** specific data
57
- *
58
- * This works through using [type augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)
59
- * and [merging interfaces](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces).
60
- */
61
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
62
- interface Translations {}
63
- }
33
+ /**
34
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
35
+ */
36
+
37
+ declare type NextPageDataStatic<P extends { [key: string]: any }> =
38
+ import("next").GetStaticProps<P, import("querystring").ParsedUrlQuery>;
64
39
 
65
40
  /**
66
- * List here the global variables used by third party scripts supported within
67
- * the `koine` ecosystem. For instance Google Analytics globally available
68
- * variables.
41
+ * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
69
42
  */
70
- declare interface Window {
71
- gtag: (...args: Record<string, unknown>[]) => Record<string, unknown>;
72
- }
43
+
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 @@
1
+ exports._default = require('./useTheme.cjs.js').default;
@@ -0,0 +1,11 @@
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
+ const useTheme=()=>react.useContext(ThemeContext.ThemeContext);
9
+
10
+ exports.default = useTheme;
11
+ 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 CHANGED
@@ -1,4 +1,7 @@
1
- import { type ThemeContextProps } from "./ThemeContext.js";
1
+ import { type ThemeContextProps } from "./ThemeContext";
2
2
  export type UseThemeProps = ThemeContextProps;
3
+ /**
4
+ * @borrows [next-themes](https://github.com/pacocoursey/next-themes)
5
+ */
3
6
  export declare const useTheme: () => ThemeContextProps;
4
7
  export default useTheme;
@@ -0,0 +1,6 @@
1
+ import { useContext } from 'react';
2
+ import { ThemeContext } from './ThemeContext.esm.js';
3
+
4
+ const useTheme=()=>useContext(ThemeContext);
5
+
6
+ export { useTheme as default, useTheme };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -1,5 +0,0 @@
1
- export type AnalyticsGoogleProps = {
2
- id?: string;
3
- };
4
- export declare const AnalyticsGoogle: ({ id }: AnalyticsGoogleProps) => import("react/jsx-runtime").JSX.Element | null;
5
- export default AnalyticsGoogle;
@@ -1,33 +0,0 @@
1
- "use client";
2
- import { __read } from "tslib";
3
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
4
- import { useRouter } from "next/router";
5
- import Script from "next/script";
6
- import { useEffect, useState } from "react";
7
- import { gtagPageview } from "@koine/browser";
8
- export var AnalyticsGoogle = function (_a) {
9
- var id = _a.id;
10
- var uid = id || process.env["NEXT_PUBLIC_GTM_ID"];
11
- var _b = useRouter(), events = _b.events, asPath = _b.asPath, query = _b.query;
12
- var _c = __read(useState(false), 2), ready = _c[0], setReady = _c[1];
13
- var _d = __read(useState(false), 2), routed = _d[0], setRouted = _d[1];
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
- gtagPageview(asPath);
26
- }
27
- }, [asPath, query, routed, ready]);
28
- if (!uid) {
29
- return null;
30
- }
31
- 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 ") })] }));
32
- };
33
- export default AnalyticsGoogle;
@@ -1,2 +0,0 @@
1
- export declare const DisableErrorOverlay: () => import("react/jsx-runtime").JSX.Element;
2
- export default DisableErrorOverlay;
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Head from "next/head";
3
- export var DisableErrorOverlay = function () {
4
- return (_jsx(Head, { children: process.env["NODE_ENV"] === "development" && (_jsx("script", { dangerouslySetInnerHTML: {
5
- __html: "window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});",
6
- } })) }));
7
- };
8
- export default DisableErrorOverlay;
@@ -1,8 +0,0 @@
1
- import type { DynamicNamespacesProps as BaseDynamicNamespacesProps } from "next-translate";
2
- import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
3
- import type { TranslateNamespace } from "./types-i18n.js";
4
- export type DynamicNamespacesProps = Omit<BaseDynamicNamespacesProps, "namespaces"> & {
5
- namespaces: TranslateNamespace[];
6
- };
7
- export declare const DynamicNamespaces: (props: DynamicNamespacesProps) => ReturnType<typeof BaseDynamicNamespaces>;
8
- export default DynamicNamespaces;
@@ -1,4 +0,0 @@
1
- "use client";
2
- import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
3
- export var DynamicNamespaces = BaseDynamicNamespaces;
4
- 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,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,7 +0,0 @@
1
- import { LinkProps as NextLinkProps } from "next/link";
2
- import React from "react";
3
- export type LinkProps = Omit<React.ComponentPropsWithRef<"a">, "href"> & Omit<NextLinkProps, "as" | "passHref" | "children"> & {
4
- Link?: React.ComponentType<any>;
5
- };
6
- export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
7
- export default Link;
package/12/Link.js DELETED
@@ -1,9 +0,0 @@
1
- import { __assign, __rest } from "tslib";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import NextLink from "next/link";
4
- import { forwardRef } from "react";
5
- export var Link = forwardRef(function Link(_a, ref) {
6
- 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"]);
7
- return (_jsx(NextLink, { href: href, replace: replace, scroll: scroll, shallow: shallow, locale: locale, passHref: true, children: _jsx(Link, __assign({ ref: ref }, props)) }));
8
- });
9
- export default Link;
@@ -1,22 +0,0 @@
1
- import type { Simplify } from "@koine/utils";
2
- import type { WithComponents } from "@koine/react";
3
- type OwnProps = {
4
- startAt?: number;
5
- showOnShallow?: boolean;
6
- stopDelayMs?: number;
7
- };
8
- export type Components = {
9
- Overlay: {
10
- type: "div";
11
- props: {
12
- running?: boolean;
13
- };
14
- };
15
- };
16
- export type ComponentsProps = {
17
- [Name in keyof Components]: Components[Name]["props"];
18
- };
19
- type Props = Simplify<WithComponents<OwnProps, Components>>;
20
- export type NextProgressProps = Props;
21
- export declare const NextProgress: ({ startAt, showOnShallow, stopDelayMs, Overlay, }: NextProgressProps) => import("react/jsx-runtime").JSX.Element;
22
- export default NextProgress;
@@ -1,40 +0,0 @@
1
- "use client";
2
- import { __read } from "tslib";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { useRouter } from "next/router";
5
- import { useCallback, useEffect, useRef, useState } from "react";
6
- export var NextProgress = function (_a) {
7
- 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;
8
- var events = useRouter().events;
9
- var _f = __read(useState(false), 2), 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
- setRunning(true);
15
- }
16
- }, [showOnShallow]);
17
- var routeChangeEnd = useCallback(function (_, _a) {
18
- var shallow = _a.shallow;
19
- if (!shallow || showOnShallow) {
20
- if (timer.current) {
21
- clearTimeout(timer.current);
22
- }
23
- timer.current = setTimeout(function () {
24
- setRunning(false);
25
- }, stopDelayMs);
26
- }
27
- }, [showOnShallow, stopDelayMs, timer]);
28
- useEffect(function () {
29
- events.on("routeChangeStart", routeChangeStart);
30
- events.on("routeChangeComplete", routeChangeEnd);
31
- events.on("routeChangeError", routeChangeEnd);
32
- return function () {
33
- events.off("routeChangeStart", routeChangeStart);
34
- events.off("routeChangeComplete", routeChangeEnd);
35
- events.off("routeChangeError", routeChangeEnd);
36
- };
37
- }, [events, routeChangeStart, routeChangeEnd]);
38
- return _jsx(Overlay, { running: running });
39
- };
40
- export default NextProgress;
package/12/Seo.d.ts DELETED
@@ -1,17 +0,0 @@
1
- import type { NextSeoProps } from "next-seo/lib/types";
2
- import { type LinkTag, type MetaTag } from "./seoBuildTags.js";
3
- import type { SeoData } from "./types-seo.js";
4
- type SeoPropsOpenGraph = NextSeoProps["openGraph"] & {
5
- image?: string;
6
- };
7
- export type SeoProps = Omit<NextSeoProps, "additionalMetaTags" | "additionalLinkTags" | "mobileAlternate" | "robotsProps"> & {
8
- metaTags?: ReadonlyArray<MetaTag>;
9
- linkTags?: ReadonlyArray<LinkTag>;
10
- seo?: SeoData;
11
- hidden?: SeoData["hidden"];
12
- keywords?: SeoData["keywords"];
13
- openGraph?: SeoPropsOpenGraph;
14
- og?: SeoPropsOpenGraph;
15
- };
16
- export declare const Seo: (props: SeoProps) => import("react/jsx-runtime").JSX.Element;
17
- export default Seo;
package/12/Seo.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Head from "next/head";
3
- import { seoBuildTags } from "./seoBuildTags.js";
4
- export var Seo = function (props) {
5
- return _jsx(Head, { children: seoBuildTags(props) });
6
- };
7
- export default Seo;
@@ -1,8 +0,0 @@
1
- import type { DefaultSeoProps } from "next-seo/lib/types";
2
- import { type LinkTag, type MetaTag } from "./seoBuildTags.js";
3
- export type SeoDefaultsProps = Omit<DefaultSeoProps, "additionalMetaTags" | "additionalLinkTags" | "dangerouslySetAllPagesToNoIndex" | "dangerouslySetAllPagesToNoFollow" | "defaultOpenGraphImageWidth" | "defaultOpenGraphImageHeight" | "defaultOpenGraphVideoWidth" | "defaultOpenGraphVideoHeight" | "mobileAlternate" | "robotsProps"> & {
4
- metaTags?: ReadonlyArray<MetaTag>;
5
- linkTags?: ReadonlyArray<LinkTag>;
6
- };
7
- export declare const SeoDefaults: (props: SeoDefaultsProps) => import("react/jsx-runtime").JSX.Element;
8
- export default SeoDefaults;
package/12/SeoDefaults.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Head from "next/head";
3
- import { seoBuildTags } from "./seoBuildTags.js";
4
- export var SeoDefaults = function (props) {
5
- return _jsx(Head, { children: seoBuildTags(props) });
6
- };
7
- export default SeoDefaults;
package/12/T.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { TransProps } from "next-translate";
2
- import type { TranslateNamespace, TranslationsAllPaths, TranslationsPaths } from "./types-i18n.js";
3
- export type TProps<TNamespace extends TranslateNamespace | undefined = undefined> = (Omit<TransProps, "i18nKey" | "ns"> & {
4
- i18nKey: TranslationsAllPaths;
5
- }) | (Omit<TransProps, "i18nKey" | "ns"> & {
6
- ns: TNamespace;
7
- i18nKey: TranslationsPaths<TNamespace>;
8
- });
9
- export declare const T: <TNamespace extends "~" | undefined = undefined>(props: TProps<TNamespace>) => import("react").ReactElement<TProps<TNamespace>, string | import("react").JSXElementConstructor<any>>;
10
- export default T;
package/12/T.js DELETED
@@ -1,8 +0,0 @@
1
- "use client";
2
- import { __assign } from "tslib";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import Trans from "next-translate/Trans";
5
- export var T = function (props) {
6
- return (_jsx(Trans, __assign({}, props)));
7
- };
8
- export default T;
package/12/TransText.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import _TransText from "next-translate/TransText";
2
- export declare const TransText: typeof _TransText;
3
- export default TransText;
package/12/TransText.js DELETED
@@ -1,4 +0,0 @@
1
- "use client";
2
- import _TransText from "next-translate/TransText";
3
- export var TransText = _TransText;
4
- export default TransText;