@cyclone-ui/vite 0.0.36 → 0.0.38

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 CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  # Changelog for Cyclone UI - Vite
4
4
 
5
+ ## [0.0.37](https://github.com/storm-software/cyclone-ui/releases/tag/vite%400.0.37) (11/11/2026)
6
+
7
+ ### Updated Dependencies
8
+
9
+ - Updated **theme-builder** to **v0.0.56**
10
+ - Updated **tokens** to **v0.3.55**
11
+
12
+ ## [0.0.36](https://github.com/storm-software/cyclone-ui/releases/tag/vite%400.0.36) (11/10/2026)
13
+
14
+ ### Updated Dependencies
15
+
16
+ - Updated **theme-builder** to **v0.0.55**
17
+ - Updated **tokens** to **v0.3.54**
18
+
5
19
  ## [0.0.35](https://github.com/storm-software/cyclone-ui/releases/tag/vite%400.0.35) (11/10/2026)
6
20
 
7
21
  ### Updated Dependencies
package/README.md CHANGED
@@ -16,6 +16,7 @@ UI defaults.
16
16
  `@cyclone-ui/tokens`, or one built from your own design tokens
17
17
  - Defines `process.env.TAMAGUI_TARGET`, which Cyclone components read to render
18
18
  web-only styles
19
+ - Layers Tamagui's CSS below Tailwind CSS utilities (`tailwind` option)
19
20
 
20
21
  ## Installing
21
22
 
@@ -71,6 +72,40 @@ Pass `disableExtraction: true` to keep styles at runtime (for example while
71
72
  debugging). A `tamagui.build.ts` file in the project root overrides these
72
73
  options.
73
74
 
75
+ ### Tailwind CSS
76
+
77
+ Pass `tailwind: true` to use Tailwind CSS v4 classes on Cyclone components and
78
+ your own markup:
79
+
80
+ ```ts
81
+ import { cycloneUI } from "@cyclone-ui/vite";
82
+ import tailwindcss from "@tailwindcss/vite";
83
+ import react from "@vitejs/plugin-react";
84
+ import { defineConfig } from "vite";
85
+
86
+ export default defineConfig({
87
+ plugins: [react(), tailwindcss(), cycloneUI({ tailwind: true })]
88
+ });
89
+ ```
90
+
91
+ Then import the Cyclone theme before Tailwind in the app stylesheet:
92
+
93
+ ```css
94
+ @import "@cyclone-ui/tokens/tailwind.css";
95
+ @import "tailwindcss";
96
+ ```
97
+
98
+ The plugin puts Tamagui's CSS (runtime, compiler-extracted and
99
+ `@tamagui/core/reset.css`) inside `@layer tamagui`, and declares the layer
100
+ order `theme, base, tamagui, components, utilities` at the top of
101
+ `index.html`. Tailwind utilities passed as `className` then override component
102
+ styles, and Tailwind's preflight doesn't. Classes such as `bg-primary`, `p-lg`
103
+ and `rounded-container` use the Cyclone themes and tokens, and `dark:` follows
104
+ the Cyclone theme. When the app depends on `@tamagui/tailwind`, the compiler
105
+ extracts those components too. With `tokens`, import the generated
106
+ `.cyclone-ui/tailwind.css` instead (Node.js 22.18 or later). See
107
+ [Use Tailwind CSS with Cyclone UI](../../docs/packages/guides/tailwind.md).
108
+
74
109
  ### Custom design tokens
75
110
 
76
111
  Pass `tokens` to build the Tamagui config from your own design tokens instead
package/dist/index.d.mts CHANGED
@@ -16,6 +16,26 @@ type CycloneUIVitePluginOptions = TamaguiVitePluginOptions & {
16
16
  * @defaultValue The Cyclone UI config from `@cyclone-ui/tokens/tamagui`
17
17
  */
18
18
  tokens?: BuildTamaguiConfigOptions["tokens"];
19
+ /**
20
+ * Set the app up for Tailwind CSS v4 class names next to Cyclone UI
21
+ * components.
22
+ *
23
+ * @remarks
24
+ * - Puts all Tamagui CSS in `@layer tamagui` and declares the layer order
25
+ * `theme, base, tamagui, components, utilities` at the top of
26
+ * `index.html`. Tailwind utilities passed as `className` then override
27
+ * component styles, and Tailwind's preflight doesn't.
28
+ * - Compiles `@tamagui/tailwind` components when the app depends on it.
29
+ * - With `tokens`, also writes `.cyclone-ui/tailwind.css`; import it in
30
+ * place of `@cyclone-ui/tokens/tailwind.css`. This needs Node.js 22.18 or
31
+ * later.
32
+ *
33
+ * Plain CSS outside a layer beats every layer, so global app rules (such as
34
+ * `button { padding: 0 }`) also override components once this is on.
35
+ *
36
+ * @defaultValue false
37
+ */
38
+ tailwind?: boolean;
19
39
  };
