calmlens 0.22.0 → 0.23.1

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 (84) hide show
  1. package/bin/calmlens.js +44 -26
  2. package/cjs/{BrowserUpload-BWjZ9ntu.d.ts → BrowserUpload-B2kmc3Y_.d.ts} +2 -2
  3. package/cjs/{BrowserUpload-Bwlib4Zc.js → BrowserUpload-HQjhZrW-.js} +1 -1
  4. package/{esm/CalmLensAppClient-BaW3ddUR.d.ts → cjs/CalmLensAppClient-CMVh0y5w.d.ts} +1 -1
  5. package/cjs/{CalmLensAppClient-DUYMo9PZ.js → CalmLensAppClient-yNhGTyvi.js} +2 -2
  6. package/cjs/{CalmLensOptionKeys-YvgV995V.js → CalmLensOptionKeys-B4gAOSbY.js} +1 -1
  7. package/{esm/CalmLensServerClient-BKzn8zmp.d.ts → cjs/CalmLensServerClient-BFt1L_FZ.d.ts} +9 -9
  8. package/cjs/{CalmLensServerClient-3N-gdsxC.js → CalmLensServerClient-BGlhX1Ep.js} +27 -10
  9. package/cjs/{CalmLensTypes-BDKwThbO.d.ts → CalmLensTypes-SmOCgKI3.d.ts} +298 -69
  10. package/cjs/{Classification-Q5zGpR8l-CEWjnE39.d.ts → Classification-CxRedzgH-C9qlYW_J.d.ts} +35 -0
  11. package/{esm/Core-C33pkBmf.d.ts → cjs/Core-Dt_HUNvH.d.ts} +4 -3
  12. package/cjs/{Core-Cm5Z1oJ9.js → Core-zXLf8JKh.js} +3 -3
  13. package/cjs/{ModerationContextLimits-ud1xpZRK.js → ModerationContextLimits-C6Ts1Xhw.js} +4 -11
  14. package/cjs/{ReactUpload-DhF8mm51.d.ts → ReactUpload-Bd7Hea4w.d.ts} +1 -1
  15. package/cjs/{ReactUpload-DQ0BYISX.js → ReactUpload-SaTeZgdA.js} +1 -1
  16. package/{esm/TestTriggers-D0pYHbkr-D5T0VdSn.d.ts → cjs/TestTriggers-BJ4B-MXR-D1tGifPU.d.ts} +7 -5
  17. package/cjs/{TestTriggers-D29T_R0M-D6Bu-Mln.js → TestTriggers-CiFcTHX3-BmfH4J3f.js} +22 -9
  18. package/cjs/{UploadController-l8fZM2qT.js → UploadController-Bh2bqt8N.js} +2 -2
  19. package/{esm/WebhookPayload-Dt6DttS0.d.ts → cjs/WebhookPayload-C7KAk3iR.d.ts} +1 -1
  20. package/cjs/app.d.ts +6 -6
  21. package/cjs/app.js +2 -2
  22. package/cjs/elements.d.ts +4 -4
  23. package/cjs/elements.js +4 -4
  24. package/cjs/{index-Bde1wjiw.d.ts → index-BJf0y_Uk.d.ts} +3 -3
  25. package/cjs/index.d.ts +5 -5
  26. package/cjs/index.js +1 -1
  27. package/cjs/react-native.d.ts +2 -2
  28. package/cjs/react-native.js +4 -4
  29. package/cjs/react.d.ts +3 -3
  30. package/cjs/react.js +5 -5
  31. package/cjs/server.d.ts +6 -6
  32. package/cjs/server.js +2 -2
  33. package/cjs/test-inputs.d.ts +1 -1
  34. package/cjs/test-inputs.js +13 -13
  35. package/cjs/testing.d.ts +16 -7
  36. package/cjs/testing.js +98 -34
  37. package/cjs/{ui-BRA4HQ8r.js → ui-CbqSrVlT.js} +3 -3
  38. package/cjs/{ui-YQuvbidU.d.ts → ui-DNXPuzha.d.ts} +2 -2
  39. package/cjs/ui.d.ts +2 -2
  40. package/cjs/ui.js +3 -3
  41. package/cjs/vue.d.ts +5 -5
  42. package/cjs/vue.js +4 -4
  43. package/esm/{BrowserUpload-BWjZ9ntu.d.ts → BrowserUpload-B2kmc3Y_.d.ts} +2 -2
  44. package/esm/{BrowserUpload-GRZVB0G_.js → BrowserUpload-QwdUnq0H.js} +1 -1
  45. package/{cjs/CalmLensAppClient-BaW3ddUR.d.ts → esm/CalmLensAppClient-CMVh0y5w.d.ts} +1 -1
  46. package/esm/{CalmLensAppClient-B5QIJ6KS.js → CalmLensAppClient-Dih1prcq.js} +2 -2
  47. package/esm/{CalmLensOptionKeys-BG7Qrh8-.js → CalmLensOptionKeys-C6R-4Zvh.js} +1 -1
  48. package/{cjs/CalmLensServerClient-BKzn8zmp.d.ts → esm/CalmLensServerClient-BFt1L_FZ.d.ts} +9 -9
  49. package/esm/{CalmLensServerClient-bRUAebi-.js → CalmLensServerClient-CVF5_FfH.js} +27 -10
  50. package/esm/{CalmLensTypes-BDKwThbO.d.ts → CalmLensTypes-SmOCgKI3.d.ts} +298 -69
  51. package/esm/{Classification-Q5zGpR8l-CEWjnE39.d.ts → Classification-CxRedzgH-C9qlYW_J.d.ts} +35 -0
  52. package/{cjs/Core-C33pkBmf.d.ts → esm/Core-Dt_HUNvH.d.ts} +4 -3
  53. package/esm/{Core-BvQe4moS.js → Core-tfQsge01.js} +3 -3
  54. package/esm/{ModerationContextLimits-CrxSnVZ3.js → ModerationContextLimits-B8f4ukBB.js} +4 -11
  55. package/esm/{ReactUpload-DhF8mm51.d.ts → ReactUpload-Bd7Hea4w.d.ts} +1 -1
  56. package/esm/{ReactUpload-BMO8saxT.js → ReactUpload-DRW08-Kt.js} +1 -1
  57. package/{cjs/TestTriggers-D0pYHbkr-D5T0VdSn.d.ts → esm/TestTriggers-BJ4B-MXR-D1tGifPU.d.ts} +7 -5
  58. package/esm/{TestTriggers-D29T_R0M-Ztc74ucs.js → TestTriggers-CiFcTHX3-BK2-sgOC.js} +22 -9
  59. package/esm/{UploadController-DnJrWiE4.js → UploadController-DEwR1AxP.js} +2 -2
  60. package/{cjs/WebhookPayload-Dt6DttS0.d.ts → esm/WebhookPayload-C7KAk3iR.d.ts} +1 -1
  61. package/esm/app.d.ts +6 -6
  62. package/esm/app.js +2 -2
  63. package/esm/elements.d.ts +4 -4
  64. package/esm/elements.js +4 -4
  65. package/esm/{index-Bde1wjiw.d.ts → index-BJf0y_Uk.d.ts} +3 -3
  66. package/esm/index.d.ts +5 -5
  67. package/esm/index.js +1 -1
  68. package/esm/react-native.d.ts +2 -2
  69. package/esm/react-native.js +4 -4
  70. package/esm/react.d.ts +3 -3
  71. package/esm/react.js +5 -5
  72. package/esm/server.d.ts +6 -6
  73. package/esm/server.js +2 -2
  74. package/esm/test-inputs.d.ts +1 -1
  75. package/esm/test-inputs.js +1 -1
  76. package/esm/testing.d.ts +16 -7
  77. package/esm/testing.js +92 -28
  78. package/esm/{ui-YQuvbidU.d.ts → ui-DNXPuzha.d.ts} +2 -2
  79. package/esm/{ui-heryDd6g.js → ui-ndvNkmb_.js} +3 -3
  80. package/esm/ui.d.ts +2 -2
  81. package/esm/ui.js +3 -3
  82. package/esm/vue.d.ts +5 -5
  83. package/esm/vue.js +4 -4
  84. package/package.json +1 -1
