calmlens 0.37.1 → 0.38.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 +87 -17
  2. package/cjs/{BrowserUpload-84KQWr1Q.js → BrowserUpload-DS0lxg5C.js} +1 -1
  3. package/{esm/BrowserUpload-CuG3tWSo.d.ts → cjs/BrowserUpload-_iMX_nq0.d.ts} +2 -2
  4. package/{esm/CalmLensAppClient-QqtovWE-.d.ts → cjs/CalmLensAppClient-CQpnc4JZ.d.ts} +1 -1
  5. package/cjs/{CalmLensAppClient-D4tRb_P2.js → CalmLensAppClient-Diu1QtBz.js} +3 -3
  6. package/cjs/{CalmLensCdn-CdYY_XtK.js → CalmLensCdn-DCj0AfoS.js} +2 -2
  7. package/cjs/{CalmLensConnection-GkR2cKn5.js → CalmLensConnection-BpBq0nQR.js} +14 -4
  8. package/cjs/{CalmLensError-ifj5rLmk.js → CalmLensError-C9g7GXfU.js} +7 -2
  9. package/{esm/CalmLensServerClient-csSQqHBt.d.ts → cjs/CalmLensServerClient-CeTsE5Jx.d.ts} +5 -5
  10. package/cjs/{CalmLensServerClient-cgPOG4Sv.js → CalmLensServerClient-vdHfH0Nf.js} +15 -6
  11. package/cjs/{CalmLensTypes-_f7QVRtO.d.ts → CalmLensTypes-jond9q6a.d.ts} +28 -9
  12. package/cjs/{Core-BlnBBJKb.js → Core-BHQSo7rY.js} +3 -3
  13. package/{esm/Core-4iFxKJnY.d.ts → cjs/Core-C6_Q5ZME.d.ts} +2 -2
  14. package/cjs/{ReactUpload-D3AYIZBh.js → ReactUpload-bbHMmEUQ.js} +1 -1
  15. package/cjs/{ReactUpload-4qd2xACg.d.ts → ReactUpload-fy6zhY8M.d.ts} +1 -1
  16. package/cjs/{UploadController-BYuHuZ7K.js → UploadController-C1tiTTRR.js} +2 -2
  17. package/{esm/WebhookPayload-BJtggTLd.d.ts → cjs/WebhookPayload-DdpKjQGw.d.ts} +5 -3
  18. package/cjs/app.d.ts +4 -4
  19. package/cjs/app.js +3 -3
  20. package/cjs/elements.d.ts +4 -4
  21. package/cjs/elements.js +4 -4
  22. package/cjs/{index-IEA75nev.d.ts → index-CgAztQdX.d.ts} +2 -2
  23. package/cjs/index.d.ts +3 -3
  24. package/cjs/index.js +2 -2
  25. package/cjs/react-native.d.ts +2 -2
  26. package/cjs/react-native.js +4 -4
  27. package/cjs/react.d.ts +4 -4
  28. package/cjs/react.js +5 -5
  29. package/cjs/server.d.ts +4 -4
  30. package/cjs/server.js +3 -3
  31. package/cjs/{CalmLensTestInputArguments-C6S09FVQ.js → test-inputs-DJnupsBH.js} +231 -22
  32. package/{esm/TestTriggers-CjDhhz78.d.ts → cjs/test-inputs-fugEK0py.d.ts} +36 -142
  33. package/cjs/test-inputs.d.ts +2 -18
  34. package/cjs/test-inputs.js +17 -126
  35. package/cjs/testing.d.ts +11 -14
  36. package/cjs/testing.js +38 -68
  37. package/cjs/{ui-Cy8MWXOw.js → ui-2jJvTcCP.js} +2 -2
  38. package/cjs/{ui-BMQW3Hse.d.ts → ui-Cp18fGXG.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-C429CcUi.js → BrowserUpload-C4YF17a3.js} +1 -1
  44. package/{cjs/BrowserUpload-CuG3tWSo.d.ts → esm/BrowserUpload-_iMX_nq0.d.ts} +2 -2
  45. package/esm/{CalmLensAppClient-Brvc-GXt.js → CalmLensAppClient-B2H7x_SJ.js} +3 -3
  46. package/{cjs/CalmLensAppClient-QqtovWE-.d.ts → esm/CalmLensAppClient-CQpnc4JZ.d.ts} +1 -1
  47. package/esm/{CalmLensCdn-cmxtF_dw.js → CalmLensCdn-Dh546rXe.js} +2 -2
  48. package/esm/{CalmLensConnection-DEfpIugc.js → CalmLensConnection-BbFlVAdl.js} +14 -4
  49. package/esm/{CalmLensError-C15tWu8W.js → CalmLensError-DjkibkdI.js} +7 -2
  50. package/{cjs/CalmLensServerClient-csSQqHBt.d.ts → esm/CalmLensServerClient-CeTsE5Jx.d.ts} +5 -5
  51. package/esm/{CalmLensServerClient-BpsCXVeO.js → CalmLensServerClient-CqH-tqcC.js} +15 -6
  52. package/esm/{CalmLensTypes-_f7QVRtO.d.ts → CalmLensTypes-jond9q6a.d.ts} +28 -9
  53. package/{cjs/Core-4iFxKJnY.d.ts → esm/Core-C6_Q5ZME.d.ts} +2 -2
  54. package/esm/{Core-C_f1o9RQ.js → Core-VNBTpvrG.js} +3 -3
  55. package/esm/{ReactUpload-Ch5qY7PS.js → ReactUpload-CRH6rSaX.js} +1 -1
  56. package/esm/{ReactUpload-4qd2xACg.d.ts → ReactUpload-fy6zhY8M.d.ts} +1 -1
  57. package/esm/{UploadController-9fkYFVZM.js → UploadController-BYxiONcw.js} +2 -2
  58. package/{cjs/WebhookPayload-BJtggTLd.d.ts → esm/WebhookPayload-DdpKjQGw.d.ts} +5 -3
  59. package/esm/app.d.ts +4 -4
  60. package/esm/app.js +3 -3
  61. package/esm/elements.d.ts +4 -4
  62. package/esm/elements.js +4 -4
  63. package/esm/{index-IEA75nev.d.ts → index-CgAztQdX.d.ts} +2 -2
  64. package/esm/index.d.ts +3 -3
  65. package/esm/index.js +2 -2
  66. package/esm/react-native.d.ts +2 -2
  67. package/esm/react-native.js +4 -4
  68. package/esm/react.d.ts +4 -4
  69. package/esm/react.js +5 -5
  70. package/esm/server.d.ts +4 -4
  71. package/esm/server.js +3 -3
  72. package/esm/{CalmLensTestInputArguments-DS_3mt1C.js → test-inputs-BLlkOmNC.js} +212 -15
  73. package/{cjs/TestTriggers-CjDhhz78.d.ts → esm/test-inputs-fugEK0py.d.ts} +36 -142
  74. package/esm/test-inputs.d.ts +2 -18
  75. package/esm/test-inputs.js +1 -115
  76. package/esm/testing.d.ts +11 -14
  77. package/esm/testing.js +27 -57
  78. package/esm/{ui-BMQW3Hse.d.ts → ui-Cp18fGXG.d.ts} +2 -2
  79. package/esm/{ui-HK74e42L.js → ui-siBYiNJZ.js} +2 -2
  80. package/esm/ui.d.ts +2 -2
  81. package/esm/ui.js +3 -3
  82. package/esm/vue.d.ts +5 -5
  83. package/esm/vue.js +4 -4
  84. package/package.json +1 -1
