@cyclone-ui/nextjs 0.0.12 → 0.0.13
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/CHANGELOG.md +8 -0
- package/README.md +2 -0
- package/dist/provider.cjs +1 -1
- package/dist/provider.d.cts +15 -1
- package/dist/provider.d.cts.map +1 -1
- package/dist/provider.d.mts +15 -1
- package/dist/provider.mjs +1 -1
- package/dist/provider.mjs.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Cyclone UI - Nextjs
|
|
4
4
|
|
|
5
|
+
## [0.0.12](https://github.com/storm-software/cyclone-ui/releases/tag/nextjs%400.0.12) (11/03/2026)
|
|
6
|
+
|
|
7
|
+
### Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated **state** to **v0.0.42**
|
|
10
|
+
- Updated **theme-builder** to **v0.0.31**
|
|
11
|
+
- Updated **tokens** to **v0.3.30**
|
|
12
|
+
|
|
5
13
|
## [0.0.11](https://github.com/storm-software/cyclone-ui/releases/tag/nextjs%400.0.11) (11/01/2026)
|
|
6
14
|
|
|
7
15
|
### Updated Dependencies
|
package/README.md
CHANGED
|
@@ -127,6 +127,8 @@ project root.
|
|
|
127
127
|
| `config` | The config from `@cyclone-ui/tokens/tamagui` | The Tamagui config |
|
|
128
128
|
| `disableInjectCSS` | `false` | Skip runtime theme CSS when the app imports CSS generated by the Tamagui compiler |
|
|
129
129
|
| `skipNextHead` | `true` | Render the theme script inline. Set `false` in the Pages Router to use `next/script` |
|
|
130
|
+
| `mode` | `"light"` | The mode the server rendered with, so hydration (including late Suspense boundaries) matches |
|
|
131
|
+
| `modeCookie` | — | A cookie kept set to the active mode, so the server can pass it back as `mode` |
|
|
130
132
|
|
|
131
133
|
### Webpack
|
|
132
134
|
|
package/dist/provider.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@cyclone-ui/state/theme"),t=require("@cyclone-ui/tokens/tamagui"),n=require("@tamagui/core"),r=require("@tamagui/next-theme"),i=require("next/navigation.js"),a=require("react"),o=require("react-native"),s=require("react/jsx-runtime");const c=[`light`,`dark`],l=({mode:t})=>{let{changeMode:n}=(0,e.useThemeActions)();return(0,a.useEffect)(()=>{n(t)},[n,t]),null};function u({children:u,config:d=t.config,disableInjectCSS:f=!1,skipNextHead:p=!0,onChangeTheme:m,...
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@cyclone-ui/state/theme"),t=require("@cyclone-ui/tokens/tamagui"),n=require("@tamagui/core"),r=require("@tamagui/next-theme"),i=require("next/navigation.js"),a=require("react"),o=require("react-native"),s=require("react/jsx-runtime");const c=[`light`,`dark`],l=({mode:t})=>{let{changeMode:n}=(0,e.useThemeActions)();return(0,a.useEffect)(()=>{n(t)},[n,t]),null};function u({children:u,config:d=t.config,disableInjectCSS:f=!1,skipNextHead:p=!0,onChangeTheme:m,mode:h=`light`,modeCookie:g,..._}){let[v,y]=(0,a.useState)(h);return(0,a.useLayoutEffect)(()=>{let{classList:e}=document.documentElement;e.contains(`t_dark`)?y(`dark`):e.contains(`t_light`)&&y(`light`)},[]),(0,a.useEffect)(()=>{g&&(document.cookie=`${g}=${v}; path=/; max-age=31536000; samesite=lax`)},[v,g]),(0,i.useServerInsertedHTML)(()=>{let e=o.StyleSheet.getSheet();return/* @__PURE__ */ (0,s.jsx)(`style`,{id:e.id,dangerouslySetInnerHTML:{__html:e.textContent}})}),/* @__PURE__ */ (0,s.jsx)(r.NextThemeProvider,{..._,skipNextHead:p,onChangeTheme:e=>{y(e),m?.(e)},children:/* @__PURE__ */ (0,s.jsxs)(e.ThemeApi.Provider,{scope:`theme`,initialState:{mode:v,items:c},children:[/* @__PURE__ */ (0,s.jsx)(l,{mode:v}),/* @__PURE__ */ (0,s.jsx)(n.TamaguiProvider,{config:d,defaultTheme:v,disableInjectCSS:f,children:/* @__PURE__ */ (0,s.jsx)(n.Theme,{name:`base`,children:u})})]})})}exports.CycloneUIProvider=u,Object.defineProperty(exports,"useRootTheme",{enumerable:!0,get:function(){return r.useRootTheme}}),Object.defineProperty(exports,"useThemeSetting",{enumerable:!0,get:function(){return r.useThemeSetting}});
|
package/dist/provider.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ColorThemeMode } from "@cyclone-ui/state/theme";
|
|
1
2
|
import { TamaguiProviderProps } from "@tamagui/core";
|
|
2
3
|
import { ColorScheme, ThemeProviderProps, ThemeProviderProps as ThemeProviderProps$1, UseThemeProps, useRootTheme, useThemeSetting } from "@tamagui/next-theme";
|
|
3
4
|
import { PropsWithChildren } from "react";
|
|
@@ -15,6 +16,19 @@ type CycloneUIProviderProps = PropsWithChildren<Omit<ThemeProviderProps$1, "chil
|
|
|
15
16
|
* @defaultValue false
|
|
16
17
|
*/
|
|
17
18
|
disableInjectCSS?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The color mode the server rendered with. Hydration starts in this mode
|
|
21
|
+
* so nested `t_<mode>_*` classNames match the server HTML, including
|
|
22
|
+
* Suspense boundaries that hydrate after the provider.
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue "light"
|
|
25
|
+
*/
|
|
26
|
+
mode?: ColorThemeMode;
|
|
27
|
+
/**
|
|
28
|
+
* A cookie the provider keeps set to the active mode, so the server can
|
|
29
|
+
* pass it back as `mode` on the next request.
|
|
30
|
+
*/
|
|
31
|
+
modeCookie?: string;
|
|
18
32
|
}>;
|
|
19
33
|
/**
|
|
20
34
|
* The root provider for Cyclone UI components in a Next.js app.
|
|
@@ -42,6 +56,6 @@ type CycloneUIProviderProps = PropsWithChildren<Omit<ThemeProviderProps$1, "chil
|
|
|
42
56
|
* }
|
|
43
57
|
* ```
|
|
44
58
|
*/
|
|
45
|
-
declare function CycloneUIProvider({ children, config, disableInjectCSS, skipNextHead, onChangeTheme, ...props }: CycloneUIProviderProps): import("react").JSX.Element;
|
|
59
|
+
declare function CycloneUIProvider({ children, config, disableInjectCSS, skipNextHead, onChangeTheme, mode: serverMode, modeCookie, ...props }: CycloneUIProviderProps): import("react").JSX.Element;
|
|
46
60
|
export { type ColorScheme, CycloneUIProvider, CycloneUIProviderProps, type ThemeProviderProps, type UseThemeProps, useRootTheme, useThemeSetting };
|
|
47
61
|
//# sourceMappingURL=provider.d.cts.map
|
package/dist/provider.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.cts","names":["ThemeProviderProps"],"sources":["../src/provider.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"provider.d.cts","names":["ThemeProviderProps"],"sources":["../src/provider.tsx"],"mappings":";;;;KAuCY,yBAAyB,kBACnC,KAAKA;;;;;;EAMH,SAAS;;;;;;;EAQT;;;;;;;;EASA,OAAO;;;;;EAMP;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4CY,oBACd,UACA,QACA,kBACA,cACA,eACA,MAAM,YACN,eACG,SACF,yCAAsB,IAAA"}
|
package/dist/provider.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ColorThemeMode } from "@cyclone-ui/state/theme";
|
|
1
2
|
import { TamaguiProviderProps } from "@tamagui/core";
|
|
2
3
|
import { ColorScheme, ThemeProviderProps, ThemeProviderProps as ThemeProviderProps$1, UseThemeProps, useRootTheme, useThemeSetting } from "@tamagui/next-theme";
|
|
3
4
|
import { PropsWithChildren } from "react";
|
|
@@ -15,6 +16,19 @@ type CycloneUIProviderProps = PropsWithChildren<Omit<ThemeProviderProps$1, "chil
|
|
|
15
16
|
* @defaultValue false
|
|
16
17
|
*/
|
|
17
18
|
disableInjectCSS?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The color mode the server rendered with. Hydration starts in this mode
|
|
21
|
+
* so nested `t_<mode>_*` classNames match the server HTML, including
|
|
22
|
+
* Suspense boundaries that hydrate after the provider.
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue "light"
|
|
25
|
+
*/
|
|
26
|
+
mode?: ColorThemeMode;
|
|
27
|
+
/**
|
|
28
|
+
* A cookie the provider keeps set to the active mode, so the server can
|
|
29
|
+
* pass it back as `mode` on the next request.
|
|
30
|
+
*/
|
|
31
|
+
modeCookie?: string;
|
|
18
32
|
}>;
|
|
19
33
|
/**
|
|
20
34
|
* The root provider for Cyclone UI components in a Next.js app.
|
|
@@ -42,6 +56,6 @@ type CycloneUIProviderProps = PropsWithChildren<Omit<ThemeProviderProps$1, "chil
|
|
|
42
56
|
* }
|
|
43
57
|
* ```
|
|
44
58
|
*/
|
|
45
|
-
declare function CycloneUIProvider({ children, config, disableInjectCSS, skipNextHead, onChangeTheme, ...props }: CycloneUIProviderProps): import("react").JSX.Element;
|
|
59
|
+
declare function CycloneUIProvider({ children, config, disableInjectCSS, skipNextHead, onChangeTheme, mode: serverMode, modeCookie, ...props }: CycloneUIProviderProps): import("react").JSX.Element;
|
|
46
60
|
export { type ColorScheme, CycloneUIProvider, CycloneUIProviderProps, type ThemeProviderProps, type UseThemeProps, useRootTheme, useThemeSetting };
|
|
47
61
|
//# sourceMappingURL=provider.d.mts.map
|
package/dist/provider.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{ThemeApi as e,useThemeActions as t}from"@cyclone-ui/state/theme";import{config as n}from"@cyclone-ui/tokens/tamagui";import{TamaguiProvider as r,Theme as i}from"@tamagui/core";import{NextThemeProvider as a,useRootTheme as o,useThemeSetting as s}from"@tamagui/next-theme";import{useServerInsertedHTML as c}from"next/navigation.js";import{useEffect as l,useLayoutEffect as u,useState as d}from"react";import{StyleSheet as f}from"react-native";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h=[`light`,`dark`],g=({mode:e})=>{let{changeMode:n}=t();return l(()=>{n(e)},[n,e]),null};function _({children:t,config:o=n,disableInjectCSS:s=!1,skipNextHead:
|
|
1
|
+
"use client";import{ThemeApi as e,useThemeActions as t}from"@cyclone-ui/state/theme";import{config as n}from"@cyclone-ui/tokens/tamagui";import{TamaguiProvider as r,Theme as i}from"@tamagui/core";import{NextThemeProvider as a,useRootTheme as o,useThemeSetting as s}from"@tamagui/next-theme";import{useServerInsertedHTML as c}from"next/navigation.js";import{useEffect as l,useLayoutEffect as u,useState as d}from"react";import{StyleSheet as f}from"react-native";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h=[`light`,`dark`],g=({mode:e})=>{let{changeMode:n}=t();return l(()=>{n(e)},[n,e]),null};function _({children:t,config:o=n,disableInjectCSS:s=!1,skipNextHead:_=!0,onChangeTheme:v,mode:y=`light`,modeCookie:b,...x}){let[S,C]=d(y);return u(()=>{let{classList:e}=document.documentElement;e.contains(`t_dark`)?C(`dark`):e.contains(`t_light`)&&C(`light`)},[]),l(()=>{b&&(document.cookie=`${b}=${S}; path=/; max-age=31536000; samesite=lax`)},[S,b]),c(()=>{let e=f.getSheet();return/* @__PURE__ */ p(`style`,{id:e.id,dangerouslySetInnerHTML:{__html:e.textContent}})}),/* @__PURE__ */ p(a,{...x,skipNextHead:_,onChangeTheme:e=>{C(e),v?.(e)},children:/* @__PURE__ */ m(e.Provider,{scope:`theme`,initialState:{mode:S,items:h},children:[/* @__PURE__ */ p(g,{mode:S}),/* @__PURE__ */ p(r,{config:o,defaultTheme:S,disableInjectCSS:s,children:/* @__PURE__ */ p(i,{name:`base`,children:t})})]})})}export{_ as CycloneUIProvider,o as useRootTheme,s as useThemeSetting};
|
|
2
2
|
//# sourceMappingURL=provider.mjs.map
|
package/dist/provider.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.mjs","names":["cycloneConfig","config","ITEMS","SyncColorMode","useThemeActions","useEffect","changeMode","mode","CycloneUIProvider","config$1","config","props","setMode","useState","useLayoutEffect","useServerInsertedHTML","sheet","StyleSheet","NextThemeProvider","name","onChangeTheme","ThemeApi","TamaguiProvider","Theme","useRootTheme","useThemeSetting"],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"provider.mjs","names":["cycloneConfig","config","ITEMS","SyncColorMode","useThemeActions","useEffect","changeMode","mode","CycloneUIProvider","config$1","config","serverMode","props","setMode","useState","useLayoutEffect","classList","modeCookie","useServerInsertedHTML","sheet","StyleSheet","NextThemeProvider","name","onChangeTheme","ThemeApi","TamaguiProvider","Theme","useRootTheme","useThemeSetting"],"sources":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclone-ui/nextjs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Next.js config wrapper and root provider that set up Tamagui and Cyclone UI components in Next.js applications.",
|
|
6
6
|
"repository": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"module": "./dist/index.mjs",
|
|
46
46
|
"types": "./dist/index.d.cts",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@cyclone-ui/theme-builder": "0.0.
|
|
48
|
+
"@cyclone-ui/theme-builder": "0.0.32",
|
|
49
49
|
"@tamagui/next-theme": "3.0.13"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@cyclone-ui/state": "0.0.
|
|
53
|
-
"@cyclone-ui/tokens": "0.3.
|
|
52
|
+
"@cyclone-ui/state": "0.0.43",
|
|
53
|
+
"@cyclone-ui/tokens": "0.3.31",
|
|
54
54
|
"@tamagui/core": "3.0.13",
|
|
55
55
|
"@tamagui/next-plugin": "3.0.13",
|
|
56
56
|
"@tamagui/react-native-svg": "3.0.13",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"react-native": { "optional": true }
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@cyclone-ui/state": "0.0.
|
|
69
|
-
"@cyclone-ui/tokens": "0.3.
|
|
68
|
+
"@cyclone-ui/state": "0.0.43",
|
|
69
|
+
"@cyclone-ui/tokens": "0.3.31",
|
|
70
70
|
"@powerlines/plugin-tsdown": "^0.1.619",
|
|
71
71
|
"@tamagui/core": "3.0.13",
|
|
72
72
|
"@tamagui/next-plugin": "3.0.13",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"react-native-web": "0.19.12"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": { "access": "public" },
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "407450ded400755f67dabd25603d2bbe4560cbc0"
|
|
81
81
|
}
|