@@ -4825,6 +4825,66 @@ export default function Card({
48254825 "test.tsx" ,
48264826 r#"import { Box } from "@devup-ui/core";
48274827<Box padding={[1,,null][1]} />;
4828+ "# ,
4829+ ExtractOption {
4830+ package: "@devup-ui/core" . to_string( ) ,
4831+ css_dir: "@devup-ui/core" . to_string( ) ,
4832+ single_css: true ,
4833+ import_main_css: false ,
4834+ import_aliases: HashMap :: new( )
4835+ }
4836+ )
4837+ . unwrap( )
4838+ ) ) ;
4839+
4840+ // Array with spread + numeric index (spread captured, element found after spread)
4841+ reset_class_map ( ) ;
4842+ reset_file_map ( ) ;
4843+ assert_debug_snapshot ! ( ToBTreeSet :: from(
4844+ extract(
4845+ "test.tsx" ,
4846+ r#"import { Flex } from "@devup-ui/core";
4847+ <Flex opacity={[...arr, 1][1]} />;
4848+ "# ,
4849+ ExtractOption {
4850+ package: "@devup-ui/core" . to_string( ) ,
4851+ css_dir: "@devup-ui/core" . to_string( ) ,
4852+ single_css: true ,
4853+ import_main_css: false ,
4854+ import_aliases: HashMap :: new( )
4855+ }
4856+ )
4857+ . unwrap( )
4858+ ) ) ;
4859+
4860+ // Array with spread + numeric index out of range (etc Some fallback)
4861+ reset_class_map ( ) ;
4862+ reset_file_map ( ) ;
4863+ assert_debug_snapshot ! ( ToBTreeSet :: from(
4864+ extract(
4865+ "test.tsx" ,
4866+ r#"import { Flex } from "@devup-ui/core";
4867+ <Flex opacity={[...arr, 1][5]} />;
4868+ "# ,
4869+ ExtractOption {
4870+ package: "@devup-ui/core" . to_string( ) ,
4871+ css_dir: "@devup-ui/core" . to_string( ) ,
4872+ single_css: true ,
4873+ import_main_css: false ,
4874+ import_aliases: HashMap :: new( )
4875+ }
4876+ )
4877+ . unwrap( )
4878+ ) ) ;
4879+
4880+ // Array with spread + dynamic index
4881+ reset_class_map ( ) ;
4882+ reset_file_map ( ) ;
4883+ assert_debug_snapshot ! ( ToBTreeSet :: from(
4884+ extract(
4885+ "test.tsx" ,
4886+ r#"import { Flex } from "@devup-ui/core";
4887+ <Flex opacity={[...arr, 1][idx]} />;
48284888"# ,
48294889 ExtractOption {
48304890 package: "@devup-ui/core" . to_string( ) ,
@@ -5052,6 +5112,26 @@ export default function Card({
50525112 )
50535113 . unwrap( )
50545114 ) ) ;
5115+
5116+ // Object with spread + string literal key not matching (etc Some fallback)
5117+ reset_class_map ( ) ;
5118+ reset_file_map ( ) ;
5119+ assert_debug_snapshot ! ( ToBTreeSet :: from(
5120+ extract(
5121+ "test.tsx" ,
5122+ r#"import {Flex} from '@devup-ui/core'
5123+ <Flex opacity={{...rest, a:1, b:0.5}["nonexistent"]} />
5124+ "# ,
5125+ ExtractOption {
5126+ package: "@devup-ui/core" . to_string( ) ,
5127+ css_dir: "@devup-ui/core" . to_string( ) ,
5128+ single_css: true ,
5129+ import_main_css: false ,
5130+ import_aliases: HashMap :: new( )
5131+ }
5132+ )
5133+ . unwrap( )
5134+ ) ) ;
50555135 }
50565136
50575137 #[ test]
0 commit comments