@ng-doc/builder 15.2.0 → 15.3.2

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 (103) hide show
  1. package/engine/.cache/apps/ng-doc/src/app/docs/content/api-templating/ng-doc.page.js +40 -8
  2. package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/demo/ng-doc.page.js +51 -0
  3. package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/ng-doc.category.js +41 -0
  4. package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/playground/ng-doc.page.js +50 -0
  5. package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/templating/ng-doc.page.js +51 -0
  6. package/engine/.cache/apps/ng-doc/src/app/docs/content/keywords/ng-doc.page.js +40 -8
  7. package/engine/.cache/apps/ng-doc/src/app/docs/content/ng-doc.category.js +28 -5
  8. package/engine/.cache/apps/ng-doc/src/app/docs/customization/layout/ng-doc.page.js +42 -0
  9. package/engine/.cache/apps/ng-doc/src/app/docs/customization/ng-doc.category.js +28 -5
  10. package/engine/.cache/apps/ng-doc/src/app/docs/customization/themes/ng-doc.page.js +40 -8
  11. package/engine/.cache/apps/ng-doc/src/app/docs/customization/type-controls/ng-doc.page.js +43 -0
  12. package/engine/.cache/apps/ng-doc/src/app/docs/develop/ng-doc.page.js +39 -10
  13. package/engine/.cache/apps/ng-doc/src/app/docs/entities/api/ng-doc.page.js +40 -8
  14. package/engine/.cache/apps/ng-doc/src/app/docs/entities/category/ng-doc.page.js +40 -8
  15. package/engine/.cache/apps/ng-doc/src/app/docs/entities/dependencies/ng-doc.page.js +40 -8
  16. package/engine/.cache/apps/ng-doc/src/app/docs/entities/ng-doc.category.js +28 -5
  17. package/engine/.cache/apps/ng-doc/src/app/docs/entities/page/ng-doc.page.js +43 -11
  18. package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/configuration/ng-doc.page.js +39 -8
  19. package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/installation/ng-doc.page.js +39 -8
  20. package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/ng-doc.category.js +29 -6
  21. package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/roadmap/ng-doc.page.js +39 -8
  22. package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/what-is-ng-doc/ng-doc.page.js +38 -7
  23. package/engine/.cache/apps/ng-doc/src/app/docs/ng-doc.api.js +50 -27
  24. package/engine/actions/playground.action.d.ts +2 -2
  25. package/engine/actions/playground.action.js +12 -11
  26. package/engine/actions/playground.action.js.map +1 -1
  27. package/engine/builder.d.ts +2 -2
  28. package/engine/builder.js +20 -8
  29. package/engine/builder.js.map +1 -1
  30. package/engine/entities/abstractions/file.entity.js.map +1 -1
  31. package/engine/entities/abstractions/import.cjs +9 -0
  32. package/engine/entities/abstractions/source-file.entity.d.ts +4 -0
  33. package/engine/entities/abstractions/source-file.entity.js +4 -0
  34. package/engine/entities/abstractions/source-file.entity.js.map +1 -1
  35. package/engine/entities/api.entity.d.ts +1 -0
  36. package/engine/entities/api.entity.js +2 -1
  37. package/engine/entities/api.entity.js.map +1 -1
  38. package/engine/entities/category.entity.d.ts +1 -0
  39. package/engine/entities/category.entity.js +4 -0
  40. package/engine/entities/category.entity.js.map +1 -1
  41. package/engine/entities/dependencies.entity.d.ts +13 -3
  42. package/engine/entities/dependencies.entity.js +61 -63
  43. package/engine/entities/dependencies.entity.js.map +1 -1
  44. package/engine/entities/index.d.ts +0 -1
  45. package/engine/entities/index.js +0 -1
  46. package/engine/entities/index.js.map +1 -1
  47. package/engine/entities/page.entity.d.ts +1 -4
  48. package/engine/entities/page.entity.js +7 -15
  49. package/engine/entities/page.entity.js.map +1 -1
  50. package/engine/template-filters.d.ts +2 -1
  51. package/engine/template-filters.js +8 -1
  52. package/engine/template-filters.js.map +1 -1
  53. package/engine/variables.d.ts +0 -2
  54. package/engine/variables.js +1 -3
  55. package/engine/variables.js.map +1 -1
  56. package/helpers/build-assets.js +2 -0
  57. package/helpers/build-assets.js.map +1 -1
  58. package/helpers/entity-type.d.ts +5 -4
  59. package/helpers/entity-type.js +10 -9
  60. package/helpers/entity-type.js.map +1 -1
  61. package/helpers/get-component-asset.d.ts +10 -0
  62. package/helpers/get-component-asset.js +60 -0
  63. package/helpers/get-component-asset.js.map +1 -0
  64. package/helpers/get-demo-class-declarations.d.ts +6 -0
  65. package/helpers/get-demo-class-declarations.js +26 -0
  66. package/helpers/get-demo-class-declarations.js.map +1 -0
  67. package/helpers/get-entity-constructor.js +0 -3
  68. package/helpers/get-entity-constructor.js.map +1 -1
  69. package/helpers/get-playground-by-id.d.ts +7 -0
  70. package/helpers/get-playground-by-id.js +21 -0
  71. package/helpers/get-playground-by-id.js.map +1 -0
  72. package/helpers/get-playground-properties.d.ts +25 -0
  73. package/helpers/get-playground-properties.js +114 -0
  74. package/helpers/get-playground-properties.js.map +1 -0
  75. package/helpers/index.d.ts +4 -1
  76. package/helpers/index.js +4 -1
  77. package/helpers/index.js.map +1 -1
  78. package/helpers/typescript/create-project.js +2 -2
  79. package/helpers/typescript/create-project.js.map +1 -1
  80. package/package.json +3 -2
  81. package/templates/page.module.ts.nunj +9 -3
  82. package/templates/playgrounds.ts.nunj +70 -0
  83. package/types/component-asset.d.ts +2 -0
  84. package/types/component-asset.js +3 -0
  85. package/types/component-asset.js.map +1 -0
  86. package/types/index.d.ts +1 -0
  87. package/types/index.js +1 -0
  88. package/types/index.js.map +1 -1
  89. package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/demos/button-demo/button-demo.component.js +0 -28
  90. package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/demos/button-inline-demo/button-inline-demo.component.js +0 -30
  91. package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/ng-doc.dependencies.js +0 -12
  92. package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/ng-doc.module.js +0 -27
  93. package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/ng-doc.page.js +0 -11
  94. package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/ng-doc.category.js +0 -9
  95. package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/templating/ng-doc.page.js +0 -11
  96. package/engine/.cache/apps/ng-doc/src/app/docs/develop/custom-data.js +0 -6
  97. package/engine/.cache/ng-doc.buildinfo.json +0 -1
  98. package/engine/entities/playground.entity.d.ts +0 -16
  99. package/engine/entities/playground.entity.js +0 -65
  100. package/engine/entities/playground.entity.js.map +0 -1
  101. package/helpers/declaration-to-playground.d.ts +0 -7
  102. package/helpers/declaration-to-playground.js +0 -33
  103. package/helpers/declaration-to-playground.js.map +0 -1
