calmlens 0.35.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +2 -0
  2. package/bin/calmlens.js +1 -1
  3. package/cjs/{BrowserUpload-C5rpoHJc.js → BrowserUpload-BOXt-BFy.js} +1 -1
  4. package/cjs/{BrowserUpload-BGxUQPHj.d.ts → BrowserUpload-CuG3tWSo.d.ts} +2 -2
  5. package/cjs/{CalmLensAppClient-Cxe_6E-A.js → CalmLensAppClient-Bt9GNyqS.js} +2 -2
  6. package/cjs/{CalmLensAppClient-0to4ZZ7i.d.ts → CalmLensAppClient-QqtovWE-.d.ts} +1 -1
  7. package/cjs/{CalmLensCdn-DN3z-uDg.js → CalmLensCdn-D4I4Km4j.js} +1 -1
  8. package/cjs/{CalmLensConnection-B7gW8yEp.js → CalmLensConnection-knkk2-BW.js} +1 -1
  9. package/cjs/{CalmLensServerClient-DLdwysxW.js → CalmLensServerClient--L5qRzFd.js} +2 -2
  10. package/cjs/{CalmLensServerClient-CiiaFN7R.d.ts → CalmLensServerClient-csSQqHBt.d.ts} +2 -2
  11. package/cjs/{CalmLensTestInputArguments-PYuRmE0j.js → CalmLensTestInputArguments-C6S09FVQ.js} +7 -1
  12. package/cjs/{CalmLensTypes-9kLIOd1C.d.ts → CalmLensTypes-_f7QVRtO.d.ts} +2 -2
  13. package/cjs/{Core-CFxvTass.d.ts → Core-4iFxKJnY.d.ts} +2 -2
  14. package/cjs/{Core-COxzwIVe.js → Core-CNsji7uR.js} +2 -2
  15. package/cjs/{ReactUpload-Dso2ir_F.d.ts → ReactUpload-4qd2xACg.d.ts} +1 -1
  16. package/cjs/{ReactUpload-eD850yww.js → ReactUpload-DfioGW58.js} +1 -1
  17. package/cjs/{UploadController-C2NQZhRo.js → UploadController-B-a2r2kN.js} +1 -1
  18. package/{esm/WebhookPayload-Cv2uwykA.d.ts → cjs/WebhookPayload-BJtggTLd.d.ts} +1 -1
  19. package/cjs/app.d.ts +4 -4
  20. package/cjs/app.js +2 -2
  21. package/cjs/elements.d.ts +4 -4
  22. package/cjs/elements.js +4 -4
  23. package/cjs/{index-D-ZwYNRQ.d.ts → index-IEA75nev.d.ts} +2 -2
  24. package/cjs/index.d.ts +3 -3
  25. package/cjs/index.js +1 -1
  26. package/cjs/react-native.d.ts +2 -2
  27. package/cjs/react-native.js +4 -4
  28. package/cjs/react.d.ts +4 -4
  29. package/cjs/react.js +5 -5
  30. package/cjs/server.d.ts +4 -4
  31. package/cjs/server.js +2 -2
  32. package/cjs/test-inputs.js +1 -1
  33. package/cjs/testing.d.ts +22 -5
  34. package/cjs/testing.js +111 -12
  35. package/cjs/{ui-BkOZ_jV_.d.ts → ui-BMQW3Hse.d.ts} +2 -2
  36. package/cjs/{ui-D4cxDZIT.js → ui-DOkuD90x.js} +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-AsxTQ4x8.js → BrowserUpload-Ch67b69G.js} +1 -1
  42. package/esm/{BrowserUpload-BGxUQPHj.d.ts → BrowserUpload-CuG3tWSo.d.ts} +2 -2
  43. package/esm/{CalmLensAppClient-B8O3Ai6H.js → CalmLensAppClient-DEFSQC15.js} +2 -2
  44. package/esm/{CalmLensAppClient-0to4ZZ7i.d.ts → CalmLensAppClient-QqtovWE-.d.ts} +1 -1
  45. package/esm/{CalmLensCdn-ZLaMr4XD.js → CalmLensCdn-xvzJyv9X.js} +1 -1
  46. package/esm/{CalmLensConnection-Duv-JB6o.js → CalmLensConnection-D6BVOMri.js} +1 -1
  47. package/esm/{CalmLensServerClient-CdQSdL6-.js → CalmLensServerClient-BGz_olSn.js} +2 -2
  48. package/esm/{CalmLensServerClient-CiiaFN7R.d.ts → CalmLensServerClient-csSQqHBt.d.ts} +2 -2
  49. package/esm/{CalmLensTestInputArguments-CqPADTkl.js → CalmLensTestInputArguments-DS_3mt1C.js} +2 -2
  50. package/esm/{CalmLensTypes-9kLIOd1C.d.ts → CalmLensTypes-_f7QVRtO.d.ts} +2 -2
  51. package/esm/{Core-CFxvTass.d.ts → Core-4iFxKJnY.d.ts} +2 -2
  52. package/esm/{Core-73r7ehG9.js → Core-Cj91IL4-.js} +2 -2
  53. package/esm/{ReactUpload-Dso2ir_F.d.ts → ReactUpload-4qd2xACg.d.ts} +1 -1
  54. package/esm/{ReactUpload-BrjxbrUo.js → ReactUpload-Bg4-5rV2.js} +1 -1
  55. package/esm/{UploadController-DLPXc9Ug.js → UploadController-CpLvD8W-.js} +1 -1
  56. package/{cjs/WebhookPayload-Cv2uwykA.d.ts → esm/WebhookPayload-BJtggTLd.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-D-ZwYNRQ.d.ts → index-IEA75nev.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.js +1 -1
  71. package/esm/testing.d.ts +22 -5
  72. package/esm/testing.js +111 -12
  73. package/esm/{ui-BkOZ_jV_.d.ts → ui-BMQW3Hse.d.ts} +2 -2
  74. package/esm/{ui-Byxq-pmc.js → ui-CGrWIVKa.js} +2 -2
  75. package/esm/ui.d.ts +2 -2
  76. package/esm/ui.js +3 -3
  77. package/esm/vue.d.ts +5 -5
  78. package/esm/vue.js +4 -4
  79. package/package.json +1 -1
package/esm/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 EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-9kLIOd1C.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-D-ZwYNRQ.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-Cv2uwykA.js";
2
+ import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-_f7QVRtO.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-IEA75nev.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-BJtggTLd.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 EventsPage, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPage, type ListPoliciesOptions, type ListPromise, type ListUploadPresetsOptions, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type PolicySettings, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo };
package/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-C15tWu8W.js";
2
- import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-ZLaMr4XD.js";
2
+ import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-xvzJyv9X.js";
3
3
  export { AUTO_PAGING_TO_ARRAY_MAX, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, DEFAULT_CDN_BASE_URL, SDK_VERSION, getAssetInfo };
