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

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 (112) hide show
  1. package/12/AnalyticsGoogle.js +65 -25
  2. package/12/AnalyticsGoogle.mjs +41 -15
  3. package/12/DisableErrorOverlay.js +29 -16
  4. package/12/DisableErrorOverlay.mjs +8 -5
  5. package/12/DynamicNamespaces.d.ts +1 -1
  6. package/12/DynamicNamespaces.js +22 -12
  7. package/12/DynamicNamespaces.mjs +1 -2
  8. package/12/Favicon.js +28 -9
  9. package/12/Favicon.mjs +6 -2
  10. package/12/Link.d.ts +1 -1
  11. package/12/Link.js +36 -13
  12. package/12/Link.mjs +14 -6
  13. package/12/NextProgress.js +47 -24
  14. package/12/NextProgress.mjs +26 -17
  15. package/12/Seo.d.ts +1 -1
  16. package/12/Seo.js +27 -32
  17. package/12/Seo.mjs +5 -4
  18. package/12/SeoDefaults.d.ts +1 -1
  19. package/12/SeoDefaults.js +27 -13
  20. package/12/SeoDefaults.mjs +5 -3
  21. package/12/T.d.ts +1 -1
  22. package/12/T.js +42 -16
  23. package/12/T.mjs +20 -6
  24. package/12/ThemeContext.js +22 -7
  25. package/12/ThemeContext.mjs +3 -3
  26. package/12/ThemeProvider.js +164 -147
  27. package/12/ThemeProvider.mjs +139 -129
  28. package/12/TransText.js +22 -7
  29. package/12/TransText.mjs +1 -1
  30. package/12/app/AppHead.js +29 -9
  31. package/12/app/AppHead.mjs +8 -2
  32. package/12/app/AppMain.d.ts +4 -4
  33. package/12/app/AppMain.js +5 -1
  34. package/12/app/AppMain.mjs +1 -1
  35. package/12/app/css/AppMain.js +37 -16
  36. package/12/app/css/AppMain.mjs +15 -5
  37. package/12/app/css/AppTheme.d.ts +1 -1
  38. package/12/app/css/AppTheme.js +28 -13
  39. package/12/app/css/AppTheme.mjs +7 -4
  40. package/12/app/css/auth/index.d.ts +1 -1
  41. package/12/app/css/auth/index.js +38 -15
  42. package/12/app/css/auth/index.mjs +17 -6
  43. package/12/app/css/index.d.ts +1 -1
  44. package/12/app/css/index.js +34 -59
  45. package/12/app/css/index.mjs +14 -6
  46. package/12/app/index.js +6 -4
  47. package/12/app/sc/AppMain.js +68 -27
  48. package/12/app/sc/AppMain.mjs +46 -13
  49. package/12/app/sc/AppTheme.d.ts +1 -1
  50. package/12/app/sc/AppTheme.js +31 -13
  51. package/12/app/sc/AppTheme.mjs +9 -4
  52. package/12/app/sc/auth/index.d.ts +1 -1
  53. package/12/app/sc/auth/index.js +38 -15
  54. package/12/app/sc/auth/index.mjs +17 -6
  55. package/12/app/sc/index.d.ts +1 -1
  56. package/12/app/sc/index.js +34 -61
  57. package/12/app/sc/index.mjs +14 -6
  58. package/12/document/Document.js +47 -29
  59. package/12/document/Document.mjs +24 -14
  60. package/12/document/css/index.js +47 -32
  61. package/12/document/css/index.mjs +26 -18
  62. package/12/document/index.js +18 -6
  63. package/12/document/sc/index.js +71 -65
  64. package/12/document/sc/index.mjs +46 -45
  65. package/12/getT.js +22 -13
  66. package/12/getT.mjs +2 -4
  67. package/12/index.js +99 -51
  68. package/12/index.mjs +2 -2
  69. package/12/seoBuildTags.js +81 -76
  70. package/12/seoBuildTags.mjs +59 -55
  71. package/12/to.js +21 -19
  72. package/12/to.mjs +4 -10
  73. package/12/translationAsOptions.js +15 -9
  74. package/12/translationAsOptions.mjs +6 -6
  75. package/12/types-i18n.js +4 -3
  76. package/12/types-i18n.mjs +1 -2
  77. package/12/types-seo.js +3 -1
  78. package/12/types-seo.mjs +1 -1
  79. package/12/useBackUrl.js +30 -16
  80. package/12/useBackUrl.mjs +8 -8
  81. package/12/useDateFormat.js +37 -38
  82. package/12/useDateFormat.mjs +15 -28
  83. package/12/useForm.d.ts +1 -1
  84. package/12/useForm.js +46 -20
  85. package/12/useForm.mjs +25 -13
  86. package/12/useLocale.js +22 -8
  87. package/12/useT.d.ts +1 -1
  88. package/12/useT.js +53 -39
  89. package/12/useT.mjs +32 -14
  90. package/12/useTheme.js +22 -11
  91. package/12/useTheme.mjs +1 -2
  92. package/12/useTo.js +23 -16
  93. package/12/useTo.mjs +3 -10
  94. package/README.md +1 -1
  95. package/config/index.js +225 -251
  96. package/config/index.mjs +187 -204
  97. package/getSiteUrl.js +22 -15
  98. package/getSiteUrl.mjs +2 -4
  99. package/index.js +19 -6
  100. package/load.js +21 -8
  101. package/load.mjs +3 -4
  102. package/package.json +19 -17
  103. package/12/app/css/auth/package.json +0 -6
  104. package/12/app/css/package.json +0 -6
  105. package/12/app/package.json +0 -6
  106. package/12/app/sc/auth/package.json +0 -6
  107. package/12/app/sc/package.json +0 -6
  108. package/12/document/css/package.json +0 -6
  109. package/12/document/package.json +0 -6
  110. package/12/document/sc/package.json +0 -6
  111. package/12/package.json +0 -6
  112. package/config/package.json +0 -6
