@lbaz/tetr 0.0.39 → 0.0.40

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 (57) hide show
  1. package/dist/cdk/index.d.ts +1 -0
  2. package/dist/cdk/index.js +2 -0
  3. package/dist/cdk/index.js.map +1 -0
  4. package/dist/constants/assets.d.ts +8 -0
  5. package/dist/constants/assets.js +9 -0
  6. package/dist/constants/assets.js.map +1 -0
  7. package/dist/constants/definitions-type.d.ts +36 -0
  8. package/dist/constants/definitions-type.js +37 -0
  9. package/dist/constants/definitions-type.js.map +1 -0
  10. package/dist/constants/index.d.ts +4 -39
  11. package/dist/constants/index.js +4 -48
  12. package/dist/constants/index.js.map +1 -1
  13. package/dist/constants/styles.d.ts +4 -0
  14. package/dist/constants/styles.js +16 -0
  15. package/dist/constants/styles.js.map +1 -0
  16. package/dist/constants/themes.d.ts +2 -0
  17. package/dist/constants/themes.js +2 -0
  18. package/dist/constants/themes.js.map +1 -0
  19. package/dist/core/builders/index.d.ts +2 -0
  20. package/dist/core/builders/index.js +3 -0
  21. package/dist/core/builders/index.js.map +1 -0
  22. package/dist/core/builders/init-page-head.builder.d.ts +10 -0
  23. package/dist/core/builders/init-page-head.builder.js +53 -0
  24. package/dist/core/builders/init-page-head.builder.js.map +1 -0
  25. package/dist/core/builders/init-page.builder.d.ts +10 -0
  26. package/dist/core/builders/init-page.builder.js +24 -0
  27. package/dist/core/builders/init-page.builder.js.map +1 -0
  28. package/dist/core/builders/init-project.builder.d.ts +4 -0
  29. package/dist/core/builders/init-project.builder.js +14 -0
  30. package/dist/core/builders/init-project.builder.js.map +1 -0
  31. package/dist/core/factories/index.d.ts +1 -0
  32. package/dist/core/factories/index.js +2 -0
  33. package/dist/core/factories/index.js.map +1 -0
  34. package/dist/core/factories/init-page.factory.d.ts +9 -0
  35. package/dist/core/factories/init-page.factory.js +18 -0
  36. package/dist/core/factories/init-page.factory.js.map +1 -0
  37. package/dist/core/index.d.ts +2 -0
  38. package/dist/core/index.js +2 -0
  39. package/dist/core/index.js.map +1 -1
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +1 -0
  42. package/dist/index.js.map +1 -1
  43. package/dist/types/builder.d.ts +3 -0
  44. package/dist/types/builder.js +2 -0
  45. package/dist/types/builder.js.map +1 -0
  46. package/dist/types/chunk.d.ts +1 -0
  47. package/dist/types/data.d.ts +0 -50
  48. package/dist/types/index.d.ts +3 -0
  49. package/dist/types/index.js +3 -0
  50. package/dist/types/index.js.map +1 -1
  51. package/dist/types/page.d.ts +52 -0
  52. package/dist/types/page.js +2 -0
  53. package/dist/types/page.js.map +1 -0
  54. package/dist/types/project.d.ts +10 -0
  55. package/dist/types/project.js +2 -0
  56. package/dist/types/project.js.map +1 -0
  57. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export * from './transpiler';
