@koine/next 1.1.10 → 1.1.12

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 (176) hide show
  1. package/AnalyticsGoogle.js +19 -15
  2. package/AnalyticsGoogle.mjs +34 -0
  3. package/DisableErrorOverlay.js +10 -5
  4. package/DisableErrorOverlay.mjs +13 -0
  5. package/DynamicNamespaces.js +7 -3
  6. package/DynamicNamespaces.mjs +8 -0
  7. package/Favicon.js +10 -6
  8. package/Favicon.mjs +6 -0
  9. package/Head.js +7 -3
  10. package/Head.mjs +3 -0
  11. package/Link.d.ts +1 -1
  12. package/Link.js +11 -8
  13. package/Link.mjs +12 -0
  14. package/NextProgress.js +16 -12
  15. package/{node/NextProgress.js → NextProgress.mjs} +12 -16
  16. package/Seo.js +11 -6
  17. package/{node/Seo.js → Seo.mjs} +6 -11
  18. package/SeoDefaults.js +11 -6
  19. package/SeoDefaults.mjs +12 -0
  20. package/T.js +9 -5
  21. package/T.mjs +10 -0
  22. package/ThemeContext.js +6 -3
  23. package/ThemeContext.mjs +7 -0
  24. package/ThemeProvider.js +28 -24
  25. package/{node/ThemeProvider.js → ThemeProvider.mjs} +24 -28
  26. package/TransText.js +7 -3
  27. package/TransText.mjs +3 -0
  28. package/app/AppHead.js +10 -5
  29. package/app/AppHead.mjs +6 -0
  30. package/app/AppMain.js +2 -1
  31. package/app/AppMain.mjs +1 -0
  32. package/app/css/AppMain.js +11 -7
  33. package/app/css/AppMain.mjs +14 -0
  34. package/app/css/AppTheme.js +10 -6
  35. package/app/css/AppTheme.mjs +15 -0
  36. package/app/css/auth/index.js +13 -9
  37. package/app/css/auth/index.mjs +13 -0
  38. package/app/css/auth/package.json +2 -2
  39. package/app/css/index.js +12 -8
  40. package/{node/app/css/index.js → app/css/index.mjs} +8 -12
  41. package/app/css/package.json +2 -2
  42. package/app/em/AppMain.js +16 -12
  43. package/app/em/AppMain.mjs +25 -0
  44. package/app/em/AppTheme.js +16 -12
  45. package/app/em/AppTheme.mjs +19 -0
  46. package/app/em/auth/index.js +13 -9
  47. package/app/em/auth/index.mjs +13 -0
  48. package/app/em/auth/package.json +2 -2
  49. package/app/em/index.js +12 -8
  50. package/app/em/index.mjs +12 -0
  51. package/app/em/package.json +2 -2
  52. package/app/index.js +5 -2
  53. package/app/index.mjs +2 -0
  54. package/app/package.json +2 -2
  55. package/app/sc/AppMain.js +16 -12
  56. package/app/sc/AppMain.mjs +25 -0
  57. package/app/sc/AppTheme.js +11 -7
  58. package/app/sc/AppTheme.mjs +12 -0
  59. package/app/sc/auth/index.js +13 -9
  60. package/app/sc/auth/index.mjs +13 -0
  61. package/app/sc/auth/package.json +2 -2
  62. package/app/sc/index.js +12 -8
  63. package/{node/app/sc/index.js → app/sc/index.mjs} +8 -12
  64. package/app/sc/package.json +2 -2
  65. package/auth/helpers.js +13 -7
  66. package/auth/helpers.mjs +22 -0
  67. package/auth/index.js +7 -4
  68. package/auth/index.mjs +4 -0
  69. package/auth/package.json +2 -2
  70. package/auth/useLogin.js +22 -18
  71. package/auth/useLogin.mjs +50 -0
  72. package/auth/useLoginUrl.js +13 -9
  73. package/auth/useLoginUrl.mjs +12 -0
  74. package/auth/useLogout.js +23 -18
  75. package/auth/useLogout.mjs +53 -0
  76. package/config/index.js +36 -25
  77. package/{node/config/index.js → config/index.mjs} +25 -36
  78. package/config/package.json +2 -2
  79. package/createEmotionCache.js +9 -4
  80. package/createEmotionCache.mjs +9 -0
  81. package/document/Document.js +13 -10
  82. package/document/Document.mjs +28 -0
  83. package/document/css/index.js +18 -15
  84. package/document/css/index.mjs +45 -0
  85. package/document/css/package.json +2 -2
  86. package/document/em/index.js +22 -19
  87. package/document/em/index.mjs +60 -0
  88. package/document/em/package.json +2 -2
  89. package/document/index.js +7 -2
  90. package/document/index.mjs +2 -0
  91. package/document/package.json +2 -2
  92. package/document/sc/index.js +21 -18
  93. package/document/sc/index.mjs +64 -0
  94. package/document/sc/package.json +2 -2
  95. package/getSiteUrl.js +9 -4
  96. package/getSiteUrl.mjs +12 -0
  97. package/getT.js +7 -3
  98. package/{node/getT.js → getT.mjs} +3 -7
  99. package/index.js +31 -28
  100. package/index.mjs +30 -0
  101. package/load.js +6 -2
  102. package/{node/load.js → load.mjs} +2 -6
  103. package/package.json +36 -30
  104. package/revalidate.js +5 -2
  105. package/revalidate.mjs +5 -0
  106. package/seoBuildTags.js +17 -13
  107. package/{node/seoBuildTags.js → seoBuildTags.mjs} +13 -17
  108. package/to.js +6 -2
  109. package/{node/to.js → to.mjs} +2 -6
  110. package/translationAsOptions.js +5 -1
  111. package/{node/translationAsOptions.js → translationAsOptions.mjs} +1 -5
  112. package/types-i18n.js +2 -1
  113. package/{node/types-i18n.js → types-i18n.mjs} +1 -2
  114. package/types-seo.js +2 -1
  115. package/types-seo.mjs +1 -0
  116. package/useBackUrl.js +15 -10
  117. package/useBackUrl.mjs +27 -0
  118. package/useDateFormat.js +17 -13
  119. package/useDateFormat.mjs +38 -0
  120. package/useForm.js +14 -10
  121. package/{node/useForm.js → useForm.mjs} +10 -14
  122. package/useLocale.js +9 -4
  123. package/useLocale.mjs +5 -0
  124. package/useT.js +11 -6
  125. package/{node/useT.js → useT.mjs} +6 -11
  126. package/useTheme.js +8 -4
  127. package/useTheme.mjs +7 -0
  128. package/useTo.js +11 -7
  129. package/useTo.mjs +14 -0
  130. package/NextImg.d.ts +0 -16
  131. package/NextImg.js +0 -20
  132. package/NextImgSmart.d.ts +0 -6
  133. package/NextImgSmart.js +0 -13
  134. package/node/AnalyticsGoogle.js +0 -38
  135. package/node/DisableErrorOverlay.js +0 -18
  136. package/node/DynamicNamespaces.js +0 -12
  137. package/node/Favicon.js +0 -10
  138. package/node/Head.js +0 -7
  139. package/node/Link.js +0 -15
  140. package/node/SeoDefaults.js +0 -17
  141. package/node/T.js +0 -14
  142. package/node/ThemeContext.js +0 -10
  143. package/node/TransText.js +0 -7
  144. package/node/app/AppHead.js +0 -11
  145. package/node/app/AppMain.js +0 -2
  146. package/node/app/css/AppMain.js +0 -18
  147. package/node/app/css/AppTheme.js +0 -19
  148. package/node/app/css/auth/index.js +0 -17
  149. package/node/app/em/AppMain.js +0 -29
  150. package/node/app/em/AppTheme.js +0 -23
  151. package/node/app/em/auth/index.js +0 -17
  152. package/node/app/em/index.js +0 -16
  153. package/node/app/index.js +0 -5
  154. package/node/app/sc/AppMain.js +0 -29
  155. package/node/app/sc/AppTheme.js +0 -16
  156. package/node/app/sc/auth/index.js +0 -17
  157. package/node/auth/helpers.js +0 -28
  158. package/node/auth/index.js +0 -7
  159. package/node/auth/useLogin.js +0 -54
  160. package/node/auth/useLoginUrl.js +0 -16
  161. package/node/auth/useLogout.js +0 -58
  162. package/node/createEmotionCache.js +0 -14
  163. package/node/document/Document.js +0 -31
  164. package/node/document/css/index.js +0 -48
  165. package/node/document/em/index.js +0 -63
  166. package/node/document/index.js +0 -7
  167. package/node/document/sc/index.js +0 -67
  168. package/node/getSiteUrl.js +0 -17
  169. package/node/index.js +0 -33
  170. package/node/revalidate.js +0 -8
  171. package/node/types-seo.js +0 -2
  172. package/node/useBackUrl.js +0 -32
  173. package/node/useDateFormat.js +0 -42
  174. package/node/useLocale.js +0 -10
  175. package/node/useTheme.js +0 -11
  176. package/node/useTo.js +0 -18
