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

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 (134) hide show
  1. package/12/AnalyticsGoogle.d.ts +0 -1
  2. package/12/AnalyticsGoogle.js +32 -0
  3. package/12/DisableErrorOverlay.d.ts +0 -5
  4. package/12/DisableErrorOverlay.js +8 -0
  5. package/12/DynamicNamespaces.d.ts +1 -6
  6. package/12/DynamicNamespaces.js +4 -0
  7. package/12/Favicon.js +6 -0
  8. package/12/Link.d.ts +0 -3
  9. package/12/Link.js +9 -0
  10. package/12/NextProgress.d.ts +1 -4
  11. package/12/{NextProgress.mjs → NextProgress.js} +16 -28
  12. package/12/Seo.d.ts +2 -26
  13. package/12/Seo.js +7 -0
  14. package/12/SeoDefaults.d.ts +1 -4
  15. package/12/SeoDefaults.js +7 -0
  16. package/12/T.d.ts +1 -7
  17. package/12/T.js +8 -0
  18. package/12/{TransText.mjs → TransText.js} +1 -1
  19. package/12/app/AppHead.js +6 -0
  20. package/12/app/AppMain.d.ts +2 -20
  21. package/12/app/AppMain.js +1 -0
  22. package/12/app/css/AppMain.d.ts +1 -6
  23. package/12/app/css/AppMain.js +9 -0
  24. package/12/app/css/AppTheme.d.ts +1 -4
  25. package/12/app/css/AppTheme.js +7 -0
  26. package/12/app/css/auth/index.d.ts +2 -5
  27. package/12/app/css/auth/index.js +10 -0
  28. package/12/app/css/index.d.ts +2 -50
  29. package/12/app/css/index.js +9 -0
  30. package/12/app/index.d.ts +2 -2
  31. package/12/app/index.js +2 -0
  32. package/12/app/sc/AppMain.d.ts +1 -8
  33. package/12/app/sc/AppMain.js +18 -0
  34. package/12/app/sc/AppTheme.d.ts +0 -6
  35. package/12/app/sc/AppTheme.js +8 -0
  36. package/12/app/sc/auth/index.d.ts +2 -5
  37. package/12/app/sc/auth/index.js +10 -0
  38. package/12/app/sc/index.d.ts +2 -52
  39. package/12/app/sc/index.js +9 -0
  40. package/12/document/Document.d.ts +0 -10
  41. package/12/document/Document.js +18 -0
  42. package/12/document/css/index.d.ts +0 -12
  43. package/12/document/css/index.js +18 -0
  44. package/12/document/index.d.ts +2 -2
  45. package/12/document/index.js +2 -0
  46. package/12/document/sc/index.d.ts +0 -13
  47. package/12/document/sc/index.js +50 -0
  48. package/12/getT.d.ts +1 -6
  49. package/12/getT.js +4 -0
  50. package/12/index.d.ts +3 -24
  51. package/12/index.js +3 -0
  52. package/12/seoBuildTags.d.ts +2 -17
  53. package/12/seoBuildTags.js +93 -0
  54. package/12/to.d.ts +1 -11
  55. package/12/to.js +18 -0
  56. package/12/translationAsOptions.d.ts +2 -1
  57. package/12/translationAsOptions.js +10 -0
  58. package/12/types-i18n.d.ts +0 -87
  59. package/12/types-i18n.js +1 -0
  60. package/12/types-seo.js +1 -0
  61. package/12/types.d.ts +7 -0
  62. package/12/types.js +2 -0
  63. package/12/useBackUrl.js +23 -0
  64. package/12/useDateFormat.d.ts +0 -4
  65. package/12/useDateFormat.js +35 -0
  66. package/12/useForm.d.ts +1 -1
  67. package/12/useForm.js +15 -0
  68. package/12/useT.d.ts +1 -1
  69. package/12/useT.js +17 -0
  70. package/12/useTo.d.ts +1 -1
  71. package/12/useTo.js +15 -0
  72. package/ThemeContext.d.ts +11 -0
  73. package/ThemeContext.js +6 -0
  74. package/ThemeProvider.d.ts +17 -0
  75. package/ThemeProvider.js +204 -0
  76. package/config.d.ts +37 -0
  77. package/config.js +246 -0
  78. package/getSiteUrl.d.ts +0 -6
  79. package/getSiteUrl.js +6 -0
  80. package/index.d.ts +5 -2
  81. package/index.js +5 -0
  82. package/load.d.ts +0 -8
  83. package/load.js +6 -0
  84. package/package.json +155 -36
  85. package/useTheme.d.ts +4 -0
  86. package/useTheme.js +5 -0
  87. package/12/AnalyticsGoogle.mjs +0 -60
  88. package/12/DisableErrorOverlay.mjs +0 -16
  89. package/12/DynamicNamespaces.mjs +0 -8
  90. package/12/Favicon.mjs +0 -10
  91. package/12/Link.mjs +0 -20
  92. package/12/Seo.mjs +0 -30
  93. package/12/SeoDefaults.mjs +0 -14
  94. package/12/T.mjs +0 -27
  95. package/12/ThemeContext.d.ts +0 -17
  96. package/12/ThemeContext.mjs +0 -7
  97. package/12/ThemeProvider.d.ts +0 -35
  98. package/12/ThemeProvider.mjs +0 -245
  99. package/12/app/AppHead.mjs +0 -12
  100. package/12/app/AppMain.mjs +0 -1
  101. package/12/app/css/AppMain.mjs +0 -24
  102. package/12/app/css/AppTheme.mjs +0 -17
  103. package/12/app/css/auth/index.mjs +0 -24
  104. package/12/app/css/index.mjs +0 -65
  105. package/12/app/index.mjs +0 -2
  106. package/12/app/sc/AppMain.mjs +0 -58
  107. package/12/app/sc/AppTheme.mjs +0 -16
  108. package/12/app/sc/auth/index.mjs +0 -24
  109. package/12/app/sc/index.mjs +0 -67
  110. package/12/document/Document.mjs +0 -38
  111. package/12/document/css/index.mjs +0 -53
  112. package/12/document/index.mjs +0 -2
  113. package/12/document/sc/index.mjs +0 -65
  114. package/12/getT.mjs +0 -8
  115. package/12/index.mjs +0 -27
  116. package/12/seoBuildTags.mjs +0 -121
  117. package/12/to.mjs +0 -19
  118. package/12/translationAsOptions.mjs +0 -9
  119. package/12/types-i18n.mjs +0 -12
  120. package/12/types-seo.mjs +0 -1
  121. package/12/useBackUrl.mjs +0 -28
  122. package/12/useDateFormat.mjs +0 -26
  123. package/12/useForm.mjs +0 -47
  124. package/12/useT.mjs +0 -39
  125. package/12/useTheme.d.ts +0 -7
  126. package/12/useTheme.mjs +0 -7
  127. package/12/useTo.mjs +0 -8
  128. package/README.md +0 -13
  129. package/config/index.d.ts +0 -160
  130. package/config/index.mjs +0 -315
  131. package/getSiteUrl.mjs +0 -10
  132. package/index.mjs +0 -2
  133. package/load.mjs +0 -13
  134. /package/12/{useLocale.mjs → useLocale.js} +0 -0
