umberto 6.1.2 → 7.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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/api-builder/utils/findtargetdoclet.js +2 -2
- package/src/data-converter/converters/typedoc/abstractparser.js +54 -50
- package/src/data-converter/converters/typedoc/accessorparser.js +7 -5
- package/src/data-converter/converters/typedoc/classparser.js +5 -3
- package/src/data-converter/converters/typedoc/computedpropertyparser.js +4 -3
- package/src/data-converter/converters/typedoc/constantparser.js +5 -3
- package/src/data-converter/converters/typedoc/constructorparser.js +4 -3
- package/src/data-converter/converters/typedoc/errorparser.js +4 -10
- package/src/data-converter/converters/typedoc/eventparser.js +4 -10
- package/src/data-converter/converters/typedoc/functionparser.js +5 -3
- package/src/data-converter/converters/typedoc/interfaceparser.js +5 -3
- package/src/data-converter/converters/typedoc/methodparser.js +6 -4
- package/src/data-converter/converters/typedoc/moduleparser.js +9 -3
- package/src/data-converter/converters/typedoc/propertyparser.js +7 -28
- package/src/data-converter/converters/typedoc/referenceparser.js +41 -0
- package/src/data-converter/converters/typedoc/reflectionkind.js +34 -0
- package/src/data-converter/converters/typedoc/typedoc.ts +215 -214
- package/src/data-converter/converters/typedoc/typedocconverter.js +130 -99
- package/src/data-converter/converters/typedoc/typeparser.js +10 -6
- package/src/data-converter/converters/typedoc2umberto.js +9 -3
- package/themes/umberto/layout/gloria/_api-docs/_mixin/_type.pug +9 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_type.pug +9 -0
- package/themes/umberto/src/gloria/js/_codeswitcherbuttons.js +2 -2
- package/themes/umberto/src/umberto/js/_codeswitcherbuttons.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [7.0.0](https://github.com/cksource/umberto/compare/v6.1.2...v7.0.0) (2025-05-05)
|
|
5
|
+
|
|
6
|
+
### BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* Rendering TypeScript-based API pages requires an input file generated by Typedoc in version `0.28.0` or later.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Support for rendering TypeScript API pages based on output from `typedoc@0.28`. Closes [#1188](https://github.com/cksource/umberto/issues/1188). ([commit](https://github.com/cksource/umberto/commit/561f94c6b025a0f1dbcc01c0c0e70ee5eeae387e))
|
|
13
|
+
|
|
14
|
+
|
|
4
15
|
## [6.1.2](https://github.com/cksource/umberto/compare/v6.1.1...v6.1.2) (2025-04-23)
|
|
5
16
|
|
|
6
17
|
### Bug fixes
|
package/package.json
CHANGED
|
@@ -79,9 +79,9 @@ module.exports = function findTargetDoclet( docletCollection, options ) {
|
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
const { properties
|
|
82
|
+
const { properties } = typedefItem;
|
|
83
83
|
|
|
84
|
-
return properties.find( item => item.name === member ) ? typedefItem : null;
|
|
84
|
+
return ( properties || [] ).find( item => item.name === member ) ? typedefItem : null;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
let targetDoclet;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const TypedocConverter = require( './typedocconverter' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* An abstract parser class providing basic utils for converting Typedoc reflection to JSDoc doclet.
|
|
@@ -14,14 +15,14 @@ module.exports = class AbstractParser {
|
|
|
14
15
|
/**
|
|
15
16
|
* @abstract
|
|
16
17
|
* @method canParse
|
|
17
|
-
* @param {
|
|
18
|
+
* @param {BaseReflection} item
|
|
18
19
|
* @returns {Boolean}
|
|
19
20
|
*/
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* @abstract
|
|
23
24
|
* @method parse
|
|
24
|
-
* @param {
|
|
25
|
+
* @param {BaseReflection} item
|
|
25
26
|
* @param {String|null} [parentName=null]
|
|
26
27
|
* @returns {Object}
|
|
27
28
|
*/
|
|
@@ -29,7 +30,7 @@ module.exports = class AbstractParser {
|
|
|
29
30
|
/**
|
|
30
31
|
* Coverts the item's comment from Markdown to HTML.
|
|
31
32
|
*
|
|
32
|
-
* @param {
|
|
33
|
+
* @param {BaseReflection} item
|
|
33
34
|
* @returns {String}
|
|
34
35
|
*/
|
|
35
36
|
getComment( item ) {
|
|
@@ -41,33 +42,35 @@ module.exports = class AbstractParser {
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
|
-
* @param {
|
|
45
|
+
* @param {BaseReflection} item
|
|
45
46
|
* @param {String|null} [parentName=null]
|
|
46
47
|
* @returns {String}
|
|
47
48
|
*/
|
|
48
49
|
getLongName( item, parentName = null ) {
|
|
49
50
|
let separator;
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
if ( item.isCKEditor5Event ) {
|
|
53
|
+
separator = '#event:';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
switch ( item.kind ) {
|
|
57
|
+
case ReflectionKind.Module:
|
|
53
58
|
separator = ':';
|
|
54
59
|
parentName = 'module';
|
|
55
60
|
break;
|
|
56
61
|
|
|
57
|
-
case
|
|
58
|
-
case
|
|
59
|
-
case
|
|
60
|
-
case
|
|
62
|
+
case ReflectionKind.Variable:
|
|
63
|
+
case ReflectionKind.Function:
|
|
64
|
+
case ReflectionKind.Class:
|
|
65
|
+
case ReflectionKind.Interface:
|
|
66
|
+
case ReflectionKind.TypeAlias:
|
|
61
67
|
separator = '~';
|
|
62
68
|
break;
|
|
63
69
|
|
|
64
|
-
case 'Event':
|
|
65
|
-
separator = '#event:';
|
|
66
|
-
break;
|
|
67
|
-
|
|
68
70
|
default:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
if ( !separator ) {
|
|
72
|
+
separator = this.getScope( item ) === 'static' ? '.' : '#';
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
return `${ parentName }${ separator }${ item.name }`;
|
|
@@ -76,7 +79,7 @@ module.exports = class AbstractParser {
|
|
|
76
79
|
/**
|
|
77
80
|
* Prepares the name for the computed property.
|
|
78
81
|
*
|
|
79
|
-
* @param {
|
|
82
|
+
* @param {ComputedPropertyReflection} item
|
|
80
83
|
* @returns {String}
|
|
81
84
|
*/
|
|
82
85
|
getComputedName( item ) {
|
|
@@ -86,7 +89,7 @@ module.exports = class AbstractParser {
|
|
|
86
89
|
/**
|
|
87
90
|
* Returns the access type for the item.
|
|
88
91
|
*
|
|
89
|
-
* @param {
|
|
92
|
+
* @param {BaseReflection} item
|
|
90
93
|
* @returns {'public'|'internal'|'protected'|'private'}
|
|
91
94
|
*/
|
|
92
95
|
getVisibility( item ) {
|
|
@@ -110,48 +113,49 @@ module.exports = class AbstractParser {
|
|
|
110
113
|
/**
|
|
111
114
|
* Returns the item's kind.
|
|
112
115
|
*
|
|
113
|
-
* @param {
|
|
116
|
+
* @param {BaseReflection} item
|
|
114
117
|
* @returns {String}
|
|
115
118
|
*/
|
|
116
119
|
getKind( item ) {
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
if ( item.isCKEditor5Event ) {
|
|
121
|
+
return 'event';
|
|
122
|
+
}
|
|
123
|
+
if ( item.isCKEditor5Error ) {
|
|
124
|
+
return 'error';
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
switch ( item.kind ) {
|
|
128
|
+
case ReflectionKind.Module:
|
|
119
129
|
return 'module';
|
|
120
130
|
|
|
121
|
-
case
|
|
131
|
+
case ReflectionKind.Class:
|
|
122
132
|
return 'class';
|
|
123
133
|
|
|
124
|
-
case
|
|
125
|
-
case
|
|
126
|
-
case
|
|
134
|
+
case ReflectionKind.Function:
|
|
135
|
+
case ReflectionKind.Method:
|
|
136
|
+
case ReflectionKind.Constructor:
|
|
127
137
|
return 'function';
|
|
128
138
|
|
|
129
|
-
case
|
|
139
|
+
case ReflectionKind.Interface:
|
|
130
140
|
return 'interface';
|
|
131
141
|
|
|
132
|
-
case
|
|
133
|
-
case
|
|
134
|
-
case
|
|
142
|
+
case ReflectionKind.Accessor:
|
|
143
|
+
case ReflectionKind.Property:
|
|
144
|
+
case ReflectionKind.IndexSignature:
|
|
135
145
|
return 'member';
|
|
136
146
|
|
|
137
|
-
case
|
|
147
|
+
case ReflectionKind.Variable:
|
|
138
148
|
return 'constant';
|
|
139
149
|
|
|
140
|
-
case
|
|
150
|
+
case ReflectionKind.TypeAlias:
|
|
141
151
|
return 'typedef';
|
|
142
|
-
|
|
143
|
-
case 'Event':
|
|
144
|
-
return 'event';
|
|
145
|
-
|
|
146
|
-
case 'Error':
|
|
147
|
-
return 'error';
|
|
148
152
|
}
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
/**
|
|
152
156
|
* Returns the item's scope.
|
|
153
157
|
*
|
|
154
|
-
* @param {
|
|
158
|
+
* @param {BaseReflection} item
|
|
155
159
|
* @returns {'instance'|'static'}
|
|
156
160
|
*/
|
|
157
161
|
getScope( item ) {
|
|
@@ -167,7 +171,7 @@ module.exports = class AbstractParser {
|
|
|
167
171
|
/**
|
|
168
172
|
* Returns the `extraId` combined from the item's scope, kind, name and optional variation.
|
|
169
173
|
*
|
|
170
|
-
* @param {
|
|
174
|
+
* @param {BaseReflection} item
|
|
171
175
|
* @returns {String}
|
|
172
176
|
*/
|
|
173
177
|
getExtraId( item ) {
|
|
@@ -179,7 +183,7 @@ module.exports = class AbstractParser {
|
|
|
179
183
|
/**
|
|
180
184
|
* Returns the long names of the events that are fired from the signature.
|
|
181
185
|
*
|
|
182
|
-
* @param {
|
|
186
|
+
* @param {BaseReflection} signature
|
|
183
187
|
* @param {String} parentName
|
|
184
188
|
* @returns {Array.<String>|null}
|
|
185
189
|
*/
|
|
@@ -202,7 +206,7 @@ module.exports = class AbstractParser {
|
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
/**
|
|
205
|
-
* @param {
|
|
209
|
+
* @param {BaseReflection} signature
|
|
206
210
|
* @param {String} parentName
|
|
207
211
|
* @returns {Array.<Object>|null}
|
|
208
212
|
*/
|
|
@@ -243,7 +247,7 @@ module.exports = class AbstractParser {
|
|
|
243
247
|
* Returns the URL to GitHub with selected line, where the given doclet is defined.
|
|
244
248
|
* The URL includes a commit hash which was used to build the API docs.
|
|
245
249
|
*
|
|
246
|
-
* @param {
|
|
250
|
+
* @param {BaseReflection} item
|
|
247
251
|
* @param {Number} sourceIndex
|
|
248
252
|
* @returns {Object|null}
|
|
249
253
|
*/
|
|
@@ -264,7 +268,7 @@ module.exports = class AbstractParser {
|
|
|
264
268
|
/**
|
|
265
269
|
* Returns links from the "@see" tags.
|
|
266
270
|
*
|
|
267
|
-
* @param {
|
|
271
|
+
* @param {BaseReflection} item
|
|
268
272
|
* @param {String|null} [parentName=null]
|
|
269
273
|
* @returns {Array.<String>}
|
|
270
274
|
*/
|
|
@@ -308,7 +312,7 @@ module.exports = class AbstractParser {
|
|
|
308
312
|
*
|
|
309
313
|
* The readonly state can be marked either by a TypeScript `readonly` keyword, or by the `@readonly` JSDoc keyword.
|
|
310
314
|
*
|
|
311
|
-
* @param {
|
|
315
|
+
* @param {BaseReflection} item
|
|
312
316
|
* @returns {Boolean}
|
|
313
317
|
*/
|
|
314
318
|
isReadonly( item ) {
|
|
@@ -324,7 +328,7 @@ module.exports = class AbstractParser {
|
|
|
324
328
|
*
|
|
325
329
|
* The observable state can be marked by the `@observable` JSDoc keyword.
|
|
326
330
|
*
|
|
327
|
-
* @param {
|
|
331
|
+
* @param {BaseReflection} item
|
|
328
332
|
* @returns {Boolean}
|
|
329
333
|
*/
|
|
330
334
|
isObservable( item ) {
|
|
@@ -338,7 +342,7 @@ module.exports = class AbstractParser {
|
|
|
338
342
|
/**
|
|
339
343
|
* Checks if the item is marked as an optional.
|
|
340
344
|
*
|
|
341
|
-
* @param {
|
|
345
|
+
* @param {BaseReflection} item
|
|
342
346
|
* @returns {Boolean}
|
|
343
347
|
*/
|
|
344
348
|
isOptional( item ) {
|
|
@@ -355,7 +359,7 @@ module.exports = class AbstractParser {
|
|
|
355
359
|
* The `internal` state means the same as `protected`, but with one exception: the `internal` member can be used from outside the class
|
|
356
360
|
* in which it is defined (or its derivatives), as opposed to the `protected` state.
|
|
357
361
|
*
|
|
358
|
-
* @param {
|
|
362
|
+
* @param {BaseReflection} item
|
|
359
363
|
* @returns {Boolean}
|
|
360
364
|
*/
|
|
361
365
|
isInternal( item ) {
|
|
@@ -369,7 +373,7 @@ module.exports = class AbstractParser {
|
|
|
369
373
|
/**
|
|
370
374
|
* Checks if the member is marked by the `@deprecated` JSDoc tag.
|
|
371
375
|
*
|
|
372
|
-
* @param {
|
|
376
|
+
* @param {BaseReflection} item
|
|
373
377
|
* @returns {Boolean}
|
|
374
378
|
*/
|
|
375
379
|
isDeprecated( item ) {
|
|
@@ -387,7 +391,7 @@ module.exports = class AbstractParser {
|
|
|
387
391
|
* It happens when the member has not specified `file` property. In such a case, Umberto does not know
|
|
388
392
|
* where to point to a source and decides to skip generating the "See source" button.
|
|
389
393
|
*
|
|
390
|
-
* @param {
|
|
394
|
+
* @param {BaseReflection} item
|
|
391
395
|
* @returns {Boolean}
|
|
392
396
|
*/
|
|
393
397
|
shouldSkipSource( item ) {
|
|
@@ -402,7 +406,7 @@ module.exports = class AbstractParser {
|
|
|
402
406
|
* Returns a name specified in the `@label` annotation.
|
|
403
407
|
*
|
|
404
408
|
* @protected
|
|
405
|
-
* @param {
|
|
409
|
+
* @param {BaseReflection} item
|
|
406
410
|
* @returns {String}
|
|
407
411
|
*/
|
|
408
412
|
_getLabelName( item ) {
|
|
@@ -6,21 +6,22 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class AccessorParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Accessor;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Checks if the accessor is readonly.
|
|
21
22
|
*
|
|
22
23
|
* @override
|
|
23
|
-
* @param {
|
|
24
|
+
* @param {AccessorReflection} item
|
|
24
25
|
* @returns {Boolean}
|
|
25
26
|
*/
|
|
26
27
|
isReadonly( item ) {
|
|
@@ -28,7 +29,7 @@ module.exports = class AccessorParser extends AbstractParser {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
|
-
* @param {
|
|
32
|
+
* @param {AccessorReflection} item
|
|
32
33
|
* @param {String} parentName
|
|
33
34
|
* @returns {Object}
|
|
34
35
|
*/
|
|
@@ -41,6 +42,7 @@ module.exports = class AccessorParser extends AbstractParser {
|
|
|
41
42
|
// Needed for post-processing once all project reflections are converted.
|
|
42
43
|
_signature: [ getSignature || {}, setSignature || {} ],
|
|
43
44
|
|
|
45
|
+
id: item.id,
|
|
44
46
|
name: item.name,
|
|
45
47
|
memberof: parentName,
|
|
46
48
|
longname: this.getLongName( item, parentName ),
|
|
@@ -65,7 +67,7 @@ module.exports = class AccessorParser extends AbstractParser {
|
|
|
65
67
|
/**
|
|
66
68
|
* Returns the access type for the item based on its signatures.
|
|
67
69
|
*
|
|
68
|
-
* @param {
|
|
70
|
+
* @param {AccessorReflection} item
|
|
69
71
|
* @returns {'public'|'internal'|'protected'|'private'}
|
|
70
72
|
*/
|
|
71
73
|
getVisibilityIncludingSignature( item ) {
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class ClassParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Class;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {ClassReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Object}
|
|
23
24
|
*/
|
|
@@ -26,6 +27,7 @@ module.exports = class ClassParser extends AbstractParser {
|
|
|
26
27
|
// Needed for post-processing once all project reflections are converted.
|
|
27
28
|
_signature: item,
|
|
28
29
|
|
|
30
|
+
id: item.id,
|
|
29
31
|
name: item.name,
|
|
30
32
|
memberof: parentName,
|
|
31
33
|
longname: this.getLongName( item, parentName ),
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const PropertyParser = require( './propertyparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class ComputedPropertyParser extends PropertyParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.IndexSignature;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {ComputedPropertyReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Object}
|
|
23
24
|
*/
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class ConstantParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Variable;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {VariableReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Object}
|
|
23
24
|
*/
|
|
@@ -26,6 +27,7 @@ module.exports = class ConstantParser extends AbstractParser {
|
|
|
26
27
|
// Needed for post-processing once all project reflections are converted.
|
|
27
28
|
_signature: item,
|
|
28
29
|
|
|
30
|
+
id: item.id,
|
|
29
31
|
name: item.name,
|
|
30
32
|
memberof: parentName,
|
|
31
33
|
longname: this.getLongName( item, parentName ),
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const MethodParser = require( './methodparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class ConstructorParser extends MethodParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Constructor;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {ConstructorReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Array.<Object>}
|
|
23
24
|
*/
|
|
@@ -9,26 +9,20 @@ const AbstractParser = require( './abstractparser' );
|
|
|
9
9
|
|
|
10
10
|
module.exports = class ErrorParser extends AbstractParser {
|
|
11
11
|
/**
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {BaseReflection} item
|
|
13
13
|
* @returns {Boolean}
|
|
14
14
|
*/
|
|
15
15
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
16
|
+
return item.isCKEditor5Error === true;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {CKEditor5ErrorReflection} item
|
|
21
21
|
* @returns {Object}
|
|
22
22
|
*/
|
|
23
23
|
parse( item ) {
|
|
24
24
|
return {
|
|
25
|
-
_signature: [
|
|
26
|
-
{},
|
|
27
|
-
// As errors are our custom implementation, TypeDoc does not allow creating `parameters` property for them. Error parameters
|
|
28
|
-
// are passed in `typeParameters` property. To process the error parameters properly, we manually map `typeParameters` into
|
|
29
|
-
// `parameters` property.
|
|
30
|
-
{ parameters: item.typeParameters }
|
|
31
|
-
],
|
|
25
|
+
_signature: [ {}, item ],
|
|
32
26
|
|
|
33
27
|
kind: this.getKind( item ),
|
|
34
28
|
scope: 'inner',
|
|
@@ -9,15 +9,15 @@ const AbstractParser = require( './abstractparser' );
|
|
|
9
9
|
|
|
10
10
|
module.exports = class EventParser extends AbstractParser {
|
|
11
11
|
/**
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {BaseReflection} item
|
|
13
13
|
* @returns {Boolean}
|
|
14
14
|
*/
|
|
15
15
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
16
|
+
return item.isCKEditor5Event === true;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {CKEditor5EventReflection} item
|
|
21
21
|
* @param {String} parentName
|
|
22
22
|
* @returns {Object}
|
|
23
23
|
*/
|
|
@@ -28,13 +28,7 @@ module.exports = class EventParser extends AbstractParser {
|
|
|
28
28
|
|
|
29
29
|
return {
|
|
30
30
|
// Needed for post-processing once all project reflections are converted.
|
|
31
|
-
_signature: [
|
|
32
|
-
{},
|
|
33
|
-
// As events are our custom implementation, TypeDoc does not allow creating `parameters` property for them. Event parameters
|
|
34
|
-
// are passed in `typeParameters` property. To process the event parameters properly, we manually map `typeParameters` into
|
|
35
|
-
// `parameters` property.
|
|
36
|
-
{ parameters: item.typeParameters }
|
|
37
|
-
],
|
|
31
|
+
_signature: [ {}, item ],
|
|
38
32
|
|
|
39
33
|
name: item.name,
|
|
40
34
|
memberof: parentName,
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class FunctionParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Function;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {FunctionReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Array.<Object>}
|
|
23
24
|
*/
|
|
@@ -27,6 +28,7 @@ module.exports = class FunctionParser extends AbstractParser {
|
|
|
27
28
|
// Needed for post-processing once all project reflections are converted.
|
|
28
29
|
_signature: signature,
|
|
29
30
|
|
|
31
|
+
id: item.id,
|
|
30
32
|
name: item.name,
|
|
31
33
|
memberof: parentName,
|
|
32
34
|
longname: this.getLongName( item, parentName ),
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class InterfaceParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Interface;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {InterfaceReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Object}
|
|
23
24
|
*/
|
|
@@ -26,6 +27,7 @@ module.exports = class InterfaceParser extends AbstractParser {
|
|
|
26
27
|
// Needed for post-processing once all project reflections are converted.
|
|
27
28
|
_signature: item,
|
|
28
29
|
|
|
30
|
+
id: item.id,
|
|
29
31
|
name: item.name,
|
|
30
32
|
memberof: parentName,
|
|
31
33
|
longname: this.getLongName( item, parentName ),
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class MethodParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Method;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {MethodReflection|ConstructorReflection} item
|
|
21
22
|
* @param {String} parentName
|
|
22
23
|
* @returns {Array.<Object>}
|
|
23
24
|
*/
|
|
@@ -27,6 +28,7 @@ module.exports = class MethodParser extends AbstractParser {
|
|
|
27
28
|
// Needed for post-processing once all project reflections are converted.
|
|
28
29
|
_signature: signature,
|
|
29
30
|
|
|
31
|
+
id: item.id,
|
|
30
32
|
name: item.name,
|
|
31
33
|
memberof: parentName,
|
|
32
34
|
longname: this.getLongName( item, parentName ),
|
|
@@ -64,7 +66,7 @@ module.exports = class MethodParser extends AbstractParser {
|
|
|
64
66
|
/**
|
|
65
67
|
* Returns the access type for the item based on its signatures.
|
|
66
68
|
*
|
|
67
|
-
* @param {
|
|
69
|
+
* @param {MethodReflection|ConstructorReflection} item
|
|
68
70
|
* @param {Number} sourceIndex
|
|
69
71
|
* @returns {'public'|'internal'|'protected'|'private'}
|
|
70
72
|
*/
|
|
@@ -6,22 +6,28 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const AbstractParser = require( './abstractparser' );
|
|
9
|
+
const ReflectionKind = require( './reflectionkind' );
|
|
9
10
|
|
|
10
11
|
module.exports = class ModuleParser extends AbstractParser {
|
|
11
12
|
/**
|
|
12
|
-
* @param {
|
|
13
|
+
* @param {BaseReflection} item
|
|
13
14
|
* @returns {Boolean}
|
|
14
15
|
*/
|
|
15
16
|
canParse( item ) {
|
|
16
|
-
return item.
|
|
17
|
+
return item.kind === ReflectionKind.Module;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @param {
|
|
21
|
+
* @param {ModuleReflection} item
|
|
21
22
|
* @returns {Object}
|
|
22
23
|
*/
|
|
23
24
|
parse( item ) {
|
|
25
|
+
if ( !item.name.includes( '/' ) ) {
|
|
26
|
+
item.name += '/index';
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
return {
|
|
30
|
+
id: item.id,
|
|
25
31
|
name: item.name,
|
|
26
32
|
longname: this.getLongName( item ),
|
|
27
33
|
kind: this.getKind( item ),
|