calmlens 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +15 -10
  2. package/bin/calmlens.js +1848 -679
  3. package/cjs/{BrowserUpload-C07aL9Vq.d.ts → BrowserUpload-BWjZ9ntu.d.ts} +2 -2
  4. package/cjs/{BrowserUpload-CjSHjx3C.js → BrowserUpload-Bwlib4Zc.js} +1 -1
  5. package/cjs/{CalmLensAppClient-DDLojj0P.d.ts → CalmLensAppClient-BaW3ddUR.d.ts} +13 -3
  6. package/cjs/{CalmLensAppClient-NaCxOVlM.js → CalmLensAppClient-DUYMo9PZ.js} +30 -10
  7. package/cjs/{CalmLensOptionKeys-p2QK687A.js → CalmLensOptionKeys-YvgV995V.js} +318 -374
  8. package/cjs/{CalmLensServerClient-BDzTthxE.js → CalmLensServerClient-3N-gdsxC.js} +346 -89
  9. package/cjs/CalmLensServerClient-BKzn8zmp.d.ts +353 -0
  10. package/cjs/{CalmLensTypes-COJbOuiv.d.ts → CalmLensTypes-BDKwThbO.d.ts} +26993 -27187
  11. package/cjs/{Classification-D3SkprrQ-CMnQKW13.d.ts → Classification-Q5zGpR8l-CEWjnE39.d.ts} +731 -607
  12. package/cjs/Core-C33pkBmf.d.ts +826 -0
  13. package/cjs/Core-Cm5Z1oJ9.js +1001 -0
  14. package/cjs/FileIcons-4qSX7DW2.d.ts +67 -0
  15. package/cjs/{ModerationContextLimits-2nIv7Zh3.js → ModerationContextLimits-ud1xpZRK.js} +727 -268
  16. package/cjs/{ReactUpload-BdTRCTGA.js → ReactUpload-DQ0BYISX.js} +1 -1
  17. package/cjs/{ReactUpload-CRJNPB5T.d.ts → ReactUpload-DhF8mm51.d.ts} +1 -1
  18. package/{esm/TestTriggers-D-fwfhEP-hlaP1oW2.d.ts → cjs/TestTriggers-D0pYHbkr-D5T0VdSn.d.ts} +146 -8
  19. package/cjs/{TestTriggers-DbhsNPdg-DjvVuc2h.js → TestTriggers-D29T_R0M-D6Bu-Mln.js} +355 -47
  20. package/cjs/{UploadController-MLVs97Zt.js → UploadController-l8fZM2qT.js} +34 -14
  21. package/{esm/WebhookPayload-DkukERKE.d.ts → cjs/WebhookPayload-Dt6DttS0.d.ts} +120 -86
  22. package/cjs/app.d.ts +6 -7
  23. package/cjs/app.js +4 -3
  24. package/cjs/elements.d.ts +123 -22
  25. package/cjs/elements.js +553 -156
  26. package/cjs/file-icons.d.ts +2 -67
  27. package/cjs/index-Bde1wjiw.d.ts +16 -0
  28. package/cjs/index.d.ts +5 -6
  29. package/cjs/index.js +3 -2
  30. package/cjs/react-native.d.ts +52 -11
  31. package/cjs/react-native.js +231 -99
  32. package/cjs/react.d.ts +42 -9
  33. package/cjs/react.js +381 -118
  34. package/cjs/server.d.ts +48 -7
  35. package/cjs/server.js +7 -3
  36. package/cjs/test-inputs.d.ts +2 -2
  37. package/cjs/test-inputs.js +13 -9
  38. package/cjs/testing.d.ts +29 -15
  39. package/cjs/testing.js +1722 -433
  40. package/cjs/ui-BRA4HQ8r.js +1359 -0
  41. package/cjs/ui-YQuvbidU.d.ts +139 -0
  42. package/cjs/ui.d.ts +3 -2
  43. package/cjs/ui.js +45 -22
  44. package/cjs/vue.d.ts +802 -199
  45. package/cjs/vue.js +359 -127
  46. package/esm/{BrowserUpload-C07aL9Vq.d.ts → BrowserUpload-BWjZ9ntu.d.ts} +2 -2
  47. package/esm/{BrowserUpload-CAVkRotw.js → BrowserUpload-GRZVB0G_.js} +1 -1
  48. package/esm/{CalmLensAppClient-PQ9VBvlW.js → CalmLensAppClient-B5QIJ6KS.js} +30 -10
  49. package/esm/{CalmLensAppClient-DDLojj0P.d.ts → CalmLensAppClient-BaW3ddUR.d.ts} +13 -3
  50. package/esm/{CalmLensOptionKeys-Do2mPP6w.js → CalmLensOptionKeys-BG7Qrh8-.js} +317 -367
  51. package/esm/CalmLensServerClient-BKzn8zmp.d.ts +353 -0
  52. package/esm/{CalmLensServerClient-C_H5aAsV.js → CalmLensServerClient-bRUAebi-.js} +323 -90
  53. package/esm/{CalmLensTypes-COJbOuiv.d.ts → CalmLensTypes-BDKwThbO.d.ts} +26993 -27187
  54. package/esm/{Classification-D3SkprrQ-CMnQKW13.d.ts → Classification-Q5zGpR8l-CEWjnE39.d.ts} +731 -607
  55. package/esm/Core-BvQe4moS.js +846 -0
  56. package/esm/Core-C33pkBmf.d.ts +826 -0
  57. package/esm/FileIcons-4qSX7DW2.d.ts +67 -0
  58. package/esm/{ModerationContextLimits-Chw-AzgL.js → ModerationContextLimits-CrxSnVZ3.js} +682 -253
  59. package/esm/{ReactUpload-CMmL0R5Q.js → ReactUpload-BMO8saxT.js} +1 -1
  60. package/esm/{ReactUpload-CRJNPB5T.d.ts → ReactUpload-DhF8mm51.d.ts} +1 -1
  61. package/{cjs/TestTriggers-D-fwfhEP-hlaP1oW2.d.ts → esm/TestTriggers-D0pYHbkr-D5T0VdSn.d.ts} +146 -8
  62. package/esm/{TestTriggers-DbhsNPdg-CUdrv8Nm.js → TestTriggers-D29T_R0M-Ztc74ucs.js} +332 -48
  63. package/esm/{UploadController-BJZghJpg.js → UploadController-DnJrWiE4.js} +34 -14
  64. package/{cjs/WebhookPayload-DkukERKE.d.ts → esm/WebhookPayload-Dt6DttS0.d.ts} +120 -86
  65. package/esm/app.d.ts +6 -7
  66. package/esm/app.js +3 -3
  67. package/esm/elements.d.ts +123 -22
  68. package/esm/elements.js +497 -128
  69. package/esm/file-icons.d.ts +2 -67
  70. package/esm/index-Bde1wjiw.d.ts +16 -0
  71. package/esm/index.d.ts +5 -6
  72. package/esm/index.js +1 -1
  73. package/esm/react-native.d.ts +52 -11
  74. package/esm/react-native.js +205 -75
  75. package/esm/react.d.ts +42 -9
  76. package/esm/react.js +327 -91
  77. package/esm/server.d.ts +48 -7
  78. package/esm/server.js +3 -3
  79. package/esm/styles.css +142 -22
  80. package/esm/svelte/AssetViewer.svelte +25 -0
  81. package/esm/svelte/CalmLensAsset.svelte +318 -0
  82. package/esm/svelte/CalmLensDocumentViewer.svelte +7 -0
  83. package/esm/svelte/CalmLensImageViewer.svelte +7 -0
  84. package/esm/svelte/CalmLensSpreadsheetViewer.svelte +7 -0
  85. package/esm/svelte/CalmLensTextViewer.svelte +7 -0
  86. package/esm/svelte/CalmLensWebsiteViewer.svelte +7 -0
  87. package/esm/svelte/index.d.ts +29 -6
  88. package/esm/svelte/index.js +7 -2
  89. package/esm/test-inputs.d.ts +2 -2
  90. package/esm/test-inputs.js +1 -1
  91. package/esm/testing.d.ts +29 -15
  92. package/esm/testing.js +1718 -429
  93. package/esm/ui-YQuvbidU.d.ts +139 -0
  94. package/esm/ui-heryDd6g.js +1258 -0
  95. package/esm/ui.d.ts +3 -2
  96. package/esm/ui.js +4 -3
  97. package/esm/vue.d.ts +802 -199
  98. package/esm/vue.js +308 -103
  99. package/package.json +4 -2
  100. package/cjs/CalmLensServerClient-C-jsjn8m.d.ts +0 -259
  101. package/cjs/ModerationContext-9lGm-Mna-CcmbRnOy.d.ts +0 -67
  102. package/cjs/index-DxbJ_Xaa.d.ts +0 -253
  103. package/cjs/ui-BSqPGKrZ.d.ts +0 -539
  104. package/cjs/ui-CX1z2pD9.js +0 -586
  105. package/esm/CalmLensServerClient-C-jsjn8m.d.ts +0 -259
  106. package/esm/ModerationContext-9lGm-Mna-CcmbRnOy.d.ts +0 -67
  107. package/esm/index-DxbJ_Xaa.d.ts +0 -253
  108. package/esm/svelte/CalmLensMedia.svelte +0 -134
  109. package/esm/ui-BSqPGKrZ.d.ts +0 -539
  110. package/esm/ui-CXH7xJpb.js +0 -461
