@atom-learning/components 3.27.0-beta.2 → 3.27.0-beta.3
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/context/router/index.js +1 -1
- package/dist/context/router/index.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/utilities/uri/index.d.ts +1 -0
- package/dist/utilities/uri/index.js +1 -1
- package/dist/utilities/uri/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const o=e
|
|
1
|
+
const o=e=>/^tel?:/.test(e)||/^mailto?:/.test(e)||/^sms?:/.test(e)||/^geo?:/.test(e),n=e=>/^https?:\/\//.test(e),t=e=>typeof window>"u"||!e?!1:n(e)&&new URL(e).origin!==window.location.origin,r=e=>t(e)?{target:"_blank",rel:"noopener noreferrer"}:{};export{r as getExternalAnchorProps,t as isExternalUrl,o as isUriScheme};
|
|
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
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utilities/uri/index.ts"],"sourcesContent":["export const isUriScheme = (url: string) =>\n /^tel?:/.test(url) ||\n /^mailto?:/.test(url) ||\n /^sms?:/.test(url) ||\n /^geo?:/.test(url)\n\nconst isAbsoluteUrl = (url: string) => /^https?:\\/\\//.test(url)\n\nexport const isExternalUrl = (url?: string) => {\n if (typeof window === 'undefined' || !url) return false\n\n return isAbsoluteUrl(url) && new URL(url).origin !== window.location.origin\n}\n\nexport const getExternalAnchorProps = (url?: string) =>\n isExternalUrl(url) ? { target: '_blank', rel: 'noopener noreferrer' } : {}\n"],"names":["isUriScheme","url","isAbsoluteUrl","isExternalUrl","getExternalAnchorProps"],"mappings":"AAAa,MAAAA,EAAeC,GAC1B,SAAS,KAAKA,CAAG,GACjB,YAAY,KAAKA,CAAG,GACpB,SAAS,KAAKA,CAAG,GACjB,SAAS,KAAKA,CAAG,EAEbC,EAAiBD,GAAgB,eAAe,KAAKA,CAAG,EAEjDE,EAAiBF,GACxB,OAAO,OAAW,KAAe,CAACA,EAAY,GAE3CC,EAAcD,CAAG,GAAK,IAAI,IAAIA,CAAG,EAAE,SAAW,OAAO,SAAS,OAG1DG,EAA0BH,GACrCE,EAAcF,CAAG,EAAI,CAAE,OAAQ,SAAU,IAAK,qBAAsB,EAAI,CAAA"}
|