@koine/next 2.0.0-beta.77 → 2.0.0-beta.78
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.
- package/12.cjs.d.ts +1 -0
- package/12.cjs.default.js +1 -0
- package/12.cjs.js +53 -0
- package/12.cjs.mjs +2 -0
- package/12.esm.js +43 -0
- package/README.md +1 -0
- package/ThemeContext.cjs.d.ts +2 -0
- package/ThemeContext.cjs.default.js +1 -0
- package/ThemeContext.cjs.js +13 -0
- package/ThemeContext.cjs.mjs +2 -0
- package/ThemeContext.esm.js +8 -0
- package/ThemeProvider.cjs.d.ts +2 -0
- package/ThemeProvider.cjs.default.js +1 -0
- package/ThemeProvider.cjs.js +214 -0
- package/ThemeProvider.cjs.mjs +2 -0
- package/ThemeProvider.esm.js +205 -0
- package/config.cjs.d.ts +1 -0
- package/config.cjs.default.js +1 -0
- package/config.cjs.js +84 -0
- package/config.cjs.mjs +2 -0
- package/config.esm.js +80 -0
- package/index.cjs.d.ts +1 -0
- package/index.cjs.default.js +1 -0
- package/index.cjs.js +19 -0
- package/index.cjs.mjs +2 -0
- package/index.esm.js +8 -0
- package/load.cjs.d.ts +2 -0
- package/load.cjs.default.js +1 -0
- package/load.cjs.js +12 -0
- package/load.cjs.mjs +2 -0
- package/load.esm.js +7 -0
- package/package.json +30 -47
- package/typings.d.ts +61 -0
- package/useTheme.cjs.d.ts +2 -0
- package/useTheme.cjs.default.js +1 -0
- package/useTheme.cjs.js +11 -0
- package/useTheme.cjs.mjs +2 -0
- package/useTheme.esm.js +6 -0
- package/12/AnalyticsGoogle.js +0 -7
- package/12/DisableErrorOverlay.js +0 -1
- package/12/Seo.js +0 -1
- package/12/SeoDefaults.js +0 -1
- package/12/seoBuildTags.js +0 -1
- package/12/types.js +0 -1
- package/12.js +0 -1
- package/ThemeContext.js +0 -1
- package/ThemeProvider.js +0 -1
- package/cjs/12/AnalyticsGoogle.d.ts +0 -5
- package/cjs/12/AnalyticsGoogle.js +0 -7
- package/cjs/12/DisableErrorOverlay.d.ts +0 -2
- package/cjs/12/DisableErrorOverlay.js +0 -1
- package/cjs/12/Seo.d.ts +0 -23
- package/cjs/12/Seo.js +0 -1
- package/cjs/12/SeoDefaults.d.ts +0 -10
- package/cjs/12/SeoDefaults.js +0 -1
- package/cjs/12/seoBuildTags.d.ts +0 -8
- package/cjs/12/seoBuildTags.js +0 -1
- package/cjs/12/types.d.ts +0 -2
- package/cjs/12/types.js +0 -1
- package/cjs/12.d.ts +0 -3
- package/cjs/12.js +0 -1
- package/cjs/ThemeContext.d.ts +0 -11
- package/cjs/ThemeContext.js +0 -1
- package/cjs/ThemeProvider.d.ts +0 -17
- package/cjs/ThemeProvider.js +0 -1
- package/cjs/config.d.ts +0 -7
- package/cjs/config.js +0 -1
- package/cjs/index.d.ts +0 -4
- package/cjs/index.js +0 -1
- package/cjs/load.d.ts +0 -2
- package/cjs/load.js +0 -1
- package/cjs/package.json +0 -22
- package/cjs/useTheme.d.ts +0 -4
- package/cjs/useTheme.js +0 -1
- package/config.js +0 -1
- package/index.js +0 -1
- package/load.js +0 -1
- package/useTheme.js +0 -1
package/config.esm.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { withI18nLegacy, withI18nAsync, withI18n } from '@koine/i18n/next';
|
|
2
|
+
|
|
3
|
+
let withKoine = (options = {}) => {
|
|
4
|
+
const { nx, svg, i18nRoutes, i18nCompiler, ...restNextConfig } = options;
|
|
5
|
+
const nextConfig = {
|
|
6
|
+
eslint: {
|
|
7
|
+
ignoreDuringBuilds: true,
|
|
8
|
+
},
|
|
9
|
+
typescript: {
|
|
10
|
+
ignoreBuildErrors: true,
|
|
11
|
+
},
|
|
12
|
+
poweredByHeader: false,
|
|
13
|
+
experimental: {
|
|
14
|
+
scrollRestoration: true,
|
|
15
|
+
...(restNextConfig.experimental || {}),
|
|
16
|
+
},
|
|
17
|
+
modularizeImports: {
|
|
18
|
+
...(restNextConfig.modularizeImports || {}),
|
|
19
|
+
"@koine/api": { transform: "@koine/api/{{member}}" },
|
|
20
|
+
"@koine/browser": { transform: "@koine/browser/{{member}}" },
|
|
21
|
+
"@koine/dom": { transform: "@koine/dom/{{member}}" },
|
|
22
|
+
"@koine/node": { transform: "@koine/node/{{member}}" },
|
|
23
|
+
"@koine/i18n/?(((\\w*)?/?)*)": {
|
|
24
|
+
transform: "@koine/i18n/{{ matches.[1] }}/{{member}}",
|
|
25
|
+
},
|
|
26
|
+
"@koine/react/?(((\\w*)?/?)*)": {
|
|
27
|
+
transform: "@koine/react/{{ matches.[1] }}/{{member}}",
|
|
28
|
+
},
|
|
29
|
+
"@koine/next/?(((\\w*)?/?)*)": {
|
|
30
|
+
transform: "@koine/next/{{ matches.[1] }}/{{member}}",
|
|
31
|
+
},
|
|
32
|
+
"@koine/utils": { transform: "@koine/utils/{{member}}" },
|
|
33
|
+
},
|
|
34
|
+
...restNextConfig,
|
|
35
|
+
};
|
|
36
|
+
if (svg) {
|
|
37
|
+
if (nx) {
|
|
38
|
+
nextConfig["nx"] = { svgr: true };
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
delete nextConfig["nx"];
|
|
42
|
+
nextConfig.webpack = (_config, options) => {
|
|
43
|
+
const webpackConfig = typeof nextConfig.webpack === "function"
|
|
44
|
+
? nextConfig.webpack(_config, options)
|
|
45
|
+
: _config;
|
|
46
|
+
webpackConfig.module.rules.push({
|
|
47
|
+
test: /\.svg$/,
|
|
48
|
+
use: [
|
|
49
|
+
{
|
|
50
|
+
loader: "@svgr/webpack",
|
|
51
|
+
options: {
|
|
52
|
+
svgoConfig: {
|
|
53
|
+
plugins: [
|
|
54
|
+
{
|
|
55
|
+
name: "removeViewBox",
|
|
56
|
+
active: false,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
});
|
|
64
|
+
return webpackConfig;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (i18nRoutes) {
|
|
69
|
+
return withI18nLegacy({ ...nextConfig, i18nRoutes });
|
|
70
|
+
}
|
|
71
|
+
if (i18nCompiler) {
|
|
72
|
+
if (nx) {
|
|
73
|
+
return withI18nAsync({ ...nextConfig, i18nCompiler });
|
|
74
|
+
}
|
|
75
|
+
return withI18n({ ...nextConfig, i18nCompiler });
|
|
76
|
+
}
|
|
77
|
+
return nextConfig;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export { withKoine };
|
package/index.cjs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports._default = require('./index.cjs.js').default;
|
package/index.cjs.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var load = require('./load.cjs.js');
|
|
6
|
+
var ThemeContext = require('./ThemeContext.cjs.js');
|
|
7
|
+
var ThemeProvider = require('./ThemeProvider.cjs.js');
|
|
8
|
+
var useTheme = require('./useTheme.cjs.js');
|
|
9
|
+
require('react');
|
|
10
|
+
require('react/jsx-runtime');
|
|
11
|
+
require('next/script');
|
|
12
|
+
require('@koine/utils');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.load = load.load;
|
|
17
|
+
exports.ThemeContext = ThemeContext.ThemeContext;
|
|
18
|
+
exports.ThemeProvider = ThemeProvider.ThemeProvider;
|
|
19
|
+
exports.useTheme = useTheme.useTheme;
|
package/index.cjs.mjs
ADDED
package/index.esm.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { load } from './load.esm.js';
|
|
2
|
+
export { ThemeContext } from './ThemeContext.esm.js';
|
|
3
|
+
export { ThemeProvider } from './ThemeProvider.esm.js';
|
|
4
|
+
export { useTheme } from './useTheme.esm.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
7
|
+
import 'next/script';
|
|
8
|
+
import '@koine/utils';
|
package/load.cjs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports._default = require('./load.cjs.js').default;
|
package/load.cjs.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function load(component, milliseconds) {
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
setTimeout(() => resolve(component), milliseconds);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
exports["default"] = load;
|
|
12
|
+
exports.load = load;
|
package/load.cjs.mjs
ADDED
package/load.esm.js
ADDED
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.
|
|
6
|
-
"@koine/utils": "2.0.0-beta.
|
|
7
|
-
"@koine/i18n": "2.0.0-beta.
|
|
5
|
+
"@koine/browser": "2.0.0-beta.78",
|
|
6
|
+
"@koine/utils": "2.0.0-beta.78",
|
|
7
|
+
"@koine/i18n": "2.0.0-beta.78"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"next": "^14.0.4",
|
|
@@ -16,62 +16,45 @@
|
|
|
16
16
|
"optional": true
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
"module": "./index.js",
|
|
20
|
-
"type": "module",
|
|
21
|
-
"main": "./cjs/index.js",
|
|
22
19
|
"exports": {
|
|
20
|
+
"./package.json": "./package.json",
|
|
23
21
|
".": {
|
|
24
|
-
"
|
|
25
|
-
"import": "./index.
|
|
22
|
+
"module": "./index.esm.js",
|
|
23
|
+
"import": "./index.cjs.mjs",
|
|
24
|
+
"default": "./index.cjs.js"
|
|
26
25
|
},
|
|
27
26
|
"./12": {
|
|
28
|
-
"
|
|
29
|
-
"import": "./12.
|
|
27
|
+
"module": "./12.esm.js",
|
|
28
|
+
"import": "./12.cjs.mjs",
|
|
29
|
+
"default": "./12.cjs.js"
|
|
30
30
|
},
|
|
31
|
-
"./
|
|
32
|
-
"
|
|
33
|
-
"import": "./
|
|
34
|
-
|
|
35
|
-
"./12/DisableErrorOverlay": {
|
|
36
|
-
"require": "./cjs/12/DisableErrorOverlay.js",
|
|
37
|
-
"import": "./12/DisableErrorOverlay.js"
|
|
38
|
-
},
|
|
39
|
-
"./12/Seo": {
|
|
40
|
-
"require": "./cjs/12/Seo.js",
|
|
41
|
-
"import": "./12/Seo.js"
|
|
42
|
-
},
|
|
43
|
-
"./12/SeoDefaults": {
|
|
44
|
-
"require": "./cjs/12/SeoDefaults.js",
|
|
45
|
-
"import": "./12/SeoDefaults.js"
|
|
46
|
-
},
|
|
47
|
-
"./12/seoBuildTags": {
|
|
48
|
-
"require": "./cjs/12/seoBuildTags.js",
|
|
49
|
-
"import": "./12/seoBuildTags.js"
|
|
31
|
+
"./config": {
|
|
32
|
+
"module": "./config.esm.js",
|
|
33
|
+
"import": "./config.cjs.mjs",
|
|
34
|
+
"default": "./config.cjs.js"
|
|
50
35
|
},
|
|
51
|
-
"./
|
|
52
|
-
"
|
|
53
|
-
"import": "./
|
|
36
|
+
"./load": {
|
|
37
|
+
"module": "./load.esm.js",
|
|
38
|
+
"import": "./load.cjs.mjs",
|
|
39
|
+
"default": "./load.cjs.js"
|
|
54
40
|
},
|
|
55
41
|
"./ThemeContext": {
|
|
56
|
-
"
|
|
57
|
-
"import": "./ThemeContext.
|
|
42
|
+
"module": "./ThemeContext.esm.js",
|
|
43
|
+
"import": "./ThemeContext.cjs.mjs",
|
|
44
|
+
"default": "./ThemeContext.cjs.js"
|
|
58
45
|
},
|
|
59
46
|
"./ThemeProvider": {
|
|
60
|
-
"
|
|
61
|
-
"import": "./ThemeProvider.
|
|
62
|
-
|
|
63
|
-
"./config": {
|
|
64
|
-
"require": "./cjs/config.js",
|
|
65
|
-
"import": "./config.js"
|
|
66
|
-
},
|
|
67
|
-
"./load": {
|
|
68
|
-
"require": "./cjs/load.js",
|
|
69
|
-
"import": "./load.js"
|
|
47
|
+
"module": "./ThemeProvider.esm.js",
|
|
48
|
+
"import": "./ThemeProvider.cjs.mjs",
|
|
49
|
+
"default": "./ThemeProvider.cjs.js"
|
|
70
50
|
},
|
|
71
51
|
"./useTheme": {
|
|
72
|
-
"
|
|
73
|
-
"import": "./useTheme.
|
|
52
|
+
"module": "./useTheme.esm.js",
|
|
53
|
+
"import": "./useTheme.cjs.mjs",
|
|
54
|
+
"default": "./useTheme.cjs.js"
|
|
74
55
|
}
|
|
75
56
|
},
|
|
76
|
-
"
|
|
57
|
+
"module": "./index.esm.js",
|
|
58
|
+
"main": "./index.cjs.js",
|
|
59
|
+
"version": "2.0.0-beta.78"
|
|
77
60
|
}
|
package/typings.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nx types
|
|
3
|
+
*
|
|
4
|
+
* Allow to embed SVGs as both URLs string and as React components
|
|
5
|
+
*/
|
|
6
|
+
declare module "*.svg" {
|
|
7
|
+
const content: unknown;
|
|
8
|
+
export const ReactComponent: import("react").FC<
|
|
9
|
+
import("react").ComponentProps<"svg">
|
|
10
|
+
>;
|
|
11
|
+
export default content;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* [`next.js` pages router](https://nextjs.org/docs/pages) utility type
|
|
16
|
+
*/
|
|
17
|
+
type NextGetStaticPathsResult<Params extends { [key: string]: any }> = Omit<
|
|
18
|
+
import("next").GetStaticPathsResult,
|
|
19
|
+
"paths"
|
|
20
|
+
> & {
|
|
21
|
+
paths: Array<string | { params: Params; locale?: string }>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* [`next.js` pages router](https://nextjs.org/docs/pages) utility type
|
|
26
|
+
*/
|
|
27
|
+
declare type NextPageDataStaticPaths<Params extends { [key: string]: any }> = (
|
|
28
|
+
context: import("next").GetStaticPathsContext,
|
|
29
|
+
) =>
|
|
30
|
+
| Promise<NextGetStaticPathsResult<Params>>
|
|
31
|
+
| NextGetStaticPathsResult<Params>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* [`next.js` pages router](https://nextjs.org/docs/pages) utility type
|
|
35
|
+
*/
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
|
+
declare type NextPageDataStatic<P extends { [key: string]: any }> =
|
|
38
|
+
import("next").GetStaticProps<P, import("querystring").ParsedUrlQuery>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* [`next.js` pages router](https://nextjs.org/docs/pages) utility type
|
|
42
|
+
*/
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
|
+
declare type NextPageDataServer<P extends { [key: string]: any }> =
|
|
45
|
+
import("next").GetServerSideProps<P, import("querystring").ParsedUrlQuery>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Workaround to re-create the type `RouteProperties` that is not exported by
|
|
49
|
+
* `next.js`
|
|
50
|
+
*/
|
|
51
|
+
declare type NextRouteProperties = Parameters<
|
|
52
|
+
import("next/router").Router["getRouteInfo"]
|
|
53
|
+
>[0]["routeProps"];
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Extend NodeJS `process.env` with variables used by @koine
|
|
57
|
+
*/
|
|
58
|
+
// declare namespace NodeJS {
|
|
59
|
+
// interface ProcessEnv {
|
|
60
|
+
// }
|
|
61
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports._default = require('./useTheme.cjs.js').default;
|
package/useTheme.cjs.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var ThemeContext = require('./ThemeContext.cjs.js');
|
|
7
|
+
|
|
8
|
+
const useTheme = () => react.useContext(ThemeContext.ThemeContext);
|
|
9
|
+
|
|
10
|
+
exports["default"] = useTheme;
|
|
11
|
+
exports.useTheme = useTheme;
|
package/useTheme.cjs.mjs
ADDED
package/useTheme.esm.js
ADDED
package/12/AnalyticsGoogle.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{useRouter as r}from"next/router";import o from"next/script";import{useEffect as n,useState as g}from"react";import{gtagPageview as i}from"@koine/browser";export let AnalyticsGoogle=({id:s})=>{let l=s||process.env.NEXT_PUBLIC_GTM_ID,{events:m,asPath:c,query:d}=r(),[p,f]=g(!1),[w,u]=g(!1);return(n(()=>{let e=()=>{u(!0)};return m.on("routeChangeComplete",e),()=>{m.off("routeChangeComplete",e)}},[m]),n(()=>{w&&p&&c&&i(c)},[c,d,w,p]),l)?t(a,{children:[e(o,{id:"google-tagmanager",src:`https://www.googletagmanager.com/gtag/js?id=${s}`,strategy:"afterInteractive",onLoad:()=>f(!0)}),e(o,{id:"google-analytics",strategy:"afterInteractive",children:`
|
|
2
|
-
window.dataLayer = window.dataLayer || [];
|
|
3
|
-
function gtag(){window.dataLayer.push(arguments);}
|
|
4
|
-
gtag('js', new Date());
|
|
5
|
-
|
|
6
|
-
gtag('config', '${s}', { 'send_page_view': false });
|
|
7
|
-
`})]}):null};export default AnalyticsGoogle;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import r from"next/head";export let DisableErrorOverlay=()=>e(r,{children:"development"===process.env.NODE_ENV&&e("script",{dangerouslySetInnerHTML:{__html:"window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});"}})});export default DisableErrorOverlay;
|
package/12/Seo.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import o from"next/head";import{seoBuildTags as r}from"./seoBuildTags";export let Seo=t=>e(o,{children:r(t)});export default Seo;
|
package/12/SeoDefaults.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import t from"next/head";import{seoBuildTags as o}from"./seoBuildTags";export let SeoDefaults=r=>e(t,{children:o(r)});export default SeoDefaults;
|
package/12/seoBuildTags.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{isArray as t}from"@koine/utils";let l={tplTitle:""};export const seoBuildTags=({seo:o,hidden:i,keywords:r,title:a="",titleTemplate:n,defaultTitle:p,noindex:s,nofollow:c,description:g,languageAlternates:h=[],twitter:d,facebook:u,openGraph:m,og:f,canonical:y,metaTags:T,linkTags:k,schema:w}={})=>{let j="seo-",x=[],E={},b={};n&&(l.tplTitle=n),(a=a||o?.title||"")?l.tplTitle&&l.tplTitle!==a&&(a=l.tplTitle.replace(/%s/g,a)):p&&(a=p),a&&(x.push(e("title",{children:a},j+"title")),b["og:title"]=a),E.robots=`${s||i?"noindex":"index"},${c||i?"nofollow":"follow"}`,(g=g||o?.description)&&(E.description=g,b["og:description"]=g),(r=r||o?.keywords)&&(E.keywords=t(r)?r.join(", "):r),h?.length>0&&h.forEach(({href:t,hrefLang:l})=>{x.push(e("link",{rel:"alternate",hrefLang:l,href:t},j+"languageAlternate-"+l))}),y&&(x.push(e("link",{rel:"canonical",href:y},j+"canonical")),b["og:url"]=y),u?.appId&&(b["fb:app_id"]=u.appId),d&&(d.cardType&&(E["twitter:card"]=d.cardType),d.site&&(E["twitter:site"]=d.site),d.handle&&(E["twitter:creator"]=d.handle));let N=f||m;N?.title&&(b["og:title"]=N?.title),N?.description&&(b["og:description"]=N?.description),N?.url&&(b["og:url"]=N.url),N?.type&&(b["og:type"]=N.type.toLowerCase()),N?.locale&&(b["og:locale"]=N.locale),N?.siteName&&(b["og:siteName"]=N.siteName);let I=N?.image||o?.ogimage;return I&&(b["og:image"]=I),Object.keys(E).forEach(t=>{x.push(e("meta",{name:t,content:E[t]},j+"name-"+t))}),Object.keys(b).forEach(t=>{x.push(e("meta",{property:t,content:b[t]},j+"prop-"+ +t))}),T&&T.length>0&&T.forEach(t=>{x.push(e("meta",{...t},j+"meta-"+(t.name||t.property||t.httpEquiv)))}),k?.length&&k.forEach(t=>{x.push(e("link",{...t},j+"link-"+(t.href||t.rel)))}),w&&x.push(e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(w)}},j+"schema")),x};export default seoBuildTags;
|
package/12/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
package/12.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{AnalyticsGoogle}from"./12/AnalyticsGoogle";export{DisableErrorOverlay}from"./12/DisableErrorOverlay";export*from"./12/types";
|
package/ThemeContext.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as e}from"react";export const ThemeContext=e({setTheme:e=>{},themes:[]});export default ThemeContext;
|
package/ThemeProvider.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import r from"next/script";import{memo as o,useCallback as i,useEffect as n,useState as s}from"react";import{isServer as a}from"@koine/utils";import{ThemeContext as m}from"./ThemeContext";let l=["light","dark"],d="(prefers-color-scheme: dark)",c="theme";export const ThemeProvider=({forcedTheme:r,disableTransitionOnChange:o=!1,enableSystem:v=!0,enableColorScheme:y,themes:p=["light","dark"],defaultTheme:g=v?"system":"light",attribute:w="data-theme",value:x,children:S,nonce:k})=>{let[b,L]=s(()=>u(c,g)),[T,j]=s(()=>u(c)),C=x?Object.values(x):p,E=i(e=>{let t=e;if(a||!t)return;"system"===e&&v&&(t=f());let r=x?x[t]:t,i=o?$():null,n=document.documentElement;if("class"===w?(n.classList.remove(...C),r&&n.classList.add(r)):r?n.setAttribute(w,r):n.removeAttribute(w),y){let e=l.includes(g)?g:"",r=l.includes(t)?t:e;n.style.colorScheme=r}i?.()},[w,C,g,o,y,v,x]),I=i(e=>{L(e);try{localStorage.setItem(c,e)}catch(e){}},[]),M=i(e=>{j(f(e)),"system"===b&&v&&!r&&E("system")},[b,v,r,E]);return n(()=>{let e=window.matchMedia(d);return e.addListener(M),M(e),()=>e.removeListener(M)},[M]),n(()=>{let e=e=>{e.key===c&&I(e.newValue||g)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[g,I]),n(()=>{E(r??b)},[E,r,b]),t(m.Provider,{value:{theme:b,setTheme:I,forcedTheme:r,resolvedTheme:"system"===b?T:b,themes:v?[...p,"system"]:p,systemTheme:v?T:void 0},children:[e(h,{forcedTheme:r,disableTransitionOnChange:o,enableSystem:v,enableColorScheme:y,themes:p,defaultTheme:g,attribute:w,value:x,children:S,attrs:C,nonce:k}),S]})};let h=o(({forcedTheme:t,attribute:o,enableSystem:i,enableColorScheme:n,defaultTheme:s,value:a,attrs:m,nonce:h})=>{let u="system"===s,$=(()=>{let e=`d.remove(${m.map(e=>`'${e}'`).join(",")})`;return`var d=document.documentElement.classList;${e};`})(),f=n?(l.includes(s)?s:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",y=(e,t=!1,r=!0)=>{let i=a?a[e]:e,s=t?e+"|| ''":`'${i}'`,m="";return n&&r&&!t&&l.includes(e)&&(m+=`d.style.colorScheme = '${e}';`),"class"===o?t||i?m+=`d.add(${s})`:m+="null":i&&(m+=`d[s](n, ${s})`),m},p=t?`!function(){${$}${y(t)}}()`:i?`!function(){try {${$}var e=localStorage.getItem('${c}');if("system"===e||(!e&&${u})){var t="${d}",m=window.matchMedia(t);if(m.media!==t||m.matches){${y("dark")}}else{${y("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${y(a?"x[e]":"e",!0)}}${u?"":"else{"+y(s,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${$}var e=localStorage.getItem("${c}");if(e){${a?`var x=${JSON.stringify(a)};`:""}${y(a?"x[e]":"e",!0)}}else{${y(s,!1,!1)};}${f}}catch(t){}}();`;return e(r,{id:"next-theme-script",strategy:"beforeInteractive",src:`data:text/javascript;base64,${v(p)}`,nonce:h})},()=>!0),u=(e,t)=>{let r;if(!a){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},$=()=>{let e=document,t=e.createElement("style");return t.appendChild(e.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),e.head.appendChild(t),()=>{window.getComputedStyle(e.body),setTimeout(()=>{e.head.removeChild(t)},1)}},f=e=>(e||(e=window.matchMedia(d)),e.matches?"dark":"light"),v=e=>a?Buffer.from(e).toString("base64"):btoa(e);export default ThemeProvider;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{useRouter as r}from"next/router";import o from"next/script";import{useEffect as n,useState as g}from"react";import{gtagPageview as i}from"@koine/browser";export let AnalyticsGoogle=({id:s})=>{let l=s||process.env.NEXT_PUBLIC_GTM_ID,{events:m,asPath:c,query:d}=r(),[p,f]=g(!1),[w,u]=g(!1);return(n(()=>{let e=()=>{u(!0)};return m.on("routeChangeComplete",e),()=>{m.off("routeChangeComplete",e)}},[m]),n(()=>{w&&p&&c&&i(c)},[c,d,w,p]),l)?t(a,{children:[e(o,{id:"google-tagmanager",src:`https://www.googletagmanager.com/gtag/js?id=${s}`,strategy:"afterInteractive",onLoad:()=>f(!0)}),e(o,{id:"google-analytics",strategy:"afterInteractive",children:`
|
|
2
|
-
window.dataLayer = window.dataLayer || [];
|
|
3
|
-
function gtag(){window.dataLayer.push(arguments);}
|
|
4
|
-
gtag('js', new Date());
|
|
5
|
-
|
|
6
|
-
gtag('config', '${s}', { 'send_page_view': false });
|
|
7
|
-
`})]}):null};export default AnalyticsGoogle;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import r from"next/head";export let DisableErrorOverlay=()=>e(r,{children:"development"===process.env.NODE_ENV&&e("script",{dangerouslySetInnerHTML:{__html:"window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});"}})});export default DisableErrorOverlay;
|
package/cjs/12/Seo.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { NextSeoProps } from "next-seo/lib/types";
|
|
2
|
-
import { type LinkTag, type MetaTag } from "./seoBuildTags";
|
|
3
|
-
export type SeoData = {
|
|
4
|
-
hidden?: boolean;
|
|
5
|
-
title?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
keywords?: string | string[];
|
|
8
|
-
ogimage?: string;
|
|
9
|
-
};
|
|
10
|
-
type SeoPropsOpenGraph = NextSeoProps["openGraph"] & {
|
|
11
|
-
image?: string;
|
|
12
|
-
};
|
|
13
|
-
export type SeoProps = Omit<NextSeoProps, "additionalMetaTags" | "additionalLinkTags" | "mobileAlternate" | "robotsProps"> & {
|
|
14
|
-
metaTags?: ReadonlyArray<MetaTag>;
|
|
15
|
-
linkTags?: ReadonlyArray<LinkTag>;
|
|
16
|
-
seo?: SeoData;
|
|
17
|
-
hidden?: SeoData["hidden"];
|
|
18
|
-
keywords?: SeoData["keywords"];
|
|
19
|
-
openGraph?: SeoPropsOpenGraph;
|
|
20
|
-
og?: SeoPropsOpenGraph;
|
|
21
|
-
};
|
|
22
|
-
export declare let Seo: (props: SeoProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export default Seo;
|
package/cjs/12/Seo.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import o from"next/head";import{seoBuildTags as r}from"./seoBuildTags";export let Seo=t=>e(o,{children:r(t)});export default Seo;
|
package/cjs/12/SeoDefaults.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DefaultSeoProps } from "next-seo/lib/types";
|
|
2
|
-
import type { JsonObject } from "@koine/utils";
|
|
3
|
-
import { type LinkTag, type MetaTag } from "./seoBuildTags";
|
|
4
|
-
export type SeoDefaultsProps = Omit<DefaultSeoProps, "additionalMetaTags" | "additionalLinkTags" | "dangerouslySetAllPagesToNoIndex" | "dangerouslySetAllPagesToNoFollow" | "defaultOpenGraphImageWidth" | "defaultOpenGraphImageHeight" | "defaultOpenGraphVideoWidth" | "defaultOpenGraphVideoHeight" | "mobileAlternate" | "robotsProps"> & {
|
|
5
|
-
metaTags?: ReadonlyArray<MetaTag>;
|
|
6
|
-
linkTags?: ReadonlyArray<LinkTag>;
|
|
7
|
-
schema?: JsonObject;
|
|
8
|
-
};
|
|
9
|
-
export declare let SeoDefaults: (props: SeoDefaultsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default SeoDefaults;
|
package/cjs/12/SeoDefaults.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import t from"next/head";import{seoBuildTags as o}from"./seoBuildTags";export let SeoDefaults=r=>e(t,{children:o(r)});export default SeoDefaults;
|
package/cjs/12/seoBuildTags.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { SeoProps } from "./Seo";
|
|
3
|
-
import type { SeoDefaultsProps } from "./SeoDefaults";
|
|
4
|
-
export type MetaTag = React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
|
|
5
|
-
export type LinkTag = React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
|
|
6
|
-
type BuildTagsParams = SeoProps & SeoDefaultsProps;
|
|
7
|
-
export declare const seoBuildTags: ({ seo, hidden, keywords, title, titleTemplate, defaultTitle, noindex, nofollow, description, languageAlternates, twitter, facebook, openGraph, og: ogAlias, canonical, metaTags, linkTags, schema, }?: BuildTagsParams) => import("react").ReactNode[];
|
|
8
|
-
export default seoBuildTags;
|
package/cjs/12/seoBuildTags.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{isArray as t}from"@koine/utils";let l={tplTitle:""};export const seoBuildTags=({seo:o,hidden:i,keywords:r,title:a="",titleTemplate:n,defaultTitle:p,noindex:s,nofollow:c,description:g,languageAlternates:h=[],twitter:d,facebook:u,openGraph:m,og:f,canonical:y,metaTags:T,linkTags:k,schema:w}={})=>{let j="seo-",x=[],E={},b={};n&&(l.tplTitle=n),(a=a||o?.title||"")?l.tplTitle&&l.tplTitle!==a&&(a=l.tplTitle.replace(/%s/g,a)):p&&(a=p),a&&(x.push(e("title",{children:a},j+"title")),b["og:title"]=a),E.robots=`${s||i?"noindex":"index"},${c||i?"nofollow":"follow"}`,(g=g||o?.description)&&(E.description=g,b["og:description"]=g),(r=r||o?.keywords)&&(E.keywords=t(r)?r.join(", "):r),h?.length>0&&h.forEach(({href:t,hrefLang:l})=>{x.push(e("link",{rel:"alternate",hrefLang:l,href:t},j+"languageAlternate-"+l))}),y&&(x.push(e("link",{rel:"canonical",href:y},j+"canonical")),b["og:url"]=y),u?.appId&&(b["fb:app_id"]=u.appId),d&&(d.cardType&&(E["twitter:card"]=d.cardType),d.site&&(E["twitter:site"]=d.site),d.handle&&(E["twitter:creator"]=d.handle));let N=f||m;N?.title&&(b["og:title"]=N?.title),N?.description&&(b["og:description"]=N?.description),N?.url&&(b["og:url"]=N.url),N?.type&&(b["og:type"]=N.type.toLowerCase()),N?.locale&&(b["og:locale"]=N.locale),N?.siteName&&(b["og:siteName"]=N.siteName);let I=N?.image||o?.ogimage;return I&&(b["og:image"]=I),Object.keys(E).forEach(t=>{x.push(e("meta",{name:t,content:E[t]},j+"name-"+t))}),Object.keys(b).forEach(t=>{x.push(e("meta",{property:t,content:b[t]},j+"prop-"+ +t))}),T&&T.length>0&&T.forEach(t=>{x.push(e("meta",{...t},j+"meta-"+(t.name||t.property||t.httpEquiv)))}),k?.length&&k.forEach(t=>{x.push(e("link",{...t},j+"link-"+(t.href||t.rel)))}),w&&x.push(e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(w)}},j+"schema")),x};export default seoBuildTags;
|
package/cjs/12/types.d.ts
DELETED
package/cjs/12/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
package/cjs/12.d.ts
DELETED
package/cjs/12.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{AnalyticsGoogle}from"./12/AnalyticsGoogle";export{DisableErrorOverlay}from"./12/DisableErrorOverlay";export*from"./12/types";
|
package/cjs/ThemeContext.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export type ThemeContextProps = {
|
|
3
|
-
themes: string[];
|
|
4
|
-
forcedTheme?: string;
|
|
5
|
-
setTheme: (theme: string) => void;
|
|
6
|
-
theme?: string;
|
|
7
|
-
resolvedTheme?: string;
|
|
8
|
-
systemTheme?: "dark" | "light";
|
|
9
|
-
};
|
|
10
|
-
export declare const ThemeContext: import("react").Context<ThemeContextProps>;
|
|
11
|
-
export default ThemeContext;
|
package/cjs/ThemeContext.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as e}from"react";export const ThemeContext=e({setTheme:e=>{},themes:[]});export default ThemeContext;
|
package/cjs/ThemeProvider.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type ValueObject = {
|
|
3
|
-
[themeName: string]: string;
|
|
4
|
-
};
|
|
5
|
-
export type ThemeProviderProps = React.PropsWithChildren<{
|
|
6
|
-
themes?: string[];
|
|
7
|
-
forcedTheme?: string;
|
|
8
|
-
enableSystem?: boolean;
|
|
9
|
-
disableTransitionOnChange?: boolean;
|
|
10
|
-
enableColorScheme?: boolean;
|
|
11
|
-
defaultTheme?: string;
|
|
12
|
-
attribute?: string | "class";
|
|
13
|
-
value?: ValueObject;
|
|
14
|
-
nonce?: string;
|
|
15
|
-
}>;
|
|
16
|
-
export declare const ThemeProvider: ({ forcedTheme, disableTransitionOnChange, enableSystem, enableColorScheme, themes, defaultTheme, attribute, value, children, nonce, }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export default ThemeProvider;
|
package/cjs/ThemeProvider.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import r from"next/script";import{memo as o,useCallback as i,useEffect as n,useState as s}from"react";import{isServer as a}from"@koine/utils";import{ThemeContext as m}from"./ThemeContext";let l=["light","dark"],d="(prefers-color-scheme: dark)",c="theme";export const ThemeProvider=({forcedTheme:r,disableTransitionOnChange:o=!1,enableSystem:v=!0,enableColorScheme:y,themes:p=["light","dark"],defaultTheme:g=v?"system":"light",attribute:w="data-theme",value:x,children:S,nonce:k})=>{let[b,L]=s(()=>u(c,g)),[T,j]=s(()=>u(c)),C=x?Object.values(x):p,E=i(e=>{let t=e;if(a||!t)return;"system"===e&&v&&(t=f());let r=x?x[t]:t,i=o?$():null,n=document.documentElement;if("class"===w?(n.classList.remove(...C),r&&n.classList.add(r)):r?n.setAttribute(w,r):n.removeAttribute(w),y){let e=l.includes(g)?g:"",r=l.includes(t)?t:e;n.style.colorScheme=r}i?.()},[w,C,g,o,y,v,x]),I=i(e=>{L(e);try{localStorage.setItem(c,e)}catch(e){}},[]),M=i(e=>{j(f(e)),"system"===b&&v&&!r&&E("system")},[b,v,r,E]);return n(()=>{let e=window.matchMedia(d);return e.addListener(M),M(e),()=>e.removeListener(M)},[M]),n(()=>{let e=e=>{e.key===c&&I(e.newValue||g)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[g,I]),n(()=>{E(r??b)},[E,r,b]),t(m.Provider,{value:{theme:b,setTheme:I,forcedTheme:r,resolvedTheme:"system"===b?T:b,themes:v?[...p,"system"]:p,systemTheme:v?T:void 0},children:[e(h,{forcedTheme:r,disableTransitionOnChange:o,enableSystem:v,enableColorScheme:y,themes:p,defaultTheme:g,attribute:w,value:x,children:S,attrs:C,nonce:k}),S]})};let h=o(({forcedTheme:t,attribute:o,enableSystem:i,enableColorScheme:n,defaultTheme:s,value:a,attrs:m,nonce:h})=>{let u="system"===s,$=(()=>{let e=`d.remove(${m.map(e=>`'${e}'`).join(",")})`;return`var d=document.documentElement.classList;${e};`})(),f=n?(l.includes(s)?s:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",y=(e,t=!1,r=!0)=>{let i=a?a[e]:e,s=t?e+"|| ''":`'${i}'`,m="";return n&&r&&!t&&l.includes(e)&&(m+=`d.style.colorScheme = '${e}';`),"class"===o?t||i?m+=`d.add(${s})`:m+="null":i&&(m+=`d[s](n, ${s})`),m},p=t?`!function(){${$}${y(t)}}()`:i?`!function(){try {${$}var e=localStorage.getItem('${c}');if("system"===e||(!e&&${u})){var t="${d}",m=window.matchMedia(t);if(m.media!==t||m.matches){${y("dark")}}else{${y("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${y(a?"x[e]":"e",!0)}}${u?"":"else{"+y(s,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${$}var e=localStorage.getItem("${c}");if(e){${a?`var x=${JSON.stringify(a)};`:""}${y(a?"x[e]":"e",!0)}}else{${y(s,!1,!1)};}${f}}catch(t){}}();`;return e(r,{id:"next-theme-script",strategy:"beforeInteractive",src:`data:text/javascript;base64,${v(p)}`,nonce:h})},()=>!0),u=(e,t)=>{let r;if(!a){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},$=()=>{let e=document,t=e.createElement("style");return t.appendChild(e.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),e.head.appendChild(t),()=>{window.getComputedStyle(e.body),setTimeout(()=>{e.head.removeChild(t)},1)}},f=e=>(e||(e=window.matchMedia(d)),e.matches?"dark":"light"),v=e=>a?Buffer.from(e).toString("base64"):btoa(e);export default ThemeProvider;
|
package/cjs/config.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { NextConfig } from "next";
|
|
2
|
-
import { type WithI18nAsyncOptions, type WithI18nLegacyOptions } from "@koine/i18n/next";
|
|
3
|
-
export type WithKoineOptions = NextConfig & {
|
|
4
|
-
nx?: boolean;
|
|
5
|
-
svg?: boolean;
|
|
6
|
-
} & WithI18nLegacyOptions & WithI18nAsyncOptions;
|
|
7
|
-
export declare let withKoine: (options?: WithKoineOptions) => NextConfig;
|
package/cjs/config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{withI18n as e,withI18nAsync as r,withI18nLegacy as o}from"@koine/i18n/next";export let withKoine=(n={})=>{let{nx:i,svg:t,i18nRoutes:m,i18nCompiler:s,...a}=n,k={eslint:{ignoreDuringBuilds:!0},typescript:{ignoreBuildErrors:!0},poweredByHeader:!1,experimental:{scrollRestoration:!0,...a.experimental||{}},modularizeImports:{...a.modularizeImports||{},"@koine/api":{transform:"@koine/api/{{member}}"},"@koine/browser":{transform:"@koine/browser/{{member}}"},"@koine/dom":{transform:"@koine/dom/{{member}}"},"@koine/node":{transform:"@koine/node/{{member}}"},"@koine/i18n/?(((\\w*)?/?)*)":{transform:"@koine/i18n/{{ matches.[1] }}/{{member}}"},"@koine/react/?(((\\w*)?/?)*)":{transform:"@koine/react/{{ matches.[1] }}/{{member}}"},"@koine/next/?(((\\w*)?/?)*)":{transform:"@koine/next/{{ matches.[1] }}/{{member}}"},"@koine/utils":{transform:"@koine/utils/{{member}}"}},...a};return(t&&(i?k.nx={svgr:!0}:(delete k.nx,k.webpack=(e,r)=>{let o="function"==typeof k.webpack?k.webpack(e,r):e;return o.module.rules.push({test:/\.svg$/,use:[{loader:"@svgr/webpack",options:{svgoConfig:{plugins:[{name:"removeViewBox",active:!1}]}}}]}),o})),m)?o({...k,i18nRoutes:m}):s?i?r({...k,i18nCompiler:s}):e({...k,i18nCompiler:s}):k};
|
package/cjs/index.d.ts
DELETED
package/cjs/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{load}from"./load";export{ThemeContext}from"./ThemeContext";export{ThemeProvider}from"./ThemeProvider";export{useTheme}from"./useTheme";
|
package/cjs/load.d.ts
DELETED
package/cjs/load.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function load(e,o){return new Promise(t=>{setTimeout(()=>t(e),o)})}export default load;
|
package/cjs/package.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@koine/next",
|
|
3
|
-
"sideEffects": false,
|
|
4
|
-
"dependencies": {
|
|
5
|
-
"@koine/browser": "*",
|
|
6
|
-
"@koine/utils": "*",
|
|
7
|
-
"@koine/i18n": "*"
|
|
8
|
-
},
|
|
9
|
-
"peerDependencies": {
|
|
10
|
-
"next": "^14.0.4",
|
|
11
|
-
"next-seo": "^6.4.0",
|
|
12
|
-
"react": "^18.2.0"
|
|
13
|
-
},
|
|
14
|
-
"peerDependenciesMeta": {
|
|
15
|
-
"next-seo": {
|
|
16
|
-
"optional": true
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"module": "./index.js",
|
|
20
|
-
"type": "module",
|
|
21
|
-
"main": "./index.js"
|
|
22
|
-
}
|
package/cjs/useTheme.d.ts
DELETED
package/cjs/useTheme.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useContext as e}from"react";import{ThemeContext as t}from"./ThemeContext";export const useTheme=()=>e(t);export default useTheme;
|
package/config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{withI18n as e,withI18nAsync as r,withI18nLegacy as o}from"@koine/i18n/next";export let withKoine=(n={})=>{let{nx:i,svg:t,i18nRoutes:m,i18nCompiler:s,...a}=n,k={eslint:{ignoreDuringBuilds:!0},typescript:{ignoreBuildErrors:!0},poweredByHeader:!1,experimental:{scrollRestoration:!0,...a.experimental||{}},modularizeImports:{...a.modularizeImports||{},"@koine/api":{transform:"@koine/api/{{member}}"},"@koine/browser":{transform:"@koine/browser/{{member}}"},"@koine/dom":{transform:"@koine/dom/{{member}}"},"@koine/node":{transform:"@koine/node/{{member}}"},"@koine/i18n/?(((\\w*)?/?)*)":{transform:"@koine/i18n/{{ matches.[1] }}/{{member}}"},"@koine/react/?(((\\w*)?/?)*)":{transform:"@koine/react/{{ matches.[1] }}/{{member}}"},"@koine/next/?(((\\w*)?/?)*)":{transform:"@koine/next/{{ matches.[1] }}/{{member}}"},"@koine/utils":{transform:"@koine/utils/{{member}}"}},...a};return(t&&(i?k.nx={svgr:!0}:(delete k.nx,k.webpack=(e,r)=>{let o="function"==typeof k.webpack?k.webpack(e,r):e;return o.module.rules.push({test:/\.svg$/,use:[{loader:"@svgr/webpack",options:{svgoConfig:{plugins:[{name:"removeViewBox",active:!1}]}}}]}),o})),m)?o({...k,i18nRoutes:m}):s?i?r({...k,i18nCompiler:s}):e({...k,i18nCompiler:s}):k};
|