dphelper 3.1.2 → 3.1.4

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 (47) hide show
  1. package/dphelper.umd.js +21 -20
  2. package/index.js +16 -16
  3. package/package.json +2 -2
  4. package/tools/anchor/interface.d.ts +1 -1
  5. package/tools/array/interface.d.ts +1 -1
  6. package/tools/audio/interface.d.ts +1 -1
  7. package/tools/avoid/interface.d.ts +1 -1
  8. package/tools/browser/interface.d.ts +1 -1
  9. package/tools/check/interface.d.ts +1 -1
  10. package/tools/color/interface.d.ts +1 -1
  11. package/tools/cookie/interface.d.ts +1 -1
  12. package/tools/coords/interface.d.ts +1 -1
  13. package/tools/credits/interface.d.ts +1 -1
  14. package/tools/date/interface.d.ts +1 -1
  15. package/tools/disable/interface.d.ts +1 -1
  16. package/tools/dispatch/interface.d.ts +1 -1
  17. package/tools/elements/interface.d.ts +1 -1
  18. package/tools/events/interface.d.ts +1 -1
  19. package/tools/fetch/interface.d.ts +1 -1
  20. package/tools/form/interface.d.ts +1 -1
  21. package/tools/format/interface.d.ts +1 -1
  22. package/tools/json/interface.d.ts +1 -1
  23. package/tools/load/interface.d.ts +1 -1
  24. package/tools/logging/interface.d.ts +1 -1
  25. package/tools/math/interface.d.ts +1 -1
  26. package/tools/memory/interface.d.ts +1 -1
  27. package/tools/navigation/interface.d.ts +1 -1
  28. package/tools/objects/interface.d.ts +1 -1
  29. package/tools/path/interface.d.ts +1 -1
  30. package/tools/promise/interface.d.ts +1 -1
  31. package/tools/sanitize/interface.d.ts +1 -1
  32. package/tools/screen/interface.d.ts +1 -1
  33. package/tools/scrollbar/interface.d.ts +1 -1
  34. package/tools/security/interface.d.ts +1 -1
  35. package/tools/shortcut/interface.d.ts +1 -1
  36. package/tools/socket/interface.d.ts +1 -1
  37. package/tools/sse/interface.d.ts +1 -1
  38. package/tools/svg/interface.d.ts +1 -1
  39. package/tools/sync/interface.d.ts +1 -1
  40. package/tools/system/interface.d.ts +1 -1
  41. package/tools/text/interface.d.ts +1 -1
  42. package/tools/timer/interface.d.ts +1 -1
  43. package/tools/tools/interface.d.ts +1 -1
  44. package/tools/translators/interface.d.ts +1 -1
  45. package/tools/types/interface.d.ts +1 -1
  46. package/tools/ui/interface.d.ts +1 -1
  47. package/tools/window/interface.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dphelper",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "browser": "./dist/dphelper.umd.js",
@@ -85,7 +85,7 @@
85
85
  "crypto-js": "4.2.0",
86
86
  "@jest/globals": "^30.2.0",
87
87
  "@types/crypto-js": "4.2.2",
88
- "@types/node": "^25.3.1",
88
+ "@types/node": "^25.3.2",
89
89
  "esbuild": "0.27.3",
90
90
  "esbuild-node-externals": "1.20.1",
91
91
  "esbuild-plugin-alias": "0.2.1",
@@ -4,4 +4,4 @@ interface AnchorTool {
4
4
  * @param selector - CSS selector for target elements
5
5
  */
6
6
  toOnClick(selector: string): void
7
- }
7
+ }
@@ -19,4 +19,4 @@ interface ArrayTool {
19
19
  pathToJson(array: string[], separator?: string): Record<string, unknown>
20
20
  deepClone<T>(src: T): T
21
21
  match(arrayWords: string[], arrayToCheck: string[]): boolean
22
- }
22
+ }
@@ -8,4 +8,4 @@ interface AudioTool {
8
8
  * @param loop - Whether the audio should loop.
9
9
  */
10
10
  play: (file?: string, path?: string, loop?: boolean) => void
11
- }
11
+ }
@@ -1,3 +1,3 @@
1
1
  interface AvoidTool {
2
2
  cache: (uri: string) => string
3
- }
3
+ }
@@ -8,4 +8,4 @@ interface BrowserTool {
8
8
  zoom(): number
9
9
  status(code: number): string
10
10
  interlock(onUpdate: (tabs: number) => void): void
11
- }
11
+ }
@@ -2,4 +2,4 @@ interface CheckTool {
2
2
  url: (url: string) => any
3
3
  version: (v1: string, v2: string, opts?: any) => any
4
4
  npmVer: (npm: string) => any
5
- }
5
+ }
@@ -4,4 +4,4 @@ interface ColorTool {
4
4
  toRGB: (c: any) => number[]
5
5
  oleColor: (c: any) => string
6
6
  gradient: (colorStart: any, colorEnd: any, colorCount: any) => any
7
- }
7
+ }
@@ -10,4 +10,4 @@ interface CookieTool {
10
10
  get: (name: string) => any
11
11
  delete: (name: string) => any
12
12
  removeAll: () => any
13
- }
13
+ }
@@ -6,4 +6,4 @@ interface CoordsTool {
6
6
  distance: (point1: any, point2: any) => any
7
7
  polarToCartesian: (centerX: any, centerY: any, radius: any, angleInDegrees: any) => any
8
8
  mapDegreesToPixels: (degree: number, minDegree: number, maxDegree: number, minPixel: number, maxPixel: number, padding: number) => number
9
- }
9
+ }
@@ -9,4 +9,4 @@ interface Credits {
9
9
  }
