@rzl-zone/utils-js 3.12.0 → 3.12.1-beta.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.
Files changed (286) hide show
  1. package/{LICENSE.md → LICENSE} +3 -3
  2. package/README.md +69 -96
  3. package/dist/.references/index.d.cts +25 -0
  4. package/dist/.references/index.d.ts +25 -0
  5. package/dist/assertIsArray-DJXkjHZs.cjs +26 -0
  6. package/dist/assertIsArray-DJXkjHZs.cjs.map +1 -0
  7. package/dist/assertIsArray-bTA3XLjq.js +20 -0
  8. package/dist/assertIsArray-bTA3XLjq.js.map +1 -0
  9. package/dist/assertIsBoolean-C8WEXVr2.cjs +1283 -0
  10. package/dist/assertIsBoolean-C8WEXVr2.cjs.map +1 -0
  11. package/dist/assertIsBoolean-DR1SaXPD.js +1073 -0
  12. package/dist/assertIsBoolean-DR1SaXPD.js.map +1 -0
  13. package/dist/assertIsString-BiHQSrB2.cjs +26 -0
  14. package/dist/assertIsString-BiHQSrB2.cjs.map +1 -0
  15. package/dist/assertIsString-CEB07_83.js +20 -0
  16. package/dist/assertIsString-CEB07_83.js.map +1 -0
  17. package/dist/assertions/index.cjs +37 -40
  18. package/dist/assertions/index.cjs.map +1 -0
  19. package/dist/assertions/index.d.cts +12 -0
  20. package/dist/assertions/index.d.ts +10 -824
  21. package/dist/assertions/index.js +30 -13
  22. package/dist/assertions/index.js.map +1 -0
  23. package/dist/conversions/index.cjs +34 -103
  24. package/dist/conversions/index.d.cts +12 -0
  25. package/dist/conversions/index.d.ts +10 -1791
  26. package/dist/conversions/index.js +14 -24
  27. package/dist/conversions-BNIh_tCH.js +380 -0
  28. package/dist/conversions-BNIh_tCH.js.map +1 -0
  29. package/dist/conversions-D_Kh0a_C.cjs +446 -0
  30. package/dist/conversions-D_Kh0a_C.cjs.map +1 -0
  31. package/dist/events/index.cjs +55 -31
  32. package/dist/events/index.cjs.map +1 -0
  33. package/dist/events/index.d.cts +176 -0
  34. package/dist/events/index.d.ts +164 -166
  35. package/dist/events/index.js +50 -12
  36. package/dist/events/index.js.map +1 -0
  37. package/dist/formatEnvPort-B3OLxQk9.cjs +171 -0
  38. package/dist/formatEnvPort-B3OLxQk9.cjs.map +1 -0
  39. package/dist/formatEnvPort-ByFVLjSV.js +159 -0
  40. package/dist/formatEnvPort-ByFVLjSV.js.map +1 -0
  41. package/dist/formatters/index.cjs +21 -61
  42. package/dist/formatters/index.d.cts +12 -0
  43. package/dist/formatters/index.d.ts +10 -2152
  44. package/dist/formatters/index.js +10 -18
  45. package/dist/formatters--1m_vpE8.js +369 -0
  46. package/dist/formatters--1m_vpE8.js.map +1 -0
  47. package/dist/formatters-Cbij0XLU.cjs +429 -0
  48. package/dist/formatters-Cbij0XLU.cjs.map +1 -0
  49. package/dist/generators/index.cjs +165 -41
  50. package/dist/generators/index.cjs.map +1 -0
  51. package/dist/generators/index.d.cts +12 -0
  52. package/dist/generators/index.d.ts +10 -338
  53. package/dist/generators/index.js +158 -14
  54. package/dist/generators/index.js.map +1 -0
  55. package/dist/index-59zbLcPr.d.ts +340 -0
  56. package/dist/index-B6tawc8L.d.cts +1716 -0
  57. package/dist/index-C267akkJ.d.ts +2158 -0
  58. package/dist/index-CeBC2Vvl.d.cts +2361 -0
  59. package/dist/index-CgRDTI6f.d.ts +822 -0
  60. package/dist/index-CoiUBVmr.d.ts +720 -0
  61. package/dist/index-D4fcasfZ.d.cts +720 -0
  62. package/dist/index-DDrSQKIc.d.ts +1716 -0
  63. package/dist/index-DsGxO31H.d.cts +765 -0
  64. package/dist/index-Hg1qJkjl.d.ts +765 -0
  65. package/dist/index-Qm3iFwd0.d.cts +2158 -0
  66. package/dist/index-UPp94Agr.d.ts +2361 -0
  67. package/dist/index-gBA_8SuF.d.cts +340 -0
  68. package/dist/index-jyDqzicx.d.cts +822 -0
  69. package/dist/isBigInt-C4krUeAw.cjs +20 -0
  70. package/dist/isBigInt-C4krUeAw.cjs.map +1 -0
  71. package/dist/isBigInt-DKe0M6hp.js +14 -0
  72. package/dist/isBigInt-DKe0M6hp.js.map +1 -0
  73. package/dist/isEmptyObject-DCipFwxJ.js +25 -0
  74. package/dist/isEmptyObject-DCipFwxJ.js.map +1 -0
  75. package/dist/isEmptyObject-ZkSwRC_D.cjs +37 -0
  76. package/dist/isEmptyObject-ZkSwRC_D.cjs.map +1 -0
  77. package/dist/isEmptyString-BXzKAC2j.js +15 -0
  78. package/dist/isEmptyString-BXzKAC2j.js.map +1 -0
  79. package/dist/isEmptyString-UiiUsSQj.cjs +21 -0
  80. package/dist/isEmptyString-UiiUsSQj.cjs.map +1 -0
  81. package/dist/isEmptyValue-BQzcjVaL.cjs +30 -0
  82. package/dist/isEmptyValue-BQzcjVaL.cjs.map +1 -0
  83. package/dist/isEmptyValue-jqOr7OHD.js +24 -0
  84. package/dist/isEmptyValue-jqOr7OHD.js.map +1 -0
  85. package/dist/isEqual-BX49cF9m.js +87 -0
  86. package/dist/isEqual-BX49cF9m.js.map +1 -0
  87. package/dist/isEqual-BvumA3RA.cjs +111 -0
  88. package/dist/isEqual-BvumA3RA.cjs.map +1 -0
  89. package/dist/isFinite-BCnaDpod.js +15 -0
  90. package/dist/isFinite-BCnaDpod.js.map +1 -0
  91. package/dist/isFinite-D24ZaE6c.cjs +21 -0
  92. package/dist/isFinite-D24ZaE6c.cjs.map +1 -0
  93. package/dist/isInteger-Caeuz0rB.cjs +20 -0
  94. package/dist/isInteger-Caeuz0rB.cjs.map +1 -0
  95. package/dist/isInteger-naMbJsxJ.js +14 -0
  96. package/dist/isInteger-naMbJsxJ.js.map +1 -0
  97. package/dist/isPlainObject-BF-2-phb.d.cts +339 -0
  98. package/dist/isPlainObject-DxNDL8XU.d.ts +339 -0
  99. package/dist/isServer-BJHVnixd.cjs +20 -0
  100. package/dist/isServer-BJHVnixd.cjs.map +1 -0
  101. package/dist/isServer-Da3o3XSs.js +14 -0
  102. package/dist/isServer-Da3o3XSs.js.map +1 -0
  103. package/dist/isTypedArray-DuNA8tK6.js +31 -0
  104. package/dist/isTypedArray-DuNA8tK6.js.map +1 -0
  105. package/dist/isTypedArray-TJptiw2b.cjs +43 -0
  106. package/dist/isTypedArray-TJptiw2b.cjs.map +1 -0
  107. package/dist/isURL-C-kSk6KJ.js +14 -0
  108. package/dist/isURL-C-kSk6KJ.js.map +1 -0
  109. package/dist/isURL-DeUPO_oR.cjs +20 -0
  110. package/dist/isURL-DeUPO_oR.cjs.map +1 -0
  111. package/dist/isValidDomain-BB9IGhJs.cjs +1845 -0
  112. package/dist/isValidDomain-BB9IGhJs.cjs.map +1 -0
  113. package/dist/isValidDomain-DoE98yhJ.js +1827 -0
  114. package/dist/isValidDomain-DoE98yhJ.js.map +1 -0
  115. package/dist/next/index.cjs +119 -214
  116. package/dist/next/index.cjs.map +1 -0
  117. package/dist/next/index.d.cts +220 -0
  118. package/dist/next/index.d.ts +203 -214
  119. package/dist/next/index.js +117 -212
  120. package/dist/next/index.js.map +1 -0
  121. package/dist/next/server/index.cjs +25 -40
  122. package/dist/next/server/index.cjs.map +1 -0
  123. package/dist/next/server/index.d.cts +39 -0
  124. package/dist/next/server/index.d.ts +34 -35
  125. package/dist/next/server/index.js +23 -38
  126. package/dist/next/server/index.js.map +1 -0
  127. package/dist/noop-B13_ii35.cjs +18 -0
  128. package/dist/noop-B13_ii35.cjs.map +1 -0
  129. package/dist/noop-ubqAIbHD.js +12 -0
  130. package/dist/noop-ubqAIbHD.js.map +1 -0
  131. package/dist/normalizeSpaces-Bg2IZW7W.js +23 -0
  132. package/dist/normalizeSpaces-Bg2IZW7W.js.map +1 -0
  133. package/dist/normalizeSpaces-ZXnR4Qzp.cjs +29 -0
  134. package/dist/normalizeSpaces-ZXnR4Qzp.cjs.map +1 -0
  135. package/dist/normalizeString-BDdkaXui.js +15 -0
  136. package/dist/normalizeString-BDdkaXui.js.map +1 -0
  137. package/dist/normalizeString-BE6ELqEb.cjs +21 -0
  138. package/dist/normalizeString-BE6ELqEb.cjs.map +1 -0
  139. package/dist/operations/index.cjs +65 -32
  140. package/dist/operations/index.cjs.map +1 -0
  141. package/dist/operations/index.d.cts +139 -0
  142. package/dist/operations/index.d.ts +129 -134
  143. package/dist/operations/index.js +61 -17
  144. package/dist/operations/index.js.map +1 -0
  145. package/dist/parsers/index.cjs +12 -19
  146. package/dist/parsers/index.d.cts +239 -0
  147. package/dist/parsers/index.d.ts +234 -235
  148. package/dist/parsers/index.js +10 -12
  149. package/dist/parsers-BSBPgvsq.js +643 -0
  150. package/dist/parsers-BSBPgvsq.js.map +1 -0
  151. package/dist/parsers-OqDeffqc.cjs +649 -0
  152. package/dist/parsers-OqDeffqc.cjs.map +1 -0
  153. package/dist/parsing-Cao8b358.js +50 -0
  154. package/dist/parsing-Cao8b358.js.map +1 -0
  155. package/dist/parsing-DOGSCH6N.cjs +56 -0
  156. package/dist/parsing-DOGSCH6N.cjs.map +1 -0
  157. package/dist/predicates/index.cjs +91 -296
  158. package/dist/predicates/index.d.cts +13 -0
  159. package/dist/predicates/index.d.ts +12 -2482
  160. package/dist/predicates/index.js +23 -25
  161. package/dist/predicates-Bj6meyXV.js +256 -0
  162. package/dist/predicates-Bj6meyXV.js.map +1 -0
  163. package/dist/predicates-D0ubqgqy.cjs +412 -0
  164. package/dist/predicates-D0ubqgqy.cjs.map +1 -0
  165. package/dist/promises/index.cjs +76 -24
  166. package/dist/promises/index.cjs.map +1 -0
  167. package/dist/promises/index.d.cts +123 -0
  168. package/dist/promises/index.d.ts +116 -119
  169. package/dist/promises/index.js +73 -13
  170. package/dist/promises/index.js.map +1 -0
  171. package/dist/punyCode-8SrbMWfM.js +179 -0
  172. package/dist/punyCode-8SrbMWfM.js.map +1 -0
  173. package/dist/punyCode-D-Qu6nj6.cjs +185 -0
  174. package/dist/punyCode-D-Qu6nj6.cjs.map +1 -0
  175. package/dist/removeSpaces-Bmc5DX4F.js +19 -0
  176. package/dist/removeSpaces-Bmc5DX4F.js.map +1 -0
  177. package/dist/removeSpaces-CWIvhZHg.cjs +25 -0
  178. package/dist/removeSpaces-CWIvhZHg.cjs.map +1 -0
  179. package/dist/rzl-utils.global.js +20 -9
  180. package/dist/safeJsonParse-BP38mwlj.js +184 -0
  181. package/dist/safeJsonParse-BP38mwlj.js.map +1 -0
  182. package/dist/safeJsonParse-Sms2CJf4.cjs +208 -0
  183. package/dist/safeJsonParse-Sms2CJf4.cjs.map +1 -0
  184. package/dist/safeStableStringify-CJtP89qn.cjs +106 -0
  185. package/dist/safeStableStringify-CJtP89qn.cjs.map +1 -0
  186. package/dist/safeStableStringify-CXOZ9Ub8.js +88 -0
  187. package/dist/safeStableStringify-CXOZ9Ub8.js.map +1 -0
  188. package/dist/strings/index.cjs +79 -81
  189. package/dist/strings/index.cjs.map +1 -0
  190. package/dist/strings/index.d.cts +12 -0
  191. package/dist/strings/index.d.ts +10 -775
  192. package/dist/strings/index.js +62 -14
  193. package/dist/strings/index.js.map +1 -0
  194. package/dist/tailwind/index.cjs +19 -47
  195. package/dist/tailwind/index.d.cts +12 -0
  196. package/dist/tailwind/index.d.ts +11 -712
  197. package/dist/tailwind/index.js +10 -12
  198. package/dist/tailwind-B2ssevxq.js +199 -0
  199. package/dist/tailwind-B2ssevxq.js.map +1 -0
  200. package/dist/tailwind-CHIx9uxu.cjs +247 -0
  201. package/dist/tailwind-CHIx9uxu.cjs.map +1 -0
  202. package/dist/toStringArrayUnRecursive-C4zYCja7.cjs +51 -0
  203. package/dist/toStringArrayUnRecursive-C4zYCja7.cjs.map +1 -0
  204. package/dist/toStringArrayUnRecursive-DJGtPsFb.js +39 -0
  205. package/dist/toStringArrayUnRecursive-DJGtPsFb.js.map +1 -0
  206. package/dist/urls/index.cjs +130 -57
  207. package/dist/urls/index.cjs.map +1 -0
  208. package/dist/urls/index.d.cts +737 -0
  209. package/dist/urls/index.d.ts +699 -708
  210. package/dist/urls/index.js +122 -26
  211. package/dist/urls/index.js.map +1 -0
  212. package/package.json +203 -194
  213. package/dist/chunk-2AFQ33D3.cjs +0 -64
  214. package/dist/chunk-2CYDJVGM.js +0 -246
  215. package/dist/chunk-2MW4JDQ2.cjs +0 -598
  216. package/dist/chunk-2VTDXC3N.cjs +0 -1825
  217. package/dist/chunk-44XX2P34.js +0 -209
  218. package/dist/chunk-4YLBKLGS.cjs +0 -18
  219. package/dist/chunk-566CXQW7.cjs +0 -560
  220. package/dist/chunk-57EPKYID.cjs +0 -397
  221. package/dist/chunk-5MGEC3YG.js +0 -63
  222. package/dist/chunk-6EF52423.cjs +0 -249
  223. package/dist/chunk-6SCOKU3S.js +0 -109
  224. package/dist/chunk-6VUXD3CF.js +0 -119
  225. package/dist/chunk-7B76BSNK.cjs +0 -118
  226. package/dist/chunk-7Y6I2DSU.cjs +0 -101
  227. package/dist/chunk-A7S7E2EE.cjs +0 -308
  228. package/dist/chunk-AJZ6PMMZ.js +0 -16
  229. package/dist/chunk-AXGBL2IO.cjs +0 -251
  230. package/dist/chunk-B4TC6FBV.cjs +0 -678
  231. package/dist/chunk-BAV5T2E3.cjs +0 -15
  232. package/dist/chunk-BKIJBNIE.js +0 -21
  233. package/dist/chunk-BNIMTFK5.js +0 -59
  234. package/dist/chunk-BXW7YXB7.js +0 -1823
  235. package/dist/chunk-CFYZC4S6.js +0 -53
  236. package/dist/chunk-CSG4SCL3.js +0 -1587
  237. package/dist/chunk-CWQW7AKK.js +0 -676
  238. package/dist/chunk-DVMHRLKP.cjs +0 -16
  239. package/dist/chunk-EN7LVZBZ.js +0 -548
  240. package/dist/chunk-EV4Y7HCY.cjs +0 -26
  241. package/dist/chunk-F66VDYIZ.cjs +0 -18
  242. package/dist/chunk-FLJX37EL.cjs +0 -30
  243. package/dist/chunk-GKC3UDMC.cjs +0 -1623
  244. package/dist/chunk-H65I3GRZ.cjs +0 -106
  245. package/dist/chunk-HHYWB7VZ.js +0 -24
  246. package/dist/chunk-HNGGISFL.cjs +0 -65
  247. package/dist/chunk-HNSQAVSZ.cjs +0 -35
  248. package/dist/chunk-HSP6IWZK.js +0 -17
  249. package/dist/chunk-IDZS7J6T.js +0 -242
  250. package/dist/chunk-JS6R55VL.js +0 -302
  251. package/dist/chunk-JZVT5FK7.js +0 -232
  252. package/dist/chunk-KHO2SBNA.cjs +0 -16
  253. package/dist/chunk-KIDJCMNJ.js +0 -33
  254. package/dist/chunk-KOLEURVT.cjs +0 -38
  255. package/dist/chunk-L4V53MQK.cjs +0 -269
  256. package/dist/chunk-L5RDAVVH.js +0 -14
  257. package/dist/chunk-NODTV4F3.js +0 -16
  258. package/dist/chunk-NYK5K3V2.cjs +0 -211
  259. package/dist/chunk-ODUO3RTL.cjs +0 -113
  260. package/dist/chunk-ONZFBJVW.js +0 -14
  261. package/dist/chunk-PFXCTE37.js +0 -28
  262. package/dist/chunk-PPST7QAQ.js +0 -587
  263. package/dist/chunk-Q5IMYDFL.cjs +0 -33
  264. package/dist/chunk-QFFBIOJ4.js +0 -31
  265. package/dist/chunk-QNKGP5DY.js +0 -14
  266. package/dist/chunk-RRQHMOPE.cjs +0 -19
  267. package/dist/chunk-RU5OSRBU.js +0 -95
  268. package/dist/chunk-SDMPEJ4F.js +0 -35
  269. package/dist/chunk-SYNL5IKP.js +0 -115
  270. package/dist/chunk-TCDOWZQE.js +0 -16
  271. package/dist/chunk-TQPGXGKB.cjs +0 -123
  272. package/dist/chunk-TULOI4GL.js +0 -370
  273. package/dist/chunk-UBHCP4N5.cjs +0 -36
  274. package/dist/chunk-UCHF3M34.cjs +0 -56
  275. package/dist/chunk-UDA26MCU.cjs +0 -16
  276. package/dist/chunk-V3C4FYZL.cjs +0 -18
  277. package/dist/chunk-VAAHZFBF.js +0 -32
  278. package/dist/chunk-VJDDGRIK.cjs +0 -16
  279. package/dist/chunk-WVSPXFTY.js +0 -14
  280. package/dist/chunk-WYP76WXB.js +0 -101
  281. package/dist/chunk-YDE4ZBB7.cjs +0 -237
  282. package/dist/chunk-YKQEOO7C.cjs +0 -23
  283. package/dist/chunk-YSZC56SZ.js +0 -264
  284. package/dist/chunk-YWHHVDT4.js +0 -13
  285. package/dist/index.d.ts +0 -24
  286. package/dist/isPlainObject-DTJVV2Kf.d.ts +0 -536