@@ -1,4 +1,4 @@
1
- const require_UploadController = require("./UploadController-MLVs97Zt.js");
1
+ const require_UploadController = require("./UploadController-l8fZM2qT.js");
2
2
  let react = require("react");
3
3
  // src/ui/ReactUpload.ts
4
4
  /** Re-renders with a controller's snapshot. */
@@ -1,4 +1,4 @@
1
- import { F as UploadFile, L as UploadSnapshot, N as UploadController, P as UploadControllerOptions } from "./ui-BSqPGKrZ.js";
1
+ import { I as UploadSnapshot, M as UploadController, N as UploadControllerOptions, P as UploadFile } from "./Core-C33pkBmf.js";
2
2
  interface UseCalmLensUploadResult<F extends UploadFile = UploadFile> extends UploadSnapshot<F> {
3
3
  controller: UploadController<F>;
4
4
  addFiles: UploadController<F>["addFiles"];
@@ -1,4 +1,4 @@
1
- import { n as ClassificationCategory } from "./Classification-D3SkprrQ-CMnQKW13.js";
1
+ import { r as ClassificationCategory } from "./Classification-Q5zGpR8l-CEWjnE39.js";
2
2
  import * as z from "zod";
3
3
  interface RgbaImage {
4
4
  width: number;
@@ -11,6 +11,41 @@ declare const TEST_INPUT_KEY_PATTERN: RegExp;
11
11
  /** Category shortcuts are presets in the same instance-based format. */
12
12
  declare function testInputForSignal(signal: ClassificationTestSignal, kind?: "image" | "text"): TestInput;
13
13
  declare const getImageTestCategories: () => ClassificationTestSignal[];
14
+ /** Each detection list holds at most this many entries; 32 faces fit a test image. */
15
+ declare const TEST_DETECTIONS_MAX = 32;
16
+ /** Box values are integer basis points of the image width and height: 10000 is the full side. */
17
+ declare const TEST_DETECTION_BOX_MAX = 10000;
18
+ /** Age presets and the range a custom estimate may use. */
19
+ declare const TEST_FACE_AGE_PRESETS: {
20
+ readonly adult: {
21
+ readonly low: 25;
22
+ readonly high: 35;
23
+ };
24
+ readonly minor: {
25
+ readonly low: 12;
26
+ readonly high: 16;
27
+ };
28
+ };
29
+ declare const TEST_FACE_AGE_MAX = 120;
30
+ /** Person and face detection results a test image reports instead of running detection. */
31
+ declare const TEST_DETECTIONS_SCHEMA: z.ZodObject<{
32
+ people: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
33
+ box: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
34
+ confidence: z.ZodOptional<z.ZodNumber>;
35
+ }, z.core.$strict>>, z.ZodLiteral<"unavailable">]>>;
36
+ faces: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
37
+ box: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
38
+ confidence: z.ZodOptional<z.ZodNumber>;
39
+ age: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
40
+ adult: "adult";
41
+ minor: "minor";
42
+ }>, z.ZodObject<{
43
+ low: z.ZodNumber;
44
+ high: z.ZodNumber;
45
+ }, z.core.$strict>]>>;
46
+ }, z.core.$strict>>, z.ZodLiteral<"unavailable">]>>;
47
+ }, z.core.$strict>;
48
+ type TestDetections = z.infer<typeof TEST_DETECTIONS_SCHEMA>;
14
49
  /** Each row is one qualifying instance. Unselected qualifiers are explicitly absent. */
