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