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