@kizmann/pico-js 2.0.7 → 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} +101 -76
  9. package/src/dom/{DomFinder.js → DomFinder.ts} +103 -139
  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} +70 -87
  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} +187 -152
  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} +104 -61
  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} +89 -77
  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 +19 -24
  52. package/types/dom/DomFinder.d.ts +38 -61
  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 -35
  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 -101
  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 +19 -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 +45 -38
  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,14 +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;
105
- /**
106
- * @see PicoDom.once
107
- */
108
- one(...args: any[]): PicoDom;
109
- delayed(): void;
110
- pause(): void;
111
- unpause(): void;
106
+ fire(event: string, detail?: any): PicoDom;
107
+ pointerdown(button?: number): this;
112
108
  }
113
- export function PicoDomEventPlugin(self: typeof PicoDom): typeof PicoDom;
114
- 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,19 +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 {number} posx X position
21
- * @param {number} posy Y position
22
- * @returns {Array<Element>} Nodes at point
23
+ * @param {any} event Event data
24
+ * @returns {Array<any>} Nodes at point
23
25
  */
24
- static getNodePoint(posx: number, posy: number): Array<Element>;
26
+ static getNodePoint(event: any): Array<any>;
25
27
  /**
26
28
  * Get target by selector
27
29
  *
@@ -29,24 +31,9 @@ export class PicoDomFinderStatic {
29
31
  *
30
32
  * @param {string} selector Node selector
31
33
  * @param {any} [event] Event object
32
- * @returns {Element} Found element
33
- */
34
- static getNodeEvent(selector: string, event?: any): Element;
35
- }
36
- /**
37
- * @memberof PicoDom
38
- * @extends {PicoDom}
39
- */
40
- export class PicoDomFinderInstance {
41
- /**
42
- * Resolve input elements
43
- *
44
- * @example Dom._constructFinder(".item")
45
- *
46
- * @param {any} el Input value
47
- * @returns {any} Resolved elements
34
+ * @returns {any} Found element
48
35
  */
49
- static _constructFinder(el: any): any;
36
+ static getNodeEvent(selector: string, event?: any): any;
50
37
  /**
51
38
  * Get node type
52
39
  *
@@ -90,9 +77,9 @@ export class PicoDomFinderInstance {
90
77
  *
91
78
  * @param {number} [type] Node type
92
79
  * @param {any} [fallback] Fallback value
93
- * @returns {Array<Element>} Child nodes
80
+ * @returns {Array<any>} Child nodes
94
81
  */
95
- getNodeChilds(type?: number, fallback?: any): Array<Element>;
82
+ getNodeChilds(type?: number, fallback?: any): Array<any>;
96
83
  /**
97
84
  * Filter instances nodes
98
85
  *
@@ -102,25 +89,24 @@ export class PicoDomFinderInstance {
102
89
  * @returns {PicoDom} Current instance
103
90
  */
104
91
  sanatize(filter?: number): PicoDom;
105
- els: any;
106
92
  /**
107
93
  * Filter elements by selector
108
94
  *
109
95
  * @example Dom.find("div").filter(".active")
110
96
  *
111
97
  * @param {any} selector Filter selector
112
- * @returns {Array<Element>} Filtered nodes
98
+ * @returns {Array<any>} Filtered nodes
113
99
  */
114
- filter(selector: any): Array<Element>;
100
+ filter(selector: any): Array<any>;
115
101
  /**
116
102
  * Exclude elements by selector
117
103
  *
118
104
  * @example Dom.find("div").except(".active")
119
105
  *
120
106
  * @param {any} selector Exclude selector
121
- * @returns {Array<Element>} Filtered nodes
107
+ * @returns {Array<any>} Filtered nodes
122
108
  */
123
- except(selector: any): Array<Element>;
109
+ except(selector: any): Array<any>;
124
110
  /**
125
111
  * Find elements in instance
126
112
  *
@@ -133,7 +119,7 @@ export class PicoDomFinderInstance {
133
119
  /**
134
120
  * Get element by index
135
121
  *
136
- * @example Dom.find("div").get(0) // => Element
122
+ * @example Dom.find("div").get(0) // => HTMLElement
137
123
  *
138
124
  * @param {number} [index] Node index
139
125
  * @returns {any} Found element
@@ -142,7 +128,7 @@ export class PicoDomFinderInstance {
142
128
  /**
143
129
  * Get first element
144
130
  *
145
- * @example Dom.find("div").first() // => Element
131
+ * @example Dom.find("div").first() // => HTMLElement
146
132
  *
147
133
  * @param {number} [offset] Node offset
148
134
  * @returns {any} Found element
@@ -151,7 +137,7 @@ export class PicoDomFinderInstance {
151
137
  /**
152
138
  * Get last element
153
139
  *
154
- * @example Dom.find("div").last() // => Element
140
+ * @example Dom.find("div").last() // => HTMLElement
155
141
  *
156
142
  * @param {number} [offset] Node offset
157
143
  * @returns {any} Found element
@@ -162,7 +148,7 @@ export class PicoDomFinderInstance {
162
148
  *
163
149
  * @example Dom.find("div").each((el) => console.log(el))
164
150
  *
165
- * @param {function} cb Callback fn
151
+ * @param {Function} cb Callback fn
166
152
  * @returns {PicoDom} Current instance
167
153
  */
168
154
  each(cb: Function): PicoDom;
@@ -171,7 +157,7 @@ export class PicoDomFinderInstance {
171
157
  *
172
158
  * @example Dom.find("div").loopParent((el) => console.log(el))
173
159
  *
174
- * @param {function} cb Callback fn
160
+ * @param {Function} cb Callback fn
175
161
  * @param {any} [boundry] Loop limit
176
162
  * @returns {PicoDom} Current instance
177
163
  */
@@ -193,7 +179,7 @@ export class PicoDomFinderInstance {
193
179
  * @param {number} [filter] Node type
194
180
  * @returns {PicoDom} Child instance
195
181
  */
196
- child(selector: any, filter?: number): PicoDom;
182
+ child(selector?: any, filter?: number): PicoDom;
197
183
  /**
198
184
  * Get child elements
199
185
  *
@@ -201,18 +187,26 @@ export class PicoDomFinderInstance {
201
187
  *
202
188
  * @param {any} [selector] Child selector
203
189
  * @param {number} [filter] Node type
204
- * @returns {Array<Element>} Child elements
190
+ * @returns {Array<any>} Child elements
205
191
  */
206
- childs(selector?: any, filter?: number): Array<Element>;
192
+ childs(selector?: any, filter?: number): Array<any>;
207
193
  /**
208
194
  * Get closest element
209
195
  *
210
196
  * @example Dom.find("div").closest(".container")
211
197
  *
212
198
  * @param {any} selector Target selector
213
- * @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}
214
209
  */
215
- closest(selector: any): Element;
216
210
  upnode(selector: any): PicoDom;
217
211
  /**
218
212
  * Get previous element
@@ -246,9 +240,10 @@ export class PicoDomFinderInstance {
246
240
  * @example Dom.find("div").is(".active") // => true
247
241
  *
248
242
  * @param {any} selector Test selector
243
+ * @param {boolean} [empty] Test selector
249
244
  * @returns {boolean} True if matches
250
245
  */
251
- is(selector: any): boolean;
246
+ is(selector: any, empty?: boolean): boolean;
252
247
  /**
253
248
  * Check if contains match
254
249
  *
@@ -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,13 +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?: {}): any;
19
+ rect(fallback?: any): any;
21
20
  /**
22
21
  * Get margin values
23
22
  *
@@ -76,9 +75,9 @@ export class PicoDomRectangleInstance {
76
75
  * @example Dom.find("div").realHeight({ display: "block" })
77
76
  *
78
77
  * @param {any} [style] Temp style
79
- * @returns {number} Height value
78
+ * @returns {any} Height value
80
79
  */
81
- realHeight(style?: any): number;
80
+ realHeight(style?: any): any;
82
81
  /**
83
82
  * Evaluate target height
84
83
  *
@@ -86,9 +85,9 @@ export class PicoDomRectangleInstance {
86
85
  *
87
86
  * @param {any} [target] Target element
88
87
  * @param {boolean} [apply] Apply style
89
- * @returns {number} Height value
88
+ * @returns {any} Height value
90
89
  */
91
- evaluateHeight(target?: any, apply?: boolean): number;
90
+ evaluateHeight(target?: any, apply?: boolean): any;
92
91
  /**
93
92
  * Get element width
94
93
  *
@@ -127,9 +126,9 @@ export class PicoDomRectangleInstance {
127
126
  * @example Dom.find("div").realWidth({ display: "block" })
128
127
  *
129
128
  * @param {any} [style] Temp style
130
- * @returns {number} Width value
129
+ * @returns {any} Width value
131
130
  */
132
- realWidth(style?: any): number;
131
+ realWidth(style?: {}): any;
133
132
  /**
134
133
  * Evaluate target width
135
134
  *
@@ -137,9 +136,9 @@ export class PicoDomRectangleInstance {
137
136
  *
138
137
  * @param {any} [target] Target element
139
138
  * @param {boolean} [apply] Apply style
140
- * @returns {number} Width value
139
+ * @returns {any} Width value
141
140
  */
142
- evaluateWidth(target?: any, apply?: boolean): number;
141
+ evaluateWidth(target?: any, apply?: boolean): any;
143
142
  /**
144
143
  * Get element offset
145
144
  *
@@ -191,7 +190,7 @@ export class PicoDomRectangleInstance {
191
190
  *
192
191
  * @example Dom.find("div").loopOffset((el) => console.log(el))
193
192
  *
194
- * @param {function} cb Callback fn
193
+ * @param {Function} cb Callback fn
195
194
  * @param {any} [boundry] Loop limit
196
195
  * @returns {PicoDom} Current instance
197
196
  */
@@ -233,9 +232,9 @@ export class PicoDomRectangleInstance {
233
232
  *
234
233
  * @param {any} [value] Scroll value
235
234
  * @param {any} [boundry] View boundry
236
- * @returns {number|PicoDom} Value or instance
235
+ * @returns {any} Value or instance
237
236
  */
238
- scrollTop(value?: any, boundry?: any): number | PicoDom;
237
+ scrollTop(value?: any, boundry?: any): any;
239
238
  /**
240
239
  * Get or set scroll left
241
240
  *
@@ -243,9 +242,9 @@ export class PicoDomRectangleInstance {
243
242
  *
244
243
  * @param {any} [value] Scroll value
245
244
  * @param {any} [boundry] View boundry
246
- * @returns {number|PicoDom} Value or instance
245
+ * @returns {any} Value or instance
247
246
  */
248
- scrollLeft(value?: any, boundry?: any): number | PicoDom;
247
+ scrollLeft(value?: any, boundry?: any): any;
249
248
  /**
250
249
  * Get relative scroll
251
250
  *
@@ -255,18 +254,5 @@ export class PicoDomRectangleInstance {
255
254
  * @returns {any} Scroll values
256
255
  */
257
256
  getScroll(boundry?: any): any;
258
- /**
259
- * @see PicoDom.loopOffsetParent
260
- */
261
- loopOffsetParent(...args: any[]): PicoDom;
262
- /**
263
- * @see PicoDom.scrollTopGlobal
264
- */
265
- scrollTopGlobal(): any;
266
- /**
267
- * @see PicoDom.scrollLeftGlobal
268
- */
269
- scrollLeftGlobal(): any;
270
257
  }
271
- export function PicoDomRectanglePlugin(self: typeof PicoDom): typeof PicoDom;
272
- import { PicoDom } from "../utils/Dom.js";
258
+ export default PicoDomRectangle;