@atom-learning/components 3.27.0-beta.1 → 3.27.0-beta.2
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o=e=>typeof window>"u"||!e?!1:(/^https?:\/\//.test(e)||/^tel?:/.test(e)||/^mailto?:/.test(e))&&new URL(e).origin!==window.location.origin,r=e=>o(e)?{target:"_blank",rel:"noopener noreferrer"}:{};export{r as getExternalAnchorProps,o as isExternalUrl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/utilities/uri/index.ts"],"sourcesContent":["export const isExternalUrl = (url?: string) => {\n if (typeof window === 'undefined' || !url) return false\n\n const isAbsoluteUrl
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utilities/uri/index.ts"],"sourcesContent":["export const isExternalUrl = (url?: string) => {\n if (typeof window === 'undefined' || !url) return false\n\n const isAbsoluteUrl =\n /^https?:\\/\\//.test(url) || /^tel?:/.test(url) || /^mailto?:/.test(url)\n return isAbsoluteUrl && new URL(url).origin !== window.location.origin\n}\n\nexport const getExternalAnchorProps = (url?: string) =>\n isExternalUrl(url) ? { target: '_blank', rel: 'noopener noreferrer' } : {}\n"],"names":["isExternalUrl","url","getExternalAnchorProps"],"mappings":"AAAO,MAAMA,EAAiBC,GACxB,OAAO,OAAW,KAAe,CAACA,EAAY,IAGhD,eAAe,KAAKA,CAAG,GAAK,SAAS,KAAKA,CAAG,GAAK,YAAY,KAAKA,CAAG,IAChD,IAAI,IAAIA,CAAG,EAAE,SAAW,OAAO,SAAS,OAGrDC,EAA0BD,GACrCD,EAAcC,CAAG,EAAI,CAAE,OAAQ,SAAU,IAAK,qBAAsB,EAAI,CAAA"}
|