@@ -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-CFxvTass.js";
2
- import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-Dso2ir_F.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-4iFxKJnY.js";
2
+ import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-4qd2xACg.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,8 +1,8 @@
1
- import { a as assetUrlOf, r as appendAssetLocation } from "./CalmLensCdn-ZLaMr4XD.js";
2
- import { C as pickAssetSource, E as resolveTheme, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, x as getPlayedPercent, y as getAssetViewKey } from "./Core-73r7ehG9.js";
3
- import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-DLPXc9Ug.js";
1
+ import { a as assetUrlOf, r as appendAssetLocation } from "./CalmLensCdn-xvzJyv9X.js";
2
+ import { C as pickAssetSource, E as resolveTheme, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, x as getPlayedPercent, y as getAssetViewKey } from "./Core-Cj91IL4-.js";
3
+ import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-CpLvD8W-.js";
4
4
  import { a as getFileIcon, o as getFileIconLabel, t as FILE_ICON_COLORS } from "./FileIcons-M6dzjFxd.js";
5
- import { i as useUploadSnapshot, n as useCalmLensUpload, r as useOwnController, t as CalmLensProvider } from "./ReactUpload-BrjxbrUo.js";
5
+ import { i as useUploadSnapshot, n as useCalmLensUpload, r as useOwnController, t as CalmLensProvider } from "./ReactUpload-Bg4-5rV2.js";
6
6
  import { useEffect, useMemo, useRef, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Image, Linking, PixelRatio, Pressable, StyleSheet, Text, View } from "react-native";
package/esm/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-CFxvTass.js";
2
- import { n as CalmLensProviderProps, t as CalmLensProvider } from "./ReactUpload-Dso2ir_F.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-BGxUQPHj.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-BkOZ_jV_.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-4iFxKJnY.js";
2
+ import { n as CalmLensProviderProps, t as CalmLensProvider } from "./ReactUpload-4qd2xACg.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-CuG3tWSo.js";
4
+ import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BMQW3Hse.js";
5
5
  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/esm/react.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-Byxq-pmc.js";