@@ -1,11 +1,43 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var ng_doc_category_1 = require("../ng-doc.category");
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/entities/dependencies/ng-doc.page.ts
21
+ var ng_doc_page_exports = {};
22
+ __export(ng_doc_page_exports, {
23
+ default: () => ng_doc_page_default
24
+ });
25
+ module.exports = __toCommonJS(ng_doc_page_exports);
26
+
27
+ // apps/ng-doc/src/app/docs/entities/ng-doc.category.ts
28
+ var EntitiesCategory = {
29
+ title: "Entities",
30
+ expandable: true,
31
+ order: 2
32
+ };
33
+ var ng_doc_category_default = EntitiesCategory;
34
+
35
+ // apps/ng-doc/src/app/docs/entities/dependencies/ng-doc.page.ts
4
36
  var DependenciesPage = {
5
- title: 'Dependencies',
6
- mdFile: './index.md',
7
- category: ng_doc_category_1["default"],
8
- order: 3,
9
- keyword: 'EntitiesDependencies'
37
+ title: "Dependencies",
38
+ mdFile: "./index.md",
39
+ category: ng_doc_category_default,
40
+ order: 3,
41
+ keyword: "EntitiesDependencies"
10
42
  };
11
- exports["default"] = DependenciesPage;
43
+ var ng_doc_page_default = DependenciesPage;
@@ -1,8 +1,31 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/entities/ng-doc.category.ts
21
+ var ng_doc_category_exports = {};
22
+ __export(ng_doc_category_exports, {
23
+ default: () => ng_doc_category_default
24
+ });
25
+ module.exports = __toCommonJS(ng_doc_category_exports);
3
26
  var EntitiesCategory = {
4
- title: 'Entities',
5
- expandable: true,
6
- order: 2,
27
+ title: "Entities",
28
+ expandable: true,
29
+ order: 2
7
30
  };
