@analogjs/content 1.4.0-beta.2 → 1.4.0-beta.4
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/esm2022/lib/anchor-navigation.directive.mjs +4 -4
- package/esm2022/lib/content-renderer.mjs +4 -4
- package/esm2022/lib/markdown-content-renderer.service.mjs +4 -4
- package/esm2022/lib/markdown-route.component.mjs +4 -4
- package/esm2022/lib/markdown.component.mjs +4 -4
- package/esm2022/lib/marked-setup.service.mjs +4 -4
- package/esm2022/lib/render-task.service.mjs +4 -4
- package/fesm2022/analogjs-content.mjs +461 -499
- package/fesm2022/analogjs-content.mjs.map +1 -7
- package/package.json +5 -5
|
@@ -1,320 +1,318 @@
|
|
|
1
|
-
|
|
2
|
-
import { Directive, HostListener,
|
|
3
|
-
import { DOCUMENT, Location } from
|
|
4
|
-
import { Router } from
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Directive, HostListener, InjectionToken, ɵPendingTasks as _PendingTasks, Injectable, Component, ViewEncapsulation, Input, NgZone, PLATFORM_ID, ViewContainerRef, ViewChild } from '@angular/core';
|
|
3
|
+
import { DOCUMENT, Location, AsyncPipe, isPlatformBrowser } from '@angular/common';
|
|
4
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
5
|
+
import { isObservable, firstValueFrom, of, Observable, from } from 'rxjs';
|
|
6
|
+
import { map, switchMap, tap, mergeMap, catchError } from 'rxjs/operators';
|
|
7
|
+
import fm from 'front-matter';
|
|
8
|
+
import { gfmHeadingId, getHeadingList } from 'marked-gfm-heading-id';
|
|
9
|
+
import { marked } from 'marked';
|
|
10
|
+
import { markedHighlight } from 'marked-highlight';
|
|
11
|
+
import 'prismjs';
|
|
12
|
+
import 'prismjs/components/prism-bash';
|
|
13
|
+
import 'prismjs/components/prism-css';
|
|
14
|
+
import 'prismjs/components/prism-javascript';
|
|
15
|
+
import 'prismjs/components/prism-json';
|
|
16
|
+
import 'prismjs/components/prism-markup';
|
|
17
|
+
import 'prismjs/components/prism-typescript';
|
|
18
|
+
import 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard';
|
|
19
|
+
import 'prismjs/plugins/toolbar/prism-toolbar';
|
|
20
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
21
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
22
|
+
|
|
23
|
+
class AnchorNavigationDirective {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.document = inject(DOCUMENT);
|
|
26
|
+
this.location = inject(Location);
|
|
27
|
+
this.router = inject(Router);
|
|
28
|
+
}
|
|
29
|
+
handleNavigation(element) {
|
|
30
|
+
if (element instanceof HTMLAnchorElement &&
|
|
31
|
+
isInternalUrl(element, this.document) &&
|
|
32
|
+
hasTargetSelf(element) &&
|
|
33
|
+
!hasDownloadAttribute(element)) {
|
|
34
|
+
const { pathname, search, hash } = element;
|
|
35
|
+
const url = this.location.normalize(`${pathname}${search}${hash}`);
|
|
36
|
+
this.router.navigateByUrl(url);
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
18
40
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
standalone: true
|
|
33
|
-
}]
|
|
34
|
-
}], propDecorators: { handleNavigation: [{
|
|
35
|
-
type: HostListener,
|
|
36
|
-
args: ["click", ["$event.target"]]
|
|
37
|
-
}] } });
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AnchorNavigationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: AnchorNavigationDirective, isStandalone: true, selector: "[analogAnchorNavigation]", host: { listeners: { "click": "handleNavigation($event.target)" } }, ngImport: i0 }); }
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AnchorNavigationDirective, decorators: [{
|
|
45
|
+
type: Directive,
|
|
46
|
+
args: [{
|
|
47
|
+
selector: '[analogAnchorNavigation]',
|
|
48
|
+
standalone: true,
|
|
49
|
+
}]
|
|
50
|
+
}], propDecorators: { handleNavigation: [{
|
|
51
|
+
type: HostListener,
|
|
52
|
+
args: ['click', ['$event.target']]
|
|
53
|
+
}] } });
|
|
38
54
|
function hasDownloadAttribute(anchorElement) {
|
|
39
|
-
|
|
55
|
+
return anchorElement.getAttribute('download') !== null;
|
|
40
56
|
}
|
|
41
57
|
function hasTargetSelf(anchorElement) {
|
|
42
|
-
|
|
58
|
+
return !anchorElement.target || anchorElement.target === '_self';
|
|
43
59
|
}
|
|
44
60
|
function isInternalUrl(anchorElement, document) {
|
|
45
|
-
|
|
61
|
+
return (anchorElement.host === document.location.host &&
|
|
62
|
+
anchorElement.protocol === document.location.protocol);
|
|
46
63
|
}
|
|
47
64
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Returns the list of content files by filename with ?analog-content-list=true.
|
|
67
|
+
* We use the query param to transform the return into an array of
|
|
68
|
+
* just front matter attributes.
|
|
69
|
+
*
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
const getContentFilesList = () => import.meta.glob(['/src/content/**/*.md', '/src/content/**/*.agx'], {
|
|
73
|
+
eager: true,
|
|
74
|
+
import: 'default',
|
|
75
|
+
query: { 'analog-content-list': true },
|
|
53
76
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Returns the lazy loaded content files for lookups.
|
|
79
|
+
*
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
const getContentFiles = () => import.meta.glob(['/src/content/**/*.md'], {
|
|
83
|
+
query: '?raw',
|
|
84
|
+
import: 'default',
|
|
57
85
|
});
|
|
58
|
-
|
|
86
|
+
const getAgxFiles = () => import.meta.glob(['/src/content/**/*.agx']);
|
|
59
87
|
|
|
60
|
-
// lib/content-files-list-token.mjs
|
|
61
|
-
import { InjectionToken } from "@angular/core";
|
|
62
88
|
function getSlug(filename) {
|
|
63
|
-
|
|
64
|
-
|
|
89
|
+
const parts = filename.match(/^(\\|\/)(.+(\\|\/))*(.+)\.(.+)$/);
|
|
90
|
+
return parts?.length ? parts[4] : '';
|
|
65
91
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
const CONTENT_FILES_LIST_TOKEN = new InjectionToken('@analogjs/content Content Files List', {
|
|
93
|
+
providedIn: 'root',
|
|
94
|
+
factory() {
|
|
95
|
+
const contentFiles = getContentFilesList();
|
|
96
|
+
return Object.keys(contentFiles).map((filename) => {
|
|
97
|
+
const attributes = contentFiles[filename];
|
|
98
|
+
const slug = attributes['slug'];
|
|
99
|
+
return {
|
|
100
|
+
filename,
|
|
101
|
+
attributes,
|
|
102
|
+
slug: slug ? encodeURI(slug) : encodeURI(getSlug(filename)),
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
},
|
|
80
106
|
});
|
|
81
107
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
return objectUsingSlugAttribute;
|
|
108
|
-
}
|
|
108
|
+
const CONTENT_FILES_TOKEN = new InjectionToken('@analogjs/content Content Files', {
|
|
109
|
+
providedIn: 'root',
|
|
110
|
+
factory() {
|
|
111
|
+
const contentFiles = getContentFiles();
|
|
112
|
+
const agxFiles = getAgxFiles();
|
|
113
|
+
const allFiles = { ...contentFiles, ...agxFiles };
|
|
114
|
+
const contentFilesList = inject(CONTENT_FILES_LIST_TOKEN);
|
|
115
|
+
const lookup = {};
|
|
116
|
+
contentFilesList.forEach((item) => {
|
|
117
|
+
const fileParts = item.filename.split('/');
|
|
118
|
+
const filePath = fileParts.slice(0, fileParts.length - 1).join('/');
|
|
119
|
+
const fileNameParts = fileParts[fileParts.length - 1].split('.');
|
|
120
|
+
lookup[item.filename] = `${filePath}/${item.slug}.${fileNameParts[fileNameParts.length - 1]}`;
|
|
121
|
+
});
|
|
122
|
+
const objectUsingSlugAttribute = {};
|
|
123
|
+
Object.entries(allFiles).forEach((entry) => {
|
|
124
|
+
const filename = entry[0];
|
|
125
|
+
const value = entry[1];
|
|
126
|
+
const newFilename = lookup[filename];
|
|
127
|
+
if (newFilename !== undefined) {
|
|
128
|
+
objectUsingSlugAttribute[newFilename] = value;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
return objectUsingSlugAttribute;
|
|
132
|
+
},
|
|
109
133
|
});
|
|
110
134
|
|
|
111
|
-
// lib/parse-raw-content-file.mjs
|
|
112
|
-
import fm from "front-matter";
|
|
113
135
|
function parseRawContentFile(rawContentFile) {
|
|
114
|
-
|
|
115
|
-
|
|
136
|
+
const { body, attributes } = fm(rawContentFile);
|
|
137
|
+
return { content: body, attributes };
|
|
116
138
|
}
|
|
117
139
|
|
|
118
|
-
// lib/utils/zone-wait-for.mjs
|
|
119
|
-
import { firstValueFrom, isObservable } from "rxjs";
|
|
120
140
|
async function waitFor(prom) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return p;
|
|
130
|
-
});
|
|
141
|
+
if (isObservable(prom)) {
|
|
142
|
+
prom = firstValueFrom(prom);
|
|
143
|
+
}
|
|
144
|
+
const macroTask = Zone.current.scheduleMacroTask(`AnalogContentResolve-${Math.random()}`, () => { }, {}, () => { });
|
|
145
|
+
return prom.then((p) => {
|
|
146
|
+
macroTask.invoke();
|
|
147
|
+
return p;
|
|
148
|
+
});
|
|
131
149
|
}
|
|
132
150
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
static {
|
|
148
|
-
this.ɵprov = i02.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i02, type: _RenderTaskService });
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i02, type: RenderTaskService, decorators: [{
|
|
152
|
-
type: Injectable
|
|
153
|
-
}] });
|
|
151
|
+
class RenderTaskService {
|
|
152
|
+
#pendingTasks = inject(_PendingTasks);
|
|
153
|
+
addRenderTask() {
|
|
154
|
+
return this.#pendingTasks.add();
|
|
155
|
+
}
|
|
156
|
+
clearRenderTask(id) {
|
|
157
|
+
this.#pendingTasks.remove(id);
|
|
158
|
+
}
|
|
159
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: RenderTaskService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
160
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: RenderTaskService }); }
|
|
161
|
+
}
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: RenderTaskService, decorators: [{
|
|
163
|
+
type: Injectable
|
|
164
|
+
}] });
|
|
154
165
|
|
|
155
|
-
|
|
156
|
-
import { inject as inject4 } from "@angular/core";
|
|
157
|
-
import { ActivatedRoute } from "@angular/router";
|
|
158
|
-
import { Observable, of } from "rxjs";
|
|
159
|
-
import { map, switchMap, tap } from "rxjs/operators";
|
|
166
|
+
/// <reference types="vite/client" />
|
|
160
167
|
function getContentFile(contentFiles, prefix, slug, fallback) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
return new Observable((observer) => {
|
|
172
|
-
const contentResolver = contentFile();
|
|
173
|
-
if (import.meta.env.SSR === true) {
|
|
174
|
-
waitFor(contentResolver).then((content) => {
|
|
175
|
-
observer.next(content);
|
|
176
|
-
});
|
|
177
|
-
} else {
|
|
178
|
-
contentResolver.then((content) => {
|
|
179
|
-
observer.next(content);
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
}).pipe(map((contentFile2) => {
|
|
183
|
-
if (typeof contentFile2 === "string") {
|
|
184
|
-
const { content, attributes } = parseRawContentFile(contentFile2);
|
|
185
|
-
return {
|
|
186
|
-
filename: filePath,
|
|
187
|
-
slug,
|
|
188
|
-
attributes,
|
|
189
|
-
content
|
|
190
|
-
};
|
|
168
|
+
const filePath = `/src/content/${prefix}${slug}`;
|
|
169
|
+
const contentFile = contentFiles[`${filePath}.md`] ?? contentFiles[`${filePath}.agx`];
|
|
170
|
+
if (!contentFile) {
|
|
171
|
+
return of({
|
|
172
|
+
filename: filePath,
|
|
173
|
+
attributes: {},
|
|
174
|
+
slug: '',
|
|
175
|
+
content: fallback,
|
|
176
|
+
});
|
|
191
177
|
}
|
|
192
|
-
return {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
178
|
+
return new Observable((observer) => {
|
|
179
|
+
const contentResolver = contentFile();
|
|
180
|
+
if (import.meta.env.SSR === true) {
|
|
181
|
+
waitFor(contentResolver).then((content) => {
|
|
182
|
+
observer.next(content);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
contentResolver.then((content) => {
|
|
187
|
+
observer.next(content);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}).pipe(map((contentFile) => {
|
|
191
|
+
if (typeof contentFile === 'string') {
|
|
192
|
+
const { content, attributes } = parseRawContentFile(contentFile);
|
|
193
|
+
return {
|
|
194
|
+
filename: filePath,
|
|
195
|
+
slug,
|
|
196
|
+
attributes,
|
|
197
|
+
content,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
filename: filePath,
|
|
202
|
+
slug,
|
|
203
|
+
attributes: contentFile.metadata,
|
|
204
|
+
content: contentFile.default,
|
|
205
|
+
};
|
|
206
|
+
}));
|
|
199
207
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
slug
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
208
|
+
/**
|
|
209
|
+
* Retrieves the static content using the provided param and/or prefix.
|
|
210
|
+
*
|
|
211
|
+
* @param param route parameter (default: 'slug')
|
|
212
|
+
* @param fallback fallback text if content file is not found (default: 'No Content Found')
|
|
213
|
+
*/
|
|
214
|
+
function injectContent(param = 'slug', fallback = 'No Content Found') {
|
|
215
|
+
const contentFiles = inject(CONTENT_FILES_TOKEN);
|
|
216
|
+
const renderTaskService = inject(RenderTaskService);
|
|
217
|
+
const task = renderTaskService.addRenderTask();
|
|
218
|
+
if (typeof param === 'string' || 'param' in param) {
|
|
219
|
+
const prefix = typeof param === 'string' ? '' : `${param.subdirectory}/`;
|
|
220
|
+
const route = inject(ActivatedRoute);
|
|
221
|
+
const paramKey = typeof param === 'string' ? param : param.param;
|
|
222
|
+
return route.paramMap.pipe(map((params) => params.get(paramKey)), switchMap((slug) => {
|
|
223
|
+
if (slug) {
|
|
224
|
+
return getContentFile(contentFiles, prefix, slug, fallback);
|
|
225
|
+
}
|
|
226
|
+
return of({
|
|
227
|
+
filename: '',
|
|
228
|
+
slug: '',
|
|
229
|
+
attributes: {},
|
|
230
|
+
content: fallback,
|
|
231
|
+
});
|
|
232
|
+
}), tap(() => renderTaskService.clearRenderTask(task)));
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
return getContentFile(contentFiles, '', param.customFilename, fallback).pipe(tap(() => renderTaskService.clearRenderTask(task)));
|
|
236
|
+
}
|
|
222
237
|
}
|
|
223
238
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
static {
|
|
241
|
-
this.ɵprov = i03.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i03, type: _ContentRenderer });
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
i03.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i03, type: ContentRenderer, decorators: [{
|
|
245
|
-
type: Injectable2
|
|
246
|
-
}] });
|
|
239
|
+
class ContentRenderer {
|
|
240
|
+
async render(content) {
|
|
241
|
+
return content;
|
|
242
|
+
}
|
|
243
|
+
getContentHeadings() {
|
|
244
|
+
return [];
|
|
245
|
+
}
|
|
246
|
+
// eslint-disable-next-line
|
|
247
|
+
enhance() { }
|
|
248
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ContentRenderer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
249
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ContentRenderer }); }
|
|
250
|
+
}
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ContentRenderer, decorators: [{
|
|
252
|
+
type: Injectable
|
|
253
|
+
}] });
|
|
247
254
|
|
|
248
|
-
// lib/inject-content-files.mjs
|
|
249
|
-
import { inject as inject5 } from "@angular/core";
|
|
250
255
|
function injectContentFiles(filterFn) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
const renderTaskService = inject(RenderTaskService);
|
|
257
|
+
const task = renderTaskService.addRenderTask();
|
|
258
|
+
const allContentFiles = inject(CONTENT_FILES_LIST_TOKEN);
|
|
259
|
+
renderTaskService.clearRenderTask(task);
|
|
260
|
+
if (filterFn) {
|
|
261
|
+
const filteredContentFiles = allContentFiles.filter(filterFn);
|
|
262
|
+
return filteredContentFiles;
|
|
263
|
+
}
|
|
264
|
+
return allContentFiles;
|
|
260
265
|
}
|
|
261
266
|
|
|
262
|
-
|
|
263
|
-
(function() {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
267
|
+
"use strict";
|
|
268
|
+
(function () {
|
|
269
|
+
if (typeof Prism === 'undefined') {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
Prism.languages.angular = Prism.languages.extend('markup', {
|
|
273
|
+
keyword: /(?:@if|@for|@switch|@defer|@loading|@error|@placeholder|prefetch)\b/,
|
|
274
|
+
operator: /\b(?:on|when)\b/,
|
|
275
|
+
number: {
|
|
276
|
+
pattern: /\b(minimum|after)\s+\d+(?:s|ms|)/gi,
|
|
277
|
+
lookbehind: true,
|
|
278
|
+
},
|
|
279
|
+
builtin: {
|
|
280
|
+
pattern: /\b(?:viewport|timer|minimum|after|hover|idle|immediate|interaction)/,
|
|
281
|
+
},
|
|
282
|
+
function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
|
|
283
|
+
});
|
|
284
|
+
Prism.languages.ng = Prism.languages.angular;
|
|
280
285
|
})();
|
|
281
286
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
async: true,
|
|
312
|
-
highlight: (code, lang) => {
|
|
313
|
-
let diff = lang?.startsWith("diff-");
|
|
314
|
-
lang = diff ? lang.replace("diff-", "") : lang || "typescript";
|
|
315
|
-
if (diff && !Prism.languages["diff"]) {
|
|
316
|
-
diff = false;
|
|
317
|
-
console.warn(`Notice:
|
|
287
|
+
/**
|
|
288
|
+
* Credit goes to Scully for original implementation
|
|
289
|
+
* https://github.com/scullyio/scully/blob/main/libs/scully/src/lib/fileHanderPlugins/markdown.ts
|
|
290
|
+
*/
|
|
291
|
+
class MarkedSetupService {
|
|
292
|
+
constructor() {
|
|
293
|
+
const renderer = new marked.Renderer();
|
|
294
|
+
renderer.code = (code, lang) => {
|
|
295
|
+
// Let's do a language based detection like on GitHub
|
|
296
|
+
// So we can still have non-interpreted mermaid code
|
|
297
|
+
if (lang === 'mermaid') {
|
|
298
|
+
return '<pre class="mermaid">' + code + '</pre>';
|
|
299
|
+
}
|
|
300
|
+
if (!lang) {
|
|
301
|
+
return '<pre><code>' + code + '</code></pre>';
|
|
302
|
+
}
|
|
303
|
+
const classes = lang.startsWith('diff') && Prism.languages['diff']
|
|
304
|
+
? `language-${lang} diff-highlight`
|
|
305
|
+
: `language-${lang.replace('diff-', '')}`;
|
|
306
|
+
return `<pre class="${classes}"><code class="${classes}">${code}</code></pre>`;
|
|
307
|
+
};
|
|
308
|
+
marked.use(gfmHeadingId(), markedHighlight({
|
|
309
|
+
async: true,
|
|
310
|
+
highlight: (code, lang) => {
|
|
311
|
+
let diff = lang?.startsWith('diff-');
|
|
312
|
+
lang = diff ? lang.replace('diff-', '') : lang || 'typescript';
|
|
313
|
+
if (diff && !Prism.languages['diff']) {
|
|
314
|
+
diff = false;
|
|
315
|
+
console.warn(`Notice:
|
|
318
316
|
---------------------------------------------------------------------------------------
|
|
319
317
|
The \`diff\` language and plugin are not available in the provided setup.
|
|
320
318
|
To enable it, add the following imports your \`main.ts\`:
|
|
@@ -322,242 +320,206 @@ var MarkedSetupService = class _MarkedSetupService {
|
|
|
322
320
|
import 'prismjs/plugins/diff-highlight/prism-diff-highlight';
|
|
323
321
|
---------------------------------------------------------------------------------------
|
|
324
322
|
`);
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
323
|
+
}
|
|
324
|
+
if (!Prism.languages[lang]) {
|
|
325
|
+
if (lang !== 'mermaid') {
|
|
326
|
+
console.warn(`Notice:
|
|
329
327
|
---------------------------------------------------------------------------------------
|
|
330
328
|
The requested language '${lang}' is not available in the provided setup.
|
|
331
329
|
To enable it, add the following import your \`main.ts\`:
|
|
332
330
|
import 'prismjs/components/prism-${lang}';
|
|
333
331
|
---------------------------------------------------------------------------------------
|
|
334
332
|
`);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
this.ɵ
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
};
|
|
362
|
-
i04.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i04, type: MarkedSetupService, decorators: [{
|
|
363
|
-
type: Injectable3
|
|
364
|
-
}], ctorParameters: () => [] });
|
|
333
|
+
}
|
|
334
|
+
return code;
|
|
335
|
+
}
|
|
336
|
+
return Prism.highlight(code, diff ? Prism.languages['diff'] : Prism.languages[lang], lang);
|
|
337
|
+
},
|
|
338
|
+
}), {
|
|
339
|
+
renderer,
|
|
340
|
+
pedantic: false,
|
|
341
|
+
gfm: true,
|
|
342
|
+
breaks: false,
|
|
343
|
+
sanitize: false,
|
|
344
|
+
smartypants: false,
|
|
345
|
+
xhtml: false,
|
|
346
|
+
mangle: false,
|
|
347
|
+
});
|
|
348
|
+
this.marked = marked;
|
|
349
|
+
}
|
|
350
|
+
getMarkedInstance() {
|
|
351
|
+
return this.marked;
|
|
352
|
+
}
|
|
353
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MarkedSetupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
354
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MarkedSetupService }); }
|
|
355
|
+
}
|
|
356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MarkedSetupService, decorators: [{
|
|
357
|
+
type: Injectable
|
|
358
|
+
}], ctorParameters: () => [] });
|
|
365
359
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
this.ɵfac = i05.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i05, type: _MarkdownContentRendererService, deps: [], target: i05.ɵɵFactoryTarget.Injectable });
|
|
386
|
-
}
|
|
387
|
-
static {
|
|
388
|
-
this.ɵprov = i05.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i05, type: _MarkdownContentRendererService });
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
i05.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i05, type: MarkdownContentRendererService, decorators: [{
|
|
392
|
-
type: Injectable4
|
|
393
|
-
}] });
|
|
360
|
+
class MarkdownContentRendererService {
|
|
361
|
+
#marked = inject(MarkedSetupService, { self: true });
|
|
362
|
+
async render(content) {
|
|
363
|
+
return this.#marked.getMarkedInstance().parse(content);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* The method is meant to be called after `render()`
|
|
367
|
+
*/
|
|
368
|
+
getContentHeadings() {
|
|
369
|
+
return getHeadingList();
|
|
370
|
+
}
|
|
371
|
+
// eslint-disable-next-line
|
|
372
|
+
enhance() { }
|
|
373
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MarkdownContentRendererService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
374
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MarkdownContentRendererService }); }
|
|
375
|
+
}
|
|
376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MarkdownContentRendererService, decorators: [{
|
|
377
|
+
type: Injectable
|
|
378
|
+
}] });
|
|
394
379
|
function withMarkdownRenderer(options) {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
380
|
+
return [
|
|
381
|
+
MarkedSetupService,
|
|
382
|
+
RenderTaskService,
|
|
383
|
+
{
|
|
384
|
+
provide: ContentRenderer,
|
|
385
|
+
useFactory: () => new MarkdownContentRendererService(),
|
|
386
|
+
deps: [MarkedSetupService],
|
|
387
|
+
},
|
|
388
|
+
options?.loadMermaid
|
|
389
|
+
? [
|
|
390
|
+
{
|
|
391
|
+
provide: MERMAID_IMPORT_TOKEN,
|
|
392
|
+
useFactory: options.loadMermaid,
|
|
393
|
+
},
|
|
394
|
+
]
|
|
395
|
+
: [],
|
|
396
|
+
];
|
|
410
397
|
}
|
|
411
398
|
function provideContent(...features) {
|
|
412
|
-
|
|
399
|
+
return [...features];
|
|
413
400
|
}
|
|
414
|
-
|
|
401
|
+
const MERMAID_IMPORT_TOKEN = new InjectionToken('mermaid_import');
|
|
415
402
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
this
|
|
428
|
-
this
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
standalone: true,
|
|
445
|
-
imports: [AsyncPipe],
|
|
446
|
-
hostDirectives: [AnchorNavigationDirective],
|
|
447
|
-
preserveWhitespaces: true,
|
|
448
|
-
encapsulation: ViewEncapsulation.None,
|
|
449
|
-
template: `<div [innerHTML]="content" [class]="classes"></div>`
|
|
450
|
-
}]
|
|
451
|
-
}], propDecorators: { classes: [{
|
|
452
|
-
type: Input
|
|
453
|
-
}] } });
|
|
403
|
+
class AnalogMarkdownRouteComponent {
|
|
404
|
+
constructor() {
|
|
405
|
+
this.sanitizer = inject(DomSanitizer);
|
|
406
|
+
this.route = inject(ActivatedRoute);
|
|
407
|
+
this.contentRenderer = inject(ContentRenderer);
|
|
408
|
+
this.content = this.sanitizer.bypassSecurityTrustHtml(this.route.snapshot.data['renderedAnalogContent']);
|
|
409
|
+
this.classes = 'analog-markdown-route';
|
|
410
|
+
}
|
|
411
|
+
ngAfterViewChecked() {
|
|
412
|
+
this.contentRenderer.enhance();
|
|
413
|
+
}
|
|
414
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AnalogMarkdownRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
415
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: AnalogMarkdownRouteComponent, isStandalone: true, selector: "analog-markdown-route", inputs: { classes: "classes" }, hostDirectives: [{ directive: AnchorNavigationDirective }], ngImport: i0, template: `<div [innerHTML]="content" [class]="classes"></div>`, isInline: true, encapsulation: i0.ViewEncapsulation.None, preserveWhitespaces: true }); }
|
|
416
|
+
}
|
|
417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AnalogMarkdownRouteComponent, decorators: [{
|
|
418
|
+
type: Component,
|
|
419
|
+
args: [{
|
|
420
|
+
selector: 'analog-markdown-route',
|
|
421
|
+
standalone: true,
|
|
422
|
+
imports: [AsyncPipe],
|
|
423
|
+
hostDirectives: [AnchorNavigationDirective],
|
|
424
|
+
preserveWhitespaces: true,
|
|
425
|
+
encapsulation: ViewEncapsulation.None,
|
|
426
|
+
template: `<div [innerHTML]="content" [class]="classes"></div>`,
|
|
427
|
+
}]
|
|
428
|
+
}], propDecorators: { classes: [{
|
|
429
|
+
type: Input
|
|
430
|
+
}] } });
|
|
454
431
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
432
|
+
class AnalogMarkdownComponent {
|
|
433
|
+
constructor() {
|
|
434
|
+
this.sanitizer = inject(DomSanitizer);
|
|
435
|
+
this.route = inject(ActivatedRoute);
|
|
436
|
+
this.zone = inject(NgZone);
|
|
437
|
+
this.platformId = inject(PLATFORM_ID);
|
|
438
|
+
this.mermaidImport = inject(MERMAID_IMPORT_TOKEN, {
|
|
439
|
+
optional: true,
|
|
440
|
+
});
|
|
441
|
+
this.content$ = this.getContentSource();
|
|
442
|
+
this.classes = 'analog-markdown';
|
|
443
|
+
this.contentRenderer = inject(ContentRenderer);
|
|
444
|
+
if (isPlatformBrowser(this.platformId) && this.mermaidImport) {
|
|
445
|
+
// Mermaid can only be loaded on client side
|
|
446
|
+
this.loadMermaid(this.mermaidImport);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
ngOnInit() {
|
|
450
|
+
this.updateContent();
|
|
451
|
+
}
|
|
452
|
+
ngOnChanges() {
|
|
453
|
+
this.updateContent();
|
|
454
|
+
}
|
|
455
|
+
updateContent() {
|
|
456
|
+
if (this.content && typeof this.content !== 'string') {
|
|
457
|
+
this.container.clear();
|
|
458
|
+
const componentRef = this.container.createComponent(this.content);
|
|
459
|
+
componentRef.changeDetectorRef.detectChanges();
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
this.content$ = this.getContentSource();
|
|
463
|
+
}
|
|
478
464
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
this.updateContent();
|
|
482
|
-
}
|
|
483
|
-
ngOnChanges() {
|
|
484
|
-
this.updateContent();
|
|
485
|
-
}
|
|
486
|
-
updateContent() {
|
|
487
|
-
if (this.content && typeof this.content !== "string") {
|
|
488
|
-
this.container.clear();
|
|
489
|
-
const componentRef = this.container.createComponent(this.content);
|
|
490
|
-
componentRef.changeDetectorRef.detectChanges();
|
|
491
|
-
} else {
|
|
492
|
-
this.content$ = this.getContentSource();
|
|
465
|
+
getContentSource() {
|
|
466
|
+
return this.route.data.pipe(map((data) => this.content ?? data['_analogContent']), mergeMap((contentString) => this.renderContent(contentString)), map((content) => this.sanitizer.bypassSecurityTrustHtml(content)), catchError((e) => of(`There was an error ${e}`)));
|
|
493
467
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
this.ɵfac = i07.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i07, type: _AnalogMarkdownComponent, deps: [], target: i07.ɵɵFactoryTarget.Component });
|
|
518
|
-
}
|
|
519
|
-
static {
|
|
520
|
-
this.ɵcmp = i07.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-rc.1", type: _AnalogMarkdownComponent, isStandalone: true, selector: "analog-markdown", inputs: { content: "content", classes: "classes" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, hostDirectives: [{ directive: AnchorNavigationDirective }], ngImport: i07, template: `<div
|
|
468
|
+
async renderContent(content) {
|
|
469
|
+
return this.contentRenderer.render(content);
|
|
470
|
+
}
|
|
471
|
+
ngAfterViewChecked() {
|
|
472
|
+
this.contentRenderer.enhance();
|
|
473
|
+
this.zone.runOutsideAngular(() => this.mermaid?.default.run());
|
|
474
|
+
}
|
|
475
|
+
loadMermaid(mermaidImport) {
|
|
476
|
+
this.zone.runOutsideAngular(() =>
|
|
477
|
+
// Wrap into an observable to avoid redundant initialization once
|
|
478
|
+
// the markdown component is destroyed before the promise is resolved.
|
|
479
|
+
from(mermaidImport)
|
|
480
|
+
.pipe(takeUntilDestroyed())
|
|
481
|
+
.subscribe((mermaid) => {
|
|
482
|
+
this.mermaid = mermaid;
|
|
483
|
+
this.mermaid.default.initialize({ startOnLoad: false });
|
|
484
|
+
// Explicitly running mermaid as ngAfterViewChecked
|
|
485
|
+
// has probably already been called
|
|
486
|
+
this.mermaid?.default.run();
|
|
487
|
+
}));
|
|
488
|
+
}
|
|
489
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AnalogMarkdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
490
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0", type: AnalogMarkdownComponent, isStandalone: true, selector: "analog-markdown", inputs: { content: "content", classes: "classes" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, hostDirectives: [{ directive: AnchorNavigationDirective }], ngImport: i0, template: `<div
|
|
521
491
|
#container
|
|
522
492
|
[innerHTML]="content$ | async"
|
|
523
493
|
[class]="classes"
|
|
524
|
-
></div>`, isInline: true, dependencies: [{ kind: "pipe", type:
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
template: `<div
|
|
494
|
+
></div>`, isInline: true, dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None, preserveWhitespaces: true }); }
|
|
495
|
+
}
|
|
496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: AnalogMarkdownComponent, decorators: [{
|
|
497
|
+
type: Component,
|
|
498
|
+
args: [{
|
|
499
|
+
selector: 'analog-markdown',
|
|
500
|
+
standalone: true,
|
|
501
|
+
imports: [AsyncPipe],
|
|
502
|
+
hostDirectives: [AnchorNavigationDirective],
|
|
503
|
+
preserveWhitespaces: true,
|
|
504
|
+
encapsulation: ViewEncapsulation.None,
|
|
505
|
+
template: `<div
|
|
537
506
|
#container
|
|
538
507
|
[innerHTML]="content$ | async"
|
|
539
508
|
[class]="classes"
|
|
540
|
-
></div
|
|
541
|
-
|
|
542
|
-
}], ctorParameters: () => [], propDecorators: { content: [{
|
|
543
|
-
|
|
544
|
-
}], classes: [{
|
|
545
|
-
|
|
546
|
-
}], container: [{
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
}] } });
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
MarkedSetupService,
|
|
557
|
-
injectContent,
|
|
558
|
-
injectContentFiles,
|
|
559
|
-
parseRawContentFile,
|
|
560
|
-
provideContent,
|
|
561
|
-
withMarkdownRenderer
|
|
562
|
-
};
|
|
509
|
+
></div>`,
|
|
510
|
+
}]
|
|
511
|
+
}], ctorParameters: () => [], propDecorators: { content: [{
|
|
512
|
+
type: Input
|
|
513
|
+
}], classes: [{
|
|
514
|
+
type: Input
|
|
515
|
+
}], container: [{
|
|
516
|
+
type: ViewChild,
|
|
517
|
+
args: ['container', { static: true, read: ViewContainerRef }]
|
|
518
|
+
}] } });
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Generated bundle index. Do not edit.
|
|
522
|
+
*/
|
|
523
|
+
|
|
524
|
+
export { AnchorNavigationDirective, ContentRenderer, AnalogMarkdownComponent as MarkdownComponent, MarkdownContentRendererService, AnalogMarkdownRouteComponent as MarkdownRouteComponent, MarkedSetupService, injectContent, injectContentFiles, parseRawContentFile, provideContent, withMarkdownRenderer };
|
|
563
525
|
//# sourceMappingURL=analogjs-content.mjs.map
|