Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/light-foxes-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@devup-ui/wasm": patch
---

Support \_selector in selectors prop
5 changes: 5 additions & 0 deletions .changeset/poor-clouds-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@devup-ui/wasm": patch
---

Optimize selectors
5 changes: 5 additions & 0 deletions .changeset/red-mugs-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@devup-ui/react": patch
---

Fix nested selector typing issue
5 changes: 5 additions & 0 deletions .changeset/sweet-masks-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@devup-ui/wasm": patch
---

Optimize 0deg
71 changes: 29 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions apps/landing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"@devup-ui/reset-css": "workspace:*",
"@mdx-js/loader": "^3.1.0",
"@mdx-js/react": "^3.1.0",
"@next/mdx": "^15.4.2",
"@next/mdx": "^15.4.4",
"@types/mdx": "^2.0.13",
"body-scroll-lock": "3.1.5",
"clsx": "^2.1.1",
"next": "^15.4.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"next": "^15.4.4",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-markdown": "^10.1.0",
"react-syntax-highlighter": "^15.6.1",
"remark-gfm": "^4.0.1"
Expand Down
6 changes: 3 additions & 3 deletions apps/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"lint": "next lint"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"next": "^15.4.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"next": "^15.4.4",
"@devup-ui/react": "workspace:*"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions apps/rsbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"lint": "tsc && eslint"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"@devup-ui/react": "workspace:*"
},
"devDependencies": {
"@rsbuild/core": "^1.4.9",
"@rsbuild/core": "^1.4.11",
"@rsbuild/plugin-react": "^1.3.4",
"@devup-ui/rsbuild-plugin": "workspace:*"
}
Expand Down
4 changes: 2 additions & 2 deletions apps/vite-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"lint": "tsc && eslint"
},
"dependencies": {
"react": "^19.1.0",
"react": "^19.1.1",
"@devup-ui/react": "workspace:*",
"vite": "^7.0.5"
"vite": "^7.0.6"
},
"devDependencies": {
"vite-plugin-dts": "^4.5.4",
Expand Down
6 changes: 3 additions & 3 deletions apps/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"lint": "tsc && eslint"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"@devup-ui/react": "workspace:*",
"vite-lib-example": "workspace:*"
},
"devDependencies": {
"@devup-ui/vite-plugin": "workspace:*",
"vite": "^7.0.5",
"vite": "^7.0.6",
"@vitejs/plugin-react": "^4.7.0",
"typescript": "^5",
"@types/node": "^24",
Expand Down
8 changes: 4 additions & 4 deletions benchmark/next-chakra-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"lint": "next lint"
},
"dependencies": {
"@chakra-ui/react": "^3.22.0",
"@chakra-ui/react": "^3.23.0",
"@emotion/react": "^11.14.0",
"next": "^15.4.2",
"next": "^15.4.4",
"next-themes": "^0.4.6",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-icons": "^5.5.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/next-devup-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"lint": "eslint"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"next": "^15.4.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"next": "^15.4.4",
"@devup-ui/react": "workspace:*"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/next-kuma-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"lint": "next lint"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"next": "^15.4.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"next": "^15.4.4",
"@kuma-ui/core": "^1.5.9"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/next-mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/material": "7.2.0",
"next": "^15.4.2",
"next": "^15.4.4",
"next-themes": "^0.4.6",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-icons": "^5.5.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion bindings/devup-ui-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ serde-wasm-bindgen = "0.6.5"
wasm-bindgen-test = "0.3.50"
serial_test = "3.2.0"
insta = "1.43.1"
rstest = "0.25.0"
rstest = "0.26.1"
2 changes: 1 addition & 1 deletion libs/css/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ serde = { version = "1.0.219", features = ["derive"] }
regex = "1.11.1"

[dev-dependencies]
rstest = "0.25.0"
rstest = "0.26.1"
7 changes: 4 additions & 3 deletions libs/css/src/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,15 @@ pub(super) static INNER_TRIM_RE: Lazy<Regex> =
Lazy::new(|| Regex::new(r"\(\s*([^)]*?)\s*\)").unwrap());

pub(super) static RM_MINUS_ZERO_RE: Lazy<Regex> = Lazy::new(|| {
Regex::new(r"-0(px|em|rem|vh|vw|%|dvh|dvw|vmax|vmin|mm|cm|in|pt|pc|lh|ic|\)|,)").unwrap()
Regex::new(r"-0(px|em|rem|vh|vw|%|dvh|dvw|vmax|vmin|mm|cm|in|pt|pc|lh|ic|deg|\)|,)").unwrap()
});

pub(super) static NUM_TRIM_RE: Lazy<Regex> = Lazy::new(|| {
Regex::new(r"(\d(px|em|rem|vh|vw|%|dvh|dvw|vmax|vmin|mm|cm|in|pt|pc|lh|ic)?)\s+(\d)").unwrap()
Regex::new(r"(\d(px|em|rem|vh|vw|%|dvh|dvw|vmax|vmin|mm|cm|in|pt|pc|lh|ic|deg)?)\s+(\d)")
.unwrap()
});
pub(super) static ZERO_RE: Lazy<Regex> = Lazy::new(|| {
Regex::new(r"(\b|,|\(|^|\s)-?0(px|em|rem|vh|vw|%|dvh|dvw|vmax|vmin|mm|cm|in|pt|pc|lh|ic)")
Regex::new(r"(\b|,|\(|^|\s)-?0(px|em|rem|vh|vw|%|dvh|dvw|vmax|vmin|mm|cm|in|pt|pc|lh|ic|deg)")
.unwrap()
});

Expand Down
11 changes: 11 additions & 0 deletions libs/css/src/optimize_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,17 @@ mod tests {
#[case("max(10px, calc(0", "max(10px,calc(0%))")]
#[case("max(10px, any(0", "max(10px,any(0))")]
#[case("10px, any(0))", "(10px,any(0))")]
#[case("scale(0deg, 0deg)", "scale(0,0)")]
#[case(
"scaleX(0deg) scaleY(0deg) scaleZ(0deg)",
"scaleX(0) scaleY(0) scaleZ(0)"
)]
#[case("scaleX(0deg)", "scaleX(0)")]
#[case("scaleY(0deg)", "scaleY(0)")]
#[case("scaleZ(0deg)", "scaleZ(0)")]
#[case("translate(0px) scale(0deg)", "translate(0) scale(0)")]
#[case("translate(-0px) scale(-0deg)", "translate(0) scale(0)")]
#[case("translate(-10px) scale(-10deg)", "translate(-10px) scale(-10deg)")]
fn test_optimize_value(#[case] input: &str, #[case] expected: &str) {
assert_eq!(optimize_value(input), expected);
}
Expand Down
Loading