10
10
  }
11
11
 
12
- type CreditsTool = (props: Credits) => void
12
+ type CreditsTool = (props: Credits) => void
@@ -23,4 +23,4 @@ interface DateTool {
23
23
  dateToYMD: (date: any) => string
24
24
  collection: (params: { date?: Date; type: string; locale?: string }) => string | undefined
25
25
  timeZones: () => string[]
26
- }
26
+ }
@@ -6,4 +6,4 @@ interface DisableTool {
6
6
  paste: (el?: string) => void
7
7
  cut: (el?: string) => void
8
8
  drag: (el?: string) => void
9
- }
9
+ }
@@ -2,4 +2,4 @@ interface DispatchTool {
2
2
  set: (name: string, value?: any) => void
3
3
  listen: (name: string, cb?: (e: Event) => void, flag?: boolean) => void
4
4
  remove: (name: string) => void
5
- }
5
+ }
@@ -1,4 +1,4 @@
1
1
  interface ElementsTool {
2
2
  fitScale: (el: any, scale?: number, fit?: boolean) => void
3
3
  scaleBasedOnWindow: (elm: any, scale: number, fit: boolean) => void
4
- }
4
+ }
@@ -4,4 +4,4 @@ interface EventsTool {
4
4
  copy: (el: string) => void
5
5
  onDrag: (elem: string) => void
6
6
  keys: (e: KeyboardEvent) => { key: string; ctrl: boolean; alt: boolean; shift: boolean }
7
- }
7
+ }
@@ -13,4 +13,4 @@ interface FetchTool {
13
13
  * Perform a POST request with optional JSON body auto-serialization.
14
14
  */
15
15
  post: (url: string, body: any, options?: any) => Promise<Response>
16
- }
16
+ }
@@ -11,4 +11,4 @@ interface FormTool {
11
11
  noSpecialChars: (e: Event) => void
12
12
  table: (size: [number, number], id: string, elem: HTMLElement) => void
13
13
  sanitize: (str: string) => string | undefined
14
- }
14
+ }
@@ -1,4 +1,4 @@
1
1
  interface FormatTool {
2
2
  currency: (value: number, locale?: string, currency?: string) => string
3
3
  phoneNumber: (value: string, countryCode?: string) => string
4
- }
4
+ }
@@ -6,4 +6,4 @@ interface JsonTool {
6
6
  parse: (file: string) => any
7
7
  sanitize: (str: string) => string
8
8
  sanitizeJsonValue: (str: string) => string
9
- }
9
+ }
@@ -6,4 +6,4 @@ interface LoadTool {
6
6
  remote: (path: string, method?: string, headers?: HeadersInit) => Promise<any>
7
7
  script: (scripts: string[], elementSelector?: string) => void
8
8
  toJson: (context: any, cacheName?: string) => void
9
- }
9
+ }
@@ -6,4 +6,4 @@ interface LoggingTool {
6
6
  reg: (txt: string) => void
7
7
  debug: (txt: string) => void
8
8
  error: (txt: string) => void
9
- }
9
+ }
@@ -11,4 +11,4 @@ interface MathTool {
11
11
  float2int: (a: number) => number
12
12
  percent: (n: number, tot: number) => number
13
13
  isPrime: (n: number) => boolean
14
- }
14
+ }
@@ -1,4 +1,4 @@
1
1
  interface MemoryTool {
2
2
  lock: (obj: string) => void
3
3
  unlock: (obj: string) => void
4
- }
4
+ }
@@ -2,4 +2,4 @@ interface NavigationTool {
2
2
  load(url: string): Promise<void>
3
3
  ajax(): void
4
4
  ajax_running?: boolean
5
- }
5
+ }
@@ -13,4 +13,4 @@ interface ObjectsTool {
13
13
  isObject: (val: any) => boolean
14
14
  diff: (obj1: Record<string, any>, obj2: Record<string, any>) => Record<string, { obj1: any, obj2: any }>
15
15
  path: (prop: string, array: string[], separator?: string) => string
16
- }
16
+ }
@@ -2,4 +2,4 @@ interface PathTool {
2
2
  rail: () => string[]
3
3
  hash: () => string[]
4
4
  query: (url: string) => Record<string, string>
5
- }
5
+ }
@@ -1,4 +1,4 @@
1
1
  interface PromiseTool {
2
2
  check: (p: any) => boolean
3
3
  resolve: (data: any) => Promise<any>
4
- }
4
+ }
@@ -1,3 +1,3 @@
1
1
  interface SanitizeTool {
2
2
  html: (s: string) => string
3
- }
3
+ }
@@ -9,4 +9,4 @@ interface ScreenTool {
9
9
  colorDepth: number
10
10
  pixelDepth: number
11
11
  }