package/esm/testing.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Jt as SignedUploadToken, Kt as SignUploadTokenOptions, Ln as PermissionGrant, Nn as TypedEvent, O as CalmLensAppClientOptions, Rn as Folder, Vn as AssetBinaryPayloadInput, k as CalmLensServerClientOptions, m as AssetModeration, on as UploadPresetDefinition, r as Asset } from "./CalmLensTypes-_f7QVRtO.js";
2
- import { t as CalmLensAppClient } from "./CalmLensAppClient-QqtovWE-.js";
3
- import { I as ApiErrorCode, n as WebhookEventPayload } from "./WebhookPayload-BJtggTLd.js";
4
- import { t as CalmLensServerClient } from "./CalmLensServerClient-csSQqHBt.js";
5
- import { t as ClassificationTestSignal } from "./TestTriggers-CjDhhz78.js";
1
+ import { Jt as SignedUploadToken, Kt as SignUploadTokenOptions, Ln as PermissionGrant, Nn as TypedEvent, O as CalmLensAppClientOptions, Rn as Folder, Vn as AssetBinaryPayloadInput, k as CalmLensServerClientOptions, m as AssetModeration, on as UploadPresetDefinition, r as Asset } from "./CalmLensTypes-jond9q6a.js";
2
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-CQpnc4JZ.js";
3
+ import { I as ApiErrorCode, n as WebhookEventPayload } from "./WebhookPayload-DdpKjQGw.js";
4
+ import { t as CalmLensServerClient } from "./CalmLensServerClient-CeTsE5Jx.js";
5
+ import { a as MEDIA_TEST_SIGNALS, n as generateMediaTestCode } from "./test-inputs-fugEK0py.js";
6
6
  import "zod";
