@koine/next 2.0.0-beta.2 → 2.0.0-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/12/AnalyticsGoogle.d.ts +0 -1
  2. package/12/AnalyticsGoogle.js +15 -21
  3. package/12/DisableErrorOverlay.d.ts +0 -5
  4. package/12/DisableErrorOverlay.js +5 -15
  5. package/12/DynamicNamespaces.d.ts +2 -7
  6. package/12/DynamicNamespaces.js +3 -12
  7. package/12/Favicon.d.ts +0 -0
  8. package/12/Favicon.js +6 -10
  9. package/12/Link.d.ts +1 -4
  10. package/12/Link.js +8 -14
  11. package/12/NextProgress.d.ts +1 -4
  12. package/12/NextProgress.js +13 -19
  13. package/12/Seo.d.ts +2 -26
  14. package/12/Seo.js +6 -33
  15. package/12/SeoDefaults.d.ts +1 -4
  16. package/12/SeoDefaults.js +6 -16
  17. package/12/T.d.ts +1 -7
  18. package/12/T.js +6 -15
  19. package/12/TransText.d.ts +0 -0
  20. package/12/TransText.js +3 -7
  21. package/12/app/AppHead.d.ts +0 -0
  22. package/12/app/AppHead.js +5 -10
  23. package/12/app/AppMain.d.ts +4 -22
  24. package/12/app/AppMain.js +1 -2
  25. package/12/app/css/AppMain.d.ts +1 -6
  26. package/12/app/css/AppMain.js +7 -16
  27. package/12/app/css/AppTheme.d.ts +2 -5
  28. package/12/app/css/AppTheme.js +5 -16
  29. package/12/app/css/auth/index.d.ts +2 -5
  30. package/12/app/css/auth/index.js +9 -16
  31. package/12/app/css/index.d.ts +2 -50
  32. package/12/app/css/index.js +8 -60
  33. package/12/app/index.d.ts +2 -2
  34. package/12/app/index.js +2 -5
  35. package/12/app/sc/AppMain.d.ts +1 -8
  36. package/12/app/sc/AppMain.js +12 -23
  37. package/12/app/sc/AppTheme.d.ts +1 -7
  38. package/12/app/sc/AppTheme.js +6 -13
  39. package/12/app/sc/auth/index.d.ts +2 -5
  40. package/12/app/sc/auth/index.js +9 -16
  41. package/12/app/sc/index.d.ts +2 -52
  42. package/12/app/sc/index.js +8 -62
  43. package/12/document/Document.d.ts +0 -10
  44. package/12/document/Document.js +11 -24
  45. package/12/document/css/index.d.ts +0 -12
  46. package/12/document/css/index.js +11 -38
  47. package/12/document/index.d.ts +2 -2
  48. package/12/document/index.js +2 -7
  49. package/12/document/sc/index.d.ts +0 -13
  50. package/12/document/sc/index.js +21 -38
  51. package/12/getT.d.ts +1 -6
  52. package/12/getT.js +3 -13
  53. package/12/index.d.ts +3 -24
  54. package/12/index.js +3 -52
  55. package/12/seoBuildTags.d.ts +2 -17
  56. package/12/seoBuildTags.js +15 -43
  57. package/12/to.d.ts +1 -11
  58. package/12/to.js +4 -14
  59. package/12/translationAsOptions.d.ts +2 -1
  60. package/12/translationAsOptions.js +2 -5
  61. package/12/types-i18n.d.ts +0 -87
  62. package/12/types-i18n.js +1 -14
  63. package/12/types-seo.d.ts +0 -0
  64. package/12/types-seo.js +1 -2
  65. package/12/types.d.ts +7 -0
  66. package/12/types.js +2 -0
  67. package/12/useBackUrl.d.ts +0 -0
  68. package/12/useBackUrl.js +11 -20
  69. package/12/useDateFormat.d.ts +0 -4
  70. package/12/useDateFormat.js +15 -23
  71. package/12/useForm.d.ts +2 -2
  72. package/12/useForm.js +9 -33
  73. package/12/useLocale.d.ts +0 -0
  74. package/12/useLocale.js +4 -9
  75. package/12/useT.d.ts +1 -1
  76. package/12/useT.js +6 -33
  77. package/12/useTo.d.ts +1 -1
  78. package/12/useTo.js +7 -11
  79. package/ThemeContext.d.ts +11 -0
  80. package/{12/ThemeContext.mjs → ThemeContext.js} +0 -1
  81. package/ThemeProvider.d.ts +17 -0
  82. package/{12/ThemeProvider.mjs → ThemeProvider.js} +11 -42
  83. package/config-i18n.d.ts +52 -0
  84. package/config-i18n.js +251 -0
  85. package/config.d.ts +109 -0
  86. package/config.js +118 -0
  87. package/getSiteUrl.d.ts +0 -6
  88. package/getSiteUrl.js +4 -15
  89. package/index.d.ts +5 -2
  90. package/index.js +5 -7
  91. package/load.d.ts +0 -8
  92. package/load.js +2 -14
  93. package/package.json +159 -39
  94. package/useTheme.d.ts +4 -0
  95. package/{12/useTheme.mjs → useTheme.js} +1 -4
  96. package/12/AnalyticsGoogle.mjs +0 -34
  97. package/12/DisableErrorOverlay.mjs +0 -13
  98. package/12/DynamicNamespaces.mjs +0 -9
  99. package/12/Favicon.mjs +0 -6
  100. package/12/Link.mjs +0 -12
  101. package/12/NextProgress.mjs +0 -42
  102. package/12/Seo.mjs +0 -29
  103. package/12/SeoDefaults.mjs +0 -12
  104. package/12/T.mjs +0 -13
  105. package/12/ThemeContext.d.ts +0 -17
  106. package/12/ThemeContext.js +0 -10
  107. package/12/ThemeProvider.d.ts +0 -35
  108. package/12/ThemeProvider.js +0 -239
  109. package/12/TransText.mjs +0 -4
  110. package/12/app/AppHead.mjs +0 -6
  111. package/12/app/AppMain.mjs +0 -1
  112. package/12/app/css/AppMain.mjs +0 -14
  113. package/12/app/css/AppTheme.mjs +0 -14
  114. package/12/app/css/auth/index.mjs +0 -13
  115. package/12/app/css/auth/package.json +0 -6
  116. package/12/app/css/index.mjs +0 -57
  117. package/12/app/css/package.json +0 -6
  118. package/12/app/index.mjs +0 -2
  119. package/12/app/package.json +0 -6
  120. package/12/app/sc/AppMain.mjs +0 -25
  121. package/12/app/sc/AppTheme.mjs +0 -11
  122. package/12/app/sc/auth/index.mjs +0 -13
  123. package/12/app/sc/auth/package.json +0 -6
  124. package/12/app/sc/index.mjs +0 -59
  125. package/12/app/sc/package.json +0 -6
  126. package/12/document/Document.mjs +0 -28
  127. package/12/document/css/index.mjs +0 -45
  128. package/12/document/css/package.json +0 -6
  129. package/12/document/index.mjs +0 -2
  130. package/12/document/package.json +0 -6
  131. package/12/document/sc/index.mjs +0 -64
  132. package/12/document/sc/package.json +0 -6
  133. package/12/getT.mjs +0 -10
  134. package/12/index.mjs +0 -27
  135. package/12/package.json +0 -6
  136. package/12/seoBuildTags.mjs +0 -117
  137. package/12/to.mjs +0 -25
  138. package/12/translationAsOptions.mjs +0 -9
  139. package/12/types-i18n.mjs +0 -13
  140. package/12/types-seo.mjs +0 -1
  141. package/12/useBackUrl.mjs +0 -28
  142. package/12/useDateFormat.mjs +0 -39
  143. package/12/useForm.mjs +0 -35
  144. package/12/useLocale.mjs +0 -6
  145. package/12/useT.mjs +0 -21
  146. package/12/useTheme.d.ts +0 -7
  147. package/12/useTheme.js +0 -12
  148. package/12/useTo.mjs +0 -15
  149. package/README.md +0 -13
  150. package/config/index.d.ts +0 -160
  151. package/config/index.js +0 -343
  152. package/config/index.mjs +0 -332
  153. package/config/package.json +0 -6
  154. package/getSiteUrl.mjs +0 -12
  155. package/index.mjs +0 -2
  156. package/load.mjs +0 -14
