cotomy 0.1.59 → 0.1.60

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/view.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- export declare class CotomyElement {
1
+ interface IEventTarget {
2
+ get scopeId(): string;
3
+ element: HTMLElement;
4
+ }
5
+ export declare class CotomyElement implements IEventTarget {
2
6
  static encodeHtml(text: string): string;
3
7
  private static createHTMLElement;
4
8
  static first<T extends CotomyElement = CotomyElement>(selector: string, type?: new (el: HTMLElement) => T): T | undefined;
@@ -9,7 +13,6 @@ export declare class CotomyElement {
9
13
  static empty<T extends CotomyElement = CotomyElement>(type?: new (el: HTMLElement) => T): T;
10
14
  private _element;
11
15
  private _parentElement;
12
- private _eventHandlers;
13
16
  constructor(element: HTMLElement | {
14
17
  html: string;
15
18
  css?: string;
@@ -140,11 +143,14 @@ export declare class CotomyElement {
140
143
  trigger(event: string): this;
141
144
  trigger(event: string, e: Event): this;
142
145
  on(event: string, handle: (e: Event) => void | Promise<void>): this;
146
+ on(event: string, handle: (e: Event) => void | Promise<void>, options: AddEventListenerOptions): this;
143
147
  onChild(event: string, selector: string, handle: (e: Event) => void | Promise<void>): this;
148
+ onChild(event: string, selector: string, handle: (e: Event) => void | Promise<void>, options: AddEventListenerOptions): this;
144
149
  once(event: string, handle: (e: Event) => void | Promise<void>): this;
150
+ once(event: string, handle: (e: Event) => void | Promise<void>, options: AddEventListenerOptions): this;
145
151
  off(event: string): this;
146
152
  off(event: string, handle: (e: Event) => void | Promise<void>): this;
147
- handlers(event: string): Array<(e: Event) => void | Promise<void>>;
153
+ off(event: string, handle: (e: Event) => void | Promise<void>, options: AddEventListenerOptions): this;
148
154
  click(): this;
149
155
  click(handle: (e: MouseEvent) => void | Promise<void>): this;
150
156
  dblclick(): this;
@@ -249,3 +255,4 @@ export declare class CotomyWindow {
249
255
  get documentWidth(): number;
250
256
  get documentHeight(): number;
251
257
  }
258
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cotomy",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [