-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: lightningcss / rule sorting from JS (#1896)
* feat: HashFactory + StyleCollector * refactor(fixtures): use dev alias and rm deps across workspace packages 55ff125 * test: move/update files after refactor * feat: StaticCss engine * test: update snapshots chore: rm deadcode toKeyframeCss fix: HashFactory shouldnt normalize shorthands for recipe variants ex: rounded -> borderRadius shouldnt happen cause rounded is a variant name, not a prop name * refactor: extract / generate / builder / debug-files / cli-main * chore: fix imports * refactor: ship files JSON format chore: rename appendFilesCss -> ctx.parseFiles chore: only call toCss once for cssgen with artifact static & add outpath log * fix: dts declarations + playground * chore: fix rebase * chore: update snapshots/lock/json after rebase * fix: builder write * fix: playground after changes * chore: fix import * chore: fix playground build * chore: rm comment / deadcode * fix: cli generate * refactor: encoder -> decoder * refactor: more stuff * chore: rm dead types * fix: cssgen include other layers if not minimal * fix: tslint * chore: update * refactor: emit-artifact -> codegen * refactor: config pkg and diff * chore: add diff types * refactor: project * refactor: more stuff * chore: refactor * refactor: more stuff * chore: update * refactor: rm lil-fp * fix: typecheck * refactor: add method * chore: rm unused dep * fix: dts generation for config * chore: rm unused code * perf: markImportant from JS instead of postcss * feat: add lightningcss under a flag * test: update snapshot * feat: add config.browserslist * feat: add lightningcss flag in buider * test: update snapshots after sorting from JS * refactor: toCss with a fork of stitches stringify * perf: only compute once token-dictionary properties * perf: serializeStyle -> use decoder * fix: playground with lightningcss-wasm * chore: rm postcss sorting plugins in favor of JS fns * feat(cli): add --lightningcss flag to cssgen * chore: update snapshot * chore: log time spent generating the CSS * chore: add changeset * chore: update based on review * refactor: serialize style * revert: prettify * refactor: setup composition * refactor: deep set to shared * refactor: stringify * refactor: rule processor * chore: move things around * refactor: rm stringify * refactor: keyframe code * refactor: code --------- Co-authored-by: Segun Adebayo <[email protected]>
- Loading branch information
1 parent
bee3ec8
commit 8430490
Showing
104 changed files
with
3,841 additions
and
3,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
'@pandacss/astro-plugin-studio': minor | ||
'@pandacss/preset-open-props': minor | ||
'@pandacss/token-dictionary': minor | ||
'@pandacss/preset-atlaskit': minor | ||
'@pandacss/is-valid-prop': minor | ||
'@pandacss/preset-panda': minor | ||
'@pandacss/preset-base': minor | ||
'@pandacss/extractor': minor | ||
'@pandacss/generator': minor | ||
'@pandacss/fixture': minor | ||
'@pandacss/postcss': minor | ||
'@pandacss/config': minor | ||
'@pandacss/logger': minor | ||
'@pandacss/parser': minor | ||
'@pandacss/shared': minor | ||
'@pandacss/studio': minor | ||
'@pandacss/astro': minor | ||
'@pandacss/error': minor | ||
'@pandacss/types': minor | ||
'@pandacss/core': minor | ||
'@pandacss/node': minor | ||
'@pandacss/dev': minor | ||
--- | ||
|
||
Improve performance, mostly for the CSS generation by removing a lot of `postcss` usage (and plugins). | ||
|
||
## Public changes: | ||
|
||
- Introduce a new `config.lightningcss` option to use `lightningcss` (currently disabled by default) instead of | ||
`postcss`. | ||
- Add a new `config.browserslist` option to configure the browserslist used by `lightningcss`. | ||
- Add a `--lightningcss` flag to the `panda` and `panda cssgen` command to use `lightningcss` instead of `postcss` for | ||
this run. | ||
|
||
## Internal changes: | ||
|
||
- `markImportant` fn from JS instead of walking through postcss AST nodes | ||
- use a fork of `stitches` `stringify` function instead of `postcss-css-in-js` to write the CSS string from a JS object | ||
- only compute once `TokenDictionary` properties | ||
- refactor `serializeStyle` to use the same code path as the rest of the pipeline with `StyleEncoder` / `StyleDecoder` | ||
and rename it to `transformStyles` to better convey what it does |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["src", "index.ts"], | ||
"compilerOptions": { | ||
"customConditions": null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
8430490
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
panda-docs – ./website
panda-css.com
panda-docs-chakra-ui.vercel.app
panda-docs.vercel.app
panda-docs-git-main-chakra-ui.vercel.app
8430490
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
panda-playground – ./playground
panda-playground-git-main-chakra-ui.vercel.app
panda-playground-chakra-ui.vercel.app
play.panda-css.com
panda-playground.vercel.app
8430490
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
panda-studio – ./
panda-studio-git-main-chakra-ui.vercel.app
panda-app.vercel.app
panda-studio-chakra-ui.vercel.app