@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.
@@ -1,3 +1,4 @@
1
+ export declare const isUriScheme: (url: string) => boolean;
1
2
  export declare const isExternalUrl: (url?: string | undefined) => boolean;
2
3
  export declare const getExternalAnchorProps: (url?: string | undefined) => {
3
4
  target: string;
@@ -1,2 +1,2 @@
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};
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 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"}
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"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "dist/index.cjs.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
7
- "version": "3.27.0-beta.2",
7
+ "version": "3.27.0-beta.3",
8
8
  "description": "",
9
9
  "files": [
10
10
  "dist"