@ng-prism/plugin-jsdoc 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.d.ts +4 -0
- package/dist/index.browser.d.ts.map +1 -0
- package/dist/index.browser.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/jsdoc-extractor.d.ts +3 -0
- package/dist/jsdoc-extractor.d.ts.map +1 -0
- package/dist/jsdoc-extractor.js +177 -0
- package/dist/jsdoc-panel.component.d.ts +25 -0
- package/dist/jsdoc-panel.component.d.ts.map +1 -0
- package/dist/jsdoc-panel.component.js +552 -0
- package/dist/jsdoc-plugin.browser.d.ts +3 -0
- package/dist/jsdoc-plugin.browser.d.ts.map +1 -0
- package/dist/jsdoc-plugin.browser.js +14 -0
- package/dist/jsdoc-plugin.d.ts +3 -0
- package/dist/jsdoc-plugin.d.ts.map +1 -0
- package/dist/jsdoc-plugin.js +26 -0
- package/dist/jsdoc.types.d.ts +25 -0
- package/dist/jsdoc.types.d.ts.map +1 -0
- package/dist/jsdoc.types.js +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdoc-extractor.d.ts","sourceRoot":"","sources":["../src/jsdoc-extractor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAkC,MAAM,kBAAkB,CAAC;AAElF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAatF"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import ts from 'typescript';
|
|
3
|
+
export function extractJsDocData(filePath, className) {
|
|
4
|
+
const sourceText = readFileSync(filePath, 'utf-8');
|
|
5
|
+
const sourceFile = ts.createSourceFile(filePath, sourceText, ts.ScriptTarget.ES2022, true);
|
|
6
|
+
const classDecl = findClassByName(sourceFile, className);
|
|
7
|
+
if (!classDecl)
|
|
8
|
+
return null;
|
|
9
|
+
return {
|
|
10
|
+
classDescription: extractDescription(classDecl),
|
|
11
|
+
classTags: extractTags(classDecl),
|
|
12
|
+
memberTags: extractAllMemberTags(classDecl),
|
|
13
|
+
methods: extractPublicMethods(classDecl),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function findClassByName(sourceFile, className) {
|
|
17
|
+
let found = null;
|
|
18
|
+
function visit(node) {
|
|
19
|
+
if (found)
|
|
20
|
+
return;
|
|
21
|
+
if (ts.isClassDeclaration(node) && node.name?.text === className) {
|
|
22
|
+
found = node;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
ts.forEachChild(node, visit);
|
|
26
|
+
}
|
|
27
|
+
visit(sourceFile);
|
|
28
|
+
return found;
|
|
29
|
+
}
|
|
30
|
+
function extractDescription(node) {
|
|
31
|
+
const jsDocNodes = node.jsDoc;
|
|
32
|
+
if (!jsDocNodes?.length)
|
|
33
|
+
return undefined;
|
|
34
|
+
const lastDoc = jsDocNodes[jsDocNodes.length - 1];
|
|
35
|
+
const comment = lastDoc.comment;
|
|
36
|
+
if (!comment)
|
|
37
|
+
return undefined;
|
|
38
|
+
if (typeof comment === 'string')
|
|
39
|
+
return comment.trim() || undefined;
|
|
40
|
+
return comment
|
|
41
|
+
.map((c) => (typeof c === 'string' ? c : c.text))
|
|
42
|
+
.join('')
|
|
43
|
+
.trim() || undefined;
|
|
44
|
+
}
|
|
45
|
+
function extractTags(node) {
|
|
46
|
+
const tags = ts.getJSDocTags(node);
|
|
47
|
+
return buildTagsFromList(tags);
|
|
48
|
+
}
|
|
49
|
+
function buildTagsFromList(tags) {
|
|
50
|
+
const result = {};
|
|
51
|
+
for (const tag of tags) {
|
|
52
|
+
const tagName = tag.tagName.text;
|
|
53
|
+
const comment = tagCommentToString(tag.comment);
|
|
54
|
+
if (tagName === 'deprecated') {
|
|
55
|
+
result.deprecated = comment || true;
|
|
56
|
+
}
|
|
57
|
+
else if (tagName === 'since') {
|
|
58
|
+
result.since = comment;
|
|
59
|
+
}
|
|
60
|
+
else if (tagName === 'see') {
|
|
61
|
+
const seeRef = extractSeeReference(tag, comment);
|
|
62
|
+
if (seeRef)
|
|
63
|
+
result.see = [...(result.see ?? []), seeRef];
|
|
64
|
+
}
|
|
65
|
+
else if (tagName === 'example') {
|
|
66
|
+
result.example = [...(result.example ?? []), ...(comment ? [comment] : [])];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
function extractSeeReference(tag, comment) {
|
|
72
|
+
const seeTag = tag;
|
|
73
|
+
const nameRef = seeTag.name?.name?.text ?? seeTag.name?.left?.text;
|
|
74
|
+
if (nameRef)
|
|
75
|
+
return nameRef;
|
|
76
|
+
if (comment && comment !== '*')
|
|
77
|
+
return comment;
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
function tagCommentToString(comment) {
|
|
81
|
+
if (!comment)
|
|
82
|
+
return undefined;
|
|
83
|
+
if (typeof comment === 'string')
|
|
84
|
+
return comment.trim() || undefined;
|
|
85
|
+
return comment
|
|
86
|
+
.map((c) => (typeof c === 'string' ? c : c.text))
|
|
87
|
+
.join('')
|
|
88
|
+
.trim() || undefined;
|
|
89
|
+
}
|
|
90
|
+
function extractAllMemberTags(classDecl) {
|
|
91
|
+
const result = {};
|
|
92
|
+
for (const member of classDecl.members) {
|
|
93
|
+
const name = getMemberName(member);
|
|
94
|
+
if (!name)
|
|
95
|
+
continue;
|
|
96
|
+
const tags = ts.getJSDocTags(member);
|
|
97
|
+
if (tags.length === 0)
|
|
98
|
+
continue;
|
|
99
|
+
result[name] = buildTagsFromList(tags);
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
function getMemberName(member) {
|
|
104
|
+
if (!member.name)
|
|
105
|
+
return undefined;
|
|
106
|
+
if (ts.isIdentifier(member.name))
|
|
107
|
+
return member.name.text;
|
|
108
|
+
if (ts.isStringLiteral(member.name))
|
|
109
|
+
return member.name.text;
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
const LIFECYCLE_HOOKS = new Set([
|
|
113
|
+
'ngOnInit', 'ngOnDestroy', 'ngOnChanges', 'ngDoCheck',
|
|
114
|
+
'ngAfterContentInit', 'ngAfterContentChecked',
|
|
115
|
+
'ngAfterViewInit', 'ngAfterViewChecked',
|
|
116
|
+
]);
|
|
117
|
+
function extractPublicMethods(classDecl) {
|
|
118
|
+
const result = [];
|
|
119
|
+
const sourceFile = classDecl.getSourceFile();
|
|
120
|
+
for (const member of classDecl.members) {
|
|
121
|
+
if (!ts.isMethodDeclaration(member))
|
|
122
|
+
continue;
|
|
123
|
+
const name = getMemberName(member);
|
|
124
|
+
if (!name || name.startsWith('_'))
|
|
125
|
+
continue;
|
|
126
|
+
if (LIFECYCLE_HOOKS.has(name))
|
|
127
|
+
continue;
|
|
128
|
+
const isPrivate = member.modifiers?.some((m) => m.kind === ts.SyntaxKind.PrivateKeyword || m.kind === ts.SyntaxKind.ProtectedKeyword);
|
|
129
|
+
if (isPrivate)
|
|
130
|
+
continue;
|
|
131
|
+
if (!hasDirectJsDoc(member, sourceFile))
|
|
132
|
+
continue;
|
|
133
|
+
const description = extractDescription(member);
|
|
134
|
+
const tags = extractTags(member);
|
|
135
|
+
const params = extractParamDocs(member);
|
|
136
|
+
const returnType = member.type ? member.type.getText() : undefined;
|
|
137
|
+
if (!description && Object.keys(tags).length === 0)
|
|
138
|
+
continue;
|
|
139
|
+
result.push({ name, description, tags, params, returnType });
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
143
|
+
function hasDirectJsDoc(node, sourceFile) {
|
|
144
|
+
const jsDocNodes = node.jsDoc;
|
|
145
|
+
if (!jsDocNodes?.length)
|
|
146
|
+
return false;
|
|
147
|
+
const lastDoc = jsDocNodes[jsDocNodes.length - 1];
|
|
148
|
+
const commentEnd = sourceFile.getLineAndCharacterOfPosition(lastDoc.end).line;
|
|
149
|
+
const methodStart = sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line;
|
|
150
|
+
if (methodStart - commentEnd > 1)
|
|
151
|
+
return false;
|
|
152
|
+
const commentText = lastDoc.getText(sourceFile);
|
|
153
|
+
const stripped = commentText.replace(/[/*\s]/g, '');
|
|
154
|
+
if (stripped.length === 0)
|
|
155
|
+
return false;
|
|
156
|
+
if (/^[*=\-_#~]+$/.test(stripped))
|
|
157
|
+
return false;
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
function extractParamDocs(method) {
|
|
161
|
+
const jsDocNodes = method.jsDoc;
|
|
162
|
+
if (!jsDocNodes?.length)
|
|
163
|
+
return [];
|
|
164
|
+
const lastDoc = jsDocNodes[jsDocNodes.length - 1];
|
|
165
|
+
if (!lastDoc.tags)
|
|
166
|
+
return [];
|
|
167
|
+
const result = [];
|
|
168
|
+
for (const tag of lastDoc.tags) {
|
|
169
|
+
if (!ts.isJSDocParameterTag(tag))
|
|
170
|
+
continue;
|
|
171
|
+
const name = ts.isIdentifier(tag.name) ? tag.name.text : tag.name.getText();
|
|
172
|
+
const type = tag.typeExpression ? tag.typeExpression.type.getText() : undefined;
|
|
173
|
+
const description = tagCommentToString(tag.comment);
|
|
174
|
+
result.push({ name, type, description });
|
|
175
|
+
}
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { InputMeta, OutputMeta } from '@ng-prism/core/plugin';
|
|
2
|
+
import type { JsDocData, MethodDoc } from './jsdoc.types.js';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class JsDocPanelComponent {
|
|
5
|
+
readonly activeComponent: import("@angular/core").InputSignal<unknown>;
|
|
6
|
+
protected readonly jsdocData: import("@angular/core").Signal<JsDocData | null>;
|
|
7
|
+
protected readonly inputs: import("@angular/core").Signal<InputMeta[]>;
|
|
8
|
+
protected readonly outputs: import("@angular/core").Signal<OutputMeta[]>;
|
|
9
|
+
protected readonly classDescription: import("@angular/core").Signal<string | undefined>;
|
|
10
|
+
protected readonly classTags: import("@angular/core").Signal<import("./jsdoc.types.js").JsDocTags>;
|
|
11
|
+
protected readonly isDeprecated: import("@angular/core").Signal<boolean>;
|
|
12
|
+
protected readonly deprecatedMessage: import("@angular/core").Signal<string | undefined>;
|
|
13
|
+
protected readonly since: import("@angular/core").Signal<string | undefined>;
|
|
14
|
+
protected readonly seeRefs: import("@angular/core").Signal<string[]>;
|
|
15
|
+
protected readonly examples: import("@angular/core").Signal<string[]>;
|
|
16
|
+
protected readonly methods: import("@angular/core").Signal<MethodDoc[]>;
|
|
17
|
+
protected readonly hasTags: import("@angular/core").Signal<boolean>;
|
|
18
|
+
protected isMemberDeprecated(name: string): boolean;
|
|
19
|
+
protected getMemberSince(name: string): string | undefined;
|
|
20
|
+
protected memberDocLine(name: string, doc: string | undefined): string;
|
|
21
|
+
protected formatDefault(value: unknown): string;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsDocPanelComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<JsDocPanelComponent, "prism-jsdoc-panel", never, { "activeComponent": { "alias": "activeComponent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=jsdoc-panel.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdoc-panel.component.d.ts","sourceRoot":"","sources":["../src/jsdoc-panel.component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;;AAE7D,qBAwSa,mBAAmB;IAC9B,QAAQ,CAAC,eAAe,+CAAwB;IAEhD,SAAS,CAAC,QAAQ,CAAC,SAAS,mDAGzB;IAEH,SAAS,CAAC,QAAQ,CAAC,MAAM,8CAGtB;IAEH,SAAS,CAAC,QAAQ,CAAC,OAAO,+CAGvB;IAEH,SAAS,CAAC,QAAQ,CAAC,gBAAgB,qDAAsD;IAEzF,SAAS,CAAC,QAAQ,CAAC,SAAS,uEAAqD;IAEjF,SAAS,CAAC,QAAQ,CAAC,YAAY,0CAAiD;IAEhF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,qDAGjC;IAEH,SAAS,CAAC,QAAQ,CAAC,KAAK,qDAA0C;IAElE,SAAS,CAAC,QAAQ,CAAC,OAAO,2CAA8C;IAExE,SAAS,CAAC,QAAQ,CAAC,QAAQ,2CAAkD;IAE7E,SAAS,CAAC,QAAQ,CAAC,OAAO,8CAAgE;IAE1F,SAAS,CAAC,QAAQ,CAAC,OAAO,0CAExB;IAEF,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAInD,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI1D,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAQtE,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;yCAzDpC,mBAAmB;2CAAnB,mBAAmB;CA6D/B"}
|
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
|
+
import { Highlight } from 'ngx-highlightjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _forTrack0 = ($index, $item) => $item.name;
|
|
5
|
+
function JsDocPanelComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
7
|
+
i0.ɵɵtext(1, "Select a component to view API documentation.");
|
|
8
|
+
i0.ɵɵelementEnd();
|
|
9
|
+
} }
|
|
10
|
+
function JsDocPanelComponent_Conditional_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
+
i0.ɵɵelementStart(0, "p", 2);
|
|
12
|
+
i0.ɵɵtext(1);
|
|
13
|
+
i0.ɵɵelementEnd();
|
|
14
|
+
} if (rf & 2) {
|
|
15
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
16
|
+
i0.ɵɵadvance();
|
|
17
|
+
i0.ɵɵtextInterpolate(ctx_r0.classDescription());
|
|
18
|
+
} }
|
|
19
|
+
function JsDocPanelComponent_Conditional_2_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
20
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
21
|
+
i0.ɵɵtext(1);
|
|
22
|
+
i0.ɵɵelementEnd();
|
|
23
|
+
} if (rf & 2) {
|
|
24
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
25
|
+
i0.ɵɵadvance();
|
|
26
|
+
i0.ɵɵtextInterpolate1(" Deprecated", ctx_r0.deprecatedMessage() ? ": " + ctx_r0.deprecatedMessage() : "", " ");
|
|
27
|
+
} }
|
|
28
|
+
function JsDocPanelComponent_Conditional_2_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
+
i0.ɵɵelementStart(0, "span", 6)(1, "span", 7);
|
|
30
|
+
i0.ɵɵtext(2, "Since:");
|
|
31
|
+
i0.ɵɵelementEnd();
|
|
32
|
+
i0.ɵɵtext(3);
|
|
33
|
+
i0.ɵɵelementEnd();
|
|
34
|
+
} if (rf & 2) {
|
|
35
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
36
|
+
i0.ɵɵadvance(3);
|
|
37
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.since(), " ");
|
|
38
|
+
} }
|
|
39
|
+
function JsDocPanelComponent_Conditional_2_Conditional_1_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
40
|
+
i0.ɵɵelementStart(0, "span", 6)(1, "span", 7);
|
|
41
|
+
i0.ɵɵtext(2, "See:");
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
i0.ɵɵtext(3);
|
|
44
|
+
i0.ɵɵelementEnd();
|
|
45
|
+
} if (rf & 2) {
|
|
46
|
+
const ref_r2 = ctx.$implicit;
|
|
47
|
+
i0.ɵɵadvance(3);
|
|
48
|
+
i0.ɵɵtextInterpolate1(" ", ref_r2, " ");
|
|
49
|
+
} }
|
|
50
|
+
function JsDocPanelComponent_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
52
|
+
i0.ɵɵconditionalCreate(1, JsDocPanelComponent_Conditional_2_Conditional_1_Conditional_1_Template, 2, 1, "span", 5);
|
|
53
|
+
i0.ɵɵconditionalCreate(2, JsDocPanelComponent_Conditional_2_Conditional_1_Conditional_2_Template, 4, 1, "span", 6);
|
|
54
|
+
i0.ɵɵrepeaterCreate(3, JsDocPanelComponent_Conditional_2_Conditional_1_For_4_Template, 4, 1, "span", 6, i0.ɵɵrepeaterTrackByIndex);
|
|
55
|
+
i0.ɵɵelementEnd();
|
|
56
|
+
} if (rf & 2) {
|
|
57
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
58
|
+
i0.ɵɵadvance();
|
|
59
|
+
i0.ɵɵconditional(ctx_r0.isDeprecated() ? 1 : -1);
|
|
60
|
+
i0.ɵɵadvance();
|
|
61
|
+
i0.ɵɵconditional(ctx_r0.since() ? 2 : -1);
|
|
62
|
+
i0.ɵɵadvance();
|
|
63
|
+
i0.ɵɵrepeater(ctx_r0.seeRefs());
|
|
64
|
+
} }
|
|
65
|
+
function JsDocPanelComponent_Conditional_2_Conditional_2_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
+
i0.ɵɵelementStart(0, "pre", 9);
|
|
67
|
+
i0.ɵɵelement(1, "code", 10);
|
|
68
|
+
i0.ɵɵelementEnd();
|
|
69
|
+
} if (rf & 2) {
|
|
70
|
+
const example_r3 = ctx.$implicit;
|
|
71
|
+
i0.ɵɵadvance();
|
|
72
|
+
i0.ɵɵproperty("highlight", example_r3);
|
|
73
|
+
} }
|
|
74
|
+
function JsDocPanelComponent_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
75
|
+
i0.ɵɵelementStart(0, "div", 4)(1, "h3", 8);
|
|
76
|
+
i0.ɵɵtext(2, "Examples");
|
|
77
|
+
i0.ɵɵelementEnd();
|
|
78
|
+
i0.ɵɵrepeaterCreate(3, JsDocPanelComponent_Conditional_2_Conditional_2_For_4_Template, 2, 1, "pre", 9, i0.ɵɵrepeaterTrackByIndex);
|
|
79
|
+
i0.ɵɵelementEnd();
|
|
80
|
+
} if (rf & 2) {
|
|
81
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
82
|
+
i0.ɵɵadvance(3);
|
|
83
|
+
i0.ɵɵrepeater(ctx_r0.examples());
|
|
84
|
+
} }
|
|
85
|
+
function JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
86
|
+
i0.ɵɵelementStart(0, "span", 14);
|
|
87
|
+
i0.ɵɵtext(1, "deprecated");
|
|
88
|
+
i0.ɵɵelementEnd();
|
|
89
|
+
} }
|
|
90
|
+
function JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
91
|
+
i0.ɵɵelementStart(0, "code");
|
|
92
|
+
i0.ɵɵtext(1);
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
} if (rf & 2) {
|
|
95
|
+
const inp_r4 = i0.ɵɵnextContext().$implicit;
|
|
96
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
97
|
+
i0.ɵɵadvance();
|
|
98
|
+
i0.ɵɵtextInterpolate(ctx_r0.formatDefault(inp_r4.defaultValue));
|
|
99
|
+
} }
|
|
100
|
+
function JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
102
|
+
i0.ɵɵtext(1, "\u2014");
|
|
103
|
+
i0.ɵɵelementEnd();
|
|
104
|
+
} }
|
|
105
|
+
function JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
+
i0.ɵɵelementStart(0, "span", 19);
|
|
107
|
+
i0.ɵɵtext(1, "required");
|
|
108
|
+
i0.ɵɵelementEnd();
|
|
109
|
+
} }
|
|
110
|
+
function JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
112
|
+
i0.ɵɵtext(1, "\u2014");
|
|
113
|
+
i0.ɵɵelementEnd();
|
|
114
|
+
} }
|
|
115
|
+
function JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 13)(2, "code");
|
|
117
|
+
i0.ɵɵtext(3);
|
|
118
|
+
i0.ɵɵelementEnd();
|
|
119
|
+
i0.ɵɵconditionalCreate(4, JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_4_Template, 2, 0, "span", 14);
|
|
120
|
+
i0.ɵɵelementEnd();
|
|
121
|
+
i0.ɵɵelementStart(5, "td", 15)(6, "code");
|
|
122
|
+
i0.ɵɵtext(7);
|
|
123
|
+
i0.ɵɵelementEnd()();
|
|
124
|
+
i0.ɵɵelementStart(8, "td", 16);
|
|
125
|
+
i0.ɵɵconditionalCreate(9, JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_9_Template, 2, 1, "code")(10, JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_10_Template, 2, 0, "span", 17);
|
|
126
|
+
i0.ɵɵelementEnd();
|
|
127
|
+
i0.ɵɵelementStart(11, "td", 18);
|
|
128
|
+
i0.ɵɵconditionalCreate(12, JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_12_Template, 2, 0, "span", 19)(13, JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Conditional_13_Template, 2, 0, "span", 17);
|
|
129
|
+
i0.ɵɵelementEnd();
|
|
130
|
+
i0.ɵɵelementStart(14, "td", 20);
|
|
131
|
+
i0.ɵɵtext(15);
|
|
132
|
+
i0.ɵɵelementEnd()();
|
|
133
|
+
} if (rf & 2) {
|
|
134
|
+
const inp_r4 = ctx.$implicit;
|
|
135
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
136
|
+
i0.ɵɵclassProp("prism-jsdoc-panel__row--deprecated", ctx_r0.isMemberDeprecated(inp_r4.name));
|
|
137
|
+
i0.ɵɵadvance(3);
|
|
138
|
+
i0.ɵɵtextInterpolate(inp_r4.name);
|
|
139
|
+
i0.ɵɵadvance();
|
|
140
|
+
i0.ɵɵconditional(ctx_r0.isMemberDeprecated(inp_r4.name) ? 4 : -1);
|
|
141
|
+
i0.ɵɵadvance(3);
|
|
142
|
+
i0.ɵɵtextInterpolate(inp_r4.rawType ?? inp_r4.type);
|
|
143
|
+
i0.ɵɵadvance(2);
|
|
144
|
+
i0.ɵɵconditional(inp_r4.defaultValue !== undefined ? 9 : 10);
|
|
145
|
+
i0.ɵɵadvance(3);
|
|
146
|
+
i0.ɵɵconditional(inp_r4.required ? 12 : 13);
|
|
147
|
+
i0.ɵɵadvance(3);
|
|
148
|
+
i0.ɵɵtextInterpolate1(" ", inp_r4.doc ?? ctx_r0.getMemberSince(inp_r4.name) ? ctx_r0.memberDocLine(inp_r4.name, inp_r4.doc) : "", " ");
|
|
149
|
+
} }
|
|
150
|
+
function JsDocPanelComponent_Conditional_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
151
|
+
i0.ɵɵelementStart(0, "div", 4)(1, "h3", 8);
|
|
152
|
+
i0.ɵɵtext(2, "Inputs");
|
|
153
|
+
i0.ɵɵelementEnd();
|
|
154
|
+
i0.ɵɵelementStart(3, "table", 11)(4, "thead")(5, "tr")(6, "th");
|
|
155
|
+
i0.ɵɵtext(7, "Name");
|
|
156
|
+
i0.ɵɵelementEnd();
|
|
157
|
+
i0.ɵɵelementStart(8, "th");
|
|
158
|
+
i0.ɵɵtext(9, "Type");
|
|
159
|
+
i0.ɵɵelementEnd();
|
|
160
|
+
i0.ɵɵelementStart(10, "th");
|
|
161
|
+
i0.ɵɵtext(11, "Default");
|
|
162
|
+
i0.ɵɵelementEnd();
|
|
163
|
+
i0.ɵɵelementStart(12, "th");
|
|
164
|
+
i0.ɵɵtext(13, "Required");
|
|
165
|
+
i0.ɵɵelementEnd();
|
|
166
|
+
i0.ɵɵelementStart(14, "th");
|
|
167
|
+
i0.ɵɵtext(15, "Description");
|
|
168
|
+
i0.ɵɵelementEnd()()();
|
|
169
|
+
i0.ɵɵelementStart(16, "tbody");
|
|
170
|
+
i0.ɵɵrepeaterCreate(17, JsDocPanelComponent_Conditional_2_Conditional_3_For_18_Template, 16, 8, "tr", 12, _forTrack0);
|
|
171
|
+
i0.ɵɵelementEnd()()();
|
|
172
|
+
} if (rf & 2) {
|
|
173
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
174
|
+
i0.ɵɵadvance(17);
|
|
175
|
+
i0.ɵɵrepeater(ctx_r0.inputs());
|
|
176
|
+
} }
|
|
177
|
+
function JsDocPanelComponent_Conditional_2_Conditional_4_For_12_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
178
|
+
i0.ɵɵelementStart(0, "span", 14);
|
|
179
|
+
i0.ɵɵtext(1, "deprecated");
|
|
180
|
+
i0.ɵɵelementEnd();
|
|
181
|
+
} }
|
|
182
|
+
function JsDocPanelComponent_Conditional_2_Conditional_4_For_12_Template(rf, ctx) { if (rf & 1) {
|
|
183
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 13)(2, "code");
|
|
184
|
+
i0.ɵɵtext(3);
|
|
185
|
+
i0.ɵɵelementEnd();
|
|
186
|
+
i0.ɵɵconditionalCreate(4, JsDocPanelComponent_Conditional_2_Conditional_4_For_12_Conditional_4_Template, 2, 0, "span", 14);
|
|
187
|
+
i0.ɵɵelementEnd();
|
|
188
|
+
i0.ɵɵelementStart(5, "td", 20);
|
|
189
|
+
i0.ɵɵtext(6);
|
|
190
|
+
i0.ɵɵelementEnd()();
|
|
191
|
+
} if (rf & 2) {
|
|
192
|
+
const out_r5 = ctx.$implicit;
|
|
193
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
194
|
+
i0.ɵɵclassProp("prism-jsdoc-panel__row--deprecated", ctx_r0.isMemberDeprecated(out_r5.name));
|
|
195
|
+
i0.ɵɵadvance(3);
|
|
196
|
+
i0.ɵɵtextInterpolate(out_r5.name);
|
|
197
|
+
i0.ɵɵadvance();
|
|
198
|
+
i0.ɵɵconditional(ctx_r0.isMemberDeprecated(out_r5.name) ? 4 : -1);
|
|
199
|
+
i0.ɵɵadvance(2);
|
|
200
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.memberDocLine(out_r5.name, out_r5.doc), " ");
|
|
201
|
+
} }
|
|
202
|
+
function JsDocPanelComponent_Conditional_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
203
|
+
i0.ɵɵelementStart(0, "div", 4)(1, "h3", 8);
|
|
204
|
+
i0.ɵɵtext(2, "Outputs");
|
|
205
|
+
i0.ɵɵelementEnd();
|
|
206
|
+
i0.ɵɵelementStart(3, "table", 11)(4, "thead")(5, "tr")(6, "th");
|
|
207
|
+
i0.ɵɵtext(7, "Name");
|
|
208
|
+
i0.ɵɵelementEnd();
|
|
209
|
+
i0.ɵɵelementStart(8, "th");
|
|
210
|
+
i0.ɵɵtext(9, "Description");
|
|
211
|
+
i0.ɵɵelementEnd()()();
|
|
212
|
+
i0.ɵɵelementStart(10, "tbody");
|
|
213
|
+
i0.ɵɵrepeaterCreate(11, JsDocPanelComponent_Conditional_2_Conditional_4_For_12_Template, 7, 5, "tr", 12, _forTrack0);
|
|
214
|
+
i0.ɵɵelementEnd()()();
|
|
215
|
+
} if (rf & 2) {
|
|
216
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
217
|
+
i0.ɵɵadvance(11);
|
|
218
|
+
i0.ɵɵrepeater(ctx_r0.outputs());
|
|
219
|
+
} }
|
|
220
|
+
function JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
221
|
+
i0.ɵɵelementStart(0, "span", 14);
|
|
222
|
+
i0.ɵɵtext(1, "deprecated");
|
|
223
|
+
i0.ɵɵelementEnd();
|
|
224
|
+
} }
|
|
225
|
+
function JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_6_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
226
|
+
i0.ɵɵelementStart(0, "div")(1, "code");
|
|
227
|
+
i0.ɵɵtext(2);
|
|
228
|
+
i0.ɵɵelementEnd()();
|
|
229
|
+
} if (rf & 2) {
|
|
230
|
+
const p_r6 = ctx.$implicit;
|
|
231
|
+
i0.ɵɵadvance(2);
|
|
232
|
+
i0.ɵɵtextInterpolate2("", p_r6.name, "", p_r6.type ? ": " + p_r6.type : "");
|
|
233
|
+
} }
|
|
234
|
+
function JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
235
|
+
i0.ɵɵrepeaterCreate(0, JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_6_For_1_Template, 3, 2, "div", null, _forTrack0);
|
|
236
|
+
} if (rf & 2) {
|
|
237
|
+
const method_r7 = i0.ɵɵnextContext().$implicit;
|
|
238
|
+
i0.ɵɵrepeater(method_r7.params);
|
|
239
|
+
} }
|
|
240
|
+
function JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
241
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
242
|
+
i0.ɵɵtext(1, "\u2014");
|
|
243
|
+
i0.ɵɵelementEnd();
|
|
244
|
+
} }
|
|
245
|
+
function JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
246
|
+
i0.ɵɵelementStart(0, "code");
|
|
247
|
+
i0.ɵɵtext(1);
|
|
248
|
+
i0.ɵɵelementEnd();
|
|
249
|
+
} if (rf & 2) {
|
|
250
|
+
const method_r7 = i0.ɵɵnextContext().$implicit;
|
|
251
|
+
i0.ɵɵadvance();
|
|
252
|
+
i0.ɵɵtextInterpolate(method_r7.returnType);
|
|
253
|
+
} }
|
|
254
|
+
function JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
255
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
256
|
+
i0.ɵɵtext(1, "void");
|
|
257
|
+
i0.ɵɵelementEnd();
|
|
258
|
+
} }
|
|
259
|
+
function JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Template(rf, ctx) { if (rf & 1) {
|
|
260
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 13)(2, "code");
|
|
261
|
+
i0.ɵɵtext(3);
|
|
262
|
+
i0.ɵɵelementEnd();
|
|
263
|
+
i0.ɵɵconditionalCreate(4, JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_4_Template, 2, 0, "span", 14);
|
|
264
|
+
i0.ɵɵelementEnd();
|
|
265
|
+
i0.ɵɵelementStart(5, "td", 15);
|
|
266
|
+
i0.ɵɵconditionalCreate(6, JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_6_Template, 2, 0)(7, JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_7_Template, 2, 0, "span", 17);
|
|
267
|
+
i0.ɵɵelementEnd();
|
|
268
|
+
i0.ɵɵelementStart(8, "td", 15);
|
|
269
|
+
i0.ɵɵconditionalCreate(9, JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_9_Template, 2, 1, "code")(10, JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Conditional_10_Template, 2, 0, "span", 17);
|
|
270
|
+
i0.ɵɵelementEnd();
|
|
271
|
+
i0.ɵɵelementStart(11, "td", 20);
|
|
272
|
+
i0.ɵɵtext(12);
|
|
273
|
+
i0.ɵɵelementEnd()();
|
|
274
|
+
} if (rf & 2) {
|
|
275
|
+
const method_r7 = ctx.$implicit;
|
|
276
|
+
i0.ɵɵclassProp("prism-jsdoc-panel__row--deprecated", !!method_r7.tags.deprecated);
|
|
277
|
+
i0.ɵɵadvance(3);
|
|
278
|
+
i0.ɵɵtextInterpolate1("", method_r7.name, "()");
|
|
279
|
+
i0.ɵɵadvance();
|
|
280
|
+
i0.ɵɵconditional(method_r7.tags.deprecated ? 4 : -1);
|
|
281
|
+
i0.ɵɵadvance(2);
|
|
282
|
+
i0.ɵɵconditional(method_r7.params.length ? 6 : 7);
|
|
283
|
+
i0.ɵɵadvance(3);
|
|
284
|
+
i0.ɵɵconditional(method_r7.returnType ? 9 : 10);
|
|
285
|
+
i0.ɵɵadvance(3);
|
|
286
|
+
i0.ɵɵtextInterpolate1(" ", method_r7.description ?? "", " ");
|
|
287
|
+
} }
|
|
288
|
+
function JsDocPanelComponent_Conditional_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
289
|
+
i0.ɵɵelementStart(0, "div", 4)(1, "h3", 8);
|
|
290
|
+
i0.ɵɵtext(2, "Methods");
|
|
291
|
+
i0.ɵɵelementEnd();
|
|
292
|
+
i0.ɵɵelementStart(3, "table", 11)(4, "thead")(5, "tr")(6, "th");
|
|
293
|
+
i0.ɵɵtext(7, "Name");
|
|
294
|
+
i0.ɵɵelementEnd();
|
|
295
|
+
i0.ɵɵelementStart(8, "th");
|
|
296
|
+
i0.ɵɵtext(9, "Parameters");
|
|
297
|
+
i0.ɵɵelementEnd();
|
|
298
|
+
i0.ɵɵelementStart(10, "th");
|
|
299
|
+
i0.ɵɵtext(11, "Returns");
|
|
300
|
+
i0.ɵɵelementEnd();
|
|
301
|
+
i0.ɵɵelementStart(12, "th");
|
|
302
|
+
i0.ɵɵtext(13, "Description");
|
|
303
|
+
i0.ɵɵelementEnd()()();
|
|
304
|
+
i0.ɵɵelementStart(14, "tbody");
|
|
305
|
+
i0.ɵɵrepeaterCreate(15, JsDocPanelComponent_Conditional_2_Conditional_5_For_16_Template, 13, 7, "tr", 12, _forTrack0);
|
|
306
|
+
i0.ɵɵelementEnd()()();
|
|
307
|
+
} if (rf & 2) {
|
|
308
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
309
|
+
i0.ɵɵadvance(15);
|
|
310
|
+
i0.ɵɵrepeater(ctx_r0.methods());
|
|
311
|
+
} }
|
|
312
|
+
function JsDocPanelComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
313
|
+
i0.ɵɵconditionalCreate(0, JsDocPanelComponent_Conditional_2_Conditional_0_Template, 2, 1, "p", 2);
|
|
314
|
+
i0.ɵɵconditionalCreate(1, JsDocPanelComponent_Conditional_2_Conditional_1_Template, 5, 2, "div", 3);
|
|
315
|
+
i0.ɵɵconditionalCreate(2, JsDocPanelComponent_Conditional_2_Conditional_2_Template, 5, 0, "div", 4);
|
|
316
|
+
i0.ɵɵconditionalCreate(3, JsDocPanelComponent_Conditional_2_Conditional_3_Template, 19, 0, "div", 4);
|
|
317
|
+
i0.ɵɵconditionalCreate(4, JsDocPanelComponent_Conditional_2_Conditional_4_Template, 13, 0, "div", 4);
|
|
318
|
+
i0.ɵɵconditionalCreate(5, JsDocPanelComponent_Conditional_2_Conditional_5_Template, 17, 0, "div", 4);
|
|
319
|
+
} if (rf & 2) {
|
|
320
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
321
|
+
i0.ɵɵconditional(ctx_r0.classDescription() ? 0 : -1);
|
|
322
|
+
i0.ɵɵadvance();
|
|
323
|
+
i0.ɵɵconditional(ctx_r0.hasTags() ? 1 : -1);
|
|
324
|
+
i0.ɵɵadvance();
|
|
325
|
+
i0.ɵɵconditional(ctx_r0.examples().length ? 2 : -1);
|
|
326
|
+
i0.ɵɵadvance();
|
|
327
|
+
i0.ɵɵconditional(ctx_r0.inputs().length ? 3 : -1);
|
|
328
|
+
i0.ɵɵadvance();
|
|
329
|
+
i0.ɵɵconditional(ctx_r0.outputs().length ? 4 : -1);
|
|
330
|
+
i0.ɵɵadvance();
|
|
331
|
+
i0.ɵɵconditional(ctx_r0.methods().length ? 5 : -1);
|
|
332
|
+
} }
|
|
333
|
+
export class JsDocPanelComponent {
|
|
334
|
+
activeComponent = input(null, ...(ngDevMode ? [{ debugName: "activeComponent" }] : []));
|
|
335
|
+
jsdocData = computed(() => {
|
|
336
|
+
const comp = this.activeComponent();
|
|
337
|
+
return comp?.meta?.showcaseConfig?.meta?.['jsdoc'] ?? null;
|
|
338
|
+
}, ...(ngDevMode ? [{ debugName: "jsdocData" }] : []));
|
|
339
|
+
inputs = computed(() => {
|
|
340
|
+
const comp = this.activeComponent();
|
|
341
|
+
return comp?.meta?.inputs ?? [];
|
|
342
|
+
}, ...(ngDevMode ? [{ debugName: "inputs" }] : []));
|
|
343
|
+
outputs = computed(() => {
|
|
344
|
+
const comp = this.activeComponent();
|
|
345
|
+
return comp?.meta?.outputs ?? [];
|
|
346
|
+
}, ...(ngDevMode ? [{ debugName: "outputs" }] : []));
|
|
347
|
+
classDescription = computed(() => this.jsdocData()?.classDescription, ...(ngDevMode ? [{ debugName: "classDescription" }] : []));
|
|
348
|
+
classTags = computed(() => this.jsdocData()?.classTags ?? {}, ...(ngDevMode ? [{ debugName: "classTags" }] : []));
|
|
349
|
+
isDeprecated = computed(() => !!this.classTags().deprecated, ...(ngDevMode ? [{ debugName: "isDeprecated" }] : []));
|
|
350
|
+
deprecatedMessage = computed(() => {
|
|
351
|
+
const d = this.classTags().deprecated;
|
|
352
|
+
return typeof d === 'string' ? d : undefined;
|
|
353
|
+
}, ...(ngDevMode ? [{ debugName: "deprecatedMessage" }] : []));
|
|
354
|
+
since = computed(() => this.classTags().since, ...(ngDevMode ? [{ debugName: "since" }] : []));
|
|
355
|
+
seeRefs = computed(() => this.classTags().see ?? [], ...(ngDevMode ? [{ debugName: "seeRefs" }] : []));
|
|
356
|
+
examples = computed(() => this.classTags().example ?? [], ...(ngDevMode ? [{ debugName: "examples" }] : []));
|
|
357
|
+
methods = computed(() => this.jsdocData()?.methods ?? [], ...(ngDevMode ? [{ debugName: "methods" }] : []));
|
|
358
|
+
hasTags = computed(() => this.isDeprecated() || !!this.since() || this.seeRefs().length > 0, ...(ngDevMode ? [{ debugName: "hasTags" }] : []));
|
|
359
|
+
isMemberDeprecated(name) {
|
|
360
|
+
return !!this.jsdocData()?.memberTags[name]?.deprecated;
|
|
361
|
+
}
|
|
362
|
+
getMemberSince(name) {
|
|
363
|
+
return this.jsdocData()?.memberTags[name]?.since;
|
|
364
|
+
}
|
|
365
|
+
memberDocLine(name, doc) {
|
|
366
|
+
const parts = [];
|
|
367
|
+
if (doc)
|
|
368
|
+
parts.push(doc);
|
|
369
|
+
const since = this.getMemberSince(name);
|
|
370
|
+
if (since)
|
|
371
|
+
parts.push(`Since ${since}`);
|
|
372
|
+
return parts.join(' · ');
|
|
373
|
+
}
|
|
374
|
+
formatDefault(value) {
|
|
375
|
+
if (typeof value === 'string')
|
|
376
|
+
return `'${value}'`;
|
|
377
|
+
return String(value);
|
|
378
|
+
}
|
|
379
|
+
static ɵfac = function JsDocPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || JsDocPanelComponent)(); };
|
|
380
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: JsDocPanelComponent, selectors: [["prism-jsdoc-panel"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 3, vars: 1, consts: [[1, "prism-jsdoc-panel"], [1, "prism-jsdoc-panel__empty"], [1, "prism-jsdoc-panel__description"], [1, "prism-jsdoc-panel__meta"], [1, "prism-jsdoc-panel__section"], [1, "prism-jsdoc-panel__badge", "prism-jsdoc-panel__badge--deprecated"], [1, "prism-jsdoc-panel__meta-item"], [1, "prism-jsdoc-panel__meta-label"], [1, "prism-jsdoc-panel__heading"], [1, "prism-jsdoc-panel__code"], ["language", "typescript", 3, "highlight"], [1, "prism-jsdoc-panel__table"], [3, "prism-jsdoc-panel__row--deprecated"], [1, "prism-jsdoc-panel__cell--name"], [1, "prism-jsdoc-panel__badge", "prism-jsdoc-panel__badge--deprecated", "prism-jsdoc-panel__badge--small"], [1, "prism-jsdoc-panel__cell--type"], [1, "prism-jsdoc-panel__cell--default"], [1, "prism-jsdoc-panel__muted"], [1, "prism-jsdoc-panel__cell--required"], [1, "prism-jsdoc-panel__badge", "prism-jsdoc-panel__badge--required"], [1, "prism-jsdoc-panel__cell--doc"]], template: function JsDocPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
381
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
382
|
+
i0.ɵɵconditionalCreate(1, JsDocPanelComponent_Conditional_1_Template, 2, 0, "div", 1)(2, JsDocPanelComponent_Conditional_2_Template, 6, 6);
|
|
383
|
+
i0.ɵɵelementEnd();
|
|
384
|
+
} if (rf & 2) {
|
|
385
|
+
i0.ɵɵadvance();
|
|
386
|
+
i0.ɵɵconditional(!ctx.activeComponent() ? 1 : 2);
|
|
387
|
+
} }, dependencies: [Highlight], styles: ["[_nghost-%COMP%] {\n display: block;\n height: 100%;\n overflow: auto;\n }\n .prism-jsdoc-panel[_ngcontent-%COMP%] {\n padding: 12px 16px;\n font-family: var(--prism-font-family, system-ui, sans-serif);\n font-size: 13px;\n color: var(--prism-text, #1f2937);\n }\n .prism-jsdoc-panel__empty[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n color: var(--prism-text-muted, #6b7280);\n }\n .prism-jsdoc-panel__description[_ngcontent-%COMP%] {\n margin: 0 0 12px;\n line-height: 1.5;\n color: var(--prism-text, #1f2937);\n }\n .prism-jsdoc-panel__meta[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 12px;\n }\n .prism-jsdoc-panel__meta-item[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--prism-text-muted, #6b7280);\n }\n .prism-jsdoc-panel__meta-label[_ngcontent-%COMP%] {\n font-weight: 600;\n color: var(--prism-text, #1f2937);\n }\n .prism-jsdoc-panel__badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 10px;\n font-size: 12px;\n font-weight: 600;\n }\n .prism-jsdoc-panel__badge--deprecated[_ngcontent-%COMP%] {\n background: #fef3c7;\n color: #92400e;\n }\n .prism-jsdoc-panel__badge--required[_ngcontent-%COMP%] {\n background: #dbeafe;\n color: #1d4ed8;\n }\n .prism-jsdoc-panel__badge--small[_ngcontent-%COMP%] {\n padding: 1px 5px;\n font-size: 10px;\n margin-left: 4px;\n vertical-align: middle;\n }\n .prism-jsdoc-panel__section[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n }\n .prism-jsdoc-panel__heading[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n margin: 0 0 8px;\n padding-bottom: 4px;\n border-bottom: 1px solid var(--prism-border, #e5e7eb);\n color: var(--prism-text-muted, #6b7280);\n }\n .prism-jsdoc-panel__code[_ngcontent-%COMP%] {\n margin: 0 0 8px;\n padding: 0;\n background: var(--prism-bg-surface, #f9fafb);\n border: 1px solid var(--prism-border, #e5e7eb);\n border-radius: 6px;\n overflow: auto;\n }\n .prism-jsdoc-panel__code[_ngcontent-%COMP%] code[_ngcontent-%COMP%] {\n font-family: var(--prism-font-mono, monospace);\n font-size: 12px;\n line-height: 1.5;\n padding: 8px 12px;\n display: block;\n }\n .prism-jsdoc-panel__table[_ngcontent-%COMP%] {\n width: 100%;\n border-collapse: collapse;\n font-size: 12px;\n }\n .prism-jsdoc-panel__table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n text-align: left;\n padding: 6px 10px;\n font-weight: 600;\n color: var(--prism-text-muted, #6b7280);\n border-bottom: 1px solid var(--prism-border, #e5e7eb);\n white-space: nowrap;\n }\n .prism-jsdoc-panel__table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n padding: 6px 10px;\n border-bottom: 1px solid var(--prism-border, #e5e7eb);\n vertical-align: top;\n }\n .prism-jsdoc-panel__table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%] {\n border-bottom: none;\n }\n .prism-jsdoc-panel__row--deprecated[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n opacity: 0.6;\n }\n .prism-jsdoc-panel__cell--name[_ngcontent-%COMP%] code[_ngcontent-%COMP%], \n .prism-jsdoc-panel__cell--type[_ngcontent-%COMP%] code[_ngcontent-%COMP%], \n .prism-jsdoc-panel__cell--default[_ngcontent-%COMP%] code[_ngcontent-%COMP%] {\n font-family: var(--prism-font-mono, monospace);\n font-size: 11px;\n background: var(--prism-bg-surface, #f9fafb);\n padding: 1px 4px;\n border-radius: 3px;\n border: 1px solid var(--prism-border, #e5e7eb);\n }\n .prism-jsdoc-panel__muted[_ngcontent-%COMP%] {\n color: var(--prism-text-muted, #6b7280);\n }\n .prism-jsdoc-panel__cell--doc[_ngcontent-%COMP%] {\n color: var(--prism-text, #1f2937);\n line-height: 1.4;\n }"], changeDetection: 0 });
|
|
388
|
+
}
|
|
389
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(JsDocPanelComponent, [{
|
|
390
|
+
type: Component,
|
|
391
|
+
args: [{ selector: 'prism-jsdoc-panel', standalone: true, imports: [Highlight], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
392
|
+
<div class="prism-jsdoc-panel">
|
|
393
|
+
@if (!activeComponent()) {
|
|
394
|
+
<div class="prism-jsdoc-panel__empty">Select a component to view API documentation.</div>
|
|
395
|
+
} @else {
|
|
396
|
+
@if (classDescription()) {
|
|
397
|
+
<p class="prism-jsdoc-panel__description">{{ classDescription() }}</p>
|
|
398
|
+
}
|
|
399
|
+
@if (hasTags()) {
|
|
400
|
+
<div class="prism-jsdoc-panel__meta">
|
|
401
|
+
@if (isDeprecated()) {
|
|
402
|
+
<span class="prism-jsdoc-panel__badge prism-jsdoc-panel__badge--deprecated">
|
|
403
|
+
Deprecated{{ deprecatedMessage() ? ': ' + deprecatedMessage() : '' }}
|
|
404
|
+
</span>
|
|
405
|
+
}
|
|
406
|
+
@if (since()) {
|
|
407
|
+
<span class="prism-jsdoc-panel__meta-item">
|
|
408
|
+
<span class="prism-jsdoc-panel__meta-label">Since:</span> {{ since() }}
|
|
409
|
+
</span>
|
|
410
|
+
}
|
|
411
|
+
@for (ref of seeRefs(); track $index) {
|
|
412
|
+
<span class="prism-jsdoc-panel__meta-item">
|
|
413
|
+
<span class="prism-jsdoc-panel__meta-label">See:</span> {{ ref }}
|
|
414
|
+
</span>
|
|
415
|
+
}
|
|
416
|
+
</div>
|
|
417
|
+
}
|
|
418
|
+
@if (examples().length) {
|
|
419
|
+
<div class="prism-jsdoc-panel__section">
|
|
420
|
+
<h3 class="prism-jsdoc-panel__heading">Examples</h3>
|
|
421
|
+
@for (example of examples(); track $index) {
|
|
422
|
+
<pre class="prism-jsdoc-panel__code"><code [highlight]="example" language="typescript"></code></pre>
|
|
423
|
+
}
|
|
424
|
+
</div>
|
|
425
|
+
}
|
|
426
|
+
@if (inputs().length) {
|
|
427
|
+
<div class="prism-jsdoc-panel__section">
|
|
428
|
+
<h3 class="prism-jsdoc-panel__heading">Inputs</h3>
|
|
429
|
+
<table class="prism-jsdoc-panel__table">
|
|
430
|
+
<thead>
|
|
431
|
+
<tr>
|
|
432
|
+
<th>Name</th>
|
|
433
|
+
<th>Type</th>
|
|
434
|
+
<th>Default</th>
|
|
435
|
+
<th>Required</th>
|
|
436
|
+
<th>Description</th>
|
|
437
|
+
</tr>
|
|
438
|
+
</thead>
|
|
439
|
+
<tbody>
|
|
440
|
+
@for (inp of inputs(); track inp.name) {
|
|
441
|
+
<tr [class.prism-jsdoc-panel__row--deprecated]="isMemberDeprecated(inp.name)">
|
|
442
|
+
<td class="prism-jsdoc-panel__cell--name">
|
|
443
|
+
<code>{{ inp.name }}</code>
|
|
444
|
+
@if (isMemberDeprecated(inp.name)) {
|
|
445
|
+
<span class="prism-jsdoc-panel__badge prism-jsdoc-panel__badge--deprecated prism-jsdoc-panel__badge--small">deprecated</span>
|
|
446
|
+
}
|
|
447
|
+
</td>
|
|
448
|
+
<td class="prism-jsdoc-panel__cell--type">
|
|
449
|
+
<code>{{ inp.rawType ?? inp.type }}</code>
|
|
450
|
+
</td>
|
|
451
|
+
<td class="prism-jsdoc-panel__cell--default">
|
|
452
|
+
@if (inp.defaultValue !== undefined) {
|
|
453
|
+
<code>{{ formatDefault(inp.defaultValue) }}</code>
|
|
454
|
+
} @else {
|
|
455
|
+
<span class="prism-jsdoc-panel__muted">—</span>
|
|
456
|
+
}
|
|
457
|
+
</td>
|
|
458
|
+
<td class="prism-jsdoc-panel__cell--required">
|
|
459
|
+
@if (inp.required) {
|
|
460
|
+
<span class="prism-jsdoc-panel__badge prism-jsdoc-panel__badge--required">required</span>
|
|
461
|
+
} @else {
|
|
462
|
+
<span class="prism-jsdoc-panel__muted">—</span>
|
|
463
|
+
}
|
|
464
|
+
</td>
|
|
465
|
+
<td class="prism-jsdoc-panel__cell--doc">
|
|
466
|
+
{{ inp.doc ?? getMemberSince(inp.name) ? memberDocLine(inp.name, inp.doc) : '' }}
|
|
467
|
+
</td>
|
|
468
|
+
</tr>
|
|
469
|
+
}
|
|
470
|
+
</tbody>
|
|
471
|
+
</table>
|
|
472
|
+
</div>
|
|
473
|
+
}
|
|
474
|
+
@if (outputs().length) {
|
|
475
|
+
<div class="prism-jsdoc-panel__section">
|
|
476
|
+
<h3 class="prism-jsdoc-panel__heading">Outputs</h3>
|
|
477
|
+
<table class="prism-jsdoc-panel__table">
|
|
478
|
+
<thead>
|
|
479
|
+
<tr>
|
|
480
|
+
<th>Name</th>
|
|
481
|
+
<th>Description</th>
|
|
482
|
+
</tr>
|
|
483
|
+
</thead>
|
|
484
|
+
<tbody>
|
|
485
|
+
@for (out of outputs(); track out.name) {
|
|
486
|
+
<tr [class.prism-jsdoc-panel__row--deprecated]="isMemberDeprecated(out.name)">
|
|
487
|
+
<td class="prism-jsdoc-panel__cell--name">
|
|
488
|
+
<code>{{ out.name }}</code>
|
|
489
|
+
@if (isMemberDeprecated(out.name)) {
|
|
490
|
+
<span class="prism-jsdoc-panel__badge prism-jsdoc-panel__badge--deprecated prism-jsdoc-panel__badge--small">deprecated</span>
|
|
491
|
+
}
|
|
492
|
+
</td>
|
|
493
|
+
<td class="prism-jsdoc-panel__cell--doc">
|
|
494
|
+
{{ memberDocLine(out.name, out.doc) }}
|
|
495
|
+
</td>
|
|
496
|
+
</tr>
|
|
497
|
+
}
|
|
498
|
+
</tbody>
|
|
499
|
+
</table>
|
|
500
|
+
</div>
|
|
501
|
+
}
|
|
502
|
+
@if (methods().length) {
|
|
503
|
+
<div class="prism-jsdoc-panel__section">
|
|
504
|
+
<h3 class="prism-jsdoc-panel__heading">Methods</h3>
|
|
505
|
+
<table class="prism-jsdoc-panel__table">
|
|
506
|
+
<thead>
|
|
507
|
+
<tr>
|
|
508
|
+
<th>Name</th>
|
|
509
|
+
<th>Parameters</th>
|
|
510
|
+
<th>Returns</th>
|
|
511
|
+
<th>Description</th>
|
|
512
|
+
</tr>
|
|
513
|
+
</thead>
|
|
514
|
+
<tbody>
|
|
515
|
+
@for (method of methods(); track method.name) {
|
|
516
|
+
<tr [class.prism-jsdoc-panel__row--deprecated]="!!method.tags.deprecated">
|
|
517
|
+
<td class="prism-jsdoc-panel__cell--name">
|
|
518
|
+
<code>{{ method.name }}()</code>
|
|
519
|
+
@if (method.tags.deprecated) {
|
|
520
|
+
<span class="prism-jsdoc-panel__badge prism-jsdoc-panel__badge--deprecated prism-jsdoc-panel__badge--small">deprecated</span>
|
|
521
|
+
}
|
|
522
|
+
</td>
|
|
523
|
+
<td class="prism-jsdoc-panel__cell--type">
|
|
524
|
+
@if (method.params.length) {
|
|
525
|
+
@for (p of method.params; track p.name) {
|
|
526
|
+
<div><code>{{ p.name }}{{ p.type ? ': ' + p.type : '' }}</code></div>
|
|
527
|
+
}
|
|
528
|
+
} @else {
|
|
529
|
+
<span class="prism-jsdoc-panel__muted">—</span>
|
|
530
|
+
}
|
|
531
|
+
</td>
|
|
532
|
+
<td class="prism-jsdoc-panel__cell--type">
|
|
533
|
+
@if (method.returnType) {
|
|
534
|
+
<code>{{ method.returnType }}</code>
|
|
535
|
+
} @else {
|
|
536
|
+
<span class="prism-jsdoc-panel__muted">void</span>
|
|
537
|
+
}
|
|
538
|
+
</td>
|
|
539
|
+
<td class="prism-jsdoc-panel__cell--doc">
|
|
540
|
+
{{ method.description ?? '' }}
|
|
541
|
+
</td>
|
|
542
|
+
</tr>
|
|
543
|
+
}
|
|
544
|
+
</tbody>
|
|
545
|
+
</table>
|
|
546
|
+
</div>
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
</div>
|
|
550
|
+
`, styles: ["\n :host {\n display: block;\n height: 100%;\n overflow: auto;\n }\n .prism-jsdoc-panel {\n padding: 12px 16px;\n font-family: var(--prism-font-family, system-ui, sans-serif);\n font-size: 13px;\n color: var(--prism-text, #1f2937);\n }\n .prism-jsdoc-panel__empty {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n color: var(--prism-text-muted, #6b7280);\n }\n .prism-jsdoc-panel__description {\n margin: 0 0 12px;\n line-height: 1.5;\n color: var(--prism-text, #1f2937);\n }\n .prism-jsdoc-panel__meta {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 12px;\n }\n .prism-jsdoc-panel__meta-item {\n font-size: 12px;\n color: var(--prism-text-muted, #6b7280);\n }\n .prism-jsdoc-panel__meta-label {\n font-weight: 600;\n color: var(--prism-text, #1f2937);\n }\n .prism-jsdoc-panel__badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 10px;\n font-size: 12px;\n font-weight: 600;\n }\n .prism-jsdoc-panel__badge--deprecated {\n background: #fef3c7;\n color: #92400e;\n }\n .prism-jsdoc-panel__badge--required {\n background: #dbeafe;\n color: #1d4ed8;\n }\n .prism-jsdoc-panel__badge--small {\n padding: 1px 5px;\n font-size: 10px;\n margin-left: 4px;\n vertical-align: middle;\n }\n .prism-jsdoc-panel__section {\n margin-bottom: 20px;\n }\n .prism-jsdoc-panel__heading {\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n margin: 0 0 8px;\n padding-bottom: 4px;\n border-bottom: 1px solid var(--prism-border, #e5e7eb);\n color: var(--prism-text-muted, #6b7280);\n }\n .prism-jsdoc-panel__code {\n margin: 0 0 8px;\n padding: 0;\n background: var(--prism-bg-surface, #f9fafb);\n border: 1px solid var(--prism-border, #e5e7eb);\n border-radius: 6px;\n overflow: auto;\n }\n .prism-jsdoc-panel__code code {\n font-family: var(--prism-font-mono, monospace);\n font-size: 12px;\n line-height: 1.5;\n padding: 8px 12px;\n display: block;\n }\n .prism-jsdoc-panel__table {\n width: 100%;\n border-collapse: collapse;\n font-size: 12px;\n }\n .prism-jsdoc-panel__table th {\n text-align: left;\n padding: 6px 10px;\n font-weight: 600;\n color: var(--prism-text-muted, #6b7280);\n border-bottom: 1px solid var(--prism-border, #e5e7eb);\n white-space: nowrap;\n }\n .prism-jsdoc-panel__table td {\n padding: 6px 10px;\n border-bottom: 1px solid var(--prism-border, #e5e7eb);\n vertical-align: top;\n }\n .prism-jsdoc-panel__table tr:last-child td {\n border-bottom: none;\n }\n .prism-jsdoc-panel__row--deprecated td {\n opacity: 0.6;\n }\n .prism-jsdoc-panel__cell--name code,\n .prism-jsdoc-panel__cell--type code,\n .prism-jsdoc-panel__cell--default code {\n font-family: var(--prism-font-mono, monospace);\n font-size: 11px;\n background: var(--prism-bg-surface, #f9fafb);\n padding: 1px 4px;\n border-radius: 3px;\n border: 1px solid var(--prism-border, #e5e7eb);\n }\n .prism-jsdoc-panel__muted {\n color: var(--prism-text-muted, #6b7280);\n }\n .prism-jsdoc-panel__cell--doc {\n color: var(--prism-text, #1f2937);\n line-height: 1.4;\n }\n "] }]
|
|
551
|
+
}], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
|
|
552
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(JsDocPanelComponent, { className: "JsDocPanelComponent", filePath: "jsdoc-panel.component.ts", lineNumber: 302 }); })();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdoc-plugin.browser.d.ts","sourceRoot":"","sources":["../src/jsdoc-plugin.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,wBAAgB,WAAW,IAAI,aAAa,CAc3C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function jsDocPlugin() {
|
|
2
|
+
return {
|
|
3
|
+
name: '@ng-prism/plugin-jsdoc',
|
|
4
|
+
panels: [
|
|
5
|
+
{
|
|
6
|
+
id: 'jsdoc',
|
|
7
|
+
label: 'API',
|
|
8
|
+
loadComponent: () => import('./jsdoc-panel.component.js').then((m) => m.JsDocPanelComponent),
|
|
9
|
+
position: 'bottom',
|
|
10
|
+
placement: 'view',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdoc-plugin.d.ts","sourceRoot":"","sources":["../src/jsdoc-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,wBAAgB,WAAW,IAAI,aAAa,CAwB3C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { extractJsDocData } from './jsdoc-extractor.js';
|
|
2
|
+
export function jsDocPlugin() {
|
|
3
|
+
return {
|
|
4
|
+
name: '@ng-prism/plugin-jsdoc',
|
|
5
|
+
async onComponentScanned(component) {
|
|
6
|
+
const jsdoc = extractJsDocData(component.filePath, component.className);
|
|
7
|
+
if (!jsdoc)
|
|
8
|
+
return;
|
|
9
|
+
return {
|
|
10
|
+
...component,
|
|
11
|
+
showcaseConfig: {
|
|
12
|
+
...component.showcaseConfig,
|
|
13
|
+
meta: { ...component.showcaseConfig.meta, jsdoc },
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
panels: [
|
|
18
|
+
{
|
|
19
|
+
id: 'jsdoc',
|
|
20
|
+
label: 'API',
|
|
21
|
+
loadComponent: () => import('./jsdoc-panel.component.js').then((m) => m.JsDocPanelComponent),
|
|
22
|
+
position: 'bottom',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface JsDocTags {
|
|
2
|
+
deprecated?: string | true;
|
|
3
|
+
since?: string;
|
|
4
|
+
see?: string[];
|
|
5
|
+
example?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface MethodDoc {
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
tags: JsDocTags;
|
|
11
|
+
params: ParamDoc[];
|
|
12
|
+
returnType?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ParamDoc {
|
|
15
|
+
name: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface JsDocData {
|
|
20
|
+
classDescription?: string;
|
|
21
|
+
classTags: JsDocTags;
|
|
22
|
+
memberTags: Record<string, JsDocTags>;
|
|
23
|
+
methods?: MethodDoc[];
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=jsdoc.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdoc.types.d.ts","sourceRoot":"","sources":["../src/jsdoc.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ng-prism/plugin-jsdoc",
|
|
3
|
+
"version": "21.0.0",
|
|
4
|
+
"description": "JSDoc API documentation panel for ng-prism.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"@ng-prism/core",
|
|
7
|
+
"jsdoc",
|
|
8
|
+
"api",
|
|
9
|
+
"documentation",
|
|
10
|
+
"plugin",
|
|
11
|
+
"angular",
|
|
12
|
+
"styleguide"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"module": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
"./package.json": "./package.json",
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"browser": "./dist/index.browser.js",
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"!**/*.tsbuildinfo"
|
|
31
|
+
],
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@angular/core": ">=20.0.0",
|
|
34
|
+
"typescript": ">=5.5.0",
|
|
35
|
+
"highlight.js": ">=11.0.0",
|
|
36
|
+
"ngx-highlightjs": ">=14.0.0",
|
|
37
|
+
"@ng-prism/core": ">=21.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@ng-prism/core": "*"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"tslib": "^2.3.0"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "https://github.com/dyingangel666/ng-prism.git",
|
|
48
|
+
"directory": "packages/plugin-jsdoc"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://dyingangel666.github.io/ng-prism/",
|
|
51
|
+
"bugs": "https://github.com/dyingangel666/ng-prism/issues"
|
|
52
|
+
}
|