7
7
  /**
8
8
  * Signs a single-use upload token with `apiKey`, locally. `CalmLensServerClient` and
@@ -14,7 +14,6 @@ declare const signUploadTokenWithApiKey: (apiKey: string, options: SignUploadTok
14
14
  now?: number;
15
15
  nonce?: string;
16
16
  }) => Promise<SignedUploadToken>;
17
- export declare const MEDIA_TEST_SIGNALS: readonly ["sexual", "violence", "self-harm", "harassment", "hate", "criminal-activity", "personal-information", "profanity", "violence.graphic"];
18
17
  export declare const MOCK_API_KEY_PREFIX = "sk_test_";
19
18
  /**
20
19
  * Creates a mock API key holding `grants`. Throws `sdk/invalid-argument`, naming the grant, for
@@ -234,11 +233,11 @@ interface MockDatabaseStorage {
234
233
  getAsset(assetId: string): Promise<Asset | undefined>;
235
234
  listAssets(projectId: string): Promise<Asset[]>;
236
235
  deleteAsset(assetId: string): Promise<void>;
237
- createFolder?(folder: Folder): Promise<Folder>;
238
- updateFolder?(folder: Folder): Promise<Folder>;
239
- getFolder?(folderId: string): Promise<Folder | undefined>;
240
- listFolders?(projectId: string): Promise<Folder[]>;
241
- deleteFolder?(folderId: string): Promise<void>;
236
+ createFolder(folder: Folder): Promise<Folder>;
237
+ updateFolder(folder: Folder): Promise<Folder>;
238
+ getFolder(folderId: string): Promise<Folder | undefined>;
239
+ listFolders(projectId: string): Promise<Folder[]>;
240
+ deleteFolder(folderId: string): Promise<void>;
242
241
  }
243
242
  export declare class InMemoryMockDatabaseStorage implements MockDatabaseStorage {
244
243
  private readonly assets;
@@ -505,6 +504,4 @@ export declare const createWebhookHeaders: (options: {
505
504
  deliveryId: string;
506
505
  timestampSeconds?: number;
507
506
  }) => Promise<Record<string, string>>;
508
- /** A spoken media test phrase for `signal`, signed with the project's test input key. */
509
- export declare const generateMediaTestCode: (signal: ClassificationTestSignal, key: string) => Promise<string>;
510
- export { type MockAssetOutcome, type MockCalmLensAppClientOptions, type MockCalmLensCall, type MockCalmLensOperation, type MockCalmLensServerClientOptions, type MockDatabaseStorage, type MockDetectedFace, type MockDetectedLink, type MockDetectedPerson, type MockEventInput, type MockFailureOptions, type MockImageStorage, type MockModerate, type MockModerationInput, type MockModerationTrigger, type MockQrCode, type MockRegionalDecision, type MockRequestFailure, type MockReviewDecision, type MockServedUrl, type MockStoredContent, type MockTextRegion, type MockUploadPreset, signUploadTokenWithApiKey as signUploadToken };
507
+ export { MEDIA_TEST_SIGNALS, type MockAssetOutcome, type MockCalmLensAppClientOptions, type MockCalmLensCall, type MockCalmLensOperation, type MockCalmLensServerClientOptions, type MockDatabaseStorage, type MockDetectedFace, type MockDetectedLink, type MockDetectedPerson, type MockEventInput, type MockFailureOptions, type MockImageStorage, type MockModerate, type MockModerationInput, type MockModerationTrigger, type MockQrCode, type MockRegionalDecision, type MockRequestFailure, type MockReviewDecision, type MockServedUrl, type MockStoredContent, type MockTextRegion, type MockUploadPreset, generateMediaTestCode, signUploadTokenWithApiKey as signUploadToken };
package/esm/testing.js CHANGED
@@ -1,37 +1,12 @@
1
- import { C as invalidConfig, S as invalidArgument, T as API_ERROR_DEFINITIONS, l as CalmLensError, w as API_ERROR_CODES, x as SDK_ERROR_CODES } from "./CalmLensError-C15tWu8W.js";
2
- import { F as sleep, M as getRejectedUploadMimeTypeError, N as normalizeUploadMimeType, O as MAX_IMAGE_UPLOAD_BYTES, S as validateAppClientOptions, _ as randomUuid, f as checkTransformOptions, h as parseTransformSelector, m as isAcceptedUploadMimeType, t as ASSET_RESOURCE_PATHS, w as validateServerClientOptions } from "./CalmLensCdn-cmxtF_dw.js";
3
- import { a as WEBHOOK_TIMESTAMP_HEADER, f as signUploadTokenWithApiKey, m as stringifyJsonCanonical, n as WEBHOOK_DELIVERY_HEADER, p as decodeUploadToken, r as WEBHOOK_SIGNATURE_HEADER, t as CalmLensServerClient } from "./CalmLensServerClient-BpsCXVeO.js";
4
- import { _ as validateAssetPayload, g as assetToData, h as assetDataToUint8Array, n as MOCK_HOOKS } from "./CalmLensConnection-DEfpIugc.js";
1
+ import { C as invalidConfig, S as invalidArgument, T as API_ERROR_DEFINITIONS, l as CalmLensError, w as API_ERROR_CODES, x as SDK_ERROR_CODES } from "./CalmLensError-DjkibkdI.js";
2
+ import { F as sleep, M as getRejectedUploadMimeTypeError, N as normalizeUploadMimeType, O as MAX_IMAGE_UPLOAD_BYTES, S as validateAppClientOptions, _ as randomUuid, f as checkTransformOptions, h as parseTransformSelector, m as isAcceptedUploadMimeType, t as ASSET_RESOURCE_PATHS, w as validateServerClientOptions } from "./CalmLensCdn-Dh546rXe.js";
3
+ import { a as WEBHOOK_TIMESTAMP_HEADER, f as signUploadTokenWithApiKey, m as stringifyJsonCanonical, n as WEBHOOK_DELIVERY_HEADER, p as decodeUploadToken, r as WEBHOOK_SIGNATURE_HEADER, t as CalmLensServerClient } from "./CalmLensServerClient-CqH-tqcC.js";
4
+ import { _ as validateAssetPayload, g as assetToData, h as assetDataToUint8Array, n as MOCK_HOOKS } from "./CalmLensConnection-BbFlVAdl.js";
5
5
  import { t as hmacSha256Hex } from "./CryptoUtils-BLCa-oZe-DKr3LmN6.js";
