import * as _angular_core from '@angular/core'; import { Type, Injector, InjectionToken, StateKey, Provider, EnvironmentProviders, OnDestroy, OnInit, ComponentRef, ViewContainerRef } from '@angular/core'; import * as rxjs from 'rxjs'; import * as i2 from '@angular/router'; import { Routes } from '@angular/router'; import * as i1 from '@angular/common'; declare type StaticPage = NgeDocLink; declare type DynamicPage = (injector: Injector) => NgeDocLink | Promise | NgeDocLink[] | Promise; declare type StaticMeta = NgeDocMeta; declare type DynamicMeta = (injector: Injector) => NgeDocMeta | Promise; declare type NgeDocRenderer = string | Promise | (() => Type | Promise>); declare type NgeDocRenderers = { /** Markdown renderer. */ markdown: { /** * Reference to a component that can render markdown content. * * The component should expose a `file` property to render a markdown from an url * and a `data` property to render markdown from a string. */ component: () => Type | Promise>; /** Inputs objects to pass to the component instance. */ inputs?: Record | ((injector: Injector) => Record | Promise>); }; }; declare type NgeDocLinkActionHandler = string | ((injector: Injector) => void | Promise); /** * An icon reference. * * - A single url is rendered as-is (and, for monochrome chrome icons, recolored * to the current text color by the theme so it works in light and dark). * - A `{ light, dark }` pair lets you provide a distinct asset per color scheme, * useful for multicolor icons or logos that cannot be recolored. */ declare type NgeDocIcon = string | { light: string; dark: string; }; /** Documentation site config. */ interface NgeDocSettings { /** Metadata informations about a documentation site. */ meta: StaticMeta | DynamicMeta; /** Pages of the documentation site. */ pages: (StaticPage | DynamicPage)[]; } /** Metadata informations about a documentation site. */ interface NgeDocMeta { /** Name of the documentation site. */ name: string; /** Root url of the documentation site. (absolute url starting with `/`) */ root: string; /** Icon of the documentation logo. */ logo?: NgeDocIcon; /** * Where the site's top-level sections live: inside the sidebar tree * (`sidebar`, the default) or as navbar tabs (`tabs`), with the sidebar * scoped to the active section. An explicit `withNavbar()` always wins. */ nav?: 'sidebar' | 'tabs'; /** Optional back url (use of Angular [routerLink]) */ backUrl?: string; /** @deprecated Ignored by the layout; will be removed in the next major. */ backIconUrl?: string; /** Optional back href */ backUrlHref?: string; /** @deprecated Ignored by the layout; will be removed in the next major. */ repo?: { /** Url of the repository */ url: string; /** Name of the repository. */ name: string; }; /** social links to show insides the footer */ links?: { href: string; icon: NgeDocIcon; }[]; } interface NgeDocLinkAction { /** Icon to render for the action. */ icon?: NgeDocIcon; /** Title of the action. */ title?: string; /** Action tooltip */ tooltip?: string; /** Action handler. (A string value here means that the action is an url to open in a new tab) */ run: NgeDocLinkActionHandler; } /** @deprecated Misspelled alias of {@link NgeDocLinkAction}; will be removed in the next major. */ type NgeDocLinAction = NgeDocLinkAction; /** * Representation of a link in the documentation navigation. */ interface NgeDocLink { /** Url to display in the browser navigation bar. Omitted for separators. */ href?: string; /** Title of the link */ title: string; /** Optional page description, used for the `` tag. */ description?: string; /** * Content to render once the link is displayed. * * - A one line string value means that the renderer is an url to a markdown file to render. * * Remarks: * Not required if `children` is defined. * * Example: * * `renderer: assets/my-file.md` * * - A multiline string value means that the renderer is a markdown string to render. * * Example: * * `renderer: "# My Title \n my paragraph \n ...." * * - A reference to a Component type means that the renderer is a dynamic component to render. * * Example: * * `renderer: () => MyComponent` // direct reference to a component * * `renderer: () => import(....).then(m => m.MyComponent)` // reference to a lazy loaded component. * * - A reference to a Module type means that the renderer is a dynamic component to render. * * `renderer: () => MyModule` // direct reference to a module * * `renderer: () => import(....).then(m => m.MyModule)` // reference to a lazy loaded module. * * The difference between referencing a module and referencing a component is the following: * - If you reference a module the dependencies (CommonModule, SharedModule...) of the component * that you want to render will be resolved. * - If you reference a component the dependencies will not be loaded. * * If you choose to reference a module, the module must contains a public field `component` that indicates * the component that you want to render. */ renderer?: NgeDocRenderer; /** Sub links */ children?: NgeDocLink[]; /** A value indicating whether the link is expanded or not. */ expanded?: boolean; /** * Renders this entry as a non-clickable section heading in the sidebar rather * than a link. A separator groups the entries that follow it and is not routed, * so the pages under it keep their own urls. */ separator?: boolean; /** Accent color (any CSS color) shown as the separator's dot. */ color?: string; /** Inputs to pass to the dynamic renderered component if `renderer` is a dynamic component. */ inputs?: Record; /** Optional icon */ icon?: NgeDocIcon; /** Custom actions */ actions?: NgeDocLinkAction[]; /** Source markdown file, relative to the docs folder. Set by the compiler. */ sourcePath?: string; /** ISO date of the last commit that touched the source. Set by the compiler. */ lastUpdated?: string; /** * `false` marks a client-only page (an interactive editor, a playground...) * that static generation must skip. Set by `prerender: false` frontmatter. */ prerender?: boolean; } /** Representation of the documentation state. */ interface NgeDocState { /** Metadata informations about the documentation. */ meta: NgeDocMeta; /** Root links of the site. */ links: NgeDocLink[]; /** Current active link. */ currLink?: NgeDocLink; /** Previous link of the current link. */ prevLink?: NgeDocLink; /** Next link of the current link. */ nextLink?: NgeDocLink; } /** Custom renderers components */ declare const NGE_DOC_RENDERERS: InjectionToken; declare const isNgeDocSettings: (v: unknown) => v is NgeDocSettings; declare const extractNgeDocSettings: (v: unknown) => NgeDocSettings[]; /** Transfer-state key of a docs asset, shared by the browser and server implementations. */ declare function docsAssetStateKey(url: string): StateKey; /** * Reads transfer state first, so a hydrated page reuses the content embedded * at prerender time instead of refetching it, then falls back to HttpClient. * Each transferred entry is consumed on first read: later navigations back to * the same url fetch fresh content. */ declare class HttpNgeDocAssets { private readonly http; private readonly transferState; text(url: string): Promise; json(url: string): Promise; private take; private client; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Fetch port for the docs assets: the manifest (`nge-doc.json`) and the * markdown pages. The default implementation fetches over HTTP with transfer * state support; `provideNgeDocSsr()` (from `@cisstech/nge/doc/ssr`) replaces * it with a filesystem adapter, since there is no HTTP server at prerender time. */ declare abstract class NgeDocAssets { abstract text(url: string): Promise; abstract json(url: string): Promise; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * A resolved documentation site: its metadata and the navigation tree with every * href made absolute. * * It is the single shape the runtime consumes, no matter where the docs come * from: code-first settings (via {@link settingsToManifest}) or, later, a * manifest emitted by the build. `NgeDocLink` stays the authoring API; the * manifest is just its resolved form. */ interface NgeDocManifest { meta: NgeDocMeta; /** Navigation tree, hrefs resolved relative to `meta.root`. */ pages: NgeDocLink[]; } /** * Converts code-first {@link NgeDocSettings} into a {@link NgeDocManifest}: * resolves dynamic `meta`/`pages` factories and returns a fresh tree with hrefs * joined under `meta.root`. The input is never mutated, so settings stay reusable * across navigations. */ declare function settingsToManifest(settings: NgeDocSettings, injector: Injector): Promise; /** * A file-first source: the url of a manifest emitted by the build. Declared in a * route's `data` next to (or instead of) code-first {@link NgeDocSettings}. */ interface NgeDocManifestSource { ngeDocManifestUrl: string; } /** Declares a documentation site loaded at runtime from a build-time manifest. */ declare function docsFromManifest(url: string): NgeDocManifestSource; /** Type guard for a {@link NgeDocManifestSource}. */ declare function isNgeDocManifestSource(value: unknown): value is NgeDocManifestSource; /** Collects manifest sources from route data (mirrors `extractNgeDocSettings`). */ declare function extractManifestSources(value: unknown): NgeDocManifestSource[]; /** * Routable links of a manifest in reading order (depth-first, a parent before * its children). Separators, being visual headings, are skipped along with their * subtree. Used to compute prev/next and to feed search. */ declare function flattenPages(pages: NgeDocLink[]): NgeDocLink[]; /** Joins two url segments with exactly one slash between them. */ declare function joinUrl(a: string, b: string): string; /** A unit of the search index: one document per page, or per heading when content is indexed. */ interface NgeDocSearchDocument { /** Absolute href of the page (with a `#heading` anchor for a section chunk). */ slug: string; /** Page title. */ title: string; /** Heading the chunk was extracted from, when indexing page content. */ heading?: string; /** Text searched against: the title (default provider) or the section content (prebuilt index). */ content: string; } /** A page returned by a {@link NgeDocSearchProvider} for a query. */ interface NgeDocSearchResult { /** Absolute href to navigate to. */ slug: string; /** Page title to display. */ title: string; /** Ancestor titles, site name first, the match excluded. */ path: string[]; /** Matched heading, when the provider indexes page content. */ heading?: string; /** A short content snippet around the match, when the provider indexes content. */ excerpt?: string; } /** * Pluggable search backend. The default builds its index in memory from the * manifests; {@link PrebuiltNgeDocSearchProvider} loads a build-time index * instead. The contract, and therefore the UI, stays the same. */ interface NgeDocSearchProvider { /** (Re)builds the index from the registered sites. Replaces any previous set. */ index(manifests: NgeDocManifest[]): Promise; /** Returns the best matches for `query`, or an empty list for a blank query. */ search(query: string): Promise; } /** Override this to plug a custom search backend via `withSearch()`. */ declare const NGE_DOC_SEARCH_PROVIDER: InjectionToken; /** Every routable page across the manifests, with its breadcrumb path (site name first). */ declare function indexablePages(manifests: NgeDocManifest[]): { href: string; title: string; path: string[]; }[]; /** In-memory, title-based search over the manifests. */ declare class DefaultNgeDocSearchProvider implements NgeDocSearchProvider { private entries; index(manifests: NgeDocManifest[]): Promise; search(query: string): Promise; } /** Search index url for {@link PrebuiltNgeDocSearchProvider}, set via `withSearchIndex()`. */ declare const NGE_DOC_SEARCH_INDEX_URL: InjectionToken; /** * Searches a build-time index (chunked by heading) fetched from * {@link NGE_DOC_SEARCH_INDEX_URL}. The index loads lazily on the first search, * so prerendered pages do not carry it. Same contract as the default provider. */ declare class PrebuiltNgeDocSearchProvider implements NgeDocSearchProvider { private readonly http; private readonly url; private pathBySlug; private documents?; index(manifests: NgeDocManifest[]): Promise; search(query: string): Promise; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** Color scheme preference. `auto` follows the operating system setting. */ type NgeDocColorScheme = 'light' | 'dark' | 'auto'; /** Default color scheme used when the user has not chosen one yet (see `withDarkMode`). */ declare const NGE_DOC_DEFAULT_COLOR_SCHEME: InjectionToken; /** * Owns the documentation color scheme. * * The resolved scheme is reflected as a `nge-doc-dark` class on the document * root and as a native `color-scheme`, so themes and the markdown renderer can * style themselves through plain CSS without re-rendering. Provided in root so a * single instance is shared by every theme. */ declare class NgeDocThemeService { private static readonly STORAGE_KEY; private static readonly DARK_CLASS; private readonly document; private readonly window; private readonly defaultScheme; private readonly systemPrefersDark; private readonly active; /** The user preference. Defaults to `auto` (follows the OS). */ readonly scheme: _angular_core.WritableSignal; /** Whether dark mode is currently active once `auto` is resolved. */ readonly isDark: _angular_core.Signal; constructor(); /** * Enables or disables scheme management on the document root. * * Called by the documentation host on mount/unmount so the `nge-doc-dark` * class and `color-scheme` are removed when navigating away from the docs. */ setActive(active: boolean): void; /** Sets the color scheme preference and persists it. */ setScheme(scheme: NgeDocColorScheme): void; /** Flips between light and dark, pinning the resolved value. */ toggle(): void; private matchSystemDark; private readStoredScheme; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Loads the theme component that renders the documentation. * * A theme is a standalone component; return it directly or lazily (dynamic * `import()`), synchronously or as a promise. This is how a theme plugs its own * whole layout into the nge-doc engine. */ type NgeDocLayoutLoader = () => Type | Promise | { default: Type; }>; /** Injection token holding the active theme loader. */ declare const NGE_DOC_LAYOUT: InjectionToken; /** * The built-in default theme, dynamic-imported so it is tree-shaken away when a * consumer ships its own theme. */ declare const DEFAULT_NGE_DOC_LAYOUT: NgeDocLayoutLoader; /** A configuration feature for {@link provideNgeDoc}. */ interface NgeDocFeature { readonly providers: Provider[]; } /** * Configure the nge-doc engine at the application root. * * Optional: without it, the default theme is used. Compose features such as * {@link withTheme} to opt into a custom theme. * * ```ts * providers: [provideNgeDoc(withTheme(() => import('@acme/theme').then((m) => m.AcmeTheme)))] * ``` */ declare function provideNgeDoc(...features: NgeDocFeature[]): EnvironmentProviders; /** Use a custom theme instead of the default one. */ declare function withTheme(loader: NgeDocLayoutLoader): NgeDocFeature; /** Register the component used to render markdown pages. */ declare function withMarkdownRenderer(markdown: NgeDocRenderers['markdown']): NgeDocFeature; /** * Set the default color scheme applied before the user picks one. * @param mode `auto` (follow the OS, default), `dark` or `light`. */ declare function withDarkMode(mode?: NgeDocColorScheme): NgeDocFeature; /** A top-level navigation link shown in the theme header. */ interface NgeDocNavLink { /** Text of the link. */ title: string; /** Target url (an Angular routerLink, or an absolute url when `external`). */ href: string; /** Optional icon. */ icon?: NgeDocIcon; /** Open in a new tab as a plain anchor instead of routing internally. */ external?: boolean; } /** Header navigation links. When absent, a theme may derive them from the registered sites. */ declare const NGE_DOC_NAVBAR: InjectionToken; /** * Declare the header navigation links (e.g. to move between documentation sites). * * Without it, the default theme derives them from the active site's sections * (`nav: 'tabs'`) or lists the registered sites. */ declare function withNavbar(links: NgeDocNavLink[]): NgeDocFeature; /** The header brand: one logo and wordmark shared by every site. */ interface NgeDocBrand { /** Wordmark shown next to the logo. */ title: string; /** Optional logo icon. */ icon?: NgeDocIcon; /** Where clicking the brand navigates (an Angular routerLink). Defaults to `/`. */ href?: string; } /** Header brand. When absent, the default theme uses the active site's name and logo. */ declare const NGE_DOC_BRAND: InjectionToken; /** * Set a single brand (logo and title) for the header, shared across every site. * * The default theme otherwise shows the active site's `meta.name` and `meta.logo`, * so the brand width follows the current site. A fixed brand keeps the header stable * while site names still drive breadcrumbs and page titles. */ declare function withBrand(brand: NgeDocBrand): NgeDocFeature; /** Site-wide SEO settings used to build canonical, Open Graph and Twitter tags. */ interface NgeDocSeoConfig { /** Absolute site url (no trailing slash), e.g. `https://example.com/docs`. Enables canonical and `og:url`. */ url?: string; /** Default social image; relative paths resolve against `url`. Overridable per page via frontmatter `image`. */ image?: string; } /** Site-wide SEO settings. */ declare const NGE_DOC_SEO: InjectionToken; /** * Enable per-page canonical, Open Graph and Twitter tags. Titles and descriptions * come from each page (frontmatter overrides the manifest); `url` builds the * canonical and `og:url`, and `image` sets the default social card. */ declare function withSeo(config: NgeDocSeoConfig): NgeDocFeature; /** Base url a page's `sourcePath` is appended to for the "Edit this page" link. */ declare const NGE_DOC_EDIT_URL: InjectionToken; /** * Show an "Edit this page" link built from `baseUrl` and each page's compiler * `sourcePath`, e.g. `https://github.com/org/repo/edit/main/docs`. */ declare function withEditLink(baseUrl: string): NgeDocFeature; /** * Search a build-time index emitted by the `@cisstech/nge:docs` builder instead * of the default in-memory title index. `url` points at the generated * `search.json` (e.g. `docs/search.json`); it loads on the first search. */ declare function withSearchIndex(url: string): NgeDocFeature; /** User-facing wording of the default theme, so it can be translated or reworded. */ interface NgeDocLabels { /** Search control and palette (label, aria and placeholder). */ search: string; /** Empty search state, shown before the query. */ searchEmpty: string; /** Table of contents heading and its landmark label. */ tableOfContents: string; /** Table of contents scroll-to-top action. */ backToTop: string; /** Previous page, on the pager. */ previous: string; /** Next page, on the pager. */ next: string; /** Pager landmark label. */ pagination: string; /** Breadcrumb landmark label. */ breadcrumb: string; /** Footer credit, shown before the engine name. */ poweredBy: string; /** Mobile navigation toggle label. */ toggleNavigation: string; /** Sidebar collapse toggle label when the sidebar is hidden. */ showSidebar: string; /** Sidebar collapse toggle label when the sidebar is visible. */ hideSidebar: string; /** Site navigation landmark label (header and mobile drawer). */ sections: string; /** Folder toggle label when the folder is collapsed. */ expand: string; /** Folder toggle label when the folder is expanded. */ collapse: string; /** Theme toggle label to switch to the light scheme. */ switchToLight: string; /** Theme toggle label to switch to the dark scheme. */ switchToDark: string; /** Repository link label, used when the repo has no name. */ repository: string; /** Header action label, used when an action has no title. */ action: string; /** Link to edit the current page's source. */ editThisPage: string; /** Prefix for the date the current page was last updated. */ lastUpdated: string; /** Action that copies the page's markdown to the clipboard. */ copyAsMarkdown: string; /** Confirmation shown briefly after copying. */ copied: string; /** Action that opens the page in ChatGPT. */ openInChatGpt: string; /** Action that opens the page in Claude. */ openInClaude: string; } /** Default (English) theme wording. */ declare const DEFAULT_NGE_DOC_LABELS: NgeDocLabels; /** Ready-made English wording, an alias of {@link DEFAULT_NGE_DOC_LABELS}. */ declare const NGE_DOC_LABELS_EN: NgeDocLabels; /** Ready-made French wording. Use it with `withLabels(NGE_DOC_LABELS_FR)`. */ declare const NGE_DOC_LABELS_FR: NgeDocLabels; /** Overridden theme wording. Merged over {@link DEFAULT_NGE_DOC_LABELS}. */ declare const NGE_DOC_LABELS: InjectionToken>; /** Translate or reword the default theme. Pass only the labels you want to change. */ declare function withLabels(labels: Partial): NgeDocFeature; declare class NgeDocService implements OnDestroy { private readonly router; private readonly injector; private readonly location; private readonly pendingTasks; private readonly activatedRoute; private readonly seoService; private readonly sitesLoader; private readonly seo; private readonly editUrlBase; private readonly explicitNavbar; private readonly explicitBrand; private readonly searchProvider; /** Resolved theme wording: the English defaults merged with any `withLabels` overrides. */ readonly labels: NgeDocLabels; private readonly state; /** Resolved documentation sites, in declaration order. */ private manifests; /** Routable links across every site, in reading order (used for prev/next). */ private routable; private readonly subscriptions; private readonly snapshot; /** Metadata of every registered documentation site, in declaration order. */ readonly sites: _angular_core.WritableSignal; /** * Header navigation links, in precedence order: the ones declared with * `withNavbar`, the active site's top-level sections when its meta opts into * `nav: 'tabs'`, or one per registered site (its name and root). */ readonly navbar: _angular_core.Signal; /** * Header brand: the one declared with `withBrand`, or the active site's name * and logo as a fallback. A fixed brand keeps the header stable across sites. */ readonly brand: _angular_core.Signal; /** Metadata of the active documentation site. */ readonly meta: _angular_core.Signal; /** Root links of the active documentation site (the navigation tree). */ readonly rootLinks: _angular_core.Signal; /** * What the sidebar shows: the whole tree, or only the active section's pages * when the site places its sections in the navbar (`nav: 'tabs'`). */ readonly sidebarLinks: _angular_core.Signal; /** Active link, or `undefined` before the first navigation resolves. */ readonly currLink: _angular_core.Signal; /** Link before the active one in reading order. */ readonly prevLink: _angular_core.Signal; /** Link after the active one in reading order. */ readonly nextLink: _angular_core.Signal; /** Ancestor chain from a root link down to the active one, inclusive. */ readonly breadcrumb: _angular_core.Signal; /** "Edit this page" url for the active page, when `withEditLink` is set and the page has a source. */ readonly editUrl: _angular_core.Signal; /** ISO date the active page was last updated, when the compiler recorded it. */ readonly lastUpdated: _angular_core.Signal; /** Relative url of the active page's raw markdown, used by "copy as markdown". */ readonly markdownUrl: _angular_core.Signal; /** Absolute url of the active page's raw markdown (`.md`), when `withSeo` is set. */ readonly markdownAbsoluteUrl: _angular_core.Signal; /** documentation state */ get stateChanges(): rxjs.Observable; ngOnDestroy(): void; /** * Loads navigation from the router configuration: resolves each settings object * into a manifest, flattens it for prev/next, and hands the set to search. */ setup(): Promise; /** Keeps the app unstable while the route (and any redirect it triggers) resolves. */ private onChangeRoute; private resolveRoute; /** * Runs a link action. * * A string handler is treated as a url to open in a new tab; a function * handler is invoked with the environment injector. * @param run The action handler declared on a link. */ runAction(run: NgeDocLinkActionHandler): Promise; /** * Searches the registered pages through the configured search provider. * @param query Free text to match (case-insensitive). */ search(query: string): Promise; /** * Updates the document title, meta description and social tags for the active * page (canonical, Open Graph, Twitter). Canonical and `og:url` need `withSeo`. * * Called automatically on navigation from the link's `title`/`description`; * the renderer calls it again to apply values found in a page's frontmatter. */ setSeo(title: string, description?: string, image?: string): void; /** Whether a header navigation link points to the active site or section. */ isNavLinkActive(link: NgeDocNavLink): boolean; /** Walks the navigation tree to the active link, collecting its ancestors. */ private trailTo; private reset; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Content pages (an `href` plus a renderer) of a navigation tree, depth-first. * Separators, pure grouping links and external links (no renderer) are * excluded. Shared by the runtime, the compiler and the SSR entry; `src/shared` * holds the pure, framework-free utils and is the only src folder the Node * builder ships (the link type import is type-only, erased at compile time). */ declare function contentPages(pages: NgeDocLink[]): NgeDocLink[]; declare class NgeDocComponent implements OnInit, OnDestroy { private readonly docService; private readonly themeService; private readonly layoutLoader; /** Resolved theme component, mounted once the engine and the theme are ready. */ protected readonly layout: _angular_core.WritableSignal | null>; constructor(); ngOnInit(): Promise; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Routes that render the documentation. Load them directly from a standalone * route configuration: * * ```ts * { path: 'docs', loadChildren: () => import('@cisstech/nge/doc').then((m) => m.NGE_DOC_ROUTES), data: [...] } * ``` */ declare const NGE_DOC_ROUTES: Routes; /** * @deprecated Prefer {@link NGE_DOC_ROUTES} with `loadChildren` and configure the * engine with `provideNgeDoc()`. Kept as a thin façade for backward compatibility. */ declare class NgeDocModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } /** A heading extracted from the rendered page, used to build a table of contents. */ interface NgeDocHeading { /** Slug assigned to the heading element, usable as a url fragment. */ id: string; /** Text content of the heading. */ label: string; /** Heading level (2 for `h2`, 3 for `h3`). */ level: number; } declare class NgeDocRendererComponent implements OnInit, OnDestroy { private readonly injector; private readonly assets; private readonly renderers; private readonly docService; private readonly compilerService; private readonly changeDetectorRef; private readonly elementRef; private readonly activatedRoute; private readonly router; private readonly location; private readonly pendingTasks; private subscriptions; protected readonly loading: _angular_core.WritableSignal; protected readonly notFound: _angular_core.WritableSignal; protected componentRefByTypes: Map, ComponentRef>; componentRef?: ComponentRef; /** Headings of the current page, in document order. */ readonly headings: _angular_core.WritableSignal; /** Id of the heading currently in view, driven by scroll position. */ readonly activeHeadingId: _angular_core.WritableSignal; readonly container: _angular_core.Signal; private contentObserver?; private headingObserver?; private headingElements; private readonly visibility; private syncScheduled; ngOnInit(): void; ngOnDestroy(): void; /** Scrolls a heading into view, offset by the sticky header via `scroll-margin-top`. */ scrollToHeading(id: string): void; /** * Routes clicks on internal links through the Angular router. Authored Markdown * links are plain anchors (for example `/docs/getting-started`); left to the * browser they trigger a full-page load to an absolute path that ignores the * deployed ``, so under a base href such as `/nge/` the segment is * dropped. Routing them keeps navigation in the SPA and re-applies the base href. */ protected onHostClick(event: MouseEvent): void; private showLoading; private clearViewContainer; private onChangeState; private renderMarkdown; /** * Hides the loading skeleton once the markdown content has painted. It prefers * the component's `rendered` output (emitted after the content is revealed) and * falls back to `render` (emitted after compile) for a custom renderer that * lacks it. The guard ignores stale emits from a previous navigation, and the * timeout is a safety net for a renderer that never emits (for example when * compilation throws). */ private awaitMarkdownRender; private attachComponent; /** Debounces heading extraction so a burst of DOM mutations rebuilds the list once. */ private scheduleSync; private syncHeadings; private observeHeadings; /** Re-applies the url fragment once the (async) content that owns it exists. */ private scrollToInitialFragment; private headingElementById; /** Refines the page SEO with a title/description/image declared in the frontmatter. */ private applyFrontmatterSeo; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { DEFAULT_NGE_DOC_LABELS, DEFAULT_NGE_DOC_LAYOUT, DefaultNgeDocSearchProvider, HttpNgeDocAssets, NGE_DOC_BRAND, NGE_DOC_DEFAULT_COLOR_SCHEME, NGE_DOC_EDIT_URL, NGE_DOC_LABELS, NGE_DOC_LABELS_EN, NGE_DOC_LABELS_FR, NGE_DOC_LAYOUT, NGE_DOC_NAVBAR, NGE_DOC_RENDERERS, NGE_DOC_ROUTES, NGE_DOC_SEARCH_INDEX_URL, NGE_DOC_SEARCH_PROVIDER, NGE_DOC_SEO, NgeDocAssets, NgeDocModule, NgeDocRendererComponent, NgeDocService, NgeDocThemeService, PrebuiltNgeDocSearchProvider, contentPages, docsAssetStateKey, docsFromManifest, extractManifestSources, extractNgeDocSettings, flattenPages, indexablePages, isNgeDocManifestSource, isNgeDocSettings, joinUrl, provideNgeDoc, settingsToManifest, withBrand, withDarkMode, withEditLink, withLabels, withMarkdownRenderer, withNavbar, withSearchIndex, withSeo, withTheme }; export type { DynamicMeta, DynamicPage, NgeDocBrand, NgeDocColorScheme, NgeDocFeature, NgeDocHeading, NgeDocIcon, NgeDocLabels, NgeDocLayoutLoader, NgeDocLinAction, NgeDocLink, NgeDocLinkAction, NgeDocLinkActionHandler, NgeDocManifest, NgeDocManifestSource, NgeDocMeta, NgeDocNavLink, NgeDocRenderer, NgeDocRenderers, NgeDocSearchDocument, NgeDocSearchProvider, NgeDocSearchResult, NgeDocSeoConfig, NgeDocSettings, NgeDocState, StaticMeta, StaticPage };