12
- }
12
+ }
@@ -7,4 +7,4 @@ interface ScrollbarTool {
7
7
  }
8
8
  smooth: (target: any, speed: any, smooth: any) => void
9
9
  scrollTo: (container: string, element: string, gap?: number) => void
10
- }
10
+ }
@@ -9,4 +9,4 @@ interface SecurityTool {
9
9
  deCrypt: (u: string, p: string, mode?: string) => string
10
10
  AES_KeyGen: (passKey?: string) => string
11
11
  SHA256_Hex: (passKey: string) => string
12
- }
12
+ }
@@ -1,3 +1,3 @@
1
1
  interface ShortcutTool {
2
2
  keys: (e: any, trigger: any) => void
3
- }
3
+ }
@@ -10,4 +10,4 @@ interface SocketTool {
10
10
  keepAlive: (name: string) => void
11
11
  check: () => void
12
12
  list: () => WebSocket[]
13
- }
13
+ }
@@ -6,4 +6,4 @@ interface SseTool {
6
6
  on(event: "message" | "error" | "open", cb: (data: any) => void): void
7
7
  close(): void
8
8
  }
9
- }
9
+ }
@@ -10,4 +10,4 @@ interface SvgTool {
10
10
  makeDraggable: (evt: Event) => void
11
11
  toggle: (evt: Event, container: HTMLElement, source1: HTMLElement, source2: HTMLElement) => void
12
12
  convert: (options: any) => string | void
13
- }
13
+ }
@@ -11,4 +11,4 @@ interface SyncTool {
11
11
  * Low-latency cross-tab event bus.
12
12
  */
13
13
  pulse: (channelName: string, callback: (data: any) => void) => { emit: (data: any) => void, stop: () => void }
14
- }
14
+ }
@@ -1,3 +1,3 @@
1
1
  interface SystemTool {
2
2
  multiSplit: () => any
3
- }
3
+ }
@@ -10,4 +10,4 @@ interface TextTool {
10
10
  toUnderscore(string: string): string
11
11
  }
12
12
  fitContainer(el: string): void
13
- }
13
+ }
@@ -1,4 +1,4 @@
1
1
  interface TimerTool {
2
2
  sleep(ms: number): Promise<void>
3
3
  percentage(start: string, end: string): string
4
- }
4
+ }
@@ -3,4 +3,4 @@ interface ToolsTool {
3
3
  byteSize(bytes: number): string
4
4
  zIndex(): number
5
5
  zeroToFalse(value: number): boolean | number
6
- }
6
+ }
@@ -1,3 +1,3 @@
1
1
  interface TranslatorsTool {
2
2
  convertMatrixToScale(values: any): number
3
- }
3
+ }
@@ -3,4 +3,4 @@ interface TypesTool {
3
3
  instOfObj(p: any): boolean
4
4
  isNull(p: any): (p: any) => boolean
5
5
  isBool(val: any): boolean
6
- }
6
+ }
@@ -1,4 +1,4 @@
1
1
  interface UiTool {
2
2
  anchorContext(): void
3
3
  [key: string]: any
4
- }
4
+ }
@@ -7,4 +7,4 @@ interface WindowTool {
7
7
  stopZoomWheel(e: any): void
8
8
  setZoom(element?: string, zoom?: number): string
9
9
  getZoom(element?: string): number
10
- }
10
+ }