@@ -1,5 +1,4 @@
1
1
  export type AnalyticsGoogleProps = {
2
- /** Falls back to `.env` variable `NEXT_PUBLIC_GTM_ID` */
3
2
  id?: string;
4
3
  };
5
4
  export declare const AnalyticsGoogle: ({ id }: AnalyticsGoogleProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,21 +1,17 @@
1
- "use strict";
2
1
  "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) {
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) {
12
9
  var id = _a.id;
13
10
  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 () {
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 () {
19
15
  var handleRouteChange = function () {
20
16
  setRouted(true);
21
17
  };
@@ -24,16 +20,14 @@ var AnalyticsGoogle = function (_a) {
24
20
  events.off("routeChangeComplete", handleRouteChange);
25
21
  };
26
22
  }, [events]);
27
- (0, react_1.useEffect)(function () {
23
+ useEffect(function () {
28
24
  if (routed && ready && asPath) {
29
- // const search = query;
30
- (0, gtagPageview_1.default)(asPath);
25
+ gtagPageview(asPath);
31
26
  }
32
27
  }, [asPath, query, routed, ready]);
33
28
  if (!uid) {
34
29
  return null;
35
30
  }
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 ") })] }));
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 ") })] }));
37
32
  };
38
- exports.AnalyticsGoogle = AnalyticsGoogle;
39
- exports.default = exports.AnalyticsGoogle;
33
+ export default AnalyticsGoogle;
@@ -1,7 +1,2 @@
1
- /**
2
- * Disable error overlay during `dev`
3
- *
4
- * @see https://github.com/vercel/next.js/discussions/13387#discussioncomment-101564
5
- */
6
1
  export declare const DisableErrorOverlay: () => import("react/jsx-runtime").JSX.Element;
7
2
  export default DisableErrorOverlay;
@@ -1,18 +1,8 @@
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: {
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"] !== "production" && (_jsx("script", { dangerouslySetInnerHTML: {
14
5
  __html: "window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});",
15
6
  } })) }));
