@tsdoctor/model 0.5.0 → 0.6.1
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/Render.js +9 -0
- package/index.d.ts +19 -0
- package/package.json +3 -3
package/Render.js
CHANGED
|
@@ -31,6 +31,9 @@ const KIND_SLUG = {
|
|
|
31
31
|
* `ApiExportedMixin`. Every other item, including any lacking the flag, is
|
|
32
32
|
* kept.
|
|
33
33
|
*
|
|
34
|
+
* @deprecated Use `prepareWorkItems` from `@tsdoctor/pages`, which decides
|
|
35
|
+
* which items receive a page (`isPageKind` for the kind, `SyntheticBases.detect`
|
|
36
|
+
* for the hoisted `*_base` declarations this rule was written to drop).
|
|
34
37
|
* @public
|
|
35
38
|
*/
|
|
36
39
|
const isEmittable = (item) => item.isExported !== false;
|
|
@@ -42,6 +45,8 @@ const signatureOf = (item) => {
|
|
|
42
45
|
* Render one API item's markdown body as flow nodes — the pre-serialization
|
|
43
46
|
* form of {@link item}.
|
|
44
47
|
*
|
|
48
|
+
* @deprecated Use `buildPage` + `markdownTree` from `@tsdoctor/pages`, which
|
|
49
|
+
* yields the same `FlowContent` nodes from a typed `Page`.
|
|
45
50
|
* @alpha
|
|
46
51
|
*/
|
|
47
52
|
function tree(apiItem, opts) {
|
|
@@ -128,6 +133,7 @@ function tree(apiItem, opts) {
|
|
|
128
133
|
/**
|
|
129
134
|
* Render one API item to a markdown body string (no frontmatter).
|
|
130
135
|
*
|
|
136
|
+
* @deprecated Use `buildPage` + `renderMarkdown` from `@tsdoctor/pages`.
|
|
131
137
|
* @public
|
|
132
138
|
*/
|
|
133
139
|
function item(apiItem, opts) {
|
|
@@ -139,6 +145,9 @@ function item(apiItem, opts) {
|
|
|
139
145
|
* Walk a package's first entry point and assemble one RenderedDoc per
|
|
140
146
|
* top-level member.
|
|
141
147
|
*
|
|
148
|
+
* @deprecated Use `prepareWorkItems` + `buildPage` + `renderMarkdown` from
|
|
149
|
+
* `@tsdoctor/pages`; frontmatter is assembled by the adapter from the
|
|
150
|
+
* `Page`'s facts and head tags.
|
|
142
151
|
* @public
|
|
143
152
|
*/
|
|
144
153
|
function docs(apiPackage, opts) {
|
package/index.d.ts
CHANGED
|
@@ -281,6 +281,8 @@ interface ApiItemRef {
|
|
|
281
281
|
/**
|
|
282
282
|
* Metadata handed to the injected frontmatter renderer for one doc.
|
|
283
283
|
*
|
|
284
|
+
* @deprecated Exists only for `Render.docs`; use the `Page` facts from
|
|
285
|
+
* `@tsdoctor/pages` (`buildPage`) instead.
|
|
284
286
|
* @public
|
|
285
287
|
*/
|
|
286
288
|
interface DocMeta extends ApiItemRef {
|
|
@@ -296,12 +298,16 @@ type RouteFormatter = (ref: ApiItemRef) => string;
|
|
|
296
298
|
/**
|
|
297
299
|
* Injected: produce the frontmatter block (incl. trailing blank line) for a doc, or "".
|
|
298
300
|
*
|
|
301
|
+
* @deprecated Exists only for `Render.docs`; adapters assemble frontmatter
|
|
302
|
+
* from a `@tsdoctor/pages` `Page` (see `emitFrontmatterBlock`).
|
|
299
303
|
* @public
|
|
300
304
|
*/
|
|
301
305
|
type FrontmatterRenderer = (meta: DocMeta) => string;
|
|
302
306
|
/**
|
|
303
307
|
* One rendered API doc = its metadata plus the assembled markdown (frontmatter + body).
|
|
304
308
|
*
|
|
309
|
+
* @deprecated Exists only for `Render.docs`; use `buildPage` +
|
|
310
|
+
* `renderMarkdown` from `@tsdoctor/pages`.
|
|
305
311
|
* @public
|
|
306
312
|
*/
|
|
307
313
|
interface RenderedDoc extends DocMeta {
|
|
@@ -311,6 +317,8 @@ interface RenderedDoc extends DocMeta {
|
|
|
311
317
|
* Options for `Render.docs`: the package name plus the optional injected
|
|
312
318
|
* route, frontmatter, and filter services.
|
|
313
319
|
*
|
|
320
|
+
* @deprecated Exists only for `Render.docs`; use `BuildPageInput` from
|
|
321
|
+
* `@tsdoctor/pages`.
|
|
314
322
|
* @public
|
|
315
323
|
*/
|
|
316
324
|
interface RenderPackageOptions {
|
|
@@ -529,6 +537,9 @@ declare namespace Render_d_exports {
|
|
|
529
537
|
* `ApiExportedMixin`. Every other item, including any lacking the flag, is
|
|
530
538
|
* kept.
|
|
531
539
|
*
|
|
540
|
+
* @deprecated Use `prepareWorkItems` from `@tsdoctor/pages`, which decides
|
|
541
|
+
* which items receive a page (`isPageKind` for the kind, `SyntheticBases.detect`
|
|
542
|
+
* for the hoisted `*_base` declarations this rule was written to drop).
|
|
532
543
|
* @public
|
|
533
544
|
*/
|
|
534
545
|
declare const isEmittable: (item: ApiItem) => boolean;
|
|
@@ -536,6 +547,8 @@ declare const isEmittable: (item: ApiItem) => boolean;
|
|
|
536
547
|
* Options for {@link item} and {@link tree}: the package name used in
|
|
537
548
|
* fallbacks and an optional crosslinker applied to the rendered prose.
|
|
538
549
|
*
|
|
550
|
+
* @deprecated Use `BuildPageInput` from `@tsdoctor/pages`, which carries the
|
|
551
|
+
* per-API `CrossLinker` as `linker`.
|
|
539
552
|
* @public
|
|
540
553
|
*/
|
|
541
554
|
interface RenderItemOptions {
|
|
@@ -547,12 +560,15 @@ interface RenderItemOptions {
|
|
|
547
560
|
* Render one API item's markdown body as flow nodes — the pre-serialization
|
|
548
561
|
* form of {@link item}.
|
|
549
562
|
*
|
|
563
|
+
* @deprecated Use `buildPage` + `markdownTree` from `@tsdoctor/pages`, which
|
|
564
|
+
* yields the same `FlowContent` nodes from a typed `Page`.
|
|
550
565
|
* @alpha
|
|
551
566
|
*/
|
|
552
567
|
declare function tree(apiItem: ApiItem, opts: RenderItemOptions): ReadonlyArray<FlowContent>;
|
|
553
568
|
/**
|
|
554
569
|
* Render one API item to a markdown body string (no frontmatter).
|
|
555
570
|
*
|
|
571
|
+
* @deprecated Use `buildPage` + `renderMarkdown` from `@tsdoctor/pages`.
|
|
556
572
|
* @public
|
|
557
573
|
*/
|
|
558
574
|
declare function item(apiItem: ApiItem, opts: RenderItemOptions): string;
|
|
@@ -560,6 +576,9 @@ declare function item(apiItem: ApiItem, opts: RenderItemOptions): string;
|
|
|
560
576
|
* Walk a package's first entry point and assemble one RenderedDoc per
|
|
561
577
|
* top-level member.
|
|
562
578
|
*
|
|
579
|
+
* @deprecated Use `prepareWorkItems` + `buildPage` + `renderMarkdown` from
|
|
580
|
+
* `@tsdoctor/pages`; frontmatter is assembled by the adapter from the
|
|
581
|
+
* `Page`'s facts and head tags.
|
|
563
582
|
* @public
|
|
564
583
|
*/
|
|
565
584
|
declare function docs(apiPackage: ApiPackage, opts: RenderPackageOptions): RenderedDoc[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsdoctor/model",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Render Microsoft API Extractor models into LLM-lean markdown. Pure model loading, TSDoc extraction, type-signature formatting, and per-item markdown rendering.",
|
|
6
6
|
"keywords": [
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@microsoft/api-extractor-model": "^7.33.11",
|
|
42
42
|
"@microsoft/tsdoc": "^0.16.0",
|
|
43
|
-
"@tsdoctor/vfs": "0.1
|
|
43
|
+
"@tsdoctor/vfs": "0.2.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@effected/markdown": "^0.
|
|
46
|
+
"@effected/markdown": "^0.8.0",
|
|
47
47
|
"@effected/yaml": "^0.12.0",
|
|
48
48
|
"effect": "4.0.0-rc.109"
|
|
49
49
|
},
|