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.
- package/README.md +15 -10
- package/bin/calmlens.js +1848 -679
- package/cjs/{BrowserUpload-C07aL9Vq.d.ts → BrowserUpload-BWjZ9ntu.d.ts} +2 -2
- package/cjs/{BrowserUpload-CjSHjx3C.js → BrowserUpload-Bwlib4Zc.js} +1 -1
- package/cjs/{CalmLensAppClient-DDLojj0P.d.ts → CalmLensAppClient-BaW3ddUR.d.ts} +13 -3
- package/cjs/{CalmLensAppClient-NaCxOVlM.js → CalmLensAppClient-DUYMo9PZ.js} +30 -10
- package/cjs/{CalmLensOptionKeys-p2QK687A.js → CalmLensOptionKeys-YvgV995V.js} +318 -374
- package/cjs/{CalmLensServerClient-BDzTthxE.js → CalmLensServerClient-3N-gdsxC.js} +346 -89
- package/cjs/CalmLensServerClient-BKzn8zmp.d.ts +353 -0
- package/cjs/{CalmLensTypes-COJbOuiv.d.ts → CalmLensTypes-BDKwThbO.d.ts} +26993 -27187
- package/cjs/{Classification-D3SkprrQ-CMnQKW13.d.ts → Classification-Q5zGpR8l-CEWjnE39.d.ts} +731 -607
- package/cjs/Core-C33pkBmf.d.ts +826 -0
- package/cjs/Core-Cm5Z1oJ9.js +1001 -0
- package/cjs/FileIcons-4qSX7DW2.d.ts +67 -0
- package/cjs/{ModerationContextLimits-2nIv7Zh3.js → ModerationContextLimits-ud1xpZRK.js} +727 -268
- package/cjs/{ReactUpload-BdTRCTGA.js → ReactUpload-DQ0BYISX.js} +1 -1
- package/cjs/{ReactUpload-CRJNPB5T.d.ts → ReactUpload-DhF8mm51.d.ts} +1 -1
- package/{esm/TestTriggers-D-fwfhEP-hlaP1oW2.d.ts → cjs/TestTriggers-D0pYHbkr-D5T0VdSn.d.ts} +146 -8
- package/cjs/{TestTriggers-DbhsNPdg-DjvVuc2h.js → TestTriggers-D29T_R0M-D6Bu-Mln.js} +355 -47
- package/cjs/{UploadController-MLVs97Zt.js → UploadController-l8fZM2qT.js} +34 -14
- package/{esm/WebhookPayload-DkukERKE.d.ts → cjs/WebhookPayload-Dt6DttS0.d.ts} +120 -86
- package/cjs/app.d.ts +6 -7
- package/cjs/app.js +4 -3
- package/cjs/elements.d.ts +123 -22
- package/cjs/elements.js +553 -156
- package/cjs/file-icons.d.ts +2 -67
- package/cjs/index-Bde1wjiw.d.ts +16 -0
- package/cjs/index.d.ts +5 -6
- package/cjs/index.js +3 -2
- package/cjs/react-native.d.ts +52 -11
- package/cjs/react-native.js +231 -99
- package/cjs/react.d.ts +42 -9
- package/cjs/react.js +381 -118
- package/cjs/server.d.ts +48 -7
- package/cjs/server.js +7 -3
- package/cjs/test-inputs.d.ts +2 -2
- package/cjs/test-inputs.js +13 -9
- package/cjs/testing.d.ts +29 -15
- package/cjs/testing.js +1722 -433
- package/cjs/ui-BRA4HQ8r.js +1359 -0
- package/cjs/ui-YQuvbidU.d.ts +139 -0
- package/cjs/ui.d.ts +3 -2
- package/cjs/ui.js +45 -22
- package/cjs/vue.d.ts +802 -199
- package/cjs/vue.js +359 -127
- package/esm/{BrowserUpload-C07aL9Vq.d.ts → BrowserUpload-BWjZ9ntu.d.ts} +2 -2
- package/esm/{BrowserUpload-CAVkRotw.js → BrowserUpload-GRZVB0G_.js} +1 -1
- package/esm/{CalmLensAppClient-PQ9VBvlW.js → CalmLensAppClient-B5QIJ6KS.js} +30 -10
- package/esm/{CalmLensAppClient-DDLojj0P.d.ts → CalmLensAppClient-BaW3ddUR.d.ts} +13 -3
- package/esm/{CalmLensOptionKeys-Do2mPP6w.js → CalmLensOptionKeys-BG7Qrh8-.js} +317 -367
- package/esm/CalmLensServerClient-BKzn8zmp.d.ts +353 -0
- package/esm/{CalmLensServerClient-C_H5aAsV.js → CalmLensServerClient-bRUAebi-.js} +323 -90
- package/esm/{CalmLensTypes-COJbOuiv.d.ts → CalmLensTypes-BDKwThbO.d.ts} +26993 -27187
- package/esm/{Classification-D3SkprrQ-CMnQKW13.d.ts → Classification-Q5zGpR8l-CEWjnE39.d.ts} +731 -607
- package/esm/Core-BvQe4moS.js +846 -0
- package/esm/Core-C33pkBmf.d.ts +826 -0
- package/esm/FileIcons-4qSX7DW2.d.ts +67 -0
- package/esm/{ModerationContextLimits-Chw-AzgL.js → ModerationContextLimits-CrxSnVZ3.js} +682 -253
- package/esm/{ReactUpload-CMmL0R5Q.js → ReactUpload-BMO8saxT.js} +1 -1
- package/esm/{ReactUpload-CRJNPB5T.d.ts → ReactUpload-DhF8mm51.d.ts} +1 -1
- package/{cjs/TestTriggers-D-fwfhEP-hlaP1oW2.d.ts → esm/TestTriggers-D0pYHbkr-D5T0VdSn.d.ts} +146 -8
- package/esm/{TestTriggers-DbhsNPdg-CUdrv8Nm.js → TestTriggers-D29T_R0M-Ztc74ucs.js} +332 -48
- package/esm/{UploadController-BJZghJpg.js → UploadController-DnJrWiE4.js} +34 -14
- package/{cjs/WebhookPayload-DkukERKE.d.ts → esm/WebhookPayload-Dt6DttS0.d.ts} +120 -86
- package/esm/app.d.ts +6 -7
- package/esm/app.js +3 -3
- package/esm/elements.d.ts +123 -22
- package/esm/elements.js +497 -128
- package/esm/file-icons.d.ts +2 -67
- package/esm/index-Bde1wjiw.d.ts +16 -0
- package/esm/index.d.ts +5 -6
- package/esm/index.js +1 -1
- package/esm/react-native.d.ts +52 -11
- package/esm/react-native.js +205 -75
- package/esm/react.d.ts +42 -9
- package/esm/react.js +327 -91
- package/esm/server.d.ts +48 -7
- package/esm/server.js +3 -3
- package/esm/styles.css +142 -22
- package/esm/svelte/AssetViewer.svelte +25 -0
- package/esm/svelte/CalmLensAsset.svelte +318 -0
- package/esm/svelte/CalmLensDocumentViewer.svelte +7 -0
- package/esm/svelte/CalmLensImageViewer.svelte +7 -0
- package/esm/svelte/CalmLensSpreadsheetViewer.svelte +7 -0
- package/esm/svelte/CalmLensTextViewer.svelte +7 -0
- package/esm/svelte/CalmLensWebsiteViewer.svelte +7 -0
- package/esm/svelte/index.d.ts +29 -6
- package/esm/svelte/index.js +7 -2
- package/esm/test-inputs.d.ts +2 -2
- package/esm/test-inputs.js +1 -1
- package/esm/testing.d.ts +29 -15
- package/esm/testing.js +1718 -429
- package/esm/ui-YQuvbidU.d.ts +139 -0
- package/esm/ui-heryDd6g.js +1258 -0
- package/esm/ui.d.ts +3 -2
- package/esm/ui.js +4 -3
- package/esm/vue.d.ts +802 -199
- package/esm/vue.js +308 -103
- package/package.json +4 -2
- package/cjs/CalmLensServerClient-C-jsjn8m.d.ts +0 -259
- package/cjs/ModerationContext-9lGm-Mna-CcmbRnOy.d.ts +0 -67
- package/cjs/index-DxbJ_Xaa.d.ts +0 -253
- package/cjs/ui-BSqPGKrZ.d.ts +0 -539
- package/cjs/ui-CX1z2pD9.js +0 -586
- package/esm/CalmLensServerClient-C-jsjn8m.d.ts +0 -259
- package/esm/ModerationContext-9lGm-Mna-CcmbRnOy.d.ts +0 -67
- package/esm/index-DxbJ_Xaa.d.ts +0 -253
- package/esm/svelte/CalmLensMedia.svelte +0 -134
- package/esm/ui-BSqPGKrZ.d.ts +0 -539
- package/esm/ui-CXH7xJpb.js +0 -461
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createUploadController } from "./UploadController-
|
|
1
|
+
import { n as createUploadController } from "./UploadController-DnJrWiE4.js";
|
|
2
2
|
import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
// src/ui/ReactUpload.ts
|
|
4
4
|
/** Re-renders with a controller's snapshot. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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
|
|
255
|
-
* bytes, big-endian), the 16-byte tag, then the JSON. The reader rebuilds
|
|
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
|
-
/**
|
|
264
|
-
|
|
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 {
|
|
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 };
|