16
7
  };
17
- exports.DisableErrorOverlay = DisableErrorOverlay;
18
- exports.default = exports.DisableErrorOverlay;
8
+ export default DisableErrorOverlay;
@@ -1,13 +1,8 @@
1
- import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
2
1
  import type { DynamicNamespacesProps as BaseDynamicNamespacesProps } from "next-translate";
3
- import type { TranslateNamespace } from "./types-i18n";
2
+ import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
3
+ import type { TranslateNamespace } from "./types-i18n.js";
4
4
  export type DynamicNamespacesProps = Omit<BaseDynamicNamespacesProps, "namespaces"> & {
5
5
  namespaces: TranslateNamespace[];
6
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
7
  export declare const DynamicNamespaces: (props: DynamicNamespacesProps) => ReturnType<typeof BaseDynamicNamespaces>;
13
8
  export default DynamicNamespaces;
@@ -1,13 +1,4 @@
1
- "use strict";
2
1
  "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;
2
+ import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
3
+ export var DynamicNamespaces = BaseDynamicNamespaces;
4
+ export default DynamicNamespaces;
package/12/Favicon.d.ts CHANGED
File without changes
package/12/Favicon.js CHANGED
@@ -1,10 +1,6 @@
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;
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 CHANGED
@@ -1,10 +1,7 @@
1
- import React from "react";
2
1
  import { LinkProps as NextLinkProps } from "next/link";
2
+ import React from "react";
3
3
  export type LinkProps = Omit<React.ComponentPropsWithRef<"a">, "href"> & Omit<NextLinkProps, "as" | "passHref" | "children"> & {
4
4
  Link?: React.ComponentType<any>;
5
5
  };
6
- /**
7
- * @see https://next.js.org/docs/api-reference/next/link
8
- */
9
6
  export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
10
7
  export default Link;
package/12/Link.js CHANGED
@@ -1,15 +1,9 @@
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)) }));
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)) }));
14
8
  });
