@rzl-zone/utils-js 3.0.2-beta.2 → 3.1.0

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.
Files changed (198) hide show
  1. package/README.md +56 -27
  2. package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +23 -23
  3. package/dist/any-BmdI8UbK.d.ts +56 -56
  4. package/dist/arrays-normalize-recursive-CnjYJ9xg.d.ts +66 -66
  5. package/dist/assertions/index.cjs +1 -1
  6. package/dist/assertions/index.d.ts +398 -418
  7. package/dist/assertions/index.js +1 -1
  8. package/dist/chunk-26XIKDJI.cjs +1 -0
  9. package/dist/chunk-2NWHDDM5.js +1 -0
  10. package/dist/chunk-2UIRWYE3.js +1 -0
  11. package/dist/chunk-3KBHD3BS.cjs +1 -0
  12. package/dist/chunk-4HD2O5A4.js +1 -0
  13. package/dist/chunk-5C2SMIGX.cjs +1 -0
  14. package/dist/chunk-5I2B5DOG.js +1 -0
  15. package/dist/chunk-6HQDHIOD.js +1 -0
  16. package/dist/chunk-735HJXBT.cjs +1 -0
  17. package/dist/chunk-7BXIZM57.cjs +1 -0
  18. package/dist/chunk-7KJBDGEP.js +1 -0
  19. package/dist/chunk-7U44T63D.cjs +1 -0
  20. package/dist/chunk-AJ65QFV2.js +1 -0
  21. package/dist/chunk-APHDUCVQ.js +1 -0
  22. package/dist/chunk-BSVZRN7C.js +1 -0
  23. package/dist/chunk-C6JFHUR2.cjs +1 -0
  24. package/dist/chunk-CPLBRGST.js +1 -0
  25. package/dist/chunk-CTBRLEOG.js +1 -0
  26. package/dist/chunk-DUK2K4FB.js +1 -0
  27. package/dist/chunk-DVMHRLKP.cjs +1 -0
  28. package/dist/chunk-E63WVPZE.cjs +1 -0
  29. package/dist/chunk-EBMHQW7X.cjs +1 -0
  30. package/dist/chunk-EGNZCW4K.js +1 -0
  31. package/dist/chunk-FEKDB32T.js +1 -0
  32. package/dist/chunk-FIAAX3UE.js +1 -0
  33. package/dist/chunk-FUS3DVLB.cjs +1 -0
  34. package/dist/chunk-GGRMHIFJ.cjs +1 -0
  35. package/dist/chunk-HQ5GQTEE.js +1 -0
  36. package/dist/chunk-I5X5IN4H.js +1 -0
  37. package/dist/chunk-I7YGXQPI.cjs +1 -0
  38. package/dist/chunk-INUFZJLX.cjs +1 -0
  39. package/dist/chunk-IREHUBF7.js +1 -0
  40. package/dist/chunk-J2RGTPGK.cjs +1 -0
  41. package/dist/chunk-KHO2SBNA.cjs +1 -0
  42. package/dist/chunk-KXIXXSWX.cjs +1 -0
  43. package/dist/chunk-LBMEEJWA.js +1 -0
  44. package/dist/chunk-MC3LXMCQ.js +1 -0
  45. package/dist/chunk-MMSYCIJ2.cjs +1 -1
  46. package/dist/chunk-NU3N4WHD.cjs +1 -0
  47. package/dist/chunk-ODZQXH7E.cjs +1 -0
  48. package/dist/chunk-ONZFBJVW.js +1 -0
  49. package/dist/chunk-PXDRHFIE.js +1 -0
  50. package/dist/chunk-Q6NHYWVX.js +1 -0
  51. package/dist/chunk-QNKGP5DY.js +1 -0
  52. package/dist/chunk-S6Z6I2EG.cjs +1 -0
  53. package/dist/chunk-SMADKXZE.js +1 -0
  54. package/dist/chunk-TSLYDPBJ.js +1 -0
  55. package/dist/chunk-TVXADXCC.cjs +1 -0
  56. package/dist/chunk-UDA26MCU.cjs +1 -0
  57. package/dist/chunk-UET567YM.cjs +1 -0
  58. package/dist/chunk-VEYMQ3UA.js +1 -0
  59. package/dist/chunk-W2W3L2M5.js +1 -0
  60. package/dist/chunk-WBWTXKMC.cjs +1 -0
  61. package/dist/chunk-WVSPXFTY.js +1 -0
  62. package/dist/chunk-XC2PYCT4.cjs +1 -0
  63. package/dist/chunk-XIXA5KDF.cjs +1 -0
  64. package/dist/chunk-Y4O5KZF6.cjs +1 -0
  65. package/dist/chunk-YRM7IJLX.js +1 -0
  66. package/dist/chunk-YT3MSZKK.cjs +1 -0
  67. package/dist/chunk-YXHCULSO.cjs +1 -0
  68. package/dist/chunk-YZR5OGJA.cjs +1 -0
  69. package/dist/chunk-Z4DXK7A6.cjs +1 -0
  70. package/dist/chunk-ZXIWDFEQ.js +1 -0
  71. package/dist/conversions/index.cjs +1 -1
  72. package/dist/conversions/index.d.ts +1368 -1515
  73. package/dist/conversions/index.js +1 -1
  74. package/dist/env/index.cjs +1 -1
  75. package/dist/env/index.d.ts +14 -17
  76. package/dist/env/index.js +1 -1
  77. package/dist/events/index.cjs +1 -1
  78. package/dist/events/index.d.ts +111 -108
  79. package/dist/events/index.js +1 -1
  80. package/dist/extends-Bk_SBGdT.d.ts +367 -0
  81. package/dist/formatting/index.cjs +1 -1
  82. package/dist/formatting/index.d.ts +878 -840
  83. package/dist/formatting/index.js +1 -1
  84. package/dist/generator/index.cjs +1 -1
  85. package/dist/generator/index.d.ts +173 -150
  86. package/dist/generator/index.js +1 -1
  87. package/dist/if-CvT4R7Kh.d.ts +16 -16
  88. package/dist/is-array-Cymwrsmm.d.ts +1119 -0
  89. package/dist/isPlainObject-BVhBAPHX.d.ts +169 -0
  90. package/dist/never-BfayMBF9.d.ts +64 -64
  91. package/dist/next/index.cjs +1 -8
  92. package/dist/next/index.d.ts +196 -176
  93. package/dist/next/index.js +1 -8
  94. package/dist/next/server/index.cjs +1 -2
  95. package/dist/next/server/index.d.ts +26 -40
  96. package/dist/next/server/index.js +1 -2
  97. package/dist/nils-DMz3kU7M.d.ts +155 -155
  98. package/dist/omit-VvmIsZmX.d.ts +25 -25
  99. package/dist/operations/index.cjs +1 -1
  100. package/dist/operations/index.d.ts +121 -176
  101. package/dist/operations/index.js +1 -1
  102. package/dist/or-DyZCRvaU.d.ts +89 -0
  103. package/dist/parsers/index.cjs +1 -1
  104. package/dist/parsers/index.d.ts +35 -36
  105. package/dist/parsers/index.js +1 -1
  106. package/dist/predicates/index.cjs +1 -1
  107. package/dist/predicates/index.d.ts +1797 -1677
  108. package/dist/predicates/index.js +1 -1
  109. package/dist/prettify-C4xLcYOP.d.ts +328 -328
  110. package/dist/promise/index.cjs +1 -1
  111. package/dist/promise/index.d.ts +29 -38
  112. package/dist/promise/index.js +1 -1
  113. package/dist/rzl-utils.global.js +1 -4
  114. package/dist/string-XA-til3C.d.ts +351 -0
  115. package/dist/strings/index.cjs +1 -1
  116. package/dist/strings/index.d.ts +712 -787
  117. package/dist/strings/index.js +1 -1
  118. package/dist/tailwind/index.cjs +1 -0
  119. package/dist/tailwind/index.d.ts +565 -0
  120. package/dist/tailwind/index.js +1 -0
  121. package/dist/type-data-DDs-u2kq.d.ts +241 -241
  122. package/dist/types/index.d.ts +3266 -3266
  123. package/dist/urls/index.cjs +1 -1
  124. package/dist/urls/index.d.ts +384 -409
  125. package/dist/urls/index.js +1 -1
  126. package/package.json +61 -18
  127. package/dist/array-CIZRbqTF.d.ts +0 -223
  128. package/dist/chunk-2TRAPBZ7.cjs +0 -1
  129. package/dist/chunk-3D74QO5D.cjs +0 -1
  130. package/dist/chunk-4DK3RCC4.js +0 -2
  131. package/dist/chunk-4JOQ45HL.js +0 -1
  132. package/dist/chunk-55CZALRS.js +0 -1
  133. package/dist/chunk-56QBKKRE.js +0 -1
  134. package/dist/chunk-5JFV3GDE.cjs +0 -4
  135. package/dist/chunk-5SZUSNGZ.js +0 -1
  136. package/dist/chunk-62HX5Z45.cjs +0 -1
  137. package/dist/chunk-7NA6DUHR.cjs +0 -2
  138. package/dist/chunk-7YWAQOA4.cjs +0 -1
  139. package/dist/chunk-BVPMMWDL.cjs +0 -1
  140. package/dist/chunk-BYZAD3XN.cjs +0 -1
  141. package/dist/chunk-CEFYHEM4.cjs +0 -1
  142. package/dist/chunk-CN53M4QZ.cjs +0 -1
  143. package/dist/chunk-D47MHBSD.cjs +0 -1
  144. package/dist/chunk-DGH75GJD.js +0 -1
  145. package/dist/chunk-E5NUI7PN.js +0 -1
  146. package/dist/chunk-ELDDNERR.js +0 -1
  147. package/dist/chunk-EXZ47NOW.js +0 -1
  148. package/dist/chunk-FDITZ5C6.cjs +0 -1
  149. package/dist/chunk-FF76ISQ2.js +0 -1
  150. package/dist/chunk-FIEZKTAZ.cjs +0 -1
  151. package/dist/chunk-FSSV24W7.cjs +0 -1
  152. package/dist/chunk-GCGU2WB7.js +0 -1
  153. package/dist/chunk-GECI2YBP.js +0 -1
  154. package/dist/chunk-GQE4OVHC.cjs +0 -1
  155. package/dist/chunk-GRVZXQXL.cjs +0 -1
  156. package/dist/chunk-I4AVNHPA.cjs +0 -1
  157. package/dist/chunk-JFRL7NKU.js +0 -4
  158. package/dist/chunk-JWHM3WZQ.cjs +0 -1
  159. package/dist/chunk-KCQDDZJE.cjs +0 -1
  160. package/dist/chunk-L54ZPSYJ.js +0 -1
  161. package/dist/chunk-LVKAYEZ4.js +0 -1
  162. package/dist/chunk-MBDWTK54.cjs +0 -1
  163. package/dist/chunk-MNGGDB2G.js +0 -1
  164. package/dist/chunk-MY7BA4GI.cjs +0 -1
  165. package/dist/chunk-N2IJPIND.cjs +0 -1
  166. package/dist/chunk-NIMNTEGV.js +0 -1
  167. package/dist/chunk-NNM7QCNB.js +0 -1
  168. package/dist/chunk-PUQXRLZH.cjs +0 -1
  169. package/dist/chunk-PVJF2JHM.js +0 -1
  170. package/dist/chunk-QCFXEUKL.js +0 -1
  171. package/dist/chunk-QFCGBBSY.js +0 -1
  172. package/dist/chunk-QQYAUPSK.cjs +0 -1
  173. package/dist/chunk-RN3TP3S3.js +0 -1
  174. package/dist/chunk-RV2VULM7.cjs +0 -1
  175. package/dist/chunk-SW6HYEW7.cjs +0 -1
  176. package/dist/chunk-SYJC7UAW.js +0 -1
  177. package/dist/chunk-TC4VBE4Y.cjs +0 -1
  178. package/dist/chunk-TUXDINHF.cjs +0 -1
  179. package/dist/chunk-U5Y2FXMN.cjs +0 -1
  180. package/dist/chunk-UUPQI6ND.cjs +0 -1
  181. package/dist/chunk-VYCGZ2S6.js +0 -1
  182. package/dist/chunk-W5EDKJK3.js +0 -1
  183. package/dist/chunk-WHAVUFEU.js +0 -1
  184. package/dist/chunk-XCFIOTCV.js +0 -1
  185. package/dist/chunk-XE27XPJR.js +0 -1
  186. package/dist/chunk-XH6MCRLP.js +0 -1
  187. package/dist/chunk-XVB3ZZEB.js +0 -1
  188. package/dist/chunk-ZBSIGJFO.cjs +0 -1
  189. package/dist/chunk-ZYAML74V.js +0 -1
  190. package/dist/extends-Mp81Hq9-.d.ts +0 -145
  191. package/dist/index.cjs +0 -1
  192. package/dist/index.d.ts +0 -1
  193. package/dist/index.js +0 -1
  194. package/dist/is-array-Ckm_47hw.d.ts +0 -1557
  195. package/dist/isPlainObject-BKYaI6a8.d.ts +0 -182
  196. package/dist/stylings/index.cjs +0 -1
  197. package/dist/stylings/index.d.ts +0 -49
  198. package/dist/stylings/index.js +0 -1
