@rzl-zone/utils-js 3.5.4 → 3.5.6

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 (114) hide show
  1. package/dist/assertions/index.cjs +1 -1
  2. package/dist/assertions/index.d.ts +1 -1
  3. package/dist/assertions/index.js +1 -1
  4. package/dist/chunk-2CQI36UD.cjs +1 -1
  5. package/dist/chunk-2VO2CBTU.js +1 -1
  6. package/dist/chunk-3KTD3QDI.js +1 -1
  7. package/dist/chunk-4ACKNPL5.js +1 -1
  8. package/dist/chunk-4ZOXSUXB.js +1 -1
  9. package/dist/chunk-5NN4ZDE2.cjs +1 -1
  10. package/dist/chunk-66WLOZOD.cjs +1 -1
  11. package/dist/chunk-6DSPJA5U.js +1 -1
  12. package/dist/chunk-6RFNZ2ZZ.cjs +1 -1
  13. package/dist/chunk-6WMB5AJR.js +1 -1
  14. package/dist/chunk-7QQV66RX.cjs +1 -1
  15. package/dist/chunk-7WBMA2VE.cjs +1 -1
  16. package/dist/chunk-7ZNEUWYP.js +1 -1
  17. package/dist/chunk-A3YI6Y2P.js +1 -1
  18. package/dist/chunk-ABA2ZSBQ.js +1 -1
  19. package/dist/chunk-AKKM6MOX.cjs +1 -1
  20. package/dist/chunk-ATLFMKAF.cjs +1 -1
  21. package/dist/chunk-B4SDEBN7.cjs +1 -1
  22. package/dist/chunk-B6UIKBHR.cjs +1 -1
  23. package/dist/chunk-BAV5T2E3.cjs +1 -1
  24. package/dist/chunk-BYUT376O.cjs +1 -1
  25. package/dist/chunk-D53CE4BT.js +1 -1
  26. package/dist/chunk-DPLL67OT.js +1 -1
  27. package/dist/chunk-DVMHRLKP.cjs +1 -1
  28. package/dist/chunk-EK7FSI7F.cjs +1 -1
  29. package/dist/chunk-F3WBQKRI.cjs +1 -1
  30. package/dist/chunk-FI76UZRF.js +1 -1
  31. package/dist/chunk-GAJBF6DR.js +1 -1
  32. package/dist/chunk-H5NWBTHW.cjs +1 -1
  33. package/dist/chunk-JY4HLZ4W.js +1 -1
  34. package/dist/chunk-K3SONK25.cjs +1 -1
  35. package/dist/chunk-K63WO3XA.cjs +1 -1
  36. package/dist/chunk-KHO2SBNA.cjs +1 -1
  37. package/dist/chunk-KPCDDYTZ.js +1 -1
  38. package/dist/chunk-KTQLDIIT.cjs +1 -1
  39. package/dist/chunk-L5RDAVVH.js +1 -1
  40. package/dist/chunk-LBNOZIZ6.js +1 -1
  41. package/dist/chunk-LEX4TQW2.js +1 -1
  42. package/dist/chunk-LIU4S3JA.cjs +1 -1
  43. package/dist/chunk-NREACG6M.cjs +1 -1
  44. package/dist/chunk-OFBFGFVH.js +1 -1
  45. package/dist/chunk-ONZFBJVW.js +1 -1
  46. package/dist/chunk-OS5OT5JA.cjs +1 -1
  47. package/dist/chunk-PZQC3FZY.js +1 -1
  48. package/dist/chunk-QAPYHLHC.cjs +1 -1
  49. package/dist/chunk-QNKGP5DY.js +1 -1
  50. package/dist/chunk-QUITZ3GP.js +1 -1
  51. package/dist/chunk-RIEYB2AW.cjs +1 -1
  52. package/dist/chunk-RMJC3B5P.cjs +1 -1
  53. package/dist/{chunk-2RZGZEE2.js → chunk-RS5RBLPB.js} +30 -3
  54. package/dist/chunk-SN6YRDLG.js +1 -1
  55. package/dist/chunk-SZJ7OI4S.js +1 -1
  56. package/dist/chunk-TDPYR5JY.js +1 -1
  57. package/dist/chunk-TDYGYHSH.js +1 -1
  58. package/dist/chunk-TFDXRT6D.cjs +1 -1
  59. package/dist/{chunk-ME7Q2M5I.cjs → chunk-TPYENEQ4.cjs} +29 -2
  60. package/dist/chunk-UDA26MCU.cjs +1 -1
  61. package/dist/chunk-UKAUXY2U.cjs +1 -1
  62. package/dist/chunk-URDI3IMY.cjs +1 -1
  63. package/dist/chunk-VCVND6CH.js +1 -1
  64. package/dist/chunk-VJDDGRIK.cjs +1 -1
  65. package/dist/chunk-VNADVWSJ.js +1 -1
  66. package/dist/chunk-WVSPXFTY.js +1 -1
  67. package/dist/chunk-XFTUHS4Y.js +1 -1
  68. package/dist/chunk-YC7AK3KX.cjs +1 -1
  69. package/dist/chunk-YGB2BQPB.cjs +1 -1
  70. package/dist/chunk-YWHHVDT4.js +1 -1
  71. package/dist/chunk-ZN53RM3R.js +1 -1
  72. package/dist/conversions/index.cjs +1 -1
  73. package/dist/conversions/index.d.ts +1 -1
  74. package/dist/conversions/index.js +1 -1
  75. package/dist/events/index.cjs +1 -1
  76. package/dist/events/index.d.ts +1 -1
  77. package/dist/events/index.js +1 -1
  78. package/dist/formatters/index.cjs +1 -1
  79. package/dist/formatters/index.d.ts +1 -1
  80. package/dist/formatters/index.js +1 -1
  81. package/dist/generators/index.cjs +1 -1
  82. package/dist/generators/index.d.ts +1 -1
  83. package/dist/generators/index.js +1 -1
  84. package/dist/index.d.ts +1 -1
  85. package/dist/isPlainObject-FWmcJF6k.d.ts +1 -1
  86. package/dist/next/index.cjs +1 -1
  87. package/dist/next/index.d.ts +1 -1
  88. package/dist/next/index.js +1 -1
  89. package/dist/next/server/index.cjs +1 -1
  90. package/dist/next/server/index.d.ts +1 -1
  91. package/dist/next/server/index.js +1 -1
  92. package/dist/operations/index.cjs +1 -1
  93. package/dist/operations/index.d.ts +1 -1
  94. package/dist/operations/index.js +1 -1
  95. package/dist/parsers/index.cjs +1 -1
  96. package/dist/parsers/index.d.ts +1 -1
  97. package/dist/parsers/index.js +1 -1
  98. package/dist/predicates/index.cjs +1 -1
  99. package/dist/predicates/index.d.ts +1 -1
  100. package/dist/predicates/index.js +1 -1
  101. package/dist/promises/index.cjs +1 -1
  102. package/dist/promises/index.d.ts +1 -1
  103. package/dist/promises/index.js +1 -1
  104. package/dist/rzl-utils.global.js +1 -1
  105. package/dist/strings/index.cjs +1 -1
  106. package/dist/strings/index.d.ts +1 -1
  107. package/dist/strings/index.js +1 -1
  108. package/dist/tailwind/index.cjs +10 -9
  109. package/dist/tailwind/index.d.ts +42 -31
  110. package/dist/tailwind/index.js +3 -2
  111. package/dist/urls/index.cjs +1 -1
  112. package/dist/urls/index.d.ts +1 -1
  113. package/dist/urls/index.js +1 -1
  114. package/package.json +1 -1
