@koine/next 2.0.0-beta.16 → 2.0.0-beta.18

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 (95) hide show
  1. package/12/AnalyticsGoogle.d.ts +0 -0
  2. package/12/AnalyticsGoogle.js +3 -2
  3. package/12/DisableErrorOverlay.d.ts +0 -0
  4. package/12/DisableErrorOverlay.js +0 -0
  5. package/12/DynamicNamespaces.d.ts +0 -0
  6. package/12/DynamicNamespaces.js +0 -0
  7. package/12/Favicon.d.ts +0 -0
  8. package/12/Favicon.js +0 -0
  9. package/12/Link.d.ts +0 -0
  10. package/12/Link.js +0 -0
  11. package/12/NextProgress.d.ts +0 -0
  12. package/12/NextProgress.js +2 -1
  13. package/12/Seo.d.ts +0 -0
  14. package/12/Seo.js +0 -0
  15. package/12/SeoDefaults.d.ts +0 -0
  16. package/12/SeoDefaults.js +0 -0
  17. package/12/T.d.ts +0 -0
  18. package/12/T.js +0 -0
  19. package/12/TransText.d.ts +0 -0
  20. package/12/TransText.js +0 -0
  21. package/12/app/AppHead.d.ts +0 -0
  22. package/12/app/AppHead.js +0 -0
  23. package/12/app/AppMain.d.ts +0 -0
  24. package/12/app/AppMain.js +0 -0
  25. package/12/app/css/AppMain.d.ts +0 -0
  26. package/12/app/css/AppMain.js +0 -0
  27. package/12/app/css/AppTheme.d.ts +0 -0
  28. package/12/app/css/AppTheme.js +0 -0
  29. package/12/app/css/auth/index.d.ts +0 -0
  30. package/12/app/css/auth/index.js +0 -0
  31. package/12/app/css/index.d.ts +0 -0
  32. package/12/app/css/index.js +0 -0
  33. package/12/app/index.d.ts +0 -0
  34. package/12/app/index.js +0 -0
  35. package/12/app/sc/AppMain.d.ts +0 -0
  36. package/12/app/sc/AppMain.js +0 -0
  37. package/12/app/sc/AppTheme.d.ts +0 -0
  38. package/12/app/sc/AppTheme.js +0 -0
  39. package/12/app/sc/auth/index.d.ts +0 -0
  40. package/12/app/sc/auth/index.js +0 -0
  41. package/12/app/sc/index.d.ts +0 -0
  42. package/12/app/sc/index.js +0 -0
  43. package/12/document/Document.d.ts +0 -0
  44. package/12/document/Document.js +0 -0
  45. package/12/document/css/index.d.ts +0 -0
  46. package/12/document/css/index.js +0 -0
  47. package/12/document/index.d.ts +0 -0
  48. package/12/document/index.js +0 -0
  49. package/12/document/sc/index.d.ts +0 -0
  50. package/12/document/sc/index.js +0 -0
  51. package/12/getT.d.ts +0 -0
  52. package/12/getT.js +0 -0
  53. package/12/index.d.ts +0 -0
  54. package/12/index.js +0 -0
  55. package/12/seoBuildTags.d.ts +0 -0
  56. package/12/seoBuildTags.js +0 -0
  57. package/12/to.d.ts +0 -0
  58. package/12/to.js +2 -1
  59. package/12/translationAsOptions.d.ts +0 -0
  60. package/12/translationAsOptions.js +0 -0
  61. package/12/types-i18n.d.ts +0 -0
  62. package/12/types-i18n.js +0 -0
  63. package/12/types-seo.d.ts +0 -0
  64. package/12/types-seo.js +0 -0
  65. package/12/types.d.ts +0 -0
  66. package/12/types.js +0 -0
  67. package/12/useBackUrl.d.ts +0 -0
  68. package/12/useBackUrl.js +2 -1
  69. package/12/useDateFormat.d.ts +0 -0
  70. package/12/useDateFormat.js +5 -5
  71. package/12/useForm.d.ts +0 -0
  72. package/12/useForm.js +0 -0
  73. package/12/useLocale.d.ts +0 -0
  74. package/12/useLocale.js +0 -0
  75. package/12/useT.d.ts +0 -0
  76. package/12/useT.js +0 -0
  77. package/12/useTo.d.ts +0 -0
  78. package/12/useTo.js +2 -2
  79. package/ThemeContext.d.ts +0 -0
  80. package/ThemeContext.js +0 -0
  81. package/ThemeProvider.d.ts +0 -0
  82. package/ThemeProvider.js +7 -7
  83. package/config-i18n.d.ts +52 -0
  84. package/config-i18n.js +251 -0
  85. package/config.d.ts +99 -27
  86. package/config.js +21 -149
  87. package/getSiteUrl.d.ts +0 -0
  88. package/getSiteUrl.js +0 -0
  89. package/index.d.ts +0 -0
  90. package/index.js +0 -0
  91. package/load.d.ts +0 -0
  92. package/load.js +0 -0
  93. package/package.json +7 -4
  94. package/useTheme.d.ts +0 -0
  95. package/useTheme.js +0 -0
File without changes
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { __read } from "tslib";
2
3
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
4
  import { useRouter } from "next/router";
4
5
  import Script from "next/script";