8
- exports["default"] = EntitiesCategory;
31
+ var ng_doc_category_default = EntitiesCategory;
@@ -1,12 +1,44 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- exports.PagePage = void 0;
4
- var ng_doc_category_1 = require("../ng-doc.category");
5
- exports.PagePage = {
6
- title: 'Page',
7
- category: ng_doc_category_1["default"],
8
- mdFile: './index.md',
9
- keyword: 'EntitiesPage',
10
- order: 1
11
- };
12
- exports["default"] = exports.PagePage;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/entities/page/ng-doc.page.ts
21
+ var ng_doc_page_exports = {};
22
+ __export(ng_doc_page_exports, {
23
+ PagePage: () => PagePage,
24
+ default: () => ng_doc_page_default
25
+ });
26
+ module.exports = __toCommonJS(ng_doc_page_exports);
27
+
28
+ // apps/ng-doc/src/app/docs/entities/ng-doc.category.ts
29
+ var EntitiesCategory = {
30
+ title: "Entities",
31
+ expandable: true,
32
+ order: 2
33
+ };
34
+ var ng_doc_category_default = EntitiesCategory;
35
+
36
+ // apps/ng-doc/src/app/docs/entities/page/ng-doc.page.ts
37
+ var PagePage = {
38
+ title: "Page",
39
+ category: ng_doc_category_default,
40
+ mdFile: "./index.md",
41
+ keyword: "EntitiesPage",
42
+ order: 1
43
+ };
44
+ var ng_doc_page_default = PagePage;
@@ -1,11 +1,42 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var ng_doc_category_1 = require("../ng-doc.category");
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/getting-started/configuration/ng-doc.page.ts
21
+ var ng_doc_page_exports = {};
22
+ __export(ng_doc_page_exports, {
23
+ default: () => ng_doc_page_default
24
+ });
25
+ module.exports = __toCommonJS(ng_doc_page_exports);
26
+
27
+ // apps/ng-doc/src/app/docs/getting-started/ng-doc.category.ts
28
+ var GettingStartedCategory = {
29
+ title: "Getting Started",
30
+ order: 1
31
+ };
32
+ var ng_doc_category_default = GettingStartedCategory;
33
+
34
+ // apps/ng-doc/src/app/docs/getting-started/configuration/ng-doc.page.ts
4
35
  var Configuration = {
5
- title: "Configuration",
6
- mdFile: './index.md',
7
- category: ng_doc_category_1["default"],
8
- keyword: 'GettingStartedConfiguration',
9
- order: 3,
36
+ title: `Configuration`,
37
+ mdFile: "./index.md",
38
+ category: ng_doc_category_default,
39
+ keyword: "GettingStartedConfiguration",
40
+ order: 3
10
41
  };
11
- exports["default"] = Configuration;
42
+ var ng_doc_page_default = Configuration;
@@ -1,11 +1,42 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var ng_doc_category_1 = require("../ng-doc.category");
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/getting-started/installation/ng-doc.page.ts
21
+ var ng_doc_page_exports = {};
22
+ __export(ng_doc_page_exports, {
23
+ default: () => ng_doc_page_default
24
+ });
25
+ module.exports = __toCommonJS(ng_doc_page_exports);
26
+
27
+ // apps/ng-doc/src/app/docs/getting-started/ng-doc.category.ts
28
+ var GettingStartedCategory = {
29
+ title: "Getting Started",
30
+ order: 1
31
+ };
32
+ var ng_doc_category_default = GettingStartedCategory;
33
+
34
+ // apps/ng-doc/src/app/docs/getting-started/installation/ng-doc.page.ts
4
35
  var page = {
5
- title: "Installation",
6
- mdFile: './index.md',
7
- category: ng_doc_category_1["default"],
8
- order: 2,
9
- keyword: 'GettingStartedInstallation',
36
+ title: `Installation`,
37
+ mdFile: "./index.md",
38
+ category: ng_doc_category_default,
39
+ order: 2,
40
+ keyword: "GettingStartedInstallation"
10
41
  };