package/12/Seo.js CHANGED
@@ -1,34 +1,29 @@
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
1
  // 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) });
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ Seo: function() {
14
+ return Seo;
15
+ },
16
+ default: function() {
17
+ return _default;
18
+ }
19
+ });
20
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
21
+ const _jsxruntime = require("react/jsx-runtime");
22
+ const _head = /*#__PURE__*/ _interop_require_default._(require("next/head"));
23
+ const _seoBuildTags = require("./seoBuildTags");
24
+ const Seo = (props)=>{
25
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_head.default, {
26
+ children: (0, _seoBuildTags.seoBuildTags)(props)
27
+ });
32
28
  };
33
- exports.Seo = Seo;
34
- exports.default = exports.Seo;
29
+ const _default = Seo;
package/12/Seo.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  // import { memo } from "react";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import Head from "next/head";
4
4
  import { seoBuildTags } from "./seoBuildTags";
5
5
  /**
@@ -22,8 +22,9 @@ import { seoBuildTags } from "./seoBuildTags";
22
22
  * ```js
23
23
  * <Seo title="MyApp | Some description" titleTemplate="%s" />
24
24
  * ```
25
- */
26
- export var Seo = function (props) {
27
- return _jsx(Head, { children: seoBuildTags(props) });
25
+ */ export const Seo = (props)=>{
26
+ return /*#__PURE__*/ _jsx(Head, {
27
+ children: seoBuildTags(props)
28
+ });
28
29
  };
29
30
  export default Seo;
@@ -1,5 +1,5 @@
1
1
  import type { DefaultSeoProps } from "next-seo/lib/types";
2
- import { type MetaTag, type LinkTag } from "./seoBuildTags";
2
+ import { type LinkTag, type MetaTag } from "./seoBuildTags";
3
3
  /**
4
4
  * @see https://github.com/garmeeh/next-seo/blob/master/src/types.ts#L413
5
5
  */
package/12/SeoDefaults.js CHANGED
@@ -1,17 +1,31 @@
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
1
  // 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) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ SeoDefaults: function() {
14
+ return SeoDefaults;
15
+ },
16
+ default: function() {
17
+ return _default;
18
+ }
19
+ });
20
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
21
+ const _jsxruntime = require("react/jsx-runtime");
22
+ const _head = /*#__PURE__*/ _interop_require_default._(require("next/head"));
23
+ const _seoBuildTags = require("./seoBuildTags");
24
+ const SeoDefaults = (props)=>{
12
25
  // const router = useRouter();
13
26
  // props.openGraph.url = getSiteUrl(router.asPath);
14
- return (0, jsx_runtime_1.jsx)(head_1.default, { children: (0, seoBuildTags_1.seoBuildTags)(props) });
27
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_head.default, {
28
+ children: (0, _seoBuildTags.seoBuildTags)(props)
29
+ });
15
30
  };
16
- exports.SeoDefaults = SeoDefaults;
17
- exports.default = exports.SeoDefaults;
31
+ const _default = SeoDefaults;
@@ -1,12 +1,14 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  // import { memo } from "react";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import Head from "next/head";
4
4
  // import { useRouter } from "next/router";
5
5
  // import { getSiteUrl } from "../utils";
6
6
  import { seoBuildTags } from "./seoBuildTags";
