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/cjs/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/cjs/ui.js CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_ui = require("./ui-BRA4HQ8r.js");
3
- const require_UploadController = require("./UploadController-l8fZM2qT.js");
4
- const require_Core = require("./Core-Cm5Z1oJ9.js");
2
+ const require_ui = require("./ui-CbqSrVlT.js");
3
+ const require_UploadController = require("./UploadController-Bh2bqt8N.js");
4
+ const require_Core = require("./Core-zXLf8JKh.js");
5
5
  exports.ASSET_FILE_ICON_SIZE = require_Core.ASSET_FILE_ICON_SIZE;
6
6
  exports.ASSET_VIEWERS = require_ui.ASSET_VIEWERS;
7
7
  exports.AssetSession = require_Core.AssetSession;
package/cjs/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<{
package/cjs/vue.js CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_ui = require("./ui-BRA4HQ8r.js");
3
- const require_UploadController = require("./UploadController-l8fZM2qT.js");
4
- const require_Core = require("./Core-Cm5Z1oJ9.js");
2
+ const require_ui = require("./ui-CbqSrVlT.js");
3
+ const require_UploadController = require("./UploadController-Bh2bqt8N.js");
4
+ const require_Core = require("./Core-zXLf8JKh.js");
5
5
  const require_FileIcons = require("./FileIcons-Ob003MdS.js");
6
- const require_BrowserUpload = require("./BrowserUpload-Bwlib4Zc.js");
6
+ const require_BrowserUpload = require("./BrowserUpload-HQjhZrW-.js");
7
7
  let vue = require("vue");
8
8
  // src/viewers/Vue.ts
9
9
  const optional$1 = (type) => ({
@@ -1,5 +1,5 @@
1
- import { F as UploadItem$1, I as UploadSnapshot$1, M as UploadController, N as UploadControllerOptions$1, O as CalmLensUpload$1, P as UploadFile, h as UploaderProps$1 } from "./Core-C33pkBmf.js";
2
- import { t as UseCalmLensUploadResult$1 } from "./ReactUpload-DhF8mm51.js";
1
+ import { F as UploadItem$1, I as UploadSnapshot$1, M as UploadController, N as UploadControllerOptions$1, O as CalmLensUpload$1, P as UploadFile, h as UploaderProps$1 } from "./Core-Dt_HUNvH.js";
2
+ import { t as UseCalmLensUploadResult$1 } from "./ReactUpload-Bd7Hea4w.js";
3
3
  type UploadItem<F extends UploadFile = File> = UploadItem$1<F>;
4
4
  type CalmLensUpload<F extends UploadFile = File> = CalmLensUpload$1<F>;
5
5
  type UploadSnapshot<F extends UploadFile = File> = UploadSnapshot$1<F>;
@@ -1,4 +1,4 @@
1
- import { n as createUploadController$1 } from "./UploadController-DnJrWiE4.js";
1
+ import { n as createUploadController$1 } from "./UploadController-DEwR1AxP.js";
2
2
  // src/ui/BrowserUpload.ts
3
3
  /** Creates an upload queue for the browser components, such as one a form starts on submit. */
4
4
  const createUploadController = (options) => createUploadController$1(options);
@@ -1,4 +1,4 @@
1
- import { D as CalmLensAppClientOptions, Lt as RetrieveAssetOptions, an as UploadedAsset, en as UploadAssetPartOptions, in as UploadPresetSubmitAssetOptions, j as CdnAssetUrlOptions } from "./CalmLensTypes-BDKwThbO.js";
1
+ import { D as CalmLensAppClientOptions, Lt as RetrieveAssetOptions, an as UploadedAsset, en as UploadAssetPartOptions, in as UploadPresetSubmitAssetOptions, j as CdnAssetUrlOptions } from "./CalmLensTypes-SmOCgKI3.js";
2
2
  declare const inspectSymbol: unique symbol;
3
3
  /**
4
4
  * The CalmLens client for browsers and React Native apps. It uploads through an upload preset,
@@ -1,5 +1,5 @@
1
- import { B as invalidArgument, S as validateAppClientOptions, V as invalidConfig, d as checkOptionKeys, o as buildAssetUrl, p as encodePathSegment, u as DEFAULT_CDN_BASE_URL } from "./ModerationContextLimits-CrxSnVZ3.js";
2
- import { d as prepareSubmitAssetOptions, f as resolveConnectionOptions, i as CalmLensConnection, p as splitsIntoParts, s as expectUploadedAsset, t as APP_OPTION_KEYS } from "./CalmLensOptionKeys-BG7Qrh8-.js";
1
+ import { B as invalidArgument, S as validateAppClientOptions, V as invalidConfig, d as checkOptionKeys, o as buildAssetUrl, p as encodePathSegment, u as DEFAULT_CDN_BASE_URL } from "./ModerationContextLimits-B8f4ukBB.js";
2
+ import { d as prepareSubmitAssetOptions, f as resolveConnectionOptions, i as CalmLensConnection, p as splitsIntoParts, s as expectUploadedAsset, t as APP_OPTION_KEYS } from "./CalmLensOptionKeys-C6R-4Zvh.js";
3
3
  // src/client/CalmLensAppClient.ts
4
4
  const inspectSymbol = Symbol.for("nodejs.util.inspect.custom");
5
5
  /** `options`, once `checkOptionKeys` finds only keys `operation` takes. */
@@ -1,4 +1,4 @@
1
- import { A as getRejectedUploadMimeTypeError, B as invalidArgument, D as MAX_DIRECT_IMAGE_UPLOAD_BYTES, H as API_ERROR_CODES, M as CalmLensTransport, N as sleep, O as MAX_IMAGE_UPLOAD_BYTES, R as CalmLensError, _ as randomUuid, k as MAX_NON_IMAGE_UPLOAD_BYTES, m as isAcceptedUploadMimeType, r as selectModerationContextItems, y as stringifyQuery, z as SDK_ERROR_CODES } from "./ModerationContextLimits-CrxSnVZ3.js";
1
+ import { A as getRejectedUploadMimeTypeError, B as invalidArgument, D as MAX_DIRECT_IMAGE_UPLOAD_BYTES, H as API_ERROR_CODES, M as CalmLensTransport, N as sleep, O as MAX_IMAGE_UPLOAD_BYTES, R as CalmLensError, _ as randomUuid, k as MAX_NON_IMAGE_UPLOAD_BYTES, m as isAcceptedUploadMimeType, r as selectModerationContextItems, y as stringifyQuery, z as SDK_ERROR_CODES } from "./ModerationContextLimits-B8f4ukBB.js";
2
2
  // src/contract/AssetPayload.js
3
3
  const bufferInputToBytes = (value) => {
4
4
  if (value instanceof ArrayBuffer) return new Uint8Array(value);
@@ -1,6 +1,6 @@
1
- import { d as HashListEntry, u as HashList } from "./Classification-Q5zGpR8l-CEWjnE39.js";
2
- import { $ as GetAssetInfoOptions, $t as UpgradePolicyOptions, Bt as SetPolicyAutomaticUpdatesOptions, Ct as ListHashListEntriesOptions, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Ft as RequestOptions, G as EnsureLensOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, Mt as PolicyIdOptions, N as CdnServeOptions, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, Pt as RemoveAssetContentOptions, Q as FolderPage, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rt as RetryAssetOptions, 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, Wt as SignedUploadToken, X as ExplainAssetOptions, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _t as LensPage, a as AssetChildrenPage, bt as ListAssetsOptions, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, dt as IterateHashListsOptions, en as UploadAssetPartOptions, et as HashListEntryIdOptions, ft as IterateLensesOptions, g as AssetPage, gt as LensIdOptions, ht as Lens, j as CdnAssetUrlOptions, kt as MoveFolderOptions, lt as IterateFoldersOptions, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qt as UpdateAssetOptions, rn as UploadPresetPage, rt as HashListPage, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tt as HashListEntryPage, ut as IterateHashListEntriesOptions, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, xt as ListEventsOptions, y as AssetTimelinePage, yt as ListAssetTimelineOptions, z as CreateLensOptions } from "./CalmLensTypes-BDKwThbO.js";
3
- import "./WebhookPayload-Dt6DttS0.js";
1
+ import { d as HashListEntry, u as HashList } from "./Classification-CxRedzgH-C9qlYW_J.js";
2
+ import { $ as GetAssetInfoOptions, $t as UpgradePolicyOptions, Bt as SetPolicyAutomaticUpdatesOptions, Ct as ListHashListEntriesOptions, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Ft as RequestOptions, G as EnsureLensOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, Mt as PolicyIdOptions, N as CdnServeOptions, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, Pt as RemoveAssetContentOptions, Q as FolderPage, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rt as RetryAssetOptions, 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, Wt as SignedUploadToken, X as ExplainAssetOptions, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _t as LensPage, a as AssetChildrenPage, bt as ListAssetsOptions, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, dt as IterateHashListsOptions, en as UploadAssetPartOptions, et as HashListEntryIdOptions, ft as IterateLensesOptions, g as AssetPage, gt as LensIdOptions, ht as Lens, j as CdnAssetUrlOptions, kt as MoveFolderOptions, lt as IterateFoldersOptions, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qt as UpdateAssetOptions, rn as UploadPresetPage, rt as HashListPage, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tt as HashListEntryPage, ut as IterateHashListEntriesOptions, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, xt as ListEventsOptions, y as AssetTimelinePage, yt as ListAssetTimelineOptions, z as CreateLensOptions } from "./CalmLensTypes-SmOCgKI3.js";
3
+ import "./WebhookPayload-C7KAk3iR.js";
4
4
  interface LensCache {
5
5
  readonly ensuredLenses: Map<string, Lens>;
6
6
  readonly pendingEnsureLenses: Map<string, Promise<void>>;
@@ -51,8 +51,7 @@ declare class CalmLensServerClient {
51
51
  * Builds an asset's CDN URL without a request: the asset URL, which every resource is a path
52
52
  * beneath, or a resource URL when `resource` is given, with its lens or transform and the
53
53
  * viewer claims. Use it for public assets; private ones need `cdn.signAssetUrl`. Viewer
54
- * claims are your app's unsigned assertions: CalmLens does not verify an age confirmation,
55
- * and anyone holding the URL can add it.
54
+ * claims are assertions from your app; CalmLens doesn't verify them.
56
55
  */
57
56
  getAssetUrl: (urlOptions: CdnAssetUrlOptions) => string;
58
57
  /**
@@ -72,8 +71,8 @@ declare class CalmLensServerClient {
72
71
  getAssetInfo: (url: string, options?: Omit<GetAssetInfoOptions, "fetch">) => Promise<AssetInfo>;
73
72
  /**
74
73
  * Fetches asset content or a preview from the CDN with the client's API key, and returns
75
- * the `Response` as soon as headers arrive, so the body streams. Non-2xx responses are
76
- * returned, not thrown; `timeoutMs` covers only the wait for headers.
74
+ * a `Response` with writable headers as soon as headers arrive, so the body streams.
75
+ * Non-2xx responses are returned, not thrown; `timeoutMs` covers only the wait for headers.
77
76
  */
78
77
  serve: (options: CdnServeOptions) => Promise<Response>;
79
78
  };
@@ -118,8 +117,9 @@ declare class CalmLensServerClient {
118
117
  */
119
118
  create: (options: SubmitAssetOptions) => Promise<Asset>;
120
119
  /**
121
- * Uploads an asset and waits for its moderation decision. Audio and video still finish
122
- * in the background. Retried safely with an `Idempotency-Key`.
120
+ * Uploads an asset and waits for its moderation decision. Documents, websites, audio, video
121
+ * and files over 20 MiB sent in parts still finish in the background and return `pending`.
122
+ * Retried safely with an `Idempotency-Key`.
123
123
  */
124
124
  classify: (classifyOptions: SubmitAssetOptions) => Promise<Asset>;
125
125
  /**
@@ -1,5 +1,5 @@
1
- import { B as invalidArgument, C as validateBatchAssetsOptions, F as isBrowserRuntime, I as isReactNativeRuntime, R as CalmLensError, T as validateServerClientOptions, V as invalidConfig, a as appendAssetLocation, b as toTextAssetOptions, d as checkOptionKeys, g as pollForDecision, l as validateSignAssetUrlOptions, o as buildAssetUrl, p as encodePathSegment, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, w as validateRequestOptions, z as SDK_ERROR_CODES } from "./ModerationContextLimits-CrxSnVZ3.js";
2
- import { c as getMockHooks, d as prepareSubmitAssetOptions, f as resolveConnectionOptions, i as CalmLensConnection, l as invalidPayload, n as NULLABLE_OPTION_KEYS, o as expectAsset, p as splitsIntoParts, r as SERVER_OPTION_KEYS, u as newIdempotencyKey } from "./CalmLensOptionKeys-BG7Qrh8-.js";
1
+ import { B as invalidArgument, C as validateBatchAssetsOptions, F as isBrowserRuntime, I as isReactNativeRuntime, R as CalmLensError, T as validateServerClientOptions, V as invalidConfig, a as appendAssetLocation, b as toTextAssetOptions, d as checkOptionKeys, g as pollForDecision, l as validateSignAssetUrlOptions, o as buildAssetUrl, p as encodePathSegment, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, w as validateRequestOptions, z as SDK_ERROR_CODES } from "./ModerationContextLimits-B8f4ukBB.js";
2
+ import { c as getMockHooks, d as prepareSubmitAssetOptions, f as resolveConnectionOptions, i as CalmLensConnection, l as invalidPayload, n as NULLABLE_OPTION_KEYS, o as expectAsset, p as splitsIntoParts, r as SERVER_OPTION_KEYS, u as newIdempotencyKey } from "./CalmLensOptionKeys-C6R-4Zvh.js";
3
3
  import { n as sha256Hex, r as timingSafeEqual, t as hmacSha256Hex } from "./CryptoUtils-B_x8lMIx-DhuWGzqn.js";
4
4
  // src/contract/JsonUtils.js
5
5
  const stringifyJsonCanonical = (value) => JSON.stringify(value, (_key, nestedValue) => {
@@ -189,7 +189,7 @@ const getEnsureLensCacheKey = (options) => stringifyJsonCanonical({
189
189
  name: options.name,
190
190
  description: options.description ?? null,
191
191
  type: options.type,
192
- active: options.active,
192
+ active: options.active ?? true,
193
193
  transform: options.transform ?? null
194
194
  });
195
195
  const requireId = (value, name) => encodePathSegment(value, name);
@@ -215,6 +215,23 @@ const assertNewCursor = (sent, cursor) => {
215
215
  sent.add(cursor);
216
216
  };
217
217
  const inspectSymbol = Symbol.for("nodejs.util.inspect.custom");
218
+ const writableCdnResponse = (response, metadata = response) => {
219
+ if (response.status < 200) return response;
220
+ const writable = new Response(response.body, response);
221
+ const { url, redirected, type } = metadata;
222
+ return Object.defineProperties(writable, {
223
+ url: { value: url },
224
+ redirected: { value: redirected },
225
+ type: { value: type },
226
+ clone: { value() {
227
+ return writableCdnResponse(Response.prototype.clone.call(this), {
228
+ url,
229
+ redirected,
230
+ type
231
+ });
232
+ } }
233
+ });
234
+ };
218
235
  /**
219
236
  * The CalmLens API client for your server, authenticated with a project API key. Create one per
220
237
  * project and reuse it; it holds no connections. Every method takes one options object and
@@ -318,8 +335,7 @@ var CalmLensServerClient = class CalmLensServerClient {
318
335
  * Builds an asset's CDN URL without a request: the asset URL, which every resource is a path
319
336
  * beneath, or a resource URL when `resource` is given, with its lens or transform and the
320
337
  * viewer claims. Use it for public assets; private ones need `cdn.signAssetUrl`. Viewer
321
- * claims are your app's unsigned assertions: CalmLens does not verify an age confirmation,
322
- * and anyone holding the URL can add it.
338
+ * claims are assertions from your app; CalmLens doesn't verify them.
323
339
  */
324
340
  getAssetUrl: (urlOptions) => {
325
341
  const { projectId, ...options } = checked("cdn.getAssetUrl", urlOptions);
@@ -360,8 +376,8 @@ var CalmLensServerClient = class CalmLensServerClient {
360
376
  }),
361
377
  /**
362
378
  * Fetches asset content or a preview from the CDN with the client's API key, and returns
363
- * the `Response` as soon as headers arrive, so the body streams. Non-2xx responses are
364
- * returned, not thrown; `timeoutMs` covers only the wait for headers.
379
+ * a `Response` with writable headers as soon as headers arrive, so the body streams.
380
+ * Non-2xx responses are returned, not thrown; `timeoutMs` covers only the wait for headers.
365
381
  */
366
382
  serve: async (options) => {
367
383
  const { init, resource = "rendered", ...urlOptions } = checked("cdn.serve", options);
@@ -378,7 +394,7 @@ var CalmLensServerClient = class CalmLensServerClient {
378
394
  deadline: "headers",
379
395
  fetch: this.#settings.cdnFetch
380
396
  }, { allowHttpErrors: true });
381
- return response;
397
+ return writableCdnResponse(response);
382
398
  }
383
399
  };
384
400
  }
@@ -473,8 +489,9 @@ sign: async (options) => {
473
489
  */
474
490
  create: async (options) => this.submitAsset(checked("assets.create", options), false),
475
491
  /**
476
- * Uploads an asset and waits for its moderation decision. Audio and video still finish
477
- * in the background. Retried safely with an `Idempotency-Key`.
492
+ * Uploads an asset and waits for its moderation decision. Documents, websites, audio, video
493
+ * and files over 20 MiB sent in parts still finish in the background and return `pending`.
494
+ * Retried safely with an `Idempotency-Key`.
478
495
  */
479
496
  classify: async (classifyOptions) => {
480
497
  const options = checked("assets.classify", classifyOptions);