dothtml 6.0.0-beta.8 → 6.0.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.
Files changed (64) hide show
  1. package/dist/index.cjs +26 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.mts +129 -0
  4. package/dist/index.d.ts +129 -0
  5. package/dist/index.global.js +26 -0
  6. package/dist/index.global.js.map +1 -0
  7. package/dist/index.js +26 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +81 -57
  10. package/build_module/constants.d.ts +0 -1
  11. package/build_module/constants.js +0 -2
  12. package/build_module/constants.js.map +0 -1
  13. package/build_module/css/css.d.ts +0 -0
  14. package/build_module/css/css.js +0 -1
  15. package/build_module/css/css.js.map +0 -1
  16. package/build_module/decoration/component.d.ts +0 -14
  17. package/build_module/decoration/component.js +0 -27
  18. package/build_module/decoration/component.js.map +0 -1
  19. package/build_module/decoration/style.d.ts +0 -0
  20. package/build_module/decoration/style.js +0 -1
  21. package/build_module/decoration/style.js.map +0 -1
  22. package/build_module/decoration/use-styles.d.ts +0 -14
  23. package/build_module/decoration/use-styles.js +0 -32
  24. package/build_module/decoration/use-styles.js.map +0 -1
  25. package/build_module/dot.d.ts +0 -3
  26. package/build_module/dot.js +0 -516
  27. package/build_module/dot.js.map +0 -1
  28. package/build_module/helpers.d.ts +0 -2
  29. package/build_module/helpers.js +0 -49
  30. package/build_module/helpers.js.map +0 -1
  31. package/build_module/index.d.ts +0 -7
  32. package/build_module/index.js +0 -5
  33. package/build_module/index.js.map +0 -1
  34. package/build_module/reactive.d.ts +0 -37
  35. package/build_module/reactive.js +0 -120
  36. package/build_module/reactive.js.map +0 -1
  37. package/build_module/v-dom-node.d.ts +0 -0
  38. package/build_module/v-dom-node.js +0 -1
  39. package/build_module/v-dom-node.js.map +0 -1
  40. package/build_module/vdom-nodes/collection-vdom.d.ts +0 -24
  41. package/build_module/vdom-nodes/collection-vdom.js +0 -154
  42. package/build_module/vdom-nodes/collection-vdom.js.map +0 -1
  43. package/build_module/vdom-nodes/component-vdom.d.ts +0 -14
  44. package/build_module/vdom-nodes/component-vdom.js +0 -61
  45. package/build_module/vdom-nodes/component-vdom.js.map +0 -1
  46. package/build_module/vdom-nodes/conditional-vdom.d.ts +0 -14
  47. package/build_module/vdom-nodes/conditional-vdom.js +0 -97
  48. package/build_module/vdom-nodes/conditional-vdom.js.map +0 -1
  49. package/build_module/vdom-nodes/container-vdom.d.ts +0 -23
  50. package/build_module/vdom-nodes/container-vdom.js +0 -85
  51. package/build_module/vdom-nodes/container-vdom.js.map +0 -1
  52. package/build_module/vdom-nodes/element-vdom.d.ts +0 -18
  53. package/build_module/vdom-nodes/element-vdom.js +0 -88
  54. package/build_module/vdom-nodes/element-vdom.js.map +0 -1
  55. package/build_module/vdom-nodes/html-vdom.d.ts +0 -13
  56. package/build_module/vdom-nodes/html-vdom.js +0 -53
  57. package/build_module/vdom-nodes/html-vdom.js.map +0 -1
  58. package/build_module/vdom-nodes/text-vdom.d.ts +0 -11
  59. package/build_module/vdom-nodes/text-vdom.js +0 -37
  60. package/build_module/vdom-nodes/text-vdom.js.map +0 -1
  61. package/build_module/vdom-nodes/vdom.d.ts +0 -7
  62. package/build_module/vdom-nodes/vdom.js +0 -28
  63. package/build_module/vdom-nodes/vdom.js.map +0 -1
  64. package/readme.md +0 -26
