1 | import type { ProjectReflection } from "../models/reflections/project.js";
|
2 | import type { RenderTemplate, UrlMapping } from "./models/UrlMapping.js";
|
3 | import type { DeclarationReflection, DocumentReflection, Reflection, ReflectionKind } from "../models/index.js";
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare class RendererEvent {
|
12 | |
13 |
|
14 |
|
15 | readonly project: ProjectReflection;
|
16 | |
17 |
|
18 |
|
19 | readonly outputDirectory: string;
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 | urls?: UrlMapping<Reflection>[];
|
26 | |
27 |
|
28 |
|
29 |
|
30 | static readonly BEGIN = "beginRender";
|
31 | |
32 |
|
33 |
|
34 |
|
35 | static readonly END = "endRender";
|
36 | constructor(outputDirectory: string, project: ProjectReflection);
|
37 | /**
|
38 | * Create an {@link PageEvent} event based on this event and the given url mapping.
|
39 | *
|
40 | * @internal
|
41 | * @param mapping The mapping that defines the generated {@link PageEvent} state.
|
42 | * @returns A newly created {@link PageEvent} instance.
|
43 | */
|
44 | createPageEvent<Model>(mapping: UrlMapping<Model>): [RenderTemplate<PageEvent<Model>>, PageEvent<Model>];
|
45 | }
|
46 | export interface PageHeading {
|
47 | link: string;
|
48 | text: string;
|
49 | level?: number;
|
50 | kind?: ReflectionKind;
|
51 | classes?: string;
|
52 | }
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | export declare class PageEvent<out Model = unknown> {
|
61 | |
62 |
|
63 |
|
64 | project: ProjectReflection;
|
65 | |
66 |
|
67 |
|
68 | filename: string;
|
69 | |
70 |
|
71 |
|
72 | url: string;
|
73 | |
74 |
|
75 |
|
76 | readonly model: Model;
|
77 | |
78 |
|
79 |
|
80 |
|
81 |
|
82 | contents?: string;
|
83 | |
84 |
|
85 |
|
86 |
|
87 | pageHeadings: PageHeading[];
|
88 | |
89 |
|
90 |
|
91 | pageSections: {
|
92 | title: string;
|
93 | headings: PageHeading[];
|
94 | }[];
|
95 | |
96 |
|
97 |
|
98 |
|
99 | startNewSection(title: string): void;
|
100 | |
101 |
|
102 |
|
103 |
|
104 | static readonly BEGIN = "beginPage";
|
105 | |
106 |
|
107 |
|
108 |
|
109 | static readonly END = "endPage";
|
110 | constructor(model: Model);
|
111 | /** @deprecated use the single constructor arg instead, will be removed in 0.27 */
|
112 | constructor(name: string, model: Model);
|
113 | }
|
114 | /**
|
115 | * An event emitted when markdown is being parsed. Allows other plugins to manipulate the result.
|
116 | *
|
117 | * @see {@link MarkdownEvent.PARSE}
|
118 | */
|
119 | export declare class MarkdownEvent {
|
120 | /**
|
121 | * The unparsed original text.
|
122 | */
|
123 | readonly originalText: string;
|
124 | /**
|
125 | * The parsed output.
|
126 | */
|
127 | parsedText: string;
|
128 | /**
|
129 | * The page that this markdown is being parsed for.
|
130 | */
|
131 | readonly page: PageEvent;
|
132 | /**
|
133 | * Triggered on the renderer when this plugin parses a markdown string.
|
134 | * @event
|
135 | */
|
136 | static readonly PARSE = "parseMarkdown";
|
137 | constructor(page: PageEvent, originalText: string, parsedText: string);
|
138 | }
|
139 | /**
|
140 | * An event emitted when the search index is being prepared.
|
141 | */
|
142 | export declare class IndexEvent {
|
143 | /**
|
144 | * Triggered on the renderer when the search index is being prepared.
|
145 | * @event
|
146 | */
|
147 | static readonly PREPARE_INDEX = "prepareIndex";
|
148 | /**
|
149 | * May be filtered by plugins to reduce the results available.
|
150 | * Additional items *should not* be added to this array.
|
151 | *
|
152 | * If you remove an index from this array, you must also remove the
|
153 | * same index from {@link searchFields}. The {@link removeResult} helper
|
154 | * will do this for you.
|
155 | */
|
156 | searchResults: Array<DeclarationReflection | DocumentReflection>;
|
157 | |
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 | searchFields: Record<string, string>[];
|
164 | |
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 | readonly searchFieldWeights: Record<string, number>;
|
175 | |
176 |
|
177 |
|
178 | removeResult(index: number): void;
|
179 | constructor(searchResults: Array<DeclarationReflection | DocumentReflection>);
|
180 | }
|