@@ -8,8 +9,8 @@ export var AnalyticsGoogle = function (_a) {
8
9
  var id = _a.id;
9
10
  var uid = id || process.env["NEXT_PUBLIC_GTM_ID"];
10
11
  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];
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];
13
14
  useEffect(function () {
14
15
  var handleRouteChange = function () {
15
16
  setRouted(true);
File without changes
File without changes
File without changes
File without changes
package/12/Favicon.d.ts CHANGED
File without changes
package/12/Favicon.js CHANGED
File without changes
package/12/Link.d.ts CHANGED
File without changes
package/12/Link.js CHANGED
File without changes
File without changes
@@ -1,11 +1,12 @@
1
1
  "use client";
2
+ import { __read } from "tslib";
2
3
  import { jsx as _jsx } from "react/jsx-runtime";
3
4
  import { useRouter } from "next/router";
4
5
  import { useCallback, useEffect, useRef, useState } from "react";
5
6
  export var NextProgress = function (_a) {
6
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;
7
8
  var events = useRouter().events;
8
- var _f = useState(false), running = _f[0], setRunning = _f[1];
9
+ var _f = __read(useState(false), 2), running = _f[0], setRunning = _f[1];
9
10
  var timer = useRef(null);
10
11
  var routeChangeStart = useCallback(function (_, _a) {
11
12
  var shallow = _a.shallow;
package/12/Seo.d.ts CHANGED
File without changes
package/12/Seo.js CHANGED
File without changes
File without changes
package/12/SeoDefaults.js CHANGED
File without changes
package/12/T.d.ts CHANGED
File without changes
package/12/T.js CHANGED
File without changes
package/12/TransText.d.ts CHANGED
File without changes
package/12/TransText.js CHANGED
File without changes
File without changes
package/12/app/AppHead.js CHANGED
File without changes
File without changes
package/12/app/AppMain.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/12/app/index.d.ts CHANGED
File without changes
package/12/app/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/12/getT.d.ts CHANGED
File without changes
package/12/getT.js CHANGED
File without changes
package/12/index.d.ts CHANGED
File without changes
package/12/index.js CHANGED
File without changes
File without changes
File without changes
package/12/to.d.ts CHANGED
File without changes
package/12/to.js CHANGED
@@ -1,10 +1,11 @@
1
+ import { __read } from "tslib";
1
2
  export function to() {
2
3
  var args = [];
3
4
  for (var _i = 0; _i < arguments.length; _i++) {
4
5
  args[_i] = arguments[_i];
5
6
  }
6
7
  var relative = "";
7
- var t = args[0];
8
+ var _a = __read(args, 1), t = _a[0];
8
9
  if (args.length === 3) {
9
10
  if (args[2]) {
10
11
  relative = t(args[1], args[2]).replace("*", "");
File without changes
File without changes
File without changes
package/12/types-i18n.js CHANGED
File without changes
package/12/types-seo.d.ts CHANGED
File without changes
package/12/types-seo.js CHANGED
File without changes
package/12/types.d.ts CHANGED
File without changes
package/12/types.js CHANGED
File without changes
File without changes
package/12/useBackUrl.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { __read } from "tslib";
2
3
  import { useRouter } from "next/router";
3
4
  import { useEffect, useRef, useState } from "react";
4
5
  import { createStorage } from "@koine/browser";
@@ -8,7 +9,7 @@ var back = createStorage({
8
9
  export function useBackUrl() {
9
10
  var asPath = useRouter().asPath;
10
11
  var calledOnce = useRef(false);
11
- var _a = useState(), backUrl = _a[0], setBackUrl = _a[1];
12
+ var _a = __read(useState(), 2), backUrl = _a[0], setBackUrl = _a[1];
12
13
  useEffect(function () {
13
14
  if (calledOnce.current) {
14
15
  return;
File without changes
@@ -1,19 +1,19 @@
1
1
  "use client";
2
- import { __assign } from "tslib";
2
+ import { __assign, __read, __spreadArray } from "tslib";
3
3
  import format from "date-fns/format";
4
4
  import { useRouter } from "next/router";
5
5
  import { useEffect, useState } from "react";
6
6
  import { useDateLocale } from "@koine/react";
7
7
  export var useDateFormat = function () {
8
- var _a = useState(function () {
8
+ var _a = __read(useState(function () {
9
9
  return function () {
10
10
  var args = [];
11
11
  for (var _i = 0; _i < arguments.length; _i++) {
12
12
  args[_i] = arguments[_i];
13
13
  }
14
- return format.apply(void 0, args);
14
+ return format.apply(void 0, __spreadArray([], __read(args), false));
15
15
  };
16
- }), formatter = _a[0], setFormatter = _a[1];
16
+ }), 2), formatter = _a[0], setFormatter = _a[1];
17
17
  var router = useRouter();
18
18
  var locale = useDateLocale(router.locale);
19
19
  useEffect(function () {
@@ -25,7 +25,7 @@ export var useDateFormat = function () {
25
25
  for (var _i = 0; _i < arguments.length; _i++) {
26
26
  args[_i] = arguments[_i];
27
27
  }
28
- return newFormatter_1.apply(void 0, args);
28
+ return newFormatter_1.apply(void 0, __spreadArray([], __read(args), false));
29
29
  };
30
30
  });
31
31
  }
package/12/useForm.d.ts CHANGED
File without changes
package/12/useForm.js CHANGED
File without changes
package/12/useLocale.d.ts CHANGED
File without changes
package/12/useLocale.js CHANGED
File without changes
package/12/useT.d.ts CHANGED
File without changes
package/12/useT.js CHANGED
File without changes
package/12/useTo.d.ts CHANGED
File without changes
package/12/useTo.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { __spreadArray } from "tslib";
2
+ import { __read, __spreadArray } from "tslib";
3
3
  import { to } from "./to.js";
4
4
  import { useT } from "./useT.js";
5
5
  export function useTo() {
@@ -9,7 +9,7 @@ export function useTo() {
9
9
  for (var _i = 0; _i < arguments.length; _i++) {
10
10
  args[_i] = arguments[_i];
11
11
  }
12
- return to.apply(void 0, __spreadArray([t], args, false));
12
+ return to.apply(void 0, __spreadArray([t], __read(args), false));
13
13
  };
14
14
  }
15
15
  export default useTo;
package/ThemeContext.d.ts CHANGED
File without changes
package/ThemeContext.js CHANGED
File without changes
File without changes
package/ThemeProvider.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { __spreadArray } from "tslib";
2
+ import { __read, __spreadArray } from "tslib";
3
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import NextScript from "next/script";
5
5
  import { memo, useCallback, useEffect, useState } from "react";
@@ -10,12 +10,12 @@ var MEDIA = "(prefers-color-scheme: dark)";
10
10
  var THEME_STORAGE_KEY = "theme";
11
11
  export var ThemeProvider = function (_a) {
12
12
  var forcedTheme = _a.forcedTheme, _b = _a.disableTransitionOnChange, disableTransitionOnChange = _b === void 0 ? false : _b, _c = _a.enableSystem, enableSystem = _c === void 0 ? true : _c, enableColorScheme = _a.enableColorScheme, _d = _a.themes, themes = _d === void 0 ? ["light", "dark"] : _d, _e = _a.defaultTheme, defaultTheme = _e === void 0 ? enableSystem ? "system" : "light" : _e, _f = _a.attribute, attribute = _f === void 0 ? "data-theme" : _f, value = _a.value, children = _a.children, nonce = _a.nonce;
13
- var _g = useState(function () {
13
+ var _g = __read(useState(function () {
14
14
  return getTheme(THEME_STORAGE_KEY, defaultTheme);
15
- }), theme = _g[0], setThemeState = _g[1];
16
- var _h = useState(function () {
15
+ }), 2), theme = _g[0], setThemeState = _g[1];
16
+ var _h = __read(useState(function () {
17
17
  return getTheme(THEME_STORAGE_KEY);
18
- }), resolvedTheme = _h[0], setResolvedTheme = _h[1];
18
+ }), 2), resolvedTheme = _h[0], setResolvedTheme = _h[1];
19
19
  var attrs = !value ? themes : Object.values(value);
20
20
  var applyTheme = useCallback(function (theme) {
21
21
  var _a;
@@ -29,7 +29,7 @@ export var ThemeProvider = function (_a) {
29
29
  var enable = disableTransitionOnChange ? disableAnimation() : null;
30
30
  var d = document.documentElement;
31
31
  if (attribute === "class") {
32
- (_a = d.classList).remove.apply(_a, attrs);
32
+ (_a = d.classList).remove.apply(_a, __spreadArray([], __read(attrs), false));
33
33
  if (name)
34
34
  d.classList.add(name);
35
35
  }
@@ -100,7 +100,7 @@ export var ThemeProvider = function (_a) {
100
100
  setTheme: setTheme,
101
101
  forcedTheme: forcedTheme,
102
102
  resolvedTheme: theme === "system" ? resolvedTheme : theme,
103
- themes: enableSystem ? __spreadArray(__spreadArray([], themes, true), ["system"], false) : themes,
103
+ themes: enableSystem ? __spreadArray(__spreadArray([], __read(themes), false), ["system"], false) : themes,
104
104
  systemTheme: (enableSystem ? resolvedTheme : undefined),
105
105
  }, children: [_jsx(ThemeScript, { forcedTheme: forcedTheme, disableTransitionOnChange: disableTransitionOnChange, enableSystem: enableSystem, enableColorScheme: enableColorScheme, themes: themes, defaultTheme: defaultTheme, attribute: attribute, value: value, children: children, attrs: attrs, nonce: nonce }), children] }));
106
106
  };
@@ -0,0 +1,52 @@
1
+ import type { Redirect as _Redirect, Rewrite as _Rewrite } from "next/dist/lib/load-custom-routes";
2
+ export type Redirect = Omit<_Redirect, "locale"> & {
3
+ locale?: boolean;
4
+ };
5
+ export type Rewrite = Omit<_Rewrite, "locale"> & {
6
+ locale?: boolean;
7
+ };
8
+ type Route = string | {
9
+ [key: string]: Route | string;
10
+ };
11
+ type RoutesByLocale = Record<string, Route>;
12
+ export type Locale = string;
13
+ export type Routes = Record<Locale, RoutesByLocale>;
14
+ type RoutesMapRoute = {
15
+ template: string;
16
+ pathname: string;
17
+ wildcard?: boolean;
18
+ };
19
+ export declare function normaliseUrlPathname(pathname?: string): string;
20
+ export declare function toPath(urlOrPathname?: string): string;
21
+ export declare function encodePathname(pathname?: string): string;
22
+ export declare function getRoutesOfDefaultLocale(routes: Routes | RoutesByLocale, defaultLocale?: Locale): RoutesByLocale;
23
+ export type ConfigI18nOptions = {
24
+ locales: Locale[];
25
+ defaultLocale: Locale;
26
+ hideDefaultLocaleInUrl?: boolean;
27
+ localeParam?: string;
28
+ };
29
+ type Options = ConfigI18nOptions & {
30
+ routes: Routes;
31
+ debug?: boolean;
32
+ permanent?: boolean;
33
+ };
34
+ export declare function getPathRedirect(arg: Pick<GetRedirectsOptions, "localeParam" | "permanent"> & {
35
+ localeSource?: Locale;
36
+ localeDestination?: Locale;
37
+ route: RoutesMapRoute;
38
+ usePathnameAsSource?: boolean;
39
+ }): Redirect | undefined;
40
+ type GetRedirectsOptions = Options;
41
+ export declare function getRedirects(arg: GetRedirectsOptions): Promise<Redirect[]>;
42
+ export declare function getPathRewrite(arg: Pick<GetRewritesOptions, "localeParam"> & {
43
+ localeSource?: Locale;
44
+ localeDestination?: Locale;
45
+ route: RoutesMapRoute;
46
+ }): {
47
+ source: string;
48
+ destination: string;
49
+ } | undefined;
50
+ type GetRewritesOptions = Options;
51
+ export declare function getRewrites(arg: GetRewritesOptions): Promise<Rewrite[]>;
52
+ export {};
package/config-i18n.js ADDED
@@ -0,0 +1,251 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
+ var arrayUniqueByProperties = function (array, keys) {
3
+ return array.filter(function (item, idx, arr) {
4
+ return arr.findIndex(function (itemWith) {
5
+ return keys.every(function (k) { return itemWith[k] === item[k]; });
6
+ }) === idx;
7
+ });
8
+ };
9
+ export function normaliseUrlPathname(pathname) {
10
+ if (pathname === void 0) { pathname = ""; }
11
+ return pathname.replace(/\/+\//g, "/").replace(/^\/*(.*?)\/*$/, "$1");
12
+ }
13
+ export function toPath(urlOrPathname) {
14
+ if (urlOrPathname === void 0) { urlOrPathname = ""; }
15
+ var pathname = "";
16
+ try {
17
+ var parsed = new URL(urlOrPathname);
18
+ pathname = parsed.pathname;
19
+ }
20
+ catch (e) {
21
+ pathname = urlOrPathname;
22
+ }
23
+ return pathname.replace(/\/+\//g, "/").replace(/^\/*(.*?)\/*$/, "$1");
24
+ }
25
+ export function encodePathname(pathname) {
26
+ if (pathname === void 0) { pathname = ""; }
27
+ var parts = normaliseUrlPathname(pathname).split("/");
28
+ return parts
29
+ .filter(function (part) { return !!part; })
30
+ .map(function (part) { return encodeURIComponent(part); })
31
+ .join("/");
32
+ }
33
+ function transformRoute(route) {
34
+ var rawPathname = route.pathname, rawTemplate = route.template;
35
+ var pathnameParts = rawPathname.split("/").filter(function (part) { return !!part; });
36
+ var templateParts = rawTemplate.split("/").filter(function (part) { return !!part; });
37
+ var mapPartsByIdx = {};
38
+ var pathname = pathnameParts
39
+ .map(function (part) {
40
+ var _a, _b;
41
+ var hasWildcard = part.endsWith("*");
42
+ part = part.replace("*", "");
43
+ var isDynamic = part.startsWith("{{") && part.endsWith("}}");
44
+ var asValue = isDynamic
45
+ ? (_b = (_a = part.match(/{{(.+)}}/)) === null || _a === void 0 ? void 0 : _a[1].trim()) !== null && _b !== void 0 ? _b : ""
46
+ : part.trim();
47
+ var asPath = encodeURIComponent(asValue) + (hasWildcard ? "*" : "");
48
+ mapPartsByIdx[asValue] = {
49
+ isDynamic: isDynamic,
50
+ hasWildcard: hasWildcard,
51
+ };
52
+ return isDynamic ? ":".concat(asPath) : asPath;
53
+ })
54
+ .join("/");
55
+ var template = templateParts
56
+ .map(function (part) {
57
+ var _a, _b, _c;
58
+ var isDynamic = part.startsWith("[") && part.endsWith("]");
59
+ var asValue = isDynamic
60
+ ? (_b = (_a = part.match(/\[(.+)\]/)) === null || _a === void 0 ? void 0 : _a[1].trim()) !== null && _b !== void 0 ? _b : ""
61
+ : part.trim();
62
+ var hasWildcard = (_c = mapPartsByIdx[asValue]) === null || _c === void 0 ? void 0 : _c.hasWildcard;
63
+ var asPath = encodeURIComponent(asValue) + (hasWildcard ? "*" : "");
64
+ return isDynamic ? ":".concat(asPath) : asPath;
65
+ })
66
+ .join("/");
67
+ return { pathname: pathname, template: template };
68
+ }
69
+ function getRoutesMap(map, routesByLocale, pathnameBuffer, templateBuffer) {
70
+ if (map === void 0) { map = {}; }
71
+ if (pathnameBuffer === void 0) { pathnameBuffer = ""; }
72
+ if (templateBuffer === void 0) { templateBuffer = ""; }
73
+ var isSpaRoute = Object.keys(routesByLocale).includes("[spa]");
74
+ for (var key in routesByLocale) {
75
+ var pathOrNestedRoutes = routesByLocale[key];
76
+ var template = "".concat(templateBuffer, "/").concat(key);
77
+ if (typeof pathOrNestedRoutes === "string") {
78
+ if (!isSpaRoute || (isSpaRoute && ["[spa]", "index"].includes(key))) {
79
+ map[template] = {
80
+ template: template,
81
+ pathname: pathOrNestedRoutes,
82
+ wildcard: pathOrNestedRoutes.includes("*"),
83
+ };
84
+ }
85
+ }
86
+ else {
87
+ if (!isSpaRoute) {
88
+ getRoutesMap(map, pathOrNestedRoutes, pathnameBuffer, template);
89
+ }
90
+ }
91
+ }
92
+ return map;
93
+ }
94
+ function getWithoutIndex(template) {
95
+ return template.replace(/\/index$/, "");
96
+ }
97
+ export function getRoutesOfDefaultLocale(routes, defaultLocale) {
98
+ var routesByLocale = routes;
99
+ if (defaultLocale &&
100
+ routesByLocale[defaultLocale]) {
101
+ return routesByLocale[defaultLocale];
102
+ }
103
+ if (Object.keys(routes).length === 1) {
104
+ var routesWithOneLocale = routes;
105
+ var output = {};
106
+ for (var onlyLocale in routesWithOneLocale) {
107
+ output =
108
+ routesWithOneLocale[onlyLocale];
109
+ }
110
+ return output;
111
+ }
112
+ return routes;
113
+ }
114
+ export function getPathRedirect(arg) {
115
+ var localeSource = arg.localeSource, localeDestination = arg.localeDestination, route = arg.route, usePathnameAsSource = arg.usePathnameAsSource, permanent = arg.permanent;
116
+ var _a = transformRoute(route), routeTemplate = _a.template, pathname = _a.pathname;
117
+ var template = usePathnameAsSource ? pathname : routeTemplate;
118
+ var sourcePrefix = localeSource ? "".concat(localeSource, "/") : "";
119
+ var source = getWithoutIndex("/".concat(normaliseUrlPathname(sourcePrefix + template)));
120
+ var destinationPrefix = localeDestination ? "".concat(localeDestination, "/") : "";
121
+ var destination = "/".concat(normaliseUrlPathname(destinationPrefix + pathname));
122
+ if (source === destination)
123
+ return;
124
+ var redirect = {
125
+ source: source,
126
+ destination: destination,
127
+ permanent: Boolean(permanent),
128
+ };
129
+ return redirect;
130
+ }
131
+ export function getRedirects(arg) {
132
+ return __awaiter(this, void 0, void 0, function () {
133
+ var routes, defaultLocale, hideDefaultLocaleInUrl, localeParam, permanent, debug, redirects, locale, routesByLocale, routesMap, template, route, isVisibleDefaultLocale, isHiddenDefaultLocale, cleaned;
134
+ return __generator(this, function (_a) {
135
+ routes = arg.routes, defaultLocale = arg.defaultLocale, hideDefaultLocaleInUrl = arg.hideDefaultLocaleInUrl, localeParam = arg.localeParam, permanent = arg.permanent, debug = arg.debug;
136
+ redirects = [];
137
+ for (locale in routes) {
138
+ routesByLocale = routes[locale];
139
+ routesMap = getRoutesMap({}, routesByLocale);
140
+ for (template in routesMap) {
141
+ route = routesMap[template];
142
+ if (route.pathname !== getWithoutIndex(template)) {
143
+ isVisibleDefaultLocale = locale === defaultLocale && !hideDefaultLocaleInUrl;
144
+ isHiddenDefaultLocale = locale === defaultLocale && hideDefaultLocaleInUrl;
145
+ if (localeParam) {
146
+ if (isVisibleDefaultLocale) {
147
+ redirects.push(getPathRedirect({ localeDestination: locale, route: route, permanent: permanent }));
148
+ }
149
+ else if (isHiddenDefaultLocale) {
150
+ redirects.push(getPathRedirect({ localeSource: locale, route: route, permanent: permanent }));
151
+ }
152
+ else if (locale !== defaultLocale) {
153
+ redirects.push(getPathRedirect({
154
+ localeSource: locale,
155
+ localeDestination: locale,
156
+ route: route,
157
+ permanent: permanent,
158
+ }));
159
+ }
160
+ else {
161
+ redirects.push(getPathRedirect({ route: route, permanent: permanent }));
162
+ }
163
+ }
164
+ else {
165
+ if (isVisibleDefaultLocale) {
166
+ redirects.push(getPathRedirect({ localeDestination: locale, route: route, permanent: permanent }));
167
+ }
168
+ else if (locale !== defaultLocale) {
169
+ redirects.push(getPathRedirect({
170
+ localeSource: locale,
171
+ localeDestination: locale,
172
+ route: route,
173
+ permanent: permanent,
174
+ }));
175
+ }
176
+ else {
177
+ redirects.push(getPathRedirect({ route: route, permanent: permanent }));
178
+ }
179
+ }
180
+ }
181
+ }
182
+ }
183
+ cleaned = arrayUniqueByProperties(redirects.filter(Boolean), ["source", "destination"]).map(function (rewrite) { return (localeParam ? rewrite : __assign(__assign({}, rewrite), { locale: false })); });
184
+ if (debug)
185
+ console.info("[@koine/next/config:getRedirects]", cleaned);
186
+ return [2, cleaned];
187
+ });
188
+ });
189
+ }
190
+ export function getPathRewrite(arg) {
191
+ var localeSource = arg.localeSource, localeDestination = arg.localeDestination, localeParam = arg.localeParam, route = arg.route;
192
+ var _a = transformRoute(route), pathname = _a.pathname, template = _a.template;
193
+ var sourcePrefix = "";
194
+ if (localeSource)
195
+ sourcePrefix = "".concat(localeSource, "/");
196
+ else if (localeParam)
197
+ sourcePrefix = ":".concat(localeParam, "/");
198
+ var source = "/".concat(normaliseUrlPathname(sourcePrefix + pathname));
199
+ var destinationPrefix = "";
200
+ if (localeDestination)
201
+ destinationPrefix = "".concat(localeDestination, "/");
202
+ else if (localeParam)
203
+ destinationPrefix = ":".concat(localeParam, "/");
204
+ var destination = getWithoutIndex("/".concat(normaliseUrlPathname(destinationPrefix + template)));
205
+ if (source === destination)
206
+ return;
207
+ return {
208
+ source: source,
209
+ destination: destination,
210
+ };
211
+ }
212
+ export function getRewrites(arg) {
213
+ return __awaiter(this, void 0, void 0, function () {
214
+ var routes, defaultLocale, hideDefaultLocaleInUrl, localeParam, debug, rewrites, locale, routesByLocale, routesMap, template, route, isVisibleDefaultLocale, isHiddenDefaultLocale, cleaned;
215
+ return __generator(this, function (_a) {
216
+ routes = arg.routes, defaultLocale = arg.defaultLocale, hideDefaultLocaleInUrl = arg.hideDefaultLocaleInUrl, localeParam = arg.localeParam, debug = arg.debug;
217
+ rewrites = [];
218
+ for (locale in routes) {
219
+ routesByLocale = routes[locale];
220
+ routesMap = getRoutesMap({}, routesByLocale);
221
+ for (template in routesMap) {
222
+ route = routesMap[template];
223
+ isVisibleDefaultLocale = locale === defaultLocale && !hideDefaultLocaleInUrl;
224
+ isHiddenDefaultLocale = locale === defaultLocale && hideDefaultLocaleInUrl;
225
+ if (localeParam) {
226
+ if (isHiddenDefaultLocale) {
227
+ rewrites.push(getPathRewrite({ localeDestination: locale, route: route }));
228
+ }
229
+ else {
230
+ rewrites.push(getPathRewrite({ localeParam: localeParam, route: route }));
231
+ }
232
+ }
233
+ else {
234
+ if (route.pathname !== getWithoutIndex(template)) {
235
+ if (locale !== defaultLocale || isVisibleDefaultLocale) {
236
+ rewrites.push(getPathRewrite({ localeSource: locale, route: route }));
237
+ }
238
+ else {
239
+ rewrites.push(getPathRewrite({ route: route }));
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ cleaned = arrayUniqueByProperties(rewrites.filter(Boolean), ["source", "destination"]);
246
+ if (debug)
247
+ console.info("[@koine/next/config:getRewrites]", cleaned);
248
+ return [2, cleaned];
249
+ });
250
+ });
251
+ }
package/config.d.ts CHANGED
@@ -1,30 +1,6 @@
1
1
  import type { NextConfig } from "next";
2
- import type { Redirect, Rewrite } from "next/dist/lib/load-custom-routes";
3
- type Route = string | {
4
- [key: string]: Route | string;
5
- };
6
- type Routes = Record<string, Route>;
7
- type RoutesMapRoute = {
8
- template: string;
9
- pathname: string;
10
- wildcard?: boolean;
11
- };
12
- export declare function normaliseUrlPathname(pathname?: string): string;
13
- export declare function toPath(urlOrPathname?: string): string;
14
- export declare function encodePathname(pathname?: string): string;
15
- export declare function getPathRewrite(route: RoutesMapRoute): {
16
- source: string;
17
- destination: string;
18
- };
19
- export declare function getPathRedirect(locale: string | undefined, route: RoutesMapRoute, permanent?: boolean): {
20
- source: string;
21
- destination: string;
22
- permanent: boolean;
23
- locale: false;
24
- };
25
- export declare function getRedirects(defaultLocale: string, routes: Routes, permanent?: boolean, debug?: boolean): Promise<Redirect[]>;
26
- export declare function getRewrites(routes: Routes, debug?: boolean): Promise<Rewrite[]>;
27
- type KoineNextConfig = {
2
+ import { type ConfigI18nOptions, type Routes } from "./config-i18n.js";
3
+ interface KoineNextConfig {
28
4
  nx?: boolean;
29
5
  svg?: boolean;
30
6
  sc?: boolean;
@@ -32,6 +8,102 @@ type KoineNextConfig = {
32
8
  routes?: Routes;
33
9
  permanent?: boolean;
34
10
  debug?: boolean;
11
+ i18n: ConfigI18nOptions & {
12
+ loader?: any;
13
+ };
14
+ }
15
+ interface MergedConfig extends KoineNextConfig, Omit<NextConfig, "i18n"> {
16
+ }
17
+ export declare function withKoine({ nx, svg, sc, page, routes, permanent, debug, ...custom }?: MergedConfig): NextConfig | {
18
+ redirects(): Promise<import("./config-i18n.js").Redirect[]>;
19
+ rewrites(): Promise<{
20
+ beforeFiles: import("./config-i18n.js").Rewrite[];
21
+ afterFiles: import("next/dist/lib/load-custom-routes.js").Rewrite[];
22
+ fallback: import("next/dist/lib/load-custom-routes.js").Rewrite[];
23
+ }>;
24
+ exportPathMap?: ((defaultMap: import("next/dist/server/config-shared.js").ExportPathMap, ctx: {
25
+ dev: boolean;
26
+ dir: string;
27
+ outDir: string | null;
28
+ distDir: string;
29
+ buildId: string;
30
+ }) => import("next/dist/server/config-shared.js").ExportPathMap | Promise<import("next/dist/server/config-shared.js").ExportPathMap>) | undefined;
31
+ i18n?: import("next/dist/server/config-shared.js").I18NConfig | null | undefined;
32
+ eslint?: import("next/dist/server/config-shared.js").ESLintConfig | undefined;
33
+ typescript?: import("next/dist/server/config-shared.js").TypeScriptConfig | undefined;
34
+ headers?: (() => Promise<import("next/dist/lib/load-custom-routes.js").Header[]>) | undefined;
35
+ excludeDefaultMomentLocales?: boolean | undefined;
36
+ webpack?: import("next/dist/server/config-shared.js").NextJsWebpackConfig | null | undefined;
37
+ trailingSlash?: boolean | undefined;
38
+ env?: Record<string, string> | undefined;
39
+ distDir?: string | undefined;
40
+ cleanDistDir?: boolean | undefined;
41
+ assetPrefix?: string | undefined;
42
+ useFileSystemPublicRoutes?: boolean | undefined;
43
+ generateBuildId?: (() => string | Promise<string | null> | null) | undefined;
44
+ generateEtags?: boolean | undefined;
45
+ pageExtensions?: string[] | undefined;
46
+ compress?: boolean | undefined;
47
+ analyticsId?: string | undefined;
48
+ poweredByHeader?: boolean | undefined;
49
+ images?: Partial<import("next/dist/shared/lib/image-config.js").ImageConfigComplete> | undefined;
50
+ devIndicators?: {
51
+ buildActivity?: boolean | undefined;
52
+ buildActivityPosition?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
53
+ } | undefined;
54
+ onDemandEntries?: {
55
+ maxInactiveAge?: number | undefined;
56
+ pagesBufferLength?: number | undefined;
57
+ } | undefined;
58
+ amp?: {
59
+ canonicalBase?: string | undefined;
60
+ } | undefined;
61
+ basePath?: string | undefined;
62
+ sassOptions?: {
63
+ [key: string]: any;
64
+ } | undefined;
65
+ productionBrowserSourceMaps?: boolean | undefined;
66
+ optimizeFonts?: boolean | undefined;
67
+ reactProductionProfiling?: boolean | undefined;
68
+ reactStrictMode?: boolean | null | undefined;
69
+ publicRuntimeConfig?: {
70
+ [key: string]: any;
71
+ } | undefined;
72
+ serverRuntimeConfig?: {
73
+ [key: string]: any;
74
+ } | undefined;
75
+ httpAgentOptions?: {
76
+ keepAlive?: boolean | undefined;
77
+ } | undefined;
78
+ outputFileTracing?: boolean | undefined;
79
+ staticPageGenerationTimeout?: number | undefined;
80
+ crossOrigin?: false | "anonymous" | "use-credentials" | undefined;
81
+ swcMinify?: boolean | undefined;
82
+ compiler?: {
83
+ reactRemoveProperties?: boolean | {
84
+ properties?: string[] | undefined;
85
+ } | undefined;
86
+ relay?: {
87
+ src: string;
88
+ artifactDirectory?: string | undefined;
89
+ language?: "typescript" | "flow" | "javascript" | undefined;
90
+ eagerEsModules?: boolean | undefined;
91
+ } | undefined;
92
+ removeConsole?: boolean | {
93
+ exclude?: string[] | undefined;
94
+ } | undefined;
95
+ styledComponents?: boolean | import("next/dist/server/config-shared.js").StyledComponentsConfig | undefined;
96
+ emotion?: boolean | import("next/dist/server/config-shared.js").EmotionConfig | undefined;
97
+ } | undefined;
98
+ output?: "standalone" | "export" | undefined;
99
+ transpilePackages?: string[] | undefined;
100
+ skipMiddlewareUrlNormalize?: boolean | undefined;
101
+ skipTrailingSlashRedirect?: boolean | undefined;
102
+ modularizeImports?: Record<string, {
103
+ transform: string | Record<string, string>;
104
+ preventFullImport?: boolean | undefined;
105
+ skipDefaultConversion?: boolean | undefined;
106
+ }> | undefined;
107
+ experimental?: import("next/dist/server/config-shared.js").ExperimentalConfig | undefined;
35
108
  };
36
- export declare function withKoine({ nx, svg, sc, page, routes, permanent, debug, ...custom }?: NextConfig & KoineNextConfig): NextConfig;
37
109
  export default withKoine;
package/config.js CHANGED
@@ -1,150 +1,14 @@
1
- import { __assign, __awaiter, __generator, __rest, __spreadArray } from "tslib";
2
- export function normaliseUrlPathname(pathname) {
3
- if (pathname === void 0) { pathname = ""; }
4
- return pathname.replace(/\/+\//g, "/").replace(/^\/*(.*?)\/*$/, "$1");
5
- }
6
- export function toPath(urlOrPathname) {
7
- if (urlOrPathname === void 0) { urlOrPathname = ""; }
8
- var pathname = "";
9
- try {
10
- var parsed = new URL(urlOrPathname);
11
- pathname = parsed.pathname;
12
- }
13
- catch (e) {
14
- pathname = urlOrPathname;
15
- }
16
- return pathname.replace(/\/+\//g, "/").replace(/^\/*(.*?)\/*$/, "$1");
17
- }
18
- export function encodePathname(pathname) {
19
- if (pathname === void 0) { pathname = ""; }
20
- var parts = normaliseUrlPathname(pathname).split("/");
21
- return parts
22
- .filter(function (part) { return !!part; })
23
- .map(function (part) { return encodeURIComponent(part); })
24
- .join("/");
25
- }
26
- function transformRoute(route) {
27
- var rawPathname = route.pathname, rawTemplate = route.template;
28
- var pathnameParts = rawPathname.split("/").filter(function (part) { return !!part; });
29
- var templateParts = rawTemplate.split("/").filter(function (part) { return !!part; });
30
- var mapPartsByIdx = {};
31
- var pathname = pathnameParts
32
- .map(function (part) {
33
- var _a, _b;
34
- var hasWildcard = part.endsWith("*");
35
- part = part.replace("*", "");
36
- var isDynamic = part.startsWith("{{") && part.endsWith("}}");
37
- var asValue = isDynamic
38
- ? (_b = (_a = part.match(/{{(.+)}}/)) === null || _a === void 0 ? void 0 : _a[1].trim()) !== null && _b !== void 0 ? _b : ""
39
- : part.trim();
40
- var asPath = encodeURIComponent(asValue) + (hasWildcard ? "*" : "");
41
- mapPartsByIdx[asValue] = {
42
- isDynamic: isDynamic,
43
- hasWildcard: hasWildcard,
44
- };
45
- return isDynamic ? ":".concat(asPath) : asPath;
46
- })
47
- .join("/");
48
- var template = templateParts
49
- .map(function (part) {
50
- var _a, _b, _c;
51
- var isDynamic = part.startsWith("[") && part.endsWith("]");
52
- var asValue = isDynamic
53
- ? (_b = (_a = part.match(/\[(.+)\]/)) === null || _a === void 0 ? void 0 : _a[1].trim()) !== null && _b !== void 0 ? _b : ""
54
- : part.trim();
55
- var hasWildcard = (_c = mapPartsByIdx[asValue]) === null || _c === void 0 ? void 0 : _c.hasWildcard;
56
- var asPath = encodeURIComponent(asValue) + (hasWildcard ? "*" : "");
57
- return isDynamic ? ":".concat(asPath) : asPath;
58
- })
59
- .join("/");
60
- return { pathname: pathname, template: template };
61
- }
62
- function getRoutesMap(map, routes, pathnameBuffer, templateBuffer) {
63
- if (map === void 0) { map = {}; }
64
- if (pathnameBuffer === void 0) { pathnameBuffer = ""; }
65
- if (templateBuffer === void 0) { templateBuffer = ""; }
66
- for (var key in routes) {
67
- var pathOrNestedRoutes = routes[key];
68
- var template = "".concat(templateBuffer, "/").concat(key);
69
- if (typeof pathOrNestedRoutes === "string") {
70
- map[template] = {
71
- template: template,
72
- pathname: pathOrNestedRoutes,
73
- wildcard: pathOrNestedRoutes.includes("*"),
74
- };
75
- }
76
- else {
77
- getRoutesMap(map, pathOrNestedRoutes, pathnameBuffer, template);
78
- }
79
- }
80
- return map;
81
- }
82
- function getWithoutIndex(template) {
83
- return template.replace(/\/index$/, "");
84
- }
85
- export function getPathRewrite(route) {
86
- var _a = transformRoute(route), pathname = _a.pathname, template = _a.template;
87
- var source = "/".concat(normaliseUrlPathname(pathname));
88
- var destination = "/".concat(normaliseUrlPathname(template));
89
- return {
90
- source: source,
91
- destination: getWithoutIndex(destination),
92
- };
93
- }
94
- export function getPathRedirect(locale, route, permanent) {
95
- if (locale === void 0) { locale = ""; }
96
- var _a = transformRoute(route), template = _a.template, pathname = _a.pathname;
97
- var source = "/".concat(normaliseUrlPathname((locale ? "/".concat(locale, "/") : "/") + template));
98
- var destination = "/".concat(normaliseUrlPathname(pathname));
99
- return {
100
- source: getWithoutIndex(source),
101
- destination: destination,
102
- permanent: Boolean(permanent),
103
- locale: false,
104
- };
105
- }
106
- export function getRedirects(defaultLocale, routes, permanent, debug) {
107
- return __awaiter(this, void 0, void 0, function () {
108
- var redirects, routesMap;
109
- return __generator(this, function (_a) {
110
- redirects = [];
111
- routesMap = getRoutesMap({}, routes);
112
- Object.keys(routesMap).forEach(function (template) {
113
- var route = routesMap[template];
114
- if (route.pathname !== getWithoutIndex(template)) {
115
- redirects.push(getPathRedirect("", route, permanent));
116
- }
117
- });
118
- if (debug)
119
- console.info("[@koine/next/config:getRedirects]", redirects);
120
- return [2, redirects];
121
- });
122
- });
123
- }
124
- export function getRewrites(routes, debug) {
125
- return __awaiter(this, void 0, void 0, function () {
126
- var rewrites, routesMap;
127
- return __generator(this, function (_a) {
128
- rewrites = [];
129
- routesMap = getRoutesMap({}, routes);
130
- Object.keys(routesMap).forEach(function (template) {
131
- var route = routesMap[template];
132
- if (route.pathname !== getWithoutIndex(template)) {
133
- rewrites.push(getPathRewrite(route));
134
- }
135
- });
136
- if (debug)
137
- console.info("[@koine/next/config:getRewrites]", rewrites);
138
- return [2, rewrites];
139
- });
140
- });
141
- }
1
+ import { __assign, __awaiter, __generator, __read, __rest, __spreadArray } from "tslib";
2
+ import { getRedirects, getRewrites, } from "./config-i18n.js";
142
3
  export function withKoine(_a) {
143
- var _b;
144
4
  if (_a === void 0) { _a = {
145
- i18n: { locales: ["en"], defaultLocale: "en" },
5
+ i18n: {
6
+ locales: ["en"],
7
+ defaultLocale: "en",
8
+ hideDefaultLocaleInUrl: false,
9
+ },
146
10
  }; }
147
- var _c = _a.nx, nx = _c === void 0 ? true : _c, _d = _a.svg, svg = _d === void 0 ? true : _d, _e = _a.sc, sc = _e === void 0 ? true : _e, page = _a.page, routes = _a.routes, permanent = _a.permanent, debug = _a.debug, custom = __rest(_a, ["nx", "svg", "sc", "page", "routes", "permanent", "debug"]);
11
+ var _b = _a.nx, nx = _b === void 0 ? true : _b, _c = _a.svg, svg = _c === void 0 ? true : _c, _d = _a.sc, sc = _d === void 0 ? true : _d, page = _a.page, routes = _a.routes, permanent = _a.permanent, debug = _a.debug, custom = __rest(_a, ["nx", "svg", "sc", "page", "routes", "permanent", "debug"]);
148
12
  var nextConfig = __assign({ pageExtensions: page ? ["page.tsx", "page.ts"] : undefined, eslint: {
149
13
  ignoreDuringBuilds: true,
150
14
  }, typescript: {
@@ -192,21 +56,29 @@ export function withKoine(_a) {
192
56
  styledComponents: true,
193
57
  };
194
58
  }
59
+ if (custom.i18n) {
60
+ var _e = custom.i18n || {}, hideDefaultLocaleInUrl = _e.hideDefaultLocaleInUrl, localeParam = _e.localeParam, loader = _e.loader, nextI18nConfig = __rest(_e, ["hideDefaultLocaleInUrl", "localeParam", "loader"]);
61
+ if (localeParam) {
62
+ delete nextConfig.i18n;
63
+ }
64
+ else {
65
+ nextConfig.i18n = nextI18nConfig;
66
+ }
67
+ }
195
68
  if (routes) {
196
- var defaultLocale_1 = (_b = nextConfig === null || nextConfig === void 0 ? void 0 : nextConfig.i18n) === null || _b === void 0 ? void 0 : _b.defaultLocale;
197
69
  return __assign(__assign({}, nextConfig), { redirects: function () {
198
70
  return __awaiter(this, void 0, void 0, function () {
199
71
  var defaults, customs;
200
72
  return __generator(this, function (_a) {
201
73
  switch (_a.label) {
202
- case 0: return [4, getRedirects(defaultLocale_1, routes, permanent, debug)];
74
+ case 0: return [4, getRedirects(__assign({ routes: routes, permanent: permanent, debug: debug }, custom.i18n))];
203
75
  case 1:
204
76
  defaults = _a.sent();
205
77
  if (!nextConfig.redirects) return [3, 3];
206
78
  return [4, nextConfig.redirects()];
207
79
  case 2:
208
80
  customs = _a.sent();
209
- return [2, __spreadArray(__spreadArray([], defaults, true), customs, true)];
81
+ return [2, __spreadArray(__spreadArray([], __read(defaults), false), __read(customs), false)];
210
82
  case 3: return [2, defaults];
211
83
  }
212
84
  });
@@ -216,7 +88,7 @@ export function withKoine(_a) {
216
88
  var defaults, customs;
217
89
  return __generator(this, function (_a) {
218
90
  switch (_a.label) {
219
- case 0: return [4, getRewrites(routes, debug)];
91
+ case 0: return [4, getRewrites(__assign({ routes: routes, debug: debug }, custom.i18n))];
220
92
  case 1:
221
93
  defaults = _a.sent();
222
94
  if (!nextConfig.rewrites) return [3, 3];
@@ -230,7 +102,7 @@ export function withKoine(_a) {
230
102
  fallback: [],
231
103
  }];
232
104
  }
233
- return [2, __assign(__assign({}, customs), { beforeFiles: __spreadArray(__spreadArray([], defaults, true), (customs.beforeFiles || []), true) })];
105
+ return [2, __assign(__assign({}, customs), { beforeFiles: __spreadArray(__spreadArray([], __read(defaults), false), __read((customs.beforeFiles || [])), false) })];
234
106
  case 3: return [2, {
235
107
  afterFiles: [],
236
108
  beforeFiles: defaults,
package/getSiteUrl.d.ts CHANGED
File without changes
package/getSiteUrl.js CHANGED
File without changes
package/index.d.ts CHANGED
File without changes
package/index.js CHANGED
File without changes
package/load.d.ts CHANGED
File without changes
package/load.js CHANGED
File without changes
package/package.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@koine/next",
3
3
  "sideEffects": false,
4
4
  "dependencies": {
5
- "@koine/browser": "2.0.0-beta.16",
6
- "@koine/react": "2.0.0-beta.16",
7
- "@koine/utils": "2.0.0-beta.16"
5
+ "@koine/browser": "2.0.0-beta.18",
6
+ "@koine/react": "2.0.0-beta.18",
7
+ "@koine/utils": "2.0.0-beta.18"
8
8
  },
9
9
  "peerDependenciesMeta": {
10
10
  "@hookform/resolvers": {
@@ -201,6 +201,9 @@
201
201
  "./ThemeProvider": {
202
202
  "import": "./ThemeProvider.js"
203
203
  },
204
+ "./config-i18n": {
205
+ "import": "./config-i18n.js"
206
+ },
204
207
  "./config": {
205
208
  "import": "./config.js"
206
209
  },
@@ -215,5 +218,5 @@
215
218
  }
216
219
  },
217
220
  "peerDependencies": {},
218
- "version": "2.0.0-beta.16"
221
+ "version": "2.0.0-beta.18"
219
222
  }
package/useTheme.d.ts CHANGED
File without changes
package/useTheme.js CHANGED
File without changes