Skip to content

Commit b318a4a

Browse files
committed
Impl conditional as
1 parent 8ae52ea commit b318a4a

File tree

8 files changed

+65
-131
lines changed

8 files changed

+65
-131
lines changed

Cargo.lock

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

bindings/devup-ui-wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ css = { path = "../../libs/css" }
2727
console_error_panic_hook = { version = "0.1.7", optional = true }
2828
once_cell = "1.21.3"
2929
js-sys = "0.3.78"
30-
serde_json = "1.0.143"
30+
serde_json = "1.0.145"
3131
serde-wasm-bindgen = "0.6.5"
3232
bimap = { version = "0.6.3", features = ["serde"] }
3333

libs/css/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2024"
77
once_cell = "1.21.3"
88
phf = { version = "0.13", features = ["macros"] }
99
serial_test = "3.2.0"
10-
serde = { version = "1.0.219", features = ["derive"] }
10+
serde = { version = "1.0.225", features = ["derive"] }
1111
regex = "1.11.2"
1212
bimap = { version = "0.6.3" }
1313

libs/extractor/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
oxc_parser = "0.87.0"
8-
oxc_syntax = "0.87.0"
9-
oxc_span = "0.87.0"
10-
oxc_allocator = "0.87.0"
11-
oxc_ast = "0.87.0"
12-
oxc_ast_visit = "0.87.0"
13-
oxc_codegen = "0.87.0"
7+
oxc_parser = "0.89.0"
8+
oxc_syntax = "0.89.0"
9+
oxc_span = "0.89.0"
10+
oxc_allocator = "0.89.0"
11+
oxc_ast = "0.89.0"
12+
oxc_ast_visit = "0.89.0"
13+
oxc_codegen = "0.89.0"
1414
css = { path = "../css" }
1515
phf = "0.13"
1616
strum = "0.27.2"

libs/extractor/src/as_visit.rs

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,13 @@
1-
use crate::component::ExportVariableKind;
2-
use crate::css_utils::{css_to_style, keyframes_to_keyframes_style, optimize_css_block};
3-
use crate::extract_style::ExtractStyleProperty;
4-
use crate::extract_style::extract_css::ExtractCss;
5-
use crate::extract_style::extract_keyframes::ExtractKeyframes;
6-
use crate::extractor::KeyframesExtractResult;
7-
use crate::extractor::extract_keyframes_from_expression::extract_keyframes_from_expression;
8-
use crate::extractor::{
9-
ExtractResult, GlobalExtractResult,
10-
extract_global_style_from_expression::extract_global_style_from_expression,
11-
extract_style_from_expression::extract_style_from_expression,
12-
extract_style_from_jsx::extract_style_from_jsx,
13-
};
14-
use crate::gen_class_name::gen_class_names;
15-
use crate::prop_modify_utils::{modify_prop_object, modify_props};
16-
use crate::util_type::UtilType;
171
use crate::utils::get_string_by_literal_expression;
18-
use crate::{ExtractStyleProp, ExtractStyleValue};
19-
use css::disassemble_property;
20-
use css::is_special_property::is_special_property;
212
use oxc_allocator::{Allocator, CloneIn};
22-
use oxc_ast::ast::ImportDeclarationSpecifier::{self, ImportSpecifier};
23-
use oxc_ast::ast::JSXAttributeItem::Attribute;
24-
use oxc_ast::ast::JSXAttributeName::Identifier;
253
use oxc_ast::ast::{
26-
Argument, BindingPatternKind, CallExpression, Expression, ImportDeclaration,
27-
ImportOrExportKind, JSXAttributeValue, JSXElement, Program, PropertyKey, Statement,
28-
VariableDeclarator, WithClause,
4+
Expression, JSXElement,
295
};
306
use oxc_ast_visit::VisitMut;
31-
use oxc_ast_visit::walk_mut::{
32-
walk_call_expression, walk_expression, walk_expression_statement, walk_import_declaration,
33-
walk_jsx_element, walk_object_property, walk_program, walk_string_literal,
34-
walk_variable_declarator, walk_variable_declarators,
35-
};
36-
use strum::IntoEnumIterator;
7+
use oxc_ast_visit::walk_mut::walk_expression;
378

389
use oxc_ast::AstBuilder;
3910
use oxc_span::SPAN;
40-
use std::collections::{HashMap, HashSet};
4111

4212
pub struct AsVisitor<'a> {
4313
ast: AstBuilder<'a>,

libs/extractor/src/prop_modify_utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use crate::gen_class_name::gen_class_names;
33
use crate::gen_style::gen_styles;
44
use oxc_allocator::CloneIn;
55
use oxc_ast::AstBuilder;
6-
use oxc_ast::ast::JSXAttributeItem::Attribute;
76
use oxc_ast::ast::JSXAttributeName::Identifier;
87
use oxc_ast::ast::{
98
Expression, JSXAttributeItem, JSXAttributeValue, LogicalOperator, ObjectPropertyKind,

0 commit comments

Comments
 (0)