@cyclone-ui/nextjs 0.0.40 → 0.0.42
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 +43 -0
- package/README.md +31 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +33 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +33 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/provider.cjs +1 -1
- package/dist/provider.d.cts +4 -0
- package/dist/provider.d.cts.map +1 -1
- package/dist/provider.d.mts +4 -0
- package/dist/provider.mjs +1 -1
- package/dist/provider.mjs.map +1 -1
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Cyclone UI - Nextjs
|
|
4
4
|
|
|
5
|
+
## [0.0.41](https://github.com/storm-software/cyclone-ui/releases/tag/nextjs%400.0.41) (11/11/2026)
|
|
6
|
+
|
|
7
|
+
### Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated **checkbox** to **v0.5.72**
|
|
10
|
+
- Updated **field** to **v0.5.72**
|
|
11
|
+
- Updated **input** to **v0.6.72**
|
|
12
|
+
- Updated **password-input** to **v0.0.71**
|
|
13
|
+
- Updated **radio-group** to **v0.5.73**
|
|
14
|
+
- Updated **select** to **v0.6.73**
|
|
15
|
+
- Updated **switch** to **v0.5.72**
|
|
16
|
+
- Updated **text-area** to **v0.1.72**
|
|
17
|
+
|
|
18
|
+
## [0.0.40](https://github.com/storm-software/cyclone-ui/releases/tag/nextjs%400.0.40) (11/11/2026)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **monorepo:** Update form field components to better support progressive enhancement in nextjs ([fafcb85ed](https://github.com/storm-software/cyclone-ui/commit/fafcb85ed))
|
|
23
|
+
|
|
24
|
+
### Updated Dependencies
|
|
25
|
+
|
|
26
|
+
- Updated **bar-chart** to **v0.0.38**
|
|
27
|
+
- Updated **body-text** to **v0.5.66**
|
|
28
|
+
- Updated **calendar** to **v0.0.57**
|
|
29
|
+
- Updated **chart** to **v0.0.38**
|
|
30
|
+
- Updated **checkbox** to **v0.5.71**
|
|
31
|
+
- Updated **composed-chart** to **v0.0.38**
|
|
32
|
+
- Updated **drawer** to **v0.1.72**
|
|
33
|
+
- Updated **field** to **v0.5.71**
|
|
34
|
+
- Updated **footer** to **v0.0.70**
|
|
35
|
+
- Updated **form** to **v0.9.68**
|
|
36
|
+
- Updated **input** to **v0.6.71**
|
|
37
|
+
- Updated **link** to **v0.5.71**
|
|
38
|
+
- Updated **page** to **v0.0.66**
|
|
39
|
+
- Updated **password-input** to **v0.0.70**
|
|
40
|
+
- Updated **radio-group** to **v0.5.72**
|
|
41
|
+
- Updated **select** to **v0.6.72**
|
|
42
|
+
- Updated **state** to **v0.0.69**
|
|
43
|
+
- Updated **switch** to **v0.5.71**
|
|
44
|
+
- Updated **text-area** to **v0.1.71**
|
|
45
|
+
- Updated **theme-builder** to **v0.0.56**
|
|
46
|
+
- Updated **tokens** to **v0.3.55**
|
|
47
|
+
|
|
5
48
|
## [0.0.39](https://github.com/storm-software/cyclone-ui/releases/tag/nextjs%400.0.39) (11/10/2026)
|
|
6
49
|
|
|
7
50
|
### Updated Dependencies
|
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ using `@tamagui/next-plugin` and `@tamagui/next-theme`.
|
|
|
19
19
|
`react-native-svg` → `@tamagui/react-native-svg`
|
|
20
20
|
- The Tamagui compiler for Webpack builds through `@tamagui/next-plugin`
|
|
21
21
|
- Builds the Tamagui config from your own design tokens (`tokens` option)
|
|
22
|
+
- Layers Tamagui's CSS below Tailwind CSS utilities (`tailwind` option)
|
|
22
23
|
- Defines `process.env.TAMAGUI_TARGET`, which Cyclone components read to render
|
|
23
24
|
web-only styles
|
|
24
25
|
- Stores the light, dark or system setting and applies it before hydration
|
|
@@ -221,6 +222,36 @@ pnpm, Webpack builds also need `@tamagui/web` and `motion` installed in the
|
|
|
221
222
|
app, because the Tamagui compiler evaluates the generated config from the
|
|
222
223
|
project root.
|
|
223
224
|
|
|
225
|
+
### Tailwind CSS
|
|
226
|
+
|
|
227
|
+
Pass `tailwind: true` to use Tailwind CSS v4 classes on Cyclone components and
|
|
228
|
+
your own markup:
|
|
229
|
+
|
|
230
|
+
```ts
|
|
231
|
+
// next.config.ts
|
|
232
|
+
import { withCycloneUI } from "@cyclone-ui/nextjs"
|
|
233
|
+
|
|
234
|
+
export default withCycloneUI({}, { tailwind: true })
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Then import the Cyclone theme before Tailwind in `app/globals.css`:
|
|
238
|
+
|
|
239
|
+
```css
|
|
240
|
+
@import "@cyclone-ui/tokens/tailwind.css";
|
|
241
|
+
@import "tailwindcss";
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Tamagui writes its CSS inside `@layer tamagui`, and `CycloneUIProvider`
|
|
245
|
+
declares the layer order `theme, base, tamagui, components, utilities` ahead
|
|
246
|
+
of it. Tailwind utilities passed as `className` then override component styles,
|
|
247
|
+
and Tailwind's preflight doesn't. Classes such as `bg-primary`, `p-lg` and
|
|
248
|
+
`rounded-container` use the Cyclone themes and tokens, and `dark:` follows the
|
|
249
|
+
Cyclone theme. Webpack builds default to `disableExtraction: true`, because
|
|
250
|
+
`@tamagui/next-plugin` writes extracted CSS outside the layer. With `tokens`,
|
|
251
|
+
import the generated `.cyclone-ui/tailwind.css` instead (Node.js 22.18 or
|
|
252
|
+
later). See
|
|
253
|
+
[Use Tailwind CSS with Cyclone UI](../../docs/packages/guides/tailwind.md).
|
|
254
|
+
|
|
224
255
|
### Provider props
|
|
225
256
|
|
|
226
257
|
`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");const n=(n,r,
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("node:module"),t=require("node:path");const n=(n,{tailwind:r,...i},a)=>({...n,env:{TAMAGUI_TARGET:`web`,...r&&{TAMAGUI_CSS_LAYER:`tamagui`},...n.env},turbopack:{...n.turbopack,resolveAlias:{"react-native":`react-native-web`,"react-native-svg":`@tamagui/react-native-svg`,...a&&{"@cyclone-ui/tokens/tamagui":`./${(0,t.relative)(process.cwd(),a)}`},...n.turbopack?.resolveAlias}},webpack:(o,s)=>{let{withTamagui:c}=(0,e.createRequire)((0,t.join)(s.dir,`package.json`))(`@tamagui/next-plugin`),l=c({config:a??`@cyclone-ui/tokens/tamagui`,components:[`@tamagui/core`],appDir:!0,...r&&{disableExtraction:!0},...i})(n).webpack(o,s);return a&&(l.resolve.alias[`@cyclone-ui/tokens/tamagui$`]=a),l}}),r=(e,{tokens:t,...i})=>e instanceof Promise?e.then(e=>r(e,{tokens:t,...i})):t?import(`@cyclone-ui/theme-builder`).then(async({buildTailwindThemeCSS:r,buildTamaguiConfig:a})=>{let o=await a({tokens:t});return i.tailwind&&await r({configPath:o}),n(e,i,o)}):n(e,i);function i(e={},t={}){return typeof e==`function`?(n,i)=>r(e(n,i),t):r(e,t)}exports.withCycloneUI=i;
|
package/dist/index.d.cts
CHANGED
|
@@ -21,6 +21,27 @@ type WithCycloneUIOptions = Partial<WithTamaguiProps> & {
|
|
|
21
21
|
* @defaultValue The Cyclone UI config from `@cyclone-ui/tokens/tamagui`
|
|
22
22
|
*/
|
|
23
23
|
tokens?: BuildTamaguiConfigOptions["tokens"];
|
|
24
|
+
/**
|
|
25
|
+
* Set the app up for Tailwind CSS v4 class names next to Cyclone UI
|
|
26
|
+
* components.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* - Puts all Tamagui CSS in `@layer tamagui`, and `CycloneUIProvider`
|
|
30
|
+
* declares the layer order `theme, base, tamagui, components, utilities`
|
|
31
|
+
* ahead of it. Tailwind utilities passed as `className` then override
|
|
32
|
+
* component styles, and Tailwind's preflight doesn't.
|
|
33
|
+
* - Webpack builds default to `disableExtraction: true`, because
|
|
34
|
+
* `@tamagui/next-plugin` writes the extracted CSS outside the layer.
|
|
35
|
+
* - With `tokens`, also writes `.cyclone-ui/tailwind.css`; import it in
|
|
36
|
+
* place of `@cyclone-ui/tokens/tailwind.css`. This needs Node.js 22.18 or
|
|
37
|
+
* later.
|
|
38
|
+
*
|
|
39
|
+
* Plain CSS outside a layer beats every layer, so global app rules (such as
|
|
40
|
+
* `button { padding: 0 }`) also override components once this is on.
|
|
41
|
+
*
|
|
42
|
+
* @defaultValue false
|
|
43
|
+
*/
|
|
44
|
+
tailwind?: boolean;
|
|
24
45
|
};
|
|
25
46
|
type NextConfigFunction<Result extends NextConfig | Promise<NextConfig> = NextConfig | Promise<NextConfig>> = (phase: string, context: {
|
|
26
47
|
defaultConfig: NextConfig;
|
|
@@ -33,7 +54,8 @@ type NextConfigFunction<Result extends NextConfig | Promise<NextConfig> = NextCo
|
|
|
33
54
|
* `react-native-web` and `react-native-svg` to `@tamagui/react-native-svg`.
|
|
34
55
|
* - Webpack (`next build --webpack`): applies `@tamagui/next-plugin`, which
|
|
35
56
|
* must be installed, with the Cyclone UI Tamagui config.
|
|
36
|
-
* - Both: defines `process.env.TAMAGUI_TARGET
|
|
57
|
+
* - Both: defines `process.env.TAMAGUI_TARGET`, and with `tailwind`,
|
|
58
|
+
* `process.env.TAMAGUI_CSS_LAYER`.
|
|
37
59
|
*
|
|
38
60
|
* With `tokens`, the Tamagui config is built from them first, so this returns
|
|
39
61
|
* a promise, which Next.js accepts as the config export.
|
|
@@ -59,9 +81,17 @@ type NextConfigFunction<Result extends NextConfig | Promise<NextConfig> = NextCo
|
|
|
59
81
|
* export default withCycloneUI({}, { tokens: "tokens/**\/*.json" });
|
|
60
82
|
* ```
|
|
61
83
|
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* // next.config.ts — Tailwind CSS classes next to Cyclone UI components
|
|
87
|
+
* import { withCycloneUI } from "@cyclone-ui/nextjs";
|
|
88
|
+
*
|
|
89
|
+
* export default withCycloneUI({}, { tailwind: true });
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
62
92
|
* @param nextConfig - The Next.js config, promise, or phase function to extend.
|
|
63
|
-
* @param options - The design `tokens`, plus options
|
|
64
|
-
* `@tamagui/next-plugin` (Webpack only).
|
|
93
|
+
* @param options - The design `tokens`, the `tailwind` switch, plus options
|
|
94
|
+
* forwarded to `@tamagui/next-plugin` (Webpack only).
|
|
65
95
|
* @returns The extended Next.js config.
|
|
66
96
|
*/
|
|
67
97
|
declare function withCycloneUI(nextConfig?: NextConfig, options?: WithCycloneUIOptions & {
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;KA4BY,uBAAuB,QAAQ;;;;;;;;;;;;;;;EAezC,SAAS;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;KA4BY,uBAAuB,QAAQ;;;;;;;;;;;;;;;EAezC,SAAS;;;;;;;;;;;;;;;;;;;;;EAsBT;;KAGG,mBACH,eAAe,aAAa,QAAQ,cAClC,aAAa,QAAQ,gBACpB,eAAe;EAAW,eAAe;MAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0H/C,cACd,aAAa,YACb,UAAU;EAAyB;IAClC;iBACa,cACd,YAAY,wBACZ,SAAS,uBACR,aAAa,QAAQ;iBACR,cACd,YAAY,QAAQ,aACpB,UAAU,uBACT,QAAQ;iBACK,cAAc,eAAe,aAAa,QAAQ,aAChE,YAAY,mBAAmB,SAC/B,UAAU;EAAyB;IAClC,mBACD,eAAe,QAAQ,cAAc,QAAQ,cAAc;iBAE7C,cACd,YAAY,oBACZ,SAAS,uBACR"}
|
package/dist/index.d.mts
CHANGED
|
@@ -21,6 +21,27 @@ type WithCycloneUIOptions = Partial<WithTamaguiProps> & {
|
|
|
21
21
|
* @defaultValue The Cyclone UI config from `@cyclone-ui/tokens/tamagui`
|
|
22
22
|
*/
|
|
23
23
|
tokens?: BuildTamaguiConfigOptions["tokens"];
|
|
24
|
+
/**
|
|
25
|
+
* Set the app up for Tailwind CSS v4 class names next to Cyclone UI
|
|
26
|
+
* components.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* - Puts all Tamagui CSS in `@layer tamagui`, and `CycloneUIProvider`
|
|
30
|
+
* declares the layer order `theme, base, tamagui, components, utilities`
|
|
31
|
+
* ahead of it. Tailwind utilities passed as `className` then override
|
|
32
|
+
* component styles, and Tailwind's preflight doesn't.
|
|
33
|
+
* - Webpack builds default to `disableExtraction: true`, because
|
|
34
|
+
* `@tamagui/next-plugin` writes the extracted CSS outside the layer.
|
|
35
|
+
* - With `tokens`, also writes `.cyclone-ui/tailwind.css`; import it in
|
|
36
|
+
* place of `@cyclone-ui/tokens/tailwind.css`. This needs Node.js 22.18 or
|
|
37
|
+
* later.
|
|
38
|
+
*
|
|
39
|
+
* Plain CSS outside a layer beats every layer, so global app rules (such as
|
|
40
|
+
* `button { padding: 0 }`) also override components once this is on.
|
|
41
|
+
*
|
|
42
|
+
* @defaultValue false
|
|
43
|
+
*/
|
|
44
|
+
tailwind?: boolean;
|
|
24
45
|
};
|
|
25
46
|
type NextConfigFunction<Result extends NextConfig | Promise<NextConfig> = NextConfig | Promise<NextConfig>> = (phase: string, context: {
|
|
26
47
|
defaultConfig: NextConfig;
|
|
@@ -33,7 +54,8 @@ type NextConfigFunction<Result extends NextConfig | Promise<NextConfig> = NextCo
|
|
|
33
54
|
* `react-native-web` and `react-native-svg` to `@tamagui/react-native-svg`.
|
|
34
55
|
* - Webpack (`next build --webpack`): applies `@tamagui/next-plugin`, which
|
|
35
56
|
* must be installed, with the Cyclone UI Tamagui config.
|
|
36
|
-
* - Both: defines `process.env.TAMAGUI_TARGET
|
|
57
|
+
* - Both: defines `process.env.TAMAGUI_TARGET`, and with `tailwind`,
|
|
58
|
+
* `process.env.TAMAGUI_CSS_LAYER`.
|
|
37
59
|
*
|
|
38
60
|
* With `tokens`, the Tamagui config is built from them first, so this returns
|
|
39
61
|
* a promise, which Next.js accepts as the config export.
|
|
@@ -59,9 +81,17 @@ type NextConfigFunction<Result extends NextConfig | Promise<NextConfig> = NextCo
|
|
|
59
81
|
* export default withCycloneUI({}, { tokens: "tokens/**\/*.json" });
|
|
60
82
|
* ```
|
|
61
83
|
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* // next.config.ts — Tailwind CSS classes next to Cyclone UI components
|
|
87
|
+
* import { withCycloneUI } from "@cyclone-ui/nextjs";
|
|
88
|
+
*
|
|
89
|
+
* export default withCycloneUI({}, { tailwind: true });
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
62
92
|
* @param nextConfig - The Next.js config, promise, or phase function to extend.
|
|
63
|
-
* @param options - The design `tokens`, plus options
|
|
64
|
-
* `@tamagui/next-plugin` (Webpack only).
|
|
93
|
+
* @param options - The design `tokens`, the `tailwind` switch, plus options
|
|
94
|
+
* forwarded to `@tamagui/next-plugin` (Webpack only).
|
|
65
95
|
* @returns The extended Next.js config.
|
|
66
96
|
*/
|
|
67
97
|
declare function withCycloneUI(nextConfig?: NextConfig, options?: WithCycloneUIOptions & {
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as e}from"node:module";import{join as t,relative as n}from"node:path";const r=(r,i,
|
|
1
|
+
import{createRequire as e}from"node:module";import{join as t,relative as n}from"node:path";const r=(r,{tailwind:i,...a},o)=>({...r,env:{TAMAGUI_TARGET:`web`,...i&&{TAMAGUI_CSS_LAYER:`tamagui`},...r.env},turbopack:{...r.turbopack,resolveAlias:{"react-native":`react-native-web`,"react-native-svg":`@tamagui/react-native-svg`,...o&&{"@cyclone-ui/tokens/tamagui":`./${n(process.cwd(),o)}`},...r.turbopack?.resolveAlias}},webpack:(n,s)=>{let{withTamagui:c}=e(t(s.dir,`package.json`))(`@tamagui/next-plugin`),l=c({config:o??`@cyclone-ui/tokens/tamagui`,components:[`@tamagui/core`],appDir:!0,...i&&{disableExtraction:!0},...a})(r).webpack(n,s);return o&&(l.resolve.alias[`@cyclone-ui/tokens/tamagui$`]=o),l}}),i=(e,{tokens:t,...n})=>e instanceof Promise?e.then(e=>i(e,{tokens:t,...n})):t?import(`@cyclone-ui/theme-builder`).then(async({buildTailwindThemeCSS:i,buildTamaguiConfig:a})=>{let o=await a({tokens:t});return n.tailwind&&await i({configPath:o}),r(e,n,o)}):r(e,n);function a(e={},t={}){return typeof e==`function`?(n,r)=>i(e(n,r),t):i(e,t)}export{a as withCycloneUI};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["extend","nextConfig","configPath","relative","createRequire","join","context","result","withTamagui","
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["extend","options","nextConfig","tailwind","configPath","relative","createRequire","join","context","result","withTamagui","config","resolveConfig","tokens","buildTamaguiConfig","buildTailwindThemeCSS","withCycloneUI","phase"],"sources":[],"mappings":""}
|
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,onChangeMode:n,enableColorScheme:i})=>{let{forcedTheme:o,resolvedTheme:s}=(0,r.useThemeSetting)(),c=o??s,{changeMode:l}=(0,e.useThemeActions)();return(0,a.useLayoutEffect)(()=>{(c===`light`||c===`dark`)&&(n(c),i&&(document.documentElement.style.colorScheme=c))},[c,i,n]),(0,a.useEffect)(()=>{l(t)},[l,t]),null};function
|
|
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=process.env.TAMAGUI_CSS_LAYER,u=({mode:t,onChangeMode:n,enableColorScheme:i})=>{let{forcedTheme:o,resolvedTheme:s}=(0,r.useThemeSetting)(),c=o??s,{changeMode:l}=(0,e.useThemeActions)();return(0,a.useLayoutEffect)(()=>{(c===`light`||c===`dark`)&&(n(c),i&&(document.documentElement.style.colorScheme=c))},[c,i,n]),(0,a.useEffect)(()=>{l(t)},[l,t]),null};function d({children:d,config:f=t.config,disableInjectCSS:p=!1,skipNextHead:m=!0,onChangeTheme:h,mode:g=`light`,modeCookie:_,...v}){let[y,b]=(0,a.useState)(g);return(0,a.useEffect)(()=>{_&&(document.cookie=`${_}=${y}; path=/; max-age=31536000; samesite=lax`)},[y,_]),(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,{...v,skipNextHead:m,onChangeTheme:e=>{(e===`light`||e===`dark`)&&b(e),h?.(e)},children:/* @__PURE__ */ (0,s.jsxs)(e.ThemeApi.Provider,{scope:`theme`,initialState:{mode:y,items:c},children:[/* @__PURE__ */ (0,s.jsx)(u,{mode:y,onChangeMode:b,enableColorScheme:v.enableColorScheme??!0}),l&&/* @__PURE__ */ (0,s.jsx)(`style`,{href:`cyclone-ui-layer-order`,precedence:`default`,children:`@layer theme, base, ${l}, components, utilities;`}),/* @__PURE__ */ (0,s.jsx)(n.TamaguiProvider,{config:f,defaultTheme:y,disableInjectCSS:p,children:/* @__PURE__ */ (0,s.jsx)(n.Theme,{name:`base`,children:d})})]})})}exports.CycloneUIProvider=d,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
|
@@ -41,6 +41,10 @@ type CycloneUIProviderProps = PropsWithChildren<Omit<ThemeProviderProps$1, "chil
|
|
|
41
41
|
* react-native-web styles during server rendering. Read or change the theme
|
|
42
42
|
* with `useThemeSetting`.
|
|
43
43
|
*
|
|
44
|
+
* With `withCycloneUI(config, { tailwind: true })`, it also declares the
|
|
45
|
+
* cascade layer order ahead of Tamagui's stylesheet, so Tailwind utilities
|
|
46
|
+
* override the Tamagui layer whichever stylesheet the browser sees first.
|
|
47
|
+
*
|
|
44
48
|
* @example
|
|
45
49
|
* ```tsx
|
|
46
50
|
* // app/layout.tsx
|
package/dist/provider.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.cts","names":["ThemeProviderProps"],"sources":["../src/provider.tsx"],"mappings":";;;;KAuCY,yBAAyB,kBACnC,KAAKA;;;;;;EAMH,SAAS;;;;;;;EAQT;;;;;;;;EASA,OAAO;;;;;;EAOP
|
|
1
|
+
{"version":3,"file":"provider.d.cts","names":["ThemeProviderProps"],"sources":["../src/provider.tsx"],"mappings":";;;;KAuCY,yBAAyB,kBACnC,KAAKA;;;;;;EAMH,SAAS;;;;;;;EAQT;;;;;;;;EASA,OAAO;;;;;;EAOP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0EY,oBACd,UACA,QACA,kBACA,cACA,eACA,MAAM,YACN,eACG,SACF,yCAAsB,IAAA"}
|
package/dist/provider.d.mts
CHANGED
|
@@ -41,6 +41,10 @@ type CycloneUIProviderProps = PropsWithChildren<Omit<ThemeProviderProps$1, "chil
|
|
|
41
41
|
* react-native-web styles during server rendering. Read or change the theme
|
|
42
42
|
* with `useThemeSetting`.
|
|
43
43
|
*
|
|
44
|
+
* With `withCycloneUI(config, { tailwind: true })`, it also declares the
|
|
45
|
+
* cascade layer order ahead of Tamagui's stylesheet, so Tailwind utilities
|
|
46
|
+
* override the Tamagui layer whichever stylesheet the browser sees first.
|
|
47
|
+
*
|
|
44
48
|
* @example
|
|
45
49
|
* ```tsx
|
|
46
50
|
* // app/layout.tsx
|
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,useThemeSetting as c}from"@tamagui/next-theme";import{useServerInsertedHTML as l}from"next/navigation.js";import{useEffect as u,useLayoutEffect as d,useState as f}from"react";import{StyleSheet as p}from"react-native";import{jsx as m,jsxs as h}from"react/jsx-runtime";const g=[`light`,`dark`],_=({mode:e,onChangeMode:n,enableColorScheme:r})=>{let{forcedTheme:i,resolvedTheme:a}=c(),o=i??a,{changeMode:s}=t();return d(()=>{(o===`light`||o===`dark`)&&(n(o),r&&(document.documentElement.style.colorScheme=o))},[o,r,n]),u(()=>{s(e)},[s,e]),null};function
|
|
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,useThemeSetting as c}from"@tamagui/next-theme";import{useServerInsertedHTML as l}from"next/navigation.js";import{useEffect as u,useLayoutEffect as d,useState as f}from"react";import{StyleSheet as p}from"react-native";import{jsx as m,jsxs as h}from"react/jsx-runtime";const g=[`light`,`dark`],_=process.env.TAMAGUI_CSS_LAYER,v=({mode:e,onChangeMode:n,enableColorScheme:r})=>{let{forcedTheme:i,resolvedTheme:a}=c(),o=i??a,{changeMode:s}=t();return d(()=>{(o===`light`||o===`dark`)&&(n(o),r&&(document.documentElement.style.colorScheme=o))},[o,r,n]),u(()=>{s(e)},[s,e]),null};function y({children:t,config:o=n,disableInjectCSS:s=!1,skipNextHead:c=!0,onChangeTheme:d,mode:y=`light`,modeCookie:b,...x}){let[S,C]=f(y);return u(()=>{b&&(document.cookie=`${b}=${S}; path=/; max-age=31536000; samesite=lax`)},[S,b]),l(()=>{let e=p.getSheet();return/* @__PURE__ */ m(`style`,{id:e.id,dangerouslySetInnerHTML:{__html:e.textContent}})}),/* @__PURE__ */ m(a,{...x,skipNextHead:c,onChangeTheme:e=>{(e===`light`||e===`dark`)&&C(e),d?.(e)},children:/* @__PURE__ */ h(e.Provider,{scope:`theme`,initialState:{mode:S,items:g},children:[/* @__PURE__ */ m(v,{mode:S,onChangeMode:C,enableColorScheme:x.enableColorScheme??!0}),_&&/* @__PURE__ */ m(`style`,{href:`cyclone-ui-layer-order`,precedence:`default`,children:`@layer theme, base, ${_}, components, utilities;`}),/* @__PURE__ */ m(r,{config:o,defaultTheme:S,disableInjectCSS:s,children:/* @__PURE__ */ m(i,{name:`base`,children:t})})]})})}export{y 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":["useThemeSetting","cycloneConfig","config","useThemeSetting$1","ITEMS","SyncColorMode","activeMode","forcedTheme","resolvedTheme","useThemeActions","useLayoutEffect","onChangeMode","enableColorScheme","useEffect","changeMode","mode","CycloneUIProvider","config$1","config","serverMode","props","setMode","useState","modeCookie","useServerInsertedHTML","sheet","StyleSheet","NextThemeProvider","name","onChangeTheme","ThemeApi","TamaguiProvider","Theme","useRootTheme","useThemeSetting"],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"provider.mjs","names":["useThemeSetting","cycloneConfig","config","useThemeSetting$1","ITEMS","CSS_LAYER","SyncColorMode","activeMode","forcedTheme","resolvedTheme","useThemeActions","useLayoutEffect","onChangeMode","enableColorScheme","useEffect","changeMode","mode","CycloneUIProvider","config$1","config","serverMode","props","setMode","useState","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.42",
|
|
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.57",
|
|
49
49
|
"@tamagui/next-theme": "3.3.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@cyclone-ui/state": "0.0.
|
|
53
|
-
"@cyclone-ui/tokens": "0.3.
|
|
52
|
+
"@cyclone-ui/state": "0.0.70",
|
|
53
|
+
"@cyclone-ui/tokens": "0.3.56",
|
|
54
54
|
"@tamagui/core": "3.3.2",
|
|
55
55
|
"@tamagui/next-plugin": "3.3.2",
|
|
56
56
|
"@tamagui/react-native-svg": "3.3.2",
|
|
@@ -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.70",
|
|
69
|
+
"@cyclone-ui/tokens": "0.3.56",
|
|
70
70
|
"@next/playwright": "16.4.4",
|
|
71
71
|
"@playwright/test": "1.64.1",
|
|
72
72
|
"@powerlines/plugin-tsdown": "^0.1.620",
|
|
@@ -78,8 +78,9 @@
|
|
|
78
78
|
"powerlines": "^0.47.219",
|
|
79
79
|
"react": "^19.3.1",
|
|
80
80
|
"react-native": "^0.87.1",
|
|
81
|
-
"react-native-web": "0.19.12"
|
|
81
|
+
"react-native-web": "0.19.12",
|
|
82
|
+
"tailwindcss": "4.3.0"
|
|
82
83
|
},
|
|
83
84
|
"publishConfig": { "access": "public" },
|
|
84
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "bf208ee157c9f095773a33bd393d774e2137c108"
|
|
85
86
|
}
|