@rzl-zone/utils-js 3.12.0 → 3.12.1-beta.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 (286) hide show
  1. package/{LICENSE.md → LICENSE} +3 -3
  2. package/README.md +62 -89
  3. package/dist/.references/index.d.cts +25 -0
  4. package/dist/.references/index.d.ts +25 -0
  5. package/dist/assertIsArray-BChqwPiP.cjs +26 -0
  6. package/dist/assertIsArray-BChqwPiP.cjs.map +1 -0
  7. package/dist/assertIsArray-BfAbIUfa.js +20 -0
  8. package/dist/assertIsArray-BfAbIUfa.js.map +1 -0
  9. package/dist/assertIsBoolean-BlBct0Fc.js +1073 -0
  10. package/dist/assertIsBoolean-BlBct0Fc.js.map +1 -0
  11. package/dist/assertIsBoolean-DozdtbNi.cjs +1283 -0
  12. package/dist/assertIsBoolean-DozdtbNi.cjs.map +1 -0
  13. package/dist/assertIsString-Bvk7bUL7.cjs +26 -0
  14. package/dist/assertIsString-Bvk7bUL7.cjs.map +1 -0
  15. package/dist/assertIsString-DqV9NwbI.js +20 -0
  16. package/dist/assertIsString-DqV9NwbI.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-CBs8-REq.cjs +448 -0
  28. package/dist/conversions-CBs8-REq.cjs.map +1 -0
  29. package/dist/conversions-EMJa3g-D.js +382 -0
  30. package/dist/conversions-EMJa3g-D.js.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 +174 -0
  34. package/dist/events/index.d.ts +31 -35
  35. package/dist/events/index.js +50 -12
  36. package/dist/events/index.js.map +1 -0
  37. package/dist/formatEnvPort-DpIXzPAZ.js +159 -0
  38. package/dist/formatEnvPort-DpIXzPAZ.js.map +1 -0
  39. package/dist/formatEnvPort-hHNvOim-.cjs +171 -0
  40. package/dist/formatEnvPort-hHNvOim-.cjs.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-QcZO_Cpx.js +367 -0
  46. package/dist/formatters-QcZO_Cpx.js.map +1 -0
  47. package/dist/formatters-lAYgA11L.cjs +427 -0
  48. package/dist/formatters-lAYgA11L.cjs.map +1 -0
  49. package/dist/generators/index.cjs +161 -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 +154 -14
  54. package/dist/generators/index.js.map +1 -0
  55. package/dist/index-26W7ItWx.d.ts +760 -0
  56. package/dist/index-BPPQjAfs.d.cts +2359 -0
  57. package/dist/index-BXjlgBLz.d.cts +2139 -0
  58. package/dist/index-B_Wwo91H.d.ts +2359 -0
  59. package/dist/index-CpufydcI.d.cts +704 -0
  60. package/dist/index-Czc4O526.d.ts +333 -0
  61. package/dist/index-DPs1_p5G.d.cts +760 -0
  62. package/dist/index-DRpOyBSC.d.ts +1703 -0
  63. package/dist/index-DWWvtHUn.d.cts +822 -0
  64. package/dist/index-DnM0LD0n.d.cts +333 -0
  65. package/dist/index-GUZ9fK6T.d.ts +2139 -0
  66. package/dist/index-I4fAzwXV.d.ts +704 -0
  67. package/dist/index-JDrOl_19.d.ts +822 -0
  68. package/dist/index-b66P49Qe.d.cts +1703 -0
  69. package/dist/isBigInt-B1cijjqm.cjs +20 -0
  70. package/dist/isBigInt-B1cijjqm.cjs.map +1 -0
  71. package/dist/isBigInt-C0bN0Rhu.js +14 -0
  72. package/dist/isBigInt-C0bN0Rhu.js.map +1 -0
  73. package/dist/isEmptyObject-DI42NEo0.cjs +37 -0
  74. package/dist/isEmptyObject-DI42NEo0.cjs.map +1 -0
  75. package/dist/isEmptyObject-DeLVIJpl.js +25 -0
  76. package/dist/isEmptyObject-DeLVIJpl.js.map +1 -0
  77. package/dist/isEmptyString-BTUWYTbw.js +15 -0
  78. package/dist/isEmptyString-BTUWYTbw.js.map +1 -0
  79. package/dist/isEmptyString-CCK3bP74.cjs +21 -0
  80. package/dist/isEmptyString-CCK3bP74.cjs.map +1 -0
  81. package/dist/isEmptyValue-DMSMFTU8.cjs +30 -0
  82. package/dist/isEmptyValue-DMSMFTU8.cjs.map +1 -0
  83. package/dist/isEmptyValue-fjnfQnt5.js +24 -0
  84. package/dist/isEmptyValue-fjnfQnt5.js.map +1 -0
  85. package/dist/isEqual-B1fRgEuU.cjs +111 -0
  86. package/dist/isEqual-B1fRgEuU.cjs.map +1 -0
  87. package/dist/isEqual-DhyP8fB_.js +87 -0
  88. package/dist/isEqual-DhyP8fB_.js.map +1 -0
  89. package/dist/isFinite-BYMOo0os.js +15 -0
  90. package/dist/isFinite-BYMOo0os.js.map +1 -0
  91. package/dist/isFinite-sFkps2TY.cjs +21 -0
  92. package/dist/isFinite-sFkps2TY.cjs.map +1 -0
  93. package/dist/isInteger-DS9V7l_f.js +14 -0
  94. package/dist/isInteger-DS9V7l_f.js.map +1 -0
  95. package/dist/isInteger-FTCthMre.cjs +20 -0
  96. package/dist/isInteger-FTCthMre.cjs.map +1 -0
  97. package/dist/isPlainObject-DcFGh3_5.d.ts +530 -0
  98. package/dist/isPlainObject-doTI11Ib.d.cts +530 -0
  99. package/dist/isServer-D1TXfOs3.js +14 -0
  100. package/dist/isServer-D1TXfOs3.js.map +1 -0
  101. package/dist/isServer-q-QLFCqE.cjs +20 -0
  102. package/dist/isServer-q-QLFCqE.cjs.map +1 -0
  103. package/dist/isTypedArray-47R0wdrc.js +31 -0
  104. package/dist/isTypedArray-47R0wdrc.js.map +1 -0
  105. package/dist/isTypedArray-DiCoqffZ.cjs +43 -0
  106. package/dist/isTypedArray-DiCoqffZ.cjs.map +1 -0
  107. package/dist/isURL-CQiowFq2.js +14 -0
  108. package/dist/isURL-CQiowFq2.js.map +1 -0
  109. package/dist/isURL-WZypXsax.cjs +20 -0
  110. package/dist/isURL-WZypXsax.cjs.map +1 -0
  111. package/dist/isValidDomain-BSXshgkC.cjs +1788 -0
  112. package/dist/isValidDomain-BSXshgkC.cjs.map +1 -0
  113. package/dist/isValidDomain-DwA2EN79.js +1782 -0
  114. package/dist/isValidDomain-DwA2EN79.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 +226 -0
  118. package/dist/next/index.d.ts +26 -31
  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 +9 -10
  125. package/dist/next/server/index.js +23 -38
  126. package/dist/next/server/index.js.map +1 -0
  127. package/dist/noop-B2mTBhW-.cjs +18 -0
  128. package/dist/noop-B2mTBhW-.cjs.map +1 -0
  129. package/dist/noop-BzktGBVz.js +12 -0
  130. package/dist/noop-BzktGBVz.js.map +1 -0
  131. package/dist/normalizeSpaces-DQHR3Tlr.cjs +29 -0
  132. package/dist/normalizeSpaces-DQHR3Tlr.cjs.map +1 -0
  133. package/dist/normalizeSpaces-WS_iERJk.js +23 -0
  134. package/dist/normalizeSpaces-WS_iERJk.js.map +1 -0
  135. package/dist/normalizeString-2WLth_Gj.js +15 -0
  136. package/dist/normalizeString-2WLth_Gj.js.map +1 -0
  137. package/dist/normalizeString-D8euBcRD.cjs +21 -0
  138. package/dist/normalizeString-D8euBcRD.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 +10 -15
  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 +71 -72
  148. package/dist/parsers/index.js +10 -12
  149. package/dist/parsers-DXtpsDyj.cjs +649 -0
  150. package/dist/parsers-DXtpsDyj.cjs.map +1 -0
  151. package/dist/parsers-Dpuq-V4u.js +643 -0
  152. package/dist/parsers-Dpuq-V4u.js.map +1 -0
  153. package/dist/parsing-B43x1sxn.js +50 -0
  154. package/dist/parsing-B43x1sxn.js.map +1 -0
  155. package/dist/parsing-lRoxn1Nz.cjs +56 -0
  156. package/dist/parsing-lRoxn1Nz.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-DiaYA7Ps.cjs +413 -0
  162. package/dist/predicates-DiaYA7Ps.cjs.map +1 -0
  163. package/dist/predicates-gNepszvo.js +257 -0
  164. package/dist/predicates-gNepszvo.js.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 +28 -31
  169. package/dist/promises/index.js +73 -13
  170. package/dist/promises/index.js.map +1 -0
  171. package/dist/punyCode-CTWXVVFo.cjs +185 -0
  172. package/dist/punyCode-CTWXVVFo.cjs.map +1 -0
  173. package/dist/punyCode-hmiFzLWT.js +179 -0
  174. package/dist/punyCode-hmiFzLWT.js.map +1 -0
  175. package/dist/removeSpaces-BE8lfh-4.js +19 -0
  176. package/dist/removeSpaces-BE8lfh-4.js.map +1 -0
  177. package/dist/removeSpaces-DRRxNWlb.cjs +25 -0
  178. package/dist/removeSpaces-DRRxNWlb.cjs.map +1 -0
  179. package/dist/safeJsonParse-BBnQElk8.cjs +208 -0
  180. package/dist/safeJsonParse-BBnQElk8.cjs.map +1 -0
  181. package/dist/safeJsonParse-CXruaP0p.js +184 -0
  182. package/dist/safeJsonParse-CXruaP0p.js.map +1 -0
  183. package/dist/safeStableStringify-BNh3D0K0.js +88 -0
  184. package/dist/safeStableStringify-BNh3D0K0.js.map +1 -0
  185. package/dist/safeStableStringify-Cc62pfRp.cjs +106 -0
  186. package/dist/safeStableStringify-Cc62pfRp.cjs.map +1 -0
  187. package/dist/strings/index.cjs +76 -81
  188. package/dist/strings/index.cjs.map +1 -0
  189. package/dist/strings/index.d.cts +12 -0
  190. package/dist/strings/index.d.ts +10 -775
  191. package/dist/strings/index.js +59 -14
  192. package/dist/strings/index.js.map +1 -0
  193. package/dist/tailwind/index.cjs +19 -47
  194. package/dist/tailwind/index.d.cts +12 -0
  195. package/dist/tailwind/index.d.ts +11 -712
  196. package/dist/tailwind/index.js +10 -12
  197. package/dist/tailwind-DJ4cmLUw.cjs +247 -0
  198. package/dist/tailwind-DJ4cmLUw.cjs.map +1 -0
  199. package/dist/tailwind-IJvOdkZp.js +199 -0
  200. package/dist/tailwind-IJvOdkZp.js.map +1 -0
  201. package/dist/toStringArrayUnRecursive-CFs0jTEg.js +39 -0
  202. package/dist/toStringArrayUnRecursive-CFs0jTEg.js.map +1 -0
  203. package/dist/toStringArrayUnRecursive-xUaU8Ot9.cjs +51 -0
  204. package/dist/toStringArrayUnRecursive-xUaU8Ot9.cjs.map +1 -0
  205. package/dist/urls/index.cjs +129 -57
  206. package/dist/urls/index.cjs.map +1 -0
  207. package/dist/urls/index.d.cts +740 -0
  208. package/dist/urls/index.d.ts +218 -224
  209. package/dist/urls/index.js +121 -26
  210. package/dist/urls/index.js.map +1 -0
  211. package/package.json +203 -194
  212. package/dist/chunk-2AFQ33D3.cjs +0 -64
  213. package/dist/chunk-2CYDJVGM.js +0 -246
  214. package/dist/chunk-2MW4JDQ2.cjs +0 -598
  215. package/dist/chunk-2VTDXC3N.cjs +0 -1825
  216. package/dist/chunk-44XX2P34.js +0 -209
  217. package/dist/chunk-4YLBKLGS.cjs +0 -18
  218. package/dist/chunk-566CXQW7.cjs +0 -560
  219. package/dist/chunk-57EPKYID.cjs +0 -397
  220. package/dist/chunk-5MGEC3YG.js +0 -63
  221. package/dist/chunk-6EF52423.cjs +0 -249
  222. package/dist/chunk-6SCOKU3S.js +0 -109
  223. package/dist/chunk-6VUXD3CF.js +0 -119
  224. package/dist/chunk-7B76BSNK.cjs +0 -118
  225. package/dist/chunk-7Y6I2DSU.cjs +0 -101
  226. package/dist/chunk-A7S7E2EE.cjs +0 -308
  227. package/dist/chunk-AJZ6PMMZ.js +0 -16
  228. package/dist/chunk-AXGBL2IO.cjs +0 -251
  229. package/dist/chunk-B4TC6FBV.cjs +0 -678
  230. package/dist/chunk-BAV5T2E3.cjs +0 -15
  231. package/dist/chunk-BKIJBNIE.js +0 -21
  232. package/dist/chunk-BNIMTFK5.js +0 -59
  233. package/dist/chunk-BXW7YXB7.js +0 -1823
  234. package/dist/chunk-CFYZC4S6.js +0 -53
  235. package/dist/chunk-CSG4SCL3.js +0 -1587
  236. package/dist/chunk-CWQW7AKK.js +0 -676
  237. package/dist/chunk-DVMHRLKP.cjs +0 -16
  238. package/dist/chunk-EN7LVZBZ.js +0 -548
  239. package/dist/chunk-EV4Y7HCY.cjs +0 -26
  240. package/dist/chunk-F66VDYIZ.cjs +0 -18
  241. package/dist/chunk-FLJX37EL.cjs +0 -30
  242. package/dist/chunk-GKC3UDMC.cjs +0 -1623
  243. package/dist/chunk-H65I3GRZ.cjs +0 -106
  244. package/dist/chunk-HHYWB7VZ.js +0 -24
  245. package/dist/chunk-HNGGISFL.cjs +0 -65
  246. package/dist/chunk-HNSQAVSZ.cjs +0 -35
  247. package/dist/chunk-HSP6IWZK.js +0 -17
  248. package/dist/chunk-IDZS7J6T.js +0 -242
  249. package/dist/chunk-JS6R55VL.js +0 -302
  250. package/dist/chunk-JZVT5FK7.js +0 -232
  251. package/dist/chunk-KHO2SBNA.cjs +0 -16
  252. package/dist/chunk-KIDJCMNJ.js +0 -33
  253. package/dist/chunk-KOLEURVT.cjs +0 -38
  254. package/dist/chunk-L4V53MQK.cjs +0 -269
  255. package/dist/chunk-L5RDAVVH.js +0 -14
  256. package/dist/chunk-NODTV4F3.js +0 -16
  257. package/dist/chunk-NYK5K3V2.cjs +0 -211
  258. package/dist/chunk-ODUO3RTL.cjs +0 -113
  259. package/dist/chunk-ONZFBJVW.js +0 -14
  260. package/dist/chunk-PFXCTE37.js +0 -28
  261. package/dist/chunk-PPST7QAQ.js +0 -587
  262. package/dist/chunk-Q5IMYDFL.cjs +0 -33
  263. package/dist/chunk-QFFBIOJ4.js +0 -31
  264. package/dist/chunk-QNKGP5DY.js +0 -14
  265. package/dist/chunk-RRQHMOPE.cjs +0 -19
  266. package/dist/chunk-RU5OSRBU.js +0 -95
  267. package/dist/chunk-SDMPEJ4F.js +0 -35
  268. package/dist/chunk-SYNL5IKP.js +0 -115
  269. package/dist/chunk-TCDOWZQE.js +0 -16
  270. package/dist/chunk-TQPGXGKB.cjs +0 -123
  271. package/dist/chunk-TULOI4GL.js +0 -370
  272. package/dist/chunk-UBHCP4N5.cjs +0 -36
  273. package/dist/chunk-UCHF3M34.cjs +0 -56
  274. package/dist/chunk-UDA26MCU.cjs +0 -16
  275. package/dist/chunk-V3C4FYZL.cjs +0 -18
  276. package/dist/chunk-VAAHZFBF.js +0 -32
  277. package/dist/chunk-VJDDGRIK.cjs +0 -16
  278. package/dist/chunk-WVSPXFTY.js +0 -14
  279. package/dist/chunk-WYP76WXB.js +0 -101
  280. package/dist/chunk-YDE4ZBB7.cjs +0 -237
  281. package/dist/chunk-YKQEOO7C.cjs +0 -23
  282. package/dist/chunk-YSZC56SZ.js +0 -264
  283. package/dist/chunk-YWHHVDT4.js +0 -13
  284. package/dist/index.d.ts +0 -24
  285. package/dist/isPlainObject-DTJVV2Kf.d.ts +0 -536
  286. package/dist/rzl-utils.global.js +0 -10
