@prose-reader/shared 0.0.9 → 1.3.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.
@@ -14,10 +14,11 @@ const r = (e) => {
14
14
  case "webp":
15
15
  return "image/webp";
16
16
  }
17
- }, p = (e) => e.length ? e.indexOf(";") ? e.substring(0, e.indexOf(";")) : e : void 0;
17
+ }, o = (e) => e.length ? e.indexOf(";") ? e.substring(0, e.indexOf(";")) : e : void 0;
18
+ console.log("asd");
18
19
  export {
19
20
  i as detectContentType,
20
21
  r as getUrlExtension,
21
- p as parseContentType
22
+ o as parseContentType
22
23
  };
23
24
  //# sourceMappingURL=prose-shared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prose-shared.js","sources":["../src/url.ts","../src/contentType.ts"],"sourcesContent":["export const getUrlExtension = (url: string) => {\n return url.split(/[#?]/)[0]?.split(`.`).pop()?.trim() || ``\n}\n","import { getUrlExtension } from \"./url\"\n\nexport const detectContentType = (name: string) => {\n const extension = getUrlExtension(name)\n\n switch (extension) {\n case `png`: return `image/png`\n case `jpg`: return `image/jpg`\n case `jpeg`: return `image/jpeg`\n case `txt`: return `text/plain`\n case `webp`: return `image/webp`\n }\n\n return undefined\n}\n\nexport const parseContentType = (str: string) => {\n if (!str.length) return undefined\n\n const cut = str.indexOf(`;`)\n\n return cut ? str.substring(0, str.indexOf(`;`)) : str\n}\n"],"names":["getUrlExtension","url","_a","_b","detectContentType","name","parseContentType","str"],"mappings":"AAAa,MAAAA,IAAkB,CAACC,MAAgB;AAAnC,MAAAC,GAAAC;AACJ,WAAAA,KAAAD,IAAAD,EAAI,MAAM,MAAM,EAAE,OAAlB,gBAAAC,EAAsB,MAAM,KAAK,UAAjC,gBAAAC,EAAwC,WAAU;AAC3D,GCAaC,IAAoB,CAACC,MAAiB;AAGjD,UAFkBL,EAAgBK,CAAI,GAEnB;AAAA,IACjB,KAAK;AAAc,aAAA;AAAA,IACnB,KAAK;AAAc,aAAA;AAAA,IACnB,KAAK;AAAe,aAAA;AAAA,IACpB,KAAK;AAAc,aAAA;AAAA,IACnB,KAAK;AAAe,aAAA;AAAA,EACtB;AAGF,GAEaC,IAAmB,CAACC,MAC1BA,EAAI,SAEGA,EAAI,QAAQ,GAAG,IAEdA,EAAI,UAAU,GAAGA,EAAI,QAAQ,GAAG,CAAC,IAAIA,IAJ1B;"}
