ddan-js 3.8.4 → 3.8.6

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.
@@ -9,5 +9,6 @@ declare const _default: {
9
9
  timeout: <T_2 = any>(task?: Ddan.PFunction<T_2> | undefined, ms?: number, desc?: string) => Promise<[any, undefined] | [null, T_2]>;
10
10
  getValueIf: <T_3 = any, F = any>(condition: boolean | (() => boolean), trueValue: T_3 | (() => T_3), falseValue?: F | (() => F) | undefined) => T_3 | F | undefined;
11
11
  resolveValue: <T_4 = any>(value: T_4 | (() => T_4)) => T_4;
12
+ compareVersion: (ver1: string, ver2: string) => 0 | 1 | -1;
12
13
  };
13
14
  export default _default;
@@ -51,5 +51,6 @@ declare const _default: {
51
51
  timeout: <T_4 = any>(task?: Ddan.PFunction<T_4> | undefined, ms?: number, desc?: string) => Promise<[any, undefined] | [null, T_4]>;
52
52
  getValueIf: <T_5 = any, F = any>(condition: boolean | (() => boolean), trueValue: T_5 | (() => T_5), falseValue?: F | (() => F) | undefined) => T_5 | F | undefined;
53
53
  resolveValue: <T_6 = any>(value: T_6 | (() => T_6)) => T_6;
54
+ compareVersion: (ver1: string, ver2: string) => 0 | 1 | -1;
54
55
  };
55
56
  export default _default;
@@ -36,7 +36,7 @@ declare const _default: {
36
36
  }>;
37
37
  ElementObserver: typeof ElementObserver;
38
38
  watchTextChange: (element: HTMLElement, callback: (newText: string, oldText: string) => void) => (() => void) | undefined;
39
- watchAttrChange: typeof import("./watch").watchAttrChange;
39
+ watchAttrChange: (element: HTMLElement | null | undefined, callback: (attrName: string, newValue: string | null, oldValue: string | null) => void, attrs?: string[] | undefined) => (() => void) | undefined;
40
40
  watchElementChange: (element: Element | null, options?: {
41
41
  onText?: ((newText: string, oldText: string) => void) | undefined;
42
42
  onAttr?: ((name: string, newValue: string | null, oldValue: string | null) => void) | undefined;
@@ -12,7 +12,7 @@ declare function watchTextChange(element: HTMLElement, callback: (newText: strin
12
12
  * @param attrs
13
13
  * @returns
14
14
  */
15
- export declare function watchAttrChange(element: HTMLElement | null | undefined, callback: (attrName: string, newValue: string | null, oldValue: string | null) => void, attrs?: string[]): (() => void) | undefined;
15
+ declare function watchAttrChange(element: HTMLElement | null | undefined, callback: (attrName: string, newValue: string | null, oldValue: string | null) => void, attrs?: string[]): (() => void) | undefined;
16
16
  declare function watchElementChange(element: Element | null, options?: {
17
17
  onText?: (newText: string, oldText: string) => void;
18
18
  onAttr?: (name: string, newValue: string | null, oldValue: string | null) => void;
@@ -153,6 +153,7 @@ declare const dHook: {
153
153
  timeout: <T_8 = any>(task?: import("..").Ddan.PFunction<T_8> | undefined, ms?: number, desc?: string) => Promise<[any, undefined] | [null, T_8]>;
154
154
  getValueIf: <T_9 = any, F = any>(condition: boolean | (() => boolean), trueValue: T_9 | (() => T_9), falseValue?: F | (() => F) | undefined) => T_9 | F | undefined;
155
155
  resolveValue: <T_10 = any>(value: T_10 | (() => T_10)) => T_10;
156
+ compareVersion: (ver1: string, ver2: string) => 0 | 1 | -1;
156
157
  base64: {
157
158
  encode: (input: string) => string;
158
159
  decode: (base64Str: string) => string;
@@ -120,7 +120,7 @@ declare const dMini: {
120
120
  }>;
121
121
  ElementObserver: typeof import("../modules/html/elementObserver").ElementObserver;
122
122
  watchTextChange: (element: HTMLElement, callback: (newText: string, oldText: string) => void) => (() => void) | undefined;
123
- watchAttrChange: typeof import("../modules/html/watch").watchAttrChange;
123
+ watchAttrChange: (element: HTMLElement | null | undefined, callback: (attrName: string, newValue: string | null, oldValue: string | null) => void, attrs?: string[] | undefined) => (() => void) | undefined;
124
124
  watchElementChange: (element: Element | null, options?: {
125
125
  onText?: ((newText: string, oldText: string) => void) | undefined;
126
126
  onAttr?: ((name: string, newValue: string | null, oldValue: string | null) => void) | undefined;
package/bin/tiny/web.d.ts CHANGED
@@ -152,7 +152,7 @@ declare const dWeb: {
152
152
  }>;
153
153
  ElementObserver: typeof import("../modules/html/elementObserver").ElementObserver;
154
154
  watchTextChange: (element: HTMLElement, callback: (newText: string, oldText: string) => void) => (() => void) | undefined;
155
- watchAttrChange: typeof import("../modules/html/watch").watchAttrChange;
155
+ watchAttrChange: (element: HTMLElement | null | undefined, callback: (attrName: string, newValue: string | null, oldValue: string | null) => void, attrs?: string[] | undefined) => (() => void) | undefined;
156
156
  watchElementChange: (element: Element | null, options?: {
157
157
  onText?: ((newText: string, oldText: string) => void) | undefined;
158
158
  onAttr?: ((name: string, newValue: string | null, oldValue: string | null) => void) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddan-js",
3
- "version": "3.8.4",
3
+ "version": "3.8.6",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "ddan-js",
@@ -26,6 +26,10 @@
26
26
  "types": "./bin/index.d.ts",
27
27
  "import": "./bin/ddan-js.mjs",
28
28
  "require": "./bin/ddan-js.js",
29
+ "node": {
30
+ "import": "./bin/ddan-js.mjs",
31
+ "require": "./bin/ddan-js.js"
32
+ },
29
33
  "browser": {
30
34
  "import": "./bin/ddan-browser.mjs",
31
35
  "require": "./bin/ddan-browser.js"