@contentauth/c2pa-web 0.16.1 → 0.17.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.
- package/README.md +11 -10
- package/dist/builder-EizXw-Lf.js +617 -0
- package/dist/c2pa_worker.js +6 -0
- package/dist/common.d.ts +1 -2
- package/dist/common.d.ts.map +1 -1
- package/dist/index.js +5 -29
- package/dist/inline.d.ts +1 -0
- package/dist/inline.d.ts.map +1 -1
- package/dist/inline.js +4 -3
- package/dist/lib/builder.d.ts +1 -32
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/c2pa.d.ts +0 -16
- package/dist/lib/c2pa.d.ts.map +1 -1
- package/dist/lib/reader.d.ts +1 -25
- package/dist/lib/reader.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +4 -4
- package/dist/c2pa-DSuogpt7.js +0 -1086
package/dist/lib/builder.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Signer, SignOptions } from './signer.js';
|
|
2
2
|
import { Action, BuilderIntent, C2paReason, Ingredient, ManifestDefinition } from '@contentauth/c2pa-types';
|
|
3
|
-
import { Context
|
|
3
|
+
import { Context } from '@contentauth/c2pa-utilities';
|
|
4
4
|
import { C2pa } from './c2pa.js';
|
|
5
5
|
/** A property {@link Builder.updateManifestProperty} can set. */
|
|
6
6
|
export type ManifestProperty = 'vendor' | 'title' | 'format' | 'instance_id' | 'label' | 'claim_version';
|
|
@@ -238,35 +238,4 @@ export declare class Builder {
|
|
|
238
238
|
*/
|
|
239
239
|
free(): Promise<void>;
|
|
240
240
|
}
|
|
241
|
-
/**
|
|
242
|
-
* @deprecated Use `Builder`'s static methods, passing a `Context`, instead.
|
|
243
|
-
*/
|
|
244
|
-
export interface BuilderFactory {
|
|
245
|
-
/**
|
|
246
|
-
* @param settings Optional settings for this builder. Will override any values inherited
|
|
247
|
-
* from the top-level settings passed to {@link createC2pa}.
|
|
248
|
-
* @deprecated Use {@link Builder.new} with a `Context` instead.
|
|
249
|
-
*/
|
|
250
|
-
new: (settings?: Settings) => Promise<Builder>;
|
|
251
|
-
/**
|
|
252
|
-
* @param settings Optional settings for this builder. Will override any values inherited
|
|
253
|
-
* from the top-level settings passed to {@link createC2pa}.
|
|
254
|
-
* @deprecated Use {@link Builder.fromDefinition} with a `Context` instead.
|
|
255
|
-
*/
|
|
256
|
-
fromDefinition: (definition: ManifestDefinition, settings?: Settings) => Promise<Builder>;
|
|
257
|
-
/**
|
|
258
|
-
* @param settings Optional settings for this builder. Will override any values inherited
|
|
259
|
-
* from the top-level settings passed to {@link createC2pa}.
|
|
260
|
-
* @deprecated Use {@link Builder.fromArchive} with a `Context` instead.
|
|
261
|
-
*/
|
|
262
|
-
fromArchive: (archive: Blob, settings?: Settings) => Promise<Builder>;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* @deprecated Use `Builder.new`/`Builder.fromDefinition`/`Builder.fromArchive` with a `Context`
|
|
266
|
-
* instead.
|
|
267
|
-
* @param c2pa The `C2pa` instance to create builders on.
|
|
268
|
-
* @param baseSettings Optional settings inherited by every builder created from this factory.
|
|
269
|
-
* @returns A {@link BuilderFactory} object containing builder creation methods.
|
|
270
|
-
*/
|
|
271
|
-
export declare function createBuilderFactory(c2pa: C2pa, baseSettings?: Settings): BuilderFactory;
|
|
272
241
|
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/lib/builder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,MAAM,EAEN,aAAa,EACb,UAAU,EACV,UAAU,EACV,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"builder.d.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;;;;;;;;;OAgBG;IACG,aAAa,CACjB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,GACzC,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;OAIG;IACG,aAAa,CAAC,oBAAoB,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpE;;;;;;;OAOG;IACG,qBAAqB,CACzB,oBAAoB,EAAE,UAAU,EAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,IAAI,CAAC;IAKhB;;;;;OAKG;IACG,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxE;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAKlD;;;;;OAKG;IACG,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAKnD;;;;;;;;;;OAUG;IACG,IAAI,CACR,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAoBnC;;;;;;;;;;OAUG;IACG,uBAAuB,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,qBAAqB,CAAC;IAoBjC;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5B"}
|
package/dist/lib/c2pa.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { WorkerManager } from './worker/workerManager.js';
|
|
2
|
-
import { Settings } from '@contentauth/c2pa-utilities';
|
|
3
|
-
import { ReaderFactory } from './reader.js';
|
|
4
|
-
import { BuilderFactory } from './builder.js';
|
|
5
2
|
export interface Config {
|
|
6
3
|
/**
|
|
7
4
|
* URL to fetch the WASM binary or an already-instantiated WASM module.
|
|
@@ -16,11 +13,6 @@ export interface Config {
|
|
|
16
13
|
* application and pass its URL here.
|
|
17
14
|
*/
|
|
18
15
|
workerSrc?: URL;
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated Use a `Context` to construct a `Reader`/`Builder` via their static methods instead.
|
|
21
|
-
* Settings for the SDK. Will be inherited by created builders and readers.
|
|
22
|
-
*/
|
|
23
|
-
settings?: Settings;
|
|
24
16
|
}
|
|
25
17
|
export interface C2pa {
|
|
26
18
|
/**
|
|
@@ -29,14 +21,6 @@ export interface C2pa {
|
|
|
29
21
|
* of it themselves to know which web worker to use. There's no need to touch this directly.
|
|
30
22
|
*/
|
|
31
23
|
worker: WorkerManager;
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated Use `Reader`'s static methods instead, passing this `C2pa` object and a `Context`.
|
|
34
|
-
*/
|
|
35
|
-
reader: ReaderFactory;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use `Builder`'s static methods instead, passing this `C2pa` object and a `Context`.
|
|
38
|
-
*/
|
|
39
|
-
builder: BuilderFactory;
|
|
40
24
|
/**
|
|
41
25
|
* Terminates this instance's underlying web worker.
|
|
42
26
|
*/
|
package/dist/lib/c2pa.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c2pa.d.ts","sourceRoot":"","sources":["../../src/lib/c2pa.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAuB,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"c2pa.d.ts","sourceRoot":"","sources":["../../src/lib/c2pa.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAuB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/E,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAErC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAED,MAAM,WAAW,IAAI;IACnB;;;;OAIG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAY9D"}
|
package/dist/lib/reader.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Manifest, ManifestStore } from '@contentauth/c2pa-types';
|
|
2
2
|
import { C2pa } from './c2pa.js';
|
|
3
|
-
import { Context
|
|
3
|
+
import { Context } from '@contentauth/c2pa-utilities';
|
|
4
4
|
export declare const MAX_SIZE_IN_BYTES: number;
|
|
5
5
|
/**
|
|
6
6
|
* The `Reader` class supports reading C2PA data out of an asset.
|
|
@@ -83,28 +83,4 @@ export declare class Reader {
|
|
|
83
83
|
*/
|
|
84
84
|
free(): Promise<void>;
|
|
85
85
|
}
|
|
86
|
-
/**
|
|
87
|
-
* @deprecated Use `Reader`'s static methods instead.
|
|
88
|
-
*/
|
|
89
|
-
export interface ReaderFactory {
|
|
90
|
-
/**
|
|
91
|
-
* @param settings Optional settings for this reader. Will override any values inherited from
|
|
92
|
-
* the top-level settings passed to {@link createC2pa}.
|
|
93
|
-
* @deprecated Use {@link Reader.fromBlob} with a `Context` instead.
|
|
94
|
-
*/
|
|
95
|
-
fromBlob: (format: string, blob: Blob, settings?: Settings) => Promise<Reader | null>;
|
|
96
|
-
/**
|
|
97
|
-
* @param settings Optional settings for this reader. Will override any values inherited from
|
|
98
|
-
* the top-level settings passed to {@link createC2pa}.
|
|
99
|
-
* @deprecated Use {@link Reader.fromBlobFragment} with a `Context` instead.
|
|
100
|
-
*/
|
|
101
|
-
fromBlobFragment: (format: string, init: Blob, fragment: Blob, settings?: Settings) => Promise<Reader | null>;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* @deprecated Use `Reader.fromBlob`/`Reader.fromBlobFragment` with a `Context` instead.
|
|
105
|
-
* @param c2pa The `C2pa` instance to create readers on.
|
|
106
|
-
* @param baseSettings Optional settings inherited by every reader created from this factory.
|
|
107
|
-
* @returns A {@link ReaderFactory} object containing reader creation methods.
|
|
108
|
-
*/
|
|
109
|
-
export declare function createReaderFactory(c2pa: C2pa, baseSettings?: Settings): ReaderFactory;
|
|
110
86
|
//# sourceMappingURL=reader.d.ts.map
|
package/dist/lib/reader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../src/lib/reader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../src/lib/reader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EACL,OAAO,EAGR,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,iBAAiB,QAAU,CAAC;AASzC;;;;;;;;GAQG;AACH,qBAAa,MAAM;;IAIjB,OAAO;IAKP;;;;;;;;;;;;OAYG;WACU,QAAQ,CACnB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,IAAI,EAAE,IAAI,EACV,OAAO,GAAE,OAAuB,GAC/B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAqBzB;;;;;;;;;;;OAWG;WACU,gBAAgB,CAC3B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,EACd,OAAO,GAAE,OAAuB,GAC/B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IA4BzB;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAK3C;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC;IAK7C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,QAAQ,CAAC;IAKzC;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAK1B;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC;IAK5B;;;;;;;;;;;;OAYG;IACG,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAKpE;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5B"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentauth/c2pa-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"highgain": "^0.1.0",
|
|
35
|
-
"@contentauth/c2pa-types": "0.
|
|
36
|
-
"@contentauth/c2pa-utilities": "0.5.
|
|
37
|
-
"@contentauth/c2pa-wasm": "0.
|
|
35
|
+
"@contentauth/c2pa-types": "0.8.0",
|
|
36
|
+
"@contentauth/c2pa-utilities": "0.5.1",
|
|
37
|
+
"@contentauth/c2pa-wasm": "0.15.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@playwright/test": "^1.60.0",
|