cotomy 0.1.41 → 0.1.42
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/view.d.ts +83 -44
- package/package.json +1 -1
package/dist/view.d.ts
CHANGED
|
@@ -104,15 +104,18 @@ export declare class CotomyElement {
|
|
|
104
104
|
get isRightViewport(): boolean;
|
|
105
105
|
hasAttribute(name: string): boolean;
|
|
106
106
|
attribute(name: string): string | null | undefined;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
hasClass(
|
|
110
|
-
addClass(
|
|
111
|
-
removeClass(
|
|
112
|
-
|
|
113
|
-
removeElementStyle(name: string): this;
|
|
114
|
-
get computedStyle(): CSSStyleDeclaration;
|
|
107
|
+
attribute(name: string, value: string | number | undefined): this;
|
|
108
|
+
attribute(name: string, value: null): this;
|
|
109
|
+
hasClass(name: string): boolean;
|
|
110
|
+
addClass(name: string): this;
|
|
111
|
+
removeClass(name: string): this;
|
|
112
|
+
toggleClass(name: string, force?: boolean): this;
|
|
115
113
|
style(name: string): string;
|
|
114
|
+
style(name: string, value: string): this;
|
|
115
|
+
style(name: string, value: null): this;
|
|
116
|
+
style(name: string, value: undefined): this;
|
|
117
|
+
protected getComputedStyle(): CSSStyleDeclaration;
|
|
118
|
+
computedStyle(name: string): string;
|
|
116
119
|
get parent(): CotomyElement;
|
|
117
120
|
get parents(): CotomyElement[];
|
|
118
121
|
hasChildren(selector?: string): boolean;
|
|
@@ -130,46 +133,78 @@ export declare class CotomyElement {
|
|
|
130
133
|
insertAfter(append: CotomyElement): this;
|
|
131
134
|
appendTo(target: CotomyElement): this;
|
|
132
135
|
prependTo(target: CotomyElement): this;
|
|
133
|
-
trigger(event: string
|
|
136
|
+
trigger(event: string): this;
|
|
137
|
+
trigger(event: string, e: Event): this;
|
|
134
138
|
on(event: string, handle: (e: Event) => void | Promise<void>): this;
|
|
135
139
|
onChild(event: string, selector: string, handle: (e: Event) => void | Promise<void>): this;
|
|
136
140
|
once(event: string, handle: (e: Event) => void | Promise<void>): this;
|
|
137
|
-
off(event: string
|
|
141
|
+
off(event: string): this;
|
|
142
|
+
off(event: string, handle: (e: Event) => void | Promise<void>): this;
|
|
138
143
|
handlers(event: string): Array<(e: Event) => void | Promise<void>>;
|
|
139
|
-
click(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
144
|
+
click(): this;
|
|
145
|
+
click(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
146
|
+
dblclick(): this;
|
|
147
|
+
dblclick(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
148
|
+
mouseover(): this;
|
|
149
|
+
mouseover(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
150
|
+
mouseout(): this;
|
|
151
|
+
mouseout(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
152
|
+
mousedown(): this;
|
|
153
|
+
mousedown(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
154
|
+
mouseup(): this;
|
|
155
|
+
mouseup(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
156
|
+
mousemove(): this;
|
|
157
|
+
mousemove(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
158
|
+
mouseenter(): this;
|
|
159
|
+
mouseenter(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
160
|
+
mouseleave(): this;
|
|
161
|
+
mouseleave(handle: (e: MouseEvent) => void | Promise<void>): this;
|
|
162
|
+
dragstart(): this;
|
|
163
|
+
dragstart(handle: (e: DragEvent) => void | Promise<void>): this;
|
|
164
|
+
dragend(): this;
|
|
165
|
+
dragend(handle: (e: DragEvent) => void | Promise<void>): this;
|
|
166
|
+
dragover(): this;
|
|
167
|
+
dragover(handle: (e: DragEvent) => void | Promise<void>): this;
|
|
168
|
+
dragenter(): this;
|
|
169
|
+
dragenter(handle: (e: DragEvent) => void | Promise<void>): this;
|
|
170
|
+
dragleave(): this;
|
|
171
|
+
dragleave(handle: (e: DragEvent) => void | Promise<void>): this;
|
|
172
|
+
drop(): this;
|
|
173
|
+
drop(handle: (e: DragEvent) => void | Promise<void>): this;
|
|
174
|
+
drag(): this;
|
|
175
|
+
drag(handle: (e: DragEvent) => void | Promise<void>): this;
|
|
155
176
|
removed(handle: ((e: Event) => void | Promise<void>)): this;
|
|
156
|
-
keydown(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
177
|
+
keydown(): this;
|
|
178
|
+
keydown(handle: (e: KeyboardEvent) => void | Promise<void>): this;
|
|
179
|
+
keyup(): this;
|
|
180
|
+
keyup(handle: (e: KeyboardEvent) => void | Promise<void>): this;
|
|
181
|
+
keypress(): this;
|
|
182
|
+
keypress(handle: (e: KeyboardEvent) => void | Promise<void>): this;
|
|
183
|
+
change(): this;
|
|
184
|
+
change(handle: (e: Event) => void | Promise<void>): this;
|
|
185
|
+
input(): this;
|
|
186
|
+
input(handle: (e: Event) => void | Promise<void>): this;
|
|
161
187
|
private static _intersectionObserver;
|
|
162
188
|
static get intersectionObserver(): IntersectionObserver;
|
|
163
|
-
inview(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
189
|
+
inview(): this;
|
|
190
|
+
inview(handle: (e: Event) => void | Promise<void>): this;
|
|
191
|
+
outview(): this;
|
|
192
|
+
outview(handle: (e: Event) => void | Promise<void>): this;
|
|
193
|
+
focus(): this;
|
|
194
|
+
focus(handle: (e: FocusEvent) => void | Promise<void>): this;
|
|
195
|
+
blur(): this;
|
|
196
|
+
blur(handle: (e: FocusEvent) => void | Promise<void>): this;
|
|
197
|
+
focusin(): this;
|
|
198
|
+
focusin(handle: (e: FocusEvent) => void | Promise<void>): this;
|
|
199
|
+
focusout(): this;
|
|
200
|
+
focusout(handle: (e: FocusEvent) => void | Promise<void>): this;
|
|
169
201
|
filedrop(handle: (files: File[]) => void | Promise<void>): this;
|
|
170
|
-
resize(
|
|
171
|
-
|
|
172
|
-
|
|
202
|
+
resize(): this;
|
|
203
|
+
resize(handle: (e: Event) => void | Promise<void>): this;
|
|
204
|
+
scroll(): this;
|
|
205
|
+
scroll(handle: (e: Event) => void | Promise<void>): this;
|
|
206
|
+
changelayout(): this;
|
|
207
|
+
changelayout(handle: (e: Event) => void | Promise<void>): this;
|
|
173
208
|
}
|
|
174
209
|
export declare class CotomyMetaElement extends CotomyElement {
|
|
175
210
|
static get(name: string): CotomyMetaElement;
|
|
@@ -195,10 +230,14 @@ export declare class CotomyWindow {
|
|
|
195
230
|
handlers(event: string): Array<(e: Event) => void | Promise<void>>;
|
|
196
231
|
load(handle: (e: Event) => void | Promise<void>): void;
|
|
197
232
|
ready(handle: ((e: Event) => void | Promise<void>)): void;
|
|
198
|
-
resize(
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
233
|
+
resize(): void;
|
|
234
|
+
resize(handle: (event: Event) => void | Promise<void>): void;
|
|
235
|
+
scroll(): void;
|
|
236
|
+
scroll(handle: (event: Event) => void | Promise<void>): void;
|
|
237
|
+
changeLayout(): void;
|
|
238
|
+
changeLayout(handle: (event: Event) => void | Promise<void>): void;
|
|
239
|
+
pageshow(): void;
|
|
240
|
+
pageshow(handle: (event: PageTransitionEvent) => void | Promise<void>): void;
|
|
202
241
|
get scrollTop(): number;
|
|
203
242
|
get scrollLeft(): number;
|
|
204
243
|
get width(): number;
|