sa2kit 1.4.2 → 1.5.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.
- package/dist/ConfigService-7MEZXKJ5.js +21 -0
- package/dist/ConfigService-7MEZXKJ5.js.map +1 -0
- package/dist/ConfigService-BV57YYFW.mjs +4 -0
- package/dist/ConfigService-BV57YYFW.mjs.map +1 -0
- package/dist/ConfigService-BxK06xP6.d.mts +262 -0
- package/dist/ConfigService-BxK06xP6.d.ts +262 -0
- package/dist/audioDetection/index.d.mts +449 -0
- package/dist/audioDetection/index.d.ts +449 -0
- package/dist/audioDetection/index.js +1244 -0
- package/dist/audioDetection/index.js.map +1 -0
- package/dist/audioDetection/index.mjs +1227 -0
- package/dist/audioDetection/index.mjs.map +1 -0
- package/dist/chunk-5XUE72Y3.mjs +1001 -0
- package/dist/chunk-5XUE72Y3.mjs.map +1 -0
- package/dist/chunk-DQVPZTVC.js +1009 -0
- package/dist/chunk-DQVPZTVC.js.map +1 -0
- package/dist/chunk-NEPD75MX.mjs +467 -0
- package/dist/chunk-NEPD75MX.mjs.map +1 -0
- package/dist/chunk-OEDY7GI4.js +473 -0
- package/dist/chunk-OEDY7GI4.js.map +1 -0
- package/dist/chunk-TFQF2HDO.mjs +354 -0
- package/dist/chunk-TFQF2HDO.mjs.map +1 -0
- package/dist/chunk-TOC5FSHP.js +358 -0
- package/dist/chunk-TOC5FSHP.js.map +1 -0
- package/dist/imageCrop/index.d.mts +165 -0
- package/dist/imageCrop/index.d.ts +165 -0
- package/dist/imageCrop/index.js +559 -0
- package/dist/imageCrop/index.js.map +1 -0
- package/dist/imageCrop/index.mjs +540 -0
- package/dist/imageCrop/index.mjs.map +1 -0
- package/dist/index.d.mts +139 -0
- package/dist/index.d.ts +139 -0
- package/dist/index.js +670 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +662 -0
- package/dist/index.mjs.map +1 -1
- package/dist/mmd/index.d.mts +113 -2
- package/dist/mmd/index.d.ts +113 -2
- package/dist/mmd/index.js +484 -2
- package/dist/mmd/index.js.map +1 -1
- package/dist/mmd/index.mjs +482 -4
- package/dist/mmd/index.mjs.map +1 -1
- package/dist/testYourself/admin/index.d.mts +58 -0
- package/dist/testYourself/admin/index.d.ts +58 -0
- package/dist/testYourself/admin/index.js +17 -0
- package/dist/testYourself/admin/index.js.map +1 -0
- package/dist/testYourself/admin/index.mjs +4 -0
- package/dist/testYourself/admin/index.mjs.map +1 -0
- package/dist/testYourself/index.d.mts +6 -98
- package/dist/testYourself/index.d.ts +6 -98
- package/dist/testYourself/index.js +90 -334
- package/dist/testYourself/index.js.map +1 -1
- package/dist/testYourself/index.mjs +47 -333
- package/dist/testYourself/index.mjs.map +1 -1
- package/dist/testYourself/server/index.d.mts +1029 -0
- package/dist/testYourself/server/index.d.ts +1029 -0
- package/dist/testYourself/server/index.js +42 -0
- package/dist/testYourself/server/index.js.map +1 -0
- package/dist/testYourself/server/index.mjs +5 -0
- package/dist/testYourself/server/index.mjs.map +1 -0
- package/dist/universalFile/server/index.js +5 -5
- package/dist/universalFile/server/index.mjs +1 -1
- package/package.json +62 -20
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { d as ConfigService, S as SavedConfig } from '../../ConfigService-BxK06xP6.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 测测你是什么 - 配置管理后台组件
|
|
6
|
+
* Test Yourself - Configuration Manager Component
|
|
7
|
+
*
|
|
8
|
+
* 支持创建、编辑、管理多套测试配置
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
interface ConfigManagerProps {
|
|
12
|
+
/** 配置服务实例 */
|
|
13
|
+
configService: ConfigService;
|
|
14
|
+
/** 配置变化回调 */
|
|
15
|
+
onConfigChange?: (configs: SavedConfig[]) => void;
|
|
16
|
+
/** 自定义样式 */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** 图片上传处理函数 */
|
|
19
|
+
onImageUpload?: (file: File) => Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 配置管理器组件
|
|
23
|
+
*/
|
|
24
|
+
declare const ConfigManager: React__default.FC<ConfigManagerProps>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 测测你是什么 - 配置列表组件
|
|
28
|
+
* Test Yourself - Configuration List Component
|
|
29
|
+
*
|
|
30
|
+
* 用于展示和选择配置
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
interface ConfigListProps {
|
|
34
|
+
/** 配置服务实例 */
|
|
35
|
+
configService: ConfigService;
|
|
36
|
+
/** 选择配置回调 */
|
|
37
|
+
onSelect?: (id: string) => void;
|
|
38
|
+
/** 编辑配置回调 */
|
|
39
|
+
onEdit?: (id: string) => void;
|
|
40
|
+
/** 删除配置回调 */
|
|
41
|
+
onDelete?: (id: string) => void;
|
|
42
|
+
/** 是否显示操作按钮 */
|
|
43
|
+
showActions?: boolean;
|
|
44
|
+
/** 是否显示预览链接 */
|
|
45
|
+
showPreviewLink?: boolean;
|
|
46
|
+
/** 预览基础URL */
|
|
47
|
+
previewBaseUrl?: string;
|
|
48
|
+
/** 自定义样式 */
|
|
49
|
+
className?: string;
|
|
50
|
+
/** 每页显示数量 */
|
|
51
|
+
pageSize?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 配置列表组件
|
|
55
|
+
*/
|
|
56
|
+
declare const ConfigList: React__default.FC<ConfigListProps>;
|
|
57
|
+
|
|
58
|
+
export { ConfigList, type ConfigListProps, ConfigManager, type ConfigManagerProps };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { d as ConfigService, S as SavedConfig } from '../../ConfigService-BxK06xP6.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 测测你是什么 - 配置管理后台组件
|
|
6
|
+
* Test Yourself - Configuration Manager Component
|
|
7
|
+
*
|
|
8
|
+
* 支持创建、编辑、管理多套测试配置
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
interface ConfigManagerProps {
|
|
12
|
+
/** 配置服务实例 */
|
|
13
|
+
configService: ConfigService;
|
|
14
|
+
/** 配置变化回调 */
|
|
15
|
+
onConfigChange?: (configs: SavedConfig[]) => void;
|
|
16
|
+
/** 自定义样式 */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** 图片上传处理函数 */
|
|
19
|
+
onImageUpload?: (file: File) => Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 配置管理器组件
|
|
23
|
+
*/
|
|
24
|
+
declare const ConfigManager: React__default.FC<ConfigManagerProps>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 测测你是什么 - 配置列表组件
|
|
28
|
+
* Test Yourself - Configuration List Component
|
|
29
|
+
*
|
|
30
|
+
* 用于展示和选择配置
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
interface ConfigListProps {
|
|
34
|
+
/** 配置服务实例 */
|
|
35
|
+
configService: ConfigService;
|
|
36
|
+
/** 选择配置回调 */
|
|
37
|
+
onSelect?: (id: string) => void;
|
|
38
|
+
/** 编辑配置回调 */
|
|
39
|
+
onEdit?: (id: string) => void;
|
|
40
|
+
/** 删除配置回调 */
|
|
41
|
+
onDelete?: (id: string) => void;
|
|
42
|
+
/** 是否显示操作按钮 */
|
|
43
|
+
showActions?: boolean;
|
|
44
|
+
/** 是否显示预览链接 */
|
|
45
|
+
showPreviewLink?: boolean;
|
|
46
|
+
/** 预览基础URL */
|
|
47
|
+
previewBaseUrl?: string;
|
|
48
|
+
/** 自定义样式 */
|
|
49
|
+
className?: string;
|
|
50
|
+
/** 每页显示数量 */
|
|
51
|
+
pageSize?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 配置列表组件
|
|
55
|
+
*/
|
|
56
|
+
declare const ConfigList: React__default.FC<ConfigListProps>;
|
|
57
|
+
|
|
58
|
+
export { ConfigList, type ConfigListProps, ConfigManager, type ConfigManagerProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkDQVPZTVC_js = require('../../chunk-DQVPZTVC.js');
|
|
4
|
+
require('../../chunk-DGUM43GV.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "ConfigList", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkDQVPZTVC_js.ConfigList; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ConfigManager", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkDQVPZTVC_js.ConfigManager; }
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
@@ -1,101 +1,9 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* 测试结果项
|
|
9
|
-
*/
|
|
10
|
-
interface TestResult {
|
|
11
|
-
/** 唯一标识 */
|
|
12
|
-
id: string;
|
|
13
|
-
/** 标题/题目 */
|
|
14
|
-
title: string;
|
|
15
|
-
/** 描述 */
|
|
16
|
-
description: string;
|
|
17
|
-
/** 图片URL或emoji */
|
|
18
|
-
image: string;
|
|
19
|
-
/** 图片类型 */
|
|
20
|
-
imageType?: 'url' | 'emoji';
|
|
21
|
-
/** 额外属性(可扩展) */
|
|
22
|
-
extra?: Record<string, any>;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 测试配置
|
|
26
|
-
*/
|
|
27
|
-
interface TestConfig {
|
|
28
|
-
/** 游戏标题 */
|
|
29
|
-
gameTitle: string;
|
|
30
|
-
/** 游戏描述 */
|
|
31
|
-
gameDescription?: string;
|
|
32
|
-
/** 按钮文本 */
|
|
33
|
-
buttonText?: string;
|
|
34
|
-
/** 长按时间(毫秒) */
|
|
35
|
-
longPressDuration?: number;
|
|
36
|
-
/** 结果数据集 */
|
|
37
|
-
results: TestResult[];
|
|
38
|
-
/** 是否启用IP获取 */
|
|
39
|
-
enableIPFetch?: boolean;
|
|
40
|
-
/** 自定义盐值 */
|
|
41
|
-
customSalt?: string;
|
|
42
|
-
/** 结果展示样式 */
|
|
43
|
-
resultStyle?: 'card' | 'full' | 'minimal';
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* 设备指纹信息
|
|
47
|
-
*/
|
|
48
|
-
interface DeviceFingerprint {
|
|
49
|
-
/** User Agent */
|
|
50
|
-
userAgent: string;
|
|
51
|
-
/** IP地址(如果可获取) */
|
|
52
|
-
ip?: string;
|
|
53
|
-
/** 屏幕分辨率 */
|
|
54
|
-
screenResolution: string;
|
|
55
|
-
/** 时区 */
|
|
56
|
-
timezone: string;
|
|
57
|
-
/** 语言 */
|
|
58
|
-
language: string;
|
|
59
|
-
/** 平台 */
|
|
60
|
-
platform: string;
|
|
61
|
-
/** 颜色深度 */
|
|
62
|
-
colorDepth?: number;
|
|
63
|
-
/** 像素比 */
|
|
64
|
-
devicePixelRatio?: number;
|
|
65
|
-
/** 硬件并发数 */
|
|
66
|
-
hardwareConcurrency?: number;
|
|
67
|
-
/** 最大触摸点数 */
|
|
68
|
-
maxTouchPoints?: number;
|
|
69
|
-
/** Canvas指纹 */
|
|
70
|
-
canvasFingerprint?: string;
|
|
71
|
-
/** WebGL指纹 */
|
|
72
|
-
webglFingerprint?: string;
|
|
73
|
-
/** 字体列表 */
|
|
74
|
-
fonts?: string;
|
|
75
|
-
/** 是否支持cookie */
|
|
76
|
-
cookieEnabled?: boolean;
|
|
77
|
-
/** 是否支持本地存储 */
|
|
78
|
-
localStorageEnabled?: boolean;
|
|
79
|
-
/** 是否支持会话存储 */
|
|
80
|
-
sessionStorageEnabled?: boolean;
|
|
81
|
-
/** 是否支持IndexedDB */
|
|
82
|
-
indexedDBEnabled?: boolean;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* 测试状态
|
|
86
|
-
*/
|
|
87
|
-
type TestStatus = 'idle' | 'pressing' | 'completed';
|
|
88
|
-
/**
|
|
89
|
-
* 组件属性
|
|
90
|
-
*/
|
|
91
|
-
interface TestYourselfProps {
|
|
92
|
-
/** 配置 */
|
|
93
|
-
config: TestConfig;
|
|
94
|
-
/** 结果回调 */
|
|
95
|
-
onResult?: (result: TestResult) => void;
|
|
96
|
-
/** 自定义样式类名 */
|
|
97
|
-
className?: string;
|
|
98
|
-
}
|
|
2
|
+
import { T as TestYourselfProps, D as DeviceFingerprint, a as TestResult } from '../ConfigService-BxK06xP6.mjs';
|
|
3
|
+
export { C as ConfigListItem, d as ConfigService, f as ConfigServiceOptions, I as IConfigStorage, S as SavedConfig, b as TestConfig, c as TestStatus, U as UploadResult, e as createConfigService, g as getDefaultConfigService } from '../ConfigService-BxK06xP6.mjs';
|
|
4
|
+
export { ConfigList, ConfigListProps, ConfigManager, ConfigManagerProps } from './admin/index.mjs';
|
|
5
|
+
export { DatabaseConfigAdapter, DatabaseConfigAdapterOptions, DrizzleDb, NewTestYourselfConfig, NewTestYourselfConfigShare, NewTestYourselfConfigUsage, TestYourselfConfig, TestYourselfConfigShare, TestYourselfConfigUsage, createDatabaseConfigAdapter, testYourselfConfigShares, testYourselfConfigUsage, testYourselfConfigs } from './server/index.mjs';
|
|
6
|
+
import 'drizzle-orm/pg-core';
|
|
99
7
|
|
|
100
8
|
/**
|
|
101
9
|
* 测测你是什么 - 主组件
|
|
@@ -142,4 +50,4 @@ declare function selectResultIndex(hash: string, totalResults: number): number;
|
|
|
142
50
|
|
|
143
51
|
declare const DEFAULT_RESULTS: TestResult[];
|
|
144
52
|
|
|
145
|
-
export { DEFAULT_RESULTS,
|
|
53
|
+
export { DEFAULT_RESULTS, DeviceFingerprint, TestResult, TestYourself, TestYourselfProps, generateDeviceHash, getDeviceFingerprint, selectResultIndex, tryGetIPAddress };
|
|
@@ -1,101 +1,9 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* 测试结果项
|
|
9
|
-
*/
|
|
10
|
-
interface TestResult {
|
|
11
|
-
/** 唯一标识 */
|
|
12
|
-
id: string;
|
|
13
|
-
/** 标题/题目 */
|
|
14
|
-
title: string;
|
|
15
|
-
/** 描述 */
|
|
16
|
-
description: string;
|
|
17
|
-
/** 图片URL或emoji */
|
|
18
|
-
image: string;
|
|
19
|
-
/** 图片类型 */
|
|
20
|
-
imageType?: 'url' | 'emoji';
|
|
21
|
-
/** 额外属性(可扩展) */
|
|
22
|
-
extra?: Record<string, any>;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 测试配置
|
|
26
|
-
*/
|
|
27
|
-
interface TestConfig {
|
|
28
|
-
/** 游戏标题 */
|
|
29
|
-
gameTitle: string;
|
|
30
|
-
/** 游戏描述 */
|
|
31
|
-
gameDescription?: string;
|
|
32
|
-
/** 按钮文本 */
|
|
33
|
-
buttonText?: string;
|
|
34
|
-
/** 长按时间(毫秒) */
|
|
35
|
-
longPressDuration?: number;
|
|
36
|
-
/** 结果数据集 */
|
|
37
|
-
results: TestResult[];
|
|
38
|
-
/** 是否启用IP获取 */
|
|
39
|
-
enableIPFetch?: boolean;
|
|
40
|
-
/** 自定义盐值 */
|
|
41
|
-
customSalt?: string;
|
|
42
|
-
/** 结果展示样式 */
|
|
43
|
-
resultStyle?: 'card' | 'full' | 'minimal';
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* 设备指纹信息
|
|
47
|
-
*/
|
|
48
|
-
interface DeviceFingerprint {
|
|
49
|
-
/** User Agent */
|
|
50
|
-
userAgent: string;
|
|
51
|
-
/** IP地址(如果可获取) */
|
|
52
|
-
ip?: string;
|
|
53
|
-
/** 屏幕分辨率 */
|
|
54
|
-
screenResolution: string;
|
|
55
|
-
/** 时区 */
|
|
56
|
-
timezone: string;
|
|
57
|
-
/** 语言 */
|
|
58
|
-
language: string;
|
|
59
|
-
/** 平台 */
|
|
60
|
-
platform: string;
|
|
61
|
-
/** 颜色深度 */
|
|
62
|
-
colorDepth?: number;
|
|
63
|
-
/** 像素比 */
|
|
64
|
-
devicePixelRatio?: number;
|
|
65
|
-
/** 硬件并发数 */
|
|
66
|
-
hardwareConcurrency?: number;
|
|
67
|
-
/** 最大触摸点数 */
|
|
68
|
-
maxTouchPoints?: number;
|
|
69
|
-
/** Canvas指纹 */
|
|
70
|
-
canvasFingerprint?: string;
|
|
71
|
-
/** WebGL指纹 */
|
|
72
|
-
webglFingerprint?: string;
|
|
73
|
-
/** 字体列表 */
|
|
74
|
-
fonts?: string;
|
|
75
|
-
/** 是否支持cookie */
|
|
76
|
-
cookieEnabled?: boolean;
|
|
77
|
-
/** 是否支持本地存储 */
|
|
78
|
-
localStorageEnabled?: boolean;
|
|
79
|
-
/** 是否支持会话存储 */
|
|
80
|
-
sessionStorageEnabled?: boolean;
|
|
81
|
-
/** 是否支持IndexedDB */
|
|
82
|
-
indexedDBEnabled?: boolean;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* 测试状态
|
|
86
|
-
*/
|
|
87
|
-
type TestStatus = 'idle' | 'pressing' | 'completed';
|
|
88
|
-
/**
|
|
89
|
-
* 组件属性
|
|
90
|
-
*/
|
|
91
|
-
interface TestYourselfProps {
|
|
92
|
-
/** 配置 */
|
|
93
|
-
config: TestConfig;
|
|
94
|
-
/** 结果回调 */
|
|
95
|
-
onResult?: (result: TestResult) => void;
|
|
96
|
-
/** 自定义样式类名 */
|
|
97
|
-
className?: string;
|
|
98
|
-
}
|
|
2
|
+
import { T as TestYourselfProps, D as DeviceFingerprint, a as TestResult } from '../ConfigService-BxK06xP6.js';
|
|
3
|
+
export { C as ConfigListItem, d as ConfigService, f as ConfigServiceOptions, I as IConfigStorage, S as SavedConfig, b as TestConfig, c as TestStatus, U as UploadResult, e as createConfigService, g as getDefaultConfigService } from '../ConfigService-BxK06xP6.js';
|
|
4
|
+
export { ConfigList, ConfigListProps, ConfigManager, ConfigManagerProps } from './admin/index.js';
|
|
5
|
+
export { DatabaseConfigAdapter, DatabaseConfigAdapterOptions, DrizzleDb, NewTestYourselfConfig, NewTestYourselfConfigShare, NewTestYourselfConfigUsage, TestYourselfConfig, TestYourselfConfigShare, TestYourselfConfigUsage, createDatabaseConfigAdapter, testYourselfConfigShares, testYourselfConfigUsage, testYourselfConfigs } from './server/index.js';
|
|
6
|
+
import 'drizzle-orm/pg-core';
|
|
99
7
|
|
|
100
8
|
/**
|
|
101
9
|
* 测测你是什么 - 主组件
|
|
@@ -142,4 +50,4 @@ declare function selectResultIndex(hash: string, totalResults: number): number;
|
|
|
142
50
|
|
|
143
51
|
declare const DEFAULT_RESULTS: TestResult[];
|
|
144
52
|
|
|
145
|
-
export { DEFAULT_RESULTS,
|
|
53
|
+
export { DEFAULT_RESULTS, DeviceFingerprint, TestResult, TestYourself, TestYourselfProps, generateDeviceHash, getDeviceFingerprint, selectResultIndex, tryGetIPAddress };
|