@ooneex/image 0.0.12 → 0.0.13
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/index.js +35 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
// src/types.ts
|
|
2
|
+
var IMAGE_FORMATS = [
|
|
3
|
+
"jpeg",
|
|
4
|
+
"jpg",
|
|
5
|
+
"png",
|
|
6
|
+
"webp",
|
|
7
|
+
"gif",
|
|
8
|
+
"svg",
|
|
9
|
+
"avif",
|
|
10
|
+
"bmp",
|
|
11
|
+
"tiff",
|
|
12
|
+
"ico",
|
|
13
|
+
"heic",
|
|
14
|
+
"heif"
|
|
15
|
+
];
|
|
16
|
+
var IMAGE_MIMES = [
|
|
17
|
+
"image/jpeg",
|
|
18
|
+
"image/png",
|
|
19
|
+
"image/webp",
|
|
20
|
+
"image/gif",
|
|
21
|
+
"image/svg+xml",
|
|
22
|
+
"image/avif",
|
|
23
|
+
"image/bmp",
|
|
24
|
+
"image/x-ms-bmp",
|
|
25
|
+
"image/tiff",
|
|
26
|
+
"image/vnd.microsoft.icon",
|
|
27
|
+
"image/x-icon",
|
|
28
|
+
"image/heic",
|
|
29
|
+
"image/heif"
|
|
30
|
+
];
|
|
31
|
+
export {
|
|
32
|
+
IMAGE_MIMES,
|
|
33
|
+
IMAGE_FORMATS
|
|
34
|
+
};
|
|
2
35
|
|
|
3
|
-
//# debugId=
|
|
36
|
+
//# debugId=6B9050A6EA3FBE5D64756E2164756E21
|
package/dist/index.js.map
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { IStatus } from \"@ooneex/status\";\nimport type { ITag } from \"@ooneex/tag\";\nimport type { IBase, ScalarType } from \"@ooneex/types\";\n\nexport const IMAGE_FORMATS = [\n \"jpeg\",\n \"jpg\",\n \"png\",\n \"webp\",\n \"gif\",\n \"svg\",\n \"avif\",\n \"bmp\",\n \"tiff\",\n \"ico\",\n \"heic\",\n \"heif\",\n] as const;\n\nexport type ImageFormatType = (typeof IMAGE_FORMATS)[number];\n\nexport const IMAGE_MIMES = [\n \"image/jpeg\",\n \"image/png\",\n \"image/webp\",\n \"image/gif\",\n \"image/svg+xml\",\n \"image/avif\",\n \"image/bmp\",\n \"image/x-ms-bmp\",\n \"image/tiff\",\n \"image/vnd.microsoft.icon\",\n \"image/x-icon\",\n \"image/heic\",\n \"image/heif\",\n] as const;\n\nexport type ImageMimeType = (typeof IMAGE_MIMES)[number];\n\nexport interface IImage extends IBase {\n url: string;\n width?: number;\n height?: number;\n alt?: string;\n title?: string;\n // File info\n format?: ImageFormatType;\n mimeType?: ImageMimeType;\n size?: number;\n metadata?: Record<string, ScalarType>;\n status?: IStatus;\n tags?: ITag[];\n context?: string;\n contextId?: string;\n}\n\nexport interface IImageShared extends IBase {\n image?: IImage;\n imageId?: string;\n sharedWith?: string;\n sharedById?: string;\n permission?: string;\n expiresAt?: string;\n}\n\nexport interface IImageLiked extends IBase {\n image?: IImage;\n imageId?: string;\n likedBy?: string;\n likedById?: string;\n}\n\nexport interface IImageComment extends IBase {\n image?: IImage;\n imageId?: string;\n comment: string;\n commentedBy?: string;\n commentedById?: string;\n parentCommentId?: string;\n}\n\nexport interface IImageDisliked extends IBase {\n image?: IImage;\n imageId?: string;\n dislikedBy?: string;\n dislikedById?: string;\n}\n\nexport interface IImageSaved extends IBase {\n image?: IImage;\n imageId?: string;\n savedBy?: string;\n savedById?: string;\n}\n\nexport interface IImageReport extends IBase {\n image?: IImage;\n imageId?: string;\n reason: string;\n description?: string;\n reportedBy?: string;\n reportedById?: string;\n status?: IStatus;\n}\n\nexport interface IImageDownloaded extends IBase {\n image?: IImage;\n imageId?: string;\n downloadedBy?: string;\n downloadedById?: string;\n}\n\nexport interface IImageViewed extends IBase {\n image?: IImage;\n imageId?: string;\n viewedBy?: string;\n viewedById?: string;\n}\n\nexport interface IImageStat extends IBase {\n image?: IImage;\n imageId?: string;\n likesCount?: number;\n dislikesCount?: number;\n commentsCount?: number;\n sharesCount?: number;\n savesCount?: number;\n downloadsCount?: number;\n viewsCount?: number;\n reportsCount?: number;\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "AAIO,IAAM,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";AAIO,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,IAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
8
|
+
"debugId": "6B9050A6EA3FBE5D64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/package.json
CHANGED