calmlens 0.37.1 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/calmlens.js +9 -3
- package/cjs/{BrowserUpload-84KQWr1Q.js → BrowserUpload-BO_ZukUM.js} +1 -1
- package/{esm/BrowserUpload-CuG3tWSo.d.ts → cjs/BrowserUpload-BuTS7yTy.d.ts} +2 -2
- package/cjs/{CalmLensAppClient-D4tRb_P2.js → CalmLensAppClient-DoNMg8Dh.js} +3 -3
- package/{esm/CalmLensAppClient-QqtovWE-.d.ts → cjs/CalmLensAppClient-L5x_sMOI.d.ts} +1 -1
- package/cjs/{CalmLensCdn-CdYY_XtK.js → CalmLensCdn-B_Tbwq10.js} +2 -2
- package/cjs/{CalmLensConnection-GkR2cKn5.js → CalmLensConnection-Dhg1amnb.js} +2 -2
- package/cjs/{CalmLensError-ifj5rLmk.js → CalmLensError-C9g7GXfU.js} +7 -2
- package/{esm/CalmLensServerClient-csSQqHBt.d.ts → cjs/CalmLensServerClient-2H0ZpJlr.d.ts} +5 -5
- package/cjs/{CalmLensServerClient-cgPOG4Sv.js → CalmLensServerClient-D0wCcQNn.js} +15 -6
- package/cjs/{CalmLensTypes-_f7QVRtO.d.ts → CalmLensTypes-CCsoVr39.d.ts} +4 -4
- package/{esm/Core-4iFxKJnY.d.ts → cjs/Core-B110Ug8_.d.ts} +2 -2
- package/cjs/{Core-BlnBBJKb.js → Core-iNgZ8Cij.js} +3 -3
- package/cjs/{ReactUpload-D3AYIZBh.js → ReactUpload-BS8bYIhv.js} +1 -1
- package/cjs/{ReactUpload-4qd2xACg.d.ts → ReactUpload-CbtQtN6v.d.ts} +1 -1
- package/cjs/{UploadController-BYuHuZ7K.js → UploadController-CVKtUCK0.js} +2 -2
- package/{esm/WebhookPayload-BJtggTLd.d.ts → cjs/WebhookPayload-_fvY2eu8.d.ts} +5 -3
- package/cjs/app.d.ts +4 -4
- package/cjs/app.js +3 -3
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +4 -4
- package/cjs/{index-IEA75nev.d.ts → index-Dk3I5YXf.d.ts} +2 -2
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +2 -2
- package/cjs/react-native.d.ts +2 -2
- package/cjs/react-native.js +4 -4
- package/cjs/react.d.ts +4 -4
- package/cjs/react.js +5 -5
- package/cjs/server.d.ts +4 -4
- package/cjs/server.js +3 -3
- package/cjs/{CalmLensTestInputArguments-C6S09FVQ.js → test-inputs-BVJZjtFd.js} +156 -16
- package/{esm/TestTriggers-CjDhhz78.d.ts → cjs/test-inputs-JaZaV9Up.d.ts} +20 -1
- package/cjs/test-inputs.d.ts +2 -18
- package/cjs/test-inputs.js +15 -126
- package/cjs/testing.d.ts +11 -14
- package/cjs/testing.js +35 -66
- package/cjs/{ui-BMQW3Hse.d.ts → ui--E_s-cDd.d.ts} +2 -2
- package/cjs/{ui-Cy8MWXOw.js → ui-CuO37F4u.js} +2 -2
- package/cjs/ui.d.ts +2 -2
- package/cjs/ui.js +3 -3
- package/cjs/vue.d.ts +5 -5
- package/cjs/vue.js +4 -4
- package/{cjs/BrowserUpload-CuG3tWSo.d.ts → esm/BrowserUpload-BuTS7yTy.d.ts} +2 -2
- package/esm/{BrowserUpload-C429CcUi.js → BrowserUpload-DxgiUXC2.js} +1 -1
- package/esm/{CalmLensAppClient-Brvc-GXt.js → CalmLensAppClient-C7ScAfRx.js} +3 -3
- package/{cjs/CalmLensAppClient-QqtovWE-.d.ts → esm/CalmLensAppClient-L5x_sMOI.d.ts} +1 -1
- package/esm/{CalmLensCdn-cmxtF_dw.js → CalmLensCdn-CW5Fn3ph.js} +2 -2
- package/esm/{CalmLensConnection-DEfpIugc.js → CalmLensConnection-Blv8JyLF.js} +2 -2
- package/esm/{CalmLensError-C15tWu8W.js → CalmLensError-DjkibkdI.js} +7 -2
- package/{cjs/CalmLensServerClient-csSQqHBt.d.ts → esm/CalmLensServerClient-2H0ZpJlr.d.ts} +5 -5
- package/esm/{CalmLensServerClient-BpsCXVeO.js → CalmLensServerClient-C7n6EzVd.js} +15 -6
- package/esm/{CalmLensTypes-_f7QVRtO.d.ts → CalmLensTypes-CCsoVr39.d.ts} +4 -4
- package/{cjs/Core-4iFxKJnY.d.ts → esm/Core-B110Ug8_.d.ts} +2 -2
- package/esm/{Core-C_f1o9RQ.js → Core-BRrPxS4i.js} +3 -3
- package/esm/{ReactUpload-Ch5qY7PS.js → ReactUpload-BGPktblV.js} +1 -1
- package/esm/{ReactUpload-4qd2xACg.d.ts → ReactUpload-CbtQtN6v.d.ts} +1 -1
- package/esm/{UploadController-9fkYFVZM.js → UploadController-CQ4NouIU.js} +2 -2
- package/{cjs/WebhookPayload-BJtggTLd.d.ts → esm/WebhookPayload-_fvY2eu8.d.ts} +5 -3
- package/esm/app.d.ts +4 -4
- package/esm/app.js +3 -3
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +4 -4
- package/esm/{index-IEA75nev.d.ts → index-Dk3I5YXf.d.ts} +2 -2
- package/esm/index.d.ts +3 -3
- package/esm/index.js +2 -2
- package/esm/react-native.d.ts +2 -2
- package/esm/react-native.js +4 -4
- package/esm/react.d.ts +4 -4
- package/esm/react.js +5 -5
- package/esm/server.d.ts +4 -4
- package/esm/server.js +3 -3
- package/esm/{CalmLensTestInputArguments-DS_3mt1C.js → test-inputs-DizPp8_w.js} +145 -5
- package/{cjs/TestTriggers-CjDhhz78.d.ts → esm/test-inputs-JaZaV9Up.d.ts} +20 -1
- package/esm/test-inputs.d.ts +2 -18
- package/esm/test-inputs.js +1 -115
- package/esm/testing.d.ts +11 -14
- package/esm/testing.js +24 -55
- package/esm/{ui-BMQW3Hse.d.ts → ui--E_s-cDd.d.ts} +2 -2
- package/esm/{ui-HK74e42L.js → ui-B-QOHuVI.js} +2 -2
- package/esm/ui.d.ts +2 -2
- package/esm/ui.js +3 -3
- package/esm/vue.d.ts +5 -5
- package/esm/vue.js +4 -4
- package/package.json +1 -1
package/esm/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, i as ClassificationNotEvaluatedReason, l as HashListEntry, n as ClassificationCategory, o as Likelihood, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
4
|
-
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-
|
|
5
|
-
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-
|
|
2
|
+
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-L5x_sMOI.js";
|
|
4
|
+
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-Dk3I5YXf.js";
|
|
5
|
+
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-_fvY2eu8.js";
|
|
6
6
|
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAppClient, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventResource, type EventResourceKind, type EventSeverity, type EventType, type EventsPage, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPage, type ListPoliciesOptions, type ListPromise, type ListUploadPresetsOptions, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type PolicySettings, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo };
|
package/esm/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-
|
|
2
|
-
import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-
|
|
1
|
+
import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-DjkibkdI.js";
|
|
2
|
+
import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-CW5Fn3ph.js";
|
|
3
3
|
import "./index.js";
|
|
4
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
4
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-C7ScAfRx.js";
|
|
5
5
|
export { AUTO_PAGING_TO_ARRAY_MAX, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAppClient, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, DEFAULT_CDN_BASE_URL, SDK_VERSION, getAssetInfo };
|
package/esm/elements.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-
|
|
3
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
4
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { i as AssetAvailability } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-B110Ug8_.js";
|
|
3
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BuTS7yTy.js";
|
|
4
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui--E_s-cDd.js";
|
|
5
5
|
declare const BaseElement$1: typeof HTMLElement;
|
|
6
6
|
/**
|
|
7
7
|
* An asset viewer element. Set the `src` attribute to the asset URL (public or signed) and the
|
package/esm/elements.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-
|
|
2
|
-
import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-
|
|
3
|
-
import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController$1, r as isFileAccepted, t as UploadController } from "./UploadController-
|
|
1
|
+
import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-B-QOHuVI.js";
|
|
2
|
+
import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-BRrPxS4i.js";
|
|
3
|
+
import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController$1, r as isFileAccepted, t as UploadController } from "./UploadController-CQ4NouIU.js";
|
|
4
4
|
import { c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
|
|
5
|
-
import { t as createUploadController } from "./BrowserUpload-
|
|
5
|
+
import { t as createUploadController } from "./BrowserUpload-DxgiUXC2.js";
|
|
6
6
|
// src/viewers/Elements.ts
|
|
7
7
|
const BaseElement$1 = typeof HTMLElement === "undefined" ? class {} : HTMLElement;
|
|
8
8
|
const PROPERTIES = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { Hn as AssetInfo, N as CdnResource, at as GetAssetInfoOptions } from "./CalmLensTypes-
|
|
3
|
-
import "./WebhookPayload-
|
|
2
|
+
import { Hn as AssetInfo, N as CdnResource, at as GetAssetInfoOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import "./WebhookPayload-_fvY2eu8.js";
|
|
4
4
|
/** Every CDN resource beneath an asset URL, as `getAssetUrl` and `signAssetUrl` accept them. */
|
|
5
5
|
declare const CDN_RESOURCES: CdnResource[];
|
|
6
6
|
/**
|
package/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, i as ClassificationNotEvaluatedReason, l as HashListEntry, n as ClassificationCategory, o as Likelihood, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-
|
|
4
|
-
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-
|
|
2
|
+
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-Dk3I5YXf.js";
|
|
4
|
+
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-_fvY2eu8.js";
|
|
5
5
|
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventResource, type EventResourceKind, type EventSeverity, type EventType, type EventsPage, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPage, type ListPoliciesOptions, type ListPromise, type ListUploadPresetsOptions, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type PolicySettings, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo };
|
package/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-
|
|
2
|
-
import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-
|
|
1
|
+
import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-DjkibkdI.js";
|
|
2
|
+
import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-CW5Fn3ph.js";
|
|
3
3
|
export { AUTO_PAGING_TO_ARRAY_MAX, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, DEFAULT_CDN_BASE_URL, SDK_VERSION, getAssetInfo };
|
package/esm/react-native.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getAssetAspectRatio, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./Core-
|
|
2
|
-
import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-
|
|
1
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getAssetAspectRatio, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./Core-B110Ug8_.js";
|
|
2
|
+
import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-CbtQtN6v.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { StyleProp, ViewStyle } from "react-native";
|
|
5
5
|
/** What the uploader asks your picker for. */
|
package/esm/react-native.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as assetUrlOf, r as appendAssetLocation } from "./CalmLensCdn-
|
|
2
|
-
import { C as pickAssetSource, E as resolveTheme, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, x as getPlayedPercent, y as getAssetViewKey } from "./Core-
|
|
3
|
-
import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-
|
|
1
|
+
import { a as assetUrlOf, r as appendAssetLocation } from "./CalmLensCdn-CW5Fn3ph.js";
|
|
2
|
+
import { C as pickAssetSource, E as resolveTheme, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, x as getPlayedPercent, y as getAssetViewKey } from "./Core-BRrPxS4i.js";
|
|
3
|
+
import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-CQ4NouIU.js";
|
|
4
4
|
import { a as getFileIcon, o as getFileIconLabel, t as FILE_ICON_COLORS } from "./FileIcons-M6dzjFxd.js";
|
|
5
|
-
import { i as useUploadSnapshot, n as useCalmLensUpload, r as useOwnController, t as CalmLensProvider } from "./ReactUpload-
|
|
5
|
+
import { i as useUploadSnapshot, n as useCalmLensUpload, r as useOwnController, t as CalmLensProvider } from "./ReactUpload-BGPktblV.js";
|
|
6
6
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Image, Linking, PixelRatio, Pressable, StyleSheet, Text, View } from "react-native";
|
package/esm/react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-
|
|
2
|
-
import { n as CalmLensProviderProps, t as CalmLensProvider } from "./ReactUpload-
|
|
3
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
4
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-B110Ug8_.js";
|
|
2
|
+
import { n as CalmLensProviderProps, t as CalmLensProvider } from "./ReactUpload-CbtQtN6v.js";
|
|
3
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BuTS7yTy.js";
|
|
4
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui--E_s-cDd.js";
|
|
5
5
|
import { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
|
6
6
|
type ElementProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
7
7
|
/** Leaves out the stylesheet the viewers render, so you can style the `calmlens-*` classes. */
|
package/esm/react.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-
|
|
3
|
-
import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, n as CALMLENS_STYLES_ID, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-
|
|
4
|
-
import { a as createProgressFetch, i as withProvidedOptions, r as isFileAccepted, t as UploadController } from "./UploadController-
|
|
2
|
+
import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-B-QOHuVI.js";
|
|
3
|
+
import { C as pickAssetSource, D as getAssetViewerKind, E as resolveTheme, O as isSpreadsheetFormat, S as isImageReady, T as CALMLENS_THEME, _ as getAssetAspectRatio, a as describeUploadItem, b as getPeakHeights, c as formatMessage, d as getUploadItemOutcome, f as resolveMessages, g as INSTANT_LOAD_MS, h as AssetSession, i as DEFAULT_MESSAGES, l as getDropzoneHint, m as ICON_ATTRIBUTES, n as CALMLENS_STYLES_ID, o as describeUploader, p as ICONS, r as ASSET_FILE_ICON_SIZE, s as formatBytes, t as CALMLENS_STYLES, u as getUploadItemMessage, v as getAssetView, w as VIEWER_STYLES, x as getPlayedPercent, y as getAssetViewKey } from "./Core-BRrPxS4i.js";
|
|
4
|
+
import { a as createProgressFetch, i as withProvidedOptions, r as isFileAccepted, t as UploadController } from "./UploadController-CQ4NouIU.js";
|
|
5
5
|
import { c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
|
|
6
|
-
import { i as useUploadSnapshot, n as useCalmLensUpload$1, r as useOwnController, t as CalmLensProvider } from "./ReactUpload-
|
|
7
|
-
import { t as createUploadController } from "./BrowserUpload-
|
|
6
|
+
import { i as useUploadSnapshot, n as useCalmLensUpload$1, r as useOwnController, t as CalmLensProvider } from "./ReactUpload-BGPktblV.js";
|
|
7
|
+
import { t as createUploadController } from "./BrowserUpload-DxgiUXC2.js";
|
|
8
8
|
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
const OPTION_NAMES = /* @__PURE__ */ new Set([
|
package/esm/server.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, i as ClassificationNotEvaluatedReason, l as HashListEntry, n as ClassificationCategory, o as Likelihood, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-
|
|
4
|
-
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-
|
|
5
|
-
import { t as CalmLensServerClient } from "./CalmLensServerClient-
|
|
2
|
+
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-Dk3I5YXf.js";
|
|
4
|
+
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-_fvY2eu8.js";
|
|
5
|
+
import { t as CalmLensServerClient } from "./CalmLensServerClient-2H0ZpJlr.js";
|
|
6
6
|
export declare const WEBHOOK_DELIVERY_HEADER = "x-calmlens-delivery";
|
|
7
7
|
export declare const WEBHOOK_TIMESTAMP_HEADER = "x-calmlens-timestamp";
|
|
8
8
|
export declare const WEBHOOK_SIGNATURE_HEADER = "x-calmlens-signature";
|
package/esm/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-
|
|
2
|
-
import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-
|
|
1
|
+
import { _ as CalmLensTimeoutError, a as CalmLensCancelledError, c as CalmLensConnectionError, d as CalmLensInvalidResponseError, f as CalmLensNotFoundError, g as CalmLensServerError, h as CalmLensRateLimitError, i as CalmLensBadRequestError, l as CalmLensError, m as CalmLensPermissionDeniedError, n as CalmLensApiError, o as CalmLensConfigurationError, p as CalmLensPayloadTooLargeError, r as CalmLensAuthenticationError, s as CalmLensConflictError, t as CALMLENS_ERROR_CODES, u as CalmLensInvalidArgumentError, v as CalmLensUnprocessableEntityError, y as CalmLensWebhookVerificationError } from "./CalmLensError-DjkibkdI.js";
|
|
2
|
+
import { I as SDK_VERSION, n as CDN_RESOURCES, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, z as AUTO_PAGING_TO_ARRAY_MAX } from "./CalmLensCdn-CW5Fn3ph.js";
|
|
3
3
|
import "./index.js";
|
|
4
|
-
import { a as WEBHOOK_TIMESTAMP_HEADER, c as isNewerEvent, d as verifyWebhookSignature, i as WEBHOOK_SIGNATURE_TOLERANCE_SECONDS, l as isTestWebhookEvent, n as WEBHOOK_DELIVERY_HEADER, o as getEventFact, r as WEBHOOK_SIGNATURE_HEADER, s as getEventFacts, t as CalmLensServerClient, u as parseWebhookEvent } from "./CalmLensServerClient-
|
|
4
|
+
import { a as WEBHOOK_TIMESTAMP_HEADER, c as isNewerEvent, d as verifyWebhookSignature, i as WEBHOOK_SIGNATURE_TOLERANCE_SECONDS, l as isTestWebhookEvent, n as WEBHOOK_DELIVERY_HEADER, o as getEventFact, r as WEBHOOK_SIGNATURE_HEADER, s as getEventFacts, t as CalmLensServerClient, u as parseWebhookEvent } from "./CalmLensServerClient-C7n6EzVd.js";
|
|
5
5
|
export { AUTO_PAGING_TO_ARRAY_MAX, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, CalmLensServerClient, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, DEFAULT_CDN_BASE_URL, SDK_VERSION, WEBHOOK_DELIVERY_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_SIGNATURE_TOLERANCE_SECONDS, WEBHOOK_TIMESTAMP_HEADER, getAssetInfo, getEventFact, getEventFacts, isNewerEvent, isTestWebhookEvent, parseWebhookEvent, verifyWebhookSignature };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as invalidArgument } from "./CalmLensError-
|
|
1
|
+
import { S as invalidArgument } from "./CalmLensError-DjkibkdI.js";
|
|
2
2
|
import { r as timingSafeEqual, t as hmacSha256Hex } from "./CryptoUtils-BLCa-oZe-DKr3LmN6.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { globalRegistry } from "zod";
|
|
@@ -1850,7 +1850,7 @@ const toBase64Url = (bytes) => btoa(String.fromCharCode(...bytes)).replaceAll("+
|
|
|
1850
1850
|
const fromBase64Url = (text) => Uint8Array.from(atob(text.replaceAll("-", "+").replaceAll("_", "/")), (char) => char.charCodeAt(0));
|
|
1851
1851
|
/** The signed bytes: the scenario's canonical JSON (ASCII). */
|
|
1852
1852
|
const envelope = (scenario) => new TextEncoder().encode(JSON.stringify(TEST_INPUT_SCHEMA.parse(scenario)));
|
|
1853
|
-
async function generateTestTextCode(scenario, key) {
|
|
1853
|
+
async function generateTestTextCode$1(scenario, key) {
|
|
1854
1854
|
if (!/^[a-f0-9]{32}$/.test(key)) throw new TypeError("Invalid test input key");
|
|
1855
1855
|
const payload = toBase64Url(envelope(typeof scenario === "string" ? testInputForSignal(scenario) : scenario));
|
|
1856
1856
|
if (payload.length > 8e3) throw new RangeError("Test scenario is too large");
|
|
@@ -1926,9 +1926,9 @@ const TEST_INPUT_CATEGORY_COLORS = {
|
|
|
1926
1926
|
* bytes, big-endian), the 16-byte tag, then the payload (the scenario JSON). The reader rebuilds
|
|
1927
1927
|
* the text code, so images and text share one verification.
|
|
1928
1928
|
*/
|
|
1929
|
-
async function paintTestImage(scenario, key) {
|
|
1929
|
+
async function paintTestImage$1(scenario, key) {
|
|
1930
1930
|
const input = TEST_INPUT_SCHEMA.parse(typeof scenario === "string" ? testInputForSignal(scenario, "image") : scenario);
|
|
1931
|
-
const [, signature, payload] = (await generateTestTextCode(input, key)).slice(0, -1).split(" ");
|
|
1931
|
+
const [, signature, payload] = (await generateTestTextCode$1(input, key)).slice(0, -1).split(" ");
|
|
1932
1932
|
const signed = fromBase64Url(payload);
|
|
1933
1933
|
const data = new Uint8Array(18 + signed.length);
|
|
1934
1934
|
data.set([signed.length >> 8, signed.length & 255]);
|
|
@@ -1978,4 +1978,144 @@ async function withValidTestInputArguments(key, generate) {
|
|
|
1978
1978
|
throw error;
|
|
1979
1979
|
}
|
|
1980
1980
|
}
|
|
1981
|
-
|
|
1981
|
+
// src/client/TestImagePng.ts
|
|
1982
|
+
/**
|
|
1983
|
+
* Encodes a painted test image as a PNG: 8-bit RGBA rows without filtering in stored deflate
|
|
1984
|
+
* blocks, as every SDK writes it, so the bytes match across SDKs. Runs anywhere, with no
|
|
1985
|
+
* compression library.
|
|
1986
|
+
*/
|
|
1987
|
+
function encodeTestImagePng(width, height, rgba) {
|
|
1988
|
+
const stride = width * 4;
|
|
1989
|
+
const raw = new Uint8Array((stride + 1) * height);
|
|
1990
|
+
for (let row = 0; row < height; row++) raw.set(rgba.subarray(row * stride, (row + 1) * stride), row * (stride + 1) + 1);
|
|
1991
|
+
const blocks = Math.max(1, Math.ceil(raw.length / 65535));
|
|
1992
|
+
const stream = new Uint8Array(2 + raw.length + blocks * 5 + 4);
|
|
1993
|
+
stream.set([120, 1]);
|
|
1994
|
+
let position = 2;
|
|
1995
|
+
for (let offset = 0; offset < raw.length || position === 2; offset += 65535) {
|
|
1996
|
+
const block = raw.subarray(offset, offset + 65535);
|
|
1997
|
+
const length = block.length;
|
|
1998
|
+
stream.set([
|
|
1999
|
+
offset + length >= raw.length ? 1 : 0,
|
|
2000
|
+
length & 255,
|
|
2001
|
+
length >> 8,
|
|
2002
|
+
~length & 255,
|
|
2003
|
+
~length >> 8 & 255
|
|
2004
|
+
], position);
|
|
2005
|
+
stream.set(block, position + 5);
|
|
2006
|
+
position += 5 + length;
|
|
2007
|
+
}
|
|
2008
|
+
writeUint32(stream, position, adler32(raw));
|
|
2009
|
+
const header = /* @__PURE__ */ new Uint8Array(13);
|
|
2010
|
+
writeUint32(header, 0, width);
|
|
2011
|
+
writeUint32(header, 4, height);
|
|
2012
|
+
header.set([
|
|
2013
|
+
8,
|
|
2014
|
+
6,
|
|
2015
|
+
0,
|
|
2016
|
+
0,
|
|
2017
|
+
0
|
|
2018
|
+
], 8);
|
|
2019
|
+
return concat([
|
|
2020
|
+
Uint8Array.of(137, 80, 78, 71, 13, 10, 26, 10),
|
|
2021
|
+
chunk("IHDR", header),
|
|
2022
|
+
chunk("IDAT", stream),
|
|
2023
|
+
chunk("IEND", /* @__PURE__ */ new Uint8Array(0))
|
|
2024
|
+
]);
|
|
2025
|
+
}
|
|
2026
|
+
function chunk(kind, body) {
|
|
2027
|
+
const typed = new Uint8Array(4 + body.length);
|
|
2028
|
+
for (let i = 0; i < 4; i++) typed[i] = kind.charCodeAt(i);
|
|
2029
|
+
typed.set(body, 4);
|
|
2030
|
+
const out = new Uint8Array(12 + body.length);
|
|
2031
|
+
writeUint32(out, 0, body.length);
|
|
2032
|
+
out.set(typed, 4);
|
|
2033
|
+
writeUint32(out, 8 + body.length, crc32(typed));
|
|
2034
|
+
return out;
|
|
2035
|
+
}
|
|
2036
|
+
function writeUint32(target, offset, value) {
|
|
2037
|
+
target[offset] = value >>> 24;
|
|
2038
|
+
target[offset + 1] = value >>> 16 & 255;
|
|
2039
|
+
target[offset + 2] = value >>> 8 & 255;
|
|
2040
|
+
target[offset + 3] = value & 255;
|
|
2041
|
+
}
|
|
2042
|
+
function concat(parts) {
|
|
2043
|
+
const out = new Uint8Array(parts.reduce((total, part) => total + part.length, 0));
|
|
2044
|
+
let offset = 0;
|
|
2045
|
+
for (const part of parts) {
|
|
2046
|
+
out.set(part, offset);
|
|
2047
|
+
offset += part.length;
|
|
2048
|
+
}
|
|
2049
|
+
return out;
|
|
2050
|
+
}
|
|
2051
|
+
let crcTable;
|
|
2052
|
+
function crc32(bytes) {
|
|
2053
|
+
if (!crcTable) {
|
|
2054
|
+
crcTable = /* @__PURE__ */ new Uint32Array(256);
|
|
2055
|
+
for (let n = 0; n < 256; n++) {
|
|
2056
|
+
let c = n;
|
|
2057
|
+
for (let k = 0; k < 8; k++) c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
|
2058
|
+
crcTable[n] = c >>> 0;
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
let crc = 4294967295;
|
|
2062
|
+
for (const byte of bytes) crc = crcTable[(crc ^ byte) & 255] ^ crc >>> 8;
|
|
2063
|
+
return (crc ^ 4294967295) >>> 0;
|
|
2064
|
+
}
|
|
2065
|
+
function adler32(bytes) {
|
|
2066
|
+
let a = 1;
|
|
2067
|
+
let b = 0;
|
|
2068
|
+
for (const byte of bytes) {
|
|
2069
|
+
a = (a + byte) % 65521;
|
|
2070
|
+
b = (b + a) % 65521;
|
|
2071
|
+
}
|
|
2072
|
+
return (b << 16 | a) >>> 0;
|
|
2073
|
+
}
|
|
2074
|
+
// src/contract/MediaTestTriggers.js
|
|
2075
|
+
const MEDIA_TEST_SIGNALS = [...CLASSIFICATION_CATEGORIES, "violence.graphic"];
|
|
2076
|
+
const HEX_WORDS = [
|
|
2077
|
+
"zero",
|
|
2078
|
+
"one",
|
|
2079
|
+
"two",
|
|
2080
|
+
"three",
|
|
2081
|
+
"four",
|
|
2082
|
+
"five",
|
|
2083
|
+
"six",
|
|
2084
|
+
"seven",
|
|
2085
|
+
"eight",
|
|
2086
|
+
"nine",
|
|
2087
|
+
"alpha",
|
|
2088
|
+
"bravo",
|
|
2089
|
+
"charlie",
|
|
2090
|
+
"delta",
|
|
2091
|
+
"echo",
|
|
2092
|
+
"foxtrot"
|
|
2093
|
+
];
|
|
2094
|
+
/** Read this aloud, or render it as large, high-contrast text in a video frame. */
|
|
2095
|
+
async function generateMediaTestCode$1(signal, testInputKey) {
|
|
2096
|
+
if (!MEDIA_TEST_SIGNALS.includes(signal)) throw new RangeError("Unsupported media test signal");
|
|
2097
|
+
return `Calm Lens test ${[...await getTestInputTag("media", signal, testInputKey)].map((character) => HEX_WORDS[Number.parseInt(character, 16)]).join(" ")} ${signal.replace(/[.-]/g, " ")} end test`;
|
|
2098
|
+
}
|
|
2099
|
+
// src/test-inputs.ts
|
|
2100
|
+
/**
|
|
2101
|
+
* Portable test inputs: presets and custom instances share one authenticated format. CalmLens
|
|
2102
|
+
* recognises a code only as the whole text and a test image only as the whole
|
|
2103
|
+
* upload, signed with the project's own key.
|
|
2104
|
+
*/
|
|
2105
|
+
/** A spoken media test phrase for `signal`, signed with the project's test input key. */
|
|
2106
|
+
const generateMediaTestCode = (signal, key) => withValidTestInputArguments(key, () => generateMediaTestCode$1(signal, key));
|
|
2107
|
+
/** A text code for `scenario`, signed with the project's test input key. */
|
|
2108
|
+
const generateTestTextCode = (scenario, key) => withValidTestInputArguments(key, () => generateTestTextCode$1(scenario, key));
|
|
2109
|
+
/**
|
|
2110
|
+
* The test image for `scenario`, signed with the project's test input key. Upload its `png` bytes
|
|
2111
|
+
* (or encode `rgba` in another format: the image survives lossy formats and resizing) as the whole
|
|
2112
|
+
* image, optionally on a plain single-colour border.
|
|
2113
|
+
*/
|
|
2114
|
+
const paintTestImage = async (scenario, key) => {
|
|
2115
|
+
const image = await withValidTestInputArguments(key, () => paintTestImage$1(scenario, key));
|
|
2116
|
+
return {
|
|
2117
|
+
...image,
|
|
2118
|
+
png: encodeTestImagePng(image.width, image.height, image.rgba)
|
|
2119
|
+
};
|
|
2120
|
+
};
|
|
2121
|
+
export { CLASSIFICATION_CATEGORIES as _, TEST_DETECTIONS_MAX as a, TEST_FACE_AGE_PRESETS as c, detectTestImage as d, detectTestTrigger as f, lazySchema as g, EU_COUNTRIES as h, MEDIA_TEST_SIGNALS as i, TEST_INPUT_KEY_PATTERN as l, testInputForSignal as m, generateTestTextCode as n, TEST_DETECTION_BOX_MAX as o, getImageTestCategories as p, paintTestImage as r, TEST_FACE_AGE_MAX as s, generateMediaTestCode as t, TEST_INPUT_PRESETS as u };
|
|
@@ -402,4 +402,23 @@ declare function detectTestImage(image: RgbaImage, key: string,
|
|
|
402
402
|
}[] | undefined;
|
|
403
403
|
} | undefined;
|
|
404
404
|
} | undefined>;
|
|
405
|
-
|
|
405
|
+
declare const MEDIA_TEST_SIGNALS: readonly ["sexual", "violence", "self-harm", "harassment", "hate", "criminal-activity", "personal-information", "profanity", "violence.graphic"];
|
|
406
|
+
/** A spoken media test phrase for `signal`, signed with the project's test input key. */
|
|
407
|
+
declare const generateMediaTestCode: (signal: ClassificationTestSignal, key: string) => Promise<string>;
|
|
408
|
+
/** A text code for `scenario`, signed with the project's test input key. */
|
|
409
|
+
declare const generateTestTextCode: (scenario: TestInput | ClassificationTestSignal, key: string) => Promise<string>;
|
|
410
|
+
/** A painted test image: its RGBA pixels, row by row, and the same image as PNG bytes. */
|
|
411
|
+
interface TestImage {
|
|
412
|
+
width: number;
|
|
413
|
+
height: number;
|
|
414
|
+
rgba: Uint8Array;
|
|
415
|
+
/** The image as a PNG, to upload as it is. */
|
|
416
|
+
png: Uint8Array;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* The test image for `scenario`, signed with the project's test input key. Upload its `png` bytes
|
|
420
|
+
* (or encode `rgba` in another format: the image survives lossy formats and resizing) as the whole
|
|
421
|
+
* image, optionally on a plain single-colour border.
|
|
422
|
+
*/
|
|
423
|
+
declare const paintTestImage: (scenario: TestInput | ClassificationTestSignal, key: string) => Promise<TestImage>;
|
|
424
|
+
export { getImageTestCategories as _, MEDIA_TEST_SIGNALS as a, TEST_DETECTION_BOX_MAX as c, TEST_INPUT_KEY_PATTERN as d, TEST_INPUT_PRESETS as f, detectTestTrigger as g, detectTestImage as h, paintTestImage as i, TEST_FACE_AGE_MAX as l, TestInput as m, generateMediaTestCode as n, ClassificationTestSignal as o, TestDetections as p, generateTestTextCode as r, TEST_DETECTIONS_MAX as s, TestImage as t, TEST_FACE_AGE_PRESETS as u, testInputForSignal as v };
|
package/esm/test-inputs.d.ts
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
|
|
3
|
-
export declare const generateTestTextCode: (scenario: TestInput | ClassificationTestSignal, key: string) => Promise<string>;
|
|
4
|
-
/** A painted test image: its RGBA pixels, row by row, and the same image as PNG bytes. */
|
|
5
|
-
export interface TestImage {
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
rgba: Uint8Array;
|
|
9
|
-
/** The image as a PNG, to upload as it is. */
|
|
10
|
-
png: Uint8Array;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The test image for `scenario`, signed with the project's test input key. Upload its `png` bytes
|
|
14
|
-
* (or encode `rgba` in another format: the image survives lossy formats and resizing) as the whole
|
|
15
|
-
* image, optionally on a plain single-colour border.
|
|
16
|
-
*/
|
|
17
|
-
export declare const paintTestImage: (scenario: TestInput | ClassificationTestSignal, key: string) => Promise<TestImage>;
|
|
18
|
-
export { type ClassificationTestSignal, TEST_DETECTIONS_MAX, TEST_DETECTION_BOX_MAX, TEST_FACE_AGE_MAX, TEST_FACE_AGE_PRESETS, TEST_INPUT_KEY_PATTERN, TEST_INPUT_PRESETS, type TestDetections, type TestInput, detectTestImage, detectTestTrigger, getImageTestCategories, testInputForSignal };
|
|
1
|
+
import { _ as getImageTestCategories, a as MEDIA_TEST_SIGNALS, c as TEST_DETECTION_BOX_MAX, d as TEST_INPUT_KEY_PATTERN, f as TEST_INPUT_PRESETS, g as detectTestTrigger, h as detectTestImage, i as paintTestImage, l as TEST_FACE_AGE_MAX, m as TestInput, n as generateMediaTestCode, o as ClassificationTestSignal, p as TestDetections, r as generateTestTextCode, s as TEST_DETECTIONS_MAX, t as TestImage, u as TEST_FACE_AGE_PRESETS, v as testInputForSignal } from "./test-inputs-JaZaV9Up.js";
|
|
2
|
+
export { type ClassificationTestSignal, MEDIA_TEST_SIGNALS, TEST_DETECTIONS_MAX, TEST_DETECTION_BOX_MAX, TEST_FACE_AGE_MAX, TEST_FACE_AGE_PRESETS, TEST_INPUT_KEY_PATTERN, TEST_INPUT_PRESETS, type TestDetections, TestImage, type TestInput, detectTestImage, detectTestTrigger, generateMediaTestCode, generateTestTextCode, getImageTestCategories, paintTestImage, testInputForSignal };
|