@kizmann/pico-js 1.0.13 → 2.0.0

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 (125) hide show
  1. package/README.md +27 -7
  2. package/dist/pico-js.browser.js +2 -0
  3. package/dist/pico-js.browser.js.map +1 -0
  4. package/dist/pico-js.esm.js +2 -0
  5. package/dist/pico-js.esm.js.map +1 -0
  6. package/package.json +20 -7
  7. package/src/dom/DomAttribute.js +374 -0
  8. package/src/dom/DomBuilder.js +152 -0
  9. package/src/dom/DomEvent.js +253 -0
  10. package/src/dom/DomFinder.js +669 -0
  11. package/src/dom/DomForm.js +57 -0
  12. package/src/dom/DomGlobal.js +193 -0
  13. package/src/dom/DomInview.js +332 -0
  14. package/src/dom/DomMeta.js +66 -0
  15. package/src/dom/DomObserver.js +57 -0
  16. package/src/dom/DomRectangle.js +657 -0
  17. package/src/format/FormatFile.js +54 -0
  18. package/src/format/FormatOption.js +108 -0
  19. package/src/format/FormatParam.js +107 -0
  20. package/src/format/FormatParser.js +156 -0
  21. package/src/format/FormatUrl.js +75 -0
  22. package/src/index.browser.js +10 -0
  23. package/src/index.esm.js +138 -0
  24. package/src/now/NowDefault.js +533 -0
  25. package/src/now/NowFormat.js +196 -0
  26. package/src/now/NowGrid.js +251 -0
  27. package/src/now/NowHuman.js +118 -0
  28. package/src/now/NowMatch.js +175 -0
  29. package/src/now/NowRange.js +70 -0
  30. package/src/now/NowWalker.js +544 -0
  31. package/src/tool/scope.js +103 -0
  32. package/src/utils/Array.js +986 -0
  33. package/src/utils/Cookie.js +184 -0
  34. package/src/utils/Data.js +200 -0
  35. package/src/utils/Dom.js +208 -0
  36. package/src/utils/Event.js +140 -0
  37. package/src/utils/Format.js +62 -0
  38. package/src/utils/Hash.js +164 -0
  39. package/src/utils/Locale.js +229 -0
  40. package/src/utils/Mixed.js +887 -0
  41. package/src/utils/Now.js +234 -0
  42. package/src/utils/Number.js +238 -0
  43. package/src/utils/Object.js +655 -0
  44. package/src/utils/Route.js +67 -0
  45. package/src/utils/Runner.js +327 -0
  46. package/src/utils/String.js +618 -0
  47. package/src/{library/element.js → wip/Element.js} +90 -16
  48. package/src/{library/map.js → wip/Map.js} +256 -40
  49. package/types/dom/DomAttribute.d.ts +137 -0
  50. package/types/dom/DomBuilder.d.ts +67 -0
  51. package/types/dom/DomEvent.d.ts +103 -0
  52. package/types/dom/DomFinder.d.ts +321 -0
  53. package/types/dom/DomForm.d.ts +21 -0
  54. package/types/dom/DomGlobal.d.ts +79 -0
  55. package/types/dom/DomInview.d.ts +114 -0
  56. package/types/dom/DomMeta.d.ts +29 -0
  57. package/types/dom/DomObserver.d.ts +21 -0
  58. package/types/dom/DomRectangle.d.ts +270 -0
  59. package/types/format/FormatFile.d.ts +18 -0
  60. package/types/format/FormatOption.d.ts +40 -0
  61. package/types/format/FormatParam.d.ts +39 -0
  62. package/types/format/FormatParser.d.ts +46 -0
  63. package/types/format/FormatUrl.d.ts +17 -0
  64. package/types/index.browser.d.ts +1 -0
  65. package/types/index.esm.d.ts +52 -0
  66. package/types/now/NowDefault.d.ts +183 -0
  67. package/types/now/NowFormat.d.ts +70 -0
  68. package/types/now/NowGrid.d.ts +107 -0
  69. package/types/now/NowHuman.d.ts +37 -0
  70. package/types/now/NowMatch.d.ts +108 -0
  71. package/types/now/NowRange.d.ts +21 -0
  72. package/types/now/NowWalker.d.ts +301 -0
  73. package/types/tool/scope.d.ts +24 -0
  74. package/types/utils/Array.d.ts +480 -0
  75. package/types/utils/Cookie.d.ts +60 -0
  76. package/types/utils/Data.d.ts +91 -0
  77. package/types/utils/Dom.d.ts +138 -0
  78. package/types/utils/Event.d.ts +58 -0
  79. package/types/utils/Format.d.ts +37 -0
  80. package/types/utils/Hash.d.ts +81 -0
  81. package/types/utils/Locale.d.ts +115 -0
  82. package/types/utils/Mixed.d.ts +469 -0
  83. package/types/utils/Now.d.ts +125 -0
  84. package/types/utils/Number.d.ts +127 -0
  85. package/types/utils/Object.d.ts +255 -0
  86. package/types/utils/Route.d.ts +37 -0
  87. package/types/utils/Runner.d.ts +139 -0
  88. package/types/utils/String.d.ts +330 -0
  89. package/types/wip/Element.d.ts +119 -0
  90. package/types/wip/Map.d.ts +254 -0
  91. package/dist/.ignore.js +0 -0
  92. package/dist/pico-js.js +0 -2
  93. package/dist/pico-js.js.map +0 -1
  94. package/src/element/default.js +0 -46
  95. package/src/element/example.js +0 -58
  96. package/src/index.js +0 -90
  97. package/src/library/cookie.js +0 -123
  98. package/src/library/data.js +0 -111
  99. package/src/library/event.js +0 -91
  100. package/src/library/locale.js +0 -84
  101. package/src/library/queue.js +0 -64
  102. package/src/library/route.js +0 -28
  103. package/src/utility/any.js +0 -369
  104. package/src/utility/array.js +0 -410
  105. package/src/utility/dom.js +0 -1425
  106. package/src/utility/now.js +0 -544
  107. package/src/utility/number.js +0 -128
  108. package/src/utility/object.js +0 -429
  109. package/src/utility/string.js +0 -328
  110. package/types/index.d.ts +0 -77
  111. package/types/library/cookie.d.ts +0 -10
  112. package/types/library/data.d.ts +0 -15
  113. package/types/library/element.d.ts +0 -22
  114. package/types/library/event.d.ts +0 -13
  115. package/types/library/locale.d.ts +0 -14
  116. package/types/library/map.d.ts +0 -43
  117. package/types/library/queue.d.ts +0 -18
  118. package/types/library/route.d.ts +0 -11
  119. package/types/utility/any.d.ts +0 -35
  120. package/types/utility/array.d.ts +0 -46
  121. package/types/utility/dom.d.ts +0 -101
  122. package/types/utility/now.d.ts +0 -79
  123. package/types/utility/number.d.ts +0 -17
  124. package/types/utility/object.d.ts +0 -29
  125. package/types/utility/string.d.ts +0 -26