3
- import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, n as CALMLENS_STYLES_ID, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-73r7ehG9.js";
4
- import { a as createProgressFetch, i as withProvidedOptions, r as isFileAccepted, t as UploadController } from "./UploadController-DLPXc9Ug.js";
2
+ import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-CGrWIVKa.js";
3
+ import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, n as CALMLENS_STYLES_ID, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-Cj91IL4-.js";
4
+ import { a as createProgressFetch, i as withProvidedOptions, r as isFileAccepted, t as UploadController } from "./UploadController-CpLvD8W-.js";
5
5
  import { c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
6
- import { i as useUploadSnapshot, n as useCalmLensUpload$1, r as useOwnController, t as CalmLensProvider } from "./ReactUpload-BrjxbrUo.js";
7
- import { t as createUploadController } from "./BrowserUpload-AsxTQ4x8.js";
6
+ import { i as useUploadSnapshot, n as useCalmLensUpload$1, r as useOwnController, t as CalmLensProvider } from "./ReactUpload-Bg4-5rV2.js";
7
+ import { t as createUploadController } from "./BrowserUpload-Ch67b69G.js";
8
8
  import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
10
  const OPTION_NAMES = /* @__PURE__ */ new Set([
package/esm/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 EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-9kLIOd1C.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-D-ZwYNRQ.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-Cv2uwykA.js";
5
- import { t as CalmLensServerClient } from "./CalmLensServerClient-CiiaFN7R.js";
2
+ import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-_f7QVRtO.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-IEA75nev.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-BJtggTLd.js";
5
+ import { t as CalmLensServerClient } from "./CalmLensServerClient-csSQqHBt.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/esm/server.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-C15tWu8W.js";
2
- import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-ZLaMr4XD.js";
2
+ import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-xvzJyv9X.js";
3
3
  import "./index.js";
4
- import { a as WEBHOOK_TIMESTAMP_HEADER, c as isNewerEvent, d as verifyWebhookSignature, i as WEBHOOK_SIGNATURE_TOLERANCE_SECONDS, l as isTestWebhookEvent, n as WEBHOOK_DELIVERY_HEADER, o as getEventFact, r as WEBHOOK_SIGNATURE_HEADER, s as getEventFacts, t as CalmLensServerClient, u as parseWebhookEvent } from "./CalmLensServerClient-CdQSdL6-.js";
4
+ import { a as WEBHOOK_TIMESTAMP_HEADER, c as isNewerEvent, d as verifyWebhookSignature, i as WEBHOOK_SIGNATURE_TOLERANCE_SECONDS, l as isTestWebhookEvent, n as WEBHOOK_DELIVERY_HEADER, o as getEventFact, r as WEBHOOK_SIGNATURE_HEADER, s as getEventFacts, t as CalmLensServerClient, u as parseWebhookEvent } from "./CalmLensServerClient-BGz_olSn.js";
5
5
  export { AUTO_PAGING_TO_ARRAY_MAX, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, CalmLensServerClient, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, DEFAULT_CDN_BASE_URL, SDK_VERSION, WEBHOOK_DELIVERY_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_SIGNATURE_TOLERANCE_SECONDS, WEBHOOK_TIMESTAMP_HEADER, getAssetInfo, getEventFact, getEventFacts, isNewerEvent, isTestWebhookEvent, parseWebhookEvent, verifyWebhookSignature };
@@ -1,4 +1,4 @@
1
- import { a as TEST_FACE_AGE_PRESETS, c as detectTestImage, d as getImageTestCategories, i as TEST_FACE_AGE_MAX, l as detectTestTrigger, 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 withValidTestInputArguments, u as generateTestTextCode$1 } from "./CalmLensTestInputArguments-CqPADTkl.js";
1
+ import { a as TEST_FACE_AGE_PRESETS, c as detectTestImage, d as getImageTestCategories, i as TEST_FACE_AGE_MAX, l as detectTestTrigger, 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 withValidTestInputArguments, u as generateTestTextCode$1 } from "./CalmLensTestInputArguments-DS_3mt1C.js";
2
2
  // src/client/TestImagePng.ts
3
3
  /**
4
4
  * Encodes a painted test image as a PNG: 8-bit RGBA rows without filtering in stored deflate
package/esm/testing.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Jt as SignedUploadToken, Kt as SignUploadTokenOptions, Ln as PermissionGrant, Nn as TypedEvent, O as CalmLensAppClientOptions, Rn as Folder, Vn as AssetBinaryPayloadInput, k as CalmLensServerClientOptions, m as AssetModeration, on as UploadPresetDefinition, r as Asset } from "./CalmLensTypes-9kLIOd1C.js";
2
- import { t as CalmLensAppClient } from "./CalmLensAppClient-0to4ZZ7i.js";
3
- import { I as ApiErrorCode, n as WebhookEventPayload } from "./WebhookPayload-Cv2uwykA.js";
4
- import { t as CalmLensServerClient } from "./CalmLensServerClient-CiiaFN7R.js";
1
+ import { Jt as SignedUploadToken, Kt as SignUploadTokenOptions, Ln as PermissionGrant, Nn as TypedEvent, O as CalmLensAppClientOptions, Rn as Folder, Vn as AssetBinaryPayloadInput, k as CalmLensServerClientOptions, m as AssetModeration, on as UploadPresetDefinition, r as Asset } from "./CalmLensTypes-_f7QVRtO.js";
2
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-QqtovWE-.js";
3
+ import { I as ApiErrorCode, n as WebhookEventPayload } from "./WebhookPayload-BJtggTLd.js";
4
+ import { t as CalmLensServerClient } from "./CalmLensServerClient-csSQqHBt.js";
5
5
  import { t as ClassificationTestSignal } from "./TestTriggers-CjDhhz78.js";
6
6
  import "zod";
7
7
  /**
@@ -16,6 +16,10 @@ declare const signUploadTokenWithApiKey: (apiKey: string, options: SignUploadTok
16
16
  }) => Promise<SignedUploadToken>;
17
17
  export declare const MEDIA_TEST_SIGNALS: readonly ["sexual", "violence", "self-harm", "harassment", "hate", "criminal-activity", "personal-information", "profanity", "violence.graphic"];
18
18
  export declare const MOCK_API_KEY_PREFIX = "sk_test_";
19
+ /**
20
+ * Creates a mock API key holding `grants`. Throws `sdk/invalid-argument`, naming the grant, for
21
+ * one the API doesn't accept, such as an unknown action.
22
+ */
19
23
  export declare const createMockApiKey: (grants?: PermissionGrant[]) => string;
20
24
  /**
21
25
  * The ID of every mock API key, as the `id` of the `actor` and `decidedBy` its requests record,
@@ -80,6 +84,10 @@ type MockDetectedLink = EvaluatedFeature<"linkDetection">["links"][number];
80
84
  type MockDetectedPerson = EvaluatedFeature<"personDetection">["people"][number];
81
85
  /** A face that face detection found, as `classification.faceDetection.faces` reports one. */
82
86
  type MockDetectedFace = EvaluatedFeature<"faceDetection">["faces"][number];
87
+ /** A stricter status in one jurisdiction, as `classification.moderation.regions` reports one. */
88
+ type MockRegionalDecision = AssetModeration["regions"][number];
89
+ type Region = MockRegionalDecision["region"];
90
+ type RegionalStatus = MockRegionalDecision["status"];
83
91
  /** Why a decision waits for human review: `sampled`, or `uncertain` about some categories. */
84
92
  type MockPendingReviewReason = "sampled" | "uncertain";
85
93
  /**
@@ -100,6 +108,15 @@ export declare class MockDecision {
100
108
  flag(category: Category, score: number, qualifiers?: Record<string, number>): this;
101
109
  /** Marks `category` as not assessed (`not-evaluated` for reason `not-supported`). */
102
110
  notEvaluated(category: Category): this;
111
+ /**
112
+ * Adds a stricter `status` for viewers under the jurisdiction `region` (`DE`, `AT`, `FR`, `GB`,
113
+ * `EU`, `AU` or `BR`), set by the mandatory `rule`, optionally acting on `category`, as
114
+ * `classification.moderation.regions` reports it. The mock CDN applies it for a viewer whose
115
+ * `region` claim falls under that jurisdiction, while the project serves it.
116
+ */
117
+ region(region: Region, status: RegionalStatus, rule: string, category?: Category): this;
118
+ /** @internal The regional outcomes `region` added. */
119
+ get regionalDecisions(): MockRegionalDecision[];
103
120
  /**
104
121
  * Leaves the decision waiting for human review, as `classification.moderation.pendingReview`
105
122
  * reports: `sampled`, or `uncertain` with the `uncertainCategories` that made it so. The queue's
@@ -489,4 +506,4 @@ export declare const createWebhookHeaders: (options: {
489
506
  }) => Promise<Record<string, string>>;
490
507
  /** A spoken media test phrase for `signal`, signed with the project's test input key. */
491
508
  export declare const generateMediaTestCode: (signal: ClassificationTestSignal, key: string) => Promise<string>;
492
- export { type MockAssetOutcome, type MockCalmLensAppClientOptions, type MockCalmLensCall, type MockCalmLensOperation, type MockCalmLensServerClientOptions, type MockDatabaseStorage, type MockDetectedFace, type MockDetectedLink, type MockDetectedPerson, type MockEventInput, type MockFailureOptions, type MockImageStorage, type MockModerate, type MockModerationInput, type MockModerationTrigger, type MockQrCode, type MockRequestFailure, type MockReviewDecision, type MockServedUrl, type MockStoredContent, type MockTextRegion, type MockUploadPreset, signUploadTokenWithApiKey as signUploadToken };
509
+ export { type MockAssetOutcome, type MockCalmLensAppClientOptions, type MockCalmLensCall, type MockCalmLensOperation, type MockCalmLensServerClientOptions, type MockDatabaseStorage, type MockDetectedFace, type MockDetectedLink, type MockDetectedPerson, type MockEventInput, type MockFailureOptions, type MockImageStorage, type MockModerate, type MockModerationInput, type MockModerationTrigger, type MockQrCode, type MockRegionalDecision, type MockRequestFailure, type MockReviewDecision, type MockServedUrl, type MockStoredContent, type MockTextRegion, type MockUploadPreset, signUploadTokenWithApiKey as signUploadToken };
package/esm/testing.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { C as invalidConfig, S as invalidArgument, T as API_ERROR_DEFINITIONS, l as CalmLensError, w as API_ERROR_CODES, x as SDK_ERROR_CODES } from "./CalmLensError-C15tWu8W.js";
2
- import { F as sleep, M as getRejectedUploadMimeTypeError, N as normalizeUploadMimeType, O as MAX_IMAGE_UPLOAD_BYTES, S as validateAppClientOptions, _ as randomUuid, f as checkTransformOptions, h as parseTransformSelector, m as isAcceptedUploadMimeType, t as ASSET_RESOURCE_PATHS, w as validateServerClientOptions } from "./CalmLensCdn-ZLaMr4XD.js";
3
- import { a as WEBHOOK_TIMESTAMP_HEADER, f as signUploadTokenWithApiKey, m as stringifyJsonCanonical, n as WEBHOOK_DELIVERY_HEADER, p as decodeUploadToken, r as WEBHOOK_SIGNATURE_HEADER, t as CalmLensServerClient } from "./CalmLensServerClient-CdQSdL6-.js";
4
- import { _ as validateAssetPayload, g as assetToData, h as assetDataToUint8Array, n as MOCK_HOOKS } from "./CalmLensConnection-Duv-JB6o.js";
2
+ import { F as sleep, M as getRejectedUploadMimeTypeError, N as normalizeUploadMimeType, O as MAX_IMAGE_UPLOAD_BYTES, S as validateAppClientOptions, _ as randomUuid, f as checkTransformOptions, h as parseTransformSelector, m as isAcceptedUploadMimeType, t as ASSET_RESOURCE_PATHS, w as validateServerClientOptions } from "./CalmLensCdn-xvzJyv9X.js";
3
+ import { a as WEBHOOK_TIMESTAMP_HEADER, f as signUploadTokenWithApiKey, m as stringifyJsonCanonical, n as WEBHOOK_DELIVERY_HEADER, p as decodeUploadToken, r as WEBHOOK_SIGNATURE_HEADER, t as CalmLensServerClient } from "./CalmLensServerClient-BGz_olSn.js";
4
+ import { _ as validateAssetPayload, g as assetToData, h as assetDataToUint8Array, n as MOCK_HOOKS } from "./CalmLensConnection-D6BVOMri.js";
5
5
  import { t as hmacSha256Hex } from "./CryptoUtils-BLCa-oZe-DKr3LmN6.js";
6
- import { t as CalmLensAppClient } from "./CalmLensAppClient-B8O3Ai6H.js";
7
- import { o as placeholderHashToDataURL, r as isFileAccepted } from "./UploadController-DLPXc9Ug.js";
8
- import { f as getTestInputTag, g as CLASSIFICATION_CATEGORIES, h as lazySchema, t as withValidTestInputArguments } from "./CalmLensTestInputArguments-CqPADTkl.js";
6
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-DEFSQC15.js";
7
+ import { o as placeholderHashToDataURL, r as isFileAccepted } from "./UploadController-CpLvD8W-.js";
8
+ import { _ as CLASSIFICATION_CATEGORIES, f as getTestInputTag, g as lazySchema, h as EU_COUNTRIES, t as withValidTestInputArguments } from "./CalmLensTestInputArguments-DS_3mt1C.js";
9
9
  import * as zod from "zod";
10
10
  // src/contract/MediaTestTriggers.js
11
11
  const MEDIA_TEST_SIGNALS = [...CLASSIFICATION_CATEGORIES, "violence.graphic"];
@@ -8129,7 +8129,19 @@ const fromBase64Url = (value) => {
8129
8129
  const padded = value.padEnd(value.length + (4 - value.length % 4) % 4, "=");
8130
8130
  return atob(padded.replaceAll("-", "+").replaceAll("_", "/"));
8131
8131
  };
8132
- const createMockApiKey = (grants = []) => `${MOCK_API_KEY_PREFIX}${toBase64Url(JSON.stringify(GRANTS_SCHEMA.parse(grants)))}`;
8132
+ /**
8133
+ * Creates a mock API key holding `grants`. Throws `sdk/invalid-argument`, naming the grant, for
8134
+ * one the API doesn't accept, such as an unknown action.
8135
+ */
8136
+ const createMockApiKey = (grants = []) => {
8137
+ const parsed = GRANTS_SCHEMA.safeParse(grants);
8138
+ if (!parsed.success) {
8139
+ const [issue] = parsed.error.issues;
8140
+ const path = (issue?.path ?? []).map((segment) => typeof segment === "number" ? segment : String(segment));
8141
+ throw invalidArgument(`Invalid grant at ${["grants", ...path].join(".")}: ${issue?.message ?? parsed.error.message}`, { path });
8142
+ }
8143
+ return `${MOCK_API_KEY_PREFIX}${toBase64Url(JSON.stringify(parsed.data))}`;
8144
+ };
8133
8145
  const getMockApiKeyGrants = (apiKey) => {
8134
8146
  if (!apiKey.startsWith("sk_test_")) return [];
8135
8147
  try {
@@ -8358,6 +8370,21 @@ const STATUS_ACTION = {
8358
8370
  blocked: "block",
8359
8371
  purged: "purge"
8360
8372
  };
8373
+ const REGIONS = [
8374
+ "DE",
8375
+ "AT",
8376
+ "FR",
8377
+ "GB",
8378
+ "EU",
8379
+ "AU",
8380
+ "BR"
8381
+ ];
8382
+ const REGIONAL_STATUSES = [
8383
+ "limited",
8384
+ "age-restricted",
8385
+ "blocked",
8386
+ "purged"
8387
+ ];
8361
8388
  /** The likelihood the API reports for a score (ClassificationCategories.ts, scoreToLikelihood). */
8362
8389
  const scoreToLikelihood = (score) => score >= .8 ? "very-likely" : score >= .6 ? "likely" : score >= .4 ? "possible" : score >= .2 ? "unlikely" : "very-unlikely";
8363
8390
  const isScore = (score) => typeof score === "number" && Number.isFinite(score) && score >= 0 && score <= 1;
@@ -8370,6 +8397,7 @@ const isScore = (score) => typeof score === "number" && Number.isFinite(score) &
8370
8397
  var MockDecision = class {
8371
8398
  #flags = /* @__PURE__ */ new Map();
8372
8399
  #notEvaluated = /* @__PURE__ */ new Set();
8400
+ #regions = [];
8373
8401
  #pendingReview;
8374
8402
  #ocr;
8375
8403
  #linkDetection;
@@ -8409,6 +8437,30 @@ var MockDecision = class {
8409
8437
  return this;
8410
8438
  }
8411
8439
  /**
8440
+ * Adds a stricter `status` for viewers under the jurisdiction `region` (`DE`, `AT`, `FR`, `GB`,
8441
+ * `EU`, `AU` or `BR`), set by the mandatory `rule`, optionally acting on `category`, as
8442
+ * `classification.moderation.regions` reports it. The mock CDN applies it for a viewer whose
8443
+ * `region` claim falls under that jurisdiction, while the project serves it.
8444
+ */
8445
+ region(region, status, rule, category) {
8446
+ if (this.status === "pending" || this.status === "failed") throw invalidArgument(`a ${this.status} decision has no regional outcomes`);
8447
+ if (!REGIONS.includes(region)) throw invalidArgument(`region must be one of ${REGIONS.join(", ")}`);
8448
+ if (!REGIONAL_STATUSES.includes(status)) throw invalidArgument(`a regional status must be one of ${REGIONAL_STATUSES.join(", ")}`);
8449
+ if (typeof rule !== "string" || !rule) throw invalidArgument("rule must be a non-empty string");
8450
+ if (category !== void 0) this.#checkCategory(category);
8451
+ this.#regions.push({
8452
+ region,
8453
+ status,
8454
+ rule,
8455
+ ...category !== void 0 && { category }
8456
+ });
8457
+ return this;
8458
+ }
8459
+ /** @internal The regional outcomes `region` added. */
8460
+ get regionalDecisions() {
8461
+ return structuredClone(this.#regions);
8462
+ }
8463
+ /**
8412
8464
  * Leaves the decision waiting for human review, as `classification.moderation.pendingReview`
8413
8465
  * reports: `sampled`, or `uncertain` with the `uncertainCategories` that made it so. The queue's
8414
8466
  * decision (`decide` on the mock) clears it; `assets.decide` doesn't, as with the API.
@@ -8531,7 +8583,7 @@ var MockDecision = class {
8531
8583
  source: "policy",
8532
8584
  rule: null,
8533
8585
  automatedStatus: status,
8534
- regions: [],
8586
+ regions: structuredClone(this.#regions),
8535
8587
  timeline: null,
8536
8588
  flaggedCategories: evaluated.filter(([, score]) => action(score) !== "allow").map(([category]) => category),
8537
8589
  raw: {
@@ -9366,6 +9418,14 @@ const checkMockUploadPreset = (preset) => {
9366
9418
  const unknown = Object.keys(preset).filter((key) => !MOCK_UPLOAD_PRESET_KEYS.includes(key));
9367
9419
  if (unknown.length) throw invalidArgument(`Unknown mockOptions.preset key${unknown.length > 1 ? "s" : ""}: ${unknown.join(", ")}`, { options: unknown });
9368
9420
  };
9421
+ /** How strict each status a regional outcome can set is, above an allowed asset's. */
9422
+ const REGIONAL_STATUS_RANK = {
9423
+ allowed: 0,
9424
+ limited: 1,
9425
+ "age-restricted": 2,
9426
+ blocked: 3,
9427
+ purged: 4
9428
+ };
9369
9429
  const MAX_PAGE_SIZE = 100;
9370
9430
  /** Hashes with a lower PDQ quality never match (HashList.ts, HASH_MATCH_MIN_QUALITY). */
9371
9431
  const HASH_MATCH_MIN_QUALITY = 50;
@@ -12174,7 +12234,9 @@ var MockCalmLensApi = class {
12174
12234
  } catch {
12175
12235
  return this.jsonResponse(400, { code: "viewer-claims/invalid" }, url);
12176
12236
  }
12177
- if (status === "age-restricted" && claims.ageConfirmed !== true) return this.jsonResponse(403, { code: "viewer/age-confirmation-required" }, url);
12237
+ const gate = this.viewerAvailability(asset, claims);
12238
+ if (gate.availability === "unavailable") return gate.code === "asset/not-available" ? notAvailable() : this.jsonResponse(403, { code: gate.code }, url);
12239
+ if (gate.availability === "age-restricted") return this.jsonResponse(403, { code: "viewer/age-confirmation-required" }, url);
12178
12240
  const isPrivate = asset.visibility !== "public";
12179
12241
  if (isPrivate && !grant && !canDownload()) return this.jsonResponse(403, {
12180
12242
  code: "auth/permission-denied",
@@ -12228,6 +12290,43 @@ var MockCalmLensApi = class {
12228
12290
  });
12229
12291
  }
12230
12292
  /**
12293
+ * Whether the viewer the claims describe may see an asset that no unconditional check refused,
12294
+ * as the CDN decides (AssetAvailability.ts, decideAssetAvailability): while the project blocks
12295
+ * unmoderated assets, one still queued or processing is unavailable. Then the strictest of the
12296
+ * decision's regional outcomes that is stricter than its own status applies, among the viewer's
12297
+ * country and, in an EU member state, the EU, while the project serves that jurisdiction:
12298
+ * blocked or purged is unavailable and age-restricted needs `ageConfirmed`. An asset with such an
12299
+ * outcome needs the viewer's region, which the CDN reads from the connection when the claims
12300
+ * leave it out; the mock has no connection, so it needs the claim.
12301
+ */
12302
+ viewerAvailability(asset, claims) {
12303
+ const settings = this.toProjectSettings().settings;
12304
+ const processing = asset.classification.status === "queued" || asset.classification.status === "processing";
12305
+ if (settings.blockUnmoderatedAssets && processing) return {
12306
+ availability: "unavailable",
12307
+ code: "asset/not-available"
12308
+ };
12309
+ const status = asset.classification.moderation.decision;
12310
+ const base = REGIONAL_STATUS_RANK[status] ?? 0;
12311
+ const optedOut = settings.optOutJurisdictions ?? [];
12312
+ const stricter = (asset.classification.moderation.regions ?? []).filter((entry) => !optedOut.includes(entry.region) && REGIONAL_STATUS_RANK[entry.status] > base);
12313
+ let delivered = status;
12314
+ if (stricter.length) {
12315
+ const region = claims.region;
12316
+ if (typeof region !== "string" || !region) return {
12317
+ availability: "unavailable",
12318
+ code: "viewer/region-required"
12319
+ };
12320
+ const applied = stricter.filter((entry) => entry.region === region || entry.region === "EU" && EU_COUNTRIES.has(region)).sort((a, b) => REGIONAL_STATUS_RANK[b.status] - REGIONAL_STATUS_RANK[a.status])[0];
12321
+ if (applied?.status === "blocked" || applied?.status === "purged") return {
12322
+ availability: "unavailable",
12323
+ code: "asset/not-available"
12324
+ };
12325
+ if (applied?.status === "age-restricted") delivered = "age-restricted";
12326
+ }
12327
+ return delivered === "age-restricted" && claims.ageConfirmed !== true ? { availability: "age-restricted" } : { availability: "available" };
12328
+ }
12329
+ /**
12231
12330
  * The display info at `/info`, like the CDN's (AssetInfo.ts): the allowlisted fields and whether
12232
12331
  * the viewer the claims describe can see the content, decided as the other resources decide it.
12233
12332
  * A private asset's needs a grant or an API key with `assets:download`.
@@ -12248,7 +12347,7 @@ var MockCalmLensApi = class {
12248
12347
  const status = asset.classification.moderation.decision;
12249
12348
  const restrictedInfo = isPrivate || status === "blocked" || status === "purged";
12250
12349
  if (restrictedInfo && !authorised) return this.jsonResponse(403, { code: "asset/not-available" }, url);
12251
- const availability = asset.content.safetyHold || asset.upload.status === "uploading" || status === "blocked" || status === "purged" || asset.classification.status === "failed" || asset.content.status === "removed" ? "unavailable" : status === "age-restricted" && claims.ageConfirmed !== true ? "age-restricted" : "available";
12350
+ const availability = asset.content.safetyHold || asset.upload.status === "uploading" || status === "blocked" || status === "purged" || asset.classification.status === "failed" || asset.content.status === "removed" ? "unavailable" : this.viewerAvailability(asset, claims).availability;
12252
12351
  const { content } = asset;
12253
12352
  const info = {
12254
12353
  id: asset.id,
@@ -12448,8 +12547,8 @@ var MockCalmLensServerClient = class extends CalmLensServerClient {
12448
12547
  api.useTimers = mockOptions.useTimers ?? false;
12449
12548
  let endpoints;
12450
12549
  super({
12451
- maxRetries: 0,
12452
12550
  ...clientOptions,
12551
+ maxRetries: clientOptions.maxRetries ?? 0,
12453
12552
  dangerouslyAllowBrowser: true,
12454
12553
  ...mockClientOptions(api, () => endpoints)
12455
12554
  });
@@ -12610,8 +12709,8 @@ var MockCalmLensAppClient = class extends CalmLensAppClient {
12610
12709
  uploads: /* @__PURE__ */ new Set()
12611
12710
  });
12612
12711
  super({
12613
- maxRetries: 0,
12614
12712
  ...clientOptions,
12713
+ maxRetries: clientOptions.maxRetries ?? 0,
12615
12714
  ...requestOptions
12616
12715
  });
12617
12716
  endpoints = {
@@ -1,5 +1,5 @@
1
- import "./CalmLensTypes-9kLIOd1C.js";
2
- import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-CFxvTass.js";
1
+ import "./CalmLensTypes-_f7QVRtO.js";
2
+ import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-4iFxKJnY.js";
3
3
  import "pdfjs-dist";
4
4
  /** A viewer mounted into an element, which it owns the children of. */
5
5
  interface AssetViewer<O extends ViewerOptions = ViewerOptions> {
@@ -1,5 +1,5 @@
1
- import { a as assetUrlOf, r as appendAssetLocation } from "./CalmLensCdn-ZLaMr4XD.js";
2
- import "./Core-73r7ehG9.js";
1
+ import { a as assetUrlOf, r as appendAssetLocation } from "./CalmLensCdn-xvzJyv9X.js";
2
+ import "./Core-Cj91IL4-.js";
3
3
  // src/ui/viewers/PdfLoader.ts
4
4
  let loading;
5
5
  /**
package/esm/ui.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-CFxvTass.js";
2
- import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BkOZ_jV_.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, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-4iFxKJnY.js";
2
+ import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BMQW3Hse.js";
3
3
  export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, type AssetDisplay, type AssetDisplayOptions, type AssetDocumentOptions, type AssetEventHandlers, type AssetImageOptions, type AssetImageSource, type AssetOptions, type AssetProps, AssetSession, type AssetSessionState, type AssetSpreadsheetOptions, type AssetVideoOptions, type AssetView, type AssetViewer, type AssetViewerKind, AssetViewerMount, AssetViewerName, AssetViewerOptionsByKind, CALMLENS_STYLES, CALMLENS_THEME, type CalmLensMessages, type CalmLensProvidedOptions, type CalmLensTheme, type CalmLensUpload, type CustomUploadContext, type CustomUploadResult, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, type DocumentViewerOptions, ICONS, ICON_ATTRIBUTES, INSTANT_LOAD_MS, type IconName, type MediaPlayback, MediaStreamPlayer, type MountedViewerKind, type PdfAssetOptions, type ProgressFetchOptions, type SpreadsheetCell, type SpreadsheetRow, type SpreadsheetSheet, type SpreadsheetViewerOptions, type TextViewerOptions, type UploadClient, UploadController, type UploadControllerOptions, type UploadFile, type UploadItem, type UploadItemView, type UploadSnapshot, type UploadStage, type UploaderDisplayOptions, type UploaderProps, type UploaderView, VIEWER_STYLES, type ViewerAsset, type ViewerMessages, type ViewerOptions, type ViewerState, type ViewerTextOptions, createDocumentViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isImageReady, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex, withProvidedOptions };
package/esm/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-Byxq-pmc.js";
2
- import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-73r7ehG9.js";
3
- import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-DLPXc9Ug.js";
1
+ import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-CGrWIVKa.js";
2
+ import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-Cj91IL4-.js";
3
+ import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-CpLvD8W-.js";
4
4
  export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, AssetSession, AssetViewerMount, CALMLENS_STYLES, CALMLENS_THEME, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, ICONS, ICON_ATTRIBUTES, INSTANT_LOAD_MS, MediaStreamPlayer, UploadController, VIEWER_STYLES, createDocumentViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isImageReady, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex, withProvidedOptions };
package/esm/vue.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-9kLIOd1C.js";
2
- import "./index-D-ZwYNRQ.js";
3
- import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-CFxvTass.js";
4
- import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BGxUQPHj.js";
5
- import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BkOZ_jV_.js";
1
+ import { O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-_f7QVRtO.js";
2
+ import "./index-IEA75nev.js";
3
+ import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-4iFxKJnY.js";
4
+ import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-CuG3tWSo.js";
5
+ import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BMQW3Hse.js";
6
6
  import { App, MaybeRefOrGetter, PropType, ShallowRef } from "vue";
7
7
  /** Shows a text asset's text, escaped, in a scrolling region. */
8
8
  export declare const CalmLensTextViewer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
package/esm/vue.js CHANGED
@@ -1,8 +1,8 @@
1
- import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-Byxq-pmc.js";
2
- import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-73r7ehG9.js";
3
- import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController$1, r as isFileAccepted, t as UploadController } from "./UploadController-DLPXc9Ug.js";
1
+ import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-CGrWIVKa.js";
2
+ import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-Cj91IL4-.js";
3
+ import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController$1, r as isFileAccepted, t as UploadController } from "./UploadController-CpLvD8W-.js";
4
4
  import { c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
5
- import { t as createUploadController } from "./BrowserUpload-AsxTQ4x8.js";
5
+ import { t as createUploadController } from "./BrowserUpload-Ch67b69G.js";
6
6
  import { computed, defineComponent, h, inject, onBeforeUnmount, onMounted, onScopeDispose, provide, ref, shallowRef, toValue, watch, watchEffect } from "vue";
7
7
  // src/viewers/Vue.ts
8
8
  const optional$1 = (type) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "calmlens",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "description": "Official CalmLens SDK for JavaScript and TypeScript: content moderation, asset storage and CDN delivery.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://calmlens.com/docs/sdk/javascript",