11
- exports["default"] = page;
42
+ var ng_doc_page_default = page;
@@ -1,8 +1,31 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- exports.GettingStartedCategory = void 0;
4
- exports.GettingStartedCategory = {
5
- title: 'Getting Started',
6
- order: 1,
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
7
9
  };
8
- exports["default"] = exports.GettingStartedCategory;
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/getting-started/ng-doc.category.ts
21
+ var ng_doc_category_exports = {};
22
+ __export(ng_doc_category_exports, {
23
+ GettingStartedCategory: () => GettingStartedCategory,
24
+ default: () => ng_doc_category_default
25
+ });
26
+ module.exports = __toCommonJS(ng_doc_category_exports);
27
+ var GettingStartedCategory = {
28
+ title: "Getting Started",
29
+ order: 1
30
+ };
31
+ var ng_doc_category_default = GettingStartedCategory;
@@ -1,11 +1,42 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var ng_doc_category_1 = require("../ng-doc.category");
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/getting-started/roadmap/ng-doc.page.ts
21
+ var ng_doc_page_exports = {};
22
+ __export(ng_doc_page_exports, {
23
+ default: () => ng_doc_page_default
24
+ });
25
+ module.exports = __toCommonJS(ng_doc_page_exports);
26
+
27
+ // apps/ng-doc/src/app/docs/getting-started/ng-doc.category.ts
28
+ var GettingStartedCategory = {
29
+ title: "Getting Started",
30
+ order: 1
31
+ };
32
+ var ng_doc_category_default = GettingStartedCategory;
33
+
34
+ // apps/ng-doc/src/app/docs/getting-started/roadmap/ng-doc.page.ts
4
35
  var page = {
5
- title: "Roadmap",
6
- mdFile: './index.md',
7
- category: ng_doc_category_1["default"],
8
- order: 4,
9
- keyword: 'GettingStartedRoadmap',
36
+ title: `Roadmap`,
37
+ mdFile: "./index.md",
38
+ category: ng_doc_category_default,
39
+ order: 4,
40
+ keyword: "GettingStartedRoadmap"
10
41
  };
11
- exports["default"] = page;
42
+ var ng_doc_page_default = page;
@@ -1,10 +1,41 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- var ng_doc_category_1 = require("../ng-doc.category");
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/getting-started/what-is-ng-doc/ng-doc.page.ts
21
+ var ng_doc_page_exports = {};
22
+ __export(ng_doc_page_exports, {
23
+ default: () => ng_doc_page_default
24
+ });
25
+ module.exports = __toCommonJS(ng_doc_page_exports);
26
+
27
+ // apps/ng-doc/src/app/docs/getting-started/ng-doc.category.ts
28
+ var GettingStartedCategory = {
29
+ title: "Getting Started",
30
+ order: 1
31
+ };
32
+ var ng_doc_category_default = GettingStartedCategory;
33
+
34
+ // apps/ng-doc/src/app/docs/getting-started/what-is-ng-doc/ng-doc.page.ts
4
35
  var page = {
5
- title: "What is NgDoc?",
6
- mdFile: './index.md',
7
- category: ng_doc_category_1["default"],
8
- order: 1,
36
+ title: `What is NgDoc?`,
37
+ mdFile: "./index.md",
38
+ category: ng_doc_category_default,
39
+ order: 1
9
40
  };