@@ -0,0 +1,2 @@
1
+ export * from './transpiler';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cdk/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const ASSET_TYPE: {
2
+ readonly js: "js";
3
+ readonly css: "css";
4
+ };
5
+ export declare const ASSET_INJECTS_PLACE: {
6
+ readonly head: "head";
7
+ readonly body: "body";
8
+ };
@@ -0,0 +1,9 @@
1
+ export const ASSET_TYPE = {
2
+ js: 'js',
3
+ css: 'css',
4
+ };
5
+ export const ASSET_INJECTS_PLACE = {
6
+ head: 'head',
7
+ body: 'body'
8
+ };
9
+ //# sourceMappingURL=assets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/constants/assets.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ export declare const DEFINITION_TYPES: {
2
+ readonly String: "String";
3
+ readonly Color: "Color";
4
+ readonly Size: "Size";
5
+ readonly Email: "Email";
6
+ readonly Select: "Select";
7
+ readonly NavigationLink: "NavigationLink";
8
+ readonly ContentSrc: "ContentSrc";
9
+ readonly RedirectLink: "RedirectLink";
10
+ readonly BoxModelDirections: "BoxModelDirections";
11
+ };
12
+ export declare const DATA_TYPES: {
13
+ readonly DICT: "DICT";
14
+ readonly LIST: "LIST";
15
+ };
16
+ export declare const FIELDS: {
17
+ readonly descriptionValue: "descriptionValue";
18
+ readonly imageAlt: "imageAlt";
19
+ readonly imageUrl: "imageUrl";
20
+ readonly imageWidth: "imageWidth";
21
+ readonly imageHeight: "imageHeight";
22
+ readonly nameValue: "nameValue";
23
+ readonly contentValue: "contentValue";
24
+ readonly navigationLink: "navigationLink";
25
+ readonly linkHref: "linkHref";
26
+ readonly linkTarget: "linkTarget";
27
+ readonly tagValue: "tagValue";
28
+ readonly backgroundUrl: "backgroundUrl";
29
+ readonly backgroundSize: "backgroundSize";
30
+ readonly backgroundColor: "backgroundColor";
31
+ readonly fontSize: "fontSize";
32
+ readonly innerOffset: "innerOffset";
33
+ readonly outerOffset: "outerOffset";
34
+ readonly radius: "radius";
35
+ readonly color: "color";
36
+ };
@@ -0,0 +1,37 @@
1
+ export const DEFINITION_TYPES = {
2
+ 'String': 'String',
3
+ "Color": "Color",
4
+ "Size": "Size",
5
+ "Email": "Email",
6
+ "Select": "Select",
7
+ "NavigationLink": "NavigationLink",
8
+ "ContentSrc": "ContentSrc",
9
+ "RedirectLink": "RedirectLink",
10
+ "BoxModelDirections": 'BoxModelDirections',
11
+ };
12
+ export const DATA_TYPES = {
13
+ DICT: "DICT",
14
+ LIST: "LIST"
15
+ };
16
+ export const FIELDS = {
17
+ 'descriptionValue': 'descriptionValue',
18
+ 'imageAlt': "imageAlt",
19
+ 'imageUrl': "imageUrl",
20
+ 'imageWidth': "imageWidth",
21
+ 'imageHeight': "imageHeight",
22
+ 'nameValue': "nameValue",
23
+ 'contentValue': "contentValue",
24
+ 'navigationLink': "navigationLink",
25
+ 'linkHref': 'linkHref',
26
+ 'linkTarget': "linkTarget",
27
+ 'tagValue': "tagValue",
28
+ 'backgroundUrl': "backgroundUrl",
29
+ 'backgroundSize': "backgroundSize",
30
+ 'backgroundColor': "backgroundColor",
31
+ 'fontSize': "fontSize",
32
+ 'innerOffset': 'innerOffset',
33
+ 'outerOffset': 'outerOffset',
34
+ 'radius': "radius",
35
+ 'color': "color",
36
+ };
37
+ //# sourceMappingURL=definitions-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions-type.js","sourceRoot":"","sources":["../../src/constants/definitions-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,QAAQ;IAClB,gBAAgB,EAAE,gBAAgB;IAClC,YAAY,EAAE,YAAY;IAC1B,cAAc,EAAE,cAAc;IAC9B,oBAAoB,EAAE,oBAAoB;CAClC,CAAC;AAEX,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,kBAAkB,EAAE,kBAAkB;IACtC,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IAExB,cAAc,EAAE,cAAc;IAC9B,gBAAgB,EAAE,gBAAgB;IAClC,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAE1B,UAAU,EAAE,UAAU;IAEtB,eAAe,EAAE,eAAe;IAChC,gBAAgB,EAAE,gBAAgB;IAClC,iBAAiB,EAAE,iBAAiB;IAEpC,UAAU,EAAE,UAAU;IAEtB,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAE5B,QAAQ,EAAE,QAAQ;IAElB,OAAO,EAAE,OAAO;CAER,CAAC"}
@@ -1,39 +1,4 @@
1
- import { CommonEditableBlockWrapStyles } from "../types";
2
- export declare const DEFINITION_TYPES: {
3
- readonly String: "String";
4
- readonly Color: "Color";
5
- readonly Size: "Size";
6
- readonly Email: "Email";
7
- readonly Select: "Select";
8
- readonly NavigationLink: "NavigationLink";
9
- readonly ContentSrc: "ContentSrc";
10
- readonly RedirectLink: "RedirectLink";
11
- readonly BoxModelDirections: "BoxModelDirections";
12
- };
13
- export declare const DATA_TYPES: {
14
- readonly DICT: "DICT";
15
- readonly LIST: "LIST";
16
- };
17
- export declare const FIELDS: {
18
- readonly descriptionValue: "descriptionValue";
19
- readonly imageAlt: "imageAlt";
20
- readonly imageUrl: "imageUrl";
21
- readonly imageWidth: "imageWidth";
22
- readonly imageHeight: "imageHeight";
23
- readonly nameValue: "nameValue";
24
- readonly contentValue: "contentValue";
25
- readonly navigationLink: "navigationLink";
26
- readonly linkHref: "linkHref";
27
- readonly linkTarget: "linkTarget";
28
- readonly tagValue: "tagValue";
29
- readonly backgroundUrl: "backgroundUrl";
30
- readonly backgroundSize: "backgroundSize";
31
- readonly backgroundColor: "backgroundColor";
32
- readonly fontSize: "fontSize";
33
- readonly innerOffset: "innerOffset";
34
- readonly outerOffset: "outerOffset";
35
- readonly radius: "radius";
36
- readonly color: "color";
37
- };
38
- export declare const COMMON_EDITABLE_WRAP_STYLES: CommonEditableBlockWrapStyles;
39
- export declare const commonStylesTemplateAlias = "c_s_t_a";
1
+ export * from './assets';
2
+ export * from './definitions-type';
3
+ export * from './styles';
4
+ export * from './themes';
@@ -1,49 +1,5 @@
1
- export const DEFINITION_TYPES = {
2
- 'String': 'String',
3
- "Color": "Color",
4
- "Size": "Size",
5
- "Email": "Email",
6
- "Select": "Select",
7
- "NavigationLink": "NavigationLink",
8
- "ContentSrc": "ContentSrc",
9
- "RedirectLink": "RedirectLink",
10
- "BoxModelDirections": 'BoxModelDirections',
11
- };
12
- export const DATA_TYPES = {
13
- DICT: "DICT",
14
- LIST: "LIST"
15
- };
16
- export const FIELDS = {
17
- 'descriptionValue': 'descriptionValue',
18
- 'imageAlt': "imageAlt",
19
- 'imageUrl': "imageUrl",
20
- 'imageWidth': "imageWidth",
21
- 'imageHeight': "imageHeight",
22
- 'nameValue': "nameValue",
23
- 'contentValue': "contentValue",
24
- 'navigationLink': "navigationLink",
25
- 'linkHref': 'linkHref',
26
- 'linkTarget': "linkTarget",
27
- 'tagValue': "tagValue",
28
- 'backgroundUrl': "backgroundUrl",
29
- 'backgroundSize': "backgroundSize",
30
- 'backgroundColor': "backgroundColor",
31
- 'fontSize': "fontSize",
32
- 'innerOffset': 'innerOffset',
33
- 'outerOffset': 'outerOffset',
34
- 'radius': "radius",
35
- 'color': "color",
36
- };
37
- export const COMMON_EDITABLE_WRAP_STYLES = {
38
- padding: '',
39
- color: '',
40
- backgroundColor: '',
41
- backgroundImage: '',
42
- backgroundSize: '',
43
- backgroundPosition: '',
44
- backgroundRepeat: '',
45
- backgroundAttachment: '',
46
- textAlign: '',
47
- };
48
- export const commonStylesTemplateAlias = 'c_s_t_a';
1
+ export * from './assets';
2
+ export * from './definitions-type';
3
+ export * from './styles';
4
+ export * from './themes';
49
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,QAAQ;IAClB,gBAAgB,EAAE,gBAAgB;IAClC,YAAY,EAAE,YAAY;IAC1B,cAAc,EAAE,cAAc;IAC9B,oBAAoB,EAAE,oBAAoB;CAClC,CAAC;AAEX,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,kBAAkB,EAAE,kBAAkB;IACtC,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IAExB,cAAc,EAAE,cAAc;IAC9B,gBAAgB,EAAE,gBAAgB;IAClC,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAE1B,UAAU,EAAE,UAAU;IAEtB,eAAe,EAAE,eAAe;IAChC,gBAAgB,EAAE,gBAAgB;IAClC,iBAAiB,EAAE,iBAAiB;IAEpC,UAAU,EAAE,UAAU;IAEtB,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAE5B,QAAQ,EAAE,QAAQ;IAElB,OAAO,EAAE,OAAO;CAER,CAAC;AAEX,MAAM,CAAC,MAAM,2BAA2B,GAAkC;IACxE,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;IACT,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,EAAE;IACnB,cAAc,EAAE,EAAE;IAClB,kBAAkB,EAAE,EAAE;IACtB,gBAAgB,EAAE,EAAE;IACpB,oBAAoB,EAAE,EAAE;IACxB,SAAS,EAAE,EAAE;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { CommonEditableBlockWrapStyles } from "../types";
2
+ export declare const COMMON_EDITABLE_WRAP_STYLES: CommonEditableBlockWrapStyles;
3
+ export declare const commonStylesTemplateAlias = "c_s_t_a";
4
+ export declare const DEFAULT_PAGE_RESET_STYLES: string;
@@ -0,0 +1,16 @@
1
+ export const COMMON_EDITABLE_WRAP_STYLES = {
2
+ padding: '',
3
+ color: '',
4
+ backgroundColor: '',
5
+ backgroundImage: '',
6
+ backgroundSize: '',
7
+ backgroundPosition: '',
8
+ backgroundRepeat: '',
9
+ backgroundAttachment: '',
10
+ textAlign: '',
11
+ };
12
+ export const commonStylesTemplateAlias = 'c_s_t_a';
13
+ export const DEFAULT_PAGE_RESET_STYLES = `
14
+ body,html{margin:0;padding:0;box-sizing:border-box;width:100%;height:100%}*,:after,:before{box-sizing:inherit}
15
+ `;
16
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/constants/styles.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,2BAA2B,GAAkC;IACxE,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;IACT,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,EAAE;IACnB,cAAc,EAAE,EAAE;IAClB,kBAAkB,EAAE,EAAE;IACtB,gBAAgB,EAAE,EAAE;IACpB,oBAAoB,EAAE,EAAE;IACxB,SAAS,EAAE,EAAE;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAEnD,MAAM,CAAC,MAAM,yBAAyB,GAAW;;CAEhD,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { PageThemeRecord } from "../types";
2
+ export declare const DEFAULT_THEME: Array<PageThemeRecord>;
@@ -0,0 +1,2 @@
1
+ export const DEFAULT_THEME = [];
2
+ //# sourceMappingURL=themes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/constants/themes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAA2B,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './init-page.builder';
2
+ export * from './init-page-head.builder';
@@ -0,0 +1,3 @@
1
+ export * from './init-page.builder';
2
+ export * from './init-page-head.builder';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/builders/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { EntityBuilder, PageAsset, PageHead, PageMeta, PageThemeRecord } from "../../types";
2
+ export declare class InitPageHeadBuilder implements EntityBuilder<PageHead> {
3
+ private readonly title;
4
+ private readonly meta;
5
+ private readonly theme;
6
+ private readonly styles;
7
+ private readonly scripts;
8
+ constructor(title: string, meta?: Array<PageMeta>, theme?: Array<PageThemeRecord>, styles?: Array<PageAsset>, scripts?: Array<PageAsset>);
9
+ build(): PageHead;
10
+ }
@@ -0,0 +1,53 @@
1
+ import { ASSET_INJECTS_PLACE, ASSET_TYPE, DEFAULT_PAGE_RESET_STYLES, DEFAULT_THEME } from "../../constants";
2
+ export class InitPageHeadBuilder {
3
+ title;
4
+ meta;
5
+ theme;
6
+ styles;
7
+ scripts;
8
+ constructor(title, meta = [], theme = [], styles = [], scripts = []) {
9
+ this.title = title;
10
+ this.meta = meta;
11
+ this.theme = theme;
12
+ this.styles = styles;
13
+ this.scripts = scripts;
14
+ }
15
+ build() {
16
+ return {
17
+ title: this.title,
18
+ meta: [
19
+ {
20
+ name: 'viewport',
21
+ content: 'width=device-width, initial-scale=1.0',
22
+ property: null,
23
+ hiddenToEdit: true
24
+ },
25
+ ...(this.meta ?? [])
26
+ ],
27
+ theme: [
28
+ ...DEFAULT_THEME,
29
+ ...(this.theme ?? [])
30
+ ],
31
+ styles: [
32
+ {
33
+ type: ASSET_TYPE.css,
34
+ injectPlace: ASSET_INJECTS_PLACE.head,
35
+ content: DEFAULT_PAGE_RESET_STYLES,
36
+ link: null
37
+ },
38
+ ...(this.styles ?? [])
39
+ ],
40
+ scripts: [
41
+ {
42
+ type: ASSET_TYPE.js,
43
+ injectPlace: ASSET_INJECTS_PLACE.body,
44
+ content: null,
45
+ link: null,
46
+ alias: 'EVENT_CONTROLLER'
47
+ },
48
+ ...(this.scripts ?? [])
49
+ ],
50
+ };
51
+ }
52
+ }
53
+ //# sourceMappingURL=init-page-head.builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-page-head.builder.js","sourceRoot":"","sources":["../../../src/core/builders/init-page-head.builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAE,UAAU,EAAE,yBAAyB,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE1G,MAAM,OAAO,mBAAmB;IAEX;IACA;IACA;IACA;IACA;IALnB,YACmB,KAAa,EACb,OAAwB,EAAE,EAC1B,QAAgC,EAAE,EAClC,SAA2B,EAAE,EAC7B,UAA4B,EAAE;QAJ9B,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAsB;QAC1B,UAAK,GAAL,KAAK,CAA6B;QAClC,WAAM,GAAN,MAAM,CAAuB;QAC7B,YAAO,GAAP,OAAO,CAAuB;IAC9C,CAAC;IAEJ,KAAK;QACH,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE;gBACJ;oBACE,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE,uCAAuC;oBAChD,QAAQ,EAAE,IAAI;oBACd,YAAY,EAAE,IAAI;iBACnB;gBACD,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;aACrB;YACD,KAAK,EAAE;gBACL,GAAG,aAAa;gBAChB,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;aACtB;YACD,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,UAAU,CAAC,GAAG;oBACpB,WAAW,EAAE,mBAAmB,CAAC,IAAI;oBACrC,OAAO,EAAE,yBAAyB;oBAClC,IAAI,EAAE,IAAI;iBACX;gBACD,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;aACvB;YACD,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,UAAU,CAAC,EAAE;oBACnB,WAAW,EAAE,mBAAmB,CAAC,IAAI;oBACrC,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,IAAI;oBACV,KAAK,EAAE,kBAAkB;iBAC1B;gBACD,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;aACxB;SACF,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ import { EntityBuilder, Page, PageBody, PageHead, PageId, PageName, PagePath } from "../../types";
2
+ export declare class InitPageBuilder implements EntityBuilder<Page> {
3
+ private readonly id;
4
+ private readonly name;
5
+ private readonly path;
6
+ private readonly head;
7
+ private readonly body;
8
+ constructor(id: PageId, name: PageName, path: PagePath, head: PageHead, body?: Array<PageBody>);
9
+ build(): Page;
10
+ }
@@ -0,0 +1,24 @@
1
+ export class InitPageBuilder {
2
+ id;
3
+ name;
4
+ path;
5
+ head;
6
+ body;
7
+ constructor(id, name, path, head, body = []) {
8
+ this.id = id;
9
+ this.name = name;
10
+ this.path = path;
11
+ this.head = head;
12
+ this.body = body;
13
+ }
14
+ build() {
15
+ return {
16
+ id: this.id,
17
+ name: this.name,
18
+ path: this.path,
19
+ head: this.head,
20
+ body: this.body
21
+ };
22
+ }
23
+ }
24
+ //# sourceMappingURL=init-page.builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-page.builder.js","sourceRoot":"","sources":["../../../src/core/builders/init-page.builder.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,eAAe;IAEP;IACA;IACA;IACA;IACA;IALnB,YACmB,EAAU,EACV,IAAc,EACd,IAAc,EACd,IAAc,EACd,OAAwB,EAAE;QAJ1B,OAAE,GAAF,EAAE,CAAQ;QACV,SAAI,GAAJ,IAAI,CAAU;QACd,SAAI,GAAJ,IAAI,CAAU;QACd,SAAI,GAAJ,IAAI,CAAU;QACd,SAAI,GAAJ,IAAI,CAAsB;IAC1C,CAAC;IACJ,KAAK;QACH,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,4 @@
1
+ import { EntityBuilder, ProjectSourceData } from "../../types";
2
+ export declare class InitPageBuilder implements EntityBuilder<ProjectSourceData> {
3
+ build(): ProjectSourceData;
4
+ }
@@ -0,0 +1,14 @@
1
+ export class InitPageBuilder {
2
+ build() {
3
+ return {
4
+ robots: [
5
+ {
6
+ name: 'User-agent',
7
+ content: '*'
8
+ }
9
+ ],
10
+ pages: []
11
+ };
12
+ }
13
+ }
14
+ //# sourceMappingURL=init-project.builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-project.builder.js","sourceRoot":"","sources":["../../../src/core/builders/init-project.builder.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,eAAe;IAC1B,KAAK;QACH,OAAO;YACL,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,YAAY;oBAClB,OAAO,EAAE,GAAG;iBACb;aACF;YACD,KAAK,EAAE,EAAE;SACV,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1 @@
1
+ export * from './init-page.factory';
@@ -0,0 +1,2 @@
1
+ export * from './init-page.factory';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { EntityBuilder, Page, PageId, PageName, PagePath, PageTitle } from "../../types";
2
+ export declare class InitPageFactory implements EntityBuilder<Page> {
3
+ private readonly title;
4
+ private readonly id;
5
+ private readonly name;
6
+ private readonly path;
7
+ constructor(title: PageTitle, id: PageId, name: PageName, path: PagePath);
8
+ build(): Page;
9
+ }
@@ -0,0 +1,18 @@
1
+ import { InitPageBuilder, InitPageHeadBuilder } from "../builders";
2
+ export class InitPageFactory {
3
+ title;
4
+ id;
5
+ name;
6
+ path;
7
+ constructor(title, id, name, path) {
8
+ this.title = title;
9
+ this.id = id;
10
+ this.name = name;
11
+ this.path = path;
12
+ }
13
+ build() {
14
+ const head = new InitPageHeadBuilder(this.title).build();
15
+ return new InitPageBuilder(this.id, this.name, this.path, head).build();
16
+ }
17
+ }
18
+ //# sourceMappingURL=init-page.factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-page.factory.js","sourceRoot":"","sources":["../../../src/core/factories/init-page.factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAEjE,MAAM,OAAO,eAAe;IAEP;IACA;IACA;IACA;IAJnB,YACmB,KAAgB,EAChB,EAAU,EACV,IAAc,EACd,IAAc;QAHd,UAAK,GAAL,KAAK,CAAW;QAChB,OAAE,GAAF,EAAE,CAAQ;QACV,SAAI,GAAJ,IAAI,CAAU;QACd,SAAI,GAAJ,IAAI,CAAU;IAEjC,CAAC;IACD,KAAK;QACH,MAAM,IAAI,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;QACzD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;IAC1E,CAAC;CACF"}
@@ -1,3 +1,5 @@
1
1
  export * from './transpiler';