@@ -2,12 +2,12 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.5.4.
5
+ * Version: 3.5.6.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- 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[];
10
+ 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';import{Stringify}from'@rzl-zone/ts-types-plus';type ClassesValue=ClassValue[];
11
11
  /** -------------------------------------------------------------
12
12
  * * ***Default `cnV3` utility (Tailwind v3).***
13
13
  * -------------------------------------------------------------
@@ -361,49 +361,60 @@ declare const customCnV3:(customTwMergeV3:TwMergeDefaultFnV3,...classes:ClassesV
361
361
  * ```
362
362
  */
363
363
  declare const customCnV4:(customTwMergeV4:TwMergeDefaultFnV4,...classes:ClassesValue)=>string;
364
- /** ----------------------------------------------------------
365
- * * ***Converts a union type into an intersection type.***
366
- * ----------------------------------------------------------
367
- * @template U - The union type to be converted.
368
- */
369
- type UnionToIntersectionStrict<U>=(U extends never?never:(arg:U)=>never)extends(arg:infer I)=>void?I:never;
370
- /** ----------------------------------------------------------
371
- * * ***Converts a union type into a tuple type.***
372
- * ----------------------------------------------------------
373
- * @template T - The union type to be converted.
374
- */
375
- type UnionToTupleStrict<T>=UnionToIntersectionStrict<T extends never?never:(t:T)=>T>extends(_:never)=>infer W?[...UnionToTupleStrict<Exclude<T,W>>,W]:[];
376
364
  /** ----------------------------------------------------------
377
365
  * * ***Utility: `shouldForwardProp`.***
378
366
  * ----------------------------------------------------------
379
367
  * **Creates a helper for styled-components `shouldForwardProp`.**
368
+ *
380
369
  * @description
381
- * This utility returns a predicate function that determines whether a given prop
382
- * should be forwarded to the DOM, useful for filtering out internal props (e.g.,
383
- * `$size`, `$active`) so they don't end up as invalid HTML attributes.
370
+ * 1. Returns a **predicate function** that determines whether a given prop
371
+ * should be forwarded to the DOM.
372
+ * 2. Useful for filtering out internal props (e.g., `$size`, `$active`)
373
+ * so they don't become invalid HTML attributes.
374
+ *
384
375
  * - **Behavior:**
385
- * - Accepts a tuple (strict) of prop keys to exclude from forwarding.
386
- * - Automatically coerces prop names to string for consistent checking.
387
- * - Supports string, number, or symbol keys (via PropertyKey).
388
- * - Will throw an error if the provided `props` argument is not an array.
389
- * @template CustomProps - The type of the component's props.
390
- * @param {UnionToTupleStrict<keyof CustomProps>} props
376
+ * - Accepts a strict tuple of **string keys** to exclude from forwarding.
377
+ * - Every key is validated as a **non-empty string** at runtime.
378
+ * - Throws a `TypeError` if:
379
+ * - `props` is not an array, or
380
+ * - any item is not a non-empty string.
381
+ * - Automatically coerces the tested prop name to string for matching.
382
+ *
383
+ * @template CustomProps
384
+ * The component props type to validate against.
385
+ *
386
+ * @param {readonly Stringify<keyof CustomProps>[]}
387
+ * props
391
388
  * The list of prop names (keys of `CustomProps`) to exclude from forwarding.
392
- * @returns {(propName: PropertyKey) => boolean}
393
- * A function that takes a prop name and returns `true` if it should be forwarded, `false` if it should be blocked.
394
- * @throws {TypeError} If `props` is not an array.
389
+ *
390
+ * @returns {(propName: keyof CustomProps | ({} & string)) => boolean}
391
+ * A function that receives a prop name and returns:
392
+ * - `true` ➔ the prop **will** be forwarded to the DOM.
393
+ * - `false` ➔ the prop **will not** be forwarded.
394
+ *
395
+ * @throws {TypeError}
396
+ * Thrown when:
397
+ * - `props` is not an array, or
398
+ * - any item is not a non-empty string.
399
+ *
395
400
  * @example
401
+ * // Basic usage
396
402
  * type Props = { $size: string; color: string; visible: boolean };
397
403
  * const filter = shouldForwardProp<Props>(["$size"]);
398
- * filter("$size"); // ➔ false (blocked)
399
- * filter("color"); // ➔ true (forwarded)
404
+ *
405
+ * filter("$size"); // ➔ false (blocked).
406
+ * filter("color"); // ➔ true (forwarded).
407
+ * filter("visible"); // ➔ true (forwarded).
408
+ *
400
409
  * @example
401
- * // Using with styled-components:
410
+ * // With styled-components
411
+ * type CustomProps = { $internal: boolean; public: string; another: boolean };
412
+ *
402
413
  * styled.div.withConfig({
403
414
  * shouldForwardProp: shouldForwardProp<CustomProps>(["$internal"])
404
- * })
415
+ * });
405
416
  */