@@ -1 +1 @@
1
- export{b as getInitialsName,a as replaceAt}from'../chunk-LVKAYEZ4.js';export{a as normalizeSpaces,b as normalizeString,c as removeSpaces,d as stripHtmlTags}from'../chunk-GECI2YBP.js';import'../chunk-NIMNTEGV.js';export{s as capitalizeFirst,t as capitalizeWords,B as slugify,u as toCamelCase,A as toDotCase,y as toKebabCase,x as toLowerCase,w as toPascalCase,v as toPascalCaseSpace,z as toSnakeCase}from'../chunk-XCFIOTCV.js';
1
+ export{getInitialsName,replaceAt}from"../chunk-2NWHDDM5.js";export{normalizeSpaces,normalizeString,removeSpaces,stripHtmlTags}from"../chunk-Q6NHYWVX.js";import"../chunk-TSLYDPBJ.js";export{capitalizeFirst,capitalizeWords,slugify,toCamelCase,toDotCase,toKebabCase,toLowerCase,toPascalCase,toPascalCaseSpace,toSnakeCase}from"../chunk-2UIRWYE3.js";
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../chunk-ODZQXH7E.cjs");require("../chunk-YT3MSZKK.cjs"),require("../chunk-INUFZJLX.cjs"),Object.defineProperty(exports,"cnV3",{enumerable:!0,get:function(){return e.cnV3}}),Object.defineProperty(exports,"cnV4",{enumerable:!0,get:function(){return e.cnV4}}),Object.defineProperty(exports,"customCnV3",{enumerable:!0,get:function(){return e.customCnV3}}),Object.defineProperty(exports,"customCnV4",{enumerable:!0,get:function(){return e.customCnV4}}),Object.defineProperty(exports,"shouldForwardProp",{enumerable:!0,get:function(){return e.shouldForwardProp}}),Object.defineProperty(exports,"twMergeDefaultV3",{enumerable:!0,get:function(){return e.twMergeDefaultV3}}),Object.defineProperty(exports,"twMergeDefaultV4",{enumerable:!0,get:function(){return e.twMergeDefaultV4}});
@@ -0,0 +1,565 @@
1
+ import{ClassValue}from'clsx';import{Config}from'tailwindcss';import{ClassNameValue as ClassNameValue$1,ConfigExtension as ConfigExtension$1}from'tailwind-merge-v3';import{ClassNameValue,ConfigExtension}from'tailwind-merge-v4';type ClassesValue=ClassValue[];
2
+ /** -------------------------------------------------------------
3
+ * * ***Default `cnV3` utility (Tailwind v3).***
4
+ * -------------------------------------------------------------
5
+ * **Combines class-name values and then deduplicates/resolves
6
+ * conflicts using {@link twMergeDefaultV3 | `twMergeDefaultV3`}
7
+ * with **Tailwind v3 default config only**.**
8
+ * - ✅ **Use this when:**
9
+ * - Your project uses **Tailwind v3**.
10
+ * - You need a simple `cn` that works out of the box without a custom config.
11
+ * - ⚡ **Need custom rules?**
12
+ * - Create a project-wide helper using
13
+ * {@link twMergeDefaultV3 | `twMergeDefaultV3`} +
14
+ * {@link customCnV3 | `customCnV3`} (see Example 2).
15
+ * @param {ClassesValue} classes - Class values (string, array, object, etc).
16
+ * @returns {string} Merged Tailwind class string.
17
+ * @example
18
+ * #### Example 1: ✅ Default usage (Tailwind v3).
19
+ * ```ts
20
+ * cnV3("p-2", "p-4");
21
+ * // ➔ "p-4"
22
+ *
23
+ * cnV3("text-red-500", { "text-blue-500": true });
24
+ * // ➔ "text-blue-500"
25
+ *
26
+ * cnV3(["m-2", ["m-4"]], "m-8");
27
+ * // ➔ "m-8"
28
+ * ```
29
+ * #### Example 2: ⚡ Custom project-wide usage with Tailwind config.
30
+ * ```ts
31
+ * import tailwindConfig from "../tailwind.config";
32
+ * import { twMergeDefaultV3, customCnV3, type ClassesValue } from "@rzl-zone/utils-js/tailwind";
33
+ *
34
+ * const cnApp = (...classes: ClassesValue) => {
35
+ * return customCnV3(
36
+ * twMergeDefaultV3({
37
+ * config: tailwindConfig,
38
+ * extend: {
39
+ * classGroups: {
40
+ * "text-shadow": [
41
+ * "text-shadow",
42
+ * "text-shadow-sm",
43
+ * "text-shadow-md",
44
+ * ],
45
+ * },
46
+ * },
47
+ * }),
48
+ * // ...other options classes,
49
+ * );
50
+ * };
51
+ *
52
+ * cnApp("p-2 p-4"); // ➔ "p-4"
53
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
54
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
55
+ * ```
56
+ */
57
+ declare const cnV3:(...classes:ClassesValue)=>string;
58
+ /** -------------------------------------------------------------
59
+ * * ***Default `cnV4` utility (Tailwind v4).***
60
+ * -------------------------------------------------------------
61
+ * **Combines class-name values and then deduplicates/resolves
62
+ * conflicts using {@link twMergeDefaultV4 | `twMergeDefaultV4`}
63
+ * with **Tailwind v4 default config only**.**
64
+ * - ✅ **Use this when:**
65
+ * - Your project uses **Tailwind v4**.
66
+ * - You need a simple `cn` that works out of the box without a custom config.
67
+ * - ⚡ **Need custom rules?**
68
+ * - Create a project-wide helper using
69
+ * {@link twMergeDefaultV4 | `twMergeDefaultV4`} +
70
+ * {@link customCnV4 | `customCnV4`} (see Example 2).
71
+ * @param {ClassesValue} classes - Class values (string, array, object, etc).
72
+ * @returns {string} Merged Tailwind class string.
73
+ * @example
74
+ * #### Example 1: ✅ Default usage (Tailwind v4).
75
+ * ```ts
76
+ * cnV4("p-2", "p-4");
77
+ * // ➔ "p-4"
78
+ *
79
+ * cnV4("text-red-500", { "text-blue-500": true });
80
+ * // ➔ "text-blue-500"
81
+ *
82
+ * cnV4(["m-2", ["m-4"]], "m-8");
83
+ * // ➔ "m-8"
84
+ * ```
85
+ * #### Example 2: ⚡ Custom project-wide usage with Tailwind config.
86
+ * ```ts
87
+ * import tailwindConfig from "../tailwind.config";
88
+ * import { twMergeDefaultV4, customCnV4, type ClassesValue } from "@rzl-zone/utils-js/tailwind";
89
+ *
90
+ * const cnApp = (...classes: ClassesValue) => {
91
+ * return customCnV4(
92
+ * twMergeDefaultV4({
93
+ * config: tailwindConfig,
94
+ * extend: {
95
+ * classGroups: {
96
+ * "text-shadow": [
97
+ * "text-shadow",
98
+ * "text-shadow-sm",
99
+ * "text-shadow-md",
100
+ * ],
101
+ * },
102
+ * },
103
+ * }),
104
+ * // ...other options classes,
105
+ * );
106
+ * };
107
+ *
108
+ * cnApp("p-2 p-4"); // ➔ "p-4"
109
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
110
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
111
+ * ```
112
+ */
113
+ declare const cnV4:(...classes:ClassesValue)=>string;
114
+ /** Tailwind Merge config extension type */
115
+ type TwMergeConfigExt$1=ConfigExtension<string,string>;
116
+ /** * ***Extra options for customized Tailwind class merge.*** */
117
+ type OptionsConfigMergeTwCn$1={
118
+ /** ***Optional Tailwind CSS configuration object.***
119
+ *
120
+ * - **Pass your project’s `tailwind.config.ts` if you want to:**
121
+ * - Respect custom theme values (`colors`, `fontSize`, `spacing`, `etc`.)
122
+ * - Enable/disable `corePlugins`
123
+ * - Register `plugins`
124
+ * - Extend class groups (e.g., `text-shadow`)
125
+ * - **If omitted, the **default Tailwind config** is used.**
126
+ * @example
127
+ * ```ts
128
+ * import tailwindConfig from "../tailwind.config";
129
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
130
+ *
131
+ * const myCustomTwCls = twMergeDefaultV4({
132
+ * config: tailwindConfig,
133
+ * });
134
+ *
135
+ * myCustomTwCls("text-primary text-secondary");
136
+ * // => "text-secondary" (resolved from your theme config)
137
+ * ```
138
+ */
139
+ config?:TailwindConfig;
140
+ /** ***Prefix added to Tailwind-generated classes.***
141
+ *
142
+ * - **Tailwind v3**:
143
+ * - Use {@link twMergeDefaultV3 | **`twMergeDefaultV3`**} instead.
144
+ * - Reference:
145
+ * [**`Tailwind v3 using prefix docs`**](https://v3.tailwindcss.com/docs/configuration#prefix).
146
+ *
147
+ * - **Tailwind v4**:
148
+ * - Configure in your CSS import, e.g. `@import "tailwindcss" prefix(tw);`
149
+ * - The prefix appears like a variant at the start of the class, e.g. `tw:flex`,
150
+ * `tw:bg-red-500`, `tw:hover:bg-red-600`.
151
+ * - Reference:
152
+ * [**`Tailwind v4 using prefix docs`**](https://tailwindcss.com/docs/upgrade-guide#using-a-prefix).
153
+ *
154
+ * - **ℹ️ Notes**:
155
+ * - Tailwind v3:
156
+ * - Use {@link twMergeDefaultV3 | **`twMergeDefaultV3`**} instead.
157
+ * - Tailwind v4: prefer identifier (e.g. `tw`) without `-`.
158
+ * - Fallback order:
159
+ * 1. `prefix` option
160
+ * 2. `config.prefix` (if defined)
161
+ * 3. `undefined`
162
+ *
163
+ * @example
164
+ * - Tailwind version 4 (in CSS entry only):
165
+ * - CSS files:
166
+ * ```css
167
+ * `@import "tailwindcss" prefix(tw);`
168
+ * ```
169
+ * - Your custom TwMerge file:
170
+ * ```ts
171
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
172
+ *
173
+ * const twMergeV3 = twMergeDefaultV4({
174
+ * prefix: "tw",
175
+ * // ... other config
176
+ * });
177
+ * ```
178
+ * - Tailwind version 4 (with `tailwind.config.{js,ts,mjs,...etc}`):
179
+ * - Reference:
180
+ * [**`Tailwind v4 using @config docs`**](https://tailwindcss.com/docs/functions-and-directives#config-directive).
181
+ * - CSS files:
182
+ * ```css
183
+ * `@import "tailwindcss";`
184
+ * `@config "./tailwind.config.ts";`
185
+ * ```
186
+ * - Config files:
187
+ * ```ts
188
+ * import type { Config } from "tailwindcss";
189
+ *
190
+ * const config: Config = {
191
+ * prefix: 'tw-',
192
+ * // ... other config
193
+ * };
194
+ *
195
+ * export default config;
196
+ * ```
197
+ * - Your custom TwMerge file:
198
+ * ```ts
199
+ * import config from "../tailwind.config";
200
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
201
+ *
202
+ * const twMergeV4 = twMergeDefaultV4({ config });
203
+ * // now without passing `prefix` options, will use automatic from config.
204
+ * ```
205
+ */
206
+ prefix?:string;};
207
+ /** * ***Options type for Tailwind Merge v4 wrapper.*** */
208
+ type OptionsMergeTwClsV4=Omit<TwMergeConfigExt$1,"prefix">& OptionsConfigMergeTwCn$1;
209
+ /** * ***Tailwind Merge function Version 4 signature (same as twMerge).*** */
210
+ type TwMergeDefaultFnV4=(...classLists:ClassNameValue[])=>string;type TailwindConfig=Config;
211
+ /** Tailwind Merge config extension type */
212
+ type TwMergeConfigExt=ConfigExtension$1<string,string>;
213
+ /** * ***Extra options for customized Tailwind class merge.*** */
214
+ type OptionsConfigMergeTwCn={
215
+ /** ***Optional Tailwind CSS configuration object.***
216
+ *
217
+ * - **Pass your project’s `tailwind.config.ts` if you want to:**
218
+ * - Respect custom theme values (`colors`, `fontSize`, `spacing`, `etc`.)
219
+ * - Enable/disable `corePlugins`
220
+ * - Register `plugins`
221
+ * - Extend class groups (e.g., `text-shadow`)
222
+ * - **If omitted, the **default Tailwind config** is used.**
223
+ * @example
224
+ * ```ts
225
+ * import tailwindConfig from "../tailwind.config";
226
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
227
+ *
228
+ * const myCustomTwCls = twMergeDefaultV3({
229
+ * config: tailwindConfig,
230
+ * });
231
+ *
232
+ * myCustomTwCls("text-primary text-secondary");
233
+ * // => "text-secondary" (resolved from your theme config)
234
+ * ```
235
+ */
236
+ config?:TailwindConfig;
237
+ /** ***Prefix added to Tailwind-generated classes.***
238
+ *
239
+ * - **Tailwind v3**:
240
+ * - Configure in `tailwind.config.js`, e.g. `prefix: 'tw-'`.
241
+ * - Variants first; negative utilities: `-mt-8` → `-tw-mt-8`.
242
+ * - Reference:
243
+ * [**`Tailwind v3 using prefix docs`**](https://v3.tailwindcss.com/docs/configuration#prefix).
244
+ * - **Tailwind v4**:
245
+ * - Use {@link twMergeDefaultV4 | **`twMergeDefaultV4`**} instead.
246
+ * - Reference:
247
+ * [**`Tailwind v4 using prefix docs`**](https://tailwindcss.com/docs/upgrade-guide#using-a-prefix).
248
+ * - **ℹ️ Notes**:
249
+ * - Tailwind v3: use hyphenated prefix (`tw-`).
250
+ * - Fallback order:
251
+ * 1. `prefix` option
252
+ * 2. `config.prefix` (if defined)
253
+ * 3. `undefined`
254
+ * - Tailwind v4:
255
+ * - Use {@link twMergeDefaultV4 | **`twMergeDefaultV4`**} instead.
256
+ * @example
257
+ * - Tailwind version 3 (`tailwind.config.ts`):
258
+ * ```ts
259
+ * import type { Config } from "tailwindcss";
260
+ *
261
+ * const config: Config = {
262
+ * prefix: 'tw-',
263
+ * // ... other config
264
+ * };
265
+ *
266
+ * export default config;
267
+ * ```
268
+ */
269
+ prefix?:string;};
270
+ /** * ***Options type for Tailwind Merge v3 wrapper.*** */
271
+ type OptionsMergeTwClsV3=Omit<TwMergeConfigExt,"prefix">& OptionsConfigMergeTwCn;
272
+ /** * ***Tailwind Merge function Version 3 signature (same as twMerge).*** */
273
+ type TwMergeDefaultFnV3=(...classLists:ClassNameValue$1[])=>string;
274
+ /** -------------------------------------------------------------
275
+ * * ***Factory utility for building a custom `cn` helper (Tailwind `v3`).***
276
+ * -------------------------------------------------------------
277
+ * **Wraps internally function to combines class-name values and applies the provided
278
+ * Tailwind merge function (from {@link twMergeDefaultV3 | `twMergeDefaultV3`}).**
279
+ * - 🔑 **When to use it?**
280
+ * - Your project uses **Tailwind v3**.
281
+ * - You extend Tailwind merge rules (`classGroups`, `tailwind.config`).
282
+ * - You need multiple `cn*` variants across apps/packages.
283
+ * @param {TwMergeDefaultFnV3} customTwMergeV3 - Merge function created via {@link twMergeDefaultV3 | `twMergeDefaultV3`}.
284
+ * @param {ClassesValue} classes - Class values (`string`, `array`, `object`, `etc`).
285
+ * @returns {string} Merged Tailwind class string.
286
+ * @example
287
+ * ```ts
288
+ * import tailwindConfig from "../tailwind.config";
289
+ * import { twMergeDefaultV3, customCnV3, type ClassesValue } from "@rzl-zone/utils-js/tailwind";
290
+ *
291
+ * // 1. Create a custom merge function
292
+ * const myCustomTwMerge = twMergeDefaultV3({
293
+ * config: tailwindConfig,
294
+ * extend: {
295
+ * classGroups: {
296
+ * "text-shadow": ["text-shadow", "text-shadow-sm", "text-shadow-md"],
297
+ * },
298
+ * },
299
+ * });
300
+ *
301
+ * // 2. Build your helper using `customCnV3`
302
+ * export const cnApp = (...classes: ClassesValue) => {
303
+ * return customCnV3(myCustomTwMerge, ...classes);
304
+ * };
305
+ * // ✅ Usage
306
+ * cnApp("p-2", "p-4"); // ➔ "p-4"
307
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
308
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
309
+ * ```
310
+ */
311
+ declare const customCnV3:(customTwMergeV3:TwMergeDefaultFnV3,...classes:ClassesValue)=>string;
312
+ /** -------------------------------------------------------------
313
+ * * ***Factory utility for building a custom `cn` helper (Tailwind `v4`).***
314
+ * -------------------------------------------------------------
315
+ * **Wraps internally function to combines class-name values and applies the provided
316
+ * Tailwind merge function (from {@link twMergeDefaultV4 | `twMergeDefaultV4`}).**
317
+ * - 🔑 **When to use it?**
318
+ * - Your project uses **Tailwind v4**.
319
+ * - You extend Tailwind merge rules (`classGroups`, `tailwind.config`).
320
+ * - You need multiple `cn*` variants across apps/packages.
321
+ * @param {TwMergeDefaultFnV4} customTwMergeV4 - Merge function created via {@link twMergeDefaultV4 | `twMergeDefaultV4`}.
322
+ * @param {ClassesValue} classes - Class values (`string`, `array`, `object`, `etc`).
323
+ * @returns {string} Merged Tailwind class string.
324
+ * @example
325
+ * ```ts
326
+ * import tailwindConfig from "../tailwind.config";
327
+ * import { twMergeDefaultV4, customCnV4, type ClassesValue } from "@rzl-zone/utils-js/tailwind";
328
+ *
329
+ * // 1. Create a custom merge function
330
+ * const myCustomTwMerge = twMergeDefaultV4({
331
+ * config: tailwindConfig,
332
+ * extend: {
333
+ * classGroups: {
334
+ * "text-shadow": ["text-shadow", "text-shadow-sm", "text-shadow-md"],
335
+ * },
336
+ * },
337
+ * });
338
+ *
339
+ * // 2. Build your helper using `customCnV4`
340
+ * export const cnApp = (...classes: ClassesValue) => {
341
+ * return customCnV4(myCustomTwMerge, ...classes);
342
+ * };
343
+ *
344
+ * // ✅ Usage
345
+ * cnApp("p-2", "p-4"); // ➔ "p-4"
346
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
347
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
348
+ * ```
349
+ */
350
+ declare const customCnV4:(customTwMergeV4:TwMergeDefaultFnV4,...classes:ClassesValue)=>string;
351
+ /** Converts a union type into an intersection type.
352
+ *
353
+ * @template U - The union type to be converted.
354
+ */
355
+ type UnionToIntersectionStrict<U>=(U extends never?never:(arg:U)=>never)extends(arg:infer I)=>void?I:never;
356
+ /** Converts a union type into a tuple type.
357
+ *
358
+ * @template T - The union type to be converted.
359
+ */
360
+ type UnionToTupleStrict<T>=UnionToIntersectionStrict<T extends never?never:(t:T)=>T>extends(_:never)=>infer W?[...UnionToTupleStrict<Exclude<T,W>>,W]:[];
361
+ /** ----------------------------------------------------------
362
+ * * ***Utility: `shouldForwardProp`.***
363
+ * ----------------------------------------------------------
364
+ * **Creates a helper for styled-components `shouldForwardProp`.**
365
+ * @description
366
+ * This utility returns a predicate function that determines whether a given prop
367
+ * should be forwarded to the DOM, useful for filtering out internal props (e.g.,
368
+ * `$size`, `$active`) so they don't end up as invalid HTML attributes.
369
+ * - **Behavior:**
370
+ * - Accepts a tuple (strict) of prop keys to exclude from forwarding.
371
+ * - Automatically coerces prop names to string for consistent checking.
372
+ * - Supports string, number, or symbol keys (via PropertyKey).
373
+ * - Will throw an error if the provided `props` argument is not an array.
374
+ * @template CustomProps - The type of the component's props.
375
+ * @param {UnionToTupleStrict<keyof CustomProps>} props
376
+ * The list of prop names (keys of `CustomProps`) to exclude from forwarding.
377
+ * @returns {(propName: PropertyKey) => boolean}
378
+ * A function that takes a prop name and returns `true` if it should be forwarded, `false` if it should be blocked.
379
+ * @throws {TypeError} If `props` is not an array.
380
+ * @example
381
+ * type Props = { $size: string; color: string; visible: boolean };
382
+ * const filter = shouldForwardProp<Props>(["$size"]);
383
+ * filter("$size"); // ➔ false (blocked)
384
+ * filter("color"); // ➔ true (forwarded)
385
+ * @example
386
+ * // Using with styled-components:
387
+ * styled.div.withConfig({
388
+ * shouldForwardProp: shouldForwardProp<CustomProps>(["$internal"])
389
+ * })
390
+ */
391
+ declare const shouldForwardProp:<CustomProps>(props:Partial<UnionToTupleStrict<keyof CustomProps>>)=>((propName:keyof CustomProps)=>boolean);
392
+ /** -------------------------------------------------------------
393
+ * * ***Customized Tailwind class merger Version 3 with extended rules.***
394
+ * -------------------------------------------------------------
395
+ * **Wraps **{@link extendTailwindMerge| `extendTailwindMerge`}** with Tailwind’s default config
396
+ * ({@link getDefaultConfig | `getDefaultConfig()`}) to create a **project-ready `twMerge`**.**
397
+ * - 🔑 **When to use it?**
398
+ * - Your project uses **Tailwind v3**.
399
+ * - Extend **class groups** (e.g. add `text-shadow`).
400
+ * - Respect your own **`tailwind.config.ts`** (colors, spacing, fontSize, etc).
401
+ * - Override or fine-tune **merge behavior**.
402
+ * - Create a **project-wide `cn` helper** that replaces raw `twMerge`.
403
+ * @param {OptionsMergeTwClsV3} [options={}]
404
+ * Merge options:
405
+ * - `config` – Your Tailwind config (from `tailwind.config.ts`).
406
+ * - `prefix` - Utility prefix (e.g. `tw-` or `tw`).
407
+ * - `extend` – Extra merge rules (classGroups, theme, etc).
408
+ * - `override` – Fully replace rules.
409
+ * - `cacheSize` – Parsed class cache size.
410
+ * - `experimentalParseClassName` – Custom classname parser.
411
+ * @returns {TwMergeDefaultFnV3}
412
+ * Customized Tailwind class merge function version 3 (same signature as `twMerge`).
413
+ * @example
414
+ * #### Example 1: ***Default behavior (same as tailwind-merge).***
415
+ * ```ts
416
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
417
+ *
418
+ * const twMerge = twMergeDefaultV3();
419
+ * twMerge("p-2 p-4");
420
+ * // ➔ "p-4"
421
+ * ```
422
+ * #### Example 2: ***Extend class groups.***
423
+ * ```ts
424
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
425
+ *
426
+ * const twMerge2 = twMergeDefaultV3({
427
+ * extend: {
428
+ * classGroups: {
429
+ * shadow: ["shadow-soft", "shadow-hard"],
430
+ * },
431
+ * },
432
+ * });
433
+ * twMerge2("shadow-soft shadow-hard");
434
+ * // ➔ "shadow-hard"
435
+ * ```
436
+ * #### Example 3: ***Respect your Tailwind config.***
437
+ * ```ts
438
+ * import config from "../tailwind.config";
439
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
440
+ *
441
+ * const twMerge3 = twMergeDefaultV3({ config });
442
+ * twMerge3("text-base text-xxs");
443
+ * // ➔ "text-xxs" (resolved from config)
444
+ * ```
445
+ * #### Example 4: ***Project-wide helper (recommended).***
446
+ * ```ts
447
+ * import configTwCss from "../tailwind.config";
448
+ * import { customCnV3, twMergeDefaultV3, type ClassesValue } from "@rzl-zone/utils-js/tailwind";
449
+ *
450
+ * const customTwMerge = twMergeDefaultV3({
451
+ * config: configTwCss,
452
+ * extend: {
453
+ * classGroups: { shadow: ["shadow-soft", "shadow-hard"] },
454
+ * },
455
+ * });
456
+ *
457
+ * export const cnApp = (...classes: ClassesValue) => {
458
+ * return customCnV3(customTwMerge, ...classes);
459
+ * };
460
+ *
461
+ * // ✅ Usage
462
+ * cnApp("p-2 p-4"); // ➔ "p-4"
463
+ * cnApp("shadow-soft shadow-hard"); // ➔ "shadow-hard"
464
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (uses config)
465
+ *
466
+ * // ⚡ Difference with package-level `cn`
467
+ * import { cnV3, cnV4 } from "@rzl-zone/utils-js/tailwind";
468
+ *
469
+ * cnV3("text-base text-xxs");
470
+ * // or
471
+ * cnV4("text-base text-xxs");
472
+ * // ➔ "text-base" (❌ doesn't know about your config)
473
+ *
474
+ * cnApp("text-base text-xxs");
475
+ * // ➔ "text-xxs" (✅ respects config)
476
+ * ```
477
+ */
478
+ declare const twMergeDefaultV3:(options?:OptionsMergeTwClsV3)=>TwMergeDefaultFnV3;
479
+ /** -------------------------------------------------------------
480
+ * * ***Customized Tailwind class merger Version 4 with extended rules.***
481
+ * -------------------------------------------------------------
482
+ * **Wraps **{@link extendTailwindMerge| `extendTailwindMerge`}** with Tailwind’s default config
483
+ * ({@link getDefaultConfig | `getDefaultConfig()`}) to create a **project-ready `twMerge`**.**
484
+ * - 🔑 **When to use it?**
485
+ * - Your project uses **Tailwind v4**.
486
+ * - Extend **class groups** (e.g. add `text-shadow`).
487
+ * - Respect your own **`tailwind.config.ts`** (colors, spacing, fontSize, etc).
488
+ * - Override or fine-tune **merge behavior**.
489
+ * - Create a **project-wide `cn` helper** that replaces raw `twMerge`.
490
+ * @param {OptionsMergeTwClsV4} [options={}]
491
+ * Merge options:
492
+ * - `config` – Your Tailwind config (from `tailwind.config.ts`).
493
+ * - `prefix` - Utility prefix (e.g. `tw-` or `tw`).
494
+ * - `extend` – Extra merge rules (classGroups, theme, etc).
495
+ * - `override` – Fully replace rules.
496
+ * - `cacheSize` – Parsed class cache size.
497
+ * - `experimentalParseClassName` – Custom classname parser.
498
+ * @returns {TwMergeDefaultFnV4}
499
+ * Customized Tailwind class merge function version 4 (same signature as `twMerge`).
500
+ * @example
501
+ * #### Example 1: ***Default behavior (same as tailwind-merge).***
502
+ * ```ts
503
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
504
+ *
505
+ * const twMerge = twMergeDefaultV4();
506
+ * twMerge("p-2 p-4");
507
+ * // ➔ "p-4"
508
+ * ```
509
+ * #### Example 2: ***Extend class groups.***
510
+ * ```ts
511
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
512
+ *
513
+ * const twMerge2 = twMergeDefaultV4({
514
+ * extend: {
515
+ * classGroups: {
516
+ * shadow: ["shadow-soft", "shadow-hard"],
517
+ * },
518
+ * },
519
+ * });
520
+ * twMerge2("shadow-soft shadow-hard");
521
+ * // ➔ "shadow-hard"
522
+ * ```
523
+ * #### Example 3: ***Respect your Tailwind config.***
524
+ * ```ts
525
+ * import config from "../tailwind.config";
526
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
527
+ *
528
+ * const twMerge3 = twMergeDefaultV4({ config });
529
+ * twMerge3("text-base text-xxs");
530
+ * // ➔ "text-xxs" (resolved from config)
531
+ * ```
532
+ * #### Example 4: ***Project-wide helper (recommended).***
533
+ * ```ts
534
+ * import configTwCss from "../tailwind.config";
535
+ * import { customCnV4, twMergeDefaultV4, type ClassesValue } from "@rzl-zone/utils-js/tailwind";
536
+ *
537
+ * const customTwMerge = twMergeDefaultV4({
538
+ * config: configTwCss,
539
+ * extend: {
540
+ * classGroups: { shadow: ["shadow-soft", "shadow-hard"] },
541
+ * },
542
+ * });
543
+ *
544
+ * export const cnApp = (...classes: ClassesValue) => {
545
+ * return customCnV4(customTwMerge, ...classes);
546
+ * };
547
+ *
548
+ * // ✅ Usage
549
+ * cnApp("p-2 p-4"); // ➔ "p-4"
550
+ * cnApp("shadow-soft shadow-hard"); // ➔ "shadow-hard"
551
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (uses config)
552
+ *
553
+ * // ⚡ Difference with package-level `cn`
554
+ * import { cnV3, cnV4 } from "@rzl-zone/utils-js/tailwind";
555
+ *
556
+ * cnV3("text-base text-xxs");
557
+ * // or
558
+ * cnV4("text-base text-xxs");
559
+ * // ➔ "text-base" (❌ doesn't know about your config)
560
+ *
561
+ * cnApp("text-base text-xxs");
562
+ * // ➔ "text-xxs" (✅ respects config)
563
+ * ```
564
+ */
565
+ declare const twMergeDefaultV4:(options?:OptionsMergeTwClsV4)=>TwMergeDefaultFnV4;export{type ClassesValue,cnV3,cnV4,customCnV3,customCnV4,shouldForwardProp,twMergeDefaultV3,twMergeDefaultV4};
@@ -0,0 +1 @@
1
+ export{cnV3,cnV4,customCnV3,customCnV4,shouldForwardProp,twMergeDefaultV3,twMergeDefaultV4}from"../chunk-CPLBRGST.js";import"../chunk-ZXIWDFEQ.js";import"../chunk-2UIRWYE3.js";