15
50
  declare const TEST_INPUT_SCHEMA: z.ZodObject<{
16
51
  regionalActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -157,6 +192,7 @@ declare const TEST_INPUT_SCHEMA: z.ZodObject<{
157
192
  "sexual-extreme": "sexual-extreme";
158
193
  "sexual-fictional": "sexual-fictional";
159
194
  "sexual-historical": "sexual-historical";
195
+ "sexual-incest": "sexual-incest";
160
196
  "sexual-intimate-image-abuse": "sexual-intimate-image-abuse";
161
197
  "sexual-minors": "sexual-minors";
162
198
  "sexual-non-consensual": "sexual-non-consensual";
@@ -166,6 +202,7 @@ declare const TEST_INPUT_SCHEMA: z.ZodObject<{
166
202
  "sexual-pornographic-media": "sexual-pornographic-media";
167
203
  "sexual-revealing-clothing": "sexual-revealing-clothing";
168
204
  "sexual-solicitation": "sexual-solicitation";
205
+ "sexual-strangulation": "sexual-strangulation";
169
206
  "sexual-suggestive": "sexual-suggestive";
170
207
  "sexual-support-prevention": "sexual-support-prevention";
171
208
  "sexual-text": "sexual-text";
@@ -195,6 +232,23 @@ declare const TEST_INPUT_SCHEMA: z.ZodObject<{
195
232
  "violence-wish": "violence-wish";
196
233
  }>>;
197
234
  }, z.core.$strict>>;
235
+ detections: z.ZodOptional<z.ZodObject<{
236
+ people: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
237
+ box: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
238
+ confidence: z.ZodOptional<z.ZodNumber>;
239
+ }, z.core.$strict>>, z.ZodLiteral<"unavailable">]>>;
240
+ faces: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
241
+ box: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
242
+ confidence: z.ZodOptional<z.ZodNumber>;
243
+ age: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
244
+ adult: "adult";
245
+ minor: "minor";
246
+ }>, z.ZodObject<{
247
+ low: z.ZodNumber;
248
+ high: z.ZodNumber;
249
+ }, z.core.$strict>]>>;
250
+ }, z.core.$strict>>, z.ZodLiteral<"unavailable">]>>;
251
+ }, z.core.$strict>>;
198
252
  }, z.core.$strict>;
