Skip to content

Commit 23d6981

Browse files
committed
Update Snapshot
1 parent 9b83a64 commit 23d6981

20 files changed

Lines changed: 1959 additions & 0 deletions

libs/extractor/src/lib.rs

Lines changed: 547 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
source: libs/extractor/src/lib.rs
3+
expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { css } from \"@devup-ui/core\";\n<div className={css({\n selectors: {\n \"&:hover\": condition ? { color: \"blue\" } : { color: \"red\" }\n }\n})} />;\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_dir:\n \"@devup-ui/core\".to_string(), single_css: true, import_main_css: false\n}).unwrap())"
4+
---
5+
ToBTreeSet {
6+
styles: {
7+
Static(
8+
ExtractStaticStyle {
9+
property: "color",
10+
value: "blue",
11+
level: 0,
12+
selector: Some(
13+
Selector(
14+
"&:hover",
15+
),
16+
),
17+
style_order: None,
18+
layer: None,
19+
},
20+
),
21+
Static(
22+
ExtractStaticStyle {
23+
property: "color",
24+
value: "red",
25+
level: 0,
26+
selector: Some(
27+
Selector(
28+
"&:hover",
29+
),
30+
),
31+
style_order: None,
32+
layer: None,
33+
},
34+
),
35+
},
36+
code: "import \"@devup-ui/core/devup-ui.css\";\n<div className={condition ? \"a\" : \"b\"} />;\n",
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
source: libs/extractor/src/lib.rs
3+
expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { css } from \"@devup-ui/core\";\n<div className={css({\n _hover: condition ? { bg: \"blue\" } : { bg: \"red\" }\n})} />;\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_dir:\n \"@devup-ui/core\".to_string(), single_css: true, import_main_css: false\n}).unwrap())"
4+
---
5+
ToBTreeSet {
6+
styles: {
7+
Static(
8+
ExtractStaticStyle {
9+
property: "background",
10+
value: "blue",
11+
level: 0,
12+
selector: Some(
13+
Selector(
14+
"&:hover",
15+
),
16+
),
17+
style_order: None,
18+
layer: None,
19+
},
20+
),
21+
Static(
22+
ExtractStaticStyle {
23+
property: "background",
24+
value: "red",
25+
level: 0,
26+
selector: Some(
27+
Selector(
28+
"&:hover",
29+
),
30+
),
31+
style_order: None,
32+
layer: None,
33+
},
34+
),
35+
},
36+
code: "import \"@devup-ui/core/devup-ui.css\";\n<div className={condition ? \"a\" : \"b\"} />;\n",
37+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
source: libs/extractor/src/lib.rs
3+
expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { globalCss } from '@devup-ui/core'\nglobalCss({\n fontFaces: [\n {\n fontFamily: \"MultiFont\",\n src: \"url('/fonts/multi.woff2')\",\n fontWeight: \"bold\",\n fontDisplay: \"swap\"\n },\n {\n fontFamily: \"AnotherFont\",\n src: \"local('Arial')\"\n }\n ]\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_dir:\n \"@devup-ui/core\".to_string(), single_css: true, import_main_css: false\n}).unwrap())"
4+
---
5+
ToBTreeSet {
6+
styles: {
7+
FontFace(
8+
ExtractFontFace {
9+
file: "test.tsx",
10+
properties: {
11+
"font-display": "swap",
12+
"font-family": "MultiFont",
13+
"font-weight": "bold",
14+
"src": "url('/fonts/multi.woff2')",
15+
},
16+
},
17+
),
18+
FontFace(
19+
ExtractFontFace {
20+
file: "test.tsx",
21+
properties: {
22+
"font-family": "AnotherFont",
23+
"src": "local('Arial')",
24+
},
25+
},
26+
),
27+
},
28+
code: "import \"@devup-ui/core/devup-ui.css\";\n;\n",
29+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
source: libs/extractor/src/lib.rs
3+
expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { globalCss } from '@devup-ui/core'\nglobalCss({\n fontFaces: [\n {\n fontFamily: \"CustomFont\",\n src: \"url('/fonts/custom.woff2')\",\n fontWeight: \"400\",\n fontStyle: \"normal\"\n }\n ]\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_dir:\n \"@devup-ui/core\".to_string(), single_css: true, import_main_css: false\n}).unwrap())"
4+
---
5+
ToBTreeSet {
6+
styles: {
7+
FontFace(
8+
ExtractFontFace {
9+
file: "test.tsx",
10+
properties: {
11+
"font-family": "CustomFont",
12+
"font-style": "normal",
13+
"font-weight": "400",
14+
"src": "url('/fonts/custom.woff2')",
15+
},
16+
},
17+
),
18+
},
19+
code: "import \"@devup-ui/core/devup-ui.css\";\n;\n",
20+
}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
source: libs/extractor/src/lib.rs
3+
expression: "ToBTreeSet::from(extract(\"all-combined.css.ts\",\nr#\"import { style, globalStyle, keyframes, createVar, createContainer, layer, fontFace, createGlobalTheme, styleVariants } from '@devup-ui/react'\nexport const myVar = createVar()\nexport const myContainer = createContainer()\nexport const myLayer = layer('components')\nexport const myFont = fontFace({ src: 'local(Arial)' })\nexport const vars = createGlobalTheme(':root', { color: { primary: 'blue' } })\nexport const fade = keyframes({ from: { opacity: 0 }, to: { opacity: 1 } })\nglobalStyle('body', { margin: 0 })\nconst base = style({ padding: 8 })\nexport const buttons = styleVariants({\n primary: [base, { bg: 'blue' }],\n secondary: { bg: 'gray' }\n})\nexport const box = style({ fontFamily: myFont })\n\"#,\nExtractOption\n{\n package: \"@devup-ui/react\".to_string(), css_dir:\n \"@devup-ui/react\".to_string(), single_css: true, import_main_css: false\n}).unwrap())"
4+
---
5+
ToBTreeSet {
6+
styles: {
7+
Static(
8+
ExtractStaticStyle {
9+
property: "--color-primary-global_theme_0-0",
10+
value: "blue",
11+
level: 0,
12+
selector: Some(
13+
Global(
14+
":root",
15+
"all-combined.css.ts",
16+
),
17+
),
18+
style_order: Some(
19+
0,
20+
),
21+
layer: None,
22+
},
23+
),
24+
Static(
25+
ExtractStaticStyle {
26+
property: "background",
27+
value: "blue",
28+
level: 0,
29+
selector: None,
30+
style_order: None,
31+
layer: None,
32+
},
33+
),
34+
Static(
35+
ExtractStaticStyle {
36+
property: "background",
37+
value: "gray",
38+
level: 0,
39+
selector: None,
40+
style_order: None,
41+
layer: None,
42+
},
43+
),
44+
Static(
45+
ExtractStaticStyle {
46+
property: "font-family",
47+
value: "__devup_font_0_0",
48+
level: 0,
49+
selector: None,
50+
style_order: None,
51+
layer: None,
52+
},
53+
),
54+
Static(
55+
ExtractStaticStyle {
56+
property: "margin",
57+
value: "0",
58+
level: 0,
59+
selector: Some(
60+
Global(
61+
"body",
62+
"all-combined.css.ts",
63+
),
64+
),
65+
style_order: Some(
66+
0,
67+
),
68+
layer: None,
69+
},
70+
),
71+
Static(
72+
ExtractStaticStyle {
73+
property: "padding",
74+
value: "32px",
75+
level: 0,
76+
selector: None,
77+
style_order: None,
78+
layer: None,
79+
},
80+
),
81+
FontFace(
82+
ExtractFontFace {
83+
file: "all-combined.css.ts",
84+
properties: {
85+
"font-family": "__devup_font_0_0",
86+
"src": "local(Arial)",
87+
},
88+
},
89+
),
90+
Keyframes(
91+
ExtractKeyframes {
92+
keyframes: {
93+
"from": [
94+
ExtractStaticStyle {
95+
property: "opacity",
96+
value: "0",
97+
level: 0,
98+
selector: None,
99+
style_order: None,
100+
layer: None,
101+
},
102+
],
103+
"to": [
104+
ExtractStaticStyle {
105+
property: "opacity",
106+
value: "1",
107+
level: 0,
108+
selector: None,
109+
style_order: None,
110+
layer: None,
111+
},
112+
],
113+
},
114+
},
115+
),
116+
},
117+
code: "import \"@devup-ui/react/devup-ui.css\";\nconst base = \"a\";\nexport const box = \"b\";\n;\n;\n;\nexport const fade = \"c\";\nexport const buttons = {\n\tprimary: \"a d\",\n\tsecondary: \"e\"\n};\nexport const myLayer = \"--var-0\";\nexport const myVar = \"__devup_font_0_0\";\nexport const myFont = \"__container_0__\";\nexport const vars = \"components\";\nexport const myContainer = { \"color\": { \"primary\": \"var(--color-primary-global_theme_0-0)\" } };\n",
118+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
source: libs/extractor/src/lib.rs
3+
expression: "ToBTreeSet::from(extract(\"fontface-minimal.css.ts\",\nr#\"import { fontFace, style } from '@devup-ui/react'\nexport const minimalFont = fontFace({})\nexport const text = style({ fontFamily: minimalFont })\n\"#,\nExtractOption\n{\n package: \"@devup-ui/react\".to_string(), css_dir:\n \"@devup-ui/react\".to_string(), single_css: true, import_main_css: false\n}).unwrap())"
4+
---
5+
ToBTreeSet {
6+
styles: {
7+
Static(
8+
ExtractStaticStyle {
9+
property: "font-family",
10+
value: "__devup_font_0_0",
11+
level: 0,
12+
selector: None,
13+
style_order: None,
14+
layer: None,
15+
},
16+
),
17+
FontFace(
18+
ExtractFontFace {
19+
file: "fontface-minimal.css.ts",
20+
properties: {
21+
"font-family": "__devup_font_0_0",
22+
},
23+
},
24+
),
25+
},
26+
code: "import \"@devup-ui/react/devup-ui.css\";\nexport const text = \"a\";\n;\nexport const minimalFont = \"__devup_font_0_0\";\n",
27+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
source: libs/extractor/src/lib.rs
3+
expression: "ToBTreeSet::from(extract(\"fontface-remap.css.ts\",\nr#\"import { fontFace, style } from '@devup-ui/react'\nexport const customFont = fontFace({\n src: 'url(\"/fonts/custom.woff2\")',\n fontWeight: '400',\n fontDisplay: 'swap'\n})\nexport const secondFont = fontFace({\n src: 'local(\"Helvetica\")'\n})\nexport const text = style({ fontFamily: customFont })\nexport const heading = style({ fontFamily: secondFont })\n\"#,\nExtractOption\n{\n package: \"@devup-ui/react\".to_string(), css_dir:\n \"@devup-ui/react\".to_string(), single_css: true, import_main_css: false\n}).unwrap())"
4+
---
5+
ToBTreeSet {
6+
styles: {
7+
Static(
8+
ExtractStaticStyle {
9+
property: "font-family",
10+
value: "__devup_font_0_0",
11+
level: 0,
12+
selector: None,
13+
style_order: None,
14+
layer: None,
15+
},
16+
),
17+
Static(
18+
ExtractStaticStyle {
19+
property: "font-family",
20+
value: "__devup_font_0_1",
21+
level: 0,
22+
selector: None,
23+
style_order: None,
24+
layer: None,
25+
},
26+
),
27+
FontFace(
28+
ExtractFontFace {
29+
file: "fontface-remap.css.ts",
30+
properties: {
31+
"font-display": "swap",
32+
"font-family": "__devup_font_0_0",
33+
"font-weight": "400",
34+
"src": "url(\"/fonts/custom.woff2\")",
35+
},
36+
},
37+
),
38+
FontFace(
39+
ExtractFontFace {
40+
file: "fontface-remap.css.ts",
41+
properties: {
42+
"font-family": "__devup_font_0_1",
43+
"src": "local(\"Helvetica\")",
44+
},
45+
},
46+
),
47+
},
48+
code: "import \"@devup-ui/react/devup-ui.css\";\nexport const heading = \"a\";\nexport const text = \"b\";\n;\n;\nexport const customFont = \"__devup_font_0_0\";\nexport const secondFont = \"__devup_font_0_1\";\n",
49+
}

0 commit comments

Comments
 (0)