dothtml 6.0.0-beta.9 → 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 (67) 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 -43
  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 -19
  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 -534
  27. package/build_module/dot.js.map +0 -1
  28. package/build_module/helpers/render-css.d.ts +0 -2
  29. package/build_module/helpers/render-css.js +0 -19
  30. package/build_module/helpers/render-css.js.map +0 -1
  31. package/build_module/helpers.d.ts +0 -2
  32. package/build_module/helpers.js +0 -49
  33. package/build_module/helpers.js.map +0 -1
  34. package/build_module/index.d.ts +0 -7
  35. package/build_module/index.js +0 -5
  36. package/build_module/index.js.map +0 -1
  37. package/build_module/reactive.d.ts +0 -37
  38. package/build_module/reactive.js +0 -120
  39. package/build_module/reactive.js.map +0 -1
  40. package/build_module/v-dom-node.d.ts +0 -0
  41. package/build_module/v-dom-node.js +0 -1
  42. package/build_module/v-dom-node.js.map +0 -1
  43. package/build_module/vdom-nodes/collection-vdom.d.ts +0 -24
  44. package/build_module/vdom-nodes/collection-vdom.js +0 -154
  45. package/build_module/vdom-nodes/collection-vdom.js.map +0 -1
  46. package/build_module/vdom-nodes/component-vdom.d.ts +0 -14
  47. package/build_module/vdom-nodes/component-vdom.js +0 -61
  48. package/build_module/vdom-nodes/component-vdom.js.map +0 -1
  49. package/build_module/vdom-nodes/conditional-vdom.d.ts +0 -14
  50. package/build_module/vdom-nodes/conditional-vdom.js +0 -97
  51. package/build_module/vdom-nodes/conditional-vdom.js.map +0 -1
  52. package/build_module/vdom-nodes/container-vdom.d.ts +0 -23
  53. package/build_module/vdom-nodes/container-vdom.js +0 -85
  54. package/build_module/vdom-nodes/container-vdom.js.map +0 -1
  55. package/build_module/vdom-nodes/element-vdom.d.ts +0 -18
  56. package/build_module/vdom-nodes/element-vdom.js +0 -88
  57. package/build_module/vdom-nodes/element-vdom.js.map +0 -1
  58. package/build_module/vdom-nodes/html-vdom.d.ts +0 -13
  59. package/build_module/vdom-nodes/html-vdom.js +0 -53
  60. package/build_module/vdom-nodes/html-vdom.js.map +0 -1
  61. package/build_module/vdom-nodes/text-vdom.d.ts +0 -11
  62. package/build_module/vdom-nodes/text-vdom.js +0 -37
  63. package/build_module/vdom-nodes/text-vdom.js.map +0 -1
  64. package/build_module/vdom-nodes/vdom.d.ts +0 -7
  65. package/build_module/vdom-nodes/vdom.js +0 -28
  66. package/build_module/vdom-nodes/vdom.js.map +0 -1
  67. package/readme.md +0 -26
package/package.json CHANGED
@@ -1,57 +1,81 @@
1
- {
2
- "name": "dothtml",
3
- "version": "6.0.0-beta.9",
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, 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
- let adoptedStyles = [];
15
- for (let i = 0; i < styles.length; i++) {
16
- adoptedStyles.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
- //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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"}
@@ -1,3 +0,0 @@
1
- import { IDotCore } from "dothtml-interfaces";
2
- declare const dot: IDotCore;
3
- export default dot;