@m4k/common 0.2.3 → 0.2.5

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/lib/index.d.ts CHANGED
@@ -130,5 +130,5 @@ export declare class ProcessedFile {
130
130
  readonly stream?: AsyncIterable<Uint8Array> | undefined;
131
131
  constructor(name: string, type: string, stream?: AsyncIterable<Uint8Array> | undefined);
132
132
  }
133
- export {};
133
+ export { mimeTypes } from "./mime.js";
134
134
  //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -8,4 +8,5 @@ export class ProcessedFile {
8
8
  this.stream = stream;
9
9
  }
10
10
  }
11
+ export { mimeTypes } from "./mime.js";
11
12
  //# sourceMappingURL=index.js.map
package/lib/mime.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Mapping from file extensions to their corresponding MIME types
3
+ */
4
+ export declare const mimeTypes: Record<string, string>;
5
+ //# sourceMappingURL=mime.d.ts.map
package/lib/mime.js ADDED
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Mapping from file extensions to their corresponding MIME types
3
+ */
4
+ export const mimeTypes = {
5
+ // Image formats
6
+ jpg: "image/jpeg",
7
+ jpeg: "image/jpeg",
8
+ png: "image/png",
9
+ gif: "image/gif",
10
+ webp: "image/webp",
11
+ avif: "image/avif",
12
+ heic: "image/heic",
13
+ heif: "image/heif",
14
+ svg: "image/svg+xml",
15
+ tiff: "image/tiff",
16
+ tif: "image/tiff",
17
+ bmp: "image/bmp",
18
+ ico: "image/x-icon",
19
+ // Video formats
20
+ mp4: "video/mp4",
21
+ asx: "video/x-ms-asf",
22
+ asf: "video/x-ms-asf",
23
+ mkv: "video/x-matroska",
24
+ mov: "video/quicktime",
25
+ avi: "video/x-msvideo",
26
+ wmv: "video/x-ms-wmv",
27
+ flv: "video/x-flv",
28
+ webm: "video/webm",
29
+ m4v: "video/x-m4v",
30
+ mng: "video/x-mng",
31
+ mpg: "video/mpeg",
32
+ mpeg: "video/mpeg",
33
+ ogv: "video/ogg",
34
+ "3gpp": "video/3gpp",
35
+ "3gp": "video/3gpp",
36
+ ts: "video/mp2t",
37
+ // Audio formats
38
+ mp3: "audio/mpeg",
39
+ wav: "audio/wav",
40
+ ogg: "audio/ogg",
41
+ oga: "audio/ogg",
42
+ m4a: "audio/mp4",
43
+ aac: "audio/aac",
44
+ flac: "audio/flac",
45
+ wma: "audio/x-ms-wma",
46
+ m4b: "audio/mp4",
47
+ m4p: "audio/mp4",
48
+ opus: "audio/opus",
49
+ aiff: "audio/aiff",
50
+ alac: "audio/alac",
51
+ };
52
+ //# sourceMappingURL=mime.js.map
package/package.json CHANGED
@@ -1,10 +1,16 @@
1
1
  {
2
2
  "name": "@m4k/common",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "module": "./lib/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "import": "./lib/index.js"
12
+ }
13
+ },
8
14
  "license": "MIT",
9
15
  "description": "Common types and utilities for m4k",
10
16
  "author": "sv2dev",
@@ -16,5 +22,8 @@
16
22
  "devDependencies": {
17
23
  "typescript": "^5.8.3"
18
24
  },
19
- "repository": "github:sv2dev/m4k"
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/sv2dev/m4k.git"
28
+ }
20
29
  }