2
2
  export * from './object-seeder';
3
3
  export * from './common-wrap-styles-extractor';
4
+ export * from './builders';
5
+ export * from './factories';
@@ -1,4 +1,6 @@
1
1
  export * from './transpiler';
2
2
  export * from './object-seeder';
3
3
  export * from './common-wrap-styles-extractor';
4
+ export * from './builders';
5
+ export * from './factories';
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './core';
2
2
  export * from './types';
3
3
  export * from './constants';
4
+ export * from './cdk';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './core';
2
2
  export * from './types';
3
3
  export * from './constants';
4
+ export * from './cdk';
4
5
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ export interface EntityBuilder<T> {
2
+ build: () => T;
3
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/types/builder.ts"],"names":[],"mappings":""}
@@ -3,6 +3,7 @@ import { DataDefinition, PossibleDataPayload } from "./data";
3
3
  export type ChunkUniqId = string;
4
4
  export interface BaseChunk {
5
5
  styles?: string;
6
+ js?: string;
6
7
  }
7
8
  export interface Chunk extends BaseChunk {
8
9
  uniqId: ChunkUniqId;
@@ -30,53 +30,3 @@ export interface CommonEditableBlockWrapStyles {
30
30
  backgroundAttachment: string | null;
31
31
  textAlign: string | null;
32
32
  }
33
- export interface PageBody {
34
- id: string;
35
- uniqId: string;
36
- isVisible: any;
37
- commonEditableBlockWrapStyles?: CommonEditableBlockWrapStyles;
38
- data?: Data;
39
- chunks?: {
40
- [key: string]: {
41
- data: Data | Array<Data>;
42
- styles?: string;
43
- };
44
- };
45
- }
46
- export type PageTitle = string;
47
- export interface PageThemeRecord {
48
- fieldName: string;
49
- type: string;
50
- varName: string;
51
- value: string;
52
- }
53
- export interface PageMeta {
54
- name?: string;
55
- property?: string;
56
- content: string;
57
- }
58
- export interface PageHead {
59
- title: PageTitle;
60
- meta: Array<PageMeta>;
61
- theme: Array<PageThemeRecord>;
62
- }
63
- export interface Page {
64
- id: string;
65
- name: string;
66
- path: string;
67
- head: {
68
- title: string;
69
- meta: Array<PageMeta>;
70
- styles: Array<string>;
71
- scripts: Array<string>;
72
- includes: {
73
- styles: Array<string>;
74
- scripts: Array<string>;
75
- };
76
- };
77
- body: Array<PageBody>;
78
- }
79
- export interface SiteSourceData {
80
- robots?: string;
81
- pages: Array<Page>;
82
- }
@@ -2,3 +2,6 @@ export * from './template';
2
2
  export * from './block';
3
3
  export * from './chunk';
4
4
  export * from './data';
5
+ export * from './builder';
6
+ export * from './page';
7
+ export * from './project';
@@ -2,4 +2,7 @@ export * from './template';
2
2
  export * from './block';
3
3
  export * from './chunk';
4
4
  export * from './data';
5
+ export * from './builder';
6
+ export * from './page';
7
+ export * from './project';
5
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { ASSET_INJECTS_PLACE, ASSET_TYPE } from "../constants";
2
+ import { CommonEditableBlockWrapStyles, Data } from "./data";
3
+ export type PageId = string;
4
+ export type PageName = string;
5
+ export type PagePath = string;
6
+ export interface PageBody {
7
+ id: PageId;
8
+ uniqId: string;
9
+ isVisible: any;
10
+ commonEditableBlockWrapStyles?: CommonEditableBlockWrapStyles;
11
+ data?: Data;
12
+ chunks?: {
13
+ [key: string]: {
14
+ data: Data | Array<Data>;
15
+ styles?: string;
16
+ };
17
+ };
18
+ }
19
+ export type PageTitle = string;
20
+ export interface PageThemeRecord {
21
+ fieldName: string;
22
+ type: string;
23
+ varName: string;
24
+ value: string;
25
+ }
26
+ export interface PageMeta {
27
+ name: string | null;
28
+ property: string | null;
29
+ content: string;
30
+ hiddenToEdit: boolean;
31
+ }
32
+ export interface PageAsset {
33
+ type: keyof typeof ASSET_TYPE;
34
+ injectPlace: keyof typeof ASSET_INJECTS_PLACE;
35
+ content: string | null | undefined;
36
+ link: string | null | undefined;
37
+ alias?: string | null | undefined;
38
+ }
39
+ export interface PageHead {
40
+ title: PageTitle;
41
+ meta: Array<PageMeta>;
42
+ theme: Array<PageThemeRecord>;
43
+ styles: Array<PageAsset>;
44
+ scripts: Array<PageAsset>;
45
+ }
46
+ export interface Page {
47
+ id: PageId;
48
+ name: PageName;
49
+ path: PagePath;
50
+ head: PageHead;
51
+ body: Array<PageBody>;
52
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/types/page.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { Page } from "./page";
2
+ export interface ProjectRobotFileEntity {
3
+ name: string;
4
+ content: string;
5
+ }
6
+ export interface ProjectSourceData {
7
+ robots?: Array<ProjectRobotFileEntity>;
8
+ projectName?: string;
9
+ pages: Array<Page>;
10
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/types/project.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lbaz/tetr",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "Template transpiler",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",