Releases: zss-in-js/typedcssx
2.4.0
Minor update
- The css.tsx and css.ts extensions are gone, and you can now compile with regular ts and tsx.
- Added support for page.tsx for App route.
- Style class has been renamed to cssx.
- PreviewServerCSS has been moved to typedcssx/server.
- fast-glob disappeared from dependencies because it uses fs.globSync of node.js.
- Dcumentation updated.
- Plan to update the website soon.
This version cannot be deployed on servers that do not support Node.js 22x.
It uses the experimental feature fs.globSync.
We are considering replacing fast-glob with this in the future, but for now please use version 2.4.1 of typedcssx with fast-glob.
features
Both @types/node and Node.js require 22 or higher.
@types/node ^22.5.4 and Recommended Node.js lts v22.8.0.
2.3.1
2.3.0
2.2.9
✅ tests passed.
- Readme updated
Refactoring as reduced file size:
Haved succeeded in consolidating all the directory navigating functions into one place.
Test:
It became stable by setting a timeout of 10 seconds to compiler-integration.test.ts, which was a flaky test.
2.2.8
When moved the findNextJsProjectRoot function to helper.ts again, an error occurred.
Found that there was insufficient branching processing on the server side.
2.2.7
- Compilation using shebang has been changed from the previous method of using script fields.
- styles/typedcssx-global.css is now generated directly under the next.js project or in the src folder.
The following has been deprecated and can now be compiled with npx typedcssx --compile instead.
"scripts": {
"compiler": "tsc --noEmit ./compiler/src/index.ts && tsx ./compiler/src/index.ts"
},Loading a global stylesheet is now as simple as:
// layout.tsx
import 'styles/typedcssx-global.css'2.2.6
2.2.5
2.2.4
2.2.3
Fixed bugs from 2.2.0 to 2.2.2.
Added PreviewServerCSS component as a new API.
If you set anchorEnabled={true} in props, the link will be reloaded just once In development mode, just like an a tag.
(The URL will not be reloaded once it has been clicked.)
set up
import { PreviewServerCSS } from 'typedcssx';
export default function RootLayout({ children }: RootLayoutProps) {
return (
<html>
<head>
<PreviewServerCSS anchorEnabled={true} />
</head>
<body>
{children}
</body>
</html>
);
}This setting allows you to preview the server component (and compile it).
- The specifications of the pseudo selectors "has" and "not" have changed:
hasClass and notClass have been removed as they were redundant.
From now on it will be like this:
hasDiv ⇨ has(div)
hasTapestry ⇨ has(.tapestry)
"not" is the same as above.