15
- exports.default = exports.Link;
9
+ export default Link;
@@ -1,11 +1,8 @@
1
1
  import type { Simplify } from "@koine/utils";
2
- import type { WithComponents } from "@koine/react/helpers";
2
+ import type { WithComponents } from "@koine/react";
3
3
  type OwnProps = {
4
- /** @default 0.3 */
5
4
  startAt?: number;
6
- /** @default true */
7
5
  showOnShallow?: boolean;
8
- /** @default 200 */
9
6
  stopDelayMs?: number;
10
7
  };
11
8
  export type Components = {
@@ -1,36 +1,31 @@
1
- "use strict";
2
1
  "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) {
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) {
9
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;
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) {
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) {
15
12
  var shallow = _a.shallow;
16
13
  if (!shallow || showOnShallow) {
17
- // setProgress(startAt);
18
14
  setRunning(true);
19
15
  }
20
16
  }, [showOnShallow]);
21
- var routeChangeEnd = (0, react_1.useCallback)(function (_, _a) {
17
+ var routeChangeEnd = useCallback(function (_, _a) {
22
18
  var shallow = _a.shallow;
23
19
  if (!shallow || showOnShallow) {
24
20
  if (timer.current) {
25
21
  clearTimeout(timer.current);
26
22
  }
27
23
  timer.current = setTimeout(function () {
28
- // setProgress(100);
29
24
  setRunning(false);
30
25
  }, stopDelayMs);
31
26
  }
32
27
  }, [showOnShallow, stopDelayMs, timer]);
33
- (0, react_1.useEffect)(function () {
28
+ useEffect(function () {
34
29
  events.on("routeChangeStart", routeChangeStart);
35
30
  events.on("routeChangeComplete", routeChangeEnd);
36
31
  events.on("routeChangeError", routeChangeEnd);
@@ -40,7 +35,6 @@ var NextProgress = function (_a) {
40
35
  events.off("routeChangeError", routeChangeEnd);
41
36
  };
42
37
  }, [events, routeChangeStart, routeChangeEnd]);
43
- return (0, jsx_runtime_1.jsx)(Overlay, { running: running });
38
+ return _jsx(Overlay, { running: running });
44
39
  };
45
- exports.NextProgress = NextProgress;
46
- exports.default = exports.NextProgress;
40
+ export default NextProgress;
package/12/Seo.d.ts CHANGED
@@ -1,12 +1,9 @@
1
1
  import type { NextSeoProps } from "next-seo/lib/types";
2
- import type { SeoData } from "./types-seo";
3
- import { type MetaTag, type LinkTag } from "./seoBuildTags";
2
+ import { type LinkTag, type MetaTag } from "./seoBuildTags.js";
3
+ import type { SeoData } from "./types-seo.js";
4
4
  type SeoPropsOpenGraph = NextSeoProps["openGraph"] & {
5
5
  image?: string;
6
6
  };
7
- /**
8
- * @see https://github.com/garmeeh/next-seo/blob/master/src/types.ts#L395
9
- */
10
7
  export type SeoProps = Omit<NextSeoProps, "additionalMetaTags" | "additionalLinkTags" | "mobileAlternate" | "robotsProps"> & {
11
8
  metaTags?: ReadonlyArray<MetaTag>;
12
9
  linkTags?: ReadonlyArray<LinkTag>;
@@ -16,26 +13,5 @@ export type SeoProps = Omit<NextSeoProps, "additionalMetaTags" | "additionalLink
16
13
  openGraph?: SeoPropsOpenGraph;
17
14
  og?: SeoPropsOpenGraph;
18
15
  };
19
- /**
20
- * Adapted from [garmeeh/next-seo](https://github.com/garmeeh/next-seo)
21
- *
22
- * See also:
23
- * - https://github.com/catnose99/next-head-seo
24
- * - https://nextjs.org/docs/api-reference/next/head
25
- *
26
- * NB: on the homepage you usually want to customize the `titleTemplate` to avoid
27
- * doubled app name. Assuming your default seo configuration is something like:
28
- *
29
- * ```js
30
- * {
31
- * titleTemplate: "%s | MyApp"
32
- * }
33
- * ```
34
- *
35
- * On the homepage you migh want to override it, e.g.:
36
- * ```js
37
- * <Seo title="MyApp | Some description" titleTemplate="%s" />
38
- * ```
39
- */
40
16
  export declare const Seo: (props: SeoProps) => import("react/jsx-runtime").JSX.Element;
41
17
  export default Seo;
package/12/Seo.js CHANGED
@@ -1,34 +1,7 @@
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) });
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) });
32
6
  };
