jails-js 5.1.6 → 5.2.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.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/index.d.ts +57 -0
- package/index.html +15 -0
- package/package.json +11 -14
- package/{README.md → readme.md} +66 -1
- package/src/component.ts +7 -7
- package/src/element.ts +1 -1
- package/src/index.ts +9 -5
- package/src/template-system.ts +4 -9
- package/src/transpile.ts +1 -1
- package/src/utils/index.ts +4 -0
- package/tsconfig.json +5 -5
- package/vite-env.d.ts +1 -0
- package/vite.config.ts +16 -0
- package/.babelrc +0 -6
- package/types/component.d.ts +0 -32
- package/types/element.d.ts +0 -311
- package/types/index.d.ts +0 -6
- package/types/index.ts +0 -41
- package/types/template-system.d.ts +0 -1
- package/types/utils/events.d.ts +0 -3
- package/types/utils/index.d.ts +0 -8
- package/types/utils/pubsub.d.ts +0 -2
- package/webpack.config.js +0 -35
package/src/component.ts
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
+
import { type Component } from '..'
|
1
2
|
import morphdom from 'morphdom'
|
2
3
|
|
3
|
-
import { rAF, dup } from './utils'
|
4
|
+
import { rAF, dup, safe } from './utils'
|
4
5
|
import { buildtemplates } from './template-system'
|
5
6
|
import { on, off, trigger } from './utils/events'
|
6
7
|
import { publish, subscribe } from './utils/pubsub'
|
7
8
|
|
8
9
|
export default function Component( elm, { module, dependencies, templates, components, $scopes }) {
|
9
10
|
|
11
|
+
const tplid = elm.getAttribute('tplid')
|
10
12
|
const options = getOptions( module )
|
13
|
+
const initialState = (new Function( `return ${elm.getAttribute('html-model') || '{}'}`))()
|
11
14
|
|
12
15
|
buildtemplates( elm, components, templates, $scopes )
|
13
16
|
|
14
|
-
const htmlModel = elm.getAttribute('html-model')
|
15
|
-
const initialState = htmlModel? (new Function(`return ${htmlModel}`))() : {}
|
16
|
-
const tplid = elm.getAttribute('tplid')
|
17
17
|
const template = tplid ? templates[tplid] : null
|
18
18
|
const state = { data: module.model ? dup(module.model) : {} }
|
19
19
|
const scope = $scopes[tplid] && $scopes[tplid].length? $scopes[tplid].shift() : {}
|
20
20
|
state.data = Object.assign(scope, state.data, initialState)
|
21
21
|
|
22
|
-
const base = {
|
22
|
+
const base: Component = {
|
23
23
|
template,
|
24
24
|
elm,
|
25
25
|
dependencies,
|
@@ -88,9 +88,9 @@ export default function Component( elm, { module, dependencies, templates, compo
|
|
88
88
|
state.data = Object.assign(state.data, data)
|
89
89
|
|
90
90
|
const newdata = dup(state.data)
|
91
|
-
const newhtml = base.template.call(options.view(newdata), elm, $scopes)
|
91
|
+
const newhtml = base.template.call(options.view(newdata), elm, safe, $scopes)
|
92
92
|
|
93
|
-
morphdom(elm, newhtml, morphdomOptions(elm
|
93
|
+
morphdom(elm, newhtml, morphdomOptions(elm))
|
94
94
|
|
95
95
|
rAF(_ => {
|
96
96
|
Array
|
package/src/element.ts
CHANGED
@@ -13,7 +13,6 @@ export default function Element(module, dependencies, templates, components, $sc
|
|
13
13
|
constructor() {
|
14
14
|
|
15
15
|
super()
|
16
|
-
|
17
16
|
const { base, options } = Component(this, { module, dependencies, templates, components, $scopes })
|
18
17
|
|
19
18
|
this.base = base
|
@@ -22,6 +21,7 @@ export default function Element(module, dependencies, templates, components, $sc
|
|
22
21
|
}
|
23
22
|
|
24
23
|
connectedCallback() {
|
24
|
+
|
25
25
|
this.base.render()
|
26
26
|
|
27
27
|
if( this.returns && this.returns.constructor === Promise ) {
|
package/src/index.ts
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
import { type Module } from '..'
|
1
2
|
import { templateConfig, buildtemplates } from './template-system'
|
3
|
+
import { publish, subscribe } from './utils/pubsub'
|
2
4
|
import Element from './element'
|
3
5
|
|
4
6
|
const templates = {}
|
@@ -9,13 +11,15 @@ export default {
|
|
9
11
|
|
10
12
|
templateConfig,
|
11
13
|
|
12
|
-
|
14
|
+
publish,
|
15
|
+
subscribe,
|
16
|
+
|
17
|
+
register( name:string, module: Module, dependencies: object ) {
|
13
18
|
components[name] = { name, module, dependencies }
|
14
19
|
},
|
15
20
|
|
16
|
-
start() {
|
17
|
-
|
18
|
-
buildtemplates( body, components, templates, $scopes )
|
21
|
+
start( target = document.body ) {
|
22
|
+
buildtemplates( target, components, templates, $scopes )
|
19
23
|
registerComponents()
|
20
24
|
}
|
21
25
|
}
|
@@ -24,7 +28,7 @@ const registerComponents = () => {
|
|
24
28
|
Object
|
25
29
|
.values( components )
|
26
30
|
.forEach( (component) => {
|
27
|
-
const { name, module, dependencies } = component
|
31
|
+
const { name, module, dependencies } = component as any
|
28
32
|
const Base = Element(module, dependencies, templates, components, $scopes)
|
29
33
|
customElements.define(name, Base)
|
30
34
|
})
|
package/src/template-system.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import Transpile from './
|
1
|
+
import Transpile from './transpile'
|
2
2
|
import { uuid } from './utils'
|
3
3
|
|
4
4
|
const textarea = document.createElement('textarea')
|
@@ -17,13 +17,8 @@ export default function Template(element, $scopes) {
|
|
17
17
|
textarea.innerHTML = html
|
18
18
|
const decodedHTML = JSON.stringify(textarea.value)
|
19
19
|
|
20
|
-
return new Function('$element', '$scopes',`
|
20
|
+
return new Function('$element', 'safe', '$scopes',`
|
21
21
|
var $data = this;
|
22
|
-
|
23
|
-
function safe(execute, val){
|
24
|
-
try{return execute()}catch(err){return val || ''}
|
25
|
-
}
|
26
|
-
|
27
22
|
with( $data ){
|
28
23
|
var output=${decodedHTML
|
29
24
|
.replace(/%%_=(.+?)_%%/g, '"+safe(function(){return $1;})+"')
|
@@ -35,9 +30,9 @@ export default function Template(element, $scopes) {
|
|
35
30
|
export const buildtemplates = ( target, components, templates, $scopes ) => {
|
36
31
|
return Array
|
37
32
|
.from(target.querySelectorAll('*'))
|
38
|
-
.filter((node) => node.tagName.toLowerCase() in components)
|
33
|
+
.filter((node:HTMLElement) => node.tagName.toLowerCase() in components)
|
39
34
|
.reverse()
|
40
|
-
.map((node) => {
|
35
|
+
.map((node:HTMLElement) => {
|
41
36
|
Array.from(node.querySelectorAll('template'))
|
42
37
|
.map((template) => buildtemplates(template.content, components, templates, $scopes))
|
43
38
|
createTemplateId(node, templates, $scopes)
|
package/src/transpile.ts
CHANGED
@@ -5,7 +5,7 @@ export default function Transpile(html, config, $scopes) {
|
|
5
5
|
const regexTags = new RegExp(`\\${config.tags[0]}(.+?)\\${config.tags[1]}`, 'g')
|
6
6
|
const virtual = parser.parseFromString(html.replace(/<\/?template[^>]*>/g, ''), 'text/html')
|
7
7
|
|
8
|
-
virtual.querySelectorAll('[html-for], [html-if], [html-inner], [html-class]').forEach((element) => {
|
8
|
+
virtual.querySelectorAll('[html-for], [html-if], [html-inner], [html-class], [html-model]').forEach((element) => {
|
9
9
|
|
10
10
|
const htmlForeach = element.getAttribute('html-foreach')
|
11
11
|
const htmlFor = element.getAttribute('html-for')
|
package/src/utils/index.ts
CHANGED
package/tsconfig.json
CHANGED
@@ -25,9 +25,9 @@
|
|
25
25
|
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
26
26
|
|
27
27
|
/* Modules */
|
28
|
-
"module":"
|
28
|
+
"module":"ES2015", /* Specify what module code is generated. */
|
29
29
|
// "rootDir": "./src", /* Specify the root folder within your source files. */
|
30
|
-
"moduleResolution": "
|
30
|
+
"moduleResolution": "Bundler", /* Specify how TypeScript looks up a file from a given module specifier. */
|
31
31
|
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
32
32
|
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
33
33
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
@@ -44,12 +44,12 @@
|
|
44
44
|
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
45
45
|
|
46
46
|
/* Emit */
|
47
|
-
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
47
|
+
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
48
48
|
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
49
|
-
"emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
49
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
50
50
|
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
51
51
|
// "outFile": "types/index.d.ts", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
52
|
-
"outDir": "types", /* Specify an output folder for all emitted files. */
|
52
|
+
// "outDir": "types", /* Specify an output folder for all emitted files. */
|
53
53
|
// "removeComments": true, /* Disable emitting comments. */
|
54
54
|
// "noEmit": true, /* Disable emitting files from a compilation. */
|
55
55
|
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
package/vite-env.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/// <reference types="vite/client" />
|
package/vite.config.ts
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
import { defineConfig } from 'vite'
|
2
|
+
import path from 'path'
|
3
|
+
|
4
|
+
export default defineConfig({
|
5
|
+
build: {
|
6
|
+
sourcemap: true,
|
7
|
+
target: 'es2015',
|
8
|
+
minify: 'terser',
|
9
|
+
lib: {
|
10
|
+
name: 'jails',
|
11
|
+
entry: path.resolve('src', 'index.ts'),
|
12
|
+
formats: ['umd'],
|
13
|
+
fileName: format => `index.js`
|
14
|
+
}
|
15
|
+
}
|
16
|
+
})
|
package/.babelrc
DELETED
package/types/component.d.ts
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
export default function Component(elm: any, { module, dependencies, templates, components }: {
|
2
|
-
module: any;
|
3
|
-
dependencies: any;
|
4
|
-
templates: any;
|
5
|
-
components: any;
|
6
|
-
}): {
|
7
|
-
base: {
|
8
|
-
template: any;
|
9
|
-
elm: any;
|
10
|
-
dependencies: any;
|
11
|
-
publish: (name: any, params: any) => void;
|
12
|
-
subscribe: (name: any, method: any) => () => void;
|
13
|
-
main(fn: any): void;
|
14
|
-
unmount(fn: any): void;
|
15
|
-
onupdate(fn: any): void;
|
16
|
-
on(eventName: any, selectorOrCallback: any, callback: any): void;
|
17
|
-
off(eventName: any, callback: any): void;
|
18
|
-
trigger(eventName: any, target: any, args: any): void;
|
19
|
-
emit: (...args: any[]) => void;
|
20
|
-
state: {
|
21
|
-
set(data: any): Promise<unknown>;
|
22
|
-
get(): any;
|
23
|
-
};
|
24
|
-
render(data?: any): void;
|
25
|
-
};
|
26
|
-
options: {
|
27
|
-
main: (a: any) => any;
|
28
|
-
unmount: (a: any) => any;
|
29
|
-
onupdate: (a: any) => any;
|
30
|
-
view: any;
|
31
|
-
};
|
32
|
-
};
|
package/types/element.d.ts
DELETED
@@ -1,311 +0,0 @@
|
|
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
|
-
};
|
package/types/index.d.ts
DELETED
package/types/index.ts
DELETED
@@ -1,41 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function templateSystem(element: any): (data: any) => string;
|
package/types/utils/events.d.ts
DELETED
package/types/utils/index.d.ts
DELETED
@@ -1,8 +0,0 @@
|
|
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;
|
package/types/utils/pubsub.d.ts
DELETED
package/webpack.config.js
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
const path = require('path')
|
2
|
-
|
3
|
-
module.exports = {
|
4
|
-
|
5
|
-
devtool: 'source-map',
|
6
|
-
|
7
|
-
resolve: {
|
8
|
-
extensions: ['.ts', '.js', '.json']
|
9
|
-
},
|
10
|
-
|
11
|
-
entry: {
|
12
|
-
index: './src/index.ts'
|
13
|
-
},
|
14
|
-
|
15
|
-
module: {
|
16
|
-
rules: [
|
17
|
-
{
|
18
|
-
test: /\.ts$/,
|
19
|
-
exclude: [/node_modules/],
|
20
|
-
loader: 'ts-loader',
|
21
|
-
options: {
|
22
|
-
transpileOnly: true
|
23
|
-
}
|
24
|
-
}
|
25
|
-
]
|
26
|
-
},
|
27
|
-
|
28
|
-
output: {
|
29
|
-
path: path.resolve(__dirname, './dist'),
|
30
|
-
filename: '[name].js',
|
31
|
-
libraryTarget: 'umd',
|
32
|
-
library: 'jails',
|
33
|
-
umdNamedDefine: true
|
34
|
-
}
|
35
|
-
}
|