6
- import { t as CalmLensAppClient } from "./CalmLensAppClient-Brvc-GXt.js";
7
- import { o as placeholderHashToDataURL, r as isFileAccepted } from "./UploadController-9fkYFVZM.js";
8
- import { _ as CLASSIFICATION_CATEGORIES, f as getTestInputTag, g as lazySchema, h as EU_COUNTRIES, t as withValidTestInputArguments } from "./CalmLensTestInputArguments-DS_3mt1C.js";
6
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-B2H7x_SJ.js";
7
+ import { o as placeholderHashToDataURL, r as isFileAccepted } from "./UploadController-BYxiONcw.js";
8
+ import { _ as EU_COUNTRIES, i as MEDIA_TEST_SIGNALS, t as generateMediaTestCode, v as lazySchema, y as CLASSIFICATION_CATEGORIES } from "./test-inputs-BLlkOmNC.js";
9
9
  import * as zod from "zod";
10
- // src/contract/MediaTestTriggers.js
11
- const MEDIA_TEST_SIGNALS = [...CLASSIFICATION_CATEGORIES, "violence.graphic"];
12
- const HEX_WORDS = [
13
- "zero",
14
- "one",
15
- "two",
16
- "three",
17
- "four",
18
- "five",
19
- "six",
20
- "seven",
21
- "eight",
22
- "nine",
23
- "alpha",
24
- "bravo",
25
- "charlie",
26
- "delta",
27
- "echo",
28
- "foxtrot"
29
- ];
30
- /** Read this aloud, or render it as large, high-contrast text in a video frame. */
31
- async function generateMediaTestCode$1(signal, testInputKey) {
32
- if (!MEDIA_TEST_SIGNALS.includes(signal)) throw new RangeError("Unsupported media test signal");
33
- return `Calm Lens test ${[...await getTestInputTag("media", signal, testInputKey)].map((character) => HEX_WORDS[Number.parseInt(character, 16)]).join(" ")} ${signal.replace(/[.-]/g, " ")} end test`;
34
- }
35
10
  /**
36
11
  * The character an asset ID starts with (after `asset_`) to say the region it lives in: the asset
37
12
  * table computes each row's region from it (`AssetTable`), so an ID is only ever in one region and
@@ -9857,17 +9832,14 @@ const operationsOf = (request) => {
9857
9832
  return [];
9858
9833
  };
9859
9834
  /**
9860
- * The methods whose requests the API runs under an `Idempotency-Key` (`idempotent` in its request
9861
- * definitions): a retry with the same key replays the first response. Others ignore the header.
9835
+ * Like the API, every write (POST, PUT, PATCH and DELETE) runs under its `Idempotency-Key`: a retry
9836
+ * with the same key replays the first response. Reads ignore the header.
9862
9837
  */
