@yahoo/uds 3.133.2 → 3.133.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,29 +12,29 @@ declare const cva: CVA<string>;
12
12
  declare const getStylesInternal: (props?: ({
13
13
  avatarIconVariantRoot?: "primary" | "secondary" | "default" | undefined;
14
14
  avatarImageVariantRoot?: "primary" | "secondary" | "default" | undefined;
15
- avatarSizeIcon?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "default" | undefined;
16
- avatarSizeRoot?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "default" | undefined;
15
+ avatarSizeIcon?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "default" | "2xs" | "3xl" | undefined;
16
+ avatarSizeRoot?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "default" | "2xs" | "3xl" | undefined;
17
17
  avatarTextVariantRoot?: "primary" | "secondary" | "default" | undefined;
18
18
  badgeSizeIcon?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
19
19
  badgeSizeRoot?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
20
- badgeVariantIcon?: "primary" | "secondary" | "brand" | "brand-secondary" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "default" | undefined;
21
- badgeVariantRoot?: "primary" | "secondary" | "brand" | "brand-secondary" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "default" | undefined;
20
+ badgeVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "default" | undefined;
21
+ badgeVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "default" | undefined;
22
22
  bannerSizeClose?: "default" | undefined;
23
23
  bannerSizeDescription?: "default" | undefined;
24
24
  bannerSizeIcon?: "default" | undefined;
25
25
  bannerSizeRoot?: "default" | undefined;
26
26
  bannerSizeTitle?: "default" | undefined;
27
- bannerVariantDescription?: "primary" | "secondary" | "brand" | "brand-secondary" | "alert" | "warning" | "info" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
28
- bannerVariantIcon?: "primary" | "secondary" | "brand" | "brand-secondary" | "alert" | "warning" | "info" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
29
- bannerVariantRoot?: "primary" | "secondary" | "brand" | "brand-secondary" | "alert" | "warning" | "info" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
30
- bannerVariantTitle?: "primary" | "secondary" | "brand" | "brand-secondary" | "alert" | "warning" | "info" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
27
+ bannerVariantDescription?: "primary" | "secondary" | "brand" | "alert" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
28
+ bannerVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
29
+ bannerVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
30
+ bannerVariantTitle?: "primary" | "secondary" | "brand" | "alert" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "warning-secondary" | "info-secondary" | "default" | "success" | "success-secondary" | undefined;
31
31
  bottomsheetVariantHandleIndicator?: "default" | undefined;
32
32
  bottomsheetVariantHeader?: "default" | undefined;
33
33
  bottomsheetVariantRoot?: "default" | undefined;
34
34
  buttonSizeIcon?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
35
35
  buttonSizeRoot?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
36
- buttonVariantIcon?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
37
- buttonVariantRoot?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
36
+ buttonVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
37
+ buttonVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
38
38
  checkboxSizeCheckbox?: "sm" | "md" | "default" | undefined;
39
39
  checkboxSizeRoot?: "sm" | "md" | "default" | undefined;
40
40
  checkboxVariantCheckbox?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
@@ -171,76 +171,76 @@ declare const getStylesInternal: (props?: ({
171
171
  tooltipVariantIcon?: "default" | undefined;
172
172
  tooltipVariantRoot?: "default" | undefined;
173
173
  tooltipVariantSvg?: "default" | undefined;
174
- color?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "muted" | "on-color" | "accent" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | undefined;
175
- placeholderColor?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "muted" | "on-color" | "accent" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | undefined;
174
+ color?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "tertiary" | "muted" | "on-color" | undefined;
175
+ placeholderColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "tertiary" | "muted" | "on-color" | undefined;
176
176
  fontFamily?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "sans" | "sans-alt" | "serif" | "serif-alt" | "mono" | undefined;
177
177
  fontSize?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
178
- fontWeight?: "light" | "medium" | "black" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "thin" | "extralight" | "regular" | "semibold" | "bold" | "extrabold" | undefined;
178
+ fontWeight?: "black" | "thin" | "medium" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "bold" | "extralight" | "light" | "regular" | "semibold" | "extrabold" | undefined;
179
179
  lineHeight?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
180
180
  letterSpacing?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
181
181
  textAlign?: "center" | "justify" | "start" | "end" | undefined;
182
- textTransform?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "none" | "uppercase" | "lowercase" | "capitalize" | undefined;
183
- spacing?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
184
- spacingHorizontal?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
185
- spacingVertical?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
186
- spacingBottom?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
187
- spacingEnd?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
188
- spacingStart?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
189
- spacingTop?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
190
- offset?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
191
- offsetVertical?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
192
- offsetHorizontal?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
193
- offsetBottom?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
194
- offsetEnd?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
195
- offsetStart?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
196
- offsetTop?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
197
- columnGap?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
198
- rowGap?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
199
- backgroundColor?: "primary" | "secondary" | "brand" | "brand-secondary" | "accent" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
200
- borderColor?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "muted" | "accent" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
201
- borderStartColor?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "muted" | "accent" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
202
- borderEndColor?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "muted" | "accent" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
203
- borderBottomColor?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "muted" | "accent" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
204
- borderTopColor?: "primary" | "secondary" | "brand" | "brand-secondary" | "tertiary" | "muted" | "accent" | "alert" | "positive" | "warning" | "info" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
205
- borderRadius?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full" | undefined;
206
- borderTopStartRadius?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full" | undefined;
207
- borderTopEndRadius?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full" | undefined;
208
- borderBottomStartRadius?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full" | undefined;
209
- borderBottomEndRadius?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full" | undefined;
210
- borderWidth?: "medium" | "thin" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thick" | undefined;
211
- borderVerticalWidth?: "medium" | "thin" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thick" | undefined;
212
- borderHorizontalWidth?: "medium" | "thin" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thick" | undefined;
213
- borderStartWidth?: "medium" | "thin" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thick" | undefined;
214
- borderEndWidth?: "medium" | "thin" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thick" | undefined;
215
- borderTopWidth?: "medium" | "thin" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thick" | undefined;
216
- borderBottomWidth?: "medium" | "thin" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thick" | undefined;
217
- avatarSize?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined;
182
+ textTransform?: "none" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "uppercase" | "lowercase" | "capitalize" | undefined;
183
+ spacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
184
+ spacingHorizontal?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
185
+ spacingVertical?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
186
+ spacingBottom?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
187
+ spacingEnd?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
188
+ spacingStart?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
189
+ spacingTop?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
190
+ offset?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
191
+ offsetVertical?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
192
+ offsetHorizontal?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
193
+ offsetBottom?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
194
+ offsetEnd?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
195
+ offsetStart?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
196
+ offsetTop?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
197
+ columnGap?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
198
+ rowGap?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
199
+ backgroundColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
200
+ borderColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
201
+ borderStartColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
202
+ borderEndColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
203
+ borderBottomColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
204
+ borderTopColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
205
+ borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
206
+ borderTopStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
207
+ borderTopEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
208
+ borderBottomStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
209
+ borderBottomEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
210
+ borderWidth?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thin" | "medium" | "thick" | undefined;
211
+ borderVerticalWidth?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thin" | "medium" | "thick" | undefined;
212
+ borderHorizontalWidth?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thin" | "medium" | "thick" | undefined;
213
+ borderStartWidth?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thin" | "medium" | "thick" | undefined;
214
+ borderEndWidth?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thin" | "medium" | "thick" | undefined;
215
+ borderTopWidth?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thin" | "medium" | "thick" | undefined;
216
+ borderBottomWidth?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thin" | "medium" | "thick" | undefined;
217
+ avatarSize?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "2xs" | "3xl" | undefined;
218
218
  iconSize?: "xs" | "sm" | "md" | "lg" | undefined;
219
- alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
220
- alignItems?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
221
- alignSelf?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | "auto" | undefined;
222
- flex?: "1" | "none" | "auto" | "initial" | undefined;
219
+ alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | undefined;
220
+ alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline" | undefined;
221
+ alignSelf?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline" | "auto" | undefined;
222
+ flex?: "none" | "1" | "auto" | "initial" | undefined;
223
223
  flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
224
224
  flexGrow?: "0" | "1" | "2" | "3" | undefined;
225
225
  flexShrink?: "0" | "1" | undefined;
226
226
  flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
227
- justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | undefined;
227
+ justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly" | undefined;
228
228
  flexBasis?: "min-content" | undefined;
229
229
  display?: "flex" | "none" | "block" | "inline-block" | "inline" | "inline-flex" | "table" | "inline-table" | "table-caption" | "table-cell" | "table-column" | "table-column-group" | "table-footer-group" | "table-header-group" | "table-row-group" | "table-row" | "flow-root" | "grid" | "contents" | undefined;
230
230
  overflow?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
231
231
  overflowX?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
232
232
  overflowY?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
233
233
  position?: "static" | "fixed" | "absolute" | "relative" | "sticky" | undefined;
234
- contentFit?: "none" | "cover" | "contain" | "fill" | "scale-down" | undefined;
234
+ contentFit?: "cover" | "contain" | "fill" | "none" | "scale-down" | undefined;
235
235
  colorMode?: "light" | "dark" | undefined;
236
- scaleMode?: "xSmall" | "small" | "medium" | "large" | "xLarge" | "xxLarge" | "xxxLarge" | undefined;
236
+ scaleMode?: "medium" | "small" | "xSmall" | "large" | "xLarge" | "xxLarge" | "xxxLarge" | undefined;
237
237
  width?: "full" | "fit" | "screen" | undefined;
238
238
  height?: "full" | "fit" | "screen" | undefined;
239
- dropShadow?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
240
- insetShadow?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "xs-invert" | "sm-invert" | "md-invert" | "lg-invert" | "xl-invert" | "2xl-invert" | undefined;
241
- nestedBorderRadiusSize?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "full" | undefined;
242
- nestedBorderRadiusWidth?: "medium" | "thin" | "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thick" | undefined;
243
- nestedBorderRadiusSpacing?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
239
+ dropShadow?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
240
+ insetShadow?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "xs-invert" | "sm-invert" | "md-invert" | "lg-invert" | "xl-invert" | "2xl-invert" | undefined;
241
+ nestedBorderRadiusSize?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
242
+ nestedBorderRadiusWidth?: "none" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "thin" | "medium" | "thick" | undefined;
243
+ nestedBorderRadiusSpacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
244
244
  nestedBorderRadius?: boolean | "first" | "last" | undefined;
245
245
  } & {
246
246
  className?: string | undefined;
@@ -154,7 +154,7 @@ const extractStringLiterals = (node, visited = /* @__PURE__ */ new Set()) => {
154
154
  if (wrappedExpressionValues) return wrappedExpressionValues;
155
155
  const propertyAccessValues = extractPropertyAccessValues(node, visited);
156
156
  if (propertyAccessValues) return propertyAccessValues;
157
- const elementAccessValues = extractElementAccessValues(node);
157
+ const elementAccessValues = extractElementAccessValues(node, visited);
158
158
  if (elementAccessValues) return elementAccessValues;
159
159
  const callExpressionValues = extractCallExpressionValues(node, visited);
160
160
  if (callExpressionValues) return callExpressionValues;
@@ -199,9 +199,15 @@ const extractPropertyAccessValues = (node, visited) => {
199
199
  const propertyName = node.getName();
200
200
  return extractObjectValues(node.getExpression(), visited).filter((value) => typeof value === "object" && value !== null && propertyName in value).map((value) => value[propertyName]).filter((value) => typeof value === "string");
201
201
  };
202
- const extractElementAccessValues = (node) => {
202
+ const extractElementAccessValues = (node, visited) => {
203
203
  if (!ts_morph.Node.isElementAccessExpression(node)) return null;
204
- return extractLiteralValuesFromType(node);
204
+ const typeValues = extractLiteralValuesFromType(node);
205
+ if (typeValues.length > 0) return typeValues;
206
+ return extractObjectValues(node.getExpression(), visited).flatMap((value) => {
207
+ if (typeof value === "string") return [value];
208
+ if (typeof value === "object" && value !== null) return Object.values(value).filter((entry) => typeof entry === "string");
209
+ return [];
210
+ });
205
211
  };
206
212
  const extractCallExpressionValues = (node, visited) => {
207
213
  if (!ts_morph.Node.isCallExpression(node)) return null;
@@ -151,7 +151,7 @@ const extractStringLiterals = (node, visited = /* @__PURE__ */ new Set()) => {
151
151
  if (wrappedExpressionValues) return wrappedExpressionValues;
152
152
  const propertyAccessValues = extractPropertyAccessValues(node, visited);
153
153
  if (propertyAccessValues) return propertyAccessValues;
154
- const elementAccessValues = extractElementAccessValues(node);
154
+ const elementAccessValues = extractElementAccessValues(node, visited);
155
155
  if (elementAccessValues) return elementAccessValues;
156
156
  const callExpressionValues = extractCallExpressionValues(node, visited);
157
157
  if (callExpressionValues) return callExpressionValues;
@@ -196,9 +196,15 @@ const extractPropertyAccessValues = (node, visited) => {
196
196
  const propertyName = node.getName();
197
197
  return extractObjectValues(node.getExpression(), visited).filter((value) => typeof value === "object" && value !== null && propertyName in value).map((value) => value[propertyName]).filter((value) => typeof value === "string");
198
198
  };
199
- const extractElementAccessValues = (node) => {
199
+ const extractElementAccessValues = (node, visited) => {
200
200
  if (!Node.isElementAccessExpression(node)) return null;
201
- return extractLiteralValuesFromType(node);
201
+ const typeValues = extractLiteralValuesFromType(node);
202
+ if (typeValues.length > 0) return typeValues;
203
+ return extractObjectValues(node.getExpression(), visited).flatMap((value) => {
204
+ if (typeof value === "string") return [value];
205
+ if (typeof value === "object" && value !== null) return Object.values(value).filter((entry) => typeof entry === "string");
206
+ return [];
207
+ });
202
208
  };
203
209
  const extractCallExpressionValues = (node, visited) => {
204
210
  if (!Node.isCallExpression(node)) return null;
@@ -1 +1 @@
1
- {"version":3,"file":"expressions.js","names":[],"sources":["../../../../src/purger/optimized/ast/expressions.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { Identifier } from 'ts-morph';\nimport { Node, Project, SyntaxKind, ts } from 'ts-morph';\n\nconst importedSourceProject = new Project({ useInMemoryFileSystem: true });\nconst importedSourceFileCache = new Map<string, ReturnType<Project['createSourceFile']>>();\nconst tsConfigPathCache = new Map<string, string | null>();\nconst compilerOptionsCache = new Map<string, ts.CompilerOptions | null>();\nconst hasImportQuery = (moduleSpecifier: string): boolean => moduleSpecifier.includes('?');\n\nconst getLocalDefinitionNodes = (node: Node): Node[] => {\n if (!Node.isIdentifier(node)) {\n return [];\n }\n\n const name = node.getText();\n const nodeStart = node.getStart();\n const sourceFile = node.getSourceFile();\n\n const matches = [\n ...sourceFile\n .getDescendantsOfKind(SyntaxKind.VariableDeclaration)\n .filter((definition) => definition.getName() === name && definition.getStart() <= nodeStart),\n ...sourceFile\n .getDescendantsOfKind(SyntaxKind.Parameter)\n .filter((definition) => definition.getName() === name && definition.getStart() <= nodeStart),\n ...sourceFile\n .getDescendantsOfKind(SyntaxKind.BindingElement)\n .filter((definition) => definition.getName() === name && definition.getStart() <= nodeStart),\n ...sourceFile\n .getFunctions()\n .filter((definition) => definition.getName() === name && definition.getStart() <= nodeStart),\n ];\n\n return matches.sort((left, right) => right.getStart() - left.getStart()).slice(0, 1);\n};\n\nconst getDefinitionNodesSafe = (node: Identifier): Node[] => {\n try {\n return node.getDefinitionNodes();\n } catch {\n return getLocalDefinitionNodes(node);\n }\n};\n\nconst isExistingFile = (candidate: string): boolean =>\n fs.existsSync(candidate) && fs.statSync(candidate).isFile();\n\nconst resolveRelativeImportPath = (\n sourceFilePath: string,\n moduleSpecifier: string,\n): string | null => {\n if (\n !path.isAbsolute(sourceFilePath) ||\n !moduleSpecifier.startsWith('.') ||\n hasImportQuery(moduleSpecifier)\n ) {\n return null;\n }\n\n const basePath = path.resolve(path.dirname(sourceFilePath), moduleSpecifier);\n const candidates = [\n basePath,\n `${basePath}.ts`,\n `${basePath}.tsx`,\n `${basePath}.mjs`,\n `${basePath}.cjs`,\n `${basePath}.js`,\n `${basePath}.jsx`,\n path.join(basePath, 'index.ts'),\n path.join(basePath, 'index.tsx'),\n path.join(basePath, 'index.mjs'),\n path.join(basePath, 'index.cjs'),\n path.join(basePath, 'index.js'),\n path.join(basePath, 'index.jsx'),\n ];\n\n return candidates.find((candidate) => isExistingFile(candidate)) ?? null;\n};\n\nconst findNearestTypeScriptConfig = (sourceFilePath: string): string | null => {\n const sourceDir = path.dirname(sourceFilePath);\n const cached = tsConfigPathCache.get(sourceDir);\n\n if (cached !== undefined) {\n return cached;\n }\n\n let currentDir = sourceDir;\n\n while (true) {\n const tsConfigPath = path.join(currentDir, 'tsconfig.json');\n if (isExistingFile(tsConfigPath)) {\n tsConfigPathCache.set(sourceDir, tsConfigPath);\n return tsConfigPath;\n }\n\n const jsConfigPath = path.join(currentDir, 'jsconfig.json');\n if (isExistingFile(jsConfigPath)) {\n tsConfigPathCache.set(sourceDir, jsConfigPath);\n return jsConfigPath;\n }\n\n const parentDir = path.dirname(currentDir);\n if (parentDir === currentDir) {\n tsConfigPathCache.set(sourceDir, null);\n return null;\n }\n\n currentDir = parentDir;\n }\n};\n\nconst getCompilerOptionsForSourceFile = (sourceFilePath: string): ts.CompilerOptions | null => {\n const configPath = findNearestTypeScriptConfig(sourceFilePath);\n if (!configPath) {\n return null;\n }\n\n const cached = compilerOptionsCache.get(configPath);\n if (cached !== undefined) {\n return cached;\n }\n\n const readResult = ts.readConfigFile(configPath, ts.sys.readFile);\n if (readResult.error) {\n compilerOptionsCache.set(configPath, null);\n return null;\n }\n\n const parsed = ts.parseJsonConfigFileContent(readResult.config, ts.sys, path.dirname(configPath));\n\n const compilerOptions =\n parsed.options.paths && !parsed.options.baseUrl\n ? { ...parsed.options, baseUrl: path.dirname(configPath) }\n : parsed.options;\n\n compilerOptionsCache.set(configPath, compilerOptions);\n return compilerOptions;\n};\n\nconst resolveConfigImportPath = (\n sourceFilePath: string,\n moduleSpecifier: string,\n): string | null => {\n if (hasImportQuery(moduleSpecifier)) {\n return null;\n }\n\n const compilerOptions = getCompilerOptionsForSourceFile(sourceFilePath);\n if (!compilerOptions) {\n return null;\n }\n\n const resolvedModule = ts.resolveModuleName(\n moduleSpecifier,\n sourceFilePath,\n compilerOptions,\n ts.sys,\n ).resolvedModule;\n\n if (!resolvedModule) {\n return null;\n }\n\n return isExistingFile(resolvedModule.resolvedFileName) ? resolvedModule.resolvedFileName : null;\n};\n\nconst resolveImportPath = (sourceFilePath: string, moduleSpecifier: string): string | null =>\n moduleSpecifier.startsWith('.')\n ? resolveRelativeImportPath(sourceFilePath, moduleSpecifier)\n : resolveConfigImportPath(sourceFilePath, moduleSpecifier);\n\nconst getImportedSourceFile = (filePath: string) => {\n const cached = importedSourceFileCache.get(filePath);\n if (cached) {\n return cached;\n }\n\n if (!fs.existsSync(filePath)) {\n return null;\n }\n\n const sourceFile = importedSourceProject.createSourceFile(\n filePath,\n fs.readFileSync(filePath, 'utf-8'),\n {\n overwrite: true,\n },\n );\n importedSourceFileCache.set(filePath, sourceFile);\n return sourceFile;\n};\n\nconst extractImportedIdentifierValues = (node: Node, visited: Set<Node>): string[] => {\n if (!Node.isIdentifier(node)) {\n return [];\n }\n\n const sourceFile = node.getSourceFile();\n const sourceFilePath = sourceFile.getFilePath();\n const importMatch = sourceFile\n .getImportDeclarations()\n .find((importDecl) =>\n importDecl\n .getNamedImports()\n .some(\n (namedImport) =>\n (namedImport.getAliasNode()?.getText() ?? namedImport.getName()) === node.getText(),\n ),\n );\n\n if (!importMatch) {\n return [];\n }\n\n const namedImport = importMatch\n .getNamedImports()\n .find(\n (candidate) =>\n (candidate.getAliasNode()?.getText() ?? candidate.getName()) === node.getText(),\n );\n\n if (!namedImport) {\n return [];\n }\n\n const resolvedPath = resolveImportPath(sourceFilePath, importMatch.getModuleSpecifierValue());\n if (!resolvedPath) {\n return [];\n }\n\n const importedSourceFile = getImportedSourceFile(resolvedPath);\n if (!importedSourceFile) {\n return [];\n }\n\n const declaration = importedSourceFile.getVariableDeclaration(namedImport.getName());\n const initializer = declaration?.getInitializer();\n return initializer ? extractStringLiterals(initializer, visited) : [];\n};\n\n/**\n * Extracts string literal values from an expression.\n *\n * Handles:\n * - Direct string literals: 'value'\n * - Ternary expressions: condition ? 'a' : 'b' -> ['a', 'b']\n * - Variable references: traces back to initializer\n * - Logical expressions: a || 'fallback', a ?? 'default'\n * - Function calls: traces to return statements\n * - Template literals: `value`\n * - As expressions: value as Type\n *\n * @param node The expression node to extract values from\n * @param visited Set of visited nodes to prevent infinite recursion\n * @returns Array of extracted string literal values\n */\nconst extractStringLiterals = (node: Node, visited: Set<Node> = new Set()): string[] => {\n if (visited.has(node)) {\n return [];\n }\n visited.add(node);\n\n const directValues = extractDirectLiteralValues(node);\n if (directValues) {\n return directValues;\n }\n\n const templateValues = extractTemplateExpressionValues(node, visited);\n if (templateValues) {\n return templateValues;\n }\n\n // Ternary/conditional expression: condition ? 'a' : 'b'\n if (Node.isConditionalExpression(node)) {\n return [\n ...extractStringLiterals(node.getWhenTrue(), visited),\n ...extractStringLiterals(node.getWhenFalse(), visited),\n ];\n }\n\n const binaryValues = extractBinaryExpressionValues(node, visited);\n if (binaryValues) {\n return binaryValues;\n }\n\n const wrappedExpressionValues = extractWrappedExpressionValues(node, visited);\n if (wrappedExpressionValues) {\n return wrappedExpressionValues;\n }\n\n const propertyAccessValues = extractPropertyAccessValues(node, visited);\n if (propertyAccessValues) {\n return propertyAccessValues;\n }\n\n const elementAccessValues = extractElementAccessValues(node);\n if (elementAccessValues) {\n return elementAccessValues;\n }\n\n const callExpressionValues = extractCallExpressionValues(node, visited);\n if (callExpressionValues) {\n return callExpressionValues;\n }\n\n const identifierValues = extractIdentifierValues(node, visited);\n if (identifierValues) {\n return identifierValues;\n }\n\n return [];\n};\n\nconst extractDirectLiteralValues = (node: Node): string[] | null => {\n if (Node.isStringLiteral(node) || Node.isNoSubstitutionTemplateLiteral(node)) {\n return [node.getLiteralValue()];\n }\n\n return null;\n};\n\nconst extractTemplateExpressionValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isTemplateExpression(node)) {\n return null;\n }\n\n const parts: string[][] = [[node.getHead().getLiteralText()]];\n\n node.getTemplateSpans().forEach((span) => {\n const exprValues = extractStringLiterals(span.getExpression(), visited);\n const literalText = span.getLiteral().getLiteralText();\n parts.push(\n exprValues.length > 0\n ? exprValues.map((value) => `${value}${literalText}`)\n : ['', literalText],\n );\n });\n\n return parts\n .reduce<\n string[]\n >((acc, segment) => acc.flatMap((base) => segment.map((frag) => `${base}${frag}`)), [''])\n .filter((value) => value.length > 0);\n};\n\nconst extractBinaryExpressionValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isBinaryExpression(node)) {\n return null;\n }\n\n const operator = node.getOperatorToken().getText();\n if (operator === '+') {\n const left = extractStringLiterals(node.getLeft(), visited);\n const right = extractStringLiterals(node.getRight(), visited);\n const combined = left.flatMap((l) => right.map((r) => `${l}${r}`));\n return combined.length > 0 ? combined : [];\n }\n\n if (operator === '||' || operator === '??') {\n return [\n ...extractStringLiterals(node.getLeft(), visited),\n ...extractStringLiterals(node.getRight(), visited),\n ];\n }\n\n return [];\n};\n\nconst extractWrappedExpressionValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (Node.isParenthesizedExpression(node) || Node.isAsExpression(node)) {\n return extractStringLiterals(node.getExpression(), visited);\n }\n\n return null;\n};\n\nconst extractPropertyAccessValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isPropertyAccessExpression(node)) {\n return null;\n }\n\n const typeValues = extractLiteralValuesFromType(node);\n if (typeValues.length > 0) {\n return typeValues;\n }\n\n const propertyName = node.getName();\n return extractObjectValues(node.getExpression(), visited)\n .filter(\n (value): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && propertyName in value,\n )\n .map((value) => value[propertyName])\n .filter((value): value is string => typeof value === 'string');\n};\n\nconst extractElementAccessValues = (node: Node): string[] | null => {\n if (!Node.isElementAccessExpression(node)) {\n return null;\n }\n\n return extractLiteralValuesFromType(node);\n};\n\nconst extractCallExpressionValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isCallExpression(node)) {\n return null;\n }\n\n const expression = node.getExpression();\n\n const fromDefinitions = Node.isIdentifier(expression)\n ? getDefinitionNodesSafe(expression).flatMap((definition) => {\n if (Node.isFunctionDeclaration(definition)) {\n return definition\n .getDescendantsOfKind(SyntaxKind.ReturnStatement)\n .flatMap((returnStmt) => {\n const expression = returnStmt.getExpression();\n return expression ? extractStringLiterals(expression, visited) : [];\n });\n }\n\n if (Node.isVariableDeclaration(definition)) {\n const initializer = definition.getInitializer();\n return initializer ? extractFromFunctionLike(initializer, visited) : [];\n }\n\n return [];\n })\n : [];\n\n const fromArguments = node.getArguments().flatMap((arg) => extractStringLiterals(arg, visited));\n\n return [...fromDefinitions, ...fromArguments];\n};\n\nconst extractArrayElementValues = (node: Node, visited: Set<Node>): string[] => {\n if (Node.isArrayLiteralExpression(node)) {\n return node\n .getElements()\n .flatMap((element) => extractStringLiterals(element, visited))\n .filter((value, index, values) => values.indexOf(value) === index);\n }\n\n if (Node.isParenthesizedExpression(node)) {\n return extractArrayElementValues(node.getExpression(), visited);\n }\n\n if (Node.isAsExpression(node) || Node.isTypeAssertion(node) || Node.isSatisfiesExpression(node)) {\n return extractArrayElementValues(node.getExpression(), visited);\n }\n\n if (Node.isIdentifier(node)) {\n return node\n .getDefinitionNodes()\n .flatMap((definition) => {\n if (Node.isVariableDeclaration(definition)) {\n const initializer = definition.getInitializer();\n return initializer ? extractArrayElementValues(initializer, visited) : [];\n }\n\n return [];\n })\n .filter((value, index, values) => values.indexOf(value) === index);\n }\n\n return [];\n};\n\nconst extractMappedParameterValues = (definition: Node, visited: Set<Node>): string[] => {\n if (!Node.isParameterDeclaration(definition)) {\n return [];\n }\n\n const callback = definition.getParentIfKind(SyntaxKind.ArrowFunction);\n if (!callback) {\n return [];\n }\n\n const callExpression = callback.getParentIfKind(SyntaxKind.CallExpression);\n if (!callExpression) {\n return [];\n }\n\n const expression = callExpression.getExpression();\n if (!Node.isPropertyAccessExpression(expression)) {\n return [];\n }\n\n if (!['map', 'flatMap'].includes(expression.getName())) {\n return [];\n }\n\n const parameterIndex = callback\n .getParameters()\n .findIndex(\n (parameter) => parameter.getNameNode().getText() === definition.getNameNode().getText(),\n );\n\n if (parameterIndex !== 0) {\n return [];\n }\n\n return extractArrayElementValues(expression.getExpression(), visited);\n};\n\nconst extractIdentifierValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isIdentifier(node)) {\n return null;\n }\n\n const values = getDefinitionNodesSafe(node).flatMap((definition) => {\n const mappedParameterValues = extractMappedParameterValues(definition, visited);\n if (mappedParameterValues.length > 0) {\n return mappedParameterValues;\n }\n\n if (\n Node.isVariableDeclaration(definition) ||\n Node.isParameterDeclaration(definition) ||\n Node.isBindingElement(definition)\n ) {\n const initializer = definition.getInitializer();\n return initializer ? extractStringLiterals(initializer, visited) : [];\n }\n\n return [];\n });\n\n if (values.length > 0) {\n return values;\n }\n\n const importedValues = extractImportedIdentifierValues(node, visited);\n if (importedValues.length > 0) {\n return importedValues;\n }\n\n return extractLiteralValuesFromType(node);\n};\n\n/**\n * Extract string literals from arrow functions or function expressions\n */\nconst extractFromFunctionLike = (node: Node, visited: Set<Node>): string[] => {\n const values: string[] = [];\n\n if (Node.isArrowFunction(node)) {\n const body = node.getBody();\n if (Node.isBlock(body)) {\n body.getDescendantsOfKind(SyntaxKind.ReturnStatement).forEach((returnStmt) => {\n const returnExpr = returnStmt.getExpression();\n if (returnExpr) {\n values.push(...extractStringLiterals(returnExpr, visited));\n }\n });\n } else {\n values.push(...extractStringLiterals(body, visited));\n }\n } else if (Node.isFunctionExpression(node)) {\n node.getDescendantsOfKind(SyntaxKind.ReturnStatement).forEach((returnStmt) => {\n const returnExpr = returnStmt.getExpression();\n if (returnExpr) {\n values.push(...extractStringLiterals(returnExpr, visited));\n }\n });\n }\n\n return values;\n};\n\n/**\n * Extract object literal values from an expression.\n * Returns an array of all possible object values (for union types or indexed access).\n */\nconst extractObjectValues = (node: Node, visited: Set<Node>): unknown[] => {\n if (visited.has(node)) {\n return [];\n }\n visited.add(node);\n\n const values: unknown[] = [];\n\n // Object literal expression\n if (Node.isObjectLiteralExpression(node)) {\n const obj: Record<string, unknown> = {};\n node.getProperties().forEach((prop) => {\n if (Node.isPropertyAssignment(prop)) {\n const name = prop.getName();\n const init = prop.getInitializer();\n if (init && Node.isStringLiteral(init)) {\n obj[name] = init.getLiteralValue();\n } else if (init && Node.isObjectLiteralExpression(init)) {\n const nestedValues = extractObjectValues(init, visited);\n if (nestedValues.length > 0) {\n obj[name] = nestedValues[0];\n }\n }\n }\n });\n values.push(obj);\n return values;\n }\n\n // Identifier - trace to initializer\n if (Node.isIdentifier(node)) {\n getDefinitionNodesSafe(node).forEach((definition) => {\n if (Node.isVariableDeclaration(definition)) {\n const initializer = definition.getInitializer();\n if (initializer) {\n // Handle 'as const' assertion\n if (Node.isAsExpression(initializer)) {\n const inner = initializer.getExpression();\n values.push(...extractObjectValues(inner, visited));\n } else {\n values.push(...extractObjectValues(initializer, visited));\n }\n }\n }\n });\n return values;\n }\n\n // Element access - return all values from the object\n if (Node.isElementAccessExpression(node)) {\n const expression = node.getExpression();\n const baseObjects = extractObjectValues(expression, visited);\n\n // For indexed access, return all possible values\n baseObjects.forEach((obj) => {\n if (typeof obj === 'object' && obj !== null) {\n Object.values(obj).forEach((value) => values.push(value));\n }\n });\n return values;\n }\n\n return values;\n};\n\n/**\n * Extract literal values from a TypeScript type (for union types like 'brand' | 'secondary')\n */\nexport const extractLiteralValuesFromType = (node: Node): string[] => {\n const values: string[] = [];\n const nodeType = node.getType();\n\n if (nodeType.isUnion()) {\n nodeType.getUnionTypes().forEach((unionMember) => {\n if (unionMember.isStringLiteral()) {\n values.push(unionMember.getLiteralValue() as string);\n }\n });\n } else if (nodeType.isStringLiteral()) {\n values.push(nodeType.getLiteralValue() as string);\n }\n\n return values;\n};\n\nexport { extractStringLiterals };\n"],"mappings":";;;;;AAMA,MAAM,wBAAwB,IAAI,QAAQ,EAAE,uBAAuB,MAAM,CAAC;AAC1E,MAAM,0CAA0B,IAAI,KAAsD;AAC1F,MAAM,oCAAoB,IAAI,KAA4B;AAC1D,MAAM,uCAAuB,IAAI,KAAwC;AACzE,MAAM,kBAAkB,oBAAqC,gBAAgB,SAAS,IAAI;AAE1F,MAAM,2BAA2B,SAAuB;AACtD,KAAI,CAAC,KAAK,aAAa,KAAK,CAC1B,QAAO,EAAE;CAGX,MAAM,OAAO,KAAK,SAAS;CAC3B,MAAM,YAAY,KAAK,UAAU;CACjC,MAAM,aAAa,KAAK,eAAe;AAiBvC,QAAO;EAdL,GAAG,WACA,qBAAqB,WAAW,oBAAoB,CACpD,QAAQ,eAAe,WAAW,SAAS,KAAK,QAAQ,WAAW,UAAU,IAAI,UAAU;EAC9F,GAAG,WACA,qBAAqB,WAAW,UAAU,CAC1C,QAAQ,eAAe,WAAW,SAAS,KAAK,QAAQ,WAAW,UAAU,IAAI,UAAU;EAC9F,GAAG,WACA,qBAAqB,WAAW,eAAe,CAC/C,QAAQ,eAAe,WAAW,SAAS,KAAK,QAAQ,WAAW,UAAU,IAAI,UAAU;EAC9F,GA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AChB,SAAO;;AAIT,KAAI,KAAK,aAAa,KAAK,EAAE;AAC3B,yBAAuB,KAAK,CAAC,SAAS,eAAe;AACnD,OAAI,KAAK,sBAAsB,WAAW,EAAE;IAC1C,MAAM,cAAc,WAAW,gBAAgB;AAC/C,QAAI,YAEF,KAAI,KAAK,eAAe,YAAY,EAAE;KACpC,MAAM,QAAQ,YAAY,eAAe;AACzC,YAAO,KAAK,GAAG,oBAAoB,OAAO,QAAQ,CAAC;UAEnD,QAAO,KAAK,GAAG,oBAAoB,aAAa,QAAQ,CAAC;;IAI/D;AACF,SAAO;;AAIT,KAAI,KAAK,0BAA0B,KAAK,EAAE;AAEpB,sBADD,KAAK,eAC0B,EAAE,QAGzC,CAAC,SAAS,QAAQ;AAC3B,OAAI,OAAO,QAAQ,YAAY,QAAQ,KACrC,QAAO,OAAO,IAAI,CAAC,SAAS,UAAU,OAAO,KAAK,MAAM,CAAC;IAE3D;AACF,SAAO;;AAGT,QAAO;;;;;AAMT,MAAa,gCAAgC,SAAyB;CACpE,MAAM,SAAmB,EAAE;CAC3B,MAAM,WAAW,KAAK,SAAS;AAE/B,KAAI,SAAS,SAAS,CACpB,UAAS,eAAe,CAAC,SAAS,gBAAgB;AAChD,MAAI,YAAY,iBAAiB,CAC/B,QAAO,KAAK,YAAY,iBAAiB,CAAW;GAEtD;UACO,SAAS,iBAAiB,CACnC,QAAO,KAAK,SAAS,iBAAiB,CAAW;AAGnD,QAAO"}
1
+ {"version":3,"file":"expressions.js","names":[],"sources":["../../../../src/purger/optimized/ast/expressions.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { Identifier } from 'ts-morph';\nimport { Node, Project, SyntaxKind, ts } from 'ts-morph';\n\nconst importedSourceProject = new Project({ useInMemoryFileSystem: true });\nconst importedSourceFileCache = new Map<string, ReturnType<Project['createSourceFile']>>();\nconst tsConfigPathCache = new Map<string, string | null>();\nconst compilerOptionsCache = new Map<string, ts.CompilerOptions | null>();\nconst hasImportQuery = (moduleSpecifier: string): boolean => moduleSpecifier.includes('?');\n\nconst getLocalDefinitionNodes = (node: Node): Node[] => {\n if (!Node.isIdentifier(node)) {\n return [];\n }\n\n const name = node.getText();\n const nodeStart = node.getStart();\n const sourceFile = node.getSourceFile();\n\n const matches = [\n ...sourceFile\n .getDescendantsOfKind(SyntaxKind.VariableDeclaration)\n .filter((definition) => definition.getName() === name && definition.getStart() <= nodeStart),\n ...sourceFile\n .getDescendantsOfKind(SyntaxKind.Parameter)\n .filter((definition) => definition.getName() === name && definition.getStart() <= nodeStart),\n ...sourceFile\n .getDescendantsOfKind(SyntaxKind.BindingElement)\n .filter((definition) => definition.getName() === name && definition.getStart() <= nodeStart),\n ...sourceFile\n .getFunctions()\n .filter((definition) => definition.getName() === name && definition.getStart() <= nodeStart),\n ];\n\n return matches.sort((left, right) => right.getStart() - left.getStart()).slice(0, 1);\n};\n\nconst getDefinitionNodesSafe = (node: Identifier): Node[] => {\n try {\n return node.getDefinitionNodes();\n } catch {\n return getLocalDefinitionNodes(node);\n }\n};\n\nconst isExistingFile = (candidate: string): boolean =>\n fs.existsSync(candidate) && fs.statSync(candidate).isFile();\n\nconst resolveRelativeImportPath = (\n sourceFilePath: string,\n moduleSpecifier: string,\n): string | null => {\n if (\n !path.isAbsolute(sourceFilePath) ||\n !moduleSpecifier.startsWith('.') ||\n hasImportQuery(moduleSpecifier)\n ) {\n return null;\n }\n\n const basePath = path.resolve(path.dirname(sourceFilePath), moduleSpecifier);\n const candidates = [\n basePath,\n `${basePath}.ts`,\n `${basePath}.tsx`,\n `${basePath}.mjs`,\n `${basePath}.cjs`,\n `${basePath}.js`,\n `${basePath}.jsx`,\n path.join(basePath, 'index.ts'),\n path.join(basePath, 'index.tsx'),\n path.join(basePath, 'index.mjs'),\n path.join(basePath, 'index.cjs'),\n path.join(basePath, 'index.js'),\n path.join(basePath, 'index.jsx'),\n ];\n\n return candidates.find((candidate) => isExistingFile(candidate)) ?? null;\n};\n\nconst findNearestTypeScriptConfig = (sourceFilePath: string): string | null => {\n const sourceDir = path.dirname(sourceFilePath);\n const cached = tsConfigPathCache.get(sourceDir);\n\n if (cached !== undefined) {\n return cached;\n }\n\n let currentDir = sourceDir;\n\n while (true) {\n const tsConfigPath = path.join(currentDir, 'tsconfig.json');\n if (isExistingFile(tsConfigPath)) {\n tsConfigPathCache.set(sourceDir, tsConfigPath);\n return tsConfigPath;\n }\n\n const jsConfigPath = path.join(currentDir, 'jsconfig.json');\n if (isExistingFile(jsConfigPath)) {\n tsConfigPathCache.set(sourceDir, jsConfigPath);\n return jsConfigPath;\n }\n\n const parentDir = path.dirname(currentDir);\n if (parentDir === currentDir) {\n tsConfigPathCache.set(sourceDir, null);\n return null;\n }\n\n currentDir = parentDir;\n }\n};\n\nconst getCompilerOptionsForSourceFile = (sourceFilePath: string): ts.CompilerOptions | null => {\n const configPath = findNearestTypeScriptConfig(sourceFilePath);\n if (!configPath) {\n return null;\n }\n\n const cached = compilerOptionsCache.get(configPath);\n if (cached !== undefined) {\n return cached;\n }\n\n const readResult = ts.readConfigFile(configPath, ts.sys.readFile);\n if (readResult.error) {\n compilerOptionsCache.set(configPath, null);\n return null;\n }\n\n const parsed = ts.parseJsonConfigFileContent(readResult.config, ts.sys, path.dirname(configPath));\n\n const compilerOptions =\n parsed.options.paths && !parsed.options.baseUrl\n ? { ...parsed.options, baseUrl: path.dirname(configPath) }\n : parsed.options;\n\n compilerOptionsCache.set(configPath, compilerOptions);\n return compilerOptions;\n};\n\nconst resolveConfigImportPath = (\n sourceFilePath: string,\n moduleSpecifier: string,\n): string | null => {\n if (hasImportQuery(moduleSpecifier)) {\n return null;\n }\n\n const compilerOptions = getCompilerOptionsForSourceFile(sourceFilePath);\n if (!compilerOptions) {\n return null;\n }\n\n const resolvedModule = ts.resolveModuleName(\n moduleSpecifier,\n sourceFilePath,\n compilerOptions,\n ts.sys,\n ).resolvedModule;\n\n if (!resolvedModule) {\n return null;\n }\n\n return isExistingFile(resolvedModule.resolvedFileName) ? resolvedModule.resolvedFileName : null;\n};\n\nconst resolveImportPath = (sourceFilePath: string, moduleSpecifier: string): string | null =>\n moduleSpecifier.startsWith('.')\n ? resolveRelativeImportPath(sourceFilePath, moduleSpecifier)\n : resolveConfigImportPath(sourceFilePath, moduleSpecifier);\n\nconst getImportedSourceFile = (filePath: string) => {\n const cached = importedSourceFileCache.get(filePath);\n if (cached) {\n return cached;\n }\n\n if (!fs.existsSync(filePath)) {\n return null;\n }\n\n const sourceFile = importedSourceProject.createSourceFile(\n filePath,\n fs.readFileSync(filePath, 'utf-8'),\n {\n overwrite: true,\n },\n );\n importedSourceFileCache.set(filePath, sourceFile);\n return sourceFile;\n};\n\nconst extractImportedIdentifierValues = (node: Node, visited: Set<Node>): string[] => {\n if (!Node.isIdentifier(node)) {\n return [];\n }\n\n const sourceFile = node.getSourceFile();\n const sourceFilePath = sourceFile.getFilePath();\n const importMatch = sourceFile\n .getImportDeclarations()\n .find((importDecl) =>\n importDecl\n .getNamedImports()\n .some(\n (namedImport) =>\n (namedImport.getAliasNode()?.getText() ?? namedImport.getName()) === node.getText(),\n ),\n );\n\n if (!importMatch) {\n return [];\n }\n\n const namedImport = importMatch\n .getNamedImports()\n .find(\n (candidate) =>\n (candidate.getAliasNode()?.getText() ?? candidate.getName()) === node.getText(),\n );\n\n if (!namedImport) {\n return [];\n }\n\n const resolvedPath = resolveImportPath(sourceFilePath, importMatch.getModuleSpecifierValue());\n if (!resolvedPath) {\n return [];\n }\n\n const importedSourceFile = getImportedSourceFile(resolvedPath);\n if (!importedSourceFile) {\n return [];\n }\n\n const declaration = importedSourceFile.getVariableDeclaration(namedImport.getName());\n const initializer = declaration?.getInitializer();\n return initializer ? extractStringLiterals(initializer, visited) : [];\n};\n\n/**\n * Extracts string literal values from an expression.\n *\n * Handles:\n * - Direct string literals: 'value'\n * - Ternary expressions: condition ? 'a' : 'b' -> ['a', 'b']\n * - Variable references: traces back to initializer\n * - Logical expressions: a || 'fallback', a ?? 'default'\n * - Function calls: traces to return statements\n * - Template literals: `value`\n * - As expressions: value as Type\n *\n * @param node The expression node to extract values from\n * @param visited Set of visited nodes to prevent infinite recursion\n * @returns Array of extracted string literal values\n */\nconst extractStringLiterals = (node: Node, visited: Set<Node> = new Set()): string[] => {\n if (visited.has(node)) {\n return [];\n }\n visited.add(node);\n\n const directValues = extractDirectLiteralValues(node);\n if (directValues) {\n return directValues;\n }\n\n const templateValues = extractTemplateExpressionValues(node, visited);\n if (templateValues) {\n return templateValues;\n }\n\n // Ternary/conditional expression: condition ? 'a' : 'b'\n if (Node.isConditionalExpression(node)) {\n return [\n ...extractStringLiterals(node.getWhenTrue(), visited),\n ...extractStringLiterals(node.getWhenFalse(), visited),\n ];\n }\n\n const binaryValues = extractBinaryExpressionValues(node, visited);\n if (binaryValues) {\n return binaryValues;\n }\n\n const wrappedExpressionValues = extractWrappedExpressionValues(node, visited);\n if (wrappedExpressionValues) {\n return wrappedExpressionValues;\n }\n\n const propertyAccessValues = extractPropertyAccessValues(node, visited);\n if (propertyAccessValues) {\n return propertyAccessValues;\n }\n\n const elementAccessValues = extractElementAccessValues(node, visited);\n if (elementAccessValues) {\n return elementAccessValues;\n }\n\n const callExpressionValues = extractCallExpressionValues(node, visited);\n if (callExpressionValues) {\n return callExpressionValues;\n }\n\n const identifierValues = extractIdentifierValues(node, visited);\n if (identifierValues) {\n return identifierValues;\n }\n\n return [];\n};\n\nconst extractDirectLiteralValues = (node: Node): string[] | null => {\n if (Node.isStringLiteral(node) || Node.isNoSubstitutionTemplateLiteral(node)) {\n return [node.getLiteralValue()];\n }\n\n return null;\n};\n\nconst extractTemplateExpressionValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isTemplateExpression(node)) {\n return null;\n }\n\n const parts: string[][] = [[node.getHead().getLiteralText()]];\n\n node.getTemplateSpans().forEach((span) => {\n const exprValues = extractStringLiterals(span.getExpression(), visited);\n const literalText = span.getLiteral().getLiteralText();\n parts.push(\n exprValues.length > 0\n ? exprValues.map((value) => `${value}${literalText}`)\n : ['', literalText],\n );\n });\n\n return parts\n .reduce<\n string[]\n >((acc, segment) => acc.flatMap((base) => segment.map((frag) => `${base}${frag}`)), [''])\n .filter((value) => value.length > 0);\n};\n\nconst extractBinaryExpressionValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isBinaryExpression(node)) {\n return null;\n }\n\n const operator = node.getOperatorToken().getText();\n if (operator === '+') {\n const left = extractStringLiterals(node.getLeft(), visited);\n const right = extractStringLiterals(node.getRight(), visited);\n const combined = left.flatMap((l) => right.map((r) => `${l}${r}`));\n return combined.length > 0 ? combined : [];\n }\n\n if (operator === '||' || operator === '??') {\n return [\n ...extractStringLiterals(node.getLeft(), visited),\n ...extractStringLiterals(node.getRight(), visited),\n ];\n }\n\n return [];\n};\n\nconst extractWrappedExpressionValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (Node.isParenthesizedExpression(node) || Node.isAsExpression(node)) {\n return extractStringLiterals(node.getExpression(), visited);\n }\n\n return null;\n};\n\nconst extractPropertyAccessValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isPropertyAccessExpression(node)) {\n return null;\n }\n\n const typeValues = extractLiteralValuesFromType(node);\n if (typeValues.length > 0) {\n return typeValues;\n }\n\n const propertyName = node.getName();\n return extractObjectValues(node.getExpression(), visited)\n .filter(\n (value): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && propertyName in value,\n )\n .map((value) => value[propertyName])\n .filter((value): value is string => typeof value === 'string');\n};\n\nconst extractElementAccessValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isElementAccessExpression(node)) {\n return null;\n }\n\n const typeValues = extractLiteralValuesFromType(node);\n if (typeValues.length > 0) {\n return typeValues;\n }\n\n const expression = node.getExpression();\n return extractObjectValues(expression, visited).flatMap((value) => {\n if (typeof value === 'string') {\n return [value];\n }\n\n if (typeof value === 'object' && value !== null) {\n return Object.values(value).filter((entry): entry is string => typeof entry === 'string');\n }\n\n return [];\n });\n};\n\nconst extractCallExpressionValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isCallExpression(node)) {\n return null;\n }\n\n const expression = node.getExpression();\n\n const fromDefinitions = Node.isIdentifier(expression)\n ? getDefinitionNodesSafe(expression).flatMap((definition) => {\n if (Node.isFunctionDeclaration(definition)) {\n return definition\n .getDescendantsOfKind(SyntaxKind.ReturnStatement)\n .flatMap((returnStmt) => {\n const expression = returnStmt.getExpression();\n return expression ? extractStringLiterals(expression, visited) : [];\n });\n }\n\n if (Node.isVariableDeclaration(definition)) {\n const initializer = definition.getInitializer();\n return initializer ? extractFromFunctionLike(initializer, visited) : [];\n }\n\n return [];\n })\n : [];\n\n const fromArguments = node.getArguments().flatMap((arg) => extractStringLiterals(arg, visited));\n\n return [...fromDefinitions, ...fromArguments];\n};\n\nconst extractArrayElementValues = (node: Node, visited: Set<Node>): string[] => {\n if (Node.isArrayLiteralExpression(node)) {\n return node\n .getElements()\n .flatMap((element) => extractStringLiterals(element, visited))\n .filter((value, index, values) => values.indexOf(value) === index);\n }\n\n if (Node.isParenthesizedExpression(node)) {\n return extractArrayElementValues(node.getExpression(), visited);\n }\n\n if (Node.isAsExpression(node) || Node.isTypeAssertion(node) || Node.isSatisfiesExpression(node)) {\n return extractArrayElementValues(node.getExpression(), visited);\n }\n\n if (Node.isIdentifier(node)) {\n return node\n .getDefinitionNodes()\n .flatMap((definition) => {\n if (Node.isVariableDeclaration(definition)) {\n const initializer = definition.getInitializer();\n return initializer ? extractArrayElementValues(initializer, visited) : [];\n }\n\n return [];\n })\n .filter((value, index, values) => values.indexOf(value) === index);\n }\n\n return [];\n};\n\nconst extractMappedParameterValues = (definition: Node, visited: Set<Node>): string[] => {\n if (!Node.isParameterDeclaration(definition)) {\n return [];\n }\n\n const callback = definition.getParentIfKind(SyntaxKind.ArrowFunction);\n if (!callback) {\n return [];\n }\n\n const callExpression = callback.getParentIfKind(SyntaxKind.CallExpression);\n if (!callExpression) {\n return [];\n }\n\n const expression = callExpression.getExpression();\n if (!Node.isPropertyAccessExpression(expression)) {\n return [];\n }\n\n if (!['map', 'flatMap'].includes(expression.getName())) {\n return [];\n }\n\n const parameterIndex = callback\n .getParameters()\n .findIndex(\n (parameter) => parameter.getNameNode().getText() === definition.getNameNode().getText(),\n );\n\n if (parameterIndex !== 0) {\n return [];\n }\n\n return extractArrayElementValues(expression.getExpression(), visited);\n};\n\nconst extractIdentifierValues = (node: Node, visited: Set<Node>): string[] | null => {\n if (!Node.isIdentifier(node)) {\n return null;\n }\n\n const values = getDefinitionNodesSafe(node).flatMap((definition) => {\n const mappedParameterValues = extractMappedParameterValues(definition, visited);\n if (mappedParameterValues.length > 0) {\n return mappedParameterValues;\n }\n\n if (\n Node.isVariableDeclaration(definition) ||\n Node.isParameterDeclaration(definition) ||\n Node.isBindingElement(definition)\n ) {\n const initializer = definition.getInitializer();\n return initializer ? extractStringLiterals(initializer, visited) : [];\n }\n\n return [];\n });\n\n if (values.length > 0) {\n return values;\n }\n\n const importedValues = extractImportedIdentifierValues(node, visited);\n if (importedValues.length > 0) {\n return importedValues;\n }\n\n return extractLiteralValuesFromType(node);\n};\n\n/**\n * Extract string literals from arrow functions or function expressions\n */\nconst extractFromFunctionLike = (node: Node, visited: Set<Node>): string[] => {\n const values: string[] = [];\n\n if (Node.isArrowFunction(node)) {\n const body = node.getBody();\n if (Node.isBlock(body)) {\n body.getDescendantsOfKind(SyntaxKind.ReturnStatement).forEach((returnStmt) => {\n const returnExpr = returnStmt.getExpression();\n if (returnExpr) {\n values.push(...extractStringLiterals(returnExpr, visited));\n }\n });\n } else {\n values.push(...extractStringLiterals(body, visited));\n }\n } else if (Node.isFunctionExpression(node)) {\n node.getDescendantsOfKind(SyntaxKind.ReturnStatement).forEach((returnStmt) => {\n const returnExpr = returnStmt.getExpression();\n if (returnExpr) {\n values.push(...extractStringLiterals(returnExpr, visited));\n }\n });\n }\n\n return values;\n};\n\n/**\n * Extract object literal values from an expression.\n * Returns an array of all possible object values (for union types or indexed access).\n */\nconst extractObjectValues = (node: Node, visited: Set<Node>): unknown[] => {\n if (visited.has(node)) {\n return [];\n }\n visited.add(node);\n\n const values: unknown[] = [];\n\n // Object literal expression\n if (Node.isObjectLiteralExpression(node)) {\n const obj: Record<string, unknown> = {};\n node.getProperties().forEach((prop) => {\n if (Node.isPropertyAssignment(prop)) {\n const name = prop.getName();\n const init = prop.getInitializer();\n if (init && Node.isStringLiteral(init)) {\n obj[name] = init.getLiteralValue();\n } else if (init && Node.isObjectLiteralExpression(init)) {\n const nestedValues = extractObjectValues(init, visited);\n if (nestedValues.length > 0) {\n obj[name] = nestedValues[0];\n }\n }\n }\n });\n values.push(obj);\n return values;\n }\n\n // Identifier - trace to initializer\n if (Node.isIdentifier(node)) {\n getDefinitionNodesSafe(node).forEach((definition) => {\n if (Node.isVariableDeclaration(definition)) {\n const initializer = definition.getInitializer();\n if (initializer) {\n // Handle 'as const' assertion\n if (Node.isAsExpression(initializer)) {\n const inner = initializer.getExpression();\n values.push(...extractObjectValues(inner, visited));\n } else {\n values.push(...extractObjectValues(initializer, visited));\n }\n }\n }\n });\n return values;\n }\n\n // Element access - return all values from the object\n if (Node.isElementAccessExpression(node)) {\n const expression = node.getExpression();\n const baseObjects = extractObjectValues(expression, visited);\n\n // For indexed access, return all possible values\n baseObjects.forEach((obj) => {\n if (typeof obj === 'object' && obj !== null) {\n Object.values(obj).forEach((value) => values.push(value));\n }\n });\n return values;\n }\n\n return values;\n};\n\n/**\n * Extract literal values from a TypeScript type (for union types like 'brand' | 'secondary')\n */\nexport const extractLiteralValuesFromType = (node: Node): string[] => {\n const values: string[] = [];\n const nodeType = node.getType();\n\n if (nodeType.isUnion()) {\n nodeType.getUnionTypes().forEach((unionMember) => {\n if (unionMember.isStringLiteral()) {\n values.push(unionMember.getLiteralValue() as string);\n }\n });\n } else if (nodeType.isStringLiteral()) {\n values.push(nodeType.getLiteralValue() as string);\n }\n\n return values;\n};\n\nexport { extractStringLiterals };\n"],"mappings":";;;;;AA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EAAE;KACpC,MAAM,QAAQ,YAAY,eAAe;AACzC,YAAO,KAAK,GAAG,oBAAoB,OAAO,QAAQ,CAAC;UAEnD,QAAO,KAAK,GAAG,oBAAoB,aAAa,QAAQ,CAAC;;IAI/D;AACF,SAAO;;AAIT,KAAI,KAAK,0BAA0B,KAAK,EAAE;AAEpB,sBADD,KAAK,eAC0B,EAAE,QAGzC,CAAC,SAAS,QAAQ;AAC3B,OAAI,OAAO,QAAQ,YAAY,QAAQ,KACrC,QAAO,OAAO,IAAI,CAAC,SAAS,UAAU,OAAO,KAAK,MAAM,CAAC;IAE3D;AACF,SAAO;;AAGT,QAAO;;;;;AAMT,MAAa,gCAAgC,SAAyB;CACpE,MAAM,SAAmB,EAAE;CAC3B,MAAM,WAAW,KAAK,SAAS;AAE/B,KAAI,SAAS,SAAS,CACpB,UAAS,eAAe,CAAC,SAAS,gBAAgB;AAChD,MAAI,YAAY,iBAAiB,CAC/B,QAAO,KAAK,YAAY,iBAAiB,CAAW;GAEtD;UACO,SAAS,iBAAiB,CACnC,QAAO,KAAK,SAAS,iBAAiB,CAAW;AAGnD,QAAO"}
@@ -308,7 +308,7 @@ const purgeFromCodeOptimized = async (code, options) => {
308
308
  [componentInfo, ...getComponentWithDeps(componentInfo.name).slice(1)].forEach((comp) => {
309
309
  const variantKeys = getVariantKeysForProp(comp, propName);
310
310
  if (variantKeys.length > 0) variantKeys.forEach((variantKey) => {
311
- const mappedVariantGroup = variants[variantKey];
311
+ const mappedVariantGroup = variants[variantKey] ?? autoVariantsCache[variantKey];
312
312
  if (mappedVariantGroup) [...usedValues].forEach((value) => {
313
313
  const cls = mappedVariantGroup[value];
314
314
  if (cls) safelist.push(cls.replaceAll("\\", ""));
@@ -307,7 +307,7 @@ const purgeFromCodeOptimized = async (code, options) => {
307
307
  [componentInfo, ...getComponentWithDeps(componentInfo.name).slice(1)].forEach((comp) => {
308
308
  const variantKeys = getVariantKeysForProp(comp, propName);
309
309
  if (variantKeys.length > 0) variantKeys.forEach((variantKey) => {
310
- const mappedVariantGroup = variants[variantKey];
310
+ const mappedVariantGroup = variants[variantKey] ?? autoVariantsCache[variantKey];
311
311
  if (mappedVariantGroup) [...usedValues].forEach((value) => {
312
312
  const cls = mappedVariantGroup[value];
313
313
  if (cls) safelist.push(cls.replaceAll("\\", ""));