33
- exports.Seo = Seo;
34
- exports.default = exports.Seo;
7
+ export default Seo;
@@ -1,8 +1,5 @@
1
1
  import type { DefaultSeoProps } from "next-seo/lib/types";
2
- import { type MetaTag, type LinkTag } from "./seoBuildTags";
3
- /**
4
- * @see https://github.com/garmeeh/next-seo/blob/master/src/types.ts#L413
5
- */
2
+ import { type LinkTag, type MetaTag } from "./seoBuildTags.js";
6
3
  export type SeoDefaultsProps = Omit<DefaultSeoProps, "additionalMetaTags" | "additionalLinkTags" | "dangerouslySetAllPagesToNoIndex" | "dangerouslySetAllPagesToNoFollow" | "defaultOpenGraphImageWidth" | "defaultOpenGraphImageHeight" | "defaultOpenGraphVideoWidth" | "defaultOpenGraphVideoHeight" | "mobileAlternate" | "robotsProps"> & {
7
4
  metaTags?: ReadonlyArray<MetaTag>;
8
5
  linkTags?: ReadonlyArray<LinkTag>;
package/12/SeoDefaults.js CHANGED
@@ -1,17 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SeoDefaults = 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
- // import { useRouter } from "next/router";
9
- // import { getSiteUrl } from "../utils";
10
- var seoBuildTags_1 = require("./seoBuildTags");
11
- var SeoDefaults = function (props) {
12
- // const router = useRouter();
13
- // props.openGraph.url = getSiteUrl(router.asPath);
14
- return (0, jsx_runtime_1.jsx)(head_1.default, { children: (0, seoBuildTags_1.seoBuildTags)(props) });
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) });
15
6
  };
16
- exports.SeoDefaults = SeoDefaults;
17
- exports.default = exports.SeoDefaults;
7
+ export default SeoDefaults;
package/12/T.d.ts CHANGED
@@ -1,16 +1,10 @@
1
- /// <reference types="react" />
2
1
  import type { TransProps } from "next-translate";
3
- import type { TranslateNamespace, TranslationsPaths, TranslationsAllPaths } from "./types-i18n";
2
+ import type { TranslateNamespace, TranslationsAllPaths, TranslationsPaths } from "./types-i18n.js";
4
3
  export type TProps<TNamespace extends TranslateNamespace | undefined = undefined> = (Omit<TransProps, "i18nKey" | "ns"> & {
5
4
  i18nKey: TranslationsAllPaths;
6
5
  }) | (Omit<TransProps, "i18nKey" | "ns"> & {
7
6
  ns: TNamespace;
8
7
  i18nKey: TranslationsPaths<TNamespace>;
9
8
  });
10
- /**
11
- * **NOTE**: To make typescript work nicely here make sure to enable
12
- * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
13
- * in your `tsconfig.json` file.
14
- */
15
9
  export declare const T: <TNamespace extends "~" | undefined = undefined>(props: TProps<TNamespace>) => import("react").ReactElement<TProps<TNamespace>, string | import("react").JSXElementConstructor<any>>;
16
10
  export default T;