199
253
  type TestInput = z.infer<typeof TEST_INPUT_SCHEMA>;
200
254
  declare const TEST_INPUT_PRESETS: {
@@ -247,21 +301,91 @@ declare const TEST_INPUT_PRESETS: {
247
301
  qualifiers: "harassment-threat"[];
248
302
  })[];
249
303
  };
304
+ oneFace: {
305
+ instances: never[];
306
+ detections: {
307
+ people: {
308
+ box: [number, number, number, number];
309
+ }[];
310
+ faces: {
311
+ box: [number, number, number, number];
312
+ }[];
313
+ };
314
+ };
315
+ noFace: {
316
+ instances: never[];
317
+ detections: {
318
+ people: never[];
319
+ faces: never[];
320
+ };
321
+ };
322
+ adultFace: {
323
+ instances: never[];
324
+ detections: {
325
+ people: {
326
+ box: [number, number, number, number];
327
+ }[];
328
+ faces: {
329
+ box: [number, number, number, number];
330
+ age: "adult";
331
+ }[];
332
+ };
333
+ };
334
+ minorFace: {
335
+ instances: never[];
336
+ detections: {
337
+ people: {
338
+ box: [number, number, number, number];
339
+ }[];
340
+ faces: {
341
+ box: [number, number, number, number];
342
+ age: "minor";
343
+ }[];
344
+ };
345
+ };
346
+ group: {
347
+ instances: never[];
348
+ detections: {
349
+ people: {
350
+ box: [number, number, number, number];
351
+ }[];
352
+ faces: {
353
+ box: [number, number, number, number];
354
+ }[];
355
+ };
356
+ };
250
357
  };
