calmlens 0.25.0 → 0.27.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 (95) hide show
  1. package/README.md +15 -15
  2. package/bin/calmlens.js +2383 -677
  3. package/cjs/{BrowserUpload-AO2-2U5Z.js → BrowserUpload-CTqIjCV5.js} +1 -1
  4. package/{esm/BrowserUpload-D2lemMIU.d.ts → cjs/BrowserUpload-D4sEmd0X.d.ts} +2 -2
  5. package/{esm/CalmLensAppClient-Dt0t9Bk6.d.ts → cjs/CalmLensAppClient-CCeFnKX8.d.ts} +5 -11
  6. package/cjs/{CalmLensAppClient-nv6qwja0.js → CalmLensAppClient-CZm-9g22.js} +23 -16
  7. package/cjs/{CalmLensOptionKeys-BvCac9NO.js → CalmLensOptionKeys-C1w3SqmL.js} +165 -95
  8. package/cjs/CalmLensServerClient-B7PfocET.d.ts +346 -0
  9. package/cjs/{CalmLensServerClient-B60kCBCR.js → CalmLensServerClient-ucq3ITjd.js} +281 -315
  10. package/cjs/{CalmLensTypes-BhR7LFDu.d.ts → CalmLensTypes-HUERg5hI.d.ts} +142 -155
  11. package/cjs/{Classification-CxRedzgH-C9qlYW_J.d.ts → Classification-CMM2tZpJ-IdIh63n0.d.ts} +6 -7
  12. package/cjs/{Core-Cw4IxFUq.js → Core-D-1KCqT7.js} +39 -16
  13. package/cjs/{Core-DSMxC2GL.d.ts → Core-DXAs8mcx.d.ts} +10 -3
  14. package/{esm/ModerationContextLimits-Bqr0duav.js → cjs/ModerationContextLimits-BcYKgU2X.js} +859 -44
  15. package/cjs/ReactUpload-BTciTpwB.d.ts +27 -0
  16. package/cjs/{ReactUpload--oDFltw2.js → ReactUpload-BymgWiC8.js} +38 -2
  17. package/cjs/{TestTriggers-CiFcTHX3-BmfH4J3f.js → TestTriggers-Cvi7e2KA-DcT1pc_W.js} +91 -22
  18. package/{esm/TestTriggers-BJ4B-MXR-D1tGifPU.d.ts → cjs/TestTriggers-Dnukm-jm-DoEB7jJc.d.ts} +1 -1
  19. package/cjs/{UploadController-ObdgTaBl.js → UploadController-C8GPbDKI.js} +16 -3
  20. package/{esm/WebhookPayload-DLGGOGW6.d.ts → cjs/WebhookPayload-mUmOFH55.d.ts} +152 -9
  21. package/cjs/app.d.ts +6 -6
  22. package/cjs/app.js +20 -2
  23. package/cjs/elements.d.ts +5 -5
  24. package/cjs/elements.js +105 -68
  25. package/cjs/{index-AAWuerkU.d.ts → index-Ck7x1YjM.d.ts} +3 -3
  26. package/cjs/index.d.ts +5 -5
  27. package/cjs/index.js +19 -1
  28. package/cjs/react-native.d.ts +3 -3
  29. package/cjs/react-native.js +7 -5
  30. package/cjs/react.d.ts +5 -4
  31. package/cjs/react.js +11 -15
  32. package/cjs/server.d.ts +6 -6
  33. package/cjs/server.js +20 -2
  34. package/cjs/test-inputs.d.ts +1 -1
  35. package/cjs/test-inputs.js +13 -13
  36. package/cjs/testing.d.ts +18 -21
  37. package/cjs/testing.js +99 -147
  38. package/cjs/{ui-CcuGKTcL.d.ts → ui-BfJNO3c6.d.ts} +2 -2
  39. package/cjs/{ui-CA16jyfZ.js → ui-CW8BqtZk.js} +7 -5
  40. package/cjs/ui.d.ts +3 -3
  41. package/cjs/ui.js +4 -3
  42. package/cjs/vue.d.ts +15 -8
  43. package/cjs/vue.js +30 -17
  44. package/esm/{BrowserUpload-Co4T6uGk.js → BrowserUpload-C01iLeOs.js} +1 -1
  45. package/{cjs/BrowserUpload-D2lemMIU.d.ts → esm/BrowserUpload-D4sEmd0X.d.ts} +2 -2
  46. package/{cjs/CalmLensAppClient-Dt0t9Bk6.d.ts → esm/CalmLensAppClient-CCeFnKX8.d.ts} +5 -11
  47. package/esm/{CalmLensAppClient-BRzy4dwn.js → CalmLensAppClient-CgDogQQC.js} +23 -16
  48. package/esm/{CalmLensOptionKeys-bE3rb5PN.js → CalmLensOptionKeys-CEwNbpEz.js} +160 -96
  49. package/esm/CalmLensServerClient-B7PfocET.d.ts +346 -0
  50. package/esm/{CalmLensServerClient-_PRi90wI.js → CalmLensServerClient-TT6zrAG5.js} +281 -315
  51. package/esm/{CalmLensTypes-BhR7LFDu.d.ts → CalmLensTypes-HUERg5hI.d.ts} +142 -155
  52. package/esm/{Classification-CxRedzgH-C9qlYW_J.d.ts → Classification-CMM2tZpJ-IdIh63n0.d.ts} +6 -7
  53. package/esm/{Core-CtbYmeXG.js → Core-CP6NaqJz.js} +39 -16
  54. package/esm/{Core-DSMxC2GL.d.ts → Core-DXAs8mcx.d.ts} +10 -3
  55. package/{cjs/ModerationContextLimits-Cn9RvnZH.js → esm/ModerationContextLimits-BmV8QD32.js} +476 -301
  56. package/esm/{ReactUpload-B5itHBSF.js → ReactUpload-B72Oq3qE.js} +34 -4
  57. package/esm/ReactUpload-BTciTpwB.d.ts +27 -0
  58. package/esm/{TestTriggers-CiFcTHX3-BK2-sgOC.js → TestTriggers-Cvi7e2KA-BA83CRJb.js} +87 -23
  59. package/{cjs/TestTriggers-BJ4B-MXR-D1tGifPU.d.ts → esm/TestTriggers-Dnukm-jm-DoEB7jJc.d.ts} +1 -1
  60. package/esm/{UploadController-C7fL3Iz9.js → UploadController-Q7xTqh5w.js} +11 -4
  61. package/{cjs/WebhookPayload-DLGGOGW6.d.ts → esm/WebhookPayload-mUmOFH55.d.ts} +152 -9
  62. package/esm/app.d.ts +6 -6
  63. package/esm/app.js +3 -3
  64. package/esm/elements.d.ts +5 -5
  65. package/esm/elements.js +105 -69
  66. package/esm/{index-AAWuerkU.d.ts → index-Ck7x1YjM.d.ts} +3 -3
  67. package/esm/index.d.ts +5 -5
  68. package/esm/index.js +1 -1
  69. package/esm/react-native.d.ts +3 -3
  70. package/esm/react-native.js +6 -6
  71. package/esm/react.d.ts +5 -4
  72. package/esm/react.js +10 -16
  73. package/esm/server.d.ts +6 -6
  74. package/esm/server.js +3 -3
  75. package/esm/styles.css +37 -14
  76. package/esm/svelte/CalmLensAsset.svelte +1 -1
  77. package/esm/svelte/CalmLensUploader.svelte +17 -17
  78. package/esm/svelte/context.js +21 -0
  79. package/esm/svelte/index.d.ts +12 -0
  80. package/esm/svelte/index.js +1 -0
  81. package/esm/test-inputs.d.ts +1 -1
  82. package/esm/test-inputs.js +1 -1
  83. package/esm/testing.d.ts +18 -21
  84. package/esm/testing.js +93 -141
  85. package/esm/{ui-B98AucZA.js → ui-BBDJJkFL.js} +7 -5
  86. package/esm/{ui-CcuGKTcL.d.ts → ui-BfJNO3c6.d.ts} +2 -2
  87. package/esm/ui.d.ts +3 -3
  88. package/esm/ui.js +4 -4
  89. package/esm/vue.d.ts +15 -8
  90. package/esm/vue.js +30 -19
  91. package/package.json +16 -6
  92. package/cjs/CalmLensServerClient-7XjQaeKu.d.ts +0 -353
  93. package/cjs/ReactUpload-CW4NzAsh.d.ts +0 -17
  94. package/esm/CalmLensServerClient-7XjQaeKu.d.ts +0 -353
  95. package/esm/ReactUpload-CW4NzAsh.d.ts +0 -17
