@cyclone-ui/nextjs 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +36 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +37 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +37 -4
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -9
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# Changelog for Cyclone UI - Nextjs
|
|
4
|
+
|
|
5
|
+
## [0.0.3](https://github.com/storm-software/cyclone-ui/releases/tag/nextjs%400.0.3) (10/25/2026)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **nextjs:** Add support for providing tokens as build config ([09ca705a1](https://github.com/storm-software/cyclone-ui/commit/09ca705a1))
|
|
10
|
+
|
|
11
|
+
### Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated **state** to **v0.0.33**
|
|
14
|
+
- Updated **theme-builder** to **v0.0.22**
|
|
15
|
+
- Updated **tokens** to **v0.3.21**
|
|
16
|
+
|
|
17
|
+
## [0.0.2](https://github.com/storm-software/cyclone-ui/releases/tag/nextjs%400.0.2) (10/24/2026)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- **nextjs:** Added NextJS and Vite build packages, setup skills, and documentation updates ([2759b41c](https://github.com/storm-software/cyclone-ui/commit/2759b41c))
|
|
22
|
+
|
|
23
|
+
### Updated Dependencies
|
|
24
|
+
|
|
25
|
+
- Updated **state** to **v0.0.32**
|
|
26
|
+
- Updated **tokens** to **v0.3.20**
|
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ using `@tamagui/next-plugin` and `@tamagui/next-theme`.
|
|
|
15
15
|
- Turbopack aliases for `react-native` → `react-native-web` and
|
|
16
16
|
`react-native-svg` → `@tamagui/react-native-svg`
|
|
17
17
|
- The Tamagui compiler for Webpack builds through `@tamagui/next-plugin`
|
|
18
|
+
- Builds the Tamagui config from your own design tokens (`tokens` option)
|
|
18
19
|
- Defines `process.env.TAMAGUI_TARGET`, which Cyclone components read to render
|
|
19
20
|
web-only styles
|
|
20
21
|
- Stores the light, dark or system setting and applies it before hydration
|
|
@@ -80,6 +81,41 @@ export function ThemeToggle() {
|
|
|
80
81
|
Change the theme through `useThemeSetting`: `useThemeActions` changes the
|
|
81
82
|
Cyclone state only, so the choice isn't saved.
|
|
82
83
|
|
|
84
|
+
### Custom design tokens
|
|
85
|
+
|
|
86
|
+
Pass `tokens` to build the Tamagui config from your own design tokens instead
|
|
87
|
+
of the Cyclone UI defaults. Use a DTCG token object, or token file paths or
|
|
88
|
+
globs relative to the working directory:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
// next.config.ts
|
|
92
|
+
import { withCycloneUI } from "@cyclone-ui/nextjs";
|
|
93
|
+
|
|
94
|
+
export default withCycloneUI(
|
|
95
|
+
{ reactStrictMode: true },
|
|
96
|
+
{
|
|
97
|
+
tokens: [
|
|
98
|
+
"tokens/primitives.json",
|
|
99
|
+
"tokens/light.tokens.json",
|
|
100
|
+
"tokens/dark.tokens.json"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Files with a theme name (`light.tokens.json`, `dark.tokens.json`, …) become
|
|
107
|
+
the `light` and `dark` themes. The tokens go through the same preprocessor and
|
|
108
|
+
generator as `@cyclone-ui/tokens`, and a `razorwind.config.ts` in the project
|
|
109
|
+
still applies (for example its fonts).
|
|
110
|
+
|
|
111
|
+
With `tokens`, `withCycloneUI` returns a promise, which Next.js accepts as the
|
|
112
|
+
config export. The config is written to `.cyclone-ui/tamagui.config.ts`
|
|
113
|
+
(add `.cyclone-ui` to `.gitignore`) and replaces `@cyclone-ui/tokens/tamagui`
|
|
114
|
+
everywhere, so `CycloneUIProvider` and the Webpack compiler use it. With
|
|
115
|
+
pnpm, Webpack builds also need `@tamagui/web` and `motion` installed in the
|
|
116
|
+
app, because the Tamagui compiler evaluates the generated config from the
|
|
117
|
+
project root.
|
|
118
|
+
|
|
83
119
|
### Provider props
|
|
84
120
|
|
|
85
121
|
`CycloneUIProvider` accepts the
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("node:module"),t=require("node:path");
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("node:module"),t=require("node:path");const n=(n,r,i)=>({...n,env:{TAMAGUI_TARGET:`web`,...n.env},turbopack:{...n.turbopack,resolveAlias:{"react-native":`react-native-web`,"react-native-svg":`@tamagui/react-native-svg`,...i&&{"@cyclone-ui/tokens/tamagui":`./${(0,t.relative)(process.cwd(),i)}`},...n.turbopack?.resolveAlias}},webpack:(a,o)=>{let{withTamagui:s}=(0,e.createRequire)((0,t.join)(o.dir,`package.json`))(`@tamagui/next-plugin`),c=s({config:i??`@cyclone-ui/tokens/tamagui`,components:[`@tamagui/core`],appDir:!0,...r})(n).webpack(a,o);return i&&(c.resolve.alias[`@cyclone-ui/tokens/tamagui$`]=i),c}});function r(e={},{tokens:t,...r}={}){return t?import(`@cyclone-ui/theme-builder`).then(async({buildTamaguiConfig:e})=>e({tokens:t})).then(t=>n(e,r,t)):n(e,r)}exports.withCycloneUI=r;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
+
import { BuildTamaguiConfigOptions } from "@cyclone-ui/theme-builder";
|
|
1
2
|
import { WithTamaguiProps } from "@tamagui/next-plugin";
|
|
2
3
|
import { NextConfig } from "next";
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* The design tokens, plus options forwarded to `@tamagui/next-plugin` when
|
|
6
|
+
* Next.js builds with Webpack.
|
|
5
7
|
*/
|
|
6
|
-
type WithCycloneUIOptions = Partial<WithTamaguiProps
|
|
8
|
+
type WithCycloneUIOptions = Partial<WithTamaguiProps> & {
|
|
9
|
+
/**
|
|
10
|
+
* Design tokens to build the app's Tamagui config from: a DTCG token
|
|
11
|
+
* object, or token file path(s) or globs relative to the working directory.
|
|
12
|
+
* Theme-named files (`light.tokens.json`, `dark.tokens.json`, …) become the
|
|
13
|
+
* `light` / `dark` themes.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* The config is generated into `.cyclone-ui/tamagui.config.ts` (add
|
|
17
|
+
* `.cyclone-ui` to `.gitignore`) when Next.js loads its config, and replaces
|
|
18
|
+
* `@cyclone-ui/tokens/tamagui` for the compiler and every import in the app,
|
|
19
|
+
* including `CycloneUIProvider`.
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue The Cyclone UI config from `@cyclone-ui/tokens/tamagui`
|
|
22
|
+
*/
|
|
23
|
+
tokens?: BuildTamaguiConfigOptions["tokens"];
|
|
24
|
+
};
|
|
7
25
|
/**
|
|
8
26
|
* Wrap a Next.js config with the setup Tamagui and Cyclone UI components need.
|
|
9
27
|
*
|
|
@@ -14,6 +32,9 @@ type WithCycloneUIOptions = Partial<WithTamaguiProps>;
|
|
|
14
32
|
* must be installed, with the Cyclone UI Tamagui config.
|
|
15
33
|
* - Both: defines `process.env.TAMAGUI_TARGET`.
|
|
16
34
|
*
|
|
35
|
+
* With `tokens`, the Tamagui config is built from them first, so this returns
|
|
36
|
+
* a promise, which Next.js accepts as the config export.
|
|
37
|
+
*
|
|
17
38
|
* Turbopack builds don't run the Tamagui compiler. To optimize them, use the
|
|
18
39
|
* Tamagui CLI: `tamagui build --target web ./src -- next build`.
|
|
19
40
|
*
|
|
@@ -25,10 +46,22 @@ type WithCycloneUIOptions = Partial<WithTamaguiProps>;
|
|
|
25
46
|
* export default withCycloneUI({ reactStrictMode: true });
|
|
26
47
|
* ```
|
|
27
48
|
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* // next.config.ts — build the Tamagui config from your own tokens
|
|
52
|
+
* import { withCycloneUI } from "@cyclone-ui/nextjs";
|
|
53
|
+
*
|
|
54
|
+
* export default withCycloneUI({}, { tokens: "tokens/**\/*.json" });
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
28
57
|
* @param nextConfig - The Next.js config to extend.
|
|
29
|
-
* @param options -
|
|
58
|
+
* @param options - The design `tokens`, plus options forwarded to
|
|
59
|
+
* `@tamagui/next-plugin` (Webpack only).
|
|
30
60
|
* @returns The extended Next.js config.
|
|
31
61
|
*/
|
|
32
|
-
declare function withCycloneUI(nextConfig?: NextConfig, options?: WithCycloneUIOptions
|
|
62
|
+
declare function withCycloneUI(nextConfig?: NextConfig, options?: WithCycloneUIOptions & {
|
|
63
|
+
tokens?: undefined;
|
|
64
|
+
}): NextConfig;
|
|
65
|
+
declare function withCycloneUI(nextConfig: NextConfig | undefined, options: WithCycloneUIOptions): NextConfig | Promise<NextConfig>;
|
|
33
66
|
export { WithCycloneUIOptions, withCycloneUI };
|
|
34
67
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;KA4BY,uBAAuB,QAAQ;;;;;;;;;;;;;;;EAezC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkFK,cACd,aAAa,YACb,UAAU;EAAyB;IAClC;iBACa,cACd,YAAY,wBACZ,SAAS,uBACR,aAAa,QAAQ"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
+
import { BuildTamaguiConfigOptions } from "@cyclone-ui/theme-builder";
|
|
1
2
|
import { WithTamaguiProps } from "@tamagui/next-plugin";
|
|
2
3
|
import { NextConfig } from "next";
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* The design tokens, plus options forwarded to `@tamagui/next-plugin` when
|
|
6
|
+
* Next.js builds with Webpack.
|
|
5
7
|
*/
|
|
6
|
-
type WithCycloneUIOptions = Partial<WithTamaguiProps
|
|
8
|
+
type WithCycloneUIOptions = Partial<WithTamaguiProps> & {
|
|
9
|
+
/**
|
|
10
|
+
* Design tokens to build the app's Tamagui config from: a DTCG token
|
|
11
|
+
* object, or token file path(s) or globs relative to the working directory.
|
|
12
|
+
* Theme-named files (`light.tokens.json`, `dark.tokens.json`, …) become the
|
|
13
|
+
* `light` / `dark` themes.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* The config is generated into `.cyclone-ui/tamagui.config.ts` (add
|
|
17
|
+
* `.cyclone-ui` to `.gitignore`) when Next.js loads its config, and replaces
|
|
18
|
+
* `@cyclone-ui/tokens/tamagui` for the compiler and every import in the app,
|
|
19
|
+
* including `CycloneUIProvider`.
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue The Cyclone UI config from `@cyclone-ui/tokens/tamagui`
|
|
22
|
+
*/
|
|
23
|
+
tokens?: BuildTamaguiConfigOptions["tokens"];
|
|
24
|
+
};
|
|
7
25
|
/**
|
|
8
26
|
* Wrap a Next.js config with the setup Tamagui and Cyclone UI components need.
|
|
9
27
|
*
|
|
@@ -14,6 +32,9 @@ type WithCycloneUIOptions = Partial<WithTamaguiProps>;
|
|
|
14
32
|
* must be installed, with the Cyclone UI Tamagui config.
|
|
15
33
|
* - Both: defines `process.env.TAMAGUI_TARGET`.
|
|
16
34
|
*
|
|
35
|
+
* With `tokens`, the Tamagui config is built from them first, so this returns
|
|
36
|
+
* a promise, which Next.js accepts as the config export.
|
|
37
|
+
*
|
|
17
38
|
* Turbopack builds don't run the Tamagui compiler. To optimize them, use the
|
|
18
39
|
* Tamagui CLI: `tamagui build --target web ./src -- next build`.
|
|
19
40
|
*
|
|
@@ -25,10 +46,22 @@ type WithCycloneUIOptions = Partial<WithTamaguiProps>;
|
|
|
25
46
|
* export default withCycloneUI({ reactStrictMode: true });
|
|
26
47
|
* ```
|
|
27
48
|
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* // next.config.ts — build the Tamagui config from your own tokens
|
|
52
|
+
* import { withCycloneUI } from "@cyclone-ui/nextjs";
|
|
53
|
+
*
|
|
54
|
+
* export default withCycloneUI({}, { tokens: "tokens/**\/*.json" });
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
28
57
|
* @param nextConfig - The Next.js config to extend.
|
|
29
|
-
* @param options -
|
|
58
|
+
* @param options - The design `tokens`, plus options forwarded to
|
|
59
|
+
* `@tamagui/next-plugin` (Webpack only).
|
|
30
60
|
* @returns The extended Next.js config.
|
|
31
61
|
*/
|
|
32
|
-
declare function withCycloneUI(nextConfig?: NextConfig, options?: WithCycloneUIOptions
|
|
62
|
+
declare function withCycloneUI(nextConfig?: NextConfig, options?: WithCycloneUIOptions & {
|
|
63
|
+
tokens?: undefined;
|
|
64
|
+
}): NextConfig;
|
|
65
|
+
declare function withCycloneUI(nextConfig: NextConfig | undefined, options: WithCycloneUIOptions): NextConfig | Promise<NextConfig>;
|
|
33
66
|
export { WithCycloneUIOptions, withCycloneUI };
|
|
34
67
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as e}from"node:module";import{join as t}from"node:path";
|
|
1
|
+
import{createRequire as e}from"node:module";import{join as t,relative as n}from"node:path";const r=(r,i,a)=>({...r,env:{TAMAGUI_TARGET:`web`,...r.env},turbopack:{...r.turbopack,resolveAlias:{"react-native":`react-native-web`,"react-native-svg":`@tamagui/react-native-svg`,...a&&{"@cyclone-ui/tokens/tamagui":`./${n(process.cwd(),a)}`},...r.turbopack?.resolveAlias}},webpack:(n,o)=>{let{withTamagui:s}=e(t(o.dir,`package.json`))(`@tamagui/next-plugin`),c=s({config:a??`@cyclone-ui/tokens/tamagui`,components:[`@tamagui/core`],appDir:!0,...i})(r).webpack(n,o);return a&&(c.resolve.alias[`@cyclone-ui/tokens/tamagui$`]=a),c}});function i(e={},{tokens:t,...n}={}){return t?import(`@cyclone-ui/theme-builder`).then(async({buildTamaguiConfig:e})=>e({tokens:t})).then(t=>r(e,n,t)):r(e,n)}export{i as withCycloneUI};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["extend","nextConfig","configPath","relative","createRequire","join","context","result","withTamagui","options","config","withCycloneUI","tokens","buildTamaguiConfig"],"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.4",
|
|
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": {
|
|
@@ -44,14 +44,17 @@
|
|
|
44
44
|
"main": "./dist/index.cjs",
|
|
45
45
|
"module": "./dist/index.mjs",
|
|
46
46
|
"types": "./dist/index.d.cts",
|
|
47
|
-
"dependencies": {
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@cyclone-ui/theme-builder": "0.0.23",
|
|
49
|
+
"@tamagui/next-theme": "3.0.13"
|
|
50
|
+
},
|
|
48
51
|
"peerDependencies": {
|
|
49
|
-
"@cyclone-ui/state": "0.0.
|
|
50
|
-
"@cyclone-ui/tokens": "0.3.
|
|
52
|
+
"@cyclone-ui/state": "0.0.34",
|
|
53
|
+
"@cyclone-ui/tokens": "0.3.22",
|
|
51
54
|
"@tamagui/core": "3.0.13",
|
|
52
55
|
"@tamagui/next-plugin": "3.0.13",
|
|
53
56
|
"@tamagui/react-native-svg": "3.0.13",
|
|
54
|
-
"next": "^16.4.
|
|
57
|
+
"next": "^16.4.3",
|
|
55
58
|
"react": "^19.3.1",
|
|
56
59
|
"react-native": "^0.87.1",
|
|
57
60
|
"react-native-web": "0.19.12"
|
|
@@ -62,17 +65,17 @@
|
|
|
62
65
|
"react-native": { "optional": true }
|
|
63
66
|
},
|
|
64
67
|
"devDependencies": {
|
|
65
|
-
"@cyclone-ui/state": "0.0.
|
|
66
|
-
"@cyclone-ui/tokens": "0.3.
|
|
68
|
+
"@cyclone-ui/state": "0.0.34",
|
|
69
|
+
"@cyclone-ui/tokens": "0.3.22",
|
|
67
70
|
"@powerlines/plugin-tsdown": "^0.1.618",
|
|
68
71
|
"@tamagui/core": "3.0.13",
|
|
69
72
|
"@tamagui/next-plugin": "3.0.13",
|
|
70
73
|
"@types/react": "^19.3.0",
|
|
71
|
-
"next": "^16.4.
|
|
74
|
+
"next": "^16.4.3",
|
|
72
75
|
"powerlines": "^0.47.217",
|
|
73
76
|
"react": "^19.3.1",
|
|
74
77
|
"react-native-web": "0.19.12"
|
|
75
78
|
},
|
|
76
79
|
"publishConfig": { "access": "public" },
|
|
77
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "6611d469e61ed9c326d7101a3420218b6355dfb7"
|
|
78
81
|
}
|