20
40
  /**
21
41
  * Set up Tamagui and Cyclone UI components in a Vite application.
@@ -30,18 +50,19 @@ type CycloneUIVitePluginOptions = TamaguiVitePluginOptions & {
30
50
  * @example
31
51
  * ```ts
32
52
  * import { cycloneUI } from "@cyclone-ui/vite";
53
+ * import tailwindcss from "@tailwindcss/vite";
33
54
  * import react from "@vitejs/plugin-react";
34
55
  * import { defineConfig } from "vite";
35
56
  *
36
57
  * export default defineConfig({
37
- * plugins: [react(), cycloneUI({ tokens: "tokens/**\/*.json" })]
58
+ * plugins: [react(), tailwindcss(), cycloneUI({ tailwind: true })]
38
59
  * });
39
60
  * ```
40
61
  *
41
- * @param options - The design `tokens`, plus options forwarded to
42
- * `@tamagui/vite-plugin`.
62
+ * @param options - The design `tokens`, the `tailwind` switch, plus options
63
+ * forwarded to `@tamagui/vite-plugin`.
43
64
  * @returns The Vite plugins to add to the `plugins` array.
44
65
  */
45
- declare function cycloneUI({ tokens, ...options }?: CycloneUIVitePluginOptions): PluginOption[];
66
+ declare function cycloneUI({ tokens, tailwind, ...options }?: CycloneUIVitePluginOptions): PluginOption[];
46
67
  export { CycloneUIVitePluginOptions, cycloneUI };
47
68
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
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};
1
+ import{createRequire as e}from"node:module";import{TAILWIND_LAYER_ORDER as t}from"@cyclone-ui/theme-builder/tailwind";import{createTamaguiPlugins as n}from"@tamagui/vite-plugin";import{join as r}from"node:path";const i=`.cyclone-ui/tamagui.config.ts`,a=`tamagui`,o=e=>e&&`@layer ${a} {\n${e}\n}`,s=e=>e.split(`?`,1)[0].replace(/\\/g,`/`).endsWith(`/@tamagui/core/reset.css`),c=(t,n=process.cwd())=>{try{return e(r(n,`package.json`)).resolve(`${t}/package.json`),!0}catch{return!1}};function l({tokens:e,tailwind:r=!1,...l}={}){let{plugins:u}=n({config:e?i:`@cyclone-ui/tokens/tamagui`,components:[`@tamagui/core`,...r&&c(`@tamagui/tailwind`)?[`@tamagui/tailwind`]:[]],...r&&{wrapExtractedCSS:o},...l});return[{name:`cyclone-ui`,enforce:`pre`,async config({root:t}){let n=e&&await import(`@cyclone-ui/theme-builder`),o=n&&await n.buildTamaguiConfig({tokens:e,cwd:t,outputPath:i});return n&&o&&r&&await n.buildTailwindThemeCSS({configPath:o,cwd:t}),{define:{"process.env.TAMAGUI_TARGET":JSON.stringify(`web`),...r&&{"process.env.TAMAGUI_CSS_LAYER":JSON.stringify(a)}},...o&&{resolve:{alias:[{find:/^@cyclone-ui\/tokens\/tamagui$/,replacement:o}]}}}},...r&&{transformIndexHtml:()=>[{tag:`style`,attrs:{"data-precedence":`default`},children:t,injectTo:`head-prepend`}],transform(e,t){return s(t)?{code:o(e),map:null}:void 0}}},u]}export{l as cycloneUI};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["GENERATED_CONFIG","cycloneUI","options","configPath","tokens","root","tamaguiPlugin"],"sources":[],"mappings":""}
1
+ {"version":3,"file":"index.mjs","names":["GENERATED_CONFIG","TAMAGUI_LAYER","wrapInLayer","css","isTamaguiResetCSS","id","dependsOn","createRequire","join","root","name","cycloneUI","options","createTamaguiPlugins","tokens","tailwind","themeBuilder","configPath","TAILWIND_LAYER_ORDER","code","plugins"],"sources":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclone-ui/vite",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "type": "module",
5
5
  "description": "A Vite plugin that sets up Tamagui and Cyclone UI components in Vite applications.",
6
6
  "repository": {
@@ -13,21 +13,21 @@
13
13
  "exports": { ".": "./dist/index.mjs", "./package.json": "./package.json" },
14
14
  "types": "./dist/index.d.mts",
15
15
  "dependencies": {
16
- "@cyclone-ui/theme-builder": "0.0.55",
17
- "@tamagui/vite-plugin": "3.2.0"
16
+ "@cyclone-ui/theme-builder": "0.0.57",
17
+ "@tamagui/vite-plugin": "3.3.2"
18
18
  },
19
19
  "peerDependencies": {
20
- "@cyclone-ui/tokens": "0.3.54",
20
+ "@cyclone-ui/tokens": "0.3.56",
21
21
  "react-native-web": "0.19.12",
22
22
  "vite": "^8.3.6"
23
23
  },
24
24
  "devDependencies": {
25
- "@cyclone-ui/tokens": "0.3.54",
25
+ "@cyclone-ui/tokens": "0.3.56",
26
26
  "@powerlines/plugin-tsdown": "^0.1.620",
27
27
  "powerlines": "^0.47.219",
28
28
  "react-native-web": "0.19.12",
29
29
  "vite": "^8.3.6"
30
30
  },
31
31
  "publishConfig": { "access": "public" },
32
- "gitHead": "467f2b4d0c7b992ff7f8524e66a69755b6cb178a"
32
+ "gitHead": "bf208ee157c9f095773a33bd393d774e2137c108"
33
33
  }