@@ -1,6 +1,35 @@
1
- import { n as createUploadController } from "./UploadController-C7fL3Iz9.js";
2
- import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
1
+ import { i as withProvidedOptions, n as createUploadController } from "./UploadController-Q7xTqh5w.js";
2
+ import { createContext, createElement, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
3
3
  // src/ui/ReactUpload.ts
4
+ const CalmLensContext = createContext(void 0);
5
+ /**
6
+ * Gives every `CalmLensUploader` and `useCalmLensUpload` beneath it these upload options, such as
7
+ * `uploadPresetId` and `tokenUrl`, so they needn't be passed to each one. An option a component
8
+ * sets itself wins. A provider inside another adds to the outer one's options.
9
+ */
10
+ function CalmLensProvider({ children, ...options }) {
11
+ const outer = useContext(CalmLensContext);
12
+ const { uploadPresetId, token, tokenUrl, baseUrl, createClient, upload, checkStatus } = options;
13
+ const value = useMemo(() => withProvidedOptions(outer, {
14
+ uploadPresetId,
15
+ token,
16
+ tokenUrl,
17
+ baseUrl,
18
+ createClient,
19
+ upload,
20
+ checkStatus
21
+ }), [
22
+ outer,
23
+ uploadPresetId,
24
+ token,
25
+ tokenUrl,
26
+ baseUrl,
27
+ createClient,
28
+ upload,
29
+ checkStatus
30
+ ]);
31
+ return createElement(CalmLensContext.Provider, { value }, children);
32
+ }
4
33
  /** Re-renders with a controller's snapshot. */
5
34
  const useUploadSnapshot = (controller) => {
6
35
  const snapshot = useSyncExternalStore(controller.subscribe, controller.getSnapshot, controller.getSnapshot);
@@ -16,7 +45,8 @@ const useUploadSnapshot = (controller) => {
16
45
  }), [snapshot, controller]);
17
46
  };
18
47
  /** A controller this component owns: it takes the latest options and cancels on unmount. */