7
- export var SeoDefaults = function (props) {
7
+ export const SeoDefaults = (props)=>{
8
8
  // const router = useRouter();
9
9
  // props.openGraph.url = getSiteUrl(router.asPath);
10
- return _jsx(Head, { children: seoBuildTags(props) });
10
+ return /*#__PURE__*/ _jsx(Head, {
11
+ children: seoBuildTags(props)
12
+ });
11
13
  };
12
14
  export default SeoDefaults;
package/12/T.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { TransProps } from "next-translate";
3
- import type { TranslateNamespace, TranslationsPaths, TranslationsAllPaths } from "./types-i18n";
3
+ import type { TranslateNamespace, TranslationsAllPaths, TranslationsPaths } from "./types-i18n";
4
4
  export type TProps<TNamespace extends TranslateNamespace | undefined = undefined> = (Omit<TransProps, "i18nKey" | "ns"> & {
5
5
  i18nKey: TranslationsAllPaths;
6
6
  }) | (Omit<TransProps, "i18nKey" | "ns"> & {
package/12/T.js CHANGED
@@ -1,17 +1,43 @@
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)));
15
- };
16
- exports.T = T;
17
- exports.default = exports.T;
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ T: function() {
14
+ return T;
15
+ },
16
+ default: function() {
17
+ return _default // export type TProps = Omit<TransProps, "i18nKey" | "ns"> & {
18
+ // i18nKey: TranslationsAllPaths;
19
+ // };
20
+ // export type TPropsNamespaced<
21
+ // TNamespace extends TranslateNamespace
22
+ // > = Omit<TransProps, "i18nKey" | "ns"> & {
23
+ // i18nKey: TranslationsPaths<Translations[TNamespace]>;
24
+ // ns?: TNamespace;
25
+ // };
26
+ // export function T(props: TProps): JSX.Element;
27
+ // export function T<TNamespace extends TranslateNamespace>(props: TPropsNamespaced<TNamespace>): JSX.Element;
28
+ // export function T<TNamespace extends TranslateNamespace>(
29
+ // props: TProps<TNamespace>
30
+ // ) {
31
+ // return <Trans {...props} />;
32
+ // }
33
+ // export { default as T } from "next-translate/Trans";
34
+ ;
35
+ }
36
+ });
37
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
38
+ const _jsxruntime = require("react/jsx-runtime");
39
+ const _Trans = /*#__PURE__*/ _interop_require_default._(require("next-translate/Trans"));
40
+ const T = (props)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_Trans.default, {
41
+ ...props
42
+ });
43
+ const _default = T;
package/12/T.mjs CHANGED
@@ -1,13 +1,27 @@
1
1
  "use client";
2
- import { __assign } from "tslib";
3
2
  import { jsx as _jsx } from "react/jsx-runtime";
4
3
  import Trans from "next-translate/Trans";
5
4
  /**
6
5
  * **NOTE**: To make typescript work nicely here make sure to enable
7
6
  * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
8
7
  * in your `tsconfig.json` file.
9
- */
10
- export var T = function (props) {
11
- return (_jsx(Trans, __assign({}, props)));
12
- };
13
- export default T;
8
+ */ export const T = (props)=>/*#__PURE__*/ _jsx(Trans, {
9
+ ...props
10
+ });
11
+ export default T; // export type TProps = Omit<TransProps, "i18nKey" | "ns"> & {
12
+ // i18nKey: TranslationsAllPaths;
13
+ // };
14
+ // export type TPropsNamespaced<
15
+ // TNamespace extends TranslateNamespace
16
+ // > = Omit<TransProps, "i18nKey" | "ns"> & {
17
+ // i18nKey: TranslationsPaths<Translations[TNamespace]>;
18
+ // ns?: TNamespace;
19
+ // };
20
+ // export function T(props: TProps): JSX.Element;
21
+ // export function T<TNamespace extends TranslateNamespace>(props: TPropsNamespaced<TNamespace>): JSX.Element;
22
+ // export function T<TNamespace extends TranslateNamespace>(
23
+ // props: TProps<TNamespace>
24
+ // ) {
25
+ // return <Trans {...props} />;
26
+ // }
27
+ // export { default as T } from "next-translate/Trans";
@@ -1,10 +1,25 @@
1
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)({
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ ThemeContext: function() {
13
+ return ThemeContext;
14
+ },
15
+ default: function() {
16
+ return _default;
17
+ }
18
+ });
19
+ const _react = require("react");
20
+ const ThemeContext = /*#__PURE__*/ (0, _react.createContext)({
6
21
  // eslint-disable-next-line @typescript-eslint/no-empty-function
7
- setTheme: function (_) { },
8
- themes: [],
22
+ setTheme: (_)=>{},
23
+ themes: []
9
24
  });
10
- exports.default = exports.ThemeContext;
25
+ const _default = ThemeContext;
@@ -1,7 +1,7 @@
1
1
  import { createContext } from "react";
2
- export var ThemeContext = createContext({
2
+ export const ThemeContext = /*#__PURE__*/ createContext({
3
3
  // eslint-disable-next-line @typescript-eslint/no-empty-function
4
- setTheme: function (_) { },
5
- themes: [],
4
+ setTheme: (_)=>{},
5
+ themes: []
6
6
  });
7
7
  export default ThemeContext;