10
- exports["default"] = page;
41
+ var ng_doc_page_default = page;
@@ -1,29 +1,52 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- exports.api = void 0;
4
- exports.api = {
5
- title: 'API',
6
- scopes: [
7
- {
8
- name: '@ng-doc/app',
9
- route: 'app',
10
- include: 'libs/app/**/*.ts',
11
- },
12
- {
13
- name: '@ng-doc/builder',
14
- route: 'builder',
15
- include: 'libs/builder/**/*.ts',
16
- },
17
- {
18
- name: '@ng-doc/ui-kit',
19
- route: 'ui-kit',
20
- include: 'libs/ui-kit/**/*.ts',
21
- },
22
- {
23
- name: '@ng-doc/core',
24
- route: 'core',
25
- include: 'libs/core/**/*.ts',
26
- },
27
- ],
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
28
9
  };
29
- exports["default"] = exports.api;
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // apps/ng-doc/src/app/docs/ng-doc.api.ts
21
+ var ng_doc_api_exports = {};
22
+ __export(ng_doc_api_exports, {
23
+ api: () => api,
24
+ default: () => ng_doc_api_default
25
+ });
26
+ module.exports = __toCommonJS(ng_doc_api_exports);
27
+ var api = {
28
+ title: "API",
29
+ scopes: [
30
+ {
31
+ name: "@ng-doc/app",
32
+ route: "app",
33
+ include: "libs/app/**/*.ts"
34
+ },
35
+ {
36
+ name: "@ng-doc/builder",
37
+ route: "builder",
38
+ include: "libs/builder/**/*.ts"
39
+ },
40
+ {
41
+ name: "@ng-doc/ui-kit",
42
+ route: "ui-kit",
43
+ include: "libs/ui-kit/**/*.ts"
44
+ },
45
+ {
46
+ name: "@ng-doc/core",
47
+ route: "core",
48
+ include: "libs/core/**/*.ts"
49
+ }
50
+ ]
51
+ };
52
+ var ng_doc_api_default = api;
@@ -2,8 +2,8 @@ import { NgDocAction } from '../../types';
2
2
  /**
3
3
  * Render playground point on the page, it will be rendered by the application
4
4
  *
5
- * @param {string} playgroundId - Playground id in the config
5
+ * @param {string} pId - Playground id in the config
6
6
  * @param {string} sourcePath - Path to typescript file
7
7
  * @returns {NgDocAction} - The action output
8
8
  */
9
- export declare function playgroundAction(playgroundId: string): NgDocAction;
9
+ export declare function playgroundAction(pId: string): NgDocAction;
@@ -3,34 +3,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.playgroundAction = void 0;
4
4
  const core_1 = require("@ng-doc/core");
5
5
  const ts_morph_1 = require("ts-morph");
6
- const declaration_to_playground_1 = require("../../helpers/declaration-to-playground");
6
+ const helpers_1 = require("../../helpers");
7
7
  const component_decorator_resolver_1 = require("../../resolvers/component-decorator.resolver");
8
8
  /**
9
9
  * Render playground point on the page, it will be rendered by the application
10
10
  *
11
- * @param {string} playgroundId - Playground id in the config
11
+ * @param {string} pId - Playground id in the config
12
12
  * @param {string} sourcePath - Path to typescript file
13
13
  * @returns {NgDocAction} - The action output
14
14
  */