package/package.json CHANGED
@@ -1,57 +1,81 @@
1
- {
2
- "name": "dothtml",
3
- "version": "6.0.0-beta.8",
4
- "description": "DOThtml is a client-side web building framework written in TypeScript.",
5
- "main": "./build_module/index.js",
6
- "exports": "./build_module/index.js",
7
- "types": "./build_module/index.d.ts",
8
- "files": [
9
- "build_module/**/*"
10
- ],
11
- "scripts": {
12
- "test": "npm run build & jest",
13
- "build": "tsc --declaration",
14
- "buildumd": "webpack"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/JSideris/DOThtml.git"
19
- },
20
- "keywords": [
21
- "html",
22
- "page",
23
- "dynamic",
24
- "javascript",
25
- "typescript",
26
- "web",
27
- "builder",
28
- "generation",
29
- "component",
30
- "framework",
31
- "spa"
32
- ],
33
- "author": "Joshua Sideris",
34
- "license": "ISC",
35
- "bugs": {
36
- "url": "https://github.com/JSideris/DOThtml/issues"
37
- },
38
- "homepage": "https://dothtml.org/",
39
- "devDependencies": {
40
- "@babel/preset-env": "^7.14.5",
41
- "@testing-library/jest-dom": "^5.13.0",
42
- "@types/jest": "^29.5.11",
43
- "@types/node": "^18.14.2",
44
- "copyfiles": "^2.4.1",
45
- "esm": "^3.2.25",
46
- "jest": "^29.5.0",
47
- "jest-environment-jsdom": "^29.5.0",
48
- "ts-jest": "^29.0.5",
49
- "ts-node": "^10.9.1",
50
- "typescript": "^5.0.2",
51
- "webpack": "^5.89.0",
52
- "webpack-cli": "^5.1.4"
53
- },
54
- "dependencies": {
55
- "dothtml-interfaces": "^0.1.34"
56
- }
57
- }
1
+ {
2
+ "name": "dothtml",
3
+ "version": "6.0.0",
4
+ "description": "DOThtml is a client-side web building framework written in TypeScript.",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "unpkg": "./dist/index.global.js",
8
+ "jsdelivr": "./dist/index.global.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/index.cjs",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist/**/*"
20
+ ],
21
+ "scripts": {
22
+ "test": "npm run build && jest",
23
+ "build": "tsup && node ../../tools/update-size.js && node ../../tools/process-docs.js",
24
+ "benchmarks": "npm run build && cd ../../benchmarks && npm run bench --",
25
+ "size": "size-limit",
26
+ "publish-beta": "npm run build && npm run size && npm publish --tag beta",
27
+ "prepublishOnly": "npm run build && npm run size"
28
+ },
29
+ "size-limit": [
30
+ {
31
+ "path": "dist/index.global.js",
32
+ "limit": "30 KB"
33
+ }
34
+ ],
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/JSideris/DOThtml.git"
38
+ },
39
+ "keywords": [
40
+ "html",
41
+ "page",
42
+ "dynamic",
43
+ "javascript",
44
+ "typescript",
45
+ "web",
46
+ "builder",
47
+ "generation",
48
+ "component",
49
+ "framework",
50
+ "spa"
51
+ ],
52
+ "author": "Joshua Sideris",
53
+ "license": "ISC",
54
+ "bugs": {
55
+ "url": "https://github.com/JSideris/DOThtml/issues"
56
+ },
57
+ "homepage": "https://dothtml.org/",
58
+ "devDependencies": {
59
+ "@babel/preset-env": "^7.14.5",
60
+ "@size-limit/preset-small-lib": "^12.1.0",
61
+ "@swc/core": "^1.15.33",
62
+ "@testing-library/jest-dom": "^5.13.0",
63
+ "@types/jest": "^29.5.11",
64
+ "@types/node": "^18.14.2",
65
+ "copyfiles": "^2.4.1",
66
+ "esm": "^3.2.25",
67
+ "jest": "^29.7.0",
68
+ "jest-environment-jsdom": "^29.7.0",
69
+ "size-limit": "^12.1.0",
70
+ "ts-jest": "^29.0.5",
71
+ "ts-loader": "^9.5.7",
72
+ "ts-node": "^10.9.1",
73
+ "tsup": "^8.5.1",
74
+ "typescript": "^5.0.2",
75
+ "webpack": "^5.89.0",
76
+ "webpack-cli": "^5.1.4"
77
+ },
78
+ "dependencies": {
79
+ "dothtml-interfaces": "*"
80
+ }
81
+ }
@@ -1 +0,0 @@
1
- export declare const DOT_VDOM_PROP_NAME = "_dotVDom";
@@ -1,2 +0,0 @@
1
- export const DOT_VDOM_PROP_NAME = "_dotVDom";
2
- //# sourceMappingURL=constants.js.map
@@ -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
@@ -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): {
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,27 +0,0 @@
1
- let tagId = 0x10000;
2
- function restyle(c) {
3
- if (c._._meta.shadowRoot) {
4
- c._._meta.shadowRoot.adoptedStyleSheets = c._._meta.sharedStyles;
5
- }
6
- }
7
- export function component(Base) {
8
- let ts = (Math.floor(performance.now() * 10000000000000)).toString(16);
9
- let tId = (tagId++).toString(16);
10
- let tagName = `dothtml-${tId}${component["_addTimestamp"] ? `-${ts}` : ""}`;
11
- return class extends Base {
12
- constructor(...args) {
13
- super(...args);
14
- if (!this._) {
15
- this._ = {};
16
- }
17
- this._.refs = {};
18
- this._.restyle = () => { restyle(this); };
19
- this._._meta = this._._meta || {};
20
- this._._meta.args = args;
21
- this._._meta.isRendered = false;
22
- this._._meta.tagName = tagName;
23
- }
24
- };
25
- }
26
- component["_addTimestamp"] = true;
27
- //# sourceMappingURL=component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/decoration/component.ts"],"names":[],"mappings":"AAEA,IAAI,KAAK,GAAG,OAAO,CAAC;AAEpB,SAAS,OAAO,CAAC,CAAa;IAC7B,IAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,EAAC;QACvB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;KAGjE;AACF,CAAC;AAID,MAAM,UAAU,SAAS,CAAC,IAAyC;IAElE,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;IAG5E,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;QACzC,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 { FrameworkItems, IComponent, IDotCss, IDotGenericElement } 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 _?: FrameworkItems;
6
- build(...args: any[]): IDotGenericElement;
7
- style?(css: IDotCss): void;
8
- creating?(...args: any[]): void;
9
- ready?(): void;
10
- deleting?(): void;
11
- deleted?(): void;
12
- built?(): void;
13
- };
14
- };
@@ -1,32 +0,0 @@
1
- export function useStyles(styleCallback) {
2
- let sharedStyles = new CSSStyleSheet();
3
- if (typeof styleCallback == "string") {
4
- sharedStyles.replaceSync(styleCallback);
5
- }
6
- else {
7
- let finalStylesheet = "";
8
- let css = null;
9
- let styles = styleCallback(css);
10
- if (typeof styles == "string") {
11
- finalStylesheet = styles;
12
- }
13
- else {
14
- }
15
- sharedStyles.replaceSync(finalStylesheet);
16
- }
17
- return function (Base) {
18
- return class extends Base {
19
- constructor(...args) {
20
- super(...args);
21
- if (!this._) {
22
- this._ = { _meta: {} };
23
- }
24
- if (!this._._meta.sharedStyles) {
25
- this._._meta.sharedStyles = [];
26
- }
27
- this._._meta.sharedStyles.push(sharedStyles);
28
- }
29
- };
30
- };
31
- }
32
- //# sourceMappingURL=use-styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-styles.js","sourceRoot":"","sources":["../../src/decoration/use-styles.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,SAAS,CAAC,aAAa;IAEtC,IAAI,YAAY,GAAG,IAAI,aAAa,EAAE,CAAC;IAEvC,IAAG,OAAO,aAAa,IAAI,QAAQ,EAAC;QACnC,YAAY,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;KACxC;SACG;QACH,IAAI,eAAe,GAAG,EAAE,CAAC;QACzB,IAAI,GAAG,GAAG,IAAI,CAAC;QACf,IAAI,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;QAEhC,IAAG,OAAO,MAAM,IAAI,QAAQ,EAAC;YAE5B,eAAe,GAAG,MAAM,CAAC;SACzB;aACG;SAGH;QAED,YAAY,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;KAC1C;IAED,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"}
@@ -1,3 +0,0 @@
1
- import { IDotCore } from "dothtml-interfaces";
2
- declare const dot: IDotCore;
3
- export default dot;