UNPKG

7.57 kBTypeScriptView Raw
1import type { PageEvent, Renderer } from "../../index.js";
2import type { Internationalization, TranslationProxy } from "../../../internationalization/internationalization.js";
3import type { DocumentReflection, CommentDisplayPart, DeclarationReflection, Reflection } from "../../../models/index.js";
4import { type NeverIfInternal, type Options } from "../../../utils/index.js";
5import type { DefaultTheme } from "./DefaultTheme.js";
6import { type icons } from "./partials/icon.js";
7export declare class DefaultThemeRenderContext {
8 readonly theme: DefaultTheme;
9 page: PageEvent<Reflection>;
10 private _refIcons;
11 options: Options;
12 internationalization: Internationalization;
13 i18n: TranslationProxy;
14 constructor(theme: DefaultTheme, page: PageEvent<Reflection>, options: Options);
15 /**
16 * Icons available for use within the page.
17 *
18 * Note: This creates a reference to icons declared by {@link DefaultTheme.icons},
19 * to customize icons, that object must be modified instead.
20 */
21 get icons(): Readonly<typeof icons>;
22 get slugger(): import("./Slugger.js").Slugger;
23 hook: Renderer["hooks"]["emit"];
24 /** Avoid this in favor of urlTo if possible */
25 relativeURL: (url: string, cacheBust?: boolean) => string;
26 urlTo: (reflection: Reflection) => string;
27 markdown: (md: readonly CommentDisplayPart[] | NeverIfInternal<string | undefined>) => string;
28 /** Renders user comment markdown wrapped in a tsd-comment div */
29 displayParts: (parts: readonly CommentDisplayPart[] | undefined) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
30 getNavigation: () => import("./DefaultTheme.js").NavigationElement[];
31 getReflectionClasses: (refl: DeclarationReflection | DocumentReflection) => string;
32 documentTemplate: (props: PageEvent<DocumentReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
33 reflectionTemplate: (props: PageEvent<import("../../../models/index.js").ContainerReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
34 indexTemplate: (props: PageEvent<import("../../../models/index.js").ProjectReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
35 hierarchyTemplate: (props: PageEvent<import("../../../models/index.js").ProjectReflection>) => import("../../../utils/jsx.elements.js").JsxElement;
36 defaultLayout: (template: import("../../index.js").RenderTemplate<PageEvent<Reflection>>, props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
37 /**
38 * Rendered just after the description for a reflection.
39 * This can be used to render a shortened type display of a reflection that the
40 * rest of the page expands on.
41 *
42 * Note: Will not be called for variables/type aliases, as they are summarized
43 * by their type declaration, which is already rendered by {@link DefaultThemeRenderContext.memberDeclaration}
44 */
45 reflectionPreview: (props: Reflection) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
46 /**
47 * Used to render additional details about a type. This is used to implement
48 * the `@expand` tag, comments on union members, comments on object type members...
49 */
50 typeDetails: (type: import("../../../models/types.js").SomeType, renderAnchors: boolean) => import("../../../utils/jsx.elements.js").JsxChildren;
51 /**
52 * Should call the {@link typeDetails} helper if rendering additional details
53 * about the type will provide the user with more information about the type.
54 */
55 typeDetailsIfUseful: (type: import("../../../models/types.js").SomeType | undefined) => import("../../../utils/jsx.elements.js").JsxChildren;
56 /**
57 * Wrapper around {@link typeDetails} which checks if it is useful
58 * and includes a "Type Declaration" header.
59 */
60 typeDeclaration: (type: import("../../../models/types.js").SomeType) => import("../../../utils/jsx.elements.js").JsxChildren;
61 breadcrumb: (props: Reflection) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
62 commentShortSummary: (props: Reflection) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
63 commentSummary: (props: Reflection) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
64 commentTags: (props: Reflection) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
65 reflectionFlags: (props: Reflection) => import("../../../utils/jsx.elements.js").JsxElement;
66 footer: () => import("../../../utils/jsx.elements.js").JsxElement;
67 header: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
68 hierarchy: (typeHierarchy: import("../../../models/index.js").DeclarationHierarchy | undefined) => import("../../../utils/jsx.elements.js").JsxElement | undefined;
69 index: (props: import("../../../models/index.js").ContainerReflection) => import("../../../utils/jsx.elements.js").JsxElement;
70 member: (props: DeclarationReflection | DocumentReflection) => import("../../../utils/jsx.elements.js").JsxElement;
71 moduleReflection: (mod: DeclarationReflection | import("../../../models/index.js").ProjectReflection) => import("../../../utils/jsx.elements.js").JsxElement;
72 moduleMemberSummary: (member: DeclarationReflection | DocumentReflection) => import("../../../utils/jsx.elements.js").JsxElement;
73 memberDeclaration: (props: DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
74 memberGetterSetter: (props: DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
75 memberSignatureBody: (props: import("../../../models/index.js").SignatureReflection, r_1?: {
76 hideSources?: boolean;
77 } | undefined) => import("../../../utils/jsx.elements.js").JsxElement;
78 memberSignatureTitle: (props: import("../../../models/index.js").SignatureReflection, options?: {
79 hideName?: boolean;
80 } | undefined) => import("../../../utils/jsx.elements.js").JsxElement;
81 memberSignatures: (props: DeclarationReflection) => import("../../../utils/jsx.elements.js").JsxElement;
82 memberSources: (props: DeclarationReflection | import("../../../models/index.js").SignatureReflection) => import("../../../utils/jsx.elements.js").JsxElement;
83 members: (props: import("../../../models/index.js").ContainerReflection) => import("../../../utils/jsx.elements.js").JsxElement;
84 sidebar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
85 pageSidebar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
86 sidebarLinks: () => import("../../../utils/jsx.elements.js").JsxElement | null;
87 settings: () => import("../../../utils/jsx.elements.js").JsxElement;
88 navigation: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
89 pageNavigation: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
90 toolbar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements.js").JsxElement;
91 type: (type: import("../../../models/types.js").SomeType | undefined, options?: {
92 topLevelLinks: boolean;
93 } | undefined) => import("../../../utils/jsx.elements.js").JsxElement;
94 typeAndParent: (props: import("../../../models/types.js").Type) => import("../../../utils/jsx.elements.js").JsxElement;
95 typeParameters: (typeParameters: import("../../../models/index.js").TypeParameterReflection[]) => import("../../../utils/jsx.elements.js").JsxElement;
96}