15
- function playgroundAction(playgroundId) {
15
+ function playgroundAction(pId) {
16
16
  return (project, page) => {
17
- var _a, _b, _c;
17
+ var _a, _b, _c, _d;
18
18
  try {
19
- if (!page.playground) {
20
- throw new Error(`Can't find the playground file for the page ${page.route}`);
19
+ const playgroundsExpression = (_a = page.pageDependencies) === null || _a === void 0 ? void 0 : _a.getPlaygroundsExpression();
20
+ if (!playgroundsExpression) {
21
+ throw new Error(`Can't find the playground configuration for "${page.route}" page. Make sure that you configured the "${pId}" playground correctly.`);
21
22
  }
22
- const declaration = page.playground.getTargetForPlayground(playgroundId);
23
+ const declaration = (0, helpers_1.getTargetForPlayground)(playgroundsExpression, pId);
23
24
  if (!declaration) {
24
25
  throw new Error(`Playground action didn't find the class declaration for the current target.`);
25
26
  }
26
- const decorator = (_a = declaration.getDecorator('Component')) !== null && _a !== void 0 ? _a : declaration.getDecorator('Directive');
27
+ const decorator = (_b = declaration.getDecorator('Component')) !== null && _b !== void 0 ? _b : declaration.getDecorator('Directive');
27
28
  const decoratorArgument = decorator === null || decorator === void 0 ? void 0 : decorator.getArguments()[0];
28
29
  const selectors = ts_morph_1.Node.isObjectLiteralExpression(decoratorArgument)
29
- ? (_c = (_b = (0, component_decorator_resolver_1.componentDecoratorResolver)(decoratorArgument).selector) === null || _b === void 0 ? void 0 : _b.replace(/[\n\s]/gm, '')) !== null && _c !== void 0 ? _c : ''
30
+ ? (_d = (_c = (0, component_decorator_resolver_1.componentDecoratorResolver)(decoratorArgument).selector) === null || _c === void 0 ? void 0 : _c.replace(/[\n\s]/gm, '')) !== null && _d !== void 0 ? _d : ''
30
31
  : '';
31
- const playgroundData = (0, declaration_to_playground_1.declarationToPlayground)(declaration);
32
+ const playgroundData = (0, helpers_1.getPlaygroundClassProperties)(declaration);
32
33
  return {
33
- output: `<ng-doc-playground id="${playgroundId}">
34
+ output: `<ng-doc-playground id="${pId}">
34
35
  <div id="selectors">${selectors}</div>
35
36
  <div id="data">${(0, core_1.escapeHtml)(JSON.stringify(playgroundData))}</div>
36
37
  </ng-doc-playground>`,
@@ -1 +1 @@
1
- {"version":3,"file":"playground.action.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/actions/playground.action.ts"],"names":[],"mappings":";;;AAAA,uCAAmE;AACnE,uCAAoE;AAEpE,uFAAgF;AAEhF,+FAAwF;AAIxF;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,YAAoB;IACpD,OAAO,CAAC,OAAgB,EAAE,IAAqB,EAAqB,EAAE;;QACrE,IAAI;YACH,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACrB,MAAM,IAAI,KAAK,CAAC,+CAA+C,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;aAC7E;YAED,MAAM,WAAW,GAAiC,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;YAEvG,IAAI,CAAC,WAAW,EAAE;gBACjB,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;aAC/F;YAED,MAAM,SAAS,GACd,MAAA,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,mCAAI,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;YAChF,MAAM,iBAAiB,GAAqB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY,GAAG,CAAC,CAAC,CAAC;YACzE,MAAM,SAAS,GAAW,eAAI,CAAC,yBAAyB,CAAC,iBAAiB,CAAC;gBAC1E,CAAC,CAAC,MAAA,MAAA,IAAA,yDAA0B,EAAC,iBAAiB,CAAC,CAAC,QAAQ,0CAAE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,mCAAI,EAAE;gBACvF,CAAC,CAAC,EAAE,CAAC;YAEN,MAAM,cAAc,GAA8B,IAAA,mDAAuB,EAAC,WAAW,CAAC,CAAC;YAEvF,OAAO;gBACN,MAAM,EAAE,0BAA0B,YAAY;6BACrB,SAAS;wBACd,IAAA,iBAAU,EAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;2BACvC;gBACvB,YAAY,EAAE,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC;aACzD,CAAC;SACF;QAAC,OAAO,CAAC,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,8CAA8C,CAAC,EAAE,CAAC,CAAC;YAErE,OAAO,EAAC,MAAM,EAAE,EAAE,EAAC,CAAC;SACpB;IACF,CAAC,CAAC;AACH,CAAC;AAnCD,4CAmCC"}
1
+ {"version":3,"file":"playground.action.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/actions/playground.action.ts"],"names":[],"mappings":";;;AAAA,uCAAmE;AACnE,uCAA6F;AAE7F,2CAAsG;AAEtG,+FAAwF;AAIxF;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IAC3C,OAAO,CAAC,OAAgB,EAAE,IAAqB,EAAqB,EAAE;;QACrE,IAAI;YACH,MAAM,qBAAqB,GAAwC,MAAA,IAAI,CAAC,gBAAgB,0CAAE,wBAAwB,EAAE,CAAC;YAErH,IAAI,CAAC,qBAAqB,EAAE;gBAC3B,MAAM,IAAI,KAAK,CAAC,gDAAgD,IAAI,CAAC,KAAK,8CAA8C,GAAG,yBAAyB,CAAC,CAAC;aACtJ;YAED,MAAM,WAAW,GAAiC,IAAA,gCAAsB,EAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;YAErG,IAAI,CAAC,WAAW,EAAE;gBACjB,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;aAC/F;YAED,MAAM,SAAS,GACd,MAAA,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,mCAAI,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;YAChF,MAAM,iBAAiB,GAAqB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY,GAAG,CAAC,CAAC,CAAC;YACzE,MAAM,SAAS,GAAW,eAAI,CAAC,yBAAyB,CAAC,iBAAiB,CAAC;gBAC1E,CAAC,CAAC,MAAA,MAAA,IAAA,yDAA0B,EAAC,iBAAiB,CAAC,CAAC,QAAQ,0CAAE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,mCAAI,EAAE;gBACvF,CAAC,CAAC,EAAE,CAAC;YAEN,MAAM,cAAc,GAA8B,IAAA,sCAA4B,EAAC,WAAW,CAAC,CAAC;YAE5F,OAAO;gBACN,MAAM,EAAE,0BAA0B,GAAG;6BACZ,SAAS;wBACd,IAAA,iBAAU,EAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;2BACvC;gBACvB,YAAY,EAAE,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC;aACzD,CAAC;SACF;QAAC,OAAO,CAAC,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,8CAA8C,CAAC,EAAE,CAAC,CAAC;YAErE,OAAO,EAAC,MAAM,EAAE,EAAE,EAAC,CAAC;SACpB;IACF,CAAC,CAAC;AACH,CAAC;AArCD,4CAqCC"}
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { Project } from 'ts-morph';
2
+ import { Project, SourceFile } from 'ts-morph';
3
3
  import { NgDocBuilderContext } from '../interfaces';
4
4
  import { NgDocSkeletonEntity } from './entities';
5
5
  import { NgDocEntity } from './entities/abstractions/entity';
@@ -10,10 +10,10 @@ export declare class NgDocBuilder {
10
10
  readonly entities: NgDocEntityStore;
11
11
  readonly skeleton: NgDocSkeletonEntity;
12
12
  readonly renderer: NgDocRenderer;
13
- private readonly compiledProject;
14
13
  readonly project: Project;
15
14
  constructor(context: NgDocBuilderContext);
16
15
  run(): Observable<void>;
17
16
  get(id: string, canBeBuilt?: boolean): NgDocEntity | undefined;
17
+ emit(...only: SourceFile[]): Observable<void>;
18
18
  private collectGarbage;
19
19
  }
package/engine/builder.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NgDocBuilder = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@ng-doc/core");
6
+ const esbuild = tslib_1.__importStar(require("esbuild"));
6
7
  const fs = tslib_1.__importStar(require("fs"));
7
8
  const path = tslib_1.__importStar(require("path"));
8
9
  const rxjs_1 = require("rxjs");
@@ -24,12 +25,6 @@ class NgDocBuilder {
24
25
  this.entities = new entity_store_1.NgDocEntityStore();
25
26
  this.skeleton = new entities_1.NgDocSkeletonEntity(this, this.context);
26
27
  this.renderer = new renderer_1.NgDocRenderer();
27
- this.compiledProject = (0, helpers_1.createProject)({
28
- compilerOptions: {
29
- rootDir: this.context.context.workspaceRoot,
30
- outDir: variables_1.CACHE_PATH,
31
- },
32
- });
33
28
  this.project = (0, helpers_1.createProject)({ tsConfigFilePath: this.context.tsConfig });
34
29
  }
35
30
  run() {
@@ -42,13 +37,13 @@ class NgDocBuilder {
42
37
  path.join(pagesPath, variables_1.API_PATTERN),
43
38
  ])
44
39
  .flat());
45
- const entities = (0, rxjs_1.merge)((0, entity_life_cycle_1.entityLifeCycle)(this, this.compiledProject, watcher, variables_1.PAGE_PATTERN, entities_1.NgDocPageEntity), (0, entity_life_cycle_1.entityLifeCycle)(this, this.compiledProject, watcher, variables_1.CATEGORY_PATTERN, entities_1.NgDocCategoryEntity), (0, entity_life_cycle_1.entityLifeCycle)(this, this.compiledProject, watcher, variables_1.PAGE_DEPENDENCY_PATTERN, entities_1.NgDocDependenciesEntity), (0, entity_life_cycle_1.entityLifeCycle)(this, this.compiledProject, watcher, variables_1.API_PATTERN, entities_1.NgDocApiEntity)).pipe((0, buffer_until_once_1.bufferUntilOnce)(watcher.onReady()), (0, operators_1.map)((entities) => entities.flat()), (0, operators_2.bufferDebounce)(100), (0, operators_1.map)((entities) => entities.flat()), (0, operators_1.share)());
40
+ const entities = (0, rxjs_1.merge)((0, entity_life_cycle_1.entityLifeCycle)(this, this.project, watcher, variables_1.PAGE_PATTERN, entities_1.NgDocPageEntity), (0, entity_life_cycle_1.entityLifeCycle)(this, this.project, watcher, variables_1.CATEGORY_PATTERN, entities_1.NgDocCategoryEntity), (0, entity_life_cycle_1.entityLifeCycle)(this, this.project, watcher, variables_1.PAGE_DEPENDENCY_PATTERN, entities_1.NgDocDependenciesEntity), (0, entity_life_cycle_1.entityLifeCycle)(this, this.project, watcher, variables_1.API_PATTERN, entities_1.NgDocApiEntity)).pipe((0, buffer_until_once_1.bufferUntilOnce)(watcher.onReady()), (0, operators_1.map)((entities) => entities.flat()), (0, operators_2.bufferDebounce)(100), (0, operators_1.map)((entities) => entities.flat()), (0, operators_1.share)());
46
41
  return entities.pipe((0, operators_1.tap)(() => this.context.context.reportRunning()), (0, operators_1.mergeMap)((entities) => {
47
42
  /*
48
43
  Refresh and compile source files for all not destroyed entities
49
44
  */
50
45
  return (0, fork_join_or_empty_1.forkJoinOrEmpty)(entities.map((entity) => (entity.destroyed ? (0, rxjs_1.of)(null) : entity.emit()))).pipe((0, operators_1.mapTo)(entities));
51
- }), (0, operators_1.concatMap)((entities) => (0, rxjs_1.from)(this.compiledProject.emit()).pipe((0, operators_1.mapTo)(entities))), (0, operators_1.mergeMap)((entities) => {
46
+ }), (0, operators_1.concatMap)((entities) => this.emit().pipe((0, operators_1.mapTo)(entities))), (0, operators_1.mergeMap)((entities) => {
52
47
  // Re-fetch compiled data for non destroyed entities
53
48
  return (0, fork_join_or_empty_1.forkJoinOrEmpty)(entities.map((entity) => entity.destroyed
54
49
  ? (0, rxjs_1.of)(entity)
@@ -91,6 +86,23 @@ class NgDocBuilder {
91
86
  const entity = this.entities.get(id);
92
87
  return (0, core_1.isPresent)(canBeBuilt) ? ((entity === null || entity === void 0 ? void 0 : entity.canBeBuilt) === canBeBuilt ? entity : undefined) : entity;
93
88
  }
89
+ emit(...only) {
90
+ return (0, rxjs_1.from)(esbuild.build({
91
+ entryPoints: (only.length
92
+ ? only
93
+ : this.entities
94
+ .asArray()
95
+ .filter(helpers_1.isFileEntity)
96
+ .filter((e) => e.compilable)
97
+ .map((e) => e.sourceFile)).map((s) => s.getFilePath()),
98
+ tsconfig: this.context.tsConfig,
99
+ bundle: true,
100
+ format: 'cjs',
101
+ treeShaking: true,
102
+ outbase: this.context.context.workspaceRoot,
103
+ outdir: variables_1.CACHE_PATH,
104
+ })).pipe((0, operators_1.mapTo)(void 0));
105
+ }
94
106
  collectGarbage() {
95
107
  this.entities.asArray().forEach((entity) => {
96
108
  if (entity.destroyed) {