@culur/prettier-plugin-tailwindcss-group 1.1.0 → 1.1.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @culur/prettier-plugin-tailwindcss-group
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 📦 Update dependencies ([#551](https://github.com/culur/culur/pull/551) [`890a021`](https://github.com/culur/culur/commit/890a0219e7ece2f3ebd1fe5207a811932fb92e5e)) ([@renovate](https://github.com/apps/renovate)):
8
+
9
+ - `devDependencies`:
10
+ - `@babel/parser@^8.0.10`
11
+ - `@types/react@^19.3.0`
12
+ - `prettier@^3.9.10`
13
+ - `tailwind-merge@^3.7.0`
14
+ - `peerDependencies`:
15
+ - `prettier@>=3.9.10`
16
+ - `prettier-plugin-tailwindcss@>=0.8.1`
17
+
18
+ - 📦 Update dependencies ([#557](https://github.com/culur/culur/pull/557) [`47325d2`](https://github.com/culur/culur/commit/47325d27134c6c61e4ad46316a3dc55853e91936)) ([@renovate](https://github.com/apps/renovate)):
19
+
20
+ - `devDependencies`:
21
+ - `@babel/parser@^8.1.0`
22
+
3
23
  ## 1.1.0
4
24
 
5
25
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Plugin } from "prettier";
2
- //#region src/prettier.d.ts
3
2
  /**
4
3
  * Ambient type augmentation for Prettier Options.
5
4
  *
@@ -13,15 +12,13 @@ declare module 'prettier' {
13
12
  tailwindFunctions?: string[];
14
13
  }
15
14
  }
16
- //#endregion
17
- //#region src/options.d.ts
18
15
  /**
19
16
  * Runtime Prettier plugin options configuration.
20
17
  *
21
18
  * NOTE: TypeScript type augmentation for Prettier's `Options` interface is declared in:
22
19
  * @see {@link ./prettier.d.ts}
23
20
  */
24
- declare const options: {
21
+ export declare const options: {
25
22
  classNameThreshold: {
26
23
  type: "int";
27
24
  category: string;
@@ -44,8 +41,6 @@ declare const options: {
44
41
  description: string;
45
42
  };
46
43
  };
47
- //#endregion
48
- //#region ../../node_modules/.pnpm/@types+estree@1.0.9/node_modules/@types/estree/index.d.ts
49
44
  // This definition file follows a somewhat unusual format. ESTree allows
50
45
  // runtime type checks based on the `type` parameter. In order to explain this
51
46
  // to typescript we want to use discriminated union types:
@@ -115,10 +110,16 @@ interface Position {
115
110
  /** >= 0 */
116
111
  column: number;
117
112
  }
113
+ interface ProgramBodyMap {
114
+ Directive: Directive;
115
+ ModuleDeclaration: ModuleDeclaration;
116
+ Statement: Statement;
117
+ }
118
+ type ProgramBody = ProgramBodyMap[keyof ProgramBodyMap];
118
119
  interface Program extends BaseNode {
119
120
  type: "Program";
120
121
  sourceType: "script" | "module";
121
- body: Array<Directive | Statement | ModuleDeclaration>;
122
+ body: ProgramBody[];
122
123
  comments?: Comment[] | undefined;
123
124
  }
124
125
  interface Directive extends BaseNode {
@@ -570,8 +571,6 @@ interface AwaitExpression extends BaseExpression {
570
571
  type: "AwaitExpression";
571
572
  argument: Expression;
572
573
  }
573
- //#endregion
574
- //#region ../../node_modules/.pnpm/@types+estree-jsx@1.0.5/node_modules/@types/estree-jsx/index.d.ts
575
574
  declare module "estree" {
576
575
  interface ExpressionMap {
577
576
  JSXElement: JSXElement;
@@ -662,12 +661,6 @@ interface JSXOpeningFragment extends BaseNode {
662
661
  interface JSXClosingFragment extends BaseNode {
663
662
  type: "JSXClosingFragment";
664
663
  }
665
- //#endregion
666
- //#region src/printers.d.ts
667
- declare const printers: Plugin<Node>['printers'];
668
- //#endregion
669
- //#region src/index.d.ts
664
+ export declare const printers: Plugin<Node>['printers'];
670
665
  declare const plugin: Plugin;
671
- //#endregion
672
- export { plugin as default, options, printers };
673
- //# sourceMappingURL=index.d.mts.map
666
+ export { plugin as default };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import estreePlugin from "prettier/plugins/estree.js";
2
2
  import { createSorter } from "prettier-plugin-tailwindcss/sorter";
3
- //#region src/options.ts
3
+ // src/options.ts
4
4
  /**
5
5
  * Runtime Prettier plugin options configuration.
6
6
  *
@@ -53,8 +53,7 @@ function resolveOptions(opts) {
53
53
  tailwindFunctions
54
54
  };
55
55
  }
56
- //#endregion
57
- //#region src/ast/ast-literal.ts
56
+ // src/ast/ast-literal.ts
58
57
  function isLiteral(node) {
59
58
  return Boolean(node && node.type === "Literal");
60
59
  }
@@ -66,8 +65,7 @@ const buildStringLiteral = (value) => ({
66
65
  value,
67
66
  raw: JSON.stringify(value)
68
67
  });
69
- //#endregion
70
- //#region src/ast/ast-array-expression.ts
68
+ // src/ast/ast-array-expression.ts
71
69
  function isArrayExpression(node) {
72
70
  return node.type === "ArrayExpression";
73
71
  }
@@ -78,20 +76,17 @@ function buildStringArrayExpression(groups) {
78
76
  elements: groups.map(buildStringLiteral)
79
77
  };
80
78
  }
81
- //#endregion
82
- //#region src/ast/ast-call-expression.ts
79
+ // src/ast/ast-call-expression.ts
83
80
  function isCallExpression(node) {
84
81
  return node.type === "CallExpression";
85
82
  }
86
- //#endregion
87
- //#region src/ast/ast-comment.ts
83
+ // src/ast/ast-comment.ts
88
84
  function isNodeWithComments(node) {
89
85
  if (!node) return false;
90
86
  const n = node;
91
87
  return Boolean(n.comments && n.comments.length > 0 || n.leadingComments && n.leadingComments.length > 0 || n.trailingComments && n.trailingComments.length > 0);
92
88
  }
93
- //#endregion
94
- //#region src/ast/ast-common.ts
89
+ // src/ast/ast-common.ts
95
90
  const estree = estreePlugin.printers.estree;
96
91
  function isNode(value) {
97
92
  const node = value;
@@ -106,8 +101,7 @@ function isIdentifier(node, names) {
106
101
  }
107
102
  return true;
108
103
  }
109
- //#endregion
110
- //#region src/ast/ast-jsx.ts
104
+ // src/ast/ast-jsx.ts
111
105
  function isJSXAttribute(node) {
112
106
  return node.type === "JSXAttribute";
113
107
  }
@@ -136,8 +130,7 @@ function buildCallExpression(wrapperName, args) {
136
130
  optional: false
137
131
  };
138
132
  }
139
- //#endregion
140
- //#region src/ast/ast-property.ts
133
+ // src/ast/ast-property.ts
141
134
  function isObjectExpression(node) {
142
135
  return node.type === "ObjectExpression";
143
136
  }
@@ -152,11 +145,9 @@ function isStaticProperty(node, keyName) {
152
145
  if (typeof keyName === "function") return keyName(key);
153
146
  return key === keyName;
154
147
  }
155
- //#endregion
156
- //#region src/ast/key.ts
148
+ // src/ast/key.ts
157
149
  const isClassNameKey = (keyName) => keyName.endsWith("ClassName") || keyName.endsWith("className");
158
- //#endregion
159
- //#region src/orders/class-groups.ts
150
+ // src/orders/class-groups.ts
160
151
  /**
161
152
  * Groups Tailwind CSS classGroupIds into 14 primary categories (+ 1 unknown group) for the plugin.
162
153
  * Each category contains a list of corresponding groupIds from tailwind-merge.
@@ -590,8 +581,7 @@ const classGroups = [
590
581
  * Total class group count (14 standard groups + 1 Unknown/Custom group at the end).
591
582
  */
592
583
  const classGroupsCount = classGroups.length + 1;
593
- //#endregion
594
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/utils.ts
584
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/utils.ts
595
585
  /**
596
586
  * Concatenates two arrays faster than the array spread operator.
597
587
  */
@@ -601,8 +591,7 @@ const concatArrays = (array1, array2) => {
601
591
  for (let i = 0; i < array2.length; i++) combinedArray[array1.length + i] = array2[i];
602
592
  return combinedArray;
603
593
  };
604
- //#endregion
605
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/class-group-utils.ts
594
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/class-group-utils.ts
606
595
  const createClassValidatorObject = (classGroupId, validator) => ({
607
596
  classGroupId,
608
597
  validator
@@ -738,8 +727,7 @@ const getPart = (classPartObject, path) => {
738
727
  return current;
739
728
  };
740
729
  const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
741
- //#endregion
742
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/lru-cache.ts
730
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/lru-cache.ts
743
731
  const createLruCache = (maxCacheSize) => {
744
732
  if (maxCacheSize < 1) return {
745
733
  get: () => void 0,
@@ -841,8 +829,7 @@ const createParseClassName = (config) => {
841
829
  }
842
830
  return parseClassName;
843
831
  };
844
- //#endregion
845
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/sort-modifiers.ts
832
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/sort-modifiers.ts
846
833
  /**
847
834
  * Sorts modifiers according to following schema:
848
835
  * - Predefined modifiers are sorted alphabetically
@@ -876,8 +863,7 @@ const createSortModifiers = (config) => {
876
863
  return result;
877
864
  };
878
865
  };
879
- //#endregion
880
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/config-utils.ts
866
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/config-utils.ts
881
867
  const createConfigUtils = (config) => ({
882
868
  cache: createLruCache(config.cacheSize),
883
869
  parseClassName: createParseClassName(config),
@@ -891,22 +877,21 @@ const createPostfixLookupClassGroupIds = (config) => {
891
877
  if (classGroupIds) for (let i = 0; i < classGroupIds.length; i++) lookup[classGroupIds[i]] = true;
892
878
  return lookup;
893
879
  };
894
- //#endregion
895
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/from-theme.ts
880
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/from-theme.ts
896
881
  const fallbackThemeArr = [];
897
882
  const fromTheme = (key) => {
898
883
  const themeGetter = (theme) => theme[key] || fallbackThemeArr;
899
884
  themeGetter.isThemeGetter = true;
885
+ themeGetter.themeKey = key;
900
886
  return themeGetter;
901
887
  };
902
- //#endregion
903
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/validators.ts
888
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/validators.ts
904
889
  const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
905
890
  const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
906
891
  const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
907
892
  const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
908
893
  const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
909
- const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
894
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/;
910
895
  const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
911
896
  const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
912
897
  const isFraction = (value) => fractionRegex.test(value);
@@ -962,8 +947,7 @@ const isLabelNumber = (label) => label === "number";
962
947
  const isLabelFamilyName = (label) => label === "family-name";
963
948
  const isLabelWeight = (label) => label === "number" || label === "weight";
964
949
  const isLabelShadow = (label) => label === "shadow";
965
- //#endregion
966
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/default-config.ts
950
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/default-config.ts
967
951
  const getDefaultConfig = () => {
968
952
  /**
969
953
  * Theme getters for theme variable namespaces
@@ -1117,6 +1101,7 @@ const getDefaultConfig = () => {
1117
1101
  ...scaleUnambiguousSpacing()
1118
1102
  ];
1119
1103
  const scaleSizingInline = () => [
1104
+ themeContainer,
1120
1105
  isFraction,
1121
1106
  "screen",
1122
1107
  "full",
@@ -1349,6 +1334,7 @@ const getDefaultConfig = () => {
1349
1334
  */
1350
1335
  columns: [{ columns: [
1351
1336
  isNumber,
1337
+ "auto",
1352
1338
  isArbitraryValue,
1353
1339
  isArbitraryVariable,
1354
1340
  themeContainer
@@ -1926,32 +1912,32 @@ const getDefaultConfig = () => {
1926
1912
  size: [{ size: scaleSizing() }],
1927
1913
  /**
1928
1914
  * Inline Size
1929
- * @see https://tailwindcss.com/docs/width
1915
+ * @see https://tailwindcss.com/docs/inline-size
1930
1916
  */
1931
1917
  "inline-size": [{ inline: ["auto", ...scaleSizingInline()] }],
1932
1918
  /**
1933
1919
  * Min-Inline Size
1934
- * @see https://tailwindcss.com/docs/min-width
1920
+ * @see https://tailwindcss.com/docs/min-inline-size
1935
1921
  */
1936
1922
  "min-inline-size": [{ "min-inline": ["auto", ...scaleSizingInline()] }],
1937
1923
  /**
1938
1924
  * Max-Inline Size
1939
- * @see https://tailwindcss.com/docs/max-width
1925
+ * @see https://tailwindcss.com/docs/max-inline-size
1940
1926
  */
1941
1927
  "max-inline-size": [{ "max-inline": ["none", ...scaleSizingInline()] }],
1942
1928
  /**
1943
1929
  * Block Size
1944
- * @see https://tailwindcss.com/docs/height
1930
+ * @see https://tailwindcss.com/docs/block-size
1945
1931
  */
1946
1932
  "block-size": [{ block: ["auto", ...scaleSizingBlock()] }],
1947
1933
  /**
1948
1934
  * Min-Block Size
1949
- * @see https://tailwindcss.com/docs/min-height
1935
+ * @see https://tailwindcss.com/docs/min-block-size
1950
1936
  */
1951
1937
  "min-block-size": [{ "min-block": ["auto", ...scaleSizingBlock()] }],
1952
1938
  /**
1953
1939
  * Max-Block Size
1954
- * @see https://tailwindcss.com/docs/max-height
1940
+ * @see https://tailwindcss.com/docs/max-block-size
1955
1941
  */
1956
1942
  "max-block-size": [{ "max-block": ["none", ...scaleSizingBlock()] }],
1957
1943
  /**
@@ -2013,6 +1999,7 @@ const getDefaultConfig = () => {
2013
1999
  "max-h": [{ "max-h": [
2014
2000
  "screen",
2015
2001
  "lh",
2002
+ "none",
2016
2003
  ...scaleSizing()
2017
2004
  ] }],
2018
2005
  /**
@@ -2128,7 +2115,11 @@ const getDefaultConfig = () => {
2128
2115
  * Line Height
2129
2116
  * @see https://tailwindcss.com/docs/line-height
2130
2117
  */
2131
- leading: [{ leading: [themeLeading, ...scaleUnambiguousSpacing()] }],
2118
+ leading: [{ leading: [
2119
+ "none",
2120
+ themeLeading,
2121
+ ...scaleUnambiguousSpacing()
2122
+ ] }],
2132
2123
  /**
2133
2124
  * List Style Image
2134
2125
  * @see https://tailwindcss.com/docs/list-style-image
@@ -2397,6 +2388,7 @@ const getDefaultConfig = () => {
2397
2388
  isArbitraryValue
2398
2389
  ],
2399
2390
  conic: [
2391
+ "",
2400
2392
  isInteger,
2401
2393
  isArbitraryVariable,
2402
2394
  isArbitraryValue
@@ -2707,6 +2699,7 @@ const getDefaultConfig = () => {
2707
2699
  */
2708
2700
  shadow: [{ shadow: [
2709
2701
  "",
2702
+ "inner",
2710
2703
  "none",
2711
2704
  themeShadow,
2712
2705
  isArbitraryVariableShadow,
@@ -3704,8 +3697,18 @@ const getDefaultConfig = () => {
3704
3697
  "bottom",
3705
3698
  "left"
3706
3699
  ],
3707
- "inset-x": ["right", "left"],
3708
- "inset-y": ["top", "bottom"],
3700
+ "inset-x": [
3701
+ "start",
3702
+ "end",
3703
+ "right",
3704
+ "left"
3705
+ ],
3706
+ "inset-y": [
3707
+ "inset-bs",
3708
+ "inset-be",
3709
+ "top",
3710
+ "bottom"
3711
+ ],
3709
3712
  flex: [
3710
3713
  "basis",
3711
3714
  "grow",
@@ -3724,8 +3727,18 @@ const getDefaultConfig = () => {
3724
3727
  "pb",
3725
3728
  "pl"
3726
3729
  ],
3727
- px: ["pr", "pl"],
3728
- py: ["pt", "pb"],
3730
+ px: [
3731
+ "ps",
3732
+ "pe",
3733
+ "pr",
3734
+ "pl"
3735
+ ],
3736
+ py: [
3737
+ "pbs",
3738
+ "pbe",
3739
+ "pt",
3740
+ "pb"
3741
+ ],
3729
3742
  m: [
3730
3743
  "mx",
3731
3744
  "my",
@@ -3738,8 +3751,18 @@ const getDefaultConfig = () => {
3738
3751
  "mb",
3739
3752
  "ml"
3740
3753
  ],
3741
- mx: ["mr", "ml"],
3742
- my: ["mt", "mb"],
3754
+ mx: [
3755
+ "ms",
3756
+ "me",
3757
+ "mr",
3758
+ "ml"
3759
+ ],
3760
+ my: [
3761
+ "mbs",
3762
+ "mbe",
3763
+ "mt",
3764
+ "mb"
3765
+ ],
3743
3766
  size: ["w", "h"],
3744
3767
  "font-size": ["leading"],
3745
3768
  "fvn-normal": [
@@ -3790,8 +3813,18 @@ const getDefaultConfig = () => {
3790
3813
  "border-w-b",
3791
3814
  "border-w-l"
3792
3815
  ],
3793
- "border-w-x": ["border-w-r", "border-w-l"],
3794
- "border-w-y": ["border-w-t", "border-w-b"],
3816
+ "border-w-x": [
3817
+ "border-w-s",
3818
+ "border-w-e",
3819
+ "border-w-r",
3820
+ "border-w-l"
3821
+ ],
3822
+ "border-w-y": [
3823
+ "border-w-bs",
3824
+ "border-w-be",
3825
+ "border-w-t",
3826
+ "border-w-b"
3827
+ ],
3795
3828
  "border-color": [
3796
3829
  "border-color-x",
3797
3830
  "border-color-y",
@@ -3804,8 +3837,18 @@ const getDefaultConfig = () => {
3804
3837
  "border-color-b",
3805
3838
  "border-color-l"
3806
3839
  ],
3807
- "border-color-x": ["border-color-r", "border-color-l"],
3808
- "border-color-y": ["border-color-t", "border-color-b"],
3840
+ "border-color-x": [
3841
+ "border-color-s",
3842
+ "border-color-e",
3843
+ "border-color-r",
3844
+ "border-color-l"
3845
+ ],
3846
+ "border-color-y": [
3847
+ "border-color-bs",
3848
+ "border-color-be",
3849
+ "border-color-t",
3850
+ "border-color-b"
3851
+ ],
3809
3852
  translate: [
3810
3853
  "translate-x",
3811
3854
  "translate-y",
@@ -3829,8 +3872,18 @@ const getDefaultConfig = () => {
3829
3872
  "scroll-mb",
3830
3873
  "scroll-ml"
3831
3874
  ],
3832
- "scroll-mx": ["scroll-mr", "scroll-ml"],
3833
- "scroll-my": ["scroll-mt", "scroll-mb"],
3875
+ "scroll-mx": [
3876
+ "scroll-ms",
3877
+ "scroll-me",
3878
+ "scroll-mr",
3879
+ "scroll-ml"
3880
+ ],
3881
+ "scroll-my": [
3882
+ "scroll-mbs",
3883
+ "scroll-mbe",
3884
+ "scroll-mt",
3885
+ "scroll-mb"
3886
+ ],
3834
3887
  "scroll-p": [
3835
3888
  "scroll-px",
3836
3889
  "scroll-py",
@@ -3843,8 +3896,18 @@ const getDefaultConfig = () => {
3843
3896
  "scroll-pb",
3844
3897
  "scroll-pl"
3845
3898
  ],
3846
- "scroll-px": ["scroll-pr", "scroll-pl"],
3847
- "scroll-py": ["scroll-pt", "scroll-pb"],
3899
+ "scroll-px": [
3900
+ "scroll-ps",
3901
+ "scroll-pe",
3902
+ "scroll-pr",
3903
+ "scroll-pl"
3904
+ ],
3905
+ "scroll-py": [
3906
+ "scroll-pbs",
3907
+ "scroll-pbe",
3908
+ "scroll-pt",
3909
+ "scroll-pb"
3910
+ ],
3848
3911
  touch: [
3849
3912
  "touch-x",
3850
3913
  "touch-y",
@@ -3872,8 +3935,7 @@ const getDefaultConfig = () => {
3872
3935
  ]
3873
3936
  };
3874
3937
  };
3875
- //#endregion
3876
- //#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/src/lib/merge-configs.ts
3938
+ // ../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/src/lib/merge-configs.ts
3877
3939
  /**
3878
3940
  * @param baseConfig Config where other config will be merged into. This object will be mutated.
3879
3941
  * @param configExtension Partial config to merge into the `baseConfig`.
@@ -3909,8 +3971,7 @@ const mergeArrayProperties = (baseObject, mergeObject, key) => {
3909
3971
  const mergeValue = mergeObject[key];
3910
3972
  if (mergeValue !== void 0) baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;
3911
3973
  };
3912
- //#endregion
3913
- //#region src/orders/class-order.tailwind-merge.ts
3974
+ // src/orders/class-order.tailwind-merge.ts
3914
3975
  const isGroupNamed = (value) => value.startsWith("group/");
3915
3976
  const isPeerNamed = (value) => value.startsWith("peer/");
3916
3977
  const configExtend = { classGroups: {
@@ -3918,8 +3979,7 @@ const configExtend = { classGroups: {
3918
3979
  peer: ["peer", isPeerNamed]
3919
3980
  } };
3920
3981
  const configUtils = createConfigUtils(mergeConfigs(getDefaultConfig(), { extend: configExtend }));
3921
- //#endregion
3922
- //#region src/group-classes/group-classes.bucket.ts
3982
+ // src/group-classes/group-classes.bucket.ts
3923
3983
  /**
3924
3984
  * Fast lookup map from tailwind-merge groupId to class group index (0-based).
3925
3985
  * Built with null prototype to avoid prototype pollution and enable O(1) lookups.
@@ -3952,8 +4012,7 @@ function addClassToBucket(bucket, cls, modifiers) {
3952
4012
  else bucket.modifierGroups.set(modifierKey, [cls]);
3953
4013
  bucket.totalModifierCount++;
3954
4014
  }
3955
- //#endregion
3956
- //#region src/orders/modifier-order.prettier-plugin-tailwindcss.ts
4015
+ // src/orders/modifier-order.prettier-plugin-tailwindcss.ts
3957
4016
  const sorter = await createSorter({});
3958
4017
  const DUMMY_SUFFIX = ":flex";
3959
4018
  /**
@@ -3969,8 +4028,7 @@ function sortModifierKeys(modifierKeys) {
3969
4028
  const [sortedDummyClasses] = sorter.sortClassLists([dummyClasses]);
3970
4029
  return sortedDummyClasses.map((cls) => cls.slice(0, -5));
3971
4030
  }
3972
- //#endregion
3973
- //#region src/group-classes/group-classes.format.ts
4031
+ // src/group-classes/group-classes.format.ts
3974
4032
  function formatBucketLines(bucket, modifierThreshold) {
3975
4033
  const { baseClasses, modifierGroups, totalModifierCount } = bucket;
3976
4034
  if (baseClasses.length === 0 && totalModifierCount === 0) return [];
@@ -3988,8 +4046,7 @@ function formatBucketLines(bucket, modifierThreshold) {
3988
4046
  }
3989
4047
  return lines;
3990
4048
  }
3991
- //#endregion
3992
- //#region src/group-classes/group-classes.ts
4049
+ // src/group-classes/group-classes.ts
3993
4050
  function groupClasses(classes, modifierThreshold = 2) {
3994
4051
  const unknownGroupIndex = classGroupsCount - 1;
3995
4052
  const buckets = createClassBuckets();
@@ -4005,13 +4062,11 @@ function groupClasses(classes, modifierThreshold = 2) {
4005
4062
  }
4006
4063
  return result;
4007
4064
  }
4008
- //#endregion
4009
- //#region src/utils/split-classes.ts
4065
+ // src/utils/split-classes.ts
4010
4066
  function splitClasses(classString) {
4011
4067
  return classString.trim().split(/\s+/).filter(Boolean);
4012
4068
  }
4013
- //#endregion
4014
- //#region src/handle-node/handle-expressions.ts
4069
+ // src/handle-node/handle-expressions.ts
4015
4070
  /** Extracts and regroups static class strings in an expression array while preserving dynamic elements. */
4016
4071
  function handleExpressionArray(expressions, options) {
4017
4072
  const staticStrings = [];
@@ -4031,8 +4086,7 @@ function handleExpressionArray(expressions, options) {
4031
4086
  const grouped = groupClasses(classes, options.modifierThreshold).map(buildStringLiteral);
4032
4087
  return dynamicExpressions.length === 0 ? grouped : [...grouped, ...dynamicExpressions];
4033
4088
  }
4034
- //#endregion
4035
- //#region src/handle-node/handle-string-literal.ts
4089
+ // src/handle-node/handle-string-literal.ts
4036
4090
  /** Processes a static string literal, grouping Tailwind CSS classes if threshold is exceeded. */
4037
4091
  function handleStringLiteral(node, options, target) {
4038
4092
  if (isNodeWithComments(node)) return node;
@@ -4043,8 +4097,7 @@ function handleStringLiteral(node, options, target) {
4043
4097
  const wrapperName = options.tailwindFunctions[0];
4044
4098
  return buildExpressionContainer(buildCallExpression(wrapperName, groups.map(buildStringLiteral)));
4045
4099
  }
4046
- //#endregion
4047
- //#region src/handle-node/handle-cva-class-value.ts
4100
+ // src/handle-node/handle-cva-class-value.ts
4048
4101
  /** Handles a class value expression (StringLiteral, CallExpression, or ArrayExpression) inside `cva(...)`. */
4049
4102
  function handleCvaClassValue(expression, options) {
4050
4103
  if (isStringLiteral(expression)) return handleStringLiteral(expression, options, "cva");
@@ -4066,16 +4119,14 @@ function handleCvaClassValue(expression, options) {
4066
4119
  }
4067
4120
  return expression;
4068
4121
  }
4069
- //#endregion
4070
- //#region src/handle-targets/target-cva-base.ts
4122
+ // src/handle-targets/target-cva-base.ts
4071
4123
  /** Processes base class value (params[0]) in a `cva(...)` call. */
4072
4124
  function handleTargetCvaBase(cva, options) {
4073
4125
  const base = cva.arguments[0];
4074
4126
  if (!base || base.type === "SpreadElement") return;
4075
4127
  cva.arguments[0] = handleCvaClassValue(base, options);
4076
4128
  }
4077
- //#endregion
4078
- //#region src/handle-targets/target-cva-compound-variants.ts
4129
+ // src/handle-targets/target-cva-compound-variants.ts
4079
4130
  /** Processes `compoundVariants[*].class` and `compoundVariants[*].className` in `cva(...)`. */
4080
4131
  function handleTargetCvaCompoundVariants(config, options) {
4081
4132
  const cvProp = config.properties.find((property) => isStaticProperty(property, "compoundVariants"));
@@ -4088,8 +4139,7 @@ function handleTargetCvaCompoundVariants(config, options) {
4088
4139
  }
4089
4140
  }
4090
4141
  }
4091
- //#endregion
4092
- //#region src/handle-targets/target-cva-variants.ts
4142
+ // src/handle-targets/target-cva-variants.ts
4093
4143
  /** Processes `variants[*][*]` (all leaf option values) in `cva(...)`. */
4094
4144
  function handleTargetCvaVariants(config, options) {
4095
4145
  const variantsProp = config.properties.find((p) => isStaticProperty(p, "variants"));
@@ -4102,8 +4152,7 @@ function handleTargetCvaVariants(config, options) {
4102
4152
  }
4103
4153
  }
4104
4154
  }
4105
- //#endregion
4106
- //#region src/handle-targets/target-cva.ts
4155
+ // src/handle-targets/target-cva.ts
4107
4156
  /**
4108
4157
  * Handles a `cva(...)` CallExpression, transforming static classes in
4109
4158
  * `params[0]`, `params[1].variants`, and `params[1].compoundVariants`.
@@ -4118,8 +4167,7 @@ function handleTargetCVA(node, options) {
4118
4167
  }
4119
4168
  return true;
4120
4169
  }
4121
- //#endregion
4122
- //#region src/handle-targets/target-jsx.ts
4170
+ // src/handle-targets/target-jsx.ts
4123
4171
  /** Handles JSX attribute formatting for `className` and `*ClassName` attributes. */
4124
4172
  function handleTargetJSX(node, options) {
4125
4173
  if (!isJSXAttribute(node) || !isJSXIdentifier(node.name) || !isClassNameKey(node.name.name) || !node.value) return false;
@@ -4134,8 +4182,7 @@ function handleTargetJSX(node, options) {
4134
4182
  }
4135
4183
  return true;
4136
4184
  }
4137
- //#endregion
4138
- //#region src/handle-targets/target-object-properties.ts
4185
+ // src/handle-targets/target-object-properties.ts
4139
4186
  /**
4140
4187
  * Handles Object Property class attributes whose value is a CallExpression
4141
4188
  * calling a function in `tailwindFunctions` (e.g. `{ className: cn(...) }`).
@@ -4147,8 +4194,7 @@ function handleTargetObjectProperty(node, options) {
4147
4194
  else node.value.arguments = [result];
4148
4195
  return true;
4149
4196
  }
4150
- //#endregion
4151
- //#region src/printers.walk-ast.ts
4197
+ // src/printers.walk-ast.ts
4152
4198
  const NON_TRAVERSABLE_KEYS = /* @__PURE__ */ new Set(["parent", "comments"]);
4153
4199
  const TARGET_HANDLERS = [
4154
4200
  handleTargetJSX,
@@ -4167,8 +4213,7 @@ function walkAst(node, options) {
4167
4213
  } else if (isNode(child)) walkAst(child, options);
4168
4214
  }
4169
4215
  }
4170
- //#endregion
4171
- //#region src/printers.ts
4216
+ // src/printers.ts
4172
4217
  const printers = { estree: {
4173
4218
  ...estreePlugin.printers.estree,
4174
4219
  preprocess(ast, options) {
@@ -4182,13 +4227,11 @@ const printers = { estree: {
4182
4227
  return processedAST;
4183
4228
  }
4184
4229
  } };
4185
- //#endregion
4186
- //#region src/index.ts
4230
+ // src/index.ts
4187
4231
  const plugin = {
4188
4232
  options,
4189
4233
  printers
4190
4234
  };
4191
- //#endregion
4192
4235
  export { plugin as default, options, printers };
4193
4236
 
4194
4237
  //# sourceMappingURL=index.mjs.map