calmlens 0.31.0 → 0.32.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.
Files changed (80) hide show
  1. package/bin/calmlens.js +47 -39
  2. package/cjs/{BrowserUpload-IiRDbL85.js → BrowserUpload-CbbFE-2v.js} +1 -1
  3. package/cjs/{BrowserUpload-BAH54V1q.d.ts → BrowserUpload-Dx2l9wC0.d.ts} +2 -2
  4. package/cjs/{CalmLensAppClient-BBcq6pJg.js → CalmLensAppClient-DOYOJ70t.js} +4 -4
  5. package/{esm/CalmLensAppClient-CdlcDd5l.d.ts → cjs/CalmLensAppClient-v1Ho7mJQ.d.ts} +3 -3
  6. package/cjs/{CalmLensCdn-2VbArrj-.js → CalmLensCdn-xQMrClXN.js} +56 -22
  7. package/cjs/{CalmLensConnection-CpnDGa8W.js → CalmLensConnection-DbsCA8xF.js} +7 -16
  8. package/cjs/{CalmLensServerClient-CtS66dCU.d.ts → CalmLensServerClient-CoiZN7Fr.d.ts} +9 -9
  9. package/cjs/{CalmLensServerClient-DbemlDXj.js → CalmLensServerClient-DtqFQgUn.js} +12 -15
  10. package/cjs/{CalmLensTypes-87kiUg0H.d.ts → CalmLensTypes-DjuOXp3b.d.ts} +8 -15
  11. package/cjs/{Core-xy9aV1ED.js → Core-BtFJ2xfb.js} +2 -2
  12. package/cjs/{Core-Ccy4-_sN.d.ts → Core-DaCkaDkb.d.ts} +2 -2
  13. package/cjs/{ReactUpload-BX3XOVfb.js → ReactUpload-CRtUXzMP.js} +1 -1
  14. package/cjs/{ReactUpload-DBhppuxM.d.ts → ReactUpload-DMtaeFN2.d.ts} +1 -1
  15. package/{esm/TestTriggers-Daxebd0V.d.ts → cjs/TestTriggers-CjDhhz78.d.ts} +1 -11
  16. package/cjs/{UploadController-CmTjpOfp.js → UploadController-tKqKphf3.js} +1 -1
  17. package/cjs/{WebhookPayload-B4rA_Dvm.d.ts → WebhookPayload-C3F9j4p7.d.ts} +1 -1
  18. package/cjs/app.d.ts +4 -4
  19. package/cjs/app.js +2 -2
  20. package/cjs/elements.d.ts +4 -4
  21. package/cjs/elements.js +4 -4
  22. package/cjs/{index-CWUnLKoF.d.ts → index-xF6Neq8A.d.ts} +2 -2
  23. package/cjs/index.d.ts +3 -3
  24. package/cjs/index.js +1 -1
  25. package/cjs/react-native.d.ts +2 -2
  26. package/cjs/react-native.js +4 -4
  27. package/cjs/react.d.ts +4 -4
  28. package/cjs/react.js +5 -5
  29. package/cjs/server.d.ts +4 -4
  30. package/cjs/server.js +2 -2
  31. package/cjs/test-inputs.d.ts +15 -3
  32. package/cjs/test-inputs.js +105 -2
  33. package/cjs/testing.d.ts +14 -6
  34. package/cjs/testing.js +122 -52
  35. package/cjs/{ui-BJKh49aM.js → ui-B5tgw_En.js} +8 -8
  36. package/cjs/{ui-sjnJhloQ.d.ts → ui-C_AhYdIA.d.ts} +2 -2
  37. package/cjs/ui.d.ts +2 -2
  38. package/cjs/ui.js +3 -3
  39. package/cjs/vue.d.ts +5 -5
  40. package/cjs/vue.js +4 -4
  41. package/esm/{BrowserUpload-C5aXj6QC.js → BrowserUpload-Dizcs8rx.js} +1 -1
  42. package/esm/{BrowserUpload-BAH54V1q.d.ts → BrowserUpload-Dx2l9wC0.d.ts} +2 -2
  43. package/esm/{CalmLensAppClient-gAd0C_Q_.js → CalmLensAppClient-C0Ud7eYa.js} +4 -4
  44. package/{cjs/CalmLensAppClient-CdlcDd5l.d.ts → esm/CalmLensAppClient-v1Ho7mJQ.d.ts} +3 -3
  45. package/esm/{CalmLensCdn-CcxEY6wB.js → CalmLensCdn--hZgorld.js} +39 -23
  46. package/esm/{CalmLensConnection-CfGVp95D.js → CalmLensConnection-dz5Kl3uC.js} +7 -16
  47. package/esm/{CalmLensServerClient-CPWeRVWO.js → CalmLensServerClient-BBPwU8mm.js} +12 -15
  48. package/esm/{CalmLensServerClient-CtS66dCU.d.ts → CalmLensServerClient-CoiZN7Fr.d.ts} +9 -9
  49. package/esm/{CalmLensTypes-87kiUg0H.d.ts → CalmLensTypes-DjuOXp3b.d.ts} +8 -15
  50. package/esm/{Core-Ccy4-_sN.d.ts → Core-DaCkaDkb.d.ts} +2 -2
  51. package/esm/{Core-DTcxpv3O.js → Core-Dti4LlA-.js} +2 -2
  52. package/esm/{ReactUpload-Dg7MtjbJ.js → ReactUpload-Cmz063Os.js} +1 -1
  53. package/esm/{ReactUpload-DBhppuxM.d.ts → ReactUpload-DMtaeFN2.d.ts} +1 -1
  54. package/{cjs/TestTriggers-Daxebd0V.d.ts → esm/TestTriggers-CjDhhz78.d.ts} +1 -11
  55. package/esm/{UploadController-DVsTVJVv.js → UploadController-D3um1cq9.js} +1 -1
  56. package/esm/{WebhookPayload-B4rA_Dvm.d.ts → WebhookPayload-C3F9j4p7.d.ts} +1 -1
  57. package/esm/app.d.ts +4 -4
  58. package/esm/app.js +2 -2
  59. package/esm/elements.d.ts +4 -4
  60. package/esm/elements.js +4 -4
  61. package/esm/{index-CWUnLKoF.d.ts → index-xF6Neq8A.d.ts} +2 -2
  62. package/esm/index.d.ts +3 -3
  63. package/esm/index.js +1 -1
  64. package/esm/react-native.d.ts +2 -2
  65. package/esm/react-native.js +4 -4
  66. package/esm/react.d.ts +4 -4
  67. package/esm/react.js +5 -5
  68. package/esm/server.d.ts +4 -4
  69. package/esm/server.js +2 -2
  70. package/esm/test-inputs.d.ts +15 -3
  71. package/esm/test-inputs.js +105 -2
  72. package/esm/testing.d.ts +14 -6
  73. package/esm/testing.js +122 -52
  74. package/esm/{ui-DUao8UY0.js → ui-B7Z6FH5F.js} +8 -8
  75. package/esm/{ui-sjnJhloQ.d.ts → ui-C_AhYdIA.d.ts} +2 -2
  76. package/esm/ui.d.ts +2 -2
  77. package/esm/ui.js +3 -3
  78. package/esm/vue.d.ts +5 -5
  79. package/esm/vue.js +4 -4
  80. package/package.json +1 -1
