dothtml 6.0.0-beta.13 → 6.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.
- package/package.json +2 -2
- package/readme.md +1 -1
- package/build_module/constants.d.ts +0 -1
- package/build_module/constants.js +0 -2
- package/build_module/constants.js.map +0 -1
- package/build_module/css/css.d.ts +0 -0
- package/build_module/css/css.js +0 -1
- package/build_module/css/css.js.map +0 -1
- package/build_module/decoration/component.d.ts +0 -14
- package/build_module/decoration/component.js +0 -43
- package/build_module/decoration/component.js.map +0 -1
- package/build_module/decoration/style.d.ts +0 -0
- package/build_module/decoration/style.js +0 -1
- package/build_module/decoration/style.js.map +0 -1
- package/build_module/decoration/use-styles.d.ts +0 -14
- package/build_module/decoration/use-styles.js +0 -19
- package/build_module/decoration/use-styles.js.map +0 -1
- package/build_module/dot.d.ts +0 -3
- package/build_module/dot.js +0 -534
- package/build_module/dot.js.map +0 -1
- package/build_module/helpers/render-css.d.ts +0 -2
- package/build_module/helpers/render-css.js +0 -19
- package/build_module/helpers/render-css.js.map +0 -1
- package/build_module/helpers.d.ts +0 -2
- package/build_module/helpers.js +0 -49
- package/build_module/helpers.js.map +0 -1
- package/build_module/index.d.ts +0 -7
- package/build_module/index.js +0 -5
- package/build_module/index.js.map +0 -1
- package/build_module/reactive.d.ts +0 -37
- package/build_module/reactive.js +0 -120
- package/build_module/reactive.js.map +0 -1
- package/build_module/v-dom-node.d.ts +0 -0
- package/build_module/v-dom-node.js +0 -1
- package/build_module/v-dom-node.js.map +0 -1
- package/build_module/vdom-nodes/collection-vdom.d.ts +0 -24
- package/build_module/vdom-nodes/collection-vdom.js +0 -154
- package/build_module/vdom-nodes/collection-vdom.js.map +0 -1
- package/build_module/vdom-nodes/component-vdom.d.ts +0 -14
- package/build_module/vdom-nodes/component-vdom.js +0 -62
- package/build_module/vdom-nodes/component-vdom.js.map +0 -1
- package/build_module/vdom-nodes/conditional-vdom.d.ts +0 -14
- package/build_module/vdom-nodes/conditional-vdom.js +0 -97
- package/build_module/vdom-nodes/conditional-vdom.js.map +0 -1
- package/build_module/vdom-nodes/container-vdom.d.ts +0 -23
- package/build_module/vdom-nodes/container-vdom.js +0 -85
- package/build_module/vdom-nodes/container-vdom.js.map +0 -1
- package/build_module/vdom-nodes/element-vdom.d.ts +0 -18
- package/build_module/vdom-nodes/element-vdom.js +0 -88
- package/build_module/vdom-nodes/element-vdom.js.map +0 -1
- package/build_module/vdom-nodes/html-vdom.d.ts +0 -13
- package/build_module/vdom-nodes/html-vdom.js +0 -53
- package/build_module/vdom-nodes/html-vdom.js.map +0 -1
- package/build_module/vdom-nodes/text-vdom.d.ts +0 -11
- package/build_module/vdom-nodes/text-vdom.js +0 -37
- package/build_module/vdom-nodes/text-vdom.js.map +0 -1
- package/build_module/vdom-nodes/vdom.d.ts +0 -7
- package/build_module/vdom-nodes/vdom.js +0 -28
- package/build_module/vdom-nodes/vdom.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dothtml",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.16",
|
|
4
4
|
"description": "DOThtml is a client-side web building framework written in TypeScript.",
|
|
5
5
|
"main": "./build_module/index.js",
|
|
6
6
|
"exports": "./build_module/index.js",
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
"webpack-cli": "^5.1.4"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"dothtml-interfaces": "^0.
|
|
55
|
+
"dothtml-interfaces": "^0.2.7"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/readme.md
CHANGED
|
@@ -23,4 +23,4 @@ The Style builder is powerful and useful, but still not fully developed. Conside
|
|
|
23
23
|
- A lot of CSS properties don't enforce proper typing and will allow any string. This is a WIP and will naturally get better over time.
|
|
24
24
|
- CSS @ rules like @keyframes, @media, @font-face, etc are currently not supported because they are currently not configurable in JavaScript. A workaround that generates dynamic CSS is planned.
|
|
25
25
|
|
|
26
|
-
- Support for header elements (including stylesheets) is planned.
|
|
26
|
+
- Support for header elements (including stylesheets) is planned.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DOT_VDOM_PROP_NAME = "_dotVDom";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC"}
|
|
File without changes
|
package/build_module/css/css.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","sourceRoot":"","sources":["../../src/css/css.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IComponent } from "dothtml-interfaces";
|
|
2
|
-
export declare function component(Base: new (...args: Array<any>) => IComponent, styles: []): {
|
|
3
|
-
new (...args: any[]): {
|
|
4
|
-
events?: string[];
|
|
5
|
-
readonly _?: import("dothtml-interfaces").FrameworkItems;
|
|
6
|
-
build(...args: any[]): import("dothtml-interfaces").IDotGenericElement;
|
|
7
|
-
style?(css: import("dothtml-interfaces").IDotCss): void;
|
|
8
|
-
creating?(...args: any[]): void;
|
|
9
|
-
ready?(): void;
|
|
10
|
-
deleting?(): void;
|
|
11
|
-
deleted?(): void;
|
|
12
|
-
built?(): void;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import renderCss from "../helpers/render-css";
|
|
2
|
-
let tagId = 0x10000;
|
|
3
|
-
function restyle(c) {
|
|
4
|
-
if (c._._meta.shadowRoot && c._?._meta?.sharedStyles) {
|
|
5
|
-
c._._meta.shadowRoot.adoptedStyleSheets = c._._meta.sharedStyles;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export function component(Base, styles) {
|
|
9
|
-
let ts = (Math.floor(performance.now() * 10000000000000)).toString(16);
|
|
10
|
-
let tId = (tagId++).toString(16);
|
|
11
|
-
let tagName = `dothtml-${tId}${component["_addTimestamp"] ? `-${ts}` : ""}`;
|
|
12
|
-
let sharedStyles = null;
|
|
13
|
-
if (styles) {
|
|
14
|
-
sharedStyles = [];
|
|
15
|
-
for (let i = 0; i < styles.length; i++) {
|
|
16
|
-
sharedStyles.push(renderCss(styles[i]));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return class extends Base {
|
|
20
|
-
constructor(...args) {
|
|
21
|
-
super(...args);
|
|
22
|
-
if (!this._) {
|
|
23
|
-
this._ = {};
|
|
24
|
-
}
|
|
25
|
-
this._.refs = {};
|
|
26
|
-
this._.restyle = () => { restyle(this); };
|
|
27
|
-
this._._meta = this._._meta || {};
|
|
28
|
-
this._._meta.args = args;
|
|
29
|
-
this._._meta.isRendered = false;
|
|
30
|
-
this._._meta.tagName = tagName;
|
|
31
|
-
if (sharedStyles) {
|
|
32
|
-
if (this._._meta.sharedStyles) {
|
|
33
|
-
this._._meta.sharedStyles = [...this._._meta.sharedStyles, ...sharedStyles];
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this._._meta.sharedStyles = sharedStyles;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
component["_addTimestamp"] = true;
|
|
43
|
-
//# sourceMappingURL=component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/decoration/component.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,IAAI,KAAK,GAAG,OAAO,CAAC;AAEpB,SAAS,OAAO,CAAC,CAAa;IAC7B,IAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAC;QACnD,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;KAGjE;AACF,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAyC,EAAE,MAAU;IAE9E,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,GAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrE,IAAI,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjC,IAAI,OAAO,GAAG,WAAW,GAAG,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAE5E,IAAI,YAAY,GAAG,IAAI,CAAC;IAExB,IAAG,MAAM,EAAC;QACT,YAAY,GAAG,EAAE,CAAC;QAClB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAC;YACrC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACxC;KACD;IAoBD,OAAO,KAAM,SAAQ,IAAI;QAExB,YAAY,GAAG,IAAW;YACzB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAEf,IAAG,CAAC,IAAI,CAAC,CAAC,EAAC;gBACT,IAAI,CAAC,CAAS,GAAG,EAAE,CAAC;aACrB;YACA,IAAI,CAAC,CAAC,CAAC,IAAY,GAAG,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC,CAAC,OAAe,GAAG,GAAE,EAAE,GAAC,OAAO,CAAC,IAAI,CAAC,CAAA,CAAA,CAAC,CAAC;YAC7C,IAAI,CAAC,CAAC,CAAC,KAAa,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAC1C,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAY,GAAG,IAAI,CAAC;YACjC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,UAAkB,GAAG,KAAK,CAAC;YACxC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAe,GAAG,OAAO,CAAC;YACxC,IAAG,YAAY,EAAC;gBACf,IAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,EAAC;oBAC3B,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAoB,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,GAAG,YAAY,CAAC,CAAC;iBACrF;qBACG;oBACF,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAoB,GAAG,YAAY,CAAC;iBAClD;aACD;QAEF,CAAC;KACD,CAAA;AACF,CAAC;AAED,SAAS,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC"}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=style.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/decoration/style.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IComponent } from "dothtml-interfaces";
|
|
2
|
-
export declare function useStyles(styleCallback: any): (Base: new (...args: Array<any>) => IComponent) => {
|
|
3
|
-
new (...args: any[]): {
|
|
4
|
-
events?: string[];
|
|
5
|
-
readonly _?: import("dothtml-interfaces").FrameworkItems;
|
|
6
|
-
build(...args: any[]): import("dothtml-interfaces").IDotGenericElement;
|
|
7
|
-
style?(css: import("dothtml-interfaces").IDotCss): void;
|
|
8
|
-
creating?(...args: any[]): void;
|
|
9
|
-
ready?(): void;
|
|
10
|
-
deleting?(): void;
|
|
11
|
-
deleted?(): void;
|
|
12
|
-
built?(): void;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import renderCss from "../helpers/render-css";
|
|
2
|
-
export function useStyles(styleCallback) {
|
|
3
|
-
let sharedStyles = renderCss(styleCallback);
|
|
4
|
-
return function (Base) {
|
|
5
|
-
return class extends Base {
|
|
6
|
-
constructor(...args) {
|
|
7
|
-
super(...args);
|
|
8
|
-
if (!this._) {
|
|
9
|
-
this._ = { _meta: {} };
|
|
10
|
-
}
|
|
11
|
-
if (!this._._meta.sharedStyles) {
|
|
12
|
-
this._._meta.sharedStyles = [];
|
|
13
|
-
}
|
|
14
|
-
this._._meta.sharedStyles.push(sharedStyles);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=use-styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-styles.js","sourceRoot":"","sources":["../../src/decoration/use-styles.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,MAAM,UAAU,SAAS,CAAC,aAAa;IAEtC,IAAI,YAAY,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;IAE5C,OAAO,UAAS,IAAyC;QACxD,OAAO,KAAM,SAAQ,IAAI;YAExB,YAAY,GAAG,IAAW;gBACzB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;gBACf,IAAG,CAAC,IAAI,CAAC,CAAC,EAAC;oBACT,IAAI,CAAC,CAAS,GAAG,EAAC,KAAK,EAAE,EAAE,EAAC,CAAC;iBAC9B;gBACD,IAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,EAAC;oBAC5B,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAoB,GAAG,EAAE,CAAC;iBACxC;gBACD,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC9C,CAAC;SACD,CAAA;IACF,CAAC,CAAA;AACF,CAAC"}
|
package/build_module/dot.d.ts
DELETED
package/build_module/dot.js
DELETED
|
@@ -1,534 +0,0 @@
|
|
|
1
|
-
import { ContainerVdom } from "./vdom-nodes/container-vdom";
|
|
2
|
-
import { TextVdom } from "./vdom-nodes/text-vdom";
|
|
3
|
-
import ElementVdom from "./vdom-nodes/element-vdom";
|
|
4
|
-
import { Vdom } from "./vdom-nodes/vdom";
|
|
5
|
-
import { DOT_VDOM_PROP_NAME } from "./constants";
|
|
6
|
-
import Reactive from "./reactive";
|
|
7
|
-
import { component } from "./decoration/component";
|
|
8
|
-
import { ComponentVdom } from "./vdom-nodes/component-vdom";
|
|
9
|
-
import { useStyles } from "./decoration/use-styles";
|
|
10
|
-
const allTags = [
|
|
11
|
-
"a",
|
|
12
|
-
"aside",
|
|
13
|
-
"abbr",
|
|
14
|
-
"address",
|
|
15
|
-
"area",
|
|
16
|
-
"article",
|
|
17
|
-
"audio",
|
|
18
|
-
"b",
|
|
19
|
-
"bdi",
|
|
20
|
-
"bdo",
|
|
21
|
-
"blockQuote",
|
|
22
|
-
"body",
|
|
23
|
-
"br",
|
|
24
|
-
"button",
|
|
25
|
-
"canvas",
|
|
26
|
-
"caption",
|
|
27
|
-
"cite",
|
|
28
|
-
"code",
|
|
29
|
-
"col",
|
|
30
|
-
"colGroup",
|
|
31
|
-
"content",
|
|
32
|
-
"data",
|
|
33
|
-
"dataList",
|
|
34
|
-
"dd",
|
|
35
|
-
"del",
|
|
36
|
-
"details",
|
|
37
|
-
"dfn",
|
|
38
|
-
"dialog",
|
|
39
|
-
"div",
|
|
40
|
-
"dl",
|
|
41
|
-
"dt",
|
|
42
|
-
"em",
|
|
43
|
-
"embed",
|
|
44
|
-
"fieldSet",
|
|
45
|
-
"figCaption",
|
|
46
|
-
"figure",
|
|
47
|
-
"footer",
|
|
48
|
-
"form",
|
|
49
|
-
"h1",
|
|
50
|
-
"h2",
|
|
51
|
-
"h3",
|
|
52
|
-
"h4",
|
|
53
|
-
"h5",
|
|
54
|
-
"h6",
|
|
55
|
-
"header",
|
|
56
|
-
"hr",
|
|
57
|
-
"i",
|
|
58
|
-
"iFrame",
|
|
59
|
-
"img",
|
|
60
|
-
"input",
|
|
61
|
-
"ins",
|
|
62
|
-
"kbd",
|
|
63
|
-
"keyGen",
|
|
64
|
-
"label",
|
|
65
|
-
"legend",
|
|
66
|
-
"li",
|
|
67
|
-
"main",
|
|
68
|
-
"map",
|
|
69
|
-
"mark",
|
|
70
|
-
"menu",
|
|
71
|
-
"menuItem",
|
|
72
|
-
"meter",
|
|
73
|
-
"nav",
|
|
74
|
-
"object",
|
|
75
|
-
"ol",
|
|
76
|
-
"optGroup",
|
|
77
|
-
"option",
|
|
78
|
-
"output",
|
|
79
|
-
"p",
|
|
80
|
-
"param",
|
|
81
|
-
"pre",
|
|
82
|
-
"progress",
|
|
83
|
-
"q",
|
|
84
|
-
"rp",
|
|
85
|
-
"rt",
|
|
86
|
-
"ruby",
|
|
87
|
-
"s",
|
|
88
|
-
"samp",
|
|
89
|
-
"section",
|
|
90
|
-
"select",
|
|
91
|
-
"small",
|
|
92
|
-
"source",
|
|
93
|
-
"span",
|
|
94
|
-
"strong",
|
|
95
|
-
"svg",
|
|
96
|
-
"sub",
|
|
97
|
-
"summary",
|
|
98
|
-
"sup",
|
|
99
|
-
"table",
|
|
100
|
-
"tBody",
|
|
101
|
-
"td",
|
|
102
|
-
"textArea",
|
|
103
|
-
"tFoot",
|
|
104
|
-
"th",
|
|
105
|
-
"tHead",
|
|
106
|
-
"time",
|
|
107
|
-
"tr",
|
|
108
|
-
"track",
|
|
109
|
-
"u",
|
|
110
|
-
"ul",
|
|
111
|
-
"var",
|
|
112
|
-
"video",
|
|
113
|
-
"wbr"
|
|
114
|
-
];
|
|
115
|
-
const allAttributes = [
|
|
116
|
-
"accept",
|
|
117
|
-
"accessKey",
|
|
118
|
-
"action",
|
|
119
|
-
"align",
|
|
120
|
-
"allow",
|
|
121
|
-
"allowFullScreen",
|
|
122
|
-
"aLink",
|
|
123
|
-
"alt",
|
|
124
|
-
"archive",
|
|
125
|
-
"autoCapitalize",
|
|
126
|
-
"autoComplete",
|
|
127
|
-
"autoFocus",
|
|
128
|
-
"autoPlay",
|
|
129
|
-
"autoSave",
|
|
130
|
-
"axis",
|
|
131
|
-
"background",
|
|
132
|
-
"bgColor",
|
|
133
|
-
"border",
|
|
134
|
-
"buffered",
|
|
135
|
-
"cellPadding",
|
|
136
|
-
"cellSpacing",
|
|
137
|
-
"challenge",
|
|
138
|
-
"char",
|
|
139
|
-
"charset",
|
|
140
|
-
"charOff",
|
|
141
|
-
"checked",
|
|
142
|
-
"class",
|
|
143
|
-
"classId",
|
|
144
|
-
"clear",
|
|
145
|
-
"codeBase",
|
|
146
|
-
"codeType",
|
|
147
|
-
"color",
|
|
148
|
-
"cols",
|
|
149
|
-
"colSpan",
|
|
150
|
-
"compact",
|
|
151
|
-
"contentEditable",
|
|
152
|
-
"contextMenu",
|
|
153
|
-
"controls",
|
|
154
|
-
"coords",
|
|
155
|
-
"crossOrigin",
|
|
156
|
-
"dateTime",
|
|
157
|
-
"declare",
|
|
158
|
-
"decoding",
|
|
159
|
-
"default",
|
|
160
|
-
"dir",
|
|
161
|
-
"dirName",
|
|
162
|
-
"disabled",
|
|
163
|
-
"download",
|
|
164
|
-
"draggable",
|
|
165
|
-
"dropZone",
|
|
166
|
-
"encType",
|
|
167
|
-
"enterKeyHint",
|
|
168
|
-
"exportParts",
|
|
169
|
-
"face",
|
|
170
|
-
"font",
|
|
171
|
-
"fontFace",
|
|
172
|
-
"fontFaceFormat",
|
|
173
|
-
"fontFaceName",
|
|
174
|
-
"fontFaceSrc",
|
|
175
|
-
"fontFaceUri",
|
|
176
|
-
"fontSpecification",
|
|
177
|
-
"for",
|
|
178
|
-
"foreignObject",
|
|
179
|
-
"formAction",
|
|
180
|
-
"frame",
|
|
181
|
-
"frameBorder",
|
|
182
|
-
"headers",
|
|
183
|
-
"height",
|
|
184
|
-
"hidden",
|
|
185
|
-
"high",
|
|
186
|
-
"hRef",
|
|
187
|
-
"hRefLang",
|
|
188
|
-
"hSpace",
|
|
189
|
-
"icon",
|
|
190
|
-
"id",
|
|
191
|
-
"inert",
|
|
192
|
-
"inputMode",
|
|
193
|
-
"images",
|
|
194
|
-
"is",
|
|
195
|
-
"isMap",
|
|
196
|
-
"itemId",
|
|
197
|
-
"itemProp",
|
|
198
|
-
"itemRef",
|
|
199
|
-
"itemScope",
|
|
200
|
-
"itemType",
|
|
201
|
-
"keyType",
|
|
202
|
-
"kind",
|
|
203
|
-
"lang",
|
|
204
|
-
"list",
|
|
205
|
-
"loading",
|
|
206
|
-
"longDesc",
|
|
207
|
-
"loop",
|
|
208
|
-
"low",
|
|
209
|
-
"manifest",
|
|
210
|
-
"marginHeight",
|
|
211
|
-
"marginWidth",
|
|
212
|
-
"max",
|
|
213
|
-
"maxLength",
|
|
214
|
-
"media",
|
|
215
|
-
"metadata",
|
|
216
|
-
"method",
|
|
217
|
-
"min",
|
|
218
|
-
"missingGlyph",
|
|
219
|
-
"multiple",
|
|
220
|
-
"muted",
|
|
221
|
-
"name",
|
|
222
|
-
"noHRef",
|
|
223
|
-
"nOnce",
|
|
224
|
-
"noResize",
|
|
225
|
-
"noShade",
|
|
226
|
-
"noValidate",
|
|
227
|
-
"noWrap",
|
|
228
|
-
"open",
|
|
229
|
-
"optimum",
|
|
230
|
-
"part",
|
|
231
|
-
"pattern",
|
|
232
|
-
"ping",
|
|
233
|
-
"placeholder",
|
|
234
|
-
"playsInline",
|
|
235
|
-
"poster",
|
|
236
|
-
"preload",
|
|
237
|
-
"prompt",
|
|
238
|
-
"radioGroup",
|
|
239
|
-
"readOnly",
|
|
240
|
-
"referrerPolicy",
|
|
241
|
-
"rel",
|
|
242
|
-
"required",
|
|
243
|
-
"rev",
|
|
244
|
-
"reversed",
|
|
245
|
-
"role",
|
|
246
|
-
"rows",
|
|
247
|
-
"rowSpan",
|
|
248
|
-
"rules",
|
|
249
|
-
"sandbox",
|
|
250
|
-
"scope",
|
|
251
|
-
"scrolling",
|
|
252
|
-
"seamless",
|
|
253
|
-
"selected",
|
|
254
|
-
"shape",
|
|
255
|
-
"size",
|
|
256
|
-
"sizes",
|
|
257
|
-
"spellCheck",
|
|
258
|
-
"src",
|
|
259
|
-
"srcDoc",
|
|
260
|
-
"srcLang",
|
|
261
|
-
"srcSet",
|
|
262
|
-
"standby",
|
|
263
|
-
"start",
|
|
264
|
-
"step",
|
|
265
|
-
"style",
|
|
266
|
-
"tabIndex",
|
|
267
|
-
"target",
|
|
268
|
-
"title",
|
|
269
|
-
"translate",
|
|
270
|
-
"type",
|
|
271
|
-
"useMap",
|
|
272
|
-
"vAlign",
|
|
273
|
-
"valueType",
|
|
274
|
-
"virtualKeyboardPolicy",
|
|
275
|
-
"width",
|
|
276
|
-
"wrap"
|
|
277
|
-
];
|
|
278
|
-
const specialAttributes = [
|
|
279
|
-
["quoteCite", "cite"],
|
|
280
|
-
["objectData", "data"],
|
|
281
|
-
["whichForm", "form"],
|
|
282
|
-
["trackLabel", "label"],
|
|
283
|
-
["colSpan", "span"],
|
|
284
|
-
["tableSummary", "summary"],
|
|
285
|
-
["optionLabel", "label"],
|
|
286
|
-
["acceptCharset", "accept-charset"],
|
|
287
|
-
["areaHidden", "area-hidden"],
|
|
288
|
-
["areaLabel", "area-label"],
|
|
289
|
-
["areaDescribedBy", "area-describedby"],
|
|
290
|
-
["areaControls", "area-controls"],
|
|
291
|
-
["areaExpanded", "area-expanded"],
|
|
292
|
-
["areaChecked", "area-checked"],
|
|
293
|
-
["areaSelected", "area-selected"],
|
|
294
|
-
];
|
|
295
|
-
const allCoreWrappers = ["each", "html", "mount", "text", "when"];
|
|
296
|
-
const allEventAttr = [
|
|
297
|
-
"onAbort",
|
|
298
|
-
"onBlur",
|
|
299
|
-
"onChange",
|
|
300
|
-
"onInput",
|
|
301
|
-
"onCanPlay",
|
|
302
|
-
"onCantPlayThrough",
|
|
303
|
-
"onClick",
|
|
304
|
-
"onCopy",
|
|
305
|
-
"onContextMenu",
|
|
306
|
-
"onCueChange",
|
|
307
|
-
"onCut",
|
|
308
|
-
"onDblClick",
|
|
309
|
-
"onDrag",
|
|
310
|
-
"onDragEnd",
|
|
311
|
-
"onDragEnter",
|
|
312
|
-
"onDragLeave",
|
|
313
|
-
"onDragOver",
|
|
314
|
-
"onDragStart",
|
|
315
|
-
"onDrop",
|
|
316
|
-
"onDurationChange",
|
|
317
|
-
"onEmptied",
|
|
318
|
-
"onEnded",
|
|
319
|
-
"onError",
|
|
320
|
-
"onFocus",
|
|
321
|
-
"onHashChange",
|
|
322
|
-
"onInvalid",
|
|
323
|
-
"onKeyDown",
|
|
324
|
-
"onKeyPress",
|
|
325
|
-
"onKeyUp",
|
|
326
|
-
"onLoad",
|
|
327
|
-
"onLoadedData",
|
|
328
|
-
"onLoadedMetadata",
|
|
329
|
-
"onLoadStart",
|
|
330
|
-
"onMouseDown",
|
|
331
|
-
"onMouseEnter",
|
|
332
|
-
"onMouseLeave",
|
|
333
|
-
"onMouseMove",
|
|
334
|
-
"onMouseOut",
|
|
335
|
-
"onMouseOver",
|
|
336
|
-
"onMouseUp",
|
|
337
|
-
"onPointerCancel",
|
|
338
|
-
"onPointerDown",
|
|
339
|
-
"onPointerEnter",
|
|
340
|
-
"onPointerLeave",
|
|
341
|
-
"onPointerMove",
|
|
342
|
-
"onPointerOut",
|
|
343
|
-
"onPointerOver",
|
|
344
|
-
"onPointerUp",
|
|
345
|
-
"onTouchStart",
|
|
346
|
-
"onTouchEnd",
|
|
347
|
-
"onTouchCancel",
|
|
348
|
-
"onTouchMove",
|
|
349
|
-
"onMouseWheel",
|
|
350
|
-
"onOffline",
|
|
351
|
-
"onOnline",
|
|
352
|
-
"onPageHide",
|
|
353
|
-
"onPagePaste",
|
|
354
|
-
"onPageShow",
|
|
355
|
-
"onPause",
|
|
356
|
-
"onPlay",
|
|
357
|
-
"onPlaying",
|
|
358
|
-
"onPopState",
|
|
359
|
-
"onProgress",
|
|
360
|
-
"onRateChange",
|
|
361
|
-
"onReset",
|
|
362
|
-
"onResize",
|
|
363
|
-
"onScroll",
|
|
364
|
-
"onSearch",
|
|
365
|
-
"onSeeked",
|
|
366
|
-
"onSeeking",
|
|
367
|
-
"onSelect",
|
|
368
|
-
"onStalled",
|
|
369
|
-
"onStorage",
|
|
370
|
-
"onSubmit",
|
|
371
|
-
"onSuspend",
|
|
372
|
-
"onTimeUpdate",
|
|
373
|
-
"onToggle",
|
|
374
|
-
"onUnload",
|
|
375
|
-
"onVolumeChange",
|
|
376
|
-
"onWaiting",
|
|
377
|
-
"onWheel",
|
|
378
|
-
];
|
|
379
|
-
const makeCoreWrapper = (d, fn) => {
|
|
380
|
-
d[fn] = function () {
|
|
381
|
-
let n = new ContainerVdom();
|
|
382
|
-
n[fn](...arguments);
|
|
383
|
-
return n;
|
|
384
|
-
};
|
|
385
|
-
};
|
|
386
|
-
const makeDot = () => {
|
|
387
|
-
const _dot = function (targetSelector, targetWindow = window) {
|
|
388
|
-
if (targetSelector?.ownerDocument?.defaultView) {
|
|
389
|
-
let el = targetSelector;
|
|
390
|
-
let node = el[DOT_VDOM_PROP_NAME];
|
|
391
|
-
if (node) {
|
|
392
|
-
return node.children;
|
|
393
|
-
}
|
|
394
|
-
else {
|
|
395
|
-
node = new ElementVdom(el.tagName.toLocaleLowerCase());
|
|
396
|
-
node.element = el;
|
|
397
|
-
node.children._parent = node;
|
|
398
|
-
el[DOT_VDOM_PROP_NAME] = node;
|
|
399
|
-
return node.children;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
else if (typeof targetSelector == "string") {
|
|
403
|
-
return _dot(targetWindow.document.querySelectorAll(targetSelector)[0]);
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
throw new Error("Invalid render target.");
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
_dot.watch = function (props) {
|
|
410
|
-
let o = new Reactive();
|
|
411
|
-
o.key = props?.key;
|
|
412
|
-
o.transformer = props?.transformer;
|
|
413
|
-
o.setValue(props?.value);
|
|
414
|
-
return o;
|
|
415
|
-
};
|
|
416
|
-
_dot.css = () => {
|
|
417
|
-
};
|
|
418
|
-
_dot.component = component;
|
|
419
|
-
_dot.component["useStyles"] = useStyles;
|
|
420
|
-
_dot.useStyles = (document, styles) => {
|
|
421
|
-
let cssStringContent = "";
|
|
422
|
-
if (typeof styles == "string") {
|
|
423
|
-
cssStringContent = styles;
|
|
424
|
-
}
|
|
425
|
-
else {
|
|
426
|
-
let content = styles(dot.css);
|
|
427
|
-
if (typeof content == "string") {
|
|
428
|
-
cssStringContent = content;
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
const styleSheet = document.createElement("style");
|
|
434
|
-
styleSheet.type = "text/css";
|
|
435
|
-
styleSheet.textContent = cssStringContent;
|
|
436
|
-
document.head.appendChild(styleSheet);
|
|
437
|
-
};
|
|
438
|
-
{
|
|
439
|
-
for (let i = 0; i < allTags.length; i++) {
|
|
440
|
-
let E = allTags[i];
|
|
441
|
-
ContainerVdom.prototype[E] = function (c) {
|
|
442
|
-
let n = new ElementVdom(E);
|
|
443
|
-
if (c instanceof ContainerVdom) {
|
|
444
|
-
n.children = c;
|
|
445
|
-
}
|
|
446
|
-
else if (c instanceof Vdom) {
|
|
447
|
-
n.children._addChild(c);
|
|
448
|
-
}
|
|
449
|
-
else if (c?._?._meta && c?.build) {
|
|
450
|
-
n.children._addChild(new ComponentVdom(c));
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
if (c !== null && c !== undefined) {
|
|
454
|
-
n.children._addChild(new TextVdom(c));
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
return this._addChild(n);
|
|
458
|
-
};
|
|
459
|
-
makeCoreWrapper(_dot, E);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
{
|
|
463
|
-
for (let i = 0; i < allAttributes.length; i++) {
|
|
464
|
-
let A = allAttributes[i];
|
|
465
|
-
ContainerVdom.prototype[A] = function (c) {
|
|
466
|
-
let C = this._children[this._children.length - 1];
|
|
467
|
-
if (C && C instanceof ElementVdom) {
|
|
468
|
-
C.setAttr(A, c);
|
|
469
|
-
}
|
|
470
|
-
else {
|
|
471
|
-
throw new Error(`Invalid node to set ${A} attribute.`);
|
|
472
|
-
}
|
|
473
|
-
return this;
|
|
474
|
-
};
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
{
|
|
478
|
-
for (let i = 0; i < specialAttributes.length; i++) {
|
|
479
|
-
let A = specialAttributes[i];
|
|
480
|
-
ContainerVdom.prototype[A[0]] = function (c) {
|
|
481
|
-
let C = this._children[this._children.length - 1];
|
|
482
|
-
if (C && C instanceof ElementVdom) {
|
|
483
|
-
C.setAttr(A[1], c);
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
throw new Error(`Invalid node to set ${A[0]} attribute.`);
|
|
487
|
-
}
|
|
488
|
-
return this;
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
ContainerVdom.prototype["value"] = function (c) {
|
|
492
|
-
let C = this._children[this._children.length - 1];
|
|
493
|
-
if (C && C instanceof ElementVdom) {
|
|
494
|
-
switch (C.tag) {
|
|
495
|
-
case "input": {
|
|
496
|
-
C.setAttr("value", c);
|
|
497
|
-
break;
|
|
498
|
-
}
|
|
499
|
-
default: {
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
throw new Error(`Invalid node to set value attribute.`);
|
|
505
|
-
}
|
|
506
|
-
return this;
|
|
507
|
-
};
|
|
508
|
-
}
|
|
509
|
-
{
|
|
510
|
-
for (let i = 0; i < allEventAttr.length; i++) {
|
|
511
|
-
let E = allEventAttr[i];
|
|
512
|
-
ContainerVdom.prototype[E] = function (c) {
|
|
513
|
-
let C = this._children[this._children.length - 1];
|
|
514
|
-
if (C && C instanceof ElementVdom) {
|
|
515
|
-
C.addEventListener(E.substring(2), c);
|
|
516
|
-
}
|
|
517
|
-
else {
|
|
518
|
-
throw new Error(`Invalid node to set ${E} attribute.`);
|
|
519
|
-
}
|
|
520
|
-
return this;
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
{
|
|
525
|
-
for (let i = 0; i < allCoreWrappers.length; i++) {
|
|
526
|
-
let W = allCoreWrappers[i];
|
|
527
|
-
makeCoreWrapper(_dot, W);
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
return _dot;
|
|
531
|
-
};
|
|
532
|
-
const dot = makeDot();
|
|
533
|
-
export default dot;
|
|
534
|
-
//# sourceMappingURL=dot.js.map
|