Skip to content

Commit 39895fc

Browse files
committed
Add option seq
1 parent 460bdea commit 39895fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1460
-1015
lines changed

.changeset/calm-comics-grin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/wasm": patch
3+
---
4+
5+
Optimize many func and props

.changeset/sweet-badgers-play.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/react": patch
3+
---
4+
5+
Implement Dynamic props by csstype

.df/devup-ui.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

Cargo.lock

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/css/src/constant.rs

Lines changed: 57 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ pub(super) static GLOBAL_STYLE_PROPERTY: phf::Map<&str, &[&str]> = phf_map! {
3232
"bgPosition" => &["background-position"],
3333
"bgPositionX" => &["background-position-x"],
3434
"bgPositionY" => &["background-position-y"],
35+
"bgPos" => &["background-position"],
36+
"bgPosX" => &["background-position-x"],
37+
"bgPosY" => &["background-position-y"],
3538
"bgRepeat" => &["background-repeat"],
3639
"bgSize" => &["background-size"],
40+
"bgBlendMode" => &["background-blend-mode"],
3741
"animationDir" => &["animation-direction"],
3842
"flexDir" => &["flex-direction"],
3943
"pos" => &["position"],
@@ -62,29 +66,56 @@ pub(super) static GLOBAL_STYLE_PROPERTY: phf::Map<&str, &[&str]> = phf_map! {
6266
"borderTopRadius" => &["border-top-left-radius", "border-top-right-radius"],
6367
"borderLeftRadius" => &["border-top-left-radius", "border-bottom-left-radius"],
6468
"borderRightRadius" => &["border-top-right-radius", "border-bottom-right-radius"],
69+
"objectPos" => &["object-position"],
70+
"offsetPos" => &["offset-position"],
6571
};
6672

6773
pub(super) static DOUBLE_SEPARATOR: phf::Set<&str> = phf_set! {
68-
"placeholder",
69-
"before",
70-
"after",
71-
"highlight",
72-
"view-transition",
73-
"view-transition-group",
74-
"view-transition-image-pair",
75-
"view-transition-new",
76-
"view-transition-old",
74+
"after",
75+
"backdrop",
76+
"before",
77+
"checkmark",
78+
"cue",
79+
"cue-region",
80+
"details-content",
81+
"file-selector-button",
82+
"first-letter",
83+
"first-line",
84+
"grammar-error",
85+
"marker",
86+
"picker-icon",
87+
"placeholder",
88+
"scroll-marker",
89+
"scroll-marker-group",
90+
"selection",
91+
"spelling-error",
92+
"target-text",
93+
"view-transition"
7794
};
7895

7996
pub(super) static ZERO_PERCENT_FUNCTION: phf::Set<&str> = phf_set! {
80-
"min(",
81-
"max(",
82-
"clamp(",
97+
"abs(",
98+
"acos(",
99+
"asin(",
100+
"atan(",
101+
"atan2(",
83102
"calc(",
84-
"MIN(",
85-
"MAX(",
86-
"CLAMP(",
87-
"CALC(",
103+
"calc-size(",
104+
"clamp(",
105+
"cos(",
106+
"exp(",
107+
"hypot(",
108+
"log(",
109+
"max(",
110+
"min(",
111+
"mod(",
112+
"pow(",
113+
"rem(",
114+
"round(",
115+
"sign(",
116+
"sin(",
117+
"sqrt(",
118+
"tan(",
88119
};
89120

90121
pub(super) static F_SPACE_RE: Lazy<Regex> = Lazy::new(|| Regex::new(r"\s*,\s*").unwrap());
@@ -96,13 +127,17 @@ pub(super) static COLOR_HASH: Lazy<Regex> = Lazy::new(|| Regex::new(r"#([0-9a-zA
96127
pub(super) static INNER_TRIM_RE: Lazy<Regex> =
97128
Lazy::new(|| Regex::new(r"\(\s*([^)]*?)\s*\)").unwrap());
98129

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

102-
pub(super) static NUM_TRIM_RE: Lazy<Regex> =
103-
Lazy::new(|| Regex::new(r"(\d(px|em|rem|vh|vw|%|dvh|dvw)?)\s+(\d)").unwrap());
104-
pub(super) static ZERO_RE: Lazy<Regex> =
105-
Lazy::new(|| Regex::new(r"(\b|,|\(|^|\s)-?0(px|em|rem|vh|vw|%|dvh|dvw)").unwrap());
134+
pub(super) static NUM_TRIM_RE: Lazy<Regex> = Lazy::new(|| {
135+
Regex::new(r"(\d(px|em|rem|vh|vw|%|dvh|dvw|vmax|vmin|mm|cm|in|pt|pc|lh|ic)?)\s+(\d)").unwrap()
136+
});
137+
pub(super) static ZERO_RE: Lazy<Regex> = Lazy::new(|| {
138+
Regex::new(r"(\b|,|\(|^|\s)-?0(px|em|rem|vh|vw|%|dvh|dvw|vmax|vmin|mm|cm|in|pt|pc|lh|ic)")
139+
.unwrap()
140+
});
106141

107142
pub(super) static F_RGBA_RE: Lazy<Regex> =
108143
Lazy::new(|| Regex::new(r"rgba\((\d+),(\d+),(\d+),(\d*\.?\d*)\)").unwrap());

0 commit comments

Comments
 (0)