package/esm/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-Q5zGpR8l-CEWjnE39.js";
2
- import { $ as GetAssetInfoOptions, $n as FileMetadata, $t as UpgradePolicyOptions, A as CdnAssetReference, An as BoundingBox, At as MultipartUploadOptions, B as CreateMultipartUploadPartOptions, Bn as AssetSearchMatchField, Bt as SetPolicyAutomaticUpdatesOptions, C as AssetVisibility, Ct as ListHashListEntriesOptions, D as CalmLensAppClientOptions, Dn as PublicProjectSettings, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Fn as ProcessingFeatureStage, Ft as RequestOptions, G as EnsureLensOptions, Gn as AssetHlsRendition, Gt as StreamingFeatureOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, I as ConnectionOptions, In as ProcessingFeatures, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jn as AssetRendered, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kn as AssetHlsStatus, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, M as CdnResource, Mn as DetectedPerson, Mt as PolicyIdOptions, N as CdnServeOptions, Nn as ProcessingFeatureId, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, P as CdnTransform, Pn as ProcessingFeatureResults, Pt as RemoveAssetContentOptions, Q as FolderPage, Qn as ExtractedText, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rn as CursorPage, Rt as RetryAssetOptions, S as AssetUploadStatus, Sn as EventType, St as ListFoldersOptions, T as BatchAssetsOptions, Tn as MetadataFieldsResource, Tt as ListLensesOptions, U as DeleteAssetOptions, Un as AssetInfo, Ut as SignedAssetUrl, V as CreatePolicyOptions, Vn as AssetSearchQuery, Vt as SignAssetUrlOptions, W as DeleteMetadataFieldOptions, Wn as AssetHls, Wt as SignedUploadToken, X as ExplainAssetOptions, Xn as AssetSafetyHold, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yn as AssetRenderedKind, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zn as AssetSafetyHoldReason, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _n as EventCategory, _t as LensPage, a as AssetChildrenPage, an as UploadedAsset, at as ImageTransformOptions, b as AssetType, bn as EventFacts, bt as ListAssetsOptions, c as AssetClassificationStatus, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, d as AssetContentRemovalReason, dn as AssetBatchOperation, dt as IterateHashListsOptions, en as UploadAssetPartOptions, er as MetadataItem, et as HashListEntryIdOptions, f as AssetContentStatus, fn as AssetTimelineSegment, ft as IterateLensesOptions, g as AssetPage, gn as TypedEvent, gt as LensIdOptions, h as AssetModerationStatus, hn as EventAsset, ht as Lens, i as AssetChecksums, in as UploadPresetSubmitAssetOptions, it as IdempotencyOptions, j as CdnAssetUrlOptions, jn as DetectedFace, jt as MultipartUploadPartOptions, k as CdnAssetLocation, kn as AgeRange, kt as MoveFolderOptions, l as AssetContent, ln as WebhookHeadersInput, lt as IterateFoldersOptions, m as AssetModerationDecision, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, o as AssetClassification, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, p as AssetModeration, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qn as AssetPreview, qt as UpdateAssetOptions, r as AssetAvailability, rn as UploadPresetPage, rt as HashListPage, s as AssetClassificationFailureReason, sn as ViewerClaims, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tn as UploadPresetDefinition, tr as ProcessingOptions, tt as HashListEntryPage, u as AssetContentOptions, un as WebhookPayloadInput, ut as IterateHashListEntriesOptions, v as AssetSearchResult, vn as EventFact, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, x as AssetUpload, xn as EventSeverity, xt as ListEventsOptions, y as AssetTimelinePage, yn as EventFactValues, yt as ListAssetTimelineOptions, z as CreateLensOptions, zn as LensType, zt as SearchAssetsOptions } from "./CalmLensTypes-BDKwThbO.js";
3
- import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-Bde1wjiw.js";
4
- import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-Dt6DttS0.js";
5
- export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetHlsStatus, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, type IterateUploadPresetsOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPoliciesOptions, type ListUploadPresetsOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
1
+ import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-CxRedzgH-C9qlYW_J.js";
2
+ import { $ as GetAssetInfoOptions, $n as MetadataItem, $t as UpgradePolicyOptions, A as CdnAssetReference, An as BoundingBox, At as MultipartUploadOptions, B as CreateMultipartUploadPartOptions, Bn as AssetSearchMatchField, Bt as SetPolicyAutomaticUpdatesOptions, C as AssetVisibility, Ct as ListHashListEntriesOptions, D as CalmLensAppClientOptions, Dn as PublicProjectSettings, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Fn as ProcessingFeatureStage, Ft as RequestOptions, G as EnsureLensOptions, Gn as AssetHlsRendition, Gt as StreamingFeatureOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, I as ConnectionOptions, In as ProcessingFeatures, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jn as AssetRenderedKind, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kn as AssetPreview, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, M as CdnResource, Mn as DetectedPerson, Mt as PolicyIdOptions, N as CdnServeOptions, Nn as ProcessingFeatureId, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, P as CdnTransform, Pn as ProcessingFeatureResults, Pt as RemoveAssetContentOptions, Q as FolderPage, Qn as FileMetadata, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rn as CursorPage, Rt as RetryAssetOptions, S as AssetUploadStatus, Sn as EventType, St as ListFoldersOptions, T as BatchAssetsOptions, Tn as MetadataFieldsResource, Tt as ListLensesOptions, U as DeleteAssetOptions, Un as AssetInfo, Ut as SignedAssetUrl, V as CreatePolicyOptions, Vn as AssetSearchQuery, Vt as SignAssetUrlOptions, W as DeleteMetadataFieldOptions, Wn as AssetHls, Wt as SignedUploadToken, X as ExplainAssetOptions, Xn as AssetSafetyHoldReason, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yn as AssetSafetyHold, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zn as ExtractedText, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _n as EventCategory, _t as LensPage, a as AssetChildrenPage, an as UploadedAsset, at as ImageTransformOptions, b as AssetType, bn as EventFacts, bt as ListAssetsOptions, c as AssetClassificationStatus, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, d as AssetContentRemovalReason, dn as AssetBatchOperation, dt as IterateHashListsOptions, en as UploadAssetPartOptions, er as ProcessingOptions, et as HashListEntryIdOptions, f as AssetContentStatus, fn as AssetTimelineSegment, ft as IterateLensesOptions, g as AssetPage, gn as TypedEvent, gt as LensIdOptions, h as AssetModerationStatus, hn as EventAsset, ht as Lens, i as AssetChecksums, in as UploadPresetSubmitAssetOptions, it as IdempotencyOptions, j as CdnAssetUrlOptions, jn as DetectedFace, jt as MultipartUploadPartOptions, k as CdnAssetLocation, kn as AgeRange, kt as MoveFolderOptions, l as AssetContent, ln as WebhookHeadersInput, lt as IterateFoldersOptions, m as AssetModerationDecision, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, o as AssetClassification, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, p as AssetModeration, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qn as AssetRendered, qt as UpdateAssetOptions, r as AssetAvailability, rn as UploadPresetPage, rt as HashListPage, s as AssetClassificationFailureReason, sn as ViewerClaims, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tn as UploadPresetDefinition, tt as HashListEntryPage, u as AssetContentOptions, un as WebhookPayloadInput, ut as IterateHashListEntriesOptions, v as AssetSearchResult, vn as EventFact, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, x as AssetUpload, xn as EventSeverity, xt as ListEventsOptions, y as AssetTimelinePage, yn as EventFactValues, yt as ListAssetTimelineOptions, z as CreateLensOptions, zn as LensType, zt as SearchAssetsOptions } from "./CalmLensTypes-SmOCgKI3.js";
3
+ import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-BJf0y_Uk.js";
4
+ import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-C7KAk3iR.js";
5
+ export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, type IterateUploadPresetsOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPoliciesOptions, type ListUploadPresetsOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { L as CALMLENS_ERROR_CODES, i as CDN_RESOURCES, R as CalmLensError, u as DEFAULT_CDN_BASE_URL, t as MODERATION_CONTEXT_USED_CHARACTERS, n as MODERATION_CONTEXT_USED_ITEMS, P as SDK_VERSION, s as getAssetInfo, r as selectModerationContextItems } from "./ModerationContextLimits-CrxSnVZ3.js";
1
+ export { L as CALMLENS_ERROR_CODES, i as CDN_RESOURCES, R as CalmLensError, u as DEFAULT_CDN_BASE_URL, t as MODERATION_CONTEXT_USED_CHARACTERS, n as MODERATION_CONTEXT_USED_ITEMS, P as SDK_VERSION, s as getAssetInfo, r as selectModerationContextItems } from "./ModerationContextLimits-B8f4ukBB.js";
@@ -1,5 +1,5 @@
1
- import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadItem, G as AssetSession, H as AssetImageOptions, I as UploadSnapshot, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, N as UploadControllerOptions, O as CalmLensUpload, P as UploadFile, Q as getAssetView, R as createUploadController, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getPeakHeights, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, j as UploadClient, k as CustomUploadContext, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, p as AssetProps, q as AssetSpreadsheetOptions, r as resolveTheme, s as ICONS, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-C33pkBmf.js";
2
- import { n as useCalmLensUpload, t as UseCalmLensUploadResult } from "./ReactUpload-DhF8mm51.js";
1
+ import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadItem, G as AssetSession, H as AssetImageOptions, I as UploadSnapshot, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, N as UploadControllerOptions, O as CalmLensUpload, P as UploadFile, Q as getAssetView, R as createUploadController, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getPeakHeights, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, j as UploadClient, k as CustomUploadContext, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, p as AssetProps, q as AssetSpreadsheetOptions, r as resolveTheme, s as ICONS, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-Dt_HUNvH.js";
2
+ import { n as useCalmLensUpload, t as UseCalmLensUploadResult } from "./ReactUpload-Bd7Hea4w.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 appendAssetLocation } from "./ModerationContextLimits-CrxSnVZ3.js";
2
- import { i as createProgressFetch, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-DnJrWiE4.js";
3
- import { C as CALMLENS_THEME, _ as getAssetView, a as describeUploadItem, b as getPlayedPercent, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as getAssetAspectRatio, 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 getAssetViewKey, w as resolveTheme, x as pickAssetSource, y as getPeakHeights } from "./Core-BvQe4moS.js";
1
+ import { a as appendAssetLocation } from "./ModerationContextLimits-B8f4ukBB.js";
2
+ import { i as createProgressFetch, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-DEwR1AxP.js";
3
+ import { C as CALMLENS_THEME, _ as getAssetView, a as describeUploadItem, b as getPlayedPercent, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as getAssetAspectRatio, 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 getAssetViewKey, w as resolveTheme, x as pickAssetSource, y as getPeakHeights } from "./Core-tfQsge01.js";
4
4
  import { a as getFileIcon, o as getFileIconLabel, t as FILE_ICON_COLORS } from "./FileIcons-M6dzjFxd.js";
5
- import { n as useOwnController, r as useUploadSnapshot, t as useCalmLensUpload } from "./ReactUpload-BMO8saxT.js";
5
+ import { n as useOwnController, r as useUploadSnapshot, t as useCalmLensUpload } from "./ReactUpload-DRW08-Kt.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,6 +1,6 @@
1
- import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, G as AssetSession, H as AssetImageOptions, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, P as UploadFile, Q as getAssetView, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-C33pkBmf.js";
2
- import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BWjZ9ntu.js";
3
- import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as createDocumentViewer, y as createImageViewer } from "./ui-YQuvbidU.js";
1
+ import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, G as AssetSession, H as AssetImageOptions, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, P as UploadFile, Q as getAssetView, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-Dt_HUNvH.js";
2
+ import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-B2kmc3Y_.js";
3
+ import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as createDocumentViewer, y as createImageViewer } from "./ui-DNXPuzha.js";
4
4
  import { CSSProperties, HTMLAttributes, ReactNode } from "react";