package/12/T.js CHANGED
@@ -1,17 +1,8 @@
1
- "use strict";
2
1
  "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.T = void 0;
5
- var tslib_1 = require("tslib");
6
- var jsx_runtime_1 = require("react/jsx-runtime");
7
- var Trans_1 = tslib_1.__importDefault(require("next-translate/Trans"));
8
- /**
9
- * **NOTE**: To make typescript work nicely here make sure to enable
10
- * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
11
- * in your `tsconfig.json` file.
12
- */
13
- var T = function (props) {
14
- return ((0, jsx_runtime_1.jsx)(Trans_1.default, tslib_1.__assign({}, props)));
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)));
15
7
  };
16
- exports.T = T;
17
- exports.default = exports.T;
8
+ export default T;
package/12/TransText.d.ts CHANGED
File without changes
package/12/TransText.js CHANGED
@@ -1,8 +1,4 @@
1
- "use strict";
2
1
  "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.TransText = void 0;
5
- var tslib_1 = require("tslib");
6
- var TransText_1 = tslib_1.__importDefault(require("next-translate/TransText"));
7
- exports.TransText = TransText_1.default;
8
- exports.default = exports.TransText;
2
+ import _TransText from "next-translate/TransText";
3
+ export var TransText = _TransText;
4
+ export default TransText;
File without changes
package/12/app/AppHead.js CHANGED
@@ -1,11 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppHead = 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 AppHead = function () {
8
- return ((0, jsx_runtime_1.jsx)(head_1.default, { children: (0, jsx_runtime_1.jsx)("meta", { name: "viewport", content: "width=device-width" }) }));
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Head from "next/head";
3
+ export var AppHead = function () {
4
+ return (_jsx(Head, { children: _jsx("meta", { name: "viewport", content: "width=device-width" }) }));
9
5
  };
10
- exports.AppHead = AppHead;
11
- exports.default = exports.AppHead;
6
+ export default AppHead;
@@ -1,35 +1,17 @@
1
- import React from "react";
2
- import type { AppProps as NextAppProps } from "next/app";
3
1
  import type { HTMLMotionProps } from "framer-motion";
4
- import type { SeoDefaultsProps } from "../SeoDefaults";
5
- import type { NextProgressProps } from "../NextProgress";
2
+ import type { AppProps as NextAppProps } from "next/app";
3
+ import React from "react";
6
4
  import type { MotionProviderFeatures } from "@koine/react/m";
5
+ import type { NextProgressProps } from "../NextProgress.js";
6
+ import type { SeoDefaultsProps } from "../SeoDefaults.js";
7
7
  export type AppMainBaseProps = NextAppProps & {
8
- /**
9
- * A wrapping layout component
10
- */
11
8
  Layout: React.FC<Record<string, unknown>>;
12
- /**
13
- * A Progress' Overlay component
14
- */
15
9
  ProgressOverlay?: NextProgressProps["Overlay"];
16
- /**
17
- * Seo site wide default configuration
18
- */
19
10
  seo?: SeoDefaultsProps;
20
- /**
21
- * JSX to render just after SEO
22
- */
23
11
  pre?: React.ReactNode;
24
- /**
25
- * JSX to render just at the end of the markup
26
- */
27
12
  post?: React.ReactNode;
28
13
  };
29
14
  export type AppMainFramerProps = {
30
15
  motion: MotionProviderFeatures;
31
- /**
32
- * Default layout transition, by default it is a simple fade in/out
33
- */
34
16
  transition?: Omit<HTMLMotionProps<"div">, "key">;
35
17
  };
package/12/app/AppMain.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,9 +1,4 @@
1
- import type { AppMainBaseProps } from "../AppMain";
1
+ import type { AppMainBaseProps } from "../AppMain.js";
2
2
  export type AppMainProps = Omit<AppMainBaseProps, "ProgressOverlay">;
3
- /**
4
- * App main
5
- *
6
- * It does not imply any specific styling or animation solution
7
- */
8
3
  export declare const AppMain: ({ Component, pageProps, Layout, seo, pre, post, }: AppMainProps) => import("react/jsx-runtime").JSX.Element;
9
4
  export default AppMain;
@@ -1,18 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppMain = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = tslib_1.__importDefault(require("react"));
7
- var SeoDefaults_1 = require("../../SeoDefaults");
8
- /**
9
- * App main
10
- *
11
- * It does not imply any specific styling or animation solution
12
- */
13
- var AppMain = function (_a) {
1
+ import { __assign } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import { SeoDefaults } from "../../SeoDefaults.js";
5
+ export var AppMain = function (_a) {
14
6
  var Component = _a.Component, pageProps = _a.pageProps, Layout = _a.Layout, seo = _a.seo, pre = _a.pre, post = _a.post;
15
- return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(SeoDefaults_1.SeoDefaults, tslib_1.__assign({}, seo)), pre, (0, jsx_runtime_1.jsx)(Layout, { children: (0, jsx_runtime_1.jsx)(Component, tslib_1.__assign({}, pageProps)) }), post] }));
7
+ return (_jsxs(React.Fragment, { children: [_jsx(SeoDefaults, __assign({}, seo)), pre, _jsx(Layout, { children: _jsx(Component, __assign({}, pageProps)) }), post] }));
16
8
  };