@@ -0,0 +1,137 @@
1
+ /**
2
+ * @memberof PicoDom
3
+ */
4
+ export class PicoDomAttributeStatic {
5
+ }
6
+ /**
7
+ * @memberof PicoDom
8
+ * @extends {PicoDom}
9
+ */
10
+ export class PicoDomAttributeInstance {
11
+ /**
12
+ * Get or set attribute
13
+ *
14
+ * @example Dom.find("div").attr("id")
15
+ *
16
+ * @param {string} key Attr key
17
+ * @param {any} [value] Attr value
18
+ * @param {any} [fallback] Fallback value
19
+ * @returns {any|this} Attr value or instance
20
+ */
21
+ attr(key: string, value?: any, fallback?: any): any | this;
22
+ /**
23
+ * Get or set data attribute
24
+ *
25
+ * @example Dom.find("div").data("id")
26
+ *
27
+ * @param {string} key Data key
28
+ * @param {any} [value] Data value
29
+ * @param {any} [fallback] Fallback value
30
+ * @returns {any|this} Data value or instance
31
+ */
32
+ data(key: string, value?: any, fallback?: any): any | this;
33
+ /**
34
+ * Get computed style
35
+ *
36
+ * @example Dom.find("div").computed("width")
37
+ *
38
+ * @param {any} [key] Style key
39
+ * @param {any} [fallback] Fallback value
40
+ * @returns {any} Computed style
41
+ */
42
+ computed(key?: any, fallback?: any): any;
43
+ /**
44
+ * Get or set style
45
+ *
46
+ * @example Dom.find("div").style({ color: "red" })
47
+ *
48
+ * @param {any} [value] Style value
49
+ * @param {boolean} [combine] Combine style
50
+ * @returns {any|this} Style or instance
51
+ */
52
+ style(value?: any, combine?: boolean): any | this;
53
+ /**
54
+ * Get or set classes
55
+ *
56
+ * @example Dom.find("div").class(["active"])
57
+ *
58
+ * @param {any} [value] Class value
59
+ * @param {boolean} [combine] Combine classes
60
+ * @returns {any|this} Classes or instance
61
+ */
62
+ class(value?: any, combine?: boolean): any | this;
63
+ /**
64
+ * Get or set inner HTML
65
+ *
66
+ * @example Dom.find("div").html("<span></span>")
67
+ *
68
+ * @param {any} [html] HTML content
69
+ * @returns {string|this} HTML or instance
70
+ */
71
+ html(html?: any): string | this;
72
+ /**
73
+ * Get actual style value
74
+ *
75
+ * @example Dom.find("div").actual((el) => el.offsetWidth, { display: "block" })
76
+ *
77
+ * @param {function} cb Callback fn
78
+ * @param {any} [style] Temp style
79
+ * @returns {any} Callback result
80
+ */
81
+ actual(cb: Function, style?: any): any;
82
+ /**
83
+ * Check if has class
84
+ *
85
+ * @example Dom.find("div").hasClass("active") // => true
86
+ *
87
+ * @param {any} cls Class name
88
+ * @returns {boolean} True if has class
89
+ */
90
+ hasClass(cls: any): boolean;
91
+ /**
92
+ * Add class to element
93
+ *
94
+ * @example Dom.find("div").addClass("active")
95
+ *
96
+ * @param {any} cls Class name
97
+ * @returns {this} Current instance
98
+ */
99
+ addClass(cls: any): this;
100
+ /**
101
+ * Remove class from element
102
+ *
103
+ * @example Dom.find("div").remClass("active")
104
+ *
105
+ * @param {any} cls Class name
106
+ * @returns {this} Current instance
107
+ */
108
+ remClass(cls: any): this;
109
+ /**
110
+ * Toggle class on element
111
+ *
112
+ * @example Dom.find("div").toggleClass("active")
113
+ *
114
+ * @param {any} cls Class name
115
+ * @returns {this} Current instance
116
+ */
117
+ toggleClass(cls: any): this;
118
+ /**
119
+ * Set class by state
120
+ *
121
+ * @example Dom.find("div").stateClass("active", true)
122
+ *
123
+ * @param {any} cls Class name
124
+ * @param {boolean} [state] Target state
125
+ * @returns {this} Current instance
126
+ */
127
+ stateClass(cls: any, state?: boolean): this;
128
+ /**
129
+ * @see PicoDom.style
130
+ */
131
+ css(...args: any[]): any;
132
+ /**
133
+ * @see PicoDom.remClass
134
+ */
135
+ removeClass(...args: any[]): PicoDomAttributeInstance;
136
+ }
137
+ export function PicoDomAttributePlugin(self: any): typeof import("#src/utils/Dom.js").PicoDom;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @memberof PicoDom
3
+ */
4
+ export class PicoDomBuilderStatic {
5
+ /**
6
+ * Create element from tag
7
+ *
8
+ * @example Dom.make("div", { class: "active" })
9
+ *
10
+ * @param {any} el Tag or element
11
+ * @param {any} [options] Attr options
12
+ * @returns {PicoDom} Dom instance
13
+ */
14
+ static make(el: any, options?: any): PicoDom;
15
+ }
16
+ /**
17
+ * @memberof PicoDom
18
+ * @extends {PicoDom}
19
+ */
20
+ export class PicoDomBuilderInstance {
21
+ /**
22
+ * Prepend value to element
23
+ *
24
+ * @example Dom.find("div").prepend("<span></span>")
25
+ *
26
+ * @param {any} value Prepend value
27
+ * @returns {this} Current instance
28
+ */
29
+ prepend(value: any): this;
30
+ /**
31
+ * Prepend element to value
32
+ *
33
+ * @example Dom.find("span").prependTo("div")
34
+ *
35
+ * @param {any} value Target element
36
+ * @returns {this} Current instance
37
+ */
38
+ prependTo(value: any): this;
39
+ /**
40
+ * Append value to element
41
+ *
42
+ * @example Dom.find("div").append("<span></span>")
43
+ *
44
+ * @param {any} value Append value
45
+ * @returns {this} Current instance
46
+ */
47
+ append(value: any): this;
48
+ /**
49
+ * Append element to value
50
+ *
51
+ * @example Dom.find("span").appendTo("div")
52
+ *
53
+ * @param {any} value Target element
54
+ * @returns {this} Current instance
55
+ */
56
+ appendTo(value: any): this;
57
+ /**
58
+ * Replace element with value
59
+ *
60
+ * @example Dom.find("div").replace("<span></span>")
61
+ *
62
+ * @param {any} value Replacement value
63
+ * @returns {this} Current instance
64
+ */
65
+ replace(value: any): this;
66
+ }
67
+ export function PicoDomBuilderPlugin(self: any): typeof import("#src/utils/Dom.js").PicoDom;
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @memberof PicoDom
3
+ */
4
+ export class PicoDomEventStatic {
5
+ static events: any[];
6
+ }
7
+ /**
8
+ * @memberof PicoDom
9
+ * @extends {PicoDom}
10
+ */
11
+ export class PicoDomEventInstance {
12
+ /**
13
+ * Bind event listener
14
+ *
15
+ * @example Dom.bind(el, "click", cb)
16
+ *
17
+ * @param {Element} el Target element
18
+ * @param {string} event Event name
19
+ * @param {function} cb Callback fn
20
+ * @param {string} [selector] Event selector
21
+ * @param {boolean} [pause] Pause listener
22
+ * @param {any} [options] Listener options
23
+ * @returns {this} Current instance
24
+ */
25
+ bind(el: Element, event: string, cb: Function, selector?: string, pause?: boolean, options?: any): this;
26
+ /**
27
+ * Unbind event listener
28
+ *
29
+ * @example Dom.unbind(el, "click")
30
+ *
31
+ * @param {Element} el Target element
32
+ * @param {string} event Event name
33
+ * @param {string} [selector] Event selector
34
+ * @param {any} [options] Listener options
35
+ * @returns {this} Current instance
36
+ */
37
+ unbind(el: Element, event: string, selector?: string, options?: any): this;
38
+ /**
39
+ * Listen to event
40
+ *
41
+ * @example Dom.find("div").on("click", cb)
42
+ *
43
+ * @param {any} event Event name
44
+ * @param {function} cb Callback fn
45
+ * @param {any} [options] Listener options
46
+ * @param {boolean} [pause] Pause listener
47
+ * @param {string} [selector] Event selector
48
+ * @returns {this} Current instance
49
+ */
50
+ on(event: any, cb: Function, options?: any, pause?: boolean, selector?: string): this;
51
+ /**
52
+ * Stop listening to event
53
+ *
54
+ * @example Dom.find("div").off("click")
55
+ *
56
+ * @param {any} event Event name
57
+ * @param {string} [selector] Event selector
58
+ * @param {any} [options] Listener options
59
+ * @returns {this} Current instance
60
+ */
61
+ off(event: any, selector?: string, options?: any): this;
62
+ /**
63
+ * Listen to event once
64
+ *
65
+ * @example Dom.find("div").once("click", cb)
66
+ *
67
+ * @param {any} event Event name
68
+ * @param {function} cb Callback fn
69
+ * @param {any} [options] Listener options
70
+ * @returns {this} Current instance
71
+ */
72
+ once(event: any, cb: Function, options?: any): this;
73
+ /**
74
+ * Listen to live event
75
+ *
76
+ * @example Dom.find("div").live("click", "span", cb)
77
+ *
78
+ * @param {any} event Event name
79
+ * @param {string} selector Event selector
80
+ * @param {function} cb Callback fn
81
+ * @param {any} [options] Listener options
82
+ * @param {boolean} [pause] Pause listener
83
+ * @returns {this} Current instance
84
+ */
85
+ live(event: any, selector: string, cb: Function, options?: any, pause?: boolean): this;
86
+ /**
87
+ * Fire event on element
88
+ *
89
+ * @example Dom.find("div").fire("click")
90
+ *
91
+ * @param {string} event Event name
92
+ * @returns {this} Current instance
93
+ */
94
+ fire(event: string): this;
95
+ /**
96
+ * @see PicoDom.once
97
+ */
98
+ one(...args: any[]): PicoDomEventInstance;
99
+ delayed(): void;
100
+ pause(): void;
101
+ unpause(): void;
102
+ }
103
+ export function PicoDomEventPlugin(self: any): typeof import("#src/utils/Dom.js").PicoDom;
@@ -0,0 +1,321 @@
1
+ /**
2
+ * @memberof PicoDom
3
+ */
4
+ export class PicoDomFinderStatic {
5
+ /**
6
+ * Filter nodes by type
7
+ *
8
+ * @example Dom.filterNodes(nodes, 1)
9
+ *
10
+ * @param {any} nodes Source nodes
11
+ * @param {number} [filter] Node type
12
+ * @returns {Array<Element>} Filtered nodes
13
+ */
14
+ static filterNodes(nodes: any, filter?: number): Array<Element>;
15
+ /**
16
+ * Get nodes at point
17
+ *
18
+ * @example Dom.getNodePoint(100, 100)
19
+ *
20
+ * @param {number} posx X position
21
+ * @param {number} posy Y position
22
+ * @returns {Array<Element>} Nodes at point
23
+ */
24
+ static getNodePoint(posx: number, posy: number): Array<Element>;
25
+ /**
26
+ * Get target by selector
27
+ *
28
+ * @example Dom.getNodeEvent(".item", event)
29
+ *
30
+ * @param {string} selector Node selector
31
+ * @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
48
+ */
49
+ static _constructFinder(el: any): any;
50
+ /**
51
+ * Get node type
52
+ *
53
+ * @example Dom.find("div").getNodeType() // => 1
54
+ *
55
+ * @param {number} [fallback] Fallback value
56
+ * @returns {number} Node type
57
+ */
58
+ getNodeType(fallback?: number): number;
59
+ /**
60
+ * Get parent node
61
+ *
62
+ * @example Dom.find("div").getNodeParent() // => PicoDom
63
+ *
64
+ * @param {any} [fallback] Fallback value
65
+ * @returns {PicoDom} Parent instance
66
+ */
67
+ getNodeParent(fallback?: any): PicoDom;
68
+ /**
69
+ * Get previous node
70
+ *
71
+ * @example Dom.find("div").getNodePrev() // => PicoDom
72
+ *
73
+ * @param {any} [fallback] Fallback value
74
+ * @returns {PicoDom} Prev instance
75
+ */
76
+ getNodePrev(fallback?: any): PicoDom;
77
+ /**
78
+ * Get next node
79
+ *
80
+ * @example Dom.find("div").getNodeNext() // => PicoDom
81
+ *
82
+ * @param {any} [fallback] Fallback value
83
+ * @returns {PicoDom} Next instance
84
+ */
85
+ getNodeNext(fallback?: any): PicoDom;
86
+ /**
87
+ * Get child nodes
88
+ *
89
+ * @example Dom.find("div").getNodeChilds(1)
90
+ *
91
+ * @param {number} [type] Node type
92
+ * @param {any} [fallback] Fallback value
93
+ * @returns {Array<Element>} Child nodes
94
+ */
95
+ getNodeChilds(type?: number, fallback?: any): Array<Element>;
96
+ /**
97
+ * Filter instances nodes
98
+ *
99
+ * @example Dom.find("div").sanatize(1)
100
+ *
101
+ * @param {number} [filter] Node type
102
+ * @returns {this} Current instance
103
+ */
104
+ sanatize(filter?: number): this;
105
+ els: any;
106
+ /**
107
+ * Filter elements by selector
108
+ *
109
+ * @example Dom.find("div").filter(".active")
110
+ *
111
+ * @param {any} selector Filter selector
112
+ * @returns {Array<Element>} Filtered nodes
113
+ */
114
+ filter(selector: any): Array<Element>;
115
+ /**
116
+ * Exclude elements by selector
117
+ *
118
+ * @example Dom.find("div").except(".active")
119
+ *
120
+ * @param {any} selector Exclude selector
121
+ * @returns {Array<Element>} Filtered nodes
122
+ */
123
+ except(selector: any): Array<Element>;
124
+ /**
125
+ * Find elements in instance
126
+ *
127
+ * @example Dom.find("div").find(".item")
128
+ *
129
+ * @param {any} selector Search selector
130
+ * @returns {PicoDom} Dom instance
131
+ */
132
+ find(selector: any): PicoDom;
133
+ /**
134
+ * Get element by index
135
+ *
136
+ * @example Dom.find("div").get(0) // => Element
137
+ *
138
+ * @param {number} [index] Node index
139
+ * @returns {any} Found element
140
+ */
141
+ get(index?: number): any;
142
+ /**
143
+ * Get first element
144
+ *
145
+ * @example Dom.find("div").first() // => Element
146
+ *
147
+ * @param {number} [offset] Node offset
148
+ * @returns {any} Found element
149
+ */
150
+ first(offset?: number): any;
151
+ /**
152
+ * Get last element
153
+ *
154
+ * @example Dom.find("div").last() // => Element
155
+ *
156
+ * @param {number} [offset] Node offset
157
+ * @returns {any} Found element
158
+ */
159
+ last(offset?: number): any;
160
+ /**
161
+ * Iterate over elements
162
+ *
163
+ * @example Dom.find("div").each((el) => console.log(el))
164
+ *
165
+ * @param {function} cb Callback fn
166
+ * @returns {this} Current instance
167
+ */
168
+ each(cb: Function): this;
169
+ /**
170
+ * Loop through parent nodes
171
+ *
172
+ * @example Dom.find("div").loopParent((el) => console.log(el))
173
+ *
174
+ * @param {function} cb Callback fn
175
+ * @param {any} [boundry] Loop limit
176
+ * @returns {this} Current instance
177
+ */
178
+ loopParent(cb: Function, boundry?: any): this;
179
+ /**
180
+ * Get parent instance
181
+ *
182
+ * @example Dom.find("div").parent() // => PicoDom
183
+ *
184
+ * @returns {PicoDom} Parent instance
185
+ */
186
+ parent(): PicoDom;
187
+ /**
188
+ * Get first child match
189
+ *
190
+ * @example Dom.find("div").child(".item")
191
+ *
192
+ * @param {any} selector Child selector
193
+ * @param {number} [filter] Node type
194
+ * @returns {PicoDom} Child instance
195
+ */
196
+ child(selector: any, filter?: number): PicoDom;
197
+ /**
198
+ * Get child elements
199
+ *
200
+ * @example Dom.find("div").childs(".item")
201
+ *
202
+ * @param {any} [selector] Child selector
203
+ * @param {number} [filter] Node type
204
+ * @returns {Array<Element>} Child elements
205
+ */
206
+ childs(selector?: any, filter?: number): Array<Element>;
207
+ /**
208
+ * Get closest element
209
+ *
210
+ * @example Dom.find("div").closest(".container")
211
+ *
212
+ * @param {any} selector Target selector
213
+ * @returns {Element} Found element
214
+ */
215
+ closest(selector: any): Element;
216
+ /**
217
+ * Get previous element
218
+ *
219
+ * @example Dom.find("div").prev() // => PicoDom
220
+ *
221
+ * @param {number} [type] Node type
222
+ * @returns {PicoDom} Prev instance
223
+ */
224
+ prev(type?: number): PicoDom;
225
+ /**
226
+ * Get next element
227
+ *
228
+ * @example Dom.find("div").next() // => PicoDom
229
+ *
230
+ * @param {number} [type] Node type
231
+ * @returns {PicoDom} Next instance
232
+ */
233
+ next(type?: number): PicoDom;
234
+ /**
235
+ * Get number of elements
236
+ *
237
+ * @example Dom.find("div").length() // => 1
238
+ *
239
+ * @returns {number} Count value
240
+ */
241
+ length(): number;
242
+ /**
243
+ * Check if element matches
244
+ *
245
+ * @example Dom.find("div").is(".active") // => true
246
+ *
247
+ * @param {any} selector Test selector
248
+ * @returns {boolean} True if matches
249
+ */
250
+ is(selector: any): boolean;
251
+ /**
252
+ * Check if contains match
253
+ *
254
+ * @example Dom.find("div").matches(".active")
255
+ *
256
+ * @param {any} selector Test selector
257
+ * @returns {boolean} True if matches
258
+ */
259
+ matches(selector: any): boolean;
260
+ /**
261
+ * Check if instance is empty
262
+ *
263
+ * @example Dom.find(".none").empty() // => true
264
+ *
265
+ * @returns {boolean} True if empty
266
+ */
267
+ empty(): boolean;
268
+ /**
269
+ * Check if element is visible
270
+ *
271
+ * @example Dom.find("div").visible() // => true
272
+ *
273
+ * @returns {boolean} True if visible
274
+ */
275
+ visible(): boolean;
276
+ /**
277
+ * Check if parent matches
278
+ *
279
+ * @example Dom.find("div").above(".container")
280
+ *
281
+ * @param {any} selector Parent selector
282
+ * @returns {boolean} True if matches
283
+ */
284
+ above(selector: any): boolean;
285
+ /**
286
+ * Check if inside match
287
+ *
288
+ * @example Dom.find("div").inside(".container")
289
+ *
290
+ * @param {any} selector Target selector
291
+ * @returns {boolean} True if inside
292
+ */
293
+ inside(selector: any): boolean;
294
+ /**
295
+ * Check if contains match
296
+ *
297
+ * @example Dom.find("div").contains(".item")
298
+ *
299
+ * @param {any} selector Target selector
300
+ * @returns {boolean} True if contains
301
+ */
302
+ contains(selector: any): boolean;
303
+ /**
304
+ * @see PicoDom.above
305
+ */
306
+ isParent(...args: any[]): boolean;
307
+ /**
308
+ * @see PicoDom.prev
309
+ */
310
+ previous(): PicoDom;
311
+ /**
312
+ * @see PicoDom.filter
313
+ */
314
+ where(...args: any[]): Element[];
315
+ /**
316
+ * @see PicoDom.except
317
+ */
318
+ not(...args: any[]): Element[];
319
+ getNot(): void;
320
+ }
321
+ export function PicoDomFinderPlugin(self: any): typeof import("#src/utils/Dom.js").PicoDom;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @memberof PicoDom
3
+ */
4
+ export class PicoDomFormStatic {
5
+ }
6
+ /**
7
+ * @memberof PicoDom
8
+ * @extends {PicoDom}
9
+ */
10
+ export class PicoDomFormInstance {
11
+ /**
12
+ * Get or set input value
13
+ *
14
+ * @example Dom.find("input").value("hello")
15
+ *
16
+ * @param {any} [value] Input value
17
+ * @returns {any|this} Value or instance
18
+ */
19
+ value(value?: any): any | this;
20
+ }
21
+ export function PicoDomFormPlugin(self: any): typeof import("#src/utils/Dom.js").PicoDom;