@@ -1,17 +1,20 @@
1
- import { __assign } from "tslib";
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) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnalyticsGoogle = 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 router_1 = require("next/router");
8
+ var script_1 = tslib_1.__importDefault(require("next/script"));
9
+ var gtagPageview_1 = tslib_1.__importDefault(require("@koine/browser/gtagPageview"));
10
+ var AnalyticsGoogle = function (_a) {
8
11
  var id = _a.id;
9
12
  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
+ var _b = (0, router_1.useRouter)(), events = _b.events, asPath = _b.asPath, query = _b.query;
14
+ var _c = (0, react_1.useState)(false), ready = _c[0], setReady = _c[1];
15
+ var _d = (0, react_1.useState)(false), routed = _d[0], setRouted = _d[1];
13
16
  // const [url, setUrl] = useState("");
14
- useEffect(function () {
17
+ (0, react_1.useEffect)(function () {
15
18
  var handleRouteChange = function () {
16
19
  setRouted(true);
17
20
  };
@@ -20,15 +23,16 @@ export var AnalyticsGoogle = function (_a) {
20
23
  events.off("routeChangeComplete", handleRouteChange);
21
24
  };
22
25
  }, [events]);
23
- useEffect(function () {
26
+ (0, react_1.useEffect)(function () {
24
27
  if (routed && ready && asPath) {
25
28
  // const search = query;
26
- gtagPageview(asPath);
29
+ (0, gtagPageview_1.default)(asPath);
27
30
  }
28
31
  }, [asPath, query, routed, ready]);
29
32
  if (!uid) {
30
33
  return null;
31
34
  }
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, __assign({ 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 ") }))] }));
35
+ 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, tslib_1.__assign({ 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
36
  };
34
- export default AnalyticsGoogle;
37
+ exports.AnalyticsGoogle = AnalyticsGoogle;
38
+ exports.default = exports.AnalyticsGoogle;
@@ -0,0 +1,34 @@
1
+ import { __assign } from "tslib";
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, __assign({ 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,13 +1,18 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Head from "next/head";
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"));
3
7
  /**
4
8
  * Disable error overlay during `dev`
5
9
  *
6
10
  * @see https://github.com/vercel/next.js/discussions/13387#discussioncomment-101564
7
11
  */
8
- export var DisableErrorOverlay = function () {
9
- return (_jsx(Head, { children: process.env["NODE_ENV"] !== "production" && (_jsx("script", { dangerouslySetInnerHTML: {
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: {
10
14
  __html: "window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});",
11
15
  } })) }));
12
16
  };
13
- export default DisableErrorOverlay;
17
+ exports.DisableErrorOverlay = DisableErrorOverlay;
18
+ exports.default = exports.DisableErrorOverlay;
@@ -0,0 +1,13 @@
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,8 +1,12 @@
1
- import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamicNamespaces = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var DynamicNamespaces_1 = tslib_1.__importDefault(require("next-translate/DynamicNamespaces"));
2
6
  /**
3
7
  * **NOTE**: To make typescript work nicely here make sure to enable
4
8
  * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
5
9
  * in your `tsconfig.json` file.
6
10
  */
7
- export var DynamicNamespaces = BaseDynamicNamespaces;
8
- export default DynamicNamespaces;
11
+ exports.DynamicNamespaces = DynamicNamespaces_1.default;
12
+ exports.default = exports.DynamicNamespaces;
@@ -0,0 +1,8 @@
1
+ import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
2
+ /**
3
+ * **NOTE**: To make typescript work nicely here make sure to enable
4
+ * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
5
+ * in your `tsconfig.json` file.
6
+ */
7
+ export var DynamicNamespaces = BaseDynamicNamespaces;
8
+ export default DynamicNamespaces;
package/Favicon.js CHANGED
@@ -1,6 +1,10 @@
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;
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/Favicon.mjs ADDED
@@ -0,0 +1,6 @@
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/Head.js CHANGED
@@ -1,3 +1,7 @@
1
- import NextHead from "next/head";
2
- export var Head = NextHead;
3
- export default Head;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Head = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var head_1 = tslib_1.__importDefault(require("next/head"));
6
+ exports.Head = head_1.default;
7
+ exports.default = exports.Head;
package/Head.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import NextHead from "next/head";
2
+ export var Head = NextHead;
3
+ export default Head;
package/Link.d.ts CHANGED
@@ -6,5 +6,5 @@ export type LinkProps = Omit<React.ComponentPropsWithRef<"a">, "href"> & Omit<Ne
6
6
  /**
7
7
  * @see https://next.js.org/docs/api-reference/next/link
8
8
  */
9
- export declare const Link: React.ForwardRefExoticComponent<Pick<LinkProps, "key" | "title" | "children" | "replace" | "slot" | "style" | "hidden" | "media" | "href" | "hrefLang" | "referrerPolicy" | "rel" | "type" | "locale" | "property" | "id" | "prefetch" | "onLoad" | "dangerouslySetInnerHTML" | "color" | "download" | "ping" | "target" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "scroll" | "shallow" | "legacyBehavior" | "Link"> & React.RefAttributes<HTMLAnchorElement>>;
9
+ export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
10
10
  export default Link;
package/Link.js CHANGED
@@ -1,12 +1,15 @@
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";
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"));
5
8
  /**
6
9
  * @see https://next.js.org/docs/api-reference/next/link
7
10
  */
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, __assign({ href: href, replace: replace, scroll: scroll, shallow: shallow, locale: locale, passHref: true }, { children: _jsx(Link, __assign({ ref: ref }, props)) })));
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, tslib_1.__assign({ 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)) })));
11
14
  });
12
- export default Link;
15
+ exports.default = exports.Link;
package/Link.mjs ADDED
@@ -0,0 +1,12 @@
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, __assign({ href: href, replace: replace, scroll: scroll, shallow: shallow, locale: locale, passHref: true }, { children: _jsx(Link, __assign({ ref: ref }, props)) })));
11
+ });
12
+ export default Link;
package/NextProgress.js CHANGED
@@ -1,20 +1,23 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useRef, useState } from "react";
3
- import { useRouter } from "next/router";
4
- export var NextProgress = function (_a) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NextProgress = void 0;
4
+ var jsx_runtime_1 = require("react/jsx-runtime");
5
+ var react_1 = require("react");
6
+ var router_1 = require("next/router");
7
+ var NextProgress = function (_a) {
5
8
  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;
6
- var events = useRouter().events;
9
+ var events = (0, router_1.useRouter)().events;
7
10
  // const [progress, setProgress] = useState(0);
8
- var _f = useState(false), running = _f[0], setRunning = _f[1];
9
- var timer = useRef(null);
10
- var routeChangeStart = useCallback(function (_, _a) {
11
+ var _f = (0, react_1.useState)(false), running = _f[0], setRunning = _f[1];
12
+ var timer = (0, react_1.useRef)(null);
13
+ var routeChangeStart = (0, react_1.useCallback)(function (_, _a) {
11
14
  var shallow = _a.shallow;
12
15
  if (!shallow || showOnShallow) {
13
16
  // setProgress(startAt);
14
17
  setRunning(true);
15
18
  }
16
19
  }, [showOnShallow]);
17
- var routeChangeEnd = useCallback(function (_, _a) {
20
+ var routeChangeEnd = (0, react_1.useCallback)(function (_, _a) {
18
21
  var shallow = _a.shallow;
19
22
  if (!shallow || showOnShallow) {
20
23
  if (timer.current) {
@@ -26,7 +29,7 @@ export var NextProgress = function (_a) {
26
29
  }, stopDelayMs);
27
30
  }
28
31
  }, [showOnShallow, stopDelayMs, timer]);
29
- useEffect(function () {
32
+ (0, react_1.useEffect)(function () {
30
33
  events.on("routeChangeStart", routeChangeStart);
31
34
  events.on("routeChangeComplete", routeChangeEnd);
32
35
  events.on("routeChangeError", routeChangeEnd);
@@ -36,6 +39,7 @@ export var NextProgress = function (_a) {
36
39
  events.off("routeChangeError", routeChangeEnd);
37
40
  };
38
41
  }, [events, routeChangeStart, routeChangeEnd]);
39
- return _jsx(Overlay, { running: running });
42
+ return (0, jsx_runtime_1.jsx)(Overlay, { running: running });
40
43
  };
41
- export default NextProgress;
44
+ exports.NextProgress = NextProgress;
45
+ exports.default = exports.NextProgress;
@@ -1,23 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NextProgress = void 0;
4
- var jsx_runtime_1 = require("react/jsx-runtime");
5
- var react_1 = require("react");
6
- var router_1 = require("next/router");
7
- var NextProgress = function (_a) {
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useRef, useState } from "react";
3
+ import { useRouter } from "next/router";
4
+ export var NextProgress = function (_a) {
8
5
  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;
9
- var events = (0, router_1.useRouter)().events;
6
+ var events = useRouter().events;
10
7
  // const [progress, setProgress] = useState(0);
11
- var _f = (0, react_1.useState)(false), running = _f[0], setRunning = _f[1];
12
- var timer = (0, react_1.useRef)(null);
13
- var routeChangeStart = (0, react_1.useCallback)(function (_, _a) {
8
+ var _f = useState(false), running = _f[0], setRunning = _f[1];
9
+ var timer = useRef(null);
10
+ var routeChangeStart = useCallback(function (_, _a) {
14
11
  var shallow = _a.shallow;
15
12
  if (!shallow || showOnShallow) {
16
13
  // setProgress(startAt);
17
14
  setRunning(true);
18
15
  }
19
16
  }, [showOnShallow]);
20
- var routeChangeEnd = (0, react_1.useCallback)(function (_, _a) {
17
+ var routeChangeEnd = useCallback(function (_, _a) {
21
18
  var shallow = _a.shallow;
22
19
  if (!shallow || showOnShallow) {
23
20
  if (timer.current) {
@@ -29,7 +26,7 @@ var NextProgress = function (_a) {
29
26
  }, stopDelayMs);
30
27
  }
31
28
  }, [showOnShallow, stopDelayMs, timer]);
32
- (0, react_1.useEffect)(function () {
29
+ useEffect(function () {
33
30
  events.on("routeChangeStart", routeChangeStart);
34
31
  events.on("routeChangeComplete", routeChangeEnd);
35
32
  events.on("routeChangeError", routeChangeEnd);
@@ -39,7 +36,6 @@ var NextProgress = function (_a) {
39
36
  events.off("routeChangeError", routeChangeEnd);
40
37
  };
41
38
  }, [events, routeChangeStart, routeChangeEnd]);
42
- return (0, jsx_runtime_1.jsx)(Overlay, { running: running });
39
+ return _jsx(Overlay, { running: running });
43
40
  };
44
- exports.NextProgress = NextProgress;
45
- exports.default = exports.NextProgress;
41
+ export default NextProgress;
package/Seo.js CHANGED
@@ -1,7 +1,11 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
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");
2
6
  // import { memo } from "react";
3
- import Head from "next/head";
4
- import { seoBuildTags } from "./seoBuildTags";
7
+ var head_1 = tslib_1.__importDefault(require("next/head"));
8
+ var seoBuildTags_1 = require("./seoBuildTags");
5
9
  /**
6
10
  * Adapted from [garmeeh/next-seo](https://github.com/garmeeh/next-seo)
7
11
  *
@@ -23,7 +27,8 @@ import { seoBuildTags } from "./seoBuildTags";
23
27
  * <Seo title="MyApp | Some description" titleTemplate="%s" />
24
28
  * ```
25
29
  */
26
- export var Seo = function (props) {
27
- return _jsx(Head, { children: seoBuildTags(props) });
30
+ var Seo = function (props) {
31
+ return (0, jsx_runtime_1.jsx)(head_1.default, { children: (0, seoBuildTags_1.seoBuildTags)(props) });
28
32
  };
29
- export default Seo;
33
+ exports.Seo = Seo;
34
+ exports.default = exports.Seo;
@@ -1,11 +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");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
6
2
  // import { memo } from "react";
7
- var head_1 = tslib_1.__importDefault(require("next/head"));
8
- var seoBuildTags_1 = require("./seoBuildTags");
3
+ import Head from "next/head";
4
+ import { seoBuildTags } from "./seoBuildTags";
9
5
  /**
10
6
  * Adapted from [garmeeh/next-seo](https://github.com/garmeeh/next-seo)
11
7
  *
@@ -27,8 +23,7 @@ var seoBuildTags_1 = require("./seoBuildTags");
27
23
  * <Seo title="MyApp | Some description" titleTemplate="%s" />
28
24
  * ```
29
25
  */
30
- var Seo = function (props) {
31
- return (0, jsx_runtime_1.jsx)(head_1.default, { children: (0, seoBuildTags_1.seoBuildTags)(props) });
26
+ export var Seo = function (props) {
27
+ return _jsx(Head, { children: seoBuildTags(props) });
32
28
  };
33
- exports.Seo = Seo;
34
- exports.default = exports.Seo;
29
+ export default Seo;
package/SeoDefaults.js CHANGED
@@ -1,12 +1,17 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
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");
2
6
  // import { memo } from "react";
3
- import Head from "next/head";
7
+ var head_1 = tslib_1.__importDefault(require("next/head"));
4
8
  // import { useRouter } from "next/router";
5
9
  // import { getSiteUrl } from "../utils";
6
- import { seoBuildTags } from "./seoBuildTags";
7
- export var SeoDefaults = function (props) {
10
+ var seoBuildTags_1 = require("./seoBuildTags");
11
+ var SeoDefaults = function (props) {
8
12
  // const router = useRouter();
9
13
  // props.openGraph.url = getSiteUrl(router.asPath);
10
- return _jsx(Head, { children: seoBuildTags(props) });
14
+ return (0, jsx_runtime_1.jsx)(head_1.default, { children: (0, seoBuildTags_1.seoBuildTags)(props) });
11
15
  };
12
- export default SeoDefaults;
16
+ exports.SeoDefaults = SeoDefaults;
17
+ exports.default = exports.SeoDefaults;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // import { memo } from "react";
3
+ import Head from "next/head";
4
+ // import { useRouter } from "next/router";
5
+ // import { getSiteUrl } from "../utils";
6
+ import { seoBuildTags } from "./seoBuildTags";
7
+ export var SeoDefaults = function (props) {
8
+ // const router = useRouter();
9
+ // props.openGraph.url = getSiteUrl(router.asPath);
10
+ return _jsx(Head, { children: seoBuildTags(props) });
11
+ };
12
+ export default SeoDefaults;
package/T.js CHANGED
@@ -1,10 +1,14 @@
1
- import { __assign } from "tslib";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import Trans from "next-translate/Trans";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.T = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var jsx_runtime_1 = require("react/jsx-runtime");
6
+ var Trans_1 = tslib_1.__importDefault(require("next-translate/Trans"));
4
7
  /**
5
8
  * **NOTE**: To make typescript work nicely here make sure to enable
6
9
  * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
7
10
  * in your `tsconfig.json` file.
8
11
  */
9
- export var T = function (props) { return _jsx(Trans, __assign({}, props)); };
10
- export default T;
12
+ var T = function (props) { return (0, jsx_runtime_1.jsx)(Trans_1.default, tslib_1.__assign({}, props)); };
13
+ exports.T = T;
14
+ exports.default = exports.T;
package/T.mjs ADDED
@@ -0,0 +1,10 @@
1
+ import { __assign } from "tslib";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import Trans from "next-translate/Trans";
4
+ /**
5
+ * **NOTE**: To make typescript work nicely here make sure to enable
6
+ * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
7
+ * in your `tsconfig.json` file.
8
+ */
9
+ export var T = function (props) { return _jsx(Trans, __assign({}, props)); };
10
+ export default T;
package/ThemeContext.js CHANGED
@@ -1,7 +1,10 @@
1
- import { createContext } from "react";
2
- export var ThemeContext = createContext({
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThemeContext = void 0;
4
+ var react_1 = require("react");
5
+ exports.ThemeContext = (0, react_1.createContext)({
3
6
  // eslint-disable-next-line @typescript-eslint/no-empty-function
4
7
  setTheme: function (_) { },
5
8
  themes: [],
6
9
  });
7
- export default ThemeContext;
10
+ exports.default = exports.ThemeContext;
@@ -0,0 +1,7 @@
1
+ import { createContext } from "react";
2
+ export var ThemeContext = createContext({
3
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
4
+ setTheme: function (_) { },
5
+ themes: [],
6
+ });
7
+ export default ThemeContext;