@@ -0,0 +1,704 @@
1
+ /*!
2
+ * ========================================================================
3
+ * @rzl-zone/utils-js
4
+ * ------------------------------------------------------------------------
5
+ * Version: `3.12.1-beta.0`
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 { ClassNameValue, ConfigExtension } from "tailwind-merge-v3";
12
+ import { ClassNameValue as ClassNameValue$1, ConfigExtension as ConfigExtension$1 } from "tailwind-merge-v4";
13
+ import { Stringify } from "@rzl-zone/ts-types-plus";
14
+ import { Config } from "tailwindcss";
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
+ /** Tailwind Merge config extension type */
233
+ type TwMergeConfigExt$1 = ConfigExtension$1<string, string>;
234
+ /** * ***Extra options for customized Tailwind class merge.*** */
235
+ type OptionsConfigMergeTwCn$1 = {
236
+ /** ----------------------------------------------------------
237
+ * * ***Optional Tailwind CSS configuration object.***
238
+ * ----------------------------------------------------------
239
+ * - **Pass your project’s `tailwind.config.ts` if you want to:**
240
+ * - Respect custom theme values (`colors`, `fontSize`, `spacing`, `etc`.)
241
+ * - Enable/disable `corePlugins`
242
+ * - Register `plugins`
243
+ * - Extend class groups (e.g., `text-shadow`)
244
+ * - **If omitted, the **default Tailwind config** is used.**
245
+ * @example
246
+ * ```ts
247
+ * import tailwindConfig from "../tailwind.config";
248
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
249
+ *
250
+ * const myCustomTwCls = twMergeDefaultV4({
251
+ * config: tailwindConfig,
252
+ * });
253
+ *
254
+ * myCustomTwCls("text-primary text-secondary");
255
+ * // => "text-secondary" (resolved from your theme config)
256
+ * ```
257
+ */
258
+ config?: TailwindConfig;
259
+ /** ----------------------------------------------------------
260
+ * * ***Prefix added to Tailwind-generated classes.***
261
+ * ----------------------------------------------------------
262
+ * - **Tailwind v3**:
263
+ * - Use {@link twMergeDefaultV3 | **`twMergeDefaultV3`**} instead.
264
+ * - Reference:
265
+ * [**`Tailwind v3 using prefix docs`**](https://v3.tailwindcss.com/docs/configuration#prefix).
266
+ *
267
+ * - **Tailwind v4**:
268
+ * - Configure in your CSS import, e.g. `@import "tailwindcss" prefix(tw);`
269
+ * - The prefix appears like a variant at the start of the class, e.g. `tw:flex`,
270
+ * `tw:bg-red-500`, `tw:hover:bg-red-600`.
271
+ * - Reference:
272
+ * [**`Tailwind v4 using prefix docs`**](https://tailwindcss.com/docs/upgrade-guide#using-a-prefix).
273
+ *
274
+ * - **ℹ️ Notes**:
275
+ * - Tailwind v3:
276
+ * - Use {@link twMergeDefaultV3 | **`twMergeDefaultV3`**} instead.
277
+ * - Tailwind v4: prefer identifier (e.g. `tw`) without `-`.
278
+ * - Fallback order:
279
+ * 1. `prefix` option
280
+ * 2. `config.prefix` (if defined)
281
+ * 3. `undefined`
282
+ *
283
+ * @example
284
+ * - Tailwind version 4 (in CSS entry only):
285
+ * - CSS files:
286
+ * ```css
287
+ * `@import "tailwindcss" prefix(tw);`
288
+ * ```
289
+ * - Your custom TwMerge file:
290
+ * ```ts
291
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
292
+ *
293
+ * const twMergeV3 = twMergeDefaultV4({
294
+ * prefix: "tw",
295
+ * // ... other config
296
+ * });
297
+ * ```
298
+ * - Tailwind version 4 (with `tailwind.config.{js,ts,mjs,...etc}`):
299
+ * - Reference:
300
+ * [**`Tailwind v4 using @config docs`**](https://tailwindcss.com/docs/functions-and-directives#config-directive).
301
+ * - CSS files:
302
+ * ```css
303
+ * `@import "tailwindcss";`
304
+ * `@config "./tailwind.config.ts";`
305
+ * ```
306
+ * - Config files:
307
+ * ```ts
308
+ * import type { Config } from "tailwindcss";
309
+ *
310
+ * const config: Config = {
311
+ * prefix: 'tw-',
312
+ * // ... other config
313
+ * };
314
+ *
315
+ * export default config;
316
+ * ```
317
+ * - Your custom TwMerge file:
318
+ * ```ts
319
+ * import config from "../tailwind.config";
320
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
321
+ *
322
+ * const twMergeV4 = twMergeDefaultV4({ config });
323
+ * // now without passing `prefix` options, will use automatic from config.
324
+ * ```
325
+ */
326
+ prefix?: string;
327
+ };
328
+ /** * ***Options type for Tailwind Merge v4 wrapper.*** */
329
+ type OptionsMergeTwClsV4 = Omit<TwMergeConfigExt$1, "prefix"> & OptionsConfigMergeTwCn$1;
330
+ /** * ***Tailwind Merge function Version 4 signature (same as twMerge).*** */
331
+ type TwMergeDefaultFnV4 = (...classLists: ClassNameValue$1[]) => string;
332
+ type TailwindConfig = Config;
333
+ /** Tailwind Merge config extension type */
334
+ type TwMergeConfigExt = ConfigExtension<string, string>;
335
+ /** * ***Extra options for customized Tailwind class merge.*** */
336
+ type OptionsConfigMergeTwCn = {
337
+ /** ----------------------------------------------------------
338
+ * * ***Optional Tailwind CSS configuration object.***
339
+ * ----------------------------------------------------------
340
+ * - **Pass your project’s `tailwind.config.ts` if you want to:**
341
+ * - Respect custom theme values (`colors`, `fontSize`, `spacing`, `etc`.)
342
+ * - Enable/disable `corePlugins`
343
+ * - Register `plugins`
344
+ * - Extend class groups (e.g., `text-shadow`)
345
+ * - **If omitted, the **default Tailwind config** is used.**
346
+ * @example
347
+ * ```ts
348
+ * import tailwindConfig from "../tailwind.config";
349
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
350
+ *
351
+ * const myCustomTwCls = twMergeDefaultV3({
352
+ * config: tailwindConfig,
353
+ * });
354
+ *
355
+ * myCustomTwCls("text-primary text-secondary");
356
+ * // => "text-secondary" (resolved from your theme config)
357
+ * ```
358
+ */
359
+ config?: TailwindConfig;
360
+ /** ----------------------------------------------------------
361
+ * * ***Prefix added to Tailwind-generated classes.***
362
+ * ----------------------------------------------------------
363
+ * - **Tailwind v3**:
364
+ * - Configure in `tailwind.config.js`, e.g. `prefix: 'tw-'`.
365
+ * - Variants first; negative utilities: `-mt-8` ➔ `-tw-mt-8`.
366
+ * - Reference:
367
+ * [**`Tailwind v3 using prefix docs`**](https://v3.tailwindcss.com/docs/configuration#prefix).
368
+ * - **Tailwind v4**:
369
+ * - Use {@link twMergeDefaultV4 | **`twMergeDefaultV4`**} instead.
370
+ * - Reference:
371
+ * [**`Tailwind v4 using prefix docs`**](https://tailwindcss.com/docs/upgrade-guide#using-a-prefix).
372
+ * - **ℹ️ Notes**:
373
+ * - Tailwind v3: use hyphenated prefix (`tw-`).
374
+ * - Fallback order:
375
+ * 1. `prefix` option
376
+ * 2. `config.prefix` (if defined)
377
+ * 3. `undefined`
378
+ * - Tailwind v4:
379
+ * - Use {@link twMergeDefaultV4 | **`twMergeDefaultV4`**} instead.
380
+ * @example
381
+ * - Tailwind version 3 (`tailwind.config.ts`):
382
+ * ```ts
383
+ * import type { Config } from "tailwindcss";
384
+ *
385
+ * const config: Config = {
386
+ * prefix: 'tw-',
387
+ * // ... other config
388
+ * };
389
+ *
390
+ * export default config;
391
+ * ```
392
+ */
393
+ prefix?: string;
394
+ };
395
+ /** * ***Options type for Tailwind Merge v3 wrapper.*** */
396
+ type OptionsMergeTwClsV3 = Omit<TwMergeConfigExt, "prefix"> & OptionsConfigMergeTwCn;
397
+ /** * ***Tailwind Merge function Version 3 signature (same as twMerge).*** */
398
+ type TwMergeDefaultFnV3 = (...classLists: ClassNameValue[]) => string;
399
+ /** -------------------------------------------------------------
400
+ * * ***Factory utility for building a custom `cn` helper (Tailwind `v3`).***
401
+ * -------------------------------------------------------------
402
+ * **Wraps internally function to combines class-name values and applies the provided
403
+ * Tailwind merge function (from {@link twMergeDefaultV3 | `twMergeDefaultV3`}).**
404
+ * - 🔑 **When to use it?**
405
+ * - Your project uses **Tailwind v3**.
406
+ * - You extend Tailwind merge rules (`classGroups`, `tailwind.config`).
407
+ * - You need multiple `cn*` variants across apps/packages.
408
+ * @param {TwMergeDefaultFnV3} customTwMergeV3 - Merge function created via {@link twMergeDefaultV3 | `twMergeDefaultV3`}.
409
+ * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).
410
+ * @returns {string} Merged Tailwind class string.
411
+ * @example
412
+ * ```ts
413
+ * import tailwindConfig from "../tailwind.config";
414
+ * import { twMergeDefaultV3, customCnV3, type ClassValues } from "@rzl-zone/utils-js/tailwind";
415
+ *
416
+ * // 1. Create a custom merge function
417
+ * const myCustomTwMerge = twMergeDefaultV3({
418
+ * config: tailwindConfig,
419
+ * extend: {
420
+ * classGroups: {
421
+ * "text-shadow": ["text-shadow", "text-shadow-sm", "text-shadow-md"],
422
+ * },
423
+ * },
424
+ * });
425
+ *
426
+ * // 2. Build your helper using `customCnV3`
427
+ * export const cnApp = (...classes: ClassValues) => {
428
+ * return customCnV3(myCustomTwMerge, ...classes);
429
+ * };
430
+ * // ✅ Usage
431
+ * cnApp("p-2", "p-4"); // ➔ "p-4"
432
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
433
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
434
+ * ```
435
+ */
436
+ declare const customCnV3: (customTwMergeV3: TwMergeDefaultFnV3, ...classes: ClassValues) => string;
437
+ /** -------------------------------------------------------------
438
+ * * ***Factory utility for building a custom `cn` helper (Tailwind `v4`).***
439
+ * -------------------------------------------------------------
440
+ * **Wraps internally function to combines class-name values and applies the provided
441
+ * Tailwind merge function (from {@link twMergeDefaultV4 | `twMergeDefaultV4`}).**
442
+ * - 🔑 **When to use it?**
443
+ * - Your project uses **Tailwind v4**.
444
+ * - You extend Tailwind merge rules (`classGroups`, `tailwind.config`).
445
+ * - You need multiple `cn*` variants across apps/packages.
446
+ * @param {TwMergeDefaultFnV4} customTwMergeV4 - Merge function created via {@link twMergeDefaultV4 | `twMergeDefaultV4`}.
447
+ * @param {ClassValues} classes - Class values (`string`, `array`, `object`, `etc`).
448
+ * @returns {string} Merged Tailwind class string.
449
+ * @example
450
+ * ```ts
451
+ * import tailwindConfig from "../tailwind.config";
452
+ * import { twMergeDefaultV4, customCnV4, type ClassValues } from "@rzl-zone/utils-js/tailwind";
453
+ *
454
+ * // 1. Create a custom merge function
455
+ * const myCustomTwMerge = twMergeDefaultV4({
456
+ * config: tailwindConfig,
457
+ * extend: {
458
+ * classGroups: {
459
+ * "text-shadow": ["text-shadow", "text-shadow-sm", "text-shadow-md"],
460
+ * },
461
+ * },
462
+ * });
463
+ *
464
+ * // 2. Build your helper using `customCnV4`
465
+ * export const cnApp = (...classes: ClassValues) => {
466
+ * return customCnV4(myCustomTwMerge, ...classes);
467
+ * };
468
+ *
469
+ * // ✅ Usage
470
+ * cnApp("p-2", "p-4"); // ➔ "p-4"
471
+ * cnApp("shadow-sm shadow-md"); // ➔ "shadow-md"
472
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (resolved from config)
473
+ * ```
474
+ */
475
+ declare const customCnV4: (customTwMergeV4: TwMergeDefaultFnV4, ...classes: ClassValues) => string;
476
+ /** ----------------------------------------------------------
477
+ * * ***Utility: `shouldForwardProp`.***
478
+ * ----------------------------------------------------------
479
+ * **Creates a helper for styled-components `shouldForwardProp`.**
480
+ *
481
+ * @description
482
+ * 1. Returns a **predicate function** that determines whether a given prop
483
+ * should be forwarded to the DOM.
484
+ * 2. Useful for filtering out internal props (e.g., `$size`, `$active`)
485
+ * so they don't become invalid HTML attributes.
486
+ *
487
+ * - **Behavior:**
488
+ * - Accepts a strict tuple of **string keys** to exclude from forwarding.
489
+ * - Every key is validated as a **non-empty string** at runtime.
490
+ * - Throws a `TypeError` if:
491
+ * - `props` is not an array, or
492
+ * - any item is not a non-empty string.
493
+ * - Automatically coerces the tested prop name to string for matching.
494
+ *
495
+ * @template CustomProps
496
+ * The component props type to validate against.
497
+ *
498
+ * @param {readonly Stringify<keyof CustomProps>[]}
499
+ * props
500
+ * The list of prop names (keys of `CustomProps`) to exclude from forwarding.
501
+ *
502
+ * @returns {(propName: keyof CustomProps | ({} & string)) => boolean}
503
+ * A function that receives a prop name and returns:
504
+ * - `true` ➔ the prop **will** be forwarded to the DOM.
505
+ * - `false` ➔ the prop **will not** be forwarded.
506
+ *
507
+ * @throws **{@link TypeError | `TypeError`}**
508
+ * when:
509
+ * - `props` is not an array, or
510
+ * - any item is not a non-empty string.
511
+ *
512
+ * @example
513
+ * // Basic usage
514
+ * type Props = { $size: string; color: string; visible: boolean };
515
+ * const filter = shouldForwardProp<Props>(["$size"]);
516
+ *
517
+ * filter("$size"); // ➔ false (blocked).
518
+ * filter("color"); // ➔ true (forwarded).
519
+ * filter("visible"); // ➔ true (forwarded).
520
+ *
521
+ * @example
522
+ * // With styled-components
523
+ * type CustomProps = { $internal: boolean; public: string; another: boolean };
524
+ *
525
+ * styled.div.withConfig({
526
+ * shouldForwardProp: shouldForwardProp<CustomProps>(["$internal"])
527
+ * });
528
+ */
529
+ declare const shouldForwardProp: <CustomProps extends Record<string, unknown>>(props: readonly Stringify<keyof CustomProps>[]) => ((propName: keyof CustomProps | ({} & string)) => boolean);
530
+ /** -------------------------------------------------------------
531
+ * * ***Customized Tailwind class merger Version 3 with extended rules.***
532
+ * -------------------------------------------------------------
533
+ * **Wraps ***`extendTailwindMerge` from tailwind-merge-v3*** with Tailwind’s default
534
+ * config (_*`getDefaultConfig()` from tailwind-merge-v3*_) to create a **project-ready `twMerge`**.**
535
+ * - 🔑 **When to use it?**
536
+ * - Your project uses **Tailwind v3**.
537
+ * - Extend **class groups** (e.g. add `text-shadow`).
538
+ * - Respect your own **`tailwind.config.ts`** (colors, spacing, fontSize, etc).
539
+ * - Override or fine-tune **merge behavior**.
540
+ * - Create a **project-wide `cn` helper** that replaces raw `twMerge`.
541
+ * @param {OptionsMergeTwClsV3} [options={}]
542
+ * ***Merge options:***
543
+ * - `config` – Your Tailwind config (from `tailwind.config.ts`).
544
+ * - `prefix` - Utility prefix (e.g. `tw-` or `tw`).
545
+ * - `extend` – Extra merge rules (classGroups, theme, etc).
546
+ * - `override` – Fully replace rules.
547
+ * - `cacheSize` – Parsed class cache size.
548
+ * - `experimentalParseClassName` – Custom classname parser.
549
+ * @returns {TwMergeDefaultFnV3}
550
+ * Customized Tailwind class merge function version 3 (same signature as `twMerge`).
551
+ * @example
552
+ * #### Example 1: ***Default behavior (same as tailwind-merge).***
553
+ * ```ts
554
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
555
+ *
556
+ * const twMerge = twMergeDefaultV3();
557
+ * twMerge("p-2 p-4");
558
+ * // ➔ "p-4"
559
+ * ```
560
+ * #### Example 2: ***Extend class groups.***
561
+ * ```ts
562
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
563
+ *
564
+ * const twMerge2 = twMergeDefaultV3({
565
+ * extend: {
566
+ * classGroups: {
567
+ * shadow: ["shadow-soft", "shadow-hard"],
568
+ * },
569
+ * },
570
+ * });
571
+ * twMerge2("shadow-soft shadow-hard");
572
+ * // ➔ "shadow-hard"
573
+ * ```
574
+ * #### Example 3: ***Respect your Tailwind config.***
575
+ * ```ts
576
+ * import config from "../tailwind.config";
577
+ * import { twMergeDefaultV3 } from "@rzl-zone/utils-js/tailwind";
578
+ *
579
+ * const twMerge3 = twMergeDefaultV3({ config });
580
+ * twMerge3("text-base text-xxs");
581
+ * // ➔ "text-xxs" (resolved from config)
582
+ * ```
583
+ * #### Example 4: ***Project-wide helper (recommended).***
584
+ * ```ts
585
+ * import configTwCss from "../tailwind.config";
586
+ * import { customCnV3, twMergeDefaultV3, type ClassValues } from "@rzl-zone/utils-js/tailwind";
587
+ *
588
+ * const customTwMerge = twMergeDefaultV3({
589
+ * config: configTwCss,
590
+ * extend: {
591
+ * classGroups: { shadow: ["shadow-soft", "shadow-hard"] },
592
+ * },
593
+ * });
594
+ *
595
+ * export const cnApp = (...classes: ClassValues) => {
596
+ * return customCnV3(customTwMerge, ...classes);
597
+ * };
598
+ *
599
+ * // ✅ Usage
600
+ * cnApp("p-2 p-4"); // ➔ "p-4"
601
+ * cnApp("shadow-soft shadow-hard"); // ➔ "shadow-hard"
602
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (uses config)
603
+ *
604
+ * // ⚡ Difference with package-level `cn`
605
+ * import { cnV3, cnV4 } from "@rzl-zone/utils-js/tailwind";
606
+ *
607
+ * cnV3("text-base text-xxs");
608
+ * // or
609
+ * cnV4("text-base text-xxs");
610
+ * // ➔ "text-base" (❌ doesn't know about your config)
611
+ *
612
+ * cnApp("text-base text-xxs");
613
+ * // ➔ "text-xxs" (✅ respects config)
614
+ * ```
615
+ */
616
+ declare const twMergeDefaultV3: (options?: OptionsMergeTwClsV3) => TwMergeDefaultFnV3;
617
+ /** -------------------------------------------------------------
618
+ * * ***Customized Tailwind class merger Version 4 with extended rules.***
619
+ * -------------------------------------------------------------
620
+ * **Wraps ***`extendTailwindMerge` from tailwind-merge-v4*** with Tailwind’s default
621
+ * config (_*`getDefaultConfig()` from tailwind-merge-v4*_) to create a **project-ready `twMerge`**.**
622
+ * - 🔑 **When to use it?**
623
+ * - Your project uses **Tailwind v4**.
624
+ * - Extend **class groups** (e.g. add `text-shadow`).
625
+ * - Respect your own **`tailwind.config.ts`** (colors, spacing, fontSize, etc).
626
+ * - Override or fine-tune **merge behavior**.
627
+ * - Create a **project-wide `cn` helper** that replaces raw `twMerge`.
628
+ * @param {OptionsMergeTwClsV4} [options={}]
629
+ * ***Merge options:***
630
+ * - `config` – Your Tailwind config (from `tailwind.config.ts`).
631
+ * - `prefix` - Utility prefix (e.g. `tw-` or `tw`).
632
+ * - `extend` – Extra merge rules (classGroups, theme, etc).
633
+ * - `override` – Fully replace rules.
634
+ * - `cacheSize` – Parsed class cache size.
635
+ * - `experimentalParseClassName` – Custom classname parser.
636
+ * @returns {TwMergeDefaultFnV4}
637
+ * Customized Tailwind class merge function version 4 (same signature as `twMerge`).
638
+ * @example
639
+ * #### Example 1: ***Default behavior (same as tailwind-merge).***
640
+ * ```ts
641
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
642
+ *
643
+ * const twMerge = twMergeDefaultV4();
644
+ * twMerge("p-2 p-4");
645
+ * // ➔ "p-4"
646
+ * ```
647
+ * #### Example 2: ***Extend class groups.***
648
+ * ```ts
649
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
650
+ *
651
+ * const twMerge2 = twMergeDefaultV4({
652
+ * extend: {
653
+ * classGroups: {
654
+ * shadow: ["shadow-soft", "shadow-hard"],
655
+ * },
656
+ * },
657
+ * });
658
+ * twMerge2("shadow-soft shadow-hard");
659
+ * // ➔ "shadow-hard"
660
+ * ```
661
+ * #### Example 3: ***Respect your Tailwind config.***
662
+ * ```ts
663
+ * import config from "../tailwind.config";
664
+ * import { twMergeDefaultV4 } from "@rzl-zone/utils-js/tailwind";
665
+ *
666
+ * const twMerge3 = twMergeDefaultV4({ config });
667
+ * twMerge3("text-base text-xxs");
668
+ * // ➔ "text-xxs" (resolved from config)
669
+ * ```
670
+ * #### Example 4: ***Project-wide helper (recommended).***
671
+ * ```ts
672
+ * import configTwCss from "../tailwind.config";
673
+ * import { customCnV4, twMergeDefaultV4, type ClassValues } from "@rzl-zone/utils-js/tailwind";
674
+ *
675
+ * const customTwMerge = twMergeDefaultV4({
676
+ * config: configTwCss,
677
+ * extend: {
678
+ * classGroups: { shadow: ["shadow-soft", "shadow-hard"] },
679
+ * },
680
+ * });
681
+ *
682
+ * export const cnApp = (...classes: ClassValues) => {
683
+ * return customCnV4(customTwMerge, ...classes);
684
+ * };
685
+ *
686
+ * // ✅ Usage
687
+ * cnApp("p-2 p-4"); // ➔ "p-4"
688
+ * cnApp("shadow-soft shadow-hard"); // ➔ "shadow-hard"
689
+ * cnApp("text-base text-xxs"); // ➔ "text-xxs" (uses config)
690
+ *
691
+ * // ⚡ Difference with package-level `cn`
692
+ * import { cnV3, cnV4 } from "@rzl-zone/utils-js/tailwind";
693
+ *
694
+ * cnV3("text-base text-xxs");
695
+ * // or
696
+ * cnV4("text-base text-xxs");
697
+ * // ➔ "text-base" (❌ doesn't know about your config)
698
+ *
699
+ * cnApp("text-base text-xxs");
700
+ * // ➔ "text-xxs" (✅ respects config)
701
+ * ```
702
+ */
703
+ declare const twMergeDefaultV4: (options?: OptionsMergeTwClsV4) => TwMergeDefaultFnV4;
704
+ 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 };