@monitordog/detector 1.0.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/LICENSE +10 -0
- package/README.md +129 -0
- package/dist/assets/inference-worker-BqvxPw8S.js +2 -0
- package/dist/auth.d.ts +6 -0
- package/dist/capture.d.ts +2 -0
- package/dist/constants.d.ts +21 -0
- package/dist/detect/inference-worker-client.d.ts +24 -0
- package/dist/detect/model-loader.d.ts +17 -0
- package/dist/detect/preprocess.d.ts +8 -0
- package/dist/detect/wasm/webcam-frame-analysis-wasm-bytes.d.ts +1 -0
- package/dist/detect/webcam-blockage-detector.d.ts +32 -0
- package/dist/detect/webcam-frame-analysis-wasm.d.ts +47 -0
- package/dist/detect/webcam-frame-analysis.d.ts +34 -0
- package/dist/detect/webcam-lighting-detector.d.ts +21 -0
- package/dist/environment.d.ts +11 -0
- package/dist/events.d.ts +8 -0
- package/dist/index.d.ts +41 -0
- package/dist/language.d.ts +6 -0
- package/dist/monitordog-detector.d.ts +41 -0
- package/dist/monitordog-detector.js +12297 -0
- package/dist/monitordog-detector.umd.cjs +54 -0
- package/dist/pose/mediapipe-asset-loader.d.ts +16 -0
- package/dist/pose/mediapipe-main-user-tracker.d.ts +90 -0
- package/dist/pose.d.ts +15 -0
- package/dist/sdk-error.d.ts +7 -0
- package/dist/service/auth-service.d.ts +42 -0
- package/dist/service/camera-service.d.ts +19 -0
- package/dist/service/container.d.ts +47 -0
- package/dist/service/detect-service.d.ts +53 -0
- package/dist/service/detection-event-service.d.ts +32 -0
- package/dist/service/overlay-renderer.d.ts +71 -0
- package/dist/service/overlay-service.d.ts +75 -0
- package/dist/service/overlay-watchdog-service.d.ts +13 -0
- package/dist/service/webcam-service.d.ts +26 -0
- package/dist/types.d.ts +361 -0
- package/dist/video.d.ts +2 -0
- package/package.json +47 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import type { MainUserTrackingResult } from "./pose/mediapipe-main-user-tracker";
|
|
2
|
+
import type { MonitorDogSdkError } from "./sdk-error";
|
|
3
|
+
export type DetectionReasonEnum = "mobileDevice" | "noFaceDetected" | "twoFacesDetected" | "oneFaceDetected" | "logout" | "login" | "webcamBlocked";
|
|
4
|
+
export type MonitorDogImageSource = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap | ImageData;
|
|
5
|
+
export interface MonitorDogDetection {
|
|
6
|
+
classId: number;
|
|
7
|
+
label: string;
|
|
8
|
+
score: number;
|
|
9
|
+
confidence: number;
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
15
|
+
export interface MonitorDogDetectionResult {
|
|
16
|
+
faceDetected: boolean;
|
|
17
|
+
phoneDetected: boolean;
|
|
18
|
+
faceCount: number;
|
|
19
|
+
phoneCount: number;
|
|
20
|
+
faceDetections: MonitorDogDetection[];
|
|
21
|
+
phoneDetections: MonitorDogDetection[];
|
|
22
|
+
}
|
|
23
|
+
export type InternalDetectionResult = MonitorDogDetectionResult;
|
|
24
|
+
export interface DetectionEvent {
|
|
25
|
+
type: MonitorDogDetectionEventType;
|
|
26
|
+
payload: CreateEventPayload;
|
|
27
|
+
}
|
|
28
|
+
export type MonitorDogDetectionEventType = "noFaceDetected" | "twoFacesDetected" | "mobileDevice" | "webcamBlocked";
|
|
29
|
+
export type MonitorDogUserActivityEventType = "login" | "logout";
|
|
30
|
+
export type MonitorDogOverlayType = MonitorDogDetectionEventType | "webcamTooDark" | "webcamTooBright" | "cameraPermissionDenied" | "cameraReadableError";
|
|
31
|
+
export type MonitorDogLanguage = "en" | "ko" | "ja";
|
|
32
|
+
export interface MonitorDogOverlayMessages extends Record<MonitorDogOverlayType, string> {
|
|
33
|
+
remoteAdminLocked: string;
|
|
34
|
+
remoteLocked: string;
|
|
35
|
+
cameraRetryButton: string;
|
|
36
|
+
cameraRetryingButton: string;
|
|
37
|
+
remoteUnlockButton: string;
|
|
38
|
+
remoteUnlockingButton: string;
|
|
39
|
+
remoteUnlockRequestButton: string;
|
|
40
|
+
remoteUnlockRequestingButton: string;
|
|
41
|
+
noFacePasswordInputPlaceholder: string;
|
|
42
|
+
noFacePasswordSubmitButton: string;
|
|
43
|
+
noFacePasswordSubmittingButton: string;
|
|
44
|
+
}
|
|
45
|
+
export type DeviceType = "desktop" | "mobile" | "tablet" | "laptop" | "other" | "none";
|
|
46
|
+
export type DeviceOs = "windows" | "macos" | "linux" | "android" | "ios" | "other" | "none";
|
|
47
|
+
export type CreateEventPayload = {
|
|
48
|
+
organization_uuid?: string;
|
|
49
|
+
basic_event_uuid?: string;
|
|
50
|
+
occured_at?: string;
|
|
51
|
+
sended_at?: string;
|
|
52
|
+
device_type: DeviceType;
|
|
53
|
+
device_os: DeviceOs;
|
|
54
|
+
device_id: string;
|
|
55
|
+
public_ip?: string;
|
|
56
|
+
private_ip?: string;
|
|
57
|
+
mac_address?: string;
|
|
58
|
+
ssid?: string;
|
|
59
|
+
cpu_rate?: number;
|
|
60
|
+
memory_rate?: number;
|
|
61
|
+
properties?: {
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
webcam_imgs?: Array<string>;
|
|
65
|
+
monitor_imgs?: Array<string>;
|
|
66
|
+
video_urls?: Array<string>;
|
|
67
|
+
program_list?: Array<string>;
|
|
68
|
+
};
|
|
69
|
+
export interface MonitorDogOverlayOptions {
|
|
70
|
+
enabled?: boolean;
|
|
71
|
+
locale?: MonitorDogLanguage;
|
|
72
|
+
watchdog?: boolean;
|
|
73
|
+
watchdogIntervalMs?: number;
|
|
74
|
+
rootId?: string;
|
|
75
|
+
className?: string;
|
|
76
|
+
messageClassName?: string;
|
|
77
|
+
cameraRetryButtonClassName?: string;
|
|
78
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
79
|
+
messageStyle?: Partial<CSSStyleDeclaration>;
|
|
80
|
+
cameraRetryButtonStyle?: Partial<CSSStyleDeclaration>;
|
|
81
|
+
cameraRetryButtonText?: string;
|
|
82
|
+
cameraRetryingButtonText?: string;
|
|
83
|
+
remoteUnlockButtonClassName?: string;
|
|
84
|
+
remoteUnlockButtonStyle?: Partial<CSSStyleDeclaration>;
|
|
85
|
+
remoteUnlockButtonText?: string;
|
|
86
|
+
remoteUnlockingButtonText?: string;
|
|
87
|
+
remoteUnlockRequestButtonText?: string;
|
|
88
|
+
remoteUnlockRequestingButtonText?: string;
|
|
89
|
+
noFacePasswordFormClassName?: string;
|
|
90
|
+
noFacePasswordFormStyle?: Partial<CSSStyleDeclaration>;
|
|
91
|
+
noFacePasswordInputClassName?: string;
|
|
92
|
+
noFacePasswordInputStyle?: Partial<CSSStyleDeclaration>;
|
|
93
|
+
noFacePasswordInputPlaceholder?: string;
|
|
94
|
+
noFacePasswordToggleButtonClassName?: string;
|
|
95
|
+
noFacePasswordToggleButtonStyle?: Partial<CSSStyleDeclaration>;
|
|
96
|
+
noFacePasswordOpenIconSrc?: string;
|
|
97
|
+
noFacePasswordCloseIconSrc?: string;
|
|
98
|
+
noFacePasswordSubmitButtonClassName?: string;
|
|
99
|
+
noFacePasswordSubmitButtonStyle?: Partial<CSSStyleDeclaration>;
|
|
100
|
+
noFacePasswordSubmitButtonText?: string;
|
|
101
|
+
noFacePasswordSubmittingButtonText?: string;
|
|
102
|
+
messages?: Partial<MonitorDogOverlayMessages>;
|
|
103
|
+
}
|
|
104
|
+
export type MonitorDogCaptureImageResult = Blob | File | undefined | null;
|
|
105
|
+
export interface MonitorDogVideoDetectionResult extends MonitorDogDetectionResult {
|
|
106
|
+
video: HTMLVideoElement;
|
|
107
|
+
timestamp: number;
|
|
108
|
+
mainUserTracking: MainUserTrackingResult;
|
|
109
|
+
}
|
|
110
|
+
export interface MonitorDogVideoDetectionController {
|
|
111
|
+
stop: () => void;
|
|
112
|
+
}
|
|
113
|
+
export interface MonitorDogWebcamDetectionController extends MonitorDogVideoDetectionController {
|
|
114
|
+
stream: MediaStream;
|
|
115
|
+
video: HTMLVideoElement;
|
|
116
|
+
}
|
|
117
|
+
export interface MonitorDogDetectorOptions {
|
|
118
|
+
apiBaseUrl: string;
|
|
119
|
+
debug?: boolean;
|
|
120
|
+
detectionIntervalMs?: number;
|
|
121
|
+
sessionTokenProvider: MonitorDogSessionTokenProvider;
|
|
122
|
+
onStatusChange?: (state: MonitorDogDetectorState) => void;
|
|
123
|
+
onAuthError?: (error: unknown) => void;
|
|
124
|
+
video?: HTMLVideoElement;
|
|
125
|
+
onDetect: (result: MonitorDogVideoDetectionResult) => void | Promise<void>;
|
|
126
|
+
onError?: (error: unknown) => void;
|
|
127
|
+
overlay?: MonitorDogOverlayOptions;
|
|
128
|
+
captureMonitorImage?: () => MonitorDogCaptureImageResult | Promise<MonitorDogCaptureImageResult>;
|
|
129
|
+
constraints?: MediaStreamConstraints;
|
|
130
|
+
runInBackground?: boolean;
|
|
131
|
+
mainUserTrackingEnabled?: boolean;
|
|
132
|
+
mainUserTrackingWasmBasePath?: string;
|
|
133
|
+
mainUserTrackingModelAssetPath?: string;
|
|
134
|
+
}
|
|
135
|
+
export type MonitorDogDetectorSessionStatus = "anonymous" | "authenticated";
|
|
136
|
+
export type MonitorDogDetectorStatus = "idle" | "loading" | "starting" | "running" | "stopped" | "disposed" | "error";
|
|
137
|
+
export type MonitorDogDetectorCameraStatus = "idle" | "requesting" | "active" | "blocked";
|
|
138
|
+
export interface MonitorDogDetectorState {
|
|
139
|
+
session: MonitorDogDetectorSessionStatus;
|
|
140
|
+
runtime: MonitorDogDetectorStatus;
|
|
141
|
+
camera: MonitorDogDetectorCameraStatus;
|
|
142
|
+
tokenExpiresAt?: number;
|
|
143
|
+
email?: string;
|
|
144
|
+
lastError?: MonitorDogSdkError;
|
|
145
|
+
}
|
|
146
|
+
export type MonitorDogSdkErrorCode = "NOT_LOGGED_IN" | "DETECTOR_RUNNING" | "ALREADY_DISPOSED" | "SESSION_TOKEN_FAILED" | "ACCOUNT_POLICY_FAILED" | "MODEL_LOAD_FAILED" | "CAMERA_PERMISSION_DENIED" | "CAMERA_READ_FAILED" | "RUNTIME_START_FAILED" | "LOGOUT_FAILED";
|
|
147
|
+
export type MonitorDogTensorType = "float32" | "uint8" | "int8";
|
|
148
|
+
export type MonitorDogTensorData = Float32Array | Uint8Array | Int8Array;
|
|
149
|
+
export interface MonitorDogTensorDataPayload {
|
|
150
|
+
type: MonitorDogTensorType;
|
|
151
|
+
data: MonitorDogTensorData;
|
|
152
|
+
dims: readonly number[];
|
|
153
|
+
}
|
|
154
|
+
export interface MonitorDogLoginRequest {
|
|
155
|
+
email: string;
|
|
156
|
+
}
|
|
157
|
+
export interface MonitorDogSessionTokenRequest {
|
|
158
|
+
email: string;
|
|
159
|
+
}
|
|
160
|
+
export type MonitorDogSessionTokenProvider = (request: MonitorDogSessionTokenRequest) => Promise<MonitorDogSessionToken>;
|
|
161
|
+
export type MonitorDogSessionToken = string | MonitorDogSdkTokenResponse;
|
|
162
|
+
export interface MonitorDogSdkTokenResponse {
|
|
163
|
+
token_type: string;
|
|
164
|
+
access_token: string;
|
|
165
|
+
expires_in: number;
|
|
166
|
+
expires_at?: string;
|
|
167
|
+
sdk_session_uuid?: string;
|
|
168
|
+
}
|
|
169
|
+
export interface MonitorDogTokenSet {
|
|
170
|
+
accessToken: string;
|
|
171
|
+
expiresIn?: number;
|
|
172
|
+
expiresAt?: string;
|
|
173
|
+
}
|
|
174
|
+
export interface SdkModelResponse {
|
|
175
|
+
encrypted_dek: string;
|
|
176
|
+
model_download_url: string;
|
|
177
|
+
}
|
|
178
|
+
export interface LetterboxResult {
|
|
179
|
+
data: ImageData;
|
|
180
|
+
sourceWidth: number;
|
|
181
|
+
sourceHeight: number;
|
|
182
|
+
ratio: number;
|
|
183
|
+
padX: number;
|
|
184
|
+
padY: number;
|
|
185
|
+
}
|
|
186
|
+
export type LetterboxMetadata = Omit<LetterboxResult, "data">;
|
|
187
|
+
export type MonitorDogInferenceSource = {
|
|
188
|
+
kind: "bitmap";
|
|
189
|
+
bitmap: ImageBitmap;
|
|
190
|
+
sourceWidth: number;
|
|
191
|
+
sourceHeight: number;
|
|
192
|
+
} | {
|
|
193
|
+
kind: "rgba";
|
|
194
|
+
data: Uint8ClampedArray;
|
|
195
|
+
sourceWidth: number;
|
|
196
|
+
sourceHeight: number;
|
|
197
|
+
};
|
|
198
|
+
export type MinimalAccount = {
|
|
199
|
+
name: string;
|
|
200
|
+
uuid: string;
|
|
201
|
+
email: string;
|
|
202
|
+
color: string;
|
|
203
|
+
};
|
|
204
|
+
export type MinimalEventLockSetting = {
|
|
205
|
+
basic_event_uuid: string;
|
|
206
|
+
is_lock: boolean;
|
|
207
|
+
seconds: number;
|
|
208
|
+
policy: string;
|
|
209
|
+
};
|
|
210
|
+
export type ApiAccountDomainEntityAccountAccountHistoryResponse = {
|
|
211
|
+
organization_uuid: string;
|
|
212
|
+
account_uuid: string;
|
|
213
|
+
uuid: string;
|
|
214
|
+
writer_uuid: string;
|
|
215
|
+
writer?: MinimalAccount;
|
|
216
|
+
type: string;
|
|
217
|
+
text: string;
|
|
218
|
+
created_at: string;
|
|
219
|
+
updated_at: string;
|
|
220
|
+
is_active: boolean;
|
|
221
|
+
};
|
|
222
|
+
export type DetectionLevel = {
|
|
223
|
+
detect_smartphone: boolean;
|
|
224
|
+
detect_no_person: boolean;
|
|
225
|
+
detect_multi_person: boolean;
|
|
226
|
+
detect_format: boolean;
|
|
227
|
+
};
|
|
228
|
+
export type DlpDetectionPolicy = "log_only" | "auto_lock" | "user_lock" | "read_only" | "no_detect";
|
|
229
|
+
export type ScreenshotPolicy = "log_only" | "auto_lock" | "user_lock" | "no_detect";
|
|
230
|
+
export type FaceHardlockLevel = "user_controlled" | "admin_approval_needed";
|
|
231
|
+
export type FaceSecurityLevel = "standard" | "enhanced";
|
|
232
|
+
export type FaceEnrollmentStatus = "none" | "enrolled" | "updated" | "deleted";
|
|
233
|
+
export type OsResetPolicy = "log_only" | "user_controlled" | "admin_approval_needed" | "no_detect";
|
|
234
|
+
export type AccountResponse = {
|
|
235
|
+
organization_uuid: string;
|
|
236
|
+
uuid: string;
|
|
237
|
+
name: string;
|
|
238
|
+
is_admin: boolean;
|
|
239
|
+
email: string;
|
|
240
|
+
color: string;
|
|
241
|
+
is_locked: boolean;
|
|
242
|
+
is_employed: boolean;
|
|
243
|
+
employee_id: string;
|
|
244
|
+
department: string;
|
|
245
|
+
job_title: string;
|
|
246
|
+
phone: string;
|
|
247
|
+
address_work: string;
|
|
248
|
+
address_home: string;
|
|
249
|
+
timezone: string;
|
|
250
|
+
language: string;
|
|
251
|
+
permission: string;
|
|
252
|
+
firebase_uid: string;
|
|
253
|
+
nationality: string;
|
|
254
|
+
last_login_at: string;
|
|
255
|
+
today_risk_score: number;
|
|
256
|
+
is_high_priority: boolean;
|
|
257
|
+
is_live: boolean;
|
|
258
|
+
email_unlock_req: boolean;
|
|
259
|
+
email_share: boolean;
|
|
260
|
+
email_blocklist: boolean;
|
|
261
|
+
email_device_connect: boolean;
|
|
262
|
+
email_screenshot: boolean;
|
|
263
|
+
email_audit: boolean;
|
|
264
|
+
email_log_deletion?: boolean;
|
|
265
|
+
historys?: Array<ApiAccountDomainEntityAccountAccountHistoryResponse>;
|
|
266
|
+
is_monitoring: boolean;
|
|
267
|
+
is_mfa: boolean;
|
|
268
|
+
shutdown_agent: boolean;
|
|
269
|
+
remote_restart: boolean;
|
|
270
|
+
remote_os_shutdown: boolean;
|
|
271
|
+
remote_os_restart: boolean;
|
|
272
|
+
detection_level?: DetectionLevel;
|
|
273
|
+
dlp_policy: DlpDetectionPolicy;
|
|
274
|
+
dlp_lock_second: number;
|
|
275
|
+
recent_ip: string;
|
|
276
|
+
screenshot_policy: ScreenshotPolicy;
|
|
277
|
+
screenshot_shortcut_yn: boolean;
|
|
278
|
+
screenshot_software_yn: boolean;
|
|
279
|
+
require_password_on_resume: boolean;
|
|
280
|
+
resume_password_lock_until: string;
|
|
281
|
+
resume_password_fail_count: number;
|
|
282
|
+
no_face_lock_delay_seconds: number;
|
|
283
|
+
use_face_on_login: boolean;
|
|
284
|
+
use_face_on_resume: boolean;
|
|
285
|
+
face_auth_fail_count: number;
|
|
286
|
+
face_auth_lock_until: string;
|
|
287
|
+
face_login_hardlock_level: FaceHardlockLevel;
|
|
288
|
+
face_resume_hardlock_level: FaceHardlockLevel;
|
|
289
|
+
face_login_security_level: FaceSecurityLevel;
|
|
290
|
+
face_resume_security_level: FaceSecurityLevel;
|
|
291
|
+
face_enrollment_status: FaceEnrollmentStatus;
|
|
292
|
+
face_updated_at: string;
|
|
293
|
+
is_uncompleted_optimization_request: boolean;
|
|
294
|
+
os_reset_policy: OsResetPolicy;
|
|
295
|
+
hide_os_reset_menu?: boolean;
|
|
296
|
+
created_at: string;
|
|
297
|
+
updated_at: string;
|
|
298
|
+
is_active: boolean;
|
|
299
|
+
};
|
|
300
|
+
export type LockPolicyResponse = {
|
|
301
|
+
basic_event_uuid: string;
|
|
302
|
+
basic_event_name?: string;
|
|
303
|
+
basic_event_description?: string;
|
|
304
|
+
uuid: string;
|
|
305
|
+
policy: string;
|
|
306
|
+
seconds: number;
|
|
307
|
+
sensitivity: number;
|
|
308
|
+
created_at: string;
|
|
309
|
+
updated_at: string;
|
|
310
|
+
is_active: boolean;
|
|
311
|
+
};
|
|
312
|
+
export type LockPolicyValue = "auto_lock" | "log_only" | "none";
|
|
313
|
+
export interface UserPreferences {
|
|
314
|
+
mobileDetectionThreshold: number;
|
|
315
|
+
mobileDetectionLockDuration: number;
|
|
316
|
+
mobileDetectionEnabled: boolean;
|
|
317
|
+
mobileDetectionMode: LockPolicyValue;
|
|
318
|
+
language: MonitorDogLanguage;
|
|
319
|
+
faceDetectionThreshold: number;
|
|
320
|
+
noPersonDetectionEnabled: boolean;
|
|
321
|
+
noPersonLockDuration: number;
|
|
322
|
+
noPersonDetectionMode: LockPolicyValue;
|
|
323
|
+
multiPersonDetectionEnabled: boolean;
|
|
324
|
+
multiPersonLockDuration: number;
|
|
325
|
+
multiPersonDetectionMode: LockPolicyValue;
|
|
326
|
+
headTurningThreshold: number;
|
|
327
|
+
webcamBlockageDetectionEnabled: boolean;
|
|
328
|
+
webcamBlockageLockDuration: number;
|
|
329
|
+
webcamBlockageDetectionMode: LockPolicyValue;
|
|
330
|
+
}
|
|
331
|
+
export type LiveStatus = {
|
|
332
|
+
l?: boolean;
|
|
333
|
+
k?: string;
|
|
334
|
+
ku?: string;
|
|
335
|
+
m?: boolean;
|
|
336
|
+
d?: DetectionLevel;
|
|
337
|
+
e?: Array<MinimalEventLockSetting>;
|
|
338
|
+
s?: boolean;
|
|
339
|
+
dp?: DlpDetectionPolicy;
|
|
340
|
+
dls?: number;
|
|
341
|
+
bl?: Array<string>;
|
|
342
|
+
require_password_on_resume?: boolean;
|
|
343
|
+
no_face_lock_delay_seconds?: number;
|
|
344
|
+
use_face_on_resume?: boolean;
|
|
345
|
+
};
|
|
346
|
+
export type LockLogResponse = {
|
|
347
|
+
organization_uuid: string;
|
|
348
|
+
lock_target_type: string;
|
|
349
|
+
account_uuid: string;
|
|
350
|
+
lock_level: string;
|
|
351
|
+
device_uuid: string;
|
|
352
|
+
uuid: string;
|
|
353
|
+
locker_uuid: string;
|
|
354
|
+
reason: string;
|
|
355
|
+
suspicious_activity_uuid: string;
|
|
356
|
+
unlocker_uuid: string;
|
|
357
|
+
unlocked_at: string;
|
|
358
|
+
created_at: string;
|
|
359
|
+
updated_at: string;
|
|
360
|
+
is_active: boolean;
|
|
361
|
+
};
|
package/dist/video.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@monitordog/detector",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Browser SDK for running the bundled MonitorDog ONNX detector.",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"main": "./dist/monitordog-detector.umd.cjs",
|
|
8
|
+
"module": "./dist/monitordog-detector.js",
|
|
9
|
+
"types": "./dist/monitordog-detector.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/monitordog-detector.d.ts",
|
|
19
|
+
"import": "./dist/monitordog-detector.js",
|
|
20
|
+
"require": "./dist/monitordog-detector.umd.cjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build:webcam-frame-analysis-wasm": "powershell -ExecutionPolicy Bypass -File scripts/build-webcam-frame-analysis-wasm.ps1",
|
|
27
|
+
"build:ort-webassembly-reduced": "powershell -ExecutionPolicy Bypass -File scripts/build-ort-webassembly-reduced.ps1",
|
|
28
|
+
"build:ort-detector-wasm": "powershell -ExecutionPolicy Bypass -File scripts/build-ort-detector-wasm.ps1",
|
|
29
|
+
"build:demo": "vite build --config vite.demo.config.ts",
|
|
30
|
+
"deploy:demo": "npm run build:demo && npx wrangler pages deploy dist-demo --project-name monitordog --branch main --commit-dirty=true",
|
|
31
|
+
"build": "vite build && tsc -p tsconfig.build.json && node scripts/copy-types.cjs",
|
|
32
|
+
"preview": "vite preview",
|
|
33
|
+
"test": "vitest run"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@sentry/browser": "^10.53.1",
|
|
37
|
+
"binaryen": "^129.0.0",
|
|
38
|
+
"typescript": "~6.0.2",
|
|
39
|
+
"vite": "^8.1.2",
|
|
40
|
+
"vite-plugin-javascript-obfuscator": "^3.1.0",
|
|
41
|
+
"vitest": "^4.1.9"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@mediapipe/tasks-vision": "^0.10.35",
|
|
45
|
+
"html2canvas": "^1.4.1"
|
|
46
|
+
}
|
|
47
|
+
}
|