17
- exports.AppMain = AppMain;
18
- exports.default = exports.AppMain;
9
+ export default AppMain;
@@ -1,11 +1,8 @@
1
- import React from "react";
2
1
  import { type AppProps as NextAppProps } from "next/app";
3
- import { type ThemeProviderProps } from "../../ThemeProvider";
2
+ import React from "react";
3
+ import { type ThemeProviderProps } from "../../../ThemeProvider.js";
4
4
  export type AppThemeProps = React.PropsWithChildren<NextAppProps & {
5
5
  theme: ThemeProviderProps["defaultTheme"];
6
6
  }>;
7
- /**
8
- * App theme with vanilla class based theme (good for `tailwindcss`)
9
- */
10
7
  export declare const AppTheme: ({ theme, children }: AppThemeProps) => import("react/jsx-runtime").JSX.Element;
11
8
  export default AppTheme;
@@ -1,18 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppTheme = void 0;
4
- var jsx_runtime_1 = require("react/jsx-runtime");
5
- // import { ThemeVanillaProvider, ThemeVanillaValue } from "@koine/react/styles";
6
- var ThemeProvider_1 = require("../../ThemeProvider");
7
- /**
8
- * App theme with vanilla class based theme (good for `tailwindcss`)
9
- */
10
- var AppTheme = function (_a) {
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ThemeProvider } from "../../../ThemeProvider.js";
3
+ export var AppTheme = function (_a) {
11
4
  var theme = _a.theme, children = _a.children;
12
- // return (
13
- // <ThemeVanillaProvider initialTheme={theme}>{children}</ThemeVanillaProvider>
14
- // );
15
- return ((0, jsx_runtime_1.jsx)(ThemeProvider_1.ThemeProvider, { defaultTheme: theme, attribute: "class", children: children }));
5
+ return (_jsx(ThemeProvider, { defaultTheme: theme, attribute: "class", children: children }));
16
6
  };
17
- exports.AppTheme = AppTheme;
18
- exports.default = exports.AppTheme;
7
+ export default AppTheme;
@@ -1,11 +1,8 @@
1
1
  import type { AppProps } from "next/app";
2
- import { type AppThemeProps } from "../AppTheme";
3
- import { type AppMainProps } from "../AppMain";
2
+ import { type AppMainProps } from "../AppMain.js";
3
+ import { type AppThemeProps } from "../AppTheme.js";
4
4
  export type NextAppProps = AppProps<{
5
5
  session: any;
6
6
  }> & AppThemeProps & AppMainProps;
7
- /**
8
- * App with authentication provided by `next-auth`
9
- */
10
7
  export declare const NextApp: (props: NextAppProps) => import("react/jsx-runtime").JSX.Element;
11
8
  export default NextApp;