UNPKG

6.11 kBTypeScriptView Raw
1import type { PageEvent, Renderer } from "../..";
2import type { Internationalization, TranslationProxy } from "../../../internationalization/internationalization";
3import type { DocumentReflection, CommentDisplayPart, DeclarationReflection, Reflection } from "../../../models";
4import { type NeverIfInternal, type Options } from "../../../utils";
5import type { DefaultTheme } from "./DefaultTheme";
6import { type icons } from "./partials/icon";
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 hook: Renderer["hooks"]["emit"];
23 /** Avoid this in favor of urlTo if possible */
24 relativeURL: (url: string, cacheBust?: boolean) => string;
25 urlTo: (reflection: Reflection) => string;
26 markdown: (md: readonly CommentDisplayPart[] | NeverIfInternal<string | undefined>) => string;
27 getNavigation: () => import("./DefaultTheme").NavigationElement[];
28 getReflectionClasses: (refl: DeclarationReflection | DocumentReflection) => string;
29 documentTemplate: (props: PageEvent<DocumentReflection>) => import("../../../utils/jsx.elements").JsxElement;
30 reflectionTemplate: (props: PageEvent<import("../../../models").ContainerReflection>) => import("../../../utils/jsx.elements").JsxElement;
31 indexTemplate: (props: PageEvent<import("../../../models").ProjectReflection>) => import("../../../utils/jsx.elements").JsxElement;
32 hierarchyTemplate: (props: PageEvent<import("../../../models").ProjectReflection>) => import("../../../utils/jsx.elements").JsxElement;
33 defaultLayout: (template: import("../..").RenderTemplate<PageEvent<Reflection>>, props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
34 /**
35 * Rendered just after the description for a reflection.
36 * This can be used to render a shortened type display of a reflection that the
37 * rest of the page expands on.
38 *
39 * Note: Will not be called for variables/type aliases, as they are summarized
40 * by their type declaration, which is already rendered by {@link DefaultThemeRenderContext.memberDeclaration}
41 */
42 reflectionPreview: (props: Reflection) => import("../../../utils/jsx.elements").JsxElement | undefined;
43 breadcrumb: (props: Reflection) => import("../../../utils/jsx.elements").JsxElement | undefined;
44 commentSummary: (props: Reflection) => import("../../../utils/jsx.elements").JsxElement | undefined;
45 commentTags: (props: Reflection) => import("../../../utils/jsx.elements").JsxElement | undefined;
46 reflectionFlags: (props: Reflection) => import("../../../utils/jsx.elements").JsxElement;
47 footer: () => import("../../../utils/jsx.elements").JsxElement;
48 header: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
49 hierarchy: (props: import("../../../models").DeclarationHierarchy | undefined) => import("../../../utils/jsx.elements").JsxElement | undefined;
50 index: (props: import("../../../models").ContainerReflection) => import("../../../utils/jsx.elements").JsxElement;
51 member: (props: DeclarationReflection | DocumentReflection) => import("../../../utils/jsx.elements").JsxElement;
52 memberDeclaration: (props: DeclarationReflection) => import("../../../utils/jsx.elements").JsxElement;
53 memberGetterSetter: (props: DeclarationReflection) => import("../../../utils/jsx.elements").JsxElement;
54 memberReference: (props: import("../../../models").ReferenceReflection) => import("../../../utils/jsx.elements").JsxElement;
55 memberSignatureBody: (props: import("../../../models").SignatureReflection, r_1?: {
56 hideSources?: boolean;
57 } | undefined) => import("../../../utils/jsx.elements").JsxElement;
58 memberSignatureTitle: (props: import("../../../models").SignatureReflection, r_1?: {
59 hideName?: boolean;
60 arrowStyle?: boolean;
61 hideParamTypes?: boolean;
62 } | undefined) => import("../../../utils/jsx.elements").JsxElement;
63 memberSignatures: (props: DeclarationReflection) => import("../../../utils/jsx.elements").JsxElement;
64 memberSources: (props: DeclarationReflection | import("../../../models").SignatureReflection) => import("../../../utils/jsx.elements").JsxElement;
65 members: (props: import("../../../models").ContainerReflection) => import("../../../utils/jsx.elements").JsxElement;
66 /** @deprecated Since 0.26.3 members does group/category flattening internally */
67 membersGroup?: Function;
68 sidebar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
69 pageSidebar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
70 sidebarLinks: () => import("../../../utils/jsx.elements").JsxElement | null;
71 settings: () => import("../../../utils/jsx.elements").JsxElement;
72 navigation: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
73 pageNavigation: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
74 parameter: (props: DeclarationReflection) => import("../../../utils/jsx.elements").JsxElement;
75 toolbar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
76 type: (type: import("../../../models").Type | undefined, options?: {
77 topLevelLinks: boolean;
78 } | undefined) => import("../../../utils/jsx.elements").JsxElement;
79 typeAndParent: (props: import("../../../models").Type) => import("../../../utils/jsx.elements").JsxElement;
80 typeParameters: (typeParameters: import("../../../models").TypeParameterReflection[]) => import("../../../utils/jsx.elements").JsxElement;
81}