@kizmann/pico-js 2.0.0 → 2.0.1
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.
- package/dist/pico-js.browser.js +1 -1
- package/dist/pico-js.browser.js.map +1 -1
- package/dist/pico-js.esm.js +1 -1
- package/dist/pico-js.esm.js.map +1 -1
- package/package.json +1 -2
- package/src/dom/DomAttribute.js +13 -11
- package/src/dom/DomBuilder.js +9 -7
- package/src/dom/DomEvent.js +11 -9
- package/src/dom/DomFinder.js +7 -5
- package/src/dom/DomForm.js +5 -3
- package/src/dom/DomGlobal.js +7 -5
- package/src/dom/DomInview.js +4 -2
- package/src/dom/DomMeta.js +5 -3
- package/src/dom/DomObserver.js +5 -3
- package/src/dom/DomRectangle.js +7 -6
- package/src/format/FormatFile.js +4 -2
- package/src/format/FormatOption.js +4 -2
- package/src/format/FormatParam.js +4 -2
- package/src/format/FormatParser.js +4 -2
- package/src/format/FormatUrl.js +4 -2
- package/src/index.browser.js +30 -9
- package/src/index.esm.js +46 -68
- package/src/now/NowDefault.js +4 -2
- package/src/now/NowFormat.js +4 -2
- package/src/now/NowGrid.js +4 -2
- package/src/now/NowHuman.js +4 -2
- package/src/now/NowMatch.js +4 -2
- package/src/now/NowRange.js +4 -2
- package/src/now/NowWalker.js +4 -2
- package/src/utils/Array.js +1 -1
- package/src/utils/Cookie.js +1 -1
- package/src/utils/Data.js +1 -1
- package/src/utils/Dom.js +28 -28
- package/src/utils/Event.js +2 -2
- package/src/utils/Format.js +10 -10
- package/src/utils/Hash.js +1 -1
- package/src/utils/Locale.js +1 -1
- package/src/utils/Mixed.js +1 -1
- package/src/utils/Now.js +15 -15
- package/src/utils/Number.js +1 -1
- package/src/utils/Object.js +1 -1
- package/src/utils/Route.js +1 -1
- package/src/utils/Runner.js +4 -4
- package/src/utils/String.js +1 -1
- package/src/wip/Element.js +4 -4
- package/src/wip/Map.js +4 -4
- package/types/dom/DomAttribute.d.ts +21 -20
- package/types/dom/DomBuilder.d.ts +12 -11
- package/types/dom/DomEvent.d.ts +17 -16
- package/types/dom/DomFinder.d.ts +8 -7
- package/types/dom/DomForm.d.ts +4 -3
- package/types/dom/DomGlobal.d.ts +8 -7
- package/types/dom/DomInview.d.ts +2 -1
- package/types/dom/DomMeta.d.ts +4 -3
- package/types/dom/DomObserver.d.ts +4 -3
- package/types/dom/DomRectangle.d.ts +9 -8
- package/types/format/FormatFile.d.ts +2 -1
- package/types/format/FormatOption.d.ts +2 -1
- package/types/format/FormatParam.d.ts +2 -1
- package/types/format/FormatParser.d.ts +2 -1
- package/types/format/FormatUrl.d.ts +2 -1
- package/types/index.esm.d.ts +67 -41
- package/types/now/NowDefault.d.ts +2 -1
- package/types/now/NowFormat.d.ts +2 -1
- package/types/now/NowGrid.d.ts +2 -1
- package/types/now/NowHuman.d.ts +2 -1
- package/types/now/NowMatch.d.ts +2 -1
- package/types/now/NowRange.d.ts +2 -1
- package/types/now/NowWalker.d.ts +2 -1
- package/types/utils/Array.d.ts +6 -6
- package/types/utils/Dom.d.ts +35 -35
- package/types/utils/Event.d.ts +2 -2
- package/types/utils/Format.d.ts +11 -11
- package/types/utils/Now.d.ts +14 -14
- package/types/utils/Runner.d.ts +6 -6
- package/types/wip/Element.d.ts +8 -8
- package/types/wip/Map.d.ts +8 -8
- package/types/index.browser.d.ts +0 -1
|
@@ -16,9 +16,9 @@ export class PicoDomAttributeInstance {
|
|
|
16
16
|
* @param {string} key Attr key
|
|
17
17
|
* @param {any} [value] Attr value
|
|
18
18
|
* @param {any} [fallback] Fallback value
|
|
19
|
-
* @returns {any|
|
|
19
|
+
* @returns {any|PicoDom} Attr value or instance
|
|
20
20
|
*/
|
|
21
|
-
attr(key: string, value?: any, fallback?: any): any |
|
|
21
|
+
attr(key: string, value?: any, fallback?: any): any | PicoDom;
|
|
22
22
|
/**
|
|
23
23
|
* Get or set data attribute
|
|
24
24
|
*
|
|
@@ -27,9 +27,9 @@ export class PicoDomAttributeInstance {
|
|
|
27
27
|
* @param {string} key Data key
|
|
28
28
|
* @param {any} [value] Data value
|
|
29
29
|
* @param {any} [fallback] Fallback value
|
|
30
|
-
* @returns {any|
|
|
30
|
+
* @returns {any|PicoDom} Data value or instance
|
|
31
31
|
*/
|
|
32
|
-
data(key: string, value?: any, fallback?: any): any |
|
|
32
|
+
data(key: string, value?: any, fallback?: any): any | PicoDom;
|
|
33
33
|
/**
|
|
34
34
|
* Get computed style
|
|
35
35
|
*
|
|
@@ -47,9 +47,9 @@ export class PicoDomAttributeInstance {
|
|
|
47
47
|
*
|
|
48
48
|
* @param {any} [value] Style value
|
|
49
49
|
* @param {boolean} [combine] Combine style
|
|
50
|
-
* @returns {any|
|
|
50
|
+
* @returns {any|PicoDom} Style or instance
|
|
51
51
|
*/
|
|
52
|
-
style(value?: any, combine?: boolean): any |
|
|
52
|
+
style(value?: any, combine?: boolean): any | PicoDom;
|
|
53
53
|
/**
|
|
54
54
|
* Get or set classes
|
|
55
55
|
*
|
|
@@ -57,18 +57,18 @@ export class PicoDomAttributeInstance {
|
|
|
57
57
|
*
|
|
58
58
|
* @param {any} [value] Class value
|
|
59
59
|
* @param {boolean} [combine] Combine classes
|
|
60
|
-
* @returns {any|
|
|
60
|
+
* @returns {any|PicoDom} Classes or instance
|
|
61
61
|
*/
|
|
62
|
-
class(value?: any, combine?: boolean): any |
|
|
62
|
+
class(value?: any, combine?: boolean): any | PicoDom;
|
|
63
63
|
/**
|
|
64
64
|
* Get or set inner HTML
|
|
65
65
|
*
|
|
66
66
|
* @example Dom.find("div").html("<span></span>")
|
|
67
67
|
*
|
|
68
68
|
* @param {any} [html] HTML content
|
|
69
|
-
* @returns {string|
|
|
69
|
+
* @returns {string|PicoDom} HTML or instance
|
|
70
70
|
*/
|
|
71
|
-
html(html?: any): string |
|
|
71
|
+
html(html?: any): string | PicoDom;
|
|
72
72
|
/**
|
|
73
73
|
* Get actual style value
|
|
74
74
|
*
|
|
@@ -94,27 +94,27 @@ export class PicoDomAttributeInstance {
|
|
|
94
94
|
* @example Dom.find("div").addClass("active")
|
|
95
95
|
*
|
|
96
96
|
* @param {any} cls Class name
|
|
97
|
-
* @returns {
|
|
97
|
+
* @returns {PicoDom} Current instance
|
|
98
98
|
*/
|
|
99
|
-
addClass(cls: any):
|
|
99
|
+
addClass(cls: any): PicoDom;
|
|
100
100
|
/**
|
|
101
101
|
* Remove class from element
|
|
102
102
|
*
|
|
103
103
|
* @example Dom.find("div").remClass("active")
|
|
104
104
|
*
|
|
105
105
|
* @param {any} cls Class name
|
|
106
|
-
* @returns {
|
|
106
|
+
* @returns {PicoDom} Current instance
|
|
107
107
|
*/
|
|
108
|
-
remClass(cls: any):
|
|
108
|
+
remClass(cls: any): PicoDom;
|
|
109
109
|
/**
|
|
110
110
|
* Toggle class on element
|
|
111
111
|
*
|
|
112
112
|
* @example Dom.find("div").toggleClass("active")
|
|
113
113
|
*
|
|
114
114
|
* @param {any} cls Class name
|
|
115
|
-
* @returns {
|
|
115
|
+
* @returns {PicoDom} Current instance
|
|
116
116
|
*/
|
|
117
|
-
toggleClass(cls: any):
|
|
117
|
+
toggleClass(cls: any): PicoDom;
|
|
118
118
|
/**
|
|
119
119
|
* Set class by state
|
|
120
120
|
*
|
|
@@ -122,9 +122,9 @@ export class PicoDomAttributeInstance {
|
|
|
122
122
|
*
|
|
123
123
|
* @param {any} cls Class name
|
|
124
124
|
* @param {boolean} [state] Target state
|
|
125
|
-
* @returns {
|
|
125
|
+
* @returns {PicoDom} Current instance
|
|
126
126
|
*/
|
|
127
|
-
stateClass(cls: any, state?: boolean):
|
|
127
|
+
stateClass(cls: any, state?: boolean): PicoDom;
|
|
128
128
|
/**
|
|
129
129
|
* @see PicoDom.style
|
|
130
130
|
*/
|
|
@@ -132,6 +132,7 @@ export class PicoDomAttributeInstance {
|
|
|
132
132
|
/**
|
|
133
133
|
* @see PicoDom.remClass
|
|
134
134
|
*/
|
|
135
|
-
removeClass(...args: any[]):
|
|
135
|
+
removeClass(...args: any[]): PicoDom;
|
|
136
136
|
}
|
|
137
|
-
export function PicoDomAttributePlugin(self:
|
|
137
|
+
export function PicoDomAttributePlugin(self: typeof PicoDom): typeof PicoDom;
|
|
138
|
+
import { PicoDom } from "../utils/Dom.js";
|
|
@@ -24,44 +24,45 @@ export class PicoDomBuilderInstance {
|
|
|
24
24
|
* @example Dom.find("div").prepend("<span></span>")
|
|
25
25
|
*
|
|
26
26
|
* @param {any} value Prepend value
|
|
27
|
-
* @returns {
|
|
27
|
+
* @returns {PicoDom} Current instance
|
|
28
28
|
*/
|
|
29
|
-
prepend(value: any):
|
|
29
|
+
prepend(value: any): PicoDom;
|
|
30
30
|
/**
|
|
31
31
|
* Prepend element to value
|
|
32
32
|
*
|
|
33
33
|
* @example Dom.find("span").prependTo("div")
|
|
34
34
|
*
|
|
35
35
|
* @param {any} value Target element
|
|
36
|
-
* @returns {
|
|
36
|
+
* @returns {PicoDom} Current instance
|
|
37
37
|
*/
|
|
38
|
-
prependTo(value: any):
|
|
38
|
+
prependTo(value: any): PicoDom;
|
|
39
39
|
/**
|
|
40
40
|
* Append value to element
|
|
41
41
|
*
|
|
42
42
|
* @example Dom.find("div").append("<span></span>")
|
|
43
43
|
*
|
|
44
44
|
* @param {any} value Append value
|
|
45
|
-
* @returns {
|
|
45
|
+
* @returns {PicoDom} Current instance
|
|
46
46
|
*/
|
|
47
|
-
append(value: any):
|
|
47
|
+
append(value: any): PicoDom;
|
|
48
48
|
/**
|
|
49
49
|
* Append element to value
|
|
50
50
|
*
|
|
51
51
|
* @example Dom.find("span").appendTo("div")
|
|
52
52
|
*
|
|
53
53
|
* @param {any} value Target element
|
|
54
|
-
* @returns {
|
|
54
|
+
* @returns {PicoDom} Current instance
|
|
55
55
|
*/
|
|
56
|
-
appendTo(value: any):
|
|
56
|
+
appendTo(value: any): PicoDom;
|
|
57
57
|
/**
|
|
58
58
|
* Replace element with value
|
|
59
59
|
*
|
|
60
60
|
* @example Dom.find("div").replace("<span></span>")
|
|
61
61
|
*
|
|
62
62
|
* @param {any} value Replacement value
|
|
63
|
-
* @returns {
|
|
63
|
+
* @returns {PicoDom} Current instance
|
|
64
64
|
*/
|
|
65
|
-
replace(value: any):
|
|
65
|
+
replace(value: any): PicoDom;
|
|
66
66
|
}
|
|
67
|
-
export function PicoDomBuilderPlugin(self:
|
|
67
|
+
export function PicoDomBuilderPlugin(self: typeof PicoDom): typeof PicoDom;
|
|
68
|
+
import { PicoDom } from "../utils/Dom.js";
|
package/types/dom/DomEvent.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ export class PicoDomEventInstance {
|
|
|
20
20
|
* @param {string} [selector] Event selector
|
|
21
21
|
* @param {boolean} [pause] Pause listener
|
|
22
22
|
* @param {any} [options] Listener options
|
|
23
|
-
* @returns {
|
|
23
|
+
* @returns {PicoDom} Current instance
|
|
24
24
|
*/
|
|
25
|
-
bind(el: Element, event: string, cb: Function, selector?: string, pause?: boolean, options?: any):
|
|
25
|
+
bind(el: Element, event: string, cb: Function, selector?: string, pause?: boolean, options?: any): PicoDom;
|
|
26
26
|
/**
|
|
27
27
|
* Unbind event listener
|
|
28
28
|
*
|
|
@@ -32,9 +32,9 @@ export class PicoDomEventInstance {
|
|
|
32
32
|
* @param {string} event Event name
|
|
33
33
|
* @param {string} [selector] Event selector
|
|
34
34
|
* @param {any} [options] Listener options
|
|
35
|
-
* @returns {
|
|
35
|
+
* @returns {PicoDom} Current instance
|
|
36
36
|
*/
|
|
37
|
-
unbind(el: Element, event: string, selector?: string, options?: any):
|
|
37
|
+
unbind(el: Element, event: string, selector?: string, options?: any): PicoDom;
|
|
38
38
|
/**
|
|
39
39
|
* Listen to event
|
|
40
40
|
*
|
|
@@ -45,9 +45,9 @@ export class PicoDomEventInstance {
|
|
|
45
45
|
* @param {any} [options] Listener options
|
|
46
46
|
* @param {boolean} [pause] Pause listener
|
|
47
47
|
* @param {string} [selector] Event selector
|
|
48
|
-
* @returns {
|
|
48
|
+
* @returns {PicoDom} Current instance
|
|
49
49
|
*/
|
|
50
|
-
on(event: any, cb: Function, options?: any, pause?: boolean, selector?: string):
|
|
50
|
+
on(event: any, cb: Function, options?: any, pause?: boolean, selector?: string): PicoDom;
|
|
51
51
|
/**
|
|
52
52
|
* Stop listening to event
|
|
53
53
|
*
|
|
@@ -56,9 +56,9 @@ export class PicoDomEventInstance {
|
|
|
56
56
|
* @param {any} event Event name
|
|
57
57
|
* @param {string} [selector] Event selector
|
|
58
58
|
* @param {any} [options] Listener options
|
|
59
|
-
* @returns {
|
|
59
|
+
* @returns {PicoDom} Current instance
|
|
60
60
|
*/
|
|
61
|
-
off(event: any, selector?: string, options?: any):
|
|
61
|
+
off(event: any, selector?: string, options?: any): PicoDom;
|
|
62
62
|
/**
|
|
63
63
|
* Listen to event once
|
|
64
64
|
*
|
|
@@ -67,9 +67,9 @@ export class PicoDomEventInstance {
|
|
|
67
67
|
* @param {any} event Event name
|
|
68
68
|
* @param {function} cb Callback fn
|
|
69
69
|
* @param {any} [options] Listener options
|
|
70
|
-
* @returns {
|
|
70
|
+
* @returns {PicoDom} Current instance
|
|
71
71
|
*/
|
|
72
|
-
once(event: any, cb: Function, options?: any):
|
|
72
|
+
once(event: any, cb: Function, options?: any): PicoDom;
|
|
73
73
|
/**
|
|
74
74
|
* Listen to live event
|
|
75
75
|
*
|
|
@@ -80,24 +80,25 @@ export class PicoDomEventInstance {
|
|
|
80
80
|
* @param {function} cb Callback fn
|
|
81
81
|
* @param {any} [options] Listener options
|
|
82
82
|
* @param {boolean} [pause] Pause listener
|
|
83
|
-
* @returns {
|
|
83
|
+
* @returns {PicoDom} Current instance
|
|
84
84
|
*/
|
|
85
|
-
live(event: any, selector: string, cb: Function, options?: any, pause?: boolean):
|
|
85
|
+
live(event: any, selector: string, cb: Function, options?: any, pause?: boolean): PicoDom;
|
|
86
86
|
/**
|
|
87
87
|
* Fire event on element
|
|
88
88
|
*
|
|
89
89
|
* @example Dom.find("div").fire("click")
|
|
90
90
|
*
|
|
91
91
|
* @param {string} event Event name
|
|
92
|
-
* @returns {
|
|
92
|
+
* @returns {PicoDom} Current instance
|
|
93
93
|
*/
|
|
94
|
-
fire(event: string):
|
|
94
|
+
fire(event: string): PicoDom;
|
|
95
95
|
/**
|
|
96
96
|
* @see PicoDom.once
|
|
97
97
|
*/
|
|
98
|
-
one(...args: any[]):
|
|
98
|
+
one(...args: any[]): PicoDom;
|
|
99
99
|
delayed(): void;
|
|
100
100
|
pause(): void;
|
|
101
101
|
unpause(): void;
|
|
102
102
|
}
|
|
103
|
-
export function PicoDomEventPlugin(self:
|
|
103
|
+
export function PicoDomEventPlugin(self: typeof PicoDom): typeof PicoDom;
|
|
104
|
+
import { PicoDom } from "../utils/Dom.js";
|
package/types/dom/DomFinder.d.ts
CHANGED
|
@@ -99,9 +99,9 @@ export class PicoDomFinderInstance {
|
|
|
99
99
|
* @example Dom.find("div").sanatize(1)
|
|
100
100
|
*
|
|
101
101
|
* @param {number} [filter] Node type
|
|
102
|
-
* @returns {
|
|
102
|
+
* @returns {PicoDom} Current instance
|
|
103
103
|
*/
|
|
104
|
-
sanatize(filter?: number):
|
|
104
|
+
sanatize(filter?: number): PicoDom;
|
|
105
105
|
els: any;
|
|
106
106
|
/**
|
|
107
107
|
* Filter elements by selector
|
|
@@ -163,9 +163,9 @@ export class PicoDomFinderInstance {
|
|
|
163
163
|
* @example Dom.find("div").each((el) => console.log(el))
|
|
164
164
|
*
|
|
165
165
|
* @param {function} cb Callback fn
|
|
166
|
-
* @returns {
|
|
166
|
+
* @returns {PicoDom} Current instance
|
|
167
167
|
*/
|
|
168
|
-
each(cb: Function):
|
|
168
|
+
each(cb: Function): PicoDom;
|
|
169
169
|
/**
|
|
170
170
|
* Loop through parent nodes
|
|
171
171
|
*
|
|
@@ -173,9 +173,9 @@ export class PicoDomFinderInstance {
|
|
|
173
173
|
*
|
|
174
174
|
* @param {function} cb Callback fn
|
|
175
175
|
* @param {any} [boundry] Loop limit
|
|
176
|
-
* @returns {
|
|
176
|
+
* @returns {PicoDom} Current instance
|
|
177
177
|
*/
|
|
178
|
-
loopParent(cb: Function, boundry?: any):
|
|
178
|
+
loopParent(cb: Function, boundry?: any): PicoDom;
|
|
179
179
|
/**
|
|
180
180
|
* Get parent instance
|
|
181
181
|
*
|
|
@@ -318,4 +318,5 @@ export class PicoDomFinderInstance {
|
|
|
318
318
|
not(...args: any[]): Element[];
|
|
319
319
|
getNot(): void;
|
|
320
320
|
}
|
|
321
|
-
export function PicoDomFinderPlugin(self:
|
|
321
|
+
export function PicoDomFinderPlugin(self: typeof PicoDom): typeof PicoDom;
|
|
322
|
+
import { PicoDom } from "../utils/Dom.js";
|
package/types/dom/DomForm.d.ts
CHANGED
|
@@ -14,8 +14,9 @@ export class PicoDomFormInstance {
|
|
|
14
14
|
* @example Dom.find("input").value("hello")
|
|
15
15
|
*
|
|
16
16
|
* @param {any} [value] Input value
|
|
17
|
-
* @returns {any|
|
|
17
|
+
* @returns {any|PicoDom} Value or instance
|
|
18
18
|
*/
|
|
19
|
-
value(value?: any): any |
|
|
19
|
+
value(value?: any): any | PicoDom;
|
|
20
20
|
}
|
|
21
|
-
export function PicoDomFormPlugin(self:
|
|
21
|
+
export function PicoDomFormPlugin(self: typeof PicoDom): typeof PicoDom;
|
|
22
|
+
import { PicoDom } from "../utils/Dom.js";
|
package/types/dom/DomGlobal.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ export class PicoDomGlobalStatic {
|
|
|
34
34
|
* @param {function} cb Callback fn
|
|
35
35
|
* @param {number} [delay] Execution delay
|
|
36
36
|
* @param {number} [limit] Wait limit
|
|
37
|
-
* @returns {
|
|
37
|
+
* @returns {PicoDom} Static class
|
|
38
38
|
*/
|
|
39
|
-
static ready(cb: Function, delay?: number, limit?: number):
|
|
39
|
+
static ready(cb: Function, delay?: number, limit?: number): PicoDom;
|
|
40
40
|
/**
|
|
41
41
|
* Run callback when complete
|
|
42
42
|
*
|
|
@@ -45,9 +45,9 @@ export class PicoDomGlobalStatic {
|
|
|
45
45
|
* @param {function} cb Callback fn
|
|
46
46
|
* @param {number} [delay] Execution delay
|
|
47
47
|
* @param {number} [limit] Wait limit
|
|
48
|
-
* @returns {
|
|
48
|
+
* @returns {PicoDom} Static class
|
|
49
49
|
*/
|
|
50
|
-
static complete(cb: Function, delay?: number, limit?: number):
|
|
50
|
+
static complete(cb: Function, delay?: number, limit?: number): PicoDom;
|
|
51
51
|
}
|
|
52
52
|
export namespace PicoDomGlobalStatic {
|
|
53
53
|
function required(): void;
|
|
@@ -72,8 +72,9 @@ export class PicoDomGlobalInstance {
|
|
|
72
72
|
*
|
|
73
73
|
* @param {function} cb Callback fn
|
|
74
74
|
* @param {number} [limit] Wait limit
|
|
75
|
-
* @returns {
|
|
75
|
+
* @returns {PicoDom} Current instance
|
|
76
76
|
*/
|
|
77
|
-
loaded(cb: Function, limit?: number):
|
|
77
|
+
loaded(cb: Function, limit?: number): PicoDom;
|
|
78
78
|
}
|
|
79
|
-
export function PicoDomGlobalPlugin(self:
|
|
79
|
+
export function PicoDomGlobalPlugin(self: typeof PicoDom): typeof PicoDom;
|
|
80
|
+
import { PicoDom } from "../utils/Dom.js";
|
package/types/dom/DomInview.d.ts
CHANGED
|
@@ -111,4 +111,5 @@ export class PicoDomInviewInstance {
|
|
|
111
111
|
*/
|
|
112
112
|
inviewWidth(...args: any[]): number;
|
|
113
113
|
}
|
|
114
|
-
export function PicoDomInviewPlugin(self:
|
|
114
|
+
export function PicoDomInviewPlugin(self: typeof PicoDom): typeof PicoDom;
|
|
115
|
+
import { PicoDom } from "../utils/Dom.js";
|
package/types/dom/DomMeta.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ export class PicoDomMetaStatic {
|
|
|
10
10
|
*
|
|
11
11
|
* @param {string} value New title
|
|
12
12
|
* @param {string} [glue] Title glue
|
|
13
|
-
* @returns {
|
|
13
|
+
* @returns {PicoDom} Static class
|
|
14
14
|
*/
|
|
15
|
-
static setMetaTitle(value: string, glue?: string):
|
|
15
|
+
static setMetaTitle(value: string, glue?: string): PicoDom;
|
|
16
16
|
}
|
|
17
17
|
export namespace PicoDomMetaStatic {
|
|
18
18
|
/**
|
|
@@ -26,4 +26,5 @@ export namespace PicoDomMetaStatic {
|
|
|
26
26
|
*/
|
|
27
27
|
export class PicoDomMetaInstance {
|
|
28
28
|
}
|
|
29
|
-
export function PicoDomMetaPlugin(self:
|
|
29
|
+
export function PicoDomMetaPlugin(self: typeof PicoDom): typeof PicoDom;
|
|
30
|
+
import { PicoDom } from "../utils/Dom.js";
|
|
@@ -14,8 +14,9 @@ export class PicoDomObserverInstance {
|
|
|
14
14
|
* @example Dom.find("input").value("hello")
|
|
15
15
|
*
|
|
16
16
|
* @param {any} [value] New value
|
|
17
|
-
* @returns {any|
|
|
17
|
+
* @returns {any|PicoDom} Value or instance
|
|
18
18
|
*/
|
|
19
|
-
value(value?: any): any |
|
|
19
|
+
value(value?: any): any | PicoDom;
|
|
20
20
|
}
|
|
21
|
-
export function PicoDomObserverPlugin(self:
|
|
21
|
+
export function PicoDomObserverPlugin(self: typeof PicoDom): typeof PicoDom;
|
|
22
|
+
import { PicoDom } from "../utils/Dom.js";
|
|
@@ -192,9 +192,9 @@ export class PicoDomRectangleInstance {
|
|
|
192
192
|
*
|
|
193
193
|
* @param {function} cb Callback fn
|
|
194
194
|
* @param {any} [boundry] Loop limit
|
|
195
|
-
* @returns {
|
|
195
|
+
* @returns {PicoDom} Current instance
|
|
196
196
|
*/
|
|
197
|
-
loopOffset(cb: Function, boundry?: any):
|
|
197
|
+
loopOffset(cb: Function, boundry?: any): PicoDom;
|
|
198
198
|
/**
|
|
199
199
|
* Calculate relative offset
|
|
200
200
|
*
|
|
@@ -232,9 +232,9 @@ export class PicoDomRectangleInstance {
|
|
|
232
232
|
*
|
|
233
233
|
* @param {any} [value] Scroll value
|
|
234
234
|
* @param {any} [boundry] View boundry
|
|
235
|
-
* @returns {number|
|
|
235
|
+
* @returns {number|PicoDom} Value or instance
|
|
236
236
|
*/
|
|
237
|
-
scrollTop(value?: any, boundry?: any): number |
|
|
237
|
+
scrollTop(value?: any, boundry?: any): number | PicoDom;
|
|
238
238
|
/**
|
|
239
239
|
* Get or set scroll left
|
|
240
240
|
*
|
|
@@ -242,9 +242,9 @@ export class PicoDomRectangleInstance {
|
|
|
242
242
|
*
|
|
243
243
|
* @param {any} [value] Scroll value
|
|
244
244
|
* @param {any} [boundry] View boundry
|
|
245
|
-
* @returns {number|
|
|
245
|
+
* @returns {number|PicoDom} Value or instance
|
|
246
246
|
*/
|
|
247
|
-
scrollLeft(value?: any, boundry?: any): number |
|
|
247
|
+
scrollLeft(value?: any, boundry?: any): number | PicoDom;
|
|
248
248
|
/**
|
|
249
249
|
* Get relative scroll
|
|
250
250
|
*
|
|
@@ -257,7 +257,7 @@ export class PicoDomRectangleInstance {
|
|
|
257
257
|
/**
|
|
258
258
|
* @see PicoDom.loopOffsetParent
|
|
259
259
|
*/
|
|
260
|
-
loopOffsetParent(...args: any[]):
|
|
260
|
+
loopOffsetParent(...args: any[]): PicoDom;
|
|
261
261
|
/**
|
|
262
262
|
* @see PicoDom.scrollTopGlobal
|
|
263
263
|
*/
|
|
@@ -267,4 +267,5 @@ export class PicoDomRectangleInstance {
|
|
|
267
267
|
*/
|
|
268
268
|
scrollLeftGlobal(): any;
|
|
269
269
|
}
|
|
270
|
-
export function PicoDomRectanglePlugin(self:
|
|
270
|
+
export function PicoDomRectanglePlugin(self: typeof PicoDom): typeof PicoDom;
|
|
271
|
+
import { PicoDom } from "../utils/Dom.js";
|
|
@@ -15,4 +15,5 @@ export class PicoFormatFileStatic {
|
|
|
15
15
|
*/
|
|
16
16
|
static filesize(value: any, decimals?: number): string;
|
|
17
17
|
}
|
|
18
|
-
export function PicoFormatFilePlugin(self:
|
|
18
|
+
export function PicoFormatFilePlugin(self: typeof PicoFormat): typeof PicoFormat;
|
|
19
|
+
import { PicoFormat } from "../utils/Format.js";
|
|
@@ -37,4 +37,5 @@ export class PicoFormatOptionStatic {
|
|
|
37
37
|
*/
|
|
38
38
|
static parseOptions(value: string): any;
|
|
39
39
|
}
|
|
40
|
-
export function PicoFormatOptionPlugin(self:
|
|
40
|
+
export function PicoFormatOptionPlugin(self: typeof PicoFormat): typeof PicoFormat;
|
|
41
|
+
import { PicoFormat } from "../utils/Format.js";
|
|
@@ -36,4 +36,5 @@ export class PicoFormatParamStatic {
|
|
|
36
36
|
*/
|
|
37
37
|
static parseParams(value: string): any;
|
|
38
38
|
}
|
|
39
|
-
export function PicoFormatParamPlugin(self:
|
|
39
|
+
export function PicoFormatParamPlugin(self: typeof PicoFormat): typeof PicoFormat;
|
|
40
|
+
import { PicoFormat } from "../utils/Format.js";
|
|
@@ -43,4 +43,5 @@ export class PicoFormatParserStatic {
|
|
|
43
43
|
*/
|
|
44
44
|
static casted(value: any, encode?: boolean, casters?: Array<any>): string;
|
|
45
45
|
}
|
|
46
|
-
export function PicoFormatParserPlugin(self:
|
|
46
|
+
export function PicoFormatParserPlugin(self: typeof PicoFormat): typeof PicoFormat;
|
|
47
|
+
import { PicoFormat } from "../utils/Format.js";
|
|
@@ -14,4 +14,5 @@ export class PicoFormatUrlStatic {
|
|
|
14
14
|
*/
|
|
15
15
|
static slugify(value: any): string;
|
|
16
16
|
}
|
|
17
|
-
export function PicoFormatUrlPlugin(self:
|
|
17
|
+
export function PicoFormatUrlPlugin(self: typeof PicoFormat): typeof PicoFormat;
|
|
18
|
+
import { PicoFormat } from "../utils/Format.js";
|
package/types/index.esm.d.ts
CHANGED
|
@@ -1,52 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const Dom: typeof
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @type {typeof PicoDom}
|
|
3
|
+
*/
|
|
4
|
+
export const Dom: typeof PicoDom;
|
|
5
|
+
/**
|
|
6
|
+
* @type {typeof PicoNow}
|
|
7
|
+
*/
|
|
8
|
+
export const Now: typeof PicoNow;
|
|
9
|
+
/**
|
|
10
|
+
* @type {typeof PicoFormat}
|
|
11
|
+
*/
|
|
12
|
+
export const For: typeof PicoFormat;
|
|
13
|
+
/**
|
|
14
|
+
* @type {typeof PicoRunner}
|
|
15
|
+
*/
|
|
7
16
|
export const Run: typeof PicoRunner;
|
|
17
|
+
/**
|
|
18
|
+
* @type {typeof PicoString}
|
|
19
|
+
*/
|
|
8
20
|
export const Str: typeof PicoString;
|
|
21
|
+
/**
|
|
22
|
+
* @type {typeof PicoNumber}
|
|
23
|
+
*/
|
|
9
24
|
export const Num: typeof PicoNumber;
|
|
25
|
+
/**
|
|
26
|
+
* @type {typeof PicoArray}
|
|
27
|
+
*/
|
|
10
28
|
export const Arr: typeof PicoArray;
|
|
29
|
+
/**
|
|
30
|
+
* @type {typeof PicoObject}
|
|
31
|
+
*/
|
|
11
32
|
export const Obj: typeof PicoObject;
|
|
33
|
+
/**
|
|
34
|
+
* @type {typeof PicoMixed}
|
|
35
|
+
*/
|
|
12
36
|
export const Mix: typeof PicoMixed;
|
|
37
|
+
/**
|
|
38
|
+
* @type {typeof PicoHash}
|
|
39
|
+
*/
|
|
13
40
|
export const Hash: typeof PicoHash;
|
|
41
|
+
/**
|
|
42
|
+
* @type {typeof PicoEvent}
|
|
43
|
+
*/
|
|
14
44
|
export const Event: typeof PicoEvent;
|
|
45
|
+
/**
|
|
46
|
+
* @type {typeof PicoLocale}
|
|
47
|
+
*/
|
|
15
48
|
export const Locale: typeof PicoLocale;
|
|
49
|
+
/**
|
|
50
|
+
* @type {typeof PicoCookie}
|
|
51
|
+
*/
|
|
16
52
|
export const Cookie: typeof PicoCookie;
|
|
17
|
-
|
|
53
|
+
/**
|
|
54
|
+
* @type {typeof PicoMixed}
|
|
55
|
+
*/
|
|
56
|
+
export const Any: typeof PicoMixed;
|
|
18
57
|
export function UUID(): string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
|
|
40
|
-
import { browser as PicoToolBrowser } from "#src/tool/scope.js";
|
|
41
|
-
import { device as PicoToolDevice } from "#src/tool/scope.js";
|
|
42
|
-
import { default as PicoRunner } from "#src/utils/Runner.js";
|
|
43
|
-
import { default as PicoString } from "#src/utils/String.js";
|
|
44
|
-
import { default as PicoNumber } from "#src/utils/Number.js";
|
|
45
|
-
import { default as PicoArray } from "#src/utils/Array.js";
|
|
46
|
-
import { default as PicoObject } from "#src/utils/Object.js";
|
|
47
|
-
import { default as PicoMixed } from "#src/utils/Mixed.js";
|
|
48
|
-
import { default as PicoHash } from "#src/utils/Hash.js";
|
|
49
|
-
import { default as PicoEvent } from "#src/utils/Event.js";
|
|
50
|
-
import { default as PicoLocale } from "#src/utils/Locale.js";
|
|
51
|
-
import { default as PicoCookie } from "#src/utils/Cookie.js";
|
|
52
|
-
export { Map, Data, Route, Element };
|
|
58
|
+
import { go } from "./tool/scope.js";
|
|
59
|
+
import { browser } from "./tool/scope.js";
|
|
60
|
+
import { device } from "./tool/scope.js";
|
|
61
|
+
import { default as Map } from "./wip/Map.js";
|
|
62
|
+
import { default as Data } from "./utils/Data.js";
|
|
63
|
+
import { default as Route } from "./utils/Route.js";
|
|
64
|
+
import { default as Element } from "./wip/Element.js";
|
|
65
|
+
import { PicoDom } from "./utils/Dom.js";
|
|
66
|
+
import { PicoNow } from "./utils/Now.js";
|
|
67
|
+
import { PicoFormat } from "./utils/Format.js";
|
|
68
|
+
import { default as PicoRunner } from "./utils/Runner.js";
|
|
69
|
+
import { default as PicoString } from "./utils/String.js";
|
|
70
|
+
import { default as PicoNumber } from "./utils/Number.js";
|
|
71
|
+
import { default as PicoArray } from "./utils/Array.js";
|
|
72
|
+
import { default as PicoObject } from "./utils/Object.js";
|
|
73
|
+
import { default as PicoMixed } from "./utils/Mixed.js";
|
|
74
|
+
import { default as PicoHash } from "./utils/Hash.js";
|
|
75
|
+
import { default as PicoEvent } from "./utils/Event.js";
|
|
76
|
+
import { default as PicoLocale } from "./utils/Locale.js";
|
|
77
|
+
import { default as PicoCookie } from "./utils/Cookie.js";
|
|
78
|
+
export { go, browser, device, Map, Data, Route, Element };
|
|
@@ -180,4 +180,5 @@ export class PicoNowDefaultInstance {
|
|
|
180
180
|
*/
|
|
181
181
|
applyTime(value: any, format?: string): PicoNow;
|
|
182
182
|
}
|
|
183
|
-
export function PicoNowDefaultPlugin(self:
|
|
183
|
+
export function PicoNowDefaultPlugin(self: typeof PicoNow): typeof PicoNow;
|
|
184
|
+
import { PicoNow } from "../utils/Now.js";
|
package/types/now/NowFormat.d.ts
CHANGED
|
@@ -67,4 +67,5 @@ export class PicoNowFormatInstance {
|
|
|
67
67
|
*/
|
|
68
68
|
code(format?: string): number;
|
|
69
69
|
}
|
|
70
|
-
export function PicoNowFormatPlugin(self:
|
|
70
|
+
export function PicoNowFormatPlugin(self: typeof PicoNow): typeof PicoNow;
|
|
71
|
+
import { PicoNow } from "../utils/Now.js";
|
package/types/now/NowGrid.d.ts
CHANGED
|
@@ -104,4 +104,5 @@ export class PicoNowGridInstance {
|
|
|
104
104
|
*/
|
|
105
105
|
getSeconds(): PicoNow[];
|
|
106
106
|
}
|
|
107
|
-
export function PicoNowGridPlugin(self:
|
|
107
|
+
export function PicoNowGridPlugin(self: typeof PicoNow): typeof PicoNow;
|
|
108
|
+
import { PicoNow } from "../utils/Now.js";
|
package/types/now/NowHuman.d.ts
CHANGED
|
@@ -34,4 +34,5 @@ export class PicoNowHumanInstance {
|
|
|
34
34
|
*/
|
|
35
35
|
getHumanMonth(substr?: number): string;
|
|
36
36
|
}
|
|
37
|
-
export function PicoNowHumanPlugin(self:
|
|
37
|
+
export function PicoNowHumanPlugin(self: typeof PicoNow): typeof PicoNow;
|
|
38
|
+
import { PicoNow } from "../utils/Now.js";
|
package/types/now/NowMatch.d.ts
CHANGED
|
@@ -105,4 +105,5 @@ export class PicoNowMatchInstance {
|
|
|
105
105
|
*/
|
|
106
106
|
between(start?: any, end?: any, format?: string): boolean;
|
|
107
107
|
}
|
|
108
|
-
export function PicoNowMatchPlugin(self:
|
|
108
|
+
export function PicoNowMatchPlugin(self: typeof PicoNow): typeof PicoNow;
|
|
109
|
+
import { PicoNow } from "../utils/Now.js";
|