9863
- const IDEMPOTENT_OPERATIONS = [
9864
- "assets.create",
9865
- "assets.classify",
9866
- "text.classify",
9867
- "assets.uploadPart",
9868
- "assets.decide",
9869
- "assets.requestReview",
9870
- "hashLists.addEntry"
9838
+ const IDEMPOTENT_METHODS = [
9839
+ "POST",
9840
+ "PUT",
9841
+ "PATCH",
9842
+ "DELETE"
9871
9843
  ];
9872
9844
  /** A plain-text upload: the SDKs send text as a JSON body with `content.plainText`. */
9873
9845
  const isTextUpload = (request) => {
@@ -10289,7 +10261,7 @@ var MockCalmLensApi = class {
10289
10261
  async answer(request, operation, session) {
10290
10262
  const { url, headers } = request;
10291
10263
  if (!(request.segments[0] === "upload-presets") && headers.get("x-api-key") !== this.apiKey) return this.failureResponse(fail(API_ERROR_CODES.INVALID_API_KEY), url);
10292
- const key = operation && IDEMPOTENT_OPERATIONS.includes(operation) ? headers.get("idempotency-key")?.replace(/^[\t\n\r ]+|[\t\n\r ]+$/g, "") : void 0;
10264
+ const key = IDEMPOTENT_METHODS.includes(request.method) ? headers.get("idempotency-key")?.replace(/^[\t\n\r ]+|[\t\n\r ]+$/g, "") : void 0;
10293
10265
  const upload = headers.get("x-calmlens-upload");
10294
10266
  const contentType = headers.get("content-type");
10295
10267
  const isForm = !!upload && /^multipart\/form-data\b/i.test(contentType ?? "");
@@ -11048,10 +11020,11 @@ var MockCalmLensApi = class {
11048
11020
  const { content, part, sizeInBytes: _size, totalSizeInBytes, ...fields } = body;
11049
11021
  const text = content ?? part;
11050
11022
  if (text === void 0) return fields;
11051
- if (typeof text.plainText !== "string" || typeof text.type !== "string") throw invalidField("validation/invalid-type", content ? "content" : "part");
11023
+ const type = content && text.type === void 0 ? "text/plain" : text.type;
11024
+ if (typeof text.plainText !== "string" || typeof type !== "string") throw invalidField("validation/invalid-type", content ? "content" : "part");
11052
11025
  return {
11053
11026
  ...fields,
11054
- contentType: text.type,
11027
+ contentType: type,
11055
11028
  bytes: new TextEncoder().encode(text.plainText),
11056
11029
  part: part ? {
11057
11030
  partNumber: typeof part.partNumber === "number" ? part.partNumber : 1,
@@ -11852,7 +11825,7 @@ var MockCalmLensApi = class {
11852
11825
  * `search`, by name unless `ordering` says otherwise, with the folders above them.
11853
11826
  */
11854
11827
  async listFolders(query) {
11855
- const all = await this.databaseStorage.listFolders?.(this.projectId) ?? [];
11828
+ const all = await this.databaseStorage.listFolders(this.projectId);
11856
11829
  const parentId = query.get("parentId");
11857
11830
  const search = query.get("search")?.trim() || null;
11858
11831
  const sort = this.sort(query, ["name", "createdAt"], 1);
@@ -11902,7 +11875,7 @@ var MockCalmLensApi = class {
11902
11875
  createdAt: now,
11903
11876
  updatedAt: now
11904
11877
  };
11905
- return this.databaseStorage.createFolder ? await this.databaseStorage.createFolder(folder) : folder;
11878
+ return this.databaseStorage.createFolder(folder);
11906
11879
  }
11907
11880
  async updateFolder(folderId, body) {
11908
11881
  const folder = await this.findOwnFolder(folderId);
@@ -11913,17 +11886,17 @@ var MockCalmLensApi = class {
11913
11886
  ...name !== void 0 ? { name } : {},
11914
11887
  updatedAt: this.now()
11915
11888
  };
11916
- return this.databaseStorage.updateFolder ? await this.databaseStorage.updateFolder(updated) : updated;
11889
+ return this.databaseStorage.updateFolder(updated);
11917
11890
  }
11918
11891
  async deleteFolder(folderId) {
11919
11892
  await this.findOwnFolder(folderId);
11920
11893
  const hasAssets = (await this.databaseStorage.listAssets(this.projectId)).some((asset) => asset.folderId === folderId);
11921
- const hasChildren = (await this.databaseStorage.listFolders?.(this.projectId) ?? []).some((folder) => folder.parentId === folderId);
11894
+ const hasChildren = (await this.databaseStorage.listFolders(this.projectId)).some((folder) => folder.parentId === folderId);
11922
11895
  if (hasAssets || hasChildren) throw fail(API_ERROR_CODES.FOLDER_NOT_EMPTY, { details: {
11923
11896
  hasAssets,
11924
11897
  hasChildren
11925
11898
  } });
11926
- await this.databaseStorage.deleteFolder?.(folderId);
11899
+ await this.databaseStorage.deleteFolder(folderId);
11927
11900
  }
11928
11901
  async moveFolder(folderId, body) {
11929
11902
  const folder = await this.findOwnFolder(folderId);
@@ -11943,10 +11916,10 @@ var MockCalmLensApi = class {
11943
11916
  parentId: targetParentId,
11944
11917
  updatedAt: this.now()
11945
11918
  };
11946
- return this.databaseStorage.updateFolder ? await this.databaseStorage.updateFolder(updated) : updated;
11919
+ return this.databaseStorage.updateFolder(updated);
11947
11920
  }
11948
11921
  async resolveFolder(folderId) {
11949
- const folder = await this.databaseStorage.getFolder?.(folderId);
11922
+ const folder = await this.databaseStorage.getFolder(folderId);
11950
11923
  return folder && folder.projectId === this.projectId ? folder : void 0;
11951
11924
  }
11952
11925
  async findOwnFolder(folderId) {
@@ -11955,7 +11928,7 @@ var MockCalmLensApi = class {
11955
11928
  return folder;
11956
11929
  }
11957
11930
  async assertUniqueFolderName(name, parentId, excludeFolderId) {
11958
- if ((await this.databaseStorage.listFolders?.(this.projectId) ?? []).find((folder) => folder.id !== excludeFolderId && (folder.parentId ?? null) === parentId && folder.name === name)) throw fail(API_ERROR_CODES.DUPLICATE_FOLDER_NAME, { message: `A folder named "${name}" already exists in this location.` });
11931
+ if ((await this.databaseStorage.listFolders(this.projectId)).find((folder) => folder.id !== excludeFolderId && (folder.parentId ?? null) === parentId && folder.name === name)) throw fail(API_ERROR_CODES.DUPLICATE_FOLDER_NAME, { message: `A folder named "${name}" already exists in this location.` });
11959
11932
  }
11960
11933
  /** A page of the project's upload presets, oldest first unless `sort` says otherwise. */
11961
11934
  listUploadPresets(query) {
@@ -12224,7 +12197,7 @@ var MockCalmLensApi = class {
12224
12197
  }, url);
12225
12198
  const hasApiKey = request.headers.get("x-api-key") === this.apiKey;
12226
12199
  const grants = hasApiKey ? this.grants : [];
12227
- const folders = await this.databaseStorage.listFolders?.(this.projectId) ?? [];
12200
+ const folders = await this.databaseStorage.listFolders(this.projectId);
12228
12201
  const canDownload = () => permits(grants, "assets:download", asset.folderId ?? null, folders);
12229
12202
  const status = asset.classification.moderation.decision;
12230
12203
  const isHead = request.method === "HEAD";
@@ -12772,7 +12745,4 @@ const createWebhookHeaders = async (options) => {
12772
12745
  [WEBHOOK_SIGNATURE_HEADER]: await createWebhookSignatureHeader(options.secret, timestamp, options.body)
12773
12746
  };
12774
12747
  };
12775
- // src/testing.ts
12776
- /** A spoken media test phrase for `signal`, signed with the project's test input key. */
12777
- const generateMediaTestCode = (signal, key) => withValidTestInputArguments(key, () => generateMediaTestCode$1(signal, key));
12778
12748
  export { InMemoryMockDatabaseStorage, InMemoryMockImageStorage, MEDIA_TEST_SIGNALS, MOCK_API_KEY_ID, MOCK_API_KEY_PREFIX, MockCalmLensAppClient, MockCalmLensServerClient, MockDecision, createMockApiKey, createWebhookHeaders, createWebhookSignatureHeader, generateMediaTestCode, mockDecision, signUploadTokenWithApiKey as signUploadToken, toWebhookEventPayload };
@@ -1,5 +1,5 @@
1
- import "./CalmLensTypes-_f7QVRtO.js";
2
- import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-4iFxKJnY.js";
1
+ import "./CalmLensTypes-jond9q6a.js";
2
+ import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-C6_Q5ZME.js";
3
3
  import "pdfjs-dist";
4
4
  /** A viewer mounted into an element, which it owns the children of. */
5
5
  interface AssetViewer<O extends ViewerOptions = ViewerOptions> {
@@ -1,5 +1,5 @@
1
- import { a as assetUrlOf, r as appendAssetLocation } from "./CalmLensCdn-cmxtF_dw.js";
2
- import "./Core-C_f1o9RQ.js";
1
+ import { a as assetUrlOf, r as appendAssetLocation } from "./CalmLensCdn-Dh546rXe.js";
2
+ import "./Core-VNBTpvrG.js";
3
3
  // src/ui/viewers/PdfLoader.ts
4
4
  let loading;
5
5
  /**
package/esm/ui.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-4iFxKJnY.js";
2
- import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BMQW3Hse.js";
1
+ import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-C6_Q5ZME.js";
2
+ import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-Cp18fGXG.js";
3
3
  export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, type AssetDisplay, type AssetDisplayOptions, type AssetDocumentOptions, type AssetEventHandlers, type AssetImageOptions, type AssetImageSource, type AssetOptions, type AssetProps, AssetSession, type AssetSessionState, type AssetSpreadsheetOptions, type AssetVideoOptions, type AssetView, type AssetViewer, type AssetViewerKind, AssetViewerMount, AssetViewerName, AssetViewerOptionsByKind, CALMLENS_STYLES, CALMLENS_THEME, type CalmLensMessages, type CalmLensProvidedOptions, type CalmLensTheme, type CalmLensUpload, type CustomUploadContext, type CustomUploadResult, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, type DocumentViewerOptions, ICONS, ICON_ATTRIBUTES, INSTANT_LOAD_MS, type IconName, type MediaPlayback, MediaStreamPlayer, type MountedViewerKind, type PdfAssetOptions, type ProgressFetchOptions, type SpreadsheetCell, type SpreadsheetRow, type SpreadsheetSheet, type SpreadsheetViewerOptions, type TextViewerOptions, type UploadClient, UploadController, type UploadControllerOptions, type UploadFile, type UploadItem, type UploadItemView, type UploadSnapshot, type UploadStage, type UploaderDisplayOptions, type UploaderProps, type UploaderView, VIEWER_STYLES, type ViewerAsset, type ViewerMessages, type ViewerOptions, type ViewerState, type ViewerTextOptions, createDocumentViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isImageReady, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex, withProvidedOptions };
package/esm/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-HK74e42L.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-C_f1o9RQ.js";
3
- import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-9fkYFVZM.js";
1
+ import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-siBYiNJZ.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-VNBTpvrG.js";
3
+ import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController, r as isFileAccepted, t as UploadController } from "./UploadController-BYxiONcw.js";
4
4
  export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, AssetSession, AssetViewerMount, CALMLENS_STYLES, CALMLENS_THEME, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, ICONS, ICON_ATTRIBUTES, INSTANT_LOAD_MS, MediaStreamPlayer, UploadController, VIEWER_STYLES, createDocumentViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isImageReady, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex, withProvidedOptions };
package/esm/vue.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-_f7QVRtO.js";
2
- import "./index-IEA75nev.js";
3
- import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-4iFxKJnY.js";
4
- import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-CuG3tWSo.js";
5
- import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-BMQW3Hse.js";
1
+ import { O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-jond9q6a.js";
2
+ import "./index-CgAztQdX.js";
3
+ import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-C6_Q5ZME.js";
4
+ import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-_iMX_nq0.js";
5
+ import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-Cp18fGXG.js";
6
6
  import { App, MaybeRefOrGetter, PropType, ShallowRef } from "vue";
7
7
  /** Shows a text asset's text, escaped, in a scrolling region. */
8
8
  export declare const CalmLensTextViewer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
package/esm/vue.js CHANGED
@@ -1,8 +1,8 @@
1
- import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-HK74e42L.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-C_f1o9RQ.js";
3
- import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController$1, r as isFileAccepted, t as UploadController } from "./UploadController-9fkYFVZM.js";
1
+ import { a as ASSET_VIEWERS, c as getSpreadsheetPage, d as createDocumentViewer, f as DEFAULT_VIEWER_MESSAGES, h as loadPdfJs, i as isMountedViewerKind, l as parseSpreadsheetText, m as resolveViewerMessages, n as AssetViewerMount, o as createSpreadsheetViewer, p as formatViewerMessage, r as getMountedViewerOptions, s as createTextViewer, t as MediaStreamPlayer, u as spreadsheetColumnIndex } from "./ui-siBYiNJZ.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-VNBTpvrG.js";
3
+ import { a as createProgressFetch, i as withProvidedOptions, n as createUploadController$1, r as isFileAccepted, t as UploadController } from "./UploadController-BYxiONcw.js";
4
4
  import { c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
5
- import { t as createUploadController } from "./BrowserUpload-C429CcUi.js";
5
+ import { t as createUploadController } from "./BrowserUpload-C4YF17a3.js";
6
6
  import { computed, defineComponent, h, inject, onBeforeUnmount, onMounted, onScopeDispose, provide, ref, shallowRef, toValue, watch, watchEffect } from "vue";
7
7
  // src/viewers/Vue.ts
8
8
  const optional$1 = (type) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "calmlens",
3
- "version": "0.37.1",
3
+ "version": "0.38.1",
4
4
  "description": "Official CalmLens SDK for JavaScript and TypeScript: content moderation, asset storage and CDN delivery.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://calmlens.com/docs/sdk/javascript",