j-templates 5.0.45 → 5.0.47
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/DOM/domNodeConfig.d.ts +2 -2
- package/DOM/domNodeConfig.js +82 -82
- package/DOM/elements.d.ts +24 -24
- package/DOM/elements.js +96 -96
- package/DOM/index.d.ts +3 -3
- package/DOM/index.js +19 -19
- package/DOM/svgElements.d.ts +4 -4
- package/DOM/svgElements.js +17 -17
- package/DOM/utils.d.ts +1 -1
- package/DOM/utils.js +47 -47
- package/DOM/window.d.ts +1 -1
- package/DOM/window.js +4 -4
- package/Node/boundNode.d.ts +4 -4
- package/Node/boundNode.js +99 -94
- package/Node/boundNode.types.d.ts +43 -43
- package/Node/boundNode.types.js +2 -2
- package/Node/component.d.ts +34 -34
- package/Node/component.js +80 -80
- package/Node/componentNode.d.ts +7 -7
- package/Node/componentNode.js +115 -115
- package/Node/componentNode.types.d.ts +35 -35
- package/Node/componentNode.types.js +2 -2
- package/Node/elementNode.d.ts +5 -5
- package/Node/elementNode.js +157 -158
- package/Node/elementNode.types.d.ts +34 -34
- package/Node/elementNode.types.js +2 -2
- package/Node/nodeConfig.d.ts +22 -22
- package/Node/nodeConfig.js +5 -5
- package/Node/nodeRef.d.ts +21 -21
- package/Node/nodeRef.js +157 -157
- package/Node/nodeRef.types.d.ts +21 -21
- package/Node/nodeRef.types.js +2 -2
- package/Store/Diff/diffAsync.d.ts +17 -17
- package/Store/Diff/diffAsync.js +36 -36
- package/Store/Diff/diffSync.d.ts +14 -14
- package/Store/Diff/diffSync.js +27 -27
- package/Store/Diff/diffTree.d.ts +24 -24
- package/Store/Diff/diffTree.js +232 -221
- package/Store/Diff/diffWorker.d.ts +3 -3
- package/Store/Diff/diffWorker.js +19 -19
- package/Store/Diff/workerQueue.d.ts +7 -7
- package/Store/Diff/workerQueue.js +35 -35
- package/Store/Store/store.d.ts +14 -14
- package/Store/Store/store.js +31 -31
- package/Store/Store/storeAsync.d.ts +20 -20
- package/Store/Store/storeAsync.js +49 -49
- package/Store/Store/storeAsyncWriter.d.ts +15 -15
- package/Store/Store/storeAsyncWriter.js +52 -52
- package/Store/Store/storeSync.d.ts +15 -15
- package/Store/Store/storeSync.js +33 -33
- package/Store/Store/storeSyncWriter.d.ts +12 -12
- package/Store/Store/storeSyncWriter.js +41 -41
- package/Store/Store/storeWriter.d.ts +9 -9
- package/Store/Store/storeWriter.js +30 -30
- package/Store/Tree/observableScope.d.ts +57 -56
- package/Store/Tree/observableScope.js +168 -164
- package/Store/Tree/observableTree.d.ts +34 -33
- package/Store/Tree/observableTree.js +232 -214
- package/Store/index.d.ts +4 -4
- package/Store/index.js +11 -11
- package/Utils/animation.d.ts +29 -29
- package/Utils/animation.js +108 -108
- package/Utils/asyncQueue.d.ts +8 -8
- package/Utils/asyncQueue.js +42 -42
- package/Utils/decorators.d.ts +37 -37
- package/Utils/decorators.js +310 -300
- package/Utils/emitter.d.ts +12 -12
- package/Utils/emitter.js +24 -24
- package/Utils/index.d.ts +2 -2
- package/Utils/index.js +18 -18
- package/Utils/injector.d.ts +13 -13
- package/Utils/injector.js +38 -38
- package/Utils/list.d.ts +23 -23
- package/Utils/list.js +120 -120
- package/Utils/router.d.ts +23 -23
- package/Utils/router.js +116 -116
- package/Utils/thread.d.ts +16 -16
- package/Utils/thread.js +108 -108
- package/Utils/utils.types.d.ts +3 -3
- package/Utils/utils.types.js +2 -2
- package/index.d.ts +2 -2
- package/index.debug.d.ts +1 -0
- package/index.debug.js +12 -0
- package/index.js +5 -5
- package/jTemplates.js +2676 -2629
- package/jTemplates.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -1
- package/web.export.d.ts +4 -4
- package/web.export.js +24 -24
- package/web.js +5 -5
package/DOM/domNodeConfig.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { INodeConfig } from '../Node/nodeConfig';
|
|
2
|
-
export declare var DOMNodeConfig: INodeConfig;
|
|
1
|
+
import { INodeConfig } from '../Node/nodeConfig';
|
|
2
|
+
export declare var DOMNodeConfig: INodeConfig;
|
package/DOM/domNodeConfig.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DOMNodeConfig = void 0;
|
|
4
|
-
const window_1 = require("./window");
|
|
5
|
-
const list_1 = require("../Utils/list");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
|
-
const thread_1 = require("../Utils/thread");
|
|
8
|
-
var pendingUpdates = list_1.List.Create();
|
|
9
|
-
var updateScheduled = false;
|
|
10
|
-
function processUpdates() {
|
|
11
|
-
list_1.List.Add(pendingUpdates, null);
|
|
12
|
-
var callback;
|
|
13
|
-
while ((callback = list_1.List.Pop(pendingUpdates)))
|
|
14
|
-
(0, thread_1.Synch)(callback);
|
|
15
|
-
if (pendingUpdates.size === 0)
|
|
16
|
-
updateScheduled = false;
|
|
17
|
-
else
|
|
18
|
-
window_1.wndw.requestAnimationFrame(processUpdates);
|
|
19
|
-
}
|
|
20
|
-
exports.DOMNodeConfig = {
|
|
21
|
-
createNode(type, namespace) {
|
|
22
|
-
return type !== "text" ?
|
|
23
|
-
namespace ?
|
|
24
|
-
window_1.wndw.document.createElementNS(namespace, type) :
|
|
25
|
-
window_1.wndw.document.createElement(type) :
|
|
26
|
-
window_1.wndw.document.createTextNode("");
|
|
27
|
-
},
|
|
28
|
-
scheduleUpdate(callback) {
|
|
29
|
-
list_1.List.Add(pendingUpdates, callback);
|
|
30
|
-
if (!updateScheduled) {
|
|
31
|
-
updateScheduled = true;
|
|
32
|
-
window_1.wndw.requestAnimationFrame(processUpdates);
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
addListener(target, type, callback) {
|
|
36
|
-
target.addEventListener(type, callback);
|
|
37
|
-
},
|
|
38
|
-
removeListener(target, type, callback) {
|
|
39
|
-
target.removeEventListener(type, callback);
|
|
40
|
-
},
|
|
41
|
-
addChild(root, child) {
|
|
42
|
-
root.appendChild(child);
|
|
43
|
-
},
|
|
44
|
-
addChildFirst(root, child) {
|
|
45
|
-
exports.DOMNodeConfig.addChildBefore(root, root.firstChild, child);
|
|
46
|
-
},
|
|
47
|
-
addChildBefore(root, sibling, child) {
|
|
48
|
-
if (!sibling) {
|
|
49
|
-
exports.DOMNodeConfig.addChild(root, child);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (child !== sibling)
|
|
53
|
-
root.insertBefore(child, sibling);
|
|
54
|
-
},
|
|
55
|
-
addChildAfter(root, sibling, child) {
|
|
56
|
-
if (!sibling) {
|
|
57
|
-
exports.DOMNodeConfig.addChildFirst(root, child);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
exports.DOMNodeConfig.addChildBefore(root, sibling.nextSibling, child);
|
|
61
|
-
},
|
|
62
|
-
removeChild(root, child) {
|
|
63
|
-
root.removeChild(child);
|
|
64
|
-
},
|
|
65
|
-
remove(target) {
|
|
66
|
-
target && target.parentNode && target.parentNode.removeChild(target);
|
|
67
|
-
},
|
|
68
|
-
setText(target, text) {
|
|
69
|
-
target.textContent = text;
|
|
70
|
-
},
|
|
71
|
-
getAttribute(target, attribute) {
|
|
72
|
-
return target.getAttribute(attribute);
|
|
73
|
-
},
|
|
74
|
-
setAttribute(target, attribute, value) {
|
|
75
|
-
target.setAttribute(attribute, value);
|
|
76
|
-
},
|
|
77
|
-
fireEvent(target, event, data) {
|
|
78
|
-
var cEvent = new CustomEvent(event, data);
|
|
79
|
-
target.dispatchEvent(cEvent);
|
|
80
|
-
},
|
|
81
|
-
setProperties: utils_1.SetProperties
|
|
82
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DOMNodeConfig = void 0;
|
|
4
|
+
const window_1 = require("./window");
|
|
5
|
+
const list_1 = require("../Utils/list");
|
|
6
|
+
const utils_1 = require("./utils");
|
|
7
|
+
const thread_1 = require("../Utils/thread");
|
|
8
|
+
var pendingUpdates = list_1.List.Create();
|
|
9
|
+
var updateScheduled = false;
|
|
10
|
+
function processUpdates() {
|
|
11
|
+
list_1.List.Add(pendingUpdates, null);
|
|
12
|
+
var callback;
|
|
13
|
+
while ((callback = list_1.List.Pop(pendingUpdates)))
|
|
14
|
+
(0, thread_1.Synch)(callback);
|
|
15
|
+
if (pendingUpdates.size === 0)
|
|
16
|
+
updateScheduled = false;
|
|
17
|
+
else
|
|
18
|
+
window_1.wndw.requestAnimationFrame(processUpdates);
|
|
19
|
+
}
|
|
20
|
+
exports.DOMNodeConfig = {
|
|
21
|
+
createNode(type, namespace) {
|
|
22
|
+
return type !== "text" ?
|
|
23
|
+
namespace ?
|
|
24
|
+
window_1.wndw.document.createElementNS(namespace, type) :
|
|
25
|
+
window_1.wndw.document.createElement(type) :
|
|
26
|
+
window_1.wndw.document.createTextNode("");
|
|
27
|
+
},
|
|
28
|
+
scheduleUpdate(callback) {
|
|
29
|
+
list_1.List.Add(pendingUpdates, callback);
|
|
30
|
+
if (!updateScheduled) {
|
|
31
|
+
updateScheduled = true;
|
|
32
|
+
window_1.wndw.requestAnimationFrame(processUpdates);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
addListener(target, type, callback) {
|
|
36
|
+
target.addEventListener(type, callback);
|
|
37
|
+
},
|
|
38
|
+
removeListener(target, type, callback) {
|
|
39
|
+
target.removeEventListener(type, callback);
|
|
40
|
+
},
|
|
41
|
+
addChild(root, child) {
|
|
42
|
+
root.appendChild(child);
|
|
43
|
+
},
|
|
44
|
+
addChildFirst(root, child) {
|
|
45
|
+
exports.DOMNodeConfig.addChildBefore(root, root.firstChild, child);
|
|
46
|
+
},
|
|
47
|
+
addChildBefore(root, sibling, child) {
|
|
48
|
+
if (!sibling) {
|
|
49
|
+
exports.DOMNodeConfig.addChild(root, child);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (child !== sibling)
|
|
53
|
+
root.insertBefore(child, sibling);
|
|
54
|
+
},
|
|
55
|
+
addChildAfter(root, sibling, child) {
|
|
56
|
+
if (!sibling) {
|
|
57
|
+
exports.DOMNodeConfig.addChildFirst(root, child);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
exports.DOMNodeConfig.addChildBefore(root, sibling.nextSibling, child);
|
|
61
|
+
},
|
|
62
|
+
removeChild(root, child) {
|
|
63
|
+
root.removeChild(child);
|
|
64
|
+
},
|
|
65
|
+
remove(target) {
|
|
66
|
+
target && target.parentNode && target.parentNode.removeChild(target);
|
|
67
|
+
},
|
|
68
|
+
setText(target, text) {
|
|
69
|
+
target.textContent = text;
|
|
70
|
+
},
|
|
71
|
+
getAttribute(target, attribute) {
|
|
72
|
+
return target.getAttribute(attribute);
|
|
73
|
+
},
|
|
74
|
+
setAttribute(target, attribute, value) {
|
|
75
|
+
target.setAttribute(attribute, value);
|
|
76
|
+
},
|
|
77
|
+
fireEvent(target, event, data) {
|
|
78
|
+
var cEvent = new CustomEvent(event, data);
|
|
79
|
+
target.dispatchEvent(cEvent);
|
|
80
|
+
},
|
|
81
|
+
setProperties: utils_1.SetProperties
|
|
82
|
+
};
|
package/DOM/elements.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ElementNodeFunctionParam, ElementChildrenFunction } from "../Node/elementNode.types";
|
|
2
|
-
export declare function div<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
3
|
-
export declare function a<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
4
|
-
export declare function ul<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
5
|
-
export declare function li<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
6
|
-
export declare function br<T>(nodeDef: ElementNodeFunctionParam<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
7
|
-
export declare function b<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
8
|
-
export declare function span<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
9
|
-
export declare function img<T>(nodeDef: ElementNodeFunctionParam<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
10
|
-
export declare function video<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
11
|
-
export declare function source<T>(nodeDef: ElementNodeFunctionParam<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
12
|
-
export declare function input<T>(nodeDef: ElementNodeFunctionParam<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
13
|
-
export declare function select<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
14
|
-
export declare function option<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
15
|
-
export declare function h1<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
16
|
-
export declare function h2<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
17
|
-
export declare function h3<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
18
|
-
export declare function p<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
19
|
-
export declare function style<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
20
|
-
export declare function button<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
21
|
-
export declare function table<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
22
|
-
export declare function th<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
23
|
-
export declare function tr<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
24
|
-
export declare function td<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
1
|
+
import { ElementNodeFunctionParam, ElementChildrenFunction } from "../Node/elementNode.types";
|
|
2
|
+
export declare function div<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
3
|
+
export declare function a<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
4
|
+
export declare function ul<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
5
|
+
export declare function li<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
6
|
+
export declare function br<T>(nodeDef: ElementNodeFunctionParam<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
7
|
+
export declare function b<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
8
|
+
export declare function span<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
9
|
+
export declare function img<T>(nodeDef: ElementNodeFunctionParam<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
10
|
+
export declare function video<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
11
|
+
export declare function source<T>(nodeDef: ElementNodeFunctionParam<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
12
|
+
export declare function input<T>(nodeDef: ElementNodeFunctionParam<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
13
|
+
export declare function select<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
14
|
+
export declare function option<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
15
|
+
export declare function h1<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
16
|
+
export declare function h2<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
17
|
+
export declare function h3<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
18
|
+
export declare function p<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
19
|
+
export declare function style<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
20
|
+
export declare function button<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
21
|
+
export declare function table<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
22
|
+
export declare function th<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
23
|
+
export declare function tr<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
24
|
+
export declare function td<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
package/DOM/elements.js
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.td = exports.tr = exports.th = exports.table = exports.button = exports.style = exports.p = exports.h3 = exports.h2 = exports.h1 = exports.option = exports.select = exports.input = exports.source = exports.video = exports.img = exports.span = exports.b = exports.br = exports.li = exports.ul = exports.a = exports.div = void 0;
|
|
4
|
-
const elementNode_1 = require("../Node/elementNode");
|
|
5
|
-
function div(nodeDef, children) {
|
|
6
|
-
return elementNode_1.ElementNode.Create("div", null, nodeDef, children);
|
|
7
|
-
}
|
|
8
|
-
exports.div = div;
|
|
9
|
-
function a(nodeDef, children) {
|
|
10
|
-
return elementNode_1.ElementNode.Create("a", null, nodeDef, children);
|
|
11
|
-
}
|
|
12
|
-
exports.a = a;
|
|
13
|
-
function ul(nodeDef, children) {
|
|
14
|
-
return elementNode_1.ElementNode.Create("ul", null, nodeDef, children);
|
|
15
|
-
}
|
|
16
|
-
exports.ul = ul;
|
|
17
|
-
function li(nodeDef, children) {
|
|
18
|
-
return elementNode_1.ElementNode.Create("li", null, nodeDef, children);
|
|
19
|
-
}
|
|
20
|
-
exports.li = li;
|
|
21
|
-
function br(nodeDef) {
|
|
22
|
-
return elementNode_1.ElementNode.Create("br", null, nodeDef, null);
|
|
23
|
-
}
|
|
24
|
-
exports.br = br;
|
|
25
|
-
function b(nodeDef, children) {
|
|
26
|
-
return elementNode_1.ElementNode.Create("b", null, nodeDef, children);
|
|
27
|
-
}
|
|
28
|
-
exports.b = b;
|
|
29
|
-
function span(nodeDef, children) {
|
|
30
|
-
return elementNode_1.ElementNode.Create("span", null, nodeDef, children);
|
|
31
|
-
}
|
|
32
|
-
exports.span = span;
|
|
33
|
-
function img(nodeDef) {
|
|
34
|
-
return elementNode_1.ElementNode.Create("img", null, nodeDef, null);
|
|
35
|
-
}
|
|
36
|
-
exports.img = img;
|
|
37
|
-
function video(nodeDef, children) {
|
|
38
|
-
return elementNode_1.ElementNode.Create("video", null, nodeDef, children);
|
|
39
|
-
}
|
|
40
|
-
exports.video = video;
|
|
41
|
-
function source(nodeDef) {
|
|
42
|
-
return elementNode_1.ElementNode.Create("source", null, nodeDef, null);
|
|
43
|
-
}
|
|
44
|
-
exports.source = source;
|
|
45
|
-
function input(nodeDef) {
|
|
46
|
-
return elementNode_1.ElementNode.Create("input", null, nodeDef, null);
|
|
47
|
-
}
|
|
48
|
-
exports.input = input;
|
|
49
|
-
function select(nodeDef, children) {
|
|
50
|
-
return elementNode_1.ElementNode.Create("select", null, nodeDef, children);
|
|
51
|
-
}
|
|
52
|
-
exports.select = select;
|
|
53
|
-
function option(nodeDef, children) {
|
|
54
|
-
return elementNode_1.ElementNode.Create("option", null, nodeDef, children);
|
|
55
|
-
}
|
|
56
|
-
exports.option = option;
|
|
57
|
-
function h1(nodeDef, children) {
|
|
58
|
-
return elementNode_1.ElementNode.Create("h1", null, nodeDef, children);
|
|
59
|
-
}
|
|
60
|
-
exports.h1 = h1;
|
|
61
|
-
function h2(nodeDef, children) {
|
|
62
|
-
return elementNode_1.ElementNode.Create("h2", null, nodeDef, children);
|
|
63
|
-
}
|
|
64
|
-
exports.h2 = h2;
|
|
65
|
-
function h3(nodeDef, children) {
|
|
66
|
-
return elementNode_1.ElementNode.Create("h3", null, nodeDef, children);
|
|
67
|
-
}
|
|
68
|
-
exports.h3 = h3;
|
|
69
|
-
function p(nodeDef, children) {
|
|
70
|
-
return elementNode_1.ElementNode.Create("p", null, nodeDef, children);
|
|
71
|
-
}
|
|
72
|
-
exports.p = p;
|
|
73
|
-
function style(nodeDef, children) {
|
|
74
|
-
return elementNode_1.ElementNode.Create("style", null, nodeDef, children);
|
|
75
|
-
}
|
|
76
|
-
exports.style = style;
|
|
77
|
-
function button(nodeDef, children) {
|
|
78
|
-
return elementNode_1.ElementNode.Create("button", null, nodeDef, children);
|
|
79
|
-
}
|
|
80
|
-
exports.button = button;
|
|
81
|
-
function table(nodeDef, children) {
|
|
82
|
-
return elementNode_1.ElementNode.Create("table", null, nodeDef, children);
|
|
83
|
-
}
|
|
84
|
-
exports.table = table;
|
|
85
|
-
function th(nodeDef, children) {
|
|
86
|
-
return elementNode_1.ElementNode.Create("th", null, nodeDef, children);
|
|
87
|
-
}
|
|
88
|
-
exports.th = th;
|
|
89
|
-
function tr(nodeDef, children) {
|
|
90
|
-
return elementNode_1.ElementNode.Create("tr", null, nodeDef, children);
|
|
91
|
-
}
|
|
92
|
-
exports.tr = tr;
|
|
93
|
-
function td(nodeDef, children) {
|
|
94
|
-
return elementNode_1.ElementNode.Create("td", null, nodeDef, children);
|
|
95
|
-
}
|
|
96
|
-
exports.td = td;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.td = exports.tr = exports.th = exports.table = exports.button = exports.style = exports.p = exports.h3 = exports.h2 = exports.h1 = exports.option = exports.select = exports.input = exports.source = exports.video = exports.img = exports.span = exports.b = exports.br = exports.li = exports.ul = exports.a = exports.div = void 0;
|
|
4
|
+
const elementNode_1 = require("../Node/elementNode");
|
|
5
|
+
function div(nodeDef, children) {
|
|
6
|
+
return elementNode_1.ElementNode.Create("div", null, nodeDef, children);
|
|
7
|
+
}
|
|
8
|
+
exports.div = div;
|
|
9
|
+
function a(nodeDef, children) {
|
|
10
|
+
return elementNode_1.ElementNode.Create("a", null, nodeDef, children);
|
|
11
|
+
}
|
|
12
|
+
exports.a = a;
|
|
13
|
+
function ul(nodeDef, children) {
|
|
14
|
+
return elementNode_1.ElementNode.Create("ul", null, nodeDef, children);
|
|
15
|
+
}
|
|
16
|
+
exports.ul = ul;
|
|
17
|
+
function li(nodeDef, children) {
|
|
18
|
+
return elementNode_1.ElementNode.Create("li", null, nodeDef, children);
|
|
19
|
+
}
|
|
20
|
+
exports.li = li;
|
|
21
|
+
function br(nodeDef) {
|
|
22
|
+
return elementNode_1.ElementNode.Create("br", null, nodeDef, null);
|
|
23
|
+
}
|
|
24
|
+
exports.br = br;
|
|
25
|
+
function b(nodeDef, children) {
|
|
26
|
+
return elementNode_1.ElementNode.Create("b", null, nodeDef, children);
|
|
27
|
+
}
|
|
28
|
+
exports.b = b;
|
|
29
|
+
function span(nodeDef, children) {
|
|
30
|
+
return elementNode_1.ElementNode.Create("span", null, nodeDef, children);
|
|
31
|
+
}
|
|
32
|
+
exports.span = span;
|
|
33
|
+
function img(nodeDef) {
|
|
34
|
+
return elementNode_1.ElementNode.Create("img", null, nodeDef, null);
|
|
35
|
+
}
|
|
36
|
+
exports.img = img;
|
|
37
|
+
function video(nodeDef, children) {
|
|
38
|
+
return elementNode_1.ElementNode.Create("video", null, nodeDef, children);
|
|
39
|
+
}
|
|
40
|
+
exports.video = video;
|
|
41
|
+
function source(nodeDef) {
|
|
42
|
+
return elementNode_1.ElementNode.Create("source", null, nodeDef, null);
|
|
43
|
+
}
|
|
44
|
+
exports.source = source;
|
|
45
|
+
function input(nodeDef) {
|
|
46
|
+
return elementNode_1.ElementNode.Create("input", null, nodeDef, null);
|
|
47
|
+
}
|
|
48
|
+
exports.input = input;
|
|
49
|
+
function select(nodeDef, children) {
|
|
50
|
+
return elementNode_1.ElementNode.Create("select", null, nodeDef, children);
|
|
51
|
+
}
|
|
52
|
+
exports.select = select;
|
|
53
|
+
function option(nodeDef, children) {
|
|
54
|
+
return elementNode_1.ElementNode.Create("option", null, nodeDef, children);
|
|
55
|
+
}
|
|
56
|
+
exports.option = option;
|
|
57
|
+
function h1(nodeDef, children) {
|
|
58
|
+
return elementNode_1.ElementNode.Create("h1", null, nodeDef, children);
|
|
59
|
+
}
|
|
60
|
+
exports.h1 = h1;
|
|
61
|
+
function h2(nodeDef, children) {
|
|
62
|
+
return elementNode_1.ElementNode.Create("h2", null, nodeDef, children);
|
|
63
|
+
}
|
|
64
|
+
exports.h2 = h2;
|
|
65
|
+
function h3(nodeDef, children) {
|
|
66
|
+
return elementNode_1.ElementNode.Create("h3", null, nodeDef, children);
|
|
67
|
+
}
|
|
68
|
+
exports.h3 = h3;
|
|
69
|
+
function p(nodeDef, children) {
|
|
70
|
+
return elementNode_1.ElementNode.Create("p", null, nodeDef, children);
|
|
71
|
+
}
|
|
72
|
+
exports.p = p;
|
|
73
|
+
function style(nodeDef, children) {
|
|
74
|
+
return elementNode_1.ElementNode.Create("style", null, nodeDef, children);
|
|
75
|
+
}
|
|
76
|
+
exports.style = style;
|
|
77
|
+
function button(nodeDef, children) {
|
|
78
|
+
return elementNode_1.ElementNode.Create("button", null, nodeDef, children);
|
|
79
|
+
}
|
|
80
|
+
exports.button = button;
|
|
81
|
+
function table(nodeDef, children) {
|
|
82
|
+
return elementNode_1.ElementNode.Create("table", null, nodeDef, children);
|
|
83
|
+
}
|
|
84
|
+
exports.table = table;
|
|
85
|
+
function th(nodeDef, children) {
|
|
86
|
+
return elementNode_1.ElementNode.Create("th", null, nodeDef, children);
|
|
87
|
+
}
|
|
88
|
+
exports.th = th;
|
|
89
|
+
function tr(nodeDef, children) {
|
|
90
|
+
return elementNode_1.ElementNode.Create("tr", null, nodeDef, children);
|
|
91
|
+
}
|
|
92
|
+
exports.tr = tr;
|
|
93
|
+
function td(nodeDef, children) {
|
|
94
|
+
return elementNode_1.ElementNode.Create("td", null, nodeDef, children);
|
|
95
|
+
}
|
|
96
|
+
exports.td = td;
|
package/DOM/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./elements";
|
|
2
|
-
export * from "./svgElements";
|
|
3
|
-
export * from "./utils";
|
|
1
|
+
export * from "./elements";
|
|
2
|
+
export * from "./svgElements";
|
|
3
|
+
export * from "./utils";
|
package/DOM/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./elements"), exports);
|
|
18
|
-
__exportStar(require("./svgElements"), exports);
|
|
19
|
-
__exportStar(require("./utils"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./elements"), exports);
|
|
18
|
+
__exportStar(require("./svgElements"), exports);
|
|
19
|
+
__exportStar(require("./utils"), exports);
|
package/DOM/svgElements.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementChildrenFunction, ElementNodeFunctionParam } from "../Node/elementNode.types";
|
|
2
|
-
export declare function svg<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
3
|
-
export declare function g<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
4
|
-
export declare function circle<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
1
|
+
import { ElementChildrenFunction, ElementNodeFunctionParam } from "../Node/elementNode.types";
|
|
2
|
+
export declare function svg<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
3
|
+
export declare function g<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
|
4
|
+
export declare function circle<T>(nodeDef: ElementNodeFunctionParam<T>, children?: ElementChildrenFunction<T>): import("../Node/elementNode.types").IElementNode<T>;
|
package/DOM/svgElements.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.circle = exports.g = exports.svg = void 0;
|
|
4
|
-
const elementNode_1 = require("../Node/elementNode");
|
|
5
|
-
const svgNs = "http://www.w3.org/2000/svg";
|
|
6
|
-
function svg(nodeDef, children) {
|
|
7
|
-
return elementNode_1.ElementNode.Create("svg", svgNs, nodeDef, children);
|
|
8
|
-
}
|
|
9
|
-
exports.svg = svg;
|
|
10
|
-
function g(nodeDef, children) {
|
|
11
|
-
return elementNode_1.ElementNode.Create("g", svgNs, nodeDef, children);
|
|
12
|
-
}
|
|
13
|
-
exports.g = g;
|
|
14
|
-
function circle(nodeDef, children) {
|
|
15
|
-
return elementNode_1.ElementNode.Create("circle", svgNs, nodeDef, children);
|
|
16
|
-
}
|
|
17
|
-
exports.circle = circle;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.circle = exports.g = exports.svg = void 0;
|
|
4
|
+
const elementNode_1 = require("../Node/elementNode");
|
|
5
|
+
const svgNs = "http://www.w3.org/2000/svg";
|
|
6
|
+
function svg(nodeDef, children) {
|
|
7
|
+
return elementNode_1.ElementNode.Create("svg", svgNs, nodeDef, children);
|
|
8
|
+
}
|
|
9
|
+
exports.svg = svg;
|
|
10
|
+
function g(nodeDef, children) {
|
|
11
|
+
return elementNode_1.ElementNode.Create("g", svgNs, nodeDef, children);
|
|
12
|
+
}
|
|
13
|
+
exports.g = g;
|
|
14
|
+
function circle(nodeDef, children) {
|
|
15
|
+
return elementNode_1.ElementNode.Create("circle", svgNs, nodeDef, children);
|
|
16
|
+
}
|
|
17
|
+
exports.circle = circle;
|
package/DOM/utils.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function SetProperties(target: HTMLElement, lastProperties: any, properties: any): void;
|
|
1
|
+
export declare function SetProperties(target: HTMLElement, lastProperties: any, properties: any): void;
|
package/DOM/utils.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SetProperties = void 0;
|
|
4
|
-
function SetValue(target, value) {
|
|
5
|
-
switch (target.nodeName) {
|
|
6
|
-
case "INPUT":
|
|
7
|
-
var start = target.selectionStart;
|
|
8
|
-
var end = target.selectionEnd;
|
|
9
|
-
target.value = value;
|
|
10
|
-
if (target.ownerDocument.activeElement === target)
|
|
11
|
-
target.setSelectionRange(start, end);
|
|
12
|
-
break;
|
|
13
|
-
default:
|
|
14
|
-
target.value = value;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function SetStyle(target, styleDef, lastStyleDef) {
|
|
18
|
-
for (var key in styleDef)
|
|
19
|
-
if (!lastStyleDef || lastStyleDef[key] !== styleDef[key])
|
|
20
|
-
target.style[key] = styleDef[key];
|
|
21
|
-
}
|
|
22
|
-
function SetRootProperty(target, prop, value, lastValue) {
|
|
23
|
-
switch (prop) {
|
|
24
|
-
case "value":
|
|
25
|
-
SetValue(target, value);
|
|
26
|
-
break;
|
|
27
|
-
case "style":
|
|
28
|
-
SetStyle(target, value, lastValue);
|
|
29
|
-
break;
|
|
30
|
-
default:
|
|
31
|
-
target[prop] = value;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function SetChangedProperties(target, lastProperties, properties) {
|
|
35
|
-
const keys = Object.keys(properties);
|
|
36
|
-
for (let x = 0; x < keys.length; x++) {
|
|
37
|
-
if (!lastProperties || lastProperties[keys[x]] !== properties[keys[x]])
|
|
38
|
-
SetRootProperty(target, keys[x], properties[keys[x]], lastProperties && lastProperties[keys[x]]);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function SetProperties(target, lastProperties, properties) {
|
|
42
|
-
if (!lastProperties && target.nodeType === Node.TEXT_NODE)
|
|
43
|
-
target.nodeValue = properties.nodeValue;
|
|
44
|
-
else
|
|
45
|
-
SetChangedProperties(target, lastProperties, properties);
|
|
46
|
-
}
|
|
47
|
-
exports.SetProperties = SetProperties;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetProperties = void 0;
|
|
4
|
+
function SetValue(target, value) {
|
|
5
|
+
switch (target.nodeName) {
|
|
6
|
+
case "INPUT":
|
|
7
|
+
var start = target.selectionStart;
|
|
8
|
+
var end = target.selectionEnd;
|
|
9
|
+
target.value = value;
|
|
10
|
+
if (target.ownerDocument.activeElement === target)
|
|
11
|
+
target.setSelectionRange(start, end);
|
|
12
|
+
break;
|
|
13
|
+
default:
|
|
14
|
+
target.value = value;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function SetStyle(target, styleDef, lastStyleDef) {
|
|
18
|
+
for (var key in styleDef)
|
|
19
|
+
if (!lastStyleDef || lastStyleDef[key] !== styleDef[key])
|
|
20
|
+
target.style[key] = styleDef[key];
|
|
21
|
+
}
|
|
22
|
+
function SetRootProperty(target, prop, value, lastValue) {
|
|
23
|
+
switch (prop) {
|
|
24
|
+
case "value":
|
|
25
|
+
SetValue(target, value);
|
|
26
|
+
break;
|
|
27
|
+
case "style":
|
|
28
|
+
SetStyle(target, value, lastValue);
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
target[prop] = value;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function SetChangedProperties(target, lastProperties, properties) {
|
|
35
|
+
const keys = Object.keys(properties);
|
|
36
|
+
for (let x = 0; x < keys.length; x++) {
|
|
37
|
+
if (!lastProperties || lastProperties[keys[x]] !== properties[keys[x]])
|
|
38
|
+
SetRootProperty(target, keys[x], properties[keys[x]], lastProperties && lastProperties[keys[x]]);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function SetProperties(target, lastProperties, properties) {
|
|
42
|
+
if (!lastProperties && target.nodeType === Node.TEXT_NODE)
|
|
43
|
+
target.nodeValue = properties.nodeValue;
|
|
44
|
+
else
|
|
45
|
+
SetChangedProperties(target, lastProperties, properties);
|
|
46
|
+
}
|
|
47
|
+
exports.SetProperties = SetProperties;
|
package/DOM/window.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const wndw: Window;
|
|
1
|
+
export declare const wndw: Window;
|
package/DOM/window.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wndw = void 0;
|
|
4
|
-
exports.wndw = typeof window !== "undefined" ? window : (new (require("jsdom").JSDOM("")).window);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wndw = void 0;
|
|
4
|
+
exports.wndw = typeof window !== "undefined" ? window : (new (require("jsdom").JSDOM("")).window);
|
package/Node/boundNode.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBoundNodeBase } from "./boundNode.types";
|
|
2
|
-
export declare namespace BoundNode {
|
|
3
|
-
function Init(boundNode: IBoundNodeBase): void;
|
|
4
|
-
}
|
|
1
|
+
import { IBoundNodeBase } from "./boundNode.types";
|
|
2
|
+
export declare namespace BoundNode {
|
|
3
|
+
function Init(boundNode: IBoundNodeBase): void;
|
|
4
|
+
}
|