calmlens 0.21.0 → 0.22.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 +3 -2
- package/bin/calmlens.js +571 -67
- package/{esm/BrowserUpload-D-NnAN7g.d.ts → cjs/BrowserUpload-BWjZ9ntu.d.ts} +2 -2
- package/cjs/{BrowserUpload-CeSwiMo5.js → BrowserUpload-Bwlib4Zc.js} +1 -1
- package/{esm/CalmLensAppClient-gG16T2py.d.ts → cjs/CalmLensAppClient-BaW3ddUR.d.ts} +1 -1
- package/cjs/{CalmLensAppClient-0UVCuNqW.js → CalmLensAppClient-DUYMo9PZ.js} +3 -3
- package/cjs/{CalmLensOptionKeys-CYY6elxg.js → CalmLensOptionKeys-YvgV995V.js} +139 -31
- package/cjs/{CalmLensServerClient-nfu6_YEW.js → CalmLensServerClient-3N-gdsxC.js} +61 -4
- package/cjs/{CalmLensServerClient-BHx3x_nZ.d.ts → CalmLensServerClient-BKzn8zmp.d.ts} +38 -2
- package/cjs/{CalmLensTypes-CUB0YYVz.d.ts → CalmLensTypes-BDKwThbO.d.ts} +612 -53
- package/{esm/Core-C82YmjjX.d.ts → cjs/Core-C33pkBmf.d.ts} +7 -4
- package/cjs/{Core-Dc3cteU7.js → Core-Cm5Z1oJ9.js} +9 -6
- package/cjs/{ModerationContextLimits-BxOmeSqq.js → ModerationContextLimits-ud1xpZRK.js} +61 -2
- package/cjs/{ReactUpload-BK2O3dnK.js → ReactUpload-DQ0BYISX.js} +1 -1
- package/cjs/{ReactUpload-DiiXfKvj.d.ts → ReactUpload-DhF8mm51.d.ts} +1 -1
- package/cjs/{TestTriggers-BTyXtX0Q-ATuFDhLX.js → TestTriggers-D29T_R0M-D6Bu-Mln.js} +16 -16
- package/cjs/{UploadController-DLyiLDTB.js → UploadController-l8fZM2qT.js} +2 -2
- package/cjs/{WebhookPayload-BLT2y_Jy.d.ts → WebhookPayload-Dt6DttS0.d.ts} +28 -1
- package/cjs/app.d.ts +5 -5
- package/cjs/app.js +2 -2
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +4 -4
- package/{esm/index-CKRgjV16.d.ts → cjs/index-Bde1wjiw.d.ts} +2 -2
- package/cjs/index.d.ts +4 -4
- 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 +3 -3
- package/cjs/react.js +5 -5
- package/cjs/server.d.ts +5 -5
- package/cjs/server.js +2 -2
- package/cjs/test-inputs.js +13 -13
- package/cjs/testing.d.ts +10 -6
- package/cjs/testing.js +332 -54
- package/cjs/{ui-CZ8exACq.js → ui-BRA4HQ8r.js} +3 -3
- package/cjs/{ui-CTBUxnVp.d.ts → ui-YQuvbidU.d.ts} +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/{cjs/BrowserUpload-D-NnAN7g.d.ts → esm/BrowserUpload-BWjZ9ntu.d.ts} +2 -2
- package/esm/{BrowserUpload-i9OhCzMJ.js → BrowserUpload-GRZVB0G_.js} +1 -1
- package/esm/{CalmLensAppClient-CK4_Py0c.js → CalmLensAppClient-B5QIJ6KS.js} +3 -3
- package/{cjs/CalmLensAppClient-gG16T2py.d.ts → esm/CalmLensAppClient-BaW3ddUR.d.ts} +1 -1
- package/esm/{CalmLensOptionKeys-BGZlIsT2.js → CalmLensOptionKeys-BG7Qrh8-.js} +139 -31
- package/esm/{CalmLensServerClient-BHx3x_nZ.d.ts → CalmLensServerClient-BKzn8zmp.d.ts} +38 -2
- package/esm/{CalmLensServerClient-dAQUcDWb.js → CalmLensServerClient-bRUAebi-.js} +61 -4
- package/esm/{CalmLensTypes-CUB0YYVz.d.ts → CalmLensTypes-BDKwThbO.d.ts} +612 -53
- package/esm/{Core-BxeIud_S.js → Core-BvQe4moS.js} +9 -6
- package/{cjs/Core-C82YmjjX.d.ts → esm/Core-C33pkBmf.d.ts} +7 -4
- package/esm/{ModerationContextLimits-B6_RalCQ.js → ModerationContextLimits-CrxSnVZ3.js} +61 -2
- package/esm/{ReactUpload-DxwVqfX1.js → ReactUpload-BMO8saxT.js} +1 -1
- package/esm/{ReactUpload-DiiXfKvj.d.ts → ReactUpload-DhF8mm51.d.ts} +1 -1
- package/esm/{TestTriggers-BTyXtX0Q-GRB9jQwo.js → TestTriggers-D29T_R0M-Ztc74ucs.js} +16 -16
- package/esm/{UploadController-D9Z-h00Q.js → UploadController-DnJrWiE4.js} +2 -2
- package/esm/{WebhookPayload-BLT2y_Jy.d.ts → WebhookPayload-Dt6DttS0.d.ts} +28 -1
- package/esm/app.d.ts +5 -5
- package/esm/app.js +2 -2
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +4 -4
- package/{cjs/index-CKRgjV16.d.ts → esm/index-Bde1wjiw.d.ts} +2 -2
- package/esm/index.d.ts +4 -4
- 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 +3 -3
- package/esm/react.js +5 -5
- package/esm/server.d.ts +5 -5
- package/esm/server.js +2 -2
- package/esm/test-inputs.js +1 -1
- package/esm/testing.d.ts +10 -6
- package/esm/testing.js +326 -48
- package/esm/{ui-CTBUxnVp.d.ts → ui-YQuvbidU.d.ts} +2 -2
- package/esm/{ui-Cr7s6JHm.js → ui-heryDd6g.js} +3 -3
- 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 +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as CalmLensAppClientOptions, P as CdnTransform,
|
|
2
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
1
|
+
import { D as CalmLensAppClientOptions, P as CdnTransform, h as AssetModerationStatus, r as AssetAvailability, sn as ViewerClaims } from "./CalmLensTypes-BDKwThbO.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-BaW3ddUR.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.
|
|
@@ -605,7 +605,7 @@ interface CalmLensMessages {
|
|
|
605
605
|
chooseFiles: string;
|
|
606
606
|
/** Replaces the picked file when the uploader takes one file. */
|
|
607
607
|
chooseAnother: string;
|
|
608
|
-
/** `{size}` is replaced with the largest accepted size, such as `20
|
|
608
|
+
/** `{size}` is replaced with the largest accepted size, such as `20 MiB`. */
|
|
609
609
|
maxFileSizeHint: string;
|
|
610
610
|
/** Under a file waiting for `start()`. Empty by default, so the row shows only its size. */
|
|
611
611
|
selected: string;
|
|
@@ -650,7 +650,10 @@ declare const formatMessage: (message: string, values: Record<string, string>) =
|
|
|
650
650
|
declare const getUploadItemMessage: (item: UploadItem, messages: CalmLensMessages) => string;
|
|
651
651
|
/** How a finished file turned out, for styling: `accepted`, `restricted` or `rejected`. */
|
|
652
652
|
declare const getUploadItemOutcome: (item: UploadItem) => "accepted" | "restricted" | "rejected" | undefined;
|
|
653
|
-
/**
|
|
653
|
+
/**
|
|
654
|
+
* A byte count for people, such as `1.2 MiB`: binary units, labelled as such, the unit of every
|
|
655
|
+
* CalmLens size limit.
|
|
656
|
+
*/
|
|
654
657
|
declare const formatBytes: (bytes: number) => string;
|
|
655
658
|
/** Everything a file's row shows, worked out once for every framework's uploader. */
|
|
656
659
|
interface UploadItemView {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-ud1xpZRK.js");
|
|
2
|
+
const require_UploadController = require("./UploadController-l8fZM2qT.js");
|
|
3
3
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
4
4
|
// src/ui/viewers/ViewerAsset.ts
|
|
5
5
|
/** Spreadsheet MIME types, as `content.format` reports them (compared lower-cased). */
|
|
@@ -616,13 +616,16 @@ const getUploadItemOutcome = (item) => {
|
|
|
616
616
|
if (item.status === "blocked" || item.status === "purged") return "rejected";
|
|
617
617
|
return item.status === "age-restricted" ? "restricted" : "accepted";
|
|
618
618
|
};
|
|
619
|
-
/**
|
|
619
|
+
/**
|
|
620
|
+
* A byte count for people, such as `1.2 MiB`: binary units, labelled as such, the unit of every
|
|
621
|
+
* CalmLens size limit.
|
|
622
|
+
*/
|
|
620
623
|
const formatBytes = (bytes) => {
|
|
621
624
|
if (bytes < 1024) return `${bytes} B`;
|
|
622
625
|
const units = [
|
|
623
|
-
"
|
|
624
|
-
"
|
|
625
|
-
"
|
|
626
|
+
"KiB",
|
|
627
|
+
"MiB",
|
|
628
|
+
"GiB"
|
|
626
629
|
];
|
|
627
630
|
let value = bytes / 1024;
|
|
628
631
|
let unit = 0;
|
|
@@ -36,12 +36,14 @@ const API_ERROR_CODES = {
|
|
|
36
36
|
PERMISSION_DENIED: "auth/permission-denied",
|
|
37
37
|
UPLOAD_TOO_LARGE: "upload/too-large",
|
|
38
38
|
DOCUMENT_TOO_MANY_ITEMS: "document/too-many-items",
|
|
39
|
+
MEDIA_DURATION_LIMIT: "media/duration-limit",
|
|
39
40
|
INVALID_IMAGE: "image/invalid",
|
|
40
41
|
IMAGE_TOO_LARGE: "image/too-large",
|
|
41
42
|
FREE_UPLOADS_EXHAUSTED: "usage/free-uploads-exhausted",
|
|
42
43
|
UPLOADS_PAUSED: "usage/uploads-paused",
|
|
43
44
|
UNSUPPORTED_UPLOAD_TYPE: "upload/unsupported-type",
|
|
44
45
|
INVALID_UPLOAD_PAYLOAD: "upload-payload/invalid",
|
|
46
|
+
UPLOAD_OPTIONS_IN_QUERY: "upload/options-in-query",
|
|
45
47
|
USE_UPLOAD_PART: "upload/use-upload-part",
|
|
46
48
|
UPLOAD_NOT_OPEN: "upload/not-open",
|
|
47
49
|
INVALID_UPLOAD_PART_NUMBER: "upload-part/invalid-number",
|
|
@@ -98,6 +100,14 @@ const API_ERROR_CODES = {
|
|
|
98
100
|
UPLOAD_PRESET_DAILY_LIMIT_REACHED: "upload-preset/daily-limit-reached",
|
|
99
101
|
UPLOAD_PRESET_ORIGIN_NOT_ALLOWED: "upload-preset/origin-not-allowed",
|
|
100
102
|
UPLOAD_PRESET_FIELD_NOT_ALLOWED: "upload-preset/field-not-allowed",
|
|
103
|
+
UPLOAD_PRESET_REVISION_CONFLICT: "upload-preset/revision-conflict",
|
|
104
|
+
UPLOAD_PRESET_KEY_TAKEN: "upload-preset/key-taken",
|
|
105
|
+
UPLOAD_PRESET_DAILY_LIMIT_REQUIRED: "upload-preset/daily-limit-required",
|
|
106
|
+
UPLOAD_PRESET_INVALID_FOLDER: "upload-preset/invalid-folder",
|
|
107
|
+
UPLOAD_PRESET_INVALID_POLICY: "upload-preset/invalid-policy",
|
|
108
|
+
PROJECT_SETTINGS_REVISION_CONFLICT: "project-settings/revision-conflict",
|
|
109
|
+
SEARCH_ESTIMATE_CHANGED: "search/estimate-changed",
|
|
110
|
+
METADATA_FIELD_NOT_FOUND: "metadata-field/not-found",
|
|
101
111
|
UPLOAD_TOKEN_INVALID: "upload-token/invalid",
|
|
102
112
|
UPLOAD_TOKEN_EXPIRED: "upload-token/expired",
|
|
103
113
|
UPLOAD_TOKEN_USED: "upload-token/used",
|
|
@@ -244,7 +254,7 @@ const API_ERROR_DEFINITIONS = {
|
|
|
244
254
|
},
|
|
245
255
|
"auth/permission-denied": {
|
|
246
256
|
status: 403,
|
|
247
|
-
message: "This API key lacks a permission the request needs (details.permission names it, such as assets:download for an asset's folder), or the resource belongs to another project."
|
|
257
|
+
message: "This API key lacks a permission the request needs (details.permission names it, such as assets:download for an asset's folder, and details.role the least role that includes it), or the resource belongs to another project."
|
|
248
258
|
},
|
|
249
259
|
"upload/too-large": {
|
|
250
260
|
status: 413,
|
|
@@ -254,6 +264,10 @@ const API_ERROR_DEFINITIONS = {
|
|
|
254
264
|
status: 422,
|
|
255
265
|
message: "The document holds more embedded images or audio and video files than can be moderated: details.limit is `images` or `media` and details.maximum the most allowed. Split it into smaller documents."
|
|
256
266
|
},
|
|
267
|
+
"media/duration-limit": {
|
|
268
|
+
status: 422,
|
|
269
|
+
message: "The audio or video is longer than allowed: details.durationSeconds is what its file states and details.limitSeconds the limit. Trim it or split it into separate uploads; before billing is set up, setting it up raises the limit."
|
|
270
|
+
},
|
|
257
271
|
"image/invalid": {
|
|
258
272
|
status: 422,
|
|
259
273
|
message: "The image is corrupt or cannot be decoded. Upload a valid image file."
|
|
@@ -278,6 +292,10 @@ const API_ERROR_DEFINITIONS = {
|
|
|
278
292
|
status: 400,
|
|
279
293
|
message: "Upload payload is invalid."
|
|
280
294
|
},
|
|
295
|
+
"upload/options-in-query": {
|
|
296
|
+
status: 400,
|
|
297
|
+
message: "Send the asset's name and fields in the request body (the JSON body, or the options part of a multipart/form-data upload), not in the query string."
|
|
298
|
+
},
|
|
281
299
|
"upload/use-upload-part": {
|
|
282
300
|
status: 409,
|
|
283
301
|
message: "Use uploadPart for multipart upload parts after the first part"
|
|
@@ -502,6 +520,38 @@ const API_ERROR_DEFINITIONS = {
|
|
|
502
520
|
status: 400,
|
|
503
521
|
message: "This field is set by the upload preset or the upload token and can't be changed by the upload."
|
|
504
522
|
},
|
|
523
|
+
"upload-preset/revision-conflict": {
|
|
524
|
+
status: 409,
|
|
525
|
+
message: "The upload preset changed, or was created or deleted, since you read it. Retrieve it again and retry with its current revision."
|
|
526
|
+
},
|
|
527
|
+
"upload-preset/key-taken": {
|
|
528
|
+
status: 409,
|
|
529
|
+
message: "Another upload preset in this project has this key. Choose a different key."
|
|
530
|
+
},
|
|
531
|
+
"upload-preset/daily-limit-required": {
|
|
532
|
+
status: 400,
|
|
533
|
+
message: "A preset that anyone can upload to needs a daily upload limit."
|
|
534
|
+
},
|
|
535
|
+
"upload-preset/invalid-folder": {
|
|
536
|
+
status: 400,
|
|
537
|
+
message: "The folder isn't in this project. Choose a folder from this project and try again."
|
|
538
|
+
},
|
|
539
|
+
"upload-preset/invalid-policy": {
|
|
540
|
+
status: 400,
|
|
541
|
+
message: "The policy isn't one of this organisation's. Choose one of its policies and try again."
|
|
542
|
+
},
|
|
543
|
+
"project-settings/revision-conflict": {
|
|
544
|
+
status: 409,
|
|
545
|
+
message: "The project's settings or metadata fields changed since you read them. Retrieve them again and retry with the current revision."
|
|
546
|
+
},
|
|
547
|
+
"search/estimate-changed": {
|
|
548
|
+
status: 409,
|
|
549
|
+
message: "Turning on AI media search needs a searchIndexingBudgetUnits of at least the current indexing estimate, which details.indexingUnits gives."
|
|
550
|
+
},
|
|
551
|
+
"metadata-field/not-found": {
|
|
552
|
+
status: 404,
|
|
553
|
+
message: "The project has no metadata field with this ID."
|
|
554
|
+
},
|
|
505
555
|
"upload-token/invalid": {
|
|
506
556
|
status: 401,
|
|
507
557
|
message: "The upload token is invalid. Sign a new one on your server with an active API key for this project."
|
|
@@ -628,6 +678,15 @@ var CalmLensError = class CalmLensError extends Error {
|
|
|
628
678
|
static [Symbol.hasInstance](value) {
|
|
629
679
|
return CalmLensError.isCalmLensError(value);
|
|
630
680
|
}
|
|
681
|
+
/**
|
|
682
|
+
* Whether the SDK raised this error itself, with no HTTP response: before sending (an invalid
|
|
683
|
+
* argument or option, or content it checks first, such as `upload/unsupported-type`), or because
|
|
684
|
+
* no response arrived (a timeout, a cancellation or a connection failure). The code is the one
|
|
685
|
+
* the API would use; there is no `status` or `requestId`, so branch on `code`.
|
|
686
|
+
*/
|
|
687
|
+
isLocal() {
|
|
688
|
+
return this.status === void 0;
|
|
689
|
+
}
|
|
631
690
|
/** The resource does not exist or is not visible to this API key. */
|
|
632
691
|
isNotFound() {
|
|
633
692
|
return this.status === 404;
|
|
@@ -649,7 +708,7 @@ const invalidArgument = (message, details) => new CalmLensError(SDK_ERROR_CODES.
|
|
|
649
708
|
const invalidConfig = (message) => new CalmLensError(SDK_ERROR_CODES.INVALID_CONFIG, { message });
|
|
650
709
|
// src/client/CalmLensVersion.ts
|
|
651
710
|
/** This SDK's version, from its package.json. */
|
|
652
|
-
const SDK_VERSION = "0.
|
|
711
|
+
const SDK_VERSION = "0.22.0";
|
|
653
712
|
const runtimeName = () => {
|
|
654
713
|
const runtime = globalThis;
|
|
655
714
|
if (isReactNativeRuntime()) return "react-native";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as UploadSnapshot, M as UploadController, N as UploadControllerOptions, P as UploadFile } from "./Core-
|
|
1
|
+
import { I as UploadSnapshot, M as UploadController, N as UploadControllerOptions, P as UploadFile } from "./Core-C33pkBmf.js";
|
|
2
2
|
interface UseCalmLensUploadResult<F extends UploadFile = UploadFile> extends UploadSnapshot<F> {
|
|
3
3
|
controller: UploadController<F>;
|
|
4
4
|
addFiles: UploadController<F>["addFiles"];
|
|
@@ -33,57 +33,57 @@ const CLASSIFICATION_CATEGORIES = [
|
|
|
33
33
|
"personal-information",
|
|
34
34
|
"profanity"
|
|
35
35
|
];
|
|
36
|
-
// src/contract/Jurisdiction-
|
|
36
|
+
// src/contract/Jurisdiction-LWQvqyxL.js
|
|
37
37
|
/**
|
|
38
|
-
* Jurisdictions with legal rules always apply to every project. An
|
|
39
|
-
* standard rather than a legal floor
|
|
38
|
+
* Jurisdictions with legal rules always apply to every project. An optional jurisdiction is a
|
|
39
|
+
* product standard rather than a legal floor: every project serves it unless it opts out.
|
|
40
40
|
*/
|
|
41
41
|
const JURISDICTIONS = {
|
|
42
42
|
global: {
|
|
43
43
|
name: "Global",
|
|
44
44
|
ageCheckStandard: "any",
|
|
45
|
-
|
|
45
|
+
optional: false
|
|
46
46
|
},
|
|
47
47
|
DE: {
|
|
48
48
|
name: "Germany",
|
|
49
49
|
ageCheckStandard: "any",
|
|
50
|
-
|
|
50
|
+
optional: false
|
|
51
51
|
},
|
|
52
52
|
AT: {
|
|
53
53
|
name: "Austria",
|
|
54
54
|
ageCheckStandard: "any",
|
|
55
|
-
|
|
55
|
+
optional: false
|
|
56
56
|
},
|
|
57
57
|
FR: {
|
|
58
58
|
name: "France",
|
|
59
59
|
ageCheckStandard: "any",
|
|
60
|
-
|
|
60
|
+
optional: false
|
|
61
61
|
},
|
|
62
62
|
GB: {
|
|
63
63
|
name: "United Kingdom",
|
|
64
64
|
ageCheckStandard: "verified",
|
|
65
|
-
|
|
65
|
+
optional: false
|
|
66
66
|
},
|
|
67
67
|
EU: {
|
|
68
68
|
name: "European Union",
|
|
69
69
|
ageCheckStandard: "verified",
|
|
70
|
-
|
|
70
|
+
optional: true
|
|
71
71
|
},
|
|
72
72
|
AU: {
|
|
73
73
|
name: "Australia",
|
|
74
74
|
ageCheckStandard: "verified",
|
|
75
|
-
|
|
75
|
+
optional: false
|
|
76
76
|
},
|
|
77
77
|
BR: {
|
|
78
78
|
name: "Brazil",
|
|
79
79
|
ageCheckStandard: "verified",
|
|
80
|
-
|
|
80
|
+
optional: false
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
const JURISDICTION_SCHEMA = zod.enum(Object.keys(JURISDICTIONS));
|
|
84
|
-
Object.keys(JURISDICTIONS).filter((code) => !JURISDICTIONS[code].
|
|
85
|
-
const
|
|
86
|
-
zod.enum(
|
|
84
|
+
Object.keys(JURISDICTIONS).filter((code) => !JURISDICTIONS[code].optional);
|
|
85
|
+
const OPTIONAL_JURISDICTIONS = Object.keys(JURISDICTIONS).filter((code) => JURISDICTIONS[code].optional);
|
|
86
|
+
zod.enum(OPTIONAL_JURISDICTIONS).array().refine((codes) => new Set(codes).size === codes.length, { message: "jurisdiction/duplicate" });
|
|
87
87
|
JURISDICTION_SCHEMA.array().min(1).refine((regions) => regions.includes("global") && new Set(regions).size === regions.length, { message: "jurisdiction/global-required-or-duplicate" });
|
|
88
88
|
const COUNTRIES = 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(" "));
|
|
89
89
|
const VIEWER_REGION_SCHEMA = zod.enum([...COUNTRIES]).describe("Viewer's ISO 3166-1 alpha-2 country, supplied by your integration; not the proxy server's country. EU is not a viewer country.");
|
|
@@ -92,7 +92,7 @@ zod.object({
|
|
|
92
92
|
region: VIEWER_REGION_SCHEMA.optional().describe("Viewer country. Defaults to the country of the connection reaching CalmLens; proxies should forward the viewer country explicitly."),
|
|
93
93
|
ageConfirmed: zod.boolean().optional().describe("Your platform's confirmation that the viewer passed its age check, so age-restricted content may be delivered. Defaults to false. Your platform confirms the viewer's age; CalmLens does not verify this claim. Anyone requesting an asset's URL, public or signed, can set it: a signed URL's signature does not cover viewer claims, so the claim is not an access control. To restrict who can load an age-restricted asset, make it private and issue signed URLs only to viewers who passed your age check.")
|
|
94
94
|
}).strict();
|
|
95
|
-
// src/contract/TestRegionalActions-
|
|
95
|
+
// src/contract/TestRegionalActions-C2mw3ntb.js
|
|
96
96
|
/**
|
|
97
97
|
* Marks English text in shared, backend and data modules that the portal shows, so the app's
|
|
98
98
|
* message catalog (packages/app/vite/messageCatalog.ts) extracts it and the portal can translate it
|
|
@@ -1116,7 +1116,7 @@ const TEST_REGIONAL_ACTIONS_SCHEMA = zod.array(zod.object({
|
|
|
1116
1116
|
"block"
|
|
1117
1117
|
])
|
|
1118
1118
|
}).strict()).max(7).refine((entries) => new Set(entries.map((entry) => entry.region)).size === entries.length, "Choose each region once");
|
|
1119
|
-
// src/contract/TestTriggers-
|
|
1119
|
+
// src/contract/TestTriggers-D29T_R0M.js
|
|
1120
1120
|
/**
|
|
1121
1121
|
* The visual encoding of test images (shared by images and video frames), independent of what the
|
|
1122
1122
|
* bytes mean. An odd N×N grid of square cells fills the image. Its outer ring alternates black and
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-ud1xpZRK.js");
|
|
2
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-DUYMo9PZ.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 {
|
|
1
|
+
import { gn as TypedEvent, hn as EventAsset, mn as Actor } from "./CalmLensTypes-BDKwThbO.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: {
|
|
@@ -37,12 +37,14 @@ declare const API_ERROR_CODES: {
|
|
|
37
37
|
readonly PERMISSION_DENIED: "auth/permission-denied";
|
|
38
38
|
readonly UPLOAD_TOO_LARGE: "upload/too-large";
|
|
39
39
|
readonly DOCUMENT_TOO_MANY_ITEMS: "document/too-many-items";
|
|
40
|
+
readonly MEDIA_DURATION_LIMIT: "media/duration-limit";
|
|
40
41
|
readonly INVALID_IMAGE: "image/invalid";
|
|
41
42
|
readonly IMAGE_TOO_LARGE: "image/too-large";
|
|
42
43
|
readonly FREE_UPLOADS_EXHAUSTED: "usage/free-uploads-exhausted";
|
|
43
44
|
readonly UPLOADS_PAUSED: "usage/uploads-paused";
|
|
44
45
|
readonly UNSUPPORTED_UPLOAD_TYPE: "upload/unsupported-type";
|
|
45
46
|
readonly INVALID_UPLOAD_PAYLOAD: "upload-payload/invalid";
|
|
47
|
+
readonly UPLOAD_OPTIONS_IN_QUERY: "upload/options-in-query";
|
|
46
48
|
readonly USE_UPLOAD_PART: "upload/use-upload-part";
|
|
47
49
|
readonly UPLOAD_NOT_OPEN: "upload/not-open";
|
|
48
50
|
readonly INVALID_UPLOAD_PART_NUMBER: "upload-part/invalid-number";
|
|
@@ -99,6 +101,14 @@ declare const API_ERROR_CODES: {
|
|
|
99
101
|
readonly UPLOAD_PRESET_DAILY_LIMIT_REACHED: "upload-preset/daily-limit-reached";
|
|
100
102
|
readonly UPLOAD_PRESET_ORIGIN_NOT_ALLOWED: "upload-preset/origin-not-allowed";
|
|
101
103
|
readonly UPLOAD_PRESET_FIELD_NOT_ALLOWED: "upload-preset/field-not-allowed";
|
|
104
|
+
readonly UPLOAD_PRESET_REVISION_CONFLICT: "upload-preset/revision-conflict";
|
|
105
|
+
readonly UPLOAD_PRESET_KEY_TAKEN: "upload-preset/key-taken";
|
|
106
|
+
readonly UPLOAD_PRESET_DAILY_LIMIT_REQUIRED: "upload-preset/daily-limit-required";
|
|
107
|
+
readonly UPLOAD_PRESET_INVALID_FOLDER: "upload-preset/invalid-folder";
|
|
108
|
+
readonly UPLOAD_PRESET_INVALID_POLICY: "upload-preset/invalid-policy";
|
|
109
|
+
readonly PROJECT_SETTINGS_REVISION_CONFLICT: "project-settings/revision-conflict";
|
|
110
|
+
readonly SEARCH_ESTIMATE_CHANGED: "search/estimate-changed";
|
|
111
|
+
readonly METADATA_FIELD_NOT_FOUND: "metadata-field/not-found";
|
|
102
112
|
readonly UPLOAD_TOKEN_INVALID: "upload-token/invalid";
|
|
103
113
|
readonly UPLOAD_TOKEN_EXPIRED: "upload-token/expired";
|
|
104
114
|
readonly UPLOAD_TOKEN_USED: "upload-token/used";
|
|
@@ -178,12 +188,14 @@ declare const CALMLENS_ERROR_CODES: {
|
|
|
178
188
|
readonly PERMISSION_DENIED: "auth/permission-denied";
|
|
179
189
|
readonly UPLOAD_TOO_LARGE: "upload/too-large";
|
|
180
190
|
readonly DOCUMENT_TOO_MANY_ITEMS: "document/too-many-items";
|
|
191
|
+
readonly MEDIA_DURATION_LIMIT: "media/duration-limit";
|
|
181
192
|
readonly INVALID_IMAGE: "image/invalid";
|
|
182
193
|
readonly IMAGE_TOO_LARGE: "image/too-large";
|
|
183
194
|
readonly FREE_UPLOADS_EXHAUSTED: "usage/free-uploads-exhausted";
|
|
184
195
|
readonly UPLOADS_PAUSED: "usage/uploads-paused";
|
|
185
196
|
readonly UNSUPPORTED_UPLOAD_TYPE: "upload/unsupported-type";
|
|
186
197
|
readonly INVALID_UPLOAD_PAYLOAD: "upload-payload/invalid";
|
|
198
|
+
readonly UPLOAD_OPTIONS_IN_QUERY: "upload/options-in-query";
|
|
187
199
|
readonly USE_UPLOAD_PART: "upload/use-upload-part";
|
|
188
200
|
readonly UPLOAD_NOT_OPEN: "upload/not-open";
|
|
189
201
|
readonly INVALID_UPLOAD_PART_NUMBER: "upload-part/invalid-number";
|
|
@@ -240,6 +252,14 @@ declare const CALMLENS_ERROR_CODES: {
|
|
|
240
252
|
readonly UPLOAD_PRESET_DAILY_LIMIT_REACHED: "upload-preset/daily-limit-reached";
|
|
241
253
|
readonly UPLOAD_PRESET_ORIGIN_NOT_ALLOWED: "upload-preset/origin-not-allowed";
|
|
242
254
|
readonly UPLOAD_PRESET_FIELD_NOT_ALLOWED: "upload-preset/field-not-allowed";
|
|
255
|
+
readonly UPLOAD_PRESET_REVISION_CONFLICT: "upload-preset/revision-conflict";
|
|
256
|
+
readonly UPLOAD_PRESET_KEY_TAKEN: "upload-preset/key-taken";
|
|
257
|
+
readonly UPLOAD_PRESET_DAILY_LIMIT_REQUIRED: "upload-preset/daily-limit-required";
|
|
258
|
+
readonly UPLOAD_PRESET_INVALID_FOLDER: "upload-preset/invalid-folder";
|
|
259
|
+
readonly UPLOAD_PRESET_INVALID_POLICY: "upload-preset/invalid-policy";
|
|
260
|
+
readonly PROJECT_SETTINGS_REVISION_CONFLICT: "project-settings/revision-conflict";
|
|
261
|
+
readonly SEARCH_ESTIMATE_CHANGED: "search/estimate-changed";
|
|
262
|
+
readonly METADATA_FIELD_NOT_FOUND: "metadata-field/not-found";
|
|
243
263
|
readonly UPLOAD_TOKEN_INVALID: "upload-token/invalid";
|
|
244
264
|
readonly UPLOAD_TOKEN_EXPIRED: "upload-token/expired";
|
|
245
265
|
readonly UPLOAD_TOKEN_USED: "upload-token/used";
|
|
@@ -321,6 +341,13 @@ declare class CalmLensError extends Error {
|
|
|
321
341
|
/** True for any `CalmLensError`, including one created by another copy or build of the SDK. */
|
|
322
342
|
static isCalmLensError(value: unknown): value is CalmLensError;
|
|
323
343
|
static [Symbol.hasInstance](value: unknown): boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Whether the SDK raised this error itself, with no HTTP response: before sending (an invalid
|
|
346
|
+
* argument or option, or content it checks first, such as `upload/unsupported-type`), or because
|
|
347
|
+
* no response arrived (a timeout, a cancellation or a connection failure). The code is the one
|
|
348
|
+
* the API would use; there is no `status` or `requestId`, so branch on `code`.
|
|
349
|
+
*/
|
|
350
|
+
isLocal(): boolean;
|
|
324
351
|
/** The resource does not exist or is not visible to this API key. */
|
|
325
352
|
isNotFound(): boolean;
|
|
326
353
|
/**
|
package/cjs/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-Q5zGpR8l-CEWjnE39.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
4
|
-
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-
|
|
5
|
-
import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-
|
|
6
|
-
export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, 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 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 BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensAppClient, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, 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 IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, 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 ListPoliciesOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, 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 ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, 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 UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
|
|
2
|
+
import { $ as GetAssetInfoOptions, $n as FileMetadata, $t as UpgradePolicyOptions, A as CdnAssetReference, An as BoundingBox, At as MultipartUploadOptions, B as CreateMultipartUploadPartOptions, Bn as AssetSearchMatchField, Bt as SetPolicyAutomaticUpdatesOptions, C as AssetVisibility, Ct as ListHashListEntriesOptions, D as CalmLensAppClientOptions, Dn as PublicProjectSettings, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Fn as ProcessingFeatureStage, Ft as RequestOptions, G as EnsureLensOptions, Gn as AssetHlsRendition, Gt as StreamingFeatureOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, I as ConnectionOptions, In as ProcessingFeatures, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jn as AssetRendered, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kn as AssetHlsStatus, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, M as CdnResource, Mn as DetectedPerson, Mt as PolicyIdOptions, N as CdnServeOptions, Nn as ProcessingFeatureId, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, P as CdnTransform, Pn as ProcessingFeatureResults, Pt as RemoveAssetContentOptions, Q as FolderPage, Qn as ExtractedText, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rn as CursorPage, Rt as RetryAssetOptions, S as AssetUploadStatus, Sn as EventType, St as ListFoldersOptions, T as BatchAssetsOptions, Tn as MetadataFieldsResource, Tt as ListLensesOptions, U as DeleteAssetOptions, Un as AssetInfo, Ut as SignedAssetUrl, V as CreatePolicyOptions, Vn as AssetSearchQuery, Vt as SignAssetUrlOptions, W as DeleteMetadataFieldOptions, Wn as AssetHls, Wt as SignedUploadToken, X as ExplainAssetOptions, Xn as AssetSafetyHold, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yn as AssetRenderedKind, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zn as AssetSafetyHoldReason, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _n as EventCategory, _t as LensPage, a as AssetChildrenPage, an as UploadedAsset, at as ImageTransformOptions, b as AssetType, bn as EventFacts, bt as ListAssetsOptions, c as AssetClassificationStatus, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, d as AssetContentRemovalReason, dn as AssetBatchOperation, dt as IterateHashListsOptions, en as UploadAssetPartOptions, er as MetadataItem, et as HashListEntryIdOptions, f as AssetContentStatus, fn as AssetTimelineSegment, ft as IterateLensesOptions, g as AssetPage, gn as TypedEvent, gt as LensIdOptions, h as AssetModerationStatus, hn as EventAsset, ht as Lens, i as AssetChecksums, in as UploadPresetSubmitAssetOptions, it as IdempotencyOptions, j as CdnAssetUrlOptions, jn as DetectedFace, jt as MultipartUploadPartOptions, k as CdnAssetLocation, kn as AgeRange, kt as MoveFolderOptions, l as AssetContent, ln as WebhookHeadersInput, lt as IterateFoldersOptions, m as AssetModerationDecision, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, o as AssetClassification, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, p as AssetModeration, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qn as AssetPreview, qt as UpdateAssetOptions, r as AssetAvailability, rn as UploadPresetPage, rt as HashListPage, s as AssetClassificationFailureReason, sn as ViewerClaims, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tn as UploadPresetDefinition, tr as ProcessingOptions, tt as HashListEntryPage, u as AssetContentOptions, un as WebhookPayloadInput, ut as IterateHashListEntriesOptions, v as AssetSearchResult, vn as EventFact, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, x as AssetUpload, xn as EventSeverity, xt as ListEventsOptions, y as AssetTimelinePage, yn as EventFactValues, yt as ListAssetTimelineOptions, z as CreateLensOptions, zn as LensType, zt as SearchAssetsOptions } from "./CalmLensTypes-BDKwThbO.js";
|
|
3
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-BaW3ddUR.js";
|
|
4
|
+
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-Bde1wjiw.js";
|
|
5
|
+
import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-Dt6DttS0.js";
|
|
6
|
+
export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, 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 AssetHlsStatus, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, 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 BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensAppClient, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, 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 EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, 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 IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, type IterateUploadPresetsOptions, 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 ListPoliciesOptions, type ListUploadPresetsOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, 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 ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, 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, selectModerationContextItems };
|
package/cjs/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-ud1xpZRK.js");
|
|
3
3
|
require("./index.js");
|
|
4
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
4
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-DUYMo9PZ.js");
|
|
5
5
|
exports.CALMLENS_ERROR_CODES = require_ModerationContextLimits.CALMLENS_ERROR_CODES;
|
|
6
6
|
exports.CDN_RESOURCES = require_ModerationContextLimits.CDN_RESOURCES;
|
|
7
7
|
exports.CalmLensAppClient = require_CalmLensAppClient.CalmLensAppClient;
|
package/cjs/elements.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, G as AssetSession, H as AssetImageOptions, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, P as UploadFile, Q as getAssetView, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } 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 { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, 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 createDocumentViewer, y as createImageViewer } from "./ui-
|
|
1
|
+
import { r as AssetAvailability } from "./CalmLensTypes-BDKwThbO.js";
|
|
2
|
+
import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, G as AssetSession, H as AssetImageOptions, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, P as UploadFile, Q as getAssetView, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-C33pkBmf.js";
|
|
3
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BWjZ9ntu.js";
|
|
4
|
+
import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, 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 createDocumentViewer, y as createImageViewer } from "./ui-YQuvbidU.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/cjs/elements.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ui = require("./ui-
|
|
3
|
-
const require_UploadController = require("./UploadController-
|
|
4
|
-
const require_Core = require("./Core-
|
|
2
|
+
const require_ui = require("./ui-BRA4HQ8r.js");
|
|
3
|
+
const require_UploadController = require("./UploadController-l8fZM2qT.js");
|
|
4
|
+
const require_Core = require("./Core-Cm5Z1oJ9.js");
|
|
5
5
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
6
|
-
const require_BrowserUpload = require("./BrowserUpload-
|
|
6
|
+
const require_BrowserUpload = require("./BrowserUpload-Bwlib4Zc.js");
|
|
7
7
|
// src/viewers/Elements.ts
|
|
8
8
|
const BaseElement$1 = typeof HTMLElement === "undefined" ? class {} : HTMLElement;
|
|
9
9
|
const PROPERTIES = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./Classification-Q5zGpR8l-CEWjnE39.js";
|
|
2
|
-
import {
|
|
3
|
-
import "./WebhookPayload-
|
|
2
|
+
import { $ as GetAssetInfoOptions, M as CdnResource, Un as AssetInfo } from "./CalmLensTypes-BDKwThbO.js";
|
|
3
|
+
import "./WebhookPayload-Dt6DttS0.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
|
/**
|
package/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-Q5zGpR8l-CEWjnE39.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-
|
|
4
|
-
import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-
|
|
5
|
-
export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, 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 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 BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, 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 IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, 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 ListPoliciesOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, 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 ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, 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 UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
|
|
2
|
+
import { $ as GetAssetInfoOptions, $n as FileMetadata, $t as UpgradePolicyOptions, A as CdnAssetReference, An as BoundingBox, At as MultipartUploadOptions, B as CreateMultipartUploadPartOptions, Bn as AssetSearchMatchField, Bt as SetPolicyAutomaticUpdatesOptions, C as AssetVisibility, Ct as ListHashListEntriesOptions, D as CalmLensAppClientOptions, Dn as PublicProjectSettings, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Fn as ProcessingFeatureStage, Ft as RequestOptions, G as EnsureLensOptions, Gn as AssetHlsRendition, Gt as StreamingFeatureOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, I as ConnectionOptions, In as ProcessingFeatures, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jn as AssetRendered, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kn as AssetHlsStatus, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, M as CdnResource, Mn as DetectedPerson, Mt as PolicyIdOptions, N as CdnServeOptions, Nn as ProcessingFeatureId, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, P as CdnTransform, Pn as ProcessingFeatureResults, Pt as RemoveAssetContentOptions, Q as FolderPage, Qn as ExtractedText, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rn as CursorPage, Rt as RetryAssetOptions, S as AssetUploadStatus, Sn as EventType, St as ListFoldersOptions, T as BatchAssetsOptions, Tn as MetadataFieldsResource, Tt as ListLensesOptions, U as DeleteAssetOptions, Un as AssetInfo, Ut as SignedAssetUrl, V as CreatePolicyOptions, Vn as AssetSearchQuery, Vt as SignAssetUrlOptions, W as DeleteMetadataFieldOptions, Wn as AssetHls, Wt as SignedUploadToken, X as ExplainAssetOptions, Xn as AssetSafetyHold, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yn as AssetRenderedKind, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zn as AssetSafetyHoldReason, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _n as EventCategory, _t as LensPage, a as AssetChildrenPage, an as UploadedAsset, at as ImageTransformOptions, b as AssetType, bn as EventFacts, bt as ListAssetsOptions, c as AssetClassificationStatus, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, d as AssetContentRemovalReason, dn as AssetBatchOperation, dt as IterateHashListsOptions, en as UploadAssetPartOptions, er as MetadataItem, et as HashListEntryIdOptions, f as AssetContentStatus, fn as AssetTimelineSegment, ft as IterateLensesOptions, g as AssetPage, gn as TypedEvent, gt as LensIdOptions, h as AssetModerationStatus, hn as EventAsset, ht as Lens, i as AssetChecksums, in as UploadPresetSubmitAssetOptions, it as IdempotencyOptions, j as CdnAssetUrlOptions, jn as DetectedFace, jt as MultipartUploadPartOptions, k as CdnAssetLocation, kn as AgeRange, kt as MoveFolderOptions, l as AssetContent, ln as WebhookHeadersInput, lt as IterateFoldersOptions, m as AssetModerationDecision, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, o as AssetClassification, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, p as AssetModeration, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qn as AssetPreview, qt as UpdateAssetOptions, r as AssetAvailability, rn as UploadPresetPage, rt as HashListPage, s as AssetClassificationFailureReason, sn as ViewerClaims, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tn as UploadPresetDefinition, tr as ProcessingOptions, tt as HashListEntryPage, u as AssetContentOptions, un as WebhookPayloadInput, ut as IterateHashListEntriesOptions, v as AssetSearchResult, vn as EventFact, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, x as AssetUpload, xn as EventSeverity, xt as ListEventsOptions, y as AssetTimelinePage, yn as EventFactValues, yt as ListAssetTimelineOptions, z as CreateLensOptions, zn as LensType, zt as SearchAssetsOptions } from "./CalmLensTypes-BDKwThbO.js";
|
|
3
|
+
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-Bde1wjiw.js";
|
|
4
|
+
import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-Dt6DttS0.js";
|
|
5
|
+
export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, 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 AssetHlsStatus, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, 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 BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, 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 EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, 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 IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, type IterateUploadPresetsOptions, 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 ListPoliciesOptions, type ListUploadPresetsOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, 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 ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, 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, selectModerationContextItems };
|
package/cjs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-ud1xpZRK.js");
|
|
3
3
|
exports.CALMLENS_ERROR_CODES = require_ModerationContextLimits.CALMLENS_ERROR_CODES;
|
|
4
4
|
exports.CDN_RESOURCES = require_ModerationContextLimits.CDN_RESOURCES;
|
|
5
5
|
exports.CalmLensError = require_ModerationContextLimits.CalmLensError;
|
package/cjs/react-native.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadItem, G as AssetSession, H as AssetImageOptions, I as UploadSnapshot, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, N as UploadControllerOptions, O as CalmLensUpload, P as UploadFile, Q as getAssetView, R as createUploadController, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getPeakHeights, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, j as UploadClient, k as CustomUploadContext, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, p as AssetProps, q as AssetSpreadsheetOptions, r as resolveTheme, s as ICONS, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-
|
|
2
|
-
import { n as useCalmLensUpload, t as UseCalmLensUploadResult } from "./ReactUpload-
|
|
1
|
+
import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadItem, G as AssetSession, H as AssetImageOptions, I as UploadSnapshot, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, N as UploadControllerOptions, O as CalmLensUpload, P as UploadFile, Q as getAssetView, R as createUploadController, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getPeakHeights, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, j as UploadClient, k as CustomUploadContext, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, p as AssetProps, q as AssetSpreadsheetOptions, r as resolveTheme, s as ICONS, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-C33pkBmf.js";
|
|
2
|
+
import { n as useCalmLensUpload, t as UseCalmLensUploadResult } from "./ReactUpload-DhF8mm51.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { StyleProp, ViewStyle } from "react-native";
|
|
5
5
|
/** What the uploader asks your picker for. */
|
package/cjs/react-native.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
3
|
-
const require_UploadController = require("./UploadController-
|
|
4
|
-
const require_Core = require("./Core-
|
|
2
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-ud1xpZRK.js");
|
|
3
|
+
const require_UploadController = require("./UploadController-l8fZM2qT.js");
|
|
4
|
+
const require_Core = require("./Core-Cm5Z1oJ9.js");
|
|
5
5
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
6
|
-
const require_ReactUpload = require("./ReactUpload-
|
|
6
|
+
const require_ReactUpload = require("./ReactUpload-DQ0BYISX.js");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let react_native = require("react-native");
|
package/cjs/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, G as AssetSession, H as AssetImageOptions, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, P as UploadFile, Q as getAssetView, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-
|
|
2
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
3
|
-
import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, 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 createDocumentViewer, y as createImageViewer } from "./ui-
|
|
1
|
+
import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, G as AssetSession, H as AssetImageOptions, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, P as UploadFile, Q as getAssetView, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-C33pkBmf.js";
|
|
2
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BWjZ9ntu.js";
|
|
3
|
+
import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, 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 createDocumentViewer, y as createImageViewer } from "./ui-YQuvbidU.js";
|
|
4
4
|
import { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
|
5
5
|
type ElementProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
6
6
|
/** Leaves out the stylesheet the viewers render, so you can style the `calmlens-*` classes. */
|