diff --git a/.changeset/tiny-rocks-hunt.md b/.changeset/tiny-rocks-hunt.md new file mode 100644 index 00000000..d19bfefd --- /dev/null +++ b/.changeset/tiny-rocks-hunt.md @@ -0,0 +1,19 @@ +--- +"@devup-ui/rsbuild-plugin": patch +"@devup-ui/webpack-plugin": patch +"@devup-ui/wasm": patch +"@devup-ui/next-plugin": patch +"@devup-ui/vite-plugin": patch +--- + +Optimized typography CSS values + +Merged base component CSS to avoid duplicate generation + +Introduced @layer to ensure style order consistency in CSS split mode + +Downgraded nm base to avoid issues with g-ad class (display: none when AdBlock is enabled) + +Fixed global CSS logic issue in CSS split mode + + diff --git a/.changeset/tiny-rocks-hunt2.md b/.changeset/tiny-rocks-hunt2.md new file mode 100644 index 00000000..b81b3eb7 --- /dev/null +++ b/.changeset/tiny-rocks-hunt2.md @@ -0,0 +1,9 @@ +--- +"@devup-ui/vite-plugin": patch +--- + +Fixed duplicate main.css generation in CSS split mode on vite + + + + diff --git a/.changeset/tiny-rocks-hunt3.md b/.changeset/tiny-rocks-hunt3.md new file mode 100644 index 00000000..f345b438 --- /dev/null +++ b/.changeset/tiny-rocks-hunt3.md @@ -0,0 +1,11 @@ +--- +"@devup-ui/webpack-plugin": patch +--- + +Fixed default theme issue in Webpack + + + + + + diff --git a/Cargo.lock b/Cargo.lock index 87f4ef92..b9ddd544 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -658,9 +658,9 @@ dependencies = [ [[package]] name = "oxc_allocator" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dad79355dfb8a36a772d2aa758e429ae02f533d33c314f538d20ef188db0147" +checksum = "9bdf7abfb88ad84430ccaf674d3fa463af5dceb0fd21ddaae83e7d2057668ce3" dependencies = [ "allocator-api2", "bumpalo", @@ -671,9 +671,9 @@ dependencies = [ [[package]] name = "oxc_ast" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9987f0e42aef7eb2deccec8dec26b17c658c8616bb7260a53037b765db708f0" +checksum = "cd6a0d0ba1b1115575d35bfcd64f1458fe5db70fd988c08b742da223be2ea65f" dependencies = [ "bitflags", "oxc_allocator", @@ -687,9 +687,9 @@ dependencies = [ [[package]] name = "oxc_ast_macros" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08b4b00b34d96543ca44ce82e2e48098197b651b639ff211df48d1725215db08" +checksum = "55f299cae11166ffa2fe60a87df1de417f2ac05f21b7dffba173a004f667f321" dependencies = [ "phf", "proc-macro2", @@ -699,9 +699,9 @@ dependencies = [ [[package]] name = "oxc_ast_visit" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522d1393ad48548702a8ff9b747100e9c0959dbd37cd677e12d9ffb5eb7f6490" +checksum = "5b27334d066366a5d1289f0de12725be057ff1ac90e5b8fe6589d94d14c8a1fa" dependencies = [ "oxc_allocator", "oxc_ast", @@ -711,9 +711,9 @@ dependencies = [ [[package]] name = "oxc_cfg" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bdf2665550303cfdc9843e4a7f6d88f3216075f42e38b2c2cc0224bf0ba1632" +checksum = "9b807d606f5fe3ccf7ea64d2d857b755b6d31e8120c9de73591dd5851e6fe59a" dependencies = [ "bitflags", "itertools 0.14.0", @@ -726,9 +726,9 @@ dependencies = [ [[package]] name = "oxc_codegen" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b3d96db8e9f1677d56a959873f971285bf565276c11d61e7b61affee15790" +checksum = "2bca273354501a56cad5f7705cf857ace9d3a1a0c767503df323e0b5be30dffa" dependencies = [ "bitflags", "cow-utils", @@ -748,15 +748,15 @@ dependencies = [ [[package]] name = "oxc_data_structures" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d124d0e1498479cd9410b494fe12d4018a1db55400508c0f8d9d0817934dc6" +checksum = "39656fa64b09714c36416d954897e8fb0f42c462c3082fda22c8760282f55a15" [[package]] name = "oxc_diagnostics" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0befbac8654a5a1cef8ee9b31ff6cf669c9abde763f30fb12c2c284993c86498" +checksum = "da029cea375d098fc97993afe96413563a55ebc80ff704b831e1dddea2e78911" dependencies = [ "cow-utils", "oxc-miette", @@ -765,9 +765,9 @@ dependencies = [ [[package]] name = "oxc_ecmascript" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c59f9f0cfb236ae7b1e8f1be956f3585078256d8a4f8881cbe3b02edd7c57b1" +checksum = "b868985647967b7b173c9681a6486691cf9c5d0fb4e64d114e65cc8a8978657a" dependencies = [ "cow-utils", "num-bigint", @@ -780,9 +780,9 @@ dependencies = [ [[package]] name = "oxc_estree" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70bffad4cb83abd3db5310ccdb5f298b19377244d43eda7ec3912b544452bcb2" +checksum = "3c20498f0f4b7afec0a8b772174bf7736d79ff31a8e0073dd9081747801407c5" [[package]] name = "oxc_index" @@ -792,9 +792,9 @@ checksum = "2fa07b0cfa997730afed43705766ef27792873fdf5215b1391949fec678d2392" [[package]] name = "oxc_parser" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a651f61f532b9c5485c65786363b42c3a711ba60871746740409f381b49bea" +checksum = "df72e23adc7a481f60a1410fafc3833a5411c077271e2a5bb97083c93b274683" dependencies = [ "bitflags", "cow-utils", @@ -815,9 +815,9 @@ dependencies = [ [[package]] name = "oxc_regular_expression" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b97261c926b800200a07309eefc7b5801432ed3a91b76b5ea9780f97fc961d4" +checksum = "97247d67a14e17dcb004ca57e59283b235e1a84813a2048e0585ca901a64eb99" dependencies = [ "bitflags", "oxc_allocator", @@ -831,9 +831,9 @@ dependencies = [ [[package]] name = "oxc_semantic" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b594d9a93b359ba5421118c0cc2664795138e171ffb60c345e621fc8ea4cf4dd" +checksum = "b81b3fd1c502c5179740c1688a4062f4db35cf4107da311786c2005809f542b5" dependencies = [ "itertools 0.14.0", "oxc_allocator", @@ -867,9 +867,9 @@ dependencies = [ [[package]] name = "oxc_span" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1948fe931738f956b2c673804bce7f93b3dc8fcb4575485ef65adc15fcae3d92" +checksum = "6b70dfb43ba1c04ae09ba4c0e85dbb7af2260ff029458fe45a7f4e7d0384442c" dependencies = [ "compact_str", "oxc-miette", @@ -880,9 +880,9 @@ dependencies = [ [[package]] name = "oxc_syntax" -version = "0.83.0" +version = "0.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad28a43d5b4ccf4f286b68f377d364790c098128729b44a52421cf9de2ce3ec0" +checksum = "5478a4c0b503ac61c09e5450a607517ad7f8dba36b7bea53db17d4b7221ef7df" dependencies = [ "bitflags", "cow-utils", diff --git a/README.md b/README.md index 07f6a914..ff8cfbe4 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,12 @@ npm install @devup-ui/next-plugin # on vite npm install @devup-ui/vite-plugin + +# on rsbuild +npm install @devup-ui/rsbuild-plugin + +# on webpack +npm install @devup-ui/webpack-plugin ``` ## Features diff --git a/apps/landing/package.json b/apps/landing/package.json index dbdd0c7a..f2c030b5 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -7,15 +7,15 @@ "dev": "node ./script.js && next dev", "search": "node ./script.js", "build": "node ./script.js && next build", - "start": "node ./script.js && next start", + "start": "npx serve ./out", "lint": "eslint" }, "dependencies": { "@devup-ui/components": "workspace:*", "@devup-ui/react": "workspace:*", "@devup-ui/reset-css": "workspace:*", - "@mdx-js/loader": "^3.1.0", - "@mdx-js/react": "^3.1.0", + "@mdx-js/loader": "^3.1.1", + "@mdx-js/react": "^3.1.1", "@next/mdx": "^15.5.2", "@types/mdx": "^2.0.13", "body-scroll-lock": "3.1.5", diff --git a/apps/next/package.json b/apps/next/package.json index bb6490a7..b93bbc17 100644 --- a/apps/next/package.json +++ b/apps/next/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "start": "next start", + "start": "npx serve ./out", "lint": "next lint" }, "dependencies": { diff --git a/apps/rsbuild/package.json b/apps/rsbuild/package.json index 372902aa..e777c13f 100644 --- a/apps/rsbuild/package.json +++ b/apps/rsbuild/package.json @@ -7,6 +7,7 @@ "build": "rsbuild build", "dev": "rsbuild dev --open", "preview": "rsbuild preview", + "start": "npx serve ./dist", "lint": "tsc && eslint" }, "dependencies": { @@ -15,7 +16,7 @@ "@devup-ui/react": "workspace:*" }, "devDependencies": { - "@rsbuild/core": "^1.5.1", + "@rsbuild/core": "^1.5.3", "@rsbuild/plugin-react": "^1.4.0", "@devup-ui/rsbuild-plugin": "workspace:*" } diff --git a/apps/rsbuild/src/App.jsx b/apps/rsbuild/src/App.jsx index 722f2acb..ca246e87 100644 --- a/apps/rsbuild/src/App.jsx +++ b/apps/rsbuild/src/App.jsx @@ -1,4 +1,4 @@ -import { Box } from '@devup-ui/react'; +import { Box, Flex, Text } from '@devup-ui/react'; const App = () => { return ( @@ -6,6 +6,11 @@ const App = () => { Rsbuild support + + a + b + typo + ); }; diff --git a/apps/vite-lib/package.json b/apps/vite-lib/package.json index 04ba5b10..ed587305 100644 --- a/apps/vite-lib/package.json +++ b/apps/vite-lib/package.json @@ -19,7 +19,7 @@ "vite-plugin-dts": "^4.5.4", "@devup-ui/vite-plugin": "workspace:*", "@vitejs/plugin-react": "^5.0.2", - "vite": "^7.1.3", + "vite": "^7.1.4", "typescript": "^5", "@types/node": "^24", "@types/react": "^19" diff --git a/apps/vite/package.json b/apps/vite/package.json index 1a0829da..32be17ed 100644 --- a/apps/vite/package.json +++ b/apps/vite/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "vite dev", "build": "vite build", - "start": "vite start", + "start": "npx serve ./dist", "lint": "tsc && eslint" }, "dependencies": { @@ -17,11 +17,11 @@ }, "devDependencies": { "@devup-ui/vite-plugin": "workspace:*", - "vite": "^7.1.3", + "vite": "^7.1.4", "@vitejs/plugin-react": "^5.0.2", "typescript": "^5", "@types/node": "^24", "@types/react": "^19", "@types/react-dom": "^19" } -} +} \ No newline at end of file diff --git a/benchmark/next-mui/package.json b/benchmark/next-mui/package.json index 8d0ea7bb..2deaa5db 100644 --- a/benchmark/next-mui/package.json +++ b/benchmark/next-mui/package.json @@ -12,7 +12,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@mui/material": "7.3.1", + "@mui/material": "7.3.2", "next": "^15.5.2", "next-themes": "^0.4.6", "react": "^19.1.1", diff --git a/bindings/devup-ui-wasm/src/lib.rs b/bindings/devup-ui-wasm/src/lib.rs index 1e81040d..b6176a0f 100644 --- a/bindings/devup-ui-wasm/src/lib.rs +++ b/bindings/devup-ui-wasm/src/lib.rs @@ -1,8 +1,6 @@ use css::class_map::{get_class_map, set_class_map}; use css::file_map::{get_file_map, get_filename_by_file_num, set_file_map}; -use extractor::extract_style::ExtractStyleProperty; use extractor::extract_style::extract_style_value::ExtractStyleValue; -use extractor::extract_style::style_property::StyleProperty; use extractor::{ExtractOption, extract}; use once_cell::sync::Lazy; use sheet::StyleSheet; @@ -16,12 +14,10 @@ static GLOBAL_STYLE_SHEET: Lazy> = #[wasm_bindgen] pub struct Output { code: String, - styles: HashSet, map: Option, - default_collected: bool, - single_css: bool, - filename: String, - css_file: String, + css_file: Option, + updated_base_style: bool, + css: Option, } #[wasm_bindgen] extern "C" { @@ -37,150 +33,61 @@ extern "C" { #[wasm_bindgen] impl Output { + fn new( + code: String, + styles: HashSet, + map: Option, + single_css: bool, + filename: String, + css_file: Option, + import_main_css: bool, + ) -> Self { + let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); + let default_collected = sheet.rm_global_css(&filename); + let (collected, updated_base_style) = sheet.update_styles(&styles, &filename, single_css); + Self { + code, + map, + css_file, + updated_base_style, + css: { + if !collected && !default_collected { + None + } else { + Some(sheet.create_css( + if !single_css { Some(&filename) } else { None }, + import_main_css, + )) + } + }, + } + } + /// Get the code - #[wasm_bindgen(getter)] + #[wasm_bindgen(getter, js_name = "code")] pub fn code(&self) -> String { self.code.clone() } - #[wasm_bindgen(getter)] - pub fn css_file(&self) -> String { + #[wasm_bindgen(getter, js_name = "cssFile")] + pub fn css_file(&self) -> Option { self.css_file.clone() } - #[wasm_bindgen(getter)] + #[wasm_bindgen(getter, js_name = "map")] pub fn map(&self) -> Option { self.map.clone() } + #[wasm_bindgen(getter, js_name = "updatedBaseStyle")] + pub fn updated_base_style(&self) -> bool { + self.updated_base_style + } + /// Get the css - #[wasm_bindgen(getter)] + #[wasm_bindgen(getter, js_name = "css")] pub fn css(&self) -> Option { - let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); - let mut collected = false; - for style in self.styles.iter() { - match style { - ExtractStyleValue::Static(st) => { - let (cls, _) = match style.extract(if !self.single_css { - Some(self.filename.as_str()) - } else { - None - }) { - Some(StyleProperty::ClassName(cls)) => (cls, None), - Some(StyleProperty::Variable { - class_name, - variable_name, - .. - }) => (class_name, Some(variable_name)), - None => continue, - }; - if sheet.add_property( - &cls, - st.property(), - st.level(), - st.value(), - st.selector(), - st.style_order(), - if !self.single_css { - Some(self.filename.as_str()) - } else { - None - }, - ) { - collected = true; - } - } - ExtractStyleValue::Dynamic(dy) => { - let (cls, variable) = match style.extract(if !self.single_css { - Some(self.filename.as_str()) - } else { - None - }) { - Some(StyleProperty::ClassName(cls)) => (cls, None), - Some(StyleProperty::Variable { - class_name, - variable_name, - .. - }) => (class_name, Some(variable_name)), - None => continue, - }; - if sheet.add_property( - &cls, - dy.property(), - dy.level(), - &format!("var({})", variable.unwrap()), - dy.selector(), - dy.style_order(), - if !self.single_css { - Some(self.filename.as_str()) - } else { - None - }, - ) { - collected = true; - } - } - - ExtractStyleValue::Keyframes(keyframes) => { - if sheet.add_keyframes( - &keyframes - .extract(if !self.single_css { - Some(self.filename.as_str()) - } else { - None - }) - .to_string(), - keyframes - .keyframes - .iter() - .map(|(key, value)| { - ( - key.clone(), - value - .iter() - .map(|style| { - ( - style.property().to_string(), - style.value().to_string(), - ) - }) - .collect::>(), - ) - }) - .collect(), - if !self.single_css { - Some(self.filename.as_str()) - } else { - None - }, - ) { - collected = true; - } - } - ExtractStyleValue::Css(cs) => { - if sheet.add_css(&cs.file, &cs.css) { - collected = true; - } - } - ExtractStyleValue::Typography(_) => {} - ExtractStyleValue::Import(st) => { - sheet.add_import(&st.file, &st.url); - } - ExtractStyleValue::FontFace(font) => { - sheet.add_font_face(&font.file, &font.properties); - } - } - } - - if !collected && !self.default_collected { - return None; - } - - Some(sheet.create_css(if !self.single_css { - Some(&self.filename) - } else { - None - })) + self.css.clone() } } @@ -242,9 +149,9 @@ pub fn code_extract( package: &str, css_dir: String, single_css: bool, + import_main_css_in_code: bool, + import_main_css_in_css: bool, ) -> Result { - let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); - match extract( filename, code, @@ -252,17 +159,18 @@ pub fn code_extract( package: package.to_string(), css_dir, single_css, + import_main_css: import_main_css_in_code, }, ) { - Ok(output) => Ok(Output { - code: output.code, - styles: output.styles, - map: output.map, - default_collected: sheet.rm_global_css(filename), + Ok(output) => Ok(Output::new( + output.code, + output.styles, + output.map, single_css, - filename: filename.to_string(), - css_file: output.css_file, - }), + filename.to_string(), + output.css_file, + import_main_css_in_css, + )), Err(error) => Err(JsValue::from_str(error.to_string().as_str())), } } @@ -283,9 +191,12 @@ pub fn get_default_theme() -> Result, JsValue> { } #[wasm_bindgen(js_name = "getCss")] -pub fn get_css(file_num: Option) -> Result { +pub fn get_css(file_num: Option, import_main_css: bool) -> Result { let sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); - Ok(sheet.create_css(file_num.map(get_filename_by_file_num).as_deref())) + Ok(sheet.create_css( + file_num.map(get_filename_by_file_num).as_deref(), + import_main_css, + )) } #[wasm_bindgen(js_name = "getThemeInterface")] @@ -320,7 +231,7 @@ mod tests { let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); *sheet = StyleSheet::default(); } - assert_eq!(get_css(None).unwrap(), ""); + assert_eq!(get_css(None, false).unwrap(), ""); { let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); @@ -335,7 +246,7 @@ mod tests { sheet.set_theme(theme); } - assert_debug_snapshot!(get_css(None).unwrap()); + assert_debug_snapshot!(get_css(None, false).unwrap()); } #[test] diff --git a/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__code_extract.snap b/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__code_extract.snap index d27a91ae..f3b79c30 100644 --- a/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__code_extract.snap +++ b/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__code_extract.snap @@ -1,5 +1,5 @@ --- source: bindings/devup-ui-wasm/src/lib.rs -expression: get_css().unwrap() +expression: get_css(None).unwrap() --- -":root{color-scheme:light;--primary:light-dark(#FFF,#000)}:root[data-theme=dark]{color-scheme:dark}" +"@layer t;@layer t{:root{color-scheme:light;--primary:light-dark(#FFF,#000)}:root[data-theme=dark]{color-scheme:dark}}" diff --git a/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__deserialize_theme.snap b/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__deserialize_theme.snap index 809c8b88..aeaff582 100644 --- a/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__deserialize_theme.snap +++ b/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__deserialize_theme.snap @@ -2,4 +2,4 @@ source: bindings/devup-ui-wasm/src/lib.rs expression: theme.to_css() --- -":root{color-scheme:light;--primary:light-dark(#000,#FFF)}:root[data-theme=dark]{color-scheme:dark}.typo-default{font-family:Arial;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:0.5em}@media(min-width:480px){.typo-default{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:0.5em}}@media(min-width:768px){.typo-default{font-family:Arial;font-size:24px;line-height:1.5;letter-spacing:0.5em}}" +":root{color-scheme:light;--primary:light-dark(#000,#FFF)}:root[data-theme=dark]{color-scheme:dark}.typo-default{font-family:Arial;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:.5em}@media(min-width:480px){.typo-default{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:.5em}}@media(min-width:768px){.typo-default{font-family:Arial;font-size:24px;line-height:1.5;letter-spacing:.5em}}" diff --git a/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__to_css_from_theme.snap b/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__to_css_from_theme.snap index 54c1c3f9..ac344842 100644 --- a/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__to_css_from_theme.snap +++ b/bindings/devup-ui-wasm/src/snapshots/devup_ui_wasm__tests__to_css_from_theme.snap @@ -2,4 +2,4 @@ source: bindings/devup-ui-wasm/src/lib.rs expression: css --- -":root{color-scheme:light;--primary:light-dark(#000,#FFF)}:root[data-theme=dark]{color-scheme:dark}.typo-default{font-family:Arial;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:0.5}@media(min-width:480px){.typo-default{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:0.5}.typo-default1{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:0.5}}" +":root{color-scheme:light;--primary:light-dark(#000,#FFF)}:root[data-theme=dark]{color-scheme:dark}.typo-default{font-family:Arial;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:.5}@media(min-width:480px){.typo-default{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:.5}.typo-default1{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:.5}}" diff --git a/libs/css/src/constant.rs b/libs/css/src/constant.rs index ba095ff8..585647f2 100644 --- a/libs/css/src/constant.rs +++ b/libs/css/src/constant.rs @@ -163,12 +163,12 @@ pub(super) static F_RGBA_RE: Lazy = pub(super) static F_RGB_RE: Lazy = Lazy::new(|| Regex::new(r"rgb\((\d+),(\d+),(\d+)\)").unwrap()); -pub(super) static N_BASE_ARRAY: [char; 27] = [ +pub(super) static N_BASE_ARRAY: [char; 26] = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', 'x', 'y', 'z', '_', + 't', 'u', 'v', 'w', 'x', 'y', 'z', ]; -pub(super) static M_BASE_ARRAY: [char; 37] = [ +pub(super) static M_BASE_ARRAY: [char; 36] = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ]; diff --git a/libs/css/src/lib.rs b/libs/css/src/lib.rs index c2481f0a..c17cc0a8 100644 --- a/libs/css/src/lib.rs +++ b/libs/css/src/lib.rs @@ -103,6 +103,12 @@ pub fn sheet_to_classname( style_order: Option, filename: Option<&str>, ) -> String { + // base style + let filename = if style_order == Some(0) { + None + } else { + filename + }; if is_debug() { let selector = selector.unwrap_or_default().trim(); format!( @@ -149,7 +155,8 @@ pub fn sheet_to_classname( }); if !filename.is_empty() { format!( - "{}-{}", + // avoid g-ad class (google ad) + "{}_{}", num_to_nm_base(get_file_num_by_filename(&filename)), clas_num ) diff --git a/libs/css/src/num_to_nm_base.rs b/libs/css/src/num_to_nm_base.rs index d8fdc525..c0be4248 100644 --- a/libs/css/src/num_to_nm_base.rs +++ b/libs/css/src/num_to_nm_base.rs @@ -59,74 +59,72 @@ mod tests { #[case(23, "x")] #[case(24, "y")] #[case(25, "z")] - #[case(26, "_")] - #[case(27, "aa")] - #[case(28, "ab")] - #[case(29, "ac")] - #[case(30, "ad")] - #[case(31, "ae")] - #[case(32, "af")] - #[case(33, "ag")] - #[case(34, "ah")] - #[case(35, "ai")] - #[case(36, "aj")] - #[case(37, "ak")] - #[case(38, "al")] - #[case(39, "am")] - #[case(40, "an")] - #[case(41, "ao")] - #[case(42, "ap")] - #[case(43, "aq")] - #[case(44, "ar")] - #[case(45, "as")] - #[case(46, "at")] - #[case(47, "au")] - #[case(48, "av")] - #[case(49, "aw")] - #[case(50, "ax")] - #[case(51, "ay")] - #[case(52, "az")] - #[case(53, "a0")] - #[case(54, "a1")] - #[case(55, "a2")] - #[case(56, "a3")] - #[case(57, "a4")] - #[case(58, "a5")] - #[case(59, "a6")] - #[case(60, "a7")] - #[case(61, "a8")] - #[case(62, "a9")] - #[case(63, "a_")] - #[case(64, "ba")] - #[case(65, "bb")] - #[case(66, "bc")] - #[case(67, "bd")] - #[case(68, "be")] - #[case(69, "bf")] - #[case(70, "bg")] - #[case(71, "bh")] - #[case(72, "bi")] - #[case(73, "bj")] - #[case(74, "bk")] - #[case(75, "bl")] - #[case(76, "bm")] - #[case(77, "bn")] - #[case(78, "bo")] - #[case(79, "bp")] - #[case(80, "bq")] - #[case(81, "br")] - #[case(82, "bs")] - #[case(83, "bt")] - #[case(84, "bu")] - #[case(85, "bv")] - #[case(86, "bw")] - #[case(87, "bx")] - #[case(88, "by")] - #[case(89, "bz")] - #[case(90, "b0")] - #[case(91, "b1")] - #[case(1025, "__")] - #[case(1026, "aaa")] + #[case(26, "aa")] + #[case(27, "ab")] + #[case(28, "ac")] + #[case(29, "ad")] + #[case(30, "ae")] + #[case(31, "af")] + #[case(32, "ag")] + #[case(33, "ah")] + #[case(34, "ai")] + #[case(35, "aj")] + #[case(36, "ak")] + #[case(37, "al")] + #[case(38, "am")] + #[case(39, "an")] + #[case(40, "ao")] + #[case(41, "ap")] + #[case(42, "aq")] + #[case(43, "ar")] + #[case(44, "as")] + #[case(45, "at")] + #[case(46, "au")] + #[case(47, "av")] + #[case(48, "aw")] + #[case(49, "ax")] + #[case(50, "ay")] + #[case(51, "az")] + #[case(52, "a0")] + #[case(53, "a1")] + #[case(54, "a2")] + #[case(55, "a3")] + #[case(56, "a4")] + #[case(57, "a5")] + #[case(58, "a6")] + #[case(59, "a7")] + #[case(60, "a8")] + #[case(61, "a9")] + #[case(62, "ba")] + #[case(63, "bb")] + #[case(64, "bc")] + #[case(65, "bd")] + #[case(66, "be")] + #[case(67, "bf")] + #[case(68, "bg")] + #[case(69, "bh")] + #[case(70, "bi")] + #[case(71, "bj")] + #[case(72, "bk")] + #[case(73, "bl")] + #[case(74, "bm")] + #[case(75, "bn")] + #[case(76, "bo")] + #[case(77, "bp")] + #[case(78, "bq")] + #[case(79, "br")] + #[case(80, "bs")] + #[case(81, "bt")] + #[case(82, "bu")] + #[case(83, "bv")] + #[case(84, "bw")] + #[case(85, "bx")] + #[case(86, "by")] + #[case(87, "bz")] + #[case(88, "b0")] + #[case(89, "b1")] + #[case(961, "z9")] + #[case(962, "aaa")] fn test_num_to_nm_base_rstest(#[case] input: usize, #[case] expected: &str) { assert_eq!(num_to_nm_base(input), expected); } diff --git a/libs/css/src/optimize_value.rs b/libs/css/src/optimize_value.rs index caa767bc..611045b2 100644 --- a/libs/css/src/optimize_value.rs +++ b/libs/css/src/optimize_value.rs @@ -146,6 +146,8 @@ mod tests { #[rstest] #[case("0px", "0")] + #[case("0.12px", ".12px")] + #[case("-0.12px", "-.12px")] #[case("0.0px", "0")] #[case("0.0em", "0")] #[case("0.0rem", "0")] diff --git a/libs/extractor/Cargo.toml b/libs/extractor/Cargo.toml index 2b20bc78..a356f71d 100644 --- a/libs/extractor/Cargo.toml +++ b/libs/extractor/Cargo.toml @@ -4,13 +4,13 @@ version = "0.1.0" edition = "2024" [dependencies] -oxc_parser = "0.83.0" -oxc_syntax = "0.83.0" -oxc_span = "0.83.0" -oxc_allocator = "0.83.0" -oxc_ast = "0.83.0" -oxc_ast_visit = "0.83.0" -oxc_codegen = "0.83.0" +oxc_parser = "0.86.0" +oxc_syntax = "0.86.0" +oxc_span = "0.86.0" +oxc_allocator = "0.86.0" +oxc_ast = "0.86.0" +oxc_ast_visit = "0.86.0" +oxc_codegen = "0.86.0" css = { path = "../css" } phf = "0.13" strum = "0.27.2" diff --git a/libs/extractor/src/lib.rs b/libs/extractor/src/lib.rs index f9932c50..1aa58228 100644 --- a/libs/extractor/src/lib.rs +++ b/libs/extractor/src/lib.rs @@ -77,13 +77,14 @@ pub struct ExtractOutput { pub code: String, pub map: Option, - pub css_file: String, + pub css_file: Option, } pub struct ExtractOption { pub package: String, pub css_dir: String, pub single_css: bool, + pub import_main_css: bool, } pub fn extract( @@ -91,6 +92,16 @@ pub fn extract( code: &str, option: ExtractOption, ) -> Result> { + if !code.contains(option.package.as_str()) { + // skip if not using package + return Ok(ExtractOutput { + styles: HashSet::new(), + code: code.to_string(), + map: None, + css_file: None, + }); + } + let source_type = SourceType::from_path(filename)?; let css_file = if option.single_css { format!("{}/devup-ui.css", option.css_dir) @@ -101,14 +112,9 @@ pub fn extract( get_file_num_by_filename(filename) ) }; - if !code.contains(option.package.as_str()) { - // skip if not using package - return Ok(ExtractOutput { - styles: HashSet::new(), - code: code.to_string(), - map: None, - css_file, - }); + let mut css_files = vec![css_file.clone()]; + if option.import_main_css { + css_files.insert(0, format!("{}/devup-ui.css", option.css_dir)); } let allocator = Allocator::default(); @@ -124,7 +130,7 @@ pub fn extract( &allocator, filename, &option.package, - &css_file, + css_files, if !option.single_css { Some(filename.to_string()) } else { @@ -143,7 +149,7 @@ pub fn extract( styles: visitor.styles, code: result.code, map: result.map.map(|m| m.to_json_string()), - css_file, + css_file: Some(css_file), }) } @@ -189,7 +195,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false }, ) .unwrap() @@ -203,7 +210,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false }, ) .unwrap() @@ -222,7 +230,7 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true, + single_css: true,import_main_css: false, } ) .unwrap() @@ -238,7 +246,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -258,7 +267,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -274,7 +284,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -288,7 +299,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -304,7 +316,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -318,7 +331,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -382,7 +396,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -397,7 +412,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -412,7 +428,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -428,7 +445,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -444,7 +462,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -460,7 +479,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -482,7 +502,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -505,7 +526,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -527,7 +549,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -547,7 +570,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -563,7 +587,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -579,7 +604,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -595,7 +621,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -610,7 +637,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -632,7 +660,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -648,7 +677,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -668,7 +698,8 @@ mod tests { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -702,7 +733,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -722,7 +754,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -741,7 +774,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -755,7 +789,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -775,7 +810,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -791,7 +827,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -807,7 +844,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -823,7 +861,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -843,7 +882,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -859,7 +899,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -875,7 +916,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -895,7 +937,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -911,7 +954,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -927,7 +971,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -943,7 +988,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -959,7 +1005,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -979,7 +1026,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -999,7 +1047,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1019,7 +1068,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1035,7 +1085,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1055,7 +1106,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1071,7 +1123,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1091,7 +1144,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1107,7 +1161,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1123,7 +1178,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1139,7 +1195,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1155,7 +1212,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1171,7 +1229,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1187,7 +1246,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1203,7 +1263,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1219,7 +1280,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1239,7 +1301,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1255,7 +1318,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1271,7 +1335,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1287,7 +1352,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1303,7 +1369,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1319,7 +1386,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1339,7 +1407,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1355,7 +1424,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1375,7 +1445,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1391,7 +1462,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1407,7 +1479,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1423,7 +1496,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1439,7 +1513,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1455,7 +1530,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1471,7 +1547,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1487,7 +1564,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1507,7 +1585,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1523,7 +1602,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1539,7 +1619,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1555,7 +1636,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1575,7 +1657,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1591,7 +1674,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1607,7 +1691,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1623,7 +1708,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1642,7 +1728,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1658,7 +1745,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1680,7 +1768,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1715,7 +1804,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1735,7 +1825,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1755,7 +1846,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1775,7 +1867,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1795,7 +1888,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1815,7 +1909,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1833,7 +1928,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1858,7 +1954,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1878,7 +1975,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1894,7 +1992,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1910,7 +2009,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1926,7 +2026,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1942,7 +2043,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1958,7 +2060,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1974,7 +2077,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -1996,7 +2100,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2016,7 +2121,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2039,7 +2145,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2061,7 +2168,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2086,7 +2194,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2110,7 +2219,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2133,7 +2243,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2162,7 +2273,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2186,7 +2298,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2212,7 +2325,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2238,7 +2352,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2264,7 +2379,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2290,7 +2406,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2312,7 +2429,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2330,7 +2448,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2346,7 +2465,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2365,7 +2485,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2387,7 +2508,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2407,7 +2529,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2429,7 +2552,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2451,7 +2575,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2469,7 +2594,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2488,7 +2614,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2506,7 +2633,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2527,7 +2655,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2543,7 +2672,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2559,7 +2689,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2575,7 +2706,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2596,7 +2728,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2623,7 +2756,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2639,7 +2773,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2655,7 +2790,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2672,7 +2808,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2688,7 +2825,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2704,7 +2842,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2720,7 +2859,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2746,7 +2886,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2771,7 +2912,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2791,7 +2933,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2811,7 +2954,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2827,7 +2971,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2843,7 +2988,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2863,7 +3009,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2879,7 +3026,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2895,7 +3043,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2914,7 +3063,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2930,7 +3080,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2946,7 +3097,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2967,7 +3119,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -2981,11 +3134,12 @@ import clsx from 'clsx' assert!( extract( "test.wrong", - "const a = 1;", + "@devup-ui/core;const a = 1;", ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false }, ) .unwrap_err() @@ -3001,7 +3155,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false }, ) .unwrap_err() @@ -3022,7 +3177,8 @@ import clsx from 'clsx' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3038,7 +3194,8 @@ useTheme(); ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3077,7 +3234,8 @@ export { ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3112,7 +3270,8 @@ export { ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3129,7 +3288,8 @@ e(o, { className: "a", bg: "red" }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3146,7 +3306,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" } }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3163,7 +3324,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3174,16 +3336,16 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) #[serial] fn support_transpile_cjs() { reset_class_map(); - assert_debug_snapshot!(ToBTreeSet::from(extract("test.cjs", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:"header",children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true }).unwrap())); + assert_debug_snapshot!(ToBTreeSet::from(extract("test.cjs", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:"header",children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true,import_main_css: false }).unwrap())); reset_class_map(); - assert_debug_snapshot!(ToBTreeSet::from(extract("test.cjs", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const {jsx:e1, jsxs:e2}=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e2("div",{children:[e1(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e1(r.Text,{typography:"header",children:"typo"}),e1(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true }).unwrap())); + assert_debug_snapshot!(ToBTreeSet::from(extract("test.cjs", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const {jsx:e1, jsxs:e2}=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e2("div",{children:[e1(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e1(r.Text,{typography:"header",children:"typo"}),e1(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true,import_main_css: false }).unwrap())); reset_class_map(); - assert_debug_snapshot!(ToBTreeSet::from(extract("test.js", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:"header",children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true }).unwrap())); + assert_debug_snapshot!(ToBTreeSet::from(extract("test.js", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:"header",children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true,import_main_css: false }).unwrap())); reset_class_map(); - assert_debug_snapshot!(ToBTreeSet::from(extract("test.js", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:`header`,children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true }).unwrap())); + assert_debug_snapshot!(ToBTreeSet::from(extract("test.js", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:`header`,children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true,import_main_css: false }).unwrap())); } #[test] @@ -3199,7 +3361,7 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true, + single_css: true,import_main_css: false, } ) .unwrap() @@ -3219,7 +3381,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3235,7 +3398,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3251,7 +3415,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3271,7 +3436,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3287,7 +3453,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3303,7 +3470,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3323,7 +3491,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3358,7 +3527,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3378,7 +3548,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3394,7 +3565,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3410,7 +3582,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3426,7 +3599,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3442,7 +3616,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3461,7 +3636,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3477,7 +3653,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3493,7 +3670,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3509,7 +3687,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3525,7 +3704,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3541,7 +3721,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3557,7 +3738,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3577,7 +3759,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3593,7 +3776,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3609,7 +3793,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3625,7 +3810,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3649,7 +3835,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3665,7 +3852,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3685,7 +3873,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3701,7 +3890,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3717,7 +3907,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3733,7 +3924,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3752,7 +3944,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3768,7 +3961,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3784,7 +3978,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3824,7 +4019,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3844,7 +4040,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3860,7 +4057,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3876,7 +4074,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3892,7 +4091,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3912,7 +4112,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3927,7 +4128,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3947,7 +4149,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3963,7 +4166,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -3982,7 +4186,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4002,7 +4207,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4018,7 +4224,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4037,7 +4244,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4053,7 +4261,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4073,7 +4282,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4093,7 +4303,8 @@ export default function Card({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4117,7 +4328,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4137,7 +4349,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4153,7 +4366,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4173,7 +4387,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4193,7 +4408,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4215,7 +4431,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4238,7 +4455,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4257,7 +4475,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4277,7 +4496,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4309,7 +4529,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4329,7 +4550,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4345,7 +4567,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4361,7 +4584,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4377,7 +4601,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4393,7 +4618,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4413,7 +4639,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4433,7 +4660,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4448,7 +4676,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4471,7 +4700,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4495,7 +4725,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4515,7 +4746,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4535,7 +4767,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4559,7 +4792,8 @@ import {Button} from '@devup/ui' ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4595,7 +4829,8 @@ export { ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4611,7 +4846,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4627,7 +4863,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4643,7 +4880,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4666,7 +4904,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4690,7 +4929,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4706,7 +4946,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4733,7 +4974,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4756,7 +4998,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4779,7 +5022,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4801,7 +5045,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4819,7 +5064,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4838,7 +5084,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4856,7 +5103,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4874,7 +5122,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4892,7 +5141,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4910,7 +5160,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4928,7 +5179,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4949,7 +5201,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4965,7 +5218,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -4985,7 +5239,8 @@ export { ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5006,7 +5261,8 @@ e(o, { styleVars: { c: "yellow" } }) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5030,7 +5286,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5050,7 +5307,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5070,7 +5328,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5090,7 +5349,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5110,7 +5370,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5130,7 +5391,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5150,7 +5412,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5166,7 +5429,8 @@ globalCss(...{}) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5182,7 +5446,8 @@ globalCss(...{div: {bg: "red"}}) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5199,7 +5464,8 @@ globalCss(...{div: {bg: "red"}, ...{span: {bg: "blue"}}}) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5223,7 +5489,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5239,7 +5506,8 @@ globalCss() ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5255,7 +5523,8 @@ globalCss(1) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5284,7 +5553,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5317,7 +5587,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5350,7 +5621,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5391,7 +5663,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5415,7 +5688,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5433,7 +5707,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5451,7 +5726,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5470,7 +5746,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5491,7 +5768,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5507,7 +5785,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5523,7 +5802,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5540,7 +5820,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5562,7 +5843,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5580,7 +5862,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5598,7 +5881,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5631,7 +5915,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5655,7 +5940,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5678,7 +5964,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5700,7 +5987,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5724,7 +6012,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5748,7 +6037,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5787,7 +6077,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5809,7 +6100,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5827,7 +6119,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5849,7 +6142,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5868,7 +6162,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5886,7 +6181,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5905,7 +6201,8 @@ globalCss({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5921,7 +6218,8 @@ globalCss({}) ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5937,7 +6235,8 @@ globalCss() ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5960,7 +6259,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -5980,7 +6280,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6000,7 +6301,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6020,7 +6322,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6040,7 +6343,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6060,7 +6364,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6080,7 +6385,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6100,7 +6406,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6136,7 +6443,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6156,7 +6464,8 @@ keyframes(...{ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6179,7 +6488,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6223,7 +6533,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6269,7 +6580,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: true + single_css: true, + import_main_css: false } ) .unwrap() @@ -6289,7 +6601,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: false + single_css: false, + import_main_css: false } ) .unwrap() @@ -6303,7 +6616,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: false + single_css: false, + import_main_css: false } ) .unwrap() @@ -6318,7 +6632,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: false + single_css: false, + import_main_css: false } ) .unwrap() @@ -6332,7 +6647,8 @@ keyframes({ ExtractOption { package: "@devup-ui/core".to_string(), css_dir: "@devup-ui/core".to_string(), - single_css: false + single_css: false, + import_main_css: false } ) .unwrap() diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-2.snap b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-2.snap index 2b941ba9..9536c88e 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-2.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-2.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr\"import {Box as C} from '@devup-ui/core'\n \n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, split_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr\"import {Box as C} from '@devup-ui/core'\n \n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_dir:\n \"@devup-ui/core\".to_string(), single_css: false, import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { @@ -23,5 +23,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui-0.css\";\n
;\n", + code: "import \"@devup-ui/core/devup-ui-0.css\";\n
;\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-3.snap b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-3.snap index 2638f0f7..1946e0b1 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-3.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-3.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test1.tsx\",\nr\"import {Box} from '@devup-ui/core'\n />\n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, split_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test1.tsx\",\nr\"import {Box} from '@devup-ui/core'\n />\n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_dir:\n \"@devup-ui/core\".to_string(), single_css: false, import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { @@ -23,5 +23,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui-1.css\";\n
;\n", + code: "import \"@devup-ui/core/devup-ui-1.css\";\n
;\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-4.snap b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-4.snap index ed263de1..f30b43d9 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-4.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-4.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test1.tsx\",\nr\"import {Box as C} from '@devup-ui/core'\n \n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, split_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test1.tsx\",\nr\"import {Box as C} from '@devup-ui/core'\n \n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_dir:\n \"@devup-ui/core\".to_string(), single_css: false, import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { @@ -23,5 +23,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui-1.css\";\n
;\n", + code: "import \"@devup-ui/core/devup-ui-1.css\";\n
;\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files.snap b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files.snap index b8aa1795..df11ea3a 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr\"import {Box} from '@devup-ui/core'\n />\n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, split_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr\"import {Box} from '@devup-ui/core'\n />\n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_dir:\n \"@devup-ui/core\".to_string(), single_css: false, import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { @@ -23,5 +23,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui-0.css\";\n
;\n", + code: "import \"@devup-ui/core/devup-ui-0.css\";\n
;\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-10.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-10.snap index f16d7429..c23d0c4d 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-10.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-10.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes(...{\n [`0%`]: { opacity: 0, ...{color: \"red\"} },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes(...{\n [`0%`]: { opacity: 0, ...{color: \"red\"} },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-2.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-2.snap index 63f6616f..57038ce5 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-2.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-2.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0%\": { opacity: 0 },\n \"50%\": { opacity: 0.5 },\n \"100%\": { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0%\": { opacity: 0 },\n \"50%\": { opacity: 0.5 },\n \"100%\": { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-3.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-3.snap index 72c5dbea..e2949a5f 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-3.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-3.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0\": { opacity: 0 },\n \"50\": { opacity: 0.5 },\n \"100\": { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0\": { opacity: 0 },\n \"50\": { opacity: 0.5 },\n \"100\": { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-4.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-4.snap index 7cee23eb..9ed489b4 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-4.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-4.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [\"0\"]: { opacity: 0 },\n [\"50\"]: { opacity: 0.5 },\n [\"100\"]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [\"0\"]: { opacity: 0 },\n [\"50\"]: { opacity: 0.5 },\n [\"100\"]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-5.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-5.snap index 30dbafca..81ad3dca 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-5.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-5.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [0]: { opacity: 0 },\n [50]: { opacity: 0.5 },\n [100]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [0]: { opacity: 0 },\n [50]: { opacity: 0.5 },\n [100]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-6.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-6.snap index c3db1ef8..b0d82548 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-6.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-6.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n 0: { opacity: 0 },\n 50: { opacity: 0.5 },\n 100: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n 0: { opacity: 0 },\n 50: { opacity: 0.5 },\n 100: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-7.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-7.snap index 21cbd09b..674d2e13 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-7.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-7.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [`0`]: { opacity: 0 },\n [`50`]: { opacity: 0.5 },\n [`100`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [`0`]: { opacity: 0 },\n [`50`]: { opacity: 0.5 },\n [`100`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-8.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-8.snap index fc13a89a..8d1f7278 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-8.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-8.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [`0%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [`0%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-9.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-9.snap index 6544c112..c48fccfe 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-9.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-9.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\n\nkeyframes({\n [`0`]: { opacity: 0 },\n [`50`]: { opacity: 0.5 },\n [`100`]: { opacity: 1 }\n});\nkeyframes({\n [`0%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n});\nkeyframes({\n [`1%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n});\nkeyframes({\n [`0%`]: { opacity: 1 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\n\nkeyframes({\n [`0`]: { opacity: 0 },\n [`50`]: { opacity: 0.5 },\n [`100`]: { opacity: 1 }\n});\nkeyframes({\n [`0%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n});\nkeyframes({\n [`1%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n});\nkeyframes({\n [`0%`]: { opacity: 1 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs.snap index f81d0881..ca43841f 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: { opacity: 0 },\n to: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: { opacity: 0 },\n to: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal-2.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal-2.snap index 0720f40c..3ef94316 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal-2.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal-2.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0%\": `\n background-color: red;\n color: blue;\n `,\n \"100%\": `\n background-color: blue;\n color: red;\n `\n})\n\nkeyframes`\n 0% {\n background-color: red;\n color: blue;\n }\n 100% {\n background-color: blue;\n color: red;\n }\n`\nkeyframes({\n \"0%\": {\n backgroundColor: \"red\",\n color: \"blue\"\n },\n \"100%\": {\n backgroundColor: \"blue\",\n color: \"red\"\n }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0%\": `\n background-color: red;\n color: blue;\n `,\n \"100%\": `\n background-color: blue;\n color: red;\n `\n})\n\nkeyframes`\n 0% {\n background-color: red;\n color: blue;\n }\n 100% {\n background-color: blue;\n color: red;\n }\n`\nkeyframes({\n \"0%\": {\n backgroundColor: \"red\",\n color: \"blue\"\n },\n \"100%\": {\n backgroundColor: \"blue\",\n color: \"red\"\n }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal.snap index 9af1b2c3..bb78b570 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: `\n background-color: red;\n `,\n to: `\n background-color: blue;\n `\n})\n\nkeyframes`\n from {\n background-color: red;\n }\n to {\n background-color: blue;\n }\n`\nkeyframes({\n from: {\n backgroundColor: \"red\"\n },\n to: {\n backgroundColor: \"blue\"\n }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: `\n background-color: red;\n `,\n to: `\n background-color: blue;\n `\n})\n\nkeyframes`\n from {\n background-color: red;\n }\n to {\n background-color: blue;\n }\n`\nkeyframes({\n from: {\n backgroundColor: \"red\"\n },\n to: {\n backgroundColor: \"blue\"\n }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_wrong_keyframs.snap b/libs/extractor/src/snapshots/extractor__tests__extract_wrong_keyframs.snap index be151bf8..d012877d 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_wrong_keyframs.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_wrong_keyframs.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: { opacity: 0 },\n [true]: { opacity: 0.5 },\n to: { opacity: 1, color: dy }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: { opacity: 0 },\n [true]: { opacity: 0.5 },\n to: { opacity: 1, color: dy }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true,import_main_css: false\n}).unwrap())" --- ToBTreeSet { styles: { diff --git a/libs/extractor/src/visit.rs b/libs/extractor/src/visit.rs index aeb5f029..6872ad28 100644 --- a/libs/extractor/src/visit.rs +++ b/libs/extractor/src/visit.rs @@ -49,7 +49,7 @@ pub struct DevupVisitor<'a> { jsx_object: Option, package: String, split_filename: Option, - pub css_file: String, + pub css_files: Vec, pub styles: HashSet, } @@ -58,7 +58,7 @@ impl<'a> DevupVisitor<'a> { allocator: &'a Allocator, filename: &str, package: &str, - css_file: &str, + css_files: Vec, split_filename: Option, ) -> Self { Self { @@ -67,7 +67,7 @@ impl<'a> DevupVisitor<'a> { imports: HashMap::new(), jsx_imports: HashMap::new(), package: package.to_string(), - css_file: css_file.to_string(), + css_files, styles: HashSet::new(), import_object: None, jsx_object: None, @@ -100,20 +100,21 @@ impl<'a> VisitMut<'a> for DevupVisitor<'a> { fn visit_program(&mut self, it: &mut Program<'a>) { walk_program(self, it); if !self.styles.is_empty() { - it.body.insert( - 0, - Statement::ImportDeclaration( - self.ast.alloc_import_declaration::>( - SPAN, - None, - self.ast - .string_literal(SPAN, self.ast.atom(&self.css_file), None), - None, - None, - ImportOrExportKind::Value, + for css_file in self.css_files.iter().rev() { + it.body.insert( + 0, + Statement::ImportDeclaration( + self.ast.alloc_import_declaration::>( + SPAN, + None, + self.ast.string_literal(SPAN, self.ast.atom(css_file), None), + None, + None, + ImportOrExportKind::Value, + ), ), - ), - ); + ); + } } for i in (0..it.body.len()).rev() { diff --git a/libs/sheet/src/lib.rs b/libs/sheet/src/lib.rs index 0eb41012..402eb52c 100644 --- a/libs/sheet/src/lib.rs +++ b/libs/sheet/src/lib.rs @@ -2,6 +2,9 @@ pub mod theme; use crate::theme::Theme; use css::{merge_selector, style_selector::StyleSelector}; +use extractor::extract_style::ExtractStyleProperty; +use extractor::extract_style::extract_style_value::ExtractStyleValue; +use extractor::extract_style::style_property::StyleProperty; use once_cell::sync::Lazy; use regex::Regex; use serde::de::Error; @@ -13,7 +16,7 @@ trait ExtractStyle { fn extract(&self) -> String; } -#[derive(Debug, Hash, Eq, PartialEq, Deserialize, Serialize)] +#[derive(Debug, Hash, Eq, PartialEq, Deserialize, Serialize, Clone)] #[serde(rename_all = "camelCase")] pub struct StyleSheetProperty { pub class_name: String, @@ -249,6 +252,18 @@ impl StyleSheet { } }); } + // remove empty map + if map.iter().all(|(_, v)| v.is_empty()) { + map.clear(); + } + } + if self + .properties + .get("") + .and_then(|v| if v.is_empty() { None } else { Some(()) }) + .is_none() + { + self.properties.remove(""); } true } @@ -257,6 +272,115 @@ impl StyleSheet { self.theme = theme; } + pub fn update_styles( + &mut self, + styles: &HashSet, + filename: &str, + single_css: bool, + ) -> (bool, bool) { + let mut collected = false; + let mut updated_base_style = false; + for style in styles.iter() { + match style { + ExtractStyleValue::Static(st) => { + let (cls, _) = + match style.extract(if !single_css { Some(filename) } else { None }) { + Some(StyleProperty::ClassName(cls)) => (cls, None), + Some(StyleProperty::Variable { + class_name, + variable_name, + .. + }) => (class_name, Some(variable_name)), + None => continue, + }; + if self.add_property( + &cls, + st.property(), + st.level(), + st.value(), + st.selector(), + st.style_order(), + if !single_css { Some(filename) } else { None }, + ) { + collected = true; + if st.style_order() == Some(0) { + updated_base_style = true; + } + } + } + ExtractStyleValue::Dynamic(dy) => { + let (cls, variable) = + match style.extract(if !single_css { Some(filename) } else { None }) { + Some(StyleProperty::ClassName(cls)) => (cls, None), + Some(StyleProperty::Variable { + class_name, + variable_name, + .. + }) => (class_name, Some(variable_name)), + None => continue, + }; + if self.add_property( + &cls, + dy.property(), + dy.level(), + &format!("var({})", variable.unwrap()), + dy.selector(), + dy.style_order(), + if !single_css { Some(filename) } else { None }, + ) { + collected = true; + if dy.style_order() == Some(0) { + updated_base_style = true; + } + } + } + + ExtractStyleValue::Keyframes(keyframes) => { + if self.add_keyframes( + &keyframes + .extract(if !single_css { Some(filename) } else { None }) + .to_string(), + keyframes + .keyframes + .iter() + .map(|(key, value)| { + ( + key.clone(), + value + .iter() + .map(|style| { + ( + style.property().to_string(), + style.value().to_string(), + ) + }) + .collect::>(), + ) + }) + .collect(), + if !single_css { Some(filename) } else { None }, + ) { + collected = true; + } + } + ExtractStyleValue::Css(cs) => { + if self.add_css(&cs.file, &cs.css) { + // update global css + updated_base_style = true; + } + } + ExtractStyleValue::Typography(_) => {} + ExtractStyleValue::Import(st) => { + self.add_import(&st.file, &st.url); + } + ExtractStyleValue::FontFace(font) => { + self.add_font_face(&font.file, &font.properties); + } + } + } + (collected, updated_base_style) + } + pub fn create_interface( &self, package_name: &str, @@ -306,8 +430,119 @@ impl StyleSheet { ) } } + fn create_style(&self, map: &BTreeMap>) -> String { + let mut current_css = String::new(); + for (level, props) in map.iter() { + let (mut global_props, rest): (Vec<_>, Vec<_>) = props + .iter() + .partition(|prop| matches!(prop.selector, Some(StyleSelector::Global(_, _)))); + global_props.sort(); + let (mut medias, mut sorted_props): (Vec<_>, Vec<_>) = + rest.into_iter().partition(|prop| { + matches!( + prop.selector, + Some(StyleSelector::Media { + query: _, + selector: _ + }) + ) + }); + sorted_props.sort(); + medias.sort(); + let medias = { + let mut map = BTreeMap::new(); + for prop in medias { + if let Some(StyleSelector::Media { query, .. }) = &prop.selector { + map.entry(query).or_insert_with(Vec::new).push(prop); + } + } + map + }; + + let break_point = if *level == 0 { + None + } else { + Some( + self.theme + .breakpoints + .iter() + .enumerate() + .find(|(idx, _)| (*idx as u8) == *level) + .map(|(_, bp)| *bp) + .unwrap_or_else(|| self.theme.breakpoints.last().cloned().unwrap_or(0)), + ) + }; + + if !global_props.is_empty() { + let mut selector_map: BTreeMap<_, Vec<_>> = BTreeMap::new(); + for prop in global_props { + if let Some(StyleSelector::Global(selector, _)) = &prop.selector { + selector_map.entry(selector.clone()).or_default().push(prop); + } + } + let mut inner_css = String::new(); + for (selector, props) in selector_map { + inner_css.push_str(&format!( + "{}{{{}}}", + selector, + props + .into_iter() + .map(|prop| format!("{}:{}", prop.property, prop.value)) + .collect::>() + .join(";") + )); + } + current_css.push_str( + if let Some(break_point) = break_point { + format!("@media(min-width:{break_point}px){{{inner_css}}}") + } else { + inner_css + } + .as_str(), + ); + } - pub fn create_css(&self, filename: Option<&str>) -> String { + if !sorted_props.is_empty() { + let inner_css = sorted_props + .into_iter() + .map(ExtractStyle::extract) + .collect::(); + current_css.push_str( + if let Some(break_point) = break_point { + format!("@media(min-width:{break_point}px){{{inner_css}}}") + } else { + inner_css + } + .as_str(), + ); + } + for (media, props) in medias { + let inner_css = props + .into_iter() + .map(ExtractStyle::extract) + .collect::(); + current_css.push_str( + if let Some(break_point) = break_point { + format!("@media(min-width:{break_point}px)and {media}{{{inner_css}}}") + } else { + format!( + "@media{}{{{}}}", + if media.starts_with("(") { + media.clone() + } else { + format!(" {media}") + }, + inner_css.as_str() + ) + } + .as_str(), + ); + } + } + current_css + } + + pub fn create_css(&self, filename: Option<&str>, import_main_css: bool) -> String { let mut css = self .imports .values() @@ -318,7 +553,38 @@ impl StyleSheet { let write_global = filename.is_none(); if write_global { - css.push_str(&self.theme.to_css()); + let mut style_orders: BTreeSet = BTreeSet::new(); + let mut base_styles = BTreeMap::>::new(); + self.properties.values().for_each(|map| { + style_orders.extend(map.iter().filter(|(_, v)| !v.is_empty()).map(|(k, _)| *k)); + if let Some(_base_styles) = map.get(&0) { + _base_styles.iter().for_each(|prop| { + base_styles + .entry(*prop.0) + .or_default() + .extend(prop.1.clone()); + }); + } + }); + // default + style_orders.remove(&255); + // base style + + let theme_css = self.theme.to_css(); + let mut layers_vec = Vec::new(); + if !theme_css.is_empty() { + layers_vec.push("t".to_string()); + } + if style_orders.remove(&0) { + layers_vec.push("b".to_string()); + } + layers_vec.extend(style_orders.iter().map(|v| format!("o{v}"))); + if !layers_vec.is_empty() { + css.push_str(&format!("@layer {};", layers_vec.join(","))); + } + if !theme_css.is_empty() { + css.push_str(&format!("@layer t{{{theme_css}}}",)); + } for (_, font_faces) in self.font_faces.iter() { for font_face in font_faces.iter() { css.push_str(&format!( @@ -338,9 +604,16 @@ impl StyleSheet { css.push_str(&_css.extract()); } } + let base_css = self.create_style(&base_styles); + if !base_css.is_empty() { + css.push_str(format!("@layer b{{{base_css}}}",).as_str()); + } } else { - // import global css - css.push_str("@import \"./devup-ui.css\";"); + // avoid inline import issue (vite plugin) + if import_main_css { + // import global css + css.push_str("@import \"./devup-ui.css\";"); + } } if let Some(keyframes) = self.keyframes.get(filename.unwrap_or_default()) { @@ -363,118 +636,23 @@ impl StyleSheet { // order if let Some(maps) = self.properties.get(filename.unwrap_or_default()) { - for (_, map) in maps.iter() { - for (level, props) in map.iter() { - let (mut global_props, rest): (Vec<_>, Vec<_>) = - props.iter().partition(|prop| { - matches!(prop.selector, Some(StyleSelector::Global(_, _))) - }); - global_props.sort(); - let (mut medias, mut sorted_props): (Vec<&StyleSheetProperty>, Vec<_>) = - rest.iter().partition(|prop| { - matches!( - prop.selector, - Some(StyleSelector::Media { - query: _, - selector: _ - }) - ) - }); - sorted_props.sort(); - medias.sort(); - let medias = { - let mut map = BTreeMap::new(); - for prop in medias { - if let Some(StyleSelector::Media { query, .. }) = &prop.selector { - map.entry(query).or_insert_with(Vec::new).push(prop); - } - } - map - }; - - let break_point = if *level == 0 { - None - } else { - Some( - self.theme - .breakpoints - .iter() - .enumerate() - .find(|(idx, _)| (*idx as u8) == *level) - .map(|(_, bp)| *bp) - .unwrap_or_else(|| { - self.theme.breakpoints.last().cloned().unwrap_or(0) - }), - ) - }; - - if !global_props.is_empty() { - let mut selector_map: BTreeMap<_, Vec<_>> = BTreeMap::new(); - for prop in global_props { - if let Some(StyleSelector::Global(selector, _)) = &prop.selector { - selector_map.entry(selector.clone()).or_default().push(prop); - } - } - let mut inner_css = String::new(); - for (selector, props) in selector_map { - inner_css.push_str(&format!( - "{}{{{}}}", - selector, - props - .into_iter() - .map(|prop| format!("{}:{}", prop.property, prop.value)) - .collect::>() - .join(";") - )); + for (style_order, map) in maps.iter() { + if *style_order == 0 { + // base style was created in global css + continue; + } + let current_css = self.create_style(map); + + if !current_css.is_empty() { + // order style 255 is user css + css.push_str( + if *style_order == 255 { + current_css + } else { + format!("@layer o{}{{{current_css}}}", style_order) } - css.push_str( - if let Some(break_point) = break_point { - format!("@media(min-width:{break_point}px){{{inner_css}}}") - } else { - inner_css - } - .as_str(), - ); - } - - if !sorted_props.is_empty() { - let inner_css = sorted_props - .into_iter() - .map(ExtractStyle::extract) - .collect::(); - css.push_str( - if let Some(break_point) = break_point { - format!("@media(min-width:{break_point}px){{{inner_css}}}") - } else { - inner_css - } - .as_str(), - ); - } - for (media, props) in medias { - let inner_css = props - .into_iter() - .map(ExtractStyle::extract) - .collect::(); - css.push_str( - if let Some(break_point) = break_point { - format!( - "@media(min-width:{break_point}px)and {media}{{{inner_css}}}" - ) - } else { - format!( - "@media{}{{{}}}", - if media.starts_with("(") { - media.clone() - } else { - format!(" {media}") - }, - inner_css.as_str() - ) - } - .as_str(), - ); - } + .as_str(), + ); } } } @@ -510,12 +688,12 @@ mod tests { let mut sheet = StyleSheet::default(); sheet.add_property("test", "background-color", 1, "red", None, None, None); sheet.add_property("test", "background", 1, "some", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property("test", "border", 0, "1px solid", None, None, None); sheet.add_property("test", "border-color", 0, "red", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] fn test_create_css_with_selector_sort_test() { @@ -530,7 +708,7 @@ mod tests { None, ); sheet.add_property("test", "background-color", 1, "some", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property("test", "background-color", 1, "red", None, None, None); @@ -543,29 +721,29 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property("test", "background-color", 1, "red", None, None, None); sheet.add_property("test", "background", 1, "some", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] fn test_create_css_with_basic_sort_test() { let mut sheet = StyleSheet::default(); sheet.add_property("test", "background-color", 1, "red", None, Some(0), None); sheet.add_property("test", "background", 1, "some", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property("test", "border", 0, "1px solid", None, None, None); sheet.add_property("test", "border-color", 0, "red", None, Some(0), None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property("test", "display", 0, "flex", None, Some(0), None); sheet.add_property("test", "display", 0, "block", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -581,28 +759,28 @@ mod tests { None, ); sheet.add_property("test", "background-color", 1, "some", None, Some(0), None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property("test", "display", 0, "flex", None, Some(0), None); sheet.add_property("test", "display", 0, "none", None, None, None); sheet.add_property("test", "display", 2, "flex", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] fn test_create_css() { let mut sheet = StyleSheet::default(); sheet.add_property("test", "margin", 1, "40px", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_css("test.tsx", "div {display:flex;}"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property("test", "margin", 2, "40px", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -623,7 +801,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -644,7 +822,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -665,7 +843,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -686,7 +864,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -698,7 +876,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -710,7 +888,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -722,7 +900,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -734,7 +912,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -746,7 +924,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -754,15 +932,15 @@ mod tests { let mut sheet = StyleSheet::default(); sheet.add_css("test.tsx", "div {display:flex;}"); sheet.add_css("test2.tsx", "div {display:flex;}"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); sheet.rm_global_css("test.tsx"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); sheet.rm_global_css("wrong.tsx"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -785,12 +963,12 @@ mod tests { sheet.add_property("test", "margin-right", 1, "60px", None, None, None); sheet.add_property("test", "margin-left", 0, "70px", None, None, None); sheet.add_property("test", "margin-right", 0, "70px", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property("test", "background", 0, "red", None, Some(3), None); sheet.add_property("test", "background", 0, "blue", None, Some(17), None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -798,7 +976,7 @@ mod tests { let mut sheet = StyleSheet::default(); sheet.add_property("test", "margin-left", 10, "40px", None, None, None); sheet.add_property("test", "margin-right", 10, "40px", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -840,7 +1018,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -900,7 +1078,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -943,7 +1121,7 @@ mod tests { ); sheet.add_property("test", "margin-left", 0, "42px", None, None, None); sheet.add_property("test", "margin-right", 0, "42px", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -982,7 +1160,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -1061,7 +1239,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -1085,7 +1263,7 @@ mod tests { sheet.add_property("test", "margin-top", 0, "40px", None, None, None); sheet.add_property("test", "margin-bottom", 0, "40px", None, None, None); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -1116,7 +1294,7 @@ mod tests { None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -1208,7 +1386,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( "test", @@ -1222,7 +1400,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); @@ -1250,7 +1428,7 @@ mod tests { None, None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -1277,7 +1455,7 @@ mod tests { Some(255), None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); sheet.add_property( "test", @@ -1303,7 +1481,7 @@ mod tests { ); sheet.rm_global_css("test.tsx"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -1331,10 +1509,10 @@ mod tests { None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); sheet.rm_global_css("test.tsx"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -1362,10 +1540,10 @@ mod tests { None, ); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); sheet.rm_global_css("test.tsx"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } #[test] @@ -1376,19 +1554,19 @@ mod tests { sheet.add_import("test2.tsx", "@devup-ui/core/css/global2.css"); sheet.add_import("test3.tsx", "@devup-ui/core/css/global3.css"); sheet.add_import("test4.tsx", "@devup-ui/core/css/global4.css"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } { let mut sheet = StyleSheet::default(); sheet.add_import("test.tsx", "@devup-ui/core/css/global.css"); sheet.add_import("test.tsx", "@devup-ui/core/css/new-global.css"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } { let mut sheet = StyleSheet::default(); sheet.add_import("test.tsx", "@devup-ui/core/css/global.css"); sheet.add_import("test.tsx", "@devup-ui/core/css/global.css"); - assert_debug_snapshot!(sheet.create_css(None)); + assert_debug_snapshot!(sheet.create_css(None, false)); } } @@ -1479,7 +1657,7 @@ mod tests { ); sheet.add_keyframes("fadeIn", keyframes, None); - let past = sheet.create_css(None); + let past = sheet.create_css(None, false); assert_debug_snapshot!(past); let mut keyframes: BTreeMap> = BTreeMap::new(); @@ -1509,7 +1687,7 @@ mod tests { sheet.add_keyframes("fadeIn", keyframes, None); - let now = sheet.create_css(None); + let now = sheet.create_css(None, false); assert_debug_snapshot!(now); assert_eq!(past, now); } @@ -1527,7 +1705,7 @@ mod tests { sheet.add_font_face("test.tsx", &font_face_props); - let css = sheet.create_css(None); + let css = sheet.create_css(None, false); assert!(css.contains("@font-face")); assert!(css.contains("font-family:Roboto")); assert!(css.contains("src:url('/fonts/Roboto-Regular.ttf')")); diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test-2.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test-2.snap index 8f71f77b..4fb9da31 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test-2.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test-2.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -".test{border-color:red}.test{border:1px solid}" +"@layer b;@layer b{.test{border-color:red}}.test{border:1px solid}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test-3.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test-3.snap index 8b9ed207..356552e0 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test-3.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test-3.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -".test{display:flex}.test{display:block}" +"@layer b;@layer b{.test{display:flex}}.test{display:block}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test.snap index 441a6f06..c8ec8721 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_basic_sort_test.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -"@media(min-width:480px){.test{background-color:red}}@media(min-width:480px){.test{background:some}}" +"@layer b;@layer b{@media(min-width:480px){.test{background-color:red}}}@media(min-width:480px){.test{background:some}}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-4.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-4.snap index d8694486..21e31ba2 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-4.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-4.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -"@media(min-width:480px){div{background-color:blue}}div{background-color:red}" +"@layer b;@layer b{@media(min-width:480px){div{background-color:blue}}}div{background-color:red}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-5.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-5.snap index dab7c090..b199fa79 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-5.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-5.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- "div{background-color:red}.test2:hover{background-color:red}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-6.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-6.snap index f6f20ad0..0481ea8d 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-6.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-6.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -"@media(min-width:480px){div{background-color:blue;color:blue}}" +"@layer b;@layer b{@media(min-width:480px){div{background-color:blue;color:blue}}}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-8.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-8.snap index ff698670..c4914b18 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-8.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-8.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -"div{background-color:blue;color:blue}" +"@layer b;@layer b{div{background-color:blue;color:blue}}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-9.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-9.snap index d616be25..623addd4 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-9.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_global_selector-9.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -"div{color:blue}" +"@layer b;@layer b{div{color:blue}}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_selector_and_basic_sort_test-2.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_selector_and_basic_sort_test-2.snap index b38055ce..430170e0 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_selector_and_basic_sort_test-2.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_selector_and_basic_sort_test-2.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -".test{display:flex}.test{display:none}@media(min-width:768px){.test{display:flex}}" +"@layer b;@layer b{.test{display:flex}}.test{display:none}@media(min-width:768px){.test{display:flex}}" diff --git a/libs/sheet/src/snapshots/sheet__tests__create_css_with_selector_and_basic_sort_test.snap b/libs/sheet/src/snapshots/sheet__tests__create_css_with_selector_and_basic_sort_test.snap index 223863ab..626055ae 100644 --- a/libs/sheet/src/snapshots/sheet__tests__create_css_with_selector_and_basic_sort_test.snap +++ b/libs/sheet/src/snapshots/sheet__tests__create_css_with_selector_and_basic_sort_test.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -"@media(min-width:480px){.test{background-color:some}}@media(min-width:480px){.test:hover{background-color:red}}" +"@layer b;@layer b{@media(min-width:480px){.test{background-color:some}}}@media(min-width:480px){.test:hover{background-color:red}}" diff --git a/libs/sheet/src/snapshots/sheet__tests__style_order_create_css-2.snap b/libs/sheet/src/snapshots/sheet__tests__style_order_create_css-2.snap index 46141cba..be7084f2 100644 --- a/libs/sheet/src/snapshots/sheet__tests__style_order_create_css-2.snap +++ b/libs/sheet/src/snapshots/sheet__tests__style_order_create_css-2.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -".test{background:red}.test{background:blue}" +"@layer o3,o17;@layer o3{.test{background:red}}@layer o17{.test{background:blue}}" diff --git a/libs/sheet/src/snapshots/sheet__tests__style_order_create_css.snap b/libs/sheet/src/snapshots/sheet__tests__style_order_create_css.snap index 479f3c03..2835fb86 100644 --- a/libs/sheet/src/snapshots/sheet__tests__style_order_create_css.snap +++ b/libs/sheet/src/snapshots/sheet__tests__style_order_create_css.snap @@ -1,5 +1,5 @@ --- source: libs/sheet/src/lib.rs -expression: sheet.create_css() +expression: sheet.create_css(None) --- -".test{margin-left:40px}.test{margin-right:40px}@media(min-width:480px){.test{margin-left:40px}.test{margin-left:44px}.test{margin-right:40px}.test{margin-right:44px}}@media(min-width:480px){.test{margin-left:50px}.test{margin-right:50px}}.test{margin-left:70px}.test{margin-right:70px}@media(min-width:480px){.test{margin-left:60px}.test{margin-right:60px}}" +"@layer o1,o2;@layer o1{.test{margin-left:40px}.test{margin-right:40px}@media(min-width:480px){.test{margin-left:40px}.test{margin-left:44px}.test{margin-right:40px}.test{margin-right:44px}}}@layer o2{@media(min-width:480px){.test{margin-left:50px}.test{margin-right:50px}}}.test{margin-left:70px}.test{margin-right:70px}@media(min-width:480px){.test{margin-left:60px}.test{margin-right:60px}}" diff --git a/libs/sheet/src/snapshots/sheet__theme__tests__to_css_from_theme.snap b/libs/sheet/src/snapshots/sheet__theme__tests__to_css_from_theme.snap index 8f04f5fd..1c0b807f 100644 --- a/libs/sheet/src/snapshots/sheet__theme__tests__to_css_from_theme.snap +++ b/libs/sheet/src/snapshots/sheet__theme__tests__to_css_from_theme.snap @@ -2,4 +2,4 @@ source: libs/sheet/src/theme.rs expression: css --- -":root{color-scheme:light;--primary:light-dark(#000,#FFF)}:root[data-theme=dark]{color-scheme:dark}.typo-default{font-family:Arial;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:0.5}@media(min-width:480px){.typo-default{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:0.5}.typo-default1{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:0.5}}" +":root{color-scheme:light;--primary:light-dark(#000,#FFF)}:root[data-theme=dark]{color-scheme:dark}.typo-default{font-family:Arial;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:.5}@media(min-width:480px){.typo-default{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:.5}.typo-default1{font-family:Arial;font-size:24px;font-weight:400;line-height:1.5;letter-spacing:.5}}" diff --git a/libs/sheet/src/theme.rs b/libs/sheet/src/theme.rs index f1b3f22b..b6d77efa 100644 --- a/libs/sheet/src/theme.rs +++ b/libs/sheet/src/theme.rs @@ -246,29 +246,31 @@ impl Theme { if let Some(t) = t { let css_content = [ t.font_family - .clone() - .map(|v| format!("font-family:{v}")) + .as_ref() + .map(|v| format!("font-family:{}", optimize_value(v))) .unwrap_or("".to_string()), t.font_size - .clone() - .map(|v| format!("font-size:{v}")) + .as_ref() + .map(|v| format!("font-size:{}", optimize_value(v))) .unwrap_or("".to_string()), t.font_weight - .clone() - .map(|v| format!("font-weight:{v}")) + .as_ref() + .map(|v| format!("font-weight:{}", optimize_value(v))) .unwrap_or("".to_string()), t.line_height - .clone() - .map(|v| format!("line-height:{v}")) + .as_ref() + .map(|v| format!("line-height:{}", optimize_value(v))) .unwrap_or("".to_string()), t.letter_spacing - .clone() - .map(|v| format!("letter-spacing:{v}")) + .as_ref() + .map(|v| format!("letter-spacing:{}", optimize_value(v))) .unwrap_or("".to_string()), ] .iter() - .map(|v| v.trim()) - .filter(|v| !v.is_empty()) + .filter_map(|v| { + let v = v.trim(); + if v.is_empty() { None } else { Some(v) } + }) .collect::>() .join(";"); diff --git a/package.json b/package.json index d8874be0..087cced4 100644 --- a/package.json +++ b/package.json @@ -18,14 +18,14 @@ "vitest": "^3.2.4", "@vitest/coverage-v8": "^3.2.4", "@changesets/cli": "^2.29.6", - "@types/node": "^24.3.0", + "@types/node": "^24.3.1", "happy-dom": "^18.0.1", "@testing-library/react": "^16.3.0", "@testing-library/jest-dom": "^6.8.0", "@devup-ui/vite-plugin": "workspace:*" }, "author": "devfive", - "packageManager": "pnpm@10.15.0", + "packageManager": "pnpm@10.15.1", "resolutions": { "vite": "^6" } diff --git a/packages/components/package.json b/packages/components/package.json index 2fc97caa..3c04efcc 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -49,15 +49,15 @@ }, "devDependencies": { "@devup-ui/vite-plugin": "workspace:*", - "@storybook/addon-docs": "^9.1.3", - "@storybook/addon-onboarding": "^9.1.3", - "@storybook/react-vite": "^9.1.3", + "@storybook/addon-docs": "^9.1.4", + "@storybook/addon-onboarding": "^9.1.4", + "@storybook/react-vite": "^9.1.4", "@types/react": "^19.1.12", - "eslint-plugin-storybook": "^9.1.3", + "eslint-plugin-storybook": "^9.1.4", "rollup-plugin-preserve-directives": "^0.4.0", - "storybook": "^9.1.3", + "storybook": "^9.1.4", "typescript": "^5.9.2", - "vite": "^7.1.3", + "vite": "^7.1.4", "vite-plugin-dts": "^4.5.4", "vitest": "^3.2.4" }, diff --git a/packages/next-plugin/package.json b/packages/next-plugin/package.json index 1ea121a4..967fe737 100644 --- a/packages/next-plugin/package.json +++ b/packages/next-plugin/package.json @@ -46,7 +46,7 @@ "browserslist": "latest" }, "devDependencies": { - "vite": "^7.1.3", + "vite": "^7.1.4", "vite-plugin-dts": "^4.5.4", "vitest": "^3.2.4", "typescript": "^5.9.2", diff --git a/packages/react/package.json b/packages/react/package.json index 3ab4605d..21ac4a76 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -44,7 +44,7 @@ }, "devDependencies": { "rollup-plugin-preserve-directives": "^0.4.0", - "vite": "^7.1.3", + "vite": "^7.1.4", "vite-plugin-dts": "^4.5.4", "typescript": "^5.9.2", "@types/react": "^19" diff --git a/packages/reset-css/package.json b/packages/reset-css/package.json index a8aa07e5..677a1970 100644 --- a/packages/reset-css/package.json +++ b/packages/reset-css/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "typescript": "^5.9.2", - "vite": "^7.1.3", + "vite": "^7.1.4", "vite-plugin-dts": "^4.5.4", "rollup-plugin-preserve-directives": "^0.4.0" }, diff --git a/packages/rsbuild-plugin/package.json b/packages/rsbuild-plugin/package.json index 225236f8..9c257092 100644 --- a/packages/rsbuild-plugin/package.json +++ b/packages/rsbuild-plugin/package.json @@ -56,8 +56,8 @@ "@rsbuild/core": "*" }, "devDependencies": { - "@rsbuild/core": "^1.5.1", - "vite": "^7.1.3", + "@rsbuild/core": "^1.5.3", + "vite": "^7.1.4", "vite-plugin-dts": "^4.5.4", "vitest": "^3.2.4", "typescript": "^5.9.2" diff --git a/packages/rsbuild-plugin/src/__tests__/plugin.test.ts b/packages/rsbuild-plugin/src/__tests__/plugin.test.ts index 539054f1..01b7ba14 100644 --- a/packages/rsbuild-plugin/src/__tests__/plugin.test.ts +++ b/packages/rsbuild-plugin/src/__tests__/plugin.test.ts @@ -188,7 +188,11 @@ const App = () => `, const App = () => `, ) }) - it('should transform with include', async () => { + it.each( + createTestMatrix({ + updatedBaseStyle: [true, false], + }), + )('should transform with include', async (options) => { const plugin = DevupUI({ include: ['lib'], }) @@ -209,8 +213,11 @@ const App = () => `, vi.mocked(codeExtract).mockReturnValue({ code: '
', css: '.devup-ui-1 { color: red; }', - css_file: 'devup-ui.css', - } as any) + cssFile: 'devup-ui.css', + map: undefined, + updatedBaseStyle: options.updatedBaseStyle, + free: vi.fn(), + }) const ret = await transform.mock.calls[1][1]({ code: `import { Box } from '@devup-ui/react' const App = () => `, @@ -220,6 +227,14 @@ const App = () => `, code: '
', map: undefined, }) + + if (options.updatedBaseStyle) { + expect(writeFile).toHaveBeenCalledWith( + resolve('df', 'devup-ui', 'devup-ui.css'), + expect.stringMatching(/\/\* src\/App\.tsx \d+ \*\//), + 'utf-8', + ) + } expect(writeFile).toHaveBeenCalledWith( resolve('df', 'devup-ui', 'devup-ui.css'), expect.stringMatching(/\/\* src\/App\.tsx \d+ \*\//), diff --git a/packages/rsbuild-plugin/src/plugin.ts b/packages/rsbuild-plugin/src/plugin.ts index 873985c5..01c1de6a 100644 --- a/packages/rsbuild-plugin/src/plugin.ts +++ b/packages/rsbuild-plugin/src/plugin.ts @@ -64,7 +64,7 @@ async function writeDataFiles( ? mkdir(options.cssDir, { recursive: true }) : Promise.resolve(), !options.singleCss - ? writeFile(join(options.cssDir, 'devup-ui.css'), getCss()) + ? writeFile(join(options.cssDir, 'devup-ui.css'), getCss(null, false)) : Promise.resolve(), ]) } @@ -132,17 +132,40 @@ export const DevupUI = ({ code: retCode, css, map, - css_file, - } = codeExtract(resourcePath, code, libPackage, cssDir, singleCss) + cssFile, + updatedBaseStyle, + } = codeExtract( + resourcePath, + code, + libPackage, + cssDir, + singleCss, + false, + true, + ) + const promises: Promise[] = [] + if (updatedBaseStyle) { + // update base style + promises.push( + writeFile( + join(cssDir, 'devup-ui.css'), + getCss(null, false), + 'utf-8', + ), + ) + } if (css) { if (globalCss.length < css.length) globalCss = css - await writeFile( - join(cssDir, basename(css_file)), - `/* ${resourcePath} ${Date.now()} */`, - 'utf-8', + promises.push( + writeFile( + join(cssDir, basename(cssFile!)), + `/* ${resourcePath} ${Date.now()} */`, + 'utf-8', + ), ) } + await Promise.all(promises) return { code: retCode, map, diff --git a/packages/vite-plugin/src/__tests__/plugin.test.ts b/packages/vite-plugin/src/__tests__/plugin.test.ts index 9c4371ba..90c3800f 100644 --- a/packages/vite-plugin/src/__tests__/plugin.test.ts +++ b/packages/vite-plugin/src/__tests__/plugin.test.ts @@ -39,13 +39,13 @@ describe('devupUIVitePlugin', () => { apply: expect.any(Function), generateBundle: expect.any(Function), configResolved: expect.any(Function), + resolveId: expect.any(Function), }) expect((plugin as any).apply()).toBe(true) }) it.each( globalThis.createTestMatrix({ debug: [true, false], - singleCss: [true, false], extractCss: [true, false], }), )('should apply options', async (options) => { @@ -56,7 +56,7 @@ describe('devupUIVitePlugin', () => { (plugin as any) .config() .build.rollupOptions.output.manualChunks('devup-ui.css', 'code'), - ).toEqual(options.singleCss ? 'devup-ui.css' : undefined) + ).toEqual('devup-ui.css') } else { expect((plugin as any).config().build).toBeUndefined() } @@ -178,14 +178,18 @@ describe('devupUIVitePlugin', () => { it.each( createTestMatrix({ extractCss: [true, false], + updatedBaseStyle: [true, false], }), )('should transform', async (options) => { vi.mocked(getCss).mockReturnValue('css code') vi.mocked(codeExtract).mockReturnValue({ css: 'css code', code: 'code', - css_file: 'devup-ui.css', - } as any) + cssFile: 'devup-ui.css', + map: undefined, + updatedBaseStyle: options.updatedBaseStyle, + free: vi.fn(), + }) const plugin = DevupUI(options) @@ -210,8 +214,18 @@ describe('devupUIVitePlugin', () => { vi.mocked(codeExtract).mockReturnValue({ css: 'css code test next', code: 'code', - css_file: 'devup-ui.css', - } as any) + cssFile: 'devup-ui.css', + map: undefined, + updatedBaseStyle: options.updatedBaseStyle, + free: vi.fn(), + }) + expect(writeFile).toHaveBeenCalledWith( + join(resolve('df', 'devup-ui'), 'devup-ui.css'), + expect.stringMatching( + /\/\* node_modules[/\\]@devup-ui[/\\]hello[/\\]index\.tsx \d+ \*\//, + ), + 'utf-8', + ) expect( await (plugin as any).transform( 'code', @@ -219,6 +233,21 @@ describe('devupUIVitePlugin', () => { ), ).toEqual({ code: 'code' }) } + expect(await (plugin as any).load('devup-ui.css')).toEqual( + expect.any(String), + ) + + vi.mocked(codeExtract).mockReturnValue({ + css: 'long css code', + code: 'long code', + cssFile: 'devup-ui.css', + map: undefined, + updatedBaseStyle: options.updatedBaseStyle, + free: vi.fn(), + }) + expect(await (plugin as any).transform('code', 'devup-ui.tsx')).toEqual( + options.extractCss ? { code: 'long code' } : undefined, + ) }) it.each( @@ -229,7 +258,7 @@ describe('devupUIVitePlugin', () => { vi.mocked(getCss).mockReturnValue('css code test') const plugin = DevupUI({ extractCss: options.extractCss, singleCss: true }) const bundle = { - 'devup-ui.css': { source: 'css code' }, + 'devup-ui.css': { source: 'css code', name: 'devup-ui.css' }, } as any ;(plugin as any).load('devup-ui.css') await (plugin as any).generateBundle({}, bundle) @@ -239,4 +268,30 @@ describe('devupUIVitePlugin', () => { expect(bundle['devup-ui.css'].source).toEqual('css code') } }) + it('should resolveId', () => { + vi.mocked(getCss).mockReturnValue('css code') + { + const plugin = DevupUI({}) + expect( + (plugin as any).resolveId('devup-ui.css', 'df/devup-ui/devup-ui.css'), + ).toEqual(expect.any(String)) + } + + { + const plugin = DevupUI({ + cssDir: '', + }) + expect((plugin as any).resolveId('devup-ui.css')).toEqual( + expect.any(String), + ) + } + }) + it('should resolve id with cssMap', () => { + vi.mocked(getCss).mockReturnValue('css code') + const plugin = DevupUI({}) + ;(plugin as any).load('devup-ui.css') + expect( + (plugin as any).resolveId('devup-ui.css', 'df/devup-ui/devup-ui.css'), + ).toEqual(expect.any(String)) + }) }) diff --git a/packages/vite-plugin/src/plugin.ts b/packages/vite-plugin/src/plugin.ts index e7da96e2..fda0f024 100644 --- a/packages/vite-plugin/src/plugin.ts +++ b/packages/vite-plugin/src/plugin.ts @@ -64,13 +64,11 @@ async function writeDataFiles( ? mkdir(options.cssDir, { recursive: true }) : Promise.resolve(), !options.singleCss - ? writeFile(join(options.cssDir, 'devup-ui.css'), getCss()) + ? writeFile(join(options.cssDir, 'devup-ui.css'), getCss(null, false)) : Promise.resolve(), ]) } -const cssMap: Map = new Map() - export function DevupUI({ package: libPackage = '@devup-ui/react', devupFile = 'devup.json', @@ -82,6 +80,7 @@ export function DevupUI({ singleCss = false, }: Partial = {}): PluginOption { setDebug(debug) + const cssMap = new Map() return { name: 'devup-ui', async configResolved() { @@ -118,7 +117,7 @@ export function DevupUI({ output: { manualChunks(id) { // merge devup css files - if (singleCss && id.endsWith('devup-ui.css')) { + if (id.split('?')[0].endsWith('devup-ui.css')) { return `devup-ui.css` } }, @@ -147,11 +146,23 @@ export function DevupUI({ } } }, + resolveId(id, importer) { + if ( + id.includes('devup-ui.css') && + resolve(importer ? join(dirname(importer), id) : id) === + resolve(join(cssDir, 'devup-ui.css')) + ) { + return join( + cssDir, + `devup-ui.css?t=${Date.now().toString() + (cssMap.get(null)?.length ?? 0)}`, + ) + } + }, load(id) { const fileName = basename(id).split('?')[0] if (fileName.startsWith('devup-ui') && fileName.endsWith('.css')) { - const fileNum = getFileNumByFilename(id) - const css = getCss(fileNum) + const fileNum = getFileNumByFilename(fileName) + const css = getCss(fileNum, false) cssMap.set(fileNum, css) return css } @@ -179,20 +190,32 @@ export function DevupUI({ code: retCode, css, map, - css_file, - } = codeExtract(fileName, code, libPackage, rel, singleCss) + cssFile, + updatedBaseStyle, + // import main css in code + } = codeExtract(fileName, code, libPackage, rel, singleCss, true, false) + const promises: Promise[] = [] + + if (updatedBaseStyle) { + // update base style + promises.push( + writeFile(join(cssDir, 'devup-ui.css'), getCss(null, false), 'utf-8'), + ) + } if (css) { - const fileNum = getFileNumByFilename(css_file) + const fileNum = getFileNumByFilename(cssFile!) const prevCss = cssMap.get(fileNum) if (prevCss && prevCss.length < css.length) cssMap.set(fileNum, css) - await writeFile( - join(cssDir, basename(css_file)), - `/* ${id} ${Date.now()} */`, - 'utf-8', + promises.push( + writeFile( + join(cssDir, basename(cssFile!)), + `/* ${id} ${Date.now()} */`, + 'utf-8', + ), ) } - // console.log('transform', retCode) + await Promise.all(promises) return { code: retCode, map, @@ -202,12 +225,10 @@ export function DevupUI({ if (!extractCss) return const cssFile = Object.keys(bundle).find( - (file) => file.includes('devup-ui') && file.endsWith('.css'), + (file) => bundle[file].name === 'devup-ui.css', ) if (cssFile && 'source' in bundle[cssFile]) { - const fileNum = getFileNumByFilename(cssFile) - const css = cssMap.get(fileNum) - if (css) bundle[cssFile].source = css + bundle[cssFile].source = cssMap.get(null)! } }, } diff --git a/packages/webpack-plugin/package.json b/packages/webpack-plugin/package.json index f516165f..9101386e 100644 --- a/packages/webpack-plugin/package.json +++ b/packages/webpack-plugin/package.json @@ -55,7 +55,7 @@ "@devup-ui/wasm": "*" }, "devDependencies": { - "vite": "^7.1.3", + "vite": "^7.1.4", "@types/webpack": "^5.28.5", "vite-plugin-dts": "^4.5.4", "vitest": "^3.2.4", diff --git a/packages/webpack-plugin/src/__tests__/loader.test.ts b/packages/webpack-plugin/src/__tests__/loader.test.ts index 3e38903a..e3e4b62d 100644 --- a/packages/webpack-plugin/src/__tests__/loader.test.ts +++ b/packages/webpack-plugin/src/__tests__/loader.test.ts @@ -6,6 +6,7 @@ import { exportClassMap, exportFileMap, exportSheet, + getCss, } from '@devup-ui/wasm' import devupUILoader from '../loader' @@ -19,7 +20,11 @@ beforeEach(() => { }) describe('devupUILoader', () => { - it('should extract code with css', async () => { + it.each( + createTestMatrix({ + updatedBaseStyle: [true, false], + }), + )('should extract code with css', async (options) => { const _compiler = { __DEVUP_CACHE: '', } @@ -41,13 +46,15 @@ describe('devupUILoader', () => { vi.mocked(exportSheet).mockReturnValue('sheet') vi.mocked(exportClassMap).mockReturnValue('classMap') vi.mocked(exportFileMap).mockReturnValue('fileMap') + vi.mocked(getCss).mockReturnValue('css') vi.mocked(codeExtract).mockReturnValue({ code: 'code', css: 'css', free: vi.fn(), map: '{}', - css_file: 'cssFile', + cssFile: 'cssFile', + updatedBaseStyle: options.updatedBaseStyle, }) devupUILoader.bind(t as any)(Buffer.from('code'), 'index.tsx') @@ -58,7 +65,22 @@ describe('devupUILoader', () => { 'package', './cssFile', true, + false, + true, ) + if (options.updatedBaseStyle) { + expect(writeFile).toHaveBeenCalledWith( + join('cssFile', 'devup-ui.css'), + 'css', + 'utf-8', + ) + } else { + expect(writeFile).not.toHaveBeenCalledWith( + join('cssFile', 'devup-ui.css'), + 'css', + 'utf-8', + ) + } await vi.waitFor(() => { expect(t.async()).toHaveBeenCalledWith(null, 'code', {}) expect(writeFile).toHaveBeenCalledWith( @@ -90,7 +112,8 @@ describe('devupUILoader', () => { css: undefined, free: vi.fn(), map: undefined, - css_file: 'cssFile', + cssFile: 'cssFile', + updatedBaseStyle: false, }) devupUILoader.bind(t as any)(Buffer.from('code'), 'index.tsx') @@ -101,6 +124,8 @@ describe('devupUILoader', () => { 'package', './cssFile', true, + false, + true, ) expect(t.async()).toHaveBeenCalledWith(null, 'code', null) expect(writeFile).not.toHaveBeenCalledWith('cssFile', 'css', { @@ -146,7 +171,8 @@ describe('devupUILoader', () => { css: 'css', free: vi.fn(), map: undefined, - css_file: 'cssFile', + cssFile: 'cssFile', + updatedBaseStyle: false, }) devupUILoader.bind(t as any)(Buffer.from('code'), 'index.tsx') @@ -157,6 +183,8 @@ describe('devupUILoader', () => { 'package', './cssFile', true, + false, + true, ) }) @@ -177,7 +205,8 @@ describe('devupUILoader', () => { css: 'css', free: vi.fn(), map: undefined, - css_file: 'cssFile', + cssFile: 'cssFile', + updatedBaseStyle: false, }) devupUILoader.bind(t as any)(Buffer.from('code'), 'index.tsx') }) diff --git a/packages/webpack-plugin/src/__tests__/plugin.test.ts b/packages/webpack-plugin/src/__tests__/plugin.test.ts index 4571dc3c..ecec9189 100644 --- a/packages/webpack-plugin/src/__tests__/plugin.test.ts +++ b/packages/webpack-plugin/src/__tests__/plugin.test.ts @@ -1,4 +1,4 @@ -import { existsSync } from 'node:fs' +import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs' import { mkdir, readFile, stat, writeFile } from 'node:fs/promises' import { join, resolve } from 'node:path' @@ -93,18 +93,18 @@ describe('devupUIWebpackPlugin', () => { getCss: ['css', 'css-core'], }), )('should write data files', async (_options) => { - vi.mocked(readFile).mockResolvedValue(JSON.stringify(_options.readFile)) + vi.mocked(readFileSync).mockReturnValue(JSON.stringify(_options.readFile)) vi.mocked(getThemeInterface).mockReturnValue(_options.getThemeInterface) vi.mocked(getCss).mockReturnValue(_options.getCss) vi.mocked(existsSync).mockReturnValueOnce(_options.readFile !== undefined) - vi.mocked(writeFile).mockResolvedValue() - vi.mocked(mkdir) + vi.mocked(writeFileSync).mockReturnValue() + vi.mocked(mkdirSync) const plugin = new DevupUIWebpackPlugin(options) await plugin.writeDataFiles() if (_options.readFile !== undefined) { - expect(readFile).toHaveBeenCalledWith(options.devupFile, 'utf-8') + expect(readFileSync).toHaveBeenCalledWith(options.devupFile, 'utf-8') expect(registerTheme).toHaveBeenCalledWith( _options.readFile?.theme ?? {}, @@ -116,22 +116,22 @@ describe('devupUIWebpackPlugin', () => { 'DevupTheme', ) if (_options.getThemeInterface) - expect(writeFile).toHaveBeenCalledWith( + expect(writeFileSync).toHaveBeenCalledWith( join(options.distDir, 'theme.d.ts'), _options.getThemeInterface, { encoding: 'utf-8', }, ) - else expect(writeFile).toHaveBeenCalledTimes(options.watch ? 1 : 0) + else expect(writeFileSync).toHaveBeenCalledTimes(options.watch ? 1 : 0) } else expect(readFile).not.toHaveBeenCalled() if (options.watch) - expect(writeFile).toHaveBeenCalledWith( + expect(writeFileSync).toHaveBeenCalledWith( join(options.cssDir, 'devup-ui.css'), _options.getCss, ) else - expect(writeFile).toHaveBeenCalledTimes( + expect(writeFileSync).toHaveBeenCalledTimes( _options.getThemeInterface && _options.readFile !== undefined ? 1 : 0, ) }) @@ -197,9 +197,12 @@ describe('devupUIWebpackPlugin', () => { watch: true, }) const compiler = createCompiler() - vi.mocked(readFile).mockImplementation(() => { + vi.mocked(readFileSync).mockImplementation(() => { throw new Error('error') }) + vi.mocked(stat).mockReturnValue({ + mtimeMs: 1, + } as any) vi.mocked(existsSync).mockReturnValue(true) plugin.apply(compiler as any) await compiler.hooks.watchRun.tapPromise.mock.calls[0][1]() @@ -243,31 +246,25 @@ describe('devupUIWebpackPlugin', () => { vi.mocked(stat).mockResolvedValueOnce({ mtimeMs: 2, } as any) - vi.mocked(mkdir) + vi.mocked(mkdirSync) if (options.existsSheetFile) - vi.mocked(readFile).mockResolvedValueOnce('{"sheet": "sheet"}') + vi.mocked(readFileSync).mockReturnValueOnce('{"sheet": "sheet"}') if (options.existsClassMapFile) - vi.mocked(readFile).mockResolvedValueOnce('{"classMap": "classMap"}') + vi.mocked(readFileSync).mockReturnValueOnce('{"classMap": "classMap"}') if (options.existsFileMapFile) - vi.mocked(readFile).mockResolvedValueOnce('{"fileMap": "fileMap"}') + vi.mocked(readFileSync).mockReturnValueOnce('{"fileMap": "fileMap"}') plugin.apply(compiler) - await compiler.hooks[ - options.watch ? 'watchRun' : 'beforeRun' - ].tapPromise.mock.calls[0][1]() - await compiler.hooks[ - options.watch ? 'watchRun' : 'beforeRun' - ].tapPromise.mock.calls[0][1]() if (options.existsDistDir) - expect(mkdir).not.toHaveBeenCalledWith(plugin.options.distDir, { + expect(mkdirSync).not.toHaveBeenCalledWith(plugin.options.distDir, { recursive: true, }) else - expect(mkdir).toHaveBeenCalledWith(plugin.options.distDir, { + expect(mkdirSync).toHaveBeenCalledWith(plugin.options.distDir, { recursive: true, }) - expect(writeFile).toHaveBeenCalledWith( + expect(writeFileSync).toHaveBeenCalledWith( join(plugin.options.distDir, '.gitignore'), '*', 'utf-8', @@ -287,10 +284,10 @@ describe('devupUIWebpackPlugin', () => { ) expect(compiler.hooks.watchRun.tapPromise).toHaveBeenCalled() - await compiler.hooks.watchRun.tapPromise.mock.calls[1][1]() + await compiler.hooks.watchRun.tapPromise.mock.calls[0][1]() if (options.existsDevupFile) { expect(stat).toHaveBeenCalledWith(plugin.options.devupFile) - await compiler.hooks.watchRun.tapPromise.mock.calls[1][1]() + await compiler.hooks.watchRun.tapPromise.mock.calls[0][1]() } else { expect(stat).not.toHaveBeenCalled() } @@ -310,7 +307,7 @@ describe('devupUIWebpackPlugin', () => { recursive: true, }) } else { - expect(mkdir).toHaveBeenCalledWith(plugin.options.cssDir, { + expect(mkdirSync).toHaveBeenCalledWith(plugin.options.cssDir, { recursive: true, }) } @@ -326,7 +323,7 @@ describe('devupUIWebpackPlugin', () => { }) expect(writeFile).not.toHaveBeenCalledWith( join(plugin.options.cssDir, 'devup-ui.css'), - getCss(), + getCss(null, true), 'utf-8', ) @@ -335,7 +332,7 @@ describe('devupUIWebpackPlugin', () => { }) expect(writeFile).toHaveBeenCalledWith( join(plugin.options.cssDir, 'devup-ui.css'), - getCss(), + getCss(null, true), 'utf-8', ) } else { diff --git a/packages/webpack-plugin/src/css-loader.ts b/packages/webpack-plugin/src/css-loader.ts index 916b8f67..0f1bce9b 100644 --- a/packages/webpack-plugin/src/css-loader.ts +++ b/packages/webpack-plugin/src/css-loader.ts @@ -14,7 +14,7 @@ const devupUICssLoader: RawLoaderDefinitionFunction<{ }> = function (source, map, meta) { const { watch } = this.getOptions() const fileNum = getFileNumByFilename(this.resourcePath) - if (!watch) return this.callback(null, getCss(fileNum)) + if (!watch) return this.callback(null, getCss(fileNum, true)) const stringSource = (this._compiler as any)?.__DEVUP_CACHE || source.toString() @@ -23,6 +23,6 @@ const devupUICssLoader: RawLoaderDefinitionFunction<{ return } prevTime = stringSource - this.callback(null, (prevData = getCss(fileNum)), map, meta) + this.callback(null, (prevData = getCss(fileNum, true)), map, meta) } export default devupUICssLoader diff --git a/packages/webpack-plugin/src/loader.ts b/packages/webpack-plugin/src/loader.ts index 6b5830fb..29368b67 100644 --- a/packages/webpack-plugin/src/loader.ts +++ b/packages/webpack-plugin/src/loader.ts @@ -6,6 +6,7 @@ import { exportClassMap, exportFileMap, exportSheet, + getCss, } from '@devup-ui/wasm' import type { RawLoaderDefinitionFunction } from 'webpack' @@ -40,28 +41,42 @@ const devupUILoader: RawLoaderDefinitionFunction = ) if (!rel.startsWith('./')) rel = `./${rel}` - const { code, css, map, css_file } = codeExtract( + const { code, css, map, cssFile, updatedBaseStyle } = codeExtract( id, source.toString(), libPackage, rel, singleCss, + false, + true, ) const sourceMap = map ? JSON.parse(map) : null + const promises: Promise[] = [] + if (updatedBaseStyle) { + // update base style + promises.push( + writeFile(join(cssDir, 'devup-ui.css'), getCss(null, false), 'utf-8'), + ) + } if (css) { const content = `${this.resourcePath} ${Date.now()}` if (watch && this._compiler) (this._compiler as any).__DEVUP_CACHE = content // should be reset css - Promise.all([ + promises.push( writeFile( - join(cssDir, basename(css_file)), + join(cssDir, basename(cssFile!)), watch ? `/* ${content} */` : css, ), - watch ? writeFile(sheetFile, exportSheet()) : null, - watch ? writeFile(classMapFile, exportClassMap()) : null, - watch ? writeFile(fileMapFile, exportFileMap()) : null, - ]) + ) + if (watch) { + promises.push( + writeFile(sheetFile, exportSheet()), + writeFile(classMapFile, exportClassMap()), + writeFile(fileMapFile, exportFileMap()), + ) + } + Promise.all(promises) .catch(console.error) .finally(() => callback(null, code, sourceMap)) return diff --git a/packages/webpack-plugin/src/plugin.ts b/packages/webpack-plugin/src/plugin.ts index 3e54ca33..a48bc031 100644 --- a/packages/webpack-plugin/src/plugin.ts +++ b/packages/webpack-plugin/src/plugin.ts @@ -1,5 +1,5 @@ -import { existsSync } from 'node:fs' -import { mkdir, readFile, stat, writeFile } from 'node:fs/promises' +import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs' +import { stat, writeFile } from 'node:fs/promises' import { createRequire } from 'node:module' import { join, resolve } from 'node:path' @@ -58,10 +58,10 @@ export class DevupUIWebpackPlugin { this.fileMapFile = join(this.options.distDir, 'fileMap.json') } - async writeDataFiles() { + writeDataFiles() { try { const content = existsSync(this.options.devupFile) - ? await readFile(this.options.devupFile, 'utf-8') + ? readFileSync(this.options.devupFile, 'utf-8') : undefined if (content) { @@ -74,7 +74,7 @@ export class DevupUIWebpackPlugin { ) if (interfaceCode) { - await writeFile( + writeFileSync( join(this.options.distDir, 'theme.d.ts'), interfaceCode, { @@ -89,61 +89,40 @@ export class DevupUIWebpackPlugin { console.error(error) registerTheme({}) } - - await Promise.all([ - !existsSync(this.options.cssDir) - ? mkdir(this.options.cssDir, { recursive: true }) - : Promise.resolve(), - this.options.watch - ? writeFile(join(this.options.cssDir, 'devup-ui.css'), getCss()) - : Promise.resolve(), - ]) + if (!existsSync(this.options.cssDir)) + mkdirSync(this.options.cssDir, { recursive: true }) + if (this.options.watch) + writeFileSync( + join(this.options.cssDir, 'devup-ui.css'), + getCss(null, false), + ) } apply(compiler: Compiler) { setDebug(this.options.debug) - let initialized = false const existsDevup = existsSync(this.options.devupFile) - compiler.hooks[this.options.watch ? 'watchRun' : 'beforeRun'].tapPromise( - 'DevupUIWebpackPlugin', - async () => { - if (initialized) return - initialized = true - // read devup.json - if (!existsSync(this.options.distDir)) - await mkdir(this.options.distDir, { recursive: true }) - await writeFile(join(this.options.distDir, '.gitignore'), '*', 'utf-8') + // read devup.json + if (!existsSync(this.options.distDir)) + mkdirSync(this.options.distDir, { recursive: true }) + writeFileSync(join(this.options.distDir, '.gitignore'), '*', 'utf-8') - if (this.options.watch) { - try { - // load sheet - await Promise.all([ - existsSync(this.sheetFile) - ? readFile(this.sheetFile, 'utf-8').then((content) => - importSheet(JSON.parse(content)), - ) - : Promise.resolve(), - existsSync(this.classMapFile) - ? readFile(this.classMapFile, 'utf-8').then((content) => - importClassMap(JSON.parse(content)), - ) - : Promise.resolve(), - existsSync(this.fileMapFile) - ? readFile(this.fileMapFile, 'utf-8').then((content) => - importFileMap(JSON.parse(content)), - ) - : Promise.resolve(), - ]) - } catch (error) { - console.error(error) - importSheet({}) - importClassMap({}) - importFileMap({}) - } - } - await this.writeDataFiles() - }, - ) + if (this.options.watch) { + try { + // load sheet + if (existsSync(this.sheetFile)) + importSheet(JSON.parse(readFileSync(this.sheetFile, 'utf-8'))) + if (existsSync(this.classMapFile)) + importClassMap(JSON.parse(readFileSync(this.classMapFile, 'utf-8'))) + if (existsSync(this.fileMapFile)) + importFileMap(JSON.parse(readFileSync(this.fileMapFile, 'utf-8'))) + } catch (error) { + console.error(error) + importSheet({}) + importClassMap({}) + importFileMap({}) + } + } + this.writeDataFiles() if (this.options.watch) { let lastModifiedTime: number | null = null @@ -153,7 +132,7 @@ export class DevupUIWebpackPlugin { const modifiedTime = stats.mtimeMs if (lastModifiedTime && lastModifiedTime !== modifiedTime) - await this.writeDataFiles() + this.writeDataFiles() lastModifiedTime = modifiedTime } @@ -175,7 +154,7 @@ export class DevupUIWebpackPlugin { // write css file await writeFile( join(this.options.cssDir, 'devup-ui.css'), - getCss(), + getCss(null, false), 'utf-8', ) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9eea54f0..a2c63c14 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: devDependencies: '@changesets/cli': specifier: ^2.29.6 - version: 2.29.6(@types/node@24.3.0) + version: 2.29.6(@types/node@24.3.1) '@devup-ui/vite-plugin': specifier: workspace:* version: link:packages/vite-plugin @@ -24,11 +24,11 @@ importers: specifier: ^16.3.0 version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@types/node': - specifier: ^24.3.0 - version: 24.3.0 + specifier: ^24.3.1 + version: 24.3.1 '@vitest/coverage-v8': specifier: ^3.2.4 - version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1)) + version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1)) eslint: specifier: ^9.34.0 version: 9.34.0(jiti@2.5.1) @@ -40,7 +40,7 @@ importers: version: 18.0.1 vitest: specifier: ^3.2.4 - version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) apps/landing: dependencies: @@ -54,14 +54,14 @@ importers: specifier: workspace:* version: link:../../packages/reset-css '@mdx-js/loader': - specifier: ^3.1.0 - version: 3.1.0(acorn@8.15.0)(webpack@5.101.3) + specifier: ^3.1.1 + version: 3.1.1(acorn@8.15.0)(webpack@5.101.3) '@mdx-js/react': - specifier: ^3.1.0 - version: 3.1.0(@types/react@19.1.12)(react@19.1.1) + specifier: ^3.1.1 + version: 3.1.1(@types/react@19.1.12)(react@19.1.1) '@next/mdx': specifier: ^15.5.2 - version: 15.5.2(@mdx-js/loader@3.1.0(acorn@8.15.0)(webpack@5.101.3))(@mdx-js/react@3.1.0(@types/react@19.1.12)(react@19.1.1)) + version: 15.5.2(@mdx-js/loader@3.1.1(acorn@8.15.0)(webpack@5.101.3))(@mdx-js/react@3.1.1(@types/react@19.1.12)(react@19.1.1)) '@types/mdx': specifier: ^2.0.13 version: 2.0.13 @@ -165,11 +165,11 @@ importers: specifier: workspace:* version: link:../../packages/rsbuild-plugin '@rsbuild/core': - specifier: ^1.5.1 - version: 1.5.1 + specifier: ^1.5.3 + version: 1.5.3 '@rsbuild/plugin-react': specifier: ^1.4.0 - version: 1.4.0(@rsbuild/core@1.5.1) + version: 1.4.0(@rsbuild/core@1.5.3) apps/vite: dependencies: @@ -378,8 +378,8 @@ importers: specifier: ^11.14.1 version: 11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) '@mui/material': - specifier: 7.3.1 - version: 7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: 7.3.2 + version: 7.3.2(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) next: specifier: ^15.5.2 version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -430,38 +430,38 @@ importers: specifier: workspace:* version: link:../vite-plugin '@storybook/addon-docs': - specifier: ^9.1.3 - version: 9.1.3(@types/react@19.1.12)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) + specifier: ^9.1.4 + version: 9.1.4(@types/react@19.1.12)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))) '@storybook/addon-onboarding': - specifier: ^9.1.3 - version: 9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) + specifier: ^9.1.4 + version: 9.1.4(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))) '@storybook/react-vite': - specifier: ^9.1.3 - version: 9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rollup@4.49.0)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + specifier: ^9.1.4 + version: 9.1.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rollup@4.49.0)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) '@types/react': specifier: ^19.1.12 version: 19.1.12 eslint-plugin-storybook: - specifier: ^9.1.3 - version: 9.1.3(eslint@9.34.0(jiti@2.5.1))(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2) + specifier: ^9.1.4 + version: 9.1.4(eslint@9.34.0(jiti@2.5.1))(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2) rollup-plugin-preserve-directives: specifier: ^0.4.0 version: 0.4.0(rollup@4.49.0) storybook: - specifier: ^9.1.3 - version: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + specifier: ^9.1.4 + version: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) typescript: specifier: ^5.9.2 version: 5.9.2 vite: specifier: ^6 - version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + version: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.1)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) vitest: specifier: ^3.2.4 - version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) packages/next-plugin: dependencies: @@ -483,13 +483,13 @@ importers: version: 5.9.2 vite: specifier: ^6 - version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + version: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.1)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) vitest: specifier: ^3.2.4 - version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) packages/react: dependencies: @@ -511,10 +511,10 @@ importers: version: 5.9.2 vite: specifier: ^6 - version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + version: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.1)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) packages/reset-css: dependencies: @@ -530,10 +530,10 @@ importers: version: 5.9.2 vite: specifier: ^6 - version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + version: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.1)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) packages/rsbuild-plugin: dependencies: @@ -542,20 +542,20 @@ importers: version: link:../../bindings/devup-ui-wasm devDependencies: '@rsbuild/core': - specifier: ^1.5.1 - version: 1.5.1 + specifier: ^1.5.3 + version: 1.5.3 typescript: specifier: ^5.9.2 version: 5.9.2 vite: specifier: ^6 - version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + version: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.1)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) vitest: specifier: ^3.2.4 - version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) packages/vite-plugin: dependencies: @@ -564,14 +564,14 @@ importers: version: link:../../bindings/devup-ui-wasm vite: specifier: ^6 - version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + version: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) devDependencies: typescript: specifier: ^5.9.2 version: 5.9.2 vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.1)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) packages/webpack-plugin: dependencies: @@ -587,13 +587,13 @@ importers: version: 5.9.2 vite: specifier: ^6 - version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + version: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.1)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) vitest: specifier: ^3.2.4 - version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) packages: @@ -1882,8 +1882,8 @@ packages: '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - '@mdx-js/loader@3.1.0': - resolution: {integrity: sha512-xU/lwKdOyfXtQGqn3VnJjlDrmKXEvMi1mgYxVmukEUtVycIz1nh7oQ40bKTd4cA7rLStqu0740pnhGYxGoqsCg==} + '@mdx-js/loader@3.1.1': + resolution: {integrity: sha512-0TTacJyZ9mDmY+VefuthVshaNIyCGZHJG2fMnGaDttCt8HmjUF7SizlHJpaCDoGnN635nK1wpzfpx/Xx5S4WnQ==} peerDependencies: webpack: '>=5' peerDependenciesMeta: @@ -1893,8 +1893,8 @@ packages: '@mdx-js/mdx@3.1.0': resolution: {integrity: sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==} - '@mdx-js/react@3.1.0': - resolution: {integrity: sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==} + '@mdx-js/react@3.1.1': + resolution: {integrity: sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==} peerDependencies: '@types/react': '>=16' react: '>=16' @@ -1930,16 +1930,16 @@ packages: '@module-federation/webpack-bundler-runtime@0.18.0': resolution: {integrity: sha512-TEvErbF+YQ+6IFimhUYKK3a5wapD90d90sLsNpcu2kB3QGT7t4nIluE25duXuZDVUKLz86tEPrza/oaaCWTpvQ==} - '@mui/core-downloads-tracker@7.3.1': - resolution: {integrity: sha512-+mIK1Z0BhOaQ0vCgOkT1mSrIpEHLo338h4/duuL4TBLXPvUMit732mnwJY3W40Avy30HdeSfwUAAGRkKmwRaEQ==} + '@mui/core-downloads-tracker@7.3.2': + resolution: {integrity: sha512-AOyfHjyDKVPGJJFtxOlept3EYEdLoar/RvssBTWVAvDJGIE676dLi2oT/Kx+FoVXFoA/JdV7DEMq/BVWV3KHRw==} - '@mui/material@7.3.1': - resolution: {integrity: sha512-Xf6Shbo03YmcBedZMwSpEFOwpYDtU7tC+rhAHTrA9FHk0FpsDqiQ9jUa1j/9s3HLs7KWb5mDcGnlwdh9Q9KAag==} + '@mui/material@7.3.2': + resolution: {integrity: sha512-qXvbnawQhqUVfH1LMgMaiytP+ZpGoYhnGl7yYq2x57GYzcFL/iPzSZ3L30tlbwEjSVKNYcbiKO8tANR1tadjUg==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.5.0 '@emotion/styled': ^11.3.0 - '@mui/material-pigment-css': ^7.3.1 + '@mui/material-pigment-css': ^7.3.2 '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 react: ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -1953,8 +1953,8 @@ packages: '@types/react': optional: true - '@mui/private-theming@7.3.1': - resolution: {integrity: sha512-WU3YLkKXii/x8ZEKnrLKsPwplCVE11yZxUvlaaZSIzCcI3x2OdFC8eMlNy74hVeUsYQvzzX1Es/k4ARPlFvpPQ==} + '@mui/private-theming@7.3.2': + resolution: {integrity: sha512-ha7mFoOyZGJr75xeiO9lugS3joRROjc8tG1u4P50dH0KR7bwhHznVMcYg7MouochUy0OxooJm/OOSpJ7gKcMvg==} engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -1963,8 +1963,8 @@ packages: '@types/react': optional: true - '@mui/styled-engine@7.3.1': - resolution: {integrity: sha512-Nqo6OHjvJpXJ1+9TekTE//+8RybgPQUKwns2Lh0sq+8rJOUSUKS3KALv4InSOdHhIM9Mdi8/L7LTF1/Ky6D6TQ==} + '@mui/styled-engine@7.3.2': + resolution: {integrity: sha512-PkJzW+mTaek4e0nPYZ6qLnW5RGa0KN+eRTf5FA2nc7cFZTeM+qebmGibaTLrgQBy3UpcpemaqfzToBNkzuxqew==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.4.1 @@ -1976,8 +1976,8 @@ packages: '@emotion/styled': optional: true - '@mui/system@7.3.1': - resolution: {integrity: sha512-mIidecvcNVpNJMdPDmCeoSL5zshKBbYPcphjuh6ZMjhybhqhZ4mX6k9zmIWh6XOXcqRQMg5KrcjnO0QstrNj3w==} + '@mui/system@7.3.2': + resolution: {integrity: sha512-9d8JEvZW+H6cVkaZ+FK56R53vkJe3HsTpcjMUtH8v1xK6Y1TjzHdZ7Jck02mGXJsE6MQGWVs3ogRHTQmS9Q/rA==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -1992,16 +1992,16 @@ packages: '@types/react': optional: true - '@mui/types@7.4.5': - resolution: {integrity: sha512-ZPwlAOE3e8C0piCKbaabwrqZbW4QvWz0uapVPWya7fYj6PeDkl5sSJmomT7wjOcZGPB48G/a6Ubidqreptxz4g==} + '@mui/types@7.4.6': + resolution: {integrity: sha512-NVBbIw+4CDMMppNamVxyTccNv0WxtDb7motWDlMeSC8Oy95saj1TIZMGynPpFLePt3yOD8TskzumeqORCgRGWw==} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: '@types/react': optional: true - '@mui/utils@7.3.1': - resolution: {integrity: sha512-/31y4wZqVWa0jzMnzo6JPjxwP6xXy4P3+iLbosFg/mJQowL1KIou0LC+lquWW60FKVbKz5ZUWBg2H3jausa0pw==} + '@mui/utils@7.3.2': + resolution: {integrity: sha512-4DMWQGenOdLnM3y/SdFQFwKsCLM+mqxzvoWp9+x2XdEzXapkznauHLiXtSohHs/mc0+5/9UACt1GdugCX2te5g==} engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -2213,8 +2213,8 @@ packages: cpu: [x64] os: [win32] - '@rsbuild/core@1.5.1': - resolution: {integrity: sha512-ScXC3nm1drXDyT9OahHxXJ8Tg+1oE5IN2+ZwJzNl0cLJD8Jmbjl4zMUN7zZdRPqjaTCz67IAjws+HN+PSKHBaw==} + '@rsbuild/core@1.5.3': + resolution: {integrity: sha512-asJYYmpMmYVEPgqR2hoPlW5pFtMYf7+dq9/u8vP0uY+Xbi9aUoguskc783qSi1yu9KvZwDbwpbfCuoBAt8anIA==} engines: {node: '>=18.12.0'} hasBin: true @@ -2223,60 +2223,60 @@ packages: peerDependencies: '@rsbuild/core': 1.x - '@rspack/binding-darwin-arm64@1.5.0': - resolution: {integrity: sha512-7909YLNnKf0BYxiCpCWOk13WyWS4493Kxk1NQwy9KPLY9ydQExk84KVsix2NuNBaI8Pnk3aVLBPJiSNXtHLjnA==} + '@rspack/binding-darwin-arm64@1.5.2': + resolution: {integrity: sha512-aO76T6VQvAFt1LJNRA5aPOJ+szeTLlzC5wubsnxgWWjG53goP+Te35kFjDIDe+9VhKE/XqRId6iNAymaEsN+Uw==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@1.5.0': - resolution: {integrity: sha512-poGuQsGKCMQqSswgrz8X+frqMVTdmtzUDyvi/p9BLwW+2DwWgmywU8jwE+BYtjfWp1tErBSTlLxmEPQTdcIQgQ==} + '@rspack/binding-darwin-x64@1.5.2': + resolution: {integrity: sha512-XNSmUOwdGs2PEdCKTFCC0/vu/7U9nMhAlbHJKlmdt0V4iPvFyaNWxkNdFqzLc05jlJOfgDdwbwRb91y9IcIIFQ==} cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@1.5.0': - resolution: {integrity: sha512-Bvmk8h3tRhN9UgOtH+vK0SgFM3qEO36eJz7oddOl4lJQxBf2GNA87bGtkMtX+AVPz/PUn7r82uWxrlVNQHAbFg==} + '@rspack/binding-linux-arm64-gnu@1.5.2': + resolution: {integrity: sha512-rNxRfgC5khlrhyEP6y93+45uQ4TI7CdtWqh5PKsaR6lPepG1rH4L8VE+etejSdhzXH6wQ76Rw4wzb96Hx+5vuQ==} cpu: [arm64] os: [linux] - '@rspack/binding-linux-arm64-musl@1.5.0': - resolution: {integrity: sha512-bH7UwkbACDYT37YnN9kkhaF9niFFK9ndcdNvYFFr1oUT4W9Ie3V9b41EXijqp3pyh0mDSeeLPFY0aEx1t3e7Pw==} + '@rspack/binding-linux-arm64-musl@1.5.2': + resolution: {integrity: sha512-kTFX+KsGgArWC5q+jJWz0K/8rfVqZOn1ojv1xpCCcz/ogWRC/qhDGSOva6Wandh157BiR93Vfoe1gMvgjpLe5g==} cpu: [arm64] os: [linux] - '@rspack/binding-linux-x64-gnu@1.5.0': - resolution: {integrity: sha512-xZ5dwNrE5KtpQyMd9israpJTcTQ3UYUUq23fTcNc79xE5aspkGixDFAYoql4YkhO0O+JWRmdSaFAn6jD+IQWQA==} + '@rspack/binding-linux-x64-gnu@1.5.2': + resolution: {integrity: sha512-Lh/6WZGq30lDV6RteQQu7Phw0RH2Z1f4kGR+MsplJ6X4JpnziDow+9oxKdu6FvFHWxHByncpveVeInusQPmL7Q==} cpu: [x64] os: [linux] - '@rspack/binding-linux-x64-musl@1.5.0': - resolution: {integrity: sha512-mv65jYvcyYPkPZJ9kjSvTAcH0o7C5jfICWCQcMmN1tCGD3b8gmf9GqSZ8e+W/JkuvrJ05qTo/PvEq9nhu+pNIg==} + '@rspack/binding-linux-x64-musl@1.5.2': + resolution: {integrity: sha512-CsLC/SIOIFs6CBmusSAF0FECB62+J36alMdwl7j6TgN6nX3UQQapnL1aVWuQaxU6un/1Vpim0V/EZbUYIdJQ4g==} cpu: [x64] os: [linux] - '@rspack/binding-wasm32-wasi@1.5.0': - resolution: {integrity: sha512-8rVpl6xfaAFJgo1wCd+emksfl+/8nlehrtkmjY9bj79Ou+kp07L9e1B+UU0jfs8e7aLPntQuF68kzLHwYLzWIQ==} + '@rspack/binding-wasm32-wasi@1.5.2': + resolution: {integrity: sha512-cuVbGr1b4q0Z6AtEraI3becZraPMMgZtZPRaIsVLeDXCmxup/maSAR3T6UaGf4Q2SNcFfjw4neGz5UJxPK8uvA==} cpu: [wasm32] - '@rspack/binding-win32-arm64-msvc@1.5.0': - resolution: {integrity: sha512-dWSmNm+GR6WSkOwbhlUcot4Oqwyon+1PRZ9E0vIMFHKGvESf9CQjgHAX0QE9G0kJmRM5x3I16J4x44Kw3W/98Q==} + '@rspack/binding-win32-arm64-msvc@1.5.2': + resolution: {integrity: sha512-4vJQdzRTSuvmvL3vrOPuiA7f9v9frNc2RFWDxqg+GYt0YAjDStssp+lkVbRYyXnTYVJkARSuO6N+BOiI+kLdsQ==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@1.5.0': - resolution: {integrity: sha512-YtOrFEkwhO3Y3sY6Jq0OOYPY7NBTNYuwJ6epTgzPEDGs2cBnwZfzhq0jmD/koWtv1L9+twX95vKosBdauF0tNA==} + '@rspack/binding-win32-ia32-msvc@1.5.2': + resolution: {integrity: sha512-zPbu3lx/NrNxdjZzTIjwD0mILUOpfhuPdUdXIFiOAO8RiWSeQpYOvyI061s/+bNOmr4A+Z0uM0dEoOClfkhUFg==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@1.5.0': - resolution: {integrity: sha512-V4fcPVYWJgDkIkSsFwmUdwC9lkL8+1dzDOwyTWe6KW2MYHF2D148WPHNyVVE6gum12TShpbIsh0j4NiiMhkMtw==} + '@rspack/binding-win32-x64-msvc@1.5.2': + resolution: {integrity: sha512-duLNUTshX38xhC10/W9tpkPca7rOifP2begZjdb1ikw7C4AI0I7VnBnYt8qPSxGISoclmhOBxU/LuAhS8jMMlg==} cpu: [x64] os: [win32] - '@rspack/binding@1.5.0': - resolution: {integrity: sha512-UGXQmwEu2gdO+tnGv2q4rOWJdWioy6dlLXeZOLYAZVh3mrfKJhZWtDEygX9hCdE5thWNRTlEvx30QQchJAszIQ==} + '@rspack/binding@1.5.2': + resolution: {integrity: sha512-NKiBcsxmAzFDYRnK2ZHWbTtDFVT5/704eK4OfpgsDXPMkaMnBKijMKNgP5pbe18X4rUlz+8HnGm4+Xllo9EESw==} - '@rspack/core@1.5.0': - resolution: {integrity: sha512-eEtiKV+CUcAtnt1K+eiHDzmBXQcNM8CfCXOzr0+gHGp4w4Zks2B8RF36sYD03MM2bg8VRXXsf0MicQ8FvRMCOg==} + '@rspack/core@1.5.2': + resolution: {integrity: sha512-ifjHqLczC81d1xjXPXCzxTFKNOFsEzuuLN44cMnyzQ/GWi4B48fyX7JHndWE7Lxd54cW1O9Ik7AdBN3Gq891EA==} engines: {node: '>=18.12.0'} peerDependencies: '@swc/helpers': '>=0.5.1' @@ -2319,26 +2319,26 @@ packages: '@rushstack/ts-command-line@5.0.2': resolution: {integrity: sha512-+AkJDbu1GFMPIU8Sb7TLVXDv/Q7Mkvx+wAjEl8XiXVVq+p1FmWW6M3LYpJMmoHNckSofeMecgWg5lfMwNAAsEQ==} - '@storybook/addon-docs@9.1.3': - resolution: {integrity: sha512-iCzuHRyUgir2+ExqPO4ouxm90zW+6dkNuB4lyyFwNU10slJhVT8yGPk8PVOT6LhXMIii+7Hqc4dB0tj+kLOW/A==} + '@storybook/addon-docs@9.1.4': + resolution: {integrity: sha512-ueGaA++UOICrM+ZyrN35HNt7JGgrKkX/X+RJwoL3UAbK1Nkbw1vNu7Rz+W4PRqU6gpRZ6xYFPkgJ2ZaPxCMJbg==} peerDependencies: - storybook: ^9.1.3 + storybook: ^9.1.4 - '@storybook/addon-onboarding@9.1.3': - resolution: {integrity: sha512-42orn7UUxan558WiPFAkuIck/CgkLOgk55czWnuesMyaG7qmZy6QBEtZo1ZA7mLI9F8MW26VwT/4eCE47HCc7g==} + '@storybook/addon-onboarding@9.1.4': + resolution: {integrity: sha512-18dJvrv4mMbx8d6X2s+PQipRBnOQNFGRiXX7urisjphtUCLYoiy6LJVqMiH0ISGuler4BO2+44gaVwYMkuGrOg==} peerDependencies: - storybook: ^9.1.3 + storybook: ^9.1.4 - '@storybook/builder-vite@9.1.3': - resolution: {integrity: sha512-bstS/GsVJ5zVkRKAJociocA2omxU4CaNAP58fxS280JiRYgcrRaydDd7vwk6iGJ3xWbzwV0wH8SP54LVNyRY6Q==} + '@storybook/builder-vite@9.1.4': + resolution: {integrity: sha512-YtWl35EU/I4S00yKYZO7hgfy7ERChFi6/G/hwlV+hLbNLtQm+aS8nhvrJpJvjffP+5p2pS38gRx8OgXXt7cMPQ==} peerDependencies: - storybook: ^9.1.3 + storybook: ^9.1.4 vite: ^6 - '@storybook/csf-plugin@9.1.3': - resolution: {integrity: sha512-wqh+tTCX2WZqVDVjhk/a6upsyYj/Kc85Wf6ywPx4pcFYxQZxiKF/wtuM9yzEpZC6fZHNvlKkzXWvP4wJOnm+zg==} + '@storybook/csf-plugin@9.1.4': + resolution: {integrity: sha512-t7W6NpH7ZJ9sfBW8Snck4P7m8NWQNGgSgDNnXtjEgH4llgJveNpWy59ho+A4/xcC4Jr/0eTbbhngKXn5hkqctw==} peerDependencies: - storybook: ^9.1.3 + storybook: ^9.1.4 '@storybook/global@5.0.0': resolution: {integrity: sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==} @@ -2350,29 +2350,29 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - '@storybook/react-dom-shim@9.1.3': - resolution: {integrity: sha512-zIgFwZqV8cvE+lzJDcD13rItxoWyYNUWu7eJQAnHz5RnyHhpu6rFgQej7i6J3rPmy9xVe+Rq6XsXgDNs6pIekQ==} + '@storybook/react-dom-shim@9.1.4': + resolution: {integrity: sha512-vGBmPMgae8zkS0r2u/1WgpYMKjQm7EdTL7hJ7WA9K4j3j9dj9Y+ok6xIotYqggcI04zTyKeZiv9vf/235Cuqpw==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.1.3 + storybook: ^9.1.4 - '@storybook/react-vite@9.1.3': - resolution: {integrity: sha512-iNRRxA5G9Yaw5etbRdCMnJtjI1VkzA7juc+/caVhKKut25sI8cOF4GRPLCbotLz9xmitQR2X7beZMPPVIYk86A==} + '@storybook/react-vite@9.1.4': + resolution: {integrity: sha512-aJVbezdbloEtn9vVaDQX+KxxDtg9Se4VBvmOmo8f1D3M+sWnNi7YhDn44lmxve2XxAHrR+nugqg642H4T5cZqg==} engines: {node: '>=20.0.0'} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.1.3 + storybook: ^9.1.4 vite: ^6 - '@storybook/react@9.1.3': - resolution: {integrity: sha512-CgJMk4Y8EfoFxWiTB53QxnN+nQbAkw+NBaNjsaaeDNOE1R0ximP/fn5b2jcLvM+b5ojjJiJL1QCzFyoPWImHIQ==} + '@storybook/react@9.1.4': + resolution: {integrity: sha512-n+UOugEsHjvdmanTqc9WOi/qGQy3EjoK7xLBEcE6qw+jHgufHemx9ZxNbmz1XxoRGcLkt0+3Qhck6ThIJwJX8Q==} engines: {node: '>=20.0.0'} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.1.3 + storybook: ^9.1.4 typescript: '>= 4.9.x' peerDependenciesMeta: typescript: @@ -2496,6 +2496,9 @@ packages: '@types/node@24.3.0': resolution: {integrity: sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==} + '@types/node@24.3.1': + resolution: {integrity: sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==} + '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -3532,12 +3535,12 @@ packages: peerDependencies: eslint: '>=5.0.0' - eslint-plugin-storybook@9.1.3: - resolution: {integrity: sha512-CR576JrlvxLY2ebJIyR6z/YWy6+iyVsB7ORjPrwM3a9SshlRnAntdEn6hyMYbQmFoPIv7kYcRiDznDXBQ/jitA==} + eslint-plugin-storybook@9.1.4: + resolution: {integrity: sha512-IiIqGFo524PDELajyDLMtceikHpDUKBF6QlH5oJECy+xV3e0DHJkcuyokwxWveb1yg7tHfTLimCKNix2ftRETg==} engines: {node: '>=20.0.0'} peerDependencies: eslint: '>=8' - storybook: ^9.1.3 + storybook: ^9.1.4 eslint-plugin-unused-imports@4.2.0: resolution: {integrity: sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==} @@ -5078,8 +5081,8 @@ packages: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} - storybook@9.1.3: - resolution: {integrity: sha512-Sm+qP3iGb/QKx/jTYdfE0mIeTmA2HF+5k9fD70S9oOJq3F9UdW8MLgs+5PE+E/xAfDjZU4OWAKEOyA6EYIvQHg==} + storybook@9.1.4: + resolution: {integrity: sha512-xMMUKQzAbVJlDUNbCyZ67fJSnomGv+SQw5PDcRWwhYvU72cwhBvGf/UYXi/ylSzMaUHudhOmmn1lZH88lcShsg==} hasBin: true peerDependencies: prettier: ^2 || ^3 @@ -6440,7 +6443,7 @@ snapshots: dependencies: '@changesets/types': 6.1.0 - '@changesets/cli@2.29.6(@types/node@24.3.0)': + '@changesets/cli@2.29.6(@types/node@24.3.1)': dependencies: '@changesets/apply-release-plan': 7.0.12 '@changesets/assemble-release-plan': 6.0.9 @@ -6456,7 +6459,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.1(@types/node@24.3.0) + '@inquirer/external-editor': 1.0.1(@types/node@24.3.1) '@manypkg/get-packages': 1.1.3 ansi-colors: 4.1.3 ci-info: 3.9.0 @@ -6952,12 +6955,12 @@ snapshots: '@img/sharp-win32-x64@0.34.3': optional: true - '@inquirer/external-editor@1.0.1(@types/node@24.3.0)': + '@inquirer/external-editor@1.0.1(@types/node@24.3.1)': dependencies: chardet: 2.1.0 iconv-lite: 0.6.3 optionalDependencies: - '@types/node': 24.3.0 + '@types/node': 24.3.1 '@internationalized/date@3.8.2': dependencies: @@ -6984,12 +6987,12 @@ snapshots: '@istanbuljs/schema@0.1.3': {} - '@joshwooding/vite-plugin-react-docgen-typescript@0.6.1(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))': + '@joshwooding/vite-plugin-react-docgen-typescript@0.6.1(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))': dependencies: glob: 10.4.5 magic-string: 0.30.18 react-docgen-typescript: 2.4.0(typescript@5.9.2) - vite: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + vite: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) optionalDependencies: typescript: 5.9.2 @@ -7109,7 +7112,7 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 - '@mdx-js/loader@3.1.0(acorn@8.15.0)(webpack@5.101.3)': + '@mdx-js/loader@3.1.1(acorn@8.15.0)(webpack@5.101.3)': dependencies: '@mdx-js/mdx': 3.1.0(acorn@8.15.0) source-map: 0.7.6 @@ -7149,7 +7152,7 @@ snapshots: - acorn - supports-color - '@mdx-js/react@3.1.0(@types/react@19.1.12)(react@19.1.1)': + '@mdx-js/react@3.1.1(@types/react@19.1.12)(react@19.1.1)': dependencies: '@types/mdx': 2.0.13 '@types/react': 19.1.12 @@ -7163,6 +7166,14 @@ snapshots: transitivePeerDependencies: - '@types/node' + '@microsoft/api-extractor-model@7.30.7(@types/node@24.3.1)': + dependencies: + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + '@rushstack/node-core-library': 5.14.0(@types/node@24.3.1) + transitivePeerDependencies: + - '@types/node' + '@microsoft/api-extractor@7.52.11(@types/node@24.3.0)': dependencies: '@microsoft/api-extractor-model': 7.30.7(@types/node@24.3.0) @@ -7181,6 +7192,24 @@ snapshots: transitivePeerDependencies: - '@types/node' + '@microsoft/api-extractor@7.52.11(@types/node@24.3.1)': + dependencies: + '@microsoft/api-extractor-model': 7.30.7(@types/node@24.3.1) + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + '@rushstack/node-core-library': 5.14.0(@types/node@24.3.1) + '@rushstack/rig-package': 0.5.3 + '@rushstack/terminal': 0.15.4(@types/node@24.3.1) + '@rushstack/ts-command-line': 5.0.2(@types/node@24.3.1) + lodash: 4.17.21 + minimatch: 10.0.3 + resolve: 1.22.10 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.8.2 + transitivePeerDependencies: + - '@types/node' + '@microsoft/tsdoc-config@0.17.1': dependencies: '@microsoft/tsdoc': 0.15.1 @@ -7215,15 +7244,15 @@ snapshots: '@module-federation/runtime': 0.18.0 '@module-federation/sdk': 0.18.0 - '@mui/core-downloads-tracker@7.3.1': {} + '@mui/core-downloads-tracker@7.3.2': {} - '@mui/material@7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@mui/material@7.3.2(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 - '@mui/core-downloads-tracker': 7.3.1 - '@mui/system': 7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) - '@mui/types': 7.4.5(@types/react@19.1.12) - '@mui/utils': 7.3.1(@types/react@19.1.12)(react@19.1.1) + '@mui/core-downloads-tracker': 7.3.2 + '@mui/system': 7.3.2(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) + '@mui/types': 7.4.6(@types/react@19.1.12) + '@mui/utils': 7.3.2(@types/react@19.1.12)(react@19.1.1) '@popperjs/core': 2.11.8 '@types/react-transition-group': 4.4.12(@types/react@19.1.12) clsx: 2.1.1 @@ -7238,16 +7267,16 @@ snapshots: '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) '@types/react': 19.1.12 - '@mui/private-theming@7.3.1(@types/react@19.1.12)(react@19.1.1)': + '@mui/private-theming@7.3.2(@types/react@19.1.12)(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 - '@mui/utils': 7.3.1(@types/react@19.1.12)(react@19.1.1) + '@mui/utils': 7.3.2(@types/react@19.1.12)(react@19.1.1) prop-types: 15.8.1 react: 19.1.1 optionalDependencies: '@types/react': 19.1.12 - '@mui/styled-engine@7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(react@19.1.1)': + '@mui/styled-engine@7.3.2(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 '@emotion/cache': 11.14.0 @@ -7260,13 +7289,13 @@ snapshots: '@emotion/react': 11.14.0(@types/react@19.1.12)(react@19.1.1) '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) - '@mui/system@7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1)': + '@mui/system@7.3.2(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 - '@mui/private-theming': 7.3.1(@types/react@19.1.12)(react@19.1.1) - '@mui/styled-engine': 7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(react@19.1.1) - '@mui/types': 7.4.5(@types/react@19.1.12) - '@mui/utils': 7.3.1(@types/react@19.1.12)(react@19.1.1) + '@mui/private-theming': 7.3.2(@types/react@19.1.12)(react@19.1.1) + '@mui/styled-engine': 7.3.2(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(react@19.1.1) + '@mui/types': 7.4.6(@types/react@19.1.12) + '@mui/utils': 7.3.2(@types/react@19.1.12)(react@19.1.1) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 @@ -7276,16 +7305,16 @@ snapshots: '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) '@types/react': 19.1.12 - '@mui/types@7.4.5(@types/react@19.1.12)': + '@mui/types@7.4.6(@types/react@19.1.12)': dependencies: '@babel/runtime': 7.28.3 optionalDependencies: '@types/react': 19.1.12 - '@mui/utils@7.3.1(@types/react@19.1.12)(react@19.1.1)': + '@mui/utils@7.3.2(@types/react@19.1.12)(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 - '@mui/types': 7.4.5(@types/react@19.1.12) + '@mui/types': 7.4.6(@types/react@19.1.12) '@types/prop-types': 15.7.15 clsx: 2.1.1 prop-types: 15.8.1 @@ -7303,12 +7332,12 @@ snapshots: '@next/env@15.5.2': {} - '@next/mdx@15.5.2(@mdx-js/loader@3.1.0(acorn@8.15.0)(webpack@5.101.3))(@mdx-js/react@3.1.0(@types/react@19.1.12)(react@19.1.1))': + '@next/mdx@15.5.2(@mdx-js/loader@3.1.1(acorn@8.15.0)(webpack@5.101.3))(@mdx-js/react@3.1.1(@types/react@19.1.12)(react@19.1.1))': dependencies: source-map: 0.7.6 optionalDependencies: - '@mdx-js/loader': 3.1.0(acorn@8.15.0)(webpack@5.101.3) - '@mdx-js/react': 3.1.0(@types/react@19.1.12)(react@19.1.1) + '@mdx-js/loader': 3.1.1(acorn@8.15.0)(webpack@5.101.3) + '@mdx-js/react': 3.1.1(@types/react@19.1.12)(react@19.1.1) '@next/swc-darwin-arm64@15.5.2': optional: true @@ -7425,71 +7454,71 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.49.0': optional: true - '@rsbuild/core@1.5.1': + '@rsbuild/core@1.5.3': dependencies: - '@rspack/core': 1.5.0(@swc/helpers@0.5.17) + '@rspack/core': 1.5.2(@swc/helpers@0.5.17) '@rspack/lite-tapable': 1.0.1 '@swc/helpers': 0.5.17 core-js: 3.45.1 jiti: 2.5.1 - '@rsbuild/plugin-react@1.4.0(@rsbuild/core@1.5.1)': + '@rsbuild/plugin-react@1.4.0(@rsbuild/core@1.5.3)': dependencies: - '@rsbuild/core': 1.5.1 + '@rsbuild/core': 1.5.3 '@rspack/plugin-react-refresh': 1.5.0(react-refresh@0.17.0) react-refresh: 0.17.0 transitivePeerDependencies: - webpack-hot-middleware - '@rspack/binding-darwin-arm64@1.5.0': + '@rspack/binding-darwin-arm64@1.5.2': optional: true - '@rspack/binding-darwin-x64@1.5.0': + '@rspack/binding-darwin-x64@1.5.2': optional: true - '@rspack/binding-linux-arm64-gnu@1.5.0': + '@rspack/binding-linux-arm64-gnu@1.5.2': optional: true - '@rspack/binding-linux-arm64-musl@1.5.0': + '@rspack/binding-linux-arm64-musl@1.5.2': optional: true - '@rspack/binding-linux-x64-gnu@1.5.0': + '@rspack/binding-linux-x64-gnu@1.5.2': optional: true - '@rspack/binding-linux-x64-musl@1.5.0': + '@rspack/binding-linux-x64-musl@1.5.2': optional: true - '@rspack/binding-wasm32-wasi@1.5.0': + '@rspack/binding-wasm32-wasi@1.5.2': dependencies: '@napi-rs/wasm-runtime': 1.0.3 optional: true - '@rspack/binding-win32-arm64-msvc@1.5.0': + '@rspack/binding-win32-arm64-msvc@1.5.2': optional: true - '@rspack/binding-win32-ia32-msvc@1.5.0': + '@rspack/binding-win32-ia32-msvc@1.5.2': optional: true - '@rspack/binding-win32-x64-msvc@1.5.0': + '@rspack/binding-win32-x64-msvc@1.5.2': optional: true - '@rspack/binding@1.5.0': + '@rspack/binding@1.5.2': optionalDependencies: - '@rspack/binding-darwin-arm64': 1.5.0 - '@rspack/binding-darwin-x64': 1.5.0 - '@rspack/binding-linux-arm64-gnu': 1.5.0 - '@rspack/binding-linux-arm64-musl': 1.5.0 - '@rspack/binding-linux-x64-gnu': 1.5.0 - '@rspack/binding-linux-x64-musl': 1.5.0 - '@rspack/binding-wasm32-wasi': 1.5.0 - '@rspack/binding-win32-arm64-msvc': 1.5.0 - '@rspack/binding-win32-ia32-msvc': 1.5.0 - '@rspack/binding-win32-x64-msvc': 1.5.0 - - '@rspack/core@1.5.0(@swc/helpers@0.5.17)': + '@rspack/binding-darwin-arm64': 1.5.2 + '@rspack/binding-darwin-x64': 1.5.2 + '@rspack/binding-linux-arm64-gnu': 1.5.2 + '@rspack/binding-linux-arm64-musl': 1.5.2 + '@rspack/binding-linux-x64-gnu': 1.5.2 + '@rspack/binding-linux-x64-musl': 1.5.2 + '@rspack/binding-wasm32-wasi': 1.5.2 + '@rspack/binding-win32-arm64-msvc': 1.5.2 + '@rspack/binding-win32-ia32-msvc': 1.5.2 + '@rspack/binding-win32-x64-msvc': 1.5.2 + + '@rspack/core@1.5.2(@swc/helpers@0.5.17)': dependencies: '@module-federation/runtime-tools': 0.18.0 - '@rspack/binding': 1.5.0 + '@rspack/binding': 1.5.2 '@rspack/lite-tapable': 1.0.1 optionalDependencies: '@swc/helpers': 0.5.17 @@ -7515,6 +7544,19 @@ snapshots: optionalDependencies: '@types/node': 24.3.0 + '@rushstack/node-core-library@5.14.0(@types/node@24.3.1)': + dependencies: + ajv: 8.13.0 + ajv-draft-04: 1.0.0(ajv@8.13.0) + ajv-formats: 3.0.1(ajv@8.13.0) + fs-extra: 11.3.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.10 + semver: 7.5.4 + optionalDependencies: + '@types/node': 24.3.1 + '@rushstack/rig-package@0.5.3': dependencies: resolve: 1.22.10 @@ -7527,6 +7569,13 @@ snapshots: optionalDependencies: '@types/node': 24.3.0 + '@rushstack/terminal@0.15.4(@types/node@24.3.1)': + dependencies: + '@rushstack/node-core-library': 5.14.0(@types/node@24.3.1) + supports-color: 8.1.1 + optionalDependencies: + '@types/node': 24.3.1 + '@rushstack/ts-command-line@5.0.2(@types/node@24.3.0)': dependencies: '@rushstack/terminal': 0.15.4(@types/node@24.3.0) @@ -7536,33 +7585,42 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@storybook/addon-docs@9.1.3(@types/react@19.1.12)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))': + '@rushstack/ts-command-line@5.0.2(@types/node@24.3.1)': dependencies: - '@mdx-js/react': 3.1.0(@types/react@19.1.12)(react@19.1.1) - '@storybook/csf-plugin': 9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) + '@rushstack/terminal': 0.15.4(@types/node@24.3.1) + '@types/argparse': 1.0.38 + argparse: 1.0.10 + string-argv: 0.3.2 + transitivePeerDependencies: + - '@types/node' + + '@storybook/addon-docs@9.1.4(@types/react@19.1.12)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))': + dependencies: + '@mdx-js/react': 3.1.1(@types/react@19.1.12)(react@19.1.1) + '@storybook/csf-plugin': 9.1.4(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))) '@storybook/icons': 1.4.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@storybook/react-dom-shim': 9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) + '@storybook/react-dom-shim': 9.1.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + storybook: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) ts-dedent: 2.2.0 transitivePeerDependencies: - '@types/react' - '@storybook/addon-onboarding@9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))': + '@storybook/addon-onboarding@9.1.4(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))': dependencies: - storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + storybook: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) - '@storybook/builder-vite@9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))': + '@storybook/builder-vite@9.1.4(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))': dependencies: - '@storybook/csf-plugin': 9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) - storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + '@storybook/csf-plugin': 9.1.4(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))) + storybook: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) ts-dedent: 2.2.0 - vite: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + vite: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) - '@storybook/csf-plugin@9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))': + '@storybook/csf-plugin@9.1.4(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))': dependencies: - storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + storybook: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) unplugin: 1.16.1 '@storybook/global@5.0.0': {} @@ -7572,39 +7630,39 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - '@storybook/react-dom-shim@9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))': + '@storybook/react-dom-shim@9.1.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))': dependencies: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + storybook: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) - '@storybook/react-vite@9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rollup@4.49.0)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))': + '@storybook/react-vite@9.1.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rollup@4.49.0)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))': dependencies: - '@joshwooding/vite-plugin-react-docgen-typescript': 0.6.1(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + '@joshwooding/vite-plugin-react-docgen-typescript': 0.6.1(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) '@rollup/pluginutils': 5.2.0(rollup@4.49.0) - '@storybook/builder-vite': 9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) - '@storybook/react': 9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2) + '@storybook/builder-vite': 9.1.4(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) + '@storybook/react': 9.1.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2) find-up: 7.0.0 magic-string: 0.30.18 react: 19.1.1 react-docgen: 8.0.1 react-dom: 19.1.1(react@19.1.1) resolve: 1.22.10 - storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + storybook: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) tsconfig-paths: 4.2.0 - vite: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + vite: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) transitivePeerDependencies: - rollup - supports-color - typescript - '@storybook/react@9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)': + '@storybook/react@9.1.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)': dependencies: '@storybook/global': 5.0.0 - '@storybook/react-dom-shim': 9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) + '@storybook/react-dom-shim': 9.1.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + storybook: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) optionalDependencies: typescript: 5.9.2 @@ -7753,6 +7811,10 @@ snapshots: dependencies: undici-types: 7.10.0 + '@types/node@24.3.1': + dependencies: + undici-types: 7.10.0 + '@types/parse-json@4.0.2': {} '@types/prop-types@15.7.15': {} @@ -7783,7 +7845,7 @@ snapshots: '@types/webpack@5.28.5': dependencies: - '@types/node': 24.3.0 + '@types/node': 24.3.1 tapable: 2.2.3 webpack: 5.101.3 transitivePeerDependencies: @@ -7901,7 +7963,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1))': + '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 @@ -7916,7 +7978,7 @@ snapshots: std-env: 3.9.0 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) transitivePeerDependencies: - supports-color @@ -7928,13 +7990,13 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))': + '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.18 optionalDependencies: - vite: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + vite: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) '@vitest/pretty-format@3.2.4': dependencies: @@ -9331,11 +9393,11 @@ snapshots: dependencies: eslint: 9.34.0(jiti@2.5.1) - eslint-plugin-storybook@9.1.3(eslint@9.34.0(jiti@2.5.1))(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2): + eslint-plugin-storybook@9.1.4(eslint@9.34.0(jiti@2.5.1))(storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2): dependencies: '@typescript-eslint/utils': 8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.34.0(jiti@2.5.1) - storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + storybook: 9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) transitivePeerDependencies: - supports-color - typescript @@ -9461,7 +9523,7 @@ snapshots: eval@0.1.8: dependencies: - '@types/node': 24.3.0 + '@types/node': 24.3.1 require-like: 0.1.2 events@3.3.0: {} @@ -9994,7 +10056,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 24.3.0 + '@types/node': 24.3.1 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -11355,13 +11417,13 @@ snapshots: es-errors: 1.3.0 internal-slot: 1.1.0 - storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)): + storybook@9.1.4(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)): dependencies: '@storybook/global': 5.0.0 '@testing-library/jest-dom': 6.8.0 '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.1) '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) '@vitest/spy': 3.2.4 better-opn: 3.0.2 esbuild: 0.25.9 @@ -11721,13 +11783,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite-node@3.2.4(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1): + vite-node@3.2.4(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1): dependencies: cac: 6.7.14 debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + vite: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) transitivePeerDependencies: - '@types/node' - jiti @@ -11761,6 +11823,25 @@ snapshots: - rollup - supports-color + vite-plugin-dts@4.5.4(@types/node@24.3.1)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)): + dependencies: + '@microsoft/api-extractor': 7.52.11(@types/node@24.3.1) + '@rollup/pluginutils': 5.2.0(rollup@4.49.0) + '@volar/typescript': 2.4.23 + '@vue/language-core': 2.2.0(typescript@5.9.2) + compare-versions: 6.1.1 + debug: 4.4.1 + kolorist: 1.8.0 + local-pkg: 1.1.2 + magic-string: 0.30.18 + typescript: 5.9.2 + optionalDependencies: + vite: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) + transitivePeerDependencies: + - '@types/node' + - rollup + - supports-color + vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1): dependencies: esbuild: 0.25.9 @@ -11775,11 +11856,25 @@ snapshots: jiti: 2.5.1 terser: 5.43.1 - vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1): + vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1): + dependencies: + esbuild: 0.25.9 + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + postcss: 8.5.6 + rollup: 4.49.0 + tinyglobby: 0.2.14 + optionalDependencies: + '@types/node': 24.3.1 + fsevents: 2.3.3 + jiti: 2.5.1 + terser: 5.43.1 + + vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.3.1)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -11797,12 +11892,12 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) - vite-node: 3.2.4(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) + vite: 6.3.5(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) + vite-node: 3.2.4(@types/node@24.3.1)(jiti@2.5.1)(terser@5.43.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 - '@types/node': 24.3.0 + '@types/node': 24.3.1 happy-dom: 18.0.1 transitivePeerDependencies: - jiti