@rzl-zone/utils-js 3.3.1 → 3.5.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.
- package/README.md +94 -45
- package/dist/assertions/index.cjs +34 -1
- package/dist/assertions/index.d.ts +2 -2
- package/dist/assertions/index.js +5 -1
- package/dist/chunk-2CQX5CBG.js +247 -1
- package/dist/chunk-2IOOEY45.cjs +20 -1
- package/dist/chunk-2WA36TC5.cjs +176 -0
- package/dist/chunk-3IBQ5MOM.js +6 -1
- package/dist/chunk-3VA554KW.js +23 -1
- package/dist/chunk-5757UBXJ.cjs +144 -1
- package/dist/chunk-5IGC6PBH.js +22 -1
- package/dist/chunk-5KJFVIQT.cjs +55 -1
- package/dist/chunk-6JFCSH7J.js +24 -1
- package/dist/chunk-6JFZL7YE.cjs +14 -1
- package/dist/chunk-7ODAAXX5.cjs +361 -1
- package/dist/chunk-BAV5T2E3.cjs +5 -1
- package/dist/chunk-CAH33WOQ.cjs +25 -1
- package/dist/chunk-CDCERIZ2.js +164 -0
- package/dist/chunk-CKTLUNWX.js +12 -1
- package/dist/chunk-CMW2TBOQ.js +522 -1
- package/dist/chunk-D3ENH7H6.cjs +87 -1
- package/dist/chunk-DEZZUYE2.js +139 -1
- package/dist/chunk-DVMHRLKP.cjs +6 -1
- package/dist/chunk-DWF2R5GD.cjs +212 -1
- package/dist/chunk-E55EQK2U.cjs +8 -1
- package/dist/chunk-E74U6CYP.cjs +8 -1
- package/dist/chunk-EL6A35UR.cjs +51 -1
- package/dist/chunk-F6IPNNSJ.cjs +531 -1
- package/dist/chunk-FJZGG54N.cjs +252 -1
- package/dist/chunk-FWCKOJZM.js +519 -1
- package/dist/chunk-FWHNWL2P.cjs +409 -1
- package/dist/chunk-GGEADHZO.js +78 -1
- package/dist/chunk-GQR4R5WY.js +21 -1
- package/dist/chunk-H66AC7GK.cjs +81 -1
- package/dist/chunk-HQWOFR56.cjs +23 -1
- package/dist/chunk-HYRQMTRH.cjs +14 -1
- package/dist/chunk-IRFL4MAX.js +53 -1
- package/dist/chunk-IVL7CKVH.cjs +26 -1
- package/dist/chunk-IZPBKKPO.js +6 -1
- package/dist/chunk-JBQMXC5I.cjs +93 -1
- package/dist/chunk-JEQEF5WD.js +81 -1
- package/dist/chunk-JMJQCN74.js +334 -1
- package/dist/chunk-KHO2SBNA.cjs +6 -1
- package/dist/chunk-KVAL5PAG.cjs +16 -1
- package/dist/chunk-L5RDAVVH.js +5 -1
- package/dist/chunk-LS6U7FAY.cjs +98 -1
- package/dist/chunk-NBZWMBO6.js +88 -1
- package/dist/chunk-NRF6LWBC.cjs +45 -1
- package/dist/chunk-OI5XKNZO.js +42 -1
- package/dist/chunk-ONZFBJVW.js +5 -1
- package/dist/chunk-OYTYSY7G.js +94 -1
- package/dist/chunk-PET42Z7W.js +107 -1
- package/dist/chunk-PZQ6I4JJ.cjs +559 -1
- package/dist/chunk-QBKAEVYG.js +102 -1
- package/dist/chunk-QNKGP5DY.js +5 -1
- package/dist/chunk-RIPKY4RU.js +407 -1
- package/dist/chunk-RZW35UN5.cjs +105 -1
- package/dist/chunk-SBFNXGTJ.js +207 -1
- package/dist/chunk-SBKGWRS5.js +12 -1
- package/dist/chunk-SIM77PU4.js +46 -1
- package/dist/chunk-T2T7K3KR.js +18 -1
- package/dist/chunk-T7PU2V7X.cjs +111 -1
- package/dist/chunk-UDA26MCU.cjs +6 -1
- package/dist/chunk-V45XJKHW.cjs +8 -1
- package/dist/chunk-VJDDGRIK.cjs +6 -1
- package/dist/chunk-W2WNBUDE.js +6 -1
- package/dist/chunk-WVSPXFTY.js +5 -1
- package/dist/chunk-XABCB3Y7.cjs +563 -1
- package/dist/chunk-XEDXFSGI.js +14 -1
- package/dist/chunk-YKPSRP5G.js +552 -1
- package/dist/chunk-YWHHVDT4.js +4 -1
- package/dist/chunk-ZETAZZLD.cjs +27 -1
- package/dist/conversions/index.cjs +97 -1
- package/dist/conversions/index.d.ts +2 -2
- package/dist/conversions/index.js +16 -1
- package/dist/events/index.cjs +25 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +4 -1
- package/dist/formatters/index.cjs +55 -1
- package/dist/formatters/index.d.ts +2 -2
- package/dist/formatters/index.js +10 -1
- package/dist/generators/index.cjs +31 -1
- package/dist/generators/index.d.ts +2 -2
- package/dist/generators/index.js +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/{isPlainObject-DGJkcFYw.d.ts → isPlainObject-FWmcJF6k.d.ts} +5 -5
- package/dist/next/index.cjs +205 -1
- package/dist/next/index.d.ts +2 -2
- package/dist/next/index.js +200 -1
- package/dist/next/server/index.cjs +34 -1
- package/dist/next/server/index.d.ts +1 -1
- package/dist/next/server/index.js +32 -1
- package/dist/operations/index.cjs +26 -1
- package/dist/operations/index.d.ts +2 -2
- package/dist/operations/index.js +9 -1
- package/dist/parsers/index.cjs +11 -1
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.js +2 -1
- package/dist/predicates/index.cjs +292 -1
- package/dist/predicates/index.d.ts +4 -4
- package/dist/predicates/index.js +15 -1
- package/dist/promises/index.cjs +18 -1
- package/dist/promises/index.d.ts +2 -2
- package/dist/promises/index.js +5 -1
- package/dist/rzl-utils.global.js +16 -1
- package/dist/strings/index.cjs +75 -1
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +6 -1
- package/dist/tailwind/index.cjs +36 -1
- package/dist/tailwind/index.d.ts +1 -1
- package/dist/tailwind/index.js +3 -1
- package/dist/urls/index.cjs +44 -1
- package/dist/urls/index.d.ts +1 -1
- package/dist/urls/index.js +15 -1
- package/package.json +16 -24
- package/dist/NumberRangeUnion-B6bhM2s7.d.ts +0 -33
- package/dist/any-v4TsK9ES.d.ts +0 -66
- package/dist/arrays-normalize-recursive-BqmVuFlD.d.ts +0 -72
- package/dist/chunk-JYQTCICM.js +0 -1
- package/dist/chunk-YLA3DURS.cjs +0 -1
- package/dist/extends-DtdRjDyU.d.ts +0 -343
- package/dist/if-ChM35c_q.d.ts +0 -19
- package/dist/is-array-BJeHxPM3.d.ts +0 -952
- package/dist/never-D89PbPh5.d.ts +0 -66
- package/dist/nils-CO8zLHSB.d.ts +0 -151
- package/dist/or-C6qzKt2I.d.ts +0 -82
- package/dist/override-CL2olHE5.d.ts +0 -59
- package/dist/pick-BSMX6Xe2.d.ts +0 -15
- package/dist/prettify-3o8_Kw6b.d.ts +0 -564
- package/dist/promises-LU7K00H0.d.ts +0 -72
- package/dist/string-B1jlOnws.d.ts +0 -312
- package/dist/types/index.d.ts +0 -3345
package/dist/strings/index.cjs
CHANGED
|
@@ -1 +1,75 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkD3ENH7H6_cjs = require('../chunk-D3ENH7H6.cjs');
|
|
4
|
+
var chunkE74U6CYP_cjs = require('../chunk-E74U6CYP.cjs');
|
|
5
|
+
var chunk2IOOEY45_cjs = require('../chunk-2IOOEY45.cjs');
|
|
6
|
+
var chunkKVAL5PAG_cjs = require('../chunk-KVAL5PAG.cjs');
|
|
7
|
+
require('../chunk-E55EQK2U.cjs');
|
|
8
|
+
var chunkPZQ6I4JJ_cjs = require('../chunk-PZQ6I4JJ.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, "capitalizeFirst", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkD3ENH7H6_cjs.capitalizeFirst; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "capitalizeWords", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkD3ENH7H6_cjs.capitalizeWords; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "getInitialsName", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkD3ENH7H6_cjs.getInitialsName; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "replaceAt", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkD3ENH7H6_cjs.replaceAt; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "stripHtmlTags", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkD3ENH7H6_cjs.stripHtmlTags; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "normalizeString", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkE74U6CYP_cjs.normalizeString; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "normalizeSpaces", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunk2IOOEY45_cjs.normalizeSpaces; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "removeSpaces", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkKVAL5PAG_cjs.removeSpaces; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "slugify", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkPZQ6I4JJ_cjs.slugify; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "toCamelCase", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkPZQ6I4JJ_cjs.toCamelCase; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "toDotCase", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkPZQ6I4JJ_cjs.toDotCase; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "toKebabCase", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return chunkPZQ6I4JJ_cjs.toKebabCase; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "toLowerCase", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return chunkPZQ6I4JJ_cjs.toLowerCase; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "toPascalCase", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return chunkPZQ6I4JJ_cjs.toPascalCase; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "toPascalCaseSpace", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunkPZQ6I4JJ_cjs.toPascalCaseSpace; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "toSnakeCase", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return chunkPZQ6I4JJ_cjs.toSnakeCase; }
|
|
75
|
+
});
|
package/dist/strings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Nilable,Extends}from'@rzl-zone/ts-types-plus';type CapitalizeFirstOptions={
|
|
2
2
|
/** If true **(default)**, the rest of the string will be converted to lowercase after capitalizing the first letter.
|
|
3
3
|
*
|
|
4
4
|
* @default true
|
|
@@ -737,4 +737,4 @@ declare const getInitialsName:(name:string|null|undefined)=>string;
|
|
|
737
737
|
* replaceAt(2, null, "X");
|
|
738
738
|
* // ➔ ❌ TypeError: First parameter `index` must be of type `number`, second parameter `originalString` and third parameter `replaceTo` must be of type `string`, but received: "['index': `string`,...]."
|
|
739
739
|
*/
|
|
740
|
-
declare const replaceAt:(index:number,originalString:string,replaceTo:string)=>string;export{capitalizeFirst,capitalizeWords,getInitialsName,normalizeSpaces,normalizeString,removeSpaces,replaceAt,slugify,stripHtmlTags,toCamelCase,toDotCase,toKebabCase,toLowerCase,toPascalCase,toPascalCaseSpace,toSnakeCase};
|
|
740
|
+
declare const replaceAt:(index:number,originalString:string,replaceTo:string)=>string;export{capitalizeFirst,capitalizeWords,getInitialsName,normalizeSpaces,normalizeString,removeSpaces,replaceAt,slugify,stripHtmlTags,toCamelCase,toDotCase,toKebabCase,toLowerCase,toPascalCase,toPascalCaseSpace,toSnakeCase};
|
package/dist/strings/index.js
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
export{capitalizeFirst,capitalizeWords,getInitialsName,replaceAt,stripHtmlTags}from
|
|
1
|
+
export { capitalizeFirst, capitalizeWords, getInitialsName, replaceAt, stripHtmlTags } from '../chunk-JEQEF5WD.js';
|
|
2
|
+
export { normalizeString } from '../chunk-IZPBKKPO.js';
|
|
3
|
+
export { normalizeSpaces } from '../chunk-T2T7K3KR.js';
|
|
4
|
+
export { removeSpaces } from '../chunk-XEDXFSGI.js';
|
|
5
|
+
import '../chunk-W2WNBUDE.js';
|
|
6
|
+
export { slugify, toCamelCase, toDotCase, toKebabCase, toLowerCase, toPascalCase, toPascalCaseSpace, toSnakeCase } from '../chunk-CMW2TBOQ.js';
|
package/dist/tailwind/index.cjs
CHANGED
|
@@ -1 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2WA36TC5_cjs = require('../chunk-2WA36TC5.cjs');
|
|
4
|
+
require('../chunk-6JFZL7YE.cjs');
|
|
5
|
+
require('../chunk-PZQ6I4JJ.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "cnV3", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk2WA36TC5_cjs.cnV3; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "cnV4", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk2WA36TC5_cjs.cnV4; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "customCnV3", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunk2WA36TC5_cjs.customCnV3; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "customCnV4", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunk2WA36TC5_cjs.customCnV4; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "shouldForwardProp", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunk2WA36TC5_cjs.shouldForwardProp; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "twMergeDefaultV3", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunk2WA36TC5_cjs.twMergeDefaultV3; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "twMergeDefaultV4", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunk2WA36TC5_cjs.twMergeDefaultV4; }
|
|
36
|
+
});
|
package/dist/tailwind/index.d.ts
CHANGED
|
@@ -568,4 +568,4 @@ declare const twMergeDefaultV3:(options?:OptionsMergeTwClsV3)=>TwMergeDefaultFnV
|
|
|
568
568
|
* // ➔ "text-xxs" (✅ respects config)
|
|
569
569
|
* ```
|
|
570
570
|
*/
|
|
571
|
-
declare const twMergeDefaultV4:(options?:OptionsMergeTwClsV4)=>TwMergeDefaultFnV4;export{type ClassesValue,cnV3,cnV4,customCnV3,customCnV4,shouldForwardProp,twMergeDefaultV3,twMergeDefaultV4};
|
|
571
|
+
declare const twMergeDefaultV4:(options?:OptionsMergeTwClsV4)=>TwMergeDefaultFnV4;export{type ClassesValue,cnV3,cnV4,customCnV3,customCnV4,shouldForwardProp,twMergeDefaultV3,twMergeDefaultV4};
|
package/dist/tailwind/index.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export{cnV3,cnV4,customCnV3,customCnV4,shouldForwardProp,twMergeDefaultV3,twMergeDefaultV4}from
|
|
1
|
+
export { cnV3, cnV4, customCnV3, customCnV4, shouldForwardProp, twMergeDefaultV3, twMergeDefaultV4 } from '../chunk-CDCERIZ2.js';
|
|
2
|
+
import '../chunk-CKTLUNWX.js';
|
|
3
|
+
import '../chunk-CMW2TBOQ.js';
|
package/dist/urls/index.cjs
CHANGED
|
@@ -1 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkDWF2R5GD_cjs = require('../chunk-DWF2R5GD.cjs');
|
|
4
|
+
require('../chunk-KHO2SBNA.cjs');
|
|
5
|
+
require('../chunk-E74U6CYP.cjs');
|
|
6
|
+
require('../chunk-NRF6LWBC.cjs');
|
|
7
|
+
require('../chunk-HQWOFR56.cjs');
|
|
8
|
+
require('../chunk-V45XJKHW.cjs');
|
|
9
|
+
require('../chunk-DVMHRLKP.cjs');
|
|
10
|
+
var chunkH66AC7GK_cjs = require('../chunk-H66AC7GK.cjs');
|
|
11
|
+
require('../chunk-KVAL5PAG.cjs');
|
|
12
|
+
require('../chunk-E55EQK2U.cjs');
|
|
13
|
+
require('../chunk-ZETAZZLD.cjs');
|
|
14
|
+
require('../chunk-6JFZL7YE.cjs');
|
|
15
|
+
require('../chunk-T7PU2V7X.cjs');
|
|
16
|
+
require('../chunk-UDA26MCU.cjs');
|
|
17
|
+
require('../chunk-PZQ6I4JJ.cjs');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Object.defineProperty(exports, "constructURL", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkDWF2R5GD_cjs.constructURL; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "extractURLs", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkDWF2R5GD_cjs.extractURLs; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "getFirstPrefixPathname", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkDWF2R5GD_cjs.getFirstPrefixPathname; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "getPrefixPathname", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkDWF2R5GD_cjs.getPrefixPathname; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "formatEnvPort", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunkH66AC7GK_cjs.formatEnvPort; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "normalizePathname", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return chunkH66AC7GK_cjs.normalizePathname; }
|
|
44
|
+
});
|
package/dist/urls/index.d.ts
CHANGED
|
@@ -395,4 +395,4 @@ prefixColon?:boolean;};
|
|
|
395
395
|
* formatEnvPort("port:8080", { prefixColon: true });
|
|
396
396
|
* // ➔ ":8080"
|
|
397
397
|
*/
|
|
398
|
-
declare const formatEnvPort:(envVar:string|null|undefined,options?:FormatEnvPortOptions)=>string;export{type QueryParamPairs,constructURL,extractURLs,formatEnvPort,getFirstPrefixPathname,getPrefixPathname,normalizePathname};
|
|
398
|
+
declare const formatEnvPort:(envVar:string|null|undefined,options?:FormatEnvPortOptions)=>string;export{type QueryParamPairs,constructURL,extractURLs,formatEnvPort,getFirstPrefixPathname,getPrefixPathname,normalizePathname};
|
package/dist/urls/index.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
export{constructURL,extractURLs,getFirstPrefixPathname,getPrefixPathname}from
|
|
1
|
+
export { constructURL, extractURLs, getFirstPrefixPathname, getPrefixPathname } from '../chunk-SBFNXGTJ.js';
|
|
2
|
+
import '../chunk-ONZFBJVW.js';
|
|
3
|
+
import '../chunk-IZPBKKPO.js';
|
|
4
|
+
import '../chunk-OI5XKNZO.js';
|
|
5
|
+
import '../chunk-GQR4R5WY.js';
|
|
6
|
+
import '../chunk-3IBQ5MOM.js';
|
|
7
|
+
import '../chunk-WVSPXFTY.js';
|
|
8
|
+
export { formatEnvPort, normalizePathname } from '../chunk-GGEADHZO.js';
|
|
9
|
+
import '../chunk-XEDXFSGI.js';
|
|
10
|
+
import '../chunk-W2WNBUDE.js';
|
|
11
|
+
import '../chunk-6JFCSH7J.js';
|
|
12
|
+
import '../chunk-CKTLUNWX.js';
|
|
13
|
+
import '../chunk-PET42Z7W.js';
|
|
14
|
+
import '../chunk-QNKGP5DY.js';
|
|
15
|
+
import '../chunk-CMW2TBOQ.js';
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rzl-zone/utils-js",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "3.5.0",
|
|
5
4
|
"sideEffects": false,
|
|
6
5
|
"engineStrict": true,
|
|
7
6
|
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
8
|
"unpkg": "./dist/rzl-utils.global.js",
|
|
9
9
|
"jsdelivr": "./dist/rzl-utils.global.js",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"url": "https://github.com/rzl-zone/utils-js/issues"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
+
"@rzl-zone/ts-types-plus": "^0.0.8",
|
|
22
|
+
"clsx": "^2.1.1",
|
|
21
23
|
"date-fns": "^4.1.0",
|
|
22
24
|
"libphonenumber-js": "^1.12.17",
|
|
23
25
|
"server-only": "^0.0.1",
|
|
@@ -30,14 +32,12 @@
|
|
|
30
32
|
"@types/rollup": "^0.51.4",
|
|
31
33
|
"@vitest/coverage-v8": "^3.2.4",
|
|
32
34
|
"barrelsby": "^2.8.1",
|
|
33
|
-
"clsx": "latest",
|
|
34
35
|
"del-cli": "^6.0.0",
|
|
35
36
|
"dts-bundle-generator": "^9.5.1",
|
|
36
37
|
"eslint": "^9.31.0",
|
|
37
38
|
"globals": "^16.3.0",
|
|
38
39
|
"jsdom": "^26.1.0",
|
|
39
|
-
"next": "^15.5.
|
|
40
|
-
"release-please": "^17.1.1",
|
|
40
|
+
"next": "^15.5.3",
|
|
41
41
|
"tailwindcss": "^4.1.13",
|
|
42
42
|
"terser": "^5.44.0",
|
|
43
43
|
"tsc-alias": "^1.8.16",
|
|
@@ -201,9 +201,6 @@
|
|
|
201
201
|
"types": "./dist/urls/index.d.ts",
|
|
202
202
|
"default": "./dist/urls/index.cjs"
|
|
203
203
|
}
|
|
204
|
-
},
|
|
205
|
-
"./types": {
|
|
206
|
-
"types": "./dist/types/index.d.ts"
|
|
207
204
|
}
|
|
208
205
|
},
|
|
209
206
|
"typesVersions": {
|
|
@@ -252,9 +249,6 @@
|
|
|
252
249
|
],
|
|
253
250
|
"urls": [
|
|
254
251
|
"dist/urls/index.d.ts"
|
|
255
|
-
],
|
|
256
|
-
"types": [
|
|
257
|
-
"dist/types/index.d.ts"
|
|
258
252
|
]
|
|
259
253
|
}
|
|
260
254
|
},
|
|
@@ -286,25 +280,23 @@
|
|
|
286
280
|
"url": "git+https://github.com/rzl-zone/utils-js.git"
|
|
287
281
|
},
|
|
288
282
|
"scripts": {
|
|
289
|
-
"generate:reference": "tsx scripts/generate-reference.ts",
|
|
290
|
-
"clean": "del-cli \"dist/*\"",
|
|
291
|
-
"prepublish": "npm run clean",
|
|
292
|
-
"prepare": "npm run build",
|
|
293
|
-
"prepublishOnly": "npm run barrel",
|
|
294
|
-
"check-publish": "npm pack --dry-run",
|
|
295
|
-
"delete-dist:index": "del-cli \"dist/index.{js,js.map,cjs,cjs.map}\" \"dist/index.d.{ts,cts}\"",
|
|
296
|
-
"postbuild": "del-cli \"dist/**/*.d.cts\" && npm run delete-dist:index && npm run generate:reference",
|
|
297
283
|
"barrel:generate": "npx barrelsby --config barrelsby.config.json",
|
|
298
|
-
"barrel": "npm run barrel:generate && npm run barrel:generate && npx tsx scripts/removeBarrelsbyComment.ts ",
|
|
299
284
|
"barrel:remove-comment-dist": "tsx scripts/removeBarrelsbyComment.ts",
|
|
300
|
-
"
|
|
301
|
-
"
|
|
285
|
+
"barrel": "npm run barrel:generate && npm run barrel:generate && npm run barrel:remove-comment-dist",
|
|
286
|
+
"clean-dist": "del-cli \"dist/*\"",
|
|
287
|
+
"clean-dist:types-cts": "del-cli \"dist/**/*.d.{cts,mts}\"",
|
|
288
|
+
"clean-dist:js-comments": "tsx scripts/cleanDistJsComments.ts",
|
|
289
|
+
"delete-dist:index-runtime": "del-cli \"dist/index.{js,js.map,cjs,cjs.map}\" \"dist/index.d.{ts,cts,mts,esm}\"",
|
|
290
|
+
"minify:dist": "tsx scripts/minifyDist.ts",
|
|
302
291
|
"build:types-dts": "dts-bundle-generator --config dts-config.cjs --silent --external-imports next",
|
|
303
|
-
"
|
|
292
|
+
"generate:reference-index": "tsx scripts/generateReferenceIndex.ts",
|
|
293
|
+
"postbuild": "npm run clean-dist:js-comments && npm run clean-dist:types-cts && npm run delete-dist:index-runtime && npm run generate:reference-index",
|
|
294
|
+
"build": "npm run clean-dist && npm run barrel && tsup && npm run minify:dist && npm run postbuild",
|
|
304
295
|
"format": "prettier --check .",
|
|
305
296
|
"lint": "eslint . --ext .ts,.js",
|
|
306
297
|
"lint:fix": "eslint . --ext .ts,.js --fix",
|
|
307
|
-
"
|
|
298
|
+
"prepublishOnly": "npm run build",
|
|
299
|
+
"check-publish": "npm run build && npm pack --dry-run",
|
|
308
300
|
"release-patch": "npm version patch && git push && git push --tags && npm publish"
|
|
309
301
|
}
|
|
310
302
|
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** --------------------------------------------------
|
|
2
|
-
* * ***Internal Utility Type for: {@link NumberRangeUnion | `NumberRangeUnion`}.***
|
|
3
|
-
* --------------------------------------------------
|
|
4
|
-
* @template N - Starting/Ending number of the range (inclusive).
|
|
5
|
-
* @template Acc - Internal accumulator for recursion (do not set manually).
|
|
6
|
-
*/
|
|
7
|
-
type Enumerate<N extends number,Acc extends number[]=[]>=Acc["length"] extends N?Acc[number]:Enumerate<N,[...Acc,Acc["length"]]>;
|
|
8
|
-
/** --------------------------------------------------
|
|
9
|
-
* * ***Utility Type: `NumberRangeUnion`.***
|
|
10
|
-
* --------------------------------------------------
|
|
11
|
-
* **Generate a union type of numbers from `From` to `To` using enumeration.**
|
|
12
|
-
* @description
|
|
13
|
-
* Produces a **numeric union type** from `From` to `To` (inclusive),
|
|
14
|
-
* using a simpler approach based on `Enumerate<N>` helper type.
|
|
15
|
-
* - ✅ Straightforward & easy to reason about.
|
|
16
|
-
* - ⚠️ Still limited by TypeScript recursion depth (safe up to `999`).
|
|
17
|
-
* - ⚙️ Best used for **smaller ranges** (`≤ 100`) or when readability matters.
|
|
18
|
-
* - ℹ️ For **larger ranges** (`≥ 101`) use {@link NumberRangeLimit | `NumberRangeLimit`} instead.
|
|
19
|
-
* @template From - Starting number of the range (inclusive).
|
|
20
|
-
* @template To - Ending number of the range (inclusive).
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* type RangeA = NumberRangeUnion<3, 6>;
|
|
24
|
-
* // ➔ 3 | 4 | 5 | 6
|
|
25
|
-
* type RangeB = NumberRangeUnion<0, 2>;
|
|
26
|
-
* // ➔ 0 | 1 | 2
|
|
27
|
-
* type RangeC = NumberRangeUnion<8, 8>;
|
|
28
|
-
* // ➔ 8
|
|
29
|
-
* type RangeD = NumberRangeUnion<20, 10>;
|
|
30
|
-
* // ➔ 10
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
type NumberRangeUnion<From extends number,To extends number>=From extends To?From:Exclude<Enumerate<To>,Enumerate<From>>extends never?To:Exclude<Enumerate<To>,Enumerate<From>>|To;export type{NumberRangeUnion as N};
|
package/dist/any-v4TsK9ES.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import{I as If}from'./if-ChM35c_q.js';
|
|
2
|
-
/** -------------------------------------------------------
|
|
3
|
-
* * ***Utility Type: `IsAny`.***
|
|
4
|
-
* -------------------------------------------------------
|
|
5
|
-
* **A type-level utility that checks whether a type is ***`any`***.**
|
|
6
|
-
* - **Behavior:**
|
|
7
|
-
* - Returns `true` if `T` is `any`.
|
|
8
|
-
* - Returns `false` for otherwise.
|
|
9
|
-
* @template T - The type to evaluate.
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* type A = IsAny<any>; // ➔ true
|
|
13
|
-
* type B = IsAny<string>; // ➔ false
|
|
14
|
-
* type C = IsAny<unknown>; // ➔ false
|
|
15
|
-
* type D = IsAny<never>; // ➔ false
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
type IsAny<T>=0 extends 1 & T?true:false;
|
|
19
|
-
/** -------------------------------------------------------
|
|
20
|
-
* * ***Utility Type: `IfAny`.***
|
|
21
|
-
* -------------------------------------------------------
|
|
22
|
-
* **A type-level conditional utility that returns one type if ***`T` is `any`***,
|
|
23
|
-
* and another type otherwise.**
|
|
24
|
-
* - **Behavior:**
|
|
25
|
-
* - Defaults to `true` when `T` is `any`.
|
|
26
|
-
* - Defaults to `false` for otherwise.
|
|
27
|
-
* @template T - The type to check.
|
|
28
|
-
* @template IfTrue - The type to return if `T` is `any`, *(default: `true`)*.
|
|
29
|
-
* @template IfFalse - The type to return if `T` is not `any`, *(default: `false`)*.
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* type A = IfAny<any, string, number>;
|
|
33
|
-
* // ➔ string
|
|
34
|
-
* type B = IfAny<string, string, number>;
|
|
35
|
-
* // ➔ number
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
type IfAny<T,IfTrue=true,IfFalse=false>=If<IsAny<T>,IfTrue,IfFalse>;
|
|
39
|
-
/** * ***Configuration options for a type-level utility for
|
|
40
|
-
* {@link AnifyProperties | `AnifyProperties`}.***
|
|
41
|
-
*/
|
|
42
|
-
type AnifyPropertiesOptions={
|
|
43
|
-
/** If `makeOptional: true`, all properties become optional, otherwise, all properties are required and typed as `any`, defaultValue: `false`.
|
|
44
|
-
*
|
|
45
|
-
* @default false
|
|
46
|
-
*/
|
|
47
|
-
makeOptional:boolean;};
|
|
48
|
-
/** -------------------------------------------------------
|
|
49
|
-
* * ***Utility Type: `AnifyProperties`.***
|
|
50
|
-
* -------------------------------------------------------
|
|
51
|
-
* **A type-level utility that transforms all properties of an object
|
|
52
|
-
* into ***`any`***.**
|
|
53
|
-
* - **Behavior:**
|
|
54
|
-
* - If `makeOptional: true`, all properties become optional.
|
|
55
|
-
* - Otherwise, all properties are required and typed as `any`.
|
|
56
|
-
* @template T The object type to transform.
|
|
57
|
-
* @template Options Configuration options, defaults to `{ makeOptional: false }`.
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* type A = AnifyProperties<{a: string; b: number}>;
|
|
61
|
-
* // ➔ { a: any; b: any }
|
|
62
|
-
* type B = AnifyProperties<{a: string; b: number}, { makeOptional: true }>;
|
|
63
|
-
* // ➔ { a?: any; b?: any }
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
type AnifyProperties<T extends object,Options extends AnifyPropertiesOptions={makeOptional:false;}>={[K in keyof T]:any;}extends infer Result?If<Options["makeOptional"],Partial<Result>,Result>:never;export type{AnifyProperties as A,IsAny as I,AnifyPropertiesOptions as a,IfAny as b};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/** -------------------------------------------------------
|
|
2
|
-
* * ***Utility Type: `FixNeverArrayRecursive`.***
|
|
3
|
-
* -------------------------------------------------------
|
|
4
|
-
* **A type-level utility that **recursively transforms arrays of type `never[]` into empty arrays**.**
|
|
5
|
-
* - **Behavior:**
|
|
6
|
-
* - Preserves `readonly` modifiers.
|
|
7
|
-
* - Applies recursively for nested arrays.
|
|
8
|
-
* - Leaves other types unchanged.
|
|
9
|
-
* @template T - The input type to recursively fix.
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* type A = FixNeverArrayRecursive<never[]>;
|
|
13
|
-
* // ➔ []
|
|
14
|
-
* type B = FixNeverArrayRecursive<readonly never[]>;
|
|
15
|
-
* // ➔ readonly []
|
|
16
|
-
* type C = FixNeverArrayRecursive<string[]>;
|
|
17
|
-
* // ➔ string[]
|
|
18
|
-
* type D = FixNeverArrayRecursive<(never | string)[]>;
|
|
19
|
-
* // ➔ (never | string)[]
|
|
20
|
-
* type E = FixNeverArrayRecursive<(never[])[]>;
|
|
21
|
-
* // ➔ [][]
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
type FixNeverArrayRecursive<T>=T extends readonly never[]?T extends never[]?[]:readonly []:T extends(infer U)[]?FixNeverArrayRecursive<U>[]:T extends readonly(infer U)[]?readonly FixNeverArrayRecursive<U>[]:T;
|
|
25
|
-
/** -------------------------------------------------------
|
|
26
|
-
* * ***Utility Type: `NormalizeEmptyArraysRecursive`.***
|
|
27
|
-
* -------------------------------------------------------
|
|
28
|
-
* **A type-level utility that **recursively normalizes empty array types** by converting arrays whose element type is `never`, `null`, or `undefined` into empty tuple types (`[]`).**
|
|
29
|
-
* - **Behavior:**
|
|
30
|
-
* - Preserves `readonly` modifiers.
|
|
31
|
-
* - Recurses into nested arrays.
|
|
32
|
-
* - Leaves other array types unchanged.
|
|
33
|
-
* @template T - The input type to normalize.
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* type A = NormalizeEmptyArraysRecursive<never[]>;
|
|
37
|
-
* // ➔ []
|
|
38
|
-
* type B = NormalizeEmptyArraysRecursive<readonly never[]>;
|
|
39
|
-
* // ➔ readonly []
|
|
40
|
-
* type C = NormalizeEmptyArraysRecursive<null[]>;
|
|
41
|
-
* // ➔ []
|
|
42
|
-
* type D = NormalizeEmptyArraysRecursive<(null[] | string[])[]>;
|
|
43
|
-
* // ➔ ([] | string[])[]
|
|
44
|
-
* type E = NormalizeEmptyArraysRecursive<string[]>;
|
|
45
|
-
* // ➔ string[]
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
type NormalizeEmptyArraysRecursive<T>=T extends readonly(infer U)[]?U extends never|null|undefined?T extends readonly unknown[]?T extends(infer E)[]?[]:readonly []:never:T extends(infer E)[]?NormalizeEmptyArraysRecursive<U>[]:readonly NormalizeEmptyArraysRecursive<U>[]:T;
|
|
49
|
-
/** -------------------------------------------------------
|
|
50
|
-
* * ***Utility Type: `RemoveEmptyArrayElements`.***
|
|
51
|
-
* -------------------------------------------------------
|
|
52
|
-
* **A type-level utility that **recursively removes empty array elements (`[]`) from a tuple type**.**
|
|
53
|
-
* - **Behavior:**
|
|
54
|
-
* - If `T` is a tuple, checks the first element:
|
|
55
|
-
* - If `Head` is an empty array type (`[]`), it is removed.
|
|
56
|
-
* - Otherwise, `Head` is preserved.
|
|
57
|
-
* - Repeats recursively on the rest of the tuple.
|
|
58
|
-
* - Leaves non-tuple types unchanged.
|
|
59
|
-
* @template T - The tuple type to process.
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* type A = RemoveEmptyArrayElements<[[], 1, [], 2]>;
|
|
63
|
-
* // ➔ [1, 2]
|
|
64
|
-
* type B = RemoveEmptyArrayElements<[]>;
|
|
65
|
-
* // ➔ []
|
|
66
|
-
* type C = RemoveEmptyArrayElements<[[], [], []]>;
|
|
67
|
-
* // ➔ []
|
|
68
|
-
* type D = RemoveEmptyArrayElements<[1, 2, 3]>;
|
|
69
|
-
* // ➔ [1, 2, 3]
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
type RemoveEmptyArrayElements<T>=T extends [infer Head,...infer Tail]?Head extends []?RemoveEmptyArrayElements<Tail>:[Head,...RemoveEmptyArrayElements<Tail>]:T extends []?[]:T;export type{FixNeverArrayRecursive as F,NormalizeEmptyArraysRecursive as N,RemoveEmptyArrayElements as R};
|
package/dist/chunk-JYQTCICM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{assertIsArray as e}from"./chunk-CKTLUNWX.js";import{isPlainObject as i,isNumber as r,isNonEmptyString as s,isFunction as o,hasOwnProp as t,isNonEmptyArray as n,getPreciseType as a}from"./chunk-CMW2TBOQ.js";import{getDefaultConfig as c,extendTailwindMerge as f}from"tailwind-merge-v3";import{getDefaultConfig as l,extendTailwindMerge as p}from"tailwind-merge-v4";function d(e){var i,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(i=0;i<o;i++)e[i]&&(r=d(e[i]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}var m=function(){for(var e,i,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(i=d(e))&&(s&&(s+=" "),s+=i);return s},u=e=>{i(e)||(e={});let{config:a,prefix:c,extend:f,override:l,cacheSize:p,experimentalParseClassName:d}=e;i(a)||(a={}),i(f)||(f={}),i(l)||(l={}),r(p)||(p=void 0),s(c)||(c=void 0),o(d)||(d=void 0);return{config:a,override:l,cacheSize:p,prefix:c,experimentalParseClassName:d,theme:t(f,"theme")?f.theme:{},classGroups:t(f,"classGroups")?f.classGroups:{},conflictingClassGroupModifiers:t(f,"conflictingClassGroupModifiers")?f.conflictingClassGroupModifiers:{},conflictingClassGroups:t(f,"conflictingClassGroups")?f.conflictingClassGroups:{},orderSensitiveModifiers:t(f,"orderSensitiveModifiers")&&n(f.orderSensitiveModifiers)?f.orderSensitiveModifiers:[]}},g=c(),x=(e={})=>{i(e)||(e={});const{cacheSize:r,classGroups:s,config:o,conflictingClassGroupModifiers:t,conflictingClassGroups:n,override:a,prefix:c,theme:l,experimentalParseClassName:p}=u(e);return f({prefix:c??o.prefix,cacheSize:r||g.cacheSize,experimentalParseClassName:p,override:a,extend:{conflictingClassGroupModifiers:{...g.conflictingClassGroupModifiers,...t},theme:{...g.theme,...l},conflictingClassGroups:{...g.conflictingClassGroups,...n},classGroups:{...g.classGroups,...s,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...o.theme?.fontSize||{},...o.theme?.extend?.fontSize||{}}).map(e=>`text-${e}`)}}})},h=l(),C=(e={})=>{i(e)||(e={});const{cacheSize:r,classGroups:s,config:o,conflictingClassGroupModifiers:t,conflictingClassGroups:n,orderSensitiveModifiers:a,override:c,prefix:f,theme:l,experimentalParseClassName:d}=u(e);return p({prefix:f||o.prefix,cacheSize:r||h.cacheSize,experimentalParseClassName:d,override:c,extend:{conflictingClassGroupModifiers:{...h.conflictingClassGroupModifiers,...t},theme:{...h.theme,...l},conflictingClassGroups:{...h.conflictingClassGroups,...n},orderSensitiveModifiers:[...h.orderSensitiveModifiers,...a],classGroups:{...h.classGroups,...s,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...o.theme?.fontSize||{},...o.theme?.extend?.fontSize||{}}).map(e=>`text-${e}`)}}})},G=x(),v=C(),S=(...e)=>G(m(...e)),M=(...e)=>v(m(...e)),y=(e,...i)=>{if(!o(e))throw new TypeError(`first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${a(e)}\`.`);return e(m(...i))},z=(e,...i)=>{if(!o(e))throw new TypeError(`first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${a(e)}\`.`);return e(m(...i))},w=i=>(e(i,{message:({currentType:e,validType:i})=>`First parameter (\`props\`) must be of type \`${i}\`, but received: \`${e}\`.`}),e=>!i.map(e=>e.toString()).includes(e.toString()));export{S as cnV3,M as cnV4,y as customCnV3,z as customCnV4,w as shouldForwardProp,x as twMergeDefaultV3,C as twMergeDefaultV4};
|
package/dist/chunk-YLA3DURS.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./chunk-6JFZL7YE.cjs"),i=require("./chunk-PZQ6I4JJ.cjs"),r=require("tailwind-merge-v3"),s=require("tailwind-merge-v4");function t(e){var i,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(i=0;i<o;i++)e[i]&&(r=t(e[i]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}var o=function(){for(var e,i,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(i=t(e))&&(s&&(s+=" "),s+=i);return s},n=e=>{i.isPlainObject(e)||(e={});let{config:r,prefix:s,extend:t,override:o,cacheSize:n,experimentalParseClassName:a}=e;i.isPlainObject(r)||(r={}),i.isPlainObject(t)||(t={}),i.isPlainObject(o)||(o={}),i.isNumber(n)||(n=void 0),i.isNonEmptyString(s)||(s=void 0),i.isFunction(a)||(a=void 0);return{config:r,override:o,cacheSize:n,prefix:s,experimentalParseClassName:a,theme:i.hasOwnProp(t,"theme")?t.theme:{},classGroups:i.hasOwnProp(t,"classGroups")?t.classGroups:{},conflictingClassGroupModifiers:i.hasOwnProp(t,"conflictingClassGroupModifiers")?t.conflictingClassGroupModifiers:{},conflictingClassGroups:i.hasOwnProp(t,"conflictingClassGroups")?t.conflictingClassGroups:{},orderSensitiveModifiers:i.hasOwnProp(t,"orderSensitiveModifiers")&&i.isNonEmptyArray(t.orderSensitiveModifiers)?t.orderSensitiveModifiers:[]}},a=r.getDefaultConfig(),c=(e={})=>{i.isPlainObject(e)||(e={});const{cacheSize:s,classGroups:t,config:o,conflictingClassGroupModifiers:c,conflictingClassGroups:l,override:f,prefix:p,theme:u,experimentalParseClassName:d}=n(e);return r.extendTailwindMerge({prefix:p??o.prefix,cacheSize:s||a.cacheSize,experimentalParseClassName:d,override:f,extend:{conflictingClassGroupModifiers:{...a.conflictingClassGroupModifiers,...c},theme:{...a.theme,...u},conflictingClassGroups:{...a.conflictingClassGroups,...l},classGroups:{...a.classGroups,...t,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...o.theme?.fontSize||{},...o.theme?.extend?.fontSize||{}}).map(e=>`text-${e}`)}}})},l=s.getDefaultConfig(),f=(e={})=>{i.isPlainObject(e)||(e={});const{cacheSize:r,classGroups:t,config:o,conflictingClassGroupModifiers:a,conflictingClassGroups:c,orderSensitiveModifiers:f,override:p,prefix:u,theme:d,experimentalParseClassName:m}=n(e);return s.extendTailwindMerge({prefix:u||o.prefix,cacheSize:r||l.cacheSize,experimentalParseClassName:m,override:p,extend:{conflictingClassGroupModifiers:{...l.conflictingClassGroupModifiers,...a},theme:{...l.theme,...d},conflictingClassGroups:{...l.conflictingClassGroups,...c},orderSensitiveModifiers:[...l.orderSensitiveModifiers,...f],classGroups:{...l.classGroups,...t,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...o.theme?.fontSize||{},...o.theme?.extend?.fontSize||{}}).map(e=>`text-${e}`)}}})},p=c(),u=f();exports.cnV3=(...e)=>p(o(...e)),exports.cnV4=(...e)=>u(o(...e)),exports.customCnV3=(e,...r)=>{if(!i.isFunction(e))throw new TypeError(`first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${i.getPreciseType(e)}\`.`);return e(o(...r))},exports.customCnV4=(e,...r)=>{if(!i.isFunction(e))throw new TypeError(`first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${i.getPreciseType(e)}\`.`);return e(o(...r))},exports.shouldForwardProp=i=>(e.assertIsArray(i,{message:({currentType:e,validType:i})=>`First parameter (\`props\`) must be of type \`${i}\`, but received: \`${e}\`.`}),e=>!i.map(e=>e.toString()).includes(e.toString())),exports.twMergeDefaultV3=c,exports.twMergeDefaultV4=f;
|