@contentauth/c2pa-web 0.15.4 → 0.15.6

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.
@@ -1,5 +1,5 @@
1
1
  var $ = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
2
- var be = $((le, P) => {
2
+ var be = $((le, C) => {
3
3
  class h {
4
4
  static __wrap(e) {
5
5
  const t = Object.create(h.prototype);
@@ -306,6 +306,16 @@ var be = $((le, P) => {
306
306
  if (c[1])
307
307
  throw b(c[0]);
308
308
  }
309
+ /**
310
+ * Updates a (known) property in the manifest definition.
311
+ * @param {string} property
312
+ * @param {any} value
313
+ */
314
+ updateManifestProperty(e, t) {
315
+ const n = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_updateManifestProperty(this.__wbg_ptr, n, _, t);
316
+ if (c[1])
317
+ throw b(c[0]);
318
+ }
309
319
  }
310
320
  Symbol.dispose && (h.prototype[Symbol.dispose] = h.prototype.free);
311
321
  class M {
@@ -774,7 +784,7 @@ var be = $((le, P) => {
774
784
  },
775
785
  __wbg_require_b4edbdcf3e2a1ef0: function() {
776
786
  return l(function() {
777
- return P.require;
787
+ return C.require;
778
788
  }, arguments);
779
789
  },
780
790
  __wbg_resolve_0076e10020304ede: function(e) {
@@ -1106,7 +1116,7 @@ ${r.stack}` : n;
1106
1116
  function V(r) {
1107
1117
  return !!(r && typeof r == "object" && Reflect.get(r, "type") === q);
1108
1118
  }
1109
- function C(r = "default") {
1119
+ function P(r = "default") {
1110
1120
  return {
1111
1121
  createTx(e) {
1112
1122
  const t = /* @__PURE__ */ new Map(), n = e ?? self;
@@ -1158,7 +1168,7 @@ ${r.stack}` : n;
1158
1168
  function se() {
1159
1169
  return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
1160
1170
  }
1161
- const { rx: ie } = C(), { createTx: ae } = C("worker");
1171
+ const { rx: ie } = P(), { createTx: ae } = P("worker");
1162
1172
  function ue(r) {
1163
1173
  if (!(r != null && r.manifests))
1164
1174
  return r;
@@ -1267,6 +1277,9 @@ ${r.stack}` : n;
1267
1277
  builder_setNoEmbed(r, e) {
1268
1278
  f.get(r).setNoEmbed(e);
1269
1279
  },
1280
+ builder_updateManifestProperty(r, e, t) {
1281
+ f.get(r).updateManifestProperty(e, t);
1282
+ },
1270
1283
  builder_setThumbnailFromBlob(r, e, t) {
1271
1284
  f.get(r).setThumbnailFromBlob(e, t);
1272
1285
  },
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  */
9
9
  export { createC2pa } from './lib/c2pa.js';
10
10
  export { Reader } from './lib/reader.js';
11
- export { Builder } from './lib/builder.js';
11
+ export { Builder, type ClaimVersion, type ManifestProperty } from './lib/builder.js';
12
12
  export * from './common.js';
13
13
  export * from '@contentauth/c2pa-utilities';
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC"}
package/dist/index.js CHANGED
@@ -1,29 +1,30 @@
1
- import { A as e, B as t, C as r, D as E, a as T, b as _, c as S, d as A, e as i, f as R, R as g, g as n, h as o, i as D, j as L, k as l, l as F, m as f, n as I, o as M, r as U, p as c, s as u, q as Y, v as d, w as h } from "./c2pa-DTWK5AOF.js";
1
+ import { A as a, B as t, C as r, D as E, a as S, b as T, c as _, d as i, e as A, f as R, R as n, g as o, h as g, i as l, j as D, k as L, l as f, m as F, n as I, o as M, r as u, p as U, q as c, s as d, t as Y, v as h, w as y } from "./c2pa-DQUfpUBI.js";
2
2
  export {
3
- e as AssetTooLargeError,
3
+ a as AssetTooLargeError,
4
4
  t as Builder,
5
5
  r as Context,
6
6
  E as DEFAULT_INITIAL_RETRY_DELAY_MS,
7
- T as DEFAULT_MAX_RESPONSE_BYTES,
8
- _ as DEFAULT_MAX_RETRIES,
9
- S as DEFAULT_MAX_RETRY_AFTER_MS,
10
- A as DEFAULT_MAX_RETRY_DELAY_MS,
11
- i as DEFAULT_MAX_SIZE_IN_BYTES,
7
+ S as DEFAULT_MAX_RESPONSE_BYTES,
8
+ T as DEFAULT_MAX_RETRIES,
9
+ _ as DEFAULT_MAX_RETRY_AFTER_MS,
10
+ i as DEFAULT_MAX_RETRY_DELAY_MS,
11
+ A as DEFAULT_MAX_SIZE_IN_BYTES,
12
12
  R as DEFAULT_SETTINGS,
13
- g as Reader,
14
- n as createC2pa,
15
- o as createCawgTrustSettings,
16
- D as createTrustSettings,
17
- L as createVerifySettings,
18
- l as defaultIsRetryableStatus,
19
- F as fetchWithRetry,
20
- f as fetchWithRetryRaw,
13
+ n as Reader,
14
+ o as createC2pa,
15
+ g as createCawgTrustSettings,
16
+ l as createTrustSettings,
17
+ D as createVerifySettings,
18
+ L as defaultIsRetryableStatus,
19
+ f as fetchWithRetry,
20
+ F as fetchWithRetryRaw,
21
21
  I as loadSettingsFromUrl,
22
22
  M as mergeSettings,
23
+ u as resolveConfiguredMaxSizeInBytes,
23
24
  U as resolveSettings,
24
25
  c as resolveTrustSettings,
25
- u as settingsToJson,
26
+ d as settingsToJson,
26
27
  Y as snakeCaseify,
27
- d as validateAssetSize,
28
- h as withDefaultSettings
28
+ h as validateAssetSize,
29
+ y as withDefaultSettings
29
30
  };
package/dist/inline.d.ts CHANGED
@@ -17,6 +17,6 @@ export type InlineConfig = Omit<Config, 'wasmSrc'>;
17
17
  */
18
18
  export declare function createC2pa(config?: InlineConfig): Promise<import('./common.js').C2pa>;
19
19
  export { Reader } from './lib/reader.js';
20
- export { Builder } from './lib/builder.js';
20
+ export { Builder, type ClaimVersion, type ManifestProperty } from './lib/builder.js';
21
21
  export * from './common.js';
22
22
  //# sourceMappingURL=inline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../src/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAgC,MAAM,EAAE,MAAM,eAAe,CAAC;AAGrE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,uCAOrD;AAED,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../src/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAgC,MAAM,EAAE,MAAM,eAAe,CAAC;AAGrE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,uCAOrD;AAED,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,cAAc,aAAa,CAAC"}