406
- declare const shouldForwardProp:<CustomProps>(props:Partial<UnionToTupleStrict<keyof CustomProps>>)=>((propName:keyof CustomProps)=>boolean);
417
+ declare const shouldForwardProp:<CustomProps extends Record<string,unknown>>(props:readonly Stringify<keyof CustomProps>[])=>((propName:keyof CustomProps|({}& string))=>boolean);
407
418
  /** -------------------------------------------------------------
408
419
  * * ***Customized Tailwind class merger Version 3 with extended rules.***
409
420
  * -------------------------------------------------------------
@@ -2,11 +2,12 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.5.4.
5
+ * Version: 3.5.6.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- export { cnV3, cnV4, customCnV3, customCnV4, shouldForwardProp, twMergeDefaultV3, twMergeDefaultV4 } from '../chunk-2RZGZEE2.js';
10
+ export { cnV3, cnV4, customCnV3, customCnV4, shouldForwardProp, twMergeDefaultV3, twMergeDefaultV4 } from '../chunk-RS5RBLPB.js';
11
+ import '../chunk-JY4HLZ4W.js';
11
12
  import '../chunk-6WMB5AJR.js';
12
13
  import '../chunk-3KTD3QDI.js';
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.5.4.
5
+ * Version: 3.5.6.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.5.4.
5
+ * Version: 3.5.6.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.5.4.
5
+ * Version: 3.5.6.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rzl-zone/utils-js",
3
- "version": "3.5.4",
3
+ "version": "3.5.6",
4
4
  "sideEffects": false,
5
5
  "engineStrict": true,
6
6
  "license": "MIT",