calmlens 0.35.0 → 0.37.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 +2 -0
- package/bin/calmlens.js +1 -1
- package/cjs/{BrowserUpload-C5rpoHJc.js → BrowserUpload-BOXt-BFy.js} +1 -1
- package/cjs/{BrowserUpload-BGxUQPHj.d.ts → BrowserUpload-CuG3tWSo.d.ts} +2 -2
- package/cjs/{CalmLensAppClient-Cxe_6E-A.js → CalmLensAppClient-Bt9GNyqS.js} +2 -2
- package/cjs/{CalmLensAppClient-0to4ZZ7i.d.ts → CalmLensAppClient-QqtovWE-.d.ts} +1 -1
- package/cjs/{CalmLensCdn-DN3z-uDg.js → CalmLensCdn-D4I4Km4j.js} +1 -1
- package/cjs/{CalmLensConnection-B7gW8yEp.js → CalmLensConnection-knkk2-BW.js} +1 -1
- package/cjs/{CalmLensServerClient-DLdwysxW.js → CalmLensServerClient--L5qRzFd.js} +2 -2
- package/cjs/{CalmLensServerClient-CiiaFN7R.d.ts → CalmLensServerClient-csSQqHBt.d.ts} +2 -2
- package/cjs/{CalmLensTestInputArguments-PYuRmE0j.js → CalmLensTestInputArguments-C6S09FVQ.js} +7 -1
- package/cjs/{CalmLensTypes-9kLIOd1C.d.ts → CalmLensTypes-_f7QVRtO.d.ts} +2 -2
- package/cjs/{Core-CFxvTass.d.ts → Core-4iFxKJnY.d.ts} +2 -2
- package/cjs/{Core-COxzwIVe.js → Core-CNsji7uR.js} +2 -2
- package/cjs/{ReactUpload-Dso2ir_F.d.ts → ReactUpload-4qd2xACg.d.ts} +1 -1
- package/cjs/{ReactUpload-eD850yww.js → ReactUpload-DfioGW58.js} +1 -1
- package/cjs/{UploadController-C2NQZhRo.js → UploadController-B-a2r2kN.js} +1 -1
- package/{esm/WebhookPayload-Cv2uwykA.d.ts → cjs/WebhookPayload-BJtggTLd.d.ts} +1 -1
- package/cjs/app.d.ts +4 -4
- package/cjs/app.js +2 -2
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +4 -4
- package/cjs/{index-D-ZwYNRQ.d.ts → index-IEA75nev.d.ts} +2 -2
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +1 -1
- package/cjs/react-native.d.ts +2 -2
- package/cjs/react-native.js +4 -4
- package/cjs/react.d.ts +4 -4
- package/cjs/react.js +5 -5
- package/cjs/server.d.ts +4 -4
- package/cjs/server.js +2 -2
- package/cjs/test-inputs.js +1 -1
- package/cjs/testing.d.ts +22 -5
- package/cjs/testing.js +111 -12
- package/cjs/{ui-BkOZ_jV_.d.ts → ui-BMQW3Hse.d.ts} +2 -2
- package/cjs/{ui-D4cxDZIT.js → ui-DOkuD90x.js} +2 -2
- package/cjs/ui.d.ts +2 -2
- package/cjs/ui.js +3 -3
- package/cjs/vue.d.ts +5 -5
- package/cjs/vue.js +4 -4
- package/esm/{BrowserUpload-AsxTQ4x8.js → BrowserUpload-Ch67b69G.js} +1 -1
- package/esm/{BrowserUpload-BGxUQPHj.d.ts → BrowserUpload-CuG3tWSo.d.ts} +2 -2
- package/esm/{CalmLensAppClient-B8O3Ai6H.js → CalmLensAppClient-DEFSQC15.js} +2 -2
- package/esm/{CalmLensAppClient-0to4ZZ7i.d.ts → CalmLensAppClient-QqtovWE-.d.ts} +1 -1
- package/esm/{CalmLensCdn-ZLaMr4XD.js → CalmLensCdn-xvzJyv9X.js} +1 -1
- package/esm/{CalmLensConnection-Duv-JB6o.js → CalmLensConnection-D6BVOMri.js} +1 -1
- package/esm/{CalmLensServerClient-CdQSdL6-.js → CalmLensServerClient-BGz_olSn.js} +2 -2
- package/esm/{CalmLensServerClient-CiiaFN7R.d.ts → CalmLensServerClient-csSQqHBt.d.ts} +2 -2
- package/esm/{CalmLensTestInputArguments-CqPADTkl.js → CalmLensTestInputArguments-DS_3mt1C.js} +2 -2
- package/esm/{CalmLensTypes-9kLIOd1C.d.ts → CalmLensTypes-_f7QVRtO.d.ts} +2 -2
- package/esm/{Core-CFxvTass.d.ts → Core-4iFxKJnY.d.ts} +2 -2
- package/esm/{Core-73r7ehG9.js → Core-Cj91IL4-.js} +2 -2
- package/esm/{ReactUpload-Dso2ir_F.d.ts → ReactUpload-4qd2xACg.d.ts} +1 -1
- package/esm/{ReactUpload-BrjxbrUo.js → ReactUpload-Bg4-5rV2.js} +1 -1
- package/esm/{UploadController-DLPXc9Ug.js → UploadController-CpLvD8W-.js} +1 -1
- package/{cjs/WebhookPayload-Cv2uwykA.d.ts → esm/WebhookPayload-BJtggTLd.d.ts} +1 -1
- package/esm/app.d.ts +4 -4
- package/esm/app.js +2 -2
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +4 -4
- package/esm/{index-D-ZwYNRQ.d.ts → index-IEA75nev.d.ts} +2 -2
- package/esm/index.d.ts +3 -3
- package/esm/index.js +1 -1
- package/esm/react-native.d.ts +2 -2
- package/esm/react-native.js +4 -4
- package/esm/react.d.ts +4 -4
- package/esm/react.js +5 -5
- package/esm/server.d.ts +4 -4
- package/esm/server.js +2 -2
- package/esm/test-inputs.js +1 -1
- package/esm/testing.d.ts +22 -5
- package/esm/testing.js +111 -12
- package/esm/{ui-BkOZ_jV_.d.ts → ui-BMQW3Hse.d.ts} +2 -2
- package/esm/{ui-Byxq-pmc.js → ui-CGrWIVKa.js} +2 -2
- package/esm/ui.d.ts +2 -2
- package/esm/ui.js +3 -3
- package/esm/vue.d.ts +5 -5
- package/esm/vue.js +4 -4
- package/package.json +1 -1
package/cjs/testing.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_CalmLensTestInputArguments = require("./CalmLensTestInputArguments-
|
|
2
|
+
const require_CalmLensTestInputArguments = require("./CalmLensTestInputArguments-C6S09FVQ.js");
|
|
3
3
|
const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
|
|
4
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
5
|
-
const require_CalmLensServerClient = require("./CalmLensServerClient
|
|
6
|
-
const require_CalmLensConnection = require("./CalmLensConnection-
|
|
4
|
+
const require_CalmLensCdn = require("./CalmLensCdn-D4I4Km4j.js");
|
|
5
|
+
const require_CalmLensServerClient = require("./CalmLensServerClient--L5qRzFd.js");
|
|
6
|
+
const require_CalmLensConnection = require("./CalmLensConnection-knkk2-BW.js");
|
|
7
7
|
const require_CryptoUtils_BLCa_oZe = require("./CryptoUtils-BLCa-oZe-leCkr1ko.js");
|
|
8
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
9
|
-
const require_UploadController = require("./UploadController-
|
|
8
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-Bt9GNyqS.js");
|
|
9
|
+
const require_UploadController = require("./UploadController-B-a2r2kN.js");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
let zod$1 = require_CalmLensTestInputArguments.__toESM(zod, 1);
|
|
12
12
|
zod = require_CalmLensTestInputArguments.__toESM(zod);
|
|
@@ -8132,7 +8132,19 @@ const fromBase64Url = (value) => {
|
|
|
8132
8132
|
const padded = value.padEnd(value.length + (4 - value.length % 4) % 4, "=");
|
|
8133
8133
|
return atob(padded.replaceAll("-", "+").replaceAll("_", "/"));
|
|
8134
8134
|
};
|
|
8135
|
-
|
|
8135
|
+
/**
|
|
8136
|
+
* Creates a mock API key holding `grants`. Throws `sdk/invalid-argument`, naming the grant, for
|
|
8137
|
+
* one the API doesn't accept, such as an unknown action.
|
|
8138
|
+
*/
|
|
8139
|
+
const createMockApiKey = (grants = []) => {
|
|
8140
|
+
const parsed = GRANTS_SCHEMA.safeParse(grants);
|
|
8141
|
+
if (!parsed.success) {
|
|
8142
|
+
const [issue] = parsed.error.issues;
|
|
8143
|
+
const path = (issue?.path ?? []).map((segment) => typeof segment === "number" ? segment : String(segment));
|
|
8144
|
+
throw require_CalmLensError.invalidArgument(`Invalid grant at ${["grants", ...path].join(".")}: ${issue?.message ?? parsed.error.message}`, { path });
|
|
8145
|
+
}
|
|
8146
|
+
return `${MOCK_API_KEY_PREFIX}${toBase64Url(JSON.stringify(parsed.data))}`;
|
|
8147
|
+
};
|
|
8136
8148
|
const getMockApiKeyGrants = (apiKey) => {
|
|
8137
8149
|
if (!apiKey.startsWith("sk_test_")) return [];
|
|
8138
8150
|
try {
|
|
@@ -8361,6 +8373,21 @@ const STATUS_ACTION = {
|
|
|
8361
8373
|
blocked: "block",
|
|
8362
8374
|
purged: "purge"
|
|
8363
8375
|
};
|
|
8376
|
+
const REGIONS = [
|
|
8377
|
+
"DE",
|
|
8378
|
+
"AT",
|
|
8379
|
+
"FR",
|
|
8380
|
+
"GB",
|
|
8381
|
+
"EU",
|
|
8382
|
+
"AU",
|
|
8383
|
+
"BR"
|
|
8384
|
+
];
|
|
8385
|
+
const REGIONAL_STATUSES = [
|
|
8386
|
+
"limited",
|
|
8387
|
+
"age-restricted",
|
|
8388
|
+
"blocked",
|
|
8389
|
+
"purged"
|
|
8390
|
+
];
|
|
8364
8391
|
/** The likelihood the API reports for a score (ClassificationCategories.ts, scoreToLikelihood). */
|
|
8365
8392
|
const scoreToLikelihood = (score) => score >= .8 ? "very-likely" : score >= .6 ? "likely" : score >= .4 ? "possible" : score >= .2 ? "unlikely" : "very-unlikely";
|
|
8366
8393
|
const isScore = (score) => typeof score === "number" && Number.isFinite(score) && score >= 0 && score <= 1;
|
|
@@ -8373,6 +8400,7 @@ const isScore = (score) => typeof score === "number" && Number.isFinite(score) &
|
|
|
8373
8400
|
var MockDecision = class {
|
|
8374
8401
|
#flags = /* @__PURE__ */ new Map();
|
|
8375
8402
|
#notEvaluated = /* @__PURE__ */ new Set();
|
|
8403
|
+
#regions = [];
|
|
8376
8404
|
#pendingReview;
|
|
8377
8405
|
#ocr;
|
|
8378
8406
|
#linkDetection;
|
|
@@ -8412,6 +8440,30 @@ var MockDecision = class {
|
|
|
8412
8440
|
return this;
|
|
8413
8441
|
}
|
|
8414
8442
|
/**
|
|
8443
|
+
* Adds a stricter `status` for viewers under the jurisdiction `region` (`DE`, `AT`, `FR`, `GB`,
|
|
8444
|
+
* `EU`, `AU` or `BR`), set by the mandatory `rule`, optionally acting on `category`, as
|
|
8445
|
+
* `classification.moderation.regions` reports it. The mock CDN applies it for a viewer whose
|
|
8446
|
+
* `region` claim falls under that jurisdiction, while the project serves it.
|
|
8447
|
+
*/
|
|
8448
|
+
region(region, status, rule, category) {
|
|
8449
|
+
if (this.status === "pending" || this.status === "failed") throw require_CalmLensError.invalidArgument(`a ${this.status} decision has no regional outcomes`);
|
|
8450
|
+
if (!REGIONS.includes(region)) throw require_CalmLensError.invalidArgument(`region must be one of ${REGIONS.join(", ")}`);
|
|
8451
|
+
if (!REGIONAL_STATUSES.includes(status)) throw require_CalmLensError.invalidArgument(`a regional status must be one of ${REGIONAL_STATUSES.join(", ")}`);
|
|
8452
|
+
if (typeof rule !== "string" || !rule) throw require_CalmLensError.invalidArgument("rule must be a non-empty string");
|
|
8453
|
+
if (category !== void 0) this.#checkCategory(category);
|
|
8454
|
+
this.#regions.push({
|
|
8455
|
+
region,
|
|
8456
|
+
status,
|
|
8457
|
+
rule,
|
|
8458
|
+
...category !== void 0 && { category }
|
|
8459
|
+
});
|
|
8460
|
+
return this;
|
|
8461
|
+
}
|
|
8462
|
+
/** @internal The regional outcomes `region` added. */
|
|
8463
|
+
get regionalDecisions() {
|
|
8464
|
+
return structuredClone(this.#regions);
|
|
8465
|
+
}
|
|
8466
|
+
/**
|
|
8415
8467
|
* Leaves the decision waiting for human review, as `classification.moderation.pendingReview`
|
|
8416
8468
|
* reports: `sampled`, or `uncertain` with the `uncertainCategories` that made it so. The queue's
|
|
8417
8469
|
* decision (`decide` on the mock) clears it; `assets.decide` doesn't, as with the API.
|
|
@@ -8534,7 +8586,7 @@ var MockDecision = class {
|
|
|
8534
8586
|
source: "policy",
|
|
8535
8587
|
rule: null,
|
|
8536
8588
|
automatedStatus: status,
|
|
8537
|
-
regions:
|
|
8589
|
+
regions: structuredClone(this.#regions),
|
|
8538
8590
|
timeline: null,
|
|
8539
8591
|
flaggedCategories: evaluated.filter(([, score]) => action(score) !== "allow").map(([category]) => category),
|
|
8540
8592
|
raw: {
|
|
@@ -9369,6 +9421,14 @@ const checkMockUploadPreset = (preset) => {
|
|
|
9369
9421
|
const unknown = Object.keys(preset).filter((key) => !MOCK_UPLOAD_PRESET_KEYS.includes(key));
|
|
9370
9422
|
if (unknown.length) throw require_CalmLensError.invalidArgument(`Unknown mockOptions.preset key${unknown.length > 1 ? "s" : ""}: ${unknown.join(", ")}`, { options: unknown });
|
|
9371
9423
|
};
|
|
9424
|
+
/** How strict each status a regional outcome can set is, above an allowed asset's. */
|
|
9425
|
+
const REGIONAL_STATUS_RANK = {
|
|
9426
|
+
allowed: 0,
|
|
9427
|
+
limited: 1,
|
|
9428
|
+
"age-restricted": 2,
|
|
9429
|
+
blocked: 3,
|
|
9430
|
+
purged: 4
|
|
9431
|
+
};
|
|
9372
9432
|
const MAX_PAGE_SIZE = 100;
|
|
9373
9433
|
/** Hashes with a lower PDQ quality never match (HashList.ts, HASH_MATCH_MIN_QUALITY). */
|
|
9374
9434
|
const HASH_MATCH_MIN_QUALITY = 50;
|
|
@@ -12177,7 +12237,9 @@ var MockCalmLensApi = class {
|
|
|
12177
12237
|
} catch {
|
|
12178
12238
|
return this.jsonResponse(400, { code: "viewer-claims/invalid" }, url);
|
|
12179
12239
|
}
|
|
12180
|
-
|
|
12240
|
+
const gate = this.viewerAvailability(asset, claims);
|
|
12241
|
+
if (gate.availability === "unavailable") return gate.code === "asset/not-available" ? notAvailable() : this.jsonResponse(403, { code: gate.code }, url);
|
|
12242
|
+
if (gate.availability === "age-restricted") return this.jsonResponse(403, { code: "viewer/age-confirmation-required" }, url);
|
|
12181
12243
|
const isPrivate = asset.visibility !== "public";
|
|
12182
12244
|
if (isPrivate && !grant && !canDownload()) return this.jsonResponse(403, {
|
|
12183
12245
|
code: "auth/permission-denied",
|
|
@@ -12231,6 +12293,43 @@ var MockCalmLensApi = class {
|
|
|
12231
12293
|
});
|
|
12232
12294
|
}
|
|
12233
12295
|
/**
|
|
12296
|
+
* Whether the viewer the claims describe may see an asset that no unconditional check refused,
|
|
12297
|
+
* as the CDN decides (AssetAvailability.ts, decideAssetAvailability): while the project blocks
|
|
12298
|
+
* unmoderated assets, one still queued or processing is unavailable. Then the strictest of the
|
|
12299
|
+
* decision's regional outcomes that is stricter than its own status applies, among the viewer's
|
|
12300
|
+
* country and, in an EU member state, the EU, while the project serves that jurisdiction:
|
|
12301
|
+
* blocked or purged is unavailable and age-restricted needs `ageConfirmed`. An asset with such an
|
|
12302
|
+
* outcome needs the viewer's region, which the CDN reads from the connection when the claims
|
|
12303
|
+
* leave it out; the mock has no connection, so it needs the claim.
|
|
12304
|
+
*/
|
|
12305
|
+
viewerAvailability(asset, claims) {
|
|
12306
|
+
const settings = this.toProjectSettings().settings;
|
|
12307
|
+
const processing = asset.classification.status === "queued" || asset.classification.status === "processing";
|
|
12308
|
+
if (settings.blockUnmoderatedAssets && processing) return {
|
|
12309
|
+
availability: "unavailable",
|
|
12310
|
+
code: "asset/not-available"
|
|
12311
|
+
};
|
|
12312
|
+
const status = asset.classification.moderation.decision;
|
|
12313
|
+
const base = REGIONAL_STATUS_RANK[status] ?? 0;
|
|
12314
|
+
const optedOut = settings.optOutJurisdictions ?? [];
|
|
12315
|
+
const stricter = (asset.classification.moderation.regions ?? []).filter((entry) => !optedOut.includes(entry.region) && REGIONAL_STATUS_RANK[entry.status] > base);
|
|
12316
|
+
let delivered = status;
|
|
12317
|
+
if (stricter.length) {
|
|
12318
|
+
const region = claims.region;
|
|
12319
|
+
if (typeof region !== "string" || !region) return {
|
|
12320
|
+
availability: "unavailable",
|
|
12321
|
+
code: "viewer/region-required"
|
|
12322
|
+
};
|
|
12323
|
+
const applied = stricter.filter((entry) => entry.region === region || entry.region === "EU" && require_CalmLensTestInputArguments.EU_COUNTRIES.has(region)).sort((a, b) => REGIONAL_STATUS_RANK[b.status] - REGIONAL_STATUS_RANK[a.status])[0];
|
|
12324
|
+
if (applied?.status === "blocked" || applied?.status === "purged") return {
|
|
12325
|
+
availability: "unavailable",
|
|
12326
|
+
code: "asset/not-available"
|
|
12327
|
+
};
|
|
12328
|
+
if (applied?.status === "age-restricted") delivered = "age-restricted";
|
|
12329
|
+
}
|
|
12330
|
+
return delivered === "age-restricted" && claims.ageConfirmed !== true ? { availability: "age-restricted" } : { availability: "available" };
|
|
12331
|
+
}
|
|
12332
|
+
/**
|
|
12234
12333
|
* The display info at `/info`, like the CDN's (AssetInfo.ts): the allowlisted fields and whether
|
|
12235
12334
|
* the viewer the claims describe can see the content, decided as the other resources decide it.
|
|
12236
12335
|
* A private asset's needs a grant or an API key with `assets:download`.
|
|
@@ -12251,7 +12350,7 @@ var MockCalmLensApi = class {
|
|
|
12251
12350
|
const status = asset.classification.moderation.decision;
|
|
12252
12351
|
const restrictedInfo = isPrivate || status === "blocked" || status === "purged";
|
|
12253
12352
|
if (restrictedInfo && !authorised) return this.jsonResponse(403, { code: "asset/not-available" }, url);
|
|
12254
|
-
const availability = asset.content.safetyHold || asset.upload.status === "uploading" || status === "blocked" || status === "purged" || asset.classification.status === "failed" || asset.content.status === "removed" ? "unavailable" :
|
|
12353
|
+
const availability = asset.content.safetyHold || asset.upload.status === "uploading" || status === "blocked" || status === "purged" || asset.classification.status === "failed" || asset.content.status === "removed" ? "unavailable" : this.viewerAvailability(asset, claims).availability;
|
|
12255
12354
|
const { content } = asset;
|
|
12256
12355
|
const info = {
|
|
12257
12356
|
id: asset.id,
|
|
@@ -12451,8 +12550,8 @@ var MockCalmLensServerClient = class extends require_CalmLensServerClient.CalmLe
|
|
|
12451
12550
|
api.useTimers = mockOptions.useTimers ?? false;
|
|
12452
12551
|
let endpoints;
|
|
12453
12552
|
super({
|
|
12454
|
-
maxRetries: 0,
|
|
12455
12553
|
...clientOptions,
|
|
12554
|
+
maxRetries: clientOptions.maxRetries ?? 0,
|
|
12456
12555
|
dangerouslyAllowBrowser: true,
|
|
12457
12556
|
...mockClientOptions(api, () => endpoints)
|
|
12458
12557
|
});
|
|
@@ -12613,8 +12712,8 @@ var MockCalmLensAppClient = class extends require_CalmLensAppClient.CalmLensAppC
|
|
|
12613
12712
|
uploads: /* @__PURE__ */ new Set()
|
|
12614
12713
|
});
|
|
12615
12714
|
super({
|
|
12616
|
-
maxRetries: 0,
|
|
12617
12715
|
...clientOptions,
|
|
12716
|
+
maxRetries: clientOptions.maxRetries ?? 0,
|
|
12618
12717
|
...requestOptions
|
|
12619
12718
|
});
|
|
12620
12719
|
endpoints = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./CalmLensTypes-
|
|
2
|
-
import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-
|
|
1
|
+
import "./CalmLensTypes-_f7QVRtO.js";
|
|
2
|
+
import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-4iFxKJnY.js";
|
|
3
3
|
import "pdfjs-dist";
|
|
4
4
|
/** A viewer mounted into an element, which it owns the children of. */
|
|
5
5
|
interface AssetViewer<O extends ViewerOptions = ViewerOptions> {
|
package/cjs/ui.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-
|
|
2
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-4iFxKJnY.js";
|
|
2
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BMQW3Hse.js";
|
|
3
3
|
export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, type AssetDisplay, type AssetDisplayOptions, type AssetDocumentOptions, type AssetEventHandlers, type AssetImageOptions, type AssetImageSource, type AssetOptions, type AssetProps, AssetSession, type AssetSessionState, type AssetSpreadsheetOptions, type AssetVideoOptions, type AssetView, type AssetViewer, type AssetViewerKind, AssetViewerMount, AssetViewerName, AssetViewerOptionsByKind, CALMLENS_STYLES, CALMLENS_THEME, type CalmLensMessages, type CalmLensProvidedOptions, type CalmLensTheme, type CalmLensUpload, type CustomUploadContext, type CustomUploadResult, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, type DocumentViewerOptions, ICONS, ICON_ATTRIBUTES, INSTANT_LOAD_MS, type IconName, type MediaPlayback, MediaStreamPlayer, type MountedViewerKind, type PdfAssetOptions, type ProgressFetchOptions, type SpreadsheetCell, type SpreadsheetRow, type SpreadsheetSheet, type SpreadsheetViewerOptions, type TextViewerOptions, type UploadClient, UploadController, type UploadControllerOptions, type UploadFile, type UploadItem, type UploadItemView, type UploadSnapshot, type UploadStage, type UploaderDisplayOptions, type UploaderProps, type UploaderView, VIEWER_STYLES, type ViewerAsset, type ViewerMessages, type ViewerOptions, type ViewerState, type ViewerTextOptions, createDocumentViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isImageReady, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex, withProvidedOptions };
|
package/cjs/ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ui = require("./ui-
|
|
3
|
-
const require_Core = require("./Core-
|
|
4
|
-
const require_UploadController = require("./UploadController-
|
|
2
|
+
const require_ui = require("./ui-DOkuD90x.js");
|
|
3
|
+
const require_Core = require("./Core-CNsji7uR.js");
|
|
4
|
+
const require_UploadController = require("./UploadController-B-a2r2kN.js");
|
|
5
5
|
exports.ASSET_FILE_ICON_SIZE = require_Core.ASSET_FILE_ICON_SIZE;
|
|
6
6
|
exports.ASSET_VIEWERS = require_ui.ASSET_VIEWERS;
|
|
7
7
|
exports.AssetSession = require_Core.AssetSession;
|
package/cjs/vue.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-
|
|
4
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
5
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-_f7QVRtO.js";
|
|
2
|
+
import "./index-IEA75nev.js";
|
|
3
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-4iFxKJnY.js";
|
|
4
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-CuG3tWSo.js";
|
|
5
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BMQW3Hse.js";
|
|
6
6
|
import { App, MaybeRefOrGetter, PropType, ShallowRef } from "vue";
|
|
7
7
|
/** Shows a text asset's text, escaped, in a scrolling region. */
|
|
8
8
|
export declare const CalmLensTextViewer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
package/cjs/vue.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ui = require("./ui-
|
|
3
|
-
const require_Core = require("./Core-
|
|
4
|
-
const require_UploadController = require("./UploadController-
|
|
2
|
+
const require_ui = require("./ui-DOkuD90x.js");
|
|
3
|
+
const require_Core = require("./Core-CNsji7uR.js");
|
|
4
|
+
const require_UploadController = require("./UploadController-B-a2r2kN.js");
|
|
5
5
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
6
|
-
const require_BrowserUpload = require("./BrowserUpload-
|
|
6
|
+
const require_BrowserUpload = require("./BrowserUpload-BOXt-BFy.js");
|
|
7
7
|
let vue = require("vue");
|
|
8
8
|
// src/viewers/Vue.ts
|
|
9
9
|
const optional$1 = (type) => ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createUploadController$1 } from "./UploadController-
|
|
1
|
+
import { n as createUploadController$1 } from "./UploadController-CpLvD8W-.js";
|
|
2
2
|
// src/ui/BrowserUpload.ts
|
|
3
3
|
/** Creates an upload queue for the browser components, such as one a form starts on submit. */
|
|
4
4
|
const createUploadController = (options) => createUploadController$1(options);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as UploadFile, I as UploadItem$1, L as UploadSnapshot$1, N as UploadController, P as UploadControllerOptions$1, h as UploaderProps$1, k as CalmLensUpload$1 } from "./Core-
|
|
2
|
-
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-
|
|
1
|
+
import { F as UploadFile, I as UploadItem$1, L as UploadSnapshot$1, N as UploadController, P as UploadControllerOptions$1, h as UploaderProps$1, k as CalmLensUpload$1 } from "./Core-4iFxKJnY.js";
|
|
2
|
+
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-4qd2xACg.js";
|
|
3
3
|
type UploadItem<F extends UploadFile = File> = UploadItem$1<F>;
|
|
4
4
|
type CalmLensUpload<F extends UploadFile = File> = CalmLensUpload$1<F>;
|
|
5
5
|
type UploadSnapshot<F extends UploadFile = File> = UploadSnapshot$1<F>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as invalidConfig, S as invalidArgument } from "./CalmLensError-C15tWu8W.js";
|
|
2
|
-
import { S as validateAppClientOptions, d as checkOptionKeys, o as buildAssetUrl, p as encodePathSegment, u as DEFAULT_CDN_BASE_URL } from "./CalmLensCdn-
|
|
3
|
-
import { c as prepareSubmitAssetOptions, f as APP_OPTION_KEYS, i as expectUploadedAsset, l as resolveConnectionOptions, t as CalmLensConnection, u as splitsIntoParts } from "./CalmLensConnection-
|
|
2
|
+
import { S as validateAppClientOptions, d as checkOptionKeys, o as buildAssetUrl, p as encodePathSegment, u as DEFAULT_CDN_BASE_URL } from "./CalmLensCdn-xvzJyv9X.js";
|
|
3
|
+
import { c as prepareSubmitAssetOptions, f as APP_OPTION_KEYS, i as expectUploadedAsset, l as resolveConnectionOptions, t as CalmLensConnection, u as splitsIntoParts } from "./CalmLensConnection-D6BVOMri.js";
|
|
4
4
|
// src/client/CalmLensAppClient.ts
|
|
5
5
|
const inspectSymbol = Symbol.for("nodejs.util.inspect.custom");
|
|
6
6
|
/** `options`, once `checkOptionKeys` finds only keys `operation` takes. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, Rt as RequestOptions, Vt as RetrieveAssetOptions, an as UploadAssetPartOptions, ln as UploadPresetSubmitAssetOptions, un as UploadedAsset } from "./CalmLensTypes-
|
|
1
|
+
import { M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, Rt as RequestOptions, Vt as RetrieveAssetOptions, an as UploadAssetPartOptions, ln as UploadPresetSubmitAssetOptions, un as UploadedAsset } from "./CalmLensTypes-_f7QVRtO.js";
|
|
2
2
|
declare const inspectSymbol: unique symbol;
|
|
3
3
|
/**
|
|
4
4
|
* The CalmLens client for browsers and React Native apps. It uploads through an upload preset,
|
|
@@ -152,7 +152,7 @@ const listPages = (fetchPage, { cursor, feed = false } = {}) => {
|
|
|
152
152
|
};
|
|
153
153
|
// src/client/CalmLensVersion.ts
|
|
154
154
|
/** This SDK's version, from its package.json. */
|
|
155
|
-
const SDK_VERSION = "0.
|
|
155
|
+
const SDK_VERSION = "0.37.0";
|
|
156
156
|
const runtimeName = () => {
|
|
157
157
|
const runtime = globalThis;
|
|
158
158
|
if (isReactNativeRuntime()) return "react-native";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as invalidArgument, l as CalmLensError, w as API_ERROR_CODES, x as SDK_ERROR_CODES } from "./CalmLensError-C15tWu8W.js";
|
|
2
|
-
import { A as MAX_OTHER_DOCUMENT_UPLOAD_BYTES, D as MAX_DIRECT_IMAGE_UPLOAD_BYTES, F as sleep, M as getRejectedUploadMimeTypeError, N as normalizeUploadMimeType, O as MAX_IMAGE_UPLOAD_BYTES, P as CalmLensTransport, T as UPLOAD_MIME_DOCUMENTS, U as resolveLogLevel, _ as randomUuid, j as MAX_PDF_UPLOAD_BYTES, k as MAX_NON_IMAGE_UPLOAD_BYTES, m as isAcceptedUploadMimeType, y as stringifyQuery } from "./CalmLensCdn-
|
|
2
|
+
import { A as MAX_OTHER_DOCUMENT_UPLOAD_BYTES, D as MAX_DIRECT_IMAGE_UPLOAD_BYTES, F as sleep, M as getRejectedUploadMimeTypeError, N as normalizeUploadMimeType, O as MAX_IMAGE_UPLOAD_BYTES, P as CalmLensTransport, T as UPLOAD_MIME_DOCUMENTS, U as resolveLogLevel, _ as randomUuid, j as MAX_PDF_UPLOAD_BYTES, k as MAX_NON_IMAGE_UPLOAD_BYTES, m as isAcceptedUploadMimeType, y as stringifyQuery } from "./CalmLensCdn-xvzJyv9X.js";
|
|
3
3
|
// src/contract/AssetPayload.js
|
|
4
4
|
const bufferInputToBytes = (value) => {
|
|
5
5
|
if (value instanceof ArrayBuffer) return new Uint8Array(value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as invalidConfig, S as invalidArgument, l as CalmLensError, x as SDK_ERROR_CODES } from "./CalmLensError-C15tWu8W.js";
|
|
2
|
-
import { B as copyLastResponse, C as validateBatchAssetsOptions, H as readEnv, L as isBrowserRuntime, R as isReactNativeRuntime, V as listPages, b as toTextAssetOptions, d as checkOptionKeys, g as pollForDecision, i as appendSignedLocation, l as validateSignAssetUrlOptions, o as buildAssetUrl, p as encodePathSegment, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, w as validateServerClientOptions, y as stringifyQuery } from "./CalmLensCdn-
|
|
3
|
-
import { a as getMockHooks, c as prepareSubmitAssetOptions, d as validateCallOptions, l as resolveConnectionOptions, m as SERVER_OPTION_KEYS, o as invalidPayload, p as NULLABLE_OPTION_KEYS, r as expectAsset, s as newIdempotencyKey, t as CalmLensConnection, u as splitsIntoParts } from "./CalmLensConnection-
|
|
2
|
+
import { B as copyLastResponse, C as validateBatchAssetsOptions, H as readEnv, L as isBrowserRuntime, R as isReactNativeRuntime, V as listPages, b as toTextAssetOptions, d as checkOptionKeys, g as pollForDecision, i as appendSignedLocation, l as validateSignAssetUrlOptions, o as buildAssetUrl, p as encodePathSegment, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, w as validateServerClientOptions, y as stringifyQuery } from "./CalmLensCdn-xvzJyv9X.js";
|
|
3
|
+
import { a as getMockHooks, c as prepareSubmitAssetOptions, d as validateCallOptions, l as resolveConnectionOptions, m as SERVER_OPTION_KEYS, o as invalidPayload, p as NULLABLE_OPTION_KEYS, r as expectAsset, s as newIdempotencyKey, t as CalmLensConnection, u as splitsIntoParts } from "./CalmLensConnection-D6BVOMri.js";
|
|
4
4
|
import { n as sha256Hex, r as timingSafeEqual, t as hmacSha256Hex } from "./CryptoUtils-BLCa-oZe-DKr3LmN6.js";
|
|
5
5
|
// src/contract/JsonUtils.js
|
|
6
6
|
const stringifyJsonCanonical = (value) => JSON.stringify(value, (_key, nestedValue) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as HashList, l as HashListEntry } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $t as UpdateFolderOptions, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, Ct as ListPoliciesOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as MoveFolderOptions, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gt as SignAssetUrlOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Nt as ProjectSettingsResource, P as CdnServeOptions, Qt as UpdateAssetOptions, Rn as Folder, Rt as RequestOptions, St as ListLensesOptions, T as AssignPolicyOptions, Tt as MoveAssetOptions, U as CreatePolicyOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Z as EnsureUploadPresetsResponse, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bt as ListHashListEntriesOptions, cn as UploadPresetPage, ct as HashListIdOptions, dn as VerifyWebhookSignatureOptions, en as UpdateHashListOptions, ft as Lens, gt as ListAssetTimelineOptions, ht as ListAssetChildrenOptions, in as UpgradePolicyOptions, it as FolderPage, jt as PolicyPage, k as CalmLensServerClientOptions, kt as Policy, lt as HashListPage, mt as LensPage, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, ot as HashListEntryIdOptions, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, v as AssetSearchResponse, vt as ListEventsOptions, wt as ListUploadPresetsOptions, xt as ListHashListsOptions, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-
|
|
2
|
+
import { $t as UpdateFolderOptions, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, Ct as ListPoliciesOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as MoveFolderOptions, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gt as SignAssetUrlOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Nt as ProjectSettingsResource, P as CdnServeOptions, Qt as UpdateAssetOptions, Rn as Folder, Rt as RequestOptions, St as ListLensesOptions, T as AssignPolicyOptions, Tt as MoveAssetOptions, U as CreatePolicyOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Z as EnsureUploadPresetsResponse, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bt as ListHashListEntriesOptions, cn as UploadPresetPage, ct as HashListIdOptions, dn as VerifyWebhookSignatureOptions, en as UpdateHashListOptions, ft as Lens, gt as ListAssetTimelineOptions, ht as ListAssetChildrenOptions, in as UpgradePolicyOptions, it as FolderPage, jt as PolicyPage, k as CalmLensServerClientOptions, kt as Policy, lt as HashListPage, mt as LensPage, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, ot as HashListEntryIdOptions, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, v as AssetSearchResponse, vt as ListEventsOptions, wt as ListUploadPresetsOptions, xt as ListHashListsOptions, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zt as ResetPolicyOptions } from "./CalmLensTypes-_f7QVRtO.js";
|
|
3
|
+
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-BJtggTLd.js";
|
|
4
4
|
interface TransportRequest {
|
|
5
5
|
/** The client method sending the request, such as `assets.retrieve`, for hooks and logs. */
|
|
6
6
|
operation?: string;
|
package/esm/{CalmLensTestInputArguments-CqPADTkl.js → CalmLensTestInputArguments-DS_3mt1C.js}
RENAMED
|
@@ -134,7 +134,7 @@ const JURISDICTION_SCHEMA = /* @__PURE__ */ lazySchema(() => z.enum(Object.keys(
|
|
|
134
134
|
Object.keys(JURISDICTIONS).filter((code) => !JURISDICTIONS[code].optional);
|
|
135
135
|
Object.keys(JURISDICTIONS).filter((code) => JURISDICTIONS[code].optional);
|
|
136
136
|
new Set("AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(" "));
|
|
137
|
-
new Set("AT BE BG HR CY CZ DK EE FI FR DE GR HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE".split(" "));
|
|
137
|
+
const EU_COUNTRIES = new Set("AT BE BG HR CY CZ DK EE FI FR DE GR HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE".split(" "));
|
|
138
138
|
// src/contract/TestRegionalActions-Ce8EVv4q.js
|
|
139
139
|
/**
|
|
140
140
|
* Marks English text in shared, backend and data modules that the portal shows, so the app's
|
|
@@ -1978,4 +1978,4 @@ async function withValidTestInputArguments(key, generate) {
|
|
|
1978
1978
|
throw error;
|
|
1979
1979
|
}
|
|
1980
1980
|
}
|
|
1981
|
-
export { TEST_FACE_AGE_PRESETS as a, detectTestImage as c, getImageTestCategories as d, getTestInputTag as f,
|
|
1981
|
+
export { CLASSIFICATION_CATEGORIES as _, TEST_FACE_AGE_PRESETS as a, detectTestImage as c, getImageTestCategories as d, getTestInputTag as f, lazySchema as g, EU_COUNTRIES as h, TEST_FACE_AGE_MAX as i, detectTestTrigger as l, testInputForSignal as m, TEST_DETECTIONS_MAX as n, TEST_INPUT_KEY_PATTERN as o, paintTestImage as p, TEST_DETECTION_BOX_MAX as r, TEST_INPUT_PRESETS as s, withValidTestInputArguments as t, generateTestTextCode as u };
|
|
@@ -38010,7 +38010,7 @@ declare const DETECTED_FACE_SCHEMA: zod.ZodObject<{
|
|
|
38010
38010
|
}, zod.core.$strict>>;
|
|
38011
38011
|
}, zod.core.$strict>;
|
|
38012
38012
|
type DetectedFace = zod.infer<typeof DETECTED_FACE_SCHEMA>;
|
|
38013
|
-
declare const
|
|
38013
|
+
declare const ALL_FEATURE_RESULTS_SCHEMA: zod.ZodObject<{
|
|
38014
38014
|
ocr: zod.ZodOptional<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
38015
38015
|
status: zod.ZodLiteral<"evaluated">;
|
|
38016
38016
|
textRegions: zod.ZodArray<zod.ZodObject<{
|
|
@@ -38160,7 +38160,7 @@ declare const PROCESSING_FEATURE_RESULTS_SCHEMA: zod.ZodObject<{
|
|
|
38160
38160
|
}>;
|
|
38161
38161
|
}, zod.core.$strict>], "status">>;
|
|
38162
38162
|
}, zod.core.$strict>;
|
|
38163
|
-
type ProcessingFeatureResults = zod.infer<typeof
|
|
38163
|
+
type ProcessingFeatureResults = Omit<zod.infer<typeof ALL_FEATURE_RESULTS_SCHEMA>, "linkSafety">;
|
|
38164
38164
|
declare const UPLOAD_PRESET_SCHEMA: zod.ZodObject<{
|
|
38165
38165
|
id: zod.ZodString;
|
|
38166
38166
|
projectId: zod.ZodString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as CdnTransform, O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
1
|
+
import { F as CdnTransform, O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-_f7QVRtO.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-QqtovWE-.js";
|
|
3
3
|
import { o as UploadFileIconFamily } from "./FileIcons-4qSX7DW2.js";
|
|
4
4
|
/**
|
|
5
5
|
* The text the asset viewers show, keyed by name. `{name}` placeholders are filled in when shown.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as CalmLensError } from "./CalmLensError-C15tWu8W.js";
|
|
2
|
-
import { a as assetUrlOf, c as toUrlViewerClaims, r as appendAssetLocation, s as getAssetInfo, v as serializeTransform, x as transformSelector } from "./CalmLensCdn-
|
|
3
|
-
import { o as placeholderHashToDataURL } from "./UploadController-
|
|
2
|
+
import { a as assetUrlOf, c as toUrlViewerClaims, r as appendAssetLocation, s as getAssetInfo, v as serializeTransform, x as transformSelector } from "./CalmLensCdn-xvzJyv9X.js";
|
|
3
|
+
import { o as placeholderHashToDataURL } from "./UploadController-CpLvD8W-.js";
|
|
4
4
|
import { a as getFileIcon, c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
|
|
5
5
|
// src/ui/viewers/ViewerAsset.ts
|
|
6
6
|
/** Spreadsheet MIME types, as `content.format` reports them (compared lower-cased). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-
|
|
1
|
+
import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-4iFxKJnY.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
type CalmLensProviderProps<F extends UploadFile = File> = CalmLensProvidedOptions<F> & {
|
|
4
4
|
children?: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as withProvidedOptions, n as createUploadController } from "./UploadController-
|
|
1
|
+
import { i as withProvidedOptions, n as createUploadController } from "./UploadController-CpLvD8W-.js";
|
|
2
2
|
import { createContext, createElement, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
// src/ui/ReactUpload.ts
|
|
4
4
|
const CalmLensContext = createContext(void 0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as CalmLensError, x as SDK_ERROR_CODES } from "./CalmLensError-C15tWu8W.js";
|
|
2
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-DEFSQC15.js";
|
|
3
3
|
// src/contract/PlaceholderHashDecode.js
|
|
4
4
|
/**
|
|
5
5
|
* Decodes a ThumbHash to an RGBA image. RGB is not be premultiplied by A.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fn as EventResourceKind, Nn as TypedEvent, jn as Actor } from "./CalmLensTypes-
|
|
1
|
+
import { Fn as EventResourceKind, Nn as TypedEvent, jn as Actor } from "./CalmLensTypes-_f7QVRtO.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
/** Error codes the CalmLens API documents, by name. */
|
|
4
4
|
declare const API_ERROR_CODES: {
|
package/esm/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, i as ClassificationNotEvaluatedReason, l as HashListEntry, n as ClassificationCategory, o as Likelihood, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
4
|
-
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-
|
|
5
|
-
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-
|
|
2
|
+
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-_f7QVRtO.js";
|
|
3
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-QqtovWE-.js";
|
|
4
|
+
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-IEA75nev.js";
|
|
5
|
+
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-BJtggTLd.js";
|
|
6
6
|
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAppClient, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventResource, type EventResourceKind, type EventSeverity, type EventType, type EventsPage, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPage, type ListPoliciesOptions, type ListPromise, type ListUploadPresetsOptions, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type PolicySettings, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo };
|
package/esm/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-C15tWu8W.js";
|
|
2
|
-
import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-
|
|
2
|
+
import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-xvzJyv9X.js";
|
|
3
3
|
import "./index.js";
|
|
4
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
4
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-DEFSQC15.js";
|
|
5
5
|
export { AUTO_PAGING_TO_ARRAY_MAX, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAppClient, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, DEFAULT_CDN_BASE_URL, SDK_VERSION, getAssetInfo };
|
package/esm/elements.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-
|
|
3
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
4
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { i as AssetAvailability } from "./CalmLensTypes-_f7QVRtO.js";
|
|
2
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-4iFxKJnY.js";
|
|
3
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-CuG3tWSo.js";
|
|
4
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BMQW3Hse.js";
|
|
5
5
|
declare const BaseElement$1: typeof HTMLElement;
|
|
6
6
|
/**
|
|
7
7
|
* An asset viewer element. Set the `src` attribute to the asset URL (public or signed) and the
|
package/esm/elements.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-
|
|
2
|
-
import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-
|
|
3
|
-
import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController$1, r as isFileAccepted, t as UploadController } from "./UploadController-
|
|
1
|
+
import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-CGrWIVKa.js";
|
|
2
|
+
import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-Cj91IL4-.js";
|
|
3
|
+
import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController$1, r as isFileAccepted, t as UploadController } from "./UploadController-CpLvD8W-.js";
|
|
4
4
|
import { c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
|
|
5
|
-
import { t as createUploadController } from "./BrowserUpload-
|
|
5
|
+
import { t as createUploadController } from "./BrowserUpload-Ch67b69G.js";
|
|
6
6
|
// src/viewers/Elements.ts
|
|
7
7
|
const BaseElement$1 = typeof HTMLElement === "undefined" ? class {} : HTMLElement;
|
|
8
8
|
const PROPERTIES = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { Hn as AssetInfo, N as CdnResource, at as GetAssetInfoOptions } from "./CalmLensTypes-
|
|
3
|
-
import "./WebhookPayload-
|
|
2
|
+
import { Hn as AssetInfo, N as CdnResource, at as GetAssetInfoOptions } from "./CalmLensTypes-_f7QVRtO.js";
|
|
3
|
+
import "./WebhookPayload-BJtggTLd.js";
|
|
4
4
|
/** Every CDN resource beneath an asset URL, as `getAssetUrl` and `signAssetUrl` accept them. */
|
|
5
5
|
declare const CDN_RESOURCES: CdnResource[];
|
|
6
6
|
/**
|