dphelper 4.5.2 → 4.6.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/COPYRIGHT.md +6 -6
- package/FUNDING.yml +12 -12
- package/LICENSE.md +21 -21
- package/README.md +397 -397
- package/SECURITY.md +26 -26
- package/SUMMARY.md +83 -83
- package/index.cjs +2 -2
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/llms.txt +73 -73
- package/modules/ai.cjs +1 -1
- package/modules/ai.d.ts +11 -11
- package/modules/ai.js +1 -1
- package/modules/anchor.cjs +1 -1
- package/modules/anchor.d.ts +6 -6
- package/modules/anchor.js +1 -1
- package/modules/array.cjs +1 -1
- package/modules/array.d.ts +21 -21
- package/modules/array.js +1 -1
- package/modules/audio.cjs +1 -1
- package/modules/audio.d.ts +10 -10
- package/modules/audio.js +1 -1
- package/modules/avoid.cjs +1 -1
- package/modules/avoid.d.ts +2 -2
- package/modules/avoid.js +1 -1
- package/modules/biometric.cjs +1 -1
- package/modules/biometric.d.ts +14 -14
- package/modules/biometric.js +1 -1
- package/modules/browser.cjs +1 -1
- package/modules/browser.d.ts +10 -10
- package/modules/browser.js +1 -1
- package/modules/check.cjs +1 -1
- package/modules/check.d.ts +4 -4
- package/modules/check.js +1 -1
- package/modules/color.cjs +1 -1
- package/modules/color.d.ts +6 -6
- package/modules/color.js +1 -1
- package/modules/compress.cjs +1 -1
- package/modules/compress.d.ts +13 -13
- package/modules/compress.js +1 -1
- package/modules/cookie.cjs +1 -1
- package/modules/cookie.d.ts +12 -12
- package/modules/cookie.js +1 -1
- package/modules/coords.cjs +1 -1
- package/modules/coords.d.ts +8 -8
- package/modules/coords.js +1 -1
- package/modules/credits.cjs +1 -1
- package/modules/credits.d.ts +11 -11
- package/modules/credits.js +1 -1
- package/modules/date.cjs +1 -1
- package/modules/date.d.ts +25 -25
- package/modules/date.js +1 -1
- package/modules/disable.cjs +1 -1
- package/modules/disable.d.ts +8 -8
- package/modules/disable.js +1 -1
- package/modules/dispatch.cjs +1 -1
- package/modules/dispatch.d.ts +4 -4
- package/modules/dispatch.js +1 -1
- package/modules/elements.cjs +1 -1
- package/modules/elements.d.ts +3 -3
- package/modules/elements.js +1 -1
- package/modules/events.cjs +1 -1
- package/modules/events.d.ts +6 -6
- package/modules/events.js +1 -1
- package/modules/fetch.cjs +1 -1
- package/modules/fetch.d.ts +15 -15
- package/modules/fetch.js +1 -1
- package/modules/form.cjs +1 -1
- package/modules/form.d.ts +13 -13
- package/modules/form.js +1 -1
- package/modules/format.cjs +1 -1
- package/modules/format.d.ts +3 -3
- package/modules/format.js +1 -1
- package/modules/i18n.cjs +1 -1
- package/modules/i18n.d.ts +11 -11
- package/modules/i18n.js +1 -1
- package/modules/image.cjs +1 -1
- package/modules/image.d.ts +13 -13
- package/modules/image.js +1 -1
- package/modules/json.cjs +1 -1
- package/modules/json.d.ts +8 -8
- package/modules/json.js +1 -1
- package/modules/load.cjs +1 -1
- package/modules/load.d.ts +8 -8
- package/modules/load.js +1 -1
- package/modules/logging.cjs +1 -1
- package/modules/logging.d.ts +8 -8
- package/modules/logging.js +1 -1
- package/modules/math.cjs +1 -1
- package/modules/math.d.ts +13 -13
- package/modules/math.js +1 -1
- package/modules/memory.cjs +1 -1
- package/modules/memory.d.ts +3 -3
- package/modules/memory.js +1 -1
- package/modules/navigation.cjs +1 -1
- package/modules/navigation.d.ts +4 -4
- package/modules/navigation.js +1 -1
- package/modules/net.cjs +1 -1
- package/modules/net.d.ts +10 -10
- package/modules/net.js +1 -1
- package/modules/objects.cjs +1 -1
- package/modules/objects.d.ts +15 -15
- package/modules/objects.js +1 -1
- package/modules/path.cjs +1 -1
- package/modules/path.d.ts +4 -4
- package/modules/path.js +1 -1
- package/modules/promise.cjs +1 -1
- package/modules/promise.d.ts +3 -3
- package/modules/promise.js +1 -1
- package/modules/sanitize.cjs +1 -1
- package/modules/sanitize.d.ts +2 -2
- package/modules/sanitize.js +1 -1
- package/modules/screen.cjs +1 -1
- package/modules/screen.d.ts +11 -11
- package/modules/screen.js +1 -1
- package/modules/scrollbar.cjs +1 -1
- package/modules/scrollbar.d.ts +9 -9
- package/modules/scrollbar.js +1 -1
- package/modules/security.cjs +1 -1
- package/modules/security.d.ts +15 -15
- package/modules/security.js +1 -1
- package/modules/shortcut.cjs +1 -1
- package/modules/shortcut.d.ts +2 -2
- package/modules/shortcut.js +1 -1
- package/modules/socket.cjs +1 -1
- package/modules/socket.d.ts +13 -13
- package/modules/socket.js +1 -1
- package/modules/sse.cjs +1 -1
- package/modules/sse.d.ts +8 -8
- package/modules/sse.js +1 -1
- package/modules/svg.cjs +1 -1
- package/modules/svg.d.ts +12 -12
- package/modules/svg.js +1 -1
- package/modules/sync.cjs +1 -1
- package/modules/sync.d.ts +13 -13
- package/modules/sync.js +1 -1
- package/modules/system.cjs +1 -1
- package/modules/system.d.ts +2 -2
- package/modules/system.js +1 -1
- package/modules/text.cjs +2 -2
- package/modules/text.d.ts +13 -12
- package/modules/text.js +2 -2
- package/modules/timer.cjs +1 -1
- package/modules/timer.d.ts +3 -3
- package/modules/timer.js +1 -1
- package/modules/tools.cjs +1 -1
- package/modules/tools.d.ts +5 -5
- package/modules/tools.js +1 -1
- package/modules/translators.cjs +1 -1
- package/modules/translators.d.ts +2 -2
- package/modules/translators.js +1 -1
- package/modules/triggers.cjs +1 -1
- package/modules/triggers.d.ts +43 -43
- package/modules/triggers.js +1 -1
- package/modules/types.cjs +1 -1
- package/modules/types.d.ts +5 -5
- package/modules/types.js +1 -1
- package/modules/ui.cjs +1 -1
- package/modules/ui.d.ts +3 -3
- package/modules/ui.js +1 -1
- package/modules/window.cjs +1 -1
- package/modules/window.d.ts +9 -9
- package/modules/window.js +1 -1
- package/modules/worker.cjs +1 -1
- package/modules/worker.d.ts +16 -16
- package/modules/worker.js +1 -1
- package/package.json +2 -2
- package/sbom.json +14 -9
- package/types/dphelper.d.ts +546 -545
- package/types/global.d.ts +8 -8
package/types/dphelper.d.ts
CHANGED
|
@@ -1,674 +1,675 @@
|
|
|
1
1
|
// --- AUTO-GENERATED TOOL TYPES START ---
|
|
2
2
|
// --- ai ---
|
|
3
|
-
interface AiTool {
|
|
4
|
-
tokenCount: (data: any) => number
|
|
5
|
-
smartSanitize: (text: string) => string
|
|
6
|
-
toon: (data: any) => string
|
|
7
|
-
toonToJson: (toon: string) => any
|
|
8
|
-
chunker: (text: string, options?: { size?: number, overlap?: number }) => string[]
|
|
9
|
-
similarity: (a: number[], b: number[]) => number
|
|
10
|
-
extractReasoning: (text: string) => { reasoning: string, content: string }
|
|
11
|
-
prompt: (template: string, vars: Record<string, any>) => string
|
|
12
|
-
schema: (data: any) => string
|
|
13
|
-
snapshot: () => string
|
|
3
|
+
interface AiTool {
|
|
4
|
+
tokenCount: (data: any) => number
|
|
5
|
+
smartSanitize: (text: string) => string
|
|
6
|
+
toon: (data: any) => string
|
|
7
|
+
toonToJson: (toon: string) => any
|
|
8
|
+
chunker: (text: string, options?: { size?: number, overlap?: number }) => string[]
|
|
9
|
+
similarity: (a: number[], b: number[]) => number
|
|
10
|
+
extractReasoning: (text: string) => { reasoning: string, content: string }
|
|
11
|
+
prompt: (template: string, vars: Record<string, any>) => string
|
|
12
|
+
schema: (data: any) => string
|
|
13
|
+
snapshot: () => string
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// --- anchor ---
|
|
17
|
-
interface AnchorTool {
|
|
18
|
-
/**
|
|
19
|
-
* Converts anchor tags to onClick events
|
|
20
|
-
* @param selector - CSS selector for target elements
|
|
21
|
-
*/
|
|
22
|
-
toOnClick(selector: string): void
|
|
17
|
+
interface AnchorTool {
|
|
18
|
+
/**
|
|
19
|
+
* Converts anchor tags to onClick events
|
|
20
|
+
* @param selector - CSS selector for target elements
|
|
21
|
+
*/
|
|
22
|
+
toOnClick(selector: string): void
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
// --- array ---
|
|
26
|
-
interface ArrayTool {
|
|
27
|
-
find<T>(array: T[], key: any): T
|
|
28
|
-
unique<T>(array: T[]): T[]
|
|
29
|
-
delete<T>(array: T[], key: keyof T): void
|
|
30
|
-
merge<T>(arrayA: T[], arrayB: T[]): T[]
|
|
31
|
-
mergeByKey<T extends Record<string, any>>(arrayA: T[], arrayB: T[], key: keyof T): T[]
|
|
32
|
-
asc<T>(array: T[]): T[]
|
|
33
|
-
desc<T>(array: T[]): T[]
|
|
34
|
-
duplicates<T>(array: T[]): T[]
|
|
35
|
-
even<T>(array: T[]): T[]
|
|
36
|
-
odd<T>(array: T[]): T[]
|
|
37
|
-
toObj<T>(array: T[]): Record<string, T>
|
|
38
|
-
sumColumn(array: number[][], column: number): number
|
|
39
|
-
shuffle<T>(array: T[]): T[]
|
|
40
|
-
generate(num: number): number[]
|
|
41
|
-
testArrayInt(array: unknown[]): number[]
|
|
42
|
-
rand32(number: number): number
|
|
43
|
-
findindex<T>(array: T[], key: any): number
|
|
44
|
-
pathToJson(array: string[], separator?: string): Record<string, unknown>
|
|
45
|
-
deepClone<T>(src: T): T
|
|
46
|
-
match(arrayWords: string[], arrayToCheck: string[]): boolean
|
|
26
|
+
interface ArrayTool {
|
|
27
|
+
find<T>(array: T[], key: any): T
|
|
28
|
+
unique<T>(array: T[]): T[]
|
|
29
|
+
delete<T>(array: T[], key: keyof T): void
|
|
30
|
+
merge<T>(arrayA: T[], arrayB: T[]): T[]
|
|
31
|
+
mergeByKey<T extends Record<string, any>>(arrayA: T[], arrayB: T[], key: keyof T): T[]
|
|
32
|
+
asc<T>(array: T[]): T[]
|
|
33
|
+
desc<T>(array: T[]): T[]
|
|
34
|
+
duplicates<T>(array: T[]): T[]
|
|
35
|
+
even<T>(array: T[]): T[]
|
|
36
|
+
odd<T>(array: T[]): T[]
|
|
37
|
+
toObj<T>(array: T[]): Record<string, T>
|
|
38
|
+
sumColumn(array: number[][], column: number): number
|
|
39
|
+
shuffle<T>(array: T[]): T[]
|
|
40
|
+
generate(num: number): number[]
|
|
41
|
+
testArrayInt(array: unknown[]): number[]
|
|
42
|
+
rand32(number: number): number
|
|
43
|
+
findindex<T>(array: T[], key: any): number
|
|
44
|
+
pathToJson(array: string[], separator?: string): Record<string, unknown>
|
|
45
|
+
deepClone<T>(src: T): T
|
|
46
|
+
match(arrayWords: string[], arrayToCheck: string[]): boolean
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
// --- audio ---
|
|
50
|
-
interface AudioTool {
|
|
51
|
-
/**
|
|
52
|
-
* Plays an audio file if it is not already playing.
|
|
53
|
-
* If no file is specified, removes all audio elements from the document.
|
|
54
|
-
*
|
|
55
|
-
* @param file - The name of the audio file to play.
|
|
56
|
-
* @param path - The path to the audio file.
|
|
57
|
-
* @param loop - Whether the audio should loop.
|
|
58
|
-
*/
|
|
59
|
-
play: (file?: string, path?: string, loop?: boolean) => void
|
|
50
|
+
interface AudioTool {
|
|
51
|
+
/**
|
|
52
|
+
* Plays an audio file if it is not already playing.
|
|
53
|
+
* If no file is specified, removes all audio elements from the document.
|
|
54
|
+
*
|
|
55
|
+
* @param file - The name of the audio file to play.
|
|
56
|
+
* @param path - The path to the audio file.
|
|
57
|
+
* @param loop - Whether the audio should loop.
|
|
58
|
+
*/
|
|
59
|
+
play: (file?: string, path?: string, loop?: boolean) => void
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// --- avoid ---
|
|
63
|
-
interface AvoidTool {
|
|
64
|
-
cache: (uri: string) => string
|
|
63
|
+
interface AvoidTool {
|
|
64
|
+
cache: (uri: string) => string
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
// --- biometric ---
|
|
68
|
-
interface BiometricTool {
|
|
69
|
-
isAvailable: () => boolean
|
|
70
|
-
getWebAuthnSupport: () => {
|
|
71
|
-
supported: boolean
|
|
72
|
-
platformAuthenticator: boolean
|
|
73
|
-
hybridTransport: boolean
|
|
74
|
-
uvToken: boolean
|
|
75
|
-
}
|
|
76
|
-
isSensorAvailable: (type: "fingerprint" | "face" | "iris") => Promise<boolean>
|
|
77
|
-
register: (userId: string, rpId?: string, rpName?: string, userName?: string) => Promise<{ success: boolean; credentialId?: string; error?: string }>
|
|
78
|
-
authenticate: (userId: string, rpId?: string, credentialId?: string) => Promise<{ success: boolean; error?: string }>
|
|
79
|
-
getCredential: (credentialId: string) => PublicKeyCredentialDescriptor | undefined
|
|
80
|
-
deleteCredential: (credentialId: string) => boolean
|
|
81
|
-
listCredentials: () => string[]
|
|
68
|
+
interface BiometricTool {
|
|
69
|
+
isAvailable: () => boolean
|
|
70
|
+
getWebAuthnSupport: () => {
|
|
71
|
+
supported: boolean
|
|
72
|
+
platformAuthenticator: boolean
|
|
73
|
+
hybridTransport: boolean
|
|
74
|
+
uvToken: boolean
|
|
75
|
+
}
|
|
76
|
+
isSensorAvailable: (type: "fingerprint" | "face" | "iris") => Promise<boolean>
|
|
77
|
+
register: (userId: string, rpId?: string, rpName?: string, userName?: string) => Promise<{ success: boolean; credentialId?: string; error?: string }>
|
|
78
|
+
authenticate: (userId: string, rpId?: string, credentialId?: string) => Promise<{ success: boolean; error?: string }>
|
|
79
|
+
getCredential: (credentialId: string) => PublicKeyCredentialDescriptor | undefined
|
|
80
|
+
deleteCredential: (credentialId: string) => boolean
|
|
81
|
+
listCredentials: () => string[]
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
// --- browser ---
|
|
85
|
-
interface BrowserTool {
|
|
86
|
-
state(state: any, title: any, url: any): void
|
|
87
|
-
forw(times: number): void
|
|
88
|
-
back(times: number): void
|
|
89
|
-
reload(): void
|
|
90
|
-
href(url: string): void
|
|
91
|
-
offLine(text?: string): void
|
|
92
|
-
zoom(): number
|
|
93
|
-
status(code: number): string
|
|
94
|
-
interlock(onUpdate: (tabs: number) => void): void
|
|
85
|
+
interface BrowserTool {
|
|
86
|
+
state(state: any, title: any, url: any): void
|
|
87
|
+
forw(times: number): void
|
|
88
|
+
back(times: number): void
|
|
89
|
+
reload(): void
|
|
90
|
+
href(url: string): void
|
|
91
|
+
offLine(text?: string): void
|
|
92
|
+
zoom(): number
|
|
93
|
+
status(code: number): string
|
|
94
|
+
interlock(onUpdate: (tabs: number) => void): void
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// --- check ---
|
|
98
|
-
interface CheckTool {
|
|
99
|
-
url: (url: string) => any
|
|
100
|
-
version: (v1: string, v2: string, opts?: any) => any
|
|
101
|
-
npmVer: (npm: string) => any
|
|
98
|
+
interface CheckTool {
|
|
99
|
+
url: (url: string) => any
|
|
100
|
+
version: (v1: string, v2: string, opts?: any) => any
|
|
101
|
+
npmVer: (npm: string) => any
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
// --- color ---
|
|
105
|
-
interface ColorTool {
|
|
106
|
-
hex: (c: any) => string
|
|
107
|
-
toHex: (rgb: any) => string
|
|
108
|
-
toRGB: (c: any) => number[]
|
|
109
|
-
oleColor: (c: any) => string
|
|
110
|
-
gradient: (colorStart: any, colorEnd: any, colorCount: any) => any
|
|
105
|
+
interface ColorTool {
|
|
106
|
+
hex: (c: any) => string
|
|
107
|
+
toHex: (rgb: any) => string
|
|
108
|
+
toRGB: (c: any) => number[]
|
|
109
|
+
oleColor: (c: any) => string
|
|
110
|
+
gradient: (colorStart: any, colorEnd: any, colorCount: any) => any
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
// --- compress ---
|
|
114
|
-
interface CompressTool {
|
|
115
|
-
gzip: (data: string | Uint8Array) => Promise<Blob>
|
|
116
|
-
gunzip: (blob: Blob) => Promise<string>
|
|
117
|
-
deflate: (data: string | Uint8Array) => Promise<Blob>
|
|
118
|
-
inflate: (blob: Blob) => Promise<string>
|
|
119
|
-
compress: (data: string) => string
|
|
120
|
-
decompress: (data: string) => string
|
|
121
|
-
base64Encode: (data: string) => string
|
|
122
|
-
base64Decode: (data: string) => string
|
|
123
|
-
urlEncode: (data: string) => string
|
|
124
|
-
urlDecode: (data: string) => string
|
|
125
|
-
htmlEncode: (data: string) => string
|
|
126
|
-
htmlDecode: (data: string) => string
|
|
114
|
+
interface CompressTool {
|
|
115
|
+
gzip: (data: string | Uint8Array) => Promise<Blob>
|
|
116
|
+
gunzip: (blob: Blob) => Promise<string>
|
|
117
|
+
deflate: (data: string | Uint8Array) => Promise<Blob>
|
|
118
|
+
inflate: (blob: Blob) => Promise<string>
|
|
119
|
+
compress: (data: string) => string
|
|
120
|
+
decompress: (data: string) => string
|
|
121
|
+
base64Encode: (data: string) => string
|
|
122
|
+
base64Decode: (data: string) => string
|
|
123
|
+
urlEncode: (data: string) => string
|
|
124
|
+
urlDecode: (data: string) => string
|
|
125
|
+
htmlEncode: (data: string) => string
|
|
126
|
+
htmlDecode: (data: string) => string
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
// --- cookie ---
|
|
130
|
-
interface CookieTool {
|
|
131
|
-
set: (pars: {
|
|
132
|
-
name: any,
|
|
133
|
-
value: any,
|
|
134
|
-
time?: any,
|
|
135
|
-
path?: string,
|
|
136
|
-
sameSite?: string,
|
|
137
|
-
secure?: string
|
|
138
|
-
}) => any
|
|
139
|
-
get: (name: string) => any
|
|
140
|
-
delete: (name: string) => any
|
|
141
|
-
removeAll: () => any
|
|
130
|
+
interface CookieTool {
|
|
131
|
+
set: (pars: {
|
|
132
|
+
name: any,
|
|
133
|
+
value: any,
|
|
134
|
+
time?: any,
|
|
135
|
+
path?: string,
|
|
136
|
+
sameSite?: string,
|
|
137
|
+
secure?: string
|
|
138
|
+
}) => any
|
|
139
|
+
get: (name: string) => any
|
|
140
|
+
delete: (name: string) => any
|
|
141
|
+
removeAll: () => any
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
// --- coords ---
|
|
145
|
-
interface CoordsTool {
|
|
146
|
-
degreesToRadians: (degrees: any) => any
|
|
147
|
-
latToMeters: (points: any) => any
|
|
148
|
-
toVector: (points: any) => any
|
|
149
|
-
convertToDecDegrees: (deg: any, minutes: any, sec: any, direction: any) => any
|
|
150
|
-
distance: (point1: any, point2: any) => any
|
|
151
|
-
polarToCartesian: (centerX: any, centerY: any, radius: any, angleInDegrees: any) => any
|
|
152
|
-
mapDegreesToPixels: (degree: number, minDegree: number, maxDegree: number, minPixel: number, maxPixel: number, padding: number) => number
|
|
145
|
+
interface CoordsTool {
|
|
146
|
+
degreesToRadians: (degrees: any) => any
|
|
147
|
+
latToMeters: (points: any) => any
|
|
148
|
+
toVector: (points: any) => any
|
|
149
|
+
convertToDecDegrees: (deg: any, minutes: any, sec: any, direction: any) => any
|
|
150
|
+
distance: (point1: any, point2: any) => any
|
|
151
|
+
polarToCartesian: (centerX: any, centerY: any, radius: any, angleInDegrees: any) => any
|
|
152
|
+
mapDegreesToPixels: (degree: number, minDegree: number, maxDegree: number, minPixel: number, maxPixel: number, padding: number) => number
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// --- credits ---
|
|
156
|
-
interface Credits {
|
|
157
|
-
name: string
|
|
158
|
-
version: string
|
|
159
|
-
description: string
|
|
160
|
-
license: string
|
|
161
|
-
author: {
|
|
162
|
-
name: string
|
|
163
|
-
email: string
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
156
|
+
interface Credits {
|
|
157
|
+
name: string
|
|
158
|
+
version: string
|
|
159
|
+
description: string
|
|
160
|
+
license: string
|
|
161
|
+
author: {
|
|
162
|
+
name: string
|
|
163
|
+
email: string
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
167
|
type CreditsTool = (props: Credits) => void
|
|
168
168
|
|
|
169
169
|
// --- date ---
|
|
170
|
-
interface DateTool {
|
|
171
|
-
days: (lang?: string) => string[]
|
|
172
|
-
months: (lang?: string) => string[]
|
|
173
|
-
year: () => number
|
|
174
|
-
toIso: (value: any, int?: string) => string | null
|
|
175
|
-
toMMDDYYYY: (value: any) => string
|
|
176
|
-
toYYYYMMDD: (value: any) => string | undefined
|
|
177
|
-
toHuman: (value: any) => string
|
|
178
|
-
convert: (value: any, format: string[]) => string | null
|
|
179
|
-
iso2Epoch: (value: any) => number
|
|
180
|
-
localIsoTime: (value: any) => string
|
|
181
|
-
utc: () => string
|
|
182
|
-
parse: (value: any, separator?: string) => string | null
|
|
183
|
-
addDays: (date: any, days: number) => Date
|
|
184
|
-
dateTimeToString: (dateObject: any) => string
|
|
185
|
-
isoToHuman: (value: any, symbol?: string) => string | null
|
|
186
|
-
fullDate: () => string
|
|
187
|
-
epoch: () => number
|
|
188
|
-
diffInDays: (d1: any, d2: any) => number
|
|
189
|
-
diffInWeeks: (d1: any, d2: any) => number
|
|
190
|
-
diffInMonths: (d1: any, d2: any) => number
|
|
191
|
-
diffInYears: (d1: any, d2: any) => number
|
|
192
|
-
dateToYMD: (date: any) => string
|
|
193
|
-
collection: (params: { date?: Date; type: string; locale?: string }) => string | undefined
|
|
194
|
-
timeZones: () => string[]
|
|
170
|
+
interface DateTool {
|
|
171
|
+
days: (lang?: string) => string[]
|
|
172
|
+
months: (lang?: string) => string[]
|
|
173
|
+
year: () => number
|
|
174
|
+
toIso: (value: any, int?: string) => string | null
|
|
175
|
+
toMMDDYYYY: (value: any) => string
|
|
176
|
+
toYYYYMMDD: (value: any) => string | undefined
|
|
177
|
+
toHuman: (value: any) => string
|
|
178
|
+
convert: (value: any, format: string[]) => string | null
|
|
179
|
+
iso2Epoch: (value: any) => number
|
|
180
|
+
localIsoTime: (value: any) => string
|
|
181
|
+
utc: () => string
|
|
182
|
+
parse: (value: any, separator?: string) => string | null
|
|
183
|
+
addDays: (date: any, days: number) => Date
|
|
184
|
+
dateTimeToString: (dateObject: any) => string
|
|
185
|
+
isoToHuman: (value: any, symbol?: string) => string | null
|
|
186
|
+
fullDate: () => string
|
|
187
|
+
epoch: () => number
|
|
188
|
+
diffInDays: (d1: any, d2: any) => number
|
|
189
|
+
diffInWeeks: (d1: any, d2: any) => number
|
|
190
|
+
diffInMonths: (d1: any, d2: any) => number
|
|
191
|
+
diffInYears: (d1: any, d2: any) => number
|
|
192
|
+
dateToYMD: (date: any) => string
|
|
193
|
+
collection: (params: { date?: Date; type: string; locale?: string }) => string | undefined
|
|
194
|
+
timeZones: () => string[]
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
// --- disable ---
|
|
198
|
-
interface DisableTool {
|
|
199
|
-
select: (el?: string) => void
|
|
200
|
-
spellCheck: (tmr?: number) => void
|
|
201
|
-
rightClick: (el?: string) => void
|
|
202
|
-
copy: (el?: string) => void
|
|
203
|
-
paste: (el?: string) => void
|
|
204
|
-
cut: (el?: string) => void
|
|
205
|
-
drag: (el?: string) => void
|
|
198
|
+
interface DisableTool {
|
|
199
|
+
select: (el?: string) => void
|
|
200
|
+
spellCheck: (tmr?: number) => void
|
|
201
|
+
rightClick: (el?: string) => void
|
|
202
|
+
copy: (el?: string) => void
|
|
203
|
+
paste: (el?: string) => void
|
|
204
|
+
cut: (el?: string) => void
|
|
205
|
+
drag: (el?: string) => void
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
// --- dispatch ---
|
|
209
|
-
interface DispatchTool {
|
|
210
|
-
set: (name: string, value?: any) => void
|
|
211
|
-
listen: (name: string, cb?: (e: Event) => void, flag?: boolean) => void
|
|
212
|
-
remove: (name: string) => void
|
|
209
|
+
interface DispatchTool {
|
|
210
|
+
set: (name: string, value?: any) => void
|
|
211
|
+
listen: (name: string, cb?: (e: Event) => void, flag?: boolean) => void
|
|
212
|
+
remove: (name: string) => void
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// --- elements ---
|
|
216
|
-
interface ElementsTool {
|
|
217
|
-
fitScale: (el: any, scale?: number, fit?: boolean) => void
|
|
218
|
-
scaleBasedOnWindow: (elm: any, scale: number, fit: boolean) => void
|
|
216
|
+
interface ElementsTool {
|
|
217
|
+
fitScale: (el: any, scale?: number, fit?: boolean) => void
|
|
218
|
+
scaleBasedOnWindow: (elm: any, scale: number, fit: boolean) => void
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
// --- events ---
|
|
222
|
-
interface EventsTool {
|
|
223
|
-
list: (el: Element) => any
|
|
224
|
-
multi: (element: Element, eventNames: string, listener: EventListener) => void
|
|
225
|
-
copy: (el: string) => void
|
|
226
|
-
onDrag: (elem: string) => void
|
|
227
|
-
keys: (e: KeyboardEvent) => { key: string; ctrl: boolean; alt: boolean; shift: boolean }
|
|
222
|
+
interface EventsTool {
|
|
223
|
+
list: (el: Element) => any
|
|
224
|
+
multi: (element: Element, eventNames: string, listener: EventListener) => void
|
|
225
|
+
copy: (el: string) => void
|
|
226
|
+
onDrag: (elem: string) => void
|
|
227
|
+
keys: (e: KeyboardEvent) => { key: string; ctrl: boolean; alt: boolean; shift: boolean }
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
// --- fetch ---
|
|
231
|
-
interface FetchTool {
|
|
232
|
-
/**
|
|
233
|
-
* Perform a resilient fetch with automatic retries and exponential backoff.
|
|
234
|
-
*/
|
|
235
|
-
(url: string, options?: any, retries?: number, backoff?: number): Promise<Response>
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Perform a GET request.
|
|
239
|
-
*/
|
|
240
|
-
get: (url: string, options?: any) => Promise<Response>
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Perform a POST request with optional JSON body auto-serialization.
|
|
244
|
-
*/
|
|
245
|
-
post: (url: string, body: any, options?: any) => Promise<Response>
|
|
231
|
+
interface FetchTool {
|
|
232
|
+
/**
|
|
233
|
+
* Perform a resilient fetch with automatic retries and exponential backoff.
|
|
234
|
+
*/
|
|
235
|
+
(url: string, options?: any, retries?: number, backoff?: number): Promise<Response>
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Perform a GET request.
|
|
239
|
+
*/
|
|
240
|
+
get: (url: string, options?: any) => Promise<Response>
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Perform a POST request with optional JSON body auto-serialization.
|
|
244
|
+
*/
|
|
245
|
+
post: (url: string, body: any, options?: any) => Promise<Response>
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
// --- form ---
|
|
249
|
-
interface FormTool {
|
|
250
|
-
serialize: (form: HTMLFormElement) => { [key: string]: any }
|
|
251
|
-
confirmType: (type: string, value: any) => boolean
|
|
252
|
-
required: (value: any) => string | undefined
|
|
253
|
-
minLength: (value: any, num?: number) => string | undefined
|
|
254
|
-
maxLength: (value: any, num?: number) => string | undefined
|
|
255
|
-
maxPhoneNumber: (value: any, num?: number) => string | undefined
|
|
256
|
-
isNumeric: (value: any) => boolean
|
|
257
|
-
isEmail: (value: any) => boolean
|
|
258
|
-
pattern: (e: Event) => void
|
|
259
|
-
noSpecialChars: (e: Event) => void
|
|
260
|
-
table: (size: [number, number], id: string, elem: HTMLElement) => void
|
|
261
|
-
sanitize: (str: string) => string | undefined
|
|
249
|
+
interface FormTool {
|
|
250
|
+
serialize: (form: HTMLFormElement) => { [key: string]: any }
|
|
251
|
+
confirmType: (type: string, value: any) => boolean
|
|
252
|
+
required: (value: any) => string | undefined
|
|
253
|
+
minLength: (value: any, num?: number) => string | undefined
|
|
254
|
+
maxLength: (value: any, num?: number) => string | undefined
|
|
255
|
+
maxPhoneNumber: (value: any, num?: number) => string | undefined
|
|
256
|
+
isNumeric: (value: any) => boolean
|
|
257
|
+
isEmail: (value: any) => boolean
|
|
258
|
+
pattern: (e: Event) => void
|
|
259
|
+
noSpecialChars: (e: Event) => void
|
|
260
|
+
table: (size: [number, number], id: string, elem: HTMLElement) => void
|
|
261
|
+
sanitize: (str: string) => string | undefined
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// --- format ---
|
|
265
|
-
interface FormatTool {
|
|
266
|
-
currency: (value: number, locale?: string, currency?: string) => string
|
|
267
|
-
phoneNumber: (value: string, countryCode?: string) => string
|
|
265
|
+
interface FormatTool {
|
|
266
|
+
currency: (value: number, locale?: string, currency?: string) => string
|
|
267
|
+
phoneNumber: (value: string, countryCode?: string) => string
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
// --- i18n ---
|
|
271
|
-
interface I18nTool {
|
|
272
|
-
setLocale: (locale: string) => void
|
|
273
|
-
getLocale: () => string
|
|
274
|
-
addTranslations: (locale: string, strings: Record<string, string>) => void
|
|
275
|
-
t: (key: string, vars?: Record<string, any>) => string
|
|
276
|
-
pluralize: (count: number, options: { zero?: string; one?: string; two?: string; few?: string; many?: string; other?: string }, locale?: string) => string
|
|
277
|
-
number: (value: number, locale?: string, options?: Intl.NumberFormatOptions) => string
|
|
278
|
-
date: (value: Date | number, locale?: string, options?: Intl.DateTimeFormatOptions) => string
|
|
279
|
-
relativeTime: (timestamp: number | Date, locale?: string) => string
|
|
280
|
-
list: (items: string[], locale?: string, options?: Intl.ListFormatOptions) => string
|
|
281
|
-
getSupportedLocales: () => string[]
|
|
271
|
+
interface I18nTool {
|
|
272
|
+
setLocale: (locale: string) => void
|
|
273
|
+
getLocale: () => string
|
|
274
|
+
addTranslations: (locale: string, strings: Record<string, string>) => void
|
|
275
|
+
t: (key: string, vars?: Record<string, any>) => string
|
|
276
|
+
pluralize: (count: number, options: { zero?: string; one?: string; two?: string; few?: string; many?: string; other?: string }, locale?: string) => string
|
|
277
|
+
number: (value: number, locale?: string, options?: Intl.NumberFormatOptions) => string
|
|
278
|
+
date: (value: Date | number, locale?: string, options?: Intl.DateTimeFormatOptions) => string
|
|
279
|
+
relativeTime: (timestamp: number | Date, locale?: string) => string
|
|
280
|
+
list: (items: string[], locale?: string, options?: Intl.ListFormatOptions) => string
|
|
281
|
+
getSupportedLocales: () => string[]
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
// --- image ---
|
|
285
|
-
interface ImageTool {
|
|
286
|
-
resize: (img: HTMLImageElement, width: number, height: number, quality?: "pixelated" | "auto") => string
|
|
287
|
-
crop: (img: HTMLImageElement, region: { x: number; y: number; width: number; height: number }) => string
|
|
288
|
-
toDataURL: (img: HTMLImageElement | HTMLCanvasElement, format?: string, quality?: number) => string
|
|
289
|
-
fromDataURL: (dataURL: string) => Promise<HTMLImageElement>
|
|
290
|
-
filter: (img: HTMLImageElement, options: { brightness?: number; contrast?: number; saturate?: number; hueRotate?: number; invert?: number; sepia?: number; blur?: number; grayscale?: number }) => string
|
|
291
|
-
rotate: (img: HTMLImageElement, degrees: number) => string
|
|
292
|
-
flip: (img: HTMLImageElement, direction: "horizontal" | "vertical") => string
|
|
293
|
-
grayscale: (img: HTMLImageElement) => string
|
|
294
|
-
blur: (img: HTMLImageElement, radius: number) => string
|
|
295
|
-
getDimensions: (img: HTMLImageElement | HTMLCanvasElement) => { width: number; height: number }
|
|
296
|
-
load: (src: string) => Promise<HTMLImageElement>
|
|
297
|
-
composite: (img1: HTMLImageElement, img2: HTMLImageElement, mode?: "source-over" | "multiply" | "screen" | "overlay" | "darken" | "lighten", x?: number, y?: number) => string
|
|
285
|
+
interface ImageTool {
|
|
286
|
+
resize: (img: HTMLImageElement, width: number, height: number, quality?: "pixelated" | "auto") => string
|
|
287
|
+
crop: (img: HTMLImageElement, region: { x: number; y: number; width: number; height: number }) => string
|
|
288
|
+
toDataURL: (img: HTMLImageElement | HTMLCanvasElement, format?: string, quality?: number) => string
|
|
289
|
+
fromDataURL: (dataURL: string) => Promise<HTMLImageElement>
|
|
290
|
+
filter: (img: HTMLImageElement, options: { brightness?: number; contrast?: number; saturate?: number; hueRotate?: number; invert?: number; sepia?: number; blur?: number; grayscale?: number }) => string
|
|
291
|
+
rotate: (img: HTMLImageElement, degrees: number) => string
|
|
292
|
+
flip: (img: HTMLImageElement, direction: "horizontal" | "vertical") => string
|
|
293
|
+
grayscale: (img: HTMLImageElement) => string
|
|
294
|
+
blur: (img: HTMLImageElement, radius: number) => string
|
|
295
|
+
getDimensions: (img: HTMLImageElement | HTMLCanvasElement) => { width: number; height: number }
|
|
296
|
+
load: (src: string) => Promise<HTMLImageElement>
|
|
297
|
+
composite: (img1: HTMLImageElement, img2: HTMLImageElement, mode?: "source-over" | "multiply" | "screen" | "overlay" | "darken" | "lighten", x?: number, y?: number) => string
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
// --- json ---
|
|
301
|
-
interface JsonTool {
|
|
302
|
-
counter: (json: any, key?: string, val?: any) => number | null
|
|
303
|
-
toCsv: (jsonInput: any) => string
|
|
304
|
-
saveCsvAs: (csvData: string, fileName: string) => void
|
|
305
|
-
is: (str: string) => boolean
|
|
306
|
-
parse: (file: string) => any
|
|
307
|
-
sanitize: (str: string) => string
|
|
308
|
-
sanitizeJsonValue: (str: string) => string
|
|
301
|
+
interface JsonTool {
|
|
302
|
+
counter: (json: any, key?: string, val?: any) => number | null
|
|
303
|
+
toCsv: (jsonInput: any) => string
|
|
304
|
+
saveCsvAs: (csvData: string, fileName: string) => void
|
|
305
|
+
is: (str: string) => boolean
|
|
306
|
+
parse: (file: string) => any
|
|
307
|
+
sanitize: (str: string) => string
|
|
308
|
+
sanitizeJsonValue: (str: string) => string
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
// --- load ---
|
|
312
|
-
interface LoadTool {
|
|
313
|
-
all: (context: any, cacheName?: string) => void
|
|
314
|
-
file: (filePath: string) => Promise<string>
|
|
315
|
-
fileToElement: (elementSelector: string, filePath: string) => Promise<void>
|
|
316
|
-
json: (filePath: string) => Promise<any>
|
|
317
|
-
remote: (path: string, method?: string, headers?: HeadersInit) => Promise<any>
|
|
318
|
-
script: (scripts: string[], elementSelector?: string) => void
|
|
319
|
-
toJson: (context: any, cacheName?: string) => void
|
|
312
|
+
interface LoadTool {
|
|
313
|
+
all: (context: any, cacheName?: string) => void
|
|
314
|
+
file: (filePath: string) => Promise<string>
|
|
315
|
+
fileToElement: (elementSelector: string, filePath: string) => Promise<void>
|
|
316
|
+
json: (filePath: string) => Promise<any>
|
|
317
|
+
remote: (path: string, method?: string, headers?: HeadersInit) => Promise<any>
|
|
318
|
+
script: (scripts: string[], elementSelector?: string) => void
|
|
319
|
+
toJson: (context: any, cacheName?: string) => void
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
// --- logging ---
|
|
323
|
-
interface LoggingTool {
|
|
324
|
-
list: {
|
|
325
|
-
type: string
|
|
326
|
-
message: string
|
|
327
|
-
}[]
|
|
328
|
-
reg: (txt: string) => void
|
|
329
|
-
debug: (txt: string) => void
|
|
330
|
-
error: (txt: string) => void
|
|
323
|
+
interface LoggingTool {
|
|
324
|
+
list: {
|
|
325
|
+
type: string
|
|
326
|
+
message: string
|
|
327
|
+
}[]
|
|
328
|
+
reg: (txt: string) => void
|
|
329
|
+
debug: (txt: string) => void
|
|
330
|
+
error: (txt: string) => void
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
// --- math ---
|
|
334
|
-
interface MathTool {
|
|
335
|
-
rnd: () => number
|
|
336
|
-
tmr: () => number
|
|
337
|
-
add: (a: number, b: number) => number
|
|
338
|
-
sub: (a: number, b: number) => number
|
|
339
|
-
multi: (a: number, b: number) => number
|
|
340
|
-
div: (a: number, b: number) => number
|
|
341
|
-
rem: (a: number, b: number) => number
|
|
342
|
-
exp: (a: number, b: number) => number
|
|
343
|
-
isOdd: (a: number) => boolean
|
|
344
|
-
float2int: (a: number) => number
|
|
345
|
-
percent: (n: number, tot: number) => number
|
|
346
|
-
isPrime: (n: number) => boolean
|
|
334
|
+
interface MathTool {
|
|
335
|
+
rnd: () => number
|
|
336
|
+
tmr: () => number
|
|
337
|
+
add: (a: number, b: number) => number
|
|
338
|
+
sub: (a: number, b: number) => number
|
|
339
|
+
multi: (a: number, b: number) => number
|
|
340
|
+
div: (a: number, b: number) => number
|
|
341
|
+
rem: (a: number, b: number) => number
|
|
342
|
+
exp: (a: number, b: number) => number
|
|
343
|
+
isOdd: (a: number) => boolean
|
|
344
|
+
float2int: (a: number) => number
|
|
345
|
+
percent: (n: number, tot: number) => number
|
|
346
|
+
isPrime: (n: number) => boolean
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
// --- memory ---
|
|
350
|
-
interface MemoryTool {
|
|
351
|
-
lock: (obj: string) => void
|
|
352
|
-
unlock: (obj: string) => void
|
|
350
|
+
interface MemoryTool {
|
|
351
|
+
lock: (obj: string) => void
|
|
352
|
+
unlock: (obj: string) => void
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
// --- navigation ---
|
|
356
|
-
interface NavigationTool {
|
|
357
|
-
load(url: string): Promise<void>
|
|
358
|
-
ajax(): void
|
|
359
|
-
ajax_running?: boolean
|
|
356
|
+
interface NavigationTool {
|
|
357
|
+
load(url: string): Promise<void>
|
|
358
|
+
ajax(): void
|
|
359
|
+
ajax_running?: boolean
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
// --- net ---
|
|
363
|
-
interface NetTool {
|
|
364
|
-
/**
|
|
365
|
-
* Smart Fetch with automatic retry and exponential backoff.
|
|
366
|
-
* @param url The URL to fetch.
|
|
367
|
-
* @param options Fetch options (method, headers, body, etc.)
|
|
368
|
-
* @param retries Number of retry attempts (default: 3)
|
|
369
|
-
* @param backoff Initial backoff delay in ms (default: 1000)
|
|
370
|
-
* @returns Promise resolving to the Response
|
|
371
|
-
*/
|
|
372
|
-
smartFetch(url: string, options?: RequestInit, retries?: number, backoff?: number): Promise<Response>
|
|
363
|
+
interface NetTool {
|
|
364
|
+
/**
|
|
365
|
+
* Smart Fetch with automatic retry and exponential backoff.
|
|
366
|
+
* @param url The URL to fetch.
|
|
367
|
+
* @param options Fetch options (method, headers, body, etc.)
|
|
368
|
+
* @param retries Number of retry attempts (default: 3)
|
|
369
|
+
* @param backoff Initial backoff delay in ms (default: 1000)
|
|
370
|
+
* @returns Promise resolving to the Response
|
|
371
|
+
*/
|
|
372
|
+
smartFetch(url: string, options?: RequestInit, retries?: number, backoff?: number): Promise<Response>
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
// --- objects ---
|
|
376
|
-
interface ObjectsTool {
|
|
377
|
-
toArray: (object: Record<string, any>) => [string, any][]
|
|
378
|
-
replaceNullObjects: (data: Record<string, any>) => Record<string, any>
|
|
379
|
-
serialize: (value: any) => any
|
|
380
|
-
deSerialize: (valueNew: any) => any
|
|
381
|
-
sort: (o: Record<string, any>) => Record<string, any>
|
|
382
|
-
toXML: (obj: Record<string, any>) => string
|
|
383
|
-
find: (array: any[], key: string, value: any) => any
|
|
384
|
-
instance: (obj: any) => any
|
|
385
|
-
updateByKey: (obj: Record<string, any>, key: string, newValue: any) => Record<string, any>
|
|
386
|
-
findindex: (array: any[], key: string) => number
|
|
387
|
-
parse: (val: any) => any
|
|
388
|
-
isObject: (val: any) => boolean
|
|
389
|
-
diff: (obj1: Record<string, any>, obj2: Record<string, any>) => Record<string, { obj1: any, obj2: any }>
|
|
390
|
-
path: (prop: string, array: string[], separator?: string) => string
|
|
376
|
+
interface ObjectsTool {
|
|
377
|
+
toArray: (object: Record<string, any>) => [string, any][]
|
|
378
|
+
replaceNullObjects: (data: Record<string, any>) => Record<string, any>
|
|
379
|
+
serialize: (value: any) => any
|
|
380
|
+
deSerialize: (valueNew: any) => any
|
|
381
|
+
sort: (o: Record<string, any>) => Record<string, any>
|
|
382
|
+
toXML: (obj: Record<string, any>) => string
|
|
383
|
+
find: (array: any[], key: string, value: any) => any
|
|
384
|
+
instance: (obj: any) => any
|
|
385
|
+
updateByKey: (obj: Record<string, any>, key: string, newValue: any) => Record<string, any>
|
|
386
|
+
findindex: (array: any[], key: string) => number
|
|
387
|
+
parse: (val: any) => any
|
|
388
|
+
isObject: (val: any) => boolean
|
|
389
|
+
diff: (obj1: Record<string, any>, obj2: Record<string, any>) => Record<string, { obj1: any, obj2: any }>
|
|
390
|
+
path: (prop: string, array: string[], separator?: string) => string
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
// --- path ---
|
|
394
|
-
interface PathTool {
|
|
395
|
-
rail: () => string[]
|
|
396
|
-
hash: () => string[]
|
|
397
|
-
query: (url: string) => Record<string, string>
|
|
394
|
+
interface PathTool {
|
|
395
|
+
rail: () => string[]
|
|
396
|
+
hash: () => string[]
|
|
397
|
+
query: (url: string) => Record<string, string>
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
// --- promise ---
|
|
401
|
-
interface PromiseTool {
|
|
402
|
-
check: (p: any) => boolean
|
|
403
|
-
resolve: (data: any) => Promise<any>
|
|
401
|
+
interface PromiseTool {
|
|
402
|
+
check: (p: any) => boolean
|
|
403
|
+
resolve: (data: any) => Promise<any>
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
// --- sanitize ---
|
|
407
|
-
interface SanitizeTool {
|
|
408
|
-
html: (s: string) => string
|
|
407
|
+
interface SanitizeTool {
|
|
408
|
+
html: (s: string) => string
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
// --- screen ---
|
|
412
|
-
interface ScreenTool {
|
|
413
|
-
fullScreen: (el: string) => void
|
|
414
|
-
toggle: (el: string) => void
|
|
415
|
-
info: () => {
|
|
416
|
-
width: number
|
|
417
|
-
height: number
|
|
418
|
-
availWidth: number
|
|
419
|
-
availHeight: number
|
|
420
|
-
colorDepth: number
|
|
421
|
-
pixelDepth: number
|
|
422
|
-
}
|
|
412
|
+
interface ScreenTool {
|
|
413
|
+
fullScreen: (el: string) => void
|
|
414
|
+
toggle: (el: string) => void
|
|
415
|
+
info: () => {
|
|
416
|
+
width: number
|
|
417
|
+
height: number
|
|
418
|
+
availWidth: number
|
|
419
|
+
availHeight: number
|
|
420
|
+
colorDepth: number
|
|
421
|
+
pixelDepth: number
|
|
422
|
+
}
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
// --- scrollbar ---
|
|
426
|
-
interface ScrollbarTool {
|
|
427
|
-
custom: (el: string, options: any) => void
|
|
428
|
-
indicator: (props: any) => void
|
|
429
|
-
position: {
|
|
430
|
-
get: (el: any) => void
|
|
431
|
-
set: (el: any) => void
|
|
432
|
-
}
|
|
433
|
-
smooth: (target: any, speed: any, smooth: any) => void
|
|
434
|
-
scrollTo: (container: string, element: string, gap?: number) => void
|
|
426
|
+
interface ScrollbarTool {
|
|
427
|
+
custom: (el: string, options: any) => void
|
|
428
|
+
indicator: (props: any) => void
|
|
429
|
+
position: {
|
|
430
|
+
get: (el: any) => void
|
|
431
|
+
set: (el: any) => void
|
|
432
|
+
}
|
|
433
|
+
smooth: (target: any, speed: any, smooth: any) => void
|
|
434
|
+
scrollTo: (container: string, element: string, gap?: number) => void
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
// --- security ---
|
|
438
|
-
interface SecurityTool {
|
|
439
|
-
uuid: {
|
|
440
|
-
byVal: (string: string) => string
|
|
441
|
-
v4: string
|
|
442
|
-
v5: string
|
|
443
|
-
}
|
|
444
|
-
hashPass: (u: string, p: string) => Promise<string>
|
|
445
|
-
crypt: (u: string, p: string) => Promise<string>
|
|
446
|
-
deCrypt: (u: string, p: string) => Promise<string>
|
|
447
|
-
AES_KeyGen: (passKey?: string) => Promise<string>
|
|
448
|
-
SHA256_Hex: (passKey: string) => Promise<string>
|
|
449
|
-
ulid: () => string
|
|
450
|
-
fingerprint: (options?: { requireConsent?: boolean; consent?: boolean }) => Promise<string>
|
|
451
|
-
saveEncrypted: (key: string, value: string, secret: string) => Promise<void>
|
|
452
|
-
getEncrypted: (key: string, secret: string) => Promise<string | null>
|
|
438
|
+
interface SecurityTool {
|
|
439
|
+
uuid: {
|
|
440
|
+
byVal: (string: string) => string
|
|
441
|
+
v4: string
|
|
442
|
+
v5: string
|
|
443
|
+
}
|
|
444
|
+
hashPass: (u: string, p: string) => Promise<string>
|
|
445
|
+
crypt: (u: string, p: string) => Promise<string>
|
|
446
|
+
deCrypt: (u: string, p: string) => Promise<string>
|
|
447
|
+
AES_KeyGen: (passKey?: string) => Promise<string>
|
|
448
|
+
SHA256_Hex: (passKey: string) => Promise<string>
|
|
449
|
+
ulid: () => string
|
|
450
|
+
fingerprint: (options?: { requireConsent?: boolean; consent?: boolean }) => Promise<string>
|
|
451
|
+
saveEncrypted: (key: string, value: string, secret: string) => Promise<void>
|
|
452
|
+
getEncrypted: (key: string, secret: string) => Promise<string | null>
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
// --- shortcut ---
|
|
456
|
-
interface ShortcutTool {
|
|
457
|
-
keys: (e: any, trigger: any) => void
|
|
456
|
+
interface ShortcutTool {
|
|
457
|
+
keys: (e: any, trigger: any) => void
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
// --- socket ---
|
|
461
|
-
interface SocketTool {
|
|
462
|
-
info: () => string
|
|
463
|
-
start: (server: any, name: string) => void
|
|
464
|
-
conn: (id: any, server: any, name: string) => void
|
|
465
|
-
connect: (server: any, name: string) => void
|
|
466
|
-
open: (id: any, server: any, name: string) => void
|
|
467
|
-
ping: (name: string) => void
|
|
468
|
-
send: (mex: any, name: string) => void
|
|
469
|
-
receive: (func: Function, name: string) => void
|
|
470
|
-
keepAlive: (name: string) => void
|
|
471
|
-
check: () => void
|
|
472
|
-
list: () => WebSocket[]
|
|
473
|
-
close: (name: string) => void
|
|
461
|
+
interface SocketTool {
|
|
462
|
+
info: () => string
|
|
463
|
+
start: (server: any, name: string) => void
|
|
464
|
+
conn: (id: any, server: any, name: string) => void
|
|
465
|
+
connect: (server: any, name: string) => void
|
|
466
|
+
open: (id: any, server: any, name: string) => void
|
|
467
|
+
ping: (name: string) => void
|
|
468
|
+
send: (mex: any, name: string) => void
|
|
469
|
+
receive: (func: Function, name: string) => void
|
|
470
|
+
keepAlive: (name: string) => void
|
|
471
|
+
check: () => void
|
|
472
|
+
list: () => WebSocket[]
|
|
473
|
+
close: (name: string) => void
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
// --- sse ---
|
|
477
|
-
interface SseTool {
|
|
478
|
-
/**
|
|
479
|
-
* Opens an SSE connection with support for custom fetch options (POST, Headers, etc).
|
|
480
|
-
*/
|
|
481
|
-
open(url: string, options?: any): {
|
|
482
|
-
on(event: "message" | "error" | "open", cb: (data: any) => void): void
|
|
483
|
-
close(): void
|
|
484
|
-
}
|
|
477
|
+
interface SseTool {
|
|
478
|
+
/**
|
|
479
|
+
* Opens an SSE connection with support for custom fetch options (POST, Headers, etc).
|
|
480
|
+
*/
|
|
481
|
+
open(url: string, options?: any): {
|
|
482
|
+
on(event: "message" | "error" | "open", cb: (data: any) => void): void
|
|
483
|
+
close(): void
|
|
484
|
+
}
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
// --- svg ---
|
|
488
|
-
interface SvgTool {
|
|
489
|
-
init: (container: HTMLElement, source1: [HTMLElement, string], source2: [HTMLElement, string], cb?: Function) => void
|
|
490
|
-
check: () => boolean
|
|
491
|
-
update: (rect1: HTMLElement, rect2: HTMLElement, cxn: HTMLElement) => void
|
|
492
|
-
getCurve: (p1: [number, number], p2: [number, number], dx: number) => string
|
|
493
|
-
getIntersection: (dx: number, dy: number, cx: number, cy: number, w: number, h: number) => [number, number]
|
|
494
|
-
setConnector: (source: HTMLElement, side: string) => HTMLElement
|
|
495
|
-
removeConnection: (container: HTMLElement) => void
|
|
496
|
-
makeScrollable: (svgContainer: HTMLElement, scrollContainer: HTMLElement, elm1: HTMLElement, elm2: HTMLElement, rect1: HTMLElement, rect2: HTMLElement) => void
|
|
497
|
-
makeDraggable: (evt: Event) => void
|
|
498
|
-
toggle: (evt: Event, container: HTMLElement, source1: HTMLElement, source2: HTMLElement) => void
|
|
499
|
-
convert: (options: any) => string | void
|
|
488
|
+
interface SvgTool {
|
|
489
|
+
init: (container: HTMLElement, source1: [HTMLElement, string], source2: [HTMLElement, string], cb?: Function) => void
|
|
490
|
+
check: () => boolean
|
|
491
|
+
update: (rect1: HTMLElement, rect2: HTMLElement, cxn: HTMLElement) => void
|
|
492
|
+
getCurve: (p1: [number, number], p2: [number, number], dx: number) => string
|
|
493
|
+
getIntersection: (dx: number, dy: number, cx: number, cy: number, w: number, h: number) => [number, number]
|
|
494
|
+
setConnector: (source: HTMLElement, side: string) => HTMLElement
|
|
495
|
+
removeConnection: (container: HTMLElement) => void
|
|
496
|
+
makeScrollable: (svgContainer: HTMLElement, scrollContainer: HTMLElement, elm1: HTMLElement, elm2: HTMLElement, rect1: HTMLElement, rect2: HTMLElement) => void
|
|
497
|
+
makeDraggable: (evt: Event) => void
|
|
498
|
+
toggle: (evt: Event, container: HTMLElement, source1: HTMLElement, source2: HTMLElement) => void
|
|
499
|
+
convert: (options: any) => string | void
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
// --- sync ---
|
|
503
|
-
interface SyncTool {
|
|
504
|
-
/**
|
|
505
|
-
* Synchronize data between tabs using BroadcastChannel.
|
|
506
|
-
*/
|
|
507
|
-
tab: (channelName: string, callback: (data: any) => void) => { post: (data: any) => void, close: () => void }
|
|
508
|
-
/**
|
|
509
|
-
* Create a Proxy object linked to localStorage for auto-sync with optional encryption.
|
|
510
|
-
*/
|
|
511
|
-
storageProxy: <T extends object>(key: string, initialValue: T, secret?: string) => Promise<T>
|
|
512
|
-
/**
|
|
513
|
-
* Low-latency cross-tab event bus.
|
|
514
|
-
*/
|
|
515
|
-
pulse: (channelName: string, callback: (data: any) => void) => { emit: (data: any) => void, stop: () => void }
|
|
503
|
+
interface SyncTool {
|
|
504
|
+
/**
|
|
505
|
+
* Synchronize data between tabs using BroadcastChannel.
|
|
506
|
+
*/
|
|
507
|
+
tab: (channelName: string, callback: (data: any) => void) => { post: (data: any) => void, close: () => void }
|
|
508
|
+
/**
|
|
509
|
+
* Create a Proxy object linked to localStorage for auto-sync with optional encryption.
|
|
510
|
+
*/
|
|
511
|
+
storageProxy: <T extends object>(key: string, initialValue: T, secret?: string) => Promise<T>
|
|
512
|
+
/**
|
|
513
|
+
* Low-latency cross-tab event bus.
|
|
514
|
+
*/
|
|
515
|
+
pulse: (channelName: string, callback: (data: any) => void) => { emit: (data: any) => void, stop: () => void }
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
// --- system ---
|
|
519
|
-
interface SystemTool {
|
|
520
|
-
multiSplit: () => any
|
|
519
|
+
interface SystemTool {
|
|
520
|
+
multiSplit: () => any
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
// --- text ---
|
|
524
|
-
interface TextTool {
|
|
525
|
-
trim(s: string, c: string, b: number, e: number): string
|
|
526
|
-
capitalize(txt: string): string
|
|
527
|
-
lower(txt: string): string
|
|
528
|
-
upper(txt: string): string
|
|
529
|
-
nl2br(str: string): string
|
|
530
|
-
sanitize(str: string): string
|
|
531
|
-
camelCase: {
|
|
532
|
-
toSpace(string: string): string
|
|
533
|
-
toUnderscore(string: string): string
|
|
534
|
-
}
|
|
535
|
-
fitContainer(el: string): void
|
|
524
|
+
interface TextTool {
|
|
525
|
+
trim(s: string, c: string, b: number, e: number): string
|
|
526
|
+
capitalize(txt: string): string
|
|
527
|
+
lower(txt: string): string
|
|
528
|
+
upper(txt: string): string
|
|
529
|
+
nl2br(str: string): string
|
|
530
|
+
sanitize(str: string): string
|
|
531
|
+
camelCase: {
|
|
532
|
+
toSpace(string: string): string
|
|
533
|
+
toUnderscore(string: string): string
|
|
534
|
+
}
|
|
535
|
+
fitContainer(el: string): void
|
|
536
|
+
subString(s: string): void
|
|
536
537
|
}
|
|
537
538
|
|
|
538
539
|
// --- timer ---
|
|
539
|
-
interface TimerTool {
|
|
540
|
-
sleep(ms: number): Promise<void>
|
|
541
|
-
percentage(start: string, end: string): string
|
|
540
|
+
interface TimerTool {
|
|
541
|
+
sleep(ms: number): Promise<void>
|
|
542
|
+
percentage(start: string, end: string): string
|
|
542
543
|
}
|
|
543
544
|
|
|
544
545
|
// --- tools ---
|
|
545
|
-
interface ToolsTool {
|
|
546
|
-
getip(): Promise<void>
|
|
547
|
-
byteSize(bytes: number): string
|
|
548
|
-
zIndex(): number
|
|
549
|
-
zeroToFalse(value: number): boolean | number
|
|
546
|
+
interface ToolsTool {
|
|
547
|
+
getip(): Promise<void>
|
|
548
|
+
byteSize(bytes: number): string
|
|
549
|
+
zIndex(): number
|
|
550
|
+
zeroToFalse(value: number): boolean | number
|
|
550
551
|
}
|
|
551
552
|
|
|
552
553
|
// --- translators ---
|
|
553
|
-
interface TranslatorsTool {
|
|
554
|
-
convertMatrixToScale(values: any): number
|
|
554
|
+
interface TranslatorsTool {
|
|
555
|
+
convertMatrixToScale(values: any): number
|
|
555
556
|
}
|
|
556
557
|
|
|
557
558
|
// --- triggers ---
|
|
558
|
-
interface TriggersTool {
|
|
559
|
-
/**
|
|
560
|
-
* Add a trigger for custom events.
|
|
561
|
-
* @param event - The event name
|
|
562
|
-
* @param callback - The callback to execute when the event is triggered
|
|
563
|
-
*/
|
|
564
|
-
add: (event: string, callback: (...args: any[]) => void) => void
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* Listen for a trigger event (alias for add).
|
|
568
|
-
*/
|
|
569
|
-
on: (event: string, callback: (...args: any[]) => void) => void
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* Emit a trigger event and call all registered callbacks.
|
|
573
|
-
* @param event - The event name
|
|
574
|
-
* @param args - Arguments to pass to the callbacks
|
|
575
|
-
*/
|
|
576
|
-
emit: (event: string, ...args: any[]) => void
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Remove a trigger event and all its callbacks.
|
|
580
|
-
* @param event - The event name
|
|
581
|
-
*/
|
|
582
|
-
remove: (event: string) => void
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Remove a specific callback from an event.
|
|
586
|
-
* @param event - The event name
|
|
587
|
-
* @param callback - The callback to remove
|
|
588
|
-
*/
|
|
589
|
-
off: (event: string, callback: (...args: any[]) => void) => void
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* Clear all triggers.
|
|
593
|
-
*/
|
|
594
|
-
clear: () => void
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* List all registered trigger events.
|
|
598
|
-
* @returns Array of event names
|
|
599
|
-
*/
|
|
600
|
-
list: () => string[]
|
|
559
|
+
interface TriggersTool {
|
|
560
|
+
/**
|
|
561
|
+
* Add a trigger for custom events.
|
|
562
|
+
* @param event - The event name
|
|
563
|
+
* @param callback - The callback to execute when the event is triggered
|
|
564
|
+
*/
|
|
565
|
+
add: (event: string, callback: (...args: any[]) => void) => void
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Listen for a trigger event (alias for add).
|
|
569
|
+
*/
|
|
570
|
+
on: (event: string, callback: (...args: any[]) => void) => void
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Emit a trigger event and call all registered callbacks.
|
|
574
|
+
* @param event - The event name
|
|
575
|
+
* @param args - Arguments to pass to the callbacks
|
|
576
|
+
*/
|
|
577
|
+
emit: (event: string, ...args: any[]) => void
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Remove a trigger event and all its callbacks.
|
|
581
|
+
* @param event - The event name
|
|
582
|
+
*/
|
|
583
|
+
remove: (event: string) => void
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Remove a specific callback from an event.
|
|
587
|
+
* @param event - The event name
|
|
588
|
+
* @param callback - The callback to remove
|
|
589
|
+
*/
|
|
590
|
+
off: (event: string, callback: (...args: any[]) => void) => void
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Clear all triggers.
|
|
594
|
+
*/
|
|
595
|
+
clear: () => void
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* List all registered trigger events.
|
|
599
|
+
* @returns Array of event names
|
|
600
|
+
*/
|
|
601
|
+
list: () => string[]
|
|
601
602
|
}
|
|
602
603
|
|
|
603
604
|
// --- types ---
|
|
604
|
-
interface TypesTool {
|
|
605
|
-
of(p: any): string
|
|
606
|
-
instOfObj(p: any): boolean
|
|
607
|
-
isNull(p: any): (p: any) => boolean
|
|
608
|
-
isBool(val: any): boolean
|
|
605
|
+
interface TypesTool {
|
|
606
|
+
of(p: any): string
|
|
607
|
+
instOfObj(p: any): boolean
|
|
608
|
+
isNull(p: any): (p: any) => boolean
|
|
609
|
+
isBool(val: any): boolean
|
|
609
610
|
}
|
|
610
611
|
|
|
611
612
|
// --- ui ---
|
|
612
|
-
interface UiTool {
|
|
613
|
-
anchorContext(): void
|
|
614
|
-
[key: string]: any
|
|
613
|
+
interface UiTool {
|
|
614
|
+
anchorContext(): void
|
|
615
|
+
[key: string]: any
|
|
615
616
|
}
|
|
616
617
|
|
|
617
618
|
// --- window ---
|
|
618
|
-
interface WindowTool {
|
|
619
|
-
enhancement(): void
|
|
620
|
-
animationframe(): any
|
|
621
|
-
center(params: { url: string; title: string; name: string; w: number; h: number }): void
|
|
622
|
-
onBeforeUnLoad(e: any): void
|
|
623
|
-
purge(d?: Document, time?: number): void
|
|
624
|
-
stopZoomWheel(e: any): void
|
|
625
|
-
setZoom(element?: string, zoom?: number): string
|
|
626
|
-
getZoom(element?: string): number
|
|
619
|
+
interface WindowTool {
|
|
620
|
+
enhancement(): void
|
|
621
|
+
animationframe(): any
|
|
622
|
+
center(params: { url: string; title: string; name: string; w: number; h: number }): void
|
|
623
|
+
onBeforeUnLoad(e: any): void
|
|
624
|
+
purge(d?: Document, time?: number): void
|
|
625
|
+
stopZoomWheel(e: any): void
|
|
626
|
+
setZoom(element?: string, zoom?: number): string
|
|
627
|
+
getZoom(element?: string): number
|
|
627
628
|
}
|
|
628
629
|
|
|
629
630
|
// --- worker ---
|
|
630
|
-
interface WorkerPool {
|
|
631
|
-
workers: Worker[]
|
|
632
|
-
busy: Set<Worker>
|
|
633
|
-
queue: Array<{ task: any, resolve: Function, reject: Function }>
|
|
634
|
-
size: number
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
interface WorkerTool {
|
|
638
|
-
create: (src: string, options?: { onmessage?: (e: MessageEvent) => void; onerror?: (e: ErrorEvent) => void }) => Worker
|
|
639
|
-
createInline: (code: string, options?: { onmessage?: (e: MessageEvent) => void; onerror?: (e: ErrorEvent) => void }) => Worker
|
|
640
|
-
post: (worker: Worker, message: any, transferables?: Transferable[]) => void
|
|
641
|
-
terminate: (worker: Worker) => void
|
|
642
|
-
pool: (src: string, size?: number) => WorkerPool
|
|
643
|
-
poolExec: (pool: WorkerPool, tasks: any[]) => Promise<any[]>
|
|
644
|
-
importScripts: (worker: Worker, scripts: string[]) => void
|
|
645
|
-
shared: (src: string, options?: { name?: string; onconnect?: (e: MessageEvent) => void; onmessage?: (e: MessageEvent) => void }) => SharedWorker
|
|
646
|
-
}
|
|
647
|
-
// --- AUTO-GENERATED TOOL TYPES END ---
|
|
648
|
-
|
|
649
|
-
interface SubCommand {
|
|
650
|
-
name: string
|
|
651
|
-
version: string
|
|
652
|
-
example: string
|
|
653
|
-
author: string
|
|
654
|
-
creationDate: string
|
|
655
|
-
lastMod: string
|
|
656
|
-
type: string
|
|
657
|
-
active: boolean
|
|
658
|
-
description: string
|
|
659
|
-
env?: "client" | "server" | "both"
|
|
660
|
-
subCommand: SubCommand[]
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
interface Description {
|
|
664
|
-
name: string
|
|
665
|
-
active: boolean
|
|
666
|
-
subCommand: SubCommand[]
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
interface _dphelper {
|
|
670
|
-
[key: string]: any
|
|
671
|
-
|
|
631
|
+
interface WorkerPool {
|
|
632
|
+
workers: Worker[]
|
|
633
|
+
busy: Set<Worker>
|
|
634
|
+
queue: Array<{ task: any, resolve: Function, reject: Function }>
|
|
635
|
+
size: number
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
interface WorkerTool {
|
|
639
|
+
create: (src: string, options?: { onmessage?: (e: MessageEvent) => void; onerror?: (e: ErrorEvent) => void }) => Worker
|
|
640
|
+
createInline: (code: string, options?: { onmessage?: (e: MessageEvent) => void; onerror?: (e: ErrorEvent) => void }) => Worker
|
|
641
|
+
post: (worker: Worker, message: any, transferables?: Transferable[]) => void
|
|
642
|
+
terminate: (worker: Worker) => void
|
|
643
|
+
pool: (src: string, size?: number) => WorkerPool
|
|
644
|
+
poolExec: (pool: WorkerPool, tasks: any[]) => Promise<any[]>
|
|
645
|
+
importScripts: (worker: Worker, scripts: string[]) => void
|
|
646
|
+
shared: (src: string, options?: { name?: string; onconnect?: (e: MessageEvent) => void; onmessage?: (e: MessageEvent) => void }) => SharedWorker
|
|
647
|
+
}
|
|
648
|
+
// --- AUTO-GENERATED TOOL TYPES END ---
|
|
649
|
+
|
|
650
|
+
interface SubCommand {
|
|
651
|
+
name: string
|
|
652
|
+
version: string
|
|
653
|
+
example: string
|
|
654
|
+
author: string
|
|
655
|
+
creationDate: string
|
|
656
|
+
lastMod: string
|
|
657
|
+
type: string
|
|
658
|
+
active: boolean
|
|
659
|
+
description: string
|
|
660
|
+
env?: "client" | "server" | "both"
|
|
661
|
+
subCommand: SubCommand[]
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
interface Description {
|
|
665
|
+
name: string
|
|
666
|
+
active: boolean
|
|
667
|
+
subCommand: SubCommand[]
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
interface _dphelper {
|
|
671
|
+
[key: string]: any
|
|
672
|
+
|
|
672
673
|
// --- AUTO-GENERATED TOOL MEMBERS START ---
|
|
673
674
|
readonly ai: AiTool
|
|
674
675
|
readonly anchor: AnchorTool
|
|
@@ -722,32 +723,32 @@ interface _dphelper {
|
|
|
722
723
|
readonly ui: UiTool
|
|
723
724
|
readonly window: WindowTool
|
|
724
725
|
readonly worker: WorkerTool
|
|
725
|
-
// --- AUTO-GENERATED TOOL MEMBERS END ---
|
|
726
|
-
|
|
727
|
-
// setDescription: (description: Description, newObj: any) => void
|
|
728
|
-
// setProps: (root: any, desc: any, options?: any) => void
|
|
729
|
-
// _list: {
|
|
730
|
-
// scripts: Description[]
|
|
731
|
-
// sockets: any[]
|
|
732
|
-
// [key: string]: any
|
|
733
|
-
// }
|
|
734
|
-
|
|
735
|
-
version: string
|
|
736
|
-
isServer: boolean
|
|
737
|
-
isBrowser: boolean
|
|
738
|
-
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
interface Window {
|
|
742
|
-
[key: string]: any
|
|
743
|
-
dphelper: _dphelper
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
interface globalThis {
|
|
747
|
-
[key: string]: any
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
declare function confirm(message: string, func1: Function, func2?: Function): boolean
|
|
751
|
-
|
|
752
|
-
declare var dphelper: _dphelper
|
|
753
|
-
type dphelper = _dphelper
|
|
726
|
+
// --- AUTO-GENERATED TOOL MEMBERS END ---
|
|
727
|
+
|
|
728
|
+
// setDescription: (description: Description, newObj: any) => void
|
|
729
|
+
// setProps: (root: any, desc: any, options?: any) => void
|
|
730
|
+
// _list: {
|
|
731
|
+
// scripts: Description[]
|
|
732
|
+
// sockets: any[]
|
|
733
|
+
// [key: string]: any
|
|
734
|
+
// }
|
|
735
|
+
|
|
736
|
+
version: string
|
|
737
|
+
isServer: boolean
|
|
738
|
+
isBrowser: boolean
|
|
739
|
+
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
interface Window {
|
|
743
|
+
[key: string]: any
|
|
744
|
+
dphelper: _dphelper
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
interface globalThis {
|
|
748
|
+
[key: string]: any
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
declare function confirm(message: string, func1: Function, func2?: Function): boolean
|
|
752
|
+
|
|
753
|
+
declare var dphelper: _dphelper
|
|
754
|
+
type dphelper = _dphelper
|