@omnimedia/omnitool 1.1.0-44 → 1.1.0-46
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/package.json +2 -2
- package/s/timeline/parts/resource-pool.ts +2 -2
- package/s/timeline/parts/resource.ts +1 -0
- package/s/timeline/utils/datafile.ts +2 -1
- package/x/demo/demo.bundle.min.js +2 -2
- package/x/demo/demo.bundle.min.js.map +3 -3
- package/x/index.html +2 -2
- package/x/timeline/parts/resource-pool.js +2 -2
- package/x/timeline/parts/resource-pool.js.map +1 -1
- package/x/timeline/parts/resource.d.ts +1 -0
- package/x/timeline/utils/datafile.d.ts +2 -1
- package/x/timeline/utils/datafile.js +4 -2
- package/x/timeline/utils/datafile.js.map +1 -1
package/x/index.html
CHANGED
|
@@ -65,7 +65,7 @@ canvas {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
</style>
|
|
68
|
-
<script type=module src="demo/demo.bundle.min.js?v=
|
|
68
|
+
<script type=module src="demo/demo.bundle.min.js?v=0ea09035acef"></script>
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
<meta name="theme-color" content="#3cff9c">
|
|
@@ -85,7 +85,7 @@ canvas {
|
|
|
85
85
|
<body>
|
|
86
86
|
|
|
87
87
|
<section>
|
|
88
|
-
<h1>Omnitool <small>v1.1.0-
|
|
88
|
+
<h1>Omnitool <small>v1.1.0-46</small></h1>
|
|
89
89
|
<button class=export>export</button>
|
|
90
90
|
<button class=fetch>fetch</button>
|
|
91
91
|
<input type="file" class="file-input">
|
|
@@ -6,13 +6,13 @@ export class ResourcePool {
|
|
|
6
6
|
async store(datafile) {
|
|
7
7
|
const media = await Media.analyze(datafile);
|
|
8
8
|
const { hash } = media.datafile.checksum;
|
|
9
|
-
const { filename, bytes, url } = media.datafile;
|
|
9
|
+
const { filename, bytes, url, blob } = media.datafile;
|
|
10
10
|
if (this.#map.has(hash)) {
|
|
11
11
|
const alreadyExists = this.#map.require(hash);
|
|
12
12
|
alreadyExists.filename = filename;
|
|
13
13
|
}
|
|
14
14
|
else
|
|
15
|
-
this.#map.set(hash, { kind: "media", filename, bytes, url });
|
|
15
|
+
this.#map.set(hash, { kind: "media", filename, bytes, url, blob });
|
|
16
16
|
return media;
|
|
17
17
|
}
|
|
18
18
|
require(hash) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-pool.js","sourceRoot":"","sources":["../../../s/timeline/parts/resource-pool.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAE9B,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAA;AAIhC,MAAM,OAAO,YAAY;IACxB,IAAI,GAAG,IAAI,IAAwB,CAAA;IAEnC,sDAAsD;IACtD,KAAK,CAAC,KAAK,CAAC,QAAkB;QAC7B,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAC3C,MAAM,EAAC,IAAI,EAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAA;QACtC,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAC,GAAG,KAAK,CAAC,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"resource-pool.js","sourceRoot":"","sources":["../../../s/timeline/parts/resource-pool.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAE9B,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAA;AAIhC,MAAM,OAAO,YAAY;IACxB,IAAI,GAAG,IAAI,IAAwB,CAAA;IAEnC,sDAAsD;IACtD,KAAK,CAAC,KAAK,CAAC,QAAkB;QAC7B,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAC3C,MAAM,EAAC,IAAI,EAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAA;QACtC,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAC,GAAG,KAAK,CAAC,QAAQ,CAAA;QAEnD,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC7C,aAAa,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAClC,CAAC;;YAEA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAC,CAAC,CAAA;QAEjE,OAAO,KAAK,CAAA;IACb,CAAC;IAED,OAAO,CAAC,IAAY;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC;CACD"}
|
|
@@ -2,9 +2,10 @@ import { Checksum } from "./checksum.js";
|
|
|
2
2
|
export declare class Datafile {
|
|
3
3
|
url: string;
|
|
4
4
|
bytes: Uint8Array;
|
|
5
|
+
blob: Blob;
|
|
5
6
|
filename: string;
|
|
6
7
|
checksum: Checksum;
|
|
7
|
-
constructor(url: string, bytes: Uint8Array, filename: string, checksum: Checksum);
|
|
8
|
+
constructor(url: string, bytes: Uint8Array, blob: Blob, filename: string, checksum: Checksum);
|
|
8
9
|
static make(file: Blob, name?: string): Promise<Datafile>;
|
|
9
10
|
static load(path: string): Promise<void>;
|
|
10
11
|
}
|
|
@@ -2,11 +2,13 @@ import { Checksum } from "./checksum.js";
|
|
|
2
2
|
export class Datafile {
|
|
3
3
|
url;
|
|
4
4
|
bytes;
|
|
5
|
+
blob;
|
|
5
6
|
filename;
|
|
6
7
|
checksum;
|
|
7
|
-
constructor(url, bytes, filename, checksum) {
|
|
8
|
+
constructor(url, bytes, blob, filename, checksum) {
|
|
8
9
|
this.url = url;
|
|
9
10
|
this.bytes = bytes;
|
|
11
|
+
this.blob = blob;
|
|
10
12
|
this.filename = filename;
|
|
11
13
|
this.checksum = checksum;
|
|
12
14
|
}
|
|
@@ -16,7 +18,7 @@ export class Datafile {
|
|
|
16
18
|
const checksum = await Checksum.make(bytes);
|
|
17
19
|
const filename = name ?? checksum.nickname;
|
|
18
20
|
const url = URL.createObjectURL(file);
|
|
19
|
-
return new this(url, bytes, filename, checksum);
|
|
21
|
+
return new this(url, bytes, file, filename, checksum);
|
|
20
22
|
}
|
|
21
23
|
static async load(path) {
|
|
22
24
|
// const file = await fetch(path)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datafile.js","sourceRoot":"","sources":["../../../s/timeline/utils/datafile.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AAEtC,MAAM,OAAO,QAAQ;IAEZ;IACA;IACA;IACA;
|
|
1
|
+
{"version":3,"file":"datafile.js","sourceRoot":"","sources":["../../../s/timeline/utils/datafile.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AAEtC,MAAM,OAAO,QAAQ;IAEZ;IACA;IACA;IACA;IACA;IALR,YACQ,GAAW,EACX,KAAiB,EACjB,IAAU,EACV,QAAgB,EAChB,QAAkB;QAJlB,QAAG,GAAH,GAAG,CAAQ;QACX,UAAK,GAAL,KAAK,CAAY;QACjB,SAAI,GAAJ,IAAI,CAAM;QACV,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAU;IACvB,CAAC;IAEJ,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAU,EAAE,IAAa;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACvC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;QACpC,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC3C,MAAM,QAAQ,GAAG,IAAI,IAAI,QAAQ,CAAC,QAAQ,CAAA;QAC1C,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;QACrC,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IACtD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAY;QAC7B,iCAAiC;QACjC,0CAA0C;QAC1C,uCAAuC;QACvC,8FAA8F;QAC9F,wBAAwB;QACxB,8CAA8C;QAC9C,mDAAmD;IACpD,CAAC;CACD"}
|