@@ -0,0 +1,720 @@
1
+ /*!
2
+ * ========================================================================
3
+ * @rzl-zone/utils-js
4
+ * ------------------------------------------------------------------------
5
+ * Version: `3.12.1-beta.1`
6
+ * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
+ * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
+ * ========================================================================
9
+ */
10
+
11
+ import { Stringify } from "@rzl-zone/ts-types-plus";
12
+ import { Config } from "tailwindcss";
13
+ import { ClassNameValue, ConfigExtension } from "tailwind-merge-v3";
14
+ import { ClassNameValue as ClassNameValue$1, ConfigExtension as ConfigExtension$1 } from "tailwind-merge-v4";
15
+ /** ----------------------------------------------------------
16
+ * * ***Type-Utility: `ClassValue`.***
17
+ * ----------------------------------------------------------
18
+ * **Represents a single valid value that can be converted to a CSS class string.**
19
+ * @description
20
+ * - Supports the following types:
21
+ * - `string` → literal class names (non-empty only)
22
+ * - `number | bigint` → numeric class names
23
+ * - `boolean` → only `true` is considered in objects/arrays
24
+ * - `null | undefined` → ignored
25
+ * - `ClassObject` → objects where **keys with truthy values** are included
26
+ * - `ClassValues` → arrays recursively flattened
27
+ * - Used internally by ***`cx` utility function*** to process mixed input values.
28
+ * @example
29
+ * ```ts
30
+ * const val1: ClassValue = "button"; // ➔ string
31
+ * const val2: ClassValue = 0; // ➔ number
32
+ * const val3: ClassValue = ["a", { b: true }]; // ➔ array with object
33
+ * const val4: ClassValue = { d: true, e: false }; // ➔ object
34
+ * const val5: ClassValue = new String("foo"); // ➔ boxed string
35
+ * const val6: ClassValue = new Number("123"); // ➔ boxed number
36
+ * const val7: ClassValue = new Boolean("true"); // ➔ boxed boolean
37
+ * ```
38
+ */
39
+ type ClassValue = ClassValues | ClassObject | string | number | bigint | null | boolean | undefined;
40
+ /** ----------------------------------------------------------
41
+ * * ***Type-Utility: `ClassObject`.***
42
+ * ----------------------------------------------------------
43
+ * **Represents an object whose keys with truthy values are included in the final class string.**
44
+ * @example
45
+ * ```ts
46
+ * const obj: ClassObject = { "text-red": true, "hidden": false };
47
+ * // ➔ "text-red" when processed by cx
48
+ * ```
49
+ */
50
+ type ClassObject = Record<string, any>;
51
+ /** ----------------------------------------------------------
52
+ * * ***Type-Utility: `ClassValues`.***
53
+ * ----------------------------------------------------------
54
+ * **Represents an array of {@link ClassValue | `ClassValue's`}, potentially nested.**
55
+ * @example
56
+ * ```ts
57
+ * const arr: ClassValues = [
58
+ * "a",
59
+ * 1,
60
+ * ["b", { c: true, d: false }],
61
+ * { e: 2 }
62
+ * ];
63
+ * ```
64
+ */
65
+ type ClassValues = ClassValue[];
66
+ /** ----------------------------------------------------------
67
+ * * ***Utility: `cx`.***
68
+ * ----------------------------------------------------------
69
+ * **Merge multiple class values into a single, space-separated string suitable for CSS usage.**
70
+ * @description
71
+ * - Supports **nested combinations** of arrays and objects, recursively.
72
+ * - **Falsy values** are skipped:
73
+ * - `false`, `null`, `undefined`, empty strings `""` are ignored anywhere.
74
+ * - Numbers `0` are ignored inside nested arrays/objects.
75
+ * - **Boxed primitives** are correctly unwrapped to their primitive value.
76
+ * - **Inherited object keys** are included in the final class string.
77
+ * - Optimized for **CSS class merging** where conditional inclusion is common.
78
+ * @param {ClassValues} values
79
+ * A list of mixed class values, which can include:
80
+ * - **Strings** → literal class names.
81
+ * - **Numbers** → numeric class names.
82
+ * - **BigInt** → numeric class names larger than JS safe integer limit.
83
+ * - **Arrays** → recursively flattened, can contain nested arrays or objects.
84
+ * - **Objects** → include keys whose values are truthy. Inherited keys are also included.
85
+ * - **Boxed primitives** (`new String()`, `new Number()`, `new Boolean()`) → automatically unwrapped.
86
+ * - **Falsy values** (`false`, `null`, `undefined`, `""`, `0`) are ignored according to original behavior.
87
+ * @returns {string}
88
+ * A single space-separated string containing all valid class names.
89
+ * @example
90
+ * ```ts
91
+ * // Basic string merge
92
+ * cx("btn", "btn-primary");
93
+ * // ➔ "btn btn-primary"
94
+ *
95
+ * // Mixed arrays and objects
96
+ * cx("a", ["b", { c: true, d: false }], { e: 1, f: 0 }, null, 2);
97
+ * // ➔ "a b c e 2"
98
+ *
99
+ * // Empty and falsy values are ignored
100
+ * cx("", null, undefined, false, 0);
101
+ * // ➔ ""
102
+ *
103
+ * // Nested arrays with objects
104
+ * cx(["a", ["b", { c: true, d: false }]]);
105
+ * // ➔ "a b c"
106
+ *
107
+ * // Boxed primitives are unwrapped
108
+ * cx(new String("foo"), new Number(42), new Boolean(true), new Number(0), new Boolean(false));
109
+ * // ➔ "foo 42 true"
110
+ *
111
+ * // Inherited keys from objects are included
112
+ * const proto = { inherited: true };
113
+ * const obj = Object.create(proto);
114
+ * obj.own = true;
115
+ * cx(obj);
116
+ * // ➔ "own inherited"
117
+ * ```
118
+ */
119
+ declare function cx(...values: ClassValues): string;
120
+ /** -------------------------------------------------------------
121
+ * * ***Default `cnV3` utility (Tailwind v3).***
122
+ * -------------------------------------------------------------
123
+ * **Combines class-name values and then deduplicates/resolves
124
+ * conflicts using {@link twMergeDefaultV3 | `twMergeDefaultV3`}
125
+ * with **Tailwind v3 default config only**.**
126
+ * - ✅ **Use this when:**
127
+ * - Your project uses **Tailwind v3**.
128
+ * - You need a simple `cn` that works out of the box without a custom config.
129
+ * - ⚡ **Need custom rules?**
130
+ * - Create a project-wide helper using
131
+ * {@link twMergeDefaultV3 | `twMergeDefaultV3`} +
132
+ * {@link customCnV3 | `customCnV3`} (see Example 2).
133
+ * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).
134
+ * @returns {string} Merged Tailwind class string.
135
+ * @example
136
+ * #### Example 1: ✅ Default usage (Tailwind v3).
137
+ * ```ts
138
+ * cnV3("p-2", "p-4");
139
+ * // ➔ "p-4"
140
+ *
141
+ * cnV3("text-red-500", { "text-blue-500": true });
142
+ * // ➔ "text-blue-500"
143
+ *
144
+ * cnV3(["m-2", ["m-4"]], "m-8");
145
+ * // ➔ "m-8"
146
+ * ```
147
+ * #### Example 2: ⚡ Custom project-wide usage with Tailwind config.
148
+ * ```ts
149
+ * import tailwindConfig from "../tailwind.config";
150
+ * import { twMergeDefaultV3, customCnV3, type ClassValues } from "@rzl-zone/utils-js/tailwind";
151
+ *
152
+ * const cnApp = (...classes: ClassValues) => {
153
+ * return customCnV3(
154
+ * twMergeDefaultV3({
155
+ * config: tailwindConfig,
156
+ * extend: {
157
+ * classGroups: {
158
+ * "text-shadow": [
159
+ * "text-shadow",
160
+ * "text-shadow-sm",
161
+ * "text-shadow-md",
162
+ * ],
163
+ * },
164
+ * },
165
+ * }),
166
+ * // ...other options classes,
167
+ * );
168
+ * };
169
+ *
170
+ * cnApp("p-2 p-4"); // ➔ "p-4"
171
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
172
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
173
+ * ```
174
+ */
175
+ declare const cnV3: (...classes: ClassValues) => string;
176
+ /** -------------------------------------------------------------
177
+ * * ***Default `cnV4` utility (Tailwind v4).***
178
+ * -------------------------------------------------------------
179
+ * **Combines class-name values and then deduplicates/resolves
180
+ * conflicts using {@link twMergeDefaultV4 | `twMergeDefaultV4`}
181
+ * with **Tailwind v4 default config only**.**
182
+ * - ✅ **Use this when:**
183
+ * - Your project uses **Tailwind v4**.
184
+ * - You need a simple `cn` that works out of the box without a custom config.
185
+ * - ⚡ **Need custom rules?**
186
+ * - Create a project-wide helper using
187
+ * {@link twMergeDefaultV4 | `twMergeDefaultV4`} +
188
+ * {@link customCnV4 | `customCnV4`} (see Example 2).
189
+ * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).
190
+ * @returns {string} Merged Tailwind class string.
191
+ * @example
192
+ * #### Example 1: ✅ Default usage (Tailwind v4).
193
+ * ```ts
194
+ * cnV4("p-2", "p-4");
195
+ * // ➔ "p-4"
196
+ *
197
+ * cnV4("text-red-500", { "text-blue-500": true });
198
+ * // ➔ "text-blue-500"
199
+ *
200
+ * cnV4(["m-2", ["m-4"]], "m-8");
201
+ * // ➔ "m-8"
202
+ * ```
203
+ * #### Example 2: ⚡ Custom project-wide usage with Tailwind config.
204
+ * ```ts
205
+ * import tailwindConfig from "../tailwind.config";
206
+ * import { twMergeDefaultV4, customCnV4, type ClassValues } from "@rzl-zone/utils-js/tailwind";
207
+ *
208
+ * const cnApp = (...classes: ClassValues) => {
209
+ * return customCnV4(
210
+ * twMergeDefaultV4({
211
+ * config: tailwindConfig,
212
+ * extend: {
213
+ * classGroups: {
214
+ * "text-shadow": [
215
+ * "text-shadow",
216
+ * "text-shadow-sm",
217
+ * "text-shadow-md",
218
+ * ],
219
+ * },
220
+ * },
221
+ * }),
222
+ * // ...other options classes,
223
+ * );
224
+ * };
225
+ *
226
+ * cnApp("p-2 p-4"); // ➔ "p-4"
227
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
228
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
229
+ * ```
230
+ */
231
+ declare const cnV4: (...classes: ClassValues) => string;
232
+ type TailwindConfig = Config;
233
+ /**
234
+ * Tailwind Merge config extension type
235
+ */
236
+ type TwMergeConfigExt$1 = ConfigExtension<string, string>;
237
+ /**
238
+ * * ***Extra options for customized Tailwind class merge.***
239
+ */
240
+ type OptionsConfigMergeTwCn$1 = {
241
+ /** ----------------------------------------------------------
242
+ * * ***Optional Tailwind CSS configuration object.***
243
+ * ----------------------------------------------------------
244
+ * - **Pass your project’s `tailwind.config.ts` if you want to:**
245
+ * - Respect custom theme values (`colors`, `fontSize`, `spacing`, `etc`.)
246
+ * - Enable/disable `corePlugins`
247
+ * - Register `plugins`
248
+ * - Extend class groups (e.g., `text-shadow`)
249
+ * - **If omitted, the **default Tailwind config** is used.**
250
+ * @example
251
+ * ```ts
252
+ * import tailwindConfig from "../tailwind.config";
253
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
254
+ *
255
+ * const myCustomTwCls = twMergeDefaultV3({
256
+ * config: tailwindConfig,
257
+ * });
258
+ *
259
+ * myCustomTwCls("text-primary text-secondary");
260
+ * // => "text-secondary" (resolved from your theme config)
261
+ * ```
262
+ */
263
+ config?: TailwindConfig;
264
+ /** ----------------------------------------------------------
265
+ * * ***Prefix added to Tailwind-generated classes.***
266
+ * ----------------------------------------------------------
267
+ * - **Tailwind v3**:
268
+ * - Configure in `tailwind.config.js`, e.g. `prefix: 'tw-'`.
269
+ * - Variants first; negative utilities: `-mt-8` ➔ `-tw-mt-8`.
270
+ * - Reference:
271
+ * [**`Tailwind v3 using prefix docs`**](https://v3.tailwindcss.com/docs/configuration#prefix).
272
+ * - **Tailwind v4**:
273
+ * - Use {@link twMergeDefaultV4 | **`twMergeDefaultV4`**} instead.
274
+ * - Reference:
275
+ * [**`Tailwind v4 using prefix docs`**](https://tailwindcss.com/docs/upgrade-guide#using-a-prefix).
276
+ * - **ℹ️ Notes**:
277
+ * - Tailwind v3: use hyphenated prefix (`tw-`).
278
+ * - Fallback order:
279
+ * 1. `prefix` option
280
+ * 2. `config.prefix` (if defined)
281
+ * 3. `undefined`
282
+ * - Tailwind v4:
283
+ * - Use {@link twMergeDefaultV4 | **`twMergeDefaultV4`**} instead.
284
+ * @example
285
+ * - Tailwind version 3 (`tailwind.config.ts`):
286
+ * ```ts
287
+ * import type { Config } from "tailwindcss";
288
+ *
289
+ * const config: Config = {
290
+ * prefix: 'tw-',
291
+ * // ... other config
292
+ * };
293
+ *
294
+ * export default config;
295
+ * ```
296
+ */
297
+ prefix?: string;
298
+ };
299
+ /**
300
+ * * ***Options type for Tailwind Merge v3 wrapper.***
301
+ */
302
+ type OptionsMergeTwClsV3 = Omit<TwMergeConfigExt$1, "prefix"> & OptionsConfigMergeTwCn$1;
303
+ /**
304
+ * * ***Tailwind Merge function Version 3 signature (same as twMerge).***
305
+ */
306
+ type TwMergeDefaultFnV3 = (...classLists: ClassNameValue[]) => string;
307
+ /**
308
+ * Tailwind Merge config extension type
309
+ */
310
+ type TwMergeConfigExt = ConfigExtension$1<string, string>;
311
+ /**
312
+ * * ***Extra options for customized Tailwind class merge.***
313
+ */
314
+ type OptionsConfigMergeTwCn = {
315
+ /** ----------------------------------------------------------
316
+ * * ***Optional Tailwind CSS configuration object.***
317
+ * ----------------------------------------------------------
318
+ * - **Pass your project’s `tailwind.config.ts` if you want to:**
319
+ * - Respect custom theme values (`colors`, `fontSize`, `spacing`, `etc`.)
320
+ * - Enable/disable `corePlugins`
321
+ * - Register `plugins`
322
+ * - Extend class groups (e.g., `text-shadow`)
323
+ * - **If omitted, the **default Tailwind config** is used.**
324
+ * @example
325
+ * ```ts
326
+ * import tailwindConfig from "../tailwind.config";
327
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
328
+ *
329
+ * const myCustomTwCls = twMergeDefaultV4({
330
+ * config: tailwindConfig,
331
+ * });
332
+ *
333
+ * myCustomTwCls("text-primary text-secondary");
334
+ * // => "text-secondary" (resolved from your theme config)
335
+ * ```
336
+ */
337
+ config?: TailwindConfig;
338
+ /** ----------------------------------------------------------
339
+ * * ***Prefix added to Tailwind-generated classes.***
340
+ * ----------------------------------------------------------
341
+ * - **Tailwind v3**:
342
+ * - Use {@link twMergeDefaultV3 | **`twMergeDefaultV3`**} instead.
343
+ * - Reference:
344
+ * [**`Tailwind v3 using prefix docs`**](https://v3.tailwindcss.com/docs/configuration#prefix).
345
+ *
346
+ * - **Tailwind v4**:
347
+ * - Configure in your CSS import, e.g. `@import "tailwindcss" prefix(tw);`
348
+ * - The prefix appears like a variant at the start of the class, e.g. `tw:flex`,
349
+ * `tw:bg-red-500`, `tw:hover:bg-red-600`.
350
+ * - Reference:
351
+ * [**`Tailwind v4 using prefix docs`**](https://tailwindcss.com/docs/upgrade-guide#using-a-prefix).
352
+ *
353
+ * - **ℹ️ Notes**:
354
+ * - Tailwind v3:
355
+ * - Use {@link twMergeDefaultV3 | **`twMergeDefaultV3`**} instead.
356
+ * - Tailwind v4: prefer identifier (e.g. `tw`) without `-`.
357
+ * - Fallback order:
358
+ * 1. `prefix` option
359
+ * 2. `config.prefix` (if defined)
360
+ * 3. `undefined`
361
+ *
362
+ * @example
363
+ * - Tailwind version 4 (in CSS entry only):
364
+ * - CSS files:
365
+ * ```css
366
+ * `@import "tailwindcss" prefix(tw);`
367
+ * ```
368
+ * - Your custom TwMerge file:
369
+ * ```ts
370
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
371
+ *
372
+ * const twMergeV3 = twMergeDefaultV4({
373
+ * prefix: "tw",
374
+ * // ... other config
375
+ * });
376
+ * ```
377
+ * - Tailwind version 4 (with `tailwind.config.{js,ts,mjs,...etc}`):
378
+ * - Reference:
379
+ * [**`Tailwind v4 using @config docs`**](https://tailwindcss.com/docs/functions-and-directives#config-directive).
380
+ * - CSS files:
381
+ * ```css
382
+ * `@import "tailwindcss";`
383
+ * `@config "./tailwind.config.ts";`
384
+ * ```
385
+ * - Config files:
386
+ * ```ts
387
+ * import type { Config } from "tailwindcss";
388
+ *
389
+ * const config: Config = {
390
+ * prefix: 'tw-',
391
+ * // ... other config
392
+ * };
393
+ *
394
+ * export default config;
395
+ * ```
396
+ * - Your custom TwMerge file:
397
+ * ```ts
398
+ * import config from "../tailwind.config";
399
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
400
+ *
401
+ * const twMergeV4 = twMergeDefaultV4({ config });
402
+ * // now without passing `prefix` options, will use automatic from config.
403
+ * ```
404
+ */
405
+ prefix?: string;
406
+ };
407
+ /**
408
+ * * ***Options type for Tailwind Merge v4 wrapper.***
409
+ */
410
+ type OptionsMergeTwClsV4 = Omit<TwMergeConfigExt, "prefix"> & OptionsConfigMergeTwCn;
411
+ /**
412
+ * * ***Tailwind Merge function Version 4 signature (same as twMerge).***
413
+ */
414
+ type TwMergeDefaultFnV4 = (...classLists: ClassNameValue$1[]) => string;
415
+ /** -------------------------------------------------------------
416
+ * * ***Factory utility for building a custom `cn` helper (Tailwind `v3`).***
417
+ * -------------------------------------------------------------
418
+ * **Wraps internally function to combines class-name values and applies the provided
419
+ * Tailwind merge function (from {@link twMergeDefaultV3 | `twMergeDefaultV3`}).**
420
+ * - 🔑 **When to use it?**
421
+ * - Your project uses **Tailwind v3**.
422
+ * - You extend Tailwind merge rules (`classGroups`, `tailwind.config`).
423
+ * - You need multiple `cn*` variants across apps/packages.
424
+ * @param {TwMergeDefaultFnV3} customTwMergeV3 - Merge function created via {@link twMergeDefaultV3 | `twMergeDefaultV3`}.
425
+ * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).
426
+ * @returns {string} Merged Tailwind class string.
427
+ * @example
428
+ * ```ts
429
+ * import tailwindConfig from "../tailwind.config";
430
+ * import { twMergeDefaultV3, customCnV3, type ClassValues } from "@rzl-zone/utils-js/tailwind";
431
+ *
432
+ * // 1. Create a custom merge function
433
+ * const myCustomTwMerge = twMergeDefaultV3({
434
+ * config: tailwindConfig,
435
+ * extend: {
436
+ * classGroups: {
437
+ * "text-shadow": ["text-shadow", "text-shadow-sm", "text-shadow-md"],
438
+ * },
439
+ * },
440
+ * });
441
+ *
442
+ * // 2. Build your helper using `customCnV3`
443
+ * export const cnApp = (...classes: ClassValues) => {
444
+ * return customCnV3(myCustomTwMerge, ...classes);
445
+ * };
446
+ * // ✅ Usage
447
+ * cnApp("p-2", "p-4"); // ➔ "p-4"
448
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
449
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
450
+ * ```
451
+ */
452
+ declare const customCnV3: (customTwMergeV3: TwMergeDefaultFnV3, ...classes: ClassValues) => string;
453
+ /** -------------------------------------------------------------
454
+ * * ***Factory utility for building a custom `cn` helper (Tailwind `v4`).***
455
+ * -------------------------------------------------------------
456
+ * **Wraps internally function to combines class-name values and applies the provided
457
+ * Tailwind merge function (from {@link twMergeDefaultV4 | `twMergeDefaultV4`}).**
458
+ * - 🔑 **When to use it?**
459
+ * - Your project uses **Tailwind v4**.
460
+ * - You extend Tailwind merge rules (`classGroups`, `tailwind.config`).
461
+ * - You need multiple `cn*` variants across apps/packages.
462
+ * @param {TwMergeDefaultFnV4} customTwMergeV4 - Merge function created via {@link twMergeDefaultV4 | `twMergeDefaultV4`}.
463
+ * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).
464
+ * @returns {string} Merged Tailwind class string.
465
+ * @example
466
+ * ```ts
467
+ * import tailwindConfig from "../tailwind.config";
468
+ * import { twMergeDefaultV4, customCnV4, type ClassValues } from "@rzl-zone/utils-js/tailwind";
469
+ *
470
+ * // 1. Create a custom merge function
471
+ * const myCustomTwMerge = twMergeDefaultV4({
472
+ * config: tailwindConfig,
473
+ * extend: {
474
+ * classGroups: {
475
+ * "text-shadow": ["text-shadow", "text-shadow-sm", "text-shadow-md"],
476
+ * },
477
+ * },
478
+ * });
479
+ *
480
+ * // 2. Build your helper using `customCnV4`
481
+ * export const cnApp = (...classes: ClassValues) => {
482
+ * return customCnV4(myCustomTwMerge, ...classes);
483
+ * };
484
+ *
485
+ * // ✅ Usage
486
+ * cnApp("p-2", "p-4"); // ➔ "p-4"
487
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
488
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
489
+ * ```
490
+ */
491
+ declare const customCnV4: (customTwMergeV4: TwMergeDefaultFnV4, ...classes: ClassValues) => string;
492
+ /** ----------------------------------------------------------
493
+ * * ***Utility: `shouldForwardProp`.***
494
+ * ----------------------------------------------------------
495
+ * **Creates a helper for styled-components `shouldForwardProp`.**
496
+ *
497
+ * @description
498
+ * 1. Returns a **predicate function** that determines whether a given prop
499
+ * should be forwarded to the DOM.
500
+ * 2. Useful for filtering out internal props (e.g., `$size`, `$active`)
501
+ * so they don't become invalid HTML attributes.
502
+ *
503
+ * - **Behavior:**
504
+ * - Accepts a strict tuple of **string keys** to exclude from forwarding.
505
+ * - Every key is validated as a **non-empty string** at runtime.
506
+ * - Throws a `TypeError` if:
507
+ * - `props` is not an array, or
508
+ * - any item is not a non-empty string.
509
+ * - Automatically coerces the tested prop name to string for matching.
510
+ *
511
+ * @template CustomProps
512
+ * The component props type to validate against.
513
+ *
514
+ * @param {readonly Stringify<keyof CustomProps>[]}
515
+ * props
516
+ * The list of prop names (keys of `CustomProps`) to exclude from forwarding.
517
+ *
518
+ * @returns {(propName: keyof CustomProps | ({} & string)) => boolean}
519
+ * A function that receives a prop name and returns:
520
+ * - `true` ➔ the prop **will** be forwarded to the DOM.
521
+ * - `false` ➔ the prop **will not** be forwarded.
522
+ *
523
+ * @throws **{@link TypeError | `TypeError`}**
524
+ * when:
525
+ * - `props` is not an array, or
526
+ * - any item is not a non-empty string.
527
+ *
528
+ * @example
529
+ * // Basic usage
530
+ * type Props = { $size: string; color: string; visible: boolean };
531
+ * const filter = shouldForwardProp<Props>(["$size"]);
532
+ *
533
+ * filter("$size"); // ➔ false (blocked).
534
+ * filter("color"); // ➔ true (forwarded).
535
+ * filter("visible"); // ➔ true (forwarded).
536
+ *
537
+ * @example
538
+ * // With styled-components
539
+ * type CustomProps = { $internal: boolean; public: string; another: boolean };
540
+ *
541
+ * styled.div.withConfig({
542
+ * shouldForwardProp: shouldForwardProp<CustomProps>(["$internal"])
543
+ * });
544
+ */
545
+ declare const shouldForwardProp: <CustomProps extends Record<string, unknown>>(props: readonly Stringify<keyof CustomProps>[]) => ((propName: keyof CustomProps | ({} & string)) => boolean);
546
+ /** -------------------------------------------------------------
547
+ * * ***Customized Tailwind class merger Version 3 with extended rules.***
548
+ * -------------------------------------------------------------
549
+ * **Wraps ***`extendTailwindMerge` from tailwind-merge-v3*** with Tailwind’s default
550
+ * config (_*`getDefaultConfig()` from tailwind-merge-v3*_) to create a **project-ready `twMerge`**.**
551
+ * - 🔑 **When to use it?**
552
+ * - Your project uses **Tailwind v3**.
553
+ * - Extend **class groups** (e.g. add `text-shadow`).
554
+ * - Respect your own **`tailwind.config.ts`** (colors, spacing, fontSize, etc).
555
+ * - Override or fine-tune **merge behavior**.
556
+ * - Create a **project-wide `cn` helper** that replaces raw `twMerge`.
557
+ * @param {OptionsMergeTwClsV3} [options={}]
558
+ * ***Merge options:***
559
+ * - `config` – Your Tailwind config (from `tailwind.config.ts`).
560
+ * - `prefix` - Utility prefix (e.g. `tw-` or `tw`).
561
+ * - `extend` – Extra merge rules (classGroups, theme, etc).
562
+ * - `override` – Fully replace rules.
563
+ * - `cacheSize` – Parsed class cache size.
564
+ * - `experimentalParseClassName` – Custom classname parser.
565
+ * @returns {TwMergeDefaultFnV3}
566
+ * Customized Tailwind class merge function version 3 (same signature as `twMerge`).
567
+ * @example
568
+ * #### Example 1: ***Default behavior (same as tailwind-merge).***
569
+ * ```ts
570
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
571
+ *
572
+ * const twMerge = twMergeDefaultV3();
573
+ * twMerge("p-2 p-4");
574
+ * // ➔ "p-4"
575
+ * ```
576
+ * #### Example 2: ***Extend class groups.***
577
+ * ```ts
578
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
579
+ *
580
+ * const twMerge2 = twMergeDefaultV3({
581
+ * extend: {
582
+ * classGroups: {
583
+ * shadow: ["shadow-soft", "shadow-hard"],
584
+ * },
585
+ * },
586
+ * });
587
+ * twMerge2("shadow-soft shadow-hard");
588
+ * // ➔ "shadow-hard"
589
+ * ```
590
+ * #### Example 3: ***Respect your Tailwind config.***
591
+ * ```ts
592
+ * import config from "../tailwind.config";
593
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
594
+ *
595
+ * const twMerge3 = twMergeDefaultV3({ config });
596
+ * twMerge3("text-base text-xxs");
597
+ * // ➔ "text-xxs" (resolved from config)
598
+ * ```
599
+ * #### Example 4: ***Project-wide helper (recommended).***
600
+ * ```ts
601
+ * import configTwCss from "../tailwind.config";
602
+ * import { customCnV3, twMergeDefaultV3, type ClassValues } from "@rzl-zone/utils-js/tailwind";
603
+ *
604
+ * const customTwMerge = twMergeDefaultV3({
605
+ * config: configTwCss,
606
+ * extend: {
607
+ * classGroups: { shadow: ["shadow-soft", "shadow-hard"] },
608
+ * },
609
+ * });
610
+ *
611
+ * export const cnApp = (...classes: ClassValues) => {
612
+ * return customCnV3(customTwMerge, ...classes);
613
+ * };
614
+ *
615
+ * // ✅ Usage
616
+ * cnApp("p-2 p-4"); // ➔ "p-4"
617
+ * cnApp("shadow-soft shadow-hard"); // ➔ "shadow-hard"
618
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (uses config)
619
+ *
620
+ * // ⚡ Difference with package-level `cn`
621
+ * import { cnV3, cnV4 } from "@rzl-zone/utils-js/tailwind";
622
+ *
623
+ * cnV3("text-base text-xxs");
624
+ * // or
625
+ * cnV4("text-base text-xxs");
626
+ * // ➔ "text-base" (❌ doesn't know about your config)
627
+ *
628
+ * cnApp("text-base text-xxs");
629
+ * // ➔ "text-xxs" (✅ respects config)
630
+ * ```
631
+ */
632
+ declare const twMergeDefaultV3: (options?: OptionsMergeTwClsV3) => TwMergeDefaultFnV3;
633
+ /** -------------------------------------------------------------
634
+ * * ***Customized Tailwind class merger Version 4 with extended rules.***
635
+ * -------------------------------------------------------------
636
+ * **Wraps ***`extendTailwindMerge` from tailwind-merge-v4*** with Tailwind’s default
637
+ * config (_*`getDefaultConfig()` from tailwind-merge-v4*_) to create a **project-ready `twMerge`**.**
638
+ * - 🔑 **When to use it?**
639
+ * - Your project uses **Tailwind v4**.
640
+ * - Extend **class groups** (e.g. add `text-shadow`).
641
+ * - Respect your own **`tailwind.config.ts`** (colors, spacing, fontSize, etc).
642
+ * - Override or fine-tune **merge behavior**.
643
+ * - Create a **project-wide `cn` helper** that replaces raw `twMerge`.
644
+ * @param {OptionsMergeTwClsV4} [options={}]
645
+ * ***Merge options:***
646
+ * - `config` – Your Tailwind config (from `tailwind.config.ts`).
647
+ * - `prefix` - Utility prefix (e.g. `tw-` or `tw`).
648
+ * - `extend` – Extra merge rules (classGroups, theme, etc).
649
+ * - `override` – Fully replace rules.
650
+ * - `cacheSize` – Parsed class cache size.
651
+ * - `experimentalParseClassName` – Custom classname parser.
652
+ * @returns {TwMergeDefaultFnV4}
653
+ * Customized Tailwind class merge function version 4 (same signature as `twMerge`).
654
+ * @example
655
+ * #### Example 1: ***Default behavior (same as tailwind-merge).***
656
+ * ```ts
657
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
658
+ *
659
+ * const twMerge = twMergeDefaultV4();
660
+ * twMerge("p-2 p-4");
661
+ * // ➔ "p-4"
662
+ * ```
663
+ * #### Example 2: ***Extend class groups.***
664
+ * ```ts
665
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
666
+ *
667
+ * const twMerge2 = twMergeDefaultV4({
668
+ * extend: {
669
+ * classGroups: {
670
+ * shadow: ["shadow-soft", "shadow-hard"],
671
+ * },
672
+ * },
673
+ * });
674
+ * twMerge2("shadow-soft shadow-hard");
675
+ * // ➔ "shadow-hard"
676
+ * ```
677
+ * #### Example 3: ***Respect your Tailwind config.***
678
+ * ```ts
679
+ * import config from "../tailwind.config";
680
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
681
+ *
682
+ * const twMerge3 = twMergeDefaultV4({ config });
683
+ * twMerge3("text-base text-xxs");
684
+ * // ➔ "text-xxs" (resolved from config)
685
+ * ```
686
+ * #### Example 4: ***Project-wide helper (recommended).***
687
+ * ```ts
688
+ * import configTwCss from "../tailwind.config";
689
+ * import { customCnV4, twMergeDefaultV4, type ClassValues } from "@rzl-zone/utils-js/tailwind";
690
+ *
691
+ * const customTwMerge = twMergeDefaultV4({
692
+ * config: configTwCss,
693
+ * extend: {
694
+ * classGroups: { shadow: ["shadow-soft", "shadow-hard"] },
695
+ * },
696
+ * });
697
+ *
698
+ * export const cnApp = (...classes: ClassValues) => {
699
+ * return customCnV4(customTwMerge, ...classes);
700
+ * };
701
+ *
702
+ * // ✅ Usage
703
+ * cnApp("p-2 p-4"); // ➔ "p-4"
704
+ * cnApp("shadow-soft shadow-hard"); // ➔ "shadow-hard"
705
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (uses config)
706
+ *
707
+ * // ⚡ Difference with package-level `cn`
708
+ * import { cnV3, cnV4 } from "@rzl-zone/utils-js/tailwind";
709
+ *
710
+ * cnV3("text-base text-xxs");
711
+ * // or
712
+ * cnV4("text-base text-xxs");
713
+ * // ➔ "text-base" (❌ doesn't know about your config)
714
+ *
715
+ * cnApp("text-base text-xxs");
716
+ * // ➔ "text-xxs" (✅ respects config)
717
+ * ```
718
+ */
719
+ declare const twMergeDefaultV4: (options?: OptionsMergeTwClsV4) => TwMergeDefaultFnV4;
720
+ export { customCnV4 as a, ClassObject as c, cx as d, customCnV3 as i, ClassValue as l, twMergeDefaultV3 as n, cnV3 as o, shouldForwardProp as r, cnV4 as s, twMergeDefaultV4 as t, ClassValues as u };