1
+ {"version":3,"file":"prose-shared.js","sources":["../src/url.ts","../src/contentType.ts","../src/index.ts"],"sourcesContent":["export const getUrlExtension = (url: string) => {\n return url.split(/[#?]/)[0]?.split(`.`).pop()?.trim() || ``\n}\n","import { getUrlExtension } from \"./url\"\n\nexport const detectContentType = (name: string) => {\n const extension = getUrlExtension(name)\n\n switch (extension) {\n case `png`: return `image/png`\n case `jpg`: return `image/jpg`\n case `jpeg`: return `image/jpeg`\n case `txt`: return `text/plain`\n case `webp`: return `image/webp`\n }\n\n return undefined\n}\n\nexport const parseContentType = (str: string) => {\n if (!str.length) return undefined\n\n const cut = str.indexOf(`;`)\n\n return cut ? str.substring(0, str.indexOf(`;`)) : str\n}\n","export type { Manifest, TocItem } from './Manifest'\nexport { detectContentType, parseContentType } from './contentType'\nexport { getUrlExtension } from './url'\n\nconsole.log(\"asd\")"],"names":["getUrlExtension","url","_a","_b","detectContentType","name","parseContentType","str"],"mappings":"AAAa,MAAAA,IAAkB,CAACC,MAAgB;AAAnC,MAAAC,GAAAC;AACJ,WAAAA,KAAAD,IAAAD,EAAI,MAAM,MAAM,EAAE,OAAlB,gBAAAC,EAAsB,MAAM,KAAK,UAAjC,gBAAAC,EAAwC,WAAU;AAC3D,GCAaC,IAAoB,CAACC,MAAiB;AAGjD,UAFkBL,EAAgBK,CAAI,GAEnB;AAAA,IACjB,KAAK;AAAc,aAAA;AAAA,IACnB,KAAK;AAAc,aAAA;AAAA,IACnB,KAAK;AAAe,aAAA;AAAA,IACpB,KAAK;AAAc,aAAA;AAAA,IACnB,KAAK;AAAe,aAAA;AAAA,EACtB;AAGF,GAEaC,IAAmB,CAACC,MAC1BA,EAAI,SAEGA,EAAI,QAAQ,GAAG,IAEdA,EAAI,UAAU,GAAGA,EAAI,QAAQ,GAAG,CAAC,IAAIA,IAJ1B;ACb1B,QAAQ,IAAI,KAAK;"}
@@ -1,2 +1,2 @@
1
- (function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t["prose-shared"]={}))})(this,function(t){"use strict";const n=e=>{var i,o;return((o=(i=e.split(/[#?]/)[0])==null?void 0:i.split(".").pop())==null?void 0:o.trim())||""},p=e=>{switch(n(e)){case"png":return"image/png";case"jpg":return"image/jpg";case"jpeg":return"image/jpeg";case"txt":return"text/plain";case"webp":return"image/webp"}},s=e=>e.length?e.indexOf(";")?e.substring(0,e.indexOf(";")):e:void 0;t.detectContentType=p,t.getUrlExtension=n,t.parseContentType=s,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n["prose-shared"]={}))})(this,function(n){"use strict";const t=e=>{var i,o;return((o=(i=e.split(/[#?]/)[0])==null?void 0:i.split(".").pop())==null?void 0:o.trim())||""},s=e=>{switch(t(e)){case"png":return"image/png";case"jpg":return"image/jpg";case"jpeg":return"image/jpeg";case"txt":return"text/plain";case"webp":return"image/webp"}},p=e=>e.length?e.indexOf(";")?e.substring(0,e.indexOf(";")):e:void 0;console.log("asd"),n.detectContentType=s,n.getUrlExtension=t,n.parseContentType=p,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=prose-shared.umd.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"prose-shared.umd.cjs","sources":["../src/url.ts","../src/contentType.ts"],"sourcesContent":["export const getUrlExtension = (url: string) => {\n return url.split(/[#?]/)[0]?.split(`.`).pop()?.trim() || ``\n}\n","import { getUrlExtension } from \"./url\"\n\nexport const detectContentType = (name: string) => {\n const extension = getUrlExtension(name)\n\n switch (extension) {\n case `png`: return `image/png`\n case `jpg`: return `image/jpg`\n case `jpeg`: return `image/jpeg`\n case `txt`: return `text/plain`\n case `webp`: return `image/webp`\n }\n\n return undefined\n}\n\nexport const parseContentType = (str: string) => {\n if (!str.length) return undefined\n\n const cut = str.indexOf(`;`)\n\n return cut ? str.substring(0, str.indexOf(`;`)) : str\n}\n"],"names":["getUrlExtension","url","_b","_a","detectContentType","name","parseContentType","str"],"mappings":"uOAAa,MAAAA,EAAmBC,GAAgB,SACvC,QAAAC,GAAAC,EAAAF,EAAI,MAAM,MAAM,EAAE,KAAlB,YAAAE,EAAsB,MAAM,KAAK,QAAjC,YAAAD,EAAwC,SAAU,EAC3D,ECAaE,EAAqBC,GAAiB,CAGjD,OAFkBL,EAAgBK,CAAI,EAEnB,CACjB,IAAK,MAAc,MAAA,YACnB,IAAK,MAAc,MAAA,YACnB,IAAK,OAAe,MAAA,aACpB,IAAK,MAAc,MAAA,aACnB,IAAK,OAAe,MAAA,YACtB,CAGF,EAEaC,EAAoBC,GAC1BA,EAAI,OAEGA,EAAI,QAAQ,GAAG,EAEdA,EAAI,UAAU,EAAGA,EAAI,QAAQ,GAAG,CAAC,EAAIA,EAJ1B"}
1
+ {"version":3,"file":"prose-shared.umd.cjs","sources":["../src/url.ts","../src/contentType.ts","../src/index.ts"],"sourcesContent":["export const getUrlExtension = (url: string) => {\n return url.split(/[#?]/)[0]?.split(`.`).pop()?.trim() || ``\n}\n","import { getUrlExtension } from \"./url\"\n\nexport const detectContentType = (name: string) => {\n const extension = getUrlExtension(name)\n\n switch (extension) {\n case `png`: return `image/png`\n case `jpg`: return `image/jpg`\n case `jpeg`: return `image/jpeg`\n case `txt`: return `text/plain`\n case `webp`: return `image/webp`\n }\n\n return undefined\n}\n\nexport const parseContentType = (str: string) => {\n if (!str.length) return undefined\n\n const cut = str.indexOf(`;`)\n\n return cut ? str.substring(0, str.indexOf(`;`)) : str\n}\n","export type { Manifest, TocItem } from './Manifest'\nexport { detectContentType, parseContentType } from './contentType'\nexport { getUrlExtension } from './url'\n\nconsole.log(\"asd\")"],"names":["getUrlExtension","url","_b","_a","detectContentType","name","parseContentType","str"],"mappings":"uOAAa,MAAAA,EAAmBC,GAAgB,SACvC,QAAAC,GAAAC,EAAAF,EAAI,MAAM,MAAM,EAAE,KAAlB,YAAAE,EAAsB,MAAM,KAAK,QAAjC,YAAAD,EAAwC,SAAU,EAC3D,ECAaE,EAAqBC,GAAiB,CAGjD,OAFkBL,EAAgBK,CAAI,EAEnB,CACjB,IAAK,MAAc,MAAA,YACnB,IAAK,MAAc,MAAA,YACnB,IAAK,OAAe,MAAA,aACpB,IAAK,MAAc,MAAA,aACnB,IAAK,OAAe,MAAA,YACtB,CAGF,EAEaC,EAAoBC,GAC1BA,EAAI,OAEGA,EAAI,QAAQ,GAAG,EAEdA,EAAI,UAAU,EAAGA,EAAI,QAAQ,GAAG,CAAC,EAAIA,EAJ1B,OCb1B,QAAQ,IAAI,KAAK"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prose-reader/shared",
3
- "version": "0.0.9",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/prose-shared.umd.cjs",
6
6
  "module": "./dist/prose-shared.js",
@@ -21,5 +21,5 @@
21
21
  "build": "tsc && vite build",
22
22
  "test": "echo"
23
23
  },
24
- "gitHead": "978abbefaf7754444771d040be68b8e604f28c2b"
24
+ "gitHead": "f51fc8a53e4cdf76fb1c9bae4a45762f72d6248a"
25
25
  }