@kizmann/pico-js 2.0.8 → 2.0.9

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 (97) hide show
  1. package/dist/pico-js.browser.js +1 -1
  2. package/dist/pico-js.browser.js.map +1 -1
  3. package/dist/pico-js.esm.js +1 -1
  4. package/dist/pico-js.esm.js.map +1 -1
  5. package/package.json +4 -6
  6. package/src/dom/{DomAttribute.js → DomAttribute.ts} +40 -63
  7. package/src/dom/{DomBuilder.js → DomBuilder.ts} +27 -44
  8. package/src/dom/{DomEvent.js → DomEvent.ts} +79 -78
  9. package/src/dom/{DomFinder.js → DomFinder.ts} +89 -129
  10. package/src/dom/DomForm.ts +38 -0
  11. package/src/dom/{DomGlobal.js → DomGlobal.ts} +34 -51
  12. package/src/dom/{DomInview.js → DomInview.ts} +37 -57
  13. package/src/dom/DomMeta.ts +48 -0
  14. package/src/dom/DomObserver.ts +17 -0
  15. package/src/dom/{DomPopover.js → DomPopover.ts} +20 -39
  16. package/src/dom/{DomRectangle.js → DomRectangle.ts} +67 -88
  17. package/src/format/{FormatFile.js → FormatFile.ts} +12 -23
  18. package/src/format/{FormatOption.js → FormatOption.ts} +15 -24
  19. package/src/format/{FormatParam.js → FormatParam.ts} +14 -25
  20. package/src/format/{FormatParser.js → FormatParser.ts} +29 -39
  21. package/src/format/{FormatUrl.js → FormatUrl.ts} +9 -21
  22. package/src/index.browser.ts +32 -0
  23. package/src/index.esm.ts +64 -0
  24. package/src/now/{NowDefault.js → NowDefault.ts} +86 -121
  25. package/src/now/{NowFormat.js → NowFormat.ts} +23 -28
  26. package/src/now/{NowGrid.js → NowGrid.ts} +41 -58
  27. package/src/now/{NowHuman.js → NowHuman.ts} +18 -27
  28. package/src/now/{NowMatch.js → NowMatch.ts} +22 -28
  29. package/src/now/{NowRange.js → NowRange.ts} +13 -22
  30. package/src/now/{NowWalker.js → NowWalker.ts} +65 -71
  31. package/src/tool/{scope.js → scope.ts} +41 -11
  32. package/src/utils/{Array.js → Array.ts} +146 -160
  33. package/src/utils/{Cookie.js → Cookie.ts} +15 -12
  34. package/src/utils/{Data.js → Data.ts} +17 -17
  35. package/src/utils/Dom.ts +204 -0
  36. package/src/utils/Format.ts +48 -0
  37. package/src/utils/{Hash.js → Hash.ts} +20 -20
  38. package/src/utils/{Locale.js → Locale.ts} +21 -21
  39. package/src/utils/{Mixed.js → Mixed.ts} +70 -58
  40. package/src/utils/{Now.js → Now.ts} +68 -69
  41. package/src/utils/{Number.js → Number.ts} +34 -36
  42. package/src/utils/{Object.js → Object.ts} +68 -122
  43. package/src/utils/{Route.js → Route.ts} +11 -9
  44. package/src/utils/{Runner.js → Runner.ts} +65 -47
  45. package/src/utils/{Signal.js → Signal.ts} +35 -22
  46. package/src/utils/{String.js → String.ts} +79 -69
  47. package/src/wip/{Element.js → Element.ts} +2 -2
  48. package/src/wip/{Map.js → Map.ts} +1 -1
  49. package/types/dom/DomAttribute.d.ts +16 -27
  50. package/types/dom/DomBuilder.d.ts +6 -9
  51. package/types/dom/DomEvent.d.ts +18 -24
  52. package/types/dom/DomFinder.d.ts +35 -58
  53. package/types/dom/DomForm.d.ts +7 -10
  54. package/types/dom/DomGlobal.d.ts +8 -15
  55. package/types/dom/DomInview.d.ts +9 -19
  56. package/types/dom/DomMeta.d.ts +9 -16
  57. package/types/dom/DomObserver.d.ts +4 -8
  58. package/types/dom/DomPopover.d.ts +8 -11
  59. package/types/dom/DomRectangle.d.ts +21 -40
  60. package/types/format/FormatFile.d.ts +5 -8
  61. package/types/format/FormatOption.d.ts +6 -8
  62. package/types/format/FormatParam.d.ts +6 -9
  63. package/types/format/FormatParser.d.ts +10 -18
  64. package/types/format/FormatUrl.d.ts +5 -8
  65. package/types/index.esm.d.ts +25 -37
  66. package/types/now/NowDefault.d.ts +30 -99
  67. package/types/now/NowFormat.d.ts +8 -21
  68. package/types/now/NowGrid.d.ts +24 -46
  69. package/types/now/NowHuman.d.ts +10 -11
  70. package/types/now/NowMatch.d.ts +6 -4
  71. package/types/now/NowRange.d.ts +5 -8
  72. package/types/now/NowWalker.d.ts +6 -4
  73. package/types/tool/scope.d.ts +11 -3
  74. package/types/utils/Array.d.ts +83 -104
  75. package/types/utils/Cookie.d.ts +11 -8
  76. package/types/utils/Data.d.ts +7 -7
  77. package/types/utils/Dom.d.ts +63 -96
  78. package/types/utils/Format.d.ts +15 -28
  79. package/types/utils/Hash.d.ts +21 -21
  80. package/types/utils/Locale.d.ts +9 -9
  81. package/types/utils/Mixed.d.ts +18 -32
  82. package/types/utils/Now.d.ts +51 -56
  83. package/types/utils/Number.d.ts +9 -20
  84. package/types/utils/Object.d.ts +21 -36
  85. package/types/utils/Route.d.ts +5 -2
  86. package/types/utils/Runner.d.ts +41 -24
  87. package/types/utils/Signal.d.ts +16 -16
  88. package/types/utils/String.d.ts +40 -76
  89. package/src/dom/DomForm.js +0 -59
  90. package/src/dom/DomMeta.js +0 -68
  91. package/src/dom/DomObserver.js +0 -38
  92. package/src/index.browser.js +0 -36
  93. package/src/index.esm.js +0 -80
  94. package/src/utils/Dom.js +0 -214
  95. package/src/utils/Format.js +0 -62
  96. package/types/wip/Element.d.ts +0 -119
  97. package/types/wip/Map.d.ts +0 -254