251
358
  declare function generateTestTextCode(scenario: TestInput | ClassificationTestSignal, key: string): Promise<string>;
359
+ /**
360
+ * The scenario a text declares when the whole text is one code signed with `key`; surrounding
361
+ * text, a second code or an altered code all return undefined, so the text is moderated as
362
+ * ordinary content.
363
+ */
252
364
  declare function detectTestTrigger(text: string, key: string): Promise<TestInput | undefined>;
253
365
  /**
254
- * The text code's signed bytes as a grid (TestImageGrid.ts): the scenario JSON's length (two
255
- * bytes, big-endian), the 16-byte tag, then the JSON. The reader rebuilds the text code, so images
256
- * and text share one verification.
366
+ * The text code's signed bytes as a grid (TestImageGrid.ts): the signed payload's length (two
367
+ * bytes, big-endian), the 16-byte tag, then the payload (the scenario JSON). The reader rebuilds
368
+ * the text code, so images and text share one verification.
257
369
  */
258
370
  declare function paintTestImage(scenario: TestInput | ClassificationTestSignal, key: string): Promise<{
259
371
  width: number;
260
372
  height: number;
261
373
  rgba: Uint8Array<ArrayBuffer>;
262
374
  }>;
263
- /** The test input a project's test image carries, also after video encoding and resizing. */
264
- declare function detectTestImage(image: RgbaImage, key: string): Promise<{
375
+ /**
376
+ * The test input an image declares when the whole image is one of the project's test images,
377
+ * also after lossy formats and resizing: the grid, optionally on a uniform border. Every pixel
378
+ * must match the grid repainted from the bytes it carries (TestImageGrid.ts,
379
+ * `matchesTestImageGrid`), so nothing else can be drawn on or around it.
380
+ */
381
+ declare function detectTestImage(image: RgbaImage, key: string,
382
+ /**
383
+ * `whole: false` only reads the grid, for a video frame: media moderation sees the frame anyway,
384
+ * so its findings can only add to that moderation.
385
+ */
386
+ { whole }?: {
387
+ whole?: boolean;
388
+ }): Promise<{
265
389
  regionalActions?: {
266
390
  region: "AT" | "AU" | "BR" | "DE" | "EU" | "FR" | "GB";
267
391
  action: "age-restrict" | "block" | "limit";
@@ -271,7 +395,21 @@ declare function detectTestImage(image: RgbaImage, key: string): Promise<{
271
395
  category: "criminal-activity" | "harassment" | "hate" | "personal-information" | "profanity" | "self-harm" | "sexual" | "violence";
272
396
  score?: number | undefined;
273
397
  action?: "age-restrict" | "allow" | "block" | "limit" | undefined;
274
- qualifiers: ("criminal-activity-alcohol" | "criminal-activity-coded-incitement" | "criminal-activity-csam" | "criminal-activity-demonstration" | "criminal-activity-discussion" | "criminal-activity-documentary" | "criminal-activity-educational" | "criminal-activity-fictional" | "criminal-activity-fraud" | "criminal-activity-gambling" | "criminal-activity-graffiti" | "criminal-activity-grooming" | "criminal-activity-historical" | "criminal-activity-instructions" | "criminal-activity-preparation" | "criminal-activity-promotion" | "criminal-activity-request" | "criminal-activity-sexual-solicitation" | "criminal-activity-substances" | "criminal-activity-support-prevention" | "criminal-activity-tobacco" | "harassment-abuse" | "harassment-bullying" | "harassment-documentary" | "harassment-educational" | "harassment-encouragement" | "harassment-fictional" | "harassment-historical" | "harassment-mild" | "harassment-public-target" | "harassment-sexual" | "harassment-support-prevention" | "harassment-threat" | "hate-abuse" | "hate-adjudicated-nazi-crimes-denial" | "hate-counterspeech" | "hate-dehumanization" | "hate-documentary" | "hate-educational" | "hate-exclusion" | "hate-fictional" | "hate-historical" | "hate-hostility" | "hate-inferiority" | "hate-nazi-genocide-denial-or-approval" | "hate-nazi-genocide-public-peace" | "hate-nazi-insignia-public-display" | "hate-nazi-symbols-public-display" | "hate-personal" | "hate-slurs" | "hate-support-prevention" | "hate-symbol" | "hate-threat" | "personal-information-contact" | "personal-information-credentials" | "personal-information-documentary" | "personal-information-educational" | "personal-information-email" | "personal-information-fictional" | "personal-information-financial" | "personal-information-government-id" | "personal-information-historical" | "personal-information-identifiers" | "personal-information-location" | "personal-information-phone" | "personal-information-request" | "personal-information-self-disclosure" | "personal-information-support-prevention" | "personal-information-third-party" | "profanity-documentary" | "profanity-educational" | "profanity-fictional" | "profanity-historical" | "profanity-mild" | "profanity-obfuscated" | "profanity-slurs" | "profanity-strong" | "profanity-support-prevention" | "self-harm-act" | "self-harm-age-restricted" | "self-harm-documentary" | "self-harm-educational" | "self-harm-encouragement" | "self-harm-fictional" | "self-harm-historical" | "self-harm-methods" | "self-harm-preparation" | "self-harm-support-prevention" | "self-harm-thoughts" | "sexual-activity" | "sexual-adult-promotion" | "sexual-assault-media" | "sexual-discussion" | "sexual-documentary" | "sexual-educational" | "sexual-explicit-language" | "sexual-extreme" | "sexual-fictional" | "sexual-historical" | "sexual-intimate-image-abuse" | "sexual-minors" | "sexual-non-consensual" | "sexual-non-erotic-nudity" | "sexual-nudity" | "sexual-paid" | "sexual-pornographic-media" | "sexual-revealing-clothing" | "sexual-solicitation" | "sexual-suggestive" | "sexual-support-prevention" | "sexual-text" | "violence-attack" | "violence-coded-incitement" | "violence-decapitation-act" | "violence-discussion" | "violence-documentary" | "violence-educational" | "violence-encouragement" | "violence-extremism" | "violence-fantasy" | "violence-fictional" | "violence-gore" | "violence-graphic" | "violence-high-impact" | "violence-historical" | "violence-injury" | "violence-natural-death" | "violence-preparation" | "violence-sport" | "violence-support-prevention" | "violence-text" | "violence-threat" | "violence-violent-death" | "violence-weapon" | "violence-wish")[];
398
+ qualifiers: ("criminal-activity-alcohol" | "criminal-activity-coded-incitement" | "criminal-activity-csam" | "criminal-activity-demonstration" | "criminal-activity-discussion" | "criminal-activity-documentary" | "criminal-activity-educational" | "criminal-activity-fictional" | "criminal-activity-fraud" | "criminal-activity-gambling" | "criminal-activity-graffiti" | "criminal-activity-grooming" | "criminal-activity-historical" | "criminal-activity-instructions" | "criminal-activity-preparation" | "criminal-activity-promotion" | "criminal-activity-request" | "criminal-activity-sexual-solicitation" | "criminal-activity-substances" | "criminal-activity-support-prevention" | "criminal-activity-tobacco" | "harassment-abuse" | "harassment-bullying" | "harassment-documentary" | "harassment-educational" | "harassment-encouragement" | "harassment-fictional" | "harassment-historical" | "harassment-mild" | "harassment-public-target" | "harassment-sexual" | "harassment-support-prevention" | "harassment-threat" | "hate-abuse" | "hate-adjudicated-nazi-crimes-denial" | "hate-counterspeech" | "hate-dehumanization" | "hate-documentary" | "hate-educational" | "hate-exclusion" | "hate-fictional" | "hate-historical" | "hate-hostility" | "hate-inferiority" | "hate-nazi-genocide-denial-or-approval" | "hate-nazi-genocide-public-peace" | "hate-nazi-insignia-public-display" | "hate-nazi-symbols-public-display" | "hate-personal" | "hate-slurs" | "hate-support-prevention" | "hate-symbol" | "hate-threat" | "personal-information-contact" | "personal-information-credentials" | "personal-information-documentary" | "personal-information-educational" | "personal-information-email" | "personal-information-fictional" | "personal-information-financial" | "personal-information-government-id" | "personal-information-historical" | "personal-information-identifiers" | "personal-information-location" | "personal-information-phone" | "personal-information-request" | "personal-information-self-disclosure" | "personal-information-support-prevention" | "personal-information-third-party" | "profanity-documentary" | "profanity-educational" | "profanity-fictional" | "profanity-historical" | "profanity-mild" | "profanity-obfuscated" | "profanity-slurs" | "profanity-strong" | "profanity-support-prevention" | "self-harm-act" | "self-harm-age-restricted" | "self-harm-documentary" | "self-harm-educational" | "self-harm-encouragement" | "self-harm-fictional" | "self-harm-historical" | "self-harm-methods" | "self-harm-preparation" | "self-harm-support-prevention" | "self-harm-thoughts" | "sexual-activity" | "sexual-adult-promotion" | "sexual-assault-media" | "sexual-discussion" | "sexual-documentary" | "sexual-educational" | "sexual-explicit-language" | "sexual-extreme" | "sexual-fictional" | "sexual-historical" | "sexual-incest" | "sexual-intimate-image-abuse" | "sexual-minors" | "sexual-non-consensual" | "sexual-non-erotic-nudity" | "sexual-nudity" | "sexual-paid" | "sexual-pornographic-media" | "sexual-revealing-clothing" | "sexual-solicitation" | "sexual-strangulation" | "sexual-suggestive" | "sexual-support-prevention" | "sexual-text" | "violence-attack" | "violence-coded-incitement" | "violence-decapitation-act" | "violence-discussion" | "violence-documentary" | "violence-educational" | "violence-encouragement" | "violence-extremism" | "violence-fantasy" | "violence-fictional" | "violence-gore" | "violence-graphic" | "violence-high-impact" | "violence-historical" | "violence-injury" | "violence-natural-death" | "violence-preparation" | "violence-sport" | "violence-support-prevention" | "violence-text" | "violence-threat" | "violence-violent-death" | "violence-weapon" | "violence-wish")[];
275
399
  }[];
400
+ detections?: {
401
+ people?: "unavailable" | {
402
+ box: [number, number, number, number];
403
+ confidence?: number | undefined;
404
+ }[] | undefined;
405
+ faces?: "unavailable" | {
406
+ box: [number, number, number, number];
407
+ confidence?: number | undefined;
408
+ age?: "adult" | "minor" | {
409
+ low: number;
410
+ high: number;
411
+ } | undefined;
412
+ }[] | undefined;
413
+ } | undefined;
276
414
  } | undefined>;
277
- export { detectTestImage as a, getImageTestCategories as c, TestInput as i, paintTestImage as l, TEST_INPUT_KEY_PATTERN as n, detectTestTrigger as o, TEST_INPUT_PRESETS as r, generateTestTextCode as s, ClassificationTestSignal as t, testInputForSignal as u };
415
+ export { TEST_FACE_AGE_PRESETS as a, TestDetections as c, detectTestTrigger as d, generateTestTextCode as f, testInputForSignal as h, TEST_FACE_AGE_MAX as i, TestInput as l, paintTestImage as m, TEST_DETECTIONS_MAX as n, TEST_INPUT_KEY_PATTERN as o, getImageTestCategories as p, TEST_DETECTION_BOX_MAX as r, TEST_INPUT_PRESETS as s, ClassificationTestSignal as t, detectTestImage as u };