@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.
- package/dist/assertions/index.cjs +1 -1
- package/dist/assertions/index.d.ts +1 -1
- package/dist/assertions/index.js +1 -1
- package/dist/chunk-2CQI36UD.cjs +1 -1
- package/dist/chunk-2VO2CBTU.js +1 -1
- package/dist/chunk-3KTD3QDI.js +1 -1
- package/dist/chunk-4ACKNPL5.js +1 -1
- package/dist/chunk-4ZOXSUXB.js +1 -1
- package/dist/chunk-5NN4ZDE2.cjs +1 -1
- package/dist/chunk-66WLOZOD.cjs +1 -1
- package/dist/chunk-6DSPJA5U.js +1 -1
- package/dist/chunk-6RFNZ2ZZ.cjs +1 -1
- package/dist/chunk-6WMB5AJR.js +1 -1
- package/dist/chunk-7QQV66RX.cjs +1 -1
- package/dist/chunk-7WBMA2VE.cjs +1 -1
- package/dist/chunk-7ZNEUWYP.js +1 -1
- package/dist/chunk-A3YI6Y2P.js +1 -1
- package/dist/chunk-ABA2ZSBQ.js +1 -1
- package/dist/chunk-AKKM6MOX.cjs +1 -1
- package/dist/chunk-ATLFMKAF.cjs +1 -1
- package/dist/chunk-B4SDEBN7.cjs +1 -1
- package/dist/chunk-B6UIKBHR.cjs +1 -1
- package/dist/chunk-BAV5T2E3.cjs +1 -1
- package/dist/chunk-BYUT376O.cjs +1 -1
- package/dist/chunk-D53CE4BT.js +1 -1
- package/dist/chunk-DPLL67OT.js +1 -1
- package/dist/chunk-DVMHRLKP.cjs +1 -1
- package/dist/chunk-EK7FSI7F.cjs +1 -1
- package/dist/chunk-F3WBQKRI.cjs +1 -1
- package/dist/chunk-FI76UZRF.js +1 -1
- package/dist/chunk-GAJBF6DR.js +1 -1
- package/dist/chunk-H5NWBTHW.cjs +1 -1
- package/dist/chunk-JY4HLZ4W.js +1 -1
- package/dist/chunk-K3SONK25.cjs +1 -1
- package/dist/chunk-K63WO3XA.cjs +1 -1
- package/dist/chunk-KHO2SBNA.cjs +1 -1
- package/dist/chunk-KPCDDYTZ.js +1 -1
- package/dist/chunk-KTQLDIIT.cjs +1 -1
- package/dist/chunk-L5RDAVVH.js +1 -1
- package/dist/chunk-LBNOZIZ6.js +1 -1
- package/dist/chunk-LEX4TQW2.js +1 -1
- package/dist/chunk-LIU4S3JA.cjs +1 -1
- package/dist/chunk-NREACG6M.cjs +1 -1
- package/dist/chunk-OFBFGFVH.js +1 -1
- package/dist/chunk-ONZFBJVW.js +1 -1
- package/dist/chunk-OS5OT5JA.cjs +1 -1
- package/dist/chunk-PZQC3FZY.js +1 -1
- package/dist/chunk-QAPYHLHC.cjs +1 -1
- package/dist/chunk-QNKGP5DY.js +1 -1
- package/dist/chunk-QUITZ3GP.js +1 -1
- package/dist/chunk-RIEYB2AW.cjs +1 -1
- package/dist/chunk-RMJC3B5P.cjs +1 -1
- package/dist/{chunk-2RZGZEE2.js → chunk-RS5RBLPB.js} +30 -3
- package/dist/chunk-SN6YRDLG.js +1 -1
- package/dist/chunk-SZJ7OI4S.js +1 -1
- package/dist/chunk-TDPYR5JY.js +1 -1
- package/dist/chunk-TDYGYHSH.js +1 -1
- package/dist/chunk-TFDXRT6D.cjs +1 -1
- package/dist/{chunk-ME7Q2M5I.cjs → chunk-TPYENEQ4.cjs} +29 -2
- package/dist/chunk-UDA26MCU.cjs +1 -1
- package/dist/chunk-UKAUXY2U.cjs +1 -1
- package/dist/chunk-URDI3IMY.cjs +1 -1
- package/dist/chunk-VCVND6CH.js +1 -1
- package/dist/chunk-VJDDGRIK.cjs +1 -1
- package/dist/chunk-VNADVWSJ.js +1 -1
- package/dist/chunk-WVSPXFTY.js +1 -1
- package/dist/chunk-XFTUHS4Y.js +1 -1
- package/dist/chunk-YC7AK3KX.cjs +1 -1
- package/dist/chunk-YGB2BQPB.cjs +1 -1
- package/dist/chunk-YWHHVDT4.js +1 -1
- package/dist/chunk-ZN53RM3R.js +1 -1
- package/dist/conversions/index.cjs +1 -1
- package/dist/conversions/index.d.ts +1 -1
- package/dist/conversions/index.js +1 -1
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +1 -1
- package/dist/formatters/index.cjs +1 -1
- package/dist/formatters/index.d.ts +1 -1
- package/dist/formatters/index.js +1 -1
- package/dist/generators/index.cjs +1 -1
- package/dist/generators/index.d.ts +1 -1
- package/dist/generators/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/isPlainObject-FWmcJF6k.d.ts +1 -1
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +1 -1
- package/dist/next/server/index.cjs +1 -1
- package/dist/next/server/index.d.ts +1 -1
- package/dist/next/server/index.js +1 -1
- package/dist/operations/index.cjs +1 -1
- package/dist/operations/index.d.ts +1 -1
- package/dist/operations/index.js +1 -1
- package/dist/parsers/index.cjs +1 -1
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.js +1 -1
- package/dist/predicates/index.cjs +1 -1
- package/dist/predicates/index.d.ts +1 -1
- package/dist/predicates/index.js +1 -1
- package/dist/promises/index.cjs +1 -1
- package/dist/promises/index.d.ts +1 -1
- package/dist/promises/index.js +1 -1
- package/dist/rzl-utils.global.js +1 -1
- package/dist/strings/index.cjs +1 -1
- package/dist/strings/index.d.ts +1 -1
- package/dist/strings/index.js +1 -1
- package/dist/tailwind/index.cjs +10 -9
- package/dist/tailwind/index.d.ts +42 -31
- package/dist/tailwind/index.js +3 -2
- package/dist/urls/index.cjs +1 -1
- package/dist/urls/index.d.ts +1 -1
- package/dist/urls/index.js +1 -1
- package/package.json +1 -1
package/dist/tailwind/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
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
|
-
*
|
|
382
|
-
* should be forwarded to the DOM
|
|
383
|
-
*
|
|
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
|
|
386
|
-
* -
|
|
387
|
-
* -
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
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
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
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
|
-
*
|
|
399
|
-
* filter("
|
|
404
|
+
*
|
|
405
|
+
* filter("$size"); // ➔ false (blocked).
|
|
406
|
+
* filter("color"); // ➔ true (forwarded).
|
|
407
|
+
* filter("visible"); // ➔ true (forwarded).
|
|
408
|
+
*
|
|
400
409
|
* @example
|
|
401
|
-
* //
|
|
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
|
|
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
|
* -------------------------------------------------------------
|
package/dist/tailwind/index.js
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
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-
|
|
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';
|
package/dist/urls/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.6.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
package/dist/urls/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.6.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
package/dist/urls/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.6.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|