dphelper 2.6.3 → 3.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/CODE_OF_CONDUCT.md +108 -0
- package/COPYRIGHT.md +6 -0
- package/README.md +133 -291
- package/SECURITY.md +3 -0
- package/index.js +173 -1
- package/package.json +96 -194
- package/types/dphelper.d.ts +143 -543
- package/types/index.d.ts +48 -0
- package/types/scripts/generate-imports.d.ts +1 -0
- package/types/scripts/over.d.ts +1 -0
- package/types/scripts/setProps.d.ts +1 -0
- package/types/scripts/setupGlobal.d.ts +1 -0
- package/types/tools/ai/index.d.ts +1 -0
- package/types/tools/anchor/index.d.ts +1 -0
- package/types/tools/array/index.d.ts +1 -0
- package/types/tools/audio/index.d.ts +1 -0
- package/types/tools/avoid/index.d.ts +1 -0
- package/types/tools/browser/index.d.ts +1 -0
- package/types/tools/check/index.d.ts +1 -0
- package/types/tools/color/index.d.ts +1 -0
- package/types/tools/cookie/index.d.ts +1 -0
- package/types/tools/coords/index.d.ts +1 -0
- package/types/tools/credits/index.d.ts +1 -0
- package/types/tools/date/index.d.ts +1 -0
- package/types/tools/disable/index.d.ts +1 -0
- package/types/tools/dispatch/index.d.ts +1 -0
- package/types/tools/elements/index.d.ts +1 -0
- package/types/tools/events/index.d.ts +1 -0
- package/types/tools/fetch/index.d.ts +1 -0
- package/types/tools/form/index.d.ts +1 -0
- package/types/tools/format/index.d.ts +1 -0
- package/types/tools/json/index.d.ts +1 -0
- package/types/tools/load/index.d.ts +1 -0
- package/types/tools/logging/index.d.ts +1 -0
- package/types/tools/math/index.d.ts +1 -0
- package/types/tools/memory/index.d.ts +1 -0
- package/types/tools/objects/index.d.ts +1 -0
- package/types/tools/path/index.d.ts +1 -0
- package/types/tools/promise/index.d.ts +1 -0
- package/types/tools/sanitize/index.d.ts +1 -0
- package/types/tools/screen/index.d.ts +1 -0
- package/types/tools/screen/popupManager.d.ts +32 -0
- package/types/tools/scrollbar/index.d.ts +1 -0
- package/types/tools/security/index.d.ts +1 -0
- package/types/tools/shortcut/index.d.ts +1 -0
- package/types/tools/socket/index.d.ts +1 -0
- package/types/tools/sse/index.d.ts +1 -0
- package/types/tools/svg/index.d.ts +1 -0
- package/types/tools/sync/index.d.ts +1 -0
- package/types/tools/system/index.d.ts +1 -0
- package/types/tools/text/index.d.ts +1 -0
- package/types/tools/timer/index.d.ts +1 -0
- package/types/tools/tools/index.d.ts +1 -0
- package/types/tools/translators/index.d.ts +1 -0
- package/types/tools/triggers/index.d.ts +1 -0
- package/types/tools/types/index.d.ts +1 -0
- package/types/tools/ui/index.d.ts +1 -0
- package/types/tools/window/index.d.ts +1 -0
- package/DISCLAIMER.md +0 -11
- package/docs/_config.yml +0 -1
- package/docs/index.md +0 -380
- package/documents/OBSERVER.md +0 -63
- package/documents/SESSION.md +0 -54
- package/documents/STATE.md +0 -65
- package/documents/STORE.md +0 -76
- package/documents/SUMMARY.md +0 -24
- package/documents/TOOLS.md +0 -1282
- package/documents/USEOBSERVER.md +0 -26
- package/index.d.ts +0 -22
- package/types/cache.d.ts +0 -27
- package/types/idb.d.ts +0 -21
- package/types/jquery.d.ts +0 -20
- package/types/memorio.d.ts +0 -21
- package/types/observer.d.ts +0 -47
- package/types/session.d.ts +0 -67
- package/types/state.d.ts +0 -71
- package/types/store.d.ts +0 -91
- package/types/useobserver.d.ts +0 -28
package/types/dphelper.d.ts
CHANGED
|
@@ -5,568 +5,168 @@
|
|
|
5
5
|
https://dario.passariello.ca
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
// Global object
|
|
10
|
-
////////////////////
|
|
8
|
+
declare global {
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/
|
|
15
|
-
interface _dphelper {
|
|
16
|
-
/**
|
|
17
|
-
* Dynamic index signature for additional properties
|
|
18
|
-
* @private
|
|
19
|
-
*/
|
|
20
|
-
[key: string]: any
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Anchor manipulation utilities
|
|
24
|
-
*/
|
|
25
|
-
anchor: {
|
|
26
|
-
/**
|
|
27
|
-
* Converts anchor tags to onClick events
|
|
28
|
-
* @param selector - CSS selector for target elements
|
|
29
|
-
*/
|
|
30
|
-
toOnClick(selector: string): void
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Array manipulation utilities
|
|
35
|
-
*/
|
|
36
|
-
array: {
|
|
37
|
-
/**
|
|
38
|
-
* Finds an element in an array by key
|
|
39
|
-
* @param array - Input array to search
|
|
40
|
-
* @param key - Key to search for
|
|
41
|
-
* @returns Found element or undefined
|
|
42
|
-
*/
|
|
43
|
-
find<T>(array: T[], key: any): T | any
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Returns array with unique values
|
|
47
|
-
* @param array - Input array
|
|
48
|
-
* @returns New array with unique values
|
|
49
|
-
*/
|
|
50
|
-
unique<T>(array: T[]): T[]
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Deletes an element from array by key
|
|
54
|
-
* @param array - Input array
|
|
55
|
-
* @param key - Key to delete
|
|
56
|
-
*/
|
|
57
|
-
delete<T>(array: T[], key: keyof T): void
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Merges two arrays
|
|
61
|
-
* @param arrayA - First array
|
|
62
|
-
* @param arrayB - Second array
|
|
63
|
-
* @returns Merged array
|
|
64
|
-
*/
|
|
65
|
-
merge<T>(arrayA: T[], arrayB: T[]): T[]
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Merges two arrays based on a key
|
|
69
|
-
* @param arrayA - First array
|
|
70
|
-
* @param arrayB - Second array
|
|
71
|
-
* @param key - Key to merge on
|
|
72
|
-
* @returns Merged array
|
|
73
|
-
*/
|
|
74
|
-
mergeByKey<T extends Record<string, any>>(arrayA: T[], arrayB: T[], key: keyof T): T[]
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Sorts array in ascending order
|
|
78
|
-
* @param array - Input array
|
|
79
|
-
* @returns Sorted array
|
|
80
|
-
*/
|
|
81
|
-
asc<T>(array: T[]): T[]
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Sorts array in descending order
|
|
85
|
-
* @param array - Input array
|
|
86
|
-
* @returns Sorted array
|
|
87
|
-
*/
|
|
88
|
-
desc<T>(array: T[]): T[]
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Finds duplicate values in array
|
|
92
|
-
* @param array - Input array
|
|
93
|
-
* @returns Array of duplicate values
|
|
94
|
-
*/
|
|
95
|
-
duplicates<T>(array: T[]): T[]
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Returns even elements from array
|
|
99
|
-
* @param array - Input array
|
|
100
|
-
* @returns Array with even elements
|
|
101
|
-
*/
|
|
102
|
-
even<T>(array: T[]): T[]
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Returns odd elements from array
|
|
106
|
-
* @param array - Input array
|
|
107
|
-
* @returns Array with odd elements
|
|
108
|
-
*/
|
|
109
|
-
odd<T>(array: T[]): T[]
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Converts array to object
|
|
113
|
-
* @param array - Input array
|
|
114
|
-
* @returns Resulting object
|
|
115
|
-
*/
|
|
116
|
-
toObj<T>(array: T[]): Record<string, T>
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Sums values in a specific column of 2D array
|
|
120
|
-
* @param array - Input 2D array
|
|
121
|
-
* @param column - Column index to sum
|
|
122
|
-
* @returns Sum of values
|
|
123
|
-
*/
|
|
124
|
-
sumColumn(array: number[][], column: number): number
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Shuffles array elements randomly
|
|
128
|
-
* @param array - Input array
|
|
129
|
-
* @returns Shuffled array
|
|
130
|
-
*/
|
|
131
|
-
shuffle<T>(array: T[]): T[]
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Generates array with sequential numbers
|
|
135
|
-
* @param num - Length of array to generate
|
|
136
|
-
* @returns Generated array
|
|
137
|
-
*/
|
|
138
|
-
generate(num: number): number[]
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Tests if array contains only integers
|
|
142
|
-
* @param array - Input array
|
|
143
|
-
* @returns Array of valid integers
|
|
144
|
-
*/
|
|
145
|
-
testArrayInt(array: unknown[]): number[]
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Generates random 32-bit number
|
|
149
|
-
* @param number - Upper bound
|
|
150
|
-
* @returns Random number
|
|
151
|
-
*/
|
|
152
|
-
rand32(number: number): number
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Finds index of element by key
|
|
156
|
-
* @param array - Input array
|
|
157
|
-
* @param key - Key to search for
|
|
158
|
-
* @returns Found index or -1
|
|
159
|
-
*/
|
|
160
|
-
findindex<T>(array: T[], key: any): number
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Converts path array to JSON object
|
|
164
|
-
* @param array - Input array
|
|
165
|
-
* @param separator - Path separator
|
|
166
|
-
* @returns Resulting object
|
|
167
|
-
*/
|
|
168
|
-
pathToJson(array: string[], separator?: string): Record<string, unknown>
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Deep clones an object or array
|
|
172
|
-
* @param src - Source to clone
|
|
173
|
-
* @returns Cloned copy
|
|
174
|
-
*/
|
|
175
|
-
deepClone<T>(src: T): T
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Checks if arrays have matching elements
|
|
179
|
-
* @param arrayWords - Array of words to match
|
|
180
|
-
* @param arrayToCheck - Array to check against
|
|
181
|
-
* @returns Whether arrays match
|
|
182
|
-
*/
|
|
183
|
-
match(arrayWords: string[], arrayToCheck: string[]): boolean
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
audio: {
|
|
187
|
-
play: (url: string) => void
|
|
10
|
+
interface Window {
|
|
11
|
+
dphelper: import("./dphelper")._dphelper
|
|
188
12
|
}
|
|
189
13
|
|
|
190
|
-
|
|
191
|
-
|
|
14
|
+
interface SubCommand {
|
|
15
|
+
name: string
|
|
16
|
+
version: string
|
|
17
|
+
example: string
|
|
18
|
+
author: string
|
|
19
|
+
creationDate: string
|
|
20
|
+
lastMod: string
|
|
21
|
+
type: string
|
|
22
|
+
active: boolean
|
|
23
|
+
description: string
|
|
24
|
+
env?: "client" | "server" | "both"
|
|
25
|
+
subCommand: SubCommand[]
|
|
192
26
|
}
|
|
193
27
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
reload(): void
|
|
199
|
-
href(url: string): void
|
|
200
|
-
offLine(text?: string): void
|
|
201
|
-
zoom(): number
|
|
202
|
-
status(code: number): string
|
|
28
|
+
interface Description {
|
|
29
|
+
name: string
|
|
30
|
+
active: boolean
|
|
31
|
+
subCommand: SubCommand[]
|
|
203
32
|
}
|
|
204
33
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
version: (v1: string, v2: string, opts: any) => any
|
|
208
|
-
npmVer: (npm: string) => any
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
color: {
|
|
212
|
-
hex: (c: any) => string
|
|
213
|
-
toHex: (rgb: any) => string
|
|
214
|
-
toRGB: (c: any) => []
|
|
215
|
-
oleColor: (c: any) => string
|
|
216
|
-
gradient: (colorStart: any, colorEnd: any, colorCount: any) => any
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
console: {
|
|
221
|
-
info(name: string, message: string, fn: Function): void
|
|
222
|
-
stop(options?: string[]): void
|
|
223
|
-
toHtml(el: string): void
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
cookie: {
|
|
227
|
-
set: (pars: {
|
|
228
|
-
name: any,
|
|
229
|
-
value: any,
|
|
230
|
-
time?: any,
|
|
231
|
-
path?: "/",
|
|
232
|
-
sameSite?: "Lax",
|
|
233
|
-
secure?: "Secure" | "false"
|
|
234
|
-
}) => any
|
|
235
|
-
get: (name: string) => any
|
|
236
|
-
delete: (name: string) => any
|
|
237
|
-
removeAll: () => any
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
coords: {
|
|
241
|
-
degreesToRadians: (degrees: any) => any
|
|
242
|
-
latToMeters: (points: any) => any
|
|
243
|
-
toVector: (points: any) => any
|
|
244
|
-
convertToDecDegrees: (deg: any, minutes: any, sec: any, direction: any) => any
|
|
245
|
-
distance: (point1: any, point2: any) => any
|
|
246
|
-
polarToCartesian: (centerX: any, centerY: any, radius: any, angleInDegrees: any) => any
|
|
247
|
-
mapDegreesToPixels: (degree: number, minDegree: number, maxDegree: number, minPixel: number, maxPixel: number, padding: number) => number
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
date: {
|
|
251
|
-
days: (lang?: string) => string[]
|
|
252
|
-
months: (lang?: string) => string[]
|
|
253
|
-
year: () => number
|
|
254
|
-
toIso: (value: any, int?: string) => string | null
|
|
255
|
-
toMMDDYYYY: (value: any) => string
|
|
256
|
-
toYYYYMMDD: (value: any) => string | undefined
|
|
257
|
-
toHuman: (value: any) => string
|
|
258
|
-
convert: (value: any, format: string[]) => string | null
|
|
259
|
-
iso2Epoch: (value: any) => number
|
|
260
|
-
localIsoTime: (value: any) => string
|
|
261
|
-
utc: () => string
|
|
262
|
-
parse: (value: any, separator?: string) => string | null
|
|
263
|
-
addDays: (date: any, days: number) => Date
|
|
264
|
-
dateTimeToString: (dateObject: any) => string
|
|
265
|
-
isoToHuman: (value: any, symbol?: string) => string | null
|
|
266
|
-
fullDate: () => string
|
|
267
|
-
epoch: () => number
|
|
268
|
-
diffInDays: (d1: any, d2: any) => number
|
|
269
|
-
diffInWeeks: (d1: any, d2: any) => number
|
|
270
|
-
diffInMonths: (d1: any, d2: any) => number
|
|
271
|
-
diffInYears: (d1: any, d2: any) => number
|
|
272
|
-
dateToYMD: (date: any) => string
|
|
273
|
-
collection: (params: { date?: Date; type: string; locale?: string }) => string | undefined
|
|
274
|
-
timeZones: () => string[]
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
disable: {
|
|
278
|
-
select: (el?: string) => void
|
|
279
|
-
spellCheck: (tmr?: number) => void
|
|
280
|
-
rightClick: (el?: string) => void
|
|
281
|
-
copy: (el?: string) => void
|
|
282
|
-
paste: (el?: string) => void
|
|
283
|
-
cut: (el?: string) => void
|
|
284
|
-
drag: (el?: string) => void
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
dispatch: {
|
|
288
|
-
set: (name: string, value?: any) => void
|
|
289
|
-
listen: (name: string, cb?: (e: Event) => void, flag?: boolean) => void
|
|
290
|
-
remove: (name: string) => void
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
element: {
|
|
294
|
-
fitScale: (el: any, scale?: number, fit?: boolean) => void
|
|
295
|
-
scaleBasedOnWindow: (elm: any, scale: number, fit: boolean) => void
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
events: {
|
|
299
|
-
list: (el: Element) => any
|
|
300
|
-
multi: (element: Element, eventNames: string, listener: EventListener) => void
|
|
301
|
-
copy: (el: string) => void
|
|
302
|
-
onDrag: (elem: string) => void
|
|
303
|
-
keys: (e: KeyboardEvent) => { key: string; ctrl: boolean; alt: boolean; shift: boolean }
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
form: {
|
|
307
|
-
serialize: (form: HTMLFormElement) => { [key: string]: any }
|
|
308
|
-
confirmType: (type: string, value: any) => boolean
|
|
309
|
-
required: (value: any) => string | undefined
|
|
310
|
-
minLength: (value: any, num?: number) => string | undefined
|
|
311
|
-
maxLength: (value: any, num?: number) => string | undefined
|
|
312
|
-
maxPhoneNumber: (value: any, num?: number) => string | undefined
|
|
313
|
-
isNumeric: (value: any) => boolean
|
|
314
|
-
isEmail: (value: any) => boolean
|
|
315
|
-
pattern: (e: Event) => void
|
|
316
|
-
noSpecialChars: (e: Event) => void
|
|
317
|
-
table: (size: [number, number], id: string, elem: HTMLElement) => void
|
|
318
|
-
sanitize: (str: string) => string | undefined
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
format: {
|
|
322
|
-
currency: (value: number, locale?: string, currency?: string) => string
|
|
323
|
-
phoneNumber: (value: string, countryCode?: string) => string
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
imports: {
|
|
327
|
-
file: (elem: string, file: string) => Promise<void>
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
json: {
|
|
331
|
-
counter: (json: any, key?: string, val?: any) => number | null
|
|
332
|
-
toCsv: (jsonInput: any) => string
|
|
333
|
-
saveCsvAs: (csvData: string, fileName: string) => void
|
|
334
|
-
is: (str: string) => boolean
|
|
335
|
-
parse: (file: string) => any
|
|
336
|
-
sanitize: (str: string) => string
|
|
337
|
-
sanitizeJsonValue: (str: string) => string
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
load: {
|
|
341
|
-
all: (context, cacheName?: string) => void
|
|
342
|
-
file: (filePath: string) => Promise<string>
|
|
343
|
-
fileToElement: (elementSelector: string, filePath: string) => Promise<void>
|
|
344
|
-
json: (filePath: string) => Promise<any>
|
|
345
|
-
remote: (path: string, method?: string, headers?: HeadersInit) => Promise<any>
|
|
346
|
-
script: (scripts: string[], elementSelector?: string) => void
|
|
347
|
-
toJson: (context, cacheName?: string) => void
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
logging: {
|
|
351
|
-
list: {
|
|
352
|
-
type: string
|
|
353
|
-
message: string
|
|
354
|
-
}
|
|
355
|
-
reg: (txt: string) => void
|
|
356
|
-
debug: (txt: string) => void
|
|
357
|
-
error: (txt: string) => void
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
math: {
|
|
361
|
-
rnd: () => number
|
|
362
|
-
tmr: () => number
|
|
363
|
-
add: (a: number, b: number) => number
|
|
364
|
-
sub: (a: number, b: number) => number
|
|
365
|
-
multi: (a: number, b: number) => number
|
|
366
|
-
div: (a: number, b: number) => number
|
|
367
|
-
rem: (a: number, b: number) => number
|
|
368
|
-
exp: (a: number, b: number) => number
|
|
369
|
-
isOdd: (a: number) => boolean
|
|
370
|
-
float2int: (a: number) => number
|
|
371
|
-
percent: (n: number, tot: number) => number
|
|
372
|
-
isPrime: (n: number) => boolean
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
memory: {
|
|
376
|
-
lock: (obj: string) => void
|
|
377
|
-
unlock: (obj: string) => void
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
object: {
|
|
381
|
-
toArray: (object: Record<string, any>) => [string, any][]
|
|
382
|
-
replaceNullObjects: (data: Record<string, any>) => Record<string, any>
|
|
383
|
-
serialize: (value: any) => any
|
|
384
|
-
deSerialize: (valueNew: any) => any
|
|
385
|
-
sort: (o: Record<string, any>) => Record<string, any>
|
|
386
|
-
toXML: (obj: Record<string, any>) => string
|
|
387
|
-
find: (array: any[], key: string, value: any) => any
|
|
388
|
-
instance: (obj: any) => any
|
|
389
|
-
updateByKey: (obj: Record<string, any>, key: string, newValue: any) => Record<string, any>
|
|
390
|
-
findindex: (array: any[], key: string) => number
|
|
391
|
-
parse: (val: any) => any
|
|
392
|
-
isObject: (val: any) => boolean
|
|
393
|
-
diff: (obj1: Record<string, any>, obj2: Record<string, any>) => Record<string, { obj1: any, obj2: any }>
|
|
394
|
-
path: (prop: string, array: string[], separator?: string) => string
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
path: {
|
|
398
|
-
rail: () => string[]
|
|
399
|
-
hash: () => string[]
|
|
400
|
-
query: (url: string) => Record<string, string>
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
promise: {
|
|
404
|
-
check: (p: any) => boolean
|
|
405
|
-
resolve: (data: any) => Promise<any>
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
sanitize: {
|
|
409
|
-
html: (s: string) => string
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
screen: {
|
|
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
|
-
}
|
|
424
|
-
|
|
425
|
-
scrollbar: {
|
|
426
|
-
custom: (el: string, options: any) => void
|
|
427
|
-
indicator: (props: any) => void
|
|
428
|
-
position: {
|
|
429
|
-
get: (el: any) => void
|
|
430
|
-
set: (el: any) => void
|
|
431
|
-
}
|
|
432
|
-
smooth: (target: any, speed: any, smooth: any) => void
|
|
433
|
-
scrollTo: (container: string, element: string, gap?: number) => void
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
security: {
|
|
437
|
-
uuid: {
|
|
438
|
-
byVal: (string: string) => string
|
|
439
|
-
v4: string
|
|
440
|
-
v5: string
|
|
441
|
-
}
|
|
442
|
-
hashPass: (u: string, p: string, t?: string) => Promise<string>
|
|
443
|
-
crypt: (u: string, p: string, mode?: string) => string
|
|
444
|
-
deCrypt: (u: string, p: string, mode?: string) => string
|
|
445
|
-
AES_KeyGen: (passKey?: string) => string
|
|
446
|
-
SHA256_Hex: (passKey: string) => string
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
shortcut: {
|
|
450
|
-
keys: (e: any, trigger: any) => void
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
socket: {
|
|
454
|
-
info: () => string
|
|
455
|
-
start: (element: any, server: any, name: string) => void
|
|
456
|
-
conn: (id: any, server: any, name: string) => void
|
|
457
|
-
connect: (server: any, name: string) => void
|
|
458
|
-
open: (id: any, server: any, name: string) => void
|
|
459
|
-
send: (mex: any, type?: string) => void
|
|
460
|
-
ping: (name: string) => void
|
|
461
|
-
receive: (el?: any, name?: string) => void
|
|
462
|
-
keepAlive: (name: string) => void
|
|
463
|
-
check: () => void
|
|
464
|
-
list: () => WebSocket[]
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
svg: {
|
|
468
|
-
init: (container: HTMLElement, source1: [HTMLElement, string], source2: [HTMLElement, string], cb?: Function) => void
|
|
469
|
-
check: () => boolean
|
|
470
|
-
update: (rect1: HTMLElement, rect2: HTMLElement, cxn: HTMLElement) => void
|
|
471
|
-
getCurve: (p1: [number, number], p2: [number, number], dx: number) => string
|
|
472
|
-
getIntersection: (dx: number, dy: number, cx: number, cy: number, w: number, h: number) => [number, number]
|
|
473
|
-
setConnector: (source: HTMLElement, side: string) => HTMLElement
|
|
474
|
-
removeConnection: (container: HTMLElement) => void
|
|
475
|
-
makeScrollable: (svgContainer: HTMLElement, scrollContainer: HTMLElement, elm1: HTMLElement, elm2: HTMLElement, rect1: HTMLElement, rect2: HTMLElement) => void
|
|
476
|
-
makeDraggable: (evt: Event) => void
|
|
477
|
-
toggle: (evt: Event, container: HTMLElement, source1: HTMLElement, source2: HTMLElement) => void
|
|
478
|
-
convert: (options) => string | void
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
system: {
|
|
482
|
-
multiSplit: () => any
|
|
483
|
-
}
|
|
34
|
+
var dphelper: import("./dphelper")._dphelper
|
|
35
|
+
}
|
|
484
36
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
37
|
+
// --- AUTO-GENERATED TOOL TYPES START ---
|
|
38
|
+
import { AiTool } from "../tools/ai/index"
|
|
39
|
+
import { AnchorTool } from "../tools/anchor/index"
|
|
40
|
+
import { ArrayTool } from "../tools/array/index"
|
|
41
|
+
import { AudioTool } from "../tools/audio/index"
|
|
42
|
+
import { AvoidTool } from "../tools/avoid/index"
|
|
43
|
+
import { BrowserTool } from "../tools/browser/index"
|
|
44
|
+
import { CheckTool } from "../tools/check/index"
|
|
45
|
+
import { ColorTool } from "../tools/color/index"
|
|
46
|
+
import { CookieTool } from "../tools/cookie/index"
|
|
47
|
+
import { CoordsTool } from "../tools/coords/index"
|
|
48
|
+
import { CreditsTool } from "../tools/credits/index"
|
|
49
|
+
import { DateTool } from "../tools/date/index"
|
|
50
|
+
import { DisableTool } from "../tools/disable/index"
|
|
51
|
+
import { DispatchTool } from "../tools/dispatch/index"
|
|
52
|
+
import { ElementsTool } from "../tools/elements/index"
|
|
53
|
+
import { EventsTool } from "../tools/events/index"
|
|
54
|
+
import { FetchTool } from "../tools/fetch/index"
|
|
55
|
+
import { FormTool } from "../tools/form/index"
|
|
56
|
+
import { FormatTool } from "../tools/format/index"
|
|
57
|
+
import { JsonTool } from "../tools/json/index"
|
|
58
|
+
import { LoadTool } from "../tools/load/index"
|
|
59
|
+
import { LoggingTool } from "../tools/logging/index"
|
|
60
|
+
import { MathTool } from "../tools/math/index"
|
|
61
|
+
import { MemoryTool } from "../tools/memory/index"
|
|
62
|
+
import { ObjectsTool } from "../tools/objects/index"
|
|
63
|
+
import { PathTool } from "../tools/path/index"
|
|
64
|
+
import { PromiseTool } from "../tools/promise/index"
|
|
65
|
+
import { SanitizeTool } from "../tools/sanitize/index"
|
|
66
|
+
import { ScreenTool } from "../tools/screen/index"
|
|
67
|
+
import { ScrollbarTool } from "../tools/scrollbar/index"
|
|
68
|
+
import { SecurityTool } from "../tools/security/index"
|
|
69
|
+
import { ShortcutTool } from "../tools/shortcut/index"
|
|
70
|
+
import { SocketTool } from "../tools/socket/index"
|
|
71
|
+
import { SseTool } from "../tools/sse/index"
|
|
72
|
+
import { SvgTool } from "../tools/svg/index"
|
|
73
|
+
import { SyncTool } from "../tools/sync/index"
|
|
74
|
+
import { SystemTool } from "../tools/system/index"
|
|
75
|
+
import { TextTool } from "../tools/text/index"
|
|
76
|
+
import { TimerTool } from "../tools/timer/index"
|
|
77
|
+
import { ToolsTool } from "../tools/tools/index"
|
|
78
|
+
import { TranslatorsTool } from "../tools/translators/index"
|
|
79
|
+
import { TriggersTool } from "../tools/triggers/index"
|
|
80
|
+
import { TypesTool } from "../tools/types/index"
|
|
81
|
+
import { UiTool } from "../tools/ui/index"
|
|
82
|
+
import { WindowTool } from "../tools/window/index"
|
|
83
|
+
// --- AUTO-GENERATED TOOL TYPES END ---
|
|
84
|
+
|
|
85
|
+
// --- GLOBALS ---
|
|
86
|
+
|
|
87
|
+
type RTC_PEER_CONNECTION_LIKE = {
|
|
88
|
+
new(configuration?: RTCConfiguration): RTCPeerConnection
|
|
89
|
+
}
|
|
498
90
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
percentage(start: string, end: string): string
|
|
502
|
-
}
|
|
91
|
+
declare const mozRTCPeerConnection: RTC_PEER_CONNECTION_LIKE
|
|
92
|
+
declare const webkitRTCPeerConnection: RTC_PEER_CONNECTION_LIKE
|
|
503
93
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
94
|
+
declare const require: {
|
|
95
|
+
(id: string): unknown
|
|
96
|
+
context: (directory: string, useSubdirectories?: boolean, regExp?: RegExp) => {
|
|
97
|
+
(id: string): unknown
|
|
98
|
+
keys(): string[]
|
|
99
|
+
resolve(id: string): string
|
|
509
100
|
}
|
|
101
|
+
}
|
|
510
102
|
|
|
511
|
-
|
|
512
|
-
convertMatrixToScale(values: any): number
|
|
513
|
-
}
|
|
103
|
+
type RequireType = object
|
|
514
104
|
|
|
515
|
-
|
|
516
|
-
click(elem: string): void
|
|
517
|
-
change(elem: string): void
|
|
518
|
-
input(elem: string): void
|
|
519
|
-
}
|
|
105
|
+
declare function confirm(message: string, func1: Function, func2?: Function): boolean
|
|
520
106
|
|
|
521
|
-
|
|
522
|
-
of(p: any): string
|
|
523
|
-
instOfObj(p: any): boolean
|
|
524
|
-
isNull(p: any): (i: any) => boolean
|
|
525
|
-
isBool(val: any): boolean
|
|
526
|
-
}
|
|
107
|
+
// --- DPHELPER ---
|
|
527
108
|
|
|
528
|
-
|
|
109
|
+
export interface _dphelper {
|
|
110
|
+
[key: string]: any
|
|
529
111
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
112
|
+
// --- AUTO-GENERATED TOOL MEMBERS START ---
|
|
113
|
+
ai: AiTool
|
|
114
|
+
anchor: AnchorTool
|
|
115
|
+
array: ArrayTool
|
|
116
|
+
audio: AudioTool
|
|
117
|
+
avoid: AvoidTool
|
|
118
|
+
browser: BrowserTool
|
|
119
|
+
check: CheckTool
|
|
120
|
+
color: ColorTool
|
|
121
|
+
cookie: CookieTool
|
|
122
|
+
coords: CoordsTool
|
|
123
|
+
credits: CreditsTool
|
|
124
|
+
date: DateTool
|
|
125
|
+
disable: DisableTool
|
|
126
|
+
dispatch: DispatchTool
|
|
127
|
+
element: ElementsTool
|
|
128
|
+
events: EventsTool
|
|
129
|
+
fetch: FetchTool
|
|
130
|
+
form: FormTool
|
|
131
|
+
format: FormatTool
|
|
132
|
+
json: JsonTool
|
|
133
|
+
load: LoadTool
|
|
134
|
+
logging: LoggingTool
|
|
135
|
+
math: MathTool
|
|
136
|
+
memory: MemoryTool
|
|
137
|
+
object: ObjectsTool
|
|
138
|
+
path: PathTool
|
|
139
|
+
promise: PromiseTool
|
|
140
|
+
sanitize: SanitizeTool
|
|
141
|
+
screen: ScreenTool
|
|
142
|
+
scrollbar: ScrollbarTool
|
|
143
|
+
security: SecurityTool
|
|
144
|
+
shortcut: ShortcutTool
|
|
145
|
+
socket: SocketTool
|
|
146
|
+
sse: SseTool
|
|
147
|
+
svg: SvgTool
|
|
148
|
+
sync: SyncTool
|
|
149
|
+
system: SystemTool
|
|
150
|
+
text: TextTool
|
|
151
|
+
timer: TimerTool
|
|
152
|
+
tools: ToolsTool
|
|
153
|
+
translators: TranslatorsTool
|
|
154
|
+
trigger: TriggersTool
|
|
155
|
+
type: TypesTool
|
|
156
|
+
ui: UiTool
|
|
157
|
+
window: WindowTool
|
|
158
|
+
// --- AUTO-GENERATED TOOL MEMBERS END ---
|
|
159
|
+
|
|
160
|
+
setDescription: (description: Description, newObj: any) => void
|
|
161
|
+
setProps: (root: any, desc: any, options?: any) => void
|
|
162
|
+
_list: {
|
|
163
|
+
scripts: Description[]
|
|
164
|
+
sockets: any[]
|
|
165
|
+
[key: string]: any
|
|
539
166
|
}
|
|
540
|
-
|
|
541
167
|
}
|
|
542
168
|
|
|
543
|
-
////////////////////////////////////////////////////////////////////////////
|
|
544
|
-
|
|
545
169
|
declare var dphelper: _dphelper
|
|
546
170
|
type dphelper = _dphelper
|
|
547
171
|
|
|
548
|
-
|
|
549
|
-
type arguments = any
|
|
550
|
-
|
|
551
|
-
///////////////////
|
|
552
|
-
|
|
553
|
-
interface SubCommand {
|
|
554
|
-
name: string
|
|
555
|
-
version: string
|
|
556
|
-
example: string
|
|
557
|
-
author: string
|
|
558
|
-
creationDate: string
|
|
559
|
-
lastMod: string
|
|
560
|
-
type: string
|
|
561
|
-
active: boolean
|
|
562
|
-
description: string
|
|
563
|
-
subCommand: Array<SubCommand> | typeof Array
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
interface Description {
|
|
567
|
-
name: string,
|
|
568
|
-
active: boolean,
|
|
569
|
-
subCommand: Array<SubCommand>,
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
declare function confirm(message: string, func1: Function, func2?: Function): boolean
|
|
172
|
+
export { dphelper, _dphelper }
|