@@ -10089,7 +10089,6 @@ declare const ASSET_SCHEMA: zod.ZodObject<{
10089
10089
  createdAt: zod.ZodNumber;
10090
10090
  updatedAt: zod.ZodOptional<zod.ZodNumber>;
10091
10091
  name: zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>;
10092
- description: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>;
10093
10092
  externalId: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>;
10094
10093
  externalUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
10095
10094
  authorId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
@@ -15332,8 +15331,8 @@ type AssetBinaryPayloadInput = {
15332
15331
  declare const ASSET_SEARCH_MATCH_FIELD_SCHEMA: zod.ZodEnum<{
15333
15332
  "classification.moderation.decision": "classification.moderation.decision";
15334
15333
  "content.extension": "content.extension";
15334
+ "content.extractedText": "content.extractedText";
15335
15335
  "content.format": "content.format";
15336
- description: "description";
15337
15336
  externalId: "externalId";
15338
15337
  id: "id";
15339
15338
  name: "name";
@@ -15361,7 +15360,6 @@ declare const ASSET_SEARCH_RESULT_SCHEMA: zod.ZodObject<{
15361
15360
  createdAt: zod.ZodNumber;
15362
15361
  updatedAt: zod.ZodOptional<zod.ZodNumber>;
15363
15362
  name: zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>;
15364
- description: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>;
15365
15363
  externalId: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>;
15366
15364
  externalUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
15367
15365
  authorId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
@@ -20479,8 +20477,8 @@ declare const ASSET_SEARCH_RESULT_SCHEMA: zod.ZodObject<{
20479
20477
  matchedFields: zod.ZodArray<zod.ZodEnum<{
20480
20478
  "classification.moderation.decision": "classification.moderation.decision";
20481
20479
  "content.extension": "content.extension";
20480
+ "content.extractedText": "content.extractedText";
20482
20481
  "content.format": "content.format";
20483
- description: "description";
20484
20482
  externalId: "externalId";
20485
20483
  id: "id";
20486
20484
  name: "name";
@@ -42526,7 +42524,6 @@ declare const PATCH_LENS_BODY_SCHEMA: zod.ZodObject<{
42526
42524
  type PatchLensBody = zod.infer<typeof PATCH_LENS_BODY_SCHEMA>;
42527
42525
  declare const PATCH_ASSET_BODY_SCHEMA: zod.ZodObject<{
42528
42526
  name: zod.ZodOptional<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>;
42529
- description: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>>;
42530
42527
  externalId: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>>;
42531
42528
  externalUrl: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>>;
42532
42529
  metadata: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
@@ -42748,8 +42745,8 @@ type AssetChecksums = NonNullable<AssetContent$1["checksums"]>;
42748
42745
  /** A signed asset URL from `cdn.signAssetUrl`, and when it expires. */
42749
42746
  interface SignedAssetUrl {
42750
42747
  /**
42751
- * The signed asset URL, or the resource URL beneath it when `resource` was given. Append
42752
- * resources to the asset URL as to a public one; it stops working at `expiresAt`.
42748
+ * The signed URL of the resource it was signed for (`rendered` unless one was given), with any
42749
+ * lens, transform and viewer claims. It stops working at `expiresAt`.
42753
42750
  */
42754
42751
  url: string;
42755
42752
  /** When the URL stops working, in milliseconds since the Unix epoch. */
@@ -43039,7 +43036,6 @@ interface SignedUploadToken {
43039
43036
  type UploadPresetSubmitAssetOptions = IdempotencyOptions & {
43040
43037
  /** Required, except with a `File`, whose name it defaults to. */
43041
43038
  name?: string;
43042
- description?: string;
43043
43039
  } & ({
43044
43040
  content: AssetContentInput;
43045
43041
  } | {
@@ -43118,7 +43114,7 @@ type CdnAssetReference = {
43118
43114
  };
43119
43115
  /** A resource beneath an asset URL, with its selector and viewer claims. */
43120
43116
  interface CdnAssetLocation {
43121
- /** The resource. Left out, the URL is the asset URL, which every resource is a path beneath. */
43117
+ /** The resource. Defaults to `rendered`. */
43122
43118
  resource?: CdnResource;
43123
43119
  /** A named lens, such as `thumbnail`. Needs a resource that takes one. */
43124
43120
  lens?: string;
@@ -43135,14 +43131,12 @@ type CdnAssetUrlOptions = CdnAssetReference & CdnAssetLocation & {
43135
43131
  projectId?: string;
43136
43132
  };
43137
43133
  type CdnServeOptions = CdnAssetUrlOptions & {
43138
- /** Defaults to `rendered`. */
43139
- resource?: CdnResource;
43140
43134
  init?: RequestInit;
43141
43135
  };
43142
43136
  /**
43143
- * `resource` is the resource the URL is signed for, and it ends in it. Only a URL signed for
43144
- * `original` serves the exact uploaded file; any other, or one without a resource, serves every
43145
- * other resource beneath its grant.
43137
+ * `resource` is the resource the URL is signed for (`rendered` unless one is given), and it ends in
43138
+ * it. Only a URL signed for `original` serves the exact uploaded file; any other serves every other
43139
+ * resource beneath its grant.
43146
43140
  */
43147
43141
  type SignAssetUrlOptions = CdnAssetUrlOptions & {
43148
43142
  /** How long the URL works, in seconds, from 1 to 86400 (24 hours). Defaults to 900. */
@@ -43327,7 +43321,6 @@ type CreateMultipartUploadPartOptions = AssetContentOptions & {
43327
43321
  };
43328
43322
  interface SubmitAssetCommonOptions extends IdempotencyOptions {
43329
43323
  name: string;
43330
- description?: string;
43331
43324
  processingOptions?: ProcessingOptions;
43332
43325
  visibility?: "public" | "private";
43333
43326
  metadata?: Asset$1["metadata"];
@@ -1,6 +1,6 @@
1
1
  const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
2
- const require_CalmLensCdn = require("./CalmLensCdn-2VbArrj-.js");
3
- const require_UploadController = require("./UploadController-CmTjpOfp.js");
2
+ const require_CalmLensCdn = require("./CalmLensCdn-xQMrClXN.js");
3
+ const require_UploadController = require("./UploadController-tKqKphf3.js");
4
4
  const require_FileIcons = require("./FileIcons-Ob003MdS.js");
5
5
  // src/ui/viewers/ViewerAsset.ts
6
6
  /** Spreadsheet MIME types, as `content.format` reports them (compared lower-cased). */
@@ -1,5 +1,5 @@
1
- import { F as CdnTransform, O as CalmLensAppClientOptions, g as AssetModerationStatus, i as AssetAvailability, nn as ViewerClaims } from "./CalmLensTypes-87kiUg0H.js";
2
- import { t as CalmLensAppClient } from "./CalmLensAppClient-CdlcDd5l.js";
1
+ import { F as CdnTransform, O as CalmLensAppClientOptions, g as AssetModerationStatus, i as AssetAvailability, nn as ViewerClaims } from "./CalmLensTypes-DjuOXp3b.js";
2
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-v1Ho7mJQ.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,4 +1,4 @@
1
- const require_UploadController = require("./UploadController-CmTjpOfp.js");
1
+ const require_UploadController = require("./UploadController-tKqKphf3.js");
2
2
  let react = require("react");
3
3
  // src/ui/ReactUpload.ts
4
4
  const CalmLensContext = (0, react.createContext)(void 0);
@@ -1,4 +1,4 @@
1
- import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-Ccy4-_sN.js";
1
+ import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-DaCkaDkb.js";
2
2
  import { ReactNode } from "react";
3
3
  type CalmLensProviderProps<F extends UploadFile = File> = CalmLensProvidedOptions<F> & {
4
4
  children?: ReactNode;
@@ -362,16 +362,6 @@ declare const TEST_INPUT_PRESETS: {
362
362
  * ordinary content.
363
363
  */
364
364
  declare function detectTestTrigger(text: string, key: string): Promise<TestInput | undefined>;
365
- /**
366
- * The text code's signed bytes as a grid (TestImageGrid.ts): the signed payload's length (two
367
- * bytes, big-endian), the 16-byte tag, then the payload (the scenario JSON). The reader rebuilds
368
- * the text code, so images and text share one verification.
369
- */
370
- declare function paintTestImage(scenario: TestInput | ClassificationTestSignal, key: string): Promise<{
371
- width: number;
372
- height: number;
373
- rgba: Uint8Array<ArrayBuffer>;
374
- }>;
375
365
  /**
376
366
  * The test input an image declares when the whole image is one of the project's test images,
377
367
  * also after lossy formats and resizing: the grid, optionally on a uniform border. Every pixel
@@ -412,4 +402,4 @@ declare function detectTestImage(image: RgbaImage, key: string,
412
402
  }[] | undefined;
413
403
  } | undefined;
414
404
  } | undefined>;
415
- export { TEST_FACE_AGE_PRESETS as a, TestDetections as c, detectTestTrigger as d, getImageTestCategories as f, TEST_FACE_AGE_MAX as i, TestInput 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, ClassificationTestSignal as t, detectTestImage as u };
405
+ export { TEST_FACE_AGE_PRESETS as a, TestDetections as c, detectTestTrigger as d, getImageTestCategories as f, TEST_FACE_AGE_MAX as i, TestInput as l, TEST_DETECTIONS_MAX as n, TEST_INPUT_KEY_PATTERN as o, testInputForSignal as p, TEST_DETECTION_BOX_MAX as r, TEST_INPUT_PRESETS as s, ClassificationTestSignal as t, detectTestImage as u };
@@ -1,5 +1,5 @@
1
1
  const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
2
- const require_CalmLensAppClient = require("./CalmLensAppClient-BBcq6pJg.js");
2
+ const require_CalmLensAppClient = require("./CalmLensAppClient-DOYOJ70t.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 { _n as EventResourceKind, fn as TypedEvent, un as Actor } from "./CalmLensTypes-87kiUg0H.js";
1
+ import { _n as EventResourceKind, fn as TypedEvent, un as Actor } from "./CalmLensTypes-DjuOXp3b.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/cjs/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 FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-87kiUg0H.js";
3
- import { t as CalmLensAppClient } from "./CalmLensAppClient-CdlcDd5l.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-CWUnLKoF.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-B4rA_Dvm.js";
2
+ import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-DjuOXp3b.js";
3
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-v1Ho7mJQ.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-xF6Neq8A.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-C3F9j4p7.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 GetEventsResponse as 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 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/cjs/app.js CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
3
- const require_CalmLensCdn = require("./CalmLensCdn-2VbArrj-.js");
3
+ const require_CalmLensCdn = require("./CalmLensCdn-xQMrClXN.js");
4
4
  require("./index.js");
5
- const require_CalmLensAppClient = require("./CalmLensAppClient-BBcq6pJg.js");
5
+ const require_CalmLensAppClient = require("./CalmLensAppClient-DOYOJ70t.js");
6
6
  exports.AUTO_PAGING_TO_ARRAY_MAX = require_CalmLensCdn.AUTO_PAGING_TO_ARRAY_MAX;
7
7
  exports.CALMLENS_ERROR_CODES = require_CalmLensError.CALMLENS_ERROR_CODES;
8
8
  exports.CDN_RESOURCES = require_CalmLensCdn.CDN_RESOURCES;
package/cjs/elements.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { i as AssetAvailability } from "./CalmLensTypes-87kiUg0H.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-Ccy4-_sN.js";
3
- import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BAH54V1q.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-sjnJhloQ.js";
1
+ import { i as AssetAvailability } from "./CalmLensTypes-DjuOXp3b.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-DaCkaDkb.js";
3
+ import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-Dx2l9wC0.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-C_AhYdIA.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-BJKh49aM.js");
3
- const require_Core = require("./Core-xy9aV1ED.js");
4
- const require_UploadController = require("./UploadController-CmTjpOfp.js");
2
+ const require_ui = require("./ui-B5tgw_En.js");
3
+ const require_Core = require("./Core-BtFJ2xfb.js");
4
+ const require_UploadController = require("./UploadController-tKqKphf3.js");
5
5
  const require_FileIcons = require("./FileIcons-Ob003MdS.js");
6
- const require_BrowserUpload = require("./BrowserUpload-IiRDbL85.js");
6
+ const require_BrowserUpload = require("./BrowserUpload-CbbFE-2v.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-C3pkrGYS-B7EygpJn.js";
2
- import { Bn as AssetInfo, N as CdnResource, et as GetAssetInfoOptions } from "./CalmLensTypes-87kiUg0H.js";
3
- import "./WebhookPayload-B4rA_Dvm.js";
2
+ import { Bn as AssetInfo, N as CdnResource, et as GetAssetInfoOptions } from "./CalmLensTypes-DjuOXp3b.js";
3
+ import "./WebhookPayload-C3F9j4p7.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 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 FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-87kiUg0H.js";
3
- import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-CWUnLKoF.js";
4
- 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-B4rA_Dvm.js";
2
+ import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-DjuOXp3b.js";
3
+ import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-xF6Neq8A.js";
4
+ 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-C3F9j4p7.js";
5
5
  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, 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 GetEventsResponse as 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 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/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
3
- const require_CalmLensCdn = require("./CalmLensCdn-2VbArrj-.js");
3
+ const require_CalmLensCdn = require("./CalmLensCdn-xQMrClXN.js");
4
4
  exports.AUTO_PAGING_TO_ARRAY_MAX = require_CalmLensCdn.AUTO_PAGING_TO_ARRAY_MAX;
5
5
  exports.CALMLENS_ERROR_CODES = require_CalmLensError.CALMLENS_ERROR_CODES;
6
6
  exports.CDN_RESOURCES = require_CalmLensCdn.CDN_RESOURCES;
@@ -1,5 +1,5 @@
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, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getAssetAspectRatio, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./Core-Ccy4-_sN.js";
2
- import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-DBhppuxM.js";
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, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getAssetAspectRatio, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./Core-DaCkaDkb.js";
2
+ import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-DMtaeFN2.js";
3
3
  import { ReactNode } from "react";
4
4
  import { StyleProp, ViewStyle } from "react-native";
5
5
  /** What the uploader asks your picker for. */
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_CalmLensCdn = require("./CalmLensCdn-2VbArrj-.js");
3
- const require_Core = require("./Core-xy9aV1ED.js");
4
- const require_UploadController = require("./UploadController-CmTjpOfp.js");
2
+ const require_CalmLensCdn = require("./CalmLensCdn-xQMrClXN.js");
3
+ const require_Core = require("./Core-BtFJ2xfb.js");
4
+ const require_UploadController = require("./UploadController-tKqKphf3.js");
5
5
  const require_FileIcons = require("./FileIcons-Ob003MdS.js");
6
- const require_ReactUpload = require("./ReactUpload-BX3XOVfb.js");
6
+ const require_ReactUpload = require("./ReactUpload-CRtUXzMP.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,7 +1,7 @@
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, 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-Ccy4-_sN.js";
2
- import { n as CalmLensProviderProps, t as CalmLensProvider } from "./ReactUpload-DBhppuxM.js";
3
- import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BAH54V1q.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-sjnJhloQ.js";
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, 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-DaCkaDkb.js";
2
+ import { n as CalmLensProviderProps, t as CalmLensProvider } from "./ReactUpload-DMtaeFN2.js";
3
+ import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-Dx2l9wC0.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-C_AhYdIA.js";
5
5
  import { CSSProperties, HTMLAttributes, ReactNode } from "react";
6
6
  type ElementProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
7
7
  /** Leaves out the stylesheet the viewers render, so you can style the `calmlens-*` classes. */
package/cjs/react.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_ui = require("./ui-BJKh49aM.js");
4
- const require_Core = require("./Core-xy9aV1ED.js");
5
- const require_UploadController = require("./UploadController-CmTjpOfp.js");
3
+ const require_ui = require("./ui-B5tgw_En.js");
4
+ const require_Core = require("./Core-BtFJ2xfb.js");
5
+ const require_UploadController = require("./UploadController-tKqKphf3.js");
6
6
  const require_FileIcons = require("./FileIcons-Ob003MdS.js");
7
- const require_ReactUpload = require("./ReactUpload-BX3XOVfb.js");
8
- const require_BrowserUpload = require("./BrowserUpload-IiRDbL85.js");
7
+ const require_ReactUpload = require("./ReactUpload-CRtUXzMP.js");
8
+ const require_BrowserUpload = require("./BrowserUpload-CbbFE-2v.js");
9
9
  let react = require("react");
10
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
11
  const OPTION_NAMES = /* @__PURE__ */ new Set([
package/cjs/server.d.ts CHANGED
@@ -1,8 +1,8 @@
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 FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-87kiUg0H.js";
3
- import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-CWUnLKoF.js";
4
- 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-B4rA_Dvm.js";
5
- import { t as CalmLensServerClient } from "./CalmLensServerClient-CtS66dCU.js";
2
+ import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-DjuOXp3b.js";
3
+ import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-xF6Neq8A.js";
4
+ 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-C3F9j4p7.js";
5
+ import { t as CalmLensServerClient } from "./CalmLensServerClient-CoiZN7Fr.js";
6
6
  export declare const WEBHOOK_DELIVERY_HEADER = "x-calmlens-delivery";
7
7
  export declare const WEBHOOK_TIMESTAMP_HEADER = "x-calmlens-timestamp";
8
8
  export declare const WEBHOOK_SIGNATURE_HEADER = "x-calmlens-signature";
package/cjs/server.js CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
3
- const require_CalmLensCdn = require("./CalmLensCdn-2VbArrj-.js");
3
+ const require_CalmLensCdn = require("./CalmLensCdn-xQMrClXN.js");
4
4
  require("./index.js");
5
- const require_CalmLensServerClient = require("./CalmLensServerClient-DbemlDXj.js");
5
+ const require_CalmLensServerClient = require("./CalmLensServerClient-DtqFQgUn.js");
6
6
  exports.AUTO_PAGING_TO_ARRAY_MAX = require_CalmLensCdn.AUTO_PAGING_TO_ARRAY_MAX;
7
7
  exports.CALMLENS_ERROR_CODES = require_CalmLensError.CALMLENS_ERROR_CODES;
8
8
  exports.CDN_RESOURCES = require_CalmLensCdn.CDN_RESOURCES;
@@ -1,6 +1,18 @@
1
- import { a as TEST_FACE_AGE_PRESETS, c as TestDetections, d as detectTestTrigger, f as getImageTestCategories, i as TEST_FACE_AGE_MAX, l as TestInput, m as testInputForSignal, n as TEST_DETECTIONS_MAX, o as TEST_INPUT_KEY_PATTERN, p as paintTestImage$1, r as TEST_DETECTION_BOX_MAX, s as TEST_INPUT_PRESETS, t as ClassificationTestSignal, u as detectTestImage } from "./TestTriggers-Daxebd0V.js";
1
+ import { a as TEST_FACE_AGE_PRESETS, c as TestDetections, d as detectTestTrigger, f as getImageTestCategories, i as TEST_FACE_AGE_MAX, l as TestInput, n as TEST_DETECTIONS_MAX, o as TEST_INPUT_KEY_PATTERN, p as testInputForSignal, r as TEST_DETECTION_BOX_MAX, s as TEST_INPUT_PRESETS, t as ClassificationTestSignal, u as detectTestImage } from "./TestTriggers-CjDhhz78.js";
2
2
  /** A text code for `scenario`, signed with the project's test input key. */
3
3
  export declare const generateTestTextCode: (scenario: TestInput | ClassificationTestSignal, key: string) => Promise<string>;
4
- /** An RGBA test image for `scenario`, signed with the project's test input key. */
5
- export declare const paintTestImage: (scenario: TestInput | ClassificationTestSignal, key: string) => ReturnType<typeof paintTestImage$1>;
4
+ /** A painted test image: its RGBA pixels, row by row, and the same image as PNG bytes. */
5
+ export interface TestImage {
6
+ width: number;
7
+ height: number;
8
+ rgba: Uint8Array;
9
+ /** The image as a PNG, to upload as it is. */
10
+ png: Uint8Array;
11
+ }
12
+ /**
13
+ * The test image for `scenario`, signed with the project's test input key. Upload its `png` bytes
14
+ * (or encode `rgba` in another format: the image survives lossy formats and resizing) as the whole
15
+ * image, optionally on a plain single-colour border.
16
+ */
17
+ export declare const paintTestImage: (scenario: TestInput | ClassificationTestSignal, key: string) => Promise<TestImage>;
6
18
  export { type ClassificationTestSignal, TEST_DETECTIONS_MAX, TEST_DETECTION_BOX_MAX, TEST_FACE_AGE_MAX, TEST_FACE_AGE_PRESETS, TEST_INPUT_KEY_PATTERN, TEST_INPUT_PRESETS, type TestDetections, type TestInput, detectTestImage, detectTestTrigger, getImageTestCategories, testInputForSignal };
@@ -1,5 +1,98 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_CalmLensTestInputArguments = require("./CalmLensTestInputArguments-PYuRmE0j.js");
3
+ // src/client/TestImagePng.ts
4
+ /**
5
+ * Encodes a painted test image as a PNG: 8-bit RGBA rows without filtering in stored deflate
6
+ * blocks, as every SDK writes it, so the bytes match across SDKs. Runs anywhere, with no
7
+ * compression library.
8
+ */
9
+ function encodeTestImagePng(width, height, rgba) {
10
+ const stride = width * 4;
11
+ const raw = new Uint8Array((stride + 1) * height);
12
+ for (let row = 0; row < height; row++) raw.set(rgba.subarray(row * stride, (row + 1) * stride), row * (stride + 1) + 1);
13
+ const blocks = Math.max(1, Math.ceil(raw.length / 65535));
14
+ const stream = new Uint8Array(2 + raw.length + blocks * 5 + 4);
15
+ stream.set([120, 1]);
16
+ let position = 2;
17
+ for (let offset = 0; offset < raw.length || position === 2; offset += 65535) {
18
+ const block = raw.subarray(offset, offset + 65535);
19
+ const length = block.length;
20
+ stream.set([
21
+ offset + length >= raw.length ? 1 : 0,
22
+ length & 255,
23
+ length >> 8,
24
+ ~length & 255,
25
+ ~length >> 8 & 255
26
+ ], position);
27
+ stream.set(block, position + 5);
28
+ position += 5 + length;
29
+ }
30
+ writeUint32(stream, position, adler32(raw));
31
+ const header = /* @__PURE__ */ new Uint8Array(13);
32
+ writeUint32(header, 0, width);
33
+ writeUint32(header, 4, height);
34
+ header.set([
35
+ 8,
36
+ 6,
37
+ 0,
38
+ 0,
39
+ 0
40
+ ], 8);
41
+ return concat([
42
+ Uint8Array.of(137, 80, 78, 71, 13, 10, 26, 10),
43
+ chunk("IHDR", header),
44
+ chunk("IDAT", stream),
45
+ chunk("IEND", /* @__PURE__ */ new Uint8Array(0))
46
+ ]);
47
+ }
48
+ function chunk(kind, body) {
49
+ const typed = new Uint8Array(4 + body.length);
50
+ for (let i = 0; i < 4; i++) typed[i] = kind.charCodeAt(i);
51
+ typed.set(body, 4);
52
+ const out = new Uint8Array(12 + body.length);
53
+ writeUint32(out, 0, body.length);
54
+ out.set(typed, 4);
55
+ writeUint32(out, 8 + body.length, crc32(typed));
56
+ return out;
57
+ }
58
+ function writeUint32(target, offset, value) {
59
+ target[offset] = value >>> 24;
60
+ target[offset + 1] = value >>> 16 & 255;
61
+ target[offset + 2] = value >>> 8 & 255;
62
+ target[offset + 3] = value & 255;
63
+ }
64
+ function concat(parts) {
65
+ const out = new Uint8Array(parts.reduce((total, part) => total + part.length, 0));
66
+ let offset = 0;
67
+ for (const part of parts) {
68
+ out.set(part, offset);
69
+ offset += part.length;
70
+ }
71
+ return out;
72
+ }
73
+ let crcTable;
74
+ function crc32(bytes) {
75
+ if (!crcTable) {
76
+ crcTable = /* @__PURE__ */ new Uint32Array(256);
77
+ for (let n = 0; n < 256; n++) {
78
+ let c = n;
79
+ for (let k = 0; k < 8; k++) c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
80
+ crcTable[n] = c >>> 0;
81
+ }
82
+ }
83
+ let crc = 4294967295;
84
+ for (const byte of bytes) crc = crcTable[(crc ^ byte) & 255] ^ crc >>> 8;
85
+ return (crc ^ 4294967295) >>> 0;
86
+ }
87
+ function adler32(bytes) {
88
+ let a = 1;
89
+ let b = 0;
90
+ for (const byte of bytes) {
91
+ a = (a + byte) % 65521;
92
+ b = (b + a) % 65521;
93
+ }
94
+ return (b << 16 | a) >>> 0;
95
+ }
3
96
  // src/test-inputs.ts
4
97
  /**
5
98
  * Portable test inputs: presets and custom instances share one authenticated format. CalmLens
@@ -8,8 +101,18 @@ const require_CalmLensTestInputArguments = require("./CalmLensTestInputArguments
8
101
  */
9
102
  /** A text code for `scenario`, signed with the project's test input key. */
10
103
  const generateTestTextCode = (scenario, key) => require_CalmLensTestInputArguments.withValidTestInputArguments(key, () => require_CalmLensTestInputArguments.generateTestTextCode(scenario, key));
11
- /** An RGBA test image for `scenario`, signed with the project's test input key. */
12
- const paintTestImage = (scenario, key) => require_CalmLensTestInputArguments.withValidTestInputArguments(key, () => require_CalmLensTestInputArguments.paintTestImage(scenario, key));
104
+ /**
105
+ * The test image for `scenario`, signed with the project's test input key. Upload its `png` bytes
106
+ * (or encode `rgba` in another format: the image survives lossy formats and resizing) as the whole
107
+ * image, optionally on a plain single-colour border.
108
+ */
109
+ const paintTestImage = async (scenario, key) => {
110
+ const image = await require_CalmLensTestInputArguments.withValidTestInputArguments(key, () => require_CalmLensTestInputArguments.paintTestImage(scenario, key));
111
+ return {
112
+ ...image,
113
+ png: encodeTestImagePng(image.width, image.height, image.rgba)
114
+ };
115
+ };
13
116
  exports.TEST_DETECTIONS_MAX = require_CalmLensTestInputArguments.TEST_DETECTIONS_MAX;
14
117
  exports.TEST_DETECTION_BOX_MAX = require_CalmLensTestInputArguments.TEST_DETECTION_BOX_MAX;
15
118
  exports.TEST_FACE_AGE_MAX = require_CalmLensTestInputArguments.TEST_FACE_AGE_MAX;