@e-mc/image 0.8.19 → 0.8.21

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2024 An Pham
1
+ Copyright 2023 An Pham
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/index.d.ts
12
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/index.d.ts
13
13
 
14
14
  ```typescript
15
15
  import type { IHost, ModuleConstructor } from "./index";
@@ -52,9 +52,9 @@ interface ImageConstructor extends ModuleConstructor {
52
52
 
53
53
  ## References
54
54
 
55
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/asset.d.ts
56
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/image.d.ts
57
- - https://www.unpkg.com/@e-mc/types@0.8.19/lib/settings.d.ts
55
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/asset.d.ts
56
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/image.d.ts
57
+ - https://www.unpkg.com/@e-mc/types@0.8.21/lib/settings.d.ts
58
58
 
59
59
  ## LICENSE
60
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/image",
3
- "version": "0.8.19",
3
+ "version": "0.8.21",
4
4
  "description": "Image constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,6 +20,6 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/core": "0.8.19"
23
+ "@e-mc/core": "0.8.21"
24
24
  }
25
25
  }
package/types/index.d.ts CHANGED
@@ -1,4 +1,12 @@
1
- /// <reference path="@e-mc/types/index.d.ts" />
1
+ export interface Point {
2
+ x: number;
3
+ y: number;
4
+ }
5
+
6
+ export interface Dimension {
7
+ width: number;
8
+ height: number;
9
+ }
2
10
 
3
11
  export interface ImageHandler<T, U, V> {
4
12
  readonly handler: T;
@@ -25,7 +33,7 @@ export interface WebpMuxFrame extends Dimension, Point {
25
33
  export interface WebpMuxImage extends Readonly<Dimension> {
26
34
  readonly anim: { loops: number; bgColor: [number, number, number, number] };
27
35
  initLib(): Promise<void>;
28
- load(value: BufferContent): Promise<void>;
36
+ load(value: string | Buffer): Promise<void>;
29
37
  demux(options: { path?: string; prefix?: string; buffers?: boolean }): Promise<void>;
30
38
  getImageData(): Promise<Uint8Array>;
31
39
  getFrameData(frame: number): Promise<Uint8Array>;