@ng-doc/builder 16.9.0 → 16.11.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.
- package/browser/index.js +2 -1
- package/browser/index.js.map +1 -1
- package/browser/schema.json +7 -1
- package/classes/observable-set.d.ts +1 -0
- package/classes/observable-set.js +4 -0
- package/classes/observable-set.js.map +1 -1
- package/dev-server/index.js +2 -1
- package/dev-server/index.js.map +1 -1
- package/dev-server/schema.json +7 -1
- package/engine/.cache/apps/ng-doc/docs/ng-doc.api.js +3 -8
- package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.js +41 -0
- package/engine/.cache/apps/ng-doc/docs/recipes/ng-doc.category.js +30 -0
- package/engine/actions/playground.action.js +2 -2
- package/engine/actions/playground.action.js.map +1 -1
- package/engine/build-ng-doc.js +10 -2
- package/engine/build-ng-doc.js.map +1 -1
- package/engine/builder-operators/build.d.ts +2 -3
- package/engine/builder-operators/build.js +8 -4
- package/engine/builder-operators/build.js.map +1 -1
- package/engine/builder-operators/compile.d.ts +1 -1
- package/engine/builder-operators/compile.js.map +1 -1
- package/engine/builder-operators/emit.d.ts +2 -2
- package/engine/builder-operators/emit.js.map +1 -1
- package/engine/builder-operators/post-build.d.ts +6 -0
- package/engine/builder-operators/post-build.js +23 -0
- package/engine/builder-operators/post-build.js.map +1 -0
- package/engine/builder-operators/post-process.d.ts +2 -2
- package/engine/builder-operators/post-process.js +4 -5
- package/engine/builder-operators/post-process.js.map +1 -1
- package/engine/builder-operators/task.d.ts +1 -1
- package/engine/builder-operators/task.js.map +1 -1
- package/engine/builder-operators/to-builder-output.d.ts +6 -0
- package/engine/builder-operators/to-builder-output.js +13 -0
- package/engine/builder-operators/to-builder-output.js.map +1 -0
- package/engine/entities/abstractions/entity.d.ts +11 -11
- package/engine/entities/abstractions/entity.js +2 -5
- package/engine/entities/abstractions/entity.js.map +1 -1
- package/engine/entities/abstractions/file.entity.d.ts +2 -2
- package/engine/entities/abstractions/file.entity.js.map +1 -1
- package/engine/entities/abstractions/module.entity.d.ts +1 -1
- package/engine/entities/abstractions/module.entity.js.map +1 -1
- package/engine/entities/abstractions/navigation.entity.d.ts +1 -1
- package/engine/entities/abstractions/navigation.entity.js.map +1 -1
- package/engine/entities/abstractions/route.entity.d.ts +3 -4
- package/engine/entities/abstractions/route.entity.js +2 -2
- package/engine/entities/abstractions/route.entity.js.map +1 -1
- package/engine/entities/api-list.entity.d.ts +20 -0
- package/engine/entities/api-list.entity.js +69 -0
- package/engine/entities/api-list.entity.js.map +1 -0
- package/engine/entities/api-page.entity.d.ts +2 -3
- package/engine/entities/api-page.entity.js +26 -28
- package/engine/entities/api-page.entity.js.map +1 -1
- package/engine/entities/api-scope.entity.d.ts +2 -3
- package/engine/entities/api-scope.entity.js +13 -7
- package/engine/entities/api-scope.entity.js.map +1 -1
- package/engine/entities/api.entity.d.ts +3 -4
- package/engine/entities/api.entity.js +26 -29
- package/engine/entities/api.entity.js.map +1 -1
- package/engine/entities/category.entity.d.ts +2 -3
- package/engine/entities/category.entity.js +11 -13
- package/engine/entities/category.entity.js.map +1 -1
- package/engine/entities/context.entity.d.ts +11 -0
- package/engine/entities/context.entity.js +34 -0
- package/engine/entities/context.entity.js.map +1 -0
- package/engine/entities/generated-module.entity.d.ts +12 -0
- package/engine/entities/generated-module.entity.js +52 -0
- package/engine/entities/generated-module.entity.js.map +1 -0
- package/engine/entities/index-file.entity.d.ts +12 -0
- package/engine/entities/index-file.entity.js +52 -0
- package/engine/entities/index-file.entity.js.map +1 -0
- package/engine/entities/index.d.ts +8 -1
- package/engine/entities/index.js +8 -1
- package/engine/entities/index.js.map +1 -1
- package/engine/entities/indexes.entity.d.ts +3 -4
- package/engine/entities/indexes.entity.js +12 -14
- package/engine/entities/indexes.entity.js.map +1 -1
- package/engine/entities/keywords.entity.d.ts +12 -0
- package/engine/entities/keywords.entity.js +32 -0
- package/engine/entities/keywords.entity.js.map +1 -0
- package/engine/entities/page-demo.entity.d.ts +20 -0
- package/engine/entities/page-demo.entity.js +87 -0
- package/engine/entities/page-demo.entity.js.map +1 -0
- package/engine/entities/page-playground.entity.d.ts +21 -0
- package/engine/entities/page-playground.entity.js +80 -0
- package/engine/entities/page-playground.entity.js.map +1 -0
- package/engine/entities/page.entity.d.ts +6 -18
- package/engine/entities/page.entity.js +39 -107
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.js +20 -0
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.d.ts +26 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.js +65 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.js +23 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.js +27 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/index.d.ts +9 -0
- package/engine/entities/plugins/entity-plugins/index.js +13 -0
- package/engine/entities/plugins/entity-plugins/index.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.js +21 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.js +18 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.js +18 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.js +23 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.js +21 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.js.map +1 -0
- package/engine/entities/plugins/helpers/execute-plugins.d.ts +10 -0
- package/engine/entities/plugins/helpers/execute-plugins.js +18 -0
- package/engine/entities/plugins/helpers/execute-plugins.js.map +1 -0
- package/engine/entities/plugins/helpers/index.d.ts +1 -0
- package/engine/entities/plugins/helpers/index.js +5 -0
- package/engine/entities/plugins/helpers/index.js.map +1 -0
- package/engine/entities/plugins/index.d.ts +3 -0
- package/engine/entities/plugins/index.js +7 -0
- package/engine/entities/plugins/index.js.map +1 -0
- package/engine/entities/plugins/types/entity-plugin.d.ts +5 -0
- package/engine/entities/plugins/types/entity-plugin.js +3 -0
- package/engine/entities/plugins/types/entity-plugin.js.map +1 -0
- package/engine/entities/plugins/types/index.d.ts +1 -0
- package/engine/entities/plugins/types/index.js +5 -0
- package/engine/entities/plugins/types/index.js.map +1 -0
- package/engine/entities/routes.entity.d.ts +11 -0
- package/engine/entities/routes.entity.js +34 -0
- package/engine/entities/routes.entity.js.map +1 -0
- package/engine/entity-store.d.ts +1 -0
- package/engine/entity-store.js +3 -0
- package/engine/entity-store.js.map +1 -1
- package/engine/nunjucks/filters.d.ts +2 -2
- package/engine/nunjucks/filters.js +3 -2
- package/engine/nunjucks/filters.js.map +1 -1
- package/engine/variables.d.ts +1 -0
- package/engine/variables.js +1 -0
- package/engine/variables.js.map +1 -1
- package/helpers/angular/get-component-assets.d.ts +8 -0
- package/helpers/angular/get-component-assets.js +15 -0
- package/helpers/angular/get-component-assets.js.map +1 -0
- package/helpers/angular/get-component-source-files.d.ts +7 -0
- package/helpers/angular/get-component-source-files.js +23 -0
- package/helpers/angular/get-component-source-files.js.map +1 -0
- package/helpers/angular/index.d.ts +2 -0
- package/helpers/angular/index.js +2 -0
- package/helpers/angular/index.js.map +1 -1
- package/helpers/build-file-assets.d.ts +7 -0
- package/helpers/build-file-assets.js +25 -0
- package/helpers/build-file-assets.js.map +1 -0
- package/helpers/build-file-entity.js +14 -1
- package/helpers/build-file-entity.js.map +1 -1
- package/helpers/create-builder-context.d.ts +5 -5
- package/helpers/create-builder-context.js +6 -6
- package/helpers/create-builder-context.js.map +1 -1
- package/helpers/demo/assets-from-component-asset.d.ts +6 -0
- package/helpers/demo/assets-from-component-asset.js +14 -0
- package/helpers/demo/assets-from-component-asset.js.map +1 -0
- package/helpers/demo/index.d.ts +1 -0
- package/helpers/demo/index.js +5 -0
- package/helpers/demo/index.js.map +1 -0
- package/helpers/emit-built-output.d.ts +2 -2
- package/helpers/emit-built-output.js.map +1 -1
- package/helpers/entity-type.d.ts +1 -1
- package/helpers/extract-docs.js +4 -4
- package/helpers/extract-docs.js.map +1 -1
- package/helpers/format-code.d.ts +1 -1
- package/helpers/format-code.js +14 -3
- package/helpers/format-code.js.map +1 -1
- package/helpers/get-code-type-from-lang.d.ts +6 -0
- package/helpers/get-code-type-from-lang.js +31 -0
- package/helpers/get-code-type-from-lang.js.map +1 -0
- package/helpers/get-demo-class-declarations.d.ts +1 -1
- package/helpers/get-demo-class-declarations.js +18 -7
- package/helpers/get-demo-class-declarations.js.map +1 -1
- package/helpers/index.d.ts +7 -3
- package/helpers/index.js +7 -3
- package/helpers/index.js.map +1 -1
- package/helpers/load-config.d.ts +3 -2
- package/helpers/load-config.js +4 -3
- package/helpers/load-config.js.map +1 -1
- package/helpers/markdown-to-html.d.ts +10 -0
- package/helpers/{marked.js → markdown-to-html.js} +11 -8
- package/helpers/markdown-to-html.js.map +1 -0
- package/helpers/process-html.d.ts +3 -3
- package/helpers/process-html.js +14 -11
- package/helpers/process-html.js.map +1 -1
- package/helpers/process-legacy-snippets.d.ts +9 -0
- package/helpers/process-legacy-snippets.js +70 -0
- package/helpers/process-legacy-snippets.js.map +1 -0
- package/helpers/process-snippets.d.ts +5 -5
- package/helpers/process-snippets.js +63 -50
- package/helpers/process-snippets.js.map +1 -1
- package/helpers/remove-lines-from-code.d.ts +6 -0
- package/helpers/remove-lines-from-code.js +30 -0
- package/helpers/remove-lines-from-code.js.map +1 -0
- package/helpers/snippets-from-asset.d.ts +9 -0
- package/helpers/snippets-from-asset.js +26 -0
- package/helpers/snippets-from-asset.js.map +1 -0
- package/interfaces/asset.d.ts +5 -7
- package/interfaces/build-result.d.ts +10 -0
- package/{types/snippet-type.js → interfaces/build-result.js} +1 -1
- package/interfaces/build-result.js.map +1 -0
- package/interfaces/index.d.ts +3 -0
- package/interfaces/index.js +3 -0
- package/interfaces/index.js.map +1 -1
- package/interfaces/output.d.ts +1 -3
- package/interfaces/schema.d.ts +3 -0
- package/interfaces/snippet-config.d.ts +8 -0
- package/interfaces/snippet-config.js +3 -0
- package/interfaces/snippet-config.js.map +1 -0
- package/interfaces/snippet.d.ts +5 -4
- package/operators/error-handler.d.ts +1 -1
- package/package.json +6 -5
- package/parsers/helpers/index.d.ts +3 -0
- package/parsers/helpers/index.js +7 -0
- package/parsers/helpers/index.js.map +1 -0
- package/parsers/helpers/number.d.ts +2 -0
- package/parsers/helpers/number.js +7 -0
- package/parsers/helpers/number.js.map +1 -0
- package/parsers/helpers/param-value.d.ts +2 -0
- package/parsers/helpers/param-value.js +8 -0
- package/parsers/helpers/param-value.js.map +1 -0
- package/parsers/helpers/param.d.ts +7 -0
- package/parsers/helpers/param.js +19 -0
- package/parsers/helpers/param.js.map +1 -0
- package/parsers/parse-code-block-params.js +8 -13
- package/parsers/parse-code-block-params.js.map +1 -1
- package/parsers/parse-snippet.d.ts +6 -0
- package/parsers/parse-snippet.js +27 -0
- package/parsers/parse-snippet.js.map +1 -0
- package/schematics/category/files/ng-doc.category.ts.template +1 -1
- package/schematics/category/index.js +2 -1
- package/schematics/category/index.js.map +1 -1
- package/schematics/page/index.js +2 -1
- package/schematics/page/index.js.map +1 -1
- package/templates/demo-assets.ts.nunj +13 -4
- package/templates/page.module.ts.nunj +3 -2
- package/templates/parts/usage-notes.html.nunj +1 -1
- package/templates/playgrounds.ts.nunj +19 -9
- package/types/index.d.ts +0 -1
- package/types/index.js +0 -1
- package/types/index.js.map +1 -1
- package/engine/entities/skeleton.entity.d.ts +0 -16
- package/engine/entities/skeleton.entity.js +0 -44
- package/engine/entities/skeleton.entity.js.map +0 -1
- package/helpers/build-assets.d.ts +0 -10
- package/helpers/build-assets.js +0 -55
- package/helpers/build-assets.js.map +0 -1
- package/helpers/get-component-asset.d.ts +0 -10
- package/helpers/get-component-asset.js +0 -50
- package/helpers/get-component-asset.js.map +0 -1
- package/helpers/marked.d.ts +0 -9
- package/helpers/marked.js.map +0 -1
- package/types/snippet-type.d.ts +0 -1
- package/types/snippet-type.js.map +0 -1
|
@@ -8,12 +8,13 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
8
8
|
const rxjs_1 = require("rxjs");
|
|
9
9
|
const operators_1 = require("rxjs/operators");
|
|
10
10
|
const helpers_1 = require("../../helpers");
|
|
11
|
-
const build_indexes_1 = require("../../helpers/build-indexes");
|
|
12
|
-
const operators_2 = require("../../operators");
|
|
13
11
|
const actions_1 = require("../actions");
|
|
14
12
|
const nunjucks_1 = require("../nunjucks");
|
|
15
13
|
const navigation_entity_1 = require("./abstractions/navigation.entity");
|
|
16
14
|
const decorators_1 = require("./cache/decorators");
|
|
15
|
+
const page_demo_entity_1 = require("./page-demo.entity");
|
|
16
|
+
const page_playground_entity_1 = require("./page-playground.entity");
|
|
17
|
+
const plugins_1 = require("./plugins");
|
|
17
18
|
exports.NgDocPageEntity = (() => {
|
|
18
19
|
let _classDecorators = [(0, decorators_1.CachedEntity)()];
|
|
19
20
|
let _classDescriptor;
|
|
@@ -21,20 +22,15 @@ exports.NgDocPageEntity = (() => {
|
|
|
21
22
|
let _classThis;
|
|
22
23
|
let _instanceExtraInitializers = [];
|
|
23
24
|
let _get_mdPath_decorators;
|
|
24
|
-
let _get_demoAssetsPath_decorators;
|
|
25
|
-
let _get_playgroundsPath_decorators;
|
|
26
25
|
var NgDocPageEntity = _classThis = class extends navigation_entity_1.NgDocNavigationEntity {
|
|
27
26
|
constructor() {
|
|
28
27
|
super(...arguments);
|
|
29
|
-
this.
|
|
30
|
-
this.demoClassDeclarations = [];
|
|
31
|
-
this.playgroundMetadata = {};
|
|
32
|
-
this.componentAssets = {};
|
|
28
|
+
this.parent = (tslib_1.__runInitializers(this, _instanceExtraInitializers), void 0);
|
|
33
29
|
}
|
|
34
30
|
get route() {
|
|
35
|
-
var _a, _b;
|
|
31
|
+
var _a, _b, _c, _d;
|
|
36
32
|
const folderName = path.basename(path.dirname(this.sourceFile.getFilePath()));
|
|
37
|
-
return (
|
|
33
|
+
return (_d = ((0, core_1.isRoute)((_a = this.target) === null || _a === void 0 ? void 0 : _a.route) ? (_b = this.target) === null || _b === void 0 ? void 0 : _b.route.path : (_c = this.target) === null || _c === void 0 ? void 0 : _c.route)) !== null && _d !== void 0 ? _d : folderName;
|
|
38
34
|
}
|
|
39
35
|
get isRoot() {
|
|
40
36
|
var _a;
|
|
@@ -93,29 +89,6 @@ exports.NgDocPageEntity = (() => {
|
|
|
93
89
|
get mdFolder() {
|
|
94
90
|
return path.dirname(this.mdPath);
|
|
95
91
|
}
|
|
96
|
-
get assets() {
|
|
97
|
-
return Object.keys(this.componentAssets)
|
|
98
|
-
.map((key) => this.componentAssets[key])
|
|
99
|
-
.flat();
|
|
100
|
-
}
|
|
101
|
-
get assetsFolder() {
|
|
102
|
-
return path.relative(this.context.context.workspaceRoot, path.join(this.folderPath, 'assets'));
|
|
103
|
-
}
|
|
104
|
-
get demoAssetsPath() {
|
|
105
|
-
return path.join(this.folderPath, 'component-assets.ts');
|
|
106
|
-
}
|
|
107
|
-
get demoAssetsImport() {
|
|
108
|
-
return (0, helpers_1.slash)(path.relative(this.context.context.workspaceRoot, path.join(this.folderPath, 'component-assets')));
|
|
109
|
-
}
|
|
110
|
-
get demoAssets() {
|
|
111
|
-
return this.assets.length ? this.demoAssetsImport : undefined;
|
|
112
|
-
}
|
|
113
|
-
get playgroundsPath() {
|
|
114
|
-
return path.join(this.folderPath, 'playgrounds.ts');
|
|
115
|
-
}
|
|
116
|
-
get playgroundIds() {
|
|
117
|
-
return this.playgroundsExpression ? (0, helpers_1.getPlaygroundsIds)(this.playgroundsExpression) : [];
|
|
118
|
-
}
|
|
119
92
|
get hasImports() {
|
|
120
93
|
var _a;
|
|
121
94
|
return !!((_a = this.objectExpression) === null || _a === void 0 ? void 0 : _a.getProperty('imports'));
|
|
@@ -126,9 +99,15 @@ exports.NgDocPageEntity = (() => {
|
|
|
126
99
|
}
|
|
127
100
|
dependenciesChanged() {
|
|
128
101
|
super.dependenciesChanged();
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
102
|
+
}
|
|
103
|
+
childrenGenerator() {
|
|
104
|
+
return (0, rxjs_1.of)([
|
|
105
|
+
new page_demo_entity_1.NgDocPageDemoEntity(this.store, this.cache, this.context, this),
|
|
106
|
+
new page_playground_entity_1.NgDocPagePlaygroundEntity(this.store, this.cache, this.context, this),
|
|
107
|
+
]);
|
|
108
|
+
}
|
|
109
|
+
get playgroundEntity() {
|
|
110
|
+
return this.children.find((child) => child instanceof page_playground_entity_1.NgDocPagePlaygroundEntity);
|
|
132
111
|
}
|
|
133
112
|
loadImpl() {
|
|
134
113
|
return super.loadImpl().pipe((0, operators_1.map)(() => {
|
|
@@ -139,36 +118,12 @@ exports.NgDocPageEntity = (() => {
|
|
|
139
118
|
if (!this.title) {
|
|
140
119
|
throw new Error(`Failed to load page. Make sure that you have a "title" property.`);
|
|
141
120
|
}
|
|
142
|
-
if (this.objectExpression) {
|
|
143
|
-
this.playgroundsExpression = (0, helpers_1.getPlaygroundsExpression)(this.objectExpression);
|
|
144
|
-
this.demoClassDeclarations = (0, helpers_1.getDemoClassDeclarations)(this.objectExpression);
|
|
145
|
-
this.updatePlaygroundMetadata();
|
|
146
|
-
}
|
|
147
121
|
}), (0, operators_1.tap)({
|
|
148
122
|
error: (e) => this.errors.push(e),
|
|
149
123
|
}));
|
|
150
124
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
? (0, rxjs_1.forkJoin)([this.buildModule(), this.buildPlaygrounds(), this.buildDemoAssets()])
|
|
154
|
-
: (0, rxjs_1.of)([]);
|
|
155
|
-
}
|
|
156
|
-
updatePlaygroundMetadata() {
|
|
157
|
-
this.playgroundMetadata = this.playgroundIds.reduce((metadata, id) => {
|
|
158
|
-
if (this.playgroundsExpression) {
|
|
159
|
-
const playground = (0, helpers_1.getPlaygroundById)(this.playgroundsExpression, id);
|
|
160
|
-
if (playground) {
|
|
161
|
-
metadata[id] = (0, helpers_1.buildPlaygroundMetadata)(id, playground);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return metadata;
|
|
165
|
-
}, {});
|
|
166
|
-
}
|
|
167
|
-
buildModule() {
|
|
168
|
-
if (!this.target) {
|
|
169
|
-
throw new Error(`Failed to build page. Make sure that you define page configuration property correctly.`);
|
|
170
|
-
}
|
|
171
|
-
const template = (0, nunjucks_1.renderTemplate)(this.target.mdFile, {
|
|
125
|
+
build() {
|
|
126
|
+
const result = (0, nunjucks_1.renderTemplate)(this.target.mdFile, {
|
|
172
127
|
scope: this.sourceFileFolder,
|
|
173
128
|
context: {
|
|
174
129
|
NgDocPage: this.target,
|
|
@@ -177,58 +132,35 @@ exports.NgDocPageEntity = (() => {
|
|
|
177
132
|
dependenciesStore: this.dependencies,
|
|
178
133
|
filters: false,
|
|
179
134
|
});
|
|
180
|
-
return (0, rxjs_1.of)(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
135
|
+
return (0, rxjs_1.of)({
|
|
136
|
+
result,
|
|
137
|
+
entity: this,
|
|
138
|
+
toBuilderOutput: (content) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return ({
|
|
140
|
+
content: (0, nunjucks_1.renderTemplate)('./page.module.ts.nunj', {
|
|
141
|
+
context: {
|
|
142
|
+
page: this,
|
|
143
|
+
pageContent: content,
|
|
144
|
+
},
|
|
145
|
+
}),
|
|
146
|
+
filePath: this.modulePath,
|
|
147
|
+
});
|
|
148
|
+
}),
|
|
149
|
+
postBuildPlugins: [(0, plugins_1.markdownToHtmlPlugin)(), (0, plugins_1.processHtmlPlugin)()],
|
|
150
|
+
postProcessPlugins: [(0, plugins_1.postProcessHtmlPlugin)(), (0, plugins_1.fillIndexesPlugin)()],
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
refreshDependencies() {
|
|
154
|
+
var _a;
|
|
155
|
+
(_a = this.objectExpression) === null || _a === void 0 ? void 0 : _a.getSourceFile().getReferencedSourceFiles().forEach((sourceFile) => {
|
|
156
|
+
sourceFile.refreshFromFileSystemSync();
|
|
202
157
|
});
|
|
203
|
-
return (0, rxjs_1.of)({ content: (0, helpers_1.formatCode)(content, 'TypeScript'), filePath: this.playgroundsPath });
|
|
204
|
-
}
|
|
205
|
-
buildDemoAssets() {
|
|
206
|
-
if (this.objectExpression) {
|
|
207
|
-
this.componentAssets = this.demoClassDeclarations
|
|
208
|
-
.map((classDeclarations) => (0, helpers_1.getComponentAsset)(classDeclarations, this.context.inlineStyleLanguage, this.assetsFolder))
|
|
209
|
-
.reduce((acc, curr) => (Object.assign(Object.assign({}, acc), curr)), {});
|
|
210
|
-
this.dependencies.add(...this.assets.map((asset) => asset.originalPath));
|
|
211
|
-
return (0, operators_2.forkJoinOrEmpty)(Object.keys(this.componentAssets).map((key) => (0, operators_2.forkJoinOrEmpty)(this.componentAssets[key].map((asset) => (0, rxjs_1.from)((0, helpers_1.processHtml)(this, asset.output)).pipe((0, operators_1.tap)((output) => (asset.output = output))))))).pipe((0, operators_1.map)(() => ({
|
|
212
|
-
content: '',
|
|
213
|
-
filePath: this.demoAssetsPath,
|
|
214
|
-
postProcessFn: (content) => (0, rxjs_1.of)(content).pipe((0, operators_1.switchMap)(() => (0, operators_2.forkJoinOrEmpty)(Object.keys(this.componentAssets).map((key) => (0, operators_2.forkJoinOrEmpty)(this.componentAssets[key].map((asset) => (0, rxjs_1.from)((0, helpers_1.postProcessHtml)(this, asset.output)).pipe((0, operators_1.tap)((output) => (asset.output = output)))))))), (0, operators_1.map)(() => (0, nunjucks_1.renderTemplate)('./demo-assets.ts.nunj', {
|
|
215
|
-
context: {
|
|
216
|
-
demoAssets: this.componentAssets,
|
|
217
|
-
},
|
|
218
|
-
}))),
|
|
219
|
-
})));
|
|
220
|
-
}
|
|
221
|
-
return (0, rxjs_1.of)({ content: '', filePath: this.demoAssetsPath });
|
|
222
158
|
}
|
|
223
159
|
};
|
|
224
160
|
tslib_1.__setFunctionName(_classThis, "NgDocPageEntity");
|
|
225
161
|
(() => {
|
|
226
162
|
_get_mdPath_decorators = [(0, decorators_1.CachedFilesGetter)()];
|
|
227
|
-
_get_demoAssetsPath_decorators = [(0, decorators_1.CachedFilesGetter)()];
|
|
228
|
-
_get_playgroundsPath_decorators = [(0, decorators_1.CachedFilesGetter)()];
|
|
229
163
|
tslib_1.__esDecorate(_classThis, null, _get_mdPath_decorators, { kind: "getter", name: "mdPath", static: false, private: false, access: { has: obj => "mdPath" in obj, get: obj => obj.mdPath } }, null, _instanceExtraInitializers);
|
|
230
|
-
tslib_1.__esDecorate(_classThis, null, _get_demoAssetsPath_decorators, { kind: "getter", name: "demoAssetsPath", static: false, private: false, access: { has: obj => "demoAssetsPath" in obj, get: obj => obj.demoAssetsPath } }, null, _instanceExtraInitializers);
|
|
231
|
-
tslib_1.__esDecorate(_classThis, null, _get_playgroundsPath_decorators, { kind: "getter", name: "playgroundsPath", static: false, private: false, access: { has: obj => "playgroundsPath" in obj, get: obj => obj.playgroundsPath } }, null, _instanceExtraInitializers);
|
|
232
164
|
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers);
|
|
233
165
|
NgDocPageEntity = _classThis = _classDescriptor.value;
|
|
234
166
|
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/page.entity.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"page.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/page.entity.ts"],"names":[],"mappings":";;;;AAAA,uCAAuF;AACvF,+CAAyB;AACzB,mDAA6B;AAC7B,+BAAoC;AACpC,8CAAwC;AAExC,2CAAoE;AAEpE,wCAAwC;AACxC,0CAA2C;AAE3C,wEAAuE;AACvE,mDAAmE;AAEnE,yDAAuD;AACvD,qEAAmE;AACnE,uCAA4G;AAG/F,QAAA,eAAe;4BAD3B,IAAA,yBAAY,GAAE;;;;;;QACF,eAAe,qBAAC,SAAQ,yCAAgC;;;YAC3D,WAAM,yEAAuB;QA6JvC,CAAC;QA3JA,IAAa,KAAK;;YACjB,MAAM,UAAU,GAAW,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YAEtF,OAAO,MAAA,CAAC,IAAA,cAAO,EAAC,MAAA,IAAI,CAAC,MAAM,0CAAE,KAAK,CAAC,CAAC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AAC,gBAAgB;gBAC5B,OAAO,EAAE;oBACR,SAAS,EAAE,IAAI,CAAC,MAAM;oBACtB,YAAY,EAAE,IAAI,sBAAY,CAAC,IAAI,CAAC;iBACpC;gBACD,iBAAiB,EAAE,IAAI,CAAC,YAAY;gBACpC,OAAO,EAAE,KAAK;aACd,CAAC,CAAC;YAEH,OAAO,IAAA,SAAE,EAAC;gBACT,MAAM;gBACN,MAAM,EAAE,IAAI;gBACZ,eAAe,EAAE,CAAO,OAAe,EAAE,EAAE;oBAAC,OAAA,CAAC;wBAC5C,OAAO,EAAE,IAAA,yBAAc,EAAC,uBAAuB,EAAE;4BAChD,OAAO,EAAE;gCACR,IAAI,EAAE,IAAI;gCACV,WAAW,EAAE,OAAO;6BACpB;yBACD,CAAC;wBACF,QAAQ,EAAE,IAAI,CAAC,UAAU;qBACzB,CAAC,CAAA;kBAAA;gBACF,gBAAgB,EAAE,CAAC,IAAA,8BAAoB,GAAE,EAAE,IAAA,2BAAiB,GAAE,CAAC;gBAC/D,kBAAkB,EAAE,CAAC,IAAA,+BAAqB,GAAE,EAAE,IAAA,2BAAiB,GAAE,CAAC;aAClE,CAAC,CAAC;QACJ,CAAC;QAED,mBAAmB;;YAClB,MAAA,IAAI,CAAC,gBAAgB,0CAClB,aAAa,GACd,wBAAwB,GACxB,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;gBACvB,UAAU,CAAC,yBAAyB,EAAE,CAAC;YACxC,CAAC,CAAC,CAAC;QACL,CAAC;;;;kCA1FA,IAAA,8BAAiB,GAAE;QACpB,uLAAI,MAAM,wCAET;QAtEF,gKA8JC;QA9JY,eAAe;QAAf,+DAAe;;WAAf,eAAe"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addToDependenciesPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Adds the given string to the dependencies of the entity.
|
|
7
|
+
*/
|
|
8
|
+
function addToDependenciesPlugin() {
|
|
9
|
+
return {
|
|
10
|
+
id: 'addToDependenciesPlugin',
|
|
11
|
+
execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
entity.dependencies.add(data);
|
|
13
|
+
return data;
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.addToDependenciesPlugin = addToDependenciesPlugin;
|
|
18
|
+
// snippet:ts
|
|
19
|
+
// snippet:ts
|
|
20
|
+
//# sourceMappingURL=add-to-dependencies.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-to-dependencies.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.ts"],"names":[],"mappings":";;;;AAEA;;GAEG;AACH,SAAgB,uBAAuB;IACtC,OAAO;QACN,EAAE,EAAE,yBAAyB;QAC7B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAE9B,OAAO,IAAI,CAAC;QACb,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AATD,0DASC;AAED,aAAa;AAEb,aAAa"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NgDocEntity } from '../../abstractions/entity';
|
|
2
|
+
import { NgDocEntityPlugin } from '../types';
|
|
3
|
+
type ApplyFn<T, TEntity extends NgDocEntity> = (data: T, entity: TEntity) => Promise<T>;
|
|
4
|
+
type TransformFn<T, R, TEntity extends NgDocEntity> = (data: T, apply: ApplyFn<R, TEntity>, entity: TEntity) => Promise<T>;
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param fn
|
|
8
|
+
* @param get
|
|
9
|
+
* @param transform
|
|
10
|
+
* @param plugins
|
|
11
|
+
*/
|
|
12
|
+
export declare function applyPlugin<T, R, TEntity extends NgDocEntity = NgDocEntity>(transform: TransformFn<T, R, TEntity>, plugins: (data: R) => Array<NgDocEntityPlugin<R, TEntity>>): NgDocEntityPlugin<T, TEntity>;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare function forArrayItems<T, TEntity extends NgDocEntity>(): TransformFn<T[], T, TEntity>;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare function forObjectValues<T, K extends keyof T, TEntity extends NgDocEntity>(): TransformFn<T, T[K], TEntity>;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param key
|
|
24
|
+
*/
|
|
25
|
+
export declare function forObjectValue<T extends object, K extends keyof T, TEntity extends NgDocEntity>(key: K): TransformFn<T, T[K], TEntity>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forObjectValue = exports.forObjectValues = exports.forArrayItems = exports.applyPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@ng-doc/core");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param fn
|
|
9
|
+
* @param get
|
|
10
|
+
* @param transform
|
|
11
|
+
* @param plugins
|
|
12
|
+
*/
|
|
13
|
+
function applyPlugin(transform, plugins) {
|
|
14
|
+
return {
|
|
15
|
+
id: 'apply-plugins',
|
|
16
|
+
execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
const apply = (data) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
for (const plugin of plugins(data)) {
|
|
19
|
+
// eslint-disable-next-line no-await-in-loop
|
|
20
|
+
data = yield plugin.execute(data, entity);
|
|
21
|
+
}
|
|
22
|
+
return data;
|
|
23
|
+
});
|
|
24
|
+
return transform(data, apply, entity);
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.applyPlugin = applyPlugin;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
function forArrayItems() {
|
|
33
|
+
return (data, apply, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
for (let i = 0; i < data.length; i++) {
|
|
35
|
+
data[i] = yield apply(data[i], entity);
|
|
36
|
+
}
|
|
37
|
+
return data;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.forArrayItems = forArrayItems;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
function forObjectValues() {
|
|
45
|
+
return (data, apply, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const keys = (0, core_1.objectKeys)(data);
|
|
47
|
+
for (const k of keys) {
|
|
48
|
+
data[k] = yield apply(data[k], entity);
|
|
49
|
+
}
|
|
50
|
+
return data;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
exports.forObjectValues = forObjectValues;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param key
|
|
57
|
+
*/
|
|
58
|
+
function forObjectValue(key) {
|
|
59
|
+
return (data, apply, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
data[key] = yield apply(data[key], entity);
|
|
61
|
+
return data;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
exports.forObjectValue = forObjectValue;
|
|
65
|
+
//# sourceMappingURL=apply.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/apply.plugin.ts"],"names":[],"mappings":";;;;AAAA,uCAAwC;AAWxC;;;;;;GAMG;AACH,SAAgB,WAAW,CAC1B,SAAqC,EACrC,OAA0D;IAE1D,OAAO;QACN,EAAE,EAAE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M;IAEN,OAAO,CAAO,IAAO,EAAE,KAA6B,EAAE,MAAe,EAAc,EAAE;QACpF,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QAE3C,OAAO,IAAI,CAAC;IACb,CAAC,CAAA,CAAC;AACH,CAAC;AARD,wCAQC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractSnippetsPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const helpers_1 = require("../../../../helpers");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
function extractSnippetsPlugin() {
|
|
10
|
+
return {
|
|
11
|
+
id: 'extractSnippetsPlugin',
|
|
12
|
+
execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
return data
|
|
14
|
+
.map((asset) => {
|
|
15
|
+
const snippets = (0, helpers_1.snippetsFromAsset)(asset, entity.context.inlineStyleLanguage);
|
|
16
|
+
return snippets.length ? snippets : [asset];
|
|
17
|
+
})
|
|
18
|
+
.flat();
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
exports.extractSnippetsPlugin = extractSnippetsPlugin;
|
|
23
|
+
//# sourceMappingURL=extract-snippets.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-snippets.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/extract-snippets.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAAsD;AAItD;;GAEG;AACH,SAAgB,qBAAqB;IACpC,OAAO;QACN,EAAE,EAAE,uBAAuB;QAC3B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,OAAO,IAAI;iBACT,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACd,MAAM,QAAQ,GAAG,IAAA,2BAAiB,EAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;gBAE9E,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC7C,CAAC,CAAC;iBACD,IAAI,EAAE,CAAC;QACV,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAbD,sDAaC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fillIndexesPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const helpers_1 = require("../../../../helpers");
|
|
6
|
+
const build_indexes_1 = require("../../../../helpers/build-indexes");
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function fillIndexesPlugin() {
|
|
11
|
+
return {
|
|
12
|
+
id: 'fillIndexesPlugin',
|
|
13
|
+
execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
const indexes = yield (0, build_indexes_1.buildIndexes)({
|
|
15
|
+
title: entity.title,
|
|
16
|
+
content: data,
|
|
17
|
+
pageType: (0, helpers_1.getPageType)(entity),
|
|
18
|
+
breadcrumbs: entity.breadcrumbs,
|
|
19
|
+
route: entity.fullRoute,
|
|
20
|
+
});
|
|
21
|
+
entity.indexes.push(...indexes);
|
|
22
|
+
return data;
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.fillIndexesPlugin = fillIndexesPlugin;
|
|
27
|
+
//# sourceMappingURL=fill-indexes.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fill-indexes.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/fill-indexes.plugin.ts"],"names":[],"mappings":";;;;AAEA,iDAAgD;AAChD,qEAA+D;AAI/D;;GAEG;AACH,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,mBAAmB;QACvB,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,MAAM,OAAO,GAAqB,MAAM,IAAA,4BAAY,EAAC;gBACpD,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAA,qBAAW,EAAC,MAAM,CAAC;gBAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,KAAK,EAAE,MAAM,CAAC,SAAS;aACvB,CAAC,CAAC;YAEH,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;YAEhC,OAAO,IAAI,CAAC;QACb,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAjBD,8CAiBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './add-to-dependencies.plugin';
|
|
2
|
+
export * from "./apply.plugin";
|
|
3
|
+
export * from './extract-snippets.plugin';
|
|
4
|
+
export * from "./fill-indexes.plugin";
|
|
5
|
+
export * from "./markdown-to-html.plugin";
|
|
6
|
+
export * from "./post-process-html.plugin";
|
|
7
|
+
export * from "./process-html.plugin";
|
|
8
|
+
export * from './remove-lines.plugin';
|
|
9
|
+
export * from "./wrap-code.plugin";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./add-to-dependencies.plugin"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./apply.plugin"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./extract-snippets.plugin"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./fill-indexes.plugin"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./markdown-to-html.plugin"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./post-process-html.plugin"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./process-html.plugin"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./remove-lines.plugin"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./wrap-code.plugin"), exports);
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/index.ts"],"names":[],"mappings":";;;AAAA,uEAA6C;AAC7C,yDAA+B;AAC/B,oEAA0C;AAC1C,gEAAsC;AACtC,oEAA0C;AAC1C,qEAA2C;AAC3C,gEAAsC;AACtC,gEAAsC;AACtC,6DAAmC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.markdownToHtmlPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const helpers_1 = require("../../../../helpers");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
function markdownToHtmlPlugin() {
|
|
10
|
+
return {
|
|
11
|
+
id: 'markdownToHtmlPlugin',
|
|
12
|
+
execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
if ((0, helpers_1.isPageEntity)(entity)) {
|
|
14
|
+
return (0, helpers_1.markdownToHtml)(data, entity.mdFolder, entity.dependencies.add.bind(entity.dependencies));
|
|
15
|
+
}
|
|
16
|
+
return (0, helpers_1.markdownToHtml)(data);
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
exports.markdownToHtmlPlugin = markdownToHtmlPlugin;
|
|
21
|
+
//# sourceMappingURL=markdown-to-html.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-to-html.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAAiE;AAGjE;;GAEG;AACH,SAAgB,oBAAoB;IACnC,OAAO;QACN,EAAE,EAAE,sBAAsB;QAC1B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,IAAI,IAAA,sBAAY,EAAC,MAAM,CAAC,EAAE;gBACzB,OAAO,IAAA,wBAAc,EAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;aAChG;YAED,OAAO,IAAA,wBAAc,EAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAXD,oDAWC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.postProcessHtmlPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const helpers_1 = require("../../../../helpers");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
function postProcessHtmlPlugin() {
|
|
10
|
+
return {
|
|
11
|
+
id: 'postProcessHtmlPlugin',
|
|
12
|
+
execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
return (0, helpers_1.postProcessHtml)(data, entity);
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.postProcessHtmlPlugin = postProcessHtmlPlugin;
|
|
18
|
+
//# sourceMappingURL=post-process-html.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-process-html.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/post-process-html.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAAoD;AAGpD;;GAEG;AACH,SAAgB,qBAAqB;IACpC,OAAO;QACN,EAAE,EAAE,uBAAuB;QAC3B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,OAAO,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACtC,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAPD,sDAOC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.processHtmlPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const helpers_1 = require("../../../../helpers");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
function processHtmlPlugin() {
|
|
10
|
+
return {
|
|
11
|
+
id: 'processHtmlPlugin',
|
|
12
|
+
execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
return (0, helpers_1.processHtml)(data, entity);
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.processHtmlPlugin = processHtmlPlugin;
|
|
18
|
+
//# sourceMappingURL=process-html.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-html.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/process-html.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAAgD;AAGhD;;GAEG;AACH,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,mBAAmB;QACvB,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,OAAO,IAAA,qBAAW,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAClC,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAPD,8CAOC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeLinesPlugin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const helpers_1 = require("../../../../helpers");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
function removeLinesPlugin() {
|
|
10
|
+
return {
|
|
11
|
+
id: 'extractSnippetsPlugin',
|
|
12
|
+
execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
return data
|
|
14
|
+
.map((asset) => {
|
|
15
|
+
const snippets = (0, helpers_1.snippetsFromAsset)(asset, entity.context.inlineStyleLanguage);
|
|
16
|
+
return (snippets.length ? snippets : [asset]).map((asset) => (Object.assign(Object.assign({}, asset), { code: (0, helpers_1.removeLinesFromCode)(asset.code) })));
|
|
17
|
+
})
|
|
18
|
+
.flat();
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
exports.removeLinesPlugin = removeLinesPlugin;
|
|
23
|
+
//# sourceMappingURL=remove-lines.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-lines.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/remove-lines.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAA2E;AAI3E;;GAEG;AACH,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,uBAAuB;QAC3B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,OAAO,IAAI;iBACT,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACd,MAAM,QAAQ,GAAG,IAAA,2BAAiB,EAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;gBAE9E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iCACzD,KAAK,KACR,IAAI,EAAE,IAAA,6BAAmB,EAAC,KAAK,CAAC,IAAI,CAAC,IACpC,CAAC,CAAC;YACL,CAAC,CAAC;iBACD,IAAI,EAAE,CAAC;QACV,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAhBD,8CAgBC"}
|