@@ -1,20 +1,22 @@
1
- /**
2
- * @memberof PicoDom
3
- */
4
- export class PicoDomEventStatic {
5
- static $events: any[];
1
+ import { PicoDom, PicoDomInterface } from "../utils/Dom.ts";
2
+ import PicoDomFinder from "./DomFinder.js";
3
+ import PicoDomRectangle from "./DomRectangle.js";
4
+ export interface PicoDomEvent extends PicoDomInterface, PicoDomFinder, PicoDomRectangle {
6
5
  }
7
6
  /**
8
7
  * @memberof PicoDom
9
- * @extends {PicoDom}
10
8
  */
11
- export class PicoDomEventInstance {
9
+ export declare class PicoDomEvent {
10
+ /**
11
+ * @type {any[]}
12
+ */
13
+ static $events: any[];
12
14
  /**
13
15
  * Bind event listener
14
16
  *
15
17
  * @example Dom.bind(el, "click", cb)
16
18
  *
17
- * @param {Element} el Target element
19
+ * @param {any} el Target element
18
20
  * @param {string} event Event name
19
21
  * @param {function} cb Callback fn
20
22
  * @param {string} [selector] Event selector
@@ -22,26 +24,26 @@ export class PicoDomEventInstance {
22
24
  * @param {any} [options] Listener options
23
25
  * @returns {PicoDom} Current instance
24
26
  */
25
- bind(el: Element, event: string, cb: Function, selector?: string, pause?: boolean, options?: any): PicoDom;
27
+ bind(el: any, event: string, cb: Function, selector?: string, pause?: boolean, options?: any): PicoDom;
26
28
  /**
27
29
  * Unbind event listener
28
30
  *
29
31
  * @example Dom.unbind(el, "click")
30
32
  *
31
- * @param {Element} el Target element
33
+ * @param {any} el Target element
32
34
  * @param {string} event Event name
33
35
  * @param {string} [selector] Event selector
34
36
  * @param {any} [options] Listener options
35
37
  * @returns {PicoDom} Current instance
36
38
  */
37
- unbind(el: Element, event: string, selector?: string, options?: any): PicoDom;
39
+ unbind(el: any, event: string, selector?: string, options?: any): PicoDom;
38
40
  /**
39
41
  * Listen to event
40
42
  *
41
43
  * @example Dom.find("div").on("click", cb)
42
44
  *
43
45
  * @param {any} event Event name
44
- * @param {function} cb Callback fn
46
+ * @param {Function} cb Callback fn
45
47
  * @param {any} [options] Listener options
46
48
  * @param {boolean} [pause] Pause listener
47
49
  * @param {string} [selector] Event selector
@@ -74,7 +76,7 @@ export class PicoDomEventInstance {
74
76
  * @example Dom.find("div").once("click", cb)
75
77
  *
76
78
  * @param {any} event Event name
77
- * @param {function} cb Callback fn
79
+ * @param {Function} cb Callback fn
78
80
  * @param {any} [options] Listener options
79
81
  * @returns {PicoDom} Current instance
80
82
  */
@@ -86,7 +88,7 @@ export class PicoDomEventInstance {
86
88
  *
87
89
  * @param {any} event Event name
88
90
  * @param {string} selector Event selector
89
- * @param {function} cb Callback fn
91
+ * @param {Function} cb Callback fn
90
92
  * @param {any} [options] Listener options
91
93
  * @param {boolean} [pause] Pause listener
92
94
  * @returns {PicoDom} Current instance
@@ -101,15 +103,7 @@ export class PicoDomEventInstance {
101
103
  * @param {object} [detail] Event detail
102
104
  * @returns {PicoDom} Current instance
103
105
  */
104
- fire(event: string, detail?: object): PicoDom;
106
+ fire(event: string, detail?: any): PicoDom;
105
107
  pointerdown(button?: number): this;
106
- /**
107
- * @see PicoDom.once
108
- */
109
- one(...args: any[]): PicoDom;
110
- delayed(): void;
111
- pause(): void;
112
- unpause(): void;
113
108
  }
114
- export function PicoDomEventPlugin(self: typeof PicoDom): typeof PicoDom;
115
- import { PicoDom } from "../utils/Dom.js";
109
+ export default PicoDomEvent;
@@ -1,7 +1,10 @@
1
+ import { PicoDomInterface, PicoDom } from "../utils/Dom.ts";
2
+ export interface PicoDomFinder extends PicoDomInterface {
3
+ }
1
4
  /**
2
5
  * @memberof PicoDom
3
6
  */
4
- export class PicoDomFinderStatic {
7
+ export declare class PicoDomFinder {
5
8
  /**
6
9
  * Filter nodes by type
7
10
  *
@@ -9,18 +12,18 @@ export class PicoDomFinderStatic {
9
12
  *
10
13
  * @param {any} nodes Source nodes
11
14
  * @param {number} [filter] Node type
12
- * @returns {Array<Element>} Filtered nodes
15
+ * @returns {Array<any>} Filtered nodes
13
16
  */
14
- static filterNodes(nodes: any, filter?: number): Array<Element>;
17
+ static filterNodes(nodes: any, filter?: number): Array<any>;
15
18
  /**
16
19
  * Get nodes at point
17
20
  *
18
21
  * @example Dom.getNodePoint(100, 100)
19
22
  *
20
- * @param {object} event Event data
21
- * @returns {Array<Element>} Nodes at point
23
+ * @param {any} event Event data
24
+ * @returns {Array<any>} Nodes at point
22
25
  */
23
- static getNodePoint(event: object): Array<Element>;
26
+ static getNodePoint(event: any): Array<any>;
24
27
  /**
25
28
  * Get target by selector
26
29
  *
@@ -28,24 +31,9 @@ export class PicoDomFinderStatic {
28
31
  *
29
32
  * @param {string} selector Node selector
30
33
  * @param {any} [event] Event object
31
- * @returns {Element} Found element
32
- */
33
- static getNodeEvent(selector: string, event?: any): Element;
34
- }
35
- /**
36
- * @memberof PicoDom
37
- * @extends {PicoDom}
38
- */
39
- export class PicoDomFinderInstance {
40
- /**
41
- * Resolve input elements
42
- *
43
- * @example Dom._constructFinder(".item")
44
- *
45
- * @param {any} el Input value
46
- * @returns {any} Resolved elements
34
+ * @returns {any} Found element
47
35
  */
48
- static _constructFinder(el: any): any;
36
+ static getNodeEvent(selector: string, event?: any): any;
49
37
  /**
50
38
  * Get node type
51
39
  *
@@ -89,9 +77,9 @@ export class PicoDomFinderInstance {
89
77
  *
90
78
  * @param {number} [type] Node type
91
79
  * @param {any} [fallback] Fallback value
92
- * @returns {Array<Element>} Child nodes
80
+ * @returns {Array<any>} Child nodes
93
81
  */
94
- getNodeChilds(type?: number, fallback?: any): Array<Element>;
82
+ getNodeChilds(type?: number, fallback?: any): Array<any>;
95
83
  /**
96
84
  * Filter instances nodes
97
85
  *
@@ -101,25 +89,24 @@ export class PicoDomFinderInstance {
101
89
  * @returns {PicoDom} Current instance
102
90
  */
103
91
  sanatize(filter?: number): PicoDom;
104
- els: any;
105
92
  /**
106
93
  * Filter elements by selector
107
94
  *
108
95
  * @example Dom.find("div").filter(".active")
109
96
  *
110
97
  * @param {any} selector Filter selector
111
- * @returns {Array<Element>} Filtered nodes
98
+ * @returns {Array<any>} Filtered nodes
112
99
  */
113
- filter(selector: any): Array<Element>;
100
+ filter(selector: any): Array<any>;
114
101
  /**
115
102
  * Exclude elements by selector
116
103
  *
117
104
  * @example Dom.find("div").except(".active")
118
105
  *
119
106
  * @param {any} selector Exclude selector
120
- * @returns {Array<Element>} Filtered nodes
107
+ * @returns {Array<any>} Filtered nodes
121
108
  */
122
- except(selector: any): Array<Element>;
109
+ except(selector: any): Array<any>;
123
110
  /**
124
111
  * Find elements in instance
125
112
  *
@@ -132,7 +119,7 @@ export class PicoDomFinderInstance {
132
119
  /**
133
120
  * Get element by index
134
121
  *
135
- * @example Dom.find("div").get(0) // => Element
122
+ * @example Dom.find("div").get(0) // => HTMLElement
136
123
  *
137
124
  * @param {number} [index] Node index
138
125
  * @returns {any} Found element
@@ -141,7 +128,7 @@ export class PicoDomFinderInstance {
141
128
  /**
142
129
  * Get first element
143
130
  *
144
- * @example Dom.find("div").first() // => Element
131
+ * @example Dom.find("div").first() // => HTMLElement
145
132
  *
146
133
  * @param {number} [offset] Node offset
147
134
  * @returns {any} Found element
@@ -150,7 +137,7 @@ export class PicoDomFinderInstance {
150
137
  /**
151
138
  * Get last element
152
139
  *
153
- * @example Dom.find("div").last() // => Element
140
+ * @example Dom.find("div").last() // => HTMLElement
154
141
  *
155
142
  * @param {number} [offset] Node offset
156
143
  * @returns {any} Found element
@@ -161,7 +148,7 @@ export class PicoDomFinderInstance {
161
148
  *
162
149
  * @example Dom.find("div").each((el) => console.log(el))
163
150
  *
164
- * @param {function} cb Callback fn
151
+ * @param {Function} cb Callback fn
165
152
  * @returns {PicoDom} Current instance
166
153
  */
167
154
  each(cb: Function): PicoDom;
@@ -170,7 +157,7 @@ export class PicoDomFinderInstance {
170
157
  *
171
158
  * @example Dom.find("div").loopParent((el) => console.log(el))
172
159
  *
173
- * @param {function} cb Callback fn
160
+ * @param {Function} cb Callback fn
174
161
  * @param {any} [boundry] Loop limit
175
162
  * @returns {PicoDom} Current instance
176
163
  */
@@ -200,18 +187,26 @@ export class PicoDomFinderInstance {
200
187
  *
201
188
  * @param {any} [selector] Child selector
202
189
  * @param {number} [filter] Node type
203
- * @returns {Array<Element>} Child elements
190
+ * @returns {Array<any>} Child elements
204
191
  */
205
- childs(selector?: any, filter?: number): Array<Element>;
192
+ childs(selector?: any, filter?: number): Array<any>;
206
193
  /**
207
194
  * Get closest element
208
195
  *
209
196
  * @example Dom.find("div").closest(".container")
210
197
  *
211
198
  * @param {any} selector Target selector
212
- * @returns {Element} Found element
199
+ * @returns {any} Found element
200
+ */
201
+ closest(selector: any): any;
202
+ /**
203
+ * Get closest instance
204
+ *
205
+ * @example Dom.find("div").upnode(".container")
206
+ *
207
+ * @param {any} selector
208
+ * @returns {PicoDom}
213
209
  */
214
- closest(selector: any): Element;
215
210
  upnode(selector: any): PicoDom;
216
211
  /**
217
212
  * Get previous element
@@ -301,23 +296,5 @@ export class PicoDomFinderInstance {
301
296
  * @returns {boolean} True if contains
302
297
  */
303
298
  contains(selector: any): boolean;
304
- /**
305
- * @see PicoDom.above
306
- */
307
- isParent(...args: any[]): boolean;
308
- /**
309
- * @see PicoDom.prev
310
- */
311
- previous(): PicoDom;
312
- /**
313
- * @see PicoDom.filter
314
- */
315
- where(...args: any[]): Element[];
316
- /**
317
- * @see PicoDom.except
318
- */
319
- not(...args: any[]): Element[];
320
- getNot(): void;
321
299
  }
322
- export function PicoDomFinderPlugin(self: typeof PicoDom): typeof PicoDom;
323
- import { PicoDom } from "../utils/Dom.js";
300
+ export default PicoDomFinder;
@@ -1,22 +1,19 @@
1
- /**
2
- * @memberof PicoDom
3
- */
4
- export class PicoDomFormStatic {
1
+ import { PicoDomInterface } from "../utils/Dom.ts";
2
+ import PicoDomFinder from "./DomFinder.js";
3
+ export interface PicoDomForm extends PicoDomInterface, PicoDomFinder {
5
4
  }
6
5
  /**
7
6
  * @memberof PicoDom
8
- * @extends {PicoDom}
9
7
  */
10
- export class PicoDomFormInstance {
8
+ export declare class PicoDomForm {
11
9
  /**
12
10
  * Get or set input value
13
11
  *
14
12
  * @example Dom.find("input").value("hello")
15
13
  *
16
14
  * @param {any} [value] Input value
17
- * @returns {any|PicoDom} Value or instance
15
+ * @returns {any} Value or instance
18
16
  */
19
- value(value?: any): any | PicoDom;
17
+ value(value?: any): any;
20
18
  }
21
- export function PicoDomFormPlugin(self: typeof PicoDom): typeof PicoDom;
22
- import { PicoDom } from "../utils/Dom.js";
19
+ export default PicoDomForm;
@@ -1,7 +1,10 @@
1
+ import { PicoDom, PicoDomInterface } from "../utils/Dom.ts";
2
+ export interface PicoDomGlobal extends PicoDomInterface {
3
+ }
1
4
  /**
2
5
  * @memberof PicoDom
3
6
  */
4
- export class PicoDomGlobalStatic {
7
+ export declare class PicoDomGlobal {
5
8
  /**
6
9
  * Get document ready state
7
10
  *
@@ -31,7 +34,7 @@ export class PicoDomGlobalStatic {
31
34
  *
32
35
  * @example Dom.ready(cb)
33
36
  *
34
- * @param {function} cb Callback fn
37
+ * @param {Function} cb Callback fn
35
38
  * @param {number} [delay] Execution delay
36
39
  * @param {number} [limit] Wait limit
37
40
  * @returns {PicoDom} Static class
@@ -42,21 +45,12 @@ export class PicoDomGlobalStatic {
42
45
  *
43
46
  * @example Dom.complete(cb)
44
47
  *
45
- * @param {function} cb Callback fn
48
+ * @param {Function} cb Callback fn
46
49
  * @param {number} [delay] Execution delay
47
50
  * @param {number} [limit] Wait limit
48
51
  * @returns {PicoDom} Static class
49
52
  */
50
53
  static complete(cb: Function, delay?: number, limit?: number): PicoDom;
51
- }
52
- export namespace PicoDomGlobalStatic {
53
- function required(): void;
54
- }
55
- /**
56
- * @memberof PicoDom
57
- * @extends {PicoDom}
58
- */
59
- export class PicoDomGlobalInstance {
60
54
  /**
61
55
  * Check if node is complete
62
56
  *
@@ -70,11 +64,10 @@ export class PicoDomGlobalInstance {
70
64
  *
71
65
  * @example Dom.find("img").loaded(cb)
72
66
  *
73
- * @param {function} cb Callback fn
67
+ * @param {Function} cb Callback fn
74
68
  * @param {number} [limit] Wait limit
75
69
  * @returns {PicoDom} Current instance
76
70
  */
77
71
  loaded(cb: Function, limit?: number): PicoDom;
78
72
  }
79
- export function PicoDomGlobalPlugin(self: typeof PicoDom): typeof PicoDom;
80
- import { PicoDom } from "../utils/Dom.js";
73
+ export default PicoDomGlobal;
@@ -1,14 +1,19 @@
1
+ import { PicoDomInterface } from "../utils/Dom.ts";
2
+ import PicoDomFinder from "./DomFinder.js";
3
+ import PicoDomRectangle from "./DomRectangle.js";
4
+ export interface PicoDomInview extends PicoDomInterface, PicoDomFinder, PicoDomRectangle {
5
+ }
1
6
  /**
2
7
  * @memberof PicoDom
3
8
  */
4
- export class PicoDomInviewStatic {
9
+ export declare class PicoDomInview {
5
10
  /**
6
11
  * Get first inview element Y
7
12
  *
8
13
  * @example Dom.inviewMaxY(".item")
9
14
  *
10
15
  * @param {any} options Find options
11
- * @param {function} [cb] Success callback
16
+ * @param {Function} [cb] Success callback
12
17
  * @returns {any} Found element
13
18
  */
14
19
  static inviewMaxY(options: any, cb?: Function): any;
@@ -18,16 +23,10 @@ export class PicoDomInviewStatic {
18
23
  * @example Dom.inviewMaxX(".item")
19
24
  *
20
25
  * @param {any} options Find options
21
- * @param {function} [cb] Success callback
26
+ * @param {Function} [cb] Success callback
22
27
  * @returns {any} Found element
23
28
  */
24
29
  static inviewMaxX(options: any, cb?: Function): any;
25
- }
26
- /**
27
- * @memberof PicoDom
28
- * @extends {PicoDom}
29
- */
30
- export class PicoDomInviewInstance {
31
30
  /**
32
31
  * Get X view offset
33
32
  *
@@ -102,14 +101,5 @@ export class PicoDomInviewInstance {
102
101
  * @returns {boolean} True if inview
103
102
  */
104
103
  isInviewY(threshold?: number, mode?: string, boundry?: any): boolean;
105
- /**
106
- * @see PicoDom.inviewY
107
- */
108
- inviewHeight(...args: any[]): number;
109
- /**
110
- * @see PicoDom.inviewX
111
- */
112
- inviewWidth(...args: any[]): number;
113
104
  }
114
- export function PicoDomInviewPlugin(self: typeof PicoDom): typeof PicoDom;
115
- import { PicoDom } from "../utils/Dom.js";
105
+ export default PicoDomInview;
@@ -1,8 +1,14 @@
1
+ import { PicoDom, PicoDomInterface } from "../utils/Dom.ts";
2
+ export interface PicoDomMeta extends PicoDomInterface {
3
+ }
1
4
  /**
2
5
  * @memberof PicoDom
3
6
  */
4
- export class PicoDomMetaStatic {
5
- static $meta: {};
7
+ export declare class PicoDomMeta {
8
+ /**
9
+ * @type {any}
10
+ */
11
+ static $meta: any;
6
12
  /**
7
13
  * Set document title
8
14
  *
@@ -14,17 +20,4 @@ export class PicoDomMetaStatic {
14
20
  */
15
21
  static setMetaTitle(value: string, glue?: string): PicoDom;
16
22
  }
17
- export namespace PicoDomMetaStatic {
18
- /**
19
- * @see PicoDom.setMetaTitle
20
- */
21
- function title(value: any): any;
22
- }
23
- /**
24
- * @memberof PicoDom
25
- * @extends {PicoDom}
26
- */
27
- export class PicoDomMetaInstance {
28
- }
29
- export function PicoDomMetaPlugin(self: typeof PicoDom): typeof PicoDom;
30
- import { PicoDom } from "../utils/Dom.js";
23
+ export default PicoDomMeta;
@@ -1,13 +1,9 @@
1
- /**
2
- * @memberof PicoDom
3
- */
4
- export class PicoDomObserverStatic {
1
+ import { PicoDomInterface } from "../utils/Dom.ts";
2
+ export interface PicoDomObserver extends PicoDomInterface {
5
3
  }
6
4
  /**
7
5
  * @memberof PicoDom
8
- * @extends {PicoDom}
9
6
  */
10
- export class PicoDomObserverInstance {
7
+ export declare class PicoDomObserver {
11
8
  }
12
- export function PicoDomObserverPlugin(self: typeof PicoDom): typeof PicoDom;
13
- import { PicoDom } from "../utils/Dom.js";
9
+ export default PicoDomObserver;
@@ -1,17 +1,14 @@
1
- /**
2
- * @memberof PicoDom
3
- */
4
- export class PicoDomPopoverStatic {
1
+ import { PicoDomInterface } from "../utils/Dom.ts";
2
+ import PicoDomRectangle from "./DomRectangle.js";
3
+ export interface PicoDomPopover extends PicoDomInterface, PicoDomRectangle {
5
4
  }
6
5
  /**
7
6
  * @memberof PicoDom
8
- * @extends {PicoDom}
9
7
  */
10
- export class PicoDomPopoverInstance {
11
- popover(target: any, position?: string, options?: {}): any;
12
- popoverY(target: any, position?: string, options?: {}): any;
13
- popoverX(target: any, position?: string, options?: {}): any;
8
+ export declare class PicoDomPopover {
9
+ popover(target: any, position?: string, options?: any): any;
10
+ popoverY(target: any, position?: string, options?: any): any;
11
+ popoverX(target: any, position?: string, options?: any): any;
14
12
  popoverNormalize(offset: any, self: any, rect: any, win: any): any;
15
13
  }
16
- export function PicoDomPopoverPlugin(self: typeof PicoDom): typeof PicoDom;
17
- import { PicoDom } from "../utils/Dom.js";
14
+ export default PicoDomPopover;
@@ -1,7 +1,12 @@
1
+ import { PicoDom, PicoDomInterface } from "../utils/Dom.ts";
2
+ import PicoDomFinder from "./DomFinder.js";
3
+ import PicoDomAttribute from "./DomAttribute.js";
4
+ export interface PicoDomRectangle extends PicoDomInterface, PicoDomFinder, PicoDomAttribute {
5
+ }
1
6
  /**
2
7
  * @memberof PicoDom
3
8
  */
4
- export class PicoDomRectangleStatic {
9
+ export declare class PicoDomRectangle {
5
10
  /**
6
11
  * Cast value to number
7
12
  *
@@ -11,18 +16,7 @@ export class PicoDomRectangleStatic {
11
16
  * @returns {number} Number value
12
17
  */
13
18
  static num(value: any): number;
14
- }
15
- /**
16
- * @memberof PicoDom
17
- * @extends {PicoDom}
18
- */
19
- export class PicoDomRectangleInstance {
20
- rect(fallback?: {
21
- left: number;
22
- top: number;
23
- width: number;
24
- height: number;
25
- }): any;
19
+ rect(fallback?: any): any;
26
20
  /**
27
21
  * Get margin values
28
22
  *
@@ -81,9 +75,9 @@ export class PicoDomRectangleInstance {
81
75
  * @example Dom.find("div").realHeight({ display: "block" })
82
76
  *
83
77
  * @param {any} [style] Temp style
84
- * @returns {number} Height value
78
+ * @returns {any} Height value
85
79
  */
86
- realHeight(style?: any): number;
80
+ realHeight(style?: any): any;
87
81
  /**
88
82
  * Evaluate target height
89
83
  *
@@ -91,9 +85,9 @@ export class PicoDomRectangleInstance {
91
85
  *
92
86
  * @param {any} [target] Target element
93
87
  * @param {boolean} [apply] Apply style
94
- * @returns {number} Height value
88
+ * @returns {any} Height value
95
89
  */
96
- evaluateHeight(target?: any, apply?: boolean): number;
90
+ evaluateHeight(target?: any, apply?: boolean): any;
97
91
  /**
98
92
  * Get element width
99
93
  *
@@ -132,9 +126,9 @@ export class PicoDomRectangleInstance {
132
126
  * @example Dom.find("div").realWidth({ display: "block" })
133
127
  *
134
128
  * @param {any} [style] Temp style
135
- * @returns {number} Width value
129
+ * @returns {any} Width value
136
130
  */
137
- realWidth(style?: any): number;
131
+ realWidth(style?: {}): any;
138
132
  /**
139
133
  * Evaluate target width
140
134
  *
@@ -142,9 +136,9 @@ export class PicoDomRectangleInstance {
142
136
  *
143
137
  * @param {any} [target] Target element
144
138
  * @param {boolean} [apply] Apply style
145
- * @returns {number} Width value
139
+ * @returns {any} Width value
146
140
  */
147
- evaluateWidth(target?: any, apply?: boolean): number;
141
+ evaluateWidth(target?: any, apply?: boolean): any;
148
142
  /**
149
143
  * Get element offset
150
144
  *
@@ -196,7 +190,7 @@ export class PicoDomRectangleInstance {
196
190
  *
197
191
  * @example Dom.find("div").loopOffset((el) => console.log(el))
198
192
  *
199
- * @param {function} cb Callback fn
193
+ * @param {Function} cb Callback fn
200
194
  * @param {any} [boundry] Loop limit
201
195
  * @returns {PicoDom} Current instance
202
196
  */
@@ -238,9 +232,9 @@ export class PicoDomRectangleInstance {
238
232
  *
239
233
  * @param {any} [value] Scroll value
240
234
  * @param {any} [boundry] View boundry
241
- * @returns {number|PicoDom} Value or instance
235
+ * @returns {any} Value or instance
242
236
  */
243
- scrollTop(value?: any, boundry?: any): number | PicoDom;
237
+ scrollTop(value?: any, boundry?: any): any;
244
238
  /**
245
239
  * Get or set scroll left
246
240
  *
@@ -248,9 +242,9 @@ export class PicoDomRectangleInstance {
248
242
  *
249
243
  * @param {any} [value] Scroll value
250
244
  * @param {any} [boundry] View boundry
251
- * @returns {number|PicoDom} Value or instance
245
+ * @returns {any} Value or instance
252
246
  */
253
- scrollLeft(value?: any, boundry?: any): number | PicoDom;
247
+ scrollLeft(value?: any, boundry?: any): any;
254
248
  /**
255
249
  * Get relative scroll
256
250
  *
@@ -260,18 +254,5 @@ export class PicoDomRectangleInstance {
260
254
  * @returns {any} Scroll values
261
255
  */
262
256
  getScroll(boundry?: any): any;
263
- /**
264
- * @see PicoDom.loopOffsetParent
265
- */
266
- loopOffsetParent(...args: any[]): PicoDom;
267
- /**
268
- * @see PicoDom.scrollTopGlobal
269
- */
270
- scrollTopGlobal(): any;
271
- /**
272
- * @see PicoDom.scrollLeftGlobal
273
- */
274
- scrollLeftGlobal(): any;
275
257
  }
276
- export function PicoDomRectanglePlugin(self: typeof PicoDom): typeof PicoDom;
277
- import { PicoDom } from "../utils/Dom.js";
258
+ export default PicoDomRectangle;
@@ -1,9 +1,7 @@
1
- export const FILE_UNITS: string[];
2
- /**
3
- * @memberof PicoFormat
4
- * @extends {PicoFormat}
5
- */
6
- export class PicoFormatFileStatic {
1
+ export declare const FILE_UNITS: string[];
2
+ export interface PicoFormatFile {
3
+ }
4
+ export declare class PicoFormatFile {
7
5
  /**
8
6
  * Format file size
9
7
  *
@@ -15,5 +13,4 @@ export class PicoFormatFileStatic {
15
13
  */
16
14
  static filesize(value: any, decimals?: number): string;
17
15
  }
18
- export function PicoFormatFilePlugin(self: typeof PicoFormat): typeof PicoFormat;
19
- import { PicoFormat } from "../utils/Format.js";
16
+ export default PicoFormatFile;