19
- const useOwnController = (options, active = true) => {
48
+ const useOwnController = (own, active = true) => {
49
+ const options = withProvidedOptions(useContext(CalmLensContext), own);
20
50
  const [controller] = useState(() => createUploadController(options));
21
51
  if (active) controller.setOptions(options);
22
52
  const pendingClear = useRef(void 0);
@@ -34,4 +64,4 @@ const useOwnController = (options, active = true) => {
34
64
  * the component unmounts are cancelled.
35
65
  */
36
66
  const useCalmLensUpload = (options) => useUploadSnapshot(useOwnController(options));
37
- export { useOwnController as n, useUploadSnapshot as r, useCalmLensUpload as t };
67
+ export { useUploadSnapshot as i, useCalmLensUpload as n, useOwnController as r, CalmLensProvider as t };
@@ -0,0 +1,27 @@
1
+ import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-DXAs8mcx.js";
2
+ import { ReactNode } from "react";
3
+ type CalmLensProviderProps<F extends UploadFile = File> = CalmLensProvidedOptions<F> & {
4
+ children?: ReactNode;
5
+ };
6
+ /**
7
+ * Gives every `CalmLensUploader` and `useCalmLensUpload` beneath it these upload options, such as
8
+ * `uploadPresetId` and `tokenUrl`, so they needn't be passed to each one. An option a component
9
+ * sets itself wins. A provider inside another adds to the outer one's options.
10
+ */
11
+ declare function CalmLensProvider<F extends UploadFile = File>({ children, ...options }: CalmLensProviderProps<F>): import("react").FunctionComponentElement<import("react").ProviderProps<CalmLensProvidedOptions<any> | undefined>>;
12
+ interface UseCalmLensUploadResult<F extends UploadFile = UploadFile> extends UploadSnapshot<F> {
13
+ controller: UploadController<F>;
14
+ addFiles: UploadController<F>["addFiles"];
15
+ retry: UploadController<F>["retry"];
16
+ cancel: UploadController<F>["cancel"];
17
+ remove: UploadController<F>["remove"];
18
+ clear: UploadController<F>["clear"];
19
+ start: UploadController<F>["start"];
20
+ }
21
+ /**
22
+ * Uploads files through an upload preset and re-renders as each one uploads and is checked. Use
23
+ * it to build your own upload UI; `CalmLensUploader` is built on it. Uploads still running when
24
+ * the component unmounts are cancelled.
25
+ */
26
+ declare const useCalmLensUpload: <F extends UploadFile = UploadFile>(options: UploadControllerOptions<F>) => UseCalmLensUploadResult<F>;
27
+ export { useCalmLensUpload as i, CalmLensProviderProps as n, UseCalmLensUploadResult as r, CalmLensProvider as t };
@@ -1,5 +1,6 @@
1
1
  import { r as timingSafeEqual, t as hmacSha256Hex } from "./CryptoUtils-B_x8lMIx-DhuWGzqn.js";
2
2
  import * as z from "zod";
3
+ import { globalRegistry } from "zod";
3
4
  // src/contract/ModerationCategories-CHFRoeWV.js
4
5
  const CLASSIFICATION_CATEGORIES = [
5
6
  "sexual",
@@ -11,7 +12,77 @@ const CLASSIFICATION_CATEGORIES = [
11
12
  "personal-information",
12
13
  "profanity"
13
14
  ];
14
- // src/contract/Jurisdiction-CtB_d_2M.js
15
+ // src/contract/LazySchema-D_3-dV1e.js
16
+ const registryMap = globalRegistry._map;
17
+ /**
18
+ * A schema built the first time anything reads it, rather than when its module loads. Building
19
+ * Zod schemas costs a new isolate CPU before its first request, so a module whose schemas most
20
+ * requests never use (support tickets, compliance cases, appeals…) builds them only when one does.
21
+ *
22
+ * The returned proxy stands for the schema: reading, calling or composing it (`.parse`, `.extend`,
23
+ * embedding it in another schema) builds the schema and forwards to it, with the schema as the
24
+ * receiver, so its methods see the real instance. Its metadata (`.meta()`, `.describe()`, zod-meta's
25
+ * stores) is registered under the proxy too, for the code that looks schemas up by identity (JSON
26
+ * Schema generation, where the proxy is embedded in another schema).
27
+ *
28
+ * Calling it has no side effects (the annotation tells bundlers), so a bundle drops the lazy
29
+ * schemas it never uses, as it drops plain Zod schemas.
30
+ */
31
+ const lazySchema = /* @__NO_SIDE_EFFECTS__ */ (build) => {
32
+ let schema;
33
+ const real = () => {
34
+ if (!schema) {
35
+ const built = build();
36
+ schema = built;
37
+ const meta = registryMap.get(built);
38
+ if (meta !== void 0) registryMap.set(proxy, meta);
39
+ const internals = built._zod;
40
+ const process = internals.processJSONSchema;
41
+ if (process) internals.processJSONSchema = (context, json, params) => {
42
+ const record = context.seen.get(proxy);
43
+ if (!record || context.seen.has(built)) return process(context, json, params);
44
+ context.seen.set(built, record);
45
+ try {
46
+ return process(context, json, params);
47
+ } finally {
48
+ if (context.seen.get(built) === record) context.seen.delete(built);
49
+ }
50
+ };
51
+ }
52
+ return schema;
53
+ };
54
+ const proxy = new Proxy({}, {
55
+ get(_, key) {
56
+ const target = real();
57
+ return Reflect.get(target, key, target);
58
+ },
59
+ set(_, key, value) {
60
+ const target = real();
61
+ return Reflect.set(target, key, value, target);
62
+ },
63
+ has(_, key) {
64
+ return Reflect.has(real(), key);
65
+ },
66
+ ownKeys() {
67
+ return Reflect.ownKeys(real());
68
+ },
69
+ getOwnPropertyDescriptor(_, key) {
70
+ const descriptor = Reflect.getOwnPropertyDescriptor(real(), key);
71
+ return descriptor && {
72
+ ...descriptor,
73
+ configurable: true
74
+ };
75
+ },
76
+ getPrototypeOf() {
77
+ return Reflect.getPrototypeOf(real());
78
+ },
79
+ defineProperty(_, key, descriptor) {
80
+ return Reflect.defineProperty(real(), key, descriptor);
81
+ }
82
+ });
83
+ return proxy;
84
+ };
85
+ // src/contract/Jurisdiction-CQN8qnzX.js
15
86
  /**
16
87
  * Jurisdictions with legal rules always apply to every project. An optional jurisdiction is a
17
88
  * product standard rather than a legal floor: every project serves it unless it opts out.
@@ -58,19 +129,12 @@ const JURISDICTIONS = {
58
129
  optional: false
59
130
  }
60
131
  };
61
- const JURISDICTION_SCHEMA = z.enum(Object.keys(JURISDICTIONS));
132
+ const JURISDICTION_SCHEMA = /* @__PURE__ */ lazySchema(() => z.enum(Object.keys(JURISDICTIONS)));
62
133
  Object.keys(JURISDICTIONS).filter((code) => !JURISDICTIONS[code].optional);
63
- const OPTIONAL_JURISDICTIONS = Object.keys(JURISDICTIONS).filter((code) => JURISDICTIONS[code].optional);
64
- z.enum(OPTIONAL_JURISDICTIONS).array().refine((codes) => new Set(codes).size === codes.length, { message: "jurisdiction/duplicate" });
65
- JURISDICTION_SCHEMA.array().min(1).refine((regions) => regions.includes("global") && new Set(regions).size === regions.length, { message: "jurisdiction/global-required-or-duplicate" });
66
- const COUNTRIES = new Set("AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(" "));
67
- const VIEWER_REGION_SCHEMA = z.enum([...COUNTRIES]).describe("Viewer's ISO 3166-1 alpha-2 country, supplied by your integration; not the proxy server's country. EU is not a viewer country.");
134
+ Object.keys(JURISDICTIONS).filter((code) => JURISDICTIONS[code].optional);
135
+ new Set("AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(" "));
68
136
  new Set("AT BE BG HR CY CZ DK EE FI FR DE GR HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE".split(" "));
69
- z.object({
70
- region: VIEWER_REGION_SCHEMA.optional().describe("Viewer country. Defaults to the country of the connection reaching CalmLens; proxies should forward the viewer country explicitly."),
71
- ageConfirmed: z.boolean().optional().describe("Your platform's confirmation that the viewer passed its age check, so age-restricted content may be delivered. Defaults to false. Your platform confirms the viewer's age. Viewer claims are assertions from your application; CalmLens doesn't verify them. To restrict who can load an age-restricted asset, make it private and issue signed URLs only to viewers who passed your age check.")
72
- }).strict();
73
- // src/contract/TestRegionalActions-DUzwPr1a.js
137
+ // src/contract/TestRegionalActions-BhyWuU49.js
74
138
  /**
75
139
  * Marks English text in shared, backend and data modules that the portal shows, so the app's
76
140
  * message catalog (packages/app/vite/messageCatalog.ts) extracts it and the portal can translate it
@@ -1093,15 +1157,15 @@ function getModerationQualifierInfo(qualifier) {
1093
1157
  return MODERATION_QUALIFIER_INFO[qualifier];
1094
1158
  }
1095
1159
  /** Authenticated test inputs can add regional delivery restrictions without inventing evidence. */
1096
- const TEST_REGIONAL_ACTIONS_SCHEMA = z.array(z.object({
1160
+ const TEST_REGIONAL_ACTIONS_SCHEMA = /* @__PURE__ */ lazySchema(() => z.array(z.object({
1097
1161
  region: JURISDICTION_SCHEMA.exclude(["global"]),
1098
1162
  action: z.enum([
1099
1163
  "limit",
1100
1164
  "age-restrict",
1101
1165
  "block"
1102
1166
  ])
1103
- }).strict()).max(7).refine((entries) => new Set(entries.map((entry) => entry.region)).size === entries.length, "Choose each region once");
1104
- // src/contract/TestTriggers-CiFcTHX3.js
1167
+ }).strict()).max(7).refine((entries) => new Set(entries.map((entry) => entry.region)).size === entries.length, "Choose each region once"));
1168
+ // src/contract/TestTriggers-Cvi7e2KA.js
1105
1169
  /**
1106
1170
  * The visual encoding of test images (shared by images and video frames), independent of what the
1107
1171
  * bytes mean. An odd N×N grid of square cells fills the image. Its outer ring alternates black and
@@ -1574,21 +1638,21 @@ const detectionShape = {
1574
1638
  const fitsImage = ({ box: [left, top, width, height] }) => left + width <= 1e4 && top + height <= 1e4;
1575
1639
  const BOX_MESSAGE = msg("A box must lie inside the image: left + width and top + height are at most 10000.");
1576
1640
  const ageYears = z.number().int().min(0).max(120);
1577
- const TEST_DETECTED_PERSON_SCHEMA = z.object(detectionShape).strict().refine(fitsImage, BOX_MESSAGE);
1578
- const TEST_DETECTED_FACE_SCHEMA = z.object({
1641
+ const TEST_DETECTED_PERSON_SCHEMA = /* @__PURE__ */ lazySchema(() => z.object(detectionShape).strict().refine(fitsImage, BOX_MESSAGE));
1642
+ const TEST_DETECTED_FACE_SCHEMA = /* @__PURE__ */ lazySchema(() => z.object({
1579
1643
  ...detectionShape,
1580
1644
  age: z.union([z.enum(["adult", "minor"]), z.object({
1581
1645
  low: ageYears,
1582
1646
  high: ageYears
1583
1647
  }).strict().refine(({ low, high }) => low <= high, msg("An age range's low must not be above its high."))]).optional()
1584
- }).strict().refine(fitsImage, BOX_MESSAGE);
1648
+ }).strict().refine(fitsImage, BOX_MESSAGE));
1585
1649
  /** Person and face detection results a test image reports instead of running detection. */
1586
- const TEST_DETECTIONS_SCHEMA = z.object({
1650
+ const TEST_DETECTIONS_SCHEMA = /* @__PURE__ */ lazySchema(() => z.object({
1587
1651
  people: z.union([z.array(TEST_DETECTED_PERSON_SCHEMA).max(32), z.literal("unavailable")]).optional(),
1588
1652
  faces: z.union([z.array(TEST_DETECTED_FACE_SCHEMA).max(32), z.literal("unavailable")]).optional()
1589
- }).strict();
1653
+ }).strict());
1590
1654
  /** Each row is one qualifying instance. Unselected qualifiers are explicitly absent. */
1591
- const TEST_INPUT_SCHEMA = z.object({
1655
+ const TEST_INPUT_SCHEMA = /* @__PURE__ */ lazySchema(() => z.object({
1592
1656
  regionalActions: TEST_REGIONAL_ACTIONS_SCHEMA.optional(),
1593
1657
  unassessedCategories: z.array(z.enum(CLASSIFICATION_CATEGORIES)).max(CLASSIFICATION_CATEGORIES.length).optional(),
1594
1658
  instances: z.array(z.object({
@@ -1618,7 +1682,7 @@ const TEST_INPUT_SCHEMA = z.object({
1618
1682
  code: "custom",
1619
1683
  message: msg("An unassessed category cannot also have assessed instances.")
1620
1684
  });
1621
- });
1685
+ }));
1622
1686
  const TEST_INPUT_PRESETS = {
1623
1687
  clean: { instances: [] },
1624
1688
  limited: { instances: [{
@@ -1894,4 +1958,4 @@ async function detectTestImage(image, key, { whole = true } = {}) {
1894
1958
  if (!scenario || !whole) return scenario;
1895
1959
  return matchesTestImageGrid(image, grid, paintTestImageGrid(data.subarray(0, 18 + length), testImagePalette(scenario))) ? scenario : void 0;
1896
1960
  }
1897
- export { TEST_INPUT_KEY_PATTERN as a, detectTestTrigger as c, getTestInputTag as d, paintTestImage as f, TEST_FACE_AGE_PRESETS as i, generateTestTextCode as l, CLASSIFICATION_CATEGORIES as m, TEST_DETECTION_BOX_MAX as n, TEST_INPUT_PRESETS as o, testInputForSignal as p, TEST_FACE_AGE_MAX as r, detectTestImage as s, TEST_DETECTIONS_MAX as t, getImageTestCategories as u };
1961
+ export { TEST_INPUT_KEY_PATTERN as a, detectTestTrigger as c, getTestInputTag as d, paintTestImage as f, CLASSIFICATION_CATEGORIES as h, TEST_FACE_AGE_PRESETS as i, generateTestTextCode as l, lazySchema as m, TEST_DETECTION_BOX_MAX as n, TEST_INPUT_PRESETS as o, testInputForSignal as p, TEST_FACE_AGE_MAX as r, detectTestImage as s, TEST_DETECTIONS_MAX as t, getImageTestCategories as u };
@@ -1,4 +1,4 @@
1
- import { r as ClassificationCategory } from "./Classification-CxRedzgH-C9qlYW_J.js";
1
+ import { r as ClassificationCategory } from "./Classification-CMM2tZpJ-IdIh63n0.js";
2
2
  import * as z from "zod";
3
3
  interface RgbaImage {
4
4
  width: number;
@@ -1,5 +1,5 @@
1
- import { R as CalmLensError, z as SDK_ERROR_CODES } from "./ModerationContextLimits-Bqr0duav.js";
2
- import { t as CalmLensAppClient } from "./CalmLensAppClient-BRzy4dwn.js";
1
+ import { Y as CalmLensError, ot as SDK_ERROR_CODES } from "./ModerationContextLimits-BmV8QD32.js";
2
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-CgDogQQC.js";
3
3
  // src/contract/PlaceholderHashDecode.js
4
4
  /**
5
5
  * Decodes a ThumbHash to an RGBA image. RGB is not be premultiplied by A.
@@ -319,7 +319,7 @@ const checkedCustomUpload = (id, status) => ({
319
319
  */
320
320
  const checkedPresetUpload = ({ id, classification }) => ({
321
321
  id,
322
- status: classification.moderation?.status,
322
+ status: classification.moderation ? classification.moderation.decision ?? "pending" : void 0,
323
323
  settled: classification.status === "completed" || classification.status === "failed",
324
324
  failed: classification.status === "failed"
325
325
  });
@@ -618,4 +618,11 @@ var UploadController = class {
618
618
  }
619
619
  };
620
620
  const createUploadController = (options) => new UploadController(options);
621
- export { placeholderHashToDataURL as a, createProgressFetch as i, createUploadController as n, isFileAccepted as r, UploadController as t };
621
+ /** `options` over what a provider gives: an option an uploader sets (not `undefined`) wins. */
622
+ const withProvidedOptions = (provided, options) => {
623
+ if (!provided) return options;
624
+ const merged = { ...provided };
625
+ for (const [key, value] of Object.entries(options)) if (value !== void 0) merged[key] = value;
626
+ return merged;
627
+ };
628
+ export { createProgressFetch as a, withProvidedOptions as i, createUploadController as n, placeholderHashToDataURL as o, isFileAccepted as r, UploadController as t };
@@ -1,4 +1,4 @@
1
- import { gn as TypedEvent, hn as EventAsset, mn as Actor } from "./CalmLensTypes-BhR7LFDu.js";
1
+ import { cn as EventAsset, ln as TypedEvent, sn as Actor } from "./CalmLensTypes-HUERg5hI.js";
2
2
  import * as zod from "zod";
3
3
  /** Error codes the CalmLens API documents, by name. */
4
4
  declare const API_ERROR_CODES: {
@@ -67,9 +67,6 @@ declare const API_ERROR_CODES: {
67
67
  readonly ASSET_NOT_RETRYABLE: "asset/not-retryable";
68
68
  readonly ASSET_CONTENT_UNAVAILABLE: "asset/content-unavailable";
69
69
  readonly ASSET_CONTENT_PURGED: "asset/content-purged";
70
- readonly ASSET_NOT_DECIDED: "asset/not-decided";
71
- readonly ASSET_POLICY_CHANGED: "asset/policy-changed";
72
- readonly ASSET_REVIEWED: "asset/reviewed";
73
70
  readonly SUPPORT_TICKET_NOT_FOUND: "support-ticket/not-found";
74
71
  readonly DUPLICATE_EXTERNAL_ID: "asset/duplicate-external-id";
75
72
  readonly FOLDER_NOT_FOUND: "folder/not-found";
@@ -218,9 +215,6 @@ declare const CALMLENS_ERROR_CODES: {
218
215
  readonly ASSET_NOT_RETRYABLE: "asset/not-retryable";
219
216
  readonly ASSET_CONTENT_UNAVAILABLE: "asset/content-unavailable";
220
217
  readonly ASSET_CONTENT_PURGED: "asset/content-purged";
221
- readonly ASSET_NOT_DECIDED: "asset/not-decided";
222
- readonly ASSET_POLICY_CHANGED: "asset/policy-changed";
223
- readonly ASSET_REVIEWED: "asset/reviewed";
224
218
  readonly SUPPORT_TICKET_NOT_FOUND: "support-ticket/not-found";
225
219
  readonly DUPLICATE_EXTERNAL_ID: "asset/duplicate-external-id";
226
220
  readonly FOLDER_NOT_FOUND: "folder/not-found";
@@ -312,7 +306,14 @@ interface CalmLensErrorOptions {
312
306
  headers?: Headers;
313
307
  /** Seconds to wait before retrying, from the `Retry-After` response header. */
314
308
  retryAfter?: number;
309
+ /** The response body as text, cut to its first 4 KiB, for API errors. */
310
+ body?: string;
315
311
  }
312
+ /**
313
+ * What went wrong, from the most general: every kind is also its parent kind (`not-found` is an
314
+ * `api` error, `configuration` an `invalid-argument` error). Each has its own error class.
315
+ */
316
+ type CalmLensErrorKind = "error" | "api" | "bad-request" | "authentication" | "permission-denied" | "not-found" | "conflict" | "payload-too-large" | "unprocessable-entity" | "rate-limit" | "server" | "connection" | "timeout" | "cancelled" | "invalid-argument" | "configuration" | "invalid-response" | "webhook-verification";
316
317
  /**
317
318
  * Every failure the SDK reports, whether the API returned an error or the request never
318
319
  * completed. Branch on `code`; `status`, `requestId`, `headers` and `retryAfter` describe the
@@ -322,6 +323,12 @@ interface CalmLensErrorOptions {
322
323
  * from any copy of the SDK, so they work when ESM and CommonJS builds are loaded side by side.
323
324
  */
324
325
  declare class CalmLensError extends Error {
326
+ /** The kind this class is for; each kind's class sets its own. */
327
+ static readonly kind: CalmLensErrorKind;
328
+ /** What went wrong: one of `CalmLensErrorKind`, also its ancestors' (see `isKind`). */
329
+ readonly kind: CalmLensErrorKind;
330
+ /** The response body as text, cut to its first 4 KiB, for an API error; a proxy's HTML stays visible. */
331
+ readonly body?: string;
325
332
  /** A stable identifier such as `asset/not-found` or `sdk/timeout`. */
326
333
  readonly code: CalmLensErrorCode | (string & {});
327
334
  /** The HTTP status, when the API responded. */
@@ -340,7 +347,15 @@ declare class CalmLensError extends Error {
340
347
  }, options?: CalmLensErrorOptions);
341
348
  /** True for any `CalmLensError`, including one created by another copy or build of the SDK. */
342
349
  static isCalmLensError(value: unknown): value is CalmLensError;
343
- static [Symbol.hasInstance](value: unknown): boolean;
350
+ /**
351
+ * `error instanceof CalmLensNotFoundError` (or any kind's class) is true for errors of that kind
352
+ * and its descendants, from any copy of the SDK.
353
+ */
354
+ static [Symbol.hasInstance](this: {
355
+ kind: CalmLensErrorKind;
356
+ }, value: unknown): boolean;
357
+ /** Whether this error is of `kind` or a kind beneath it, such as `api` for a `not-found` error. */
358
+ isKind(kind: CalmLensErrorKind): boolean;
344
359
  /**
345
360
  * Whether the SDK raised this error itself, with no HTTP response: before sending (an invalid
346
361
  * argument or option, or content it checks first, such as `upload/unsupported-type`), or because
@@ -358,6 +373,134 @@ declare class CalmLensError extends Error {
358
373
  */
359
374
  isRetryable(): boolean;
360
375
  }
376
+ /** The API, or a proxy in front of it, answered with a non-2xx status. */
377
+ declare class CalmLensApiError extends CalmLensError {
378
+ static readonly kind: CalmLensErrorKind;
379
+ }
380
+ /** HTTP 400: the request was invalid. */
381
+ declare class CalmLensBadRequestError extends CalmLensApiError {
382
+ static readonly kind: CalmLensErrorKind;
383
+ }
384
+ /** HTTP 401: the API key is missing or invalid. */
385
+ declare class CalmLensAuthenticationError extends CalmLensApiError {
386
+ static readonly kind: CalmLensErrorKind;
387
+ }
388
+ /** HTTP 403: the API key lacks a grant, or the viewer can't see the asset. */
389
+ declare class CalmLensPermissionDeniedError extends CalmLensApiError {
390
+ static readonly kind: CalmLensErrorKind;
391
+ }
392
+ /** HTTP 404: the resource doesn't exist or isn't visible to the API key. */
393
+ declare class CalmLensNotFoundError extends CalmLensApiError {
394
+ static readonly kind: CalmLensErrorKind;
395
+ }
396
+ /** HTTP 409: the request conflicts with the resource's state, such as a changed revision. */
397
+ declare class CalmLensConflictError extends CalmLensApiError {
398
+ static readonly kind: CalmLensErrorKind;
399
+ }
400
+ /** HTTP 413: the content is over a size limit. */
401
+ declare class CalmLensPayloadTooLargeError extends CalmLensApiError {
402
+ static readonly kind: CalmLensErrorKind;
403
+ }
404
+ /** HTTP 422: the content can't be processed. */
405
+ declare class CalmLensUnprocessableEntityError extends CalmLensApiError {
406
+ static readonly kind: CalmLensErrorKind;
407
+ }
408
+ /** HTTP 429: too many requests; `retryAfter` says how long to wait. */
409
+ declare class CalmLensRateLimitError extends CalmLensApiError {
410
+ static readonly kind: CalmLensErrorKind;
411
+ }
412
+ /** HTTP 500 or above: the API failed. */
413
+ declare class CalmLensServerError extends CalmLensApiError {
414
+ static readonly kind: CalmLensErrorKind;
415
+ }
416
+ /** No complete response: the connection failed or was cut (`sdk/transport-error`). */
417
+ declare class CalmLensConnectionError extends CalmLensError {
418
+ static readonly kind: CalmLensErrorKind;
419
+ }
420
+ /** A request took longer than its timeout, or a wait reached its deadline (`sdk/timeout`). */
421
+ declare class CalmLensTimeoutError extends CalmLensError {
422
+ static readonly kind: CalmLensErrorKind;
423
+ }
424
+ /** The caller cancelled the call through a signal (`sdk/cancelled`). */
425
+ declare class CalmLensCancelledError extends CalmLensError {
426
+ static readonly kind: CalmLensErrorKind;
427
+ }
428
+ /** The SDK refused the call before sending anything. */
429
+ declare class CalmLensInvalidArgumentError extends CalmLensError {
430
+ static readonly kind: CalmLensErrorKind;
431
+ }
432
+ /** The client's configuration is invalid (`sdk/invalid-config`, `sdk/no-fetch`). */
433
+ declare class CalmLensConfigurationError extends CalmLensInvalidArgumentError {
434
+ static readonly kind: CalmLensErrorKind;
435
+ }
436
+ /** A response wasn't what the operation returns (`sdk/invalid-response`, `sdk/response-too-large`). */
437
+ declare class CalmLensInvalidResponseError extends CalmLensError {
438
+ static readonly kind: CalmLensErrorKind;
439
+ }
440
+ /** A webhook delivery couldn't be verified or parsed. */
441
+ declare class CalmLensWebhookVerificationError extends CalmLensError {
442
+ static readonly kind: CalmLensErrorKind;
443
+ }
444
+ /** The HTTP response a successful call's result came from. */
445
+ interface CalmLensLastResponse {
446
+ /** The HTTP status, such as 200 or 201. */
447
+ readonly status: number;
448
+ /** The `x-request-id` header: quote it when you contact support about this request. */
449
+ readonly requestId?: string;
450
+ /** The response headers. */
451
+ readonly headers: Headers;
452
+ /** The `Idempotency-Key` the request was sent with, if any. */
453
+ readonly idempotencyKey?: string;
454
+ }
455
+ /**
456
+ * A call's result with the response it came from as `lastResponse`. `lastResponse` is not
457
+ * enumerable, so `JSON.stringify`, spreading and `Object.keys` leave it out.
458
+ */
459
+ type CalmLensResponse<T> = T & {
460
+ readonly lastResponse: CalmLensLastResponse;
461
+ };
462
+ /** The most items `autoPagingToArray` collects; iterate with `for await` for more. */
463
+ declare const AUTO_PAGING_TO_ARRAY_MAX = 10000;
464
+ interface AutoPagingToArrayOptions {
465
+ /** How many items to collect at most, from 1 to 10,000. */
466
+ limit: number;
467
+ }
468
+ /** The fields every cursor-paginated list response has. */
469
+ interface CursorPageData<Item> {
470
+ items: Item[];
471
+ nextCursor: string | null;
472
+ hasMore: boolean;
473
+ }
474
+ /** Walking from a page: every item of it and of the pages after it. */
475
+ interface AutoPaging<Item> extends AsyncIterable<Item> {
476
+ /** Collects items from this page onward, fetching pages as needed, until `limit` are found. */
477
+ autoPagingToArray(options: AutoPagingToArrayOptions): Promise<Item[]>;
478
+ }
479
+ /**
480
+ * One page of a list, as the API returned it, with page navigation. `for await` over the page
481
+ * yields its items and every item after them, fetching pages as needed.
482
+ */
483
+ type ListPage<Page extends CursorPageData<unknown>> = CalmLensResponse<Page> & AutoPaging<Page["items"][number]> & {
484
+ /** Whether a page follows this one. */
485
+ hasNextPage(): boolean;
486
+ /** Fetches the page after this one; fails with `sdk/invalid-argument` when there is none. */
487
+ getNextPage(): ListPromise<Page>;
488
+ };
489
+ /**
490
+ * What `list` methods return: await it for the first page, or `for await` over it for every item
491
+ * across pages. The cursor keeps the position stable when items are inserted or deleted.
492
+ */
493
+ interface ListPromise<Page extends CursorPageData<unknown>> extends Promise<ListPage<Page>>, AutoPaging<Page["items"][number]> {}
494
+ /** Pixel dimensions of the representation served by the CDN. */
495
+ interface ServedAssetInfo {
496
+ readonly width: number;
497
+ readonly height: number;
498
+ }
499
+ interface CdnResponse extends Response {
500
+ /** Reads the served image dimensions from the headers without consuming the body. */
501
+ getAssetInfo(): ServedAssetInfo | undefined;
502
+ clone(): CdnResponse;
503
+ }
361
504
  /** A webhook body; narrow on `type` to get typed `facts`. */
362
505
  type WebhookEventPayload = TypedEvent;
363
506
  /** Consumer boundary: future event types, facts and fields must not break installed clients. */
@@ -409,4 +552,4 @@ interface ReceivedWebhookEventPayload {
409
552
  facts?: ReceivedFact;
410
553
  [key: string]: unknown;
411
554
  }
412
- export { CalmLensErrorCode as a, SdkErrorCode as c, CalmLensError as i, ApiErrorCode as l, WebhookEventPayload as n, CalmLensErrorDetails as o, CALMLENS_ERROR_CODES as r, CalmLensErrorOptions as s, ReceivedWebhookEventPayload as t };
555
+ export { CalmLensRateLimitError as A, CalmLensErrorKind as C, CalmLensNotFoundError as D, CalmLensInvalidResponseError as E, SdkErrorCode as F, ApiErrorCode as I, CalmLensTimeoutError as M, CalmLensUnprocessableEntityError as N, CalmLensPayloadTooLargeError as O, CalmLensWebhookVerificationError as P, CalmLensErrorDetails as S, CalmLensInvalidArgumentError as T, CalmLensConfigurationError as _, AUTO_PAGING_TO_ARRAY_MAX as a, CalmLensError as b, CalmLensLastResponse as c, ListPromise as d, CALMLENS_ERROR_CODES as f, CalmLensCancelledError as g, CalmLensBadRequestError as h, ServedAssetInfo as i, CalmLensServerError as j, CalmLensPermissionDeniedError as k, CalmLensResponse as l, CalmLensAuthenticationError as m, WebhookEventPayload as n, AutoPaging as o, CalmLensApiError as p, CdnResponse as r, AutoPagingToArrayOptions as s, ReceivedWebhookEventPayload as t, ListPage as u, CalmLensConflictError as v, CalmLensErrorOptions as w, CalmLensErrorCode as x, CalmLensConnectionError as y };
package/esm/app.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-CxRedzgH-C9qlYW_J.js";
2
- import { $ as GetAssetInfoOptions, $n as MetadataItem, $t as UpgradePolicyOptions, A as CdnAssetReference, An as BoundingBox, At as MultipartUploadOptions, B as CreateMultipartUploadPartOptions, Bn as AssetSearchMatchField, Bt as SetPolicyAutomaticUpdatesOptions, C as AssetVisibility, Ct as ListHashListEntriesOptions, D as CalmLensAppClientOptions, Dn as PublicProjectSettings, Dt as ListUploadPresetsOptions, E as BatchAssetsResponse, En as ProjectSettingsResource, Et as ListPoliciesOptions, F as ClassifyTextOptions, Fn as ProcessingFeatureStage, Ft as RequestOptions, G as EnsureLensOptions, Gn as AssetHlsRendition, Gt as StreamingFeatureOptions, H as DecideAssetOptions, Ht as SignUploadTokenOptions, I as ConnectionOptions, In as ProcessingFeatures, It as ResetPolicyOptions, J as EnsureUploadPresetsOptions, Jn as AssetRenderedKind, Jt as UpdateFolderOptions, K as EnsureLensesOptions, Kn as AssetPreview, Kt as SubmitAssetOptions, L as CreateFolderOptions, Ln as Policy, Lt as RetrieveAssetOptions, M as CdnResource, Mn as DetectedPerson, Mt as PolicyIdOptions, N as CdnServeOptions, Nn as ProcessingFeatureId, Nt as PolicyPage, O as CalmLensServerClientOptions, On as UploadPreset, Ot as MoveAssetOptions, P as CdnTransform, Pn as ProcessingFeatureResults, Pt as RemoveAssetContentOptions, Q as FolderPage, Qn as FileMetadata, Qt as UpdateProjectSettingsOptions, R as CreateHashListOptions, Rn as CursorPage, Rt as RetryAssetOptions, S as AssetUploadStatus, Sn as EventType, St as ListFoldersOptions, T as BatchAssetsOptions, Tn as MetadataFieldsResource, Tt as ListLensesOptions, U as DeleteAssetOptions, Un as AssetInfo, Ut as SignedAssetUrl, V as CreatePolicyOptions, Vn as AssetSearchQuery, Vt as SignAssetUrlOptions, W as DeleteMetadataFieldOptions, Wn as AssetHls, Wt as SignedUploadToken, X as ExplainAssetOptions, Xn as AssetSafetyHoldReason, Xt as UpdateLensOptions, Y as EnsureUploadPresetsResponse, Yn as AssetSafetyHold, Yt as UpdateHashListOptions, Z as FolderIdOptions, Zn as ExtractedText, Zt as UpdatePolicyOptions, _ as AssetSearchResponse, _n as EventCategory, _t as LensPage, a as AssetChildrenPage, an as UploadedAsset, at as ImageTransformOptions, b as AssetType, bn as EventFacts, bt as ListAssetsOptions, c as AssetClassificationStatus, cn as WaitForAssetDecisionOptions, ct as IterateAssetsOptions, d as AssetContentRemovalReason, dn as AssetBatchOperation, dt as IterateHashListsOptions, en as UploadAssetPartOptions, er as ProcessingOptions, et as HashListEntryIdOptions, f as AssetContentStatus, fn as AssetTimelineSegment, ft as IterateLensesOptions, g as AssetPage, gn as TypedEvent, gt as LensIdOptions, h as AssetModerationStatus, hn as EventAsset, ht as Lens, i as AssetChecksums, in as UploadPresetSubmitAssetOptions, it as IdempotencyOptions, j as CdnAssetUrlOptions, jn as DetectedFace, jt as MultipartUploadPartOptions, k as CdnAssetLocation, kn as AgeRange, kt as MoveFolderOptions, l as AssetContent, ln as WebhookHeadersInput, lt as IterateFoldersOptions, m as AssetModerationDecision, mt as IterateUploadPresetsOptions, n as Asset, nn as UploadPresetIdOptions, nt as HashListIdOptions, o as AssetClassification, on as VerifyWebhookSignatureOptions, ot as IterateAssetChildrenOptions, p as AssetModeration, pn as GetEventsResponse, pt as IteratePoliciesOptions, q as EnsureMetadataFieldsOptions, qn as AssetRendered, qt as UpdateAssetOptions, r as AssetAvailability, rn as UploadPresetPage, rt as HashListPage, s as AssetClassificationFailureReason, sn as ViewerClaims, st as IterateAssetTimelineOptions, t as AddHashListEntryOptions, tn as UploadPresetDefinition, tt as HashListEntryPage, u as AssetContentOptions, un as WebhookPayloadInput, ut as IterateHashListEntriesOptions, v as AssetSearchResult, vn as EventFact, vt as ListAssetChildrenOptions, w as AssignPolicyOptions, wn as Folder, wt as ListHashListsOptions, x as AssetUpload, xn as EventSeverity, xt as ListEventsOptions, y as AssetTimelinePage, yn as EventFactValues, yt as ListAssetTimelineOptions, z as CreateLensOptions, zn as LensType, zt as SearchAssetsOptions } from "./CalmLensTypes-BhR7LFDu.js";
3
- import { t as CalmLensAppClient } from "./CalmLensAppClient-Dt0t9Bk6.js";
4
- import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-AAWuerkU.js";
5
- import { a as CalmLensErrorCode, c as SdkErrorCode, i as CalmLensError, l as ApiErrorCode, o as CalmLensErrorDetails, r as CALMLENS_ERROR_CODES, s as CalmLensErrorOptions, t as ReceivedWebhookEventPayload } from "./WebhookPayload-DLGGOGW6.js";
6
- export { type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensAppClient, type CalmLensAppClientOptions, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorOptions, type CalmLensServerClientOptions, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as EventsPage, type ExplainAssetOptions, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type IterateAssetChildrenOptions, type IterateAssetTimelineOptions, type IterateAssetsOptions, type IterateFoldersOptions, type IterateHashListEntriesOptions, type IterateHashListsOptions, type IterateLensesOptions, type IteratePoliciesOptions, type IterateUploadPresetsOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPoliciesOptions, type ListUploadPresetsOptions, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
1
+ import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-CMM2tZpJ-IdIh63n0.js";
2
+ import { $ as FolderPage, $t as VerifyWebhookSignatureOptions, A as CdnAssetLocation, An as Policy, At as RetrieveAssetOptions, B as CreateHashListOptions, Bn as AssetRendered, Bt as UpdateAssetOptions, C as AssetUploadStatus, Cn as BoundingBox, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureResults, Dt as RequestAttempt, E as BatchAssetsOptions, En as ProcessingFeatureId, Et as RemoveAssetContentOptions, F as CdnTransform, Ft as SignUploadTokenOptions, G as DeleteAssetOptions, Gn as FileMetadata, Gt as UpdateProjectSettingsOptions, H as CreateMultipartUploadPartOptions, Hn as AssetSafetyHold, Ht as UpdateHashListOptions, I as ClassifyTextOptions, In as AssetInfo, It as SignedAssetUrl, J as EnsureLensesOptions, Jt as UploadPresetDefinition, K as DeleteMetadataFieldOptions, Kn as MetadataItem, Kt as UpgradePolicyOptions, L as ClientRequestDefaults, Ln as AssetHls, Lt as SignedUploadToken, M as CdnAssetUrlOptions, Mn as LensType, Mt as SearchAssetsOptions, N as CdnResource, Nn as AssetSearchMatchField, Nt as SetPolicyAutomaticUpdatesOptions, O as CalmLensAppClientOptions, On as ProcessingFeatureStage, Ot as RequestOptions, P as CdnServeOptions, Pn as AssetSearchQuery, Pt as SignAssetUrlOptions, Q as FolderIdOptions, Qt as UploadedAsset, R as ConnectionOptions, Rn as AssetHlsRendition, Rt as StreamingFeatureOptions, S as AssetUpload, Sn as AgeRange, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as DetectedPerson, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetSafetyHoldReason, Ut as UpdateLensOptions, V as CreateLensOptions, Vn as AssetRenderedKind, Vt as UpdateFolderOptions, W as DecideAssetOptions, Wn as ExtractedText, Wt as UpdatePolicyOptions, X as EnsureUploadPresetsOptions, Xt as UploadPresetPage, Y as EnsureMetadataFieldsOptions, Yt as UploadPresetIdOptions, Z as EnsureUploadPresetsResponse, Zt as UploadPresetSubmitAssetOptions, _ as AssetPage, _n as Folder, _t as ListLensesOptions, a as AssetChecksums, an as AssetTimelineSegment, at as IdempotencyOptions, b as AssetTimelinePage, bn as PublicProjectSettings, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as EventAsset, ct as LensIdOptions, d as AssetContentOptions, dn as EventFact, dt as ListAssetTimelineOptions, en as ViewerClaims, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as EventFactValues, ft as ListAssetsOptions, g as AssetModerationStatus, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventType, ht as ListHashListEntriesOptions, i as AssetAvailability, in as AssetBatchOperation, it as HashListPage, j as CdnAssetReference, jn as CursorPage, jt as RetryAssetOptions, k as CalmLensServerClientOptions, kn as ProcessingFeatures, kt as ResetPolicyOptions, l as AssetClassificationStatus, ln as TypedEvent, lt as LensPage, m as AssetModeration, mn as EventSeverity, mt as ListFoldersOptions, n as AppInfo, nn as WebhookHeadersInput, nt as HashListEntryPage, o as AssetChildrenPage, on as GetEventsResponse, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventFacts, pt as ListEventsOptions, q as EnsureLensOptions, qn as ProcessingOptions, qt as UploadAssetPartOptions, r as Asset, rn as WebhookPayloadInput, rt as HashListIdOptions, s as AssetClassification, st as Lens, t as AddHashListEntryOptions, tn as WaitForAssetDecisionOptions, tt as HashListEntryIdOptions, u as AssetContent, un as EventCategory, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as MetadataFieldsResource, vt as ListPoliciesOptions, w as AssetVisibility, wn as DetectedFace, wt as PolicyIdOptions, x as AssetType, xn as UploadPreset, xt as MoveFolderOptions, y as AssetSearchResult, yn as ProjectSettingsResource, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zn as AssetPreview, zt as SubmitAssetOptions } from "./CalmLensTypes-HUERg5hI.js";
3
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-CCeFnKX8.js";
4
+ import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-Ck7x1YjM.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-mUmOFH55.js";
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 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 EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as 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, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, 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, selectModerationContextItems };
package/esm/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { L as CALMLENS_ERROR_CODES, P as SDK_VERSION, R as CalmLensError, i as CDN_RESOURCES, n as MODERATION_CONTEXT_USED_ITEMS, r as selectModerationContextItems, s as getAssetInfo, t as MODERATION_CONTEXT_USED_CHARACTERS, u as DEFAULT_CDN_BASE_URL } from "./ModerationContextLimits-Bqr0duav.js";
1
+ import { $ as CalmLensPayloadTooLargeError, G as CalmLensCancelledError, H as CalmLensApiError, I as AUTO_PAGING_TO_ARRAY_MAX, J as CalmLensConnectionError, K as CalmLensConfigurationError, N as SDK_VERSION, Q as CalmLensNotFoundError, U as CalmLensAuthenticationError, V as CALMLENS_ERROR_CODES, W as CalmLensBadRequestError, X as CalmLensInvalidArgumentError, Y as CalmLensError, Z as CalmLensInvalidResponseError, at as CalmLensWebhookVerificationError, et as CalmLensPermissionDeniedError, i as CDN_RESOURCES, it as CalmLensUnprocessableEntityError, n as MODERATION_CONTEXT_USED_ITEMS, nt as CalmLensServerError, q as CalmLensConflictError, r as selectModerationContextItems, rt as CalmLensTimeoutError, s as getAssetInfo, t as MODERATION_CONTEXT_USED_CHARACTERS, tt as CalmLensRateLimitError, u as DEFAULT_CDN_BASE_URL } from "./ModerationContextLimits-BmV8QD32.js";
2
2
  import "./index.js";
3
- import { t as CalmLensAppClient } from "./CalmLensAppClient-BRzy4dwn.js";
4
- export { CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensAppClient, CalmLensError, DEFAULT_CDN_BASE_URL, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, SDK_VERSION, getAssetInfo, selectModerationContextItems };
3
+ import { t as CalmLensAppClient } from "./CalmLensAppClient-CgDogQQC.js";
4
+ 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, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, SDK_VERSION, getAssetInfo, selectModerationContextItems };
package/esm/elements.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { r as AssetAvailability } from "./CalmLensTypes-BhR7LFDu.js";
2
- 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-DSMxC2GL.js";
3
- import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-D2lemMIU.js";
4
- 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-CcuGKTcL.js";
1
+ import { i as AssetAvailability } from "./CalmLensTypes-HUERg5hI.js";
2
+ import { $ as getAssetAspectRatio, 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 MediaPlayback, 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 AssetViewerKind, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as PdfAssetOptions, d as AssetDisplayOptions, dt as ViewerAsset, et as getAssetView, f as AssetEventHandlers, ft as ViewerOptions, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as pickAssetSource, j as CustomUploadResult, l as IconName, lt as SpreadsheetViewerOptions, m as UploaderDisplayOptions, mt as WebsiteViewerOptions, n as CalmLensTheme, nt as getPeakHeights, o as createProgressFetch, ot as DocumentViewerOptions, p as AssetProps, pt as ViewerTextOptions, q as AssetSession, r as resolveTheme, rt as getPlayedPercent, s as ICONS, st as ImageViewerOptions, t as CALMLENS_THEME, tt as getAssetViewKey, u as ASSET_FILE_ICON_SIZE, ut as TextViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-DXAs8mcx.js";
3
+ import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-D4sEmd0X.js";
4
+ 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-BfJNO3c6.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
@@ -186,4 +186,4 @@ declare global {
186
186
  "calmlens-timeupdate": CustomEvent<number>;
187
187
  }
188
188
  }
189
- 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 };
189
+ 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, 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, withProvidedOptions };