@cyclone-ui/vite 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 +24 -0
- package/README.md +24 -3
- package/dist/index.d.mts +24 -6
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# Changelog for Cyclone UI - Vite
|
|
4
|
+
|
|
5
|
+
## [0.0.3](https://github.com/storm-software/cyclone-ui/releases/tag/vite%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 **theme-builder** to **v0.0.22**
|
|
14
|
+
- Updated **tokens** to **v0.3.21**
|
|
15
|
+
|
|
16
|
+
## [0.0.2](https://github.com/storm-software/cyclone-ui/releases/tag/vite%400.0.2) (10/24/2026)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- **nextjs:** Added NextJS and Vite build packages, setup skills, and documentation updates ([2759b41c](https://github.com/storm-software/cyclone-ui/commit/2759b41c))
|
|
21
|
+
|
|
22
|
+
### Updated Dependencies
|
|
23
|
+
|
|
24
|
+
- Updated **tokens** to **v0.3.20**
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ UI defaults.
|
|
|
10
10
|
- Aliases `react-native` to `react-native-web` and resolves `.web.*` files first
|
|
11
11
|
- Pre-bundles and dedupes the Tamagui packages that share React contexts
|
|
12
12
|
- Runs the Tamagui optimizing compiler with the Cyclone UI config from
|
|
13
|
-
`@cyclone-ui/tokens
|
|
13
|
+
`@cyclone-ui/tokens`, or one built from your own design tokens
|
|
14
14
|
- Defines `process.env.TAMAGUI_TARGET`, which Cyclone components read to render
|
|
15
15
|
web-only styles
|
|
16
16
|
|
|
@@ -64,11 +64,32 @@ defaults are:
|
|
|
64
64
|
| `config` | `"@cyclone-ui/tokens/tamagui"` |
|
|
65
65
|
| `components` | `["@tamagui/core"]` |
|
|
66
66
|
|
|
67
|
-
Pass
|
|
68
|
-
`disableExtraction: true` to keep styles at runtime (for example while
|
|
67
|
+
Pass `disableExtraction: true` to keep styles at runtime (for example while
|
|
69
68
|
debugging). A `tamagui.build.ts` file in the project root overrides these
|
|
70
69
|
options.
|
|
71
70
|
|
|
71
|
+
### Custom design tokens
|
|
72
|
+
|
|
73
|
+
Pass `tokens` to build the Tamagui config from your own design tokens instead
|
|
74
|
+
of the Cyclone UI defaults. Use a DTCG token object, or token file paths or
|
|
75
|
+
globs relative to the Vite root:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
export default defineConfig({
|
|
79
|
+
plugins: [react(), cycloneUI({ tokens: "tokens/**/*.json" })]
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Files with a theme name (`light.tokens.json`, `dark.tokens.json`, …) become
|
|
84
|
+
the `light` and `dark` themes. The tokens go through the same preprocessor and
|
|
85
|
+
generator as `@cyclone-ui/tokens`, and a `razorwind.config.ts` in the project
|
|
86
|
+
still applies (for example its fonts).
|
|
87
|
+
|
|
88
|
+
The config is written to `.cyclone-ui/tamagui.config.ts` (add `.cyclone-ui`
|
|
89
|
+
to `.gitignore`) when Vite starts, and replaces `@cyclone-ui/tokens/tamagui`
|
|
90
|
+
for the compiler and every import, so the `ThemeProvider` setup above stays
|
|
91
|
+
the same. Restart Vite after changing the tokens.
|
|
92
|
+
|
|
72
93
|
## Development
|
|
73
94
|
|
|
74
95
|
```bash
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
import { TamaguiVitePluginOptions } from "@tamagui/vite-plugin";
|
|
2
|
+
import { BuildTamaguiConfigOptions } from "@cyclone-ui/theme-builder";
|
|
2
3
|
import { PluginOption } from "vite";
|
|
3
|
-
type CycloneUIVitePluginOptions = TamaguiVitePluginOptions
|
|
4
|
+
type CycloneUIVitePluginOptions = TamaguiVitePluginOptions & {
|
|
5
|
+
/**
|
|
6
|
+
* Design tokens to build the app's Tamagui config from: a DTCG token
|
|
7
|
+
* object, or token file path(s) or globs relative to the Vite root.
|
|
8
|
+
* Theme-named files (`light.tokens.json`, `dark.tokens.json`, …) become the
|
|
9
|
+
* `light` / `dark` themes.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* The config is generated into `.cyclone-ui/tamagui.config.ts` (add
|
|
13
|
+
* `.cyclone-ui` to `.gitignore`) when Vite starts, and replaces
|
|
14
|
+
* `@cyclone-ui/tokens/tamagui` for the compiler and every import in the app.
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue The Cyclone UI config from `@cyclone-ui/tokens/tamagui`
|
|
17
|
+
*/
|
|
18
|
+
tokens?: BuildTamaguiConfigOptions["tokens"];
|
|
19
|
+
};
|
|
4
20
|
/**
|
|
5
21
|
* Set up Tamagui and Cyclone UI components in a Vite application.
|
|
6
22
|
*
|
|
7
23
|
* @remarks
|
|
8
24
|
* Adds the Tamagui Vite plugin (`react-native` → `react-native-web` aliases,
|
|
9
25
|
* web extensions, dependency pre-bundling and the optimizing compiler) using
|
|
10
|
-
* the Cyclone UI Tamagui config from `@cyclone-ui/tokens
|
|
11
|
-
* file in the project root still
|
|
26
|
+
* the Cyclone UI Tamagui config from `@cyclone-ui/tokens`, or one built from
|
|
27
|
+
* the `tokens` option. A `tamagui.build.ts` file in the project root still
|
|
28
|
+
* takes precedence over these options.
|
|
12
29
|
*
|
|
13
30
|
* @example
|
|
14
31
|
* ```ts
|
|
@@ -17,13 +34,14 @@ type CycloneUIVitePluginOptions = TamaguiVitePluginOptions;
|
|
|
17
34
|
* import { defineConfig } from "vite";
|
|
18
35
|
*
|
|
19
36
|
* export default defineConfig({
|
|
20
|
-
* plugins: [react(), cycloneUI()]
|
|
37
|
+
* plugins: [react(), cycloneUI({ tokens: "tokens/**\/*.json" })]
|
|
21
38
|
* });
|
|
22
39
|
* ```
|
|
23
40
|
*
|
|
24
|
-
* @param options -
|
|
41
|
+
* @param options - The design `tokens`, plus options forwarded to
|
|
42
|
+
* `@tamagui/vite-plugin`.
|
|
25
43
|
* @returns The Vite plugins to add to the `plugins` array.
|
|
26
44
|
*/
|
|
27
|
-
declare function cycloneUI(options?: CycloneUIVitePluginOptions): PluginOption[];
|
|
45
|
+
declare function cycloneUI({ tokens, ...options }?: CycloneUIVitePluginOptions): PluginOption[];
|
|
28
46
|
export { CycloneUIVitePluginOptions, cycloneUI };
|
|
29
47
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{tamaguiPlugin as e}from"@tamagui/vite-plugin";function
|
|
1
|
+
import{tamaguiPlugin as e}from"@tamagui/vite-plugin";const t=`.cyclone-ui/tamagui.config.ts`;function n({tokens:n,...r}={}){return[{name:`cyclone-ui`,enforce:`pre`,async config({root:e}){let r=n&&await(await import(`@cyclone-ui/theme-builder`)).buildTamaguiConfig({tokens:n,cwd:e,outputPath:t});return{define:{"process.env.TAMAGUI_TARGET":JSON.stringify(`web`)},...r&&{resolve:{alias:[{find:/^@cyclone-ui\/tokens\/tamagui$/,replacement:r}]}}}}},e({config:n?t:`@cyclone-ui/tokens/tamagui`,components:[`@tamagui/core`],...r})]}export{n as cycloneUI};
|
|
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":["GENERATED_CONFIG","cycloneUI","options","configPath","tokens","root","tamaguiPlugin"],"sources":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclone-ui/vite",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Vite plugin that sets up Tamagui and Cyclone UI components in Vite applications.",
|
|
6
6
|
"repository": {
|
|
@@ -12,18 +12,21 @@
|
|
|
12
12
|
"keywords": ["cyclone-ui", "tamagui", "vite", "vite-plugin"],
|
|
13
13
|
"exports": { ".": "./dist/index.mjs", "./package.json": "./package.json" },
|
|
14
14
|
"types": "./dist/index.d.mts",
|
|
15
|
-
"dependencies": {
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@cyclone-ui/theme-builder": "0.0.23",
|
|
17
|
+
"@tamagui/vite-plugin": "3.0.13"
|
|
18
|
+
},
|
|
16
19
|
"peerDependencies": {
|
|
17
|
-
"@cyclone-ui/tokens": "0.3.
|
|
20
|
+
"@cyclone-ui/tokens": "0.3.22",
|
|
18
21
|
"react-native-web": "0.19.12",
|
|
19
22
|
"vite": "^8.3.5"
|
|
20
23
|
},
|
|
21
24
|
"devDependencies": {
|
|
22
|
-
"@cyclone-ui/tokens": "0.3.
|
|
25
|
+
"@cyclone-ui/tokens": "0.3.22",
|
|
23
26
|
"@powerlines/plugin-tsdown": "^0.1.618",
|
|
24
27
|
"powerlines": "^0.47.217",
|
|
25
28
|
"vite": "^8.3.5"
|
|
26
29
|
},
|
|
27
30
|
"publishConfig": { "access": "public" },
|
|
28
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "6611d469e61ed9c326d7101a3420218b6355dfb7"
|
|
29
32
|
}
|