package/package.json CHANGED
@@ -2,30 +2,30 @@
2
2
  "name": "@koine/next",
3
3
  "sideEffects": false,
4
4
  "dependencies": {
5
- "@koine/browser": "2.0.0-beta.14",
6
- "@koine/react": "2.0.0-beta.14",
7
- "@koine/utils": "2.0.0-beta.14"
5
+ "@koine/browser": "2.0.0-beta.16",
6
+ "@koine/react": "2.0.0-beta.16",
7
+ "@koine/utils": "2.0.0-beta.16"
8
8
  },
9
9
  "peerDependenciesMeta": {
10
- "@emotion/react": {
10
+ "@hookform/resolvers": {
11
11
  "optional": true
12
12
  },
13
- "@emotion/server": {
13
+ "@kuus/yup": {
14
14
  "optional": true
15
15
  },
16
- "@emotion/styled": {
16
+ "@mui/base": {
17
17
  "optional": true
18
18
  },
19
- "@hookform/resolvers": {
19
+ "@mui/material": {
20
20
  "optional": true
21
21
  },
22
- "@kuus/yup": {
22
+ "@emotion/react": {
23
23
  "optional": true
24
24
  },
25
- "@mui/base": {
25
+ "@emotion/server": {
26
26
  "optional": true
27
27
  },
28
- "@mui/material": {
28
+ "@emotion/styled": {
29
29
  "optional": true
30
30
  },
31
31
  "@tiptap/react": {
@@ -71,30 +71,149 @@
71
71
  "optional": true
72
72
  }
73
73
  },
74
- "peerDependencies": {
75
- "@hookform/resolvers": "^3.1.1",
76
- "@kuus/yup": "1.0.0-beta.7",
77
- "@mui/base": "5.0.0-beta.9",
78
- "@mui/utils": "^5.14.3",
79
- "@tiptap/react": "^2.0.4",
80
- "@tiptap/starter-kit": "^2.0.4",
81
- "date-fns": "^2.30.0",
82
- "date-fns-tz": "^2.0.0",
83
- "framer-motion": "^10.15.0",
84
- "next": "^13.4.12",
85
- "next-auth": "^4.22.3",
86
- "next-seo": "^6.1.0",
87
- "next-translate": "^2.5.2",
88
- "react": "^18.2.0",
89
- "react-hook-form": "^7.45.2",
90
- "react-icons": "^4.10.1",
91
- "react-swipeable": "^7.0.1",
92
- "styled-components": "^5.3.11",
93
- "tslib": "^2.6.1",
94
- "type-fest": "^4.1.0"
95
- },
96
- "module": "./index.mjs",
97
- "main": "./index.js",
98
74
  "types": "./index.d.ts",
99
- "version": "2.0.0-beta.14"
100
- }
75
+ "type": "module",
76
+ "module": "./index.js",
77
+ "exports": {
78
+ ".": {
79
+ "import": "./index.js"
80
+ },
81
+ "./12/AnalyticsGoogle": {
82
+ "import": "./12/AnalyticsGoogle.js"
83
+ },
84
+ "./12/DisableErrorOverlay": {
85
+ "import": "./12/DisableErrorOverlay.js"
86
+ },
87
+ "./12/DynamicNamespaces": {
88
+ "import": "./12/DynamicNamespaces.js"
89
+ },
90
+ "./12/Favicon": {
91
+ "import": "./12/Favicon.js"
92
+ },
93
+ "./12/Link": {
94
+ "import": "./12/Link.js"
95
+ },
96
+ "./12/NextProgress": {
97
+ "import": "./12/NextProgress.js"
98
+ },
99
+ "./12/Seo": {
100
+ "import": "./12/Seo.js"
101
+ },
102
+ "./12/SeoDefaults": {
103
+ "import": "./12/SeoDefaults.js"
104
+ },
105
+ "./12/T": {
106
+ "import": "./12/T.js"
107
+ },
108
+ "./12/TransText": {
109
+ "import": "./12/TransText.js"
110
+ },
111
+ "./12/app/AppHead": {
112
+ "import": "./12/app/AppHead.js"
113
+ },
114
+ "./12/app/AppMain": {
115
+ "import": "./12/app/AppMain.js"
116
+ },
117
+ "./12/app/css/AppMain": {
118
+ "import": "./12/app/css/AppMain.js"
119
+ },
120
+ "./12/app/css/AppTheme": {
121
+ "import": "./12/app/css/AppTheme.js"
122
+ },
123
+ "./12/app/css/auth": {
124
+ "import": "./12/app/css/auth/index.js"
125
+ },
126
+ "./12/app/css": {
127
+ "import": "./12/app/css/index.js"
128
+ },
129
+ "./12/app": {
130
+ "import": "./12/app/index.js"
131
+ },
132
+ "./12/app/sc/AppMain": {
133
+ "import": "./12/app/sc/AppMain.js"
134
+ },
135
+ "./12/app/sc/AppTheme": {
136
+ "import": "./12/app/sc/AppTheme.js"
137
+ },
138
+ "./12/app/sc/auth": {
139
+ "import": "./12/app/sc/auth/index.js"
140
+ },
141
+ "./12/app/sc": {
142
+ "import": "./12/app/sc/index.js"
143
+ },
144
+ "./12/document/Document": {
145
+ "import": "./12/document/Document.js"
146
+ },
147
+ "./12/document/css": {
148
+ "import": "./12/document/css/index.js"
149
+ },
150
+ "./12/document": {
151
+ "import": "./12/document/index.js"
152
+ },
153
+ "./12/document/sc": {
154
+ "import": "./12/document/sc/index.js"
155
+ },
156
+ "./12/getT": {
157
+ "import": "./12/getT.js"
158
+ },
159
+ "./12": {
160
+ "import": "./12/index.js"
161
+ },
162
+ "./12/seoBuildTags": {
163
+ "import": "./12/seoBuildTags.js"
164
+ },
165
+ "./12/to": {
166
+ "import": "./12/to.js"
167
+ },
168
+ "./12/translationAsOptions": {
169
+ "import": "./12/translationAsOptions.js"
170
+ },
171
+ "./12/types-i18n": {
172
+ "import": "./12/types-i18n.js"
173
+ },
174
+ "./12/types-seo": {
175
+ "import": "./12/types-seo.js"
176
+ },
177
+ "./12/types": {
178
+ "import": "./12/types.js"
179
+ },
180
+ "./12/useBackUrl": {
181
+ "import": "./12/useBackUrl.js"
182
+ },
183
+ "./12/useDateFormat": {
184
+ "import": "./12/useDateFormat.js"
185
+ },
186
+ "./12/useForm": {
187
+ "import": "./12/useForm.js"
188
+ },
189
+ "./12/useLocale": {
190
+ "import": "./12/useLocale.js"
191
+ },
192
+ "./12/useT": {
193
+ "import": "./12/useT.js"
194
+ },
195
+ "./12/useTo": {
196
+ "import": "./12/useTo.js"
197
+ },
198
+ "./ThemeContext": {
199
+ "import": "./ThemeContext.js"
200
+ },
201
+ "./ThemeProvider": {
202
+ "import": "./ThemeProvider.js"
203
+ },
204
+ "./config": {
205
+ "import": "./config.js"
206
+ },
207
+ "./getSiteUrl": {
208
+ "import": "./getSiteUrl.js"
209
+ },
210
+ "./load": {
211
+ "import": "./load.js"
212
+ },
213
+ "./useTheme": {
214
+ "import": "./useTheme.js"
215
+ }
216
+ },
217
+ "peerDependencies": {},
218
+ "version": "2.0.0-beta.16"
219
+ }
package/useTheme.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { type ThemeContextProps } from "./ThemeContext.js";
2
+ export type UseThemeProps = ThemeContextProps;
3
+ export declare const useTheme: () => ThemeContextProps;
4
+ export default useTheme;
package/useTheme.js ADDED
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ import { useContext } from "react";
3
+ import { ThemeContext } from "./ThemeContext.js";
4
+ export var useTheme = function () { return useContext(ThemeContext); };
5
+ export default useTheme;
@@ -1,60 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useRouter } from "next/router";
4
- import Script from "next/script";
5
- import { useEffect, useState } from "react";
6
- import gtagPageview from "@koine/browser/gtagPageview";
7
- export const AnalyticsGoogle = ({ id })=>{
8
- const uid = id || process.env["NEXT_PUBLIC_GTM_ID"];
9
- const { events, asPath, query } = useRouter();
10
- const [ready, setReady] = useState(false);
11
- const [routed, setRouted] = useState(false);
12
- // const [url, setUrl] = useState("");
13
- useEffect(()=>{
14
- const handleRouteChange = ()=>{
15
- setRouted(true);
16
- };
17
- events.on("routeChangeComplete", handleRouteChange);
18
- return ()=>{
19
- events.off("routeChangeComplete", handleRouteChange);
20
- };
21
- }, [
22
- events
23
- ]);
24
- useEffect(()=>{
25
- if (routed && ready && asPath) {
26
- // const search = query;
27
- gtagPageview(asPath);
28
- }
29
- }, [
30
- asPath,
31
- query,
32
- routed,
33
- ready
34
- ]);
35
- if (!uid) {
36
- return null;
37
- }
38
- return /*#__PURE__*/ _jsxs(_Fragment, {
39
- children: [
40
- /*#__PURE__*/ _jsx(Script, {
41
- id: "google-tagmanager",
42
- src: `https://www.googletagmanager.com/gtag/js?id=${id}`,
43
- strategy: "afterInteractive",
44
- onLoad: ()=>setReady(true)
45
- }),
46
- /*#__PURE__*/ _jsx(Script, {
47
- id: "google-analytics",
48
- strategy: "afterInteractive",
49
- children: `
50
- window.dataLayer = window.dataLayer || [];
51
- function gtag(){window.dataLayer.push(arguments);}
52
- gtag('js', new Date());
53
-
54
- gtag('config', '${id}', { 'send_page_view': false });
55
- `
56
- })
57
- ]
58
- });
59
- };
60
- export default AnalyticsGoogle;
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Head from "next/head";
3
- /**
4
- * Disable error overlay during `dev`
5
- *
6
- * @see https://github.com/vercel/next.js/discussions/13387#discussioncomment-101564
7
- */ export const DisableErrorOverlay = ()=>{
8
- return /*#__PURE__*/ _jsx(Head, {
9
- children: process.env["NODE_ENV"] !== "production" && /*#__PURE__*/ _jsx("script", {
10
- dangerouslySetInnerHTML: {
11
- __html: `window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});`
12
- }
13
- })
14
- });
15
- };
16
- export default DisableErrorOverlay;
@@ -1,8 +0,0 @@
1
- "use client";
2
- import BaseDynamicNamespaces from "next-translate/DynamicNamespaces";
3
- /**
4
- * **NOTE**: To make typescript work nicely here make sure to enable
5
- * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
6
- * in your `tsconfig.json` file.
7
- */ export const DynamicNamespaces = BaseDynamicNamespaces;
8
- export default DynamicNamespaces;
package/12/Favicon.mjs DELETED
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Head from "next/head";
3
- import React from "react";
4
- import FaviconTags from "@koine/react/FaviconTags";
5
- export const Favicon = (props)=>/*#__PURE__*/ _jsx(Head, {
6
- children: /*#__PURE__*/ _jsx(FaviconTags, {
7
- ...props
8
- })
9
- });
10
- export default Favicon;
package/12/Link.mjs DELETED
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import NextLink from "next/link";
3
- import React, { forwardRef } from "react";
4
- /**
5
- * @see https://next.js.org/docs/api-reference/next/link
6
- */ export const Link = /*#__PURE__*/ forwardRef(function Link({ href, prefetch, replace, scroll, shallow, locale, Link = "span", ...props }, ref) {
7
- return /*#__PURE__*/ _jsx(NextLink, {
8
- href: href,
9
- replace: replace,
10
- scroll: scroll,
11
- shallow: shallow,
12
- locale: locale,
13
- passHref: true,
14
- children: /*#__PURE__*/ _jsx(Link, {
15
- ref: ref,
16
- ...props
17
- })
18
- });
19
- });
20
- export default Link;
package/12/Seo.mjs DELETED
@@ -1,30 +0,0 @@
1
- // import { memo } from "react";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import Head from "next/head";
4
- import { seoBuildTags } from "./seoBuildTags";
5
- /**
6
- * Adapted from [garmeeh/next-seo](https://github.com/garmeeh/next-seo)
7
- *
8
- * See also:
9
- * - https://github.com/catnose99/next-head-seo
10
- * - https://nextjs.org/docs/api-reference/next/head
11
- *
12
- * NB: on the homepage you usually want to customize the `titleTemplate` to avoid
13
- * doubled app name. Assuming your default seo configuration is something like:
14
- *
15
- * ```js
16
- * {
17
- * titleTemplate: "%s | MyApp"
18
- * }
19
- * ```
20
- *
21
- * On the homepage you migh want to override it, e.g.:
22
- * ```js
23
- * <Seo title="MyApp | Some description" titleTemplate="%s" />
24
- * ```
25
- */ export const Seo = (props)=>{
26
- return /*#__PURE__*/ _jsx(Head, {
27
- children: seoBuildTags(props)
28
- });
29
- };
30
- export default Seo;
@@ -1,14 +0,0 @@
1
- // import { memo } from "react";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import Head from "next/head";
4
- // import { useRouter } from "next/router";
5
- // import { getSiteUrl } from "../utils";
6
- import { seoBuildTags } from "./seoBuildTags";
7
- export const SeoDefaults = (props)=>{
8
- // const router = useRouter();
9
- // props.openGraph.url = getSiteUrl(router.asPath);
10
- return /*#__PURE__*/ _jsx(Head, {
11
- children: seoBuildTags(props)
12
- });
13
- };
14
- export default SeoDefaults;
package/12/T.mjs DELETED
@@ -1,27 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import Trans from "next-translate/Trans";
4
- /**
5
- * **NOTE**: To make typescript work nicely here make sure to enable
6
- * [`resolveJsonModule`](https://www.typescriptlang.org/tsconfig#resolveJsonModule)
7
- * in your `tsconfig.json` file.
8
- */ 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,17 +0,0 @@
1
- /// <reference types="react" />
2
- export type ThemeContextProps = {
3
- /** List of all available theme names */
4
- themes: string[];
5
- /** Forced theme name for the current page */
6
- forcedTheme?: string;
7
- /** Update the theme */
8
- setTheme: (theme: string) => void;
9
- /** Active theme name */
10
- theme?: string;
11
- /** If `enableSystem` is true and the active theme is "system", this returns whether the system preference resolved to "dark" or "light". Otherwise, identical to `theme` */
12
- resolvedTheme?: string;
13
- /** If enableSystem is true, returns the System theme preference ("dark" or "light"), regardless what the active theme is */
14
- systemTheme?: "dark" | "light";
15
- };
16
- export declare const ThemeContext: import("react").Context<ThemeContextProps>;
17
- export default ThemeContext;
@@ -1,7 +0,0 @@
1
- import { createContext } from "react";
2
- export const ThemeContext = /*#__PURE__*/ createContext({
3
- // eslint-disable-next-line @typescript-eslint/no-empty-function
4
- setTheme: (_)=>{},
5
- themes: []
6
- });
7
- export default ThemeContext;
@@ -1,35 +0,0 @@
1
- /// <reference types="react" />
2
- type ValueObject = {
3
- [themeName: string]: string;
4
- };
5
- export type ThemeProviderProps = React.PropsWithChildren<{
6
- /** List of all available theme names */
7
- themes?: string[];
8
- /** Forced theme name for the current page */
9
- forcedTheme?: string;
10
- /** Whether to switch between dark and light themes based on prefers-color-scheme */
11
- enableSystem?: boolean;
12
- /** Disable all CSS transitions when switching themes */
13
- disableTransitionOnChange?: boolean;
14
- /** Whether to indicate to browsers which color scheme is used (dark or light) for built-in UI like inputs and buttons */
15
- enableColorScheme?: boolean;
16
- /** Default theme name (for v0.0.12 and lower the default was light). If `enableSystem` is false, the default theme is light */
17
- defaultTheme?: string;
18
- /** HTML attribute modified based on the active theme. Accepts `class` and `data-*` (meaning any data attribute, `data-mode`, `data-color`, etc.) */
19
- attribute?: string | "class";
20
- /** Mapping of theme name to HTML attribute value. Object where key is the theme name and value is the attribute value */
21
- value?: ValueObject;
22
- /** Nonce string to pass to the inline script for CSP headers */
23
- nonce?: string;
24
- }>;
25
- /**
26
- * @borrows [next-themes](https://github.com/pacocoursey/next-themes)
27
- *
28
- * Differences:
29
- *
30
- * - enableColorScheme: `false` by default (instead of `true`), this plays more
31
- * nicely with tailwind `dark` class mode as dark theme is supposed to be only
32
- * controlled by tailwind modifiers
33
- */
34
- export declare const ThemeProvider: ({ forcedTheme, disableTransitionOnChange, enableSystem, enableColorScheme, themes, defaultTheme, attribute, value, children, nonce, }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
35
- export default ThemeProvider;