@dub/utils 0.0.27 → 0.0.29
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/chunk-2CBXK3IX.mjs +1 -0
- package/dist/chunk-2DN4J7N7.mjs +1 -0
- package/dist/chunk-2J47GIUG.mjs +1 -0
- package/dist/chunk-2JOG52JO.mjs +1 -0
- package/dist/chunk-2OJAP233.mjs +1 -0
- package/dist/chunk-2RCZ6Q6L.mjs +1 -0
- package/dist/chunk-2SICE2ZS.mjs +1 -0
- package/dist/chunk-2TURBZEL.mjs +1 -0
- package/dist/chunk-34MPJURK.mjs +1 -0
- package/dist/chunk-3B5DP3T4.mjs +1 -0
- package/dist/chunk-3BUV2ANI.mjs +1 -0
- package/dist/chunk-3C2XEUEU.mjs +1 -0
- package/dist/chunk-3OOMLTJU.mjs +1 -0
- package/dist/chunk-3PRW7SAO.mjs +1 -0
- package/dist/chunk-3UBZ222G.mjs +1 -0
- package/dist/chunk-4BN7BHOL.mjs +1 -0
- package/dist/chunk-4M6WGMF5.mjs +1 -0
- package/dist/chunk-4Q6OLEY4.mjs +1 -0
- package/dist/chunk-4VHMU2SN.mjs +1 -0
- package/dist/chunk-5FPTMLJS.mjs +1 -0
- package/dist/chunk-5IKS3MYC.mjs +1 -0
- package/dist/chunk-5KZBTOIK.mjs +1 -0
- package/dist/chunk-5PD4TPH7.mjs +1 -0
- package/dist/chunk-5SBJ6SVD.mjs +1 -0
- package/dist/chunk-5SU2MWLU.mjs +0 -0
- package/dist/chunk-5UMPAJJX.mjs +1 -0
- package/dist/chunk-5VUO5P2B.mjs +1 -0
- package/dist/chunk-6MXR5XLJ.mjs +1 -0
- package/dist/chunk-6N3NW2JB.mjs +1 -0
- package/dist/chunk-6Q2MCPZP.mjs +1 -0
- package/dist/chunk-6SBJPILW.mjs +1 -0
- package/dist/chunk-6TFUDH7S.mjs +1 -0
- package/dist/chunk-6XPTKHZD.mjs +1 -0
- package/dist/chunk-6ZJZL5CL.mjs +1 -0
- package/dist/chunk-76VXH2L6.mjs +1 -0
- package/dist/chunk-7CR3I247.mjs +1 -0
- package/dist/chunk-7OQSL4CI.mjs +2 -0
- package/dist/chunk-A4FADA67.mjs +1 -0
- package/dist/chunk-AI2STCLX.mjs +1 -0
- package/dist/chunk-AIRQ6LHD.mjs +1 -0
- package/dist/chunk-ARUFZ3N7.mjs +1 -0
- package/dist/chunk-B4R2MH5C.mjs +1 -0
- package/dist/chunk-BE3FE22D.mjs +1 -0
- package/dist/chunk-BF4VFD3F.mjs +1 -0
- package/dist/chunk-BMMTE4CL.mjs +1 -0
- package/dist/chunk-BQ3MQSVS.mjs +1 -0
- package/dist/chunk-C7CFYTBV.mjs +1 -0
- package/dist/chunk-CFRAJHSR.mjs +1 -0
- package/dist/chunk-CGKMNADD.mjs +1 -0
- package/dist/chunk-CLZKQYIL.mjs +1 -0
- package/dist/chunk-CWX6UGU4.mjs +1 -0
- package/dist/chunk-DHOWTHOI.mjs +3 -0
- package/dist/chunk-DNDRN3T4.mjs +1 -0
- package/dist/chunk-DWGAAIZ7.mjs +1 -0
- package/dist/chunk-DZ5GL4XN.mjs +1 -0
- package/dist/chunk-E67KYH6T.mjs +1 -0
- package/dist/chunk-EEEOYXQI.mjs +1 -0
- package/dist/chunk-EMGP7EVH.mjs +1 -0
- package/dist/chunk-EMO4MGOU.mjs +1 -0
- package/dist/chunk-F6C3QYRM.mjs +1 -0
- package/dist/chunk-FCP5HRN4.mjs +1 -0
- package/dist/chunk-FKZO6ZCE.mjs +1 -0
- package/dist/chunk-FLUV3ASQ.mjs +1 -0
- package/dist/chunk-FYXE2IZT.mjs +1 -0
- package/dist/chunk-GDTIZXZ3.mjs +1 -0
- package/dist/chunk-GLUCCYWG.mjs +1 -0
- package/dist/chunk-GQLUSHIW.mjs +1 -0
- package/dist/chunk-GSO7S5NU.mjs +1 -0
- package/dist/chunk-GTQBILTE.mjs +1 -0
- package/dist/chunk-GVB72EOZ.mjs +1 -0
- package/dist/chunk-H2EZ5ZIA.mjs +1 -0
- package/dist/chunk-H3CKT4E4.mjs +1 -0
- package/dist/chunk-HBI3VUWA.mjs +1 -0
- package/dist/chunk-HCAIWJBW.mjs +1 -0
- package/dist/chunk-HHZK2W6M.mjs +1 -0
- package/dist/chunk-HTKASIVN.mjs +1 -0
- package/dist/chunk-HX6TVXHR.mjs +1 -0
- package/dist/chunk-I5Y5DKPK.mjs +1 -0
- package/dist/chunk-IGSNFZ4Y.mjs +1 -0
- package/dist/chunk-IOI3AZRU.mjs +1 -0
- package/dist/chunk-IX5HENBH.mjs +1 -0
- package/dist/chunk-J6V4PKNC.mjs +1 -0
- package/dist/chunk-JD46NPAZ.mjs +1 -0
- package/dist/chunk-JGFJKSKU.mjs +1 -0
- package/dist/chunk-JQHV2HJR.mjs +1 -0
- package/dist/chunk-JUE3IN3O.mjs +1 -0
- package/dist/chunk-KKQDG22H.mjs +1 -0
- package/dist/chunk-KKUAJ54V.mjs +1 -0
- package/dist/chunk-KL7VCF4Y.mjs +1 -0
- package/dist/chunk-L2SFRDQT.mjs +1 -0
- package/dist/chunk-L7JSRS6V.mjs +1 -0
- package/dist/chunk-LBQJ5TZQ.mjs +1 -0
- package/dist/chunk-LKZUZTIO.mjs +1 -0
- package/dist/chunk-LPIDPOIS.mjs +1 -0
- package/dist/chunk-LREWF6LN.mjs +1 -0
- package/dist/chunk-LVZK27B4.mjs +1 -0
- package/dist/chunk-LXJVNY3R.mjs +1 -0
- package/dist/chunk-M36MRN4N.mjs +1 -0
- package/dist/chunk-MPU6JRPV.mjs +1 -0
- package/dist/chunk-MT3GLHZG.mjs +1 -0
- package/dist/chunk-MW23UGKA.mjs +1 -0
- package/dist/chunk-MWIL2V7E.mjs +1 -0
- package/dist/chunk-NDZIEH7M.mjs +1 -0
- package/dist/chunk-NEIHTFSW.mjs +1 -0
- package/dist/chunk-NI6IFTE4.mjs +1 -0
- package/dist/chunk-NQUREBTN.mjs +1 -0
- package/dist/chunk-NZ6LIVRY.mjs +1 -0
- package/dist/chunk-OANHZJ6X.mjs +1 -0
- package/dist/chunk-OBU4KABJ.mjs +1 -0
- package/dist/chunk-OQD4PMKZ.mjs +1 -0
- package/dist/chunk-OQGZM33B.mjs +1 -0
- package/dist/chunk-OSU5S2YT.mjs +3 -0
- package/dist/chunk-OWYWG4M6.mjs +1 -0
- package/dist/chunk-PCCGH2UI.mjs +1 -0
- package/dist/chunk-PEPVOMPB.mjs +1 -0
- package/dist/chunk-PUFZASP4.mjs +1 -0
- package/dist/chunk-QGTFY7PK.mjs +1 -0
- package/dist/chunk-QQFYILG6.mjs +1 -0
- package/dist/chunk-QU7V46PO.mjs +1 -0
- package/dist/chunk-QYPFWXDY.mjs +1 -0
- package/dist/chunk-QYTC2VMO.mjs +1 -0
- package/dist/chunk-R3RG2UW3.mjs +1 -0
- package/dist/chunk-RDVXOO55.mjs +1 -0
- package/dist/chunk-RQYMBQ7I.mjs +1 -0
- package/dist/chunk-S62WENCB.mjs +1 -0
- package/dist/chunk-SKVYWWBC.mjs +3 -0
- package/dist/chunk-SL5QAJSF.mjs +1 -0
- package/dist/chunk-SPSUTBZ7.mjs +0 -0
- package/dist/chunk-SQXHJWOE.mjs +1 -0
- package/dist/chunk-SYT2IXG6.mjs +1 -0
- package/dist/chunk-T3EPQH24.mjs +1 -0
- package/dist/chunk-TLVFY24T.mjs +1 -0
- package/dist/chunk-TVYDH6QM.mjs +1 -0
- package/dist/chunk-TXEDXHC5.mjs +1 -0
- package/dist/chunk-UAGJDHMS.mjs +1 -0
- package/dist/chunk-UBCCNLBS.mjs +1 -0
- package/dist/chunk-UD2ICHSZ.mjs +1 -0
- package/dist/chunk-UHFP5VHY.mjs +1 -0
- package/dist/chunk-ULWVKJS4.mjs +1 -0
- package/dist/chunk-UQ5D3U6Z.mjs +1 -0
- package/dist/chunk-UUWTKITJ.mjs +1 -0
- package/dist/chunk-V2RYRJWZ.mjs +1 -0
- package/dist/chunk-VCVRICBE.mjs +1 -0
- package/dist/chunk-VEUP2DC6.mjs +1 -0
- package/dist/chunk-VJZP4EP5.mjs +1 -0
- package/dist/chunk-VOGFN73W.mjs +1 -0
- package/dist/chunk-VT32LSIK.mjs +1 -0
- package/dist/chunk-VTLX43W7.mjs +1 -0
- package/dist/chunk-VZYPOBKB.mjs +1 -0
- package/dist/chunk-W5LUKKPM.mjs +1 -0
- package/dist/chunk-W7MK4ZQS.mjs +1 -0
- package/dist/chunk-WCOSO55V.mjs +1 -0
- package/dist/chunk-WCUHRXGZ.mjs +1 -0
- package/dist/chunk-WE5LUVZO.mjs +1 -0
- package/dist/chunk-WEC6YZEP.mjs +1 -0
- package/dist/chunk-WJXI5YEO.mjs +1 -0
- package/dist/chunk-XCPPFNWE.mjs +1 -0
- package/dist/chunk-XEJNQ2MU.mjs +1 -0
- package/dist/chunk-XLREFEL6.mjs +1 -0
- package/dist/chunk-XP4JQI4P.mjs +1 -0
- package/dist/chunk-XWSEDYR7.mjs +1 -0
- package/dist/chunk-YUMUNL66.mjs +1 -0
- package/dist/chunk-YXHGPHL2.mjs +1 -0
- package/dist/chunk-YY4NGU5S.mjs +1 -0
- package/dist/chunk-ZBBENF7Y.mjs +1 -0
- package/dist/chunk-ZECUYKGD.mjs +1 -0
- package/dist/chunk-ZJKRLIJQ.mjs +1 -0
- package/dist/chunk-ZM4JP5B2.mjs +1 -0
- package/dist/chunk-ZQST7SKH.mjs +1 -0
- package/dist/constants/cctlds.d.ts +1 -1
- package/dist/constants/cctlds.mjs +1 -1
- package/dist/constants/countries.d.ts +1 -1
- package/dist/constants/countries.mjs +1 -1
- package/dist/constants/domains.d.ts +4 -0
- package/dist/constants/domains.mjs +1 -0
- package/dist/constants/framer-motion.d.ts +58 -0
- package/dist/constants/framer-motion.mjs +1 -0
- package/dist/constants/index.d.ts +132 -121
- package/dist/constants/index.mjs +1 -1
- package/dist/constants/layout.d.ts +11 -0
- package/dist/constants/layout.mjs +1 -0
- package/dist/constants/localhost.d.ts +10 -0
- package/dist/constants/localhost.mjs +1 -0
- package/dist/constants/middleware.d.ts +21 -0
- package/dist/constants/middleware.mjs +1 -0
- package/dist/constants/misc.d.ts +21 -0
- package/dist/constants/misc.mjs +1 -0
- package/dist/constants/saml.d.ts +14 -0
- package/dist/constants/saml.mjs +1 -0
- package/dist/functions/capitalize.d.ts +3 -0
- package/dist/functions/capitalize.mjs +1 -0
- package/dist/functions/chunk.d.ts +3 -0
- package/dist/functions/chunk.mjs +1 -0
- package/dist/functions/cn.d.ts +5 -0
- package/dist/functions/cn.mjs +1 -0
- package/dist/functions/construct-metadata.d.ts +11 -0
- package/dist/functions/construct-metadata.mjs +1 -0
- package/dist/functions/datetime.d.ts +11 -0
- package/dist/functions/datetime.mjs +1 -0
- package/dist/functions/deep-equal.d.ts +4 -0
- package/dist/functions/deep-equal.mjs +1 -0
- package/dist/functions/domains.d.ts +10 -0
- package/dist/functions/domains.mjs +1 -0
- package/dist/functions/fetch-with-timeout.d.ts +3 -0
- package/dist/functions/fetch-with-timeout.mjs +1 -0
- package/dist/functions/fetcher.d.ts +3 -0
- package/dist/functions/fetcher.mjs +1 -0
- package/dist/functions/hash.d.ts +3 -0
- package/dist/functions/hash.mjs +1 -0
- package/dist/functions/index.d.ts +21 -0
- package/dist/functions/index.mjs +1 -0
- package/dist/functions/is-iframeable.d.ts +6 -0
- package/dist/functions/is-iframeable.mjs +1 -0
- package/dist/functions/link-constructor.d.ts +9 -0
- package/dist/functions/link-constructor.mjs +1 -0
- package/dist/functions/log.d.ts +7 -0
- package/dist/functions/log.mjs +1 -0
- package/dist/functions/misc.d.ts +115 -0
- package/dist/functions/misc.mjs +1 -0
- package/dist/functions/nanoid.d.ts +3 -0
- package/dist/functions/nanoid.mjs +1 -0
- package/dist/functions/nformatter.d.ts +6 -0
- package/dist/functions/nformatter.mjs +1 -0
- package/dist/functions/time-ago.d.ts +5 -0
- package/dist/functions/time-ago.mjs +1 -0
- package/dist/functions/truncate.d.ts +3 -0
- package/dist/functions/truncate.mjs +1 -0
- package/dist/functions/urls.d.ts +13 -0
- package/dist/functions/urls.mjs +1 -0
- package/dist/index.d.ts +31 -181
- package/dist/index.mjs +1 -1
- package/dist/is-iframeable-4cf55b9f.d.ts +6 -0
- package/dist/url-to-deeplink-ac84c7cb.d.ts +6 -0
- package/package.json +3 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { capitalize } from './capitalize.js';
|
|
2
|
+
export { chunk } from './chunk.js';
|
|
3
|
+
export { cn } from './cn.js';
|
|
4
|
+
export { constructMetadata } from './construct-metadata.js';
|
|
5
|
+
export { formatDate, getAdjustedBillingCycleStart, getBillingStartDate, getDateTimeLocal, getFirstAndLastDay, getLastDayOfMonth } from './datetime.js';
|
|
6
|
+
export { deepEqual } from './deep-equal.js';
|
|
7
|
+
export { generateDomainFromName, getApexDomain, getDomainWithoutWWW, getSubdomain, isDubDomain, validDomainRegex, validKeyRegex, validSlugRegex } from './domains.js';
|
|
8
|
+
export { fetchWithTimeout } from './fetch-with-timeout.js';
|
|
9
|
+
export { fetcher } from './fetcher.js';
|
|
10
|
+
export { generateMD5Hash } from './hash.js';
|
|
11
|
+
export { isIframeable } from './is-iframeable.js';
|
|
12
|
+
export { linkConstructor } from './link-constructor.js';
|
|
13
|
+
export { log } from './log.js';
|
|
14
|
+
export { getPlanFromPriceId } from './misc.js';
|
|
15
|
+
export { nanoid } from './nanoid.js';
|
|
16
|
+
export { nFormatter } from './nformatter.js';
|
|
17
|
+
export { timeAgo } from './time-ago.js';
|
|
18
|
+
export { truncate } from './truncate.js';
|
|
19
|
+
export { constructURLFromUTMParams, getParamsFromURL, getSearchParams, getUrlFromString, getUrlWithoutUTMParams, isValidUrl, paramsMetadata } from './urls.js';
|
|
20
|
+
import 'clsx';
|
|
21
|
+
import 'next';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-SPSUTBZ7.mjs";import{a as F}from"../chunk-PEPVOMPB.mjs";import{a as G}from"../chunk-6Q2MCPZP.mjs";import{a as H}from"../chunk-OWYWG4M6.mjs";import{a as I}from"../chunk-I5Y5DKPK.mjs";import{a as J}from"../chunk-MPU6JRPV.mjs";import{a as K}from"../chunk-ZJKRLIJQ.mjs";import{a as k}from"../chunk-ZECUYKGD.mjs";import{a as s,b as t,c as u,d as v,e as w,f as x,g as y,h as z}from"../chunk-VEUP2DC6.mjs";import{a as l,b as m,c as n,d as o,e as p,f as q,g as r}from"../chunk-UUWTKITJ.mjs";import{a as A}from"../chunk-EMO4MGOU.mjs";import{a as B}from"../chunk-6XPTKHZD.mjs";import{a as C}from"../chunk-XWSEDYR7.mjs";import{a as D}from"../chunk-3BUV2ANI.mjs";import{a as E}from"../chunk-5PD4TPH7.mjs";import{a}from"../chunk-GTQBILTE.mjs";import{a as b}from"../chunk-2OJAP233.mjs";import{a as c}from"../chunk-NEIHTFSW.mjs";import{a as d}from"../chunk-2TURBZEL.mjs";import{a as e,b as f,c as g,d as h,e as i,f as j}from"../chunk-LXJVNY3R.mjs";import"../chunk-VTLX43W7.mjs";import"../chunk-5VUO5P2B.mjs";import"../chunk-5FPTMLJS.mjs";import"../chunk-PUFZASP4.mjs";import"../chunk-YUMUNL66.mjs";import"../chunk-2RCZ6Q6L.mjs";import"../chunk-SYT2IXG6.mjs";import"../chunk-2SICE2ZS.mjs";import"../chunk-WE5LUVZO.mjs";import"../chunk-FYXE2IZT.mjs";export{a as capitalize,b as chunk,c as cn,d as constructMetadata,p as constructURLFromUTMParams,k as deepEqual,A as fetchWithTimeout,B as fetcher,f as formatDate,s as generateDomainFromName,C as generateMD5Hash,i as getAdjustedBillingCycleStart,x as getApexDomain,j as getBillingStartDate,e as getDateTimeLocal,y as getDomainWithoutWWW,g as getFirstAndLastDay,h as getLastDayOfMonth,o as getParamsFromURL,G as getPlanFromPriceId,n as getSearchParams,w as getSubdomain,m as getUrlFromString,r as getUrlWithoutUTMParams,z as isDubDomain,D as isIframeable,l as isValidUrl,E as linkConstructor,F as log,I as nFormatter,H as nanoid,q as paramsMetadata,J as timeAgo,K as truncate,t as validDomainRegex,u as validKeyRegex,v as validSlugRegex};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-3BUV2ANI.mjs";export{a as isIframeable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-5PD4TPH7.mjs";export{a as linkConstructor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-PEPVOMPB.mjs";export{a as log};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
declare const getPlanFromPriceId: (priceId: string) => {
|
|
2
|
+
name: string;
|
|
3
|
+
tagline: string;
|
|
4
|
+
price: {
|
|
5
|
+
monthly: number;
|
|
6
|
+
yearly: number;
|
|
7
|
+
ids?: undefined;
|
|
8
|
+
};
|
|
9
|
+
limits: {
|
|
10
|
+
links: number;
|
|
11
|
+
clicks: number;
|
|
12
|
+
domains: number;
|
|
13
|
+
tags: number;
|
|
14
|
+
users: number;
|
|
15
|
+
};
|
|
16
|
+
colors: {
|
|
17
|
+
bg: string;
|
|
18
|
+
text: string;
|
|
19
|
+
};
|
|
20
|
+
cta: {
|
|
21
|
+
text: string;
|
|
22
|
+
href: string;
|
|
23
|
+
color: string;
|
|
24
|
+
shortText?: undefined;
|
|
25
|
+
};
|
|
26
|
+
featureTitle: string;
|
|
27
|
+
features: ({
|
|
28
|
+
text: string;
|
|
29
|
+
footnote?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
text: string;
|
|
32
|
+
footnote: string;
|
|
33
|
+
} | {
|
|
34
|
+
text: string;
|
|
35
|
+
footnote: {
|
|
36
|
+
title: string;
|
|
37
|
+
cta: string;
|
|
38
|
+
href: string;
|
|
39
|
+
};
|
|
40
|
+
})[];
|
|
41
|
+
link?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
name: string;
|
|
44
|
+
tagline: string;
|
|
45
|
+
link: string;
|
|
46
|
+
price: {
|
|
47
|
+
monthly: number;
|
|
48
|
+
yearly: number;
|
|
49
|
+
ids: string[];
|
|
50
|
+
};
|
|
51
|
+
limits: {
|
|
52
|
+
links: number;
|
|
53
|
+
clicks: number;
|
|
54
|
+
domains: number;
|
|
55
|
+
tags: number;
|
|
56
|
+
users: number;
|
|
57
|
+
};
|
|
58
|
+
colors: {
|
|
59
|
+
bg: string;
|
|
60
|
+
text: string;
|
|
61
|
+
};
|
|
62
|
+
cta: {
|
|
63
|
+
text: string;
|
|
64
|
+
shortText: string;
|
|
65
|
+
href: string;
|
|
66
|
+
color: string;
|
|
67
|
+
};
|
|
68
|
+
featureTitle: string;
|
|
69
|
+
features: ({
|
|
70
|
+
text: string;
|
|
71
|
+
footnote?: undefined;
|
|
72
|
+
} | {
|
|
73
|
+
text: string;
|
|
74
|
+
footnote: string;
|
|
75
|
+
} | {
|
|
76
|
+
text: string;
|
|
77
|
+
footnote: {
|
|
78
|
+
title: string;
|
|
79
|
+
cta: string;
|
|
80
|
+
href: string;
|
|
81
|
+
};
|
|
82
|
+
})[];
|
|
83
|
+
} | {
|
|
84
|
+
name: string;
|
|
85
|
+
tagline: string;
|
|
86
|
+
link: string;
|
|
87
|
+
price: {
|
|
88
|
+
monthly: null;
|
|
89
|
+
yearly: null;
|
|
90
|
+
ids?: undefined;
|
|
91
|
+
};
|
|
92
|
+
limits: {
|
|
93
|
+
links: null;
|
|
94
|
+
clicks: null;
|
|
95
|
+
domains: null;
|
|
96
|
+
tags?: undefined;
|
|
97
|
+
users?: undefined;
|
|
98
|
+
};
|
|
99
|
+
colors: {
|
|
100
|
+
bg: string;
|
|
101
|
+
text: string;
|
|
102
|
+
};
|
|
103
|
+
cta: {
|
|
104
|
+
text: string;
|
|
105
|
+
href: string;
|
|
106
|
+
color: string;
|
|
107
|
+
shortText?: undefined;
|
|
108
|
+
};
|
|
109
|
+
featureTitle: string;
|
|
110
|
+
features: {
|
|
111
|
+
text: string;
|
|
112
|
+
}[];
|
|
113
|
+
} | null;
|
|
114
|
+
|
|
115
|
+
export { getPlanFromPriceId };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-6Q2MCPZP.mjs";import"../chunk-VTLX43W7.mjs";import"../chunk-5VUO5P2B.mjs";import"../chunk-5FPTMLJS.mjs";import"../chunk-PUFZASP4.mjs";import"../chunk-YUMUNL66.mjs";import"../chunk-2RCZ6Q6L.mjs";import"../chunk-SYT2IXG6.mjs";import"../chunk-2SICE2ZS.mjs";import"../chunk-WE5LUVZO.mjs";import"../chunk-FYXE2IZT.mjs";export{a as getPlanFromPriceId};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-OWYWG4M6.mjs";export{a as nanoid};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-I5Y5DKPK.mjs";export{a as nFormatter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-MPU6JRPV.mjs";export{a as timeAgo};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-ZJKRLIJQ.mjs";export{a as truncate};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const isValidUrl: (url: string) => boolean;
|
|
2
|
+
declare const getUrlFromString: (str: string) => string | null | undefined;
|
|
3
|
+
declare const getSearchParams: (url: string) => Record<string, string>;
|
|
4
|
+
declare const getParamsFromURL: (url: string) => Record<string, string>;
|
|
5
|
+
declare const constructURLFromUTMParams: (url: string, utmParams: Record<string, string>) => string;
|
|
6
|
+
declare const paramsMetadata: {
|
|
7
|
+
display: string;
|
|
8
|
+
key: string;
|
|
9
|
+
examples: string;
|
|
10
|
+
}[];
|
|
11
|
+
declare const getUrlWithoutUTMParams: (url: string) => string;
|
|
12
|
+
|
|
13
|
+
export { constructURLFromUTMParams, getParamsFromURL, getSearchParams, getUrlFromString, getUrlWithoutUTMParams, isValidUrl, paramsMetadata };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../chunk-UUWTKITJ.mjs";export{e as constructURLFromUTMParams,d as getParamsFromURL,c as getSearchParams,b as getUrlFromString,g as getUrlWithoutUTMParams,a as isValidUrl,f as paramsMetadata};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,181 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}) => string;
|
|
33
|
-
declare const getDateTimeLocal: (timestamp?: Date) => string;
|
|
34
|
-
declare const formatDate: (dateString: string) => string;
|
|
35
|
-
declare const getFirstAndLastDay: (day: number) => {
|
|
36
|
-
firstDay: Date;
|
|
37
|
-
lastDay: Date;
|
|
38
|
-
};
|
|
39
|
-
declare const getLastDayOfMonth: () => number;
|
|
40
|
-
declare const getAdjustedBillingCycleStart: (billingCycleStart: number) => number;
|
|
41
|
-
declare const getBillingStartDate: (billingCycleStart: number) => Date;
|
|
42
|
-
declare const getPlanFromPriceId: (priceId: string) => {
|
|
43
|
-
name: string;
|
|
44
|
-
tagline: string;
|
|
45
|
-
price: {
|
|
46
|
-
monthly: number;
|
|
47
|
-
yearly: number;
|
|
48
|
-
ids?: undefined;
|
|
49
|
-
};
|
|
50
|
-
limits: {
|
|
51
|
-
links: number;
|
|
52
|
-
clicks: number;
|
|
53
|
-
domains: number;
|
|
54
|
-
tags: number;
|
|
55
|
-
users: number;
|
|
56
|
-
};
|
|
57
|
-
colors: {
|
|
58
|
-
bg: string;
|
|
59
|
-
text: string;
|
|
60
|
-
};
|
|
61
|
-
cta: {
|
|
62
|
-
text: string;
|
|
63
|
-
href: string;
|
|
64
|
-
color: string;
|
|
65
|
-
shortText?: undefined;
|
|
66
|
-
};
|
|
67
|
-
featureTitle: string;
|
|
68
|
-
features: ({
|
|
69
|
-
text: string;
|
|
70
|
-
footnote?: undefined;
|
|
71
|
-
} | {
|
|
72
|
-
text: string;
|
|
73
|
-
footnote: string;
|
|
74
|
-
} | {
|
|
75
|
-
text: string;
|
|
76
|
-
footnote: {
|
|
77
|
-
title: string;
|
|
78
|
-
cta: string;
|
|
79
|
-
href: string;
|
|
80
|
-
};
|
|
81
|
-
})[];
|
|
82
|
-
} | {
|
|
83
|
-
name: string;
|
|
84
|
-
tagline: string;
|
|
85
|
-
price: {
|
|
86
|
-
monthly: number;
|
|
87
|
-
yearly: number;
|
|
88
|
-
ids: string[];
|
|
89
|
-
};
|
|
90
|
-
limits: {
|
|
91
|
-
links: number;
|
|
92
|
-
clicks: number;
|
|
93
|
-
domains: number;
|
|
94
|
-
tags: number;
|
|
95
|
-
users: number;
|
|
96
|
-
};
|
|
97
|
-
colors: {
|
|
98
|
-
bg: string;
|
|
99
|
-
text: string;
|
|
100
|
-
};
|
|
101
|
-
cta: {
|
|
102
|
-
text: string;
|
|
103
|
-
shortText: string;
|
|
104
|
-
href: string;
|
|
105
|
-
color: string;
|
|
106
|
-
};
|
|
107
|
-
featureTitle: string;
|
|
108
|
-
features: ({
|
|
109
|
-
text: string;
|
|
110
|
-
footnote?: undefined;
|
|
111
|
-
} | {
|
|
112
|
-
text: string;
|
|
113
|
-
footnote: string;
|
|
114
|
-
} | {
|
|
115
|
-
text: string;
|
|
116
|
-
footnote: {
|
|
117
|
-
title: string;
|
|
118
|
-
cta: string;
|
|
119
|
-
href: string;
|
|
120
|
-
};
|
|
121
|
-
})[];
|
|
122
|
-
} | {
|
|
123
|
-
name: string;
|
|
124
|
-
price: {
|
|
125
|
-
monthly: null;
|
|
126
|
-
yearly: null;
|
|
127
|
-
ids?: undefined;
|
|
128
|
-
};
|
|
129
|
-
limits: {
|
|
130
|
-
links: null;
|
|
131
|
-
clicks: null;
|
|
132
|
-
domains: null;
|
|
133
|
-
tags?: undefined;
|
|
134
|
-
users?: undefined;
|
|
135
|
-
};
|
|
136
|
-
colors: {
|
|
137
|
-
bg: string;
|
|
138
|
-
text: string;
|
|
139
|
-
};
|
|
140
|
-
cta: {
|
|
141
|
-
text: string;
|
|
142
|
-
href: string;
|
|
143
|
-
color: string;
|
|
144
|
-
shortText?: undefined;
|
|
145
|
-
};
|
|
146
|
-
featureTitle: string;
|
|
147
|
-
features: {
|
|
148
|
-
text: string;
|
|
149
|
-
}[];
|
|
150
|
-
tagline?: undefined;
|
|
151
|
-
} | null;
|
|
152
|
-
declare const generateDomainFromName: (name: string) => string;
|
|
153
|
-
declare const validDomainRegex: RegExp;
|
|
154
|
-
declare const validKeyRegex: RegExp;
|
|
155
|
-
declare const validSlugRegex: RegExp;
|
|
156
|
-
declare const getSubdomain: (name: string, apexName: string) => string | null;
|
|
157
|
-
declare const getApexDomain: (url: string) => string;
|
|
158
|
-
declare const isValidUrl: (url: string) => boolean;
|
|
159
|
-
declare const getUrlFromString: (str: string) => string | null | undefined;
|
|
160
|
-
declare const getDomainWithoutWWW: (url: string) => string | null | undefined;
|
|
161
|
-
declare const isDubDomain: (domain: string) => boolean;
|
|
162
|
-
declare const getSearchParams: (url: string) => Record<string, string>;
|
|
163
|
-
declare const truncate: (str: string | null, length: number) => string | null;
|
|
164
|
-
declare const getParamsFromURL: (url: string) => Record<string, string>;
|
|
165
|
-
declare const constructURLFromUTMParams: (url: string, utmParams: Record<string, string>) => string;
|
|
166
|
-
declare const paramsMetadata: {
|
|
167
|
-
display: string;
|
|
168
|
-
key: string;
|
|
169
|
-
examples: string;
|
|
170
|
-
}[];
|
|
171
|
-
declare const getUrlWithoutUTMParams: (url: string) => string;
|
|
172
|
-
declare function generateMD5Hash(message: string): Promise<string>;
|
|
173
|
-
declare const log: ({ message, type, mention, }: {
|
|
174
|
-
message: string;
|
|
175
|
-
type: "cron" | "links";
|
|
176
|
-
mention?: boolean | undefined;
|
|
177
|
-
}) => Promise<Response | undefined>;
|
|
178
|
-
type DeepEqual = (obj1: Record<string, any>, obj2: Record<string, any>) => boolean;
|
|
179
|
-
declare const deepEqual: DeepEqual;
|
|
180
|
-
|
|
181
|
-
export { capitalize, chunk, cn, constructMetadata, constructURLFromUTMParams, deepEqual, fetcher, formatDate, generateDomainFromName, generateMD5Hash, getAdjustedBillingCycleStart, getApexDomain, getBillingStartDate, getDateTimeLocal, getDomainWithoutWWW, getFirstAndLastDay, getLastDayOfMonth, getParamsFromURL, getPlanFromPriceId, getSearchParams, getSubdomain, getUrlFromString, getUrlWithoutUTMParams, isDubDomain, isValidUrl, linkConstructor, log, nFormatter, nanoid, paramsMetadata, timeAgo, truncate, validDomainRegex, validKeyRegex, validSlugRegex };
|
|
1
|
+
export { ADMIN_HOSTNAMES, API_DOMAIN, API_HOSTNAMES, APP_DOMAIN, APP_DOMAIN_WITH_NGROK, APP_HOSTNAMES, APP_NAME, DEMO_LINK_ID, DUB_DOMAINS, DUB_LOGO, DUB_PROJECT_ID, DUB_THUMBNAIL, FREE_PLAN, FREE_PROJECTS_LIMIT, HOME_DOMAIN, LEGAL_PROJECT_ID, LEGAL_USER_ID, PLANS, SELF_SERVE_PAID_PLANS, SHORT_DOMAIN } from './constants/index.js';
|
|
2
|
+
export { capitalize } from './functions/capitalize.js';
|
|
3
|
+
export { chunk } from './functions/chunk.js';
|
|
4
|
+
export { cn } from './functions/cn.js';
|
|
5
|
+
export { constructMetadata } from './functions/construct-metadata.js';
|
|
6
|
+
export { formatDate, getAdjustedBillingCycleStart, getBillingStartDate, getDateTimeLocal, getFirstAndLastDay, getLastDayOfMonth } from './functions/datetime.js';
|
|
7
|
+
export { deepEqual } from './functions/deep-equal.js';
|
|
8
|
+
export { generateDomainFromName, getApexDomain, getDomainWithoutWWW, getSubdomain, isDubDomain, validDomainRegex, validKeyRegex, validSlugRegex } from './functions/domains.js';
|
|
9
|
+
export { fetchWithTimeout } from './functions/fetch-with-timeout.js';
|
|
10
|
+
export { fetcher } from './functions/fetcher.js';
|
|
11
|
+
export { generateMD5Hash } from './functions/hash.js';
|
|
12
|
+
export { isIframeable } from './functions/is-iframeable.js';
|
|
13
|
+
export { linkConstructor } from './functions/link-constructor.js';
|
|
14
|
+
export { log } from './functions/log.js';
|
|
15
|
+
export { getPlanFromPriceId } from './functions/misc.js';
|
|
16
|
+
export { nanoid } from './functions/nanoid.js';
|
|
17
|
+
export { nFormatter } from './functions/nformatter.js';
|
|
18
|
+
export { timeAgo } from './functions/time-ago.js';
|
|
19
|
+
export { truncate } from './functions/truncate.js';
|
|
20
|
+
export { constructURLFromUTMParams, getParamsFromURL, getSearchParams, getUrlFromString, getUrlWithoutUTMParams, isValidUrl, paramsMetadata } from './functions/urls.js';
|
|
21
|
+
export { ccTLDs } from './constants/cctlds.js';
|
|
22
|
+
export { COUNTRIES } from './constants/countries.js';
|
|
23
|
+
export { SECOND_LEVEL_DOMAINS, SPECIAL_APEX_DOMAINS } from './constants/domains.js';
|
|
24
|
+
export { FADE_IN_ANIMATION_SETTINGS, FRAMER_MOTION_LIST_ITEM_VARIANTS, STAGGER_CHILD_VARIANTS, SWIPE_REVEAL_ANIMATION_SETTINGS } from './constants/framer-motion.js';
|
|
25
|
+
export { ALL_TOOLS, COMPARE_PAGES, HIDE_BACKGROUND_SEGMENTS } from './constants/layout.js';
|
|
26
|
+
export { LOCALHOST_GEO_DATA, LOCALHOST_IP } from './constants/localhost.js';
|
|
27
|
+
export { DEFAULT_REDIRECTS, DUB_HEADERS } from './constants/middleware.js';
|
|
28
|
+
export { DEFAULT_LINK_PROPS, GOOGLE_FAVICON_URL, PAGINATION_LIMIT } from './constants/misc.js';
|
|
29
|
+
export { SAML_PROVIDERS } from './constants/saml.js';
|
|
30
|
+
import 'clsx';
|
|
31
|
+
import 'next';
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import"./chunk-SPSUTBZ7.mjs";import{a as lo}from"./chunk-PEPVOMPB.mjs";import{a as no}from"./chunk-6Q2MCPZP.mjs";import{a as qo}from"./chunk-OWYWG4M6.mjs";import{a as so}from"./chunk-I5Y5DKPK.mjs";import{a as uo}from"./chunk-MPU6JRPV.mjs";import{a as vo}from"./chunk-ZJKRLIJQ.mjs";import{a as X}from"./chunk-ZECUYKGD.mjs";import{a as fo,b as mo,c as po,d as to,e as xo,f as ao,g as bo,h as co}from"./chunk-VEUP2DC6.mjs";import{a as Y,b as Z,c as _,d as $,e as oo,f as ro,g as eo}from"./chunk-UUWTKITJ.mjs";import{a as go}from"./chunk-EMO4MGOU.mjs";import{a as ho}from"./chunk-6XPTKHZD.mjs";import{a as io}from"./chunk-XWSEDYR7.mjs";import{a as jo}from"./chunk-3BUV2ANI.mjs";import{a as ko}from"./chunk-5PD4TPH7.mjs";import{a as N}from"./chunk-GTQBILTE.mjs";import{a as O}from"./chunk-2OJAP233.mjs";import{a as P}from"./chunk-NEIHTFSW.mjs";import{a as Q}from"./chunk-2TURBZEL.mjs";import{a as R,b as S,c as T,d as U,e as V,f as W}from"./chunk-LXJVNY3R.mjs";import{a as n,b as q,c as s,d as u,e as w,f as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G,o as H,p as I,q as J,r as K,s as L,t as M}from"./chunk-VTLX43W7.mjs";import{a as h,b as i}from"./chunk-5VUO5P2B.mjs";import{a as j,b as k,c as l}from"./chunk-5FPTMLJS.mjs";import{a as v}from"./chunk-PUFZASP4.mjs";import{a as o}from"./chunk-YUMUNL66.mjs";import{a as r}from"./chunk-2RCZ6Q6L.mjs";import{a as e,b as f}from"./chunk-SYT2IXG6.mjs";import{a as m,b as p,c as t,d as x}from"./chunk-2SICE2ZS.mjs";import{a,b,c}from"./chunk-WE5LUVZO.mjs";import{a as d,b as g}from"./chunk-FYXE2IZT.mjs";export{F as ADMIN_HOSTNAMES,b as ALL_TOOLS,E as API_DOMAIN,D as API_HOSTNAMES,B as APP_DOMAIN,C as APP_DOMAIN_WITH_NGROK,A as APP_HOSTNAMES,w as APP_NAME,c as COMPARE_PAGES,r as COUNTRIES,j as DEFAULT_LINK_PROPS,h as DEFAULT_REDIRECTS,I as DEMO_LINK_ID,M as DUB_DOMAINS,i as DUB_HEADERS,G as DUB_LOGO,J as DUB_PROJECT_ID,H as DUB_THUMBNAIL,x as FADE_IN_ANIMATION_SETTINGS,m as FRAMER_MOTION_LIST_ITEM_VARIANTS,q as FREE_PLAN,u as FREE_PROJECTS_LIMIT,k as GOOGLE_FAVICON_URL,a as HIDE_BACKGROUND_SEGMENTS,z as HOME_DOMAIN,K as LEGAL_PROJECT_ID,L as LEGAL_USER_ID,d as LOCALHOST_GEO_DATA,g as LOCALHOST_IP,l as PAGINATION_LIMIT,n as PLANS,v as SAML_PROVIDERS,e as SECOND_LEVEL_DOMAINS,s as SELF_SERVE_PAID_PLANS,y as SHORT_DOMAIN,f as SPECIAL_APEX_DOMAINS,p as STAGGER_CHILD_VARIANTS,t as SWIPE_REVEAL_ANIMATION_SETTINGS,N as capitalize,o as ccTLDs,O as chunk,P as cn,Q as constructMetadata,oo as constructURLFromUTMParams,X as deepEqual,go as fetchWithTimeout,ho as fetcher,S as formatDate,fo as generateDomainFromName,io as generateMD5Hash,V as getAdjustedBillingCycleStart,ao as getApexDomain,W as getBillingStartDate,R as getDateTimeLocal,bo as getDomainWithoutWWW,T as getFirstAndLastDay,U as getLastDayOfMonth,$ as getParamsFromURL,no as getPlanFromPriceId,_ as getSearchParams,xo as getSubdomain,Z as getUrlFromString,eo as getUrlWithoutUTMParams,co as isDubDomain,jo as isIframeable,Y as isValidUrl,ko as linkConstructor,lo as log,so as nFormatter,qo as nanoid,ro as paramsMetadata,uo as timeAgo,vo as truncate,mo as validDomainRegex,po as validKeyRegex,to as validSlugRegex};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dub/utils",
|
|
3
3
|
"description": "Utility functions and constants for Dub.co",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.29",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@sindresorhus/slugify": "^2.2.1",
|
|
34
|
-
"clsx": "^
|
|
34
|
+
"clsx": "^2.1.0",
|
|
35
35
|
"ms": "^2.1.3",
|
|
36
36
|
"nanoid": "^5.0.1",
|
|
37
|
-
"tailwind-merge": "^
|
|
37
|
+
"tailwind-merge": "^2.2.1"
|
|
38
38
|
},
|
|
39
39
|
"author": "Steven Tey <stevensteel97@gmail.com>",
|
|
40
40
|
"homepage": "https://dub.co",
|