5
5
  type ElementProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
6
6
  /** Leaves out the stylesheet the viewers render, so you can style the `calmlens-*` classes. */
package/esm/react.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { _ as loadPdfJs, a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createImageViewer, f as createWebsiteViewer, g as resolveViewerMessages, h as formatViewerMessage, i as isMountedViewerKind, l as parseSpreadsheetText, m as DEFAULT_VIEWER_MESSAGES, n as AssetViewerMount, o as createSpreadsheetViewer, p as createDocumentViewer, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-heryDd6g.js";
3
- import { i as createProgressFetch, r as isFileAccepted, t as UploadController } from "./UploadController-DnJrWiE4.js";
4
- import { C as CALMLENS_THEME, E as isSpreadsheetFormat, S as VIEWER_STYLES, T as getAssetViewerKind, _ as getAssetView, a as describeUploadItem, b as getPlayedPercent, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as getAssetAspectRatio, 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 getAssetViewKey, w as resolveTheme, x as pickAssetSource, y as getPeakHeights } from "./Core-BvQe4moS.js";
2
+ import { _ as loadPdfJs, a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createImageViewer, f as createWebsiteViewer, g as resolveViewerMessages, h as formatViewerMessage, i as isMountedViewerKind, l as parseSpreadsheetText, m as DEFAULT_VIEWER_MESSAGES, n as AssetViewerMount, o as createSpreadsheetViewer, p as createDocumentViewer, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-ndvNkmb_.js";
3
+ import { i as createProgressFetch, r as isFileAccepted, t as UploadController } from "./UploadController-DEwR1AxP.js";
4
+ import { C as CALMLENS_THEME, E as isSpreadsheetFormat, S as VIEWER_STYLES, T as getAssetViewerKind, _ as getAssetView, a as describeUploadItem, b as getPlayedPercent, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as getAssetAspectRatio, 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 getAssetViewKey, w as resolveTheme, x as pickAssetSource, y as getPeakHeights } from "./Core-tfQsge01.js";
5
5
  import { c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
6
- import { n as useOwnController, r as useUploadSnapshot, t as useCalmLensUpload$1 } from "./ReactUpload-BMO8saxT.js";
7
- import { t as createUploadController } from "./BrowserUpload-GRZVB0G_.js";
6
+ import { n as useOwnController, r as useUploadSnapshot, t as useCalmLensUpload$1 } from "./ReactUpload-DRW08-Kt.js";
7
+ import { t as createUploadController } from "./BrowserUpload-QwdUnq0H.js";
8
8
  import { useEffect, 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
- import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-Q5zGpR8l-CEWjnE39.js";
2
- import { $ as GetAssetInfoOptions, $n as FileMetadata, $t as UpgradePolicyOptions, A as CdnAssetReference, An as BoundingBox, At as MultipartUploadOptions, B as CreateMultipartUploadPartOptions, Bn as AssetSearchMatchField, Bt as SetPolicyAutomaticUpdatesOptions, C as AssetVisibility, Ct as ListHashListEntriesOptions, D as CalmLensAppClientOptions, Dn as PublicProjectSettings, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Fn as ProcessingFeatureStage, Ft as RequestOptions, G as EnsureLensOptions, Gn as AssetHlsRendition, Gt as StreamingFeatureOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, I as ConnectionOptions, In as ProcessingFeatures, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jn as AssetRendered, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kn as AssetHlsStatus, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, M as CdnResource, Mn as DetectedPerson, Mt as PolicyIdOptions, N as CdnServeOptions, Nn as ProcessingFeatureId, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, P as CdnTransform, Pn as ProcessingFeatureResults, Pt as RemoveAssetContentOptions, Q as FolderPage, Qn as ExtractedText, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rn as CursorPage, Rt as RetryAssetOptions, S as AssetUploadStatus, Sn as EventType, St as ListFoldersOptions, T as BatchAssetsOptions, Tn as MetadataFieldsResource, Tt as ListLensesOptions, U as DeleteAssetOptions, Un as AssetInfo, Ut as SignedAssetUrl, V as CreatePolicyOptions, Vn as AssetSearchQuery, Vt as SignAssetUrlOptions, W as DeleteMetadataFieldOptions, Wn as AssetHls, Wt as SignedUploadToken, X as ExplainAssetOptions, Xn as AssetSafetyHold, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yn as AssetRenderedKind, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zn as AssetSafetyHoldReason, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _n as EventCategory, _t as LensPage, a as AssetChildrenPage, an as UploadedAsset, at as ImageTransformOptions, b as AssetType, bn as EventFacts, bt as ListAssetsOptions, c as AssetClassificationStatus, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, d as AssetContentRemovalReason, dn as AssetBatchOperation, dt as IterateHashListsOptions, en as UploadAssetPartOptions, er as MetadataItem, et as HashListEntryIdOptions, f as AssetContentStatus, fn as AssetTimelineSegment, ft as IterateLensesOptions, g as AssetPage, gn as TypedEvent, gt as LensIdOptions, h as AssetModerationStatus, hn as EventAsset, ht as Lens, i as AssetChecksums, in as UploadPresetSubmitAssetOptions, it as IdempotencyOptions, j as CdnAssetUrlOptions, jn as DetectedFace, jt as MultipartUploadPartOptions, k as CdnAssetLocation, kn as AgeRange, kt as MoveFolderOptions, l as AssetContent, ln as WebhookHeadersInput, lt as IterateFoldersOptions, m as AssetModerationDecision, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, o as AssetClassification, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, p as AssetModeration, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qn as AssetPreview, qt as UpdateAssetOptions, r as AssetAvailability, rn as UploadPresetPage, rt as HashListPage, s as AssetClassificationFailureReason, sn as ViewerClaims, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tn as UploadPresetDefinition, tr as ProcessingOptions, tt as HashListEntryPage, u as AssetContentOptions, un as WebhookPayloadInput, ut as IterateHashListEntriesOptions, v as AssetSearchResult, vn as EventFact, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, x as AssetUpload, xn as EventSeverity, xt as ListEventsOptions, y as AssetTimelinePage, yn as EventFactValues, yt as ListAssetTimelineOptions, z as CreateLensOptions, zn as LensType, zt as SearchAssetsOptions } from "./CalmLensTypes-BDKwThbO.js";
3
- import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-Bde1wjiw.js";
4
- import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-Dt6DttS0.js";
5
- import { t as CalmLensServerClient } from "./CalmLensServerClient-BKzn8zmp.js";
1
+ import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-CxRedzgH-C9qlYW_J.js";
2
+ import { $ as GetAssetInfoOptions, $n as MetadataItem, $t as UpgradePolicyOptions, A as CdnAssetReference, An as BoundingBox, At as MultipartUploadOptions, B as CreateMultipartUploadPartOptions, Bn as AssetSearchMatchField, Bt as SetPolicyAutomaticUpdatesOptions, C as AssetVisibility, Ct as ListHashListEntriesOptions, D as CalmLensAppClientOptions, Dn as PublicProjectSettings, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Fn as ProcessingFeatureStage, Ft as RequestOptions, G as EnsureLensOptions, Gn as AssetHlsRendition, Gt as StreamingFeatureOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, I as ConnectionOptions, In as ProcessingFeatures, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jn as AssetRenderedKind, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kn as AssetPreview, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, M as CdnResource, Mn as DetectedPerson, Mt as PolicyIdOptions, N as CdnServeOptions, Nn as ProcessingFeatureId, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, P as CdnTransform, Pn as ProcessingFeatureResults, Pt as RemoveAssetContentOptions, Q as FolderPage, Qn as FileMetadata, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rn as CursorPage, Rt as RetryAssetOptions, S as AssetUploadStatus, Sn as EventType, St as ListFoldersOptions, T as BatchAssetsOptions, Tn as MetadataFieldsResource, Tt as ListLensesOptions, U as DeleteAssetOptions, Un as AssetInfo, Ut as SignedAssetUrl, V as CreatePolicyOptions, Vn as AssetSearchQuery, Vt as SignAssetUrlOptions, W as DeleteMetadataFieldOptions, Wn as AssetHls, Wt as SignedUploadToken, X as ExplainAssetOptions, Xn as AssetSafetyHoldReason, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yn as AssetSafetyHold, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zn as ExtractedText, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _n as EventCategory, _t as LensPage, a as AssetChildrenPage, an as UploadedAsset, at as ImageTransformOptions, b as AssetType, bn as EventFacts, bt as ListAssetsOptions, c as AssetClassificationStatus, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, d as AssetContentRemovalReason, dn as AssetBatchOperation, dt as IterateHashListsOptions, en as UploadAssetPartOptions, er as ProcessingOptions, et as HashListEntryIdOptions, f as AssetContentStatus, fn as AssetTimelineSegment, ft as IterateLensesOptions, g as AssetPage, gn as TypedEvent, gt as LensIdOptions, h as AssetModerationStatus, hn as EventAsset, ht as Lens, i as AssetChecksums, in as UploadPresetSubmitAssetOptions, it as IdempotencyOptions, j as CdnAssetUrlOptions, jn as DetectedFace, jt as MultipartUploadPartOptions, k as CdnAssetLocation, kn as AgeRange, kt as MoveFolderOptions, l as AssetContent, ln as WebhookHeadersInput, lt as IterateFoldersOptions, m as AssetModerationDecision, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, o as AssetClassification, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, p as AssetModeration, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qn as AssetRendered, qt as UpdateAssetOptions, r as AssetAvailability, rn as UploadPresetPage, rt as HashListPage, s as AssetClassificationFailureReason, sn as ViewerClaims, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tn as UploadPresetDefinition, tt as HashListEntryPage, u as AssetContentOptions, un as WebhookPayloadInput, ut as IterateHashListEntriesOptions, v as AssetSearchResult, vn as EventFact, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, x as AssetUpload, xn as EventSeverity, xt as ListEventsOptions, y as AssetTimelinePage, yn as EventFactValues, yt as ListAssetTimelineOptions, z as CreateLensOptions, zn as LensType, zt as SearchAssetsOptions } from "./CalmLensTypes-SmOCgKI3.js";
3
+ import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-BJf0y_Uk.js";
4
+ import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-C7KAk3iR.js";
5
+ import { t as CalmLensServerClient } from "./CalmLensServerClient-BFt1L_FZ.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";
@@ -71,4 +71,4 @@ export declare const isTestWebhookEvent: (event: Pick<ReceivedWebhookEventPayloa
71
71
  * new. Store the event's `assetSequence` per `assetId` once you have applied it.
72
72
  */
73
73
  export declare const isNewerAssetEvent: (event: Pick<ReceivedWebhookEventPayload, "assetSequence">, lastSequence: number | null | undefined) => boolean;
74
- export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetHlsStatus, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, CalmLensServerClient, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, type IterateUploadPresetsOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPoliciesOptions, type ListUploadPresetsOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
74
+ export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, CalmLensServerClient, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, type IterateUploadPresetsOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPoliciesOptions, type ListUploadPresetsOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
package/esm/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { L as CALMLENS_ERROR_CODES, P as SDK_VERSION, R as CalmLensError, i as CDN_RESOURCES, n as MODERATION_CONTEXT_USED_ITEMS, r as selectModerationContextItems, s as getAssetInfo, t as MODERATION_CONTEXT_USED_CHARACTERS, u as DEFAULT_CDN_BASE_URL } from "./ModerationContextLimits-CrxSnVZ3.js";
1
+ import { L as CALMLENS_ERROR_CODES, P as SDK_VERSION, R as CalmLensError, i as CDN_RESOURCES, n as MODERATION_CONTEXT_USED_ITEMS, r as selectModerationContextItems, s as getAssetInfo, t as MODERATION_CONTEXT_USED_CHARACTERS, u as DEFAULT_CDN_BASE_URL } from "./ModerationContextLimits-B8f4ukBB.js";
2
2
  import "./index.js";
3
- import { a as WEBHOOK_TIMESTAMP_HEADER, c as isNewerAssetEvent, 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-bRUAebi-.js";
3
+ import { a as WEBHOOK_TIMESTAMP_HEADER, c as isNewerAssetEvent, 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-CVF5_FfH.js";
4
4
  export { CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensError, CalmLensServerClient, DEFAULT_CDN_BASE_URL, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, SDK_VERSION, WEBHOOK_DELIVERY_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_SIGNATURE_TOLERANCE_SECONDS, WEBHOOK_TIMESTAMP_HEADER, getAssetInfo, getEventFact, getEventFacts, isNewerAssetEvent, isTestWebhookEvent, parseWebhookEvent, selectModerationContextItems, verifyWebhookSignature };
@@ -1,2 +1,2 @@
1
- import { a as TEST_FACE_AGE_PRESETS, c as TestDetections, d as detectTestTrigger, f as generateTestTextCode, h as testInputForSignal, i as TEST_FACE_AGE_MAX, l as TestInput, m as paintTestImage, n as TEST_DETECTIONS_MAX, o as TEST_INPUT_KEY_PATTERN, p as getImageTestCategories, r as TEST_DETECTION_BOX_MAX, s as TEST_INPUT_PRESETS, t as ClassificationTestSignal, u as detectTestImage } from "./TestTriggers-D0pYHbkr-D5T0VdSn.js";
1
+ import { a as TEST_FACE_AGE_PRESETS, c as TestDetections, d as detectTestTrigger, f as generateTestTextCode, h as testInputForSignal, i as TEST_FACE_AGE_MAX, l as TestInput, m as paintTestImage, n as TEST_DETECTIONS_MAX, o as TEST_INPUT_KEY_PATTERN, p as getImageTestCategories, r as TEST_DETECTION_BOX_MAX, s as TEST_INPUT_PRESETS, t as ClassificationTestSignal, u as detectTestImage } from "./TestTriggers-BJ4B-MXR-D1tGifPU.js";
2
2
  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, generateTestTextCode, getImageTestCategories, paintTestImage, testInputForSignal };
@@ -1 +1 @@
1
- export { t as TEST_DETECTIONS_MAX, n as TEST_DETECTION_BOX_MAX, r as TEST_FACE_AGE_MAX, i as TEST_FACE_AGE_PRESETS, a as TEST_INPUT_KEY_PATTERN, o as TEST_INPUT_PRESETS, s as detectTestImage, c as detectTestTrigger, l as generateTestTextCode, u as getImageTestCategories, f as paintTestImage, p as testInputForSignal } from "./TestTriggers-D29T_R0M-Ztc74ucs.js";
1
+ export { t as TEST_DETECTIONS_MAX, n as TEST_DETECTION_BOX_MAX, r as TEST_FACE_AGE_MAX, i as TEST_FACE_AGE_PRESETS, a as TEST_INPUT_KEY_PATTERN, o as TEST_INPUT_PRESETS, s as detectTestImage, c as detectTestTrigger, l as generateTestTextCode, u as getImageTestCategories, f as paintTestImage, p as testInputForSignal } from "./TestTriggers-CiFcTHX3-BK2-sgOC.js";
package/esm/testing.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Cn as PermissionGrant, D as CalmLensAppClientOptions, Hn as AssetBinaryPayloadInput, Ht as SignUploadTokenOptions, O as CalmLensServerClientOptions, Wt as SignedUploadToken, gn as TypedEvent, n as Asset, p as AssetModeration, wn as Folder } from "./CalmLensTypes-BDKwThbO.js";
2
- import { t as CalmLensAppClient } from "./CalmLensAppClient-BaW3ddUR.js";
3
- import { l as ApiErrorCode, n as WebhookEventPayload } from "./WebhookPayload-Dt6DttS0.js";
4
- import { t as CalmLensServerClient } from "./CalmLensServerClient-BKzn8zmp.js";
5
- import { t as ClassificationTestSignal } from "./TestTriggers-D0pYHbkr-D5T0VdSn.js";
1
+ import { Cn as PermissionGrant, D as CalmLensAppClientOptions, Hn as AssetBinaryPayloadInput, Ht as SignUploadTokenOptions, O as CalmLensServerClientOptions, Wt as SignedUploadToken, gn as TypedEvent, n as Asset, p as AssetModeration, wn as Folder } from "./CalmLensTypes-SmOCgKI3.js";
2
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-CMVh0y5w.js";
3
+ import { l as ApiErrorCode, n as WebhookEventPayload } from "./WebhookPayload-C7KAk3iR.js";
4
+ import { t as CalmLensServerClient } from "./CalmLensServerClient-BFt1L_FZ.js";
5
+ import { t as ClassificationTestSignal } from "./TestTriggers-BJ4B-MXR-D1tGifPU.js";
6
6
  import "zod";
7
7
  /**
8
8
  * Signs a single-use upload token with `apiKey`, locally. `CalmLensServerClient` and
@@ -64,6 +64,8 @@ declare const MOCK_CATEGORIES: readonly ["sexual", "violence", "self-harm", "har
64
64
  */
65
65
  type MockAssetOutcome = "pending" | "failed" | "allowed" | "limited" | "age-restricted" | "blocked" | "purged";
66
66
  type Category = (typeof MOCK_CATEGORIES)[number];
67
+ /** Why a decision waits for human review: `sampled`, or `uncertain` about some categories. */
68
+ type MockPendingReviewReason = "sampled" | "uncertain";
67
69
  /**
68
70
  * A moderation decision for `mockOptions.moderate` or `completeProcessing`, built with
69
71
  * `mockDecision(status)`: flag the categories it found, with their scores and qualifiers, and
@@ -82,12 +84,19 @@ export declare class MockDecision {
82
84
  flag(category: Category, score: number, qualifiers?: Record<string, number>): this;
83
85
  /** Marks `category` as not assessed (`not-evaluated` for reason `not-supported`). */
84
86
  notEvaluated(category: Category): this;
87
+ /**
88
+ * Leaves the decision waiting for human review, as `classification.moderation.pendingReview`
89
+ * reports: `sampled`, or `uncertain` with the `uncertainCategories` that made it so. The queue's
90
+ * decision (`decide` on the mock) clears it; `assets.decide` doesn't, as with the API.
91
+ */
92
+ pendingReview(reason: MockPendingReviewReason, uncertainCategories?: Category[]): this;
85
93
  /**
86
94
  * The report a decided asset gets, as the API sends it: every category (unflagged ones
87
95
  * evaluated with score 0), policy-adjusted results and the automated status and
88
- * `flaggedCategories`. `undefined` for `pending` and `failed`.
96
+ * `flaggedCategories`. `requestedAt` is when a pending review joined the queue. `undefined` for
97
+ * `pending` and `failed`.
89
98
  */
90
- report(): Omit<AssetModeration, "status" | "manualReviews"> | undefined;
99
+ report(requestedAt?: number): Omit<AssetModeration, "status" | "manualReviews"> | undefined;
91
100
  }
92
101
  /** Starts a moderation decision with this status; see `MockDecision`. */
93
102
  export declare const mockDecision: (status: MockAssetOutcome) => MockDecision;
package/esm/testing.js CHANGED
@@ -1,10 +1,10 @@
1
- import { A as getRejectedUploadMimeTypeError, B as invalidArgument, H as API_ERROR_CODES, N as sleep, O as MAX_IMAGE_UPLOAD_BYTES, R as CalmLensError, S as validateAppClientOptions, T as validateServerClientOptions, U as API_ERROR_DEFINITIONS, V as invalidConfig, _ as randomUuid, f as checkTransformOptions, h as parseTransformSelector, j as normalizeUploadMimeType, m as isAcceptedUploadMimeType, r as selectModerationContextItems, z as SDK_ERROR_CODES } from "./ModerationContextLimits-CrxSnVZ3.js";
2
- 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-bRUAebi-.js";
3
- import { a as MOCK_HOOKS, g as validateAssetPayload, h as assetToData, m as assetDataToUint8Array } from "./CalmLensOptionKeys-BG7Qrh8-.js";
1
+ import { A as getRejectedUploadMimeTypeError, B as invalidArgument, H as API_ERROR_CODES, N as sleep, O as MAX_IMAGE_UPLOAD_BYTES, R as CalmLensError, S as validateAppClientOptions, T as validateServerClientOptions, U as API_ERROR_DEFINITIONS, V as invalidConfig, _ as randomUuid, f as checkTransformOptions, h as parseTransformSelector, j as normalizeUploadMimeType, m as isAcceptedUploadMimeType, r as selectModerationContextItems, z as SDK_ERROR_CODES } from "./ModerationContextLimits-B8f4ukBB.js";
2
+ 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-CVF5_FfH.js";
3
+ import { a as MOCK_HOOKS, g as validateAssetPayload, h as assetToData, m as assetDataToUint8Array } from "./CalmLensOptionKeys-C6R-4Zvh.js";
4
4
  import { t as hmacSha256Hex } from "./CryptoUtils-B_x8lMIx-DhuWGzqn.js";
5
- import { t as CalmLensAppClient } from "./CalmLensAppClient-B5QIJ6KS.js";
6
- import { a as placeholderHashToDataURL, r as isFileAccepted } from "./UploadController-DnJrWiE4.js";
7
- import { d as getTestInputTag, m as CLASSIFICATION_CATEGORIES } from "./TestTriggers-D29T_R0M-Ztc74ucs.js";
5
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-Dih1prcq.js";
6
+ import { a as placeholderHashToDataURL, r as isFileAccepted } from "./UploadController-DEwR1AxP.js";
7
+ import { d as getTestInputTag, m as CLASSIFICATION_CATEGORIES } from "./TestTriggers-CiFcTHX3-BK2-sgOC.js";
8
8
  import * as zod from "zod";
9
9
  // src/contract/MediaTestTriggers.js
10
10
  const MEDIA_TEST_SIGNALS = [...CLASSIFICATION_CATEGORIES, "violence.graphic"];
@@ -8126,6 +8126,7 @@ const MOCK_QUALIFIERS = {
8126
8126
  "sexual-educational",
8127
8127
  "sexual-discussion",
8128
8128
  "sexual-fictional",
8129
+ "sexual-artistic",
8129
8130
  "sexual-support-prevention"
8130
8131
  ],
8131
8132
  "violence": [
@@ -8286,6 +8287,7 @@ const isScore = (score) => typeof score === "number" && Number.isFinite(score) &
8286
8287
  var MockDecision = class {
8287
8288
  #flags = /* @__PURE__ */ new Map();
8288
8289
  #notEvaluated = /* @__PURE__ */ new Set();
8290
+ #pendingReview;
8289
8291
  constructor(status) {
8290
8292
  if (!OUTCOMES.includes(status)) throw invalidArgument(`status must be one of ${OUTCOMES.join(", ")}`);
8291
8293
  this.status = status;
@@ -8319,15 +8321,32 @@ var MockDecision = class {
8319
8321
  this.#notEvaluated.add(category);
8320
8322
  return this;
8321
8323
  }
8324
+ /**
8325
+ * Leaves the decision waiting for human review, as `classification.moderation.pendingReview`
8326
+ * reports: `sampled`, or `uncertain` with the `uncertainCategories` that made it so. The queue's
8327
+ * decision (`decide` on the mock) clears it; `assets.decide` doesn't, as with the API.
8328
+ */
8329
+ pendingReview(reason, uncertainCategories = []) {
8330
+ if (this.status === "pending" || this.status === "failed") throw invalidArgument(`a ${this.status} decision can't wait for review`);
8331
+ if (reason !== "sampled" && reason !== "uncertain") throw invalidArgument("reason must be sampled or uncertain");
8332
+ if (reason === "sampled" && uncertainCategories.length) throw invalidArgument("a sampled review has no uncertain categories");
8333
+ for (const category of uncertainCategories) this.#checkCategory(category);
8334
+ this.#pendingReview = {
8335
+ reason,
8336
+ uncertainCategories: [...uncertainCategories]
8337
+ };
8338
+ return this;
8339
+ }
8322
8340
  #checkCategory(category) {
8323
8341
  if (!MOCK_CATEGORIES.includes(category)) throw invalidArgument(`${category} is not a CalmLens category`);
8324
8342
  }
8325
8343
  /**
8326
8344
  * The report a decided asset gets, as the API sends it: every category (unflagged ones
8327
8345
  * evaluated with score 0), policy-adjusted results and the automated status and
8328
- * `flaggedCategories`. `undefined` for `pending` and `failed`.
8346
+ * `flaggedCategories`. `requestedAt` is when a pending review joined the queue. `undefined` for
8347
+ * `pending` and `failed`.
8329
8348
  */
8330
- report() {
8349
+ report(requestedAt = 0) {
8331
8350
  const status = this.status;
8332
8351
  if (status === "pending" || status === "failed") return void 0;
8333
8352
  const action = (score) => status !== "allowed" && score >= .5 ? STATUS_ACTION[status] : "allow";
@@ -8353,11 +8372,20 @@ var MockDecision = class {
8353
8372
  return {
8354
8373
  categories: Object.fromEntries(evaluated.map(([category, score]) => [category, {
8355
8374
  score,
8356
- action: action(score)
8375
+ action: action(score),
8376
+ source: { kind: score >= .5 ? "default" : "below-threshold" },
8377
+ settings: {
8378
+ action: status === "allowed" ? "allow" : STATUS_ACTION[status],
8379
+ allowances: [],
8380
+ restrictions: []
8381
+ }
8357
8382
  }])),
8358
8383
  explanationComplete: true,
8359
8384
  policy: null,
8360
- pendingReview: null,
8385
+ pendingReview: this.#pendingReview ? {
8386
+ requestedAt,
8387
+ ...this.#pendingReview
8388
+ } : null,
8361
8389
  source: "policy",
8362
8390
  rule: null,
8363
8391
  automatedStatus: status,
@@ -9240,8 +9268,7 @@ const mockPlaceholderPng = (thumbhash) => Uint8Array.from(atob(placeholderHashTo
9240
9268
  const NO_RENDERING = {
9241
9269
  rendered: null,
9242
9270
  preview: null,
9243
- hls: null,
9244
- hlsStatus: null
9271
+ hls: null
9245
9272
  };
9246
9273
  /** The size of the waveform the API makes as an audio asset's preview. */
9247
9274
  const WAVEFORM_SIZE = {
@@ -9299,8 +9326,7 @@ const mockRendering = (asset, processed) => {
9299
9326
  ...unsized
9300
9327
  },
9301
9328
  preview: preview(unsized),
9302
- hls: null,
9303
- hlsStatus: null
9329
+ hls: null
9304
9330
  };
9305
9331
  case "website": return {
9306
9332
  rendered: {
@@ -9309,8 +9335,7 @@ const mockRendering = (asset, processed) => {
9309
9335
  ...unsized
9310
9336
  },
9311
9337
  preview: preview(unsized),
9312
- hls: null,
9313
- hlsStatus: null
9338
+ hls: null
9314
9339
  };
9315
9340
  case "multimedia-document":
9316
9341
  if (SPREADSHEET_MIME_TYPES.includes(mimeType)) return NO_RENDERING;
@@ -9321,8 +9346,7 @@ const mockRendering = (asset, processed) => {
9321
9346
  ...unsized
9322
9347
  },
9323
9348
  preview: processed ? preview(unsized) : null,
9324
- hls: null,
9325
- hlsStatus: null
9349
+ hls: null
9326
9350
  };
9327
9351
  case "video": return {
9328
9352
  rendered: {
@@ -9331,8 +9355,7 @@ const mockRendering = (asset, processed) => {
9331
9355
  ...unsized
9332
9356
  },
9333
9357
  preview: null,
9334
- hls: null,
9335
- hlsStatus: null
9358
+ hls: null
9336
9359
  };
9337
9360
  case "audio": return {
9338
9361
  rendered: {
@@ -9342,8 +9365,7 @@ const mockRendering = (asset, processed) => {
9342
9365
  ...processed && { peaks: [] }
9343
9366
  },
9344
9367
  preview: processed ? preview(WAVEFORM_SIZE) : null,
9345
- hls: null,
9346
- hlsStatus: null
9368
+ hls: null
9347
9369
  };
9348
9370
  default: return NO_RENDERING;
9349
9371
  }
@@ -9757,6 +9779,7 @@ var MockCalmLensApi = class {
9757
9779
  this.pendingReruns.delete(asset.id);
9758
9780
  const decided = await this.applyOutcome(asset, decision, "requested");
9759
9781
  const now = this.now();
9782
+ if (!review) decided.classification.moderation.pendingReview = null;
9760
9783
  decided.classification.moderation.manualReviews = [...decided.classification.moderation.manualReviews ?? [], {
9761
9784
  id: this.createId("rev"),
9762
9785
  decision,
@@ -10636,7 +10659,40 @@ var MockCalmLensApi = class {
10636
10659
  };
10637
10660
  }
10638
10661
  async createAsset(request) {
10639
- return this.storeAsset(this.uploadFields(request), request.query.get("wait") === "false");
10662
+ return this.storeAsset(this.applyUploadPreset(this.uploadFields(request)), request.query.get("wait") === "false");
10663
+ }
10664
+ /**
10665
+ * An API-key upload through a preset, as the API applies it: the preset gives the folder and
10666
+ * visibility, which the upload can't change, and the processing options unless the upload sets
10667
+ * its own, and refuses types and sizes it doesn't accept.
10668
+ */
10669
+ applyUploadPreset(fields) {
10670
+ if (!fields.uploadPresetId) return fields;
10671
+ const preset = [...this.configuredPresets.values()].find(({ id }) => id === fields.uploadPresetId);
10672
+ if (!preset) throw fail(API_ERROR_CODES.UPLOAD_PRESET_NOT_FOUND);
10673
+ if (!preset.enabled) throw fail(API_ERROR_CODES.UPLOAD_PRESET_DISABLED);
10674
+ if (preset.folderId && fields.folderId && fields.folderId !== preset.folderId) throw fail(API_ERROR_CODES.UPLOAD_PRESET_FIELD_NOT_ALLOWED, { details: { field: "folderId" } });
10675
+ if (fields.visibility && fields.visibility !== preset.visibility) throw fail(API_ERROR_CODES.UPLOAD_PRESET_FIELD_NOT_ALLOWED, { details: { field: "visibility" } });
10676
+ const contentType = fields.contentType;
10677
+ if (preset.allowedContentTypes?.length && contentType !== void 0 && !isFileAccepted({
10678
+ name: fields.name,
10679
+ type: contentType
10680
+ }, preset.allowedContentTypes.join(","))) throw fail(API_ERROR_CODES.UNSUPPORTED_UPLOAD_TYPE, { details: {
10681
+ source: "preset",
10682
+ contentType,
10683
+ allowedContentTypes: preset.allowedContentTypes
10684
+ } });
10685
+ const size = fields.part?.totalSizeInBytes ?? fields.bytes?.byteLength;
10686
+ if (preset.maxSizeInBytes && size !== void 0 && size > preset.maxSizeInBytes) throw fail(API_ERROR_CODES.UPLOAD_TOO_LARGE, { details: {
10687
+ limitBytes: preset.maxSizeInBytes,
10688
+ source: "preset"
10689
+ } });
10690
+ return {
10691
+ ...fields,
10692
+ folderId: preset.folderId ?? fields.folderId,
10693
+ visibility: preset.visibility,
10694
+ processingOptions: fields.processingOptions ?? preset.processingOptions
10695
+ };
10640
10696
  }
10641
10697
  async storeAsset(fields, queue) {
10642
10698
  if (!fields.name) throw fail(API_ERROR_CODES.INVALID_UPLOAD_PAYLOAD, { message: "Asset name is required" });
@@ -10870,7 +10926,7 @@ var MockCalmLensApi = class {
10870
10926
  * it, a decided image reports the person and face detection its upload turned on.
10871
10927
  */
10872
10928
  async decided(asset, decision) {
10873
- const next = await this.applyOutcome(asset, decision.status, "policy", decision.report());
10929
+ const next = await this.applyOutcome(asset, decision.status, "policy", decision.report(this.now()));
10874
10930
  const features = this.processingOptions.get(asset.id)?.features;
10875
10931
  if (next.classification.status !== "completed" || asset.type !== "image") return next;
10876
10932
  return {
@@ -11139,7 +11195,11 @@ var MockCalmLensApi = class {
11139
11195
  if (preset.allowedContentTypes && !isFileAccepted({
11140
11196
  name: fields.name,
11141
11197
  type: fields.contentType ?? ""
11142
- }, preset.allowedContentTypes.join(","))) throw fail(API_ERROR_CODES.UNSUPPORTED_UPLOAD_TYPE, { details: { source: "preset" } });
11198
+ }, preset.allowedContentTypes.join(","))) throw fail(API_ERROR_CODES.UNSUPPORTED_UPLOAD_TYPE, { details: {
11199
+ source: "preset",
11200
+ contentType: fields.contentType ?? "",
11201
+ allowedContentTypes: preset.allowedContentTypes
11202
+ } });
11143
11203
  const size = fields.part?.totalSizeInBytes ?? fields.bytes?.byteLength;
11144
11204
  if (preset.maxFileSizeInBytes !== void 0 && size !== void 0 && size > preset.maxFileSizeInBytes) throw fail(API_ERROR_CODES.UPLOAD_TOO_LARGE, { details: {
11145
11205
  limitBytes: preset.maxFileSizeInBytes,
@@ -11447,10 +11507,11 @@ var MockCalmLensApi = class {
11447
11507
  ensureLens(options) {
11448
11508
  const existing = this.lenses.get(options.identifier);
11449
11509
  if (!existing) return this.saveNewLens(options);
11450
- if (existing.name === options.name && (existing.description ?? null) === (options.description ?? null) && existing.type === options.type && existing.active === options.active && stringifyJsonCanonical(existing.transform ?? null) === stringifyJsonCanonical(options.transform ?? null)) return existing;
11510
+ if (existing.name === options.name && (existing.description ?? null) === (options.description ?? null) && existing.type === options.type && existing.active === (options.active ?? true) && stringifyJsonCanonical(existing.transform ?? null) === stringifyJsonCanonical(options.transform ?? null)) return existing;
11451
11511
  const lens = {
11452
11512
  ...existing,
11453
11513
  ...options,
11514
+ active: options.active ?? true,
11454
11515
  updatedAt: this.now()
11455
11516
  };
11456
11517
  this.lenses.set(lens.identifier, lens);
@@ -11462,6 +11523,7 @@ var MockCalmLensApi = class {
11462
11523
  id: this.createId("lens"),
11463
11524
  projectId: this.projectId,
11464
11525
  ...options,
11526
+ active: options.active ?? true,
11465
11527
  createdAt: now,
11466
11528
  updatedAt: now
11467
11529
  };
@@ -11568,12 +11630,14 @@ var MockCalmLensApi = class {
11568
11630
  code: "asset/not-available",
11569
11631
  message: "Asset is not available"
11570
11632
  }, url);
11571
- const grants = request.headers.get("x-api-key") === this.apiKey ? this.grants : [];
11633
+ const hasApiKey = request.headers.get("x-api-key") === this.apiKey;
11634
+ const grants = hasApiKey ? this.grants : [];
11572
11635
  const folders = await this.databaseStorage.listFolders?.(this.projectId) ?? [];
11573
11636
  const canDownload = () => permits(grants, "assets:download", asset.folderId ?? null, folders);
11574
11637
  const status = asset.classification.moderation.status;
11575
11638
  const isHead = request.method === "HEAD";
11576
11639
  const { rendered, preview } = asset.content;
11640
+ if (asset.visibility !== "public" && !grant && !hasApiKey && resource !== "placeholder" && resource !== "info") return notFound();
11577
11641
  if (resource === "info") return this.serveInfo(request, asset, Boolean(grant) || canDownload());
11578
11642
  if (asset.content.safetyHold) return notAvailable();
11579
11643
  if (resource === "placeholder") {
@@ -11607,7 +11671,7 @@ var MockCalmLensApi = class {
11607
11671
  "X-Content-Type-Options": "nosniff"
11608
11672
  });
11609
11673
  if (resource === "rendered" && !rendered || resource === "preview" && !preview) return noRenderedVersion();
11610
- if (isHls && !asset.content.hls) return noRenderedVersion();
11674
+ if (isHls && asset.content.hls?.status !== "ready") return noRenderedVersion();
11611
11675
  const stillImage = resource === "preview" || resource === "rendered" && rendered?.kind === "image";
11612
11676
  if (!stillImage && hasSelector) return invalidTransform();
11613
11677
  if (selector.options) {
@@ -1,5 +1,5 @@
1
- import "./CalmLensTypes-BDKwThbO.js";
2
- import { G as AssetSession, W as AssetOptions, Y as AssetView, at as ImageViewerOptions, ct as TextViewerOptions, ft as WebsiteViewerOptions, it as DocumentViewerOptions, ot as PdfAssetOptions, st as SpreadsheetViewerOptions, ut as ViewerOptions } from "./Core-C33pkBmf.js";
1
+ import "./CalmLensTypes-SmOCgKI3.js";
2
+ import { G as AssetSession, W as AssetOptions, Y as AssetView, at as ImageViewerOptions, ct as TextViewerOptions, ft as WebsiteViewerOptions, it as DocumentViewerOptions, ot as PdfAssetOptions, st as SpreadsheetViewerOptions, ut as ViewerOptions } from "./Core-Dt_HUNvH.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,6 +1,6 @@
1
- import { a as appendAssetLocation } from "./ModerationContextLimits-CrxSnVZ3.js";
2
- import { a as placeholderHashToDataURL } from "./UploadController-DnJrWiE4.js";
3
- import "./Core-BvQe4moS.js";
1
+ import { a as appendAssetLocation } from "./ModerationContextLimits-B8f4ukBB.js";
2
+ import { a as placeholderHashToDataURL } from "./UploadController-DEwR1AxP.js";
3
+ import "./Core-tfQsge01.js";
4
4
  // src/ui/viewers/PdfLoader.ts
5
5
  let loading;
6
6
  /**
package/esm/ui.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadItem, G as AssetSession, H as AssetImageOptions, I as UploadSnapshot, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, N as UploadControllerOptions, O as CalmLensUpload, P as UploadFile, Q as getAssetView, R as createUploadController, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, h as UploaderProps, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-C33pkBmf.js";
2
- import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as createDocumentViewer, y as createImageViewer } from "./ui-YQuvbidU.js";
1
+ import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadItem, G as AssetSession, H as AssetImageOptions, I as UploadSnapshot, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, N as UploadControllerOptions, O as CalmLensUpload, P as UploadFile, Q as getAssetView, R as createUploadController, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, h as UploaderProps, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-Dt_HUNvH.js";
2
+ import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as createDocumentViewer, y as createImageViewer } from "./ui-DNXPuzha.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 CalmLensTheme, type CalmLensUpload, type CustomUploadContext, type CustomUploadResult, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, type DocumentViewerOptions, ICONS, ICON_ATTRIBUTES, type IconName, type ImageViewerOptions, 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, type WebsiteViewerOptions, createDocumentViewer, createImageViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, createWebsiteViewer, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex };
package/esm/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as loadPdfJs, a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createImageViewer, f as createWebsiteViewer, g as resolveViewerMessages, h as formatViewerMessage, i as isMountedViewerKind, l as parseSpreadsheetText, m as DEFAULT_VIEWER_MESSAGES, n as AssetViewerMount, o as createSpreadsheetViewer, p as createDocumentViewer, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-heryDd6g.js";
2
- import { i as createProgressFetch, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-DnJrWiE4.js";
3
- import { C as CALMLENS_THEME, E as isSpreadsheetFormat, S as VIEWER_STYLES, T as getAssetViewerKind, _ as getAssetView, a as describeUploadItem, b as getPlayedPercent, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as getAssetAspectRatio, 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 getAssetViewKey, w as resolveTheme, x as pickAssetSource, y as getPeakHeights } from "./Core-BvQe4moS.js";
1
+ import { _ as loadPdfJs, a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createImageViewer, f as createWebsiteViewer, g as resolveViewerMessages, h as formatViewerMessage, i as isMountedViewerKind, l as parseSpreadsheetText, m as DEFAULT_VIEWER_MESSAGES, n as AssetViewerMount, o as createSpreadsheetViewer, p as createDocumentViewer, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-ndvNkmb_.js";
2
+ import { i as createProgressFetch, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-DEwR1AxP.js";
3
+ import { C as CALMLENS_THEME, E as isSpreadsheetFormat, S as VIEWER_STYLES, T as getAssetViewerKind, _ as getAssetView, a as describeUploadItem, b as getPlayedPercent, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as getAssetAspectRatio, 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 getAssetViewKey, w as resolveTheme, x as pickAssetSource, y as getPeakHeights } from "./Core-tfQsge01.js";
4
4
  export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, AssetSession, AssetViewerMount, CALMLENS_STYLES, CALMLENS_THEME, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, ICONS, ICON_ATTRIBUTES, MediaStreamPlayer, UploadController, VIEWER_STYLES, createDocumentViewer, createImageViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, createWebsiteViewer, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex };
package/esm/vue.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { D as CalmLensAppClientOptions, h as AssetModerationStatus, r as AssetAvailability, sn as ViewerClaims } from "./CalmLensTypes-BDKwThbO.js";
2
- import "./index-Bde1wjiw.js";
3
- import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, G as AssetSession, H as AssetImageOptions, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, P as UploadFile, Q as getAssetView, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-C33pkBmf.js";
4
- import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BWjZ9ntu.js";
5
- import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as createDocumentViewer, y as createImageViewer } from "./ui-YQuvbidU.js";
1
+ import { D as CalmLensAppClientOptions, h as AssetModerationStatus, r as AssetAvailability, sn as ViewerClaims } from "./CalmLensTypes-SmOCgKI3.js";
2
+ import "./index-BJf0y_Uk.js";
3
+ import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, G as AssetSession, H as AssetImageOptions, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, P as UploadFile, Q as getAssetView, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-Dt_HUNvH.js";
4
+ import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-B2kmc3Y_.js";
5
+ import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as createDocumentViewer, y as createImageViewer } from "./ui-DNXPuzha.js";
6
6
  import { MaybeRefOrGetter, PropType, ShallowRef } from "vue";
7
7
  /** Shows an image asset's rendered file, fitted to the element, over its placeholder. */
8
8
  export declare const CalmLensImageViewer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{