jails-js 5.0.0-beta.13 → 5.0.0-beta.16

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.
@@ -0,0 +1,311 @@
1
+ export default function Element(module: any, dependencies: any, templates: any, components: any): {
2
+ new (): {
3
+ base: any;
4
+ options: any;
5
+ __events: any;
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ attributeChangedCallback(): void;
9
+ accessKey: string;
10
+ readonly accessKeyLabel: string;
11
+ autocapitalize: string;
12
+ dir: string;
13
+ draggable: boolean;
14
+ hidden: boolean;
15
+ innerText: string;
16
+ lang: string;
17
+ readonly offsetHeight: number;
18
+ readonly offsetLeft: number;
19
+ readonly offsetParent: Element;
20
+ readonly offsetTop: number;
21
+ readonly offsetWidth: number;
22
+ outerText: string;
23
+ spellcheck: boolean;
24
+ title: string;
25
+ translate: boolean;
26
+ attachInternals(): ElementInternals;
27
+ click(): void;
28
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
29
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
30
+ removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions): void;
31
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
32
+ readonly attributes: NamedNodeMap;
33
+ readonly classList: DOMTokenList;
34
+ className: string;
35
+ readonly clientHeight: number;
36
+ readonly clientLeft: number;
37
+ readonly clientTop: number;
38
+ readonly clientWidth: number;
39
+ id: string;
40
+ readonly localName: string;
41
+ readonly namespaceURI: string;
42
+ onfullscreenchange: (this: Element, ev: Event) => any;
43
+ onfullscreenerror: (this: Element, ev: Event) => any;
44
+ outerHTML: string;
45
+ readonly ownerDocument: Document;
46
+ readonly part: DOMTokenList;
47
+ readonly prefix: string;
48
+ readonly scrollHeight: number;
49
+ scrollLeft: number;
50
+ scrollTop: number;
51
+ readonly scrollWidth: number;
52
+ readonly shadowRoot: ShadowRoot;
53
+ slot: string;
54
+ readonly tagName: string;
55
+ attachShadow(init: ShadowRootInit): ShadowRoot;
56
+ closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
57
+ closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
58
+ closest<E extends Element = Element>(selectors: string): E;
59
+ getAttribute(qualifiedName: string): string;
60
+ getAttributeNS(namespace: string, localName: string): string;
61
+ getAttributeNames(): string[];
62
+ getAttributeNode(qualifiedName: string): Attr;
63
+ getAttributeNodeNS(namespace: string, localName: string): Attr;
64
+ getBoundingClientRect(): DOMRect;
65
+ getClientRects(): DOMRectList;
66
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
67
+ getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
68
+ getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
69
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
70
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
71
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
72
+ getElementsByTagNameNS(namespace: string, localName: string): HTMLCollectionOf<Element>;
73
+ hasAttribute(qualifiedName: string): boolean;
74
+ hasAttributeNS(namespace: string, localName: string): boolean;
75
+ hasAttributes(): boolean;
76
+ hasPointerCapture(pointerId: number): boolean;
77
+ insertAdjacentElement(where: InsertPosition, element: Element): Element;
78
+ insertAdjacentHTML(position: InsertPosition, text: string): void;
79
+ insertAdjacentText(where: InsertPosition, data: string): void;
80
+ matches(selectors: string): boolean;
81
+ releasePointerCapture(pointerId: number): void;
82
+ removeAttribute(qualifiedName: string): void;
83
+ removeAttributeNS(namespace: string, localName: string): void;
84
+ removeAttributeNode(attr: Attr): Attr;
85
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
86
+ requestPointerLock(): void;
87
+ scroll(options?: ScrollToOptions): void;
88
+ scroll(x: number, y: number): void;
89
+ scrollBy(options?: ScrollToOptions): void;
90
+ scrollBy(x: number, y: number): void;
91
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
92
+ scrollTo(options?: ScrollToOptions): void;
93
+ scrollTo(x: number, y: number): void;
94
+ setAttribute(qualifiedName: string, value: string): void;
95
+ setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
96
+ setAttributeNode(attr: Attr): Attr;
97
+ setAttributeNodeNS(attr: Attr): Attr;
98
+ setPointerCapture(pointerId: number): void;
99
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
100
+ webkitMatchesSelector(selectors: string): boolean;
101
+ readonly baseURI: string;
102
+ readonly childNodes: NodeListOf<ChildNode>;
103
+ readonly firstChild: ChildNode;
104
+ readonly isConnected: boolean;
105
+ readonly lastChild: ChildNode;
106
+ readonly nextSibling: ChildNode;
107
+ readonly nodeName: string;
108
+ readonly nodeType: number;
109
+ nodeValue: string;
110
+ readonly parentElement: HTMLElement;
111
+ readonly parentNode: ParentNode;
112
+ readonly previousSibling: ChildNode;
113
+ textContent: string;
114
+ appendChild<T extends Node>(node: T): T;
115
+ cloneNode(deep?: boolean): Node;
116
+ compareDocumentPosition(other: Node): number;
117
+ contains(other: Node): boolean;
118
+ getRootNode(options?: GetRootNodeOptions): Node;
119
+ hasChildNodes(): boolean;
120
+ insertBefore<T_1 extends Node>(node: T_1, child: Node): T_1;
121
+ isDefaultNamespace(namespace: string): boolean;
122
+ isEqualNode(otherNode: Node): boolean;
123
+ isSameNode(otherNode: Node): boolean;
124
+ lookupNamespaceURI(prefix: string): string;
125
+ lookupPrefix(namespace: string): string;
126
+ normalize(): void;
127
+ removeChild<T_2 extends Node>(child: T_2): T_2;
128
+ replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
129
+ readonly ATTRIBUTE_NODE: number;
130
+ readonly CDATA_SECTION_NODE: number;
131
+ readonly COMMENT_NODE: number;
132
+ readonly DOCUMENT_FRAGMENT_NODE: number;
133
+ readonly DOCUMENT_NODE: number;
134
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
135
+ readonly DOCUMENT_POSITION_CONTAINS: number;
136
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
137
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
138
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
139
+ readonly DOCUMENT_POSITION_PRECEDING: number;
140
+ readonly DOCUMENT_TYPE_NODE: number;
141
+ readonly ELEMENT_NODE: number;
142
+ readonly ENTITY_NODE: number;
143
+ readonly ENTITY_REFERENCE_NODE: number;
144
+ readonly NOTATION_NODE: number;
145
+ readonly PROCESSING_INSTRUCTION_NODE: number;
146
+ readonly TEXT_NODE: number;
147
+ dispatchEvent(event: Event): boolean;
148
+ ariaAtomic: string;
149
+ ariaAutoComplete: string;
150
+ ariaBusy: string;
151
+ ariaChecked: string;
152
+ ariaColCount: string;
153
+ ariaColIndex: string;
154
+ ariaColSpan: string;
155
+ ariaCurrent: string;
156
+ ariaDisabled: string;
157
+ ariaExpanded: string;
158
+ ariaHasPopup: string;
159
+ ariaHidden: string;
160
+ ariaKeyShortcuts: string;
161
+ ariaLabel: string;
162
+ ariaLevel: string;
163
+ ariaLive: string;
164
+ ariaModal: string;
165
+ ariaMultiLine: string;
166
+ ariaMultiSelectable: string;
167
+ ariaOrientation: string;
168
+ ariaPlaceholder: string;
169
+ ariaPosInSet: string;
170
+ ariaPressed: string;
171
+ ariaReadOnly: string;
172
+ ariaRequired: string;
173
+ ariaRoleDescription: string;
174
+ ariaRowCount: string;
175
+ ariaRowIndex: string;
176
+ ariaRowSpan: string;
177
+ ariaSelected: string;
178
+ ariaSetSize: string;
179
+ ariaSort: string;
180
+ ariaValueMax: string;
181
+ ariaValueMin: string;
182
+ ariaValueNow: string;
183
+ ariaValueText: string;
184
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes, options?: number | KeyframeAnimationOptions): Animation;
185
+ getAnimations(options?: GetAnimationsOptions): Animation[];
186
+ after(...nodes: (string | Node)[]): void;
187
+ before(...nodes: (string | Node)[]): void;
188
+ remove(): void;
189
+ replaceWith(...nodes: (string | Node)[]): void;
190
+ innerHTML: string;
191
+ readonly nextElementSibling: Element;
192
+ readonly previousElementSibling: Element;
193
+ readonly childElementCount: number;
194
+ readonly children: HTMLCollection;
195
+ readonly firstElementChild: Element;
196
+ readonly lastElementChild: Element;
197
+ append(...nodes: (string | Node)[]): void;
198
+ prepend(...nodes: (string | Node)[]): void;
199
+ querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
200
+ querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
201
+ querySelector<E_1 extends Element = Element>(selectors: string): E_1;
202
+ querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
203
+ querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
204
+ querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
205
+ replaceChildren(...nodes: (string | Node)[]): void;
206
+ readonly assignedSlot: HTMLSlotElement;
207
+ oncopy: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
208
+ oncut: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
209
+ onpaste: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
210
+ readonly style: CSSStyleDeclaration;
211
+ contentEditable: string;
212
+ enterKeyHint: string;
213
+ inputMode: string;
214
+ readonly isContentEditable: boolean;
215
+ onabort: (this: GlobalEventHandlers, ev: UIEvent) => any;
216
+ onanimationcancel: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
217
+ onanimationend: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
218
+ onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
219
+ onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
220
+ onauxclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
221
+ onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any;
222
+ oncanplay: (this: GlobalEventHandlers, ev: Event) => any;
223
+ oncanplaythrough: (this: GlobalEventHandlers, ev: Event) => any;
224
+ onchange: (this: GlobalEventHandlers, ev: Event) => any;
225
+ onclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
226
+ onclose: (this: GlobalEventHandlers, ev: Event) => any;
227
+ oncontextmenu: (this: GlobalEventHandlers, ev: MouseEvent) => any;
228
+ oncuechange: (this: GlobalEventHandlers, ev: Event) => any;
229
+ ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
230
+ ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any;
231
+ ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any;
232
+ ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any;
233
+ ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any;
234
+ ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any;
235
+ ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any;
236
+ ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any;
237
+ ondurationchange: (this: GlobalEventHandlers, ev: Event) => any;
238
+ onemptied: (this: GlobalEventHandlers, ev: Event) => any;
239
+ onended: (this: GlobalEventHandlers, ev: Event) => any;
240
+ onerror: OnErrorEventHandlerNonNull;
241
+ onfocus: (this: GlobalEventHandlers, ev: FocusEvent) => any;
242
+ onformdata: (this: GlobalEventHandlers, ev: FormDataEvent) => any;
243
+ ongotpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any;
244
+ oninput: (this: GlobalEventHandlers, ev: Event) => any;
245
+ oninvalid: (this: GlobalEventHandlers, ev: Event) => any;
246
+ onkeydown: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
247
+ onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
248
+ onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
249
+ onload: (this: GlobalEventHandlers, ev: Event) => any;
250
+ onloadeddata: (this: GlobalEventHandlers, ev: Event) => any;
251
+ onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any;
252
+ onloadstart: (this: GlobalEventHandlers, ev: Event) => any;
253
+ onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any;
254
+ onmousedown: (this: GlobalEventHandlers, ev: MouseEvent) => any;
255
+ onmouseenter: (this: GlobalEventHandlers, ev: MouseEvent) => any;
256
+ onmouseleave: (this: GlobalEventHandlers, ev: MouseEvent) => any;
257
+ onmousemove: (this: GlobalEventHandlers, ev: MouseEvent) => any;
258
+ onmouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
259
+ onmouseover: (this: GlobalEventHandlers, ev: MouseEvent) => any;
260
+ onmouseup: (this: GlobalEventHandlers, ev: MouseEvent) => any;
261
+ onpause: (this: GlobalEventHandlers, ev: Event) => any;
262
+ onplay: (this: GlobalEventHandlers, ev: Event) => any;
263
+ onplaying: (this: GlobalEventHandlers, ev: Event) => any;
264
+ onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any;
265
+ onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any;
266
+ onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any;
267
+ onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any;
268
+ onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any;
269
+ onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any;
270
+ onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any;
271
+ onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any;
272
+ onprogress: (this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any;
273
+ onratechange: (this: GlobalEventHandlers, ev: Event) => any;
274
+ onreset: (this: GlobalEventHandlers, ev: Event) => any;
275
+ onresize: (this: GlobalEventHandlers, ev: UIEvent) => any;
276
+ onscroll: (this: GlobalEventHandlers, ev: Event) => any;
277
+ onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any;
278
+ onseeked: (this: GlobalEventHandlers, ev: Event) => any;
279
+ onseeking: (this: GlobalEventHandlers, ev: Event) => any;
280
+ onselect: (this: GlobalEventHandlers, ev: Event) => any;
281
+ onselectionchange: (this: GlobalEventHandlers, ev: Event) => any;
282
+ onselectstart: (this: GlobalEventHandlers, ev: Event) => any;
283
+ onslotchange: (this: GlobalEventHandlers, ev: Event) => any;
284
+ onstalled: (this: GlobalEventHandlers, ev: Event) => any;
285
+ onsubmit: (this: GlobalEventHandlers, ev: SubmitEvent) => any;
286
+ onsuspend: (this: GlobalEventHandlers, ev: Event) => any;
287
+ ontimeupdate: (this: GlobalEventHandlers, ev: Event) => any;
288
+ ontoggle: (this: GlobalEventHandlers, ev: Event) => any;
289
+ ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
290
+ ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
291
+ ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
292
+ ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any;
293
+ ontransitioncancel: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
294
+ ontransitionend: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
295
+ ontransitionrun: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
296
+ ontransitionstart: (this: GlobalEventHandlers, ev: TransitionEvent) => any;
297
+ onvolumechange: (this: GlobalEventHandlers, ev: Event) => any;
298
+ onwaiting: (this: GlobalEventHandlers, ev: Event) => any;
299
+ onwebkitanimationend: (this: GlobalEventHandlers, ev: Event) => any;
300
+ onwebkitanimationiteration: (this: GlobalEventHandlers, ev: Event) => any;
301
+ onwebkitanimationstart: (this: GlobalEventHandlers, ev: Event) => any;
302
+ onwebkittransitionend: (this: GlobalEventHandlers, ev: Event) => any;
303
+ onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any;
304
+ autofocus: boolean;
305
+ readonly dataset: DOMStringMap;
306
+ nonce?: string;
307
+ tabIndex: number;
308
+ blur(): void;
309
+ focus(options?: FocusOptions): void;
310
+ };
311
+ };
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ register(name: string, module: any, dependencies: object): void;
3
+ start(): void;
4
+ };
5
+ export default _default;
package/types/index.ts ADDED
@@ -0,0 +1,41 @@
1
+ export type Component = {
2
+
3
+ elm: HTMLElement
4
+ dependencies: object
5
+
6
+ state : {
7
+ set( data: object ) : void
8
+ set( callback: ( state: object ) => any ) : void
9
+ get() : object
10
+ }
11
+
12
+ main( mainArgs: ( t: any ) => Array<Function> ): void
13
+
14
+ publish( name: string, value: any ) : void
15
+
16
+ subscribe( name: string, value: Function ) : Function
17
+
18
+ template( data: object ) : void
19
+
20
+ unmount( callback: () => void ) : void
21
+
22
+ onupdate( callback: () => void ) : void
23
+
24
+ on( eventName: string, selector: string, callback: () => void ): void
25
+
26
+ on( eventName: string, callback: () => void ): void
27
+
28
+ emit( eventName: string, data: any ) : void
29
+
30
+ off( eventName: string, callback: () => void ): void
31
+
32
+ trigger( eventName: string, selector :string, data: any ): void
33
+
34
+ render( data: object ) : void
35
+ }
36
+
37
+ export type Model = {
38
+ [key: string] : object
39
+ }
40
+
41
+ export type View = ( state: object ) => object
@@ -0,0 +1 @@
1
+ export default function templateSystem(element: any): (data: any) => string;
@@ -0,0 +1,3 @@
1
+ export declare const on: (node: any, ev: any, selectorOrCallback: any, callback: any) => void;
2
+ export declare const off: (node: any, ev: any, fn: any) => void;
3
+ export declare const trigger: (node: any, name: any, args: any) => void;
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ export declare const rAF: (fn: any) => number | NodeJS.Timeout;
3
+ export declare const uuid: () => string;
4
+ export declare const stripTemplateTag: (element: any) => void;
5
+ export declare const dup: (o: any) => any;
6
+ export declare const createTemplateId: (element: any, templates: any) => void;
7
+ export declare const buildtemplates: (target: any, components: any, templates: any) => unknown[];
8
+ export declare const decodeHtmlEntities: (str: any) => string;
@@ -0,0 +1,2 @@
1
+ export declare const publish: (name: any, params: any) => void;
2
+ export declare const subscribe: (name: any, method: any) => () => void;